PageSourceSearch

https://treasurevalleysolutions.com/assets/query-D8_tR0wz.js

js treasurevalleysolutions.com collected 2026-10-08 20:45:13 UTC 37,520 bytes, 1 lines download raw bytes

vendor: 4,900 bytes, line 1
1var ce=e=>{throw TypeError(e)};var Nt=(e,t,s)=>t.has(e)||ce("Cannot "+s);var i=(e,t,s)=>(Nt(e,t,"read from private field"),s?s.call(e):t.get(e)),l=(e,t,s)=>t.has(e)?ce("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),a=(e,t,s,r)=>(Nt(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),d=(e,t,s)=>(Nt(e,t,"access private method"),s);var Kt=(e,t,s,r)=>({set _(n){a(e,t,n,s)},get _(){return i(e,t,r)}});import{r as S,j as Ne}from"./vendor-IF5L2TGO.js";var Dt=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(){}},ft=typeof window>"u"||"Deno"in globalThis;function I(){}function Be(e,t){return typeof e=="function"?e(t):e}function zt(e){return typeof e=="number"&&e>=0&&e!==1/0}function De(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vt(e,t){return typeof e=="function"?e(t):e}function k(e,t){return typeof e=="function"?e(t):e}function le(e,t){const{type:s="all",exact:r,fetchStatus:n,predicate:u,queryKey:o,stale:c}=e;if(o){if(r){if(t.queryHash!==ae(o,t.options))return!1}else if(!Tt(t.queryKey,o))return!1}if(s!=="all"){const h=t.isActive();if(s==="active"&&!h||s==="inactive"&&h)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||n&&n!==t.state.fetchStatus||u&&!u(t))}function fe(e,t){const{exact:s,status:r,predicate:n,mutationKey:u}=e;if(u){if(!t.options.mutationKey)return!1;if(s){if(dt(t.options.mutationKey)!==dt(u))return!1}else if(!Tt(t.options.mutationKey,u))return!1}return!(r&&t.state.status!==r||n&&!n(t))}function ae(e,t){return(t?.queryKeyHashFn||dt)(e)}function dt(e){return JSON.stringify(e,(t,s)=>Vt(s)?Object.keys(s).sort().reduce((r,n)=>(r[n]=s[n],r),{}):s)}function Tt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(s=>!Tt(e[s],t[s])):!1}function qe(e,t){if(e===t)return e;const s=de(e)&&de(t);if(s||Vt(e)&&Vt(t)){const r=s?e:Object.keys(e),n=r.length,u=s?t:Object.keys(t),o=u.length,c=s?[]:{};let h=0;for(let f=0;f<o;f++){const y=s?f:u[f];(!s&&r.includes(y)||s)&&e[y]===void 0&&t[y]===void 0?(c[y]=void 0,h++):(c[y]=qe(e[y],t[y]),c[y]===e[y]&&e[y]!==void 0&&h++)}return n===o&&h===n?e:c}return t}function _t(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function de(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Vt(e){if(!pe(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!pe(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function pe(e){return Object.prototype.toString.call(e)==="[object Object]"}function ze(e){return new Promise(t=>{setTimeout(t,e)})}function Wt(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?qe(e,t):t}function Ve(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function We(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var oe=Symbol();function Te(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===oe?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var nt,$,mt,Oe,$e=(Oe=class extends Dt{constructor(){super();l(this,nt);l(this,$);l(this,mt);a(this,mt,t=>{if(!ft&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){i(this,$)||this.setEventListener(i(this,mt))}onUnsubscribe(){var t;this.hasListeners()||((t=i(this,$))==null||t.call(this),a(this,$,void 0))}setEventListener(t){var s;a(this,mt,t),(s=i(this,$))==null||s.call(this),a(this,$,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){i(this,nt)!==t&&(a(this,nt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){return typeof i(this,nt)=="boolean"?i(this,nt):globalThis.document?.visibilityState!=="hidden"}},nt=new WeakMap,$=new WeakMap,mt=new WeakMap,Oe),ue=new $e,bt,J,gt,Ce,Je=(Ce=class extends Dt{constructor(){super();l(this,bt,!0);l(this,J);l(this,gt);a(this,gt,t=>{if(!ft&&window.addEventListener){const s=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){i(this,J)||this.setEventListener(i(this,gt))}onUnsubscribe(){var t;this.hasListeners()||((t=i(this,J))==null||t.call(this),a(this,J,void 0))}setEventListener(t){var s;a(this,gt,t),(s=i(this,J))==null||s.call(this),a(this,J,t(this.setOnline.bind(this)))}setOnline(t){i(this,bt)!==t&&(a(this,bt,t),this.listeners.forEac
1h(r=>{r(t)}))}isOnline(){return i(this,bt)}},bt=new WeakMap,J=new WeakMap,gt=new WeakMap,Ce),Gt=new Je;function $t(){let e,t;const s=new Promise((n,u)=>{e=n,t=u});s.status="pending",s.catch(()=>{});function r(n){Object.assign(s,n),delete s.resolve,delete s.reject}return s.resolve=n=>{r({status:"fulfilled",value:n}),e(n)},s.reject=n=>{r({status:"rejected",reason:n}),t(n)},s}function Xe(e){return Math.min(1e3*2**e,3e4)}function Ae(e){return(e??"online")==="online"?Gt.isOnline():!0}var Ie=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Bt(e){return e instanceof Ie}function xe(e){let t=!1,s=0,r=!1,n;const u=$t(),o=b=>{r||(x(new Ie(b)),e.abort?.())},c=()=>{t=!0},h=()=>{t=!1},f=()=>ue.isFocused()&&(e.networkMode==="always"||Gt.isOnline())&&e.canRun(),y=()=>Ae(e.networkMode)&&e.canRun(),m=b=>{r||(r=!0,e.onSuccess?.(b),n?.(),u.resolve(b))},x=b=>{r||(r=!0,e.onError?.(b),n?.(),u.reject(b))},g=()=>new Promise(b=>{n=R=>{(r||f())&&b(R)},e.onPause?.()}).then(()=>{n=void 0,r||e.onContinue?.()}),C=()=>{if(r)return;let b;const R=s===0?e.initialPromise:void 0;try{b=R??e.fn()}catch(P){b=Promise.reject(P)}Promise.resolve(b).then(m).catch(P=>{if(r)return;const U=e.retry??(ft?0:3),K=e.retryDelay??Xe,rt=typeof K=="function"?K(s,P):K,jt=U===!0||typeof U=="number"&&s<U||typeof U=="function"&&U(s,P);if(t||!jt){x(P);return}s++,e.onFail?.(s,P),ze(rt).then(()=>f()?void 0:g()).then(()=>{t?x(P):C()})})};return{promise:u,cancel:o,continue:()=>(n?.(),u),cancelRetry:c,continueRetry:h,canStart:y,start:()=>(y()?C():g().then(C),u)}}function Ye(){let e=[],t=0,s=c=>{c()},r=c=>{c()},n=c=>setTimeout(c,0);const u=c=>{t?e.push(c):n(()=>{s(c)})},o=()=>{const c=e;e=[],c.length&&n(()=>{r(()=>{c.forEach(h=>{s(h)})})})};return{batch:c=>{let h;t++;try{h=c()}finally{t--,t||o()}return h},batchCalls:c=>(...h)=>{u(()=>{c(...h)})},schedule:u,setNotifyFunction:c=>{s=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{n=c}}}var w=Ye(),at,Re,Ue=(Re=class{constructor(){l(this,at)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zt(this.gcTime)&&a(this,at,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ft?1/0:300*1e3))}clearGcTimeout(){i(this,at)&&(clearTimeout(i(this,at)),a(this,at,void 0))}},at=new WeakMap,Re),Ot,Ct,A,F,At,ot,j,B,we,Ze=(we=class extends Ue{constructor(t){super();l(this,j);l(this,Ot);l(this,Ct);l(this,A);l(this,F);l(this,At);l(this,ot);a(this,ot,!1),a(this,At,t.defaultOptions),this.setOptions(t.options),this.observers=[],a(this,A,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,a(this,Ot,ts(this.options)),this.state=t.state??i(this,Ot),this.scheduleGc()}get meta(){return this.options.meta}get promise(){return i(this,F)?.promise}setOptions(t){this.options={...i(this,At),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&i(this,A).remove(this)}setData(t,s){const r=Wt(this.state.data,t,this.options);return d(this,j,B).call(this,{data:r,type:"success",dataUpdatedAt:s?.updatedAt,manual:s?.manual}),r}setState(t,s){d(this,j,B).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){const s=i(this,F)?.promise;return i(this,F)?.cancel(t),s?s.then(I).catch(I):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(i(this,Ot))}isActive(){return this.observers.some(t=>
1k(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===oe||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!De(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(s=>s.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),i(this,F)?.continue()}onOnline(){this.observers.find(s=>s.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),i(this,F)?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),i(this,A).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(i(this,F)&&(i(this,ot)?i(this,F).cancel({revert:!0}):i(this,F).cancelRetry()),this.scheduleGc()),i(this,A).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||d(this,j,B).call(this,{type:"invalidate"})}fetch(t,s){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&s?.cancelRefetch)this.cancel({silent:!0});else if(i(this,F))return i(this,F).continueRetry(),i(this,F).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,n=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(a(this,ot,!0),r.signal)})},u=()=>{const h=Te(this.options,s),f={queryKey:this.queryKey,meta:this.meta};return n(f),a(this,ot,!1),this.options.persister?this.options.persister(h,f,this):h(f)},o={fetchOptions:s,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};n(o),this.options.behavior?.onFetch(o,this),a(this,Ct,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&d(this,j,B).call(this,{type:"fetch",meta:o.fetchOptions?.meta});const c=h=>{Bt(h)&&h.silent||d(this,j,B).call(this,{type:"error",error:h}),Bt(h)||(i(this,A).config.onError?.(h,this),i(this,A).config.onSettled?.(this.state.data,h,this)),this.scheduleGc()};return a(this,F,xe({initialPromise:s?.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{if(h===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(f){c(f);return}i(this,A).config.onSuccess?.(h,this),i(this,A).config.onSettled?.(h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,f)=>{d(this,j,B).call(this,{type:"failed",failureCount:h,error:f})},onPause:()=>{d(this,j,B).call(this,{type:"pause"})},onContinue:()=>{d(this,j,B).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),i(this,F).start()}},Ot=new WeakMap,Ct=new WeakMap,A=new WeakMap,F=new WeakMap,At=new WeakMap,ot=new WeakMap,j=new WeakSet,B=function(t){const s=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...je(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=t.error;return Bt(n)&&n.revert&&i(this,Ct)?{...i(this,Ct),fetchStatus:"idle"}:{...r,error:n,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=s(this.state),w.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),i(this,A).notify({query:this,type:"updated",action:t})})},we);function je(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ae(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ts(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdate
1Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var H,Se,es=(Se=class extends Dt{constructor(t={}){super();l(this,H);this.config=t,a(this,H,new Map)}build(t,s,r){const n=s.queryKey,u=s.queryHash??ae(n,s);let o=this.get(u);return o||(o=new Ze({cache:this,queryKey:n,queryHash:u,options:t.defaultQueryOptions(s),state:r,defaultOptions:t.getQueryDefaults(n)}),this.add(o)),o}add(t){i(this,H).has(t.queryHash)||(i(this,H).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=i(this,H).get(t.queryHash);s&&(t.destroy(),s===t&&i(this,H).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){w.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return i(this,H).get(t)}getAll(){return[...i(this,H).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(r=>le(s,r))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(r=>le(t,r)):s}notify(t){w.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){w.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){w.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},H=new WeakMap,Se),_,Q,ut,G,W,Pe,ss=(Pe=class extends Ue{constructor(t){super();l(this,G);l(this,_);l(this,Q);l(this,ut);this.mutationId=t.mutationId,a(this,Q,t.mutationCache),a(this,_,[]),this.state=t.state||ke(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){i(this,_).includes(t)||(i(this,_).push(t),this.clearGcTimeout(),i(this,Q).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){a(this,_,i(this,_).filter(s=>s!==t)),this.scheduleGc(),i(this,Q).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){i(this,_).length||(this.state.status==="pending"?this.scheduleGc():i(this,Q).remove(this))}continue(){return i(this,ut)?.continue()??this.execute(this.state.variables)}async execute(t){a(this,ut,xe({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(n,u)=>{d(this,G,W).call(this,{type:"failed",failureCount:n,error:u})},onPause:()=>{d(this,G,W).call(this,{type:"pause"})},onContinue:()=>{d(this,G,W).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>i(this,Q).canRun(this)}));const s=this.state.status==="pending",r=!i(this,ut).canStart();try{if(!s){d(this,G,W).call(this,{type:"pending",variables:t,isPaused:r}),await i(this,Q).config.onMutate?.(t,this);const u=await this.options.onMutate?.(t);u!==this.state.context&&d(this,G,W).call(this,{type:"pending",context:u,variables:t,isPaused:r})}const n=await i(this,ut).start();return await i(this,Q).config.onSuccess?.(n,t,this.state.context,this),await this.options.onSuccess?.(n,t,this.state.context),await i(this,Q).config.onSettled?.(n,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(n,null,t,this.state.context),d(this,G,W).call(this,{type:"success",data:n}),n}catch(n){try{throw await i(this,Q).config.onError?.(n,t,this.state.context,this),await this.options.onError?.(n,t,this.state.context),await i(this,Q).config.onSettled?.(void 0,n,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,n,t,this.state.context),n}finally{d(this,G,W).call(this,{type:"error",error:n})}}finally{i(this,Q).runNext(this)}}},_=new WeakMap,Q=new WeakMap,ut=new WeakMap,G=new WeakSet,W=function(t){const s=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPau
1sed:!1,status:"error"}}};this.state=s(this.state),w.batch(()=>{i(this,_).forEach(r=>{r.onMutationUpdate(t)}),i(this,Q).notify({mutation:this,type:"updated",action:t})})},Pe);function ke(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var T,It,Fe,is=(Fe=class extends Dt{constructor(t={}){super();l(this,T);l(this,It);this.config=t,a(this,T,new Map),a(this,It,Date.now())}build(t,s,r){const n=new ss({mutationCache:this,mutationId:++Kt(this,It)._,options:t.defaultMutationOptions(s),state:r});return this.add(n),n}add(t){const s=Lt(t),r=i(this,T).get(s)??[];r.push(t),i(this,T).set(s,r),this.notify({type:"added",mutation:t})}remove(t){const s=Lt(t);if(i(this,T).has(s)){const r=i(this,T).get(s)?.filter(n=>n!==t);r&&(r.length===0?i(this,T).delete(s):i(this,T).set(s,r))}this.notify({type:"removed",mutation:t})}canRun(t){const s=i(this,T).get(Lt(t))?.find(r=>r.state.status==="pending");return!s||s===t}runNext(t){return i(this,T).get(Lt(t))?.find(r=>
1r!==t&&r.state.isPaused)?.continue()??Promise.resolve()}clear(){w.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...i(this,T).values()].flat()}find(t){const s={exact:!0,...t};return this.getAll().find(r=>fe(s,r))}findAll(t={}){return this.getAll().filter(s=>fe(t,s))}notify(t){w.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return w.batch(()=>Promise.all(t.map(s=>s.continue().catch(I))))}},T=new WeakMap,It=new WeakMap,Fe);function Lt(e){return e.options.scope?.id??String(e.mutationId)}function ye(e){return{onFetch:(t,s)=>{const r=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,u=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},h=0;const f=async()=>{let y=!1;const m=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},x=Te(t.options,t.fetchOptions),g=async(C,b,R)=>{if(y)return Promise.reject();if(b==null&&C.pages.length)return Promise.resolve(C);const P={queryKey:t.queryKey,pageParam:b,direction:R?"backward":"forward",meta:t.options.meta};m(P);const U=await x(P),{maxPages:K}=t.options,rt=R?We:Ve;return{pages:rt(C.pages,U,K),pageParams:rt(C.pageParams,b,K)}};if(n&&u.length){const C=n==="backward",b=C?rs:ve,R={pages:u,pageParams:o},P=b(r,R);c=await g(R,P,C)}else{const C=e??u.length;do{const b=h===0?o[0]??r.initialPageParam:ve(r,c);if(h>0&&b==null)break;c=await g(c,b),h++}while(h<C)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=f}}}function ve(e,{pages:t,pageParams:s}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function rs(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}var O,X,Y,Rt,wt,Z,St,Pt,Ee,Ss=(Ee=class{constructor(e={}){l(this,O);l(this,X);l(this,Y);l(this,Rt);l(this,wt);l(this,Z);l(this,St);l(this,Pt);a(this,O,e.queryCache||new es),a(this,X,e.mutationCache||new is),a(this,Y,e.defaultOptions||{}),a(this,Rt,new Map),a(this,wt,new Map),a(this,Z,0)}mount(){Kt(this,Z)._++,i(this,Z)===1&&(a(this,St,ue.subscribe(async e=>{e&&(await this.resumePausedMutations(),i(this,O).onFocus())})),a(this,Pt,Gt.subscribe(async e=>{e&&(await this.resumePausedMutations(),i(this,O).onOnline())})))}unmount(){var e,t;Kt(this,Z)._--,i(this,Z)===0&&((e=i(this,St))==null||e.call(this),a(this,St,void 0),(t=i(this,Pt))==null||t.call(this),a(this,Pt,void 0))}isFetching(e){return i(this,O).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return i(this,X).findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return i(this,O).get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const s=this.defaultQueryOptions(e),r=i(this,O).build(this,s);return e.revalidateIfStale&&r.isStaleByTime(vt(s.staleTime,r))&&this.prefetchQuery(s),Promise.resolve(t)}}getQueriesData(e){return i(this,O).findAll(e).map(({queryKey:t,state:s})=>{const r=s.data;return[t,r]})}setQueryData(e,t,s){const r=this.defaultQueryOptions({queryKey:e}),u=i(this,O).get(r.queryHash)?.state.data,o=Be(t,u);if(o!==void 0)return i(this,O).build(this,r).setData(o,{...s,manual:!0})}setQueriesData(e,t,s){return w.batch(()=>i(this,O).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return i(this,O).get(t.queryHash)?.state}removeQueries(e){const t=i(this,O);w.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=i(this,O),r={type:"active",...e};return w.batch(()=>(s.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const s={revert:!0,...t},r=w.batch(()=>i(this,O).findAll(e).map(n=>n.cancel(s)));return Promise.all(r).then(I).catch(I)}invalidateQueries(e={},t={}){return w.batch(()=>{if(i(this,O).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const s={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(s,t)})}refetchQueries(e={},t){const s={...t,cancelRefetch:t?.cancelRefetch??!0},r=w.batch(()=>i(this,O).findAll(e).filter(n=>!n.isDisabled()).map(n=>{let u=n.fetch(void 0,s);return s.throwOnError||(u=u.catch(I)),n.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(r).then(I)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=i(this,O).build(this,t);return s.isStaleByTime(vt(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(I).catch(I)}fetchInfiniteQuery(e){return e.behavior=ye(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(I).catch(I)}ensureInfiniteQueryData(e){return e.behavior=ye(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Gt.isOnline()?i(this,X).resumePausedMutations():Promise.resolve()}getQueryCache(){return i(this,O)}getMutationCache(){return i(this,X)}getDefaultOptions(){return i(this,Y)}setDefaultOptions(e){a(this,Y,e)}setQueryDefaults(e,t){i(this,Rt).set(dt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...i(this,Rt).values()];let s={};return t.forEach(r=>{Tt(e,r.queryKey)&&(s={...s,...r.defaultOptions})}),s}setMutationDefaults(e,t){i(this,wt).set(dt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...i(this,wt).values()];let s={};return t.forEach(r=>{Tt(e,r.mutationKey)&&(s={...s,...r.defaultOptions})}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...i(this,Y).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ae(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.enabled!==!0&&t.queryFn===oe&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...i(this,Y).mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){i(this,O).clear(),i(this,X).clear()}}
vendor: 9,342 bytes, line 1
1,O=new WeakMap,X=new WeakMap,Y=new WeakMap,Rt=new WeakMap,wt=new WeakMap,Z=new WeakMap,St=new WeakMap,Pt=new WeakMap,Ee),D,p,xt,M,ht,Ft,tt,N,Ut,Et,Qt,ct,lt,et,Mt,v,qt,Jt,Xt,Yt,Zt,te,ee,se,Ke,Qe,ns=(Qe=class extends Dt{constructor(t,s){super();l(this,v);l(this,D);l(this,p);l(this,xt);l(this,M);l(this,ht);l(this,Ft);l(this,tt);l(this,N);l(this,Ut);l(this,Et);l(this,Qt);l(this,ct);l(this,lt);l(this,et);l(this,Mt,new Set);this.options=s,a(this,D,t),a(this,N,null),a(this,tt,$t()),this.options.experimental_prefetchInRender||i(this,tt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,p).addObserver(this),me(i(this,p),this.options)?d(this,v,qt).call(this):this.updateResult(),d(this,v,Zt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ie(i(this,p),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ie(i(this,p),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,d(this,v,te).call(this),d(this,v,ee).call(this),i(this,p).removeObserver(this)}setOptions(t,s){const r=this.options,n=i(this,p);if(this.options=i(this,D).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof k(this.options.enabled,i(this,p))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");d(this,v,se).call(this),i(this,p).setOptions(this.options),r._defaulted&&!_t(this.options,r)&&i(this,D).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,p),observer:this});const u=this.hasListeners();u&&be(i(this,p),n,this.options,r)&&d(this,v,qt).call(this),this.updateResult(s),u&&(i(this,p)!==n||k(this.options.enabled,i(this,p))!==k(r.enabled,i(this,p))||vt(this.options.staleTime,i(this,p))!==vt(r.staleTime,i(this,p)))&&d(this,v,Jt).call(this);const o=d(this,v,Xt).call(this);u&&(i(this,p)!==n||k(this.options.enabled,i(this,p))!==k(r.enabled,i(this,p))||o!==i(this,et))&&d(this,v,Yt).call(this,o)}getOptimisticResult(t){const s=i(this,D).getQueryCache().build(i(this,D),t),r=this.createResult(s,t);return os(this,r)&&(a(this,M,r),a(this,Ft,this.options),a(this,ht,i(this,p).state)),r}getCurrentResult(){return i(this,M)}trackResult(t,s){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(n),s?.(n),t[n])})}),r}trackProp(t){i(this,Mt).add(t)}getCurrentQuery(){return i(this,p)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=i(this,D).defaultQueryOptions(t),r=i(this,D).getQueryCache().build(i(this,D),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return d(this,v,qt).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,M)))}createResult(t,s){const r=i(this,p),n=this.options,u=i(this,M),o=i(this,ht),c=i(this,Ft),f=t!==r?t.state:i(this,xt),{state:y}=t;let m={...y},x=!1,g;if(s._optimisticResults){const E=this.hasListeners(),pt=!E&&me(t,s),yt=E&&be(t,r,s,n);(pt||yt)&&(m={...m,...je(y.data,t.options)}),s._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:C,errorUpdatedAt:b,status:R}=m;if(s.select&&m.data!==void 0)if(u&&m.data===o?.data&&s.select===i(this,Ut))g=i(this,Et);else try{a(this,Ut,s.select),g=s.select(m.data),g=Wt(u?.data,g,s),a(this,Et,g),a(this,N,null)}catch(E){a(this,N,E)}else g=m.data;if(s.placeholderData!==void 0&&g===void 0&&R==="pending"){let E;if(u?.isPlaceholderData&&s.placeholderData===c?.placeholderData)E=u.data;else if(E=typeof s.placeholderData=="function"?s.placeholderData(i(this,Qt)?.state.data,i(this,Qt)):s.placeholderData,s.select&&E!==void 0)try{E=s.select(E),a(this,N,null)}catch(pt){a(this,N,pt)}E!==void 0&&(R="success",g=Wt(u?.data,E,s),x=!0)}i(this,N)&&(C=i(this,N),g=i(this,Et),b=Date.now(),R="error");const P=m.fetchStatus==="fetching",U=R==="pending",K=R==="error",rt=U&&P,jt=g!==void 0,L={status:R,fetchStatus:m.fetchStatus,isPending:U,isSuccess:R==="success",isError:K,isInitialLoading:rt,isLoading:rt,data:g,dataUpdatedAt:m.dataUpdatedAt,error:C,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:P,isRefetching:P&&!U,isLoadingError:K&&!jt,isPaused:m.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:K&&jt,isStale:he(t,s),refetch:this.refetch,promise:i(this,tt)};if(this.options.experimental_prefetchInRender){const E=kt=>{L.status==="error"?kt.reject(L.error):L.data!==void 0&&kt.resolve(L.data)},pt=()=>{const kt=a(this,tt,L.promise=$t());E(kt)},yt=i(this,tt);switch(yt.status){case"pending":t.queryHash===r.queryHash&&E(yt);break;case"fulfilled":(L.status==="error"||L.data!==yt.value)&&pt();break;case"rejected":(L.status!=="error"||L.error!==yt.reason)&&pt();break}}return L}updateResult(t){const s=i(this,M),r=this.createResult(i(this,p),this.options);if(a(this,ht,i(this,p).state),a(this,Ft,this.options),i(this,ht).data!==void 0&&a(this,Qt,i(this,p)),_t(r,s))return;a(this,M,r);const n={},u=()=>{if(!s)return!0;const{notifyOnChangeProps:o}=this.options,c=typeof o=="function"?o():o;if(c==="all"||!c&&!i(this,Mt).size)return!0;const h=new Set(c??i(this,Mt));return this.options.throwOnError&&h.add("error"),Object.keys(i(this,M)).some(f=>{const y=f;return i(this,M)[y]!==s[y]&&h.has(y)})};t?.listeners!==!1&&u()&&(n.listeners=!0),d(this,v,Ke).call(this,{...n,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&d(this,v,Zt).call(this)}},D=new WeakMap,p=new WeakMap,xt=new WeakMap,M=new WeakMap,ht=new WeakMap,Ft=new WeakMap,tt=new WeakMap,N=new WeakMap,Ut=new WeakMap,Et=new WeakMap,Qt=new WeakMap,ct=new WeakMap,lt=new WeakMap,et=new WeakMap,Mt=new WeakMap,v=new WeakSet,qt=function(t){d(this,v,se).call(this);let s=i(this,p).fetch(this.options,t);return t?.throwOnError||(s=s.catch(I)),s},Jt=function(){d(this,v,te).call(this);const t=vt(this.options.staleTime,i(this,p));if(ft||i(this,M).isStale||!zt(t))return;const r=De(i(this,M).dataUpdatedAt,t)+1;a(this,ct,setTimeout(()=>{i(this,M).isStale||this.updateResult()},r))},Xt=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,p)):this.options.refetchInterval)??!1},Yt=function(t){d(this,v,ee).call(this),a(this,et,t),!(ft||k(this.options.enabled,i(this,p))===!1||!zt(i(this,et))||i(this,et)===0)&&a(this,lt,setInterval(()=>{(this.options.refetchIntervalInBackground||ue.isFocused())&&d(this,v,qt).call(this)},i(this,et)))},Zt=function(){d(this,v,Jt).call(this),d(this,v,Yt).call(this,d(this,v,Xt).call(this))},te=function(){i(this,ct)&&(clearTimeout(i(this,ct)),a(this,ct,void 0))},ee=function(){i(this,lt)&&(clearInterval(i(this,lt)),a(this,lt,void 0))},se=function(){const t=i(this,D).getQueryCache().build(i(this,D),this.options);if(t===i(this,p))return;const s=i(this,p);a(this,p,t),a(this,xt,t.state),this.hasListeners()&&(s?.removeObserver(this),t.addObserver(this))},Ke=function(t){w.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(i(this,M))}),i(this,D).getQueryCache().notify({query:i(this,p),type:"observerResultsUpdated"})})},Qe);function as(e,t){return k(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function me(e,t){return as(e,t)||e.state.data!==void 0&&ie(e,t,t.refetchOnMount)}function ie(e,t,s){if(k(t.enabled,e)!==!1){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&he(e,t)}return!1}function be(e,t,s,r){return(e!==t||k(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&he(e,s)}function he(e,t){return k(t.enabled,e)!==!1&&e.isStaleByTime(vt(t.staleTime,e))}function os(e,t){return!_t(e.getCurrentResult(),t)}var st,it,q,z,V,Ht,re,Me,us=(Me=class extends Dt{constructor(t,s){super();l(this,V);l(this,st);l(this,it);l(this,q);l(this,z);a(this,st,t),this.setOptions(s),this.bindMethods(),d(this,V,Ht).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=i(this,st).defaultMutationOptions(t),_t(this.options,s)||i(this,st).getMutationCache().notify({type:"observerOptionsUpdated",mutation:i(this,q),observer:this}),s?.mutationKey&&this.options.mutationKey&&dt(s.mutationKey)!==dt(this.options.mutationKey)?this.reset():i(this,q)?.state.status==="pending"&&i(this,q).setOptions(this.options)}onUnsubscribe(){this.hasListeners()||i(this,q)?.removeObserver(this)}onMutationUpdate(t){d(this,V,Ht).call(this),d(this,V,re).call(this,t)}getCurrentResult(){return i(this,it)}reset(){i(this,q)?.removeObserver(this),a(this,q,void 0),d(this,V,Ht).call(this),d(this,V,re).call(this)}mutate(t,s){return a(this,z,s),i(this,q)?.removeObserver(this),a(this,q,i(this,st).getMutationCache().build(i(this,st),this.options)),i(this,q).addObserver(this),i(this,q).execute(t)}},st=new WeakMap,it=new WeakMap,q=new WeakMap,z=new WeakMap,V=new WeakSet,Ht=function(){const t=i(this,q)?.state??ke();a(this,it,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.
1status==="idle",mutate:this.mutate,reset:this.reset})},re=function(t){w.batch(()=>{if(i(this,z)&&this.hasListeners()){const s=i(this,it).variables,r=i(this,it).context;t?.type==="success"?(i(this,z).onSuccess?.(t.data,s,r),i(this,z).onSettled?.(t.data,null,s,r)):t?.type==="error"&&(i(this,z).onError?.(t.error,s,r),i(this,z).onSettled?.(void 0,t.error,s,r))}this.listeners.forEach(s=>{s(i(this,it))})})},Me);function hs(e){return e}function Ps(e,t,s){if(typeof t!="object"||t===null)return;const r=e.getMutationCache(),n=e.getQueryCache(),u=e.getDefaultOptions().hydrate?.deserializeData??hs,o=t.mutations||[],c=t.queries||[];o.forEach(({state:h,...f})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...s?.defaultOptions?.mutations,...f},h)}),c.forEach(({queryKey:h,state:f,queryHash:y,meta:m,promise:x})=>{let g=n.get(y);const C=f.data===void 0?f.data:u(f.data);if(g){if(g.state.dataUpdatedAt<f.dataUpdatedAt){const{fetchStatus:b,...R}=f;g.setState({...R,data:C})}}else g=n.build(e,{...e.getDefaultOptions().hydrate?.queries,...s?.defaultOptions?.queries,queryKey:h,queryHash:y,meta:m},{...f,data:C,fetchStatus:"idle"});if(x){const b=Promise.resolve(x).then(u);g.fetch(void 0,{initialPromise:b})}})}var Le=S.createContext(void 0),He=e=>{const t=S.useContext(Le);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Fs=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Ne.jsx(Le.Provider,{value:e,children:t})),_e=S.createContext(!1),cs=()=>S.useContext(_e);_e.Provider;function ls(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var fs=S.createContext(ls()),ds=()=>S.useContext(fs);function Ge(e,t){return typeof e=="function"?e(...t):!!e}function ne(){}var ps=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},ys=e=>{S.useEffect(()=>{e.clearReset()},[e])},vs=({result:e,errorResetBoundary:t,throwOnError:s,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Ge(s,[e.error,r]),ms=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},bs=(e,t)=>e.isLoading&&e.isFetching&&!t,gs=(e,t)=>e?.suspense&&t.isPending,ge=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Os(e,t,s){const r=He(),n=cs(),u=ds(),o=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=n?"isRestoring":"optimistic",ms(o),ps(o,u),ys(u);const c=!r.getQueryCache().get(o.queryHash),[h]=S.useState(()=>new t(r,o)),f=h.getOptimisticResult(o);if(S.useSyncExternalStore(S.useCallback(y=>{const m=n?ne:h.subscribe(w.batchCalls(y));return h.updateResult(),m},[h,n]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),S.useEffect(()=>{h.setOptions(o,{listeners:!1})},[o,h]),gs(o,f))throw ge(o,h,u);if(vs({result:f,errorResetBoundary:u,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw f.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!ft&&bs(f,n)&&(c?ge(o,h,u):r.getQueryCache().get(o.queryHash)?.promise)?.catch(ne).finally(()=>{h.updateResult()}),o.notifyOnChangeProps?f:h.trackResult(f)}function Es(e,t){return Os(e,ns)}function Qs(e,t){const s=He(),[r]=S.useState(()=>new us(s,e));S.useEffect(()=>{r.setOptions(e)},[r,e]);const n=S.useSyncExternalStore(S.useCallback(o=>r.subscribe(w.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),u=S.useCallback((o,c)=>{r.mutate(o,c).catch(ne)},[r]);if(n.error&&Ge(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:u,mutateAsync:n.mutate}}export{Ss as Q,Fs as a,Qs as b,He as c,Ps as h,Es 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.