UNPKG

sui-explorer-local

Version:
25 lines 1.42 MB
var UV=Object.defineProperty;var zV=(e,t,n)=>t in e?UV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var qk=(e,t,n)=>(zV(e,typeof t!="symbol"?t+"":t,n),n),jb=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var K=(e,t,n)=>(jb(e,t,"read from private field"),n?n.call(e):t.get(e)),Ke=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Re=(e,t,n,r)=>(jb(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var m0=(e,t,n,r)=>({set _(i){Re(e,t,i,n)},get _(){return K(e,t,r)}}),_t=(e,t,n)=>(jb(e,t,"access private method"),n);function UP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var g0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function us(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function HV(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var zP={exports:{}},Z1={},HP={exports:{}},It={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Cg=Symbol.for("react.element"),WV=Symbol.for("react.portal"),GV=Symbol.for("react.fragment"),KV=Symbol.for("react.strict_mode"),qV=Symbol.for("react.profiler"),ZV=Symbol.for("react.provider"),YV=Symbol.for("react.context"),XV=Symbol.for("react.forward_ref"),QV=Symbol.for("react.suspense"),JV=Symbol.for("react.memo"),eU=Symbol.for("react.lazy"),Zk=Symbol.iterator;function tU(e){return e===null||typeof e!="object"?null:(e=Zk&&e[Zk]||e["@@iterator"],typeof e=="function"?e:null)}var WP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},GP=Object.assign,KP={};function Qf(e,t,n){this.props=e,this.context=t,this.refs=KP,this.updater=n||WP}Qf.prototype.isReactComponent={};Qf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Qf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qP(){}qP.prototype=Qf.prototype;function $C(e,t,n){this.props=e,this.context=t,this.refs=KP,this.updater=n||WP}var RC=$C.prototype=new qP;RC.constructor=$C;GP(RC,Qf.prototype);RC.isPureReactComponent=!0;var Yk=Array.isArray,ZP=Object.prototype.hasOwnProperty,AC={current:null},YP={key:!0,ref:!0,__self:!0,__source:!0};function XP(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)ZP.call(t,r)&&!YP.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Cg,type:e,key:s,ref:o,props:i,_owner:AC.current}}function nU(e,t){return{$$typeof:Cg,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function PC(e){return typeof e=="object"&&e!==null&&e.$$typeof===Cg}function rU(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Xk=/\/+/g;function $b(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rU(""+e.key):t.toString(36)}function wv(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Cg:case WV:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+$b(o,0):r,Yk(i)?(n="",e!=null&&(n=e.replace(Xk,"$&/")+"/"),wv(i,t,n,"",function(u){return u})):i!=null&&(PC(i)&&(i=nU(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Xk,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Yk(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+$b(s,a);o+=wv(s,t,n,l,i)}else if(l=tU(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+$b(s,a++),o+=wv(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function v0(e,t,n){if(e==null)return e;var r=[],i=0;return wv(e,r,"","",function(s){return t.call(n,s,i++)}),r}function iU(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Xr={current:null},Sv={transition:null},sU={ReactCurrentDispatcher:Xr,ReactCurrentBatchConfig:Sv,ReactCurrentOwner:AC};It.Children={map:v0,forEach:function(e,t,n){v0(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return v0(e,function(){t++}),t},toArray:function(e){return v0(e,function(t){return t})||[]},only:function(e){if(!PC(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};It.Component=Qf;It.Fragment=GV;It.Profiler=qV;It.PureComponent=$C;It.StrictMode=KV;It.Suspense=QV;It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sU;It.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=GP({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=AC.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)ZP.call(t,l)&&!YP.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Cg,type:e.type,key:i,ref:s,props:r,_owner:o}};It.createContext=function(e){return e={$$typeof:YV,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ZV,_context:e},e.Consumer=e};It.createElement=XP;It.createFactory=function(e){var t=XP.bind(null,e);return t.type=e,t};It.createRef=function(){return{current:null}};It.forwardRef=function(e){return{$$typeof:XV,render:e}};It.isValidElement=PC;It.lazy=function(e){return{$$typeof:eU,_payload:{_status:-1,_result:e},_init:iU}};It.memo=function(e,t){return{$$typeof:JV,type:e,compare:t===void 0?null:t}};It.startTransition=function(e){var t=Sv.transition;Sv.transition={};try{e()}finally{Sv.transition=t}};It.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};It.useCallback=function(e,t){return Xr.current.useCallback(e,t)};It.useContext=function(e){return Xr.current.useContext(e)};It.useDebugValue=function(){};It.useDeferredValue=function(e){return Xr.current.useDeferredValue(e)};It.useEffect=function(e,t){return Xr.current.useEffect(e,t)};It.useId=function(){return Xr.current.useId()};It.useImperativeHandle=function(e,t,n){return Xr.current.useImperativeHandle(e,t,n)};It.useInsertionEffect=function(e,t){return Xr.current.useInsertionEffect(e,t)};It.useLayoutEffect=function(e,t){return Xr.current.useLayoutEffect(e,t)};It.useMemo=function(e,t){return Xr.current.useMemo(e,t)};It.useReducer=function(e,t,n){return Xr.current.useReducer(e,t,n)};It.useRef=function(e){return Xr.current.useRef(e)};It.useState=function(e){return Xr.current.useState(e)};It.useSyncExternalStore=function(e,t,n){return Xr.current.useSyncExternalStore(e,t,n)};It.useTransition=function(){return Xr.current.useTransition()};It.version="18.2.0";HP.exports=It;var m=HP.exports;const ue=us(m),ss=UP({__proto__:null,default:ue},[m]);/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var oU=m,aU=Symbol.for("react.element"),lU=Symbol.for("react.fragment"),uU=Object.prototype.hasOwnProperty,cU=oU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dU={key:!0,ref:!0,__self:!0,__source:!0};function QP(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)uU.call(t,r)&&!dU.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:aU,type:e,key:s,ref:o,props:i,_owner:cU.current}}Z1.Fragment=lU;Z1.jsx=QP;Z1.jsxs=QP;zP.exports=Z1;var f=zP.exports;var Jf=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(){}},Sf=typeof window>"u"||"Deno"in globalThis;function Zi(){}function fU(e,t){return typeof e=="function"?e(t):e}function nS(e){return typeof e=="number"&&e>=0&&e!==1/0}function JP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Qk(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==OC(o,t.options))return!1}else if(!em(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Jk(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(lc(t.options.mutationKey)!==lc(s))return!1}else if(!em(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function OC(e,t){return((t==null?void 0:t.queryKeyHashFn)||lc)(e)}function lc(e){return JSON.stringify(e,(t,n)=>rS(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function em(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!em(e[n],t[n])):!1}function e8(e,t){if(e===t)return e;const n=eT(e)&&eT(t);if(n||rS(e)&&rS(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const c=n?u:s[u];!n&&e[c]===void 0&&t[c]===void 0&&r.includes(c)?(a[c]=void 0,l++):(a[c]=e8(e[c],t[c]),a[c]===e[c]&&e[c]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function dy(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function eT(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rS(e){if(!tT(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!tT(n)||!n.hasOwnProperty("isPrototypeOf"))}function tT(e){return Object.prototype.toString.call(e)==="[object Object]"}function hU(e){return new Promise(t=>{setTimeout(t,e)})}function iS(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?e8(e,t):t}function t8(e){return e}function pU(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function mU(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var NC=Symbol(),Wu,dl,af,PP,gU=(PP=class extends Jf{constructor(){super();Ke(this,Wu,void 0);Ke(this,dl,void 0);Ke(this,af,void 0);Re(this,af,t=>{if(!Sf&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){K(this,dl)||this.setEventListener(K(this,af))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,dl))==null||t.call(this),Re(this,dl,void 0))}setEventListener(t){var n;Re(this,af,t),(n=K(this,dl))==null||n.call(this),Re(this,dl,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){K(this,Wu)!==t&&(Re(this,Wu,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof K(this,Wu)=="boolean"?K(this,Wu):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Wu=new WeakMap,dl=new WeakMap,af=new WeakMap,PP),IC=new gU,lf,fl,uf,OP,vU=(OP=class extends Jf{constructor(){super();Ke(this,lf,!0);Ke(this,fl,void 0);Ke(this,uf,void 0);Re(this,uf,t=>{if(!Sf&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){K(this,fl)||this.setEventListener(K(this,uf))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,fl))==null||t.call(this),Re(this,fl,void 0))}setEventListener(t){var n;Re(this,uf,t),(n=K(this,fl))==null||n.call(this),Re(this,fl,t(this.setOnline.bind(this)))}setOnline(t){K(this,lf)!==t&&(Re(this,lf,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return K(this,lf)}},lf=new WeakMap,fl=new WeakMap,uf=new WeakMap,OP),fy=new vU;function yU(e){return Math.min(1e3*2**e,3e4)}function MC(e){return(e??"online")==="online"?fy.isOnline():!0}var n8=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Rb(e){return e instanceof n8}function r8(e){let t=!1,n=0,r=!1,i,s,o;const a=new Promise((x,b)=>{s=x,o=b}),l=x=>{var b;r||(p(new n8(x)),(b=e.abort)==null||b.call(e))},u=()=>{t=!0},c=()=>{t=!1},d=()=>!IC.isFocused()||e.networkMode!=="always"&&!fy.isOnline(),h=x=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,x),i==null||i(),s(x))},p=x=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,x),i==null||i(),o(x))},v=()=>new Promise(x=>{var b;i=y=>{const w=r||!d();return w&&x(y),w},(b=e.onPause)==null||b.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),g=()=>{if(r)return;let x;try{x=e.fn()}catch(b){x=Promise.reject(b)}Promise.resolve(x).then(h).catch(b=>{var C;if(r)return;const y=e.retry??(Sf?0:3),w=e.retryDelay??yU,_=typeof w=="function"?w(n,b):w,T=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,b);if(t||!T){p(b);return}n++,(C=e.onFail)==null||C.call(e,n,b),hU(_).then(()=>{if(d())return v()}).then(()=>{t?p(b):g()})})};return MC(e.networkMode)?g():v().then(g),{promise:a,cancel:l,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:u,continueRetry:c}}function xU(){let e=[],t=0,n=h=>{h()},r=h=>{h()},i=h=>setTimeout(h,0);const s=h=>{i=h},o=h=>{let p;t++;try{p=h()}finally{t--,t||u()}return p},a=h=>{t?e.push(h):i(()=>{n(h)})},l=h=>(...p)=>{a(()=>{h(...p)})},u=()=>{const h=e;e=[],h.length&&i(()=>{r(()=>{h.forEach(p=>{n(p)})})})};return{batch:o,batchCalls:l,schedule:a,setNotifyFunction:h=>{n=h},setBatchNotifyFunction:h=>{r=h},setScheduler:s}}var Zn=xU(),Gu,NP,i8=(NP=class{constructor(){Ke(this,Gu,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nS(this.gcTime)&&Re(this,Gu,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Sf?1/0:5*60*1e3))}clearGcTimeout(){K(this,Gu)&&(clearTimeout(K(this,Gu)),Re(this,Gu,void 0))}},Gu=new WeakMap,NP),cf,df,Ki,Mr,rr,dg,Ku,xs,Bo,IP,bU=(IP=class extends i8{constructor(t){super();Ke(this,xs);Ke(this,cf,void 0);Ke(this,df,void 0);Ke(this,Ki,void 0);Ke(this,Mr,void 0);Ke(this,rr,void 0);Ke(this,dg,void 0);Ke(this,Ku,void 0);Re(this,Ku,!1),Re(this,dg,t.defaultOptions),this.setOptions(t.options),Re(this,rr,[]),Re(this,Ki,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Re(this,cf,t.state||wU(this.options)),this.state=K(this,cf),this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...K(this,dg),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!K(this,rr).length&&this.state.fetchStatus==="idle"&&K(this,Ki).remove(this)}setData(t,n){const r=iS(this.state.data,t,this.options);return _t(this,xs,Bo).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){_t(this,xs,Bo).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=K(this,Mr))==null?void 0:r.promise;return(i=K(this,Mr))==null||i.cancel(t),n?n.then(Zi).catch(Zi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(K(this,cf))}isActive(){return K(this,rr).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?K(this,rr).some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!JP(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=K(this,rr).find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,Mr))==null||n.continue()}onOnline(){var n;const t=K(this,rr).find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,Mr))==null||n.continue()}addObserver(t){K(this,rr).includes(t)||(K(this,rr).push(t),this.clearGcTimeout(),K(this,Ki).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){K(this,rr).includes(t)&&(Re(this,rr,K(this,rr).filter(n=>n!==t)),K(this,rr).length||(K(this,Mr)&&(K(this,Ku)?K(this,Mr).cancel({revert:!0}):K(this,Mr).cancelRetry()),this.scheduleGc()),K(this,Ki).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return K(this,rr).length}invalidate(){this.state.isInvalidated||_t(this,xs,Bo).call(this,{type:"invalidate"})}fetch(t,n){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(K(this,Mr))return K(this,Mr).continueRetry(),K(this,Mr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=K(this,rr).find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,i={queryKey:this.queryKey,meta:this.meta},s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(Re(this,Ku,!0),r.signal)})};s(i);const o=()=>!this.options.queryFn||this.options.queryFn===NC?Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)):(Re(this,Ku,!1),this.options.persister?this.options.persister(this.options.queryFn,i,this):this.options.queryFn(i)),a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};s(a),(u=this.options.behavior)==null||u.onFetch(a,this),Re(this,df,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&_t(this,xs,Bo).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=h=>{var p,v,g,x;Rb(h)&&h.silent||_t(this,xs,Bo).call(this,{type:"error",error:h}),Rb(h)||((v=(p=K(this,Ki).config).onError)==null||v.call(p,h,this),(x=(g=K(this,Ki).config).onSettled)==null||x.call(g,this.state.data,h,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return Re(this,Mr,r8({fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var p,v,g,x;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}this.setData(h),(v=(p=K(this,Ki).config).onSuccess)==null||v.call(p,h,this),(x=(g=K(this,Ki).config).onSettled)==null||x.call(g,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(h,p)=>{_t(this,xs,Bo).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{_t(this,xs,Bo).call(this,{type:"pause"})},onContinue:()=>{_t(this,xs,Bo).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode})),K(this,Mr).promise}},cf=new WeakMap,df=new WeakMap,Ki=new WeakMap,Mr=new WeakMap,rr=new WeakMap,dg=new WeakMap,Ku=new WeakMap,xs=new WeakSet,Bo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...s8(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 i=t.error;return Rb(i)&&i.revert&&K(this,df)?{...K(this,df),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Zn.batch(()=>{K(this,rr).forEach(r=>{r.onQueryUpdate()}),K(this,Ki).notify({query:this,type:"updated",action:t})})},IP);function s8(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:MC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wU(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var to,MP,SU=(MP=class extends Jf{constructor(t={}){super();Ke(this,to,void 0);this.config=t,Re(this,to,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??OC(i,n);let o=this.get(s);return o||(o=new bU({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){K(this,to).has(t.queryHash)||(K(this,to).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=K(this,to).get(t.queryHash);n&&(t.destroy(),n===t&&K(this,to).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return K(this,to).get(t)}getAll(){return[...K(this,to).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Qk(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Qk(t,r)):n}notify(t){Zn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Zn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Zn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},to=new WeakMap,MP),no,fg,mi,ff,ro,Xa,LP,EU=(LP=class extends i8{constructor(t){super();Ke(this,ro);Ke(this,no,void 0);Ke(this,fg,void 0);Ke(this,mi,void 0);Ke(this,ff,void 0);this.mutationId=t.mutationId,Re(this,fg,t.defaultOptions),Re(this,mi,t.mutationCache),Re(this,no,[]),this.state=t.state||o8(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...K(this,fg),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){K(this,no).includes(t)||(K(this,no).push(t),this.clearGcTimeout(),K(this,mi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Re(this,no,K(this,no).filter(n=>n!==t)),this.scheduleGc(),K(this,mi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){K(this,no).length||(this.state.status==="pending"?this.scheduleGc():K(this,mi).remove(this))}continue(){var t;return((t=K(this,ff))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,c,d,h,p,v,g,x,b,y,w,_,T,C,P;const n=()=>(Re(this,ff,r8({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,k)=>{_t(this,ro,Xa).call(this,{type:"failed",failureCount:S,error:k})},onPause:()=>{_t(this,ro,Xa).call(this,{type:"pause"})},onContinue:()=>{_t(this,ro,Xa).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),K(this,ff).promise),r=this.state.status==="pending";try{if(!r){_t(this,ro,Xa).call(this,{type:"pending",variables:t}),await((s=(i=K(this,mi).config).onMutate)==null?void 0:s.call(i,t,this));const k=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));k!==this.state.context&&_t(this,ro,Xa).call(this,{type:"pending",context:k,variables:t})}const S=await n();return await((u=(l=K(this,mi).config).onSuccess)==null?void 0:u.call(l,S,t,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,S,t,this.state.context)),await((p=(h=K(this,mi).config).onSettled)==null?void 0:p.call(h,S,null,this.state.variables,this.state.context,this)),await((g=(v=this.options).onSettled)==null?void 0:g.call(v,S,null,t,this.state.context)),_t(this,ro,Xa).call(this,{type:"success",data:S}),S}catch(S){try{throw await((b=(x=K(this,mi).config).onError)==null?void 0:b.call(x,S,t,this.state.context,this)),await((w=(y=this.options).onError)==null?void 0:w.call(y,S,t,this.state.context)),await((T=(_=K(this,mi).config).onSettled)==null?void 0:T.call(_,void 0,S,this.state.variables,this.state.context,this)),await((P=(C=this.options).onSettled)==null?void 0:P.call(C,void 0,S,t,this.state.context)),S}finally{_t(this,ro,Xa).call(this,{type:"error",error:S})}}}},no=new WeakMap,fg=new WeakMap,mi=new WeakMap,ff=new WeakMap,ro=new WeakSet,Xa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!MC(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Zn.batch(()=>{K(this,no).forEach(r=>{r.onMutationUpdate(t)}),K(this,mi).notify({mutation:this,type:"updated",action:t})})},LP);function o8(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qi,hg,qu,DP,CU=(DP=class extends Jf{constructor(t={}){super();Ke(this,qi,void 0);Ke(this,hg,void 0);Ke(this,qu,void 0);this.config=t,Re(this,qi,[]),Re(this,hg,0)}build(t,n,r){const i=new EU({mutationCache:this,mutationId:++m0(this,hg)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){K(this,qi).push(t),this.notify({type:"added",mutation:t})}remove(t){Re(this,qi,K(this,qi).filter(n=>n!==t)),this.notify({type:"removed",mutation:t})}clear(){Zn.batch(()=>{K(this,qi).forEach(t=>{this.remove(t)})})}getAll(){return K(this,qi)}find(t){const n={exact:!0,...t};return K(this,qi).find(r=>Jk(n,r))}findAll(t={}){return K(this,qi).filter(n=>Jk(t,n))}notify(t){Zn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){return Re(this,qu,(K(this,qu)??Promise.resolve()).then(()=>{const t=K(this,qi).filter(n=>n.state.isPaused);return Zn.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(Zi)),Promise.resolve()))}).then(()=>{Re(this,qu,void 0)})),K(this,qu)}},qi=new WeakMap,hg=new WeakMap,qu=new WeakMap,DP);function sS(e){return{onFetch:(t,n)=>{const r=async()=>{var v,g,x,b,y;const i=t.options,s=(x=(g=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],a=((y=t.state.data)==null?void 0:y.pageParams)||[],l={pages:[],pageParams:[]};let u=!1;const c=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},d=t.options.queryFn&&t.options.queryFn!==NC?t.options.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`)),h=async(w,_,T)=>{if(u)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const C={queryKey:t.queryKey,pageParam:_,direction:T?"backward":"forward",meta:t.options.meta};c(C);const P=await d(C),{maxPages:S}=t.options,k=T?mU:pU;return{pages:k(w.pages,P,S),pageParams:k(w.pageParams,_,S)}};let p;if(s&&o.length){const w=s==="backward",_=w?a8:oS,T={pages:o,pageParams:a},C=_(i,T);p=await h(T,C,w)}else{p=await h(l,a[0]??i.initialPageParam);const w=e??o.length;for(let _=1;_<w;_++){const T=oS(i,p);p=await h(p,T)}}return p};t.options.persister?t.fetchFn=()=>{var i,s;return(s=(i=t.options).persister)==null?void 0:s.call(i,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function oS(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function a8(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}function _U(e,t){return t?oS(e,t)!=null:!1}function kU(e,t){return!t||!e.getPreviousPageParam?!1:a8(e,t)!=null}var kn,hl,pl,hf,pf,ml,mf,gf,FP,TU=(FP=class{constructor(e={}){Ke(this,kn,void 0);Ke(this,hl,void 0);Ke(this,pl,void 0);Ke(this,hf,void 0);Ke(this,pf,void 0);Ke(this,ml,void 0);Ke(this,mf,void 0);Ke(this,gf,void 0);Re(this,kn,e.queryCache||new SU),Re(this,hl,e.mutationCache||new CU),Re(this,pl,e.defaultOptions||{}),Re(this,hf,new Map),Re(this,pf,new Map),Re(this,ml,0)}mount(){m0(this,ml)._++,K(this,ml)===1&&(Re(this,mf,IC.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,kn).onFocus())})),Re(this,gf,fy.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,kn).onOnline())})))}unmount(){var e,t;m0(this,ml)._--,K(this,ml)===0&&((e=K(this,mf))==null||e.call(this),Re(this,mf,void 0),(t=K(this,gf))==null||t.call(this),Re(this,gf,void 0))}isFetching(e){return K(this,kn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return K(this,hl).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,kn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=K(this,kn).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(n.staleTime)&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return K(this,kn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=K(this,kn).get(r.queryHash),s=i==null?void 0:i.state.data,o=fU(t,s);if(o!==void 0)return K(this,kn).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Zn.batch(()=>K(this,kn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,kn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=K(this,kn);Zn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=K(this,kn),r={type:"active",...e};return Zn.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Zn.batch(()=>K(this,kn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Zi).catch(Zi)}invalidateQueries(e={},t={}){return Zn.batch(()=>{if(K(this,kn).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Zn.batch(()=>K(this,kn).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Zi)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Zi)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=K(this,kn).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zi).catch(Zi)}fetchInfiniteQuery(e){return e.behavior=sS(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zi).catch(Zi)}resumePausedMutations(){return fy.isOnline()?K(this,hl).resumePausedMutations():Promise.resolve()}getQueryCache(){return K(this,kn)}getMutationCache(){return K(this,hl)}getDefaultOptions(){return K(this,pl)}setDefaultOptions(e){Re(this,pl,e)}setQueryDefaults(e,t){K(this,hf).set(lc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...K(this,hf).values()];let n={};return t.forEach(r=>{em(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){K(this,pf).set(lc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...K(this,pf).values()];let n={};return t.forEach(r=>{em(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...K(this,pl).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=OC(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===NC&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...K(this,pl).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){K(this,kn).clear(),K(this,hl).clear()}},kn=new WeakMap,hl=new WeakMap,pl=new WeakMap,hf=new WeakMap,pf=new WeakMap,ml=new WeakMap,mf=new WeakMap,gf=new WeakMap,FP),ti,nn,pg,Lr,Zu,vf,io,mg,yf,xf,Yu,Xu,gl,bf,Qu,op,gg,aS,vg,lS,yg,uS,xg,cS,bg,dS,wg,fS,Sg,hS,q1,u8,BP,l8=(BP=class extends Jf{constructor(t,n){super();Ke(this,Qu);Ke(this,gg);Ke(this,vg);Ke(this,yg);Ke(this,xg);Ke(this,bg);Ke(this,wg);Ke(this,Sg);Ke(this,q1);Ke(this,ti,void 0);Ke(this,nn,void 0);Ke(this,pg,void 0);Ke(this,Lr,void 0);Ke(this,Zu,void 0);Ke(this,vf,void 0);Ke(this,io,void 0);Ke(this,mg,void 0);Ke(this,yf,void 0);Ke(this,xf,void 0);Ke(this,Yu,void 0);Ke(this,Xu,void 0);Ke(this,gl,void 0);Ke(this,bf,new Set);this.options=n,Re(this,ti,t),Re(this,io,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(K(this,nn).addObserver(this),nT(K(this,nn),this.options)?_t(this,Qu,op).call(this):this.updateResult(),_t(this,xg,cS).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pS(K(this,nn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pS(K(this,nn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,_t(this,bg,dS).call(this),_t(this,wg,fS).call(this),K(this,nn).removeObserver(this)}setOptions(t,n){const r=this.options,i=K(this,nn);if(this.options=K(this,ti).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");_t(this,Sg,hS).call(this),K(this,nn).setOptions(this.options),r._defaulted&&!dy(this.options,r)&&K(this,ti).getQueryCache().notify({type:"observerOptionsUpdated",query:K(this,nn),observer:this});const s=this.hasListeners();s&&rT(K(this,nn),i,this.options,r)&&_t(this,Qu,op).call(this),this.updateResult(n),s&&(K(this,nn)!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&_t(this,gg,aS).call(this);const o=_t(this,vg,lS).call(this);s&&(K(this,nn)!==i||this.options.enabled!==r.enabled||o!==K(this,gl))&&_t(this,yg,uS).call(this,o)}getOptimisticResult(t){const n=K(this,ti).getQueryCache().build(K(this,ti),t),r=this.createResult(n,t);return $U(this,r)&&(Re(this,Lr,r),Re(this,vf,this.options),Re(this,Zu,K(this,nn).state)),r}getCurrentResult(){return K(this,Lr)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){K(this,bf).add(t)}getCurrentQuery(){return K(this,nn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=K(this,ti).defaultQueryOptions(t),r=K(this,ti).getQueryCache().build(K(this,ti),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return _t(this,Qu,op).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),K(this,Lr)))}createResult(t,n){var P;const r=K(this,nn),i=this.options,s=K(this,Lr),o=K(this,Zu),a=K(this,vf),u=t!==r?t.state:K(this,pg),{state:c}=t;let d={...c},h=!1,p;if(n._optimisticResults){const S=this.hasListeners(),k=!S&&nT(t,n),$=S&&rT(t,r,n,i);(k||$)&&(d={...d,...s8(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:x}=d;if(n.select&&d.data!==void 0)if(s&&d.data===(o==null?void 0:o.data)&&n.select===K(this,mg))p=K(this,yf);else try{Re(this,mg,n.select),p=n.select(d.data),p=iS(s==null?void 0:s.data,p,n),Re(this,yf,p),Re(this,io,null)}catch(S){Re(this,io,S)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&x==="pending"){let S;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))S=s.data;else if(S=typeof n.placeholderData=="function"?n.placeholderData((P=K(this,xf))==null?void 0:P.state.data,K(this,xf)):n.placeholderData,n.select&&S!==void 0)try{S=n.select(S),Re(this,io,null)}catch(k){Re(this,io,k)}S!==void 0&&(x="success",p=iS(s==null?void 0:s.data,S,n),h=!0)}K(this,io)&&(v=K(this,io),p=K(this,yf),g=Date.now(),x="error");const b=d.fetchStatus==="fetching",y=x==="pending",w=x==="error",_=y&&b,T=p!==void 0;return{status:x,fetchStatus:d.fetchStatus,isPending:y,isSuccess:x==="success",isError:w,isInitialLoading:_,isLoading:_,data:p,dataUpdatedAt:d.dataUpdatedAt,error:v,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:w&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&T,isStale:LC(t,n),refetch:this.refetch}}updateResult(t){const n=K(this,Lr),r=this.createResult(K(this,nn),this.options);if(Re(this,Zu,K(this,nn).state),Re(this,vf,this.options),K(this,Zu).data!==void 0&&Re(this,xf,K(this,nn)),dy(r,n))return;Re(this,Lr,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!K(this,bf).size)return!0;const l=new Set(a??K(this,bf));return this.options.throwOnError&&l.add("error"),Object.keys(K(this,Lr)).some(u=>{const c=u;return K(this,Lr)[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),_t(this,q1,u8).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&_t(this,xg,cS).call(this)}},ti=new WeakMap,nn=new WeakMap,pg=new WeakMap,Lr=new WeakMap,Zu=new WeakMap,vf=new WeakMap,io=new WeakMap,mg=new WeakMap,yf=new WeakMap,xf=new WeakMap,Yu=new WeakMap,Xu=new WeakMap,gl=new WeakMap,bf=new WeakMap,Qu=new WeakSet,op=function(t){_t(this,Sg,hS).call(this);let n=K(this,nn).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zi)),n},gg=new WeakSet,aS=function(){if(_t(this,bg,dS).call(this),Sf||K(this,Lr).isStale||!nS(this.options.staleTime))return;const n=JP(K(this,Lr).dataUpdatedAt,this.options.staleTime)+1;Re(this,Yu,setTimeout(()=>{K(this,Lr).isStale||this.updateResult()},n))},vg=new WeakSet,lS=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(K(this,nn)):this.options.refetchInterval)??!1},yg=new WeakSet,uS=function(t){_t(this,wg,fS).call(this),Re(this,gl,t),!(Sf||this.options.enabled===!1||!nS(K(this,gl))||K(this,gl)===0)&&Re(this,Xu,setInterval(()=>{(this.options.refetchIntervalInBackground||IC.isFocused())&&_t(this,Qu,op).call(this)},K(this,gl)))},xg=new WeakSet,cS=function(){_t(this,gg,aS).call(this),_t(this,yg,uS).call(this,_t(this,vg,lS).call(this))},bg=new WeakSet,dS=function(){K(this,Yu)&&(clearTimeout(K(this,Yu)),Re(this,Yu,void 0))},wg=new WeakSet,fS=function(){K(this,Xu)&&(clearInterval(K(this,Xu)),Re(this,Xu,void 0))},Sg=new WeakSet,hS=function(){const t=K(this,ti).getQueryCache().build(K(this,ti),this.options);if(t===K(this,nn))return;const n=K(this,nn);Re(this,nn,t),Re(this,pg,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},q1=new WeakSet,u8=function(t){Zn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(K(this,Lr))}),K(this,ti).getQueryCache().notify({query:K(this,nn),type:"observerResultsUpdated"})})},BP);function jU(e,t){return t.enabled!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function nT(e,t){return jU(e,t)||e.state.data!==void 0&&pS(e,t,t.refetchOnMount)}function pS(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&LC(e,t)}return!1}function rT(e,t,n,r){return(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&LC(e,n)}function LC(e,t){return t.enabled!==!1&&e.isStaleByTime(t.staleTime)}function $U(e,t){return!dy(e.getCurrentResult(),t)}var RU=class extends l8{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:sS()},t)}getOptimisticResult(e){return e.behavior=sS(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var l,u,c,d;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:s}=r,o=i&&((u=(l=n.fetchMeta)==null?void 0:l.fetchMore)==null?void 0:u.direction)==="forward",a=i&&((d=(c=n.fetchMeta)==null?void 0:c.fetchMore)==null?void 0:d.direction)==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:_U(t,n.data),hasPreviousPage:kU(t,n.data),isFetchingNextPage:o,isFetchingPreviousPage:a,isRefetching:s&&!o&&!a}}},vl,yl,ni,Xo,wf,Ev,Eg,mS,VP,AU=(VP=class extends Jf{constructor(n,r){super();Ke(this,wf);Ke(this,Eg);Ke(this,vl,void 0);Ke(this,yl,void 0);Ke(this,ni,void 0);Ke(this,Xo,void 0);Re(this,vl,n),this.setOptions(r),this.bindMethods(),_t(this,wf,Ev).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=K(this,vl).defaultMutationOptions(n),dy(this.options,r)||K(this,vl).getMutationCache().notify({type:"observerOptionsUpdated",mutation:K(this,ni),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&lc(r.mutationKey)!==lc(this.options.mutationKey)?this.reset():((i=K(this,ni))==null?void 0:i.state.status)==="pending"&&K(this,ni).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=K(this,ni))==null||n.removeObserver(this)}onMutationUpdate(n){_t(this,wf,Ev).call(this),_t(this,Eg,mS).call(this,n)}getCurrentResult(){return K(this,yl)}reset(){var n;(n=K(this,ni))==null||n.removeObserver(this),Re(this,ni,void 0),_t(this,wf,Ev).call(this),_t(this,Eg,mS).call(this)}mutate(n,r){var i;return Re(this,Xo,r),(i=K(this,ni))==null||i.removeObserver(this),Re(this,ni,K(this,vl).getMutationCache().build(K(this,vl),this.options)),K(this,ni).addObserver(this),K(this,ni).execute(n)}},vl=new WeakMap,yl=new WeakMap,ni=new WeakMap,Xo=new WeakMap,wf=new WeakSet,Ev=function(){var r;const n=((r=K(this,ni))==null?void 0:r.state)??o8();Re(this,yl,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Eg=new WeakSet,mS=function(n){Zn.batch(()=>{var r,i,s,o,a,l,u,c;if(K(this,Xo)&&this.hasListeners()){const d=K(this,yl).variables,h=K(this,yl).context;(n==null?void 0:n.type)==="success"?((i=(r=K(this,Xo)).onSuccess)==null||i.call(r,n.data,d,h),(o=(s=K(this,Xo)).onSettled)==null||o.call(s,n.data,null,d,h)):(n==null?void 0:n.type)==="error"&&((l=(a=K(this,Xo)).onError)==null||l.call(a,n.error,d,h),(c=(u=K(this,Xo)).onSettled)==null||c.call(u,void 0,n.error,d,h))}this.listeners.forEach(d=>{d(K(this,yl))})})},VP),c8=m.createContext(void 0),d8=e=>{const t=m.useContext(c8);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},PU=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(c8.Provider,{value:e,children:t})),f8=m.createContext(!1),OU=()=>m.useContext(f8);f8.Provider;function NU(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var IU=m.createContext(NU()),MU=()=>m.useContext(IU);function h8(e,t){return typeof e=="function"?e(...t):!!e}function LU(){}var DU=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},FU=e=>{m.useEffect(()=>{e.clearReset()},[e])},BU=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&h8(n,[e.error,r]),VU=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},UU=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,zU=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function p8(e,t,n){const r=d8(n),i=OU(),s=MU(),o=r.defaultQueryOptions(e);o._optimisticResults=i?"isRestoring":"optimistic",VU(o),DU(o,s),FU(s);const[a]=m.useState(()=>new t(r,o)),l=a.getOptimisticResult(o);if(m.useSyncExternalStore(m.useCallback(u=>{const c=i?()=>{}:a.subscribe(Zn.batchCalls(u));return a.updateResult(),c},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),m.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),UU(o,l))throw zU(o,a,s);if(BU({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw l.error;return o.notifyOnChangeProps?l:a.trackResult(l)}function Zt(e,t){return p8(e,l8,t)}function _g(e,t){const n=d8(t),[r]=m.useState(()=>new AU(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);const i=m.useSyncExternalStore(m.useCallback(o=>r.subscribe(Zn.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=m.useCallback((o,a)=>{r.mutate(o,a).catch(LU)},[r]);if(i.error&&h8(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function eh(e,t){return p8(e,RU,t)}var gS={},m8={exports:{}},Li={},g8={exports:{}},v8={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(e){function t(L,U){var z=L.length;L.push(U);e:for(;0<z;){var H=z-1>>>1,Z=L[H];if(0<i(Z,U))L[H]=U,L[z]=Z,z=H;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var U=L[0],z=L.pop();if(z!==U){L[0]=z;e:for(var H=0,Z=L.length,ee=Z>>>1;H<ee;){var ae=2*(H+1)-1,ie=L[ae],pe=ae+1,Ie=L[pe];if(0>i(ie,z))pe<Z&&0>i(Ie,ie)?(L[H]=Ie,L[pe]=z,H=pe):(L[H]=ie,L[ae]=z,H=ae);else if(pe<Z&&0>i(Ie,z))L[H]=Ie,L[pe]=z,H=pe;else break e}}return U}function i(L,U){var z=L.sortIndex-U.sortIndex;return z!==0?z:L.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,h=3,p=!1,v=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(L){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=L)r(u),U.sortIndex=U.expirationTime,t(l,U);else break;U=n(u)}}function _(L){if(g=!1,w(L),!v)if(n(l)!==null)v=!0,A(T);else{var U=n(u);U!==null&&I(_,U.startTime-L)}}function T(L,U){v=!1,g&&(g=!1,b(S),S=-1),p=!0;var z=h;try{for(w(U),d=n(l);d!==null&&(!(d.expirationTime>U)||L&&!R());){var H=d.callback;if(typeof H=="function"){d.callback=null,h=d.priorityLevel;var Z=H(d.expirationTime<=U);U=e.unstable_now(),typeof Z=="function"?d.callback=Z:d===n(l)&&r(l),w(U)}else r(l);d=n(l)}if(d!==null)var ee=!0;else{var ae=n(u);ae!==null&&I(_,ae.startTime-U),ee=!1}return ee}finally{d=null,h=z,p=!1}}var C=!1,P=null,S=-1,k=5,$=-1;function R(){return!(e.unstable_now()-$<k)}function N()