From c300621be36f3f1c54b46d7d751ba06088e99013 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 9 Nov 2026 13:15:30 -0500 Subject: [PATCH 1/2] fix(js): ImageOutput shows errors and uses the renderer's alt text An erroring render function left the last image on screen with no message. ImageOutput now swaps the image for the error message, with the same shiny-output-error classes Shiny's renderError() adds. The alt comes from renderPlot(alt =) / @render.plot(alt=) instead of a hardcoded "". Fixes posit-dev/shinyreact#327 --- FEATURES.md | 11 ++ pkg-js/CHANGELOG.md | 4 + pkg-js/dist/shinyreact.js | 18 ++-- pkg-js/src/shiny-react/ImageOutput.tsx | 30 +++++- .../__tests__/ImageOutput.test.tsx | 101 ++++++++++++++++++ pkg-py/src/shinyreact/www/shinyreact.js | 18 ++-- pkg-r/inst/lib/shiny/shinyreact.js | 18 ++-- 7 files changed, 172 insertions(+), 28 deletions(-) diff --git a/FEATURES.md b/FEATURES.md index 0499cc81..c82c35cf 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -658,6 +658,17 @@ registries are exposed on `window.Shiny.reactRegistry`; the message registry on values, so nothing sets it - `onRecalculating` is called with whether the output status is `"recalculating"` +- the `` `alt` is the renderer's `alt` (`renderPlot(alt =)` / + `@render.plot(alt=)`), or `""` when the value carries none (#327) +- an output error replaces the image with a div holding the message (#327) + - the last image is **not** kept on screen + - classes match Shiny's `renderError()`: `shiny-output-error`, one + `shiny-output-error-` per error type (an R one-class `type` arrives + as a plain string and is accepted), then `className` + - `width` / `height` still apply, so the layout does not jump + - the image comes back once the error clears and a value arrives + - silent errors (`req()`) carry no message and are not errors here: they + arrive as a `null` value, so the placeholder shows - two `ImageOutput`s sharing an id both receive the same image, sized for only one of them diff --git a/pkg-js/CHANGELOG.md b/pkg-js/CHANGELOG.md index caf83577..a2d9e78a 100644 --- a/pkg-js/CHANGELOG.md +++ b/pkg-js/CHANGELOG.md @@ -8,6 +8,10 @@ IDs were found" warning grew and the console logged `Output not found` (#330). +- `ImageOutput` hides the last image and shows the error message when the + render function errors, with Shiny's `shiny-output-error` classes. Its + `` now uses the renderer's `alt` text instead of `alt=""` (#327). + - `useShinyOutputValue()` is now typed `T | null | undefined`. A server `NULL` / `None` arrives as `null`, which the old `T | undefined` type hid. Passing a `defaultValue` narrows it to `T | null` (#329). diff --git a/pkg-js/dist/shinyreact.js b/pkg-js/dist/shinyreact.js index 1191a98a..d0d1751b 100644 --- a/pkg-js/dist/shinyreact.js +++ b/pkg-js/dist/shinyreact.js @@ -1,4 +1,4 @@ -var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0,configurable:!0,writable:!0,value:ae}):ue[et]=ae;var I=(ue,et,ae)=>hm(ue,typeof et!="symbol"?et+"":et,ae);(function(){"use strict";function ue(t,l){for(var e=0;eu[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function et(){if(!(typeof window>"u"))return window.Shiny}let ae=!1;function Z0(){if(typeof document>"u"||ae)return;ae=!0;const t=()=>{const e=et();e&&(e.addCustomMessageHandler("shinyreact-deps",async u=>{var a,n;try{const i=e;await((a=i.renderDependenciesAsync)==null?void 0:a.call(i,u)),await((n=i.bindAll)==null?void 0:n.call(i,document.documentElement))}catch(i){console.error("[shinyreact] failed to load pushed dependencies:",i)}}),e.initializedPromise.then(()=>{var u;(u=e.setInputValue)==null||u.call(e,".shinyreact_init:shinyreact.init",1)}))};if(et()){t();return}const l=()=>{et()&&(document.removeEventListener("shiny:connected",l),t())};document.addEventListener("shiny:connected",l)}function Gc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jc={exports:{}},D={};/** +var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0,configurable:!0,writable:!0,value:ae}):ue[et]=ae;var I=(ue,et,ae)=>hm(ue,typeof et!="symbol"?et+"":et,ae);(function(){"use strict";function ue(t,l){for(var e=0;eu[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function et(){if(!(typeof window>"u"))return window.Shiny}let ae=!1;function x0(){if(typeof document>"u"||ae)return;ae=!0;const t=()=>{const e=et();e&&(e.addCustomMessageHandler("shinyreact-deps",async u=>{var a,n;try{const i=e;await((a=i.renderDependenciesAsync)==null?void 0:a.call(i,u)),await((n=i.bindAll)==null?void 0:n.call(i,document.documentElement))}catch(i){console.error("[shinyreact] failed to load pushed dependencies:",i)}}),e.initializedPromise.then(()=>{var u;(u=e.setInputValue)==null||u.call(e,".shinyreact_init:shinyreact.init",1)}))};if(et()){t();return}const l=()=>{et()&&(document.removeEventListener("shiny:connected",l),t())};document.addEventListener("shiny:connected",l)}function jc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gc={exports:{}},D={};/** * @license React * react.production.js * @@ -6,7 +6,7 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Fn=Symbol.for("react.transitional.element"),x0=Symbol.for("react.portal"),L0=Symbol.for("react.fragment"),K0=Symbol.for("react.strict_mode"),J0=Symbol.for("react.profiler"),w0=Symbol.for("react.consumer"),$0=Symbol.for("react.context"),W0=Symbol.for("react.forward_ref"),F0=Symbol.for("react.suspense"),k0=Symbol.for("react.memo"),Xc=Symbol.for("react.lazy"),I0=Symbol.for("react.activity"),Qc=Symbol.iterator;function P0(t){return t===null||typeof t!="object"?null:(t=Qc&&t[Qc]||t["@@iterator"],typeof t=="function"?t:null)}var Zc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xc=Object.assign,Lc={};function Me(t,l,e){this.props=t,this.context=l,this.refs=Lc,this.updater=e||Zc}Me.prototype.isReactComponent={},Me.prototype.setState=function(t,l){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,l,"setState")},Me.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Kc(){}Kc.prototype=Me.prototype;function kn(t,l,e){this.props=t,this.context=l,this.refs=Lc,this.updater=e||Zc}var In=kn.prototype=new Kc;In.constructor=kn,xc(In,Me.prototype),In.isPureReactComponent=!0;var Jc=Array.isArray;function Pn(){}var w={H:null,A:null,T:null,S:null},wc=Object.prototype.hasOwnProperty;function ti(t,l,e){var u=e.ref;return{$$typeof:Fn,type:t,key:l,ref:u!==void 0?u:null,props:e}}function th(t,l){return ti(t.type,l,t.props)}function li(t){return typeof t=="object"&&t!==null&&t.$$typeof===Fn}function lh(t){var l={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(e){return l[e]})}var $c=/\/+/g;function ei(t,l){return typeof t=="object"&&t!==null&&t.key!=null?lh(""+t.key):l.toString(36)}function eh(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(Pn,Pn):(t.status="pending",t.then(function(l){t.status==="pending"&&(t.status="fulfilled",t.value=l)},function(l){t.status==="pending"&&(t.status="rejected",t.reason=l)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function De(t,l,e,u,a){var n=typeof t;(n==="undefined"||n==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(n){case"bigint":case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case Fn:case x0:i=!0;break;case Xc:return i=t._init,De(i(t._payload),l,e,u,a)}}if(i)return a=a(t),i=u===""?"."+ei(t,0):u,Jc(a)?(e="",i!=null&&(e=i.replace($c,"$&/")+"/"),De(a,l,e,"",function(d){return d})):a!=null&&(li(a)&&(a=th(a,e+(a.key==null||t&&t.key===a.key?"":(""+a.key).replace($c,"$&/")+"/")+i)),l.push(a)),1;i=0;var f=u===""?".":u+":";if(Jc(t))for(var c=0;cet in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function l(T,Y){var N=T.length;T.push(Y);t:for(;0>>1,vt=T[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(T[nt]=Wn,T[_e]=N,nt=_e):(T[nt]=Vc,T[$n]=N,nt=$n);else if(_ea(Wn,N))T[nt]=Wn,T[_e]=N,nt=_e;else break t}}return Y}function a(T,Y){var N=T.sortIndex-Y.sortIndex;return N!==0?N:T.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,A=!1,H=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(T){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=T)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function E(T){if(A=!1,S(T),!b)if(e(c)!==null)b=!0,_||(_=!0,ee());else{var Y=e(d);Y!==null&&qc(E,Y.startTime-T)}}var _=!1,z=-1,p=5,M=-1;function R(){return H?!0:!(t.unstable_now()-MT&&R());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=T);if(T=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(T),Y=!0;break l}m===e(c)&&u(c),S(T)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(E,wn.startTime-T),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():_=!1}}}var ee;if(typeof h=="function")ee=function(){h(It)};else if(typeof MessageChannel<"u"){var Q0=new MessageChannel,dm=Q0.port2;Q0.port1.onmessage=It,ee=function(){dm.postMessage(null)}}else ee=function(){o(It,0)};function qc(T,Y){z=o(function(){T(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125nt?(T.sortIndex=N,l(d,T),e(c)===null&&T===e(d)&&(A?(s(z),z=-1):A=!0,qc(E,N-nt))):(T.sortIndex=vt,l(c,T),b||v||(b=!0,_||(_=!0,ee()))),T},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(T){var Y=y;return function(){var N=y;y=Y;try{return T.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var nh=Ic.exports,ts={exports:{}},zt={};/** + */(function(t){function l(z,Y){var N=z.length;z.push(Y);t:for(;0>>1,vt=z[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(z[nt]=Wn,z[_e]=N,nt=_e):(z[nt]=Vc,z[$n]=N,nt=$n);else if(_ea(Wn,N))z[nt]=Wn,z[_e]=N,nt=_e;else break t}}return Y}function a(z,Y){var N=z.sortIndex-Y.sortIndex;return N!==0?N:z.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,p=!1,R=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(z){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=z)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function T(z){if(p=!1,S(z),!b)if(e(c)!==null)b=!0,A||(A=!0,ee());else{var Y=e(d);Y!==null&&qc(T,Y.startTime-z)}}var A=!1,E=-1,O=5,M=-1;function H(){return R?!0:!(t.unstable_now()-Mz&&H());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=z);if(z=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(z),Y=!0;break l}m===e(c)&&u(c),S(z)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(T,wn.startTime-z),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():A=!1}}}var ee;if(typeof h=="function")ee=function(){h(At)};else if(typeof MessageChannel<"u"){var Z0=new MessageChannel,dm=Z0.port2;Z0.port1.onmessage=At,ee=function(){dm.postMessage(null)}}else ee=function(){o(At,0)};function qc(z,Y){E=o(function(){z(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125nt?(z.sortIndex=N,l(d,z),e(c)===null&&z===e(d)&&(p?(s(E),E=-1):p=!0,qc(T,N-nt))):(z.sortIndex=vt,l(c,z),b||v||(b=!0,A||(A=!0,ee()))),z},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(z){var Y=y;return function(){var N=y;y=Y;try{return z.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var ih=Ic.exports,ts={exports:{}},zt={};/** * @license React * react-dom.production.js * @@ -22,7 +22,7 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ih=V;function ls(t){var l="https://react.dev/errors/"+t;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(es)}catch(t){console.error(t)}}es(),ts.exports=zt;var sh=ts.exports;/** + */var fh=V;function ls(t){var l="https://react.dev/errors/"+t;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(es)}catch(t){console.error(t)}}es(),ts.exports=zt;var oh=ts.exports;/** * @license React * react-dom-client.production.js * @@ -30,15 +30,15 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ot=nh,us=V,oh=sh;function g(t){var l="https://react.dev/errors/"+t;if(1He||(t.current=oi[He],oi[He]=null,He--)}function J(t,l){He++,oi[He]=t.current,t.current=l}var ul=el(null),pu=el(null),Hl=el(null),Aa=el(null);function pa(t,l){switch(J(Hl,l),J(pu,t),J(ul,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?Vy(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=Vy(l),t=Gy(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}yt(ul),J(ul,t)}function Re(){yt(ul),yt(pu),yt(Hl)}function di(t){t.memoizedState!==null&&J(Aa,t);var l=ul.current,e=Gy(l,t.type);l!==e&&(J(pu,t),J(ul,e))}function Oa(t){pu.current===t&&(yt(ul),yt(pu)),Aa.current===t&&(yt(Aa),ha._currentValue=ne)}var yi,ys;function ie(t){if(yi===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);yi=l&&l[1]||"",ys=-1He||(t.current=oi[He],oi[He]=null,He--)}function J(t,l){He++,oi[He]=t.current,t.current=l}var ul=el(null),Ou=el(null),Hl=el(null),pa=el(null);function Aa(t,l){switch(J(Hl,l),J(Ou,t),J(ul,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?Vy(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=Vy(l),t=jy(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}yt(ul),J(ul,t)}function Re(){yt(ul),yt(Ou),yt(Hl)}function di(t){t.memoizedState!==null&&J(pa,t);var l=ul.current,e=jy(l,t.type);l!==e&&(J(Ou,t),J(ul,e))}function Oa(t){Ou.current===t&&(yt(ul),yt(Ou)),pa.current===t&&(yt(pa),ra._currentValue=ne)}var yi,ys;function ie(t){if(yi===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);yi=l&&l[1]||"",ys=-1)":-1a||c[u]!==d[a]){var r=` -`+c[u].replace(" at new "," at ");return t.displayName&&r.includes("")&&(r=r.replace("",t.displayName)),r}while(1<=u&&0<=a);break}}}finally{hi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function vh(t,l){switch(t.tag){case 26:case 27:case 5:return ie(t.type);case 16:return ie("Lazy");case 13:return t.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return ri(t.type,!1);case 11:return ri(t.type.render,!1);case 1:return ri(t.type,!0);case 31:return ie("Activity");default:return""}}function hs(t){try{var l="",e=null;do l+=vh(t,e),e=t,t=t.return;while(t);return l}catch(u){return` +`+c[u].replace(" at new "," at ");return t.displayName&&r.includes("")&&(r=r.replace("",t.displayName)),r}while(1<=u&&0<=a);break}}}finally{hi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function mh(t,l){switch(t.tag){case 26:case 27:case 5:return ie(t.type);case 16:return ie("Lazy");case 13:return t.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return ri(t.type,!1);case 11:return ri(t.type.render,!1);case 1:return ri(t.type,!0);case 31:return ie("Activity");default:return""}}function hs(t){try{var l="",e=null;do l+=mh(t,e),e=t,t=t.return;while(t);return l}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,mh=ot.unstable_shouldYield,Sh=ot.unstable_requestPaint,Rt=ot.unstable_now,gh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,bh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,Eh=ot.log,zh=ot.unstable_setDisableYieldValue,Ou=null,Nt=null;function Rl(t){if(typeof Eh=="function"&&zh(t),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Ou,t)}catch{}}var Ct=Math.clz32?Math.clz32:ph,Th=Math.log,Ah=Math.LN2;function ph(t){return t>>>=0,t===0?32:31-(Th(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function _u(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function Oh(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Mu(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function _h(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Nh=/[\n"\\]/g;function xt(t){return t.replace(Nh,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function pi(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+Zt(l)):t.value!==""+Zt(l)&&(t.value=""+Zt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,Zt(l)):e!=null?Oi(t,i,Zt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+Zt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){Ai(t);return}e=e!=null?""+Zt(e):"",l=l!=null?""+Zt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),Ai(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Ru={};Object.defineProperty(Ru,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Ru,Ru),window.removeEventListener("test",Ru,Ru)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Bu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return ir.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function cr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function sr(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function ji(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var Sr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&ji(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&Vu(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Ct(l)+a|e<p?(M=z,z=null):M=z.sibling;var R=y(o,z,h[p],S);if(R===null){z===null&&(z=M);break}t&&z&&R.alternate===null&&l(o,z),s=n(R,s,p),_===null?E=R:_.sibling=R,_=R,z=M}if(p===h.length)return e(o,z),G&&hl(o,p),E;if(z===null){for(;pp?(M=z,z=null):M=z.sibling;var It=y(o,z,R.value,S);if(It===null){z===null&&(z=M);break}t&&z&&It.alternate===null&&l(o,z),s=n(It,s,p),_===null?E=It:_.sibling=It,_=It,z=M}if(R.done)return e(o,z),G&&hl(o,p),E;if(z===null){for(;!R.done;p++,R=h.next())R=m(o,R.value,S),R!==null&&(s=n(R,s,p),_===null?E=R:_.sibling=R,_=R);return G&&hl(o,p),E}for(z=u(z);!R.done;p++,R=h.next())R=v(z,o,p,R.value,S),R!==null&&(t&&R.alternate!==null&&z.delete(R.key===null?p:R.key),s=n(R,s,p),_===null?E=R:_.sibling=R,_=R);return t&&z.forEach(function(ee){return l(o,ee)}),G&&hl(o,p),E}function H(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var E=h.key;s!==null;){if(s.key===E){if(E=h.type,E===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ul&&ge(E)===s.type){e(o,s.sibling),S=a(s,h.props),Lu(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Lu(S,h),S.return=o,o=S)}return i(o);case zu:t:{for(E=h.key;s!==null;){if(s.key===E)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),H(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(Tu(h)){if(E=Tu(h),typeof E!="function")throw Error(g(150));return h=E.call(h),A(o,s,h,S)}if(typeof h.then=="function")return H(o,s,Ia(h),S);if(h.$$typeof===cl)return H(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{xu=0;var E=H(o,s,h,S);return Pe=null,E}catch(z){if(z===Ie||z===Fa)throw z;var _=Yt(29,z,null,o.mode);return _.lanes=S,_.return=o,_}finally{}}}var Ee=Do(!0),Uo=Do(!1),Gl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function jl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ku(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function Ju(){if(of){var t=ke;if(t!==null)throw t}}function wu(t,l,e,u){of=!1;var a=t.updateQueue;Gl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,A=f;y=l;var H=e;switch(A.tag){case 1:if(b=A.payload,typeof b=="function"){m=b.call(H,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=A.payload,y=typeof b=="function"?b.call(H,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:Gl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=O.T,f={};O.T=f,Uf(t,!1,l,e);try{var c=a(),d=O.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=_r(c,u);Fu(t,l,r,Xt(t))}else Fu(t,l,u,Xt(t))}catch(m){Fu(t,l,{then:function(){},status:"rejected",reason:m},Xt())}finally{j.p=n,i!==null&&f.types!==null&&(i.types=f.types),O.T=i}}function Nr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Nr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),Fu(t,l.next.queue,{},Xt())}function Df(){return gt(ha)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Cr(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Xt();t=jl(e);var u=Xl(l,t,e);u!==null&&(Ht(u,l,e),Ku(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Br(t,l,e){var u=Xt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Ht(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Xt();Fu(t,l,e,u)}function Fu(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Bt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Ht(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Ht(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var ku={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};ku.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return At().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=At();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=At();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Br.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=At();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=At();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),At().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=At();if(G){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(jo.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},Go.bind(null,u,n,e,l),null),e},useId:function(){var t=At(),l=K.identifierPrefix;if(G){var e=nl,u=al;e=(u&~(1<<32-Ct(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[pt]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(Vt(l),l):(Vt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(Vt(l),l):(Vt(l),null)}return Vt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)Pu(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,Pu(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),G&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Rt()>En&&(l.flags|=128,a=!0,Pu(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),Pu(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!G)return k(l),null}else 2*Rt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,Pu(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Rt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),G&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return Vt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function jr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(Vt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(Vt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return Vt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&Vt(l);break;case 13:Vt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:Vt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function ta(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function la(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;fv(u,t.type,e,l),u[pt]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[pt]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Xr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),ji(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fH&&(i=H,H=A,A=i);var o=lo(f,A),s=lo(f,H);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),A>H?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,O.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,fa(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Ou,n)}catch{}return!0}finally{j.p=a,O.T=u,zy(t,l)}}function Ay(t,l,e){l=Kt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Mu(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)Ay(t,t,e);else for(;l!==null;){if(l.tag===3){Ay(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Kt(e,t),e=pd(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Mu(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new xr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=$r.bind(null,t,l,e),l.then(t,t))}function $r(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Rt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function py(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Mu(t,l),fl(t))}function Wr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),py(t,e)}function Fr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),py(t,e)}function kr(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,Pr())}function fa(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Ct(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||_u(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Ir(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&sv()&&(t=Wl);for(var l=Rt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||fa(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=xt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function gv(t){_l.D(t),$y("dns-prefetch",t,null)}function bv(t,l){_l.C(t,l),$y("preconnect",t,l)}function Ev(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+xt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+xt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+xt(e.imageSizes)+'"]')):a+='[href="'+xt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}kt.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),kt.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(da(n))||l==="script"&&u.querySelector(ya(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function zv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+xt(u)+'"][href="'+xt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!kt.has(n)&&(t=W({rel:"modulepreload",href:t},l),kt.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ya(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function Tv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(da(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=kt.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ya(a)),n||(t=W({src:t,async:!0},l),(l=kt.get(a))&&Ac(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function pv(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ya(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=kt.get(a))&&Ac(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(da(t)))&&!n._p&&(i.instance=n,i.state.loading=5),kt.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},kt.set(t,e),n||Ov(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+xt(t)+'"'}function da(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function Ov(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+xt(t)+'"]'}function ya(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+xt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(da(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=kt.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ya(n)))?(l.instance=a,ht(a),a):(u=e,(a=kt.get(n))&&(u=W({},e),Ac(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function _v(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Mv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(da(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=kt.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var pc=0;function Dv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0pc?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Uv,t),Yn=null,Bn.call(t))}function Uv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const Vv=ue({__proto__:null,default:Gc(v0)},[v0]);var m0={exports:{}},Ln={};/** +`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,Sh=ot.unstable_shouldYield,gh=ot.unstable_requestPaint,Nt=ot.unstable_now,bh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,Eh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,zh=ot.log,Th=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Rl(t){if(typeof zh=="function"&&Th(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:Oh,ph=Math.log,Ah=Math.LN2;function Oh(t){return t>>>=0,t===0?32:31-(ph(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function Mu(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function _h(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Du(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Mh(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ch=/[\n"\\]/g;function Lt(t){return t.replace(Ch,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ai(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+xt(l)):t.value!==""+xt(l)&&(t.value=""+xt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,xt(l)):e!=null?Oi(t,i,xt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+xt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){pi(t);return}e=e!=null?""+xt(e):"",l=l!=null?""+xt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),pi(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Yu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return fr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function sr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function or(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function Gi(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var gr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Gi(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&ju(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Bt(l)+a|e<O?(M=E,E=null):M=E.sibling;var H=y(o,E,h[O],S);if(H===null){E===null&&(E=M);break}t&&E&&H.alternate===null&&l(o,E),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H,E=M}if(O===h.length)return e(o,E),j&&hl(o,O),T;if(E===null){for(;OO?(M=E,E=null):M=E.sibling;var At=y(o,E,H.value,S);if(At===null){E===null&&(E=M);break}t&&E&&At.alternate===null&&l(o,E),s=n(At,s,O),A===null?T=At:A.sibling=At,A=At,E=M}if(H.done)return e(o,E),j&&hl(o,O),T;if(E===null){for(;!H.done;O++,H=h.next())H=m(o,H.value,S),H!==null&&(s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return j&&hl(o,O),T}for(E=u(E);!H.done;O++,H=h.next())H=v(E,o,O,H.value,S),H!==null&&(t&&H.alternate!==null&&E.delete(H.key===null?O:H.key),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return t&&E.forEach(function(ee){return l(o,ee)}),j&&hl(o,O),T}function R(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var T=h.key;s!==null;){if(s.key===T){if(T=h.type,T===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ul&&ge(T)===s.type){e(o,s.sibling),S=a(s,h.props),Ku(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Ku(S,h),S.return=o,o=S)}return i(o);case Tu:t:{for(T=h.key;s!==null;){if(s.key===T)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),R(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(pu(h)){if(T=pu(h),typeof T!="function")throw Error(g(150));return h=T.call(h),p(o,s,h,S)}if(typeof h.then=="function")return R(o,s,Ia(h),S);if(h.$$typeof===cl)return R(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{Lu=0;var T=R(o,s,h,S);return Pe=null,T}catch(E){if(E===Ie||E===Fa)throw E;var A=qt(29,E,null,o.mode);return A.lanes=S,A.return=o,A}finally{}}}var Ee=Do(!0),Uo=Do(!1),jl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ju(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function wu(){if(of){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){of=!1;var a=t.updateQueue;jl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,p=f;y=l;var R=e;switch(p.tag){case 1:if(b=p.payload,typeof b=="function"){m=b.call(R,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,y=typeof b=="function"?b.call(R,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:jl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Uf(t,!1,l,e);try{var c=a(),d=_.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=Mr(c,u);ku(t,l,r,Qt(t))}else ku(t,l,u,Qt(t))}catch(m){ku(t,l,{then:function(){},status:"rejected",reason:m},Qt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Cr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Cr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Qt())}function Df(){return gt(ra)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Br(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Qt();t=Gl(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Yr(t,l,e){var u=Qt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Rt(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Qt();ku(t,l,e,u)}function ku(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Yt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Rt(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Rt(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var Iu={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Iu.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return pt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=pt();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=pt();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Yr.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=pt();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=pt();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=pt();if(j){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(Go.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},jo.bind(null,u,n,e,l),null),e},useId:function(){var t=pt(),l=K.identifierPrefix;if(j){var e=nl,u=al;e=(u&~(1<<32-Bt(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[Ot]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(jt(l),l):(jt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(jt(l),l):(jt(l),null)}return jt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)ta(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,ta(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),j&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Nt()>En&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),ta(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!j)return k(l),null}else 2*Nt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Nt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),j&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return jt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function Xr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(jt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(jt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return jt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&jt(l);break;case 13:jt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:jt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function la(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function ea(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;cv(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[Ot]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Qr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),Gi(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fR&&(i=R,R=p,p=i);var o=lo(f,p),s=lo(f,R);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),p>R?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,_.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,zy(t,l)}}function py(t,l,e){l=Jt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)py(t,t,e);else for(;l!==null;){if(l.tag===3){py(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Jt(e,t),e=Ad(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Du(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Lr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=Wr.bind(null,t,l,e),l.then(t,t))}function Wr(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Nt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function Ay(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Du(t,l),fl(t))}function Fr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Ay(t,e)}function kr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),Ay(t,e)}function Ir(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,tv())}function ca(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Bt(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Pr(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&ov()&&(t=Wl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||ca(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=Lt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function bv(t){_l.D(t),$y("dns-prefetch",t,null)}function Ev(t,l){_l.C(t,l),$y("preconnect",t,l)}function zv(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+Lt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+Lt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+Lt(e.imageSizes)+'"]')):a+='[href="'+Lt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}It.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),It.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(ya(n))||l==="script"&&u.querySelector(ha(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function Tv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+Lt(u)+'"][href="'+Lt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!It.has(n)&&(t=W({rel:"modulepreload",href:t},l),It.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ha(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function pv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(ya(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=It.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Ov(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(ya(t)))&&!n._p&&(i.instance=n,i.state.loading=5),It.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},It.set(t,e),n||_v(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+Lt(t)+'"'}function ya(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function _v(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+Lt(t)+'"]'}function ha(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+Lt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(ya(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=It.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ha(n)))?(l.instance=a,ht(a),a):(u=e,(a=It.get(n))&&(u=W({},e),pc(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function Mv(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Dv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(ya(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=It.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Ac=0;function Uv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Ac?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Hv,t),Yn=null,Bn.call(t))}function Hv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const jv=ue({__proto__:null,default:jc(v0)},[v0]);var m0={exports:{}},Ln={};/** * @license React * react-jsx-runtime.production.js * @@ -46,4 +46,4 @@ Error generating stack: `+u.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gv=Symbol.for("react.transitional.element"),jv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=jv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var Sa=m0.exports;const g0=V.createContext(null);function Xv({namespace:t,children:l}){return Sa.jsx(g0.Provider,{value:t,children:l})}function Qv(){return V.useContext(g0)}function Zv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Qv();return Zv(t,l!==void 0?l:e)}const mu=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{mu.get(t)===u&&(mu.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return mu.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=mu.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function xv(t,l){const e=mu.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Lv(t){const l=mu.get(t);l&&T0(t,l.promise)}function Kv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{xv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Lv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const Su=Symbol("MISSING"),A0="1.0";function Jv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function wv(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function $v(t){const l=e=>e.split(".")[0];l(t)!==l(A0)&&wv(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${A0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Wv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=Jv();if(a!=null&&a.protocolVersion?$v(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let p0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function Fv(){if(p0||typeof document>"u")return;p0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return Fv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class kv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new kv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Iv(){et()&&Y0()}class Pv{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class tm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new Pv(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function lm(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===Su){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class em{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new em,outputs:new tm}),q0}function um(){Qt()}function Qt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Qt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Qt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const A=V.useCallback(H=>{if(!b)return;const s=Qt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(H)},[i,b]);return[y,A]}const gu=()=>{};function G0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Qt();return a(f.current),c.outputs.add(i,a,gu,gu)},[i,n]),u}function j0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Qt().outputs.add(n,gu,u,gu):void 0,[n,a]),e}function am(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Qt().outputs.add(n,gu,gu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Qt().inputs.get(e);if(!i)return;const f=i.getValue();return f===Su?void 0:f}),n=le();return V.useEffect(()=>n?Qt().inputs.subscribe(e,c=>{a(c===Su?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Qt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Qt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let X0=!1;function Oe(){X0||(um(),Wv(Qt().inputs),lm(()=>Qt().outputs),Iv(),X0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,Su,c),[m,y]=Jn(`.clientdata_output_${f}_height`,Su,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=G0(f,void 0,c),A=j0(f,c),H=V.useRef(null),o=V.useRef(null),[s,h]=V.useState(0);V.useEffect(()=>{b&&h(E=>E+1)},[b]),V.useEffect(()=>{n&&n(A==="recalculating")},[A,n]);const S=V.useCallback(()=>{if(H.current){const E=H.current.clientWidth,_=H.current.clientHeight;E>0&&_>0&&(r(E),y(_))}},[r,y]);return V.useEffect(()=>{const E=H.current;if(!E)return;E.addEventListener("load",S);const _=Bc(()=>{E&&E.complete&&S()},a),z=new ResizeObserver(p=>{for(const M of p)M.target===E&&_()});return z.observe(E),()=>{E.removeEventListener("load",S),z.disconnect(),_.cancel()}},[H,s,r,y,a,S]),V.useEffect(()=>{if(b)return;const E=o.current;if(!E)return;const _=()=>{const M=E.clientWidth,R=E.clientHeight;M>0&&R>0&&(r(M),y(R))};_();const z=Bc(_,a),p=new ResizeObserver(()=>z());return p.observe(E),()=>{p.disconnect(),z.cancel()}},[b,r,y,a]),v?null:b?Sa.jsx("img",{ref:H,src:b.src,alt:"",className:l,style:{width:e,height:u},onLoad:S}):Sa.jsx("div",{ref:o,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:Sa.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:Sa.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:am,useShinyOutputStatus:j0,useShinyOutputValue:G0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:Su,ShinyModuleProvider:Xv,ShinyOutput:Kv,React:Fc,ReactDOM:Vv}}om(),Z0()})(); + */var Gv=Symbol.for("react.transitional.element"),Xv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Xv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var mu=m0.exports;const g0=V.createContext(null);function Qv({namespace:t,children:l}){return mu.jsx(g0.Provider,{value:t,children:l})}function Zv(){return V.useContext(g0)}function xv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Zv();return xv(t,l!==void 0?l:e)}const Su=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Lv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Kv(t){const l=Su.get(t);l&&T0(t,l.promise)}function Jv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{Lv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Kv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),p0="1.0";function wv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function $v(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function Wv(t){const l=e=>e.split(".")[0];l(t)!==l(p0)&&$v(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${p0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Fv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=wv();if(a!=null&&a.protocolVersion?Wv(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let A0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function kv(){if(A0||typeof document>"u")return;A0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return kv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class Iv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new Iv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Pv(){et()&&Y0()}class tm{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class lm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new tm(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function em(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===gu){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class um{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new um,outputs:new lm}),q0}function am(){Zt()}function Zt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Zt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const p=V.useCallback(R=>{if(!b)return;const s=Zt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(R)},[i,b]);return[y,p]}const bu=()=>{};function j0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function G0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function X0(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=le();return V.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Zt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let Q0=!1;function Oe(){Q0||(am(),Fv(Zt().inputs),em(()=>Zt().outputs),Pv(),Q0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,gu,c),[m,y]=Jn(`.clientdata_output_${f}_height`,gu,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=j0(f,void 0,c),p=G0(f,c),R=X0(f,c),o=V.useRef(null),s=V.useRef(null),[h,S]=V.useState(0);V.useEffect(()=>{b&&S(A=>A+1)},[b]),V.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=V.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(V.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Bc(()=>{A&&A.complete&&T()},a),O=new ResizeObserver(M=>{for(const H of M)H.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",T),O.disconnect(),E.cancel()}},[o,h,r,y,a,T]),V.useEffect(()=>{if(b)return;const A=s.current;if(!A)return;const E=()=>{const H=A.clientWidth,At=A.clientHeight;H>0&&At>0&&(r(H),y(At))};E();const O=Bc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,r,y,a]),v)return null;if(R){const A=["shiny-output-error",...[].concat(R.type??[]).map(E=>`shiny-output-error-${E}`),l];return mu.jsx("div",{className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:R.message})}return b?mu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:T}):mu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:mu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:mu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:X0,useShinyOutputStatus:G0,useShinyOutputValue:j0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:gu,ShinyModuleProvider:Qv,ShinyOutput:Jv,React:Fc,ReactDOM:jv}}om(),x0()})(); diff --git a/pkg-js/src/shiny-react/ImageOutput.tsx b/pkg-js/src/shiny-react/ImageOutput.tsx index 38334463..55129525 100644 --- a/pkg-js/src/shiny-react/ImageOutput.tsx +++ b/pkg-js/src/shiny-react/ImageOutput.tsx @@ -2,6 +2,7 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { MISSING, type MISSING as MISSINGType } from "./missing"; import { useShinyInput, + useShinyOutputError, useShinyOutputStatus, useShinyOutputValue, } from "./use-shiny"; @@ -12,6 +13,8 @@ export type ImageData = { src: string; width: number; height: number; + /** `renderPlot(alt =)` / `@render.plot(alt=)`; absent for some renderers. */ + alt?: string; coordmap: { panels: { panel: number; @@ -89,6 +92,8 @@ export type ImageData = { * - Updates Shiny when the image size changes (using ResizeObserver with * debouncing) * - Hides the image when Shiny sets the hidden state + * - Replaces the image with the error message when the render function + * errors, styled with Shiny's `shiny-output-error` classes * - Handles image load events to ensure accurate dimension reporting * * The server-side renderImage() function receives the client dimensions and can @@ -182,6 +187,7 @@ export function ImageOutput({ skipNs, ); const imgStatus = useShinyOutputStatus(namespacedId, skipNs); + const imgError = useShinyOutputError(namespacedId, skipNs); // Create a reference to the img element to access its properties const imgRef = useRef(null); @@ -297,6 +303,28 @@ export function ImageOutput({ return null; } + // Match vanilla Shiny: an error hides the last image and shows the message, + // with the same classes Shiny's renderError() adds. + if (imgError) { + const errorClasses = [ + "shiny-output-error", + // concat, like Shiny's asArray(): R unboxes a one-class `type` to a + // plain string despite the string[] type. + ...([] as string[]) + .concat(imgError.type ?? []) + .map((t) => `shiny-output-error-${t}`), + className, + ]; + return ( +
+ {imgError.message} +
+ ); + } + // Show a placeholder while waiting for the first image or during recalculation if (!imgData) { return ( @@ -339,7 +367,7 @@ export function ImageOutput({ { expect(ids).not.toContain(".clientdata_output_ctx-myimg_width"); }); }); + +// Drive an output the way the real registry would: `outputs.add(id, setValue, +// setStatus, setError)` hands the hook its setters, so keep the latest ones per +// id and call them. +function captureOutputSetters() { + const setters = new Map< + string, + { value: (v: unknown) => void; error: (e: unknown) => void }[] + >(); + const reg = getReactRegistry(); + (reg.outputs.add as ReturnType).mockImplementation( + ( + id: string, + value: (v: unknown) => void, + _status: unknown, + error: (e: unknown) => void, + ) => { + setters.set(id, [...(setters.get(id) ?? []), { value, error }]); + return () => {}; + }, + ); + return { + sendValue: (id: string, v: unknown) => + act(() => setters.get(id)!.forEach((s) => s.value(v))), + sendError: (id: string, e: unknown) => + act(() => setters.get(id)!.forEach((s) => s.error(e))), + }; +} + +const IMG = { src: "data:image/png;base64,AAAA", width: 4, height: 3 }; + +describe("ImageOutput image data", () => { + it("uses the renderer's alt text", async () => { + // #327: alt="" was hardcoded, ignoring renderPlot(alt =). + const out = captureOutputSetters(); + const { container } = render(); + await flushPromises(); + out.sendValue("plot", { ...IMG, alt: "A scatterplot" }); + expect(container.querySelector("img")!.getAttribute("alt")).toBe( + "A scatterplot", + ); + }); + + it("falls back to an empty alt when the renderer sends none", async () => { + const out = captureOutputSetters(); + const { container } = render(); + await flushPromises(); + out.sendValue("plot", IMG); + expect(container.querySelector("img")!.getAttribute("alt")).toBe(""); + }); +}); + +describe("ImageOutput on error", () => { + it("hides the stale image and shows the message with Shiny's classes", async () => { + // #327: the last image stayed on screen and the message appeared nowhere. + const out = captureOutputSetters(); + const { container } = render(); + await flushPromises(); + out.sendValue("plot", IMG); + expect(container.querySelector("img")).not.toBeNull(); + + out.sendError("plot", { + message: "Nothing to plot", + call: null, + type: ["shiny.silent.error", "validation"], + }); + + expect(container.querySelector("img")).toBeNull(); + const el = container.firstElementChild!; + expect(el.textContent).toBe("Nothing to plot"); + expect([...el.classList]).toEqual([ + "shiny-output-error", + "shiny-output-error-shiny.silent.error", + "shiny-output-error-validation", + "mine", + ]); + }); + + it("accepts an R one-class type unboxed to a string", async () => { + const out = captureOutputSetters(); + const { container } = render(); + await flushPromises(); + out.sendError("plot", { message: "boom", call: null, type: "validation" }); + expect(container.firstElementChild!.className).toBe( + "shiny-output-error shiny-output-error-validation", + ); + }); + + it("shows the image again once the error clears", async () => { + const out = captureOutputSetters(); + const { container } = render(); + await flushPromises(); + out.sendError("plot", { message: "boom", call: null, type: null }); + expect(container.querySelector("img")).toBeNull(); + + out.sendError("plot", null); + out.sendValue("plot", IMG); + expect(container.querySelector("img")).not.toBeNull(); + expect(container.textContent).not.toContain("boom"); + }); +}); diff --git a/pkg-py/src/shinyreact/www/shinyreact.js b/pkg-py/src/shinyreact/www/shinyreact.js index 1191a98a..d0d1751b 100644 --- a/pkg-py/src/shinyreact/www/shinyreact.js +++ b/pkg-py/src/shinyreact/www/shinyreact.js @@ -1,4 +1,4 @@ -var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0,configurable:!0,writable:!0,value:ae}):ue[et]=ae;var I=(ue,et,ae)=>hm(ue,typeof et!="symbol"?et+"":et,ae);(function(){"use strict";function ue(t,l){for(var e=0;eu[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function et(){if(!(typeof window>"u"))return window.Shiny}let ae=!1;function Z0(){if(typeof document>"u"||ae)return;ae=!0;const t=()=>{const e=et();e&&(e.addCustomMessageHandler("shinyreact-deps",async u=>{var a,n;try{const i=e;await((a=i.renderDependenciesAsync)==null?void 0:a.call(i,u)),await((n=i.bindAll)==null?void 0:n.call(i,document.documentElement))}catch(i){console.error("[shinyreact] failed to load pushed dependencies:",i)}}),e.initializedPromise.then(()=>{var u;(u=e.setInputValue)==null||u.call(e,".shinyreact_init:shinyreact.init",1)}))};if(et()){t();return}const l=()=>{et()&&(document.removeEventListener("shiny:connected",l),t())};document.addEventListener("shiny:connected",l)}function Gc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jc={exports:{}},D={};/** +var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0,configurable:!0,writable:!0,value:ae}):ue[et]=ae;var I=(ue,et,ae)=>hm(ue,typeof et!="symbol"?et+"":et,ae);(function(){"use strict";function ue(t,l){for(var e=0;eu[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function et(){if(!(typeof window>"u"))return window.Shiny}let ae=!1;function x0(){if(typeof document>"u"||ae)return;ae=!0;const t=()=>{const e=et();e&&(e.addCustomMessageHandler("shinyreact-deps",async u=>{var a,n;try{const i=e;await((a=i.renderDependenciesAsync)==null?void 0:a.call(i,u)),await((n=i.bindAll)==null?void 0:n.call(i,document.documentElement))}catch(i){console.error("[shinyreact] failed to load pushed dependencies:",i)}}),e.initializedPromise.then(()=>{var u;(u=e.setInputValue)==null||u.call(e,".shinyreact_init:shinyreact.init",1)}))};if(et()){t();return}const l=()=>{et()&&(document.removeEventListener("shiny:connected",l),t())};document.addEventListener("shiny:connected",l)}function jc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gc={exports:{}},D={};/** * @license React * react.production.js * @@ -6,7 +6,7 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Fn=Symbol.for("react.transitional.element"),x0=Symbol.for("react.portal"),L0=Symbol.for("react.fragment"),K0=Symbol.for("react.strict_mode"),J0=Symbol.for("react.profiler"),w0=Symbol.for("react.consumer"),$0=Symbol.for("react.context"),W0=Symbol.for("react.forward_ref"),F0=Symbol.for("react.suspense"),k0=Symbol.for("react.memo"),Xc=Symbol.for("react.lazy"),I0=Symbol.for("react.activity"),Qc=Symbol.iterator;function P0(t){return t===null||typeof t!="object"?null:(t=Qc&&t[Qc]||t["@@iterator"],typeof t=="function"?t:null)}var Zc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xc=Object.assign,Lc={};function Me(t,l,e){this.props=t,this.context=l,this.refs=Lc,this.updater=e||Zc}Me.prototype.isReactComponent={},Me.prototype.setState=function(t,l){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,l,"setState")},Me.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Kc(){}Kc.prototype=Me.prototype;function kn(t,l,e){this.props=t,this.context=l,this.refs=Lc,this.updater=e||Zc}var In=kn.prototype=new Kc;In.constructor=kn,xc(In,Me.prototype),In.isPureReactComponent=!0;var Jc=Array.isArray;function Pn(){}var w={H:null,A:null,T:null,S:null},wc=Object.prototype.hasOwnProperty;function ti(t,l,e){var u=e.ref;return{$$typeof:Fn,type:t,key:l,ref:u!==void 0?u:null,props:e}}function th(t,l){return ti(t.type,l,t.props)}function li(t){return typeof t=="object"&&t!==null&&t.$$typeof===Fn}function lh(t){var l={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(e){return l[e]})}var $c=/\/+/g;function ei(t,l){return typeof t=="object"&&t!==null&&t.key!=null?lh(""+t.key):l.toString(36)}function eh(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(Pn,Pn):(t.status="pending",t.then(function(l){t.status==="pending"&&(t.status="fulfilled",t.value=l)},function(l){t.status==="pending"&&(t.status="rejected",t.reason=l)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function De(t,l,e,u,a){var n=typeof t;(n==="undefined"||n==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(n){case"bigint":case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case Fn:case x0:i=!0;break;case Xc:return i=t._init,De(i(t._payload),l,e,u,a)}}if(i)return a=a(t),i=u===""?"."+ei(t,0):u,Jc(a)?(e="",i!=null&&(e=i.replace($c,"$&/")+"/"),De(a,l,e,"",function(d){return d})):a!=null&&(li(a)&&(a=th(a,e+(a.key==null||t&&t.key===a.key?"":(""+a.key).replace($c,"$&/")+"/")+i)),l.push(a)),1;i=0;var f=u===""?".":u+":";if(Jc(t))for(var c=0;cet in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function l(T,Y){var N=T.length;T.push(Y);t:for(;0>>1,vt=T[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(T[nt]=Wn,T[_e]=N,nt=_e):(T[nt]=Vc,T[$n]=N,nt=$n);else if(_ea(Wn,N))T[nt]=Wn,T[_e]=N,nt=_e;else break t}}return Y}function a(T,Y){var N=T.sortIndex-Y.sortIndex;return N!==0?N:T.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,A=!1,H=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(T){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=T)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function E(T){if(A=!1,S(T),!b)if(e(c)!==null)b=!0,_||(_=!0,ee());else{var Y=e(d);Y!==null&&qc(E,Y.startTime-T)}}var _=!1,z=-1,p=5,M=-1;function R(){return H?!0:!(t.unstable_now()-MT&&R());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=T);if(T=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(T),Y=!0;break l}m===e(c)&&u(c),S(T)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(E,wn.startTime-T),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():_=!1}}}var ee;if(typeof h=="function")ee=function(){h(It)};else if(typeof MessageChannel<"u"){var Q0=new MessageChannel,dm=Q0.port2;Q0.port1.onmessage=It,ee=function(){dm.postMessage(null)}}else ee=function(){o(It,0)};function qc(T,Y){z=o(function(){T(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125nt?(T.sortIndex=N,l(d,T),e(c)===null&&T===e(d)&&(A?(s(z),z=-1):A=!0,qc(E,N-nt))):(T.sortIndex=vt,l(c,T),b||v||(b=!0,_||(_=!0,ee()))),T},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(T){var Y=y;return function(){var N=y;y=Y;try{return T.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var nh=Ic.exports,ts={exports:{}},zt={};/** + */(function(t){function l(z,Y){var N=z.length;z.push(Y);t:for(;0>>1,vt=z[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(z[nt]=Wn,z[_e]=N,nt=_e):(z[nt]=Vc,z[$n]=N,nt=$n);else if(_ea(Wn,N))z[nt]=Wn,z[_e]=N,nt=_e;else break t}}return Y}function a(z,Y){var N=z.sortIndex-Y.sortIndex;return N!==0?N:z.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,p=!1,R=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(z){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=z)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function T(z){if(p=!1,S(z),!b)if(e(c)!==null)b=!0,A||(A=!0,ee());else{var Y=e(d);Y!==null&&qc(T,Y.startTime-z)}}var A=!1,E=-1,O=5,M=-1;function H(){return R?!0:!(t.unstable_now()-Mz&&H());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=z);if(z=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(z),Y=!0;break l}m===e(c)&&u(c),S(z)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(T,wn.startTime-z),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():A=!1}}}var ee;if(typeof h=="function")ee=function(){h(At)};else if(typeof MessageChannel<"u"){var Z0=new MessageChannel,dm=Z0.port2;Z0.port1.onmessage=At,ee=function(){dm.postMessage(null)}}else ee=function(){o(At,0)};function qc(z,Y){E=o(function(){z(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125nt?(z.sortIndex=N,l(d,z),e(c)===null&&z===e(d)&&(p?(s(E),E=-1):p=!0,qc(T,N-nt))):(z.sortIndex=vt,l(c,z),b||v||(b=!0,A||(A=!0,ee()))),z},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(z){var Y=y;return function(){var N=y;y=Y;try{return z.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var ih=Ic.exports,ts={exports:{}},zt={};/** * @license React * react-dom.production.js * @@ -22,7 +22,7 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ih=V;function ls(t){var l="https://react.dev/errors/"+t;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(es)}catch(t){console.error(t)}}es(),ts.exports=zt;var sh=ts.exports;/** + */var fh=V;function ls(t){var l="https://react.dev/errors/"+t;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(es)}catch(t){console.error(t)}}es(),ts.exports=zt;var oh=ts.exports;/** * @license React * react-dom-client.production.js * @@ -30,15 +30,15 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ot=nh,us=V,oh=sh;function g(t){var l="https://react.dev/errors/"+t;if(1He||(t.current=oi[He],oi[He]=null,He--)}function J(t,l){He++,oi[He]=t.current,t.current=l}var ul=el(null),pu=el(null),Hl=el(null),Aa=el(null);function pa(t,l){switch(J(Hl,l),J(pu,t),J(ul,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?Vy(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=Vy(l),t=Gy(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}yt(ul),J(ul,t)}function Re(){yt(ul),yt(pu),yt(Hl)}function di(t){t.memoizedState!==null&&J(Aa,t);var l=ul.current,e=Gy(l,t.type);l!==e&&(J(pu,t),J(ul,e))}function Oa(t){pu.current===t&&(yt(ul),yt(pu)),Aa.current===t&&(yt(Aa),ha._currentValue=ne)}var yi,ys;function ie(t){if(yi===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);yi=l&&l[1]||"",ys=-1He||(t.current=oi[He],oi[He]=null,He--)}function J(t,l){He++,oi[He]=t.current,t.current=l}var ul=el(null),Ou=el(null),Hl=el(null),pa=el(null);function Aa(t,l){switch(J(Hl,l),J(Ou,t),J(ul,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?Vy(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=Vy(l),t=jy(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}yt(ul),J(ul,t)}function Re(){yt(ul),yt(Ou),yt(Hl)}function di(t){t.memoizedState!==null&&J(pa,t);var l=ul.current,e=jy(l,t.type);l!==e&&(J(Ou,t),J(ul,e))}function Oa(t){Ou.current===t&&(yt(ul),yt(Ou)),pa.current===t&&(yt(pa),ra._currentValue=ne)}var yi,ys;function ie(t){if(yi===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);yi=l&&l[1]||"",ys=-1)":-1a||c[u]!==d[a]){var r=` -`+c[u].replace(" at new "," at ");return t.displayName&&r.includes("")&&(r=r.replace("",t.displayName)),r}while(1<=u&&0<=a);break}}}finally{hi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function vh(t,l){switch(t.tag){case 26:case 27:case 5:return ie(t.type);case 16:return ie("Lazy");case 13:return t.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return ri(t.type,!1);case 11:return ri(t.type.render,!1);case 1:return ri(t.type,!0);case 31:return ie("Activity");default:return""}}function hs(t){try{var l="",e=null;do l+=vh(t,e),e=t,t=t.return;while(t);return l}catch(u){return` +`+c[u].replace(" at new "," at ");return t.displayName&&r.includes("")&&(r=r.replace("",t.displayName)),r}while(1<=u&&0<=a);break}}}finally{hi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function mh(t,l){switch(t.tag){case 26:case 27:case 5:return ie(t.type);case 16:return ie("Lazy");case 13:return t.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return ri(t.type,!1);case 11:return ri(t.type.render,!1);case 1:return ri(t.type,!0);case 31:return ie("Activity");default:return""}}function hs(t){try{var l="",e=null;do l+=mh(t,e),e=t,t=t.return;while(t);return l}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,mh=ot.unstable_shouldYield,Sh=ot.unstable_requestPaint,Rt=ot.unstable_now,gh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,bh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,Eh=ot.log,zh=ot.unstable_setDisableYieldValue,Ou=null,Nt=null;function Rl(t){if(typeof Eh=="function"&&zh(t),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Ou,t)}catch{}}var Ct=Math.clz32?Math.clz32:ph,Th=Math.log,Ah=Math.LN2;function ph(t){return t>>>=0,t===0?32:31-(Th(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function _u(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function Oh(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Mu(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function _h(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Nh=/[\n"\\]/g;function xt(t){return t.replace(Nh,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function pi(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+Zt(l)):t.value!==""+Zt(l)&&(t.value=""+Zt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,Zt(l)):e!=null?Oi(t,i,Zt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+Zt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){Ai(t);return}e=e!=null?""+Zt(e):"",l=l!=null?""+Zt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),Ai(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Ru={};Object.defineProperty(Ru,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Ru,Ru),window.removeEventListener("test",Ru,Ru)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Bu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return ir.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function cr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function sr(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function ji(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var Sr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&ji(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&Vu(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Ct(l)+a|e<p?(M=z,z=null):M=z.sibling;var R=y(o,z,h[p],S);if(R===null){z===null&&(z=M);break}t&&z&&R.alternate===null&&l(o,z),s=n(R,s,p),_===null?E=R:_.sibling=R,_=R,z=M}if(p===h.length)return e(o,z),G&&hl(o,p),E;if(z===null){for(;pp?(M=z,z=null):M=z.sibling;var It=y(o,z,R.value,S);if(It===null){z===null&&(z=M);break}t&&z&&It.alternate===null&&l(o,z),s=n(It,s,p),_===null?E=It:_.sibling=It,_=It,z=M}if(R.done)return e(o,z),G&&hl(o,p),E;if(z===null){for(;!R.done;p++,R=h.next())R=m(o,R.value,S),R!==null&&(s=n(R,s,p),_===null?E=R:_.sibling=R,_=R);return G&&hl(o,p),E}for(z=u(z);!R.done;p++,R=h.next())R=v(z,o,p,R.value,S),R!==null&&(t&&R.alternate!==null&&z.delete(R.key===null?p:R.key),s=n(R,s,p),_===null?E=R:_.sibling=R,_=R);return t&&z.forEach(function(ee){return l(o,ee)}),G&&hl(o,p),E}function H(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var E=h.key;s!==null;){if(s.key===E){if(E=h.type,E===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ul&&ge(E)===s.type){e(o,s.sibling),S=a(s,h.props),Lu(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Lu(S,h),S.return=o,o=S)}return i(o);case zu:t:{for(E=h.key;s!==null;){if(s.key===E)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),H(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(Tu(h)){if(E=Tu(h),typeof E!="function")throw Error(g(150));return h=E.call(h),A(o,s,h,S)}if(typeof h.then=="function")return H(o,s,Ia(h),S);if(h.$$typeof===cl)return H(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{xu=0;var E=H(o,s,h,S);return Pe=null,E}catch(z){if(z===Ie||z===Fa)throw z;var _=Yt(29,z,null,o.mode);return _.lanes=S,_.return=o,_}finally{}}}var Ee=Do(!0),Uo=Do(!1),Gl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function jl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ku(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function Ju(){if(of){var t=ke;if(t!==null)throw t}}function wu(t,l,e,u){of=!1;var a=t.updateQueue;Gl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,A=f;y=l;var H=e;switch(A.tag){case 1:if(b=A.payload,typeof b=="function"){m=b.call(H,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=A.payload,y=typeof b=="function"?b.call(H,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:Gl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=O.T,f={};O.T=f,Uf(t,!1,l,e);try{var c=a(),d=O.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=_r(c,u);Fu(t,l,r,Xt(t))}else Fu(t,l,u,Xt(t))}catch(m){Fu(t,l,{then:function(){},status:"rejected",reason:m},Xt())}finally{j.p=n,i!==null&&f.types!==null&&(i.types=f.types),O.T=i}}function Nr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Nr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),Fu(t,l.next.queue,{},Xt())}function Df(){return gt(ha)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Cr(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Xt();t=jl(e);var u=Xl(l,t,e);u!==null&&(Ht(u,l,e),Ku(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Br(t,l,e){var u=Xt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Ht(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Xt();Fu(t,l,e,u)}function Fu(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Bt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Ht(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Ht(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var ku={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};ku.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return At().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=At();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=At();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Br.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=At();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=At();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),At().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=At();if(G){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(jo.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},Go.bind(null,u,n,e,l),null),e},useId:function(){var t=At(),l=K.identifierPrefix;if(G){var e=nl,u=al;e=(u&~(1<<32-Ct(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[pt]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(Vt(l),l):(Vt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(Vt(l),l):(Vt(l),null)}return Vt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)Pu(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,Pu(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),G&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Rt()>En&&(l.flags|=128,a=!0,Pu(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),Pu(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!G)return k(l),null}else 2*Rt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,Pu(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Rt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),G&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return Vt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function jr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(Vt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(Vt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return Vt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&Vt(l);break;case 13:Vt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:Vt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function ta(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function la(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;fv(u,t.type,e,l),u[pt]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[pt]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Xr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),ji(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fH&&(i=H,H=A,A=i);var o=lo(f,A),s=lo(f,H);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),A>H?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,O.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,fa(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Ou,n)}catch{}return!0}finally{j.p=a,O.T=u,zy(t,l)}}function Ay(t,l,e){l=Kt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Mu(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)Ay(t,t,e);else for(;l!==null;){if(l.tag===3){Ay(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Kt(e,t),e=pd(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Mu(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new xr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=$r.bind(null,t,l,e),l.then(t,t))}function $r(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Rt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function py(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Mu(t,l),fl(t))}function Wr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),py(t,e)}function Fr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),py(t,e)}function kr(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,Pr())}function fa(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Ct(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||_u(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Ir(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&sv()&&(t=Wl);for(var l=Rt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||fa(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=xt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function gv(t){_l.D(t),$y("dns-prefetch",t,null)}function bv(t,l){_l.C(t,l),$y("preconnect",t,l)}function Ev(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+xt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+xt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+xt(e.imageSizes)+'"]')):a+='[href="'+xt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}kt.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),kt.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(da(n))||l==="script"&&u.querySelector(ya(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function zv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+xt(u)+'"][href="'+xt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!kt.has(n)&&(t=W({rel:"modulepreload",href:t},l),kt.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ya(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function Tv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(da(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=kt.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ya(a)),n||(t=W({src:t,async:!0},l),(l=kt.get(a))&&Ac(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function pv(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ya(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=kt.get(a))&&Ac(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(da(t)))&&!n._p&&(i.instance=n,i.state.loading=5),kt.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},kt.set(t,e),n||Ov(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+xt(t)+'"'}function da(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function Ov(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+xt(t)+'"]'}function ya(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+xt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(da(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=kt.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ya(n)))?(l.instance=a,ht(a),a):(u=e,(a=kt.get(n))&&(u=W({},e),Ac(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function _v(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Mv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(da(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=kt.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var pc=0;function Dv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0pc?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Uv,t),Yn=null,Bn.call(t))}function Uv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const Vv=ue({__proto__:null,default:Gc(v0)},[v0]);var m0={exports:{}},Ln={};/** +`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,Sh=ot.unstable_shouldYield,gh=ot.unstable_requestPaint,Nt=ot.unstable_now,bh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,Eh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,zh=ot.log,Th=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Rl(t){if(typeof zh=="function"&&Th(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:Oh,ph=Math.log,Ah=Math.LN2;function Oh(t){return t>>>=0,t===0?32:31-(ph(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function Mu(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function _h(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Du(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Mh(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ch=/[\n"\\]/g;function Lt(t){return t.replace(Ch,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ai(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+xt(l)):t.value!==""+xt(l)&&(t.value=""+xt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,xt(l)):e!=null?Oi(t,i,xt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+xt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){pi(t);return}e=e!=null?""+xt(e):"",l=l!=null?""+xt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),pi(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Yu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return fr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function sr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function or(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function Gi(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var gr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Gi(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&ju(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Bt(l)+a|e<O?(M=E,E=null):M=E.sibling;var H=y(o,E,h[O],S);if(H===null){E===null&&(E=M);break}t&&E&&H.alternate===null&&l(o,E),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H,E=M}if(O===h.length)return e(o,E),j&&hl(o,O),T;if(E===null){for(;OO?(M=E,E=null):M=E.sibling;var At=y(o,E,H.value,S);if(At===null){E===null&&(E=M);break}t&&E&&At.alternate===null&&l(o,E),s=n(At,s,O),A===null?T=At:A.sibling=At,A=At,E=M}if(H.done)return e(o,E),j&&hl(o,O),T;if(E===null){for(;!H.done;O++,H=h.next())H=m(o,H.value,S),H!==null&&(s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return j&&hl(o,O),T}for(E=u(E);!H.done;O++,H=h.next())H=v(E,o,O,H.value,S),H!==null&&(t&&H.alternate!==null&&E.delete(H.key===null?O:H.key),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return t&&E.forEach(function(ee){return l(o,ee)}),j&&hl(o,O),T}function R(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var T=h.key;s!==null;){if(s.key===T){if(T=h.type,T===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ul&&ge(T)===s.type){e(o,s.sibling),S=a(s,h.props),Ku(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Ku(S,h),S.return=o,o=S)}return i(o);case Tu:t:{for(T=h.key;s!==null;){if(s.key===T)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),R(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(pu(h)){if(T=pu(h),typeof T!="function")throw Error(g(150));return h=T.call(h),p(o,s,h,S)}if(typeof h.then=="function")return R(o,s,Ia(h),S);if(h.$$typeof===cl)return R(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{Lu=0;var T=R(o,s,h,S);return Pe=null,T}catch(E){if(E===Ie||E===Fa)throw E;var A=qt(29,E,null,o.mode);return A.lanes=S,A.return=o,A}finally{}}}var Ee=Do(!0),Uo=Do(!1),jl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ju(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function wu(){if(of){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){of=!1;var a=t.updateQueue;jl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,p=f;y=l;var R=e;switch(p.tag){case 1:if(b=p.payload,typeof b=="function"){m=b.call(R,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,y=typeof b=="function"?b.call(R,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:jl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Uf(t,!1,l,e);try{var c=a(),d=_.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=Mr(c,u);ku(t,l,r,Qt(t))}else ku(t,l,u,Qt(t))}catch(m){ku(t,l,{then:function(){},status:"rejected",reason:m},Qt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Cr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Cr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Qt())}function Df(){return gt(ra)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Br(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Qt();t=Gl(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Yr(t,l,e){var u=Qt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Rt(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Qt();ku(t,l,e,u)}function ku(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Yt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Rt(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Rt(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var Iu={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Iu.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return pt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=pt();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=pt();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Yr.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=pt();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=pt();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=pt();if(j){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(Go.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},jo.bind(null,u,n,e,l),null),e},useId:function(){var t=pt(),l=K.identifierPrefix;if(j){var e=nl,u=al;e=(u&~(1<<32-Bt(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[Ot]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(jt(l),l):(jt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(jt(l),l):(jt(l),null)}return jt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)ta(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,ta(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),j&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Nt()>En&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),ta(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!j)return k(l),null}else 2*Nt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Nt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),j&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return jt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function Xr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(jt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(jt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return jt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&jt(l);break;case 13:jt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:jt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function la(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function ea(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;cv(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[Ot]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Qr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),Gi(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fR&&(i=R,R=p,p=i);var o=lo(f,p),s=lo(f,R);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),p>R?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,_.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,zy(t,l)}}function py(t,l,e){l=Jt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)py(t,t,e);else for(;l!==null;){if(l.tag===3){py(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Jt(e,t),e=Ad(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Du(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Lr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=Wr.bind(null,t,l,e),l.then(t,t))}function Wr(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Nt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function Ay(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Du(t,l),fl(t))}function Fr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Ay(t,e)}function kr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),Ay(t,e)}function Ir(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,tv())}function ca(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Bt(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Pr(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&ov()&&(t=Wl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||ca(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=Lt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function bv(t){_l.D(t),$y("dns-prefetch",t,null)}function Ev(t,l){_l.C(t,l),$y("preconnect",t,l)}function zv(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+Lt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+Lt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+Lt(e.imageSizes)+'"]')):a+='[href="'+Lt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}It.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),It.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(ya(n))||l==="script"&&u.querySelector(ha(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function Tv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+Lt(u)+'"][href="'+Lt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!It.has(n)&&(t=W({rel:"modulepreload",href:t},l),It.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ha(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function pv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(ya(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=It.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Ov(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(ya(t)))&&!n._p&&(i.instance=n,i.state.loading=5),It.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},It.set(t,e),n||_v(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+Lt(t)+'"'}function ya(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function _v(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+Lt(t)+'"]'}function ha(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+Lt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(ya(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=It.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ha(n)))?(l.instance=a,ht(a),a):(u=e,(a=It.get(n))&&(u=W({},e),pc(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function Mv(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Dv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(ya(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=It.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Ac=0;function Uv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Ac?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Hv,t),Yn=null,Bn.call(t))}function Hv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const jv=ue({__proto__:null,default:jc(v0)},[v0]);var m0={exports:{}},Ln={};/** * @license React * react-jsx-runtime.production.js * @@ -46,4 +46,4 @@ Error generating stack: `+u.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gv=Symbol.for("react.transitional.element"),jv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=jv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var Sa=m0.exports;const g0=V.createContext(null);function Xv({namespace:t,children:l}){return Sa.jsx(g0.Provider,{value:t,children:l})}function Qv(){return V.useContext(g0)}function Zv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Qv();return Zv(t,l!==void 0?l:e)}const mu=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{mu.get(t)===u&&(mu.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return mu.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=mu.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function xv(t,l){const e=mu.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Lv(t){const l=mu.get(t);l&&T0(t,l.promise)}function Kv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{xv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Lv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const Su=Symbol("MISSING"),A0="1.0";function Jv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function wv(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function $v(t){const l=e=>e.split(".")[0];l(t)!==l(A0)&&wv(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${A0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Wv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=Jv();if(a!=null&&a.protocolVersion?$v(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let p0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function Fv(){if(p0||typeof document>"u")return;p0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return Fv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class kv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new kv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Iv(){et()&&Y0()}class Pv{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class tm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new Pv(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function lm(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===Su){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class em{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new em,outputs:new tm}),q0}function um(){Qt()}function Qt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Qt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Qt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const A=V.useCallback(H=>{if(!b)return;const s=Qt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(H)},[i,b]);return[y,A]}const gu=()=>{};function G0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Qt();return a(f.current),c.outputs.add(i,a,gu,gu)},[i,n]),u}function j0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Qt().outputs.add(n,gu,u,gu):void 0,[n,a]),e}function am(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Qt().outputs.add(n,gu,gu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Qt().inputs.get(e);if(!i)return;const f=i.getValue();return f===Su?void 0:f}),n=le();return V.useEffect(()=>n?Qt().inputs.subscribe(e,c=>{a(c===Su?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Qt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Qt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let X0=!1;function Oe(){X0||(um(),Wv(Qt().inputs),lm(()=>Qt().outputs),Iv(),X0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,Su,c),[m,y]=Jn(`.clientdata_output_${f}_height`,Su,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=G0(f,void 0,c),A=j0(f,c),H=V.useRef(null),o=V.useRef(null),[s,h]=V.useState(0);V.useEffect(()=>{b&&h(E=>E+1)},[b]),V.useEffect(()=>{n&&n(A==="recalculating")},[A,n]);const S=V.useCallback(()=>{if(H.current){const E=H.current.clientWidth,_=H.current.clientHeight;E>0&&_>0&&(r(E),y(_))}},[r,y]);return V.useEffect(()=>{const E=H.current;if(!E)return;E.addEventListener("load",S);const _=Bc(()=>{E&&E.complete&&S()},a),z=new ResizeObserver(p=>{for(const M of p)M.target===E&&_()});return z.observe(E),()=>{E.removeEventListener("load",S),z.disconnect(),_.cancel()}},[H,s,r,y,a,S]),V.useEffect(()=>{if(b)return;const E=o.current;if(!E)return;const _=()=>{const M=E.clientWidth,R=E.clientHeight;M>0&&R>0&&(r(M),y(R))};_();const z=Bc(_,a),p=new ResizeObserver(()=>z());return p.observe(E),()=>{p.disconnect(),z.cancel()}},[b,r,y,a]),v?null:b?Sa.jsx("img",{ref:H,src:b.src,alt:"",className:l,style:{width:e,height:u},onLoad:S}):Sa.jsx("div",{ref:o,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:Sa.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:Sa.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:am,useShinyOutputStatus:j0,useShinyOutputValue:G0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:Su,ShinyModuleProvider:Xv,ShinyOutput:Kv,React:Fc,ReactDOM:Vv}}om(),Z0()})(); + */var Gv=Symbol.for("react.transitional.element"),Xv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Xv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var mu=m0.exports;const g0=V.createContext(null);function Qv({namespace:t,children:l}){return mu.jsx(g0.Provider,{value:t,children:l})}function Zv(){return V.useContext(g0)}function xv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Zv();return xv(t,l!==void 0?l:e)}const Su=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Lv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Kv(t){const l=Su.get(t);l&&T0(t,l.promise)}function Jv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{Lv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Kv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),p0="1.0";function wv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function $v(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function Wv(t){const l=e=>e.split(".")[0];l(t)!==l(p0)&&$v(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${p0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Fv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=wv();if(a!=null&&a.protocolVersion?Wv(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let A0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function kv(){if(A0||typeof document>"u")return;A0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return kv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class Iv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new Iv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Pv(){et()&&Y0()}class tm{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class lm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new tm(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function em(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===gu){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class um{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new um,outputs:new lm}),q0}function am(){Zt()}function Zt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Zt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const p=V.useCallback(R=>{if(!b)return;const s=Zt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(R)},[i,b]);return[y,p]}const bu=()=>{};function j0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function G0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function X0(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=le();return V.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Zt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let Q0=!1;function Oe(){Q0||(am(),Fv(Zt().inputs),em(()=>Zt().outputs),Pv(),Q0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,gu,c),[m,y]=Jn(`.clientdata_output_${f}_height`,gu,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=j0(f,void 0,c),p=G0(f,c),R=X0(f,c),o=V.useRef(null),s=V.useRef(null),[h,S]=V.useState(0);V.useEffect(()=>{b&&S(A=>A+1)},[b]),V.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=V.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(V.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Bc(()=>{A&&A.complete&&T()},a),O=new ResizeObserver(M=>{for(const H of M)H.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",T),O.disconnect(),E.cancel()}},[o,h,r,y,a,T]),V.useEffect(()=>{if(b)return;const A=s.current;if(!A)return;const E=()=>{const H=A.clientWidth,At=A.clientHeight;H>0&&At>0&&(r(H),y(At))};E();const O=Bc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,r,y,a]),v)return null;if(R){const A=["shiny-output-error",...[].concat(R.type??[]).map(E=>`shiny-output-error-${E}`),l];return mu.jsx("div",{className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:R.message})}return b?mu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:T}):mu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:mu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:mu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:X0,useShinyOutputStatus:G0,useShinyOutputValue:j0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:gu,ShinyModuleProvider:Qv,ShinyOutput:Jv,React:Fc,ReactDOM:jv}}om(),x0()})(); diff --git a/pkg-r/inst/lib/shiny/shinyreact.js b/pkg-r/inst/lib/shiny/shinyreact.js index 1191a98a..d0d1751b 100644 --- a/pkg-r/inst/lib/shiny/shinyreact.js +++ b/pkg-r/inst/lib/shiny/shinyreact.js @@ -1,4 +1,4 @@ -var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0,configurable:!0,writable:!0,value:ae}):ue[et]=ae;var I=(ue,et,ae)=>hm(ue,typeof et!="symbol"?et+"":et,ae);(function(){"use strict";function ue(t,l){for(var e=0;eu[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function et(){if(!(typeof window>"u"))return window.Shiny}let ae=!1;function Z0(){if(typeof document>"u"||ae)return;ae=!0;const t=()=>{const e=et();e&&(e.addCustomMessageHandler("shinyreact-deps",async u=>{var a,n;try{const i=e;await((a=i.renderDependenciesAsync)==null?void 0:a.call(i,u)),await((n=i.bindAll)==null?void 0:n.call(i,document.documentElement))}catch(i){console.error("[shinyreact] failed to load pushed dependencies:",i)}}),e.initializedPromise.then(()=>{var u;(u=e.setInputValue)==null||u.call(e,".shinyreact_init:shinyreact.init",1)}))};if(et()){t();return}const l=()=>{et()&&(document.removeEventListener("shiny:connected",l),t())};document.addEventListener("shiny:connected",l)}function Gc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jc={exports:{}},D={};/** +var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0,configurable:!0,writable:!0,value:ae}):ue[et]=ae;var I=(ue,et,ae)=>hm(ue,typeof et!="symbol"?et+"":et,ae);(function(){"use strict";function ue(t,l){for(var e=0;eu[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function et(){if(!(typeof window>"u"))return window.Shiny}let ae=!1;function x0(){if(typeof document>"u"||ae)return;ae=!0;const t=()=>{const e=et();e&&(e.addCustomMessageHandler("shinyreact-deps",async u=>{var a,n;try{const i=e;await((a=i.renderDependenciesAsync)==null?void 0:a.call(i,u)),await((n=i.bindAll)==null?void 0:n.call(i,document.documentElement))}catch(i){console.error("[shinyreact] failed to load pushed dependencies:",i)}}),e.initializedPromise.then(()=>{var u;(u=e.setInputValue)==null||u.call(e,".shinyreact_init:shinyreact.init",1)}))};if(et()){t();return}const l=()=>{et()&&(document.removeEventListener("shiny:connected",l),t())};document.addEventListener("shiny:connected",l)}function jc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gc={exports:{}},D={};/** * @license React * react.production.js * @@ -6,7 +6,7 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Fn=Symbol.for("react.transitional.element"),x0=Symbol.for("react.portal"),L0=Symbol.for("react.fragment"),K0=Symbol.for("react.strict_mode"),J0=Symbol.for("react.profiler"),w0=Symbol.for("react.consumer"),$0=Symbol.for("react.context"),W0=Symbol.for("react.forward_ref"),F0=Symbol.for("react.suspense"),k0=Symbol.for("react.memo"),Xc=Symbol.for("react.lazy"),I0=Symbol.for("react.activity"),Qc=Symbol.iterator;function P0(t){return t===null||typeof t!="object"?null:(t=Qc&&t[Qc]||t["@@iterator"],typeof t=="function"?t:null)}var Zc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xc=Object.assign,Lc={};function Me(t,l,e){this.props=t,this.context=l,this.refs=Lc,this.updater=e||Zc}Me.prototype.isReactComponent={},Me.prototype.setState=function(t,l){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,l,"setState")},Me.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Kc(){}Kc.prototype=Me.prototype;function kn(t,l,e){this.props=t,this.context=l,this.refs=Lc,this.updater=e||Zc}var In=kn.prototype=new Kc;In.constructor=kn,xc(In,Me.prototype),In.isPureReactComponent=!0;var Jc=Array.isArray;function Pn(){}var w={H:null,A:null,T:null,S:null},wc=Object.prototype.hasOwnProperty;function ti(t,l,e){var u=e.ref;return{$$typeof:Fn,type:t,key:l,ref:u!==void 0?u:null,props:e}}function th(t,l){return ti(t.type,l,t.props)}function li(t){return typeof t=="object"&&t!==null&&t.$$typeof===Fn}function lh(t){var l={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(e){return l[e]})}var $c=/\/+/g;function ei(t,l){return typeof t=="object"&&t!==null&&t.key!=null?lh(""+t.key):l.toString(36)}function eh(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(Pn,Pn):(t.status="pending",t.then(function(l){t.status==="pending"&&(t.status="fulfilled",t.value=l)},function(l){t.status==="pending"&&(t.status="rejected",t.reason=l)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function De(t,l,e,u,a){var n=typeof t;(n==="undefined"||n==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(n){case"bigint":case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case Fn:case x0:i=!0;break;case Xc:return i=t._init,De(i(t._payload),l,e,u,a)}}if(i)return a=a(t),i=u===""?"."+ei(t,0):u,Jc(a)?(e="",i!=null&&(e=i.replace($c,"$&/")+"/"),De(a,l,e,"",function(d){return d})):a!=null&&(li(a)&&(a=th(a,e+(a.key==null||t&&t.key===a.key?"":(""+a.key).replace($c,"$&/")+"/")+i)),l.push(a)),1;i=0;var f=u===""?".":u+":";if(Jc(t))for(var c=0;cet in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function l(T,Y){var N=T.length;T.push(Y);t:for(;0>>1,vt=T[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(T[nt]=Wn,T[_e]=N,nt=_e):(T[nt]=Vc,T[$n]=N,nt=$n);else if(_ea(Wn,N))T[nt]=Wn,T[_e]=N,nt=_e;else break t}}return Y}function a(T,Y){var N=T.sortIndex-Y.sortIndex;return N!==0?N:T.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,A=!1,H=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(T){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=T)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function E(T){if(A=!1,S(T),!b)if(e(c)!==null)b=!0,_||(_=!0,ee());else{var Y=e(d);Y!==null&&qc(E,Y.startTime-T)}}var _=!1,z=-1,p=5,M=-1;function R(){return H?!0:!(t.unstable_now()-MT&&R());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=T);if(T=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(T),Y=!0;break l}m===e(c)&&u(c),S(T)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(E,wn.startTime-T),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():_=!1}}}var ee;if(typeof h=="function")ee=function(){h(It)};else if(typeof MessageChannel<"u"){var Q0=new MessageChannel,dm=Q0.port2;Q0.port1.onmessage=It,ee=function(){dm.postMessage(null)}}else ee=function(){o(It,0)};function qc(T,Y){z=o(function(){T(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125nt?(T.sortIndex=N,l(d,T),e(c)===null&&T===e(d)&&(A?(s(z),z=-1):A=!0,qc(E,N-nt))):(T.sortIndex=vt,l(c,T),b||v||(b=!0,_||(_=!0,ee()))),T},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(T){var Y=y;return function(){var N=y;y=Y;try{return T.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var nh=Ic.exports,ts={exports:{}},zt={};/** + */(function(t){function l(z,Y){var N=z.length;z.push(Y);t:for(;0>>1,vt=z[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(z[nt]=Wn,z[_e]=N,nt=_e):(z[nt]=Vc,z[$n]=N,nt=$n);else if(_ea(Wn,N))z[nt]=Wn,z[_e]=N,nt=_e;else break t}}return Y}function a(z,Y){var N=z.sortIndex-Y.sortIndex;return N!==0?N:z.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,p=!1,R=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(z){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=z)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function T(z){if(p=!1,S(z),!b)if(e(c)!==null)b=!0,A||(A=!0,ee());else{var Y=e(d);Y!==null&&qc(T,Y.startTime-z)}}var A=!1,E=-1,O=5,M=-1;function H(){return R?!0:!(t.unstable_now()-Mz&&H());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=z);if(z=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(z),Y=!0;break l}m===e(c)&&u(c),S(z)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(T,wn.startTime-z),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():A=!1}}}var ee;if(typeof h=="function")ee=function(){h(At)};else if(typeof MessageChannel<"u"){var Z0=new MessageChannel,dm=Z0.port2;Z0.port1.onmessage=At,ee=function(){dm.postMessage(null)}}else ee=function(){o(At,0)};function qc(z,Y){E=o(function(){z(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125nt?(z.sortIndex=N,l(d,z),e(c)===null&&z===e(d)&&(p?(s(E),E=-1):p=!0,qc(T,N-nt))):(z.sortIndex=vt,l(c,z),b||v||(b=!0,A||(A=!0,ee()))),z},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(z){var Y=y;return function(){var N=y;y=Y;try{return z.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var ih=Ic.exports,ts={exports:{}},zt={};/** * @license React * react-dom.production.js * @@ -22,7 +22,7 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ih=V;function ls(t){var l="https://react.dev/errors/"+t;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(es)}catch(t){console.error(t)}}es(),ts.exports=zt;var sh=ts.exports;/** + */var fh=V;function ls(t){var l="https://react.dev/errors/"+t;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(es)}catch(t){console.error(t)}}es(),ts.exports=zt;var oh=ts.exports;/** * @license React * react-dom-client.production.js * @@ -30,15 +30,15 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ot=nh,us=V,oh=sh;function g(t){var l="https://react.dev/errors/"+t;if(1He||(t.current=oi[He],oi[He]=null,He--)}function J(t,l){He++,oi[He]=t.current,t.current=l}var ul=el(null),pu=el(null),Hl=el(null),Aa=el(null);function pa(t,l){switch(J(Hl,l),J(pu,t),J(ul,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?Vy(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=Vy(l),t=Gy(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}yt(ul),J(ul,t)}function Re(){yt(ul),yt(pu),yt(Hl)}function di(t){t.memoizedState!==null&&J(Aa,t);var l=ul.current,e=Gy(l,t.type);l!==e&&(J(pu,t),J(ul,e))}function Oa(t){pu.current===t&&(yt(ul),yt(pu)),Aa.current===t&&(yt(Aa),ha._currentValue=ne)}var yi,ys;function ie(t){if(yi===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);yi=l&&l[1]||"",ys=-1He||(t.current=oi[He],oi[He]=null,He--)}function J(t,l){He++,oi[He]=t.current,t.current=l}var ul=el(null),Ou=el(null),Hl=el(null),pa=el(null);function Aa(t,l){switch(J(Hl,l),J(Ou,t),J(ul,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?Vy(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=Vy(l),t=jy(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}yt(ul),J(ul,t)}function Re(){yt(ul),yt(Ou),yt(Hl)}function di(t){t.memoizedState!==null&&J(pa,t);var l=ul.current,e=jy(l,t.type);l!==e&&(J(Ou,t),J(ul,e))}function Oa(t){Ou.current===t&&(yt(ul),yt(Ou)),pa.current===t&&(yt(pa),ra._currentValue=ne)}var yi,ys;function ie(t){if(yi===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);yi=l&&l[1]||"",ys=-1)":-1a||c[u]!==d[a]){var r=` -`+c[u].replace(" at new "," at ");return t.displayName&&r.includes("")&&(r=r.replace("",t.displayName)),r}while(1<=u&&0<=a);break}}}finally{hi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function vh(t,l){switch(t.tag){case 26:case 27:case 5:return ie(t.type);case 16:return ie("Lazy");case 13:return t.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return ri(t.type,!1);case 11:return ri(t.type.render,!1);case 1:return ri(t.type,!0);case 31:return ie("Activity");default:return""}}function hs(t){try{var l="",e=null;do l+=vh(t,e),e=t,t=t.return;while(t);return l}catch(u){return` +`+c[u].replace(" at new "," at ");return t.displayName&&r.includes("")&&(r=r.replace("",t.displayName)),r}while(1<=u&&0<=a);break}}}finally{hi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function mh(t,l){switch(t.tag){case 26:case 27:case 5:return ie(t.type);case 16:return ie("Lazy");case 13:return t.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return ri(t.type,!1);case 11:return ri(t.type.render,!1);case 1:return ri(t.type,!0);case 31:return ie("Activity");default:return""}}function hs(t){try{var l="",e=null;do l+=mh(t,e),e=t,t=t.return;while(t);return l}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,mh=ot.unstable_shouldYield,Sh=ot.unstable_requestPaint,Rt=ot.unstable_now,gh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,bh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,Eh=ot.log,zh=ot.unstable_setDisableYieldValue,Ou=null,Nt=null;function Rl(t){if(typeof Eh=="function"&&zh(t),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Ou,t)}catch{}}var Ct=Math.clz32?Math.clz32:ph,Th=Math.log,Ah=Math.LN2;function ph(t){return t>>>=0,t===0?32:31-(Th(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function _u(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function Oh(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Mu(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function _h(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Nh=/[\n"\\]/g;function xt(t){return t.replace(Nh,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function pi(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+Zt(l)):t.value!==""+Zt(l)&&(t.value=""+Zt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,Zt(l)):e!=null?Oi(t,i,Zt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+Zt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){Ai(t);return}e=e!=null?""+Zt(e):"",l=l!=null?""+Zt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),Ai(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Ru={};Object.defineProperty(Ru,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Ru,Ru),window.removeEventListener("test",Ru,Ru)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Bu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return ir.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function cr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function sr(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function ji(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var Sr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&ji(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&Vu(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Ct(l)+a|e<p?(M=z,z=null):M=z.sibling;var R=y(o,z,h[p],S);if(R===null){z===null&&(z=M);break}t&&z&&R.alternate===null&&l(o,z),s=n(R,s,p),_===null?E=R:_.sibling=R,_=R,z=M}if(p===h.length)return e(o,z),G&&hl(o,p),E;if(z===null){for(;pp?(M=z,z=null):M=z.sibling;var It=y(o,z,R.value,S);if(It===null){z===null&&(z=M);break}t&&z&&It.alternate===null&&l(o,z),s=n(It,s,p),_===null?E=It:_.sibling=It,_=It,z=M}if(R.done)return e(o,z),G&&hl(o,p),E;if(z===null){for(;!R.done;p++,R=h.next())R=m(o,R.value,S),R!==null&&(s=n(R,s,p),_===null?E=R:_.sibling=R,_=R);return G&&hl(o,p),E}for(z=u(z);!R.done;p++,R=h.next())R=v(z,o,p,R.value,S),R!==null&&(t&&R.alternate!==null&&z.delete(R.key===null?p:R.key),s=n(R,s,p),_===null?E=R:_.sibling=R,_=R);return t&&z.forEach(function(ee){return l(o,ee)}),G&&hl(o,p),E}function H(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var E=h.key;s!==null;){if(s.key===E){if(E=h.type,E===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ul&&ge(E)===s.type){e(o,s.sibling),S=a(s,h.props),Lu(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Lu(S,h),S.return=o,o=S)}return i(o);case zu:t:{for(E=h.key;s!==null;){if(s.key===E)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),H(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(Tu(h)){if(E=Tu(h),typeof E!="function")throw Error(g(150));return h=E.call(h),A(o,s,h,S)}if(typeof h.then=="function")return H(o,s,Ia(h),S);if(h.$$typeof===cl)return H(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{xu=0;var E=H(o,s,h,S);return Pe=null,E}catch(z){if(z===Ie||z===Fa)throw z;var _=Yt(29,z,null,o.mode);return _.lanes=S,_.return=o,_}finally{}}}var Ee=Do(!0),Uo=Do(!1),Gl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function jl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ku(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function Ju(){if(of){var t=ke;if(t!==null)throw t}}function wu(t,l,e,u){of=!1;var a=t.updateQueue;Gl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,A=f;y=l;var H=e;switch(A.tag){case 1:if(b=A.payload,typeof b=="function"){m=b.call(H,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=A.payload,y=typeof b=="function"?b.call(H,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:Gl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=O.T,f={};O.T=f,Uf(t,!1,l,e);try{var c=a(),d=O.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=_r(c,u);Fu(t,l,r,Xt(t))}else Fu(t,l,u,Xt(t))}catch(m){Fu(t,l,{then:function(){},status:"rejected",reason:m},Xt())}finally{j.p=n,i!==null&&f.types!==null&&(i.types=f.types),O.T=i}}function Nr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Nr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),Fu(t,l.next.queue,{},Xt())}function Df(){return gt(ha)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Cr(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Xt();t=jl(e);var u=Xl(l,t,e);u!==null&&(Ht(u,l,e),Ku(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Br(t,l,e){var u=Xt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Ht(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Xt();Fu(t,l,e,u)}function Fu(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Bt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Ht(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Ht(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var ku={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};ku.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return At().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=At();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=At();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Br.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=At();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=At();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),At().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=At();if(G){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(jo.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},Go.bind(null,u,n,e,l),null),e},useId:function(){var t=At(),l=K.identifierPrefix;if(G){var e=nl,u=al;e=(u&~(1<<32-Ct(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[pt]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(Vt(l),l):(Vt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(Vt(l),l):(Vt(l),null)}return Vt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)Pu(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,Pu(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),G&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Rt()>En&&(l.flags|=128,a=!0,Pu(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),Pu(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!G)return k(l),null}else 2*Rt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,Pu(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Rt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),G&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return Vt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function jr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(Vt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(Vt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return Vt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&Vt(l);break;case 13:Vt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:Vt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function ta(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function la(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;fv(u,t.type,e,l),u[pt]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[pt]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Xr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),ji(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fH&&(i=H,H=A,A=i);var o=lo(f,A),s=lo(f,H);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),A>H?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,O.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,fa(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Ou,n)}catch{}return!0}finally{j.p=a,O.T=u,zy(t,l)}}function Ay(t,l,e){l=Kt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Mu(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)Ay(t,t,e);else for(;l!==null;){if(l.tag===3){Ay(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Kt(e,t),e=pd(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Mu(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new xr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=$r.bind(null,t,l,e),l.then(t,t))}function $r(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Rt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function py(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Mu(t,l),fl(t))}function Wr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),py(t,e)}function Fr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),py(t,e)}function kr(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,Pr())}function fa(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Ct(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||_u(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Ir(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&sv()&&(t=Wl);for(var l=Rt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||fa(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=xt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function gv(t){_l.D(t),$y("dns-prefetch",t,null)}function bv(t,l){_l.C(t,l),$y("preconnect",t,l)}function Ev(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+xt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+xt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+xt(e.imageSizes)+'"]')):a+='[href="'+xt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}kt.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),kt.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(da(n))||l==="script"&&u.querySelector(ya(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function zv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+xt(u)+'"][href="'+xt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!kt.has(n)&&(t=W({rel:"modulepreload",href:t},l),kt.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ya(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function Tv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(da(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=kt.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ya(a)),n||(t=W({src:t,async:!0},l),(l=kt.get(a))&&Ac(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function pv(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ya(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=kt.get(a))&&Ac(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(da(t)))&&!n._p&&(i.instance=n,i.state.loading=5),kt.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},kt.set(t,e),n||Ov(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+xt(t)+'"'}function da(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function Ov(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+xt(t)+'"]'}function ya(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+xt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(da(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=kt.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ya(n)))?(l.instance=a,ht(a),a):(u=e,(a=kt.get(n))&&(u=W({},e),Ac(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function _v(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Mv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(da(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=kt.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var pc=0;function Dv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0pc?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Uv,t),Yn=null,Bn.call(t))}function Uv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const Vv=ue({__proto__:null,default:Gc(v0)},[v0]);var m0={exports:{}},Ln={};/** +`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,Sh=ot.unstable_shouldYield,gh=ot.unstable_requestPaint,Nt=ot.unstable_now,bh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,Eh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,zh=ot.log,Th=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Rl(t){if(typeof zh=="function"&&Th(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:Oh,ph=Math.log,Ah=Math.LN2;function Oh(t){return t>>>=0,t===0?32:31-(ph(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function Mu(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function _h(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Du(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Mh(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ch=/[\n"\\]/g;function Lt(t){return t.replace(Ch,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ai(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+xt(l)):t.value!==""+xt(l)&&(t.value=""+xt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,xt(l)):e!=null?Oi(t,i,xt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+xt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){pi(t);return}e=e!=null?""+xt(e):"",l=l!=null?""+xt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),pi(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Yu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return fr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function sr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function or(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function Gi(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var gr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Gi(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&ju(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Bt(l)+a|e<O?(M=E,E=null):M=E.sibling;var H=y(o,E,h[O],S);if(H===null){E===null&&(E=M);break}t&&E&&H.alternate===null&&l(o,E),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H,E=M}if(O===h.length)return e(o,E),j&&hl(o,O),T;if(E===null){for(;OO?(M=E,E=null):M=E.sibling;var At=y(o,E,H.value,S);if(At===null){E===null&&(E=M);break}t&&E&&At.alternate===null&&l(o,E),s=n(At,s,O),A===null?T=At:A.sibling=At,A=At,E=M}if(H.done)return e(o,E),j&&hl(o,O),T;if(E===null){for(;!H.done;O++,H=h.next())H=m(o,H.value,S),H!==null&&(s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return j&&hl(o,O),T}for(E=u(E);!H.done;O++,H=h.next())H=v(E,o,O,H.value,S),H!==null&&(t&&H.alternate!==null&&E.delete(H.key===null?O:H.key),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return t&&E.forEach(function(ee){return l(o,ee)}),j&&hl(o,O),T}function R(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var T=h.key;s!==null;){if(s.key===T){if(T=h.type,T===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ul&&ge(T)===s.type){e(o,s.sibling),S=a(s,h.props),Ku(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Ku(S,h),S.return=o,o=S)}return i(o);case Tu:t:{for(T=h.key;s!==null;){if(s.key===T)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),R(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(pu(h)){if(T=pu(h),typeof T!="function")throw Error(g(150));return h=T.call(h),p(o,s,h,S)}if(typeof h.then=="function")return R(o,s,Ia(h),S);if(h.$$typeof===cl)return R(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{Lu=0;var T=R(o,s,h,S);return Pe=null,T}catch(E){if(E===Ie||E===Fa)throw E;var A=qt(29,E,null,o.mode);return A.lanes=S,A.return=o,A}finally{}}}var Ee=Do(!0),Uo=Do(!1),jl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ju(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function wu(){if(of){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){of=!1;var a=t.updateQueue;jl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,p=f;y=l;var R=e;switch(p.tag){case 1:if(b=p.payload,typeof b=="function"){m=b.call(R,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,y=typeof b=="function"?b.call(R,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:jl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Uf(t,!1,l,e);try{var c=a(),d=_.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=Mr(c,u);ku(t,l,r,Qt(t))}else ku(t,l,u,Qt(t))}catch(m){ku(t,l,{then:function(){},status:"rejected",reason:m},Qt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Cr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Cr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Qt())}function Df(){return gt(ra)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Br(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Qt();t=Gl(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Yr(t,l,e){var u=Qt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Rt(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Qt();ku(t,l,e,u)}function ku(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Yt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Rt(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Rt(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var Iu={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Iu.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return pt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=pt();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=pt();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Yr.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=pt();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=pt();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=pt();if(j){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(Go.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},jo.bind(null,u,n,e,l),null),e},useId:function(){var t=pt(),l=K.identifierPrefix;if(j){var e=nl,u=al;e=(u&~(1<<32-Bt(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[Ot]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(jt(l),l):(jt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(jt(l),l):(jt(l),null)}return jt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)ta(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,ta(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),j&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Nt()>En&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),ta(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!j)return k(l),null}else 2*Nt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Nt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),j&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return jt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function Xr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(jt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(jt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return jt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&jt(l);break;case 13:jt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:jt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function la(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function ea(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;cv(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[Ot]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Qr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),Gi(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fR&&(i=R,R=p,p=i);var o=lo(f,p),s=lo(f,R);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),p>R?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,_.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,zy(t,l)}}function py(t,l,e){l=Jt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)py(t,t,e);else for(;l!==null;){if(l.tag===3){py(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Jt(e,t),e=Ad(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Du(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Lr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=Wr.bind(null,t,l,e),l.then(t,t))}function Wr(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Nt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function Ay(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Du(t,l),fl(t))}function Fr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Ay(t,e)}function kr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),Ay(t,e)}function Ir(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,tv())}function ca(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Bt(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Pr(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&ov()&&(t=Wl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||ca(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=Lt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function bv(t){_l.D(t),$y("dns-prefetch",t,null)}function Ev(t,l){_l.C(t,l),$y("preconnect",t,l)}function zv(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+Lt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+Lt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+Lt(e.imageSizes)+'"]')):a+='[href="'+Lt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}It.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),It.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(ya(n))||l==="script"&&u.querySelector(ha(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function Tv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+Lt(u)+'"][href="'+Lt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!It.has(n)&&(t=W({rel:"modulepreload",href:t},l),It.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ha(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function pv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(ya(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=It.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Ov(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(ya(t)))&&!n._p&&(i.instance=n,i.state.loading=5),It.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},It.set(t,e),n||_v(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+Lt(t)+'"'}function ya(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function _v(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+Lt(t)+'"]'}function ha(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+Lt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(ya(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=It.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ha(n)))?(l.instance=a,ht(a),a):(u=e,(a=It.get(n))&&(u=W({},e),pc(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function Mv(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Dv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(ya(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=It.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Ac=0;function Uv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Ac?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Hv,t),Yn=null,Bn.call(t))}function Hv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const jv=ue({__proto__:null,default:jc(v0)},[v0]);var m0={exports:{}},Ln={};/** * @license React * react-jsx-runtime.production.js * @@ -46,4 +46,4 @@ Error generating stack: `+u.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gv=Symbol.for("react.transitional.element"),jv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=jv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var Sa=m0.exports;const g0=V.createContext(null);function Xv({namespace:t,children:l}){return Sa.jsx(g0.Provider,{value:t,children:l})}function Qv(){return V.useContext(g0)}function Zv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Qv();return Zv(t,l!==void 0?l:e)}const mu=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{mu.get(t)===u&&(mu.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return mu.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=mu.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function xv(t,l){const e=mu.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Lv(t){const l=mu.get(t);l&&T0(t,l.promise)}function Kv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{xv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Lv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const Su=Symbol("MISSING"),A0="1.0";function Jv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function wv(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function $v(t){const l=e=>e.split(".")[0];l(t)!==l(A0)&&wv(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${A0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Wv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=Jv();if(a!=null&&a.protocolVersion?$v(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let p0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function Fv(){if(p0||typeof document>"u")return;p0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return Fv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class kv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new kv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Iv(){et()&&Y0()}class Pv{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class tm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new Pv(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function lm(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===Su){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class em{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new em,outputs:new tm}),q0}function um(){Qt()}function Qt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Qt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Qt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const A=V.useCallback(H=>{if(!b)return;const s=Qt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(H)},[i,b]);return[y,A]}const gu=()=>{};function G0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Qt();return a(f.current),c.outputs.add(i,a,gu,gu)},[i,n]),u}function j0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Qt().outputs.add(n,gu,u,gu):void 0,[n,a]),e}function am(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Qt().outputs.add(n,gu,gu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Qt().inputs.get(e);if(!i)return;const f=i.getValue();return f===Su?void 0:f}),n=le();return V.useEffect(()=>n?Qt().inputs.subscribe(e,c=>{a(c===Su?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Qt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Qt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let X0=!1;function Oe(){X0||(um(),Wv(Qt().inputs),lm(()=>Qt().outputs),Iv(),X0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,Su,c),[m,y]=Jn(`.clientdata_output_${f}_height`,Su,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=G0(f,void 0,c),A=j0(f,c),H=V.useRef(null),o=V.useRef(null),[s,h]=V.useState(0);V.useEffect(()=>{b&&h(E=>E+1)},[b]),V.useEffect(()=>{n&&n(A==="recalculating")},[A,n]);const S=V.useCallback(()=>{if(H.current){const E=H.current.clientWidth,_=H.current.clientHeight;E>0&&_>0&&(r(E),y(_))}},[r,y]);return V.useEffect(()=>{const E=H.current;if(!E)return;E.addEventListener("load",S);const _=Bc(()=>{E&&E.complete&&S()},a),z=new ResizeObserver(p=>{for(const M of p)M.target===E&&_()});return z.observe(E),()=>{E.removeEventListener("load",S),z.disconnect(),_.cancel()}},[H,s,r,y,a,S]),V.useEffect(()=>{if(b)return;const E=o.current;if(!E)return;const _=()=>{const M=E.clientWidth,R=E.clientHeight;M>0&&R>0&&(r(M),y(R))};_();const z=Bc(_,a),p=new ResizeObserver(()=>z());return p.observe(E),()=>{p.disconnect(),z.cancel()}},[b,r,y,a]),v?null:b?Sa.jsx("img",{ref:H,src:b.src,alt:"",className:l,style:{width:e,height:u},onLoad:S}):Sa.jsx("div",{ref:o,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:Sa.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:Sa.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:am,useShinyOutputStatus:j0,useShinyOutputValue:G0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:Su,ShinyModuleProvider:Xv,ShinyOutput:Kv,React:Fc,ReactDOM:Vv}}om(),Z0()})(); + */var Gv=Symbol.for("react.transitional.element"),Xv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Xv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var mu=m0.exports;const g0=V.createContext(null);function Qv({namespace:t,children:l}){return mu.jsx(g0.Provider,{value:t,children:l})}function Zv(){return V.useContext(g0)}function xv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Zv();return xv(t,l!==void 0?l:e)}const Su=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Lv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Kv(t){const l=Su.get(t);l&&T0(t,l.promise)}function Jv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{Lv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Kv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),p0="1.0";function wv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function $v(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function Wv(t){const l=e=>e.split(".")[0];l(t)!==l(p0)&&$v(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${p0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Fv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=wv();if(a!=null&&a.protocolVersion?Wv(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let A0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function kv(){if(A0||typeof document>"u")return;A0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return kv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class Iv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new Iv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Pv(){et()&&Y0()}class tm{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class lm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new tm(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function em(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===gu){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class um{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new um,outputs:new lm}),q0}function am(){Zt()}function Zt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Zt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const p=V.useCallback(R=>{if(!b)return;const s=Zt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(R)},[i,b]);return[y,p]}const bu=()=>{};function j0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function G0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function X0(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=le();return V.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Zt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let Q0=!1;function Oe(){Q0||(am(),Fv(Zt().inputs),em(()=>Zt().outputs),Pv(),Q0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,gu,c),[m,y]=Jn(`.clientdata_output_${f}_height`,gu,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=j0(f,void 0,c),p=G0(f,c),R=X0(f,c),o=V.useRef(null),s=V.useRef(null),[h,S]=V.useState(0);V.useEffect(()=>{b&&S(A=>A+1)},[b]),V.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=V.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(V.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Bc(()=>{A&&A.complete&&T()},a),O=new ResizeObserver(M=>{for(const H of M)H.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",T),O.disconnect(),E.cancel()}},[o,h,r,y,a,T]),V.useEffect(()=>{if(b)return;const A=s.current;if(!A)return;const E=()=>{const H=A.clientWidth,At=A.clientHeight;H>0&&At>0&&(r(H),y(At))};E();const O=Bc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,r,y,a]),v)return null;if(R){const A=["shiny-output-error",...[].concat(R.type??[]).map(E=>`shiny-output-error-${E}`),l];return mu.jsx("div",{className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:R.message})}return b?mu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:T}):mu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:mu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:mu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:X0,useShinyOutputStatus:G0,useShinyOutputValue:j0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:gu,ShinyModuleProvider:Qv,ShinyOutput:Jv,React:Fc,ReactDOM:jv}}om(),x0()})(); From fbbfd7f4f051277eb8ac32f147d945f8a6ca5520 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Thu, 12 Nov 2026 11:06:13 -0500 Subject: [PATCH 2/2] fix(js): ImageOutput keeps measuring its size while an error shows --- FEATURES.md | 2 ++ pkg-js/dist/shinyreact.js | 8 ++--- pkg-js/src/shiny-react/ImageOutput.tsx | 8 +++-- .../__tests__/ImageOutput.test.tsx | 30 +++++++++++++++---- pkg-py/src/shinyreact/www/shinyreact.js | 8 ++--- pkg-r/inst/lib/shiny/shinyreact.js | 8 ++--- 6 files changed, 45 insertions(+), 19 deletions(-) diff --git a/FEATURES.md b/FEATURES.md index c82c35cf..eacd757f 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -666,6 +666,8 @@ registries are exposed on `window.Shiny.reactRegistry`; the message registry on `shiny-output-error-` per error type (an R one-class `type` arrives as a plain string and is accepted), then `className` - `width` / `height` still apply, so the layout does not jump + - the error div is measured like the placeholder, so a resize while the + error shows still sends the new size to the server - the image comes back once the error clears and a value arrives - silent errors (`req()`) carry no message and are not errors here: they arrive as a `null` value, so the placeholder shows diff --git a/pkg-js/dist/shinyreact.js b/pkg-js/dist/shinyreact.js index d0d1751b..13ae75ad 100644 --- a/pkg-js/dist/shinyreact.js +++ b/pkg-js/dist/shinyreact.js @@ -14,7 +14,7 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function l(z,Y){var N=z.length;z.push(Y);t:for(;0>>1,vt=z[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(z[nt]=Wn,z[_e]=N,nt=_e):(z[nt]=Vc,z[$n]=N,nt=$n);else if(_ea(Wn,N))z[nt]=Wn,z[_e]=N,nt=_e;else break t}}return Y}function a(z,Y){var N=z.sortIndex-Y.sortIndex;return N!==0?N:z.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,p=!1,R=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(z){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=z)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function T(z){if(p=!1,S(z),!b)if(e(c)!==null)b=!0,A||(A=!0,ee());else{var Y=e(d);Y!==null&&qc(T,Y.startTime-z)}}var A=!1,E=-1,O=5,M=-1;function H(){return R?!0:!(t.unstable_now()-Mz&&H());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=z);if(z=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(z),Y=!0;break l}m===e(c)&&u(c),S(z)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(T,wn.startTime-z),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():A=!1}}}var ee;if(typeof h=="function")ee=function(){h(At)};else if(typeof MessageChannel<"u"){var Z0=new MessageChannel,dm=Z0.port2;Z0.port1.onmessage=At,ee=function(){dm.postMessage(null)}}else ee=function(){o(At,0)};function qc(z,Y){E=o(function(){z(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125nt?(z.sortIndex=N,l(d,z),e(c)===null&&z===e(d)&&(p?(s(E),E=-1):p=!0,qc(T,N-nt))):(z.sortIndex=vt,l(c,z),b||v||(b=!0,A||(A=!0,ee()))),z},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(z){var Y=y;return function(){var N=y;y=Y;try{return z.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var ih=Ic.exports,ts={exports:{}},zt={};/** + */(function(t){function l(z,Y){var N=z.length;z.push(Y);t:for(;0>>1,vt=z[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(z[nt]=Wn,z[_e]=N,nt=_e):(z[nt]=Vc,z[$n]=N,nt=$n);else if(_ea(Wn,N))z[nt]=Wn,z[_e]=N,nt=_e;else break t}}return Y}function a(z,Y){var N=z.sortIndex-Y.sortIndex;return N!==0?N:z.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,p=!1,H=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(z){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=z)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function T(z){if(p=!1,S(z),!b)if(e(c)!==null)b=!0,A||(A=!0,ee());else{var Y=e(d);Y!==null&&qc(T,Y.startTime-z)}}var A=!1,E=-1,O=5,M=-1;function R(){return H?!0:!(t.unstable_now()-Mz&&R());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=z);if(z=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(z),Y=!0;break l}m===e(c)&&u(c),S(z)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(T,wn.startTime-z),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():A=!1}}}var ee;if(typeof h=="function")ee=function(){h(At)};else if(typeof MessageChannel<"u"){var Z0=new MessageChannel,dm=Z0.port2;Z0.port1.onmessage=At,ee=function(){dm.postMessage(null)}}else ee=function(){o(At,0)};function qc(z,Y){E=o(function(){z(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125nt?(z.sortIndex=N,l(d,z),e(c)===null&&z===e(d)&&(p?(s(E),E=-1):p=!0,qc(T,N-nt))):(z.sortIndex=vt,l(c,z),b||v||(b=!0,A||(A=!0,ee()))),z},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(z){var Y=y;return function(){var N=y;y=Y;try{return z.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var ih=Ic.exports,ts={exports:{}},zt={};/** * @license React * react-dom.production.js * @@ -37,8 +37,8 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 `);for(a=u=0;ua||c[u]!==d[a]){var r=` `+c[u].replace(" at new "," at ");return t.displayName&&r.includes("")&&(r=r.replace("",t.displayName)),r}while(1<=u&&0<=a);break}}}finally{hi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function mh(t,l){switch(t.tag){case 26:case 27:case 5:return ie(t.type);case 16:return ie("Lazy");case 13:return t.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return ri(t.type,!1);case 11:return ri(t.type.render,!1);case 1:return ri(t.type,!0);case 31:return ie("Activity");default:return""}}function hs(t){try{var l="",e=null;do l+=mh(t,e),e=t,t=t.return;while(t);return l}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,Sh=ot.unstable_shouldYield,gh=ot.unstable_requestPaint,Nt=ot.unstable_now,bh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,Eh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,zh=ot.log,Th=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Rl(t){if(typeof zh=="function"&&Th(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:Oh,ph=Math.log,Ah=Math.LN2;function Oh(t){return t>>>=0,t===0?32:31-(ph(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function Mu(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function _h(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Du(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Mh(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ch=/[\n"\\]/g;function Lt(t){return t.replace(Ch,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ai(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+xt(l)):t.value!==""+xt(l)&&(t.value=""+xt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,xt(l)):e!=null?Oi(t,i,xt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+xt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){pi(t);return}e=e!=null?""+xt(e):"",l=l!=null?""+xt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),pi(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Yu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return fr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function sr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function or(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function Gi(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var gr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Gi(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&ju(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Bt(l)+a|e<O?(M=E,E=null):M=E.sibling;var H=y(o,E,h[O],S);if(H===null){E===null&&(E=M);break}t&&E&&H.alternate===null&&l(o,E),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H,E=M}if(O===h.length)return e(o,E),j&&hl(o,O),T;if(E===null){for(;OO?(M=E,E=null):M=E.sibling;var At=y(o,E,H.value,S);if(At===null){E===null&&(E=M);break}t&&E&&At.alternate===null&&l(o,E),s=n(At,s,O),A===null?T=At:A.sibling=At,A=At,E=M}if(H.done)return e(o,E),j&&hl(o,O),T;if(E===null){for(;!H.done;O++,H=h.next())H=m(o,H.value,S),H!==null&&(s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return j&&hl(o,O),T}for(E=u(E);!H.done;O++,H=h.next())H=v(E,o,O,H.value,S),H!==null&&(t&&H.alternate!==null&&E.delete(H.key===null?O:H.key),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return t&&E.forEach(function(ee){return l(o,ee)}),j&&hl(o,O),T}function R(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var T=h.key;s!==null;){if(s.key===T){if(T=h.type,T===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ul&&ge(T)===s.type){e(o,s.sibling),S=a(s,h.props),Ku(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Ku(S,h),S.return=o,o=S)}return i(o);case Tu:t:{for(T=h.key;s!==null;){if(s.key===T)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),R(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(pu(h)){if(T=pu(h),typeof T!="function")throw Error(g(150));return h=T.call(h),p(o,s,h,S)}if(typeof h.then=="function")return R(o,s,Ia(h),S);if(h.$$typeof===cl)return R(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{Lu=0;var T=R(o,s,h,S);return Pe=null,T}catch(E){if(E===Ie||E===Fa)throw E;var A=qt(29,E,null,o.mode);return A.lanes=S,A.return=o,A}finally{}}}var Ee=Do(!0),Uo=Do(!1),jl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ju(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function wu(){if(of){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){of=!1;var a=t.updateQueue;jl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,p=f;y=l;var R=e;switch(p.tag){case 1:if(b=p.payload,typeof b=="function"){m=b.call(R,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,y=typeof b=="function"?b.call(R,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:jl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Uf(t,!1,l,e);try{var c=a(),d=_.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=Mr(c,u);ku(t,l,r,Qt(t))}else ku(t,l,u,Qt(t))}catch(m){ku(t,l,{then:function(){},status:"rejected",reason:m},Qt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Cr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Cr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Qt())}function Df(){return gt(ra)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Br(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Qt();t=Gl(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Yr(t,l,e){var u=Qt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Rt(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Qt();ku(t,l,e,u)}function ku(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Yt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Rt(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Rt(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var Iu={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Iu.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return pt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=pt();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=pt();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Yr.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=pt();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=pt();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=pt();if(j){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(Go.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},jo.bind(null,u,n,e,l),null),e},useId:function(){var t=pt(),l=K.identifierPrefix;if(j){var e=nl,u=al;e=(u&~(1<<32-Bt(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[Ot]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(jt(l),l):(jt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(jt(l),l):(jt(l),null)}return jt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)ta(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,ta(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),j&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Nt()>En&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),ta(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!j)return k(l),null}else 2*Nt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Nt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),j&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return jt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function Xr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(jt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(jt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return jt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&jt(l);break;case 13:jt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:jt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function la(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function ea(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;cv(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[Ot]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Qr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),Gi(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fR&&(i=R,R=p,p=i);var o=lo(f,p),s=lo(f,R);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),p>R?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,_.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,zy(t,l)}}function py(t,l,e){l=Jt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)py(t,t,e);else for(;l!==null;){if(l.tag===3){py(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Jt(e,t),e=Ad(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Du(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Lr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=Wr.bind(null,t,l,e),l.then(t,t))}function Wr(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Nt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function Ay(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Du(t,l),fl(t))}function Fr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Ay(t,e)}function kr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),Ay(t,e)}function Ir(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,tv())}function ca(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Bt(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Pr(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&ov()&&(t=Wl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||ca(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=Lt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function bv(t){_l.D(t),$y("dns-prefetch",t,null)}function Ev(t,l){_l.C(t,l),$y("preconnect",t,l)}function zv(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+Lt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+Lt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+Lt(e.imageSizes)+'"]')):a+='[href="'+Lt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}It.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),It.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(ya(n))||l==="script"&&u.querySelector(ha(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function Tv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+Lt(u)+'"][href="'+Lt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!It.has(n)&&(t=W({rel:"modulepreload",href:t},l),It.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ha(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function pv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(ya(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=It.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Ov(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(ya(t)))&&!n._p&&(i.instance=n,i.state.loading=5),It.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},It.set(t,e),n||_v(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+Lt(t)+'"'}function ya(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function _v(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+Lt(t)+'"]'}function ha(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+Lt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(ya(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=It.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ha(n)))?(l.instance=a,ht(a),a):(u=e,(a=It.get(n))&&(u=W({},e),pc(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function Mv(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Dv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(ya(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=It.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Ac=0;function Uv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Ac?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Hv,t),Yn=null,Bn.call(t))}function Hv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const jv=ue({__proto__:null,default:jc(v0)},[v0]);var m0={exports:{}},Ln={};/** +`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,Sh=ot.unstable_shouldYield,gh=ot.unstable_requestPaint,Nt=ot.unstable_now,bh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,Eh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,zh=ot.log,Th=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Rl(t){if(typeof zh=="function"&&Th(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:Oh,ph=Math.log,Ah=Math.LN2;function Oh(t){return t>>>=0,t===0?32:31-(ph(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function Mu(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function _h(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Du(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Mh(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ch=/[\n"\\]/g;function Lt(t){return t.replace(Ch,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ai(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+xt(l)):t.value!==""+xt(l)&&(t.value=""+xt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,xt(l)):e!=null?Oi(t,i,xt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+xt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){pi(t);return}e=e!=null?""+xt(e):"",l=l!=null?""+xt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),pi(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Yu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return fr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function sr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function or(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function Gi(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var gr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Gi(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&ju(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Bt(l)+a|e<O?(M=E,E=null):M=E.sibling;var R=y(o,E,h[O],S);if(R===null){E===null&&(E=M);break}t&&E&&R.alternate===null&&l(o,E),s=n(R,s,O),A===null?T=R:A.sibling=R,A=R,E=M}if(O===h.length)return e(o,E),j&&hl(o,O),T;if(E===null){for(;OO?(M=E,E=null):M=E.sibling;var At=y(o,E,R.value,S);if(At===null){E===null&&(E=M);break}t&&E&&At.alternate===null&&l(o,E),s=n(At,s,O),A===null?T=At:A.sibling=At,A=At,E=M}if(R.done)return e(o,E),j&&hl(o,O),T;if(E===null){for(;!R.done;O++,R=h.next())R=m(o,R.value,S),R!==null&&(s=n(R,s,O),A===null?T=R:A.sibling=R,A=R);return j&&hl(o,O),T}for(E=u(E);!R.done;O++,R=h.next())R=v(E,o,O,R.value,S),R!==null&&(t&&R.alternate!==null&&E.delete(R.key===null?O:R.key),s=n(R,s,O),A===null?T=R:A.sibling=R,A=R);return t&&E.forEach(function(ee){return l(o,ee)}),j&&hl(o,O),T}function H(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var T=h.key;s!==null;){if(s.key===T){if(T=h.type,T===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ul&&ge(T)===s.type){e(o,s.sibling),S=a(s,h.props),Ku(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Ku(S,h),S.return=o,o=S)}return i(o);case Tu:t:{for(T=h.key;s!==null;){if(s.key===T)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),H(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(pu(h)){if(T=pu(h),typeof T!="function")throw Error(g(150));return h=T.call(h),p(o,s,h,S)}if(typeof h.then=="function")return H(o,s,Ia(h),S);if(h.$$typeof===cl)return H(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{Lu=0;var T=H(o,s,h,S);return Pe=null,T}catch(E){if(E===Ie||E===Fa)throw E;var A=qt(29,E,null,o.mode);return A.lanes=S,A.return=o,A}finally{}}}var Ee=Do(!0),Uo=Do(!1),jl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ju(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function wu(){if(of){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){of=!1;var a=t.updateQueue;jl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,p=f;y=l;var H=e;switch(p.tag){case 1:if(b=p.payload,typeof b=="function"){m=b.call(H,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,y=typeof b=="function"?b.call(H,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:jl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Uf(t,!1,l,e);try{var c=a(),d=_.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=Mr(c,u);ku(t,l,r,Qt(t))}else ku(t,l,u,Qt(t))}catch(m){ku(t,l,{then:function(){},status:"rejected",reason:m},Qt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Cr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Cr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Qt())}function Df(){return gt(ra)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Br(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Qt();t=Gl(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Yr(t,l,e){var u=Qt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Rt(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Qt();ku(t,l,e,u)}function ku(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Yt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Rt(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Rt(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var Iu={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Iu.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return pt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=pt();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=pt();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Yr.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=pt();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=pt();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=pt();if(j){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(Go.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},jo.bind(null,u,n,e,l),null),e},useId:function(){var t=pt(),l=K.identifierPrefix;if(j){var e=nl,u=al;e=(u&~(1<<32-Bt(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[Ot]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(jt(l),l):(jt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(jt(l),l):(jt(l),null)}return jt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)ta(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,ta(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),j&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Nt()>En&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),ta(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!j)return k(l),null}else 2*Nt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Nt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),j&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return jt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function Xr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(jt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(jt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return jt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&jt(l);break;case 13:jt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:jt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function la(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function ea(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;cv(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[Ot]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Qr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),Gi(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fH&&(i=H,H=p,p=i);var o=lo(f,p),s=lo(f,H);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),p>H?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,_.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,zy(t,l)}}function py(t,l,e){l=Jt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)py(t,t,e);else for(;l!==null;){if(l.tag===3){py(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Jt(e,t),e=Ad(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Du(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Lr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=Wr.bind(null,t,l,e),l.then(t,t))}function Wr(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Nt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function Ay(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Du(t,l),fl(t))}function Fr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Ay(t,e)}function kr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),Ay(t,e)}function Ir(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,tv())}function ca(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Bt(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Pr(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&ov()&&(t=Wl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||ca(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=Lt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function bv(t){_l.D(t),$y("dns-prefetch",t,null)}function Ev(t,l){_l.C(t,l),$y("preconnect",t,l)}function zv(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+Lt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+Lt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+Lt(e.imageSizes)+'"]')):a+='[href="'+Lt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}It.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),It.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(ya(n))||l==="script"&&u.querySelector(ha(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function Tv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+Lt(u)+'"][href="'+Lt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!It.has(n)&&(t=W({rel:"modulepreload",href:t},l),It.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ha(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function pv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(ya(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=It.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Ov(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(ya(t)))&&!n._p&&(i.instance=n,i.state.loading=5),It.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},It.set(t,e),n||_v(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+Lt(t)+'"'}function ya(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function _v(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+Lt(t)+'"]'}function ha(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+Lt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(ya(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=It.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ha(n)))?(l.instance=a,ht(a),a):(u=e,(a=It.get(n))&&(u=W({},e),pc(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function Mv(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Dv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(ya(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=It.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Ac=0;function Uv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Ac?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Hv,t),Yn=null,Bn.call(t))}function Hv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const jv=ue({__proto__:null,default:jc(v0)},[v0]);var m0={exports:{}},Ln={};/** * @license React * react-jsx-runtime.production.js * @@ -46,4 +46,4 @@ Error generating stack: `+u.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gv=Symbol.for("react.transitional.element"),Xv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Xv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var mu=m0.exports;const g0=V.createContext(null);function Qv({namespace:t,children:l}){return mu.jsx(g0.Provider,{value:t,children:l})}function Zv(){return V.useContext(g0)}function xv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Zv();return xv(t,l!==void 0?l:e)}const Su=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Lv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Kv(t){const l=Su.get(t);l&&T0(t,l.promise)}function Jv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{Lv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Kv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),p0="1.0";function wv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function $v(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function Wv(t){const l=e=>e.split(".")[0];l(t)!==l(p0)&&$v(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${p0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Fv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=wv();if(a!=null&&a.protocolVersion?Wv(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let A0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function kv(){if(A0||typeof document>"u")return;A0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return kv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class Iv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new Iv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Pv(){et()&&Y0()}class tm{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class lm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new tm(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function em(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===gu){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class um{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new um,outputs:new lm}),q0}function am(){Zt()}function Zt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Zt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const p=V.useCallback(R=>{if(!b)return;const s=Zt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(R)},[i,b]);return[y,p]}const bu=()=>{};function j0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function G0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function X0(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=le();return V.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Zt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let Q0=!1;function Oe(){Q0||(am(),Fv(Zt().inputs),em(()=>Zt().outputs),Pv(),Q0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,gu,c),[m,y]=Jn(`.clientdata_output_${f}_height`,gu,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=j0(f,void 0,c),p=G0(f,c),R=X0(f,c),o=V.useRef(null),s=V.useRef(null),[h,S]=V.useState(0);V.useEffect(()=>{b&&S(A=>A+1)},[b]),V.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=V.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(V.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Bc(()=>{A&&A.complete&&T()},a),O=new ResizeObserver(M=>{for(const H of M)H.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",T),O.disconnect(),E.cancel()}},[o,h,r,y,a,T]),V.useEffect(()=>{if(b)return;const A=s.current;if(!A)return;const E=()=>{const H=A.clientWidth,At=A.clientHeight;H>0&&At>0&&(r(H),y(At))};E();const O=Bc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,r,y,a]),v)return null;if(R){const A=["shiny-output-error",...[].concat(R.type??[]).map(E=>`shiny-output-error-${E}`),l];return mu.jsx("div",{className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:R.message})}return b?mu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:T}):mu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:mu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:mu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:X0,useShinyOutputStatus:G0,useShinyOutputValue:j0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:gu,ShinyModuleProvider:Qv,ShinyOutput:Jv,React:Fc,ReactDOM:jv}}om(),x0()})(); + */var Gv=Symbol.for("react.transitional.element"),Xv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Xv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var mu=m0.exports;const g0=V.createContext(null);function Qv({namespace:t,children:l}){return mu.jsx(g0.Provider,{value:t,children:l})}function Zv(){return V.useContext(g0)}function xv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Zv();return xv(t,l!==void 0?l:e)}const Su=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Lv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Kv(t){const l=Su.get(t);l&&T0(t,l.promise)}function Jv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{Lv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Kv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),p0="1.0";function wv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function $v(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function Wv(t){const l=e=>e.split(".")[0];l(t)!==l(p0)&&$v(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${p0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Fv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=wv();if(a!=null&&a.protocolVersion?Wv(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let A0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function kv(){if(A0||typeof document>"u")return;A0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return kv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class Iv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new Iv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Pv(){et()&&Y0()}class tm{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class lm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new tm(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function em(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===gu){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class um{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new um,outputs:new lm}),q0}function am(){Zt()}function Zt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Zt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const p=V.useCallback(H=>{if(!b)return;const s=Zt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(H)},[i,b]);return[y,p]}const bu=()=>{};function j0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function G0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function X0(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=le();return V.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Zt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let Q0=!1;function Oe(){Q0||(am(),Fv(Zt().inputs),em(()=>Zt().outputs),Pv(),Q0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,gu,c),[m,y]=Jn(`.clientdata_output_${f}_height`,gu,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=j0(f,void 0,c),p=G0(f,c),H=X0(f,c),o=V.useRef(null),s=V.useRef(null),[h,S]=V.useState(0);V.useEffect(()=>{b&&S(A=>A+1)},[b]),V.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=V.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(V.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Bc(()=>{A&&A.complete&&T()},a),O=new ResizeObserver(M=>{for(const R of M)R.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",T),O.disconnect(),E.cancel()}},[o,h,r,y,a,T]),V.useEffect(()=>{if(b&&!H)return;const A=s.current;if(!A)return;const E=()=>{const R=A.clientWidth,At=A.clientHeight;R>0&&At>0&&(r(R),y(At))};E();const O=Bc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,H,r,y,a]),v)return null;if(H){const A=["shiny-output-error",...[].concat(H.type??[]).map(E=>`shiny-output-error-${E}`),l];return mu.jsx("div",{ref:s,className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:H.message})}return b?mu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:T}):mu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:mu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:mu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:X0,useShinyOutputStatus:G0,useShinyOutputValue:j0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:gu,ShinyModuleProvider:Qv,ShinyOutput:Jv,React:Fc,ReactDOM:jv}}om(),x0()})(); diff --git a/pkg-js/src/shiny-react/ImageOutput.tsx b/pkg-js/src/shiny-react/ImageOutput.tsx index 55129525..f63695aa 100644 --- a/pkg-js/src/shiny-react/ImageOutput.tsx +++ b/pkg-js/src/shiny-react/ImageOutput.tsx @@ -272,8 +272,11 @@ export function ImageOutput({ // only renders once imgData exists, which only exists once the // server has rendered, which only happens once dimensions arrive — a // chicken-and-egg loop). + // + // The error message div takes the placeholder's place (and ref) while an + // error shows, so a resize during an error still reaches the server. useEffect(() => { - if (imgData) return; + if (imgData && !imgError) return; const placeholder = placeholderRef.current; if (!placeholder) return; @@ -297,7 +300,7 @@ export function ImageOutput({ resizeObserver.disconnect(); debounced.cancel(); }; - }, [imgData, setImgWidth, setImgHeight, debounceMs]); + }, [imgData, imgError, setImgWidth, setImgHeight, debounceMs]); if (imgHidden) { return null; @@ -317,6 +320,7 @@ export function ImageOutput({ ]; return (
diff --git a/pkg-js/src/shiny-react/__tests__/ImageOutput.test.tsx b/pkg-js/src/shiny-react/__tests__/ImageOutput.test.tsx index 5d0c5d15..b2b8360c 100644 --- a/pkg-js/src/shiny-react/__tests__/ImageOutput.test.tsx +++ b/pkg-js/src/shiny-react/__tests__/ImageOutput.test.tsx @@ -53,14 +53,23 @@ import { __resetLifecycleStoreForTests } from "../lifecycle-store"; import { ShinyModuleProvider } from "../ShinyModuleContext"; import { getReactRegistry } from "../react-registry"; +// Elements watched by a live (not yet disconnected) ResizeObserver. +const observed = new Set(); + beforeAll(() => { // ImageOutput attaches a ResizeObserver. jsdom doesn't ship one — stub it - // so the component can mount without throwing. + // so the component can mount, and record what it watches. (globalThis as unknown as { ResizeObserver: unknown }).ResizeObserver = class { - observe() {} + private els: Element[] = []; + observe(el: Element) { + this.els.push(el); + observed.add(el); + } unobserve() {} - disconnect() {} + disconnect() { + this.els.forEach((el) => observed.delete(el)); + } }; }); @@ -197,7 +206,7 @@ describe("ImageOutput on error", () => { out.sendError("plot", { message: "Nothing to plot", call: null, - type: ["shiny.silent.error", "validation"], + type: ["validation", "my-error"], }); expect(container.querySelector("img")).toBeNull(); @@ -205,8 +214,8 @@ describe("ImageOutput on error", () => { expect(el.textContent).toBe("Nothing to plot"); expect([...el.classList]).toEqual([ "shiny-output-error", - "shiny-output-error-shiny.silent.error", "shiny-output-error-validation", + "shiny-output-error-my-error", "mine", ]); }); @@ -221,6 +230,17 @@ describe("ImageOutput on error", () => { ); }); + it("keeps measuring its size while the error shows", async () => { + // Without this, a resize during an error never reaches the server. + const out = captureOutputSetters(); + const { container } = render(); + await flushPromises(); + out.sendValue("plot", IMG); + out.sendError("plot", { message: "boom", call: null, type: null }); + + expect(observed.has(container.firstElementChild!)).toBe(true); + }); + it("shows the image again once the error clears", async () => { const out = captureOutputSetters(); const { container } = render(); diff --git a/pkg-py/src/shinyreact/www/shinyreact.js b/pkg-py/src/shinyreact/www/shinyreact.js index d0d1751b..13ae75ad 100644 --- a/pkg-py/src/shinyreact/www/shinyreact.js +++ b/pkg-py/src/shinyreact/www/shinyreact.js @@ -14,7 +14,7 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function l(z,Y){var N=z.length;z.push(Y);t:for(;0>>1,vt=z[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(z[nt]=Wn,z[_e]=N,nt=_e):(z[nt]=Vc,z[$n]=N,nt=$n);else if(_ea(Wn,N))z[nt]=Wn,z[_e]=N,nt=_e;else break t}}return Y}function a(z,Y){var N=z.sortIndex-Y.sortIndex;return N!==0?N:z.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,p=!1,R=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(z){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=z)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function T(z){if(p=!1,S(z),!b)if(e(c)!==null)b=!0,A||(A=!0,ee());else{var Y=e(d);Y!==null&&qc(T,Y.startTime-z)}}var A=!1,E=-1,O=5,M=-1;function H(){return R?!0:!(t.unstable_now()-Mz&&H());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=z);if(z=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(z),Y=!0;break l}m===e(c)&&u(c),S(z)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(T,wn.startTime-z),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():A=!1}}}var ee;if(typeof h=="function")ee=function(){h(At)};else if(typeof MessageChannel<"u"){var Z0=new MessageChannel,dm=Z0.port2;Z0.port1.onmessage=At,ee=function(){dm.postMessage(null)}}else ee=function(){o(At,0)};function qc(z,Y){E=o(function(){z(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125nt?(z.sortIndex=N,l(d,z),e(c)===null&&z===e(d)&&(p?(s(E),E=-1):p=!0,qc(T,N-nt))):(z.sortIndex=vt,l(c,z),b||v||(b=!0,A||(A=!0,ee()))),z},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(z){var Y=y;return function(){var N=y;y=Y;try{return z.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var ih=Ic.exports,ts={exports:{}},zt={};/** + */(function(t){function l(z,Y){var N=z.length;z.push(Y);t:for(;0>>1,vt=z[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(z[nt]=Wn,z[_e]=N,nt=_e):(z[nt]=Vc,z[$n]=N,nt=$n);else if(_ea(Wn,N))z[nt]=Wn,z[_e]=N,nt=_e;else break t}}return Y}function a(z,Y){var N=z.sortIndex-Y.sortIndex;return N!==0?N:z.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,p=!1,H=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(z){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=z)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function T(z){if(p=!1,S(z),!b)if(e(c)!==null)b=!0,A||(A=!0,ee());else{var Y=e(d);Y!==null&&qc(T,Y.startTime-z)}}var A=!1,E=-1,O=5,M=-1;function R(){return H?!0:!(t.unstable_now()-Mz&&R());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=z);if(z=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(z),Y=!0;break l}m===e(c)&&u(c),S(z)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(T,wn.startTime-z),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():A=!1}}}var ee;if(typeof h=="function")ee=function(){h(At)};else if(typeof MessageChannel<"u"){var Z0=new MessageChannel,dm=Z0.port2;Z0.port1.onmessage=At,ee=function(){dm.postMessage(null)}}else ee=function(){o(At,0)};function qc(z,Y){E=o(function(){z(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125nt?(z.sortIndex=N,l(d,z),e(c)===null&&z===e(d)&&(p?(s(E),E=-1):p=!0,qc(T,N-nt))):(z.sortIndex=vt,l(c,z),b||v||(b=!0,A||(A=!0,ee()))),z},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(z){var Y=y;return function(){var N=y;y=Y;try{return z.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var ih=Ic.exports,ts={exports:{}},zt={};/** * @license React * react-dom.production.js * @@ -37,8 +37,8 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 `);for(a=u=0;ua||c[u]!==d[a]){var r=` `+c[u].replace(" at new "," at ");return t.displayName&&r.includes("")&&(r=r.replace("",t.displayName)),r}while(1<=u&&0<=a);break}}}finally{hi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function mh(t,l){switch(t.tag){case 26:case 27:case 5:return ie(t.type);case 16:return ie("Lazy");case 13:return t.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return ri(t.type,!1);case 11:return ri(t.type.render,!1);case 1:return ri(t.type,!0);case 31:return ie("Activity");default:return""}}function hs(t){try{var l="",e=null;do l+=mh(t,e),e=t,t=t.return;while(t);return l}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,Sh=ot.unstable_shouldYield,gh=ot.unstable_requestPaint,Nt=ot.unstable_now,bh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,Eh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,zh=ot.log,Th=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Rl(t){if(typeof zh=="function"&&Th(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:Oh,ph=Math.log,Ah=Math.LN2;function Oh(t){return t>>>=0,t===0?32:31-(ph(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function Mu(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function _h(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Du(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Mh(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ch=/[\n"\\]/g;function Lt(t){return t.replace(Ch,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ai(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+xt(l)):t.value!==""+xt(l)&&(t.value=""+xt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,xt(l)):e!=null?Oi(t,i,xt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+xt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){pi(t);return}e=e!=null?""+xt(e):"",l=l!=null?""+xt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),pi(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Yu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return fr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function sr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function or(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function Gi(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var gr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Gi(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&ju(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Bt(l)+a|e<O?(M=E,E=null):M=E.sibling;var H=y(o,E,h[O],S);if(H===null){E===null&&(E=M);break}t&&E&&H.alternate===null&&l(o,E),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H,E=M}if(O===h.length)return e(o,E),j&&hl(o,O),T;if(E===null){for(;OO?(M=E,E=null):M=E.sibling;var At=y(o,E,H.value,S);if(At===null){E===null&&(E=M);break}t&&E&&At.alternate===null&&l(o,E),s=n(At,s,O),A===null?T=At:A.sibling=At,A=At,E=M}if(H.done)return e(o,E),j&&hl(o,O),T;if(E===null){for(;!H.done;O++,H=h.next())H=m(o,H.value,S),H!==null&&(s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return j&&hl(o,O),T}for(E=u(E);!H.done;O++,H=h.next())H=v(E,o,O,H.value,S),H!==null&&(t&&H.alternate!==null&&E.delete(H.key===null?O:H.key),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return t&&E.forEach(function(ee){return l(o,ee)}),j&&hl(o,O),T}function R(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var T=h.key;s!==null;){if(s.key===T){if(T=h.type,T===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ul&&ge(T)===s.type){e(o,s.sibling),S=a(s,h.props),Ku(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Ku(S,h),S.return=o,o=S)}return i(o);case Tu:t:{for(T=h.key;s!==null;){if(s.key===T)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),R(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(pu(h)){if(T=pu(h),typeof T!="function")throw Error(g(150));return h=T.call(h),p(o,s,h,S)}if(typeof h.then=="function")return R(o,s,Ia(h),S);if(h.$$typeof===cl)return R(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{Lu=0;var T=R(o,s,h,S);return Pe=null,T}catch(E){if(E===Ie||E===Fa)throw E;var A=qt(29,E,null,o.mode);return A.lanes=S,A.return=o,A}finally{}}}var Ee=Do(!0),Uo=Do(!1),jl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ju(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function wu(){if(of){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){of=!1;var a=t.updateQueue;jl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,p=f;y=l;var R=e;switch(p.tag){case 1:if(b=p.payload,typeof b=="function"){m=b.call(R,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,y=typeof b=="function"?b.call(R,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:jl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Uf(t,!1,l,e);try{var c=a(),d=_.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=Mr(c,u);ku(t,l,r,Qt(t))}else ku(t,l,u,Qt(t))}catch(m){ku(t,l,{then:function(){},status:"rejected",reason:m},Qt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Cr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Cr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Qt())}function Df(){return gt(ra)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Br(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Qt();t=Gl(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Yr(t,l,e){var u=Qt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Rt(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Qt();ku(t,l,e,u)}function ku(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Yt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Rt(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Rt(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var Iu={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Iu.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return pt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=pt();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=pt();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Yr.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=pt();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=pt();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=pt();if(j){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(Go.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},jo.bind(null,u,n,e,l),null),e},useId:function(){var t=pt(),l=K.identifierPrefix;if(j){var e=nl,u=al;e=(u&~(1<<32-Bt(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[Ot]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(jt(l),l):(jt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(jt(l),l):(jt(l),null)}return jt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)ta(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,ta(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),j&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Nt()>En&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),ta(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!j)return k(l),null}else 2*Nt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Nt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),j&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return jt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function Xr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(jt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(jt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return jt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&jt(l);break;case 13:jt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:jt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function la(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function ea(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;cv(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[Ot]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Qr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),Gi(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fR&&(i=R,R=p,p=i);var o=lo(f,p),s=lo(f,R);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),p>R?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,_.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,zy(t,l)}}function py(t,l,e){l=Jt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)py(t,t,e);else for(;l!==null;){if(l.tag===3){py(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Jt(e,t),e=Ad(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Du(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Lr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=Wr.bind(null,t,l,e),l.then(t,t))}function Wr(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Nt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function Ay(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Du(t,l),fl(t))}function Fr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Ay(t,e)}function kr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),Ay(t,e)}function Ir(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,tv())}function ca(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Bt(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Pr(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&ov()&&(t=Wl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||ca(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=Lt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function bv(t){_l.D(t),$y("dns-prefetch",t,null)}function Ev(t,l){_l.C(t,l),$y("preconnect",t,l)}function zv(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+Lt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+Lt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+Lt(e.imageSizes)+'"]')):a+='[href="'+Lt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}It.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),It.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(ya(n))||l==="script"&&u.querySelector(ha(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function Tv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+Lt(u)+'"][href="'+Lt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!It.has(n)&&(t=W({rel:"modulepreload",href:t},l),It.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ha(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function pv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(ya(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=It.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Ov(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(ya(t)))&&!n._p&&(i.instance=n,i.state.loading=5),It.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},It.set(t,e),n||_v(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+Lt(t)+'"'}function ya(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function _v(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+Lt(t)+'"]'}function ha(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+Lt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(ya(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=It.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ha(n)))?(l.instance=a,ht(a),a):(u=e,(a=It.get(n))&&(u=W({},e),pc(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function Mv(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Dv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(ya(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=It.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Ac=0;function Uv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Ac?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Hv,t),Yn=null,Bn.call(t))}function Hv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const jv=ue({__proto__:null,default:jc(v0)},[v0]);var m0={exports:{}},Ln={};/** +`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,Sh=ot.unstable_shouldYield,gh=ot.unstable_requestPaint,Nt=ot.unstable_now,bh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,Eh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,zh=ot.log,Th=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Rl(t){if(typeof zh=="function"&&Th(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:Oh,ph=Math.log,Ah=Math.LN2;function Oh(t){return t>>>=0,t===0?32:31-(ph(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function Mu(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function _h(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Du(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Mh(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ch=/[\n"\\]/g;function Lt(t){return t.replace(Ch,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ai(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+xt(l)):t.value!==""+xt(l)&&(t.value=""+xt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,xt(l)):e!=null?Oi(t,i,xt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+xt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){pi(t);return}e=e!=null?""+xt(e):"",l=l!=null?""+xt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),pi(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Yu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return fr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function sr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function or(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function Gi(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var gr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Gi(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&ju(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Bt(l)+a|e<O?(M=E,E=null):M=E.sibling;var R=y(o,E,h[O],S);if(R===null){E===null&&(E=M);break}t&&E&&R.alternate===null&&l(o,E),s=n(R,s,O),A===null?T=R:A.sibling=R,A=R,E=M}if(O===h.length)return e(o,E),j&&hl(o,O),T;if(E===null){for(;OO?(M=E,E=null):M=E.sibling;var At=y(o,E,R.value,S);if(At===null){E===null&&(E=M);break}t&&E&&At.alternate===null&&l(o,E),s=n(At,s,O),A===null?T=At:A.sibling=At,A=At,E=M}if(R.done)return e(o,E),j&&hl(o,O),T;if(E===null){for(;!R.done;O++,R=h.next())R=m(o,R.value,S),R!==null&&(s=n(R,s,O),A===null?T=R:A.sibling=R,A=R);return j&&hl(o,O),T}for(E=u(E);!R.done;O++,R=h.next())R=v(E,o,O,R.value,S),R!==null&&(t&&R.alternate!==null&&E.delete(R.key===null?O:R.key),s=n(R,s,O),A===null?T=R:A.sibling=R,A=R);return t&&E.forEach(function(ee){return l(o,ee)}),j&&hl(o,O),T}function H(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var T=h.key;s!==null;){if(s.key===T){if(T=h.type,T===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ul&&ge(T)===s.type){e(o,s.sibling),S=a(s,h.props),Ku(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Ku(S,h),S.return=o,o=S)}return i(o);case Tu:t:{for(T=h.key;s!==null;){if(s.key===T)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),H(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(pu(h)){if(T=pu(h),typeof T!="function")throw Error(g(150));return h=T.call(h),p(o,s,h,S)}if(typeof h.then=="function")return H(o,s,Ia(h),S);if(h.$$typeof===cl)return H(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{Lu=0;var T=H(o,s,h,S);return Pe=null,T}catch(E){if(E===Ie||E===Fa)throw E;var A=qt(29,E,null,o.mode);return A.lanes=S,A.return=o,A}finally{}}}var Ee=Do(!0),Uo=Do(!1),jl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ju(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function wu(){if(of){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){of=!1;var a=t.updateQueue;jl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,p=f;y=l;var H=e;switch(p.tag){case 1:if(b=p.payload,typeof b=="function"){m=b.call(H,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,y=typeof b=="function"?b.call(H,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:jl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Uf(t,!1,l,e);try{var c=a(),d=_.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=Mr(c,u);ku(t,l,r,Qt(t))}else ku(t,l,u,Qt(t))}catch(m){ku(t,l,{then:function(){},status:"rejected",reason:m},Qt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Cr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Cr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Qt())}function Df(){return gt(ra)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Br(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Qt();t=Gl(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Yr(t,l,e){var u=Qt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Rt(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Qt();ku(t,l,e,u)}function ku(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Yt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Rt(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Rt(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var Iu={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Iu.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return pt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=pt();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=pt();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Yr.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=pt();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=pt();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=pt();if(j){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(Go.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},jo.bind(null,u,n,e,l),null),e},useId:function(){var t=pt(),l=K.identifierPrefix;if(j){var e=nl,u=al;e=(u&~(1<<32-Bt(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[Ot]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(jt(l),l):(jt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(jt(l),l):(jt(l),null)}return jt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)ta(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,ta(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),j&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Nt()>En&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),ta(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!j)return k(l),null}else 2*Nt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Nt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),j&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return jt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function Xr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(jt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(jt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return jt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&jt(l);break;case 13:jt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:jt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function la(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function ea(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;cv(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[Ot]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Qr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),Gi(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fH&&(i=H,H=p,p=i);var o=lo(f,p),s=lo(f,H);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),p>H?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,_.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,zy(t,l)}}function py(t,l,e){l=Jt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)py(t,t,e);else for(;l!==null;){if(l.tag===3){py(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Jt(e,t),e=Ad(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Du(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Lr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=Wr.bind(null,t,l,e),l.then(t,t))}function Wr(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Nt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function Ay(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Du(t,l),fl(t))}function Fr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Ay(t,e)}function kr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),Ay(t,e)}function Ir(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,tv())}function ca(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Bt(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Pr(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&ov()&&(t=Wl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||ca(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=Lt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function bv(t){_l.D(t),$y("dns-prefetch",t,null)}function Ev(t,l){_l.C(t,l),$y("preconnect",t,l)}function zv(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+Lt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+Lt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+Lt(e.imageSizes)+'"]')):a+='[href="'+Lt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}It.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),It.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(ya(n))||l==="script"&&u.querySelector(ha(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function Tv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+Lt(u)+'"][href="'+Lt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!It.has(n)&&(t=W({rel:"modulepreload",href:t},l),It.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ha(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function pv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(ya(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=It.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Ov(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(ya(t)))&&!n._p&&(i.instance=n,i.state.loading=5),It.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},It.set(t,e),n||_v(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+Lt(t)+'"'}function ya(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function _v(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+Lt(t)+'"]'}function ha(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+Lt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(ya(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=It.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ha(n)))?(l.instance=a,ht(a),a):(u=e,(a=It.get(n))&&(u=W({},e),pc(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function Mv(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Dv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(ya(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=It.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Ac=0;function Uv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Ac?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Hv,t),Yn=null,Bn.call(t))}function Hv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const jv=ue({__proto__:null,default:jc(v0)},[v0]);var m0={exports:{}},Ln={};/** * @license React * react-jsx-runtime.production.js * @@ -46,4 +46,4 @@ Error generating stack: `+u.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gv=Symbol.for("react.transitional.element"),Xv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Xv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var mu=m0.exports;const g0=V.createContext(null);function Qv({namespace:t,children:l}){return mu.jsx(g0.Provider,{value:t,children:l})}function Zv(){return V.useContext(g0)}function xv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Zv();return xv(t,l!==void 0?l:e)}const Su=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Lv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Kv(t){const l=Su.get(t);l&&T0(t,l.promise)}function Jv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{Lv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Kv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),p0="1.0";function wv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function $v(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function Wv(t){const l=e=>e.split(".")[0];l(t)!==l(p0)&&$v(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${p0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Fv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=wv();if(a!=null&&a.protocolVersion?Wv(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let A0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function kv(){if(A0||typeof document>"u")return;A0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return kv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class Iv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new Iv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Pv(){et()&&Y0()}class tm{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class lm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new tm(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function em(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===gu){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class um{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new um,outputs:new lm}),q0}function am(){Zt()}function Zt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Zt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const p=V.useCallback(R=>{if(!b)return;const s=Zt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(R)},[i,b]);return[y,p]}const bu=()=>{};function j0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function G0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function X0(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=le();return V.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Zt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let Q0=!1;function Oe(){Q0||(am(),Fv(Zt().inputs),em(()=>Zt().outputs),Pv(),Q0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,gu,c),[m,y]=Jn(`.clientdata_output_${f}_height`,gu,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=j0(f,void 0,c),p=G0(f,c),R=X0(f,c),o=V.useRef(null),s=V.useRef(null),[h,S]=V.useState(0);V.useEffect(()=>{b&&S(A=>A+1)},[b]),V.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=V.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(V.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Bc(()=>{A&&A.complete&&T()},a),O=new ResizeObserver(M=>{for(const H of M)H.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",T),O.disconnect(),E.cancel()}},[o,h,r,y,a,T]),V.useEffect(()=>{if(b)return;const A=s.current;if(!A)return;const E=()=>{const H=A.clientWidth,At=A.clientHeight;H>0&&At>0&&(r(H),y(At))};E();const O=Bc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,r,y,a]),v)return null;if(R){const A=["shiny-output-error",...[].concat(R.type??[]).map(E=>`shiny-output-error-${E}`),l];return mu.jsx("div",{className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:R.message})}return b?mu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:T}):mu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:mu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:mu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:X0,useShinyOutputStatus:G0,useShinyOutputValue:j0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:gu,ShinyModuleProvider:Qv,ShinyOutput:Jv,React:Fc,ReactDOM:jv}}om(),x0()})(); + */var Gv=Symbol.for("react.transitional.element"),Xv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Xv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var mu=m0.exports;const g0=V.createContext(null);function Qv({namespace:t,children:l}){return mu.jsx(g0.Provider,{value:t,children:l})}function Zv(){return V.useContext(g0)}function xv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Zv();return xv(t,l!==void 0?l:e)}const Su=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Lv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Kv(t){const l=Su.get(t);l&&T0(t,l.promise)}function Jv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{Lv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Kv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),p0="1.0";function wv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function $v(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function Wv(t){const l=e=>e.split(".")[0];l(t)!==l(p0)&&$v(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${p0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Fv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=wv();if(a!=null&&a.protocolVersion?Wv(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let A0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function kv(){if(A0||typeof document>"u")return;A0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return kv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class Iv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new Iv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Pv(){et()&&Y0()}class tm{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class lm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new tm(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function em(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===gu){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class um{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new um,outputs:new lm}),q0}function am(){Zt()}function Zt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Zt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const p=V.useCallback(H=>{if(!b)return;const s=Zt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(H)},[i,b]);return[y,p]}const bu=()=>{};function j0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function G0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function X0(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=le();return V.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Zt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let Q0=!1;function Oe(){Q0||(am(),Fv(Zt().inputs),em(()=>Zt().outputs),Pv(),Q0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,gu,c),[m,y]=Jn(`.clientdata_output_${f}_height`,gu,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=j0(f,void 0,c),p=G0(f,c),H=X0(f,c),o=V.useRef(null),s=V.useRef(null),[h,S]=V.useState(0);V.useEffect(()=>{b&&S(A=>A+1)},[b]),V.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=V.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(V.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Bc(()=>{A&&A.complete&&T()},a),O=new ResizeObserver(M=>{for(const R of M)R.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",T),O.disconnect(),E.cancel()}},[o,h,r,y,a,T]),V.useEffect(()=>{if(b&&!H)return;const A=s.current;if(!A)return;const E=()=>{const R=A.clientWidth,At=A.clientHeight;R>0&&At>0&&(r(R),y(At))};E();const O=Bc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,H,r,y,a]),v)return null;if(H){const A=["shiny-output-error",...[].concat(H.type??[]).map(E=>`shiny-output-error-${E}`),l];return mu.jsx("div",{ref:s,className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:H.message})}return b?mu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:T}):mu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:mu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:mu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:X0,useShinyOutputStatus:G0,useShinyOutputValue:j0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:gu,ShinyModuleProvider:Qv,ShinyOutput:Jv,React:Fc,ReactDOM:jv}}om(),x0()})(); diff --git a/pkg-r/inst/lib/shiny/shinyreact.js b/pkg-r/inst/lib/shiny/shinyreact.js index d0d1751b..13ae75ad 100644 --- a/pkg-r/inst/lib/shiny/shinyreact.js +++ b/pkg-r/inst/lib/shiny/shinyreact.js @@ -14,7 +14,7 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function l(z,Y){var N=z.length;z.push(Y);t:for(;0>>1,vt=z[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(z[nt]=Wn,z[_e]=N,nt=_e):(z[nt]=Vc,z[$n]=N,nt=$n);else if(_ea(Wn,N))z[nt]=Wn,z[_e]=N,nt=_e;else break t}}return Y}function a(z,Y){var N=z.sortIndex-Y.sortIndex;return N!==0?N:z.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,p=!1,R=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(z){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=z)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function T(z){if(p=!1,S(z),!b)if(e(c)!==null)b=!0,A||(A=!0,ee());else{var Y=e(d);Y!==null&&qc(T,Y.startTime-z)}}var A=!1,E=-1,O=5,M=-1;function H(){return R?!0:!(t.unstable_now()-Mz&&H());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=z);if(z=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(z),Y=!0;break l}m===e(c)&&u(c),S(z)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(T,wn.startTime-z),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():A=!1}}}var ee;if(typeof h=="function")ee=function(){h(At)};else if(typeof MessageChannel<"u"){var Z0=new MessageChannel,dm=Z0.port2;Z0.port1.onmessage=At,ee=function(){dm.postMessage(null)}}else ee=function(){o(At,0)};function qc(z,Y){E=o(function(){z(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125nt?(z.sortIndex=N,l(d,z),e(c)===null&&z===e(d)&&(p?(s(E),E=-1):p=!0,qc(T,N-nt))):(z.sortIndex=vt,l(c,z),b||v||(b=!0,A||(A=!0,ee()))),z},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(z){var Y=y;return function(){var N=y;y=Y;try{return z.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var ih=Ic.exports,ts={exports:{}},zt={};/** + */(function(t){function l(z,Y){var N=z.length;z.push(Y);t:for(;0>>1,vt=z[nt];if(0>>1;nta(Vc,N))_ea(Wn,Vc)?(z[nt]=Wn,z[_e]=N,nt=_e):(z[nt]=Vc,z[$n]=N,nt=$n);else if(_ea(Wn,N))z[nt]=Wn,z[_e]=N,nt=_e;else break t}}return Y}function a(z,Y){var N=z.sortIndex-Y.sortIndex;return N!==0?N:z.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,f=i.now();t.unstable_now=function(){return i.now()-f}}var c=[],d=[],r=1,m=null,y=3,v=!1,b=!1,p=!1,H=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(z){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=z)u(d),Y.sortIndex=Y.expirationTime,l(c,Y);else break;Y=e(d)}}function T(z){if(p=!1,S(z),!b)if(e(c)!==null)b=!0,A||(A=!0,ee());else{var Y=e(d);Y!==null&&qc(T,Y.startTime-z)}}var A=!1,E=-1,O=5,M=-1;function R(){return H?!0:!(t.unstable_now()-Mz&&R());){var nt=m.callback;if(typeof nt=="function"){m.callback=null,y=m.priorityLevel;var vt=nt(m.expirationTime<=z);if(z=t.unstable_now(),typeof vt=="function"){m.callback=vt,S(z),Y=!0;break l}m===e(c)&&u(c),S(z)}else u(c);m=e(c)}if(m!==null)Y=!0;else{var wn=e(d);wn!==null&&qc(T,wn.startTime-z),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ee():A=!1}}}var ee;if(typeof h=="function")ee=function(){h(At)};else if(typeof MessageChannel<"u"){var Z0=new MessageChannel,dm=Z0.port2;Z0.port1.onmessage=At,ee=function(){dm.postMessage(null)}}else ee=function(){o(At,0)};function qc(z,Y){E=o(function(){z(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125nt?(z.sortIndex=N,l(d,z),e(c)===null&&z===e(d)&&(p?(s(E),E=-1):p=!0,qc(T,N-nt))):(z.sortIndex=vt,l(c,z),b||v||(b=!0,A||(A=!0,ee()))),z},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(z){var Y=y;return function(){var N=y;y=Y;try{return z.apply(this,arguments)}finally{y=N}}}})(Pc),Ic.exports=Pc;var ih=Ic.exports,ts={exports:{}},zt={};/** * @license React * react-dom.production.js * @@ -37,8 +37,8 @@ var ym=Object.defineProperty;var hm=(ue,et,ae)=>et in ue?ym(ue,et,{enumerable:!0 `);for(a=u=0;ua||c[u]!==d[a]){var r=` `+c[u].replace(" at new "," at ");return t.displayName&&r.includes("")&&(r=r.replace("",t.displayName)),r}while(1<=u&&0<=a);break}}}finally{hi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function mh(t,l){switch(t.tag){case 26:case 27:case 5:return ie(t.type);case 16:return ie("Lazy");case 13:return t.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return ri(t.type,!1);case 11:return ri(t.type.render,!1);case 1:return ri(t.type,!0);case 31:return ie("Activity");default:return""}}function hs(t){try{var l="",e=null;do l+=mh(t,e),e=t,t=t.return;while(t);return l}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,Sh=ot.unstable_shouldYield,gh=ot.unstable_requestPaint,Nt=ot.unstable_now,bh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,Eh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,zh=ot.log,Th=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Rl(t){if(typeof zh=="function"&&Th(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:Oh,ph=Math.log,Ah=Math.LN2;function Oh(t){return t>>>=0,t===0?32:31-(ph(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function Mu(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function _h(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Du(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Mh(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ch=/[\n"\\]/g;function Lt(t){return t.replace(Ch,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ai(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+xt(l)):t.value!==""+xt(l)&&(t.value=""+xt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,xt(l)):e!=null?Oi(t,i,xt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+xt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){pi(t);return}e=e!=null?""+xt(e):"",l=l!=null?""+xt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),pi(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Yu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return fr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function sr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function or(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function Gi(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var gr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Gi(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&ju(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Bt(l)+a|e<O?(M=E,E=null):M=E.sibling;var H=y(o,E,h[O],S);if(H===null){E===null&&(E=M);break}t&&E&&H.alternate===null&&l(o,E),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H,E=M}if(O===h.length)return e(o,E),j&&hl(o,O),T;if(E===null){for(;OO?(M=E,E=null):M=E.sibling;var At=y(o,E,H.value,S);if(At===null){E===null&&(E=M);break}t&&E&&At.alternate===null&&l(o,E),s=n(At,s,O),A===null?T=At:A.sibling=At,A=At,E=M}if(H.done)return e(o,E),j&&hl(o,O),T;if(E===null){for(;!H.done;O++,H=h.next())H=m(o,H.value,S),H!==null&&(s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return j&&hl(o,O),T}for(E=u(E);!H.done;O++,H=h.next())H=v(E,o,O,H.value,S),H!==null&&(t&&H.alternate!==null&&E.delete(H.key===null?O:H.key),s=n(H,s,O),A===null?T=H:A.sibling=H,A=H);return t&&E.forEach(function(ee){return l(o,ee)}),j&&hl(o,O),T}function R(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var T=h.key;s!==null;){if(s.key===T){if(T=h.type,T===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ul&&ge(T)===s.type){e(o,s.sibling),S=a(s,h.props),Ku(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Ku(S,h),S.return=o,o=S)}return i(o);case Tu:t:{for(T=h.key;s!==null;){if(s.key===T)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),R(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(pu(h)){if(T=pu(h),typeof T!="function")throw Error(g(150));return h=T.call(h),p(o,s,h,S)}if(typeof h.then=="function")return R(o,s,Ia(h),S);if(h.$$typeof===cl)return R(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{Lu=0;var T=R(o,s,h,S);return Pe=null,T}catch(E){if(E===Ie||E===Fa)throw E;var A=qt(29,E,null,o.mode);return A.lanes=S,A.return=o,A}finally{}}}var Ee=Do(!0),Uo=Do(!1),jl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ju(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function wu(){if(of){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){of=!1;var a=t.updateQueue;jl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,p=f;y=l;var R=e;switch(p.tag){case 1:if(b=p.payload,typeof b=="function"){m=b.call(R,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,y=typeof b=="function"?b.call(R,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:jl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Uf(t,!1,l,e);try{var c=a(),d=_.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=Mr(c,u);ku(t,l,r,Qt(t))}else ku(t,l,u,Qt(t))}catch(m){ku(t,l,{then:function(){},status:"rejected",reason:m},Qt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Cr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Cr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Qt())}function Df(){return gt(ra)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Br(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Qt();t=Gl(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Yr(t,l,e){var u=Qt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Rt(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Qt();ku(t,l,e,u)}function ku(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Yt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Rt(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Rt(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var Iu={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Iu.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return pt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=pt();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=pt();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Yr.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=pt();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=pt();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=pt();if(j){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(Go.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},jo.bind(null,u,n,e,l),null),e},useId:function(){var t=pt(),l=K.identifierPrefix;if(j){var e=nl,u=al;e=(u&~(1<<32-Bt(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[Ot]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(jt(l),l):(jt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(jt(l),l):(jt(l),null)}return jt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)ta(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,ta(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),j&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Nt()>En&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),ta(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!j)return k(l),null}else 2*Nt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Nt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),j&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return jt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function Xr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(jt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(jt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return jt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&jt(l);break;case 13:jt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:jt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function la(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function ea(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;cv(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[Ot]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Qr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),Gi(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fR&&(i=R,R=p,p=i);var o=lo(f,p),s=lo(f,R);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),p>R?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,_.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,zy(t,l)}}function py(t,l,e){l=Jt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)py(t,t,e);else for(;l!==null;){if(l.tag===3){py(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Jt(e,t),e=Ad(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Du(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Lr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=Wr.bind(null,t,l,e),l.then(t,t))}function Wr(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Nt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function Ay(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Du(t,l),fl(t))}function Fr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Ay(t,e)}function kr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),Ay(t,e)}function Ir(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,tv())}function ca(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Bt(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Pr(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&ov()&&(t=Wl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||ca(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=Lt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function bv(t){_l.D(t),$y("dns-prefetch",t,null)}function Ev(t,l){_l.C(t,l),$y("preconnect",t,l)}function zv(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+Lt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+Lt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+Lt(e.imageSizes)+'"]')):a+='[href="'+Lt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}It.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),It.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(ya(n))||l==="script"&&u.querySelector(ha(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function Tv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+Lt(u)+'"][href="'+Lt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!It.has(n)&&(t=W({rel:"modulepreload",href:t},l),It.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ha(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function pv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(ya(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=It.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Ov(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(ya(t)))&&!n._p&&(i.instance=n,i.state.loading=5),It.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},It.set(t,e),n||_v(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+Lt(t)+'"'}function ya(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function _v(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+Lt(t)+'"]'}function ha(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+Lt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(ya(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=It.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ha(n)))?(l.instance=a,ht(a),a):(u=e,(a=It.get(n))&&(u=W({},e),pc(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function Mv(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Dv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(ya(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=It.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Ac=0;function Uv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Ac?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Hv,t),Yn=null,Bn.call(t))}function Hv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const jv=ue({__proto__:null,default:jc(v0)},[v0]);var m0={exports:{}},Ln={};/** +`+u.stack}}var vi=Object.prototype.hasOwnProperty,mi=ot.unstable_scheduleCallback,Si=ot.unstable_cancelCallback,Sh=ot.unstable_shouldYield,gh=ot.unstable_requestPaint,Nt=ot.unstable_now,bh=ot.unstable_getCurrentPriorityLevel,rs=ot.unstable_ImmediatePriority,vs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,Eh=ot.unstable_LowPriority,ms=ot.unstable_IdlePriority,zh=ot.log,Th=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Rl(t){if(typeof zh=="function"&&Th(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:Oh,ph=Math.log,Ah=Math.LN2;function Oh(t){return t>>>=0,t===0?32:31-(ph(t)/Ah|0)|0}var Ma=256,Da=262144,Ua=4194304;function fe(t){var l=t&42;if(l!==0)return l;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ha(t,l,e){var u=t.pendingLanes;if(u===0)return 0;var a=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=u&134217727;return f!==0?(u=f&~n,u!==0?a=fe(u):(i&=f,i!==0?a=fe(i):e||(e=f&~t,e!==0&&(a=fe(e))))):(f=u&~n,f!==0?a=fe(f):i!==0?a=fe(i):e||(e=u&~t,e!==0&&(a=fe(e)))),a===0?0:l!==0&&l!==a&&!(l&n)&&(n=a&-a,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:a}function Mu(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function _h(t,l){switch(t){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ss(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function gi(t){for(var l=[],e=0;31>e;e++)l.push(t);return l}function Du(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Mh(t,l,e,u,a,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var f=t.entanglements,c=t.expirationTimes,d=t.hiddenUpdates;for(e=i&~e;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ch=/[\n"\\]/g;function Lt(t){return t.replace(Ch,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ai(t,l,e,u,a,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),l!=null?i==="number"?(l===0&&t.value===""||t.value!=l)&&(t.value=""+xt(l)):t.value!==""+xt(l)&&(t.value=""+xt(l)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),l!=null?Oi(t,i,xt(l)):e!=null?Oi(t,i,xt(e)):u!=null&&t.removeAttribute("value"),a==null&&n!=null&&(t.defaultChecked=!!n),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+xt(f):t.removeAttribute("name")}function Hs(t,l,e,u,a,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),l!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||l!=null)){pi(t);return}e=e!=null?""+xt(e):"",l=l!=null?""+xt(l):e,f||l===t.value||(t.value=l),t.defaultValue=l}u=u??a,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=f?t.checked:!!u,t.defaultChecked=!!u,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),pi(t)}function Oi(t,l,e){l==="number"&&Ca(t.ownerDocument)===t||t.defaultValue===""+e||(t.defaultValue=""+e)}function Ve(t,l,e,u){if(t=t.options,l){l={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(dl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Hi=!1}var Cl=null,Ri=null,Ya=null;function Vs(){if(Ya)return Ya;var t,l=Ri,e=l.length,u,a="value"in Cl?Cl.value:Cl.textContent,n=a.length;for(t=0;t=Yu),xs=" ",Ls=!1;function Ks(t,l){switch(t){case"keyup":return fr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qe=!1;function sr(t,l){switch(t){case"compositionend":return Js(l);case"keypress":return l.which!==32?null:(Ls=!0,xs);case"textInput":return t=l.data,t===xs&&Ls?null:t;default:return null}}function or(t,l){if(Qe)return t==="compositionend"||!qi&&Ks(t,l)?(t=Vs(),Ya=Ri=Cl=null,Qe=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:e,offset:l-t};t=u}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=to(e)}}function eo(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?eo(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function uo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Ca(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Ca(t.document)}return l}function Gi(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var gr=dl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Qi=!1;function ao(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Qi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Gi(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Gu&&ju(Gu,u)||(Gu=u,u=Un(Xi,"onSelect"),0>=i,a-=i,al=1<<32-Bt(l)+a|e<O?(M=E,E=null):M=E.sibling;var R=y(o,E,h[O],S);if(R===null){E===null&&(E=M);break}t&&E&&R.alternate===null&&l(o,E),s=n(R,s,O),A===null?T=R:A.sibling=R,A=R,E=M}if(O===h.length)return e(o,E),j&&hl(o,O),T;if(E===null){for(;OO?(M=E,E=null):M=E.sibling;var At=y(o,E,R.value,S);if(At===null){E===null&&(E=M);break}t&&E&&At.alternate===null&&l(o,E),s=n(At,s,O),A===null?T=At:A.sibling=At,A=At,E=M}if(R.done)return e(o,E),j&&hl(o,O),T;if(E===null){for(;!R.done;O++,R=h.next())R=m(o,R.value,S),R!==null&&(s=n(R,s,O),A===null?T=R:A.sibling=R,A=R);return j&&hl(o,O),T}for(E=u(E);!R.done;O++,R=h.next())R=v(E,o,O,R.value,S),R!==null&&(t&&R.alternate!==null&&E.delete(R.key===null?O:R.key),s=n(R,s,O),A===null?T=R:A.sibling=R,A=R);return t&&E.forEach(function(ee){return l(o,ee)}),j&&hl(o,O),T}function H(o,s,h,S){if(typeof h=="object"&&h!==null&&h.type===Ue&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ta:t:{for(var T=h.key;s!==null;){if(s.key===T){if(T=h.type,T===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,h.props.children),S.return=o,o=S;break t}}else if(s.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ul&&ge(T)===s.type){e(o,s.sibling),S=a(s,h.props),Ku(S,h),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}h.type===Ue?(S=he(h.props.children,o.mode,S,h.key),S.return=o,o=S):(S=Ka(h.type,h.key,h.props,null,o.mode,S),Ku(S,h),S.return=o,o=S)}return i(o);case Tu:t:{for(T=h.key;s!==null;){if(s.key===T)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){e(o,s.sibling),S=a(s,h.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=$i(h,o.mode,S),S.return=o,o=S}return i(o);case Ul:return h=ge(h),H(o,s,h,S)}if(Au(h))return b(o,s,h,S);if(pu(h)){if(T=pu(h),typeof T!="function")throw Error(g(150));return h=T.call(h),p(o,s,h,S)}if(typeof h.then=="function")return H(o,s,Ia(h),S);if(h.$$typeof===cl)return H(o,s,$a(o,h),S);Pa(o,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,h),S.return=o,o=S):(e(o,s),S=wi(h,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,h,S){try{Lu=0;var T=H(o,s,h,S);return Pe=null,T}catch(E){if(E===Ie||E===Fa)throw E;var A=qt(29,E,null,o.mode);return A.lanes=S,A.return=o,A}finally{}}}var Ee=Do(!0),Uo=Do(!1),jl=!1;function ff(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xl(t,l,e){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,X&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),yo(t,null,e),l}return xa(t,u,l,e),La(t)}function Ju(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}function sf(t,l){var e=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,e===u)){var a=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?a=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?a=n=l:n=n.next=l}else a=n=l;e={baseState:u.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var of=!1;function wu(){if(of){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){of=!1;var a=t.updateQueue;jl=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var c=f,d=c.next;c.next=null,i===null?n=d:i.next=d,i=c;var r=t.alternate;r!==null&&(r=r.updateQueue,f=r.lastBaseUpdate,f!==i&&(f===null?r.firstBaseUpdate=d:f.next=d,r.lastBaseUpdate=c))}if(n!==null){var m=a.baseState;i=0,r=d=c=null,f=n;do{var y=f.lane&-536870913,v=y!==f.lane;if(v?(q&y)===y:(u&y)===y){y!==0&&y===Fe&&(of=!0),r!==null&&(r=r.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,p=f;y=l;var H=e;switch(p.tag){case 1:if(b=p.payload,typeof b=="function"){m=b.call(H,m,y);break t}m=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=p.payload,y=typeof b=="function"?b.call(H,m,y):b,y==null)break t;m=W({},m,y);break t;case 2:jl=!0}}y=f.callback,y!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[y]:v.push(y))}else v={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},r===null?(d=r=v,c=m):r=r.next=v,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;v=f,f=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}}while(!0);r===null&&(c=m),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=r,n===null&&(a.shared.lanes=0),Kl|=i,t.lanes=i,t.memoizedState=m}}function Ho(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Ro(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Uf(t,!1,l,e);try{var c=a(),d=_.S;if(d!==null&&d(f,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var r=Mr(c,u);ku(t,l,r,Qt(t))}else ku(t,l,u,Qt(t))}catch(m){ku(t,l,{then:function(){},status:"rejected",reason:m},Qt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Cr(){}function Mf(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=sd(t).queue;cd(t,a,l,ne,e===null?Cr:function(){return od(t),e(u)})}function sd(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function od(t){var l=sd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Qt())}function Df(){return gt(ra)}function dd(){return at().memoizedState}function yd(){return at().memoizedState}function Br(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Qt();t=Gl(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:ef()},t.payload=l;return}l=l.return}}function Yr(t,l,e){var u=Qt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?rd(l,e):(e=Ki(t,l,e,u),e!==null&&(Rt(e,t,u),vd(e,l,u)))}function hd(t,l,e){var u=Qt();ku(t,l,e,u)}function ku(t,l,e,u){var a={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(on(t))rd(l,a);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,f=n(i,e);if(a.hasEagerState=!0,a.eagerState=f,Yt(f,i))return xa(t,l,a,0),K===null&&Za(),!1}catch{}finally{}if(e=Ki(t,l,a,u),e!==null)return Rt(e,t,u),vd(e,l,u),!0}return!1}function Uf(t,l,e,u){if(u={lane:2,revertLane:fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ki(t,e,u,2),l!==null&&Rt(l,t,2)}function on(t){var l=t.alternate;return t===U||l!==null&&l===U}function rd(t,l){lu=en=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function vd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,bs(t,e)}}var Iu={readContext:gt,use:nn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Iu.useEffectEvent=tt;var md={readContext:gt,use:nn,useCallback:function(t,l){return pt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:Po,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,ud.bind(null,l,t),e)},useLayoutEffect:function(t,l){return cn(4194308,4,t,l)},useInsertionEffect:function(t,l){cn(4,2,t,l)},useMemo:function(t,l){var e=pt();l=l===void 0?null:l;var u=t();if(ze){Rl(!0);try{t()}finally{Rl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=pt();if(e!==void 0){var a=e(l);if(ze){Rl(!0);try{e(l)}finally{Rl(!1)}}}else a=l;return u.memoizedState=u.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},u.queue=t,t=t.dispatch=Yr.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=pt();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=hd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:Of,useDeferredValue:function(t,l){var e=pt();return _f(e,t,l)},useTransition:function(){var t=Tf(!1);return t=cd.bind(null,U,t.queue,!0,!1),pt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=pt();if(j){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));q&127||Vo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,Po(Go.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},jo.bind(null,u,n,e,l),null),e},useId:function(){var t=pt(),l=K.identifierPrefix;if(j){var e=nl,u=al;e=(u&~(1<<32-Bt(u)-1)).toString(32)+e,l="_"+l+"R_"+e,e=un++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?i.createElement("select",{is:u.is}):i.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?i.createElement(a,{is:u.is}):i.createElement(a)}}n[mt]=l,n[Ot]=u;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(Et(n,a,u),a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&bl(l)}}return k(l),xf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&bl(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Hl.current,$e(l)){if(t=l.stateNode,e=l.memoizedProps,u=null,a=St,a!==null)switch(a.tag){case 27:case 5:u=a.memoizedProps}t[mt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Yy(t.nodeValue,e)),t||ql(l,!0)}else t=Hn(t).createTextNode(u),t[mt]=l,l.stateNode=t}return k(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(u=$e(l),e!==null){if(t===null){if(!u)throw Error(g(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(g(557));t[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(jt(l),l):(jt(l),null);if(l.flags&128)throw Error(g(558))}return k(l),null;case 13:if(u=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=$e(l),u!==null&&u.dehydrated!==null){if(t===null){if(!a)throw Error(g(318));if(a=l.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[mt]=l}else re(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Ii(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return l.flags&256?(jt(l),l):(jt(l),null)}return jt(l),l.flags&128?(l.lanes=e,l):(e=u!==null,t=t!==null&&t.memoizedState!==null,e&&(u=l.child,a=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(a=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==a&&(u.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),vn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&dc(l.stateNode.containerInfo),k(l),null;case 10:return vl(l.type),k(l),null;case 19:if(yt(ut),u=l.memoizedState,u===null)return k(l),null;if(a=(l.flags&128)!==0,n=u.rendering,n===null)if(a)ta(u,!1);else{if(lt!==0||t!==null&&t.flags&128)for(t=l.child;t!==null;){if(n=ln(t),n!==null){for(l.flags|=128,ta(u,!1),t=n.updateQueue,l.updateQueue=t,vn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)ho(e,t),e=e.sibling;return J(ut,ut.current&1|2),j&&hl(l,u.treeForkCount),l.child}t=t.sibling}u.tail!==null&&Nt()>En&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304)}else{if(!a)if(t=ln(n),t!==null){if(l.flags|=128,a=!0,t=t.updateQueue,l.updateQueue=t,vn(l,t),ta(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!j)return k(l),null}else 2*Nt()-u.renderingStartTime>En&&e!==536870912&&(l.flags|=128,a=!0,ta(u,!1),l.lanes=4194304);u.isBackwards?(n.sibling=l.child,l.child=n):(t=u.last,t!==null?t.sibling=n:l.child=n,u.last=n)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Nt(),t.sibling=null,e=ut.current,J(ut,a?e&1|2:e&1),j&&hl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return jt(l),yf(),u=l.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(l.flags|=8192):u&&(l.flags|=8192),u?e&536870912&&!(l.flags&128)&&(k(l),l.subtreeFlags&6&&(l.flags|=8192)):k(l),e=l.updateQueue,e!==null&&vn(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==e&&(l.flags|=2048),t!==null&&yt(Se),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),vl(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function Xr(t,l){switch(Fi(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return vl(it),Re(),t=l.flags,t&65536&&!(t&128)?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return Oa(l),null;case 31:if(l.memoizedState!==null){if(jt(l),l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(jt(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(g(340));re()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return yt(ut),null;case 4:return Re(),null;case 10:return vl(l.type),null;case 22:case 23:return jt(l),yf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return vl(it),null;case 25:return null;default:return null}}function Xd(t,l){switch(Fi(l),l.tag){case 3:vl(it),Re();break;case 26:case 27:case 5:Oa(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&jt(l);break;case 13:jt(l);break;case 19:yt(ut);break;case 10:vl(l.type);break;case 22:case 23:jt(l),yf(),t!==null&&yt(Se);break;case 24:vl(it)}}function la(t,l){try{var e=l.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var a=u.next;e=a;do{if((e.tag&t)===t){u=void 0;var n=e.create,i=e.inst;u=n(),i.destroy=u}e=e.next}while(e!==a)}}catch(f){Z(l,l.return,f)}}function xl(t,l,e){try{var u=l.updateQueue,a=u!==null?u.lastEffect:null;if(a!==null){var n=a.next;u=n;do{if((u.tag&t)===t){var i=u.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,a=l;var c=e,d=f;try{d()}catch(r){Z(a,c,r)}}}u=u.next}while(u!==n)}}catch(r){Z(l,l.return,r)}}function Qd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Ro(l,e)}catch(u){Z(t,t.return,u)}}}function Zd(t,l,e){e.props=Te(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(u){Z(t,l,u)}}function ea(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof e=="function"?t.refCleanup=e(u):e.current=u}}catch(a){Z(t,l,a)}}function il(t,l){var e=t.ref,u=t.refCleanup;if(e!==null)if(typeof u=="function")try{u()}catch(a){Z(t,l,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(a){Z(t,l,a)}else e.current=null}function xd(t){var l=t.type,e=t.memoizedProps,u=t.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":e.autoFocus&&u.focus();break t;case"img":e.src?u.src=e.src:e.srcSet&&(u.srcset=e.srcSet)}}catch(a){Z(t,t.return,a)}}function Lf(t,l,e){try{var u=t.stateNode;cv(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function Ld(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Kf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Ld(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Jf(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(t,l):(l=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.appendChild(t),e=e._reactRootContainer,e!=null||l.onclick!==null||(l.onclick=ol));else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(Jf(t,l,e),t=t.sibling;t!==null;)Jf(t,l,e),t=t.sibling}function mn(t,l,e){var u=t.tag;if(u===5||u===6)t=t.stateNode,l?e.insertBefore(t,l):e.appendChild(t);else if(u!==4&&(u===27&&Fl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(mn(t,l,e),t=t.sibling;t!==null;)mn(t,l,e),t=t.sibling}function Kd(t){var l=t.stateNode,e=t.memoizedProps;try{for(var u=t.type,a=l.attributes;a.length;)l.removeAttributeNode(a[0]);Et(l,u,e),l[mt]=t,l[Ot]=e}catch(n){Z(t,t.return,n)}}var El=!1,st=!1,wf=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function Qr(t,l){if(t=t.containerInfo,rc=Vn,t=uo(t),Gi(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var u=e.getSelection&&e.getSelection();if(u&&u.rangeCount!==0){e=u.anchorNode;var a=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break t}var i=0,f=-1,c=-1,d=0,r=0,m=t,y=null;l:for(;;){for(var v;m!==e||a!==0&&m.nodeType!==3||(f=i+a),m!==n||u!==0&&m.nodeType!==3||(c=i+u),m.nodeType===3&&(i+=m.nodeValue.length),(v=m.firstChild)!==null;)y=m,m=v;for(;;){if(m===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++r===u&&(c=i),(v=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=v}e=f===-1||c===-1?null:{start:f,end:c}}else e=null}e=e||{start:0,end:0}}else e=null;for(vc={focusedElem:t,selectionRange:e},Vn=!1,rt=l;rt!==null;)if(l=rt,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,rt=t;else for(;rt!==null;){switch(l=rt,n=l.alternate,t=l.flags,l.tag){case 0:if(t&4&&(t=l.updateQueue,t=t!==null?t.events:null,t!==null))for(e=0;e title"))),Et(n,u,e),n[mt]=t,ht(n),u=n;break t;case"link":var i=Iy("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fH&&(i=H,H=p,p=i);var o=lo(f,p),s=lo(f,H);if(o&&s&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==s.node||v.focusOffset!==s.offset)){var h=m.createRange();h.setStart(o.node,o.offset),v.removeAllRanges(),p>H?(v.addRange(h),v.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),v.addRange(h))}}}}for(m=[],v=f;v=v.parentNode;)v.nodeType===1&&m.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,_.T=null,e=tc,tc=null;var n=wl,i=Ol;if(dt=0,cu=wl=null,Ol=0,X&6)throw Error(g(331));var f=X;if(X|=4,uy(n.current),ty(n,n.current,i,e),X=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,zy(t,l)}}function py(t,l,e){l=Jt(e,l),l=Cf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),fl(t))}function Z(t,l,e){if(t.tag===3)py(t,t,e);else for(;l!==null;){if(l.tag===3){py(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Jl===null||!Jl.has(u))){t=Jt(e,t),e=Ad(2),u=Xl(l,e,2),u!==null&&(Od(e,u,l,t),Du(u,2),fl(u));break}}l=l.return}}function ac(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Lr;var a=new Set;u.set(l,a)}else a=u.get(l),a===void 0&&(a=new Set,u.set(l,a));a.has(e)||(Ff=!0,a.add(e),t=Wr.bind(null,t,l,e),l.then(t,t))}function Wr(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(q&e)===e&&(lt===4||lt===3&&(q&62914560)===q&&300>Nt()-bn?!(X&2)&&su(t,0):kf|=e,fu===q&&(fu=0)),fl(t)}function Ay(t,l){l===0&&(l=Ss()),t=ye(t,l),t!==null&&(Du(t,l),fl(t))}function Fr(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Ay(t,e)}function kr(t,l){var e=0;switch(t.tag){case 31:case 13:var u=t.stateNode,a=t.memoizedState;a!==null&&(e=a.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(g(314))}u!==null&&u.delete(l),Ay(t,e)}function Ir(t,l){return mi(t,l)}var _n=null,du=null,nc=!1,Mn=!1,ic=!1,Wl=0;function fl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,nc||(nc=!0,tv())}function ca(t,l){if(!ic&&Mn){ic=!0;do for(var e=!1,u=_n;u!==null;){if(t!==0){var a=u.pendingLanes;if(a===0)var n=0;else{var i=u.suspendedLanes,f=u.pingedLanes;n=(1<<31-Bt(42|t)+1)-1,n&=a&~(i&~f),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Dy(u,n))}else n=q,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Dy(u,n));u=u.next}while(e);ic=!1}}function Pr(){Oy()}function Oy(){Mn=nc=!1;var t=0;Wl!==0&&ov()&&(t=Wl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=_y(u,l);n===0?(u.next=null,e===null?_n=a:e.next=a,a===null&&(du=e)):(e=u,(t!==0||n&3)&&(Mn=!0)),u=a}dt!==0&&dt!==5||ca(t),Wl!==0&&(Wl=0)}function _y(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var r=c.transferSize,m=c.initiatorType;r&&qy(m)&&(c=c.responseEnd,i+=r*(c"u"?null:document;function $y(t,l,e){var u=yu;if(u&&typeof l=="string"&&l){var a=Lt(l);a='link[rel="'+t+'"][href="'+a+'"]',typeof e=="string"&&(a+='[crossorigin="'+e+'"]'),wy.has(a)||(wy.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function bv(t){_l.D(t),$y("dns-prefetch",t,null)}function Ev(t,l){_l.C(t,l),$y("preconnect",t,l)}function zv(t,l,e){_l.L(t,l,e);var u=yu;if(u&&t&&l){var a='link[rel="preload"][as="'+Lt(l)+'"]';l==="image"&&e&&e.imageSrcSet?(a+='[imagesrcset="'+Lt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(a+='[imagesizes="'+Lt(e.imageSizes)+'"]')):a+='[href="'+Lt(t)+'"]';var n=a;switch(l){case"style":n=hu(t);break;case"script":n=ru(t)}It.has(n)||(t=W({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),It.set(n,t),u.querySelector(a)!==null||l==="style"&&u.querySelector(ya(n))||l==="script"&&u.querySelector(ha(n))||(l=u.createElement("link"),Et(l,"link",t),ht(l),u.head.appendChild(l)))}}function Tv(t,l){_l.m(t,l);var e=yu;if(e&&t){var u=l&&typeof l.as=="string"?l.as:"script",a='link[rel="modulepreload"][as="'+Lt(u)+'"][href="'+Lt(t)+'"]',n=a;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ru(t)}if(!It.has(n)&&(t=W({rel:"modulepreload",href:t},l),It.set(n,t),e.querySelector(a)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ha(n)))return}u=e.createElement("link"),Et(u,"link",t),ht(u),e.head.appendChild(u)}}}function pv(t,l,e){_l.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=hu(t);l=l||"default";var i=a.get(n);if(!i){var f={loading:0,preload:null};if(i=u.querySelector(ya(n)))f.loading=5;else{t=W({rel:"stylesheet",href:t,"data-precedence":l},e),(e=It.get(n))&&Tc(t,e);var c=i=u.createElement("link");ht(c),Et(c,"link",t),c._p=new Promise(function(d,r){c.onload=d,c.onerror=r}),c.addEventListener("load",function(){f.loading|=1}),c.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Nn(i,l,u)}i={type:"stylesheet",instance:i,count:1,state:f},a.set(n,i)}}}function Av(t,l){_l.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Ov(t,l){_l.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=ru(t),n=u.get(a);n||(n=e.querySelector(ha(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=It.get(a))&&pc(t,l),n=e.createElement("script"),ht(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Wy(t,l,e,u){var a=(a=Hl.current)?Rn(a):null;if(!a)throw Error(g(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(l=hu(e.href),e=Ye(a).hoistableStyles,u=e.get(l),u||(u={type:"style",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hu(e.href);var n=Ye(a).hoistableStyles,i=n.get(t);if(i||(a=a.ownerDocument||a,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=a.querySelector(ya(t)))&&!n._p&&(i.instance=n,i.state.loading=5),It.has(t)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},It.set(t,e),n||_v(a,t,e,i.state))),l&&u===null)throw Error(g(528,""));return i}if(l&&u!==null)throw Error(g(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ru(e),e=Ye(a).hoistableScripts,u=e.get(l),u||(u={type:"script",instance:null,count:0,state:null},e.set(l,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,t))}}function hu(t){return'href="'+Lt(t)+'"'}function ya(t){return'link[rel="stylesheet"]['+t+"]"}function Fy(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function _v(t,l,e,u){t.querySelector('link[rel="preload"][as="style"]['+l+"]")?u.loading=1:(l=t.createElement("link"),u.preload=l,l.addEventListener("load",function(){return u.loading|=1}),l.addEventListener("error",function(){return u.loading|=2}),Et(l,"link",e),ht(l),t.head.appendChild(l))}function ru(t){return'[src="'+Lt(t)+'"]'}function ha(t){return"script[async]"+t}function ky(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var u=t.querySelector('style[data-href~="'+Lt(e.href)+'"]');if(u)return l.instance=u,ht(u),u;var a=W({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ht(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=hu(e.href);var n=t.querySelector(ya(a));if(n)return l.state.loading|=4,l.instance=n,ht(n),n;u=Fy(e),(a=It.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),ht(n);var i=n;return i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),l.state.loading|=4,Nn(n,e.precedence,t),l.instance=n;case"script":return n=ru(e.src),(a=t.querySelector(ha(n)))?(l.instance=a,ht(a),a):(u=e,(a=It.get(n))&&(u=W({},e),pc(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),ht(a),Et(a,"link",u),t.head.appendChild(a),l.instance=a);case"void":return null;default:throw Error(g(443,l.type))}else l.type==="stylesheet"&&!(l.state.loading&4)&&(u=l.instance,l.state.loading|=4,Nn(u,e.precedence,t));return l.instance}function Nn(t,l,e){for(var u=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=u.length?u[u.length-1]:null,n=a,i=0;i title"):null)}function Mv(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function t0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Dv(t,l,e,u){if(e.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var a=hu(u.href),n=l.querySelector(ya(a));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=Bn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ht(n);return}n=l.ownerDocument||l,u=Fy(u),(a=It.get(a))&&Tc(u,a),n=n.createElement("link"),ht(n);var i=n;i._p=new Promise(function(f,c){i.onload=f,i.onerror=c}),Et(n,"link",u),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&!(e.state.loading&3)&&(t.count++,e=Bn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Ac=0;function Uv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Ac?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Bn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yn=null;function qn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yn=new Map,l.forEach(Hv,t),Yn=null,Bn.call(t))}function Hv(t,l){if(!(l.state.loading&4)){var e=Yn.get(t);if(e)var u=e.get(null);else{e=new Map,Yn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r0)}catch(t){console.error(t)}}r0(),kc.exports=Ea;var v0=kc.exports;const jv=ue({__proto__:null,default:jc(v0)},[v0]);var m0={exports:{}},Ln={};/** * @license React * react-jsx-runtime.production.js * @@ -46,4 +46,4 @@ Error generating stack: `+u.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Gv=Symbol.for("react.transitional.element"),Xv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Xv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var mu=m0.exports;const g0=V.createContext(null);function Qv({namespace:t,children:l}){return mu.jsx(g0.Provider,{value:t,children:l})}function Zv(){return V.useContext(g0)}function xv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Zv();return xv(t,l!==void 0?l:e)}const Su=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Lv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Kv(t){const l=Su.get(t);l&&T0(t,l.promise)}function Jv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{Lv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Kv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),p0="1.0";function wv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function $v(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function Wv(t){const l=e=>e.split(".")[0];l(t)!==l(p0)&&$v(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${p0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Fv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=wv();if(a!=null&&a.protocolVersion?Wv(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let A0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function kv(){if(A0||typeof document>"u")return;A0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return kv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class Iv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new Iv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Pv(){et()&&Y0()}class tm{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class lm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new tm(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function em(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===gu){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class um{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new um,outputs:new lm}),q0}function am(){Zt()}function Zt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Zt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const p=V.useCallback(R=>{if(!b)return;const s=Zt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(R)},[i,b]);return[y,p]}const bu=()=>{};function j0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function G0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function X0(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=le();return V.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Zt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let Q0=!1;function Oe(){Q0||(am(),Fv(Zt().inputs),em(()=>Zt().outputs),Pv(),Q0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,gu,c),[m,y]=Jn(`.clientdata_output_${f}_height`,gu,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=j0(f,void 0,c),p=G0(f,c),R=X0(f,c),o=V.useRef(null),s=V.useRef(null),[h,S]=V.useState(0);V.useEffect(()=>{b&&S(A=>A+1)},[b]),V.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=V.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(V.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Bc(()=>{A&&A.complete&&T()},a),O=new ResizeObserver(M=>{for(const H of M)H.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",T),O.disconnect(),E.cancel()}},[o,h,r,y,a,T]),V.useEffect(()=>{if(b)return;const A=s.current;if(!A)return;const E=()=>{const H=A.clientWidth,At=A.clientHeight;H>0&&At>0&&(r(H),y(At))};E();const O=Bc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,r,y,a]),v)return null;if(R){const A=["shiny-output-error",...[].concat(R.type??[]).map(E=>`shiny-output-error-${E}`),l];return mu.jsx("div",{className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:R.message})}return b?mu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:T}):mu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:mu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:mu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:X0,useShinyOutputStatus:G0,useShinyOutputValue:j0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:gu,ShinyModuleProvider:Qv,ShinyOutput:Jv,React:Fc,ReactDOM:jv}}om(),x0()})(); + */var Gv=Symbol.for("react.transitional.element"),Xv=Symbol.for("react.fragment");function S0(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Gv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Xv,Ln.jsx=S0,Ln.jsxs=S0,m0.exports=Ln;var mu=m0.exports;const g0=V.createContext(null);function Qv({namespace:t,children:l}){return mu.jsx(g0.Provider,{value:t,children:l})}function Zv(){return V.useContext(g0)}function xv(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=Zv();return xv(t,l!==void 0?l:e)}const Su=new WeakMap,Rc=new Set;function b0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Rc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Rc.add(t),u}function E0(t){const l=[];for(const e of Rc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function z0(t){var u;const l=(u=window.Shiny)==null?void 0:u.bindAll;if(!l)return Promise.resolve();const e=new WeakSet(Array.from(t.children));return b0(t,Promise.resolve(l(t)),e).promise}function T0(t,l){const e=E0(t).map(a=>a.promise);l&&e.push(l);const u=b0(t,Promise.allSettled(e).then(()=>z0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Lv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&E0(l).length===0)return z0(l);const u=T0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function Kv(t){const l=Su.get(t);l&&T0(t,l.promise)}function Jv({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,f=i==null?void 0:i.parentElement;if(!i||!f||!((d=window.Shiny)!=null&&d.bindAll))return;const c=(r,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:r})};try{Lv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;Kv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),Fc.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),p0="1.0";function wv(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function $v(t){if(typeof document<"u"&&document.body){const l="shinyreact-fatal-error";let e=document.getElementById(l);e||(e=document.createElement("div"),e.id=l,e.setAttribute("role","alert"),e.style.cssText="position:fixed;top:0;left:0;right:0;z-index:99999;padding:1rem 1.25rem;background:#fee2e2;color:#7f1d1d;border-bottom:4px solid #991b1b;font-family:system-ui,sans-serif;font-size:15px;line-height:1.5;white-space:pre-wrap",document.body.appendChild(e));const u=e;u.textContent="",t.split("`").forEach((a,n)=>{if(n%2===0){u.appendChild(document.createTextNode(a));return}const i=document.createElement("code");i.textContent=a,i.style.cssText="background:#fff;color:#7f1d1d;border:1px solid #f0a3a3;border-radius:4px;padding:0.1em 0.35em;font-family:ui-monospace,SFMono-Regular,monospace;font-size:0.95em",u.appendChild(i)})}throw new Error(t.replace(/`/g,""))}function Wv(t){const l=e=>e.split(".")[0];l(t)!==l(p0)&&$v(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${p0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Fv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=wv();if(a!=null&&a.protocolVersion?Wv(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[f,c]of Object.entries(n))t.add(f,c),i[f]=c;e._restore={"-applied":!0,"-values":i}}let Nc=!1,Kn=!1;const Cc=new Set;let A0=!1,O0,_0,M0;function D0(){for(const t of Cc)t()}function U0(){Nc||(Nc=!0,D0())}function H0(t){Kn!==t&&(Kn=t,D0())}function kv(){if(A0||typeof document>"u")return;A0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0),O0=()=>H0(!0),_0=()=>H0(!1),document.addEventListener("shiny:busy",O0),document.addEventListener("shiny:idle",_0);const t=et();if(t){t.initializedPromise.then(U0);return}M0=()=>{const l=et();l&&l.initializedPromise.then(U0)},document.addEventListener("shiny:connected",M0,{once:!0})}function R0(t){return kv(),Cc.add(t),()=>{Cc.delete(t)}}function N0(){return Nc}function C0(){return Kn}class Iv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=et();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const B0=new Iv;function Y0(){const t=et();return t?t.messageRegistry??(t.messageRegistry=B0):B0}function Pv(){et()&&Y0()}class tm{constructor(l){I(this,"id");I(this,"el");I(this,"status","pending");I(this,"hasValue",!1);I(this,"lastValue");I(this,"lastError",null);I(this,"useStateSetValueFns");I(this,"useStateSetStatusFns");I(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class lm{constructor(){I(this,"outputs",new Map);I(this,"bindAllScheduled",!1);I(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new tm(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var a,n;const e=this.outputs.get(l);if(!e||!e.isEmpty())return;this.outputs.delete(l);const u=e.el;if(u){try{(n=(a=et())==null?void 0:a.unbindAll)==null||n.call(a,u,!0)}catch(i){console.error(`[shinyreact] unbindAll failed for output "${l}":`,i)}u.remove()}this.scheduleBindAll()})}scheduleBindAll(){const l=et();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function em(t){const l=et();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){n.message!==""&&console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Bc(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ga=class ga{constructor(l,e){I(this,"id");I(this,"value");I(this,"useStateSetValueFns");I(this,"shinySetInputValueDebounced");I(this,"opts",{debounceMs:100});I(this,"type");I(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Bc(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ga.DEFAULT_TYPE}`;(a=(u=et())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ga.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===gu){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};I(ga,"DEFAULT_TYPE","shinyreact.default");let Yc=ga;class um{constructor(){I(this,"inputs",new Map);I(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Yc(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let q0;function V0(){return q0??(q0={inputs:new um,outputs:new lm}),q0}function am(){Zt()}function Zt(){const t=et();return t?t.reactRegistry??(t.reactRegistry=V0()):V0()}function Jn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Zt().inputs.getOrCreate(i,c);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(v),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(v)}},[i,b,e,u,c,n]);const p=V.useCallback(H=>{if(!b)return;const s=Zt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(H)},[i,b]);return[y,p]}const bu=()=>{};function j0(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();Oe();const i=Ml(t,e),f=V.useRef(l);return V.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function G0(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function X0(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();Oe();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function nm(t,{namespace:l}={}){Oe();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=le();return V.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function im(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Oe(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),c=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Zt().inputs.getOrCreate(i,c);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,c,n]),V.useCallback(r=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(r)},[i,d])}function fm(t,l,{namespace:e}={}){const u=le();Oe();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Y0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(R0,N0,N0)}function cm(){return V.useSyncExternalStore(R0,C0,C0)}let Q0=!1;function Oe(){Q0||(am(),Fv(Zt().inputs),em(()=>Zt().outputs),Pv(),Q0=!0)}function sm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Ml(t,i),c={namespace:null},[d,r]=Jn(`.clientdata_output_${f}_width`,gu,c),[m,y]=Jn(`.clientdata_output_${f}_height`,gu,c),[v]=Jn(`.clientdata_output_${f}_hidden`,!1,c),b=j0(f,void 0,c),p=G0(f,c),H=X0(f,c),o=V.useRef(null),s=V.useRef(null),[h,S]=V.useState(0);V.useEffect(()=>{b&&S(A=>A+1)},[b]),V.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=V.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(V.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Bc(()=>{A&&A.complete&&T()},a),O=new ResizeObserver(M=>{for(const R of M)R.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",T),O.disconnect(),E.cancel()}},[o,h,r,y,a,T]),V.useEffect(()=>{if(b&&!H)return;const A=s.current;if(!A)return;const E=()=>{const R=A.clientWidth,At=A.clientHeight;R>0&&At>0&&(r(R),y(At))};E();const O=Bc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,H,r,y,a]),v)return null;if(H){const A=["shiny-output-error",...[].concat(H.type??[]).map(E=>`shiny-output-error-${E}`),l];return mu.jsx("div",{ref:s,className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:H.message})}return b?mu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:T}):mu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:mu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:mu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function om(){window.shinyreact={useSetShinyInput:im,useShinyBusy:cm,useShinyInput:Jn,useShinyInputValue:nm,useShinyOutputError:X0,useShinyOutputStatus:G0,useShinyOutputValue:j0,useShinyMessageHandler:fm,useShinyInitialized:le,ImageOutput:sm,MISSING:gu,ShinyModuleProvider:Qv,ShinyOutput:Jv,React:Fc,ReactDOM:jv}}om(),x0()})();