Spaces:
Running
Running
var Cd=Object.defineProperty;var _d=(t,e,n)=>e in t?Cd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var wo=(t,e,n)=>_d(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Td(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ku={exports:{}},Li={},Yu={exports:{}},R={};/** | |
* @license React | |
* react.production.min.js | |
* | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/var xr=Symbol.for("react.element"),Ed=Symbol.for("react.portal"),Pd=Symbol.for("react.fragment"),Ld=Symbol.for("react.strict_mode"),zd=Symbol.for("react.profiler"),Md=Symbol.for("react.provider"),Fd=Symbol.for("react.context"),Nd=Symbol.for("react.forward_ref"),Ad=Symbol.for("react.suspense"),Rd=Symbol.for("react.memo"),Od=Symbol.for("react.lazy"),Io=Symbol.iterator;function Dd(t){return t===null||typeof t!="object"?null:(t=Io&&t[Io]||t["@@iterator"],typeof t=="function"?t:null)}var Ju={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qu=Object.assign,bu={};function Nn(t,e,n){this.props=t,this.context=e,this.refs=bu,this.updater=n||Ju}Nn.prototype.isReactComponent={};Nn.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Nn.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function ea(){}ea.prototype=Nn.prototype;function Ss(t,e,n){this.props=t,this.context=e,this.refs=bu,this.updater=n||Ju}var ks=Ss.prototype=new ea;ks.constructor=Ss;qu(ks,Nn.prototype);ks.isPureReactComponent=!0;var xo=Array.isArray,ta=Object.prototype.hasOwnProperty,ws={current:null},na={key:!0,ref:!0,__self:!0,__source:!0};function ra(t,e,n){var r,i={},l=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(l=""+e.key),e)ta.call(e,r)&&!na.hasOwnProperty(r)&&(i[r]=e[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var u=Array(o),a=0;a<o;a++)u[a]=arguments[a+2];i.children=u}if(t&&t.defaultProps)for(r in o=t.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:xr,type:t,key:l,ref:s,props:i,_owner:ws.current}}function jd(t,e){return{$$typeof:xr,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Is(t){return typeof t=="object"&&t!==null&&t.$$typeof===xr}function Bd(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Co=/\/+/g;function Qi(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Bd(""+t.key):e.toString(36)}function Zr(t,e,n,r,i){var l=typeof t;(l==="undefined"||l==="boolean")&&(t=null);var s=!1;if(t===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case xr:case Ed:s=!0}}if(s)return s=t,i=i(s),t=r===""?"."+Qi(s,0):r,xo(i)?(n="",t!=null&&(n=t.replace(Co,"$&/")+"/"),Zr(i,e,n,"",function(a){return a})):i!=null&&(Is(i)&&(i=jd(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Co,"$&/")+"/")+t)),e.push(i)),1;if(s=0,r=r===""?".":r+":",xo(t))for(var o=0;o<t.length;o++){l=t[o];var u=r+Qi(l,o);s+=Zr(l,e,n,u,i)}else if(u=Dd(t),typeof u=="function")for(t=u.call(t),o=0;!(l=t.next()).done;)l=l.value,u=r+Qi(l,o++),s+=Zr(l,e,n,u,i);else if(l==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return s}function Lr(t,e,n){if(t==null)return t;var r=[],i=0;return Zr(t,r,"","",function(l){return e.call(n,l,i++)}),r}function Ud(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var ve={current:null},Qr={transition:null},Wd={ReactCurrentDispatcher:ve,ReactCurrentBatchConfig:Qr,ReactCurrentOwner:ws};function ia(){throw Error("act(...) is not supported in production builds of React.")}R.Children={map:Lr,forEach:function(t,e,n){Lr(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Lr(t,function(){e++}),e},toArray:function(t){return Lr(t,function(e){return e})||[]},only:function(t){if(!Is(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};R.Component=Nn;R.Fragment=Pd;R.Profiler=zd;R.PureComponent=Ss;R.StrictMode=Ld;R.Suspense=Ad;R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wd;R.act=ia;R.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=qu({},t.props),i=t.key,l=t.ref,s=t._owner;if(e!=null){if(e.ref!==void 0&&(l=e.ref,s=ws.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var o=t.type.defaultProps;for(u in e)ta.call(e,u)&&!na.hasOwnProperty(u)&&(r[u]=e[u]===void 0&&o!==void 0?o[u]:e[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var a=0;a<u;a++)o[a]=arguments[a+2];r.children=o}return{$$typeof:xr,type:t.type,key:i,ref:l,props:r,_owner:s}};R.createContext=function(t){return t={$$typeof:Fd,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:Md,_context:t},t.Consumer=t};R.createElement=ra;R.createFactory=function(t){var e=ra.bind(null,t);return e.type=t,e};R.createRef=function(){return{current:null}};R.forwardRef=function(t){return{$$typeof:Nd,render:t}};R.isValidElement=Is;R.lazy=function(t){return{$$typeof:Od,_payload:{_status:-1,_result:t},_init:Ud}};R.memo=function(t,e){return{$$typeof:Rd,type:t,compare:e===void 0?null:e}};R.startTransition=function(t){var e=Qr.transition;Qr.transition={};try{t()}finally{Qr.transition=e}};R.unstable_act=ia;R.useCallback=function(t,e){return ve.current.useCallback(t,e)};R.useContext=function(t){return ve.current.useContext(t)};R.useDebugValue=function(){};R.useDeferredValue=function(t){return ve.current.useDeferredValue(t)};R.useEffect=function(t,e){return ve.current.useEffect(t,e)};R.useId=function(){return ve.current.useId()};R.useImperativeHandle=function(t,e,n){return ve.current.useImperativeHandle(t,e,n)};R.useInsertionEffect=function(t,e){return ve.current.useInsertionEffect(t,e)};R.useLayoutEffect=function(t,e){return ve.current.useLayoutEffect(t,e)};R.useMemo=function(t,e){return ve.current.useMemo(t,e)};R.useReducer=function(t,e,n){return ve.current.useReducer(t,e,n)};R.useRef=function(t){return ve.current.useRef(t)};R.useState=function(t){return ve.current.useState(t)};R.useSyncExternalStore=function(t,e,n){return ve.current.useSyncExternalStore(t,e,n)};R.useTransition=function(){return ve.current.useTransition()};R.version="18.3.1";Yu.exports=R;var E=Yu.exports;const Vd=Td(E);/** | |
* @license React | |
* react-jsx-runtime.production.min.js | |
* | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/var Hd=E,$d=Symbol.for("react.element"),Xd=Symbol.for("react.fragment"),Zd=Object.prototype.hasOwnProperty,Qd=Hd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Gd={key:!0,ref:!0,__self:!0,__source:!0};function la(t,e,n){var r,i={},l=null,s=null;n!==void 0&&(l=""+n),e.key!==void 0&&(l=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)Zd.call(e,r)&&!Gd.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:$d,type:t,key:l,ref:s,props:i,_owner:Qd.current}}Li.Fragment=Xd;Li.jsx=la;Li.jsxs=la;Ku.exports=Li;var I=Ku.exports,Il={},sa={exports:{}},ze={},oa={exports:{}},ua={};/** | |
* @license React | |
* scheduler.production.min.js | |
* | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/(function(t){function e(T,A){var F=T.length;T.push(A);e:for(;0<F;){var W=F-1>>>1,G=T[W];if(0<i(G,A))T[W]=A,T[F]=G,F=W;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var A=T[0],F=T.pop();if(F!==A){T[0]=F;e:for(var W=0,G=T.length,nt=G>>>1;W<nt;){var te=2*(W+1)-1,mt=T[te],Ge=te+1,vt=T[Ge];if(0>i(mt,F))Ge<G&&0>i(vt,mt)?(T[W]=vt,T[Ge]=F,W=Ge):(T[W]=mt,T[te]=F,W=te);else if(Ge<G&&0>i(vt,F))T[W]=vt,T[Ge]=F,W=Ge;else break e}}return A}function i(T,A){var F=T.sortIndex-A.sortIndex;return F!==0?F:T.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var s=Date,o=s.now();t.unstable_now=function(){return s.now()-o}}var u=[],a=[],p=1,m=null,g=3,k=!1,y=!1,f=!1,S=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(T){for(var A=n(a);A!==null;){if(A.callback===null)r(a);else if(A.startTime<=T)r(a),A.sortIndex=A.expirationTime,e(u,A);else break;A=n(a)}}function v(T){if(f=!1,h(T),!y)if(n(u)!==null)y=!0,tt(w);else{var A=n(a);A!==null&&Bt(v,A.startTime-T)}}function w(T,A){y=!1,f&&(f=!1,d(L),L=-1),k=!0;var F=g;try{for(h(A),m=n(u);m!==null&&(!(m.expirationTime>A)||T&&!le());){var W=m.callback;if(typeof W=="function"){m.callback=null,g=m.priorityLevel;var G=W(m.expirationTime<=A);A=t.unstable_now(),typeof G=="function"?m.callback=G:m===n(u)&&r(u),h(A)}else r(u);m=n(u)}if(m!==null)var nt=!0;else{var te=n(a);te!==null&&Bt(v,te.startTime-A),nt=!1}return nt}finally{m=null,g=F,k=!1}}var C=!1,_=null,L=-1,O=5,N=-1;function le(){return!(t.unstable_now()-N<O)}function Be(){if(_!==null){var T=t.unstable_now();N=T;var A=!0;try{A=_(!0,T)}finally{A?pt():(C=!1,_=null)}}else C=!1}var pt;if(typeof c=="function")pt=function(){c(Be)};else if(typeof MessageChannel<"u"){var gt=new MessageChannel,Pr=gt.port2;gt.port1.onmessage=Be,pt=function(){Pr.postMessage(null)}}else pt=function(){S(Be,0)};function tt(T){_=T,C||(C=!0,pt())}function Bt(T,A){L=S(function(){T(t.unstable_now())},A)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_continueExecution=function(){y||k||(y=!0,tt(w))},t.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<T?Math.floor(1e3/T):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_getFirstCallbackNode=function(){return n(u)},t.unstable_next=function(T){switch(g){case 1:case 2:case 3:var A=3;break;default:A=g}var F=g;g=A;try{return T()}finally{g=F}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(T,A){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var F=g;g=T;try{return A()}finally{g=F}},t.unstable_scheduleCallback=function(T,A,F){var W=t.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?W+F:W):F=W,T){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=F+G,T={id:p++,callback:A,priorityLevel:T,startTime:F,expirationTime:G,sortIndex:-1},F>W?(T.sortIndex=F,e(a,T),n(u)===null&&T===n(a)&&(f?(d(L),L=-1):f=!0,Bt(v,F-W))):(T.sortIndex=G,e(u,T),y||k||(y=!0,tt(w))),T},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(T){var A=g;return function(){var F=g;g=A;try{return T.apply(this,arguments)}finally{g=F}}}})(ua);oa.exports=ua;var Kd=oa.exports;/** | |
* @license React | |
* react-dom.production.min.js | |
* | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/var Yd=E,Le=Kd;function x(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var aa=new Set,sr={};function en(t,e){Tn(t,e),Tn(t+"Capture",e)}function Tn(t,e){for(sr[t]=e,t=0;t<e.length;t++)aa.add(e[t])}var at=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xl=Object.prototype.hasOwnProperty,Jd=/^[: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]*$/,_o={},To={};function qd(t){return xl.call(To,t)?!0:xl.call(_o,t)?!1:Jd.test(t)?To[t]=!0:(_o[t]=!0,!1)}function bd(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function eh(t,e,n,r){if(e===null||typeof e>"u"||bd(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ye(t,e,n,r,i,l,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=l,this.removeEmptyString=s}var ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ce[t]=new ye(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ce[e]=new ye(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ce[t]=new ye(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ce[t]=new ye(t,2,!1,t,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(t){ce[t]=new ye(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ce[t]=new ye(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ce[t]=new ye(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ce[t]=new ye(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ce[t]=new ye(t,5,!1,t.toLowerCase(),null,!1,!1)});var xs=/[\-:]([a-z])/g;function Cs(t){return t[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(t){var e=t.replace(xs,Cs);ce[e]=new ye(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(xs,Cs);ce[e]=new ye(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(xs,Cs);ce[e]=new ye(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ce[t]=new ye(t,1,!1,t.toLowerCase(),null,!1,!1)});ce.xlinkHref=new ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ce[t]=new ye(t,1,!1,t.toLowerCase(),null,!0,!0)});function _s(t,e,n,r){var i=ce.hasOwnProperty(e)?ce[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(eh(e,n,i,r)&&(n=null),r||i===null?qd(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var ft=Yd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,zr=Symbol.for("react.element"),ln=Symbol.for("react.portal"),sn=Symbol.for("react.fragment"),Ts=Symbol.for("react.strict_mode"),Cl=Symbol.for("react.profiler"),ca=Symbol.for("react.provider"),da=Symbol.for("react.context"),Es=Symbol.for("react.forward_ref"),_l=Symbol.for("react.suspense"),Tl=Symbol.for("react.suspense_list"),Ps=Symbol.for("react.memo"),kt=Symbol.for("react.lazy"),ha=Symbol.for("react.offscreen"),Eo=Symbol.iterator;function jn(t){return t===null||typeof t!="object"?null:(t=Eo&&t[Eo]||t["@@iterator"],typeof t=="function"?t:null)}var J=Object.assign,Gi;function Qn(t){if(Gi===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Gi=e&&e[1]||""}return` | |
`+Gi+t}var Ki=!1;function Yi(t,e){if(!t||Ki)return"";Ki=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(a){var r=a}Reflect.construct(t,[],e)}else{try{e.call()}catch(a){r=a}t.call(e.prototype)}else{try{throw Error()}catch(a){r=a}t()}}catch(a){if(a&&r&&typeof a.stack=="string"){for(var i=a.stack.split(` | |
`),l=r.stack.split(` | |
`),s=i.length-1,o=l.length-1;1<=s&&0<=o&&i[s]!==l[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==l[o]){if(s!==1||o!==1)do if(s--,o--,0>o||i[s]!==l[o]){var u=` | |
`+i[s].replace(" at new "," at ");return t.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",t.displayName)),u}while(1<=s&&0<=o);break}}}finally{Ki=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Qn(t):""}function th(t){switch(t.tag){case 5:return Qn(t.type);case 16:return Qn("Lazy");case 13:return Qn("Suspense");case 19:return Qn("SuspenseList");case 0:case 2:case 15:return t=Yi(t.type,!1),t;case 11:return t=Yi(t.type.render,!1),t;case 1:return t=Yi(t.type,!0),t;default:return""}}function El(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case sn:return"Fragment";case ln:return"Portal";case Cl:return"Profiler";case Ts:return"StrictMode";case _l:return"Suspense";case Tl:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case da:return(t.displayName||"Context")+".Consumer";case ca:return(t._context.displayName||"Context")+".Provider";case Es:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ps:return e=t.displayName||null,e!==null?e:El(t.type)||"Memo";case kt:e=t._payload,t=t._init;try{return El(t(e))}catch{}}return null}function nh(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return El(e);case 8:return e===Ts?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function At(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function fa(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function rh(t){var e=fa(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Mr(t){t._valueTracker||(t._valueTracker=rh(t))}function pa(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=fa(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ii(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Pl(t,e){var n=e.checked;return J({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Po(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=At(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ga(t,e){e=e.checked,e!=null&&_s(t,"checked",e,!1)}function Ll(t,e){ga(t,e);var n=At(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?zl(t,e.type,n):e.hasOwnProperty("defaultValue")&&zl(t,e.type,At(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Lo(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function zl(t,e,n){(e!=="number"||ii(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Gn=Array.isArray;function Sn(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+At(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Ml(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(x(91));return J({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function zo(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(x(92));if(Gn(n)){if(1<n.length)throw Error(x(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:At(n)}}function ma(t,e){var n=At(e.value),r=At(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Mo(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function va(t){switch(t){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 Fl(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?va(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Fr,ya=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Fr=Fr||document.createElement("div"),Fr.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Fr.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function or(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Jn={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},ih=["Webkit","ms","Moz","O"];Object.keys(Jn).forEach(function(t){ih.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Jn[e]=Jn[t]})});function Sa(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Jn.hasOwnProperty(t)&&Jn[t]?(""+e).trim():e+"px"}function ka(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Sa(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var lh=J({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 Nl(t,e){if(e){if(lh[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(x(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(x(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(x(61))}if(e.style!=null&&typeof e.style!="object")throw Error(x(62))}}function Al(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Rl=null;function Ls(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ol=null,kn=null,wn=null;function Fo(t){if(t=Tr(t)){if(typeof Ol!="function")throw Error(x(280));var e=t.stateNode;e&&(e=Ai(e),Ol(t.stateNode,t.type,e))}}function wa(t){kn?wn?wn.push(t):wn=[t]:kn=t}function Ia(){if(kn){var t=kn,e=wn;if(wn=kn=null,Fo(t),e)for(t=0;t<e.length;t++)Fo(e[t])}}function xa(t,e){return t(e)}function Ca(){}var Ji=!1;function _a(t,e,n){if(Ji)return t(e,n);Ji=!0;try{return xa(t,e,n)}finally{Ji=!1,(kn!==null||wn!==null)&&(Ca(),Ia())}}function ur(t,e){var n=t.stateNode;if(n===null)return null;var r=Ai(n);if(r===null)return null;n=r[e];e:switch(e){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)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(x(231,e,typeof n));return n}var Dl=!1;if(at)try{var Bn={};Object.defineProperty(Bn,"passive",{get:function(){Dl=!0}}),window.addEventListener("test",Bn,Bn),window.removeEventListener("test",Bn,Bn)}catch{Dl=!1}function sh(t,e,n,r,i,l,s,o,u){var a=Array.prototype.slice.call(arguments,3);try{e.apply(n,a)}catch(p){this.onError(p)}}var qn=!1,li=null,si=!1,jl=null,oh={onError:function(t){qn=!0,li=t}};function uh(t,e,n,r,i,l,s,o,u){qn=!1,li=null,sh.apply(oh,arguments)}function ah(t,e,n,r,i,l,s,o,u){if(uh.apply(this,arguments),qn){if(qn){var a=li;qn=!1,li=null}else throw Error(x(198));si||(si=!0,jl=a)}}function tn(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Ta(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function No(t){if(tn(t)!==t)throw Error(x(188))}function ch(t){var e=t.alternate;if(!e){if(e=tn(t),e===null)throw Error(x(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return No(i),t;if(l===r)return No(i),e;l=l.sibling}throw Error(x(188))}if(n.return!==r.return)n=i,r=l;else{for(var s=!1,o=i.child;o;){if(o===n){s=!0,n=i,r=l;break}if(o===r){s=!0,r=i,n=l;break}o=o.sibling}if(!s){for(o=l.child;o;){if(o===n){s=!0,n=l,r=i;break}if(o===r){s=!0,r=l,n=i;break}o=o.sibling}if(!s)throw Error(x(189))}}if(n.alternate!==r)throw Error(x(190))}if(n.tag!==3)throw Error(x(188));return n.stateNode.current===n?t:e}function Ea(t){return t=ch(t),t!==null?Pa(t):null}function Pa(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Pa(t);if(e!==null)return e;t=t.sibling}return null}var La=Le.unstable_scheduleCallback,Ao=Le.unstable_cancelCallback,dh=Le.unstable_shouldYield,hh=Le.unstable_requestPaint,b=Le.unstable_now,fh=Le.unstable_getCurrentPriorityLevel,zs=Le.unstable_ImmediatePriority,za=Le.unstable_UserBlockingPriority,oi=Le.unstable_NormalPriority,ph=Le.unstable_LowPriority,Ma=Le.unstable_IdlePriority,zi=null,be=null;function gh(t){if(be&&typeof be.onCommitFiberRoot=="function")try{be.onCommitFiberRoot(zi,t,void 0,(t.current.flags&128)===128)}catch{}}var Xe=Math.clz32?Math.clz32:yh,mh=Math.log,vh=Math.LN2;function yh(t){return t>>>=0,t===0?32:31-(mh(t)/vh|0)|0}var Nr=64,Ar=4194304;function Kn(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ui(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,l=t.pingedLanes,s=n&268435455;if(s!==0){var o=s&~i;o!==0?r=Kn(o):(l&=s,l!==0&&(r=Kn(l)))}else s=n&~i,s!==0?r=Kn(s):l!==0&&(r=Kn(l));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,l=e&-e,i>=l||i===16&&(l&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Xe(e),i=1<<n,r|=t[n],e&=~i;return r}function Sh(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 kh(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,l=t.pendingLanes;0<l;){var s=31-Xe(l),o=1<<s,u=i[s];u===-1?(!(o&n)||o&r)&&(i[s]=Sh(o,e)):u<=e&&(t.expiredLanes|=o),l&=~o}}function Bl(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Fa(){var t=Nr;return Nr<<=1,!(Nr&4194240)&&(Nr=64),t}function qi(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Cr(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Xe(e),t[e]=n}function wh(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Xe(n),l=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~l}}function Ms(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Xe(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var B=0;function Na(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Aa,Fs,Ra,Oa,Da,Ul=!1,Rr=[],Tt=null,Et=null,Pt=null,ar=new Map,cr=new Map,It=[],Ih="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 Ro(t,e){switch(t){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Et=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":ar.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":cr.delete(e.pointerId)}}function Un(t,e,n,r,i,l){return t===null||t.nativeEvent!==l?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},e!==null&&(e=Tr(e),e!==null&&Fs(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function xh(t,e,n,r,i){switch(e){case"focusin":return Tt=Un(Tt,t,e,n,r,i),!0;case"dragenter":return Et=Un(Et,t,e,n,r,i),!0;case"mouseover":return Pt=Un(Pt,t,e,n,r,i),!0;case"pointerover":var l=i.pointerId;return ar.set(l,Un(ar.get(l)||null,t,e,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,cr.set(l,Un(cr.get(l)||null,t,e,n,r,i)),!0}return!1}function ja(t){var e=$t(t.target);if(e!==null){var n=tn(e);if(n!==null){if(e=n.tag,e===13){if(e=Ta(n),e!==null){t.blockedOn=e,Da(t.priority,function(){Ra(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Gr(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Wl(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Rl=r,n.target.dispatchEvent(r),Rl=null}else return e=Tr(n),e!==null&&Fs(e),t.blockedOn=n,!1;e.shift()}return!0}function Oo(t,e,n){Gr(t)&&n.delete(e)}function Ch(){Ul=!1,Tt!==null&&Gr(Tt)&&(Tt=null),Et!==null&&Gr(Et)&&(Et=null),Pt!==null&&Gr(Pt)&&(Pt=null),ar.forEach(Oo),cr.forEach(Oo)}function Wn(t,e){t.blockedOn===e&&(t.blockedOn=null,Ul||(Ul=!0,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,Ch)))}function dr(t){function e(i){return Wn(i,t)}if(0<Rr.length){Wn(Rr[0],t);for(var n=1;n<Rr.length;n++){var r=Rr[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Tt!==null&&Wn(Tt,t),Et!==null&&Wn(Et,t),Pt!==null&&Wn(Pt,t),ar.forEach(e),cr.forEach(e),n=0;n<It.length;n++)r=It[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<It.length&&(n=It[0],n.blockedOn===null);)ja(n),n.blockedOn===null&&It.shift()}var In=ft.ReactCurrentBatchConfig,ai=!0;function _h(t,e,n,r){var i=B,l=In.transition;In.transition=null;try{B=1,Ns(t,e,n,r)}finally{B=i,In.transition=l}}function Th(t,e,n,r){var i=B,l=In.transition;In.transition=null;try{B=4,Ns(t,e,n,r)}finally{B=i,In.transition=l}}function Ns(t,e,n,r){if(ai){var i=Wl(t,e,n,r);if(i===null)ul(t,e,r,ci,n),Ro(t,r);else if(xh(i,t,e,n,r))r.stopPropagation();else if(Ro(t,r),e&4&&-1<Ih.indexOf(t)){for(;i!==null;){var l=Tr(i);if(l!==null&&Aa(l),l=Wl(t,e,n,r),l===null&&ul(t,e,r,ci,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else ul(t,e,r,null,n)}}var ci=null;function Wl(t,e,n,r){if(ci=null,t=Ls(r),t=$t(t),t!==null)if(e=tn(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Ta(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return ci=t,null}function Ba(t){switch(t){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(fh()){case zs:return 1;case za:return 4;case oi:case ph:return 16;case Ma:return 536870912;default:return 16}default:return 16}}var Ct=null,As=null,Kr=null;function Ua(){if(Kr)return Kr;var t,e=As,n=e.length,r,i="value"in Ct?Ct.value:Ct.textContent,l=i.length;for(t=0;t<n&&e[t]===i[t];t++);var s=n-t;for(r=1;r<=s&&e[n-r]===i[l-r];r++);return Kr=i.slice(t,1<r?1-r:void 0)}function Yr(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Or(){return!0}function Do(){return!1}function Me(t){function e(n,r,i,l,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(n=t[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Or:Do,this.isPropagationStopped=Do,this}return J(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Or)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Or)},persist:function(){},isPersistent:Or}),e}var An={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rs=Me(An),_r=J({},An,{view:0,detail:0}),Eh=Me(_r),bi,el,Vn,Mi=J({},_r,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Os,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Vn&&(Vn&&t.type==="mousemove"?(bi=t.screenX-Vn.screenX,el=t.screenY-Vn.screenY):el=bi=0,Vn=t),bi)},movementY:function(t){return"movementY"in t?t.movementY:el}}),jo=Me(Mi),Ph=J({},Mi,{dataTransfer:0}),Lh=Me(Ph),zh=J({},_r,{relatedTarget:0}),tl=Me(zh),Mh=J({},An,{animationName:0,elapsedTime:0,pseudoElement:0}),Fh=Me(Mh),Nh=J({},An,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Ah=Me(Nh),Rh=J({},An,{data:0}),Bo=Me(Rh),Oh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dh={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"},jh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bh(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=jh[t])?!!e[t]:!1}function Os(){return Bh}var Uh=J({},_r,{key:function(t){if(t.key){var e=Oh[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Yr(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Dh[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Os,charCode:function(t){return t.type==="keypress"?Yr(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Yr(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Wh=Me(Uh),Vh=J({},Mi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uo=Me(Vh),Hh=J({},_r,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Os}),$h=Me(Hh),Xh=J({},An,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zh=Me(Xh),Qh=J({},Mi,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Gh=Me(Qh),Kh=[9,13,27,32],Ds=at&&"CompositionEvent"in window,bn=null;at&&"documentMode"in document&&(bn=document.documentMode);var Yh=at&&"TextEvent"in window&&!bn,Wa=at&&(!Ds||bn&&8<bn&&11>=bn),Wo=" ",Vo=!1;function Va(t,e){switch(t){case"keyup":return Kh.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ha(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var on=!1;function Jh(t,e){switch(t){case"compositionend":return Ha(e);case"keypress":return e.which!==32?null:(Vo=!0,Wo);case"textInput":return t=e.data,t===Wo&&Vo?null:t;default:return null}}function qh(t,e){if(on)return t==="compositionend"||!Ds&&Va(t,e)?(t=Ua(),Kr=As=Ct=null,on=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Wa&&e.locale!=="ko"?null:e.data;default:return null}}var bh={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 Ho(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!bh[t.type]:e==="textarea"}function $a(t,e,n,r){wa(r),e=di(e,"onChange"),0<e.length&&(n=new Rs("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var er=null,hr=null;function ef(t){tc(t,0)}function Fi(t){var e=cn(t);if(pa(e))return t}function tf(t,e){if(t==="change")return e}var Xa=!1;if(at){var nl;if(at){var rl="oninput"in document;if(!rl){var $o=document.createElement("div");$o.setAttribute("oninput","return;"),rl=typeof $o.oninput=="function"}nl=rl}else nl=!1;Xa=nl&&(!document.documentMode||9<document.documentMode)}function Xo(){er&&(er.detachEvent("onpropertychange",Za),hr=er=null)}function Za(t){if(t.propertyName==="value"&&Fi(hr)){var e=[];$a(e,hr,t,Ls(t)),_a(ef,e)}}function nf(t,e,n){t==="focusin"?(Xo(),er=e,hr=n,er.attachEvent("onpropertychange",Za)):t==="focusout"&&Xo()}function rf(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Fi(hr)}function lf(t,e){if(t==="click")return Fi(e)}function sf(t,e){if(t==="input"||t==="change")return Fi(e)}function of(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Qe=typeof Object.is=="function"?Object.is:of;function fr(t,e){if(Qe(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!xl.call(e,i)||!Qe(t[i],e[i]))return!1}return!0}function Zo(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Qo(t,e){var n=Zo(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zo(n)}}function Qa(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Qa(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Ga(){for(var t=window,e=ii();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ii(t.document)}return e}function js(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function uf(t){var e=Ga(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Qa(n.ownerDocument.documentElement,n)){if(r!==null&&js(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!t.extend&&l>r&&(i=r,r=l,l=i),i=Qo(n,l);var s=Qo(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),l>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var af=at&&"documentMode"in document&&11>=document.documentMode,un=null,Vl=null,tr=null,Hl=!1;function Go(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hl||un==null||un!==ii(r)||(r=un,"selectionStart"in r&&js(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}),tr&&fr(tr,r)||(tr=r,r=di(Vl,"onSelect"),0<r.length&&(e=new Rs("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=un)))}function Dr(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var an={animationend:Dr("Animation","AnimationEnd"),animationiteration:Dr("Animation","AnimationIteration"),animationstart:Dr("Animation","AnimationStart"),transitionend:Dr("Transition","TransitionEnd")},il={},Ka={};at&&(Ka=document.createElement("div").style,"AnimationEvent"in window||(delete an.animationend.animation,delete an.animationiteration.animation,delete an.animationstart.animation),"TransitionEvent"in window||delete an.transitionend.transition);function Ni(t){if(il[t])return il[t];if(!an[t])return t;var e=an[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Ka)return il[t]=e[n];return t}var Ya=Ni("animationend"),Ja=Ni("animationiteration"),qa=Ni("animationstart"),ba=Ni("transitionend"),ec=new Map,Ko="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 Ot(t,e){ec.set(t,e),en(e,[t])}for(var ll=0;ll<Ko.length;ll++){var sl=Ko[ll],cf=sl.toLowerCase(),df=sl[0].toUpperCase()+sl.slice(1);Ot(cf,"on"+df)}Ot(Ya,"onAnimationEnd");Ot(Ja,"onAnimationIteration");Ot(qa,"onAnimationStart");Ot("dblclick","onDoubleClick");Ot("focusin","onFocus");Ot("focusout","onBlur");Ot(ba,"onTransitionEnd");Tn("onMouseEnter",["mouseout","mouseover"]);Tn("onMouseLeave",["mouseout","mouseover"]);Tn("onPointerEnter",["pointerout","pointerover"]);Tn("onPointerLeave",["pointerout","pointerover"]);en("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));en("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));en("onBeforeInput",["compositionend","keypress","textInput","paste"]);en("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));en("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));en("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yn="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(" "),hf=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yn));function Yo(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,ah(r,e,void 0,t),t.currentTarget=null}function tc(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var l=void 0;if(e)for(var s=r.length-1;0<=s;s--){var o=r[s],u=o.instance,a=o.currentTarget;if(o=o.listener,u!==l&&i.isPropagationStopped())break e;Yo(i,o,a),l=u}else for(s=0;s<r.length;s++){if(o=r[s],u=o.instance,a=o.currentTarget,o=o.listener,u!==l&&i.isPropagationStopped())break e;Yo(i,o,a),l=u}}}if(si)throw t=jl,si=!1,jl=null,t}function $(t,e){var n=e[Gl];n===void 0&&(n=e[Gl]=new Set);var r=t+"__bubble";n.has(r)||(nc(e,t,2,!1),n.add(r))}function ol(t,e,n){var r=0;e&&(r|=4),nc(n,t,r,e)}var jr="_reactListening"+Math.random().toString(36).slice(2);function pr(t){if(!t[jr]){t[jr]=!0,aa.forEach(function(n){n!=="selectionchange"&&(hf.has(n)||ol(n,!1,t),ol(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[jr]||(e[jr]=!0,ol("selectionchange",!1,e))}}function nc(t,e,n,r){switch(Ba(e)){case 1:var i=_h;break;case 4:i=Th;break;default:i=Ns}n=i.bind(null,e,n,t),i=void 0,!Dl||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function ul(t,e,n,r,i){var l=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;o!==null;){if(s=$t(o),s===null)return;if(u=s.tag,u===5||u===6){r=l=s;continue e}o=o.parentNode}}r=r.return}_a(function(){var a=l,p=Ls(n),m=[];e:{var g=ec.get(t);if(g!==void 0){var k=Rs,y=t;switch(t){case"keypress":if(Yr(n)===0)break e;case"keydown":case"keyup":k=Wh;break;case"focusin":y="focus",k=tl;break;case"focusout":y="blur",k=tl;break;case"beforeblur":case"afterblur":k=tl;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":k=jo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=Lh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=$h;break;case Ya:case Ja:case qa:k=Fh;break;case ba:k=Zh;break;case"scroll":k=Eh;break;case"wheel":k=Gh;break;case"copy":case"cut":case"paste":k=Ah;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=Uo}var f=(e&4)!==0,S=!f&&t==="scroll",d=f?g!==null?g+"Capture":null:g;f=[];for(var c=a,h;c!==null;){h=c;var v=h.stateNode;if(h.tag===5&&v!==null&&(h=v,d!==null&&(v=ur(c,d),v!=null&&f.push(gr(c,v,h)))),S)break;c=c.return}0<f.length&&(g=new k(g,y,null,n,p),m.push({event:g,listeners:f}))}}if(!(e&7)){e:{if(g=t==="mouseover"||t==="pointerover",k=t==="mouseout"||t==="pointerout",g&&n!==Rl&&(y=n.relatedTarget||n.fromElement)&&($t(y)||y[ct]))break e;if((k||g)&&(g=p.window===p?p:(g=p.ownerDocument)?g.defaultView||g.parentWindow:window,k?(y=n.relatedTarget||n.toElement,k=a,y=y?$t(y):null,y!==null&&(S=tn(y),y!==S||y.tag!==5&&y.tag!==6)&&(y=null)):(k=null,y=a),k!==y)){if(f=jo,v="onMouseLeave",d="onMouseEnter",c="mouse",(t==="pointerout"||t==="pointerover")&&(f=Uo,v="onPointerLeave",d="onPointerEnter",c="pointer"),S=k==null?g:cn(k),h=y==null?g:cn(y),g=new f(v,c+"leave",k,n,p),g.target=S,g.relatedTarget=h,v=null,$t(p)===a&&(f=new f(d,c+"enter",y,n,p),f.target=h,f.relatedTarget=S,v=f),S=v,k&&y)t:{for(f=k,d=y,c=0,h=f;h;h=nn(h))c++;for(h=0,v=d;v;v=nn(v))h++;for(;0<c-h;)f=nn(f),c--;for(;0<h-c;)d=nn(d),h--;for(;c--;){if(f===d||d!==null&&f===d.alternate)break t;f=nn(f),d=nn(d)}f=null}else f=null;k!==null&&Jo(m,g,k,f,!1),y!==null&&S!==null&&Jo(m,S,y,f,!0)}}e:{if(g=a?cn(a):window,k=g.nodeName&&g.nodeName.toLowerCase(),k==="select"||k==="input"&&g.type==="file")var w=tf;else if(Ho(g))if(Xa)w=sf;else{w=rf;var C=nf}else(k=g.nodeName)&&k.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(w=lf);if(w&&(w=w(t,a))){$a(m,w,n,p);break e}C&&C(t,g,a),t==="focusout"&&(C=g._wrapperState)&&C.controlled&&g.type==="number"&&zl(g,"number",g.value)}switch(C=a?cn(a):window,t){case"focusin":(Ho(C)||C.contentEditable==="true")&&(un=C,Vl=a,tr=null);break;case"focusout":tr=Vl=un=null;break;case"mousedown":Hl=!0;break;case"contextmenu":case"mouseup":case"dragend":Hl=!1,Go(m,n,p);break;case"selectionchange":if(af)break;case"keydown":case"keyup":Go(m,n,p)}var _;if(Ds)e:{switch(t){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else on?Va(t,n)&&(L="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(L="onCompositionStart");L&&(Wa&&n.locale!=="ko"&&(on||L!=="onCompositionStart"?L==="onCompositionEnd"&&on&&(_=Ua()):(Ct=p,As="value"in Ct?Ct.value:Ct.textContent,on=!0)),C=di(a,L),0<C.length&&(L=new Bo(L,t,null,n,p),m.push({event:L,listeners:C}),_?L.data=_:(_=Ha(n),_!==null&&(L.data=_)))),(_=Yh?Jh(t,n):qh(t,n))&&(a=di(a,"onBeforeInput"),0<a.length&&(p=new Bo("onBeforeInput","beforeinput",null,n,p),m.push({event:p,listeners:a}),p.data=_))}tc(m,e)})}function gr(t,e,n){return{instance:t,listener:e,currentTarget:n}}function di(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=ur(t,n),l!=null&&r.unshift(gr(t,l,i)),l=ur(t,e),l!=null&&r.push(gr(t,l,i))),t=t.return}return r}function nn(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Jo(t,e,n,r,i){for(var l=e._reactName,s=[];n!==null&&n!==r;){var o=n,u=o.alternate,a=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&a!==null&&(o=a,i?(u=ur(n,l),u!=null&&s.unshift(gr(n,u,o))):i||(u=ur(n,l),u!=null&&s.push(gr(n,u,o)))),n=n.return}s.length!==0&&t.push({event:e,listeners:s})}var ff=/\r\n?/g,pf=/\u0000|\uFFFD/g;function qo(t){return(typeof t=="string"?t:""+t).replace(ff,` | |
`).replace(pf,"")}function Br(t,e,n){if(e=qo(e),qo(t)!==e&&n)throw Error(x(425))}function hi(){}var $l=null,Xl=null;function Zl(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Ql=typeof setTimeout=="function"?setTimeout:void 0,gf=typeof clearTimeout=="function"?clearTimeout:void 0,bo=typeof Promise=="function"?Promise:void 0,mf=typeof queueMicrotask=="function"?queueMicrotask:typeof bo<"u"?function(t){return bo.resolve(null).then(t).catch(vf)}:Ql;function vf(t){setTimeout(function(){throw t})}function al(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),dr(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);dr(e)}function Lt(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function eu(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Rn=Math.random().toString(36).slice(2),qe="__reactFiber$"+Rn,mr="__reactProps$"+Rn,ct="__reactContainer$"+Rn,Gl="__reactEvents$"+Rn,yf="__reactListeners$"+Rn,Sf="__reactHandles$"+Rn;function $t(t){var e=t[qe];if(e)return e;for(var n=t.parentNode;n;){if(e=n[ct]||n[qe]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=eu(t);t!==null;){if(n=t[qe])return n;t=eu(t)}return e}t=n,n=t.parentNode}return null}function Tr(t){return t=t[qe]||t[ct],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function cn(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(x(33))}function Ai(t){return t[mr]||null}var Kl=[],dn=-1;function Dt(t){return{current:t}}function X(t){0>dn||(t.current=Kl[dn],Kl[dn]=null,dn--)}function H(t,e){dn++,Kl[dn]=t.current,t.current=e}var Rt={},pe=Dt(Rt),Ie=Dt(!1),Kt=Rt;function En(t,e){var n=t.type.contextTypes;if(!n)return Rt;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=e[l];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function xe(t){return t=t.childContextTypes,t!=null}function fi(){X(Ie),X(pe)}function tu(t,e,n){if(pe.current!==Rt)throw Error(x(168));H(pe,e),H(Ie,n)}function rc(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(x(108,nh(t)||"Unknown",i));return J({},n,r)}function pi(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Rt,Kt=pe.current,H(pe,t),H(Ie,Ie.current),!0}function nu(t,e,n){var r=t.stateNode;if(!r)throw Error(x(169));n?(t=rc(t,e,Kt),r.__reactInternalMemoizedMergedChildContext=t,X(Ie),X(pe),H(pe,t)):X(Ie),H(Ie,n)}var lt=null,Ri=!1,cl=!1;function ic(t){lt===null?lt=[t]:lt.push(t)}function kf(t){Ri=!0,ic(t)}function jt(){if(!cl&<!==null){cl=!0;var t=0,e=B;try{var n=lt;for(B=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}lt=null,Ri=!1}catch(i){throw lt!==null&&(lt=lt.slice(t+1)),La(zs,jt),i}finally{B=e,cl=!1}}return null}var hn=[],fn=0,gi=null,mi=0,Ne=[],Ae=0,Yt=null,st=1,ot="";function Wt(t,e){hn[fn++]=mi,hn[fn++]=gi,gi=t,mi=e}function lc(t,e,n){Ne[Ae++]=st,Ne[Ae++]=ot,Ne[Ae++]=Yt,Yt=t;var r=st;t=ot;var i=32-Xe(r)-1;r&=~(1<<i),n+=1;var l=32-Xe(e)+i;if(30<l){var s=i-i%5;l=(r&(1<<s)-1).toString(32),r>>=s,i-=s,st=1<<32-Xe(e)+i|n<<i|r,ot=l+t}else st=1<<l|n<<i|r,ot=t}function Bs(t){t.return!==null&&(Wt(t,1),lc(t,1,0))}function Us(t){for(;t===gi;)gi=hn[--fn],hn[fn]=null,mi=hn[--fn],hn[fn]=null;for(;t===Yt;)Yt=Ne[--Ae],Ne[Ae]=null,ot=Ne[--Ae],Ne[Ae]=null,st=Ne[--Ae],Ne[Ae]=null}var Pe=null,Ee=null,Q=!1,$e=null;function sc(t,e){var n=Re(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function ru(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Pe=t,Ee=Lt(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Pe=t,Ee=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Yt!==null?{id:st,overflow:ot}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Re(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Pe=t,Ee=null,!0):!1;default:return!1}}function Yl(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Jl(t){if(Q){var e=Ee;if(e){var n=e;if(!ru(t,e)){if(Yl(t))throw Error(x(418));e=Lt(n.nextSibling);var r=Pe;e&&ru(t,e)?sc(r,n):(t.flags=t.flags&-4097|2,Q=!1,Pe=t)}}else{if(Yl(t))throw Error(x(418));t.flags=t.flags&-4097|2,Q=!1,Pe=t}}}function iu(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Pe=t}function Ur(t){if(t!==Pe)return!1;if(!Q)return iu(t),Q=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Zl(t.type,t.memoizedProps)),e&&(e=Ee)){if(Yl(t))throw oc(),Error(x(418));for(;e;)sc(t,e),e=Lt(e.nextSibling)}if(iu(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(x(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Ee=Lt(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Ee=null}}else Ee=Pe?Lt(t.stateNode.nextSibling):null;return!0}function oc(){for(var t=Ee;t;)t=Lt(t.nextSibling)}function Pn(){Ee=Pe=null,Q=!1}function Ws(t){$e===null?$e=[t]:$e.push(t)}var wf=ft.ReactCurrentBatchConfig;function Hn(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(x(309));var r=n.stateNode}if(!r)throw Error(x(147,t));var i=r,l=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===l?e.ref:(e=function(s){var o=i.refs;s===null?delete o[l]:o[l]=s},e._stringRef=l,e)}if(typeof t!="string")throw Error(x(284));if(!n._owner)throw Error(x(290,t))}return t}function Wr(t,e){throw t=Object.prototype.toString.call(e),Error(x(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function lu(t){var e=t._init;return e(t._payload)}function uc(t){function e(d,c){if(t){var h=d.deletions;h===null?(d.deletions=[c],d.flags|=16):h.push(c)}}function n(d,c){if(!t)return null;for(;c!==null;)e(d,c),c=c.sibling;return null}function r(d,c){for(d=new Map;c!==null;)c.key!==null?d.set(c.key,c):d.set(c.index,c),c=c.sibling;return d}function i(d,c){return d=Nt(d,c),d.index=0,d.sibling=null,d}function l(d,c,h){return d.index=h,t?(h=d.alternate,h!==null?(h=h.index,h<c?(d.flags|=2,c):h):(d.flags|=2,c)):(d.flags|=1048576,c)}function s(d){return t&&d.alternate===null&&(d.flags|=2),d}function o(d,c,h,v){return c===null||c.tag!==6?(c=vl(h,d.mode,v),c.return=d,c):(c=i(c,h),c.return=d,c)}function u(d,c,h,v){var w=h.type;return w===sn?p(d,c,h.props.children,v,h.key):c!==null&&(c.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===kt&&lu(w)===c.type)?(v=i(c,h.props),v.ref=Hn(d,c,h),v.return=d,v):(v=ri(h.type,h.key,h.props,null,d.mode,v),v.ref=Hn(d,c,h),v.return=d,v)}function a(d,c,h,v){return c===null||c.tag!==4||c.stateNode.containerInfo!==h.containerInfo||c.stateNode.implementation!==h.implementation?(c=yl(h,d.mode,v),c.return=d,c):(c=i(c,h.children||[]),c.return=d,c)}function p(d,c,h,v,w){return c===null||c.tag!==7?(c=Gt(h,d.mode,v,w),c.return=d,c):(c=i(c,h),c.return=d,c)}function m(d,c,h){if(typeof c=="string"&&c!==""||typeof c=="number")return c=vl(""+c,d.mode,h),c.return=d,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case zr:return h=ri(c.type,c.key,c.props,null,d.mode,h),h.ref=Hn(d,null,c),h.return=d,h;case ln:return c=yl(c,d.mode,h),c.return=d,c;case kt:var v=c._init;return m(d,v(c._payload),h)}if(Gn(c)||jn(c))return c=Gt(c,d.mode,h,null),c.return=d,c;Wr(d,c)}return null}function g(d,c,h,v){var w=c!==null?c.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return w!==null?null:o(d,c,""+h,v);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case zr:return h.key===w?u(d,c,h,v):null;case ln:return h.key===w?a(d,c,h,v):null;case kt:return w=h._init,g(d,c,w(h._payload),v)}if(Gn(h)||jn(h))return w!==null?null:p(d,c,h,v,null);Wr(d,h)}return null}function k(d,c,h,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return d=d.get(h)||null,o(c,d,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case zr:return d=d.get(v.key===null?h:v.key)||null,u(c,d,v,w);case ln:return d=d.get(v.key===null?h:v.key)||null,a(c,d,v,w);case kt:var C=v._init;return k(d,c,h,C(v._payload),w)}if(Gn(v)||jn(v))return d=d.get(h)||null,p(c,d,v,w,null);Wr(c,v)}return null}function y(d,c,h,v){for(var w=null,C=null,_=c,L=c=0,O=null;_!==null&&L<h.length;L++){_.index>L?(O=_,_=null):O=_.sibling;var N=g(d,_,h[L],v);if(N===null){_===null&&(_=O);break}t&&_&&N.alternate===null&&e(d,_),c=l(N,c,L),C===null?w=N:C.sibling=N,C=N,_=O}if(L===h.length)return n(d,_),Q&&Wt(d,L),w;if(_===null){for(;L<h.length;L++)_=m(d,h[L],v),_!==null&&(c=l(_,c,L),C===null?w=_:C.sibling=_,C=_);return Q&&Wt(d,L),w}for(_=r(d,_);L<h.length;L++)O=k(_,d,L,h[L],v),O!==null&&(t&&O.alternate!==null&&_.delete(O.key===null?L:O.key),c=l(O,c,L),C===null?w=O:C.sibling=O,C=O);return t&&_.forEach(function(le){return e(d,le)}),Q&&Wt(d,L),w}function f(d,c,h,v){var w=jn(h);if(typeof w!="function")throw Error(x(150));if(h=w.call(h),h==null)throw Error(x(151));for(var C=w=null,_=c,L=c=0,O=null,N=h.next();_!==null&&!N.done;L++,N=h.next()){_.index>L?(O=_,_=null):O=_.sibling;var le=g(d,_,N.value,v);if(le===null){_===null&&(_=O);break}t&&_&&le.alternate===null&&e(d,_),c=l(le,c,L),C===null?w=le:C.sibling=le,C=le,_=O}if(N.done)return n(d,_),Q&&Wt(d,L),w;if(_===null){for(;!N.done;L++,N=h.next())N=m(d,N.value,v),N!==null&&(c=l(N,c,L),C===null?w=N:C.sibling=N,C=N);return Q&&Wt(d,L),w}for(_=r(d,_);!N.done;L++,N=h.next())N=k(_,d,L,N.value,v),N!==null&&(t&&N.alternate!==null&&_.delete(N.key===null?L:N.key),c=l(N,c,L),C===null?w=N:C.sibling=N,C=N);return t&&_.forEach(function(Be){return e(d,Be)}),Q&&Wt(d,L),w}function S(d,c,h,v){if(typeof h=="object"&&h!==null&&h.type===sn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case zr:e:{for(var w=h.key,C=c;C!==null;){if(C.key===w){if(w=h.type,w===sn){if(C.tag===7){n(d,C.sibling),c=i(C,h.props.children),c.return=d,d=c;break e}}else if(C.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===kt&&lu(w)===C.type){n(d,C.sibling),c=i(C,h.props),c.ref=Hn(d,C,h),c.return=d,d=c;break e}n(d,C);break}else e(d,C);C=C.sibling}h.type===sn?(c=Gt(h.props.children,d.mode,v,h.key),c.return=d,d=c):(v=ri(h.type,h.key,h.props,null,d.mode,v),v.ref=Hn(d,c,h),v.return=d,d=v)}return s(d);case ln:e:{for(C=h.key;c!==null;){if(c.key===C)if(c.tag===4&&c.stateNode.containerInfo===h.containerInfo&&c.stateNode.implementation===h.implementation){n(d,c.sibling),c=i(c,h.children||[]),c.return=d,d=c;break e}else{n(d,c);break}else e(d,c);c=c.sibling}c=yl(h,d.mode,v),c.return=d,d=c}return s(d);case kt:return C=h._init,S(d,c,C(h._payload),v)}if(Gn(h))return y(d,c,h,v);if(jn(h))return f(d,c,h,v);Wr(d,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,c!==null&&c.tag===6?(n(d,c.sibling),c=i(c,h),c.return=d,d=c):(n(d,c),c=vl(h,d.mode,v),c.return=d,d=c),s(d)):n(d,c)}return S}var Ln=uc(!0),ac=uc(!1),vi=Dt(null),yi=null,pn=null,Vs=null;function Hs(){Vs=pn=yi=null}function $s(t){var e=vi.current;X(vi),t._currentValue=e}function ql(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function xn(t,e){yi=t,Vs=pn=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(we=!0),t.firstContext=null)}function De(t){var e=t._currentValue;if(Vs!==t)if(t={context:t,memoizedValue:e,next:null},pn===null){if(yi===null)throw Error(x(308));pn=t,yi.dependencies={lanes:0,firstContext:t}}else pn=pn.next=t;return e}var Xt=null;function Xs(t){Xt===null?Xt=[t]:Xt.push(t)}function cc(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Xs(e)):(n.next=i.next,i.next=n),e.interleaved=n,dt(t,r)}function dt(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var wt=!1;function Zs(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function ut(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function zt(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,D&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,dt(t,n)}return i=r.interleaved,i===null?(e.next=e,Xs(r)):(e.next=i.next,i.next=e),r.interleaved=e,dt(t,n)}function Jr(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Ms(t,n)}}function su(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=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};l===null?i=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?i=l=e:l=l.next=e}else i=l=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Si(t,e,n,r){var i=t.updateQueue;wt=!1;var l=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var u=o,a=u.next;u.next=null,s===null?l=a:s.next=a,s=u;var p=t.alternate;p!==null&&(p=p.updateQueue,o=p.lastBaseUpdate,o!==s&&(o===null?p.firstBaseUpdate=a:o.next=a,p.lastBaseUpdate=u))}if(l!==null){var m=i.baseState;s=0,p=a=u=null,o=l;do{var g=o.lane,k=o.eventTime;if((r&g)===g){p!==null&&(p=p.next={eventTime:k,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=t,f=o;switch(g=e,k=n,f.tag){case 1:if(y=f.payload,typeof y=="function"){m=y.call(k,m,g);break e}m=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=f.payload,g=typeof y=="function"?y.call(k,m,g):y,g==null)break e;m=J({},m,g);break e;case 2:wt=!0}}o.callback!==null&&o.lane!==0&&(t.flags|=64,g=i.effects,g===null?i.effects=[o]:g.push(o))}else k={eventTime:k,lane:g,tag:o.tag,payload:o.payload,callback:o.callback,next:null},p===null?(a=p=k,u=m):p=p.next=k,s|=g;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;g=o,o=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(p===null&&(u=m),i.baseState=u,i.firstBaseUpdate=a,i.lastBaseUpdate=p,e=i.shared.interleaved,e!==null){i=e;do s|=i.lane,i=i.next;while(i!==e)}else l===null&&(i.shared.lanes=0);qt|=s,t.lanes=s,t.memoizedState=m}}function ou(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(x(191,i));i.call(r)}}}var Er={},et=Dt(Er),vr=Dt(Er),yr=Dt(Er);function Zt(t){if(t===Er)throw Error(x(174));return t}function Qs(t,e){switch(H(yr,e),H(vr,t),H(et,Er),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Fl(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Fl(e,t)}X(et),H(et,e)}function zn(){X(et),X(vr),X(yr)}function hc(t){Zt(yr.current);var e=Zt(et.current),n=Fl(e,t.type);e!==n&&(H(vr,t),H(et,n))}function Gs(t){vr.current===t&&(X(et),X(vr))}var K=Dt(0);function ki(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var dl=[];function Ks(){for(var t=0;t<dl.length;t++)dl[t]._workInProgressVersionPrimary=null;dl.length=0}var qr=ft.ReactCurrentDispatcher,hl=ft.ReactCurrentBatchConfig,Jt=0,Y=null,re=null,se=null,wi=!1,nr=!1,Sr=0,If=0;function de(){throw Error(x(321))}function Ys(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Qe(t[n],e[n]))return!1;return!0}function Js(t,e,n,r,i,l){if(Jt=l,Y=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,qr.current=t===null||t.memoizedState===null?Tf:Ef,t=n(r,i),nr){l=0;do{if(nr=!1,Sr=0,25<=l)throw Error(x(301));l+=1,se=re=null,e.updateQueue=null,qr.current=Pf,t=n(r,i)}while(nr)}if(qr.current=Ii,e=re!==null&&re.next!==null,Jt=0,se=re=Y=null,wi=!1,e)throw Error(x(300));return t}function qs(){var t=Sr!==0;return Sr=0,t}function Je(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return se===null?Y.memoizedState=se=t:se=se.next=t,se}function je(){if(re===null){var t=Y.alternate;t=t!==null?t.memoizedState:null}else t=re.next;var e=se===null?Y.memoizedState:se.next;if(e!==null)se=e,re=t;else{if(t===null)throw Error(x(310));re=t,t={memoizedState:re.memoizedState,baseState:re.baseState,baseQueue:re.baseQueue,queue:re.queue,next:null},se===null?Y.memoizedState=se=t:se=se.next=t}return se}function kr(t,e){return typeof e=="function"?e(t):e}function fl(t){var e=je(),n=e.queue;if(n===null)throw Error(x(311));n.lastRenderedReducer=t;var r=re,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var s=i.next;i.next=l.next,l.next=s}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var o=s=null,u=null,a=l;do{var p=a.lane;if((Jt&p)===p)u!==null&&(u=u.next={lane:0,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null}),r=a.hasEagerState?a.eagerState:t(r,a.action);else{var m={lane:p,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null};u===null?(o=u=m,s=r):u=u.next=m,Y.lanes|=p,qt|=p}a=a.next}while(a!==null&&a!==l);u===null?s=r:u.next=o,Qe(r,e.memoizedState)||(we=!0),e.memoizedState=r,e.baseState=s,e.baseQueue=u,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do l=i.lane,Y.lanes|=l,qt|=l,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function pl(t){var e=je(),n=e.queue;if(n===null)throw Error(x(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,l=e.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do l=t(l,s.action),s=s.next;while(s!==i);Qe(l,e.memoizedState)||(we=!0),e.memoizedState=l,e.baseQueue===null&&(e.baseState=l),n.lastRenderedState=l}return[l,r]}function fc(){}function pc(t,e){var n=Y,r=je(),i=e(),l=!Qe(r.memoizedState,i);if(l&&(r.memoizedState=i,we=!0),r=r.queue,bs(vc.bind(null,n,r,t),[t]),r.getSnapshot!==e||l||se!==null&&se.memoizedState.tag&1){if(n.flags|=2048,wr(9,mc.bind(null,n,r,i,e),void 0,null),oe===null)throw Error(x(349));Jt&30||gc(n,e,i)}return i}function gc(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Y.updateQueue,e===null?(e={lastEffect:null,stores:null},Y.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function mc(t,e,n,r){e.value=n,e.getSnapshot=r,yc(e)&&Sc(t)}function vc(t,e,n){return n(function(){yc(e)&&Sc(t)})}function yc(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Qe(t,n)}catch{return!0}}function Sc(t){var e=dt(t,1);e!==null&&Ze(e,t,1,-1)}function uu(t){var e=Je();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:kr,lastRenderedState:t},e.queue=t,t=t.dispatch=_f.bind(null,Y,t),[e.memoizedState,t]}function wr(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Y.updateQueue,e===null?(e={lastEffect:null,stores:null},Y.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function kc(){return je().memoizedState}function br(t,e,n,r){var i=Je();Y.flags|=t,i.memoizedState=wr(1|e,n,void 0,r===void 0?null:r)}function Oi(t,e,n,r){var i=je();r=r===void 0?null:r;var l=void 0;if(re!==null){var s=re.memoizedState;if(l=s.destroy,r!==null&&Ys(r,s.deps)){i.memoizedState=wr(e,n,l,r);return}}Y.flags|=t,i.memoizedState=wr(1|e,n,l,r)}function au(t,e){return br(8390656,8,t,e)}function bs(t,e){return Oi(2048,8,t,e)}function wc(t,e){return Oi(4,2,t,e)}function Ic(t,e){return Oi(4,4,t,e)}function xc(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Cc(t,e,n){return n=n!=null?n.concat([t]):null,Oi(4,4,xc.bind(null,e,t),n)}function eo(){}function _c(t,e){var n=je();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Ys(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Tc(t,e){var n=je();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Ys(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Ec(t,e,n){return Jt&21?(Qe(n,e)||(n=Fa(),Y.lanes|=n,qt|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,we=!0),t.memoizedState=n)}function xf(t,e){var n=B;B=n!==0&&4>n?n:4,t(!0);var r=hl.transition;hl.transition={};try{t(!1),e()}finally{B=n,hl.transition=r}}function Pc(){return je().memoizedState}function Cf(t,e,n){var r=Ft(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Lc(t))zc(e,n);else if(n=cc(t,e,n,r),n!==null){var i=me();Ze(n,t,r,i),Mc(n,e,r)}}function _f(t,e,n){var r=Ft(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Lc(t))zc(e,i);else{var l=t.alternate;if(t.lanes===0&&(l===null||l.lanes===0)&&(l=e.lastRenderedReducer,l!==null))try{var s=e.lastRenderedState,o=l(s,n);if(i.hasEagerState=!0,i.eagerState=o,Qe(o,s)){var u=e.interleaved;u===null?(i.next=i,Xs(e)):(i.next=u.next,u.next=i),e.interleaved=i;return}}catch{}finally{}n=cc(t,e,i,r),n!==null&&(i=me(),Ze(n,t,r,i),Mc(n,e,r))}}function Lc(t){var e=t.alternate;return t===Y||e!==null&&e===Y}function zc(t,e){nr=wi=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Mc(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Ms(t,n)}}var Ii={readContext:De,useCallback:de,useContext:de,useEffect:de,useImperativeHandle:de,useInsertionEffect:de,useLayoutEffect:de,useMemo:de,useReducer:de,useRef:de,useState:de,useDebugValue:de,useDeferredValue:de,useTransition:de,useMutableSource:de,useSyncExternalStore:de,useId:de,unstable_isNewReconciler:!1},Tf={readContext:De,useCallback:function(t,e){return Je().memoizedState=[t,e===void 0?null:e],t},useContext:De,useEffect:au,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,br(4194308,4,xc.bind(null,e,t),n)},useLayoutEffect:function(t,e){return br(4194308,4,t,e)},useInsertionEffect:function(t,e){return br(4,2,t,e)},useMemo:function(t,e){var n=Je();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Je();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Cf.bind(null,Y,t),[r.memoizedState,t]},useRef:function(t){var e=Je();return t={current:t},e.memoizedState=t},useState:uu,useDebugValue:eo,useDeferredValue:function(t){return Je().memoizedState=t},useTransition:function(){var t=uu(!1),e=t[0];return t=xf.bind(null,t[1]),Je().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Y,i=Je();if(Q){if(n===void 0)throw Error(x(407));n=n()}else{if(n=e(),oe===null)throw Error(x(349));Jt&30||gc(r,e,n)}i.memoizedState=n;var l={value:n,getSnapshot:e};return i.queue=l,au(vc.bind(null,r,l,t),[t]),r.flags|=2048,wr(9,mc.bind(null,r,l,n,e),void 0,null),n},useId:function(){var t=Je(),e=oe.identifierPrefix;if(Q){var n=ot,r=st;n=(r&~(1<<32-Xe(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Sr++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=If++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},Ef={readContext:De,useCallback:_c,useContext:De,useEffect:bs,useImperativeHandle:Cc,useInsertionEffect:wc,useLayoutEffect:Ic,useMemo:Tc,useReducer:fl,useRef:kc,useState:function(){return fl(kr)},useDebugValue:eo,useDeferredValue:function(t){var e=je();return Ec(e,re.memoizedState,t)},useTransition:function(){var t=fl(kr)[0],e=je().memoizedState;return[t,e]},useMutableSource:fc,useSyncExternalStore:pc,useId:Pc,unstable_isNewReconciler:!1},Pf={readContext:De,useCallback:_c,useContext:De,useEffect:bs,useImperativeHandle:Cc,useInsertionEffect:wc,useLayoutEffect:Ic,useMemo:Tc,useReducer:pl,useRef:kc,useState:function(){return pl(kr)},useDebugValue:eo,useDeferredValue:function(t){var e=je();return re===null?e.memoizedState=t:Ec(e,re.memoizedState,t)},useTransition:function(){var t=pl(kr)[0],e=je().memoizedState;return[t,e]},useMutableSource:fc,useSyncExternalStore:pc,useId:Pc,unstable_isNewReconciler:!1};function Ve(t,e){if(t&&t.defaultProps){e=J({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function bl(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:J({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Di={isMounted:function(t){return(t=t._reactInternals)?tn(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=me(),i=Ft(t),l=ut(r,i);l.payload=e,n!=null&&(l.callback=n),e=zt(t,l,i),e!==null&&(Ze(e,t,i,r),Jr(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=me(),i=Ft(t),l=ut(r,i);l.tag=1,l.payload=e,n!=null&&(l.callback=n),e=zt(t,l,i),e!==null&&(Ze(e,t,i,r),Jr(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=me(),r=Ft(t),i=ut(n,r);i.tag=2,e!=null&&(i.callback=e),e=zt(t,i,r),e!==null&&(Ze(e,t,r,n),Jr(e,t,r))}};function cu(t,e,n,r,i,l,s){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,l,s):e.prototype&&e.prototype.isPureReactComponent?!fr(n,r)||!fr(i,l):!0}function Fc(t,e,n){var r=!1,i=Rt,l=e.contextType;return typeof l=="object"&&l!==null?l=De(l):(i=xe(e)?Kt:pe.current,r=e.contextTypes,l=(r=r!=null)?En(t,i):Rt),e=new e(n,l),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Di,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=l),e}function du(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Di.enqueueReplaceState(e,e.state,null)}function es(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},Zs(t);var l=e.contextType;typeof l=="object"&&l!==null?i.context=De(l):(l=xe(e)?Kt:pe.current,i.context=En(t,l)),i.state=t.memoizedState,l=e.getDerivedStateFromProps,typeof l=="function"&&(bl(t,e,l,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Di.enqueueReplaceState(i,i.state,null),Si(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Mn(t,e){try{var n="",r=e;do n+=th(r),r=r.return;while(r);var i=n}catch(l){i=` | |
Error generating stack: `+l.message+` | |
`+l.stack}return{value:t,source:e,stack:i,digest:null}}function gl(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function ts(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var Lf=typeof WeakMap=="function"?WeakMap:Map;function Nc(t,e,n){n=ut(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ci||(Ci=!0,ds=r),ts(t,e)},n}function Ac(t,e,n){n=ut(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){ts(t,e)}}var l=t.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){ts(t,e),typeof r!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function hu(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new Lf;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=Hf.bind(null,t,e,n),e.then(t,t))}function fu(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function pu(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=ut(-1,1),e.tag=2,zt(n,e,1))),n.lanes|=1),t)}var zf=ft.ReactCurrentOwner,we=!1;function ge(t,e,n,r){e.child=t===null?ac(e,null,n,r):Ln(e,t.child,n,r)}function gu(t,e,n,r,i){n=n.render;var l=e.ref;return xn(e,i),r=Js(t,e,n,r,l,i),n=qs(),t!==null&&!we?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ht(t,e,i)):(Q&&n&&Bs(e),e.flags|=1,ge(t,e,r,i),e.child)}function mu(t,e,n,r,i){if(t===null){var l=n.type;return typeof l=="function"&&!uo(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=l,Rc(t,e,l,r,i)):(t=ri(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(l=t.child,!(t.lanes&i)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:fr,n(s,r)&&t.ref===e.ref)return ht(t,e,i)}return e.flags|=1,t=Nt(l,r),t.ref=e.ref,t.return=e,e.child=t}function Rc(t,e,n,r,i){if(t!==null){var l=t.memoizedProps;if(fr(l,r)&&t.ref===e.ref)if(we=!1,e.pendingProps=r=l,(t.lanes&i)!==0)t.flags&131072&&(we=!0);else return e.lanes=t.lanes,ht(t,e,i)}return ns(t,e,n,r,i)}function Oc(t,e,n){var r=e.pendingProps,i=r.children,l=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},H(mn,Te),Te|=n;else{if(!(n&1073741824))return t=l!==null?l.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,H(mn,Te),Te|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,H(mn,Te),Te|=r}else l!==null?(r=l.baseLanes|n,e.memoizedState=null):r=n,H(mn,Te),Te|=r;return ge(t,e,i,n),e.child}function Dc(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function ns(t,e,n,r,i){var l=xe(n)?Kt:pe.current;return l=En(e,l),xn(e,i),n=Js(t,e,n,r,l,i),r=qs(),t!==null&&!we?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ht(t,e,i)):(Q&&r&&Bs(e),e.flags|=1,ge(t,e,n,i),e.child)}function vu(t,e,n,r,i){if(xe(n)){var l=!0;pi(e)}else l=!1;if(xn(e,i),e.stateNode===null)ei(t,e),Fc(e,n,r),es(e,n,r,i),r=!0;else if(t===null){var s=e.stateNode,o=e.memoizedProps;s.props=o;var u=s.context,a=n.contextType;typeof a=="object"&&a!==null?a=De(a):(a=xe(n)?Kt:pe.current,a=En(e,a));var p=n.getDerivedStateFromProps,m=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";m||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==r||u!==a)&&du(e,s,r,a),wt=!1;var g=e.memoizedState;s.state=g,Si(e,r,s,i),u=e.memoizedState,o!==r||g!==u||Ie.current||wt?(typeof p=="function"&&(bl(e,n,p,r),u=e.memoizedState),(o=wt||cu(e,n,o,r,g,u,a))?(m||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"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=u),s.props=r,s.state=u,s.context=a,r=o):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,dc(t,e),o=e.memoizedProps,a=e.type===e.elementType?o:Ve(e.type,o),s.props=a,m=e.pendingProps,g=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=De(u):(u=xe(n)?Kt:pe.current,u=En(e,u));var k=n.getDerivedStateFromProps;(p=typeof k=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==m||g!==u)&&du(e,s,r,u),wt=!1,g=e.memoizedState,s.state=g,Si(e,r,s,i);var y=e.memoizedState;o!==m||g!==y||Ie.current||wt?(typeof k=="function"&&(bl(e,n,k,r),y=e.memoizedState),(a=wt||cu(e,n,a,r,g,y,u)||!1)?(p||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,u)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===t.memoizedProps&&g===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&g===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=y),s.props=r,s.state=y,s.context=u,r=a):(typeof s.componentDidUpdate!="function"||o===t.memoizedProps&&g===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&g===t.memoizedState||(e.flags|=1024),r=!1)}return rs(t,e,n,r,l,i)}function rs(t,e,n,r,i,l){Dc(t,e);var s=(e.flags&128)!==0;if(!r&&!s)return i&&nu(e,n,!1),ht(t,e,l);r=e.stateNode,zf.current=e;var o=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&s?(e.child=Ln(e,t.child,null,l),e.child=Ln(e,null,o,l)):ge(t,e,o,l),e.memoizedState=r.state,i&&nu(e,n,!0),e.child}function jc(t){var e=t.stateNode;e.pendingContext?tu(t,e.pendingContext,e.pendingContext!==e.context):e.context&&tu(t,e.context,!1),Qs(t,e.containerInfo)}function yu(t,e,n,r,i){return Pn(),Ws(i),e.flags|=256,ge(t,e,n,r),e.child}var is={dehydrated:null,treeContext:null,retryLane:0};function ls(t){return{baseLanes:t,cachePool:null,transitions:null}}function Bc(t,e,n){var r=e.pendingProps,i=K.current,l=!1,s=(e.flags&128)!==0,o;if((o=s)||(o=t!==null&&t.memoizedState===null?!1:(i&2)!==0),o?(l=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),H(K,i&1),t===null)return Jl(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=r.children,t=r.fallback,l?(r=e.mode,l=e.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=Ui(s,r,0,null),t=Gt(t,r,n,null),l.return=e,t.return=e,l.sibling=t,e.child=l,e.child.memoizedState=ls(n),e.memoizedState=is,t):to(e,s));if(i=t.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return Mf(t,e,s,r,o,i,n);if(l){l=r.fallback,s=e.mode,i=t.child,o=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=u,e.deletions=null):(r=Nt(i,u),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?l=Nt(o,l):(l=Gt(l,s,n,null),l.flags|=2),l.return=e,r.return=e,r.sibling=l,e.child=r,r=l,l=e.child,s=t.child.memoizedState,s=s===null?ls(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=t.childLanes&~n,e.memoizedState=is,r}return l=t.child,t=l.sibling,r=Nt(l,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function to(t,e){return e=Ui({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Vr(t,e,n,r){return r!==null&&Ws(r),Ln(e,t.child,null,n),t=to(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Mf(t,e,n,r,i,l,s){if(n)return e.flags&256?(e.flags&=-257,r=gl(Error(x(422))),Vr(t,e,s,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(l=r.fallback,i=e.mode,r=Ui({mode:"visible",children:r.children},i,0,null),l=Gt(l,i,s,null),l.flags|=2,r.return=e,l.return=e,r.sibling=l,e.child=r,e.mode&1&&Ln(e,t.child,null,s),e.child.memoizedState=ls(s),e.memoizedState=is,l);if(!(e.mode&1))return Vr(t,e,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,l=Error(x(419)),r=gl(l,r,void 0),Vr(t,e,s,r)}if(o=(s&t.childLanes)!==0,we||o){if(r=oe,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,dt(t,i),Ze(r,t,i,-1))}return oo(),r=gl(Error(x(421))),Vr(t,e,s,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=$f.bind(null,t),i._reactRetry=e,null):(t=l.treeContext,Ee=Lt(i.nextSibling),Pe=e,Q=!0,$e=null,t!==null&&(Ne[Ae++]=st,Ne[Ae++]=ot,Ne[Ae++]=Yt,st=t.id,ot=t.overflow,Yt=e),e=to(e,r.children),e.flags|=4096,e)}function Su(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),ql(t.return,e,n)}function ml(t,e,n,r,i){var l=t.memoizedState;l===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=e,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function Uc(t,e,n){var r=e.pendingProps,i=r.revealOrder,l=r.tail;if(ge(t,e,r.children,n),r=K.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Su(t,n,e);else if(t.tag===19)Su(t,n,e);else if(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;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(H(K,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&ki(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),ml(e,!1,i,n,l);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&ki(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}ml(e,!0,n,null,l);break;case"together":ml(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ei(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ht(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),qt|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(x(153));if(e.child!==null){for(t=e.child,n=Nt(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Nt(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Ff(t,e,n){switch(e.tag){case 3:jc(e),Pn();break;case 5:hc(e);break;case 1:xe(e.type)&&pi(e);break;case 4:Qs(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;H(vi,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(H(K,K.current&1),e.flags|=128,null):n&e.child.childLanes?Bc(t,e,n):(H(K,K.current&1),t=ht(t,e,n),t!==null?t.sibling:null);H(K,K.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return Uc(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),H(K,K.current),r)break;return null;case 22:case 23:return e.lanes=0,Oc(t,e,n)}return ht(t,e,n)}var Wc,ss,Vc,Hc;Wc=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ss=function(){};Vc=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Zt(et.current);var l=null;switch(n){case"input":i=Pl(t,i),r=Pl(t,r),l=[];break;case"select":i=J({},i,{value:void 0}),r=J({},r,{value:void 0}),l=[];break;case"textarea":i=Ml(t,i),r=Ml(t,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=hi)}Nl(n,r);var s;n=null;for(a in i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&i[a]!=null)if(a==="style"){var o=i[a];for(s in o)o.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(sr.hasOwnProperty(a)?l||(l=[]):(l=l||[]).push(a,null));for(a in r){var u=r[a];if(o=i!=null?i[a]:void 0,r.hasOwnProperty(a)&&u!==o&&(u!=null||o!=null))if(a==="style")if(o){for(s in o)!o.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&o[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(l||(l=[]),l.push(a,n)),n=u;else a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(a,u)):a==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(a,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(sr.hasOwnProperty(a)?(u!=null&&a==="onScroll"&&$("scroll",t),l||o===u||(l=[])):(l=l||[]).push(a,u))}n&&(l=l||[]).push("style",n);var a=l;(e.updateQueue=a)&&(e.flags|=4)}};Hc=function(t,e,n,r){n!==r&&(e.flags|=4)};function $n(t,e){if(!Q)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function he(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function Nf(t,e,n){var r=e.pendingProps;switch(Us(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return he(e),null;case 1:return xe(e.type)&&fi(),he(e),null;case 3:return r=e.stateNode,zn(),X(Ie),X(pe),Ks(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Ur(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,$e!==null&&(ps($e),$e=null))),ss(t,e),he(e),null;case 5:Gs(e);var i=Zt(yr.current);if(n=e.type,t!==null&&e.stateNode!=null)Vc(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(x(166));return he(e),null}if(t=Zt(et.current),Ur(e)){r=e.stateNode,n=e.type;var l=e.memoizedProps;switch(r[qe]=e,r[mr]=l,t=(e.mode&1)!==0,n){case"dialog":$("cancel",r),$("close",r);break;case"iframe":case"object":case"embed":$("load",r);break;case"video":case"audio":for(i=0;i<Yn.length;i++)$(Yn[i],r);break;case"source":$("error",r);break;case"img":case"image":case"link":$("error",r),$("load",r);break;case"details":$("toggle",r);break;case"input":Po(r,l),$("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},$("invalid",r);break;case"textarea":zo(r,l),$("invalid",r)}Nl(n,l),i=null;for(var s in l)if(l.hasOwnProperty(s)){var o=l[s];s==="children"?typeof o=="string"?r.textContent!==o&&(l.suppressHydrationWarning!==!0&&Br(r.textContent,o,t),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&Br(r.textContent,o,t),i=["children",""+o]):sr.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&$("scroll",r)}switch(n){case"input":Mr(r),Lo(r,l,!0);break;case"textarea":Mr(r),Mo(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=hi)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=va(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=s.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[qe]=e,t[mr]=r,Wc(t,e,!1,!1),e.stateNode=t;e:{switch(s=Al(n,r),n){case"dialog":$("cancel",t),$("close",t),i=r;break;case"iframe":case"object":case"embed":$("load",t),i=r;break;case"video":case"audio":for(i=0;i<Yn.length;i++)$(Yn[i],t);i=r;break;case"source":$("error",t),i=r;break;case"img":case"image":case"link":$("error",t),$("load",t),i=r;break;case"details":$("toggle",t),i=r;break;case"input":Po(t,r),i=Pl(t,r),$("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=J({},r,{value:void 0}),$("invalid",t);break;case"textarea":zo(t,r),i=Ml(t,r),$("invalid",t);break;default:i=r}Nl(n,i),o=i;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?ka(t,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&ya(t,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&or(t,u):typeof u=="number"&&or(t,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(sr.hasOwnProperty(l)?u!=null&&l==="onScroll"&&$("scroll",t):u!=null&&_s(t,l,u,s))}switch(n){case"input":Mr(t),Lo(t,r,!1);break;case"textarea":Mr(t),Mo(t);break;case"option":r.value!=null&&t.setAttribute("value",""+At(r.value));break;case"select":t.multiple=!!r.multiple,l=r.value,l!=null?Sn(t,!!r.multiple,l,!1):r.defaultValue!=null&&Sn(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=hi)}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&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return he(e),null;case 6:if(t&&e.stateNode!=null)Hc(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(x(166));if(n=Zt(yr.current),Zt(et.current),Ur(e)){if(r=e.stateNode,n=e.memoizedProps,r[qe]=e,(l=r.nodeValue!==n)&&(t=Pe,t!==null))switch(t.tag){case 3:Br(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Br(r.nodeValue,n,(t.mode&1)!==0)}l&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[qe]=e,e.stateNode=r}return he(e),null;case 13:if(X(K),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Q&&Ee!==null&&e.mode&1&&!(e.flags&128))oc(),Pn(),e.flags|=98560,l=!1;else if(l=Ur(e),r!==null&&r.dehydrated!==null){if(t===null){if(!l)throw Error(x(318));if(l=e.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(x(317));l[qe]=e}else Pn(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;he(e),l=!1}else $e!==null&&(ps($e),$e=null),l=!0;if(!l)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||K.current&1?ie===0&&(ie=3):oo())),e.updateQueue!==null&&(e.flags|=4),he(e),null);case 4:return zn(),ss(t,e),t===null&&pr(e.stateNode.containerInfo),he(e),null;case 10:return $s(e.type._context),he(e),null;case 17:return xe(e.type)&&fi(),he(e),null;case 19:if(X(K),l=e.memoizedState,l===null)return he(e),null;if(r=(e.flags&128)!==0,s=l.rendering,s===null)if(r)$n(l,!1);else{if(ie!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(s=ki(t),s!==null){for(e.flags|=128,$n(l,!1),r=s.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)l=n,t=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=t,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,t=s.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return H(K,K.current&1|2),e.child}t=t.sibling}l.tail!==null&&b()>Fn&&(e.flags|=128,r=!0,$n(l,!1),e.lanes=4194304)}else{if(!r)if(t=ki(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),$n(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!Q)return he(e),null}else 2*b()-l.renderingStartTime>Fn&&n!==1073741824&&(e.flags|=128,r=!0,$n(l,!1),e.lanes=4194304);l.isBackwards?(s.sibling=e.child,e.child=s):(n=l.last,n!==null?n.sibling=s:e.child=s,l.last=s)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=b(),e.sibling=null,n=K.current,H(K,r?n&1|2:n&1),e):(he(e),null);case 22:case 23:return so(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Te&1073741824&&(he(e),e.subtreeFlags&6&&(e.flags|=8192)):he(e),null;case 24:return null;case 25:return null}throw Error(x(156,e.tag))}function Af(t,e){switch(Us(e),e.tag){case 1:return xe(e.type)&&fi(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return zn(),X(Ie),X(pe),Ks(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Gs(e),null;case 13:if(X(K),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(x(340));Pn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return X(K),null;case 4:return zn(),null;case 10:return $s(e.type._context),null;case 22:case 23:return so(),null;case 24:return null;default:return null}}var Hr=!1,fe=!1,Rf=typeof WeakSet=="function"?WeakSet:Set,z=null;function gn(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){q(t,e,r)}else n.current=null}function os(t,e,n){try{n()}catch(r){q(t,e,r)}}var ku=!1;function Of(t,e){if($l=ai,t=Ga(),js(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,o=-1,u=-1,a=0,p=0,m=t,g=null;t:for(;;){for(var k;m!==n||i!==0&&m.nodeType!==3||(o=s+i),m!==l||r!==0&&m.nodeType!==3||(u=s+r),m.nodeType===3&&(s+=m.nodeValue.length),(k=m.firstChild)!==null;)g=m,m=k;for(;;){if(m===t)break t;if(g===n&&++a===i&&(o=s),g===l&&++p===r&&(u=s),(k=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=k}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xl={focusedElem:t,selectionRange:n},ai=!1,z=e;z!==null;)if(e=z,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,z=t;else for(;z!==null;){e=z;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var f=y.memoizedProps,S=y.memoizedState,d=e.stateNode,c=d.getSnapshotBeforeUpdate(e.elementType===e.type?f:Ve(e.type,f),S);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var h=e.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(v){q(e,e.return,v)}if(t=e.sibling,t!==null){t.return=e.return,z=t;break}z=e.return}return y=ku,ku=!1,y}function rr(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var l=i.destroy;i.destroy=void 0,l!==void 0&&os(e,n,l)}i=i.next}while(i!==r)}}function ji(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function us(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function $c(t){var e=t.alternate;e!==null&&(t.alternate=null,$c(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[qe],delete e[mr],delete e[Gl],delete e[yf],delete e[Sf])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Xc(t){return t.tag===5||t.tag===3||t.tag===4}function wu(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Xc(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function as(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=hi));else if(r!==4&&(t=t.child,t!==null))for(as(t,e,n),t=t.sibling;t!==null;)as(t,e,n),t=t.sibling}function cs(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(cs(t,e,n),t=t.sibling;t!==null;)cs(t,e,n),t=t.sibling}var ue=null,He=!1;function yt(t,e,n){for(n=n.child;n!==null;)Zc(t,e,n),n=n.sibling}function Zc(t,e,n){if(be&&typeof be.onCommitFiberUnmount=="function")try{be.onCommitFiberUnmount(zi,n)}catch{}switch(n.tag){case 5:fe||gn(n,e);case 6:var r=ue,i=He;ue=null,yt(t,e,n),ue=r,He=i,ue!==null&&(He?(t=ue,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):ue.removeChild(n.stateNode));break;case 18:ue!==null&&(He?(t=ue,n=n.stateNode,t.nodeType===8?al(t.parentNode,n):t.nodeType===1&&al(t,n),dr(t)):al(ue,n.stateNode));break;case 4:r=ue,i=He,ue=n.stateNode.containerInfo,He=!0,yt(t,e,n),ue=r,He=i;break;case 0:case 11:case 14:case 15:if(!fe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&os(n,e,s),i=i.next}while(i!==r)}yt(t,e,n);break;case 1:if(!fe&&(gn(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){q(n,e,o)}yt(t,e,n);break;case 21:yt(t,e,n);break;case 22:n.mode&1?(fe=(r=fe)||n.memoizedState!==null,yt(t,e,n),fe=r):yt(t,e,n);break;default:yt(t,e,n)}}function Iu(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Rf),e.forEach(function(r){var i=Xf.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ue(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=t,s=e,o=s;e:for(;o!==null;){switch(o.tag){case 5:ue=o.stateNode,He=!1;break e;case 3:ue=o.stateNode.containerInfo,He=!0;break e;case 4:ue=o.stateNode.containerInfo,He=!0;break e}o=o.return}if(ue===null)throw Error(x(160));Zc(l,s,i),ue=null,He=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(a){q(i,e,a)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Qc(e,t),e=e.sibling}function Qc(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ue(e,t),Ye(t),r&4){try{rr(3,t,t.return),ji(3,t)}catch(f){q(t,t.return,f)}try{rr(5,t,t.return)}catch(f){q(t,t.return,f)}}break;case 1:Ue(e,t),Ye(t),r&512&&n!==null&&gn(n,n.return);break;case 5:if(Ue(e,t),Ye(t),r&512&&n!==null&&gn(n,n.return),t.flags&32){var i=t.stateNode;try{or(i,"")}catch(f){q(t,t.return,f)}}if(r&4&&(i=t.stateNode,i!=null)){var l=t.memoizedProps,s=n!==null?n.memoizedProps:l,o=t.type,u=t.updateQueue;if(t.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&ga(i,l),Al(o,s);var a=Al(o,l);for(s=0;s<u.length;s+=2){var p=u[s],m=u[s+1];p==="style"?ka(i,m):p==="dangerouslySetInnerHTML"?ya(i,m):p==="children"?or(i,m):_s(i,p,m,a)}switch(o){case"input":Ll(i,l);break;case"textarea":ma(i,l);break;case"select":var g=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var k=l.value;k!=null?Sn(i,!!l.multiple,k,!1):g!==!!l.multiple&&(l.defaultValue!=null?Sn(i,!!l.multiple,l.defaultValue,!0):Sn(i,!!l.multiple,l.multiple?[]:"",!1))}i[mr]=l}catch(f){q(t,t.return,f)}}break;case 6:if(Ue(e,t),Ye(t),r&4){if(t.stateNode===null)throw Error(x(162));i=t.stateNode,l=t.memoizedProps;try{i.nodeValue=l}catch(f){q(t,t.return,f)}}break;case 3:if(Ue(e,t),Ye(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{dr(e.containerInfo)}catch(f){q(t,t.return,f)}break;case 4:Ue(e,t),Ye(t);break;case 13:Ue(e,t),Ye(t),i=t.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(io=b())),r&4&&Iu(t);break;case 22:if(p=n!==null&&n.memoizedState!==null,t.mode&1?(fe=(a=fe)||p,Ue(e,t),fe=a):Ue(e,t),Ye(t),r&8192){if(a=t.memoizedState!==null,(t.stateNode.isHidden=a)&&!p&&t.mode&1)for(z=t,p=t.child;p!==null;){for(m=z=p;z!==null;){switch(g=z,k=g.child,g.tag){case 0:case 11:case 14:case 15:rr(4,g,g.return);break;case 1:gn(g,g.return);var y=g.stateNode;if(typeof y.componentWillUnmount=="function"){r=g,n=g.return;try{e=r,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(f){q(r,n,f)}}break;case 5:gn(g,g.return);break;case 22:if(g.memoizedState!==null){Cu(m);continue}}k!==null?(k.return=g,z=k):Cu(m)}p=p.sibling}e:for(p=null,m=t;;){if(m.tag===5){if(p===null){p=m;try{i=m.stateNode,a?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=m.stateNode,u=m.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=Sa("display",s))}catch(f){q(t,t.return,f)}}}else if(m.tag===6){if(p===null)try{m.stateNode.nodeValue=a?"":m.memoizedProps}catch(f){q(t,t.return,f)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===t)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;p===m&&(p=null),m=m.return}p===m&&(p=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Ue(e,t),Ye(t),r&4&&Iu(t);break;case 21:break;default:Ue(e,t),Ye(t)}}function Ye(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(Xc(n)){var r=n;break e}n=n.return}throw Error(x(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(or(i,""),r.flags&=-33);var l=wu(t);cs(t,l,i);break;case 3:case 4:var s=r.stateNode.containerInfo,o=wu(t);as(t,o,s);break;default:throw Error(x(161))}}catch(u){q(t,t.return,u)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Df(t,e,n){z=t,Gc(t)}function Gc(t,e,n){for(var r=(t.mode&1)!==0;z!==null;){var i=z,l=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Hr;if(!s){var o=i.alternate,u=o!==null&&o.memoizedState!==null||fe;o=Hr;var a=fe;if(Hr=s,(fe=u)&&!a)for(z=i;z!==null;)s=z,u=s.child,s.tag===22&&s.memoizedState!==null?_u(i):u!==null?(u.return=s,z=u):_u(i);for(;l!==null;)z=l,Gc(l),l=l.sibling;z=i,Hr=o,fe=a}xu(t)}else i.subtreeFlags&8772&&l!==null?(l.return=i,z=l):xu(t)}}function xu(t){for(;z!==null;){var e=z;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:fe||ji(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!fe)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Ve(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=e.updateQueue;l!==null&&ou(e,l,r);break;case 3:var s=e.updateQueue;if(s!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}ou(e,s,n)}break;case 5:var o=e.stateNode;if(n===null&&e.flags&4){n=o;var u=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var a=e.alternate;if(a!==null){var p=a.memoizedState;if(p!==null){var m=p.dehydrated;m!==null&&dr(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(x(163))}fe||e.flags&512&&us(e)}catch(g){q(e,e.return,g)}}if(e===t){z=null;break}if(n=e.sibling,n!==null){n.return=e.return,z=n;break}z=e.return}}function Cu(t){for(;z!==null;){var e=z;if(e===t){z=null;break}var n=e.sibling;if(n!==null){n.return=e.return,z=n;break}z=e.return}}function _u(t){for(;z!==null;){var e=z;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{ji(4,e)}catch(u){q(e,n,u)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(u){q(e,i,u)}}var l=e.return;try{us(e)}catch(u){q(e,l,u)}break;case 5:var s=e.return;try{us(e)}catch(u){q(e,s,u)}}}catch(u){q(e,e.return,u)}if(e===t){z=null;break}var o=e.sibling;if(o!==null){o.return=e.return,z=o;break}z=e.return}}var jf=Math.ceil,xi=ft.ReactCurrentDispatcher,no=ft.ReactCurrentOwner,Oe=ft.ReactCurrentBatchConfig,D=0,oe=null,ee=null,ae=0,Te=0,mn=Dt(0),ie=0,Ir=null,qt=0,Bi=0,ro=0,ir=null,ke=null,io=0,Fn=1/0,it=null,Ci=!1,ds=null,Mt=null,$r=!1,_t=null,_i=0,lr=0,hs=null,ti=-1,ni=0;function me(){return D&6?b():ti!==-1?ti:ti=b()}function Ft(t){return t.mode&1?D&2&&ae!==0?ae&-ae:wf.transition!==null?(ni===0&&(ni=Fa()),ni):(t=B,t!==0||(t=window.event,t=t===void 0?16:Ba(t.type)),t):1}function Ze(t,e,n,r){if(50<lr)throw lr=0,hs=null,Error(x(185));Cr(t,n,r),(!(D&2)||t!==oe)&&(t===oe&&(!(D&2)&&(Bi|=n),ie===4&&xt(t,ae)),Ce(t,r),n===1&&D===0&&!(e.mode&1)&&(Fn=b()+500,Ri&&jt()))}function Ce(t,e){var n=t.callbackNode;kh(t,e);var r=ui(t,t===oe?ae:0);if(r===0)n!==null&&Ao(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Ao(n),e===1)t.tag===0?kf(Tu.bind(null,t)):ic(Tu.bind(null,t)),mf(function(){!(D&6)&&jt()}),n=null;else{switch(Na(r)){case 1:n=zs;break;case 4:n=za;break;case 16:n=oi;break;case 536870912:n=Ma;break;default:n=oi}n=nd(n,Kc.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Kc(t,e){if(ti=-1,ni=0,D&6)throw Error(x(327));var n=t.callbackNode;if(Cn()&&t.callbackNode!==n)return null;var r=ui(t,t===oe?ae:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Ti(t,r);else{e=r;var i=D;D|=2;var l=Jc();(oe!==t||ae!==e)&&(it=null,Fn=b()+500,Qt(t,e));do try{Wf();break}catch(o){Yc(t,o)}while(!0);Hs(),xi.current=l,D=i,ee!==null?e=0:(oe=null,ae=0,e=ie)}if(e!==0){if(e===2&&(i=Bl(t),i!==0&&(r=i,e=fs(t,i))),e===1)throw n=Ir,Qt(t,0),xt(t,r),Ce(t,b()),n;if(e===6)xt(t,r);else{if(i=t.current.alternate,!(r&30)&&!Bf(i)&&(e=Ti(t,r),e===2&&(l=Bl(t),l!==0&&(r=l,e=fs(t,l))),e===1))throw n=Ir,Qt(t,0),xt(t,r),Ce(t,b()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(x(345));case 2:Vt(t,ke,it);break;case 3:if(xt(t,r),(r&130023424)===r&&(e=io+500-b(),10<e)){if(ui(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){me(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Ql(Vt.bind(null,t,ke,it),e);break}Vt(t,ke,it);break;case 4:if(xt(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var s=31-Xe(r);l=1<<s,s=e[s],s>i&&(i=s),r&=~l}if(r=i,r=b()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jf(r/1960))-r,10<r){t.timeoutHandle=Ql(Vt.bind(null,t,ke,it),r);break}Vt(t,ke,it);break;case 5:Vt(t,ke,it);break;default:throw Error(x(329))}}}return Ce(t,b()),t.callbackNode===n?Kc.bind(null,t):null}function fs(t,e){var n=ir;return t.current.memoizedState.isDehydrated&&(Qt(t,e).flags|=256),t=Ti(t,e),t!==2&&(e=ke,ke=n,e!==null&&ps(e)),t}function ps(t){ke===null?ke=t:ke.push.apply(ke,t)}function Bf(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],l=i.getSnapshot;i=i.value;try{if(!Qe(l(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function xt(t,e){for(e&=~ro,e&=~Bi,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Xe(e),r=1<<n;t[n]=-1,e&=~r}}function Tu(t){if(D&6)throw Error(x(327));Cn();var e=ui(t,0);if(!(e&1))return Ce(t,b()),null;var n=Ti(t,e);if(t.tag!==0&&n===2){var r=Bl(t);r!==0&&(e=r,n=fs(t,r))}if(n===1)throw n=Ir,Qt(t,0),xt(t,e),Ce(t,b()),n;if(n===6)throw Error(x(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Vt(t,ke,it),Ce(t,b()),null}function lo(t,e){var n=D;D|=1;try{return t(e)}finally{D=n,D===0&&(Fn=b()+500,Ri&&jt())}}function bt(t){_t!==null&&_t.tag===0&&!(D&6)&&Cn();var e=D;D|=1;var n=Oe.transition,r=B;try{if(Oe.transition=null,B=1,t)return t()}finally{B=r,Oe.transition=n,D=e,!(D&6)&&jt()}}function so(){Te=mn.current,X(mn)}function Qt(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,gf(n)),ee!==null)for(n=ee.return;n!==null;){var r=n;switch(Us(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&fi();break;case 3:zn(),X(Ie),X(pe),Ks();break;case 5:Gs(r);break;case 4:zn();break;case 13:X(K);break;case 19:X(K);break;case 10:$s(r.type._context);break;case 22:case 23:so()}n=n.return}if(oe=t,ee=t=Nt(t.current,null),ae=Te=e,ie=0,Ir=null,ro=Bi=qt=0,ke=ir=null,Xt!==null){for(e=0;e<Xt.length;e++)if(n=Xt[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=i,r.next=s}n.pending=r}Xt=null}return t}function Yc(t,e){do{var n=ee;try{if(Hs(),qr.current=Ii,wi){for(var r=Y.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}wi=!1}if(Jt=0,se=re=Y=null,nr=!1,Sr=0,no.current=null,n===null||n.return===null){ie=1,Ir=e,ee=null;break}e:{var l=t,s=n.return,o=n,u=e;if(e=ae,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var a=u,p=o,m=p.tag;if(!(p.mode&1)&&(m===0||m===11||m===15)){var g=p.alternate;g?(p.updateQueue=g.updateQueue,p.memoizedState=g.memoizedState,p.lanes=g.lanes):(p.updateQueue=null,p.memoizedState=null)}var k=fu(s);if(k!==null){k.flags&=-257,pu(k,s,o,l,e),k.mode&1&&hu(l,a,e),e=k,u=a;var y=e.updateQueue;if(y===null){var f=new Set;f.add(u),e.updateQueue=f}else y.add(u);break e}else{if(!(e&1)){hu(l,a,e),oo();break e}u=Error(x(426))}}else if(Q&&o.mode&1){var S=fu(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),pu(S,s,o,l,e),Ws(Mn(u,o));break e}}l=u=Mn(u,o),ie!==4&&(ie=2),ir===null?ir=[l]:ir.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,e&=-e,l.lanes|=e;var d=Nc(l,u,e);su(l,d);break e;case 1:o=u;var c=l.type,h=l.stateNode;if(!(l.flags&128)&&(typeof c.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Mt===null||!Mt.has(h)))){l.flags|=65536,e&=-e,l.lanes|=e;var v=Ac(l,o,e);su(l,v);break e}}l=l.return}while(l!==null)}bc(n)}catch(w){e=w,ee===n&&n!==null&&(ee=n=n.return);continue}break}while(!0)}function Jc(){var t=xi.current;return xi.current=Ii,t===null?Ii:t}function oo(){(ie===0||ie===3||ie===2)&&(ie=4),oe===null||!(qt&268435455)&&!(Bi&268435455)||xt(oe,ae)}function Ti(t,e){var n=D;D|=2;var r=Jc();(oe!==t||ae!==e)&&(it=null,Qt(t,e));do try{Uf();break}catch(i){Yc(t,i)}while(!0);if(Hs(),D=n,xi.current=r,ee!==null)throw Error(x(261));return oe=null,ae=0,ie}function Uf(){for(;ee!==null;)qc(ee)}function Wf(){for(;ee!==null&&!dh();)qc(ee)}function qc(t){var e=td(t.alternate,t,Te);t.memoizedProps=t.pendingProps,e===null?bc(t):ee=e,no.current=null}function bc(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=Af(n,e),n!==null){n.flags&=32767,ee=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{ie=6,ee=null;return}}else if(n=Nf(n,e,Te),n!==null){ee=n;return}if(e=e.sibling,e!==null){ee=e;return}ee=e=t}while(e!==null);ie===0&&(ie=5)}function Vt(t,e,n){var r=B,i=Oe.transition;try{Oe.transition=null,B=1,Vf(t,e,n,r)}finally{Oe.transition=i,B=r}return null}function Vf(t,e,n,r){do Cn();while(_t!==null);if(D&6)throw Error(x(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(x(177));t.callbackNode=null,t.callbackPriority=0;var l=n.lanes|n.childLanes;if(wh(t,l),t===oe&&(ee=oe=null,ae=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||$r||($r=!0,nd(oi,function(){return Cn(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=Oe.transition,Oe.transition=null;var s=B;B=1;var o=D;D|=4,no.current=null,Of(t,n),Qc(n,t),uf(Xl),ai=!!$l,Xl=$l=null,t.current=n,Df(n),hh(),D=o,B=s,Oe.transition=l}else t.current=n;if($r&&($r=!1,_t=t,_i=i),l=t.pendingLanes,l===0&&(Mt=null),gh(n.stateNode),Ce(t,b()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ci)throw Ci=!1,t=ds,ds=null,t;return _i&1&&t.tag!==0&&Cn(),l=t.pendingLanes,l&1?t===hs?lr++:(lr=0,hs=t):lr=0,jt(),null}function Cn(){if(_t!==null){var t=Na(_i),e=Oe.transition,n=B;try{if(Oe.transition=null,B=16>t?16:t,_t===null)var r=!1;else{if(t=_t,_t=null,_i=0,D&6)throw Error(x(331));var i=D;for(D|=4,z=t.current;z!==null;){var l=z,s=l.child;if(z.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var a=o[u];for(z=a;z!==null;){var p=z;switch(p.tag){case 0:case 11:case 15:rr(8,p,l)}var m=p.child;if(m!==null)m.return=p,z=m;else for(;z!==null;){p=z;var g=p.sibling,k=p.return;if($c(p),p===a){z=null;break}if(g!==null){g.return=k,z=g;break}z=k}}}var y=l.alternate;if(y!==null){var f=y.child;if(f!==null){y.child=null;do{var S=f.sibling;f.sibling=null,f=S}while(f!==null)}}z=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,z=s;else e:for(;z!==null;){if(l=z,l.flags&2048)switch(l.tag){case 0:case 11:case 15:rr(9,l,l.return)}var d=l.sibling;if(d!==null){d.return=l.return,z=d;break e}z=l.return}}var c=t.current;for(z=c;z!==null;){s=z;var h=s.child;if(s.subtreeFlags&2064&&h!==null)h.return=s,z=h;else e:for(s=c;z!==null;){if(o=z,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:ji(9,o)}}catch(w){q(o,o.return,w)}if(o===s){z=null;break e}var v=o.sibling;if(v!==null){v.return=o.return,z=v;break e}z=o.return}}if(D=i,jt(),be&&typeof be.onPostCommitFiberRoot=="function")try{be.onPostCommitFiberRoot(zi,t)}catch{}r=!0}return r}finally{B=n,Oe.transition=e}}return!1}function Eu(t,e,n){e=Mn(n,e),e=Nc(t,e,1),t=zt(t,e,1),e=me(),t!==null&&(Cr(t,1,e),Ce(t,e))}function q(t,e,n){if(t.tag===3)Eu(t,t,n);else for(;e!==null;){if(e.tag===3){Eu(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Mt===null||!Mt.has(r))){t=Mn(n,t),t=Ac(e,t,1),e=zt(e,t,1),t=me(),e!==null&&(Cr(e,1,t),Ce(e,t));break}}e=e.return}}function Hf(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=me(),t.pingedLanes|=t.suspendedLanes&n,oe===t&&(ae&n)===n&&(ie===4||ie===3&&(ae&130023424)===ae&&500>b()-io?Qt(t,0):ro|=n),Ce(t,e)}function ed(t,e){e===0&&(t.mode&1?(e=Ar,Ar<<=1,!(Ar&130023424)&&(Ar=4194304)):e=1);var n=me();t=dt(t,e),t!==null&&(Cr(t,e,n),Ce(t,n))}function $f(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),ed(t,n)}function Xf(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(x(314))}r!==null&&r.delete(e),ed(t,n)}var td;td=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ie.current)we=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return we=!1,Ff(t,e,n);we=!!(t.flags&131072)}else we=!1,Q&&e.flags&1048576&&lc(e,mi,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ei(t,e),t=e.pendingProps;var i=En(e,pe.current);xn(e,n),i=Js(null,e,r,t,i,n);var l=qs();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,xe(r)?(l=!0,pi(e)):l=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zs(e),i.updater=Di,e.stateNode=i,i._reactInternals=e,es(e,r,t,n),e=rs(null,e,r,!0,l,n)):(e.tag=0,Q&&l&&Bs(e),ge(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(ei(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=Qf(r),t=Ve(r,t),i){case 0:e=ns(null,e,r,t,n);break e;case 1:e=vu(null,e,r,t,n);break e;case 11:e=gu(null,e,r,t,n);break e;case 14:e=mu(null,e,r,Ve(r.type,t),n);break e}throw Error(x(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ve(r,i),ns(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ve(r,i),vu(t,e,r,i,n);case 3:e:{if(jc(e),t===null)throw Error(x(387));r=e.pendingProps,l=e.memoizedState,i=l.element,dc(t,e),Si(e,r,null,n);var s=e.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=l,e.memoizedState=l,e.flags&256){i=Mn(Error(x(423)),e),e=yu(t,e,r,n,i);break e}else if(r!==i){i=Mn(Error(x(424)),e),e=yu(t,e,r,n,i);break e}else for(Ee=Lt(e.stateNode.containerInfo.firstChild),Pe=e,Q=!0,$e=null,n=ac(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Pn(),r===i){e=ht(t,e,n);break e}ge(t,e,r,n)}e=e.child}return e;case 5:return hc(e),t===null&&Jl(e),r=e.type,i=e.pendingProps,l=t!==null?t.memoizedProps:null,s=i.children,Zl(r,i)?s=null:l!==null&&Zl(r,l)&&(e.flags|=32),Dc(t,e),ge(t,e,s,n),e.child;case 6:return t===null&&Jl(e),null;case 13:return Bc(t,e,n);case 4:return Qs(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Ln(e,null,r,n):ge(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ve(r,i),gu(t,e,r,i,n);case 7:return ge(t,e,e.pendingProps,n),e.child;case 8:return ge(t,e,e.pendingProps.children,n),e.child;case 12:return ge(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,l=e.memoizedProps,s=i.value,H(vi,r._currentValue),r._currentValue=s,l!==null)if(Qe(l.value,s)){if(l.children===i.children&&!Ie.current){e=ht(t,e,n);break e}}else for(l=e.child,l!==null&&(l.return=e);l!==null;){var o=l.dependencies;if(o!==null){s=l.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=ut(-1,n&-n),u.tag=2;var a=l.updateQueue;if(a!==null){a=a.shared;var p=a.pending;p===null?u.next=u:(u.next=p.next,p.next=u),a.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),ql(l.return,n,e),o.lanes|=n;break}u=u.next}}else if(l.tag===10)s=l.type===e.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(x(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ql(s,n,e),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===e){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}ge(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,xn(e,n),i=De(i),r=r(i),e.flags|=1,ge(t,e,r,n),e.child;case 14:return r=e.type,i=Ve(r,e.pendingProps),i=Ve(r.type,i),mu(t,e,r,i,n);case 15:return Rc(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ve(r,i),ei(t,e),e.tag=1,xe(r)?(t=!0,pi(e)):t=!1,xn(e,n),Fc(e,r,i),es(e,r,i,n),rs(null,e,r,!0,t,n);case 19:return Uc(t,e,n);case 22:return Oc(t,e,n)}throw Error(x(156,e.tag))};function nd(t,e){return La(t,e)}function Zf(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 Re(t,e,n,r){return new Zf(t,e,n,r)}function uo(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Qf(t){if(typeof t=="function")return uo(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Es)return 11;if(t===Ps)return 14}return 2}function Nt(t,e){var n=t.alternate;return n===null?(n=Re(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function ri(t,e,n,r,i,l){var s=2;if(r=t,typeof t=="function")uo(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case sn:return Gt(n.children,i,l,e);case Ts:s=8,i|=8;break;case Cl:return t=Re(12,n,e,i|2),t.elementType=Cl,t.lanes=l,t;case _l:return t=Re(13,n,e,i),t.elementType=_l,t.lanes=l,t;case Tl:return t=Re(19,n,e,i),t.elementType=Tl,t.lanes=l,t;case ha:return Ui(n,i,l,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case ca:s=10;break e;case da:s=9;break e;case Es:s=11;break e;case Ps:s=14;break e;case kt:s=16,r=null;break e}throw Error(x(130,t==null?t:typeof t,""))}return e=Re(s,n,e,i),e.elementType=t,e.type=r,e.lanes=l,e}function Gt(t,e,n,r){return t=Re(7,t,r,e),t.lanes=n,t}function Ui(t,e,n,r){return t=Re(22,t,r,e),t.elementType=ha,t.lanes=n,t.stateNode={isHidden:!1},t}function vl(t,e,n){return t=Re(6,t,null,e),t.lanes=n,t}function yl(t,e,n){return e=Re(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Gf(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qi(0),this.expirationTimes=qi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qi(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ao(t,e,n,r,i,l,s,o,u){return t=new Gf(t,e,n,o,u),e===1?(e=1,l===!0&&(e|=8)):e=0,l=Re(3,null,null,e),t.current=l,l.stateNode=t,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zs(l),t}function Kf(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ln,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function rd(t){if(!t)return Rt;t=t._reactInternals;e:{if(tn(t)!==t||t.tag!==1)throw Error(x(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(xe(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(x(171))}if(t.tag===1){var n=t.type;if(xe(n))return rc(t,n,e)}return e}function id(t,e,n,r,i,l,s,o,u){return t=ao(n,r,!0,t,i,l,s,o,u),t.context=rd(null),n=t.current,r=me(),i=Ft(n),l=ut(r,i),l.callback=e??null,zt(n,l,i),t.current.lanes=i,Cr(t,i,r),Ce(t,r),t}function Wi(t,e,n,r){var i=e.current,l=me(),s=Ft(i);return n=rd(n),e.context===null?e.context=n:e.pendingContext=n,e=ut(l,s),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=zt(i,e,s),t!==null&&(Ze(t,i,s,l),Jr(t,i,s)),s}function Ei(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Pu(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function co(t,e){Pu(t,e),(t=t.alternate)&&Pu(t,e)}function Yf(){return null}var ld=typeof reportError=="function"?reportError:function(t){console.error(t)};function ho(t){this._internalRoot=t}Vi.prototype.render=ho.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(x(409));Wi(t,e,null,null)};Vi.prototype.unmount=ho.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;bt(function(){Wi(null,t,null,null)}),e[ct]=null}};function Vi(t){this._internalRoot=t}Vi.prototype.unstable_scheduleHydration=function(t){if(t){var e=Oa();t={blockedOn:null,target:t,priority:e};for(var n=0;n<It.length&&e!==0&&e<It[n].priority;n++);It.splice(n,0,t),n===0&&ja(t)}};function fo(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Hi(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Lu(){}function Jf(t,e,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var a=Ei(s);l.call(a)}}var s=id(e,r,t,0,null,!1,!1,"",Lu);return t._reactRootContainer=s,t[ct]=s.current,pr(t.nodeType===8?t.parentNode:t),bt(),s}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var a=Ei(u);o.call(a)}}var u=ao(t,0,!1,null,null,!1,!1,"",Lu);return t._reactRootContainer=u,t[ct]=u.current,pr(t.nodeType===8?t.parentNode:t),bt(function(){Wi(e,u,n,r)}),u}function $i(t,e,n,r,i){var l=n._reactRootContainer;if(l){var s=l;if(typeof i=="function"){var o=i;i=function(){var u=Ei(s);o.call(u)}}Wi(e,s,t,i)}else s=Jf(n,e,t,i,r);return Ei(s)}Aa=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Kn(e.pendingLanes);n!==0&&(Ms(e,n|1),Ce(e,b()),!(D&6)&&(Fn=b()+500,jt()))}break;case 13:bt(function(){var r=dt(t,1);if(r!==null){var i=me();Ze(r,t,1,i)}}),co(t,1)}};Fs=function(t){if(t.tag===13){var e=dt(t,134217728);if(e!==null){var n=me();Ze(e,t,134217728,n)}co(t,134217728)}};Ra=function(t){if(t.tag===13){var e=Ft(t),n=dt(t,e);if(n!==null){var r=me();Ze(n,t,e,r)}co(t,e)}};Oa=function(){return B};Da=function(t,e){var n=B;try{return B=t,e()}finally{B=n}};Ol=function(t,e,n){switch(e){case"input":if(Ll(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=Ai(r);if(!i)throw Error(x(90));pa(r),Ll(r,i)}}}break;case"textarea":ma(t,n);break;case"select":e=n.value,e!=null&&Sn(t,!!n.multiple,e,!1)}};xa=lo;Ca=bt;var qf={usingClientEntryPoint:!1,Events:[Tr,cn,Ai,wa,Ia,lo]},Xn={findFiberByHostInstance:$t,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bf={bundleType:Xn.bundleType,version:Xn.version,rendererPackageName:Xn.rendererPackageName,rendererConfig:Xn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ft.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Ea(t),t===null?null:t.stateNode},findFiberByHostInstance:Xn.findFiberByHostInstance||Yf,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 Xr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xr.isDisabled&&Xr.supportsFiber)try{zi=Xr.inject(bf),be=Xr}catch{}}ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qf;ze.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!fo(e))throw Error(x(200));return Kf(t,e,null,n)};ze.createRoot=function(t,e){if(!fo(t))throw Error(x(299));var n=!1,r="",i=ld;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=ao(t,1,!1,null,null,n,!1,r,i),t[ct]=e.current,pr(t.nodeType===8?t.parentNode:t),new ho(e)};ze.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(x(188)):(t=Object.keys(t).join(","),Error(x(268,t)));return t=Ea(e),t=t===null?null:t.stateNode,t};ze.flushSync=function(t){return bt(t)};ze.hydrate=function(t,e,n){if(!Hi(e))throw Error(x(200));return $i(null,t,e,!0,n)};ze.hydrateRoot=function(t,e,n){if(!fo(t))throw Error(x(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",s=ld;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),e=id(e,null,t,1,n??null,i,!1,l,s),t[ct]=e.current,pr(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Vi(e)};ze.render=function(t,e,n){if(!Hi(e))throw Error(x(200));return $i(null,t,e,!1,n)};ze.unmountComponentAtNode=function(t){if(!Hi(t))throw Error(x(40));return t._reactRootContainer?(bt(function(){$i(null,null,t,!1,function(){t._reactRootContainer=null,t[ct]=null})}),!0):!1};ze.unstable_batchedUpdates=lo;ze.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Hi(n))throw Error(x(200));if(t==null||t._reactInternals===void 0)throw Error(x(38));return $i(t,e,n,!1,r)};ze.version="18.3.1-next-f1338f8080-20240426";function sd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sd)}catch(t){console.error(t)}}sd(),sa.exports=ze;var ep=sa.exports,zu=ep;Il.createRoot=zu.createRoot,Il.hydrateRoot=zu.hydrateRoot;class od{constructor({startTime:e,endTime:n,energy:r,audioData:i}){this.startTime=e,this.endTime=n,this.energy=r,this.audioData=i,this.isProcessed=!1,this.transcription=""}getDuration(){return this.endTime-this.startTime}isSilence(){return!1}}class ud{constructor(e={}){this.options={sampleRate:16e3,windowSize:1600,minSpeechDuration:.3,silenceThreshold:.8,energyThreshold:.125,smaLength:6,lookbackChunks:3,overlapDuration:.2,maxHistoryLength:10,logger:console.log,...e},this.reset()}log(e,n=null){typeof this.options.logger=="function"&&this.options.logger(e,n)}processAudioData(e,n,r,i,l){if(!e||!e.length)return[];const s=[],o=r>this.options.energyThreshold;if(this.state.recentChunks.push({time:n,energy:r,isSpeech:o}),this.state.recentChunks.length>10&&this.state.recentChunks.shift(),!this.state.inSpeech&&o){let u=this.findSpeechStart(),a=u!==-1?this.state.recentChunks[u].time:n;this.startSpeech(a,r),this.log("Speech start detected",{detectedAt:n.toFixed(2),actualStart:a.toFixed(2),lookbackDiff:(n-a).toFixed(2)})}else if(this.state.inSpeech&&!o){if(this.state.silenceCounter++,this.state.silenceCounter>=this.options.silenceThreshold*10){if(this.state.speechStartTime!==null){const a=n-this.state.speechStartTime,p=this.state.speechEnergies.reduce((m,g)=>m+g,0)/this.state.speechEnergies.length;this.state.speechStats.push({startTime:this.state.speechStartTime,endTime:n,duration:a,avgEnergy:p,energyIntegral:p*a}),this.state.speechStats.length>this.options.maxHistoryLength&&this.state.speechStats.shift()}const u=this.createSegment(this.state.speechStartTime,n,i,this.options.sampleRate);u&&s.push(u),this.startSilence(n)}}else this.state.inSpeech?this.state.speechEnergies.push(r):this.state.silenceEnergies.push(r);return this.updateStats(),s}startSpeech(e,n){this.state.inSpeech=!0,this.state.speechStartTime=e,this.state.silenceCounter=0,this.state.speechEnergies=[n],this.state.silenceStartTime=null}startSilence(e){this.state.inSpeech=!1,this.state.silenceStartTime=e,this.state.speechStartTime=null,this.state.silenceCounter=0,this.state.silenceEnergies=[]}updateStats(){const e={silence:{avgDuration:0,avgEnergy:0,avgEnergyIntegral:0},speech:{avgDuration:0,avgEnergy:0,avgEnergyIntegral:0}};this.state.silenceStats.length>0&&(e.silence={avgDuration:this.average(this.state.silenceStats.map(n=>n.duration)),avgEnergy:this.average(this.state.silenceStats.map(n=>n.avgEnergy)),avgEnergyIntegral:this.average(this.state.silenceStats.map(n=>n.energyIntegral))}),this.state.speechStats.length>0&&(e.speech={avgDuration:this.average(this.state.speechStats.map(n=>n.duration)),avgEnergy:this.average(this.state.speechStats.map(n=>n.avgEnergy)),avgEnergyIntegral:this.average(this.state.speechStats.map(n=>n.energyIntegral))}),this.state.currentStats=e}average(e){return e.reduce((n,r)=>n+r,0)/e.length}getStats(){return this.state.currentStats}reset(){this.state={inSpeech:!1,speechStartTime:null,silenceStartTime:null,silenceCounter:0,recentChunks:[],speechEnergies:[],silenceEnergies:[],speechStats:[],silenceStats:[],currentStats:{silence:{avgDuration:0,avgEnergy:0,avgEnergyIntegral:0},speech:{avgDuration:0,avgEnergy:0,avgEnergyIntegral:0}}}}setThreshold(e){this.options.energyThreshold=e,this.log("Updated energy threshold:",e)}setSilenceLength(e){this.options.silenceThreshold=e}createSegment(e,n,r,i){const o=Math.floor(.5*i),u=Math.floor(.3*i),a=Math.floor(e*i),p=Math.floor(n*i),m=Math.max(0,a-o),g=Math.min(r.length,p+u);if(m>=r.length||g<=0)return this.log("Invalid segment boundaries",{start:e,end:n,startSample:m,endSample:g,bufferLength:r.length,lookback:.5,overlap:.3}),null;const k=g-m;if(k<=0)return this.log("Invalid segment length",{length:k,start:e,end:n}),null;const y=new Float32Array(k);y.set(r.slice(m,g));const f=new od({startTime:e-.5,endTime:n+.3,audioData:y,sampleRate:i,energy:this.state.speechEnergies.reduce((S,d)=>S+d,0)/this.state.speechEnergies.length});return this.log("Created segment",{originalStart:e.toFixed(2),originalEnd:n.toFixed(2),finalStart:f.startTime.toFixed(2),finalEnd:f.endTime.toFixed(2),duration:(f.endTime-f.startTime).toFixed(2),samples:k,lookbackSamples:o,overlapSamples:u}),f}findSpeechStart(){const e=this.state.recentChunks;let n=e.length-1;for(;n>=0;){if(!e[n].isSpeech){let r=0;for(;n>=0&&!e[n].isSpeech;)r++,n--;if(r>=3)return n+1}n--}return 0}}const yn=class yn{constructor(){if(yn.instance)return yn.instance;this.audioContext=null,this.processor=null,this.listeners=new Set,this.initialized=!1,this.parameters={threshold:.125,silenceLength:.8,minSpeechDuration:.3},this.segments=[],this.recordedChunks=[],this.audioBuffer=new Float32Array(0),this.lastProcessedTime=0,this._activeTranscriptions=new Set,this.worker=null,this.language="en",this._nextSegmentId=0,this._metrics={currentEnergy:0,averageEnergy:0,peakEnergy:0,rawPeakValue:0,bufferDuration:0,recentAudioData:new Float32Array(48e3)},this._visualizationBuffer=new Float32Array(16e3*30),this._visualizationBufferPosition=0,yn.instance=this}async initialize(e={}){if(!this.initialized)try{this.options=e,this.processor=new ud({sampleRate:e.sampleRate||16e3,onSegmentDetected:this.handleNewSegment.bind(this)}),this.initialized=!0,this.notifyListeners("initialized")}catch(n){throw console.error("Failed to initialize AudioManager:",n),n}}async startAudioContext(){var e;this.audioContext||(this.audioContext=new AudioContext({sampleRate:((e=this.options)==null?void 0:e.sampleRate)||16e3})),this.audioContext.state!=="running"&&await this.audioContext.resume(),this.notifyListeners("audioContextStarted")}processNewChunk(e,n){if(!e||!e.length)return;this.updateVisualizationBuffer(e),this._metrics.currentEnergy=n,this._metrics.averageEnergy=this._metrics.averageEnergy*.95+n*.05,this._metrics.peakEnergy=Math.max(this._metrics.peakEnergy*.99,n),this._metrics.rawPeakValue=Math.max(...Array.from(e).map(Math.abs)),this._metrics.bufferDuration=this.audioBuffer.length/this.options.sampleRate;const r=new Float32Array(this.audioBuffer.length+e.length);r.set(this.audioBuffer),r.set(e,this.audioBuffer.length),this.audioBuffer=r;const i=this.getCurrentTime(),l=this.processor.processAudioData(e,i,n,this.audioBuffer,this.lastProcessedTime);l.length>0&&l.forEach(s=>this.handleNewSegment(s)),this.lastProcessedTime=i}getCurrentTime(){return this.audioContext?this.audioContext.currentTime:0}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}notifyListeners(e,n){this.listeners.forEach(r=>r(e,n))}handleNewSegment(e){const n=this.calculateSegmentEnergyIntegral(e),r=e.endTime-e.startTime;if(console.log("Candidate segment detected:",{startTime:e.startTime.toFixed(2),endTime:e.endTime.toFixed(2),duration:r.toFixed(2),energyIntegral:n.toFixed(4),isValidSpeech:r>=this.parameters.minSpeechDuration&&n>=this.parameters.minEnergyIntegral,minDurationRequired:this.parameters.minSpeechDuration,minEnergyIntegralRequired:this.parameters.minEnergyIntegral}),!(r>=this.parameters.minSpeechDuration&&n>=this.parameters.minEnergyIntegral)){console.log("🚫 Filtered out noise segment:",{reason:r<this.parameters.minSpeechDuration?"Too short":"Energy integral too low",duration:r.toFixed(2),energyIntegral:n.toFixed(4),thresholds:{minDuration:this.parameters.minSpeechDuration,minEnergyIntegral:this.parameters.minEnergyIntegral}});return}console.log("✅ Valid speech segment:",{duration:r.toFixed(2),energyIntegral:n.toFixed(4)});const l=Math.floor(e.startTime*this.audioContext.sampleRate),s=Math.ceil(e.endTime*this.audioContext.sampleRate);e.audioData=this.audioBuffer.slice(l,s),e.sampleRate=this.audioContext.sampleRate,e.energyIntegral=n,e.id=this.generateSegmentId(),e.isProcessed=!1,e.isMerged=!1,e.isPartOfMerged=!1,e.mergedId=null,this.segments.push(e);const o=100;this.segments.length>o&&(this.segments=this.segments.slice(-o));const u=this.segments.filter(a=>!a.isPartOfMerged&&a.endTime>=e.startTime-.5&&a.id!==e.id);if(u.length>0){const a={startTime:Math.min(...u.map(p=>p.startTime),e.startTime),endTime:Math.max(...u.map(p=>p.endTime),e.endTime),id:`merged_${Date.now()}`,isMerged:!0,isProcessed:!1,audioData:this.getMergedAudioData([...u,e]),sampleRate:this.audioContext.sampleRate,originalSegments:[...u,e]};[...u,e].forEach(p=>{p.isPartOfMerged=!0,p.mergedId=a.id}),this.segments.push(a),this.sendForTranscription(a)}else this.sendForTranscription(e);this.notifyListeners("segmentsUpdated",this.segments)}calculateSegmentEnergyIntegral(e){const n=Math.floor(e.startTime*this.audioContext.sampleRate),r=Math.ceil(e.endTime*this.audioContext.sampleRate),i=this.audioBuffer.slice(n,r);let l=0;for(let o=0;o<i.length;o++)l+=i[o]*i[o];const s=(r-n)/this.audioContext.sampleRate;return l/s}getMergedAudioData(e){if(!e.length)return new Float32Array(0);const n=Math.min(...e.map(s=>s.startTime)),r=Math.max(...e.map(s=>s.endTime)),i=Math.floor(n*this.audioContext.sampleRate),l=Math.ceil(r*this.audioContext.sampleRate);return this.audioBuffer.slice(i,l)}trimSilence(e,n,r=null,i=.5,l=.3){if(!e||e.length===0)return e;const s=i/2,o=l/2,u=Math.floor(s*n),a=Math.floor(o*n),p=Math.floor(.02*n);let m=u,g=e.length-a-1;const k=r??this.parameters.threshold;for(let y=u;y<e.length-p-a;y+=p){let f=0;for(let S=0;S<p;S++)f+=Math.abs(e[y+S]);if(f/=p,f>k){m=Math.max(u,y-p);break}}for(let y=e.length-a-p;y>=u;y-=p){let f=0;for(let S=0;S<p;S++)f+=Math.abs(e[y+S]);if(f/=p,f>k){g=Math.min(e.length-a,y+p*2);break}}return e.slice(m,g)}sendForTranscription(e){if(!this.worker||!e.audioData||e.isPartOfMerged&&!e.isMerged||this._activeTranscriptions.has(e.id))return;e.isProcessed=!0,this._activeTranscriptions.add(e.id);const n=.5,r=.3,i=this.trimSilence(e.audioData,this.audioContext.sampleRate,this.parameters.threshold/2,n,r),l=e.audioData.length/this.audioContext.sampleRate,s=i.length/this.audioContext.sampleRate;console.log("Audio trimming results:",{segmentId:e.id,originalDuration:l.toFixed(2)+"s",trimmedDuration:s.toFixed(2)+"s",reduction:((1-s/l)*100).toFixed(1)+"%",lookbackDuration:n.toFixed(2)+"s",overlapDuration:r.toFixed(2)+"s"}),console.log("Sending for transcription with language:",this.language),this.worker.postMessage({type:"transcribe",data:{audioData:i,language:this.language,segmentId:e.id,isMerged:e.isMerged}})}handleTranscriptionResult({segmentId:e,output:n,isMerged:r}){const i=this.segments.find(l=>l.id===e);if(!i){console.warn("Segment not found:",e);return}i.transcription=n,i.isProcessed=!0,this.notifyListeners("segmentsUpdated",this.segments),console.log("Received transcription result:",{segmentId:e,output:n,isMerged:r})}reset(){this.segments=[],this.recordedChunks=[],this.processor&&this.processor.reset(),this.notifyListeners("reset")}updateParameters(e){var n,r,i,l;Object.assign(this.parameters,e),this.processor&&(e.threshold!==void 0&&((r=(n=this.processor).setThreshold)==null||r.call(n,e.threshold),this.processor.options&&(this.processor.options.energyThreshold=e.threshold)),e.silenceLength!==void 0&&((l=(i=this.processor).setSilenceLength)==null||l.call(i,this.parameters.silenceLength)),this.processor.options&&Object.assign(this.processor.options,{minSpeechDuration:this.parameters.minSpeechDuration,energyScale:this.parameters.energyScale,hysteresisRatio:this.parameters.hysteresisRatio,minEnergyIntegral:this.parameters.minEnergyIntegral})),console.log("Updated threshold:",this.parameters.threshold)}mergeOverlappingSegments(e){if(!e||e.length<2)return e;const n=[];let r=e[0];for(let i=1;i<e.length;i++){const l=e[i];l.startTime<=r.endTime?r={...r,endTime:Math.max(r.endTime,l.endTime),isProcessed:!1,isMerged:!0,mergedCount:(r.mergedCount||1)+1}:(n.push(r),r=l)}return n.push(r),n}setWorker(e){this.worker=e}generateSegmentId(){return`segment_${this._nextSegmentId++}`}updateLanguage(e){console.log("AudioManager: Updating language from",this.language,"to:",e),this.language=e,this.notifyListeners("languageUpdated",e)}updateVisualizationBuffer(e){if(!e||!e.length)return;const n=this._visualizationBuffer.length,r=e.length,i=this._visualizationBufferPosition,l=(i+r)%n;if(l>i)this._visualizationBuffer.set(e,i);else{const s=n-i;this._visualizationBuffer.set(e.slice(0,s),i),this._visualizationBuffer.set(e.slice(s),0)}this._visualizationBufferPosition=l}getVisualizationData(){const e=new Float32Array(this._visualizationBuffer.length),n=this._visualizationBufferPosition;return e.set(this._visualizationBuffer.slice(n),0),e.set(this._visualizationBuffer.slice(0,n),this._visualizationBuffer.length-n),e}getMetrics(){return{...this._metrics}}};wo(yn,"instance",null);let gs=yn;const U=new gs;function tp({threshold:t=.02,segments:e=[]}){const n=E.useRef(null),r=E.useRef(null),i=E.useRef(0);E.useRef(0);const l=E.useCallback((o,u)=>{const a=o.getContext("2d",{alpha:!1,desynchronized:!0});if(a.fillStyle="#f5f5f5",a.fillRect(0,0,o.width,o.height),!(u!=null&&u.length))return;const p=o.height/2,m=o.height/2;a.strokeStyle="#c8c8c8",a.lineWidth=1,a.beginPath();const g=16;for(let S=0;S<u.length;S+=g){const d=S/u.length*o.width,c=p+(u[S]||0)*m;S===0?a.moveTo(d,c):a.lineTo(d,c)}a.stroke();const k=U.getCurrentTime(),y=30,f=k-y;e.forEach(S=>{const d=S.startTime-f,c=S.endTime-f;if(c>0&&d<y){const h=Math.max(0,d/y)*o.width,v=Math.min(1,c/y)*o.width;a.fillStyle=S.isMerged?"rgba(128, 0, 128, 0.2)":S.isPartOfMerged?"rgba(255, 165, 0, 0.1)":S.isProcessed?"rgba(0, 200, 0, 0.1)":"rgba(255, 200, 0, 0.1)",a.fillRect(h,0,v-h,o.height),a.strokeStyle=S.isMerged?"rgba(128, 0, 128, 0.5)":"rgba(255, 200, 0, 0.5)",a.beginPath(),a.moveTo(h,0),a.lineTo(h,o.height),a.moveTo(v,0),a.lineTo(v,o.height),a.stroke(),a.fillStyle="#666",a.font="10px Arial"}}),a.fillStyle="#666",a.font="10px Arial";for(let S=0;S<=y;S+=5){const d=S/y*o.width,c=f+S;a.fillText(`${c.toFixed(0)}s`,d,o.height-2)}},[e]),s=E.useCallback((o,u,a,p)=>{if(!o||!u||typeof a!="number")return;o.fillStyle="#f5f5f5",o.fillRect(0,0,u.width,u.height);const m=p*u.width;o.strokeStyle="#ff6b6b",o.lineWidth=2,o.beginPath(),o.moveTo(m,0),o.lineTo(m,u.height),o.stroke();const g=Math.min(a*u.width,u.width);o.fillStyle=a>p?"#4CAF50":"#2196F3",o.fillRect(0,0,g,u.height),o.fillStyle="#666",o.font="12px Arial",o.fillText(`${a.toFixed(3)}`,5,u.height-5)},[]);return E.useEffect(()=>{if(!n.current)return;const o=setInterval(()=>{const u=performance.now();if(u-i.current<50)return;const a=U.getVisualizationData(),p=U.getMetrics();l(n.current,a),r.current&&s(r.current.getContext("2d"),r.current,p.currentEnergy,t),i.current=u},100);return()=>clearInterval(o)},[t,l,s]),I.jsxs("div",{className:"flex flex-col gap-2",children:[I.jsx("canvas",{ref:r,width:480,height:24,className:"w-full border rounded bg-[#f5f5f5]"}),I.jsx("canvas",{ref:n,width:480,height:80,className:"w-full border rounded bg-[#f5f5f5]"})]})}function np(){const[t,e]=E.useState(U.getMetrics());return E.useEffect(()=>{const n=setInterval(()=>{e(U.getMetrics())},100);return()=>clearInterval(n)},[]),I.jsxs("div",{children:[I.jsx("h3",{className:"text-xs font-semibold mb-2",children:"Audio Stats"}),I.jsxs("div",{className:"text-xs space-y-1",children:[I.jsxs("div",{children:["Current Energy: ",t.currentEnergy.toFixed(4)]}),I.jsxs("div",{children:["Average Energy: ",t.averageEnergy.toFixed(4)]}),I.jsxs("div",{children:["Peak Energy: ",t.peakEnergy.toFixed(4)]}),I.jsxs("div",{children:["Buffer Duration: ",t.bufferDuration.toFixed(2),"s"]})]})]})}function rp({className:t,stream:e,threshold:n,onThresholdChange:r,silenceLength:i,onSilenceLengthChange:l,speechHangover:s,onHangoverChange:o,audioContextRef:u,segments:a=[],energyScale:p,onEnergyScaleChange:m,hysteresisRatio:g,onHysteresisChange:k,minSpeechDuration:y,onMinSpeechDurationChange:f,processor:S,minEnergyIntegral:d,onMinEnergyIntegralChange:c}){return I.jsxs("div",{className:t,children:[I.jsx("div",{className:"mb-2",children:I.jsx(tp,{threshold:n,segments:a})}),I.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[I.jsxs("div",{className:"p-3 bg-gray-100 dark:bg-gray-800 rounded-lg",children:[I.jsx("h3",{className:"text-xs font-semibold mb-2",children:"Speech Detection Parameters"}),I.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[I.jsxs("div",{className:"flex flex-col",children:[I.jsxs("label",{className:"text-xs mb-1",children:["Energy Threshold: ",n.toFixed(3)]}),I.jsx("input",{type:"range",min:"0.01",max:"0.5",step:"0.01",value:n,onChange:h=>r(parseFloat(h.target.value)),className:"w-full h-4"})]}),I.jsxs("div",{className:"flex flex-col",children:[I.jsxs("label",{className:"text-xs mb-1",children:["Energy Scale: ",p.toFixed(1)]}),I.jsx("input",{type:"range",min:"0.1",max:"2.0",step:"0.1",value:p,onChange:h=>m(parseFloat(h.target.value)),className:"w-full h-4"})]}),I.jsxs("div",{className:"flex flex-col",children:[I.jsxs("label",{className:"text-xs mb-1",children:["Min Silence (s): ",i.toFixed(2)]}),I.jsx("input",{type:"range",min:"0.1",max:"1.0",step:"0.05",value:i,onChange:h=>l(parseFloat(h.target.value)),className:"w-full h-4"})]}),I.jsxs("div",{className:"flex flex-col",children:[I.jsxs("label",{className:"text-xs mb-1",children:["Speech Hangover (s): ",s.toFixed(2)]}),I.jsx("input",{type:"range",min:"0.1",max:"0.5",step:"0.05",value:s,onChange:h=>o(parseFloat(h.target.value)),className:"w-full h-4"})]}),I.jsxs("div",{className:"flex flex-col",children:[I.jsxs("label",{className:"text-xs mb-1",children:["Min Speech (s): ",y.toFixed(2)]}),I.jsx("input",{type:"range",min:"0.05",max:"0.5",step:"0.05",value:y,onChange:h=>f(parseFloat(h.target.value)),className:"w-full h-4"})]}),I.jsxs("div",{className:"flex flex-col",children:[I.jsxs("label",{className:"text-xs mb-1",children:["Hysteresis: ",g.toFixed(2)]}),I.jsx("input",{type:"range",min:"1.0",max:"2.0",step:"0.1",value:g,onChange:h=>k(parseFloat(h.target.value)),className:"w-full h-4"})]}),I.jsxs("div",{className:"flex flex-col",children:[I.jsxs("label",{className:"text-xs mb-1",children:["Min Energy Integral: ",d.toFixed(3)]}),I.jsx("input",{type:"range",min:"5",max:"50",step:"5",value:d,onChange:h=>c(parseFloat(h.target.value)),className:"w-full h-4"})]})]})]}),I.jsx("div",{className:"p-3 bg-gray-100 dark:bg-gray-800 rounded-lg",children:I.jsx(np,{})})]})]})}function ip(t){const e=t==0?0:Math.floor(Math.log(t)/Math.log(1024));return+(t/Math.pow(1024,e)).toFixed(2)*1+["B","kB","MB","GB","TB"][e]}function lp({text:t,percentage:e,total:n}){return e??(e=0),I.jsx("div",{className:"w-full bg-gray-100 dark:bg-gray-700 text-left rounded-lg overflow-hidden mb-0.5",children:I.jsxs("div",{className:"bg-blue-400 whitespace-nowrap px-1 text-sm",style:{width:`${e}%`},children:[t," (",e.toFixed(2),"%",isNaN(n)?"":` of ${ip(n)}`,")"]})})}const vn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function sp(t){let e="";for(let n=0;n<t.length;n+=3)e+=vn[t[n]>>2],e+=vn[(t[n]&3)<<4|t[n+1]>>4],e+=vn[(t[n+1]&15)<<2|t[n+2]>>6],e+=vn[t[n+2]&63];return t.length%3===2?e=e.substring(0,e.length-1)+"=":t.length%3===1&&(e=e.substring(0,e.length-2)+"=="),e}function op(t){let e=new Uint8Array(256);for(let i=0;i<vn.length;i++)e[vn.charCodeAt(i)]=i;let n=t.length*.75;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);let r=new Uint8Array(n);for(let i=0,l=0;i<t.length;i+=4){let s=e[t.charCodeAt(i)],o=e[t.charCodeAt(i+1)],u=e[t.charCodeAt(i+2)],a=e[t.charCodeAt(i+3)];r[l++]=s<<2|o>>4,r[l++]=(o&15)<<4|u>>2,r[l++]=(u&3)<<6|a&63}return r}function up(t,e,n,r){if(["32f","64"].indexOf(e)>-1&&["32f","64"].indexOf(r)>-1){n.set(t);return}Mu(e),Mu(r);let i=hp(e,r),l={oldMin:Math.pow(2,parseInt(e,10))/2,newMin:Math.pow(2,parseInt(r,10))/2,oldMax:Math.pow(2,parseInt(e,10))/2-1,newMax:Math.pow(2,parseInt(r,10))/2-1};Fu(e,t,!0);for(let s=0,o=t.length;s<o;s++)n[s]=i(t[s],l);Fu(r,n,!1)}function ap(t,e){return t>0?t=parseInt(t/e.oldMax*e.newMax,10):t=parseInt(t/e.oldMin*e.newMin,10),t}function cp(t,e){return parseInt(t>0?t*e.newMax:t*e.newMin,10)}function dp(t,e){return t>0?t/e.oldMax:t/e.oldMin}function hp(t,e){let n=function(r){return r};return t!=e&&(["32f","64"].includes(t)?n=cp:["32f","64"].includes(e)?n=dp:n=ap),n}function Mu(t){if(t!="32f"&&t!="64"&&(parseInt(t,10)<"8"||parseInt(t,10)>"53"))throw new Error("Invalid bit depth.")}function Fu(t,e,n){if(t=="8"){let r=n?-128:128;for(let i=0,l=e.length;i<l;i++)e[i]=e[i]+=r}}const ad=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],po=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371,408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767];function fp(t){let e={index:0,predicted:0,step:7},n=new Uint8Array(t.length),r=[],i=0,l=0;for(let o=0,u=t.length;o<u;o++)o%505==0&&o!=0&&(n.set(gp(r,e),i),i+=256,r=[],l++),r.push(t[o]);let s=t.length/2;return s%2&&s++,n.slice(0,s+512+l*4)}function pp(t,e=256){let n={index:0,predicted:0,step:7},r=new Int16Array(t.length*2),i=[],l=0;for(let s=0,o=t.length;s<o;s++){if(s%e==0&&s!=0){let u=mp(i,n);r.set(u,l),l+=u.length,i=[]}i.push(t[s])}return r}function gp(t,e){let n=kp(t[0],e);for(let r=3,i=t.length;r<i;r+=2){let l=ms(t[r],e),s=ms(t[r+1],e);n.push(s<<4|l)}return n}function mp(t,e){e.predicted=vp(t[1]<<8|t[0]),e.index=t[2],e.step=po[e.index];let n=[e.predicted,e.predicted];for(let r=4,i=t.length;r<i;r++){let l=t[r],s=l>>4,o=s<<4^l;n.push(Nu(o,e)),n.push(Nu(s,e))}return n}function vp(t){return t>32768?t-65536:t}function ms(t,e){let n=t-e.predicted,r=0;n>=0?r=0:(r=8,n=-n);let i=po[e.index],l=i>>3;return n>i&&(r|=4,n-=i,l+=i),i>>=1,n>i&&(r|=2,n-=i,l+=i),i>>=1,n>i&&(r|=1,l+=i),yp(r,l,e),r}function yp(t,e,n){t&8?n.predicted-=e:n.predicted+=e,n.predicted<-32768?n.predicted=-32768:n.predicted>32767&&(n.predicted=32767),n.index+=ad[t&7],n.index<0?n.index=0:n.index>88&&(n.index=88)}function Nu(t,e){let n=0;return t&4&&(n+=e.step),t&2&&(n+=e.step>>1),t&1&&(n+=e.step>>2),n+=e.step>>3,t&8&&(n=-n),e.predicted+=n,e.predicted>32767?e.predicted=32767:e.predicted<-32767&&(e.predicted=-32767),Sp(t,e),e.predicted}function Sp(t,e){e.index+=ad[t],e.index<0?e.index=0:e.index>88&&(e.index=88),e.step=po[e.index]}function kp(t,e){ms(t,e);let n=[];return n.push(t&255),n.push(t>>8&255),n.push(e.index),n.push(0),n}const wp=[1,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];function Ip(t){let e;t=t==-32768?-32767:t;let n=~t>>8&128;if(n||(t=t*-1),t>32635&&(t=32635),t>=256){let r=wp[t>>8&127],i=t>>r+3&15;e=r<<4|i}else e=t>>4;return e^(n^85)}function xp(t){let e=0;t^=85,t&128&&(t&=-129,e=-1);let n=((t&240)>>4)+4,r=0;return n!=4?r=1<<n|(t&15)<<n-4|1<<n-5:r=t<<1|1,r=e===0?r:-r,r*8*-1}function Cp(t){let e=new Uint8Array(t.length);for(let n=0,r=t.length;n<r;n++)e[n]=Ip(t[n]);return e}function _p(t){let e=new Int16Array(t.length);for(let n=0,r=t.length;n<r;n++)e[n]=xp(t[n]);return e}const Tp=132,Au=32635,Ep=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],Pp=[0,132,396,924,1980,4092,8316,16764];function Lp(t){let e,n,r,i;return e=t>>8&128,e!=0&&(t=-t),t=t+Tp,t>Au&&(t=Au),n=Ep[t>>7&255],r=t>>n+3&15,i=~(e|n<<4|r),i}function zp(t){let e,n,r,i;return t=~t,e=t&128,n=t>>4&7,r=t&15,i=Pp[n]+(r<<n+3),e!=0&&(i=-i),i}function Mp(t){let e=new Uint8Array(t.length);for(let n=0,r=t.length;n<r;n++)e[n]=Lp(t[n]);return e}function Fp(t){let e=new Int16Array(t.length);for(let n=0,r=t.length;n<r;n++)e[n]=zp(t[n]);return e}function cd(t,e,n=0,r=t.length){for(let i=n;i<r;i+=e)Np(t,e,i)}function Np(t,e,n){e--;for(let r=0;r<e;r++){let i=t[n+r];t[n+r]=t[n+e],t[n+e]=i,e--}}function Ap(t,e=0,n=t.length){let r="";for(let i=e;i<n;){let l=128,s=191,o=!1,u=t[i++];if(u>=0&&u<=127)r+=String.fromCharCode(u);else{let a=0;u>=194&&u<=223?a=1:u>=224&&u<=239?(a=2,t[i]===224&&(l=160),t[i]===237&&(s=159)):u>=240&&u<=244?(a=3,t[i]===240&&(l=144),t[i]===244&&(s=143)):o=!0,u=u&(1<<8-a-1)-1;for(let p=0;p<a;p++)(t[i]<l||t[i]>s)&&(o=!0),u=u<<6|t[i]&63,i++;o?r+="�":u<=65535?r+=String.fromCharCode(u):(u-=65536,r+=String.fromCharCode((u>>10&1023)+55296,(u&1023)+56320))}}return r}function dd(t,e,n=0){let r=0,i=t.length;for(;r<i;){let l=t.codePointAt(r);if(l<128)e[n]=l,n++;else{let s=0,o=0;for(l<=2047?(s=1,o=192):l<=65535?(s=2,o=224):l<=1114111&&(s=3,o=240,r++),e[n]=(l>>6*s)+o,n++;s>0;)e[n]=128|l>>6*(s-1)&63,n++,s--}r++}return n}class Rp{constructor(e,n=!1){this.bits=e,this.offset=Math.ceil(e/8),this.max=Math.pow(2,e)-1,this.min=0,this.unpack=this.unpack_,n&&(this.max=Math.pow(2,e)/2-1,this.min=-this.max-1,this.unpack=this.unpackSigned_)}pack(e,n,r=0){n=this.clamp_(Math.round(n));for(let i=0,l=this.offset;i<l;i++)e[r]=Math.floor(n/Math.pow(2,i*8))&255,r++;return r}unpack_(e,n=0){let r=0;for(let i=0;i<this.offset;i++)r+=e[n+i]*Math.pow(256,i);return r}unpackSigned_(e,n=0){return this.sign_(this.unpack_(e,n))}clamp_(e){return e>this.max?this.max:e<this.min?this.min:e}sign_(e){return e>this.max&&(e-=this.max*2+2),e}}class Ru{constructor(e,n){this.offset=Math.ceil((e+n)/8),this.ebits=e,this.fbits=n,this.bias=(1<<e-1)-1,this.biasP2=Math.pow(2,this.bias+1),this.ebitsFbits=e+n,this.fbias=Math.pow(2,-(8*this.offset-1-e))}pack(e,n,r){Math.abs(n)>this.biasP2-this.ebitsFbits*2&&(n=n<0?-1/0:1/0);let i=((n=+n)||1/n)<0||n<0?1:0;n=Math.abs(n);let l=Math.min(Math.floor(Math.log(n)/Math.LN2),1023),s=Sl(n/Math.pow(2,l)*Math.pow(2,this.fbits));return n!==n?(s=Math.pow(2,this.fbits-1),l=(1<<this.ebits)-1):n!==0&&(n>=Math.pow(2,1-this.bias)?(s/Math.pow(2,this.fbits)>=2&&(l=l+1,s=1),l>this.bias?(l=(1<<this.ebits)-1,s=0):(l=l+this.bias,s=Sl(s)-Math.pow(2,this.fbits))):(s=Sl(n/Math.pow(2,1-this.bias-this.fbits)),l=0)),this.packFloatBits_(e,r,i,l,s)}unpack(e,n){let r=(1<<this.ebits)-1,i,l="";for(let u=this.offset-1;u>=0;u--){let a=e[u+n].toString(2);l+="00000000".substring(a.length)+a}let s=l.charAt(0)=="1"?-1:1;l=l.substring(1);let o=parseInt(l.substring(0,this.ebits),2);return l=l.substring(this.ebits),o==r?parseInt(l,2)!==0?NaN:s*(1/0):(o===0?(o+=1,i=parseInt(l,2)):i=parseInt("1"+l,2),s*i*this.fbias*Math.pow(2,o-this.bias))}packFloatBits_(e,n,r,i,l){let s=[];s.push(r);for(let m=this.ebits;m>0;m-=1)s[m]=i%2?1:0,i=Math.floor(i/2);let o=s.length;for(let m=this.fbits;m>0;m-=1)s[o+m]=l%2?1:0,l=Math.floor(l/2);let u=s.join(""),a=this.offset+n-1,p=n;for(;a>=n;)e[a]=parseInt(u.substring(0,8),2),u=u.substring(8),a--,p++;return p}}function Sl(t){let e=Math.floor(t),n=t-e;return n<.5?e:n>.5||e%2?e+1:e}function _n(t,e=0,n=t.length){return Ap(t,e,n)}function ne(t){let e=[];return dd(t,e),e}function Ou(t,e,n=0){return dd(t,e,n)}function hd(t,e,n,r=0){e=e||{};let i=fd(e.bits,e.fp,e.signed),l=Math.ceil(e.bits/8),s=0,o=r;for(let u=t.length;s<u;s++)r=i.pack(n,t[s],r);return e.be&&cd(n,l,o,r),r}function Ht(t,e,n,r=0,i=t.length){e=e||{};let l=fd(e.bits,e.fp,e.signed);if(i=Dp(t,r,i,l.offset),e.be){let s=Op(t);e.be&&cd(s,l.offset,r,i),Du(s,n,r,i,l)}else Du(t,n,r,i,l)}function go(t,e,n,r=0){return hd([t],e,n,r)}function P(t,e){let n=[];return go(t,e,n,0),n}function Pi(t,e,n=0){let r=[];return Ht(t,e,r,n,n+Math.ceil(e.bits/8)),r[0]}function Du(t,e,n,r,i){let l=i.offset;for(let s=0,o=n;o<r;o+=l,s++)e[s]=i.unpack(t,o)}function Op(t){return new Uint8Array(t)}function Dp(t,e,n,r){let i=(n-e)%r;return n-i}function fd(t,e,n){return e&&t==32?new Ru(8,23):e&&t==64?new Ru(11,52):new Rp(t,n)}class jp{constructor(){this.container="",this.chunkSize=0,this.format="",this.signature=null,this.head=0,this.uInt32={bits:32,be:!1},this.supported_containers=["RIFF","RIFX"]}setSignature(e){if(this.head=0,this.container=this.readString(e,4),this.supported_containers.indexOf(this.container)===-1)throw Error("Not a supported format.");this.uInt32.be=this.container==="RIFX",this.chunkSize=this.readUInt32(e),this.format=this.readString(e,4),this.signature={chunkId:this.container,chunkSize:this.chunkSize,format:this.format,subChunks:this.getSubChunksIndex_(e)}}findChunk(e,n=!1){let r=this.signature.subChunks,i=[];for(let l=0;l<r.length;l++)if(r[l].chunkId==e)if(n)i.push(r[l]);else return r[l];return e=="LIST"&&i.length?i:null}readString(e,n){let r="";return r=_n(e,this.head,this.head+n),this.head+=n,r}readUInt32(e){let n=Pi(e,this.uInt32,this.head);return this.head+=4,n}getSubChunksIndex_(e){let n=[],r=this.head;for(;r<=e.length-8;)n.push(this.getSubChunkIndex_(e,r)),r+=8+n[n.length-1].chunkSize,r=r%2?r+1:r;return n}getSubChunkIndex_(e,n){let r={chunkId:this.getChunkId_(e,n),chunkSize:this.getChunkSize_(e,n)};if(r.chunkId=="LIST")r.format=_n(e,n+8,n+12),this.head+=4,r.subChunks=this.getSubChunksIndex_(e);else{let i=r.chunkSize%2?r.chunkSize+1:r.chunkSize;this.head=n+8+i,r.chunkData={start:n+8,end:this.head}}return r}getChunkId_(e,n){return this.head+=4,_n(e,n,n+4)}getChunkSize_(e,n){return this.head+=4,Pi(e,this.uInt32,n+4)}}class mo extends jp{constructor(){super(),this.supported_containers.push("RF64"),this.fmt={chunkId:"",chunkSize:0,audioFormat:0,numChannels:0,sampleRate:0,byteRate:0,blockAlign:0,bitsPerSample:0,cbSize:0,validBitsPerSample:0,dwChannelMask:0,subformat:[]},this.fact={chunkId:"",chunkSize:0,dwSampleLength:0},this.cue={chunkId:"",chunkSize:0,dwCuePoints:0,points:[]},this.smpl={chunkId:"",chunkSize:0,dwManufacturer:0,dwProduct:0,dwSamplePeriod:0,dwMIDIUnityNote:0,dwMIDIPitchFraction:0,dwSMPTEFormat:0,dwSMPTEOffset:0,dwNumSampleLoops:0,dwSamplerData:0,loops:[]},this.bext={chunkId:"",chunkSize:0,description:"",originator:"",originatorReference:"",originationDate:"",originationTime:"",timeReference:[0,0],version:0,UMID:"",loudnessValue:0,loudnessRange:0,maxTruePeakLevel:0,maxMomentaryLoudness:0,maxShortTermLoudness:0,reserved:"",codingHistory:""},this.iXML={chunkId:"",chunkSize:0,value:""},this.ds64={chunkId:"",chunkSize:0,riffSizeHigh:0,riffSizeLow:0,dataSizeHigh:0,dataSizeLow:0,originationTime:0,sampleCountHigh:0,sampleCountLow:0},this.data={chunkId:"",chunkSize:0,samples:new Uint8Array(0)},this.LIST=[],this.junk={chunkId:"",chunkSize:0,chunkData:[]},this._PMX={chunkId:"",chunkSize:0,value:""},this.uInt16={bits:16,be:!1,signed:!1,fp:!1}}fromBuffer(e,n=!0){if(this.clearHeaders(),this.setSignature(e),this.uInt16.be=this.uInt32.be,this.format!="WAVE")throw Error('Could not find the "WAVE" format identifier');this.readDs64Chunk_(e),this.readFmtChunk_(e),this.readFactChunk_(e),this.readBextChunk_(e),this.readiXMLChunk_(e),this.readCueChunk_(e),this.readSmplChunk_(e),this.readDataChunk_(e,n),this.readJunkChunk_(e),this.readLISTChunk_(e),this.read_PMXChunk_(e)}clearHeaders(){let e=new mo;Object.assign(this.fmt,e.fmt),Object.assign(this.fact,e.fact),Object.assign(this.cue,e.cue),Object.assign(this.smpl,e.smpl),Object.assign(this.bext,e.bext),Object.assign(this.iXML,e.iXML),Object.assign(this.ds64,e.ds64),Object.assign(this.data,e.data),this.LIST=[],Object.assign(this.junk,e.junk),Object.assign(this._PMX,e._PMX)}readFmtChunk_(e){let n=this.findChunk("fmt ");if(n)this.head=n.chunkData.start,this.fmt.chunkId=n.chunkId,this.fmt.chunkSize=n.chunkSize,this.fmt.audioFormat=this.readUInt16_(e),this.fmt.numChannels=this.readUInt16_(e),this.fmt.sampleRate=this.readUInt32(e),this.fmt.byteRate=this.readUInt32(e),this.fmt.blockAlign=this.readUInt16_(e),this.fmt.bitsPerSample=this.readUInt16_(e),this.readFmtExtension_(e);else throw Error('Could not find the "fmt " chunk')}readFmtExtension_(e){this.fmt.chunkSize>16&&(this.fmt.cbSize=this.readUInt16_(e),this.fmt.chunkSize>18&&(this.fmt.validBitsPerSample=this.readUInt16_(e),this.fmt.chunkSize>20&&(this.fmt.dwChannelMask=this.readUInt32(e),this.fmt.subformat=[this.readUInt32(e),this.readUInt32(e),this.readUInt32(e),this.readUInt32(e)])))}readFactChunk_(e){let n=this.findChunk("fact");n&&(this.head=n.chunkData.start,this.fact.chunkId=n.chunkId,this.fact.chunkSize=n.chunkSize,this.fact.dwSampleLength=this.readUInt32(e))}readCueChunk_(e){let n=this.findChunk("cue ");if(n){this.head=n.chunkData.start,this.cue.chunkId=n.chunkId,this.cue.chunkSize=n.chunkSize,this.cue.dwCuePoints=this.readUInt32(e);for(let r=0;r<this.cue.dwCuePoints;r++)this.cue.points.push({dwName:this.readUInt32(e),dwPosition:this.readUInt32(e),fccChunk:this.readString(e,4),dwChunkStart:this.readUInt32(e),dwBlockStart:this.readUInt32(e),dwSampleOffset:this.readUInt32(e)})}}readSmplChunk_(e){let n=this.findChunk("smpl");if(n){this.head=n.chunkData.start,this.smpl.chunkId=n.chunkId,this.smpl.chunkSize=n.chunkSize,this.smpl.dwManufacturer=this.readUInt32(e),this.smpl.dwProduct=this.readUInt32(e),this.smpl.dwSamplePeriod=this.readUInt32(e),this.smpl.dwMIDIUnityNote=this.readUInt32(e),this.smpl.dwMIDIPitchFraction=this.readUInt32(e),this.smpl.dwSMPTEFormat=this.readUInt32(e),this.smpl.dwSMPTEOffset=this.readUInt32(e),this.smpl.dwNumSampleLoops=this.readUInt32(e),this.smpl.dwSamplerData=this.readUInt32(e);for(let r=0;r<this.smpl.dwNumSampleLoops;r++)this.smpl.loops.push({dwName:this.readUInt32(e),dwType:this.readUInt32(e),dwStart:this.readUInt32(e),dwEnd:this.readUInt32(e),dwFraction:this.readUInt32(e),dwPlayCount:this.readUInt32(e)})}}readDataChunk_(e,n){let r=this.findChunk("data");if(r)this.data.chunkId="data",this.data.chunkSize=r.chunkSize,n&&(this.data.samples=e.slice(r.chunkData.start,r.chunkData.end));else throw Error('Could not find the "data" chunk')}readBextChunk_(e){let n=this.findChunk("bext");n&&(this.head=n.chunkData.start,this.bext.chunkId=n.chunkId,this.bext.chunkSize=n.chunkSize,this.bext.description=this.readString(e,256),this.bext.originator=this.readString(e,32),this.bext.originatorReference=this.readString(e,32),this.bext.originationDate=this.readString(e,10),this.bext.originationTime=this.readString(e,8),this.bext.timeReference=[this.readUInt32(e),this.readUInt32(e)],this.bext.version=this.readUInt16_(e),this.bext.UMID=this.readString(e,64),this.bext.loudnessValue=this.readUInt16_(e),this.bext.loudnessRange=this.readUInt16_(e),this.bext.maxTruePeakLevel=this.readUInt16_(e),this.bext.maxMomentaryLoudness=this.readUInt16_(e),this.bext.maxShortTermLoudness=this.readUInt16_(e),this.bext.reserved=this.readString(e,180),this.bext.codingHistory=this.readString(e,this.bext.chunkSize-602))}readiXMLChunk_(e){let n=this.findChunk("iXML");n&&(this.head=n.chunkData.start,this.iXML.chunkId=n.chunkId,this.iXML.chunkSize=n.chunkSize,this.iXML.value=_n(e,this.head,this.head+this.iXML.chunkSize))}readDs64Chunk_(e){let n=this.findChunk("ds64");if(n)this.head=n.chunkData.start,this.ds64.chunkId=n.chunkId,this.ds64.chunkSize=n.chunkSize,this.ds64.riffSizeHigh=this.readUInt32(e),this.ds64.riffSizeLow=this.readUInt32(e),this.ds64.dataSizeHigh=this.readUInt32(e),this.ds64.dataSizeLow=this.readUInt32(e),this.ds64.originationTime=this.readUInt32(e),this.ds64.sampleCountHigh=this.readUInt32(e),this.ds64.sampleCountLow=this.readUInt32(e);else if(this.container=="RF64")throw Error('Could not find the "ds64" chunk')}readLISTChunk_(e){let n=this.findChunk("LIST",!0);if(n!==null)for(let r=0;r<n.length;r++){let i=n[r];this.LIST.push({chunkId:i.chunkId,chunkSize:i.chunkSize,format:i.format,subChunks:[]});for(let l=0;l<i.subChunks.length;l++)this.readLISTSubChunks_(i.subChunks[l],i.format,e)}}readLISTSubChunks_(e,n,r){n=="adtl"?["labl","note","ltxt"].indexOf(e.chunkId)>-1&&this.readLISTadtlSubChunks_(r,e):n=="INFO"&&this.readLISTINFOSubChunks_(r,e)}readLISTadtlSubChunks_(e,n){this.head=n.chunkData.start;let r={chunkId:n.chunkId,chunkSize:n.chunkSize,dwName:this.readUInt32(e)};n.chunkId=="ltxt"?(r.dwSampleLength=this.readUInt32(e),r.dwPurposeID=this.readUInt32(e),r.dwCountry=this.readUInt16_(e),r.dwLanguage=this.readUInt16_(e),r.dwDialect=this.readUInt16_(e),r.dwCodePage=this.readUInt16_(e),r.value=""):r.value=this.readZSTR_(e,this.head),this.LIST[this.LIST.length-1].subChunks.push(r)}readLISTINFOSubChunks_(e,n){this.head=n.chunkData.start,this.LIST[this.LIST.length-1].subChunks.push({chunkId:n.chunkId,chunkSize:n.chunkSize,value:this.readZSTR_(e,this.head)})}readJunkChunk_(e){let n=this.findChunk("junk");n&&(this.junk={chunkId:n.chunkId,chunkSize:n.chunkSize,chunkData:[].slice.call(e.slice(n.chunkData.start,n.chunkData.end))})}read_PMXChunk_(e){let n=this.findChunk("_PMX");n&&(this.head=n.chunkData.start,this._PMX.chunkId=n.chunkId,this._PMX.chunkSize=n.chunkSize,this._PMX.value=_n(e,this.head,this.head+this._PMX.chunkSize))}readZSTR_(e,n=0){for(let r=n;r<e.length&&(this.head++,e[r]!==0);r++);return _n(e,n,this.head-1)}readUInt16_(e){let n=Pi(e,this.uInt16,this.head);return this.head+=2,n}}function We(t,e){let n=ne(t);for(let r=n.length;r<e;r++)n.push(0);return n}class Bp extends mo{toBuffer(){this.uInt16.be=this.container==="RIFX",this.uInt32.be=this.uInt16.be;let e=[this.getJunkBytes_(),this.getDs64Bytes_(),this.getBextBytes_(),this.getiXMLBytes_(),this.getFmtBytes_(),this.getFactBytes_(),ne(this.data.chunkId),P(this.data.samples.length,this.uInt32),this.data.samples,this.getCueBytes_(),this.getSmplBytes_(),this.getLISTBytes_(),this.get_PMXBytes_()],n=0;for(let l=0;l<e.length;l++)n+=e[l].length;let r=new Uint8Array(n+12),i=0;i=Ou(this.container,r,i),i=go(n+4,this.uInt32,r,i),i=Ou(this.format,r,i);for(let l=0;l<e.length;l++)r.set(e[l],i),i+=e[l].length;return r}getBextBytes_(){let e=[];return this.enforceBext_(),this.bext.chunkId&&(this.bext.chunkSize=602+this.bext.codingHistory.length,e=e.concat(ne(this.bext.chunkId),P(602+this.bext.codingHistory.length,this.uInt32),We(this.bext.description,256),We(this.bext.originator,32),We(this.bext.originatorReference,32),We(this.bext.originationDate,10),We(this.bext.originationTime,8),P(this.bext.timeReference[0],this.uInt32),P(this.bext.timeReference[1],this.uInt32),P(this.bext.version,this.uInt16),We(this.bext.UMID,64),P(this.bext.loudnessValue,this.uInt16),P(this.bext.loudnessRange,this.uInt16),P(this.bext.maxTruePeakLevel,this.uInt16),P(this.bext.maxMomentaryLoudness,this.uInt16),P(this.bext.maxShortTermLoudness,this.uInt16),We(this.bext.reserved,180),We(this.bext.codingHistory,this.bext.codingHistory.length))),this.enforceByteLen_(e),e}enforceBext_(){for(let e in this.bext)if(this.bext.hasOwnProperty(e)&&this.bext[e]&&e!="timeReference"){this.bext.chunkId="bext";break}(this.bext.timeReference[0]||this.bext.timeReference[1])&&(this.bext.chunkId="bext")}getiXMLBytes_(){let e=[];if(this.iXML.chunkId){let n=ne(this.iXML.value);this.iXML.chunkSize=n.length,e=e.concat(ne(this.iXML.chunkId),P(this.iXML.chunkSize,this.uInt32),n)}return this.enforceByteLen_(e),e}getDs64Bytes_(){let e=[];return this.ds64.chunkId&&(e=e.concat(ne(this.ds64.chunkId),P(this.ds64.chunkSize,this.uInt32),P(this.ds64.riffSizeHigh,this.uInt32),P(this.ds64.riffSizeLow,this.uInt32),P(this.ds64.dataSizeHigh,this.uInt32),P(this.ds64.dataSizeLow,this.uInt32),P(this.ds64.originationTime,this.uInt32),P(this.ds64.sampleCountHigh,this.uInt32),P(this.ds64.sampleCountLow,this.uInt32))),this.enforceByteLen_(e),e}getCueBytes_(){let e=[];if(this.cue.chunkId){let n=this.getCuePointsBytes_();e=e.concat(ne(this.cue.chunkId),P(n.length+4,this.uInt32),P(this.cue.dwCuePoints,this.uInt32),n)}return this.enforceByteLen_(e),e}getCuePointsBytes_(){let e=[];for(let n=0;n<this.cue.dwCuePoints;n++)e=e.concat(P(this.cue.points[n].dwName,this.uInt32),P(this.cue.points[n].dwPosition,this.uInt32),ne(this.cue.points[n].fccChunk),P(this.cue.points[n].dwChunkStart,this.uInt32),P(this.cue.points[n].dwBlockStart,this.uInt32),P(this.cue.points[n].dwSampleOffset,this.uInt32));return e}getSmplBytes_(){let e=[];if(this.smpl.chunkId){let n=this.getSmplLoopsBytes_();e=e.concat(ne(this.smpl.chunkId),P(n.length+36,this.uInt32),P(this.smpl.dwManufacturer,this.uInt32),P(this.smpl.dwProduct,this.uInt32),P(this.smpl.dwSamplePeriod,this.uInt32),P(this.smpl.dwMIDIUnityNote,this.uInt32),P(this.smpl.dwMIDIPitchFraction,this.uInt32),P(this.smpl.dwSMPTEFormat,this.uInt32),P(this.smpl.dwSMPTEOffset,this.uInt32),P(this.smpl.dwNumSampleLoops,this.uInt32),P(this.smpl.dwSamplerData,this.uInt32),n)}return this.enforceByteLen_(e),e}getSmplLoopsBytes_(){let e=[];for(let n=0;n<this.smpl.dwNumSampleLoops;n++)e=e.concat(P(this.smpl.loops[n].dwName,this.uInt32),P(this.smpl.loops[n].dwType,this.uInt32),P(this.smpl.loops[n].dwStart,this.uInt32),P(this.smpl.loops[n].dwEnd,this.uInt32),P(this.smpl.loops[n].dwFraction,this.uInt32),P(this.smpl.loops[n].dwPlayCount,this.uInt32));return e}getFactBytes_(){let e=[];return this.fact.chunkId&&(e=e.concat(ne(this.fact.chunkId),P(this.fact.chunkSize,this.uInt32),P(this.fact.dwSampleLength,this.uInt32))),this.enforceByteLen_(e),e}getFmtBytes_(){let e=[];if(this.fmt.chunkId){let n=e.concat(ne(this.fmt.chunkId),P(this.fmt.chunkSize,this.uInt32),P(this.fmt.audioFormat,this.uInt16),P(this.fmt.numChannels,this.uInt16),P(this.fmt.sampleRate,this.uInt32),P(this.fmt.byteRate,this.uInt32),P(this.fmt.blockAlign,this.uInt16),P(this.fmt.bitsPerSample,this.uInt16),this.getFmtExtensionBytes_());return this.enforceByteLen_(n),n}throw Error('Could not find the "fmt " chunk')}getFmtExtensionBytes_(){let e=[];return this.fmt.chunkSize>16&&(e=e.concat(P(this.fmt.cbSize,this.uInt16))),this.fmt.chunkSize>18&&(e=e.concat(P(this.fmt.validBitsPerSample,this.uInt16))),this.fmt.chunkSize>20&&(e=e.concat(P(this.fmt.dwChannelMask,this.uInt32))),this.fmt.chunkSize>24&&(e=e.concat(P(this.fmt.subformat[0],this.uInt32),P(this.fmt.subformat[1],this.uInt32),P(this.fmt.subformat[2],this.uInt32),P(this.fmt.subformat[3],this.uInt32))),e}getLISTBytes_(){let e=[];for(let n=0;n<this.LIST.length;n++){let r=this.getLISTSubChunksBytes_(this.LIST[n].subChunks,this.LIST[n].format);e=e.concat(ne(this.LIST[n].chunkId),P(r.length+4,this.uInt32),ne(this.LIST[n].format),r)}return this.enforceByteLen_(e),e}getLISTSubChunksBytes_(e,n){let r=[];for(let i=0,l=e.length;i<l;i++)n=="INFO"?r=r.concat(this.getLISTINFOSubChunksBytes_(e[i])):n=="adtl"&&(r=r.concat(this.getLISTadtlSubChunksBytes_(e[i]))),this.enforceByteLen_(r);return r}getLISTINFOSubChunksBytes_(e){let n=[],r=We(e.value,e.value.length);return n=n.concat(ne(e.chunkId),P(r.length+1,this.uInt32),r),n.push(0),n}getLISTadtlSubChunksBytes_(e){let n=[];if(["labl","note"].indexOf(e.chunkId)>-1){let r=We(e.value,e.value.length);n=n.concat(ne(e.chunkId),P(r.length+4+1,this.uInt32),P(e.dwName,this.uInt32),r),n.push(0)}else e.chunkId=="ltxt"&&(n=n.concat(this.getLtxtChunkBytes_(e)));return n}getLtxtChunkBytes_(e){return[].concat(ne(e.chunkId),P(e.value.length+20,this.uInt32),P(e.dwName,this.uInt32),P(e.dwSampleLength,this.uInt32),P(e.dwPurposeID,this.uInt32),P(e.dwCountry,this.uInt16),P(e.dwLanguage,this.uInt16),P(e.dwDialect,this.uInt16),P(e.dwCodePage,this.uInt16),We(e.value,e.value.length))}get_PMXBytes_(){let e=[];if(this._PMX.chunkId){let n=ne(this._PMX.value);this._PMX.chunkSize=n.length,e=e.concat(ne(this._PMX.chunkId),P(this._PMX.chunkSize,this.uInt32),n)}return this.enforceByteLen_(e),e}getJunkBytes_(){let e=[];return this.junk.chunkId?e.concat(ne(this.junk.chunkId),P(this.junk.chunkData.length,this.uInt32),this.junk.chunkData):(this.enforceByteLen_(e),e)}enforceByteLen_(e){e.length%2&&e.push(0)}}function Up(t){let e=[];if(t.length>0)if(t[0].constructor!==Number){e=new Float64Array(t[0].length*t.length);for(let n=0,r=t[0].length,i=0;n<r;n++)for(let l=0,s=t.length;l<s;l++,i++)e[i]=t[l][n]}else e=t;return e}function Wp(t,e,n=Float64Array){let r=[];for(let i=0;i<e;i++)r[i]=new n(t.length/e);for(let i=0;i<e;i++)for(let l=i,s=0;l<t.length;l+=e,s++)r[i][s]=t[l];return r}function Vp(t,e){let n=t*e/8;return!(t<1||n>65535)}function pd(t,e,n){let r=t*(e/8)*n;return!(n<1||r>4294967295)}class Hp extends Bp{constructor(){super(),this.bitDepth="0",this.dataType={bits:0,be:!1},this.WAV_AUDIO_FORMATS={4:17,8:1,"8a":6,"8m":7,16:1,24:1,32:1,"32f":3,64:3}}fromScratch(e,n,r,i,l){l=l||{},this.clearHeaders(),this.newWavFile_(e,n,r,i,l)}fromBuffer(e,n=!0){super.fromBuffer(e,n),this.bitDepthFromFmt_(),this.updateDataType_()}toBuffer(){return this.validateWavHeader_(),super.toBuffer()}getSamples(e=!1,n=Float64Array){let r=new n(this.data.samples.length/(this.dataType.bits/8));return Ht(this.data.samples,this.dataType,r,0,this.data.samples.length),!e&&this.fmt.numChannels>1?Wp(r,this.fmt.numChannels,n):r}getSample(e){if(e=e*(this.dataType.bits/8),e+this.dataType.bits/8>this.data.samples.length)throw new Error("Range error");return Pi(this.data.samples.slice(e,e+this.dataType.bits/8),this.dataType)}setSample(e,n){if(e=e*(this.dataType.bits/8),e+this.dataType.bits/8>this.data.samples.length)throw new Error("Range error");go(n,this.dataType,this.data.samples,e)}getiXML(){return this.iXML.value}setiXML(e){if(typeof e!="string")throw new TypeError("iXML value must be a string.");this.iXML.value=e,this.iXML.chunkId="iXML"}get_PMX(){return this._PMX.value}set_PMX(e){if(typeof e!="string")throw new TypeError("_PMX value must be a string.");this._PMX.value=e,this._PMX.chunkId="_PMX"}newWavFile_(e,n,r,i,l){l.container||(l.container="RIFF"),this.container=l.container,this.bitDepth=r,i=Up(i),this.updateDataType_();let s=this.dataType.bits/8;this.data.samples=new Uint8Array(i.length*s),hd(i,this.dataType,this.data.samples,0),this.makeWavHeader_(r,e,n,s,this.data.samples.length,l),this.data.chunkId="data",this.data.chunkSize=this.data.samples.length,this.validateWavHeader_()}makeWavHeader_(e,n,r,i,l,s){e=="4"?this.createADPCMHeader_(e,n,r,i,l,s):e=="8a"||e=="8m"?this.createALawMulawHeader_(e,n,r,i,l,s):Object.keys(this.WAV_AUDIO_FORMATS).indexOf(e)==-1||n>2?this.createExtensibleHeader_(e,n,r,i,l,s):this.createPCMHeader_(e,n,r,i,l,s)}createPCMHeader_(e,n,r,i,l,s){this.container=s.container,this.chunkSize=36+l,this.format="WAVE",this.bitDepth=e,this.fmt={chunkId:"fmt ",chunkSize:16,audioFormat:this.WAV_AUDIO_FORMATS[e]||65534,numChannels:n,sampleRate:r,byteRate:n*i*r,blockAlign:n*i,bitsPerSample:parseInt(e,10),cbSize:0,validBitsPerSample:0,dwChannelMask:0,subformat:[]}}createADPCMHeader_(e,n,r,i,l,s){this.createPCMHeader_(e,n,r,i,l,s),this.chunkSize=40+l,this.fmt.chunkSize=20,this.fmt.byteRate=4055,this.fmt.blockAlign=256,this.fmt.bitsPerSample=4,this.fmt.cbSize=2,this.fmt.validBitsPerSample=505,this.fact={chunkId:"fact",chunkSize:4,dwSampleLength:l*2}}createExtensibleHeader_(e,n,r,i,l,s){this.createPCMHeader_(e,n,r,i,l,s),this.chunkSize=60+l,this.fmt.chunkSize=40,this.fmt.bitsPerSample=(parseInt(e,10)-1|7)+1,this.fmt.cbSize=22,this.fmt.validBitsPerSample=parseInt(e,10),this.fmt.dwChannelMask=$p(n),this.fmt.subformat=[1,1048576,2852126848,1905997824]}createALawMulawHeader_(e,n,r,i,l,s){this.createPCMHeader_(e,n,r,i,l,s),this.chunkSize=40+l,this.fmt.chunkSize=20,this.fmt.cbSize=2,this.fmt.validBitsPerSample=8,this.fact={chunkId:"fact",chunkSize:4,dwSampleLength:l}}bitDepthFromFmt_(){this.fmt.audioFormat===3&&this.fmt.bitsPerSample===32?this.bitDepth="32f":this.fmt.audioFormat===6?this.bitDepth="8a":this.fmt.audioFormat===7?this.bitDepth="8m":this.bitDepth=this.fmt.bitsPerSample.toString()}validateBitDepth_(){if(!this.WAV_AUDIO_FORMATS[this.bitDepth]){if(parseInt(this.bitDepth,10)>8&&parseInt(this.bitDepth,10)<54)return!0;throw new Error("Invalid bit depth.")}return!0}updateDataType_(){this.dataType={bits:(parseInt(this.bitDepth,10)-1|7)+1,fp:this.bitDepth=="32f"||this.bitDepth=="64",signed:this.bitDepth!="8",be:this.container=="RIFX"},["4","8a","8m"].indexOf(this.bitDepth)>-1&&(this.dataType.bits=8,this.dataType.signed=!1)}validateWavHeader_(){if(this.validateBitDepth_(),!Vp(this.fmt.numChannels,this.fmt.bitsPerSample))throw new Error("Invalid number of channels.");if(!pd(this.fmt.numChannels,this.fmt.bitsPerSample,this.fmt.sampleRate))throw new Error("Invalid sample rate.")}}function $p(t){let e=0;return t===1?e=4:t===2?e=3:t===4?e=51:t===6?e=63:t===8&&(e=1599),e}class Xp extends Hp{getTag(e){let n=this.getTagIndex_(e);return n.TAG!==null?this.LIST[n.LIST].subChunks[n.TAG].value:null}setTag(e,n){e=Zp(e);let r=this.getTagIndex_(e);r.TAG!==null?(this.LIST[r.LIST].subChunks[r.TAG].chunkSize=n.length+1,this.LIST[r.LIST].subChunks[r.TAG].value=n):r.LIST!==null?this.LIST[r.LIST].subChunks.push({chunkId:e,chunkSize:n.length+1,value:n}):(this.LIST.push({chunkId:"LIST",chunkSize:8+n.length+1,format:"INFO",subChunks:[]}),this.LIST[this.LIST.length-1].subChunks.push({chunkId:e,chunkSize:n.length+1,value:n}))}deleteTag(e){let n=this.getTagIndex_(e);return n.TAG!==null?(this.LIST[n.LIST].subChunks.splice(n.TAG,1),!0):!1}listTags(){let e=this.getLISTIndex("INFO"),n={};if(e!==null)for(let r=0,i=this.LIST[e].subChunks.length;r<i;r++)n[this.LIST[e].subChunks[r].chunkId]=this.LIST[e].subChunks[r].value;return n}getLISTIndex(e){for(let n=0,r=this.LIST.length;n<r;n++)if(this.LIST[n].format==e)return n;return null}getTagIndex_(e){let n={LIST:null,TAG:null};for(let r=0,i=this.LIST.length;r<i;r++)if(this.LIST[r].format=="INFO"){n.LIST=r;for(let l=0,s=this.LIST[r].subChunks.length;l<s;l++)if(this.LIST[r].subChunks[l].chunkId==e){n.TAG=l;break}break}return n}}function Zp(t){if(t.constructor!==String)throw new Error("Invalid tag name.");if(t.length<4)for(let e=0,n=4-t.length;e<n;e++)t+=" ";return t}class ju extends Xp{listCuePoints(){let e=this.getCuePoints_();for(let n=0,r=e.length;n<r;n++)e[n].position=e[n].dwSampleOffset/this.fmt.sampleRate*1e3,e[n].dwSampleLength?(e[n].end=e[n].dwSampleLength/this.fmt.sampleRate*1e3,e[n].end+=e[n].position):e[n].end=null,delete e[n].value;return e}setCuePoint(e){this.cue.chunkId="cue ",e.label||(e.label="");let n=this.getCuePoints_();this.clearLISTadtl_(),this.cue.points=[],e.dwSampleOffset=e.position*this.fmt.sampleRate/1e3,e.dwSampleLength=0,e.end&&(e.dwSampleLength=e.end*this.fmt.sampleRate/1e3-e.dwSampleOffset),n.length===0?this.setCuePoint_(e,1):this.setCuePointInOrder_(n,e),this.cue.dwCuePoints=this.cue.points.length}deleteCuePoint(e){this.cue.chunkId="cue ";let n=this.getCuePoints_();this.clearLISTadtl_();let r=this.cue.points.length;this.cue.points=[];for(let i=0;i<r;i++)i+1!==e&&this.setCuePoint_(n[i],i+1);this.cue.dwCuePoints=this.cue.points.length,this.cue.dwCuePoints?this.cue.chunkId="cue ":(this.cue.chunkId="",this.clearLISTadtl_())}updateLabel(e,n){let r=this.getLISTIndex("adtl");if(r!==null)for(let i=0,l=this.LIST[r].subChunks.length;i<l;i++)this.LIST[r].subChunks[i].dwName==e&&(this.LIST[r].subChunks[i].value=n)}getCuePoints_(){let e=[];for(let n=0;n<this.cue.points.length;n++){let r=this.cue.points[n],i=this.getDataForCuePoint_(r.dwName);i.label=i.value?i.value:"",i.dwPosition=r.dwPosition,i.fccChunk=r.fccChunk,i.dwChunkStart=r.dwChunkStart,i.dwBlockStart=r.dwBlockStart,i.dwSampleOffset=r.dwSampleOffset,e.push(i)}return e}getDataForCuePoint_(e){let n=this.getLISTIndex("adtl"),r={};return n!==null&&this.getCueDataFromLIST_(r,n,e),r}getCueDataFromLIST_(e,n,r){for(let i=0,l=this.LIST[n].subChunks.length;i<l;i++)if(this.LIST[n].subChunks[i].dwName==r){let s=this.LIST[n].subChunks[i];e.value=s.value||e.value,e.dwName=s.dwName||0,e.dwSampleLength=s.dwSampleLength||0,e.dwPurposeID=s.dwPurposeID||0,e.dwCountry=s.dwCountry||0,e.dwLanguage=s.dwLanguage||0,e.dwDialect=s.dwDialect||0,e.dwCodePage=s.dwCodePage||0}}setCuePoint_(e,n){this.cue.points.push({dwName:n,dwPosition:e.dwPosition?e.dwPosition:0,fccChunk:e.fccChunk?e.fccChunk:"data",dwChunkStart:e.dwChunkStart?e.dwChunkStart:0,dwBlockStart:e.dwBlockStart?e.dwBlockStart:0,dwSampleOffset:e.dwSampleOffset}),this.setLabl_(e,n)}setCuePointInOrder_(e,n){let r=!1;for(let i=0;i<e.length;i++)e[i].dwSampleOffset>n.dwSampleOffset&&!r?(this.setCuePoint_(n,i+1),this.setCuePoint_(e[i],i+2),r=!0):this.setCuePoint_(e[i],r?i+2:i+1);r||this.setCuePoint_(n,this.cue.points.length+1)}clearLISTadtl_(){for(let e=0,n=this.LIST.length;e<n;e++)this.LIST[e].format=="adtl"&&this.LIST.splice(e)}setLabl_(e,n){let r=this.getLISTIndex("adtl");r===null&&(this.LIST.push({chunkId:"LIST",chunkSize:4,format:"adtl",subChunks:[]}),r=this.LIST.length-1),this.setLabelText_(r,e,n),e.dwSampleLength&&this.setLtxtChunk_(r,e,n)}setLabelText_(e,n,r){this.LIST[e].subChunks.push({chunkId:"labl",chunkSize:4,dwName:r,value:n.label}),this.LIST[e].chunkSize+=12}setLtxtChunk_(e,n,r){this.LIST[e].subChunks.push({chunkId:"ltxt",chunkSize:20,dwName:r,dwSampleLength:n.dwSampleLength,dwPurposeID:n.dwPurposeID||0,dwCountry:n.dwCountry||0,dwLanguage:n.dwLanguage||0,dwDialect:n.dwDialect||0,dwCodePage:n.dwCodePage||0,value:n.label}),this.LIST[e].chunkSize+=28}}class Qp{constructor(e,n,r){this.length_=e,this.scaleFactor_=(e-1)/n,this.interpolate=this.sinc,r.method==="point"?this.interpolate=this.point:r.method==="linear"?this.interpolate=this.linear:r.method==="cubic"&&(this.interpolate=this.cubic),this.tangentFactor_=1-Math.max(0,Math.min(1,r.tension||0)),this.sincFilterSize_=r.sincFilterSize||1,this.kernel_=Kp(r.sincWindow||Gp)}point(e,n){return this.getClippedInput_(Math.round(this.scaleFactor_*e),n)}linear(e,n){e=this.scaleFactor_*e;let r=Math.floor(e);return e-=r,(1-e)*this.getClippedInput_(r,n)+e*this.getClippedInput_(r+1,n)}cubic(e,n){e=this.scaleFactor_*e;let r=Math.floor(e),i=[this.getTangent_(r,n),this.getTangent_(r+1,n)],l=[this.getClippedInput_(r,n),this.getClippedInput_(r+1,n)];e-=r;let s=e*e,o=e*s;return(2*o-3*s+1)*l[0]+(o-2*s+e)*i[0]+(-2*o+3*s)*l[1]+(o-s)*i[1]}sinc(e,n){e=this.scaleFactor_*e;let r=Math.floor(e),i=r-this.sincFilterSize_+1,l=r+this.sincFilterSize_,s=0;for(let o=i;o<=l;o++)s+=this.kernel_(e-o)*this.getClippedInput_(o,n);return s}getTangent_(e,n){return this.tangentFactor_*(this.getClippedInput_(e+1,n)-this.getClippedInput_(e-1,n))/2}getClippedInput_(e,n){return 0<=e&&e<this.length_?n[e]:0}}function Gp(t){return Math.exp(-t/2*t/2)}function Kp(t){return function(e){return Yp(e)*t(e)}}function Yp(t){return t===0?1:Math.sin(Math.PI*t)/(Math.PI*t)}class Jp{constructor(e,n,r){let i=2*Math.PI*r/n,l=0;this.filters=[];for(let s=0;s<=e;s++)s-e/2===0?this.filters[s]=i:(this.filters[s]=Math.sin(i*(s-e/2))/(s-e/2),this.filters[s]*=.54-.46*Math.cos(2*Math.PI*s/e)),l=l+this.filters[s];for(let s=0;s<=e;s++)this.filters[s]/=l;this.z=this.initZ_()}filter(e){this.z.buf[this.z.pointer]=e;let n=0;for(let r=0,i=this.z.buf.length;r<i;r++)n+=this.filters[r]*this.z.buf[(this.z.pointer+r)%this.z.buf.length];return this.z.pointer=(this.z.pointer+1)%this.z.buf.length,n}reset(){this.z=this.initZ_()}initZ_(){let e=[];for(let n=0;n<this.filters.length-1;n++)e.push(0);return{buf:e,pointer:0}}}class qp{constructor(e,n,r){let i=[];for(let l=0;l<e;l++)i.push(this.getCoeffs_({Fs:n,Fc:r,Q:.5/Math.sin(Math.PI/(e*2)*(l+.5))}));this.stages=[];for(let l=0;l<i.length;l++)this.stages[l]={b0:i[l].b[0],b1:i[l].b[1],b2:i[l].b[2],a1:i[l].a[0],a2:i[l].a[1],k:i[l].k,z:[0,0]}}filter(e){let n=e;for(let r=0,i=this.stages.length;r<i;r++)n=this.runStage_(r,n);return n}getCoeffs_(e){let n={};n.a=[],n.b=[];let r=this.preCalc_(e,n);return n.k=1,n.b.push((1-r.cw)/(2*r.a0)),n.b.push(2*n.b[0]),n.b.push(n.b[0]),n}preCalc_(e,n){let r={},i=2*Math.PI*e.Fc/e.Fs;return r.alpha=Math.sin(i)/(2*e.Q),r.cw=Math.cos(i),r.a0=1+r.alpha,n.a0=r.a0,n.a.push(-2*r.cw/r.a0),n.k=1,n.a.push((1-r.alpha)/r.a0),r}runStage_(e,n){let r=n*this.stages[e].k-this.stages[e].a1*this.stages[e].z[0]-this.stages[e].a2*this.stages[e].z[1],i=this.stages[e].b0*r+this.stages[e].b1*this.stages[e].z[0]+this.stages[e].b2*this.stages[e].z[1];return this.stages[e].z[1]=this.stages[e].z[0],this.stages[e].z[0]=r,i}reset(){for(let e=0;e<this.stages.length;e++)this.stages[e].z=[0,0]}}const bp={point:!1,linear:!1,cubic:!0,sinc:!0},Bu={IIR:16,FIR:71},eg={IIR:qp,FIR:Jp};function Uu(t,e,n,r=null){r=r||{};let i=(n-e)/e+1,l=new Float64Array(t.length*i);r.method=r.method||"cubic";let s=new Qp(t.length,l.length,{method:r.method,tension:r.tension||0,sincFilterSize:r.sincFilterSize||6,sincWindow:r.sincWindow||void 0,clip:r.clip||"mirror"});if(r.LPF===void 0&&(r.LPF=bp[r.method]),r.LPF){r.LPFType=r.LPFType||"IIR";const o=eg[r.LPFType];if(n>e){let u=new o(r.LPForder||Bu[r.LPFType],n,e/2);tg(t,l,s,u)}else{let u=new o(r.LPForder||Bu[r.LPFType],e,n/2);ng(t,l,s,u)}}else gd(t,l,s);return l}function gd(t,e,n){for(let r=0,i=e.length;r<i;r++)e[r]=n.interpolate(r,t)}function tg(t,e,n,r){for(let i=0,l=e.length;i<l;i++)e[i]=r.filter(n.interpolate(i,t));r.reset();for(let i=e.length-1;i>=0;i--)e[i]=r.filter(e[i])}function ng(t,e,n,r){for(let i=0,l=t.length;i<l;i++)t[i]=r.filter(t[i]);r.reset();for(let i=t.length-1;i>=0;i--)t[i]=r.filter(t[i]);gd(t,e,n)}class rg extends ju{toRIFF(){let e=new Float64Array(Zn(this.data.samples.length,this.dataType.bits/8));Ht(this.data.samples,this.dataType,e,0,this.data.samples.length),this.fromExisting_(this.fmt.numChannels,this.fmt.sampleRate,this.bitDepth,e,{container:"RIFF"})}toRIFX(){let e=new Float64Array(Zn(this.data.samples.length,this.dataType.bits/8));Ht(this.data.samples,this.dataType,e,0,this.data.samples.length),this.fromExisting_(this.fmt.numChannels,this.fmt.sampleRate,this.bitDepth,e,{container:"RIFX"})}toIMAADPCM(){if(this.fmt.sampleRate!==8e3)throw new Error("Only 8000 Hz files can be compressed as IMA-ADPCM.");if(this.fmt.numChannels!==1)throw new Error("Only mono files can be compressed as IMA-ADPCM.");{this.assure16Bit_();let e=new Int16Array(Zn(this.data.samples.length,2));Ht(this.data.samples,this.dataType,e,0,this.data.samples.length),this.fromExisting_(this.fmt.numChannels,this.fmt.sampleRate,"4",fp(e),{container:this.correctContainer_()})}}fromIMAADPCM(e="16"){this.fromExisting_(this.fmt.numChannels,this.fmt.sampleRate,"16",pp(this.data.samples,this.fmt.blockAlign),{container:this.correctContainer_()}),e!="16"&&this.toBitDepth(e)}toALaw(){this.assure16Bit_();let e=new Int16Array(Zn(this.data.samples.length,2));Ht(this.data.samples,this.dataType,e,0,this.data.samples.length),this.fromExisting_(this.fmt.numChannels,this.fmt.sampleRate,"8a",Cp(e),{container:this.correctContainer_()})}fromALaw(e="16"){this.fromExisting_(this.fmt.numChannels,this.fmt.sampleRate,"16",_p(this.data.samples),{container:this.correctContainer_()}),e!="16"&&this.toBitDepth(e)}toMuLaw(){this.assure16Bit_();let e=new Int16Array(Zn(this.data.samples.length,2));Ht(this.data.samples,this.dataType,e,0,this.data.samples.length),this.fromExisting_(this.fmt.numChannels,this.fmt.sampleRate,"8m",Mp(e),{container:this.correctContainer_()})}fromMuLaw(e="16"){this.fromExisting_(this.fmt.numChannels,this.fmt.sampleRate,"16",Fp(this.data.samples),{container:this.correctContainer_()}),e!="16"&&this.toBitDepth(e)}toBitDepth(e,n=!0){let r=e,i=this.bitDepth;n||(e!="32f"&&(r=this.dataType.bits.toString()),i=""+this.dataType.bits),this.assureUncompressed_();let l=this.getSamples(!0),s=new Float64Array(l.length);up(l,i,s,r),this.fromExisting_(this.fmt.numChannels,this.fmt.sampleRate,e,s,{container:this.correctContainer_()})}toSampleRate(e,n){this.validateResample_(e);let r=this.getSamples(),i=[];if(r.constructor===Float64Array)i=Uu(r,this.fmt.sampleRate,e,n);else for(let l=0;l<r.length;l++)i.push(Uu(r[l],this.fmt.sampleRate,e,n));this.fromExisting_(this.fmt.numChannels,e,this.bitDepth,i,{container:this.correctContainer_()})}validateResample_(e){if(pd(this.fmt.numChannels,this.fmt.bitsPerSample,e)){if(["4","8a","8m"].indexOf(this.bitDepth)>-1)throw new Error("wavefile can't change the sample rate of compressed files.")}else throw new Error("Invalid sample rate.")}assure16Bit_(){this.assureUncompressed_(),this.bitDepth!="16"&&this.toBitDepth("16")}assureUncompressed_(){this.bitDepth=="8a"?this.fromALaw():this.bitDepth=="8m"?this.fromMuLaw():this.bitDepth=="4"&&this.fromIMAADPCM()}correctContainer_(){return this.container=="RF64"?"RIFF":this.container}fromExisting_(e,n,r,i,l){let s=new ju;Object.assign(this.fmt,s.fmt),Object.assign(this.fact,s.fact),Object.assign(this.ds64,s.ds64),Object.assign(this.data,s.data),this.newWavFile_(e,n,r,i,l)}}function Zn(t,e){let n=t/e;return n%2&&n++,n}class Wu extends rg{constructor(e){super(),e&&this.fromBuffer(e)}fromBase64(e){this.fromBuffer(op(e))}toBase64(){return sp(this.toBuffer())}toDataURI(){return"data:audio/wav;base64,"+this.toBase64()}fromDataURI(e){this.fromBase64(e.replace("data:audio/wav;base64,",""))}}function vs(){return vs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},vs.apply(null,arguments)}function Vu(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ys(t,e){return ys=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ys(t,e)}function ig(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ys(t,e)}var Hu=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function lg(t,e){return!!(t===e||Hu(t)&&Hu(e))}function sg(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!lg(t[n],e[n]))return!1;return!0}function kl(t,e){e===void 0&&(e=sg);var n,r=[],i,l=!1;function s(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return l&&n===this&&e(o,r)||(i=t.apply(this,o),l=!0,n=this,r=o),i}return s}var og=typeof performance=="object"&&typeof performance.now=="function",$u=og?function(){return performance.now()}:function(){return Date.now()};function Xu(t){cancelAnimationFrame(t.id)}function ug(t,e){var n=$u();function r(){$u()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var wl=-1;function Zu(t){if(t===void 0&&(t=!1),wl===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),wl=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return wl}var rn=null;function Qu(t){if(t===void 0&&(t=!1),rn===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?rn="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?rn="negative":rn="positive-ascending"),document.body.removeChild(e),rn}return rn}var ag=150,cg=function(e,n){return e};function dg(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,l=t.getOffsetForIndexAndAlignment,s=t.getStartIndexForOffset,o=t.getStopIndexForStartIndex,u=t.initInstanceProps,a=t.shouldResetStyleCacheOnItemSizeChange,p=t.validateProps;return e=function(m){ig(g,m);function g(y){var f;return f=m.call(this,y)||this,f._instanceProps=u(f.props,Vu(f)),f._outerRef=void 0,f._resetIsScrollingTimeoutId=null,f.state={instance:Vu(f),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof f.props.initialScrollOffset=="number"?f.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},f._callOnItemsRendered=void 0,f._callOnItemsRendered=kl(function(S,d,c,h){return f.props.onItemsRendered({overscanStartIndex:S,overscanStopIndex:d,visibleStartIndex:c,visibleStopIndex:h})}),f._callOnScroll=void 0,f._callOnScroll=kl(function(S,d,c){return f.props.onScroll({scrollDirection:S,scrollOffset:d,scrollUpdateWasRequested:c})}),f._getItemStyle=void 0,f._getItemStyle=function(S){var d=f.props,c=d.direction,h=d.itemSize,v=d.layout,w=f._getItemStyleCache(a&&h,a&&v,a&&c),C;if(w.hasOwnProperty(S))C=w[S];else{var _=n(f.props,S,f._instanceProps),L=i(f.props,S,f._instanceProps),O=c==="horizontal"||v==="horizontal",N=c==="rtl",le=O?_:0;w[S]=C={position:"absolute",left:N?void 0:le,right:N?le:void 0,top:O?0:_,height:O?"100%":L,width:O?L:"100%"}}return C},f._getItemStyleCache=void 0,f._getItemStyleCache=kl(function(S,d,c){return{}}),f._onScrollHorizontal=function(S){var d=S.currentTarget,c=d.clientWidth,h=d.scrollLeft,v=d.scrollWidth;f.setState(function(w){if(w.scrollOffset===h)return null;var C=f.props.direction,_=h;if(C==="rtl")switch(Qu()){case"negative":_=-h;break;case"positive-descending":_=v-c-h;break}return _=Math.max(0,Math.min(_,v-c)),{isScrolling:!0,scrollDirection:w.scrollOffset<_?"forward":"backward",scrollOffset:_,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._onScrollVertical=function(S){var d=S.currentTarget,c=d.clientHeight,h=d.scrollHeight,v=d.scrollTop;f.setState(function(w){if(w.scrollOffset===v)return null;var C=Math.max(0,Math.min(v,h-c));return{isScrolling:!0,scrollDirection:w.scrollOffset<C?"forward":"backward",scrollOffset:C,scrollUpdateWasRequested:!1}},f._resetIsScrollingDebounced)},f._outerRefSetter=function(S){var d=f.props.outerRef;f._outerRef=S,typeof d=="function"?d(S):d!=null&&typeof d=="object"&&d.hasOwnProperty("current")&&(d.current=S)},f._resetIsScrollingDebounced=function(){f._resetIsScrollingTimeoutId!==null&&Xu(f._resetIsScrollingTimeoutId),f._resetIsScrollingTimeoutId=ug(f._resetIsScrolling,ag)},f._resetIsScrolling=function(){f._resetIsScrollingTimeoutId=null,f.setState({isScrolling:!1},function(){f._getItemStyleCache(-1,null)})},f}g.getDerivedStateFromProps=function(f,S){return hg(f,S),p(f),null};var k=g.prototype;return k.scrollTo=function(f){f=Math.max(0,f),this.setState(function(S){return S.scrollOffset===f?null:{scrollDirection:S.scrollOffset<f?"forward":"backward",scrollOffset:f,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},k.scrollToItem=function(f,S){S===void 0&&(S="auto");var d=this.props,c=d.itemCount,h=d.layout,v=this.state.scrollOffset;f=Math.max(0,Math.min(f,c-1));var w=0;if(this._outerRef){var C=this._outerRef;h==="vertical"?w=C.scrollWidth>C.clientWidth?Zu():0:w=C.scrollHeight>C.clientHeight?Zu():0}this.scrollTo(l(this.props,f,S,v,this._instanceProps,w))},k.componentDidMount=function(){var f=this.props,S=f.direction,d=f.initialScrollOffset,c=f.layout;if(typeof d=="number"&&this._outerRef!=null){var h=this._outerRef;S==="horizontal"||c==="horizontal"?h.scrollLeft=d:h.scrollTop=d}this._callPropsCallbacks()},k.componentDidUpdate=function(){var f=this.props,S=f.direction,d=f.layout,c=this.state,h=c.scrollOffset,v=c.scrollUpdateWasRequested;if(v&&this._outerRef!=null){var w=this._outerRef;if(S==="horizontal"||d==="horizontal")if(S==="rtl")switch(Qu()){case"negative":w.scrollLeft=-h;break;case"positive-ascending":w.scrollLeft=h;break;default:var C=w.clientWidth,_=w.scrollWidth;w.scrollLeft=_-C-h;break}else w.scrollLeft=h;else w.scrollTop=h}this._callPropsCallbacks()},k.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Xu(this._resetIsScrollingTimeoutId)},k.render=function(){var f=this.props,S=f.children,d=f.className,c=f.direction,h=f.height,v=f.innerRef,w=f.innerElementType,C=f.innerTagName,_=f.itemCount,L=f.itemData,O=f.itemKey,N=O===void 0?cg:O,le=f.layout,Be=f.outerElementType,pt=f.outerTagName,gt=f.style,Pr=f.useIsScrolling,tt=f.width,Bt=this.state.isScrolling,T=c==="horizontal"||le==="horizontal",A=T?this._onScrollHorizontal:this._onScrollVertical,F=this._getRangeToRender(),W=F[0],G=F[1],nt=[];if(_>0)for(var te=W;te<=G;te++)nt.push(E.createElement(S,{data:L,key:N(te,L),index:te,isScrolling:Pr?Bt:void 0,style:this._getItemStyle(te)}));var mt=r(this.props,this._instanceProps);return E.createElement(Be||pt||"div",{className:d,onScroll:A,ref:this._outerRefSetter,style:vs({position:"relative",height:h,width:tt,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:c},gt)},E.createElement(w||C||"div",{children:nt,ref:v,style:{height:T?"100%":mt,pointerEvents:Bt?"none":void 0,width:T?mt:"100%"}}))},k._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var f=this.props.itemCount;if(f>0){var S=this._getRangeToRender(),d=S[0],c=S[1],h=S[2],v=S[3];this._callOnItemsRendered(d,c,h,v)}}if(typeof this.props.onScroll=="function"){var w=this.state,C=w.scrollDirection,_=w.scrollOffset,L=w.scrollUpdateWasRequested;this._callOnScroll(C,_,L)}},k._getRangeToRender=function(){var f=this.props,S=f.itemCount,d=f.overscanCount,c=this.state,h=c.isScrolling,v=c.scrollDirection,w=c.scrollOffset;if(S===0)return[0,0,0,0];var C=s(this.props,w,this._instanceProps),_=o(this.props,C,w,this._instanceProps),L=!h||v==="backward"?Math.max(1,d):1,O=!h||v==="forward"?Math.max(1,d):1;return[Math.max(0,C-L),Math.max(0,Math.min(S-1,_+O)),C,_]},g}(E.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var hg=function(e,n){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,n.instance},fg=dg({getItemOffset:function(e,n){var r=e.itemSize;return n*r},getItemSize:function(e,n){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var n=e.itemCount,r=e.itemSize;return r*n},getOffsetForIndexAndAlignment:function(e,n,r,i,l,s){var o=e.direction,u=e.height,a=e.itemCount,p=e.itemSize,m=e.layout,g=e.width,k=o==="horizontal"||m==="horizontal",y=k?g:u,f=Math.max(0,a*p-y),S=Math.min(f,n*p),d=Math.max(0,n*p-y+p+s);switch(r==="smart"&&(i>=d-y&&i<=S+y?r="auto":r="center"),r){case"start":return S;case"end":return d;case"center":{var c=Math.round(d+(S-d)/2);return c<Math.ceil(y/2)?0:c>f+Math.floor(y/2)?f:c}case"auto":default:return i>=d&&i<=S?i:i<d?d:S}},getStartIndexForOffset:function(e,n){var r=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(e,n,r){var i=e.direction,l=e.height,s=e.itemCount,o=e.itemSize,u=e.layout,a=e.width,p=i==="horizontal"||u==="horizontal",m=n*o,g=p?a:l,k=Math.ceil((g+r-m)/o);return Math.max(0,Math.min(s-1,n+k-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});E.memo(({segment:t,index:e,onPlay:n,onDownload:r,onTranscribe:i})=>{const l=`${(t.endTime-t.startTime)*100}%`,s=`${t.startTime*100}%`,o=t.isMerged?"bg-purple-500 opacity-60":t.isProcessed?"bg-blue-500 opacity-40":"bg-gray-500 opacity-40";return I.jsxs("div",{className:`absolute h-full ${o} rounded-md transition-all duration-200`,style:{left:s,width:l,zIndex:t.isMerged?2:1},title:`${t.isMerged?"Merged: ":""}${t.startTime.toFixed(2)}s - ${t.endTime.toFixed(2)}s`,children:[t.isMerged&&I.jsxs("div",{className:"absolute -top-5 left-0 text-xs text-purple-600 font-bold",children:["Merged (",t.mergedCount,")"]}),t.transcription&&I.jsx("div",{className:"absolute -bottom-6 left-0 text-xs text-gray-600 dark:text-gray-300 whitespace-nowrap overflow-hidden max-w-full",children:typeof t.transcription=="string"?t.transcription:t.transcription.text||t.transcription.toString()})]})});const pg=E.memo(({index:t,style:e,data:n})=>{const{segments:r,onPlay:i,onDownload:l,onTranscribe:s}=n,o=r[t];return I.jsxs("div",{style:e,className:`flex flex-col p-2 rounded ${o.isMerged?"bg-purple-100 dark:bg-purple-900":"bg-white dark:bg-gray-700"}`,children:[I.jsxs("div",{className:"flex items-center space-x-4",children:[I.jsxs("span",{className:"text-sm",children:[o.isMerged?"🔄 ":"",`Segment ${t+1}: ${o.startTime.toFixed(2)}s - ${o.endTime.toFixed(2)}s (${(o.endTime-o.startTime).toFixed(2)}s)`]}),I.jsx("button",{onClick:()=>i(o),className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Play"}),I.jsx("button",{onClick:()=>l(o,t+1),className:"px-2 py-1 bg-green-500 text-white rounded hover:bg-green-600",children:"Download"}),I.jsx("button",{onClick:()=>s(o),className:"px-2 py-1 bg-purple-500 text-white rounded hover:bg-purple-600",disabled:o.isProcessed,children:o.isProcessed?"Transcribed":"Transcribe"})]}),o.transcription&&I.jsx("div",{className:"mt-2 ml-4 text-sm",children:typeof o.transcription=="string"?o.transcription:o.transcription.text||o.transcription.toString()})]})}),md=E.memo(({segments:t,worker:e,language:n})=>{E.useRef([]);const r=E.useCallback(async o=>{if(!o.audioData||o.audioData.length===0){console.error("Invalid segment audio data");return}try{const u=new Wu;u.fromScratch(1,o.sampleRate,"32f",o.audioData),u.toBitDepth("16");const a=u.toBuffer(),p=new AudioContext,m=await p.decodeAudioData(a.buffer),g=p.createBufferSource();g.buffer=m,g.connect(p.destination),g.start()}catch(u){console.error("Error playing segment:",u)}},[]),i=E.useCallback((o,u)=>{try{const a=new Wu;a.fromScratch(1,o.sampleRate,"32f",o.audioData),a.toBitDepth("16");const p=a.toBuffer(),m=new Blob([p],{type:"audio/wav"}),g=URL.createObjectURL(m),k=document.createElement("a");k.href=g,k.download=`segment_${u}_${o.startTime.toFixed(2)}-${o.endTime.toFixed(2)}.wav`,document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(g)}catch(a){console.error("Error downloading segment:",a)}},[]),l=E.useCallback(o=>{e&&e.postMessage({type:"transcribe",data:{audioData:o.audioData,segmentId:o.id,language:n,isMerged:o.isMerged}})},[e,n]),s=E.useMemo(()=>({segments:t,onPlay:r,onDownload:i,onTranscribe:l}),[t,r,i,l]);return I.jsxs("div",{className:"mt-4 p-4 bg-gray-100 dark:bg-gray-800 rounded-lg",children:[I.jsxs("h3",{className:"font-semibold mb-2",children:["Detected Speech Segments (",t.length,")"]}),I.jsx(fg,{height:400,itemCount:t.length,itemSize:80,width:"100%",itemData:s,children:pg})]})});md.displayName="AudioSegmentsWidget";function gg(t){return t=t.toLowerCase(),(t.match(/\w+.?/g)||[]).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("")}const Gu={en:"english",tr:"turkish",zh:"chinese",de:"german",es:"spanish/castilian",ru:"russian",ko:"korean",fr:"french",ja:"japanese",pt:"portuguese",pl:"polish",ca:"catalan/valencian",nl:"dutch/flemish",ar:"arabic",sv:"swedish",it:"italian",id:"indonesian",hi:"hindi",fi:"finnish",vi:"vietnamese",he:"hebrew",uk:"ukrainian",el:"greek",ms:"malay",cs:"czech",ro:"romanian/moldavian/moldovan",da:"danish",hu:"hungarian",ta:"tamil",no:"norwegian",th:"thai",ur:"urdu",hr:"croatian",bg:"bulgarian",lt:"lithuanian",la:"latin",mi:"maori",ml:"malayalam",cy:"welsh",sk:"slovak",te:"telugu",fa:"persian",lv:"latvian",bn:"bengali",sr:"serbian",az:"azerbaijani",sl:"slovenian",kn:"kannada",et:"estonian",mk:"macedonian",br:"breton",eu:"basque",is:"icelandic",hy:"armenian",ne:"nepali",mn:"mongolian",bs:"bosnian",kk:"kazakh",sq:"albanian",sw:"swahili",gl:"galician",mr:"marathi",pa:"punjabi/panjabi",si:"sinhala/sinhalese",km:"khmer",sn:"shona",yo:"yoruba",so:"somali",af:"afrikaans",oc:"occitan",ka:"georgian",be:"belarusian",tg:"tajik",sd:"sindhi",gu:"gujarati",am:"amharic",yi:"yiddish",lo:"lao",uz:"uzbek",fo:"faroese",ht:"haitian creole/haitian",ps:"pashto/pushto",tk:"turkmen",nn:"nynorsk",mt:"maltese",sa:"sanskrit",lb:"luxembourgish/letzeburgesch",my:"myanmar/burmese",bo:"tibetan",tl:"tagalog",mg:"malagasy",as:"assamese",tt:"tatar",haw:"hawaiian",ln:"lingala",ha:"hausa",ba:"bashkir",jw:"javanese",su:"sundanese"};function mg({language:t,setLanguage:e,disabled:n}){return I.jsx("select",{className:`border rounded-lg p-2 ${n?"opacity-50 cursor-not-allowed":""}`,value:t,onChange:r=>e(r.target.value),disabled:n,title:n?"Language locked to English for this model":"Select language",children:Object.keys(Gu).map((r,i)=>I.jsx("option",{value:r,children:Object.values(Gu).map(gg)[i]},r))})}const vd={"Whisper Small":"onnx-community/whisper-small","Whisper Base":"onnx-community/whisper-base","Whisper Tiny":"onnx-community/whisper-tiny","Whisper Small En":"onnx-community/whisper-small.en","Whisper Base En":"onnx-community/whisper-base.en","Whisper Tiny En":"onnx-community/whisper-tiny.en","Whisper Base Tr":"ysdede/whisper-base-dsntt1-tr-onnx","Whisper Small Tr":"ysdede/whisper-small-dsntt1-tr-onnx"};function vg({model:t,setModel:e}){return I.jsx("select",{className:"border rounded-lg p-2 mr-2",value:t,onChange:n=>e(n.target.value),children:Object.entries(vd).map(([n,r])=>I.jsx("option",{value:r,children:n},r))})}const yg="data:text/javascript;base64,Y2xhc3MgQXVkaW9Qcm9jZXNzb3IgZXh0ZW5kcyBBdWRpb1dvcmtsZXRQcm9jZXNzb3IgewogICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgc3VwZXIoKTsKICAgICAgICB0aGlzLmJ1ZmZlclNpemUgPSAxNjAwOwogICAgICAgIHRoaXMuYnVmZmVyID0gbmV3IEZsb2F0MzJBcnJheSh0aGlzLmJ1ZmZlclNpemUpOwogICAgICAgIHRoaXMuYnVmZmVySW5kZXggPSAwOwogICAgICAgIAogICAgICAgIHRoaXMubWF4VmFsdWVzID0gW107CiAgICAgICAgdGhpcy5zbWFMZW5ndGggPSA2OwogICAgICAgIHRoaXMuc2lsZW5jZUNvdW50ZXIgPSAwOwogICAgICAgIHRoaXMuc2lsZW5jZVRocmVzaG9sZCA9IDg7CiAgICB9CgogICAgY2FsY3VsYXRlTWF4RW5lcmd5KGJ1ZmZlcikgewogICAgICAgIGNvbnN0IG1heEFic1ZhbHVlID0gTWF0aC5tYXgoLi4uQXJyYXkuZnJvbShidWZmZXIpLm1hcChNYXRoLmFicykpOwogICAgICAgIHRoaXMubWF4VmFsdWVzLnB1c2gobWF4QWJzVmFsdWUpOwogICAgICAgIAogICAgICAgIGlmICh0aGlzLm1heFZhbHVlcy5sZW5ndGggPiB0aGlzLnNtYUxlbmd0aCkgewogICAgICAgICAgICB0aGlzLm1heFZhbHVlcy5zaGlmdCgpOwogICAgICAgIH0KICAgICAgICAKICAgICAgICBjb25zdCBzdW0gPSB0aGlzLm1heFZhbHVlcy5yZWR1Y2UoKGFjYywgdmFsKSA9PiBhY2MgKyB2YWwsIDApOwogICAgICAgIHJldHVybiAoc3VtIC8gdGhpcy5tYXhWYWx1ZXMubGVuZ3RoKTsKICAgIH0KCiAgICBwcm9jZXNzKGlucHV0cywgb3V0cHV0cykgewogICAgICAgIGNvbnN0IGlucHV0ID0gaW5wdXRzWzBdOwogICAgICAgIGNvbnN0IGNoYW5uZWwgPSBpbnB1dFswXTsKCiAgICAgICAgaWYgKCFjaGFubmVsKSByZXR1cm4gdHJ1ZTsKCiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGFubmVsLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIHRoaXMuYnVmZmVyW3RoaXMuYnVmZmVySW5kZXgrK10gPSBjaGFubmVsW2ldOwoKICAgICAgICAgICAgaWYgKHRoaXMuYnVmZmVySW5kZXggPj0gdGhpcy5idWZmZXJTaXplKSB7CiAgICAgICAgICAgICAgICBjb25zdCBlbmVyZ3kgPSB0aGlzLmNhbGN1bGF0ZU1heEVuZXJneSh0aGlzLmJ1ZmZlcik7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIHRoaXMucG9ydC5wb3N0TWVzc2FnZSh7CiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2F1ZGlvX2RhdGEnLAogICAgICAgICAgICAgICAgICAgIGF1ZGlvRGF0YTogdGhpcy5idWZmZXIuc2xpY2UoKSwKICAgICAgICAgICAgICAgICAgICBlbmVyZ3k6IGVuZXJneQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgIHRoaXMuYnVmZmVySW5kZXggPSAwOwogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gdHJ1ZTsKICAgIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ2F1ZGlvLXByb2Nlc3NvcicsIEF1ZGlvUHJvY2Vzc29yKTsg",St=16e3,Sg=100,kg=2*Sg,wg=async t=>{try{const e=t.getAudioTracks()[0];if(!e){console.warn("No audio track found");return}const n=e.getConstraints();console.log("Current constraints:",n);const r={autoGainControl:!1,echoCancellation:!1,noiseSuppression:!1,channelCount:1,sampleRate:St};await e.applyConstraints({advanced:[r]});const i=e.getConstraints();console.log("Automatically unsetting gain!",{audio:!0,initial:n,applied:r,final:i});const l=e.getSettings();console.log("Track settings after constraints:",l)}catch(e){console.warn("Failed to disable auto gain:",e)}};function Ig(){const t=E.useRef(null),e=E.useRef(null),n=E.useRef(null),r=E.useRef(null),i=E.useRef(null);E.useRef(null),E.useRef(null);const l=E.useRef(null);E.useRef(0),E.useRef(0),E.useRef(null);const[s,o]=E.useState("initialized"),[u,a]=E.useState(""),[p,m]=E.useState([]),[g,k]=E.useState(!1),[y,f]=E.useState(!1),[S,d]=E.useState(.125),[c,h]=E.useState(.6),[v,w]=E.useState(.2),[C,_]=E.useState(2),[L,O]=E.useState(1.2),[N,le]=E.useState(.3),[Be,pt]=E.useState(.3),[gt,Pr]=E.useState(.4),[tt,Bt]=E.useState(.6),[T,A]=E.useState(null),[F,W]=E.useState([]);E.useState("");const[G,nt]=E.useState(null),[te,mt]=E.useState("en"),[Ge,vt]=E.useState(""),[vo,yd]=E.useState([]),[Xi,Sd]=E.useState(25),[Zi,kd]=E.useState(Object.values(vd)[0]);E.useEffect(()=>(console.log("Initializing AudioManager"),U.initialize({sampleRate:St,onSegmentDetected:M=>{W(Z=>[...Z,M])}}).catch(M=>{console.error("Failed to initialize AudioManager:",M)}),U.updateParameters({threshold:S,silenceLength:c,speechHangover:v,energyScale:C,hysteresisRatio:L,minSpeechDuration:N}),()=>{U.reset()}),[]);const wd=async()=>{try{await U.startAudioContext();const M=await navigator.mediaDevices.getUserMedia({audio:{autoGainControl:!1,echoCancellation:!1,noiseSuppression:!1,channelCount:1,sampleRate:St}});await wg(M),A(M),await U.audioContext.audioWorklet.addModule(yg);const Z=U.audioContext.createMediaStreamSource(M),V=U.audioContext.createGain();V.gain.value=1;const j=new AudioWorkletNode(U.audioContext,"audio-processor",{numberOfInputs:1,numberOfOutputs:1,processorOptions:{sampleRate:St}});Z.connect(V),V.connect(j),j.port.onmessage=_e=>{if(_e.data.type==="audio_data"){const Se=_e.data.audioData,On=_e.data.energy;U.processNewChunk(Se,On)}},j.connect(U.audioContext.destination),f(!0),n.current=U.audioContext}catch(M){console.error("Failed to start audio:",M),M.name==="NotAllowedError"?console.error("Microphone permission denied"):M.name==="NotFoundError"?console.error("No microphone found"):console.error("Error details:",{name:M.name,message:M.message,stack:M.stack})}},Id=E.useCallback(()=>{Fe("Reset requested"),e.current&&(e.current.state==="recording"&&e.current.stop(),U.reset(),setTimeout(()=>{if(s==="ready"&&e.current)try{e.current.start(),Fe("Started new recording after reset")}catch(M){Fe("Failed to start after reset: "+M.message,"error")}},100))},[s]);E.useEffect(()=>()=>{n.current&&n.current.close(),T&&T.getTracks().forEach(M=>M.stop()),U.reset()},[T]);const Fe=E.useCallback((M,Z="info")=>{Z==="error"?console.error(M):console.log(M)},[]);E.useEffect(()=>{i.current=Fe},[Fe]),E.useEffect(()=>{if(!r.current){console.log("Creating AudioSegmentProcessor...");const M=(Z,V)=>{var j;console.log("AudioProcessor:",Z,V),(j=i.current)==null||j.call(i,Z,"info")};r.current=new ud({logger:M,sampleRate:St,energyThreshold:S,minSpeechDuration:.1,windowSize:256,minSilenceBetween:c,speechHangover:v}),r.current.log("Test message from initialization",{test:"value"}),Fe("AudioSegmentProcessor initialized",{threshold:S,silenceLength:c,hangover:v})}},[]),E.useEffect(()=>{r.current&&(r.current.options.energyThreshold=S,r.current.options.minSilenceBetween=c,r.current.options.speechHangover=v,Fe("Updated processor settings",{threshold:S,silenceLength:c,hangover:v}))},[S,c,v]),E.useEffect(()=>{if(s==="ready"&&y){Fe("Starting periodic buffer processing");let M=!0,Z=0;const V=setInterval(()=>{if(!(!r.current||!l.current||!M))try{const j=l.current;if(j.length===Z)return;const _e=15*St;let Se=0;if(F.length>0){const Dn=F[F.length-1];Se=Math.floor(Dn.endTime*St)}const On=j.slice(Math.max(j.length-_e,Se),j.length);if(On.length>0){const Ut=r.current.processAudioData(On,Se/St).map(Ke=>new od(Ke));Ut.length>0&&(Fe("Created speech segments",{count:Ut.length,segments:Ut.map(Ke=>({start:Ke.startTime.toFixed(2),end:Ke.endTime.toFixed(2),duration:Ke.getDuration().toFixed(2)}))}),W(Ke=>[...Ke,...Ut]))}Z=j.length}catch(j){Fe("Error processing buffer: "+j.message,"error"),console.error("Processing error:",j)}},500);return()=>{M=!1,clearInterval(V)}}},[s,y,F]),E.useEffect(()=>{r.current&&(r.current.options.maxSilenceWithinSpeech=Be,Fe("Updated max silence within speech",{value:Be}))},[Be]),E.useEffect(()=>{r.current&&(r.current.options.endingSpeechTolerance=gt,r.current.options.endingEnergyThreshold=tt,Fe("Updated ending speech parameters",{tolerance:gt,threshold:tt}))},[gt,tt]),E.useEffect(()=>{r.current&&(r.current.options={...r.current.options,energyThreshold:S,minSilenceBetween:c,speechHangover:v,energyScale:C,hysteresisRatio:L,minSpeechDuration:N})},[S,c,v,C,L,N]),E.useEffect(()=>{const M=U.subscribe((Z,V)=>{switch(Z){case"segmentsUpdated":W(V.map(j=>({...j,startTime:j.startTime,endTime:j.endTime,isMerged:j.isMerged||!1,isPartOfMerged:j.isPartOfMerged||!1,isProcessed:j.isProcessed||!1,mergedId:j.mergedId,energy:j.energy})));break}});return()=>M()},[]),E.useEffect(()=>()=>{n.current&&n.current.close(),T&&T.getTracks().forEach(M=>M.stop())},[T]),E.useEffect(()=>{const M=vo.filter(Z=>Z.isMerged||!Z.isPartOfMerged).map(Z=>Z.text);vt(M.join(` | |
`))},[vo]),E.useEffect(()=>{U.updateParameters({minEnergyIntegral:Xi})},[Xi]),E.useEffect(()=>{if(!t.current||!y||g||s!=="ready")return;const M=setInterval(()=>{U.segments.filter(V=>!V.isProcessed&&!V.isPartOfMerged).forEach(V=>{if(!V.audioData){console.warn("Segment has no audio data:",V);return}V.isProcessed=!0,t.current.postMessage({type:"transcribe",data:{audioData:V.audioData,language:te,segmentId:V.id,isMerged:V.isMerged}})})},500);return()=>clearInterval(M)},[s,y,g,te]);const yo=M=>{console.log("Changing language from",te,"to:",M),mt(M),U.updateLanguage(M)},xd=M=>{kd(M),M.endsWith(".en")&&yo("en")};return E.useEffect(()=>{let M=null;return y&&(M=setInterval(async()=>{},kg)),()=>{M&&clearInterval(M)}},[y]),E.useEffect(()=>{if(!t.current)return t.current=new Worker(new URL("/assets/worker-D60LmNTA.js",import.meta.url),{type:"module"}),U.setWorker(t.current),t.current.addEventListener("message",M=>{switch(M.data.status){case"loading":o("loading"),a(M.data.data);break;case"initiate":m(_e=>[..._e,M.data]);break;case"progress":m(_e=>_e.map(Se=>Se.file===M.data.file?{...Se,...M.data}:Se));break;case"done":m(_e=>_e.filter(Se=>Se.file!==M.data.file));break;case"ready":o("ready");break;case"start":k(!0);break;case"update":nt(M.data.tps);break;case"complete":k(!1);const Z=M.data.output,V=M.data.segmentId,j=M.data.segmentId.startsWith("merged_");yd(_e=>{var Dn,Ut,Ke,So;const Se={id:V,text:Z,timestamp:Date.now(),isMerged:j,containedSegments:j?(Ut=(Dn=U.segments.find(rt=>rt.id===V))==null?void 0:Dn.originalSegments)==null?void 0:Ut.map(rt=>rt.id):[],isPartOfMerged:!j&&((Ke=U.segments.find(rt=>rt.id===V))==null?void 0:Ke.isPartOfMerged),mergedId:j?null:(So=U.segments.find(rt=>rt.id===V))==null?void 0:So.mergedId};return[..._e.filter(rt=>{var ko;return!((ko=Se.containedSegments)!=null&&ko.includes(rt.id))}),Se]}),U.handleTranscriptionResult({segmentId:V,output:Z,isMerged:j});break}}),()=>{t.current.terminate(),t.current=null}},[]),I.jsxs("div",{className:"flex flex-col min-h-screen max-h-screen w-screen mx-auto text-gray-800 dark:text-gray-200 bg-white dark:bg-gray-900",children:[I.jsxs("header",{className:"flex items-center justify-between px-4 py-2 bg-gray-50 dark:bg-gray-800 border-b",children:[I.jsxs("div",{className:"flex items-center gap-2",children:[I.jsx("img",{src:"logo.png",width:"32",height:"32",className:"block"}),I.jsxs("div",{children:[I.jsx("h1",{className:"text-lg font-bold",children:"Whisper WebGPU"}),I.jsx("h2",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Real-time speech recognition"})]})]}),I.jsxs("div",{className:"flex items-center gap-2",children:[I.jsx(mg,{language:te,setLanguage:yo,disabled:Zi.endsWith(".en")}),s==="initialized"&&I.jsxs(I.Fragment,{children:[I.jsx(vg,{model:Zi,setModel:xd}),I.jsx("button",{className:"px-3 py-1 text-sm bg-blue-500 text-white rounded-lg hover:bg-blue-600",onClick:()=>{var M;(M=t.current)==null||M.postMessage({type:"load",data:{modelId:Zi}}),o("loading")},children:"Load Model"})]}),!y&&I.jsx("button",{className:"px-3 py-1 text-sm bg-green-500 text-white rounded-lg hover:bg-green-600",onClick:wd,children:"Start Recording"})]})]}),I.jsxs("div",{className:"flex-1 grid grid-cols-12 gap-4 p-4 overflow-hidden",children:[I.jsx("div",{className:"col-span-3 flex flex-col gap-4 overflow-y-auto",children:I.jsx("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-4",children:I.jsx(rp,{className:"w-full",stream:T,threshold:S,onThresholdChange:d,silenceLength:c,onSilenceLengthChange:h,speechHangover:v,onHangoverChange:w,audioContextRef:n,segments:F,energyScale:C,onEnergyScaleChange:_,hysteresisRatio:L,onHysteresisChange:O,minSpeechDuration:N,onMinSpeechDurationChange:le,processor:U.processor,minEnergyIntegral:Xi,onMinEnergyIntegralChange:Sd})})}),I.jsxs("div",{className:"col-span-5 flex flex-col gap-4 overflow-hidden",children:[s==="loading"&&I.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-4",children:[I.jsx("p",{className:"text-center mb-2",children:u}),p.map(({file:M,progress:Z,total:V},j)=>I.jsx(lp,{text:M,percentage:Z,total:V},j))]}),s==="ready"&&I.jsxs("div",{className:"flex-1 flex flex-col bg-gray-50 dark:bg-gray-800 rounded-lg overflow-hidden",children:[I.jsx("div",{className:"flex-1 relative",children:I.jsx("textarea",{value:Ge,onChange:M=>vt(M.target.value),className:`absolute inset-0 w-full h-full resize-none p-4 | |
font-mono text-sm bg-white dark:bg-gray-800 | |
border rounded-lg focus:ring-2 focus:ring-blue-500`,placeholder:"Transcriptions will appear here..."})}),I.jsxs("div",{className:"flex justify-end gap-2 p-2 bg-gray-100 dark:bg-gray-700",children:[G&&I.jsxs("span",{className:"px-2 py-1 text-sm bg-gray-200 dark:bg-gray-600 rounded",children:[G.toFixed(2)," tok/s"]}),I.jsx("button",{onClick:()=>vt(""),className:"px-3 py-1 text-sm bg-red-500 text-white rounded hover:bg-red-600",children:"Clear"}),I.jsx("button",{onClick:()=>navigator.clipboard.writeText(Ge),className:"px-3 py-1 text-sm bg-blue-500 text-white rounded hover:bg-blue-600",children:"Copy"}),I.jsx("button",{onClick:Id,className:"px-3 py-1 text-sm bg-gray-500 text-white rounded hover:bg-gray-600",children:"Reset"})]})]})]}),I.jsx("div",{className:"col-span-4 overflow-y-auto",children:I.jsx(md,{segments:F,worker:t.current,language:te})})]})]})}Il.createRoot(document.getElementById("root")).render(I.jsx(Vd.StrictMode,{children:I.jsx(Ig,{})})); | |