Oc?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(Nm,t),Yn=null,Bn.call(t))}function Nm(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(gr)}catch(t){console.error(t)}}gr(),ls.exports=Ea;var br=ls.exports;const Qm=ae({__proto__:null,default:Zc(br)},[br]);var Er={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 Xv=Symbol.for("react.transitional.element"),Zv=Symbol.for("react.fragment");function z0(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:Xv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Zv,Ln.jsx=z0,Ln.jsxs=z0,E0.exports=Ln;var mu=E0.exports;const T0=q.createContext(null);function xv({namespace:t,children:l}){return mu.jsx(T0.Provider,{value:t,children:l})}function Lv(){return q.useContext(T0)}function Kv(t,l){return l?`${l}-${t}`:t}function Dl(t,l){const e=Lv();return Kv(t,l!==void 0?l:e)}const Su=new WeakMap,Nc=new Set;function p0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Nc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Nc.add(t),u}function A0(t){const l=[];for(const e of Nc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function O0(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 p0(t,Promise.resolve(l(t)),e).promise}function _0(t,l){const e=A0(t).map(a=>a.promise);l&&e.push(l);const u=p0(t,Promise.allSettled(e).then(()=>O0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Jv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&A0(l).length===0)return O0(l);const u=_0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function wv(t){const l=Su.get(t);l&&_0(t,l.promise)}function $v({id:t,tagName:l="div",namespace:e,...u}){const a=Dl(t,e),n=q.useRef(null);return q.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{Jv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;wv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),ts.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),M0="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 Fv(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 kv(t){const l=e=>e.split(".")[0];l(t)!==l(M0)&&Fv(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${M0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Iv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=Wv();if(a!=null&&a.protocolVersion?kv(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 Cc=!1,Kn=!1,Jn=!1;const Bc=new Set;let D0=!1,U0=[];function Yc(){for(const t of Bc)t()}function H0(){Cc||(Cc=!0,Yc())}function R0(t){Kn!==t&&(Kn=t,Yc())}function N0(t){Jn!==t&&(Jn=t,Yc())}function Pv(){var e;if(D0||typeof document>"u")return;D0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0);const t=tt();if(Jn=((e=t==null?void 0:t.shinyapp)==null?void 0:e.isConnected())??!1,U0=[Pt("shiny:busy",()=>R0(!0)),Pt("shiny:idle",()=>R0(!1)),Pt("shiny:connected",()=>N0(!0)),Pt("shiny:disconnected",()=>N0(!1))],t){t.initializedPromise.then(H0);return}const l=Pt("shiny:connected",()=>{var u;l(),(u=tt())==null||u.initializedPromise.then(H0)});U0.push(l)}function qc(t){return Pv(),Bc.add(t),()=>{Bc.delete(t)}}function C0(){return Cc}function B0(){return Kn}function Y0(){return Jn}class tm{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=tt();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 q0=new tm;function V0(){const t=tt();return t?t.messageRegistry??(t.messageRegistry=q0):q0}function lm(){tt()&&V0()}class em{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 um{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 em(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=tt())==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=tt();!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 am(t){const l=tt();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 Vc(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=Vc(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=tt())==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 jc=ga;class nm{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 jc(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 j0;function G0(){return j0??(j0={inputs:new nm,outputs:new um}),j0}function im(){Zt()}function Zt(){const t=tt();return t?t.reactRegistry??(t.reactRegistry=G0()):G0()}function wn(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=Dl(t,a),c=q.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=q.useState(d),b=ee();q.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=q.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 Q0(t,l=void 0,{namespace:e}={}){const[u,a]=q.useState(l),n=ee();Oe();const i=Dl(t,e),f=q.useRef(l);return q.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function X0(t,{namespace:l}={}){const[e,u]=q.useState("pending"),a=ee();Oe();const n=Dl(t,l);return q.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function Z0(t,{namespace:l}={}){const[e,u]=q.useState(null),a=ee();Oe();const n=Dl(t,l);return q.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function fm(t,{namespace:l}={}){Oe();const e=Dl(t,l),[u,a]=q.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=ee();return q.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function cm(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=Dl(t,a),c=q.useRef(l).current,d=ee();return q.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]),q.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 sm(t,l,{namespace:e}={}){const u=ee();Oe();const a=Dl(t,e),n=q.useRef(l);n.current=l,q.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=V0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function ee(){return q.useSyncExternalStore(qc,C0,C0)}function om(){return q.useSyncExternalStore(qc,B0,B0)}function dm(){return q.useSyncExternalStore(qc,Y0,Y0)}let x0=!1;function Oe(){x0||(im(),Iv(Zt().inputs),am(()=>Zt().outputs),lm(),x0=!0)}function ym({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Dl(t,i),c={namespace:null},[d,r]=wn(`.clientdata_output_${f}_width`,gu,c),[m,y]=wn(`.clientdata_output_${f}_height`,gu,c),[v]=wn(`.clientdata_output_${f}_hidden`,!1,c),b=Q0(f,void 0,c),p=X0(f,c),H=Z0(f,c),o=q.useRef(null),s=q.useRef(null),[h,S]=q.useState(0);q.useEffect(()=>{b&&S(A=>A+1)},[b]),q.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=q.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(q.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Vc(()=>{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]),q.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=Vc(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 hm(){window.shinyreact={useSetShinyInput:cm,useShinyBusy:om,useShinyConnected:dm,useShinyInput:wn,useShinyInputValue:fm,useShinyOutputError:Z0,useShinyOutputStatus:X0,useShinyOutputValue:Q0,useShinyMessageHandler:sm,useShinyInitialized:ee,ImageOutput:ym,MISSING:gu,ShinyModuleProvider:xv,ShinyOutput:$v,React:ts,ReactDOM:Qv}}hm(),K0()})();
+ */var Xm=Symbol.for("react.transitional.element"),Zm=Symbol.for("react.fragment");function zr(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:Xm,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Zm,Ln.jsx=zr,Ln.jsxs=zr,Er.exports=Ln;var vu=Er.exports;const pr=q.createContext(null);function xm({namespace:t,children:l}){return vu.jsx(pr.Provider,{value:t,children:l})}function Lm(){return q.useContext(pr)}function Km(t,l){return l?`${l}-${t}`:t}function Dl(t,l){const e=Lm();return Km(t,l!==void 0?l:e)}const Su=new WeakMap,Nc=new Set;function Tr(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Nc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Nc.add(t),u}function Ar(t){const l=[];for(const e of Nc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function Or(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 Tr(t,Promise.resolve(l(t)),e).promise}function _r(t,l){const e=Ar(t).map(a=>a.promise);l&&e.push(l);const u=Tr(t,Promise.allSettled(e).then(()=>Or(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Jm(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&Ar(l).length===0)return Or(l);const u=_r(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function wm(t){const l=Su.get(t);l&&_r(t,l.promise)}function $m({id:t,tagName:l="div",namespace:e,...u}){const a=Dl(t,e),n=q.useRef(null);return q.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=(h,v)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${v} failed:`,{id:a,phase:v,error:h})};try{Jm(i,f).catch(h=>c(h,"bindAll"))}catch(h){c(h,"bindAll")}return()=>{var h,v;wm(f);try{(v=(h=window.Shiny)==null?void 0:h.unbindAll)==null||v.call(h,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),ts.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),Mr="1.0";function Wm(){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 Fm(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 km(t){const l=e=>e.split(".")[0];l(t)!==l(Mr)&&Fm(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${Mr}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Im(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=Wm();if(a!=null&&a.protocolVersion?km(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 Cc=!1,Kn=!1,Jn=!1;const Bc=new Set;let Dr=!1,Ur=[];function Yc(){for(const t of Bc)t()}function Hr(){Cc||(Cc=!0,Yc())}function Rr(t){Kn!==t&&(Kn=t,Yc())}function Nr(t){Jn!==t&&(Jn=t,Yc())}function Pm(){var e;if(Dr||typeof document>"u")return;Dr=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0);const t=tt();if(Jn=((e=t==null?void 0:t.shinyapp)==null?void 0:e.isConnected())??!1,Ur=[Pt("shiny:busy",()=>Rr(!0)),Pt("shiny:idle",()=>Rr(!1)),Pt("shiny:connected",()=>Nr(!0)),Pt("shiny:disconnected",()=>Nr(!1))],t){t.initializedPromise.then(Hr);return}const l=Pt("shiny:connected",()=>{var u;l(),(u=tt())==null||u.initializedPromise.then(Hr)});Ur.push(l)}function qc(t){return Pm(),Bc.add(t),()=>{Bc.delete(t)}}function Cr(){return Cc}function Br(){return Kn}function Yr(){return Jn}class tv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=tt();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 qr=new tv;function Vr(){const t=tt();return t?t.messageRegistry??(t.messageRegistry=qr):qr}function lv(){tt()&&Vr()}class ev{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 uv{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 ev(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=tt())==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=tt();!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 av(t){const l=tt();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 Vc(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=Vc(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=tt())==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 jc=ga;class nv{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 jc(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 jr;function Gr(){return jr??(jr={inputs:new nv,outputs:new uv}),jr}function iv(){Zt()}function Zt(){const t=tt();return t?t.reactRegistry??(t.reactRegistry=Gr()):Gr()}function wn(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=Dl(t,a),c=q.useRef(l).current;let d=c;const v=Zt().inputs.get(i);v&&(d=v.getValue());const[y,m]=q.useState(d),b=ee();q.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(m),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(m)}},[i,b,e,u,c,n]);const T=q.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,T]}const bu=()=>{};function Qr(t,l=void 0,{namespace:e}={}){const[u,a]=q.useState(l),n=ee();Oe();const i=Dl(t,e),f=q.useRef(l);return q.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function Xr(t,{namespace:l}={}){const[e,u]=q.useState("pending"),a=ee();Oe();const n=Dl(t,l);return q.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function Zr(t,{namespace:l}={}){const[e,u]=q.useState(null),a=ee();Oe();const n=Dl(t,l);return q.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function fv(t,{namespace:l}={}){Oe();const e=Dl(t,l),[u,a]=q.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=ee();return q.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function cv(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=Dl(t,a),c=q.useRef(l).current,d=ee();return q.useEffect(()=>{if(!d)return;const v=Zt().inputs.getOrCreate(i,c);e!==void 0&&v.updateDebounceDelay(e),u&&v.updatePriority(u),v.updateType(n),v.setValue(v.getValue())},[i,d,e,u,c,n]),q.useCallback(h=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(h)},[i,d])}function sv(t,l,{namespace:e}={}){const u=ee();Oe();const a=Dl(t,e),n=q.useRef(l);n.current=l,q.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Vr();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function ee(){return q.useSyncExternalStore(qc,Cr,Cr)}function ov(){return q.useSyncExternalStore(qc,Br,Br)}function dv(){return q.useSyncExternalStore(qc,Yr,Yr)}let xr=!1;function Oe(){xr||(iv(),Im(Zt().inputs),av(()=>Zt().outputs),lv(),xr=!0)}function yv({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Dl(t,i),c={namespace:null},[d,h]=wn(`.clientdata_output_${f}_width`,gu,c),[v,y]=wn(`.clientdata_output_${f}_height`,gu,c),[m]=wn(`.clientdata_output_${f}_hidden`,!1,c),b=Qr(f,void 0,c),T=Xr(f,c),H=Zr(f,c),o=q.useRef(null),s=q.useRef(null),[r,S]=q.useState(0);q.useEffect(()=>{b&&S(A=>A+1)},[b]),q.useEffect(()=>{n&&n(T==="recalculating")},[T,n]);const p=q.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(h(A),y(E))}},[h,y]);if(q.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",p);const E=Vc(()=>{A&&A.complete&&p()},a),O=new ResizeObserver(M=>{for(const R of M)R.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",p),O.disconnect(),E.cancel()}},[o,r,h,y,a,p]),q.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&&(h(R),y(At))};E();const O=Vc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,H,h,y,a]),m)return null;if(H){const A=["shiny-output-error",...[].concat(H.type??[]).map(E=>`shiny-output-error-${E}`),l];return vu.jsx("div",{ref:s,className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:H.message})}return b?vu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:p}):vu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:vu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:vu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function rv(){window.shinyreact={useSetShinyInput:cv,useShinyBusy:ov,useShinyConnected:dv,useShinyInput:wn,useShinyInputValue:fv,useShinyOutputError:Zr,useShinyOutputStatus:Xr,useShinyOutputValue:Qr,useShinyMessageHandler:sv,useShinyInitialized:ee,ImageOutput:yv,MISSING:gu,ShinyModuleProvider:xm,ShinyOutput:$m,React:ts,ReactDOM:Qm}}const hv="[shinyreact] Shiny tried to open a Bootstrap modal, but this page has no Bootstrap. If you are bookmarking, register your own callback: onBookmarked(function(url) updateQueryString(url)) in R, or session.bookmark.on_bookmarked(session.bookmark.update_query_string) in Python. For showModal() / modal_show(), build the dialog in React instead.";function mv(){if(typeof window>"u")return;const t=window.jQuery;!(t!=null&&t.fn)||t.fn.modal||(t.fn.modal=function(){return console.error(hv),this})}rv(),Kr(),mv()})();
diff --git a/pkg-py/tests/playwright/apps/bookmark/app.py b/pkg-py/tests/playwright/apps/bookmark/app.py
index a910ad13..b565b731 100644
--- a/pkg-py/tests/playwright/apps/bookmark/app.py
+++ b/pkg-py/tests/playwright/apps/bookmark/app.py
@@ -14,6 +14,11 @@ def echo() -> str:
return f"text={input.txt()!r} num={input.num()} checked={chk}"
+# Without this, Shiny shows the URL in a Bootstrap modal, which this
+# Bootstrap-free page cannot open (#326).
+session.bookmark.on_bookmarked(session.bookmark.update_query_string)
+
+
@reactive.effect
@reactive.event(input.bookmark_clicks, ignore_init=True)
async def _on_bookmark_click() -> None:
diff --git a/pkg-py/tests/playwright/apps/bookmark_modal/app.py b/pkg-py/tests/playwright/apps/bookmark_modal/app.py
new file mode 100644
index 00000000..cf76ae51
--- /dev/null
+++ b/pkg-py/tests/playwright/apps/bookmark_modal/app.py
@@ -0,0 +1,13 @@
+from shiny import reactive
+from shiny.express import app_opts, input, session
+from shinyreact import set_react_page
+
+app_opts(bookmark_store="url")
+set_react_page()
+
+
+# No `on_bookmarked()` callback, so Shiny falls back to its Bootstrap modal.
+@reactive.effect
+@reactive.event(input.bookmark_clicks, ignore_init=True)
+async def _() -> None:
+ await session.bookmark()
diff --git a/pkg-py/tests/playwright/apps/bookmark_modal/www/app.js b/pkg-py/tests/playwright/apps/bookmark_modal/www/app.js
new file mode 100644
index 00000000..f19cce63
--- /dev/null
+++ b/pkg-py/tests/playwright/apps/bookmark_modal/www/app.js
@@ -0,0 +1,16 @@
+const { React, ReactDOM, useSetShinyInput } = window.shinyreact;
+const h = React.createElement;
+
+function App() {
+ const setClicks = useSetShinyInput("bookmark_clicks", 0, {
+ debounceMs: 0,
+ priority: "event",
+ });
+ return h(
+ "button",
+ { "data-testid": "bookmark-btn", onClick: () => setClicks(1) },
+ "Bookmark",
+ );
+}
+
+ReactDOM.createRoot(document.getElementById("root")).render(h(App));
diff --git a/pkg-py/tests/playwright/apps/bookmark_modal/www/index.html b/pkg-py/tests/playwright/apps/bookmark_modal/www/index.html
new file mode 100644
index 00000000..86513c6e
--- /dev/null
+++ b/pkg-py/tests/playwright/apps/bookmark_modal/www/index.html
@@ -0,0 +1,8 @@
+
+ The app registers no on_bookmarked() callback, so
+ Bookmark makes Shiny open its Bootstrap modal. This page has no
+ Bootstrap: the console shows a [shinyreact] error naming the fix,
+ not $(...).modal is not a function.
+
+
+
diff --git a/pkg-py/tests/playwright/test_bookmark_restore.py b/pkg-py/tests/playwright/test_bookmark_restore.py
index f19ba32d..deb50473 100644
--- a/pkg-py/tests/playwright/test_bookmark_restore.py
+++ b/pkg-py/tests/playwright/test_bookmark_restore.py
@@ -13,6 +13,7 @@
from shiny.run import ShinyAppProc
bookmark_app = create_app_fixture("apps/bookmark/app.py")
+bookmark_modal_app = create_app_fixture("apps/bookmark_modal/app.py")
def _wait_for_shiny_initialized(page: Page) -> None:
@@ -63,6 +64,41 @@ def test_no_bookmark_renders_defaults(page: Page, bookmark_app: ShinyAppProc) ->
assert sentinel == '{"-applied":true,"-values":{}}'
+def test_on_bookmarked_update_query_string_rewrites_the_url(
+ page: Page, bookmark_app: ShinyAppProc
+) -> None:
+ """The documented pattern: `on_bookmarked(update_query_string)` puts the
+ bookmark URL in the address bar, with no modal (#326)."""
+ page.goto(bookmark_app.url)
+ _wait_for_shiny_initialized(page)
+
+ page.get_by_test_id("txt").fill("hi")
+ expect(page.get_by_test_id("echo")).to_contain_text("text='hi'")
+ page.get_by_test_id("bookmark-btn").click()
+
+ page.wait_for_url("**?_inputs_*")
+ assert "txt=%22hi%22" in page.url
+
+
+def test_bookmark_without_a_callback_explains_the_missing_modal(
+ page: Page, bookmark_modal_app: ShinyAppProc
+) -> None:
+ """With no `on_bookmarked()` callback Shiny opens a Bootstrap modal. This
+ page has none, so shinyreact logs what to do instead of letting
+ `$(...).modal is not a function` escape (#326)."""
+ page_errors: list[str] = []
+ page.on("pageerror", lambda e: page_errors.append(str(e)))
+
+ page.goto(bookmark_modal_app.url)
+ _wait_for_shiny_initialized(page)
+ with page.expect_console_message(
+ lambda m: m.type == "error" and "[shinyreact] Shiny tried" in m.text
+ ):
+ page.get_by_test_id("bookmark-btn").click()
+
+ assert [e for e in page_errors if "modal is not a function" in e] == []
+
+
# Round-trip server-stored bookmarking (set inputs → click bookmark → reload
# at the new ``?_state_id_=...`` URL → assert restored React state) needs a
# second fixture with ``bookmark_store="server"`` that can be spawned
diff --git a/pkg-r/NEWS.md b/pkg-r/NEWS.md
index 4631eb33..68361246 100644
--- a/pkg-r/NEWS.md
+++ b/pkg-r/NEWS.md
@@ -6,6 +6,12 @@
IDs were found" warning grew and the console logged `Output not found`
(#330).
+* Bookmarking on a `page_react()` page needs an app-registered callback such as
+ `onBookmarked(function(url) updateQueryString(url))`. Without one, Shiny shows the bookmark URL in a Bootstrap modal, which
+ a page with no Bootstrap cannot open, so `session$doBookmark()` failed with
+ `$(...).modal is not a function`. The browser console now logs a
+ `[shinyreact]` error naming the fix instead (#326).
+
# shinyreact 0.1.0
* Initial CRAN release. shinyreact is the server-side plumbing for the
diff --git a/pkg-r/inst/lib/shiny/shinyreact.js b/pkg-r/inst/lib/shiny/shinyreact.js
index cc17fcf2..454ee888 100644
--- a/pkg-r/inst/lib/shiny/shinyreact.js
+++ b/pkg-r/inst/lib/shiny/shinyreact.js
@@ -1,4 +1,4 @@
-var vm=Object.defineProperty;var mm=(ae,tt,Pt)=>tt in ae?vm(ae,tt,{enumerable:!0,configurable:!0,writable:!0,value:Pt}):ae[tt]=Pt;var I=(ae,tt,Pt)=>mm(ae,typeof tt!="symbol"?tt+"":tt,Pt);(function(){"use strict";function ae(t,l){for(var e=0;eu[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function tt(){if(!(typeof window>"u"))return window.Shiny}function Pt(t,l){const e=window.jQuery;return e?(e(document).on(t,l),()=>e(document).off(t,l)):(tt()&&console.warn(`[shinyreact] window.Shiny is present but window.jQuery is not; "${t}" will never be heard.`),document.addEventListener(t,l),()=>document.removeEventListener(t,l))}let Xc=!1;function K0(){if(typeof document>"u"||Xc)return;Xc=!0;const t=()=>{const e=tt();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(tt()){t();return}const l=Pt("shiny:connected",()=>{tt()&&(l(),t())})}function Zc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xc={exports:{}},D={};/**
+var Sv=Object.defineProperty;var gv=(ae,tt,Pt)=>tt in ae?Sv(ae,tt,{enumerable:!0,configurable:!0,writable:!0,value:Pt}):ae[tt]=Pt;var I=(ae,tt,Pt)=>gv(ae,typeof tt!="symbol"?tt+"":tt,Pt);(function(){"use strict";function ae(t,l){for(var e=0;eu[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function tt(){if(!(typeof window>"u"))return window.Shiny}function Pt(t,l){const e=window.jQuery;return e?(e(document).on(t,l),()=>e(document).off(t,l)):(tt()&&console.warn(`[shinyreact] window.Shiny is present but window.jQuery is not; "${t}" will never be heard.`),document.addEventListener(t,l),()=>document.removeEventListener(t,l))}let Xc=!1;function Kr(){if(typeof document>"u"||Xc)return;Xc=!0;const t=()=>{const e=tt();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(tt()){t();return}const l=Pt("shiny:connected",()=>{tt()&&(l(),t())})}function Zc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xc={exports:{}},D={};/**
* @license React
* react.production.js
*
@@ -6,7 +6,7 @@ var vm=Object.defineProperty;var mm=(ae,tt,Pt)=>tt in ae?vm(ae,tt,{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 kn=Symbol.for("react.transitional.element"),J0=Symbol.for("react.portal"),w0=Symbol.for("react.fragment"),$0=Symbol.for("react.strict_mode"),W0=Symbol.for("react.profiler"),F0=Symbol.for("react.consumer"),k0=Symbol.for("react.context"),I0=Symbol.for("react.forward_ref"),P0=Symbol.for("react.suspense"),th=Symbol.for("react.memo"),Lc=Symbol.for("react.lazy"),lh=Symbol.for("react.activity"),Kc=Symbol.iterator;function eh(t){return t===null||typeof t!="object"?null:(t=Kc&&t[Kc]||t["@@iterator"],typeof t=="function"?t:null)}var Jc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wc=Object.assign,$c={};function Me(t,l,e){this.props=t,this.context=l,this.refs=$c,this.updater=e||Jc}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 Wc(){}Wc.prototype=Me.prototype;function In(t,l,e){this.props=t,this.context=l,this.refs=$c,this.updater=e||Jc}var Pn=In.prototype=new Wc;Pn.constructor=In,wc(Pn,Me.prototype),Pn.isPureReactComponent=!0;var Fc=Array.isArray;function ti(){}var w={H:null,A:null,T:null,S:null},kc=Object.prototype.hasOwnProperty;function li(t,l,e){var u=e.ref;return{$$typeof:kn,type:t,key:l,ref:u!==void 0?u:null,props:e}}function uh(t,l){return li(t.type,l,t.props)}function ei(t){return typeof t=="object"&&t!==null&&t.$$typeof===kn}function ah(t){var l={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(e){return l[e]})}var Ic=/\/+/g;function ui(t,l){return typeof t=="object"&&t!==null&&t.key!=null?ah(""+t.key):l.toString(36)}function nh(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(ti,ti):(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 kn:case J0:i=!0;break;case Lc:return i=t._init,De(i(t._payload),l,e,u,a)}}if(i)return a=a(t),i=u===""?"."+ui(t,0):u,Fc(a)?(e="",i!=null&&(e=i.replace(Ic,"$&/")+"/"),De(a,l,e,"",function(d){return d})):a!=null&&(ei(a)&&(a=uh(a,e+(a.key==null||t&&t.key===a.key?"":(""+a.key).replace(Ic,"$&/")+"/")+i)),l.push(a)),1;i=0;var f=u===""?".":u+":";if(Fc(t))for(var c=0;ctt in ae?vm(ae,tt,{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;nt<$n;){var Wn=2*(nt+1)-1,Qc=z[Wn],_e=Wn+1,Fn=z[_e];if(0>a(Qc,N))_ea(Fn,Qc)?(z[nt]=Fn,z[_e]=N,nt=_e):(z[nt]=Qc,z[Wn]=N,nt=Wn);else if(_ea(Fn,N))z[nt]=Fn,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,ue());else{var Y=e(d);Y!==null&&Gc(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 $n=e(d);$n!==null&&Gc(T,$n.startTime-z),Y=!1}}break t}finally{m=null,y=N,v=!1}Y=void 0}}finally{Y?ue():A=!1}}}var ue;if(typeof h=="function")ue=function(){h(At)};else if(typeof MessageChannel<"u"){var L0=new MessageChannel,rm=L0.port2;L0.port1.onmessage=At,ue=function(){rm.postMessage(null)}}else ue=function(){o(At,0)};function Gc(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,Gc(T,N-nt))):(z.sortIndex=vt,l(c,z),b||v||(b=!0,A||(A=!0,ue()))),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}}}})(us),es.exports=us;var ch=es.exports,as={exports:{}},zt={};/**
+ */(function(t){function l(z,Y){var N=z.length;z.push(Y);t:for(;0>>1,mt=z[nt];if(0>>1;nt<$n;){var Wn=2*(nt+1)-1,Qc=z[Wn],_e=Wn+1,Fn=z[_e];if(0>a(Qc,N))_ea(Fn,Qc)?(z[nt]=Fn,z[_e]=N,nt=_e):(z[nt]=Qc,z[Wn]=N,nt=Wn);else if(_ea(Fn,N))z[nt]=Fn,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=[],h=1,v=null,y=3,m=!1,b=!1,T=!1,H=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,r=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 p(z){if(T=!1,S(z),!b)if(e(c)!==null)b=!0,A||(A=!0,ue());else{var Y=e(d);Y!==null&&Gc(p,Y.startTime-z)}}var A=!1,E=-1,O=5,M=-1;function R(){return H?!0:!(t.unstable_now()-Mz&&R());){var nt=v.callback;if(typeof nt=="function"){v.callback=null,y=v.priorityLevel;var mt=nt(v.expirationTime<=z);if(z=t.unstable_now(),typeof mt=="function"){v.callback=mt,S(z),Y=!0;break l}v===e(c)&&u(c),S(z)}else u(c);v=e(c)}if(v!==null)Y=!0;else{var $n=e(d);$n!==null&&Gc(p,$n.startTime-z),Y=!1}}break t}finally{v=null,y=N,m=!1}Y=void 0}}finally{Y?ue():A=!1}}}var ue;if(typeof r=="function")ue=function(){r(At)};else if(typeof MessageChannel<"u"){var Lr=new MessageChannel,vv=Lr.port2;Lr.port1.onmessage=At,ue=function(){vv.postMessage(null)}}else ue=function(){o(At,0)};function Gc(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)&&(T?(s(E),E=-1):T=!0,Gc(p,N-nt))):(z.sortIndex=mt,l(c,z),b||m||(b=!0,A||(A=!0,ue()))),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}}}})(us),es.exports=us;var c0=es.exports,as={exports:{}},zt={};/**
* @license React
* react-dom.production.js
*
@@ -22,7 +22,7 @@ var vm=Object.defineProperty;var mm=(ae,tt,Pt)=>tt in ae?vm(ae,tt,{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 sh=q;function ns(t){var l="https://react.dev/errors/"+t;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(is)}catch(t){console.error(t)}}is(),as.exports=zt;var yh=as.exports;/**
+ */var s0=q;function ns(t){var l="https://react.dev/errors/"+t;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(is)}catch(t){console.error(t)}}is(),as.exports=zt;var y0=as.exports;/**
* @license React
* react-dom-client.production.js
*
@@ -30,15 +30,15 @@ var vm=Object.defineProperty;var mm=(ae,tt,Pt)=>tt in ae?vm(ae,tt,{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=ch,fs=q,hh=yh;function g(t){var l="https://react.dev/errors/"+t;if(1He||(t.current=di[He],di[He]=null,He--)}function J(t,l){He++,di[He]=t.current,t.current=l}var al=ul(null),Ou=ul(null),Rl=ul(null),pa=ul(null);function Aa(t,l){switch(J(Rl,l),J(Ou,t),J(al,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?Xy(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=Xy(l),t=Zy(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}yt(al),J(al,t)}function Re(){yt(al),yt(Ou),yt(Rl)}function yi(t){t.memoizedState!==null&&J(pa,t);var l=al.current,e=Zy(l,t.type);l!==e&&(J(Ou,t),J(al,e))}function Oa(t){Ou.current===t&&(yt(al),yt(Ou)),pa.current===t&&(yt(pa),ra._currentValue=ne)}var hi,ms;function ie(t){if(hi===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);hi=l&&l[1]||"",ms=-1He||(t.current=di[He],di[He]=null,He--)}function J(t,l){He++,di[He]=t.current,t.current=l}var al=ul(null),Ou=ul(null),Rl=ul(null),Ta=ul(null);function Aa(t,l){switch(J(Rl,l),J(Ou,t),J(al,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?Xy(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=Xy(l),t=Zy(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}yt(al),J(al,t)}function Re(){yt(al),yt(Ou),yt(Rl)}function yi(t){t.memoizedState!==null&&J(Ta,t);var l=al.current,e=Zy(l,t.type);l!==e&&(J(Ou,t),J(al,e))}function Oa(t){Ou.current===t&&(yt(al),yt(Ou)),Ta.current===t&&(yt(Ta),ha._currentValue=ne)}var ri,vs;function ie(t){if(ri===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);ri=l&&l[1]||"",vs=-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{ri=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function gh(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 vi(t.type,!1);case 11:return vi(t.type.render,!1);case 1:return vi(t.type,!0);case 31:return ie("Activity");default:return""}}function Ss(t){try{var l="",e=null;do l+=gh(t,e),e=t,t=t.return;while(t);return l}catch(u){return`
+`);for(a=u=0;ua||c[u]!==d[a]){var h=`
+`+c[u].replace(" at new "," at ");return t.displayName&&h.includes("")&&(h=h.replace("",t.displayName)),h}while(1<=u&&0<=a);break}}}finally{hi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?ie(e):""}function g0(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 mi(t.type,!1);case 11:return mi(t.type.render,!1);case 1:return mi(t.type,!0);case 31:return ie("Activity");default:return""}}function Ss(t){try{var l="",e=null;do l+=g0(t,e),e=t,t=t.return;while(t);return l}catch(u){return`
Error generating stack: `+u.message+`
-`+u.stack}}var mi=Object.prototype.hasOwnProperty,Si=ot.unstable_scheduleCallback,gi=ot.unstable_cancelCallback,bh=ot.unstable_shouldYield,Eh=ot.unstable_requestPaint,Nt=ot.unstable_now,zh=ot.unstable_getCurrentPriorityLevel,gs=ot.unstable_ImmediatePriority,bs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,Th=ot.unstable_LowPriority,Es=ot.unstable_IdlePriority,ph=ot.log,Ah=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Nl(t){if(typeof ph=="function"&&Ah(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:Mh,Oh=Math.log,_h=Math.LN2;function Mh(t){return t>>>=0,t===0?32:31-(Oh(t)/_h|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 Dh(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 zs(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function bi(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 Uh(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 Yh=/[\n"\\]/g;function Lt(t){return t.replace(Yh,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Oi(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?_i(t,i,xt(l)):e!=null?_i(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 Bs(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?""+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),Ai(t)}function _i(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"),Ri=!1;if(yl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Ri=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Ri=!1}var Bl=null,Ni=null,Ya=null;function Xs(){if(Ya)return Ya;var t,l=Ni,e=l.length,u,a="value"in Bl?Bl.value:Bl.textContent,n=a.length;for(t=0;t=Yu),ws=" ",$s=!1;function Ws(t,l){switch(t){case"keyup":return sr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fs(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xe=!1;function dr(t,l){switch(t){case"compositionend":return Fs(l);case"keypress":return l.which!==32?null:($s=!0,ws);case"textInput":return t=l.data,t===ws&&$s?null:t;default:return null}}function yr(t,l){if(Xe)return t==="compositionend"||!Vi&&Ws(t,l)?(t=Xs(),Ya=Ni=Bl=null,Xe=!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=ao(e)}}function io(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?io(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function fo(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 Qi(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 Er=yl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Zi=!1;function co(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Zi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Qi(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,nl=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&&rl(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&&rl(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&&rl(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(ue){return l(o,ue)}),j&&rl(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===Hl&&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=Wi(h,o.mode,S),S.return=o,o=S}return i(o);case Hl: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===sl)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=$i(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=No(!0),Co=No(!1),Gl=!1;function cf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sf(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 Ql(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,Q&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),mo(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,ps(t,e)}}function of(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 df=!1;function wu(){if(df){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){df=!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?(V&y)===y:(u&y)===y){y!==0&&y===Fe&&(df=!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: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),Jl|=i,t.lanes=i,t.memoizedState=m}}function Bo(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Yo(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Hf(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=Ur(c,u);ku(t,l,r,Xt(t))}else ku(t,l,u,Xt(t))}catch(m){ku(t,l,{then:function(){},status:"rejected",reason:m},Xt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Yr(){}function Df(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=hd(t).queue;yd(t,a,l,ne,e===null?Yr:function(){return rd(t),e(u)})}function hd(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:gl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function rd(t){var l=hd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Xt())}function Uf(){return gt(ra)}function vd(){return at().memoizedState}function md(){return at().memoizedState}function qr(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Xt();t=Ql(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:uf()},t.payload=l;return}l=l.return}}function Vr(t,l,e){var u=Xt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?gd(l,e):(e=Ji(t,l,e,u),e!==null&&(Rt(e,t,u),bd(e,l,u)))}function Sd(t,l,e){var u=Xt();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))gd(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=Ji(t,l,a,u),e!==null)return Rt(e,t,u),bd(e,l,u),!0}return!1}function Hf(t,l,e,u){if(u={lane:2,revertLane:cc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ji(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 gd(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 bd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,ps(t,e)}}var Iu={readContext:gt,use:nn,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};Iu.useEffectEvent=lt;var Ed={readContext:gt,use:nn,useCallback:function(t,l){return pt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:ud,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,fd.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){Nl(!0);try{t()}finally{Nl(!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){Nl(!0);try{e(l)}finally{Nl(!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=Vr.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=pt();return t={current:t},l.memoizedState=t},useState:function(t){t=pf(t);var l=t.queue,e=Sd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:_f,useDeferredValue:function(t,l){var e=pt();return Mf(e,t,l)},useTransition:function(){var t=pf(!1);return t=yd.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));V&127||Xo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,ud(xo.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},Zo.bind(null,u,n,e,l),null),e},useId:function(){var t=pt(),l=K.identifierPrefix;if(j){var e=il,u=nl;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&&El(l)}}return k(l),Lf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&El(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Rl.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||Gy(t.nodeValue,e)),t||Vl(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=Pi(),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=Pi(),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&&yc(l.stateNode.containerInfo),k(l),null;case 10:return ml(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(et!==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;)So(e,t),e=e.sibling;return J(ut,ut.current&1|2),j&&rl(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&&rl(l,u.treeForkCount),t):(k(l),null);case 22:case 23:return jt(l),hf(),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),ml(it),k(l),null;case 25:return null;case 30:return null}throw Error(g(156,l.tag))}function Zr(t,l){switch(ki(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return ml(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 ml(l.type),null;case 22:case 23:return jt(l),hf(),t!==null&&yt(Se),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return ml(it),null;case 25:return null;default:return null}}function Ld(t,l){switch(ki(l),l.tag){case 3:ml(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:ml(l.type);break;case 22:case 23:jt(l),hf(),t!==null&&yt(Se);break;case 24:ml(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 Ll(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 Kd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Yo(l,e)}catch(u){Z(t,t.return,u)}}}function Jd(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 fl(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 wd(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 Kf(t,l,e){try{var u=t.stateNode;ov(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function $d(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&kl(t.type)||t.tag===4}function Jf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||$d(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&&kl(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 wf(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=dl));else if(u!==4&&(u===27&&kl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(wf(t,l,e),t=t.sibling;t!==null;)wf(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&&kl(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 Wd(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 zl=!1,st=!1,$f=!1,Fd=typeof WeakSet=="function"?WeakSet:Set,rt=null;function xr(t,l){if(t=t.containerInfo,vc=Vn,t=fo(t),Qi(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(mc={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=e0("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fH&&(i=H,H=p,p=i);var o=no(f,p),s=no(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=lc,lc=null;var n=$l,i=_l;if(dt=0,cu=$l=null,_l=0,Q&6)throw Error(g(331));var f=Q;if(Q|=4,fy(n.current),ay(n,n.current,i,e),Q=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,Oy(t,l)}}function My(t,l,e){l=Jt(e,l),l=Bf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),cl(t))}function Z(t,l,e){if(t.tag===3)My(t,t,e);else for(;l!==null;){if(l.tag===3){My(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(wl===null||!wl.has(u))){t=Jt(e,t),e=Dd(2),u=Xl(l,e,2),u!==null&&(Ud(e,u,l,t),Du(u,2),cl(u));break}}l=l.return}}function nc(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Jr;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)||(kf=!0,a.add(e),t=kr.bind(null,t,l,e),l.then(t,t))}function kr(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(V&e)===e&&(et===4||et===3&&(V&62914560)===V&&300>Nt()-bn?!(Q&2)&&su(t,0):If|=e,fu===V&&(fu=0)),cl(t)}function Dy(t,l){l===0&&(l=zs()),t=ye(t,l),t!==null&&(Du(t,l),cl(t))}function Ir(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Dy(t,e)}function Pr(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),Dy(t,e)}function tv(t,l){return Si(t,l)}var _n=null,du=null,ic=!1,Mn=!1,fc=!1,Fl=0;function cl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,ic||(ic=!0,ev())}function ca(t,l){if(!fc&&Mn){fc=!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,Ny(u,n))}else n=V,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Ny(u,n));u=u.next}while(e);fc=!1}}function lv(){Uy()}function Uy(){Mn=ic=!1;var t=0;Fl!==0&&yv()&&(t=Fl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=Hy(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),Fl!==0&&(Fl=0)}function Hy(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 Iy(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+'"]'),ky.has(a)||(ky.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 zv(t){Ml.D(t),Iy("dns-prefetch",t,null)}function Tv(t,l){Ml.C(t,l),Iy("preconnect",t,l)}function pv(t,l,e){Ml.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 Av(t,l){Ml.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 Ov(t,l,e){Ml.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))&&pc(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 _v(t,l){Ml.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))&&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 Mv(t,l){Ml.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))&&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 Py(t,l,e,u){var a=(a=Rl.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||Dv(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 t0(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function Dv(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 l0(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=t0(e),(a=It.get(a))&&pc(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),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 Uv(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 a0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Hv(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=t0(u),(a=It.get(a))&&pc(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 Oc=0;function Rv(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Oc?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(Nv,t),Yn=null,Bn.call(t))}function Nv(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(g0)}catch(t){console.error(t)}}g0(),ls.exports=Ea;var b0=ls.exports;const Qv=ae({__proto__:null,default:Zc(b0)},[b0]);var E0={exports:{}},Ln={};/**
+`+u.stack}}var vi=Object.prototype.hasOwnProperty,Si=ot.unstable_scheduleCallback,gi=ot.unstable_cancelCallback,b0=ot.unstable_shouldYield,E0=ot.unstable_requestPaint,Nt=ot.unstable_now,z0=ot.unstable_getCurrentPriorityLevel,gs=ot.unstable_ImmediatePriority,bs=ot.unstable_UserBlockingPriority,_a=ot.unstable_NormalPriority,p0=ot.unstable_LowPriority,Es=ot.unstable_IdlePriority,T0=ot.log,A0=ot.unstable_setDisableYieldValue,_u=null,Ct=null;function Nl(t){if(typeof T0=="function"&&A0(t),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(_u,t)}catch{}}var Bt=Math.clz32?Math.clz32:M0,O0=Math.log,_0=Math.LN2;function M0(t){return t>>>=0,t===0?32:31-(O0(t)/_0|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 D0(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 zs(){var t=Ua;return Ua<<=1,!(Ua&62914560)&&(Ua=4194304),t}function bi(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 U0(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 Y0=/[\n"\\]/g;function Lt(t){return t.replace(Y0,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Oi(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?_i(t,i,xt(l)):e!=null?_i(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 Bs(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?""+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),Ai(t)}function _i(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"),Ri=!1;if(yl)try{var Nu={};Object.defineProperty(Nu,"passive",{get:function(){Ri=!0}}),window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{Ri=!1}var Bl=null,Ni=null,Ya=null;function Xs(){if(Ya)return Ya;var t,l=Ni,e=l.length,u,a="value"in Bl?Bl.value:Bl.textContent,n=a.length;for(t=0;t=Yu),ws=" ",$s=!1;function Ws(t,l){switch(t){case"keyup":return sh.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fs(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xe=!1;function dh(t,l){switch(t){case"compositionend":return Fs(l);case"keypress":return l.which!==32?null:($s=!0,ws);case"textInput":return t=l.data,t===ws&&$s?null:t;default:return null}}function yh(t,l){if(Xe)return t==="compositionend"||!Vi&&Ws(t,l)?(t=Xs(),Ya=Ni=Bl=null,Xe=!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=ao(e)}}function io(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?io(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function fo(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 Qi(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 Eh=yl&&"documentMode"in document&&11>=document.documentMode,Ze=null,Xi=null,Gu=null,Zi=!1;function co(t,l,e){var u=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Zi||Ze==null||Ze!==Ca(u)||(u=Ze,"selectionStart"in u&&Qi(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,nl=1<<32-Bt(l)+a|e<O?(M=E,E=null):M=E.sibling;var R=y(o,E,r[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?p=R:A.sibling=R,A=R,E=M}if(O===r.length)return e(o,E),j&&hl(o,O),p;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?p=At:A.sibling=At,A=At,E=M}if(R.done)return e(o,E),j&&hl(o,O),p;if(E===null){for(;!R.done;O++,R=r.next())R=v(o,R.value,S),R!==null&&(s=n(R,s,O),A===null?p=R:A.sibling=R,A=R);return j&&hl(o,O),p}for(E=u(E);!R.done;O++,R=r.next())R=m(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?p=R:A.sibling=R,A=R);return t&&E.forEach(function(ue){return l(o,ue)}),j&&hl(o,O),p}function H(o,s,r,S){if(typeof r=="object"&&r!==null&&r.type===Ue&&r.key===null&&(r=r.props.children),typeof r=="object"&&r!==null){switch(r.$$typeof){case pa:t:{for(var p=r.key;s!==null;){if(s.key===p){if(p=r.type,p===Ue){if(s.tag===7){e(o,s.sibling),S=a(s,r.props.children),S.return=o,o=S;break t}}else if(s.elementType===p||typeof p=="object"&&p!==null&&p.$$typeof===Hl&&ge(p)===s.type){e(o,s.sibling),S=a(s,r.props),Ku(S,r),S.return=o,o=S;break t}e(o,s);break}else l(o,s);s=s.sibling}r.type===Ue?(S=re(r.props.children,o.mode,S,r.key),S.return=o,o=S):(S=Ka(r.type,r.key,r.props,null,o.mode,S),Ku(S,r),S.return=o,o=S)}return i(o);case pu:t:{for(p=r.key;s!==null;){if(s.key===p)if(s.tag===4&&s.stateNode.containerInfo===r.containerInfo&&s.stateNode.implementation===r.implementation){e(o,s.sibling),S=a(s,r.children||[]),S.return=o,o=S;break t}else{e(o,s);break}else l(o,s);s=s.sibling}S=Wi(r,o.mode,S),S.return=o,o=S}return i(o);case Hl:return r=ge(r),H(o,s,r,S)}if(Au(r))return b(o,s,r,S);if(Tu(r)){if(p=Tu(r),typeof p!="function")throw Error(g(150));return r=p.call(r),T(o,s,r,S)}if(typeof r.then=="function")return H(o,s,Ia(r),S);if(r.$$typeof===sl)return H(o,s,$a(o,r),S);Pa(o,r)}return typeof r=="string"&&r!==""||typeof r=="number"||typeof r=="bigint"?(r=""+r,s!==null&&s.tag===6?(e(o,s.sibling),S=a(s,r),S.return=o,o=S):(e(o,s),S=$i(r,o.mode,S),S.return=o,o=S),i(o)):e(o,s)}return function(o,s,r,S){try{Lu=0;var p=H(o,s,r,S);return Pe=null,p}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=No(!0),Co=No(!1),Gl=!1;function cf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sf(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 Ql(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,Q&2){var a=u.pending;return a===null?l.next=l:(l.next=a.next,a.next=l),u.pending=l,l=La(t),vo(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,Ts(t,e)}}function of(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 df=!1;function wu(){if(df){var t=ke;if(t!==null)throw t}}function $u(t,l,e,u){df=!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 h=t.alternate;h!==null&&(h=h.updateQueue,f=h.lastBaseUpdate,f!==i&&(f===null?h.firstBaseUpdate=d:f.next=d,h.lastBaseUpdate=c))}if(n!==null){var v=a.baseState;i=0,h=d=c=null,f=n;do{var y=f.lane&-536870913,m=y!==f.lane;if(m?(V&y)===y:(u&y)===y){y!==0&&y===Fe&&(df=!0),h!==null&&(h=h.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var b=t,T=f;y=l;var H=e;switch(T.tag){case 1:if(b=T.payload,typeof b=="function"){v=b.call(H,v,y);break t}v=b;break t;case 3:b.flags=b.flags&-65537|128;case 0:if(b=T.payload,y=typeof b=="function"?b.call(H,v,y):b,y==null)break t;v=W({},v,y);break t;case 2:Gl=!0}}y=f.callback,y!==null&&(t.flags|=64,m&&(t.flags|=8192),m=a.callbacks,m===null?a.callbacks=[y]:m.push(y))}else m={lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},h===null?(d=h=m,c=v):h=h.next=m,i|=y;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;m=f,f=m.next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}while(!0);h===null&&(c=v),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=h,n===null&&(a.shared.lanes=0),Jl|=i,t.lanes=i,t.memoizedState=v}}function Bo(t,l){if(typeof t!="function")throw Error(g(191,t));t.call(l)}function Yo(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=_.T,f={};_.T=f,Hf(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 h=Uh(c,u);ku(t,l,h,Xt(t))}else ku(t,l,u,Xt(t))}catch(v){ku(t,l,{then:function(){},status:"rejected",reason:v},Xt())}finally{G.p=n,i!==null&&f.types!==null&&(i.types=f.types),_.T=i}}function Yh(){}function Df(t,l,e,u){if(t.tag!==5)throw Error(g(476));var a=rd(t).queue;yd(t,a,l,ne,e===null?Yh:function(){return hd(t),e(u)})}function rd(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:gl,lastRenderedState:ne},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function hd(t){var l=rd(t);l.next===null&&(l=t.alternate.memoizedState),ku(t,l.next.queue,{},Xt())}function Uf(){return gt(ha)}function md(){return at().memoizedState}function vd(){return at().memoizedState}function qh(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Xt();t=Ql(e);var u=Xl(l,t,e);u!==null&&(Rt(u,l,e),Ju(u,l,e)),l={cache:uf()},t.payload=l;return}l=l.return}}function Vh(t,l,e){var u=Xt();e={lane:u,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},on(t)?gd(l,e):(e=Ji(t,l,e,u),e!==null&&(Rt(e,t,u),bd(e,l,u)))}function Sd(t,l,e){var u=Xt();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))gd(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=Ji(t,l,a,u),e!==null)return Rt(e,t,u),bd(e,l,u),!0}return!1}function Hf(t,l,e,u){if(u={lane:2,revertLane:cc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},on(t)){if(l)throw Error(g(479))}else l=Ji(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 gd(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 bd(t,l,e){if(e&4194048){var u=l.lanes;u&=t.pendingLanes,e|=u,l.lanes=e,Ts(t,e)}}var Iu={readContext:gt,use:nn,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};Iu.useEffectEvent=lt;var Ed={readContext:gt,use:nn,useCallback:function(t,l){return Tt().memoizedState=[t,l===void 0?null:l],t},useContext:gt,useEffect:ud,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,cn(4194308,4,fd.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=Tt();l=l===void 0?null:l;var u=t();if(ze){Nl(!0);try{t()}finally{Nl(!1)}}return e.memoizedState=[u,l],u},useReducer:function(t,l,e){var u=Tt();if(e!==void 0){var a=e(l);if(ze){Nl(!0);try{e(l)}finally{Nl(!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=Vh.bind(null,U,t),[u.memoizedState,t]},useRef:function(t){var l=Tt();return t={current:t},l.memoizedState=t},useState:function(t){t=Tf(t);var l=t.queue,e=Sd.bind(null,U,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:_f,useDeferredValue:function(t,l){var e=Tt();return Mf(e,t,l)},useTransition:function(){var t=Tf(!1);return t=yd.bind(null,U,t.queue,!0,!1),Tt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var u=U,a=Tt();if(j){if(e===void 0)throw Error(g(407));e=e()}else{if(e=l(),K===null)throw Error(g(349));V&127||Xo(u,l,e)}a.memoizedState=e;var n={value:e,getSnapshot:l};return a.queue=n,ud(xo.bind(null,u,n,t),[t]),u.flags|=2048,uu(9,{destroy:void 0},Zo.bind(null,u,n,e,l),null),e},useId:function(){var t=Tt(),l=K.identifierPrefix;if(j){var e=il,u=nl;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[vt]=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&&El(l)}}return k(l),Lf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==u&&El(l);else{if(typeof u!="string"&&l.stateNode===null)throw Error(g(166));if(t=Rl.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[vt]=l,t=!!(t.nodeValue===e||u!==null&&u.suppressHydrationWarning===!0||Gy(t.nodeValue,e)),t||Vl(l,!0)}else t=Hn(t).createTextNode(u),t[vt]=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[vt]=l}else he(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),t=!1}else e=Pi(),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[vt]=l}else he(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;k(l),a=!1}else a=Pi(),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),mn(l,l.updateQueue),k(l),null);case 4:return Re(),t===null&&yc(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(et!==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,mn(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)So(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,mn(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),rf(),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&&mn(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 Zh(t,l){switch(ki(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));he()}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));he()}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),rf(),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 Ld(t,l){switch(ki(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),rf(),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 Ll(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(h){Z(a,c,h)}}}u=u.next}while(u!==n)}}catch(h){Z(l,l.return,h)}}function Kd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{Yo(l,e)}catch(u){Z(t,t.return,u)}}}function Jd(t,l,e){e.props=pe(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 fl(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 wd(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 Kf(t,l,e){try{var u=t.stateNode;om(u,t.type,e,l),u[Ot]=l}catch(a){Z(t,t.return,a)}}function $d(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&kl(t.type)||t.tag===4}function Jf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||$d(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&&kl(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 wf(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=dl));else if(u!==4&&(u===27&&kl(t.type)&&(e=t.stateNode,l=null),t=t.child,t!==null))for(wf(t,l,e),t=t.sibling;t!==null;)wf(t,l,e),t=t.sibling}function vn(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&&kl(t.type)&&(e=t.stateNode),t=t.child,t!==null))for(vn(t,l,e),t=t.sibling;t!==null;)vn(t,l,e),t=t.sibling}function Wd(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[vt]=t,l[Ot]=e}catch(n){Z(t,t.return,n)}}var zl=!1,st=!1,$f=!1,Fd=typeof WeakSet=="function"?WeakSet:Set,ht=null;function xh(t,l){if(t=t.containerInfo,mc=Vn,t=fo(t),Qi(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,h=0,v=t,y=null;l:for(;;){for(var m;v!==e||a!==0&&v.nodeType!==3||(f=i+a),v!==n||u!==0&&v.nodeType!==3||(c=i+u),v.nodeType===3&&(i+=v.nodeValue.length),(m=v.firstChild)!==null;)y=v,v=m;for(;;){if(v===t)break l;if(y===e&&++d===a&&(f=i),y===n&&++h===u&&(c=i),(m=v.nextSibling)!==null)break;v=y,y=v.parentNode}v=m}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,ht=l;ht!==null;)if(l=ht,t=l.child,(l.subtreeFlags&1028)!==0&&t!==null)t.return=l,ht=t;else for(;ht!==null;){switch(l=ht,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[vt]=t,rt(n),u=n;break t;case"link":var i=er("link","href",a).get(u+(e.href||""));if(i){for(var f=0;fH&&(i=H,H=T,T=i);var o=no(f,T),s=no(f,H);if(o&&s&&(m.rangeCount!==1||m.anchorNode!==o.node||m.anchorOffset!==o.offset||m.focusNode!==s.node||m.focusOffset!==s.offset)){var r=v.createRange();r.setStart(o.node,o.offset),m.removeAllRanges(),T>H?(m.addRange(r),m.extend(s.node,s.offset)):(r.setEnd(s.node,s.offset),m.addRange(r))}}}}for(v=[],m=f;m=m.parentNode;)m.nodeType===1&&v.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,_.T=null,e=lc,lc=null;var n=$l,i=_l;if(dt=0,cu=$l=null,_l=0,Q&6)throw Error(g(331));var f=Q;if(Q|=4,fy(n.current),ay(n,n.current,i,e),Q=f,ca(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_u,n)}catch{}return!0}finally{G.p=a,_.T=u,Oy(t,l)}}function My(t,l,e){l=Jt(e,l),l=Bf(t.stateNode,l,2),t=Xl(t,l,2),t!==null&&(Du(t,2),cl(t))}function Z(t,l,e){if(t.tag===3)My(t,t,e);else for(;l!==null;){if(l.tag===3){My(l,t,e);break}else if(l.tag===1){var u=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(wl===null||!wl.has(u))){t=Jt(e,t),e=Dd(2),u=Xl(l,e,2),u!==null&&(Ud(e,u,l,t),Du(u,2),cl(u));break}}l=l.return}}function nc(t,l,e){var u=t.pingCache;if(u===null){u=t.pingCache=new Jh;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)||(kf=!0,a.add(e),t=kh.bind(null,t,l,e),l.then(t,t))}function kh(t,l,e){var u=t.pingCache;u!==null&&u.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,K===t&&(V&e)===e&&(et===4||et===3&&(V&62914560)===V&&300>Nt()-bn?!(Q&2)&&su(t,0):If|=e,fu===V&&(fu=0)),cl(t)}function Dy(t,l){l===0&&(l=zs()),t=ye(t,l),t!==null&&(Du(t,l),cl(t))}function Ih(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),Dy(t,e)}function Ph(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),Dy(t,e)}function tm(t,l){return Si(t,l)}var _n=null,du=null,ic=!1,Mn=!1,fc=!1,Fl=0;function cl(t){t!==du&&t.next===null&&(du===null?_n=du=t:du=du.next=t),Mn=!0,ic||(ic=!0,em())}function ca(t,l){if(!fc&&Mn){fc=!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,Ny(u,n))}else n=V,n=Ha(u,u===K?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(n&3)||Mu(u,n)||(e=!0,Ny(u,n));u=u.next}while(e);fc=!1}}function lm(){Uy()}function Uy(){Mn=ic=!1;var t=0;Fl!==0&&ym()&&(t=Fl);for(var l=Nt(),e=null,u=_n;u!==null;){var a=u.next,n=Hy(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),Fl!==0&&(Fl=0)}function Hy(t,l){for(var e=t.suspendedLanes,u=t.pingedLanes,a=t.expirationTimes,n=t.pendingLanes&-62914561;0f)break;var h=c.transferSize,v=c.initiatorType;h&&Qy(v)&&(c=c.responseEnd,i+=h*(c"u"?null:document;function Iy(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+'"]'),ky.has(a)||(ky.add(a),t={rel:t,crossOrigin:e,href:l},u.querySelector(a)===null&&(l=u.createElement("link"),Et(l,"link",t),rt(l),u.head.appendChild(l)))}}function zm(t){Ml.D(t),Iy("dns-prefetch",t,null)}function pm(t,l){Ml.C(t,l),Iy("preconnect",t,l)}function Tm(t,l,e){Ml.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=ru(t);break;case"script":n=hu(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(ra(n))||(l=u.createElement("link"),Et(l,"link",t),rt(l),u.head.appendChild(l)))}}function Am(t,l){Ml.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=hu(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(ra(n)))return}u=e.createElement("link"),Et(u,"link",t),rt(u),e.head.appendChild(u)}}}function Om(t,l,e){Ml.S(t,l,e);var u=yu;if(u&&t){var a=Ye(u).hoistableStyles,n=ru(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");rt(c),Et(c,"link",t),c._p=new Promise(function(d,h){c.onload=d,c.onerror=h}),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 _m(t,l){Ml.X(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=hu(t),n=u.get(a);n||(n=e.querySelector(ra(a)),n||(t=W({src:t,async:!0},l),(l=It.get(a))&&Ac(t,l),n=e.createElement("script"),rt(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Mm(t,l){Ml.M(t,l);var e=yu;if(e&&t){var u=Ye(e).hoistableScripts,a=hu(t),n=u.get(a);n||(n=e.querySelector(ra(a)),n||(t=W({src:t,async:!0,type:"module"},l),(l=It.get(a))&&Ac(t,l),n=e.createElement("script"),rt(n),Et(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(a,n))}}function Py(t,l,e,u){var a=(a=Rl.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=ru(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=ru(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||Dm(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=hu(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 ru(t){return'href="'+Lt(t)+'"'}function ya(t){return'link[rel="stylesheet"]['+t+"]"}function tr(t){return W({},t,{"data-precedence":t.precedence,precedence:null})}function Dm(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),rt(l),t.head.appendChild(l))}function hu(t){return'[src="'+Lt(t)+'"]'}function ra(t){return"script[async]"+t}function lr(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,rt(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"),rt(u),Et(u,"style",a),Nn(u,e.precedence,t),l.instance=u;case"stylesheet":a=ru(e.href);var n=t.querySelector(ya(a));if(n)return l.state.loading|=4,l.instance=n,rt(n),n;u=tr(e),(a=It.get(a))&&Tc(u,a),n=(t.ownerDocument||t).createElement("link"),rt(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=hu(e.src),(a=t.querySelector(ra(n)))?(l.instance=a,rt(a),a):(u=e,(a=It.get(n))&&(u=W({},e),Ac(u,a)),t=t.ownerDocument||t,a=t.createElement("script"),rt(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 Um(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 ar(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function Hm(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=ru(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,rt(n);return}n=l.ownerDocument||l,u=tr(u),(a=It.get(a))&&Tc(u,a),n=n.createElement("link"),rt(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 Oc=0;function Rm(t,l){return t.stylesheets&&t.count===0&&qn(t,t.stylesheets),0Oc?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(Nm,t),Yn=null,Bn.call(t))}function Nm(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(gr)}catch(t){console.error(t)}}gr(),ls.exports=Ea;var br=ls.exports;const Qm=ae({__proto__:null,default:Zc(br)},[br]);var Er={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 Xv=Symbol.for("react.transitional.element"),Zv=Symbol.for("react.fragment");function z0(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:Xv,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Zv,Ln.jsx=z0,Ln.jsxs=z0,E0.exports=Ln;var mu=E0.exports;const T0=q.createContext(null);function xv({namespace:t,children:l}){return mu.jsx(T0.Provider,{value:t,children:l})}function Lv(){return q.useContext(T0)}function Kv(t,l){return l?`${l}-${t}`:t}function Dl(t,l){const e=Lv();return Kv(t,l!==void 0?l:e)}const Su=new WeakMap,Nc=new Set;function p0(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Nc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Nc.add(t),u}function A0(t){const l=[];for(const e of Nc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function O0(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 p0(t,Promise.resolve(l(t)),e).promise}function _0(t,l){const e=A0(t).map(a=>a.promise);l&&e.push(l);const u=p0(t,Promise.allSettled(e).then(()=>O0(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Jv(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&A0(l).length===0)return O0(l);const u=_0(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function wv(t){const l=Su.get(t);l&&_0(t,l.promise)}function $v({id:t,tagName:l="div",namespace:e,...u}){const a=Dl(t,e),n=q.useRef(null);return q.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{Jv(i,f).catch(r=>c(r,"bindAll"))}catch(r){c(r,"bindAll")}return()=>{var r,m;wv(f);try{(m=(r=window.Shiny)==null?void 0:r.unbindAll)==null||m.call(r,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),ts.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),M0="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 Fv(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 kv(t){const l=e=>e.split(".")[0];l(t)!==l(M0)&&Fv(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${M0}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Iv(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=Wv();if(a!=null&&a.protocolVersion?kv(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 Cc=!1,Kn=!1,Jn=!1;const Bc=new Set;let D0=!1,U0=[];function Yc(){for(const t of Bc)t()}function H0(){Cc||(Cc=!0,Yc())}function R0(t){Kn!==t&&(Kn=t,Yc())}function N0(t){Jn!==t&&(Jn=t,Yc())}function Pv(){var e;if(D0||typeof document>"u")return;D0=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0);const t=tt();if(Jn=((e=t==null?void 0:t.shinyapp)==null?void 0:e.isConnected())??!1,U0=[Pt("shiny:busy",()=>R0(!0)),Pt("shiny:idle",()=>R0(!1)),Pt("shiny:connected",()=>N0(!0)),Pt("shiny:disconnected",()=>N0(!1))],t){t.initializedPromise.then(H0);return}const l=Pt("shiny:connected",()=>{var u;l(),(u=tt())==null||u.initializedPromise.then(H0)});U0.push(l)}function qc(t){return Pv(),Bc.add(t),()=>{Bc.delete(t)}}function C0(){return Cc}function B0(){return Kn}function Y0(){return Jn}class tm{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=tt();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 q0=new tm;function V0(){const t=tt();return t?t.messageRegistry??(t.messageRegistry=q0):q0}function lm(){tt()&&V0()}class em{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 um{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 em(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=tt())==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=tt();!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 am(t){const l=tt();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 Vc(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=Vc(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=tt())==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 jc=ga;class nm{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 jc(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 j0;function G0(){return j0??(j0={inputs:new nm,outputs:new um}),j0}function im(){Zt()}function Zt(){const t=tt();return t?t.reactRegistry??(t.reactRegistry=G0()):G0()}function wn(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=Dl(t,a),c=q.useRef(l).current;let d=c;const m=Zt().inputs.get(i);m&&(d=m.getValue());const[y,v]=q.useState(d),b=ee();q.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=q.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 Q0(t,l=void 0,{namespace:e}={}){const[u,a]=q.useState(l),n=ee();Oe();const i=Dl(t,e),f=q.useRef(l);return q.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function X0(t,{namespace:l}={}){const[e,u]=q.useState("pending"),a=ee();Oe();const n=Dl(t,l);return q.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function Z0(t,{namespace:l}={}){const[e,u]=q.useState(null),a=ee();Oe();const n=Dl(t,l);return q.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function fm(t,{namespace:l}={}){Oe();const e=Dl(t,l),[u,a]=q.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=ee();return q.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function cm(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=Dl(t,a),c=q.useRef(l).current,d=ee();return q.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]),q.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 sm(t,l,{namespace:e}={}){const u=ee();Oe();const a=Dl(t,e),n=q.useRef(l);n.current=l,q.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=V0();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function ee(){return q.useSyncExternalStore(qc,C0,C0)}function om(){return q.useSyncExternalStore(qc,B0,B0)}function dm(){return q.useSyncExternalStore(qc,Y0,Y0)}let x0=!1;function Oe(){x0||(im(),Iv(Zt().inputs),am(()=>Zt().outputs),lm(),x0=!0)}function ym({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Dl(t,i),c={namespace:null},[d,r]=wn(`.clientdata_output_${f}_width`,gu,c),[m,y]=wn(`.clientdata_output_${f}_height`,gu,c),[v]=wn(`.clientdata_output_${f}_hidden`,!1,c),b=Q0(f,void 0,c),p=X0(f,c),H=Z0(f,c),o=q.useRef(null),s=q.useRef(null),[h,S]=q.useState(0);q.useEffect(()=>{b&&S(A=>A+1)},[b]),q.useEffect(()=>{n&&n(p==="recalculating")},[p,n]);const T=q.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(r(A),y(E))}},[r,y]);if(q.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",T);const E=Vc(()=>{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]),q.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=Vc(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 hm(){window.shinyreact={useSetShinyInput:cm,useShinyBusy:om,useShinyConnected:dm,useShinyInput:wn,useShinyInputValue:fm,useShinyOutputError:Z0,useShinyOutputStatus:X0,useShinyOutputValue:Q0,useShinyMessageHandler:sm,useShinyInitialized:ee,ImageOutput:ym,MISSING:gu,ShinyModuleProvider:xv,ShinyOutput:$v,React:ts,ReactDOM:Qv}}hm(),K0()})();
+ */var Xm=Symbol.for("react.transitional.element"),Zm=Symbol.for("react.fragment");function zr(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:Xm,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Zm,Ln.jsx=zr,Ln.jsxs=zr,Er.exports=Ln;var vu=Er.exports;const pr=q.createContext(null);function xm({namespace:t,children:l}){return vu.jsx(pr.Provider,{value:t,children:l})}function Lm(){return q.useContext(pr)}function Km(t,l){return l?`${l}-${t}`:t}function Dl(t,l){const e=Lm();return Km(t,l!==void 0?l:e)}const Su=new WeakMap,Nc=new Set;function Tr(t,l,e){const u={promise:l.finally(()=>{Su.get(t)===u&&(Su.delete(t),Nc.delete(t))}),covers:e,consumed:!1};return Su.set(t,u),Nc.add(t),u}function Ar(t){const l=[];for(const e of Nc){if(e===t||!e.contains(t)&&!t.contains(e))continue;const u=Su.get(e);u&&l.push(u)}return l}function Or(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 Tr(t,Promise.resolve(l(t)),e).promise}function _r(t,l){const e=Ar(t).map(a=>a.promise);l&&e.push(l);const u=Tr(t,Promise.allSettled(e).then(()=>Or(t)),null);return u.promise.catch(a=>{u.consumed||console.error("[shinyreact] ShinyOutput bindAll failed:",a)}),u}function Jm(t,l){const e=Su.get(l);if(e&&(!e.covers||e.covers.has(t)))return e.consumed=!0,e.promise;if(!e&&Ar(l).length===0)return Or(l);const u=_r(l,e==null?void 0:e.promise);return u.consumed=!0,u.promise}function wm(t){const l=Su.get(t);l&&_r(t,l.promise)}function $m({id:t,tagName:l="div",namespace:e,...u}){const a=Dl(t,e),n=q.useRef(null);return q.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=(h,v)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${v} failed:`,{id:a,phase:v,error:h})};try{Jm(i,f).catch(h=>c(h,"bindAll"))}catch(h){c(h,"bindAll")}return()=>{var h,v;wm(f);try{(v=(h=window.Shiny)==null?void 0:h.unbindAll)==null||v.call(h,i,!0)}catch(y){c(y,"unbindAll")}}},[a,l]),ts.createElement(l,{id:a,ref:n,...u})}const gu=Symbol("MISSING"),Mr="1.0";function Wm(){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 Fm(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 km(t){const l=e=>e.split(".")[0];l(t)!==l(Mr)&&Fm(`shinyreact protocol mismatch: the server speaks protocol \`${t}\` but this JS client supports \`${Mr}\`. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Im(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=Wm();if(a!=null&&a.protocolVersion?km(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 Cc=!1,Kn=!1,Jn=!1;const Bc=new Set;let Dr=!1,Ur=[];function Yc(){for(const t of Bc)t()}function Hr(){Cc||(Cc=!0,Yc())}function Rr(t){Kn!==t&&(Kn=t,Yc())}function Nr(t){Jn!==t&&(Jn=t,Yc())}function Pm(){var e;if(Dr||typeof document>"u")return;Dr=!0,document.documentElement.classList.contains("shiny-busy")&&(Kn=!0);const t=tt();if(Jn=((e=t==null?void 0:t.shinyapp)==null?void 0:e.isConnected())??!1,Ur=[Pt("shiny:busy",()=>Rr(!0)),Pt("shiny:idle",()=>Rr(!1)),Pt("shiny:connected",()=>Nr(!0)),Pt("shiny:disconnected",()=>Nr(!1))],t){t.initializedPromise.then(Hr);return}const l=Pt("shiny:connected",()=>{var u;l(),(u=tt())==null||u.initializedPromise.then(Hr)});Ur.push(l)}function qc(t){return Pm(),Bc.add(t),()=>{Bc.delete(t)}}function Cr(){return Cc}function Br(){return Kn}function Yr(){return Jn}class tv{constructor(){I(this,"messageHandlers",new Map);I(this,"initialized",!1)}init(){if(this.initialized)return;const l=tt();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 qr=new tv;function Vr(){const t=tt();return t?t.messageRegistry??(t.messageRegistry=qr):qr}function lv(){tt()&&Vr()}class ev{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 uv{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 ev(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=tt())==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=tt();!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 av(t){const l=tt();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 Vc(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=Vc(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=tt())==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 jc=ga;class nv{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 jc(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 jr;function Gr(){return jr??(jr={inputs:new nv,outputs:new uv}),jr}function iv(){Zt()}function Zt(){const t=tt();return t?t.reactRegistry??(t.reactRegistry=Gr()):Gr()}function wn(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=Dl(t,a),c=q.useRef(l).current;let d=c;const v=Zt().inputs.get(i);v&&(d=v.getValue());const[y,m]=q.useState(d),b=ee();q.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(m),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(m)}},[i,b,e,u,c,n]);const T=q.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,T]}const bu=()=>{};function Qr(t,l=void 0,{namespace:e}={}){const[u,a]=q.useState(l),n=ee();Oe();const i=Dl(t,e),f=q.useRef(l);return q.useEffect(()=>{if(!n)return;const c=Zt();return a(f.current),c.outputs.add(i,a,bu,bu)},[i,n]),u}function Xr(t,{namespace:l}={}){const[e,u]=q.useState("pending"),a=ee();Oe();const n=Dl(t,l);return q.useEffect(()=>a?Zt().outputs.add(n,bu,u,bu):void 0,[n,a]),e}function Zr(t,{namespace:l}={}){const[e,u]=q.useState(null),a=ee();Oe();const n=Dl(t,l);return q.useEffect(()=>a?(u(null),Zt().outputs.add(n,bu,bu,u)):void 0,[n,a]),e}function fv(t,{namespace:l}={}){Oe();const e=Dl(t,l),[u,a]=q.useState(()=>{const i=Zt().inputs.get(e);if(!i)return;const f=i.getValue();return f===gu?void 0:f}),n=ee();return q.useEffect(()=>n?Zt().inputs.subscribe(e,c=>{a(c===gu?void 0:c)}):void 0,[e,n]),u}function cv(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=Dl(t,a),c=q.useRef(l).current,d=ee();return q.useEffect(()=>{if(!d)return;const v=Zt().inputs.getOrCreate(i,c);e!==void 0&&v.updateDebounceDelay(e),u&&v.updatePriority(u),v.updateType(n),v.setValue(v.getValue())},[i,d,e,u,c,n]),q.useCallback(h=>{if(!d)return;const y=Zt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(h)},[i,d])}function sv(t,l,{namespace:e}={}){const u=ee();Oe();const a=Dl(t,e),n=q.useRef(l);n.current=l,q.useEffect(()=>{if(!u||!a)return;const i=c=>n.current(c),f=Vr();return f.addHandler(a,i),()=>{f.removeHandler(a,i)}},[u,a])}function ee(){return q.useSyncExternalStore(qc,Cr,Cr)}function ov(){return q.useSyncExternalStore(qc,Br,Br)}function dv(){return q.useSyncExternalStore(qc,Yr,Yr)}let xr=!1;function Oe(){xr||(iv(),Im(Zt().inputs),av(()=>Zt().outputs),lv(),xr=!0)}function yv({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const f=Dl(t,i),c={namespace:null},[d,h]=wn(`.clientdata_output_${f}_width`,gu,c),[v,y]=wn(`.clientdata_output_${f}_height`,gu,c),[m]=wn(`.clientdata_output_${f}_hidden`,!1,c),b=Qr(f,void 0,c),T=Xr(f,c),H=Zr(f,c),o=q.useRef(null),s=q.useRef(null),[r,S]=q.useState(0);q.useEffect(()=>{b&&S(A=>A+1)},[b]),q.useEffect(()=>{n&&n(T==="recalculating")},[T,n]);const p=q.useCallback(()=>{if(o.current){const A=o.current.clientWidth,E=o.current.clientHeight;A>0&&E>0&&(h(A),y(E))}},[h,y]);if(q.useEffect(()=>{const A=o.current;if(!A)return;A.addEventListener("load",p);const E=Vc(()=>{A&&A.complete&&p()},a),O=new ResizeObserver(M=>{for(const R of M)R.target===A&&E()});return O.observe(A),()=>{A.removeEventListener("load",p),O.disconnect(),E.cancel()}},[o,r,h,y,a,p]),q.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&&(h(R),y(At))};E();const O=Vc(E,a),M=new ResizeObserver(()=>O());return M.observe(A),()=>{M.disconnect(),O.cancel()}},[b,H,h,y,a]),m)return null;if(H){const A=["shiny-output-error",...[].concat(H.type??[]).map(E=>`shiny-output-error-${E}`),l];return vu.jsx("div",{ref:s,className:A.filter(Boolean).join(" "),style:{width:e,height:u},children:H.message})}return b?vu.jsx("img",{ref:o,src:b.src,alt:b.alt??"",className:l,style:{width:e,height:u},onLoad:p}):vu.jsx("div",{ref:s,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:vu.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:vu.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}function rv(){window.shinyreact={useSetShinyInput:cv,useShinyBusy:ov,useShinyConnected:dv,useShinyInput:wn,useShinyInputValue:fv,useShinyOutputError:Zr,useShinyOutputStatus:Xr,useShinyOutputValue:Qr,useShinyMessageHandler:sv,useShinyInitialized:ee,ImageOutput:yv,MISSING:gu,ShinyModuleProvider:xm,ShinyOutput:$m,React:ts,ReactDOM:Qm}}const hv="[shinyreact] Shiny tried to open a Bootstrap modal, but this page has no Bootstrap. If you are bookmarking, register your own callback: onBookmarked(function(url) updateQueryString(url)) in R, or session.bookmark.on_bookmarked(session.bookmark.update_query_string) in Python. For showModal() / modal_show(), build the dialog in React instead.";function mv(){if(typeof window>"u")return;const t=window.jQuery;!(t!=null&&t.fn)||t.fn.modal||(t.fn.modal=function(){return console.error(hv),this})}rv(),Kr(),mv()})();
diff --git a/pkg-r/inst/skills/shinyreact-build-app/SKILL.md b/pkg-r/inst/skills/shinyreact-build-app/SKILL.md
index 3377eefb..6f78f0fa 100644
--- a/pkg-r/inst/skills/shinyreact-build-app/SKILL.md
+++ b/pkg-r/inst/skills/shinyreact-build-app/SKILL.md
@@ -353,6 +353,9 @@ per-card state, because *any* output recomputing makes it `true`: use
`ReactApp(server, bookmark_store="url")`, `[r]` `enableBookmarking = "url"`
with a per-request UI function) and the client needs no code at all:
restored values seed `useShinyInput` initial values before the first paint.
+The server **must** register an `onBookmarked()` / `on_bookmarked()` callback
+(usually `updateQueryString()`): Shiny's default is a Bootstrap modal, which a
+`page_react()` page cannot open.
See [`references/bookmarking.md`](references/bookmarking.md).
**Typed inputs** — `useShinyInput(id, default, { type: "shiny.datetime" })`
diff --git a/pkg-r/inst/skills/shinyreact-build-app/references/bookmarking.md b/pkg-r/inst/skills/shinyreact-build-app/references/bookmarking.md
index fd43f277..470313aa 100644
--- a/pkg-r/inst/skills/shinyreact-build-app/references/bookmarking.md
+++ b/pkg-r/inst/skills/shinyreact-build-app/references/bookmarking.md
@@ -12,8 +12,26 @@ app = ReactApp(server, bookmark_store="url")
shinyApp(ui = function(req) page_react(), server, enableBookmarking = "url")
```
+**Register an `on_bookmarked()` callback — this is required.** With none,
+Shiny shows the bookmark URL in a Bootstrap modal, and `page_react()` loads no
+Bootstrap, so the modal cannot open (the browser console logs a `[shinyreact]`
+error saying so). Writing the URL to the address bar is the usual choice:
+
+```python
+# [py]
+session.bookmark.on_bookmarked(session.bookmark.update_query_string)
+```
+```r
+# [r] -- inside server()
+onBookmarked(function(url) updateQueryString(url))
+```
+
+Or show the URL your own way — a React dialog fed by `send_message()`, a copy
+button — from the same callback.
+
Trigger it from an action-button input (`[py]` `await session.bookmark()`,
-`[r]` `session$doBookmark()`), which rewrites the browser URL. On a later visit to that URL the page entry point
+`[r]` `session$doBookmark()`), which runs that callback. On a later visit to
+that URL the page entry point
embeds the saved values in the page, and the client seeds `useShinyInput`
initial values from them **before the first paint** — so a bookmarked link
renders restored state directly, with no flash of the defaults and no
diff --git a/pkg-r/vignettes/shinyreact.Rmd b/pkg-r/vignettes/shinyreact.Rmd
index af07f8be..29eed525 100644
--- a/pkg-r/vignettes/shinyreact.Rmd
+++ b/pkg-r/vignettes/shinyreact.Rmd
@@ -184,6 +184,18 @@ Pass `enableBookmarking = "url"` (or `"server"`) to `shinyApp()` as usual.
Restored input values are embedded in the page, and `useShinyInput()` uses
them as initial values instead of its default.
+You must also register an `onBookmarked()` callback. Without one, Shiny shows
+the bookmark URL in a Bootstrap modal, and `page_react()` loads no Bootstrap,
+so the modal cannot open (the browser console says so). Writing the URL to
+the address bar is the usual choice:
+
+```r
+server <- function(input, output, session) {
+ onBookmarked(function(url) updateQueryString(url))
+ observeEvent(input$bookmark, session$doBookmark())
+}
+```
+
## Next steps
- [TSX files and JavaScript build tools](https://posit-dev.github.io/shinyreact/articles/tsx-and-build-tools.html)