vendor: 27,415 bytes, lines 1-9
1import{r as C,R as Yr}from"./react-vendor-CGOjsTCb.js";var Ye={exports:{}},Oe={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var jt;function Zr(){if(jt)return Oe;jt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,i){var o=null;if(i!==void 0&&(o=""+i),s.key!==void 0&&(o=""+s.key),"key"in s){i={};for(var a in s)a!=="key"&&(i[a]=s[a])}else i=s;return s=i.ref,{$$typeof:e,type:n,key:o,ref:s!==void 0?s:null,props:i}}return Oe.Fragment=t,Oe.jsx=r,Oe.jsxs=r,Oe}var Et;function Xr(){return Et||(Et=1,Ye.exports=Zr()),Ye.exports}var Jt=Xr(),pe=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(){}},en={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},tn=class{#t=en;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},fe=new tn;function rn(e){setTimeout(e,0)}var de=typeof window>"u"||"Deno"in globalThis;function H(){}function nn(e,t){return typeof e=="function"?e(t):e}function nt(e){return typeof e=="number"&&e>=0&&e!==1/0}function Yt(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ne(e,t){return typeof e=="function"?e(t):e}function W(e,t){return typeof e=="function"?e(t):e}function It(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==Ot(o,t.options))return!1}else if(!xe(t.queryKey,o))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Qt(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(se(t.options.mutationKey)!==se(i))return!1}else if(!xe(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Ot(e,t){return(t?.queryKeyHashFn||se)(e)}function se(e){return JSON.stringify(e,(t,r)=>st(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function xe(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>xe(e[r],t[r])):!1}var sn=Object.prototype.hasOwnProperty;function Pt(e,t){if(e===t)return e;const r=Mt(e)&&Mt(t);if(!r&&!(st(e)&&st(t)))return t;const s=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),o=i.length,a=r?new Array(o):{};let u=0;for(let c=0;c<o;c++){const l=r?c:i[c],f=e[l],d=t[l];if(f===d){a[l]=f,(r?c<s:sn.call(e,l))&&u++;continue}if(f===null||d===null||typeof f!="object"||typeof d!="object"){a[l]=d;continue}const v=Pt(f,d);a[l]=v,v===f&&u++}return s===o&&u===s?e:a}function Se(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Mt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function st(e){if(!Tt(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Tt(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Tt(e){return Object.prototype.toString.call(e)==="[object Object]"}function on(e){return new Promise(t=>{fe.setTimeout(t,e)})}function it(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Pt(e,t):t}function an(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function un(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var B=Symbol();function Zt(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===B?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Xt(e,t){return typeof e=="function"?e(...t):!!e}var cn=class extends pe{#t;#e;#r;constructor(){super(),this.#r=e=>{if(!de&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#r=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},wt=new cn;function ot(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var ln=rn;function fn(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=ln;const i=a=>{t?e.push(a):s(()=>{r(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(u=>{r(u)})})})};return{batch:a=>{let u;t++;try{u=a()}finally{t--,t||o()}return u},batchCalls:a=>(...u)=>{i(()=>{a(...u)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var k=fn(),dn=class extends pe{#t=!0;#e;#r;constructor(){super(),this.#r=e=>{if(!de&&window.addEventListener){const 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.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#r=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#t}},Ne=new dn;function hn(e){return Math.min(1e3*2**e,3e4)}function er(e){return(e??"online")==="online"?Ne.isOnline():!0}var at=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function tr(e){let t=!1,r=0,n;const s=ot(),i=()=>s.status!=="pending",o=h=>{if(!i()){const S=new at(h);d(S),e.onCancel?.(S)}},a=()=>{t=!0},u=()=>{t=!1},c=()=>wt.isFocused()&&(e.networkMode==="always"||Ne.isOnline())&&e.canRun(),l=()=>er(e.networkMode)&&e.canRun(),f=h=>{i()||(n?.(),s.resolve(h))},d=h=>{i()||(n?.(),s.reject(h))},v=()=>new Promise(h=>{n=S=>{(i()||c())&&h(S)},e.onPause?.()}).then(()=>{n=void 0,i()||e.onContinue?.()}),b=()=>{if(i())return;let h;const S=r===0?e.initialPromise:void 0;try{h=S??e.fn()}catch(R){h=Promise.reject(R)}Promise.resolve(h).then(f).catch(R=>{if(i())return;const j=e.retry??(de?0:3),K=e.retryDelay??hn,J=typeof K=="function"?K(r,R):K,O=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,R);if(t||!O){d(R);return}r++,e.onFail?.(r,R),on(J).then(()=>c()?void 0:v()).then(()=>{t?d(R):b()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n?.(),s),cancelRetry:a,continueRetry:u,canStart:l,start:()=>(l()?b():v().then(b),s)}}var rr=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nt(this.gcTime)&&(this.#t=fe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(de?1/0:300*1e3))}clearGcTimeout(){this.#t&&(fe.clearTimeout(this.#t),this.#t=void 0)}},pn=class extends rr{#t;#e;#r;#s;#n;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#r=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=qt(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=qt(this.options);t.data!==void 0&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const r=it(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(H).catch(H):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>W(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===B||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ne(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Yt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.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.#n&&(this.#a?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(u=>u.options.queryFn);a&&this.setOptions(a.options)}const r=new AbortController,n=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},s=()=>{const a=Zt(this.options,t),c=(()=>{const l={client:this.#s,queryKey:this.queryKey,meta:this.meta};return n(l),l})();return this.#a=!1,this.options.persister?this.options.persister(a,c,this):a(c)},o=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return n(a),a})();this.options.behavior?.onFetch(o,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#n=tr({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof at&&a.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},onFail:(a,u)=>{this.#o({type:"failed",failureCount:a,error:u})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const a=await this.#n.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#r.config.onSuccess?.(a,this),this.#r.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof at){if(a.silent)return this.#n.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#o({type:"error",error:a}),this.#r.config.onError?.(a,this),this.#r.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#o(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...nr(r.data,this.options),fetchMeta:e.meta??null};case"success":const n={...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?n:void 0,n;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),k.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function nr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:er(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qt(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ee=class extends pe{constructor(e,t){super(),this.options=t,this.#t=e,this.#o=null,this.#a=ot(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#r=void 0;#s=void 0;#n;#i;#a;#o;#h;#f;#d;#c;#l;#u;#y=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),At(this.#e,this.options)?this.#p():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ut(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ut(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#O(),this.#P(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof W(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),t._defaulted&&!Se(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&Dt(this.#e,r,this.options,t)&&this.#p(),this.updateResult(),n&&(this.#e!==r||W(this.options.enabled,this.#e)!==W(t.enabled,this.#e)||ne(this.options.staleTime,this.#e)!==ne(t.staleTime,this.#e))&&this.#v();const s=this.#m();n&&(this.#e!==r||W(this.options.enabled,this.#e)!==W(t.enabled,this.#e)||s!==this.#u)&&this.#b(s)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),r=this.createResult(t,e);return vn(this,r)&&(this.#s=r,this.#i=this.options,this.#n=this.#e.state),r}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(r,n)=>(this.trackProp(n),t?.(n),n==="promise"&&!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,n))})}trackProp(e){this.#y.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),r=this.#t.getQueryCache().build(this.#t,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#p(e){this.#w();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(H)),t}#v(){this.#O();const e=ne(this.options.staleTime,this.#e);if(de||this.#s.isStale||!nt(e))return;const r=Yt(this.#s.dataUpdatedAt,e)+1;this.#c=fe.setTimeout(()=>{this.#s.isStale||this.updateResult()},r)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#b(e){this.#P(),this.#u=e,!(de||W(this.options.enabled,this.#e)===!1||!nt(this.#u)||this.#u===0)&&(this.#l=fe.setInterval(()=>{(this.options.refetchIntervalInBackground||wt.isFocused())&&this.#p()},this.#u))}#g(){this.#v(),this.#b(this.#m())}#O(){this.#c&&(fe.clearTimeout(this.#c),this.#c=void 0)}#P(){this.#l&&(fe.clearInterval(this.#l),this.#l=void 0)}createResult(e,t){const r=this.#e,n=this.options,s=this.#s,i=this.#n,o=this.#i,u=e!==r?e.state:this.#r,{state:c}=e;let l={...c},f=!1,d;if(t._optimisticResults){const m=this.hasListeners(),w=!m&&At(e,t),P=m&&Dt(e,r,t,n);(w||P)&&(l={...l,...nr(c.data,e.options)}),t._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:h}=l;d=l.data;let S=!1;if(t.placeholderData!==void 0&&d===void 0&&h==="pending"){let m;s?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(m=s.data,S=!0):m=typeof t.placeholderData=="function"?t.placeholderData(this.#d?.state.data,this.#d):t.placeholderData,m!==void 0&&(h="success",d=it(s?.data,m,t),f=!0)}if(t.select&&d!==void 0&&!S)if(s&&d===i?.data&&t.select===this.#h)d=this.#f;else try{this.#h=t.select,d=t.select(d),d=it(s?.data,d,t),this.#f=d,this.#o=null}catch(m){this.#o=m}this.#o&&(v=this.#o,d=this.#f,b=Date.now(),h="error");const R=l.fetchStatus==="fetching",j=h==="pending",K=h==="error",J=j&&R,O=d!==void 0,p={status:h,fetchStatus:l.fetchStatus,isPending:j,isSuccess:h==="success",isError:K,isInitialLoading:J,isLoading:J,data:d,dataUpdatedAt:l.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>u.dataUpdateCount||l.errorUpdateCount>u.errorUpdateCount,isFetching:R,isRefetching:R&&!j,isLoadingError:K&&!O,isPaused:l.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:K&&O,isStale:_t(e,t),refetch:this.refetch,promise:this.#a,isEnabled:W(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const m=_=>{p.status==="error"?_.reject(p.error):p.data!==void 0&&_.resolve(p.data)},w=()=>{const _=this.#a=p.promise=ot();m(_)},P=this.#a;switch(P.status){case"pending":e.queryHash===r.queryHash&&m(P);break;case"fulfilled":(p.status==="error"||p.data!==P.value)&&w();break;case"rejected":(p.status!=="error"||p.error!==P.reason)&&w();break}}return p}updateResult(){const e=this.#s,t=this.createResult(this.#e,this.options);if(this.#n=this.#e.state,this.#i=this.options,this.#n.data!==void 0&&(this.#d=this.#e),Se(t,e))return;this.#s=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,s=typeof n=="function"?n():n;if(s==="all"||!s&&!this.#y.size)return!0;const i=new Set(s??this.#y);return this.options.throwOnError&&i.add("error"),Object.keys(this.#s).some(o=>{const a=o;return this.#s[a]!==e[a]&&i.has(a)})};this.#_({listeners:r()})}#w(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#_(e){k.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function yn(e,t){return W(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function At(e,t){return yn(e,t)||e.state.data!==void 0&&ut(e,t,t.refetchOnMount)}function ut(e,t,r){if(W(t.enabled,e)!==!1&&ne(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&_t(e,t)}return!1}function Dt(e,t,r,n){return(e!==t||W(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&_t(e,r)}function _t(e,t){return W(t.enabled,e)!==!1&&e.isStaleByTime(ne(t.staleTime,e))}function vn(e,t){return!Se(e.getCurrentResult(),t)}function Le(e){return{onFetch:(t,r)=>{const n=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},u=0;const c=async()=>{let l=!1;const f=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?l=!0:t.signal.addEventListener("abort",()=>{l=!0}),t.signal)})},d=Zt(t.options,t.fetchOptions),v=async(b,h,S)=>{if(l)return Promise.reject();if(h==null&&b.pages.length)return Promise.resolve(b);const j=(()=>{const g={client:t.client,queryKey:t.queryKey,pageParam:h,direction:S?"backward":"forward",meta:t.options.meta};return f(g),g})(),K=await d(j),{maxPages:J}=t.options,O=S?un:an;return{pages:O(b.pages,K,J),pageParams:O(b.pageParams,h,J)}};if(s&&i.length){const b=s==="backward",h=b?sr:ct,S={pages:i,pageParams:o},R=h(n,S);a=await v(S,R,b)}else{const b=e??i.length;do{const h=u===0?o[0]??n.initialPageParam:ct(n,a);if(u>0&&h==null)break;a=await v(a,h),u++}while(u<b)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function ct(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function sr(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function mn(e,t){return t?ct(e,t)!=null:!1}function bn(e,t){return!t||!e.getPreviousPageParam?!1:sr(e,t)!=null}var ir=class extends Ee{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:Le()})}getOptimisticResult(e){return e.behavior=Le(),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){const{state:r}=e,n=super.createResult(e,t),{isFetching:s,isRefetching:i,isError:o,isRefetchError:a}=n,u=r.fetchMeta?.fetchMore?.direction,c=o&&u==="forward",l=s&&u==="forward",f=o&&u==="backward",d=s&&u==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:mn(t,r.data),hasPreviousPage:bn(t,r.data),isFetchNextPageError:c,isFetchingNextPage:l,isFetchPreviousPageError:f,isFetchingPreviousPage:d,isRefetchError:a&&!c&&!f,isRefetching:i&&!l&&!d}}},gn=class extends rr{#t;#e;#r;#s;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#e=[],this.state=e.state||or(),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.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#r.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#n({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=tr({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(i,o)=>{this.#n({type:"failed",failureCount:i,error:o})},onPause:()=>{this.#n({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});const n=this.state.status==="pending",s=!this.#s.canStart();try{if(n)t();else{this.#n({type:"pending",variables:e,isPaused:s}),await this.#r.config.onMutate?.(e,this,r);const o=await this.options.onMutate?.(e,r);o!==this.state.context&&this.#n({type:"pending",context:o,variables:e,isPaused:s})}const i=await this.#s.start();return await this.#r.config.onSuccess?.(i,e,this.state.context,this,r),await this.options.onSuccess?.(i,e,this.state.context,r),await this.#r.config.onSettled?.(i,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(i,null,e,this.state.context,r),this.#n({type:"success",data:i}),i}catch(i){try{throw await this.#r.config.onError?.(i,e,this.state.context,this,r),await this.options.onError?.(i,e,this.state.context,r),await this.#r.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,i,e,this.state.context,r),i}finally{this.#n({type:"error",error:i})}}finally{this.#r.runNext(this)}}#n(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),k.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function or(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var On=class extends pe{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#r=0}#t;#e;#r;build(e,t,r){const n=new gn({client:e,mutationCache:this,mutationId:++this.#r,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#t.add(e);const t=Te(e);if(typeof t=="string"){const r=this.#e.get(t);r?r.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=Te(e);if(typeof t=="string"){const r=this.#e.get(t);if(r)if(r.length>1){const n=r.indexOf(e);n!==-1&&r.splice(n,1)}else r[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Te(e);if(typeof t=="string"){const n=this.#e.get(t)?.find(s=>s.state.status==="pending");return!n||n===e}else return!0}runNext(e){const t=Te(e);return typeof t=="string"?this.#e.get(t)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){k.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Qt(t,r))}findAll(e={}){return this.getAll().filter(t=>Qt(e,t))}notify(e){k.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>
9t.state.isPaused);return k.batch(()=>Promise.all(e.map(t=>t.continue().catch(H))))}};function Te(e){return e.options.scope?.id}var Pn=class extends pe{#t;#e=void 0;#r;#s;constructor(e,t){super(),this.#t=e,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#t.defaultMutationOptions(e),Se(this.options,t)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&se(t.mutationKey)!==se(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#n(),this.#i(e)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#n(),this.#i()}mutate(e,t){return this.#s=t,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(e)}#n(){const e=this.#r?.state??or();this.#e={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#i(e){k.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#e.variables,r=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#s.onSuccess?.(e.data,t,r,n),this.#s.onSettled?.(e.data,null,t,r,n)):e?.type==="error"&&(this.#s.onError?.(e.error,t,r,n),this.#s.onSettled?.(void 0,e.error,t,r,n))}this.listeners.forEach(t=>{t(this.#e)})})}};function Ft(e,t){const r=new Set(t);return e.filter(n=>!r.has(n))}function wn(e,t,r){const n=e.slice(0);return n[t]=r,n}var _n=class extends pe{#t;#e;#r;#s;#n;#i;#a;#o;#h=[];constructor(e,t,r){super(),this.#t=e,this.#s=r,this.#r=[],this.#n=[],this.#e=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#n.forEach(e=>{e.subscribe(t=>{this.#l(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#n.forEach(e=>{e.destroy()})}setQueries(e,t){this.#r=e,this.#s=t,k.batch(()=>{const r=this.#n,n=this.#c(this.#r);this.#h=n,n.forEach(l=>l.observer.setOptions(l.defaultedQueryOptions));const s=n.map(l=>l.observer),i=s.map(l=>l.getCurrentResult()),o=r.length!==s.length,a=s.some((l,f)=>l!==r[f]),u=o||a,c=u?!0:i.some((l,f)=>{const d=this.#e[f];return!d||!Se(l,d)});!u&&!c||(u&&(this.#n=s),this.#e=i,this.hasListeners()&&(u&&(Ft(r,s).forEach(l=>{l.destroy()}),Ft(s,r).forEach(l=>{l.subscribe(f=>{this.#l(l,f)})})),this.#u()))})}getCurrentResult(){return this.#e}getQueries(){return this.#n.map(e=>e.getCurrentQuery())}getObservers(){return this.#n}getOptimisticResult(e,t){const r=this.#c(e),n=r.map(s=>s.observer.getOptimisticResult(s.defaultedQueryOptions));return[n,s=>this.#d(s??n,t),()=>this.#f(n,r)]}#f(e,t){return t.map((r,n)=>{const s=e[n];return r.defaultedQueryOptions.notifyOnChangeProps?s:r.observer.trackResult(s,i=>{t.forEach(o=>{o.observer.trackProp(i)})})})}#d(e,t){return t?((!this.#i||this.#e!==this.#o||t!==this.#a)&&(this.#a=t,this.#o=this.#e,this.#i=Pt(this.#i,t(e))),this.#i):e}#c(e){const t=new Map(this.#n.map(n=>[n.options.queryHash,n])),r=[];return e.forEach(n=>{const s=this.#t.defaultQueryOptions(n),i=t.get(s.queryHash);i?r.push({defaultedQueryOptions:s,observer:i}):r.push({defaultedQueryOptions:s,observer:new Ee(this.#t,s)})}),r}#l(e,t){const r=this.#n.indexOf(e);r!==-1&&(this.#e=wn(this.#e,r,t),this.#u())}#u(){if(this.hasListeners()){const e=this.#i,t=this.#f(this.#e,this.#h),r=this.#d(t,this.#s?.combine);e!==r&&k.batch(()=>{this.listeners.forEach(n=>{n(this.#e)})})}}},xn=class extends pe{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,r){const n=t.queryKey,s=t.queryHash??Ot(n,t);let i=this.get(s);return i||(i=new pn({client:e,queryKey:n,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(i)),i}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){k.batch(()=>
vendor: 4,966 bytes, line 9
9{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>It(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>It(e,r)):t}notify(e){k.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){k.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){k.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ai=class{#t;#e;#r;#s;#n;#i;#a;#o;constructor(e={}){this.#t=e.queryCache||new xn,this.#e=e.mutationCache||new On,this.#r=e.defaultOptions||{},this.#s=new Map,this.#n=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=wt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#o=Ne.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#t.build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ne(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=this.#t.get(n.queryHash)?.state.data,o=nn(t,i);if(o!==void 0)return this.#t.build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return k.batch(()=>this.#t.findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;k.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#t;return k.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=k.batch(()=>this.#t.findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(H).catch(H)}invalidateQueries(e,t={}){return k.batch(()=>(this.#t.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=k.batch(()=>this.#t.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(H)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(H)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#t.build(this,t);return r.isStaleByTime(ne(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(H).catch(H)}fetchInfiniteQuery(e){return e.behavior=Le(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(H).catch(H)}ensureInfiniteQueryData(e){return e.behavior=Le(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ne.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#s.set(se(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],r={};return t.forEach(n=>{xe(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){this.#n.set(se(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#n.values()],r={};return t.forEach(n=>{xe(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ot(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===B&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},ar=C.createContext(void 0),Ie=e=>{const t=C.useContext(ar);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Di=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Jt.jsx(ar.Provider,{value:e,children:t})),ur=C.createContext(!1),cr=()=>C.useContext(ur);ur.Provider;function Sn(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
9var Cn=C.createContext(Sn()),lr=()=>C.useContext(Cn),fr=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},dr=e=>{C.useEffect(()=>{e.clearReset()},[e])},hr=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||Xt(r,[e.error,n])),xt=(e,t)=>t.state.data===void 0,pr=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},yr=(e,t)=>e.isLoading&&e.isFetching&&!t,lt=(e,t)=>e?.suspense&&t.isPending,$e=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function vr({queries:e,...t},r){const n=Ie(r),s=cr(),i=lr(),o=C.useMemo(()=>e.map(h=>{const S=n.defaultQueryOptions(h);return S._optimisticResults=s?"isRestoring":"optimistic",S}),[e,n,s]);o.forEach(h=>{pr(h),fr(h,i)}),dr(i);const[a]=C.useState(()=>new _n(n,o,t)),[u,c,l]=a.getOptimisticResult(o,t.combine),f=!s&&t.subscribed!==!1;C.useSyncExternalStore(C.useCallback(h=>f?a.subscribe(k.batchCalls(h)):H,[a,f]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),C.useEffect(()=>{a.setQueries(o,t)},[o,t,a]);const v=u.some((h,S)=>lt(o[S],h))?u.flatMap((h,S)=>{const R=o[S];if(R){const j=new Ee(n,R);if(lt(R,h))return $e(R,j,i);yr(h,s)&&$e(R,j,i)}return[]}):[];if(v.length>0)throw Promise.all(v);const b=u.find((h,S)=>{const R=o[S];return R&&hr({result:h,errorResetBoundary:i,throwOnError:R.throwOnError,query:n.getQueryCache().get(R.queryHash),suspense:R.suspense})});if(b?.error)throw b.error;return c(l())}function He(e,t,r){const n=cr(),s=lr(),i=Ie(r),o=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=n?"isRestoring":"optimistic",pr(o),fr(o,s),dr(s);const a=!i.getQueryCache().get(o.queryHash),[u]=C.useState(()=>new t(i,o)),c=u.getOptimisticResult(o),l=!n&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(f=>{const d=l?u.subscribe(k.batchCalls(f)):H;return u.updateResult(),d},[u,l]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),C.useEffect(()=>{u.setOptions(o)},[o,u]),lt(o,c))throw $e(o,u,s);if(hr({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(o,c),o.experimental_prefetchInRender&&!de&&yr(c,n)&&(a?$e(o,u,s):i.getQueryCache().get(o.queryHash)?.promise)?.catch(H).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?c:u.trackResult(c)}function Rn(e,t){return He(e,Ee,t)}function jn(e,t){return He({...e,enabled:!0,suspense:!0,throwOnError:xt,placeholderData:void 0},Ee,t)}function En(e,t){return He({...e,enabled:!0,suspense:!0,throwOnError:xt},ir,t)}function In(e,t){return vr({...e,queries:e.queries.map(r=>({...r,suspense:!0,throwOnError:xt,enabled:!0,placeholderData:void 0}))},t)}function Qn(e,t){const r=Ie(t);r.getQueryState(e.queryKey)||r.prefetchQuery(e)}function Mn(e,t){const r=Ie(t);r.getQueryState(e.queryKey)||r.prefetchInfiniteQuery(e)}function Tn(e,t){const r=Ie(t),[n]=C.useState(()=>new Pn(r,e));C.useEffect(()=>{n.setOptions(e)},[n,e]);const s=C.useSyncExternalStore(C.useCallback(o=>n.subscribe(k.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=C.useCallback((o,a)=>{n.mutate(o,a).catch(H)},[n]);if(s.error&&Xt(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}function qn(e,t){return He(e,ir,t)}function he(e){return!!e&&!Array.isArray(e)&&typeof e=="object"}const An=typeof Symbol=="function"&&!!Symbol.asyncIterator;function mr(e){return An&&he(e)&&Symbol.asyncIterator in e}var Dn=Object.create,br=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor,gr=Object.getOwnPropertyNames,kn=Object.getPrototypeOf,Un=Object.prototype.hasOwnProperty,Qe=(e,t)=>function(){return t||(0,e[gr(e)[0]])((t={exports:{}}).exports,t),t.exports},Nn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=gr(t),i=0,o=s.length,a;i<o;i++)a=s[i],!Un.call(e,a)&&a!==r&&br(e,a,{get:(u=>t[u]).bind(null,a),enumerable:!(n=Fn(t,a))||n.enumerable});return e},ze=(e,t,r)=>(r=e!=null?Dn(kn(e)):{},Nn(br(r,"default",{value:e,enumerable:!0}),e));const Or=()=>{},kt=e=>{Object.freeze&&Object.freeze(e)};function Pr(e,t,r){var n;const s=t.join(".");return(n=r[s])!==null&&n!==void 0||(r[s]=new Proxy(Or,{get(i,o){if(!(typeof o!="string"||o==="then"))return Pr(e,[...t,o],r)},apply(i,o,a){const u=t[t.length-1];let c={args:a,path:t};return u==="call"?c={args:a.length>=2?[a[1]]:[],path:t.slice(0,-1)}:u==="apply"&&(c={args:a.length>=2?a[1]:[],path:t.slice(0,-1)}),kt(c.args),kt(c.path),e(c)}})),r[s]}const Be=e=>Pr(e,[],Object.create(null)),St=e=>new Proxy(Or,{get(t,r){if(r!=="then")return e(r)}});var wr=Qe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function r(n){"@babel/helpers - typeof";return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s}
9,t.exports.__esModule=!0,t.exports.default=t.exports,r(n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ln=Qe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var r=wr().default;function n(s,i){if(r(s)!="object"||!s)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var a=o.call(s,i||"default");if(r(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),$n=Qe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var r=wr().default,n=Ln();function s(i){var o=n(i,"string");return r(o)=="symbol"?o:o+""}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),_r=Qe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var r=$n();function n(s,i,o){return(i=r(i))in s?Object.defineProperty(s,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):s[i]=o,s}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ct=Qe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var r=_r();function n(i,o){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),a.push.apply(a,u)}return a}function s(i){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?n(Object(a),!0).forEach(function(u){r(i,u,a[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(a,u))})}return i}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}});ze(Ct());ze(_r());var qe=ze(Ct());function Kn(e,t){if("error"in e){const n=t.deserialize(e.error);return{ok:!1,error:(0,qe.default)((0,qe.default)({},e),{},{error:n})}}return{ok:!0,result:(0,qe.default)((0,qe.default)({},e.result),(!e.result.type||e.result.type==="data")&&{type:"data",data:t.deserialize(e.result.data)})}}var Ze=class extends Error{constructor(){super("Unable to transform response from server")}};function Hn(e,t){let r;try{r=Kn(e,t)}catch{throw new Ze}if(!r.ok&&(!he(r.error.error)||typeof r.error.error.code!="number"))throw new Ze;if(r.ok&&!he(r.result))throw new Ze;return r}ze(Ct());function Ge(e){const t={subscribe(r){let n=null,s=!1,i=!1,o=!1;function a(){if(n===null){o=!0;return}i||(i=!0,typeof n=="function"?n():n&&n.unsubscribe())}return n=e({next(u){var c;s||(c=r.next)===null||c===void 0||c.call(r,u)},error(u){var c;s||(s=!0,(c=r.error)===null||c===void 0||c.call(r,u),a())},complete(){var u;s||(s=!0,(u=r.complete)===null||u===void 0||u.call(r),a())}}),o&&a(),{unsubscribe:a}},pipe(...r){return r.reduce(zn,t)}};return t}function zn(e,t){return t(e)}function Bn(e){const t=new AbortController;return new Promise((n,s)=>{let i=!1;function o(){i||(i=!0,a.unsubscribe())}t.signal.addEventListener("abort",()=>{s(t.signal.reason)});const a=e.subscribe({next(u){i=!0,n(u),o()},error(u){s(u)},complete(){t.abort(),o()}})})}var Gn=Object.create,xr=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,Sr=Object.getOwnPropertyNames,Vn=Object.getPrototypeOf,Jn=Object.prototype.hasOwnProperty,oe=(e,t)=>function(){return t||(0,e[Sr(e)[0]])((t={exports:{}}).exports,t),t.exports},Yn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=Sr(t),i=0,o=s.length,a;i<o;i++)a=s[i],!Jn.call(e,a)&&a!==r&&xr(e,a,{get:(u=>t[u]).bind(null,a),enumerable:!(n=Wn(t,a))||n.enumerable});return e},ye=(e,t,r)=>(r=e!=null?Gn(Vn(e)):{},Yn(t||!e||!e.__esModule?xr(r,"default",{value:e,enumerable:!0}):r,e)),Zn=oe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(e,t){function r(n,s){if(n==null)return{};var i={};for(var o in n)if({}
9.hasOwnProperty.call(n,o)){if(s.includes(o))continue;i[o]=n[o]}return i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Xn=oe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(e,t){var r=Zn();function n(s,i){if(s==null)return{};var o,a,u=r(s,i);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(s);for(a=0;a<c.length;a++)o=c[a],i.includes(o)||{}.propertyIsEnumerable.call(s,o)&&(u[o]=s[o])}return u}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Cr=oe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function r(n){"@babel/helpers - typeof";return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},t.exports.__esModule=!0,t.exports.default=t.exports,r(n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),es=oe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var r=Cr().default;function n(s,i){if(r(s)!="object"||!s)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var a=o.call(s,i||"default");if(r(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),ts=oe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var r=Cr().default,n=es();function s(i){var o=n(i,"string");return r(o)=="symbol"?o:o+""}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),rs=oe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var r=ts();function n(s,i,o){return(i=r(i))in s?Object.defineProperty(s,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):s[i]=o,s}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Me=oe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var r=rs();function n(i,o){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),a.push.apply(a,u)}return a}function s(i){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?n(Object(a),!0).forEach(function(u){r(i,u,a[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(a,u))})}return i}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),ns=ye(Xn(),1),Ut=ye(Me(),1);const ss=["cursor","direction"];function Z(e,t,r){const n=e.flatMap(s=>s.split("."));if(!t&&(!r||r==="any"))return n.length?[n]:[];if(r==="infinite"&&he(t)&&("direction"in t||"cursor"in t)){const{cursor:s,direction:i}=t,o=(0,ns.default)(t,ss);return[n,{input:o,type:"infinite"}]}return[n,(0,Ut.default)((0,Ut.default)({},typeof t<"u"&&t!==B&&{input:t}),r&&r!=="any"&&{type:r})]}function Fe(e){return Z(e,void 0,"any")}var is=Object.create,Rr=Object.defineProperty,os=Object.getOwnPropertyDescriptor,jr=Object.getOwnPropertyNames,as=Object.getPrototypeOf,us=Object.prototype.hasOwnProperty,X=(e,t)=>function(){return t||(0,e[jr(e)[0]])((t={exports:{}}).exports,t),t.exports},cs=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=jr(t),i=0,o=s.length,a;i<o;i++)a=s[i],!us.call(e,a)&&a!==r&&Rr(e,a,{get:(u=>t[u]).bind(null,a),enumerable:!(n=os(t,a))||n.enumerable});return e},U=(e,t,r)=>(r=e!=null?is(as(e)):{},cs(t||!e||!e.__esModule?Rr(r,"default",{value:e,enumerable:!0}):r,e)),Er=X({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function r(n){"@babel/helpers - typeof";return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s}
9,t.exports.__esModule=!0,t.exports.default=t.exports,r(n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),ls=X({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var r=Er().default;function n(s,i){if(r(s)!="object"||!s)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var a=o.call(s,i||"default");if(r(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),fs=X({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var r=Er().default,n=ls();function s(i){var o=n(i,"string");return r(o)=="symbol"?o:o+""}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),ve=X({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var r=fs();function n(s,i,o){return(i=r(i))in s?Object.defineProperty(s,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):s[i]=o,s}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),V=X({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var r=ve();function n(i,o){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),a.push.apply(a,u)}return a}function s(i){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?n(Object(a),!0).forEach(function(u){r(i,u,a[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(a,u))})}return i}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}});function ds(e){return t=>{let r=0,n=null;const s=[];function i(){n||(n=t.subscribe({next(a){for(const c of s){var u;(u=c.next)===null||u===void 0||u.call(c,a)}},error(a){for(const c of s){var u;(u=c.error)===null||u===void 0||u.call(c,a)}},complete(){for(const u of s){var a;(a=u.complete)===null||a===void 0||a.call(u)}}}))}function o(){if(r===0&&n){const a=n;n=null,a.unsubscribe()}}return Ge(a=>(r++,s.push(a),i(),{unsubscribe(){r--,o();const u=s.findIndex(c=>c===a);u>-1&&s.splice(u,1)}}))}}function hs(e){let t=e;const r=[],n=o=>{t!==void 0&&o.next(t),r.push(o)},s=o=>{r.splice(r.indexOf(o),1)},i=Ge(o=>(n(o),()=>{s(o)}));return i.next=o=>{if(t!==o){t=o;for(const a of r)a.next(o)}},i.get=()=>t,i}function ps(e){return Ge(t=>{function r(s=0,i=e.op){const o=e.links[s];if(!o)throw new Error("No more links to execute - did you forget to add an ending link?");return o({op:i,next(u){return r(s+1,u)}})}return r().subscribe(t)})}var Ae=U(ve(),1),me=U(V(),1);function ys(e){return e instanceof Ke}function vs(e){return he(e)&&he(e.error)&&typeof e.error.code=="number"&&typeof e.error.message=="string"}function ms(e,t){return typeof e=="string"?e:he(e)&&typeof e.message=="string"?e.message:t}var Ke=class ke extends Error{constructor(t,r){var n,s;const i=r?.cause;super(t,{cause:i}),(0,Ae.default)(this,"cause",void 0),(0,Ae.default)(this,"shape",void 0),(0,Ae.default)(this,"data",void 0),(0,Ae.default)(this,"meta",void 0),this.meta=r?.meta,this.cause=i,this.shape=r==null||(n=r.result)===null||n===void 0?void 0:n.error,this.data=r==null||(s=r.result)===null||s===void 0?void 0:s.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,ke.prototype)}static from(t,r={}){const n=t;return ys(n)?(r.meta&&(n.meta=(0,me.default)((0,me.default)({},n.meta),r.meta)),n):vs(n)?new ke(n.error.message,(0,me.default)((0,me.default)({},r),{},{result:n})):new ke(ms(n,"Unknown error"),(0,me.default)((0,me.default)({},r),{},{cause:n}))}};function bs(e){const t=e;return t?"input"in t?t:{input:t,output:t}:{input:{serialize:r=>r,deserialize:r=>r},output:{serialize:r=>r,deserialize:r=>r}}}const Nt=e=>typeof e=="function";function gs(e){if(e)return e;if(typeof window<"u"&&Nt(window.fetch))return window.fetch;if(typeof globalThis<"u"&&Nt(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}var we=U(V());function Os(e){return{url:e.url.toString(),fetch:e.fetch,transformer:bs(e.transformer),methodOverride:e.methodOverride}}function Ps(e){const t={};for(let r=0;r<e.length;r++){const n=e[r];t[r]=n}return t}const ws={query:"GET",mutation:"POST",subscription:"PATCH"};function Ir(e){return"input"in e?e.transformer.input.serialize(e.input):Ps(e.inputs.map(t=>e.transformer.input.serialize(t)))}const Qr=e=>{const t=e.url.split("?");let n=t[0].replace(/\/$/,"")+"/"+e.path;const s=[];if(t[1]&&s.push(t[1]),"inputs"in e&&s.push("batch=1"),e.type==="query"||e.type==="subscription"){const i=Ir(e);i!==void 0&&e.methodOverride!=="POST"&&s.push(`input=${encodeURIComponent(JSON.stringify(i))}`)}return s.length&&(n+="?"+s.join("&")),n},_s=e=>{if(e.type==="query"&&e.methodOverride!=="POST")return;const t=Ir(e);return t!==void 0?JSON.stringify(t):void 0},xs=e=>js((0,we.default)((0,we.default)({},e),{},{contentTypeHeader:"application/json",getUrl:Qr,getBody:_s}));
9var Ss=class extends Error{constructor(){const e="AbortError";super(e),this.name=e,this.message=e}};const Cs=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)===null||t===void 0||t.call(e),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new Ss};async function Rs(e){var t;Cs(e.signal);const r=e.getUrl(e),n=e.getBody(e),s=(t=e.methodOverride)!==null&&t!==void 0?t:ws[e.type],i=await(async()=>{const a=await e.headers();return Symbol.iterator in a?Object.fromEntries(a):a})(),o=(0,we.default)((0,we.default)((0,we.default)({},e.contentTypeHeader&&s!=="GET"?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0),i);return gs(e.fetch)(r,{method:s,signal:e.signal,body:n,headers:o})}async function js(e){const t={},r=await Rs(e);t.response=r;const n=await r.json();return t.responseJSON=n,{json:n,meta:t}}U(V(),1);const Lt=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function $t(e){let t=null,r=null;const n=()=>{clearTimeout(r),r=null,t=null};function s(a){const u=[[]];let c=0;for(;;){const d=a[c];if(!d)break;const v=u[u.length-1];if(d.aborted){var l;(l=d.reject)===null||l===void 0||l.call(d,new Error("Aborted")),c++;continue}if(e.validate(v.concat(d).map(h=>h.key))){v.push(d),c++;continue}if(v.length===0){var f;(f=d.reject)===null||f===void 0||f.call(d,new Error("Input is too big for a single dispatch")),c++;continue}u.push([])}return u}function i(){const a=s(t);n();for(const u of a){if(!u.length)continue;const c={items:u};for(const f of u)f.batch=c;e.fetch(c.items.map(f=>f.key)).then(async f=>{await Promise.all(f.map(async(v,b)=>{const h=c.items[b];try{var S;const j=await Promise.resolve(v);(S=h.resolve)===null||S===void 0||S.call(h,j)}catch(j){var R;(R=h.reject)===null||R===void 0||R.call(h,j)}h.batch=null,h.reject=null,h.resolve=null}));for(const v of c.items){var d;(d=v.reject)===null||d===void 0||d.call(v,new Error("Missing result")),v.batch=null}}).catch(f=>{for(const v of c.items){var d;(d=v.reject)===null||d===void 0||d.call(v,f),v.batch=null}})}}function o(a){var u;const c={aborted:!1,key:a,batch:null,resolve:Lt,reject:Lt},l=new Promise((f,d)=>{var v;c.reject=d,c.resolve=f,(v=t)!==null&&v!==void 0||(t=[]),t.push(c)});return(u=r)!==null&&u!==void 0||(r=setTimeout(i)),l}return{load:o}}function Es(...e){const t=new AbortController,r=e.length;let n=0;const s=()=>{++n===r&&t.abort()};for(const i of e)i?.aborted?s():i?.addEventListener("abort",s,{once:!0});return t.signal}var De=U(V(),1);function Fi(e){var t,r;const n=Os(e),s=(t=e.maxURLLength)!==null&&t!==void 0?t:1/0,i=(r=e.maxItems)!==null&&r!==void 0?r:1/0;return()=>{const o=l=>({validate(f){if(s===1/0&&i===1/0)return!0;if(f.length>i)return!1;const d=f.map(h=>h.path).join(","),v=f.map(h=>h.input);return Qr((0,De.default)((0,De.default)({},n),{},{type:l,path:d,inputs:v,signal:null})).length<=s},async fetch(f){const d=f.map(j=>j.path).join(","),v=f.map(j=>j.input),b=Es(...f.map(j=>j.signal)),h=await xs((0,De.default)((0,De.default)({},n),{},{path:d,inputs:v,type:l,headers(){return e.headers?typeof e.headers=="function"?e.headers({opList:f}):e.headers:{}},signal:b}));return(Array.isArray(h.json)?h.json:f.map(()=>h.json)).map(j=>({meta:h.meta,json:j}))}}),a=$t(o("query")),u=$t(o("mutation")),c={query:a,mutation:u};return({op:l})=>Ge(f=>{/* istanbul ignore if -- @preserve */if(l.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const v=c[l.type].load(l);let b;return v.then(h=>{b=h;const S=Hn(h.json,n.transformer.output);if(!S.ok){f.error(Ke.from(S.error,{meta:h.meta}));return}f.next({context:h.meta,result:S.result}),f.complete()}).catch(h=>{f.error(Ke.from(h,{meta:b?.meta}))}),()=>{}})}}U(V(),1);const Mr=(e,...t)=>typeof e=="function"?e(...t):e;U(ve(),1);function Is(){let e,t;return{promise:new Promise((n,s)=>{e=n,t=s}),resolve:e,reject:t}}async function Qs(e){const t=await Mr(e.url);if(!e.connectionParams)return t;const n=`${t.includes("?")?"&":"?"}connectionParams=1`;return t+n}async function Ms(e){const t={method:"connectionParams",data:await Mr(e)};return JSON.stringify(t)}U(ve(),1);var ce=U(ve(),1);function Ts(e){const{promise:t,resolve:r,reject:n}=Is();return e.addEventListener("open",()=>{e.removeEventListener("error",n),r()}),e.addEventListener("error",n),t}function qs(e,{intervalMs:t,pongTimeoutMs:r}){let n,s;function i(){n=setTimeout(()=>{e.send("PING"),s=setTimeout(()=>{e.close()},r)},t)}function o(){clearTimeout(n),i()}function a(){clearTimeout(s),o()}e.addEventListener("open",i),e.addEventListener("message",({data:u})=>{clearTimeout(n),i(),u==="PONG"&&a()}),e.addEventListener("close",()=>{clearTimeout(n),clearTimeout(s)})}var As=class ft{constructor(t){var r;if((0,ce.default)(this,"id",++ft.connectCount),(0,ce.default)(this,"WebSocketPonyfill",void 0),(0,ce.default)(this,"urlOptions",void 0),(0,ce.default)(this,"keepAliveOpts",void 0),(0,ce.default)(this,"wsObservable",hs(null)),(0,ce.default)(this,"openPromise",null),this.WebSocketPonyfill=(r=t.WebSocketPonyfill)!==null&&r!==void 0?r:WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive}get ws(){return this.wsObservable.get()}set ws(t){this.wsObservable.next(t)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++ft.connectCount;const r=Qs(t.urlOptions).then(n=>new t.WebSocketPonyfill(n));t.openPromise=r.then(async n=>{t.ws=n,n.addEventListener("message",function({data:s}){s==="PING"&&this.send("PONG")}),t.keepAliveOpts.enabled&&qs(n,t.keepAliveOpts),n.addEventListener("close",()=>{t.ws===n&&(t.ws=null)}),await Ts(n),t.urlOptions.connectionParams&&n.send(await Ms(t.urlOptions.connectionParams))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var t=this;try{await t.openPromise}finally{var r;(r=t.ws)===null||r===void 0||r.close()}}};(0,ce.default)(As,"connectCount",0);U(ve(),1);U(V(),1);var Xe=U(ve(),1),Kt=U(V(),1),We=class{constructor(e){(0,Xe.default)(this,"links",void 0),(0,Xe.default)(this,"runtime",void 0),(0,Xe.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(t=>t(this.runtime))}$request(e){var t;return ps({links:this.links,op:(0,Kt.default)((0,Kt.default)({},e),{},{context:(t=e.context)!==null&&t!==void 0?t:{},id:++this.requestId})}).pipe(ds())}async requestAsPromise(e){var t=this;try{const r=t.$request(e);return(await Bn(r)).result.data}catch(r){throw Ke.from(r)}}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,signal:r.signal}).subscribe({next(s){switch(s.result.type){case"state":{var i;(i=r.onConnectionStateChange)===null||i===void 0||i.call(r,s.result);break}case"started":{var o;(o=r.onStarted)===null||o===void 0||o.call(r,{context:s.context});break}case"stopped":{var a;(a=r.onStopped)===null||a===void 0||a.call(r);break}case"data":case void 0:{var u;(u=r.onData)===null||u===void 0||u.call(r,s.result.data);break}}},error(s){var i;(i=r.onError)===null||i===void 0||i.call(r,s)},complete(){var s;(s=r.onComplete)===null||s===void 0||s.call(r)}})}};const Tr=Symbol.for("trpc_untypedClient"),Ds={query:"query",mutate:"mutation",subscribe:"subscription"},Fs=e=>Ds[e];function qr(e){const t=Be(({path:r,args:n})=>{const s=[...r],i=Fs(s.pop()),o=s.join(".");return e[i](o,...n)});return St(r=>r===Tr?e:t[r])}function ks(e){const t=new We(e);return qr(t)}function Rt(e){return e[Tr]}U(V(),1);U(V(),1);var Us=X({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function r(s){var i,o,a,u=2;for(typeof Symbol<"u"&&(o=Symbol.asyncIterator,a=Symbol.iterator);u--;){if(o&&(i=s[o])!=null)return i.call(s);if(a&&(i=s[a])!=null)return new n(i.call(s));o="@@asyncIterator",a="@@iterator"}throw new TypeError("Object is not async iterable")}function n(s){function i(o){if(Object(o)!==o)return Promise.reject(new TypeError(o+" is not an object."));var a=o.done;return Promise.resolve(o.value).then(function(u){return{value:u,done:a}})}return n=function(a){this.s=a,this.n=a.next},n.prototype={s:null,n:null,next:function(){return i(this.n.apply(this.s,arguments))},return:function(a){var u=this.s.return;return u===void 0?Promise.resolve({value:a,done:!0}):i(u.apply(this.s,arguments))},throw:function(a){var u=this.s.return;return u===void 0?Promise.reject(a):i(u.apply(this.s,arguments))}},new n(s)}
9t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});U(Us(),1);U(V(),1);var Ns=X({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function r(){var n=typeof SuppressedError=="function"?SuppressedError:function(a,u){var c=Error();return c.name="SuppressedError",c.error=a,c.suppressed=u,c},s={},i=[];function o(a,u){if(u!=null){if(Object(u)!==u)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(a)var c=u[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(c===void 0&&(c=u[Symbol.dispose||Symbol.for("Symbol.dispose")],a))var l=c;if(typeof c!="function")throw new TypeError("Object is not disposable.");l&&(c=function(){try{l.call(u)}catch(d){return Promise.reject(d)}}),i.push({v:u,d:c,a})}else a&&i.push({d:u,a});return u}return{e:s,u:o.bind(null,!1),a:o.bind(null,!0),d:function(){var u,c=this.e,l=0;function f(){for(;u=i.pop();)try{if(!u.a&&l===1)return l=0,i.push(u),Promise.resolve().then(f);if(u.d){var v=u.d.call(u.v);if(u.a)return l|=2,Promise.resolve(v).then(f,d)}else l|=1}catch(b){return d(b)}if(l===1)return c!==s?Promise.reject(c):Promise.resolve();if(c!==s)throw c}function d(v){return c=c!==s?new n(v,c):v,f()}return f()}}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ar=X({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function r(n,s){this.v=n,this.k=s}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ls=X({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var r=Ar();function n(s){return new r(s,0)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),$s=X({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var r=Ar();function n(i){return function(){return new s(i.apply(this,arguments))}}function s(i){var o,a;function u(l,f){try{var d=i[l](f),v=d.value,b=v instanceof r;Promise.resolve(b?v.v:v).then(function(h){if(b){var S=l==="return"?"return":"next";if(!v.k||h.done)return u(S,h);h=i[S](h).value}c(d.done?"return":"normal",h)},function(h){u("throw",h)})}catch(h){c("throw",h)}}function c(l,f){switch(l){case"return":o.resolve({value:f,done:!0});break;case"throw":o.reject(f);break;default:o.resolve({value:f,done:!1})}(o=o.next)?u(o.key,o.arg):a=null}this._invoke=function(l,f){return new Promise(function(d,v){var b={key:l,arg:f,resolve:d,reject:v,next:null};a?a=a.next=b:(o=a=b,u(l,f))})},typeof i.return!="function"&&(this.return=void 0)}s.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},s.prototype.next=function(i){return this._invoke("next",i)},s.prototype.throw=function(i){return this._invoke("throw",i)},s.prototype.return=function(i){return this._invoke("return",i)},t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}});U(Ns(),1);U(Ls(),1);U($s(),1);U(V(),1);function Ks(e){return Be(({path:t,args:r})=>{var n;const s=[...t],i=s.pop();if(i==="useMutation")return e[i](s,...r);if(i==="_def")return{path:s};const[o,...a]=r,u=(n=a[0])!==null&&n!==void 0?n:{};return e[i](s,o,u)})}var et;const Hs=["client","ssrContext","ssrState","abortOnUnmount"],zs=(et=C.createContext)===null||et===void 0?void 0:et.call(Yr,null),Bs=e=>{switch(e){case"queryOptions":case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"infiniteQueryOptions":case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"setMutationDefaults":case"getMutationDefaults":case"isMutating":case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};function Gs(e){return Be(t=>{const r=[...t.path],n=r.pop(),s=[...t.args],i=s.shift(),o=Bs(n),a=Z(r,i,o);return{infiniteQueryOptions:()=>e.infiniteQueryOptions(r,a,s[0]),queryOptions:()=>e.queryOptions(r,a,...s),fetch:()=>e.fetchQuery(a,...s),fetchInfinite:()=>e.fetchInfiniteQuery(a,s[0]),prefetch:()=>e.prefetchQuery(a,...s),prefetchInfinite:()=>e.prefetchInfiniteQuery(a,s[0]),ensureData:()=>e.ensureQueryData(a,...s),invalidate:()=>e.invalidateQueries(a,...s),reset:()=>e.resetQueries(a,...s),refetch:()=>e.refetchQueries(a,...s),cancel:()=>e.cancelQuery(a,...s),setData:()=>{e.setQueryData(a,s[0],s[1])},setQueriesData:()=>e.setQueriesData(a,s[0],s[1],s[2]),setInfiniteData:()=>{e.setInfiniteQueryData(a,s[0],s[1])},getData:()=>e.getQueryData(a),getInfiniteData:()=>e.getInfiniteQueryData(a),setMutationDefaults:()=>e.setMutationDefaults(Fe(r),i),getMutationDefaults:()=>e.getMutationDefaults(Fe(r)),isMutating:()=>e.isMutating({mutationKey:Fe(r)})}[n]()})}function Ws(e){const t=qr(e.client),r=Gs(e);return St(n=>{const s=n;return s==="client"?t:Hs.includes(s)?e[s]:r[n]})}var Vs=ye(Me(),1);function Ht(e){const t=e instanceof We?e:Rt(e);return Be(r=>{const n=r.path,s=n.join("."),[i,o]=r.args;return(0,Vs.default)({queryKey:Z(n,i,"query"),queryFn:()=>t.query(s,i,o?.trpc)},o)})}var tt=ye(Me(),1);function z(e,t,r){var n;const s=e[0];let i=(n=e[1])===null||n===void 0?void 0:n.input;if(r){var o;i=(0,tt.default)((0,tt.default)((0,tt.default)({},(o=i)!==null&&o!==void 0?o:{}),r.pageParam?{cursor:r.pageParam}:{}),{},{direction:r.direction})}return[s.join("."),i,t?.trpc]}var Js=oe({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function r(s){var i,o,a,u=2;for(typeof Symbol<"u"&&(o=Symbol.asyncIterator,a=Symbol.iterator);u--;){if(o&&(i=s[o])!=null)return i.call(s);if(a&&(i=s[a])!=null)return new n(i.call(s));o="@@asyncIterator",a="@@iterator"}throw new TypeError("Object is not async iterable")}function n(s){function i(o){if(Object(o)!==o)return Promise.reject(new TypeError(o+" is not an object."));var a=o.done;return Promise.resolve(o.value).then(function(u){return{value:u,done:a}})}return n=function(a){this.s=a,this.n=a.next},n.prototype={s:null,n:null,next:function(){return i(this.n.apply(this.s,arguments))},return:function(a){var u=this.s.return;return u===void 0?Promise.resolve({value:a,done:!0}):i(u.apply(this.s,arguments))},throw:function(a){var u=this.s.return;return u===void 0?Promise.reject(a):i(u.apply(this.s,arguments))}},new n(s)}
9t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ys=ye(Js(),1);function dt(e){return{path:e.path.join(".")}}function Pe(e){const t=dt(e);return C.useMemo(()=>t,[t])}async function Dr(e,t,r){const s=t.getQueryCache().build(t,{queryKey:r});s.setState({data:[],status:"success"});const i=[];var o=!1,a=!1,u;try{for(var c=(0,Ys.default)(e),l;o=!(l=await c.next()).done;o=!1){const f=l.value;i.push(f),s.setState({data:[...i]})}}catch(f){a=!0,u=f}finally{try{o&&c.return!=null&&await c.return()}finally{if(a)throw u}}return i}var E=ye(Me(),1);function Zs(e){const{client:t,queryClient:r}=e,n=t instanceof We?t:Rt(t);return{infiniteQueryOptions:(s,i,o)=>{var a,u;const c=((a=i[1])===null||a===void 0?void 0:a.input)===B,l=async f=>{var d;const v=(0,E.default)((0,E.default)({},o),{},{trpc:(0,E.default)((0,E.default)({},o?.trpc),!(o==null||(d=o.trpc)===null||d===void 0)&&d.abortOnUnmount?{signal:f.signal}:{signal:null})});return await n.query(...z(i,v,{direction:f.direction,pageParam:f.pageParam}))};return Object.assign((0,E.default)((0,E.default)({},o),{},{initialData:o?.initialData,queryKey:i,queryFn:c?B:l,initialPageParam:(u=o?.initialCursor)!==null&&u!==void 0?u:null}),{trpc:dt({path:s})})},queryOptions:(s,i,o)=>{var a;const u=((a=i[1])===null||a===void 0?void 0:a.input)===B,c=async l=>{var f;const d=(0,E.default)((0,E.default)({},o),{},{trpc:(0,E.default)((0,E.default)({},o?.trpc),!(o==null||(f=o.trpc)===null||f===void 0)&&f.abortOnUnmount?{signal:l.signal}:{signal:null})}),v=await n.query(...z(i,d));return mr(v)?Dr(v,r,i):v};return Object.assign((0,E.default)((0,E.default)({},o),{},{initialData:o?.initialData,queryKey:i,queryFn:u?B:c}),{trpc:dt({path:s})})},fetchQuery:(s,i)=>r.fetchQuery((0,E.default)((0,E.default)({},i),{},{queryKey:s,queryFn:()=>n.query(...z(s,i))})),fetchInfiniteQuery:(s,i)=>{var o;return r.fetchInfiniteQuery((0,E.default)((0,E.default)({},i),{},{queryKey:s,queryFn:({pageParam:a,direction:u})=>n.query(...z(s,i,{pageParam:a,direction:u})),initialPageParam:(o=i?.initialCursor)!==null&&o!==void 0?o:null}))},prefetchQuery:(s,i)=>r.prefetchQuery((0,E.default)((0,E.default)({},i),{},{queryKey:s,queryFn:()=>n.query(...z(s,i))})),prefetchInfiniteQuery:(s,i)=>{var o;return r.prefetchInfiniteQuery((0,E.default)((0,E.default)({},i),{},{queryKey:s,queryFn:({pageParam:a,direction:u})=>n.query(...z(s,i,{pageParam:a,direction:u})),initialPageParam:(o=i?.initialCursor)!==null&&o!==void 0?o:null}))},ensureQueryData:(s,i)=>r.ensureQueryData((0,E.default)((0,E.default)({},i),{},{queryKey:s,queryFn:()=>n.query(...z(s,i))})),invalidateQueries:(s,i,o)=>r.invalidateQueries((0,E.default)((0,E.default)({},i),{},{queryKey:s}),o),resetQueries:(s,i,o)=>r.resetQueries((0,E.default)((0,E.default)({},i),{},{queryKey:s}),o),refetchQueries:(s,i,o)=>r.refetchQueries((0,E.default)((0,E.default)({},i),{},{queryKey:s}),o),cancelQuery:(s,i)=>r.cancelQueries({queryKey:s},i),setQueryData:(s,i,o)=>r.setQueryData(s,i,o),setQueriesData:(s,i,o,a)=>r.setQueriesData((0,E.default)((0,E.default)({},i),{},{queryKey:s}),o,a),getQueryData:s=>r.getQueryData(s),setInfiniteQueryData:(s,i,o)=>r.setQueryData(s,i,o),getInfiniteQueryData:s=>r.getQueryData(s),setMutationDefaults:(s,i)=>{const o=s[0],a=u=>n.mutation(...z([o,{input:u}],e));return r.setMutationDefaults(s,typeof i=="function"?i({canonicalMutationFn:a}):i)},getMutationDefaults:s=>r.getMutationDefaults(s),isMutating:s=>r.isMutating((0,E.default)((0,E.default)({},s),{},{exact:!0}))}}var y=ye(Me());const zt=(e,t)=>new Proxy(e,{get(n,s){return t(s),n[s]}});function Xs(e){var t,r;const n=(t=void 0)!==null&&t!==void 0?t:O=>O.originalFn(),s=(r=void 0)!==null&&r!==void 0?r:zs,i=ks,o=O=>{var g;const{abortOnUnmount:p=!1,queryClient:m,ssrContext:w}=O,[P,_]=C.useState((g=O.ssrState)!==null&&g!==void 0?g:!1),x=O.client instanceof We?O.client:Rt(O.client),M=C.useMemo(()=>Zs({client:x,queryClient:m}),[x,m]),I=C.useMemo(()=>(0,y.default)({abortOnUnmount:p,queryClient:m,client:x,ssrContext:w??null,ssrState:P},M),[p,x,M,m,w,P]);return C.useEffect(()=>{_(q=>q?"mounted":!1)},[]),Jt.jsx(s.Provider,{value:I,children:O.children})};function a(){const O=C.useContext(s);if(!O)throw new Error("Unable to find tRPC Context. Did you forget to wrap your Ap
9p inside `withTRPC` HoC?");return O}function u(O,g){var p;const{queryClient:m,ssrState:w}=a();return w&&w!=="mounted"&&((p=m.getQueryCache().find({queryKey:O}))===null||p===void 0?void 0:p.state.status)==="error"?(0,y.default)({retryOnMount:!1},g):g}function c(O,g,p){var m,w,P,_,x;const M=a(),{abortOnUnmount:I,client:q,ssrState:Q,queryClient:D,prefetchQuery:F}=M,L=Z(O,g,"query"),ee=D.getQueryDefaults(L),N=g===B;typeof window>"u"&&Q==="prepass"&&(p==null||(m=p.trpc)===null||m===void 0?void 0:m.ssr)!==!1&&((w=p?.enabled)!==null&&w!==void 0?w:ee?.enabled)!==!1&&!N&&!D.getQueryCache().find({queryKey:L})&&F(L,p);const G=u(L,(0,y.default)((0,y.default)({},ee),p)),A=(P=(_=p==null||(x=p.trpc)===null||x===void 0?void 0:x.abortOnUnmount)!==null&&_!==void 0?_:void 0)!==null&&P!==void 0?P:I,T=Rn((0,y.default)((0,y.default)({},G),{},{queryKey:L,queryFn:N?g:async $=>{const ue=(0,y.default)((0,y.default)({},G),{},{trpc:(0,y.default)((0,y.default)({},G?.trpc),A?{signal:$.signal}:{signal:null})}),Je=await q.query(...z(L,ue));return mr(Je)?Dr(Je,D,L):Je}}),D);return T.trpc=Pe({path:O}),T}function l(O,g,p){var m,w,P;const _=a(),x=Z(O,g,"query"),M=g===B,I=(m=(w=p==null||(P=p.trpc)===null||P===void 0?void 0:P.abortOnUnmount)!==null&&w!==void 0?w:void 0)!==null&&m!==void 0?m:_.abortOnUnmount;Qn((0,y.default)((0,y.default)({},p),{},{queryKey:x,queryFn:M?g:q=>{const Q={trpc:(0,y.default)((0,y.default)({},p?.trpc),I?{signal:q.signal}:{})};return _.client.query(...z(x,Q))}}))}function f(O,g,p){var m,w,P;const _=a(),x=Z(O,g,"query"),M=(m=(w=p==null||(P=p.trpc)===null||P===void 0?void 0:P.abortOnUnmount)!==null&&w!==void 0?w:void 0)!==null&&m!==void 0?m:_.abortOnUnmount,I=jn((0,y.default)((0,y.default)({},p),{},{queryKey:x,queryFn:q=>{const Q=(0,y.default)((0,y.default)({},p),{},{trpc:(0,y.default)((0,y.default)({},p?.trpc),M?{signal:q.signal}:{signal:null})});return _.client.query(...z(x,Q))}}),_.queryClient);return I.trpc=Pe({path:O}),[I.data,I]}function d(O,g){const{client:p,queryClient:m}=a(),w=Fe(O),P=m.defaultMutationOptions(m.getMutationDefaults(w)),_=Tn((0,y.default)((0,y.default)({},g),{},{mutationKey:w,mutationFn:x=>p.mutation(...z([O,{input:x}],g)),onSuccess(...x){var M,I;return n({originalFn:()=>{var Q,D,F;return(Q=g==null||(D=g.onSuccess)===null||D===void 0?void 0:D.call(g,...x))!==null&&Q!==void 0?Q:P==null||(F=P.onSuccess)===null||F===void 0?void 0:F.call(P,...x)},queryClient:m,meta:(M=(I=g?.meta)!==null&&I!==void 0?I:P?.meta)!==null&&M!==void 0?M:{}})}}),m);return _.trpc=Pe({path:O}),_}const v={data:void 0,error:null,status:"idle"},b={data:void 0,error:null,status:"connecting"};/* istanbul ignore next -- @preserve */function h(O,g,p){var m;const w=(m=p?.enabled)!==null&&m!==void 0?m:g!==B,P=se(Z(O,g,"any")),{client:_}=a(),x=C.useRef(p);C.useEffect(()=>{x.current=p});const[M]=C.useState(new Set([])),I=C.useCallback(N=>{M.add(N)},[M]),q=C.useRef(null),Q=C.useCallback(N=>{const G=F.current,A=F.current=N(G);let T=!1;for(const $ of M)if(G[$]!==A[$]){T=!0;break}T&&ee(zt(A,I))},[I,M]),D=C.useCallback(()=>{var N;if((N=q.current)===null||N===void 0||N.unsubscribe(),!w){Q(()=>(0,y.default)((0,y.default)({},v),{},{reset:D}));return}Q(()=>(0,y.default)((0,y.default)({},b),{},{reset:D}));const G=_.subscription(O.join("."),g??void 0,{onStarted:()=>{var A,T;(A=(T=x.current).onStarted)===null||A===void 0||A.call(T),Q($=>(0,y.default)((0,y.default)({},$),{},{status:"pending",error:null}))},onData:A=>{var T,$;(T=($=x.current).onData)===null||T===void 0||T.call($,A),Q(ue=>(0,y.default)((0,y.default)({},ue),{},{status:"pending",data:A,error:null}))},onError:A=>{var T,$;(T=($=x.current).onError)===null||T===void 0||T.call($,A),Q(ue=>(0,y.default)((0,y.default)({},ue),{},{status:"error",error:A}))},onConnectionStateChange:A=>{Q(T=>{switch(A.state){case"idle":return(0,y.default)((0,y.default)({},T),{},{status:A.state,error:null,data:void 0});case"connecting":return(0,y.default)((0,y.default)({},T),{},{error:A.error,status:A.state});case"pending":return T}})},onComplete:()=>{var A,T;(A=(T=x.current).onComplete)===null||A===void 0||A.call(T),Q($=>(0,y.default)((0,y.default)({},$),{},{status:"idle",error:null,data:void 0}))}});q.current=G},[_,P,w,Q]);C.useEffect(()=>(D(),()=>{var N;(N=q.current)===null||N===void 0||N.unsubscribe()}),[D]);const F=C.useRef(w?(0,y.default)((0,y.default)({},b),{},{reset:D}):(0,y.default)((0,y.default)({},v),{},{reset:D})),[L,ee]=C.useState(zt(F.current,I));return L}function S(O,g,p){var m,w,P,_,x;const{client:M,ssrState:I,prefetchInfiniteQuery:q,queryClient:Q,abortOnUnmount:
9D}=a(),F=Z(O,g,"infinite"),L=Q.getQueryDefaults(F),ee=g===B;typeof window>"u"&&I==="prepass"&&(p==null||(m=p.trpc)===null||m===void 0?void 0:m.ssr)!==!1&&((w=p?.enabled)!==null&&w!==void 0?w:L?.enabled)!==!1&&!ee&&!Q.getQueryCache().find({queryKey:F})&&q(F,(0,y.default)((0,y.default)({},L),p));const N=u(F,(0,y.default)((0,y.default)({},L),p)),G=(P=p==null||(_=p.trpc)===null||_===void 0?void 0:_.abortOnUnmount)!==null&&P!==void 0?P:D,A=qn((0,y.default)((0,y.default)({},N),{},{initialPageParam:(x=p.initialCursor)!==null&&x!==void 0?x:null,persister:p.persister,queryKey:F,queryFn:ee?g:T=>{var $;const ue=(0,y.default)((0,y.default)({},N),{},{trpc:(0,y.default)((0,y.default)({},N?.trpc),G?{signal:T.signal}:{signal:null})});return M.query(...z(F,ue,{pageParam:($=T.pageParam)!==null&&$!==void 0?$:p.initialCursor,direction:T.direction}))}}),Q);return A.trpc=Pe({path:O}),A}function R(O,g,p){var m,w,P;const _=a(),x=Z(O,g,"infinite"),M=_.queryClient.getQueryDefaults(x),I=g===B,q=u(x,(0,y.default)((0,y.default)({},M),p)),Q=(m=p==null||(w=p.trpc)===null||w===void 0?void 0:w.abortOnUnmount)!==null&&m!==void 0?m:_.abortOnUnmount;Mn((0,y.default)((0,y.default)({},p),{},{initialPageParam:(P=p.initialCursor)!==null&&P!==void 0?P:null,queryKey:x,queryFn:I?g:D=>{var F;const L=(0,y.default)((0,y.default)({},q),{},{trpc:(0,y.default)((0,y.default)({},q?.trpc),Q?{signal:D.signal}:{})});return _.client.query(...z(x,L,{pageParam:(F=D.pageParam)!==null&&F!==void 0?F:p.initialCursor,direction:D.direction}))}}))}function j(O,g,p){var m,w,P;const _=a(),x=Z(O,g,"infinite"),M=_.queryClient.getQueryDefaults(x),I=u(x,(0,y.default)((0,y.default)({},M),p)),q=(m=p==null||(w=p.trpc)===null||w===void 0?void 0:w.abortOnUnmount)!==null&&m!==void 0?m:_.abortOnUnmount,Q=En((0,y.default)((0,y.default)({},p),{},{initialPageParam:(P=p.initialCursor)!==null&&P!==void 0?P:null,queryKey:x,queryFn:D=>{var F;const L=(0,y.default)((0,y.default)({},I),{},{trpc:(0,y.default)((0,y.default)({},I?.trpc),q?{signal:D.signal}:{})});return _.client.query(...z(x,L,{pageParam:(F=D.pageParam)!==null&&F!==void 0?F:p.initialCursor,direction:D.direction}))}}),_.queryClient);return Q.trpc=Pe({path:O}),[Q.data,Q]}return{Provider:o,createClient:i,useContext:a,useUtils:a,useQuery:c,usePrefetchQuery:l,useSuspenseQuery:f,useQueries:(O,g)=>{const{ssrState:p,queryClient:m,prefetchQuery:w,client:P}=a(),_=Ht(P),x=O(_);if(typeof window>"u"&&p==="prepass")for(const I of x){var M;const q=I;((M=q.trpc)===null||M===void 0?void 0:M.ssr)!==!1&&!m.getQueryCache().find({queryKey:q.queryKey})&&w(q.queryKey,q)}return vr({queries:x.map(I=>(0,y.default)((0,y.default)({},I),{},{queryKey:I.queryKey})),combine:g?.combine},m)},useSuspenseQueries:O=>{const{queryClient:g,client:p}=a(),m=Ht(p),w=O(m),P=In({queries:w.map(_=>(0,y.default)((0,y.default)({},_),{},{queryFn:_.queryFn,queryKey:_.queryKey}))},g);return[P.map(_=>_.data),P]},useMutation:d,useSubscription:h,useInfiniteQuery:S,usePrefetchInfiniteQuery:R,useSuspenseInfiniteQuery:j}}function ei(e){const t=Ks(e);return St(r=>r==="useContext"||r==="useUtils"?()=>{const n=e.useUtils();return C.useMemo(()=>Ws(n),[n])}:e.hasOwnProperty(r)?e[r]:t[r])}function ki(e){const t=Xs();return ei(t)}var ti=(function(){function e(){this.keyToValue=new Map,this.valueToKey=new Map}return e.prototype.set=function(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)},e.prototype.getByKey=function(t){return this.keyToValue.get(t)},e.prototype.getByValue=function(t){return this.valueToKey.get(t)},e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},e})(),Fr=(function(){function e(t){this.generateIdentifier=t,this.kv=new ti}return e.prototype.register=function(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))},e.prototype.clear=function(){this.kv.clear()},e.prototype.getIdentifier=function(t){return this.kv.getByValue(t)},e.prototype.getValue=function(t){return this.kv.getByKey(t)},e})(),ri=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}
9t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),ni=(function(e){ri(t,e);function t(){var r=e.call(this,function(n){return n.name})||this;return r.classToAllowedProps=new Map,r}return t.prototype.register=function(r,n){typeof n=="object"?(n.allowProps&&this.classToAllowedProps.set(r,n.allowProps),e.prototype.register.call(this,r,n.identifier)):e.prototype.register.call(this,r,n)},t.prototype.getAllowedProps=function(r){return this.classToAllowedProps.get(r)},t})(Fr),si=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};function ii(e){if("values"in Object)return Object.values(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function oi(e,t){var r=ii(e);if("find"in r)return r.find(t);for(var n=r,s=0;s<n.length;s++){var i=n[s];if(t(i))return i}}function ge(e,t){Object.entries(e).forEach(function(r){var n=si(r,2),s=n[0],i=n[1];return t(i,s)})}function Ue(e,t){return e.indexOf(t)!==-1}function Bt(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t(n))return n}}var ai=(function(){function e(){this.transfomers={}}return e.prototype.register=function(t){this.transfomers[t.name]=t},e.prototype.findApplicable=function(t){return oi(this.transfomers,function(r){return r.isApplicable(t)})},e.prototype.findByName=function(t){return this.transfomers[t]},e})(),ui=function(e){return Object.prototype.toString.call(e).slice(8,-1)},kr=function(e){return typeof e>"u"},ci=function(e){return e===null},Ce=function(e){return typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype},ht=function(e){return Ce(e)&&Object.keys(e).length===0},ie=function(e){return Array.isArray(e)},li=function(e){return typeof e=="string"},fi=function(e){return typeof e=="number"&&!isNaN(e)},di=function(e){return typeof e=="boolean"},hi=function(e){return e instanceof RegExp},Re=function(e){return e instanceof Map},je=function(e){return e instanceof Set},Ur=function(e){return ui(e)==="Symbol"},pi=function(e){return e instanceof Date&&!isNaN(e.valueOf())},yi=function(e){return e instanceof Error},Gt=function(e){return typeof e=="number"&&isNaN(e)},vi=function(e){return di(e)||ci(e)||kr(e)||fi(e)||li(e)||Ur(e)},mi=function(e){return typeof e=="bigint"},bi=function(e){return e===1/0||e===-1/0},gi=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},Oi=function(e){return e instanceof URL},Nr=function(e){return e.replace(/\./g,"\\.")},rt=function(e){return e.map(String).map(Nr).join(".")},_e=function(e){for(var t=[],r="",n=0;n<e.length;n++){var s=e.charAt(n),i=s==="\\"&&e.charAt(n+1)===".";if(i){r+=".",n++;continue}var o=s===".";if(o){t.push(r),r="";
9continue}r+=s}var a=r;return t.push(a),t},pt=function(){return pt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},pt.apply(this,arguments)},yt=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},vt=function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};function Y(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}var Lr=[Y(kr,"undefined",function(){return null},function(){}),Y(mi,"bigint",function(e){return e.toString()},function(e){return typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)}),Y(pi,"Date",function(e){return e.toISOString()},function(e){return new Date(e)}),Y(yi,"Error",function(e,t){var r={name:e.name,message:e.message};return t.allowedErrorProps.forEach(function(n){r[n]=e[n]}),r},function(e,t){var r=new Error(e.message);return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(function(n){r[n]=e[n]}),r}),Y(hi,"regexp",function(e){return""+e},function(e){var t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),Y(je,"set",function(e){return vt([],yt(e.values()))},function(e){return new Set(e)}),Y(Re,"map",function(e){return vt([],yt(e.entries()))},function(e){return new Map(e)}),Y(function(e){return Gt(e)||bi(e)},"number",function(e){return Gt(e)?"NaN":e>0?"Infinity":"-Infinity"},Number),Y(function(e){return e===0&&1/e===-1/0},"number",function(){return"-0"},Number),Y(Oi,"URL",function(e){return e.toString()},function(e){return new URL(e)})];function Ve(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}var $r=Ve(function(e,t){if(Ur(e)){var r=!!t.symbolRegistry.getIdentifier(e);return r}return!1},function(e,t){var r=t.symbolRegistry.getIdentifier(e);return["symbol",r]},function(e){return e.description},function(e,t,r){var n=r.symbolRegistry.getValue(t[1]);if(!n)throw new Error("Trying to deserialize unknown symbol");return n}),Pi=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),Kr=Ve(gi,function(e){return["typed-array",e.constructor.name]},function(e){return vt([],yt(e))},function(e,t){var r=Pi[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function Hr(e,t){if(e?.constructor){var r=!!t.classRegistry.getIdentifier(e.constructor);return r}return!1}var zr=Ve(Hr,function(e,t){var r=t.classRegistry.getIdentifier(e.constructor);return["class",r]},function(e,t){var r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return pt({},e);var n={};return r.forEach(function(s){n[s]=e[s]}),n},function(e,t,r){var n=r.classRegistry.getValue(t[1]);if(!n)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(n.prototype),e)}),Br=Ve(function(e,t){return!!t.customTransformerRegistry.findApplicable(e)},function(e,t){var r=t.customTransformerRegistry.findApplicable(e);return["custom",r.name]},function(e,t){var r=t.customTransformerRegistry.findApplicable(e);return r.serialize(e)},function(e,t,r){var n=r.customTransformerRegistry.findByName(t[1]);if(!n)throw new Error("Trying to deserialize unknown custom value");return n.deserialize(e)}),wi=[zr,$r,Br,Kr],Wt=function(e,t){var r=Bt(wi,function(s){return s.isApplicable(e,t)});if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};var n=Bt(Lr,function(s){return s.isApplicable(e,t)});if(n)return{value:n.transform(e,t),type:n.annotation}},Gr={};Lr.forEach(function(e){Gr[e.annotation]=e});var _i=function(e,t,r){if(ie(t))switch(t[0]){case"symbol":return $r.untransform(e,t,r);case"class":return zr.untransform(e,t,r);case"custom":return Br.untransform(e,t,r);case"typed-array":return Kr.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{var n=Gr[t];if(!n)throw new Error("Unknown transformation: "+t);return n.untransform(e,r)}},be=function(e,t){for(var r=e.keys();t>0;)r.next(),t--;return r.next().value};function Wr(e){if(Ue(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Ue(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Ue(e,"constructor"))throw new Error("constructor is not allowed as a property")}var xi=function(e,t){Wr(t);for(var r=0;r<t.length;r++){var n=t[r];
9if(je(e))e=be(e,+n);else if(Re(e)){var s=+n,i=+t[++r]==0?"key":"value",o=be(e,s);switch(i){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[n]}return e},mt=function(e,t,r){if(Wr(t),t.length===0)return r(e);for(var n=e,s=0;s<t.length-1;s++){var i=t[s];if(ie(n)){var o=+i;n=n[o]}else if(Ce(n))n=n[i];else if(je(n)){var a=+i;n=be(n,a)}else if(Re(n)){var u=s===t.length-2;if(u)break;var a=+i,c=+t[++s]==0?"key":"value",l=be(n,a);switch(c){case"key":n=l;break;case"value":n=n.get(l);break}}}var f=t[t.length-1];if(ie(n)?n[+f]=r(n[+f]):Ce(n)&&(n[f]=r(n[f])),je(n)){var d=be(n,+f),v=r(d);d!==v&&(n.delete(d),n.add(v))}if(Re(n)){var a=+t[t.length-2],b=be(n,a),c=+f==0?"key":"value";switch(c){case"key":{var h=r(b);n.set(h,n.get(b)),h!==b&&n.delete(b);break}case"value":{n.set(b,r(n.get(b)));break}}}return e},te=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},re=function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};function bt(e,t,r){if(r===void 0&&(r=[]),!!e){if(!ie(e)){ge(e,function(o,a){return bt(o,t,re(re([],te(r)),te(_e(a))))});return}var n=te(e,2),s=n[0],i=n[1];i&&ge(i,function(o,a){bt(o,t,re(re([],te(r)),te(_e(a))))}),t(s,r)}}function Si(e,t,r){return bt(t,function(n,s){e=mt(e,s,function(i){return _i(i,n,r)})}),e}function Ci(e,t){function r(o,a){var u=xi(e,_e(a));o.map(_e).forEach(function(c){e=mt(e,c,function(){return u})})}if(ie(t)){var n=te(t,2),s=n[0],i=n[1];s.forEach(function(o){e=mt(e,_e(o),function(){return e})}),i&&ge(i,r)}else ge(t,r);return e}var Ri=function(e,t){return Ce(e)||ie(e)||Re(e)||je(e)||Hr(e,t)};function ji(e,t,r){var n=r.get(e);n?n.push(t):r.set(e,[t])}function Ei(e,t){var r={},n=void 0;return e.forEach(function(s){if(!(s.length<=1)){t||(s=s.map(function(u){return u.map(String)}).sort(function(u,c){return u.length-c.length}));var i=te(s),o=i[0],a=i.slice(1);o.length===0?n=a.map(rt):r[rt(o)]=a.map(rt)}}),n?ht(r)?[n]:[n,r]:ht(r)?void 0:r}var Vr=function(e,t,r,n,s,i,o){var a;s===void 0&&(s=[]),i===void 0&&(i=[]),o===void 0&&(o=new Map);var u=vi(e);if(!u){ji(e,s,t);var c=o.get(e);if(c)return n?{transformedValue:null}:c}if(!Ri(e,r)){var l=Wt(e,r),f=l?{transformedValue:l.value,annotations:[l.type]}:{transformedValue:e};return u||o.set(e,f),f}if(Ue(i,e))return{transformedValue:null};var d=Wt(e,r),v=(a=d?.value)!==null&&a!==void 0?a:e,b=ie(v)?[]:{},h={};ge(v,function(R,j){var K=Vr(R,t,r,n,re(re([],te(s)),[j]),re(re([],te(i)),[e]),o);b[j]=K.transformedValue,ie(K.annotations)?h[j]=K.annotations:Ce(K.annotations)&&ge(K.annotations,function(J,O){h[Nr(j)+"."+O]=J})});var S=ht(h)?{transformedValue:b,annotations:d?[d.type]:void 0}:{transformedValue:b,annotations:d?[d.type,h]:h};return u||o.set(e,S),S};function Jr(e){return Object.prototype.toString.call(e).slice(8,-1)}function Vt(e){return Jr(e)==="Array"}function Ii(e){if(Jr(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Qi(e,t,r,n,s){const i={}.propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=r),s&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function gt(e,t={}){if(Vt(e))return e.map(s=>gt(s,t));if(!Ii(e))return e;const r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertySymbols(e);return[...r,...n].reduce((s,i)=>{if(Vt(t.props)&&!t.props.includes(i))return s;const o=e[i],a=gt(o,t);return Qi(s,i,a,e,t.nonenumerable),s},{})}var le=function(){return le=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},le.apply(this,arguments)},Mi=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},Ti=function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e},ae=(function(){function e(t){var r=t===void 0?{}:t,n=r.dedupe,s=n===void 0?!1:n;this.classRegistry=new ni,this.symbolRegistry=new Fr(function(i){var o;return(o=i.description)!==null&&o!==void 0?o:""}),this.customTransformerRegistry=new ai,this.allowedErrorProps=[],this.dedupe=s}
9return e.prototype.serialize=function(t){var r=new Map,n=Vr(t,r,this,this.dedupe),s={json:n.transformedValue};n.annotations&&(s.meta=le(le({},s.meta),{values:n.annotations}));var i=Ei(r,this.dedupe);return i&&(s.meta=le(le({},s.meta),{referentialEqualities:i})),s},e.prototype.deserialize=function(t){var r=t.json,n=t.meta,s=gt(r);return n?.values&&(s=Si(s,n.values,this)),n?.referentialEqualities&&(s=Ci(s,n.referentialEqualities)),s},e.prototype.stringify=function(t){return JSON.stringify(this.serialize(t))},e.prototype.parse=function(t){return this.deserialize(JSON.parse(t))},e.prototype.registerClass=function(t,r){this.classRegistry.register(t,r)},e.prototype.registerSymbol=function(t,r){this.symbolRegistry.register(t,r)},e.prototype.registerCustom=function(t,r){this.customTransformerRegistry.register(le({name:r},t))},e.prototype.allowErrorProps=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];(t=this.allowedErrorProps).push.apply(t,Ti([],Mi(r)))},e.defaultInstance=new e,e.serialize=e.defaultInstance.serialize.bind(e.defaultInstance),e.deserialize=e.defaultInstance.deserialize.bind(e.defaultInstance),e.stringify=e.defaultInstance.stringify.bind(e.defaultInstance),e.parse=e.defaultInstance.parse.bind(e.defaultInstance),e.registerClass=e.defaultInstance.registerClass.bind(e.defaultInstance),e.registerSymbol=e.defaultInstance.registerSymbol.bind(e.defaultInstance),e.registerCustom=e.defaultInstance.registerCustom.bind(e.defaultInstance),e.allowErrorProps=e.defaultInstance.allowErrorProps.bind(e.defaultInstance),e})();ae.serialize;ae.deserialize;ae.stringify;ae.parse;ae.registerClass;ae.registerCustom;ae.registerSymbol;ae.allowErrorProps;export{Ai as Q,ae as S,Ke as T,Di as a,ki as c,Fi as h,Jt as j};
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.