1"use strict";(self.webpackChunkimo_pl=self.webpackChunkimo_pl||[]).push([[6714],{59270:function(t,e,r){r.d(e,{I:function(){return T}});var s=r(24880),i=r(26261),n=r(29658),u=r(66500),a=r(79757),c=class extends u.Q{constructor(t,e){super(),this.options=e,this.#t=t,this.#e=null,this.bindMethods(),this.setOptions(e)}#t;#r=void 0;#s=void 0;#i=void 0;#n;#u;#e;#a;#c;#h;#o;#l;#d;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#r.addObserver(this),h(this.#r,this.options)?this.#f():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return o(this.#r,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return o(this.#r,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#Q(),this.#r.removeObserver(this)}setOptions(t,e){const r=this.options,i=this.#r;if(this.options=this.#t.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,s.Eh)(this.options.enabled,this.#r))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#r.setOptions(this.options),r._defaulted&&!(0,s.f8)(this.options,r)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#r,observer:this});const n=this.hasListeners();n&&l(this.#r,i,this.options,r)&&this.#f(),this.updateResult(e),!n||this.#r===i&&(0,s.Eh)(this.options.enabled,this.#r)===(0,s.Eh)(r.enabled,this.#r)&&(0,s.d2)(this.options.staleTime,this.#r)===(0,s.d2)(r.staleTime,this.#r)||this.#b();const u=this.#m();!n||this.#r===i&&(0,s.Eh)(this.options.enabled,this.#r)===(0,s.Eh)(r.enabled,this.#r)&&u===this.#d||this.#I(u)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(e,t);return function(t,e){if(!(0,s.f8)(t.getCurrentResult(),e))return!0;return!1}(this,r)&&(this.#i=r,this.#u=this.options,this.#n=this.#r.state),r}getCurrentResult(){return this.#i}trackResult(t,e){const r={};return Object.keys(t).forEach((s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),e?.(s),t[s])})})),r}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#r}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,e);return r.isFetchingOptimistic=!0,r.fetch().then((()=>this.createResult(r,e)))}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then((()=>(this.updateResult(),this.#i)))}#f(t){this.#v();let e=this.#r.fetch(this.options,t);return t?.throwOnError||(e=e.catch(s.lQ)),e}#b(){this.#R();const t=(0,s.d2)(this.options.staleTime,this.#r);if(s.S$||this.#i.isStale||!(0,s.gn)(t))return;const e=(0,s.j3)(this.#i.dataUpdatedAt,t)+1;this.#o=setTimeout((()=>{this.#i.isStale||this.updateResult()}),e)}#m(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#r):this.options.refetchInterval)??!1}#I(t){this.#Q(),this.#d=t,!s.S$&&!1!==(0,s.Eh)(this.options.enabled,this.#r)&&(0,s.gn)(this.#d)&&0!==this.#d&&(this.#l=setInterval((()=>{(this.options.refetchIntervalInBackground||n.m.isFocused())&&this.#f()}),this.#d))}#y(){this.#b(),this.#I(this.#m())}#R(){this.#o&&(clearTimeout(this.#o),this.#o=void 0)}#Q(){this.#l&&(clearInterval(this.#l),this.#l=void 0)}createResult(t,e){const r=this.#r,i=this.options,n=this.#i,u=this.#n,c=this.#u,o=t!==r?t.state:this.#s,{state:p}=t;let f,y={...p},R=!1;if(e._optimisticResults){const s=this.hasListeners(),n=!s&&h(t,e),u=s&&l(t,r,e,i);(n||u)&&(y={...y,...(0,a.k)(p.data,t.options)}),"isRestoring"===e._optimisticResults&&(y.fetchStatus="idle")}let{error:Q,errorUpdatedAt:v,status:b}=y;if(e.select&&void 0!==y.data)if(n&&y.data===u?.data&&e.select===this.#a)f=this.#c;else try{this.#a=e.select,f=e.select(y.data),f=(0,s.pl)(n?.data,f,e),this.#c=f,this.#e=null}catch(S){this.#e=S}else f=y.data;if(void 0!==e.placeholderData&&void 0===f&&"pending"===b){let t;if(n?.isPlaceholderData&&e.placeholderData===c?.placeholderData)t=n.data;else if(t="function"==typeof e.placeholderData?e.placeholderData(this.#h?.state.data,this.#h):e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),this.#e=null}catch(S){this.#e=S}void 0!==t&&(b="success",f=(0,s.pl)(n?.data,t,e),R=!0)}this.#e&&(Q=this.#e,f=this.#c,v=Date.now(),b="error");const m="fetching"===y.fetchStatus,I="pending"===b,O="error"===b,g=I&&m,E=void 0!==f;return{status:b,fetchStatus:y.fetchStatus,isPending:I,isSuccess:"success"===b,isError:O,isInitialLoading:g,isLoading:g,data:f,dataUpdatedAt:y.dataUpdatedAt,error:Q,errorUpdatedAt:v,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdate
1Count:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>o.dataUpdateCount||y.errorUpdateCount>o.errorUpdateCount,isFetching:m,isRefetching:m&&!I,isLoadingError:O&&!E,isPaused:"paused"===y.fetchStatus,isPlaceholderData:R,isRefetchError:O&&E,isStale:d(t,e),refetch:this.refetch}}updateResult(t){const e=this.#i,r=this.createResult(this.#r,this.options);if(this.#n=this.#r.state,this.#u=this.options,void 0!==this.#n.data&&(this.#h=this.#r),(0,s.f8)(r,e))return;this.#i=r;const i={};!1!==t?.listeners&&(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;const s=new Set(r??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some((t=>{const r=t;return this.#i[r]!==e[r]&&s.has(r)}))})()&&(i.listeners=!0),this.#O({...i,...t})}#v(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#r)return;const e=this.#r;this.#r=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#O(t){i.j.batch((()=>{t.listeners&&this.listeners.forEach((t=>{t(this.#i)})),this.#t.getQueryCache().notify({query:this.#r,type:"observerResultsUpdated"})}))}};function h(t,e){return function(t,e){return!1!==(0,s.Eh)(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||void 0!==t.state.data&&o(t,e,e.refetchOnMount)}function o(t,e,r){if(!1!==(0,s.Eh)(e.enabled,t)){const s="function"==typeof r?r(t):r;return"always"===s||!1!==s&&d(t,e)}return!1}function l(t,e,r,i){return(t!==e||!1===(0,s.Eh)(i.enabled,t))&&(!r.suspense||"error"!==t.state.status)&&d(t,r)}function d(t,e){return!1!==(0,s.Eh)(e.enabled,t)&&t.isStaleByTime((0,s.d2)(e.staleTime,t))}var p=r(96540);r(74848);function f(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var y=p.createContext(f()),R=()=>p.useContext(y),Q=r(97665),v=p.createContext(!1),b=()=>p.useContext(v),m=(v.Provider,r(54362)),I=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},O=t=>{p.useEffect((()=>{t.clearReset()}),[t])},g=({result:t,errorResetBoundary:e,throwOnError:r,query:s})=>t.isError&&!e.isReset()&&!t.isFetching&&s&&(0,m.G)(r,[t.error,s]),E=t=>{t.suspense&&("number"!=typeof t.staleTime&&(t.staleTime=1e3),"number"==typeof t.gcTime&&(t.gcTime=Math.max(t.gcTime,1e3)))},S=(t,e)=>t?.suspense&&e.isPending,C=(t,e,r)=>e.fetchOptimistic(t).catch((()=>{r.clearReset()}));function T(t,e){return function(t,e,r){const s=(0,Q.jE)(r),n=b(),u=R(),a=s.defaultQueryOptions(t);s.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=n?"isRestoring":"optimistic",E(a),I(a,u),O(u);const[c]=p.useState((()=>new e(s,a))),h=c.getOptimisticResult(a);if(p.useSyncExternalStore(p.useCallback((t=>{const e=n?()=>{}:c.subscribe(i.j.batchCalls(t));return c.updateResult(),e}),[c,n]),(()=>c.getCurrentResult()),(()=>c.getCurrentResult())),p.useEffect((()=>{c.setOptions(a,{listeners:!1})}),[a,c]),S(a,h))throw C(a,c,u);if(g({result:h,errorResetBoundary:u,throwOnError:a.throwOnError,query:s.getQueryCache().get(a.queryHash)}))throw h.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(a,h),a.notifyOnChangeProps?h:c.trackResult(h)}(t,c,e)}}}]); 2//# sourceMappingURL=4977ef59e3e08c4c2405bc7ae0426be13df045fc-5f35bdef5a6d29f0dd98.js.map
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.