(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[845],{62601:function(t,e,n){"use strict";var r,u;t.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(u=n.g.process)?void 0:u.env)?n.g.process:n(58960)},58960:function(t){!function(){var e={229:function(t){var e,n,r,u=t.exports={};function o(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function c(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(t){n=i}}();var a=[],s=!1,l=-1;function f(){s&&r&&(s=!1,r.length?a=r.concat(a):l=-1,a.length&&d())}function d(){if(!s){var t=c(f);s=!0;for(var e=a.length;e;){for(r=a,a=[];++l1)for(var n=1;nt.forEach(t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)})}function o(...t){return(0,r.useCallback)(u(...t),t)}},56989:function(t,e,n){"use strict";n.d(e,{b:function(){return o},k:function(){return u}});var r=n(2265);function u(t,e){let n=(0,r.createContext)(e);function u(t){let{children:e,...u}=t,o=(0,r.useMemo)(()=>u,Object.values(u));return(0,r.createElement)(n.Provider,{value:o},e)}return u.displayName=t+"Provider",[u,function(u){let o=(0,r.useContext)(n);if(o)return o;if(void 0!==e)return e;throw Error(`\`${u}\` must be used within \`${t}\``)}]}function o(t,e=[]){let n=[],u=()=>{let e=n.map(t=>(0,r.createContext)(t));return function(n){let u=(null==n?void 0:n[t])||e;return(0,r.useMemo)(()=>({[`__scope${t}`]:{...n,[t]:u}}),[n,u])}};return u.scopeName=t,[function(e,u){let o=(0,r.createContext)(u),i=n.length;function c(e){let{scope:n,children:u,...c}=e,a=(null==n?void 0:n[t][i])||o,s=(0,r.useMemo)(()=>c,Object.values(c));return(0,r.createElement)(a.Provider,{value:s},u)}return n=[...n,u],c.displayName=e+"Provider",[c,function(n,c){let a=(null==c?void 0:c[t][i])||o,s=(0,r.useContext)(a);if(s)return s;if(void 0!==u)return u;throw Error(`\`${n}\` must be used within \`${e}\``)}]},function(...t){let e=t[0];if(1===t.length)return e;let n=()=>{let n=t.map(t=>({useScope:t(),scopeName:t.scopeName}));return function(t){let u=n.reduce((e,{useScope:n,scopeName:r})=>{let u=n(t),o=u[`__scope${r}`];return{...e,...o}},{});return(0,r.useMemo)(()=>({[`__scope${e.scopeName}`]:u}),[u])}};return n.scopeName=e.scopeName,n}(u,...e)]}},20966:function(t,e,n){"use strict";n.d(e,{M:function(){return a}});var r,u=n(2265),o=n(51030);let i=(r||(r=n.t(u,2)))["useId".toString()]||(()=>void 0),c=0;function a(t){let[e,n]=u.useState(i());return(0,o.b)(()=>{t||n(t=>null!=t?t:String(c++))},[t]),t||(e?`radix-${e}`:"")}},85606:function(t,e,n){"use strict";n.d(e,{z:function(){return c}});var r=n(2265),u=n(54887),o=n(42210),i=n(51030);let c=t=>{let{present:e,children:n}=t,c=function(t){var e;let[n,o]=(0,r.useState)(),c=(0,r.useRef)({}),s=(0,r.useRef)(t),l=(0,r.useRef)("none"),f=t?"mounted":"unmounted",[d,p]=(e={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},(0,r.useReducer)((t,n)=>{let r=e[t][n];return null!=r?r:t},f));return(0,r.useEffect)(()=>{let t=a(c.current);l.current="mounted"===d?t:"none"},[d]),(0,i.b)(()=>{let e=c.current,n=s.current,r=n!==t;if(r){let r=l.current,u=a(e);t?p("MOUNT"):"none"===u||(null==e?void 0:e.display)==="none"?p("UNMOUNT"):n&&r!==u?p("ANIMATION_OUT"):p("UNMOUNT"),s.current=t}},[t,p]),(0,i.b)(()=>{if(n){let t=t=>{let e=a(c.current),r=e.includes(t.animationName);t.target===n&&r&&(0,u.flushSync)(()=>p("ANIMATION_END"))},e=t=>{t.target===n&&(l.current=a(c.current))};return n.addEventListener("animationstart",e),n.addEventListener("animationcancel",t),n.addEventListener("animationend",t),()=>{n.removeEventListener("animationstart",e),n.removeEventListener("animationcancel",t),n.removeEventListener("animationend",t)}}p("ANIMATION_END")},[n,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:(0,r.useCallback)(t=>{t&&(c.current=getComputedStyle(t)),o(t)},[])}}(e),s="function"==typeof n?n({present:c.isPresent}):r.Children.only(n),l=(0,o.e)(c.ref,s.ref),f="function"==typeof n;return f||c.isPresent?(0,r.cloneElement)(s,{ref:l}):null};function a(t){return(null==t?void 0:t.animationName)||"none"}c.displayName="Presence"},9381:function(t,e,n){"use strict";n.d(e,{WV:function(){return c},jH:function(){return a}});var r=n(13428),u=n(2265),o=n(54887),i=n(67256);let c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((t,e)=>{let n=(0,u.forwardRef)((t,n)=>{let{asChild:o,...c}=t,a=o?i.g7:e;return(0,u.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,u.createElement)(a,(0,r.Z)({},c,{ref:n}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function a(t,e){t&&(0,o.flushSync)(()=>t.dispatchEvent(e))}},67256:function(t,e,n){"use strict";n.d(e,{A4:function(){return a},g7:function(){return i}});var r=n(13428),u=n(2265),o=n(42210);let i=(0,u.forwardRef)((t,e)=>{let{children:n,...o}=t,i=u.Children.toArray(n),a=i.find(s);if(a){let t=a.props.children,n=i.map(e=>e!==a?e:u.Children.count(t)>1?u.Children.only(null):(0,u.isValidElement)(t)?t.props.children:null);return(0,u.createElement)(c,(0,r.Z)({},o,{ref:e}),(0,u.isValidElement)(t)?(0,u.cloneElement)(t,void 0,n):null)}return(0,u.createElement)(c,(0,r.Z)({},o,{ref:e}),n)});i.displayName="Slot";let c=(0,u.forwardRef)((t,e)=>{let{children:n,...r}=t;return(0,u.isValidElement)(n)?(0,u.cloneElement)(n,{...function(t,e){let n={...e};for(let r in e){let u=t[r],o=e[r],i=/^on[A-Z]/.test(r);i?u&&o?n[r]=(...t)=>{o(...t),u(...t)}:u&&(n[r]=u):"style"===r?n[r]={...u,...o}:"className"===r&&(n[r]=[u,o].filter(Boolean).join(" "))}return{...t,...n}}(r,n.props),ref:e?(0,o.F)(e,n.ref):n.ref}):u.Children.count(n)>1?u.Children.only(null):null});c.displayName="SlotClone";let a=({children:t})=>(0,u.createElement)(u.Fragment,null,t);function s(t){return(0,u.isValidElement)(t)&&t.type===a}},16459:function(t,e,n){"use strict";n.d(e,{W:function(){return u}});var r=n(2265);function u(t){let e=(0,r.useRef)(t);return(0,r.useEffect)(()=>{e.current=t}),(0,r.useMemo)(()=>(...t)=>{var n;return null===(n=e.current)||void 0===n?void 0:n.call(e,...t)},[])}},73763:function(t,e,n){"use strict";n.d(e,{T:function(){return o}});var r=n(2265),u=n(16459);function o({prop:t,defaultProp:e,onChange:n=()=>{}}){let[o,i]=function({defaultProp:t,onChange:e}){let n=(0,r.useState)(t),[o]=n,i=(0,r.useRef)(o),c=(0,u.W)(e);return(0,r.useEffect)(()=>{i.current!==o&&(c(o),i.current=o)},[o,i,c]),n}({defaultProp:e,onChange:n}),c=void 0!==t,a=c?t:o,s=(0,u.W)(n),l=(0,r.useCallback)(e=>{if(c){let n="function"==typeof e?e(t):e;n!==t&&s(n)}else i(e)},[c,t,i,s]);return[a,l]}},12488:function(t,e,n){"use strict";n.d(e,{e:function(){return o}});var r=n(2265),u=n(16459);function o(t,e=null==globalThis?void 0:globalThis.document){let n=(0,u.W)(t);(0,r.useEffect)(()=>{let t=t=>{"Escape"===t.key&&n(t)};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)},[n,e])}},51030:function(t,e,n){"use strict";n.d(e,{b:function(){return u}});var r=n(2265);let u=(null==globalThis?void 0:globalThis.document)?r.useLayoutEffect:()=>{}},97461:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(26785),u=function(t,e){for(var n=t.length;n--;)if((0,r.Z)(t[n][0],e))return n;return -1},o=Array.prototype.splice;function i(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1},i.prototype.set=function(t,e){var n=this.__data__,r=u(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var c=i},6219:function(t,e,n){"use strict";var r=n(12805),u=n(90440),o=(0,r.Z)(u.Z,"Map");e.Z=o},90728:function(t,e,n){"use strict";n.d(e,{Z:function(){return d}});var r=(0,n(12805).Z)(Object,"create"),u=Object.prototype.hasOwnProperty,o=Object.prototype.hasOwnProperty;function i(t){var e=-1,n=null==t?0:t.length;for(this.clear();++es))return!1;var f=o.get(t),d=o.get(e);if(f&&d)return f==e&&d==t;var p=-1,v=!0,h=2&n?new c:void 0;for(o.set(t,e),o.set(e,t);++p-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}},64164:function(t,e){"use strict";e.Z=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},92403:function(t,e){"use strict";e.Z=function(t){return null!=t&&"object"==typeof t}},45856:function(t,e,n){"use strict";var r=n(87916),u=n(92403);e.Z=function(t){return"symbol"==typeof t||(0,u.Z)(t)&&"[object Symbol]"==(0,r.Z)(t)}},36773:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var r=n(87916),u=n(1758),o=n(92403),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1;var c=n(18838),a="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=a&&"object"==typeof module&&module&&!module.nodeType&&module,l=s&&s.exports===a&&c.Z.process,f=function(){try{var t=s&&s.require&&s.require("util").types;if(t)return t;return l&&l.binding&&l.binding("util")}catch(t){}}(),d=f&&f.isTypedArray,p=d?function(t){return d(t)}:function(t){return(0,o.Z)(t)&&(0,u.Z)(t.length)&&!!i[(0,r.Z)(t)]}},35805:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(86070),u=n(26343),o=(0,n(16917).Z)(Object.keys,Object),i=Object.prototype.hasOwnProperty,c=function(t){if(!(0,u.Z)(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e},a=n(85222),s=function(t){return(0,a.Z)(t)?(0,r.Z)(t):c(t)}},26772:function(t,e){"use strict";e.Z=function(){return[]}},41690:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(4091),u=1/0,o=function(t){var e,n=(e=t)?(e=(0,r.Z)(e))===u||e===-u?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0,o=n%1;return n==n?o?n-o:n:0}},4091:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var r=/\s/,u=function(t){for(var e=t.length;e--&&r.test(t.charAt(e)););return e},o=/^\s+/,i=n(64164),c=n(45856),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,f=/^0o[0-7]+$/i,d=parseInt,p=function(t){if("number"==typeof t)return t;if((0,c.Z)(t))return a;if((0,i.Z)(t)){var e,n="function"==typeof t.valueOf?t.valueOf():t;t=(0,i.Z)(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=(e=t)?e.slice(0,u(e)+1).replace(o,""):e;var r=l.test(t);return r||f.test(t)?d(t.slice(2),r?2:8):s.test(t)?a:+t}},44796:function(t,e,n){"use strict";n.d(e,{$l:function(){return i},BN:function(){return V},DY:function(){return v},J$:function(){return W},JN:function(){return Z},LI:function(){return A},PM:function(){return s},W6:function(){return S},i_:function(){return o},ko:function(){return K},kw:function(){return N},mf:function(){return a},o8:function(){return c},qC:function(){return C},s6:function(){return H},sj:function(){return P},u3:function(){return x},u_:function(){return z},w6:function(){return T},xD:function(){return Q}});var r=n(2265);let u=()=>{},o=u(),i=Object,c=t=>t===o,a=t=>"function"==typeof t,s=(t,e)=>({...t,...e}),l=t=>a(t.then),f=new WeakMap,d=0,p=t=>{let e,n;let r=typeof t,u=t&&t.constructor,o=u==Date;if(i(t)!==t||o||u==RegExp)e=o?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=f.get(t))return e;if(e=++d+"~",f.set(t,e),u==Array){for(n=0,e="@";n_&&typeof window.requestAnimationFrame!=b,Z=(t,e)=>{let n=v.get(t);return[()=>!c(e)&&t.get(e)||h,r=>{if(!c(e)){let u=t.get(e);e in y||(y[e]=u),n[5](e,s(u,r),u||h)}},n[6],()=>!c(e)&&e in y?y[e]:!c(e)&&t.get(e)||h]},w=!0,[E,j]=_&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[u,u],O={initFocus:t=>(g&&document.addEventListener("visibilitychange",t),E("focus",t),()=>{g&&document.removeEventListener("visibilitychange",t),j("focus",t)}),initReconnect:t=>{let e=()=>{w=!0,t()},n=()=>{w=!1};return E("online",e),E("offline",n),()=>{j("online",e),j("offline",n)}}},T=!r.useId,S=!_||"Deno"in window,N=t=>m()?window.requestAnimationFrame(t):setTimeout(t,1),A=S?r.useEffect:r.useLayoutEffect,R="undefined"!=typeof navigator&&navigator.connection,k=!S&&R&&(["slow-2g","2g"].includes(R.effectiveType)||R.saveData),C=t=>{if(a(t))try{t=t()}catch(e){t=""}let e=t;return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?p(t):"",e]},L=0,x=()=>++L;var P={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function V(...t){let[e,n,r,u]=t,i=s({populateCache:!0,throwOnError:!0},"boolean"==typeof u?{revalidate:u}:u||{}),f=i.populateCache,d=i.rollbackOnError,p=i.optimisticData,h=!1!==i.revalidate,y=t=>"function"==typeof d?d(t):!1!==d,b=i.throwOnError;if(a(n)){let t=[],r=e.keys();for(let u of r)!/^\$(inf|sub)\$/.test(u)&&n(e.get(u)._k)&&t.push(u);return Promise.all(t.map(_))}return _(n);async function _(n){let u;let[i]=C(n);if(!i)return;let[s,d]=Z(e,i),[_,g,m,w]=v.get(e),E=()=>{let t=_[i];return h&&(delete m[i],delete w[i],t&&t[0])?t[0](2).then(()=>s().data):s().data};if(t.length<3)return E();let j=r,O=x();g[i]=[O,0];let T=!c(p),S=s(),N=S.data,A=S._c,R=c(A)?N:A;if(T&&d({data:p=a(p)?p(R,N):p,_c:R}),a(j))try{j=j(R)}catch(t){u=t}if(j&&l(j)){if(j=await j.catch(t=>{u=t}),O!==g[i][0]){if(u)throw u;return j}u&&T&&y(u)&&(f=!0,d({data:R,_c:o}))}if(f&&!u){if(a(f)){let t=f(j,R);d({data:t,error:o,_c:o})}else d({data:j,error:o,_c:o})}if(g[i][1]=x(),Promise.resolve(E()).then(()=>{d({_c:o})}),u){if(b)throw u;return}return j}}let M=(t,e)=>{for(let n in t)t[n][0]&&t[n][0](e)},I=(t,e)=>{if(!v.has(t)){let n=s(O,e),r={},i=V.bind(o,t),c=u,a={},l=(t,e)=>{let n=a[t]||[];return a[t]=n,n.push(e),()=>n.splice(n.indexOf(e),1)},f=(e,n,r)=>{t.set(e,n);let u=a[e];if(u)for(let t of u)t(n,r)},d=()=>{if(!v.has(t)&&(v.set(t,[r,{},{},{},i,f,l]),!S)){let e=n.initFocus(setTimeout.bind(o,M.bind(o,r,0))),u=n.initReconnect(setTimeout.bind(o,M.bind(o,r,1)));c=()=>{e&&e(),u&&u(),v.delete(t)}}};return d(),[t,i,d,c]}return[t,v.get(t)[4]]},[$,D]=I(new Map),z=s({onLoadingSlow:u,onSuccess:u,onError:u,onErrorRetry:(t,e,n,r,u)=>{let o=n.errorRetryCount,i=u.retryCount,a=~~((Math.random()+.5)*(1<<(i<8?i:8)))*n.errorRetryInterval;(c(o)||!(i>o))&&setTimeout(r,a,u)},onDiscarded:u,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:k?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:k?5e3:3e3,compare:(t,e)=>p(t)==p(e),isPaused:()=>!1,cache:$,mutate:D,fallback:{}},{isOnline:()=>w,isVisible:()=>{let t=g&&document.visibilityState;return c(t)||"hidden"!==t}}),U=(t,e)=>{let n=s(t,e);if(e){let{use:r,fallback:u}=t,{use:o,fallback:i}=e;r&&o&&(n.use=r.concat(o)),u&&i&&(n.fallback=s(u,i))}return n},F=(0,r.createContext)({}),W=t=>{let{value:e}=t,n=(0,r.useContext)(F),u=a(e),i=(0,r.useMemo)(()=>u?e(n):e,[u,n,e]),c=(0,r.useMemo)(()=>u?i:U(n,i),[u,n,i]),l=i&&i.provider,f=(0,r.useRef)(o);l&&!f.current&&(f.current=I(l(c.cache||$),i));let d=f.current;return d&&(c.cache=d[0],c.mutate=d[1]),A(()=>{if(d)return d[2]&&d[2](),d[3]},[]),(0,r.createElement)(F.Provider,s(t,{value:c}))},B=_&&window.__SWR_DEVTOOLS_USE__,q=B?window.__SWR_DEVTOOLS_USE__:[],J=t=>a(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}],Y=()=>s(z,(0,r.useContext)(F)),G=q.concat(t=>(e,n,r)=>{let u=n&&((...t)=>{let[r]=C(e),[,,,u]=v.get($);if(r.startsWith("$inf$"))return n(...t);let o=u[r];return c(o)?n(...t):(delete u[r],o)});return t(e,u,r)}),H=t=>function(...e){let n=Y(),[r,u,o]=J(e),i=U(n,o),c=t,{use:a}=i,s=(a||[]).concat(G);for(let t=s.length;t--;)c=s[t](c);return c(r,u||i.fetcher||null,i)},K=(t,e,n)=>{let r=e[t]||(e[t]=[]);return r.push(n),()=>{let t=r.indexOf(n);t>=0&&(r[t]=r[r.length-1],r.pop())}},Q=(t,e)=>(...n)=>{let[r,u,o]=J(n),i=(o.use||[]).concat(e);return t(r,u,{...o,use:i})};B&&(window.__SWR_DEVTOOLS_REACT__=r)},30713:function(t,e,n){"use strict";n.d(e,{ZP:function(){return a}});var r=n(2265),u=n(26272),o=n(44796);let i=r.use||(t=>{if("pending"===t.status)throw t;if("fulfilled"===t.status)return t.value;if("rejected"===t.status)throw t.reason;throw t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t}),c={dedupe:!0};o.$l.defineProperty(o.J$,"defaultValue",{value:o.u_});let a=(0,o.s6)((t,e,n)=>{let{cache:a,compare:s,suspense:l,fallbackData:f,revalidateOnMount:d,revalidateIfStale:p,refreshInterval:v,refreshWhenHidden:h,refreshWhenOffline:y,keepPreviousData:b}=n,[_,g,m,Z]=o.DY.get(a),[w,E]=(0,o.qC)(t),j=(0,r.useRef)(!1),O=(0,r.useRef)(!1),T=(0,r.useRef)(w),S=(0,r.useRef)(e),N=(0,r.useRef)(n),A=()=>N.current,R=()=>A().isVisible()&&A().isOnline(),[k,C,L,x]=(0,o.JN)(a,w),P=(0,r.useRef)({}).current,V=(0,o.o8)(f)?n.fallback[w]:f,M=(t,e)=>{for(let n in P)if("data"===n){if(!s(t[n],e[n])&&(!(0,o.o8)(t[n])||!s(q,e[n])))return!1}else if(e[n]!==t[n])return!1;return!0},I=(0,r.useMemo)(()=>{let t=!!w&&!!e&&((0,o.o8)(d)?!A().isPaused()&&!l&&(!!(0,o.o8)(p)||p):d),n=e=>{let n=(0,o.PM)(e);return(delete n._k,t)?{isValidating:!0,isLoading:!0,...n}:n},r=k(),u=x(),i=n(r),c=r===u?i:n(u),a=i;return[()=>{let t=n(k()),e=M(t,a);return e?(a.data=t.data,a.isLoading=t.isLoading,a.isValidating=t.isValidating,a.error=t.error,a):(a=t,t)},()=>c]},[a,w]),$=(0,u.useSyncExternalStore)((0,r.useCallback)(t=>L(w,(e,n)=>{M(n,e)||t()}),[a,w]),I[0],I[1]),D=!j.current,z=_[w]&&_[w].length>0,U=$.data,F=(0,o.o8)(U)?V:U,W=$.error,B=(0,r.useRef)(F),q=b?(0,o.o8)(U)?B.current:U:F,J=(!z||!!(0,o.o8)(W))&&(D&&!(0,o.o8)(d)?d:!A().isPaused()&&(l?!(0,o.o8)(F)&&p:(0,o.o8)(F)||p)),Y=!!(w&&e&&D&&J),G=(0,o.o8)($.isValidating)?Y:$.isValidating,H=(0,o.o8)($.isLoading)?Y:$.isLoading,K=(0,r.useCallback)(async t=>{let e,r;let u=S.current;if(!w||!u||O.current||A().isPaused())return!1;let i=!0,c=t||{},a=!m[w]||!c.dedupe,l=()=>o.w6?!O.current&&w===T.current&&j.current:w===T.current,f={isValidating:!1,isLoading:!1},d=()=>{C(f)},p=()=>{let t=m[w];t&&t[1]===r&&delete m[w]},v={isValidating:!0};(0,o.o8)(k().data)&&(v.isLoading=!0);try{if(a&&(C(v),n.loadingTimeout&&(0,o.o8)(k().data)&&setTimeout(()=>{i&&l()&&A().onLoadingSlow(w,n)},n.loadingTimeout),m[w]=[u(E),(0,o.u3)()]),[e,r]=m[w],e=await e,a&&setTimeout(p,n.dedupingInterval),!m[w]||m[w][1]!==r)return a&&l()&&A().onDiscarded(w),!1;f.error=o.i_;let t=g[w];if(!(0,o.o8)(t)&&(r<=t[0]||r<=t[1]||0===t[1]))return d(),a&&l()&&A().onDiscarded(w),!1;let c=k().data;f.data=s(c,e)?c:e,a&&l()&&A().onSuccess(e,w,n)}catch(n){p();let t=A(),{shouldRetryOnError:e}=t;!t.isPaused()&&(f.error=n,a&&l()&&(t.onError(n,w,t),(!0===e||(0,o.mf)(e)&&e(n))&&R()&&t.onErrorRetry(n,w,t,t=>{let e=_[w];e&&e[0]&&e[0](o.sj.ERROR_REVALIDATE_EVENT,t)},{retryCount:(c.retryCount||0)+1,dedupe:!0})))}return i=!1,d(),!0},[w,a]),Q=(0,r.useCallback)((...t)=>(0,o.BN)(a,T.current,...t),[]);if((0,o.LI)(()=>{S.current=e,N.current=n,(0,o.o8)(U)||(B.current=U)}),(0,o.LI)(()=>{if(!w)return;let t=K.bind(o.i_,c),e=0,n=(0,o.ko)(w,_,(n,r={})=>{if(n==o.sj.FOCUS_EVENT){let n=Date.now();A().revalidateOnFocus&&n>e&&R()&&(e=n+A().focusThrottleInterval,t())}else if(n==o.sj.RECONNECT_EVENT)A().revalidateOnReconnect&&R()&&t();else if(n==o.sj.MUTATE_EVENT)return K();else if(n==o.sj.ERROR_REVALIDATE_EVENT)return K(r)});return O.current=!1,T.current=w,j.current=!0,C({_k:E}),J&&((0,o.o8)(F)||o.W6?t():(0,o.kw)(t)),()=>{O.current=!0,n()}},[w]),(0,o.LI)(()=>{let t;function e(){let e=(0,o.mf)(v)?v(k().data):v;e&&-1!==t&&(t=setTimeout(n,e))}function n(){!k().error&&(h||A().isVisible())&&(y||A().isOnline())?K(c).then(e):e()}return e(),()=>{t&&(clearTimeout(t),t=-1)}},[v,h,y,w]),(0,r.useDebugValue)(q),l&&(0,o.o8)(F)&&w){if(!o.w6&&o.W6)throw Error("Fallback data is required when using suspense in SSR.");S.current=e,N.current=n,O.current=!1;let t=Z[w];if(!(0,o.o8)(t)){let e=Q(t);i(e)}if((0,o.o8)(W)){let t=K(c);(0,o.o8)(q)||(t.status="fulfilled",t.value=!0),i(t)}else throw W}return{mutate:Q,get data(){return P.data=!0,q},get error(){return P.error=!0,W},get isValidating(){return P.isValidating=!0,G},get isLoading(){return P.isLoading=!0,H}}})}}]);