PageSourceSearch

https://www.clinrol.com/assets/vendor-react-B0ge9mXj.js

js clinrol.com collected 2026-10-04 14:01:27 UTC 53,063 bytes, 1 lines download raw bytes

vendor: 9,421 bytes, line 1
1function Se(t,e){for(var s=0;s<e.length;s++){const r=e[s];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const u=Object.getOwnPropertyDescriptor(r,i);u&&Object.defineProperty(t,i,u.get?u:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Ee(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var it={exports:{}},J={};var wt;function Re(){if(wt)return J;wt=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function s(r,i,u){var c=null;if(u!==void 0&&(c=""+u),i.key!==void 0&&(c=""+i.key),"key"in i){u={};for(var f in i)f!=="key"&&(u[f]=i[f])}else u=i;return i=u.ref,{$$typeof:t,type:r,key:c,ref:i!==void 0?i:null,props:u}}return J.Fragment=e,J.jsx=s,J.jsxs=s,J}var Pt;function Oe(){return Pt||(Pt=1,it.exports=Re()),it.exports}var Ce=Oe(),ot={exports:{}},g={};var Tt;function _e(){if(Tt)return g;Tt=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),o=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),d=Symbol.iterator;function p(n){return n===null||typeof n!="object"?null:(n=d&&n[d]||n["@@iterator"],typeof n=="function"?n:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,y={};function _(n,h,v){this.props=n,this.context=h,this.refs=y,this.updater=v||O}_.prototype.isReactComponent={},_.prototype.setState=function(n,h){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,h,"setState")},_.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function w(){}w.prototype=_.prototype;function A(n,h,v){this.props=n,this.context=h,this.refs=y,this.updater=v||O}var I=A.prototype=new w;I.constructor=A,C(I,_.prototype),I.isPureReactComponent=!0;var k=Array.isArray,E={H:null,A:null,T:null,S:null,V:null},G=Object.prototype.hasOwnProperty;function Q(n,h,v,m,R,P){return v=P.ref,{$$typeof:t,type:n,key:h,ref:v!==void 0?v:null,props:P}}function D(n,h){return Q(n.type,h,void 0,void 0,void 0,n.props)}function U(n){return typeof n=="object"&&n!==null&&n.$$typeof===t}function B(n){var h={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(v){return h[v]})}var V=/\/+/g;function L(n,h){return typeof n=="object"&&n!==null&&n.key!=null?B(""+n.key):h.toString(36)}function N(){}function ve(n){switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:switch(typeof n.status=="string"?n.then(N,N):(n.status="pending",n.then(function(h){n.status==="pending"&&(n.status="fulfilled",n.value=h)},function(h){n.status==="pending"&&(n.status="rejected",n.reason=h)})),n.status){case"fulfilled":return n.value;case"rejected":throw n.reason}}throw n}function Y(n,h,v,m,R){var P=typeof n;(P==="undefined"||P==="boolean")&&(n=null);var S=!1;if(n===null)S=!0;else switch(P){case"bigint":case"string":case"number":S=!0;break;case"object":switch(n.$$typeof){case t:case e:S=!0;break;case l:return S=n._init,Y(S(n._payload),h,v,m,R)}}if(S)return R=R(n),S=m===""?"."+L(n,0):m,k(R)?(v="",S!=null&&(v=S.replace(V,"$&/")+"/"),Y(R,h,v,"",function(be){return be})):R!=null&&(U(R)&&(R=D(R,v+(R.key==null||n&&n.key===R.key?"":(""+R.key).replace(V,"$&/")+"/")+S)),h.push(R)),1;S=0;var q=m===""?".":m+":";if(k(n))for(var T=0;T<n.length;T++)m=n[T],P=q+L(m,T),S+=Y(m,h,v,P,R);else if(T=p(n),typeof T=="function")for(n=T.call(n),T=0;!(m=n.next()).done;)m=m.value,P=q+L(m,T++),S+=Y(m,h,v,P,R);else if(P==="object"){if(typeof n.then=="function")return Y(ve(n),h,v,m,R);throw h=String(n),Error("Objects are not valid as a React child (found: "+(h==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":h)+"). If you meant to render a collection of children, use an array instead.")}return S}function et(n,h,v){if(n==null)return n;var m=[],R=0;return Y(n,m,"","",function(P){return h.call(v,P,R++)}),m}function me(n){if(n._status===-1){var h=n._result;h=h(),h.then(function(v){(n._status===0||n._status===-1)&&(n._status=1,n._result=v)},function(v){(n._status===0||n._status===-1)&&(n._status=2,n._result=v)}),n._status===-1&&(n._status=0,n._result=h)}if(n._status===1)return n._result.default;throw n._result}var _t=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var h=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(h))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)};function ge(){}return g.Children={map:et,forEach:function(n,h,v){et(n,function(){h.apply(this,arguments)},v)},count:function(n){var h=0;return et(n,function(){h++}),h},toArray:function(n){return et(n,function(h){return h})||[]},only:function(n){if(!U(n))throw Error("React.Children.only expected to receive a single React element child.");return n}},g.Component=_,g.Fragment=s,g.Profiler=i,g.PureComponent=A,g.StrictMode=r,g.Suspense=a,g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,g.__COMPILER_RUNTIME={__proto__:null,c:function(n){return E.H.useMemoCache(n)}},g.cache=function(n){return function(){return n.apply(null,arguments)}},g.cloneElement=function(n,h,v){if(n==null)throw Error("The argument must be a React element, but you passed "+n+".");var m=C({},n.props),R=n.key,P=void 0;if(h!=null)for(S in h.ref!==void 0&&(P=void 0),h.key!==void 0&&(R=""+h.key),h)!G.call(h,S)||S==="key"||S==="__self"||S==="__source"||S==="ref"&&h.ref===void 0||(m[S]=h[S]);var S=arguments.length-2;if(S===1)m.children=v;else if(1<S){for(var q=Array(S),T=0;T<S;T++)q[T]=arguments[T+2];m.children=q}return Q(n.type,R,void 0,void 0,P,m)},g.createContext=function(n){return n={$$typeof:c,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:u,_context:n},n},g.createElement=function(n,h,v){var m,R={},P=null;if(h!=null)for(m in h.key!==void 0&&(P=""+h.key),h)G.call(h,m)&&m!=="key"&&m!=="__self"&&m!=="__source"&&(R[m]=h[m]);var S=arguments.length-2;if(S===1)R.children=v;else if(1<S){for(var q=Array(S),T=0;T<S;T++)q[T]=arguments[T+2];R.children=q}if(n&&n.defaultProps)for(m in S=n.defaultProps,S)R[m]===void 0&&(R[m]=S[m]);return Q(n,P,void 0,void 0,null,R)},g.createRef=function(){return{current:null}},g.forwardRef=function(n){return{$$typeof:f,render:n}},g.isValidElement=U,g.lazy=function(n){return{$$typeof:l,_payload:{_status:-1,_result:n},_init:me}},g.memo=function(n,h){return{$$typeof:o,type:n,compare:h===void 0?null:h}},g.startTransition=function(n){var h=E.T,v={};E.T=v;try{var m=n(),R=E.S;R!==null&&R(v,m),typeof m=="object"&&m!==null&&typeof m.then=="function"&&m.then(ge,_t)}catch(P){_t(P)}finally{E.T=h}},g.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},g.use=function(n){return E.H.use(n)},g.useActionState=function(n,h,v){return E.H.useActionState(n,h,v)},g.useCallback=function(n,h){return E.H.useCallback(n,h)},g.useContext=function(n){return E.H.useContext(n)},g.useDebugValue=function(){},g.useDeferredValue=function(n,h){return E.H.useDeferredValue(n,h)},g.useEffect=function(n,h,v){var m=E.H;if(typeof v=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return m.useEffect(n,h)},g.useId=function(){return E.H.useId()},g.useImperativeHandle=function(n,h,v){return E.H.useImperativeHandle(n,h,v)},g.useInsertionEffect=function(n,h){return E.H.useInsertionEffect(n,h)},g.useLayoutEffect=function(n,h){return E.H.useLayoutEffect(n,h)},g.useMemo=function(n,h){return E.H.useMemo(n,h)},g.useOptimistic=function(n,h){return E.H.useOptimistic(n,h)},g.useReducer=function(n,h,v){return E.H.useReducer(n,h,v)},g.useRef=function(n){return E.H.useRef(n)},g.useState=function(n){return E.H.useState(n)},g.useSyncExternalStore=function(n,h,v){return E.H.useSyncExternalStore(n,h,v)},g.useTransition=function(){return E.H.useTransition()},g.version="19.1.0",g}var Mt;function vt(){return Mt||(Mt=1,ot.exports=_e()),ot.exports}var at={exports:{}},x={};var xt;function we(){if(xt)return x;xt=1;var t=vt();function e(a){var o="https://react.dev/errors/"+a;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+a+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(e(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},i=Symbol.for("react.portal");function u(a,o,l){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:d==null?null:""+d,children:a,containerInfo:o,implementation:l}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(a,o){if(a==="font")return"";
1if(typeof o=="string")return o==="use-credentials"?o:""}return x.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,x.createPortal=function(a,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)throw Error(e(299));return u(a,o,null,l)},x.flushSync=function(a){var o=c.T,l=r.p;try{if(c.T=null,r.p=2,a)return a()}finally{c.T=o,r.p=l,r.d.f()}},x.preconnect=function(a,o){typeof a=="string"&&(o?(o=o.crossOrigin,o=typeof o=="string"?o==="use-credentials"?o:"":void 0):o=null,r.d.C(a,o))},x.prefetchDNS=function(a){typeof a=="string"&&r.d.D(a)},x.preinit=function(a,o){if(typeof a=="string"&&o&&typeof o.as=="string"){var l=o.as,d=f(l,o.crossOrigin),p=typeof o.integrity=="string"?o.integrity:void 0,O=typeof o.fetchPriority=="string"?o.fetchPriority:void 0;l==="style"?r.d.S(a,typeof o.precedence=="string"?o.precedence:void 0,{crossOrigin:d,integrity:p,fetchPriority:O}):l==="script"&&r.d.X(a,{crossOrigin:d,integrity:p,fetchPriority:O,nonce:typeof o.nonce=="string"?o.nonce:void 0})}},x.preinitModule=function(a,o){if(typeof a=="string")if(typeof o=="object"&&o!==null){if(o.as==null||o.as==="script"){var l=f(o.as,o.crossOrigin);r.d.M(a,{crossOrigin:l,integrity:typeof o.integrity=="string"?o.integrity:void 0,nonce:typeof o.nonce=="string"?o.nonce:void 0})}}else o==null&&r.d.M(a)},x.preload=function(a,o){if(typeof a=="string"&&typeof o=="object"&&o!==null&&typeof o.as=="string"){var l=o.as,d=f(l,o.crossOrigin);r.d.L(a,l,{crossOrigin:d,integrity:typeof o.integrity=="string"?o.integrity:void 0,nonce:typeof o.nonce=="string"?o.nonce:void 0,type:typeof o.type=="string"?o.type:void 0,fetchPriority:typeof o.fetchPriority=="string"?o.fetchPriority:void 0,referrerPolicy:typeof o.referrerPolicy=="string"?o.referrerPolicy:void 0,imageSrcSet:typeof o.imageSrcSet=="string"?o.imageSrcSet:void 0,imageSizes:typeof o.imageSizes=="string"?o.imageSizes:void 0,media:typeof o.media=="string"?o.media:void 0})}},x.preloadModule=function(a,o){if(typeof a=="string")if(o){var l=f(o.as,o.crossOrigin);r.d.m(a,{as:typeof o.as=="string"&&o.as!=="script"?o.as:void 0,crossOrigin:l,integrity:typeof o.integrity=="string"?o.integrity:void 0})}else r.d.m(a)},x.requestFormReset=function(a){r.d.r(a)},x.unstable_batchedUpdates=function(a,o){return a(o)},x.useFormState=function(a,o,l){return c.H.useFormState(a,o,l)},x.useFormStatus=function(){return c.H.useHostTransitionStatus()},x.version="19.1.0",x}var At;function As(){if(At)return at.exports;At=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),at.exports=we(),at.exports}function Pe(t,e){if(t instanceof RegExp)return{keys:!1,pattern:t};var s,r,i,u,c=[],f="",a=t.split("/");for(a[0]||a.shift();i=a.shift();)s=i[0],s==="*"?(c.push(s),f+=i[1]==="?"?"(?:/(.*))?":"/(.*)"):s===":"?(r=i.indexOf("?",1),u=i.indexOf(".",1),c.push(i.substring(1,~r?r:~u?u:i.length)),f+=~r&&!~u?"(?:/([^/]+?))?":"/([^/]+?)",~u&&(f+=(~r?"?":"")+"\\"+i.substring(u))):f+="/"+i;return{keys:c,pattern:new RegExp("^"+f+(e?"(?=$|/)":"/?$"),"i")}}var b=vt();const Te=Ee(b),Me=Se({__proto__:null,default:Te},[b]);var ut={exports:{}},ct={};var Ft;function xe(){if(Ft)return ct;Ft=1;var t=vt();function e(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var s=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function f(d,p){var O=p(),C=r({inst:{value:O,getSnapshot:p}}),y=C[0].inst,_=C[1];return u(function(){y.value=O,y.getSnapshot=p,a(y)&&_({inst:y})},[d,O,p]),i(function(){return a(y)&&_({inst:y}),d(function(){a(y)&&_({inst:y})})},[d]),c(O),O}function a(d){var p=d.getSnapshot;d=d.value;try{var O=p();return!s(d,O)}catch{return!0}}function o(d,p){return p()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:f;return ct.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:l,ct}var Dt;function Ae(){return Dt||(Dt=1,ut.exports=xe()),ut.exports}var Fe=Ae();const De=Me.useInsertionEffect,Ie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Vt=Ie?b.useLayoutEffect:b.useEffect,je=De||Vt,mt=t=>{const e=b.useRef([t,(...s)=>e[0](...s)]).current;return je(()=>{e[0]=t}),e[1]},Qe="popstate",gt="pushState",bt="replaceState",ke="hashchange",It=[Qe,gt,bt,ke],Ue=t=>{for(const e of It)addEventListener(e,t);return()=>{for(const e of It)removeEventListener(e,t)}},Jt=(t,e)=>Fe.useSyncExternalStore(Ue,t,e),jt=()=>location.search,Le=({ssrSearch:t}={})=>Jt(jt,t!=null?()=>t:jt),Qt=()=>location.pathname,qe=({ssrPath:t}={})=>Jt(Qt,t!=null?()=>t:Qt),He=(t,{replace:e=!1,state:s=null}={})=>history[e?bt:gt](s,"",t),Ne=(t={})=>[qe(t),He],kt=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[kt]>"u"){for(const t of[gt,bt]){const e=history[t];history[t]=function(){const s=e.apply(this,arguments),r=new Event(t);return r.arguments=arguments,dispatchEvent(r),s}}Object.defineProperty(window,kt,{value:!0})}const Ke=(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())?"~"+e:e.slice(t.length)||"/",Xt=(t="")=>t==="/"?"":t,$e=(t,e)=>t[0]==="~"?t.slice(1):Xt(e)+t,Ge=(t="",e)=>Ke(Ut(Xt(t)),Ut(e)),Ut=t=>{try{return decodeURI(t)}catch{return t}},Zt={hook:Ne,searchHook:Le,parser:Pe,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t,aroundNav:(t,e,s)=>t(e,s)},te=b.createContext(Zt),z=()=>b.useContext(te),ee={},se=b.createContext(ee),Be=()=>b.useContext(se),tt=t=>{const[e,s]=t.hook(t);return[Ge(t.base,e),mt((r,i)=>t.aroundNav(s,$e(r,t.base),i))]},Fs=()=>tt(z()),re=(t,e,s,r)=>{const{pattern:i,keys:u}=e instanceof RegExp?{keys:!1,pattern:e}:t(e||"*",r),c=i.exec(s)||[],[f,...a]=c;return f!==void 0?[!0,(()=>{const o=u!==!1?Object.fromEntries(u.map((d,p)=>[d,a[p]])):c.groups;let l={...a};return o&&Object.assign(l,o),l})(),...r?[f]:[]]:[!1,null]},Ye=({children:t,...e})=>{const s=z(),r=e.hook?Zt:s;let i=r;const[u,c=e.ssrSearch??""]=e.ssrPath?.split("?")??[];u&&(e.ssrSearch=c,e.ssrPath=u),e.hrefs=e.hrefs??e.hook?.hrefs,e.searchHook=e.searchHook??e.hook?.searchHook;let f=b.useRef({}),a=f.current,o=a;for(let l in r){const d=l==="base"?r[l]+(e[l]??""):e[l]??r[l];a===o&&d!==o[l]&&(f.current=o={...o}),o[l]=d,(d!==r[l]||d!==i[l])&&(i=o)}return b.createElement(te.Provider,{value:i,children:t})},Lt=({children:t,component:e},s)=>e?b.createElement(e,{params:s}):typeof t=="function"?t(s):t,ze=t=>{let e=b.useRef(ee);const s=e.current;return e.current=Object.keys(t).length!==Object.keys(s).length||Object.entries(t).some(([r,i])=>i!==s[r])?t:s},Ds=({path:t,nest:e,match:s,...r})=>{const i=z(),[u]=tt(i),[c,f,a]=s??re(i.parser,t,u,e),o=ze({...Be(),...f});if(!c)return null;const l=a?b.createElement(Ye,{base:a},Lt(r,o)):Lt(r,o);return b.createElement(se.Provider,{value:o,children:l})},Is=b.forwardRef((t,e)=>{const s=z(),[r,i]=tt(s),{to:u="",href:c=u,onClick:f,asChild:a,children:o,className:l,replace:d,state:p,transition:O,...C}=t,y=mt(w=>{w.ctrlKey||w.metaKey||w.altKey||w.shiftKey||w.button!==0||(f?.(w),w.defaultPrevented||(w.preventDefault(),i(c,t)))}),_=s.hrefs(c[0]==="~"?c.slice(1):s.base+c,s);return a&&b.isValidElement(o)?b.cloneElement(o,{onClick:y,href:_}):b.createElement("a",{...C,onClick:y,href:_,className:l?.call?l(r===c):l,children:o,ref:e})}),ne=t=>Array.isArray(t)?t.flatMap(e=>ne(e&&e.type===b.Fragment?e.props.children:e)):[t],js=({children:t,location:e})=>{const s=z(),[r]=tt(s);for(const i of ne(t)){let u=0;if(b.isValidElement(i)&&(u=re(s.parser,i.props.path,e||r,i.props.nest))[0])return b.cloneElement(i,{match:u})}return null},Qs=t=>{const{to:e,href:s=e}=t,r=z(),[,i]=tt(r),u=mt(()=>i(e||s,t)),{ssrContext:c}=r;return Vt(()=>{u()},[]),c&&(c.redirectTo=e),null};var W=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},We=class extends W{#t;#e;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 24,868 bytes, line 1
1this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},St=new We,Ve={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Je=class{#t=Ve;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},K=new Je;function Xe(t){setTimeout(t,0)}var Ze=typeof window>"u"||"Deno"in globalThis;function F(){}function ts(t,e){return typeof t=="function"?t(e):t}function ht(t){return typeof t=="number"&&t>=0&&t!==1/0}function ie(t,e){return Math.max(t+(e||0)-Date.now(),0)}function H(t,e){return typeof t=="function"?t(e):t}function j(t,e){return typeof t=="function"?t(e):t}function qt(t,e){const{type:s="all",exact:r,fetchStatus:i,predicate:u,queryKey:c,stale:f}=t;if(c){if(r){if(e.queryHash!==Et(c,e.options))return!1}else if(!X(e.queryKey,c))return!1}if(s!=="all"){const a=e.isActive();if(s==="active"&&!a||s==="inactive"&&a)return!1}return!(typeof f=="boolean"&&e.isStale()!==f||i&&i!==e.state.fetchStatus||u&&!u(e))}function Ht(t,e){const{exact:s,status:r,predicate:i,mutationKey:u}=t;if(u){if(!e.options.mutationKey)return!1;if(s){if($(e.options.mutationKey)!==$(u))return!1}else if(!X(e.options.mutationKey,u))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function Et(t,e){return(e?.queryKeyHashFn||$)(t)}function $(t){return JSON.stringify(t,(e,s)=>lt(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function X(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>X(t[s],e[s])):!1}var es=Object.prototype.hasOwnProperty;function oe(t,e,s=0){if(t===e)return t;if(s>500)return e;const r=Nt(t)&&Nt(e);if(!r&&!(lt(t)&&lt(e)))return e;const u=(r?t:Object.keys(t)).length,c=r?e:Object.keys(e),f=c.length,a=r?new Array(f):{};let o=0;for(let l=0;l<f;l++){const d=r?l:c[l],p=t[d],O=e[d];if(p===O){a[d]=p,(r?l<u:es.call(t,d))&&o++;continue}if(p===null||O===null||typeof p!="object"||typeof O!="object"){a[d]=O;continue}const C=oe(p,O,s+1);a[d]=C,C===p&&o++}return u===f&&o===u?t:a}function rt(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function Nt(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function lt(t){if(!Kt(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!Kt(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Kt(t){return Object.prototype.toString.call(t)==="[object Object]"}function ss(t){return new Promise(e=>{K.setTimeout(e,t)})}function ft(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?oe(t,e):e}function rs(t,e,s=0){const r=[...t,e];return s&&r.length>s?r.slice(1):r}function ns(t,e,s=0){const r=[e,...t];return s&&r.length>s?r.slice(0,-1):r}var Rt=Symbol();function ae(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Rt?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Ot(t,e){return typeof t=="function"?t(...e):!!t}function is(t,e,s){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),t}var Z=(()=>{let t=()=>Ze;return{isServer(){return t()},setIsServer(e){t=e}}})();function dt(){let t,e;const s=new Promise((i,u)=>{t=i,e=u});s.status="pending",s.catch(()=>{});function r(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},s.reject=i=>{r({status:"rejected",reason:i}),e(i)},s}var os=Xe;function as(){let t=[],e=0,s=f=>{f()},r=f=>{f()},i=os;const u=f=>{e?t.push(f):i(()=>{s(f)})},c=()=>{const f=t;t=[],f.length&&i(()=>{r(()=>{f.forEach(a=>{s(a)})})})};return{batch:f=>{let a;e++;try{a=f()}finally{e--,e||c()}return a},batchCalls:f=>(...a)=>{u(()=>{f(...a)})},schedule:u,setNotifyFunction:f=>{s=f},setBatchNotifyFunction:f=>{r=f},setScheduler:f=>{i=f}}}var M=as(),us=class extends W{#t=!0;#e;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#t}},nt=new us;function cs(t){return Math.min(1e3*2**t,3e4)}function ue(t){return(t??"online")==="online"?nt.isOnline():!0}var pt=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function ce(t){let e=!1,s=0,r;const i=dt(),u=()=>i.status!=="pending",c=y=>{if(!u()){const _=new pt(y);p(_),t.onCancel?.(_)}},f=()=>{e=!0},a=()=>{e=!1},o=()=>St.isFocused()&&(t.networkMode==="always"||nt.isOnline())&&t.canRun(),l=()=>ue(t.networkMode)&&t.canRun(),d=y=>{u()||(r?.(),i.resolve(y))},p=y=>{u()||(r?.(),i.reject(y))},O=()=>new Promise(y=>{r=_=>{(u()||o())&&y(_)},t.onPause?.()}).then(()=>{r=void 0,u()||t.onContinue?.()}),C=()=>{if(u())return;let y;const _=s===0?t.initialPromise:void 0;try{y=_??t.fn()}catch(w){y=Promise.reject(w)}Promise.resolve(y).then(d).catch(w=>{if(u())return;const A=t.retry??(Z.isServer()?0:3),I=t.retryDelay??cs,k=typeof I=="function"?I(s,w):I,E=A===!0||typeof A=="number"&&s<A||typeof A=="function"&&A(s,w);if(e||!E){p(w);return}s++,t.onFail?.(s,w),ss(k).then(()=>o()?void 0:O()).then(()=>{e?p(w):C()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(r?.(),i),cancelRetry:f,continueRetry:a,canStart:l,start:()=>(l()?C():O().then(C),i)}}var he=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ht(this.gcTime)&&(this.#t=K.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Z.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#t!==void 0&&(K.clearTimeout(this.#t),this.#t=void 0)}};function hs(t){return{onFetch:(e,s)=>{const r=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,u=e.state.data?.pages||[],c=e.state.data?.pageParams||[];let f={pages:[],pageParams:[]},a=0;const o=async()=>{let l=!1;const d=C=>{is(C,()=>e.signal,()=>l=!0)},p=ae(e.options,e.fetchOptions),O=async(C,y,_)=>{if(l)return Promise.reject(e.signal.reason);if(y==null&&C.pages.length)return Promise.resolve(C);const A=(()=>{const G={client:e.client,queryKey:e.queryKey,pageParam:y,direction:_?"backward":"forward",meta:e.options.meta};return d(G),G})(),I=await p(A),{maxPages:k}=e.options,E=_?ns:rs;return{pages:E(C.pages,I,k),pageParams:E(C.pageParams,y,k)}};if(i&&u.length){const C=i==="backward",y=C?ls:$t,_={pages:u,pageParams:c},w=y(r,_);f=await O(_,w,C)}else{const C=t??u.length;do{const y=a===0?c[0]??r.initialPageParam:$t(r,f);if(a>0&&y==null)break;f=await O(f,y),a++}while(a<C)}return f};e.options.persister?e.fetchFn=()=>e.options.persister?.(o,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=o}}}function $t(t,{pages:e,pageParams:s}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,s[r],s):void 0}function ls(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}var fs=class extends he{#t;#e;#s;#r;#i;#n;#a;#o;constructor(t){super(),this.#o=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#r=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=Bt(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#t}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#a,...t},t?._type&&(this.#t=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Bt(this.options);e.data!==void 0&&(this.setState(Gt(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const s=ft(this.state.data,t,this.options);return this.#u({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t){this.#u({type:"setState",state:t})}cancel(t){const e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(F).catch(F):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>j(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rt||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>H(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ie(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#n&&(this.#o||this.#h()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#h(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#u({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){const a=this.observers.find(o=>o.options.queryFn);a&&this.setOptions(a.options)}const s=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},i=()=>{const a=ae(this.options,e),l=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(d),d})();return this.#o=!1,this.options.persister?this.options.persister(a,l,this):a(l)},c=(()=>{const a={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(a),a})();(this.#t==="infinite"?hs(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#u({type:"fetch",meta:c.fetchOptions?.meta}),this.#n=ce({initialPromise:e?.initialPromise,fn:c.fetchFn,onCancel:a=>{a instanceof pt&&a.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(a,o)=>{this.#u({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#u({type:"pause"})},onContinue:()=>{this.#u({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.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 pt){if(a.silent)return this.#n.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#u({type:"error",error:a}),this.#r.config.onError?.(a,this),this.#r.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#u(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...le(s.data,this.options),fetchMeta:t.meta??null};case"success":const r={...s,...Gt(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=t.manual?r:void 0,r;case"error":const i=t.error;return{...s,error:i,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),M.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function le(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ue(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Gt(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Bt(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var ds=class extends W{constructor(t,e){super(),this.options=e,this.#t=t,this.#o=null,this.#a=dt(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#s=void 0;#r=void 0;#i;#n;#a;#o;#h;#u;#p;#l;#f;#c;#y=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Yt(this.#e,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yt(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yt(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#E(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof j(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#R(),this.#e.setOptions(this.options),e._defaulted&&!rt(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&zt(this.#e,s,this.options,e)&&this.#d(),this.updateResult(),r&&(this.#e!==s||j(this.options.enabled,this.#e)!==j(e.enabled,this.#e)||H(this.options.staleTime,this.#e)!==H(e.staleTime,this.#e))&&this.#v();const i=this.#m();r&&(this.#e!==s||j(this.options.enabled,this.#e)!==j(e.enabled,this.#e)||i!==this.#c)&&this.#g(i)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),s=this.createResult(e,t);return ys(this,s)&&(this.#r=s,this.#n=this.options,this.#i=this.#e.state),s}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(t){this.#y.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),s=this.#t.getQueryCache().build(this.#t,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(t){this.#R();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(F)),e}#v(){this.#S();const t=H(this.options.staleTime,this.#e);if(Z.isServer()||this.#r.isStale||!ht(t))return;const s=ie(this.#r.dataUpdatedAt,t)+1;this.#l=K.setTimeout(()=>{this.#r.isStale||this.updateResult()},s)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#g(t){this.#E(),this.#c=t,!(Z.isServer()||j(this.options.enabled,this.#e)===!1||!ht(this.#c)||this.#c===0)&&(this.#f=K.setInterval(()=>{(this.options.refetchIntervalInBackground||St.isFocused())&&this.#d()},this.#c))}#b(){this.#v(),this.#g(this.#m())}#S(){this.#l!==void 0&&(K.clearTimeout(this.#l),this.#l=void 0)}#E(){this.#f!==void 0&&(K.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const s=this.#e,r=this.options,i=this.#r,u=this.#i,c=this.#n,a=t!==s?t.state:this.#s,{state:o}=t;let l={...o},d=!1,p;if(e._optimisticResults){const D=this.hasListeners(),U=!D&&Yt(t,e),B=D&&zt(t,s,e,r);(U||B)&&(l={...l,...le(o.data,t.options)}),e._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:O,errorUpdatedAt:C,status:y}=l;p=l.data;let _=!1;if(e.placeholderData!==void 0&&p===void 0&&y==="pending"){let D;i?.isPlaceholderData&&e.placeholderData===c?.placeholderData?(D=i.data,_=!0):D=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,D!==void 0&&(y="success",p=ft(i?.data,D,e),d=!0)}if(e.select&&p!==void 0&&!_)if(i&&p===u?.data&&e.select===this.#h)p=this.#u;else try{this.#h=e.select,p=e.select(p),p=ft(i?.data,p,e),this.#u=p,this.#o=null}catch(D){this.#o=D}this.#o&&(O=this.#o,p=this.#u,C=Date.now(),y="error");const w=l.fetchStatus==="fetching",A=y==="pending",I=y==="error",k=A&&w,E=p!==void 0,Q={status:y,fetchStatus:l.fetchStatus,isPending:A,isSuccess:y==="success",isError:I,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:l.dataUpdatedAt,error:O,errorUpdatedAt:C,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:l.dataUpdateCount>a.dataUpdateCount||l.errorUpdateCount>a.errorUpdateCount,isFetching:w,isRefetching:w&&!A,isLoadingError:I&&!E,isPaused:l.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:I&&E,isStale:Ct(t,e),refetch:this.refetch,promise:this.#a,isEnabled:j(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=Q.data!==void 0,U=Q.status==="error"&&!D,B=N=>{U?N.reject(Q.error):D&&N.resolve(Q.data)},V=()=>{const N=this.#a=Q.promise=dt();B(N)},L=this.#a;switch(L.status){case"pending":t.queryHash===s.queryHash&&B(L);break;case"fulfilled":(U||Q.data!==L.value)&&V();break;case"rejected":(!U||Q.error!==L.reason)&&V();break}}return Q}updateResult(){const t=this.#r,e=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#n=this.options,this.#i.data!==void 0&&(this.#p=this.#e),rt(e,t))return;this.#r=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#y.size)return!0;const u=new Set(i??this.#y);return this.options.throwOnError&&u.add("error"),Object.keys(this.#r).some(c=>{const f=c;return this.#r[f]!==t[f]&&u.has(f)})};this.#O({listeners:s()})}#R(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#O(t){M.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ps(t,e){return j(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&j(e.retryOnMount,t)===!1)}function Yt(t,e){return ps(t,e)||t.state.data!==void 0&&yt(t,e,e.refetchOnMount)}function yt(t,e,s){if(j(e.enabled,t)!==!1&&H(e.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&Ct(t,e)}return!1}function zt(t,e,s,r){return(t!==e||j(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Ct(t,s)}function Ct(t,e){return j(e.enabled,t)!==!1&&t.isStaleByTime(H(e.staleTime,t))}function ys(t,e){return!rt(t.getCurrentResult(),e)}var vs=class extends he{#t;#e;#s;#r;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||fe(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#i({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ce({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#i({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)e();else{this.#i({type:"pending",variables:t,isPaused:i}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const c=await this.options.onMutate?.(t,s);c!==this.state.context&&this.#i({type:"pending",context:c,variables:t,isPaused:i})}const u=await this.#r.start();return await this.#s.config.onSuccess?.(u,t,this.state.context,this,s),await this.options.onSuccess?.(u,t,this.state.context,s),await this.#s.config.onSettled?.(u,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(u,null,t,this.state.context,s),this.#i({type:"success",data:u}),u}catch(u){try{await this.#s.config.onError?.(u,t,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,t,this.state.context,s)}catch(c){Promise.reject(c)}try{await this.#s.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,s)}catch(c){Promise.reject(c)}throw this.#i({type:"error",error:u}),u}finally{this.#s.runNext(this)}}#i(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),M.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function fe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ms=class extends W{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#s=0}#t;#e;#s;build(t,e,s){const r=new vs({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(e),state:s});return this.add(r),r}add(t){this.#t.add(t);const e=st(t);if(typeof e=="string"){const s=this.#e.get(e);s?s.push(t):this.#e.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const e=st(t);if(typeof e=="string"){const s=this.#e.get(e);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&this.#e.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=st(t);if(typeof e=="string"){const r=this.#e.get(e)?.find(i=>i.state.status==="pending");return!r||r===t}else return!0}runNext(t){const e=st(t);return typeof e=="string"?this.#e.get(e)?.find(r=>
1r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){M.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const e={exact:!0,...t};return this.getAll().find(s=>Ht(e,s))}findAll(t={}){return this.getAll().filter(e=>Ht(t,e))}notify(t){M.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return M.batch(()=>Promise.all(t.map(e=>e.continue().catch(F))))}};function st(t){return t.options.scope?.id}var gs=class extends W{#t;#e=void 0;#s;#r;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),rt(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&$(e.mutationKey)!==$(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#n(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#n()}mutate(t,e){return this.#r=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#i(){const t=this.#s?.state??fe();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#n(t){M.batch(()=>{if(this.#r&&this.hasListeners()){const e=this.#e.variables,s=this.#e.context,r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,s,r)}catch(i){Promise.reject(i)}try{this.#r.onSettled?.(t.data,null,e,s,r)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,s,r)}catch(i){Promise.reject(i)}try{this.#r.onSettled?.(void 0,t.error,e,s,r)}catch(i){Promise.reject(i)}}}this.listeners.forEach(e=>{e(this.#e)})})}},bs=class extends W{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,e,s){const r=e.queryKey,i=e.queryHash??Et(r,e);let u=this.get(i);return u||(u=new fs({client:t,queryKey:r,queryHash:i,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(u)),u}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);
vendor: 7,345 bytes, line 1
1e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){M.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(s=>qt(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>qt(t,s)):e}notify(t){M.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){M.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){M.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ks=class{#t;#e;#s;#r;#i;#n;#a;#o;constructor(t={}){this.#t=t.queryCache||new bs,this.#e=t.mutationCache||new ms,this.#s=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#a=St.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#o=nt.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#t.build(this,e),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(H(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:e,state:s})=>{const r=s.data;return[e,r]})}setQueryData(t,e,s){const r=this.defaultQueryOptions({queryKey:t}),u=this.#t.get(r.queryHash)?.state.data,c=ts(e,u);if(c!==void 0)return this.#t.build(this,r).setData(c,{...s,manual:!0})}setQueriesData(t,e,s){return M.batch(()=>this.#t.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state}removeQueries(t){const e=this.#t;M.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#t;return M.batch(()=>(s.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},r=M.batch(()=>this.#t.findAll(t).map(i=>i.cancel(s)));return Promise.all(r).then(F).catch(F)}invalidateQueries(t,e={}){return M.batch(()=>(this.#t.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},r=M.batch(()=>this.#t.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let u=i.fetch(void 0,s);return s.throwOnError||(u=u.catch(F)),i.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(r).then(F)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#t.build(this,e);return s.isStaleByTime(H(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(F).catch(F)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(F).catch(F)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return nt.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,e){this.#r.set($(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(r=>{X(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,e){this.#i.set($(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#i.values()],s={};return e.forEach(r=>{X(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Et(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Rt&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},de=b.createContext(void 0),pe=t=>{const e=b.useContext(de);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Us=({client:t,children:e})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Ce.jsx(de.Provider,{value:t,children:e})),ye=b.createContext(!1),Ss=()=>b.useContext(ye);ye.Provider;function Es(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Rs=b.createContext(Es()),Os=()=>b.useContext(Rs),Cs=(t,e,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?Ot(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},_s=t=>{b.useEffect(()=>{t.clearReset()},[t])},ws=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||Ot(s,[t.error,r])),Ps=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Ts=(t,e)=>t.isLoading&&t.isFetching&&!e,Ms=(t,e)=>t?.suspense&&e.isPending,Wt=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function xs(t,e,s){const r=Ss(),i=Os(),u=pe(),c=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=u.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",Ps(c),Cs(c,i,f),_s(i);const a=!u.getQueryCache().get(c.queryHash),[o]=b.useState(()=>new e(u,c)),l=o.getOptimisticResult(c),d=!r&&t.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(p=>{const O=d?o.subscribe(M.batchCalls(p)):F;return o.updateResult(),O},[o,d]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),b.useEffect(()=>{o.setOptions(c)},[c,o]),Ms(c,l))throw Wt(c,o,i);if(ws({result:l,errorResetBoundary:i,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw l.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(c,l),c.experimental_prefetchInRender&&!Z.isServer()&&Ts(l,r)&&(a?Wt(c,o,i):f?.promise)?.catch(F).finally(()=>{o.updateResult()}),c.notifyOnChangeProps?l:o.trackResult(l)}function Ls(t,e){return xs(t,ds)}function qs(t,e){const s=pe(),[r]=b.useState(()=>new gs(s,t));b.useEffect(()=>{r.setOptions(t)},[r,t]);const i=b.useSyncExternalStore(b.useCallback(c=>r.subscribe(M.batchCalls(c)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),u=b.useCallback((c,f)=>{r.mutate(c,f).catch(F)},[r]);if(i.error&&Ot(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{Is as L,ks as Q,Te as R,js as S,vt as a,As as b,Me as c,Us as d,Ye as e,Ds as f,Ee as g,Qs as h,qs as i,
1Ce as j,Be as k,Ls as l,b as r,Fs as u};

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.