PageSourceSearch

https://www.collectpure.com/_next/static/immutable/chunks/3gyt8p-ee-mrb.js

js collectpure.com collected 2026-09-28 08:07:34 UTC 66,626 bytes, 9 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="ba5b467b-8d56-1141-cb04-e4b0773ae624")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,435446,266027,e=>{"use strict";let t,r,s,i,n,a,o,u,l;var c,h=e.i(843476),d=e.i(271645),p=e.i(303769),f=e.i(912598);e.i(944362);var y=e.i(632082),m=e.i(39732),b=e.i(51680);let g={query:["72e3ff","3fb0d8"],mutation:["c5a3fc","904dfc"],subscription:["ff49e1","d83fbe"]},v={query:["\x1b[30;46m","\x1b[97;46m"],mutation:["\x1b[30;45m","\x1b[97;45m"],subscription:["\x1b[30;42m","\x1b[97;42m"]},w={query:["\x1b[1;30;46m","\x1b[1;97;46m"],mutation:["\x1b[1;30;45m","\x1b[1;97;45m"],subscription:["\x1b[1;30;42m","\x1b[1;97;42m"]};var O=e.i(619273);e.i(651484);var C=e.i(15241);function R(e,t,r){let s=e.flatMap(e=>e.split("."));if(!t&&(!r||"any"===r))return s.length?[s]:[];if("infinite"===r&&(0,C.isObject)(t)&&("direction"in t||"cursor"in t)){let{cursor:e,direction:r,...i}=t;return[s,{input:i,type:"infinite"}]}return[s,{...void 0!==t&&t!==O.skipToken&&{input:t},...r&&"any"!==r&&{type:r}}]}var Q=e.i(94802),P=e.i(705010);let S=["client","ssrContext","ssrState","abortOnUnmount"],E=d.createContext?.(null);var q=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(){}},T=new class extends q{#e;#t;#r;constructor(){super(),this.#r=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}},x=(t=()=>O.isServer,{isServer:()=>t(),setIsServer(e){t=e}}),I=e.i(180166),D=I.systemSetTimeoutZero,M=(r=[],s=0,i=e=>{e()},n=e=>{e()},a=D,{batch:e=>{let t;s++;try{t=e()}finally{let e;--s||(e=r,r=[],e.length&&a(()=>{n(()=>{e.forEach(e=>{i(e)})})}))}return t},batchCalls:e=>(...t)=>{o(()=>{e(...t)})},schedule:o=e=>{s?r.push(e):a(()=>{i(e)})},setNotifyFunction:e=>{i=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{a=e}}),k=new class extends q{#s=!0;#t;#r;constructor(){super(),this.#r=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}},F=e.i(793803);function A(e){return Math.min(1e3*2**e,3e4)}function U(e){return(e??"online")!=="online"||k.isOnline()}var j=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function K(e){let t,r=!1,s=0,i=(0,F.pendingThenable)(),n=()=>T.isFocused()&&("always"===e.networkMode||k.isOnline())&&e.canRun(),a=()=>U(e.networkMode)&&e.canRun(),o=e=>{"pending"===i.status&&(t?.(),i.resolve(e))},u=e=>{"pending"===i.status&&(t?.(),i.reject(e))},l=()=>new Promise(r=>{t=e=>{("pending"!==i.status||n())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,"pending"===i.status&&e.onContinue?.()}),c=()=>{let t;if("pending"!==i.status)return;let a=0===s?e.initialPromise:void 0;try{t=a??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(o).catch(t=>{if("pending"!==i.status)return;let a=e.retry??3*!x.isServer(),o=e.retryDelay??A,h="function"==typeof o?o(s,t):o,d=!0===a||"number"==typeof a&&s<a||"function"==typeof a&&a(s,t);
2r||!d?u(t):(s++,e.onFail?.(s,t),(0,O.sleep)(h).then(()=>n()?void 0:l()).then(()=>{r?u(t):c()}))})};return{promise:i,status:()=>i.status,cancel:t=>{if("pending"===i.status){let r=new j(t);u(r),e.onCancel?.(r)}},continue:()=>(t?.(),i),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:a,start:()=>(a()?c():l().then(c),i)}}var _=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,O.isValidTimeout)(this.gcTime)&&(this.#i=I.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(x.isServer()?1/0:3e5))}clearGcTimeout(){this.#i&&(I.timeoutManager.clearTimeout(this.#i),this.#i=void 0)}},z=class extends _{#n;#a;#o;#u;#l;#c;#h;constructor(e){super(),this.#h=!1,this.#c=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#u=e.client,this.#o=this.#u.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#n=N(this.options),this.state=e.state??this.#n,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(e){if(this.options={...this.#c,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=N(this.options);void 0!==e.data&&(this.setState(L(e.data,e.dataUpdatedAt)),this.#n=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#o.remove(this)}setData(e,t){let r=(0,O.replaceData)(this.state.data,e,this.options);return this.#d({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#d({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#l?.promise;return this.#l?.cancel(e),t?t.then(O.noop).catch(O.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#n}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,O.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===O.skipToken||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,O.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,O.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#l&&(this.#h||this.#p()?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#p(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}async fetch(e,t){let r;if("idle"!==this.state.fetchStatus&&this.#l?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let s=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#h=!0,s.signal)})},n=()=>{let e,r=(0,O.ensureQueryFn)(this.options,t),s=(i(e={client:this.#u,queryKey:this.queryKey,meta:this.meta}),e);return(this.#h=!1,this.options.persister)?this.options.persister(r,s,this):r(s)},a=(i(r={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#u,state:this.state,fetchFn:n}),r);this.options.behavior?.onFetch(a,this),this.#a=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#d({type:"fetch",meta:a.fetchOptions?.meta}),this.#l=K({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof j&&e.revert&&this.setState({...this.#a,fetchStatus:"idle"}),s.abort()},onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#l.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#o.config.onSuccess?.(e,this),this.#o.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof j){if(e.silent)return this.#l.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#d({type:"error",error:e}),this.#o.config.onError?.(e,this),this.#o.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#d(e){let t=t=>{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,...H(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...L(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#a=e.manual?r:void 0,r;case"error":let s=e.error;
2return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),M.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#o.notify({query:this,type:"updated",action:e})})}};function H(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:U(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function L(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function N(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,s=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var B=class extends q{constructor(e,t){super(),this.options=t,this.#u=e,this.#f=null,this.#y=(0,F.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#u;#m=void 0;#b=void 0;#g=void 0;#v;#w;#y;#f;#O;#C;#R;#Q;#P;#S;#E=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#m.addObserver(this),V(this.#m,this.options)?this.#q():this.updateResult(),this.#T())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return G(this.#m,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return G(this.#m,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#I(),this.#m.removeObserver(this)}setOptions(e){let t=this.options,r=this.#m;if(this.options=this.#u.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,O.resolveEnabled)(this.options.enabled,this.#m))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#D(),this.#m.setOptions(this.options),t._defaulted&&!(0,O.shallowEqualObjects)(this.options,t)&&this.#u.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#m,observer:this});let s=this.hasListeners();s&&$(this.#m,r,this.options,t)&&this.#q(),this.updateResult(),s&&(this.#m!==r||(0,O.resolveEnabled)(this.options.enabled,this.#m)!==(0,O.resolveEnabled)(t.enabled,this.#m)||(0,O.resolveStaleTime)(this.options.staleTime,this.#m)!==(0,O.resolveStaleTime)(t.staleTime,this.#m))&&this.#M();let i=this.#k();s&&(this.#m!==r||(0,O.resolveEnabled)(this.options.enabled,this.#m)!==(0,O.resolveEnabled)(t.enabled,this.#m)||i!==this.#S)&&this.#F(i)}getOptimisticResult(e){var t,r;let s=this.#u.getQueryCache().build(this.#u,e),i=this.createResult(s,e);return t=this,r=i,(0,O.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#g=i,this.#w=this.options,this.#v=this.#m.state),i}getCurrentResult(){return this.#g}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#y.status||this.#y.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#E.add(e)}getCurrentQuery(){return this.#m}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#u.defaultQueryOptions(e),r=this.#u.getQueryCache().build(this.#u,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#q({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#g))}#q(e){this.#D();let t=this.#m.fetch(this.options,e);return e?.throwOnError||(t=t.catch(O.noop)),t}#M(){this.#x();let e=(0,O.resolveStaleTime)(this.options.staleTime,this.#m);if(x.isServer()||this.#g.isStale||!(0,O.isValidTimeout)(e))return;let t=(0,O.timeUntilStale)(this.#g.dataUpdatedAt,e);this.#Q=I.timeoutManager.setTimeout(()=>{this.#g.isStale||this.updateResult()},t+1)}#k(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#m):this.options.refetchInterval)??!1}#F(e){this.#I(),this.#S=e,!x.isServer()&&!1!==(0,O.resolveEnabled)(this.options.enabled,this.#m)&&(0,O.isValidTimeout)(this.#S)&&0!==this.#S&&(this.#P=I.timeoutManager.setInterval(()=>
2{(this.options.refetchIntervalInBackground||T.isFocused())&&this.#q()},this.#S))}#T(){this.#M(),this.#F(this.#k())}#x(){this.#Q&&(I.timeoutManager.clearTimeout(this.#Q),this.#Q=void 0)}#I(){this.#P&&(I.timeoutManager.clearInterval(this.#P),this.#P=void 0)}createResult(e,t){let r,s=this.#m,i=this.options,n=this.#g,a=this.#v,o=this.#w,u=e!==s?e.state:this.#b,{state:l}=e,c={...l},h=!1;if(t._optimisticResults){let r=this.hasListeners(),n=!r&&V(e,t),a=r&&$(e,s,t,i);(n||a)&&(c={...c,...H(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:p,status:f}=c;r=c.data;let y=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===f){let e;n?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=n.data,y=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#R?.state.data,this.#R):t.placeholderData,void 0!==e&&(f="success",r=(0,O.replaceData)(n?.data,e,t),h=!0)}if(t.select&&void 0!==r&&!y)if(n&&r===a?.data&&t.select===this.#O)r=this.#C;else try{this.#O=t.select,r=t.select(r),r=(0,O.replaceData)(n?.data,r,t),this.#C=r,this.#f=null}catch(e){this.#f=e}this.#f&&(d=this.#f,r=this.#C,p=Date.now(),f="error");let m="fetching"===c.fetchStatus,b="pending"===f,g="error"===f,v=b&&m,w=void 0!==r,C={status:f,fetchStatus:c.fetchStatus,isPending:b,isSuccess:"success"===f,isError:g,isInitialLoading:v,isLoading:v,data:r,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:p,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:m,isRefetching:m&&!b,isLoadingError:g&&!w,isPaused:"paused"===c.fetchStatus,isPlaceholderData:h,isRefetchError:g&&w,isStale:W(e,t),refetch:this.refetch,promise:this.#y,isEnabled:!1!==(0,O.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==C.data,r="error"===C.status&&!t,i=e=>{r?e.reject(C.error):t&&e.resolve(C.data)},n=()=>{i(this.#y=C.promise=(0,F.pendingThenable)())},a=this.#y;switch(a.status){case"pending":e.queryHash===s.queryHash&&i(a);break;case"fulfilled":(r||C.data!==a.value)&&n();break;case"rejected":r&&C.error===a.reason||n()}}return C}updateResult(){let e=this.#g,t=this.createResult(this.#m,this.options);if(this.#v=this.#m.state,this.#w=this.options,void 0!==this.#v.data&&(this.#R=this.#m),(0,O.shallowEqualObjects)(t,e))return;this.#g=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#E.size)return!0;let s=new Set(r??this.#E);return this.options.throwOnError&&s.add("error"),Object.keys(this.#g).some(t=>this.#g[t]!==e[t]&&s.has(t))};this.#A({listeners:r()})}#D(){let e=this.#u.getQueryCache().build(this.#u,this.options);if(e===this.#m)return;let t=this.#m;this.#m=e,this.#b=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#T()}#A(e){M.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#g)}),this.#u.getQueryCache().notify({query:this.#m,type:"observerResultsUpdated"})})}};function V(e,t){return!1!==(0,O.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&G(e,t,t.refetchOnMount)}function G(e,t,r){if(!1!==(0,O.resolveEnabled)(t.enabled,e)&&"static"!==(0,O.resolveStaleTime)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&W(e,t)}return!1}function $(e,t,r,s){return(e!==t||!1===(0,O.resolveEnabled)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&W(e,r)}function W(e,t){return!1!==(0,O.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,O.resolveStaleTime)(t.staleTime,e))}var J=d.createContext((u=!1,{clearReset:()=>{u=!1},reset:()=>{u=!0},isReset:()=>u})),Z=(e,t,r)=>{let s=r?.state.error&&"function"==typeof e.throwOnError?(0,O.shouldThrowError)(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&!t.isReset()&&(e.retryOnMount=!1)},X=e=>{d.useEffect(()=>{e.clearReset()},[e])},Y=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&void 0===e.data||(0,O.shouldThrowError)(r,[e.error,s])),ee=d.createContext(!1);ee.Provider;var et=(e,t)=>void 0===t.state.data,er=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},es=(e,t)=>e?.suspense&&t.isPending,ei=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function en(e,t,r){let s=d.useContext(ee),i=d.useContext(J),n=(0,f.useQueryClient)(r),a=n.defaultQueryOptions(e);
2n.getDefaultOptions().queries?._experimental_beforeQuery?.(a);let o=n.getQueryCache().get(a.queryHash);a._optimisticResults=s?"isRestoring":"optimistic",er(a),Z(a,i,o),X(i);let u=!n.getQueryCache().get(a.queryHash),[l]=d.useState(()=>new t(n,a)),c=l.getOptimisticResult(a),h=!s&&!1!==e.subscribed;if(d.useSyncExternalStore(d.useCallback(e=>{let t=h?l.subscribe(M.batchCalls(e)):O.noop;return l.updateResult(),t},[l,h]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),d.useEffect(()=>{l.setOptions(a)},[a,l]),es(a,c))throw ei(a,l,i);if(Y({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw c.error;if(n.getDefaultOptions().queries?._experimental_afterQuery?.(a,c),a.experimental_prefetchInRender&&!x.isServer()&&c.isLoading&&c.isFetching&&!s){let e=u?ei(a,l,i):o?.promise;e?.catch(O.noop).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function ea(e,t){return en(e,B,t)}e.s(["useQuery",0,ea],266027);var eo=class extends _{#u;#U;#j;#l;constructor(e){super(),this.#u=e.client,this.mutationId=e.mutationId,this.#j=e.mutationCache,this.#U=[],this.state=e.state||eu(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#U.includes(e)||(this.#U.push(e),this.clearGcTimeout(),this.#j.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#U=this.#U.filter(t=>t!==e),this.scheduleGc(),this.#j.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#U.length||("pending"===this.state.status?this.scheduleGc():this.#j.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#d({type:"continue"})},r={client:this.#u,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#l=K({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#j.canRun(this)});let s="pending"===this.state.status,i=!this.#l.canStart();try{if(s)t();else{this.#d({type:"pending",variables:e,isPaused:i}),this.#j.config.onMutate&&await this.#j.config.onMutate(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:i})}let n=await this.#l.start();return await this.#j.config.onSuccess?.(n,e,this.state.context,this,r),await this.options.onSuccess?.(n,e,this.state.context,r),await this.#j.config.onSettled?.(n,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(n,null,e,this.state.context,r),this.#d({type:"success",data:n}),n}catch(t){try{await this.#j.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#j.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#d({type:"error",error:t}),t}finally{this.#j.runNext(this)}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),M.batch(()=>{this.#U.forEach(t=>{t.onMutationUpdate(e)}),this.#j.notify({mutation:this,type:"updated",action:e})})}};function eu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var el=class extends q{#u;#g=void 0;#K;#_;constructor(e,t){super(),this.#u=e,this.setOptions(t),this.bindMethods(),this.#z()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#u.defaultMutationOptions(e),(0,O.shallowEqualObjects)(this.options,t)||this.#u.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#K,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,O.hashKey)(t.mutationKey)!==(0,O.hashKey)(this.options.mutationKey)?this.reset():this.#K?.state.status==="pending"&&this.#K.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#K?.removeObserver(this)}onMutationUpdate(e){this.#z(),this.#A(e)}getCurrentResult(){return this.#g}reset(){this.#K?.removeObserver(this),this.#K=void 0,this.#z(),this.#A()}mutate(e,t){return this.#_=t,this.#K?.removeObserver(this),this.#K=this.#u.getMutationCache().build(this.#u,this.options),this.#K.addObserver(this),this.#K.execute(e)}#z(){let e=this.#K?.state??eu();this.#g={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#A(e){M.batch(()=>
2{if(this.#_&&this.hasListeners()){let t=this.#g.variables,r=this.#g.context,s={client:this.#u,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#_.onSuccess?.(e.data,t,r,s)}catch(e){Promise.reject(e)}try{this.#_.onSettled?.(e.data,null,t,r,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#_.onError?.(e.error,t,r,s)}catch(e){Promise.reject(e)}try{this.#_.onSettled?.(void 0,e.error,t,r,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#g)})})}};function ec(e){return{onFetch:(t,r)=>{let s=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],a=t.state.data?.pageParams||[],o={pages:[],pageParams:[]},u=0,l=async()=>{let r=!1,l=(0,O.ensureQueryFn)(t.options,t.fetchOptions),c=async(e,s,i)=>{let n;if(r)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);let a=(n={client:t.client,queryKey:t.queryKey,pageParam:s,direction:i?"backward":"forward",meta:t.options.meta},(0,O.addConsumeAwareSignal)(n,()=>t.signal,()=>r=!0),n),o=await l(a),{maxPages:u}=t.options,c=i?O.addToStart:O.addToEnd;return{pages:c(e.pages,o,u),pageParams:c(e.pageParams,s,u)}};if(i&&n.length){let e="backward"===i,t={pages:n,pageParams:a},r=(e?ed:eh)(s,t);o=await c(t,r,e)}else{let t=e??n.length;do{let e=0===u?a[0]??s.initialPageParam:eh(s,o);if(u>0&&null==e)break;o=await c(o,e),u++}while(u<t)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=l}}}function eh(e,{pages:t,pageParams:r}){let s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,r[s],r):void 0}function ed(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var ep=class extends B{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:ec()})}getOptimisticResult(e){return e.behavior=ec(),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 r,s;let{state:i}=e,n=super.createResult(e,t),{isFetching:a,isRefetching:o,isError:u,isRefetchError:l}=n,c=i.fetchMeta?.fetchMore?.direction,h=u&&"forward"===c,d=a&&"forward"===c,p=u&&"backward"===c,f=a&&"backward"===c;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:!!(r=i.data)&&null!=eh(t,r),hasPreviousPage:!!(s=i.data)&&!!t.getPreviousPageParam&&null!=ed(t,s),isFetchNextPageError:h,isFetchingNextPage:d,isFetchPreviousPageError:p,isFetchingPreviousPage:f,isRefetchError:l&&!h&&!p,isRefetching:o&&!d&&!f}}};function ef(e,t){let r=new Set(t);return e.filter(e=>!r.has(e))}var ey=class extends q{#u;#H;#L;#N;#U;#B;#V;#G;#$;#W=[];constructor(e,t,r){super(),this.#u=e,this.#N=r,this.#L=[],this.#U=[],this.#H=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#U.forEach(e=>{e.subscribe(t=>{this.#J(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#U.forEach(e=>{e.destroy()})}setQueries(e,t){this.#L=e,this.#N=t,M.batch(()=>{let e=this.#U,t=this.#Z(this.#L);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let r=t.map(e=>e.observer),s=r.map(e=>e.getCurrentResult()),i=e.length!==r.length,n=r.some((t,r)=>t!==e[r]),a=i||n,o=!!a||s.some((e,t)=>{let r=this.#H[t];return!r||!(0,O.shallowEqualObjects)(e,r)});(a||o)&&(a&&(this.#W=t,this.#U=r),this.#H=s,this.hasListeners()&&(a&&(ef(e,r).forEach(e=>{e.destroy()}),ef(r,e).forEach(e=>{e.subscribe(t=>{this.#J(e,t)})})),this.#A()))})}getCurrentResult(){return this.#H}getQueries(){return this.#U.map(e=>e.getCurrentQuery())}getObservers(){return this.#U}getOptimisticResult(e,t){let r=this.#Z(e),s=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=r.map(e=>e.defaultedQueryOptions.queryHash);return[s,e=>this.#X(e??s,t,i),()=>this.#Y(s,r)]}#Y(e,t){return t.map((r,s)=>{let i=e[s];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#X(e,t,r){if(t){let s=this.#$,i=void 0!==r&&void 0!==s&&(s.length!==r.length||r.some((e,t)=>e!==s[t]));return(!this.#B||this.#H!==this.#G||i||t!==this.#V)&&(this.#V=t,this.#G=this.#H,void 0!==r&&(this.#$=r),this.#B=(0,O.replaceEqualDeep)(this.#B,t(e))),this.#B}return e}#Z(e){let t=new Map;
2this.#U.forEach(e=>{let r=e.options.queryHash;if(!r)return;let s=t.get(r);s?s.push(e):t.set(r,[e])});let r=[];return e.forEach(e=>{let s=this.#u.defaultQueryOptions(e),i=t.get(s.queryHash)?.shift()??new B(this.#u,s);r.push({defaultedQueryOptions:s,observer:i})}),r}#J(e,t){let r=this.#U.indexOf(e);if(-1!==r){var s;let e;this.#H=(s=this.#H,(e=s.slice(0))[r]=t,e),this.#A()}}#A(){if(this.hasListeners()){let e=this.#B,t=this.#Y(this.#H,this.#W);e!==this.#X(t,this.#N?.combine)&&M.batch(()=>{this.listeners.forEach(e=>{e(this.#H)})})}}};function em({queries:e,...t},r){let s=(0,f.useQueryClient)(r),i=d.useContext(ee),n=d.useContext(J),a=d.useMemo(()=>e.map(e=>{let t=s.defaultQueryOptions(e);return t._optimisticResults=i?"isRestoring":"optimistic",t}),[e,s,i]);a.forEach(e=>{er(e);let t=s.getQueryCache().get(e.queryHash);Z(e,n,t)}),X(n);let[o]=d.useState(()=>new ey(s,a,t)),[u,l,c]=o.getOptimisticResult(a,t.combine),h=!i&&!1!==t.subscribed;d.useSyncExternalStore(d.useCallback(e=>h?o.subscribe(M.batchCalls(e)):O.noop,[o,h]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d.useEffect(()=>{o.setQueries(a,t)},[a,t,o]);let p=u.some((e,t)=>es(a[t],e))?u.flatMap((e,t)=>{let r=a[t];if(r&&es(r,e)){let e=new B(s,r);return ei(r,e,n)}return[]}):[];if(p.length>0)throw Promise.all(p);let y=u.find((e,t)=>{let r=a[t];return r&&Y({result:e,errorResetBoundary:n,throwOnError:r.throwOnError,query:s.getQueryCache().get(r.queryHash),suspense:r.suspense})});if(y?.error)throw y.error;return l(c())}var eb=e.i(93082);function eg(e,t,r){let s=e[0],i=e[1]?.input;return r&&(i={...i??{},...r.pageParam?{cursor:r.pageParam}:{},direction:r.direction}),[s.join("."),i,t?.trpc]}function ev(e){let t=e.path.join(".");return d.useMemo(()=>({path:t}),[t])}var ew=e.i(24235);function eO(e){return(0,Q.createRecursiveProxy)(t=>{let r=t.path,s=r.join("."),[i,n]=t.args;return{queryKey:R(r,i,"query"),queryFn:()=>e.query(s,i,n?.trpc),...n}})}var eC=e.i(206627),eR=e.i(372775),eQ=class extends q{constructor(e={}){super(),this.config=e,this.#L=new Map}#L;build(e,t,r){let s=t.queryKey,i=t.queryHash??(0,O.hashQueryKeyByOptions)(s,t),n=this.get(i);return n||(n=new z({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(n)),n}add(e){this.#L.has(e.queryHash)||(this.#L.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#L.get(e.queryHash);t&&(e.destroy(),t===e&&this.#L.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){M.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#L.get(e)}getAll(){return[...this.#L.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,O.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,O.matchQuery)(e,t)):t}notify(e){M.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){M.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){M.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},eP=class extends q{constructor(e={}){super(),this.config=e,this.#ee=new Set,this.#et=new Map,this.#er=0}#ee;#et;#er;build(e,t,r){let s=new eo({client:e,mutationCache:this,mutationId:++this.#er,options:e.defaultMutationOptions(t),state:r});return this.add(s),s}add(e){this.#ee.add(e);let t=eS(e);if("string"==typeof t){let r=this.#et.get(t);r?r.push(e):this.#et.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#ee.delete(e)){let t=eS(e);if("string"==typeof t){let r=this.#et.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#et.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=eS(e);if("string"!=typeof t)return!0;{let r=this.#et.get(t),s=r?.find(e=>"pending"===e.state.status);return!s||s===e}}runNext(e){let t=eS(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#et.get(t)?.find(t=>
2t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){M.batch(()=>{this.#ee.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#ee.clear(),this.#et.clear()})}getAll(){return Array.from(this.#ee)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,O.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,O.matchMutation)(e,t))}notify(e){M.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return M.batch(()=>Promise.all(e.map(e=>e.continue().catch(O.noop))))}};function eS(e){return e.options.scope?.id}var eE=class{#es;#j;#c;#ei;#en;#ea;#eo;#eu;constructor(e={}){this.#es=e.queryCache||new eQ,this.#j=e.mutationCache||new eP,this.#c=e.defaultOptions||{},this.#ei=new Map,this.#en=new Map,this.#ea=0}mount(){this.#ea++,1===this.#ea&&(this.#eo=T.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#es.onFocus())}),this.#eu=k.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#es.onOnline())}))}unmount(){this.#ea--,0===this.#ea&&(this.#eo?.(),this.#eo=void 0,this.#eu?.(),this.#eu=void 0)}isFetching(e){return this.#es.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#j.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#es.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#es.build(this,t),s=r.state.data;return void 0===s?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,O.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#es.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let s=this.defaultQueryOptions({queryKey:e}),i=this.#es.get(s.queryHash),n=i?.state.data,a=(0,O.functionalUpdate)(t,n);if(void 0!==a)return this.#es.build(this,s).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return M.batch(()=>this.#es.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#es.get(t.queryHash)?.state}removeQueries(e){let t=this.#es;M.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#es;return M.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(M.batch(()=>this.#es.findAll(e).map(e=>e.cancel(r)))).then(O.noop).catch(O.noop)}invalidateQueries(e,t={}){return M.batch(()=>(this.#es.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(M.batch(()=>this.#es.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(O.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(O.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#es.build(this,t);return r.isStaleByTime((0,O.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(O.noop).catch(O.noop)}fetchInfiniteQuery(e){return e.behavior=ec(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(O.noop).catch(O.noop)}ensureInfiniteQueryData(e){return e.behavior=ec(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return k.isOnline()?this.#j.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#es}getMutationCache(){return this.#j}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#ei.set((0,O.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#ei.values()],r={};return t.forEach(t=>{(0,O.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#en.set((0,O.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#en.values()],r={};return t.forEach(t=>{(0,O.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,O.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===O.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#es.clear(),this.#j.clear()}};let eq=(c=function(e){let t=e?.overrides?.useMutation?.onSuccess??(e=>e.originalFn()),r=e?.context??E;function s(){let e=d.useContext(r);if(!e)throw Error("Unable to find tRPC Context. Did you forget to wrap your Ap
2p inside `withTRPC` HoC?");return e}function i(e,t){let{queryClient:r,ssrState:i}=s();return i&&"mounted"!==i&&r.getQueryCache().find({queryKey:e})?.state.status==="error"?{retryOnMount:!1,...t}:t}return{Provider:e=>{let{abortOnUnmount:t=!1,client:s,queryClient:i,ssrContext:n}=e,[a,o]=d.useState(e.ssrState??!1),u=d.useMemo(()=>(function(e){let{client:t,queryClient:r}=e,s=t instanceof ew.TRPCUntypedClient?t:(0,P.getUntypedClient)(t);return{fetchQuery:(e,t)=>r.fetchQuery({...t,queryKey:e,queryFn:()=>s.query(...eg(e,t))}),fetchInfiniteQuery:(e,t)=>r.fetchInfiniteQuery({...t,queryKey:e,queryFn:({pageParam:r,direction:i})=>s.query(...eg(e,t,{pageParam:r,direction:i})),initialPageParam:t?.initialCursor??null}),prefetchQuery:(e,t)=>r.prefetchQuery({...t,queryKey:e,queryFn:()=>s.query(...eg(e,t))}),prefetchInfiniteQuery:(e,t)=>r.prefetchInfiniteQuery({...t,queryKey:e,queryFn:({pageParam:r,direction:i})=>s.query(...eg(e,t,{pageParam:r,direction:i})),initialPageParam:t?.initialCursor??null}),ensureQueryData:(e,t)=>r.ensureQueryData({...t,queryKey:e,queryFn:()=>s.query(...eg(e,t))}),invalidateQueries:(e,t,s)=>r.invalidateQueries({...t,queryKey:e},s),resetQueries:(e,t,s)=>r.resetQueries({...t,queryKey:e},s),refetchQueries:(e,t,s)=>r.refetchQueries({...t,queryKey:e},s),cancelQuery:(e,t)=>r.cancelQueries({queryKey:e},t),setQueryData:(e,t,s)=>r.setQueryData(e,t,s),setQueriesData:(e,t,s,i)=>r.setQueriesData({...t,queryKey:e},s,i),getQueryData:e=>r.getQueryData(e),setInfiniteQueryData:(e,t,s)=>r.setQueryData(e,t,s),getInfiniteQueryData:e=>r.getQueryData(e)}})({client:s,queryClient:i}),[s,i]),l=d.useMemo(()=>({abortOnUnmount:t,queryClient:i,client:s,ssrContext:n??null,ssrState:a,...u}),[t,s,u,i,n,a]);return d.useEffect(()=>{o(e=>!!e&&"mounted")},[]),d.createElement(r.Provider,{value:l},e.children)},createClient:e=>(0,eb.createTRPCUntypedClient)(e),useContext:s,useUtils:s,useQuery:function(t,r,n){let{abortOnUnmount:a,client:o,ssrState:u,queryClient:l,prefetchQuery:c}=s(),h=R(t,r,"query"),d=l.getQueryDefaults(h),p=r===O.skipToken;!("u"<typeof window)||"prepass"!==u||n?.trpc?.ssr===!1||(n?.enabled??d?.enabled)===!1||p||l.getQueryCache().find({queryKey:h})||c(h,n);let f=i(h,{...d,...n}),y=n?.trpc?.abortOnUnmount??e?.abortOnUnmount??a,m=ea({...f,queryKey:h,queryFn:p?r:async e=>{let t={...f,trpc:{...f?.trpc,...y?{signal:e.signal}:{}}},r=await o.query(...eg(h,t));if((0,C.isAsyncIterable)(r)){let t=l.getQueryCache().build(e.queryKey,{queryKey:h});t.setState({data:[],status:"success"});let s=[];for await(let e of r)s.push(e),t.setState({data:[...s]});return s}return r}},l);return m.trpc=ev({path:t}),m},useSuspenseQuery:function(t,r,i){var n,a;let o=s(),u=R(t,r,"query"),l=i?.trpc?.abortOnUnmount??e?.abortOnUnmount??o.abortOnUnmount,c=(n={...i,queryKey:u,queryFn:e=>{let t={trpc:{...l?{signal:e.signal}:{}}};return o.client.query(...eg(u,t))}},a=o.queryClient,en({...n,enabled:!0,suspense:!0,throwOnError:et,placeholderData:void 0},B,a));return c.trpc=ev({path:t}),[c.data,c]},useQueries:e=>{let{ssrState:t,queryClient:r,prefetchQuery:i,client:n}=s(),a=e(eO(n));if("u"<typeof window&&"prepass"===t)for(let e of a)e.trpc?.ssr===!1||r.getQueryCache().find({queryKey:e.queryKey})||i(e.queryKey,e);return em({queries:a.map(e=>({...e,queryKey:e.queryKey}))},r)},useSuspenseQueries:e=>{var t;let{queryClient:r,client:i}=s(),n=(t={queries:e(eO(i)).map(e=>({...e,queryKey:e.queryKey}))},em({...t,queries:t.queries.map(e=>({...e,suspense:!0,throwOnError:et,enabled:!0,placeholderData:void 0}))},r));return[n.map(e=>e.data),n]},useMutation:function(e,r){let{client:i}=s(),n=(0,f.useQueryClient)(),a=[e],o=n.defaultMutationOptions(n.getMutationDefaults(a)),u=function(e,t){let r=(0,f.useQueryClient)(t),[s]=d.useState(()=>new el(r,e));d.useEffect(()=>{s.setOptions(e)},[s,e]);let i=d.useSyncExternalStore(d.useCallback(e=>s.subscribe(M.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),n=d.useCallback((e,t)=>{s.mutate(e,t).catch(O.noop)},[s]);if(i.error&&(0,O.shouldThrowError)(s.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:n,mutateAsync:i.mutate}}({...r,mutationKey:a,mutationFn:t=>i.mutation(...eg([e,{input:t}],r)),onSuccess:(...e)=>t({originalFn:()=>r?.onSuccess?.(...e)??o?.onSuccess?.(...e),queryClient:n,meta:r?.meta??o?.meta??{}})},n);return u.trpc=ev({path:e}),u},useSubscription:function(e,t,r){let i=r?.enabled??!0,n=(0,O.hashKey)(R(e,t,"any")),{client:a}=s(),o=d.useRef(r);o.current=r,d.useEffect(()=>{if(!i)return;let r=!1,s=a.subscription(e.join("."),t??void 0,{onStarted:()=>{r||o.current.onStarted?.()},onData:e=>{r||o.current.onData(e)},onError:e=>{r||o.current.onError?.(e)}});return()=>{r=!0,s.unsubscribe()}},[n,i])},useInfiniteQuery:function(e,t,r){let{client:n,ssrState:a,prefetchInfiniteQuery:o,queryClient:u,abortOnUnmount:l}=s(),c=R(e,t,"infinite"),h=u.getQueryDefaults(c),d=t===O.skipToken;!("u"<typeof window)||"prepass"!==a||r?.trpc?.ssr===!1||(r?.enabled??h?.enabled)===!1||d||u.getQueryCache().find({queryKey:c})||o(c,{...h,...r});let p=i(c,{...h,...r}),f=r?.trpc?.abortOnUnmount??l,y=en({...p,initialPageParam:r.initialCursor??null,persister:r.persister,queryKey:c,queryFn:d?t:e=>{let t={...p,trpc:{...p?.trpc,...f?{signal:e.signal}:{}}};return n.query(...eg(c,t,{pageParam:e.pageParam??r.initialCursor,direction:e.direction}))}},ep,u);return y.trpc=ev({path:e}),y},useSuspenseInfiniteQuery:function(e,t,r){var n,a;let o=s(),u=R(e,t,"infinite"),l=o.queryClient.getQueryDefaults(u),c=i(u,{...l,...r}),h=r?.trpc?.abortOnUnmount??o.abortOnUnmount,d=(n={...r,initialPageParam:r.initialCursor??null,queryKey:u,queryFn:e=>{let t={...c,trpc:{...c?.trpc,...h?{signal:e.signal}:{}}};return o.client.query(...eg(u,t,{pageParam:e.pageParam??r.initialCursor,direction:e.direction}))}},a=o.queryClient,en({...n,enabled:!0,suspense:!0,throwOnError:et},ep,a));return d.trpc=ev({path:e}),[d.data,d]}}}(void 0),(0,Q.createFlatProxy)(e=>"useContext"===e||"useUtils"===e?()=>{let e=c.useUtils();return d.useMemo(()=>(0,Q.createFlatProxy)(t=>"client"===t?(0,P.createTRPCClientProxy)(e.client):S.includes(t)?e[t]:(0,Q.createRecursiveProxy)(r=>{let s=[t,...r.path],i=s.pop(),n=[...r.args],a=R(s,n.shift(),(e=>{switch(e){case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";
2case"cancel":case"invalidate":case"refetch":case"reset":return"any"}})(i));return({fetch:()=>e.fetchQuery(a,...n),fetchInfinite:()=>e.fetchInfiniteQuery(a,n[0]),prefetch:()=>e.prefetchQuery(a,...n),prefetchInfinite:()=>e.prefetchInfiniteQuery(a,n[0]),ensureData:()=>e.ensureQueryData(a,...n),invalidate:()=>e.invalidateQueries(a,...n),reset:()=>e.resetQueries(a,...n),refetch:()=>e.refetchQueries(a,...n),cancel:()=>e.cancelQuery(a,...n),setData:()=>{e.setQueryData(a,n[0],n[1])},setQueriesData:()=>e.setQueriesData(a,n[0],n[1],n[2]),setInfiniteData:()=>{e.setInfiniteQueryData(a,n[0],n[1])},getData:()=>e.getQueryData(a),getInfiniteData:()=>e.getInfiniteQueryData(a)})[i]()})),[e])}:c.hasOwnProperty(e)?c[e]:(0,Q.createRecursiveProxy)(({path:t,args:r})=>{let s=[e,...t],i=s.pop();if("useMutation"===i)return c[i](s,...r);if("_def"===i)return{path:s};let[n,...a]=r,o=a[0]||{};return c[i](s,n,o)})));e.s(["TRPCReactProvider",0,function(e){let t=l??=new eE({defaultOptions:{queries:{staleTime:3e4},dehydrate:{serializeData:p.default.serialize,shouldDehydrateQuery:e=>(0,eR.defaultShouldDehydrateQuery)(e)||"pending"===e.state.status},hydrate:{deserializeData:p.default.deserialize}}}),[r]=(0,d.useState)(()=>eq.createClient({links:[function(e={}){let{enabled:t=()=>!0}=e,r=e.colorMode??("u"<typeof window?"ansi":"css"),s=e.withContext??"css"===r,{logger:i=(({c:e=console,colorMode:t="css",withContext:r})=>s=>{let i=s.input,n=!("u"<typeof FormData)&&i instanceof FormData?Object.fromEntries(i):i,{parts:a,args:o}=function(e){let{direction:t,type:r,withContext:s,path:i,id:n,input:a}=e,o=[],u=[];if("none"===e.colorMode)o.push("up"===t?">>":"<<",r,`#${n}`,i);else if("ansi"===e.colorMode){let[e,s]=v[r],[a,u]=w[r];o.push("up"===t?e:s,"up"===t?">>":"<<",r,"up"===t?a:u,`#${n}`,i,"\x1b[0m")}else{let[e,s]=g[r],a=`
3    background-color: #${"up"===t?e:s};
4    color: ${"up"===t?"black":"white"};
5    padding: 2px;
6  `;o.push("%c","up"===t?">>":"<<",r,`#${n}`,`%c${i}%c`,"%O"),u.push(a,`${a}; font-weight: bold;`,`${a}; font-weight: normal;`)}return"up"===t?u.push(s?{input:a,context:e.context}:{input:a}):u.push({input:a,result:e.result,elapsedMs:e.elapsedMs,...s&&{context:e.context}}),{parts:o,args:u}}({...s,colorMode:t,input:n,withContext:r});e["down"===s.direction&&s.result&&(s.result instanceof Error||"error"in s.result.result)?"error":"log"].apply(null,[a.join(" ")].concat(o))})({c:e.console,colorMode:r,withContext:s})}=e;return()=>({op:e,next:r})=>(0,m.observable)(s=>{t({...e,direction:"up"})&&i({...e,direction:"up"});let n=Date.now();function a(r){let s=Date.now()-n;t({...e,direction:"down",result:r})&&i({...e,direction:"down",elapsedMs:s,result:r})}return r(e).pipe((0,b.tap)({next(e){a(e)},error(e){a(e)}})).subscribe(s)})}({enabled:e=>!(0,eC.isProduction)()||"down"===e.direction&&e.result instanceof Error}),(0,y.httpLink)({transformer:p.default,url:window.location.origin+"/api/trpc",headers:()=>{let e=new Headers;return e.set("x-trpc-source","nextjs-react"),e}})]}));return(0,h.jsx)(f.QueryClientProvider,{client:t,children:(0,h.jsx)(eq.Provider,{client:r,queryClient:t,children:e.children})})},"api",0,eq],435446)},944362,39732,51680,15241,94802,651484,541730,24235,93082,705010,632082,e=>{"use strict";function t(e){let t={subscribe(t){let r=null,s=!1,i=!1,n=!1;function a(){if(null===r){n=!0;return}!i&&(i=!0,"function"==typeof r?r():r&&r.unsubscribe())}return r=e({next(e){s||t.next?.(e)},error(e){s||(s=!0,t.error?.(e),a())},complete(){s||(s=!0,t.complete?.(),a())}}),n&&a(),{unsubscribe:a}},pipe:(...e)=>e.reduce(r,t)};return t}function r(e,t){return t(e)}class s extends Error{constructor(e){super(e),this.name="ObservableAbortError",Object.setPrototypeOf(this,s.prototype)}}function i(e){let t;return{promise:new Promise((r,i)=>{let n=!1;function a(){n||(n=!0,i(new s("This operation was aborted.")),o.unsubscribe())}let o=e.subscribe({next(e){n=!0,r(e),a()},error(e){n=!0,i(e),a()},complete(){n=!0,a()}});t=a}),abort:t}}function n(e){return e=>{let r=0,s=null,i=[];return t(t=>(r++,i.push(t),s||(s=e.subscribe({next(e){for(let t of i)t.next?.(e)},error(e){for(let t of i)t.error?.(e)},complete(){for(let e of i)e.complete?.()}})),{unsubscribe(){if(0==--r&&s){let e=s;s=null,e.unsubscribe()}let e=i.findIndex(e=>e===t);e>-1&&i.splice(e,1)}}))}}e.s(["observable",0,t,"observableToPromise",0,i],39732),e.s(["share",0,n,"tap",0,function(e){return r=>t(t=>r.subscribe({next(r){e.next?.(r),t.next(r)},error(r){e.error?.(r),t.error(r)},complete(){e.complete?.(),t.complete()}}))}],51680);function a(e,...t){let r=Object.assign(Object.create(null),e);for(let e of t)for(let t in e){if(t in r&&r[t]!==e[t])throw Error(`Duplicate key ${t}`);r[t]=e[t]}return r}function o(e){return!!e&&!Array.isArray(e)&&"object"==typeof e}function u(e){return"function"==typeof e}function l(e){return Object.assign(Object.create(null),e)}Symbol("unsetMarker");let c="function"==typeof Symbol&&!!Symbol.asyncIterator;e.s(["isAsyncIterable",0,function(e){return c&&o(e)&&Symbol.asyncIterator in e},"isFunction",0,u,"isObject",0,o,"mergeWithoutOverrides",0,a,"omitPrototype",0,l],15241);
6class h extends Error{}function d(e){if(e instanceof Error)return e;let t=typeof e;if("undefined"!==t&&"function"!==t&&null!==e){if("object"!==t)return Error(String(e));if(o(e)){let t=new h;for(let r in e)t[r]=e[r];return t}}}let p=("u"<typeof window||"Deno"in window||globalThis.process?.env?.NODE_ENV==="test"||globalThis.process?.env?.JEST_WORKER_ID||globalThis.process?.env?.VITEST_WORKER_ID,()=>{}),f=e=>(function e(t,r){return new Proxy(p,{get(s,i){if("string"==typeof i&&"then"!==i)return e(t,[...r,i])},apply(e,s,i){let n=r[r.length-1],a={args:i,path:r};return"call"===n?a={args:i.length>=2?[i[1]]:[],path:r.slice(0,-1)}:"apply"===n&&(a={args:i.length>=2?i[1]:[],path:r.slice(0,-1)}),t(a)}})})(e,[]),y=e=>new Proxy(p,{get(t,r){if("string"==typeof r&&"then"!==r)return e(r)}});e.s(["createFlatProxy",0,y,"createRecursiveProxy",0,f],94802);class m extends Error{constructor(){super("Unable to transform response from server")}}e.s([],651484);class b extends Error{static from(e,t={}){return e instanceof b||e instanceof Error&&"TRPCClientError"===e.name?(t.meta&&(e.meta={...e.meta,...t.meta}),e):o(e)&&o(e.error)&&"number"==typeof e.error.code&&"string"==typeof e.error.message?new b(e.error.message,{...t,result:e}):e instanceof Error?new b(e.message,{...t,cause:d(e)}):new b("Unknown error",{...t,cause:e})}constructor(e,t){const r=t?.cause;super(e,{cause:r}),this.meta=t?.meta,this.cause=r,this.shape=t?.result?.error,this.data=t?.result?.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,b.prototype)}}e.s(["TRPCClientError",0,b],541730);class g{$request({type:e,input:r,path:s,context:i={}}){var a;return(a={links:this.links,op:{id:++this.requestId,type:e,path:s,input:r,context:i}},t(e=>(function e(t=0,r=a.op){let s=a.links[t];if(!s)throw Error("No more links to execute - did you forget to add an ending link?");return s({op:r,next:r=>e(t+1,r)})})().subscribe(e))).pipe(n())}requestAsPromise(e){let{promise:t,abort:r}=i(this.$request(e));return new Promise((s,i)=>{e.signal?.addEventListener("abort",r),t.then(e=>{s(e.result.data)}).catch(e=>{i(b.from(e))})})}query(e,t,r){return this.requestAsPromise({type:"query",path:e,input:t,context:r?.context,signal:r?.signal})}mutation(e,t,r){return this.requestAsPromise({type:"mutation",path:e,input:t,context:r?.context,signal:r?.signal})}subscription(e,t,r){return this.$request({type:"subscription",path:e,input:t,context:r?.context}).subscribe({next(e){"started"===e.result.type?r.onStarted?.():"stopped"===e.result.type?r.onStopped?.():r.onData?.(e.result.data)},error(e){r.onError?.(e)},complete(){r.onComplete?.()}})}constructor(e){this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}}e.s(["TRPCUntypedClient",0,g],24235),e.s(["createTRPCUntypedClient",0,function(e){return new g(e)}],93082);let v={query:"query",mutate:"mutation",subscribe:"subscription"};e.s(["createTRPCClientProxy",0,function(e){return y(t=>e.hasOwnProperty(t)?e[t]:"__untypedClient"===t?e:f(({path:r,args:s})=>{let i=[t,...r],n=v[i.pop()],a=i.join(".");return e[n](a,...s)}))},"getUntypedClient",0,function(e){return e.__untypedClient}],705010);let w={query:"GET",mutation:"POST"};function O(e){return"input"in e?e.transformer.input.serialize(e.input):function(e){let t={};for(let r=0;r<e.length;r++){let s=e[r];t[r]=s}return t}(e.inputs.map(t=>e.transformer.input.serialize(t)))}let C=e=>{let t=e.url+"/"+e.path,r=[];if("inputs"in e&&r.push("batch=1"),"query"===e.type){let t=O(e);void 0!==t&&"POST"!==e.methodOverride&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(t+="?"+r.join("&")),t},R=e=>{if("query"===e.type&&"POST"!==e.methodOverride)return;let t=O(e);return void 0!==t?JSON.stringify(t):void 0};async function Q(e,t){let r=e.getUrl(e),s=e.getBody(e),{type:i}=e,n=await (async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})();if("subscription"===i)throw Error("Subscriptions should use wsLink");let a={...e.contentTypeHeader?{"content-type":e.contentTypeHeader}:{},...e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0,...n};return(function(e){if(e)return e;if("u">typeof window&&"function"==typeof window.fetch)return window.fetch;if("u">typeof globalThis&&"function"==typeof globalThis.fetch)return globalThis.fetch;throw Error("No fetch implementation found")})(e.fetch)(r,{method:e.methodOverride??w[i],signal:t?.signal,body:s,headers:a})}function P(e){let t=e.AbortController?new e.AbortController:null,r={},s=!1;return{promise:new Promise((i,n)=>{Q(e,t).then(e=>(r.response=e,s=!0,e.json())).then(e=>{r.responseJSON=e,i({json:e,meta:r})}).catch(e=>{s=!0,n(b.from(e,{meta:r}))})}),cancel:()=>{s||t?.abort()}}}e.s(["httpLink",0,function(e){var r,s;let i={url:e.url.toString().replace(/\/$/,""),fetch:e.fetch,AbortController:(r=e.AbortController)?r:"u">typeof window&&window.AbortController?window.AbortController:"u">typeof globalThis&&globalThis.AbortController?globalThis.AbortController:null,transformer:(s=e.transformer)?"input"in s?s:{input:s,output:s}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}},methodOverride:e.methodOverride};return()=>({op:r})=>t(t=>{let s,{path:n,input:a,type:u}=r,l=(e=>{let t=O(e);if(t instanceof FormData){if("mutation"!==e.type&&"POST"!==e.methodOverride)throw Error("FormData is only supported for mutations");return P({...e,contentTypeHeader:void 0,getUrl:C,getBody:()=>t})}if(t instanceof Uint8Array||t instanceof Blob){if("mutation"!==e.type&&"POST"!==e.methodOverride)throw Error("Octet type input is only supported for mutations");return P({...e,contentTypeHeader:"application/octet-stream",getUrl:C,getBody:()=>t})}return P({...e,contentTypeHeader:"application/json",getUrl:C,getBody:R})})({...i,type:u,path:n,input:a,headers:()=>e.headers?"function"==typeof e.headers?e.headers({op:r}):e.headers:{}});return l.promise.then(e=>{s=e.meta;let r=function(e,t){let r;try{r=function(e,t){if("error"in e){let r=t.deserialize(e.error);return{ok:!1,error:{...e,error:r}}}return{ok:!0,result:{...e.result,...(!e.result.type||"data"===e.result.type)&&{type:"data",data:t.deserialize(e.result.data)}}}}(e,t)}catch(e){throw new m}if(!r.ok&&(!o(r.error.error)||"number"!=typeof r.error.error.code)||r.ok&&!o(r.result))throw new m;return r}(e.json,i.transformer.output);r.ok?(t.next({context:e.meta,result:r.result}),t.complete()):t.error(b.from(r.error,{meta:s}))}).catch(e=>{t.error(b.from(e,{meta:s}))}),()=>{l.cancel()}})}],632082),e.s([],944362)},303769,e=>{"use strict";class t{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}
6class r{constructor(e){this.generateIdentifier=e,this.kv=new t}register(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}}class s extends r{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){"object"==typeof t?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}}function i(e,t){Object.entries(e).forEach(([e,r])=>t(r,e))}function n(e,t){return -1!==e.indexOf(t)}function a(e,t){for(let r=0;r<e.length;r++){let s=e[r];if(t(s))return s}}class o{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return function(e,t){let r=function(e){if("values"in Object)return Object.values(e);let t=[];for(let r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}(e);if("find"in r)return r.find(t);for(let e=0;e<r.length;e++){let s=r[e];if(t(s))return s}}(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}}let u=e=>void 0===e,l=e=>"object"==typeof e&&null!==e&&e!==Object.prototype&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype),c=e=>l(e)&&0===Object.keys(e).length,h=e=>Array.isArray(e),d=e=>e instanceof Map,p=e=>e instanceof Set,f=e=>"Symbol"===Object.prototype.toString.call(e).slice(8,-1),y=e=>"number"==typeof e&&isNaN(e),m=e=>e.replace(/\./g,"\\."),b=e=>e.map(String).map(m).join("."),g=e=>{let t=[],r="";for(let s=0;s<e.length;s++){let i=e.charAt(s);if("\\"===i&&"."===e.charAt(s+1)){r+=".",s++;continue}if("."===i){t.push(r),r="";
6continue}r+=i}let s=r;return t.push(s),t};function v(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}let w=[v(u,"undefined",()=>null,()=>void 0),v(e=>"bigint"==typeof e,"bigint",e=>e.toString(),e=>"u">typeof BigInt?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),v(e=>e instanceof Date&&!isNaN(e.valueOf()),"Date",e=>e.toISOString(),e=>new Date(e)),v(e=>e instanceof Error,"Error",(e,t)=>{let r={name:e.name,message:e.message};return t.allowedErrorProps.forEach(t=>{r[t]=e[t]}),r},(e,t)=>{let r=Error(e.message);return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(t=>{r[t]=e[t]}),r}),v(e=>e instanceof RegExp,"regexp",e=>""+e,e=>new RegExp(e.slice(1,e.lastIndexOf("/")),e.slice(e.lastIndexOf("/")+1))),v(p,"set",e=>[...e.values()],e=>new Set(e)),v(d,"map",e=>[...e.entries()],e=>new Map(e)),v(e=>y(e)||e===1/0||e===-1/0,"number",e=>y(e)?"NaN":e>0?"Infinity":"-Infinity",Number),v(e=>0===e&&1/e==-1/0,"number",()=>"-0",Number),v(e=>e instanceof URL,"URL",e=>e.toString(),e=>new URL(e))];function O(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}let C=O((e,t)=>!!f(e)&&!!t.symbolRegistry.getIdentifier(e),(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{let s=r.symbolRegistry.getValue(t[1]);if(!s)throw Error("Trying to deserialize unknown symbol");return s}),R=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),Q=O(e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{let r=R[t[1]];if(!r)throw Error("Trying to deserialize unknown typed array");return new r(e)});function P(e,t){return!!e?.constructor&&!!t.classRegistry.getIdentifier(e.constructor)}let S=O(P,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return{...e};let s={};return r.forEach(t=>{s[t]=e[t]}),s},(e,t,r)=>{let s=r.classRegistry.getValue(t[1]);if(!s)throw Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(s.prototype),e)}),E=O((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{let s=r.customTransformerRegistry.findByName(t[1]);if(!s)throw Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),q=[S,C,E,Q],T=(e,t)=>{let r=a(q,r=>r.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};let s=a(w,r=>r.isApplicable(e,t));if(s)return{value:s.transform(e,t),type:s.annotation}},x={};w.forEach(e=>{x[e.annotation]=e});let I=(e,t)=>{let r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function D(e){if(n(e,"__proto__"))throw Error("__proto__ is not allowed as a property");if(n(e,"prototype"))throw Error("prototype is not allowed as a property");if(n(e,"constructor"))throw Error("constructor is not allowed as a property")}let M=(e,t,r)=>{if(D(t),0===t.length)return r(e);let s=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(h(s))s=s[+r];else if(l(s))s=s[r];else if(p(s))s=I(s,+r);else if(d(s)){if(e===t.length-2)break;let i=+r,n=0==+t[++e]?"key":"value",a=I(s,i);switch(n){case"key":s=a;break;case"value":s=s.get(a)}}}let i=t[t.length-1];if(h(s)?s[+i]=r(s[+i]):l(s)&&(s[i]=r(s[i])),p(s)){let e=I(s,+i),t=r(e);e!==t&&(s.delete(e),s.add(t))}if(d(s)){let e=I(s,+t[t.length-2]);switch(0==+i?"key":"value"){case"key":{let t=r(e);s.set(t,s.get(e)),t!==e&&s.delete(e);break}case"value":s.set(e,r(s.get(e)))}}return e},k=(e,t,r,s,a=[],o=[],y=new Map)=>{let b=(e=>"boolean"==typeof e||null===e||u(e)||"number"==typeof e&&!isNaN(e)||"string"==typeof e||f(e))(e);if(!b){let r;(r=t.get(e))?r.push(a):t.set(e,[a]);let i=y.get(e);if(i)return s?{transformedValue:null}:i}if(!(l(e)||h(e)||d(e)||p(e)||P(e,r))){let t=T(e,r),s=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return b||y.set(e,s),s}if(n(o,e))return{transformedValue:null};let g=T(e,r),v=g?.value??e,w=h(v)?[]:{},O={};i(v,(n,u)=>{if("__proto__"===u||"constructor"===u||"prototype"===u)throw Error(`Detected property ${u}. This is a prototype pollution risk, please remove it from your object.`);let c=k(n,t,r,s,[...a,u],[...o,e],y);w[u]=c.transformedValue,h(c.annotations)?O[u]=c.annotations:l(c.annotations)&&i(c.annotations,(e,t)=>{O[m(u)+"."+t]=e})});let C=c(O)?{transformedValue:w,annotations:g?[g.type]:void 0}:{transformedValue:w,annotations:g?[g.type,O]:O};return b||y.set(e,C),C};function F(e){return Object.prototype.toString.call(e).slice(8,-1)}function A(e){return"Array"===F(e)}class U{constructor({dedupe:e=!1}={}){this.classRegistry=new s,this.symbolRegistry=new r(e=>e.description??""),this.customTransformerRegistry=new o,this.allowedErrorProps=[],this.dedupe=e}serialize(e){var t;let r,s,i=new Map,n=k(e,i,this,this.dedupe),a={json:n.transformedValue};n.annotations&&(a.meta={...a.meta,values:n.annotations});let o=(t=this.dedupe,r={}
6,(i.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...n]=e;0===i.length?s=n.map(b):r[b(i)]=n.map(b)}),s)?c(r)?[s]:[s,r]:c(r)?void 0:r);return o&&(a.meta={...a.meta,referentialEqualities:o}),a}deserialize(e){var t,r,s;let{json:n,meta:a}=e,o=function e(t,r={}){return A(t)?t.map(t=>e(t,r)):!function(e){if("Object"!==F(e))return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}(t)?t:[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)].reduce((s,i)=>{var n;let a;if(A(r.props)&&!r.props.includes(i))return s;let o=e(t[i],r);return n=r.nonenumerable,"enumerable"==(a=({}).propertyIsEnumerable.call(t,i)?"enumerable":"nonenumerable")&&(s[i]=o),n&&"nonenumerable"===a&&Object.defineProperty(s,i,{value:o,enumerable:!1,writable:!0,configurable:!0}),s},{})}(n);return a?.values&&(t=o,r=a.values,s=this,function e(t,r,s=[]){if(!t)return;if(!h(t))return void i(t,(t,i)=>e(t,r,[...s,...g(i)]));let[n,a]=t;a&&i(a,(t,i)=>{e(t,r,[...s,...g(i)])}),r(n,s)}(r,(e,r)=>{t=M(t,r,t=>((e,t,r)=>{if(h(t))switch(t[0]){case"symbol":return C.untransform(e,t,r);case"class":return S.untransform(e,t,r);case"custom":return E.untransform(e,t,r);case"typed-array":return Q.untransform(e,t,r);default:throw Error("Unknown transformation: "+t)}{let s=x[t];if(!s)throw Error("Unknown transformation: "+t);return s.untransform(e,r)}})(t,e,s))}),o=t),a?.referentialEqualities&&(o=function(e,t){function r(t,r){let s=((e,t)=>{D(t);for(let r=0;r<t.length;r++){let s=t[r];if(p(e))e=I(e,+s);else if(d(e)){let i=+s,n=0==+t[++r]?"key":"value",a=I(e,i);switch(n){case"key":e=a;break;case"value":e=e.get(a)}}else e=e[s]}return e})(e,g(r));t.map(g).forEach(t=>{e=M(e,t,()=>s)})}if(h(t)){let[s,n]=t;s.forEach(t=>{e=M(e,g(t),()=>e)}),n&&i(n,r)}else i(t,r);return e}(o,a.referentialEqualities)),o}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}}U.defaultInstance=new U,U.serialize=U.defaultInstance.serialize.bind(U.defaultInstance),U.deserialize=U.defaultInstance.deserialize.bind(U.defaultInstance),U.stringify=U.defaultInstance.stringify.bind(U.defaultInstance),U.parse=U.defaultInstance.parse.bind(U.defaultInstance),U.registerClass=U.defaultInstance.registerClass.bind(U.defaultInstance),U.registerSymbol=U.defaultInstance.registerSymbol.bind(U.defaultInstance),U.registerCustom=U.defaultInstance.registerCustom.bind(U.defaultInstance),U.allowErrorProps=U.defaultInstance.allowErrorProps.bind(U.defaultInstance),U.serialize,U.deserialize,U.stringify,U.parse,U.registerClass,U.registerCustom,U.registerSymbol,U.allowErrorProps,e.s(["default",0,U],303769)}]);
7
8//# debugId=ba5b467b-8d56-1141-cb04-e4b0773ae624
9//# sourceMappingURL=4039veybbku6h.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.