forked from avelino/awesome-go
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
2242-faf2bf9478cc1299.js.download
8 lines (8 loc) · 25.9 KB
/
2242-faf2bf9478cc1299.js.download
1
2
3
4
5
6
7
8
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2242],{26801:function(e,t,r){r.d(t,{SV:function(){return c}});var n=r(38828),i=r(22697),s=r(2637),a=r(82512);r(88589);var o=r(91710);let u="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,l={componentStack:null,error:null,eventId:null};class c extends o.Component{componentDidCatch(e,t){let{componentStack:r}=t,{beforeCapture:a,onError:u,showDialog:l,dialogOptions:c}=this.props;(0,n.$e)(t=>{if(function(e){let t=e.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}(o.version)&&(0,s.VZ)(e)){let t=Error(e.message);t.name="React ErrorBoundary ".concat(e.name),t.stack=r,function(e,t){let r=new WeakMap;!function e(t,n){if(!r.has(t)){if(t.cause)return r.set(t,!0),e(t.cause,n);t.cause=n}}(e,t)}(e,t)}a&&a(t,e,r);let h=(0,n.Tb)(e,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!1}});u&&u(e,r,h),l&&(this._lastEventId=h,this._openFallbackReportDialog&&(0,i.jp)({...c,eventId:h})),this.setState({error:e,componentStack:r,eventId:h})})}componentDidMount(){let{onMount:e}=this.props;e&&e()}componentWillUnmount(){let{error:e,componentStack:t,eventId:r}=this.state,{onUnmount:n}=this.props;n&&n(e,t,r)}__init(){this.resetErrorBoundary=()=>{let{onReset:e}=this.props,{error:t,componentStack:r,eventId:n}=this.state;e&&e(t,r,n),this.setState(l)}}render(){let{fallback:e,children:t}=this.props,r=this.state;if(r.error){let t;return(t="function"==typeof e?e({error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):e,o.isValidElement(t))?t:(e&&u&&a.kg.warn("fallback did not produce a valid ReactElement"),null)}return"function"==typeof t?t():t}constructor(e){super(e),c.prototype.__init.call(this),this.state=l,this._openFallbackReportDialog=!0;let t=(0,n.s3)();t&&t.on&&e.showDialog&&(this._openFallbackReportDialog=!1,t.on("afterSendEvent",t=>{t.type||t.event_id!==this._lastEventId||(0,i.jp)({...e.dialogOptions,eventId:this._lastEventId})}))}}},88589:function(e,t,r){var n=r(83088),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function u(e){return n.isMemo(e)?a:o[e.$$typeof]||i}o[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[n.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(p){var i=f(r);i&&i!==p&&e(t,i,n)}var a=c(r);h&&(a=a.concat(h(r)));for(var o=u(t),y=u(r),m=0;m<a.length;++m){var v=a[m];if(!s[v]&&!(n&&n[v])&&!(y&&y[v])&&!(o&&o[v])){var g=d(r,v);try{l(t,v,g)}catch(e){}}}}return t}},38310:function(e){var t,r,n=Object.prototype,i=Function.prototype.toString,s=n.hasOwnProperty,a=i.call(Object),o=n.toString,u=(t=Object.getPrototypeOf,r=Object,function(e){return t(r(e))});e.exports=function(e){if(!(e&&"object"==typeof e)||"[object Object]"!=o.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=u(e);if(null===t)return!0;var r=s.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&i.call(r)==a}},91623:function(e,t,r){r.d(t,{F:function(){return u},f:function(){return l}});var n=r(91710);let i=["light","dark"],s="(prefers-color-scheme: dark)",a=(0,n.createContext)(void 0),o={setTheme:e=>{},themes:[]},u=()=>{var e;return null!==(e=(0,n.useContext)(a))&&void 0!==e?e:o},l=e=>(0,n.useContext)(a)?n.createElement(n.Fragment,null,e.children):n.createElement(c,e),c=e=>{let{forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:o=!0,enableColorScheme:u=!0,storageKey:l="theme",themes:c=["light","dark"],defaultTheme:y=o?"system":"light",attribute:m="data-theme",value:v,children:g,nonce:b}=e,[S,C]=(0,n.useState)(()=>d(l,y)),[O,P]=(0,n.useState)(()=>d(l)),q=v?Object.values(v):c,F=(0,n.useCallback)(e=>{let t=e;if(!t)return;"system"===e&&o&&(t=p());let n=v?v[t]:t,s=r?f():null,a=document.documentElement;if("class"===m?(a.classList.remove(...q),n&&a.classList.add(n)):n?a.setAttribute(m,n):a.removeAttribute(m),u){let e=i.includes(y)?y:null,r=i.includes(t)?t:e;a.style.colorScheme=r}null==s||s()},[]),D=(0,n.useCallback)(e=>{C(e);try{localStorage.setItem(l,e)}catch(e){}},[t]),w=(0,n.useCallback)(e=>{P(p(e)),"system"===S&&o&&!t&&F("system")},[S,t]);return(0,n.useEffect)(()=>{let e=window.matchMedia(s);return e.addListener(w),w(e),()=>e.removeListener(w)},[w]),(0,n.useEffect)(()=>{let e=e=>{e.key===l&&D(e.newValue||y)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[D]),(0,n.useEffect)(()=>{F(null!=t?t:S)},[t,S]),n.createElement(a.Provider,{value:{theme:S,setTheme:D,forcedTheme:t,resolvedTheme:"system"===S?O:S,themes:o?[...c,"system"]:c,systemTheme:o?O:void 0}},n.createElement(h,{forcedTheme:t,disableTransitionOnChange:r,enableSystem:o,enableColorScheme:u,storageKey:l,themes:c,defaultTheme:y,attribute:m,value:v,children:g,attrs:q,nonce:b}),g)},h=(0,n.memo)(e=>{let{forcedTheme:t,storageKey:r,attribute:a,enableSystem:o,enableColorScheme:u,defaultTheme:l,value:c,attrs:h,nonce:d}=e,f="system"===l,p="class"===a?"var d=document.documentElement,c=d.classList;c.remove(".concat(h.map(e=>"'".concat(e,"'")).join(","),");"):"var d=document.documentElement,n='".concat(a,"',s='setAttribute';"),y=u?i.includes(l)&&l?"if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'".concat(l,"'"):"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=c?c[e]:e,s=t?e+"|| ''":"'".concat(n,"'"),o="";return u&&r&&!t&&i.includes(e)&&(o+="d.style.colorScheme = '".concat(e,"';")),"class"===a?o+=t||n?"c.add(".concat(s,")"):"null":n&&(o+="d[s](n,".concat(s,")")),o},v=t?"!function(){".concat(p).concat(m(t),"}()"):o?"!function(){try{".concat(p,"var e=localStorage.getItem('").concat(r,"');if('system'===e||(!e&&").concat(f,")){var t='").concat(s,"',m=window.matchMedia(t);if(m.media!==t||m.matches){").concat(m("dark"),"}else{").concat(m("light"),"}}else if(e){").concat(c?"var x=".concat(JSON.stringify(c),";"):"").concat(m(c?"x[e]":"e",!0),"}").concat(f?"":"else{"+m(l,!1,!1)+"}").concat(y,"}catch(e){}}()"):"!function(){try{".concat(p,"var e=localStorage.getItem('").concat(r,"');if(e){").concat(c?"var x=".concat(JSON.stringify(c),";"):"").concat(m(c?"x[e]":"e",!0),"}else{").concat(m(l,!1,!1),";}").concat(y,"}catch(t){}}();");return n.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:v}})},()=>!0),d=(e,t)=>{let r;try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t},f=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},p=e=>(e||(e=window.matchMedia(s)),e.matches?"dark":"light")},77058:function(e,t,r){var n=r(19958);r.o(n,"notFound")&&r.d(t,{notFound:function(){return n.notFound}}),r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},21793:function(e,t,r){r.d(t,{default:function(){return i.a}});var n=r(91008),i=r.n(n)},80521:function(e,t){/** @license React v16.13.1
* react-is.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 r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,o=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,S=r?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case h:case s:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case y:case u:return e;default:return t}}case i:return t}}}function O(e){return C(e)===h}t.AsyncMode=c,t.ConcurrentMode=h,t.ContextConsumer=l,t.ContextProvider=u,t.Element=n,t.ForwardRef=d,t.Fragment=s,t.Lazy=m,t.Memo=y,t.Portal=i,t.Profiler=o,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return O(e)||C(e)===c},t.isConcurrentMode=O,t.isContextConsumer=function(e){return C(e)===l},t.isContextProvider=function(e){return C(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return C(e)===d},t.isFragment=function(e){return C(e)===s},t.isLazy=function(e){return C(e)===m},t.isMemo=function(e){return C(e)===y},t.isPortal=function(e){return C(e)===i},t.isProfiler=function(e){return C(e)===o},t.isStrictMode=function(e){return C(e)===a},t.isSuspense=function(e){return C(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===h||e===o||e===a||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===y||e.$$typeof===u||e.$$typeof===l||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===S||e.$$typeof===v)},t.typeOf=C},83088:function(e,t,r){e.exports=r(80521)},17264:function(e,t,r){var n,i=(n=r(38310))&&n.__esModule?n:{default:n};t.Z=function e(t,r,n,s){var a,o=!(s=s||{}).hasOwnProperty("partial")||s.partial,u=!s.hasOwnProperty("strict")||s.strict,l=!!s.hasOwnProperty("ignoreUnknown")&&s.ignoreUnknown;if(a=typeof t,null==t||"object"!==a&&"function"!==a)return t;if(Array.isArray(t))return t.map(function(t){return e(t,r,n,s)});if(i.default(t))return Object.keys(t).reduce(function(i,a){var l,c;return(void 0===(l=u)&&(l=!1),void 0===(c=o)&&(c=!1),r.some(function(e){var t=l?a:a.toLowerCase(),r=l?e:e.toLowerCase();return c?-1!==t.indexOf(r):t===r}))?i[a]="function"==typeof n?n(t[a],a):n||"[ REDACTED ]":i[a]=e(t[a],r,n,s),i},{});if(l)return t;throw Error("Unsupported value for redaction")}},6385:function(e,t,r){function n(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,n,a,o,u;let l;let c=null==(t=e.fetchOptions)?void 0:null==(r=t.meta)?void 0:r.refetchPage,h=null==(n=e.fetchOptions)?void 0:null==(a=n.meta)?void 0:a.fetchMore,d=null==h?void 0:h.pageParam,f=(null==h?void 0:h.direction)==="forward",p=(null==h?void 0:h.direction)==="backward",y=(null==(o=e.state.data)?void 0:o.pages)||[],m=(null==(u=e.state.data)?void 0:u.pageParams)||[],v=m,g=!1,b=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{var t,r;return null!=(t=e.signal)&&t.aborted?g=!0:null==(r=e.signal)||r.addEventListener("abort",()=>{g=!0}),e.signal}})},S=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),C=(e,t,r,n)=>(v=n?[t,...v]:[...v,t],n?[r,...e]:[...e,r]),O=(t,r,n,i)=>{if(g)return Promise.reject("Cancelled");if(void 0===n&&!r&&t.length)return Promise.resolve(t);let s={queryKey:e.queryKey,pageParam:n,meta:e.options.meta};return b(s),Promise.resolve(S(s)).then(e=>C(t,n,e,i))};if(y.length){if(f){let t=void 0!==d,r=t?d:i(e.options,y);l=O(y,t,r)}else if(p){let t=void 0!==d,r=t?d:s(e.options,y);l=O(y,t,r,!0)}else{v=[];let t=void 0===e.options.getNextPageParam;l=!c||!y[0]||c(y[0],0,y)?O([],t,m[0]):Promise.resolve(C([],m[0],y[0]));for(let r=1;r<y.length;r++)l=l.then(n=>{if(!c||!y[r]||c(y[r],r,y)){let s=t?m[r]:i(e.options,n);return O(n,t,s)}return Promise.resolve(C(n,m[r],y[r]))})}}else l=O([]);return l.then(e=>({pages:e,pageParams:v}))}}}}function i(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function s(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}function a(e,t){if(e.getNextPageParam&&Array.isArray(t)){let r=i(e,t);return null!=r&&!1!==r}}function o(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){let r=s(e,t);return null!=r&&!1!==r}}r.d(t,{Gm:function(){return n},Qy:function(){return a},ZF:function(){return o}})},56549:function(e,t,r){r.d(t,{L:function(){return o}});var n=r(99065),i=r(67756),s=r(48703),a=r(37343);class o extends a.l{build(e,t,r){let n=new i.m({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:r,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(n),n}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){n.V.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(t=>(0,s.X7)(e,t))}findAll(e){return this.mutations.filter(t=>(0,s.X7)(e,t))}notify(e){n.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then(()=>{let e=this.mutations.filter(e=>e.state.isPaused);return n.V.batch(()=>e.reduce((e,t)=>e.then(()=>t.continue().catch(s.ZT)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}}},12051:function(e,t,r){r.d(t,{t:function(){return c}});var n=r(48703),i=r(8406),s=r(99065),a=r(26810),o=r(52951);class u extends o.F{get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){let r=(0,n.oE)(this.state.data,e,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;let r=this.promise;return null==(t=this.retryer)||t.cancel(e),r?r.then(n.ZT).catch(n.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,n.Kp)(this.state.dataUpdatedAt,e)}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var r,i,s,o;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(s=this.retryer)||s.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}Array.isArray(this.options.queryKey);let u=(0,n.G9)(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(u)return this.abortSignalConsumed=!0,u.signal}})};c(l);let h={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn")};c(h),null==(r=this.options.behavior)||r.onFetch(h),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(i=h.fetchOptions)?void 0:i.meta))&&this.dispatch({type:"fetch",meta:null==(o=h.fetchOptions)?void 0:o.meta});let d=e=>{if((0,a.DV)(e)&&e.silent||this.dispatch({type:"error",error:e}),!(0,a.DV)(e)){var t,r,n,i;null==(t=(r=this.cache.config).onError)||t.call(r,e,this),null==(n=(i=this.cache.config).onSettled)||n.call(i,this.state.data,e,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=(0,a.Mz)({fn:h.fetchFn,abort:null==u?void 0:u.abort.bind(u),onSuccess:e=>{var t,r,n,i;if(void 0===e){d(Error("undefined"));return}this.setData(e),null==(t=(r=this.cache.config).onSuccess)||t.call(r,e,this),null==(n=(i=this.cache.config).onSettled)||n.call(i,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var r,n;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(r=e.meta)?r:null,fetchStatus:(0,a.Kw)(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(n=e.dataUpdatedAt)?n:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let i=e.error;if((0,a.DV)(i)&&i.revert&&this.revertState)return{...this.revertState};return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),s.V.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||i._,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}}var l=r(37343);class c extends l.l{build(e,t,r){var i;let s=t.queryKey,a=null!=(i=t.queryHash)?i:(0,n.Rm)(s,t),o=this.get(a);return o||(o=new u({cache:this,logger:e.getLogger(),queryKey:s,queryHash:a,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){let t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(t=>t!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){s.V.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){let[r]=(0,n.I6)(e,t);return void 0===r.exact&&(r.exact=!0),this.queries.find(e=>(0,n._x)(r,e))}findAll(e,t){let[r]=(0,n.I6)(e,t);return Object.keys(r).length>0?this.queries.filter(e=>(0,n._x)(r,e)):this.queries}notify(e){s.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){s.V.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){s.V.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}}},44033:function(e,t,r){r.d(t,{S:function(){return h}});var n=r(48703),i=r(12051),s=r(56549),a=r(17497),o=r(14342),u=r(99065),l=r(6385),c=r(8406);class h{mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=a.j.subscribe(()=>{a.j.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=o.N.subscribe(()=>{o.N.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){let[r]=(0,n.I6)(e,t);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state.data}ensureQueryData(e,t,r){let i=(0,n._v)(e,t,r),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(e=>{let{queryKey:t,state:r}=e;return[t,r.data]})}setQueryData(e,t,r){let i=this.queryCache.find(e),s=null==i?void 0:i.state.data,a=(0,n.SE)(t,s);if(void 0===a)return;let o=(0,n._v)(e),u=this.defaultQueryOptions(o);return this.queryCache.build(this,u).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return u.V.batch(()=>this.getQueryCache().findAll(e).map(e=>{let{queryKey:n}=e;return[n,this.setQueryData(n,t,r)]}))}getQueryState(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state}removeQueries(e,t){let[r]=(0,n.I6)(e,t),i=this.queryCache;u.V.batch(()=>{i.findAll(r).forEach(e=>{i.remove(e)})})}resetQueries(e,t,r){let[i,s]=(0,n.I6)(e,t,r),a=this.queryCache,o={type:"active",...i};return u.V.batch(()=>(a.findAll(i).forEach(e=>{e.reset()}),this.refetchQueries(o,s)))}cancelQueries(e,t,r){let[i,s={}]=(0,n.I6)(e,t,r);return void 0===s.revert&&(s.revert=!0),Promise.all(u.V.batch(()=>this.queryCache.findAll(i).map(e=>e.cancel(s)))).then(n.ZT).catch(n.ZT)}invalidateQueries(e,t,r){let[i,s]=(0,n.I6)(e,t,r);return u.V.batch(()=>{var e,t;if(this.queryCache.findAll(i).forEach(e=>{e.invalidate()}),"none"===i.refetchType)return Promise.resolve();let r={...i,type:null!=(e=null!=(t=i.refetchType)?t:i.type)?e:"active"};return this.refetchQueries(r,s)})}refetchQueries(e,t,r){let[i,s]=(0,n.I6)(e,t,r),a=Promise.all(u.V.batch(()=>this.queryCache.findAll(i).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...s,cancelRefetch:null==(t=null==s?void 0:s.cancelRefetch)||t,meta:{refetchPage:i.refetchPage}})}))).then(n.ZT);return null!=s&&s.throwOnError||(a=a.catch(n.ZT)),a}fetchQuery(e,t,r){let i=(0,n._v)(e,t,r),s=this.defaultQueryOptions(i);void 0===s.retry&&(s.retry=!1);let a=this.queryCache.build(this,s);return a.isStaleByTime(s.staleTime)?a.fetch(s):Promise.resolve(a.state.data)}prefetchQuery(e,t,r){return this.fetchQuery(e,t,r).then(n.ZT).catch(n.ZT)}fetchInfiniteQuery(e,t,r){let i=(0,n._v)(e,t,r);return i.behavior=(0,l.Gm)(),this.fetchQuery(i)}prefetchInfiniteQuery(e,t,r){return this.fetchInfiniteQuery(e,t,r).then(n.ZT).catch(n.ZT)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){let r=this.queryDefaults.find(t=>(0,n.yF)(e)===(0,n.yF)(t.queryKey));r?r.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;let t=this.queryDefaults.find(t=>(0,n.to)(e,t.queryKey));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){let r=this.mutationDefaults.find(t=>(0,n.yF)(e)===(0,n.yF)(t.mutationKey));r?r.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;let t=this.mutationDefaults.find(t=>(0,n.to)(e,t.mutationKey));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;let t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=(0,n.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}constructor(e={}){this.queryCache=e.queryCache||new i.t,this.mutationCache=e.mutationCache||new s.L,this.logger=e.logger||c._,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}}},77222:function(e,t,r){r.d(t,{t:function(){return n}});let n=function(){return null}}}]);