PageSourceSearch

https://travesim.com/assets/suspense-hMCAMsFj.js

js travesim.com collected 2026-10-04 20:45:13 UTC 9,443 bytes, 1 lines download raw bytes

1var ft=s=>{throw TypeError(s)};var K=(s,t,e)=>t.has(s)||ft("Cannot "+e);var i=(s,t,e)=>(K(s,t,"read from private field"),e?e.call(s):t.get(s)),u=(s,t,e)=>t.has(s)?ft("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),h=(s,t,e,r)=>(K(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e),c=(s,t,e)=>(K(s,t,"access private method"),e);import{aM as Ct,aN as pt,aO as m,aP as X,aQ as P,aI as Tt,aJ as bt,aR as vt,aS as Ot,aT as W,aU as Mt,aV as wt,aW as mt,aH as Ut,r as N,aX as Et}from"./index-Dkk9Srv5.js";var b,a,D,f,y,M,R,S,L,w,U,C,T,E,x,n,F,G,Y,Z,$,q,tt,et,It,St,Nt=(St=class extends Ct{constructor(t,e){super();u(this,n);u(this,b);u(this,a);u(this,D);u(this,f);u(this,y);u(this,M);u(this,R);u(this,S);u(this,L);u(this,w);u(this,U);u(this,C);u(this,T);u(this,E);u(this,x,new Set);this.options=e,h(this,b,t),h(this,S,null),h(this,R,pt()),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),Rt(i(this,a),this.options)?c(this,n,F).call(this):this.updateResult(),c(this,n,$).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return st(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return st(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,c(this,n,q).call(this),c(this,n,tt).call(this),i(this,a).removeObserver(this)}setOptions(t){const e=this.options,r=i(this,a);if(this.options=i(this,b).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof m(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");c(this,n,et).call(this),i(this,a).setOptions(this.options),e._defaulted&&!X(this.options,e)&&i(this,b).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const o=this.hasListeners();o&&gt(i(this,a),r,this.options,e)&&c(this,n,F).call(this),this.updateResult(),o&&(i(this,a)!==r||m(this.options.enabled,i(this,a))!==m(e.enabled,i(this,a))||P(this.options.staleTime,i(this,a))!==P(e.staleTime,i(this,a)))&&c(this,n,G).call(this);const l=c(this,n,Y).call(this);o&&(i(this,a)!==r||m(this.options.enabled,i(this,a))!==m(e.enabled,i(this,a))||l!==i(this,E))&&c(this,n,Z).call(this,l)}getOptimisticResult(t){const e=i(this,b).getQueryCache().build(i(this,b),t),r=this.createResult(e,t);return _t(this,r)&&(h(this,f,r),h(this,M,this.options),h(this,y,i(this,a).state)),r}getCurrentResult(){return i(this,f)}trackResult(t,e){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),e==null||e(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,R).status==="pending"&&i(this,R).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){i(this,x).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=i(this,b).defaultQueryOptions(t),r=i(this,b).getQueryCache().build(i(this,b),e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return c(this,n,F).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,f)))}createResult(t,e){var ut;const r=i(this,a),o=this.options,l=i(this,f),O=i(this,y),_=i(this,M),H=t!==r?t.state:i(this,D),{state:rt}=t;let d={...rt},at=!1,p;if(e._optimisticResults){const v=this.hasListeners(),Q=!v&&Rt(t,e),j=v&&gt(t,r,e,o);(Q||j)&&(d={...d,...wt(rt.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:nt,errorUpdatedAt:ht,status:I}=d;p=d.data;let ot=!1;if(e.placeholderData!==void 0&&p===void 0&&I==="pending"){let v;l!=null&&l.isPlaceholderData&&e.placeholderData===(_==null?void 0:_.placeholderData)?(v=l.data,ot=!0):v=typeof e.placeholderData=="function"?e.placeholderData((ut=i(this,U))==null?void 0:ut.state.data,i(this,U)):e.placeholderData,v!==void 0&&(I="success",p=mt(l==null?void 0:l.data,v,e),at=!0)}if(e.select&&p!==void 0&&!ot)if(l&&p===(O==null?void 0:O.data)&&e.select===i(this,L))p=i(this,w);else try{h(this,L,e.select),p=e.select(p),p=mt(l==null?void 0:l.data,p,e),h(this,w,p),h(this,S,null)}catch(v){h(this,S,v)}i(this,S)&&(nt=i(this,S),p=i(this,w),ht=Date.now(),I="error");const V=d.fetchStatus==="fetching",z=I==="pending",J=I==="error",ct=z&&V,lt=p!==void 0,g={status:I,fetchStatus:d.fetchStatus,isPending:z,isSuccess:I==="success",isError:J,isInitialLoading:ct,isLoading:ct,data:p,dataUpdatedAt:d.dataUpdatedAt,error:nt,errorUpdatedAt:ht,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdate
1Count:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>H.dataUpdateCount||d.errorUpdateCount>H.errorUpdateCount,isFetching:V,isRefetching:V&&!z,isLoadingError:J&&!lt,isPaused:d.fetchStatus==="paused",isPlaceholderData:at,isRefetchError:J&&lt,isStale:it(t,e),refetch:this.refetch,promise:i(this,R),isEnabled:m(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const v=g.data!==void 0,Q=g.status==="error"&&!v,j=B=>{Q?B.reject(g.error):v&&B.resolve(g.data)},dt=()=>{const B=h(this,R,g.promise=pt());j(B)},k=i(this,R);switch(k.status){case"pending":t.queryHash===r.queryHash&&j(k);break;case"fulfilled":(Q||g.data!==k.value)&&dt();break;case"rejected":(!Q||g.error!==k.reason)&&dt();break}}return g}updateResult(){const t=i(this,f),e=this.createResult(i(this,a),this.options);if(h(this,y,i(this,a).state),h(this,M,this.options),i(this,y).data!==void 0&&h(this,U,i(this,a)),X(e,t))return;h(this,f,e);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!i(this,x).size)return!0;const O=new Set(l??i(this,x));return this.options.throwOnError&&O.add("error"),Object.keys(i(this,f)).some(_=>{const A=_;return i(this,f)[A]!==t[A]&&O.has(A)})};c(this,n,It).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&c(this,n,$).call(this)}},b=new WeakMap,a=new WeakMap,D=new WeakMap,f=new WeakMap,y=new WeakMap,M=new WeakMap,R=new WeakMap,S=new WeakMap,L=new WeakMap,w=new WeakMap,U=new WeakMap,C=new WeakMap,T=new WeakMap,E=new WeakMap,x=new WeakMap,n=new WeakSet,F=function(t){c(this,n,et).call(this);let e=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(Tt)),e},G=function(){c(this,n,q).call(this);const t=P(this.options.staleTime,i(this,a));if(bt||i(this,f).isStale||!vt(t))return;const r=Ot(i(this,f).dataUpdatedAt,t)+1;h(this,C,W.setTimeout(()=>{i(this,f).isStale||this.updateResult()},r))},Y=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},Z=function(t){c(this,n,tt).call(this),h(this,E,t),!(bt||m(this.options.enabled,i(this,a))===!1||!vt(i(this,E))||i(this,E)===0)&&h(this,T,W.setInterval(()=>{(this.options.refetchIntervalInBackground||Mt.isFocused())&&c(this,n,F).call(this)},i(this,E)))},$=function(){c(this,n,G).call(this),c(this,n,Z).call(this,c(this,n,Y).call(this))},q=function(){i(this,C)&&(W.clearTimeout(i(this,C)),h(this,C,void 0))},tt=function(){i(this,T)&&(W.clearInterval(i(this,T)),h(this,T,void 0))},et=function(){const t=i(this,b).getQueryCache().build(i(this,b),this.options);if(t===i(this,a))return;const e=i(this,a);h(this,a,t),h(this,D,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},It=function(t){Ut.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(i(this,f))}),i(this,b).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},St);function xt(s,t){return m(t.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&t.retryOnMount===!1)}function Rt(s,t){return xt(s,t)||s.state.data!==void 0&&st(s,t,t.refetchOnMount)}function st(s,t,e){if(m(t.enabled,s)!==!1&&P(t.staleTime,s)!=="static"){const r=typeof e=="function"?e(s):e;return r==="always"||r!==!1&&it(s,t)}return!1}function gt(s,t,e,r){return(s!==t||m(r.enabled,s)===!1)&&(!e.suspense||s.state.status!=="error")&&it(s,e)}function it(s,t){return m(t.enabled,s)!==!1&&s.isStaleByTime(P(t.staleTime,s))}function _t(s,t){return!X(s.getCurrentResult(),t)}var yt=N.createContext(!1),At=()=>N.useContext(yt);yt.Provider;function Qt(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var Ft=N.createContext(Qt()),jt=()=>N.useContext(Ft),kt=(s,t,e)=>{const r=e!=null&&e.state.error&&typeof s.throwOnError=="function"?Et(s.throwOnError,[e.state.error,e]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||r)&&(t.isReset()||(s.retryOnMount=!1))},Bt=s=>{N.useEffect(()=>{s.clearReset()},[s])},Wt=({result:s,errorResetBoundary:t,throwOnError:e,query:r,suspense:o})=>s.isError&&!t.isReset()&&!s.isFetching&&r&&(o&&s.data===void 0||Et(e,[s.error,r])),Ht=(s,t)=>t.state.data===void 0,Vt=s=>{if(s.suspense){const e=o=>o==="static"?o:Math.max(o??1e3,1e3),r=s.staleTime;s.staleTime=typeof r=="function"?(...o)=>e(r(...o)):e(r),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},zt=(s,t)=>s.isLoading&&s.isFetching&&!t,Jt=(s,t)=>(s==null?void 0:s.suspense)&&t.isPending,Kt=(s,t,e)=>t.fetchOptimistic(s).catch(()=>{e.clearReset()});export{Nt as Q,jt as a,kt as b,Bt as c,Ht as d,Vt as e,Kt as f,Wt as g,Jt as s,At as u,zt as w};

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.