meldivo 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,80 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CeWj4ejR.js","assets/_commonjsHelpers-CqkleIqs.js","assets/browser-CujOq0-h.js"])))=>i.map(i=>d[i]);
2
- var Ed=Object.defineProperty;var _d=(c,o,u)=>o in c?Ed(c,o,{enumerable:!0,configurable:!0,writable:!0,value:u}):c[o]=u;var X=(c,o,u)=>_d(c,typeof o!="symbol"?o+"":o,u);(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))w(p);new MutationObserver(p=>{for(const E of p)if(E.type==="childList")for(const x of E.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&w(x)}).observe(document,{childList:!0,subtree:!0});function u(p){const E={};return p.integrity&&(E.integrity=p.integrity),p.referrerPolicy&&(E.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?E.credentials="include":p.crossOrigin==="anonymous"?E.credentials="omit":E.credentials="same-origin",E}function w(p){if(p.ep)return;p.ep=!0;const E=u(p);fetch(p.href,E)}})();var Fs={exports:{}},Ul={},Ds={exports:{}},de={};/**
3
- * @license React
4
- * react.production.min.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var dc;function Cd(){if(dc)return de;dc=1;var c=Symbol.for("react.element"),o=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),x=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),$=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),W=Symbol.iterator;function F(h){return h===null||typeof h!="object"?null:(h=W&&h[W]||h["@@iterator"],typeof h=="function"?h:null)}var Y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},J=Object.assign,le={};function G(h,_,re){this.props=h,this.context=_,this.refs=le,this.updater=re||Y}G.prototype.isReactComponent={},G.prototype.setState=function(h,_){if(typeof h!="object"&&typeof h!="function"&&h!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,h,_,"setState")},G.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};function me(){}me.prototype=G.prototype;function Ce(h,_,re){this.props=h,this.context=_,this.refs=le,this.updater=re||Y}var Ne=Ce.prototype=new me;Ne.constructor=Ce,J(Ne,G.prototype),Ne.isPureReactComponent=!0;var K=Array.isArray,ae=Object.prototype.hasOwnProperty,ce={current:null},ee={key:!0,ref:!0,__self:!0,__source:!0};function Se(h,_,re){var se,ue={},pe=null,fe=null;if(_!=null)for(se in _.ref!==void 0&&(fe=_.ref),_.key!==void 0&&(pe=""+_.key),_)ae.call(_,se)&&!ee.hasOwnProperty(se)&&(ue[se]=_[se]);var ve=arguments.length-2;if(ve===1)ue.children=re;else if(1<ve){for(var _e=Array(ve),ct=0;ct<ve;ct++)_e[ct]=arguments[ct+2];ue.children=_e}if(h&&h.defaultProps)for(se in ve=h.defaultProps,ve)ue[se]===void 0&&(ue[se]=ve[se]);return{$$typeof:c,type:h,key:pe,ref:fe,props:ue,_owner:ce.current}}function Ie(h,_){return{$$typeof:c,type:h.type,key:_,ref:h.ref,props:h.props,_owner:h._owner}}function Je(h){return typeof h=="object"&&h!==null&&h.$$typeof===c}function Be(h){var _={"=":"=0",":":"=2"};return"$"+h.replace(/[=:]/g,function(re){return _[re]})}var U=/\/+/g;function we(h,_){return typeof h=="object"&&h!==null&&h.key!=null?Be(""+h.key):_.toString(36)}function Ve(h,_,re,se,ue){var pe=typeof h;(pe==="undefined"||pe==="boolean")&&(h=null);var fe=!1;if(h===null)fe=!0;else switch(pe){case"string":case"number":fe=!0;break;case"object":switch(h.$$typeof){case c:case o:fe=!0}}if(fe)return fe=h,ue=ue(fe),h=se===""?"."+we(fe,0):se,K(ue)?(re="",h!=null&&(re=h.replace(U,"$&/")+"/"),Ve(ue,_,re,"",function(ct){return ct})):ue!=null&&(Je(ue)&&(ue=Ie(ue,re+(!ue.key||fe&&fe.key===ue.key?"":(""+ue.key).replace(U,"$&/")+"/")+h)),_.push(ue)),1;if(fe=0,se=se===""?".":se+":",K(h))for(var ve=0;ve<h.length;ve++){pe=h[ve];var _e=se+we(pe,ve);fe+=Ve(pe,_,re,_e,ue)}else if(_e=F(h),typeof _e=="function")for(h=_e.call(h),ve=0;!(pe=h.next()).done;)pe=pe.value,_e=se+we(pe,ve++),fe+=Ve(pe,_,re,_e,ue);else if(pe==="object")throw _=String(h),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.");return fe}function at(h,_,re){if(h==null)return h;var se=[],ue=0;return Ve(h,se,"","",function(pe){return _.call(re,pe,ue++)}),se}function qe(h){if(h._status===-1){var _=h._result;_=_(),_.then(function(re){(h._status===0||h._status===-1)&&(h._status=1,h._result=re)},function(re){(h._status===0||h._status===-1)&&(h._status=2,h._result=re)}),h._status===-1&&(h._status=0,h._result=_)}if(h._status===1)return h._result.default;throw h._result}var Ee={current:null},O={transition:null},b={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:O,ReactCurrentOwner:ce};function I(){throw Error("act(...) is not supported in production builds of React.")}return de.Children={map:at,forEach:function(h,_,re){at(h,function(){_.apply(this,arguments)},re)},count:function(h){var _=0;return at(h,function(){_++}),_},toArray:function(h){return at(h,function(_){return _})||[]},only:function(h){if(!Je(h))throw Error("React.Children.only expected to receive a single React element child.");return h}},de.Component=G,de.Fragment=u,de.Profiler=p,de.PureComponent=Ce,de.StrictMode=w,de.Suspense=A,de.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b,de.act=I,de.cloneElement=function(h,_,re){if(h==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+h+".");var se=J({},h.props),ue=h.key,pe=h.ref,fe=h._owner;if(_!=null){if(_.ref!==void 0&&(pe=_.ref,fe=ce.current),_.key!==void 0&&(ue=""+_.key),h.type&&h.type.defaultProps)var ve=h.type.defaultProps;for(_e in _)ae.call(_,_e)&&!ee.hasOwnProperty(_e)&&(se[_e]=_[_e]===void 0&&ve!==void 0?ve[_e]:_[_e])}var _e=arguments.length-2;if(_e===1)se.children=re;else if(1<_e){ve=Array(_e);for(var ct=0;ct<_e;ct++)ve[ct]=arguments[ct+2];se.children=ve}return{$$typeof:c,type:h.type,key:ue,ref:pe,props:se,_owner:fe}},de.createContext=function(h){return h={$$typeof:x,_currentValue:h,_currentValue2:h,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},h.Provider={$$typeof:E,_context:h},h.Consumer=h},de.createElement=Se,de.createFactory=function(h){var _=Se.bind(null,h);return _.type=h,_},de.createRef=function(){return{current:null}},de.forwardRef=function(h){return{$$typeof:j,render:h}},de.isValidElement=Je,de.lazy=function(h){return{$$typeof:Z,_payload:{_status:-1,_result:h},_init:qe}},de.memo=function(h,_){return{$$typeof:$,type:h,compare:_===void 0?null:_}},de.startTransition=function(h){var _=O.transition;O.transition={};try{h()}finally{O.transition=_}},de.unstable_act=I,de.useCallback=function(h,_){return Ee.current.useCallback(h,_)},de.useContext=function(h){return Ee.current.useContext(h)},de.useDebugValue=function(){},de.useDeferredValue=function(h){return Ee.current.useDeferredValue(h)},de.useEffect=function(h,_){return Ee.current.useEffect(h,_)},de.useId=function(){return Ee.current.useId()},de.useImperativeHandle=function(h,_,re){return Ee.current.useImperativeHandle(h,_,re)},de.useInsertionEffect=function(h,_){return Ee.current.useInsertionEffect(h,_)},de.useLayoutEffect=function(h,_){return Ee.current.useLayoutEffect(h,_)},de.useMemo=function(h,_){return Ee.current.useMemo(h,_)},de.useReducer=function(h,_,re){return Ee.current.useReducer(h,_,re)},de.useRef=function(h){return Ee.current.useRef(h)},de.useState=function(h){return Ee.current.useState(h)},de.useSyncExternalStore=function(h,_,re){return Ee.current.useSyncExternalStore(h,_,re)},de.useTransition=function(){return Ee.current.useTransition()},de.version="18.3.1",de}var pc;function qs(){return pc||(pc=1,Ds.exports=Cd()),Ds.exports}/**
11
- * @license React
12
- * react-jsx-runtime.production.min.js
13
- *
14
- * Copyright (c) Facebook, Inc. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var hc;function Nd(){if(hc)return Ul;hc=1;var c=qs(),o=Symbol.for("react.element"),u=Symbol.for("react.fragment"),w=Object.prototype.hasOwnProperty,p=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function x(j,A,$){var Z,W={},F=null,Y=null;$!==void 0&&(F=""+$),A.key!==void 0&&(F=""+A.key),A.ref!==void 0&&(Y=A.ref);for(Z in A)w.call(A,Z)&&!E.hasOwnProperty(Z)&&(W[Z]=A[Z]);if(j&&j.defaultProps)for(Z in A=j.defaultProps,A)W[Z]===void 0&&(W[Z]=A[Z]);return{$$typeof:o,type:j,key:F,ref:Y,props:W,_owner:p.current}}return Ul.Fragment=u,Ul.jsx=x,Ul.jsxs=x,Ul}var mc;function Pd(){return mc||(mc=1,Fs.exports=Nd()),Fs.exports}var y=Pd(),Ji={},Is={exports:{}},Et={},As={exports:{}},Us={};/**
19
- * @license React
20
- * scheduler.production.min.js
21
- *
22
- * Copyright (c) Facebook, Inc. and its affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var vc;function Rd(){return vc||(vc=1,(function(c){function o(O,b){var I=O.length;O.push(b);e:for(;0<I;){var h=I-1>>>1,_=O[h];if(0<p(_,b))O[h]=b,O[I]=_,I=h;else break e}}function u(O){return O.length===0?null:O[0]}function w(O){if(O.length===0)return null;var b=O[0],I=O.pop();if(I!==b){O[0]=I;e:for(var h=0,_=O.length,re=_>>>1;h<re;){var se=2*(h+1)-1,ue=O[se],pe=se+1,fe=O[pe];if(0>p(ue,I))pe<_&&0>p(fe,ue)?(O[h]=fe,O[pe]=I,h=pe):(O[h]=ue,O[se]=I,h=se);else if(pe<_&&0>p(fe,I))O[h]=fe,O[pe]=I,h=pe;else break e}}return b}function p(O,b){var I=O.sortIndex-b.sortIndex;return I!==0?I:O.id-b.id}if(typeof performance=="object"&&typeof performance.now=="function"){var E=performance;c.unstable_now=function(){return E.now()}}else{var x=Date,j=x.now();c.unstable_now=function(){return x.now()-j}}var A=[],$=[],Z=1,W=null,F=3,Y=!1,J=!1,le=!1,G=typeof setTimeout=="function"?setTimeout:null,me=typeof clearTimeout=="function"?clearTimeout:null,Ce=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ne(O){for(var b=u($);b!==null;){if(b.callback===null)w($);else if(b.startTime<=O)w($),b.sortIndex=b.expirationTime,o(A,b);else break;b=u($)}}function K(O){if(le=!1,Ne(O),!J)if(u(A)!==null)J=!0,qe(ae);else{var b=u($);b!==null&&Ee(K,b.startTime-O)}}function ae(O,b){J=!1,le&&(le=!1,me(Se),Se=-1),Y=!0;var I=F;try{for(Ne(b),W=u(A);W!==null&&(!(W.expirationTime>b)||O&&!Be());){var h=W.callback;if(typeof h=="function"){W.callback=null,F=W.priorityLevel;var _=h(W.expirationTime<=b);b=c.unstable_now(),typeof _=="function"?W.callback=_:W===u(A)&&w(A),Ne(b)}else w(A);W=u(A)}if(W!==null)var re=!0;else{var se=u($);se!==null&&Ee(K,se.startTime-b),re=!1}return re}finally{W=null,F=I,Y=!1}}var ce=!1,ee=null,Se=-1,Ie=5,Je=-1;function Be(){return!(c.unstable_now()-Je<Ie)}function U(){if(ee!==null){var O=c.unstable_now();Je=O;var b=!0;try{b=ee(!0,O)}finally{b?we():(ce=!1,ee=null)}}else ce=!1}var we;if(typeof Ce=="function")we=function(){Ce(U)};else if(typeof MessageChannel<"u"){var Ve=new MessageChannel,at=Ve.port2;Ve.port1.onmessage=U,we=function(){at.postMessage(null)}}else we=function(){G(U,0)};function qe(O){ee=O,ce||(ce=!0,we())}function Ee(O,b){Se=G(function(){O(c.unstable_now())},b)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(O){O.callback=null},c.unstable_continueExecution=function(){J||Y||(J=!0,qe(ae))},c.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ie=0<O?Math.floor(1e3/O):5},c.unstable_getCurrentPriorityLevel=function(){return F},c.unstable_getFirstCallbackNode=function(){return u(A)},c.unstable_next=function(O){switch(F){case 1:case 2:case 3:var b=3;break;default:b=F}var I=F;F=b;try{return O()}finally{F=I}},c.unstable_pauseExecution=function(){},c.unstable_requestPaint=function(){},c.unstable_runWithPriority=function(O,b){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var I=F;F=O;try{return b()}finally{F=I}},c.unstable_scheduleCallback=function(O,b,I){var h=c.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?h+I:h):I=h,O){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=I+_,O={id:Z++,callback:b,priorityLevel:O,startTime:I,expirationTime:_,sortIndex:-1},I>h?(O.sortIndex=I,o($,O),u(A)===null&&O===u($)&&(le?(me(Se),Se=-1):le=!0,Ee(K,I-h))):(O.sortIndex=_,o(A,O),J||Y||(J=!0,qe(ae))),O},c.unstable_shouldYield=Be,c.unstable_wrapCallback=function(O){var b=F;return function(){var I=F;F=b;try{return O.apply(this,arguments)}finally{F=I}}}})(Us)),Us}var gc;function Td(){return gc||(gc=1,As.exports=Rd()),As.exports}/**
27
- * @license React
28
- * react-dom.production.min.js
29
- *
30
- * Copyright (c) Facebook, Inc. and its affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var yc;function jd(){if(yc)return Et;yc=1;var c=qs(),o=Td();function u(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var w=new Set,p={};function E(e,t){x(e,t),x(e+"Capture",t)}function x(e,t){for(p[e]=t,e=0;e<t.length;e++)w.add(t[e])}var j=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),A=Object.prototype.hasOwnProperty,$=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Z={},W={};function F(e){return A.call(W,e)?!0:A.call(Z,e)?!1:$.test(e)?W[e]=!0:(Z[e]=!0,!1)}function Y(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function J(e,t,n,r){if(t===null||typeof t>"u"||Y(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function le(e,t,n,r,l,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var G={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){G[e]=new le(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];G[t]=new le(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){G[e]=new le(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){G[e]=new le(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){G[e]=new le(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){G[e]=new le(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){G[e]=new le(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){G[e]=new le(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){G[e]=new le(e,5,!1,e.toLowerCase(),null,!1,!1)});var me=/[\-:]([a-z])/g;function Ce(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(me,Ce);G[t]=new le(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(me,Ce);G[t]=new le(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(me,Ce);G[t]=new le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){G[e]=new le(e,1,!1,e.toLowerCase(),null,!1,!1)}),G.xlinkHref=new le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){G[e]=new le(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ne(e,t,n,r){var l=G.hasOwnProperty(t)?G[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(J(t,n,l,r)&&(n=null),r||l===null?F(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var K=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ae=Symbol.for("react.element"),ce=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),Se=Symbol.for("react.strict_mode"),Ie=Symbol.for("react.profiler"),Je=Symbol.for("react.provider"),Be=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),Ve=Symbol.for("react.suspense_list"),at=Symbol.for("react.memo"),qe=Symbol.for("react.lazy"),Ee=Symbol.for("react.offscreen"),O=Symbol.iterator;function b(e){return e===null||typeof e!="object"?null:(e=O&&e[O]||e["@@iterator"],typeof e=="function"?e:null)}var I=Object.assign,h;function _(e){if(h===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);h=t&&t[1]||""}return`
35
- `+h+e}var re=!1;function se(e,t){if(!e||re)return"";re=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(S){var r=S}Reflect.construct(e,[],t)}else{try{t.call()}catch(S){r=S}e.call(t.prototype)}else{try{throw Error()}catch(S){r=S}e()}}catch(S){if(S&&r&&typeof S.stack=="string"){for(var l=S.stack.split(`
36
- `),i=r.stack.split(`
37
- `),s=l.length-1,a=i.length-1;1<=s&&0<=a&&l[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(l[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||l[s]!==i[a]){var f=`
38
- `+l[s].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=s&&0<=a);break}}}finally{re=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_(e):""}function ue(e){switch(e.tag){case 5:return _(e.type);case 16:return _("Lazy");case 13:return _("Suspense");case 19:return _("SuspenseList");case 0:case 2:case 15:return e=se(e.type,!1),e;case 11:return e=se(e.type.render,!1),e;case 1:return e=se(e.type,!0),e;default:return""}}function pe(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ee:return"Fragment";case ce:return"Portal";case Ie:return"Profiler";case Se:return"StrictMode";case we:return"Suspense";case Ve:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Be:return(e.displayName||"Context")+".Consumer";case Je:return(e._context.displayName||"Context")+".Provider";case U:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case at:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case qe:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}function fe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(t);case 8:return t===Se?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ve(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _e(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ct(e){var t=_e(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sn(e){e._valueTracker||(e._valueTracker=ct(e))}function Wl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_e(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function be(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Kn(e,t){var n=t.checked;return I({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jr(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ve(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function hr(e,t){t=t.checked,t!=null&&Ne(e,"checked",t,!1)}function ft(e,t){hr(e,t);var n=ve(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$t(e,t.type,n):t.hasOwnProperty("defaultValue")&&$t(e,t.type,ve(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hl(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $t(e,t,n){(t!=="number"||be(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var kn=Array.isArray;function xn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ve(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function mr(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(u(91));return I({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function br(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(u(92));if(kn(n)){if(1<n.length)throw Error(u(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ve(n)}}function qn(e,t){var n=ve(t.value),r=ve(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ql(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function En(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function vr(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?En(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yn,gr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Yn=Yn||document.createElement("div"),Yn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _n(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Bt=["Webkit","ms","Moz","O"];Object.keys(Cn).forEach(function(e){Bt.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cn[t]=Cn[e]})});function el(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cn.hasOwnProperty(e)&&Cn[e]?(""+t).trim():t+"px"}function Gn(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=el(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var yr=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xn(e,t){if(t){if(yr[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function tl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nl=null;function un(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nn=null,Wt=null,an=null;function rl(e){if(e=_l(e)){if(typeof Nn!="function")throw Error(u(280));var t=e.stateNode;t&&(t=pi(t),Nn(e.stateNode,e.type,t))}}function ll(e){Wt?an?an.push(e):an=[e]:Wt=e}function Ht(){if(Wt){var e=Wt,t=an;if(an=Wt=null,rl(e),t)for(e=0;e<t.length;e++)rl(t[e])}}function _t(e,t){return e(t)}function zt(){}var Pn=!1;function Zn(e,t,n){if(Pn)return e(t,n);Pn=!0;try{return _t(e,t,n)}finally{Pn=!1,(Wt!==null||an!==null)&&(zt(),Ht())}}function dt(e,t){var n=e.stateNode;if(n===null)return null;var r=pi(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var mt=!1;if(j)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){mt=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch{mt=!1}function il(e,t,n,r,l,i,s,a,f){var S=Array.prototype.slice.call(arguments,3);try{t.apply(n,S)}catch(N){this.onError(N)}}var Jn=!1,Ct=null,wr=!1,vt=null,Lt={onError:function(e){Jn=!0,Ct=e}};function Sr(e,t,n,r,l,i,s,a,f){Jn=!1,Ct=null,il.apply(Lt,arguments)}function Rn(e,t,n,r,l,i,s,a,f){if(Sr.apply(this,arguments),Jn){if(Jn){var S=Ct;Jn=!1,Ct=null}else throw Error(u(198));wr||(wr=!0,vt=S)}}function cn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Qt(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Kl(e){if(cn(e)!==e)throw Error(u(188))}function ql(e){var t=e.alternate;if(!t){if(t=cn(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return Kl(l),e;if(i===r)return Kl(l),t;i=i.sibling}throw Error(u(188))}if(n.return!==r.return)n=l,r=i;else{for(var s=!1,a=l.child;a;){if(a===n){s=!0,n=l,r=i;break}if(a===r){s=!0,r=l,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=l;break}if(a===r){s=!0,r=i,n=l;break}a=a.sibling}if(!s)throw Error(u(189))}}if(n.alternate!==r)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function Yl(e){return e=ql(e),e!==null?fn(e):null}function fn(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=fn(e);if(t!==null)return t;e=e.sibling}return null}var kr=o.unstable_scheduleCallback,Kt=o.unstable_cancelCallback,no=o.unstable_shouldYield,ro=o.unstable_requestPaint,Te=o.unstable_now,lo=o.unstable_getCurrentPriorityLevel,ol=o.unstable_ImmediatePriority,Gl=o.unstable_UserBlockingPriority,xr=o.unstable_NormalPriority,Xl=o.unstable_LowPriority,Zl=o.unstable_IdlePriority,Er=null,Ot=null;function sl(e){if(Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Er,e,void 0,(e.current.flags&128)===128)}catch{}}var Ye=Math.clz32?Math.clz32:Jl,en=Math.log,_r=Math.LN2;function Jl(e){return e>>>=0,e===0?32:31-(en(e)/_r|0)|0}var Cr=64,Nr=4194304;function bn(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~l;a!==0?r=bn(a):(i&=s,i!==0&&(r=bn(i)))}else s=n&~l,s!==0?r=bn(s):i!==0&&(r=bn(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ye(t),l=1<<n,r|=e[n],t&=~l;return r}function io(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ul(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Ye(i),a=1<<s,f=l[s];f===-1?((a&n)===0||(a&r)!==0)&&(l[s]=io(a,t)):f<=t&&(e.expiredLanes|=a),i&=~a}}function Tn(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function al(){var e=Cr;return Cr<<=1,(Cr&4194240)===0&&(Cr=64),e}function g(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function k(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ye(t),e[t]=n}function z(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-Ye(n),i=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~i}}function L(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ye(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var P=0;function V(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var he,ke,Oe,xe,lt,dn=!1,Ae=[],gt=null,Nt=null,Pt=null,qt=new Map,jn=new Map,oe=[],Pe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function He(e,t){switch(e){case"focusin":case"focusout":gt=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":qt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jn.delete(t.pointerId)}}function et(e,t,n,r,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[l]},t!==null&&(t=_l(t),t!==null&&ke(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function tn(e,t,n,r,l){switch(t){case"focusin":return gt=et(gt,e,t,n,r,l),!0;case"dragenter":return Nt=et(Nt,e,t,n,r,l),!0;case"mouseover":return Pt=et(Pt,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return qt.set(i,et(qt.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,jn.set(i,et(jn.get(i)||null,e,t,n,r,l)),!0}return!1}function cl(e){var t=er(e.target);if(t!==null){var n=cn(t);if(n!==null){if(t=n.tag,t===13){if(t=Qt(n),t!==null){e.blockedOn=t,lt(e.priority,function(){Oe(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function bl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=so(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);nl=r,n.target.dispatchEvent(r),nl=null}else return t=_l(n),t!==null&&ke(t),e.blockedOn=n,!1;t.shift()}return!0}function Zs(e,t,n){bl(e)&&n.delete(t)}function Kc(){dn=!1,gt!==null&&bl(gt)&&(gt=null),Nt!==null&&bl(Nt)&&(Nt=null),Pt!==null&&bl(Pt)&&(Pt=null),qt.forEach(Zs),jn.forEach(Zs)}function fl(e,t){e.blockedOn===t&&(e.blockedOn=null,dn||(dn=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Kc)))}function dl(e){function t(l){return fl(l,e)}if(0<Ae.length){fl(Ae[0],e);for(var n=1;n<Ae.length;n++){var r=Ae[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gt!==null&&fl(gt,e),Nt!==null&&fl(Nt,e),Pt!==null&&fl(Pt,e),qt.forEach(t),jn.forEach(t),n=0;n<oe.length;n++)r=oe[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<oe.length&&(n=oe[0],n.blockedOn===null);)cl(n),n.blockedOn===null&&oe.shift()}var Rr=K.ReactCurrentBatchConfig,ei=!0;function qc(e,t,n,r){var l=P,i=Rr.transition;Rr.transition=null;try{P=1,oo(e,t,n,r)}finally{P=l,Rr.transition=i}}function Yc(e,t,n,r){var l=P,i=Rr.transition;Rr.transition=null;try{P=4,oo(e,t,n,r)}finally{P=l,Rr.transition=i}}function oo(e,t,n,r){if(ei){var l=so(e,t,n,r);if(l===null)Co(e,t,r,ti,n),He(e,r);else if(tn(l,e,t,n,r))r.stopPropagation();else if(He(e,r),t&4&&-1<Pe.indexOf(e)){for(;l!==null;){var i=_l(l);if(i!==null&&he(i),i=so(e,t,n,r),i===null&&Co(e,t,r,ti,n),i===l)break;l=i}l!==null&&r.stopPropagation()}else Co(e,t,r,null,n)}}var ti=null;function so(e,t,n,r){if(ti=null,e=un(r),e=er(e),e!==null)if(t=cn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Qt(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ti=e,null}function Js(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(lo()){case ol:return 1;case Gl:return 4;case xr:case Xl:return 16;case Zl:return 536870912;default:return 16}default:return 16}}var Mn=null,uo=null,ni=null;function bs(){if(ni)return ni;var e,t=uo,n=t.length,r,l="value"in Mn?Mn.value:Mn.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===l[i-r];r++);return ni=l.slice(e,1<r?1-r:void 0)}function ri(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function li(){return!0}function eu(){return!1}function Rt(e){function t(n,r,l,i,s){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?li:eu,this.isPropagationStopped=eu,this}return I(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=li)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=li)},persist:function(){},isPersistent:li}),t}var Tr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ao=Rt(Tr),pl=I({},Tr,{view:0,detail:0}),Gc=Rt(pl),co,fo,hl,ii=I({},pl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ho,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==hl&&(hl&&e.type==="mousemove"?(co=e.screenX-hl.screenX,fo=e.screenY-hl.screenY):fo=co=0,hl=e),co)},movementY:function(e){return"movementY"in e?e.movementY:fo}}),tu=Rt(ii),Xc=I({},ii,{dataTransfer:0}),Zc=Rt(Xc),Jc=I({},pl,{relatedTarget:0}),po=Rt(Jc),bc=I({},Tr,{animationName:0,elapsedTime:0,pseudoElement:0}),ef=Rt(bc),tf=I({},Tr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nf=Rt(tf),rf=I({},Tr,{data:0}),nu=Rt(rf),lf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},of={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},sf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sf[e])?!!t[e]:!1}function ho(){return uf}var af=I({},pl,{key:function(e){if(e.key){var t=lf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ri(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?of[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ho,charCode:function(e){return e.type==="keypress"?ri(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ri(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),cf=Rt(af),ff=I({},ii,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ru=Rt(ff),df=I({},pl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ho}),pf=Rt(df),hf=I({},Tr,{propertyName:0,elapsedTime:0,pseudoElement:0}),mf=Rt(hf),vf=I({},ii,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),gf=Rt(vf),yf=[9,13,27,32],mo=j&&"CompositionEvent"in window,ml=null;j&&"documentMode"in document&&(ml=document.documentMode);var wf=j&&"TextEvent"in window&&!ml,lu=j&&(!mo||ml&&8<ml&&11>=ml),iu=" ",ou=!1;function su(e,t){switch(e){case"keyup":return yf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jr=!1;function Sf(e,t){switch(e){case"compositionend":return uu(t);case"keypress":return t.which!==32?null:(ou=!0,iu);case"textInput":return e=t.data,e===iu&&ou?null:e;default:return null}}function kf(e,t){if(jr)return e==="compositionend"||!mo&&su(e,t)?(e=bs(),ni=uo=Mn=null,jr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return lu&&t.locale!=="ko"?null:t.data;default:return null}}var xf={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function au(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xf[e.type]:t==="textarea"}function cu(e,t,n,r){ll(r),t=ci(t,"onChange"),0<t.length&&(n=new ao("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var vl=null,gl=null;function Ef(e){Ru(e,0)}function oi(e){var t=Fr(e);if(Wl(t))return e}function _f(e,t){if(e==="change")return t}var fu=!1;if(j){var vo;if(j){var go="oninput"in document;if(!go){var du=document.createElement("div");du.setAttribute("oninput","return;"),go=typeof du.oninput=="function"}vo=go}else vo=!1;fu=vo&&(!document.documentMode||9<document.documentMode)}function pu(){vl&&(vl.detachEvent("onpropertychange",hu),gl=vl=null)}function hu(e){if(e.propertyName==="value"&&oi(gl)){var t=[];cu(t,gl,e,un(e)),Zn(Ef,t)}}function Cf(e,t,n){e==="focusin"?(pu(),vl=t,gl=n,vl.attachEvent("onpropertychange",hu)):e==="focusout"&&pu()}function Nf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return oi(gl)}function Pf(e,t){if(e==="click")return oi(t)}function Rf(e,t){if(e==="input"||e==="change")return oi(t)}function Tf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Yt=typeof Object.is=="function"?Object.is:Tf;function yl(e,t){if(Yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!A.call(t,l)||!Yt(e[l],t[l]))return!1}return!0}function mu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vu(e,t){var n=mu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=mu(n)}}function gu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yu(){for(var e=window,t=be();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=be(e.document)}return t}function yo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function jf(e){var t=yu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gu(n.ownerDocument.documentElement,n)){if(r!==null&&yo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=vu(n,i);var s=vu(n,r);l&&s&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Mf=j&&"documentMode"in document&&11>=document.documentMode,Mr=null,wo=null,wl=null,So=!1;function wu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;So||Mr==null||Mr!==be(r)||(r=Mr,"selectionStart"in r&&yo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wl&&yl(wl,r)||(wl=r,r=ci(wo,"onSelect"),0<r.length&&(t=new ao("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Mr)))}function si(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var zr={animationend:si("Animation","AnimationEnd"),animationiteration:si("Animation","AnimationIteration"),animationstart:si("Animation","AnimationStart"),transitionend:si("Transition","TransitionEnd")},ko={},Su={};j&&(Su=document.createElement("div").style,"AnimationEvent"in window||(delete zr.animationend.animation,delete zr.animationiteration.animation,delete zr.animationstart.animation),"TransitionEvent"in window||delete zr.transitionend.transition);function ui(e){if(ko[e])return ko[e];if(!zr[e])return e;var t=zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Su)return ko[e]=t[n];return e}var ku=ui("animationend"),xu=ui("animationiteration"),Eu=ui("animationstart"),_u=ui("transitionend"),Cu=new Map,Nu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function zn(e,t){Cu.set(e,t),E(t,[e])}for(var xo=0;xo<Nu.length;xo++){var Eo=Nu[xo],zf=Eo.toLowerCase(),Lf=Eo[0].toUpperCase()+Eo.slice(1);zn(zf,"on"+Lf)}zn(ku,"onAnimationEnd"),zn(xu,"onAnimationIteration"),zn(Eu,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(_u,"onTransitionEnd"),x("onMouseEnter",["mouseout","mouseover"]),x("onMouseLeave",["mouseout","mouseover"]),x("onPointerEnter",["pointerout","pointerover"]),x("onPointerLeave",["pointerout","pointerover"]),E("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),E("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),E("onBeforeInput",["compositionend","keypress","textInput","paste"]),E("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),E("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),E("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Of=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sl));function Pu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Rn(r,t,void 0,e),e.currentTarget=null}function Ru(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],f=a.instance,S=a.currentTarget;if(a=a.listener,f!==i&&l.isPropagationStopped())break e;Pu(l,a,S),i=f}else for(s=0;s<r.length;s++){if(a=r[s],f=a.instance,S=a.currentTarget,a=a.listener,f!==i&&l.isPropagationStopped())break e;Pu(l,a,S),i=f}}}if(wr)throw e=vt,wr=!1,vt=null,e}function je(e,t){var n=t[Mo];n===void 0&&(n=t[Mo]=new Set);var r=e+"__bubble";n.has(r)||(Tu(t,e,2,!1),n.add(r))}function _o(e,t,n){var r=0;t&&(r|=4),Tu(n,e,r,t)}var ai="_reactListening"+Math.random().toString(36).slice(2);function kl(e){if(!e[ai]){e[ai]=!0,w.forEach(function(n){n!=="selectionchange"&&(Of.has(n)||_o(n,!1,e),_o(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ai]||(t[ai]=!0,_o("selectionchange",!1,t))}}function Tu(e,t,n,r){switch(Js(t)){case 1:var l=qc;break;case 4:l=Yc;break;default:l=oo}n=l.bind(null,t,n,e),l=void 0,!mt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Co(e,t,n,r,l){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===l||a.nodeType===8&&a.parentNode===l)break;if(s===4)for(s=r.return;s!==null;){var f=s.tag;if((f===3||f===4)&&(f=s.stateNode.containerInfo,f===l||f.nodeType===8&&f.parentNode===l))return;s=s.return}for(;a!==null;){if(s=er(a),s===null)return;if(f=s.tag,f===5||f===6){r=i=s;continue e}a=a.parentNode}}r=r.return}Zn(function(){var S=i,N=un(n),T=[];e:{var C=Cu.get(e);if(C!==void 0){var D=ao,H=e;switch(e){case"keypress":if(ri(n)===0)break e;case"keydown":case"keyup":D=cf;break;case"focusin":H="focus",D=po;break;case"focusout":H="blur",D=po;break;case"beforeblur":case"afterblur":D=po;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":D=tu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=Zc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=pf;break;case ku:case xu:case Eu:D=ef;break;case _u:D=mf;break;case"scroll":D=Gc;break;case"wheel":D=gf;break;case"copy":case"cut":case"paste":D=nf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=ru}var Q=(t&4)!==0,$e=!Q&&e==="scroll",m=Q?C!==null?C+"Capture":null:C;Q=[];for(var d=S,v;d!==null;){v=d;var M=v.stateNode;if(v.tag===5&&M!==null&&(v=M,m!==null&&(M=dt(d,m),M!=null&&Q.push(xl(d,M,v)))),$e)break;d=d.return}0<Q.length&&(C=new D(C,H,null,n,N),T.push({event:C,listeners:Q}))}}if((t&7)===0){e:{if(C=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",C&&n!==nl&&(H=n.relatedTarget||n.fromElement)&&(er(H)||H[pn]))break e;if((D||C)&&(C=N.window===N?N:(C=N.ownerDocument)?C.defaultView||C.parentWindow:window,D?(H=n.relatedTarget||n.toElement,D=S,H=H?er(H):null,H!==null&&($e=cn(H),H!==$e||H.tag!==5&&H.tag!==6)&&(H=null)):(D=null,H=S),D!==H)){if(Q=tu,M="onMouseLeave",m="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(Q=ru,M="onPointerLeave",m="onPointerEnter",d="pointer"),$e=D==null?C:Fr(D),v=H==null?C:Fr(H),C=new Q(M,d+"leave",D,n,N),C.target=$e,C.relatedTarget=v,M=null,er(N)===S&&(Q=new Q(m,d+"enter",H,n,N),Q.target=v,Q.relatedTarget=$e,M=Q),$e=M,D&&H)t:{for(Q=D,m=H,d=0,v=Q;v;v=Lr(v))d++;for(v=0,M=m;M;M=Lr(M))v++;for(;0<d-v;)Q=Lr(Q),d--;for(;0<v-d;)m=Lr(m),v--;for(;d--;){if(Q===m||m!==null&&Q===m.alternate)break t;Q=Lr(Q),m=Lr(m)}Q=null}else Q=null;D!==null&&ju(T,C,D,Q,!1),H!==null&&$e!==null&&ju(T,$e,H,Q,!0)}}e:{if(C=S?Fr(S):window,D=C.nodeName&&C.nodeName.toLowerCase(),D==="select"||D==="input"&&C.type==="file")var q=_f;else if(au(C))if(fu)q=Rf;else{q=Nf;var te=Cf}else(D=C.nodeName)&&D.toLowerCase()==="input"&&(C.type==="checkbox"||C.type==="radio")&&(q=Pf);if(q&&(q=q(e,S))){cu(T,q,n,N);break e}te&&te(e,C,S),e==="focusout"&&(te=C._wrapperState)&&te.controlled&&C.type==="number"&&$t(C,"number",C.value)}switch(te=S?Fr(S):window,e){case"focusin":(au(te)||te.contentEditable==="true")&&(Mr=te,wo=S,wl=null);break;case"focusout":wl=wo=Mr=null;break;case"mousedown":So=!0;break;case"contextmenu":case"mouseup":case"dragend":So=!1,wu(T,n,N);break;case"selectionchange":if(Mf)break;case"keydown":case"keyup":wu(T,n,N)}var ne;if(mo)e:{switch(e){case"compositionstart":var ie="onCompositionStart";break e;case"compositionend":ie="onCompositionEnd";break e;case"compositionupdate":ie="onCompositionUpdate";break e}ie=void 0}else jr?su(e,n)&&(ie="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ie="onCompositionStart");ie&&(lu&&n.locale!=="ko"&&(jr||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&jr&&(ne=bs()):(Mn=N,uo="value"in Mn?Mn.value:Mn.textContent,jr=!0)),te=ci(S,ie),0<te.length&&(ie=new nu(ie,e,null,n,N),T.push({event:ie,listeners:te}),ne?ie.data=ne:(ne=uu(n),ne!==null&&(ie.data=ne)))),(ne=wf?Sf(e,n):kf(e,n))&&(S=ci(S,"onBeforeInput"),0<S.length&&(N=new nu("onBeforeInput","beforeinput",null,n,N),T.push({event:N,listeners:S}),N.data=ne))}Ru(T,t)})}function xl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ci(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=dt(e,n),i!=null&&r.unshift(xl(e,i,l)),i=dt(e,t),i!=null&&r.push(xl(e,i,l))),e=e.return}return r}function Lr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ju(e,t,n,r,l){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,f=a.alternate,S=a.stateNode;if(f!==null&&f===r)break;a.tag===5&&S!==null&&(a=S,l?(f=dt(n,i),f!=null&&s.unshift(xl(n,f,a))):l||(f=dt(n,i),f!=null&&s.push(xl(n,f,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Ff=/\r\n?/g,Df=/\u0000|\uFFFD/g;function Mu(e){return(typeof e=="string"?e:""+e).replace(Ff,`
39
- `).replace(Df,"")}function fi(e,t,n){if(t=Mu(t),Mu(e)!==t&&n)throw Error(u(425))}function di(){}var No=null,Po=null;function Ro(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var To=typeof setTimeout=="function"?setTimeout:void 0,If=typeof clearTimeout=="function"?clearTimeout:void 0,zu=typeof Promise=="function"?Promise:void 0,Af=typeof queueMicrotask=="function"?queueMicrotask:typeof zu<"u"?function(e){return zu.resolve(null).then(e).catch(Uf)}:To;function Uf(e){setTimeout(function(){throw e})}function jo(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),dl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);dl(t)}function Ln(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Lu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Or=Math.random().toString(36).slice(2),nn="__reactFiber$"+Or,El="__reactProps$"+Or,pn="__reactContainer$"+Or,Mo="__reactEvents$"+Or,Vf="__reactListeners$"+Or,$f="__reactHandles$"+Or;function er(e){var t=e[nn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pn]||n[nn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Lu(e);e!==null;){if(n=e[nn])return n;e=Lu(e)}return t}e=n,n=e.parentNode}return null}function _l(e){return e=e[nn]||e[pn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(u(33))}function pi(e){return e[El]||null}var zo=[],Dr=-1;function On(e){return{current:e}}function Me(e){0>Dr||(e.current=zo[Dr],zo[Dr]=null,Dr--)}function Re(e,t){Dr++,zo[Dr]=e.current,e.current=t}var Fn={},it=On(Fn),yt=On(!1),tr=Fn;function Ir(e,t){var n=e.type.contextTypes;if(!n)return Fn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function wt(e){return e=e.childContextTypes,e!=null}function hi(){Me(yt),Me(it)}function Ou(e,t,n){if(it.current!==Fn)throw Error(u(168));Re(it,t),Re(yt,n)}function Fu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(u(108,fe(e)||"Unknown",l));return I({},n,r)}function mi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fn,tr=it.current,Re(it,e),Re(yt,yt.current),!0}function Du(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=Fu(e,t,tr),r.__reactInternalMemoizedMergedChildContext=e,Me(yt),Me(it),Re(it,e)):Me(yt),Re(yt,n)}var hn=null,vi=!1,Lo=!1;function Iu(e){hn===null?hn=[e]:hn.push(e)}function Bf(e){vi=!0,Iu(e)}function Dn(){if(!Lo&&hn!==null){Lo=!0;var e=0,t=P;try{var n=hn;for(P=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}hn=null,vi=!1}catch(l){throw hn!==null&&(hn=hn.slice(e+1)),kr(ol,Dn),l}finally{P=t,Lo=!1}}return null}var Ar=[],Ur=0,gi=null,yi=0,Ft=[],Dt=0,nr=null,mn=1,vn="";function rr(e,t){Ar[Ur++]=yi,Ar[Ur++]=gi,gi=e,yi=t}function Au(e,t,n){Ft[Dt++]=mn,Ft[Dt++]=vn,Ft[Dt++]=nr,nr=e;var r=mn;e=vn;var l=32-Ye(r)-1;r&=~(1<<l),n+=1;var i=32-Ye(t)+l;if(30<i){var s=l-l%5;i=(r&(1<<s)-1).toString(32),r>>=s,l-=s,mn=1<<32-Ye(t)+l|n<<l|r,vn=i+e}else mn=1<<i|n<<l|r,vn=e}function Oo(e){e.return!==null&&(rr(e,1),Au(e,1,0))}function Fo(e){for(;e===gi;)gi=Ar[--Ur],Ar[Ur]=null,yi=Ar[--Ur],Ar[Ur]=null;for(;e===nr;)nr=Ft[--Dt],Ft[Dt]=null,vn=Ft[--Dt],Ft[Dt]=null,mn=Ft[--Dt],Ft[Dt]=null}var Tt=null,jt=null,ze=!1,Gt=null;function Uu(e,t){var n=Vt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Vu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Tt=e,jt=Ln(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Tt=e,jt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=nr!==null?{id:mn,overflow:vn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Vt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Tt=e,jt=null,!0):!1;default:return!1}}function Do(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Io(e){if(ze){var t=jt;if(t){var n=t;if(!Vu(e,t)){if(Do(e))throw Error(u(418));t=Ln(n.nextSibling);var r=Tt;t&&Vu(e,t)?Uu(r,n):(e.flags=e.flags&-4097|2,ze=!1,Tt=e)}}else{if(Do(e))throw Error(u(418));e.flags=e.flags&-4097|2,ze=!1,Tt=e}}}function $u(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Tt=e}function wi(e){if(e!==Tt)return!1;if(!ze)return $u(e),ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ro(e.type,e.memoizedProps)),t&&(t=jt)){if(Do(e))throw Bu(),Error(u(418));for(;t;)Uu(e,t),t=Ln(t.nextSibling)}if($u(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){jt=Ln(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}jt=null}}else jt=Tt?Ln(e.stateNode.nextSibling):null;return!0}function Bu(){for(var e=jt;e;)e=Ln(e.nextSibling)}function Vr(){jt=Tt=null,ze=!1}function Ao(e){Gt===null?Gt=[e]:Gt.push(e)}var Wf=K.ReactCurrentBatchConfig;function Cl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(u(309));var r=n.stateNode}if(!r)throw Error(u(147,e));var l=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=l.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(u(284));if(!n._owner)throw Error(u(290,e))}return e}function Si(e,t){throw e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wu(e){var t=e._init;return t(e._payload)}function Hu(e){function t(m,d){if(e){var v=m.deletions;v===null?(m.deletions=[d],m.flags|=16):v.push(d)}}function n(m,d){if(!e)return null;for(;d!==null;)t(m,d),d=d.sibling;return null}function r(m,d){for(m=new Map;d!==null;)d.key!==null?m.set(d.key,d):m.set(d.index,d),d=d.sibling;return m}function l(m,d){return m=Hn(m,d),m.index=0,m.sibling=null,m}function i(m,d,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<d?(m.flags|=2,d):v):(m.flags|=2,d)):(m.flags|=1048576,d)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,d,v,M){return d===null||d.tag!==6?(d=Ts(v,m.mode,M),d.return=m,d):(d=l(d,v),d.return=m,d)}function f(m,d,v,M){var q=v.type;return q===ee?N(m,d,v.props.children,M,v.key):d!==null&&(d.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===qe&&Wu(q)===d.type)?(M=l(d,v.props),M.ref=Cl(m,d,v),M.return=m,M):(M=Hi(v.type,v.key,v.props,null,m.mode,M),M.ref=Cl(m,d,v),M.return=m,M)}function S(m,d,v,M){return d===null||d.tag!==4||d.stateNode.containerInfo!==v.containerInfo||d.stateNode.implementation!==v.implementation?(d=js(v,m.mode,M),d.return=m,d):(d=l(d,v.children||[]),d.return=m,d)}function N(m,d,v,M,q){return d===null||d.tag!==7?(d=fr(v,m.mode,M,q),d.return=m,d):(d=l(d,v),d.return=m,d)}function T(m,d,v){if(typeof d=="string"&&d!==""||typeof d=="number")return d=Ts(""+d,m.mode,v),d.return=m,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case ae:return v=Hi(d.type,d.key,d.props,null,m.mode,v),v.ref=Cl(m,null,d),v.return=m,v;case ce:return d=js(d,m.mode,v),d.return=m,d;case qe:var M=d._init;return T(m,M(d._payload),v)}if(kn(d)||b(d))return d=fr(d,m.mode,v,null),d.return=m,d;Si(m,d)}return null}function C(m,d,v,M){var q=d!==null?d.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return q!==null?null:a(m,d,""+v,M);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ae:return v.key===q?f(m,d,v,M):null;case ce:return v.key===q?S(m,d,v,M):null;case qe:return q=v._init,C(m,d,q(v._payload),M)}if(kn(v)||b(v))return q!==null?null:N(m,d,v,M,null);Si(m,v)}return null}function D(m,d,v,M,q){if(typeof M=="string"&&M!==""||typeof M=="number")return m=m.get(v)||null,a(d,m,""+M,q);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case ae:return m=m.get(M.key===null?v:M.key)||null,f(d,m,M,q);case ce:return m=m.get(M.key===null?v:M.key)||null,S(d,m,M,q);case qe:var te=M._init;return D(m,d,v,te(M._payload),q)}if(kn(M)||b(M))return m=m.get(v)||null,N(d,m,M,q,null);Si(d,M)}return null}function H(m,d,v,M){for(var q=null,te=null,ne=d,ie=d=0,Ze=null;ne!==null&&ie<v.length;ie++){ne.index>ie?(Ze=ne,ne=null):Ze=ne.sibling;var ye=C(m,ne,v[ie],M);if(ye===null){ne===null&&(ne=Ze);break}e&&ne&&ye.alternate===null&&t(m,ne),d=i(ye,d,ie),te===null?q=ye:te.sibling=ye,te=ye,ne=Ze}if(ie===v.length)return n(m,ne),ze&&rr(m,ie),q;if(ne===null){for(;ie<v.length;ie++)ne=T(m,v[ie],M),ne!==null&&(d=i(ne,d,ie),te===null?q=ne:te.sibling=ne,te=ne);return ze&&rr(m,ie),q}for(ne=r(m,ne);ie<v.length;ie++)Ze=D(ne,m,ie,v[ie],M),Ze!==null&&(e&&Ze.alternate!==null&&ne.delete(Ze.key===null?ie:Ze.key),d=i(Ze,d,ie),te===null?q=Ze:te.sibling=Ze,te=Ze);return e&&ne.forEach(function(Qn){return t(m,Qn)}),ze&&rr(m,ie),q}function Q(m,d,v,M){var q=b(v);if(typeof q!="function")throw Error(u(150));if(v=q.call(v),v==null)throw Error(u(151));for(var te=q=null,ne=d,ie=d=0,Ze=null,ye=v.next();ne!==null&&!ye.done;ie++,ye=v.next()){ne.index>ie?(Ze=ne,ne=null):Ze=ne.sibling;var Qn=C(m,ne,ye.value,M);if(Qn===null){ne===null&&(ne=Ze);break}e&&ne&&Qn.alternate===null&&t(m,ne),d=i(Qn,d,ie),te===null?q=Qn:te.sibling=Qn,te=Qn,ne=Ze}if(ye.done)return n(m,ne),ze&&rr(m,ie),q;if(ne===null){for(;!ye.done;ie++,ye=v.next())ye=T(m,ye.value,M),ye!==null&&(d=i(ye,d,ie),te===null?q=ye:te.sibling=ye,te=ye);return ze&&rr(m,ie),q}for(ne=r(m,ne);!ye.done;ie++,ye=v.next())ye=D(ne,m,ie,ye.value,M),ye!==null&&(e&&ye.alternate!==null&&ne.delete(ye.key===null?ie:ye.key),d=i(ye,d,ie),te===null?q=ye:te.sibling=ye,te=ye);return e&&ne.forEach(function(xd){return t(m,xd)}),ze&&rr(m,ie),q}function $e(m,d,v,M){if(typeof v=="object"&&v!==null&&v.type===ee&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ae:e:{for(var q=v.key,te=d;te!==null;){if(te.key===q){if(q=v.type,q===ee){if(te.tag===7){n(m,te.sibling),d=l(te,v.props.children),d.return=m,m=d;break e}}else if(te.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===qe&&Wu(q)===te.type){n(m,te.sibling),d=l(te,v.props),d.ref=Cl(m,te,v),d.return=m,m=d;break e}n(m,te);break}else t(m,te);te=te.sibling}v.type===ee?(d=fr(v.props.children,m.mode,M,v.key),d.return=m,m=d):(M=Hi(v.type,v.key,v.props,null,m.mode,M),M.ref=Cl(m,d,v),M.return=m,m=M)}return s(m);case ce:e:{for(te=v.key;d!==null;){if(d.key===te)if(d.tag===4&&d.stateNode.containerInfo===v.containerInfo&&d.stateNode.implementation===v.implementation){n(m,d.sibling),d=l(d,v.children||[]),d.return=m,m=d;break e}else{n(m,d);break}else t(m,d);d=d.sibling}d=js(v,m.mode,M),d.return=m,m=d}return s(m);case qe:return te=v._init,$e(m,d,te(v._payload),M)}if(kn(v))return H(m,d,v,M);if(b(v))return Q(m,d,v,M);Si(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,d!==null&&d.tag===6?(n(m,d.sibling),d=l(d,v),d.return=m,m=d):(n(m,d),d=Ts(v,m.mode,M),d.return=m,m=d),s(m)):n(m,d)}return $e}var $r=Hu(!0),Qu=Hu(!1),ki=On(null),xi=null,Br=null,Uo=null;function Vo(){Uo=Br=xi=null}function $o(e){var t=ki.current;Me(ki),e._currentValue=t}function Bo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Wr(e,t){xi=e,Uo=Br=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(St=!0),e.firstContext=null)}function It(e){var t=e._currentValue;if(Uo!==e)if(e={context:e,memoizedValue:t,next:null},Br===null){if(xi===null)throw Error(u(308));Br=e,xi.dependencies={lanes:0,firstContext:e}}else Br=Br.next=e;return t}var lr=null;function Wo(e){lr===null?lr=[e]:lr.push(e)}function Ku(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Wo(t)):(n.next=l.next,l.next=n),t.interleaved=n,gn(e,r)}function gn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var In=!1;function Ho(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function An(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ge&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,gn(e,n)}return l=r.interleaved,l===null?(t.next=t,Wo(r)):(t.next=l.next,l.next=t),r.interleaved=t,gn(e,n)}function Ei(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,L(e,n)}}function Yu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _i(e,t,n,r){var l=e.updateQueue;In=!1;var i=l.firstBaseUpdate,s=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var f=a,S=f.next;f.next=null,s===null?i=S:s.next=S,s=f;var N=e.alternate;N!==null&&(N=N.updateQueue,a=N.lastBaseUpdate,a!==s&&(a===null?N.firstBaseUpdate=S:a.next=S,N.lastBaseUpdate=f))}if(i!==null){var T=l.baseState;s=0,N=S=f=null,a=i;do{var C=a.lane,D=a.eventTime;if((r&C)===C){N!==null&&(N=N.next={eventTime:D,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var H=e,Q=a;switch(C=t,D=n,Q.tag){case 1:if(H=Q.payload,typeof H=="function"){T=H.call(D,T,C);break e}T=H;break e;case 3:H.flags=H.flags&-65537|128;case 0:if(H=Q.payload,C=typeof H=="function"?H.call(D,T,C):H,C==null)break e;T=I({},T,C);break e;case 2:In=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,C=l.effects,C===null?l.effects=[a]:C.push(a))}else D={eventTime:D,lane:C,tag:a.tag,payload:a.payload,callback:a.callback,next:null},N===null?(S=N=D,f=T):N=N.next=D,s|=C;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;C=a,a=C.next,C.next=null,l.lastBaseUpdate=C,l.shared.pending=null}}while(!0);if(N===null&&(f=T),l.baseState=f,l.firstBaseUpdate=S,l.lastBaseUpdate=N,t=l.shared.interleaved,t!==null){l=t;do s|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);sr|=s,e.lanes=s,e.memoizedState=T}}function Gu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(u(191,l));l.call(r)}}}var Nl={},rn=On(Nl),Pl=On(Nl),Rl=On(Nl);function ir(e){if(e===Nl)throw Error(u(174));return e}function Qo(e,t){switch(Re(Rl,t),Re(Pl,e),Re(rn,Nl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vr(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vr(t,e)}Me(rn),Re(rn,t)}function Hr(){Me(rn),Me(Pl),Me(Rl)}function Xu(e){ir(Rl.current);var t=ir(rn.current),n=vr(t,e.type);t!==n&&(Re(Pl,e),Re(rn,n))}function Ko(e){Pl.current===e&&(Me(rn),Me(Pl))}var Fe=On(0);function Ci(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var qo=[];function Yo(){for(var e=0;e<qo.length;e++)qo[e]._workInProgressVersionPrimary=null;qo.length=0}var Ni=K.ReactCurrentDispatcher,Go=K.ReactCurrentBatchConfig,or=0,De=null,Qe=null,Ge=null,Pi=!1,Tl=!1,jl=0,Hf=0;function ot(){throw Error(u(321))}function Xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Yt(e[n],t[n]))return!1;return!0}function Zo(e,t,n,r,l,i){if(or=i,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ni.current=e===null||e.memoizedState===null?Yf:Gf,e=n(r,l),Tl){i=0;do{if(Tl=!1,jl=0,25<=i)throw Error(u(301));i+=1,Ge=Qe=null,t.updateQueue=null,Ni.current=Xf,e=n(r,l)}while(Tl)}if(Ni.current=ji,t=Qe!==null&&Qe.next!==null,or=0,Ge=Qe=De=null,Pi=!1,t)throw Error(u(300));return e}function Jo(){var e=jl!==0;return jl=0,e}function ln(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?De.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function At(){if(Qe===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=Ge===null?De.memoizedState:Ge.next;if(t!==null)Ge=t,Qe=e;else{if(e===null)throw Error(u(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},Ge===null?De.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function Ml(e,t){return typeof t=="function"?t(e):t}function bo(e){var t=At(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=Qe,l=r.baseQueue,i=n.pending;if(i!==null){if(l!==null){var s=l.next;l.next=i.next,i.next=s}r.baseQueue=l=i,n.pending=null}if(l!==null){i=l.next,r=r.baseState;var a=s=null,f=null,S=i;do{var N=S.lane;if((or&N)===N)f!==null&&(f=f.next={lane:0,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null}),r=S.hasEagerState?S.eagerState:e(r,S.action);else{var T={lane:N,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null};f===null?(a=f=T,s=r):f=f.next=T,De.lanes|=N,sr|=N}S=S.next}while(S!==null&&S!==i);f===null?s=r:f.next=a,Yt(r,t.memoizedState)||(St=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=f,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do i=l.lane,De.lanes|=i,sr|=i,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function es(e){var t=At(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var s=l=l.next;do i=e(i,s.action),s=s.next;while(s!==l);Yt(i,t.memoizedState)||(St=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Zu(){}function Ju(e,t){var n=De,r=At(),l=t(),i=!Yt(r.memoizedState,l);if(i&&(r.memoizedState=l,St=!0),r=r.queue,ts(ta.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ge!==null&&Ge.memoizedState.tag&1){if(n.flags|=2048,zl(9,ea.bind(null,n,r,l,t),void 0,null),Xe===null)throw Error(u(349));(or&30)!==0||bu(n,t,l)}return l}function bu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=De.updateQueue,t===null?(t={lastEffect:null,stores:null},De.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ea(e,t,n,r){t.value=n,t.getSnapshot=r,na(t)&&ra(e)}function ta(e,t,n){return n(function(){na(t)&&ra(e)})}function na(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Yt(e,n)}catch{return!0}}function ra(e){var t=gn(e,1);t!==null&&bt(t,e,1,-1)}function la(e){var t=ln();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:e},t.queue=e,e=e.dispatch=qf.bind(null,De,e),[t.memoizedState,e]}function zl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=De.updateQueue,t===null?(t={lastEffect:null,stores:null},De.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ia(){return At().memoizedState}function Ri(e,t,n,r){var l=ln();De.flags|=e,l.memoizedState=zl(1|t,n,void 0,r===void 0?null:r)}function Ti(e,t,n,r){var l=At();r=r===void 0?null:r;var i=void 0;if(Qe!==null){var s=Qe.memoizedState;if(i=s.destroy,r!==null&&Xo(r,s.deps)){l.memoizedState=zl(t,n,i,r);return}}De.flags|=e,l.memoizedState=zl(1|t,n,i,r)}function oa(e,t){return Ri(8390656,8,e,t)}function ts(e,t){return Ti(2048,8,e,t)}function sa(e,t){return Ti(4,2,e,t)}function ua(e,t){return Ti(4,4,e,t)}function aa(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ca(e,t,n){return n=n!=null?n.concat([e]):null,Ti(4,4,aa.bind(null,t,e),n)}function ns(){}function fa(e,t){var n=At();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function da(e,t){var n=At();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pa(e,t,n){return(or&21)===0?(e.baseState&&(e.baseState=!1,St=!0),e.memoizedState=n):(Yt(n,t)||(n=al(),De.lanes|=n,sr|=n,e.baseState=!0),t)}function Qf(e,t){var n=P;P=n!==0&&4>n?n:4,e(!0);var r=Go.transition;Go.transition={};try{e(!1),t()}finally{P=n,Go.transition=r}}function ha(){return At().memoizedState}function Kf(e,t,n){var r=Bn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ma(e))va(t,n);else if(n=Ku(e,t,n,r),n!==null){var l=ht();bt(n,e,r,l),ga(n,t,r)}}function qf(e,t,n){var r=Bn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ma(e))va(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(l.hasEagerState=!0,l.eagerState=a,Yt(a,s)){var f=t.interleaved;f===null?(l.next=l,Wo(t)):(l.next=f.next,f.next=l),t.interleaved=l;return}}catch{}finally{}n=Ku(e,t,l,r),n!==null&&(l=ht(),bt(n,e,r,l),ga(n,t,r))}}function ma(e){var t=e.alternate;return e===De||t!==null&&t===De}function va(e,t){Tl=Pi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ga(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,L(e,n)}}var ji={readContext:It,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useInsertionEffect:ot,useLayoutEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useMutableSource:ot,useSyncExternalStore:ot,useId:ot,unstable_isNewReconciler:!1},Yf={readContext:It,useCallback:function(e,t){return ln().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:oa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ri(4194308,4,aa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ri(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ri(4,2,e,t)},useMemo:function(e,t){var n=ln();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ln();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Kf.bind(null,De,e),[r.memoizedState,e]},useRef:function(e){var t=ln();return e={current:e},t.memoizedState=e},useState:la,useDebugValue:ns,useDeferredValue:function(e){return ln().memoizedState=e},useTransition:function(){var e=la(!1),t=e[0];return e=Qf.bind(null,e[1]),ln().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=De,l=ln();if(ze){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),Xe===null)throw Error(u(349));(or&30)!==0||bu(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,oa(ta.bind(null,r,i,e),[e]),r.flags|=2048,zl(9,ea.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ln(),t=Xe.identifierPrefix;if(ze){var n=vn,r=mn;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Hf++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Gf={readContext:It,useCallback:fa,useContext:It,useEffect:ts,useImperativeHandle:ca,useInsertionEffect:sa,useLayoutEffect:ua,useMemo:da,useReducer:bo,useRef:ia,useState:function(){return bo(Ml)},useDebugValue:ns,useDeferredValue:function(e){var t=At();return pa(t,Qe.memoizedState,e)},useTransition:function(){var e=bo(Ml)[0],t=At().memoizedState;return[e,t]},useMutableSource:Zu,useSyncExternalStore:Ju,useId:ha,unstable_isNewReconciler:!1},Xf={readContext:It,useCallback:fa,useContext:It,useEffect:ts,useImperativeHandle:ca,useInsertionEffect:sa,useLayoutEffect:ua,useMemo:da,useReducer:es,useRef:ia,useState:function(){return es(Ml)},useDebugValue:ns,useDeferredValue:function(e){var t=At();return Qe===null?t.memoizedState=e:pa(t,Qe.memoizedState,e)},useTransition:function(){var e=es(Ml)[0],t=At().memoizedState;return[e,t]},useMutableSource:Zu,useSyncExternalStore:Ju,useId:ha,unstable_isNewReconciler:!1};function Xt(e,t){if(e&&e.defaultProps){t=I({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:I({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Mi={isMounted:function(e){return(e=e._reactInternals)?cn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ht(),l=Bn(e),i=yn(r,l);i.payload=t,n!=null&&(i.callback=n),t=An(e,i,l),t!==null&&(bt(t,e,l,r),Ei(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ht(),l=Bn(e),i=yn(r,l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=An(e,i,l),t!==null&&(bt(t,e,l,r),Ei(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ht(),r=Bn(e),l=yn(n,r);l.tag=2,t!=null&&(l.callback=t),t=An(e,l,r),t!==null&&(bt(t,e,r,n),Ei(t,e,r))}};function ya(e,t,n,r,l,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!yl(n,r)||!yl(l,i):!0}function wa(e,t,n){var r=!1,l=Fn,i=t.contextType;return typeof i=="object"&&i!==null?i=It(i):(l=wt(t)?tr:it.current,r=t.contextTypes,i=(r=r!=null)?Ir(e,l):Fn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Mi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function Sa(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Mi.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Ho(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=It(i):(i=wt(t)?tr:it.current,l.context=Ir(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(rs(e,t,i,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&Mi.enqueueReplaceState(l,l.state,null),_i(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Qr(e,t){try{var n="",r=t;do n+=ue(r),r=r.return;while(r);var l=n}catch(i){l=`
40
- Error generating stack: `+i.message+`
41
- `+i.stack}return{value:e,source:t,stack:l,digest:null}}function is(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function os(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Zf=typeof WeakMap=="function"?WeakMap:Map;function ka(e,t,n){n=yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ai||(Ai=!0,ks=r),os(e,t)},n}function xa(e,t,n){n=yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){os(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){os(e,t),typeof r!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Ea(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zf;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=fd.bind(null,e,t,n),t.then(e,e))}function _a(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ca(e,t,n,r,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yn(-1,1),t.tag=2,An(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var Jf=K.ReactCurrentOwner,St=!1;function pt(e,t,n,r){t.child=e===null?Qu(t,null,n,r):$r(t,e.child,n,r)}function Na(e,t,n,r,l){n=n.render;var i=t.ref;return Wr(t,l),r=Zo(e,t,n,r,i,l),n=Jo(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,wn(e,t,l)):(ze&&n&&Oo(t),t.flags|=1,pt(e,t,r,l),t.child)}function Pa(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!Rs(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Ra(e,t,i,r,l)):(e=Hi(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&l)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:yl,n(s,r)&&e.ref===t.ref)return wn(e,t,l)}return t.flags|=1,e=Hn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Ra(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(yl(i,r)&&e.ref===t.ref)if(St=!1,t.pendingProps=r=i,(e.lanes&l)!==0)(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,wn(e,t,l)}return ss(e,t,n,r,l)}function Ta(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Re(qr,Mt),Mt|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Re(qr,Mt),Mt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Re(qr,Mt),Mt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Re(qr,Mt),Mt|=r;return pt(e,t,l,n),t.child}function ja(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ss(e,t,n,r,l){var i=wt(n)?tr:it.current;return i=Ir(t,i),Wr(t,l),n=Zo(e,t,n,r,i,l),r=Jo(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,wn(e,t,l)):(ze&&r&&Oo(t),t.flags|=1,pt(e,t,n,l),t.child)}function Ma(e,t,n,r,l){if(wt(n)){var i=!0;mi(t)}else i=!1;if(Wr(t,l),t.stateNode===null)Li(e,t),wa(t,n,r),ls(t,n,r,l),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var f=s.context,S=n.contextType;typeof S=="object"&&S!==null?S=It(S):(S=wt(n)?tr:it.current,S=Ir(t,S));var N=n.getDerivedStateFromProps,T=typeof N=="function"||typeof s.getSnapshotBeforeUpdate=="function";T||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||f!==S)&&Sa(t,s,r,S),In=!1;var C=t.memoizedState;s.state=C,_i(t,r,s,l),f=t.memoizedState,a!==r||C!==f||yt.current||In?(typeof N=="function"&&(rs(t,n,N,r),f=t.memoizedState),(a=In||ya(t,n,a,r,C,f,S))?(T||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=S,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,qu(e,t),a=t.memoizedProps,S=t.type===t.elementType?a:Xt(t.type,a),s.props=S,T=t.pendingProps,C=s.context,f=n.contextType,typeof f=="object"&&f!==null?f=It(f):(f=wt(n)?tr:it.current,f=Ir(t,f));var D=n.getDerivedStateFromProps;(N=typeof D=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==T||C!==f)&&Sa(t,s,r,f),In=!1,C=t.memoizedState,s.state=C,_i(t,r,s,l);var H=t.memoizedState;a!==T||C!==H||yt.current||In?(typeof D=="function"&&(rs(t,n,D,r),H=t.memoizedState),(S=In||ya(t,n,S,r,C,H,f)||!1)?(N||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,H,f),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,H,f)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=H),s.props=r,s.state=H,s.context=f,r=S):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),r=!1)}return us(e,t,n,r,i,l)}function us(e,t,n,r,l,i){ja(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return l&&Du(t,n,!1),wn(e,t,i);r=t.stateNode,Jf.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=$r(t,e.child,null,i),t.child=$r(t,null,a,i)):pt(e,t,a,i),t.memoizedState=r.state,l&&Du(t,n,!0),t.child}function za(e){var t=e.stateNode;t.pendingContext?Ou(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ou(e,t.context,!1),Qo(e,t.containerInfo)}function La(e,t,n,r,l){return Vr(),Ao(l),t.flags|=256,pt(e,t,n,r),t.child}var as={dehydrated:null,treeContext:null,retryLane:0};function cs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oa(e,t,n){var r=t.pendingProps,l=Fe.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(l&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),Re(Fe,l&1),e===null)return Io(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Qi(s,r,0,null),e=fr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=cs(n),t.memoizedState=as,e):fs(t,s));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return bf(e,t,s,r,a,l,n);if(i){i=r.fallback,s=t.mode,l=e.child,a=l.sibling;var f={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=Hn(l,f),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?i=Hn(a,i):(i=fr(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?cs(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=as,r}return i=e.child,e=i.sibling,r=Hn(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function fs(e,t){return t=Qi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function zi(e,t,n,r){return r!==null&&Ao(r),$r(t,e.child,null,n),e=fs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bf(e,t,n,r,l,i,s){if(n)return t.flags&256?(t.flags&=-257,r=is(Error(u(422))),zi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=Qi({mode:"visible",children:r.children},l,0,null),i=fr(i,l,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&$r(t,e.child,null,s),t.child.memoizedState=cs(s),t.memoizedState=as,i);if((t.mode&1)===0)return zi(e,t,s,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(u(419)),r=is(i,r,void 0),zi(e,t,s,r)}if(a=(s&e.childLanes)!==0,St||a){if(r=Xe,r!==null){switch(s&-s){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(r.suspendedLanes|s))!==0?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,gn(e,l),bt(r,e,l,-1))}return Ps(),r=is(Error(u(421))),zi(e,t,s,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=dd.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,jt=Ln(l.nextSibling),Tt=t,ze=!0,Gt=null,e!==null&&(Ft[Dt++]=mn,Ft[Dt++]=vn,Ft[Dt++]=nr,mn=e.id,vn=e.overflow,nr=t),t=fs(t,r.children),t.flags|=4096,t)}function Fa(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bo(e.return,t,n)}function ds(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function Da(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(pt(e,t,r.children,n),r=Fe.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fa(e,n,t);else if(e.tag===19)Fa(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Re(Fe,r),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Ci(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ds(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ci(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ds(t,!0,n,null,i);break;case"together":ds(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Li(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function wn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Hn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Hn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ed(e,t,n){switch(t.tag){case 3:za(t),Vr();break;case 5:Xu(t);break;case 1:wt(t.type)&&mi(t);break;case 4:Qo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;Re(ki,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Re(Fe,Fe.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Oa(e,t,n):(Re(Fe,Fe.current&1),e=wn(e,t,n),e!==null?e.sibling:null);Re(Fe,Fe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Da(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Re(Fe,Fe.current),r)break;return null;case 22:case 23:return t.lanes=0,Ta(e,t,n)}return wn(e,t,n)}var Ia,ps,Aa,Ua;Ia=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ps=function(){},Aa=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,ir(rn.current);var i=null;switch(n){case"input":l=Kn(e,l),r=Kn(e,r),i=[];break;case"select":l=I({},l,{value:void 0}),r=I({},r,{value:void 0}),i=[];break;case"textarea":l=mr(e,l),r=mr(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=di)}Xn(n,r);var s;n=null;for(S in l)if(!r.hasOwnProperty(S)&&l.hasOwnProperty(S)&&l[S]!=null)if(S==="style"){var a=l[S];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else S!=="dangerouslySetInnerHTML"&&S!=="children"&&S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&S!=="autoFocus"&&(p.hasOwnProperty(S)?i||(i=[]):(i=i||[]).push(S,null));for(S in r){var f=r[S];if(a=l!=null?l[S]:void 0,r.hasOwnProperty(S)&&f!==a&&(f!=null||a!=null))if(S==="style")if(a){for(s in a)!a.hasOwnProperty(s)||f&&f.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in f)f.hasOwnProperty(s)&&a[s]!==f[s]&&(n||(n={}),n[s]=f[s])}else n||(i||(i=[]),i.push(S,n)),n=f;else S==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,a=a?a.__html:void 0,f!=null&&a!==f&&(i=i||[]).push(S,f)):S==="children"?typeof f!="string"&&typeof f!="number"||(i=i||[]).push(S,""+f):S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&(p.hasOwnProperty(S)?(f!=null&&S==="onScroll"&&je("scroll",e),i||a===f||(i=[])):(i=i||[]).push(S,f))}n&&(i=i||[]).push("style",n);var S=i;(t.updateQueue=S)&&(t.flags|=4)}},Ua=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ll(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function st(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function td(e,t,n){var r=t.pendingProps;switch(Fo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return wt(t.type)&&hi(),st(t),null;case 3:return r=t.stateNode,Hr(),Me(yt),Me(it),Yo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(wi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Gt!==null&&(_s(Gt),Gt=null))),ps(e,t),st(t),null;case 5:Ko(t);var l=ir(Rl.current);if(n=t.type,e!==null&&t.stateNode!=null)Aa(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(u(166));return st(t),null}if(e=ir(rn.current),wi(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[nn]=t,r[El]=i,e=(t.mode&1)!==0,n){case"dialog":je("cancel",r),je("close",r);break;case"iframe":case"object":case"embed":je("load",r);break;case"video":case"audio":for(l=0;l<Sl.length;l++)je(Sl[l],r);break;case"source":je("error",r);break;case"img":case"image":case"link":je("error",r),je("load",r);break;case"details":je("toggle",r);break;case"input":Jr(r,i),je("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},je("invalid",r);break;case"textarea":br(r,i),je("invalid",r)}Xn(n,i),l=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&fi(r.textContent,a,e),l=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&fi(r.textContent,a,e),l=["children",""+a]):p.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&je("scroll",r)}switch(n){case"input":sn(r),Hl(r,i,!0);break;case"textarea":sn(r),Ql(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=di)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=En(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[nn]=t,e[El]=r,Ia(e,t,!1,!1),t.stateNode=e;e:{switch(s=tl(n,r),n){case"dialog":je("cancel",e),je("close",e),l=r;break;case"iframe":case"object":case"embed":je("load",e),l=r;break;case"video":case"audio":for(l=0;l<Sl.length;l++)je(Sl[l],e);l=r;break;case"source":je("error",e),l=r;break;case"img":case"image":case"link":je("error",e),je("load",e),l=r;break;case"details":je("toggle",e),l=r;break;case"input":Jr(e,r),l=Kn(e,r),je("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=I({},r,{value:void 0}),je("invalid",e);break;case"textarea":br(e,r),l=mr(e,r),je("invalid",e);break;default:l=r}Xn(n,l),a=l;for(i in a)if(a.hasOwnProperty(i)){var f=a[i];i==="style"?Gn(e,f):i==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&gr(e,f)):i==="children"?typeof f=="string"?(n!=="textarea"||f!=="")&&_n(e,f):typeof f=="number"&&_n(e,""+f):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(p.hasOwnProperty(i)?f!=null&&i==="onScroll"&&je("scroll",e):f!=null&&Ne(e,i,f,s))}switch(n){case"input":sn(e),Hl(e,r,!1);break;case"textarea":sn(e),Ql(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ve(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?xn(e,!!r.multiple,i,!1):r.defaultValue!=null&&xn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=di)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return st(t),null;case 6:if(e&&t.stateNode!=null)Ua(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(u(166));if(n=ir(Rl.current),ir(rn.current),wi(t)){if(r=t.stateNode,n=t.memoizedProps,r[nn]=t,(i=r.nodeValue!==n)&&(e=Tt,e!==null))switch(e.tag){case 3:fi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&fi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[nn]=t,t.stateNode=r}return st(t),null;case 13:if(Me(Fe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ze&&jt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Bu(),Vr(),t.flags|=98560,i=!1;else if(i=wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[nn]=t}else Vr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),i=!1}else Gt!==null&&(_s(Gt),Gt=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Fe.current&1)!==0?Ke===0&&(Ke=3):Ps())),t.updateQueue!==null&&(t.flags|=4),st(t),null);case 4:return Hr(),ps(e,t),e===null&&kl(t.stateNode.containerInfo),st(t),null;case 10:return $o(t.type._context),st(t),null;case 17:return wt(t.type)&&hi(),st(t),null;case 19:if(Me(Fe),i=t.memoizedState,i===null)return st(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Ll(i,!1);else{if(Ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Ci(e),s!==null){for(t.flags|=128,Ll(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Re(Fe,Fe.current&1|2),t.child}e=e.sibling}i.tail!==null&&Te()>Yr&&(t.flags|=128,r=!0,Ll(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ci(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ll(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!ze)return st(t),null}else 2*Te()-i.renderingStartTime>Yr&&n!==1073741824&&(t.flags|=128,r=!0,Ll(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Te(),t.sibling=null,n=Fe.current,Re(Fe,r?n&1|2:n&1),t):(st(t),null);case 22:case 23:return Ns(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Mt&1073741824)!==0&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function nd(e,t){switch(Fo(t),t.tag){case 1:return wt(t.type)&&hi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hr(),Me(yt),Me(it),Yo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ko(t),null;case 13:if(Me(Fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Vr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(Fe),null;case 4:return Hr(),null;case 10:return $o(t.type._context),null;case 22:case 23:return Ns(),null;case 24:return null;default:return null}}var Oi=!1,ut=!1,rd=typeof WeakSet=="function"?WeakSet:Set,B=null;function Kr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ue(e,t,r)}else n.current=null}function hs(e,t,n){try{n()}catch(r){Ue(e,t,r)}}var Va=!1;function ld(e,t){if(No=ei,e=yu(),yo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,f=-1,S=0,N=0,T=e,C=null;t:for(;;){for(var D;T!==n||l!==0&&T.nodeType!==3||(a=s+l),T!==i||r!==0&&T.nodeType!==3||(f=s+r),T.nodeType===3&&(s+=T.nodeValue.length),(D=T.firstChild)!==null;)C=T,T=D;for(;;){if(T===e)break t;if(C===n&&++S===l&&(a=s),C===i&&++N===r&&(f=s),(D=T.nextSibling)!==null)break;T=C,C=T.parentNode}T=D}n=a===-1||f===-1?null:{start:a,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(Po={focusedElem:e,selectionRange:n},ei=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var H=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(H!==null){var Q=H.memoizedProps,$e=H.memoizedState,m=t.stateNode,d=m.getSnapshotBeforeUpdate(t.elementType===t.type?Q:Xt(t.type,Q),$e);m.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(M){Ue(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return H=Va,Va=!1,H}function Ol(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&hs(t,n,i)}l=l.next}while(l!==r)}}function Fi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ms(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $a(e){var t=e.alternate;t!==null&&(e.alternate=null,$a(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nn],delete t[El],delete t[Mo],delete t[Vf],delete t[$f])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ba(e){return e.tag===5||e.tag===3||e.tag===4}function Wa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ba(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=di));else if(r!==4&&(e=e.child,e!==null))for(vs(e,t,n),e=e.sibling;e!==null;)vs(e,t,n),e=e.sibling}function gs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gs(e,t,n),e=e.sibling;e!==null;)gs(e,t,n),e=e.sibling}var tt=null,Zt=!1;function Un(e,t,n){for(n=n.child;n!==null;)Ha(e,t,n),n=n.sibling}function Ha(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Er,n)}catch{}switch(n.tag){case 5:ut||Kr(n,t);case 6:var r=tt,l=Zt;tt=null,Un(e,t,n),tt=r,Zt=l,tt!==null&&(Zt?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&(Zt?(e=tt,n=n.stateNode,e.nodeType===8?jo(e.parentNode,n):e.nodeType===1&&jo(e,n),dl(e)):jo(tt,n.stateNode));break;case 4:r=tt,l=Zt,tt=n.stateNode.containerInfo,Zt=!0,Un(e,t,n),tt=r,Zt=l;break;case 0:case 11:case 14:case 15:if(!ut&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&hs(n,t,s),l=l.next}while(l!==r)}Un(e,t,n);break;case 1:if(!ut&&(Kr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ue(n,t,a)}Un(e,t,n);break;case 21:Un(e,t,n);break;case 22:n.mode&1?(ut=(r=ut)||n.memoizedState!==null,Un(e,t,n),ut=r):Un(e,t,n);break;default:Un(e,t,n)}}function Qa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rd),t.forEach(function(r){var l=pd.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Jt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:tt=a.stateNode,Zt=!1;break e;case 3:tt=a.stateNode.containerInfo,Zt=!0;break e;case 4:tt=a.stateNode.containerInfo,Zt=!0;break e}a=a.return}if(tt===null)throw Error(u(160));Ha(i,s,l),tt=null,Zt=!1;var f=l.alternate;f!==null&&(f.return=null),l.return=null}catch(S){Ue(l,t,S)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ka(t,e),t=t.sibling}function Ka(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Jt(t,e),on(e),r&4){try{Ol(3,e,e.return),Fi(3,e)}catch(Q){Ue(e,e.return,Q)}try{Ol(5,e,e.return)}catch(Q){Ue(e,e.return,Q)}}break;case 1:Jt(t,e),on(e),r&512&&n!==null&&Kr(n,n.return);break;case 5:if(Jt(t,e),on(e),r&512&&n!==null&&Kr(n,n.return),e.flags&32){var l=e.stateNode;try{_n(l,"")}catch(Q){Ue(e,e.return,Q)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,a=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&hr(l,i),tl(a,s);var S=tl(a,i);for(s=0;s<f.length;s+=2){var N=f[s],T=f[s+1];N==="style"?Gn(l,T):N==="dangerouslySetInnerHTML"?gr(l,T):N==="children"?_n(l,T):Ne(l,N,T,S)}switch(a){case"input":ft(l,i);break;case"textarea":qn(l,i);break;case"select":var C=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var D=i.value;D!=null?xn(l,!!i.multiple,D,!1):C!==!!i.multiple&&(i.defaultValue!=null?xn(l,!!i.multiple,i.defaultValue,!0):xn(l,!!i.multiple,i.multiple?[]:"",!1))}l[El]=i}catch(Q){Ue(e,e.return,Q)}}break;case 6:if(Jt(t,e),on(e),r&4){if(e.stateNode===null)throw Error(u(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(Q){Ue(e,e.return,Q)}}break;case 3:if(Jt(t,e),on(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{dl(t.containerInfo)}catch(Q){Ue(e,e.return,Q)}break;case 4:Jt(t,e),on(e);break;case 13:Jt(t,e),on(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(Ss=Te())),r&4&&Qa(e);break;case 22:if(N=n!==null&&n.memoizedState!==null,e.mode&1?(ut=(S=ut)||N,Jt(t,e),ut=S):Jt(t,e),on(e),r&8192){if(S=e.memoizedState!==null,(e.stateNode.isHidden=S)&&!N&&(e.mode&1)!==0)for(B=e,N=e.child;N!==null;){for(T=B=N;B!==null;){switch(C=B,D=C.child,C.tag){case 0:case 11:case 14:case 15:Ol(4,C,C.return);break;case 1:Kr(C,C.return);var H=C.stateNode;if(typeof H.componentWillUnmount=="function"){r=C,n=C.return;try{t=r,H.props=t.memoizedProps,H.state=t.memoizedState,H.componentWillUnmount()}catch(Q){Ue(r,n,Q)}}break;case 5:Kr(C,C.return);break;case 22:if(C.memoizedState!==null){Ga(T);continue}}D!==null?(D.return=C,B=D):Ga(T)}N=N.sibling}e:for(N=null,T=e;;){if(T.tag===5){if(N===null){N=T;try{l=T.stateNode,S?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=T.stateNode,f=T.memoizedProps.style,s=f!=null&&f.hasOwnProperty("display")?f.display:null,a.style.display=el("display",s))}catch(Q){Ue(e,e.return,Q)}}}else if(T.tag===6){if(N===null)try{T.stateNode.nodeValue=S?"":T.memoizedProps}catch(Q){Ue(e,e.return,Q)}}else if((T.tag!==22&&T.tag!==23||T.memoizedState===null||T===e)&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===e)break e;for(;T.sibling===null;){if(T.return===null||T.return===e)break e;N===T&&(N=null),T=T.return}N===T&&(N=null),T.sibling.return=T.return,T=T.sibling}}break;case 19:Jt(t,e),on(e),r&4&&Qa(e);break;case 21:break;default:Jt(t,e),on(e)}}function on(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ba(n)){var r=n;break e}n=n.return}throw Error(u(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(_n(l,""),r.flags&=-33);var i=Wa(e);gs(e,i,l);break;case 3:case 4:var s=r.stateNode.containerInfo,a=Wa(e);vs(e,a,s);break;default:throw Error(u(161))}}catch(f){Ue(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function id(e,t,n){B=e,qa(e)}function qa(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var l=B,i=l.child;if(l.tag===22&&r){var s=l.memoizedState!==null||Oi;if(!s){var a=l.alternate,f=a!==null&&a.memoizedState!==null||ut;a=Oi;var S=ut;if(Oi=s,(ut=f)&&!S)for(B=l;B!==null;)s=B,f=s.child,s.tag===22&&s.memoizedState!==null?Xa(l):f!==null?(f.return=s,B=f):Xa(l);for(;i!==null;)B=i,qa(i),i=i.sibling;B=l,Oi=a,ut=S}Ya(e)}else(l.subtreeFlags&8772)!==0&&i!==null?(i.return=l,B=i):Ya(e)}}function Ya(e){for(;B!==null;){var t=B;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ut||Fi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ut)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Xt(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Gu(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Gu(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&n.focus();break;case"img":f.src&&(n.src=f.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var S=t.alternate;if(S!==null){var N=S.memoizedState;if(N!==null){var T=N.dehydrated;T!==null&&dl(T)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}ut||t.flags&512&&ms(t)}catch(C){Ue(t,t.return,C)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function Ga(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function Xa(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Fi(4,t)}catch(f){Ue(t,n,f)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(f){Ue(t,l,f)}}var i=t.return;try{ms(t)}catch(f){Ue(t,i,f)}break;case 5:var s=t.return;try{ms(t)}catch(f){Ue(t,s,f)}}}catch(f){Ue(t,t.return,f)}if(t===e){B=null;break}var a=t.sibling;if(a!==null){a.return=t.return,B=a;break}B=t.return}}var od=Math.ceil,Di=K.ReactCurrentDispatcher,ys=K.ReactCurrentOwner,Ut=K.ReactCurrentBatchConfig,ge=0,Xe=null,We=null,nt=0,Mt=0,qr=On(0),Ke=0,Fl=null,sr=0,Ii=0,ws=0,Dl=null,kt=null,Ss=0,Yr=1/0,Sn=null,Ai=!1,ks=null,Vn=null,Ui=!1,$n=null,Vi=0,Il=0,xs=null,$i=-1,Bi=0;function ht(){return(ge&6)!==0?Te():$i!==-1?$i:$i=Te()}function Bn(e){return(e.mode&1)===0?1:(ge&2)!==0&&nt!==0?nt&-nt:Wf.transition!==null?(Bi===0&&(Bi=al()),Bi):(e=P,e!==0||(e=window.event,e=e===void 0?16:Js(e.type)),e)}function bt(e,t,n,r){if(50<Il)throw Il=0,xs=null,Error(u(185));k(e,n,r),((ge&2)===0||e!==Xe)&&(e===Xe&&((ge&2)===0&&(Ii|=n),Ke===4&&Wn(e,nt)),xt(e,r),n===1&&ge===0&&(t.mode&1)===0&&(Yr=Te()+500,vi&&Dn()))}function xt(e,t){var n=e.callbackNode;ul(e,t);var r=Pr(e,e===Xe?nt:0);if(r===0)n!==null&&Kt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Kt(n),t===1)e.tag===0?Bf(Ja.bind(null,e)):Iu(Ja.bind(null,e)),Af(function(){(ge&6)===0&&Dn()}),n=null;else{switch(V(r)){case 1:n=ol;break;case 4:n=Gl;break;case 16:n=xr;break;case 536870912:n=Zl;break;default:n=xr}n=oc(n,Za.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Za(e,t){if($i=-1,Bi=0,(ge&6)!==0)throw Error(u(327));var n=e.callbackNode;if(Gr()&&e.callbackNode!==n)return null;var r=Pr(e,e===Xe?nt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Wi(e,r);else{t=r;var l=ge;ge|=2;var i=ec();(Xe!==e||nt!==t)&&(Sn=null,Yr=Te()+500,ar(e,t));do try{ad();break}catch(a){ba(e,a)}while(!0);Vo(),Di.current=i,ge=l,We!==null?t=0:(Xe=null,nt=0,t=Ke)}if(t!==0){if(t===2&&(l=Tn(e),l!==0&&(r=l,t=Es(e,l))),t===1)throw n=Fl,ar(e,0),Wn(e,r),xt(e,Te()),n;if(t===6)Wn(e,r);else{if(l=e.current.alternate,(r&30)===0&&!sd(l)&&(t=Wi(e,r),t===2&&(i=Tn(e),i!==0&&(r=i,t=Es(e,i))),t===1))throw n=Fl,ar(e,0),Wn(e,r),xt(e,Te()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(u(345));case 2:cr(e,kt,Sn);break;case 3:if(Wn(e,r),(r&130023424)===r&&(t=Ss+500-Te(),10<t)){if(Pr(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){ht(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=To(cr.bind(null,e,kt,Sn),t);break}cr(e,kt,Sn);break;case 4:if(Wn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var s=31-Ye(r);i=1<<s,s=t[s],s>l&&(l=s),r&=~i}if(r=l,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*od(r/1960))-r,10<r){e.timeoutHandle=To(cr.bind(null,e,kt,Sn),r);break}cr(e,kt,Sn);break;case 5:cr(e,kt,Sn);break;default:throw Error(u(329))}}}return xt(e,Te()),e.callbackNode===n?Za.bind(null,e):null}function Es(e,t){var n=Dl;return e.current.memoizedState.isDehydrated&&(ar(e,t).flags|=256),e=Wi(e,t),e!==2&&(t=kt,kt=n,t!==null&&_s(t)),e}function _s(e){kt===null?kt=e:kt.push.apply(kt,e)}function sd(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],i=l.getSnapshot;l=l.value;try{if(!Yt(i(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wn(e,t){for(t&=~ws,t&=~Ii,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ye(t),r=1<<n;e[n]=-1,t&=~r}}function Ja(e){if((ge&6)!==0)throw Error(u(327));Gr();var t=Pr(e,0);if((t&1)===0)return xt(e,Te()),null;var n=Wi(e,t);if(e.tag!==0&&n===2){var r=Tn(e);r!==0&&(t=r,n=Es(e,r))}if(n===1)throw n=Fl,ar(e,0),Wn(e,t),xt(e,Te()),n;if(n===6)throw Error(u(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,cr(e,kt,Sn),xt(e,Te()),null}function Cs(e,t){var n=ge;ge|=1;try{return e(t)}finally{ge=n,ge===0&&(Yr=Te()+500,vi&&Dn())}}function ur(e){$n!==null&&$n.tag===0&&(ge&6)===0&&Gr();var t=ge;ge|=1;var n=Ut.transition,r=P;try{if(Ut.transition=null,P=1,e)return e()}finally{P=r,Ut.transition=n,ge=t,(ge&6)===0&&Dn()}}function Ns(){Mt=qr.current,Me(qr)}function ar(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,If(n)),We!==null)for(n=We.return;n!==null;){var r=n;switch(Fo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&hi();break;case 3:Hr(),Me(yt),Me(it),Yo();break;case 5:Ko(r);break;case 4:Hr();break;case 13:Me(Fe);break;case 19:Me(Fe);break;case 10:$o(r.type._context);break;case 22:case 23:Ns()}n=n.return}if(Xe=e,We=e=Hn(e.current,null),nt=Mt=t,Ke=0,Fl=null,ws=Ii=sr=0,kt=Dl=null,lr!==null){for(t=0;t<lr.length;t++)if(n=lr[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=l,r.next=s}n.pending=r}lr=null}return e}function ba(e,t){do{var n=We;try{if(Vo(),Ni.current=ji,Pi){for(var r=De.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Pi=!1}if(or=0,Ge=Qe=De=null,Tl=!1,jl=0,ys.current=null,n===null||n.return===null){Ke=1,Fl=t,We=null;break}e:{var i=e,s=n.return,a=n,f=t;if(t=nt,a.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var S=f,N=a,T=N.tag;if((N.mode&1)===0&&(T===0||T===11||T===15)){var C=N.alternate;C?(N.updateQueue=C.updateQueue,N.memoizedState=C.memoizedState,N.lanes=C.lanes):(N.updateQueue=null,N.memoizedState=null)}var D=_a(s);if(D!==null){D.flags&=-257,Ca(D,s,a,i,t),D.mode&1&&Ea(i,S,t),t=D,f=S;var H=t.updateQueue;if(H===null){var Q=new Set;Q.add(f),t.updateQueue=Q}else H.add(f);break e}else{if((t&1)===0){Ea(i,S,t),Ps();break e}f=Error(u(426))}}else if(ze&&a.mode&1){var $e=_a(s);if($e!==null){($e.flags&65536)===0&&($e.flags|=256),Ca($e,s,a,i,t),Ao(Qr(f,a));break e}}i=f=Qr(f,a),Ke!==4&&(Ke=2),Dl===null?Dl=[i]:Dl.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=ka(i,f,t);Yu(i,m);break e;case 1:a=f;var d=i.type,v=i.stateNode;if((i.flags&128)===0&&(typeof d.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Vn===null||!Vn.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var M=xa(i,a,t);Yu(i,M);break e}}i=i.return}while(i!==null)}nc(n)}catch(q){t=q,We===n&&n!==null&&(We=n=n.return);continue}break}while(!0)}function ec(){var e=Di.current;return Di.current=ji,e===null?ji:e}function Ps(){(Ke===0||Ke===3||Ke===2)&&(Ke=4),Xe===null||(sr&268435455)===0&&(Ii&268435455)===0||Wn(Xe,nt)}function Wi(e,t){var n=ge;ge|=2;var r=ec();(Xe!==e||nt!==t)&&(Sn=null,ar(e,t));do try{ud();break}catch(l){ba(e,l)}while(!0);if(Vo(),ge=n,Di.current=r,We!==null)throw Error(u(261));return Xe=null,nt=0,Ke}function ud(){for(;We!==null;)tc(We)}function ad(){for(;We!==null&&!no();)tc(We)}function tc(e){var t=ic(e.alternate,e,Mt);e.memoizedProps=e.pendingProps,t===null?nc(e):We=t,ys.current=null}function nc(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=td(n,t,Mt),n!==null){We=n;return}}else{if(n=nd(n,t),n!==null){n.flags&=32767,We=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ke=6,We=null;return}}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Ke===0&&(Ke=5)}function cr(e,t,n){var r=P,l=Ut.transition;try{Ut.transition=null,P=1,cd(e,t,n,r)}finally{Ut.transition=l,P=r}return null}function cd(e,t,n,r){do Gr();while($n!==null);if((ge&6)!==0)throw Error(u(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(u(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(z(e,i),e===Xe&&(We=Xe=null,nt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ui||(Ui=!0,oc(xr,function(){return Gr(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=Ut.transition,Ut.transition=null;var s=P;P=1;var a=ge;ge|=4,ys.current=null,ld(e,n),Ka(n,e),jf(Po),ei=!!No,Po=No=null,e.current=n,id(n),ro(),ge=a,P=s,Ut.transition=i}else e.current=n;if(Ui&&(Ui=!1,$n=e,Vi=l),i=e.pendingLanes,i===0&&(Vn=null),sl(n.stateNode),xt(e,Te()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(Ai)throw Ai=!1,e=ks,ks=null,e;return(Vi&1)!==0&&e.tag!==0&&Gr(),i=e.pendingLanes,(i&1)!==0?e===xs?Il++:(Il=0,xs=e):Il=0,Dn(),null}function Gr(){if($n!==null){var e=V(Vi),t=Ut.transition,n=P;try{if(Ut.transition=null,P=16>e?16:e,$n===null)var r=!1;else{if(e=$n,$n=null,Vi=0,(ge&6)!==0)throw Error(u(331));var l=ge;for(ge|=4,B=e.current;B!==null;){var i=B,s=i.child;if((B.flags&16)!==0){var a=i.deletions;if(a!==null){for(var f=0;f<a.length;f++){var S=a[f];for(B=S;B!==null;){var N=B;switch(N.tag){case 0:case 11:case 15:Ol(8,N,i)}var T=N.child;if(T!==null)T.return=N,B=T;else for(;B!==null;){N=B;var C=N.sibling,D=N.return;if($a(N),N===S){B=null;break}if(C!==null){C.return=D,B=C;break}B=D}}}var H=i.alternate;if(H!==null){var Q=H.child;if(Q!==null){H.child=null;do{var $e=Q.sibling;Q.sibling=null,Q=$e}while(Q!==null)}}B=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,B=s;else e:for(;B!==null;){if(i=B,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Ol(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,B=m;break e}B=i.return}}var d=e.current;for(B=d;B!==null;){s=B;var v=s.child;if((s.subtreeFlags&2064)!==0&&v!==null)v.return=s,B=v;else e:for(s=d;B!==null;){if(a=B,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Fi(9,a)}}catch(q){Ue(a,a.return,q)}if(a===s){B=null;break e}var M=a.sibling;if(M!==null){M.return=a.return,B=M;break e}B=a.return}}if(ge=l,Dn(),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Er,e)}catch{}r=!0}return r}finally{P=n,Ut.transition=t}}return!1}function rc(e,t,n){t=Qr(n,t),t=ka(e,t,1),e=An(e,t,1),t=ht(),e!==null&&(k(e,1,t),xt(e,t))}function Ue(e,t,n){if(e.tag===3)rc(e,e,n);else for(;t!==null;){if(t.tag===3){rc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Vn===null||!Vn.has(r))){e=Qr(n,e),e=xa(t,e,1),t=An(t,e,1),e=ht(),t!==null&&(k(t,1,e),xt(t,e));break}}t=t.return}}function fd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ht(),e.pingedLanes|=e.suspendedLanes&n,Xe===e&&(nt&n)===n&&(Ke===4||Ke===3&&(nt&130023424)===nt&&500>Te()-Ss?ar(e,0):ws|=n),xt(e,t)}function lc(e,t){t===0&&((e.mode&1)===0?t=1:(t=Nr,Nr<<=1,(Nr&130023424)===0&&(Nr=4194304)));var n=ht();e=gn(e,t),e!==null&&(k(e,t,n),xt(e,n))}function dd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lc(e,n)}function pd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),lc(e,n)}var ic;ic=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yt.current)St=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return St=!1,ed(e,t,n);St=(e.flags&131072)!==0}else St=!1,ze&&(t.flags&1048576)!==0&&Au(t,yi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Li(e,t),e=t.pendingProps;var l=Ir(t,it.current);Wr(t,n),l=Zo(null,t,r,e,l,n);var i=Jo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,wt(r)?(i=!0,mi(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ho(t),l.updater=Mi,t.stateNode=l,l._reactInternals=t,ls(t,r,e,n),t=us(null,t,r,!0,i,n)):(t.tag=0,ze&&i&&Oo(t),pt(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Li(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=md(r),e=Xt(r,e),l){case 0:t=ss(null,t,r,e,n);break e;case 1:t=Ma(null,t,r,e,n);break e;case 11:t=Na(null,t,r,e,n);break e;case 14:t=Pa(null,t,r,Xt(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Xt(r,l),ss(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Xt(r,l),Ma(e,t,r,l,n);case 3:e:{if(za(t),e===null)throw Error(u(387));r=t.pendingProps,i=t.memoizedState,l=i.element,qu(e,t),_i(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=Qr(Error(u(423)),t),t=La(e,t,r,n,l);break e}else if(r!==l){l=Qr(Error(u(424)),t),t=La(e,t,r,n,l);break e}else for(jt=Ln(t.stateNode.containerInfo.firstChild),Tt=t,ze=!0,Gt=null,n=Qu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vr(),r===l){t=wn(e,t,n);break e}pt(e,t,r,n)}t=t.child}return t;case 5:return Xu(t),e===null&&Io(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,s=l.children,Ro(r,l)?s=null:i!==null&&Ro(r,i)&&(t.flags|=32),ja(e,t),pt(e,t,s,n),t.child;case 6:return e===null&&Io(t),null;case 13:return Oa(e,t,n);case 4:return Qo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$r(t,null,r,n):pt(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Xt(r,l),Na(e,t,r,l,n);case 7:return pt(e,t,t.pendingProps,n),t.child;case 8:return pt(e,t,t.pendingProps.children,n),t.child;case 12:return pt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,s=l.value,Re(ki,r._currentValue),r._currentValue=s,i!==null)if(Yt(i.value,s)){if(i.children===l.children&&!yt.current){t=wn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var f=a.firstContext;f!==null;){if(f.context===r){if(i.tag===1){f=yn(-1,n&-n),f.tag=2;var S=i.updateQueue;if(S!==null){S=S.shared;var N=S.pending;N===null?f.next=f:(f.next=N.next,N.next=f),S.pending=f}}i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),Bo(i.return,n,t),a.lanes|=n;break}f=f.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(u(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Bo(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}pt(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Wr(t,n),l=It(l),r=r(l),t.flags|=1,pt(e,t,r,n),t.child;case 14:return r=t.type,l=Xt(r,t.pendingProps),l=Xt(r.type,l),Pa(e,t,r,l,n);case 15:return Ra(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Xt(r,l),Li(e,t),t.tag=1,wt(r)?(e=!0,mi(t)):e=!1,Wr(t,n),wa(t,r,l),ls(t,r,l,n),us(null,t,r,!0,e,n);case 19:return Da(e,t,n);case 22:return Ta(e,t,n)}throw Error(u(156,t.tag))};function oc(e,t){return kr(e,t)}function hd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,n,r){return new hd(e,t,n,r)}function Rs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function md(e){if(typeof e=="function")return Rs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===U)return 11;if(e===at)return 14}return 2}function Hn(e,t){var n=e.alternate;return n===null?(n=Vt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hi(e,t,n,r,l,i){var s=2;if(r=e,typeof e=="function")Rs(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ee:return fr(n.children,l,i,t);case Se:s=8,l|=8;break;case Ie:return e=Vt(12,n,t,l|2),e.elementType=Ie,e.lanes=i,e;case we:return e=Vt(13,n,t,l),e.elementType=we,e.lanes=i,e;case Ve:return e=Vt(19,n,t,l),e.elementType=Ve,e.lanes=i,e;case Ee:return Qi(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Je:s=10;break e;case Be:s=9;break e;case U:s=11;break e;case at:s=14;break e;case qe:s=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=Vt(s,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function fr(e,t,n,r){return e=Vt(7,e,r,t),e.lanes=n,e}function Qi(e,t,n,r){return e=Vt(22,e,r,t),e.elementType=Ee,e.lanes=n,e.stateNode={isHidden:!1},e}function Ts(e,t,n){return e=Vt(6,e,null,t),e.lanes=n,e}function js(e,t,n){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vd(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=g(0),this.expirationTimes=g(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=g(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ms(e,t,n,r,l,i,s,a,f){return e=new vd(e,t,n,a,f),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Vt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ho(i),e}function gd(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ce,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function sc(e){if(!e)return Fn;e=e._reactInternals;e:{if(cn(e)!==e||e.tag!==1)throw Error(u(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(wt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(u(171))}if(e.tag===1){var n=e.type;if(wt(n))return Fu(e,n,t)}return t}function uc(e,t,n,r,l,i,s,a,f){return e=Ms(n,r,!0,e,l,i,s,a,f),e.context=sc(null),n=e.current,r=ht(),l=Bn(n),i=yn(r,l),i.callback=t??null,An(n,i,l),e.current.lanes=l,k(e,l,r),xt(e,r),e}function Ki(e,t,n,r){var l=t.current,i=ht(),s=Bn(l);return n=sc(n),t.context===null?t.context=n:t.pendingContext=n,t=yn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=An(l,t,s),e!==null&&(bt(e,l,s,i),Ei(e,l,s)),s}function qi(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ac(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zs(e,t){ac(e,t),(e=e.alternate)&&ac(e,t)}function yd(){return null}var cc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ls(e){this._internalRoot=e}Yi.prototype.render=Ls.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));Ki(e,t,null,null)},Yi.prototype.unmount=Ls.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ur(function(){Ki(null,e,null,null)}),t[pn]=null}};function Yi(e){this._internalRoot=e}Yi.prototype.unstable_scheduleHydration=function(e){if(e){var t=xe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<oe.length&&t!==0&&t<oe[n].priority;n++);oe.splice(n,0,e),n===0&&cl(e)}};function Os(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Gi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fc(){}function wd(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var S=qi(s);i.call(S)}}var s=uc(t,r,e,0,null,!1,!1,"",fc);return e._reactRootContainer=s,e[pn]=s.current,kl(e.nodeType===8?e.parentNode:e),ur(),s}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var a=r;r=function(){var S=qi(f);a.call(S)}}var f=Ms(e,0,!1,null,null,!1,!1,"",fc);return e._reactRootContainer=f,e[pn]=f.current,kl(e.nodeType===8?e.parentNode:e),ur(function(){Ki(t,f,n,r)}),f}function Xi(e,t,n,r,l){var i=n._reactRootContainer;if(i){var s=i;if(typeof l=="function"){var a=l;l=function(){var f=qi(s);a.call(f)}}Ki(t,s,e,l)}else s=wd(n,t,e,l,r);return qi(s)}he=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=bn(t.pendingLanes);n!==0&&(L(t,n|1),xt(t,Te()),(ge&6)===0&&(Yr=Te()+500,Dn()))}break;case 13:ur(function(){var r=gn(e,1);if(r!==null){var l=ht();bt(r,e,1,l)}}),zs(e,1)}},ke=function(e){if(e.tag===13){var t=gn(e,134217728);if(t!==null){var n=ht();bt(t,e,134217728,n)}zs(e,134217728)}},Oe=function(e){if(e.tag===13){var t=Bn(e),n=gn(e,t);if(n!==null){var r=ht();bt(n,e,t,r)}zs(e,t)}},xe=function(){return P},lt=function(e,t){var n=P;try{return P=e,t()}finally{P=n}},Nn=function(e,t,n){switch(t){case"input":if(ft(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=pi(r);if(!l)throw Error(u(90));Wl(r),ft(r,l)}}}break;case"textarea":qn(e,n);break;case"select":t=n.value,t!=null&&xn(e,!!n.multiple,t,!1)}},_t=Cs,zt=ur;var Sd={usingClientEntryPoint:!1,Events:[_l,Fr,pi,ll,Ht,Cs]},Al={findFiberByHostInstance:er,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},kd={bundleType:Al.bundleType,version:Al.version,rendererPackageName:Al.rendererPackageName,rendererConfig:Al.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:K.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Yl(e),e===null?null:e.stateNode},findFiberByHostInstance:Al.findFiberByHostInstance||yd,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zi.isDisabled&&Zi.supportsFiber)try{Er=Zi.inject(kd),Ot=Zi}catch{}}return Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sd,Et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Os(t))throw Error(u(200));return gd(e,t,null,n)},Et.createRoot=function(e,t){if(!Os(e))throw Error(u(299));var n=!1,r="",l=cc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Ms(e,1,!1,null,null,n,!1,r,l),e[pn]=t.current,kl(e.nodeType===8?e.parentNode:e),new Ls(t)},Et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=Yl(t),e=e===null?null:e.stateNode,e},Et.flushSync=function(e){return ur(e)},Et.hydrate=function(e,t,n){if(!Gi(t))throw Error(u(200));return Xi(null,e,t,!0,n)},Et.hydrateRoot=function(e,t,n){if(!Os(e))throw Error(u(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",s=cc;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=uc(t,null,e,1,n??null,l,!1,i,s),e[pn]=t.current,kl(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Yi(t)},Et.render=function(e,t,n){if(!Gi(t))throw Error(u(200));return Xi(null,e,t,!1,n)},Et.unmountComponentAtNode=function(e){if(!Gi(e))throw Error(u(40));return e._reactRootContainer?(ur(function(){Xi(null,null,e,!1,function(){e._reactRootContainer=null,e[pn]=null})}),!0):!1},Et.unstable_batchedUpdates=Cs,Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gi(n))throw Error(u(200));if(e==null||e._reactInternals===void 0)throw Error(u(38));return Xi(e,t,n,!1,r)},Et.version="18.3.1-next-f1338f8080-20240426",Et}var wc;function Md(){if(wc)return Is.exports;wc=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),Is.exports=jd(),Is.exports}var Sc;function zd(){if(Sc)return Ji;Sc=1;var c=Md();return Ji.createRoot=c.createRoot,Ji.hydrateRoot=c.hydrateRoot,Ji}var Ld=zd();const Od="modulepreload",Fd=function(c){return"/"+c},kc={},zc=function(o,u,w){let p=Promise.resolve();if(u&&u.length>0){let x=function($){return Promise.all($.map(Z=>Promise.resolve(Z).then(W=>({status:"fulfilled",value:W}),W=>({status:"rejected",reason:W}))))};document.getElementsByTagName("link");const j=document.querySelector("meta[property=csp-nonce]"),A=(j==null?void 0:j.nonce)||(j==null?void 0:j.getAttribute("nonce"));p=x(u.map($=>{if($=Fd($),$ in kc)return;kc[$]=!0;const Z=$.endsWith(".css"),W=Z?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${$}"]${W}`))return;const F=document.createElement("link");if(F.rel=Z?"stylesheet":Od,Z||(F.as="script"),F.crossOrigin="",F.href=$,A&&F.setAttribute("nonce",A),document.head.appendChild(F),Z)return new Promise((Y,J)=>{F.addEventListener("load",Y),F.addEventListener("error",()=>J(new Error(`Unable to preload CSS for ${$}`)))})}))}function E(x){const j=new Event("vite:preloadError",{cancelable:!0});if(j.payload=x,window.dispatchEvent(j),!j.defaultPrevented)throw x}return p.then(x=>{for(const j of x||[])j.status==="rejected"&&E(j.reason);return o().catch(E)})};var R=qs();function xc(c){return[...c.toLocaleLowerCase().matchAll(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu)].map(o=>({value:o[0],start:o.index??0}))}function Vs(c,o){if(!o.length||o.length>c.length)return!1;for(let u=0;u<=c.length-o.length;u++)if(o.every((w,p)=>c[u+p]===w))return!0;return!1}function Dd(c,o){const u=c.trim(),w=xc(u),p=xc(o).map(({value:j})=>j),E=w.map(({value:j})=>j);if(E.join(" ")==="it seems like"&&Vs(p,E))return"";if(w.length<5||p.length<5)return u;if(Vs(p,E))return"";for(let j=w.length-1;j>=5;j--)if(Vs(p,E.slice(0,j)))return u.slice(w[j].start).replace(/^[\s,.;:!?—-]+/u,"").trim();return u}class Id{constructor(o,u,w=()=>{},p=()=>{}){X(this,"recordings",[]);X(this,"transcripts",[]);X(this,"hearing",!1);X(this,"pumpingEpoch",null);X(this,"active",null);X(this,"epoch",0);X(this,"transcribe");X(this,"send");X(this,"report");X(this,"changed");this.transcribe=o,this.send=u,this.report=w,this.changed=p}get busy(){return this.pumpingEpoch!==null||this.recordings.length>0||this.transcripts.length>0}speechStarted(){this.hearing=!0,this.changed()}speechEnded(o){this.hearing=!1,this.recordings.push(o),this.changed(),this.pump()}speechDiscarded(){this.hearing=!1,this.changed(),this.pump()}reset(){var o;this.epoch++,(o=this.active)==null||o.abort(),this.active=null,this.recordings=[],this.transcripts=[],this.hearing=!1,this.pumpingEpoch=null,this.changed()}pump(){const o=this.epoch;this.pumpingEpoch!==o&&(this.pumpingEpoch=o,this.changed(),(async()=>{try{for(;this.recordings.length&&o===this.epoch;){const w=this.recordings.shift(),p=new AbortController;this.active=p;try{const E=(await this.transcribe(w,p.signal)).trim();o===this.epoch&&E&&this.transcripts.push(E)}catch(E){if(o===this.epoch&&!p.signal.aborted)throw E}finally{this.active===p&&(this.active=null),o===this.epoch&&this.changed()}}if(o!==this.epoch||this.hearing||this.recordings.length||!this.transcripts.length)return;const u=this.transcripts.join(" ").trim();this.transcripts=[],this.changed(),u&&await this.send(u)}catch(u){o===this.epoch&&this.report(u)}finally{this.pumpingEpoch===o&&(this.pumpingEpoch=null,this.changed(),o===this.epoch&&!this.hearing&&(this.recordings.length||this.transcripts.length)&&this.pump())}})())}}const Ad=2e3;class Ud{constructor(o=Ad){X(this,"tail",Promise.resolve());X(this,"_active",!1);X(this,"_flushing",!1);X(this,"epoch",0);X(this,"timeoutMs");X(this,"invalid",new WeakSet);this.timeoutMs=o}get acceptsCallbacks(){return this._active||this._flushing}pause(o){if(this.invalid.has(o))return Promise.reject(new Error("VAD transition is invalidated."));const u=this.epoch;return this._active=!1,this.enqueue(async()=>{u===this.epoch&&await this.withTimeout(o,o.pause(),"pause")})}start(o){if(this.invalid.has(o))return Promise.reject(new Error("VAD transition is invalidated."));const u=this.epoch;return this.enqueue(async()=>{u===this.epoch&&(await this.withTimeout(o,o.start(),"start"),u===this.epoch&&(this._active=!0))})}flush(o){if(this.invalid.has(o))return Promise.reject(new Error("VAD transition is invalidated."));const u=this.epoch;return this.enqueue(async()=>{if(u===this.epoch){this._flushing=!0;try{await this.withTimeout(o,o.pause(),"pause"),await this.withTimeout(o,o.start(),"start"),u===this.epoch&&(this._active=!0)}finally{u===this.epoch&&(this._flushing=!1)}}})}beginSession(){this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}deactivate(){this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}isInvalid(o){return this.invalid.has(o)}enqueue(o){const u=this.tail.then(o,o);return this.tail=u.catch(()=>{}),u}withTimeout(o,u,w){return new Promise((p,E)=>{const x=globalThis.setTimeout(()=>{this.invalidate(o),E(new Error(`VAD ${w} timed out.`))},this.timeoutMs);u.then(()=>{globalThis.clearTimeout(x),p()},j=>{globalThis.clearTimeout(x),E(j)})})}invalidate(o){this.invalid.add(o),this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}}function Vd(c,o,u,w,p,E){return c===o&&u===w&&!p&&E}const $d=350;class Bd{constructor(o,u){X(this,"preRoll",[]);X(this,"current",null);X(this,"segments",new Set);X(this,"ended",new WeakMap);X(this,"request");X(this,"preview");this.request=o,this.preview=u}frame(o,u){const w=u.slice(),p=this.current;if(!p){this.preRoll.push(w),this.preRoll.length>14&&this.preRoll.shift();return}p.frames.push(w),o>=.35?(p.revision++,p.quiet=0):p.quiet++,p.confirmed&&!p.pending&&p.requested!==p.revision&&(p.quiet>=6||p.frames.length-p.lastRequest>=63)&&this.speculate(p)}begin(){const o={frames:this.preRoll,revision:1,quiet:0,confirmed:!1,requested:-1,lastRequest:0,controller:new AbortController};this.preRoll=[],this.current=o,this.segments.add(o),this.preview("")}confirm(){this.current&&(this.current.confirmed=!0)}end(o){this.current&&this.ended.set(o,this.current),this.current=null,this.preRoll=[]}async finish(o,u){var E;const w=this.ended.get(o);if(this.ended.delete(o),!w)return this.request(o,u);const p=()=>w.controller.abort(u.reason);u.addEventListener("abort",p,{once:!0}),u.aborted&&p();try{const x=w.pending;return x&&!await Wd(x,$d,u)&&w.controller.abort(new DOMException("Speculative transcription timed out.","AbortError")),u.throwIfAborted(),((E=w.result)==null?void 0:E.revision)===w.revision&&w.result.text.trim()?w.result.text:await this.request(o,u)}finally{u.removeEventListener("abort",p),this.segments.delete(w)}}discard(){this.current&&(this.current.controller.abort(),this.segments.delete(this.current)),this.current=null,this.preRoll=[],this.preview("")}reset(){for(const o of this.segments)o.controller.abort();this.segments.clear(),this.ended=new WeakMap,this.discard()}samples(o){const u=new Float32Array(o.frames.reduce((p,E)=>p+E.length,0));let w=0;for(const p of o.frames)u.set(p,w),w+=p.length;return u}speculate(o){const u=o.revision;o.requested=u,o.lastRequest=o.frames.length,o.pending=this.request(this.samples(o),o.controller.signal).then(w=>{o.controller.signal.aborted||(o.result={revision:u,text:w},this.current===o&&this.preview(w))}).catch(()=>{}).finally(()=>{o.pending=void 0})}}function Wd(c,o,u){return new Promise((w,p)=>{if(u.aborted)return p(u.reason);const E=globalThis.setTimeout(A,o),x=()=>{$(),p(u.reason)},j=()=>{$(),w(!0)};function A(){$(),w(!1)}function $(){globalThis.clearTimeout(E),u.removeEventListener("abort",x)}u.addEventListener("abort",x,{once:!0}),c.then(j,j)})}class Hd{constructor(){X(this,"mode","idle");X(this,"interruptOnConfirm",!1)}speechStart(o){return this.mode="candidate",this.interruptOnConfirm=o,{duck:o,begin:!0,accepted:!1}}speechRealStart(){return this.mode==="candidate"?(this.mode="accepted",{interrupt:this.interruptOnConfirm,begin:!1,accepted:!0}):{interrupt:!1,begin:!1,accepted:this.mode==="accepted"}}speechEnd(){const o=this.mode==="accepted";return this.reset(),o}reset(){this.mode="idle",this.interruptOnConfirm=!1}}function Ec(c,o,u,w){return async p=>{p.throwIfAborted();const E=o.createAnalyser();E.fftSize=128,E.connect(u);const x=o.createBufferSource();x.buffer=c,x.connect(E),await new Promise((j,A)=>{const $=()=>{x.onended=null;try{x.stop()}catch{}x.disconnect(),E.disconnect(),A(p.reason)};x.onended=()=>{p.removeEventListener("abort",$),x.disconnect(),E.disconnect(),j()},p.addEventListener("abort",$,{once:!0}),x.start(),w(E),p.aborted&&$()})}}class Qd{constructor(o,u,w){X(this,"run",this.fresh());X(this,"synthesize");X(this,"changed");X(this,"reportError");this.synthesize=o,this.changed=u,this.reportError=w}get busy(){const o=this.run;return o.generating||o.playing||o.text.length>0||o.audio.length>0}enqueue(o){this.run.text.push(...o),this.pump(this.run)}cancel(){const o=this.run;this.run=this.fresh(),o.text=[],o.audio=[],o.controller.abort(),this.changed()}fresh(){return{controller:new AbortController,text:[],audio:[],hasDispatchedSpeech:!1,generating:!1,playing:!1}}fail(o,u){o!==this.run||o.controller.signal.aborted||(this.cancel(),this.reportError(u))}pump(o){if(o!==this.run||o.controller.signal.aborted)return;const u=o.controller.signal;if(!o.playing&&o.audio.length){const w=o.audio.shift();o.playing=!0,(async()=>{try{await w(u)}catch(p){this.fail(o,p)}finally{o.playing=!1,o===this.run&&this.pump(o)}})()}if(!o.generating&&o.audio.length<2&&o.text.length){let w=o.text.shift();if(o.hasDispatchedSpeech)for(;o.text.length&&w.length+o.text[0].length+1<=600;)w+=` ${o.text.shift()}`;o.hasDispatchedSpeech=!0,o.generating=!0,(async()=>{try{const p=await this.synthesize(w,u);o===this.run&&!u.aborted&&(o.audio.push(p),this.pump(o)),await p.completed}catch(p){this.fail(o,p)}finally{o.generating=!1,o===this.run&&this.pump(o)}})()}this.changed()}}const Lc=.45,Oc=.3,Fc=160,Dc=320,Ic=1e3,Kd={positiveSpeechThreshold:Lc,negativeSpeechThreshold:Oc,minSpeechMs:Fc,preSpeechPadMs:Dc,redemptionMs:Ic},Bs=512,Ws=16e3,qd=2e4,Yd={frameSamples:Bs,sampleRate:Ws,positiveSpeechThreshold:Lc,negativeSpeechThreshold:Oc,minSpeechMs:Fc,redemptionMs:Ic,preSpeechPadMs:Dc,maxSpeechMs:qd,noiseFloorWindowFrames:100,noiseFloorPercentile:.3,noiseFloorMarginDb:6,noiseFloorRangeDb:24,minFloorRms:.0015,submitUserSpeechOnPause:!1};function Gd(c){let o=0;for(let u=0;u<c.length;u++)o+=c[u]*c[u];return Math.sqrt(o/Math.max(1,c.length))}function _c(c){return 20*Math.log10(Math.max(c,1e-8))}function Xd(c){return Math.min(1,Math.max(0,c))}function Zd(c){const o=c.reduce((p,E)=>p+E.length,0),u=new Float32Array(o);let w=0;for(const p of c)u.set(p,w),w+=p.length;return u}class Jd{constructor(o={}){X(this,"options");X(this,"msPerFrame");X(this,"minSpeechFrames",1);X(this,"redemptionFrames",1);X(this,"preSpeechPadFrames",0);X(this,"maxSpeechFrames",1);X(this,"state","silence");X(this,"ring",[]);X(this,"recorded",[]);X(this,"activeFrames",0);X(this,"silenceFrames",0);X(this,"noiseFloorSamples",[]);X(this,"active",!0);this.options={...Yd,...o},this.msPerFrame=this.options.frameSamples/this.options.sampleRate*1e3,this.recalculateFrameCounts()}recalculateFrameCounts(){this.minSpeechFrames=Math.max(1,Math.ceil(this.options.minSpeechMs/this.msPerFrame)),this.redemptionFrames=Math.max(1,Math.ceil(this.options.redemptionMs/this.msPerFrame)),this.preSpeechPadFrames=Math.max(0,Math.ceil(this.options.preSpeechPadMs/this.msPerFrame)),this.maxSpeechFrames=Math.max(this.minSpeechFrames,Math.ceil(this.options.maxSpeechMs/this.msPerFrame))}setOptions(o){this.options={...this.options,...o},this.recalculateFrameCounts()}get noiseFloor(){return this.estimateNoiseFloor()}get speaking(){return this.state==="speech"}reset(){this.state="silence",this.ring=[],this.recorded=[],this.activeFrames=0,this.silenceFrames=0}resume(){this.active=!0}pause(){return this.active=!1,this.options.submitUserSpeechOnPause?this.endSegment():(this.reset(),[])}endSegment(){const o=[];return this.state==="speech"?o.push({type:"speech-end",samples:Zd(this.recorded)}):this.state==="maybe"&&o.push({type:"misfire"}),this.reset(),o}process(o){if(!this.active)return{probability:0,events:[]};const u=Gd(o);this.state==="silence"&&this.pushNoiseFloorSample(u);const w=this.estimateNoiseFloor(),p=Xd((_c(u)-_c(w)-this.options.noiseFloorMarginDb)/this.options.noiseFloorRangeDb),E=[];if(this.state==="silence")return this.pushRing(o),p>=this.options.positiveSpeechThreshold&&(this.state="maybe",this.recorded=[...this.ring],this.activeFrames=1,this.silenceFrames=0,E.push({type:"speech-start"})),{probability:p,events:E};this.recorded.push(o),p>=this.options.negativeSpeechThreshold?(this.silenceFrames=0,this.activeFrames++,this.state==="maybe"&&this.activeFrames>=this.minSpeechFrames&&(this.state="speech",E.push({type:"speech-real-start"}))):this.silenceFrames++;const j=this.recorded.length>=this.maxSpeechFrames,A=this.silenceFrames>=this.redemptionFrames;return(j||A)&&E.push(...this.endSegment()),{probability:p,events:E}}pushRing(o){this.ring.push(o),this.ring.length>this.preSpeechPadFrames&&this.ring.shift()}pushNoiseFloorSample(o){this.noiseFloorSamples.push(o),this.noiseFloorSamples.length>this.options.noiseFloorWindowFrames&&this.noiseFloorSamples.shift()}estimateNoiseFloor(){if(this.noiseFloorSamples.length===0)return this.options.minFloorRms;const o=[...this.noiseFloorSamples].sort((w,p)=>w-p),u=Math.min(o.length-1,Math.floor(o.length*this.options.noiseFloorPercentile));return Math.max(this.options.minFloorRms,o[u])}}class bd{constructor(o,u,w){X(this,"inputBuffer",[]);this.nativeSampleRate=o,this.targetSampleRate=u,this.targetFrameSize=w}process(o){const u=[];for(const w of o)for(this.inputBuffer.push(w);this.hasEnoughDataForFrame();)u.push(this.generateOutputFrame());return u}hasEnoughDataForFrame(){return this.inputBuffer.length*this.targetSampleRate/this.nativeSampleRate>=this.targetFrameSize}generateOutputFrame(){const o=new Float32Array(this.targetFrameSize);let u=0,w=0;for(;u<this.targetFrameSize;){let p=0,E=0;const x=Math.min(this.inputBuffer.length,(u+1)*this.nativeSampleRate/this.targetSampleRate);for(;w<x;){const j=this.inputBuffer[w];j!==void 0&&(p+=j,E++),w++}o[u]=E>0?p/E:0,u++}return this.inputBuffer=this.inputBuffer.slice(w),o}}const ep=`
42
- class EnergyVadWorkletProcessor extends AudioWorkletProcessor {
43
- constructor(options) {
44
- super();
45
- this.targetSampleRate = options.processorOptions.targetSampleRate;
46
- this.targetFrameSize = options.processorOptions.targetFrameSize;
47
- this.inputBuffer = [];
48
- }
49
- process(inputs) {
50
- const channel = inputs[0] && inputs[0][0];
51
- if (!channel) return true;
52
- for (let i = 0; i < channel.length; i++) {
53
- this.inputBuffer.push(channel[i]);
54
- while ((this.inputBuffer.length * this.targetSampleRate) / sampleRate >= this.targetFrameSize) {
55
- const frame = new Float32Array(this.targetFrameSize);
56
- let outputIndex = 0;
57
- let inputIndex = 0;
58
- while (outputIndex < this.targetFrameSize) {
59
- let sum = 0;
60
- let count = 0;
61
- const limit = Math.min(this.inputBuffer.length, ((outputIndex + 1) * sampleRate) / this.targetSampleRate);
62
- while (inputIndex < limit) {
63
- const value = this.inputBuffer[inputIndex];
64
- if (value !== undefined) { sum += value; count++; }
65
- inputIndex++;
66
- }
67
- frame[outputIndex] = count > 0 ? sum / count : 0;
68
- outputIndex++;
69
- }
70
- this.inputBuffer = this.inputBuffer.slice(inputIndex);
71
- this.port.postMessage(frame);
72
- }
73
- }
74
- return true;
75
- }
76
- }
77
- registerProcessor("energy-vad-worklet-processor", EnergyVadWorkletProcessor);
78
- `;class Ys{constructor(o){X(this,"options");X(this,"processor");X(this,"initState","uninitialized");X(this,"stream",null);X(this,"sourceNode",null);X(this,"workletNode",null);X(this,"scriptNode",null);X(this,"workletModuleUrl",null);X(this,"listening",!1);X(this,"handleFrame",o=>{const u=this.processor.process(o);this.options.onFrameProcessed({isSpeech:u.probability,notSpeech:1-u.probability},o);for(const w of u.events)this.dispatch(w)});X(this,"start",async()=>{switch(this.initState){case"uninitialized":{this.initState="initializing",this.processor.resume();try{this.stream=await this.options.getStream(),await this.attachAudioGraph(),this.listening=!0,this.initState="initialized"}catch(o){throw this.initState="errored",o}return}case"initialized":{if(this.listening)return;this.processor.resume(),this.stream=this.options.resumeStream?await this.options.resumeStream(this.stream):this.stream,await this.attachAudioGraph(),this.listening=!0;return}default:return}});X(this,"pause",async()=>{if(!this.listening)return;this.listening=!1;const o=this.processor.pause();for(const u of o)this.dispatch(u);this.stream&&this.options.pauseStream&&await this.options.pauseStream(this.stream),this.detachAudioGraph()});X(this,"destroy",async()=>{this.initState!=="destroyed"&&(this.listening&&await this.pause(),this.initState="destroyed",this.workletModuleUrl&&(URL.revokeObjectURL(this.workletModuleUrl),this.workletModuleUrl=null))});X(this,"setOptions",o=>{this.processor.setOptions(o)});this.options=o,this.processor=new Jd({positiveSpeechThreshold:o.positiveSpeechThreshold,negativeSpeechThreshold:o.negativeSpeechThreshold,minSpeechMs:o.minSpeechMs,preSpeechPadMs:o.preSpeechPadMs,redemptionMs:o.redemptionMs,maxSpeechMs:o.maxSpeechMs,submitUserSpeechOnPause:o.submitUserSpeechOnPause??!1})}static async new(o){return new Ys(o)}dispatch(o){switch(o.type){case"speech-start":this.options.onSpeechStart();return;case"speech-real-start":this.options.onSpeechRealStart();return;case"misfire":this.options.onVADMisfire();return;case"speech-end":this.options.onSpeechEnd(o.samples);return}}async attachAudioGraph(){const o=this.options.audioContext,u=this.stream;if(!u)throw new Error("Energy VAD has no active microphone stream.");if(this.sourceNode=new MediaStreamAudioSourceNode(o,{mediaStream:u}),this.canUseAudioWorklet(o))try{await this.attachAsWorklet(o),this.sourceNode.connect(this.workletNode);return}catch{this.workletNode=null}this.attachAsScriptProcessor(o),this.sourceNode.connect(this.scriptNode)}canUseAudioWorklet(o){return"audioWorklet"in o&&typeof AudioWorkletNode=="function"}async attachAsWorklet(o){if(!this.workletModuleUrl){const u=new Blob([ep],{type:"application/javascript"});this.workletModuleUrl=URL.createObjectURL(u)}await o.audioWorklet.addModule(this.workletModuleUrl),this.workletNode=new AudioWorkletNode(o,"energy-vad-worklet-processor",{numberOfInputs:1,numberOfOutputs:0,channelCount:1,processorOptions:{targetSampleRate:Ws,targetFrameSize:Bs}}),this.workletNode.port.onmessage=u=>{this.handleFrame(u.data)}}attachAsScriptProcessor(o){const u=new bd(o.sampleRate,Ws,Bs),p=o.createScriptProcessor(4096,1,1);let E=!1;p.onaudioprocess=x=>{if(!E){E=!0;try{const j=x.inputBuffer.getChannelData(0);x.outputBuffer.getChannelData(0).fill(0);for(const $ of u.process(j))this.handleFrame($)}finally{E=!1}}},p.connect(o.destination),this.scriptNode=p}detachAudioGraph(){var o;(o=this.sourceNode)==null||o.disconnect(),this.sourceNode=null,this.workletNode&&(this.workletNode.port.onmessage=null,this.workletNode.disconnect(),this.workletNode=null),this.scriptNode&&(this.scriptNode.onaudioprocess=null,this.scriptNode.disconnect(),this.scriptNode=null)}}function Ac(c){return c.replace(/```[\s\S]*?(?:```|$)/g," Code is shown on screen. ").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/<[^>]*>/g,"").replace(/[*_`#>|]/g,"").replace(/\s+/g," ").trim()}function tp(c,o){let u=!1,w=!1,p=0,E=!1;for(let x=0;x<c.length;x++){if(c.startsWith("```",x)){u=!u,x+=2;continue}if(u)continue;if(c[x]==="`"){w=!w;continue}if(w)continue;if(c[x]==="["&&p++,c[x]==="]"&&(p=Math.max(0,p-1),c[x+1]==="("&&(E=!0)),E){c[x]===")"&&(E=!1);continue}if(p)continue;const A=(/[.!?。!?]/.test(c[x])||o&&/[,;:,;:]/.test(c[x]))&&(/[。!?,;:]/.test(c[x])||/\s/.test(c[x+1]||"")),$=c[x]==="."&&/(?:\b(?:Mr|Mrs|Ms|Dr|Prof|St|vs|etc)|\b[A-Za-z])\.$/i.test(c.slice(0,x+1)),Z=o?48:160;if(A&&!$||c[x]===`
79
- `||c[x]==="—"||x>=Z&&/\s/.test(c[x]))return x+1}return 0}function np(c,o,u){var p;let w=0;for(;w<c.length;){const E=tp(c.slice(w),u)||(o?c.length-w:0);if(!E)return 0;if(w+=E,(((p=Ac(c.slice(0,w).replace(/—/g," ")).match(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu))==null?void 0:p.length)??0)>(u?5:3)||o&&w===c.length)return w}return 0}function Cc(c,o=!1,u=!1){const w=[];let p=0,E=u;for(;p<c.length;){const x=np(c.slice(p),o,E);if(!x)break;const j=Ac(c.slice(p,p+x).replace(/—$/,"").replace(/—/g,", "));j&&(w.push(j),E=!1),p+=x}return{chunks:w,rest:o?"":c.slice(p)}}function Nc(c,o,u){return c||o||u}function rp(c){const o=new ArrayBuffer(44+c.length*2),u=new DataView(o),w=(p,E)=>[...E].forEach((x,j)=>u.setUint8(p+j,x.charCodeAt(0)));return w(0,"RIFF"),u.setUint32(4,36+c.length*2,!0),w(8,"WAVEfmt "),u.setUint32(16,16,!0),u.setUint16(20,1,!0),u.setUint16(22,1,!0),u.setUint32(24,16e3,!0),u.setUint32(28,32e3,!0),u.setUint16(32,2,!0),u.setUint16(34,16,!0),w(36,"data"),u.setUint32(40,c.length*2,!0),c.forEach((p,E)=>u.setInt16(44+E*2,Math.max(-1,Math.min(1,p))*(p<0?32768:32767),!0)),new Blob([o],{type:"audio/wav"})}function Hs(){const c=globalThis.crypto;if(c&&typeof c.randomUUID=="function")return c.randomUUID();const o=new Uint8Array(16);if(c)c.getRandomValues(o);else for(let u=0;u<o.length;u+=1)o[u]=Math.floor(Math.random()*256);return Array.from(o,u=>u.toString(16).padStart(2,"0")).join("")}const Uc="meldivo.token",lp="meldivo.token";let Zr;function ip(){try{window.localStorage.removeItem(lp)}catch{}const o=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("token");if(o){try{window.sessionStorage.setItem(Uc,o)}catch{}Zr=o;try{window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}`)}catch{}}}function op(){if(Zr!==void 0)return Zr;try{Zr=window.sessionStorage.getItem(Uc)}catch{Zr=null}return Zr}function rt(){const c=op();return c?{"X-Meldivo-Token":c}:{}}class dr extends Error{constructor(){super("Unauthorized"),this.name="UnauthorizedError"}}function pr(c){if(c.status===401)throw new dr;return c}const sp="voice-assistant-microphone",Qs="voice-assistant-microphone-owner",up=15e3,ap=5e3,cp=5e3;function bi(){try{const c=window.localStorage.getItem(Qs);if(!c)return null;const o=JSON.parse(c);return typeof o.id!="string"||typeof o.expiresAt!="number"?null:{id:o.id,expiresAt:o.expiresAt}}catch{return null}}function fp(){var x;const c=Hs(),o=Date.now(),u=bi();if(u&&u.expiresAt>o)return null;const w=()=>window.localStorage.setItem(Qs,JSON.stringify({id:c,expiresAt:Date.now()+up}));try{if(w(),((x=bi())==null?void 0:x.id)!==c)return null}catch{return{release:()=>{}}}let p=!1;const E=window.setInterval(()=>{var j;p||((j=bi())==null?void 0:j.id)!==c||w()},ap);return{release:()=>{var j;if(!p){p=!0,window.clearInterval(E);try{((j=bi())==null?void 0:j.id)===c&&window.localStorage.removeItem(Qs)}catch{}}}}}async function dp(){let c,o,u;const w=new Promise((E,x)=>{o=E,u=x}),p=new Promise(E=>{c=E});return navigator.locks.request(sp,{mode:"exclusive",ifAvailable:!0},async E=>{if(!E){o(null);return}let x=!1;o({release:()=>{x||(x=!0,c())}}),await p}).catch(u),w}async function pp(c){const o=await fetch("/api/voice/lease",{method:"POST",headers:rt()});if(o.status===409)return null;if(!o.ok)throw new Error("Could not reserve the voice session.");const u=await o.json();if(typeof u.token!="string"||u.token.length<16)throw new Error("Voice session returned an invalid lease.");let w=!1;const p=()=>{w||(w=!0,window.clearInterval(E),fetch("/api/voice/lease",{method:"DELETE",headers:{"Content-Type":"application/json",...rt()},body:JSON.stringify({token:u.token}),keepalive:!0}).catch(()=>{}))},E=window.setInterval(()=>{fetch("/api/voice/lease/heartbeat",{method:"POST",headers:{"Content-Type":"application/json",...rt()},body:JSON.stringify({token:u.token})}).then(x=>{x.status===409&&(p(),c())}).catch(()=>{})},cp);return{release:p}}async function hp(c=()=>{}){const o=typeof navigator<"u"&&navigator.locks?await dp():typeof window>"u"?null:fp();if(!o)return null;try{const u=await pp(c);return u?{release:()=>{u.release(),o.release()}}:(o.release(),null)}catch(u){throw o.release(),u}}const Gs="voice-assistant.selected-voice";function Vc(c){return typeof c=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(c)}function Xs(c){return typeof window>"u"?void 0:window.localStorage}function Xr(c){var o;try{const u=(o=Xs(c))==null?void 0:o.getItem(Gs);return Vc(u)?u:void 0}catch{return}}function mp(c,o){var u;if(!Vc(c))return!1;try{return(u=Xs(o))==null||u.setItem(Gs,c),!0}catch{return!1}}function Pc(c){var o;try{(o=Xs(c))==null||o.removeItem(Gs)}catch{}}function $c(){return y.jsx("main",{className:"auth-screen",children:y.jsxs("p",{children:["Open the link printed by ",y.jsx("code",{children:"meldivo open"}),"."]})})}function Vl(c){const o=/^@([A-Za-z0-9._-]{1,40})\/(.+)$/.exec(c);return o?{prefix:`@${o[1]}/`,host:o[1],inner:o[2]}:{prefix:"",host:"",inner:c}}const Ks=["pi","opencode","claude"],to={pi:"Pi",opencode:"OpenCode",claude:"Claude Code"};let Rc=!1;function Tc(c){const{host:o,inner:u}=Vl(c),w=o||void 0;if(u.startsWith("new:"))return{harness:u.slice(4),title:"New chat",cwd:"~",host:w};if(u==="quick")return{title:"Quick chat",cwd:"~",host:w};const p=u.indexOf(":");return p===-1?{title:u,cwd:"",host:w}:{harness:u.slice(0,p),title:u.slice(p+1),cwd:"",host:w}}function vp(c){const o=/^(\/home\/[^/]+|\/Users\/[^/]+)(\/.*)?$/.exec(c);return o?`~${o[2]??""}`:c}function gp(c){return`meldivo.conversation.${c}`}function yp(c){const o=gp(c);try{const u=window.sessionStorage.getItem(o);if(u)return u;const w=Hs();return window.sessionStorage.setItem(o,w),w}catch{return Hs()}}const wp=12e3,Sp=560,kp="This is a voice preview.",Bc="voice-assistant.onboarding-dismissed",xp=3e3;function $l(c){const o=/^([a-z]{2})[_-](.+)$/i.exec(c),u={af:"American female",am:"American male",bf:"British female",bm:"British male",ef:"Spanish female",em:"Spanish male",ff:"French female",fm:"French male",hf:"Hindi female",hm:"Hindi male",if:"Italian female",im:"Italian male",jf:"Japanese female",jm:"Japanese male",pf:"Portuguese female",pm:"Portuguese male",zf:"Chinese female",zm:"Chinese male"};if(o){const w=u[o[1].toLowerCase()];if(w)return`${$l(o[2])} — ${w}`}return c.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[._-]+/g," ").replace(/\b\w/g,w=>w.toUpperCase())}function Ep(){try{return window.localStorage.getItem(Bc)!=="true"}catch{return!0}}class _p extends Error{constructor(){super("Another voice tab is active. Close it or stop voice there first."),this.name="VoiceOwnershipError"}}async function Cp(c,o){if(!c.body)throw new Error("Chat response was empty.");const u=c.body.pipeThrough(new TextDecoderStream).getReader();let w="";for(;;){const{done:p,value:E}=await u.read();if(p)break;w+=E;const x=w.split(`
80
- `);w=x.pop()??"";for(const j of x){if(!j.startsWith("data:"))continue;const A=j.slice(5).trim();if(!A)continue;let $;try{$=JSON.parse(A)}catch{continue}if(o($),$.type==="done")return}}}function Np({sessionKey:c,folder:o}){const[u,w]=R.useState("idle"),[p,E]=R.useState(0),[x,j]=R.useState(""),A=R.useRef(u),$=R.useRef(!0),Z=R.useRef(!1),W=R.useRef(!1),F=R.useRef(!1),Y=R.useRef(!1),J=R.useRef(null),le=R.useRef(null),G=R.useRef(null),me=R.useRef(null),Ce=R.useRef(null),Ne=R.useRef(!1),K=R.useRef(null),ae=R.useRef(null),ce=R.useRef(null),ee=R.useRef(new Ud),Se=R.useRef(0),Ie=R.useRef(0),Je=R.useRef(null),Be=R.useRef(null),U=R.useRef(0),we=R.useRef(yp(o?`${c}|${o}`:c)),Ve=R.useRef(c),at=R.useRef(null),qe=R.useRef(Tc(c).harness),Ee=R.useRef(0),O=R.useRef(0),b=R.useRef(null),I=R.useRef(""),h=R.useRef(""),_=R.useRef(null),re=R.useRef(new Hd),se=R.useRef(),[ue,pe]=R.useState(null),[fe,ve]=R.useState(!1),[_e,ct]=R.useState([]),[sn,Wl]=R.useState(""),[be,Kn]=R.useState(()=>Xr()??""),[Jr,hr]=R.useState(()=>Xr()??""),[ft,Hl]=R.useState({ready:!0,downloading:!1}),[$t,kn]=R.useState(()=>{const g=Tc(c);return o&&Vl(c).inner.startsWith("new:")?{...g,cwd:vp(o)}:g}),[xn,mr]=R.useState(!1),[br,qn]=R.useState(""),[Ql,En]=R.useState(!1),[vr,Yn]=R.useState(""),[gr,_n]=R.useState(!1),[Cn,Bt]=R.useState(""),[el,Gn]=R.useState(""),[yr,Xn]=R.useState(null),[tl,nl]=R.useState(Ep),un=R.useRef(null),Nn=R.useRef(null),Wt=R.useRef(0),an=R.useRef(null),rl=R.useRef(null),ll=R.useRef(null),Ht=R.useRef(null),_t=R.useRef(null),zt=R.useRef(null),Pn=R.useRef(null),Zn=R.useRef(!1),dt=R.useRef(!1),mt=()=>{Je.current!==null&&window.clearTimeout(Je.current),Je.current=null},Le=g=>{A.current=g,$.current&&w(g)},il=g=>{g&&b.current!==g||(cancelAnimationFrame(O.current),b.current=null,Y.current=!1,$.current&&E(0))},Jn=(g,k)=>{cancelAnimationFrame(O.current),b.current=k,Y.current=!0,Le("speaking");const z=new Float32Array(g.fftSize),L=()=>{b.current===k&&(g.getFloatTimeDomainData(z),E(Math.min(1,Math.sqrt(z.reduce((P,V)=>P+V*V,0)/z.length)*6)),O.current=requestAnimationFrame(L))};L()},Ct=()=>{var g,k,z;Z.current||A.current==="error"||(Y.current||(g=K.current)!=null&&g.busy&&A.current==="speaking"?Le("speaking"):Ce.current||(k=K.current)!=null&&k.busy||(z=ce.current)!=null&&z.busy?Le(Ne.current?"running":"thinking"):W.current&&Le("listening"))},wr=()=>{const g=me.current,k=G.current;!g||!k||(g.gain.cancelScheduledValues(k.currentTime),g.gain.setTargetAtTime(.01,k.currentTime,.015))},vt=()=>{const g=me.current,k=G.current;!g||!k||(g.gain.cancelScheduledValues(k.currentTime),g.gain.setTargetAtTime(1,k.currentTime,.015))},Lt=g=>{if(!$.current)return;const k=++U.current;Be.current!==null&&window.clearTimeout(Be.current),j(g),Le("error"),Be.current=window.setTimeout(()=>{U.current===k&&(Be.current=null,j(""),A.current==="error"&&Le(W.current?Z.current?"muted":"listening":"idle"))},4e3)},Sr=()=>{var g;(g=_.current)==null||g.release(),_.current=null},Rn=()=>{var k,z;Ee.current++;const g=Ne.current||!!Ce.current;if(Ne.current=!1,(k=Ce.current)==null||k.abort(),Ce.current=null,(z=K.current)==null||z.cancel(),il(),g){const L=at.current??Ve.current;fetch(`/api/sessions/${encodeURIComponent(L)}/cancel`,{method:"POST",headers:rt()}).catch(()=>{})}at.current=null,!Z.current&&W.current&&Le("listening")},cn=()=>{var g;Nc(!!Ce.current,!!((g=K.current)!=null&&g.busy),Y.current)&&Rn()},Qt=g=>{var P,V,he;if(!W.current&&!F.current)return;W.current=!1,F.current=!1,dt.current=!1,En(!1),Se.current++,mt(),ee.current.deactivate(),Z.current=!1,Rn(),vt(),re.current.reset(),(P=ae.current)==null||P.reset(),ae.current=null,(V=ce.current)==null||V.reset(),ce.current=null,K.current=null;const k=J.current;J.current=null,k==null||k.destroy().catch(()=>{});const z=le.current;le.current=null,z==null||z.getTracks().forEach(ke=>{ke.onended=null,ke.stop()});const L=G.current;G.current=null,(he=me.current)==null||he.disconnect(),me.current=null,L&&L.state!=="closed"&&L.close().catch(()=>{}),Sr(),Lt(g)},Kl=()=>{var L,P,V;if(!W.current)return;W.current=!1,dt.current=!1,En(!1),Se.current++,mt(),ee.current.deactivate(),Z.current=!1,Rn(),vt(),re.current.reset(),(L=ae.current)==null||L.reset(),ae.current=null,(P=ce.current)==null||P.reset(),ce.current=null,K.current=null;const g=J.current;J.current=null,g==null||g.destroy().catch(()=>{});const k=le.current;le.current=null,k==null||k.getTracks().forEach(he=>{he.onended=null,he.stop()});const z=G.current;G.current=null,(V=me.current)==null||V.disconnect(),me.current=null,z&&z.state!=="closed"&&z.close().catch(()=>{}),Sr(),Lt("Voice session moved to another tab. Tap the shape to reconnect.")},ql=async(g,k)=>{const z=await fetch("/api/voice/transcribe",{method:"POST",headers:{"Content-Type":"audio/wav",...rt()},body:rp(g),signal:k}),L=await z.json();if(!z.ok)throw new Error(L.error??"Transcription failed.");return String(L.text??"").trim()},Yl=async(g,k)=>{const z=G.current;if(!z)throw new Error("Audio output is not ready.");const L=Symbol("playback"),P=lt=>{I.current=g.trim(),Jn(lt,L)},V=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/wav",...rt()},body:JSON.stringify({text:g,...se.current?{voice:se.current}:{}}),signal:k});if(V.headers.get("x-voice-fallback")==="configured"&&(se.current=void 0,Pc()),!V.ok)throw new Error((await V.json().catch(()=>({}))).error??"Speech generation failed.");const he=await V.arrayBuffer();k.throwIfAborted();const ke=await z.decodeAudioData(he);k.throwIfAborted();const Oe=Ec(ke,z,me.current??z.destination,P),xe=(async lt=>{try{await Oe(lt)}finally{il(L),Ct()}});return xe.completed=Oe.completed,xe},fn=()=>{pe(null),ve(!1)},kr=(g,k)=>{pe({x:g,y:k}),ve(!1)},Kt=()=>{un.current!==null&&window.clearTimeout(un.current),un.current=null,Nn.current=null},no=g=>{if(ue||fe){Wt.current=Date.now()+1e3,Kt();return}if(g.pointerType!=="touch")return;Kt();const{clientX:k,clientY:z,pointerId:L}=g;Nn.current={pointerId:L,x:k,y:z},un.current=window.setTimeout(()=>{un.current=null,Nn.current=null,Wt.current=Date.now()+1e3,kr(k,z)},Sp)},ro=g=>{const k=Nn.current;!k||k.pointerId!==g.pointerId||Math.hypot(g.clientX-k.x,g.clientY-k.y)>10&&Kt()},Te=()=>{var k;(k=_t.current)==null||k.abort(),_t.current=null,Pn.current=null;const g=zt.current;zt.current=null,g&&g.state!=="closed"&&g.close().catch(()=>{}),Xn(null)},lo=async()=>{if(!be||yr)return;Te();const g=new AbortController;_t.current=g;const k=new AudioContext;zt.current=k,Bt(""),Xn(be);try{await k.resume();const z=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/wav",...rt()},body:JSON.stringify({text:kp,voice:be}),signal:g.signal});if(!z.ok)throw new Error((await z.json().catch(()=>({}))).error??"Voice preview failed.");const L=await z.arrayBuffer();g.signal.throwIfAborted();const P=await k.decodeAudioData(L);g.signal.throwIfAborted();const V=Ec(P,k,k.destination,()=>{});if(_t.current!==g)return;Pn.current=V,await V(g.signal)}catch(z){!(z instanceof DOMException&&z.name==="AbortError")&&_t.current===g&&Bt(z instanceof Error?z.message:"Voice preview failed.")}finally{_t.current===g&&(_t.current=null),Pn.current=null,zt.current===k&&(zt.current=null,k.state!=="closed"&&k.close().catch(()=>{})),_t.current===null&&Xn(null)}},ol=g=>{var z;(z=Ht.current)==null||z.abort();const k=new AbortController;Ht.current=k,_n(!0),Bt(""),Yn(""),fetch("/api/voice/voices",{headers:rt(),signal:k.signal}).then(async L=>{const P=await L.json();if(!L.ok)throw new Error(typeof P.current=="string"?P.current:"Could not load voices.");const V=Array.isArray(P.voices)?P.voices.filter(xe=>typeof xe=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(xe)):[],he=typeof P.current=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(P.current)?P.current:"";if(Ht.current!==k||k.signal.aborted)return;const ke=g??Xr(),Oe=ke&&(!V.length||V.includes(ke))?ke:"";ct(V),Wl(he),hr(Oe),Kn(Oe||he||V[0]||""),Yn(P.available===!1&&typeof P.warning=="string"?P.warning:"")}).catch(L=>{!(L instanceof DOMException&&L.name==="AbortError")&&!k.signal.aborted&&Bt(L instanceof Error?L.message:"Could not load voices.")}).finally(()=>{Ht.current===k&&(Ht.current=null,_n(!1))})},Gl=()=>{if(be){if(!mp(be)){Bt("This voice could not be saved.");return}hr(be),Bt(""),Gn(`${$l(be)} will be used from the next reply.`)}},xr=()=>{Pc(),hr(""),Kn(sn),Bt(""),Gn(`${sn?$l(sn):"The profile default"} will be used from the next reply.`)},Xl=async()=>{var k,z;if(!W.current||Z.current||dt.current)return;const g=J.current;if(g){dt.current=!0,mt(),re.current.reset(),h.current="",(k=ae.current)==null||k.reset(),(z=ce.current)==null||z.reset(),vt(),g.setOptions({submitUserSpeechOnPause:!1});try{await ee.current.pause(g),(J.current!==g||!W.current||Z.current||!Zn.current)&&(dt.current=!1)}catch(L){if(dt.current=!1,J.current!==g||!W.current||Z.current)return;g.setOptions({submitUserSpeechOnPause:!0}),Qt(ee.current.isInvalid(g)?"Microphone transition timed out. Tap the shape to reconnect.":L instanceof Error?L.message:"Could not pause the microphone for settings.")}}},Zl=async()=>{if(!dt.current)return;const g=J.current;if(dt.current=!1,!(!g||!W.current||Z.current))try{await ee.current.start(g),J.current===g&&W.current&&!Z.current&&(g.setOptions({submitUserSpeechOnPause:!0}),Ct())}catch(k){if(J.current!==g||!W.current||Z.current)return;g.setOptions({submitUserSpeechOnPause:!0}),Qt(ee.current.isInvalid(g)?"Microphone transition timed out. Tap the shape to reconnect.":k instanceof Error?k.message:"Could not resume the microphone after settings.")}},Er=g=>{const k=qe.current,{prefix:z}=Vl(Ve.current);if(k){Ve.current=`${z}${k}:${g}`;return}fetch("/api/sessions",{headers:rt()}).then(pr).then(async L=>{if(!L.ok)return;const V=(await L.json()).sessions.find(he=>he.id===g&&Vl(he.key).prefix===z);V&&(Ve.current=V.key,qe.current=V.harness,$.current&&kn({harness:V.harness,title:V.title,cwd:V.cwd,host:V.host}))}).catch(()=>{})},Ot=async g=>{var P,V;const k=++Ee.current;let z=!1;const L=new AbortController;Ce.current=L,se.current=Xr(),Le("thinking");try{if(!g||k!==Ee.current){Ct();return}I.current="",se.current=Xr();const he=Ve.current;at.current=he;const ke=await fetch(`/api/sessions/${encodeURIComponent(he)}/chat`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...rt()},body:JSON.stringify({conversationId:we.current,message:g,...o&&Vl(he).inner.startsWith("new:")?{cwd:o}:{}}),signal:L.signal});if(pr(ke),!ke.ok)throw new Error((await ke.json().catch(()=>({}))).error??"Chat request failed.");let Oe="";if(await Cp(ke,xe=>{var lt,dn;if(k===Ee.current)switch(xe.type){case"session":Er(xe.id);return;case"status":Ne.current=!0,Le("running"),qn(xe.message);return;case"tool":Ne.current=!0,Le("running"),qn(`Using ${xe.name}…`);return;case"delta":{Ne.current&&(Ne.current=!1,Le("thinking")),Oe+=xe.text;const Ae=Cc(Oe,!1,!z);Oe=Ae.rest,Ae.chunks.length&&(z=!0,(lt=K.current)==null||lt.enqueue(Ae.chunks));return}case"notice":qn(xe.message),z=!0,(dn=K.current)==null||dn.enqueue([xe.message]);return;case"error":throw new Error(xe.message);case"done":return}}),k===Ee.current){const xe=Cc(Oe,!0,!z);xe.chunks.length&&(z=!0,(P=K.current)==null||P.enqueue(xe.chunks))}}catch(he){if(he instanceof dr){$.current&&mr(!0);return}!(he instanceof DOMException&&he.name==="AbortError")&&k===Ee.current&&(Lt(he instanceof Error?he.message:"Voice conversation failed."),z||(V=K.current)==null||V.enqueue(["Sorry, I could not answer that. Please try again."]))}finally{Ce.current===L&&(Ce.current=null,at.current=null),Ne.current=!1,$.current&&qn(""),Ct()}},sl=async()=>{var dn;if(W.current||F.current)return;F.current=!0;const g=++Ie.current;let k=null,z=null,L=null,P=null,V=null,he=null,ke=null,Oe=null;const xe=++Se.current,lt=()=>{if(!$.current||Se.current!==xe||Ie.current!==g)throw new DOMException("Voice startup was cancelled.","AbortError")};ee.current.beginSession();try{if(!window.isSecureContext||!((dn=navigator.mediaDevices)!=null&&dn.getUserMedia))throw new Error("Microphone access requires HTTPS or localhost.");if(P=await hp(Kl),!P)throw new _p;lt(),j(""),En(!1),Le("thinking"),k=new AudioContext,await k.resume(),lt(),V=k.createGain(),V.gain.value=1,V.connect(k.destination),he=new Qd(Yl,Ct,oe=>{il(),Lt(oe instanceof Error?oe.message:"Speech playback failed.")}),ke=new Bd(ql,()=>{}),Oe=new Id(async(oe,Pe)=>{const He=await((ke==null?void 0:ke.finish(oe.samples,Pe))??ql(oe.samples,Pe));return oe.possibleEcho?Dd(He,oe.possibleEcho):He},Ot,oe=>Lt(oe instanceof Error?oe.message:"Voice transcription failed."),Ct),z=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),lt();const Ae=z,gt={getStream:async()=>Ae,pauseStream:async()=>{},resumeStream:async()=>Ae,...Kd,submitUserSpeechOnPause:!0,onSpeechStart:()=>{var He,et,tn;if(!Ye(L,xe))return;(He=ce.current)==null||He.speechStarted();const oe=Nc(!!Ce.current,!!((et=K.current)!=null&&et.busy),Y.current),Pe=re.current.speechStart(oe);h.current=Y.current?I.current:"",Pe.begin&&((tn=ae.current)==null||tn.begin()),Pe.duck&&wr(),Jl(L,xe)},onSpeechRealStart:()=>{var Pe;if(!Ye(L,xe))return;const oe=re.current.speechRealStart();oe.accepted&&(oe.interrupt&&cn(),vt(),(Pe=ae.current)==null||Pe.confirm(),Jl(L,xe),j(""),Le("hearing"))},onVADMisfire:()=>{var oe,Pe;Ye(L,xe)&&(mt(),re.current.reset(),h.current="",(oe=ae.current)==null||oe.discard(),(Pe=ce.current)==null||Pe.speechDiscarded(),vt(),Z.current||Ct())},onFrameProcessed:(oe,Pe)=>{var He;Ye(L,xe)&&((He=ae.current)==null||He.frame(oe.isSpeech,Pe),E(Math.min(1,Math.sqrt(Pe.reduce((et,tn)=>et+tn*tn,0)/Pe.length)*7)))},onSpeechEnd:oe=>{var He,et,tn,cl;if(!Ye(L,xe))return;if(mt(),!re.current.speechEnd()){h.current="",(He=ae.current)==null||He.discard(),(et=ce.current)==null||et.speechDiscarded(),vt(),Ct();return}vt(),(tn=ae.current)==null||tn.end(oe);const Pe=h.current;h.current="",(cl=ce.current)==null||cl.speechEnded({samples:oe,possibleEcho:Pe})}};let Nt=!1;if(!Rc)try{const{MicVAD:oe}=await zc(async()=>{const{MicVAD:Pe}=await import("./index-CeWj4ejR.js").then(He=>He.i);return{MicVAD:Pe}},__vite__mapDeps([0,1]));lt(),L=await oe.new({model:"v5",audioContext:k,startOnLoad:!1,baseAssetPath:"/voice-assets/",onnxWASMBasePath:"/voice-assets/",ortConfig:Pe=>{Pe.env.wasm.numThreads=1},...gt})}catch(oe){if(oe instanceof DOMException&&oe.name==="AbortError")throw oe;Rc=!0,L=null}L||(Nt=!0,L=await Ys.new({audioContext:k,...gt})),lt(),En(Nt),await ee.current.start(L),lt();const Pt=L,qt=k;if(!Pt||!qt)throw new Error("Voice startup did not finish.");_.current=P,G.current=qt,me.current=V,K.current=he,ae.current=ke,ce.current=Oe,le.current=Ae,J.current=Pt,W.current=!0;const jn=()=>{var oe,Pe,He;if(!(le.current!==Ae||!W.current)){W.current=!1,dt.current=!1,En(!1),Se.current++,mt(),ee.current.deactivate(),Z.current=!1,Rn(),vt(),re.current.reset(),K.current=null,(oe=ae.current)==null||oe.reset(),ae.current=null,(Pe=ce.current)==null||Pe.reset(),ce.current=null,J.current===Pt&&(J.current=null),le.current===Ae&&(le.current=null),G.current===qt&&(G.current=null),(He=me.current)==null||He.disconnect(),me.current=null;for(const et of Ae.getTracks())et.onended=null,et.readyState==="live"&&et.stop();Pt.destroy().catch(()=>{}),qt.state!=="closed"&&qt.close().catch(()=>{}),Sr(),Lt("Microphone disconnected. Tap the shape to reconnect.")}};for(const oe of Ae.getAudioTracks())oe.onended=jn;if(!Ae.getAudioTracks().some(oe=>oe.readyState==="live")){jn();return}Le("listening"),Zn.current&&Xl()}catch(Ae){const gt=Se.current===xe&&Ie.current===g;gt&&(Se.current++,mt(),ee.current.deactivate(),J.current===L&&(J.current=null),le.current===z&&(le.current=null),G.current===k&&(G.current=null),me.current===V&&(me.current=null),K.current===he&&(K.current=null),ae.current===ke&&(ae.current=null),ce.current===Oe&&(ce.current=null)),he==null||he.cancel(),ke==null||ke.reset(),Oe==null||Oe.reset(),V==null||V.disconnect(),L&&await L.destroy().catch(()=>{}),z==null||z.getTracks().forEach(Nt=>Nt.stop()),k&&k.state!=="closed"&&await k.close().catch(()=>{}),_.current===P&&(_.current=null),P==null||P.release(),gt&&!(Ae instanceof DOMException&&Ae.name==="AbortError")&&Lt(Ae instanceof Error?Ae.message:"Could not start the microphone.")}finally{Ie.current===g&&(F.current=!1)}},Ye=(g,k)=>(W.current||F.current)&&!Zn.current&&Vd(Se.current,k,J.current,g,Z.current,ee.current.acceptsCallbacks),en=(g,k,z)=>g!==null&&J.current===g&&W.current&&Z.current===k&&(z===void 0||Se.current===z),_r=(g,k,z)=>en(g,k,z)&&g!==null&&!ee.current.isInvalid(g),Jl=(g,k)=>{mt(),g&&(Je.current=window.setTimeout(()=>{Je.current=null,Ye(g,k)&&ee.current.flush(g).then(()=>{_r(g,!1,k)}).catch(z=>{en(g,!1,k)&&(ee.current.isInvalid(g)?Qt("Microphone transition timed out. Tap the shape to reconnect."):Lt(z instanceof Error?z.message:"Microphone recovery failed."))})},wp))},Cr=async()=>{var g,k,z,L;if(!W.current){F.current||sl();return}if(Z.current=!Z.current,Z.current){mt(),Rn(),vt(),re.current.reset(),(g=ae.current)==null||g.reset(),(k=ce.current)==null||k.reset(),(z=le.current)==null||z.getTracks().forEach(V=>{V.enabled=!1});const P=J.current;if(!en(P,!0))return;P==null||P.setOptions({submitUserSpeechOnPause:!1});try{if(P&&await ee.current.pause(P),!_r(P,!0)){en(P,!0)&&P&&ee.current.isInvalid(P)&&Qt("Microphone transition timed out. Tap the shape to reconnect.");return}Le("muted")}catch(V){if(!en(P,!0))return;P&&ee.current.isInvalid(P)?Qt("Microphone transition timed out. Tap the shape to reconnect."):Lt(V instanceof Error?V.message:"Could not pause the microphone.")}}else{(L=le.current)==null||L.getTracks().forEach(V=>{V.enabled=!0});const P=J.current;if(!en(P,!1))return;try{if(P){if(await ee.current.start(P),!_r(P,!1)){en(P,!1)&&ee.current.isInvalid(P)&&Qt("Microphone transition timed out. Tap the shape to reconnect.");return}P.setOptions({submitUserSpeechOnPause:!0})}if(!_r(P,!1))return;Le("listening")}catch(V){if(!en(P,!1))return;P&&ee.current.isInvalid(P)?Qt("Microphone transition timed out. Tap the shape to reconnect."):Lt(V instanceof Error?V.message:"Could not resume the microphone.")}}},Nr=()=>{if(fn(),j(""),W.current||F.current){Qt(""),window.setTimeout(()=>{!W.current&&!F.current&&sl()},0);return}sl()};if(R.useEffect(()=>{const g=new AbortController;return fetch("/api/sessions",{headers:rt(),signal:g.signal}).then(pr).then(async k=>{if(!k.ok)return;const L=(await k.json()).sessions.find(P=>P.key===c);L&&!g.signal.aborted&&(qe.current=L.harness,kn({harness:L.harness,title:L.title,cwd:L.cwd,host:L.host}))}).catch(k=>{k instanceof dr&&!g.signal.aborted&&mr(!0)}),()=>g.abort()},[c]),R.useEffect(()=>{let g=!1;const k=()=>{fetch("/api/health",{headers:rt()}).then(async L=>{const P=await L.json().catch(()=>({}));if(g)return;const V=P.speech??{};Hl({ready:V.ready!==!1,downloading:V.downloading===!0,progress:typeof V.progress=="number"?V.progress:void 0,error:typeof V.error=="string"?V.error:void 0})}).catch(()=>{})};k();const z=window.setInterval(k,xp);return()=>{g=!0,window.clearInterval(z)}},[]),R.useEffect(()=>{var g;if(Zn.current=fe,fe?Xl():Zl(),!fe){yr&&Te(),(g=Ht.current)==null||g.abort(),Ht.current=null;return}Bt(""),Gn(""),ol(Xr()??void 0)},[fe]),R.useEffect(()=>{if(!ue&&!fe)return;const g=z=>{var P,V;const L=z.target;L instanceof Node&&((P=an.current)!=null&&P.contains(L)||(V=rl.current)!=null&&V.contains(L))||fn()},k=z=>{z.key==="Escape"&&(z.preventDefault(),fn())};return document.addEventListener("pointerdown",g),document.addEventListener("keydown",k),()=>{document.removeEventListener("pointerdown",g),document.removeEventListener("keydown",k)}},[ue,fe]),R.useEffect(()=>{fe&&window.setTimeout(()=>{var g;return(g=ll.current)==null?void 0:g.focus()},0)},[fe]),R.useEffect(()=>()=>{var g,k,z,L,P,V,he,ke;$.current=!1,U.current++,Be.current!==null&&window.clearTimeout(Be.current),Be.current=null,W.current=!1,Kt(),(g=Ht.current)==null||g.abort(),(k=_t.current)==null||k.abort(),_t.current=null,Pn.current=null,zt.current&&zt.current.state!=="closed"&&zt.current.close().catch(()=>{}),zt.current=null,Se.current++,mt(),ee.current.deactivate(),Rn(),vt(),re.current.reset(),(z=ae.current)==null||z.reset(),(L=ce.current)==null||L.reset(),ce.current=null,(P=J.current)==null||P.destroy(),(V=le.current)==null||V.getTracks().forEach(Oe=>{Oe.onended=null,Oe.stop()}),(he=G.current)==null||he.close(),(ke=me.current)==null||ke.disconnect(),me.current=null,Sr()},[]),xn)return y.jsx($c,{});const bn=W.current?u==="muted"?"Unmute microphone":"Mute microphone":"Start voice conversation",Pr=ue?Math.max(12,Math.min(ue.x,window.innerWidth-170)):0,io=ue?Math.max(12,Math.min(ue.y,window.innerHeight-68)):0,ul=Jr||sn,Tn=ft.ready,al=ft.ready?"Ready":ft.downloading?`Downloading voice models…${typeof ft.progress=="number"?` ${Math.round(ft.progress)}%`:""}`:"Offline";return y.jsxs("main",{className:"voice-page","data-state":u,style:{"--level":p},children:[y.jsxs("header",{className:"room-header",children:[y.jsx("a",{className:"room-header__back",href:"/","aria-label":"Back to hub",children:"←"}),y.jsxs("span",{className:"room-header__title",children:[$t.harness?to[$t.harness]:"Meldivo"," · ",$t.title]}),($t.host||$t.cwd)&&y.jsx("span",{className:"room-header__cwd",children:[$t.host,$t.cwd].filter(Boolean).join(" · ")})]}),br&&y.jsx("p",{className:"room-status",role:"status",children:br}),Ql&&y.jsx("p",{className:"room-status voice-fallback-notice",role:"status",children:"Using basic voice detection"}),!ft.ready&&y.jsx("p",{className:"voice-health",role:"status",children:ft.error||al}),y.jsxs("button",{className:"voice-shape",type:"button",onClick:()=>{if(Date.now()<Wt.current){Wt.current=0;return}if(ue||fe){fn();return}Cr()},onPointerDown:no,onPointerMove:ro,onPointerUp:Kt,onPointerCancel:Kt,onPointerLeave:Kt,onLostPointerCapture:Kt,onContextMenu:g=>{g.preventDefault(),kr(g.clientX,g.clientY)},onKeyDown:g=>{if(g.key==="ContextMenu"||g.key==="F10"&&g.shiftKey){g.preventDefault();const k=g.currentTarget.getBoundingClientRect();kr(k.left+k.width/2,k.top+k.height/2)}},"aria-label":bn,"aria-haspopup":"menu","aria-expanded":!!(ue||fe),children:[y.jsx("span",{className:"voice-shape__halo"}),y.jsx("span",{className:"voice-shape__ring voice-shape__ring--one"}),y.jsx("span",{className:"voice-shape__ring voice-shape__ring--two"}),y.jsx("span",{className:"voice-shape__core"})]}),ue&&y.jsx("div",{ref:an,className:"voice-context-menu",role:"menu","aria-label":"Voice options",style:{left:Pr,top:io},children:y.jsx("button",{type:"button",role:"menuitem",onClick:()=>{pe(null),ve(!0)},children:"Settings"})}),fe&&y.jsxs("div",{ref:rl,className:"voice-settings",role:"dialog","aria-modal":"false","aria-labelledby":"voice-settings-title",onKeyDown:g=>{g.key==="Escape"&&(g.preventDefault(),fn())},children:[y.jsxs("div",{className:"voice-settings__header",children:[y.jsx("h2",{id:"voice-settings-title",children:"Voice"}),y.jsx("button",{className:"voice-settings__close",type:"button",onClick:fn,"aria-label":"Close voice settings",children:"×"})]}),y.jsxs("p",{id:"tts-provider-status",className:`voice-settings__availability voice-settings__availability--${ft.ready?"ready":ft.downloading?"checking":"offline"}`,role:"status",children:[y.jsx("span",{"aria-hidden":"true"}),al]}),ft.error&&y.jsx("p",{className:"voice-settings__availability-note",children:ft.error}),vr&&y.jsx("p",{className:"voice-settings__availability-note",children:vr}),gr&&y.jsx("p",{className:"voice-settings__muted",children:"Loading voices…"}),!gr&&_e.length>0&&y.jsxs(y.Fragment,{children:[y.jsx("label",{className:"voice-settings__label",htmlFor:"voice-choice",children:"Choose a voice"}),y.jsxs("div",{className:"voice-settings__choice",children:[y.jsx("select",{ref:ll,id:"voice-choice",value:be,onChange:g=>{Te(),Kn(g.target.value),Bt(""),Gn("")},"aria-describedby":"voice-current",children:_e.map(g=>y.jsx("option",{value:g,children:$l(g)},g))}),y.jsx("button",{className:"voice-settings__play",type:"button",onClick:()=>{lo()},disabled:!be||!Tn||!!yr,"aria-label":`Preview ${be||"voice"}`,"aria-describedby":"tts-provider-status",title:Tn?void 0:"Wait for voice models to be ready.",children:yr?"…":"▶"})]}),y.jsxs("p",{id:"voice-current",className:"voice-settings__current",children:["Current: ",ul?$l(ul):"profile default"]}),y.jsxs("div",{className:"voice-settings__actions",children:[y.jsx("button",{type:"button",onClick:Gl,disabled:!be||!Tn||be===ul,"aria-describedby":"tts-provider-status",title:Tn?void 0:"Wait for voice models to be ready.",children:"Use this voice"}),y.jsx("button",{type:"button",onClick:xr,disabled:!Jr,children:"Restore default"})]})]}),!gr&&!_e.length&&y.jsx(y.Fragment,{children:y.jsx("p",{className:"voice-settings__muted",children:"No selectable voices are configured."})}),Cn&&y.jsx("p",{className:"voice-settings__error",role:"alert",children:Cn}),el&&y.jsx("p",{className:"voice-settings__notice",role:"status",children:el})]}),tl&&y.jsx("div",{className:"voice-onboarding",role:"dialog","aria-modal":"true","aria-labelledby":"voice-onboarding-title",children:y.jsxs("div",{className:"voice-onboarding__card",children:[y.jsx("h2",{id:"voice-onboarding-title",children:"Welcome"}),y.jsx("p",{children:"Tap to talk · hold or right-click for settings."}),y.jsx("button",{type:"button",onClick:()=>{try{window.localStorage.setItem(Bc,"true")}catch{}nl(!1)},children:"OK"})]})}),x&&y.jsxs("div",{className:"voice-error",role:"alert",title:x,children:[y.jsx("span",{children:x}),y.jsx("button",{className:"voice-error__reconnect",type:"button",onClick:Nr,children:"Reconnect"})]})]})}const Pp=5e3,Rp=5e3;function Bl(c){const o=/^(\/home\/[^/]+|\/Users\/[^/]+)(\/.*)?$/.exec(c);return o?o[2]?`~${o[2]}`:"~":c}function Wc(c){const o=Math.max(0,Math.round((Date.now()-c)/1e3));if(o<5)return"just now";if(o<60)return`${o}s ago`;const u=Math.round(o/60);if(u<60)return`${u}m ago`;const w=Math.round(u/60);return w<24?`${w}h ago`:`${Math.round(w/24)}d ago`}function Hc(c,o){window.location.href=`/?session=${encodeURIComponent(c)}${o?`&folder=${encodeURIComponent(o)}`:""}`}function Tp(c){return c.busy?{className:"hub-dot hub-dot--busy",label:"busy"}:c.open?{className:"hub-dot hub-dot--open",label:"open in terminal"}:{className:"hub-dot hub-dot--idle",label:"idle"}}function jp({onClose:c}){var F;const[o,u]=R.useState(null),[w,p]=R.useState(""),[E,x]=R.useState(!1),[j,A]=R.useState(""),$=()=>{p(""),fetch("/api/remote",{headers:rt()}).then(pr).then(async Y=>{if(!Y.ok)throw new Error("Could not load phone access options.");u(await Y.json())}).catch(Y=>{if(Y instanceof dr)throw Y;p(Y instanceof Error?Y.message:"Could not load phone access options.")})};R.useEffect($,[]),R.useEffect(()=>{var le;const Y=(le=o==null?void 0:o.active)==null?void 0:le.url;if(!Y){A("");return}let J=!1;return zc(()=>import("./browser-CujOq0-h.js").then(G=>G.b),__vite__mapDeps([2,1])).then(async G=>{const me=await G.toDataURL(Y,{margin:1,width:200});J||A(me)}).catch(()=>{J||A("")}),()=>{J=!0}},[(F=o==null?void 0:o.active)==null?void 0:F.url]);const Z=Y=>{x(!0),p(""),fetch("/api/remote",{method:"POST",headers:{"Content-Type":"application/json",...rt()},body:JSON.stringify({id:Y})}).then(pr).then(async J=>{if(!J.ok)throw new Error((await J.json().catch(()=>({}))).error??"Could not enable phone access.");$()}).catch(J=>{if(J instanceof dr)throw J;p(J instanceof Error?J.message:"Could not enable phone access.")}).finally(()=>x(!1))},W=()=>{x(!0),p(""),fetch("/api/remote",{method:"DELETE",headers:rt()}).then(pr).then(Y=>{if(!Y.ok)throw new Error("Could not turn off phone access.");$()}).catch(Y=>{if(Y instanceof dr)throw Y;p(Y instanceof Error?Y.message:"Could not turn off phone access.")}).finally(()=>x(!1))};return y.jsxs("div",{className:"hub-remote",role:"dialog","aria-labelledby":"hub-remote-title",children:[y.jsxs("div",{className:"hub-remote__header",children:[y.jsx("h2",{id:"hub-remote-title",children:"Phone access"}),y.jsx("button",{className:"hub-remote__close",type:"button",onClick:c,"aria-label":"Close phone access",children:"×"})]}),!o&&!w&&y.jsx("p",{className:"hub-muted",children:"Loading…"}),w&&y.jsx("p",{className:"hub-error",role:"alert",children:w}),(o==null?void 0:o.active)&&y.jsxs("div",{className:"hub-remote__active",children:[y.jsx("p",{className:"hub-remote__url",children:o.active.url}),j&&y.jsx("img",{className:"hub-remote__qr",src:j,alt:"QR code for phone access URL"}),y.jsx("button",{type:"button",onClick:W,disabled:E,children:"Turn off"})]}),o&&!o.active&&y.jsxs(y.Fragment,{children:[y.jsx("ul",{className:"hub-remote__options",children:o.options.map(Y=>y.jsx("li",{children:y.jsxs("button",{type:"button",disabled:!Y.ready||E,onClick:()=>Z(Y.id),children:[Y.label,Y.ready?"":" (not ready)"]})},Y.id))}),!o.options.some(Y=>Y.ready)&&o.guide&&(/^https?:\/\//.test(o.guide)?y.jsx("p",{className:"hub-muted",children:y.jsx("a",{href:o.guide,target:"_blank",rel:"noreferrer",children:"Set up phone access"})}):y.jsx("p",{className:"hub-muted",children:o.guide}))]})]})}const jc="meldivo.machine",eo=40;function Mp(c){return c.id?`@${c.id}/`:""}function zp({host:c,sessions:o,selected:u,onSelect:w}){const p=o.filter(A=>A.open).length,E=o.some(A=>A.busy),x=o.reduce((A,$)=>Math.max(A,$.updatedAt),0),j=c.online?E?"hub-dot--busy":"hub-dot--online":"hub-dot--idle";return y.jsxs("button",{type:"button",role:"tab","aria-selected":u,className:`hub-machine${u?" hub-machine--selected":""}${c.online?"":" hub-machine--offline"}`,onClick:w,children:[y.jsxs("span",{className:"hub-machine__name",children:[y.jsx("span",{className:`hub-dot ${j}`,"aria-hidden":"true"}),c.name]}),y.jsx("span",{className:"hub-machine__meta",children:c.online?y.jsxs(y.Fragment,{children:[o.length," session",o.length===1?"":"s",p>0&&y.jsxs(y.Fragment,{children:[" · ",p," open"]})]}):"offline"}),c.online&&x>0&&y.jsxs("span",{className:"hub-machine__meta",children:["active ",Wc(x)]})]})}const $s=1440*60*1e3;function Lp(c,o){const u=Date.now()-c;return o==="today"?new Date(c).toDateString()===new Date().toDateString():o==="week"?u<=7*$s:o==="month"?u<=30*$s:o==="older"?u>30*$s:!0}function Op(c,o){const u=[...c];return o==="title"?u.sort((w,p)=>(w.title||"").localeCompare(p.title||"",void 0,{sensitivity:"base"})):u.sort((w,p)=>o==="oldest"?w.updatedAt-p.updatedAt:p.updatedAt-w.updatedAt),u}function Fp({session:c}){const o=Tp(c);return y.jsx("li",{children:y.jsxs("button",{type:"button",className:"hub-session",onClick:()=>Hc(c.key),children:[y.jsx("span",{className:o.className,"aria-hidden":"true",title:o.label}),y.jsxs("span",{className:"hub-session__body",children:[y.jsx("span",{className:"hub-session__title",children:c.title||"(untitled)"}),y.jsxs("span",{className:"hub-session__meta",children:[y.jsx("span",{className:"hub-session__badge",children:to[c.harness]}),y.jsx("span",{className:"hub-session__time",children:Wc(c.updatedAt)})]}),c.open&&y.jsx("span",{className:"hub-session__hint",children:"open in a terminal · continues as a voice copy"})]})]})})}function Dp({host:c,folders:o,agent:u,folder:w,onClose:p}){var Z,W;const E=[...c.harnesses].filter(F=>F.available).sort((F,Y)=>Ks.indexOf(F.id)-Ks.indexOf(Y.id)),[x,j]=R.useState(((Z=E.find(F=>F.id===u))==null?void 0:Z.id)??((W=E[0])==null?void 0:W.id)),[A,$]=R.useState(w==="all"?"":w);return E.length===0?y.jsx("div",{className:"hub-newchat",children:y.jsxs("p",{className:"hub-muted",children:["No coding agents are installed on ",c.name,"."]})}):y.jsxs("div",{className:"hub-newchat",role:"group","aria-label":"New chat",children:[y.jsxs("div",{className:"hub-newchat__row",children:[y.jsx("span",{className:"hub-newchat__label",children:"Agent"}),y.jsx("div",{className:"hub-chips",children:E.map(F=>y.jsx("button",{type:"button",className:`hub-chip${x===F.id?" hub-chip--on":""}`,"aria-pressed":x===F.id,onClick:()=>j(F.id),children:F.label},F.id))})]}),y.jsxs("label",{className:"hub-newchat__row",children:[y.jsx("span",{className:"hub-newchat__label",children:"Folder"}),y.jsxs("select",{className:"hub-select hub-select--wide",value:A,onChange:F=>$(F.target.value),children:[y.jsx("option",{value:"",children:"Home folder"}),o.map(F=>y.jsx("option",{value:F,children:Bl(F)},F))]})]}),y.jsxs("div",{className:"hub-newchat__actions",children:[y.jsx("button",{type:"button",className:"hub-more",onClick:p,children:"Cancel"}),y.jsx("button",{type:"button",className:"hub-primary",disabled:!x,onClick:()=>x&&Hc(`${Mp(c)}new:${x}`,A||void 0),children:"Start talking"})]})]})}function Ip({host:c,sessions:o}){const[u,w]=R.useState(""),[p,E]=R.useState("all"),[x,j]=R.useState("all"),[A,$]=R.useState("any"),[Z,W]=R.useState("newest"),[F,Y]=R.useState(!1),[J,le]=R.useState(!1),[G,me]=R.useState(eo);if(R.useEffect(()=>{w(""),E("all"),j("all"),$("any"),W("newest"),Y(!1),le(!1),me(eo)},[c.id]),R.useEffect(()=>me(eo),[u,p,x,A,Z,F]),!c.online)return y.jsxs("p",{className:"hub-empty",children:[c.name," is offline. Its sessions appear here as soon as it reconnects."]});const Ce=new Map;for(const U of o)Ce.set(U.cwd,Math.max(Ce.get(U.cwd)??0,U.updatedAt));const Ne=[...Ce.entries()].sort((U,we)=>we[1]-U[1]).map(([U])=>U),K=Ne.filter(U=>U&&Bl(U)!=="~"),ae=Ks.filter(U=>o.some(we=>we.harness===U)),ce=u.trim().toLowerCase().split(/\s+/).filter(Boolean),ee=Op(o.filter(U=>{if(p!=="all"&&U.harness!==p||x!=="all"&&U.cwd!==x||F&&!U.open||!Lp(U.updatedAt,A))return!1;if(ce.length===0)return!0;const we=`${U.title} ${Bl(U.cwd)} ${to[U.harness]}`.toLowerCase();return ce.every(Ve=>we.includes(Ve))}),Z),Se=o.filter(U=>U.open).length,Ie=p!=="all"||x!=="all"||A!=="any"||F||ce.length>0,Je=ee.slice(0,G),Be=[];for(const U of Je){const we=x==="all"?Be.find(Ve=>Ve.cwd===U.cwd):Be[0];we?we.sessions.push(U):Be.push({cwd:U.cwd,sessions:[U]})}return y.jsxs("div",{className:"hub-panel",role:"tabpanel",children:[y.jsxs("div",{className:"hub-search",children:[y.jsx("input",{type:"search",className:"hub-search__input",placeholder:`Search ${o.length} sessions`,value:u,onChange:U=>w(U.target.value),"aria-label":"Search sessions",autoComplete:"off"}),y.jsx("button",{type:"button",className:"hub-primary","aria-expanded":J,onClick:()=>le(!J),children:J?"Close":"New chat"})]}),J&&y.jsx(Dp,{host:c,folders:K,agent:p,folder:x,onClose:()=>le(!1)}),o.length>0&&y.jsxs("div",{className:"hub-filters",children:[y.jsxs("div",{className:"hub-chips",role:"group","aria-label":"Filter by agent",children:[y.jsx("button",{type:"button",className:`hub-chip${p==="all"?" hub-chip--on":""}`,"aria-pressed":p==="all",onClick:()=>E("all"),children:"All agents"}),ae.map(U=>y.jsxs("button",{type:"button",className:`hub-chip${p===U?" hub-chip--on":""}`,"aria-pressed":p===U,onClick:()=>E(p===U?"all":U),children:[to[U]," ",y.jsx("span",{className:"hub-chip__count",children:o.filter(we=>we.harness===U).length})]},U)),y.jsxs("button",{type:"button",className:`hub-chip${F?" hub-chip--on":""}`,"aria-pressed":F,disabled:Se===0&&!F,onClick:()=>Y(!F),children:["Open now ",y.jsx("span",{className:"hub-chip__count",children:Se})]})]}),y.jsxs("div",{className:"hub-selects",children:[y.jsxs("select",{className:"hub-select",value:x,onChange:U=>j(U.target.value),"aria-label":"Folder",children:[y.jsxs("option",{value:"all",children:["All folders (",Ne.length,")"]}),Ne.map(U=>y.jsx("option",{value:U,children:Bl(U)||"(no folder)"},U))]}),y.jsxs("select",{className:"hub-select",value:A,onChange:U=>$(U.target.value),"aria-label":"Date",children:[y.jsx("option",{value:"any",children:"Any time"}),y.jsx("option",{value:"today",children:"Today"}),y.jsx("option",{value:"week",children:"Past 7 days"}),y.jsx("option",{value:"month",children:"Past 30 days"}),y.jsx("option",{value:"older",children:"Older than 30 days"})]}),y.jsxs("select",{className:"hub-select",value:Z,onChange:U=>W(U.target.value),"aria-label":"Sort",children:[y.jsx("option",{value:"newest",children:"Newest first"}),y.jsx("option",{value:"oldest",children:"Oldest first"}),y.jsx("option",{value:"title",children:"Title A–Z"})]})]})]}),o.length===0&&y.jsxs("p",{className:"hub-empty",children:["No sessions on ",c.name," yet. Tap New chat to start one."]}),o.length>0&&ee.length===0&&y.jsxs("p",{className:"hub-empty",children:["No sessions match. ",y.jsx("button",{type:"button",className:"hub-link",onClick:()=>{w(""),E("all"),j("all"),$("any"),Y(!1)},children:"Clear filters"})]}),Ie&&ee.length>0&&y.jsxs("p",{className:"hub-count",children:[ee.length," of ",o.length," sessions"]}),Be.map(U=>y.jsxs("section",{className:"hub-folder",children:[y.jsxs("h3",{className:"hub-folder__title",children:[y.jsx("span",{children:Bl(U.cwd)||"(no folder)"}),y.jsx("span",{className:"hub-folder__count",children:ee.filter(we=>we.cwd===U.cwd).length})]}),y.jsx("ul",{className:"hub-sessions",children:U.sessions.map(we=>y.jsx(Fp,{session:we},we.key))})]},U.cwd)),ee.length>G&&y.jsxs("button",{type:"button",className:"hub-more",onClick:()=>me(G+eo),children:["Show more (",ee.length-G,")"]})]})}function Ap(){const[c,o]=R.useState(null),[u,w]=R.useState(""),[p,E]=R.useState(!1),[x,j]=R.useState({ready:!0,downloading:!1}),[A,$]=R.useState(!1),[Z,W]=R.useState(()=>{try{return window.localStorage.getItem(jc)}catch{return null}}),F=R.useRef(!0);if(R.useEffect(()=>(F.current=!0,()=>{F.current=!1}),[]),R.useEffect(()=>{let K=!1;const ae=()=>{fetch("/api/sessions",{headers:rt()}).then(pr).then(async ee=>{if(!ee.ok)throw new Error("Could not load sessions.");const Se=await ee.json();K||(o(Se),w(""))}).catch(ee=>{if(!K){if(ee instanceof dr){E(!0);return}w(ee instanceof Error?ee.message:"Could not load sessions.")}})};ae();const ce=window.setInterval(ae,Pp);return()=>{K=!0,window.clearInterval(ce)}},[]),R.useEffect(()=>{let K=!1;const ae=()=>{fetch("/api/health",{headers:rt()}).then(async ee=>{const Se=await ee.json().catch(()=>({}));if(K)return;const Ie=Se.speech??{};j({ready:Ie.ready!==!1,downloading:Ie.downloading===!0,progress:typeof Ie.progress=="number"?Ie.progress:void 0,error:typeof Ie.error=="string"?Ie.error:void 0})}).catch(()=>{})};ae();const ce=window.setInterval(ae,Rp);return()=>{K=!0,window.clearInterval(ce)}},[]),p)return y.jsx($c,{});const Y=(c==null?void 0:c.hosts)??(c?[{id:"",name:c.machine,online:!0,harnesses:c.harnesses}]:[]),J=(c==null?void 0:c.sessions)??[],le=K=>J.filter(ae=>(ae.host??"")===K.id),G=Y.filter(K=>K.id!==""||Y.length===1||K.harnesses.some(ae=>ae.available)||le(K).length>0),me=G.find(K=>K.id===Z)??G.find(K=>K.online)??G[0],Ce=K=>{W(K);try{window.localStorage.setItem(jc,K)}catch{}},Ne=x.ready?"Speech ready":x.downloading?`Downloading voice models…${typeof x.progress=="number"?` ${Math.round(x.progress)}%`:""}`:"Speech offline";return y.jsxs("main",{className:"hub-page",children:[y.jsxs("header",{className:"hub-header",children:[y.jsx("h1",{children:G.length>1?"Meldivo":(c==null?void 0:c.machine)??"Meldivo"}),y.jsx("p",{className:`hub-speech-status${x.ready?"":" hub-speech-status--warn"}`,role:"status",children:x.error||Ne}),y.jsx("button",{type:"button",className:"hub-remote-button",onClick:()=>$(!0),children:"Phone access"})]}),u&&y.jsx("p",{className:"hub-error",role:"alert",children:u}),!c&&!u&&y.jsx("p",{className:"hub-empty",children:"Loading…"}),G.length>1&&y.jsx("nav",{className:"hub-machines",role:"tablist","aria-label":"Machines",children:G.map(K=>y.jsx(zp,{host:K,sessions:le(K),selected:K===me,onSelect:()=>Ce(K.id)},K.id||"local"))}),me&&y.jsx(Ip,{host:me,sessions:le(me)}),A&&y.jsx(jp,{onClose:()=>$(!1)})]})}ip();const Qc=new URLSearchParams(window.location.search),Mc=Qc.get("session");Ld.createRoot(document.getElementById("root")).render(Mc?y.jsx(Np,{sessionKey:Mc,folder:Qc.get("folder")??void 0}):y.jsx(Ap,{}));