diff --git a/music_assistant/server/providers/snapcast/__init__.py b/music_assistant/server/providers/snapcast/__init__.py index 1f7ce0f39..0b13d8e21 100644 --- a/music_assistant/server/providers/snapcast/__init__.py +++ b/music_assistant/server/providers/snapcast/__init__.py @@ -3,11 +3,12 @@ from __future__ import annotations import asyncio +import pathlib import random import socket import time from contextlib import suppress -from typing import TYPE_CHECKING, cast +from typing import TYPE_CHECKING, Final, cast from snapcast.control import create_server from snapcast.control.client import Snapclient @@ -60,6 +61,8 @@ } DEFAULT_SNAPSERVER_PORT = 1705 +SNAPWEB_DIR: Final[pathlib.Path] = pathlib.Path(__file__).parent.resolve().joinpath("snapweb") + async def setup( mass: MusicAssistant, manifest: ProviderManifest, config: ProviderConfig @@ -136,9 +139,14 @@ def supported_features(self) -> tuple[ProviderFeature, ...]: async def handle_async_init(self) -> None: """Handle async initialization of the provider.""" - self._snapcast_server_host = self.config.get_value(CONF_SERVER_HOST) - self._snapcast_server_control_port = self.config.get_value(CONF_SERVER_CONTROL_PORT) self._use_builtin_server = not self.config.get_value(CONF_USE_EXTERNAL_SERVER) + if self._use_builtin_server: + self._snapcast_server_host = "127.0.0.1" + self._snapcast_server_control_port = DEFAULT_SNAPSERVER_PORT + else: + self._snapcast_server_host = self.config.get_value(CONF_SERVER_HOST) + self._snapcast_server_control_port = self.config.get_value(CONF_SERVER_CONTROL_PORT) + self._stream_tasks = {} if self._use_builtin_server: @@ -174,10 +182,10 @@ async def unload(self) -> None: """Handle close/cleanup of the provider.""" for client in self._snapserver.clients: await self.cmd_stop(client.identifier) + self._snapserver.stop() if self._snapserver_runner and not self._snapserver_runner.done(): self._snapserver_runner.cancel() - await asyncio.sleep(6) # prevent race conditions when reloading - self._snapserver.stop() + await asyncio.sleep(10) # prevent race conditions when reloading self._snapserver_started.clear() def on_player_config_removed(self, player_id: str) -> None: @@ -442,7 +450,7 @@ async def _builtin_server_runner(self) -> None: properties={"is_mass": "true"}, addresses=[await get_ip_pton(self.mass.webserver.publish_ip)], port=port, - server=f"{socket.gethostname()}", + server=f"{socket.gethostname()}.local", ) attr_name = f"zc_service_set{name}" if getattr(self, attr_name, None): @@ -458,8 +466,19 @@ async def _builtin_server_runner(self) -> None: self.logger.exception( "Could not register mdns record for %s: %s", zeroconf_type, str(err) ) + args = [ + "snapserver", + # config settings taken from + # https://raw.githubusercontent.com/badaix/snapcast/86cd4b2b63e750a72e0dfe6a46d47caf01426c8d/server/etc/snapserver.conf + f"--server.datadir={self.mass.storage_path}", + "--http.enabled=true", + "--http.port=1780", + f"--http.doc_root={SNAPWEB_DIR}", + "--tcp.enabled=true", + "--tcp.port=1705", + ] async with AsyncProcess( - ["snapserver"], enable_stdin=False, enable_stdout=True, enable_stderr=False + args, enable_stdin=False, enable_stdout=True, enable_stderr=False ) as snapserver_proc: # keep reading from stderr until exit async for data in snapserver_proc.iter_any(): diff --git a/music_assistant/server/providers/snapcast/snapweb/apple-touch-icon-180x180.png b/music_assistant/server/providers/snapcast/snapweb/apple-touch-icon-180x180.png new file mode 100644 index 000000000..b37b7160a Binary files /dev/null and b/music_assistant/server/providers/snapcast/snapweb/apple-touch-icon-180x180.png differ diff --git a/music_assistant/server/providers/snapcast/snapweb/assets/10-seconds-of-silence-j39Pm5R-.mp3 b/music_assistant/server/providers/snapcast/snapweb/assets/10-seconds-of-silence-j39Pm5R-.mp3 new file mode 100644 index 000000000..40361eca0 Binary files /dev/null and b/music_assistant/server/providers/snapcast/snapweb/assets/10-seconds-of-silence-j39Pm5R-.mp3 differ diff --git a/music_assistant/server/providers/snapcast/snapweb/assets/index-BDBx6C_I.css b/music_assistant/server/providers/snapcast/snapweb/assets/index-BDBx6C_I.css new file mode 100644 index 000000000..0e3d7da4d --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/assets/index-BDBx6C_I.css @@ -0,0 +1 @@ +body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace} diff --git a/music_assistant/server/providers/snapcast/snapweb/assets/index-DDLZhQdU.js b/music_assistant/server/providers/snapcast/snapweb/assets/index-DDLZhQdU.js new file mode 100644 index 000000000..79b88c890 --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/assets/index-DDLZhQdU.js @@ -0,0 +1,135 @@ +var a3=Object.defineProperty;var s3=(t,r,s)=>r in t?a3(t,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[r]=s;var Ie=(t,r,s)=>(s3(t,typeof r!="symbol"?r+"":r,s),s);function l3(t,r){for(var s=0;su[p]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))u(p);new MutationObserver(p=>{for(const d of p)if(d.type==="childList")for(const b of d.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&u(b)}).observe(document,{childList:!0,subtree:!0});function s(p){const d={};return p.integrity&&(d.integrity=p.integrity),p.referrerPolicy&&(d.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?d.credentials="include":p.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function u(p){if(p.ep)return;p.ep=!0;const d=s(p);fetch(p.href,d)}})();var c3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function X1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function la(t){if(t.__esModule)return t;var r=t.default;if(typeof r=="function"){var s=function u(){return this instanceof u?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};s.prototype=r.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach(function(u){var p=Object.getOwnPropertyDescriptor(t,u);Object.defineProperty(s,u,p.get?p:{enumerable:!0,get:function(){return t[u]}})}),s}var Hv={exports:{}},Z0={},Gv={exports:{}},Vt={};/** + * @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 Rc=Symbol.for("react.element"),u3=Symbol.for("react.portal"),f3=Symbol.for("react.fragment"),d3=Symbol.for("react.strict_mode"),p3=Symbol.for("react.profiler"),h3=Symbol.for("react.provider"),m3=Symbol.for("react.context"),g3=Symbol.for("react.forward_ref"),b3=Symbol.for("react.suspense"),v3=Symbol.for("react.memo"),k3=Symbol.for("react.lazy"),tg=Symbol.iterator;function y3(t){return t===null||typeof t!="object"?null:(t=tg&&t[tg]||t["@@iterator"],typeof t=="function"?t:null)}var Qv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yv=Object.assign,Kv={};function rl(t,r,s){this.props=t,this.context=r,this.refs=Kv,this.updater=s||Qv}rl.prototype.isReactComponent={};rl.prototype.setState=function(t,r){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,r,"setState")};rl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Xv(){}Xv.prototype=rl.prototype;function q1(t,r,s){this.props=t,this.context=r,this.refs=Kv,this.updater=s||Qv}var Z1=q1.prototype=new Xv;Z1.constructor=q1;Yv(Z1,rl.prototype);Z1.isPureReactComponent=!0;var ng=Array.isArray,qv=Object.prototype.hasOwnProperty,J1={current:null},Zv={key:!0,ref:!0,__self:!0,__source:!0};function Jv(t,r,s){var u,p={},d=null,b=null;if(r!=null)for(u in r.ref!==void 0&&(b=r.ref),r.key!==void 0&&(d=""+r.key),r)qv.call(r,u)&&!Zv.hasOwnProperty(u)&&(p[u]=r[u]);var k=arguments.length-2;if(k===1)p.children=s;else if(1>>1,Me=ce[Ae];if(0>>1;Aep(Ge,Pe))ptp(fn,Ge)?(ce[Ae]=fn,ce[pt]=Pe,Ae=pt):(ce[Ae]=Ge,ce[He]=Pe,Ae=He);else if(ptp(fn,Pe))ce[Ae]=fn,ce[pt]=Pe,Ae=pt;else break e}}return ke}function p(ce,ke){var Pe=ce.sortIndex-ke.sortIndex;return Pe!==0?Pe:ce.id-ke.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;t.unstable_now=function(){return d.now()}}else{var b=Date,k=b.now();t.unstable_now=function(){return b.now()-k}}var y=[],_=[],S=1,P=null,N=3,L=!1,R=!1,O=!1,q=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function z(ce){for(var ke=s(_);ke!==null;){if(ke.callback===null)u(_);else if(ke.startTime<=ce)u(_),ke.sortIndex=ke.expirationTime,r(y,ke);else break;ke=s(_)}}function Y(ce){if(O=!1,z(ce),!R)if(s(y)!==null)R=!0,_e(U);else{var ke=s(_);ke!==null&&ve(Y,ke.startTime-ce)}}function U(ce,ke){R=!1,O&&(O=!1,F(X),X=-1),L=!0;var Pe=N;try{for(z(ke),P=s(y);P!==null&&(!(P.expirationTime>ke)||ce&&!me());){var Ae=P.callback;if(typeof Ae=="function"){P.callback=null,N=P.priorityLevel;var Me=Ae(P.expirationTime<=ke);ke=t.unstable_now(),typeof Me=="function"?P.callback=Me:P===s(y)&&u(y),z(ke)}else u(y);P=s(y)}if(P!==null)var tt=!0;else{var He=s(_);He!==null&&ve(Y,He.startTime-ke),tt=!1}return tt}finally{P=null,N=Pe,L=!1}}var ee=!1,Z=null,X=-1,de=5,le=-1;function me(){return!(t.unstable_now()-lece||125Ae?(ce.sortIndex=Pe,r(_,ce),s(y)===null&&ce===s(_)&&(O?(F(X),X=-1):O=!0,ve(Y,Pe-Ae))):(ce.sortIndex=Me,r(y,ce),R||L||(R=!0,_e(U))),ce},t.unstable_shouldYield=me,t.unstable_wrapCallback=function(ce){var ke=N;return function(){var Pe=N;N=ke;try{return ce.apply(this,arguments)}finally{N=Pe}}}})(nk);tk.exports=nk;var I3=tk.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 rk=$,lo=I3;function We(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,s=1;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),D2=Object.prototype.hasOwnProperty,R3=/^[: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]*$/,og={},ig={};function T3(t){return D2.call(ig,t)?!0:D2.call(og,t)?!1:R3.test(t)?ig[t]=!0:(og[t]=!0,!1)}function F3(t,r,s,u){if(s!==null&&s.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return u?!1:s!==null?!s.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function L3(t,r,s,u){if(r===null||typeof r>"u"||F3(t,r,s,u))return!0;if(u)return!1;if(s!==null)switch(s.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function Dr(t,r,s,u,p,d,b){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=u,this.attributeNamespace=p,this.mustUseProperty=s,this.propertyName=t,this.type=r,this.sanitizeURL=d,this.removeEmptyString=b}var gr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){gr[t]=new Dr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];gr[r]=new Dr(r,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){gr[t]=new Dr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){gr[t]=new Dr(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){gr[t]=new Dr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){gr[t]=new Dr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){gr[t]=new Dr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){gr[t]=new Dr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){gr[t]=new Dr(t,5,!1,t.toLowerCase(),null,!1,!1)});var ep=/[\-:]([a-z])/g;function tp(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 r=t.replace(ep,tp);gr[r]=new Dr(r,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(ep,tp);gr[r]=new Dr(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(ep,tp);gr[r]=new Dr(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){gr[t]=new Dr(t,1,!1,t.toLowerCase(),null,!1,!1)});gr.xlinkHref=new Dr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){gr[t]=new Dr(t,1,!1,t.toLowerCase(),null,!0,!0)});function np(t,r,s,u){var p=gr.hasOwnProperty(r)?gr[r]:null;(p!==null?p.type!==0:u||!(2k||p[b]!==d[k]){var y=` +`+p[b].replace(" at new "," at ");return t.displayName&&y.includes("")&&(y=y.replace("",t.displayName)),y}while(1<=b&&0<=k);break}}}finally{Xd=!1,Error.prepareStackTrace=s}return(t=t?t.displayName||t.name:"")?Gl(t):""}function D3(t){switch(t.tag){case 5:return Gl(t.type);case 16:return Gl("Lazy");case 13:return Gl("Suspense");case 19:return Gl("SuspenseList");case 0:case 2:case 15:return t=qd(t.type,!1),t;case 11:return t=qd(t.type.render,!1),t;case 1:return t=qd(t.type,!0),t;default:return""}}function z2(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 Cs:return"Fragment";case As:return"Portal";case O2:return"Profiler";case rp:return"StrictMode";case B2:return"Suspense";case j2:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case ak:return(t.displayName||"Context")+".Consumer";case ik:return(t._context.displayName||"Context")+".Provider";case op:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ip:return r=t.displayName||null,r!==null?r:z2(t.type)||"Memo";case Gi:r=t._payload,t=t._init;try{return z2(t(r))}catch{}}return null}function O3(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return z2(r);case 8:return r===rp?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function aa(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function lk(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function B3(t){var r=lk(t)?"checked":"value",s=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),u=""+t[r];if(!t.hasOwnProperty(r)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var p=s.get,d=s.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(b){u=""+b,d.call(this,b)}}),Object.defineProperty(t,r,{enumerable:s.enumerable}),{getValue:function(){return u},setValue:function(b){u=""+b},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function mu(t){t._valueTracker||(t._valueTracker=B3(t))}function ck(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var s=r.getValue(),u="";return t&&(u=lk(t)?t.checked?"true":"false":t.value),t=u,t!==s?(r.setValue(t),!0):!1}function f0(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 V2(t,r){var s=r.checked;return Ln({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??t._wrapperState.initialChecked})}function sg(t,r){var s=r.defaultValue==null?"":r.defaultValue,u=r.checked!=null?r.checked:r.defaultChecked;s=aa(r.value!=null?r.value:s),t._wrapperState={initialChecked:u,initialValue:s,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function uk(t,r){r=r.checked,r!=null&&np(t,"checked",r,!1)}function W2(t,r){uk(t,r);var s=aa(r.value),u=r.type;if(s!=null)u==="number"?(s===0&&t.value===""||t.value!=s)&&(t.value=""+s):t.value!==""+s&&(t.value=""+s);else if(u==="submit"||u==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?U2(t,r.type,s):r.hasOwnProperty("defaultValue")&&U2(t,r.type,aa(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function lg(t,r,s){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var u=r.type;if(!(u!=="submit"&&u!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,s||r===t.value||(t.value=r),t.defaultValue=r}s=t.name,s!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,s!==""&&(t.name=s)}function U2(t,r,s){(r!=="number"||f0(t.ownerDocument)!==t)&&(s==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+s&&(t.defaultValue=""+s))}var Ql=Array.isArray;function Ds(t,r,s,u){if(t=t.options,r){r={};for(var p=0;p"+r.valueOf().toString()+"",r=gu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function uc(t,r){if(r){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=r;return}}t.textContent=r}var Zl={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},j3=["Webkit","ms","Moz","O"];Object.keys(Zl).forEach(function(t){j3.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),Zl[r]=Zl[t]})});function hk(t,r,s){return r==null||typeof r=="boolean"||r===""?"":s||typeof r!="number"||r===0||Zl.hasOwnProperty(t)&&Zl[t]?(""+r).trim():r+"px"}function mk(t,r){t=t.style;for(var s in r)if(r.hasOwnProperty(s)){var u=s.indexOf("--")===0,p=hk(s,r[s],u);s==="float"&&(s="cssFloat"),u?t.setProperty(s,p):t[s]=p}}var z3=Ln({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 Q2(t,r){if(r){if(z3[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(We(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(We(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(We(61))}if(r.style!=null&&typeof r.style!="object")throw Error(We(62))}}function Y2(t,r){if(t.indexOf("-")===-1)return typeof r.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 K2=null;function ap(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var X2=null,Os=null,Bs=null;function fg(t){if(t=Lc(t)){if(typeof X2!="function")throw Error(We(280));var r=t.stateNode;r&&(r=nf(r),X2(t.stateNode,t.type,r))}}function gk(t){Os?Bs?Bs.push(t):Bs=[t]:Os=t}function bk(){if(Os){var t=Os,r=Bs;if(Bs=Os=null,fg(t),r)for(t=0;t>>=0,t===0?32:31-(Z3(t)/J3|0)|0}var bu=64,vu=4194304;function Yl(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 m0(t,r){var s=t.pendingLanes;if(s===0)return 0;var u=0,p=t.suspendedLanes,d=t.pingedLanes,b=s&268435455;if(b!==0){var k=b&~p;k!==0?u=Yl(k):(d&=b,d!==0&&(u=Yl(d)))}else b=s&~p,b!==0?u=Yl(b):d!==0&&(u=Yl(d));if(u===0)return 0;if(r!==0&&r!==u&&!(r&p)&&(p=u&-u,d=r&-r,p>=d||p===16&&(d&4194240)!==0))return r;if(u&4&&(u|=s&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=u;0s;s++)r.push(t);return r}function Tc(t,r,s){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-jo(r),t[r]=s}function nC(t,r){var s=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var u=t.eventTimes;for(t=t.expirationTimes;0=$l),yg=" ",_g=!1;function Ok(t,r){switch(t){case"keyup":return NC.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bk(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var xs=!1;function RC(t,r){switch(t){case"compositionend":return Bk(r);case"keypress":return r.which!==32?null:(_g=!0,yg);case"textInput":return t=r.data,t===yg&&_g?null:t;default:return null}}function TC(t,r){if(xs)return t==="compositionend"||!hp&&Ok(t,r)?(t=Lk(),Qu=fp=qi=null,xs=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:s,offset:r-t};t=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=xg(s)}}function Wk(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Wk(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Uk(){for(var t=window,r=f0();r instanceof t.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)t=r.contentWindow;else break;r=f0(t.document)}return r}function mp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function WC(t){var r=Uk(),s=t.focusedElem,u=t.selectionRange;if(r!==s&&s&&s.ownerDocument&&Wk(s.ownerDocument.documentElement,s)){if(u!==null&&mp(s)){if(r=u.start,t=u.end,t===void 0&&(t=r),"selectionStart"in s)s.selectionStart=r,s.selectionEnd=Math.min(t,s.value.length);else if(t=(r=s.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var p=s.textContent.length,d=Math.min(u.start,p);u=u.end===void 0?d:Math.min(u.end,p),!t.extend&&d>u&&(p=u,u=d,d=p),p=Sg(s,d);var b=Sg(s,u);p&&b&&(t.rangeCount!==1||t.anchorNode!==p.node||t.anchorOffset!==p.offset||t.focusNode!==b.node||t.focusOffset!==b.offset)&&(r=r.createRange(),r.setStart(p.node,p.offset),t.removeAllRanges(),d>u?(t.addRange(r),t.extend(b.node,b.offset)):(r.setEnd(b.node,b.offset),t.addRange(r)))}}for(r=[],t=s;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s=document.documentMode,Ss=null,t1=null,tc=null,n1=!1;function Eg(t,r,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;n1||Ss==null||Ss!==f0(u)||(u=Ss,"selectionStart"in u&&mp(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),tc&&gc(tc,u)||(tc=u,u=v0(t1,"onSelect"),0Ms||(t.current=l1[Ms],l1[Ms]=null,Ms--)}function vn(t,r){Ms++,l1[Ms]=t.current,t.current=r}var sa={},Sr=ua(sa),Qr=ua(!1),La=sa;function Qs(t,r){var s=t.type.contextTypes;if(!s)return sa;var u=t.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===r)return u.__reactInternalMemoizedMaskedChildContext;var p={},d;for(d in s)p[d]=r[d];return u&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=p),p}function Yr(t){return t=t.childContextTypes,t!=null}function y0(){An(Qr),An(Sr)}function Fg(t,r,s){if(Sr.current!==sa)throw Error(We(168));vn(Sr,r),vn(Qr,s)}function Jk(t,r,s){var u=t.stateNode;if(r=r.childContextTypes,typeof u.getChildContext!="function")return s;u=u.getChildContext();for(var p in u)if(!(p in r))throw Error(We(108,O3(t)||"Unknown",p));return Ln({},s,u)}function _0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||sa,La=Sr.current,vn(Sr,t),vn(Qr,Qr.current),!0}function Lg(t,r,s){var u=t.stateNode;if(!u)throw Error(We(169));s?(t=Jk(t,r,La),u.__reactInternalMemoizedMergedChildContext=t,An(Qr),An(Sr),vn(Sr,t)):An(Qr),vn(Qr,s)}var mi=null,rf=!1,u2=!1;function $k(t){mi===null?mi=[t]:mi.push(t)}function e5(t){rf=!0,$k(t)}function fa(){if(!u2&&mi!==null){u2=!0;var t=0,r=ln;try{var s=mi;for(ln=1;t>=b,p-=b,ki=1<<32-jo(r)+p|s<X?(de=Z,Z=null):de=Z.sibling;var le=N(F,Z,z[X],Y);if(le===null){Z===null&&(Z=de);break}t&&Z&&le.alternate===null&&r(F,Z),D=d(le,D,X),ee===null?U=le:ee.sibling=le,ee=le,Z=de}if(X===z.length)return s(F,Z),Pn&&_a(F,X),U;if(Z===null){for(;XX?(de=Z,Z=null):de=Z.sibling;var me=N(F,Z,le.value,Y);if(me===null){Z===null&&(Z=de);break}t&&Z&&me.alternate===null&&r(F,Z),D=d(me,D,X),ee===null?U=me:ee.sibling=me,ee=me,Z=de}if(le.done)return s(F,Z),Pn&&_a(F,X),U;if(Z===null){for(;!le.done;X++,le=z.next())le=P(F,le.value,Y),le!==null&&(D=d(le,D,X),ee===null?U=le:ee.sibling=le,ee=le);return Pn&&_a(F,X),U}for(Z=u(F,Z);!le.done;X++,le=z.next())le=L(Z,F,X,le.value,Y),le!==null&&(t&&le.alternate!==null&&Z.delete(le.key===null?X:le.key),D=d(le,D,X),ee===null?U=le:ee.sibling=le,ee=le);return t&&Z.forEach(function(pe){return r(F,pe)}),Pn&&_a(F,X),U}function q(F,D,z,Y){if(typeof z=="object"&&z!==null&&z.type===Cs&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case hu:e:{for(var U=z.key,ee=D;ee!==null;){if(ee.key===U){if(U=z.type,U===Cs){if(ee.tag===7){s(F,ee.sibling),D=p(ee,z.props.children),D.return=F,F=D;break e}}else if(ee.elementType===U||typeof U=="object"&&U!==null&&U.$$typeof===Gi&&Wg(U)===ee.type){s(F,ee.sibling),D=p(ee,z.props),D.ref=Ll(F,ee,z),D.return=F,F=D;break e}s(F,ee);break}else r(F,ee);ee=ee.sibling}z.type===Cs?(D=Na(z.props.children,F.mode,Y,z.key),D.return=F,F=D):(Y=e0(z.type,z.key,z.props,null,F.mode,Y),Y.ref=Ll(F,D,z),Y.return=F,F=Y)}return b(F);case As:e:{for(ee=z.key;D!==null;){if(D.key===ee)if(D.tag===4&&D.stateNode.containerInfo===z.containerInfo&&D.stateNode.implementation===z.implementation){s(F,D.sibling),D=p(D,z.children||[]),D.return=F,F=D;break e}else{s(F,D);break}else r(F,D);D=D.sibling}D=v2(z,F.mode,Y),D.return=F,F=D}return b(F);case Gi:return ee=z._init,q(F,D,ee(z._payload),Y)}if(Ql(z))return R(F,D,z,Y);if(Nl(z))return O(F,D,z,Y);xu(F,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,D!==null&&D.tag===6?(s(F,D.sibling),D=p(D,z),D.return=F,F=D):(s(F,D),D=b2(z,F.mode,Y),D.return=F,F=D),b(F)):s(F,D)}return q}var Ks=s4(!0),l4=s4(!1),Dc={},ri=ua(Dc),yc=ua(Dc),_c=ua(Dc);function Ea(t){if(t===Dc)throw Error(We(174));return t}function Cp(t,r){switch(vn(_c,r),vn(yc,t),vn(ri,Dc),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:G2(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=G2(r,t)}An(ri),vn(ri,r)}function Xs(){An(ri),An(yc),An(_c)}function c4(t){Ea(_c.current);var r=Ea(ri.current),s=G2(r,t.type);r!==s&&(vn(yc,t),vn(ri,s))}function xp(t){yc.current===t&&(An(ri),An(yc))}var Rn=ua(0);function E0(t){for(var r=t;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if(r.flags&128)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var f2=[];function Sp(){for(var t=0;ts?s:4,t(!0);var u=d2.transition;d2.transition={};try{t(!1),r()}finally{ln=s,d2.transition=u}}function x4(){return Co().memoizedState}function o5(t,r,s){var u=oa(t);if(s={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null},S4(t))E4(r,s);else if(s=r4(t,r,s,u),s!==null){var p=Rr();zo(s,t,u,p),P4(s,r,u)}}function i5(t,r,s){var u=oa(t),p={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null};if(S4(t))E4(r,p);else{var d=t.alternate;if(t.lanes===0&&(d===null||d.lanes===0)&&(d=r.lastRenderedReducer,d!==null))try{var b=r.lastRenderedState,k=d(b,s);if(p.hasEagerState=!0,p.eagerState=k,Vo(k,b)){var y=r.interleaved;y===null?(p.next=p,wp(r)):(p.next=y.next,y.next=p),r.interleaved=p;return}}catch{}finally{}s=r4(t,r,p,u),s!==null&&(p=Rr(),zo(s,t,u,p),P4(s,r,u))}}function S4(t){var r=t.alternate;return t===Tn||r!==null&&r===Tn}function E4(t,r){nc=P0=!0;var s=t.pending;s===null?r.next=r:(r.next=s.next,s.next=r),t.pending=r}function P4(t,r,s){if(s&4194240){var u=r.lanes;u&=t.pendingLanes,s|=u,r.lanes=s,lp(t,s)}}var M0={readContext:Ao,useCallback:_r,useContext:_r,useEffect:_r,useImperativeHandle:_r,useInsertionEffect:_r,useLayoutEffect:_r,useMemo:_r,useReducer:_r,useRef:_r,useState:_r,useDebugValue:_r,useDeferredValue:_r,useTransition:_r,useMutableSource:_r,useSyncExternalStore:_r,useId:_r,unstable_isNewReconciler:!1},a5={readContext:Ao,useCallback:function(t,r){return Zo().memoizedState=[t,r===void 0?null:r],t},useContext:Ao,useEffect:Hg,useImperativeHandle:function(t,r,s){return s=s!=null?s.concat([t]):null,qu(4194308,4,y4.bind(null,r,t),s)},useLayoutEffect:function(t,r){return qu(4194308,4,t,r)},useInsertionEffect:function(t,r){return qu(4,2,t,r)},useMemo:function(t,r){var s=Zo();return r=r===void 0?null:r,t=t(),s.memoizedState=[t,r],t},useReducer:function(t,r,s){var u=Zo();return r=s!==void 0?s(r):r,u.memoizedState=u.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},u.queue=t,t=t.dispatch=o5.bind(null,Tn,t),[u.memoizedState,t]},useRef:function(t){var r=Zo();return t={current:t},r.memoizedState=t},useState:Ug,useDebugValue:Ip,useDeferredValue:function(t){return Zo().memoizedState=t},useTransition:function(){var t=Ug(!1),r=t[0];return t=r5.bind(null,t[1]),Zo().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,s){var u=Tn,p=Zo();if(Pn){if(s===void 0)throw Error(We(407));s=s()}else{if(s=r(),fr===null)throw Error(We(349));Oa&30||d4(u,r,s)}p.memoizedState=s;var d={value:s,getSnapshot:r};return p.queue=d,Hg(h4.bind(null,u,d,t),[t]),u.flags|=2048,Cc(9,p4.bind(null,u,d,s,r),void 0,null),s},useId:function(){var t=Zo(),r=fr.identifierPrefix;if(Pn){var s=yi,u=ki;s=(u&~(1<<32-jo(u)-1)).toString(32)+s,r=":"+r+"R"+s,s=wc++,0<\/script>",t=t.removeChild(t.firstChild)):typeof u.is=="string"?t=b.createElement(s,{is:u.is}):(t=b.createElement(s),s==="select"&&(b=t,u.multiple?b.multiple=!0:u.size&&(b.size=u.size))):t=b.createElementNS(t,s),t[ti]=r,t[kc]=u,O4(t,r,!1,!1),r.stateNode=t;e:{switch(b=Y2(s,u),s){case"dialog":wn("cancel",t),wn("close",t),p=u;break;case"iframe":case"object":case"embed":wn("load",t),p=u;break;case"video":case"audio":for(p=0;pZs&&(r.flags|=128,u=!0,Dl(d,!1),r.lanes=4194304)}else{if(!u)if(t=E0(b),t!==null){if(r.flags|=128,u=!0,s=t.updateQueue,s!==null&&(r.updateQueue=s,r.flags|=4),Dl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!b.alternate&&!Pn)return wr(r),null}else 2*Qn()-d.renderingStartTime>Zs&&s!==1073741824&&(r.flags|=128,u=!0,Dl(d,!1),r.lanes=4194304);d.isBackwards?(b.sibling=r.child,r.child=b):(s=d.last,s!==null?s.sibling=b:r.child=b,d.last=b)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=Qn(),r.sibling=null,s=Rn.current,vn(Rn,u?s&1|2:s&1),r):(wr(r),null);case 22:case 23:return Op(),u=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==u&&(r.flags|=8192),u&&r.mode&1?eo&1073741824&&(wr(r),r.subtreeFlags&6&&(r.flags|=8192)):wr(r),null;case 24:return null;case 25:return null}throw Error(We(156,r.tag))}function h5(t,r){switch(bp(r),r.tag){case 1:return Yr(r.type)&&y0(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Xs(),An(Qr),An(Sr),Sp(),t=r.flags,t&65536&&!(t&128)?(r.flags=t&-65537|128,r):null;case 5:return xp(r),null;case 13:if(An(Rn),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(We(340));Ys()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return An(Rn),null;case 4:return Xs(),null;case 10:return _p(r.type._context),null;case 22:case 23:return Op(),null;case 24:return null;default:return null}}var Eu=!1,xr=!1,m5=typeof WeakSet=="function"?WeakSet:Set,ct=null;function Ts(t,r){var s=t.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(u){Vn(t,r,u)}else s.current=null}function y1(t,r,s){try{s()}catch(u){Vn(t,r,u)}}var $g=!1;function g5(t,r){if(r1=g0,t=Uk(),mp(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var p=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{s.nodeType,d.nodeType}catch{s=null;break e}var b=0,k=-1,y=-1,_=0,S=0,P=t,N=null;t:for(;;){for(var L;P!==s||p!==0&&P.nodeType!==3||(k=b+p),P!==d||u!==0&&P.nodeType!==3||(y=b+u),P.nodeType===3&&(b+=P.nodeValue.length),(L=P.firstChild)!==null;)N=P,P=L;for(;;){if(P===t)break t;if(N===s&&++_===p&&(k=b),N===d&&++S===u&&(y=b),(L=P.nextSibling)!==null)break;P=N,N=P.parentNode}P=L}s=k===-1||y===-1?null:{start:k,end:y}}else s=null}s=s||{start:0,end:0}}else s=null;for(o1={focusedElem:t,selectionRange:s},g0=!1,ct=r;ct!==null;)if(r=ct,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,ct=t;else for(;ct!==null;){r=ct;try{var R=r.alternate;if(r.flags&1024)switch(r.tag){case 0:case 11:case 15:break;case 1:if(R!==null){var O=R.memoizedProps,q=R.memoizedState,F=r.stateNode,D=F.getSnapshotBeforeUpdate(r.elementType===r.type?O:To(r.type,O),q);F.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var z=r.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(We(163))}}catch(Y){Vn(r,r.return,Y)}if(t=r.sibling,t!==null){t.return=r.return,ct=t;break}ct=r.return}return R=$g,$g=!1,R}function rc(t,r,s){var u=r.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var p=u=u.next;do{if((p.tag&t)===t){var d=p.destroy;p.destroy=void 0,d!==void 0&&y1(r,s,d)}p=p.next}while(p!==u)}}function sf(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var u=s.create;s.destroy=u()}s=s.next}while(s!==r)}}function _1(t){var r=t.ref;if(r!==null){var s=t.stateNode;switch(t.tag){case 5:t=s;break;default:t=s}typeof r=="function"?r(t):r.current=t}}function z4(t){var r=t.alternate;r!==null&&(t.alternate=null,z4(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[ti],delete r[kc],delete r[s1],delete r[JC],delete r[$C])),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 V4(t){return t.tag===5||t.tag===3||t.tag===4}function eb(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||V4(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 w1(t,r,s){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?s.nodeType===8?s.parentNode.insertBefore(t,r):s.insertBefore(t,r):(s.nodeType===8?(r=s.parentNode,r.insertBefore(t,s)):(r=s,r.appendChild(t)),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=k0));else if(u!==4&&(t=t.child,t!==null))for(w1(t,r,s),t=t.sibling;t!==null;)w1(t,r,s),t=t.sibling}function A1(t,r,s){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?s.insertBefore(t,r):s.appendChild(t);else if(u!==4&&(t=t.child,t!==null))for(A1(t,r,s),t=t.sibling;t!==null;)A1(t,r,s),t=t.sibling}var pr=null,Fo=!1;function Wi(t,r,s){for(s=s.child;s!==null;)W4(t,r,s),s=s.sibling}function W4(t,r,s){if(ni&&typeof ni.onCommitFiberUnmount=="function")try{ni.onCommitFiberUnmount(J0,s)}catch{}switch(s.tag){case 5:xr||Ts(s,r);case 6:var u=pr,p=Fo;pr=null,Wi(t,r,s),pr=u,Fo=p,pr!==null&&(Fo?(t=pr,s=s.stateNode,t.nodeType===8?t.parentNode.removeChild(s):t.removeChild(s)):pr.removeChild(s.stateNode));break;case 18:pr!==null&&(Fo?(t=pr,s=s.stateNode,t.nodeType===8?c2(t.parentNode,s):t.nodeType===1&&c2(t,s),hc(t)):c2(pr,s.stateNode));break;case 4:u=pr,p=Fo,pr=s.stateNode.containerInfo,Fo=!0,Wi(t,r,s),pr=u,Fo=p;break;case 0:case 11:case 14:case 15:if(!xr&&(u=s.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){p=u=u.next;do{var d=p,b=d.destroy;d=d.tag,b!==void 0&&(d&2||d&4)&&y1(s,r,b),p=p.next}while(p!==u)}Wi(t,r,s);break;case 1:if(!xr&&(Ts(s,r),u=s.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=s.memoizedProps,u.state=s.memoizedState,u.componentWillUnmount()}catch(k){Vn(s,r,k)}Wi(t,r,s);break;case 21:Wi(t,r,s);break;case 22:s.mode&1?(xr=(u=xr)||s.memoizedState!==null,Wi(t,r,s),xr=u):Wi(t,r,s);break;default:Wi(t,r,s)}}function tb(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var s=t.stateNode;s===null&&(s=t.stateNode=new m5),r.forEach(function(u){var p=x5.bind(null,t,u);s.has(u)||(s.add(u),u.then(p,p))})}}function Ro(t,r){var s=r.deletions;if(s!==null)for(var u=0;up&&(p=b),u&=~d}if(u=p,u=Qn()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*v5(u/1960))-u,10t?16:t,Zi===null)var u=!1;else{if(t=Zi,Zi=null,R0=0,Kt&6)throw Error(We(331));var p=Kt;for(Kt|=4,ct=t.current;ct!==null;){var d=ct,b=d.child;if(ct.flags&16){var k=d.deletions;if(k!==null){for(var y=0;yQn()-Lp?Ma(t,0):Fp|=s),Kr(t,r)}function q4(t,r){r===0&&(t.mode&1?(r=vu,vu<<=1,!(vu&130023424)&&(vu=4194304)):r=1);var s=Rr();t=Ei(t,r),t!==null&&(Tc(t,r,s),Kr(t,s))}function C5(t){var r=t.memoizedState,s=0;r!==null&&(s=r.retryLane),q4(t,s)}function x5(t,r){var s=0;switch(t.tag){case 13:var u=t.stateNode,p=t.memoizedState;p!==null&&(s=p.retryLane);break;case 19:u=t.stateNode;break;default:throw Error(We(314))}u!==null&&u.delete(r),q4(t,s)}var Z4;Z4=function(t,r,s){if(t!==null)if(t.memoizedProps!==r.pendingProps||Qr.current)Gr=!0;else{if(!(t.lanes&s)&&!(r.flags&128))return Gr=!1,d5(t,r,s);Gr=!!(t.flags&131072)}else Gr=!1,Pn&&r.flags&1048576&&e4(r,A0,r.index);switch(r.lanes=0,r.tag){case 2:var u=r.type;Zu(t,r),t=r.pendingProps;var p=Qs(r,Sr.current);zs(r,s),p=Pp(null,r,u,t,p,s);var d=Mp();return r.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Yr(u)?(d=!0,_0(r)):d=!1,r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,Ap(r),p.updater=of,r.stateNode=p,p._reactInternals=r,p1(r,u,t,s),r=g1(null,r,u,!0,d,s)):(r.tag=0,Pn&&d&&gp(r),Nr(null,r,p,s),r=r.child),r;case 16:u=r.elementType;e:{switch(Zu(t,r),t=r.pendingProps,p=u._init,u=p(u._payload),r.type=u,p=r.tag=E5(u),t=To(u,t),p){case 0:r=m1(null,r,u,t,s);break e;case 1:r=qg(null,r,u,t,s);break e;case 11:r=Kg(null,r,u,t,s);break e;case 14:r=Xg(null,r,u,To(u.type,t),s);break e}throw Error(We(306,u,""))}return r;case 0:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:To(u,p),m1(t,r,u,p,s);case 1:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:To(u,p),qg(t,r,u,p,s);case 3:e:{if(F4(r),t===null)throw Error(We(387));u=r.pendingProps,d=r.memoizedState,p=d.element,o4(t,r),S0(r,u,null,s);var b=r.memoizedState;if(u=b.element,d.isDehydrated)if(d={element:u,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},r.updateQueue.baseState=d,r.memoizedState=d,r.flags&256){p=qs(Error(We(423)),r),r=Zg(t,r,u,s,p);break e}else if(u!==p){p=qs(Error(We(424)),r),r=Zg(t,r,u,s,p);break e}else for(ro=ta(r.stateNode.containerInfo.firstChild),ao=r,Pn=!0,Lo=null,s=l4(r,null,u,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ys(),u===p){r=Pi(t,r,s);break e}Nr(t,r,u,s)}r=r.child}return r;case 5:return c4(r),t===null&&u1(r),u=r.type,p=r.pendingProps,d=t!==null?t.memoizedProps:null,b=p.children,i1(u,p)?b=null:d!==null&&i1(u,d)&&(r.flags|=32),T4(t,r),Nr(t,r,b,s),r.child;case 6:return t===null&&u1(r),null;case 13:return L4(t,r,s);case 4:return Cp(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=Ks(r,null,u,s):Nr(t,r,u,s),r.child;case 11:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:To(u,p),Kg(t,r,u,p,s);case 7:return Nr(t,r,r.pendingProps,s),r.child;case 8:return Nr(t,r,r.pendingProps.children,s),r.child;case 12:return Nr(t,r,r.pendingProps.children,s),r.child;case 10:e:{if(u=r.type._context,p=r.pendingProps,d=r.memoizedProps,b=p.value,vn(C0,u._currentValue),u._currentValue=b,d!==null)if(Vo(d.value,b)){if(d.children===p.children&&!Qr.current){r=Pi(t,r,s);break e}}else for(d=r.child,d!==null&&(d.return=r);d!==null;){var k=d.dependencies;if(k!==null){b=d.child;for(var y=k.firstContext;y!==null;){if(y.context===u){if(d.tag===1){y=wi(-1,s&-s),y.tag=2;var _=d.updateQueue;if(_!==null){_=_.shared;var S=_.pending;S===null?y.next=y:(y.next=S.next,S.next=y),_.pending=y}}d.lanes|=s,y=d.alternate,y!==null&&(y.lanes|=s),f1(d.return,s,r),k.lanes|=s;break}y=y.next}}else if(d.tag===10)b=d.type===r.type?null:d.child;else if(d.tag===18){if(b=d.return,b===null)throw Error(We(341));b.lanes|=s,k=b.alternate,k!==null&&(k.lanes|=s),f1(b,s,r),b=d.sibling}else b=d.child;if(b!==null)b.return=d;else for(b=d;b!==null;){if(b===r){b=null;break}if(d=b.sibling,d!==null){d.return=b.return,b=d;break}b=b.return}d=b}Nr(t,r,p.children,s),r=r.child}return r;case 9:return p=r.type,u=r.pendingProps.children,zs(r,s),p=Ao(p),u=u(p),r.flags|=1,Nr(t,r,u,s),r.child;case 14:return u=r.type,p=To(u,r.pendingProps),p=To(u.type,p),Xg(t,r,u,p,s);case 15:return I4(t,r,r.type,r.pendingProps,s);case 17:return u=r.type,p=r.pendingProps,p=r.elementType===u?p:To(u,p),Zu(t,r),r.tag=1,Yr(u)?(t=!0,_0(r)):t=!1,zs(r,s),a4(r,u,p),p1(r,u,p,s),g1(null,r,u,!0,t,s);case 19:return D4(t,r,s);case 22:return R4(t,r,s)}throw Error(We(156,r.tag))};function J4(t,r){return Ck(t,r)}function S5(t,r,s,u){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(t,r,s,u){return new S5(t,r,s,u)}function jp(t){return t=t.prototype,!(!t||!t.isReactComponent)}function E5(t){if(typeof t=="function")return jp(t)?1:0;if(t!=null){if(t=t.$$typeof,t===op)return 11;if(t===ip)return 14}return 2}function ia(t,r){var s=t.alternate;return s===null?(s=yo(t.tag,r,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=r,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&14680064,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,r=t.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s}function e0(t,r,s,u,p,d){var b=2;if(u=t,typeof t=="function")jp(t)&&(b=1);else if(typeof t=="string")b=5;else e:switch(t){case Cs:return Na(s.children,p,d,r);case rp:b=8,p|=8;break;case O2:return t=yo(12,s,r,p|2),t.elementType=O2,t.lanes=d,t;case B2:return t=yo(13,s,r,p),t.elementType=B2,t.lanes=d,t;case j2:return t=yo(19,s,r,p),t.elementType=j2,t.lanes=d,t;case sk:return cf(s,p,d,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case ik:b=10;break e;case ak:b=9;break e;case op:b=11;break e;case ip:b=14;break e;case Gi:b=16,u=null;break e}throw Error(We(130,t==null?t:typeof t,""))}return r=yo(b,s,r,p),r.elementType=t,r.type=u,r.lanes=d,r}function Na(t,r,s,u){return t=yo(7,t,u,r),t.lanes=s,t}function cf(t,r,s,u){return t=yo(22,t,u,r),t.elementType=sk,t.lanes=s,t.stateNode={isHidden:!1},t}function b2(t,r,s){return t=yo(6,t,null,r),t.lanes=s,t}function v2(t,r,s){return r=yo(4,t.children!==null?t.children:[],t.key,r),r.lanes=s,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function P5(t,r,s,u,p){this.tag=r,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=Jd(0),this.expirationTimes=Jd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jd(0),this.identifierPrefix=u,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function zp(t,r,s,u,p,d,b,k,y){return t=new P5(t,r,s,k,y),r===1?(r=1,d===!0&&(r|=8)):r=0,d=yo(3,null,null,r),t.current=d,d.stateNode=t,d.memoizedState={element:u,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ap(d),t}function M5(t,r,s){var u=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n6)}catch(t){console.error(t)}}n6(),ek.exports=co;var Hp=ek.exports;const Nu=X1(Hp);var cb=Hp;L2.createRoot=cb.createRoot,L2.hydrateRoot=cb.hydrateRoot;const F5={black:"#000",white:"#fff"},Sc=F5,L5={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},fs=L5,D5={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},ds=D5,O5={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},ps=O5,B5={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},hs=B5,j5={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},ms=j5,z5={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Bl=z5,V5={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},W5=V5;function za(t){let r="https://mui.com/production-error/?code="+t;for(let s=1;s=0)&&(s[p]=t[p]);return s}function r6(t){var r=Object.create(null);return function(s){return r[s]===void 0&&(r[s]=t(s)),r[s]}}var H5=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,G5=r6(function(t){return H5.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function Q5(t){if(t.sheet)return t.sheet;for(var r=0;r0?hr(al,--Xr):0,Js--,qn===10&&(Js=1,mf--),qn}function so(){return qn=Xr2||Pc(qn)>3?"":" "}function ix(t,r){for(;--r&&so()&&!(qn<48||qn>102||qn>57&&qn<65||qn>70&&qn<97););return Oc(t,t0()+(r<6&&oi()==32&&so()==32))}function M1(t){for(;so();)switch(qn){case t:return Xr;case 34:case 39:t!==34&&t!==39&&M1(qn);break;case 40:t===41&&M1(t);break;case 92:so();break}return Xr}function ax(t,r){for(;so()&&t+qn!==57;)if(t+qn===84&&oi()===47)break;return"/*"+Oc(r,Xr-1)+"*"+hf(t===47?t:so())}function sx(t){for(;!Pc(oi());)so();return Oc(t,Xr)}function lx(t){return c6(r0("",null,null,null,[""],t=l6(t),0,[0],t))}function r0(t,r,s,u,p,d,b,k,y){for(var _=0,S=0,P=b,N=0,L=0,R=0,O=1,q=1,F=1,D=0,z="",Y=p,U=d,ee=u,Z=z;q;)switch(R=D,D=so()){case 40:if(R!=108&&hr(Z,P-1)==58){P1(Z+=tn(n0(D),"&","&\f"),"&\f")!=-1&&(F=-1);break}case 34:case 39:case 91:Z+=n0(D);break;case 9:case 10:case 13:case 32:Z+=ox(R);break;case 92:Z+=ix(t0()-1,7);continue;case 47:switch(oi()){case 42:case 47:Iu(cx(ax(so(),t0()),r,s),y);break;default:Z+="/"}break;case 123*O:k[_++]=$o(Z)*F;case 125*O:case 59:case 0:switch(D){case 0:case 125:q=0;case 59+S:F==-1&&(Z=tn(Z,/\f/g,"")),L>0&&$o(Z)-P&&Iu(L>32?fb(Z+";",u,s,P-1):fb(tn(Z," ","")+";",u,s,P-2),y);break;case 59:Z+=";";default:if(Iu(ee=ub(Z,r,s,_,S,p,k,z,Y=[],U=[],P),d),D===123)if(S===0)r0(Z,r,ee,ee,Y,d,P,k,U);else switch(N===99&&hr(Z,3)===110?100:N){case 100:case 108:case 109:case 115:r0(t,ee,ee,u&&Iu(ub(t,ee,ee,0,0,p,k,z,p,Y=[],P),U),p,U,P,k,u?Y:U);break;default:r0(Z,ee,ee,ee,[""],U,0,k,U)}}_=S=L=0,O=F=1,z=Z="",P=b;break;case 58:P=1+$o(Z),L=R;default:if(O<1){if(D==123)--O;else if(D==125&&O++==0&&rx()==125)continue}switch(Z+=hf(D),D*O){case 38:F=S>0?1:(Z+="\f",-1);break;case 44:k[_++]=($o(Z)-1)*F,F=1;break;case 64:oi()===45&&(Z+=n0(so())),N=oi(),S=P=$o(z=Z+=sx(t0())),D++;break;case 45:R===45&&$o(Z)==2&&(O=0)}}return d}function ub(t,r,s,u,p,d,b,k,y,_,S){for(var P=p-1,N=p===0?d:[""],L=Yp(N),R=0,O=0,q=0;R0?N[F]+" "+D:tn(D,/&\f/g,N[F])))&&(y[q++]=z);return gf(t,r,s,p===0?Gp:k,y,_,S)}function cx(t,r,s){return gf(t,r,s,o6,hf(nx()),Ec(t,2,-2),0)}function fb(t,r,s,u){return gf(t,r,s,Qp,Ec(t,0,u),Ec(t,u+1,-1),u)}function Ws(t,r){for(var s="",u=Yp(t),p=0;p6)switch(hr(t,r+1)){case 109:if(hr(t,r+4)!==45)break;case 102:return tn(t,/(.+:)(.+)-([^]+)/,"$1"+en+"$2-$3$1"+L0+(hr(t,r+3)==108?"$3":"$2-$3"))+t;case 115:return~P1(t,"stretch")?u6(tn(t,"stretch","fill-available"),r)+t:t}break;case 4949:if(hr(t,r+1)!==115)break;case 6444:switch(hr(t,$o(t)-3-(~P1(t,"!important")&&10))){case 107:return tn(t,":",":"+en)+t;case 101:return tn(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+en+(hr(t,14)===45?"inline-":"")+"box$3$1"+en+"$2$3$1"+Ar+"$2box$3")+t}break;case 5936:switch(hr(t,r+11)){case 114:return en+t+Ar+tn(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return en+t+Ar+tn(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return en+t+Ar+tn(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return en+t+Ar+t+t}return t}var vx=function(r,s,u,p){if(r.length>-1&&!r.return)switch(r.type){case Qp:r.return=u6(r.value,r.length);break;case i6:return Ws([jl(r,{value:tn(r.value,"@","@"+en)})],p);case Gp:if(r.length)return tx(r.props,function(d){switch(ex(d,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ws([jl(r,{props:[tn(d,/:(read-\w+)/,":"+L0+"$1")]})],p);case"::placeholder":return Ws([jl(r,{props:[tn(d,/:(plac\w+)/,":"+en+"input-$1")]}),jl(r,{props:[tn(d,/:(plac\w+)/,":"+L0+"$1")]}),jl(r,{props:[tn(d,/:(plac\w+)/,Ar+"input-$1")]})],p)}return""})}},kx=[vx],f6=function(r){var s=r.key;if(s==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(O){var q=O.getAttribute("data-emotion");q.indexOf(" ")!==-1&&(document.head.appendChild(O),O.setAttribute("data-s",""))})}var p=r.stylisPlugins||kx,d={},b,k=[];b=r.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+s+' "]'),function(O){for(var q=O.getAttribute("data-emotion").split(" "),F=1;F=4;++u,p-=4)s=t.charCodeAt(u)&255|(t.charCodeAt(++u)&255)<<8|(t.charCodeAt(++u)&255)<<16|(t.charCodeAt(++u)&255)<<24,s=(s&65535)*1540483477+((s>>>16)*59797<<16),s^=s>>>24,r=(s&65535)*1540483477+((s>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(p){case 3:r^=(t.charCodeAt(u+2)&255)<<16;case 2:r^=(t.charCodeAt(u+1)&255)<<8;case 1:r^=t.charCodeAt(u)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var Ix={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Rx=/[A-Z]|^ms/g,Tx=/_EMO_([^_]+?)_([^]*?)_EMO_/g,v6=function(r){return r.charCodeAt(1)===45},pb=function(r){return r!=null&&typeof r!="boolean"},k2=r6(function(t){return v6(t)?t:t.replace(Rx,"-$&").toLowerCase()}),hb=function(r,s){switch(r){case"animation":case"animationName":if(typeof s=="string")return s.replace(Tx,function(u,p,d){return ei={name:p,styles:d,next:ei},p})}return Ix[r]!==1&&!v6(r)&&typeof s=="number"&&s!==0?s+"px":s};function Mc(t,r,s){if(s==null)return"";if(s.__emotion_styles!==void 0)return s;switch(typeof s){case"boolean":return"";case"object":{if(s.anim===1)return ei={name:s.name,styles:s.styles,next:ei},s.name;if(s.styles!==void 0){var u=s.next;if(u!==void 0)for(;u!==void 0;)ei={name:u.name,styles:u.styles,next:ei},u=u.next;var p=s.styles+";";return p}return Fx(t,r,s)}case"function":{if(t!==void 0){var d=ei,b=s(t);return ei=d,Mc(t,r,b)}break}}if(r==null)return s;var k=r[s];return k!==void 0?k:s}function Fx(t,r,s){var u="";if(Array.isArray(s))for(var p=0;p96?jx:zx},kb=function(r,s,u){var p;if(s){var d=s.shouldForwardProp;p=r.__emotion_forwardProp&&d?function(b){return r.__emotion_forwardProp(b)&&d(b)}:d}return typeof p!="function"&&u&&(p=r.__emotion_forwardProp),p},Vx=function(r){var s=r.cache,u=r.serialized,p=r.isStringTag;return g6(s,u,p),Dx(function(){return b6(s,u,p)}),null},Wx=function t(r,s){var u=r.__emotion_real===r,p=u&&r.__emotion_base||r,d,b;s!==void 0&&(d=s.label,b=s.target);var k=kb(r,s,u),y=k||vb(p),_=!y("as");return function(){var S=arguments,P=u&&r.__emotion_styles!==void 0?r.__emotion_styles.slice(0):[];if(d!==void 0&&P.push("label:"+d+";"),S[0]==null||S[0].raw===void 0)P.push.apply(P,S);else{P.push(S[0][0]);for(var N=S.length,L=1;Lr(Gx(p)?s:p):r;return j.jsx(Bx,{styles:u})}function Jp(t,r){return N1(t,r)}const x6=(t,r)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=r(t.__emotion_styles))},Qx=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:C6,StyledEngineProvider:Hx,ThemeContext:Bc,css:A6,default:Jp,internal_processStyles:x6,keyframes:Ef},Symbol.toStringTag,{value:"Module"}));function vi(t){if(typeof t!="object"||t===null)return!1;const r=Object.getPrototypeOf(t);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function S6(t){if(!vi(t))return t;const r={};return Object.keys(t).forEach(s=>{r[s]=S6(t[s])}),r}function Tr(t,r,s={clone:!0}){const u=s.clone?Q({},t):t;return vi(t)&&vi(r)&&Object.keys(r).forEach(p=>{p!=="__proto__"&&(vi(r[p])&&p in t&&vi(t[p])?u[p]=Tr(t[p],r[p],s):s.clone?u[p]=vi(r[p])?S6(r[p]):r[p]:u[p]=r[p])}),u}const Yx=Object.freeze(Object.defineProperty({__proto__:null,default:Tr,isPlainObject:vi},Symbol.toStringTag,{value:"Module"})),Kx=["values","unit","step"],Xx=t=>{const r=Object.keys(t).map(s=>({key:s,val:t[s]}))||[];return r.sort((s,u)=>s.val-u.val),r.reduce((s,u)=>Q({},s,{[u.key]:u.val}),{})};function E6(t){const{values:r={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:s="px",step:u=5}=t,p=Xe(t,Kx),d=Xx(r),b=Object.keys(d);function k(N){return`@media (min-width:${typeof r[N]=="number"?r[N]:N}${s})`}function y(N){return`@media (max-width:${(typeof r[N]=="number"?r[N]:N)-u/100}${s})`}function _(N,L){const R=b.indexOf(L);return`@media (min-width:${typeof r[N]=="number"?r[N]:N}${s}) and (max-width:${(R!==-1&&typeof r[b[R]]=="number"?r[b[R]]:L)-u/100}${s})`}function S(N){return b.indexOf(N)+1`@media (min-width:${$p[t]}px)`};function qr(t,r,s){const u=t.theme||{};if(Array.isArray(r)){const d=u.breakpoints||yb;return r.reduce((b,k,y)=>(b[d.up(d.keys[y])]=s(r[y]),b),{})}if(typeof r=="object"){const d=u.breakpoints||yb;return Object.keys(r).reduce((b,k)=>{if(Object.keys(d.values||$p).indexOf(k)!==-1){const y=d.up(k);b[y]=s(r[k],k)}else{const y=k;b[y]=r[y]}return b},{})}return s(r)}function P6(t={}){var r;return((r=t.keys)==null?void 0:r.reduce((u,p)=>{const d=t.up(p);return u[d]={},u},{}))||{}}function M6(t,r){return t.reduce((s,u)=>{const p=s[u];return(!p||Object.keys(p).length===0)&&delete s[u],s},r)}function Jx(t,...r){const s=P6(t),u=[s,...r].reduce((p,d)=>Tr(p,d),{});return M6(Object.keys(s),u)}function $x(t,r){if(typeof t!="object")return{};const s={},u=Object.keys(r);return Array.isArray(t)?u.forEach((p,d)=>{d{t[p]!=null&&(s[p]=!0)}),s}function Ia({values:t,breakpoints:r,base:s}){const u=s||$x(t,r),p=Object.keys(u);if(p.length===0)return t;let d;return p.reduce((b,k,y)=>(Array.isArray(t)?(b[k]=t[y]!=null?t[y]:t[d],d=y):typeof t=="object"?(b[k]=t[k]!=null?t[k]:t[d],d=k):b[k]=t,b),{})}function $e(t){if(typeof t!="string")throw new Error(za(7));return t.charAt(0).toUpperCase()+t.slice(1)}const eS=Object.freeze(Object.defineProperty({__proto__:null,default:$e},Symbol.toStringTag,{value:"Module"}));function Pf(t,r,s=!0){if(!r||typeof r!="string")return null;if(t&&t.vars&&s){const u=`vars.${r}`.split(".").reduce((p,d)=>p&&p[d]?p[d]:null,t);if(u!=null)return u}return r.split(".").reduce((u,p)=>u&&u[p]!=null?u[p]:null,t)}function D0(t,r,s,u=s){let p;return typeof t=="function"?p=t(s):Array.isArray(t)?p=t[s]||u:p=Pf(t,s)||u,r&&(p=r(p,u,t)),p}function Yn(t){const{prop:r,cssProperty:s=t.prop,themeKey:u,transform:p}=t,d=b=>{if(b[r]==null)return null;const k=b[r],y=b.theme,_=Pf(y,u)||{};return qr(b,k,P=>{let N=D0(_,p,P);return P===N&&typeof P=="string"&&(N=D0(_,p,`${r}${P==="default"?"":$e(P)}`,P)),s===!1?N:{[s]:N}})};return d.propTypes={},d.filterProps=[r],d}function tS(t){const r={};return s=>(r[s]===void 0&&(r[s]=t(s)),r[s])}const nS={m:"margin",p:"padding"},rS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},_b={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},oS=tS(t=>{if(t.length>2)if(_b[t])t=_b[t];else return[t];const[r,s]=t.split(""),u=nS[r],p=rS[s]||"";return Array.isArray(p)?p.map(d=>u+d):[u+p]}),eh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],th=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...eh,...th];function jc(t,r,s,u){var p;const d=(p=Pf(t,r,!1))!=null?p:s;return typeof d=="number"?b=>typeof b=="string"?b:d*b:Array.isArray(d)?b=>typeof b=="string"?b:d[b]:typeof d=="function"?d:()=>{}}function nh(t){return jc(t,"spacing",8)}function Wa(t,r){if(typeof r=="string"||r==null)return r;const s=Math.abs(r),u=t(s);return r>=0?u:typeof u=="number"?-u:`-${u}`}function iS(t,r){return s=>t.reduce((u,p)=>(u[p]=Wa(r,s),u),{})}function aS(t,r,s,u){if(r.indexOf(s)===-1)return null;const p=oS(s),d=iS(p,u),b=t[s];return qr(t,b,d)}function N6(t,r){const s=nh(t.theme);return Object.keys(t).map(u=>aS(t,r,u,s)).reduce(ac,{})}function jn(t){return N6(t,eh)}jn.propTypes={};jn.filterProps=eh;function zn(t){return N6(t,th)}zn.propTypes={};zn.filterProps=th;function sS(t=8){if(t.mui)return t;const r=nh({spacing:t}),s=(...u)=>(u.length===0?[1]:u).map(d=>{const b=r(d);return typeof b=="number"?`${b}px`:b}).join(" ");return s.mui=!0,s}function Mf(...t){const r=t.reduce((u,p)=>(p.filterProps.forEach(d=>{u[d]=p}),u),{}),s=u=>Object.keys(u).reduce((p,d)=>r[d]?ac(p,r[d](u)):p,{});return s.propTypes={},s.filterProps=t.reduce((u,p)=>u.concat(p.filterProps),[]),s}function ko(t){return typeof t!="number"?t:`${t}px solid`}function Eo(t,r){return Yn({prop:t,themeKey:"borders",transform:r})}const lS=Eo("border",ko),cS=Eo("borderTop",ko),uS=Eo("borderRight",ko),fS=Eo("borderBottom",ko),dS=Eo("borderLeft",ko),pS=Eo("borderColor"),hS=Eo("borderTopColor"),mS=Eo("borderRightColor"),gS=Eo("borderBottomColor"),bS=Eo("borderLeftColor"),vS=Eo("outline",ko),kS=Eo("outlineColor"),Nf=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const r=jc(t.theme,"shape.borderRadius",4),s=u=>({borderRadius:Wa(r,u)});return qr(t,t.borderRadius,s)}return null};Nf.propTypes={};Nf.filterProps=["borderRadius"];Mf(lS,cS,uS,fS,dS,pS,hS,mS,gS,bS,Nf,vS,kS);const If=t=>{if(t.gap!==void 0&&t.gap!==null){const r=jc(t.theme,"spacing",8),s=u=>({gap:Wa(r,u)});return qr(t,t.gap,s)}return null};If.propTypes={};If.filterProps=["gap"];const Rf=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const r=jc(t.theme,"spacing",8),s=u=>({columnGap:Wa(r,u)});return qr(t,t.columnGap,s)}return null};Rf.propTypes={};Rf.filterProps=["columnGap"];const Tf=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const r=jc(t.theme,"spacing",8),s=u=>({rowGap:Wa(r,u)});return qr(t,t.rowGap,s)}return null};Tf.propTypes={};Tf.filterProps=["rowGap"];const yS=Yn({prop:"gridColumn"}),_S=Yn({prop:"gridRow"}),wS=Yn({prop:"gridAutoFlow"}),AS=Yn({prop:"gridAutoColumns"}),CS=Yn({prop:"gridAutoRows"}),xS=Yn({prop:"gridTemplateColumns"}),SS=Yn({prop:"gridTemplateRows"}),ES=Yn({prop:"gridTemplateAreas"}),PS=Yn({prop:"gridArea"});Mf(If,Rf,Tf,yS,_S,wS,AS,CS,xS,SS,ES,PS);function Us(t,r){return r==="grey"?r:t}const MS=Yn({prop:"color",themeKey:"palette",transform:Us}),NS=Yn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Us}),IS=Yn({prop:"backgroundColor",themeKey:"palette",transform:Us});Mf(MS,NS,IS);function no(t){return t<=1&&t!==0?`${t*100}%`:t}const RS=Yn({prop:"width",transform:no}),rh=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const r=s=>{var u,p;const d=((u=t.theme)==null||(u=u.breakpoints)==null||(u=u.values)==null?void 0:u[s])||$p[s];return d?((p=t.theme)==null||(p=p.breakpoints)==null?void 0:p.unit)!=="px"?{maxWidth:`${d}${t.theme.breakpoints.unit}`}:{maxWidth:d}:{maxWidth:no(s)}};return qr(t,t.maxWidth,r)}return null};rh.filterProps=["maxWidth"];const TS=Yn({prop:"minWidth",transform:no}),FS=Yn({prop:"height",transform:no}),LS=Yn({prop:"maxHeight",transform:no}),DS=Yn({prop:"minHeight",transform:no});Yn({prop:"size",cssProperty:"width",transform:no});Yn({prop:"size",cssProperty:"height",transform:no});const OS=Yn({prop:"boxSizing"});Mf(RS,rh,TS,FS,LS,DS,OS);const BS={border:{themeKey:"borders",transform:ko},borderTop:{themeKey:"borders",transform:ko},borderRight:{themeKey:"borders",transform:ko},borderBottom:{themeKey:"borders",transform:ko},borderLeft:{themeKey:"borders",transform:ko},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ko},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Nf},color:{themeKey:"palette",transform:Us},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Us},backgroundColor:{themeKey:"palette",transform:Us},p:{style:zn},pt:{style:zn},pr:{style:zn},pb:{style:zn},pl:{style:zn},px:{style:zn},py:{style:zn},padding:{style:zn},paddingTop:{style:zn},paddingRight:{style:zn},paddingBottom:{style:zn},paddingLeft:{style:zn},paddingX:{style:zn},paddingY:{style:zn},paddingInline:{style:zn},paddingInlineStart:{style:zn},paddingInlineEnd:{style:zn},paddingBlock:{style:zn},paddingBlockStart:{style:zn},paddingBlockEnd:{style:zn},m:{style:jn},mt:{style:jn},mr:{style:jn},mb:{style:jn},ml:{style:jn},mx:{style:jn},my:{style:jn},margin:{style:jn},marginTop:{style:jn},marginRight:{style:jn},marginBottom:{style:jn},marginLeft:{style:jn},marginX:{style:jn},marginY:{style:jn},marginInline:{style:jn},marginInlineStart:{style:jn},marginInlineEnd:{style:jn},marginBlock:{style:jn},marginBlockStart:{style:jn},marginBlockEnd:{style:jn},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:If},rowGap:{style:Tf},columnGap:{style:Rf},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:no},maxWidth:{style:rh},minWidth:{transform:no},height:{transform:no},maxHeight:{transform:no},minHeight:{transform:no},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},zc=BS;function jS(...t){const r=t.reduce((u,p)=>u.concat(Object.keys(p)),[]),s=new Set(r);return t.every(u=>s.size===Object.keys(u).length)}function zS(t,r){return typeof t=="function"?t(r):t}function I6(){function t(s,u,p,d){const b={[s]:u,theme:p},k=d[s];if(!k)return{[s]:u};const{cssProperty:y=s,themeKey:_,transform:S,style:P}=k;if(u==null)return null;if(_==="typography"&&u==="inherit")return{[s]:u};const N=Pf(p,_)||{};return P?P(b):qr(b,u,R=>{let O=D0(N,S,R);return R===O&&typeof R=="string"&&(O=D0(N,S,`${s}${R==="default"?"":$e(R)}`,R)),y===!1?O:{[y]:O}})}function r(s){var u;const{sx:p,theme:d={}}=s||{};if(!p)return null;const b=(u=d.unstable_sxConfig)!=null?u:zc;function k(y){let _=y;if(typeof y=="function")_=y(d);else if(typeof y!="object")return y;if(!_)return null;const S=P6(d.breakpoints),P=Object.keys(S);let N=S;return Object.keys(_).forEach(L=>{const R=zS(_[L],d);if(R!=null)if(typeof R=="object")if(b[L])N=ac(N,t(L,R,d,b));else{const O=qr({theme:d},R,q=>({[L]:q}));jS(O,R)?N[L]=r({sx:R,theme:d}):N=ac(N,O)}else N=ac(N,t(L,R,d,b))}),M6(P,N)}return Array.isArray(p)?p.map(k):k(p)}return r}const sl=I6();sl.filterProps=["sx"];function R6(t,r){const s=this;return s.vars&&typeof s.getColorSchemeSelector=="function"?{[s.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:r}:s.palette.mode===t?r:{}}const VS=["breakpoints","palette","spacing","shape"];function Vc(t={},...r){const{breakpoints:s={},palette:u={},spacing:p,shape:d={}}=t,b=Xe(t,VS),k=E6(s),y=sS(p);let _=Tr({breakpoints:k,direction:"ltr",components:{},palette:Q({mode:"light"},u),spacing:y,shape:Q({},Zx,d)},b);return _.applyStyles=R6,_=r.reduce((S,P)=>Tr(S,P),_),_.unstable_sxConfig=Q({},zc,b==null?void 0:b.unstable_sxConfig),_.unstable_sx=function(P){return sl({sx:P,theme:this})},_}const WS=Object.freeze(Object.defineProperty({__proto__:null,default:Vc,private_createBreakpoints:E6,unstable_applyStyles:R6},Symbol.toStringTag,{value:"Module"}));function US(t){return Object.keys(t).length===0}function oh(t=null){const r=$.useContext(Bc);return!r||US(r)?t:r}const HS=Vc();function Ff(t=HS){return oh(t)}function GS({styles:t,themeId:r,defaultTheme:s={}}){const u=Ff(s),p=typeof t=="function"?t(r&&u[r]||u):t;return j.jsx(C6,{styles:p})}const QS=["sx"],YS=t=>{var r,s;const u={systemProps:{},otherProps:{}},p=(r=t==null||(s=t.theme)==null?void 0:s.unstable_sxConfig)!=null?r:zc;return Object.keys(t).forEach(d=>{p[d]?u.systemProps[d]=t[d]:u.otherProps[d]=t[d]}),u};function Wc(t){const{sx:r}=t,s=Xe(t,QS),{systemProps:u,otherProps:p}=YS(s);let d;return Array.isArray(r)?d=[u,...r]:typeof r=="function"?d=(...b)=>{const k=r(...b);return vi(k)?Q({},u,k):u}:d=Q({},u,r),Q({},p,{sx:d})}const KS=Object.freeze(Object.defineProperty({__proto__:null,default:sl,extendSxProp:Wc,unstable_createStyleFunctionSx:I6,unstable_defaultSxConfig:zc},Symbol.toStringTag,{value:"Module"})),wb=t=>t,XS=()=>{let t=wb;return{configure(r){t=r},generate(r){return t(r)},reset(){t=wb}}},qS=XS(),T6=qS;function F6(t){var r,s,u="";if(typeof t=="string"||typeof t=="number")u+=t;else if(typeof t=="object")if(Array.isArray(t)){var p=t.length;for(r=0;rk!=="theme"&&k!=="sx"&&k!=="as"})(sl);return $.forwardRef(function(y,_){const S=Ff(s),P=Wc(y),{className:N,component:L="div"}=P,R=Xe(P,ZS);return j.jsx(d,Q({as:L,ref:_,className:et(N,p?p(u):u),theme:r&&S[r]||S},R))})}const $S={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function vt(t,r,s="Mui"){const u=$S[r];return u?`${s}-${u}`:`${T6.generate(t)}-${r}`}function bt(t,r,s="Mui"){const u={};return r.forEach(p=>{u[p]=vt(t,p,s)}),u}var L6={exports:{}},un={};/** + * @license React + * react-is.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 ih=Symbol.for("react.element"),ah=Symbol.for("react.portal"),Lf=Symbol.for("react.fragment"),Df=Symbol.for("react.strict_mode"),Of=Symbol.for("react.profiler"),Bf=Symbol.for("react.provider"),jf=Symbol.for("react.context"),e7=Symbol.for("react.server_context"),zf=Symbol.for("react.forward_ref"),Vf=Symbol.for("react.suspense"),Wf=Symbol.for("react.suspense_list"),Uf=Symbol.for("react.memo"),Hf=Symbol.for("react.lazy"),t7=Symbol.for("react.offscreen"),D6;D6=Symbol.for("react.module.reference");function Po(t){if(typeof t=="object"&&t!==null){var r=t.$$typeof;switch(r){case ih:switch(t=t.type,t){case Lf:case Of:case Df:case Vf:case Wf:return t;default:switch(t=t&&t.$$typeof,t){case e7:case jf:case zf:case Hf:case Uf:case Bf:return t;default:return r}}case ah:return r}}}un.ContextConsumer=jf;un.ContextProvider=Bf;un.Element=ih;un.ForwardRef=zf;un.Fragment=Lf;un.Lazy=Hf;un.Memo=Uf;un.Portal=ah;un.Profiler=Of;un.StrictMode=Df;un.Suspense=Vf;un.SuspenseList=Wf;un.isAsyncMode=function(){return!1};un.isConcurrentMode=function(){return!1};un.isContextConsumer=function(t){return Po(t)===jf};un.isContextProvider=function(t){return Po(t)===Bf};un.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===ih};un.isForwardRef=function(t){return Po(t)===zf};un.isFragment=function(t){return Po(t)===Lf};un.isLazy=function(t){return Po(t)===Hf};un.isMemo=function(t){return Po(t)===Uf};un.isPortal=function(t){return Po(t)===ah};un.isProfiler=function(t){return Po(t)===Of};un.isStrictMode=function(t){return Po(t)===Df};un.isSuspense=function(t){return Po(t)===Vf};un.isSuspenseList=function(t){return Po(t)===Wf};un.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Lf||t===Of||t===Df||t===Vf||t===Wf||t===t7||typeof t=="object"&&t!==null&&(t.$$typeof===Hf||t.$$typeof===Uf||t.$$typeof===Bf||t.$$typeof===jf||t.$$typeof===zf||t.$$typeof===D6||t.getModuleId!==void 0)};un.typeOf=Po;L6.exports=un;var Ab=L6.exports;const n7=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function O6(t){const r=`${t}`.match(n7);return r&&r[1]||""}function B6(t,r=""){return t.displayName||t.name||O6(t)||r}function Cb(t,r,s){const u=B6(r);return t.displayName||(u!==""?`${s}(${u})`:s)}function r7(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return B6(t,"Component");if(typeof t=="object")switch(t.$$typeof){case Ab.ForwardRef:return Cb(t,t.render,"ForwardRef");case Ab.Memo:return Cb(t,t.type,"memo");default:return}}}const o7=Object.freeze(Object.defineProperty({__proto__:null,default:r7,getFunctionName:O6},Symbol.toStringTag,{value:"Module"})),i7=["ownerState"],a7=["variants"],s7=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function l7(t){return Object.keys(t).length===0}function c7(t){return typeof t=="string"&&t.charCodeAt(0)>96}function _2(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const u7=Vc(),f7=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Ru({defaultTheme:t,theme:r,themeId:s}){return l7(r)?t:r[s]||r}function d7(t){return t?(r,s)=>s[t]:null}function o0(t,r){let{ownerState:s}=r,u=Xe(r,i7);const p=typeof t=="function"?t(Q({ownerState:s},u)):t;if(Array.isArray(p))return p.flatMap(d=>o0(d,Q({ownerState:s},u)));if(p&&typeof p=="object"&&Array.isArray(p.variants)){const{variants:d=[]}=p;let k=Xe(p,a7);return d.forEach(y=>{let _=!0;typeof y.props=="function"?_=y.props(Q({ownerState:s},u,s)):Object.keys(y.props).forEach(S=>{(s==null?void 0:s[S])!==y.props[S]&&u[S]!==y.props[S]&&(_=!1)}),_&&(Array.isArray(k)||(k=[k]),k.push(typeof y.style=="function"?y.style(Q({ownerState:s},u,s)):y.style))}),k}return p}function p7(t={}){const{themeId:r,defaultTheme:s=u7,rootShouldForwardProp:u=_2,slotShouldForwardProp:p=_2}=t,d=b=>sl(Q({},b,{theme:Ru(Q({},b,{defaultTheme:s,themeId:r}))}));return d.__mui_systemSx=!0,(b,k={})=>{x6(b,U=>U.filter(ee=>!(ee!=null&&ee.__mui_systemSx)));const{name:y,slot:_,skipVariantsResolver:S,skipSx:P,overridesResolver:N=d7(f7(_))}=k,L=Xe(k,s7),R=S!==void 0?S:_&&_!=="Root"&&_!=="root"||!1,O=P||!1;let q,F=_2;_==="Root"||_==="root"?F=u:_?F=p:c7(b)&&(F=void 0);const D=Jp(b,Q({shouldForwardProp:F,label:q},L)),z=U=>typeof U=="function"&&U.__emotion_real!==U||vi(U)?ee=>o0(U,Q({},ee,{theme:Ru({theme:ee.theme,defaultTheme:s,themeId:r})})):U,Y=(U,...ee)=>{let Z=z(U);const X=ee?ee.map(z):[];y&&N&&X.push(me=>{const pe=Ru(Q({},me,{defaultTheme:s,themeId:r}));if(!pe.components||!pe.components[y]||!pe.components[y].styleOverrides)return null;const xe=pe.components[y].styleOverrides,we={};return Object.entries(xe).forEach(([ge,_e])=>{we[ge]=o0(_e,Q({},me,{theme:pe}))}),N(me,we)}),y&&!R&&X.push(me=>{var pe;const xe=Ru(Q({},me,{defaultTheme:s,themeId:r})),we=xe==null||(pe=xe.components)==null||(pe=pe[y])==null?void 0:pe.variants;return o0({variants:we},Q({},me,{theme:xe}))}),O||X.push(d);const de=X.length-ee.length;if(Array.isArray(U)&&de>0){const me=new Array(de).fill("");Z=[...U,...me],Z.raw=[...U.raw,...me]}const le=D(Z,...X);return b.muiName&&(le.muiName=b.muiName),le};return D.withConfig&&(Y.withConfig=D.withConfig),Y}}const h7=p7();function sh(t,r){const s=Q({},r);return Object.keys(t).forEach(u=>{if(u.toString().match(/^(components|slots)$/))s[u]=Q({},t[u],s[u]);else if(u.toString().match(/^(componentsProps|slotProps)$/)){const p=t[u]||{},d=r[u];s[u]={},!d||!Object.keys(d)?s[u]=p:!p||!Object.keys(p)?s[u]=d:(s[u]=Q({},d),Object.keys(p).forEach(b=>{s[u][b]=sh(p[b],d[b])}))}else s[u]===void 0&&(s[u]=t[u])}),s}function j6(t){const{theme:r,name:s,props:u}=t;return!r||!r.components||!r.components[s]||!r.components[s].defaultProps?u:sh(r.components[s].defaultProps,u)}function z6({props:t,name:r,defaultTheme:s,themeId:u}){let p=Ff(s);return u&&(p=p[u]||p),j6({theme:p,name:r,props:t})}const xo=typeof window<"u"?$.useLayoutEffect:$.useEffect;function m7(t,r,s,u,p){const[d,b]=$.useState(()=>p&&s?s(t).matches:u?u(t).matches:r);return xo(()=>{let k=!0;if(!s)return;const y=s(t),_=()=>{k&&b(y.matches)};return _(),y.addListener(_),()=>{k=!1,y.removeListener(_)}},[t,s]),d}const V6=$.useSyncExternalStore;function g7(t,r,s,u,p){const d=$.useCallback(()=>r,[r]),b=$.useMemo(()=>{if(p&&s)return()=>s(t).matches;if(u!==null){const{matches:S}=u(t);return()=>S}return d},[d,t,u,p,s]),[k,y]=$.useMemo(()=>{if(s===null)return[d,()=>()=>{}];const S=s(t);return[()=>S.matches,P=>(S.addListener(P),()=>{S.removeListener(P)})]},[d,s,t]);return V6(y,k,b)}function b7(t,r={}){const s=oh(),u=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:p=!1,matchMedia:d=u?window.matchMedia:null,ssrMatchMedia:b=null,noSsr:k=!1}=j6({name:"MuiUseMediaQuery",props:r,theme:s});let y=typeof t=="function"?t(s):t;return y=y.replace(/^@media( ?)/m,""),(V6!==void 0?g7:m7)(y,p,d,b,k)}function ks(t,r=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER){return Math.max(r,Math.min(t,s))}const v7=Object.freeze(Object.defineProperty({__proto__:null,default:ks},Symbol.toStringTag,{value:"Module"}));function xb(...t){return t.reduce((r,s)=>s==null?r:function(...p){r.apply(this,p),s.apply(this,p)},()=>{})}function lh(t,r=166){let s;function u(...p){const d=()=>{t.apply(this,p)};clearTimeout(s),s=setTimeout(d,r)}return u.clear=()=>{clearTimeout(s)},u}function i0(t,r){var s,u;return $.isValidElement(t)&&r.indexOf((s=t.type.muiName)!=null?s:(u=t.type)==null||(u=u._payload)==null||(u=u.value)==null?void 0:u.muiName)!==-1}function Jn(t){return t&&t.ownerDocument||document}function Mi(t){return Jn(t).defaultView||window}function R1(t,r){typeof t=="function"?t(r):t&&(t.current=r)}let Sb=0;function k7(t){const[r,s]=$.useState(t),u=t||r;return $.useEffect(()=>{r==null&&(Sb+=1,s(`mui-${Sb}`))},[r]),u}const Eb=F2.useId;function ch(t){if(Eb!==void 0){const r=Eb();return t??r}return k7(t)}function O0({controlled:t,default:r,name:s,state:u="value"}){const{current:p}=$.useRef(t!==void 0),[d,b]=$.useState(r),k=p?t:d,y=$.useCallback(_=>{p||b(_)},[]);return[k,y]}function _o(t){const r=$.useRef(t);return xo(()=>{r.current=t}),$.useRef((...s)=>(0,r.current)(...s)).current}function Un(...t){return $.useMemo(()=>t.every(r=>r==null)?null:r=>{t.forEach(s=>{R1(s,r)})},t)}const Pb={};function y7(t,r){const s=$.useRef(Pb);return s.current===Pb&&(s.current=t(r)),s}const _7=[];function w7(t){$.useEffect(t,_7)}class Gf{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Gf}start(r,s){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,s()},r)}}function uh(){const t=y7(Gf.create).current;return w7(t.disposeEffect),t}let Qf=!0,T1=!1;const A7=new Gf,C7={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function x7(t){const{type:r,tagName:s}=t;return!!(s==="INPUT"&&C7[r]&&!t.readOnly||s==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function S7(t){t.metaKey||t.altKey||t.ctrlKey||(Qf=!0)}function w2(){Qf=!1}function E7(){this.visibilityState==="hidden"&&T1&&(Qf=!0)}function P7(t){t.addEventListener("keydown",S7,!0),t.addEventListener("mousedown",w2,!0),t.addEventListener("pointerdown",w2,!0),t.addEventListener("touchstart",w2,!0),t.addEventListener("visibilitychange",E7,!0)}function M7(t){const{target:r}=t;try{return r.matches(":focus-visible")}catch{}return Qf||x7(r)}function W6(){const t=$.useCallback(p=>{p!=null&&P7(p.ownerDocument)},[]),r=$.useRef(!1);function s(){return r.current?(T1=!0,A7.start(100,()=>{T1=!1}),r.current=!1,!0):!1}function u(p){return M7(p)?(r.current=!0,!0):!1}return{isFocusVisibleRef:r,onFocus:u,onBlur:s,ref:t}}function U6(t){const r=t.documentElement.clientWidth;return Math.abs(window.innerWidth-r)}const N7={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},I7=N7;function _t(t,r,s=void 0){const u={};return Object.keys(t).forEach(p=>{u[p]=t[p].reduce((d,b)=>{if(b){const k=r(b);k!==""&&d.push(k),s&&s[b]&&d.push(s[b])}return d},[]).join(" ")}),u}const R7=$.createContext(null),H6=R7;function G6(){return $.useContext(H6)}const T7=typeof Symbol=="function"&&Symbol.for,F7=T7?Symbol.for("mui.nested"):"__THEME_NESTED__";function L7(t,r){return typeof r=="function"?r(t):Q({},t,r)}function D7(t){const{children:r,theme:s}=t,u=G6(),p=$.useMemo(()=>{const d=u===null?s:L7(u,s);return d!=null&&(d[F7]=u!==null),d},[s,u]);return j.jsx(H6.Provider,{value:p,children:r})}const Mb={};function Nb(t,r,s,u=!1){return $.useMemo(()=>{const p=t&&r[t]||r;if(typeof s=="function"){const d=s(p),b=t?Q({},r,{[t]:d}):d;return u?()=>b:b}return t?Q({},r,{[t]:s}):Q({},r,s)},[t,r,s,u])}function O7(t){const{children:r,theme:s,themeId:u}=t,p=oh(Mb),d=G6()||Mb,b=Nb(u,p,s),k=Nb(u,d,s,!0);return j.jsx(D7,{theme:k,children:j.jsx(Bc.Provider,{value:b,children:r})})}const B7=["component","direction","spacing","divider","children","className","useFlexGap"],j7=Vc(),z7=h7("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,r)=>r.root});function V7(t){return z6({props:t,name:"MuiStack",defaultTheme:j7})}function W7(t,r){const s=$.Children.toArray(t).filter(Boolean);return s.reduce((u,p,d)=>(u.push(p),d({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],H7=({ownerState:t,theme:r})=>{let s=Q({display:"flex",flexDirection:"column"},qr({theme:r},Ia({values:t.direction,breakpoints:r.breakpoints.values}),u=>({flexDirection:u})));if(t.spacing){const u=nh(r),p=Object.keys(r.breakpoints.values).reduce((y,_)=>((typeof t.spacing=="object"&&t.spacing[_]!=null||typeof t.direction=="object"&&t.direction[_]!=null)&&(y[_]=!0),y),{}),d=Ia({values:t.direction,base:p}),b=Ia({values:t.spacing,base:p});typeof d=="object"&&Object.keys(d).forEach((y,_,S)=>{if(!d[y]){const N=_>0?d[S[_-1]]:"column";d[y]=N}}),s=Tr(s,qr({theme:r},b,(y,_)=>t.useFlexGap?{gap:Wa(u,y)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${U7(_?d[_]:t.direction)}`]:Wa(u,y)}}))}return s=Jx(r.breakpoints,s),s};function G7(t={}){const{createStyledComponent:r=z7,useThemeProps:s=V7,componentName:u="MuiStack"}=t,p=()=>_t({root:["root"]},y=>vt(u,y),{}),d=r(H7);return $.forwardRef(function(y,_){const S=s(y),P=Wc(S),{component:N="div",direction:L="column",spacing:R=0,divider:O,children:q,className:F,useFlexGap:D=!1}=P,z=Xe(P,B7),Y={direction:L,spacing:R,useFlexGap:D},U=p();return j.jsx(d,Q({as:N,ownerState:Y,ref:_,className:et(U.root,F)},z,{children:O?W7(q,O):q}))})}function Q7(t,r){return Q({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},r)}var Kn={},Q6={exports:{}};(function(t){function r(s){return s&&s.__esModule?s:{default:s}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(Q6);var Y6=Q6.exports;const Y7=la(U5),K7=la(v7);var K6=Y6;Object.defineProperty(Kn,"__esModule",{value:!0});var Mn=Kn.alpha=J6;Kn.blend=aE;Kn.colorChannel=void 0;var B0=Kn.darken=dh;Kn.decomposeColor=So;var X7=Kn.emphasize=iE,q7=Kn.getContrastRatio=tE;Kn.getLuminance=z0;Kn.hexToRgb=X6;Kn.hslToRgb=Z6;var j0=Kn.lighten=ph;Kn.private_safeAlpha=nE;Kn.private_safeColorChannel=void 0;Kn.private_safeDarken=rE;Kn.private_safeEmphasize=$6;Kn.private_safeLighten=oE;Kn.recomposeColor=ll;Kn.rgbToHex=eE;var Ib=K6(Y7),Z7=K6(K7);function fh(t,r=0,s=1){return(0,Z7.default)(t,r,s)}function X6(t){t=t.slice(1);const r=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let s=t.match(r);return s&&s[0].length===1&&(s=s.map(u=>u+u)),s?`rgb${s.length===4?"a":""}(${s.map((u,p)=>p<3?parseInt(u,16):Math.round(parseInt(u,16)/255*1e3)/1e3).join(", ")})`:""}function J7(t){const r=t.toString(16);return r.length===1?`0${r}`:r}function So(t){if(t.type)return t;if(t.charAt(0)==="#")return So(X6(t));const r=t.indexOf("("),s=t.substring(0,r);if(["rgb","rgba","hsl","hsla","color"].indexOf(s)===-1)throw new Error((0,Ib.default)(9,t));let u=t.substring(r+1,t.length-1),p;if(s==="color"){if(u=u.split(" "),p=u.shift(),u.length===4&&u[3].charAt(0)==="/"&&(u[3]=u[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(p)===-1)throw new Error((0,Ib.default)(10,p))}else u=u.split(",");return u=u.map(d=>parseFloat(d)),{type:s,values:u,colorSpace:p}}const q6=t=>{const r=So(t);return r.values.slice(0,3).map((s,u)=>r.type.indexOf("hsl")!==-1&&u!==0?`${s}%`:s).join(" ")};Kn.colorChannel=q6;const $7=(t,r)=>{try{return q6(t)}catch{return t}};Kn.private_safeColorChannel=$7;function ll(t){const{type:r,colorSpace:s}=t;let{values:u}=t;return r.indexOf("rgb")!==-1?u=u.map((p,d)=>d<3?parseInt(p,10):p):r.indexOf("hsl")!==-1&&(u[1]=`${u[1]}%`,u[2]=`${u[2]}%`),r.indexOf("color")!==-1?u=`${s} ${u.join(" ")}`:u=`${u.join(", ")}`,`${r}(${u})`}function eE(t){if(t.indexOf("#")===0)return t;const{values:r}=So(t);return`#${r.map((s,u)=>J7(u===3?Math.round(255*s):s)).join("")}`}function Z6(t){t=So(t);const{values:r}=t,s=r[0],u=r[1]/100,p=r[2]/100,d=u*Math.min(p,1-p),b=(_,S=(_+s/30)%12)=>p-d*Math.max(Math.min(S-3,9-S,1),-1);let k="rgb";const y=[Math.round(b(0)*255),Math.round(b(8)*255),Math.round(b(4)*255)];return t.type==="hsla"&&(k+="a",y.push(r[3])),ll({type:k,values:y})}function z0(t){t=So(t);let r=t.type==="hsl"||t.type==="hsla"?So(Z6(t)).values:t.values;return r=r.map(s=>(t.type!=="color"&&(s/=255),s<=.03928?s/12.92:((s+.055)/1.055)**2.4)),Number((.2126*r[0]+.7152*r[1]+.0722*r[2]).toFixed(3))}function tE(t,r){const s=z0(t),u=z0(r);return(Math.max(s,u)+.05)/(Math.min(s,u)+.05)}function J6(t,r){return t=So(t),r=fh(r),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${r}`:t.values[3]=r,ll(t)}function nE(t,r,s){try{return J6(t,r)}catch{return t}}function dh(t,r){if(t=So(t),r=fh(r),t.type.indexOf("hsl")!==-1)t.values[2]*=1-r;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let s=0;s<3;s+=1)t.values[s]*=1-r;return ll(t)}function rE(t,r,s){try{return dh(t,r)}catch{return t}}function ph(t,r){if(t=So(t),r=fh(r),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*r;else if(t.type.indexOf("rgb")!==-1)for(let s=0;s<3;s+=1)t.values[s]+=(255-t.values[s])*r;else if(t.type.indexOf("color")!==-1)for(let s=0;s<3;s+=1)t.values[s]+=(1-t.values[s])*r;return ll(t)}function oE(t,r,s){try{return ph(t,r)}catch{return t}}function iE(t,r=.15){return z0(t)>.5?dh(t,r):ph(t,r)}function $6(t,r,s){try{return $6(t,r)}catch{return t}}function aE(t,r,s,u=1){const p=(y,_)=>Math.round((y**(1/u)*(1-s)+_**(1/u)*s)**u),d=So(t),b=So(r),k=[p(d.values[0],b.values[0]),p(d.values[1],b.values[1]),p(d.values[2],b.values[2])];return ll({type:"rgb",values:k})}const sE=["mode","contrastThreshold","tonalOffset"],Rb={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Sc.white,default:Sc.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},A2={text:{primary:Sc.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Sc.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Tb(t,r,s,u){const p=u.light||u,d=u.dark||u*1.5;t[r]||(t.hasOwnProperty(s)?t[r]=t[s]:r==="light"?t.light=j0(t.main,p):r==="dark"&&(t.dark=B0(t.main,d)))}function lE(t="light"){return t==="dark"?{main:ps[200],light:ps[50],dark:ps[400]}:{main:ps[700],light:ps[400],dark:ps[800]}}function cE(t="light"){return t==="dark"?{main:ds[200],light:ds[50],dark:ds[400]}:{main:ds[500],light:ds[300],dark:ds[700]}}function uE(t="light"){return t==="dark"?{main:fs[500],light:fs[300],dark:fs[700]}:{main:fs[700],light:fs[400],dark:fs[800]}}function fE(t="light"){return t==="dark"?{main:hs[400],light:hs[300],dark:hs[700]}:{main:hs[700],light:hs[500],dark:hs[900]}}function dE(t="light"){return t==="dark"?{main:ms[400],light:ms[300],dark:ms[700]}:{main:ms[800],light:ms[500],dark:ms[900]}}function pE(t="light"){return t==="dark"?{main:Bl[400],light:Bl[300],dark:Bl[700]}:{main:"#ed6c02",light:Bl[500],dark:Bl[900]}}function hE(t){const{mode:r="light",contrastThreshold:s=3,tonalOffset:u=.2}=t,p=Xe(t,sE),d=t.primary||lE(r),b=t.secondary||cE(r),k=t.error||uE(r),y=t.info||fE(r),_=t.success||dE(r),S=t.warning||pE(r);function P(O){return q7(O,A2.text.primary)>=s?A2.text.primary:Rb.text.primary}const N=({color:O,name:q,mainShade:F=500,lightShade:D=300,darkShade:z=700})=>{if(O=Q({},O),!O.main&&O[F]&&(O.main=O[F]),!O.hasOwnProperty("main"))throw new Error(za(11,q?` (${q})`:"",F));if(typeof O.main!="string")throw new Error(za(12,q?` (${q})`:"",JSON.stringify(O.main)));return Tb(O,"light",D,u),Tb(O,"dark",z,u),O.contrastText||(O.contrastText=P(O.main)),O},L={dark:A2,light:Rb};return Tr(Q({common:Q({},Sc),mode:r,primary:N({color:d,name:"primary"}),secondary:N({color:b,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:N({color:k,name:"error"}),warning:N({color:S,name:"warning"}),info:N({color:y,name:"info"}),success:N({color:_,name:"success"}),grey:W5,contrastThreshold:s,getContrastText:P,augmentColor:N,tonalOffset:u},L[r]),p)}const mE=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function gE(t){return Math.round(t*1e5)/1e5}const Fb={textTransform:"uppercase"},Lb='"Roboto", "Helvetica", "Arial", sans-serif';function bE(t,r){const s=typeof r=="function"?r(t):r,{fontFamily:u=Lb,fontSize:p=14,fontWeightLight:d=300,fontWeightRegular:b=400,fontWeightMedium:k=500,fontWeightBold:y=700,htmlFontSize:_=16,allVariants:S,pxToRem:P}=s,N=Xe(s,mE),L=p/14,R=P||(F=>`${F/_*L}rem`),O=(F,D,z,Y,U)=>Q({fontFamily:u,fontWeight:F,fontSize:R(D),lineHeight:z},u===Lb?{letterSpacing:`${gE(Y/D)}em`}:{},U,S),q={h1:O(d,96,1.167,-1.5),h2:O(d,60,1.2,-.5),h3:O(b,48,1.167,0),h4:O(b,34,1.235,.25),h5:O(b,24,1.334,0),h6:O(k,20,1.6,.15),subtitle1:O(b,16,1.75,.15),subtitle2:O(k,14,1.57,.1),body1:O(b,16,1.5,.15),body2:O(b,14,1.43,.15),button:O(k,14,1.75,.4,Fb),caption:O(b,12,1.66,.4),overline:O(b,12,2.66,1,Fb),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Tr(Q({htmlFontSize:_,pxToRem:R,fontFamily:u,fontSize:p,fontWeightLight:d,fontWeightRegular:b,fontWeightMedium:k,fontWeightBold:y},q),N,{clone:!1})}const vE=.2,kE=.14,yE=.12;function Sn(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${vE})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${kE})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${yE})`].join(",")}const _E=["none",Sn(0,2,1,-1,0,1,1,0,0,1,3,0),Sn(0,3,1,-2,0,2,2,0,0,1,5,0),Sn(0,3,3,-2,0,3,4,0,0,1,8,0),Sn(0,2,4,-1,0,4,5,0,0,1,10,0),Sn(0,3,5,-1,0,5,8,0,0,1,14,0),Sn(0,3,5,-1,0,6,10,0,0,1,18,0),Sn(0,4,5,-2,0,7,10,1,0,2,16,1),Sn(0,5,5,-3,0,8,10,1,0,3,14,2),Sn(0,5,6,-3,0,9,12,1,0,3,16,2),Sn(0,6,6,-3,0,10,14,1,0,4,18,3),Sn(0,6,7,-4,0,11,15,1,0,4,20,3),Sn(0,7,8,-4,0,12,17,2,0,5,22,4),Sn(0,7,8,-4,0,13,19,2,0,5,24,4),Sn(0,7,9,-4,0,14,21,2,0,5,26,4),Sn(0,8,9,-5,0,15,22,2,0,6,28,5),Sn(0,8,10,-5,0,16,24,2,0,6,30,5),Sn(0,8,11,-5,0,17,26,2,0,6,32,5),Sn(0,9,11,-5,0,18,28,2,0,7,34,6),Sn(0,9,12,-6,0,19,29,2,0,7,36,6),Sn(0,10,13,-6,0,20,31,3,0,8,38,7),Sn(0,10,13,-6,0,21,33,3,0,8,40,7),Sn(0,10,14,-6,0,22,35,3,0,8,42,7),Sn(0,11,14,-7,0,23,36,3,0,9,44,8),Sn(0,11,15,-7,0,24,38,3,0,9,46,8)],wE=["duration","easing","delay"],AE={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},CE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Db(t){return`${Math.round(t)}ms`}function xE(t){if(!t)return 0;const r=t/36;return Math.round((4+15*r**.25+r/5)*10)}function SE(t){const r=Q({},AE,t.easing),s=Q({},CE,t.duration);return Q({getAutoHeightDuration:xE,create:(p=["all"],d={})=>{const{duration:b=s.standard,easing:k=r.easeInOut,delay:y=0}=d;return Xe(d,wE),(Array.isArray(p)?p:[p]).map(_=>`${_} ${typeof b=="string"?b:Db(b)} ${k} ${typeof y=="string"?y:Db(y)}`).join(",")}},t,{easing:r,duration:s})}const EE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},PE=EE,ME=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Yf(t={},...r){const{mixins:s={},palette:u={},transitions:p={},typography:d={}}=t,b=Xe(t,ME);if(t.vars)throw new Error(za(18));const k=hE(u),y=Vc(t);let _=Tr(y,{mixins:Q7(y.breakpoints,s),palette:k,shadows:_E.slice(),typography:bE(k,d),transitions:SE(p),zIndex:Q({},PE)});return _=Tr(_,b),_=r.reduce((S,P)=>Tr(S,P),_),_.unstable_sxConfig=Q({},zc,b==null?void 0:b.unstable_sxConfig),_.unstable_sx=function(P){return sl({sx:P,theme:this})},_}const NE=Yf(),Kf=NE;function Ii(){const t=Ff(Kf);return t[Va]||t}function wt({props:t,name:r}){return z6({props:t,name:r,defaultTheme:Kf,themeId:Va})}var Uc={},C2={exports:{}},Ob;function IE(){return Ob||(Ob=1,function(t){function r(s,u){if(s==null)return{};var p={},d=Object.keys(s),b,k;for(k=0;k=0)&&(p[b]=s[b]);return p}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(C2)),C2.exports}const RE=la(Qx),TE=la(Yx),FE=la(eS),LE=la(o7),DE=la(WS),OE=la(KS);var cl=Y6;Object.defineProperty(Uc,"__esModule",{value:!0});var BE=Uc.default=ZE,ey=Uc.shouldForwardProp=a0;Uc.systemDefaultTheme=void 0;var mo=cl(w6()),F1=cl(IE()),Bb=GE(RE),jE=TE;cl(FE);cl(LE);var zE=cl(DE),VE=cl(OE);const WE=["ownerState"],UE=["variants"],HE=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function ty(t){if(typeof WeakMap!="function")return null;var r=new WeakMap,s=new WeakMap;return(ty=function(u){return u?s:r})(t)}function GE(t,r){if(!r&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var s=ty(r);if(s&&s.has(t))return s.get(t);var u={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in t)if(d!=="default"&&Object.prototype.hasOwnProperty.call(t,d)){var b=p?Object.getOwnPropertyDescriptor(t,d):null;b&&(b.get||b.set)?Object.defineProperty(u,d,b):u[d]=t[d]}return u.default=t,s&&s.set(t,u),u}function QE(t){return Object.keys(t).length===0}function YE(t){return typeof t=="string"&&t.charCodeAt(0)>96}function a0(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const KE=Uc.systemDefaultTheme=(0,zE.default)(),XE=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Tu({defaultTheme:t,theme:r,themeId:s}){return QE(r)?t:r[s]||r}function qE(t){return t?(r,s)=>s[t]:null}function s0(t,r){let{ownerState:s}=r,u=(0,F1.default)(r,WE);const p=typeof t=="function"?t((0,mo.default)({ownerState:s},u)):t;if(Array.isArray(p))return p.flatMap(d=>s0(d,(0,mo.default)({ownerState:s},u)));if(p&&typeof p=="object"&&Array.isArray(p.variants)){const{variants:d=[]}=p;let k=(0,F1.default)(p,UE);return d.forEach(y=>{let _=!0;typeof y.props=="function"?_=y.props((0,mo.default)({ownerState:s},u,s)):Object.keys(y.props).forEach(S=>{(s==null?void 0:s[S])!==y.props[S]&&u[S]!==y.props[S]&&(_=!1)}),_&&(Array.isArray(k)||(k=[k]),k.push(typeof y.style=="function"?y.style((0,mo.default)({ownerState:s},u,s)):y.style))}),k}return p}function ZE(t={}){const{themeId:r,defaultTheme:s=KE,rootShouldForwardProp:u=a0,slotShouldForwardProp:p=a0}=t,d=b=>(0,VE.default)((0,mo.default)({},b,{theme:Tu((0,mo.default)({},b,{defaultTheme:s,themeId:r}))}));return d.__mui_systemSx=!0,(b,k={})=>{(0,Bb.internal_processStyles)(b,U=>U.filter(ee=>!(ee!=null&&ee.__mui_systemSx)));const{name:y,slot:_,skipVariantsResolver:S,skipSx:P,overridesResolver:N=qE(XE(_))}=k,L=(0,F1.default)(k,HE),R=S!==void 0?S:_&&_!=="Root"&&_!=="root"||!1,O=P||!1;let q,F=a0;_==="Root"||_==="root"?F=u:_?F=p:YE(b)&&(F=void 0);const D=(0,Bb.default)(b,(0,mo.default)({shouldForwardProp:F,label:q},L)),z=U=>typeof U=="function"&&U.__emotion_real!==U||(0,jE.isPlainObject)(U)?ee=>s0(U,(0,mo.default)({},ee,{theme:Tu({theme:ee.theme,defaultTheme:s,themeId:r})})):U,Y=(U,...ee)=>{let Z=z(U);const X=ee?ee.map(z):[];y&&N&&X.push(me=>{const pe=Tu((0,mo.default)({},me,{defaultTheme:s,themeId:r}));if(!pe.components||!pe.components[y]||!pe.components[y].styleOverrides)return null;const xe=pe.components[y].styleOverrides,we={};return Object.entries(xe).forEach(([ge,_e])=>{we[ge]=s0(_e,(0,mo.default)({},me,{theme:pe}))}),N(me,we)}),y&&!R&&X.push(me=>{var pe;const xe=Tu((0,mo.default)({},me,{defaultTheme:s,themeId:r})),we=xe==null||(pe=xe.components)==null||(pe=pe[y])==null?void 0:pe.variants;return s0({variants:we},(0,mo.default)({},me,{theme:xe}))}),O||X.push(d);const de=X.length-ee.length;if(Array.isArray(U)&&de>0){const me=new Array(de).fill("");Z=[...U,...me],Z.raw=[...U.raw,...me]}const le=D(Z,...X);return b.muiName&&(le.muiName=b.muiName),le};return D.withConfig&&(Y.withConfig=D.withConfig),Y}}const br=t=>ey(t)&&t!=="classes",hh=ey,Ue=BE({themeId:Va,defaultTheme:Kf,rootShouldForwardProp:br}),JE=["theme"];function $E(t){let{theme:r}=t,s=Xe(t,JE);const u=r[Va];return j.jsx(O7,Q({},s,{themeId:u?Va:void 0,theme:u||r}))}const jb=t=>{let r;return t<1?r=5.11916*t**2:r=4.5*Math.log(t+1)+2,(r/100).toFixed(2)};function e9(t){return vt("MuiSvgIcon",t)}bt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const t9=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],n9=t=>{const{color:r,fontSize:s,classes:u}=t,p={root:["root",r!=="inherit"&&`color${$e(r)}`,`fontSize${$e(s)}`]};return _t(p,e9,u)},r9=Ue("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.color!=="inherit"&&r[`color${$e(s.color)}`],r[`fontSize${$e(s.fontSize)}`]]}})(({theme:t,ownerState:r})=>{var s,u,p,d,b,k,y,_,S,P,N,L,R;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:r.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(s=t.transitions)==null||(u=s.create)==null?void 0:u.call(s,"fill",{duration:(p=t.transitions)==null||(p=p.duration)==null?void 0:p.shorter}),fontSize:{inherit:"inherit",small:((d=t.typography)==null||(b=d.pxToRem)==null?void 0:b.call(d,20))||"1.25rem",medium:((k=t.typography)==null||(y=k.pxToRem)==null?void 0:y.call(k,24))||"1.5rem",large:((_=t.typography)==null||(S=_.pxToRem)==null?void 0:S.call(_,35))||"2.1875rem"}[r.fontSize],color:(P=(N=(t.vars||t).palette)==null||(N=N[r.color])==null?void 0:N.main)!=null?P:{action:(L=(t.vars||t).palette)==null||(L=L.action)==null?void 0:L.active,disabled:(R=(t.vars||t).palette)==null||(R=R.action)==null?void 0:R.disabled,inherit:void 0}[r.color]}}),L1=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiSvgIcon"}),{children:p,className:d,color:b="inherit",component:k="svg",fontSize:y="medium",htmlColor:_,inheritViewBox:S=!1,titleAccess:P,viewBox:N="0 0 24 24"}=u,L=Xe(u,t9),R=$.isValidElement(p)&&p.type==="svg",O=Q({},u,{color:b,component:k,fontSize:y,instanceFontSize:r.fontSize,inheritViewBox:S,viewBox:N,hasSvgAsChild:R}),q={};S||(q.viewBox=N);const F=n9(O);return j.jsxs(r9,Q({as:k,className:et(F.root,d),focusable:"false",color:_,"aria-hidden":P?void 0:!0,role:P?"img":void 0,ref:s},q,L,R&&p.props,{ownerState:O,children:[R?p.props.children:p,P?j.jsx("title",{children:P}):null]}))});L1.muiName="SvgIcon";function or(t,r){function s(u,p){return j.jsx(L1,Q({"data-testid":`${r}Icon`,ref:p},u,{children:t}))}return s.muiName=L1.muiName,$.memo($.forwardRef(s))}function D1(t,r){return D1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,p){return u.__proto__=p,u},D1(t,r)}function ny(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,D1(t,r)}const zb={disabled:!1},V0=Oo.createContext(null);var o9=function(r){return r.scrollTop},Xl="unmounted",Aa="exited",Ca="entering",ys="entered",O1="exiting",Ri=function(t){ny(r,t);function r(u,p){var d;d=t.call(this,u,p)||this;var b=p,k=b&&!b.isMounting?u.enter:u.appear,y;return d.appearStatus=null,u.in?k?(y=Aa,d.appearStatus=Ca):y=ys:u.unmountOnExit||u.mountOnEnter?y=Xl:y=Aa,d.state={status:y},d.nextCallback=null,d}r.getDerivedStateFromProps=function(p,d){var b=p.in;return b&&d.status===Xl?{status:Aa}:null};var s=r.prototype;return s.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},s.componentDidUpdate=function(p){var d=null;if(p!==this.props){var b=this.state.status;this.props.in?b!==Ca&&b!==ys&&(d=Ca):(b===Ca||b===ys)&&(d=O1)}this.updateStatus(!1,d)},s.componentWillUnmount=function(){this.cancelNextCallback()},s.getTimeouts=function(){var p=this.props.timeout,d,b,k;return d=b=k=p,p!=null&&typeof p!="number"&&(d=p.exit,b=p.enter,k=p.appear!==void 0?p.appear:b),{exit:d,enter:b,appear:k}},s.updateStatus=function(p,d){if(p===void 0&&(p=!1),d!==null)if(this.cancelNextCallback(),d===Ca){if(this.props.unmountOnExit||this.props.mountOnEnter){var b=this.props.nodeRef?this.props.nodeRef.current:Nu.findDOMNode(this);b&&o9(b)}this.performEnter(p)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Aa&&this.setState({status:Xl})},s.performEnter=function(p){var d=this,b=this.props.enter,k=this.context?this.context.isMounting:p,y=this.props.nodeRef?[k]:[Nu.findDOMNode(this),k],_=y[0],S=y[1],P=this.getTimeouts(),N=k?P.appear:P.enter;if(!p&&!b||zb.disabled){this.safeSetState({status:ys},function(){d.props.onEntered(_)});return}this.props.onEnter(_,S),this.safeSetState({status:Ca},function(){d.props.onEntering(_,S),d.onTransitionEnd(N,function(){d.safeSetState({status:ys},function(){d.props.onEntered(_,S)})})})},s.performExit=function(){var p=this,d=this.props.exit,b=this.getTimeouts(),k=this.props.nodeRef?void 0:Nu.findDOMNode(this);if(!d||zb.disabled){this.safeSetState({status:Aa},function(){p.props.onExited(k)});return}this.props.onExit(k),this.safeSetState({status:O1},function(){p.props.onExiting(k),p.onTransitionEnd(b.exit,function(){p.safeSetState({status:Aa},function(){p.props.onExited(k)})})})},s.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},s.safeSetState=function(p,d){d=this.setNextCallback(d),this.setState(p,d)},s.setNextCallback=function(p){var d=this,b=!0;return this.nextCallback=function(k){b&&(b=!1,d.nextCallback=null,p(k))},this.nextCallback.cancel=function(){b=!1},this.nextCallback},s.onTransitionEnd=function(p,d){this.setNextCallback(d);var b=this.props.nodeRef?this.props.nodeRef.current:Nu.findDOMNode(this),k=p==null&&!this.props.addEndListener;if(!b||k){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var y=this.props.nodeRef?[this.nextCallback]:[b,this.nextCallback],_=y[0],S=y[1];this.props.addEndListener(_,S)}p!=null&&setTimeout(this.nextCallback,p)},s.render=function(){var p=this.state.status;if(p===Xl)return null;var d=this.props,b=d.children;d.in,d.mountOnEnter,d.unmountOnExit,d.appear,d.enter,d.exit,d.timeout,d.addEndListener,d.onEnter,d.onEntering,d.onEntered,d.onExit,d.onExiting,d.onExited,d.nodeRef;var k=Xe(d,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Oo.createElement(V0.Provider,{value:null},typeof b=="function"?b(p,k):Oo.cloneElement(Oo.Children.only(b),k))},r}(Oo.Component);Ri.contextType=V0;Ri.propTypes={};function gs(){}Ri.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:gs,onEntering:gs,onEntered:gs,onExit:gs,onExiting:gs,onExited:gs};Ri.UNMOUNTED=Xl;Ri.EXITED=Aa;Ri.ENTERING=Ca;Ri.ENTERED=ys;Ri.EXITING=O1;const mh=Ri;function i9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gh(t,r){var s=function(d){return r&&$.isValidElement(d)?r(d):d},u=Object.create(null);return t&&$.Children.map(t,function(p){return p}).forEach(function(p){u[p.key]=s(p)}),u}function a9(t,r){t=t||{},r=r||{};function s(S){return S in r?r[S]:t[S]}var u=Object.create(null),p=[];for(var d in t)d in r?p.length&&(u[d]=p,p=[]):p.push(d);var b,k={};for(var y in r){if(u[y])for(b=0;bt.scrollTop;function $s(t,r){var s,u;const{timeout:p,easing:d,style:b={}}=t;return{duration:(s=b.transitionDuration)!=null?s:typeof p=="number"?p:p[r.mode]||0,easing:(u=b.transitionTimingFunction)!=null?u:typeof d=="object"?d[r.mode]:d,delay:b.transitionDelay}}function d9(t){return vt("MuiPaper",t)}bt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const p9=["className","component","elevation","square","variant"],h9=t=>{const{square:r,elevation:s,variant:u,classes:p}=t,d={root:["root",u,!r&&"rounded",u==="elevation"&&`elevation${s}`]};return _t(d,d9,p)},m9=Ue("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[s.variant],!s.square&&r.rounded,s.variant==="elevation"&&r[`elevation${s.elevation}`]]}})(({theme:t,ownerState:r})=>{var s;return Q({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!r.square&&{borderRadius:t.shape.borderRadius},r.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},r.variant==="elevation"&&Q({boxShadow:(t.vars||t).shadows[r.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Mn("#fff",jb(r.elevation))}, ${Mn("#fff",jb(r.elevation))})`},t.vars&&{backgroundImage:(s=t.vars.overlays)==null?void 0:s[r.elevation]}))}),g9=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiPaper"}),{className:p,component:d="div",elevation:b=1,square:k=!1,variant:y="elevation"}=u,_=Xe(u,p9),S=Q({},u,{component:d,elevation:b,square:k,variant:y}),P=h9(S);return j.jsx(m9,Q({as:d,ownerState:S,className:et(P.root,p),ref:s},_))}),da=g9;function ii(t){return typeof t=="string"}function ry(t,r,s){return t===void 0||ii(t)?r:Q({},r,{ownerState:Q({},r.ownerState,s)})}function b9(t,r,s=(u,p)=>u===p){return t.length===r.length&&t.every((u,p)=>s(u,r[p]))}function Ra(t,r=[]){if(t===void 0)return{};const s={};return Object.keys(t).filter(u=>u.match(/^on[A-Z]/)&&typeof t[u]=="function"&&!r.includes(u)).forEach(u=>{s[u]=t[u]}),s}function oy(t,r,s){return typeof t=="function"?t(r,s):t}function Vb(t){if(t===void 0)return{};const r={};return Object.keys(t).filter(s=>!(s.match(/^on[A-Z]/)&&typeof t[s]=="function")).forEach(s=>{r[s]=t[s]}),r}function iy(t){const{getSlotProps:r,additionalProps:s,externalSlotProps:u,externalForwardedProps:p,className:d}=t;if(!r){const L=et(s==null?void 0:s.className,d,p==null?void 0:p.className,u==null?void 0:u.className),R=Q({},s==null?void 0:s.style,p==null?void 0:p.style,u==null?void 0:u.style),O=Q({},s,p,u);return L.length>0&&(O.className=L),Object.keys(R).length>0&&(O.style=R),{props:O,internalRef:void 0}}const b=Ra(Q({},p,u)),k=Vb(u),y=Vb(p),_=r(b),S=et(_==null?void 0:_.className,s==null?void 0:s.className,d,p==null?void 0:p.className,u==null?void 0:u.className),P=Q({},_==null?void 0:_.style,s==null?void 0:s.style,p==null?void 0:p.style,u==null?void 0:u.style),N=Q({},_,s,y,k);return S.length>0&&(N.className=S),Object.keys(P).length>0&&(N.style=P),{props:N,internalRef:_.ref}}const v9=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Ir(t){var r;const{elementType:s,externalSlotProps:u,ownerState:p,skipResolvingSlotProps:d=!1}=t,b=Xe(t,v9),k=d?{}:oy(u,p),{props:y,internalRef:_}=iy(Q({},b,{externalSlotProps:k})),S=Un(_,k==null?void 0:k.ref,(r=t.additionalProps)==null?void 0:r.ref);return ry(s,Q({},y,{ref:S}),p)}const k9=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],y9=["component","slots","slotProps"],_9=["component"];function Wb(t,r){const{className:s,elementType:u,ownerState:p,externalForwardedProps:d,getSlotOwnerState:b,internalForwardedProps:k}=r,y=Xe(r,k9),{component:_,slots:S={[t]:void 0},slotProps:P={[t]:void 0}}=d,N=Xe(d,y9),L=S[t]||u,R=oy(P[t],p),O=iy(Q({className:s},y,{externalForwardedProps:t==="root"?N:void 0,externalSlotProps:R})),{props:{component:q},internalRef:F}=O,D=Xe(O.props,_9),z=Un(F,R==null?void 0:R.ref,r.ref),Y=b?b(D):{},U=Q({},p,Y),ee=t==="root"?q||_:q,Z=ry(L,Q({},t==="root"&&!_&&!S[t]&&k,t!=="root"&&!S[t]&&k,D,ee&&{as:ee},{ref:z}),U);return Object.keys(Y).forEach(X=>{delete Z[X]}),[L,Z]}function w9(t){const{className:r,classes:s,pulsate:u=!1,rippleX:p,rippleY:d,rippleSize:b,in:k,onExited:y,timeout:_}=t,[S,P]=$.useState(!1),N=et(r,s.ripple,s.rippleVisible,u&&s.ripplePulsate),L={width:b,height:b,top:-(b/2)+d,left:-(b/2)+p},R=et(s.child,S&&s.childLeaving,u&&s.childPulsate);return!k&&!S&&P(!0),$.useEffect(()=>{if(!k&&y!=null){const O=setTimeout(y,_);return()=>{clearTimeout(O)}}},[y,k,_]),j.jsx("span",{className:N,style:L,children:j.jsx("span",{className:R})})}const go=bt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),A9=["center","classes","className"];let Xf=t=>t,Ub,Hb,Gb,Qb;const B1=550,C9=80,x9=Ef(Ub||(Ub=Xf` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`)),S9=Ef(Hb||(Hb=Xf` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`)),E9=Ef(Gb||(Gb=Xf` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`)),P9=Ue("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),M9=Ue(w9,{name:"MuiTouchRipple",slot:"Ripple"})(Qb||(Qb=Xf` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`),go.rippleVisible,x9,B1,({theme:t})=>t.transitions.easing.easeInOut,go.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,go.child,go.childLeaving,S9,B1,({theme:t})=>t.transitions.easing.easeInOut,go.childPulsate,E9,({theme:t})=>t.transitions.easing.easeInOut),N9=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiTouchRipple"}),{center:p=!1,classes:d={},className:b}=u,k=Xe(u,A9),[y,_]=$.useState([]),S=$.useRef(0),P=$.useRef(null);$.useEffect(()=>{P.current&&(P.current(),P.current=null)},[y]);const N=$.useRef(!1),L=uh(),R=$.useRef(null),O=$.useRef(null),q=$.useCallback(Y=>{const{pulsate:U,rippleX:ee,rippleY:Z,rippleSize:X,cb:de}=Y;_(le=>[...le,j.jsx(M9,{classes:{ripple:et(d.ripple,go.ripple),rippleVisible:et(d.rippleVisible,go.rippleVisible),ripplePulsate:et(d.ripplePulsate,go.ripplePulsate),child:et(d.child,go.child),childLeaving:et(d.childLeaving,go.childLeaving),childPulsate:et(d.childPulsate,go.childPulsate)},timeout:B1,pulsate:U,rippleX:ee,rippleY:Z,rippleSize:X},S.current)]),S.current+=1,P.current=de},[d]),F=$.useCallback((Y={},U={},ee=()=>{})=>{const{pulsate:Z=!1,center:X=p||U.pulsate,fakeElement:de=!1}=U;if((Y==null?void 0:Y.type)==="mousedown"&&N.current){N.current=!1;return}(Y==null?void 0:Y.type)==="touchstart"&&(N.current=!0);const le=de?null:O.current,me=le?le.getBoundingClientRect():{width:0,height:0,left:0,top:0};let pe,xe,we;if(X||Y===void 0||Y.clientX===0&&Y.clientY===0||!Y.clientX&&!Y.touches)pe=Math.round(me.width/2),xe=Math.round(me.height/2);else{const{clientX:ge,clientY:_e}=Y.touches&&Y.touches.length>0?Y.touches[0]:Y;pe=Math.round(ge-me.left),xe=Math.round(_e-me.top)}if(X)we=Math.sqrt((2*me.width**2+me.height**2)/3),we%2===0&&(we+=1);else{const ge=Math.max(Math.abs((le?le.clientWidth:0)-pe),pe)*2+2,_e=Math.max(Math.abs((le?le.clientHeight:0)-xe),xe)*2+2;we=Math.sqrt(ge**2+_e**2)}Y!=null&&Y.touches?R.current===null&&(R.current=()=>{q({pulsate:Z,rippleX:pe,rippleY:xe,rippleSize:we,cb:ee})},L.start(C9,()=>{R.current&&(R.current(),R.current=null)})):q({pulsate:Z,rippleX:pe,rippleY:xe,rippleSize:we,cb:ee})},[p,q,L]),D=$.useCallback(()=>{F({},{pulsate:!0})},[F]),z=$.useCallback((Y,U)=>{if(L.clear(),(Y==null?void 0:Y.type)==="touchend"&&R.current){R.current(),R.current=null,L.start(0,()=>{z(Y,U)});return}R.current=null,_(ee=>ee.length>0?ee.slice(1):ee),P.current=U},[L]);return $.useImperativeHandle(s,()=>({pulsate:D,start:F,stop:z}),[D,F,z]),j.jsx(P9,Q({className:et(go.root,d.root,b),ref:O},k,{children:j.jsx(f9,{component:null,exit:!0,children:y})}))}),I9=N9;function R9(t){return vt("MuiButtonBase",t)}const T9=bt("MuiButtonBase",["root","disabled","focusVisible"]),F9=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],L9=t=>{const{disabled:r,focusVisible:s,focusVisibleClassName:u,classes:p}=t,b=_t({root:["root",r&&"disabled",s&&"focusVisible"]},R9,p);return s&&u&&(b.root+=` ${u}`),b},D9=Ue("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,r)=>r.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${T9.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),O9=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiButtonBase"}),{action:p,centerRipple:d=!1,children:b,className:k,component:y="button",disabled:_=!1,disableRipple:S=!1,disableTouchRipple:P=!1,focusRipple:N=!1,LinkComponent:L="a",onBlur:R,onClick:O,onContextMenu:q,onDragLeave:F,onFocus:D,onFocusVisible:z,onKeyDown:Y,onKeyUp:U,onMouseDown:ee,onMouseLeave:Z,onMouseUp:X,onTouchEnd:de,onTouchMove:le,onTouchStart:me,tabIndex:pe=0,TouchRippleProps:xe,touchRippleRef:we,type:ge}=u,_e=Xe(u,F9),ve=$.useRef(null),ce=$.useRef(null),ke=Un(ce,we),{isFocusVisibleRef:Pe,onFocus:Ae,onBlur:Me,ref:tt}=W6(),[He,Ge]=$.useState(!1);_&&He&&Ge(!1),$.useImperativeHandle(p,()=>({focusVisible:()=>{Ge(!0),ve.current.focus()}}),[]);const[pt,fn]=$.useState(!1);$.useEffect(()=>{fn(!0)},[]);const nt=pt&&!S&&!_;$.useEffect(()=>{He&&N&&!S&&pt&&ce.current.pulsate()},[S,N,He,pt]);function jt(Re,lt,Ot=P){return _o(qt=>(lt&<(qt),!Ot&&ce.current&&ce.current[Re](qt),!0))}const hn=jt("start",ee),Rt=jt("stop",q),Wt=jt("stop",F),Ct=jt("stop",X),xt=jt("stop",Re=>{He&&Re.preventDefault(),Z&&Z(Re)}),dt=jt("start",me),Et=jt("stop",de),yn=jt("stop",le),ut=jt("stop",Re=>{Me(Re),Pe.current===!1&&Ge(!1),R&&R(Re)},!1),Nn=_o(Re=>{ve.current||(ve.current=Re.currentTarget),Ae(Re),Pe.current===!0&&(Ge(!0),z&&z(Re)),D&&D(Re)}),Hn=()=>{const Re=ve.current;return y&&y!=="button"&&!(Re.tagName==="A"&&Re.href)},Mt=$.useRef(!1),ir=_o(Re=>{N&&!Mt.current&&He&&ce.current&&Re.key===" "&&(Mt.current=!0,ce.current.stop(Re,()=>{ce.current.start(Re)})),Re.target===Re.currentTarget&&Hn()&&Re.key===" "&&Re.preventDefault(),Y&&Y(Re),Re.target===Re.currentTarget&&Hn()&&Re.key==="Enter"&&!_&&(Re.preventDefault(),O&&O(Re))}),Xn=_o(Re=>{N&&Re.key===" "&&ce.current&&He&&!Re.defaultPrevented&&(Mt.current=!1,ce.current.stop(Re,()=>{ce.current.pulsate(Re)})),U&&U(Re),O&&Re.target===Re.currentTarget&&Hn()&&Re.key===" "&&!Re.defaultPrevented&&O(Re)});let Xt=y;Xt==="button"&&(_e.href||_e.to)&&(Xt=L);const ar={};Xt==="button"?(ar.type=ge===void 0?"button":ge,ar.disabled=_):(!_e.href&&!_e.to&&(ar.role="button"),_&&(ar["aria-disabled"]=_));const Br=Un(s,tt,ve),vr=Q({},u,{centerRipple:d,component:y,disabled:_,disableRipple:S,disableTouchRipple:P,focusRipple:N,tabIndex:pe,focusVisible:He}),De=L9(vr);return j.jsxs(D9,Q({as:Xt,className:et(De.root,k),ownerState:vr,onBlur:ut,onClick:O,onContextMenu:Rt,onFocus:Nn,onKeyDown:ir,onKeyUp:Xn,onMouseDown:hn,onMouseLeave:xt,onMouseUp:Ct,onDragLeave:Wt,onTouchEnd:Et,onTouchMove:yn,onTouchStart:dt,ref:Br,tabIndex:_?-1:pe,type:ge},ar,_e,{children:[b,nt?j.jsx(I9,Q({ref:ke,center:d},xe)):null]}))}),ul=O9;function B9(t){return wt}function j9(t){return vt("MuiAlert",t)}const z9=bt("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),Yb=z9;function V9(t){return vt("MuiIconButton",t)}const W9=bt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),U9=["edge","children","className","color","disabled","disableFocusRipple","size"],H9=t=>{const{classes:r,disabled:s,color:u,edge:p,size:d}=t,b={root:["root",s&&"disabled",u!=="default"&&`color${$e(u)}`,p&&`edge${$e(p)}`,`size${$e(d)}`]};return _t(b,V9,r)},G9=Ue(ul,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.color!=="default"&&r[`color${$e(s.color)}`],s.edge&&r[`edge${$e(s.edge)}`],r[`size${$e(s.size)}`]]}})(({theme:t,ownerState:r})=>Q({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!r.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},r.edge==="start"&&{marginLeft:r.size==="small"?-3:-12},r.edge==="end"&&{marginRight:r.size==="small"?-3:-12}),({theme:t,ownerState:r})=>{var s;const u=(s=(t.vars||t).palette)==null?void 0:s[r.color];return Q({},r.color==="inherit"&&{color:"inherit"},r.color!=="inherit"&&r.color!=="default"&&Q({color:u==null?void 0:u.main},!r.disableRipple&&{"&:hover":Q({},u&&{backgroundColor:t.vars?`rgba(${u.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(u.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),r.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},r.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${W9.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),Q9=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiIconButton"}),{edge:p=!1,children:d,className:b,color:k="default",disabled:y=!1,disableFocusRipple:_=!1,size:S="medium"}=u,P=Xe(u,U9),N=Q({},u,{edge:p,color:k,disabled:y,disableFocusRipple:_,size:S}),L=H9(N);return j.jsx(G9,Q({className:et(L.root,b),centerRipple:!0,focusRipple:!_,disabled:y,ref:s},P,{ownerState:N,children:d}))}),Do=Q9,Y9=or(j.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),K9=or(j.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),X9=or(j.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),q9=or(j.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Z9=or(j.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),J9=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],$9=B9(),eP=t=>{const{variant:r,color:s,severity:u,classes:p}=t,d={root:["root",`color${$e(s||u)}`,`${r}${$e(s||u)}`,`${r}`],icon:["icon"],message:["message"],action:["action"]};return _t(d,j9,p)},tP=Ue(da,{name:"MuiAlert",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[s.variant],r[`${s.variant}${$e(s.color||s.severity)}`]]}})(({theme:t})=>{const r=t.palette.mode==="light"?B0:j0,s=t.palette.mode==="light"?j0:B0;return Q({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(([,u])=>u.main&&u.light).map(([u])=>({props:{colorSeverity:u,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${u}Color`]:r(t.palette[u].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${u}StandardBg`]:s(t.palette[u].light,.9),[`& .${Yb.icon}`]:t.vars?{color:t.vars.palette.Alert[`${u}IconColor`]}:{color:t.palette[u].main}}})),...Object.entries(t.palette).filter(([,u])=>u.main&&u.light).map(([u])=>({props:{colorSeverity:u,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${u}Color`]:r(t.palette[u].light,.6),border:`1px solid ${(t.vars||t).palette[u].light}`,[`& .${Yb.icon}`]:t.vars?{color:t.vars.palette.Alert[`${u}IconColor`]}:{color:t.palette[u].main}}})),...Object.entries(t.palette).filter(([,u])=>u.main&&u.dark).map(([u])=>({props:{colorSeverity:u,variant:"filled"},style:Q({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert[`${u}FilledColor`],backgroundColor:t.vars.palette.Alert[`${u}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[u].dark:t.palette[u].main,color:t.palette.getContrastText(t.palette[u].main)})}))]})}),nP=Ue("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,r)=>r.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),rP=Ue("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,r)=>r.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Kb=Ue("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,r)=>r.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Xb={success:j.jsx(Y9,{fontSize:"inherit"}),warning:j.jsx(K9,{fontSize:"inherit"}),error:j.jsx(X9,{fontSize:"inherit"}),info:j.jsx(q9,{fontSize:"inherit"})},oP=$.forwardRef(function(r,s){const u=$9({props:r,name:"MuiAlert"}),{action:p,children:d,className:b,closeText:k="Close",color:y,components:_={},componentsProps:S={},icon:P,iconMapping:N=Xb,onClose:L,role:R="alert",severity:O="success",slotProps:q={},slots:F={},variant:D="standard"}=u,z=Xe(u,J9),Y=Q({},u,{color:y,severity:O,variant:D,colorSeverity:y||O}),U=eP(Y),ee={slots:Q({closeButton:_.CloseButton,closeIcon:_.CloseIcon},F),slotProps:Q({},S,q)},[Z,X]=Wb("closeButton",{elementType:Do,externalForwardedProps:ee,ownerState:Y}),[de,le]=Wb("closeIcon",{elementType:Z9,externalForwardedProps:ee,ownerState:Y});return j.jsxs(tP,Q({role:R,elevation:0,ownerState:Y,className:et(U.root,b),ref:s},z,{children:[P!==!1?j.jsx(nP,{ownerState:Y,className:U.icon,children:P||N[O]||Xb[O]}):null,j.jsx(rP,{ownerState:Y,className:U.message,children:d}),p!=null?j.jsx(Kb,{ownerState:Y,className:U.action,children:p}):null,p==null&&L?j.jsx(Kb,{ownerState:Y,className:U.action,children:j.jsx(Z,Q({size:"small","aria-label":k,title:k,color:"inherit",onClick:L},X,{children:j.jsx(de,Q({fontSize:"small"},le))}))}):null]}))}),ay=oP;function iP(t){return vt("MuiTypography",t)}bt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const aP=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],sP=t=>{const{align:r,gutterBottom:s,noWrap:u,paragraph:p,variant:d,classes:b}=t,k={root:["root",d,t.align!=="inherit"&&`align${$e(r)}`,s&&"gutterBottom",u&&"noWrap",p&&"paragraph"]};return _t(k,iP,b)},lP=Ue("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.variant&&r[s.variant],s.align!=="inherit"&&r[`align${$e(s.align)}`],s.noWrap&&r.noWrap,s.gutterBottom&&r.gutterBottom,s.paragraph&&r.paragraph]}})(({theme:t,ownerState:r})=>Q({margin:0},r.variant==="inherit"&&{font:"inherit"},r.variant!=="inherit"&&t.typography[r.variant],r.align!=="inherit"&&{textAlign:r.align},r.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r.gutterBottom&&{marginBottom:"0.35em"},r.paragraph&&{marginBottom:16})),qb={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},cP={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},uP=t=>cP[t]||t,fP=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiTypography"}),p=uP(u.color),d=Wc(Q({},u,{color:p})),{align:b="inherit",className:k,component:y,gutterBottom:_=!1,noWrap:S=!1,paragraph:P=!1,variant:N="body1",variantMapping:L=qb}=d,R=Xe(d,aP),O=Q({},d,{align:b,color:p,className:k,component:y,gutterBottom:_,noWrap:S,paragraph:P,variant:N,variantMapping:L}),q=y||(P?"p":L[N]||qb[N])||"span",F=sP(O);return j.jsx(lP,Q({as:q,ref:s,ownerState:O,className:et(F.root,k)},R))}),oo=fP;function dP(t){return vt("MuiAppBar",t)}bt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const pP=["className","color","enableColorOnDark","position"],hP=t=>{const{color:r,position:s,classes:u}=t,p={root:["root",`color${$e(r)}`,`position${$e(s)}`]};return _t(p,dP,u)},Fu=(t,r)=>t?`${t==null?void 0:t.replace(")","")}, ${r})`:r,mP=Ue(da,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[`position${$e(s.position)}`],r[`color${$e(s.color)}`]]}})(({theme:t,ownerState:r})=>{const s=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return Q({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},r.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},r.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},r.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},r.position==="static"&&{position:"static"},r.position==="relative"&&{position:"relative"},!t.vars&&Q({},r.color==="default"&&{backgroundColor:s,color:t.palette.getContrastText(s)},r.color&&r.color!=="default"&&r.color!=="inherit"&&r.color!=="transparent"&&{backgroundColor:t.palette[r.color].main,color:t.palette[r.color].contrastText},r.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!r.enableColorOnDark&&{backgroundColor:null,color:null},r.color==="transparent"&&Q({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&Q({},r.color==="default"&&{"--AppBar-background":r.enableColorOnDark?t.vars.palette.AppBar.defaultBg:Fu(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":r.enableColorOnDark?t.vars.palette.text.primary:Fu(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},r.color&&!r.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":r.enableColorOnDark?t.vars.palette[r.color].main:Fu(t.vars.palette.AppBar.darkBg,t.vars.palette[r.color].main),"--AppBar-color":r.enableColorOnDark?t.vars.palette[r.color].contrastText:Fu(t.vars.palette.AppBar.darkColor,t.vars.palette[r.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:r.color==="inherit"?"inherit":"var(--AppBar-color)"},r.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),gP=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiAppBar"}),{className:p,color:d="primary",enableColorOnDark:b=!1,position:k="fixed"}=u,y=Xe(u,pP),_=Q({},u,{color:d,position:k,enableColorOnDark:b}),S=hP(_);return j.jsx(mP,Q({square:!0,component:"header",ownerState:_,elevation:4,className:et(S.root,p,k==="fixed"&&"mui-fixed"),ref:s},y))}),bP=gP;function Zb(t){return t.substring(2).toLowerCase()}function vP(t,r){return r.documentElement.clientWidth(setTimeout(()=>{y.current=!0},0),()=>{y.current=!1}),[]);const S=Un(r.ref,k),P=_o(R=>{const O=_.current;_.current=!1;const q=Jn(k.current);if(!y.current||!k.current||"clientX"in R&&vP(R,q))return;if(b.current){b.current=!1;return}let F;R.composedPath?F=R.composedPath().indexOf(k.current)>-1:F=!q.documentElement.contains(R.target)||k.current.contains(R.target),!F&&(s||!O)&&p(R)}),N=R=>O=>{_.current=!0;const q=r.props[R];q&&q(O)},L={ref:S};return d!==!1&&(L[d]=N(d)),$.useEffect(()=>{if(d!==!1){const R=Zb(d),O=Jn(k.current),q=()=>{b.current=!0};return O.addEventListener(R,P),O.addEventListener("touchmove",q),()=>{O.removeEventListener(R,P),O.removeEventListener("touchmove",q)}}},[P,d]),u!==!1&&(L[u]=N(u)),$.useEffect(()=>{if(u!==!1){const R=Zb(u),O=Jn(k.current);return O.addEventListener(R,P),()=>{O.removeEventListener(R,P)}}},[P,u]),j.jsx($.Fragment,{children:$.cloneElement(r,L)})}const yP=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function _P(t){const r=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(r)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:r}function wP(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const r=u=>t.ownerDocument.querySelector(`input[type="radio"]${u}`);let s=r(`[name="${t.name}"]:checked`);return s||(s=r(`[name="${t.name}"]`)),s!==t}function AP(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||wP(t))}function CP(t){const r=[],s=[];return Array.from(t.querySelectorAll(yP)).forEach((u,p)=>{const d=_P(u);d===-1||!AP(u)||(d===0?r.push(u):s.push({documentOrder:p,tabIndex:d,node:u}))}),s.sort((u,p)=>u.tabIndex===p.tabIndex?u.documentOrder-p.documentOrder:u.tabIndex-p.tabIndex).map(u=>u.node).concat(r)}function xP(){return!0}function SP(t){const{children:r,disableAutoFocus:s=!1,disableEnforceFocus:u=!1,disableRestoreFocus:p=!1,getTabbable:d=CP,isEnabled:b=xP,open:k}=t,y=$.useRef(!1),_=$.useRef(null),S=$.useRef(null),P=$.useRef(null),N=$.useRef(null),L=$.useRef(!1),R=$.useRef(null),O=Un(r.ref,R),q=$.useRef(null);$.useEffect(()=>{!k||!R.current||(L.current=!s)},[s,k]),$.useEffect(()=>{if(!k||!R.current)return;const z=Jn(R.current);return R.current.contains(z.activeElement)||(R.current.hasAttribute("tabIndex")||R.current.setAttribute("tabIndex","-1"),L.current&&R.current.focus()),()=>{p||(P.current&&P.current.focus&&(y.current=!0,P.current.focus()),P.current=null)}},[k]),$.useEffect(()=>{if(!k||!R.current)return;const z=Jn(R.current),Y=Z=>{q.current=Z,!(u||!b()||Z.key!=="Tab")&&z.activeElement===R.current&&Z.shiftKey&&(y.current=!0,S.current&&S.current.focus())},U=()=>{const Z=R.current;if(Z===null)return;if(!z.hasFocus()||!b()||y.current){y.current=!1;return}if(Z.contains(z.activeElement)||u&&z.activeElement!==_.current&&z.activeElement!==S.current)return;if(z.activeElement!==N.current)N.current=null;else if(N.current!==null)return;if(!L.current)return;let X=[];if((z.activeElement===_.current||z.activeElement===S.current)&&(X=d(R.current)),X.length>0){var de,le;const me=!!((de=q.current)!=null&&de.shiftKey&&((le=q.current)==null?void 0:le.key)==="Tab"),pe=X[0],xe=X[X.length-1];typeof pe!="string"&&typeof xe!="string"&&(me?xe.focus():pe.focus())}else Z.focus()};z.addEventListener("focusin",U),z.addEventListener("keydown",Y,!0);const ee=setInterval(()=>{z.activeElement&&z.activeElement.tagName==="BODY"&&U()},50);return()=>{clearInterval(ee),z.removeEventListener("focusin",U),z.removeEventListener("keydown",Y,!0)}},[s,u,p,b,k,d]);const F=z=>{P.current===null&&(P.current=z.relatedTarget),L.current=!0,N.current=z.target;const Y=r.props.onFocus;Y&&Y(z)},D=z=>{P.current===null&&(P.current=z.relatedTarget),L.current=!0};return j.jsxs($.Fragment,{children:[j.jsx("div",{tabIndex:k?0:-1,onFocus:D,ref:_,"data-testid":"sentinelStart"}),$.cloneElement(r,{ref:O,onFocus:F}),j.jsx("div",{tabIndex:k?0:-1,onFocus:D,ref:S,"data-testid":"sentinelEnd"})]})}function EP(t){return typeof t=="function"?t():t}const PP=$.forwardRef(function(r,s){const{children:u,container:p,disablePortal:d=!1}=r,[b,k]=$.useState(null),y=Un($.isValidElement(u)?u.ref:null,s);if(xo(()=>{d||k(EP(p)||document.body)},[p,d]),xo(()=>{if(b&&!d)return R1(s,b),()=>{R1(s,null)}},[s,b,d]),d){if($.isValidElement(u)){const _={ref:y};return $.cloneElement(u,_)}return j.jsx($.Fragment,{children:u})}return j.jsx($.Fragment,{children:b&&Hp.createPortal(u,b)})});function MP(t){const r=Jn(t);return r.body===t?Mi(t).innerWidth>r.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function sc(t,r){r?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function Jb(t){return parseInt(Mi(t).getComputedStyle(t).paddingRight,10)||0}function NP(t){const s=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,u=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return s||u}function $b(t,r,s,u,p){const d=[r,s,...u];[].forEach.call(t.children,b=>{const k=d.indexOf(b)===-1,y=!NP(b);k&&y&&sc(b,p)})}function x2(t,r){let s=-1;return t.some((u,p)=>r(u)?(s=p,!0):!1),s}function IP(t,r){const s=[],u=t.container;if(!r.disableScrollLock){if(MP(u)){const b=U6(Jn(u));s.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${Jb(u)+b}px`;const k=Jn(u).querySelectorAll(".mui-fixed");[].forEach.call(k,y=>{s.push({value:y.style.paddingRight,property:"padding-right",el:y}),y.style.paddingRight=`${Jb(y)+b}px`})}let d;if(u.parentNode instanceof DocumentFragment)d=Jn(u).body;else{const b=u.parentElement,k=Mi(u);d=(b==null?void 0:b.nodeName)==="HTML"&&k.getComputedStyle(b).overflowY==="scroll"?b:u}s.push({value:d.style.overflow,property:"overflow",el:d},{value:d.style.overflowX,property:"overflow-x",el:d},{value:d.style.overflowY,property:"overflow-y",el:d}),d.style.overflow="hidden"}return()=>{s.forEach(({value:d,el:b,property:k})=>{d?b.style.setProperty(k,d):b.style.removeProperty(k)})}}function RP(t){const r=[];return[].forEach.call(t.children,s=>{s.getAttribute("aria-hidden")==="true"&&r.push(s)}),r}class TP{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(r,s){let u=this.modals.indexOf(r);if(u!==-1)return u;u=this.modals.length,this.modals.push(r),r.modalRef&&sc(r.modalRef,!1);const p=RP(s);$b(s,r.mount,r.modalRef,p,!0);const d=x2(this.containers,b=>b.container===s);return d!==-1?(this.containers[d].modals.push(r),u):(this.containers.push({modals:[r],container:s,restore:null,hiddenSiblings:p}),u)}mount(r,s){const u=x2(this.containers,d=>d.modals.indexOf(r)!==-1),p=this.containers[u];p.restore||(p.restore=IP(p,s))}remove(r,s=!0){const u=this.modals.indexOf(r);if(u===-1)return u;const p=x2(this.containers,b=>b.modals.indexOf(r)!==-1),d=this.containers[p];if(d.modals.splice(d.modals.indexOf(r),1),this.modals.splice(u,1),d.modals.length===0)d.restore&&d.restore(),r.modalRef&&sc(r.modalRef,s),$b(d.container,r.mount,r.modalRef,d.hiddenSiblings,!1),this.containers.splice(p,1);else{const b=d.modals[d.modals.length-1];b.modalRef&&sc(b.modalRef,!1)}return u}isTopModal(r){return this.modals.length>0&&this.modals[this.modals.length-1]===r}}function FP(t){return typeof t=="function"?t():t}function LP(t){return t?t.props.hasOwnProperty("in"):!1}const DP=new TP;function OP(t){const{container:r,disableEscapeKeyDown:s=!1,disableScrollLock:u=!1,manager:p=DP,closeAfterTransition:d=!1,onTransitionEnter:b,onTransitionExited:k,children:y,onClose:_,open:S,rootRef:P}=t,N=$.useRef({}),L=$.useRef(null),R=$.useRef(null),O=Un(R,P),[q,F]=$.useState(!S),D=LP(y);let z=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(z=!1);const Y=()=>Jn(L.current),U=()=>(N.current.modalRef=R.current,N.current.mount=L.current,N.current),ee=()=>{p.mount(U(),{disableScrollLock:u}),R.current&&(R.current.scrollTop=0)},Z=_o(()=>{const _e=FP(r)||Y().body;p.add(U(),_e),R.current&&ee()}),X=$.useCallback(()=>p.isTopModal(U()),[p]),de=_o(_e=>{L.current=_e,_e&&(S&&X()?ee():R.current&&sc(R.current,z))}),le=$.useCallback(()=>{p.remove(U(),z)},[z,p]);$.useEffect(()=>()=>{le()},[le]),$.useEffect(()=>{S?Z():(!D||!d)&&le()},[S,le,D,d,Z]);const me=_e=>ve=>{var ce;(ce=_e.onKeyDown)==null||ce.call(_e,ve),!(ve.key!=="Escape"||ve.which===229||!X())&&(s||(ve.stopPropagation(),_&&_(ve,"escapeKeyDown")))},pe=_e=>ve=>{var ce;(ce=_e.onClick)==null||ce.call(_e,ve),ve.target===ve.currentTarget&&_&&_(ve,"backdropClick")};return{getRootProps:(_e={})=>{const ve=Ra(t);delete ve.onTransitionEnter,delete ve.onTransitionExited;const ce=Q({},ve,_e);return Q({role:"presentation"},ce,{onKeyDown:me(ce),ref:O})},getBackdropProps:(_e={})=>{const ve=_e;return Q({"aria-hidden":!0},ve,{onClick:pe(ve),open:S})},getTransitionProps:()=>{const _e=()=>{F(!1),b&&b()},ve=()=>{F(!0),k&&k(),d&&le()};return{onEnter:xb(_e,y==null?void 0:y.props.onEnter),onExited:xb(ve,y==null?void 0:y.props.onExited)}},rootRef:O,portalRef:de,isTopModal:X,exited:q,hasTransition:D}}const BP=2;function sy(t,r){return t-r}function ev(t,r){var s;const{index:u}=(s=t.reduce((p,d,b)=>{const k=Math.abs(r-d);return p===null||k({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},UP=t=>t;let Bu;function nv(){return Bu===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Bu=CSS.supports("touch-action","none"):Bu=!0),Bu}function HP(t){const{"aria-labelledby":r,defaultValue:s,disabled:u=!1,disableSwap:p=!1,isRtl:d=!1,marks:b=!1,max:k=100,min:y=0,name:_,onChange:S,onChangeCommitted:P,orientation:N="horizontal",rootRef:L,scale:R=UP,step:O=1,shiftStep:q=10,tabIndex:F,value:D}=t,z=$.useRef(),[Y,U]=$.useState(-1),[ee,Z]=$.useState(-1),[X,de]=$.useState(!1),le=$.useRef(0),[me,pe]=O0({controlled:D,default:s??y,name:"Slider"}),xe=S&&((De,Re,lt)=>{const Ot=De.nativeEvent||De,qt=new Ot.constructor(Ot.type,Ot);Object.defineProperty(qt,"target",{writable:!0,value:{value:Re,name:_}}),S(qt,Re,lt)}),we=Array.isArray(me);let ge=we?me.slice().sort(sy):[me];ge=ge.map(De=>De==null?y:ks(De,y,k));const _e=b===!0&&O!==null?[...Array(Math.floor((k-y)/O)+1)].map((De,Re)=>({value:y+O*Re})):b||[],ve=_e.map(De=>De.value),{isFocusVisibleRef:ce,onBlur:ke,onFocus:Pe,ref:Ae}=W6(),[Me,tt]=$.useState(-1),He=$.useRef(),Ge=Un(Ae,He),pt=Un(L,Ge),fn=De=>Re=>{var lt;const Ot=Number(Re.currentTarget.getAttribute("data-index"));Pe(Re),ce.current===!0&&tt(Ot),Z(Ot),De==null||(lt=De.onFocus)==null||lt.call(De,Re)},nt=De=>Re=>{var lt;ke(Re),ce.current===!1&&tt(-1),Z(-1),De==null||(lt=De.onBlur)==null||lt.call(De,Re)},jt=(De,Re)=>{const lt=Number(De.currentTarget.getAttribute("data-index")),Ot=ge[lt],qt=ve.indexOf(Ot);let Ve=Re;if(_e&&O==null){const Lt=ve[ve.length-1];Ve>Lt?Ve=Lt:VeRe=>{var lt;if(O!==null){const Ot=Number(Re.currentTarget.getAttribute("data-index")),qt=ge[Ot];let Ve=null;(Re.key==="ArrowLeft"||Re.key==="ArrowDown")&&Re.shiftKey||Re.key==="PageDown"?Ve=Math.max(qt-q,y):((Re.key==="ArrowRight"||Re.key==="ArrowUp")&&Re.shiftKey||Re.key==="PageUp")&&(Ve=Math.min(qt+q,k)),Ve!==null&&(jt(Re,Ve),Re.preventDefault())}De==null||(lt=De.onKeyDown)==null||lt.call(De,Re)};xo(()=>{if(u&&He.current.contains(document.activeElement)){var De;(De=document.activeElement)==null||De.blur()}},[u]),u&&Y!==-1&&U(-1),u&&Me!==-1&&tt(-1);const Rt=De=>Re=>{var lt;(lt=De.onChange)==null||lt.call(De,Re),jt(Re,Re.target.valueAsNumber)},Wt=$.useRef();let Ct=N;d&&N==="horizontal"&&(Ct+="-reverse");const xt=({finger:De,move:Re=!1})=>{const{current:lt}=He,{width:Ot,height:qt,bottom:Ve,left:Lt}=lt.getBoundingClientRect();let nn;Ct.indexOf("vertical")===0?nn=(Ve-De.y)/qt:nn=(De.x-Lt)/Ot,Ct.indexOf("-reverse")!==-1&&(nn=1-nn);let an;if(an=jP(nn,y,k),O)an=VP(an,O,y);else{const Zr=ev(ve,an);an=ve[Zr]}an=ks(an,y,k);let Zt=0;if(we){Re?Zt=Wt.current:Zt=ev(ge,an),p&&(an=ks(an,ge[Zt-1]||-1/0,ge[Zt+1]||1/0));const Zr=an;an=tv({values:ge,newValue:an,index:Zt}),p&&Re||(Zt=an.indexOf(Zr),Wt.current=Zt)}return{newValue:an,activeIndex:Zt}},dt=_o(De=>{const Re=Lu(De,z);if(!Re)return;if(le.current+=1,De.type==="mousemove"&&De.buttons===0){Et(De);return}const{newValue:lt,activeIndex:Ot}=xt({finger:Re,move:!0});Du({sliderRef:He,activeIndex:Ot,setActive:U}),pe(lt),!X&&le.current>BP&&de(!0),xe&&!Ou(lt,me)&&xe(De,lt,Ot)}),Et=_o(De=>{const Re=Lu(De,z);if(de(!1),!Re)return;const{newValue:lt}=xt({finger:Re,move:!0});U(-1),De.type==="touchend"&&Z(-1),P&&P(De,lt),z.current=void 0,ut()}),yn=_o(De=>{if(u)return;nv()||De.preventDefault();const Re=De.changedTouches[0];Re!=null&&(z.current=Re.identifier);const lt=Lu(De,z);if(lt!==!1){const{newValue:qt,activeIndex:Ve}=xt({finger:lt});Du({sliderRef:He,activeIndex:Ve,setActive:U}),pe(qt),xe&&!Ou(qt,me)&&xe(De,qt,Ve)}le.current=0;const Ot=Jn(He.current);Ot.addEventListener("touchmove",dt,{passive:!0}),Ot.addEventListener("touchend",Et,{passive:!0})}),ut=$.useCallback(()=>{const De=Jn(He.current);De.removeEventListener("mousemove",dt),De.removeEventListener("mouseup",Et),De.removeEventListener("touchmove",dt),De.removeEventListener("touchend",Et)},[Et,dt]);$.useEffect(()=>{const{current:De}=He;return De.addEventListener("touchstart",yn,{passive:nv()}),()=>{De.removeEventListener("touchstart",yn),ut()}},[ut,yn]),$.useEffect(()=>{u&&ut()},[u,ut]);const Nn=De=>Re=>{var lt;if((lt=De.onMouseDown)==null||lt.call(De,Re),u||Re.defaultPrevented||Re.button!==0)return;Re.preventDefault();const Ot=Lu(Re,z);if(Ot!==!1){const{newValue:Ve,activeIndex:Lt}=xt({finger:Ot});Du({sliderRef:He,activeIndex:Lt,setActive:U}),pe(Ve),xe&&!Ou(Ve,me)&&xe(Re,Ve,Lt)}le.current=0;const qt=Jn(He.current);qt.addEventListener("mousemove",dt,{passive:!0}),qt.addEventListener("mouseup",Et)},Hn=W0(we?ge[0]:y,y,k),Mt=W0(ge[ge.length-1],y,k)-Hn,ir=(De={})=>{const Re=Ra(De),lt={onMouseDown:Nn(Re||{})},Ot=Q({},Re,lt);return Q({},De,{ref:pt},Ot)},Xn=De=>Re=>{var lt;(lt=De.onMouseOver)==null||lt.call(De,Re);const Ot=Number(Re.currentTarget.getAttribute("data-index"));Z(Ot)},Xt=De=>Re=>{var lt;(lt=De.onMouseLeave)==null||lt.call(De,Re),Z(-1)};return{active:Y,axis:Ct,axisProps:WP,dragging:X,focusedThumbIndex:Me,getHiddenInputProps:(De={})=>{var Re;const lt=Ra(De),Ot={onChange:Rt(lt||{}),onFocus:fn(lt||{}),onBlur:nt(lt||{}),onKeyDown:hn(lt||{})},qt=Q({},lt,Ot);return Q({tabIndex:F,"aria-labelledby":r,"aria-orientation":N,"aria-valuemax":R(k),"aria-valuemin":R(y),name:_,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":(Re=t.step)!=null?Re:void 0,disabled:u},De,qt,{style:Q({},I7,{direction:d?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:ir,getThumbProps:(De={})=>{const Re=Ra(De),lt={onMouseOver:Xn(Re||{}),onMouseLeave:Xt(Re||{})};return Q({},De,Re,lt)},marks:_e,open:ee,range:we,rootRef:pt,trackLeap:Mt,trackOffset:Hn,values:ge,getThumbStyle:De=>({pointerEvents:Y!==-1&&Y!==De?"none":void 0})}}function GP(t={}){const{autoHideDuration:r=null,disableWindowBlurListener:s=!1,onClose:u,open:p,resumeHideDuration:d}=t,b=uh();$.useEffect(()=>{if(!p)return;function F(D){D.defaultPrevented||(D.key==="Escape"||D.key==="Esc")&&(u==null||u(D,"escapeKeyDown"))}return document.addEventListener("keydown",F),()=>{document.removeEventListener("keydown",F)}},[p,u]);const k=_o((F,D)=>{u==null||u(F,D)}),y=_o(F=>{!u||F==null||b.start(F,()=>{k(null,"timeout")})});$.useEffect(()=>(p&&y(r),b.clear),[p,r,y,b]);const _=F=>{u==null||u(F,"clickaway")},S=b.clear,P=$.useCallback(()=>{r!=null&&y(d??r*.5)},[r,d,y]),N=F=>D=>{const z=F.onBlur;z==null||z(D),P()},L=F=>D=>{const z=F.onFocus;z==null||z(D),S()},R=F=>D=>{const z=F.onMouseEnter;z==null||z(D),S()},O=F=>D=>{const z=F.onMouseLeave;z==null||z(D),P()};return $.useEffect(()=>{if(!s&&p)return window.addEventListener("focus",P),window.addEventListener("blur",S),()=>{window.removeEventListener("focus",P),window.removeEventListener("blur",S)}},[s,p,P,S]),{getRootProps:(F={})=>{const D=Q({},Ra(t),Ra(F));return Q({role:"presentation"},F,D,{onBlur:N(D),onFocus:L(D),onMouseEnter:R(D),onMouseLeave:O(D)})},onClickAway:_}}const QP=["onChange","maxRows","minRows","style","value"];function ju(t){return parseInt(t,10)||0}const YP={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function KP(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const XP=$.forwardRef(function(r,s){const{onChange:u,maxRows:p,minRows:d=1,style:b,value:k}=r,y=Xe(r,QP),{current:_}=$.useRef(k!=null),S=$.useRef(null),P=Un(s,S),N=$.useRef(null),L=$.useCallback(()=>{const q=S.current,D=Mi(q).getComputedStyle(q);if(D.width==="0px")return{outerHeightStyle:0,overflowing:!1};const z=N.current;z.style.width=D.width,z.value=q.value||r.placeholder||"x",z.value.slice(-1)===` +`&&(z.value+=" ");const Y=D.boxSizing,U=ju(D.paddingBottom)+ju(D.paddingTop),ee=ju(D.borderBottomWidth)+ju(D.borderTopWidth),Z=z.scrollHeight;z.value="x";const X=z.scrollHeight;let de=Z;d&&(de=Math.max(Number(d)*X,de)),p&&(de=Math.min(Number(p)*X,de)),de=Math.max(de,X);const le=de+(Y==="border-box"?U+ee:0),me=Math.abs(de-Z)<=1;return{outerHeightStyle:le,overflowing:me}},[p,d,r.placeholder]),R=$.useCallback(()=>{const q=L();if(KP(q))return;const F=S.current;F.style.height=`${q.outerHeightStyle}px`,F.style.overflow=q.overflowing?"hidden":""},[L]);xo(()=>{const q=()=>{R()};let F;const D=lh(q),z=S.current,Y=Mi(z);Y.addEventListener("resize",D);let U;return typeof ResizeObserver<"u"&&(U=new ResizeObserver(q),U.observe(z)),()=>{D.clear(),cancelAnimationFrame(F),Y.removeEventListener("resize",D),U&&U.disconnect()}},[L,R]),xo(()=>{R()});const O=q=>{_||R(),u&&u(q)};return j.jsxs($.Fragment,{children:[j.jsx("textarea",Q({value:k,onChange:O,ref:P,rows:d},y)),j.jsx("textarea",{"aria-hidden":!0,className:r.className,readOnly:!0,ref:N,tabIndex:-1,style:Q({},YP.shadow,b,{paddingTop:0,paddingBottom:0})})]})});function pa({props:t,states:r,muiFormControl:s}){return r.reduce((u,p)=>(u[p]=t[p],s&&typeof t[p]>"u"&&(u[p]=s[p]),u),{})}const qP=$.createContext(void 0),qf=qP;function li(){return $.useContext(qf)}function ly(t){return j.jsx(GS,Q({},t,{defaultTheme:Kf,themeId:Va}))}function rv(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function U0(t,r=!1){return t&&(rv(t.value)&&t.value!==""||r&&rv(t.defaultValue)&&t.defaultValue!=="")}function ZP(t){return t.startAdornment}function JP(t){return vt("MuiInputBase",t)}const $P=bt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),el=$P,eM=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Zf=(t,r)=>{const{ownerState:s}=t;return[r.root,s.formControl&&r.formControl,s.startAdornment&&r.adornedStart,s.endAdornment&&r.adornedEnd,s.error&&r.error,s.size==="small"&&r.sizeSmall,s.multiline&&r.multiline,s.color&&r[`color${$e(s.color)}`],s.fullWidth&&r.fullWidth,s.hiddenLabel&&r.hiddenLabel]},Jf=(t,r)=>{const{ownerState:s}=t;return[r.input,s.size==="small"&&r.inputSizeSmall,s.multiline&&r.inputMultiline,s.type==="search"&&r.inputTypeSearch,s.startAdornment&&r.inputAdornedStart,s.endAdornment&&r.inputAdornedEnd,s.hiddenLabel&&r.inputHiddenLabel]},tM=t=>{const{classes:r,color:s,disabled:u,error:p,endAdornment:d,focused:b,formControl:k,fullWidth:y,hiddenLabel:_,multiline:S,readOnly:P,size:N,startAdornment:L,type:R}=t,O={root:["root",`color${$e(s)}`,u&&"disabled",p&&"error",y&&"fullWidth",b&&"focused",k&&"formControl",N&&N!=="medium"&&`size${$e(N)}`,S&&"multiline",L&&"adornedStart",d&&"adornedEnd",_&&"hiddenLabel",P&&"readOnly"],input:["input",u&&"disabled",R==="search"&&"inputTypeSearch",S&&"inputMultiline",N==="small"&&"inputSizeSmall",_&&"inputHiddenLabel",L&&"inputAdornedStart",d&&"inputAdornedEnd",P&&"readOnly"]};return _t(O,JP,r)},$f=Ue("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Zf})(({theme:t,ownerState:r})=>Q({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${el.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},r.multiline&&Q({padding:"4px 0 5px"},r.size==="small"&&{paddingTop:1}),r.fullWidth&&{width:"100%"})),ed=Ue("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Jf})(({theme:t,ownerState:r})=>{const s=t.palette.mode==="light",u=Q({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:s?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),p={opacity:"0 !important"},d=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:s?.42:.5};return Q({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":u,"&::-moz-placeholder":u,"&:-ms-input-placeholder":u,"&::-ms-input-placeholder":u,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${el.formControl} &`]:{"&::-webkit-input-placeholder":p,"&::-moz-placeholder":p,"&:-ms-input-placeholder":p,"&::-ms-input-placeholder":p,"&:focus::-webkit-input-placeholder":d,"&:focus::-moz-placeholder":d,"&:focus:-ms-input-placeholder":d,"&:focus::-ms-input-placeholder":d},[`&.${el.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},r.size==="small"&&{paddingTop:1},r.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},r.type==="search"&&{MozAppearance:"textfield"})}),nM=j.jsx(ly,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),rM=$.forwardRef(function(r,s){var u;const p=wt({props:r,name:"MuiInputBase"}),{"aria-describedby":d,autoComplete:b,autoFocus:k,className:y,components:_={},componentsProps:S={},defaultValue:P,disabled:N,disableInjectingGlobalStyles:L,endAdornment:R,fullWidth:O=!1,id:q,inputComponent:F="input",inputProps:D={},inputRef:z,maxRows:Y,minRows:U,multiline:ee=!1,name:Z,onBlur:X,onChange:de,onClick:le,onFocus:me,onKeyDown:pe,onKeyUp:xe,placeholder:we,readOnly:ge,renderSuffix:_e,rows:ve,slotProps:ce={},slots:ke={},startAdornment:Pe,type:Ae="text",value:Me}=p,tt=Xe(p,eM),He=D.value!=null?D.value:Me,{current:Ge}=$.useRef(He!=null),pt=$.useRef(),fn=$.useCallback(De=>{},[]),nt=Un(pt,z,D.ref,fn),[jt,hn]=$.useState(!1),Rt=li(),Wt=pa({props:p,muiFormControl:Rt,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Wt.focused=Rt?Rt.focused:jt,$.useEffect(()=>{!Rt&&N&&jt&&(hn(!1),X&&X())},[Rt,N,jt,X]);const Ct=Rt&&Rt.onFilled,xt=Rt&&Rt.onEmpty,dt=$.useCallback(De=>{U0(De)?Ct&&Ct():xt&&xt()},[Ct,xt]);xo(()=>{Ge&&dt({value:He})},[He,dt,Ge]);const Et=De=>{if(Wt.disabled){De.stopPropagation();return}me&&me(De),D.onFocus&&D.onFocus(De),Rt&&Rt.onFocus?Rt.onFocus(De):hn(!0)},yn=De=>{X&&X(De),D.onBlur&&D.onBlur(De),Rt&&Rt.onBlur?Rt.onBlur(De):hn(!1)},ut=(De,...Re)=>{if(!Ge){const lt=De.target||pt.current;if(lt==null)throw new Error(za(1));dt({value:lt.value})}D.onChange&&D.onChange(De,...Re),de&&de(De,...Re)};$.useEffect(()=>{dt(pt.current)},[]);const Nn=De=>{pt.current&&De.currentTarget===De.target&&pt.current.focus(),le&&le(De)};let Hn=F,Mt=D;ee&&Hn==="input"&&(ve?Mt=Q({type:void 0,minRows:ve,maxRows:ve},Mt):Mt=Q({type:void 0,maxRows:Y,minRows:U},Mt),Hn=XP);const ir=De=>{dt(De.animationName==="mui-auto-fill-cancel"?pt.current:{value:"x"})};$.useEffect(()=>{Rt&&Rt.setAdornedStart(!!Pe)},[Rt,Pe]);const Xn=Q({},p,{color:Wt.color||"primary",disabled:Wt.disabled,endAdornment:R,error:Wt.error,focused:Wt.focused,formControl:Rt,fullWidth:O,hiddenLabel:Wt.hiddenLabel,multiline:ee,size:Wt.size,startAdornment:Pe,type:Ae}),Xt=tM(Xn),ar=ke.root||_.Root||$f,Br=ce.root||S.root||{},vr=ke.input||_.Input||ed;return Mt=Q({},Mt,(u=ce.input)!=null?u:S.input),j.jsxs($.Fragment,{children:[!L&&nM,j.jsxs(ar,Q({},Br,!ii(ar)&&{ownerState:Q({},Xn,Br.ownerState)},{ref:s,onClick:Nn},tt,{className:et(Xt.root,Br.className,y,ge&&"MuiInputBase-readOnly"),children:[Pe,j.jsx(qf.Provider,{value:null,children:j.jsx(vr,Q({ownerState:Xn,"aria-invalid":Wt.error,"aria-describedby":d,autoComplete:b,autoFocus:k,defaultValue:P,disabled:Wt.disabled,id:q,onAnimationStart:ir,name:Z,placeholder:we,readOnly:ge,required:Wt.required,rows:ve,value:He,onKeyDown:pe,onKeyUp:xe,type:Ae},Mt,!ii(vr)&&{as:Hn,ownerState:Q({},Xn,Mt.ownerState)},{ref:nt,className:et(Xt.input,Mt.className,ge&&"MuiInputBase-readOnly"),onBlur:yn,onChange:ut,onFocus:Et}))}),R,_e?_e(Q({},Wt,{startAdornment:Pe})):null]}))]})}),kh=rM;function oM(t){return vt("MuiInput",t)}const iM=Q({},el,bt("MuiInput",["root","underline","input"])),zl=iM;function aM(t){return vt("MuiOutlinedInput",t)}const sM=Q({},el,bt("MuiOutlinedInput",["root","notchedOutline","input"])),Ui=sM;function lM(t){return vt("MuiFilledInput",t)}const cM=Q({},el,bt("MuiFilledInput",["root","underline","input"])),ya=cM,uM=or(j.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),fM=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],dM={entering:{opacity:1},entered:{opacity:1}},pM=$.forwardRef(function(r,s){const u=Ii(),p={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{addEndListener:d,appear:b=!0,children:k,easing:y,in:_,onEnter:S,onEntered:P,onEntering:N,onExit:L,onExited:R,onExiting:O,style:q,timeout:F=p,TransitionComponent:D=mh}=r,z=Xe(r,fM),Y=$.useRef(null),U=Un(Y,k.ref,s),ee=we=>ge=>{if(we){const _e=Y.current;ge===void 0?we(_e):we(_e,ge)}},Z=ee(N),X=ee((we,ge)=>{vh(we);const _e=$s({style:q,timeout:F,easing:y},{mode:"enter"});we.style.webkitTransition=u.transitions.create("opacity",_e),we.style.transition=u.transitions.create("opacity",_e),S&&S(we,ge)}),de=ee(P),le=ee(O),me=ee(we=>{const ge=$s({style:q,timeout:F,easing:y},{mode:"exit"});we.style.webkitTransition=u.transitions.create("opacity",ge),we.style.transition=u.transitions.create("opacity",ge),L&&L(we)}),pe=ee(R),xe=we=>{d&&d(Y.current,we)};return j.jsx(D,Q({appear:b,in:_,nodeRef:Y,onEnter:X,onEntered:de,onEntering:Z,onExit:me,onExited:pe,onExiting:le,addEndListener:xe,timeout:F},z,{children:(we,ge)=>$.cloneElement(k,Q({style:Q({opacity:0,visibility:we==="exited"&&!_?"hidden":void 0},dM[we],q,k.props.style),ref:U},ge))}))}),cy=pM;function hM(t){return vt("MuiBackdrop",t)}bt("MuiBackdrop",["root","invisible"]);const mM=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],gM=t=>{const{classes:r,invisible:s}=t;return _t({root:["root",s&&"invisible"]},hM,r)},bM=Ue("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.invisible&&r.invisible]}})(({ownerState:t})=>Q({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),vM=$.forwardRef(function(r,s){var u,p,d;const b=wt({props:r,name:"MuiBackdrop"}),{children:k,className:y,component:_="div",components:S={},componentsProps:P={},invisible:N=!1,open:L,slotProps:R={},slots:O={},TransitionComponent:q=cy,transitionDuration:F}=b,D=Xe(b,mM),z=Q({},b,{component:_,invisible:N}),Y=gM(z),U=(u=R.root)!=null?u:P.root;return j.jsx(q,Q({in:L,timeout:F},D,{children:j.jsx(bM,Q({"aria-hidden":!0},U,{as:(p=(d=O.root)!=null?d:S.Root)!=null?p:_,className:et(Y.root,y,U==null?void 0:U.className),ownerState:Q({},z,U==null?void 0:U.ownerState),classes:Y,ref:s,children:k}))}))}),uy=vM,kM=bt("MuiBox",["root"]),yM=kM,_M=Yf(),wM=JS({themeId:Va,defaultTheme:_M,defaultClassName:yM.root,generateClassName:T6.generate}),Ua=wM;function AM(t){return vt("MuiButton",t)}const CM=bt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),zu=CM,xM=$.createContext({}),SM=xM,EM=$.createContext(void 0),PM=EM,MM=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],NM=t=>{const{color:r,disableElevation:s,fullWidth:u,size:p,variant:d,classes:b}=t,k={root:["root",d,`${d}${$e(r)}`,`size${$e(p)}`,`${d}Size${$e(p)}`,`color${$e(r)}`,s&&"disableElevation",u&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${$e(p)}`],endIcon:["icon","endIcon",`iconSize${$e(p)}`]},y=_t(k,AM,b);return Q({},b,y)},fy=t=>Q({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),IM=Ue(ul,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[s.variant],r[`${s.variant}${$e(s.color)}`],r[`size${$e(s.size)}`],r[`${s.variant}Size${$e(s.size)}`],s.color==="inherit"&&r.colorInherit,s.disableElevation&&r.disableElevation,s.fullWidth&&r.fullWidth]}})(({theme:t,ownerState:r})=>{var s,u;const p=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],d=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return Q({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":Q({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},r.variant==="text"&&r.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},r.variant==="outlined"&&r.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[r.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},r.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:d,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},r.variant==="contained"&&r.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[r.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[r.color].main}}),"&:active":Q({},r.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${zu.focusVisible}`]:Q({},r.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${zu.disabled}`]:Q({color:(t.vars||t).palette.action.disabled},r.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},r.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},r.variant==="text"&&{padding:"6px 8px"},r.variant==="text"&&r.color!=="inherit"&&{color:(t.vars||t).palette[r.color].main},r.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},r.variant==="outlined"&&r.color!=="inherit"&&{color:(t.vars||t).palette[r.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[r.color].mainChannel} / 0.5)`:`1px solid ${Mn(t.palette[r.color].main,.5)}`},r.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(s=(u=t.palette).getContrastText)==null?void 0:s.call(u,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:p,boxShadow:(t.vars||t).shadows[2]},r.variant==="contained"&&r.color!=="inherit"&&{color:(t.vars||t).palette[r.color].contrastText,backgroundColor:(t.vars||t).palette[r.color].main},r.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},r.size==="small"&&r.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},r.size==="large"&&r.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},r.size==="small"&&r.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},r.size==="large"&&r.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},r.size==="small"&&r.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},r.size==="large"&&r.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},r.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${zu.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${zu.disabled}`]:{boxShadow:"none"}}),RM=Ue("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.startIcon,r[`iconSize${$e(s.size)}`]]}})(({ownerState:t})=>Q({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},fy(t))),TM=Ue("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.endIcon,r[`iconSize${$e(s.size)}`]]}})(({ownerState:t})=>Q({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},fy(t))),FM=$.forwardRef(function(r,s){const u=$.useContext(SM),p=$.useContext(PM),d=sh(u,r),b=wt({props:d,name:"MuiButton"}),{children:k,color:y="primary",component:_="button",className:S,disabled:P=!1,disableElevation:N=!1,disableFocusRipple:L=!1,endIcon:R,focusVisibleClassName:O,fullWidth:q=!1,size:F="medium",startIcon:D,type:z,variant:Y="text"}=b,U=Xe(b,MM),ee=Q({},b,{color:y,component:_,disabled:P,disableElevation:N,disableFocusRipple:L,fullWidth:q,size:F,type:z,variant:Y}),Z=NM(ee),X=D&&j.jsx(RM,{className:Z.startIcon,ownerState:ee,children:D}),de=R&&j.jsx(TM,{className:Z.endIcon,ownerState:ee,children:R}),le=p||"";return j.jsxs(IM,Q({ownerState:ee,className:et(u.className,Z.root,S,le),component:_,disabled:P,focusRipple:!L,focusVisibleClassName:et(Z.focusVisible,O),ref:s,type:z},U,{classes:Z,children:[X,k,de]}))}),Ai=FM;function LM(t){return vt("MuiCard",t)}bt("MuiCard",["root"]);const DM=["className","raised"],OM=t=>{const{classes:r}=t;return _t({root:["root"]},LM,r)},BM=Ue(da,{name:"MuiCard",slot:"Root",overridesResolver:(t,r)=>r.root})(()=>({overflow:"hidden"})),jM=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiCard"}),{className:p,raised:d=!1}=u,b=Xe(u,DM),k=Q({},u,{raised:d}),y=OM(k);return j.jsx(BM,Q({className:et(y.root,p),elevation:d?8:void 0,ref:s,ownerState:k},b))}),zM=jM;function VM(t){return vt("MuiCardMedia",t)}bt("MuiCardMedia",["root","media","img"]);const WM=["children","className","component","image","src","style"],UM=t=>{const{classes:r,isMediaComponent:s,isImageComponent:u}=t;return _t({root:["root",s&&"media",u&&"img"]},VM,r)},HM=Ue("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t,{isMediaComponent:u,isImageComponent:p}=s;return[r.root,u&&r.media,p&&r.img]}})(({ownerState:t})=>Q({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},t.isMediaComponent&&{width:"100%"},t.isImageComponent&&{objectFit:"cover"})),GM=["video","audio","picture","iframe","img"],QM=["picture","img"],YM=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiCardMedia"}),{children:p,className:d,component:b="div",image:k,src:y,style:_}=u,S=Xe(u,WM),P=GM.indexOf(b)!==-1,N=!P&&k?Q({backgroundImage:`url("${k}")`},_):_,L=Q({},u,{component:b,isMediaComponent:P,isImageComponent:QM.indexOf(b)!==-1}),R=UM(L);return j.jsx(HM,Q({className:et(R.root,d),as:b,role:!P&&k?"img":void 0,ref:s,style:N,ownerState:L,src:P?k||y:void 0},S,{children:p}))}),KM=YM;function XM(t){return vt("PrivateSwitchBase",t)}bt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const qM=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],ZM=t=>{const{classes:r,checked:s,disabled:u,edge:p}=t,d={root:["root",s&&"checked",u&&"disabled",p&&`edge${$e(p)}`],input:["input"]};return _t(d,XM,r)},JM=Ue(ul)(({ownerState:t})=>Q({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),$M=Ue("input",{shouldForwardProp:br})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),eN=$.forwardRef(function(r,s){const{autoFocus:u,checked:p,checkedIcon:d,className:b,defaultChecked:k,disabled:y,disableFocusRipple:_=!1,edge:S=!1,icon:P,id:N,inputProps:L,inputRef:R,name:O,onBlur:q,onChange:F,onFocus:D,readOnly:z,required:Y=!1,tabIndex:U,type:ee,value:Z}=r,X=Xe(r,qM),[de,le]=O0({controlled:p,default:!!k,name:"SwitchBase",state:"checked"}),me=li(),pe=ke=>{D&&D(ke),me&&me.onFocus&&me.onFocus(ke)},xe=ke=>{q&&q(ke),me&&me.onBlur&&me.onBlur(ke)},we=ke=>{if(ke.nativeEvent.defaultPrevented)return;const Pe=ke.target.checked;le(Pe),F&&F(ke,Pe)};let ge=y;me&&typeof ge>"u"&&(ge=me.disabled);const _e=ee==="checkbox"||ee==="radio",ve=Q({},r,{checked:de,disabled:ge,disableFocusRipple:_,edge:S}),ce=ZM(ve);return j.jsxs(JM,Q({component:"span",className:et(ce.root,b),centerRipple:!0,focusRipple:!_,disabled:ge,tabIndex:null,role:void 0,onFocus:pe,onBlur:xe,ownerState:ve,ref:s},X,{children:[j.jsx($M,Q({autoFocus:u,checked:p,defaultChecked:k,className:ce.input,disabled:ge,id:_e?N:void 0,name:O,onChange:we,readOnly:z,ref:R,required:Y,ownerState:ve,tabIndex:U,type:ee},ee==="checkbox"&&Z===void 0?{}:{value:Z},L)),de?d:P]}))}),tN=eN,nN=or(j.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),rN=or(j.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),oN=or(j.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function iN(t){return vt("MuiCheckbox",t)}const aN=bt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),S2=aN,sN=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],lN=t=>{const{classes:r,indeterminate:s,color:u,size:p}=t,d={root:["root",s&&"indeterminate",`color${$e(u)}`,`size${$e(p)}`]},b=_t(d,iN,r);return Q({},r,b)},cN=Ue(tN,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.indeterminate&&r.indeterminate,r[`size${$e(s.size)}`],s.color!=="default"&&r[`color${$e(s.color)}`]]}})(({theme:t,ownerState:r})=>Q({color:(t.vars||t).palette.text.secondary},!r.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${r.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Mn(r.color==="default"?t.palette.action.active:t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},r.color!=="default"&&{[`&.${S2.checked}, &.${S2.indeterminate}`]:{color:(t.vars||t).palette[r.color].main},[`&.${S2.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),uN=j.jsx(rN,{}),fN=j.jsx(nN,{}),dN=j.jsx(oN,{}),pN=$.forwardRef(function(r,s){var u,p;const d=wt({props:r,name:"MuiCheckbox"}),{checkedIcon:b=uN,color:k="primary",icon:y=fN,indeterminate:_=!1,indeterminateIcon:S=dN,inputProps:P,size:N="medium",className:L}=d,R=Xe(d,sN),O=_?S:y,q=_?S:b,F=Q({},d,{color:k,indeterminate:_,size:N}),D=lN(F);return j.jsx(cN,Q({type:"checkbox",inputProps:Q({"data-indeterminate":_},P),icon:$.cloneElement(O,{fontSize:(u=O.props.fontSize)!=null?u:N}),checkedIcon:$.cloneElement(q,{fontSize:(p=q.props.fontSize)!=null?p:N}),ownerState:F,ref:s,className:et(D.root,L)},R,{classes:D}))}),dy=pN,hN=(t,r)=>Q({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},r&&!t.vars&&{colorScheme:t.palette.mode}),mN=t=>Q({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),gN=(t,r=!1)=>{var s;const u={};r&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([b,k])=>{var y;u[t.getColorSchemeSelector(b).replace(/\s*&/,"")]={colorScheme:(y=k.palette)==null?void 0:y.mode}});let p=Q({html:hN(t,r),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:Q({margin:0},mN(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},u);const d=(s=t.components)==null||(s=s.MuiCssBaseline)==null?void 0:s.styleOverrides;return d&&(p=[p,d]),p};function bN(t){const r=wt({props:t,name:"MuiCssBaseline"}),{children:s,enableColorScheme:u=!1}=r;return j.jsxs($.Fragment,{children:[j.jsx(ly,{styles:p=>gN(p,u)}),s]})}function vN(t){return vt("MuiModal",t)}bt("MuiModal",["root","hidden","backdrop"]);const kN=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],yN=t=>{const{open:r,exited:s,classes:u}=t;return _t({root:["root",!r&&s&&"hidden"],backdrop:["backdrop"]},vN,u)},_N=Ue("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,!s.open&&s.exited&&r.hidden]}})(({theme:t,ownerState:r})=>Q({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!r.open&&r.exited&&{visibility:"hidden"})),wN=Ue(uy,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,r)=>r.backdrop})({zIndex:-1}),AN=$.forwardRef(function(r,s){var u,p,d,b,k,y;const _=wt({name:"MuiModal",props:r}),{BackdropComponent:S=wN,BackdropProps:P,className:N,closeAfterTransition:L=!1,children:R,container:O,component:q,components:F={},componentsProps:D={},disableAutoFocus:z=!1,disableEnforceFocus:Y=!1,disableEscapeKeyDown:U=!1,disablePortal:ee=!1,disableRestoreFocus:Z=!1,disableScrollLock:X=!1,hideBackdrop:de=!1,keepMounted:le=!1,onBackdropClick:me,open:pe,slotProps:xe,slots:we}=_,ge=Xe(_,kN),_e=Q({},_,{closeAfterTransition:L,disableAutoFocus:z,disableEnforceFocus:Y,disableEscapeKeyDown:U,disablePortal:ee,disableRestoreFocus:Z,disableScrollLock:X,hideBackdrop:de,keepMounted:le}),{getRootProps:ve,getBackdropProps:ce,getTransitionProps:ke,portalRef:Pe,isTopModal:Ae,exited:Me,hasTransition:tt}=OP(Q({},_e,{rootRef:s})),He=Q({},_e,{exited:Me}),Ge=yN(He),pt={};if(R.props.tabIndex===void 0&&(pt.tabIndex="-1"),tt){const{onEnter:Ct,onExited:xt}=ke();pt.onEnter=Ct,pt.onExited=xt}const fn=(u=(p=we==null?void 0:we.root)!=null?p:F.Root)!=null?u:_N,nt=(d=(b=we==null?void 0:we.backdrop)!=null?b:F.Backdrop)!=null?d:S,jt=(k=xe==null?void 0:xe.root)!=null?k:D.root,hn=(y=xe==null?void 0:xe.backdrop)!=null?y:D.backdrop,Rt=Ir({elementType:fn,externalSlotProps:jt,externalForwardedProps:ge,getSlotProps:ve,additionalProps:{ref:s,as:q},ownerState:He,className:et(N,jt==null?void 0:jt.className,Ge==null?void 0:Ge.root,!He.open&&He.exited&&(Ge==null?void 0:Ge.hidden))}),Wt=Ir({elementType:nt,externalSlotProps:hn,additionalProps:P,getSlotProps:Ct=>ce(Q({},Ct,{onClick:xt=>{me&&me(xt),Ct!=null&&Ct.onClick&&Ct.onClick(xt)}})),className:et(hn==null?void 0:hn.className,P==null?void 0:P.className,Ge==null?void 0:Ge.backdrop),ownerState:He});return!le&&!pe&&(!tt||Me)?null:j.jsx(PP,{ref:Pe,container:O,disablePortal:ee,children:j.jsxs(fn,Q({},Rt,{children:[!de&&S?j.jsx(nt,Q({},Wt)):null,j.jsx(SP,{disableEnforceFocus:Y,disableAutoFocus:z,disableRestoreFocus:Z,isEnabled:Ae,open:pe,children:$.cloneElement(R,pt)})]}))})}),yh=AN;function CN(t){return vt("MuiDialog",t)}const xN=bt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),E2=xN,SN=$.createContext({}),py=SN,EN=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],PN=Ue(uy,{name:"MuiDialog",slot:"Backdrop",overrides:(t,r)=>r.backdrop})({zIndex:-1}),MN=t=>{const{classes:r,scroll:s,maxWidth:u,fullWidth:p,fullScreen:d}=t,b={root:["root"],container:["container",`scroll${$e(s)}`],paper:["paper",`paperScroll${$e(s)}`,`paperWidth${$e(String(u))}`,p&&"paperFullWidth",d&&"paperFullScreen"]};return _t(b,CN,r)},NN=Ue(yh,{name:"MuiDialog",slot:"Root",overridesResolver:(t,r)=>r.root})({"@media print":{position:"absolute !important"}}),IN=Ue("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.container,r[`scroll${$e(s.scroll)}`]]}})(({ownerState:t})=>Q({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),RN=Ue(da,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.paper,r[`scrollPaper${$e(s.scroll)}`],r[`paperWidth${$e(String(s.maxWidth))}`],s.fullWidth&&r.paperFullWidth,s.fullScreen&&r.paperFullScreen]}})(({theme:t,ownerState:r})=>Q({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},r.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},r.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!r.maxWidth&&{maxWidth:"calc(100% - 64px)"},r.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${E2.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},r.maxWidth&&r.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[r.maxWidth]}${t.breakpoints.unit}`,[`&.${E2.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[r.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},r.fullWidth&&{width:"calc(100% - 64px)"},r.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${E2.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),TN=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiDialog"}),p=Ii(),d={enter:p.transitions.duration.enteringScreen,exit:p.transitions.duration.leavingScreen},{"aria-describedby":b,"aria-labelledby":k,BackdropComponent:y,BackdropProps:_,children:S,className:P,disableEscapeKeyDown:N=!1,fullScreen:L=!1,fullWidth:R=!1,maxWidth:O="sm",onBackdropClick:q,onClose:F,open:D,PaperComponent:z=da,PaperProps:Y={},scroll:U="paper",TransitionComponent:ee=cy,transitionDuration:Z=d,TransitionProps:X}=u,de=Xe(u,EN),le=Q({},u,{disableEscapeKeyDown:N,fullScreen:L,fullWidth:R,maxWidth:O,scroll:U}),me=MN(le),pe=$.useRef(),xe=ve=>{pe.current=ve.target===ve.currentTarget},we=ve=>{pe.current&&(pe.current=null,q&&q(ve),F&&F(ve,"backdropClick"))},ge=ch(k),_e=$.useMemo(()=>({titleId:ge}),[ge]);return j.jsx(NN,Q({className:et(me.root,P),closeAfterTransition:!0,components:{Backdrop:PN},componentsProps:{backdrop:Q({transitionDuration:Z,as:y},_)},disableEscapeKeyDown:N,onClose:F,open:D,ref:s,onClick:we,ownerState:le},de,{children:j.jsx(ee,Q({appear:!0,in:D,timeout:Z,role:"presentation"},X,{children:j.jsx(IN,{className:et(me.container),onMouseDown:xe,ownerState:le,children:j.jsx(RN,Q({as:z,elevation:24,role:"dialog","aria-describedby":b,"aria-labelledby":ge},Y,{className:et(me.paper,Y.className),ownerState:le,children:j.jsx(py.Provider,{value:_e,children:S})}))})}))}))}),td=TN;function FN(t){return vt("MuiDialogActions",t)}bt("MuiDialogActions",["root","spacing"]);const LN=["className","disableSpacing"],DN=t=>{const{classes:r,disableSpacing:s}=t;return _t({root:["root",!s&&"spacing"]},FN,r)},ON=Ue("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,!s.disableSpacing&&r.spacing]}})(({ownerState:t})=>Q({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),BN=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiDialogActions"}),{className:p,disableSpacing:d=!1}=u,b=Xe(u,LN),k=Q({},u,{disableSpacing:d}),y=DN(k);return j.jsx(ON,Q({className:et(y.root,p),ownerState:k,ref:s},b))}),nd=BN;function jN(t){return vt("MuiDialogContent",t)}bt("MuiDialogContent",["root","dividers"]);function zN(t){return vt("MuiDialogTitle",t)}const VN=bt("MuiDialogTitle",["root"]),WN=VN,UN=["className","dividers"],HN=t=>{const{classes:r,dividers:s}=t;return _t({root:["root",s&&"dividers"]},jN,r)},GN=Ue("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.dividers&&r.dividers]}})(({theme:t,ownerState:r})=>Q({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},r.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${WN.root} + &`]:{paddingTop:0}})),QN=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiDialogContent"}),{className:p,dividers:d=!1}=u,b=Xe(u,UN),k=Q({},u,{dividers:d}),y=HN(k);return j.jsx(GN,Q({className:et(y.root,p),ownerState:k,ref:s},b))}),rd=QN;function YN(t){return vt("MuiDialogContentText",t)}bt("MuiDialogContentText",["root"]);const KN=["children","className"],XN=t=>{const{classes:r}=t,u=_t({root:["root"]},YN,r);return Q({},r,u)},qN=Ue(oo,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(t,r)=>r.root})({}),ZN=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiDialogContentText"}),{className:p}=u,d=Xe(u,KN),b=XN(d);return j.jsx(qN,Q({component:"p",variant:"body1",color:"text.secondary",ref:s,ownerState:d,className:et(b.root,p)},u,{classes:b}))}),JN=ZN,$N=["className","id"],eI=t=>{const{classes:r}=t;return _t({root:["root"]},zN,r)},tI=Ue(oo,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,r)=>r.root})({padding:"16px 24px",flex:"0 0 auto"}),nI=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiDialogTitle"}),{className:p,id:d}=u,b=Xe(u,$N),k=u,y=eI(k),{titleId:_=d}=$.useContext(py);return j.jsx(tI,Q({component:"h2",className:et(y.root,p),ownerState:k,ref:s,variant:"h6",id:d??_},b))}),od=nI;function rI(t){return vt("MuiDivider",t)}const oI=bt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),ov=oI,iI=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],aI=t=>{const{absolute:r,children:s,classes:u,flexItem:p,light:d,orientation:b,textAlign:k,variant:y}=t;return _t({root:["root",r&&"absolute",y,d&&"light",b==="vertical"&&"vertical",p&&"flexItem",s&&"withChildren",s&&b==="vertical"&&"withChildrenVertical",k==="right"&&b!=="vertical"&&"textAlignRight",k==="left"&&b!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",b==="vertical"&&"wrapperVertical"]},rI,u)},sI=Ue("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.absolute&&r.absolute,r[s.variant],s.light&&r.light,s.orientation==="vertical"&&r.vertical,s.flexItem&&r.flexItem,s.children&&r.withChildren,s.children&&s.orientation==="vertical"&&r.withChildrenVertical,s.textAlign==="right"&&s.orientation!=="vertical"&&r.textAlignRight,s.textAlign==="left"&&s.orientation!=="vertical"&&r.textAlignLeft]}})(({theme:t,ownerState:r})=>Q({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:Mn(t.palette.divider,.08)},r.variant==="inset"&&{marginLeft:72},r.variant==="middle"&&r.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},r.variant==="middle"&&r.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},r.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>Q({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:r})=>Q({},r.children&&r.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`}}),({theme:t,ownerState:r})=>Q({},r.children&&r.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`}}),({ownerState:t})=>Q({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),lI=Ue("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.wrapper,s.orientation==="vertical"&&r.wrapperVertical]}})(({theme:t,ownerState:r})=>Q({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},r.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),hy=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiDivider"}),{absolute:p=!1,children:d,className:b,component:k=d?"div":"hr",flexItem:y=!1,light:_=!1,orientation:S="horizontal",role:P=k!=="hr"?"separator":void 0,textAlign:N="center",variant:L="fullWidth"}=u,R=Xe(u,iI),O=Q({},u,{absolute:p,component:k,flexItem:y,light:_,orientation:S,role:P,textAlign:N,variant:L}),q=aI(O);return j.jsx(sI,Q({as:k,className:et(q.root,b),role:P,ref:s,ownerState:O},R,{children:d?j.jsx(lI,{className:q.wrapper,ownerState:O,children:d}):null}))});hy.muiSkipListHighlight=!0;const P2=hy,cI=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function uI(t,r,s){const u=r.getBoundingClientRect(),p=s&&s.getBoundingClientRect(),d=Mi(r);let b;if(r.fakeTransform)b=r.fakeTransform;else{const _=d.getComputedStyle(r);b=_.getPropertyValue("-webkit-transform")||_.getPropertyValue("transform")}let k=0,y=0;if(b&&b!=="none"&&typeof b=="string"){const _=b.split("(")[1].split(")")[0].split(",");k=parseInt(_[4],10),y=parseInt(_[5],10)}return t==="left"?p?`translateX(${p.right+k-u.left}px)`:`translateX(${d.innerWidth+k-u.left}px)`:t==="right"?p?`translateX(-${u.right-p.left-k}px)`:`translateX(-${u.left+u.width-k}px)`:t==="up"?p?`translateY(${p.bottom+y-u.top}px)`:`translateY(${d.innerHeight+y-u.top}px)`:p?`translateY(-${u.top-p.top+u.height-y}px)`:`translateY(-${u.top+u.height-y}px)`}function fI(t){return typeof t=="function"?t():t}function Vu(t,r,s){const u=fI(s),p=uI(t,r,u);p&&(r.style.webkitTransform=p,r.style.transform=p)}const dI=$.forwardRef(function(r,s){const u=Ii(),p={enter:u.transitions.easing.easeOut,exit:u.transitions.easing.sharp},d={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{addEndListener:b,appear:k=!0,children:y,container:_,direction:S="down",easing:P=p,in:N,onEnter:L,onEntered:R,onEntering:O,onExit:q,onExited:F,onExiting:D,style:z,timeout:Y=d,TransitionComponent:U=mh}=r,ee=Xe(r,cI),Z=$.useRef(null),X=Un(y.ref,Z,s),de=ce=>ke=>{ce&&(ke===void 0?ce(Z.current):ce(Z.current,ke))},le=de((ce,ke)=>{Vu(S,ce,_),vh(ce),L&&L(ce,ke)}),me=de((ce,ke)=>{const Pe=$s({timeout:Y,style:z,easing:P},{mode:"enter"});ce.style.webkitTransition=u.transitions.create("-webkit-transform",Q({},Pe)),ce.style.transition=u.transitions.create("transform",Q({},Pe)),ce.style.webkitTransform="none",ce.style.transform="none",O&&O(ce,ke)}),pe=de(R),xe=de(D),we=de(ce=>{const ke=$s({timeout:Y,style:z,easing:P},{mode:"exit"});ce.style.webkitTransition=u.transitions.create("-webkit-transform",ke),ce.style.transition=u.transitions.create("transform",ke),Vu(S,ce,_),q&&q(ce)}),ge=de(ce=>{ce.style.webkitTransition="",ce.style.transition="",F&&F(ce)}),_e=ce=>{b&&b(Z.current,ce)},ve=$.useCallback(()=>{Z.current&&Vu(S,Z.current,_)},[S,_]);return $.useEffect(()=>{if(N||S==="down"||S==="right")return;const ce=lh(()=>{Z.current&&Vu(S,Z.current,_)}),ke=Mi(Z.current);return ke.addEventListener("resize",ce),()=>{ce.clear(),ke.removeEventListener("resize",ce)}},[S,N,_]),$.useEffect(()=>{N||ve()},[N,ve]),j.jsx(U,Q({nodeRef:Z,onEnter:le,onEntered:pe,onEntering:me,onExit:we,onExited:ge,onExiting:xe,addEndListener:_e,appear:k,in:N,timeout:Y},ee,{children:(ce,ke)=>$.cloneElement(y,Q({ref:X,style:Q({visibility:ce==="exited"&&!N?"hidden":void 0},z,y.props.style)},ke))}))}),pI=dI;function hI(t){return vt("MuiDrawer",t)}bt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const mI=["BackdropProps"],gI=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],my=(t,r)=>{const{ownerState:s}=t;return[r.root,(s.variant==="permanent"||s.variant==="persistent")&&r.docked,r.modal]},bI=t=>{const{classes:r,anchor:s,variant:u}=t,p={root:["root"],docked:[(u==="permanent"||u==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$e(s)}`,u!=="temporary"&&`paperAnchorDocked${$e(s)}`]};return _t(p,hI,r)},vI=Ue(yh,{name:"MuiDrawer",slot:"Root",overridesResolver:my})(({theme:t})=>({zIndex:(t.vars||t).zIndex.drawer})),iv=Ue("div",{shouldForwardProp:br,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:my})({flex:"0 0 auto"}),kI=Ue(da,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.paper,r[`paperAnchor${$e(s.anchor)}`],s.variant!=="temporary"&&r[`paperAnchorDocked${$e(s.anchor)}`]]}})(({theme:t,ownerState:r})=>Q({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},r.anchor==="left"&&{left:0},r.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},r.anchor==="right"&&{right:0},r.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},r.anchor==="left"&&r.variant!=="temporary"&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},r.anchor==="top"&&r.variant!=="temporary"&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},r.anchor==="right"&&r.variant!=="temporary"&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},r.anchor==="bottom"&&r.variant!=="temporary"&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`})),gy={left:"right",right:"left",top:"down",bottom:"up"};function yI(t){return["left","right"].indexOf(t)!==-1}function _I(t,r){return t.direction==="rtl"&&yI(r)?gy[r]:r}const wI=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiDrawer"}),p=Ii(),d={enter:p.transitions.duration.enteringScreen,exit:p.transitions.duration.leavingScreen},{anchor:b="left",BackdropProps:k,children:y,className:_,elevation:S=16,hideBackdrop:P=!1,ModalProps:{BackdropProps:N}={},onClose:L,open:R=!1,PaperProps:O={},SlideProps:q,TransitionComponent:F=pI,transitionDuration:D=d,variant:z="temporary"}=u,Y=Xe(u.ModalProps,mI),U=Xe(u,gI),ee=$.useRef(!1);$.useEffect(()=>{ee.current=!0},[]);const Z=_I(p,b),de=Q({},u,{anchor:b,elevation:S,open:R,variant:z},U),le=bI(de),me=j.jsx(kI,Q({elevation:z==="temporary"?S:0,square:!0},O,{className:et(le.paper,O.className),ownerState:de,children:y}));if(z==="permanent")return j.jsx(iv,Q({className:et(le.root,le.docked,_),ownerState:de,ref:s},U,{children:me}));const pe=j.jsx(F,Q({in:R,direction:gy[Z],timeout:D,appear:ee.current},q,{children:me}));return z==="persistent"?j.jsx(iv,Q({className:et(le.root,le.docked,_),ownerState:de,ref:s},U,{children:pe})):j.jsx(vI,Q({BackdropProps:Q({},k,N,{transitionDuration:D}),className:et(le.root,le.modal,_),open:R,ownerState:de,onClose:L,hideBackdrop:P,ref:s},U,Y,{children:pe}))}),AI=wI,CI=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],xI=t=>{const{classes:r,disableUnderline:s}=t,p=_t({root:["root",!s&&"underline"],input:["input"]},lM,r);return Q({},r,p)},SI=Ue($f,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[...Zf(t,r),!s.disableUnderline&&r.underline]}})(({theme:t,ownerState:r})=>{var s;const u=t.palette.mode==="light",p=u?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",d=u?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",b=u?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",k=u?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return Q({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:d,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:b,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:d}},[`&.${ya.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:d},[`&.${ya.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:k}},!r.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(s=(t.vars||t).palette[r.color||"primary"])==null?void 0:s.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ya.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ya.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:p}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ya.disabled}, .${ya.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${ya.disabled}:before`]:{borderBottomStyle:"dotted"}},r.startAdornment&&{paddingLeft:12},r.endAdornment&&{paddingRight:12},r.multiline&&Q({padding:"25px 12px 8px"},r.size==="small"&&{paddingTop:21,paddingBottom:4},r.hiddenLabel&&{paddingTop:16,paddingBottom:17},r.hiddenLabel&&r.size==="small"&&{paddingTop:8,paddingBottom:9}))}),EI=Ue(ed,{name:"MuiFilledInput",slot:"Input",overridesResolver:Jf})(({theme:t,ownerState:r})=>Q({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},r.size==="small"&&{paddingTop:21,paddingBottom:4},r.hiddenLabel&&{paddingTop:16,paddingBottom:17},r.startAdornment&&{paddingLeft:0},r.endAdornment&&{paddingRight:0},r.hiddenLabel&&r.size==="small"&&{paddingTop:8,paddingBottom:9},r.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),by=$.forwardRef(function(r,s){var u,p,d,b;const k=wt({props:r,name:"MuiFilledInput"}),{components:y={},componentsProps:_,fullWidth:S=!1,inputComponent:P="input",multiline:N=!1,slotProps:L,slots:R={},type:O="text"}=k,q=Xe(k,CI),F=Q({},k,{fullWidth:S,inputComponent:P,multiline:N,type:O}),D=xI(k),z={root:{ownerState:F},input:{ownerState:F}},Y=L??_?Tr(z,L??_):z,U=(u=(p=R.root)!=null?p:y.Root)!=null?u:SI,ee=(d=(b=R.input)!=null?b:y.Input)!=null?d:EI;return j.jsx(kh,Q({slots:{root:U,input:ee},componentsProps:Y,fullWidth:S,inputComponent:P,multiline:N,ref:s,type:O},q,{classes:D}))});by.muiName="Input";const vy=by;function PI(t){return vt("MuiFormControl",t)}bt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const MI=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],NI=t=>{const{classes:r,margin:s,fullWidth:u}=t,p={root:["root",s!=="none"&&`margin${$e(s)}`,u&&"fullWidth"]};return _t(p,PI,r)},II=Ue("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},r)=>Q({},r.root,r[`margin${$e(t.margin)}`],t.fullWidth&&r.fullWidth)})(({ownerState:t})=>Q({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),RI=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiFormControl"}),{children:p,className:d,color:b="primary",component:k="div",disabled:y=!1,error:_=!1,focused:S,fullWidth:P=!1,hiddenLabel:N=!1,margin:L="none",required:R=!1,size:O="medium",variant:q="outlined"}=u,F=Xe(u,MI),D=Q({},u,{color:b,component:k,disabled:y,error:_,fullWidth:P,hiddenLabel:N,margin:L,required:R,size:O,variant:q}),z=NI(D),[Y,U]=$.useState(()=>{let xe=!1;return p&&$.Children.forEach(p,we=>{if(!i0(we,["Input","Select"]))return;const ge=i0(we,["Select"])?we.props.input:we;ge&&ZP(ge.props)&&(xe=!0)}),xe}),[ee,Z]=$.useState(()=>{let xe=!1;return p&&$.Children.forEach(p,we=>{i0(we,["Input","Select"])&&(U0(we.props,!0)||U0(we.props.inputProps,!0))&&(xe=!0)}),xe}),[X,de]=$.useState(!1);y&&X&&de(!1);const le=S!==void 0&&!y?S:X;let me;const pe=$.useMemo(()=>({adornedStart:Y,setAdornedStart:U,color:b,disabled:y,error:_,filled:ee,focused:le,fullWidth:P,hiddenLabel:N,size:O,onBlur:()=>{de(!1)},onEmpty:()=>{Z(!1)},onFilled:()=>{Z(!0)},onFocus:()=>{de(!0)},registerEffect:me,required:R,variant:q}),[Y,b,y,_,ee,le,P,N,me,R,O,q]);return j.jsx(qf.Provider,{value:pe,children:j.jsx(II,Q({as:k,ownerState:D,className:et(z.root,d),ref:s},F,{children:p}))})}),_h=RI,TI=G7({createStyledComponent:Ue("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,r)=>r.root}),useThemeProps:t=>wt({props:t,name:"MuiStack"})}),gi=TI;function FI(t){return vt("MuiFormControlLabel",t)}const LI=bt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),ql=LI,DI=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],OI=t=>{const{classes:r,disabled:s,labelPlacement:u,error:p,required:d}=t,b={root:["root",s&&"disabled",`labelPlacement${$e(u)}`,p&&"error",d&&"required"],label:["label",s&&"disabled"],asterisk:["asterisk",p&&"error"]};return _t(b,FI,r)},BI=Ue("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[{[`& .${ql.label}`]:r.label},r.root,r[`labelPlacement${$e(s.labelPlacement)}`]]}})(({theme:t,ownerState:r})=>Q({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${ql.disabled}`]:{cursor:"default"}},r.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},r.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},r.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${ql.label}`]:{[`&.${ql.disabled}`]:{color:(t.vars||t).palette.text.disabled}}})),jI=Ue("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(t,r)=>r.asterisk})(({theme:t})=>({[`&.${ql.error}`]:{color:(t.vars||t).palette.error.main}})),zI=$.forwardRef(function(r,s){var u,p;const d=wt({props:r,name:"MuiFormControlLabel"}),{className:b,componentsProps:k={},control:y,disabled:_,disableTypography:S,label:P,labelPlacement:N="end",required:L,slotProps:R={}}=d,O=Xe(d,DI),q=li(),F=(u=_??y.props.disabled)!=null?u:q==null?void 0:q.disabled,D=L??y.props.required,z={disabled:F,required:D};["checked","name","onChange","value","inputRef"].forEach(de=>{typeof y.props[de]>"u"&&typeof d[de]<"u"&&(z[de]=d[de])});const Y=pa({props:d,muiFormControl:q,states:["error"]}),U=Q({},d,{disabled:F,labelPlacement:N,required:D,error:Y.error}),ee=OI(U),Z=(p=R.typography)!=null?p:k.typography;let X=P;return X!=null&&X.type!==oo&&!S&&(X=j.jsx(oo,Q({component:"span"},Z,{className:et(ee.label,Z==null?void 0:Z.className),children:X}))),j.jsxs(BI,Q({className:et(ee.root,b),ownerState:U,ref:s},O,{children:[$.cloneElement(y,z),D?j.jsxs(gi,{display:"block",children:[X,j.jsxs(jI,{ownerState:U,"aria-hidden":!0,className:ee.asterisk,children:[" ","*"]})]}):X]}))}),ky=zI;function VI(t){return vt("MuiFormGroup",t)}bt("MuiFormGroup",["root","row","error"]);const WI=["className","row"],UI=t=>{const{classes:r,row:s,error:u}=t;return _t({root:["root",s&&"row",u&&"error"]},VI,r)},HI=Ue("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.row&&r.row]}})(({ownerState:t})=>Q({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})),GI=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiFormGroup"}),{className:p,row:d=!1}=u,b=Xe(u,WI),k=li(),y=pa({props:u,muiFormControl:k,states:["error"]}),_=Q({},u,{row:d,error:y.error}),S=UI(_);return j.jsx(HI,Q({className:et(S.root,p),ownerState:_,ref:s},b))}),QI=GI;function YI(t){return vt("MuiFormHelperText",t)}const KI=bt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),av=KI;var sv;const XI=["children","className","component","disabled","error","filled","focused","margin","required","variant"],qI=t=>{const{classes:r,contained:s,size:u,disabled:p,error:d,filled:b,focused:k,required:y}=t,_={root:["root",p&&"disabled",d&&"error",u&&`size${$e(u)}`,s&&"contained",k&&"focused",b&&"filled",y&&"required"]};return _t(_,YI,r)},ZI=Ue("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.size&&r[`size${$e(s.size)}`],s.contained&&r.contained,s.filled&&r.filled]}})(({theme:t,ownerState:r})=>Q({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${av.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${av.error}`]:{color:(t.vars||t).palette.error.main}},r.size==="small"&&{marginTop:4},r.contained&&{marginLeft:14,marginRight:14})),JI=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiFormHelperText"}),{children:p,className:d,component:b="p"}=u,k=Xe(u,XI),y=li(),_=pa({props:u,muiFormControl:y,states:["variant","size","disabled","error","filled","focused","required"]}),S=Q({},u,{component:b,contained:_.variant==="filled"||_.variant==="outlined",variant:_.variant,size:_.size,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required}),P=qI(S);return j.jsx(ZI,Q({as:b,ownerState:S,className:et(P.root,d),ref:s},k,{children:p===" "?sv||(sv=j.jsx("span",{className:"notranslate",children:"​"})):p}))}),$I=JI;function eR(t){return vt("MuiFormLabel",t)}const tR=bt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),lc=tR,nR=["children","className","color","component","disabled","error","filled","focused","required"],rR=t=>{const{classes:r,color:s,focused:u,disabled:p,error:d,filled:b,required:k}=t,y={root:["root",`color${$e(s)}`,p&&"disabled",d&&"error",b&&"filled",u&&"focused",k&&"required"],asterisk:["asterisk",d&&"error"]};return _t(y,eR,r)},oR=Ue("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},r)=>Q({},r.root,t.color==="secondary"&&r.colorSecondary,t.filled&&r.filled)})(({theme:t,ownerState:r})=>Q({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${lc.focused}`]:{color:(t.vars||t).palette[r.color].main},[`&.${lc.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${lc.error}`]:{color:(t.vars||t).palette.error.main}})),iR=Ue("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,r)=>r.asterisk})(({theme:t})=>({[`&.${lc.error}`]:{color:(t.vars||t).palette.error.main}})),aR=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiFormLabel"}),{children:p,className:d,component:b="label"}=u,k=Xe(u,nR),y=li(),_=pa({props:u,muiFormControl:y,states:["color","required","focused","disabled","error","filled"]}),S=Q({},u,{color:_.color||"primary",component:b,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required}),P=rR(S);return j.jsxs(oR,Q({as:b,ownerState:S,className:et(P.root,d),ref:s},k,{children:[p,_.required&&j.jsxs(iR,{ownerState:S,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]}))}),sR=aR,lR=$.createContext(),lv=lR;function cR(t){return vt("MuiGrid",t)}const uR=[0,1,2,3,4,5,6,7,8,9,10],fR=["column-reverse","column","row-reverse","row"],dR=["nowrap","wrap-reverse","wrap"],Vl=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Nc=bt("MuiGrid",["root","container","item","zeroMinWidth",...uR.map(t=>`spacing-xs-${t}`),...fR.map(t=>`direction-xs-${t}`),...dR.map(t=>`wrap-xs-${t}`),...Vl.map(t=>`grid-xs-${t}`),...Vl.map(t=>`grid-sm-${t}`),...Vl.map(t=>`grid-md-${t}`),...Vl.map(t=>`grid-lg-${t}`),...Vl.map(t=>`grid-xl-${t}`)]),pR=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Hs(t){const r=parseFloat(t);return`${r}${String(t).replace(String(r),"")||"px"}`}function hR({theme:t,ownerState:r}){let s;return t.breakpoints.keys.reduce((u,p)=>{let d={};if(r[p]&&(s=r[p]),!s)return u;if(s===!0)d={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(s==="auto")d={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const b=Ia({values:r.columns,breakpoints:t.breakpoints.values}),k=typeof b=="object"?b[p]:b;if(k==null)return u;const y=`${Math.round(s/k*1e8)/1e6}%`;let _={};if(r.container&&r.item&&r.columnSpacing!==0){const S=t.spacing(r.columnSpacing);if(S!=="0px"){const P=`calc(${y} + ${Hs(S)})`;_={flexBasis:P,maxWidth:P}}}d=Q({flexBasis:y,flexGrow:0,maxWidth:y},_)}return t.breakpoints.values[p]===0?Object.assign(u,d):u[t.breakpoints.up(p)]=d,u},{})}function mR({theme:t,ownerState:r}){const s=Ia({values:r.direction,breakpoints:t.breakpoints.values});return qr({theme:t},s,u=>{const p={flexDirection:u};return u.indexOf("column")===0&&(p[`& > .${Nc.item}`]={maxWidth:"none"}),p})}function yy({breakpoints:t,values:r}){let s="";Object.keys(r).forEach(p=>{s===""&&r[p]!==0&&(s=p)});const u=Object.keys(t).sort((p,d)=>t[p]-t[d]);return u.slice(0,u.indexOf(s))}function gR({theme:t,ownerState:r}){const{container:s,rowSpacing:u}=r;let p={};if(s&&u!==0){const d=Ia({values:u,breakpoints:t.breakpoints.values});let b;typeof d=="object"&&(b=yy({breakpoints:t.breakpoints.values,values:d})),p=qr({theme:t},d,(k,y)=>{var _;const S=t.spacing(k);return S!=="0px"?{marginTop:`-${Hs(S)}`,[`& > .${Nc.item}`]:{paddingTop:Hs(S)}}:(_=b)!=null&&_.includes(y)?{}:{marginTop:0,[`& > .${Nc.item}`]:{paddingTop:0}}})}return p}function bR({theme:t,ownerState:r}){const{container:s,columnSpacing:u}=r;let p={};if(s&&u!==0){const d=Ia({values:u,breakpoints:t.breakpoints.values});let b;typeof d=="object"&&(b=yy({breakpoints:t.breakpoints.values,values:d})),p=qr({theme:t},d,(k,y)=>{var _;const S=t.spacing(k);return S!=="0px"?{width:`calc(100% + ${Hs(S)})`,marginLeft:`-${Hs(S)}`,[`& > .${Nc.item}`]:{paddingLeft:Hs(S)}}:(_=b)!=null&&_.includes(y)?{}:{width:"100%",marginLeft:0,[`& > .${Nc.item}`]:{paddingLeft:0}}})}return p}function vR(t,r,s={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[s[`spacing-xs-${String(t)}`]];const u=[];return r.forEach(p=>{const d=t[p];Number(d)>0&&u.push(s[`spacing-${p}-${String(d)}`])}),u}const kR=Ue("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t,{container:u,direction:p,item:d,spacing:b,wrap:k,zeroMinWidth:y,breakpoints:_}=s;let S=[];u&&(S=vR(b,_,r));const P=[];return _.forEach(N=>{const L=s[N];L&&P.push(r[`grid-${N}-${String(L)}`])}),[r.root,u&&r.container,d&&r.item,y&&r.zeroMinWidth,...S,p!=="row"&&r[`direction-xs-${String(p)}`],k!=="wrap"&&r[`wrap-xs-${String(k)}`],...P]}})(({ownerState:t})=>Q({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),mR,gR,bR,hR);function yR(t,r){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const s=[];return r.forEach(u=>{const p=t[u];if(Number(p)>0){const d=`spacing-${u}-${String(p)}`;s.push(d)}}),s}const _R=t=>{const{classes:r,container:s,direction:u,item:p,spacing:d,wrap:b,zeroMinWidth:k,breakpoints:y}=t;let _=[];s&&(_=yR(d,y));const S=[];y.forEach(N=>{const L=t[N];L&&S.push(`grid-${N}-${String(L)}`)});const P={root:["root",s&&"container",p&&"item",k&&"zeroMinWidth",..._,u!=="row"&&`direction-xs-${String(u)}`,b!=="wrap"&&`wrap-xs-${String(b)}`,...S]};return _t(P,cR,r)},wR=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiGrid"}),{breakpoints:p}=Ii(),d=Wc(u),{className:b,columns:k,columnSpacing:y,component:_="div",container:S=!1,direction:P="row",item:N=!1,rowSpacing:L,spacing:R=0,wrap:O="wrap",zeroMinWidth:q=!1}=d,F=Xe(d,pR),D=L||R,z=y||R,Y=$.useContext(lv),U=S?k||12:Y,ee={},Z=Q({},F);p.keys.forEach(le=>{F[le]!=null&&(ee[le]=F[le],delete Z[le])});const X=Q({},d,{columns:U,container:S,direction:P,item:N,rowSpacing:D,columnSpacing:z,wrap:O,zeroMinWidth:q,spacing:R},ee,{breakpoints:p.keys}),de=_R(X);return j.jsx(lv.Provider,{value:U,children:j.jsx(kR,Q({ownerState:X,className:et(de.root,b),as:_,ref:s},Z))})}),l0=wR,AR=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function j1(t){return`scale(${t}, ${t**2})`}const CR={entering:{opacity:1,transform:j1(1)},entered:{opacity:1,transform:"none"}},M2=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),_y=$.forwardRef(function(r,s){const{addEndListener:u,appear:p=!0,children:d,easing:b,in:k,onEnter:y,onEntered:_,onEntering:S,onExit:P,onExited:N,onExiting:L,style:R,timeout:O="auto",TransitionComponent:q=mh}=r,F=Xe(r,AR),D=uh(),z=$.useRef(),Y=Ii(),U=$.useRef(null),ee=Un(U,d.ref,s),Z=ge=>_e=>{if(ge){const ve=U.current;_e===void 0?ge(ve):ge(ve,_e)}},X=Z(S),de=Z((ge,_e)=>{vh(ge);const{duration:ve,delay:ce,easing:ke}=$s({style:R,timeout:O,easing:b},{mode:"enter"});let Pe;O==="auto"?(Pe=Y.transitions.getAutoHeightDuration(ge.clientHeight),z.current=Pe):Pe=ve,ge.style.transition=[Y.transitions.create("opacity",{duration:Pe,delay:ce}),Y.transitions.create("transform",{duration:M2?Pe:Pe*.666,delay:ce,easing:ke})].join(","),y&&y(ge,_e)}),le=Z(_),me=Z(L),pe=Z(ge=>{const{duration:_e,delay:ve,easing:ce}=$s({style:R,timeout:O,easing:b},{mode:"exit"});let ke;O==="auto"?(ke=Y.transitions.getAutoHeightDuration(ge.clientHeight),z.current=ke):ke=_e,ge.style.transition=[Y.transitions.create("opacity",{duration:ke,delay:ve}),Y.transitions.create("transform",{duration:M2?ke:ke*.666,delay:M2?ve:ve||ke*.333,easing:ce})].join(","),ge.style.opacity=0,ge.style.transform=j1(.75),P&&P(ge)}),xe=Z(N),we=ge=>{O==="auto"&&D.start(z.current||0,ge),u&&u(U.current,ge)};return j.jsx(q,Q({appear:p,in:k,nodeRef:U,onEnter:de,onEntered:le,onEntering:X,onExit:pe,onExited:xe,onExiting:me,addEndListener:we,timeout:O==="auto"?null:O},F,{children:(ge,_e)=>$.cloneElement(d,Q({style:Q({opacity:0,transform:j1(.75),visibility:ge==="exited"&&!k?"hidden":void 0},CR[ge],R,d.props.style),ref:ee},_e))}))});_y.muiSupportAuto=!0;const wy=_y,xR=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],SR=t=>{const{classes:r,disableUnderline:s}=t,p=_t({root:["root",!s&&"underline"],input:["input"]},oM,r);return Q({},r,p)},ER=Ue($f,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[...Zf(t,r),!s.disableUnderline&&r.underline]}})(({theme:t,ownerState:r})=>{let u=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(u=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),Q({position:"relative"},r.formControl&&{"label + &":{marginTop:16}},!r.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${zl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${zl.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${u}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${zl.disabled}, .${zl.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${u}`}},[`&.${zl.disabled}:before`]:{borderBottomStyle:"dotted"}})}),PR=Ue(ed,{name:"MuiInput",slot:"Input",overridesResolver:Jf})({}),Ay=$.forwardRef(function(r,s){var u,p,d,b;const k=wt({props:r,name:"MuiInput"}),{disableUnderline:y,components:_={},componentsProps:S,fullWidth:P=!1,inputComponent:N="input",multiline:L=!1,slotProps:R,slots:O={},type:q="text"}=k,F=Xe(k,xR),D=SR(k),Y={root:{ownerState:{disableUnderline:y}}},U=R??S?Tr(R??S,Y):Y,ee=(u=(p=O.root)!=null?p:_.Root)!=null?u:ER,Z=(d=(b=O.input)!=null?b:_.Input)!=null?d:PR;return j.jsx(kh,Q({slots:{root:ee,input:Z},slotProps:U,fullWidth:P,inputComponent:N,multiline:L,ref:s,type:q},F,{classes:D}))});Ay.muiName="Input";const Cy=Ay;function MR(t){return vt("MuiInputAdornment",t)}const NR=bt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),cv=NR;var uv;const IR=["children","className","component","disablePointerEvents","disableTypography","position","variant"],RR=(t,r)=>{const{ownerState:s}=t;return[r.root,r[`position${$e(s.position)}`],s.disablePointerEvents===!0&&r.disablePointerEvents,r[s.variant]]},TR=t=>{const{classes:r,disablePointerEvents:s,hiddenLabel:u,position:p,size:d,variant:b}=t,k={root:["root",s&&"disablePointerEvents",p&&`position${$e(p)}`,b,u&&"hiddenLabel",d&&`size${$e(d)}`]};return _t(k,MR,r)},FR=Ue("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:RR})(({theme:t,ownerState:r})=>Q({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},r.variant==="filled"&&{[`&.${cv.positionStart}&:not(.${cv.hiddenLabel})`]:{marginTop:16}},r.position==="start"&&{marginRight:8},r.position==="end"&&{marginLeft:8},r.disablePointerEvents===!0&&{pointerEvents:"none"})),LR=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiInputAdornment"}),{children:p,className:d,component:b="div",disablePointerEvents:k=!1,disableTypography:y=!1,position:_,variant:S}=u,P=Xe(u,IR),N=li()||{};let L=S;S&&N.variant,N&&!L&&(L=N.variant);const R=Q({},u,{hiddenLabel:N.hiddenLabel,size:N.size,disablePointerEvents:k,position:_,variant:L}),O=TR(R);return j.jsx(qf.Provider,{value:null,children:j.jsx(FR,Q({as:b,ownerState:R,className:et(O.root,d),ref:s},P,{children:typeof p=="string"&&!y?j.jsx(oo,{color:"text.secondary",children:p}):j.jsxs($.Fragment,{children:[_==="start"?uv||(uv=j.jsx("span",{className:"notranslate",children:"​"})):null,p]})}))})}),DR=LR;function OR(t){return vt("MuiInputLabel",t)}bt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const BR=["disableAnimation","margin","shrink","variant","className"],jR=t=>{const{classes:r,formControl:s,size:u,shrink:p,disableAnimation:d,variant:b,required:k}=t,y={root:["root",s&&"formControl",!d&&"animated",p&&"shrink",u&&u!=="normal"&&`size${$e(u)}`,b],asterisk:[k&&"asterisk"]},_=_t(y,OR,r);return Q({},r,_)},zR=Ue(sR,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[{[`& .${lc.asterisk}`]:r.asterisk},r.root,s.formControl&&r.formControl,s.size==="small"&&r.sizeSmall,s.shrink&&r.shrink,!s.disableAnimation&&r.animated,s.focused&&r.focused,r[s.variant]]}})(({theme:t,ownerState:r})=>Q({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},r.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},r.size==="small"&&{transform:"translate(0, 17px) scale(1)"},r.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!r.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},r.variant==="filled"&&Q({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},r.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},r.shrink&&Q({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},r.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),r.variant==="outlined"&&Q({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},r.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},r.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),VR=$.forwardRef(function(r,s){const u=wt({name:"MuiInputLabel",props:r}),{disableAnimation:p=!1,shrink:d,className:b}=u,k=Xe(u,BR),y=li();let _=d;typeof _>"u"&&y&&(_=y.filled||y.focused||y.adornedStart);const S=pa({props:u,muiFormControl:y,states:["size","variant","required","focused"]}),P=Q({},u,{disableAnimation:p,formControl:y,shrink:_,size:S.size,variant:S.variant,required:S.required,focused:S.focused}),N=jR(P);return j.jsx(zR,Q({"data-shrink":_,ownerState:P,ref:s,className:et(N.root,b)},k,{classes:N}))}),xy=VR,WR=$.createContext({}),ai=WR;function UR(t){return vt("MuiList",t)}bt("MuiList",["root","padding","dense","subheader"]);const HR=["children","className","component","dense","disablePadding","subheader"],GR=t=>{const{classes:r,disablePadding:s,dense:u,subheader:p}=t;return _t({root:["root",!s&&"padding",u&&"dense",p&&"subheader"]},UR,r)},QR=Ue("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,!s.disablePadding&&r.padding,s.dense&&r.dense,s.subheader&&r.subheader]}})(({ownerState:t})=>Q({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),YR=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiList"}),{children:p,className:d,component:b="ul",dense:k=!1,disablePadding:y=!1,subheader:_}=u,S=Xe(u,HR),P=$.useMemo(()=>({dense:k}),[k]),N=Q({},u,{component:b,dense:k,disablePadding:y}),L=GR(N);return j.jsx(ai.Provider,{value:P,children:j.jsxs(QR,Q({as:b,className:et(L.root,d),ref:s,ownerState:N},S,{children:[_,p]}))})}),Sy=YR;function KR(t){return vt("MuiListItem",t)}const XR=bt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),_s=XR;function qR(t){return vt("MuiListItemButton",t)}const ZR=bt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),ws=ZR,JR=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],$R=(t,r)=>{const{ownerState:s}=t;return[r.root,s.dense&&r.dense,s.alignItems==="flex-start"&&r.alignItemsFlexStart,s.divider&&r.divider,!s.disableGutters&&r.gutters]},eT=t=>{const{alignItems:r,classes:s,dense:u,disabled:p,disableGutters:d,divider:b,selected:k}=t,_=_t({root:["root",u&&"dense",!d&&"gutters",b&&"divider",p&&"disabled",r==="flex-start"&&"alignItemsFlexStart",k&&"selected"]},qR,s);return Q({},s,_)},tT=Ue(ul,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:$R})(({theme:t,ownerState:r})=>Q({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ws.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${ws.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${ws.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${ws.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${ws.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},r.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},r.alignItems==="flex-start"&&{alignItems:"flex-start"},!r.disableGutters&&{paddingLeft:16,paddingRight:16},r.dense&&{paddingTop:4,paddingBottom:4})),nT=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiListItemButton"}),{alignItems:p="center",autoFocus:d=!1,component:b="div",children:k,dense:y=!1,disableGutters:_=!1,divider:S=!1,focusVisibleClassName:P,selected:N=!1,className:L}=u,R=Xe(u,JR),O=$.useContext(ai),q=$.useMemo(()=>({dense:y||O.dense||!1,alignItems:p,disableGutters:_}),[p,O.dense,y,_]),F=$.useRef(null);xo(()=>{d&&F.current&&F.current.focus()},[d]);const D=Q({},u,{alignItems:p,dense:q.dense,disableGutters:_,divider:S,selected:N}),z=eT(D),Y=Un(F,s);return j.jsx(ai.Provider,{value:q,children:j.jsx(tT,Q({ref:Y,href:R.href||R.to,component:(R.href||R.to)&&b==="div"?"button":b,focusVisibleClassName:et(z.focusVisible,P),ownerState:D,className:et(z.root,L)},R,{classes:z,children:k}))})}),fv=nT;function rT(t){return vt("MuiListItemSecondaryAction",t)}bt("MuiListItemSecondaryAction",["root","disableGutters"]);const oT=["className"],iT=t=>{const{disableGutters:r,classes:s}=t;return _t({root:["root",r&&"disableGutters"]},rT,s)},aT=Ue("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,s.disableGutters&&r.disableGutters]}})(({ownerState:t})=>Q({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),Ey=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiListItemSecondaryAction"}),{className:p}=u,d=Xe(u,oT),b=$.useContext(ai),k=Q({},u,{disableGutters:b.disableGutters}),y=iT(k);return j.jsx(aT,Q({className:et(y.root,p),ownerState:k,ref:s},d))});Ey.muiName="ListItemSecondaryAction";const sT=Ey,lT=["className"],cT=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],uT=(t,r)=>{const{ownerState:s}=t;return[r.root,s.dense&&r.dense,s.alignItems==="flex-start"&&r.alignItemsFlexStart,s.divider&&r.divider,!s.disableGutters&&r.gutters,!s.disablePadding&&r.padding,s.button&&r.button,s.hasSecondaryAction&&r.secondaryAction]},fT=t=>{const{alignItems:r,button:s,classes:u,dense:p,disabled:d,disableGutters:b,disablePadding:k,divider:y,hasSecondaryAction:_,selected:S}=t;return _t({root:["root",p&&"dense",!b&&"gutters",!k&&"padding",y&&"divider",d&&"disabled",s&&"button",r==="flex-start"&&"alignItemsFlexStart",_&&"secondaryAction",S&&"selected"],container:["container"]},KR,u)},dT=Ue("div",{name:"MuiListItem",slot:"Root",overridesResolver:uT})(({theme:t,ownerState:r})=>Q({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!r.disablePadding&&Q({paddingTop:8,paddingBottom:8},r.dense&&{paddingTop:4,paddingBottom:4},!r.disableGutters&&{paddingLeft:16,paddingRight:16},!!r.secondaryAction&&{paddingRight:48}),!!r.secondaryAction&&{[`& > .${ws.root}`]:{paddingRight:48}},{[`&.${_s.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${_s.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${_s.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${_s.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},r.alignItems==="flex-start"&&{alignItems:"flex-start"},r.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},r.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${_s.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity)}}},r.hasSecondaryAction&&{paddingRight:48})),pT=Ue("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,r)=>r.container})({position:"relative"}),hT=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiListItem"}),{alignItems:p="center",autoFocus:d=!1,button:b=!1,children:k,className:y,component:_,components:S={},componentsProps:P={},ContainerComponent:N="li",ContainerProps:{className:L}={},dense:R=!1,disabled:O=!1,disableGutters:q=!1,disablePadding:F=!1,divider:D=!1,focusVisibleClassName:z,secondaryAction:Y,selected:U=!1,slotProps:ee={},slots:Z={}}=u,X=Xe(u.ContainerProps,lT),de=Xe(u,cT),le=$.useContext(ai),me=$.useMemo(()=>({dense:R||le.dense||!1,alignItems:p,disableGutters:q}),[p,le.dense,R,q]),pe=$.useRef(null);xo(()=>{d&&pe.current&&pe.current.focus()},[d]);const xe=$.Children.toArray(k),we=xe.length&&i0(xe[xe.length-1],["ListItemSecondaryAction"]),ge=Q({},u,{alignItems:p,autoFocus:d,button:b,dense:me.dense,disabled:O,disableGutters:q,disablePadding:F,divider:D,hasSecondaryAction:we,selected:U}),_e=fT(ge),ve=Un(pe,s),ce=Z.root||S.Root||dT,ke=ee.root||P.root||{},Pe=Q({className:et(_e.root,ke.className,y),disabled:O},de);let Ae=_||"li";return b&&(Pe.component=_||"div",Pe.focusVisibleClassName=et(_s.focusVisible,z),Ae=ul),we?(Ae=!Pe.component&&!_?"div":Ae,N==="li"&&(Ae==="li"?Ae="div":Pe.component==="li"&&(Pe.component="div")),j.jsx(ai.Provider,{value:me,children:j.jsxs(pT,Q({as:N,className:et(_e.container,L),ref:ve,ownerState:ge},X,{children:[j.jsx(ce,Q({},ke,!ii(ce)&&{as:Ae,ownerState:Q({},ge,ke.ownerState)},Pe,{children:xe})),xe.pop()]}))})):j.jsx(ai.Provider,{value:me,children:j.jsxs(ce,Q({},ke,{as:Ae,ref:ve},!ii(ce)&&{ownerState:Q({},ge,ke.ownerState)},Pe,{children:[xe,Y&&j.jsx(sT,{children:Y})]}))})}),dv=hT,mT=bt("MuiListItemIcon",["root","alignItemsFlexStart"]),pv=mT;function gT(t){return vt("MuiListItemText",t)}const bT=bt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),H0=bT,vT=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],kT=t=>{const{classes:r,inset:s,primary:u,secondary:p,dense:d}=t;return _t({root:["root",s&&"inset",d&&"dense",u&&p&&"multiline"],primary:["primary"],secondary:["secondary"]},gT,r)},yT=Ue("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[{[`& .${H0.primary}`]:r.primary},{[`& .${H0.secondary}`]:r.secondary},r.root,s.inset&&r.inset,s.primary&&s.secondary&&r.multiline,s.dense&&r.dense]}})(({ownerState:t})=>Q({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),_T=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiListItemText"}),{children:p,className:d,disableTypography:b=!1,inset:k=!1,primary:y,primaryTypographyProps:_,secondary:S,secondaryTypographyProps:P}=u,N=Xe(u,vT),{dense:L}=$.useContext(ai);let R=y??p,O=S;const q=Q({},u,{disableTypography:b,inset:k,primary:!!R,secondary:!!O,dense:L}),F=kT(q);return R!=null&&R.type!==oo&&!b&&(R=j.jsx(oo,Q({variant:L?"body2":"body1",className:F.primary,component:_!=null&&_.variant?void 0:"span",display:"block"},_,{children:R}))),O!=null&&O.type!==oo&&!b&&(O=j.jsx(oo,Q({variant:"body2",className:F.secondary,color:"text.secondary",display:"block"},P,{children:O}))),j.jsxs(yT,Q({className:et(F.root,d),ownerState:q,ref:s},N,{children:[R,O]}))}),hv=_T,wT=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function N2(t,r,s){return t===r?t.firstChild:r&&r.nextElementSibling?r.nextElementSibling:s?null:t.firstChild}function mv(t,r,s){return t===r?s?t.firstChild:t.lastChild:r&&r.previousElementSibling?r.previousElementSibling:s?null:t.lastChild}function Py(t,r){if(r===void 0)return!0;let s=t.innerText;return s===void 0&&(s=t.textContent),s=s.trim().toLowerCase(),s.length===0?!1:r.repeating?s[0]===r.keys[0]:s.indexOf(r.keys.join(""))===0}function Wl(t,r,s,u,p,d){let b=!1,k=p(t,r,r?s:!1);for(;k;){if(k===t.firstChild){if(b)return!1;b=!0}const y=u?!1:k.disabled||k.getAttribute("aria-disabled")==="true";if(!k.hasAttribute("tabindex")||!Py(k,d)||y)k=p(t,k,s);else return k.focus(),!0}return!1}const AT=$.forwardRef(function(r,s){const{actions:u,autoFocus:p=!1,autoFocusItem:d=!1,children:b,className:k,disabledItemsFocusable:y=!1,disableListWrap:_=!1,onKeyDown:S,variant:P="selectedMenu"}=r,N=Xe(r,wT),L=$.useRef(null),R=$.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});xo(()=>{p&&L.current.focus()},[p]),$.useImperativeHandle(u,()=>({adjustStyleForScrollbar:(z,Y)=>{const U=!L.current.style.width;if(z.clientHeight{const Y=L.current,U=z.key,ee=Jn(Y).activeElement;if(U==="ArrowDown")z.preventDefault(),Wl(Y,ee,_,y,N2);else if(U==="ArrowUp")z.preventDefault(),Wl(Y,ee,_,y,mv);else if(U==="Home")z.preventDefault(),Wl(Y,null,_,y,N2);else if(U==="End")z.preventDefault(),Wl(Y,null,_,y,mv);else if(U.length===1){const Z=R.current,X=U.toLowerCase(),de=performance.now();Z.keys.length>0&&(de-Z.lastTime>500?(Z.keys=[],Z.repeating=!0,Z.previousKeyMatched=!0):Z.repeating&&X!==Z.keys[0]&&(Z.repeating=!1)),Z.lastTime=de,Z.keys.push(X);const le=ee&&!Z.repeating&&Py(ee,Z);Z.previousKeyMatched&&(le||Wl(Y,ee,!1,y,N2,Z))?z.preventDefault():Z.previousKeyMatched=!1}S&&S(z)},q=Un(L,s);let F=-1;$.Children.forEach(b,(z,Y)=>{if(!$.isValidElement(z)){F===Y&&(F+=1,F>=b.length&&(F=-1));return}z.props.disabled||(P==="selectedMenu"&&z.props.selected||F===-1)&&(F=Y),F===Y&&(z.props.disabled||z.props.muiSkipListHighlight||z.type.muiSkipListHighlight)&&(F+=1,F>=b.length&&(F=-1))});const D=$.Children.map(b,(z,Y)=>{if(Y===F){const U={};return d&&(U.autoFocus=!0),z.props.tabIndex===void 0&&P==="selectedMenu"&&(U.tabIndex=0),$.cloneElement(z,U)}return z});return j.jsx(Sy,Q({role:"menu",ref:q,className:k,onKeyDown:O,tabIndex:p?0:-1},N,{children:D}))}),CT=AT;function xT(t){return vt("MuiPopover",t)}bt("MuiPopover",["root","paper"]);const ST=["onEntering"],ET=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],PT=["slotProps"];function gv(t,r){let s=0;return typeof r=="number"?s=r:r==="center"?s=t.height/2:r==="bottom"&&(s=t.height),s}function bv(t,r){let s=0;return typeof r=="number"?s=r:r==="center"?s=t.width/2:r==="right"&&(s=t.width),s}function vv(t){return[t.horizontal,t.vertical].map(r=>typeof r=="number"?`${r}px`:r).join(" ")}function I2(t){return typeof t=="function"?t():t}const MT=t=>{const{classes:r}=t;return _t({root:["root"],paper:["paper"]},xT,r)},NT=Ue(yh,{name:"MuiPopover",slot:"Root",overridesResolver:(t,r)=>r.root})({}),My=Ue(da,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,r)=>r.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),IT=$.forwardRef(function(r,s){var u,p,d;const b=wt({props:r,name:"MuiPopover"}),{action:k,anchorEl:y,anchorOrigin:_={vertical:"top",horizontal:"left"},anchorPosition:S,anchorReference:P="anchorEl",children:N,className:L,container:R,elevation:O=8,marginThreshold:q=16,open:F,PaperProps:D={},slots:z,slotProps:Y,transformOrigin:U={vertical:"top",horizontal:"left"},TransitionComponent:ee=wy,transitionDuration:Z="auto",TransitionProps:{onEntering:X}={},disableScrollLock:de=!1}=b,le=Xe(b.TransitionProps,ST),me=Xe(b,ET),pe=(u=Y==null?void 0:Y.paper)!=null?u:D,xe=$.useRef(),we=Un(xe,pe.ref),ge=Q({},b,{anchorOrigin:_,anchorReference:P,elevation:O,marginThreshold:q,externalPaperSlotProps:pe,transformOrigin:U,TransitionComponent:ee,transitionDuration:Z,TransitionProps:le}),_e=MT(ge),ve=$.useCallback(()=>{if(P==="anchorPosition")return S;const Ct=I2(y),dt=(Ct&&Ct.nodeType===1?Ct:Jn(xe.current).body).getBoundingClientRect();return{top:dt.top+gv(dt,_.vertical),left:dt.left+bv(dt,_.horizontal)}},[y,_.horizontal,_.vertical,S,P]),ce=$.useCallback(Ct=>({vertical:gv(Ct,U.vertical),horizontal:bv(Ct,U.horizontal)}),[U.horizontal,U.vertical]),ke=$.useCallback(Ct=>{const xt={width:Ct.offsetWidth,height:Ct.offsetHeight},dt=ce(xt);if(P==="none")return{top:null,left:null,transformOrigin:vv(dt)};const Et=ve();let yn=Et.top-dt.vertical,ut=Et.left-dt.horizontal;const Nn=yn+xt.height,Hn=ut+xt.width,Mt=Mi(I2(y)),ir=Mt.innerHeight-q,Xn=Mt.innerWidth-q;if(q!==null&&ynir){const Xt=Nn-ir;yn-=Xt,dt.vertical+=Xt}if(q!==null&&utXn){const Xt=Hn-Xn;ut-=Xt,dt.horizontal+=Xt}return{top:`${Math.round(yn)}px`,left:`${Math.round(ut)}px`,transformOrigin:vv(dt)}},[y,P,ve,ce,q]),[Pe,Ae]=$.useState(F),Me=$.useCallback(()=>{const Ct=xe.current;if(!Ct)return;const xt=ke(Ct);xt.top!==null&&(Ct.style.top=xt.top),xt.left!==null&&(Ct.style.left=xt.left),Ct.style.transformOrigin=xt.transformOrigin,Ae(!0)},[ke]);$.useEffect(()=>(de&&window.addEventListener("scroll",Me),()=>window.removeEventListener("scroll",Me)),[y,de,Me]);const tt=(Ct,xt)=>{X&&X(Ct,xt),Me()},He=()=>{Ae(!1)};$.useEffect(()=>{F&&Me()}),$.useImperativeHandle(k,()=>F?{updatePosition:()=>{Me()}}:null,[F,Me]),$.useEffect(()=>{if(!F)return;const Ct=lh(()=>{Me()}),xt=Mi(y);return xt.addEventListener("resize",Ct),()=>{Ct.clear(),xt.removeEventListener("resize",Ct)}},[y,F,Me]);let Ge=Z;Z==="auto"&&!ee.muiSupportAuto&&(Ge=void 0);const pt=R||(y?Jn(I2(y)).body:void 0),fn=(p=z==null?void 0:z.root)!=null?p:NT,nt=(d=z==null?void 0:z.paper)!=null?d:My,jt=Ir({elementType:nt,externalSlotProps:Q({},pe,{style:Pe?pe.style:Q({},pe.style,{opacity:0})}),additionalProps:{elevation:O,ref:we},ownerState:ge,className:et(_e.paper,pe==null?void 0:pe.className)}),hn=Ir({elementType:fn,externalSlotProps:(Y==null?void 0:Y.root)||{},externalForwardedProps:me,additionalProps:{ref:s,slotProps:{backdrop:{invisible:!0}},container:pt,open:F},ownerState:ge,className:et(_e.root,L)}),{slotProps:Rt}=hn,Wt=Xe(hn,PT);return j.jsx(fn,Q({},Wt,!ii(fn)&&{slotProps:Rt,disableScrollLock:de},{children:j.jsx(ee,Q({appear:!0,in:F,onEntering:tt,onExited:He,timeout:Ge},le,{children:j.jsx(nt,Q({},jt,{children:N}))}))}))}),RT=IT;function TT(t){return vt("MuiMenu",t)}bt("MuiMenu",["root","paper","list"]);const FT=["onEntering"],LT=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],DT={vertical:"top",horizontal:"right"},OT={vertical:"top",horizontal:"left"},BT=t=>{const{classes:r}=t;return _t({root:["root"],paper:["paper"],list:["list"]},TT,r)},jT=Ue(RT,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,r)=>r.root})({}),zT=Ue(My,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,r)=>r.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),VT=Ue(CT,{name:"MuiMenu",slot:"List",overridesResolver:(t,r)=>r.list})({outline:0}),WT=$.forwardRef(function(r,s){var u,p;const d=wt({props:r,name:"MuiMenu"}),{autoFocus:b=!0,children:k,className:y,disableAutoFocusItem:_=!1,MenuListProps:S={},onClose:P,open:N,PaperProps:L={},PopoverClasses:R,transitionDuration:O="auto",TransitionProps:{onEntering:q}={},variant:F="selectedMenu",slots:D={},slotProps:z={}}=d,Y=Xe(d.TransitionProps,FT),U=Xe(d,LT),ee=Ii(),Z=ee.direction==="rtl",X=Q({},d,{autoFocus:b,disableAutoFocusItem:_,MenuListProps:S,onEntering:q,PaperProps:L,transitionDuration:O,TransitionProps:Y,variant:F}),de=BT(X),le=b&&!_&&N,me=$.useRef(null),pe=(ke,Pe)=>{me.current&&me.current.adjustStyleForScrollbar(ke,ee),q&&q(ke,Pe)},xe=ke=>{ke.key==="Tab"&&(ke.preventDefault(),P&&P(ke,"tabKeyDown"))};let we=-1;$.Children.map(k,(ke,Pe)=>{$.isValidElement(ke)&&(ke.props.disabled||(F==="selectedMenu"&&ke.props.selected||we===-1)&&(we=Pe))});const ge=(u=D.paper)!=null?u:zT,_e=(p=z.paper)!=null?p:L,ve=Ir({elementType:D.root,externalSlotProps:z.root,ownerState:X,className:[de.root,y]}),ce=Ir({elementType:ge,externalSlotProps:_e,ownerState:X,className:de.paper});return j.jsx(jT,Q({onClose:P,anchorOrigin:{vertical:"bottom",horizontal:Z?"right":"left"},transformOrigin:Z?DT:OT,slots:{paper:ge,root:D.root},slotProps:{root:ve,paper:ce},open:N,ref:s,transitionDuration:O,TransitionProps:Q({onEntering:pe},Y),ownerState:X},U,{classes:R,children:j.jsx(VT,Q({onKeyDown:xe,actions:me,autoFocus:b&&(we===-1||_),autoFocusItem:le,variant:F},S,{className:et(de.list,S.className),children:k}))}))}),Ny=WT;function UT(t){return vt("MuiMenuItem",t)}const HT=bt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Ul=HT,GT=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],QT=(t,r)=>{const{ownerState:s}=t;return[r.root,s.dense&&r.dense,s.divider&&r.divider,!s.disableGutters&&r.gutters]},YT=t=>{const{disabled:r,dense:s,divider:u,disableGutters:p,selected:d,classes:b}=t,y=_t({root:["root",s&&"dense",r&&"disabled",!p&&"gutters",u&&"divider",d&&"selected"]},UT,b);return Q({},b,y)},KT=Ue(ul,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:QT})(({theme:t,ownerState:r})=>Q({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!r.disableGutters&&{paddingLeft:16,paddingRight:16},r.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ul.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Ul.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Ul.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Mn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Ul.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Ul.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${ov.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${ov.inset}`]:{marginLeft:52},[`& .${H0.root}`]:{marginTop:0,marginBottom:0},[`& .${H0.inset}`]:{paddingLeft:36},[`& .${pv.root}`]:{minWidth:36}},!r.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},r.dense&&Q({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${pv.root} svg`]:{fontSize:"1.25rem"}}))),XT=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiMenuItem"}),{autoFocus:p=!1,component:d="li",dense:b=!1,divider:k=!1,disableGutters:y=!1,focusVisibleClassName:_,role:S="menuitem",tabIndex:P,className:N}=u,L=Xe(u,GT),R=$.useContext(ai),O=$.useMemo(()=>({dense:b||R.dense||!1,disableGutters:y}),[R.dense,b,y]),q=$.useRef(null);xo(()=>{p&&q.current&&q.current.focus()},[p]);const F=Q({},u,{dense:O.dense,divider:k,disableGutters:y}),D=YT(u),z=Un(q,s);let Y;return u.disabled||(Y=P!==void 0?P:-1),j.jsx(ai.Provider,{value:O,children:j.jsx(KT,Q({ref:z,role:S,tabIndex:Y,component:d,focusVisibleClassName:et(D.focusVisible,_),className:et(D.root,N)},L,{ownerState:F,classes:D}))})}),Ta=XT;function qT(t){return vt("MuiNativeSelect",t)}const ZT=bt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),wh=ZT,JT=["className","disabled","error","IconComponent","inputRef","variant"],$T=t=>{const{classes:r,variant:s,disabled:u,multiple:p,open:d,error:b}=t,k={select:["select",s,u&&"disabled",p&&"multiple",b&&"error"],icon:["icon",`icon${$e(s)}`,d&&"iconOpen",u&&"disabled"]};return _t(k,qT,r)},Iy=({ownerState:t,theme:r})=>Q({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":Q({},r.vars?{backgroundColor:`rgba(${r.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:r.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${wh.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(r.vars||r).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(r.vars||r).shape.borderRadius,"&:focus":{borderRadius:(r.vars||r).shape.borderRadius},"&&&":{paddingRight:32}}),eF=Ue("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:br,overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.select,r[s.variant],s.error&&r.error,{[`&.${wh.multiple}`]:r.multiple}]}})(Iy),Ry=({ownerState:t,theme:r})=>Q({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(r.vars||r).palette.action.active,[`&.${wh.disabled}`]:{color:(r.vars||r).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),tF=Ue("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.icon,s.variant&&r[`icon${$e(s.variant)}`],s.open&&r.iconOpen]}})(Ry),nF=$.forwardRef(function(r,s){const{className:u,disabled:p,error:d,IconComponent:b,inputRef:k,variant:y="standard"}=r,_=Xe(r,JT),S=Q({},r,{disabled:p,variant:y,error:d}),P=$T(S);return j.jsxs($.Fragment,{children:[j.jsx(eF,Q({ownerState:S,className:et(P.select,u),disabled:p,ref:k||s},_)),r.multiple?null:j.jsx(tF,{as:b,ownerState:S,className:P.icon})]})}),rF=nF;var kv;const oF=["children","classes","className","label","notched"],iF=Ue("fieldset",{shouldForwardProp:br})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),aF=Ue("legend",{shouldForwardProp:br})(({ownerState:t,theme:r})=>Q({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:r.transitions.create("width",{duration:150,easing:r.transitions.easing.easeOut})},t.withLabel&&Q({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:r.transitions.create("max-width",{duration:50,easing:r.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:r.transitions.create("max-width",{duration:100,easing:r.transitions.easing.easeOut,delay:50})})));function sF(t){const{className:r,label:s,notched:u}=t,p=Xe(t,oF),d=s!=null&&s!=="",b=Q({},t,{notched:u,withLabel:d});return j.jsx(iF,Q({"aria-hidden":!0,className:r,ownerState:b},p,{children:j.jsx(aF,{ownerState:b,children:d?j.jsx("span",{children:s}):kv||(kv=j.jsx("span",{className:"notranslate",children:"​"}))})}))}const lF=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],cF=t=>{const{classes:r}=t,u=_t({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},aM,r);return Q({},r,u)},uF=Ue($f,{shouldForwardProp:t=>br(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Zf})(({theme:t,ownerState:r})=>{const s=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Q({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${Ui.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ui.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:s}},[`&.${Ui.focused} .${Ui.notchedOutline}`]:{borderColor:(t.vars||t).palette[r.color].main,borderWidth:2},[`&.${Ui.error} .${Ui.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Ui.disabled} .${Ui.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},r.startAdornment&&{paddingLeft:14},r.endAdornment&&{paddingRight:14},r.multiline&&Q({padding:"16.5px 14px"},r.size==="small"&&{padding:"8.5px 14px"}))}),fF=Ue(sF,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,r)=>r.notchedOutline})(({theme:t})=>{const r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:r}}),dF=Ue(ed,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Jf})(({theme:t,ownerState:r})=>Q({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},r.size==="small"&&{padding:"8.5px 14px"},r.multiline&&{padding:0},r.startAdornment&&{paddingLeft:0},r.endAdornment&&{paddingRight:0})),Ty=$.forwardRef(function(r,s){var u,p,d,b,k;const y=wt({props:r,name:"MuiOutlinedInput"}),{components:_={},fullWidth:S=!1,inputComponent:P="input",label:N,multiline:L=!1,notched:R,slots:O={},type:q="text"}=y,F=Xe(y,lF),D=cF(y),z=li(),Y=pa({props:y,muiFormControl:z,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),U=Q({},y,{color:Y.color||"primary",disabled:Y.disabled,error:Y.error,focused:Y.focused,formControl:z,fullWidth:S,hiddenLabel:Y.hiddenLabel,multiline:L,size:Y.size,type:q}),ee=(u=(p=O.root)!=null?p:_.Root)!=null?u:uF,Z=(d=(b=O.input)!=null?b:_.Input)!=null?d:dF;return j.jsx(kh,Q({slots:{root:ee,input:Z},renderSuffix:X=>j.jsx(fF,{ownerState:U,className:D.notchedOutline,label:N!=null&&N!==""&&Y.required?k||(k=j.jsxs($.Fragment,{children:[N," ","*"]})):N,notched:typeof R<"u"?R:!!(X.startAdornment||X.filled||X.focused)}),fullWidth:S,inputComponent:P,multiline:L,ref:s,type:q},F,{classes:Q({},D,{notchedOutline:null})}))});Ty.muiName="Input";const Fy=Ty;function pF(t){return vt("MuiSelect",t)}const Hl=bt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var yv;const hF=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],mF=Ue("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[{[`&.${Hl.select}`]:r.select},{[`&.${Hl.select}`]:r[s.variant]},{[`&.${Hl.error}`]:r.error},{[`&.${Hl.multiple}`]:r.multiple}]}})(Iy,{[`&.${Hl.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),gF=Ue("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.icon,s.variant&&r[`icon${$e(s.variant)}`],s.open&&r.iconOpen]}})(Ry),bF=Ue("input",{shouldForwardProp:t=>hh(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,r)=>r.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function _v(t,r){return typeof r=="object"&&r!==null?t===r:String(t)===String(r)}function vF(t){return t==null||typeof t=="string"&&!t.trim()}const kF=t=>{const{classes:r,variant:s,disabled:u,multiple:p,open:d,error:b}=t,k={select:["select",s,u&&"disabled",p&&"multiple",b&&"error"],icon:["icon",`icon${$e(s)}`,d&&"iconOpen",u&&"disabled"],nativeInput:["nativeInput"]};return _t(k,pF,r)},yF=$.forwardRef(function(r,s){var u;const{"aria-describedby":p,"aria-label":d,autoFocus:b,autoWidth:k,children:y,className:_,defaultOpen:S,defaultValue:P,disabled:N,displayEmpty:L,error:R=!1,IconComponent:O,inputRef:q,labelId:F,MenuProps:D={},multiple:z,name:Y,onBlur:U,onChange:ee,onClose:Z,onFocus:X,onOpen:de,open:le,readOnly:me,renderValue:pe,SelectDisplayProps:xe={},tabIndex:we,value:ge,variant:_e="standard"}=r,ve=Xe(r,hF),[ce,ke]=O0({controlled:ge,default:P,name:"Select"}),[Pe,Ae]=O0({controlled:le,default:S,name:"Select"}),Me=$.useRef(null),tt=$.useRef(null),[He,Ge]=$.useState(null),{current:pt}=$.useRef(le!=null),[fn,nt]=$.useState(),jt=Un(s,q),hn=$.useCallback(Ve=>{tt.current=Ve,Ve&&Ge(Ve)},[]),Rt=He==null?void 0:He.parentNode;$.useImperativeHandle(jt,()=>({focus:()=>{tt.current.focus()},node:Me.current,value:ce}),[ce]),$.useEffect(()=>{S&&Pe&&He&&!pt&&(nt(k?null:Rt.clientWidth),tt.current.focus())},[He,k]),$.useEffect(()=>{b&&tt.current.focus()},[b]),$.useEffect(()=>{if(!F)return;const Ve=Jn(tt.current).getElementById(F);if(Ve){const Lt=()=>{getSelection().isCollapsed&&tt.current.focus()};return Ve.addEventListener("click",Lt),()=>{Ve.removeEventListener("click",Lt)}}},[F]);const Wt=(Ve,Lt)=>{Ve?de&&de(Lt):Z&&Z(Lt),pt||(nt(k?null:Rt.clientWidth),Ae(Ve))},Ct=Ve=>{Ve.button===0&&(Ve.preventDefault(),tt.current.focus(),Wt(!0,Ve))},xt=Ve=>{Wt(!1,Ve)},dt=$.Children.toArray(y),Et=Ve=>{const Lt=dt.find(nn=>nn.props.value===Ve.target.value);Lt!==void 0&&(ke(Lt.props.value),ee&&ee(Ve,Lt))},yn=Ve=>Lt=>{let nn;if(Lt.currentTarget.hasAttribute("tabindex")){if(z){nn=Array.isArray(ce)?ce.slice():[];const an=ce.indexOf(Ve.props.value);an===-1?nn.push(Ve.props.value):nn.splice(an,1)}else nn=Ve.props.value;if(Ve.props.onClick&&Ve.props.onClick(Lt),ce!==nn&&(ke(nn),ee)){const an=Lt.nativeEvent||Lt,Zt=new an.constructor(an.type,an);Object.defineProperty(Zt,"target",{writable:!0,value:{value:nn,name:Y}}),ee(Zt,Ve)}z||Wt(!1,Lt)}},ut=Ve=>{me||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Ve.key)!==-1&&(Ve.preventDefault(),Wt(!0,Ve))},Nn=He!==null&&Pe,Hn=Ve=>{!Nn&&U&&(Object.defineProperty(Ve,"target",{writable:!0,value:{value:ce,name:Y}}),U(Ve))};delete ve["aria-invalid"];let Mt,ir;const Xn=[];let Xt=!1;(U0({value:ce})||L)&&(pe?Mt=pe(ce):Xt=!0);const ar=dt.map(Ve=>{if(!$.isValidElement(Ve))return null;let Lt;if(z){if(!Array.isArray(ce))throw new Error(za(2));Lt=ce.some(nn=>_v(nn,Ve.props.value)),Lt&&Xt&&Xn.push(Ve.props.children)}else Lt=_v(ce,Ve.props.value),Lt&&Xt&&(ir=Ve.props.children);return $.cloneElement(Ve,{"aria-selected":Lt?"true":"false",onClick:yn(Ve),onKeyUp:nn=>{nn.key===" "&&nn.preventDefault(),Ve.props.onKeyUp&&Ve.props.onKeyUp(nn)},role:"option",selected:Lt,value:void 0,"data-value":Ve.props.value})});Xt&&(z?Xn.length===0?Mt=null:Mt=Xn.reduce((Ve,Lt,nn)=>(Ve.push(Lt),nn{const{classes:r}=t;return r},Ah={name:"MuiSelect",overridesResolver:(t,r)=>r.root,shouldForwardProp:t=>br(t)&&t!=="variant",slot:"Root"},xF=Ue(Cy,Ah)(""),SF=Ue(Fy,Ah)(""),EF=Ue(vy,Ah)(""),Ly=$.forwardRef(function(r,s){const u=wt({name:"MuiSelect",props:r}),{autoWidth:p=!1,children:d,classes:b={},className:k,defaultOpen:y=!1,displayEmpty:_=!1,IconComponent:S=uM,id:P,input:N,inputProps:L,label:R,labelId:O,MenuProps:q,multiple:F=!1,native:D=!1,onClose:z,onOpen:Y,open:U,renderValue:ee,SelectDisplayProps:Z,variant:X="outlined"}=u,de=Xe(u,wF),le=D?rF:_F,me=li(),pe=pa({props:u,muiFormControl:me,states:["variant","error"]}),xe=pe.variant||X,we=Q({},u,{variant:xe,classes:b}),ge=CF(we),_e=Xe(ge,AF),ve=N||{standard:j.jsx(xF,{ownerState:we}),outlined:j.jsx(SF,{label:R,ownerState:we}),filled:j.jsx(EF,{ownerState:we})}[xe],ce=Un(s,ve.ref);return j.jsx($.Fragment,{children:$.cloneElement(ve,Q({inputComponent:le,inputProps:Q({children:d,error:pe.error,IconComponent:S,variant:xe,type:void 0,multiple:F},D?{id:P}:{autoWidth:p,defaultOpen:y,displayEmpty:_,labelId:O,MenuProps:q,onClose:z,onOpen:Y,open:U,renderValue:ee,SelectDisplayProps:Q({id:P},Z)},L,{classes:L?Tr(_e,L.classes):_e},N?N.props.inputProps:{})},(F&&D||_)&&xe==="outlined"?{notched:!0}:{},{ref:ce,className:et(ve.props.className,k,ge.root)},!N&&{variant:xe},de))})});Ly.muiName="Select";const Ch=Ly,PF=t=>!t||!ii(t);function MF(t){return vt("MuiSlider",t)}const Bo=bt("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),NF=t=>{const{open:r}=t;return{offset:et(r&&Bo.valueLabelOpen),circle:Bo.valueLabelCircle,label:Bo.valueLabelLabel}};function IF(t){const{children:r,className:s,value:u}=t,p=NF(t);return r?$.cloneElement(r,{className:et(r.props.className)},j.jsxs($.Fragment,{children:[r.props.children,j.jsx("span",{className:et(p.offset,s),"aria-hidden":!0,children:j.jsx("span",{className:p.circle,children:j.jsx("span",{className:p.label,children:u})})})]})):null}const RF=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function wv(t){return t}const TF=Ue("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[`color${$e(s.color)}`],s.size!=="medium"&&r[`size${$e(s.size)}`],s.marked&&r.marked,s.orientation==="vertical"&&r.vertical,s.track==="inverted"&&r.trackInverted,s.track===!1&&r.trackFalse]}})(({theme:t,ownerState:r})=>Q({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(t.vars||t).palette[r.color].main,WebkitTapHighlightColor:"transparent"},r.orientation==="horizontal"&&Q({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},r.size==="small"&&{height:2},r.marked&&{marginBottom:20}),r.orientation==="vertical"&&Q({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},r.size==="small"&&{width:2},r.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${Bo.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${Bo.dragging}`]:{[`& .${Bo.thumb}, & .${Bo.track}`]:{transition:"none"}}})),FF=Ue("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(t,r)=>r.rail})(({ownerState:t})=>Q({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},t.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track==="inverted"&&{opacity:1})),LF=Ue("span",{name:"MuiSlider",slot:"Track",overridesResolver:(t,r)=>r.track})(({theme:t,ownerState:r})=>{const s=t.palette.mode==="light"?j0(t.palette[r.color].main,.62):B0(t.palette[r.color].main,.5);return Q({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest})},r.size==="small"&&{border:"none"},r.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},r.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},r.track===!1&&{display:"none"},r.track==="inverted"&&{backgroundColor:t.vars?t.vars.palette.Slider[`${r.color}Track`]:s,borderColor:t.vars?t.vars.palette.Slider[`${r.color}Track`]:s})}),DF=Ue("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.thumb,r[`thumbColor${$e(s.color)}`],s.size!=="medium"&&r[`thumbSize${$e(s.size)}`]]}})(({theme:t,ownerState:r})=>Q({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest})},r.size==="small"&&{width:12,height:12},r.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},r.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&::before":Q({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},r.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${Bo.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / 0.16)`:Mn(t.palette[r.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Bo.active}`]:{boxShadow:`0px 0px 0px 14px ${t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / 0.16)`:Mn(t.palette[r.color].main,.16)}`},[`&.${Bo.disabled}`]:{"&:hover":{boxShadow:"none"}}})),OF=Ue(IF,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(t,r)=>r.valueLabel})(({theme:t,ownerState:r})=>Q({[`&.${Bo.valueLabelOpen}`]:{transform:`${r.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),transform:`${r.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},r.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},r.orientation==="vertical"&&{right:r.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},r.size==="small"&&{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),BF=Ue("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>hh(t)&&t!=="markActive",overridesResolver:(t,r)=>{const{markActive:s}=t;return[r.mark,s&&r.markActive]}})(({theme:t,ownerState:r,markActive:s})=>Q({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},r.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},r.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},s&&{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8})),jF=Ue("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>hh(t)&&t!=="markLabelActive",overridesResolver:(t,r)=>r.markLabel})(({theme:t,ownerState:r,markLabelActive:s})=>Q({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},r.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},r.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},s&&{color:(t.vars||t).palette.text.primary})),zF=t=>{const{disabled:r,dragging:s,marked:u,orientation:p,track:d,classes:b,color:k,size:y}=t,_={root:["root",r&&"disabled",s&&"dragging",u&&"marked",p==="vertical"&&"vertical",d==="inverted"&&"trackInverted",d===!1&&"trackFalse",k&&`color${$e(k)}`,y&&`size${$e(y)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",r&&"disabled",y&&`thumbSize${$e(y)}`,k&&`thumbColor${$e(k)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return _t(_,MF,b)},VF=({children:t})=>t,WF=$.forwardRef(function(r,s){var u,p,d,b,k,y,_,S,P,N,L,R,O,q,F,D,z,Y,U,ee,Z,X,de,le;const me=wt({props:r,name:"MuiSlider"}),xe=Ii().direction==="rtl",{"aria-label":we,"aria-valuetext":ge,"aria-labelledby":_e,component:ve="span",components:ce={},componentsProps:ke={},color:Pe="primary",classes:Ae,className:Me,disableSwap:tt=!1,disabled:He=!1,getAriaLabel:Ge,getAriaValueText:pt,marks:fn=!1,max:nt=100,min:jt=0,orientation:hn="horizontal",shiftStep:Rt=10,size:Wt="medium",step:Ct=1,scale:xt=wv,slotProps:dt,slots:Et,track:yn="normal",valueLabelDisplay:ut="off",valueLabelFormat:Nn=wv}=me,Hn=Xe(me,RF),Mt=Q({},me,{isRtl:xe,max:nt,min:jt,classes:Ae,disabled:He,disableSwap:tt,orientation:hn,marks:fn,color:Pe,size:Wt,step:Ct,shiftStep:Rt,scale:xt,track:yn,valueLabelDisplay:ut,valueLabelFormat:Nn}),{axisProps:ir,getRootProps:Xn,getHiddenInputProps:Xt,getThumbProps:ar,open:Br,active:vr,axis:De,focusedThumbIndex:Re,range:lt,dragging:Ot,marks:qt,values:Ve,trackOffset:Lt,trackLeap:nn,getThumbStyle:an}=HP(Q({},Mt,{rootRef:s}));Mt.marked=qt.length>0&&qt.some(Dn=>Dn.label),Mt.dragging=Ot,Mt.focusedThumbIndex=Re;const Zt=zF(Mt),Zr=(u=(p=Et==null?void 0:Et.root)!=null?p:ce.Root)!=null?u:TF,ma=(d=(b=Et==null?void 0:Et.rail)!=null?b:ce.Rail)!=null?d:FF,Uo=(k=(y=Et==null?void 0:Et.track)!=null?y:ce.Track)!=null?k:LF,Di=(_=(S=Et==null?void 0:Et.thumb)!=null?S:ce.Thumb)!=null?_:DF,ml=(P=(N=Et==null?void 0:Et.valueLabel)!=null?N:ce.ValueLabel)!=null?P:OF,ga=(L=(R=Et==null?void 0:Et.mark)!=null?R:ce.Mark)!=null?L:BF,kr=(O=(q=Et==null?void 0:Et.markLabel)!=null?q:ce.MarkLabel)!=null?O:jF,gl=(F=(D=Et==null?void 0:Et.input)!=null?D:ce.Input)!=null?F:"input",Za=(z=dt==null?void 0:dt.root)!=null?z:ke.root,bl=(Y=dt==null?void 0:dt.rail)!=null?Y:ke.rail,vl=(U=dt==null?void 0:dt.track)!=null?U:ke.track,Ja=(ee=dt==null?void 0:dt.thumb)!=null?ee:ke.thumb,Pr=(Z=dt==null?void 0:dt.valueLabel)!=null?Z:ke.valueLabel,Jc=(X=dt==null?void 0:dt.mark)!=null?X:ke.mark,pd=(de=dt==null?void 0:dt.markLabel)!=null?de:ke.markLabel,hd=(le=dt==null?void 0:dt.input)!=null?le:ke.input,mn=Ir({elementType:Zr,getSlotProps:Xn,externalSlotProps:Za,externalForwardedProps:Hn,additionalProps:Q({},PF(Zr)&&{as:ve}),ownerState:Q({},Mt,Za==null?void 0:Za.ownerState),className:[Zt.root,Me]}),jr=Ir({elementType:ma,externalSlotProps:bl,ownerState:Mt,className:Zt.rail}),Lh=Ir({elementType:Uo,externalSlotProps:vl,additionalProps:{style:Q({},ir[De].offset(Lt),ir[De].leap(nn))},ownerState:Q({},Mt,vl==null?void 0:vl.ownerState),className:Zt.track}),kl=Ir({elementType:Di,getSlotProps:ar,externalSlotProps:Ja,ownerState:Q({},Mt,Ja==null?void 0:Ja.ownerState),className:Zt.thumb}),md=Ir({elementType:ml,externalSlotProps:Pr,ownerState:Q({},Mt,Pr==null?void 0:Pr.ownerState),className:Zt.valueLabel}),yl=Ir({elementType:ga,externalSlotProps:Jc,ownerState:Mt,className:Zt.mark}),_l=Ir({elementType:kr,externalSlotProps:pd,ownerState:Mt,className:Zt.markLabel}),gd=Ir({elementType:gl,getSlotProps:Xt,externalSlotProps:hd,ownerState:Mt});return j.jsxs(Zr,Q({},mn,{children:[j.jsx(ma,Q({},jr)),j.jsx(Uo,Q({},Lh)),qt.filter(Dn=>Dn.value>=jt&&Dn.value<=nt).map((Dn,er)=>{const wl=W0(Dn.value,jt,nt),Dt=ir[De].offset(wl);let Jr;return yn===!1?Jr=Ve.indexOf(Dn.value)!==-1:Jr=yn==="normal"&&(lt?Dn.value>=Ve[0]&&Dn.value<=Ve[Ve.length-1]:Dn.value<=Ve[0])||yn==="inverted"&&(lt?Dn.value<=Ve[0]||Dn.value>=Ve[Ve.length-1]:Dn.value>=Ve[0]),j.jsxs($.Fragment,{children:[j.jsx(ga,Q({"data-index":er},yl,!ii(ga)&&{markActive:Jr},{style:Q({},Dt,yl.style),className:et(yl.className,Jr&&Zt.markActive)})),Dn.label!=null?j.jsx(kr,Q({"aria-hidden":!0,"data-index":er},_l,!ii(kr)&&{markLabelActive:Jr},{style:Q({},Dt,_l.style),className:et(Zt.markLabel,_l.className,Jr&&Zt.markLabelActive),children:Dn.label})):null]},er)}),Ve.map((Dn,er)=>{const wl=W0(Dn,jt,nt),Dt=ir[De].offset(wl),Jr=ut==="off"?VF:ml;return j.jsx(Jr,Q({},!ii(Jr)&&{valueLabelFormat:Nn,valueLabelDisplay:ut,value:typeof Nn=="function"?Nn(xt(Dn),er):Nn,index:er,open:Br===er||vr===er||ut==="on",disabled:He},md,{children:j.jsx(Di,Q({"data-index":er},kl,{className:et(Zt.thumb,kl.className,vr===er&&Zt.active,Re===er&&Zt.focusVisible),style:Q({},Dt,an(er),kl.style),children:j.jsx(gl,Q({"data-index":er,"aria-label":Ge?Ge(er):we,"aria-valuenow":xt(Dn),"aria-labelledby":_e,"aria-valuetext":pt?pt(xt(Dn),er):ge,value:Ve[er]},gd))}))}),er)})]}))}),Dy=WF;function UF(t){return vt("MuiSnackbarContent",t)}bt("MuiSnackbarContent",["root","message","action"]);const HF=["action","className","message","role"],GF=t=>{const{classes:r}=t;return _t({root:["root"],action:["action"],message:["message"]},UF,r)},QF=Ue(da,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,r)=>r.root})(({theme:t})=>{const r=t.palette.mode==="light"?.8:.98,s=X7(t.palette.background.default,r);return Q({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(s),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:s,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),YF=Ue("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,r)=>r.message})({padding:"8px 0"}),KF=Ue("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,r)=>r.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),XF=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiSnackbarContent"}),{action:p,className:d,message:b,role:k="alert"}=u,y=Xe(u,HF),_=u,S=GF(_);return j.jsxs(QF,Q({role:k,square:!0,elevation:6,className:et(S.root,d),ownerState:_,ref:s},y,{children:[j.jsx(YF,{className:S.message,ownerState:_,children:b}),p?j.jsx(KF,{className:S.action,ownerState:_,children:p}):null]}))}),qF=XF;function ZF(t){return vt("MuiSnackbar",t)}bt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const JF=["onEnter","onExited"],$F=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],eL=t=>{const{classes:r,anchorOrigin:s}=t,u={root:["root",`anchorOrigin${$e(s.vertical)}${$e(s.horizontal)}`]};return _t(u,ZF,r)},Av=Ue("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,r[`anchorOrigin${$e(s.anchorOrigin.vertical)}${$e(s.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:r})=>{const s={left:"50%",right:"auto",transform:"translateX(-50%)"};return Q({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},r.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},r.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},r.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:Q({},r.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},r.anchorOrigin.horizontal==="center"&&s,r.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},r.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),tL=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiSnackbar"}),p=Ii(),d={enter:p.transitions.duration.enteringScreen,exit:p.transitions.duration.leavingScreen},{action:b,anchorOrigin:{vertical:k,horizontal:y}={vertical:"bottom",horizontal:"left"},autoHideDuration:_=null,children:S,className:P,ClickAwayListenerProps:N,ContentProps:L,disableWindowBlurListener:R=!1,message:O,open:q,TransitionComponent:F=wy,transitionDuration:D=d,TransitionProps:{onEnter:z,onExited:Y}={}}=u,U=Xe(u.TransitionProps,JF),ee=Xe(u,$F),Z=Q({},u,{anchorOrigin:{vertical:k,horizontal:y},autoHideDuration:_,disableWindowBlurListener:R,TransitionComponent:F,transitionDuration:D}),X=eL(Z),{getRootProps:de,onClickAway:le}=GP(Q({},Z)),[me,pe]=$.useState(!0),xe=Ir({elementType:Av,getSlotProps:de,externalForwardedProps:ee,ownerState:Z,additionalProps:{ref:s},className:[X.root,P]}),we=_e=>{pe(!0),Y&&Y(_e)},ge=(_e,ve)=>{pe(!1),z&&z(_e,ve)};return!q&&me?null:j.jsx(kP,Q({onClickAway:le},N,{children:j.jsx(Av,Q({},xe,{children:j.jsx(F,Q({appear:!0,in:q,timeout:D,direction:k==="top"?"down":"up",onEnter:ge,onExited:we},U,{children:S||j.jsx(qF,Q({message:O,action:b},L))}))}))}))}),Oy=tL;function nL(t){return vt("MuiToolbar",t)}bt("MuiToolbar",["root","gutters","regular","dense"]);const rL=["className","component","disableGutters","variant"],oL=t=>{const{classes:r,disableGutters:s,variant:u}=t;return _t({root:["root",!s&&"gutters",u]},nL,r)},iL=Ue("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:s}=t;return[r.root,!s.disableGutters&&r.gutters,r[s.variant]]}})(({theme:t,ownerState:r})=>Q({position:"relative",display:"flex",alignItems:"center"},!r.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},r.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:r})=>r.variant==="regular"&&t.mixins.toolbar),aL=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiToolbar"}),{className:p,component:d="div",disableGutters:b=!1,variant:k="regular"}=u,y=Xe(u,rL),_=Q({},u,{component:d,disableGutters:b,variant:k}),S=oL(_);return j.jsx(iL,Q({as:d,className:et(S.root,p),ref:s,ownerState:_},y))}),sL=aL;function lL(t){return vt("MuiTextField",t)}bt("MuiTextField",["root"]);const cL=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],uL={standard:Cy,filled:vy,outlined:Fy},fL=t=>{const{classes:r}=t;return _t({root:["root"]},lL,r)},dL=Ue(_h,{name:"MuiTextField",slot:"Root",overridesResolver:(t,r)=>r.root})({}),pL=$.forwardRef(function(r,s){const u=wt({props:r,name:"MuiTextField"}),{autoComplete:p,autoFocus:d=!1,children:b,className:k,color:y="primary",defaultValue:_,disabled:S=!1,error:P=!1,FormHelperTextProps:N,fullWidth:L=!1,helperText:R,id:O,InputLabelProps:q,inputProps:F,InputProps:D,inputRef:z,label:Y,maxRows:U,minRows:ee,multiline:Z=!1,name:X,onBlur:de,onChange:le,onFocus:me,placeholder:pe,required:xe=!1,rows:we,select:ge=!1,SelectProps:_e,type:ve,value:ce,variant:ke="outlined"}=u,Pe=Xe(u,cL),Ae=Q({},u,{autoFocus:d,color:y,disabled:S,error:P,fullWidth:L,multiline:Z,required:xe,select:ge,variant:ke}),Me=fL(Ae),tt={};ke==="outlined"&&(q&&typeof q.shrink<"u"&&(tt.notched=q.shrink),tt.label=Y),ge&&((!_e||!_e.native)&&(tt.id=void 0),tt["aria-describedby"]=void 0);const He=ch(O),Ge=R&&He?`${He}-helper-text`:void 0,pt=Y&&He?`${He}-label`:void 0,fn=uL[ke],nt=j.jsx(fn,Q({"aria-describedby":Ge,autoComplete:p,autoFocus:d,defaultValue:_,fullWidth:L,multiline:Z,name:X,rows:we,maxRows:U,minRows:ee,type:ve,value:ce,id:He,inputRef:z,onBlur:de,onChange:le,onFocus:me,placeholder:pe,inputProps:F},tt,D));return j.jsxs(dL,Q({className:et(Me.root,k),disabled:S,error:P,fullWidth:L,ref:s,required:xe,color:y,variant:ke,ownerState:Ae},Pe,{children:[Y!=null&&Y!==""&&j.jsx(xy,Q({htmlFor:He,id:pt},q,{children:Y})),ge?j.jsx(Ch,Q({"aria-describedby":Ge,id:He,labelId:pt,value:ce,input:nt},_e,{children:b})):nt,R&&j.jsx($I,Q({id:Ge},N,{children:R}))]}))}),Jo=pL,hL=or(j.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),mL=or(j.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),gL=or(j.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),By=or(j.jsx("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),bL=or(j.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),vL=or(j.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"}),"SkipNext"),kL=or(j.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"}),"SkipPrevious"),yL=or(j.jsx("path",{d:"M6 6h12v12H6z"}),"Stop"),jy=or(j.jsx("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z"}),"VolumeOff"),zy=or(j.jsx("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp");function _L(t){const[r,s]=$.useState(0),[u,p]=$.useState(null),[d,b]=$.useState(!1),[k,y]=$.useState(!1),[_,S]=$.useState(t.client.config.name),[P,N]=$.useState(t.client.config.latency),[L,R]=$.useState(t.client.config.latency);function O(X){console.debug("handleVolumeChange: "+X),t.client.config.volume.percent=X,t.snapcontrol.setVolume(t.client.id,X,!1),t.onVolumeChange()}function q(X){console.debug("handleOptionsClicked"),p(X.currentTarget),b(!0),S(t.client.config.name),N(t.client.config.latency),R(t.client.config.latency)}function F(){p(null),b(!1)}function D(X){y(!1),X?(console.debug("handleDetailsClose, setting latency to "+P+", name: "+_),t.snapcontrol.setClientName(t.client.id,_),t.snapcontrol.setClientLatency(t.client.id,P),S(t.client.config.name),R(P)):(console.debug("handleDetailsClose, setting latency from "+P+" to "+L),t.snapcontrol.setClientLatency(t.client.id,L),S(t.client.config.name),N(L))}function z(){console.debug("handleDetailsClicked"),y(!0),p(null),b(!1)}function Y(X){console.debug("handleNameChange: "+X),S(X)}function U(X){console.debug("handleLatencyChange: "+X),N(X),t.snapcontrol.setClientLatency(t.client.id,X)}function ee(){console.debug("handleMuteClicked"),t.snapcontrol.setVolume(t.client.id,t.client.config.volume.percent,!t.client.config.volume.muted),s(r+1)}const Z=[];return Z.push(j.jsx(Ta,{onClick:()=>{z()},children:"Details"},"Menu-Details")),t.client.connected||Z.push(j.jsx(Ta,{onClick:()=>{t.onDelete(),p(null),b(!1)},children:"Delete"},"Menu-Delete")),j.jsxs(Ua,{sx:{opacity:t.client.connected?1:.5},children:[j.jsxs(l0,{container:!0,spacing:2,justifyContent:"center",alignItems:"center",children:[j.jsx(l0,{item:!0,xs:!0,children:j.jsxs(gi,{spacing:-1,direction:"column",children:[j.jsx(oo,{variant:"subtitle1",align:"left",gutterBottom:!0,children:t.client.config.name===""?t.client.host.name:t.client.config.name}),j.jsxs(gi,{spacing:2,direction:"row",alignItems:"center",children:[j.jsx(Do,{"aria-label":"Mute",onClick:()=>{ee()},children:t.client.config.volume.muted?j.jsx(jy,{}):j.jsx(zy,{})}),j.jsx(Dy,{"aria-label":"Volume",color:"secondary",min:0,max:100,size:"small",value:t.client.config.volume.percent,onChange:(X,de)=>{O(de)}},"slider-"+t.client.id)]})]})}),j.jsxs(l0,{item:!0,children:[j.jsx(Do,{"aria-label":"Options",onClick:X=>{q(X)},children:j.jsx(mL,{})}),j.jsx(Ny,{id:"basic-menu",anchorEl:u,open:d,onClose:()=>{F()},MenuListProps:{"aria-labelledby":"basic-button"},children:Z})]})]}),j.jsxs(td,{open:k,onClose:()=>{D(!1)},children:[j.jsx(od,{children:"Client settings"}),j.jsxs(rd,{children:[j.jsx(Jo,{autoFocus:!0,margin:"dense",id:"name",label:"Name",type:"text",fullWidth:!0,variant:"standard",onChange:X=>{Y(X.target.value)},value:_}),j.jsx(Jo,{margin:"dense",id:"latency",label:"Latency",type:"number",fullWidth:!0,value:P,onChange:X=>{U(Number(X.target.value)||0)},InputProps:{endAdornment:j.jsx(DR,{position:"end",children:"ms"})},variant:"standard"}),j.jsx(Jo,{margin:"dense",id:"client",label:"Client",type:"text",fullWidth:!0,variant:"standard",value:t.client.snapclient.name+" "+t.client.snapclient.version,InputProps:{readOnly:!0}}),j.jsx(Jo,{margin:"dense",id:"mac",label:"MAC",type:"text",fullWidth:!0,variant:"standard",value:t.client.host.mac,InputProps:{readOnly:!0}}),j.jsx(Jo,{margin:"dense",id:"id",label:"ID",type:"text",fullWidth:!0,variant:"standard",value:t.client.id,InputProps:{readOnly:!0}}),j.jsx(Jo,{margin:"dense",id:"ip",label:"IP",type:"text",fullWidth:!0,variant:"standard",value:t.client.host.ip,InputProps:{readOnly:!0}}),j.jsx(Jo,{margin:"dense",id:"host",label:"Host",type:"text",fullWidth:!0,variant:"standard",value:t.client.host.name,InputProps:{readOnly:!0}}),j.jsx(Jo,{margin:"dense",id:"os",label:"OS",type:"text",fullWidth:!0,variant:"standard",value:t.client.host.os,InputProps:{readOnly:!0}})]}),j.jsxs(nd,{children:[j.jsx(Ai,{onClick:()=>{D(!1)},children:"Cancel"}),j.jsx(Ai,{onClick:()=>{D(!0)},children:"OK"})]})]})]})}const wL="/assets/logo192-wKJb_L8G.png";function AL(t){var ve,ce,ke,Pe;const[r,s]=$.useState(0),[u,p]=$.useState(!1),[d,b]=$.useState([]),[k,y]=$.useState(""),[_,S]=$.useState([]),[P,N]=$.useState(0),L=$.useRef({volumeEntered:!0,client_volumes:new Map,group_volume:0});function R(){const Ae=le();let Me=0;for(const tt of Ae)Me+=tt.config.volume.percent;Me/=Ae.length,N(Me)}$.useLayoutEffect(()=>{console.debug("useLayoutEffect"),R()});function O(Ae){console.debug("handleSettingsClicked");const Me=[];for(const tt of t.server.groups)for(const He of tt.clients){const Ge=t.group.clients.includes(He);Me.push({client:He,inGroup:Ge,wasInGroup:Ge})}p(!0),b(Me),y(t.group.stream_id)}function q(Ae){if(console.debug("handleSettingsClose: "+Ae),Ae){let Me=!1;for(const tt of d)if(tt.inGroup!==tt.wasInGroup){Me=!0;break}if(Me){const tt=[];for(const He of d)He.inGroup&&tt.push(He.client.id);t.snapcontrol.setClients(t.group.id,tt)}t.group.stream_id!==k&&t.snapcontrol.setStream(t.group.id,k)}p(!1)}function F(Ae,Me){console.debug("handleGroupClientChange: "+Ae.id+", in group: "+Me);const tt=d,He=tt.findIndex(Ge=>Ge.client===Ae);tt[He].inGroup=Me,b(tt),s(r+1)}function D(Ae){console.debug("handleClientDelete: "+Ae.getName());const Me=_;Me.includes(Ae)||Me.push(Ae),S(Me),s(r+1)}function z(Ae){console.debug("handleClientVolumeChange: "+Ae.getName()),R()}function Y(Ae,Me){console.debug("handleSnackbarClose, client: "+Ae.getName()+", undo: "+Me),Me||t.snapcontrol.deleteClient(Ae.id);const tt=_;tt.includes(Ae)&&tt.splice(tt.indexOf(Ae),1),S(tt),s(r+1)}function U(){console.debug("handleMuteClicked"),t.group.muted=!t.group.muted,t.snapcontrol.muteGroup(t.group.id,t.group.muted),s(r+1)}function ee(Ae){if(console.debug("handleVolumeChange: "+Ae),L.current.volumeEntered){L.current.client_volumes.clear(),L.current.group_volume=0;for(const He of le())L.current.client_volumes.set(He.id,He.config.volume.percent),L.current.group_volume+=He.config.volume.percent;L.current.group_volume/=L.current.client_volumes.size,L.current.volumeEntered=!1}const Me=Ae-L.current.group_volume;let tt;Me<0?tt=(L.current.group_volume-Ae)/L.current.group_volume:tt=(Ae-L.current.group_volume)/(100-L.current.group_volume);for(const He of le()){let Ge=L.current.client_volumes.get(He.id);Me<0?Ge-=tt*Ge:Ge+=tt*(100-Ge),He.config.volume.percent=Ge,t.snapcontrol.setVolume(He.id,Ge)}N(Ae)}function Z(Ae){console.debug("handleVolumeChangeCommitted: "+Ae),L.current.volumeEntered=!0}function X(){var Ae;((Ae=t.server.getStream(t.group.stream_id))==null?void 0:Ae.properties.playbackStatus)==="playing"?t.snapcontrol.control(t.group.stream_id,"pause"):t.snapcontrol.control(t.group.stream_id,"play")}function de(){return _.map(Ae=>j.jsx(Oy,{open:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},autoHideDuration:6e3,onClose:(Me,tt)=>{tt!=="clickaway"&&Y(Ae,!1)},children:j.jsxs(ay,{onClose:Me=>{Y(Ae,!1)},severity:"info",sx:{width:"100%"},action:j.jsx(Ai,{color:"inherit",size:"small",onClick:Me=>{Y(Ae,!0)},children:"Undo"}),children:["Deleted ",Ae.getName()]})},"snackbar-"+Ae.id))}function le(){const Ae=[];for(const Me of t.group.clients)(Me.connected||t.showOffline)&&!_.includes(Me)&&Ae.push(Me);return Ae}const me=[];for(const Ae of le())me.push(j.jsx(_L,{client:Ae,snapcontrol:t.snapcontrol,onDelete:()=>{D(Ae)},onVolumeChange:()=>{z(Ae)}},Ae.id));if(me.length===0)return j.jsx("div",{children:de()});const pe=t.server.getStream(t.group.stream_id),xe=((ve=pe==null?void 0:pe.properties.metadata)==null?void 0:ve.artUrl)||wL,we=((ce=pe==null?void 0:pe.properties.metadata)==null?void 0:ce.title)||"Unknown Title",ge=(ke=pe==null?void 0:pe.properties.metadata)!=null&&ke.artist?pe.properties.metadata.artist.join(", "):"Unknown Artist";console.debug("Art URL: "+xe);const _e=[];for(const Ae of t.server.groups)for(const Me of Ae.clients)_e.push(Me);return j.jsxs("div",{children:[j.jsxs(zM,{sx:{p:2,my:2,flexGrow:1},children:[j.jsxs(gi,{spacing:0,direction:"column",alignItems:"left",children:[j.jsxs(l0,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[j.jsxs(gi,{direction:"row",justifyContent:"center",alignItems:"center",children:[j.jsx(Do,{"aria-label":"Options",onClick:Ae=>{O()},children:j.jsx(bL,{})}),j.jsx(_h,{variant:"standard",children:j.jsx(Ch,{id:"streamselect",value:t.group.stream_id,label:"Active stream",inputProps:{"aria-label":"Active stream"},onChange:Ae=>{const Me=Ae.target.value;y(Me),t.snapcontrol.setStream(t.group.id,Me)},children:t.server.streams.map(Ae=>j.jsx(Ta,{value:Ae.id,children:Ae.id},Ae.id))})})]}),(pe==null?void 0:pe.properties.canControl)&&j.jsxs(gi,{direction:"row",justifyContent:"center",alignItems:"center",children:[j.jsx(Do,{"aria-label":"previous",onClick:()=>{t.snapcontrol.control(t.group.stream_id,"previous")},children:j.jsx(kL,{})}),j.jsx(Do,{"aria-label":"play/pause",onClick:()=>{X()},children:((Pe=t.server.getStream(t.group.stream_id))==null?void 0:Pe.properties.playbackStatus)==="playing"?j.jsx(gL,{}):j.jsx(By,{})}),j.jsx(Do,{"aria-label":"next",onClick:()=>{t.snapcontrol.control(t.group.stream_id,"next")},children:j.jsx(vL,{})})]})]}),(pe==null?void 0:pe.properties.metadata)&&j.jsxs(gi,{spacing:2,direction:"row",alignItems:"center",children:[j.jsx(KM,{component:"img",sx:{width:48},image:xe,alt:we+" cover"}),j.jsxs(gi,{spacing:0,direction:"column",justifyContent:"center",sx:{flexGrow:1,overflow:"hidden"},children:[j.jsx(oo,{noWrap:!0,variant:"subtitle1",align:"left",children:we}),j.jsx(oo,{noWrap:!0,variant:"body1",align:"left",children:ge})]})]}),me.length>1&&j.jsxs(gi,{spacing:2,direction:"row",alignItems:"center",children:[j.jsx(Do,{"aria-label":"Mute",onClick:()=>{U()},children:t.group.muted?j.jsx(jy,{}):j.jsx(zy,{})}),j.jsx(Dy,{"aria-label":"Volume",color:"secondary",min:0,max:100,size:"small",value:P,onChange:(Ae,Me)=>{ee(Me)},onChangeCommitted:(Ae,Me)=>{Z(Me)}},"slider-"+t.group.id)]}),me.length===1&&j.jsx(Ua,{sx:{py:.5}})]}),j.jsx(P2,{}),j.jsx(Ua,{sx:{py:.5}}),j.jsx(j.Fragment,{children:me})]}),j.jsxs(td,{fullWidth:!0,open:u,onClose:()=>{q(!1)},children:[j.jsx(od,{children:"Group settings"}),j.jsxs(rd,{children:[j.jsx(P2,{textAlign:"left",children:"Stream"}),j.jsx(Jo,{margin:"dense",id:"stream",select:!0,fullWidth:!0,variant:"standard",value:k,onChange:Ae=>{console.log("SetStream: "+Ae.target.value),y(Ae.target.value)},children:t.server.streams.map(Ae=>j.jsx(Ta,{value:Ae.id,children:Ae.id},Ae.id))}),j.jsx(P2,{textAlign:"left",children:"Clients"}),j.jsx(QI,{children:d.map(Ae=>j.jsx(ky,{control:j.jsx(dy,{checked:Ae.inGroup,onChange:Me=>{F(Ae.client,Me.target.checked)}},"cb-"+Ae.client.id),label:Ae.client.getName()},"label-"+Ae.client.id))})]}),j.jsxs(nd,{children:[j.jsx(Ai,{onClick:()=>{q(!1)},children:"Cancel"}),j.jsx(Ai,{onClick:()=>{q(!0)},children:"OK"})]})]}),de()]})}function CL(t){return console.log("Render Server"),j.jsx(Ua,{sx:{m:1.5},children:t.server.groups.map(r=>j.jsx(AL,{group:r,server:t.server,snapcontrol:t.snapcontrol,showOffline:t.showOffline},r.id))})}const xL="0.7.0-beta.1"+(" (rev "+"bdfa68a9e6457632604edb7cc7f5df0c4d23dd08".substring(0,8)+")");function SL(t){return j.jsx("div",{children:j.jsxs(td,{open:t.open,scroll:"paper","aria-labelledby":"scroll-dialog-title","aria-describedby":"scroll-dialog-description",children:[j.jsx(od,{id:"scroll-dialog-title",children:"About Snapweb"}),j.jsx(rd,{dividers:!0,children:j.jsxs(JN,{id:"scroll-dialog-description",tabIndex:-1,children:[j.jsxs("head",{children:[j.jsx("title",{children:"Snapweb licenses"}),j.jsx("meta",{httpEquiv:"content-type",content:"text/html;charset=utf-8"})]}),j.jsxs("body",{children:[j.jsxs("p",{children:["Version ",xL]}),j.jsxs("p",{children:["Copyright © 2020 - 2024 ",j.jsx("a",{href:"mailto:snapweb@badaix.de",children:"BadAix"})]}),j.jsxs("p",{children:["Author: ",j.jsx("a",{href:"https://de.linkedin.com/pub/johannes-pohl/65/6a6/253",children:"Johannes Pohl"})," and ",j.jsx("a",{href:"https://github.com/badaix/snapweb/graphs/contributors",children:"contributors"})]}),j.jsxs("div",{children:[j.jsx("h2",{children:"License"}),j.jsxs("p",{children:["Snapweb is licensed under the ",j.jsx("a",{href:"#gpl",children:"GNU General Public License, version 3 or later "})," (herein referred to as GPL)."]}),j.jsx("h2",{children:"How Can I Help?"}),j.jsx("p",{children:"If you find Snapcast and Snapweb useful, then I'd really appreciate it if you'd consider contributing to the project however you can. Donating is the easiest."}),j.jsxs("p",{children:["Donate on ",j.jsx("a",{href:"https://www.paypal.me/badaix",children:"PayPal"})]}),j.jsx("h2",{children:"Sources"}),j.jsxs("p",{children:["The sources to this application can be retrieved at ",j.jsx("a",{href:"https://github.com/badaix/snapweb",children:"https://github.com/badaix/snapweb"}),"."]}),j.jsx("h2",{children:"Libraries"}),j.jsxs("p",{children:["Snapweb uses external libraries that make extensive use of the following persons' or companies' code:",j.jsxs("table",{children:[j.jsxs("tr",{children:[j.jsx("th",{children:"name"}),j.jsx("th",{children:"license type"}),j.jsx("th",{children:"link"}),j.jsx("th",{children:"author"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@emotion/react"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/emotion-js/emotion.git#main"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@emotion/styled"}),j.jsx("td",{children:"MIT"}),j.jsx("td",{children:"git+https://github.com/emotion-js/emotion.git#main"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@mui/icons-material"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/mui/material-ui.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@mui/material"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/mui/material-ui.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@testing-library/jest-dom"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/testing-library/jest-dom.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@testing-library/react"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/testing-library/react-testing-library.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@testing-library/user-event"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/testing-library/user-event.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@types/jest"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"https://github.com/DefinitelyTyped/DefinitelyTyped.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@types/node"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"https://github.com/DefinitelyTyped/DefinitelyTyped.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@types/react"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"https://github.com/DefinitelyTyped/DefinitelyTyped.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"@types/react-dom"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"https://github.com/DefinitelyTyped/DefinitelyTyped.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"libflacjs"}),j.jsx("td",{children:"MIT"}),j.jsx("td",{children:"git+https://github.com/mmig/libflac.js.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"react"}),j.jsx("td",{children:"MIT"}),j.jsx("td",{children:"git+https://github.com/facebook/react.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"react-dom"}),j.jsx("td",{children:"MIT"}),j.jsx("td",{children:"git+https://github.com/facebook/react.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"react-scripts"}),j.jsx("td",{children:"MIT"}),j.jsx("td",{children:"git+https://github.com/facebook/create-react-app.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"standardized-audio-context"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/chrisguttandin/standardized-audio-context.git"}),j.jsx("td",{children:"n/a"})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"typescript"}),j.jsx("td",{children:"Apache-2.0"}),j.jsx("td",{children:"git+https://github.com/Microsoft/TypeScript.git"}),j.jsx("td",{children:"Microsoft Corp."})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"web-vitals"}),j.jsx("td",{children:"n/a"}),j.jsx("td",{children:"git+https://github.com/GoogleChrome/web-vitals.git"}),j.jsx("td",{children:"n/a"})]})]})]})]})]})]})}),j.jsx(nd,{children:j.jsx(Ai,{onClick:t.onClose,children:"Close"})})]})})}var EL={VITE_APP_VERSION:"0.7.0-beta.1",VITE_APP_NAME:"snapweb",VITE_APP_GITREV:"bdfa68a9e6457632604edb7cc7f5df0c4d23dd08",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const PL=EL.VITE_APP_SNAPSERVER_HOST||window.location.host,bs={snapserver_host:"snapserver.host",theme:"theme",showoffline:"showoffline"};var bi=(t=>(t.System="system",t.Light="light",t.Dark="dark",t))(bi||{});function R2(t,r){window.localStorage&&window.localStorage.setItem(t,r)}function c0(t,r=""){if(window.localStorage){const s=window.localStorage.getItem(t);return s!==null?s:(window.localStorage.setItem(t,r),r)}return r}const Cr={get baseUrl(){return c0(bs.snapserver_host,(window.location.protocol==="https:"?"wss://":"ws://")+PL)},set baseUrl(t){R2(bs.snapserver_host,t)},get theme(){return c0(bs.theme,"system")},set theme(t){R2(bs.theme,t)},get showOffline(){return c0(bs.showoffline,String(!1))===String(!0)},set showOffline(t){R2(bs.showoffline,String(t))}};function ML(t){const[r,s]=$.useState(Cr.baseUrl),[u,p]=$.useState(Cr.theme),[d,b]=$.useState(Cr.showOffline);function k(y){y&&(Cr.baseUrl=r,Cr.theme=u,Cr.showOffline=d),t.onClose(y)}return j.jsx("div",{children:j.jsxs(td,{open:t.open,children:[j.jsx(od,{children:"Settings"}),j.jsxs(rd,{dividers:!0,children:[j.jsx(Jo,{autoFocus:!0,margin:"dense",id:"host",label:"Snapserver host",type:"text",fullWidth:!0,variant:"standard",onChange:y=>{s(y.target.value)},value:r}),j.jsx(Ua,{sx:{py:1}}),j.jsxs(_h,{variant:"standard",fullWidth:!0,sx:{minWidth:100},children:[j.jsx(xy,{id:"theme-label",children:"Theme"}),j.jsxs(Ch,{labelId:"theme-select-label",id:"demo-theme-select",value:u,label:"Theme",onChange:y=>{console.log("Theme selected: "+y.target.value),p(y.target.value)},children:[j.jsx(Ta,{value:bi.System,children:bi.System}),j.jsx(Ta,{value:bi.Light,children:bi.Light}),j.jsx(Ta,{value:bi.Dark,children:bi.Dark})]})]}),j.jsx(Ua,{sx:{py:1}}),j.jsx(ky,{control:j.jsx(dy,{checked:d,onChange:(y,_)=>b(_)}),label:"Show offline clients"})]}),j.jsxs(nd,{children:[j.jsx(Ai,{onClick:()=>{k(!1)},children:"Cancel"}),j.jsx(Ai,{onClick:()=>{k(!0)},children:"OK"})]})]})})}var Fa;(t=>{class r{constructor(_){Ie(this,"arch","");Ie(this,"ip","");Ie(this,"mac","");Ie(this,"name","");Ie(this,"os","");this.fromJson(_)}fromJson(_){this.arch=_.arch,this.ip=_.ip,this.mac=_.mac,this.name=_.name,this.os=_.os}}t.Host=r;class s{constructor(_){Ie(this,"id","");Ie(this,"host");Ie(this,"snapclient");Ie(this,"config");Ie(this,"lastSeen");Ie(this,"connected",!1);this.fromJson(_)}fromJson(_){this.id=_.id,this.host=new r(_.host);const S=_.snapclient;this.snapclient={name:S.name,protocolVersion:S.protocolVersion,version:S.version};const P=_.config;this.config={instance:P.instance,latency:P.latency,name:P.name,volume:{muted:P.volume.muted,percent:P.volume.percent}},this.lastSeen={sec:_.lastSeen.sec,usec:_.lastSeen.usec},this.connected=!!_.connected}getName(){return this.config.name.length===0?this.host.name:this.config.name}}t.Client=s;class u{constructor(_){Ie(this,"name","");Ie(this,"id","");Ie(this,"stream_id","");Ie(this,"muted",!1);Ie(this,"clients",[]);this.fromJson(_)}fromJson(_){this.name=_.name,this.id=_.id,this.stream_id=_.stream_id,this.muted=!!_.muted;for(const S of _.clients)this.clients.push(new s(S))}getClient(_){for(const S of this.clients)if(S.id===_)return S;return null}}t.Group=u;class p{constructor(_){Ie(this,"title");Ie(this,"artist");Ie(this,"album");Ie(this,"artUrl");Ie(this,"duration");this.fromJson(_)}fromJson(_){this.title=_.title,this.artist=_.artist,this.album=_.album,this.artUrl=_.artUrl,this.duration=_.duration}}t.Metadata=p;class d{constructor(_){Ie(this,"loopStatus");Ie(this,"shuffle");Ie(this,"volume");Ie(this,"rate");Ie(this,"playbackStatus");Ie(this,"position");Ie(this,"minimumRate");Ie(this,"maximumRate");Ie(this,"canGoNext",!1);Ie(this,"canGoPrevious",!1);Ie(this,"canPlay",!1);Ie(this,"canPause",!1);Ie(this,"canSeek",!1);Ie(this,"canControl",!1);Ie(this,"metadata");this.fromJson(_)}fromJson(_){this.loopStatus=_.loopStatus,this.shuffle=_.shuffle,this.volume=_.volume,this.rate=_.rate,this.playbackStatus=_.playbackStatus,this.position=_.position,this.minimumRate=_.minimumRate,this.maximumRate=_.maximumRate,this.canGoNext=!!_.canGoNext,this.canGoPrevious=!!_.canGoPrevious,this.canPlay=!!_.canPlay,this.canPause=!!_.canPause,this.canSeek=!!_.canSeek,this.canControl=!!_.canControl,_.metadata!==void 0?this.metadata=new p(_.metadata):this.metadata=void 0}}t.Properties=d;class b{constructor(_){Ie(this,"id","");Ie(this,"status","");Ie(this,"uri");Ie(this,"properties");this.fromJson(_)}fromJson(_){this.id=_.id,this.status=_.status,_.properties!==void 0?this.properties=new d(_.properties):this.properties=new d({});const S=_.uri;this.uri={raw:S.raw,scheme:S.scheme,host:S.host,path:S.path,fragment:S.fragment,query:S.query}}}t.Stream=b;class k{constructor(_){Ie(this,"groups",[]);Ie(this,"server");Ie(this,"streams",[]);_&&this.fromJson(_)}fromJson(_){this.groups=[];for(const P of _.groups)this.groups.push(new u(P));const S=_.server.snapserver;this.server={host:new r(_.server.host),snapserver:{controlProtocolVersion:S.controlProtocolVersion,name:S.name,protocolVersion:S.protocolVersion,version:S.version}},this.streams=[];for(const P of _.streams)this.streams.push(new b(P))}getClient(_){for(const S of this.groups){const P=S.getClient(_);if(P)return P}return null}getGroup(_){for(const S of this.groups)if(S.id===_)return S;return null}getStream(_){for(const S of this.streams)if(S.id===_)return S;return null}}t.Server=k})(Fa||(Fa={}));class NL{constructor(){Ie(this,"onChange");Ie(this,"onConnectionChanged");Ie(this,"connection");Ie(this,"server");Ie(this,"msg_id");Ie(this,"status_req_id");Ie(this,"timer");this.onChange=null,this.onConnectionChanged=null,this.server=new Fa.Server,this.msg_id=0,this.status_req_id=-1,this.timer=null}connect(r){this.disconnect();try{this.connection=new WebSocket(r+"/jsonrpc"),this.connection.onmessage=s=>this.onMessage(s.data),this.connection.onopen=()=>{this.status_req_id=this.sendRequest("Server.GetStatus"),this.onConnectionChanged&&this.onConnectionChanged(this,!0)},this.connection.onerror=s=>{console.error("error:",s)},this.connection.onclose=()=>{this.onConnectionChanged&&this.onConnectionChanged(this,!1,"Connection lost, trying to reconnect."),console.info("connection lost, reconnecting in 1s"),this.timer=setTimeout(()=>this.connect(r),1e3)}}catch(s){console.info('Exception while connecting: "'+s+'", reconnecting in 1s'),this.onConnectionChanged&&this.onConnectionChanged(this,!1,'Exception while connecting: "'+s+'", trying to reconnect.'),this.timer=setTimeout(()=>this.connect(r),1e3)}}disconnect(){this.timer&&clearTimeout(this.timer),this.connection&&(this.connection.onclose=()=>{},this.connection.readyState===WebSocket.OPEN&&this.connection.close()),this.onConnectionChanged&&this.onConnectionChanged(this,!1)}onNotification(r){let s;switch(r.method){case"Client.OnVolumeChanged":return this.getClient(r.params.id).config.volume=r.params.volume,!0;case"Client.OnLatencyChanged":return this.getClient(r.params.id).config.latency=r.params.latency,!1;case"Client.OnNameChanged":return this.getClient(r.params.id).config.name=r.params.name,!0;case"Client.OnConnect":case"Client.OnDisconnect":return this.getClient(r.params.client.id).fromJson(r.params.client),!0;case"Group.OnMute":return this.getGroup(r.params.id).muted=!!r.params.mute,!0;case"Group.OnStreamChanged":return this.getGroup(r.params.id).stream_id=r.params.stream_id,!0;case"Stream.OnUpdate":return s=this.getStream(r.params.id),s.fromJson(r.params.stream),!0;case"Server.OnUpdate":return this.server.fromJson(r.params.server),!0;case"Stream.OnProperties":return s=this.getStream(r.params.id),s.properties.fromJson(r.params.properties),!0;default:return!1}}getClient(r){const s=this.server.getClient(r);if(s==null)throw new Error(`client ${r} was null`);return s}getGroup(r){const s=this.server.getGroup(r);if(s==null)throw new Error(`group ${r} was null`);return s}getGroupVolume(r,s){if(r.clients.length===0)return 0;let u=0,p=0;for(const d of r.clients)s&&!d.connected||(u+=d.config.volume.percent,++p);return p===0?0:u/p}getGroupFromClient(r){for(const s of this.server.groups)for(const u of s.clients)if(u.id===r)return s;throw new Error(`group for client ${r} was null`)}getStreamFromClient(r){const s=this.getGroupFromClient(r);return this.getStream(s.stream_id)}getStream(r){const s=this.server.getStream(r);if(s==null)throw new Error(`stream ${r} was null`);return s}setVolume(r,s,u){s=Math.max(0,Math.min(100,s));const p=this.getClient(r);p.config.volume.percent=s,u!==void 0&&(p.config.volume.muted=u),this.sendRequest("Client.SetVolume",{id:r,volume:{muted:p.config.volume.muted,percent:p.config.volume.percent}})}setClientName(r,s){const u=this.getClient(r),p=u.config.name!==""?u.config.name:u.host.name;s!==p&&(this.sendRequest("Client.SetName",{id:r,name:s}),u.config.name=s)}setClientLatency(r,s){const u=this.getClient(r),p=u.config.latency;s!==p&&(this.sendRequest("Client.SetLatency",{id:r,latency:s}),u.config.latency=s)}deleteClient(r){this.sendRequest("Server.DeleteClient",{id:r}),this.server.groups.forEach((s,u)=>{s.clients.forEach((p,d)=>{p.id===r&&this.server.groups[u].clients.splice(d,1)})}),this.server.groups.forEach((s,u)=>{s.clients.length===0&&this.server.groups.splice(u,1)})}setStream(r,s){this.getGroup(r).stream_id=s,this.sendRequest("Group.SetStream",{id:r,stream_id:s})}setClients(r,s){this.status_req_id=this.sendRequest("Group.SetClients",{id:r,clients:s})}muteGroup(r,s){this.getGroup(r).muted=s,this.sendRequest("Group.SetMute",{id:r,mute:s})}control(r,s,u){const p={id:r,command:s};u&&(p.params=u),this.sendRequest("Stream.Control",p)}sendRequest(r,s){const u={id:++this.msg_id,jsonrpc:"2.0",method:r};s&&(u.params=s);const p=JSON.stringify(u);return console.debug("Sending: "+p),this.connection.send(p),this.msg_id}onMessage(r){let s=!1;const u=JSON.parse(r);if(u.id!==void 0)u.id===this.status_req_id&&(this.server=new Fa.Server(u.result.server),s=!0);else{if(Array.isArray(u))for(const d of u)s=this.onNotification(d)||s;else s=this.onNotification(u);s=!0}s&&(this.onChange?(console.debug("onChange"),this.onChange(this,this.server)):console.debug("no onChange"))}}function IL(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xh={exports:{}};xh.exports;(function(t){var r={};(function(s,u){if(t.exports){var p=typeof process<"u"&&process&&r?r:s;u(p,t,IL)}else s.Flac=u(s)})(typeof self<"u"?self:typeof window<"u"?window:c3,function(s,u,p){var d=d||{},b=!1;if(d.onRuntimeInitialized=function(){b=!0,ui?ts("ready",[{type:"ready",target:ui}],!0):setTimeout(function(){ts("ready",[{type:"ready",target:ui}],!0)},0)},s&&s.FLAC_SCRIPT_LOCATION){d.locateFile=function(x){var M=s.FLAC_SCRIPT_LOCATION||"";return M[x]?M[x]:(M+=M&&!/\/$/.test(M)?"/":"",M+x)};var F=function(x){if(N){var M=q(x,!0);return M.buffer||(M=new Uint8Array(M)),Ae(M.buffer),M}return new Promise(function(W,J){var re=new XMLHttpRequest;re.responseType="arraybuffer",re.addEventListener("load",function(se){W(re.response)}),re.addEventListener("error",function(se){J(se)}),re.open("GET",x),re.send()})}}if(s&&typeof s.fetch=="function"){var k=s.fetch;s.fetch=function(w){return k.apply(null,arguments).catch(function(x){try{var M=F(w);return M&&M.catch&&M.catch(function(W){throw x}),M}catch{throw x}})}}var y={},_;for(_ in d)d.hasOwnProperty(_)&&(y[_]=d[_]);var S=!1,P=!1,N=!1,L=!1;S=typeof window=="object",P=typeof importScripts=="function",N=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",L=!S&&!N&&!P;var R="";function O(w){return d.locateFile?d.locateFile(w,R):R+w}var q,F,D,z;N?(P?R=p("path").dirname(R)+"/":R=__dirname+"/",q=function(x,M){var W=$a(x);return W?M?W:W.toString():(D||(D=p("fs")),z||(z=p("path")),x=z.normalize(x),D.readFileSync(x,M?null:"utf8"))},F=function(x){var M=q(x,!0);return M.buffer||(M=new Uint8Array(M)),Ae(M.buffer),M},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),t.exports=d,d.inspect=function(){return"[Emscripten Module object]"}):L?(typeof read<"u"&&(q=function(x){var M=$a(x);return M?Oh(M):read(x)}),F=function(x){var M;return M=$a(x),M||(typeof readbuffer=="function"?new Uint8Array(readbuffer(x)):(M=read(x,"binary"),Ae(typeof M=="object"),M))},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(S||P)&&(P?R=self.location.href:document.currentScript&&(R=document.currentScript.src),R.indexOf("blob:")!==0?R=R.substr(0,R.lastIndexOf("/")+1):R="",q=function(x){try{var M=new XMLHttpRequest;return M.open("GET",x,!1),M.send(null),M.responseText}catch(J){var W=$a(x);if(W)return Oh(W);throw J}},P&&(F=function(x){try{var M=new XMLHttpRequest;return M.open("GET",x,!1),M.responseType="arraybuffer",M.send(null),new Uint8Array(M.response)}catch(J){var W=$a(x);if(W)return W;throw J}}));var Y=d.print||console.log.bind(console),U=d.printErr||console.warn.bind(console);for(_ in y)y.hasOwnProperty(_)&&(d[_]=y[_]);y=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit;function ee(w,x){return w}var Z=[],X;function de(w,x){var M=ke;if(!X){X=new WeakMap;for(var W=0;W=27&&kr("Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."),x.push(null)},x.set=function(M,W){x[M]=W},x.get=function(M){return x[M]},x},Module:function(w){},Instance:function(w,x){this.exports=function(W,J,re){var se=new ArrayBuffer(8),fe=new Int32Array(se),Ce=new Float32Array(se),Fe=new Float64Array(se);function Oe(mt){return fe[mt]}function ot(mt,_n){fe[mt]=_n}function rt(){return Fe[0]}function qe(mt){Fe[0]=mt}function kt(mt){Ce[0]=mt}function Jt(mt,_n,zt){var Cl=_n.memory,Le=re,K=new mt.Int8Array(zt),Ht=new mt.Int16Array(zt),e=new mt.Int32Array(zt),H=new mt.Uint8Array(zt),$t=new mt.Uint16Array(zt),ze=new mt.Uint32Array(zt),Ze=new mt.Float32Array(zt),it=new mt.Float64Array(zt),ie=mt.Math.imul,ue=mt.Math.fround,On=mt.Math.abs,Qt=mt.Math.clz32;mt.Math.min,mt.Math.max;var f8=mt.Math.floor;mt.Math.ceil,mt.Math.sqrt,_n.abort,mt.NaN;var d8=mt.Infinity,p8=_n.emscripten_resize_heap,h8=_n.emscripten_memcpy_big,m8=_n.fd_close,g8=_n.fd_read,b8=_n.round,Jh=_n.fd_write,v8=_n.setTempRet0,k8=_n.fd_seek,be=5257216,ns=0,rs=0,ne=0;function y8(){}function _8(){return 11584}function va(i){var o=0,n=0;o=e[3544],n=i+3&-4,i=o+n|0;e:{if(i>>>0<=o>>>0&&(n|0)>=1||i>>>0>$m()<<16>>>0&&!p8(i|0))break e;return e[3544]=i,o}return e[2896]=48,-1}function In(i,o){var n=0,a=0;e:{if(!o||(n=i+o|0,K[n+-1|0]=0,K[i|0]=0,o>>>0<3)||(K[n+-2|0]=0,K[i+1|0]=0,K[n+-3|0]=0,K[i+2|0]=0,o>>>0<7)||(K[n+-4|0]=0,K[i+3|0]=0,o>>>0<9)||(a=0-i&3,n=a+i|0,e[n>>2]=0,a=o-a&-4,o=a+n|0,e[o+-4>>2]=0,a>>>0<9)||(e[n+8>>2]=0,e[n+4>>2]=0,e[o+-8>>2]=0,e[o+-12>>2]=0,a>>>0<25)||(e[n+24>>2]=0,e[n+20>>2]=0,e[n+16>>2]=0,e[n+12>>2]=0,e[o+-16>>2]=0,e[o+-20>>2]=0,e[o+-24>>2]=0,e[o+-28>>2]=0,o=a,a=n&4|24,o=o-a|0,o>>>0<32))break e;for(n=n+a|0;e[n+24>>2]=0,e[n+28>>2]=0,e[n+16>>2]=0,e[n+20>>2]=0,e[n+8>>2]=0,e[n+12>>2]=0,e[n>>2]=0,e[n+4>>2]=0,n=n+32|0,o=o+-32|0,o>>>0>31;);}return i}function gn(i,o,n){var a=0,c=0,f=0;if(n>>>0>=512)return h8(i|0,o|0,n|0)|0,i;c=i+n|0;e:{if(!((i^o)&3)){t:{if((n|0)<1){n=i;break t}if(!(i&3)){n=i;break t}for(n=i;;){if(K[n|0]=H[o|0],o=o+1|0,n=n+1|0,n>>>0>=c>>>0)break t;if(!(n&3))break}}a=c&-4;t:{if(a>>>0<64||(f=a+-64|0,n>>>0>f>>>0))break t;for(;e[n>>2]=e[o>>2],e[n+4>>2]=e[o+4>>2],e[n+8>>2]=e[o+8>>2],e[n+12>>2]=e[o+12>>2],e[n+16>>2]=e[o+16>>2],e[n+20>>2]=e[o+20>>2],e[n+24>>2]=e[o+24>>2],e[n+28>>2]=e[o+28>>2],e[n+32>>2]=e[o+32>>2],e[n+36>>2]=e[o+36>>2],e[n+40>>2]=e[o+40>>2],e[n+44>>2]=e[o+44>>2],e[n+48>>2]=e[o+48>>2],e[n+52>>2]=e[o+52>>2],e[n+56>>2]=e[o+56>>2],e[n+60>>2]=e[o+60>>2],o=o- -64|0,n=n- -64|0,n>>>0<=f>>>0;);}if(n>>>0>=a>>>0)break e;for(;e[n>>2]=e[o>>2],o=o+4|0,n=n+4|0,n>>>0>>0;);break e}if(c>>>0<4){n=i;break e}if(a=c+-4|0,a>>>0>>0){n=i;break e}for(n=i;K[n|0]=H[o|0],K[n+1|0]=H[o+1|0],K[n+2|0]=H[o+2|0],K[n+3|0]=H[o+3|0],o=o+4|0,n=n+4|0,n>>>0<=a>>>0;);}if(n>>>0>>0)for(;K[n|0]=H[o|0],o=o+1|0,n=n+1|0,(c|0)!=(n|0););return i}function bn(i){i=i|0;var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0;A=be-16|0,be=A;e:{t:{n:{o:{r:{i:{a:{s:{l:{u:{f:{if(i>>>0<=244){if(l=e[2897],f=i>>>0<11?16:i+11&-8,i=f>>>3|0,o=l>>>i|0,o&3){n=i+((o^-1)&1)|0,f=n<<3,o=e[f+11636>>2],i=o+8|0,a=e[o+8>>2],f=f+11628|0;c:{if((a|0)==(f|0)){C=11588,E=Ke(-2,n)&l,e[C>>2]=E;break c}e[a+12>>2]=f,e[f+8>>2]=a}n=n<<3,e[o+4>>2]=n|3,o=o+n|0,e[o+4>>2]=e[o+4>>2]|1;break e}if(h=e[2899],f>>>0<=h>>>0)break f;if(o){n=2<>>12&16,n=o,i=i>>>o|0,o=i>>>5&8,n=n|o,i=i>>>o|0,o=i>>>2&4,n=n|o,i=i>>>o|0,o=i>>>1&2,n=n|o,i=i>>>o|0,o=i>>>1&1,n=(n|o)+(i>>>o|0)|0,a=n<<3,o=e[a+11636>>2],i=e[o+8>>2],a=a+11628|0;c:{if((i|0)==(a|0)){l=Ke(-2,n)&l,e[2897]=l;break c}e[i+12>>2]=a,e[a+8>>2]=i}if(i=o+8|0,e[o+4>>2]=f|3,c=o+f|0,n=n<<3,a=n-f|0,e[c+4>>2]=a|1,e[o+n>>2]=a,h){f=h>>>3|0,o=(f<<3)+11628|0,n=e[2902],f=1<>2]}e[o+8>>2]=n,e[f+12>>2]=n,e[n+12>>2]=o,e[n+8>>2]=f}e[2902]=c,e[2899]=a;break e}if(v=e[2898],!v)break f;for(i=(v&0-v)+-1|0,o=i>>>12&16,n=o,i=i>>>o|0,o=i>>>5&8,n=n|o,i=i>>>o|0,o=i>>>2&4,n=n|o,i=i>>>o|0,o=i>>>1&2,n=n|o,i=i>>>o|0,o=i>>>1&1,o=e[((n|o)+(i>>>o|0)<<2)+11892>>2],a=(e[o+4>>2]&-8)-f|0,n=o;;){c:{if(i=e[n+16>>2],!i&&(i=e[n+20>>2],!i))break c;c=(e[i+4>>2]&-8)-f|0,n=c>>>0>>0,a=n?c:a,o=n?i:o,n=i;continue}break}if(m=e[o+24>>2],c=e[o+12>>2],(c|0)!=(o|0)){i=e[o+8>>2],e[i+12>>2]=c,e[c+8>>2]=i;break t}if(n=o+20|0,i=e[n>>2],!i){if(i=e[o+16>>2],!i)break u;n=o+16|0}for(;g=n,c=i,n=i+20|0,i=e[n>>2],!(!i&&(n=c+16|0,i=e[c+16>>2],!i)););e[g>>2]=0;break t}if(f=-1,i>>>0>4294967231||(i=i+11|0,f=i&-8,g=e[2898],!g))break f;n=0-f|0,i=i>>>8|0,h=0;c:{if(!i||(h=31,f>>>0>16777215))break c;a=i+1048320>>>16&8,o=i<>>16&4,l=o<>>16&2,i=(l<>>15|0)-(o|(i|a))|0,h=(i<<1|f>>>i+21&1)+28|0}a=e[(h<<2)+11892>>2];c:{d:{p:{if(!a){i=0;break p}for(o=f<<((h|0)==31?0:25-(h>>>1|0)|0),i=0;;){h:{if(l=(e[a+4>>2]&-8)-f|0,l>>>0>=n>>>0||(c=a,n=l,n))break h;n=0,i=a;break d}if(l=e[a+20>>2],a=e[((o>>>29&4)+a|0)+16>>2],i=l?(l|0)==(a|0)?i:l:i,o=o<<((a|0)!=0),!a)break}}if(!(i|c)){if(i=2<>>12&16,a=o,i=i>>>o|0,o=i>>>5&8,a=a|o,i=i>>>o|0,o=i>>>2&4,a=a|o,i=i>>>o|0,o=i>>>1&2,a=a|o,i=i>>>o|0,o=i>>>1&1,i=e[((a|o)+(i>>>o|0)<<2)+11892>>2]}if(!i)break c}for(;a=(e[i+4>>2]&-8)-f|0,o=a>>>0>>0,n=o?a:n,c=o?i:c,o=e[i+16>>2],o?i=o:i=e[i+20>>2],!!i;);}if(!c|n>>>0>=e[2899]-f>>>0)break f;if(h=e[c+24>>2],o=e[c+12>>2],(c|0)!=(o|0)){i=e[c+8>>2],e[i+12>>2]=o,e[o+8>>2]=i;break n}if(a=c+20|0,i=e[a>>2],!i){if(i=e[c+16>>2],!i)break l;a=c+16|0}for(;l=a,o=i,a=i+20|0,i=e[a>>2],!(!i&&(a=o+16|0,i=e[o+16>>2],!i)););e[l>>2]=0;break n}if(o=e[2899],o>>>0>=f>>>0){i=e[2902],n=o-f|0;f:{if(n>>>0>=16){e[2899]=n,a=i+f|0,e[2902]=a,e[a+4>>2]=n|1,e[i+o>>2]=n,e[i+4>>2]=f|3;break f}e[2902]=0,e[2899]=0,e[i+4>>2]=o|3,o=i+o|0,e[o+4>>2]=e[o+4>>2]|1}i=i+8|0;break e}if(o=e[2900],o>>>0>f>>>0){o=o-f|0,e[2900]=o,i=e[2903],n=i+f|0,e[2903]=n,e[n+4>>2]=o|1,e[i+4>>2]=f|3,i=i+8|0;break e}if(i=0,c=f+47|0,a=c,e[3015]?n=e[3017]:(e[3018]=-1,e[3019]=-1,e[3016]=4096,e[3017]=4096,e[3015]=A+12&-16^1431655768,e[3020]=0,e[3008]=0,n=4096),l=a+n|0,g=0-n|0,n=l&g,n>>>0<=f>>>0||(a=e[3007],a&&(h=e[3005],m=h+n|0,m>>>0<=h>>>0|m>>>0>a>>>0)))break e;if(H[12032]&4)break i;f:{c:{if(a=e[2903],a)for(i=12036;;){if(h=e[i>>2],h+e[i+4>>2]>>>0>a>>>0&&h>>>0<=a>>>0)break c;if(i=e[i+8>>2],!i)break}if(o=va(0),(o|0)==-1||(l=n,i=e[3016],a=i+-1|0,a&o&&(l=(n-o|0)+(o+a&0-i)|0),l>>>0<=f>>>0|l>>>0>2147483646)||(i=e[3007],i&&(a=e[3005],g=a+l|0,g>>>0<=a>>>0|g>>>0>i>>>0)))break a;if(i=va(l),(o|0)!=(i|0))break f;break r}if(l=g&l-o,l>>>0>2147483646)break a;if(o=va(l),(o|0)==(e[i>>2]+e[i+4>>2]|0))break s;i=o}if(!((i|0)==-1|f+48>>>0<=l>>>0)){if(o=e[3017],o=o+(c-l|0)&0-o,o>>>0>2147483646){o=i;break r}if((va(o)|0)!=-1){l=o+l|0,o=i;break r}va(0-l|0);break a}if(o=i,(i|0)!=-1)break r;break a}c=0;break t}o=0;break n}if((o|0)!=-1)break r}e[3008]=e[3008]|4}if(n>>>0>2147483646||(o=va(n),i=va(0),o>>>0>=i>>>0|(o|0)==-1|(i|0)==-1)||(l=i-o|0,l>>>0<=f+40>>>0))break o}i=e[3005]+l|0,e[3005]=i,i>>>0>ze[3006]&&(e[3006]=i);r:{i:{a:{if(a=e[2903],a){for(i=12036;;){if(n=e[i>>2],c=e[i+4>>2],(n+c|0)==(o|0))break a;if(i=e[i+8>>2],!i)break}break i}for(i=e[2901],o>>>0>=i>>>0&&i||(e[2901]=o),i=0,e[3010]=l,e[3009]=o,e[2905]=-1,e[2906]=e[3015],e[3012]=0;n=i<<3,a=n+11628|0,e[n+11636>>2]=a,e[n+11640>>2]=a,i=i+1|0,(i|0)!=32;);i=l+-40|0,n=o+8&7?-8-o&7:0,a=i-n|0,e[2900]=a,n=o+n|0,e[2903]=n,e[n+4>>2]=a|1,e[(i+o|0)+4>>2]=40,e[2904]=e[3019];break r}if(H[i+12|0]&8|o>>>0<=a>>>0|n>>>0>a>>>0)break i;e[i+4>>2]=c+l,i=a+8&7?-8-a&7:0,o=i+a|0,e[2903]=o,n=e[2900]+l|0,i=n-i|0,e[2900]=i,e[o+4>>2]=i|1,e[(n+a|0)+4>>2]=40,e[2904]=e[3019];break r}i=e[2901],o>>>0>>0&&(e[2901]=o,i=0),n=o+l|0,i=12036;i:{a:{s:{l:{u:{f:{for(;;){if((n|0)!=e[i>>2]){if(i=e[i+8>>2],i)continue;break f}break}if(!(H[i+12|0]&8))break u}for(i=12036;;){if(n=e[i>>2],n>>>0<=a>>>0&&(c=n+e[i+4>>2]|0,c>>>0>a>>>0))break l;i=e[i+8>>2]}}if(e[i>>2]=o,e[i+4>>2]=e[i+4>>2]+l,h=(o+8&7?-8-o&7:0)+o|0,e[h+4>>2]=f|3,o=n+(n+8&7?-8-n&7:0)|0,i=(o-h|0)-f|0,c=f+h|0,(o|0)==(a|0)){e[2903]=c,i=e[2900]+i|0,e[2900]=i,e[c+4>>2]=i|1;break a}if(e[2902]==(o|0)){e[2902]=c,i=e[2899]+i|0,e[2899]=i,e[c+4>>2]=i|1,e[i+c>>2]=i;break a}if(n=e[o+4>>2],(n&3)==1){m=n&-8;u:{if(n>>>0<=255){if(a=e[o+8>>2],f=n>>>3|0,n=e[o+12>>2],(n|0)==(a|0)){C=11588,E=e[2897]&Ke(-2,f),e[C>>2]=E;break u}e[a+12>>2]=n,e[n+8>>2]=a;break u}g=e[o+24>>2],l=e[o+12>>2];f:{if((l|0)!=(o|0)){n=e[o+8>>2],e[n+12>>2]=l,e[l+8>>2]=n;break f}c:{if(a=o+20|0,f=e[a>>2],f||(a=o+16|0,f=e[a>>2],f))break c;l=0;break f}for(;n=a,l=f,a=f+20|0,f=e[a>>2],!(!f&&(a=l+16|0,f=e[l+16>>2],!f)););e[n>>2]=0}if(!g)break u;n=e[o+28>>2],a=(n<<2)+11892|0;f:{if(e[a>>2]==(o|0)){if(e[a>>2]=l,l)break f;C=11592,E=e[2898]&Ke(-2,n),e[C>>2]=E;break u}if(e[g+(e[g+16>>2]==(o|0)?16:20)>>2]=l,!l)break u}if(e[l+24>>2]=g,n=e[o+16>>2],n&&(e[l+16>>2]=n,e[n+24>>2]=l),n=e[o+20>>2],!n)break u;e[l+20>>2]=n,e[n+24>>2]=l}o=o+m|0,i=i+m|0}if(e[o+4>>2]=e[o+4>>2]&-2,e[c+4>>2]=i|1,e[i+c>>2]=i,i>>>0<=255){o=i>>>3|0,i=(o<<3)+11628|0,n=e[2897],o=1<>2]}e[i+8>>2]=c,e[o+12>>2]=c,e[c+12>>2]=i,e[c+8>>2]=o;break a}l=c,o=i>>>8|0,n=0;u:{if(!o||(n=31,i>>>0>16777215))break u;a=o+1048320>>>16&8,n=o<>>16&4,f=n<>>16&2,o=(f<>>15|0)-(n|(o|a))|0,n=(o<<1|i>>>o+21&1)+28|0}o=n,e[l+28>>2]=o,e[c+16>>2]=0,e[c+20>>2]=0,n=(o<<2)+11892|0,a=e[2898],f=1<>2]=c;break u}for(a=i<<((o|0)==31?0:25-(o>>>1|0)|0),o=e[n>>2];;){if(n=o,(e[o+4>>2]&-8)==(i|0))break s;if(o=a>>>29|0,a=a<<1,f=(n+(o&4)|0)+16|0,o=e[f>>2],!o)break}e[f>>2]=c}e[c+24>>2]=n,e[c+12>>2]=c,e[c+8>>2]=c;break a}for(i=l+-40|0,n=o+8&7?-8-o&7:0,g=i-n|0,e[2900]=g,n=o+n|0,e[2903]=n,e[n+4>>2]=g|1,e[(i+o|0)+4>>2]=40,e[2904]=e[3019],i=(c+(c+-39&7?39-c&7:0)|0)+-47|0,n=i>>>0>>0?a:i,e[n+4>>2]=27,i=e[3012],e[n+16>>2]=e[3011],e[n+20>>2]=i,i=e[3010],e[n+8>>2]=e[3009],e[n+12>>2]=i,e[3011]=n+8,e[3010]=l,e[3009]=o,e[3012]=0,i=n+24|0;e[i+4>>2]=7,o=i+8|0,i=i+4|0,c>>>0>o>>>0;);if((n|0)==(a|0))break r;if(e[n+4>>2]=e[n+4>>2]&-2,l=n-a|0,e[a+4>>2]=l|1,e[n>>2]=l,l>>>0<=255){o=l>>>3|0,i=(o<<3)+11628|0,n=e[2897],o=1<>2]}e[i+8>>2]=a,e[o+12>>2]=a,e[a+12>>2]=i,e[a+8>>2]=o;break r}e[a+16>>2]=0,e[a+20>>2]=0,h=a,i=l>>>8|0,o=0;l:{if(!i||(o=31,l>>>0>16777215))break l;n=i+1048320>>>16&8,o=i<>>16&4,c=o<>>16&2,i=(c<>>15|0)-(o|(i|n))|0,o=(i<<1|l>>>i+21&1)+28|0}i=o,e[h+28>>2]=i,o=(i<<2)+11892|0,n=e[2898],c=1<>2]=a,e[a+24>>2]=o;break l}for(i=l<<((i|0)==31?0:25-(i>>>1|0)|0),o=e[o>>2];;){if(n=o,(l|0)==(e[o+4>>2]&-8))break i;if(o=i>>>29|0,i=i<<1,c=(n+(o&4)|0)+16|0,o=e[c>>2],!o)break}e[c>>2]=a,e[a+24>>2]=n}e[a+12>>2]=a,e[a+8>>2]=a;break r}i=e[n+8>>2],e[i+12>>2]=c,e[n+8>>2]=c,e[c+24>>2]=0,e[c+12>>2]=n,e[c+8>>2]=i}i=h+8|0;break e}i=e[n+8>>2],e[i+12>>2]=a,e[n+8>>2]=a,e[a+24>>2]=0,e[a+12>>2]=n,e[a+8>>2]=i}if(i=e[2900],i>>>0<=f>>>0)break o;o=i-f|0,e[2900]=o,i=e[2903],n=i+f|0,e[2903]=n,e[n+4>>2]=o|1,e[i+4>>2]=f|3,i=i+8|0;break e}e[2896]=48,i=0;break e}n:{if(!h)break n;i=e[c+28>>2],a=(i<<2)+11892|0;o:{if(e[a>>2]==(c|0)){if(e[a>>2]=o,o)break o;g=Ke(-2,i)&g,e[2898]=g;break n}if(e[h+(e[h+16>>2]==(c|0)?16:20)>>2]=o,!o)break n}if(e[o+24>>2]=h,i=e[c+16>>2],i&&(e[o+16>>2]=i,e[i+24>>2]=o),i=e[c+20>>2],!i)break n;e[o+20>>2]=i,e[i+24>>2]=o}n:{if(n>>>0<=15){i=n+f|0,e[c+4>>2]=i|3,i=i+c|0,e[i+4>>2]=e[i+4>>2]|1;break n}if(e[c+4>>2]=f|3,o=c+f|0,e[o+4>>2]=n|1,e[o+n>>2]=n,n>>>0<=255){n=n>>>3|0,i=(n<<3)+11628|0,a=e[2897],n=1<>2]}e[i+8>>2]=o,e[n+12>>2]=o,e[o+12>>2]=i,e[o+8>>2]=n;break n}h=o,i=n>>>8|0,a=0;o:{if(!i||(a=31,n>>>0>16777215))break o;f=i+1048320>>>16&8,a=i<>>16&4,l=a<>>16&2,i=(l<>>15|0)-(a|(i|f))|0,a=(i<<1|n>>>i+21&1)+28|0}i=a,e[h+28>>2]=i,e[o+16>>2]=0,e[o+20>>2]=0,a=(i<<2)+11892|0;o:{f=1<>2]=o;break r}for(i=n<<((i|0)==31?0:25-(i>>>1|0)|0),f=e[a>>2];;){if(a=f,(e[a+4>>2]&-8)==(n|0))break o;if(f=i>>>29|0,i=i<<1,l=(a+(f&4)|0)+16|0,f=e[l>>2],!f)break}e[l>>2]=o}e[o+24>>2]=a,e[o+12>>2]=o,e[o+8>>2]=o;break n}i=e[a+8>>2],e[i+12>>2]=o,e[a+8>>2]=o,e[o+24>>2]=0,e[o+12>>2]=a,e[o+8>>2]=i}i=c+8|0;break e}t:{if(!m)break t;i=e[o+28>>2],n=(i<<2)+11892|0;n:{if(e[n>>2]==(o|0)){if(e[n>>2]=c,c)break n;C=11592,E=Ke(-2,i)&v,e[C>>2]=E;break t}if(e[(e[m+16>>2]==(o|0)?16:20)+m>>2]=c,!c)break t}if(e[c+24>>2]=m,i=e[o+16>>2],i&&(e[c+16>>2]=i,e[i+24>>2]=c),i=e[o+20>>2],!i)break t;e[c+20>>2]=i,e[i+24>>2]=c}t:{if(a>>>0<=15){i=a+f|0,e[o+4>>2]=i|3,i=i+o|0,e[i+4>>2]=e[i+4>>2]|1;break t}if(e[o+4>>2]=f|3,f=o+f|0,e[f+4>>2]=a|1,e[a+f>>2]=a,h){c=h>>>3|0,i=(c<<3)+11628|0,n=e[2902],c=1<>2]}e[i+8>>2]=n,e[l+12>>2]=n,e[n+12>>2]=i,e[n+8>>2]=l}e[2902]=f,e[2899]=a}i=o+8|0}return be=A+16|0,i|0}function Ne(i){i=i|0;var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0;e:{if(!i)break e;a=i+-8|0,n=e[i+-4>>2],i=n&-8,f=a+i|0;t:{if(n&1)break t;if(!(n&3)||(n=e[a>>2],a=a-n|0,a>>>0>>0<=255){if(c=e[a+8>>2],n=n>>>3|0,o=e[a+12>>2],(o|0)==(c|0)){g=11588,m=e[2897]&Ke(-2,n),e[g>>2]=m;break t}e[c+12>>2]=o,e[o+8>>2]=c;break t}h=e[a+24>>2],n=e[a+12>>2];n:{if((n|0)!=(a|0)){o=e[a+8>>2],e[o+12>>2]=n,e[n+8>>2]=o;break n}o:{if(c=a+20|0,o=e[c>>2],o||(c=a+16|0,o=e[c>>2],o))break o;n=0;break n}for(;l=c,n=o,c=n+20|0,o=e[c>>2],!(!o&&(c=n+16|0,o=e[n+16>>2],!o)););e[l>>2]=0}if(!h)break t;c=e[a+28>>2],o=(c<<2)+11892|0;n:{if(e[o>>2]==(a|0)){if(e[o>>2]=n,n)break n;g=11592,m=e[2898]&Ke(-2,c),e[g>>2]=m;break t}if(e[h+(e[h+16>>2]==(a|0)?16:20)>>2]=n,!n)break t}if(e[n+24>>2]=h,o=e[a+16>>2],o&&(e[n+16>>2]=o,e[o+24>>2]=n),o=e[a+20>>2],!o)break t;e[n+20>>2]=o,e[o+24>>2]=n;break t}if(n=e[f+4>>2],(n&3)!=3)break t;e[2899]=i,e[f+4>>2]=n&-2,e[a+4>>2]=i|1,e[i+a>>2]=i;return}if(f>>>0<=a>>>0||(n=e[f+4>>2],!(n&1)))break e;t:{if(!(n&2)){if((f|0)==e[2903]){if(e[2903]=a,i=e[2900]+i|0,e[2900]=i,e[a+4>>2]=i|1,e[2902]!=(a|0))break e;e[2899]=0,e[2902]=0;return}if((f|0)==e[2902]){e[2902]=a,i=e[2899]+i|0,e[2899]=i,e[a+4>>2]=i|1,e[i+a>>2]=i;return}i=(n&-8)+i|0;n:{if(n>>>0<=255){if(o=e[f+8>>2],n=n>>>3|0,c=e[f+12>>2],(o|0)==(c|0)){g=11588,m=e[2897]&Ke(-2,n),e[g>>2]=m;break n}e[o+12>>2]=c,e[c+8>>2]=o;break n}h=e[f+24>>2],n=e[f+12>>2];o:{if((f|0)!=(n|0)){o=e[f+8>>2],e[o+12>>2]=n,e[n+8>>2]=o;break o}r:{if(c=f+20|0,o=e[c>>2],o||(c=f+16|0,o=e[c>>2],o))break r;n=0;break o}for(;l=c,n=o,c=n+20|0,o=e[c>>2],!(!o&&(c=n+16|0,o=e[n+16>>2],!o)););e[l>>2]=0}if(!h)break n;c=e[f+28>>2],o=(c<<2)+11892|0;o:{if((f|0)==e[o>>2]){if(e[o>>2]=n,n)break o;g=11592,m=e[2898]&Ke(-2,c),e[g>>2]=m;break n}if(e[h+((f|0)==e[h+16>>2]?16:20)>>2]=n,!n)break n}if(e[n+24>>2]=h,o=e[f+16>>2],o&&(e[n+16>>2]=o,e[o+24>>2]=n),o=e[f+20>>2],!o)break n;e[n+20>>2]=o,e[o+24>>2]=n}if(e[a+4>>2]=i|1,e[i+a>>2]=i,e[2902]!=(a|0))break t;e[2899]=i;return}e[f+4>>2]=n&-2,e[a+4>>2]=i|1,e[i+a>>2]=i}if(i>>>0<=255){i=i>>>3|0,n=(i<<3)+11628|0,o=e[2897],i=1<>2]}e[n+8>>2]=a,e[i+12>>2]=a,e[a+12>>2]=n,e[a+8>>2]=i;return}e[a+16>>2]=0,e[a+20>>2]=0,f=a,c=i>>>8|0,o=0;t:{if(!c||(o=31,i>>>0>16777215))break t;n=c,c=c+1048320>>>16&8,o=n<>>16&4,o=o<>>16&2,o=(o<>>15|0)-(l|(c|h))|0,o=(o<<1|i>>>o+21&1)+28|0}e[f+28>>2]=o,l=(o<<2)+11892|0;t:{n:{c=e[2898],n=1<>2]=a,e[a+24>>2]=l;break o}for(c=i<<((o|0)==31?0:25-(o>>>1|0)|0),n=e[l>>2];;){if(o=n,(e[n+4>>2]&-8)==(i|0))break n;if(n=c>>>29|0,c=c<<1,l=(o+(n&4)|0)+16|0,n=e[l>>2],!n)break}e[l>>2]=a,e[a+24>>2]=o}e[a+12>>2]=a,e[a+8>>2]=a;break t}i=e[o+8>>2],e[i+12>>2]=a,e[o+8>>2]=a,e[a+24>>2]=0,e[a+12>>2]=o,e[a+8>>2]=i}if(i=e[2905]+-1|0,e[2905]=i,i)break e;for(a=12044;i=e[a>>2],a=i+8|0,!!i;);e[2905]=-1}}function Go(i,o){var n=0,a=0,c=0;n=0;e:{if(!i||(a=oe(i,0,o,0),c=ne,n=a,(i|o)>>>0<65536))break e;n=c?-1:a}return o=n,i=bn(o),!i|!(H[i+-4|0]&3)||In(i,o),i}function xn(i,o){var n=0,a=0;return i?o>>>0>=4294967232?(e[2896]=48,0):(n=w8(i+-8|0,o>>>0<11?16:o+11&-8),n?n+8|0:(n=bn(o),n?(a=e[i+-4>>2],a=(a&3?-4:-8)+(a&-8)|0,gn(n,i,a>>>0>>0?a:o),Ne(i),n):0)):bn(o)}function w8(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0;h=e[i+4>>2],n=h&3,a=h&-8,f=a+i|0;e:{if(!n){if(n=0,o>>>0<256||a>>>0>=o+4>>>0&&(n=i,a-o>>>0<=e[3017]<<1>>>0))break e;return 0}t:{if(a>>>0>=o>>>0){if(n=a-o|0,n>>>0<16)break t;e[i+4>>2]=h&1|o|2,o=i+o|0,e[o+4>>2]=n|3,e[f+4>>2]=e[f+4>>2]|1,$h(o,n);break t}if(n=0,(f|0)==e[2903]){if(c=a+e[2900]|0,c>>>0<=o>>>0)break e;e[i+4>>2]=h&1|o|2,n=i+o|0,o=c-o|0,e[n+4>>2]=o|1,e[2900]=o,e[2903]=n;break t}if((f|0)==e[2902]){if(c=a+e[2899]|0,c>>>0>>0)break e;n=c-o|0;n:{if(n>>>0>=16){e[i+4>>2]=h&1|o|2,o=i+o|0,e[o+4>>2]=n|1,c=i+c|0,e[c>>2]=n,e[c+4>>2]=e[c+4>>2]&-2;break n}e[i+4>>2]=c|h&1|2,o=i+c|0,e[o+4>>2]=e[o+4>>2]|1,n=0,o=0}e[2902]=o,e[2899]=n;break t}if(l=e[f+4>>2],l&2||(g=a+(l&-8)|0,g>>>0>>0))break e;v=g-o|0;n:{if(l>>>0<=255){if(n=l>>>3|0,l=e[f+8>>2],c=e[f+12>>2],(l|0)==(c|0)){A=11588,C=e[2897]&Ke(-2,n),e[A>>2]=C;break n}e[l+12>>2]=c,e[c+8>>2]=l;break n}m=e[f+24>>2],a=e[f+12>>2];o:{if((f|0)!=(a|0)){n=e[f+8>>2],e[n+12>>2]=a,e[a+8>>2]=n;break o}r:{if(n=f+20|0,l=e[n>>2],l||(n=f+16|0,l=e[n>>2],l))break r;a=0;break o}for(;c=n,a=l,n=a+20|0,l=e[n>>2],!(!l&&(n=a+16|0,l=e[a+16>>2],!l)););e[c>>2]=0}if(!m)break n;c=e[f+28>>2],n=(c<<2)+11892|0;o:{if((f|0)==e[n>>2]){if(e[n>>2]=a,a)break o;A=11592,C=e[2898]&Ke(-2,c),e[A>>2]=C;break n}if(e[((f|0)==e[m+16>>2]?16:20)+m>>2]=a,!a)break n}if(e[a+24>>2]=m,n=e[f+16>>2],n&&(e[a+16>>2]=n,e[n+24>>2]=a),n=e[f+20>>2],!n)break n;e[a+20>>2]=n,e[n+24>>2]=a}if(v>>>0<=15){e[i+4>>2]=h&1|g|2,o=i+g|0,e[o+4>>2]=e[o+4>>2]|1;break t}e[i+4>>2]=h&1|o|2,n=i+o|0,e[n+4>>2]=v|3,o=i+g|0,e[o+4>>2]=e[o+4>>2]|1,$h(n,v)}n=i}return n}function $h(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0;f=i+o|0;e:{t:{if(n=e[i+4>>2],n&1)break t;if(!(n&3))break e;if(n=e[i>>2],o=n+o|0,i=i-n|0,(i|0)!=e[2902]){if(n>>>0<=255){if(c=n>>>3|0,n=e[i+8>>2],a=e[i+12>>2],(a|0)==(n|0)){g=11588,m=e[2897]&Ke(-2,c),e[g>>2]=m;break t}e[n+12>>2]=a,e[a+8>>2]=n;break t}h=e[i+24>>2],n=e[i+12>>2];n:{if((n|0)!=(i|0)){a=e[i+8>>2],e[a+12>>2]=n,e[n+8>>2]=a;break n}o:{if(a=i+20|0,c=e[a>>2],c||(a=i+16|0,c=e[a>>2],c))break o;n=0;break n}for(;l=a,n=c,a=n+20|0,c=e[a>>2],!(!c&&(a=n+16|0,c=e[n+16>>2],!c)););e[l>>2]=0}if(!h)break t;a=e[i+28>>2],c=(a<<2)+11892|0;n:{if(e[c>>2]==(i|0)){if(e[c>>2]=n,n)break n;g=11592,m=e[2898]&Ke(-2,a),e[g>>2]=m;break t}if(e[h+(e[h+16>>2]==(i|0)?16:20)>>2]=n,!n)break t}if(e[n+24>>2]=h,a=e[i+16>>2],a&&(e[n+16>>2]=a,e[a+24>>2]=n),a=e[i+20>>2],!a)break t;e[n+20>>2]=a,e[a+24>>2]=n;break t}if(n=e[f+4>>2],(n&3)!=3)break t;e[2899]=o,e[f+4>>2]=n&-2,e[i+4>>2]=o|1,e[f>>2]=o;return}n=e[f+4>>2];t:{if(!(n&2)){if((f|0)==e[2903]){if(e[2903]=i,o=e[2900]+o|0,e[2900]=o,e[i+4>>2]=o|1,e[2902]!=(i|0))break e;e[2899]=0,e[2902]=0;return}if((f|0)==e[2902]){e[2902]=i,o=e[2899]+o|0,e[2899]=o,e[i+4>>2]=o|1,e[i+o>>2]=o;return}o=(n&-8)+o|0;n:{if(n>>>0<=255){if(c=n>>>3|0,n=e[f+8>>2],a=e[f+12>>2],(n|0)==(a|0)){g=11588,m=e[2897]&Ke(-2,c),e[g>>2]=m;break n}e[n+12>>2]=a,e[a+8>>2]=n;break n}h=e[f+24>>2],n=e[f+12>>2];o:{if((f|0)!=(n|0)){a=e[f+8>>2],e[a+12>>2]=n,e[n+8>>2]=a;break o}r:{if(a=f+20|0,c=e[a>>2],c||(a=f+16|0,c=e[a>>2],c))break r;n=0;break o}for(;l=a,n=c,a=n+20|0,c=e[a>>2],!(!c&&(a=n+16|0,c=e[n+16>>2],!c)););e[l>>2]=0}if(!h)break n;a=e[f+28>>2],c=(a<<2)+11892|0;o:{if((f|0)==e[c>>2]){if(e[c>>2]=n,n)break o;g=11592,m=e[2898]&Ke(-2,a),e[g>>2]=m;break n}if(e[h+((f|0)==e[h+16>>2]?16:20)>>2]=n,!n)break n}if(e[n+24>>2]=h,a=e[f+16>>2],a&&(e[n+16>>2]=a,e[a+24>>2]=n),a=e[f+20>>2],!a)break n;e[n+20>>2]=a,e[a+24>>2]=n}if(e[i+4>>2]=o|1,e[i+o>>2]=o,e[2902]!=(i|0))break t;e[2899]=o;return}e[f+4>>2]=n&-2,e[i+4>>2]=o|1,e[i+o>>2]=o}if(o>>>0<=255){n=o>>>3|0,o=(n<<3)+11628|0,a=e[2897],n=1<>2]}e[o+8>>2]=i,e[n+12>>2]=i,e[i+12>>2]=o,e[i+8>>2]=n;return}e[i+16>>2]=0,e[i+20>>2]=0,a=i,c=o>>>8|0,n=0;t:{if(!c||(n=31,o>>>0>16777215))break t;l=c+1048320>>>16&8,c=c<>>16&4,f=c<>>16&2,n=(f<>>15|0)-(c|(n|l))|0,n=(n<<1|o>>>n+21&1)+28|0}e[a+28>>2]=n,c=(n<<2)+11892|0;t:{a=e[2898],l=1<>2]=i;break n}for(a=o<<((n|0)==31?0:25-(n>>>1|0)|0),n=e[c>>2];;){if(c=n,(e[n+4>>2]&-8)==(o|0))break t;if(n=a>>>29|0,a=a<<1,l=(c+(n&4)|0)+16|0,n=e[l>>2],!n)break}e[l>>2]=i}e[i+24>>2]=c,e[i+12>>2]=i,e[i+8>>2]=i;return}o=e[c+8>>2],e[o+12>>2]=i,e[c+8>>2]=i,e[i+24>>2]=0,e[i+12>>2]=c,e[i+8>>2]=o}}function A8(i,o){var n=0;n=(o|0)!=0;e:{t:{n:{if(!o|!(i&3))break n;for(;;){if(H[i|0]==79)break t;if(i=i+1|0,o=o+-1|0,n=(o|0)!=0,!o)break n;if(!(i&3))break}}if(!n)break e}t:{if(H[i|0]==79|o>>>0<4)break t;for(;;){if(n=e[i>>2]^1330597711,(n^-1)&n+-16843009&-2139062144)break t;if(i=i+4|0,o=o+-4|0,!(o>>>0>3))break}}if(!o)break e;for(;;){if(H[i|0]==79)return i;if(i=i+1|0,o=o+-1|0,!o)break}}return 0}function em(i,o){var n=0,a=0,c=0;if(qe(+i),n=Oe(1)|0,a=Oe(0)|0,c=n,n=n>>>20&2047,(n|0)!=2047){if(!n)return n=o,i==0?o=0:(i=em(i*18446744073709552e3,o),o=e[o>>2]+-64|0),e[n>>2]=o,i;e[o>>2]=n+-1022,ot(0,a|0),ot(1,c&-2146435073|1071644672),i=+rt()}return i}function yr(i,o,n,a,c,f){var l=0,h=0,g=0,m=0;e:{if(f&64){a=o,c=f+-64|0,o=c&31,32<=(c&63)>>>0?(c=a<>>32-o|n<>>0?(h=l<>>32-a|c<>>0?(f=0,a=a>>>c|0):(f=a>>>c|0,a=((1<>>c),a=m|a,c=f|h,f=o,o=g&31,32<=(g&63)>>>0?(h=f<>>32-o|n<>2]=o,e[i+4>>2]=n,e[i+8>>2]=a,e[i+12>>2]=c}function xl(i,o,n,a,c,f){var l=0,h=0,g=0,m=0;e:{if(f&64){n=f+-64|0,o=n&31,32<=(n&63)>>>0?(n=0,o=c>>>o|0):(n=c>>>o|0,o=((1<>>o),a=0,c=0;break e}if(!f)break e;h=c,g=a,m=64-f|0,l=m&31,32<=(m&63)>>>0?(h=g<>>32-l|h<>>0?(l=0,o=n>>>o|0):(l=n>>>o|0,o=((1<>>o),o=m|o,n=l|h,l=a,a=f&31,32<=(f&63)>>>0?(h=0,a=c>>>a|0):(h=c>>>a|0,a=((1<>>a),c=h}e[i>>2]=o,e[i+4>>2]=n,e[i+8>>2]=a,e[i+12>>2]=c}function C8(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0;l=be-32|0,be=l,c=a&2147483647,g=c,c=c+-1006698496|0,h=n,f=n,n>>>0<0&&(c=c+1|0),m=f,f=c,c=g+-1140785152|0,v=h,h>>>0<0&&(c=c+1|0);e:{if((c|0)==(f|0)&m>>>0>>0|f>>>0>>0){if(c=a<<4|n>>>28,n=n<<4|o>>>28,o=o&268435455,h=o,(o|0)==134217728&i>>>0>=1|o>>>0>134217728){c=c+1073741824|0,i=n+1|0,i>>>0<1&&(c=c+1|0),f=i;break e}if(f=n,c=c-((n>>>0<0)+-1073741824|0)|0,i|h^134217728)break e;i=f+(f&1)|0,i>>>0>>0&&(c=c+1|0),f=i;break e}if(!(!h&(g|0)==2147418112?!(i|o):(g|0)==2147418112&h>>>0<0|g>>>0<2147418112)){c=a<<4|n>>>28,f=n<<4|o>>>28,c=c&524287|2146959360;break e}if(f=0,c=2146435072,g>>>0>1140785151||(c=0,h=g>>>16|0,h>>>0<15249))break e;if(c=a&65535|65536,yr(l+16|0,i,o,n,c,h+-15233|0),xl(l,i,o,n,c,15361-h|0),n=e[l+4>>2],i=e[l+8>>2],c=e[l+12>>2]<<4|i>>>28,f=i<<4|n>>>28,i=n&268435455,n=i,o=e[l>>2]|((e[l+16>>2]|e[l+24>>2])!=0|(e[l+20>>2]|e[l+28>>2])!=0),(i|0)==134217728&o>>>0>=1|i>>>0>134217728){i=f+1|0,i>>>0<1&&(c=c+1|0),f=i;break e}if(o|n^134217728)break e;i=f+(f&1)|0,i>>>0>>0&&(c=c+1|0),f=i}return be=l+32|0,ot(0,f|0),ot(1,a&-2147483648|c),+rt()}function tm(i,o){var n=0;if(o)for(;n=H[(H[i|0]^n)+1024|0],i=i+1|0,o=o+-1|0,!!o;);return n}function x8(i,o){var n=0,a=0;if(o>>>0>7)for(;a=n,n=H[i|0]|H[i+1|0]<<8,n=a^(n<<8&16711680|n<<24)>>>16,n=$t[(H[i+7|0]<<1)+1280>>1]^($t[((H[i+6|0]<<1)+1280|0)+512>>1]^($t[(H[i+5|0]<<1)+2304>>1]^($t[(H[i+4|0]<<1)+2816>>1]^($t[(H[i+3|0]<<1)+3328>>1]^($t[(H[i+2|0]<<1)+3840>>1]^($t[((n&255)<<1)+4352>>1]^$t[(n>>>7&510)+4864>>1])))))),i=i+8|0,o=o+-8|0,o>>>0>7;);if(o)for(;n=$t[((H[i|0]^(n&65280)>>>8)<<1)+1280>>1]^n<<8,i=i+1|0,o=o+-1|0,!!o;);return n&65535}function nm(i,o,n){var a=0;if(o>>>0>=2)for(;a=n,n=e[i>>2],a=a^n>>>16,a=$t[((a&255)<<1)+4352>>1]^$t[(a>>>7&510)+4864>>1]^$t[(n>>>7&510)+3840>>1]^$t[((n&255)<<1)+3328>>1],n=e[i+4>>2],n=a^$t[(n>>>23&510)+2816>>1]^$t[(n>>>15&510)+2304>>1]^$t[((n>>>7&510)+1280|0)+512>>1]^$t[((n&255)<<1)+1280>>1],i=i+8|0,o=o+-2|0,o>>>0>1;);return o&&(i=e[i>>2],o=i>>>16^n,n=$t[((o&255)<<1)+2304>>1]^$t[(o>>>7&510)+2816>>1]^$t[((i>>>7&510)+1280|0)+512>>1]^$t[((i&255)<<1)+1280>>1]),n&65535}function Qo(i,o,n){var a=0;e:{if((i|0)==(o|0))break e;if((o-i|0)-n>>>0<=0-(n<<1)>>>0){gn(i,o,n);return}a=(i^o)&3;t:{n:{if(i>>>0>>0){if(a)break t;if(!(i&3))break n;for(;;){if(!n)break e;if(K[i|0]=H[o|0],o=o+1|0,n=n+-1|0,i=i+1|0,!(i&3))break}break n}o:{if(a)break o;if(i+n&3)for(;;){if(!n)break e;if(n=n+-1|0,a=n+i|0,K[a|0]=H[o+n|0],!(a&3))break}if(n>>>0<=3)break o;for(;n=n+-4|0,e[n+i>>2]=e[o+n>>2],n>>>0>3;);}if(!n)break e;for(;n=n+-1|0,K[n+i|0]=H[o+n|0],!!n;);break e}if(n>>>0<=3)break t;for(;e[i>>2]=e[o>>2],o=o+4|0,i=i+4|0,n=n+-4|0,n>>>0>3;);}if(!n)break e;for(;K[i|0]=H[o|0],i=i+1|0,o=o+1|0,n=n+-1|0,!!n;);}}function Ad(i){var o=0;o=e[i>>2],o&&Ne(o),Ne(i)}function S8(i){var o=0;o=e[i>>2],o&&Ne(o),e[i+36>>2]=0,e[i+40>>2]=0,e[i>>2]=0,e[i+4>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0}function E8(i,o){var n=0;return e[i+8>>2]=0,e[i+12>>2]=0,e[i+4>>2]=2048,e[i+16>>2]=0,e[i+20>>2]=0,n=bn(8192),e[i>>2]=n,n?(e[i+40>>2]=o,e[i+36>>2]=7,1):0}function P8(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0;f=e[i+16>>2],n=e[i+28>>2];e:{if(f>>>0<=n>>>0){c=n;break e}if(o=e[i+32>>2],!o){c=n;break e}if(c=n+1|0,e[i+28>>2]=c,a=e[i+24>>2],o>>>0<=31){for(n=e[e[i>>2]+(n<<2)>>2];a=$t[((n>>>24-o&255^a>>>8)<<1)+1280>>1]^a<<8&65280,h=o>>>0<24,l=o+8|0,o=l,!!h;);e[i+32>>2]=l}e[i+32>>2]=0,e[i+24>>2]=a}o=nm(e[i>>2]+(c<<2)|0,f-c|0,$t[i+24>>1]),e[i+28>>2]=0,e[i+24>>2]=o,n=e[i+20>>2];e:{if(!n||(a=e[i+32>>2],a>>>0>=n>>>0))break e;for(c=e[e[i>>2]+(e[i+16>>2]<<2)>>2];o=$t[((c>>>24-a&255^o>>>8)<<1)+1280>>1]^o<<8&65280,a=a+8|0,a>>>0>>0;);e[i+32>>2]=a,e[i+24>>2]=o}return o}function Cd(i){return!(H[i+20|0]&7)}function rm(i){return 8-(e[i+20>>2]&7)|0}function Je(i,o,n){var a=0,c=0,f=0;e:{if(n){t:{for(;;){if(f=e[i+8>>2],c=e[i+16>>2],a=e[i+20>>2],((f-c<<5)+(e[i+12>>2]<<3)|0)-a>>>0>=n>>>0)break t;if(!Sl(i))break}return 0}if(f>>>0>c>>>0){if(a){if(f=e[i>>2],c=e[f+(c<<2)>>2]&-1>>>a,a=32-a|0,a>>>0>n>>>0){e[o>>2]=c>>>a-n,e[i+20>>2]=e[i+20>>2]+n;break e}if(e[o>>2]=c,e[i+20>>2]=0,e[i+16>>2]=e[i+16>>2]+1,n=n-a|0,!n)break e;return a=e[o>>2]<>2]=a,e[o>>2]=a|e[(e[i+16>>2]<<2)+f>>2]>>>32-n,e[i+20>>2]=n,1}if(a=e[e[i>>2]+(c<<2)>>2],n>>>0<=31){e[o>>2]=a>>>32-n,e[i+20>>2]=n;break e}return e[o>>2]=a,e[i+16>>2]=e[i+16>>2]+1,1}if(c=e[e[i>>2]+(c<<2)>>2],a){e[o>>2]=(c&-1>>>a)>>>32-(n+a|0),e[i+20>>2]=e[i+20>>2]+n;break e}e[o>>2]=c>>>32-n,e[i+20>>2]=e[i+20>>2]+n;break e}e[o>>2]=0}return 1}function Sl(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0;l=be-16|0,be=l,f=e[i+16>>2];e:{if(!f){n=e[i+8>>2];break e}o=e[i+28>>2];t:{if(f>>>0<=o>>>0){a=o;break t}if(n=e[i+32>>2],!n){a=o;break t}if(a=o+1|0,e[i+28>>2]=a,c=e[i+24>>2],n>>>0<=31){for(o=e[e[i>>2]+(o<<2)>>2];c=$t[((o>>>24-n&255^c>>>8)<<1)+1280>>1]^c<<8&65280,h=n>>>0<24,g=n+8|0,n=g,!!h;);e[i+32>>2]=g}e[i+32>>2]=0,e[i+24>>2]=c}o=nm(e[i>>2]+(a<<2)|0,f-a|0,$t[i+24>>1]),e[i+28>>2]=0,e[i+24>>2]=o,a=e[i>>2],o=e[i+16>>2],Qo(a,a+(o<<2)|0,(e[i+8>>2]-o|0)+(e[i+12>>2]!=0)<<2),e[i+16>>2]=0,n=e[i+8>>2]-o|0,e[i+8>>2]=n}o=e[i+12>>2],a=(e[i+4>>2]-n<<2)-o|0,e[l+12>>2]=a,c=0;e:{if(!a||(a=e[i>>2]+(n<<2)|0,n=a+o|0,o&&(o=e[a>>2],e[a>>2]=o<<24|o<<8&16711680|(o>>>8&65280|o>>>24)),!Le[e[i+36>>2]](n,l+12|0,e[i+40>>2])))break e;if(f=e[l+12>>2],n=e[i+12>>2],c=e[i+8>>2],o=c<<2,a=(f+(n+o|0)|0)+3>>>2|0,g=i,c>>>0>>0){for(n=e[i>>2];h=n+(c<<2)|0,o=e[h>>2],e[h>>2]=o<<8&16711680|o<<24|(o>>>8&65280|o>>>24),c=c+1|0,(a|0)!=(c|0););n=e[i+12>>2],o=e[i+8>>2]<<2}o=o+(n+f|0)|0,e[g+12>>2]=o&3,e[i+8>>2]=o>>>2,c=1}return be=l+16|0,c}function Bi(i,o,n){var a=0,c=0;a=be-16|0,be=a,c=0;e:{if(!Je(i,a+12|0,n))break e;i=1<>2]=(i^e[a+12>>2])-i,c=1}return i=c,be=a+16|0,i}function ji(i,o,n){var a=0,c=0,f=0,l=0;a=be-16|0,be=a,c=o,f=o;e:{t:{if(n>>>0>=33){if(!Je(i,a+12|0,n+-32|0)||!Je(i,a+8|0,32))break e;i=e[a+12>>2],n=0,e[o>>2]=n,e[o+4>>2]=i,o=e[a+8>>2]|n;break t}if(!Je(i,a+8|0,n))break e;i=0,o=e[a+8>>2]}e[f>>2]=o,e[c+4>>2]=i,l=1}return be=a+16|0,l}function xd(i,o){var n=0,a=0,c=0;n=be-16|0,be=n,e[n+8>>2]=0;e:{if(!Je(i,n+8|0,8)||!Je(i,n+12|0,8)||(a=e[n+8>>2]|e[n+12>>2]<<8,e[n+8>>2]=a,!Je(i,n+12|0,8))||(a=a|e[n+12>>2]<<16,e[n+8>>2]=a,!Je(i,n+12|0,8)))break e;i=a|e[n+12>>2]<<24,e[n+8>>2]=i,e[o>>2]=i,c=1}return be=n+16|0,c}function Sd(i,o){var n=0,a=0,c=0,f=0;a=be-16|0,be=a,c=1;e:{if(!o)break e;n=e[i+20>>2]&7;t:{if(n){if(n=8-n|0,n=n>>>0>>0?n:o,!Je(i,a+8|0,n))break t;o=o-n|0}if(n=o>>>3|0,n){for(;;){n:{if(!e[i+20>>2]){if(n>>>0>3){for(;;){f=e[i+16>>2];o:{if(f>>>0>2]){e[i+16>>2]=f+1,n=n+-4|0;break o}if(!Sl(i))break t}if(!(n>>>0>3))break}if(!n)break n}for(;;){if(!Je(i,a+12|0,8))break t;if(n=n+-1|0,!n)break}break n}if(!Je(i,a+12|0,8))break t;if(n=n+-1|0,n)continue}break}o=o&7}if(!o||Je(i,a+8|0,o))break e}c=0}return be=a+16|0,c}function os(i,o){var n=0,a=0,c=0;n=be-16|0,be=n,a=1;e:{if(!o)break e;for(;;){t:{if(!e[i+20>>2]){n:{if(o>>>0<4)break n;for(;;){c=e[i+16>>2];o:{if(c>>>0>2]){e[i+16>>2]=c+1,o=o+-4|0;break o}if(!Sl(i))break t}if(!(o>>>0>3))break}if(o)break n;break e}for(;;){if(!Je(i,n+12|0,8))break t;if(o=o+-1|0,!o)break}break e}if(!Je(i,n+12|0,8))break t;if(o=o+-1|0,o)continue;break e}break}a=0}return be=n+16|0,a}function No(i,o,n){var a=0,c=0;c=be-16|0,be=c;e:{if(!n){a=1;break e}for(;;){if(!e[i+20>>2]){t:{if(n>>>0<4)break t;for(;;){n:{if(a=e[i+16>>2],a>>>0>2]){e[i+16>>2]=a+1,a=e[e[i>>2]+(a<<2)>>2],a=a<<24|a<<8&16711680|(a>>>8&65280|a>>>24),K[o|0]=a,K[o+1|0]=a>>>8,K[o+2|0]=a>>>16,K[o+3|0]=a>>>24,n=n+-4|0,o=o+4|0;break n}if(Sl(i))break n;a=0;break e}if(!(n>>>0>3))break}if(n)break t;a=1;break e}for(;;){if(!Je(i,c+12|0,8)){a=0;break e}if(K[o|0]=e[c+12>>2],a=1,o=o+1|0,n=n+-1|0,!n)break}break e}if(!Je(i,c+12|0,8)){a=0;break e}if(K[o|0]=e[c+12>>2],a=1,o=o+1|0,n=n+-1|0,!n)break}}return be=c+16|0,a}function Ed(i,o){var n=0,a=0,c=0;e[o>>2]=0;e:{for(;;){a=e[i+16>>2];t:{if(a>>>0>=ze[i+8>>2]){n=e[i+20>>2];break t}for(n=e[i+20>>2],c=e[i>>2];;){if(a=e[c+(a<<2)>>2]<>2],o=Qt(a),e[n>>2]=c+o,n=(o+e[i+20>>2]|0)+1|0,e[i+20>>2]=n,o=1,n>>>0<32)break e;return e[i+20>>2]=0,e[i+16>>2]=e[i+16>>2]+1,1}if(e[o>>2]=(e[o>>2]-n|0)+32,n=0,e[i+20>>2]=0,a=e[i+16>>2]+1|0,e[i+16>>2]=a,!(a>>>0>2]))break}}if(c=e[i+12>>2]<<3,c>>>0>n>>>0){if(a=(e[e[i>>2]+(a<<2)>>2]&-1<<32-c)<>2],o=Qt(a),e[n>>2]=c+o,e[i+20>>2]=(o+e[i+20>>2]|0)+1,1;e[o>>2]=e[o>>2]+(c-n|0),e[i+20>>2]=c}if(!Sl(i))break}o=0}return o}function om(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0;l=be-16|0,be=l,C=(n<<2)+o|0;e:{if(!a){if(I=1,(n|0)<1)break e;for(;;){if(!Ed(i,l+8|0)){I=0;break e}if(n=e[l+8>>2],e[o>>2]=n>>>1^0-(n&1),o=o+4|0,!(o>>>0>>0))break}break e}t:{n:{if(c=e[i+16>>2],v=e[i+8>>2],c>>>0>=v>>>0)break n;A=e[i>>2],E=e[i+20>>2],m=e[A+(c<<2)>>2]<>>0>>0)for(T=32-a|0;;){n=c,h=f;a:{if(m){h=Qt(m),g=h;break a}for(;;){if(n=n+1|0,n>>>0>=v>>>0)break i;if(m=e[(n<<2)+A>>2],g=Qt(m),h=g+h|0,!!m)break}}c=m<>>T|0,e[l+8>>2]=h,f=(h^-1)+f&31;a:{if(f>>>0>=a>>>0){m=c<>>0>=v>>>0)break r;n=e[(c<<2)+A>>2],f=f+T|0,m=n<<32-f,g=n>>>f|g}if(e[l+12>>2]=g,n=h<>2]=n>>>1^0-(n&1),o=o+4|0,!(o>>>0>>0))break}o=c>>>0>>0,e[i+16>>2]=(o&!f)+c,e[i+20>>2]=32-(f||o<<5),I=1;break e}e[i+20>>2]=0,n=c+1|0,e[i+16>>2]=v>>>0>n>>>0?v:n;break n}if(!Ed(i,l+8|0))break e;h=e[l+8>>2]+h|0,e[l+8>>2]=h,g=0,f=0;break o}e[i+16>>2]=c,e[i+20>>2]=0}if(!Je(i,l+12|0,a-f|0))break e;if(n=h<>2]|g,e[l+12>>2]=c,h=0,n=n|c,e[o>>2]=n>>>1^0-(n&1),A=e[i>>2],c=e[i+16>>2],E=e[i+20>>2],m=e[A+(c<<2)>>2]<>2],o=o+4|0,c>>>0>>0|o>>>0>=C>>>0)break t}n=1;continue}n=0}}return be=l+16|0,I}function M8(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0;h=be-16|0,be=h;e:{if(!Je(i,h+12|0,8))break e;c=e[h+12>>2],n&&(f=e[a>>2],e[a>>2]=f+1,K[n+f|0]=c);t:{n:{o:{r:{if(!(c&128))break r;i:{if(!(!(c&192)|c&32)){l=31,f=1;break i}if(!(!(c&224)|c&16)){l=15,f=2;break i}if(!(!(c&240)|c&8)){l=7,f=3;break i}if(c&248&&(l=3,f=4,!(c&4)))break i;if(!(c&252)|c&2)break o;l=1,f=5}if(c=c&l,!n)for(;;){if(!Je(i,h+12|0,8))break e;if(n=e[h+12>>2],(n&192)!=128)break n;if(c=n&63|c<<6,f=f+-1|0,!f)break r}for(;;){if(!Je(i,h+12|0,8))break e;if(l=e[h+12>>2],g=e[a>>2],e[a>>2]=g+1,K[n+g|0]=l,(l&192)!=128)break n;if(c=l&63|c<<6,f=f+-1|0,!f)break}}e[o>>2]=c;break t}e[o>>2]=-1;break t}e[o>>2]=-1}m=1}return be=h+16|0,m}function N8(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0;h=be-16|0,be=h;e:{if(!Je(i,h+12|0,8))break e;c=e[h+12>>2],n&&(l=e[a>>2],e[a>>2]=l+1,K[n+l|0]=c);t:{n:{o:{r:{if(c&128){if(!(!(c&192)|c&32)){c=c&31,f=1;break r}if(!(!(c&224)|c&16)){c=c&15,f=2;break r}if(!(!(c&240)|c&8)){c=c&7,f=3;break r}if(!(!(c&248)|c&4)){c=c&3,f=4;break r}if(!(!(c&252)|c&2)){c=c&1,f=5;break r}if(f=1,!(!(c&254)|c&1)){f=6,c=0;break r}e[o>>2]=-1,e[o+4>>2]=-1;break e}l=0;break o}if(l=0,!n)for(;;){if(!Je(i,h+12|0,8)){f=0;break e}if(n=e[h+12>>2],(n&192)!=128)break n;if(n=n&63,l=l<<6|c>>>26,c=n|c<<6,f=f+-1|0,!f)break o}for(;;){if(!Je(i,h+12|0,8)){f=0;break e}if(g=e[h+12>>2],m=e[a>>2],e[a>>2]=m+1,K[n+m|0]=g,(g&192)!=128)break n;if(l=l<<6|c>>>26,c=g&63|c<<6,f=f+-1|0,!f)break}}e[o>>2]=c,e[o+4>>2]=l;break t}e[o>>2]=-1,e[o+4>>2]=-1}f=1}return be=h+16|0,f}function I8(i,o){var n=0,a=0,c=0,f=0,l=0;n=be-208|0,be=n,e[n+8>>2]=1,e[n+12>>2]=0;e:{if(f=ie(o,24),!f)break e;for(e[n+16>>2]=24,e[n+20>>2]=24,o=24,c=o,a=2;l=c+24|0,c=o,o=o+l|0,e[(n+16|0)+(a<<2)>>2]=o,a=a+1|0,o>>>0>>0;);c=(i+f|0)+-24|0;t:{if(c>>>0<=i>>>0){a=1,o=1;break t}for(a=1,o=1;;){n:{if((a&3)==3){Pd(i,o,n+16|0),ou(n+8|0,2),o=o+2|0;break n}a=o+-1|0;o:{if(ze[(n+16|0)+(a<<2)>>2]>=c-i>>>0){iu(i,n+8|0,o,0,n+16|0);break o}Pd(i,o,n+16|0)}if((o|0)==1){au(n+8|0,1),o=0;break n}au(n+8|0,a),o=1}if(a=e[n+8>>2]|1,e[n+8>>2]=a,i=i+24|0,!(i>>>0>>0))break}}for(iu(i,n+8|0,o,0,n+16|0);;){t:{n:{o:{if(!((o|0)!=1|(a|0)!=1)){if(e[n+12>>2])break o;break e}if((o|0)>1)break n}c=im(n+8|0),ou(n+8|0,c),a=e[n+8>>2],o=o+c|0;break t}au(n+8|0,2),e[n+8>>2]=e[n+8>>2]^7,ou(n+8|0,1),f=i+-24|0,c=o+-2|0,iu(f-e[(n+16|0)+(c<<2)>>2]|0,n+8|0,o+-1|0,1,n+16|0),au(n+8|0,1),a=e[n+8>>2]|1,e[n+8>>2]=a,iu(f,n+8|0,c,1,n+16|0),o=c}i=i+-24|0}}be=n+208|0}function Pd(i,o,n){var a=0,c=0,f=0,l=0,h=0;a=be-240|0,be=a,e[a>>2]=i,l=1;e:{if((o|0)<2)break e;for(c=i;;){if(f=c+-24|0,h=o+-2|0,c=f-e[(h<<2)+n>>2]|0,(Le[1](i,c)|0)>=0&&(Le[1](i,f)|0)>-1)break e;i=(l<<2)+a|0;t:{if((Le[1](c,f)|0)>=0){e[i>>2]=c,h=o+-1|0;break t}e[i>>2]=f,c=f}if(l=l+1|0,(h|0)<2)break e;i=e[a>>2],o=h}}am(a,l),be=a+240|0}function ou(i,o){var n=0,a=0,c=0;c=i;e:{if(o>>>0<=31){n=e[i>>2],a=e[i+4>>2];break e}n=e[i+4>>2],e[i+4>>2]=0,e[i>>2]=n,o=o+-32|0,a=0}e[c+4>>2]=a>>>o,e[i>>2]=a<<32-o|n>>>o}function iu(i,o,n,a,c){var f=0,l=0,h=0,g=0;f=be-240|0,be=f,l=e[o>>2],e[f+232>>2]=l,o=e[o+4>>2],e[f>>2]=i,e[f+236>>2]=o,h=1;e:{t:{n:{o:{if(!o&&(l|0)==1||(l=i-e[(n<<2)+c>>2]|0,(Le[1](l,i)|0)<1))break o;for(g=!a;;){r:{if(o=l,!(!g|(n|0)<2)&&(a=e[((n<<2)+c|0)+-8>>2],l=i+-24|0,(Le[1](l,o)|0)>-1||(Le[1](l-a|0,o)|0)>-1))break r;if(e[(h<<2)+f>>2]=o,i=im(f+232|0),ou(f+232|0,i),h=h+1|0,n=i+n|0,!e[f+236>>2]&&e[f+232>>2]==1)break t;if(a=0,g=1,i=o,l=o-e[(n<<2)+c>>2]|0,(Le[1](l,e[f>>2])|0)>0)continue;break n}break}o=i;break t}o=i}if(a)break e}am(f,h),Pd(o,n,c)}be=f+240|0}function au(i,o){var n=0,a=0,c=0;c=i;e:{if(o>>>0<=31){n=e[i+4>>2],a=e[i>>2];break e}n=e[i>>2],e[i+4>>2]=n,e[i>>2]=0,o=o+-32|0,a=0}e[c>>2]=a<>2]=n<>>32-o}function im(i){var o=0;return o=Gd(e[i>>2]+-1|0),o||(i=Gd(e[i+4>>2]),i?i+32|0:0)}function am(i,o){var n=0,a=0,c=0,f=0,l=0,h=0;a=24,c=be-256|0,be=c;e:{if((o|0)<2)break e;for(h=(o<<2)+i|0,e[h>>2]=c,n=c;;){for(f=a>>>0<256?a:256,gn(n,e[i>>2],f),n=0;l=(n<<2)+i|0,n=n+1|0,gn(e[l>>2],e[(n<<2)+i>>2],f),e[l>>2]=e[l>>2]+f,(o|0)!=(n|0););if(a=a-f|0,!a)break e;n=e[h>>2]}}be=c+256|0}function R8(i){return i+-1>>>0<=655349?!((i>>>0)%10)|(!((i>>>0)%1e3)|i>>>0<65536):0}function T8(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0;if(a=e[i>>2],!a)return 1;for(l=e[i+4>>2],i=0,c=1;;){if(h=n,f=o,o=ie(i,24)+l|0,n=e[o>>2],o=e[o+4>>2],!((n|0)==-1&(o|0)==-1|c|((o|0)==(f|0)&n>>>0>h>>>0|o>>>0>f>>>0)))return 0;if(c=0,i=i+1|0,!(i>>>0>>0))break}return 1}function sm(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0;e:{if(n=e[i>>2],!n||(I8(e[i+4>>2],n),!e[i>>2]))break e;if(n=1,o=e[i>>2],o>>>0>1)for(l=1;;){c=e[i+4>>2],a=c+ie(l,24)|0,f=e[a>>2],h=e[a+4>>2],g=h;t:{if((f|0)!=-1|(h|0)!=-1&&(h=f,f=(c+ie(n,24)|0)+-24|0,(h|0)==e[f>>2]&e[f+4>>2]==(g|0)))break t;f=e[a+4>>2],o=c+ie(n,24)|0,e[o>>2]=e[a>>2],e[o+4>>2]=f,c=e[a+20>>2],e[o+16>>2]=e[a+16>>2],e[o+20>>2]=c,c=e[a+12>>2],e[o+8>>2]=e[a+8>>2],e[o+12>>2]=c,n=n+1|0,o=e[i>>2]}if(l=l+1|0,!(l>>>0>>0))break}if(n>>>0>=o>>>0)break e;for(a=e[i+4>>2];i=a+ie(n,24)|0,e[i+16>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0,e[i>>2]=-1,e[i+4>>2]=-1,n=n+1|0,(o|0)!=(n|0););}}function F8(i,o){i=i|0,o=o|0;var n=0,a=0;return n=e[i+4>>2],a=e[o+4>>2],i=e[i>>2],o=e[o>>2],((i|0)==(o|0)&(n|0)==(a|0)?0:(n|0)==(a|0)&i>>>0>>0|n>>>0>>0?-1:1)|0}function L8(i){var o=0,n=0,a=0,c=0;n=1;e:{o=H[i|0];t:{if(!(o&128))break t;if(!((o&224)!=192|(H[i+1|0]&192)!=128))return((o&254)!=192)<<1;n:{if((o&240)!=224||(a=H[i+1|0],(a&192)!=128)||(c=H[i+2|0],(c&192)!=128))break n;if(n=0,(a&224)==128&&(o|0)==224)break t;o:{r:switch(o+-237|0){case 0:if((a&224)!=160)break o;break t;case 2:break r;default:break o}if((a|0)!=191)break o;if((c&254)==190)break t}return 3}n:{if((o&248)!=240||(n=H[i+1|0],(n&192)!=128|(H[i+2|0]&192)!=128))break n;if((H[i+3|0]&192)==128)break e}n:{if((o&252)!=248||(n=H[i+1|0],(n&192)!=128|(H[i+2|0]&192)!=128|((H[i+3|0]&192)!=128|(H[i+4|0]&192)!=128)))break n;return(o|0)==248&&(n&248)==128?0:5}if(n=0,(o&254)!=252||(a=H[i+1|0],(a&192)!=128|(H[i+2|0]&192)!=128|((H[i+3|0]&192)!=128|(H[i+4|0]&192)!=128))||(H[i+5|0]&192)!=128)break t;n=(o|0)==252&&(a&252)==128?0:6}return n}return(o|0)==240?((n&240)!=128)<<2:4}function D8(i,o){var n=0,a=0,c=0,f=0,l=0,h=0;e:{t:{n:{o:{r:{i:{a:{if(o){if(o=e[i+140>>2],a=o,n=e[i+136>>2],!o&n>>>0<=88199|o>>>0<0){i=0;break e}if(Qd(n,a)|ne){i=0;break e}if(a=e[i+148>>2],!a)break t;if(H[(e[i+152>>2]+(a<<5)|0)+-24|0]==170)break a;i=0;break e}if(n=e[i+148>>2],!n)break t;for(c=n+-1|0,l=e[i+152>>2],o=0;;){if(i=l+(o<<5)|0,!H[i+8|0])break n;a=H[i+23|0];s:{l:{if(o>>>0>>0){if(!a)break o;if(H[e[i+24>>2]+8|0]>1)break r;break l}if(!a)break s}for(h=i+24|0,i=0;;){if(i&&(f=e[h>>2]+(i<<4)|0,(H[f+-8|0]+1|0)!=H[f+8|0]))break i;if(i=i+1|0,!(i>>>0>>0))break}}if(i=1,o=o+1|0,(n|0)==(o|0))break}break e}for(l=a+-1|0,h=e[i+152>>2],o=0;;){if(i=h+(o<<5)|0,n=H[i+8|0],!n)break n;if(!((n|0)==170|n>>>0<100)){i=0;break e}if(Qd(e[i>>2],e[i+4>>2])|ne){i=0;break e}n=H[i+23|0];a:{s:{if(o>>>0>>0){if(!n)break o;if(H[e[i+24>>2]+8|0]<2)break s;break r}if(!n)break a}for(f=e[i+24>>2],i=0;;){if(c=f+(i<<4)|0,Qd(e[c>>2],e[c+4>>2])|ne){i=0;break e}if(H[c+8|0]!=(H[c+-8|0]+1|0)&&i)break i;if(i=i+1|0,!(i>>>0>>0))break}}if(i=1,o=o+1|0,(a|0)==(o|0))break}break e}i=0;break e}i=0;break e}i=0;break e}i=0;break e}i=0}return i}function O8(i){var o=0,n=0;e:{t:{if(n=e[i+4>>2],o=H[n|0],!o)break t;for(;;){if((o+-32&255)>>>0<95){if(n=n+1|0,o=H[n|0],o)continue;break t}break}n=0;break e}if(n=1,o=e[i+8>>2],!H[o|0])break e;for(;;){if(i=L8(o),!i){n=0;break e}if(o=i+o|0,!H[o|0])break}}return n}function B8(i,o,n){for(var a=0;a=i,!!(a&&(i=a+-1|0,o>>>a>>>0<=n>>>0)););return a}function j8(i){var o=0,n=0;e:{if(!(i&1)){for(;o=o+1|0,n=i&2,i=i>>>1|0,!n;);if(i=15,o>>>0>14)break e}i=o}return i}function rn(i){e[i+8>>2]=0,e[i>>2]=0,e[i+4>>2]=0}function on(i){var o=0;o=e[i>>2],o&&Ne(o),o=e[i+4>>2],o&&Ne(o),e[i+8>>2]=0,e[i>>2]=0,e[i+4>>2]=0}function Md(i,o){var n=0,a=0,c=0,f=0;a=1;e:{if(ze[i+8>>2]>=o>>>0||(a=e[i>>2],c=4<>>0>29||Ne(a),e[i>>2]=n,a=0,!n)||(f=e[i+4>>2],n=xn(f,c),n|o>>>0>29||Ne(f),e[i+4>>2]=n,!n))break e;In(n,c),e[i+8>>2]=o,a=1}return a}function z8(i){return i=e[i>>2],H[i+14|0]|H[i+15|0]<<8|(H[i+16|0]<<16|H[i+17|0]<<24)}function lm(i,o){var n=0,a=0,c=0;if(i){In(i+8|0,352),e[i+24>>2]=1024,e[i+4>>2]=16384,a=bn(16384),e[i>>2]=a,n=bn(4096),e[i+16>>2]=n,c=bn(8192),e[i+20>>2]=c;e:{if(a){if(n&&c)break e;Ne(a),n=e[i+16>>2]}return n&&Ne(n),o=e[i+20>>2],o&&Ne(o),In(i,360),-1}e[i+336>>2]=o,i=0}else i=-1;return i}function cm(i){var o=0;i&&(o=e[i>>2],o&&Ne(o),o=e[i+16>>2],o&&Ne(o),o=e[i+20>>2],o&&Ne(o),In(i,360))}function um(i){var o=0,n=0,a=0,c=0;if(i){if(K[e[i>>2]+22|0]=0,K[e[i>>2]+23|0]=0,K[e[i>>2]+24|0]=0,K[e[i>>2]+25|0]=0,a=e[i+4>>2],(a|0)>=1)for(c=e[i>>2];o=e[((H[n+c|0]^o>>>24)<<2)+6512>>2]^o<<8,n=n+1|0,(a|0)!=(n|0););if(a=e[i+12>>2],(a|0)>=1)for(c=e[i+8>>2],n=0;o=e[((H[n+c|0]^o>>>24)<<2)+6512>>2]^o<<8,n=n+1|0,(a|0)!=(n|0););K[e[i>>2]+22|0]=o,K[e[i>>2]+23|0]=o>>>8,K[e[i>>2]+24|0]=o>>>16,K[e[i>>2]+25|0]=o>>>24}}function V8(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0;l=-1;e:{t:{if(!i||(g=e[i>>2],!g))break t;if(!o)return 0;for(;;){if(h=e[((f<<3)+o|0)+4>>2],(h|0)<0|(m|0)>(2147483647-h|0))break t;if(m=h+m|0,f=f+1|0,(f|0)==1)break}if(f=e[i+12>>2],f&&(h=e[i+8>>2]-f|0,e[i+8>>2]=h,h&&Qo(g,f+g|0,h),e[i+12>>2]=0),f=e[i+4>>2],(f-m|0)<=e[i+8>>2]){if((f|0)>(2147483647-m|0)||(f=f+m|0,f=(f|0)<2147482623?f+1024|0:f,g=xn(e[i>>2],f),!g))break e;e[i>>2]=g,e[i+4>>2]=f}if(g=(m|0)/255|0,A=g+1|0,fm(i,A))break t;for(l=e[i+8>>2],f=0;h=e[i>>2]+l|0,l=(f<<3)+o|0,gn(h,e[l>>2],e[l+4>>2]),l=e[i+8>>2]+e[l+4>>2]|0,e[i+8>>2]=l,f=f+1|0,(f|0)!=1;);h=e[i+16>>2],C=h,o=e[i+28>>2],E=o;n:{if((m|0)<=254){l=e[i+20>>2],f=0;break n}for(l=e[i+20>>2],f=0;v=o+f|0,e[h+(v<<2)>>2]=255,I=e[i+356>>2],v=(v<<3)+l|0,e[v>>2]=e[i+352>>2],e[v+4>>2]=I,f=f+1|0,(g|0)!=(f|0););f=g}if(f=E+f|0,e[C+(f<<2)>>2]=m-ie(g,255),f=(f<<3)+l|0,e[f>>2]=a,e[f+4>>2]=c,e[i+352>>2]=a,e[i+356>>2]=c,a=h+(o<<2)|0,e[a>>2]=e[a>>2]|256,e[i+28>>2]=o+A,o=e[i+348>>2],a=e[i+344>>2]+1|0,a>>>0<1&&(o=o+1|0),e[i+344>>2]=a,e[i+348>>2]=o,l=0,!n)break t;e[i+328>>2]=1}return l}return o=e[i>>2],o&&Ne(o),o=e[i+16>>2],o&&Ne(o),o=e[i+20>>2],o&&Ne(o),In(i,360),-1}function fm(i,o){var n=0;e:{if(n=e[i+24>>2],(n-o|0)<=e[i+28>>2]){if((n|0)>(2147483647-o|0)||(o=o+n|0,o=(o|0)<2147483615?o+32|0:o,n=xn(e[i+16>>2],o<<2),!n)||(e[i+16>>2]=n,n=xn(e[i+20>>2],o<<3),!n))break e;e[i+24>>2]=o,e[i+20>>2]=n}return 0}return o=e[i>>2],o&&Ne(o),o=e[i+16>>2],o&&Ne(o),o=e[i+20>>2],o&&Ne(o),In(i,360),-1}function W8(i,o){var n=0;return n=be-16|0,be=n,e[n+8>>2]=e[o>>2],e[n+12>>2]=e[o+4>>2],i=V8(i,n+8|0,e[o+12>>2],e[o+16>>2],e[o+20>>2]),be=n+16|0,i}function dm(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0;e:{if(!i||(g=e[i+28>>2],c=(g|0)<255?g:255,!c)||(v=e[i>>2],!v))break e;t:{n:{o:{if(A=e[i+332>>2],A){if((g|0)>=1)break o;h=-1,f=-1;break n}for(a=(c|0)>0?c:0;;){if((a|0)==(l|0))break n;if(m=l<<2,c=l+1|0,l=c,H[m+e[i+16>>2]|0]!=255)break}a=c;break n}c=(c|0)>1?c:1,h=-1,f=-1;o:{for(;;){if(!((l|0)<=4096|(m|0)<=3)){n=1;break o}if(m=0,C=H[e[i+16>>2]+(a<<2)|0],(C|0)!=255&&(E=E+1|0,m=E,f=e[i+20>>2]+(a<<3)|0,h=e[f>>2],f=e[f+4>>2]),l=l+C|0,a=a+1|0,(c|0)==(a|0))break}a=c}if(c=255,(a|0)==255)break t}if(c=a,!n)break e}if(e[i+40>>2]=1399285583,Ht[i+44>>1]=0,n=e[i+16>>2],a=(H[n+1|0]^-1)&1,a=A?a:a|2,K[i+45|0]=a,!e[i+328>>2]|(c|0)!=(g|0)||(K[i+45|0]=a|4),e[i+332>>2]=1,K[i+53|0]=f>>>24,K[i+52|0]=f>>>16,K[i+51|0]=f>>>8,K[i+50|0]=f,K[i+49|0]=(f&16777215)<<8|h>>>24,K[i+48|0]=(f&65535)<<16|h>>>16,K[i+47|0]=(f&255)<<24|h>>>8,K[i+46|0]=h,a=e[i+336>>2],K[i+54|0]=a,K[i+55|0]=a>>>8,K[i+56|0]=a>>>16,K[i+57|0]=a>>>24,a=e[i+340>>2],(a|0)==-1&&(e[i+340>>2]=0,a=0),K[i+66|0]=c,l=0,Ht[i+62>>1]=0,Ht[i+64>>1]=0,K[i+61|0]=a>>>24,K[i+60|0]=a>>>16,K[i+59|0]=a>>>8,K[i+58|0]=a,I=1,e[i+340>>2]=a+1,(c|0)>=1)for(a=0;f=e[n+(a<<2)>>2],K[(i+a|0)+67|0]=f,l=(f&255)+l|0,a=a+1|0,(c|0)!=(a|0););if(e[o>>2]=i+40,a=c+27|0,e[i+324>>2]=a,e[o+4>>2]=a,a=e[i+12>>2],e[o+12>>2]=l,e[o+8>>2]=a+v,a=g-c|0,e[i+28>>2]=a,Qo(n,n+(c<<2)|0,a<<2),n=e[i+20>>2],Qo(n,n+(c<<3)|0,e[i+28>>2]<<3),e[i+12>>2]=e[i+12>>2]+l,!o)break e;if(i=0,K[e[o>>2]+22|0]=0,K[e[o>>2]+23|0]=0,K[e[o>>2]+24|0]=0,K[e[o>>2]+25|0]=0,n=e[o+4>>2],(n|0)>=1)for(c=e[o>>2],a=0;i=e[((H[a+c|0]^i>>>24)<<2)+6512>>2]^i<<8,a=a+1|0,(n|0)!=(a|0););if(n=e[o+12>>2],(n|0)>=1)for(c=e[o+8>>2],a=0;i=e[((H[a+c|0]^i>>>24)<<2)+6512>>2]^i<<8,a=a+1|0,(n|0)!=(a|0););K[e[o>>2]+22|0]=i,K[e[o>>2]+23|0]=i>>>8,K[e[o>>2]+24|0]=i>>>16,K[e[o>>2]+25|0]=i>>>24}return I}function U8(i,o){var n=0,a=0,c=0;if(!(!i|!e[i>>2])){n=e[i+28>>2],c=i;e:{t:{if(e[i+328>>2]){if(n)break t;a=0;break e}if(a=0,e[i+332>>2]|!n)break e}a=1}n=dm(c,o,a)}return n}function H8(i){return i&&(e[i>>2]=0,e[i+4>>2]=0,e[i+24>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0),0}function G8(i){var o=0;i&&(o=e[i>>2],o&&Ne(o),e[i>>2]=0,e[i+4>>2]=0,e[i+24>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0)}function Q8(i,o){var n=0,a=0,c=0;if(n=e[i+4>>2],(n|0)>=0){c=e[i+12>>2],c&&(a=e[i+8>>2]-c|0,e[i+8>>2]=a,(a|0)>=1&&(n=e[i>>2],Qo(n,n+c|0,a),n=e[i+4>>2]),e[i+12>>2]=0),a=n,n=e[i+8>>2];e:{if((a-n|0)>=(o|0)){o=e[i>>2];break e}n=(o+n|0)+4096|0,o=e[i>>2];t:{if(o){o=xn(o,n);break t}o=bn(n)}if(!o)return o=e[i>>2],o&&Ne(o),e[i>>2]=0,e[i+4>>2]=0,e[i+24>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0,0;e[i+4>>2]=n,e[i>>2]=o,n=e[i+8>>2]}i=o+n|0}else i=0;return i}function Y8(i,o){var n=0,a=0;n=-1,a=e[i+4>>2];e:{if((a|0)<0||(o=e[i+8>>2]+o|0,(o|0)>(a|0)))break e;e[i+8>>2]=o,n=0}return n}function K8(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0;m=be-16|0,be=m;e:{if(e[i+4>>2]<0)break e;c=e[i+12>>2],v=e[i+8>>2]-c|0,n=c+e[i>>2]|0;t:{n:{o:{f=e[i+20>>2];r:{if(!f){if((v|0)<27)break e;if((H[n|0]|H[n+1|0]<<8|(H[n+2|0]<<16|H[n+3|0]<<24))!=1399285583)break r;if(c=H[n+26|0],f=c+27|0,(v|0)<(f|0))break e;if(c)for(c=e[i+24>>2];c=H[(n+l|0)+27|0]+c|0,e[i+24>>2]=c,l=l+1|0,l>>>0>2]=f}if((e[i+24>>2]+f|0)>(v|0))break e;if(h=H[n+22|0]|H[n+23|0]<<8|(H[n+24|0]<<16|H[n+25|0]<<24),e[m+12>>2]=h,l=0,K[n+22|0]=0,K[n+23|0]=0,K[n+24|0]=0,K[n+25|0]=0,A=e[i+24>>2],g=e[i+20>>2],K[n+22|0]=0,K[n+23|0]=0,K[n+24|0]=0,K[n+25|0]=0,(g|0)>0)for(f=0;a=e[((H[n+f|0]^a>>>24)<<2)+6512>>2]^a<<8,f=f+1|0,(g|0)!=(f|0););if(c=n+22|0,(A|0)>0)for(g=n+g|0;a=e[((H[l+g|0]^a>>>24)<<2)+6512>>2]^a<<8,l=l+1|0,(A|0)!=(l|0););if(K[n+22|0]=a,K[n+23|0]=a>>>8,K[n+24|0]=a>>>16,K[n+25|0]=a>>>24,e[m+12>>2]==(H[c|0]|H[c+1|0]<<8|(H[c+2|0]<<16|H[c+3|0]<<24)))break o;K[c|0]=h,K[c+1|0]=h>>>8,K[c+2|0]=h>>>16,K[c+3|0]=h>>>24}if(e[i+20>>2]=0,e[i+24>>2]=0,a=A8(n+1|0,v+-1|0),!a)break n;l=e[i>>2];break t}h=e[i+12>>2];o:{if(!o){f=e[i+24>>2],a=e[i+20>>2];break o}c=h+e[i>>2]|0,e[o>>2]=c,a=e[i+20>>2],e[o+4>>2]=a,e[o+8>>2]=a+c,f=e[i+24>>2],e[o+12>>2]=f}e[i+24>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,a=a+f|0,e[i+12>>2]=h+a;break e}l=e[i>>2],a=l+e[i+8>>2]|0}e[i+12>>2]=a-l,a=n-a|0}return be=m+16|0,a}function X8(i,o){var n=0;if(e[i+4>>2]>=0){for(;;){if(n=K8(i,o),(n|0)>0)return 1;if(!n)return 0;if(!e[i+16>>2])break}e[i+16>>2]=1,i=-1}else i=0;return i}function q8(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0;c=-1;e:{t:{if(!i||(l=e[i>>2],!l)||(a=e[o>>2],v=H[a+5|0],f=e[o+12>>2],A=e[o+8>>2],g=H[a+26|0],E=H[a+18|0]|H[a+19|0]<<8|(H[a+20|0]<<16|H[a+21|0]<<24),m=H[a+14|0]|H[a+15|0]<<8|(H[a+16|0]<<16|H[a+17|0]<<24),I=H[a+6|0]|H[a+7|0]<<8|(H[a+8|0]<<16|H[a+9|0]<<24),T=H[a+10|0]|H[a+11|0]<<8|(H[a+12|0]<<16|H[a+13|0]<<24),C=H[a+4|0],n=e[i+36>>2],o=e[i+12>>2],o&&(h=e[i+8>>2]-o|0,e[i+8>>2]=h,h&&Qo(l,o+l|0,h),e[i+12>>2]=0),n&&(o=i,l=e[i+28>>2]-n|0,l?(h=e[i+16>>2],Qo(h,h+(n<<2)|0,l<<2),l=e[i+20>>2],Qo(l,l+(n<<3)|0,e[i+28>>2]-n<<3),h=e[i+28>>2]-n|0):h=0,e[o+28>>2]=h,e[i+36>>2]=0,e[i+32>>2]=e[i+32>>2]-n),(m|0)!=e[i+336>>2]|C)||fm(i,g+1|0))break t;h=v&1,l=e[i+340>>2];n:{if((l|0)==(E|0))break n;if(n=e[i+32>>2],m=e[i+28>>2],(n|0)<(m|0)){for(c=e[i+8>>2],C=e[i+16>>2],o=n;c=c-H[C+(o<<2)|0]|0,o=o+1|0,(o|0)<(m|0););e[i+8>>2]=c}if(e[i+28>>2]=n,(l|0)==-1)break n;o=n+1|0,e[i+28>>2]=o,e[e[i+16>>2]+(n<<2)>>2]=1024,e[i+32>>2]=o}l=v&2,c=0;n:{if(!h||(o=e[i+28>>2],e[(e[i+16>>2]+(o<<2)|0)+-4>>2]!=1024&&(o|0)>=1)||(l=0,!g))break n;for(o=0;;){if(c=o+1|0,o=H[(o+a|0)+27|0],f=f-o|0,A=o+A|0,(o|0)!=255)break n;if(o=c,(g|0)==(o|0))break}c=g}if(f){n=e[i+4>>2],o=e[i+8>>2];n:{if((n-f|0)>(o|0)){n=e[i>>2];break n}if((n|0)>(2147483647-f|0)||(o=n+f|0,o=(o|0)<2147482623?o+1024|0:o,n=xn(e[i>>2],o),!n))break e;e[i>>2]=n,e[i+4>>2]=o,o=e[i+8>>2]}gn(o+n|0,A,f),e[i+8>>2]=e[i+8>>2]+f}A=v&4;n:{if((c|0)>=(g|0))break n;v=e[i+20>>2],h=e[i+16>>2],n=e[i+28>>2],o=h+(n<<2)|0,f=H[(a+c|0)+27|0],e[o>>2]=f,m=v+(n<<3)|0,e[m>>2]=-1,e[m+4>>2]=-1,l&&(e[o>>2]=f|256),o=n+1|0,e[i+28>>2]=o,c=c+1|0;o:{if((f|0)==255){n=-1;break o}e[i+32>>2]=o}if((c|0)!=(g|0))for(;l=H[(a+c|0)+27|0],e[h+(o<<2)>>2]=l,f=v+(o<<3)|0,e[f>>2]=-1,e[f+4>>2]=-1,f=o+1|0,e[i+28>>2]=f,c=c+1|0,(l|0)!=255&&(e[i+32>>2]=f,n=o),o=f,(c|0)!=(g|0););if((n|0)==-1)break n;o=e[i+20>>2]+(n<<3)|0,e[o>>2]=I,e[o+4>>2]=T}n:{if(!A||(e[i+328>>2]=1,o=e[i+28>>2],(o|0)<1))break n;o=(e[i+16>>2]+(o<<2)|0)+-4|0,e[o>>2]=e[o>>2]|512}e[i+340>>2]=E+1,c=0}return c}return o=e[i>>2],o&&Ne(o),o=e[i+16>>2],o&&Ne(o),o=e[i+20>>2],o&&Ne(o),In(i,360),-1}function pm(i){e[i+4>>2]<0||(e[i+8>>2]=0,e[i+12>>2]=0,e[i+24>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0)}function hm(i){!i|!e[i>>2]?i=-1:(e[i+344>>2]=0,e[i+348>>2]=0,e[i+340>>2]=-1,e[i+332>>2]=0,e[i+324>>2]=0,e[i+328>>2]=0,e[i+36>>2]=0,e[i+28>>2]=0,e[i+32>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0,e[i+352>>2]=0,e[i+356>>2]=0,i=0)}function Z8(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0;e:{if(!i||(g=e[i>>2],!g)||(f=e[i+36>>2],e[i+32>>2]<=(f|0)))break e;if(a=e[i+16>>2],l=e[a+(f<<2)>>2],l&1024)return e[i+36>>2]=f+1,o=i,a=i,n=e[i+348>>2],i=e[i+344>>2]+1|0,i>>>0<1&&(n=n+1|0),e[a+344>>2]=i,e[o+348>>2]=n,-1;c=l&512,h=255,n=l&255;t:{if((n|0)!=255){h=n;break t}for(;f=f+1|0,n=e[(f<<2)+a>>2],c=n&512?512:c,n=n&255,h=n+h|0,(n|0)==255;);}t:{if(!o){c=e[i+344>>2],n=e[i+348>>2],l=e[i+12>>2];break t}e[o+8>>2]=l&256,e[o+12>>2]=c,l=e[i+12>>2],e[o>>2]=g+l,a=e[i+348>>2],n=a,c=e[i+344>>2],e[o+24>>2]=c,e[o+28>>2]=n,a=e[i+20>>2]+(f<<3)|0,g=e[a+4>>2],a=e[a>>2],e[o+4>>2]=h,e[o+16>>2]=a,e[o+20>>2]=g}a=c+1|0,a>>>0<1&&(n=n+1|0),e[i+344>>2]=a,e[i+348>>2]=n,c=1,e[i+36>>2]=f+1,e[i+12>>2]=l+h}return c}function J8(i){var o=0;e:{if(lm(i+8|0,e[i+4>>2]))break e;H8(i+368|0),e[i+396>>2]=-1,e[i+400>>2]=-1,e[i+408>>2]=0,e[i+412>>2]=0,e[i+404>>2]=e[i>>2],o=1}return o}function mm(i){e[i>>2]=1}function $8(i){hm(i+8|0),pm(i+368|0),e[i+408>>2]=0,e[i+412>>2]=0,e[i>>2]&&(e[i+404>>2]=1)}function ew(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0;g=be-16|0,be=g,m=e[n>>2],e[n>>2]=0;e:{t:{n:{if(!m)break n;for(v=i+416|0,A=i+368|0,E=i+440|0,I=i+8|0,T=e[2721],B=H[7536];;){if(e[i+408>>2])break n;o:{r:{if(e[i+412>>2]){if(e[i+432>>2]){if(h=e[i+440>>2],l=e[i+444>>2],f=m-f|0,l>>>0>f>>>0)break r;o=gn(o,h,l),e[n>>2]=l+e[n>>2],e[i+432>>2]=0,o=o+l|0;break o}if(f=Z8(I,E),(f|0)>=1){if(e[i+432>>2]=1,C=e[i+444>>2],(C|0)<1||(l=e[E>>2],H[l|0]!=(B|0)))break o;if(h=3,(C|0)<9||(f=T,(H[l+1|0]|H[l+2|0]<<8|(H[l+3|0]<<16|H[l+4|0]<<24))!=(H[f|0]|H[f+1|0]<<8|(H[f+2|0]<<16|H[f+3|0]<<24))))break e;if(f=H[l+5|0],e[i+396>>2]=f,e[i+400>>2]=H[l+6|0],(f|0)!=1){h=4;break e}e[i+444>>2]=C+-9,e[i+440>>2]=l+9;break o}if(f){h=2;break e}e[i+412>>2]=0;break o}if(f=X8(A,v),(f|0)>=1){if(e[i+404>>2]&&(f=z8(v),e[i+404>>2]=0,e[i+344>>2]=f,e[i+4>>2]=f),q8(I,v))break o;e[i+432>>2]=0,e[i+412>>2]=1;break o}if(f){h=2;break e}if(f=m-e[n>>2]|0,f=f>>>0>8192?f:8192,l=Q8(A,f),!l){h=7;break e}e[g+12>>2]=f;i:switch((Le[8](a,l,g+12|0,c)|0)+-1|0){case 0:e[i+408>>2]=1;break;case 4:break t;default:break i}if((Y8(A,e[g+12>>2])|0)>=0)break o;h=6;break e}o=gn(o,h,f),e[n>>2]=f+e[n>>2],e[i+440>>2]=f+e[i+440>>2],e[i+444>>2]=e[i+444>>2]-f,o=o+f|0}if(f=e[n>>2],!(m>>>0>f>>>0))break}}return be=g+16|0,!f&e[i+408>>2]!=0}h=5}return be=g+16|0,h}function gm(i){e[i+80>>2]=0,e[i+84>>2]=0,e[i+64>>2]=1732584193,e[i+68>>2]=-271733879,e[i+72>>2]=-1732584194,e[i+76>>2]=271733878,e[i+88>>2]=0,e[i+92>>2]=0}function bm(i,o){var n=0,a=0,c=0;a=e[o+80>>2]&63,n=a+o|0,K[n|0]=128,n=n+1|0,c=56;e:{if(a>>>0<56){c=55-a|0;break e}In(n,a^63),su(o- -64|0,o),n=o}In(n,c),n=e[o+80>>2],e[o+56>>2]=n<<3,e[o+60>>2]=e[o+84>>2]<<3|n>>>29,su(o- -64|0,o),n=H[o+76|0]|H[o+77|0]<<8|(H[o+78|0]<<16|H[o+79|0]<<24),a=H[o+72|0]|H[o+73|0]<<8|(H[o+74|0]<<16|H[o+75|0]<<24),K[i+8|0]=a,K[i+9|0]=a>>>8,K[i+10|0]=a>>>16,K[i+11|0]=a>>>24,K[i+12|0]=n,K[i+13|0]=n>>>8,K[i+14|0]=n>>>16,K[i+15|0]=n>>>24,n=H[o+68|0]|H[o+69|0]<<8|(H[o+70|0]<<16|H[o+71|0]<<24),a=H[o+64|0]|H[o+65|0]<<8|(H[o+66|0]<<16|H[o+67|0]<<24),K[i|0]=a,K[i+1|0]=a>>>8,K[i+2|0]=a>>>16,K[i+3|0]=a>>>24,K[i+4|0]=n,K[i+5|0]=n>>>8,K[i+6|0]=n>>>16,K[i+7|0]=n>>>24,i=e[o+88>>2],i&&(Ne(i),e[o+88>>2]=0,e[o+92>>2]=0),In(o,96)}function su(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0;A=e[o+16>>2],g=e[o+32>>2],C=e[o+48>>2],E=e[o+36>>2],I=e[o+52>>2],T=e[o+4>>2],l=e[o+20>>2],h=e[i+4>>2],m=e[o>>2],Be=e[i>>2],B=e[i+12>>2],v=e[i+8>>2],a=h+Ke(((m+Be|0)+(B^(B^v)&h)|0)+-680876936|0,7)|0,G=e[o+12>>2],te=e[o+8>>2],c=Ke(((T+B|0)+(a&(h^v)^v)|0)+-389564586|0,12)+a|0,n=Ke(((te+v|0)+(c&(a^h)^h)|0)+606105819|0,17)+c|0,f=Ke(((h+G|0)+(a^n&(a^c))|0)+-1044525330|0,22)+n|0,a=Ke(((a+A|0)+(c^f&(n^c))|0)+-176418897|0,7)+f|0,ae=e[o+28>>2],he=e[o+24>>2],c=Ke(((c+l|0)+(n^a&(n^f))|0)+1200080426|0,12)+a|0,n=Ke(((n+he|0)+(f^c&(a^f))|0)+-1473231341|0,17)+c|0,f=Ke(((f+ae|0)+(a^n&(a^c))|0)+-45705983|0,22)+n|0,a=Ke(((a+g|0)+(c^f&(n^c))|0)+1770035416|0,7)+f|0,ye=e[o+44>>2],Se=e[o+40>>2],c=Ke(((c+E|0)+(n^a&(n^f))|0)+-1958414417|0,12)+a|0,n=Ke(((n+Se|0)+(f^c&(a^f))|0)+-42063|0,17)+c|0,f=Ke(((f+ye|0)+(a^n&(a^c))|0)+-1990404162|0,22)+n|0,a=Ke(((a+C|0)+(c^f&(n^c))|0)+1804603682|0,7)+f|0,Ee=e[o+56>>2],Te=e[o+60>>2],c=Ke(((c+I|0)+(n^a&(n^f))|0)+-40341101|0,12)+a|0,o=c+Ke(((n+Ee|0)+(f^(a^f)&c)|0)+-1502002290|0,17)|0,je=o+ye|0,n=a+T|0,a=Ke(((f+Te|0)+(a^o&(a^c))|0)+1236535329|0,22)+o|0,n=Ke((n+(o^(a^o)&c)|0)+-165796510|0,5)+a|0,o=Ke(((c+he|0)+(a^o&(a^n))|0)+-1069501632|0,9)+n|0,c=Ke((je+((n^o)&a^n)|0)+643717713|0,14)+o|0,a=Ke(((a+m|0)+(o^n&(o^c))|0)+-373897302|0,20)+c|0,n=Ke(((n+l|0)+(c^o&(a^c))|0)+-701558691|0,5)+a|0,o=Ke(((o+Se|0)+(a^c&(a^n))|0)+38016083|0,9)+n|0,c=Ke(((Te+c|0)+((n^o)&a^n)|0)+-660478335|0,14)+o|0,a=Ke(((a+A|0)+(o^n&(o^c))|0)+-405537848|0,20)+c|0,n=Ke(((n+E|0)+(c^o&(a^c))|0)+568446438|0,5)+a|0,o=Ke(((o+Ee|0)+(a^c&(a^n))|0)+-1019803690|0,9)+n|0,c=Ke(((c+G|0)+((n^o)&a^n)|0)+-187363961|0,14)+o|0,a=Ke(((a+g|0)+(o^n&(o^c))|0)+1163531501|0,20)+c|0,n=Ke(((n+I|0)+(c^o&(a^c))|0)+-1444681467|0,5)+a|0,o=Ke(((o+te|0)+(a^c&(a^n))|0)+-51403784|0,9)+n|0,c=Ke(((c+ae|0)+((n^o)&a^n)|0)+1735328473|0,14)+o|0,f=o^c,a=Ke(((a+C|0)+(o^f&n)|0)+-1926607734|0,20)+c|0,n=Ke(((n+l|0)+(a^f)|0)+-378558|0,4)+a|0,o=Ke(((o+g|0)+(a^c^n)|0)+-2022574463|0,11)+n|0,c=Ke(((c+ye|0)+(o^(a^n))|0)+1839030562|0,16)+o|0,a=Ke(((a+Ee|0)+(c^(o^n))|0)+-35309556|0,23)+c|0,n=Ke(((n+T|0)+(a^(o^c))|0)+-1530992060|0,4)+a|0,o=Ke(((o+A|0)+(n^(a^c))|0)+1272893353|0,11)+n|0,c=Ke(((c+ae|0)+(o^(a^n))|0)+-155497632|0,16)+o|0,a=Ke(((a+Se|0)+(c^(o^n))|0)+-1094730640|0,23)+c|0,n=Ke(((n+I|0)+(a^(o^c))|0)+681279174|0,4)+a|0,o=Ke(((o+m|0)+(n^(a^c))|0)+-358537222|0,11)+n|0,c=Ke(((c+G|0)+(o^(a^n))|0)+-722521979|0,16)+o|0,a=Ke(((a+he|0)+(c^(o^n))|0)+76029189|0,23)+c|0,n=Ke(((n+E|0)+(a^(o^c))|0)+-640364487|0,4)+a|0,o=Ke(((o+C|0)+(n^(a^c))|0)+-421815835|0,11)+n|0,f=n+m|0,m=o^n,n=Ke(((c+Te|0)+(o^(a^n))|0)+530742520|0,16)+o|0,c=Ke(((a+te|0)+(m^n)|0)+-995338651|0,23)+n|0,a=Ke((f+((c|o^-1)^n)|0)+-198630844|0,6)+c|0,f=c+l|0,l=n+Ee|0,n=Ke(((o+ae|0)+(c^(a|n^-1))|0)+1126891415|0,10)+a|0,c=Ke((l+(a^(n|c^-1))|0)+-1416354905|0,15)+n|0,o=Ke((f+((c|a^-1)^n)|0)+-57434055|0,21)+c|0,f=c+Se|0,l=n+G|0,n=Ke(((a+C|0)+(c^(o|n^-1))|0)+1700485571|0,6)+o|0,c=Ke((l+(o^(n|c^-1))|0)+-1894986606|0,10)+n|0,a=Ke((f+((c|o^-1)^n)|0)+-1051523|0,15)+c|0,f=c+Te|0,g=n+g|0,n=Ke(((o+T|0)+(c^(a|n^-1))|0)+-2054922799|0,21)+a|0,c=Ke((g+(a^(n|c^-1))|0)+1873313359|0,6)+n|0,o=Ke((f+((c|a^-1)^n)|0)+-30611744|0,10)+c|0,a=Ke(((a+he|0)+(c^(o|n^-1))|0)+-1560198380|0,15)+o|0,n=Ke(((n+I|0)+(o^(a|c^-1))|0)+1309151649|0,21)+a|0,c=Ke(((c+A|0)+((n|o^-1)^a)|0)+-145523070|0,6)+n|0,e[i>>2]=c+Be,o=Ke(((o+ye|0)+(n^(c|a^-1))|0)+-1120210379|0,10)+c|0,e[i+12>>2]=o+B,a=Ke(((a+te|0)+(c^(o|n^-1))|0)+718787259|0,15)+o|0,e[i+8>>2]=a+v,Qe=i,Ye=Ke(((n+E|0)+(o^(a|c^-1))|0)+-343485551|0,21)+(a+h|0)|0,e[Qe+4>>2]=Ye}function vm(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0;oe(c,0,n,0);e:{if(ne||(h=ie(n,c),oe(a,0,h,0),ne))break e;l=e[i+88>>2],A=ie(a,h);t:{if(ze[i+92>>2]>=A>>>0){f=l;break t}f=xn(l,A);n:{if(!f){if(Ne(l),f=bn(A),e[i+88>>2]=f,f)break n;return e[i+92>>2]=0,0}e[i+88>>2]=f}e[i+92>>2]=A}t:{n:{o:{r:{i:{a:{s:{l:{u:{f:{c:{d:{if(l=ie(c,100)+n|0,(l|0)<=300){p:switch(l+-101|0){case 3:break i;case 5:break a;case 7:break s;case 2:case 4:case 6:break n;case 0:break o;case 1:break r;default:break p}switch(l+-201|0){case 0:break l;case 1:break u;case 3:break f;case 5:break c;case 7:break d;default:break n}}p:{h:{m:switch(l+-401|0){default:switch(l+-301|0){case 0:break p;case 1:break h;default:break n}case 7:if(!a)break t;for(E=e[o+28>>2],g=e[o+24>>2],C=e[o+20>>2],h=e[o+16>>2],v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;m=n<<2,e[f>>2]=e[m+o>>2],e[f+4>>2]=e[c+m>>2],e[f+8>>2]=e[l+m>>2],e[f+12>>2]=e[v+m>>2],e[f+16>>2]=e[h+m>>2],e[f+20>>2]=e[m+C>>2],e[f+24>>2]=e[g+m>>2],e[f+28>>2]=e[m+E>>2],f=f+32|0,n=n+1|0,(a|0)!=(n|0););break t;case 5:if(!a)break t;for(C=e[o+20>>2],h=e[o+16>>2],v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;g=n<<2,e[f>>2]=e[g+o>>2],e[f+4>>2]=e[c+g>>2],e[f+8>>2]=e[l+g>>2],e[f+12>>2]=e[g+v>>2],e[f+16>>2]=e[h+g>>2],e[f+20>>2]=e[g+C>>2],f=f+24|0,n=n+1|0,(a|0)!=(n|0););break t;case 3:if(!a)break t;for(v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;h=n<<2,e[f>>2]=e[h+o>>2],e[f+4>>2]=e[c+h>>2],e[f+8>>2]=e[l+h>>2],e[f+12>>2]=e[h+v>>2],f=f+16|0,n=n+1|0,(a|0)!=(n|0););break t;case 1:if(!a)break t;for(l=e[o+4>>2],c=e[o>>2],o=0;n=o<<2,e[f>>2]=e[n+c>>2],e[f+4>>2]=e[n+l>>2],f=f+8|0,o=o+1|0,(a|0)!=(o|0););break t;case 0:break m;case 2:case 4:case 6:break n}if(!a)break t;for(n=e[o>>2],o=0;e[f>>2]=e[n+(o<<2)>>2],f=f+4|0,o=o+1|0,(a|0)!=(o|0););break t}if(!a)break t;for(n=0;c=n<<2,l=e[c+e[o>>2]>>2],K[f|0]=l,K[f+2|0]=l>>>16,K[f+1|0]=l>>>8,c=e[c+e[o+4>>2]>>2],K[f+3|0]=c,K[f+5|0]=c>>>16,K[f+4|0]=c>>>8,f=f+6|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(n=0;c=e[e[o>>2]+(n<<2)>>2],K[f|0]=c,K[f+2|0]=c>>>16,K[f+1|0]=c>>>8,f=f+3|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(E=e[o+28>>2],g=e[o+24>>2],C=e[o+20>>2],h=e[o+16>>2],v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;m=n<<2,Ht[f>>1]=e[m+o>>2],Ht[f+2>>1]=e[c+m>>2],Ht[f+4>>1]=e[l+m>>2],Ht[f+6>>1]=e[v+m>>2],Ht[f+8>>1]=e[h+m>>2],Ht[f+10>>1]=e[m+C>>2],Ht[f+12>>1]=e[g+m>>2],Ht[f+14>>1]=e[m+E>>2],f=f+16|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(C=e[o+20>>2],h=e[o+16>>2],v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;g=n<<2,Ht[f>>1]=e[g+o>>2],Ht[f+2>>1]=e[c+g>>2],Ht[f+4>>1]=e[l+g>>2],Ht[f+6>>1]=e[g+v>>2],Ht[f+8>>1]=e[h+g>>2],Ht[f+10>>1]=e[g+C>>2],f=f+12|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(v=e[o+12>>2],l=e[o+8>>2],c=e[o+4>>2],o=e[o>>2],n=0;h=n<<2,Ht[f>>1]=e[h+o>>2],Ht[f+2>>1]=e[c+h>>2],Ht[f+4>>1]=e[l+h>>2],Ht[f+6>>1]=e[h+v>>2],f=f+8|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(l=e[o+4>>2],c=e[o>>2],o=0;n=o<<2,Ht[f>>1]=e[n+c>>2],Ht[f+2>>1]=e[n+l>>2],f=f+4|0,o=o+1|0,(a|0)!=(o|0););break t}if(!a)break t;for(n=e[o>>2],o=0;Ht[f>>1]=e[n+(o<<2)>>2],f=f+2|0,o=o+1|0,(a|0)!=(o|0););break t}if(!a)break t;for(c=0;n=c<<2,K[f|0]=e[n+e[o>>2]>>2],K[f+1|0]=e[n+e[o+4>>2]>>2],K[f+2|0]=e[n+e[o+8>>2]>>2],K[f+3|0]=e[n+e[o+12>>2]>>2],K[f+4|0]=e[n+e[o+16>>2]>>2],K[f+5|0]=e[n+e[o+20>>2]>>2],K[f+6|0]=e[n+e[o+24>>2]>>2],K[f+7|0]=e[n+e[o+28>>2]>>2],f=f+8|0,c=c+1|0,(c|0)!=(a|0););break t}if(!a)break t;for(c=0;n=c<<2,K[f|0]=e[n+e[o>>2]>>2],K[f+1|0]=e[n+e[o+4>>2]>>2],K[f+2|0]=e[n+e[o+8>>2]>>2],K[f+3|0]=e[n+e[o+12>>2]>>2],K[f+4|0]=e[n+e[o+16>>2]>>2],K[f+5|0]=e[n+e[o+20>>2]>>2],f=f+6|0,c=c+1|0,(c|0)!=(a|0););break t}if(!a)break t;for(c=0;n=c<<2,K[f|0]=e[n+e[o>>2]>>2],K[f+1|0]=e[n+e[o+4>>2]>>2],K[f+2|0]=e[n+e[o+8>>2]>>2],K[f+3|0]=e[n+e[o+12>>2]>>2],f=f+4|0,c=c+1|0,(c|0)!=(a|0););break t}if(!a)break t;for(n=0;c=n<<2,K[f|0]=e[c+e[o>>2]>>2],K[f+1|0]=e[c+e[o+4>>2]>>2],f=f+2|0,n=n+1|0,(a|0)!=(n|0););break t}if(!a)break t;for(n=0;K[f|0]=e[e[o>>2]+(n<<2)>>2],f=f+1|0,n=n+1|0,(a|0)!=(n|0););break t}n:switch(c+-1|0){case 3:if(!n|!a)break t;for(l=0;;){for(c=0;e[f>>2]=e[e[(c<<2)+o>>2]+(l<<2)>>2],f=f+4|0,c=c+1|0,(c|0)!=(n|0););if(l=l+1|0,(l|0)==(a|0))break}break t;case 2:if(!n|!a)break t;for(;;){for(c=0;l=e[e[(c<<2)+o>>2]+(v<<2)>>2],K[f|0]=l,K[f+2|0]=l>>>16,K[f+1|0]=l>>>8,f=f+3|0,c=c+1|0,(c|0)!=(n|0););if(v=v+1|0,(v|0)==(a|0))break}break t;case 1:if(!n|!a)break t;for(l=0;;){for(c=0;Ht[f>>1]=e[e[(c<<2)+o>>2]+(l<<2)>>2],f=f+2|0,c=c+1|0,(c|0)!=(n|0););if(l=l+1|0,(l|0)==(a|0))break}break t;case 0:break n;default:break t}if(!n|!a)break t;for(l=0;;){for(c=0;K[f|0]=e[e[(c<<2)+o>>2]+(l<<2)>>2],f=f+1|0,c=c+1|0,(c|0)!=(n|0););if(l=l+1|0,(l|0)==(a|0))break}}n=e[i+80>>2],o=n+A|0,e[i+80>>2]=o,a=e[i+88>>2],o>>>0>>0&&(o=i+84|0,e[o>>2]=e[o>>2]+1),c=64-(n&63)|0,o=(i-c|0)- -64|0;t:{if(A>>>0>>0){gn(o,a,A);break t}if(gn(o,a,c),n=i- -64|0,su(n,i),f=a+c|0,o=A-c|0,o>>>0>=64)for(;c=H[f+4|0]|H[f+5|0]<<8|(H[f+6|0]<<16|H[f+7|0]<<24),a=H[f|0]|H[f+1|0]<<8|(H[f+2|0]<<16|H[f+3|0]<<24),K[i|0]=a,K[i+1|0]=a>>>8,K[i+2|0]=a>>>16,K[i+3|0]=a>>>24,K[i+4|0]=c,K[i+5|0]=c>>>8,K[i+6|0]=c>>>16,K[i+7|0]=c>>>24,c=H[f+60|0]|H[f+61|0]<<8|(H[f+62|0]<<16|H[f+63|0]<<24),a=H[f+56|0]|H[f+57|0]<<8|(H[f+58|0]<<16|H[f+59|0]<<24),K[i+56|0]=a,K[i+57|0]=a>>>8,K[i+58|0]=a>>>16,K[i+59|0]=a>>>24,K[i+60|0]=c,K[i+61|0]=c>>>8,K[i+62|0]=c>>>16,K[i+63|0]=c>>>24,c=H[f+52|0]|H[f+53|0]<<8|(H[f+54|0]<<16|H[f+55|0]<<24),a=H[f+48|0]|H[f+49|0]<<8|(H[f+50|0]<<16|H[f+51|0]<<24),K[i+48|0]=a,K[i+49|0]=a>>>8,K[i+50|0]=a>>>16,K[i+51|0]=a>>>24,K[i+52|0]=c,K[i+53|0]=c>>>8,K[i+54|0]=c>>>16,K[i+55|0]=c>>>24,c=H[f+44|0]|H[f+45|0]<<8|(H[f+46|0]<<16|H[f+47|0]<<24),a=H[f+40|0]|H[f+41|0]<<8|(H[f+42|0]<<16|H[f+43|0]<<24),K[i+40|0]=a,K[i+41|0]=a>>>8,K[i+42|0]=a>>>16,K[i+43|0]=a>>>24,K[i+44|0]=c,K[i+45|0]=c>>>8,K[i+46|0]=c>>>16,K[i+47|0]=c>>>24,c=H[f+36|0]|H[f+37|0]<<8|(H[f+38|0]<<16|H[f+39|0]<<24),a=H[f+32|0]|H[f+33|0]<<8|(H[f+34|0]<<16|H[f+35|0]<<24),K[i+32|0]=a,K[i+33|0]=a>>>8,K[i+34|0]=a>>>16,K[i+35|0]=a>>>24,K[i+36|0]=c,K[i+37|0]=c>>>8,K[i+38|0]=c>>>16,K[i+39|0]=c>>>24,c=H[f+28|0]|H[f+29|0]<<8|(H[f+30|0]<<16|H[f+31|0]<<24),a=H[f+24|0]|H[f+25|0]<<8|(H[f+26|0]<<16|H[f+27|0]<<24),K[i+24|0]=a,K[i+25|0]=a>>>8,K[i+26|0]=a>>>16,K[i+27|0]=a>>>24,K[i+28|0]=c,K[i+29|0]=c>>>8,K[i+30|0]=c>>>16,K[i+31|0]=c>>>24,c=H[f+20|0]|H[f+21|0]<<8|(H[f+22|0]<<16|H[f+23|0]<<24),a=H[f+16|0]|H[f+17|0]<<8|(H[f+18|0]<<16|H[f+19|0]<<24),K[i+16|0]=a,K[i+17|0]=a>>>8,K[i+18|0]=a>>>16,K[i+19|0]=a>>>24,K[i+20|0]=c,K[i+21|0]=c>>>8,K[i+22|0]=c>>>16,K[i+23|0]=c>>>24,c=H[f+12|0]|H[f+13|0]<<8|(H[f+14|0]<<16|H[f+15|0]<<24),a=H[f+8|0]|H[f+9|0]<<8|(H[f+10|0]<<16|H[f+11|0]<<24),K[i+8|0]=a,K[i+9|0]=a>>>8,K[i+10|0]=a>>>16,K[i+11|0]=a>>>24,K[i+12|0]=c,K[i+13|0]=c>>>8,K[i+14|0]=c>>>16,K[i+15|0]=c>>>24,su(n,i),f=f- -64|0,o=o+-64|0,o>>>0>63;);gn(i,f,o)}f=1}return f}function tw(i){return i=i|0,m8(e[i+60>>2])|0}function lu(i){return i?(e[2896]=i,-1):0}function nw(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0,f=0,l=0;a=be-32|0,be=a,e[a+16>>2]=o,c=e[i+48>>2],e[a+20>>2]=n-((c|0)!=0),f=e[i+44>>2],e[a+28>>2]=c,e[a+24>>2]=f;e:{t:{n:{if(lu(g8(e[i+60>>2],a+16|0,2,a+12|0)|0)){e[a+12>>2]=-1,n=-1;break n}if(c=e[a+12>>2],(c|0)>0)break t;n=c}e[i>>2]=e[i>>2]|n&48^16;break e}if(l=e[a+20>>2],c>>>0<=l>>>0){n=c;break e}if(f=e[i+44>>2],e[i+4>>2]=f,e[i+8>>2]=f+(c-l|0),!e[i+48>>2])break e;e[i+4>>2]=f+1,K[(o+n|0)+-1|0]=H[f|0]}return be=a+32|0,n|0}function rw(i,o,n,a){i=i|0,o=o|0,n=n|0,a=a|0;var c=0;c=be-16|0,be=c;e:{if(!lu(k8(e[i+60>>2],o|0,n|0,a&255,c+8|0)|0)){o=e[c+12>>2],i=e[c+8>>2];break e}e[c+8>>2]=-1,e[c+12>>2]=-1,o=-1,i=-1}return be=c+16|0,ne=o,i|0}function km(i){var o=0;if(i)return e[i+76>>2]<=-1,Nd(i);if(e[2794]&&(o=km(e[2794])),i=e[3023],i)for(;ze[i+20>>2]>ze[i+28>>2]&&(o=Nd(i)|o),i=e[i+56>>2],!!i;);return o}function Nd(i){var o=0,n=0;e:{if(ze[i+20>>2]<=ze[i+28>>2]||(Le[e[i+36>>2]](i,0,0)|0,e[i+20>>2]))break e;return-1}return o=e[i+4>>2],n=e[i+8>>2],o>>>0>>0&&(o=o-n|0,Le[e[i+40>>2]](i,o,o>>31,1)|0),e[i+28>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i+4>>2]=0,e[i+8>>2]=0,0}function ym(i){var o=0,n=0,a=0,c=0;c=e[i+76>>2]>=0?1:0,a=e[i>>2]&1,a||(o=e[i+52>>2],o&&(e[o+56>>2]=e[i+56>>2]),n=e[i+56>>2],n&&(e[n+52>>2]=o),e[3023]==(i|0)&&(e[3023]=n)),km(i),Le[e[i+12>>2]](i)|0,o=e[i+96>>2],o&&Ne(o);e:{if(!a){Ne(i);break e}if(!c)break e}}function cu(i,o,n){var a=0,c=0,f=0;e:{if(!n)break e;for(;;){if(a=H[i|0],c=H[o|0],(a|0)==(c|0)){if(o=o+1|0,i=i+1|0,n=n+-1|0,n)continue;break e}break}f=a-c|0}return f}function _m(i){e[i+8>>2]=0,e[i+12>>2]=0,e[i>>2]=0,e[i+4>>2]=3,e[i+56>>2]=0,e[i+60>>2]=0,e[i+48>>2]=0,e[i+52>>2]=0,e[i+40>>2]=0,e[i+44>>2]=0,e[i+32>>2]=0,e[i+36>>2]=0,e[i+24>>2]=0,e[i+28>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0}function wm(i){return i=+b8(+i),On(i)<2147483648?~~i:-2147483648}function ho(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0;e:{t:{n:{o:{if(qe(+i),o=Oe(1)|0,a=Oe(0)|0,((o|0)>0||(o|0)>=0&&!(a>>>0<0)&&!0)&&(f=o,o>>>0>1048575))break o;if(!(o&2147483647|a))return-1/(i*i);if((o|0)>-1||!1)break n;return(i-i)/0}if(f>>>0>2146435071)break e;if(o=1072693248,l=-1023,(f|0)!=1072693248){o=f;break t}if(a)break t;return 0}qe(+(i*0x40000000000000)),o=Oe(1)|0,a=Oe(0)|0,l=-1077}o=o+614242|0,c=+((o>>>20|0)+l|0),ot(0,a|0),ot(1,(o&1048575)+1072079006|0),i=+rt()+-1,n=i/(i+2),h=c*.6931471803691238,g=i,m=c*19082149292705877e-26,v=n,c=i*(i*.5),n=n*n,i=n*n,i=h+(g+(m+v*(c+(i*(i*(i*.15313837699209373+.22222198432149784)+.3999999999940942)+n*(i*(i*(i*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)))-c))}return i}function ow(i,o,n,a){var c=0,f=0;if(a)for(;f=c<<2,Ze[f+n>>2]=Ze[o+f>>2]*ue(e[i+f>>2]),c=c+1|0,(c|0)!=(a|0););}function iw(i,o,n,a){i=i|0,o=o|0,n=n|0,a=a|0;var c=0,f=0,l=0,h=ue(0),g=0,m=0;l=o-n|0;e:{if(!n){for(;c=c+1|0,c>>>0<=l>>>0;);break e}for(m=In(a,n<<2);;){for(h=Ze[(c<<2)+i>>2],f=0;g=(f<<2)+m|0,Ze[g>>2]=Ze[g>>2]+ue(h*Ze[(c+f<<2)+i>>2]),f=f+1|0,(f|0)!=(n|0););if(c=c+1|0,!(c>>>0<=l>>>0))break}}if(c>>>0>>0)for(;;){if(n=o-c|0,n)for(h=Ze[(c<<2)+i>>2],f=0;l=(f<<2)+a|0,Ze[l>>2]=Ze[l>>2]+ue(h*Ze[(c+f<<2)+i>>2]),f=f+1|0,f>>>0>>0;);if(c=c+1|0,(c|0)==(o|0))break}}function aw(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0;h=be-256|0,be=h,E=e[o>>2],v=+Ze[i>>2];e:{for(;;){if((f|0)==(E|0))break e;A=f+1|0,l=+ue(-Ze[(A<<2)+i>>2]);t:{if(f){for(C=f>>>1|0,c=0;l=l-it[(c<<3)+h>>3]*+Ze[(f-c<<2)+i>>2],c=c+1|0,(f|0)!=(c|0););if(l=l/v,it[(f<<3)+h>>3]=l,c=0,C)for(;g=(c<<3)+h|0,m=it[g>>3],I=g,g=((c^-1)+f<<3)+h|0,it[I>>3]=m+l*it[g>>3],it[g>>3]=l*m+it[g>>3],c=c+1|0,(C|0)!=(c|0););if(!(f&1))break t;g=(C<<3)+h|0,m=it[g>>3],it[g>>3]=m+l*m;break t}l=l/v,it[(f<<3)+h>>3]=l}for(m=1-l*l,c=0;Ze[((f<<7)+n|0)+(c<<2)>>2]=-ue(it[(c<<3)+h>>3]),c=c+1|0,c>>>0<=f>>>0;);if(v=v*m,it[(f<<3)+a>>3]=v,f=A,v==0)break}e[o>>2]=A}be=h+256|0}function sw(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=ue(0);g=be-16|0,be=g;e:{if(!o){h=2;break e}for(f=n+-1|0,n=0;A=+ue(On(Ze[(n<<2)+i>>2])),l=l>2],e[g+12>>2]=n+-1,f=f-n|0,e[c>>2]=f;t:{if(h=-1<(n|0)){e[c>>2]=n,f=n;break t}if((f|0)>=(h|0))break t;h=1;break e}if(h=0,(f|0)>=0){if(!o)break e;for(l=0,n=0;;){if(E=n<<2,l=l+ +ue(Ze[E+i>>2]*ue(1<>2]=f,n=n+1|0,(n|0)==(o|0))break e;l=l-+(f|0),f=e[c>>2]}}if(o)for(n=0,I=ue(1<<0-f),l=0;h=n<<2,l=l+ +ue(Ze[h+i>>2]/I),f=wm(l),f=(f|0)<(m|0)?(f|0)<(v|0)?v:f:C,e[a+h>>2]=f,l=l-+(f|0),n=n+1|0,(n|0)!=(o|0););h=0,e[c>>2]=0}return be=g+16|0,h}function lw(i,o,n,a,c,f){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0;var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0;e:{if(a>>>0>=13){if((o|0)<1)break e;for(Be=a+-13|0;;){G=0,he=0,ae=0,Se=0,ye=0,Te=0,Ee=0,je=0,te=0,B=0,T=0,I=0,E=0,C=0,A=0,v=0,m=0,g=0,h=0,a=0;t:switch(Be|0){case 19:G=ie(e[((l<<2)+i|0)+-128>>2],e[n+124>>2]);case 18:he=ie(e[((l<<2)+i|0)+-124>>2],e[n+120>>2])+G|0;case 17:ae=ie(e[((l<<2)+i|0)+-120>>2],e[n+116>>2])+he|0;case 16:Se=ie(e[((l<<2)+i|0)+-116>>2],e[n+112>>2])+ae|0;case 15:ye=ie(e[((l<<2)+i|0)+-112>>2],e[n+108>>2])+Se|0;case 14:Te=ie(e[((l<<2)+i|0)+-108>>2],e[n+104>>2])+ye|0;case 13:Ee=ie(e[((l<<2)+i|0)+-104>>2],e[n+100>>2])+Te|0;case 12:je=ie(e[((l<<2)+i|0)+-100>>2],e[n+96>>2])+Ee|0;case 11:te=ie(e[((l<<2)+i|0)+-96>>2],e[n+92>>2])+je|0;case 10:B=ie(e[((l<<2)+i|0)+-92>>2],e[n+88>>2])+te|0;case 9:T=ie(e[((l<<2)+i|0)+-88>>2],e[n+84>>2])+B|0;case 8:I=ie(e[((l<<2)+i|0)+-84>>2],e[n+80>>2])+T|0;case 7:E=ie(e[((l<<2)+i|0)+-80>>2],e[n+76>>2])+I|0;case 6:C=ie(e[((l<<2)+i|0)+-76>>2],e[n+72>>2])+E|0;case 5:A=ie(e[((l<<2)+i|0)+-72>>2],e[n+68>>2])+C|0;case 4:v=ie(e[((l<<2)+i|0)+-68>>2],e[n+64>>2])+A|0;case 3:m=ie(e[((l<<2)+i|0)+-64>>2],e[n+60>>2])+v|0;case 2:g=ie(e[((l<<2)+i|0)+-60>>2],e[n+56>>2])+m|0;case 1:h=ie(e[((l<<2)+i|0)+-56>>2],e[n+52>>2])+g|0;case 0:a=(l<<2)+i|0,a=((((((((((((ie(e[a+-52>>2],e[n+48>>2])+h|0)+ie(e[a+-48>>2],e[n+44>>2])|0)+ie(e[a+-44>>2],e[n+40>>2])|0)+ie(e[a+-40>>2],e[n+36>>2])|0)+ie(e[a+-36>>2],e[n+32>>2])|0)+ie(e[a+-32>>2],e[n+28>>2])|0)+ie(e[a+-28>>2],e[n+24>>2])|0)+ie(e[a+-24>>2],e[n+20>>2])|0)+ie(e[a+-20>>2],e[n+16>>2])|0)+ie(e[a+-16>>2],e[n+12>>2])|0)+ie(e[a+-12>>2],e[n+8>>2])|0)+ie(e[a+-8>>2],e[n+4>>2])|0)+ie(e[a+-4>>2],e[n>>2])|0;break;default:break t}if(h=l<<2,e[h+f>>2]=e[i+h>>2]-(a>>c),l=l+1|0,(l|0)==(o|0))break}break e}if(a>>>0>=9){if(a>>>0>=11){if((a|0)!=12){if((o|0)<1)break e;for(T=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],v=e[i+-28>>2],A=e[i+-32>>2],C=e[i+-36>>2],E=e[i+-40>>2],B=e[i+-44>>2],te=e[n>>2],G=e[n+4>>2],he=e[n+8>>2],ae=e[n+12>>2],Se=e[n+16>>2],ye=e[n+20>>2],Te=e[n+24>>2],Ee=e[n+28>>2],je=e[n+32>>2],Be=e[n+36>>2],Ye=e[n+40>>2],n=0;I=E,E=C,C=A,A=v,v=m,m=g,g=h,h=a,a=l,l=T,Qe=n<<2,T=e[Qe+i>>2],e[f+Qe>>2]=T-((((((((((ie(I,Be)+ie(B,Ye)|0)+ie(E,je)|0)+ie(C,Ee)|0)+ie(A,Te)|0)+ie(v,ye)|0)+ie(m,Se)|0)+ie(g,ae)|0)+ie(h,he)|0)+ie(a,G)|0)+ie(l,te)>>c),B=I,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(B=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],v=e[i+-28>>2],A=e[i+-32>>2],C=e[i+-36>>2],E=e[i+-40>>2],I=e[i+-44>>2],te=e[i+-48>>2],G=e[n>>2],he=e[n+4>>2],ae=e[n+8>>2],Se=e[n+12>>2],ye=e[n+16>>2],Te=e[n+20>>2],Ee=e[n+24>>2],je=e[n+28>>2],Be=e[n+32>>2],Ye=e[n+36>>2],Qe=e[n+40>>2],st=e[n+44>>2],n=0;T=I,I=E,E=C,C=A,A=v,v=m,m=g,g=h,h=a,a=l,l=B,at=n<<2,B=e[at+i>>2],e[f+at>>2]=B-(((((((((((ie(T,Qe)+ie(te,st)|0)+ie(I,Ye)|0)+ie(E,Be)|0)+ie(C,je)|0)+ie(A,Ee)|0)+ie(v,Te)|0)+ie(m,ye)|0)+ie(g,Se)|0)+ie(h,ae)|0)+ie(a,he)|0)+ie(l,G)>>c),te=T,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=10){if((o|0)<1)break e;for(E=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],v=e[i+-28>>2],A=e[i+-32>>2],I=e[i+-36>>2],B=e[n>>2],T=e[n+4>>2],te=e[n+8>>2],G=e[n+12>>2],he=e[n+16>>2],ae=e[n+20>>2],Se=e[n+24>>2],ye=e[n+28>>2],Te=e[n+32>>2],n=0;C=A,A=v,v=m,m=g,g=h,h=a,a=l,l=E,Ee=n<<2,E=e[Ee+i>>2],e[f+Ee>>2]=E-((((((((ie(C,ye)+ie(I,Te)|0)+ie(A,Se)|0)+ie(v,ae)|0)+ie(m,he)|0)+ie(g,G)|0)+ie(h,te)|0)+ie(a,T)|0)+ie(l,B)>>c),I=C,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(I=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],v=e[i+-28>>2],A=e[i+-32>>2],C=e[i+-36>>2],T=e[i+-40>>2],B=e[n>>2],te=e[n+4>>2],G=e[n+8>>2],he=e[n+12>>2],ae=e[n+16>>2],Se=e[n+20>>2],ye=e[n+24>>2],Te=e[n+28>>2],Ee=e[n+32>>2],je=e[n+36>>2],n=0;E=C,C=A,A=v,v=m,m=g,g=h,h=a,a=l,l=I,Be=n<<2,I=e[Be+i>>2],e[f+Be>>2]=I-(((((((((ie(E,Ee)+ie(T,je)|0)+ie(C,Te)|0)+ie(A,ye)|0)+ie(v,Se)|0)+ie(m,ae)|0)+ie(g,he)|0)+ie(h,G)|0)+ie(a,te)|0)+ie(l,B)>>c),T=E,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=5){if(a>>>0>=7){if((a|0)!=8){if((o|0)<1)break e;for(A=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],C=e[i+-28>>2],E=e[n>>2],I=e[n+4>>2],B=e[n+8>>2],T=e[n+12>>2],te=e[n+16>>2],G=e[n+20>>2],he=e[n+24>>2],n=0;v=m,m=g,g=h,h=a,a=l,l=A,ae=n<<2,A=e[ae+i>>2],e[f+ae>>2]=A-((((((ie(v,G)+ie(C,he)|0)+ie(m,te)|0)+ie(g,T)|0)+ie(h,B)|0)+ie(a,I)|0)+ie(l,E)>>c),C=v,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(C=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],m=e[i+-24>>2],v=e[i+-28>>2],E=e[i+-32>>2],I=e[n>>2],B=e[n+4>>2],T=e[n+8>>2],te=e[n+12>>2],G=e[n+16>>2],he=e[n+20>>2],ae=e[n+24>>2],Se=e[n+28>>2],n=0;A=v,v=m,m=g,g=h,h=a,a=l,l=C,ye=n<<2,C=e[ye+i>>2],e[f+ye>>2]=C-(((((((ie(A,ae)+ie(E,Se)|0)+ie(v,he)|0)+ie(m,G)|0)+ie(g,te)|0)+ie(h,T)|0)+ie(a,B)|0)+ie(l,I)>>c),E=A,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=6){if((o|0)<1)break e;for(m=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],v=e[i+-20>>2],A=e[n>>2],C=e[n+4>>2],E=e[n+8>>2],I=e[n+12>>2],B=e[n+16>>2],n=0;g=h,h=a,a=l,l=m,T=n<<2,m=e[T+i>>2],e[f+T>>2]=m-((((ie(g,I)+ie(v,B)|0)+ie(h,E)|0)+ie(a,C)|0)+ie(l,A)>>c),v=g,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(v=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],h=e[i+-16>>2],g=e[i+-20>>2],A=e[i+-24>>2],C=e[n>>2],E=e[n+4>>2],I=e[n+8>>2],B=e[n+12>>2],T=e[n+16>>2],te=e[n+20>>2],n=0;m=g,g=h,h=a,a=l,l=v,G=n<<2,v=e[G+i>>2],e[f+G>>2]=v-(((((ie(m,T)+ie(A,te)|0)+ie(g,B)|0)+ie(h,I)|0)+ie(a,E)|0)+ie(l,C)>>c),A=m,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=3){if((a|0)!=4){if((o|0)<1)break e;for(h=e[i+-4>>2],l=e[i+-8>>2],g=e[i+-12>>2],m=e[n>>2],v=e[n+4>>2],A=e[n+8>>2],n=0;a=l,l=h,C=n<<2,h=e[C+i>>2],e[f+C>>2]=h-((ie(a,v)+ie(g,A)|0)+ie(l,m)>>c),g=a,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(g=e[i+-4>>2],l=e[i+-8>>2],a=e[i+-12>>2],m=e[i+-16>>2],v=e[n>>2],A=e[n+4>>2],C=e[n+8>>2],E=e[n+12>>2],n=0;h=a,a=l,l=g,I=n<<2,g=e[I+i>>2],e[f+I>>2]=g-(((ie(h,C)+ie(m,E)|0)+ie(a,A)|0)+ie(l,v)>>c),m=h,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=2){if((o|0)<1)break e;for(l=e[i+-4>>2],a=e[n>>2],n=0;h=ie(a,l),g=n<<2,l=e[g+i>>2],e[f+g>>2]=l-(h>>c),n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(a=e[i+-4>>2],h=e[i+-8>>2],g=e[n>>2],m=e[n+4>>2],n=0;l=a,v=n<<2,a=e[v+i>>2],e[f+v>>2]=a-(ie(l,g)+ie(h,m)>>c),h=l,n=n+1|0,(n|0)!=(o|0););}}function cw(i,o,n,a,c,f){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0;var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,gt=0,yt=0,At=0,Pt=0,It=0,Ft=0,Bt=0,Ut=0,Gt=0,sn=0,Bn=0,cr=0,Vr=0,Wr=0,$r=0;e:{if(a>>>0>=13){if((o|0)<1)break e;for(te=c,C=a+-13|0;;){c=0,a=0;t:switch(C|0){case 19:a=e[((T<<2)+i|0)+-128>>2],c=a,h=a>>31,a=e[n+124>>2],c=oe(c,h,a,a>>31),a=ne;case 18:h=e[((T<<2)+i|0)+-124>>2],l=h,g=h>>31,h=e[n+120>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 17:h=e[((T<<2)+i|0)+-120>>2],l=h,g=h>>31,h=e[n+116>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 16:h=e[((T<<2)+i|0)+-116>>2],l=h,g=h>>31,h=e[n+112>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 15:h=e[((T<<2)+i|0)+-112>>2],l=h,g=h>>31,h=e[n+108>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 14:h=e[((T<<2)+i|0)+-108>>2],l=h,g=h>>31,h=e[n+104>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 13:h=e[((T<<2)+i|0)+-104>>2],l=h,g=h>>31,h=e[n+100>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 12:h=e[((T<<2)+i|0)+-100>>2],l=h,g=h>>31,h=e[n+96>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 11:h=e[((T<<2)+i|0)+-96>>2],l=h,g=h>>31,h=e[n+92>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 10:h=e[((T<<2)+i|0)+-92>>2],l=h,g=h>>31,h=e[n+88>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 9:h=e[((T<<2)+i|0)+-88>>2],l=h,g=h>>31,h=e[n+84>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 8:h=e[((T<<2)+i|0)+-84>>2],l=h,g=h>>31,h=e[n+80>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 7:h=e[((T<<2)+i|0)+-80>>2],l=h,g=h>>31,h=e[n+76>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 6:h=e[((T<<2)+i|0)+-76>>2],l=h,g=h>>31,h=e[n+72>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 5:h=e[((T<<2)+i|0)+-72>>2],l=h,g=h>>31,h=e[n+68>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 4:h=e[((T<<2)+i|0)+-68>>2],l=h,g=h>>31,h=e[n+64>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 3:h=e[((T<<2)+i|0)+-64>>2],l=h,g=h>>31,h=e[n+60>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 2:h=e[((T<<2)+i|0)+-60>>2],l=h,g=h>>31,h=e[n+56>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 1:h=e[((T<<2)+i|0)+-56>>2],l=h,g=h>>31,h=e[n+52>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 0:g=(T<<2)+i|0,h=e[g+-52>>2],l=h,m=h>>31,h=e[n+48>>2],h=oe(l,m,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,a=e[g+-48>>2],c=a,m=a>>31,a=e[n+44>>2],a=oe(c,m,a,a>>31),c=a+h|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-44>>2],h=a,m=a>>31,a=e[n+40>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-40>>2],h=a,m=a>>31,a=e[n+36>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-36>>2],h=a,m=a>>31,a=e[n+32>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-32>>2],h=a,m=a>>31,a=e[n+28>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-28>>2],h=a,m=a>>31,a=e[n+24>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-24>>2],h=a,m=a>>31,a=e[n+20>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-20>>2],h=a,m=a>>31,a=e[n+16>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-16>>2],h=a,m=a>>31,a=e[n+12>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-12>>2],h=a,m=a>>31,a=e[n+8>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-8>>2],h=a,m=a>>31,a=e[n+4>>2],a=oe(h,m,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=e[g+-4>>2],h=a,g=a>>31,a=e[n>>2],a=oe(h,g,a,a>>31),c=a+c|0,l=ne+l|0,l=c>>>0>>0?l+1|0:l,a=l;break;default:break t}if(h=T<<2,l=h+f|0,m=e[i+h>>2],h=a,a=te,g=a&31,e[l>>2]=m-(32<=(a&63)>>>0?h>>g:((1<>>g),T=T+1|0,(T|0)==(o|0))break}break e}if(a>>>0>=9){if(a>>>0>=11){if((a|0)!=12){if((o|0)<1)break e;for(v=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],g=e[i+-28>>2],m=e[i+-32>>2],A=e[i+-36>>2],G=e[i+-40>>2],E=e[i+-44>>2],l=e[n>>2],sn=l,Bn=l>>31,l=e[n+4>>2],cr=l,Bt=l>>31,l=e[n+8>>2],Ut=l,Gt=l>>31,l=e[n+12>>2],Pt=l,It=l>>31,l=e[n+16>>2],Ft=l,gt=l>>31,l=e[n+20>>2],yt=l,At=l>>31,l=e[n+24>>2],at=l,st=l>>31,l=e[n+28>>2],je=l,Qe=l>>31,l=e[n+32>>2],Ye=l,Ee=l>>31,l=e[n+36>>2],Te=l,Be=l>>31,n=e[n+40>>2],ye=n,Se=n>>31,n=0;B=G,G=A,A=m,m=g,g=C,C=h,h=te,te=a,a=T,T=v,l=n<<2,he=l+f|0,v=e[i+l>>2],I=oe(B,B>>31,Te,Be),l=ne,E=oe(E,E>>31,ye,Se),I=E+I|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,E=oe(G,G>>31,Ye,Ee),I=E+I|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,E=oe(A,A>>31,je,Qe),I=E+I|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,E=oe(m,m>>31,at,st),I=E+I|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,E=oe(g,g>>31,yt,At),I=E+I|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,E=oe(C,C>>31,Ft,gt),I=E+I|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,E=oe(h,h>>31,Pt,It),I=E+I|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,E=oe(te,te>>31,Ut,Gt),I=E+I|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,E=oe(a,a>>31,cr,Bt),I=E+I|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,E=oe(T,T>>31,sn,Bn),I=E+I|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,E=l,l=c,ae=l&31,e[he>>2]=v-(32<=(l&63)>>>0?E>>ae:((1<>>ae),E=B,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(E=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],g=e[i+-28>>2],m=e[i+-32>>2],A=e[i+-36>>2],G=e[i+-40>>2],B=e[i+-44>>2],l=e[i+-48>>2],v=e[n>>2],Vr=v,Wr=v>>31,v=e[n+4>>2],$r=v,sn=v>>31,v=e[n+8>>2],Bn=v,cr=v>>31,v=e[n+12>>2],Bt=v,Ut=v>>31,v=e[n+16>>2],Gt=v,Pt=v>>31,v=e[n+20>>2],It=v,Ft=v>>31,v=e[n+24>>2],gt=v,yt=v>>31,v=e[n+28>>2],At=v,at=v>>31,v=e[n+32>>2],st=v,je=v>>31,v=e[n+36>>2],Qe=v,Ye=v>>31,v=e[n+40>>2],Ee=v,Te=v>>31,n=e[n+44>>2],Be=n,ye=n>>31,n=0;v=B,B=G,G=A,A=m,m=g,g=C,C=h,h=te,te=a,a=T,T=E,E=n<<2,Se=E+f|0,E=e[i+E>>2],I=oe(v,v>>31,Ee,Te),ae=ne,he=I,I=oe(l,l>>31,Be,ye),he=he+I|0,l=ne+ae|0,l=he>>>0>>0?l+1|0:l,I=oe(B,B>>31,Qe,Ye),ae=I+he|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,I=oe(G,G>>31,st,je),ae=I+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,I=oe(A,A>>31,At,at),ae=I+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,I=oe(m,m>>31,gt,yt),ae=I+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,I=oe(g,g>>31,It,Ft),ae=I+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,I=oe(C,C>>31,Gt,Pt),ae=I+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,I=oe(h,h>>31,Bt,Ut),ae=I+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,I=oe(te,te>>31,Bn,cr),ae=I+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,I=oe(a,a>>31,$r,sn),ae=I+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,I=oe(T,T>>31,Vr,Wr),ae=I+ae|0,l=ne+l|0,l=ae>>>0>>0?l+1|0:l,I=l,l=c,he=l&31,e[Se>>2]=E-(32<=(l&63)>>>0?I>>he:((1<>>he),l=v,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=10){if((o|0)<1)break e;for(G=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],g=e[i+-28>>2],m=e[i+-32>>2],B=e[i+-36>>2],A=e[n>>2],Pt=A,It=A>>31,A=e[n+4>>2],Ft=A,gt=A>>31,A=e[n+8>>2],yt=A,At=A>>31,A=e[n+12>>2],at=A,st=A>>31,A=e[n+16>>2],je=A,Qe=A>>31,A=e[n+20>>2],Ye=A,Ee=A>>31,A=e[n+24>>2],Te=A,Be=A>>31,A=e[n+28>>2],ye=A,Se=A>>31,n=e[n+32>>2],he=n,ae=n>>31,n=0;A=m,m=g,g=C,C=h,h=te,te=a,a=T,T=G,l=n<<2,I=l+f|0,G=e[i+l>>2],v=oe(A,A>>31,ye,Se),l=ne,B=oe(B,B>>31,he,ae),v=B+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,B=oe(m,m>>31,Te,Be),v=B+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,B=oe(g,g>>31,Ye,Ee),v=B+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,B=oe(C,C>>31,je,Qe),v=B+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,B=oe(h,h>>31,at,st),v=B+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,B=oe(te,te>>31,yt,At),v=B+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,B=oe(a,a>>31,Ft,gt),v=B+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,B=oe(T,T>>31,Pt,It),v=B+v|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,B=l,l=c,E=l&31,e[I>>2]=G-(32<=(l&63)>>>0?B>>E:((1<>>E),B=A,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(B=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],g=e[i+-28>>2],m=e[i+-32>>2],A=e[i+-36>>2],v=e[i+-40>>2],l=e[n>>2],Bt=l,Ut=l>>31,l=e[n+4>>2],Gt=l,Pt=l>>31,l=e[n+8>>2],It=l,Ft=l>>31,l=e[n+12>>2],gt=l,yt=l>>31,l=e[n+16>>2],At=l,at=l>>31,l=e[n+20>>2],st=l,je=l>>31,l=e[n+24>>2],Qe=l,Ye=l>>31,l=e[n+28>>2],Ee=l,Te=l>>31,l=e[n+32>>2],Be=l,ye=l>>31,n=e[n+36>>2],Se=n,he=n>>31,n=0;G=A,A=m,m=g,g=C,C=h,h=te,te=a,a=T,T=B,l=n<<2,ae=l+f|0,B=e[i+l>>2],E=oe(G,G>>31,Be,ye),l=ne,v=oe(v,v>>31,Se,he),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(A,A>>31,Ee,Te),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(m,m>>31,Qe,Ye),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(g,g>>31,st,je),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(C,C>>31,At,at),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(h,h>>31,gt,yt),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(te,te>>31,It,Ft),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(a,a>>31,Gt,Pt),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=oe(T,T>>31,Bt,Ut),E=v+E|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=l,l=c,I=l&31,e[ae>>2]=B-(32<=(l&63)>>>0?v>>I:((1<>>I),v=G,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=5){if(a>>>0>=7){if((a|0)!=8){if((o|0)<1)break e;for(m=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],A=e[i+-28>>2],g=e[n>>2],at=g,st=g>>31,g=e[n+4>>2],je=g,Qe=g>>31,g=e[n+8>>2],Ye=g,Ee=g>>31,g=e[n+12>>2],Te=g,Be=g>>31,g=e[n+16>>2],ye=g,Se=g>>31,g=e[n+20>>2],he=g,ae=g>>31,n=e[n+24>>2],I=n,E=n>>31,n=0;g=C,C=h,h=te,te=a,a=T,T=m,m=n<<2,v=m+f|0,m=e[i+m>>2],G=oe(g,g>>31,he,ae),l=ne,A=oe(A,A>>31,I,E),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,A=oe(C,C>>31,ye,Se),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,A=oe(h,h>>31,Te,Be),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,A=oe(te,te>>31,Ye,Ee),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,A=oe(a,a>>31,je,Qe),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,A=oe(T,T>>31,at,st),G=A+G|0,l=ne+l|0,l=G>>>0>>0?l+1|0:l,B=c&31,e[v>>2]=m-(32<=(c&63)>>>0?l>>B:((1<>>B),A=g,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(A=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],C=e[i+-24>>2],g=e[i+-28>>2],G=e[i+-32>>2],m=e[n>>2],gt=m,yt=m>>31,m=e[n+4>>2],At=m,at=m>>31,m=e[n+8>>2],st=m,je=m>>31,m=e[n+12>>2],Qe=m,Ye=m>>31,m=e[n+16>>2],Ee=m,Te=m>>31,m=e[n+20>>2],Be=m,ye=m>>31,m=e[n+24>>2],Se=m,he=m>>31,n=e[n+28>>2],ae=n,I=n>>31,n=0;m=g,g=C,C=h,h=te,te=a,a=T,T=A,A=n<<2,E=A+f|0,A=e[i+A>>2],B=oe(m,m>>31,Se,he),l=ne,G=oe(G,G>>31,ae,I),B=G+B|0,l=ne+l|0,l=B>>>0>>0?l+1|0:l,G=oe(g,g>>31,Be,ye),B=G+B|0,l=ne+l|0,l=B>>>0>>0?l+1|0:l,G=oe(C,C>>31,Ee,Te),B=G+B|0,l=ne+l|0,l=B>>>0>>0?l+1|0:l,G=oe(h,h>>31,Qe,Ye),B=G+B|0,l=ne+l|0,l=B>>>0>>0?l+1|0:l,G=oe(te,te>>31,st,je),B=G+B|0,l=ne+l|0,l=B>>>0>>0?l+1|0:l,G=oe(a,a>>31,At,at),B=G+B|0,l=ne+l|0,l=B>>>0>>0?l+1|0:l,G=oe(T,T>>31,gt,yt),B=G+B|0,l=ne+l|0,l=B>>>0>>0?l+1|0:l,G=l,l=c,v=l&31,e[E>>2]=A-(32<=(l&63)>>>0?G>>v:((1<>>v),G=m,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=6){if((o|0)<1)break e;for(C=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],g=e[i+-20>>2],h=e[n>>2],Ee=h,Te=h>>31,h=e[n+4>>2],Be=h,ye=h>>31,h=e[n+8>>2],Se=h,he=h>>31,h=e[n+12>>2],ae=h,I=h>>31,n=e[n+16>>2],E=n,v=n>>31,n=0;h=te,te=a,a=T,T=C,C=n<<2,B=C+f|0,C=e[i+C>>2],A=oe(h,h>>31,ae,I),m=ne,g=oe(g,g>>31,E,v),A=g+A|0,l=ne+m|0,l=A>>>0>>0?l+1|0:l,g=oe(te,te>>31,Se,he),m=g+A|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,g=oe(a,a>>31,Be,ye),m=g+m|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,g=oe(T,T>>31,Ee,Te),m=g+m|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,A=c&31,e[B>>2]=C-(32<=(c&63)>>>0?l>>A:((1<>>A),g=h,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(g=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],te=e[i+-16>>2],h=e[i+-20>>2],m=e[i+-24>>2],C=e[n>>2],Qe=C,Ye=C>>31,C=e[n+4>>2],Ee=C,Te=C>>31,C=e[n+8>>2],Be=C,ye=C>>31,C=e[n+12>>2],Se=C,he=C>>31,C=e[n+16>>2],ae=C,I=C>>31,n=e[n+20>>2],E=n,v=n>>31,n=0;C=h,h=te,te=a,a=T,T=g,g=n<<2,B=g+f|0,g=e[i+g>>2],l=oe(C,C>>31,ae,I),A=ne,m=oe(m,m>>31,E,v),je=m+l|0,l=ne+A|0,l=je>>>0>>0?l+1|0:l,m=oe(h,h>>31,Se,he),A=m+je|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,m=oe(te,te>>31,Be,ye),A=m+A|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,m=oe(a,a>>31,Ee,Te),A=m+A|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,m=oe(T,T>>31,Qe,Ye),A=m+A|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,G=c&31,e[B>>2]=g-(32<=(c&63)>>>0?l>>G:((1<>>G),m=C,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=3){if((a|0)!=4){if((o|0)<1)break e;for(te=e[i+-4>>2],T=e[i+-8>>2],h=e[i+-12>>2],a=e[n>>2],ae=a,I=a>>31,a=e[n+4>>2],E=a,v=a>>31,n=e[n+8>>2],B=n,G=n>>31,n=0;a=T,T=te,te=n<<2,A=te+f|0,te=e[i+te>>2],m=te,g=oe(a,a>>31,E,v),C=ne,h=oe(h,h>>31,B,G),g=h+g|0,l=ne+C|0,l=g>>>0>>0?l+1|0:l,h=oe(T,T>>31,ae,I),C=h+g|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,h=c,g=h&31,e[A>>2]=m-(32<=(h&63)>>>0?l>>g:((1<>>g),h=a,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(h=e[i+-4>>2],T=e[i+-8>>2],a=e[i+-12>>2],C=e[i+-16>>2],te=e[n>>2],ye=te,Se=te>>31,te=e[n+4>>2],he=te,ae=te>>31,te=e[n+8>>2],I=te,E=I>>31,n=e[n+12>>2],v=n,B=n>>31,n=0;te=a,a=T,T=h,h=n<<2,G=h+f|0,h=e[i+h>>2],m=oe(te,te>>31,I,E),g=ne,C=oe(C,C>>31,v,B),m=C+m|0,l=ne+g|0,l=m>>>0>>0?l+1|0:l,C=oe(a,a>>31,he,ae),g=C+m|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,C=oe(T,T>>31,ye,Se),g=C+g|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,m=c&31,e[G>>2]=h-(32<=(c&63)>>>0?l>>m:((1<>>m),C=te,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=2){if((o|0)<1)break e;for(T=e[i+-4>>2],n=e[n>>2],m=n,g=n>>31,n=0;a=n<<2,l=a+f|0,te=e[i+a>>2],T=oe(T,T>>31,m,g),h=ne,a=c,C=a&31,e[l>>2]=te-(32<=(a&63)>>>0?h>>C:((1<>>C),T=te,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(a=e[i+-4>>2],te=e[i+-8>>2],T=e[n>>2],v=T,B=v>>31,n=e[n+4>>2],G=n,A=n>>31,n=0;T=a,a=n<<2,m=a+f|0,a=e[i+a>>2],C=oe(T,T>>31,v,B),h=ne,te=oe(te,te>>31,G,A),C=te+C|0,l=ne+h|0,l=C>>>0>>0?l+1|0:l,h=C,C=c&31,e[m>>2]=a-(32<=(c&63)>>>0?l>>C:((1<>>C),te=T,n=n+1|0,(n|0)!=(o|0););}}function uw(i,o,n,a,c,f){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0;var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0;e:{if(a>>>0>=13){if((o|0)<1)break e;for(G=a+-13|0;;){Be=0,je=0,Ee=0,Te=0,ye=0,Se=0,ae=0,he=0,te=0,T=0,C=0,v=0,I=0,m=0,E=0,h=0,B=0,A=0,g=0,a=0;t:switch(G|0){case 19:Be=ie(e[((l<<2)+f|0)+-128>>2],e[n+124>>2]);case 18:je=ie(e[((l<<2)+f|0)+-124>>2],e[n+120>>2])+Be|0;case 17:Ee=ie(e[((l<<2)+f|0)+-120>>2],e[n+116>>2])+je|0;case 16:Te=ie(e[((l<<2)+f|0)+-116>>2],e[n+112>>2])+Ee|0;case 15:ye=ie(e[((l<<2)+f|0)+-112>>2],e[n+108>>2])+Te|0;case 14:Se=ie(e[((l<<2)+f|0)+-108>>2],e[n+104>>2])+ye|0;case 13:ae=ie(e[((l<<2)+f|0)+-104>>2],e[n+100>>2])+Se|0;case 12:he=ie(e[((l<<2)+f|0)+-100>>2],e[n+96>>2])+ae|0;case 11:te=ie(e[((l<<2)+f|0)+-96>>2],e[n+92>>2])+he|0;case 10:T=ie(e[((l<<2)+f|0)+-92>>2],e[n+88>>2])+te|0;case 9:C=ie(e[((l<<2)+f|0)+-88>>2],e[n+84>>2])+T|0;case 8:v=ie(e[((l<<2)+f|0)+-84>>2],e[n+80>>2])+C|0;case 7:I=ie(e[((l<<2)+f|0)+-80>>2],e[n+76>>2])+v|0;case 6:m=ie(e[((l<<2)+f|0)+-76>>2],e[n+72>>2])+I|0;case 5:E=ie(e[((l<<2)+f|0)+-72>>2],e[n+68>>2])+m|0;case 4:h=ie(e[((l<<2)+f|0)+-68>>2],e[n+64>>2])+E|0;case 3:B=ie(e[((l<<2)+f|0)+-64>>2],e[n+60>>2])+h|0;case 2:A=ie(e[((l<<2)+f|0)+-60>>2],e[n+56>>2])+B|0;case 1:g=ie(e[((l<<2)+f|0)+-56>>2],e[n+52>>2])+A|0;case 0:a=(l<<2)+f|0,a=((((((((((((ie(e[a+-52>>2],e[n+48>>2])+g|0)+ie(e[a+-48>>2],e[n+44>>2])|0)+ie(e[a+-44>>2],e[n+40>>2])|0)+ie(e[a+-40>>2],e[n+36>>2])|0)+ie(e[a+-36>>2],e[n+32>>2])|0)+ie(e[a+-32>>2],e[n+28>>2])|0)+ie(e[a+-28>>2],e[n+24>>2])|0)+ie(e[a+-24>>2],e[n+20>>2])|0)+ie(e[a+-20>>2],e[n+16>>2])|0)+ie(e[a+-16>>2],e[n+12>>2])|0)+ie(e[a+-12>>2],e[n+8>>2])|0)+ie(e[a+-8>>2],e[n+4>>2])|0)+ie(e[a+-4>>2],e[n>>2])|0;break;default:break t}if(g=l<<2,e[g+f>>2]=e[i+g>>2]+(a>>c),l=l+1|0,(l|0)==(o|0))break}break e}if(a>>>0>=9){if(a>>>0>=11){if((a|0)!=12){if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],B=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],m=e[f+-32>>2],I=e[f+-36>>2],v=e[f+-40>>2],C=e[f+-44>>2],Qe=e[n>>2],Ye=e[n+4>>2],Be=e[n+8>>2],je=e[n+12>>2],Ee=e[n+16>>2],Te=e[n+20>>2],ye=e[n+24>>2],Se=e[n+28>>2],ae=e[n+32>>2],he=e[n+36>>2],te=e[n+40>>2],n=0;G=v,C=ie(v,he)+ie(C,te)|0,v=I,C=C+ie(ae,v)|0,I=m,C=ie(m,Se)+C|0,m=E,C=C+ie(ye,m)|0,E=h,C=ie(h,Te)+C|0,h=B,C=C+ie(Ee,h)|0,B=A,C=ie(A,je)+C|0,A=g,T=ie(g,Be)+C|0,g=a,C=n<<2,T=ie(a,Ye)+T|0,a=l,l=e[C+i>>2]+(T+ie(Qe,a)>>c)|0,e[f+C>>2]=l,C=G,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],B=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],m=e[f+-32>>2],I=e[f+-36>>2],v=e[f+-40>>2],C=e[f+-44>>2],T=e[f+-48>>2],at=e[n>>2],st=e[n+4>>2],Qe=e[n+8>>2],Ye=e[n+12>>2],Be=e[n+16>>2],je=e[n+20>>2],Ee=e[n+24>>2],Te=e[n+28>>2],ye=e[n+32>>2],Se=e[n+36>>2],ae=e[n+40>>2],he=e[n+44>>2],n=0;G=C,T=ie(C,ae)+ie(T,he)|0,C=v,T=ie(v,Se)+T|0,v=I,T=T+ie(ye,v)|0,I=m,T=ie(m,Te)+T|0,m=E,T=T+ie(Ee,m)|0,E=h,T=ie(h,je)+T|0,h=B,T=T+ie(Be,h)|0,B=A,T=ie(A,Ye)+T|0,A=g,te=ie(g,Qe)+T|0,g=a,T=n<<2,te=ie(a,st)+te|0,a=l,l=e[T+i>>2]+(te+ie(at,a)>>c)|0,e[f+T>>2]=l,T=G,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=10){if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],B=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],m=e[f+-32>>2],I=e[f+-36>>2],Ee=e[n>>2],Te=e[n+4>>2],ye=e[n+8>>2],Se=e[n+12>>2],ae=e[n+16>>2],he=e[n+20>>2],te=e[n+24>>2],T=e[n+28>>2],G=e[n+32>>2],n=0;v=m,I=ie(m,T)+ie(I,G)|0,m=E,I=I+ie(te,m)|0,E=h,I=ie(h,he)+I|0,h=B,I=I+ie(ae,h)|0,B=A,I=ie(A,Se)+I|0,A=g,C=ie(g,ye)+I|0,g=a,I=n<<2,C=ie(a,Te)+C|0,a=l,l=e[I+i>>2]+(C+ie(Ee,a)>>c)|0,e[f+I>>2]=l,I=v,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],B=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],m=e[f+-32>>2],I=e[f+-36>>2],v=e[f+-40>>2],Be=e[n>>2],je=e[n+4>>2],Ee=e[n+8>>2],Te=e[n+12>>2],ye=e[n+16>>2],Se=e[n+20>>2],ae=e[n+24>>2],he=e[n+28>>2],te=e[n+32>>2],T=e[n+36>>2],n=0;C=I,v=ie(te,C)+ie(v,T)|0,I=m,v=ie(m,he)+v|0,m=E,v=v+ie(ae,m)|0,E=h,v=ie(h,Se)+v|0,h=B,v=v+ie(ye,h)|0,B=A,v=ie(A,Te)+v|0,A=g,G=ie(g,Ee)+v|0,g=a,v=n<<2,G=ie(a,je)+G|0,a=l,l=e[v+i>>2]+(G+ie(Be,a)>>c)|0,e[f+v>>2]=l,v=C,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=5){if(a>>>0>=7){if((a|0)!=8){if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],B=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],ae=e[n>>2],he=e[n+4>>2],te=e[n+8>>2],T=e[n+12>>2],G=e[n+16>>2],C=e[n+20>>2],v=e[n+24>>2],n=0;m=h,E=ie(h,C)+ie(v,E)|0,h=B,E=E+ie(G,h)|0,B=A,E=ie(A,T)+E|0,A=g,I=ie(g,te)+E|0,g=a,E=n<<2,I=ie(a,he)+I|0,a=l,l=e[E+i>>2]+(I+ie(ae,a)>>c)|0,e[f+E>>2]=l,E=m,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],B=e[f+-20>>2],h=e[f+-24>>2],E=e[f+-28>>2],m=e[f+-32>>2],ye=e[n>>2],Se=e[n+4>>2],ae=e[n+8>>2],he=e[n+12>>2],te=e[n+16>>2],T=e[n+20>>2],G=e[n+24>>2],C=e[n+28>>2],n=0;I=E,m=ie(G,E)+ie(m,C)|0,E=h,m=ie(h,T)+m|0,h=B,m=m+ie(te,h)|0,B=A,m=ie(A,he)+m|0,A=g,v=ie(g,ae)+m|0,g=a,m=n<<2,v=ie(a,Se)+v|0,a=l,l=e[m+i>>2]+(v+ie(ye,a)>>c)|0,e[f+m>>2]=l,m=I,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=6){if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],B=e[f+-20>>2],G=e[n>>2],C=e[n+4>>2],v=e[n+8>>2],I=e[n+12>>2],m=e[n+16>>2],n=0;h=A,B=ie(I,h)+ie(m,B)|0,A=g,E=ie(g,v)+B|0,g=a,B=n<<2,E=ie(a,C)+E|0,a=l,l=e[B+i>>2]+(E+ie(G,a)>>c)|0,e[f+B>>2]=l,B=h,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],B=e[f+-20>>2],h=e[f+-24>>2],te=e[n>>2],T=e[n+4>>2],G=e[n+8>>2],C=e[n+12>>2],v=e[n+16>>2],I=e[n+20>>2],n=0;E=B,h=ie(v,E)+ie(h,I)|0,B=A,h=ie(A,C)+h|0,A=g,m=ie(g,G)+h|0,g=a,h=n<<2,m=ie(a,T)+m|0,a=l,l=e[h+i>>2]+(m+ie(te,a)>>c)|0,e[f+h>>2]=l,h=E,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=3){if((a|0)!=4){if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],m=e[n>>2],E=e[n+4>>2],h=e[n+8>>2],n=0;A=a,B=n<<2,g=ie(a,E)+ie(g,h)|0,a=l,l=e[B+i>>2]+(g+ie(m,a)>>c)|0,e[f+B>>2]=l,g=A,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],g=e[f+-12>>2],A=e[f+-16>>2],v=e[n>>2],I=e[n+4>>2],m=e[n+8>>2],E=e[n+12>>2],n=0;B=g,h=ie(g,m)+ie(A,E)|0,g=a,A=n<<2,h=ie(a,I)+h|0,a=l,l=e[A+i>>2]+(h+ie(v,a)>>c)|0,e[f+A>>2]=l,A=B,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=2){if((o|0)<1)break e;for(l=e[f+-4>>2],g=e[n>>2],n=0;a=n<<2,l=e[a+i>>2]+(ie(l,g)>>c)|0,e[a+f>>2]=l,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(l=e[f+-4>>2],a=e[f+-8>>2],h=e[n>>2],B=e[n+4>>2],n=0;g=l,A=n<<2,l=e[A+i>>2]+(ie(l,h)+ie(a,B)>>c)|0,e[f+A>>2]=l,a=g,n=n+1|0,(n|0)!=(o|0););}}function fw(i,o,n,a,c,f){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0;var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,gt=0,yt=0,At=0,Pt=0,It=0,Ft=0,Bt=0,Ut=0,Gt=0,sn=0,Bn=0,cr=0,Vr=0,Wr=0,$r=0,di=0;e:{if(a>>>0>=13){if((o|0)<1)break e;for(E=c,C=a+-13|0;;){c=0,a=0;t:switch(C|0){case 19:a=e[((m<<2)+f|0)+-128>>2],c=a,h=a>>31,a=e[n+124>>2],c=oe(c,h,a,a>>31),a=ne;case 18:h=e[((m<<2)+f|0)+-124>>2],l=h,g=h>>31,h=e[n+120>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 17:h=e[((m<<2)+f|0)+-120>>2],l=h,g=h>>31,h=e[n+116>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 16:h=e[((m<<2)+f|0)+-116>>2],l=h,g=h>>31,h=e[n+112>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 15:h=e[((m<<2)+f|0)+-112>>2],l=h,g=h>>31,h=e[n+108>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 14:h=e[((m<<2)+f|0)+-108>>2],l=h,g=h>>31,h=e[n+104>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 13:h=e[((m<<2)+f|0)+-104>>2],l=h,g=h>>31,h=e[n+100>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 12:h=e[((m<<2)+f|0)+-100>>2],l=h,g=h>>31,h=e[n+96>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 11:h=e[((m<<2)+f|0)+-96>>2],l=h,g=h>>31,h=e[n+92>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 10:h=e[((m<<2)+f|0)+-92>>2],l=h,g=h>>31,h=e[n+88>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 9:h=e[((m<<2)+f|0)+-88>>2],l=h,g=h>>31,h=e[n+84>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 8:h=e[((m<<2)+f|0)+-84>>2],l=h,g=h>>31,h=e[n+80>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 7:h=e[((m<<2)+f|0)+-80>>2],l=h,g=h>>31,h=e[n+76>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 6:h=e[((m<<2)+f|0)+-76>>2],l=h,g=h>>31,h=e[n+72>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 5:h=e[((m<<2)+f|0)+-72>>2],l=h,g=h>>31,h=e[n+68>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 4:h=e[((m<<2)+f|0)+-68>>2],l=h,g=h>>31,h=e[n+64>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 3:h=e[((m<<2)+f|0)+-64>>2],l=h,g=h>>31,h=e[n+60>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 2:h=e[((m<<2)+f|0)+-60>>2],l=h,g=h>>31,h=e[n+56>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 1:h=e[((m<<2)+f|0)+-56>>2],l=h,g=h>>31,h=e[n+52>>2],h=oe(l,g,h,h>>31)+c|0,l=a+ne|0,l=h>>>0>>0?l+1|0:l,c=h,a=l;case 0:h=(m<<2)+f|0,g=e[h+-52>>2],l=g,v=g>>31,g=e[n+48>>2],g=oe(l,v,g,g>>31)+c|0,l=a+ne|0,l=g>>>0>>0?l+1|0:l,a=e[h+-48>>2],c=a,v=a>>31,a=e[n+44>>2],c=oe(c,v,a,a>>31),a=c+g|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-44>>2],c=a,v=a>>31,a=e[n+40>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-40>>2],c=a,v=a>>31,a=e[n+36>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-36>>2],c=a,v=a>>31,a=e[n+32>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-32>>2],c=a,v=a>>31,a=e[n+28>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-28>>2],c=a,v=a>>31,a=e[n+24>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-24>>2],c=a,v=a>>31,a=e[n+20>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-20>>2],c=a,v=a>>31,a=e[n+16>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-16>>2],c=a,v=a>>31,a=e[n+12>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-12>>2],c=a,v=a>>31,a=e[n+8>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-8>>2],c=a,v=a>>31,a=e[n+4>>2],c=oe(c,v,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=e[h+-4>>2],c=a,h=a>>31,a=e[n>>2],c=oe(c,h,a,a>>31),a=g+c|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,c=a,a=l;break;default:break t}if(h=m<<2,v=h+f|0,l=e[i+h>>2],g=c,c=E,h=c&31,e[v>>2]=l+(32<=(c&63)>>>0?a>>h:((1<>>h),m=m+1|0,(m|0)==(o|0))break}break e}if(a>>>0>=9){if(a>>>0>=11){if((a|0)!=12){if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[f+-32>>2],I=e[f+-36>>2],B=e[f+-40>>2],T=e[f+-44>>2],l=e[n>>2],G=l,Be=l>>31,l=e[n+4>>2],je=l,Qe=l>>31,l=e[n+8>>2],Te=l,at=l>>31,l=e[n+12>>2],st=l,Se=l>>31,l=e[n+16>>2],gt=l,yt=l>>31,l=e[n+20>>2],Ye=l,Pt=l>>31,l=e[n+24>>2],It=l,ye=l>>31,l=e[n+28>>2],Ft=l,Bt=l>>31,l=e[n+32>>2],At=l,Gt=l>>31,l=e[n+36>>2],sn=l,he=l>>31,n=e[n+40>>2],Bn=n,cr=n>>31,n=0;l=n<<2,Ut=l+f|0,Vr=e[i+l>>2],te=B,l=oe(B,B>>31,sn,he),Wr=ne,B=I,ae=oe(T,T>>31,Bn,cr),T=ae+l|0,l=ne+Wr|0,l=T>>>0>>0?l+1|0:l,ae=T,T=oe(I,I>>31,At,Gt),I=ae+T|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,T=I,I=A,ae=T,T=oe(A,A>>31,Ft,Bt),A=ae+T|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,T=A,A=v,v=T,T=oe(A,A>>31,It,ye),v=v+T|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,T=v,v=C,ae=T,T=oe(C,C>>31,Ye,Pt),C=ae+T|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,T=C,C=g,ae=T,T=oe(g,g>>31,gt,yt),g=ae+T|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,T=g,g=h,ae=T,T=oe(h,h>>31,st,Se),h=ae+T|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,ae=h,h=E,T=oe(h,h>>31,Te,at),E=ae+T|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,T=E,E=a,Ee=Ut,ae=T,T=oe(a,a>>31,je,Qe),a=ae+T|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,ae=a,a=m,T=oe(a,a>>31,G,Be),m=ae+T|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,Ut=m,m=c,T=m&31,m=(32<=(m&63)>>>0?l>>T:((1<>>T)+Vr|0,e[Ee>>2]=m,T=te,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[f+-32>>2],I=e[f+-36>>2],B=e[f+-40>>2],T=e[f+-44>>2],l=e[f+-48>>2],te=e[n>>2],Be=te,je=te>>31,te=e[n+4>>2],Qe=te,Te=te>>31,te=e[n+8>>2],at=te,st=te>>31,te=e[n+12>>2],Se=te,gt=te>>31,te=e[n+16>>2],yt=te,Ye=te>>31,te=e[n+20>>2],Pt=te,It=te>>31,te=e[n+24>>2],ye=te,Ft=te>>31,te=e[n+28>>2],Bt=te,At=te>>31,te=e[n+32>>2],Gt=te,sn=te>>31,te=e[n+36>>2],he=te,Bn=te>>31,te=e[n+40>>2],cr=te,Ut=te>>31,n=e[n+44>>2],Vr=n,Wr=n>>31,n=0;te=n<<2,ae=te+f|0,di=e[i+te>>2],te=T,G=oe(T,T>>31,cr,Ut),Ee=ne,T=B,$r=oe(l,l>>31,Vr,Wr),G=$r+G|0,l=ne+Ee|0,l=G>>>0<$r>>>0?l+1|0:l,Ee=G,G=oe(B,B>>31,he,Bn),B=Ee+G|0,l=ne+l|0,l=B>>>0>>0?l+1|0:l,G=B,B=I,Ee=G,G=oe(I,I>>31,Gt,sn),I=Ee+G|0,l=ne+l|0,l=I>>>0>>0?l+1|0:l,G=I,I=A,Ee=G,G=oe(A,A>>31,Bt,At),A=Ee+G|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,G=A,A=v,v=G,G=oe(A,A>>31,ye,Ft),v=v+G|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,G=v,v=C,Ee=G,G=oe(C,C>>31,Pt,It),C=Ee+G|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,G=C,C=g,Ee=G,G=oe(g,g>>31,yt,Ye),g=Ee+G|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,G=g,g=h,Ee=G,G=oe(h,h>>31,Se,gt),h=Ee+G|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,Ee=h,h=E,G=oe(h,h>>31,at,st),E=Ee+G|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,G=E,E=a,Ee=ae,ae=G,G=oe(a,a>>31,Qe,Te),a=ae+G|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,ae=a,a=m,G=oe(a,a>>31,Be,je),m=ae+G|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,ae=m,m=c,G=m&31,m=(32<=(m&63)>>>0?l>>G:((1<>>G)+di|0,e[Ee>>2]=m,l=te,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=10){if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[f+-32>>2],I=e[f+-36>>2],l=e[n>>2],T=l,te=l>>31,l=e[n+4>>2],G=l,Be=l>>31,l=e[n+8>>2],je=l,Qe=l>>31,l=e[n+12>>2],Te=l,at=l>>31,l=e[n+16>>2],st=l,Se=l>>31,l=e[n+20>>2],gt=l,yt=l>>31,l=e[n+24>>2],Ye=l,Pt=l>>31,l=e[n+28>>2],It=l,ye=l>>31,n=e[n+32>>2],Ft=n,Bt=n>>31,n=0;l=n<<2,At=l+f|0,Gt=e[i+l>>2],B=A,l=oe(A,A>>31,It,ye),sn=ne,A=v,he=oe(I,I>>31,Ft,Bt),I=he+l|0,l=ne+sn|0,l=I>>>0>>0?l+1|0:l,v=I,I=oe(A,A>>31,Ye,Pt),v=v+I|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,I=v,v=C,he=I,I=oe(C,C>>31,gt,yt),C=he+I|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,I=C,C=g,he=I,I=oe(g,g>>31,st,Se),g=he+I|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,I=g,g=h,he=I,I=oe(h,h>>31,Te,at),h=he+I|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,he=h,h=E,I=oe(h,h>>31,je,Qe),E=he+I|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,I=E,E=a,ae=At,he=I,I=oe(a,a>>31,G,Be),a=he+I|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,he=a,a=m,I=oe(a,a>>31,T,te),m=he+I|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,At=m,m=c,I=m&31,m=(32<=(m&63)>>>0?l>>I:((1<>>I)+Gt|0,e[ae>>2]=m,I=B,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[f+-32>>2],I=e[f+-36>>2],B=e[f+-40>>2],l=e[n>>2],te=l,G=l>>31,l=e[n+4>>2],Be=l,je=l>>31,l=e[n+8>>2],Qe=l,Te=l>>31,l=e[n+12>>2],at=l,st=l>>31,l=e[n+16>>2],Se=l,gt=l>>31,l=e[n+20>>2],yt=l,Ye=l>>31,l=e[n+24>>2],Pt=l,It=l>>31,l=e[n+28>>2],ye=l,Ft=l>>31,l=e[n+32>>2],Bt=l,At=l>>31,n=e[n+36>>2],Gt=n,sn=n>>31,n=0;l=n<<2,he=l+f|0,Bn=e[i+l>>2],T=I,l=oe(I,I>>31,Bt,At),cr=ne,I=A,Ut=oe(B,B>>31,Gt,sn),B=Ut+l|0,l=ne+cr|0,l=B>>>0>>0?l+1|0:l,ae=B,B=oe(A,A>>31,ye,Ft),A=ae+B|0,l=ne+l|0,l=A>>>0>>0?l+1|0:l,B=A,A=v,v=B,B=oe(A,A>>31,Pt,It),v=v+B|0,l=ne+l|0,l=v>>>0>>0?l+1|0:l,B=v,v=C,ae=B,B=oe(C,C>>31,yt,Ye),C=ae+B|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,B=C,C=g,ae=B,B=oe(g,g>>31,Se,gt),g=ae+B|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,B=g,g=h,ae=B,B=oe(h,h>>31,at,st),h=ae+B|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,ae=h,h=E,B=oe(h,h>>31,Qe,Te),E=ae+B|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,B=E,E=a,ae=he,he=B,B=oe(a,a>>31,Be,je),a=he+B|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,he=a,a=m,B=oe(a,a>>31,te,G),m=he+B|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,he=m,m=c,B=m&31,m=(32<=(m&63)>>>0?l>>B:((1<>>B)+Bn|0,e[ae>>2]=m,B=T,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=5){if(a>>>0>=7){if((a|0)!=8){if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[n>>2],I=A,B=A>>31,A=e[n+4>>2],T=A,te=A>>31,A=e[n+8>>2],G=A,Be=A>>31,A=e[n+12>>2],je=A,Qe=A>>31,A=e[n+16>>2],Te=A,at=A>>31,A=e[n+20>>2],st=A,Se=A>>31,n=e[n+24>>2],gt=n,yt=n>>31,n=0;A=n<<2,Ye=A+f|0,Pt=e[i+A>>2],A=C,l=oe(A,A>>31,st,Se),It=ne,C=g,ye=oe(v,v>>31,gt,yt),v=ye+l|0,l=ne+It|0,l=v>>>0>>0?l+1|0:l,ye=v,v=oe(g,g>>31,Te,at),g=ye+v|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,v=g,g=h,ye=v,v=oe(h,h>>31,je,Qe),h=ye+v|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,ye=h,h=E,v=oe(h,h>>31,G,Be),E=ye+v|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,v=E,E=a,he=Ye,ye=v,v=oe(a,a>>31,T,te),a=ye+v|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,ye=a,a=m,v=oe(a,a>>31,I,B),m=ye+v|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,Ye=m,m=c,v=m&31,m=(32<=(m&63)>>>0?l>>v:((1<>>v)+Pt|0,e[he>>2]=m,v=A,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[f+-28>>2],A=e[f+-32>>2],l=e[n>>2],B=l,T=l>>31,l=e[n+4>>2],te=l,G=l>>31,l=e[n+8>>2],Be=l,je=l>>31,l=e[n+12>>2],Qe=l,Te=l>>31,l=e[n+16>>2],at=l,st=l>>31,l=e[n+20>>2],Se=l,gt=l>>31,l=e[n+24>>2],yt=l,Ye=l>>31,n=e[n+28>>2],Pt=n,It=n>>31,n=0;l=n<<2,ye=l+f|0,Ft=e[i+l>>2],I=v,l=oe(v,v>>31,yt,Ye),Bt=ne,v=C,At=oe(A,A>>31,Pt,It),A=At+l|0,l=ne+Bt|0,l=A>>>0>>0?l+1|0:l,he=A,A=oe(C,C>>31,Se,gt),C=he+A|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,A=C,C=g,he=A,A=oe(g,g>>31,at,st),g=he+A|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,A=g,g=h,he=A,A=oe(h,h>>31,Qe,Te),h=he+A|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,he=h,h=E,A=oe(h,h>>31,Be,je),E=he+A|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,A=E,E=a,he=ye,ye=A,A=oe(a,a>>31,te,G),a=ye+A|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,ye=a,a=m,A=oe(a,a>>31,B,T),m=ye+A|0,l=ne+l|0,l=m>>>0>>0?l+1|0:l,ye=m,m=c,A=m&31,m=(32<=(m&63)>>>0?l>>A:((1<>>A)+Ft|0,e[he>>2]=m,A=I,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=6){if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[n>>2],v=C,A=C>>31,C=e[n+4>>2],I=C,B=C>>31,C=e[n+8>>2],T=C,te=C>>31,C=e[n+12>>2],G=C,Be=C>>31,n=e[n+16>>2],je=n,Qe=n>>31,n=0;C=n<<2,Te=C+f|0,at=e[i+C>>2],C=h,l=oe(h,h>>31,G,Be),st=ne,h=E,Se=oe(g,g>>31,je,Qe),g=Se+l|0,l=ne+st|0,l=g>>>0>>0?l+1|0:l,E=g,g=oe(h,h>>31,T,te),E=E+g|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,g=E,E=a,Se=g,g=oe(a,a>>31,I,B),a=Se+g|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=m,m=oe(a,a>>31,v,A),g=g+m|0,l=ne+l|0,l=g>>>0>>0?l+1|0:l,m=c&31,m=(32<=(c&63)>>>0?l>>m:((1<>>m)+at|0,e[Te>>2]=m,g=C,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[f+-20>>2],C=e[f+-24>>2],v=e[n>>2],A=v,I=A>>31,v=e[n+4>>2],B=v,T=v>>31,v=e[n+8>>2],te=v,G=v>>31,v=e[n+12>>2],Be=v,je=v>>31,v=e[n+16>>2],Qe=v,Te=v>>31,n=e[n+20>>2],at=n,st=n>>31,n=0;v=n<<2,Se=v+f|0,gt=e[i+v>>2],v=g,l=oe(g,g>>31,Qe,Te),yt=ne,g=h,Ye=oe(C,C>>31,at,st),C=Ye+l|0,l=ne+yt|0,l=C>>>0>>0?l+1|0:l,ye=C,C=oe(h,h>>31,Be,je),h=ye+C|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,ye=h,h=E,C=oe(h,h>>31,te,G),E=ye+C|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,C=E,E=a,ye=Se,Se=C,C=oe(a,a>>31,B,T),a=Se+C|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,C=a,a=m,m=oe(a,a>>31,A,I),C=C+m|0,l=ne+l|0,l=C>>>0>>0?l+1|0:l,m=c&31,m=(32<=(c&63)>>>0?l>>m:((1<>>m)+gt|0,e[ye>>2]=m,C=v,n=n+1|0,(n|0)!=(o|0););break e}if(a>>>0>=3){if((a|0)!=4){if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[n>>2],C=h,v=h>>31,h=e[n+4>>2],A=h,I=h>>31,n=e[n+8>>2],B=n,T=n>>31,n=0;h=n<<2,g=h+f|0,te=e[i+h>>2],h=a,a=oe(h,h>>31,A,I),l=ne,G=g,E=oe(E,E>>31,B,T),a=E+a|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,g=a,a=m,m=oe(a,a>>31,C,v),E=g+m|0,l=ne+l|0,l=E>>>0>>0?l+1|0:l,m=E,g=c&31,m=(32<=(c&63)>>>0?l>>g:((1<>>g)+te|0,e[G>>2]=m,E=h,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[f+-12>>2],h=e[f+-16>>2],g=e[n>>2],v=g,A=g>>31,g=e[n+4>>2],I=g,B=g>>31,g=e[n+8>>2],T=g,te=g>>31,n=e[n+12>>2],G=n,Be=n>>31,n=0;g=n<<2,C=g+f|0,je=e[i+g>>2],g=E,l=oe(g,g>>31,T,te),Qe=ne,E=a,Se=C,Te=oe(h,h>>31,G,Be),h=Te+l|0,l=ne+Qe|0,l=h>>>0>>0?l+1|0:l,C=h,h=oe(a,a>>31,I,B),a=C+h|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,h=a,a=m,m=oe(a,a>>31,v,A),h=h+m|0,l=ne+l|0,l=h>>>0>>0?l+1|0:l,m=h,h=c,C=h&31,m=(32<=(h&63)>>>0?l>>C:((1<>>C)+je|0,e[Se>>2]=m,h=g,n=n+1|0,(n|0)!=(o|0););break e}if((a|0)!=2){if((o|0)<1)break e;for(m=e[f+-4>>2],n=e[n>>2],g=n,C=n>>31,n=0;a=n<<2,v=a+f|0,l=e[i+a>>2],m=oe(m,m>>31,g,C),h=ne,a=c,E=a&31,m=l+(32<=(a&63)>>>0?h>>E:((1<>>E)|0,e[v>>2]=m,n=n+1|0,(n|0)!=(o|0););break e}if((o|0)<1)break e;for(m=e[f+-4>>2],a=e[f+-8>>2],E=e[n>>2],g=E,C=g>>31,n=e[n+4>>2],v=n,A=n>>31,n=0;E=n<<2,h=E+f|0,I=e[i+E>>2],E=m,m=oe(m,m>>31,g,C),l=ne,T=h,h=m,m=oe(a,a>>31,v,A),a=h+m|0,l=ne+l|0,l=a>>>0>>0?l+1|0:l,m=a,a=c,h=a&31,m=(32<=(a&63)>>>0?l>>h:((1<>>h)+I|0,e[T>>2]=m,a=E,n=n+1|0,(n|0)!=(o|0););}}function dw(i,o){return i>0?(i=ho(.5/+(o>>>0)*i)*.5/.6931471805599453,i>=0?i:0):i<0?1e32:0}function pw(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0;if(f=1,o){for(v=.5/+(n>>>0),h=4294967295;;){c=it[(l<<3)+i>>3];e:{if(c>0){c=ho(v*c)*.5/.6931471805599453,c=c>=0?c:0;break e}c=c<0?1e32:0}if(c=c*+(n-f>>>0)+ +(ie(a,f)>>>0),g=c>2],!((a^-1)&a+-16843009&-2139062144););if(!(a&255))return n-i|0;for(;a=H[n+1|0],o=n+1|0,n=o,!!a;);}return o-i|0}function hw(i,o){var n=0,a=0;e:{if(a=o&255,a){if(i&3)for(;;){if(n=H[i|0],!n|(n|0)==(o&255))break e;if(i=i+1|0,!(i&3))break}n=e[i>>2];t:{if((n^-1)&n+-16843009&-2139062144)break t;for(a=ie(a,16843009);;){if(n=n^a,(n^-1)&n+-16843009&-2139062144)break t;if(n=e[i+4>>2],i=i+4|0,!!(n+-16843009&(n^-1)&-2139062144))break}}for(;n=i,a=H[n|0],!!(a&&(i=n+1|0,(a|0)!=(o&255))););return n}return El(i)+i|0}return i}function Pl(i,o){return i=hw(i,o),H[i|0]==(o&255)?i:0}function mw(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0,f=0,l=0,h=0,g=0,m=0;a=be-32|0,be=a,c=e[i+28>>2],e[a+16>>2]=c,f=e[i+20>>2],e[a+28>>2]=n,e[a+24>>2]=o,o=f-c|0,e[a+20>>2]=o,c=o+n|0,m=2,o=a+16|0;e:{t:{n:{if(!lu(Jh(e[i+60>>2],a+16|0,2,a+12|0)|0))for(;;){if(f=e[a+12>>2],(f|0)==(c|0))break n;if((f|0)<=-1)break t;if(l=e[o+4>>2],h=f>>>0>l>>>0,g=(h<<3)+o|0,l=f-(h?l:0)|0,e[g>>2]=l+e[g>>2],g=(h?12:4)+o|0,e[g>>2]=e[g>>2]-l,c=c-f|0,o=h?o+8|0:o,m=m-h|0,!!lu(Jh(e[i+60>>2],o|0,m|0,a+12|0)|0))break}if(e[a+12>>2]=-1,(c|0)!=-1)break t}o=e[i+44>>2],e[i+28>>2]=o,e[i+20>>2]=o,e[i+16>>2]=o+e[i+48>>2],i=n;break e}if(e[i+28>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i>>2]=e[i>>2]|32,i=0,(m|0)==2)break e;i=n-e[o+4>>2]|0}return be=a+32|0,i|0}function fi(i,o,n){var a=0;e:{if(i>>>0>1073741823||(i=bn(i?i<<2:1),!i))break e;a=e[o>>2],a&&Ne(a),e[o>>2]=i,e[n>>2]=i,a=1}return a}function gw(i,o,n){var a=0;e:{if(i>>>0>536870911||(i=bn(i?i<<3:1),!i))break e;a=e[o>>2],a&&Ne(a),e[o>>2]=i,e[n>>2]=i,a=1}return a}function uu(i,o){return o&&i?(oe(o,0,i,0),ne?i=0:i=bn(ie(i,o)),i):bn(1)}function bw(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=ue(0),f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=ue(0);if(o)for(a=e[i+-4>>2],g=e[i+-8>>2],C=a-g|0,f=e[i+-12>>2],m=C+(f-g|0)|0,G=m+(((f<<1)-g|0)-e[i+-16>>2]|0)|0;g=e[(T<<2)+i>>2],f=g>>31,I=(f^f+g)+I|0,f=g-a|0,A=f>>31,E=(A^f+A)+E|0,A=f-C|0,a=A>>31,v=(a^a+A)+v|0,m=A-m|0,a=m>>31,l=(a^a+m)+l|0,C=m-G|0,a=C>>31,h=(a^a+C)+h|0,a=g,C=f,G=m,m=A,T=T+1|0,(T|0)!=(o|0););i=E>>>0>>0?E:v,i=i>>>0>>0?i:l;e:{if(I>>>0<(i>>>0>>0?i:h)>>>0||(B=1,i=v>>>0>>0?v:l,E>>>0<(i>>>0>>0?i:h)>>>0))break e;i=l>>>0>>0,B=v>>>0<(i?l:h)>>>0?2:i?3:4}return i=n,I?c=ue(ho(+(I>>>0)*.6931471805599453/+(o>>>0))/.6931471805599453):c=ue(0),Ze[i>>2]=c,i=n,E?c=ue(ho(+(E>>>0)*.6931471805599453/+(o>>>0))/.6931471805599453):c=ue(0),Ze[i+4>>2]=c,i=n,v?c=ue(ho(+(v>>>0)*.6931471805599453/+(o>>>0))/.6931471805599453):c=ue(0),Ze[i+8>>2]=c,i=n,l?c=ue(ho(+(l>>>0)*.6931471805599453/+(o>>>0))/.6931471805599453):c=ue(0),Ze[i+12>>2]=c,h?(te=n,ae=ue(ho(+(h>>>0)*.6931471805599453/+(o>>>0))/.6931471805599453),Ze[te+16>>2]=ae,B|0):(Ze[n+16>>2]=0,B|0)}function vw(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=ue(0),C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=ue(0);e:{if(!o)break e;for(f=e[i+-4>>2],g=e[i+-8>>2],l=f-g|0,m=e[i+-12>>2],I=l+(m-g|0)|0,ye=I+(((m<<1)-g|0)-e[i+-16>>2]|0)|0,m=0,g=0;a=e[(he<<2)+i>>2],c=a>>31,c=c^a+c,h=c+ae|0,h>>>0>>0&&(te=te+1|0),ae=h,c=a-f|0,h=c>>31,h=h^c+h,f=h+G|0,f>>>0>>0&&(T=T+1|0),G=f,h=c-l|0,f=h>>31,f=f^f+h,l=f+B|0,l>>>0>>0&&(v=v+1|0),B=l,I=h-I|0,f=I>>31,f=f^f+I,l=f+C|0,l>>>0>>0&&(g=g+1|0),C=l,l=I-ye|0,f=l>>31,f=f^f+l,l=f+E|0,l>>>0>>0&&(m=m+1|0),E=l,f=a,l=c,ye=I,I=h,he=he+1|0,(he|0)!=(o|0););}a=(v|0)==(T|0)&G>>>0>>0|T>>>0>>0,c=a?G:B,i=c,a=a?T:v,c=(g|0)==(a|0)&c>>>0>>0|a>>>0>>0,h=c?i:C,a=c?a:g,c=(m|0)==(a|0)&h>>>0>>0|a>>>0>>0,h=c?h:E,a=c?a:m,i=0;e:{if((a|0)==(te|0)&ae>>>0>>0|te>>>0>>0||(a=(g|0)==(v|0)&B>>>0>>0|v>>>0>>0,c=a?B:C,i=c,a=a?v:g,c=(m|0)==(a|0)&c>>>0>>0|a>>>0>>0,h=c?i:E,a=c?a:m,i=1,(a|0)==(T|0)&G>>>0>>0|T>>>0>>0))break e;i=(g|0)==(m|0)&C>>>0>>0|g>>>0>>0,a=i,c=a?C:E,i=a?g:m,i=(i|0)==(v|0)&B>>>0>>0|v>>>0>>0?2:a?3:4}return l=n,te|ae?A=ue(ho((+(ae>>>0)+4294967296*+(te>>>0))*.6931471805599453/+(o>>>0))/.6931471805599453):A=ue(0),Ze[l>>2]=A,l=n,T|G?A=ue(ho((+(G>>>0)+4294967296*+(T>>>0))*.6931471805599453/+(o>>>0))/.6931471805599453):A=ue(0),Ze[l+4>>2]=A,l=n,v|B?A=ue(ho((+(B>>>0)+4294967296*+(v>>>0))*.6931471805599453/+(o>>>0))/.6931471805599453):A=ue(0),Ze[l+8>>2]=A,l=n,g|C?A=ue(ho((+(C>>>0)+4294967296*+(g>>>0))*.6931471805599453/+(o>>>0))/.6931471805599453):A=ue(0),Ze[l+12>>2]=A,m|E?(Se=n,Ee=ue(ho((+(E>>>0)+4294967296*+(m>>>0))*.6931471805599453/+(o>>>0))/.6931471805599453),Ze[Se+16>>2]=Ee,i|0):(Ze[n+16>>2]=0,i|0)}function kw(i,o,n,a){var c=0,f=0;e:{t:{n:switch(n|0){case 4:if(n=0,(o|0)<=0)break t;for(;f=n<<2,c=f+i|0,e[a+f>>2]=(e[c+-16>>2]+(e[c>>2]+ie(e[c+-8>>2],6)|0)|0)-(e[c+-12>>2]+e[c+-4>>2]<<2),n=n+1|0,(n|0)!=(o|0););break t;case 3:if(n=0,(o|0)<=0)break t;for(;f=n<<2,c=f+i|0,e[a+f>>2]=(e[c>>2]-e[c+-12>>2]|0)+ie(e[c+-8>>2]-e[c+-4>>2]|0,3),n=n+1|0,(n|0)!=(o|0););break t;case 2:if(n=0,(o|0)<=0)break t;for(;f=n<<2,c=f+i|0,e[a+f>>2]=e[c+-8>>2]+(e[c>>2]-(e[c+-4>>2]<<1)|0),n=n+1|0,(n|0)!=(o|0););break t;case 0:break e;case 1:break n;default:break t}if(n=0,(o|0)<=0)break t;for(;f=n<<2,c=f+i|0,e[a+f>>2]=e[c>>2]-e[c+-4>>2],n=n+1|0,(n|0)!=(o|0););}return}gn(a,i,o<<2)}function yw(i,o,n,a){var c=0,f=0,l=0,h=0,g=0;e:{t:{n:switch(n|0){case 4:if((o|0)<1)break t;for(f=e[a+-12>>2],l=e[a+-4>>2],n=0;g=n<<2,h=g+a|0,c=e[h+-8>>2],l=((e[i+g>>2]+ie(c,-6)|0)-e[h+-16>>2]|0)+(f+l<<2)|0,e[h>>2]=l,f=c,n=n+1|0,(n|0)!=(o|0););break t;case 3:if((o|0)<1)break t;for(c=e[a+-12>>2],f=e[a+-4>>2],n=0;l=n<<2,h=l+a|0,g=e[i+l>>2]+c|0,c=e[h+-8>>2],f=g+ie(f-c|0,3)|0,e[h>>2]=f,n=n+1|0,(n|0)!=(o|0););break t;case 2:if((o|0)<1)break t;for(c=e[a+-4>>2],n=0;f=n<<2,l=f+a|0,c=(e[i+f>>2]+(c<<1)|0)-e[l+-8>>2]|0,e[l>>2]=c,n=n+1|0,(n|0)!=(o|0););break t;case 0:break e;case 1:break n;default:break t}if((o|0)<1)break t;for(c=e[a+-4>>2],n=0;f=n<<2,c=e[f+i>>2]+c|0,e[a+f>>2]=c,n=n+1|0,(n|0)!=(o|0););}return}gn(a,i,o<<2)}function _w(i){var o=0,n=0;return o=H[i+74|0],K[i+74|0]=o+-1|o,ze[i+20>>2]>ze[i+28>>2]&&Le[e[i+36>>2]](i,0,0)|0,e[i+28>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,o=e[i>>2],o&4?(e[i>>2]=o|32,-1):(n=e[i+44>>2]+e[i+48>>2]|0,e[i+8>>2]=n,e[i+4>>2]=n,o<<27>>31)}function Am(){var i=0,o=0,n=0,a=0,c=0;if(a=Go(1,8),a){if(n=Go(1,504),e[a>>2]=n,n){if(i=Go(1,6160),e[a+4>>2]=i,i){if(o=Go(1,44),e[i+56>>2]=o,o){if(e[i+1128>>2]=16,c=bn(e[1364]<<1&-16),e[i+1120>>2]=c,c)return e[i+252>>2]=0,e[i+220>>2]=0,e[i+224>>2]=0,o=i+3616|0,e[o>>2]=0,e[o+4>>2]=0,o=i+3608|0,e[o>>2]=0,e[o+4>>2]=0,o=i+3600|0,e[o>>2]=0,e[o+4>>2]=0,o=i+3592|0,e[o>>2]=0,e[o+4>>2]=0,e[i+60>>2]=0,e[i+64>>2]=0,e[i+68>>2]=0,e[i+72>>2]=0,e[i+76>>2]=0,e[i+80>>2]=0,e[i+84>>2]=0,e[i+88>>2]=0,e[i+92>>2]=0,e[i+96>>2]=0,e[i+100>>2]=0,e[i+104>>2]=0,e[i+108>>2]=0,e[i+112>>2]=0,e[i+116>>2]=0,e[i+120>>2]=0,rn(i+124|0),rn(i+136|0),rn(i+148|0),rn(i+160|0),rn(i+172|0),rn(i+184|0),rn(i+196|0),rn(i+208|0),e[i+48>>2]=0,e[i+52>>2]=0,In(i+608|0,512),e[i+1124>>2]=0,e[i+608>>2]=1,e[i+32>>2]=0,e[i+24>>2]=0,e[i+28>>2]=0,e[i+16>>2]=0,e[i+20>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0,e[i>>2]=0,e[i+4>>2]=0,e[n+28>>2]=0,mm(n+32|0),e[n>>2]=9,a|0;Ad(o)}Ne(i)}Ne(n)}Ne(a)}return 0}function Cm(i){i=i|0;var o=0,n=0;i&&(Id(i),o=e[i+4>>2],n=e[o+1120>>2],n&&(Ne(n),o=e[i+4>>2]),Ad(e[o+56>>2]),on(e[i+4>>2]+124|0),on(e[i+4>>2]+136|0),on(e[i+4>>2]+148|0),on(e[i+4>>2]+160|0),on(e[i+4>>2]+172|0),on(e[i+4>>2]+184|0),on(e[i+4>>2]+196|0),on(e[i+4>>2]+208|0),Ne(e[i+4>>2]),Ne(e[i>>2]),Ne(i))}function Id(i){i=i|0;var o=0,n=0,a=0;return a=1,e[e[i>>2]>>2]!=9&&(o=e[i+4>>2],bm(o+3732|0,o+3636|0),Ne(e[e[i+4>>2]+452>>2]),e[e[i+4>>2]+452>>2]=0,o=e[i+4>>2],e[o+252>>2]=0,S8(e[o+56>>2]),a=i+4|0,o=e[i+4>>2],n=e[o+60>>2],n&&(Ne(n+-16|0),e[e[a>>2]+60>>2]=0,o=e[a>>2]),n=e[o+3592>>2],n&&(Ne(n),e[e[a>>2]+92>>2]=0,e[e[a>>2]+3592>>2]=0,o=e[a>>2]),n=e[o- -64>>2],n&&(Ne(n+-16|0),e[e[a>>2]- -64>>2]=0,o=e[a>>2]),n=e[o+3596>>2],n&&(Ne(n),e[e[a>>2]+96>>2]=0,e[e[a>>2]+3596>>2]=0,o=e[a>>2]),n=e[o+68>>2],n&&(Ne(n+-16|0),e[e[a>>2]+68>>2]=0,o=e[a>>2]),n=e[o+3600>>2],n&&(Ne(n),e[e[a>>2]+100>>2]=0,e[e[a>>2]+3600>>2]=0,o=e[a>>2]),n=e[o+72>>2],n&&(Ne(n+-16|0),e[e[a>>2]+72>>2]=0,o=e[a>>2]),n=e[o+3604>>2],n&&(Ne(n),e[e[a>>2]+104>>2]=0,e[e[a>>2]+3604>>2]=0,o=e[a>>2]),n=e[o+76>>2],n&&(Ne(n+-16|0),e[e[a>>2]+76>>2]=0,o=e[a>>2]),n=e[o+3608>>2],n&&(Ne(n),e[e[a>>2]+108>>2]=0,e[e[a>>2]+3608>>2]=0,o=e[a>>2]),n=e[o+80>>2],n&&(Ne(n+-16|0),e[e[a>>2]+80>>2]=0,o=e[a>>2]),n=e[o+3612>>2],n&&(Ne(n),e[e[a>>2]+112>>2]=0,e[e[a>>2]+3612>>2]=0,o=e[a>>2]),n=e[o+84>>2],n&&(Ne(n+-16|0),e[e[a>>2]+84>>2]=0,o=e[a>>2]),n=e[o+3616>>2],n&&(Ne(n),e[e[a>>2]+116>>2]=0,e[e[a>>2]+3616>>2]=0,o=e[a>>2]),n=e[o+88>>2],n&&(Ne(n+-16|0),e[e[a>>2]+88>>2]=0,o=e[a>>2]),n=e[o+3620>>2],n&&(Ne(n),e[e[a>>2]+120>>2]=0,e[e[a>>2]+3620>>2]=0,o=e[a>>2]),e[o+220>>2]=0,e[o+224>>2]=0,e[o>>2]&&(o=e[i>>2]+32|0,G8(o+368|0),cm(o+8|0),o=e[i+4>>2]),n=e[o+52>>2],n&&((n|0)!=e[1887]&&(ym(n),o=e[a>>2]),e[o+52>>2]=0),a=1,e[o+3624>>2]&&(a=!cu(o+312|0,o+3732|0,16)),e[o+48>>2]=0,e[o+3632>>2]=0,In(o+608|0,512),e[o+32>>2]=0,e[o+24>>2]=0,e[o+28>>2]=0,e[o+16>>2]=0,e[o+20>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[o>>2]=0,e[o+4>>2]=0,o=e[i+4>>2],e[o+1124>>2]=0,e[o+608>>2]=1,o=e[i>>2],e[o+28>>2]=0,mm(o+32|0),e[e[i>>2]>>2]=9),a|0}function xm(i,o,n,a,c,f,l,h,g,m){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0,h=h|0,g=g|0,m=m|0,Sm(i,o,n,a,c,f,l,h,g,m,0)|0}function Sm(i,o,n,a,c,f,l,h,g,m,v){var A=0,C=0;A=5;e:{C=e[i>>2];t:{if(e[C>>2]!=9||(A=2,!g|(!o|!l))||n&&!f|(!a|!c))break t;if(A=e[i+4>>2],e[A>>2]=v,v){if(!J8(C+32|0))break e;A=e[i+4>>2]}if(_m(A+3524|0),v=e[i+4>>2],e[v+44>>2]=5,e[v+40>>2]=6,e[v+36>>2]=5,!E8(e[v+56>>2],i))return e[e[i>>2]>>2]=8,3;v=e[i+4>>2],e[v+48>>2]=m,e[v+32>>2]=g,e[v+28>>2]=h,e[v+24>>2]=l,e[v+20>>2]=f,e[v+16>>2]=c,e[v+12>>2]=a,e[v+8>>2]=n,e[v+4>>2]=o,e[v+3520>>2]=0,e[v+248>>2]=0,e[v+240>>2]=0,e[v+244>>2]=0,e[v+228>>2]=0,e[v+232>>2]=0,e[v+3624>>2]=e[e[i>>2]+28>>2],e[v+3628>>2]=1,e[v+3632>>2]=0,A=Em(i)?0:3}return A}return e[e[i>>2]+4>>2]=4,4}function ww(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0;e:{if(a=e[n+4>>2],e[a>>2]||(c=e[a+20>>2],!c)||!Le[c](n,e[a+48>>2]))break e;return e[o>>2]=0,e[e[n>>2]>>2]=4,0}e:{t:{if(e[o>>2]){if(a=e[n+4>>2],!(!e[a+3632>>2]|ze[a+6152>>2]<21)){e[e[n>>2]>>2]=7;break t}n:{o:{r:{i:{if(e[a>>2])switch(c=0,ew(e[n>>2]+32|0,i,o,n,e[a+48>>2])|0){case 0:case 2:break o;case 1:break r;default:break i}if(c=Le[e[a+4>>2]](n,i,o,e[a+48>>2])|0,(c|0)!=2)break o}e[e[n>>2]>>2]=7;break t}if(i=1,!e[o>>2])break n;break e}if(i=1,e[o>>2])break e;if((c|0)==1)break n;if(o=e[n+4>>2],e[o>>2]||(a=e[o+20>>2],!a)||!Le[a](n,e[o+48>>2]))break e}e[e[n>>2]>>2]=4;break t}e[e[n>>2]>>2]=7}i=0}return i|0}function Em(i){i=i|0;var o=0,n=0,a=0;o=e[i+4>>2];e:{if(e[e[i>>2]>>2]==9&&!e[o+3628>>2])break e;if(e[o+3624>>2]=0,e[o+240>>2]=0,e[o+244>>2]=0,e[o>>2]&&(o=e[i>>2]+32|0,hm(o+8|0),pm(o+368|0),e[o+408>>2]=0,e[o+412>>2]=0,o=e[i+4>>2]),o=e[o+56>>2],e[o+8>>2]=0,e[o+12>>2]=0,e[o+16>>2]=0,e[o+20>>2]=0,o=1,n=e[i>>2],!o)return e[n>>2]=8,0;e[n>>2]=2,o=e[i+4>>2],e[o>>2]&&($8(n+32|0),o=e[i+4>>2]);t:{if(!e[o+3628>>2]){if(n=0,e[o+52>>2]==e[1887])break e;if(a=e[o+8>>2],!a)break t;if((Le[a](i,0,0,e[o+48>>2])|0)==1)break e;o=e[i+4>>2];break t}e[o+3628>>2]=0}e[e[i>>2]>>2]=0,e[o+248>>2]=0,Ne(e[o+452>>2]),e[e[i+4>>2]+452>>2]=0,o=e[i+4>>2],e[o+252>>2]=0,e[o+3624>>2]=e[e[i>>2]+28>>2],e[o+228>>2]=0,e[o+232>>2]=0,gm(o+3636|0),i=e[i+4>>2],e[i+6152>>2]=0,e[i+6136>>2]=0,e[i+6140>>2]=0,n=1}return n|0}function Aw(i,o,n,a,c,f,l,h,g,m){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0,h=h|0,g=g|0,m=m|0,Sm(i,o,n,a,c,f,l,h,g,m,1)|0}function Cw(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==9?(i=i+32|0,e[i+4>>2]=o,e[i>>2]=0,i=1):i=0,i|0}function xw(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==9?(e[i+28>>2]=o,i=1):i=0,i|0}function Sw(i,o){i=i|0,o=o|0;var n=0;e:{if(e[e[i>>2]>>2]!=9|o>>>0>126||(n=1,i=e[i+4>>2],e[(i+(o<<2)|0)+608>>2]=1,(o|0)!=2))break e;e[i+1124>>2]=0}return n|0}function Ew(i,o){i=i|0,o=o|0;var n=0,a=0,c=0;n=0;e:{if(e[e[i>>2]>>2]!=9||(a=e[i+4>>2],n=1,e[a+616>>2]))break e;n=e[a+1120>>2];t:{c=e[a+1124>>2];n:{if((c|0)!=e[a+1128>>2]){a=n;break n}o:{if(!c){a=xn(n,0);break o}if(c+c>>>0>=c>>>0){if(a=xn(n,c<<1),a)break o;Ne(n),a=e[i+4>>2]}e[a+1120>>2]=0;break t}if(n=e[i+4>>2],e[n+1120>>2]=a,!a)break t;e[n+1128>>2]=e[n+1128>>2]<<1,c=e[n+1124>>2]}return n=a,a=e[1364]>>>3|0,gn(n+ie(a,c)|0,o,a),i=e[i+4>>2],e[i+1124>>2]=e[i+1124>>2]+1,1}e[e[i>>2]>>2]=8,n=0}return n|0}function Pw(i){i=i|0;var o=0;if(e[e[i>>2]>>2]==9){for(o=e[i+4>>2],i=0;e[(o+(i<<2)|0)+608>>2]=1,i=i+1|0,(i|0)!=128;);e[o+1124>>2]=0,i=1}else i=0;return i|0}function Mw(i,o){i=i|0,o=o|0;var n=0;e:{if(e[e[i>>2]>>2]!=9|o>>>0>126||(i=e[i+4>>2],e[(i+(o<<2)|0)+608>>2]=0,n=1,(o|0)!=2))break e;e[i+1124>>2]=0}return n|0}function Nw(i,o){i=i|0,o=o|0;var n=0,a=0,c=0;if(e[e[i>>2]>>2]==9){if(n=e[i+4>>2],!e[n+616>>2])return 1;a=e[n+1120>>2];e:{c=e[n+1124>>2];t:{if((c|0)!=e[n+1128>>2]){n=a;break t}n:{if(!c){n=xn(a,0);break n}if(c+c>>>0>=c>>>0){if(n=xn(a,c<<1),n)break n;Ne(a),n=e[i+4>>2]}e[n+1120>>2]=0;break e}if(a=e[i+4>>2],e[a+1120>>2]=n,!n)break e;e[a+1128>>2]=e[a+1128>>2]<<1,c=e[a+1124>>2]}return a=n,n=e[1364]>>>3|0,gn(a+ie(n,c)|0,o,n),i=e[i+4>>2],e[i+1124>>2]=e[i+1124>>2]+1,1}e[e[i>>2]>>2]=8}return 0}function Iw(i){return i=i|0,e[e[i>>2]>>2]==9?(In(e[i+4>>2]+608|0,512),e[e[i+4>>2]+1124>>2]=0,i=1):i=0,i|0}function Rd(i){return i=i|0,e[e[i>>2]>>2]}function Rw(i){return i=i|0,e[e[i>>2]+28>>2]}function Pm(i){i=i|0;var o=0,n=0,a=0;o=be-16|0,be=o,n=1;e:{for(;;){t:{n:switch(e[e[i>>2]>>2]){case 0:if(Td(i))continue;n=0;break t;case 1:a=(Fd(i)|0)!=0;break e;case 2:if(Mm(i))continue;break t;case 4:case 7:break t;case 3:break n;default:break e}if(!Nm(i,o+12|0)){n=0;break t}if(!e[o+12>>2])continue}break}a=n}return be=o+16|0,a|0}function Td(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0;n=be-16|0,be=n,f=1;e:{for(;;){o=0;t:{for(;;){l=e[i+4>>2];n:{if(e[l+3520>>2]){c=H[l+3590|0],e[n+8>>2]=c,e[l+3520>>2]=0;break n}if(!Je(e[l+56>>2],n+8|0,8)){a=0;break e}c=e[n+8>>2]}if(H[a+5409|0]==(c|0)){a=a+1|0,o=1;break t}if(a=0,(o|0)==3)break e;if(H[o+7552|0]==(c|0)){if(o=o+1|0,(o|0)!=3)continue;n:{o:{if(!Je(e[e[i+4>>2]+56>>2],n+12|0,24)||!Je(e[e[i+4>>2]+56>>2],n+12|0,8)||(c=e[n+12>>2],!Je(e[e[i+4>>2]+56>>2],n+12|0,8))||(l=e[n+12>>2],!Je(e[e[i+4>>2]+56>>2],n+12|0,8)))break o;if(h=e[n+12>>2],Je(e[e[i+4>>2]+56>>2],n+12|0,8))break n}break e}if(os(e[e[i+4>>2]+56>>2],e[n+12>>2]&127|(h<<7&16256|(l&127|c<<7&16256)<<14)))continue;break e}break}n:{if((c|0)!=255)break n;if(K[e[i+4>>2]+3588|0]=255,!Je(e[e[i+4>>2]+56>>2],n+8|0,8))break e;if(o=e[n+8>>2],(o|0)==255){o=e[i+4>>2],e[o+3520>>2]=1,K[o+3590|0]=255;break n}if((o&-2)!=248)break n;K[e[i+4>>2]+3589|0]=o,e[e[i>>2]>>2]=3,a=1;break e}if(o=0,!f||(f=e[i+4>>2],o=0,e[f+3632>>2]))break t;Le[e[f+32>>2]](i,0,e[f+48>>2]),o=0}if(f=o,!(a>>>0<4))break}a=1,e[e[i>>2]>>2]=1}return be=n+16|0,a}function Fd(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0;h=be-192|0,be=h;e:{t:{if(!Je(e[e[i+4>>2]+56>>2],h+184|0,e[1391]))break t;if(T=e[h+184>>2],c=i+4|0,!Je(e[e[c>>2]+56>>2],h+180|0,e[1392])||!Je(e[e[c>>2]+56>>2],h+176|0,e[1393]))break e;l=(T|0)!=0;n:{o:{r:{i:{a:switch(n=e[h+180>>2],n|0){case 3:break i;case 0:break a;default:break r}if(a=e[h+176>>2],n=0,o=e[c>>2],e[o+256>>2]=0,e[o+264>>2]=a,e[o+260>>2]=l,f=e[o+56>>2],o=e[1356],!Je(f,h,o)||(e[e[c>>2]+272>>2]=e[h>>2],f=e[1357],!Je(e[e[c>>2]+56>>2],h,f))||(e[e[c>>2]+276>>2]=e[h>>2],l=e[1358],!Je(e[e[c>>2]+56>>2],h,l))||(e[e[c>>2]+280>>2]=e[h>>2],g=e[1359],!Je(e[e[c>>2]+56>>2],h,g))||(e[e[c>>2]+284>>2]=e[h>>2],m=e[1360],!Je(e[e[c>>2]+56>>2],h,m))||(e[e[c>>2]+288>>2]=e[h>>2],v=e[1361],!Je(e[e[c>>2]+56>>2],h,v))||(e[e[c>>2]+292>>2]=e[h>>2]+1,A=e[1362],!Je(e[e[c>>2]+56>>2],h,A))||(e[e[c>>2]+296>>2]=e[h>>2]+1,C=e[c>>2],E=e[C+56>>2],I=C+304|0,C=e[1363],!ji(E,I,C))||(E=e[c>>2],!No(e[E+56>>2],E+312|0,16)))break e;if(!os(e[e[c>>2]+56>>2],a-((C+(A+(v+(m+(g+(l+(o+f|0)|0)|0)|0)|0)|0)|0)+128>>>3|0)|0))break t;if(o=e[c>>2],e[o+248>>2]=1,cu(o+312|0,7555,16)||(e[o+3624>>2]=0),e[o+3632>>2]|!e[o+608>>2]||(n=e[o+28>>2],!n))break o;Le[n](i,o+256|0,e[o+48>>2]);break o}o=e[c>>2],e[o+252>>2]=0,f=e[h+176>>2],e[o+448>>2]=(f>>>0)/18,e[o+440>>2]=f,e[o+436>>2]=l,e[o+432>>2]=3,o=e[c>>2],n=e[o+452>>2],a=e[o+448>>2];i:{if(a){if(oe(a,0,24,0),!ne){if(o=xn(n,ie(a,24)),o){e[e[c>>2]+452>>2]=o;break i}Ne(n),o=e[c>>2]}e[o+452>>2]=0;break n}if(o=xn(n,0),e[e[c>>2]+452>>2]=o,!o)break n}n=e[c>>2],o=0;i:{if(!e[n+448>>2])break i;for(l=e[1367],g=e[1366],m=e[1365],a=0;;){if(!ji(e[n+56>>2],h,m)||(n=e[h+4>>2],o=ie(a,24),v=e[c>>2],A=o+e[v+452>>2]|0,e[A>>2]=e[h>>2],e[A+4>>2]=n,!ji(e[v+56>>2],h,g))||(n=e[h+4>>2],v=e[c>>2],A=o+e[v+452>>2]|0,e[A+8>>2]=e[h>>2],e[A+12>>2]=n,!Je(e[v+56>>2],h+188|0,l)))break t;if(n=e[c>>2],e[(o+e[n+452>>2]|0)+16>>2]=e[h+188>>2],a=a+1|0,o=e[n+448>>2],!(a>>>0>>0))break}o=ie(o,-18)}if(o=o+f|0,o){if(!os(e[n+56>>2],o))break t;n=e[c>>2]}if(e[n+252>>2]=1,e[n+3632>>2]|!e[n+620>>2]||(o=e[n+28>>2],!o))break o;Le[o](i,n+432|0,e[n+48>>2]);break o}a=e[c>>2],g=e[(a+(n<<2)|0)+608>>2],f=e[h+176>>2],o=In(h,176),e[o+8>>2]=f,e[o>>2]=n,e[o+4>>2]=l,m=!g;r:{if((n|0)!=2)break r;if(v=o+16|0,l=e[1364]>>>3|0,!No(e[a+56>>2],v,l))break t;if(f>>>0>>0){e[e[i>>2]>>2]=8,n=0;break e}if(f=f-l|0,a=e[c>>2],A=e[a+1124>>2],!A)break r;for(C=e[a+1120>>2],n=0;;){if(cu(C+ie(n,l)|0,v,l)){if(n=n+1|0,(A|0)!=(n|0))continue;break r}break}m=(g|0)!=0}if(m){if(!os(e[a+56>>2],f))break t;break o}r:{i:{a:{s:{l:{u:{f:switch(e[o+180>>2]){case 1:if(os(e[a+56>>2],f))break l;l=0;break r;case 2:if(!f)break u;if(n=bn(f),e[o+20>>2]=n,!n){e[e[i>>2]>>2]=8,l=0;break r}if(No(e[a+56>>2],n,f))break l;l=0;break r;case 4:c:{if(f>>>0<8)break c;if(l=0,!xd(e[a+56>>2],o+16|0))break r;f=f+-8|0,n=e[o+16>>2];d:{if(n){if(f>>>0>>0){e[o+16>>2]=0,e[o+20>>2]=0;break c}p:{h:{if((n|0)==-1){e[o+20>>2]=0;break h}if(a=bn(n+1|0),e[o+20>>2]=a,a)break p}e[e[i>>2]>>2]=8;break r}if(!No(e[e[c>>2]+56>>2],a,n))break r;f=f-n|0,K[e[o+20>>2]+e[o+16>>2]|0]=0;break d}e[o+20>>2]=0}if(!xd(e[e[c>>2]+56>>2],o+24|0))break r;if(n=e[o+24>>2],n>>>0>=100001){e[o+24>>2]=0;break r}if(!n)break c;if(a=uu(n,8),e[o+28>>2]=a,!a)break a;if(!e[o+24>>2])break c;e[a>>2]=0,e[a+4>>2]=0,n=0;d:{if(f>>>0<4)break d;for(;;){if(!xd(e[e[c>>2]+56>>2],a))break i;f=f+-4|0,g=e[o+28>>2],m=n<<3,a=g+m|0,l=e[a>>2];p:{if(l){if(f>>>0>>0)break d;h:{m:{if((l|0)==-1){e[(g+(n<<3)|0)+4>>2]=0;break m}if(g=bn(l+1|0),e[a+4>>2]=g,g)break h}e[e[i>>2]>>2]=8;break i}if(f=f-l|0,In(g,e[a>>2]),l=No(e[e[c>>2]+56>>2],e[a+4>>2],e[a>>2]),g=m+e[o+28>>2]|0,a=e[g+4>>2],!l){Ne(a),e[(e[o+28>>2]+(n<<3)|0)+4>>2]=0;break d}K[a+e[g>>2]|0]=0;break p}e[a+4>>2]=0}if(n=n+1|0,n>>>0>=ze[o+24>>2])break c;if(a=e[o+28>>2]+(n<<3)|0,e[a>>2]=0,e[a+4>>2]=0,!(f>>>0>=4))break}}e[o+24>>2]=n}if(!f||(e[o+24>>2]||(n=o+28|0,Ne(e[n>>2]),e[n>>2]=0),os(e[e[c>>2]+56>>2],f)))break l;l=0;break r;case 5:if(l=0,n=In(o+16|0,160),!No(e[a+56>>2],n,e[1378]>>>3|0)||!ji(e[e[c>>2]+56>>2],o+152|0,e[1379])||!Je(e[e[c>>2]+56>>2],o+188|0,e[1380])||(e[o+160>>2]=e[o+188>>2]!=0,!Sd(e[e[c>>2]+56>>2],e[1381]))||!Je(e[e[c>>2]+56>>2],o+188|0,e[1382]))break r;if(n=e[o+188>>2],e[o+164>>2]=n,!n)break l;if(n=Go(n,32),e[o+168>>2]=n,!n)break s;if(m=e[1371],!ji(e[e[c>>2]+56>>2],n,m))break r;for(v=e[1373]>>>3|0,A=e[1370],C=e[1369],g=e[1368],E=e[1377],B=e[1376],G=e[1375],te=e[1374],ae=e[1372],f=0;;){if(!Je(e[e[c>>2]+56>>2],o+188|0,ae)||(n=(f<<5)+n|0,K[n+8|0]=e[o+188>>2],!No(e[e[c>>2]+56>>2],n+9|0,v))||!Je(e[e[c>>2]+56>>2],o+188|0,te)||(K[n+22|0]=H[n+22|0]&254|K[o+188|0]&1,!Je(e[e[c>>2]+56>>2],o+188|0,G))||(a=n+22|0,K[a|0]=H[o+188|0]<<1&2|H[a|0]&253,!Sd(e[e[c>>2]+56>>2],B))||!Je(e[e[c>>2]+56>>2],o+188|0,E))break r;a=e[o+188>>2],K[n+23|0]=a;c:{if(a=a&255,!a)break c;a=Go(a,16),e[n+24>>2]=a;d:{if(a){if(I=n+23|0,!H[I|0])break c;if(!ji(e[e[c>>2]+56>>2],a,g))break r;he=n+24|0,n=0;break d}e[e[i>>2]>>2]=8;break r}for(;;){if(!Je(e[e[c>>2]+56>>2],o+188|0,C)||(K[((n<<4)+a|0)+8|0]=e[o+188>>2],!Sd(e[e[c>>2]+56>>2],A)))break r;if(n=n+1|0,n>>>0>=H[I|0])break c;if(a=e[he>>2],!ji(e[e[c>>2]+56>>2],a+(n<<4)|0,g))break}break r}if(f=f+1|0,f>>>0>=ze[o+164>>2])break l;if(n=e[o+168>>2],!ji(e[e[c>>2]+56>>2],n+(f<<5)|0,m))break}break r;case 6:c:{if(!Je(e[a+56>>2],o+188|0,e[1383])||(e[o+16>>2]=e[o+188>>2],!Je(e[e[c>>2]+56>>2],o+188|0,e[1384])))break c;d:{n=e[o+188>>2];p:{if((n|0)==-1){e[o+20>>2]=0;break p}if(a=bn(n+1|0),e[o+20>>2]=a,a)break d}e[e[i>>2]>>2]=8,l=0;break r}if(n){if(!No(e[e[c>>2]+56>>2],a,n))break c;a=e[o+20>>2],n=e[o+188>>2]}else n=0;if(K[n+a|0]=0,!Je(e[e[c>>2]+56>>2],o+188|0,e[1385]))break c;d:{n=e[o+188>>2];p:{if((n|0)==-1){e[o+24>>2]=0;break p}if(a=bn(n+1|0),e[o+24>>2]=a,a)break d}e[e[i>>2]>>2]=8,l=0;break r}if(n){if(!No(e[e[c>>2]+56>>2],a,n))break c;a=e[o+24>>2],n=e[o+188>>2]}else n=0;if(K[n+a|0]=0,!Je(e[e[c>>2]+56>>2],o+28|0,e[1386])||!Je(e[e[c>>2]+56>>2],o+32|0,e[1387])||!Je(e[e[c>>2]+56>>2],o+36|0,e[1388])||!Je(e[e[c>>2]+56>>2],o+40|0,e[1389])||!Je(e[e[c>>2]+56>>2],o+44|0,e[1390]))break c;if(n=e[o+44>>2],a=bn(n||1),e[o+48>>2]=a,!a){e[e[i>>2]>>2]=8,l=0;break r}if(!n||No(e[e[c>>2]+56>>2],a,n))break l}l=0;break r;case 0:case 3:break l;default:break f}f:{if(f){if(n=bn(f),e[o+16>>2]=n,n)break f;e[e[i>>2]>>2]=8,l=0;break r}e[o+16>>2]=0;break l}if(No(e[a+56>>2],n,f))break l;l=0;break r}e[o+20>>2]=0}if(l=1,n=e[c>>2],e[n+3632>>2]||(a=e[n+28>>2],!a))break r;Le[a](i,o,e[n+48>>2]);break r}e[e[i>>2]>>2]=8;break r}e[o+24>>2]=0,e[e[i>>2]>>2]=8;break r}e[o+24>>2]=n,l=0}r:{i:switch(e[o+180>>2]+-1|0){case 1:if(o=e[o+20>>2],!o)break r;Ne(o);break r;case 3:if(n=e[o+20>>2],n&&Ne(n),a=e[o+24>>2],a)for(n=0;f=e[(e[o+28>>2]+(n<<3)|0)+4>>2],f&&(Ne(f),a=e[o+24>>2]),n=n+1|0,n>>>0>>0;);if(o=e[o+28>>2],!o)break r;Ne(o);break r;case 4:if(a=e[o+164>>2],a)for(n=0;f=e[(e[o+168>>2]+(n<<5)|0)+24>>2],f&&(Ne(f),a=e[o+164>>2]),n=n+1|0,n>>>0>>0;);if(o=e[o+168>>2],!o)break r;Ne(o);break r;case 5:if(n=e[o+20>>2],n&&Ne(n),n=e[o+24>>2],n&&Ne(n),o=e[o+48>>2],!o)break r;Ne(o);break r;case 0:break r;default:break i}if(o=e[o+16>>2],!o)break r;Ne(o)}if(!l)break t}if(n=1,!T)break e;o:{r:{if(a=e[c>>2],e[a>>2]||(f=e[a+12>>2],!f)||(o=a+6136|0,Le[f](i,o,e[a+48>>2]))||!Cd(e[e[c>>2]+56>>2]))break r;a=e[o>>2],c=e[e[c>>2]+56>>2],c=((e[c+8>>2]-e[c+16>>2]<<5)+(e[c+12>>2]<<3)|0)-e[c+20>>2]>>>3|0,f=e[o+4>>2]-(a>>>0>>0)|0,e[o>>2]=a-c,e[o+4>>2]=f;break o}o=e[c>>2],e[o+6136>>2]=0,e[o+6140>>2]=0}e[e[i>>2]>>2]=2;break e}e[e[i>>2]>>2]=8}n=0}return be=h+192|0,n}function Mm(i){var o=0,n=0,a=0,c=0,f=0;c=be-16|0,be=c;e:{t:{n:{if(n=e[i+4>>2],!e[n+248>>2]||(a=e[n+308>>2],o=a,f=e[n+304>>2],!(o|f))||(a=e[n+244>>2],(o|0)==(a|0)&ze[n+240>>2]>>0|a>>>0>>0))break n;e[e[i>>2]>>2]=4;break t}n:{if(Cd(e[n+56>>2])||(n=e[e[i+4>>2]+56>>2],Je(n,c+12|0,rm(n))))break n;o=0;break e}for(n=0;;){a=e[i+4>>2];n:{if(e[a+3520>>2]){o=H[a+3590|0],e[c+12>>2]=o,e[a+3520>>2]=0;break n}if(o=0,!Je(e[a+56>>2],c+12|0,8))break e;o=e[c+12>>2]}n:{if((o|0)!=255)break n;if(K[e[i+4>>2]+3588|0]=255,o=0,!Je(e[e[i+4>>2]+56>>2],c+12|0,8))break e;if(o=e[c+12>>2],(o|0)==255){o=e[i+4>>2],e[o+3520>>2]=1,K[o+3590|0]=255;break n}if((o&-2)!=248)break n;K[e[i+4>>2]+3589|0]=o,e[e[i>>2]>>2]=3;break t}o=n,n=1,!o&&(o=e[i+4>>2],!e[o+3632>>2]&&Le[e[o+32>>2]](i,0,e[o+48>>2]))}}o=1}return be=c+16|0,o}function Nm(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0;h=be+-64|0,be=h,e[o>>2]=0,n=e[i+4>>2],c=$t[(H[n+3588|0]<<1)+1280>>1],f=e[n+56>>2],e[f+24>>2]=$t[((H[n+3589|0]^c>>>8)<<1)+1280>>1]^c<<8&65280,n=e[f+20>>2],e[f+28>>2]=e[f+16>>2],e[f+32>>2]=n,f=e[i+4>>2],K[h+32|0]=H[f+3588|0],n=H[f+3589|0],e[h+12>>2]=2,K[h+33|0]=n;e:{if(!Je(e[f+56>>2],h+28|0,8))break e;c=i+4|0;t:{n:{o:{r:{if(f=e[h+28>>2],(f|0)==255)break r;if(K[h+34|0]=f,e[h+12>>2]=3,!Je(e[e[c>>2]+56>>2],h+28|0,8))break n;if(f=e[h+28>>2],(f|0)==255)break r;g=n>>>1&1,n=e[h+12>>2],K[n+(h+32|0)|0]=f,f=1,e[h+12>>2]=n+1,n=H[h+34|0],a=n>>>4|0,e[h+28>>2]=a;i:{a:{s:{l:switch(a-1|0){case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:e[e[c>>2]+1136>>2]=256<>2]+1136>>2]=576<>2]+1136>>2]=192}a=0}f=g}l=n&15,e[h+28>>2]=l;i:{a:{s:switch(l-1|0){default:if(l=0,g=e[c>>2],e[g+248>>2])break a;f=1;break i;case 0:e[e[c>>2]+1140>>2]=88200,l=0;break i;case 1:e[e[c>>2]+1140>>2]=176400,l=0;break i;case 2:e[e[c>>2]+1140>>2]=192e3,l=0;break i;case 3:e[e[c>>2]+1140>>2]=8e3,l=0;break i;case 4:e[e[c>>2]+1140>>2]=16e3,l=0;break i;case 5:e[e[c>>2]+1140>>2]=22050,l=0;break i;case 6:e[e[c>>2]+1140>>2]=24e3,l=0;break i;case 7:e[e[c>>2]+1140>>2]=32e3,l=0;break i;case 8:e[e[c>>2]+1140>>2]=44100,l=0;break i;case 9:e[e[c>>2]+1140>>2]=48e3,l=0;break i;case 10:e[e[c>>2]+1140>>2]=96e3,l=0;break i;case 11:case 12:case 13:break i;case 14:break s}f=e[c>>2],e[f+3632>>2]||Le[e[f+32>>2]](i,1,e[f+48>>2]),n=e[i>>2],e[n>>2]=2;break o}e[g+1140>>2]=e[g+288>>2]}v=H[h+35|0],m=v>>>4|0,e[h+28>>2]=m;i:{a:{if(m&8){n=e[c>>2],e[n+1144>>2]=2,g=1;s:switch(m&7){case 1:g=2;break a;case 0:break a;case 2:break s;default:break i}g=3;break a}n=e[c>>2],e[n+1144>>2]=m+1,g=0}e[n+1148>>2]=g,g=f}m=v>>>1&7,e[h+28>>2]=m,f=1;i:{a:{s:switch(m-1|0){default:if(!e[n+248>>2])break i;e[n+1152>>2]=e[n+296>>2];break a;case 0:e[n+1152>>2]=8;break a;case 1:e[n+1152>>2]=12;break a;case 3:e[n+1152>>2]=16;break a;case 4:e[n+1152>>2]=20;break a;case 2:case 6:break i;case 5:break s}e[n+1152>>2]=24}f=g}i:{if(!(!e[n+248>>2]|e[n+272>>2]==e[n+276>>2]&&!(K[h+33|0]&1))){if(!N8(e[n+56>>2],h+16|0,h+32|0,h+12|0))break n;if(g=e[h+20>>2],n=g,m=e[h+16>>2],(m|0)==-1&(n|0)==-1){g=H[(e[h+12>>2]+h|0)+31|0],f=e[c>>2],e[f+3520>>2]=1,K[f+3590|0]=g,e[f+3632>>2]||Le[e[f+32>>2]](i,1,e[f+48>>2]),n=e[i>>2],e[n>>2]=2;break o}g=e[c>>2],A=g+1160|0,e[A>>2]=m,e[A+4>>2]=n,e[g+1156>>2]=1;break i}if(!M8(e[n+56>>2],h+28|0,h+32|0,h+12|0))break n;if(g=e[h+28>>2],(g|0)==-1){g=H[(e[h+12>>2]+h|0)+31|0],f=e[c>>2],e[f+3520>>2]=1,K[f+3590|0]=g,e[f+3632>>2]||Le[e[f+32>>2]](i,1,e[f+48>>2]),n=e[i>>2],e[n>>2]=2;break o}n=e[c>>2],e[n+1160>>2]=g,e[n+1156>>2]=0}if(n=e[c>>2],a){if(!Je(e[n+56>>2],h+28|0,8))break n;if(n=e[h+12>>2],g=e[h+28>>2],K[n+(h+32|0)|0]=g,e[h+12>>2]=n+1,(a|0)==7){if(!Je(e[e[c>>2]+56>>2],h+8|0,8))break n;g=e[h+12>>2],n=e[h+8>>2],K[g+(h+32|0)|0]=n,e[h+12>>2]=g+1,g=n|e[h+28>>2]<<8,e[h+28>>2]=g}n=e[c>>2],e[n+1136>>2]=g+1}if(l){if(!Je(e[n+56>>2],h+28|0,8))break n;g=e[h+12>>2],n=e[h+28>>2],K[g+(h+32|0)|0]=n,e[h+12>>2]=g+1;i:{if((l|0)!=12){if(!Je(e[e[c>>2]+56>>2],h+8|0,8))break n;if(g=e[h+12>>2],n=e[h+8>>2],K[g+(h+32|0)|0]=n,e[h+12>>2]=g+1,a=n|e[h+28>>2]<<8,e[h+28>>2]=a,(l|0)==13)break i;a=ie(a,10);break i}a=ie(n,1e3)}n=e[c>>2],e[n+1140>>2]=a}if(!Je(e[n+56>>2],h+28|0,8))break n;if(g=H[h+28|0],a=tm(h+32|0,e[h+12>>2]),n=e[c>>2],(a|0)!=(g|0)){e[n+3632>>2]||Le[e[n+32>>2]](i,1,e[n+48>>2]),n=e[i>>2],e[n>>2]=2;break o}e[n+232>>2]=0;i:{a:{if(e[n+1156>>2])break a;if(a=n+1160|0,g=e[a>>2],e[h+28>>2]=g,e[n+1156>>2]=1,l=e[n+228>>2],l){Se=a,Ee=oe(l,0,g,0),e[Se>>2]=Ee,e[a+4>>2]=ne;break a}if(e[n+248>>2]){if(a=e[n+272>>2],(a|0)!=e[n+276>>2])break i;n=n+1160|0,Se=n,Ee=oe(a,0,g,0),e[Se>>2]=Ee,e[n+4>>2]=ne,g=e[c>>2],e[g+232>>2]=e[g+276>>2];break a}if(!g){g=n+1160|0,e[g>>2]=0,e[g+4>>2]=0,g=e[c>>2],e[g+232>>2]=e[g+1136>>2];break a}a=n+1160|0,Se=a,Ee=oe(e[n+1136>>2],0,g,0),e[Se>>2]=Ee,e[a+4>>2]=ne}if(!(f|v&1)){n=e[i>>2];break o}n=e[c>>2]}i:{if(!e[n+3632>>2]){Le[e[n+32>>2]](i,3,e[n+48>>2]);break i}e[n+6152>>2]=e[n+6152>>2]+1}n=e[i>>2],e[n>>2]=2;break o}f=e[c>>2],e[f+3520>>2]=1,K[f+3590|0]=255,e[f+3632>>2]||Le[e[f+32>>2]](i,1,e[f+48>>2]),n=e[i>>2],e[n>>2]=2}if(g=1,e[n>>2]==2)break e;if(n=e[c>>2],f=e[n+1144>>2],l=e[n+1136>>2],!(ze[n+224>>2]>=f>>>0&&ze[n+220>>2]>=l>>>0)){a=e[n+60>>2],a&&(Ne(a+-16|0),e[e[c>>2]+60>>2]=0,n=e[c>>2]),a=e[n+3592>>2],a&&(Ne(a),e[e[c>>2]+92>>2]=0,e[e[c>>2]+3592>>2]=0,n=e[c>>2]),a=e[n- -64>>2],a&&(Ne(a+-16|0),e[e[c>>2]- -64>>2]=0,n=e[c>>2]),a=e[n+3596>>2],a&&(Ne(a),e[e[c>>2]+96>>2]=0,e[e[c>>2]+3596>>2]=0,n=e[c>>2]),a=e[n+68>>2],a&&(Ne(a+-16|0),e[e[c>>2]+68>>2]=0,n=e[c>>2]),a=e[n+3600>>2],a&&(Ne(a),e[e[c>>2]+100>>2]=0,e[e[c>>2]+3600>>2]=0,n=e[c>>2]),a=e[n+72>>2],a&&(Ne(a+-16|0),e[e[c>>2]+72>>2]=0,n=e[c>>2]),a=e[n+3604>>2],a&&(Ne(a),e[e[c>>2]+104>>2]=0,e[e[c>>2]+3604>>2]=0,n=e[c>>2]),a=e[n+76>>2],a&&(Ne(a+-16|0),e[e[c>>2]+76>>2]=0,n=e[c>>2]),a=e[n+3608>>2],a&&(Ne(a),e[e[c>>2]+108>>2]=0,e[e[c>>2]+3608>>2]=0,n=e[c>>2]),a=e[n+80>>2],a&&(Ne(a+-16|0),e[e[c>>2]+80>>2]=0,n=e[c>>2]),a=e[n+3612>>2],a&&(Ne(a),e[e[c>>2]+112>>2]=0,e[e[c>>2]+3612>>2]=0,n=e[c>>2]),a=e[n+84>>2],a&&(Ne(a+-16|0),e[e[c>>2]+84>>2]=0,n=e[c>>2]),a=e[n+3616>>2],a&&(Ne(a),e[e[c>>2]+116>>2]=0,e[e[c>>2]+3616>>2]=0,n=e[c>>2]),a=e[n+88>>2],a&&(Ne(a+-16|0),e[e[c>>2]+88>>2]=0,n=e[c>>2]),n=e[n+3620>>2],n&&(Ne(n),e[e[c>>2]+120>>2]=0,e[e[c>>2]+3620>>2]=0);o:{if(!f)break o;if(l>>>0>4294967291||(n=l+4|0,(n&1073741823)!=(n|0)))break t;for(m=n<<2,a=0;;){if(n=bn(m),!n)break t;if(e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,e[n+12>>2]=0,v=a<<2,e[(v+e[c>>2]|0)+60>>2]=n+16,n=v+e[c>>2]|0,fi(l,n+3592|0,n+92|0)){if(a=a+1|0,(f|0)==(a|0))break o;continue}break}e[e[i>>2]>>2]=8;break n}n=e[c>>2],e[n+224>>2]=f,e[n+220>>2]=l,f=e[n+1144>>2]}o:{if(f)for(G=e[1412],he=-1<>2];r:{i:switch(e[n+1148>>2]+-1|0){case 0:a=((f|0)==1)+a|0;break r;case 1:a=!f+a|0;break r;case 2:break i;default:break r}a=((f|0)==1)+a|0}if(!Je(e[n+56>>2],h+28|0,8))break n;n=e[h+28>>2],e[h+28>>2]=n&254,E=n&1;r:{if(E){if(!Ed(e[e[c>>2]+56>>2],h+32|0)||(n=e[c>>2],l=e[h+32>>2]+1|0,e[(n+ie(f,292)|0)+1464>>2]=l,a>>>0<=l>>>0))break n;a=a-l|0;break r}n=e[c>>2],e[(n+ie(f,292)|0)+1464>>2]=0}l=e[h+28>>2];r:{if(l&128){e[n+3632>>2]||Le[e[n+32>>2]](i,0,e[n+48>>2]),e[e[i>>2]>>2]=2;break r}i:{a:{s:switch(l|0){case 0:if(l=e[((f<<2)+n|0)+60>>2],m=ie(f,292)+n|0,e[m+1176>>2]=0,!Bi(e[n+56>>2],h+32|0,a))break n;if(e[m+1180>>2]=e[h+32>>2],n=0,a=e[c>>2],!e[a+1136>>2])break a;for(;e[l+(n<<2)>>2]=e[h+32>>2],n=n+1|0,n>>>0>2];);break a;case 2:if(l=(n+1136|0)+ie(f,292)|0,m=l+44|0,v=f<<2,A=e[(v+n|0)+92>>2],e[m>>2]=A,e[l+40>>2]=1,l=0,e[n+1136>>2]){for(;;){if(!Bi(e[n+56>>2],h+32|0,a))break n;if(e[A+(l<<2)>>2]=e[h+32>>2],l=l+1|0,n=e[c>>2],C=e[n+1136>>2],!(l>>>0>>0))break}l=C<<2}gn(e[(n+v|0)+60>>2],e[m>>2],l);break a;default:break s}if(l>>>0<=15){s:{if(!e[n+3632>>2]){Le[e[n+32>>2]](i,3,e[n+48>>2]);break s}e[n+6152>>2]=e[n+6152>>2]+1}e[e[i>>2]>>2]=2;break r}if(l>>>0<=24){if(m=ie(f,292)+n|0,e[m+1176>>2]=2,A=f<<2,C=e[(A+n|0)+92>>2],v=l>>>1&7,e[m+1192>>2]=v,e[m+1212>>2]=C,l=e[n+56>>2],v)for(C=m+1196|0,n=0;;){if(!Bi(l,h+32|0,a))break n;if(e[C+(n<<2)>>2]=e[h+32>>2],l=e[e[c>>2]+56>>2],n=n+1|0,(v|0)==(n|0))break}if(!Je(l,h+16|0,ae))break n;l=m+1180|0,a=e[h+16>>2],e[l>>2]=a,n=e[c>>2];s:{l:{if(a>>>0<=1){if(!Je(e[n+56>>2],h+16|0,te))break n;if(n=e[c>>2],a=e[h+16>>2],e[n+1136>>2]>>>a>>>0>=v>>>0)break l;e[n+3632>>2]||Le[e[n+32>>2]](i,0,e[n+48>>2]),e[e[i>>2]>>2]=2;break s}u:{if(!e[n+3632>>2]){Le[e[n+32>>2]](i,3,e[n+48>>2]);break u}e[n+6152>>2]=e[n+6152>>2]+1}e[e[i>>2]>>2]=2;break s}if(e[m+1184>>2]=a,n=ie(f,12),e[m+1188>>2]=(n+e[c>>2]|0)+124,l=e[l>>2],l>>>0<2&&(I=a,a=e[i+4>>2],!Im(i,v,I,(n+a|0)+124|0,e[(a+A|0)+92>>2],(l|0)==1)))break n;n=v<<2,gn(e[(A+e[c>>2]|0)+60>>2],m+1196|0,n),a=e[c>>2],l=a+A|0,yw(e[l+92>>2],e[a+1136>>2]-v|0,v,n+e[l+60>>2]|0)}if(e[e[i>>2]>>2]==2)break r;if(E)break i;break r}if(l>>>0<=63){s:{if(!e[n+3632>>2]){Le[e[n+32>>2]](i,3,e[n+48>>2]);break s}e[n+6152>>2]=e[n+6152>>2]+1}e[e[i>>2]>>2]=2;break r}for(m=ie(f,292)+n|0,e[m+1176>>2]=3,A=f<<2,T=e[(A+n|0)+92>>2],C=l>>>1&31,v=C+1|0,e[m+1192>>2]=v,e[m+1460>>2]=T,l=e[n+56>>2],n=0;;){if(!Bi(l,h+32|0,a))break n;if(e[(m+(n<<2)|0)+1332>>2]=e[h+32>>2],T=(n|0)!=(C|0),l=e[e[c>>2]+56>>2],n=n+1|0,!T)break}if(!Je(l,h+16|0,G))break n;n=e[h+16>>2];s:{if((n|0)==(he|0)){n=e[c>>2],e[n+3632>>2]||Le[e[n+32>>2]](i,0,e[n+48>>2]),e[e[i>>2]>>2]=2;break s}if(B=m+1196|0,e[B>>2]=n+1,!Bi(e[e[c>>2]+56>>2],h+32|0,ye))break n;if(n=e[h+32>>2],(n|0)<=-1){n=e[c>>2],e[n+3632>>2]||Le[e[n+32>>2]](i,0,e[n+48>>2]),e[e[i>>2]>>2]=2;break s}for(T=m+1200|0,e[T>>2]=n,l=e[e[c>>2]+56>>2],n=0;;){if(!Bi(l,h+32|0,e[B>>2]))break n;if(e[(m+(n<<2)|0)+1204>>2]=e[h+32>>2],I=(n|0)!=(C|0),l=e[e[c>>2]+56>>2],n=n+1|0,!I)break}if(!Je(l,h+16|0,ae))break n;I=m+1180|0,l=e[h+16>>2],e[I>>2]=l,n=e[c>>2];l:{if(l>>>0<=1){if(!Je(e[n+56>>2],h+16|0,te))break n;if(n=e[c>>2],l=e[h+16>>2],e[n+1136>>2]>>>l>>>0>C>>>0)break l;e[n+3632>>2]||Le[e[n+32>>2]](i,0,e[n+48>>2]),e[e[i>>2]>>2]=2;break s}u:{if(!e[n+3632>>2]){Le[e[n+32>>2]](i,3,e[n+48>>2]);break u}e[n+6152>>2]=e[n+6152>>2]+1}e[e[i>>2]>>2]=2;break s}if(e[m+1184>>2]=l,n=ie(f,12),e[m+1188>>2]=(n+e[c>>2]|0)+124,C=e[I>>2],C>>>0<2&&(I=l,l=e[i+4>>2],!Im(i,v,I,(n+l|0)+124|0,e[(l+A|0)+92>>2],(C|0)==1)))break n;l=v<<2,gn(e[(e[c>>2]+A|0)+60>>2],m+1332|0,l);l:{if(C=e[B>>2],C+((Qt(v)^31)+a|0)>>>0<=32){if(n=e[c>>2],a>>>0>16|C>>>0>16)break l;a=n+A|0,Le[e[n+44>>2]](e[a+92>>2],e[n+1136>>2]-v|0,m+1204|0,v,e[T>>2],l+e[a+60>>2]|0);break s}n=e[c>>2],a=n+A|0,Le[e[n+40>>2]](e[a+92>>2],e[n+1136>>2]-v|0,m+1204|0,v,e[T>>2],l+e[a+60>>2]|0);break s}a=n+A|0,Le[e[n+36>>2]](e[a+92>>2],e[n+1136>>2]-v|0,m+1204|0,v,e[T>>2],l+e[a+60>>2]|0)}if(!E|e[e[i>>2]>>2]==2)break r;break i}if(!E)break r}if(a=e[c>>2],n=e[(a+ie(f,292)|0)+1464>>2],e[h+28>>2]=n,!e[a+1136>>2]||(l=e[(a+(f<<2)|0)+60>>2],e[l>>2]=e[l>>2]<>2]<2))break r;for(;m=l+(n<<2)|0,e[m>>2]=e[m>>2]<>2],n=n+1|0,n>>>0>2];);}if(e[e[i>>2]>>2]==2)break o;if(f=f+1|0,n=e[c>>2],!(f>>>0>2]))break}r:{if(Cd(e[n+56>>2]))break r;if(e[h+32>>2]=0,f=e[e[c>>2]+56>>2],!Je(f,h+32|0,rm(f)))break n;if(!e[h+32>>2])break r;f=e[c>>2],e[f+3632>>2]||Le[e[f+32>>2]](i,0,e[f+48>>2]),e[e[i>>2]>>2]=2}if(e[e[i>>2]>>2]==2||(f=P8(e[e[c>>2]+56>>2]),g=0,!Je(e[e[c>>2]+56>>2],h+16|0,e[1404])))break e;r:{if((f|0)==e[h+16>>2]){i:{a:{s:switch(f=e[c>>2],e[f+1148>>2]+-1|0){case 2:break i;case 0:break a;case 1:break s;default:break r}if(!e[f+1136>>2])break r;for(n=e[f- -64>>2],l=e[f+60>>2],a=0;m=a<<2,v=m+l|0,e[v>>2]=e[v>>2]+e[n+m>>2],a=a+1|0,a>>>0>2];);break r}if(!e[f+1136>>2])break r;for(n=e[f- -64>>2],l=e[f+60>>2],a=0;m=a<<2,v=m+n|0,e[v>>2]=e[l+m>>2]-e[v>>2],a=a+1|0,a>>>0>2];);break r}if(!e[f+1136>>2])break r;for(v=e[f- -64>>2],A=e[f+60>>2],a=0;l=a<<2,n=l+A|0,E=l+v|0,l=e[E>>2],m=l&1|e[n>>2]<<1,e[n>>2]=l+m>>1,e[E>>2]=m-l>>1,a=a+1|0,a>>>0>2];);break r}if(f=e[c>>2],e[f+3632>>2]||Le[e[f+32>>2]](i,2,e[f+48>>2]),n=e[c>>2],!e[n+1144>>2])break r;for(a=0;In(e[((a<<2)+n|0)+60>>2],e[n+1136>>2]<<2),a=a+1|0,n=e[c>>2],a>>>0>2];);}e[o>>2]=1,n=e[c>>2],o=e[n+232>>2],o&&(e[n+228>>2]=o),o=e[i>>2],l=e[n+1144>>2],e[o+8>>2]=l,e[o+12>>2]=e[n+1148>>2],E=e[n+1152>>2],e[o+16>>2]=E,e[o+20>>2]=e[n+1140>>2],f=e[n+1136>>2],e[o+24>>2]=f,o=n+1160|0,m=e[o>>2],a=e[o+4>>2],o=a,C=f+m|0,C>>>0>>0&&(o=o+1|0),e[n+240>>2]=C,e[n+244>>2]=o,v=n+60|0,A=n+1136|0;r:{i:{a:{if(e[n+3632>>2]){if(e[n+6156>>2]=1,E=e[n+6144>>2],f=e[n+6148>>2],gn(n+3752|0,A,2384),(a|0)==(f|0)&E>>>0>>0|f>>>0>>0|((o|0)==(f|0)&E>>>0>=C>>>0|f>>>0>o>>>0))break r;if(a=0,o=e[c>>2],e[o+3632>>2]=0,f=E-m|0,c=f,c){if(l)for(;m=a<<2,e[m+(h+32|0)>>2]=e[(n+m|0)+60>>2]+(c<<2),a=a+1|0,(l|0)!=(a|0););e[o+3752>>2]=e[o+3752>>2]-c,n=o+3776|0,c=n,a=n,o=e[n+4>>2],n=f+e[n>>2]|0,n>>>0>>0&&(o=o+1|0),e[a>>2]=n,e[c+4>>2]=o,o=e[i+4>>2],o=Le[e[o+24>>2]](i,o+3752|0,h+32|0,e[o+48>>2])|0;break a}o=Le[e[o+24>>2]](i,A,v,e[o+48>>2])|0;break a}s:{if(!e[n+248>>2]){e[n+3624>>2]=0;break s}if(!e[n+3624>>2])break s;if(!vm(n+3636|0,v,l,f,E+7>>>3|0))break i;n=e[c>>2]}o=Le[e[n+24>>2]](i,A,v,e[n+48>>2])|0}if(!o)break r}e[e[i>>2]>>2]=7;break e}e[e[i>>2]>>2]=2}g=1;break e}g=0;break e}e[e[i>>2]>>2]=8,g=0}return be=h- -64|0,g}function Im(i,o,n,a,c,f){var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0;l=be-16|0,be=l,h=e[e[i+4>>2]+1136>>2],A=e[(f?5644:5640)>>2],C=e[(f?5632:5628)>>2];e:{t:{if(Md(a,n>>>0>6?n:6)){if(g=n?h>>>n|0:h-o|0,E=e[1409],!n)break t;for(f=0;;){if(!Je(e[e[i+4>>2]+56>>2],l+12|0,C)){h=0;break e}m=v<<2,e[m+e[a>>2]>>2]=e[l+12>>2];n:{if(ze[l+12>>2]>>0){if(h=0,e[m+e[a+4>>2]>>2]=0,m=g-(v?0:o)|0,!om(e[e[i+4>>2]+56>>2],(f<<2)+c|0,m,e[l+12>>2]))break e;f=f+m|0;break n}if(!Je(e[e[i+4>>2]+56>>2],l+12|0,E)){h=0;break e}if(e[m+e[a+4>>2]>>2]=e[l+12>>2],h=v?0:o,h>>>0>=g>>>0)break n;for(;;){if(!Bi(e[e[i+4>>2]+56>>2],l+8|0,e[l+12>>2])){h=0;break e}if(e[(f<<2)+c>>2]=e[l+8>>2],f=f+1|0,h=h+1|0,(g|0)==(h|0))break}}if(h=1,v=v+1|0,!!(v>>>n))break}break e}e[e[i>>2]>>2]=8,h=0;break e}if(h=0,!Je(e[e[i+4>>2]+56>>2],l+12|0,C))break e;e[e[a>>2]>>2]=e[l+12>>2];t:{if(ze[l+12>>2]>=A>>>0){if(!Je(e[e[i+4>>2]+56>>2],l+12|0,E))break e;if(e[e[a+4>>2]>>2]=e[l+12>>2],!g)break t;for(f=0;;){if(!Bi(e[e[i+4>>2]+56>>2],l+8|0,e[l+12>>2])){h=0;break e}if(e[(f<<2)+c>>2]=e[l+8>>2],f=f+1|0,h=h+1|0,(g|0)==(h|0))break}break t}if(e[e[a+4>>2]>>2]=0,!om(e[e[i+4>>2]+56>>2],c,g,e[l+12>>2]))break e}h=1}return be=l+16|0,h}function Tw(i){i=i|0;var o=0,n=0;e:{t:{for(;;){n:{o=1;o:switch(e[e[i>>2]>>2]){case 0:if(Td(i))continue;break n;case 2:case 3:case 4:case 7:break t;case 1:break o;default:break e}if(Fd(i))continue}break}o=0}n=o}return n|0}function Fw(i){i=i|0;var o=0,n=0,a=0;o=be-16|0,be=o,n=1;e:{t:{for(;;){n:{o:switch(e[e[i>>2]>>2]){case 0:if(Td(i))continue;break n;case 1:if(Fd(i))continue;break n;case 2:if(Mm(i))continue;break t;case 4:case 7:break t;case 3:break o;default:break e}if(Nm(i,o+12|0))continue}break}n=0}a=n}return be=o+16|0,a|0}function Lw(i,o,n,a){return i=i|0,o=o|0,n=n|0,a=a|0,i=Le[e[e[i+4>>2]+4>>2]](i,o,n,a)|0,i>>>0<=2?e[(i<<2)+7572>>2]:5}function Dw(i){var o=0;o=e[i>>2],o&&Ne(o),e[i+16>>2]=0,e[i>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0}function Ow(i){var o=0;return e[i+16>>2]=0,e[i+8>>2]=8192,e[i+12>>2]=0,o=i,i=bn(32768),e[o>>2]=i,(i|0)!=0}function Ld(i){e[i+12>>2]=0,e[i+16>>2]=0}function Bw(i,o){var n=0,a=0,c=0,f=0;n=be-16|0,be=n,a=0;e:{if(!Dd(i,n+12|0,n+8|0))break e;c=o,f=x8(e[n+12>>2],e[n+8>>2]),Ht[c>>1]=f,a=1}return be=n+16|0,a}function Dd(i,o,n){var a=0,c=0,f=0,l=0,h=0;f=e[i+16>>2];e:{if(f&7)break e;t:{if(!f){c=e[i>>2],a=0;break t}l=e[i+12>>2];n:{if((l|0)!=e[i+8>>2]||(c=f+63>>>5|0,a=c+l|0,a>>>0<=l>>>0))break n;l=0,f=e[i>>2],h=a,a=c&1023,a=h+(a?1024-a|0:0)|0;o:{if(a){if((a|0)!=(a&1073741823))break e;if(c=xn(f,a<<2),c)break o;return Ne(f),0}if(c=xn(f,0),!c)break e}e[i+8>>2]=a,e[i>>2]=c,l=e[i+12>>2],f=e[i+16>>2]}c=e[i>>2],a=e[i+4>>2]<<32-f,e[c+(l<<2)>>2]=a<<24|a<<8&16711680|(a>>>8&65280|a>>>24),a=e[i+16>>2]>>>3|0}e[o>>2]=c,e[n>>2]=a+(e[i+12>>2]<<2),l=1}return l}function jw(i,o){var n=0,a=0,c=0,f=0;n=be-16|0,be=n,a=0;e:{if(!Dd(i,n+12|0,n+8|0))break e;c=o,f=tm(e[n+12>>2],e[n+8>>2]),K[c|0]=f,a=1}return be=n+16|0,a}function is(i,o){var n=0,a=0,c=0,f=0;e:{t:{if(!o)break t;n=e[i+8>>2],a=e[i+12>>2];n:{if(n>>>0>a+o>>>0||(c=a+((e[i+16>>2]+o|0)+31>>>5|0)|0,c>>>0<=n>>>0))break n;a=0,f=e[i>>2],n=c-n&1023,n=c+(n?1024-n|0:0)|0;o:{if(n){if((n|0)!=(n&1073741823))break e;if(c=xn(f,n<<2),c)break o;return Ne(f),0}if(c=xn(f,0),!c)break e}e[i+8>>2]=n,e[i>>2]=c}if(n=e[i+16>>2],n){if(c=n,n=32-n|0,a=n>>>0>>0?n:o,f=c+a|0,e[i+16>>2]=f,n=e[i+4>>2]<>2]=n,(f|0)!=32)break t;f=e[i+12>>2],e[i+12>>2]=f+1,e[e[i>>2]+(f<<2)>>2]=n<<8&16711680|n<<24|(n>>>8&65280|n>>>24),e[i+16>>2]=0,o=o-a|0}if(o>>>0>=32)for(n=e[i>>2];a=e[i+12>>2],e[i+12>>2]=a+1,e[n+(a<<2)>>2]=0,o=o+-32|0,o>>>0>31;);if(!o)break t;e[i+16>>2]=o,e[i+4>>2]=0}a=1}return a}function ht(i,o,n){var a=0;e:{if(n>>>0<=31&&(a=0,o>>>n))break e;a=ft(i,o,n)}return a}function ft(i,o,n){var a=0,c=0,f=0,l=0,h=0;e:{if(!i|n>>>0>32||(c=e[i>>2],!c)||(l=1,!n))break e;h=e[i+8>>2],a=e[i+12>>2];t:{if(h>>>0>a+n>>>0){a=c;break t}if(f=a+((e[i+16>>2]+n|0)+31>>>5|0)|0,f>>>0<=h>>>0){a=c;break t}l=0,a=f-h&1023,f=f+(a?1024-a|0:0)|0;n:{if(f){if((f|0)!=(f&1073741823))break e;if(a=xn(c,f<<2),a)break n;return Ne(c),0}if(a=xn(c,0),!a)break e}e[i+8>>2]=f,e[i>>2]=a}if(c=e[i+16>>2],f=32-c|0,f>>>0>n>>>0)return e[i+16>>2]=n+c,e[i+4>>2]=e[i+4>>2]<>2]=c,n=e[i+12>>2],e[i+12>>2]=n+1,a=(n<<2)+a|0,n=e[i+4>>2]<>>c,e[a>>2]=n<<24|n<<8&16711680|(n>>>8&65280|n>>>24),e[i+4>>2]=o,1;l=1,n=i,i=e[i+12>>2],e[n+12>>2]=i+1,e[(i<<2)+a>>2]=o<<8&16711680|o<<24|(o>>>8&65280|o>>>24)}return l}function zi(i,o,n){return ft(i,(n>>>0<32?-1<>>0>=33){if(a=a+-32|0,n>>>a|0&&a>>>0<=31||!ft(i,n,a))break e;return(ft(i,o,32)|0)!=0}if((a|0)!=32&&o>>>a)break e;c=ft(i,o,a)}return c}function Od(i,o){var n=0;e:{if(!ft(i,o&255,8)||!ft(i,o>>>8&255,8)||!ft(i,o>>>16&255,8))break e;n=(ft(i,o>>>24|0,8)|0)!=0}return n}function Io(i,o,n){var a=0,c=0,f=0,l=0;a=e[i+8>>2],c=e[i+12>>2];e:{t:{if(a>>>0>(c+(n>>>2|0)|0)+1>>>0||(f=c+((e[i+16>>2]+(n<<3)|0)+31>>>5|0)|0,f>>>0<=a>>>0))break t;c=0,l=e[i>>2],a=f-a&1023,a=f+(a?1024-a|0:0)|0;n:{if(a){if((a|0)!=(a&1073741823))break e;if(f=xn(l,a<<2),f)break n;return Ne(l),0}if(f=xn(l,0),!f)break e}e[i+8>>2]=a,e[i>>2]=f}if(c=1,!n)break e;c=0;t:{for(;;){if(!ft(i,H[o+c|0],8))break t;if(c=c+1|0,(c|0)==(n|0))break}return 1}c=0}return c}function fu(i,o){return o>>>0<=31?ft(i,1,o+1|0):is(i,o)?(ft(i,1,1)|0)!=0:0}function Rm(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0;c=1;e:{if(!n)break e;for(v=a+1|0,A=-1<>>31-a|0;;){l=e[o>>2],m=l<<1^l>>31,l=m>>>a|0,c=v+l|0;t:{n:{if(f=e[i+16>>2],!f||(h=c+f|0,h>>>0>31))break n;e[i+16>>2]=h,e[i+4>>2]=(m|A)&C|e[i+4>>2]<>2],h=e[i+12>>2];n:{if(g>>>0>(h+(f+l|0)|0)+1>>>0||(c=h+((c+f|0)+31>>>5|0)|0,c>>>0<=g>>>0))break n;h=e[i>>2],f=c-g&1023,f=c+(f?1024-f|0:0)|0;o:{if(f){if(c=0,(f|0)!=(f&1073741823))break e;if(g=xn(h,f<<2),g)break o;return Ne(h),0}if(g=xn(h,0),c=0,!g)break e}e[i+8>>2]=f,e[i>>2]=g}n:{if(!l)break n;if(c=e[i+16>>2],c){if(f=e[i+4>>2],h=32-c|0,l>>>0>>0){e[i+16>>2]=c+l,e[i+4>>2]=f<>2]=c,f=e[i+12>>2],e[i+12>>2]=f+1,e[e[i>>2]+(f<<2)>>2]=c<<8&16711680|c<<24|(c>>>8&65280|c>>>24),e[i+16>>2]=0,l=l-h|0}if(l>>>0>=32)for(c=e[i>>2];f=e[i+12>>2],e[i+12>>2]=f+1,e[c+(f<<2)>>2]=0,l=l+-32|0,l>>>0>31;);if(!l)break n;e[i+16>>2]=l,e[i+4>>2]=0}if(l=(m|A)&C,c=e[i+4>>2],h=e[i+16>>2],f=32-h|0,v>>>0>>0){e[i+16>>2]=h+v,e[i+4>>2]=l|c<>2]=h,m=e[i+12>>2],e[i+12>>2]=m+1,c=c<>>h,e[e[i>>2]+(m<<2)>>2]=c<<24|c<<8&16711680|(c>>>8&65280|c>>>24),e[i+4>>2]=l}if(o=o+4|0,n=n+-1|0,!n)break}c=1}return c}function zw(i,o){if((o|0)>=0){if(o>>>0<=127)return ft(i,o,8);if(o>>>0<=2047)return ft(i,o>>>6|192,8)&ft(i,o&63|128,8)&1;if(o>>>0<=65535)return ft(i,o>>>12|224,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;if(o>>>0<=2097151)return ft(i,o>>>18|240,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;if(o>>>0<=67108863)return ft(i,o>>>24|248,8)&ft(i,o>>>18&63|128,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;i=ft(i,o>>>30|252,8)&ft(i,o>>>24&63|128,8)&ft(i,o>>>18&63|128,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1}else i=0;return i}function Vw(i,o,n){if((n|0)==15|n>>>0<15){if(!n&o>>>0<=127|n>>>0<0)return ft(i,o,8);if(!n&o>>>0<=2047|n>>>0<0)return ft(i,(n&63)<<26|o>>>6|192,8)&ft(i,o&63|128,8)&1;if(!n&o>>>0<=65535|n>>>0<0)return ft(i,(n&4095)<<20|o>>>12|224,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;if(!n&o>>>0<=2097151|n>>>0<0)return ft(i,(n&262143)<<14|o>>>18|240,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;if(!n&o>>>0<=67108863|n>>>0<0)return ft(i,(n&16777215)<<8|o>>>24|248,8)&ft(i,o>>>18&63|128,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;if(!n&o>>>0<=2147483647|n>>>0<0)return ft(i,(n&1073741823)<<2|o>>>30|252,8)&ft(i,o>>>24&63|128,8)&ft(i,o>>>18&63|128,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1;i=ft(i,254,8)&ft(i,(n&1073741823)<<2|o>>>30|128,8)&ft(i,o>>>24&63|128,8)&ft(i,o>>>18&63|128,8)&ft(i,o>>>12&63|128,8)&ft(i,o>>>6&63|128,8)&ft(i,o&63|128,8)&1}else i=0;return i}function Ww(i){return lm(i+8|0,e[i>>2])?i=0:(e[i+392>>2]=0,e[i+396>>2]=0,e[i+384>>2]=0,e[i+388>>2]=1,i=1),i}function Tm(i){e[i>>2]=0,e[i+4>>2]=0}function Uw(i,o,n,a,c,f,l,h,g){var m=0,v=0,A=0,C=0,E=0,I=0;m=be-96|0,be=m;e:{t:{if(e[i+384>>2]){e[m+72>>2]=0,e[m+76>>2]=0,C=m+80|0,A=C,e[A>>2]=0,e[A+4>>2]=0,e[m+88>>2]=0,e[m+92>>2]=0,e[m+64>>2]=0,e[m+68>>2]=0,v=e[i+396>>2],A=a,E=e[i+392>>2],I=A+E|0,I>>>0>>0&&(v=v+1|0),e[C>>2]=I,e[C+4>>2]=v;n:{o:{if(e[i+388>>2]){if((n|0)!=38)break n;K[m|0]=H[7536],n=e[2721],n=H[n|0]|H[n+1|0]<<8|(H[n+2|0]<<16|H[n+3|0]<<24),K[m+5|0]=1,K[m+6|0]=0,K[m+1|0]=n,K[m+2|0]=n>>>8,K[m+3|0]=n>>>16,K[m+4|0]=n>>>24,v=e[i+4>>2],n=H[5409]|H[5410]<<8|(H[5411]<<16|H[5412]<<24),K[m+9|0]=n,K[m+10|0]=n>>>8,K[m+11|0]=n>>>16,K[m+12|0]=n>>>24,K[m+8|0]=v,K[m+7|0]=v>>>8,n=H[o+34|0]|H[o+35|0]<<8|(H[o+36|0]<<16|H[o+37|0]<<24),v=H[o+30|0]|H[o+31|0]<<8|(H[o+32|0]<<16|H[o+33|0]<<24),K[m+43|0]=v,K[m+44|0]=v>>>8,K[m+45|0]=v>>>16,K[m+46|0]=v>>>24,K[m+47|0]=n,K[m+48|0]=n>>>8,K[m+49|0]=n>>>16,K[m+50|0]=n>>>24,n=H[o+28|0]|H[o+29|0]<<8|(H[o+30|0]<<16|H[o+31|0]<<24),v=H[o+24|0]|H[o+25|0]<<8|(H[o+26|0]<<16|H[o+27|0]<<24),K[m+37|0]=v,K[m+38|0]=v>>>8,K[m+39|0]=v>>>16,K[m+40|0]=v>>>24,K[m+41|0]=n,K[m+42|0]=n>>>8,K[m+43|0]=n>>>16,K[m+44|0]=n>>>24,n=H[o+20|0]|H[o+21|0]<<8|(H[o+22|0]<<16|H[o+23|0]<<24),v=H[o+16|0]|H[o+17|0]<<8|(H[o+18|0]<<16|H[o+19|0]<<24),K[m+29|0]=v,K[m+30|0]=v>>>8,K[m+31|0]=v>>>16,K[m+32|0]=v>>>24,K[m+33|0]=n,K[m+34|0]=n>>>8,K[m+35|0]=n>>>16,K[m+36|0]=n>>>24,n=H[o+12|0]|H[o+13|0]<<8|(H[o+14|0]<<16|H[o+15|0]<<24),v=H[o+8|0]|H[o+9|0]<<8|(H[o+10|0]<<16|H[o+11|0]<<24),K[m+21|0]=v,K[m+22|0]=v>>>8,K[m+23|0]=v>>>16,K[m+24|0]=v>>>24,K[m+25|0]=n,K[m+26|0]=n>>>8,K[m+27|0]=n>>>16,K[m+28|0]=n>>>24,n=H[o+4|0]|H[o+5|0]<<8|(H[o+6|0]<<16|H[o+7|0]<<24),o=H[o|0]|H[o+1|0]<<8|(H[o+2|0]<<16|H[o+3|0]<<24),K[m+13|0]=o,K[m+14|0]=o>>>8,K[m+15|0]=o>>>16,K[m+16|0]=o>>>24,K[m+17|0]=n,K[m+18|0]=n>>>8,K[m+19|0]=n>>>16,K[m+20|0]=n>>>24,e[m+68>>2]=51,e[m+72>>2]=1,e[m+64>>2]=m,e[i+388>>2]=0;break o}e[m+68>>2]=n,e[m+64>>2]=o}if(f&&(e[m+76>>2]=1),o=i+8|0,W8(o,m- -64|0))break n;if(n=i+368|0,!a)for(;;){if(!dm(o,n,1))break t;if(Le[l](h,e[i+368>>2],e[i+372>>2],0,c,g))break n;if(Le[l](h,e[i+376>>2],e[i+380>>2],0,c,g))break n}for(;;){if(!U8(o,n))break t;if(Le[l](h,e[i+368>>2],e[i+372>>2],0,c,g))break n;if(Le[l](h,e[i+376>>2],e[i+380>>2],0,c,g))break}}l=1;break e}if(l=1,a|c|(n|0)!=4|(H[o|0]|H[o+1|0]<<8|(H[o+2|0]<<16|H[o+3|0]<<24))!=(H[5409]|H[5410]<<8|(H[5411]<<16|H[5412]<<24)))break e;e[i+384>>2]=1,A=a}o=i,a=o,n=e[o+396>>2],i=A+e[o+392>>2]|0,i>>>0>>0&&(n=n+1|0),e[a+392>>2]=i,e[o+396>>2]=n,l=0}return be=m+96|0,l}function Fm(i){e[i>>2]=0,e[i+4>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0}function ss(i){var o=0;o=e[i>>2],o&&Ne(o),o=e[i+8>>2],o&&Ne(o),e[i>>2]=0,e[i+4>>2]=0,e[i+8>>2]=0,e[i+12>>2]=0}function Lm(i,o,n,a,c,f,l){var h=0,g=0,m=0;h=be-16|0,be=h;e:{if(!c)break e;t:switch(Le[c](i,o,n,l)|0){case 1:e[e[i>>2]>>2]=5;break e;case 0:break t;default:break e}if(c=bn(282),e[a>>2]=c,!c){e[e[i>>2]>>2]=8;break e}for(g=27;;){e[h+12>>2]=g,o=5;t:{n:switch(Le[f](i,c,h+12|0,l)|0){case 1:if(o=e[h+12>>2],o)break t;o=2;default:e[e[i>>2]>>2]=o;break e;case 3:break e;case 0:break n}o=e[h+12>>2]}if(c=o+c|0,g=g-o|0,!g)break}o=e[a>>2],e[a+4>>2]=H[o+26|0]+27;t:{if(!(K[o+5|0]&1|(H[o|0]|H[o+1|0]<<8|(H[o+2|0]<<16|H[o+3|0]<<24))!=1399285583|((H[o+6|0]|H[o+7|0]<<8|(H[o+8|0]<<16|H[o+9|0]<<24))!=0|(H[o+10|0]|H[o+11|0]<<8|(H[o+12|0]<<16|H[o+13|0]<<24))!=0))&&(g=H[o+26|0],g))break t;e[e[i>>2]>>2]=2;break e}for(c=o+27|0;;){e[h+12>>2]=g,o=5;t:{n:switch(Le[f](i,c,h+12|0,l)|0){case 1:if(o=e[h+12>>2],o)break t;o=2;default:e[e[i>>2]>>2]=o;break e;case 3:break e;case 0:break n}o=e[h+12>>2]}if(c=o+c|0,g=g-o|0,!g)break}c=0,o=e[a>>2],n=H[o+26|0];t:{if((n|0)!=1)for(n=n+-1|0;;){if(H[(o+c|0)+27|0]!=255){e[e[i>>2]>>2]=2;break t}if(c=c+1|0,!(c>>>0>>0))break}if(c=H[(o+c|0)+27|0]+ie(c,255)|0,e[a+12>>2]=c,g=bn(c||1),e[a+8>>2]=g,!g){e[e[i>>2]>>2]=8;break t}if(n=h,c){for(;;){e[h+12>>2]=c,o=5;n:{o:switch(Le[f](i,g,h+12|0,l)|0){case 1:if(o=e[h+12>>2],o)break n;o=2;default:e[e[i>>2]>>2]=o;break t;case 3:break t;case 0:break o}o=e[h+12>>2]}if(g=o+g|0,c=c-o|0,!c)break}o=e[a>>2]}if(e[n+12>>2]=H[o+22|0]|H[o+23|0]<<8|(H[o+24|0]<<16|H[o+25|0]<<24),um(a),o=e[a>>2],e[h+12>>2]==(H[o+22|0]|H[o+23|0]<<8|(H[o+24|0]<<16|H[o+25|0]<<24))){m=1;break e}e[e[i>>2]>>2]=2}}return be=h+16|0,m}function Dm(i,o,n,a,c,f,l){e:{t:{if(!c)break t;n:switch(Le[c](i,o,n,l)|0){case 1:break e;case 0:break n;default:break t}if(um(a),Le[f](i,e[a>>2],e[a+4>>2],0,0,l))break e;if(!Le[f](i,e[a+8>>2],e[a+12>>2],0,0,l))return 1;e[e[i>>2]>>2]=5}return 0}return e[e[i>>2]>>2]=5,0}function Hw(i){return 0}function Gw(i,o,n,a){return ne=0,0}function Om(i,o){var n=0,a=0;n=H[i|0],a=H[o|0];e:{if(!n|(n|0)!=(a|0))break e;for(;;){if(a=H[o+1|0],n=H[i+1|0],!n)break e;if(o=o+1|0,i=i+1|0,(n|0)!=(a|0))break}}return n-a|0}function Bd(i,o){var n=0,a=0,c=0,f=0;return n=i*i,a=n*.5,c=1-a,f=1-c-a,a=n*n,c+(f+(n*(n*(n*(n*2480158728947673e-20+-.001388888888887411)+.0416666666666666)+a*a*(n*(n*-11359647557788195e-27+2087572321298175e-24)+-27557314351390663e-23))-i*o))}function Vi(i,o){e:{if((o|0)>=1024){if(i=i*898846567431158e293,(o|0)<2047){o=o+-1023|0;break e}i=i*898846567431158e293,o=((o|0)<3069?o:3069)+-2046|0;break e}if((o|0)>-1023)break e;if(i=i*22250738585072014e-324,(o|0)>-2045){o=o+1022|0;break e}i=i*22250738585072014e-324,o=((o|0)>-3066?o:-3066)+2044|0}return ot(0,0),ot(1,o+1023<<20),i*+rt()}function Qw(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0;if(h=be-560|0,be=h,f=(n+-3|0)/24|0,B=(f|0)>0?f:0,v=n+ie(B,-24)|0,C=e[1901],m=a+-1|0,(C+m|0)>=0)for(f=a+C|0,n=B-m|0;it[(h+320|0)+(l<<3)>>3]=(n|0)<0?0:+e[(n<<2)+7616>>2],n=n+1|0,l=l+1|0,(f|0)!=(l|0););for(E=v+-24|0,f=0,l=(C|0)>0?C:0,A=(a|0)<1;;){e:{if(A){c=0;break e}for(g=f+m|0,n=0,c=0;c=c+it[(n<<3)+i>>3]*it[(h+320|0)+(g-n<<3)>>3],n=n+1|0,(a|0)!=(n|0););}if(it[(f<<3)+h>>3]=c,n=(f|0)==(l|0),f=f+1|0,!!n)break}he=47-v|0,G=48-v|0,ye=v+-25|0,f=C;e:{for(;;){if(c=it[(f<<3)+h>>3],n=0,l=f,m=(f|0)<1,!m)for(;;){A=(h+480|0)+(n<<2)|0,I=c,c=c*5960464477539063e-23;t:{if(On(c)<2147483648){g=~~c;break t}g=-2147483648}c=+(g|0),I=I+c*-16777216;t:{if(On(I)<2147483648){g=~~I;break t}g=-2147483648}if(e[A>>2]=g,l=l+-1|0,c=it[(l<<3)+h>>3]+c,n=n+1|0,(f|0)==(n|0))break}c=Vi(c,E),c=c+f8(c*.125)*-8;t:{if(On(c)<2147483648){A=~~c;break t}A=-2147483648}c=c-+(A|0);t:{n:{o:{te=(E|0)<1;r:{if(!te){l=((f<<2)+h|0)+476|0,g=e[l>>2],n=g>>G,T=l,l=g-(n<>2]=l,A=n+A|0,g=l>>he;break r}if(E)break o;g=e[((f<<2)+h|0)+476>>2]>>23}if((g|0)<1)break t;break n}if(g=2,c>=.5)break n;g=0;break t}if(n=0,l=0,!m)for(;;){T=(h+480|0)+(n<<2)|0,ae=e[T>>2],m=16777215;n:{o:{if(l||(m=16777216,ae))break o;l=0;break n}e[T>>2]=m-ae,l=1}if(n=n+1|0,(f|0)==(n|0))break}n:{if(te)break n;o:switch(ye|0){case 0:n=((f<<2)+h|0)+476|0,e[n>>2]=e[n>>2]&8388607;break n;case 1:break o;default:break n}n=((f<<2)+h|0)+476|0,e[n>>2]=e[n>>2]&4194303}if(A=A+1|0,(g|0)!=2||(c=1-c,g=2,!l))break t;c=c-Vi(1,E)}if(c==0){l=0;t:{if(n=f,(n|0)<=(C|0))break t;for(;n=n+-1|0,l=e[(h+480|0)+(n<<2)>>2]|l,(n|0)>(C|0););if(!l)break t;for(v=E;v=v+-24|0,f=f+-1|0,!e[(h+480|0)+(f<<2)>>2];);break e}for(n=1;l=n,n=n+1|0,!e[(h+480|0)+(C-l<<2)>>2];);for(l=f+l|0;;){if(m=a+f|0,f=f+1|0,it[(h+320|0)+(m<<3)>>3]=e[(B+f<<2)+7616>>2],n=0,c=0,(a|0)>=1)for(;c=c+it[(n<<3)+i>>3]*it[(h+320|0)+(m-n<<3)>>3],n=n+1|0,(a|0)!=(n|0););if(it[(f<<3)+h>>3]=c,!((f|0)<(l|0)))break}f=l;continue}break}c=Vi(c,0-E|0);t:{if(c>=16777216){a=(h+480|0)+(f<<2)|0,I=c,c=c*5960464477539063e-23;n:{if(On(c)<2147483648){n=~~c;break n}n=-2147483648}c=I+ +(n|0)*-16777216;n:{if(On(c)<2147483648){i=~~c;break n}i=-2147483648}e[a>>2]=i,f=f+1|0;break t}n=On(c)<2147483648?~~c:-2147483648,v=E}e[(h+480|0)+(f<<2)>>2]=n}c=Vi(1,v);e:{if((f|0)<=-1)break e;for(n=f;it[(n<<3)+h>>3]=c*+e[(h+480|0)+(n<<2)>>2],c=c*5960464477539063e-23,i=(n|0)>0,n=n+-1|0,!!i;);if(m=0,(f|0)<0)break e;for(i=(C|0)>0?C:0,l=f;;){for(a=i>>>0>>0?i:m,v=f-l|0,n=0,c=0;c=c+it[(n<<3)+10384>>3]*it[(n+l<<3)+h>>3],E=(n|0)!=(a|0),n=n+1|0,!!E;);if(it[(h+160|0)+(v<<3)>>3]=c,l=l+-1|0,n=(f|0)!=(m|0),m=m+1|0,!n)break}}if(c=0,(f|0)>=0)for(n=f;c=c+it[(h+160|0)+(n<<3)>>3],i=(n|0)>0,n=n+-1|0,!!i;);if(it[o>>3]=g?-c:c,c=it[h+160>>3]-c,n=1,(f|0)>=1)for(;c=c+it[(h+160|0)+(n<<3)>>3],i=(n|0)!=(f|0),n=n+1|0,!!i;);return it[o+8>>3]=g?-c:c,be=h+560|0,A&7}function Yw(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0;l=be-48|0,be=l,qe(+i),f=Oe(1)|0,a=Oe(0)|0;e:{t:{c=f,f=c,h=c&2147483647;n:{if(h>>>0<=1074752122){if((f&1048575)==598523)break n;if(h>>>0<=1073928572){if((c|0)>0||(c|0)>=0&&!(a>>>0<0)&&!0){i=i+-1.5707963267341256,n=i+-6077100506506192e-26,it[o>>3]=n,it[o+8>>3]=i-n+-6077100506506192e-26,a=1;break e}i=i+1.5707963267341256,n=i+6077100506506192e-26,it[o>>3]=n,it[o+8>>3]=i-n+6077100506506192e-26,a=-1;break e}if((c|0)>0||(c|0)>=0&&!(a>>>0<0)&&!0){i=i+-3.1415926534682512,n=i+-12154201013012384e-26,it[o>>3]=n,it[o+8>>3]=i-n+-12154201013012384e-26,a=2;break e}i=i+3.1415926534682512,n=i+12154201013012384e-26,it[o>>3]=n,it[o+8>>3]=i-n+12154201013012384e-26,a=-2;break e}if(h>>>0<=1075594811){if(h>>>0<=1075183036){if((h|0)==1074977148)break n;if((c|0)>0||(c|0)>=0&&!(a>>>0<0)&&!0){i=i+-4.712388980202377,n=i+-18231301519518578e-26,it[o>>3]=n,it[o+8>>3]=i-n+-18231301519518578e-26,a=3;break e}i=i+4.712388980202377,n=i+18231301519518578e-26,it[o>>3]=n,it[o+8>>3]=i-n+18231301519518578e-26,a=-3;break e}if((h|0)==1075388923)break n;if((c|0)>0||(c|0)>=0&&!(a>>>0<0)&&!0){i=i+-6.2831853069365025,n=i+-2430840202602477e-25,it[o>>3]=n,it[o+8>>3]=i-n+-2430840202602477e-25,a=4;break e}i=i+6.2831853069365025,n=i+2430840202602477e-25,it[o>>3]=n,it[o+8>>3]=i-n+2430840202602477e-25,a=-4;break e}if(h>>>0>1094263290)break t}m=i*.6366197723675814+6755399441055744+-6755399441055744,n=i+m*-1.5707963267341256,g=m*6077100506506192e-26,i=n-g,it[o>>3]=i,qe(+i),a=Oe(1)|0,Oe(0)|0,c=h>>>20|0,f=(c-(a>>>20&2047)|0)<17,On(m)<2147483648?a=~~m:a=-2147483648;n:{if(f||(g=n,i=m*6077100506303966e-26,n=n-i,g=m*20222662487959506e-37-(g-n-i),i=n-g,it[o>>3]=i,f=c,qe(+i),c=Oe(1)|0,Oe(0)|0,(f-(c>>>20&2047)|0)<50))break n;g=n,i=m*20222662487111665e-37,n=n-i,g=m*84784276603689e-45-(g-n-i),i=n-g,it[o>>3]=i}it[o+8>>3]=n-i-g;break e}if(h>>>0>=2146435072){i=i-i,it[o>>3]=i,it[o+8>>3]=i,a=0;break e}for(ot(0,a|0),ot(1,c&1048575|1096810496),i=+rt(),a=0,f=1;v=(l+16|0)+(a<<3)|0,On(i)<2147483648?a=~~i:a=-2147483648,n=+(a|0),it[v>>3]=n,i=(i-n)*16777216,a=1,v=f&1,f=0,!!v;);it[l+32>>3]=i;t:{if(i!=0){a=2;break t}for(f=1;a=f,f=a+-1|0,it[(l+16|0)+(a<<3)>>3]==0;);}if(a=Qw(l+16|0,l,(h>>>20|0)+-1046|0,a+1|0),i=it[l>>3],(c|0)<-1||(c|0)<=-1||!1){it[o>>3]=-i,it[o+8>>3]=-it[l+8>>3],a=0-a|0;break e}it[o>>3]=i,c=e[l+12>>2],e[o+8>>2]=e[l+8>>2],e[o+12>>2]=c}return be=l+48|0,a}function Bm(i,o){var n=0,a=0;return n=i*i,a=i,i=n*i,a-(n*(o*.5-i*(n*(n*n)*(n*158969099521155e-24+-25050760253406863e-24)+(n*(n*27557313707070068e-22+-.0001984126982985795)+.00833333333332249)))-o+i*.16666666666666632)}function pn(i){var o=0,n=0,a=0;o=be-16|0,be=o,qe(+i),a=Oe(1)|0,Oe(0)|0,a=a&2147483647;e:{if(a>>>0<=1072243195){if(n=1,a>>>0<1044816030)break e;n=Bd(i,0);break e}if(n=i-i,a>>>0>=2146435072)break e;t:switch(Yw(i,o)&3){case 0:n=Bd(it[o>>3],it[o+8>>3]);break e;case 1:n=-Bm(it[o>>3],it[o+8>>3]);break e;case 2:n=-Bd(it[o>>3],it[o+8>>3]);break e;default:break t}n=Bm(it[o>>3],it[o+8>>3])}return i=n,be=o+16|0,i}function Kw(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0;qe(+i),a=Oe(1)|0,h=Oe(0)|0,f=a>>>31|0;e:{t:{n:{o:{l=i;r:{i:{o=a,a=o&2147483647;a:{if(a>>>0>=1082532651){if(o=o&2147483647,(o|0)==2146435072&h>>>0>0|o>>>0>2146435072)return i;if(i>709.782712893384)return i*898846567431158e293;if(!(i<-708.3964185322641)||!(i<-745.1332191019411))break a;break t}if(a>>>0<1071001155)break o;if(a>>>0<1072734898)break i}if(i=i*1.4426950408889634+it[(f<<3)+10448>>3],On(i)<2147483648){o=~~i;break r}o=-2147483648;break r}o=(f^1)-f|0}n=+(o|0),i=l+n*-.6931471803691238,c=n*19082149292705877e-26,n=i-c;break n}if(a>>>0<=1043333120)break e;o=0,n=i}if(l=i,i=n*n,i=n-i*(i*(i*(i*(i*41381367970572385e-24+-16533902205465252e-22)+6613756321437934e-20)+-.0027777777777015593)+.16666666666666602),c=l+(n*i/(2-i)-c)+1,!o)break t;c=Vi(c,o)}return c}return i+1}function Xw(i,o){var n=0,a=ue(0),c=0,f=ue(0),l=0,h=0,g=0;h=o+-1|0;e:{if(o&1){if(c=(h|0)/2|0,(o|0)>=0)for(g=(c|0)>0?c:0,l=g+1|0,f=ue(h|0);a=ue(n|0),Ze[(n<<2)+i>>2]=ue(a+a)/f,c=(n|0)==(g|0),n=n+1|0,!c;);if((l|0)>=(o|0))break e;for(f=ue(h|0);a=ue(l|0),Ze[(l<<2)+i>>2]=ue(2)-ue(ue(a+a)/f),l=l+1|0,(l|0)!=(o|0););break e}if(c=(o|0)/2|0,(o|0)>=2){for(f=ue(h|0);a=ue(n|0),Ze[(n<<2)+i>>2]=ue(a+a)/f,n=n+1|0,(c|0)!=(n|0););n=c}if((n|0)>=(o|0))break e;for(f=ue(h|0);a=ue(n|0),Ze[(n<<2)+i>>2]=ue(2)-ue(ue(a+a)/f),n=n+1|0,(n|0)!=(o|0););}}function qw(i,o){var n=0,a=ue(0),c=ue(0),f=0,l=ue(0);if((o|0)>=1)for(c=ue(o+-1|0);a=ue(ue(n|0)/c),f=(n<<2)+i|0,l=ue(+ue(On(ue(a+ue(-.5))))*-.47999998927116394+.6200000047683716+pn(+a*6.283185307179586)*-.3799999952316284),Ze[f>>2]=l,n=n+1|0,(n|0)!=(o|0););}function Zw(i,o){var n=0,a=0,c=0,f=0,l=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=+(n|0),f=(n<<2)+i|0,l=ue(pn(c*12.566370614359172/a)*.07999999821186066+(pn(c*6.283185307179586/a)*-.5+.41999998688697815)),Ze[f>>2]=l,n=n+1|0,(n|0)!=(o|0););}function Jw(i,o){var n=0,a=0,c=0,f=0,l=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=+(n|0),f=(n<<2)+i|0,l=ue(pn(c*12.566370614359172/a)*.14127999544143677+(pn(c*6.283185307179586/a)*-.488290011882782+.35874998569488525)+pn(c*18.84955592153876/a)*-.011680000461637974),Ze[f>>2]=l,n=n+1|0,(n|0)!=(o|0););}function $w(i,o){var n=0,a=0,c=0;if((o|0)>=1)for(c=+(o+-1|0)*.5;n=(+(a|0)-c)/c,n=1-n*n,Ze[(a<<2)+i>>2]=n*n,a=a+1|0,(a|0)!=(o|0););}function eA(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=ue(0);if((o|0)>=1)for(n=+(o+-1|0);c=+(a|0),f=pn(c*12.566370614359172/n),l=pn(c*6.283185307179586/n),h=pn(c*18.84955592153876/n),g=(a<<2)+i|0,m=ue(pn(c*25.132741228718345/n)*.0069473679177463055+(f*.27726316452026367+(l*-.4166315793991089+.21557894349098206)+h*-.08357894420623779)),Ze[g>>2]=m,a=a+1|0,(a|0)!=(o|0););}function tA(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=ue(0);if((o|0)>=1)for(c=+(o+-1|0)*.5,l=c*+n;f=(+(a|0)-c)/l,h=(a<<2)+i|0,g=ue(Kw(f*(f*-.5))),Ze[h>>2]=g,a=a+1|0,(a|0)!=(o|0););}function nA(i,o){var n=0,a=0,c=0,f=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=(n<<2)+i|0,f=ue(pn(+(n|0)*6.283185307179586/a)*-.46000000834465027+.5400000214576721),Ze[c>>2]=f,n=n+1|0,(n|0)!=(o|0););}function jm(i,o){var n=0,a=0,c=0,f=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=(n<<2)+i|0,f=ue(.5-pn(+(n|0)*6.283185307179586/a)*.5),Ze[c>>2]=f,n=n+1|0,(n|0)!=(o|0););}function rA(i,o){var n=0,a=0,c=0,f=0,l=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=+(n|0),f=(n<<2)+i|0,l=ue(pn(c*12.566370614359172/a)*.09799999743700027+(pn(c*6.283185307179586/a)*-.49799999594688416+.4020000100135803)+pn(c*18.84955592153876/a)*-.0010000000474974513),Ze[f>>2]=l,n=n+1|0,(n|0)!=(o|0););}function oA(i,o){var n=0,a=0,c=0,f=0,l=ue(0);if((o|0)>=1)for(a=+(o+-1|0);c=+(n|0),f=(n<<2)+i|0,l=ue(pn(c*12.566370614359172/a)*.13659949600696564+(pn(c*6.283185307179586/a)*-.48917749524116516+.36358189582824707)+pn(c*18.84955592153876/a)*-.010641099885106087),Ze[f>>2]=l,n=n+1|0,(n|0)!=(o|0););}function iA(i,o){var n=0;if((o|0)>=1)for(;e[(n<<2)+i>>2]=1065353216,n=n+1|0,(n|0)!=(o|0););}function aA(i,o){var n=0,a=0,c=ue(0),f=0,l=ue(0),h=0;a=1;e:{if(o&1){if(n=(o+1|0)/2|0,(o|0)>=1)for(c=ue(ue(o|0)+ue(1)),f=(n|0)>1?n:1,a=f+1|0,n=1;l=ue(n|0),Ze[((n<<2)+i|0)+-4>>2]=ue(l+l)/c,h=(n|0)==(f|0),n=n+1|0,!h;);if((a|0)>(o|0))break e;for(c=ue(ue(o|0)+ue(1));Ze[((a<<2)+i|0)+-4>>2]=ue((o-a<<1)+2|0)/c,n=(o|0)==(a|0),a=a+1|0,!n;);break e}if(n=1,(o|0)>=2)for(f=o>>>1|0,n=f+1|0,c=ue(ue(o|0)+ue(1));l=ue(a|0),Ze[((a<<2)+i|0)+-4>>2]=ue(l+l)/c,h=(a|0)==(f|0),a=a+1|0,!h;);if((n|0)>(o|0))break e;for(c=ue(ue(o|0)+ue(1));Ze[((n<<2)+i|0)+-4>>2]=ue((o-n<<1)+2|0)/c,a=(o|0)!=(n|0),n=n+1|0,!!a;);}}function sA(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=ue(0);e:{if(n<=ue(0)){if((o|0)<1)break e;for(;e[(a<<2)+i>>2]=1065353216,a=a+1|0,(a|0)!=(o|0););break e}if(n>=ue(1)){if((o|0)<1)break e;for(f=+(o+-1|0);h=(a<<2)+i|0,g=ue(.5-pn(+(a|0)*6.283185307179586/f)*.5),Ze[h>>2]=g,a=a+1|0,(a|0)!=(o|0););break e}n=ue(ue(n*ue(.5))*ue(o|0));t:{if(ue(On(n))=1)for(;e[(a<<2)+i>>2]=1065353216,a=a+1|0,(a|0)!=(o|0););if((c|0)<2)break e;for(o=o-c|0,l=c+-1|0,f=+(l|0),a=0;h=(a<<2)+i|0,g=ue(.5-pn(+(a|0)*3.141592653589793/f)*.5),Ze[h>>2]=g,h=(o+a<<2)+i|0,g=ue(.5-pn(+(a+l|0)*3.141592653589793/f)*.5),Ze[h>>2]=g,a=a+1|0,(c|0)!=(a|0););}}function lA(i,o,n,a,c){for(var f=0,l=0,h=0,g=0,m=0,v=0,A=ue(0),C=0,E=0,I=0,T=ue(0);A=n,n=ue(.05000000074505806),!(!(A<=ue(0))&&(n=ue(.949999988079071),!(A>=ue(1)))););n=ue(o|0),a=ue(n*a);e:{if(ue(On(a))>>0>>0?f:g,In(i,(g<<2)+4|0),f=g+1|0;E=(m|0)==(g|0),m=m+1|0,!E;);l=l+h|0;e:{if((f|0)>=(l|0)|(f|0)>=(o|0))break e;for(C=+(h|0),m=1;;){if(I=(f<<2)+i|0,T=ue(.5-pn(+(m|0)*3.141592653589793/C)*.5),Ze[I>>2]=T,f=f+1|0,(f|0)>=(l|0))break e;if(m=m+1|0,!((f|0)<(o|0)))break}}l=v-h|0;e:{if((f|0)>=(l|0)|(f|0)>=(o|0))break e;for(;;){if(e[(f<<2)+i>>2]=1065353216,f=f+1|0,(f|0)>=(l|0))break e;if(!((f|0)<(o|0)))break}}e:{if((f|0)>=(v|0)|(f|0)>=(o|0))break e;for(C=+(h|0);;){if(I=(f<<2)+i|0,T=ue(.5-pn(+(h|0)*3.141592653589793/C)*.5),Ze[I>>2]=T,f=f+1|0,(f|0)>=(v|0))break e;if(h=h+-1|0,!((f|0)<(o|0)))break}}(f|0)<(o|0)&&In((f<<2)+i|0,o-f<<2)}function cA(i,o,n,a,c){for(var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=ue(0),E=0,I=ue(0),T=0,B=ue(0);C=n,n=ue(.05000000074505806),!(!(C<=ue(0))&&(n=ue(.949999988079071),!(C>=ue(1)))););n=ue(C*ue(.5)),I=n,C=ue(o|0),a=ue(C*a);e:{if(ue(On(a))>>0>>0?l:o,A=+(l|0),g=0,E=1;T=(g<<2)+i|0,B=ue(.5-pn(+(E|0)*3.141592653589793/A)*.5),Ze[T>>2]=B,E=E+1|0,g=g+1|0,(g|0)!=(f|0););g=v-l|0;e:{if((f|0)>=(g|0)|(f|0)>=(o|0))break e;for(;;){if(e[(f<<2)+i>>2]=1065353216,f=f+1|0,(f|0)>=(g|0))break e;if(!((f|0)<(o|0)))break}}e:{if((f|0)>=(v|0)|(f|0)>=(o|0))break e;for(A=+(l|0);;){if(T=(f<<2)+i|0,B=ue(.5-pn(+(l|0)*3.141592653589793/A)*.5),Ze[T>>2]=B,f=f+1|0,(f|0)>=(v|0))break e;if(l=l+-1|0,!((f|0)<(o|0)))break}}e:{if((f|0)>=(m|0)|(f|0)>=(o|0))break e;for(l=f^-1,v=l+m|0,l=o+l|0,In((f<<2)+i|0,((v>>>0>>0?v:l)<<2)+4|0);;){if(f=f+1|0,(f|0)>=(m|0))break e;if(!((f|0)<(o|0)))break}}m=h+m|0;e:{if((f|0)>=(m|0)|(f|0)>=(o|0))break e;for(A=+(h|0),l=1;;){if(T=(f<<2)+i|0,B=ue(.5-pn(+(l|0)*3.141592653589793/A)*.5),Ze[T>>2]=B,f=f+1|0,(f|0)>=(m|0))break e;if(l=l+1|0,!((f|0)<(o|0)))break}}l=o-h|0;e:{if((f|0)>=(l|0)|(f|0)>=(o|0))break e;for(;;){if(e[(f<<2)+i>>2]=1065353216,f=f+1|0,(f|0)>=(l|0))break e;if(!((f|0)<(o|0)))break}}if((f|0)<(o|0))for(A=+(h|0);T=(f<<2)+i|0,B=ue(.5-pn(+(h|0)*3.141592653589793/A)*.5),Ze[T>>2]=B,h=h+-1|0,f=f+1|0,(f|0)!=(o|0););}function uA(i,o){var n=0,a=0,c=0;if((o|0)>=1)for(a=+(o+-1|0)*.5;c=(+(n|0)-a)/a,Ze[(n<<2)+i>>2]=1-c*c,n=n+1|0,(n|0)!=(o|0););}function jd(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0;a=El(e[2720]);e:{if(!ht(o,e[i+4>>2],e[1391])||!ht(o,e[i>>2],e[1392])||(n=e[i+8>>2],n=e[i>>2]==4?(n+a|0)-e[i+16>>2]|0:n,c=e[1393],n>>>c)||!ht(o,n,c))break e;t:{n:{o:{r:{i:{a:{s:switch(e[i>>2]){case 3:if(!e[i+16>>2])break t;c=e[1367],l=e[1366],h=e[1365],n=0;break a;case 0:if(!ht(o,e[i+16>>2],e[1356])||!ht(o,e[i+20>>2],e[1357])||!ht(o,e[i+24>>2],e[1358])||!ht(o,e[i+28>>2],e[1359])||!ht(o,e[i+32>>2],e[1360])||!ht(o,e[i+36>>2]+-1|0,e[1361])||!ht(o,e[i+40>>2]+-1|0,e[1362])||!as(o,e[i+48>>2],e[i+52>>2],e[1363]))break e;if(Io(o,i+56|0,16))break t;break e;case 1:if(is(o,e[i+8>>2]<<3))break t;break e;case 6:break o;case 5:break r;case 4:break i;case 2:break s;default:break n}if(n=e[1364]>>>3|0,!Io(o,i+16|0,n))break e;if(Io(o,e[i+20>>2],e[i+8>>2]-n|0))break t;break e}for(;;){if(a=ie(n,24),f=a+e[i+20>>2]|0,!as(o,e[f>>2],e[f+4>>2],h)||(f=a+e[i+20>>2]|0,!as(o,e[f+8>>2],e[f+12>>2],l))||!ht(o,e[(a+e[i+20>>2]|0)+16>>2],c))break e;if(n=n+1|0,!(n>>>0>2]))break}break t}if(!Od(o,a)||!Io(o,e[2720],a)||!Od(o,e[i+24>>2]))break e;if(!e[i+24>>2])break t;for(n=0;;){if(a=n<<3,!Od(o,e[a+e[i+28>>2]>>2])||(a=a+e[i+28>>2]|0,!Io(o,e[a+4>>2],e[a>>2])))break e;if(n=n+1|0,!(n>>>0>2]))break}break t}if(!Io(o,i+16|0,e[1378]>>>3|0)||!as(o,e[i+152>>2],e[i+156>>2],e[1379])||!ht(o,e[i+160>>2]!=0,e[1380])||!is(o,e[1381])||!ht(o,e[i+164>>2],e[1382]))break e;if(!e[i+164>>2])break t;for(l=e[1373]>>>3|0,h=e[1370],f=e[1369],m=e[1368],v=e[1377],A=e[1376],C=e[1375],E=e[1374],I=e[1372],T=e[1371],a=0;;){if(n=e[i+168>>2]+(a<<5)|0,!as(o,e[n>>2],e[n+4>>2],T)||!ht(o,H[n+8|0],I)||!Io(o,n+9|0,l)||!ht(o,K[n+22|0]&1,E)||!ht(o,H[n+22|0]>>>1&1,C)||!is(o,A)||!ht(o,H[n+23|0],v))break e;r:{if(g=n+23|0,!H[g|0])break r;for(B=n+24|0,n=0;;){if(c=e[B>>2]+(n<<4)|0,!as(o,e[c>>2],e[c+4>>2],m)||!ht(o,H[c+8|0],f))return 0;if(is(o,h)){if(n=n+1|0,n>>>0>=H[g|0])break r;continue}break}return 0}if(a=a+1|0,!(a>>>0>2]))break}break t}if(!ht(o,e[i+16>>2],e[1383])||(n=El(e[i+20>>2]),!ht(o,n,e[1384]))||!Io(o,e[i+20>>2],n)||(n=El(e[i+24>>2]),!ht(o,n,e[1385]))||!Io(o,e[i+24>>2],n)||!ht(o,e[i+28>>2],e[1386])||!ht(o,e[i+32>>2],e[1387])||!ht(o,e[i+36>>2],e[1388])||!ht(o,e[i+40>>2],e[1389])||!ht(o,e[i+44>>2],e[1390]))break e;if(Io(o,e[i+48>>2],e[i+44>>2]))break t;break e}if(!Io(o,e[i+16>>2],e[i+8>>2]))break e}G=1}return G}function zm(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0;f=be-16|0,be=f;e:{if(!ht(o,e[1394],e[1395])||!ht(o,0,e[1396])||!ht(o,e[i+20>>2]!=0,e[1397]))break e;g=16,m=1,a=o;t:{n:{o:{r:{i:{a:{s:{l:{u:{if(n=e[i>>2],(n|0)<=2047){if((n|0)<=575){if(c=1,(n|0)==192)break t;if((n|0)==256)break a;if((n|0)!=512)break n;c=9;break t}if((n|0)==576)break u;if((n|0)==1024)break i;if((n|0)!=1152)break n;c=3;break t}if((n|0)<=4607){if((n|0)==2048)break r;if((n|0)==2304)break l;if((n|0)!=4096)break n;c=12;break t}if((n|0)<=16383){if((n|0)==4608)break s;if((n|0)!=8192)break n;c=13;break t}if((n|0)==16384)break o;if((n|0)!=32768)break n;c=15;break t}c=2;break t}c=4;break t}c=5;break t}c=8;break t}c=10;break t}c=11;break t}c=14;break t}n=n>>>0<257,g=n?8:16,m=0,c=n?6:7}if(!ht(a,c,e[1398]))break e;t:{n:{o:{r:{i:{a:{s:{l:{if(n=e[i+4>>2],(n|0)<=44099){if((n|0)<=22049){if((n|0)==8e3)break l;if((n|0)!=16e3)break n;a=5;break t}if((n|0)==22050)break s;if((n|0)==24e3)break a;if((n|0)!=32e3)break n;a=8;break t}if((n|0)<=95999){if((n|0)==44100)break i;if((n|0)==48e3)break r;if(a=1,(n|0)==88200)break t;break n}if((n|0)==96e3)break o;if((n|0)!=192e3){if((n|0)!=176400)break n;a=2;break t}a=3;break t}a=4;break t}a=6;break t}a=7;break t}a=9;break t}a=10;break t}a=11;break t}if(l=(n>>>0)%1e3|0,n>>>0<=255e3&&(a=12,h=12,!l))break t;if(!((n>>>0)%10)){a=14,h=14;break t}a=n>>>0<65536?13:0,h=a}if(l=0,!ht(o,a,e[1399]))break e;t:{n:switch(e[i+12>>2]){case 0:a=e[i+8>>2]+-1|0;break t;case 1:a=8;break t;case 2:a=9;break t;case 3:break n;default:break t}a=10}if(!ht(o,a,e[1400])||(a=o,n=Ke(e[i+16>>2]+-8|0,30),n>>>0<=4?n=e[(n<<2)+10464>>2]:n=0,!ht(a,n,e[1401]))||!ht(o,0,e[1402]))break e;t:{if(!e[i+20>>2]){if(zw(o,e[i+24>>2]))break t;break e}if(!Vw(o,e[i+24>>2],e[i+28>>2]))break e}if(!m&&!ht(o,e[i>>2]+-1|0,g))break e;t:{n:switch(h+-12|0){case 0:if(ht(o,ze[i+4>>2]/1e3|0,8))break t;break e;case 1:if(ht(o,e[i+4>>2],16))break t;break e;case 2:break n;default:break t}if(!ht(o,ze[i+4>>2]/10|0,16))break e}if(!jw(o,f+15|0))break e;l=(ht(o,H[f+15|0],e[1403])|0)!=0}return be=f+16|0,l}function fA(i,o,n,a){var c=0;e:{if(!ht(a,e[1417]|(n|0)!=0,e[1416]+(e[1415]+e[1414]|0)|0)||n&&!fu(a,n+-1|0))break e;c=(zi(a,e[i>>2],o)|0)!=0}return c}function dA(i,o,n,a,c){var f=0;e:{if(!ht(c,e[1419]|(a|0)!=0|e[i+12>>2]<<1,e[1416]+(e[1415]+e[1414]|0)|0)||a&&!fu(c,a+-1|0))break e;t:{if(!e[i+12>>2])break t;for(a=0;;){if(zi(c,e[((a<<2)+i|0)+16>>2],n)){if(a=a+1|0,a>>>0>2])continue;break t}break}return 0}if(!ht(c,e[i>>2],e[1405]))break e;t:{if(ze[i>>2]>1)break t;if(!ht(c,e[i+4>>2],e[1406]))break e;if(n=e[i>>2],n>>>0>1)break t;if(a=o,o=e[i+8>>2],!Vm(c,e[i+32>>2],a,e[i+12>>2],e[o>>2],e[o+4>>2],e[i+4>>2],(n|0)==1))break e}f=1}return f}function Vm(i,o,n,a,c,f,l,h){var g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0;C=e[(h?5644:5640)>>2],m=e[(h?5632:5628)>>2];e:{t:{if(!l){if(!e[f>>2]){if(!ht(i,e[c>>2],m)||!Rm(i,o,n,e[c>>2]))break t;break e}if(!ht(i,C,m)||!ht(i,e[f>>2],e[1409]))break t;if(!n)break e;for(h=0;;){if(zi(i,e[(h<<2)+o>>2],e[f>>2])){if(h=h+1|0,(h|0)!=(n|0))continue;break e}break}return 0}for(T=n+a>>>l|0,B=e[1409],n=0;;){h=n,E=T-(v?0:a)|0,n=h+E|0,I=v<<2,g=I+f|0;n:{if(!e[g>>2]){if(A=0,g=c+I|0,!ht(i,e[g>>2],m))break t;if(Rm(i,(h<<2)+o|0,E,e[g>>2]))break n;break t}if(A=0,!ht(i,C,m)||!ht(i,e[g>>2],B))break t;if(h>>>0>=n>>>0)break n;for(;;){if(!zi(i,e[(h<<2)+o>>2],e[g>>2]))break t;if(h=h+1|0,(h|0)==(n|0))break}}if(A=1,v=v+1|0,!!(v>>>l))break}}return A}return 1}function pA(i,o,n,a,c){var f=0;e:{if(!ht(c,(e[i+12>>2]<<1)+-2|(e[1420]|(a|0)!=0),e[1416]+(e[1415]+e[1414]|0)|0)||a&&!fu(c,a+-1|0))break e;t:{if(!e[i+12>>2])break t;for(a=0;;){if(zi(c,e[((a<<2)+i|0)+152>>2],n)){if(a=a+1|0,a>>>0>2])continue;break t}break}return 0}if(!ht(c,e[i+16>>2]+-1|0,e[1412])||!zi(c,e[i+20>>2],e[1413]))break e;t:{if(!e[i+12>>2])break t;for(a=0;;){if(zi(c,e[((a<<2)+i|0)+24>>2],e[i+16>>2])){if(a=a+1|0,a>>>0>2])continue;break t}break}return 0}if(!ht(c,e[i>>2],e[1405]))break e;t:{if(ze[i>>2]>1)break t;if(!ht(c,e[i+4>>2],e[1406]))break e;if(n=e[i>>2],n>>>0>1)break t;if(a=o,o=e[i+8>>2],!Vm(c,e[i+280>>2],a,e[i+12>>2],e[o>>2],e[o+4>>2],e[i+4>>2],(n|0)==1))break e}f=1}return f}function hA(i,o,n,a,c){i=e[i>>2];e:{if(!ht(c,e[1418]|(a|0)!=0,e[1416]+(e[1415]+e[1414]|0)|0)||a&&!fu(c,a+-1|0))break e;if(!o)return 1;a=0;t:{for(;;){if(!zi(c,e[i+(a<<2)>>2],n))break t;if(a=a+1|0,(a|0)==(o|0))break}return 1}}return 0}function lr(i,o,n){var a=0,c=0,f=0;if(!n)return 0;a=H[i|0];e:{if(!a)break e;for(;;){t:{if(c=H[o|0],(c|0)!=(a|0)||(n=n+-1|0,!n|!c))break t;if(o=o+1|0,a=H[i+1|0],i=i+1|0,a)continue;break e}break}f=a}return(f&255)-H[o|0]|0}function mA(i){var o=0,n=0;o=be-16|0,be=o,n=-1;e:{if(_w(i)||(Le[e[i+32>>2]](i,o+15|0,1)|0)!=1)break e;n=H[o+15|0]}return be=o+16|0,n}function zd(i){var o=0,n=0,a=0,c=0;if(e[i+112>>2]=0,e[i+116>>2]=0,a=e[i+8>>2],c=e[i+4>>2],o=a-c|0,n=o>>31,e[i+120>>2]=o,e[i+124>>2]=n,!(((n|0)<0?1:(n|0)<=0?o>>>0>0?0:1:0)|1)){e[i+104>>2]=c;return}e[i+104>>2]=a}function Gn(i){var o=0,n=0,a=0,c=0,f=0,l=0,h=0;n=e[i+116>>2],a=n;e:{f=e[i+112>>2];t:{if(n|f&&(n=e[i+124>>2],(n|0)>(a|0)||(n|0)>=(a|0)&&!(ze[i+120>>2]>>0)&&!0))break t;if(f=mA(i),(f|0)>-1)break e}return e[i+104>>2]=0,-1}n=e[i+8>>2],a=e[i+116>>2],c=a;e:{t:{if(o=e[i+112>>2],!(a|o)||(a=(e[i+124>>2]^-1)+c|0,c=e[i+120>>2]^-1,o=c+o|0,o>>>0>>0&&(a=a+1|0),c=o,o=e[i+4>>2],l=n-o|0,h=c>>>0>>0?0:1,l=l>>31,(a|0)>(l|0)||(a|0)>=(l|0)&&h))break t;e[i+104>>2]=c+o;break e}e[i+104>>2]=n}e:{if(!n){n=e[i+4>>2];break e}a=i,o=n,n=e[i+4>>2],o=(o-n|0)+1|0,c=o+e[i+120>>2]|0,i=e[i+124>>2]+(o>>31)|0,e[a+120>>2]=c,e[a+124>>2]=c>>>0>>0?i+1|0:i}return i=n+-1|0,H[i|0]!=(f|0)&&(K[i|0]=f),f}function gA(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0;c=be-16|0,be=c,f=(kt(o),Oe(0)),n=f&2147483647;e:{if(n+-8388608>>>0<=2130706431){a=n,n=n>>>7|0,a=a<<25,n=n+1065353216|0,l=a,n=a>>>0<0?n+1|0:n;break e}if(n>>>0>=2139095040){n=f,a=n>>>7|0,l=n<<25,n=a|2147418112;break e}if(!n){n=0;break e}a=n,n=Qt(n),yr(c,a,0,0,0,n+81|0),h=e[c>>2],g=e[c+4>>2],l=e[c+8>>2],n=e[c+12>>2]^65536|16265-n<<16}e[i>>2]=h,e[i+4>>2]=g,e[i+8>>2]=l,e[i+12>>2]=f&-2147483648|n,be=c+16|0}function zr(i,o){var n=0,a=0,c=0,f=0,l=0,h=0;a=be-16|0,be=a,l=i,h=i;e:{if(!o){o=0,f=0;break e}n=o>>31,c=n+o^n,n=Qt(c),yr(a,c,0,0,0,n+81|0),n=(e[a+12>>2]^65536)+(16414-n<<16)|0,c=0+e[a+8>>2]|0,c>>>0>>0&&(n=n+1|0),o=o&-2147483648|n,n=e[a+4>>2],f=e[a>>2]}e[h>>2]=f,e[l+4>>2]=n,e[i+8>>2]=c,e[i+12>>2]=o,be=a+16|0}function Yt(i,o,n,a,c,f,l,h,g){var m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,gt=0,yt=0,At=0,Pt=0,It=0,Ft=0,Bt=0,Ut=0,Gt=0,sn=0,Bn=0,cr=0,Vr=0,Wr=0,$r=0,di=0,cs=0;E=be-96|0,be=E,T=n,v=l,ae=(v&131071)<<15|f>>>17,m=g&65535,ye=m,G=h,v=h,Te=v<<15|l>>>17,I=(c^g)&-2147483648,v=c&65535,C=v,B=a,Qe=v,v=m,Be=(v&131071)<<15|h>>>17,Bt=g>>>16&32767,Ut=c>>>16&32767;e:{t:{if(Ut+-1>>>0<=32765&&(he=0,Bt+-1>>>0<32766))break t;if(A=c&2147483647,m=A,v=a,!(!a&(m|0)==2147418112?!(o|n):(m|0)==2147418112&a>>>0<0|m>>>0<2147418112)){Se=a,I=c|32768;break e}if(A=g&2147483647,c=A,a=h,!(!a&(c|0)==2147418112?!(f|l):(c|0)==2147418112&a>>>0<0|c>>>0<2147418112)){Se=h,I=g|32768,o=f,n=l;break e}if(!(o|v|(m^2147418112|n))){if(!(a|f|(c|l))){I=2147450880,o=0,n=0;break e}I=I|2147418112,o=0,n=0;break e}if(!(a|f|(c^2147418112|l))){if(a=o|v,c=n|m,o=0,n=0,!(a|c)){I=2147450880;break e}I=I|2147418112;break e}if(!(o|v|(n|m))){o=0,n=0;break e}if(!(a|f|(c|l))){o=0,n=0;break e}if(a=0,(m|0)==65535|m>>>0<65535&&(m=o,g=n,a=!(C|B),h=a<<6,v=Qt(a?o:B)+32|0,o=Qt(a?n:C),o=h+((o|0)==32?v:o)|0,yr(E+80|0,m,g,B,C,o+-15|0),B=e[E+88>>2],T=e[E+84>>2],Qe=e[E+92>>2],a=16-o|0,o=e[E+80>>2]),he=a,c>>>0>65535)break t;n=!(G|ye),c=n<<6,h=Qt(n?f:G)+32|0,n=Qt(n?l:ye),n=c+((n|0)==32?h:n)|0,g=n,yr(E- -64|0,f,l,G,ye,n+-15|0),f=e[E+76>>2],n=f,h=e[E+72>>2],c=h,c=c<<15,v=e[E+68>>2],Te=v>>>17|c,c=v,f=e[E+64>>2],ae=(c&131071)<<15|f>>>17,Be=(n&131071)<<15|h>>>17,he=(a-g|0)+16|0}a=ae,G=0,g=oe(a,0,o,G),n=ne,je=n,Ee=f<<15&-32768,f=oe(Ee,0,T,0),c=f+g|0,A=ne+n|0,A=c>>>0>>0?A+1|0:A,n=c,f=0,l=oe(Ee,Ye,o,G),c=f+l|0,m=ne+n|0,m=c>>>0>>0?m+1|0:m,ae=c,l=m,yt=(n|0)==(m|0)&c>>>0>>0|m>>>0>>0,Bn=oe(a,Gt,T,sn),At=ne,at=B,f=oe(Ee,Ye,B,0),c=f+Bn|0,C=ne+At|0,C=c>>>0>>0?C+1|0:C,cr=c,h=oe(Te,0,o,G),c=c+h|0,f=ne+C|0,Pt=c,f=c>>>0>>0?f+1|0:f,ye=f,h=f,f=(A|0)==(je|0)&n>>>0>>0|A>>>0>>0,c=A,n=c+Pt|0,m=f+h|0,je=n,m=n>>>0>>0?m+1|0:m,c=m,h=n,Wr=oe(a,Gt,B,Vr),It=ne,n=Ee,st=Qe|65536,Ee=te,f=oe(n,Ye,st,te),n=f+Wr|0,m=ne+It|0,m=n>>>0>>0?m+1|0:m,$r=n,v=oe(T,sn,Te,di),n=n+v|0,te=m,f=m+ne|0,f=n>>>0>>0?f+1|0:f,Ft=n,gt=Be&2147483647|-2147483648,n=oe(gt,0,o,G),o=Ft+n|0,G=f,v=f+ne|0,Ye=o,n=o>>>0>>0?v+1|0:v,m=c+o|0,f=0,o=f+h|0,o>>>0>>0&&(m=m+1|0),Qe=o,Be=m,f=m,h=o+yt|0,h>>>0>>0&&(f=f+1|0),g=f,B=(he+(Bt+Ut|0)|0)+-16383|0,f=oe(at,Vr,Te,di),o=ne,A=0,v=oe(a,Gt,st,Ee),a=v+f|0,m=ne+o|0,m=a>>>0>>0?m+1|0:m,he=a,v=a,a=m,m=(o|0)==(a|0)&v>>>0>>0|a>>>0>>0,f=oe(gt,cs,T,sn),o=f+v|0,v=ne+a|0,v=o>>>0>>0?v+1|0:v,T=o,f=o,o=v,a=(a|0)==(o|0)&f>>>0>>0|o>>>0>>0,f=m+a|0,f>>>0>>0&&(A=1),v=f,a=o,f=A,yt=v,m=0,v=(C|0)==(ye|0)&Pt>>>0>>0|ye>>>0>>0,C=v+((C|0)==(At|0)&cr>>>0>>0|C>>>0>>0)|0,C>>>0>>0&&(m=1),A=C,C=C+T|0,v=a+m|0,he=C,m=C,v=m>>>0>>0?v+1|0:v,a=v,o=(o|0)==(a|0)&m>>>0>>0|a>>>0>>0,v=yt+o|0,v>>>0>>0&&(f=f+1|0),o=v,v=oe(gt,cs,st,Ee),o=o+v|0,m=ne+f|0,m=o>>>0>>0?m+1|0:m,A=o,C=oe(gt,cs,at,Vr),f=ne,T=oe(Te,di,st,Ee),o=T+C|0,v=ne+f|0,v=o>>>0>>0?v+1|0:v,T=o,o=v,v=(f|0)==(o|0)&T>>>0>>0|o>>>0>>0,f=o+A|0,A=m+v|0,v=f>>>0>>0?A+1|0:A,at=f,m=a+T|0,A=0,o=A+he|0,o>>>0>>0&&(m=m+1|0),C=o,f=o,o=m,a=(a|0)==(o|0)&f>>>0>>0|o>>>0>>0,f=at+a|0,f>>>0>>0&&(v=v+1|0),T=f,A=o,m=0,f=(te|0)==(G|0)&Ft>>>0<$r>>>0|G>>>0>>0,te=f+((te|0)==(It|0)&$r>>>0>>0|te>>>0>>0)|0,te>>>0>>0&&(m=1),f=te+((n|0)==(G|0)&Ye>>>0>>0|n>>>0>>0)|0,a=n,n=a+C|0,A=f+A|0,A=n>>>0>>0?A+1|0:A,te=n,a=n,n=A,o=(o|0)==(n|0)&a>>>0>>0|n>>>0>>0,a=o+T|0,a>>>0>>0&&(v=v+1|0),o=n,m=v,v=a,f=0,a=(c|0)==(Be|0)&Qe>>>0>>0|Be>>>0>>0,c=a+((c|0)==(ye|0)&je>>>0>>0|c>>>0>>0)|0,c>>>0>>0&&(f=1),a=c+te|0,A=o+f|0,A=a>>>0>>0?A+1|0:A,o=a,c=A,o=(n|0)==(c|0)&o>>>0>>0|c>>>0>>0,n=v+o|0,n>>>0>>0&&(m=m+1|0),o=n,n=m;t:{if(n&65536){B=B+1|0;break t}C=l>>>31|0,m=n<<1|o>>>31,o=o<<1|c>>>31,n=m,m=c<<1|a>>>31,a=a<<1|g>>>31,c=m,v=ae,m=l<<1|v>>>31,ae=v<<1,l=m,v=g<<1|h>>>31,h=h<<1|C,g=v}if((B|0)>=32767){I=I|2147418112,o=0,n=0;break e}t:{if((B|0)<=0){if(f=1-B|0,f>>>0<=127){v=B+127|0,yr(E+48|0,ae,l,h,g,v),yr(E+32|0,a,c,o,n,v),xl(E+16|0,ae,l,h,g,f),xl(E,a,c,o,n,f),ae=(e[E+48>>2]|e[E+56>>2])!=0|(e[E+52>>2]|e[E+60>>2])!=0|(e[E+32>>2]|e[E+16>>2]),l=e[E+36>>2]|e[E+20>>2],h=e[E+40>>2]|e[E+24>>2],g=e[E+44>>2]|e[E+28>>2],a=e[E>>2],c=e[E+4>>2],n=e[E+12>>2],o=e[E+8>>2];break t}o=0,n=0;break e}n=n&65535|B<<16}if(Se=o|Se,I=n|I,!(!h&(g|0)==-2147483648?!(l|ae):(g|0)>-1)){A=I,C=c,o=a+1|0,o>>>0<1&&(C=C+1|0),n=C,a=(c|0)==(n|0)&o>>>0>>0|n>>>0>>0,c=a+Se|0,c>>>0>>0&&(A=A+1|0),Se=c,I=A;break e}if(h|ae|(g^-2147483648|l)){o=a,n=c;break e}C=I,m=c,o=a&1,n=o+a|0,n>>>0>>0&&(m=m+1|0),o=n,n=m,a=(c|0)==(n|0)&o>>>0>>0|n>>>0>>0,c=a+Se|0,c>>>0>>0&&(C=C+1|0),Se=c,I=C}e[i>>2]=o,e[i+4>>2]=n,e[i+8>>2]=Se,e[i+12>>2]=I,be=E+96|0}function Mr(i,o,n,a,c,f,l,h,g){var m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0;A=be-112|0,be=A,C=h,I=g&2147483647,v=n+-1|0,m=o+-1|0,(m|0)!=-1&&(v=v+1|0),E=m,G=(m|0)==-1&(v|0)==-1,T=c&2147483647,m=T,B=a,v=(n|0)==(v|0)&E>>>0>>0|v>>>0>>0,E=a+v|0,E>>>0>>0&&(m=m+1|0),E=E+-1|0,v=m+-1|0,m=E;e:{t:{if(v=(m|0)!=-1?v+1|0:v,!((m|0)==-1&(v|0)==2147418111?G:v>>>0>2147418111)&&(v=l+-1|0,m=f+-1|0,(m|0)!=-1&&(v=v+1|0),E=m,G=(m|0)!=-1|(v|0)!=-1,m=I,v=(l|0)==(v|0)&E>>>0>>0|v>>>0>>0,E=v+C|0,E>>>0>>0&&(m=m+1|0),v=E+-1|0,m=m+-1|0,m=(v|0)!=-1?m+1|0:m,(v|0)==-1&(m|0)==2147418111?G:(m|0)==2147418111&(v|0)!=-1|m>>>0<2147418111))break t;if(!(!B&(T|0)==2147418112?!(o|n):(T|0)==2147418112&B>>>0<0|T>>>0<2147418112)){h=a,g=c|32768,f=o,l=n;break e}if(!(!C&(I|0)==2147418112?!(f|l):(I|0)==2147418112&C>>>0<0|I>>>0<2147418112)){g=g|32768;break e}if(!(o|B|(T^2147418112|n))){m=a,a=!(o^f|a^h|(n^l|c^g^-2147483648)),h=a?0:m,g=a?2147450880:c,f=a?0:o,l=a?0:n;break e}if(!(f|C|(I^2147418112|l)))break e;if(!(o|B|(n|T))){if(f|C|(l|I))break e;f=o&f,l=n&l,h=a&h,g=c&g;break e}if(f|C|(l|I))break t;f=o,l=n,h=a,g=c;break e}v=(C|0)==(B|0)&(I|0)==(T|0)?(n|0)==(l|0)&f>>>0>o>>>0|l>>>0>n>>>0:(I|0)==(T|0)&C>>>0>B>>>0|I>>>0>T>>>0,m=v,T=m?f:o,I=m?l:n,C=m?g:c,B=C,E=m?h:a,m=C&65535,c=v?c:g,te=c,a=v?a:h,G=c>>>16&32767,C=C>>>16&32767,C||(c=!(m|E),h=c<<6,g=Qt(c?T:E)+32|0,c=Qt(c?I:m),c=h+((c|0)==32?g:c)|0,yr(A+96|0,T,I,E,m,c+-15|0),E=e[A+104>>2],T=e[A+96>>2],I=e[A+100>>2],C=16-c|0,m=e[A+108>>2]),f=v?o:f,l=v?n:l,o=a,n=te&65535,G?o=n:(h=o,a=!(o|n),c=a<<6,g=Qt(a?f:o)+32|0,o=Qt(a?l:n),o=c+((o|0)==32?g:o)|0,yr(A+80|0,f,l,h,n,o+-15|0),G=16-o|0,f=e[A+80>>2],l=e[A+84>>2],a=e[A+88>>2],o=e[A+92>>2]),n=a,v=o<<3|n>>>29,h=n<<3|l>>>29,g=v|524288,o=E,a=m<<3|o>>>29,c=o<<3|I>>>29,E=a,v=B^te,o=f,m=l<<3|o>>>29,o=o<<3,n=m,f=C-G|0,a=o;t:{if(!f)break t;if(f>>>0>127){h=0,g=0,m=0,a=1;break t}yr(A- -64|0,o,n,h,g,128-f|0),xl(A+48|0,o,n,h,g,f),h=e[A+56>>2],g=e[A+60>>2],m=e[A+52>>2],a=e[A+48>>2]|((e[A+64>>2]|e[A+72>>2])!=0|(e[A+68>>2]|e[A+76>>2])!=0)}l=m,E=E|524288,o=T,m=I<<3|o>>>29,n=o<<3;t:{if((v|0)<-1||(v|0)<=-1||!1){if(I=a,o=n-a|0,T=c-h|0,a=(l|0)==(m|0)&n>>>0>>0|m>>>0>>0,f=T-a|0,n=m-((n>>>0>>0)+l|0)|0,l=(E-((c>>>0>>0)+g|0)|0)-(T>>>0>>0)|0,!(o|f|(n|l))){f=0,l=0,h=0,g=0;break e}if(l>>>0>524287)break t;h=o,a=!(f|l),c=a<<6,g=Qt(a?o:f)+32|0,o=Qt(a?n:l),o=c+((o|0)==32?g:o)|0,o=o+-12|0,yr(A+32|0,h,n,f,l,o),C=C-o|0,f=e[A+40>>2],l=e[A+44>>2],o=e[A+32>>2],n=e[A+36>>2];break t}if(v=l+m|0,o=a,n=o+n|0,n>>>0>>0&&(v=v+1|0),o=n,n=v,l=(l|0)==(n|0)&o>>>0>>0|n>>>0>>0,v=g+E|0,a=c+h|0,a>>>0>>0&&(v=v+1|0),f=a,c=l+a|0,a=v,a=c>>>0>>0?a+1|0:a,f=c,l=a,!(a&1048576))break t;o=o&1|((n&1)<<31|o>>>1),n=f<<31|n>>>1,C=C+1|0,f=(l&1)<<31|f>>>1,l=l>>>1|0}if(h=0,m=B&-2147483648,(C|0)>=32767){g=m|2147418112,f=0,l=0;break e}c=0;t:{if((C|0)>0){c=C;break t}yr(A+16|0,o,n,f,l,C+127|0),xl(A,o,n,f,l,1-C|0),o=e[A>>2]|((e[A+16>>2]|e[A+24>>2])!=0|(e[A+20>>2]|e[A+28>>2])!=0),n=e[A+4>>2],f=e[A+8>>2],l=e[A+12>>2]}h=h|((l&7)<<29|f>>>3),c=m|l>>>3&65535|c<<16,m=f<<29,a=0,f=m,l=(n&7)<<29|o>>>3|a,m=c,a=n>>>3|f,v=a,c=o&7,o=c>>>0>4,n=o+l|0,n>>>0>>0&&(v=v+1|0),o=n,n=v,a=(a|0)==(n|0)&o>>>0>>0|n>>>0>>0,f=a+h|0,f>>>0>>0&&(m=m+1|0),c=(c|0)==4,a=c?o&1:0,g=m,h=f,c=0,m=n+c|0,n=o+a|0,n>>>0>>0&&(m=m+1|0),f=n,o=n,l=m,o=(c|0)==(m|0)&o>>>0>>0|m>>>0>>0,n=h+o|0,n>>>0>>0&&(g=g+1|0),h=n}e[i>>2]=f,e[i+4>>2]=l,e[i+8>>2]=h,e[i+12>>2]=g,be=A+112|0}function Yo(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0;f=be-16|0,be=f,qe(+o),g=Oe(1)|0,l=Oe(0)|0,h=g&2147483647,n=h,c=n+-1048576|0,a=l,a>>>0<0&&(c=c+1|0);e:{if((c|0)==2145386495|c>>>0<2145386495){h=a<<28,c=(n&15)<<28|a>>>4,n=(n>>>4|0)+1006632960|0,a=c,n=a>>>0<0?n+1|0:n;break e}if((n|0)==2146435072&a>>>0>=0|n>>>0>2146435072){h=l<<28,c=l,n=g,l=n>>>4|0,a=(n&15)<<28|c>>>4,n=l|2147418112;break e}if(!(n|a)){h=0,a=0,n=0;break e}c=n,n=(n|0)==1&a>>>0<0|n>>>0<1?Qt(l)+32|0:Qt(n),yr(f,a,c,0,0,n+49|0),m=e[f>>2],h=e[f+4>>2],a=e[f+8>>2],n=e[f+12>>2]^65536|15372-n<<16}e[i>>2]=m,e[i+4>>2]=h,e[i+8>>2]=a,e[i+12>>2]=g&-2147483648|n,be=f+16|0}function ka(i,o,n,a,c,f,l,h){var g=0,m=0,v=0,A=0,C=0,E=0;m=1,g=a&2147483647,C=g,v=n;e:{if((!n&(g|0)==2147418112?i|o:(g|0)==2147418112&n>>>0>0|g>>>0>2147418112)||(A=h&2147483647,E=A,g=l,!l&(A|0)==2147418112?c|f:(A|0)==2147418112&l>>>0>0|A>>>0>2147418112))break e;if(!(i|c|(g|v)|(o|f|(C|E))))return 0;if(v=a&h,(v|0)>0||(v|0)>=0&&!((n&l)>>>0<0)&&!0){if(m=-1,(n|0)==(l|0)&(a|0)==(h|0)?(o|0)==(f|0)&i>>>0>>0|o>>>0>>0:(a|0)<(h|0)||(a|0)<=(h|0)&&!(n>>>0>=l>>>0)&&!0)break e;return(i^c|n^l)!=0|(o^f|a^h)!=0}if(m=-1,(n|0)==(l|0)&(a|0)==(h|0)?(o|0)==(f|0)&i>>>0>c>>>0|o>>>0>f>>>0:(a|0)>(h|0)||(a|0)>=(h|0)&&!(n>>>0<=l>>>0)&&!0)break e;m=(i^c|n^l)!=0|(o^f|a^h)!=0}return m}function Wm(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0;h=-1,f=a&2147483647,g=f,l=n;e:{if((!n&(f|0)==2147418112?i|o:(f|0)==2147418112&n>>>0>0|f>>>0>2147418112)||(f=c&2147483647,m=f,(f|0)!=2147418112&&f>>>0>2147418112))break e;if(!(i|l|(o|(g|m))))return 0;if(l=a&c,(l|0)>0||(l|0)>=0||!1){if(!n&(a|0)==(c|0)?!o&i>>>0<0|o>>>0<0:(a|0)<(c|0)||(a|0)<=(c|0)&&!(n>>>0>=0)&&!0)break e;return(i|n)!=0|(o|a^c)!=0}if(!n&(a|0)==(c|0)?!o&i>>>0>0|o>>>0>0:(a|0)>(c|0)||(a|0)>=(c|0)&&!(n>>>0<=0)&&!0)break e;h=(i|n)!=0|(o|a^c)!=0}return h}function Um(i,o,n,a,c,f,l,h,g){e[i>>2]=o,e[i+4>>2]=n,e[i+8>>2]=a,e[i+12>>2]=c&65535|(g>>>16&32768|c>>>16&32767)<<16}function ls(i,o){var n=0,a=0,c=0,f=0,l=0,h=0;n=be-16|0,be=n,l=i,h=i;e:{if(!o){o=0,a=0;break e}a=o,o=Qt(o)^31,yr(n,a,0,0,0,112-o|0),o=(e[n+12>>2]^65536)+(o+16383<<16)|0,c=0+e[n+8>>2]|0,c>>>0>>0&&(o=o+1|0),f=e[n+4>>2],a=e[n>>2]}e[h>>2]=a,e[l+4>>2]=f,e[i+8>>2]=c,e[i+12>>2]=o,be=n+16|0}function Vd(i,o,n,a,c,f,l,h,g){var m=0;m=be-16|0,be=m,Mr(m,o,n,a,c,f,l,h,g^-2147483648),o=e[m+4>>2],e[i>>2]=e[m>>2],e[i+4>>2]=o,o=e[m+12>>2],e[i+8>>2]=e[m+8>>2],e[i+12>>2]=o,be=m+16|0}function Hm(i,o,n,a,c,f){var l=0;l=be-80|0,be=l;e:{if((f|0)>=16384){if(Yt(l+32|0,o,n,a,c,0,0,0,2147352576),a=e[l+40>>2],c=e[l+44>>2],o=e[l+32>>2],n=e[l+36>>2],(f|0)<32767){f=f+-16383|0;break e}Yt(l+16|0,o,n,a,c,0,0,0,2147352576),f=((f|0)<49149?f:49149)+-32766|0,a=e[l+24>>2],c=e[l+28>>2],o=e[l+16>>2],n=e[l+20>>2];break e}if((f|0)>-16383)break e;if(Yt(l- -64|0,o,n,a,c,0,0,0,65536),a=e[l+72>>2],c=e[l+76>>2],o=e[l+64>>2],n=e[l+68>>2],(f|0)>-32765){f=f+16382|0;break e}Yt(l+48|0,o,n,a,c,0,0,0,65536),f=((f|0)>-49146?f:-49146)+32764|0,a=e[l+56>>2],c=e[l+60>>2],o=e[l+48>>2],n=e[l+52>>2]}Yt(l,o,n,a,c,0,0,0,f+16383<<16),o=e[l+12>>2],e[i+8>>2]=e[l+8>>2],e[i+12>>2]=o,o=e[l+4>>2],e[i>>2]=e[l>>2],e[i+4>>2]=o,be=l+80|0}function Ko(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0;f=oe(o,n,0,0),l=ne,h=oe(0,0,a,c),f=f+h|0,l=ne+l|0,m=oe(c,0,n,0),g=f+m|0,f=ne+(f>>>0>>0?l+1|0:l)|0,l=oe(a,0,o,0),v=ne,h=oe(n,0,a,0),a=v+h|0,n=g>>>0>>0?f+1|0:f,f=ne,f=a>>>0>>0?f+1|0:f,g=f+g|0,g>>>0>>0&&(n=n+1|0),o=oe(o,0,c,0)+a|0,c=ne,a=o>>>0>>0?c+1|0:c,c=g+a|0,c>>>0>>0&&(n=n+1|0),e[i+8>>2]=c,e[i+12>>2]=n,e[i>>2]=l,e[i+4>>2]=o}function Gm(i,o,n,a,c,f,l,h,g){var m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,gt=0,yt=0,At=0,Pt=0,It=0,Ft=0,Bt=0,Ut=0,Gt=0,sn=0,Bn=0;E=be-192|0,be=E,at=h,yt=g&65535,B=a,I=c&65535,Ye=(c^g)&-2147483648,G=g>>>16&32767;e:{ae=c>>>16&32767;t:{n:{if(ae+-1>>>0<=32765&&G+-1>>>0<32766)break n;if(v=c&2147483647,A=v,m=a,!(!m&(v|0)==2147418112?!(o|n):(v|0)==2147418112&m>>>0<0|v>>>0<2147418112)){At=a,Ye=c|32768;break t}if(v=g&2147483647,c=v,a=h,!(!a&(v|0)==2147418112?!(f|l):(v|0)==2147418112&a>>>0<0|v>>>0<2147418112)){At=h,Ye=g|32768,o=f,n=l;break t}if(!(o|m|(A^2147418112|n))){if(!(a|f|(c^2147418112|l))){o=0,n=0,Ye=2147450880;break t}Ye=Ye|2147418112,o=0,n=0;break t}if(!(a|f|(c^2147418112|l))){o=0,n=0;break t}if(!(o|m|(n|A)))break e;if(!(a|f|(c|l))){Ye=Ye|2147418112,o=0,n=0;break t}if(v=0,(A|0)==65535|A>>>0<65535&&(g=o,a=!(I|B),h=a<<6,m=Qt(a?o:B)+32|0,o=Qt(a?n:I),o=h+((o|0)==32?m:o)|0,yr(E+176|0,g,n,B,I,o+-15|0),v=16-o|0,B=e[E+184>>2],I=e[E+188>>2],n=e[E+180>>2],o=e[E+176>>2]),c>>>0>65535)break n;a=!(at|yt),c=a<<6,h=Qt(a?f:at)+32|0,a=Qt(a?l:yt),a=c+((a|0)==32?h:a)|0,yr(E+160|0,f,l,at,yt,a+-15|0),v=(a+v|0)+-16|0,at=e[E+168>>2],yt=e[E+172>>2],f=e[E+160>>2],l=e[E+164>>2]}c=yt|65536,gt=c,Ut=at,a=at,C=c<<15|a>>>17,a=a<<15|l>>>17,h=-102865788-a|0,c=C,m=c,g=1963258675-(m+(4192101508>>0)|0)|0,Ko(E+144|0,a,m,h,g),m=e[E+152>>2],Ko(E+128|0,0-m|0,0-(e[E+156>>2]+(0>>0)|0)|0,h,g),h=e[E+136>>2],g=h<<1|e[E+132>>2]>>>31,h=e[E+140>>2]<<1|h>>>31,Ko(E+112|0,g,h,a,c),m=h,h=e[E+120>>2],Ko(E+96|0,g,m,0-h|0,0-(e[E+124>>2]+(0>>0)|0)|0),h=e[E+104>>2],A=e[E+108>>2]<<1|h>>>31,g=h<<1|e[E+100>>2]>>>31,Ko(E+80|0,g,A,a,c),h=e[E+88>>2],Ko(E- -64|0,g,A,0-h|0,0-(e[E+92>>2]+(0>>0)|0)|0),h=e[E+72>>2],g=h<<1|e[E+68>>2]>>>31,h=e[E+76>>2]<<1|h>>>31,Ko(E+48|0,g,h,a,c),m=h,h=e[E+56>>2],Ko(E+32|0,g,m,0-h|0,0-(e[E+60>>2]+(0>>0)|0)|0),h=e[E+40>>2],A=e[E+44>>2]<<1|h>>>31,g=h<<1|e[E+36>>2]>>>31,Ko(E+16|0,g,A,a,c),h=e[E+24>>2],Ko(E,g,A,0-h|0,0-(e[E+28>>2]+(0>>0)|0)|0),Pt=(ae-G|0)+v|0,h=e[E+8>>2],m=e[E+12>>2]<<1|h>>>31,g=h<<1,v=m+-1|0,g=(e[E+4>>2]>>>31|g)+-1|0,(g|0)!=-1&&(v=v+1|0),h=g,m=0,ye=m,he=c,A=0,C=oe(h,m,c,A),c=ne,ae=c,Se=v,G=0,m=a,h=oe(v,G,m,0),a=h+C|0,v=ne+c|0,v=a>>>0>>0?v+1|0:v,h=a,a=v,T=oe(g,ye,m,T),c=0+T|0,v=h,m=v+ne|0,m=c>>>0>>0?m+1|0:m,T=c,c=m,m=(v|0)==(m|0)&T>>>0>>0|m>>>0>>0,v=(a|0)==(ae|0)&v>>>0>>0|a>>>0>>0,h=a,a=oe(Se,G,he,A)+a|0,A=v+ne|0,A=a>>>0>>0?A+1|0:A,h=a,a=m+a|0,m=A,je=a,h=a>>>0>>0?m+1|0:m,a=l,Te=(a&131071)<<15|f>>>17,he=oe(g,ye,Te,0),a=ne,Ee=a,v=f,te=v<<15&-32768,A=oe(Se,G,te,0),m=A+he|0,v=ne+a|0,v=m>>>0>>0?v+1|0:v,a=v,Be=oe(g,ye,te,Be),te=0+Be|0,v=m+ne|0,v=te>>>0>>0?v+1|0:v,v=(m|0)==(v|0)&te>>>0>>0|v>>>0>>0,m=(a|0)==(Ee|0)&m>>>0>>0|a>>>0>>0,C=a,a=oe(Se,G,Te,Qe)+a|0,A=m+ne|0,A=a>>>0>>0?A+1|0:A,m=a,a=v+m|0,C=a>>>0>>0?A+1|0:A,v=a,a=T+a|0,m=C+c|0,m=a>>>0>>0?m+1|0:m,ae=a,v=h,he=m,a=(c|0)==(m|0)&a>>>0>>0|m>>>0>>0,c=a+je|0,c>>>0>>0&&(v=v+1|0),m=v,a=(ae|0)!=0|(he|0)!=0,c=c+a|0,c>>>0>>0&&(m=m+1|0),v=c,c=0-v|0,T=0,h=oe(c,T,g,ye),a=ne,Ee=a,te=oe(Se,G,c,T),c=ne,je=c,Te=0-((0>>0)+m|0)|0,m=0,T=oe(g,ye,Te,m),C=T+te|0,v=ne+c|0,v=C>>>0>>0?v+1|0:v,c=C,T=0+h|0,A=a+c|0,A=T>>>0>>0?A+1|0:A,C=T,a=A,A=(Ee|0)==(a|0)&C>>>0>>0|a>>>0>>0,C=(v|0)==(je|0)&c>>>0>>0|v>>>0>>0,c=oe(Se,G,Te,m)+v|0,m=C+ne|0,m=c>>>0>>0?m+1|0:m,h=c,c=A+c|0,c>>>0>>0&&(m=m+1|0),Te=c,h=m,c=0-ae|0,Qe=0-((0>>0)+he|0)|0,ae=0,je=oe(Qe,ae,g,ye),te=ne,he=c,Be=0,m=oe(c,Be,Se,G),c=m+je|0,v=ne+te|0,A=c,c=c>>>0>>0?v+1|0:v,he=oe(g,ye,he,Be),g=0+he|0,m=A,v=m+ne|0,v=g>>>0>>0?v+1|0:v,v=(m|0)==(v|0)&g>>>0>>0|v>>>0>>0,m=(c|0)==(te|0)&m>>>0>>0|c>>>0>>0,g=c,c=oe(Qe,ae,Se,G)+c|0,C=m+ne|0,C=c>>>0>>0?C+1|0:C,g=c,c=v+c|0,m=C,m=c>>>0>>0?m+1|0:m,g=c,c=T+c|0,m=m+a|0,m=c>>>0>>0?m+1|0:m,g=c,v=h,c=m,a=(a|0)==(m|0)&g>>>0>>0|m>>>0>>0,h=a+Te|0,h>>>0>>0&&(v=v+1|0),a=h,m=v,C=a,A=c+-1|0,a=g+-2|0,a>>>0<4294967294&&(A=A+1|0),h=a,v=a,a=A,c=(c|0)==(a|0)&v>>>0>>0|a>>>0>>0,g=C+c|0,g>>>0>>0&&(m=m+1|0),c=g+-1|0,v=m+-1|0,v=(c|0)!=-1?v+1|0:v,g=0,Se=g,G=c,m=B,te=m<<2|n>>>30,Te=0,C=oe(c,g,te,Te),g=ne,T=g,A=g,g=n,Qe=(g&1073741823)<<2|o>>>30,Be=v,g=0,m=oe(Qe,0,v,g),c=m+C|0,A=ne+A|0,A=c>>>0>>0?A+1|0:A,m=c,he=A,Ee=(T|0)==(A|0)&m>>>0>>0|A>>>0>>0,C=A,A=0,T=A,v=0,je=a,st=((I&1073741823)<<2|B>>>30)&-262145|262144,c=oe(a,A,st,0),a=c+m|0,C=ne+C|0,C=a>>>0>>0?C+1|0:C,B=a,c=C,a=(he|0)==(c|0)&a>>>0>>0|c>>>0>>0,m=a+Ee|0,m>>>0>>0&&(v=1),A=oe(Be,g,st,It),a=A+m|0,m=ne+v|0,v=a>>>0>>0?m+1|0:m,A=oe(G,Se,st,It),m=ne,n=a,I=oe(te,Te,Be,g),a=I+A|0,C=ne+m|0,C=a>>>0>>0?C+1|0:C,I=a,a=C,C=(m|0)==(a|0)&I>>>0>>0|a>>>0>>0,A=n+a|0,v=v+C|0,m=A,C=m>>>0>>0?v+1|0:v,n=m,A=c+I|0,v=0,a=v+B|0,a>>>0>>0&&(A=A+1|0),I=a,m=a,a=A,c=(c|0)==(a|0)&m>>>0>>0|a>>>0>>0,m=n+c|0,m>>>0>>0&&(C=C+1|0),Gt=m,c=I,v=a,B=oe(Qe,ae,je,T),A=ne,he=h,Ee=oe(h,0,te,Te),h=Ee+B|0,m=ne+A|0,m=h>>>0>>0?m+1|0:m,ye=h,h=m,B=(A|0)==(m|0)&ye>>>0>>0|m>>>0>>0,A=m,sn=c,m=0,Bn=B,Ft=o<<2&-4,n=0,B=oe(G,Se,Ft,n),c=B+ye|0,A=ne+A|0,A=c>>>0>>0?A+1|0:A,Ee=c,B=c,c=A,h=(h|0)==(c|0)&B>>>0>>0|c>>>0>>0,A=Bn+h|0,A>>>0>>0&&(m=1),h=sn+A|0,v=m+v|0,v=h>>>0>>0?v+1|0:v,B=h,A=C,h=v,a=(a|0)==(v|0)&B>>>0>>0|v>>>0>>0,m=a+Gt|0,m>>>0>>0&&(A=A+1|0),sn=m,I=B,ye=h,Gt=oe(Be,g,Ft,n),Be=ne,g=oe(st,It,he,Bt),a=g+Gt|0,C=ne+Be|0,C=a>>>0>>0?C+1|0:C,st=a,m=oe(te,Te,je,T),a=a+m|0,g=C,v=g+ne|0,v=a>>>0>>0?v+1|0:v,te=a,C=oe(G,Se,Qe,ae),a=a+C|0,m=ne+v|0,G=a,m=a>>>0>>0?m+1|0:m,Se=0,C=A,a=m,m=(m|0)==(v|0)&G>>>0>>0|m>>>0>>0,A=(g|0)==(Be|0)&st>>>0>>0|g>>>0>>0,g=(g|0)==(v|0)&te>>>0>>0|v>>>0>>0,v=A+g|0,g=m+v|0,v=g,m=a|0,g=m+I|0,v=(v|Se)+ye|0,v=g>>>0>>0?v+1|0:v,ye=g,I=v,h=(h|0)==(v|0)&g>>>0>>0|v>>>0>>0,g=h+sn|0,g>>>0>>0&&(C=C+1|0),Te=g,g=C,C=ye,B=I,Se=Ee,je=oe(je,T,Ft,n),T=ne,m=oe(Qe,ae,he,Bt),h=m+je|0,A=ne+T|0,A=h>>>0>>0?A+1|0:A,v=A,ae=v,A=0,m=(v|0)==(T|0)&h>>>0>>0|v>>>0>>0,h=v+Se|0,v=(m|A)+c|0,v=h>>>0>>0?v+1|0:v,ae=h,m=h,h=v,m=(c|0)==(v|0)&m>>>0>>0|v>>>0>>0,Ee=C,c=m,m=v+G|0,C=0,a=C+ae|0,a>>>0>>0&&(m=m+1|0),a=(h|0)==(m|0)&a>>>0>>0|m>>>0>>0,c=c+a|0,c>>>0>>0&&(A=1),a=Ee+c|0,C=A+B|0,h=a,m=g,C=a>>>0>>0?C+1|0:C,g=C,a=(I|0)==(g|0)&a>>>0>>0|g>>>0>>0,c=a+Te|0,c>>>0>>0&&(m=m+1|0),a=c,c=m;n:{if((m|0)==131071|m>>>0<131071){Se=0,I=f,te=0,v=oe(h,Se,I,te),A=ne,m=o<<17,o=0,n=(v|0)!=0|(A|0)!=0,B=o-n|0,st=m-(o>>>0>>0)|0,ae=0-v|0,T=0-((0>>0)+A|0)|0,n=0,Te=oe(g,n,I,te),o=ne,Qe=o,G=0,v=oe(h,Se,l,G),m=v+Te|0,A=ne+o|0,A=m>>>0>>0?A+1|0:A,o=m,v=m,he=0,m=he,Ee=v,m=(v|0)==(T|0)&ae>>>0>>0|T>>>0>>0,ye=B-m|0,st=st-(B>>>0>>0)|0,m=oe(a,0,I,te),v=ne,I=oe(h,Se,at,0),m=I+m|0,C=ne+v|0,C=m>>>0>>0?C+1|0:C,I=oe(g,n,l,G),m=I+m|0,v=ne+C|0,v=m>>>0>>0?v+1|0:v,C=v,v=(A|0)==(Qe|0)&o>>>0>>0|A>>>0>>0,o=A+m|0,v=v+C|0,v=o>>>0>>0?v+1|0:v,A=o,o=v,m=oe(h,g,gt,0),I=ne,B=A,A=oe(f,l,c,0),v=A+m|0,m=ne+I|0,m=v>>>0>>0?m+1|0:m,C=oe(a,c,l,G),A=C+v|0,m=oe(g,n,at,yt),n=m+A|0,m=n,v=0,n=B+v|0,m=o+m|0,o=n,B=ye-o|0,n=st-((ye>>>0>>0)+(o>>>0>>0?m+1|0:m)|0)|0,Pt=Pt+-1|0,at=ae-he|0,o=T-((ae>>>0>>0)+Ee|0)|0;break n}G=g>>>1|0,A=0,C=o<<16,v=a<<31,h=(g&1)<<31|h>>>1,g=g>>>1|v,Qe=0,Be=0,o=oe(h,Qe,f,Be),m=ne,v=m,m=(o|0)!=0|(m|0)!=0,I=n-m|0,Bt=C-(n>>>0>>0)|0,ye=0-o|0,Se=0-((0>>0)+v|0)|0,C=Se,T=0,he=oe(h,Qe,l,T),o=ne,It=o,Ee=G|a<<31,Ft=c<<31|a>>>1|A,v=Ee,G=oe(v,0,f,Be),n=G+he|0,m=ne+o|0,m=n>>>0>>0?m+1|0:m,o=m,m=n,je=m,te=0,m=(m|0)==(C|0)&ye>>>0>>0|C>>>0>>0,Te=I-m|0,Bt=Bt-(I>>>0>>0)|0,v=oe(l,T,v,A),A=ne,m=c,C=m>>>1|0,G=(m&1)<<31|a>>>1,I=C,C=oe(G,0,f,Be),m=C+v|0,v=ne+A|0,v=m>>>0>>0?v+1|0:v,C=oe(h,Qe,at,0),A=C+m|0,m=ne+v|0,v=A,A=v>>>0>>0?m+1|0:m,m=(o|0)==(It|0)&n>>>0>>0|o>>>0>>0,n=o,o=o+v|0,A=m+A|0,m=o,o=m>>>0>>0?A+1|0:A,n=oe(h,g,gt,0),v=ne,A=m,a=oe(f,l,c>>>1|0,0),n=a+n|0,m=ne+v|0,m=n>>>0>>0?m+1|0:m,a=oe(l,T,G,I),n=a+n|0,m=ne+m|0,a=oe(Ee,Ft,at,yt),n=a+n|0,m=n,a=0,n=A+a|0,v=o+m|0,o=n,B=Te-o|0,n=Bt-((Te>>>0>>0)+(o>>>0>>0?v+1|0:v)|0)|0,a=G,c=I,at=ye-te|0,o=Se-((ye>>>0>>0)+je|0)|0}if((Pt|0)>=16384){Ye=Ye|2147418112,o=0,n=0;break t}if(A=Pt+16383|0,(Pt|0)<=-16383){n:{if(A||(A=g,I=at,C=o<<1|I>>>31,m=I<<1,l=(l|0)==(C|0)&m>>>0>f>>>0|C>>>0>l>>>0,m=c&65535,f=B,C=n<<1|f>>>31,n=f<<1|o>>>31,c=n,o=C,o=(c|0)==(Ut|0)&(o|0)==(gt|0)?l:(gt|0)==(o|0)&c>>>0>Ut>>>0|o>>>0>gt>>>0,n=o+h|0,n>>>0>>0&&(A=A+1|0),o=n,c=o,n=A,c=a+((g|0)==(A|0)&c>>>0>>0|A>>>0>>0)|0,c>>>0>>0&&(m=m+1|0),a=m,!(m&65536)))break n;At=c|At,Ye=a|Ye;break t}o=0,n=0;break t}v=g,c=c&65535,I=at,m=o<<1|I>>>31,I=I<<1,l=(l|0)==(m|0)&I>>>0>=f>>>0|m>>>0>l>>>0,f=B,m=n<<1|f>>>31,n=f<<1|o>>>31,o=(n|0)==(Ut|0)&(m|0)==(gt|0)?l:(gt|0)==(m|0)&n>>>0>=Ut>>>0|m>>>0>gt>>>0,n=o+h|0,n>>>0>>0&&(v=v+1|0),o=n,n=v,f=a,a=((g|0)==(v|0)&o>>>0>>0|v>>>0>>0)+a|0,v=A<<16|c,At=a|At,Ye=Ye|(a>>>0>>0?v+1|0:v)}e[i>>2]=o,e[i+4>>2]=n,e[i+8>>2]=At,e[i+12>>2]=Ye,be=E+192|0;return}e[i>>2]=0,e[i+4>>2]=0,o=!(a|f|(c|l)),e[i+8>>2]=o?0:At,e[i+12>>2]=o?2147450880:Ye,be=E+192|0}function bA(i,o,n,a){var c=0,f=0;f=a&65535,a=a>>>16&32767;e:{if((a|0)!=32767){if(c=4,a)break e;return i|n|(o|f)?3:2}c=!(i|n|(o|f))}return c}function Qm(i,o,n,a,c,f,l,h,g){var m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0;m=be-128|0,be=m;e:{t:{n:{if(!ka(f,l,h,g,0,0,0,0)||(v=bA(f,l,h,g),ae=c>>>16|0,I=ae&32767,(I|0)==32767))break n;if(v)break t}Yt(m+16|0,o,n,a,c,f,l,h,g),c=e[m+16>>2],a=e[m+20>>2],n=e[m+24>>2],o=e[m+28>>2],Gm(m,c,a,n,o,c,a,n,o),a=e[m+8>>2],c=e[m+12>>2],h=e[m>>2],g=e[m+4>>2];break e}if(A=c&65535|I<<16,C=A,E=a,T=h,te=g>>>16&32767,v=g&65535|te<<16,(ka(o,n,E,C,f,l,h,v)|0)<=0){if(ka(o,n,E,C,f,l,T,v)){h=o,g=n;break e}Yt(m+112|0,o,n,a,c,0,0,0,0),a=e[m+120>>2],c=e[m+124>>2],h=e[m+112>>2],g=e[m+116>>2];break e}if(I?(g=n,h=o):(Yt(m+96|0,o,n,E,C,0,0,0,1081540608),h=e[m+108>>2],C=h,E=e[m+104>>2],I=(h>>>16|0)+-120|0,g=e[m+100>>2],h=e[m+96>>2]),te||(Yt(m+80|0,f,l,T,v,0,0,0,1081540608),f=e[m+92>>2],v=f,T=e[m+88>>2],te=(v>>>16|0)+-120|0,l=e[m+84>>2],f=e[m+80>>2]),ye=T,A=T,T=E-A|0,C=C&65535|65536,he=v&65535|65536,v=(l|0)==(g|0)&h>>>0>>0|g>>>0>>0,A=(C-(he+(E>>>0>>0)|0)|0)-(T>>>0>>0)|0,G=T-v|0,B=(A|0)>-1?1:0,T=h-f|0,v=g-((h>>>0>>0)+l|0)|0,(I|0)>(te|0)){for(;;){t:{if(B&1){if(!(T|G|(v|A))){Yt(m+32|0,o,n,a,c,0,0,0,0),a=e[m+40>>2],c=e[m+44>>2],h=e[m+32>>2],g=e[m+36>>2];break e}h=G,B=A<<1|h>>>31,G=h<<1,A=B,B=0,h=v>>>31|0;break t}A=0,v=g,G=g>>>31|0,T=h,h=E,B=C<<1|h>>>31,h=h<<1}if(E=h|G,g=E,h=ye,G=g-h|0,C=A|B,A=C-((g>>>0>>0)+he|0)|0,h=T,B=v<<1|h>>>31,h=h<<1,g=B,v=(l|0)==(g|0)&h>>>0>>0|g>>>0>>0,A=A-(G>>>0>>0)|0,G=G-v|0,B=(A|0)>-1?1:0,T=h-f|0,v=g-((h>>>0>>0)+l|0)|0,I=I+-1|0,!((I|0)>(te|0)))break}I=te}t:{if(!B||(h=T,E=G,g=v,C=A,h|E|(g|C)))break t;Yt(m+48|0,o,n,a,c,0,0,0,0),a=e[m+56>>2],c=e[m+60>>2],h=e[m+48>>2],g=e[m+52>>2];break e}if((C|0)==65535|C>>>0<65535)for(;a=g>>>31|0,o=0,I=I+-1|0,A=g<<1|h>>>31,h=h<<1,g=A,n=E,B=C<<1|n>>>31,E=n<<1|a,o=o|B,C=o,!!((o|0)==65536&E>>>0<0|o>>>0<65536););if(o=ae&32768,(I|0)<=0){Yt(m- -64|0,h,g,E,C&65535|(o|I+120)<<16,0,0,0,1065811968),a=e[m+72>>2],c=e[m+76>>2],h=e[m+64>>2],g=e[m+68>>2];break e}a=E,c=C&65535|(o|I)<<16}e[i>>2]=h,e[i+4>>2]=g,e[i+8>>2]=a,e[i+12>>2]=c,be=m+128|0}function vA(i,o){var n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0;for(f=be-48|0,be=f,c=o+4|0,h=e[2644],v=e[2641];;){n=e[o+4>>2];e:{if(n>>>0>2]){e[c>>2]=n+1,n=H[n|0];break e}n=Gn(o)}if(!((n|0)==32|n+-9>>>0<5))break}l=1;e:{t:switch(n+-43|0){case 0:case 2:break t;default:break e}if(l=(n|0)==45?-1:1,n=e[o+4>>2],n>>>0>2]){e[c>>2]=n+1,n=H[n|0];break e}n=Gn(o)}e:{t:{n:{for(;;){if(K[a+10484|0]==(n|32)){o:{if(a>>>0>6)break o;if(n=e[o+4>>2],n>>>0>2]){e[c>>2]=n+1,n=H[n|0];break o}n=Gn(o)}if(a=a+1|0,(a|0)!=8)continue;break n}break}if((a|0)!=3){if((a|0)==8)break n;if(a>>>0<4)break t;if((a|0)==8)break n}if(o=e[o+104>>2],o&&(e[c>>2]=e[c>>2]+-1),a>>>0<4)break n;for(;o&&(e[c>>2]=e[c>>2]+-1),a=a+-1|0,a>>>0>3;);}gA(f,ue(ue(l|0)*ue(d8))),l=e[f+8>>2],n=e[f+12>>2],g=e[f>>2],m=e[f+4>>2];break e}t:{n:{o:{if(a)break o;for(a=0;;){if(K[a+10493|0]!=(n|32))break o;r:{if(a>>>0>1)break r;if(n=e[o+4>>2],n>>>0>2]){e[c>>2]=n+1,n=H[n|0];break r}n=Gn(o)}if(a=a+1|0,(a|0)==3)break}break n}o:switch(a|0){case 0:r:{if((n|0)!=48)break r;a=e[o+4>>2];i:{if(a>>>0>2]){e[c>>2]=a+1,a=H[a|0];break i}a=Gn(o)}if((a&-33)==88){kA(f+16|0,o,v,h,l),l=e[f+24>>2],n=e[f+28>>2],g=e[f+16>>2],m=e[f+20>>2];break e}if(!e[o+104>>2])break r;e[c>>2]=e[c>>2]+-1}yA(f+32|0,o,n,v,h,l),l=e[f+40>>2],n=e[f+44>>2],g=e[f+32>>2],m=e[f+36>>2];break e;case 3:break n;default:break o}e[o+104>>2]&&(e[c>>2]=e[c>>2]+-1);break t}n:{a=e[o+4>>2];o:{if(a>>>0>2]){e[c>>2]=a+1,n=H[a|0];break o}n=Gn(o)}if((n|0)==40){a=1;break n}if(l=0,n=2147450880,!e[o+104>>2])break e;e[c>>2]=e[c>>2]+-1;break e}for(;;){n=e[o+4>>2];n:{if(n>>>0>2]){e[c>>2]=n+1,h=H[n|0];break n}h=Gn(o)}if(!(h+-97>>>0>=26&&!(h+-48>>>0<10|h+-65>>>0<26|(h|0)==95))){a=a+1|0;continue}break}if(l=0,n=2147450880,(h|0)==41||(o=e[o+104>>2],o&&(e[c>>2]=e[c>>2]+-1),!a))break e;for(;a=a+-1|0,o&&(e[c>>2]=e[c>>2]+-1),!!a;);break e}e[2896]=28,zd(o),l=0,n=0}e[i>>2]=g,e[i+4>>2]=m,e[i+8>>2]=l,e[i+12>>2]=n,be=f+48|0}function kA(i,o,n,a,c){var f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0;f=be-432|0,be=f,l=e[o+4>>2];e:{if(l>>>0>2]){e[o+4>>2]=l+1,h=H[l|0];break e}h=Gn(o)}e:{t:{for(;;){if((h|0)!=48)n:{if((h|0)!=46)break e;if(l=e[o+4>>2],l>>>0>=ze[o+104>>2])break n;e[o+4>>2]=l+1,h=H[l|0];break t}else{l=e[o+4>>2],l>>>0>2]?(e[o+4>>2]=l+1,h=H[l|0]):h=Gn(o),ye=1;continue}break}h=Gn(o)}if(he=1,(h|0)!=48)break e;for(;;){l=e[o+4>>2];t:{if(l>>>0>2]){e[o+4>>2]=l+1,h=H[l|0];break t}h=Gn(o)}if(E=E+-1|0,G=G+-1|0,(G|0)!=-1&&(E=E+1|0),(h|0)!=48)break}ye=1}for(C=1073676288,l=0;;){e:{Se=h|32;t:{n:{if(Ee=h+-48|0,Ee>>>0<10)break n;if(Se+-97>>>0>5&&(h|0)!=46)break e;if((h|0)!=46)break n;if(he)break e;he=1,G=m,E=l;break t}h=(h|0)>57?Se+-87|0:Ee;n:{if((l|0)<0||(l|0)<=0&&!(m>>>0>7)&&!0){I=h+(I<<4)|0;break n}if((l|0)<0||(l|0)<=0&&!(m>>>0>28)&&!0){zr(f+48|0,h),Yt(f+32|0,te,ae,g,C,0,0,0,1073414144),te=e[f+32>>2],ae=e[f+36>>2],g=e[f+40>>2],C=e[f+44>>2],Yt(f+16|0,te,ae,g,C,e[f+48>>2],e[f+52>>2],e[f+56>>2],e[f+60>>2]),Mr(f,v,A,T,B,e[f+16>>2],e[f+20>>2],e[f+24>>2],e[f+28>>2]),T=e[f+8>>2],B=e[f+12>>2],v=e[f>>2],A=e[f+4>>2];break n}if(!h|Te)break n;Yt(f+80|0,te,ae,g,C,0,0,0,1073610752),Mr(f- -64|0,v,A,T,B,e[f+80>>2],e[f+84>>2],e[f+88>>2],e[f+92>>2]),T=e[f+72>>2],B=e[f+76>>2],Te=1,v=e[f+64>>2],A=e[f+68>>2]}m=m+1|0,m>>>0<1&&(l=l+1|0),ye=1}h=e[o+4>>2],h>>>0>2]?(e[o+4>>2]=h+1,h=H[h|0]):h=Gn(o);continue}break}e:{t:{if(!ye){if(!e[o+104>>2]||(n=e[o+4>>2],e[o+4>>2]=n+-1,e[o+4>>2]=n+-2,!he))break t;e[o+4>>2]=n+-3;break t}if((l|0)<0||(l|0)<=0&&!(m>>>0>7)&&!0)for(g=m,C=l;I=I<<4,g=g+1|0,g>>>0<1&&(C=C+1|0),!!((g|0)!=8|C););n:{if((h&-33)==80){if(g=Ym(o),h=ne,C=h,g|(h|0)!=-2147483648||(g=0,C=0,!e[o+104>>2]))break n;e[o+4>>2]=e[o+4>>2]+-1;break n}if(g=0,C=0,!e[o+104>>2])break n;e[o+4>>2]=e[o+4>>2]+-1}if(!I){Yo(f+112|0,+(c|0)*0),v=e[f+112>>2],A=e[f+116>>2],n=e[f+120>>2],o=e[f+124>>2];break e}if(o=he?G:m,l=(he?E:l)<<2|o>>>30,o=g+(o<<2)|0,E=o+-32|0,m=E,l=l+C|0,o=(o>>>0>>0?l+1|0:l)+-1|0,l=m>>>0<4294967264?o+1|0:o,(l|0)>0||(l|0)>=0&&!(m>>>0<=0-a>>>0)&&!0){e[2896]=68,zr(f+160|0,c),Yt(f+144|0,e[f+160>>2],e[f+164>>2],e[f+168>>2],e[f+172>>2],-1,-1,-1,2147418111),Yt(f+128|0,e[f+144>>2],e[f+148>>2],e[f+152>>2],e[f+156>>2],-1,-1,-1,2147418111),v=e[f+128>>2],A=e[f+132>>2],n=e[f+136>>2],o=e[f+140>>2];break e}if(o=a+-226|0,h=m>>>0>>0?0:1,o=o>>31,(l|0)>(o|0)||(l|0)>=(o|0)&&h){if((I|0)>-1)for(;Mr(f+416|0,v,A,T,B,0,0,0,-1073807360),o=Wm(v,A,T,B,1073610752),g=(o|0)<0,Mr(f+400|0,v,A,T,B,g?v:e[f+416>>2],g?A:e[f+420>>2],g?T:e[f+424>>2],g?B:e[f+428>>2]),l=l+-1|0,m=m+-1|0,(m|0)!=-1&&(l=l+1|0),T=e[f+408>>2],B=e[f+412>>2],v=e[f+400>>2],A=e[f+404>>2],I=I<<1|(o|0)>-1,(I|0)>-1;);o=(m-a|0)+32|0,g=o,h=n,C=o>>>0>=n>>>0?0:1,n=l-((a>>31)+(m>>>0>>0)|0)|0,o=o>>>0<32?n+1|0:n,o=(o|0)<0||(o|0)<=0&&C?(g|0)>0?g:0:h;n:{if((o|0)>=113){zr(f+384|0,c),G=e[f+392>>2],E=e[f+396>>2],te=e[f+384>>2],ae=e[f+388>>2],l=0,c=0,a=0,n=0;break n}Yo(f+352|0,Vi(1,144-o|0)),zr(f+336|0,c),te=e[f+336>>2],ae=e[f+340>>2],G=e[f+344>>2],E=e[f+348>>2],Um(f+368|0,e[f+352>>2],e[f+356>>2],e[f+360>>2],e[f+364>>2],te,ae,G,E),l=e[f+376>>2],c=e[f+380>>2],a=e[f+372>>2],n=e[f+368>>2]}o=!(I&1)&((ka(v,A,T,B,0,0,0,0)|0)!=0&(o|0)<32),ls(f+320|0,o+I|0),Yt(f+304|0,te,ae,G,E,e[f+320>>2],e[f+324>>2],e[f+328>>2],e[f+332>>2]),Mr(f+272|0,e[f+304>>2],e[f+308>>2],e[f+312>>2],e[f+316>>2],n,a,l,c),Yt(f+288|0,o?0:v,o?0:A,o?0:T,o?0:B,te,ae,G,E),Mr(f+256|0,e[f+288>>2],e[f+292>>2],e[f+296>>2],e[f+300>>2],e[f+272>>2],e[f+276>>2],e[f+280>>2],e[f+284>>2]),Vd(f+240|0,e[f+256>>2],e[f+260>>2],e[f+264>>2],e[f+268>>2],n,a,l,c),o=e[f+240>>2],n=e[f+244>>2],a=e[f+248>>2],c=e[f+252>>2],ka(o,n,a,c,0,0,0,0)||(e[2896]=68),Hm(f+224|0,o,n,a,c,m),v=e[f+224>>2],A=e[f+228>>2],n=e[f+232>>2],o=e[f+236>>2];break e}e[2896]=68,zr(f+208|0,c),Yt(f+192|0,e[f+208>>2],e[f+212>>2],e[f+216>>2],e[f+220>>2],0,0,0,65536),Yt(f+176|0,e[f+192>>2],e[f+196>>2],e[f+200>>2],e[f+204>>2],0,0,0,65536),v=e[f+176>>2],A=e[f+180>>2],n=e[f+184>>2],o=e[f+188>>2];break e}Yo(f+96|0,+(c|0)*0),v=e[f+96>>2],A=e[f+100>>2],n=e[f+104>>2],o=e[f+108>>2]}e[i>>2]=v,e[i+4>>2]=A,e[i+8>>2]=n,e[i+12>>2]=o,be=f+432|0}function yA(i,o,n,a,c,f){var l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0;l=be-8976|0,be=l,Se=a+c|0,Be=0-Se|0;e:{t:{for(;;){if((n|0)!=48)n:{if((n|0)!=46)break e;if(n=e[o+4>>2],n>>>0>=ze[o+104>>2])break n;e[o+4>>2]=n+1,n=H[n|0];break t}else{n=e[o+4>>2],n>>>0>2]?(m=1,e[o+4>>2]=n+1,n=H[n|0]):(m=1,n=Gn(o));continue}break}n=Gn(o)}if(I=1,(n|0)!=48)break e;for(;;){n=e[o+4>>2];t:{if(n>>>0>2]){e[o+4>>2]=n+1,n=H[n|0];break t}n=Gn(o)}if(h=h+-1|0,g=g+-1|0,(g|0)!=-1&&(h=h+1|0),(n|0)!=48)break}m=1}e[l+784>>2]=0;e:{t:{C=(n|0)==46,E=n+-48|0;n:{o:{r:{if(C|E>>>0<=9)for(;;){i:{if(C&1){if(!I){g=v,h=A,I=1;break i}m=!m;break r}if(v=v+1|0,v>>>0<1&&(A=A+1|0),(T|0)<=2044){he=(n|0)==48?he:v,m=(l+784|0)+(T<<2)|0,e[m>>2]=G?(ie(e[m>>2],10)+n|0)+-48|0:E,m=1,E=G+1|0,n=(E|0)==9,G=n?0:E,T=n+T|0;break i}if((n|0)==48)break i;e[l+8960>>2]=e[l+8960>>2]|1,he=18396}n=e[o+4>>2];i:{if(n>>>0>2]){e[o+4>>2]=n+1,n=H[n|0];break i}n=Gn(o)}if(C=(n|0)==46,E=n+-48|0,!(C|E>>>0<10))break}if(g=I?g:v,h=I?h:A,!(!m|(n&-33)!=69)){C=Ym(o),n=ne,B=n;i:{if(C|(n|0)!=-2147483648||(C=0,B=0,!e[o+104>>2]))break i;e[o+4>>2]=e[o+4>>2]+-1}if(!m)break n;h=h+B|0,g=g+C|0,g>>>0>>0&&(h=h+1|0);break t}if(m=!m,(n|0)<0)break o}if(!e[o+104>>2])break o;e[o+4>>2]=e[o+4>>2]+-1}if(!m)break t}e[2896]=28,v=0,A=0,zd(o),n=0,o=0;break e}if(o=e[l+784>>2],!o){Yo(l,+(f|0)*0),v=e[l>>2],A=e[l+4>>2],n=e[l+8>>2],o=e[l+12>>2];break e}if(!((g|0)!=(v|0)|(h|0)!=(A|0)|((A|0)>0?1:(A|0)>=0?v>>>0<=9?0:1:0)|(o>>>a|0?(a|0)<=30:0))){zr(l+48|0,f),ls(l+32|0,o),Yt(l+16|0,e[l+48>>2],e[l+52>>2],e[l+56>>2],e[l+60>>2],e[l+32>>2],e[l+36>>2],e[l+40>>2],e[l+44>>2]),v=e[l+16>>2],A=e[l+20>>2],n=e[l+24>>2],o=e[l+28>>2];break e}if((h|0)>0||(h|0)>=0&&!(g>>>0<=(c|0)/-2>>>0)&&!0){e[2896]=68,zr(l+96|0,f),Yt(l+80|0,e[l+96>>2],e[l+100>>2],e[l+104>>2],e[l+108>>2],-1,-1,-1,2147418111),Yt(l- -64|0,e[l+80>>2],e[l+84>>2],e[l+88>>2],e[l+92>>2],-1,-1,-1,2147418111),v=e[l+64>>2],A=e[l+68>>2],n=e[l+72>>2],o=e[l+76>>2];break e}if(o=c+-226|0,n=g>>>0>=o>>>0?0:1,o=o>>31,(h|0)<(o|0)||(h|0)<=(o|0)&&n){e[2896]=68,zr(l+144|0,f),Yt(l+128|0,e[l+144>>2],e[l+148>>2],e[l+152>>2],e[l+156>>2],0,0,0,65536),Yt(l+112|0,e[l+128>>2],e[l+132>>2],e[l+136>>2],e[l+140>>2],0,0,0,65536),v=e[l+112>>2],A=e[l+116>>2],n=e[l+120>>2],o=e[l+124>>2];break e}if(G){if((G|0)<=8){for(n=(l+784|0)+(T<<2)|0,o=e[n>>2];o=ie(o,10),G=G+1|0,(G|0)!=9;);e[n>>2]=o}T=T+1|0}t:{if(I=g,(he|0)>(g|0)|(he|0)>=9|(g|0)>17)break t;if((I|0)==9){zr(l+192|0,f),ls(l+176|0,e[l+784>>2]),Yt(l+160|0,e[l+192>>2],e[l+196>>2],e[l+200>>2],e[l+204>>2],e[l+176>>2],e[l+180>>2],e[l+184>>2],e[l+188>>2]),v=e[l+160>>2],A=e[l+164>>2],n=e[l+168>>2],o=e[l+172>>2];break e}if((I|0)<=8){zr(l+272|0,f),ls(l+256|0,e[l+784>>2]),Yt(l+240|0,e[l+272>>2],e[l+276>>2],e[l+280>>2],e[l+284>>2],e[l+256>>2],e[l+260>>2],e[l+264>>2],e[l+268>>2]),zr(l+224|0,e[(0-I<<2)+10560>>2]),Gm(l+208|0,e[l+240>>2],e[l+244>>2],e[l+248>>2],e[l+252>>2],e[l+224>>2],e[l+228>>2],e[l+232>>2],e[l+236>>2]),v=e[l+208>>2],A=e[l+212>>2],n=e[l+216>>2],o=e[l+220>>2];break e}if(o=(ie(I,-3)+a|0)+27|0,n=e[l+784>>2],n>>>o|0&&(o|0)<=30)break t;zr(l+352|0,f),ls(l+336|0,n),Yt(l+320|0,e[l+352>>2],e[l+356>>2],e[l+360>>2],e[l+364>>2],e[l+336>>2],e[l+340>>2],e[l+344>>2],e[l+348>>2]),zr(l+304|0,e[(I<<2)+10488>>2]),Yt(l+288|0,e[l+320>>2],e[l+324>>2],e[l+328>>2],e[l+332>>2],e[l+304>>2],e[l+308>>2],e[l+312>>2],e[l+316>>2]),v=e[l+288>>2],A=e[l+292>>2],n=e[l+296>>2],o=e[l+300>>2];break e}for(;n=T,T=n+-1|0,!e[(l+784|0)+(T<<2)>>2];);G=0,o=(I|0)%9|0;t:{if(!o){m=0;break t}E=(I|0)>-1?o:o+9|0;n:{if(!n){m=0,n=0;break n}for(g=e[(0-E<<2)+10560>>2],v=1e9/(g|0)|0,C=0,o=0,m=0;A=(l+784|0)+(o<<2)|0,T=e[A>>2],B=(T>>>0)/(g>>>0)|0,h=C+B|0,e[A>>2]=h,h=!h&(o|0)==(m|0),m=h?m+1&2047:m,I=h?I+-9|0:I,C=ie(v,T-ie(g,B)|0),o=o+1|0,(n|0)!=(o|0););if(!C)break n;e[(l+784|0)+(n<<2)>>2]=C,n=n+1|0}I=(I-E|0)+9|0}for(;;){A=(l+784|0)+(m<<2)|0;t:{for(;;){if((I|0)!=36|ze[A>>2]>=10384593&&(I|0)>=36)break t;for(T=n+2047|0,C=0,E=n;n=E,v=T&2047,E=(l+784|0)+(v<<2)|0,o=e[E>>2],h=o>>>3|0,o=o<<29,g=o+C|0,g>>>0>>0&&(h=h+1|0),o=0,!h&g>>>0<1000000001|h>>>0<0||(o=Jm(g,h,1e9),g=g-oe(o,ne,1e9,0)|0),C=o,e[E>>2]=g,E=(v|0)!=(n+-1&2047)||(m|0)==(v|0)||g?n:v,T=v+-1|0,(m|0)!=(v|0););if(G=G+-29|0,!!C)break}m=m+-1&2047,(E|0)==(m|0)&&(o=(l+784|0)+((E+2046&2047)<<2)|0,n=E+-1&2047,e[o>>2]=e[o>>2]|e[(l+784|0)+(n<<2)>>2]),I=I+9|0,e[(l+784|0)+(m<<2)>>2]=C;continue}break}t:{n:for(;;){for(g=n+1&2047,v=(l+784|0)+((n+-1&2047)<<2)|0;;){h=(I|0)>45?9:1;o:{for(;;){E=m,o=0;r:{for(;;){i:{if(m=o+E&2047,(m|0)==(n|0)||(m=e[(l+784|0)+(m<<2)>>2],A=e[(o<<2)+10512>>2],m>>>0>>0))break i;if(m>>>0>A>>>0)break r;if(o=o+1|0,(o|0)!=4)continue}break}if((I|0)!=36)break r;for(g=0,h=0,o=0,v=0,A=0;m=o+E&2047,(m|0)==(n|0)&&(n=n+1&2047,e[((n<<2)+l|0)+780>>2]=0),Yt(l+768|0,g,h,v,A,0,0,1342177280,1075633366),ls(l+752|0,e[(l+784|0)+(m<<2)>>2]),Mr(l+736|0,e[l+768>>2],e[l+772>>2],e[l+776>>2],e[l+780>>2],e[l+752>>2],e[l+756>>2],e[l+760>>2],e[l+764>>2]),v=e[l+744>>2],A=e[l+748>>2],g=e[l+736>>2],h=e[l+740>>2],o=o+1|0,(o|0)!=4;);if(zr(l+720|0,f),Yt(l+704|0,g,h,v,A,e[l+720>>2],e[l+724>>2],e[l+728>>2],e[l+732>>2]),v=e[l+712>>2],A=e[l+716>>2],g=0,h=0,C=e[l+704>>2],B=e[l+708>>2],Ee=G+113|0,c=Ee-c|0,he=(c|0)<(a|0),o=he?(c|0)>0?c:0:a,(o|0)<=112)break o;I=0,T=0,m=0,a=0;break t}if(G=h+G|0,m=n,(n|0)!=(E|0))break}for(A=1e9>>>h|0,C=-1<>2],o=o+(B>>>h|0)|0,e[T>>2]=o,o=!o&(m|0)==(E|0),m=o?m+1&2047:m,I=o?I+-9|0:I,o=ie(A,C&B),E=E+1&2047,(E|0)!=(n|0););if(!o)continue;if((g|0)!=(m|0)){e[(l+784|0)+(n<<2)>>2]=o,n=g;continue n}e[v>>2]=e[v>>2]|1,m=g;continue}break}break}Yo(l+656|0,Vi(1,225-o|0)),Um(l+688|0,e[l+656>>2],e[l+660>>2],e[l+664>>2],e[l+668>>2],C,B,v,A),m=e[l+696>>2],a=e[l+700>>2],I=e[l+688>>2],T=e[l+692>>2],Yo(l+640|0,Vi(1,113-o|0)),Qm(l+672|0,C,B,v,A,e[l+640>>2],e[l+644>>2],e[l+648>>2],e[l+652>>2]),g=e[l+672>>2],h=e[l+676>>2],te=e[l+680>>2],ae=e[l+684>>2],Vd(l+624|0,C,B,v,A,g,h,te,ae),Mr(l+608|0,I,T,m,a,e[l+624>>2],e[l+628>>2],e[l+632>>2],e[l+636>>2]),v=e[l+616>>2],A=e[l+620>>2],C=e[l+608>>2],B=e[l+612>>2]}ye=E+4&2047;t:{if((ye|0)==(n|0))break t;ye=e[(l+784|0)+(ye<<2)>>2];n:{if(ye>>>0<=499999999){if((E+5&2047)==(n|0)&&!ye)break n;Yo(l+496|0,+(f|0)*.25),Mr(l+480|0,g,h,te,ae,e[l+496>>2],e[l+500>>2],e[l+504>>2],e[l+508>>2]),te=e[l+488>>2],ae=e[l+492>>2],g=e[l+480>>2],h=e[l+484>>2];break n}if((ye|0)!=5e8){Yo(l+592|0,+(f|0)*.75),Mr(l+576|0,g,h,te,ae,e[l+592>>2],e[l+596>>2],e[l+600>>2],e[l+604>>2]),te=e[l+584>>2],ae=e[l+588>>2],g=e[l+576>>2],h=e[l+580>>2];break n}if(Te=+(f|0),(E+5&2047)==(n|0)){Yo(l+528|0,Te*.5),Mr(l+512|0,g,h,te,ae,e[l+528>>2],e[l+532>>2],e[l+536>>2],e[l+540>>2]),te=e[l+520>>2],ae=e[l+524>>2],g=e[l+512>>2],h=e[l+516>>2];break n}Yo(l+560|0,Te*.75),Mr(l+544|0,g,h,te,ae,e[l+560>>2],e[l+564>>2],e[l+568>>2],e[l+572>>2]),te=e[l+552>>2],ae=e[l+556>>2],g=e[l+544>>2],h=e[l+548>>2]}if((o|0)>111||(Qm(l+464|0,g,h,te,ae,0,0,0,1073676288),ka(e[l+464>>2],e[l+468>>2],e[l+472>>2],e[l+476>>2],0,0,0,0)))break t;Mr(l+448|0,g,h,te,ae,0,0,0,1073676288),te=e[l+456>>2],ae=e[l+460>>2],g=e[l+448>>2],h=e[l+452>>2]}Mr(l+432|0,C,B,v,A,g,h,te,ae),Vd(l+416|0,e[l+432>>2],e[l+436>>2],e[l+440>>2],e[l+444>>2],I,T,m,a),v=e[l+424>>2],A=e[l+428>>2],C=e[l+416>>2],B=e[l+420>>2];t:{if((Ee&2147483647)<=(-2-Se|0)||(n=l+400|0,e[n+8>>2]=v,e[n+12>>2]=A&2147483647,e[n>>2]=C,e[n+4>>2]=B,Yt(l+384|0,C,B,v,A,0,0,0,1073610752),a=Wm(e[l+400>>2],e[l+404>>2],e[l+408>>2],e[l+412>>2],1081081856),n=(a|0)<0,v=n?v:e[l+392>>2],A=n?A:e[l+396>>2],C=n?C:e[l+384>>2],B=n?B:e[l+388>>2],G=((a|0)>-1)+G|0,je=!(he&(n|(o|0)!=(c|0))&(ka(g,h,te,ae,0,0,0,0)|0)!=0),Qe=0,Ye=(G+110|0)<=(Be|0),Ye?je:Qe))break t;e[2896]=68}Hm(l+368|0,C,B,v,A,G),v=e[l+368>>2],A=e[l+372>>2],n=e[l+376>>2],o=e[l+380>>2]}e[i>>2]=v,e[i+4>>2]=A,e[i+8>>2]=n,e[i+12>>2]=o,be=l+8976|0}function Ym(i){var o=0,n=0,a=0,c=0,f=0;e:{t:{n:{a=e[i+4>>2];o:{if(a>>>0>2]){e[i+4>>2]=a+1,n=H[a|0];break o}n=Gn(i)}switch(n+-43|0){case 0:case 2:break t;default:break n}}o=n+-48|0;break e}f=(n|0)==45,a=e[i+4>>2];t:{if(a>>>0>2]){e[i+4>>2]=a+1,n=H[a|0];break t}n=Gn(i)}o=n+-48|0,o>>>0<10|!e[i+104>>2]||(e[i+4>>2]=e[i+4>>2]+-1)}e:{if(o>>>0<10){for(o=0;;){o=ie(o,10)+n|0,a=e[i+4>>2];t:{if(a>>>0>2]){e[i+4>>2]=a+1,n=H[a|0];break t}n=Gn(i)}if(c=n+-48|0,o=o+-48|0,!((o|0)<214748364&&c>>>0<=9))break}a=o,o=o>>31;t:{if(c>>>0>=10)break t;for(;;){o=oe(a,o,10,0),a=o+n|0,n=ne,c=a>>>0>>0?n+1|0:n,o=e[i+4>>2];n:{if(o>>>0>2]){e[i+4>>2]=o+1,n=H[o|0];break n}n=Gn(i)}if(o=c+-1|0,a=a+-48|0,a>>>0<4294967248&&(o=o+1|0),c=n+-48|0,c>>>0>9)break t;if(!((o|0)<21474836||(o|0)<=21474836&&!(a>>>0>=2061584302)))break}}if(c>>>0<10)for(;;){n=e[i+4>>2];t:{if(n>>>0>2]){e[i+4>>2]=n+1,n=H[n|0];break t}n=Gn(i)}if(!(n+-48>>>0<10))break}e[i+104>>2]&&(e[i+4>>2]=e[i+4>>2]+-1),i=a,a=f?0-i|0:i,o=f?0-(o+(0>>0)|0)|0:o;break e}if(a=0,o=-2147483648,!e[i+104>>2])break e;return e[i+4>>2]=e[i+4>>2]+-1,ne=-2147483648,0}return ne=o,a}function _A(i,o){var n=0,a=0,c=0;n=be-160|0,be=n,In(n+16|0,144),e[n+92>>2]=-1,e[n+60>>2]=o,e[n+24>>2]=-1,e[n+20>>2]=o,zd(n+16|0),vA(n,n+16|0),o=e[n+8>>2],a=e[n+12>>2],c=e[n+4>>2],e[i>>2]=e[n>>2],e[i+4>>2]=c,e[i+8>>2]=o,e[i+12>>2]=a,be=n+160|0}function Xo(i){var o=0,n=0;return o=be-16|0,be=o,_A(o,i),n=C8(e[o>>2],e[o+4>>2],e[o+8>>2],e[o+12>>2]),be=o+16|0,n}function wA(){var i=0,o=0,n=0,a=0;if(o=Go(1,8),!o)return 0;i=Go(1,1032),e[o>>2]=i;e:{if(!i)break e;if(a=Go(1,11856),e[o+4>>2]=a,!a){Ne(i);break e}if(i=Go(1,20),a=e[o+4>>2],e[a+6856>>2]=i,!i){Ne(a),Ne(e[o>>2]);break e}e[a+7296>>2]=0,i=e[o>>2],e[i+44>>2]=13,e[i+48>>2]=1056964608,e[i+36>>2]=0,e[i+40>>2]=1,e[i+28>>2]=16,e[i+32>>2]=44100,e[i+20>>2]=0,e[i+24>>2]=2,e[i+12>>2]=1,e[i+16>>2]=0,e[i+4>>2]=0,e[i+8>>2]=1,i=e[o>>2],e[i+592>>2]=0,e[i+596>>2]=0,e[i+556>>2]=0,e[i+560>>2]=0,e[i+564>>2]=0,e[i+568>>2]=0,e[i+572>>2]=0,e[i+576>>2]=0,e[i+580>>2]=0,e[i+584>>2]=0,e[i+600>>2]=0,e[i+604>>2]=0,a=e[o+4>>2],n=a,e[n+7248>>2]=0,e[n+7252>>2]=0,e[n+7048>>2]=0,n=n+7256|0,e[n>>2]=0,e[n+4>>2]=0,n=a+7264|0,e[n>>2]=0,e[n+4>>2]=0,n=a+7272|0,e[n>>2]=0,e[n+4>>2]=0,n=a+7280|0,e[n>>2]=0,e[n+4>>2]=0,e[a+7288>>2]=0,Tm(i+632|0),i=e[o>>2];t:{if(e[i>>2]!=1||(e[i+16>>2]=1,e[i+20>>2]=0,Wd(o,10777),i=e[o>>2],e[i>>2]!=1))break t;e[i+576>>2]=0,e[i+580>>2]=5,e[i+564>>2]=0,e[i+568>>2]=0,e[i+556>>2]=8,e[i+560>>2]=0}return i=e[o+4>>2],e[i+11848>>2]=0,e[i+6176>>2]=i+336,i=e[o+4>>2],e[i+6180>>2]=i+628,i=e[o+4>>2],e[i+6184>>2]=i+920,i=e[o+4>>2],e[i+6188>>2]=i+1212,i=e[o+4>>2],e[i+6192>>2]=i+1504,i=e[o+4>>2],e[i+6196>>2]=i+1796,i=e[o+4>>2],e[i+6200>>2]=i+2088,i=e[o+4>>2],e[i+6204>>2]=i+2380,i=e[o+4>>2],e[i+6208>>2]=i+2672,i=e[o+4>>2],e[i+6212>>2]=i+2964,i=e[o+4>>2],e[i+6216>>2]=i+3256,i=e[o+4>>2],e[i+6220>>2]=i+3548,i=e[o+4>>2],e[i+6224>>2]=i+3840,i=e[o+4>>2],e[i+6228>>2]=i+4132,i=e[o+4>>2],e[i+6232>>2]=i+4424,i=e[o+4>>2],e[i+6236>>2]=i+4716,i=e[o+4>>2],e[i+6240>>2]=i+5008,i=e[o+4>>2],e[i+6244>>2]=i+5300,i=e[o+4>>2],e[i+6248>>2]=i+5592,i=e[o+4>>2],e[i+6252>>2]=i+5884,i=e[o+4>>2],e[i+6640>>2]=i+6256,i=e[o+4>>2],e[i+6644>>2]=i+6268,i=e[o+4>>2],e[i+6648>>2]=i+6280,i=e[o+4>>2],e[i+6652>>2]=i+6292,i=e[o+4>>2],e[i+6656>>2]=i+6304,i=e[o+4>>2],e[i+6660>>2]=i+6316,i=e[o+4>>2],e[i+6664>>2]=i+6328,i=e[o+4>>2],e[i+6668>>2]=i+6340,i=e[o+4>>2],e[i+6672>>2]=i+6352,i=e[o+4>>2],e[i+6676>>2]=i+6364,i=e[o+4>>2],e[i+6680>>2]=i+6376,i=e[o+4>>2],e[i+6684>>2]=i+6388,i=e[o+4>>2],e[i+6688>>2]=i+6400,i=e[o+4>>2],e[i+6692>>2]=i+6412,i=e[o+4>>2],e[i+6696>>2]=i+6424,i=e[o+4>>2],e[i+6700>>2]=i+6436,i=e[o+4>>2],e[i+6704>>2]=i+6448,i=e[o+4>>2],e[i+6708>>2]=i+6460,i=e[o+4>>2],e[i+6712>>2]=i+6472,i=e[o+4>>2],e[i+6716>>2]=i+6484,rn(e[o+4>>2]+6256|0),rn(e[o+4>>2]+6268|0),rn(e[o+4>>2]+6280|0),rn(e[o+4>>2]+6292|0),rn(e[o+4>>2]+6304|0),rn(e[o+4>>2]+6316|0),rn(e[o+4>>2]+6328|0),rn(e[o+4>>2]+6340|0),rn(e[o+4>>2]+6352|0),rn(e[o+4>>2]+6364|0),rn(e[o+4>>2]+6376|0),rn(e[o+4>>2]+6388|0),rn(e[o+4>>2]+6400|0),rn(e[o+4>>2]+6412|0),rn(e[o+4>>2]+6424|0),rn(e[o+4>>2]+6436|0),rn(e[o+4>>2]+6448|0),rn(e[o+4>>2]+6460|0),rn(e[o+4>>2]+6472|0),rn(e[o+4>>2]+6484|0),rn(e[o+4>>2]+11724|0),rn(e[o+4>>2]+11736|0),e[e[o>>2]>>2]=1,o|0}return Ne(o),0}function Wd(i,o){var n=0,a=0,c=0,f=ue(0),l=ue(0),h=0,g=0,m=ue(0),v=0,A=0;n=e[i>>2];e:{if(e[n>>2]!=1)break e;for(e[n+40>>2]=0;;){t:{n:{o:{r:{i:{a:{s:{l:{u:{f:{c:{d:{p:{h:{v=Pl(o,59);m:{if(v){c=v-o|0;break m}c=El(o)}if(A=(c|0)!=8,!A){if(lr(10584,o,8))break h;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=0;break t}m:switch(c+-6|0){case 1:break c;case 0:break d;case 20:break p;case 7:break m;default:break f}if(h=1,lr(10593,o,13))break u;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=1;break t}if(h=0,lr(10607,o,8))break u;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=2;break t}if(h=0,lr(10616,o,26))break u;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=3;break t}if(lr(10643,o,6))break t;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=4;break t}if(lr(10650,o,7))break l;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=5;break t}if(h=0,c>>>0<8)break s}if(lr(10658,o,6))break a;if(l=ue(Xo(o+6|0)),l>ue(0)^1|l<=ue(.5)^1)break t;o=e[i>>2],Ze[((e[o+40>>2]<<4)+o|0)+48>>2]=l,o=e[i>>2],c=e[o+40>>2],e[o+40>>2]=c+1,e[(o+(c<<4)|0)+44>>2]=6;break t}if(lr(10665,o,7))break i;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=7;break t}s:switch(c+-4|0){case 0:break s;case 1:break o;default:break t}if(lr(10673,o,4))break t;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=8;break t}if(!h||lr(10678,o,13))break r;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=9;break t}if(lr(10692,o,7))break t;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=10;break t}r:{if((c|0)!=9||lr(10700,o,9))break r;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=11;break t}if(!A){if(!lr(10710,o,8)){e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=12;break t}if(lr(10719,o,6))break t;break n}if(!lr(10719,o,6))break n;if(c>>>0<16)break t;if(!lr(10726,o,14)){g=Xo(o+14|0);r:{if(On(g)<2147483648){c=~~g;break r}c=-2147483648}a=Pl(o,47),f=ue(.10000000149011612);r:{if(!a||(n=a+1|0,f=ue(.9900000095367432),!(ue(Xo(n))>2],n=e[o+40>>2],(c|0)<=1){Ze[((n<<4)+o|0)+48>>2]=l,o=e[i>>2],c=e[o+40>>2],e[o+40>>2]=c+1,e[(o+(c<<4)|0)+44>>2]=13;break t}if(n+c>>>0>31)break t;for(m=ue(ue(ue(1)/ue(ue(1)-f))+ue(-1)),f=ue(m+ue(c|0)),a=0;Ze[((n<<4)+o|0)+48>>2]=l,o=e[i>>2],Ze[((e[o+40>>2]<<4)+o|0)+52>>2]=ue(a|0)/f,o=e[i>>2],a=a+1|0,Ze[((e[o+40>>2]<<4)+o|0)+56>>2]=ue(m+ue(a|0))/f,o=e[i>>2],h=e[o+40>>2],n=h+1|0,e[o+40>>2]=n,e[((h<<4)+o|0)+44>>2]=14,(a|0)!=(c|0););break t}if(c>>>0<17||lr(10741,o,15))break t;g=Xo(o+15|0);r:{if(On(g)<2147483648){c=~~g;break r}c=-2147483648}l=ue(.20000000298023224),a=Pl(o,47),f=ue(.20000000298023224);r:{if(!a||(n=a+1|0,f=ue(.9900000095367432),!(ue(Xo(n))>2],n=e[o+40>>2],(c|0)<=1){Ze[((n<<4)+o|0)+48>>2]=l,o=e[i>>2],c=e[o+40>>2],e[o+40>>2]=c+1,e[(o+(c<<4)|0)+44>>2]=13;break t}if(n+c>>>0>31)break t;for(m=ue(ue(ue(1)/ue(ue(1)-f))+ue(-1)),f=ue(m+ue(c|0)),a=0;Ze[((n<<4)+o|0)+48>>2]=l,o=e[i>>2],Ze[((e[o+40>>2]<<4)+o|0)+52>>2]=ue(a|0)/f,o=e[i>>2],a=a+1|0,Ze[((e[o+40>>2]<<4)+o|0)+56>>2]=ue(m+ue(a|0))/f,o=e[i>>2],h=e[o+40>>2],n=h+1|0,e[o+40>>2]=n,e[((h<<4)+o|0)+44>>2]=15,(a|0)!=(c|0););break t}if(lr(10757,o,5))break t;e[n+40>>2]=a+1,e[((a<<4)+n|0)+44>>2]=16;break t}if(l=ue(Xo(o+6|0)),l>=ue(0)^1|l<=ue(1)^1)break t;o=e[i>>2],Ze[((e[o+40>>2]<<4)+o|0)+48>>2]=l,o=e[i>>2],c=e[o+40>>2],e[o+40>>2]=c+1,e[(o+(c<<4)|0)+44>>2]=13}if(n=e[i>>2],a=e[n+40>>2],!(v&&(o=v+1|0,(a|0)!=32)))break}if(c=1,a)break e;e[n+40>>2]=1,e[n+44>>2]=13,e[n+48>>2]=1056964608}return c}function AA(i){i=i|0;var o=0,n=0;i&&(e[e[i+4>>2]+11848>>2]=1,Km(i),o=e[i+4>>2],n=e[o+11752>>2],n&&(Cm(n),o=e[i+4>>2]),on(o+6256|0),on(e[i+4>>2]+6268|0),on(e[i+4>>2]+6280|0),on(e[i+4>>2]+6292|0),on(e[i+4>>2]+6304|0),on(e[i+4>>2]+6316|0),on(e[i+4>>2]+6328|0),on(e[i+4>>2]+6340|0),on(e[i+4>>2]+6352|0),on(e[i+4>>2]+6364|0),on(e[i+4>>2]+6376|0),on(e[i+4>>2]+6388|0),on(e[i+4>>2]+6400|0),on(e[i+4>>2]+6412|0),on(e[i+4>>2]+6424|0),on(e[i+4>>2]+6436|0),on(e[i+4>>2]+6448|0),on(e[i+4>>2]+6460|0),on(e[i+4>>2]+6472|0),on(e[i+4>>2]+6484|0),on(e[i+4>>2]+11724|0),on(e[i+4>>2]+11736|0),Ad(e[e[i+4>>2]+6856>>2]),Ne(e[i+4>>2]),Ne(e[i>>2]),Ne(i))}function Km(i){i=i|0;var o=0,n=0,a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0;h=be-32|0,be=h;e:{if(!i)break e;t:{n:switch(f=e[i>>2],o=e[f>>2],o|0){case 1:break e;case 0:break n;default:break t}if(n=e[i+4>>2],e[n+11848>>2]||(n=e[n+7052>>2],!n))break t;a=e[f+36>>2],e[f+36>>2]=n,a=!du(i,(n|0)!=(a|0),1),f=e[i>>2]}e[f+12>>2]&&(n=e[i+4>>2],bm(n+6928|0,n+7060|0)),f=i+4|0,o=e[i+4>>2];t:{if(e[o+11848>>2]){n=a;break t}c=e[i>>2];n:{if(e[c>>2])break n;if(A=e[o+7268>>2],A){o:{if(e[o+7260>>2]){if(E=e[o+6900>>2],C=e[o+6896>>2],n=o+6920|0,g=e[n>>2],m=e[n+4>>2],(Le[A](i,0,0,e[o+7288>>2])|0)==2)break o;Fm(h),n=e[i>>2],c=e[n+608>>2],l=e[n+612>>2],n=e[i+4>>2];r:{if(!Lm(i,c,l,h,e[n+7268>>2],e[n+7264>>2],e[n+7288>>2]))break r;if(A=e[1357]+e[1356]|0,I=e[1362]+(e[1361]+(e[1360]+(e[1359]+(A+e[1358]|0)|0)|0)|0)|0,n=I+e[1363]>>>3|0,n+33>>>0>ze[h+12>>2]){e[e[i>>2]>>2]=2,ss(h);break o}if(c=o+6936|0,v=H[c+4|0]|H[c+5|0]<<8|(H[c+6|0]<<16|H[c+7|0]<<24),n=n+e[h+8>>2]|0,c=H[c|0]|H[c+1|0]<<8|(H[c+2|0]<<16|H[c+3|0]<<24),K[n+25|0]=c,K[n+26|0]=c>>>8,K[n+27|0]=c>>>16,K[n+28|0]=c>>>24,K[n+29|0]=v,K[n+30|0]=v>>>8,K[n+31|0]=v>>>16,K[n+32|0]=v>>>24,o=o+6928|0,c=H[o+4|0]|H[o+5|0]<<8|(H[o+6|0]<<16|H[o+7|0]<<24),o=H[o|0]|H[o+1|0]<<8|(H[o+2|0]<<16|H[o+3|0]<<24),K[n+17|0]=o,K[n+18|0]=o>>>8,K[n+19|0]=o>>>16,K[n+20|0]=o>>>24,K[n+21|0]=c,K[n+22|0]=c>>>8,K[n+23|0]=c>>>16,K[n+24|0]=c>>>24,n=I+-4>>>3|0,n+22>>>0>ze[h+12>>2]){e[e[i>>2]>>2]=2,ss(h);break o}if(n=n+e[h+8>>2]|0,K[n+21|0]=g,K[n+20|0]=(m&255)<<24|g>>>8,K[n+19|0]=(m&65535)<<16|g>>>16,K[n+18|0]=(m&16777215)<<8|g>>>24,n=n+17|0,K[n|0]=H[n|0]&240|m&15,n=A>>>3|0,n+23>>>0>ze[h+12>>2]){e[e[i>>2]>>2]=2,ss(h);break o}if(n=n+e[h+8>>2]|0,K[n+22|0]=E,K[n+21|0]=E>>>8,K[n+20|0]=E>>>16,K[n+19|0]=C,K[n+18|0]=C>>>8,K[n+17|0]=C>>>16,n=e[i>>2],c=e[n+608>>2],o=e[n+612>>2],n=e[i+4>>2],n=Dm(i,c,o,h,e[n+7268>>2],e[n+7276>>2],e[n+7288>>2]),ss(h),!n||(n=e[e[f>>2]+7048>>2],!n|!e[n>>2])||(o=e[i>>2],!(e[o+616>>2]|e[o+620>>2])))break o;if(sm(n),Fm(h),n=e[i>>2],c=e[n+616>>2],o=e[n+620>>2],n=e[i+4>>2],!Lm(i,c,o,h,e[n+7268>>2],e[n+7264>>2],e[n+7288>>2]))break r;if(l=e[f>>2],n=e[l+7048>>2],o=e[n>>2],e[h+12>>2]!=(ie(o,18)+4|0)){e[e[i>>2]>>2]=2,ss(h);break o}if(o)for(o=e[h+8>>2]+4|0,c=0;g=e[n+4>>2]+ie(c,24)|0,m=e[g>>2],n=e[g+4>>2],v=e[g+8>>2],l=e[g+12>>2],g=e[g+16>>2],K[o+17|0]=g,K[o+15|0]=v,K[o+7|0]=m,K[o+16|0]=g>>>8,K[o+14|0]=(l&255)<<24|v>>>8,K[o+13|0]=(l&65535)<<16|v>>>16,K[o+12|0]=(l&16777215)<<8|v>>>24,K[o+11|0]=l,K[o+10|0]=l>>>8,K[o+9|0]=l>>>16,K[o+8|0]=l>>>24,K[o+6|0]=(n&255)<<24|m>>>8,K[o+5|0]=(n&65535)<<16|m>>>16,K[o+4|0]=(n&16777215)<<8|m>>>24,K[o+3|0]=n,K[o+2|0]=n>>>8,K[o+1|0]=n>>>16,K[o|0]=n>>>24,o=o+18|0,c=c+1|0,l=e[f>>2],n=e[l+7048>>2],c>>>0>2];);n=e[i>>2],Dm(i,e[n+616>>2],e[n+620>>2],h,e[l+7268>>2],e[l+7276>>2],e[l+7288>>2])}ss(h);break o}E=e[o+6912>>2],g=e[o+6900>>2],m=e[o+6896>>2],l=o+6920|0,n=e[l>>2],l=e[l+4>>2];r:{i:switch(B=i,v=e[c+612>>2],C=e[1357]+e[1356]|0,I=e[1362]+(e[1361]+(e[1360]+(e[1359]+(C+e[1358]|0)|0)|0)|0)|0,T=(I+e[1363]>>>3|0)+4|0,c=T+e[c+608>>2]|0,c>>>0>>0&&(v=v+1|0),Le[A](B,c,v,e[o+7288>>2])|0){case 0:break r;case 1:break i;default:break o}e[e[i>>2]>>2]=5;break o}if(c=o+6928|0,o=e[i+4>>2],Le[e[o+7276>>2]](i,c,16,0,0,e[o+7288>>2])){e[e[i>>2]>>2]=5;break o}K[h+4|0]=n,K[h+3|0]=(l&255)<<24|n>>>8,K[h+2|0]=(l&65535)<<16|n>>>16,K[h+1|0]=(l&16777215)<<8|n>>>24,K[h|0]=(l&15|E<<4)+240;r:{i:switch(n=(I+-4>>>3|0)+4|0,o=e[i>>2],c=n+e[o+608>>2]|0,o=e[o+612>>2],o=c>>>0>>0?o+1|0:o,n=e[i+4>>2],Le[e[n+7268>>2]](i,c,o,e[n+7288>>2])|0){case 0:break r;case 1:break i;default:break o}e[e[i>>2]>>2]=5;break o}if(n=e[i+4>>2],Le[e[n+7276>>2]](i,h,5,0,0,e[n+7288>>2])){e[e[i>>2]>>2]=5;break o}K[h+5|0]=g,K[h+4|0]=g>>>8,K[h+3|0]=g>>>16,K[h+2|0]=m,K[h+1|0]=m>>>8,K[h|0]=m>>>16;r:{i:switch(n=(C>>>3|0)+4|0,o=e[i>>2],c=n+e[o+608>>2]|0,o=e[o+612>>2],o=c>>>0>>0?o+1|0:o,n=e[i+4>>2],Le[e[n+7268>>2]](i,c,o,e[n+7288>>2])|0){case 0:break r;case 1:break i;default:break o}e[e[i>>2]>>2]=5;break o}if(n=e[i+4>>2],Le[e[n+7276>>2]](i,h,6,0,0,e[n+7288>>2])){e[e[i>>2]>>2]=5;break o}if(n=e[e[f>>2]+7048>>2],!n|!e[n>>2]||(o=e[i>>2],!(e[o+616>>2]|e[o+620>>2])))break o;sm(n);r:{i:{a:switch(n=e[i>>2],o=e[n+616>>2]+4|0,n=e[n+620>>2],c=o>>>0<4?n+1|0:n,n=e[i+4>>2],Le[e[n+7268>>2]](i,o,c,e[n+7288>>2])|0){case 1:break i;case 0:break a;default:break o}if(c=e[f>>2],o=e[c+7048>>2],!e[o>>2])break o;l=0;break r}e[e[i>>2]>>2]=5;break o}for(;;){r:{if(m=ie(l,24),g=m+e[o+4>>2]|0,n=e[g+4>>2],g=e[g>>2],v=g<<24|g<<8&16711680,e[h>>2]=((n&255)<<24|g>>>8)&-16777216|((n&16777215)<<8|g>>>24)&16711680|(n>>>8&65280|n>>>24),e[h+4>>2]=(n<<24|g>>>8)&65280|(n<<8|g>>>24)&255|v,g=m+e[o+4>>2]|0,n=e[g+12>>2],g=e[g+8>>2],v=g<<24|g<<8&16711680,e[h+8>>2]=((n&255)<<24|g>>>8)&-16777216|((n&16777215)<<8|g>>>24)&16711680|(n>>>8&65280|n>>>24),e[h+12>>2]=(n<<24|g>>>8)&65280|(n<<8|g>>>24)&255|v,n=$t[(m+e[o+4>>2]|0)+16>>1],Ht[h+16>>1]=(n<<24|n<<8&16711680)>>>16,Le[e[c+7276>>2]](i,h,18,0,0,e[c+7288>>2]))break r;if(l=l+1|0,c=e[f>>2],o=e[c+7048>>2],l>>>0>2])continue;break o}break}e[e[i>>2]>>2]=5}o=e[i+4>>2],c=e[i>>2],a=e[c>>2]?1:a}if(n=e[o+7280>>2],!n)break n;Le[n](i,o+6872|0,e[o+7288>>2]),c=e[i>>2]}if(!e[c+4>>2]){n=a;break t}if(n=e[e[f>>2]+11752>>2],!n){n=a;break t}if(Id(n)){n=a;break t}if(n=1,a)break t;e[e[i>>2]>>2]=4}if(o=e[f>>2],a=e[o+7296>>2],a&&((a|0)!=e[1896]&&(ym(a),o=e[f>>2]),e[o+7296>>2]=0),e[o+7260>>2]&&cm(e[i>>2]+640|0),o=e[i>>2],a=e[o+600>>2],a&&(Ne(a),o=e[i>>2],e[o+600>>2]=0,e[o+604>>2]=0),e[o+24>>2])for(a=0;c=e[f>>2],o=a<<2,l=e[(c+o|0)+7328>>2],l&&(Ne(l),e[(o+e[f>>2]|0)+7328>>2]=0,c=e[f>>2]),c=e[(c+o|0)+7368>>2],c&&(Ne(c),e[(o+e[f>>2]|0)+7368>>2]=0),a=a+1|0,a>>>0>2]+24>>2];);if(o=e[f>>2],a=e[o+7360>>2],a&&(Ne(a),e[e[f>>2]+7360>>2]=0,o=e[f>>2]),a=e[o+7400>>2],a&&(Ne(a),e[e[f>>2]+7400>>2]=0,o=e[f>>2]),a=e[o+7364>>2],a&&(Ne(a),e[e[f>>2]+7364>>2]=0,o=e[f>>2]),a=e[o+7404>>2],a&&(Ne(a),e[e[f>>2]+7404>>2]=0,o=e[f>>2]),c=e[i>>2],e[c+40>>2])for(a=0;l=a<<2,g=e[(l+o|0)+7408>>2],g&&(Ne(g),e[(l+e[i+4>>2]|0)+7408>>2]=0,c=e[i>>2],o=e[i+4>>2]),a=a+1|0,a>>>0>2];);if(a=e[o+7536>>2],a&&(Ne(a),o=e[i+4>>2],e[o+7536>>2]=0,c=e[i>>2]),e[c+24>>2])for(c=0;a=c<<3,l=e[(a+o|0)+7540>>2],l&&(Ne(l),e[(a+e[f>>2]|0)+7540>>2]=0,o=e[f>>2]),l=e[(o+a|0)+7544>>2],l&&(Ne(l),e[(a+e[f>>2]|0)+7544>>2]=0,o=e[f>>2]),c=c+1|0,c>>>0>2]+24>>2];);if(a=e[o+7604>>2],a&&(Ne(a),e[e[f>>2]+7604>>2]=0,o=e[f>>2]),a=e[o+7608>>2],a&&(Ne(a),e[e[f>>2]+7608>>2]=0,o=e[f>>2]),a=e[o+7612>>2],a&&(Ne(a),e[e[f>>2]+7612>>2]=0,o=e[f>>2]),a=e[o+7616>>2],a&&(Ne(a),e[e[f>>2]+7616>>2]=0,o=e[f>>2]),a=e[o+7620>>2],a&&(Ne(a),o=e[f>>2],e[o+7620>>2]=0),a=e[o+7624>>2],a&&(Ne(a),o=e[f>>2],e[o+7624>>2]=0),a=e[i>>2],!(!e[a+4>>2]|!e[a+24>>2]))for(f=0;c=f<<2,l=e[(c+o|0)+11764>>2],l&&(Ne(l),e[(c+e[i+4>>2]|0)+11764>>2]=0,o=e[i+4>>2],a=e[i>>2]),f=f+1|0,f>>>0>2];);Dw(e[o+6856>>2]),a=e[i>>2],e[a+44>>2]=13,e[a+48>>2]=1056964608,e[a+36>>2]=0,e[a+40>>2]=1,e[a+28>>2]=16,e[a+32>>2]=44100,e[a+20>>2]=0,e[a+24>>2]=2,e[a+12>>2]=1,e[a+16>>2]=0,e[a+4>>2]=0,e[a+8>>2]=1,a=e[i>>2],e[a+592>>2]=0,e[a+596>>2]=0,e[a+556>>2]=0,e[a+560>>2]=0,e[a+564>>2]=0,e[a+568>>2]=0,e[a+572>>2]=0,e[a+576>>2]=0,e[a+580>>2]=0,e[a+584>>2]=0,e[a+600>>2]=0,e[a+604>>2]=0,o=e[i+4>>2],e[o+7248>>2]=0,e[o+7252>>2]=0,e[o+7048>>2]=0,f=o+7256|0,e[f>>2]=0,e[f+4>>2]=0,f=o+7264|0,e[f>>2]=0,e[f+4>>2]=0,f=o+7272|0,e[f>>2]=0,e[f+4>>2]=0,f=o+7280|0,e[f>>2]=0,e[f+4>>2]=0,e[o+7288>>2]=0,Tm(a+632|0),o=e[i>>2];t:{if(e[o>>2]!=1||(e[o+16>>2]=1,e[o+20>>2]=0,Wd(i,10777),o=e[i>>2],e[o>>2]!=1))break t;e[o+576>>2]=0,e[o+580>>2]=5,e[o+564>>2]=0,e[o+568>>2]=0,e[o+556>>2]=8,e[o+560>>2]=0}n||(e[o>>2]=1),o=!n}return be=h+32|0,o|0}function du(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0;g=be-48|0,be=g;e:{t:{if(c=e[i>>2],!e[c+12>>2]||(a=e[i+4>>2],a=vm(a+7060|0,a+4|0,e[c+24>>2],e[c+36>>2],e[c+28>>2]+7>>>3|0),c=e[i>>2],a))break t;e[c>>2]=8,o=0;break e}a=e[c+576>>2],o?C=0:(o=j8(e[c+36>>2]),c=e[i>>2],f=e[c+580>>2],C=o>>>0>>0?o:f),h=e[c+36>>2],e[g+8>>2]=h,e[g+12>>2]=e[c+32>>2],o=e[c+24>>2],e[g+20>>2]=0,e[g+16>>2]=o,o=e[c+28>>2],e[g+28>>2]=0,e[g+24>>2]=o,f=e[i+4>>2],e[g+32>>2]=e[f+7056>>2],I=a>>>0>>0?a:C;t:{n:{o:{r:{i:{a:{s:{if(!e[c+16>>2]){v=1;break s}if(!e[c+20>>2]|!e[f+6864>>2])break s;if(v=1,E=1,e[f+6868>>2])break a}s:{if(!e[c+24>>2]){a=0;break s}for(;;){E=(l<<2)+f|0,a=0,A=0;l:{if(!h)break l;for(T=e[E+4>>2],o=0;;){u:{if(a=e[T+(o<<2)>>2]|a,m=a&1,o=o+1|0,o>>>0>=h>>>0)break u;if(!m)continue}break}if(o=0,A=0,!a||(A=0,m))break l;for(;o=o+1|0,m=a&2,a=a>>1,!m;);if(m=0,A=0,!o)break l;for(;a=T+(m<<2)|0,e[a>>2]=e[a>>2]>>o,m=m+1|0,(m|0)!=(h|0););A=o}if(o=A,h=ie(l,584)+f|0,a=e[c+28>>2],o=o>>>0>a>>>0?a:o,e[h+624>>2]=o,e[h+916>>2]=o,e[E+216>>2]=a-o,l=l+1|0,a=e[c+24>>2],l>>>0>=a>>>0)break s;h=e[c+36>>2]}}if(o=1,v)break i;h=e[c+36>>2],E=0}m=e[f+36>>2],a=0,l=0;a:{if(!h)break a;for(o=0;;){s:{if(o=e[(l<<2)+m>>2]|o,v=o&1,l=l+1|0,l>>>0>=h>>>0)break s;if(!v)continue}break}if(l=0,v|!o)break a;for(;l=l+1|0,v=o&2,o=o>>1,!v;);if(o=0,!l){l=0;break a}for(;v=(o<<2)+m|0,e[v>>2]=e[v>>2]>>l,o=o+1|0,(h|0)!=(o|0););}o=e[c+28>>2],l=l>>>0>o>>>0?o:l,e[f+5296>>2]=l,e[f+5588>>2]=l,e[f+248>>2]=o-l,l=e[c+36>>2];a:{if(!l)break a;for(h=e[f+40>>2],o=0;;){s:{if(a=e[h+(o<<2)>>2]|a,v=a&1,o=o+1|0,o>>>0>=l>>>0)break s;if(!v)continue}break}if(o=0,!a){a=0;break a}if(v){a=0;break a}for(;o=o+1|0,v=a&2,a=a>>1,!v;);if(a=0,!o)break a;for(;v=h+(a<<2)|0,e[v>>2]=e[v>>2]>>o,a=a+1|0,(l|0)!=(a|0););a=o}if(o=e[c+28>>2],a=a>>>0>o>>>0?o:a,e[f+5880>>2]=a,e[f+6172>>2]=a,e[f+252>>2]=(o-a|0)+1,E)break r;a=e[c+24>>2],o=0}if(c=o,a)for(a=0;o=(a<<2)+f|0,f=(a<<3)+f|0,Ud(i,I,C,g+8|0,e[o+216>>2],e[o+4>>2],f+6176|0,f+6640|0,f+256|0,o+6768|0,o+6808|0),f=e[i+4>>2],a=a+1|0,a>>>0>2]+24>>2];);if(c)break o;m=e[f+36>>2]}Ud(i,I,C,g+8|0,e[f+248>>2],m,f+6240|0,f+6704|0,f+320|0,f+6800|0,f+6840|0),o=e[i+4>>2],Ud(i,I,C,g+8|0,e[o+252>>2],e[o+40>>2],o+6248|0,o+6712|0,o+328|0,o+6804|0,o+6844|0),A=g,o=e[i+4>>2];r:{if(!(!e[e[i>>2]+20>>2]|!e[o+6864>>2])){a=e[o+6868>>2]?3:0;break r}a=e[o+6844>>2],f=e[o+6808>>2],c=a+f|0,l=e[o+6812>>2],f=f+l|0,h=c>>>0>>0,l=a+l|0,f=h?c:f,c=l>>>0>>0,a=a+e[o+6840>>2]>>>0<(c?l:f)>>>0?3:c?2:h}if(e[A+20>>2]=a,!zm(g+8|0,e[o+6856>>2])){e[e[i>>2]>>2]=7,o=0;break e}f=i,l=e[g+8>>2];r:{i:switch(a|0){default:a=e[i+4>>2],h=0,o=0,c=0,m=0;break r;case 0:a=e[i+4>>2],c=a+336|0,o=c+ie(e[a+6768>>2],292)|0,h=(c+ie(e[a+6772>>2],292)|0)+584|0,c=e[a+216>>2],m=e[a+220>>2];break r;case 1:a=e[i+4>>2],o=(a+ie(e[a+6768>>2],292)|0)+336|0,h=(ie(e[a+6804>>2],292)+a|0)+5592|0,c=e[a+216>>2],m=e[a+252>>2];break r;case 2:a=e[i+4>>2],h=(a+ie(e[a+6772>>2],292)|0)+920|0,o=(ie(e[a+6804>>2],292)+a|0)+5592|0,c=e[a+252>>2],m=e[a+220>>2];break r;case 3:break i}a=e[i+4>>2],c=a+5008|0,o=c+ie(e[a+6800>>2],292)|0,h=(c+ie(e[a+6804>>2],292)|0)+584|0,c=e[a+248>>2],m=e[a+252>>2]}if(!Hd(f,l,c,o,e[a+6856>>2])||!Hd(i,e[g+8>>2],m,h,e[e[i+4>>2]+6856>>2]))break n;o=e[i>>2];break t}if(a=zm(g+8|0,e[f+6856>>2]),o=e[i>>2],a){if(!e[o+24>>2])break t;for(a=0;;){if(o=e[i+4>>2],f=o+(a<<2)|0,!Hd(i,e[g+8>>2],e[f+216>>2],((o+ie(a,584)|0)+ie(e[f+6768>>2],292)|0)+336|0,e[o+6856>>2]))break n;if(a=a+1|0,o=e[i>>2],!(a>>>0>2]))break}break t}e[o>>2]=7}o=0;break e}e[o+20>>2]&&(o=e[i+4>>2],a=e[o+6864>>2]+1|0,e[o+6864>>2]=a>>>0>2]?a:0),o=e[i+4>>2],e[o+6868>>2]=e[g+20>>2],o=e[o+6856>>2],a=e[o+16>>2]&7,A=1;t:{if(!a)break t;A=is(o,8-a|0)}if(!A){e[e[i>>2]>>2]=8,o=0;break e}t:{if(Bw(e[e[i+4>>2]+6856>>2],g+8|0)&&ht(e[e[i+4>>2]+6856>>2],$t[g+8>>1],e[1404]))break t;e[e[i>>2]>>2]=8,o=0;break e}if(o=0,!Ml(i,e[e[i>>2]+36>>2],n))break e;o=e[i+4>>2],e[o+7052>>2]=0,e[o+7056>>2]=e[o+7056>>2]+1,n=o+6920|0,a=n,A=a,o=e[a+4>>2],i=e[e[i>>2]+36>>2],n=i+e[a>>2]|0,n>>>0>>0&&(o=o+1|0),e[A>>2]=n,e[a+4>>2]=o,o=1}return i=o,be=g+48|0,i}function CA(i,o,n,a,c,f){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,Xm(i,0,o,n,a,c,f,0)|0}function Xm(i,o,n,a,c,f,l,h){var g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0;T=be-176|0,be=T,m=13,g=e[i>>2];e:{if(e[g>>2]!=1||(m=3,!n|(c?0:a))||(m=4,A=e[g+24>>2],A+-1>>>0>7))break e;t:{n:{if((A|0)!=2){e[g+16>>2]=0;break n}if(e[g+16>>2])break t}e[g+20>>2]=0}if(A=e[g+28>>2],A>>>0>=32){e[g+16>>2]=0,m=5;break e}if(m=5,A+-4>>>0>20)break e;if(e[g+32>>2]+-1>>>0>=655350){m=6;break e}g=e[i>>2],v=e[g+36>>2];t:{if(!v){v=e[g+556>>2]?4096:1152,e[g+36>>2]=v;break t}if(m=7,v+-16>>>0>65519)break e}if(m=8,A=e[g+556>>2],A>>>0>32||(m=10,v>>>0>>0))break e;A=e[g+560>>2];t:{if(!A){E=g,A=e[g+28>>2];n:{if(A>>>0<=15){A=A>>>0>5?(A>>>1|0)+2|0:5;break n}if((A|0)==16){if(A=7,v>>>0<193||(A=8,v>>>0<385)||(A=9,v>>>0<577)||(A=10,v>>>0<1153)||(A=11,v>>>0<2305))break n;A=v>>>0<4609?12:13;break n}if(A=13,v>>>0<385)break n;A=v>>>0<1153?14:15}e[E+560>>2]=A;break t}if(m=9,A+-5>>>0>10)break e}t:{if(!e[g+8>>2]){v=e[g+580>>2];break t}if(m=11,!((v>>>0<4609|ze[g+32>>2]>48e3)&v>>>0<16385)||!R8(e[e[i>>2]+32>>2])||(g=e[i>>2],Ke(e[g+28>>2]+-8|0,30)>>>0>4)||(v=e[g+580>>2],v>>>0>8))break e;if(ze[g+32>>2]>48e3)break t;if(ze[g+36>>2]>4608|ze[g+556>>2]>12)break e}A=1<>>0>=A>>>0&&(v=A+-1|0,e[g+580>>2]=v),ze[g+576>>2]>=v>>>0&&(e[g+576>>2]=v);t:{if(!h||(v=e[g+600>>2],!v)||(E=e[g+604>>2],E>>>0<2))break t;for(m=1;;){if(A=e[(m<<2)+v>>2],!(!A|e[A>>2]!=4)){for(;g=(m<<2)+v|0,m=m+-1|0,e[g>>2]=e[(m<<2)+v>>2],v=e[e[i>>2]+600>>2],!!m;);e[v>>2]=A,g=e[i>>2];break t}if(m=m+1|0,(E|0)==(m|0))break}}E=e[g+604>>2];t:{n:{if(v=e[g+600>>2],v){if(A=0,!E)break t;for(;;){if(g=e[(A<<2)+v>>2],!(!g|e[g>>2]!=3)){e[e[i+4>>2]+7048>>2]=g+16;break n}if(A=A+1|0,(E|0)==(A|0))break}break n}if(m=12,E)break e;A=0;break t}for(g=0,E=0,A=0;;){m=12;n:{o:{r:{i:{a:switch(v=e[(I<<2)+v>>2],e[v>>2]){case 0:break e;case 6:break o;case 5:break r;case 4:break i;case 3:break a;default:break n}if(te)break e;if(te=1,A=E,C=g,T8(v+16|0))break n;break e}if(A=1,C=g,!E)break n;break e}if(A=E,C=g,D8(v+16|0,e[v+160>>2]))break n;break e}if(G=v+16|0,!O8(G))break e;A=E,C=g;o:switch(e[G>>2]+-1|0){case 0:if(ae||(C=e[v+20>>2],Om(C,10763)&&Om(C,10773))||e[v+28>>2]!=32)break e;if(ae=1,A=E,C=g,e[v+32>>2]==32)break n;break e;case 1:break o;default:break n}if(C=1,g)break e}if(I=I+1|0,g=e[i>>2],I>>>0>=ze[g+604>>2])break t;v=e[g+600>>2],g=C,E=A}}if(v=0,I=e[i+4>>2],e[I>>2]=0,e[g+24>>2])for(;g=v<<2,e[(g+I|0)+4>>2]=0,e[(g+e[i+4>>2]|0)+7328>>2]=0,e[(g+e[i+4>>2]|0)+44>>2]=0,e[(g+e[i+4>>2]|0)+7368>>2]=0,I=e[i+4>>2],v=v+1|0,v>>>0>2]+24>>2];);if(g=0,e[I+36>>2]=0,e[e[i+4>>2]+7360>>2]=0,e[e[i+4>>2]+76>>2]=0,e[e[i+4>>2]+7400>>2]=0,e[e[i+4>>2]+40>>2]=0,e[e[i+4>>2]+7364>>2]=0,e[e[i+4>>2]+80>>2]=0,e[e[i+4>>2]+7404>>2]=0,m=e[i+4>>2],v=e[i>>2],e[v+40>>2])for(;C=g<<2,e[(C+m|0)+84>>2]=0,e[(C+e[i+4>>2]|0)+7408>>2]=0,m=e[i+4>>2],g=g+1|0,v=e[i>>2],g>>>0>2];);if(g=0,e[m+7536>>2]=0,e[m+212>>2]=0,e[v+24>>2])for(;C=g<<3,e[(C+m|0)+256>>2]=0,e[(C+e[i+4>>2]|0)+7540>>2]=0,e[(C+e[i+4>>2]|0)+260>>2]=0,e[(C+e[i+4>>2]|0)+7544>>2]=0,m=e[i+4>>2],e[(m+(g<<2)|0)+6768>>2]=0,g=g+1|0,g>>>0>2]+24>>2];);e[m+320>>2]=0,e[e[i+4>>2]+7604>>2]=0,e[e[i+4>>2]+324>>2]=0,e[e[i+4>>2]+7608>>2]=0,g=e[i+4>>2],e[g+6800>>2]=0,e[g+328>>2]=0,e[e[i+4>>2]+7612>>2]=0,e[e[i+4>>2]+332>>2]=0,e[e[i+4>>2]+7616>>2]=0,g=e[i+4>>2],e[g+7620>>2]=0,e[g+7624>>2]=0,e[g+6848>>2]=0,e[g+6852>>2]=0,e[g+6804>>2]=0,C=e[i>>2],E=e[C+36>>2],C=e[C+32>>2],e[g+7052>>2]=0,e[g+7056>>2]=0,e[g+6864>>2]=0,m=g,B=+(C>>>0)*.4/+(E>>>0)+.5;t:{if(B<4294967296&B>=0){C=~~B>>>0;break t}C=0}e[m+6860>>2]=C||1,_m(g+7156|0),m=e[i+4>>2],e[m+7244>>2]=12,e[m+7240>>2]=13,e[m+7236>>2]=12,e[m+7228>>2]=14,e[m+7224>>2]=15,e[m+7220>>2]=16,e[m+7232>>2]=17,v=e[i>>2],e[v>>2]=0,e[m+7260>>2]=h;t:{n:{o:{if(h){if(!Ww(v+632|0))break o;v=e[i>>2],m=e[i+4>>2]}if(g=i+4|0,e[m+7276>>2]=n,e[m+7264>>2]=o,e[m+7288>>2]=l,e[m+7280>>2]=f,e[m+7272>>2]=c,e[m+7268>>2]=a,o=e[v+36>>2],ze[m>>2]>>0){a=o+5|0;r:{i:{a:{if(e[v+24>>2])for(n=0;;){if(f=n<<2,c=f+e[g>>2]|0,l=fi(a,c+7328|0,c+4|0),c=e[(f+e[g>>2]|0)+4>>2],e[c>>2]=0,e[c+4>>2]=0,e[c+8>>2]=0,e[c+12>>2]=0,c=(f+e[g>>2]|0)+4|0,e[c>>2]=e[c>>2]+16,!l)break a;if(n=n+1|0,!(n>>>0>2]+24>>2]))break}if(n=e[g>>2],c=fi(a,n+7360|0,n+36|0),n=e[e[g>>2]+36>>2],e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,e[n+12>>2]=0,n=e[g>>2],e[n+36>>2]=e[n+36>>2]+16,c?(n=e[g>>2],a=fi(a,n+7364|0,n+40|0),n=e[e[g>>2]+40>>2],e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,e[n+12>>2]=0,n=e[g>>2]+40|0,e[n>>2]=e[n>>2]+16,n=(a|0)!=0):n=(c|0)!=0,!n)break a;if(a=e[i>>2],e[a+556>>2]){if(n=e[g>>2],e[a+40>>2])for(m=0;;){if(n=(m<<2)+n|0,!fi(o,n+7408|0,n+84|0))break a;if(n=e[i+4>>2],m=m+1|0,!(m>>>0>2]+40>>2]))break}if(!fi(o,n+7536|0,n+212|0))break a}for(l=0,v=1,f=0;;){if(f>>>0>2]+24>>2]){for(m=0,n=1,a=0;;){if(m&1)break a;if(a=(e[g>>2]+(f<<3)|0)+(a<<2)|0,c=fi(o,a+7540|0,a+256|0),h=n&(c|0)!=0,m=!c,a=1,n=0,!h)break}if(f=f+1|0,c)continue;break a}break}for(h=1;;){if(m=0,n=1,a=0,!h)break a;for(;;){if(m&1)break a;if(a=(e[g>>2]+(l<<3)|0)+(a<<2)|0,c=fi(o,a+7604|0,a+320|0),f=n&(c|0)!=0,m=!c,a=1,n=0,!f)break}if(h=(c|0)!=0,n=v&h,l=1,v=0,!n)break}if(!c)break a;if(a=o<<1,n=e[i+4>>2],n=gw(a,n+7620|0,n+6848|0),m=e[i>>2],c=e[m+572>>2],!c|!n)break i;if(n=e[g>>2],fi(a,n+7624|0,n+6852|0))break r}m=e[i>>2];break t}if(c|!n)break t}m=e[g>>2];r:{if((o|0)==e[m>>2]||(n=e[i>>2],!e[n+556>>2]|!e[n+40>>2]))break r;for(m=0;;){i:{a:{s:{l:{u:{f:{c:{d:{p:{h:{m:{g:{b:{v:{k:{y:{_:{w:{A:switch(n=(m<<4)+n|0,e[n+44>>2]){case 16:break s;case 15:break l;case 14:break u;case 13:break f;case 12:break c;case 11:break d;case 10:break p;case 9:break h;case 8:break m;case 7:break g;case 6:break b;case 5:break v;case 4:break k;case 3:break y;case 2:break _;case 1:break w;case 0:break A;default:break a}Xw(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}qw(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}Zw(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}Jw(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}$w(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}eA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}tA(e[(e[g>>2]+(m<<2)|0)+84>>2],o,Ze[n+48>>2]);break i}nA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}jm(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}rA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}oA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}iA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}aA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}sA(e[(e[g>>2]+(m<<2)|0)+84>>2],o,Ze[n+48>>2]);break i}lA(e[(e[g>>2]+(m<<2)|0)+84>>2],o,Ze[n+48>>2],Ze[n+52>>2],Ze[n+56>>2]);break i}cA(e[(e[g>>2]+(m<<2)|0)+84>>2],o,Ze[n+48>>2],Ze[n+52>>2],Ze[n+56>>2]);break i}uA(e[(e[g>>2]+(m<<2)|0)+84>>2],o);break i}jm(e[(e[g>>2]+(m<<2)|0)+84>>2],o)}if(m=m+1|0,n=e[i>>2],!(m>>>0>2]))break}m=e[g>>2]}e[m>>2]=o}if(o=Ow(e[m+6856>>2]),a=e[i>>2],!o){e[a>>2]=8,m=1;break e}if(e[a+4>>2]){m=1,n=e[g>>2],o=e[a+36>>2]+1|0,e[n+11796>>2]=o;r:{if(!e[a+24>>2])break r;if(o=uu(4,o),e[e[i+4>>2]+11764>>2]=o,a=e[i>>2],o)for(;;){if(n=e[g>>2],m>>>0>=ze[a+24>>2])break r;if(o=uu(4,e[n+11796>>2]),e[(e[i+4>>2]+(m<<2)|0)+11764>>2]=o,m=m+1|0,a=e[i>>2],!o)break}e[a>>2]=8,m=1;break e}e[n+11800>>2]=0;r:{if(n=e[n+11752>>2],n||(n=Am(),e[e[g>>2]+11752>>2]=n,n))break r;e[e[i>>2]>>2]=3,m=1;break e}if(o=xm(n,18,0,0,0,0,19,20,21,i),a=e[i>>2],o)break n;n=!e[a+4>>2]}else n=1;if(o=e[g>>2],e[o+7312>>2]=0,e[o+7316>>2]=0,e[o+7292>>2]=0,c=o+11816|0,e[c>>2]=0,e[c+4>>2]=0,c=o+11824|0,e[c>>2]=0,e[c+4>>2]=0,c=o+11832|0,e[c>>2]=0,e[c+4>>2]=0,e[o+11840>>2]=0,e[a+624>>2]=0,e[a+628>>2]=0,e[a+616>>2]=0,e[a+620>>2]=0,e[a+608>>2]=0,e[a+612>>2]=0,n||(e[o+11756>>2]=0),!ht(e[o+6856>>2],e[1354],e[1355])){e[e[i>>2]>>2]=7,m=1;break e}if(m=1,!Ml(i,0,0))break e;if(o=e[i+4>>2],n=e[i>>2],e[n+4>>2]&&(e[o+11756>>2]=1),e[o+6872>>2]=0,e[o+6876>>2]=0,e[o+6880>>2]=34,e[o+6888>>2]=e[n+36>>2],e[e[i+4>>2]+6892>>2]=e[e[i>>2]+36>>2],e[e[i+4>>2]+6896>>2]=0,e[e[i+4>>2]+6900>>2]=0,e[e[i+4>>2]+6904>>2]=e[e[i>>2]+32>>2],e[e[i+4>>2]+6908>>2]=e[e[i>>2]+24>>2],e[e[i+4>>2]+6912>>2]=e[e[i>>2]+28>>2],o=e[i>>2],n=e[o+596>>2],a=e[i+4>>2]+6920|0,e[a>>2]=e[o+592>>2],e[a+4>>2]=n,o=e[i+4>>2],n=o+6936|0,e[n>>2]=0,e[n+4>>2]=0,o=o+6928|0,e[o>>2]=0,e[o+4>>2]=0,e[e[i>>2]+12>>2]&&gm(e[g>>2]+7060|0),o=e[g>>2],!jd(o+6872|0,e[o+6856>>2])){e[e[i>>2]>>2]=7;break e}if(!Ml(i,0,0))break e;if(e[e[g>>2]+6896>>2]=-1<>2]+6920|0,e[o>>2]=0,e[o+4>>2]=0,!A){if(e[T>>2]=4,n=e[e[i>>2]+604>>2],o=T,e[o+24>>2]=0,e[o+28>>2]=0,e[o+16>>2]=0,e[o+20>>2]=0,e[o+8>>2]=8,e[o+4>>2]=!n,!jd(o,e[e[i+4>>2]+6856>>2])){e[e[i>>2]>>2]=7;break e}if(!Ml(i,0,0))break e}r:{if(a=e[i>>2],c=e[a+604>>2],!c)break r;for(n=0;;){if(o=e[e[a+600>>2]+(n<<2)>>2],e[o+4>>2]=(c+-1|0)==(n|0),!jd(o,e[e[g>>2]+6856>>2])){e[e[i>>2]>>2]=7;break e}if(Ml(i,0,0)){if(n=n+1|0,a=e[i>>2],c=e[a+604>>2],n>>>0>=c>>>0)break r;continue}break}break e}r:{if(o=e[g>>2],n=e[o+7272>>2],!n||(o=Le[n](i,a+624|0,e[o+7288>>2])|0,a=e[i>>2],(o|0)!=1))break r;e[a>>2]=5;break e}if(m=0,!e[a+4>>2])break e;e[e[g>>2]+11756>>2]=2;break e}e[e[i>>2]>>2]=2,m=1;break e}e[a>>2]=3,m=1;break e}e[m>>2]=8,m=1}return be=T+176|0,m}function xA(i,o,n,a,c,f,l){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0;var h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0;A=1<>>0>1?A:1,g=0-a|0,C=n+a>>>f|0,m=C-a|0;e:{if(l+4>>>0<(Qt(C)^-32)+33>>>0){for(l=0;;){if(a=0,g=g+C|0,h>>>0>>0){for(;n=e[(h<<2)+i>>2],v=n>>31,a=(v^n+v)+a|0,h=h+1|0,h>>>0>>0;);h=m}if(n=(l<<3)+o|0,e[n>>2]=a,e[n+4>>2]=0,m=m+C|0,l=l+1|0,(I|0)==(l|0))break}break e}for(n=0;;){if(E=0,a=0,g=g+C|0,h>>>0>>0){for(;l=e[(h<<2)+i>>2],v=l>>31,v=v^l+v,l=v+E|0,l>>>0>>0&&(a=a+1|0),E=l,h=h+1|0,h>>>0>>0;);h=m}if(l=(n<<3)+o|0,e[l>>2]=E,e[l+4>>2]=a,m=m+C|0,n=n+1|0,(I|0)==(n|0))break}}if((f|0)>(c|0))for(h=0,i=A;;){if(f=f+-1|0,g=0,i=i>>>1|0,i)for(;a=(h<<3)+o|0,n=e[a+8>>2],m=e[a+12>>2]+e[a+4>>2]|0,a=e[a>>2],n=a+n|0,n>>>0>>0&&(m=m+1|0),l=(A<<3)+o|0,e[l>>2]=n,e[l+4>>2]=m,h=h+2|0,A=A+1|0,g=g+1|0,(g|0)!=(i|0););if(!((f|0)>(c|0)))break}}function SA(i,o,n,a){i=i|0,o=o|0,n=n|0,a=a|0;var c=0,f=0;return f=e[a+4>>2],e[f+11760>>2]?(e[n>>2]=4,i=H[5409]|H[5410]<<8|(H[5411]<<16|H[5412]<<24),K[o|0]=i,K[o+1|0]=i>>>8,K[o+2|0]=i>>>16,K[o+3|0]=i>>>24,e[e[a+4>>2]+11760>>2]=0,0):(i=e[f+11812>>2],i?(c=e[n>>2],i>>>0>>0&&(e[n>>2]=i,c=i),gn(o,e[f+11804>>2],c),i=e[a+4>>2],o=i+11804|0,a=o,c=e[o>>2],o=e[n>>2],e[a>>2]=c+o,i=i+11812|0,e[i>>2]=e[i>>2]-o,0):2)}function EA(i,o,n,a){i=i|0,o=o|0,n=n|0,a=a|0;var c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0;if(h=e[o>>2],f=e[a+4>>2],i=e[o+8>>2],i){for(c=h<<2;;){if(g=l<<2,m=e[g+n>>2],v=e[(f+g|0)+11764>>2],cu(m,v,c)){c=0;e:{if(h)for(i=0;;){if(n=i<<2,g=e[n+m>>2],n=e[n+v>>2],(g|0)!=(n|0)){c=i;break e}if(i=i+1|0,(h|0)==(i|0))break}n=0,g=0}return m=e[o+28>>2],i=c,A=i+e[o+24>>2]|0,A>>>0>>0&&(m=m+1|0),v=f+11816|0,e[v>>2]=A,e[v+4>>2]=m,i=e[o+28>>2],o=e[o+24>>2],e[f+11840>>2]=g,e[f+11836>>2]=n,e[f+11832>>2]=c,e[f+11828>>2]=l,C=f+11824|0,E=Jm(o,i,h),e[C>>2]=E,e[e[a>>2]>>2]=4,1}if(l=l+1|0,(i|0)==(l|0))break}n=f+11800|0,o=e[n>>2]-h|0,e[n>>2]=o;e:{if(!i||(n=e[f+11764>>2],c=n,n=h<<2,Qo(c,c+n|0,o<<2),l=1,(i|0)==1))break e;for(;o=e[a+4>>2],c=e[(o+(l<<2)|0)+11764>>2],Qo(c,n+c|0,e[o+11800>>2]<<2),l=l+1|0,(i|0)!=(l|0););}return 0}return i=f+11800|0,e[i>>2]=e[i>>2]-h,0}function PA(i,o,n){}function MA(i,o,n){n=n|0,e[e[n>>2]>>2]=3}function Ml(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0;f=be-16|0,be=f,c=Dd(e[e[i+4>>2]+6856>>2],f+4|0,f),a=e[i>>2];e:{t:{if(!c){e[a>>2]=8;break t}n:{if(!e[a+4>>2])break n;if(a=e[i+4>>2],e[a+11804>>2]=e[f+4>>2],e[a+11812>>2]=e[f>>2],!e[a+11756>>2]){e[a+11760>>2]=1;break n}if(Pm(e[a+11752>>2]))break n;if(Ld(e[e[i+4>>2]+6856>>2]),i=e[i>>2],e[i>>2]==4)break e;e[i>>2]=3;break e}C=e[f>>2],I=e[f+4>>2],e[f+8>>2]=0,e[f+12>>2]=0;n:{o:{if(a=e[i+4>>2],c=e[a+7272>>2],!c||(Le[c](i,f+8|0,e[a+7288>>2])|0)!=1)break o;break n}o:{if(o)break o;r:switch(H[I|0]&127){case 0:a=e[f+12>>2],c=e[i>>2],e[c+608>>2]=e[f+8>>2],e[c+612>>2]=a;break o;case 3:break r;default:break o}if(a=e[i>>2],e[a+616>>2]|e[a+620>>2])break o;c=e[f+12>>2],e[a+616>>2]=e[f+8>>2],e[a+620>>2]=c}l=e[i+4>>2],h=e[l+7048>>2];o:{if(!h||(g=e[i>>2],c=g,a=e[c+628>>2],T=e[c+624>>2],!(a|T))||(B=e[h>>2],!B)||(v=e[l+7292>>2],v>>>0>=B>>>0))break o;for(E=e[l+7316>>2],c=E,G=e[l+7312>>2],te=e[g+36>>2],g=te,m=G+g|0,m>>>0>>0&&(c=c+1|0),c=c+-1|0,A=c+1|0,g=c,c=m+-1|0,g=(c|0)!=-1?A:g,ae=e[h+4>>2];;){if(h=ae+ie(v,24)|0,A=e[h>>2],m=e[h+4>>2],(g|0)==(m|0)&A>>>0>c>>>0|m>>>0>g>>>0)break o;if((m|0)==(E|0)&A>>>0>=G>>>0|m>>>0>E>>>0&&(e[h>>2]=G,e[h+4>>2]=E,m=e[f+8>>2],A=e[f+12>>2],e[h+16>>2]=te,e[h+8>>2]=m-T,e[h+12>>2]=A-(a+(m>>>0>>0)|0)),v=v+1|0,e[l+7292>>2]=v,(v|0)==(B|0))break}}o:{if(e[l+7260>>2]){n=Uw(e[i>>2]+632|0,I,C,o,e[l+7056>>2],n,e[l+7276>>2],i,e[l+7288>>2]);break o}n=Le[e[l+7276>>2]](i,I,C,o,e[l+7056>>2],e[l+7288>>2])|0}if(!n){if(n=e[i+4>>2],a=n,g=a,c=e[a+7308>>2],l=C+e[a+7304>>2]|0,l>>>0>>0&&(c=c+1|0),e[g+7304>>2]=l,e[a+7308>>2]=c,a=e[n+7316>>2],c=e[n+7312>>2]+o|0,c>>>0>>0&&(a=a+1|0),e[n+7312>>2]=c,e[n+7316>>2]=a,v=1,c=n,a=e[n+7320>>2],n=e[n+7056>>2]+1|0,e[c+7320>>2]=a>>>0>n>>>0?a:n,Ld(e[e[i+4>>2]+6856>>2]),!o)break e;o=e[i+4>>2]+6896|0,n=e[o>>2],c=o,o=e[f>>2],e[c>>2]=o>>>0>>0?o:n,n=e[i+4>>2]+6900|0,i=e[n>>2],e[n>>2]=o>>>0>i>>>0?o:i;break e}}e[e[i>>2]>>2]=5,Ld(e[e[i+4>>2]+6856>>2]),e[e[i>>2]>>2]=5}v=0}return be=f+16|0,v}function NA(i,o,n,a,c,f,l){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0,Xm(i,o,n,a,c,f,l,1)|0}function Ud(i,o,n,a,c,f,l,h,g,m,v){var A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,gt=0,yt=0,At=0,Pt=0,It=ue(0),Ft=0,Bt=0,Ut=0,Gt=0,sn=0,Bn=0,cr=ue(0),Vr=0,Wr=0,$r=0,di=0,cs=0,eg=0;I=be-576|0,be=I,Be=e[(ze[e[i>>2]+28>>2]>16?5644:5640)>>2],C=e[a>>2];e:{t:{if(e[e[i+4>>2]+7256>>2]&&(A=-1,C>>>0>3))break t;if(B=e[l>>2],e[B+4>>2]=f,e[B>>2]=1,A=e[B+288>>2]+(e[1416]+(e[1415]+(e[1414]+ie(c,C)|0)|0)|0)|0,C=e[a>>2],C>>>0<4)break e}E=e[i+4>>2],B=C+-4|0;t:{if(((Qt(B|1)^31)+c|0)+4>>>0<=32){E=Le[e[E+7224>>2]](f+16|0,B,I+416|0)|0;break t}E=Le[e[E+7228>>2]](f+16|0,B,I+416|0)|0}t:{n:{o:{r:{if(T=e[i+4>>2],e[T+7248>>2]|Ze[I+420>>2]!=ue(0))break r;if(C=1,G=e[f>>2],B=e[a>>2],B>>>0<=1)break o;for(;;){if((G|0)!=e[(C<<2)+f>>2])break r;if(C=C+1|0,!(C>>>0>>0))break}break o}if(C=e[i>>2],!e[T+7252>>2]){B=A;break n}if(B=-1,(A|0)!=-1){B=A;break t}if(!e[C+556>>2])break n;B=A;break t}i=e[l+4>>2],e[i+4>>2]=G,e[i>>2]=0,i=e[i+288>>2]+(e[1416]+(e[1415]+(e[1414]+c|0)|0)|0)|0,ae=i>>>0>>0,A=ae?i:A;break e}if(A=e[C+568>>2],te=A?0:E,E=A?4:E,A=e[a>>2],at=E>>>0>>0?E:A+-1|0,te>>>0>at>>>0)break t;for(yt=Be+-1|0,At=e[1416],st=e[1415],Pt=e[1414],cr=ue(c>>>0);;){if(C=te<<2,It=Ze[C+(I+416|0)>>2],!(It>=cr)){gt=!ae,G=gt<<2,Ft=e[G+h>>2],ye=e[l+G>>2],Ee=e[e[i>>2]+572>>2],A=e[i+4>>2],E=e[A+6852>>2],T=e[A+6848>>2],A=f+C|0,C=e[a>>2]-te|0,G=e[g+G>>2],kw(A,C,te,G),e[ye+36>>2]=G,e[ye+12>>2]=Ft,e[ye>>2]=2,e[ye+4>>2]=0,Bt=It>ue(0),je=e[i+4>>2],Se=te,Qe=+It+.5;n:{if(Qe<4294967296&Qe>=0){A=~~Qe>>>0;break n}A=0}if(A=Bt?A+1|0:1,T=qm(je,G,T,E,C,Se,A>>>0>>0?A:yt,Be,o,n,c,Ee,ye+4|0),e[ye+16>>2]=te,te)for(E=ye+20|0,A=0;C=A<<2,e[C+E>>2]=e[f+C>>2],A=A+1|0,(te|0)!=(A|0););A=e[ye+288>>2]+(At+(st+(Pt+(T+ie(c,te)|0)|0)|0)|0)|0,C=A>>>0>>0,ae=C?gt:ae,B=C?A:B}if(te=te+1|0,!(te>>>0<=at>>>0))break}C=e[i>>2]}if(E=e[C+556>>2],!E){A=B;break e}if(A=e[a>>2],E=E>>>0>>0?E:A+-1|0,e[I+12>>2]=E,!E){A=B;break e}if(!e[C+40>>2]){A=B;break e}for(sn=33-c|0,Vr=Be+-1|0,Wr=e[1413],$r=e[1412],di=e[1416],ye=e[1415],cs=e[1414],Qe=+(c>>>0),at=c>>>0<18,yt=c>>>0>16,At=c>>>0>17;;){C=e[i+4>>2],ow(f,e[(C+(Ut<<2)|0)+84>>2],e[C+212>>2],A),A=e[i+4>>2],Le[e[A+7232>>2]](e[A+212>>2],e[a>>2],e[I+12>>2]+1|0,I+272|0);t:{if(Ze[I+272>>2]==ue(0)||(aw(I+272|0,I+12|0,e[i+4>>2]+7628|0,I+16|0),T=1,C=e[I+12>>2],G=e[i>>2],e[G+568>>2]||(A=I,C=pw(A+16|0,C,e[a>>2],(e[G+564>>2]?5:e[G+560>>2])+c|0),e[A+12>>2]=C,T=C),A=e[a>>2],C>>>0>=A>>>0&&(C=A+-1|0,e[I+12>>2]=C),T>>>0>C>>>0))break t;for(;;){n:{if(st=T+-1|0,Te=dw(it[(I+16|0)+(st<<3)>>3],A-T|0),Te>=Qe)break n;A=Te>0,Te=Te+.5;o:{if(Te<4294967296&Te>=0){E=~~Te>>>0;break o}E=0}E=A?E+1|0:1,A=E>>>0>>0,C=e[i>>2];o:{if(e[C+564>>2]){if(Se=5,je=15,At||(G=(Qt(T)^-32)+sn|0,G>>>0>14))break o;je=G>>>0>5?G:5;break o}je=e[C+560>>2],Se=je}for(Pt=A?E:Vr,Gt=(T<<2)+f|0,A=Qt(T),gt=A^31,Bn=(A^-32)+sn|0;;){if(Ee=e[a>>2],E=!ae,A=E<<2,Bt=e[A+h>>2],he=e[l+A>>2],Ye=e[g+A>>2],Ft=e[C+572>>2],C=e[i+4>>2],te=e[C+6852>>2],G=e[C+6848>>2],A=0,eg=ae,ae=(C+(st<<7)|0)+7628|0,C=at?Bn>>>0>Se>>>0?Se:Bn:Se,!sw(ae,T,C,I+448|0,I+444|0)){Ee=Ee-T|0,ae=c+C|0;o:{if(ae+gt>>>0<=32){if(A=e[i+4>>2],!(C>>>0>16|yt)){Le[e[A+7244>>2]](Gt,Ee,I+448|0,T,e[I+444>>2],Ye);break o}Le[e[A+7236>>2]](Gt,Ee,I+448|0,T,e[I+444>>2],Ye);break o}Le[e[e[i+4>>2]+7240>>2]](Gt,Ee,I+448|0,T,e[I+444>>2],Ye)}if(e[he>>2]=3,e[he+4>>2]=0,e[he+284>>2]=Ye,e[he+12>>2]=Bt,te=qm(e[i+4>>2],Ye,G,te,Ee,T,Pt,Be,o,n,c,Ft,he+4|0),e[he+20>>2]=C,e[he+16>>2]=T,e[he+24>>2]=e[I+444>>2],gn(he+28|0,I+448|0,128),A=0,T)for(;G=A<<2,e[(G+he|0)+156>>2]=e[f+G>>2],A=A+1|0,(T|0)!=(A|0););A=((e[he+288>>2]+((((te+ie(T,ae)|0)+cs|0)+ye|0)+di|0)|0)+$r|0)+Wr|0}if(C=(A|0)!=0&A>>>0>>0,ae=C?E:eg,B=C?A:B,Se=Se+1|0,Se>>>0>je>>>0)break n;C=e[i>>2]}}if(T=T+1|0,T>>>0>ze[I+12>>2])break t;A=e[a>>2]}}if(Ut=Ut+1|0,Ut>>>0>2]+40>>2]){A=e[a>>2];continue}break}A=B}(A|0)==-1&&(i=e[a>>2],o=e[(ae<<2)+l>>2],e[o+4>>2]=f,e[o>>2]=1,A=e[o+288>>2]+(e[1416]+(e[1415]+(e[1414]+ie(i,c)|0)|0)|0)|0),e[m>>2]=ae,e[v>>2]=A,be=I+576|0}function Hd(i,o,n,a,c){var f=0;f=1;e:{t:{n:switch(e[a>>2]){case 0:if(fA(a+4|0,n,e[a+288>>2],c))break e;break t;case 2:if(dA(a+4|0,o-e[a+16>>2]|0,n,e[a+288>>2],c))break e;break t;case 3:if(pA(a+4|0,o-e[a+16>>2]|0,n,e[a+288>>2],c))break e;break t;case 1:break n;default:break e}if(hA(a+4|0,o,n,e[a+288>>2],c))break e}e[e[i>>2]>>2]=7,f=0}return f}function IA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+632>>2]=o,i=1):i=0,i|0}function RA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+4>>2]=o,i=1):i=0,i|0}function TA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+24>>2]=o,i=1):i=0,i|0}function FA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+28>>2]=o,i=1):i=0,i|0}function LA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+32>>2]=o,i=1):i=0,i|0}function DA(i,o){i=i|0,o=o|0;var n=0,a=0,c=0;return a=e[i>>2],e[a>>2]==1?(n=ie(o>>>0<8?o:8,44),o=n+11184|0,c=e[o+4>>2],e[a+16>>2]=e[o>>2],e[a+20>>2]=c,a=Wd(i,e[o+40>>2]),o=0,i=e[i>>2],e[i>>2]==1?(o=n+11184|0,n=e[o+32>>2],e[i+576>>2]=e[o+28>>2],e[i+580>>2]=n,e[i+568>>2]=e[o+24>>2],e[i+564>>2]=e[o+16>>2],n=e[o+12>>2],e[i+556>>2]=e[o+8>>2],e[i+560>>2]=n,o=a&1,i=1):i=0,i=i&o):i=0,i|0}function OA(i,o){return i=i|0,o=o|0,i=e[i>>2],e[i>>2]==1?(e[i+36>>2]=o,i=1):i=0,i|0}function BA(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=0;return i=e[i>>2],e[i>>2]==1?(l=n,h=i,g=o,c=e[1363],a=c&31,32<=(c&63)>>>0?(c=-1<>>32-a|-1<>>0>o>>>0|a>>>0>n>>>0,e[h+592>>2]=o?g:f,e[i+596>>2]=o?l:a,i=1):i=0,i}function jA(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0;if(a=e[i>>2],e[a>>2]==1){if(c=e[a+600>>2],c&&(Ne(c),a=e[i>>2],e[a+600>>2]=0,e[a+604>>2]=0),n=o?n:0,n){if(a=uu(4,n),!a)return 0;o=gn(a,o,n<<2),a=e[i>>2],e[a+604>>2]=n,e[a+600>>2]=o}i=a+632|0,n>>>e[1886]?i=0:(e[i+4>>2]=n,i=1),i=(i|0)!=0}else i=0;return i|0}function zA(i){return i=i|0,e[e[i>>2]+4>>2]?Rd(e[e[i+4>>2]+11752>>2])|0:9}function VA(i){return i=i|0,e[e[i>>2]+4>>2]}function WA(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0,G=0,te=0;f=e[i>>2],A=e[f+36>>2],B=A+1|0,c=e[i+4>>2],v=e[f+24>>2],E=A<<2;e:{for(;;){if(a=B-e[c+7052>>2]|0,l=n-h|0,l=a>>>0>>0?a:l,e[f+4>>2]){if(v)for(f=l<<2,a=0;g=a<<2,gn(e[(g+c|0)+11764>>2]+(e[c+11800>>2]<<2)|0,e[o+g>>2]+(h<<2)|0,f),a=a+1|0,(v|0)!=(a|0););c=c+11800|0,e[c>>2]=e[c>>2]+l}if(v)for(f=l<<2,c=0,a=0;;){if(g=a<<2,C=e[g+o>>2],!C)break e;if(m=g,g=e[i+4>>2],gn(e[(m+g|0)+4>>2]+(e[g+7052>>2]<<2)|0,C+(h<<2)|0,f),a=a+1|0,(v|0)==(a|0))break}f=e[i>>2];t:{if(e[f+16>>2]){if(c=e[i+4>>2],h>>>0>=n>>>0||(a=e[c+7052>>2],a>>>0>A>>>0))break t;for(g=e[c+40>>2],C=e[c+36>>2],G=e[o+4>>2],te=e[o>>2];;){if(I=a<<2,m=h<<2,T=m+te|0,m=m+G|0,e[I+g>>2]=e[T>>2]-e[m>>2],e[C+I>>2]=e[m>>2]+e[T>>2]>>1,h=h+1|0,h>>>0>=n>>>0)break t;if(a=a+1|0,!(a>>>0<=A>>>0))break}break t}h=h+l|0,c=e[i+4>>2]}if(a=e[c+7052>>2]+l|0,e[c+7052>>2]=a,a>>>0>A>>>0){if(c=0,!du(i,0,0))break e;if(v)for(c=e[i+4>>2],a=0;l=e[(c+(a<<2)|0)+4>>2],e[l>>2]=e[l+E>>2],a=a+1|0,(v|0)!=(a|0););c=e[i+4>>2],f=e[i>>2],e[f+16>>2]&&(a=e[c+36>>2],e[a>>2]=e[a+E>>2],a=e[c+40>>2],e[a>>2]=e[a+E>>2]),e[c+7052>>2]=1}if(!(h>>>0>>0))break}c=1}return c|0}function UA(i,o,n){i=i|0,o=o|0,n=n|0;var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0,C=0,E=0,I=0,T=0,B=0;a=e[i>>2],m=e[a+36>>2],B=m+1|0;e:{t:{if(v=e[a+24>>2],!(!e[a+16>>2]|(v|0)!=2))for(;;){if(c=e[i+4>>2],e[a+4>>2]){a=e[c+11800>>2],f=B-e[c+7052>>2]|0,l=n-h|0,g=f>>>0>>0?f:l;n:{if(!g)break n;if(!v){a=a+g|0;break n}for(f=h<<1,A=e[c+11768>>2],T=e[c+11764>>2],l=0;E=a<<2,I=f<<2,e[E+T>>2]=e[I+o>>2],e[A+E>>2]=e[(I|4)+o>>2],a=a+1|0,f=f+2|0,l=l+1|0,(g|0)!=(l|0););}e[c+11800>>2]=a}f=h>>>0>>0,a=e[c+7052>>2];n:{if(a>>>0>m>>>0|h>>>0>=n>>>0)break n;for(A=e[c+40>>2],T=e[c+8>>2],E=e[c+36>>2],I=e[c+4>>2];;){if(f=a<<2,g=(C<<2)+o|0,l=e[g>>2],e[f+I>>2]=l,g=e[g+4>>2],e[f+T>>2]=g,e[f+A>>2]=l-g,e[f+E>>2]=l+g>>1,a=a+1|0,C=C+2|0,h=h+1|0,f=h>>>0>>0,h>>>0>=n>>>0)break n;if(!(a>>>0<=m>>>0))break}}if(e[c+7052>>2]=a,a>>>0>m>>>0){if(a=0,!du(i,0,0))break e;a=e[i+4>>2],l=e[a+4>>2],c=l,l=m<<2,e[c>>2]=e[c+l>>2],c=e[a+8>>2],e[c>>2]=e[c+l>>2],c=e[a+36>>2],e[c>>2]=e[c+l>>2],c=e[a+40>>2],e[c>>2]=e[c+l>>2],e[a+7052>>2]=1}if(!f)break t;a=e[i>>2]}for(;;){if(h=e[i+4>>2],e[a+4>>2]){l=e[h+11800>>2],a=B-e[h+7052>>2]|0,f=n-c|0,g=a>>>0>>0?a:f;n:{if(!g)break n;if(!v){l=l+g|0;break n}for(f=ie(c,v),A=0;;){for(a=0;e[e[(h+(a<<2)|0)+11764>>2]+(l<<2)>>2]=e[(f<<2)+o>>2],f=f+1|0,a=a+1|0,(v|0)!=(a|0););if(l=l+1|0,A=A+1|0,(g|0)==(A|0))break}}e[h+11800>>2]=l}l=c>>>0>>0,f=e[h+7052>>2];n:{if(f>>>0>m>>>0|c>>>0>=n>>>0)break n;if(v)for(;;){for(a=0;e[e[(h+(a<<2)|0)+4>>2]+(f<<2)>>2]=e[(C<<2)+o>>2],C=C+1|0,a=a+1|0,(v|0)!=(a|0););if(f=f+1|0,c=c+1|0,l=c>>>0>>0,c>>>0>=n>>>0)break n;if(!(f>>>0<=m>>>0))break n}for(;;){if(f=f+1|0,c=c+1|0,l=c>>>0>>0,c>>>0>=n>>>0)break n;if(!(f>>>0<=m>>>0))break}}if(e[h+7052>>2]=f,f>>>0>m>>>0){if(a=0,!du(i,0,0))break e;if(f=e[i+4>>2],v)for(a=0;h=e[(f+(a<<2)|0)+4>>2],e[h>>2]=e[h+(m<<2)>>2],a=a+1|0,(v|0)!=(a|0););e[f+7052>>2]=1}if(!l)break t;a=e[i>>2]}}a=1}return a|0}function qm(i,o,n,a,c,f,l,h,g,m,v,A,C){var E=0,I=0,T=0,B=0,G=0,te=0,ae=0,he=0,ye=0,Se=0,Ee=0,Te=0,Be=0,je=0,Qe=0,Ye=0,at=0,st=0,gt=0,yt=0,At=0,Pt=0,It=0,Ft=0,Bt=0,Ut=0,Gt=0,sn=0;je=c+f|0,I=B8(m,je,f),Se=I>>>0>g>>>0?g:I,Le[e[i+7220>>2]](o,n,c,f,Se,I,v);e:{if(!A)break e;if(v=0,g=0,(I|0)>=0)for(g=1<>>0>1?g:1,B=je>>>I|0;;){G=0,m=E,te=0,Qe=(T<<2)+a|0;t:{n:{if(Ee=T?0:f,ae=B-Ee|0,!ae)break n;for(;ye=G,G=e[(m<<2)+o>>2],G=ye|G>>31^G,m=m+1|0,te=te+1|0,(ae|0)!=(te|0););if(E=(E+B|0)-Ee|0,!G)break n;m=(Qt(G)^31)+2|0;break t}m=1}if(e[Qe>>2]=m,T=T+1|0,(he|0)==(T|0))break}if((I|0)<=(Se|0))break e;for(o=I;;){for(o=o+-1|0,m=0;E=(v<<2)+a|0,T=e[E>>2],E=e[E+4>>2],e[(g<<2)+a>>2]=T>>>0>E>>>0?T:E,g=g+1|0,v=v+2|0,m=m+1|0,!(m>>>o););if(!((o|0)>(Se|0)))break}}e:{if((I|0)<(Se|0)){e[C+4>>2]=0,n=6;break e}for(Ye=e[1407],sn=Ye+(ie(l+1|0,c)-(c>>>1|0)|0)|0,It=h+-1|0,Ft=e[1409]+e[1408]|0,Ee=e[1406]+e[1405]|0,Qe=l+-1|0;;){t:{he=I,Bt=!at,o=ie(Bt,12)+i|0,g=o+11724|0,Md(g,I>>>0>6?I:6),Ut=(st<<2)+a|0,Be=(st<<3)+n|0,Gt=e[o+11728>>2],gt=e[g>>2];n:{if(I){if(yt=je>>>he|0,yt>>>0<=f>>>0)break t;if(te=0,At=0,ye=Ee,!A)for(;;){G=yt-(te?0:f)|0,o=Be+(te<<3)|0,E=e[o+4>>2],B=e[o>>2];o:{if(!E&B>>>0>=268435457|E>>>0>0){o=G,v=0,g=0;r:{if((E|0)==16777216&B>>>0>0|E>>>0>16777216){I=o,m=0;break r}if(I=o,m=0,T=o>>>25|0,ae=o<<7,(E|0)==(T|0)&ae>>>0>=B>>>0|T>>>0>E>>>0)break r;for(;g=g+8|0,T=v<<15|o>>>17,ae=o<<15,m=v<<8|o>>>24,I=o<<8,o=I,v=m,!!((E|0)==(T|0)&ae>>>0>>0|T>>>0>>0););}if((m|0)==(E|0)&I>>>0>=B>>>0|m>>>0>E>>>0)break o;for(;g=g+1|0,o=I,T=m<<1|o>>>31,I=o<<1,o=I,m=T,!!((E|0)==(m|0)&o>>>0>>0|m>>>0>>0););break o}if(g=0,v=G,o=B,v<<3>>>0>>0)for(;g=g+4|0,m=v<<7,v=v<<4,m>>>0>>0;);if(v>>>0>=o>>>0)break o;for(;g=g+1|0,v=v<<1,v>>>0>>0;);}if(g=g>>>0>>0?g:It,v=g+-1|0,o=v&31,o=((Ye-(G>>>1|0)|0)+ie(G,g+1|0)|0)+(g?32<=(v&63)>>>0?E>>>o|0:((1<>>o:B<<1)|0,At=(o|0)==-1?At:g,e[gt+(te<<2)>>2]=At,ye=o+ye|0,te=te+1|0,!!(te>>>he))break n}for(;;){G=yt-(te?0:f)|0,o=Be+(te<<3)|0,E=e[o+4>>2],B=e[o>>2];o:{r:{if(!E&B>>>0>=268435457|E>>>0>0){if(o=G,v=0,g=0,(E|0)==16777216&B>>>0>0|E>>>0>16777216||(I=o,m=0,T=o>>>25|0,ae=o<<7,(E|0)==(T|0)&ae>>>0>=B>>>0|T>>>0>E>>>0))break r;for(;g=g+8|0,o=m,v=I,T=o<<15|v>>>17,ae=v<<15,m=o<<8,o=v,m=m|o>>>24,o=o<<8,I=o,v=m,!!((E|0)==(T|0)&ae>>>0>>0|T>>>0>>0););break r}if(g=0,v=G,o=B,v<<3>>>0>>0)for(;g=g+4|0,m=v<<7,v=v<<4,m>>>0>>0;);if(v>>>0>=o>>>0)break o;for(;g=g+1|0,v=v<<1,v>>>0>>0;);break o}if((v|0)==(E|0)&o>>>0>=B>>>0|v>>>0>E>>>0)break o;for(;g=g+1|0,T=v<<1|o>>>31,o=o<<1,v=T,!!((E|0)==(v|0)&o>>>0>>0|v>>>0>>0););}if(m=te<<2,o=e[m+Ut>>2],ae=o,v=ie(o,G)+Ft|0,g=g>>>0>>0?g:It,T=g+-1|0,o=T&31,I=((Ye-(G>>>1|0)|0)+ie(G,g+1|0)|0)+(g?32<=(T&63)>>>0?E>>>o|0:((1<>>o:B<<1)|0,o=v>>>0>I>>>0,e[m+Gt>>2]=o?0:ae,e[m+gt>>2]=o?g:0,ye=(o?I:v)+ye|0,te=te+1|0,!!(te>>>he))break}break n}m=e[Be+4>>2],o=Qe,g=o&31,v=e[Be>>2],g=(l?32<=(o&63)>>>0?m>>>g|0:((1<>>g:v<<1)+sn|0,v=(g|0)==-1?0:l,A&&(m=e[Ut>>2],I=ie(m,c)+Ft|0,o=I>>>0>g>>>0,e[Gt>>2]=o?0:m,v=o?v:0,g=o?g:I),e[gt>>2]=v,ye=g+Ee|0}if(o=Pt+-1>>>0>>0,Te=o?Te:he,at=o?at:Bt,Pt=o?Pt:ye,I=he+-1|0,st=(1<(Se|0))continue}break}e[C+4>>2]=Te,n=Te>>>0>6?Te:6}o=e[C+8>>2],Md(o,n),n=ie(at,12)+i|0,i=1<>2],e[n+11724>>2],a),A&&gn(e[o+4>>2],e[n+11728>>2],a),i=i>>>0>1?i:1,n=e[1410],o=e[o>>2],g=0;e:{for(;;){if(ze[o+(g<<2)>>2]>>0){if(g=g+1|0,(i|0)!=(g|0))continue;break e}break}e[C>>2]=1}return Pt}function HA(){return be|0}function GA(i){i=i|0,be=i}function QA(i){return i=i|0,i=be-i&-16,be=i,i|0}function YA(i){return i=i|0,i3(i|0)|0}function KA(i,o,n){return i=i|0,o=o|0,n=n|0,Le[i](o,n)|0}function XA(i,o){return i=i|0,o=o|0,Le[i](o)|0}function qA(i,o,n,a){return i=i|0,o=o|0,n=n|0,a=a|0,Le[i](o,n,a)|0}function ZA(i,o,n,a,c,f,l){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0,Le[i](o,n,a,c,f,l)}function JA(i,o,n,a,c){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,Le[i](o,n,a,c)|0}function $A(i,o,n,a,c,f,l,h){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,f=f|0,l=l|0,h=h|0,Le[i](o,n,a,c,f,l,h)}function e3(i,o,n,a,c){i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,Le[i](o,n,a,c)}function t3(i,o,n,a){i=i|0,o=o|0,n=n|0,a=a|0,Le[i](o,n,a)}function n3(i,o,n){return i=i|0,o=o|0,n=n|0,BA(i,o,n)|0}function r3(i,o,n,a,c){return i=i|0,o=o|0,n=n|0,a=a|0,c=c|0,i=Le[i](o,n,a,c)|0,v8(ne|0),i|0}function o3(i,o,n,a){var c=0,f=0,l=0,h=0,g=0,m=0;return c=n>>>16|0,f=i>>>16|0,m=ie(c,f),l=n&65535,h=i&65535,g=ie(l,h),f=(g>>>16|0)+ie(f,l)|0,c=(f&65535)+ie(c,h)|0,i=(ie(o,n)+m|0)+ie(i,a)+(f>>>16)+(c>>>16)|0,o=g&65535|c<<16,ne=i,o}function Zm(i,o,n){var a=0,c=0,f=0,l=0,h=0,g=0,m=0,v=0,A=0;e:{t:{n:{o:{r:{i:{a:{s:{l:{if(a=o,a){if(c=n,!c)break l;break s}return o=i,i=(i>>>0)/(n>>>0)|0,ns=o-ie(i,n)|0,rs=0,ne=0,i}if(!i)break a;break i}if(l=c+-1|0,!(l&c))break r;l=(Qt(c)+33|0)-Qt(a)|0,h=0-l|0;break n}return ns=0,i=(a>>>0)/0|0,rs=a-ie(i,0)|0,ne=0,i}if(a=32-Qt(a)|0,a>>>0<31)break o;break t}if(ns=i&l,rs=0,(c|0)==1)break e;return a=Gd(c),n=a&31,32<=(a&63)>>>0?(c=0,i=o>>>n|0):(c=o>>>n|0,i=((1<>>n),ne=c,i}l=a+1|0,h=63-a|0}if(a=o,c=l&63,f=c&31,32<=c>>>0?(c=0,f=a>>>f|0):(c=a>>>f|0,f=((1<>>f),h=h&63,a=h&31,32<=h>>>0?(o=i<>>32-a|o<>>31,m=g,c=c<<1|f>>>31,g=h-(c+(a>>>0>>0)|0)>>31,v=n&g,f=m-v|0,c=c-(m>>>0>>0)|0,o=o<<1|i>>>31,i=A|i<<1,g=g&1,A=g,l=l+-1|0,!!l;);return ns=f,rs=c,ne=o<<1|i>>>31,g|i<<1}ns=i,rs=o,i=0,o=0}return ne=o,i}function Gd(i){return i?31-Qt(i+-1^i)|0:32}function oe(i,o,n,a){return i=o3(i,o,n,a),i}function Jm(i,o,n){return Zm(i,o,n)}function Qd(i,o){return Zm(i,o,588),ne=rs,ns}function Ke(i,o){var n=0,a=0;return n=o&31,a=(-1>>>n&i)<>>i}Le[1]=F8,Le[2]=tw,Le[3]=nw,Le[4]=rw,Le[5]=uw,Le[6]=fw,Le[7]=ww,Le[8]=Lw,Le[9]=Hw,Le[10]=mw,Le[11]=Gw,Le[12]=lw,Le[13]=cw,Le[14]=vw,Le[15]=bw,Le[16]=xA,Le[17]=iw,Le[18]=SA,Le[19]=EA,Le[20]=PA,Le[21]=MA;function $m(){return zt.byteLength/65536|0}function i3(i){i=i|0;var o=$m()|0,n=o+i|0;if(o=0;--sr)dn[48+sr]=52+sr,dn[65+sr]=sr,dn[97+sr]=26+sr;dn[43]=62,dn[47]=63;function St(mt,_n,zt){for(var Cl,Le,K=0,Ht=_n,e=zt.length,H=_n+(e*3>>2)-(zt[e-2]=="=")-(zt[e-1]=="=");K>4,Ht>2),Ht>0]=x;break;case"i8":dt[w>>0]=x;break;case"i16":yn[w>>1]=x;break;case"i32":ut[w>>2]=x;break;case"i64":jr=[x>>>0,(mn=x,+an(mn)>=1?mn>0?(ma(+Zr(mn/4294967296),4294967295)|0)>>>0:~~+Zt((mn-+(~~mn>>>0))/4294967296)>>>0:0)],ut[w>>2]=jr[0],ut[w+4>>2]=jr[1];break;case"float":Nn[w>>2]=x;break;case"double":Hn[w>>3]=x;break;default:kr("invalid type for setValue: "+M)}}function ve(w,x,M){switch(x=x||"i8",x.charAt(x.length-1)==="*"&&(x="i32"),x){case"i1":return dt[w>>0];case"i8":return dt[w>>0];case"i16":return yn[w>>1];case"i32":return ut[w>>2];case"i64":return ut[w>>2];case"float":return Nn[w>>2];case"double":return Hn[w>>3];default:kr("invalid type for getValue: "+x)}return null}var ce,ke=new ge.Table({initial:22,maximum:27,element:"anyfunc"}),Pe=!1;function Ae(w,x){w||kr("Assertion failed: "+x)}function Me(w){var x=d["_"+w];return Ae(x,"Cannot call unknown function "+w+", make sure it is exported"),x}function tt(w,x,M,W,J){var re={string:function(qe){var kt=0;if(qe!=null&&qe!==0){var Jt=(qe.length<<2)+1;kt=kd(Jt),jt(qe,kt,Jt)}return kt},array:function(qe){var kt=kd(qe.length);return Rt(qe,kt),kt}};function se(qe){return x==="string"?fn(qe):x==="boolean"?!!qe:qe}var fe=Me(w),Ce=[],Fe=0;if(W)for(var Oe=0;Oe=W);)++J;if(J-x>16&&w.subarray&&Ge)return Ge.decode(w.subarray(x,J));for(var re="";x>10,56320|Fe&1023)}}return re}function fn(w,x){return w?pt(Et,w,x):""}function nt(w,x,M,W){if(!(W>0))return 0;for(var J=M,re=M+W-1,se=0;se=55296&&fe<=57343){var Ce=w.charCodeAt(++se);fe=65536+((fe&1023)<<10)|Ce&1023}if(fe<=127){if(M>=re)break;x[M++]=fe}else if(fe<=2047){if(M+1>=re)break;x[M++]=192|fe>>6,x[M++]=128|fe&63}else if(fe<=65535){if(M+2>=re)break;x[M++]=224|fe>>12,x[M++]=128|fe>>6&63,x[M++]=128|fe&63}else{if(M+3>=re)break;x[M++]=240|fe>>18,x[M++]=128|fe>>12&63,x[M++]=128|fe>>6&63,x[M++]=128|fe&63}}return x[M]=0,M-J}function jt(w,x,M){return nt(w,Et,x,M)}function hn(w){for(var x=0,M=0;M=55296&&W<=57343&&(W=65536+((W&1023)<<10)|w.charCodeAt(++M)&1023),W<=127?++x:W<=2047?x+=2:W<=65535?x+=3:x+=4}return x}typeof TextDecoder<"u"&&new TextDecoder("utf-16le");function Rt(w,x){dt.set(w,x)}var Wt=65536;function Ct(w,x){return w%x>0&&(w+=x-w%x),w}var xt,dt,Et,yn,ut,Nn,Hn;function Mt(w){xt=w,d.HEAP8=dt=new Int8Array(w),d.HEAP16=yn=new Int16Array(w),d.HEAP32=ut=new Int32Array(w),d.HEAPU8=Et=new Uint8Array(w),d.HEAPU16=new Uint16Array(w),d.HEAPU32=new Uint32Array(w),d.HEAPF32=Nn=new Float32Array(w),d.HEAPF64=Hn=new Float64Array(w)}var ir=5257216,Xn=14176,Xt=d.INITIAL_MEMORY||16777216;d.wasmMemory?ce=d.wasmMemory:ce=new ge.Memory({initial:Xt/Wt,maximum:2147483648/Wt}),ce&&(xt=ce.buffer),Xt=xt.byteLength,Mt(xt),ut[Xn>>2]=ir;function ar(w){for(;w.length>0;){var x=w.shift();if(typeof x=="function"){x(d);continue}var M=x.func;typeof M=="number"?x.arg===void 0?d.dynCall_v(M):d.dynCall_vi(M,x.arg):M(x.arg===void 0?null:x.arg)}}var Br=[],vr=[],De=[],Re=[];function lt(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)Lt(d.preRun.shift());ar(Br)}function Ot(){!d.noFSInit&&!V.init.initialized&&V.init(),ar(vr)}function qt(){V.ignorePermissions=!1,ar(De)}function Ve(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)nn(d.postRun.shift());ar(Re)}function Lt(w){Br.unshift(w)}function nn(w){Re.unshift(w)}var an=Math.abs,Zt=Math.ceil,Zr=Math.floor,ma=Math.min,Uo=0,Di=null;function ml(w){Uo++,d.monitorRunDependencies&&d.monitorRunDependencies(Uo)}function ga(w){if(Uo--,d.monitorRunDependencies&&d.monitorRunDependencies(Uo),Uo==0&&Di){var x=Di;Di=null,x()}}d.preloadedImages={},d.preloadedAudios={};function kr(w){throw d.onAbort&&d.onAbort(w),w+="",Y(w),U(w),Pe=!0,w="abort("+w+"). Build with -s ASSERTIONS=1 for more info.",new ge.RuntimeError(w)}function gl(w,x){return String.prototype.startsWith?w.startsWith(x):w.indexOf(x)===0}var Za="data:application/octet-stream;base64,";function bl(w){return gl(w,Za)}var vl="file://";function Ja(w){return gl(w,vl)}var Pr="libflac.wasm";bl(Pr)||(Pr=O(Pr));function Jc(){try{if(we)return new Uint8Array(we);var w=$a(Pr);if(w)return w;if(F)return F(Pr);throw"both async and sync fetching of the wasm failed"}catch(x){kr(x)}}function pd(){return!we&&(S||P)&&typeof fetch=="function"&&!Ja(Pr)?fetch(Pr,{credentials:"same-origin"}).then(function(w){if(!w.ok)throw"failed to load wasm binary file at '"+Pr+"'";return w.arrayBuffer()}).catch(function(){return Jc()}):new Promise(function(w,x){w(Jc())})}function hd(){var w={env:vd,wasi_snapshot_preview1:vd};function x(se,fe){var Ce=se.exports;d.asm=Ce,ga()}ml();function M(se){x(se.instance)}function W(se){return pd().then(function(fe){return ge.instantiate(fe,w)}).then(se,function(fe){U("failed to asynchronously prepare wasm: "+fe),kr(fe)})}function J(){if(!we&&typeof ge.instantiateStreaming=="function"&&!bl(Pr)&&!Ja(Pr)&&typeof fetch=="function")fetch(Pr,{credentials:"same-origin"}).then(function(se){var fe=ge.instantiateStreaming(se,w);return fe.then(M,function(Ce){return U("wasm streaming compile failed: "+Ce),U("falling back to ArrayBuffer instantiation"),W(M)})});else return W(M)}if(d.instantiateWasm)try{var re=d.instantiateWasm(w,x);return re}catch(se){return U("Module.instantiateWasm callback failed with error: "+se),!1}return J(),{}}var mn,jr;vr.push({func:function(){Bh()}});function Lh(w){return w}function kl(w){var x=/\b_Z[\w\d_]+/g;return w.replace(x,function(M){var W=M;return M===W?M:W+" ["+M+"]"})}function md(){var w=new Error;if(!w.stack){try{throw new Error}catch(x){w=x}if(!w.stack)return"(no stack trace available)"}return w.stack.toString()}function yl(){var w=md();return d.extraStackTrace&&(w+=` +`+d.extraStackTrace()),kl(w)}function _l(){return 14176}function gd(w,x,M){Et.copyWithin(w,x,x+M)}function Dn(){return Et.length}function er(w){try{return ce.grow(w-xt.byteLength+65535>>>16),Mt(ce.buffer),1}catch{}}function wl(w){w=w>>>0;var x=Dn(),M=65536,W=2147483648;if(w>W)return!1;for(var J=16777216,re=1;re<=4;re*=2){var se=x*(1+.2/re);se=Math.min(se,w+100663296);var fe=Math.min(W,Ct(Math.max(J,w,se),M)),Ce=er(fe);if(Ce)return!0}return!1}var Dt={splitPath:function(w){var x=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return x.exec(w).slice(1)},normalizeArray:function(w,x){for(var M=0,W=w.length-1;W>=0;W--){var J=w[W];J==="."?w.splice(W,1):J===".."?(w.splice(W,1),M++):M&&(w.splice(W,1),M--)}if(x)for(;M;M--)w.unshift("..");return w},normalize:function(w){var x=w.charAt(0)==="/",M=w.substr(-1)==="/";return w=Dt.normalizeArray(w.split("/").filter(function(W){return!!W}),!x).join("/"),!w&&!x&&(w="."),w&&M&&(w+="/"),(x?"/":"")+w},dirname:function(w){var x=Dt.splitPath(w),M=x[0],W=x[1];return!M&&!W?".":(W&&(W=W.substr(0,W.length-1)),M+W)},basename:function(w){if(w==="/")return"/";var x=w.lastIndexOf("/");return x===-1?w:w.substr(x+1)},extname:function(w){return Dt.splitPath(w)[3]},join:function(){var w=Array.prototype.slice.call(arguments,0);return Dt.normalize(w.join("/"))},join2:function(w,x){return Dt.normalize(w+"/"+x)}};function Jr(w){return ut[jh()>>2]=w,w}var Ho={resolve:function(){for(var w="",x=!1,M=arguments.length-1;M>=-1&&!x;M--){var W=M>=0?arguments[M]:V.cwd();if(typeof W!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!W)return"";w=W+"/"+w,x=W.charAt(0)==="/"}return w=Dt.normalizeArray(w.split("/").filter(function(J){return!!J}),!x).join("/"),(x?"/":"")+w||"."},relative:function(w,x){w=Ho.resolve(w).substr(1),x=Ho.resolve(x).substr(1);function M(Fe){for(var Oe=0;Oe=0&&Fe[ot]==="";ot--);return Oe>ot?[]:Fe.slice(Oe,ot-Oe+1)}for(var W=M(w.split("/")),J=M(x.split("/")),re=Math.min(W.length,J.length),se=re,fe=0;fe0?x=W.slice(0,J).toString("utf-8"):x=null}else typeof window<"u"&&typeof window.prompt=="function"?(x=window.prompt("Input: "),x!==null&&(x+=` +`)):typeof readline=="function"&&(x=readline(),x!==null&&(x+=` +`));if(!x)return null;w.input=bd(x,!0)}return w.input.shift()},put_char:function(w,x){x===null||x===10?(Y(pt(w.output,0)),w.output=[]):x!=0&&w.output.push(x)},flush:function(w){w.output&&w.output.length>0&&(Y(pt(w.output,0)),w.output=[])}},default_tty1_ops:{put_char:function(w,x){x===null||x===10?(U(pt(w.output,0)),w.output=[]):x!=0&&w.output.push(x)},flush:function(w){w.output&&w.output.length>0&&(U(pt(w.output,0)),w.output=[])}}},Nt={ops_table:null,mount:function(w){return Nt.createNode(null,"/",16895,0)},createNode:function(w,x,M,W){if(V.isBlkdev(M)||V.isFIFO(M))throw new V.ErrnoError(63);Nt.ops_table||(Nt.ops_table={dir:{node:{getattr:Nt.node_ops.getattr,setattr:Nt.node_ops.setattr,lookup:Nt.node_ops.lookup,mknod:Nt.node_ops.mknod,rename:Nt.node_ops.rename,unlink:Nt.node_ops.unlink,rmdir:Nt.node_ops.rmdir,readdir:Nt.node_ops.readdir,symlink:Nt.node_ops.symlink},stream:{llseek:Nt.stream_ops.llseek}},file:{node:{getattr:Nt.node_ops.getattr,setattr:Nt.node_ops.setattr},stream:{llseek:Nt.stream_ops.llseek,read:Nt.stream_ops.read,write:Nt.stream_ops.write,allocate:Nt.stream_ops.allocate,mmap:Nt.stream_ops.mmap,msync:Nt.stream_ops.msync}},link:{node:{getattr:Nt.node_ops.getattr,setattr:Nt.node_ops.setattr,readlink:Nt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Nt.node_ops.getattr,setattr:Nt.node_ops.setattr},stream:V.chrdev_stream_ops}});var J=V.createNode(w,x,M,W);return V.isDir(J.mode)?(J.node_ops=Nt.ops_table.dir.node,J.stream_ops=Nt.ops_table.dir.stream,J.contents={}):V.isFile(J.mode)?(J.node_ops=Nt.ops_table.file.node,J.stream_ops=Nt.ops_table.file.stream,J.usedBytes=0,J.contents=null):V.isLink(J.mode)?(J.node_ops=Nt.ops_table.link.node,J.stream_ops=Nt.ops_table.link.stream):V.isChrdev(J.mode)&&(J.node_ops=Nt.ops_table.chrdev.node,J.stream_ops=Nt.ops_table.chrdev.stream),J.timestamp=Date.now(),w&&(w.contents[x]=J),J},getFileDataAsRegularArray:function(w){if(w.contents&&w.contents.subarray){for(var x=[],M=0;M=x)){var W=1024*1024;x=Math.max(x,M*(M>>0),M!=0&&(x=Math.max(x,256));var J=w.contents;w.contents=new Uint8Array(x),w.usedBytes>0&&w.contents.set(J.subarray(0,w.usedBytes),0)}},resizeFileStorage:function(w,x){if(w.usedBytes!=x){if(x==0){w.contents=null,w.usedBytes=0;return}if(!w.contents||w.contents.subarray){var M=w.contents;w.contents=new Uint8Array(x),M&&w.contents.set(M.subarray(0,Math.min(x,w.usedBytes))),w.usedBytes=x;return}if(w.contents||(w.contents=[]),w.contents.length>x)w.contents.length=x;else for(;w.contents.length=w.node.usedBytes)return 0;var se=Math.min(w.node.usedBytes-J,W);if(se>8&&re.subarray)x.set(re.subarray(J,J+se),M);else for(var fe=0;fe0||W+M8)throw new V.ErrnoError(32);for(var J=Dt.normalizeArray(w.split("/").filter(function(rt){return!!rt}),!1),re=V.root,se="/",fe=0;fe40)throw new V.ErrnoError(32)}}return{path:se,node:re}},getPath:function(w){for(var x;;){if(V.isRoot(w)){var M=w.mount.mountpoint;return x?M[M.length-1]!=="/"?M+"/"+x:M+x:M}x=x?w.name+"/"+x:w.name,w=w.parent}},hashName:function(w,x){for(var M=0,W=0;W>>0)%V.nameTable.length},hashAddNode:function(w){var x=V.hashName(w.parent.id,w.name);w.name_next=V.nameTable[x],V.nameTable[x]=w},hashRemoveNode:function(w){var x=V.hashName(w.parent.id,w.name);if(V.nameTable[x]===w)V.nameTable[x]=w.name_next;else for(var M=V.nameTable[x];M;){if(M.name_next===w){M.name_next=w.name_next;break}M=M.name_next}},lookupNode:function(w,x){var M=V.mayLookup(w);if(M)throw new V.ErrnoError(M,w);for(var W=V.hashName(w.id,x),J=V.nameTable[W];J;J=J.name_next){var re=J.name;if(J.parent.id===w.id&&re===x)return J}return V.lookup(w,x)},createNode:function(w,x,M,W){var J=new V.FSNode(w,x,M,W);return V.hashAddNode(J),J},destroyNode:function(w){V.hashRemoveNode(w)},isRoot:function(w){return w===w.parent},isMountpoint:function(w){return!!w.mounted},isFile:function(w){return(w&61440)===32768},isDir:function(w){return(w&61440)===16384},isLink:function(w){return(w&61440)===40960},isChrdev:function(w){return(w&61440)===8192},isBlkdev:function(w){return(w&61440)===24576},isFIFO:function(w){return(w&61440)===4096},isSocket:function(w){return(w&49152)===49152},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(w){var x=V.flagModes[w];if(typeof x>"u")throw new Error("Unknown file open mode: "+w);return x},flagsToPermissionString:function(w){var x=["r","w","rw"][w&3];return w&512&&(x+="w"),x},nodePermissions:function(w,x){return V.ignorePermissions?0:x.indexOf("r")!==-1&&!(w.mode&292)||x.indexOf("w")!==-1&&!(w.mode&146)||x.indexOf("x")!==-1&&!(w.mode&73)?2:0},mayLookup:function(w){var x=V.nodePermissions(w,"x");return x||(w.node_ops.lookup?0:2)},mayCreate:function(w,x){try{var M=V.lookupNode(w,x);return 20}catch{}return V.nodePermissions(w,"wx")},mayDelete:function(w,x,M){var W;try{W=V.lookupNode(w,x)}catch(re){return re.errno}var J=V.nodePermissions(w,"wx");if(J)return J;if(M){if(!V.isDir(W.mode))return 54;if(V.isRoot(W)||V.getPath(W)===V.cwd())return 10}else if(V.isDir(W.mode))return 31;return 0},mayOpen:function(w,x){return w?V.isLink(w.mode)?32:V.isDir(w.mode)&&(V.flagsToPermissionString(x)!=="r"||x&512)?31:V.nodePermissions(w,V.flagsToPermissionString(x)):44},MAX_OPEN_FDS:4096,nextfd:function(w,x){w=w||0,x=x||V.MAX_OPEN_FDS;for(var M=w;M<=x;M++)if(!V.streams[M])return M;throw new V.ErrnoError(33)},getStream:function(w){return V.streams[w]},createStream:function(w,x,M){V.FSStream||(V.FSStream=function(){},V.FSStream.prototype={object:{get:function(){return this.node},set:function(se){this.node=se}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}});var W=new V.FSStream;for(var J in w)W[J]=w[J];w=W;var re=V.nextfd(x,M);return w.fd=re,V.streams[re]=w,w},closeStream:function(w){V.streams[w]=null},chrdev_stream_ops:{open:function(w){var x=V.getDevice(w.node.rdev);w.stream_ops=x.stream_ops,w.stream_ops.open&&w.stream_ops.open(w)},llseek:function(){throw new V.ErrnoError(70)}},major:function(w){return w>>8},minor:function(w){return w&255},makedev:function(w,x){return w<<8|x},registerDevice:function(w,x){V.devices[w]={stream_ops:x}},getDevice:function(w){return V.devices[w]},getMounts:function(w){for(var x=[],M=[w];M.length;){var W=M.pop();x.push(W),M.push.apply(M,W.mounts)}return x},syncfs:function(w,x){typeof w=="function"&&(x=w,w=!1),V.syncFSRequests++,V.syncFSRequests>1&&U("warning: "+V.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var M=V.getMounts(V.root.mount),W=0;function J(se){return V.syncFSRequests--,x(se)}function re(se){if(se)return re.errored?void 0:(re.errored=!0,J(se));++W>=M.length&&J(null)}M.forEach(function(se){if(!se.type.syncfs)return re(null);se.type.syncfs(se,w,re)})},mount:function(w,x,M){var W=M==="/",J=!M,re;if(W&&V.root)throw new V.ErrnoError(10);if(!W&&!J){var se=V.lookupPath(M,{follow_mount:!1});if(M=se.path,re=se.node,V.isMountpoint(re))throw new V.ErrnoError(10);if(!V.isDir(re.mode))throw new V.ErrnoError(54)}var fe={type:w,opts:x,mountpoint:M,mounts:[]},Ce=w.mount(fe);return Ce.mount=fe,fe.root=Ce,W?V.root=Ce:re&&(re.mounted=fe,re.mount&&re.mount.mounts.push(fe)),Ce},unmount:function(w){var x=V.lookupPath(w,{follow_mount:!1});if(!V.isMountpoint(x.node))throw new V.ErrnoError(28);var M=x.node,W=M.mounted,J=V.getMounts(W);Object.keys(V.nameTable).forEach(function(se){for(var fe=V.nameTable[se];fe;){var Ce=fe.name_next;J.indexOf(fe.mount)!==-1&&V.destroyNode(fe),fe=Ce}}),M.mounted=null;var re=M.mount.mounts.indexOf(W);M.mount.mounts.splice(re,1)},lookup:function(w,x){return w.node_ops.lookup(w,x)},mknod:function(w,x,M){var W=V.lookupPath(w,{parent:!0}),J=W.node,re=Dt.basename(w);if(!re||re==="."||re==="..")throw new V.ErrnoError(28);var se=V.mayCreate(J,re);if(se)throw new V.ErrnoError(se);if(!J.node_ops.mknod)throw new V.ErrnoError(63);return J.node_ops.mknod(J,re,x,M)},create:function(w,x){return x=x!==void 0?x:438,x&=4095,x|=32768,V.mknod(w,x,0)},mkdir:function(w,x){return x=x!==void 0?x:511,x&=1023,x|=16384,V.mknod(w,x,0)},mkdirTree:function(w,x){for(var M=w.split("/"),W="",J=0;J"u"&&(M=x,x=438),x|=8192,V.mknod(w,x,M)},symlink:function(w,x){if(!Ho.resolve(w))throw new V.ErrnoError(44);var M=V.lookupPath(x,{parent:!0}),W=M.node;if(!W)throw new V.ErrnoError(44);var J=Dt.basename(x),re=V.mayCreate(W,J);if(re)throw new V.ErrnoError(re);if(!W.node_ops.symlink)throw new V.ErrnoError(63);return W.node_ops.symlink(W,J,w)},rename:function(w,x){var M=Dt.dirname(w),W=Dt.dirname(x),J=Dt.basename(w),re=Dt.basename(x),se,fe,Ce;try{se=V.lookupPath(w,{parent:!0}),fe=se.node,se=V.lookupPath(x,{parent:!0}),Ce=se.node}catch{throw new V.ErrnoError(10)}if(!fe||!Ce)throw new V.ErrnoError(44);if(fe.mount!==Ce.mount)throw new V.ErrnoError(75);var Fe=V.lookupNode(fe,J),Oe=Ho.relative(w,W);if(Oe.charAt(0)!==".")throw new V.ErrnoError(28);if(Oe=Ho.relative(x,M),Oe.charAt(0)!==".")throw new V.ErrnoError(55);var ot;try{ot=V.lookupNode(Ce,re)}catch{}if(Fe!==ot){var rt=V.isDir(Fe.mode),qe=V.mayDelete(fe,J,rt);if(qe)throw new V.ErrnoError(qe);if(qe=ot?V.mayDelete(Ce,re,rt):V.mayCreate(Ce,re),qe)throw new V.ErrnoError(qe);if(!fe.node_ops.rename)throw new V.ErrnoError(63);if(V.isMountpoint(Fe)||ot&&V.isMountpoint(ot))throw new V.ErrnoError(10);if(Ce!==fe&&(qe=V.nodePermissions(fe,"w"),qe))throw new V.ErrnoError(qe);try{V.trackingDelegate.willMovePath&&V.trackingDelegate.willMovePath(w,x)}catch(kt){U("FS.trackingDelegate['willMovePath']('"+w+"', '"+x+"') threw an exception: "+kt.message)}V.hashRemoveNode(Fe);try{fe.node_ops.rename(Fe,Ce,re)}catch(kt){throw kt}finally{V.hashAddNode(Fe)}try{V.trackingDelegate.onMovePath&&V.trackingDelegate.onMovePath(w,x)}catch(kt){U("FS.trackingDelegate['onMovePath']('"+w+"', '"+x+"') threw an exception: "+kt.message)}}},rmdir:function(w){var x=V.lookupPath(w,{parent:!0}),M=x.node,W=Dt.basename(w),J=V.lookupNode(M,W),re=V.mayDelete(M,W,!0);if(re)throw new V.ErrnoError(re);if(!M.node_ops.rmdir)throw new V.ErrnoError(63);if(V.isMountpoint(J))throw new V.ErrnoError(10);try{V.trackingDelegate.willDeletePath&&V.trackingDelegate.willDeletePath(w)}catch(se){U("FS.trackingDelegate['willDeletePath']('"+w+"') threw an exception: "+se.message)}M.node_ops.rmdir(M,W),V.destroyNode(J);try{V.trackingDelegate.onDeletePath&&V.trackingDelegate.onDeletePath(w)}catch(se){U("FS.trackingDelegate['onDeletePath']('"+w+"') threw an exception: "+se.message)}},readdir:function(w){var x=V.lookupPath(w,{follow:!0}),M=x.node;if(!M.node_ops.readdir)throw new V.ErrnoError(54);return M.node_ops.readdir(M)},unlink:function(w){var x=V.lookupPath(w,{parent:!0}),M=x.node,W=Dt.basename(w),J=V.lookupNode(M,W),re=V.mayDelete(M,W,!1);if(re)throw new V.ErrnoError(re);if(!M.node_ops.unlink)throw new V.ErrnoError(63);if(V.isMountpoint(J))throw new V.ErrnoError(10);try{V.trackingDelegate.willDeletePath&&V.trackingDelegate.willDeletePath(w)}catch(se){U("FS.trackingDelegate['willDeletePath']('"+w+"') threw an exception: "+se.message)}M.node_ops.unlink(M,W),V.destroyNode(J);try{V.trackingDelegate.onDeletePath&&V.trackingDelegate.onDeletePath(w)}catch(se){U("FS.trackingDelegate['onDeletePath']('"+w+"') threw an exception: "+se.message)}},readlink:function(w){var x=V.lookupPath(w),M=x.node;if(!M)throw new V.ErrnoError(44);if(!M.node_ops.readlink)throw new V.ErrnoError(28);return Ho.resolve(V.getPath(M.parent),M.node_ops.readlink(M))},stat:function(w,x){var M=V.lookupPath(w,{follow:!x}),W=M.node;if(!W)throw new V.ErrnoError(44);if(!W.node_ops.getattr)throw new V.ErrnoError(63);return W.node_ops.getattr(W)},lstat:function(w){return V.stat(w,!0)},chmod:function(w,x,M){var W;if(typeof w=="string"){var J=V.lookupPath(w,{follow:!M});W=J.node}else W=w;if(!W.node_ops.setattr)throw new V.ErrnoError(63);W.node_ops.setattr(W,{mode:x&4095|W.mode&-4096,timestamp:Date.now()})},lchmod:function(w,x){V.chmod(w,x,!0)},fchmod:function(w,x){var M=V.getStream(w);if(!M)throw new V.ErrnoError(8);V.chmod(M.node,x)},chown:function(w,x,M,W){var J;if(typeof w=="string"){var re=V.lookupPath(w,{follow:!W});J=re.node}else J=w;if(!J.node_ops.setattr)throw new V.ErrnoError(63);J.node_ops.setattr(J,{timestamp:Date.now()})},lchown:function(w,x,M){V.chown(w,x,M,!0)},fchown:function(w,x,M){var W=V.getStream(w);if(!W)throw new V.ErrnoError(8);V.chown(W.node,x,M)},truncate:function(w,x){if(x<0)throw new V.ErrnoError(28);var M;if(typeof w=="string"){var W=V.lookupPath(w,{follow:!0});M=W.node}else M=w;if(!M.node_ops.setattr)throw new V.ErrnoError(63);if(V.isDir(M.mode))throw new V.ErrnoError(31);if(!V.isFile(M.mode))throw new V.ErrnoError(28);var J=V.nodePermissions(M,"w");if(J)throw new V.ErrnoError(J);M.node_ops.setattr(M,{size:x,timestamp:Date.now()})},ftruncate:function(w,x){var M=V.getStream(w);if(!M)throw new V.ErrnoError(8);if(!(M.flags&2097155))throw new V.ErrnoError(28);V.truncate(M.node,x)},utime:function(w,x,M){var W=V.lookupPath(w,{follow:!0}),J=W.node;J.node_ops.setattr(J,{timestamp:Math.max(x,M)})},open:function(w,x,M,W,J){if(w==="")throw new V.ErrnoError(44);x=typeof x=="string"?V.modeStringToFlags(x):x,M=typeof M>"u"?438:M,x&64?M=M&4095|32768:M=0;var re;if(typeof w=="object")re=w;else{w=Dt.normalize(w);try{var se=V.lookupPath(w,{follow:!(x&131072)});re=se.node}catch{}}var fe=!1;if(x&64)if(re){if(x&128)throw new V.ErrnoError(20)}else re=V.mknod(w,M,0),fe=!0;if(!re)throw new V.ErrnoError(44);if(V.isChrdev(re.mode)&&(x&=-513),x&65536&&!V.isDir(re.mode))throw new V.ErrnoError(54);if(!fe){var Ce=V.mayOpen(re,x);if(Ce)throw new V.ErrnoError(Ce)}x&512&&V.truncate(re,0),x&=-131713;var Fe=V.createStream({node:re,path:V.getPath(re),flags:x,seekable:!0,position:0,stream_ops:re.stream_ops,ungotten:[],error:!1},W,J);Fe.stream_ops.open&&Fe.stream_ops.open(Fe),d.logReadFiles&&!(x&1)&&(V.readFiles||(V.readFiles={}),w in V.readFiles||(V.readFiles[w]=1,U("FS.trackingDelegate error on read file: "+w)));try{if(V.trackingDelegate.onOpenFile){var Oe=0;(x&2097155)!==1&&(Oe|=V.tracking.openFlags.READ),x&2097155&&(Oe|=V.tracking.openFlags.WRITE),V.trackingDelegate.onOpenFile(w,Oe)}}catch(ot){U("FS.trackingDelegate['onOpenFile']('"+w+"', flags) threw an exception: "+ot.message)}return Fe},close:function(w){if(V.isClosed(w))throw new V.ErrnoError(8);w.getdents&&(w.getdents=null);try{w.stream_ops.close&&w.stream_ops.close(w)}catch(x){throw x}finally{V.closeStream(w.fd)}w.fd=null},isClosed:function(w){return w.fd===null},llseek:function(w,x,M){if(V.isClosed(w))throw new V.ErrnoError(8);if(!w.seekable||!w.stream_ops.llseek)throw new V.ErrnoError(70);if(M!=0&&M!=1&&M!=2)throw new V.ErrnoError(28);return w.position=w.stream_ops.llseek(w,x,M),w.ungotten=[],w.position},read:function(w,x,M,W,J){if(W<0||J<0)throw new V.ErrnoError(28);if(V.isClosed(w))throw new V.ErrnoError(8);if((w.flags&2097155)===1)throw new V.ErrnoError(8);if(V.isDir(w.node.mode))throw new V.ErrnoError(31);if(!w.stream_ops.read)throw new V.ErrnoError(28);var re=typeof J<"u";if(!re)J=w.position;else if(!w.seekable)throw new V.ErrnoError(70);var se=w.stream_ops.read(w,x,M,W,J);return re||(w.position+=se),se},write:function(w,x,M,W,J,re){if(W<0||J<0)throw new V.ErrnoError(28);if(V.isClosed(w))throw new V.ErrnoError(8);if(!(w.flags&2097155))throw new V.ErrnoError(8);if(V.isDir(w.node.mode))throw new V.ErrnoError(31);if(!w.stream_ops.write)throw new V.ErrnoError(28);w.seekable&&w.flags&1024&&V.llseek(w,0,2);var se=typeof J<"u";if(!se)J=w.position;else if(!w.seekable)throw new V.ErrnoError(70);var fe=w.stream_ops.write(w,x,M,W,J,re);se||(w.position+=fe);try{w.path&&V.trackingDelegate.onWriteToFile&&V.trackingDelegate.onWriteToFile(w.path)}catch(Ce){U("FS.trackingDelegate['onWriteToFile']('"+w.path+"') threw an exception: "+Ce.message)}return fe},allocate:function(w,x,M){if(V.isClosed(w))throw new V.ErrnoError(8);if(x<0||M<=0)throw new V.ErrnoError(28);if(!(w.flags&2097155))throw new V.ErrnoError(8);if(!V.isFile(w.node.mode)&&!V.isDir(w.node.mode))throw new V.ErrnoError(43);if(!w.stream_ops.allocate)throw new V.ErrnoError(138);w.stream_ops.allocate(w,x,M)},mmap:function(w,x,M,W,J,re){if(J&2&&!(re&2)&&(w.flags&2097155)!==2)throw new V.ErrnoError(2);if((w.flags&2097155)===1)throw new V.ErrnoError(2);if(!w.stream_ops.mmap)throw new V.ErrnoError(43);return w.stream_ops.mmap(w,x,M,W,J,re)},msync:function(w,x,M,W,J){return!w||!w.stream_ops.msync?0:w.stream_ops.msync(w,x,M,W,J)},munmap:function(w){return 0},ioctl:function(w,x,M){if(!w.stream_ops.ioctl)throw new V.ErrnoError(59);return w.stream_ops.ioctl(w,x,M)},readFile:function(w,x){if(x=x||{},x.flags=x.flags||"r",x.encoding=x.encoding||"binary",x.encoding!=="utf8"&&x.encoding!=="binary")throw new Error('Invalid encoding type "'+x.encoding+'"');var M,W=V.open(w,x.flags),J=V.stat(w),re=J.size,se=new Uint8Array(re);return V.read(W,se,0,re,0),x.encoding==="utf8"?M=pt(se,0):x.encoding==="binary"&&(M=se),V.close(W),M},writeFile:function(w,x,M){M=M||{},M.flags=M.flags||"w";var W=V.open(w,M.flags,M.mode);if(typeof x=="string"){var J=new Uint8Array(hn(x)+1),re=nt(x,J,0,J.length);V.write(W,J,0,re,void 0,M.canOwn)}else if(ArrayBuffer.isView(x))V.write(W,x,0,x.byteLength,void 0,M.canOwn);else throw new Error("Unsupported data type");V.close(W)},cwd:function(){return V.currentPath},chdir:function(w){var x=V.lookupPath(w,{follow:!0});if(x.node===null)throw new V.ErrnoError(44);if(!V.isDir(x.node.mode))throw new V.ErrnoError(54);var M=V.nodePermissions(x.node,"x");if(M)throw new V.ErrnoError(M);V.currentPath=x.path},createDefaultDirectories:function(){V.mkdir("/tmp"),V.mkdir("/home"),V.mkdir("/home/web_user")},createDefaultDevices:function(){V.mkdir("/dev"),V.registerDevice(V.makedev(1,3),{read:function(){return 0},write:function(W,J,re,se,fe){return se}}),V.mkdev("/dev/null",V.makedev(1,3)),ba.register(V.makedev(5,0),ba.default_tty_ops),ba.register(V.makedev(6,0),ba.default_tty1_ops),V.mkdev("/dev/tty",V.makedev(5,0)),V.mkdev("/dev/tty1",V.makedev(6,0));var w;if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var x=new Uint8Array(1);w=function(){return crypto.getRandomValues(x),x[0]}}else if(N)try{var M=p("crypto");w=function(){return M.randomBytes(1)[0]}}catch{}w||(w=function(){kr("random_device")}),V.createDevice("/dev","random",w),V.createDevice("/dev","urandom",w),V.mkdir("/dev/shm"),V.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){V.mkdir("/proc"),V.mkdir("/proc/self"),V.mkdir("/proc/self/fd"),V.mount({mount:function(){var w=V.createNode("/proc/self","fd",16895,73);return w.node_ops={lookup:function(x,M){var W=+M,J=V.getStream(W);if(!J)throw new V.ErrnoError(8);var re={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return J.path}}};return re.parent=re,re}},w}},{},"/proc/self/fd")},createStandardStreams:function(){d.stdin?V.createDevice("/dev","stdin",d.stdin):V.symlink("/dev/tty","/dev/stdin"),d.stdout?V.createDevice("/dev","stdout",null,d.stdout):V.symlink("/dev/tty","/dev/stdout"),d.stderr?V.createDevice("/dev","stderr",null,d.stderr):V.symlink("/dev/tty1","/dev/stderr"),V.open("/dev/stdin","r"),V.open("/dev/stdout","w"),V.open("/dev/stderr","w")},ensureErrnoError:function(){V.ErrnoError||(V.ErrnoError=function(x,M){this.node=M,this.setErrno=function(W){this.errno=W},this.setErrno(x),this.message="FS error"},V.ErrnoError.prototype=new Error,V.ErrnoError.prototype.constructor=V.ErrnoError,[44].forEach(function(w){V.genericErrors[w]=new V.ErrnoError(w),V.genericErrors[w].stack=""}))},staticInit:function(){V.ensureErrnoError(),V.nameTable=new Array(4096),V.mount(Nt,{},"/"),V.createDefaultDirectories(),V.createDefaultDevices(),V.createSpecialDirectories(),V.filesystems={MEMFS:Nt}},init:function(w,x,M){V.init.initialized=!0,V.ensureErrnoError(),d.stdin=w||d.stdin,d.stdout=x||d.stdout,d.stderr=M||d.stderr,V.createStandardStreams()},quit:function(){V.init.initialized=!1;var w=d._fflush;w&&w(0);for(var x=0;xthis.length-1||rt<0)){var qe=rt%this.chunkSize,kt=rt/this.chunkSize|0;return this.getter(kt)[qe]}},re.prototype.setDataGetter=function(rt){this.getter=rt},re.prototype.cacheLength=function(){var rt=new XMLHttpRequest;if(rt.open("HEAD",M,!1),rt.send(null),!(rt.status>=200&&rt.status<300||rt.status===304))throw new Error("Couldn't load "+M+". Status: "+rt.status);var qe=Number(rt.getResponseHeader("Content-length")),kt,Jt=(kt=rt.getResponseHeader("Accept-Ranges"))&&kt==="bytes",Tt=(kt=rt.getResponseHeader("Content-Encoding"))&&kt==="gzip",dn=1024*1024;Jt||(dn=qe);var sr=function(mt,_n){if(mt>_n)throw new Error("invalid range ("+mt+", "+_n+") or no bytes requested!");if(_n>qe-1)throw new Error("only "+qe+" bytes available! programmer error!");var zt=new XMLHttpRequest;if(zt.open("GET",M,!1),qe!==dn&&zt.setRequestHeader("Range","bytes="+mt+"-"+_n),typeof Uint8Array<"u"&&(zt.responseType="arraybuffer"),zt.overrideMimeType&&zt.overrideMimeType("text/plain; charset=x-user-defined"),zt.send(null),!(zt.status>=200&&zt.status<300||zt.status===304))throw new Error("Couldn't load "+M+". Status: "+zt.status);return zt.response!==void 0?new Uint8Array(zt.response||[]):bd(zt.responseText||"",!0)},St=this;St.setDataGetter(function(mt){var _n=mt*dn,zt=(mt+1)*dn-1;if(zt=Math.min(zt,qe-1),typeof St.chunks[mt]>"u"&&(St.chunks[mt]=sr(_n,zt)),typeof St.chunks[mt]>"u")throw new Error("doXHR failed!");return St.chunks[mt]}),(Tt||!qe)&&(dn=qe=1,qe=this.getter(0).length,dn=qe,Y("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=qe,this._chunkSize=dn,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!P)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var se=new re;Object.defineProperties(se,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var fe={isDevice:!1,contents:se}}else var fe={isDevice:!1,url:M};var Ce=V.createFile(w,x,fe,W,J);fe.contents?Ce.contents=fe.contents:fe.url&&(Ce.contents=null,Ce.url=fe.url),Object.defineProperties(Ce,{usedBytes:{get:function(){return this.contents.length}}});var Fe={},Oe=Object.keys(Ce.stream_ops);return Oe.forEach(function(ot){var rt=Ce.stream_ops[ot];Fe[ot]=function(){if(!V.forceLoadFile(Ce))throw new V.ErrnoError(29);return rt.apply(null,arguments)}}),Fe.read=function(rt,qe,kt,Jt,Tt){if(!V.forceLoadFile(Ce))throw new V.ErrnoError(29);var dn=rt.node.contents;if(Tt>=dn.length)return 0;var sr=Math.min(dn.length-Tt,Jt);if(dn.slice)for(var St=0;St>2]=W.dev,ut[M+4>>2]=0,ut[M+8>>2]=W.ino,ut[M+12>>2]=W.mode,ut[M+16>>2]=W.nlink,ut[M+20>>2]=W.uid,ut[M+24>>2]=W.gid,ut[M+28>>2]=W.rdev,ut[M+32>>2]=0,jr=[W.size>>>0,(mn=W.size,+an(mn)>=1?mn>0?(ma(+Zr(mn/4294967296),4294967295)|0)>>>0:~~+Zt((mn-+(~~mn>>>0))/4294967296)>>>0:0)],ut[M+40>>2]=jr[0],ut[M+44>>2]=jr[1],ut[M+48>>2]=4096,ut[M+52>>2]=W.blocks,ut[M+56>>2]=W.atime.getTime()/1e3|0,ut[M+60>>2]=0,ut[M+64>>2]=W.mtime.getTime()/1e3|0,ut[M+68>>2]=0,ut[M+72>>2]=W.ctime.getTime()/1e3|0,ut[M+76>>2]=0,jr=[W.ino>>>0,(mn=W.ino,+an(mn)>=1?mn>0?(ma(+Zr(mn/4294967296),4294967295)|0)>>>0:~~+Zt((mn-+(~~mn>>>0))/4294967296)>>>0:0)],ut[M+80>>2]=jr[0],ut[M+84>>2]=jr[1],0},doMsync:function(w,x,M,W,J){var re=Et.slice(w,w+M);V.msync(x,re,J,M,W)},doMkdir:function(w,x){return w=Dt.normalize(w),w[w.length-1]==="/"&&(w=w.substr(0,w.length-1)),V.mkdir(w,x,0),0},doMknod:function(w,x,M){switch(x&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return V.mknod(w,x,M),0},doReadlink:function(w,x,M){if(M<=0)return-28;var W=V.readlink(w),J=Math.min(M,hn(W)),re=dt[x+J];return jt(W,x,M+1),dt[x+J]=re,J},doAccess:function(w,x){if(x&-8)return-28;var M,W=V.lookupPath(w,{follow:!0});if(M=W.node,!M)return-44;var J="";return x&4&&(J+="r"),x&2&&(J+="w"),x&1&&(J+="x"),J&&V.nodePermissions(M,J)?-2:0},doDup:function(w,x,M){var W=V.getStream(M);return W&&V.close(W),V.open(w,x,0,M,M).fd},doReadv:function(w,x,M,W){for(var J=0,re=0;re>2],fe=ut[x+(re*8+4)>>2],Ce=V.read(w,dt,se,fe,W);if(Ce<0)return-1;if(J+=Ce,Ce>2],fe=ut[x+(re*8+4)>>2],Ce=V.write(w,dt,se,fe,W);if(Ce<0)return-1;J+=Ce}return J},varargs:void 0,get:function(){Oi.varargs+=4;var w=ut[Oi.varargs-4>>2];return w},getStr:function(w){var x=fn(w);return x},getStreamFromFD:function(w){var x=V.getStream(w);if(!x)throw new V.ErrnoError(8);return x},get64:function(w,x){return w}};function R_(w){try{var x=Oi.getStreamFromFD(w);return V.close(x),0}catch(M){return(typeof V>"u"||!(M instanceof V.ErrnoError))&&kr(M),M.errno}}function T_(w,x,M,W){try{var J=Oi.getStreamFromFD(w),re=Oi.doReadv(J,x,M);return ut[W>>2]=re,0}catch(se){return(typeof V>"u"||!(se instanceof V.ErrnoError))&&kr(se),se.errno}}function F_(w,x,M,W,J){try{var re=Oi.getStreamFromFD(w),se=4294967296,fe=M*se+(x>>>0),Ce=9007199254740992;return fe<=-Ce||fe>=Ce?-61:(V.llseek(re,fe,W),jr=[re.position>>>0,(mn=re.position,+an(mn)>=1?mn>0?(ma(+Zr(mn/4294967296),4294967295)|0)>>>0:~~+Zt((mn-+(~~mn>>>0))/4294967296)>>>0:0)],ut[J>>2]=jr[0],ut[J+4>>2]=jr[1],re.getdents&&fe===0&&W===0&&(re.getdents=null),0)}catch(Fe){return(typeof V>"u"||!(Fe instanceof V.ErrnoError))&&kr(Fe),Fe.errno}}function L_(w,x,M,W){try{var J=Oi.getStreamFromFD(w),re=Oi.doWritev(J,x,M);return ut[W>>2]=re,0}catch(se){return(typeof V>"u"||!(se instanceof V.ErrnoError))&&kr(se),se.errno}}function D_(w){return w=+w,w>=0?+Zr(w+.5):+Zt(w-.5)}var Dh=function(w,x,M,W){w||(w=this),this.parent=w,this.mount=w.mount,this.mounted=null,this.id=V.nextInode++,this.name=x,this.mode=M,this.node_ops={},this.stream_ops={},this.rdev=W},$c=365,eu=146;Object.defineProperties(Dh.prototype,{read:{get:function(){return(this.mode&$c)===$c},set:function(w){w?this.mode|=$c:this.mode&=~$c}},write:{get:function(){return(this.mode&eu)===eu},set:function(w){w?this.mode|=eu:this.mode&=~eu}},isFolder:{get:function(){return V.isDir(this.mode)}},isDevice:{get:function(){return V.isChrdev(this.mode)}}}),V.FSNode=Dh,V.staticInit();function bd(w,x,M){var W=M>0?M:hn(w)+1,J=new Array(W),re=nt(w,J,0,J.length);return x&&(J.length=re),J}function Oh(w){for(var x=[],M=0;M255&&(W&=255),x.push(String.fromCharCode(W))}return x.join("")}var O_=typeof atob=="function"?atob:function(w){var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",M="",W,J,re,se,fe,Ce,Fe,Oe=0;w=w.replace(/[^A-Za-z0-9\+\/\=]/g,"");do se=x.indexOf(w.charAt(Oe++)),fe=x.indexOf(w.charAt(Oe++)),Ce=x.indexOf(w.charAt(Oe++)),Fe=x.indexOf(w.charAt(Oe++)),W=se<<2|fe>>4,J=(fe&15)<<4|Ce>>2,re=(Ce&3)<<6|Fe,M=M+String.fromCharCode(W),Ce!==64&&(M=M+String.fromCharCode(J)),Fe!==64&&(M=M+String.fromCharCode(re));while(Oe0||(lt(),Uo>0))return;function x(){tu||(tu=!0,d.calledRun=!0,!Pe&&(Ot(),qt(),d.onRuntimeInitialized&&d.onRuntimeInitialized(),Ve()))}d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),x()},1)):x()}if(d.run=yd,d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();yd();function j_(w){var x=d.getValue(w,"i32"),M=d.getValue(w+4,"i32"),W=d.getValue(w+8,"i32"),J=d.getValue(w+12,"i32"),re=d.getValue(w+16,"i32"),se=d.getValue(w+20,"i32"),fe=d.getValue(w+24,"i32"),Ce=d.getValue(w+32,"i64"),Fe=z_(w+40);return{min_blocksize:x,max_blocksize:M,min_framesize:W,max_framesize:J,sampleRate:re,channels:se,bitsPerSample:fe,total_samples:Ce,md5sum:Fe}}function z_(w){for(var x=[],M,W,J=0,re=16;J0&&(M=d.getValue(w+W++,"i8"),M!==0);)x.push(String.fromCodePoint(M));return x.join("")}function U_(w){return{dummy:d.getValue(w,"i32")}}function H_(w){for(var x=d.getValue(w,"i32"),M=d.getValue(w+4,"i32"),W=[],J=0;J0){se=d.getValue(w+24,"i32");for(var fe=0;fe0&&(fe+=re.blocksize*Fe);for(var Oe=[],ot,rt,qe=0;qe=0;--W)if(M=wd[W],M&&M.event===w){x.apply(null,M.args);break}},u8=function(w,x){var M=ru[w];if(M)for(var W=M.length-1;W>=0;--W)M[W]===x&&M.splice(W,1)},ts=function(w,x,M){ui["on"+w]&&ui["on"+w].apply(null,x);var W=ru[w];if(W)for(var J=0,re=W.length;J"u"?1:re+0,J=typeof J=="number"?J:0,se=typeof se=="number"?se:0;var fe=!0,Ce=d.ccall("FLAC__stream_encoder_new","number",[],[]);return fe&=d.ccall("FLAC__stream_encoder_set_verify","number",["number","number"],[Ce,re]),fe&=d.ccall("FLAC__stream_encoder_set_compression_level","number",["number","number"],[Ce,W]),fe&=d.ccall("FLAC__stream_encoder_set_channels","number",["number","number"],[Ce,x]),fe&=d.ccall("FLAC__stream_encoder_set_bits_per_sample","number",["number","number"],[Ce,M]),fe&=d.ccall("FLAC__stream_encoder_set_sample_rate","number",["number","number"],[Ce,w]),fe&=d.ccall("FLAC__stream_encoder_set_blocksize","number",["number","number"],[Ce,se]),fe&=d.ccall("FLAC__stream_encoder_set_total_samples_estimate","number",["number","number"],[Ce,J]),fe?(ts("created",[{type:"created",target:{id:Ce,type:"encoder"}}],!1),Ce):0},init_libflac_encoder:function(){return console.warn("Flac.init_libflac_encoder() is deprecated, use Flac.create_libflac_encoder() instead!"),this.create_libflac_encoder.apply(this,arguments)},create_libflac_decoder:function(w){w=typeof w>"u"?1:w+0;var x=!0,M=d.ccall("FLAC__stream_decoder_new","number",[],[]);return x&=d.ccall("FLAC__stream_decoder_set_md5_checking","number",["number","number"],[M,w]),x?(ts("created",[{type:"created",target:{id:M,type:"decoder"}}],!1),M):0},init_libflac_decoder:function(){return console.warn("Flac.init_libflac_decoder() is deprecated, use Flac.create_libflac_decoder() instead!"),this.create_libflac_decoder.apply(this,arguments)},init_encoder_stream:function(w,x,M,W,J){var re=W===!0;if(J=J|0,typeof x!="function")return e8;es(w,"write",x);var se=0;typeof M=="function"&&(es(w,"metadata",M),se=qh);var fe="FLAC__stream_encoder_init_stream",Ce=["number","number","number","number","number","number"],Fe=[w,o8,0,0,se,J];typeof W=="number"?re=!0:re&&(W=1),re&&(fe="FLAC__stream_encoder_init_ogg_stream",Fe.unshift(Fe[0]),Fe[1]=0,Ce.unshift(Ce[0]),Ce[1]="number",d.ccall("FLAC__stream_encoder_set_ogg_serial_number","number",["number","number"],[w,W]));var Oe=d.ccall(fe,"number",Ce,Fe);return Oe},init_encoder_ogg_stream:function(w,x,M,W,J){return typeof W!="number"&&(W=!0),this.init_encoder_stream(w,x,M,W,J)},init_decoder_stream:function(w,x,M,W,J,re,se){if(se=se|0,typeof x!="function"||(es(w,"read",x),typeof M!="function"))return Xh;es(w,"write",M);var fe=0;typeof W=="function"&&(es(w,"error",W),fe=l8);var Ce=0;typeof J=="function"&&(es(w,"metadata",J),Ce=qh);var Fe=re===!0;typeof re=="number"&&(Fe=!0,d.ccall("FLAC__stream_decoder_set_ogg_serial_number","number",["number","number"],[w,re]));var Oe=Fe?"FLAC__stream_decoder_init_ogg_stream":"FLAC__stream_decoder_init_stream",ot=d.ccall(Oe,"number",["number","number","number","number","number","number","number","number","number","number"],[w,i8,0,0,0,0,a8,Ce,fe,se]);return ot},init_decoder_ogg_stream:function(w,x,M,W,J,re,se){return typeof re!="number"&&(re=!0),this.init_decoder_stream(w,x,M,W,J,re,se)},FLAC__stream_encoder_process_interleaved:function(w,x,M){var W=x.length*x.BYTES_PER_ELEMENT,J=d._malloc(W),re=new Uint8Array(d.HEAPU8.buffer,J,W);re.set(new Uint8Array(x.buffer,x.byteOffset,x.byteLength));var se=d.ccall("FLAC__stream_encoder_process_interleaved","number",["number","number","number"],[w,re.byteOffset,M]);return d._free(J),se},FLAC__stream_encoder_process:function(w,x,M){var W=this._create_pointer_array(x),J=W.pointerPointer,re=d.ccall("FLAC__stream_encoder_process","number",["number","number","number"],[w,J,M]);return this._destroy_pointer_array(W),re},FLAC__stream_decoder_process_single:d.cwrap("FLAC__stream_decoder_process_single","number",["number"]),FLAC__stream_decoder_process_until_end_of_stream:d.cwrap("FLAC__stream_decoder_process_until_end_of_stream","number",["number"]),FLAC__stream_decoder_process_until_end_of_metadata:d.cwrap("FLAC__stream_decoder_process_until_end_of_metadata","number",["number"]),FLAC__stream_decoder_get_state:d.cwrap("FLAC__stream_decoder_get_state","number",["number"]),FLAC__stream_encoder_get_state:d.cwrap("FLAC__stream_encoder_get_state","number",["number"]),FLAC__stream_decoder_set_metadata_respond:d.cwrap("FLAC__stream_decoder_set_metadata_respond","number",["number","number"]),FLAC__stream_decoder_set_metadata_respond_application:d.cwrap("FLAC__stream_decoder_set_metadata_respond_application","number",["number","number"]),FLAC__stream_decoder_set_metadata_respond_all:d.cwrap("FLAC__stream_decoder_set_metadata_respond_all","number",["number"]),FLAC__stream_decoder_set_metadata_ignore:d.cwrap("FLAC__stream_decoder_set_metadata_ignore","number",["number","number"]),FLAC__stream_decoder_set_metadata_ignore_application:d.cwrap("FLAC__stream_decoder_set_metadata_ignore_application","number",["number","number"]),FLAC__stream_decoder_set_metadata_ignore_all:d.cwrap("FLAC__stream_decoder_set_metadata_ignore_all","number",["number"]),FLAC__stream_encoder_set_metadata:function(w,x,M){var W=d.ccall("FLAC__stream_encoder_set_metadata","number",["number","number","number"],[w,x.pointerPointer,M]);return W},_create_pointer_array:function(w){for(var x=w.length,M=[],W=new Uint32Array(x),J=new DataView(W.buffer),re,se,fe,Ce,Fe=0,x;Fe({endTime:r,insertTime:s,type:"exponentialRampToValue",value:t}),xv=(t,r,s)=>({endTime:r,insertTime:s,type:"linearRampToValue",value:t}),z1=(t,r)=>({startTime:r,type:"setValue",value:t}),Vy=(t,r,s)=>({duration:s,startTime:r,type:"setValueCurve",values:t}),Wy=(t,r,{startTime:s,target:u,timeConstant:p})=>u+(r-u)*Math.exp((s-t)/p),Ls=t=>t.type==="exponentialRampToValue",G0=t=>t.type==="linearRampToValue",Yi=t=>Ls(t)||G0(t),Sh=t=>t.type==="setValue",hi=t=>t.type==="setValueCurve",Q0=(t,r,s,u)=>{const p=t[r];return p===void 0?u:Yi(p)||Sh(p)?p.value:hi(p)?p.values[p.values.length-1]:Wy(s,Q0(t,r-1,p.startTime,u),p)},Sv=(t,r,s,u,p)=>s===void 0?[u.insertTime,p]:Yi(s)?[s.endTime,s.value]:Sh(s)?[s.startTime,s.value]:hi(s)?[s.startTime+s.duration,s.values[s.values.length-1]]:[s.startTime,Q0(t,r-1,s.startTime,p)],V1=t=>t.type==="cancelAndHold",W1=t=>t.type==="cancelScheduledValues",Hi=t=>V1(t)||W1(t)?t.cancelTime:Ls(t)||G0(t)?t.endTime:t.startTime,Ev=(t,r,s,{endTime:u,value:p})=>s===p?p:0s+(t-r)/(u-r)*(p-s),TL=(t,r)=>{const s=Math.floor(r),u=Math.ceil(r);return s===u?t[s]:(1-(r-s))*t[s]+(1-(u-r))*t[u]},FL=(t,{duration:r,startTime:s,values:u})=>{const p=(t-s)/r*(u.length-1);return TL(u,p)},Wu=t=>t.type==="setTarget";class LL{constructor(r){this._automationEvents=[],this._currenTime=0,this._defaultValue=r}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(r){const s=Hi(r);if(V1(r)||W1(r)){const u=this._automationEvents.findIndex(d=>W1(r)&&hi(d)?d.startTime+d.duration>=s:Hi(d)>=s),p=this._automationEvents[u];if(u!==-1&&(this._automationEvents=this._automationEvents.slice(0,u)),V1(r)){const d=this._automationEvents[this._automationEvents.length-1];if(p!==void 0&&Yi(p)){if(d!==void 0&&Wu(d))throw new Error("The internal list is malformed.");const b=d===void 0?p.insertTime:hi(d)?d.startTime+d.duration:Hi(d),k=d===void 0?this._defaultValue:hi(d)?d.values[d.values.length-1]:d.value,y=Ls(p)?Ev(s,b,k,p):Pv(s,b,k,p),_=Ls(p)?Cv(y,s,this._currenTime):xv(y,s,this._currenTime);this._automationEvents.push(_)}if(d!==void 0&&Wu(d)&&this._automationEvents.push(z1(this.getValue(s),s)),d!==void 0&&hi(d)&&d.startTime+d.duration>s){const b=s-d.startTime,k=(d.values.length-1)/d.duration,y=Math.max(2,1+Math.ceil(b*k)),_=b/(y-1)*k,S=d.values.slice(0,y);if(_<1)for(let P=1;PHi(b)>s),p=u===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[u-1];if(p!==void 0&&hi(p)&&Hi(p)+p.duration>s)return!1;const d=Ls(r)?Cv(r.value,r.endTime,this._currenTime):G0(r)?xv(r.value,s,this._currenTime):r;if(u===-1)this._automationEvents.push(d);else{if(hi(r)&&s+r.duration>Hi(this._automationEvents[u]))return!1;this._automationEvents.splice(u,0,d)}}return!0}flush(r){const s=this._automationEvents.findIndex(u=>Hi(u)>r);if(s>1){const u=this._automationEvents.slice(s-1),p=u[0];Wu(p)&&u.unshift(z1(Q0(this._automationEvents,s-2,p.startTime,this._defaultValue),p.startTime)),this._automationEvents=u}}getValue(r){if(this._automationEvents.length===0)return this._defaultValue;const s=this._automationEvents.findIndex(b=>Hi(b)>r),u=this._automationEvents[s],p=(s===-1?this._automationEvents.length:s)-1,d=this._automationEvents[p];if(d!==void 0&&Wu(d)&&(u===void 0||!Yi(u)||u.insertTime>r))return Wy(r,Q0(this._automationEvents,p-1,d.startTime,this._defaultValue),d);if(d!==void 0&&Sh(d)&&(u===void 0||!Yi(u)))return d.value;if(d!==void 0&&hi(d)&&(u===void 0||!Yi(u)||d.startTime+d.duration>r))return r({cancelTime:t,type:"cancelAndHold"}),OL=t=>({cancelTime:t,type:"cancelScheduledValues"}),BL=(t,r)=>({endTime:r,type:"exponentialRampToValue",value:t}),jL=(t,r)=>({endTime:r,type:"linearRampToValue",value:t}),zL=(t,r,s)=>({startTime:r,target:t,timeConstant:s,type:"setTarget"}),VL=()=>new DOMException("","AbortError"),WL=t=>(r,s,[u,p,d],b)=>{t(r[p],[s,u,d],k=>k[0]===s&&k[1]===u,b)},UL=t=>(r,s,u)=>{const p=[];for(let d=0;d(r,s)=>{t.set(r,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:s})},tl=new WeakSet,Uy=new WeakMap,Hy=new WeakMap,Gy=new WeakMap,Qy=new WeakMap,Yy=new WeakMap,Ky=new WeakMap,U1=new WeakMap,Mv=new WeakMap,Xy={construct(){return Xy}},GL=t=>{try{const r=new Proxy(t,Xy);new r}catch{return!1}return!0},Nv=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,Iv=(t,r)=>{const s=[];let u=t.replace(/^[\s]+/,""),p=u.match(Nv);for(;p!==null;){const d=p[1].slice(1,-1),b=p[0].replace(/([\s]+)?;?$/,"").replace(d,new URL(d,r).toString());s.push(b),u=u.slice(p[0].length).replace(/^[\s]+/,""),p=u.match(Nv)}return[s.join(";"),u]},Rv=t=>{if(t!==void 0&&!Array.isArray(t))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},Tv=t=>{if(!GL(t))throw new TypeError("The given value for processorCtor should be a constructor.");if(t.prototype===null||typeof t.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},QL=(t,r,s,u,p,d,b,k,y,_,S,P,N)=>{let L=0;return(R,O,q={credentials:"omit"})=>{const F=S.get(R);if(F!==void 0&&F.has(O))return Promise.resolve();const D=_.get(R);if(D!==void 0){const U=D.get(O);if(U!==void 0)return U}const z=d(R),Y=z.audioWorklet===void 0?p(O).then(([U,ee])=>{const[Z,X]=Iv(U,ee),de=`${Z};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${X} +})})(window,'_AWGS')`;return s(de)}).then(()=>{const U=N._AWGS.pop();if(U===void 0)throw new SyntaxError;u(z.currentTime,z.sampleRate,()=>U(class{},void 0,(ee,Z)=>{if(ee.trim()==="")throw r();const X=Mv.get(z);if(X!==void 0){if(X.has(ee))throw r();Tv(Z),Rv(Z.parameterDescriptors),X.set(ee,Z)}else Tv(Z),Rv(Z.parameterDescriptors),Mv.set(z,new Map([[ee,Z]]))},z.sampleRate,void 0,void 0))}):Promise.all([p(O),Promise.resolve(t(P,P))]).then(([[U,ee],Z])=>{const X=L+1;L=X;const[de,le]=Iv(U,ee),we=`${de};((AudioWorkletProcessor,registerProcessor)=>{${le} +})(${Z?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${Z?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${Z?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${X}',class extends AudioWorkletProcessor{process(){return !1}})`,ge=new Blob([we],{type:"application/javascript; charset=utf-8"}),_e=URL.createObjectURL(ge);return z.audioWorklet.addModule(_e,q).then(()=>{if(k(z))return z;const ve=b(z);return ve.audioWorklet.addModule(_e,q).then(()=>ve)}).then(ve=>{if(y===null)throw new SyntaxError;try{new y(ve,`__sac${X}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(_e))});return D===void 0?_.set(R,new Map([[O,Y]])):D.set(O,Y),Y.then(()=>{const U=S.get(R);U===void 0?S.set(R,new Set([O])):U.add(O)}).finally(()=>{const U=_.get(R);U!==void 0&&U.delete(O)}),Y}},ha=(t,r)=>{const s=t.get(r);if(s===void 0)throw new Error("A value with the given key could not be found.");return s},id=(t,r)=>{const s=Array.from(t).filter(r);if(s.length>1)throw Error("More than one element was found.");if(s.length===0)throw Error("No element was found.");const[u]=s;return t.delete(u),u},qy=(t,r,s,u)=>{const p=ha(t,r),d=id(p,b=>b[0]===s&&b[1]===u);return p.size===0&&t.delete(r),d},Hc=t=>ha(Ky,t),nl=t=>{if(tl.has(t))throw new Error("The AudioNode is already stored.");tl.add(t),Hc(t).forEach(r=>r(!0))},Zy=t=>"port"in t,Gc=t=>{if(!tl.has(t))throw new Error("The AudioNode is not stored.");tl.delete(t),Hc(t).forEach(r=>r(!1))},H1=(t,r)=>{!Zy(t)&&r.every(s=>s.size===0)&&Gc(t)},YL=(t,r,s,u,p,d,b,k,y,_,S,P,N)=>{const L=new WeakMap;return(R,O,q,F,D)=>{const{activeInputs:z,passiveInputs:Y}=d(O),{outputs:U}=d(R),ee=k(R),Z=X=>{const de=y(O),le=y(R);if(X){const me=qy(Y,R,q,F);t(z,R,me,!1),!D&&!P(R)&&s(le,de,q,F),N(O)&&nl(O)}else{const me=u(z,R,q,F);r(Y,F,me,!1),!D&&!P(R)&&p(le,de,q,F);const pe=b(O);if(pe===0)S(O)&&H1(O,z);else{const xe=L.get(O);xe!==void 0&&clearTimeout(xe),L.set(O,setTimeout(()=>{S(O)&&H1(O,z)},pe*1e3))}}};return _(U,[O,q,F],X=>X[0]===O&&X[1]===q&&X[2]===F,!0)?(ee.add(Z),S(R)?t(z,R,[q,F,Z],!0):r(Y,F,[R,q,Z],!0),!0):!1}},KL=t=>(r,s,[u,p,d],b)=>{const k=r.get(u);k===void 0?r.set(u,new Set([[p,s,d]])):t(k,[p,s,d],y=>y[0]===p&&y[1]===s,b)},XL=t=>(r,s)=>{const u=t(r,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});s.connect(u).connect(r.destination);const p=()=>{s.removeEventListener("ended",p),s.disconnect(u),u.disconnect()};s.addEventListener("ended",p)},qL={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},ZL=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=p(k),S={...qL,...y},P=u(_,S),N=d(_)?r():null;super(k,!1,P,N),this._nativeAnalyserNode=P}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(k){this._nativeAnalyserNode.fftSize=k}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(k){const y=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=k,!(k>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=y,s()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(k){const y=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=k,!(this._nativeAnalyserNode.maxDecibels>k))throw this._nativeAnalyserNode.minDecibels=y,s()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(k){this._nativeAnalyserNode.smoothingTimeConstant=k}getByteFrequencyData(k){this._nativeAnalyserNode.getByteFrequencyData(k)}getByteTimeDomainData(k){this._nativeAnalyserNode.getByteTimeDomainData(k)}getFloatFrequencyData(k){this._nativeAnalyserNode.getFloatFrequencyData(k)}getFloatTimeDomainData(k){this._nativeAnalyserNode.getFloatTimeDomainData(k)}},Or=(t,r)=>t.context===r,JL=(t,r,s)=>()=>{const u=new WeakMap,p=async(d,b)=>{let k=r(d);if(!Or(k,b)){const _={channelCount:k.channelCount,channelCountMode:k.channelCountMode,channelInterpretation:k.channelInterpretation,fftSize:k.fftSize,maxDecibels:k.maxDecibels,minDecibels:k.minDecibels,smoothingTimeConstant:k.smoothingTimeConstant};k=t(b,_)}return u.set(b,k),await s(d,b,k),k};return{render(d,b){const k=u.get(b);return k!==void 0?Promise.resolve(k):p(d,b)}}},G1=t=>{try{t.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},Ya=()=>new DOMException("","IndexSizeError"),Jy=t=>{t.getChannelData=(r=>s=>{try{return r.call(t,s)}catch(u){throw u.code===12?Ya():u}})(t.getChannelData)},$L={numberOfChannels:1},eD=(t,r,s,u,p,d,b,k)=>{let y=null;return class $y{constructor(S){if(p===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:P,numberOfChannels:N,sampleRate:L}={...$L,...S};y===null&&(y=new p(1,1,44100));const R=u!==null&&r(d,d)?new u({length:P,numberOfChannels:N,sampleRate:L}):y.createBuffer(N,P,L);if(R.numberOfChannels===0)throw s();return typeof R.copyFromChannel!="function"?(b(R),Jy(R)):r(G1,()=>G1(R))||k(R),t.add(R),R}static[Symbol.hasInstance](S){return S!==null&&typeof S=="object"&&Object.getPrototypeOf(S)===$y.prototype||t.has(S)}}},to=-34028234663852886e22,Hr=-to,Ci=t=>tl.has(t),tD={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},nD=(t,r,s,u,p,d,b,k)=>class extends t{constructor(_,S){const P=d(_),N={...tD,...S},L=p(P,N),R=b(P),O=R?r():null;super(_,!1,L,O),this._audioBufferSourceNodeRenderer=O,this._isBufferNullified=!1,this._isBufferSet=N.buffer!==null,this._nativeAudioBufferSourceNode=L,this._onended=null,this._playbackRate=s(this,R,L.playbackRate,Hr,to)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(_){if(this._nativeAudioBufferSourceNode.buffer=_,_!==null){if(this._isBufferSet)throw u();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(_){this._nativeAudioBufferSourceNode.loop=_}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(_){this._nativeAudioBufferSourceNode.loopEnd=_}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(_){this._nativeAudioBufferSourceNode.loopStart=_}get onended(){return this._onended}set onended(_){const S=typeof _=="function"?k(this,_):null;this._nativeAudioBufferSourceNode.onended=S;const P=this._nativeAudioBufferSourceNode.onended;this._onended=P!==null&&P===S?_:P}get playbackRate(){return this._playbackRate}start(_=0,S=0,P){if(this._nativeAudioBufferSourceNode.start(_,S,P),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=P===void 0?[_,S]:[_,S,P]),this.context.state!=="closed"){nl(this);const N=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",N),Ci(this)&&Gc(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",N)}}stop(_=0){this._nativeAudioBufferSourceNode.stop(_),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=_)}},rD=(t,r,s,u,p)=>()=>{const d=new WeakMap;let b=null,k=null;const y=async(_,S)=>{let P=s(_);const N=Or(P,S);if(!N){const L={buffer:P.buffer,channelCount:P.channelCount,channelCountMode:P.channelCountMode,channelInterpretation:P.channelInterpretation,loop:P.loop,loopEnd:P.loopEnd,loopStart:P.loopStart,playbackRate:P.playbackRate.value};P=r(S,L),b!==null&&P.start(...b),k!==null&&P.stop(k)}return d.set(S,P),N?await t(S,_.playbackRate,P.playbackRate):await u(S,_.playbackRate,P.playbackRate),await p(_,S,P),P};return{set start(_){b=_},set stop(_){k=_},render(_,S){const P=d.get(S);return P!==void 0?Promise.resolve(P):y(_,S)}}},oD=t=>"playbackRate"in t,iD=t=>"frequency"in t&&"gain"in t,aD=t=>"offset"in t,sD=t=>!("frequency"in t)&&"gain"in t,lD=t=>"detune"in t&&"frequency"in t,cD=t=>"pan"in t,io=t=>ha(Uy,t),Qc=t=>ha(Gy,t),Q1=(t,r)=>{const{activeInputs:s}=io(t);s.forEach(p=>p.forEach(([d])=>{r.includes(t)||Q1(d,[...r,t])}));const u=oD(t)?[t.playbackRate]:Zy(t)?Array.from(t.parameters.values()):iD(t)?[t.Q,t.detune,t.frequency,t.gain]:aD(t)?[t.offset]:sD(t)?[t.gain]:lD(t)?[t.detune,t.frequency]:cD(t)?[t.pan]:[];for(const p of u){const d=Qc(p);d!==void 0&&d.activeInputs.forEach(([b])=>Q1(b,r))}Ci(t)&&Gc(t)},uD=t=>{Q1(t.destination,[])},fD=t=>t===void 0||typeof t=="number"||typeof t=="string"&&(t==="balanced"||t==="interactive"||t==="playback"),dD=(t,r,s,u,p,d,b,k,y)=>class extends t{constructor(S={}){if(y===null)throw new Error("Missing the native AudioContext constructor.");let P;try{P=new y(S)}catch(R){throw R.code===12&&R.message==="sampleRate is not in range"?s():R}if(P===null)throw u();if(!fD(S.latencyHint))throw new TypeError(`The provided value '${S.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(S.sampleRate!==void 0&&P.sampleRate!==S.sampleRate)throw s();super(P,2);const{latencyHint:N}=S,{sampleRate:L}=P;if(this._baseLatency=typeof P.baseLatency=="number"?P.baseLatency:N==="balanced"?512/L:N==="interactive"||N===void 0?256/L:N==="playback"?1024/L:Math.max(2,Math.min(128,Math.round(N*L/128)))*128/L,this._nativeAudioContext=P,y.name==="webkitAudioContext"?(this._nativeGainNode=P.createGain(),this._nativeOscillatorNode=P.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(P.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,P.state==="running"){this._state="suspended";const R=()=>{this._state==="suspended"&&(this._state=null),P.removeEventListener("statechange",R)};P.addEventListener("statechange",R)}}get baseLatency(){return this._baseLatency}get state(){return this._state!==null?this._state:this._nativeAudioContext.state}close(){return this.state==="closed"?this._nativeAudioContext.close().then(()=>{throw r()}):(this._state==="suspended"&&(this._state=null),this._nativeAudioContext.close().then(()=>{this._nativeGainNode!==null&&this._nativeOscillatorNode!==null&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),uD(this)}))}createMediaElementSource(S){return new p(this,{mediaElement:S})}createMediaStreamDestination(){return new d(this)}createMediaStreamSource(S){return new b(this,{mediaStream:S})}createMediaStreamTrackSource(S){return new k(this,{mediaStreamTrack:S})}resume(){return this._state==="suspended"?new Promise((S,P)=>{const N=()=>{this._nativeAudioContext.removeEventListener("statechange",N),this._nativeAudioContext.state==="running"?S():this.resume().then(S,P)};this._nativeAudioContext.addEventListener("statechange",N)}):this._nativeAudioContext.resume().catch(S=>{throw S===void 0||S.code===15?r():S})}suspend(){return this._nativeAudioContext.suspend().catch(S=>{throw S===void 0?r():S})}},pD=(t,r,s,u,p,d,b,k)=>class extends t{constructor(_,S){const P=d(_),N=b(P),L=p(P,S,N),R=N?r(k):null;super(_,!1,L,R),this._isNodeOfNativeOfflineAudioContext=N,this._nativeAudioDestinationNode=L}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(_){if(this._isNodeOfNativeOfflineAudioContext)throw u();if(_>this._nativeAudioDestinationNode.maxChannelCount)throw s();this._nativeAudioDestinationNode.channelCount=_}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(_){if(this._isNodeOfNativeOfflineAudioContext)throw u();this._nativeAudioDestinationNode.channelCountMode=_}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},hD=t=>{const r=new WeakMap,s=async(u,p)=>{const d=p.destination;return r.set(p,d),await t(u,p,d),d};return{render(u,p){const d=r.get(p);return d!==void 0?Promise.resolve(d):s(u,p)}}},mD=(t,r,s,u,p,d,b,k)=>(y,_)=>{const S=_.listener,P=()=>{const U=new Float32Array(1),ee=r(_,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),Z=b(_);let X=!1,de=[0,0,-1,0,1,0],le=[0,0,0];const me=()=>{if(X)return;X=!0;const ge=u(_,256,9,0);ge.onaudioprocess=({inputBuffer:_e})=>{const ve=[d(_e,U,0),d(_e,U,1),d(_e,U,2),d(_e,U,3),d(_e,U,4),d(_e,U,5)];ve.some((ke,Pe)=>ke!==de[Pe])&&(S.setOrientation(...ve),de=ve);const ce=[d(_e,U,6),d(_e,U,7),d(_e,U,8)];ce.some((ke,Pe)=>ke!==le[Pe])&&(S.setPosition(...ce),le=ce)},ee.connect(ge)},pe=ge=>_e=>{_e!==de[ge]&&(de[ge]=_e,S.setOrientation(...de))},xe=ge=>_e=>{_e!==le[ge]&&(le[ge]=_e,S.setPosition(...le))},we=(ge,_e,ve)=>{const ce=s(_,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:_e});ce.connect(ee,0,ge),ce.start(),Object.defineProperty(ce.offset,"defaultValue",{get(){return _e}});const ke=t({context:y},Z,ce.offset,Hr,to);return k(ke,"value",Pe=>()=>Pe.call(ke),Pe=>Ae=>{try{Pe.call(ke,Ae)}catch(Me){if(Me.code!==9)throw Me}me(),Z&&ve(Ae)}),ke.cancelAndHoldAtTime=(Pe=>Z?()=>{throw p()}:(...Ae)=>{const Me=Pe.apply(ke,Ae);return me(),Me})(ke.cancelAndHoldAtTime),ke.cancelScheduledValues=(Pe=>Z?()=>{throw p()}:(...Ae)=>{const Me=Pe.apply(ke,Ae);return me(),Me})(ke.cancelScheduledValues),ke.exponentialRampToValueAtTime=(Pe=>Z?()=>{throw p()}:(...Ae)=>{const Me=Pe.apply(ke,Ae);return me(),Me})(ke.exponentialRampToValueAtTime),ke.linearRampToValueAtTime=(Pe=>Z?()=>{throw p()}:(...Ae)=>{const Me=Pe.apply(ke,Ae);return me(),Me})(ke.linearRampToValueAtTime),ke.setTargetAtTime=(Pe=>Z?()=>{throw p()}:(...Ae)=>{const Me=Pe.apply(ke,Ae);return me(),Me})(ke.setTargetAtTime),ke.setValueAtTime=(Pe=>Z?()=>{throw p()}:(...Ae)=>{const Me=Pe.apply(ke,Ae);return me(),Me})(ke.setValueAtTime),ke.setValueCurveAtTime=(Pe=>Z?()=>{throw p()}:(...Ae)=>{const Me=Pe.apply(ke,Ae);return me(),Me})(ke.setValueCurveAtTime),ke};return{forwardX:we(0,0,pe(0)),forwardY:we(1,0,pe(1)),forwardZ:we(2,-1,pe(2)),positionX:we(6,0,xe(0)),positionY:we(7,0,xe(1)),positionZ:we(8,0,xe(2)),upX:we(3,0,pe(3)),upY:we(4,1,pe(4)),upZ:we(5,0,pe(5))}},{forwardX:N,forwardY:L,forwardZ:R,positionX:O,positionY:q,positionZ:F,upX:D,upY:z,upZ:Y}=S.forwardX===void 0?P():S;return{get forwardX(){return N},get forwardY(){return L},get forwardZ(){return R},get positionX(){return O},get positionY(){return q},get positionZ(){return F},get upX(){return D},get upY(){return z},get upZ(){return Y}}},Y0=t=>"context"in t,Yc=t=>Y0(t[0]),Ka=(t,r,s,u)=>{for(const p of t)if(s(p)){if(u)return!1;throw Error("The set contains at least one similar element.")}return t.add(r),!0},Fv=(t,r,[s,u],p)=>{Ka(t,[r,s,u],d=>d[0]===r&&d[1]===s,p)},Lv=(t,[r,s,u],p)=>{const d=t.get(r);d===void 0?t.set(r,new Set([[s,u]])):Ka(d,[s,u],b=>b[0]===s,p)},fl=t=>"inputs"in t,K0=(t,r,s,u)=>{if(fl(r)){const p=r.inputs[u];return t.connect(p,s,0),[p,s,0]}return t.connect(r,s,u),[r,s,u]},e_=(t,r,s)=>{for(const u of t)if(u[0]===r&&u[1]===s)return t.delete(u),u;return null},gD=(t,r,s)=>id(t,u=>u[0]===r&&u[1]===s),t_=(t,r)=>{if(!Hc(t).delete(r))throw new Error("Missing the expected event listener.")},n_=(t,r,s)=>{const u=ha(t,r),p=id(u,d=>d[0]===s);return u.size===0&&t.delete(r),p},X0=(t,r,s,u)=>{fl(r)?t.disconnect(r.inputs[u],s,0):t.disconnect(r,s,u)},Fn=t=>ha(Hy,t),Ic=t=>ha(Qy,t),Ha=t=>U1.has(t),u0=t=>!tl.has(t),Dv=(t,r)=>new Promise(s=>{if(r!==null)s(!0);else{const u=t.createScriptProcessor(256,1,1),p=t.createGain(),d=t.createBuffer(1,2,44100),b=d.getChannelData(0);b[0]=1,b[1]=1;const k=t.createBufferSource();k.buffer=d,k.loop=!0,k.connect(u).connect(t.destination),k.connect(p),k.disconnect(p),u.onaudioprocess=y=>{const _=y.inputBuffer.getChannelData(0);Array.prototype.some.call(_,S=>S===1)?s(!0):s(!1),k.stop(),u.onaudioprocess=null,k.disconnect(u),u.disconnect(t.destination)},k.start()}}),T2=(t,r)=>{const s=new Map;for(const u of t)for(const p of u){const d=s.get(p);s.set(p,d===void 0?1:d+1)}s.forEach((u,p)=>r(p,u))},Ov=t=>"context"in t,bD=t=>{const r=new Map;t.connect=(s=>(u,p=0,d=0)=>{const b=Ov(u)?s(u,p,d):s(u,p),k=r.get(u);return k===void 0?r.set(u,[{input:d,output:p}]):k.every(y=>y.input!==d||y.output!==p)&&k.push({input:d,output:p}),b})(t.connect.bind(t)),t.disconnect=(s=>(u,p,d)=>{if(s.apply(t),u===void 0)r.clear();else if(typeof u=="number")for(const[b,k]of r){const y=k.filter(_=>_.output!==u);y.length===0?r.delete(b):r.set(b,y)}else if(r.has(u))if(p===void 0)r.delete(u);else{const b=r.get(u);if(b!==void 0){const k=b.filter(y=>y.output!==p&&(y.input!==d||d===void 0));k.length===0?r.delete(u):r.set(u,k)}}for(const[b,k]of r)k.forEach(y=>{Ov(b)?t.connect(b,y.output,y.input):t.connect(b,y.output)})})(t.disconnect)},vD=(t,r,s,u)=>{const{activeInputs:p,passiveInputs:d}=Qc(r),{outputs:b}=io(t),k=Hc(t),y=_=>{const S=Fn(t),P=Ic(r);if(_){const N=n_(d,t,s);Fv(p,t,N,!1),!u&&!Ha(t)&&S.connect(P,s)}else{const N=gD(p,t,s);Lv(d,N,!1),!u&&!Ha(t)&&S.disconnect(P,s)}};return Ka(b,[r,s],_=>_[0]===r&&_[1]===s,!0)?(k.add(y),Ci(t)?Fv(p,t,[s,y],!0):Lv(d,[t,s,y],!0),!0):!1},kD=(t,r,s,u)=>{const{activeInputs:p,passiveInputs:d}=io(r),b=e_(p[u],t,s);return b===null?[qy(d,t,s,u)[2],!1]:[b[2],!0]},yD=(t,r,s)=>{const{activeInputs:u,passiveInputs:p}=Qc(r),d=e_(u,t,s);return d===null?[n_(p,t,s)[1],!1]:[d[2],!0]},Eh=(t,r,s,u,p)=>{const[d,b]=kD(t,s,u,p);if(d!==null&&(t_(t,d),b&&!r&&!Ha(t)&&X0(Fn(t),Fn(s),u,p)),Ci(s)){const{activeInputs:k}=io(s);H1(s,k)}},Ph=(t,r,s,u)=>{const[p,d]=yD(t,s,u);p!==null&&(t_(t,p),d&&!r&&!Ha(t)&&Fn(t).disconnect(Ic(s),u))},_D=(t,r)=>{const s=io(t),u=[];for(const p of s.outputs)Yc(p)?Eh(t,r,...p):Ph(t,r,...p),u.push(p[0]);return s.outputs.clear(),u},wD=(t,r,s)=>{const u=io(t),p=[];for(const d of u.outputs)d[1]===s&&(Yc(d)?Eh(t,r,...d):Ph(t,r,...d),p.push(d[0]),u.outputs.delete(d));return p},AD=(t,r,s,u,p)=>{const d=io(t);return Array.from(d.outputs).filter(b=>b[0]===s&&(u===void 0||b[1]===u)&&(p===void 0||b[2]===p)).map(b=>(Yc(b)?Eh(t,r,...b):Ph(t,r,...b),d.outputs.delete(b),b[0]))},CD=(t,r,s,u,p,d,b,k,y,_,S,P,N,L,R,O)=>class extends _{constructor(F,D,z,Y){super(z),this._context=F,this._nativeAudioNode=z;const U=S(F);P(U)&&s(Dv,()=>Dv(U,O))!==!0&&bD(z),Hy.set(this,z),Ky.set(this,new Set),F.state!=="closed"&&D&&nl(this),t(this,Y,z)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(F){this._nativeAudioNode.channelCount=F}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(F){this._nativeAudioNode.channelCountMode=F}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(F){this._nativeAudioNode.channelInterpretation=F}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(F,D=0,z=0){if(D<0||D>=this._nativeAudioNode.numberOfOutputs)throw p();const Y=S(this._context),U=R(Y);if(N(F)||L(F))throw d();if(Y0(F)){const X=Fn(F);try{const le=K0(this._nativeAudioNode,X,D,z),me=u0(this);(U||me)&&this._nativeAudioNode.disconnect(...le),this.context.state!=="closed"&&!me&&u0(F)&&nl(F)}catch(le){throw le.code===12?d():le}if(r(this,F,D,z,U)){const le=y([this],F);T2(le,u(U))}return F}const ee=Ic(F);if(ee.name==="playbackRate"&&ee.maxValue===1024)throw b();try{this._nativeAudioNode.connect(ee,D),(U||u0(this))&&this._nativeAudioNode.disconnect(ee,D)}catch(X){throw X.code===12?d():X}if(vD(this,F,D,U)){const X=y([this],F);T2(X,u(U))}}disconnect(F,D,z){let Y;const U=S(this._context),ee=R(U);if(F===void 0)Y=_D(this,ee);else if(typeof F=="number"){if(F<0||F>=this.numberOfOutputs)throw p();Y=wD(this,ee,F)}else{if(D!==void 0&&(D<0||D>=this.numberOfOutputs)||Y0(F)&&z!==void 0&&(z<0||z>=F.numberOfInputs))throw p();if(Y=AD(this,ee,F,D,z),Y.length===0)throw d()}for(const Z of Y){const X=y([this],Z);T2(X,k)}}},xD=(t,r,s,u,p,d,b,k,y,_,S,P,N)=>(L,R,O,q=null,F=null)=>{const D=O.value,z=new LL(D),Y=R?u(z):null,U={get defaultValue(){return D},get maxValue(){return q===null?O.maxValue:q},get minValue(){return F===null?O.minValue:F},get value(){return O.value},set value(ee){O.value=ee,U.setValueAtTime(ee,L.context.currentTime)},cancelAndHoldAtTime(ee){if(typeof O.cancelAndHoldAtTime=="function")Y===null&&z.flush(L.context.currentTime),z.add(p(ee)),O.cancelAndHoldAtTime(ee);else{const Z=Array.from(z).pop();Y===null&&z.flush(L.context.currentTime),z.add(p(ee));const X=Array.from(z).pop();O.cancelScheduledValues(ee),Z!==X&&X!==void 0&&(X.type==="exponentialRampToValue"?O.exponentialRampToValueAtTime(X.value,X.endTime):X.type==="linearRampToValue"?O.linearRampToValueAtTime(X.value,X.endTime):X.type==="setValue"?O.setValueAtTime(X.value,X.startTime):X.type==="setValueCurve"&&O.setValueCurveAtTime(X.values,X.startTime,X.duration))}return U},cancelScheduledValues(ee){return Y===null&&z.flush(L.context.currentTime),z.add(d(ee)),O.cancelScheduledValues(ee),U},exponentialRampToValueAtTime(ee,Z){if(ee===0)throw new RangeError;if(!Number.isFinite(Z)||Z<0)throw new RangeError;const X=L.context.currentTime;return Y===null&&z.flush(X),Array.from(z).length===0&&(z.add(_(D,X)),O.setValueAtTime(D,X)),z.add(b(ee,Z)),O.exponentialRampToValueAtTime(ee,Z),U},linearRampToValueAtTime(ee,Z){const X=L.context.currentTime;return Y===null&&z.flush(X),Array.from(z).length===0&&(z.add(_(D,X)),O.setValueAtTime(D,X)),z.add(k(ee,Z)),O.linearRampToValueAtTime(ee,Z),U},setTargetAtTime(ee,Z,X){return Y===null&&z.flush(L.context.currentTime),z.add(y(ee,Z,X)),O.setTargetAtTime(ee,Z,X),U},setValueAtTime(ee,Z){return Y===null&&z.flush(L.context.currentTime),z.add(_(ee,Z)),O.setValueAtTime(ee,Z),U},setValueCurveAtTime(ee,Z,X){const de=ee instanceof Float32Array?ee:new Float32Array(ee);if(P!==null&&P.name==="webkitAudioContext"){const le=Z+X,me=L.context.sampleRate,pe=Math.ceil(Z*me),xe=Math.floor(le*me),we=xe-pe,ge=new Float32Array(we);for(let ve=0;ve({replay(r){for(const s of t)if(s.type==="exponentialRampToValue"){const{endTime:u,value:p}=s;r.exponentialRampToValueAtTime(p,u)}else if(s.type==="linearRampToValue"){const{endTime:u,value:p}=s;r.linearRampToValueAtTime(p,u)}else if(s.type==="setTarget"){const{startTime:u,target:p,timeConstant:d}=s;r.setTargetAtTime(p,u,d)}else if(s.type==="setValue"){const{startTime:u,value:p}=s;r.setValueAtTime(p,u)}else if(s.type==="setValueCurve"){const{duration:u,startTime:p,values:d}=s;r.setValueCurveAtTime(d,p,u)}else throw new Error("Can't apply an unknown automation.")}}),ED=(t,r,s,u,p,d,b,k,y,_,S,P,N,L,R,O,q,F,D,z)=>class extends R{constructor(U,ee){super(U,ee),this._nativeContext=U,this._audioWorklet=t===void 0?void 0:{addModule:(Z,X)=>t(this,Z,X)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new r(this)}createBiquadFilter(){return new p(this)}createBuffer(U,ee,Z){return new s({length:ee,numberOfChannels:U,sampleRate:Z})}createBufferSource(){return new u(this)}createChannelMerger(U=6){return new d(this,{numberOfInputs:U})}createChannelSplitter(U=6){return new b(this,{numberOfOutputs:U})}createConstantSource(){return new k(this)}createConvolver(){return new y(this)}createDelay(U=1){return new S(this,{maxDelayTime:U})}createDynamicsCompressor(){return new P(this)}createGain(){return new N(this)}createIIRFilter(U,ee){return new L(this,{feedback:ee,feedforward:U})}createOscillator(){return new O(this)}createPanner(){return new q(this)}createPeriodicWave(U,ee,Z={disableNormalization:!1}){return new F(this,{...Z,imag:ee,real:U})}createStereoPanner(){return new D(this)}createWaveShaper(){return new z(this)}decodeAudioData(U,ee,Z){return _(this._nativeContext,U).then(X=>(typeof ee=="function"&&ee(X),X),X=>{throw typeof Z=="function"&&Z(X),X})}},PD={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},MD=(t,r,s,u,p,d,b,k)=>class extends t{constructor(_,S){const P=d(_),N={...PD,...S},L=p(P,N),R=b(P),O=R?s():null;super(_,!1,L,O),this._Q=r(this,R,L.Q,Hr,to),this._detune=r(this,R,L.detune,1200*Math.log2(Hr),-1200*Math.log2(Hr)),this._frequency=r(this,R,L.frequency,_.sampleRate/2,0),this._gain=r(this,R,L.gain,40*Math.log10(Hr),to),this._nativeBiquadFilterNode=L,k(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(_){this._nativeBiquadFilterNode.type=_}getFrequencyResponse(_,S,P){try{this._nativeBiquadFilterNode.getFrequencyResponse(_,S,P)}catch(N){throw N.code===11?u():N}if(_.length!==S.length||S.length!==P.length)throw u()}},ND=(t,r,s,u,p)=>()=>{const d=new WeakMap,b=async(k,y)=>{let _=s(k);const S=Or(_,y);if(!S){const P={Q:_.Q.value,channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,detune:_.detune.value,frequency:_.frequency.value,gain:_.gain.value,type:_.type};_=r(y,P)}return d.set(y,_),S?(await t(y,k.Q,_.Q),await t(y,k.detune,_.detune),await t(y,k.frequency,_.frequency),await t(y,k.gain,_.gain)):(await u(y,k.Q,_.Q),await u(y,k.detune,_.detune),await u(y,k.frequency,_.frequency),await u(y,k.gain,_.gain)),await p(k,y,_),_};return{render(k,y){const _=d.get(y);return _!==void 0?Promise.resolve(_):b(k,y)}}},ID=(t,r)=>(s,u)=>{const p=r.get(s);if(p!==void 0)return p;const d=t.get(s);if(d!==void 0)return d;try{const b=u();return b instanceof Promise?(t.set(s,b),b.catch(()=>!1).then(k=>(t.delete(s),r.set(s,k),k))):(r.set(s,b),b)}catch{return r.set(s,!1),!1}},RD={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},TD=(t,r,s,u,p)=>class extends t{constructor(b,k){const y=u(b),_={...RD,...k},S=s(y,_),P=p(y)?r():null;super(b,!1,S,P)}},FD=(t,r,s)=>()=>{const u=new WeakMap,p=async(d,b)=>{let k=r(d);if(!Or(k,b)){const _={channelCount:k.channelCount,channelCountMode:k.channelCountMode,channelInterpretation:k.channelInterpretation,numberOfInputs:k.numberOfInputs};k=t(b,_)}return u.set(b,k),await s(d,b,k),k};return{render(d,b){const k=u.get(b);return k!==void 0?Promise.resolve(k):p(d,b)}}},LD={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},DD=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=u(k),S=d({...LD,...y}),P=s(_,S),N=p(_)?r():null;super(k,!1,P,N)}},OD=(t,r,s)=>()=>{const u=new WeakMap,p=async(d,b)=>{let k=r(d);if(!Or(k,b)){const _={channelCount:k.channelCount,channelCountMode:k.channelCountMode,channelInterpretation:k.channelInterpretation,numberOfOutputs:k.numberOfOutputs};k=t(b,_)}return u.set(b,k),await s(d,b,k),k};return{render(d,b){const k=u.get(b);return k!==void 0?Promise.resolve(k):p(d,b)}}},BD=t=>(r,s,u)=>t(s,r,u),jD=t=>(r,s)=>{const u=t(r,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),p=r.createBuffer(1,2,44100);return u.buffer=p,u.loop=!0,u.connect(s),u.start(),()=>{u.stop(),u.disconnect(s)}},zD={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},VD=(t,r,s,u,p,d,b)=>class extends t{constructor(y,_){const S=p(y),P={...zD,..._},N=u(S,P),L=d(S),R=L?s():null;super(y,!1,N,R),this._constantSourceNodeRenderer=R,this._nativeConstantSourceNode=N,this._offset=r(this,L,N.offset,Hr,to),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(y){const _=typeof y=="function"?b(this,y):null;this._nativeConstantSourceNode.onended=_;const S=this._nativeConstantSourceNode.onended;this._onended=S!==null&&S===_?y:S}start(y=0){if(this._nativeConstantSourceNode.start(y),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=y),this.context.state!=="closed"){nl(this);const _=()=>{this._nativeConstantSourceNode.removeEventListener("ended",_),Ci(this)&&Gc(this)};this._nativeConstantSourceNode.addEventListener("ended",_)}}stop(y=0){this._nativeConstantSourceNode.stop(y),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=y)}},WD=(t,r,s,u,p)=>()=>{const d=new WeakMap;let b=null,k=null;const y=async(_,S)=>{let P=s(_);const N=Or(P,S);if(!N){const L={channelCount:P.channelCount,channelCountMode:P.channelCountMode,channelInterpretation:P.channelInterpretation,offset:P.offset.value};P=r(S,L),b!==null&&P.start(b),k!==null&&P.stop(k)}return d.set(S,P),N?await t(S,_.offset,P.offset):await u(S,_.offset,P.offset),await p(_,S,P),P};return{set start(_){b=_},set stop(_){k=_},render(_,S){const P=d.get(S);return P!==void 0?Promise.resolve(P):y(_,S)}}},UD=t=>r=>(t[0]=r,t[0]),HD={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},GD=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=u(k),S={...HD,...y},P=s(_,S),L=p(_)?r():null;super(k,!1,P,L),this._isBufferNullified=!1,this._nativeConvolverNode=P,S.buffer!==null&&d(this,S.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(k){if(this._nativeConvolverNode.buffer=k,k===null&&this._nativeConvolverNode.buffer!==null){const y=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=y.createBuffer(1,1,y.sampleRate),this._isBufferNullified=!0,d(this,0)}else this._isBufferNullified=!1,d(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(k){this._nativeConvolverNode.normalize=k}},QD=(t,r,s)=>()=>{const u=new WeakMap,p=async(d,b)=>{let k=r(d);if(!Or(k,b)){const _={buffer:k.buffer,channelCount:k.channelCount,channelCountMode:k.channelCountMode,channelInterpretation:k.channelInterpretation,disableNormalization:!k.normalize};k=t(b,_)}return u.set(b,k),fl(k)?await s(d,b,k.inputs[0]):await s(d,b,k),k};return{render(d,b){const k=u.get(b);return k!==void 0?Promise.resolve(k):p(d,b)}}},YD=()=>new DOMException("","DataCloneError"),Bv=t=>{const{port1:r,port2:s}=new MessageChannel;return new Promise(u=>{const p=()=>{s.onmessage=null,r.close(),s.close(),u()};s.onmessage=()=>p();try{r.postMessage(t,[t])}catch{}finally{p()}})},KD=(t,r,s,u,p,d,b,k,y,_,S)=>(P,N)=>{const L=b(P)?P:d(P);if(p.has(N)){const R=s();return Promise.reject(R)}try{p.add(N)}catch{}return r(y,()=>y(L))?L.decodeAudioData(N).then(R=>(Bv(N).catch(()=>{}),r(k,()=>k(R))||S(R),t.add(R),R)):new Promise((R,O)=>{const q=async()=>{try{await Bv(N)}catch{}},F=D=>{O(D),q()};try{L.decodeAudioData(N,D=>{typeof D.copyFromChannel!="function"&&(_(D),Jy(D)),t.add(D),q().then(()=>R(D))},D=>{F(D===null?u():D)})}catch(D){F(D)}})},XD=(t,r,s,u,p,d,b,k)=>(y,_)=>{const S=r.get(y);if(S===void 0)throw new Error("Missing the expected cycle count.");const P=d(y.context),N=k(P);if(S===_){if(r.delete(y),!N&&b(y)){const L=u(y),{outputs:R}=s(y);for(const O of R)if(Yc(O)){const q=u(O[0]);t(L,q,O[1],O[2])}else{const q=p(O[0]);L.connect(q,O[1])}}}else r.set(y,S-_)},qD={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},ZD=(t,r,s,u,p,d,b)=>class extends t{constructor(y,_){const S=p(y),P={...qD,..._},N=u(S,P),L=d(S),R=L?s(P.maxDelayTime):null;super(y,!1,N,R),this._delayTime=r(this,L,N.delayTime),b(this,P.maxDelayTime)}get delayTime(){return this._delayTime}},JD=(t,r,s,u,p)=>d=>{const b=new WeakMap,k=async(y,_)=>{let S=s(y);const P=Or(S,_);if(!P){const N={channelCount:S.channelCount,channelCountMode:S.channelCountMode,channelInterpretation:S.channelInterpretation,delayTime:S.delayTime.value,maxDelayTime:d};S=r(_,N)}return b.set(_,S),P?await t(_,y.delayTime,S.delayTime):await u(_,y.delayTime,S.delayTime),await p(y,_,S),S};return{render(y,_){const S=b.get(_);return S!==void 0?Promise.resolve(S):k(y,_)}}},$D=t=>(r,s,u,p)=>t(r[p],d=>d[0]===s&&d[1]===u),eO=t=>"delayTime"in t,tO=(t,r,s)=>function u(p,d){const b=Y0(d)?d:s(t,d);if(eO(b))return[];if(p[0]===b)return[p];if(p.includes(b))return[];const{outputs:k}=r(b);return Array.from(k).map(y=>u([...p,b],y[0])).reduce((y,_)=>y.concat(_),[])},nO={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},rO=(t,r,s,u,p,d,b,k)=>class extends t{constructor(_,S){const P=d(_),N={...nO,...S},L=u(P,N),R=b(P),O=R?s():null;super(_,!1,L,O),this._attack=r(this,R,L.attack),this._knee=r(this,R,L.knee),this._nativeDynamicsCompressorNode=L,this._ratio=r(this,R,L.ratio),this._release=r(this,R,L.release),this._threshold=r(this,R,L.threshold),k(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(_){const S=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=_,_>2)throw this._nativeDynamicsCompressorNode.channelCount=S,p()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(_){const S=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=_,_==="max")throw this._nativeDynamicsCompressorNode.channelCountMode=S,p()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return typeof this._nativeDynamicsCompressorNode.reduction.value=="number"?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}},oO=(t,r,s,u,p)=>()=>{const d=new WeakMap,b=async(k,y)=>{let _=s(k);const S=Or(_,y);if(!S){const P={attack:_.attack.value,channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,knee:_.knee.value,ratio:_.ratio.value,release:_.release.value,threshold:_.threshold.value};_=r(y,P)}return d.set(y,_),S?(await t(y,k.attack,_.attack),await t(y,k.knee,_.knee),await t(y,k.ratio,_.ratio),await t(y,k.release,_.release),await t(y,k.threshold,_.threshold)):(await u(y,k.attack,_.attack),await u(y,k.knee,_.knee),await u(y,k.ratio,_.ratio),await u(y,k.release,_.release),await u(y,k.threshold,_.threshold)),await p(k,y,_),_};return{render(k,y){const _=d.get(y);return _!==void 0?Promise.resolve(_):b(k,y)}}},iO=()=>new DOMException("","EncodingError"),aO=t=>r=>new Promise((s,u)=>{if(t===null){u(new SyntaxError);return}const p=t.document.head;if(p===null)u(new SyntaxError);else{const d=t.document.createElement("script"),b=new Blob([r],{type:"application/javascript"}),k=URL.createObjectURL(b),y=t.onerror,_=()=>{t.onerror=y,URL.revokeObjectURL(k)};t.onerror=(S,P,N,L,R)=>{if(P===k||P===t.location.href&&N===1&&L===1)return _(),u(R),!1;if(y!==null)return y(S,P,N,L,R)},d.onerror=()=>{_(),u(new SyntaxError)},d.onload=()=>{_(),s()},d.src=k,d.type="module",p.appendChild(d)}}),sO=t=>class{constructor(s){this._nativeEventTarget=s,this._listeners=new WeakMap}addEventListener(s,u,p){if(u!==null){let d=this._listeners.get(u);d===void 0&&(d=t(this,u),typeof u=="function"&&this._listeners.set(u,d)),this._nativeEventTarget.addEventListener(s,d,p)}}dispatchEvent(s){return this._nativeEventTarget.dispatchEvent(s)}removeEventListener(s,u,p){const d=u===null?void 0:this._listeners.get(u);this._nativeEventTarget.removeEventListener(s,d===void 0?null:d,p)}},lO=t=>(r,s,u)=>{Object.defineProperties(t,{currentFrame:{configurable:!0,get(){return Math.round(r*s)}},currentTime:{configurable:!0,get(){return r}}});try{return u()}finally{t!==null&&(delete t.currentFrame,delete t.currentTime)}},cO=t=>async r=>{try{const s=await fetch(r);if(s.ok)return[await s.text(),s.url]}catch{}throw t()},uO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},fO=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=p(k),S={...uO,...y},P=u(_,S),N=d(_),L=N?s():null;super(k,!1,P,L),this._gain=r(this,N,P.gain,Hr,to)}get gain(){return this._gain}},dO=(t,r,s,u,p)=>()=>{const d=new WeakMap,b=async(k,y)=>{let _=s(k);const S=Or(_,y);if(!S){const P={channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,gain:_.gain.value};_=r(y,P)}return d.set(y,_),S?await t(y,k.gain,_.gain):await u(y,k.gain,_.gain),await p(k,y,_),_};return{render(k,y){const _=d.get(y);return _!==void 0?Promise.resolve(_):b(k,y)}}},pO=t=>r=>{const s=t(r);if(s.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return s.renderer},hO=t=>r=>{var s;return(s=t.get(r))!==null&&s!==void 0?s:0},mO=t=>r=>{const s=t(r);if(s.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return s.renderer},Fr=()=>new DOMException("","InvalidStateError"),gO=t=>r=>{const s=t.get(r);if(s===void 0)throw Fr();return s},bO=(t,r)=>s=>{let u=t.get(s);if(u!==void 0)return u;if(r===null)throw new Error("Missing the native OfflineAudioContext constructor.");return u=new r(1,1,44100),t.set(s,u),u},ad=()=>new DOMException("","InvalidAccessError"),vO=t=>{t.getFrequencyResponse=(r=>(s,u,p)=>{if(s.length!==u.length||u.length!==p.length)throw ad();return r.call(t,s,u,p)})(t.getFrequencyResponse)},kO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},yO=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=u(k),S=p(_),P={...kO,...y},N=r(_,S?null:k.baseLatency,P),L=S?s(P.feedback,P.feedforward):null;super(k,!1,N,L),vO(N),this._nativeIIRFilterNode=N,d(this,1)}getFrequencyResponse(k,y,_){return this._nativeIIRFilterNode.getFrequencyResponse(k,y,_)}},r_=(t,r,s,u,p,d,b,k,y,_,S)=>{const P=_.length;let N=k;for(let L=0;L{const p=s instanceof Float64Array?s:new Float64Array(s),d=u instanceof Float64Array?u:new Float64Array(u),b=p.length,k=d.length,y=Math.min(b,k);if(p[0]!==1){for(let R=0;R(d,b)=>{const k=new WeakMap;let y=null;const _=async(S,P)=>{let N=null,L=r(S);const R=Or(L,P);if(P.createIIRFilter===void 0?N=t(P,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):R||(L=P.createIIRFilter(b,d)),k.set(P,N===null?L:N),N!==null){if(y===null){if(s===null)throw new Error("Missing the native OfflineAudioContext constructor.");const q=new s(S.context.destination.channelCount,S.context.length,P.sampleRate);y=(async()=>{await u(S,q,q.destination);const F=await p(q);return _O(F,P,d,b)})()}const O=await y;return N.buffer=O,N.start(0),N}return await u(S,P,L),L};return{render(S,P){const N=k.get(P);return N!==void 0?Promise.resolve(N):_(S,P)}}},AO=(t,r,s,u,p,d)=>b=>(k,y)=>{const _=t.get(k);if(_===void 0){if(!b&&d(k)){const S=u(k),{outputs:P}=s(k);for(const N of P)if(Yc(N)){const L=u(N[0]);r(S,L,N[1],N[2])}else{const L=p(N[0]);S.disconnect(L,N[1])}}t.set(k,y)}else t.set(k,_+y)},CO=t=>r=>t!==null&&r instanceof t,xO=t=>r=>t!==null&&typeof t.AudioNode=="function"&&r instanceof t.AudioNode,SO=t=>r=>t!==null&&typeof t.AudioParam=="function"&&r instanceof t.AudioParam,EO=(t,r)=>s=>t(s)||r(s),PO=t=>r=>t!==null&&r instanceof t,MO=t=>t!==null&&t.isSecureContext,NO=(t,r,s,u)=>class extends t{constructor(d,b){const k=s(d),y=r(k,b);if(u(k))throw TypeError();super(d,!0,y,null),this._nativeMediaElementAudioSourceNode=y}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},IO={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},RO=(t,r,s,u)=>class extends t{constructor(d,b){const k=s(d);if(u(k))throw new TypeError;const y={...IO,...b},_=r(k,y);super(d,!1,_,null),this._nativeMediaStreamAudioDestinationNode=_}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},TO=(t,r,s,u)=>class extends t{constructor(d,b){const k=s(d),y=r(k,b);if(u(k))throw new TypeError;super(d,!0,y,null),this._nativeMediaStreamAudioSourceNode=y}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},FO=(t,r,s)=>class extends t{constructor(p,d){const b=s(p),k=r(b,d);super(p,!0,k,null)}},LO=(t,r,s,u,p,d)=>class extends s{constructor(k,y){super(k),this._nativeContext=k,Yy.set(this,k),u(k)&&p.set(k,new Set),this._destination=new t(this,y),this._listener=r(this,k),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(k){const y=typeof k=="function"?d(this,k):null;this._nativeContext.onstatechange=y;const _=this._nativeContext.onstatechange;this._onstatechange=_!==null&&_===y?k:_}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},Y1=t=>{const r=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const s=t.decodeAudioData(r.buffer,()=>{});return s===void 0?!1:(s.catch(()=>{}),!0)}catch{}return!1},DO=(t,r)=>(s,u,p)=>{const d=new Set;return s.connect=(b=>(k,y=0,_=0)=>{const S=d.size===0;if(r(k))return b.call(s,k,y,_),t(d,[k,y,_],P=>P[0]===k&&P[1]===y&&P[2]===_,!0),S&&u(),k;b.call(s,k,y),t(d,[k,y],P=>P[0]===k&&P[1]===y,!0),S&&u()})(s.connect),s.disconnect=(b=>(k,y,_)=>{const S=d.size>0;if(k===void 0)b.apply(s),d.clear();else if(typeof k=="number"){b.call(s,k);for(const N of d)N[1]===k&&d.delete(N)}else{r(k)?b.call(s,k,y,_):b.call(s,k,y);for(const N of d)N[0]===k&&(y===void 0||N[1]===y)&&(_===void 0||N[2]===_)&&d.delete(N)}const P=d.size===0;S&&P&&p()})(s.disconnect),s},En=(t,r,s)=>{const u=r[s];u!==void 0&&u!==t[s]&&(t[s]=u)},rr=(t,r)=>{En(t,r,"channelCount"),En(t,r,"channelCountMode"),En(t,r,"channelInterpretation")},jv=t=>typeof t.getFloatTimeDomainData=="function",OO=t=>{t.getFloatTimeDomainData=r=>{const s=new Uint8Array(r.length);t.getByteTimeDomainData(s);const u=Math.max(s.length,t.fftSize);for(let p=0;p(s,u)=>{const p=s.createAnalyser();if(rr(p,u),!(u.maxDecibels>u.minDecibels))throw r();return En(p,u,"fftSize"),En(p,u,"maxDecibels"),En(p,u,"minDecibels"),En(p,u,"smoothingTimeConstant"),t(jv,()=>jv(p))||OO(p),p},jO=t=>t===null?null:t.hasOwnProperty("AudioBuffer")?t.AudioBuffer:null,Wn=(t,r,s)=>{const u=r[s];u!==void 0&&u!==t[s].value&&(t[s].value=u)},zO=t=>{t.start=(r=>{let s=!1;return(u=0,p=0,d)=>{if(s)throw Fr();r.call(t,u,p,d),s=!0}})(t.start)},Mh=t=>{t.start=(r=>(s=0,u=0,p)=>{if(typeof p=="number"&&p<0||u<0||s<0)throw new RangeError("The parameters can't be negative.");r.call(t,s,u,p)})(t.start)},Nh=t=>{t.stop=(r=>(s=0)=>{if(s<0)throw new RangeError("The parameter can't be negative.");r.call(t,s)})(t.stop)},VO=(t,r,s,u,p,d,b,k,y,_,S)=>(P,N)=>{const L=P.createBufferSource();return rr(L,N),Wn(L,N,"playbackRate"),En(L,N,"buffer"),En(L,N,"loop"),En(L,N,"loopEnd"),En(L,N,"loopStart"),r(s,()=>s(P))||zO(L),r(u,()=>u(P))||y(L),r(p,()=>p(P))||_(L,P),r(d,()=>d(P))||Mh(L),r(b,()=>b(P))||S(L,P),r(k,()=>k(P))||Nh(L),t(P,L),L},WO=t=>t===null?null:t.hasOwnProperty("AudioContext")?t.AudioContext:t.hasOwnProperty("webkitAudioContext")?t.webkitAudioContext:null,UO=(t,r)=>(s,u,p)=>{const d=s.destination;if(d.channelCount!==u)try{d.channelCount=u}catch{}p&&d.channelCountMode!=="explicit"&&(d.channelCountMode="explicit"),d.maxChannelCount===0&&Object.defineProperty(d,"maxChannelCount",{value:u});const b=t(s,{channelCount:u,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,gain:1});return r(b,"channelCount",k=>()=>k.call(b),k=>y=>{k.call(b,y);try{d.channelCount=y}catch(_){if(y>d.maxChannelCount)throw _}}),r(b,"channelCountMode",k=>()=>k.call(b),k=>y=>{k.call(b,y),d.channelCountMode=y}),r(b,"channelInterpretation",k=>()=>k.call(b),k=>y=>{k.call(b,y),d.channelInterpretation=y}),Object.defineProperty(b,"maxChannelCount",{get:()=>d.maxChannelCount}),b.connect(d),b},HO=t=>t===null?null:t.hasOwnProperty("AudioWorkletNode")?t.AudioWorkletNode:null,GO=(t,r)=>t===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(t*r))))),o_=(t,r)=>{const s=t.createBiquadFilter();return rr(s,r),Wn(s,r,"Q"),Wn(s,r,"detune"),Wn(s,r,"frequency"),Wn(s,r,"gain"),En(s,r,"type"),s},QO=(t,r)=>(s,u)=>{const p=s.createChannelMerger(u.numberOfInputs);return t!==null&&t.name==="webkitAudioContext"&&r(s,p),rr(p,u),p},YO=t=>{const r=t.numberOfOutputs;Object.defineProperty(t,"channelCount",{get:()=>r,set:s=>{if(s!==r)throw Fr()}}),Object.defineProperty(t,"channelCountMode",{get:()=>"explicit",set:s=>{if(s!=="explicit")throw Fr()}}),Object.defineProperty(t,"channelInterpretation",{get:()=>"discrete",set:s=>{if(s!=="discrete")throw Fr()}})},Ih=(t,r)=>{const s=t.createChannelSplitter(r.numberOfOutputs);return rr(s,r),YO(s),s},KO=(t,r,s,u,p)=>(d,b)=>{if(d.createConstantSource===void 0)return s(d,b);const k=d.createConstantSource();return rr(k,b),Wn(k,b,"offset"),r(u,()=>u(d))||Mh(k),r(p,()=>p(d))||Nh(k),t(d,k),k},dl=(t,r)=>(t.connect=r.connect.bind(r),t.disconnect=r.disconnect.bind(r),t),XO=(t,r,s,u)=>(p,{offset:d,...b})=>{const k=p.createBuffer(1,2,44100),y=r(p,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),_=s(p,{...b,gain:d}),S=k.getChannelData(0);S[0]=1,S[1]=1,y.buffer=k,y.loop=!0;const P={get bufferSize(){},get channelCount(){return _.channelCount},set channelCount(R){_.channelCount=R},get channelCountMode(){return _.channelCountMode},set channelCountMode(R){_.channelCountMode=R},get channelInterpretation(){return _.channelInterpretation},set channelInterpretation(R){_.channelInterpretation=R},get context(){return _.context},get inputs(){return[]},get numberOfInputs(){return y.numberOfInputs},get numberOfOutputs(){return _.numberOfOutputs},get offset(){return _.gain},get onended(){return y.onended},set onended(R){y.onended=R},addEventListener(...R){return y.addEventListener(R[0],R[1],R[2])},dispatchEvent(...R){return y.dispatchEvent(R[0])},removeEventListener(...R){return y.removeEventListener(R[0],R[1],R[2])},start(R=0){y.start.call(y,R)},stop(R=0){y.stop.call(y,R)}},N=()=>y.connect(_),L=()=>y.disconnect(_);return t(p,y),u(dl(P,_),N,L)},qO=(t,r)=>(s,u)=>{const p=s.createConvolver();if(rr(p,u),u.disableNormalization===p.normalize&&(p.normalize=!u.disableNormalization),En(p,u,"buffer"),u.channelCount>2||(r(p,"channelCount",d=>()=>d.call(p),d=>b=>{if(b>2)throw t();return d.call(p,b)}),u.channelCountMode==="max"))throw t();return r(p,"channelCountMode",d=>()=>d.call(p),d=>b=>{if(b==="max")throw t();return d.call(p,b)}),p},i_=(t,r)=>{const s=t.createDelay(r.maxDelayTime);return rr(s,r),Wn(s,r,"delayTime"),s},ZO=t=>(r,s)=>{const u=r.createDynamicsCompressor();if(rr(u,s),s.channelCount>2||s.channelCountMode==="max")throw t();return Wn(u,s,"attack"),Wn(u,s,"knee"),Wn(u,s,"ratio"),Wn(u,s,"release"),Wn(u,s,"threshold"),u},Wo=(t,r)=>{const s=t.createGain();return rr(s,r),Wn(s,r,"gain"),s},JO=t=>(r,s,u)=>{if(r.createIIRFilter===void 0)return t(r,s,u);const p=r.createIIRFilter(u.feedforward,u.feedback);return rr(p,u),p};function $O(t,r){const s=r[0]*r[0]+r[1]*r[1];return[(t[0]*r[0]+t[1]*r[1])/s,(t[1]*r[0]-t[0]*r[1])/s]}function eB(t,r){return[t[0]*r[0]-t[1]*r[1],t[0]*r[1]+t[1]*r[0]]}function zv(t,r){let s=[0,0];for(let u=t.length-1;u>=0;u-=1)s=eB(s,r),s[0]+=t[u];return s}const tB=(t,r,s,u)=>(p,d,{channelCount:b,channelCountMode:k,channelInterpretation:y,feedback:_,feedforward:S})=>{const P=GO(d,p.sampleRate),N=_ instanceof Float64Array?_:new Float64Array(_),L=S instanceof Float64Array?S:new Float64Array(S),R=N.length,O=L.length,q=Math.min(R,O);if(R===0||R>20)throw u();if(N[0]===0)throw r();if(O===0||O>20)throw u();if(L[0]===0)throw r();if(N[0]!==1){for(let X=0;X{const de=X.inputBuffer,le=X.outputBuffer,me=de.numberOfChannels;for(let pe=0;pet.createMediaElementSource(r.mediaElement),rB=(t,r)=>{const s=t.createMediaStreamDestination();return rr(s,r),s.numberOfOutputs===1&&Object.defineProperty(s,"numberOfOutputs",{get:()=>0}),s},oB=(t,{mediaStream:r})=>{const s=r.getAudioTracks();s.sort((d,b)=>d.idb.id?1:0);const u=s.slice(0,1),p=t.createMediaStreamSource(new MediaStream(u));return Object.defineProperty(p,"mediaStream",{value:r}),p},iB=(t,r)=>(s,{mediaStreamTrack:u})=>{if(typeof s.createMediaStreamTrackSource=="function")return s.createMediaStreamTrackSource(u);const p=new MediaStream([u]),d=s.createMediaStreamSource(p);if(u.kind!=="audio")throw t();if(r(s))throw new TypeError;return d},aB=t=>t===null?null:t.hasOwnProperty("OfflineAudioContext")?t.OfflineAudioContext:t.hasOwnProperty("webkitOfflineAudioContext")?t.webkitOfflineAudioContext:null,sB=(t,r,s,u,p,d)=>(b,k)=>{const y=b.createOscillator();return rr(y,k),Wn(y,k,"detune"),Wn(y,k,"frequency"),k.periodicWave!==void 0?y.setPeriodicWave(k.periodicWave):En(y,k,"type"),r(s,()=>s(b))||Mh(y),r(u,()=>u(b))||d(y,b),r(p,()=>p(b))||Nh(y),t(b,y),y},lB=t=>(r,s)=>{const u=r.createPanner();return u.orientationX===void 0?t(r,s):(rr(u,s),Wn(u,s,"orientationX"),Wn(u,s,"orientationY"),Wn(u,s,"orientationZ"),Wn(u,s,"positionX"),Wn(u,s,"positionY"),Wn(u,s,"positionZ"),En(u,s,"coneInnerAngle"),En(u,s,"coneOuterAngle"),En(u,s,"coneOuterGain"),En(u,s,"distanceModel"),En(u,s,"maxDistance"),En(u,s,"panningModel"),En(u,s,"refDistance"),En(u,s,"rolloffFactor"),u)},cB=(t,r,s,u,p,d,b,k,y,_)=>(S,{coneInnerAngle:P,coneOuterAngle:N,coneOuterGain:L,distanceModel:R,maxDistance:O,orientationX:q,orientationY:F,orientationZ:D,panningModel:z,positionX:Y,positionY:U,positionZ:ee,refDistance:Z,rolloffFactor:X,...de})=>{const le=S.createPanner();if(de.channelCount>2||de.channelCountMode==="max")throw b();rr(le,de);const me={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},pe=s(S,{...me,channelInterpretation:"speakers",numberOfInputs:6}),xe=u(S,{...de,gain:1}),we=u(S,{...me,gain:1}),ge=u(S,{...me,gain:0}),_e=u(S,{...me,gain:0}),ve=u(S,{...me,gain:0}),ce=u(S,{...me,gain:0}),ke=u(S,{...me,gain:0}),Pe=p(S,256,6,1),Ae=d(S,{...me,curve:new Float32Array([1,1]),oversample:"none"});let Me=[q,F,D],tt=[Y,U,ee];const He=new Float32Array(1);Pe.onaudioprocess=({inputBuffer:nt})=>{const jt=[y(nt,He,0),y(nt,He,1),y(nt,He,2)];jt.some((Rt,Wt)=>Rt!==Me[Wt])&&(le.setOrientation(...jt),Me=jt);const hn=[y(nt,He,3),y(nt,He,4),y(nt,He,5)];hn.some((Rt,Wt)=>Rt!==tt[Wt])&&(le.setPosition(...hn),tt=hn)},Object.defineProperty(ge.gain,"defaultValue",{get:()=>0}),Object.defineProperty(_e.gain,"defaultValue",{get:()=>0}),Object.defineProperty(ve.gain,"defaultValue",{get:()=>0}),Object.defineProperty(ce.gain,"defaultValue",{get:()=>0}),Object.defineProperty(ke.gain,"defaultValue",{get:()=>0});const Ge={get bufferSize(){},get channelCount(){return le.channelCount},set channelCount(nt){if(nt>2)throw b();xe.channelCount=nt,le.channelCount=nt},get channelCountMode(){return le.channelCountMode},set channelCountMode(nt){if(nt==="max")throw b();xe.channelCountMode=nt,le.channelCountMode=nt},get channelInterpretation(){return le.channelInterpretation},set channelInterpretation(nt){xe.channelInterpretation=nt,le.channelInterpretation=nt},get coneInnerAngle(){return le.coneInnerAngle},set coneInnerAngle(nt){le.coneInnerAngle=nt},get coneOuterAngle(){return le.coneOuterAngle},set coneOuterAngle(nt){le.coneOuterAngle=nt},get coneOuterGain(){return le.coneOuterGain},set coneOuterGain(nt){if(nt<0||nt>1)throw r();le.coneOuterGain=nt},get context(){return le.context},get distanceModel(){return le.distanceModel},set distanceModel(nt){le.distanceModel=nt},get inputs(){return[xe]},get maxDistance(){return le.maxDistance},set maxDistance(nt){if(nt<0)throw new RangeError;le.maxDistance=nt},get numberOfInputs(){return le.numberOfInputs},get numberOfOutputs(){return le.numberOfOutputs},get orientationX(){return we.gain},get orientationY(){return ge.gain},get orientationZ(){return _e.gain},get panningModel(){return le.panningModel},set panningModel(nt){le.panningModel=nt},get positionX(){return ve.gain},get positionY(){return ce.gain},get positionZ(){return ke.gain},get refDistance(){return le.refDistance},set refDistance(nt){if(nt<0)throw new RangeError;le.refDistance=nt},get rolloffFactor(){return le.rolloffFactor},set rolloffFactor(nt){if(nt<0)throw new RangeError;le.rolloffFactor=nt},addEventListener(...nt){return xe.addEventListener(nt[0],nt[1],nt[2])},dispatchEvent(...nt){return xe.dispatchEvent(nt[0])},removeEventListener(...nt){return xe.removeEventListener(nt[0],nt[1],nt[2])}};P!==Ge.coneInnerAngle&&(Ge.coneInnerAngle=P),N!==Ge.coneOuterAngle&&(Ge.coneOuterAngle=N),L!==Ge.coneOuterGain&&(Ge.coneOuterGain=L),R!==Ge.distanceModel&&(Ge.distanceModel=R),O!==Ge.maxDistance&&(Ge.maxDistance=O),q!==Ge.orientationX.value&&(Ge.orientationX.value=q),F!==Ge.orientationY.value&&(Ge.orientationY.value=F),D!==Ge.orientationZ.value&&(Ge.orientationZ.value=D),z!==Ge.panningModel&&(Ge.panningModel=z),Y!==Ge.positionX.value&&(Ge.positionX.value=Y),U!==Ge.positionY.value&&(Ge.positionY.value=U),ee!==Ge.positionZ.value&&(Ge.positionZ.value=ee),Z!==Ge.refDistance&&(Ge.refDistance=Z),X!==Ge.rolloffFactor&&(Ge.rolloffFactor=X),(Me[0]!==1||Me[1]!==0||Me[2]!==0)&&le.setOrientation(...Me),(tt[0]!==0||tt[1]!==0||tt[2]!==0)&&le.setPosition(...tt);const pt=()=>{xe.connect(le),t(xe,Ae,0,0),Ae.connect(we).connect(pe,0,0),Ae.connect(ge).connect(pe,0,1),Ae.connect(_e).connect(pe,0,2),Ae.connect(ve).connect(pe,0,3),Ae.connect(ce).connect(pe,0,4),Ae.connect(ke).connect(pe,0,5),pe.connect(Pe).connect(S.destination)},fn=()=>{xe.disconnect(le),k(xe,Ae,0,0),Ae.disconnect(we),we.disconnect(pe),Ae.disconnect(ge),ge.disconnect(pe),Ae.disconnect(_e),_e.disconnect(pe),Ae.disconnect(ve),ve.disconnect(pe),Ae.disconnect(ce),ce.disconnect(pe),Ae.disconnect(ke),ke.disconnect(pe),pe.disconnect(Pe),Pe.disconnect(S.destination)};return _(dl(Ge,le),pt,fn)},uB=t=>(r,{disableNormalization:s,imag:u,real:p})=>{const d=u instanceof Float32Array?u:new Float32Array(u),b=p instanceof Float32Array?p:new Float32Array(p),k=r.createPeriodicWave(b,d,{disableNormalization:s});if(Array.from(u).length<2)throw t();return k},sd=(t,r,s,u)=>t.createScriptProcessor(r,s,u),fB=(t,r)=>(s,u)=>{const p=u.channelCountMode;if(p==="clamped-max")throw r();if(s.createStereoPanner===void 0)return t(s,u);const d=s.createStereoPanner();return rr(d,u),Wn(d,u,"pan"),Object.defineProperty(d,"channelCountMode",{get:()=>p,set:b=>{if(b!==p)throw r()}}),d},dB=(t,r,s,u,p,d)=>{const k=new Float32Array([1,1]),y=Math.PI/2,_={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},S={..._,oversample:"none"},P=(R,O,q,F)=>{const D=new Float32Array(16385),z=new Float32Array(16385);for(let de=0;de<16385;de+=1){const le=de/16384*y;D[de]=Math.cos(le),z[de]=Math.sin(le)}const Y=s(R,{..._,gain:0}),U=u(R,{...S,curve:D}),ee=u(R,{...S,curve:k}),Z=s(R,{..._,gain:0}),X=u(R,{...S,curve:z});return{connectGraph(){O.connect(Y),O.connect(ee.inputs===void 0?ee:ee.inputs[0]),O.connect(Z),ee.connect(q),q.connect(U.inputs===void 0?U:U.inputs[0]),q.connect(X.inputs===void 0?X:X.inputs[0]),U.connect(Y.gain),X.connect(Z.gain),Y.connect(F,0,0),Z.connect(F,0,1)},disconnectGraph(){O.disconnect(Y),O.disconnect(ee.inputs===void 0?ee:ee.inputs[0]),O.disconnect(Z),ee.disconnect(q),q.disconnect(U.inputs===void 0?U:U.inputs[0]),q.disconnect(X.inputs===void 0?X:X.inputs[0]),U.disconnect(Y.gain),X.disconnect(Z.gain),Y.disconnect(F,0,0),Z.disconnect(F,0,1)}}},N=(R,O,q,F)=>{const D=new Float32Array(16385),z=new Float32Array(16385),Y=new Float32Array(16385),U=new Float32Array(16385),ee=Math.floor(16385/2);for(let ve=0;ve<16385;ve+=1)if(ve>ee){const ce=(ve-ee)/(16384-ee)*y;D[ve]=Math.cos(ce),z[ve]=Math.sin(ce),Y[ve]=0,U[ve]=1}else{const ce=ve/(16384-ee)*y;D[ve]=1,z[ve]=0,Y[ve]=Math.cos(ce),U[ve]=Math.sin(ce)}const Z=r(R,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),X=s(R,{..._,gain:0}),de=u(R,{...S,curve:D}),le=s(R,{..._,gain:0}),me=u(R,{...S,curve:z}),pe=u(R,{...S,curve:k}),xe=s(R,{..._,gain:0}),we=u(R,{...S,curve:Y}),ge=s(R,{..._,gain:0}),_e=u(R,{...S,curve:U});return{connectGraph(){O.connect(Z),O.connect(pe.inputs===void 0?pe:pe.inputs[0]),Z.connect(X,0),Z.connect(le,0),Z.connect(xe,1),Z.connect(ge,1),pe.connect(q),q.connect(de.inputs===void 0?de:de.inputs[0]),q.connect(me.inputs===void 0?me:me.inputs[0]),q.connect(we.inputs===void 0?we:we.inputs[0]),q.connect(_e.inputs===void 0?_e:_e.inputs[0]),de.connect(X.gain),me.connect(le.gain),we.connect(xe.gain),_e.connect(ge.gain),X.connect(F,0,0),xe.connect(F,0,0),le.connect(F,0,1),ge.connect(F,0,1)},disconnectGraph(){O.disconnect(Z),O.disconnect(pe.inputs===void 0?pe:pe.inputs[0]),Z.disconnect(X,0),Z.disconnect(le,0),Z.disconnect(xe,1),Z.disconnect(ge,1),pe.disconnect(q),q.disconnect(de.inputs===void 0?de:de.inputs[0]),q.disconnect(me.inputs===void 0?me:me.inputs[0]),q.disconnect(we.inputs===void 0?we:we.inputs[0]),q.disconnect(_e.inputs===void 0?_e:_e.inputs[0]),de.disconnect(X.gain),me.disconnect(le.gain),we.disconnect(xe.gain),_e.disconnect(ge.gain),X.disconnect(F,0,0),xe.disconnect(F,0,0),le.disconnect(F,0,1),ge.disconnect(F,0,1)}}},L=(R,O,q,F,D)=>{if(O===1)return P(R,q,F,D);if(O===2)return N(R,q,F,D);throw p()};return(R,{channelCount:O,channelCountMode:q,pan:F,...D})=>{if(q==="max")throw p();const z=t(R,{...D,channelCount:1,channelCountMode:q,numberOfInputs:2}),Y=s(R,{...D,channelCount:O,channelCountMode:q,gain:1}),U=s(R,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:F});let{connectGraph:ee,disconnectGraph:Z}=L(R,O,Y,U,z);Object.defineProperty(U.gain,"defaultValue",{get:()=>0}),Object.defineProperty(U.gain,"maxValue",{get:()=>1}),Object.defineProperty(U.gain,"minValue",{get:()=>-1});const X={get bufferSize(){},get channelCount(){return Y.channelCount},set channelCount(pe){Y.channelCount!==pe&&(de&&Z(),{connectGraph:ee,disconnectGraph:Z}=L(R,pe,Y,U,z),de&&ee()),Y.channelCount=pe},get channelCountMode(){return Y.channelCountMode},set channelCountMode(pe){if(pe==="clamped-max"||pe==="max")throw p();Y.channelCountMode=pe},get channelInterpretation(){return Y.channelInterpretation},set channelInterpretation(pe){Y.channelInterpretation=pe},get context(){return Y.context},get inputs(){return[Y]},get numberOfInputs(){return Y.numberOfInputs},get numberOfOutputs(){return Y.numberOfOutputs},get pan(){return U.gain},addEventListener(...pe){return Y.addEventListener(pe[0],pe[1],pe[2])},dispatchEvent(...pe){return Y.dispatchEvent(pe[0])},removeEventListener(...pe){return Y.removeEventListener(pe[0],pe[1],pe[2])}};let de=!1;const le=()=>{ee(),de=!0},me=()=>{Z(),de=!1};return d(dl(X,z),le,me)}},pB=(t,r,s,u,p,d,b)=>(k,y)=>{const _=k.createWaveShaper();if(d!==null&&d.name==="webkitAudioContext"&&k.createGain().gain.automationRate===void 0)return s(k,y);rr(_,y);const S=y.curve===null||y.curve instanceof Float32Array?y.curve:new Float32Array(y.curve);if(S!==null&&S.length<2)throw r();En(_,{curve:S},"curve"),En(_,y,"oversample");let P=null,N=!1;return b(_,"curve",O=>()=>O.call(_),O=>q=>(O.call(_,q),N&&(u(q)&&P===null?P=t(k,_):!u(q)&&P!==null&&(P(),P=null)),q)),p(_,()=>{N=!0,u(_.curve)&&(P=t(k,_))},()=>{N=!1,P!==null&&(P(),P=null)})},hB=(t,r,s,u,p)=>(d,{curve:b,oversample:k,...y})=>{const _=d.createWaveShaper(),S=d.createWaveShaper();rr(_,y),rr(S,y);const P=s(d,{...y,gain:1}),N=s(d,{...y,gain:-1}),L=s(d,{...y,gain:1}),R=s(d,{...y,gain:-1});let O=null,q=!1,F=null;const D={get bufferSize(){},get channelCount(){return _.channelCount},set channelCount(U){P.channelCount=U,N.channelCount=U,_.channelCount=U,L.channelCount=U,S.channelCount=U,R.channelCount=U},get channelCountMode(){return _.channelCountMode},set channelCountMode(U){P.channelCountMode=U,N.channelCountMode=U,_.channelCountMode=U,L.channelCountMode=U,S.channelCountMode=U,R.channelCountMode=U},get channelInterpretation(){return _.channelInterpretation},set channelInterpretation(U){P.channelInterpretation=U,N.channelInterpretation=U,_.channelInterpretation=U,L.channelInterpretation=U,S.channelInterpretation=U,R.channelInterpretation=U},get context(){return _.context},get curve(){return F},set curve(U){if(U!==null&&U.length<2)throw r();if(U===null)_.curve=U,S.curve=U;else{const ee=U.length,Z=new Float32Array(ee+2-ee%2),X=new Float32Array(ee+2-ee%2);Z[0]=U[0],X[0]=-U[ee-1];const de=Math.ceil((ee+1)/2),le=(ee+1)/2-1;for(let me=1;me{P.connect(_).connect(L),P.connect(N).connect(S).connect(R).connect(L),q=!0,u(F)&&(O=t(d,P))},Y=()=>{P.disconnect(_),_.disconnect(L),P.disconnect(N),N.disconnect(S),S.disconnect(R),R.disconnect(L),q=!1,O!==null&&(O(),O=null)};return p(dl(D,L),z,Y)},Mo=()=>new DOMException("","NotSupportedError"),mB={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},gB=(t,r,s,u,p,d,b)=>class extends t{constructor(y,_){const S=p(y),P={...mB,..._},N=s(S,P),L=d(S),R=L?u():null,O=y.sampleRate/2;super(y,!1,N,R),this._detune=r(this,L,N.detune,153600,-153600),this._frequency=r(this,L,N.frequency,O,-O),this._nativeOscillatorNode=N,this._onended=null,this._oscillatorNodeRenderer=R,this._oscillatorNodeRenderer!==null&&P.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=P.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(y){const _=typeof y=="function"?b(this,y):null;this._nativeOscillatorNode.onended=_;const S=this._nativeOscillatorNode.onended;this._onended=S!==null&&S===_?y:S}get type(){return this._nativeOscillatorNode.type}set type(y){this._nativeOscillatorNode.type=y,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(y){this._nativeOscillatorNode.setPeriodicWave(y),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=y)}start(y=0){if(this._nativeOscillatorNode.start(y),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=y),this.context.state!=="closed"){nl(this);const _=()=>{this._nativeOscillatorNode.removeEventListener("ended",_),Ci(this)&&Gc(this)};this._nativeOscillatorNode.addEventListener("ended",_)}}stop(y=0){this._nativeOscillatorNode.stop(y),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=y)}},bB=(t,r,s,u,p)=>()=>{const d=new WeakMap;let b=null,k=null,y=null;const _=async(S,P)=>{let N=s(S);const L=Or(N,P);if(!L){const R={channelCount:N.channelCount,channelCountMode:N.channelCountMode,channelInterpretation:N.channelInterpretation,detune:N.detune.value,frequency:N.frequency.value,periodicWave:b===null?void 0:b,type:N.type};N=r(P,R),k!==null&&N.start(k),y!==null&&N.stop(y)}return d.set(P,N),L?(await t(P,S.detune,N.detune),await t(P,S.frequency,N.frequency)):(await u(P,S.detune,N.detune),await u(P,S.frequency,N.frequency)),await p(S,P,N),N};return{set periodicWave(S){b=S},set start(S){k=S},set stop(S){y=S},render(S,P){const N=d.get(P);return N!==void 0?Promise.resolve(N):_(S,P)}}},vB={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},kB=(t,r,s,u,p,d,b)=>class extends t{constructor(y,_){const S=p(y),P={...vB,..._},N=s(S,P),L=d(S),R=L?u():null;super(y,!1,N,R),this._nativePannerNode=N,this._orientationX=r(this,L,N.orientationX,Hr,to),this._orientationY=r(this,L,N.orientationY,Hr,to),this._orientationZ=r(this,L,N.orientationZ,Hr,to),this._positionX=r(this,L,N.positionX,Hr,to),this._positionY=r(this,L,N.positionY,Hr,to),this._positionZ=r(this,L,N.positionZ,Hr,to),b(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(y){this._nativePannerNode.coneInnerAngle=y}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(y){this._nativePannerNode.coneOuterAngle=y}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(y){this._nativePannerNode.coneOuterGain=y}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(y){this._nativePannerNode.distanceModel=y}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(y){this._nativePannerNode.maxDistance=y}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(y){this._nativePannerNode.panningModel=y}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(y){this._nativePannerNode.refDistance=y}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(y){this._nativePannerNode.rolloffFactor=y}},yB=(t,r,s,u,p,d,b,k,y,_)=>()=>{const S=new WeakMap;let P=null;const N=async(L,R)=>{let O=null,q=d(L);const F={channelCount:q.channelCount,channelCountMode:q.channelCountMode,channelInterpretation:q.channelInterpretation},D={...F,coneInnerAngle:q.coneInnerAngle,coneOuterAngle:q.coneOuterAngle,coneOuterGain:q.coneOuterGain,distanceModel:q.distanceModel,maxDistance:q.maxDistance,panningModel:q.panningModel,refDistance:q.refDistance,rolloffFactor:q.rolloffFactor},z=Or(q,R);if("bufferSize"in q)O=u(R,{...F,gain:1});else if(!z){const Y={...D,orientationX:q.orientationX.value,orientationY:q.orientationY.value,orientationZ:q.orientationZ.value,positionX:q.positionX.value,positionY:q.positionY.value,positionZ:q.positionZ.value};q=p(R,Y)}if(S.set(R,O===null?q:O),O!==null){if(P===null){if(b===null)throw new Error("Missing the native OfflineAudioContext constructor.");const me=new b(6,L.context.length,R.sampleRate),pe=r(me,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});pe.connect(me.destination),P=(async()=>{const xe=await Promise.all([L.orientationX,L.orientationY,L.orientationZ,L.positionX,L.positionY,L.positionZ].map(async(we,ge)=>{const _e=s(me,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:ge===0?1:0});return await k(me,we,_e.offset),_e}));for(let we=0;we<6;we+=1)xe[we].connect(pe,0,we),xe[we].start(0);return _(me)})()}const Y=await P,U=u(R,{...F,gain:1});await y(L,R,U);const ee=[];for(let me=0;mewe!==Z[ge])||xe.some((we,ge)=>we!==X[ge])){Z=pe,X=xe;const we=me/R.sampleRate;de.gain.setValueAtTime(0,we),de=u(R,{...F,gain:0}),le=p(R,{...D,orientationX:Z[0],orientationY:Z[1],orientationZ:Z[2],positionX:X[0],positionY:X[1],positionZ:X[2]}),de.gain.setValueAtTime(1,we),U.connect(de).connect(le.inputs[0]),le.connect(O)}}return O}return z?(await t(R,L.orientationX,q.orientationX),await t(R,L.orientationY,q.orientationY),await t(R,L.orientationZ,q.orientationZ),await t(R,L.positionX,q.positionX),await t(R,L.positionY,q.positionY),await t(R,L.positionZ,q.positionZ)):(await k(R,L.orientationX,q.orientationX),await k(R,L.orientationY,q.orientationY),await k(R,L.orientationZ,q.orientationZ),await k(R,L.positionX,q.positionX),await k(R,L.positionY,q.positionY),await k(R,L.positionZ,q.positionZ)),fl(q)?await y(L,R,q.inputs[0]):await y(L,R,q),q};return{render(L,R){const O=S.get(R);return O!==void 0?Promise.resolve(O):N(L,R)}}},_B={disableNormalization:!1},wB=(t,r,s,u)=>class a_{constructor(d,b){const k=r(d),y=u({..._B,...b}),_=t(k,y);return s.add(_),_}static[Symbol.hasInstance](d){return d!==null&&typeof d=="object"&&Object.getPrototypeOf(d)===a_.prototype||s.has(d)}},AB=(t,r)=>(s,u,p)=>(t(u).replay(p),r(u,s,p)),CB=(t,r,s)=>async(u,p,d)=>{const b=t(u);await Promise.all(b.activeInputs.map((k,y)=>Array.from(k).map(async([_,S])=>{const N=await r(_).render(_,p),L=u.context.destination;!s(_)&&(u!==L||!s(u))&&N.connect(d,S,y)})).reduce((k,y)=>[...k,...y],[]))},xB=(t,r,s)=>async(u,p,d)=>{const b=r(u);await Promise.all(Array.from(b.activeInputs).map(async([k,y])=>{const S=await t(k).render(k,p);s(k)||S.connect(d,y)}))},SB=(t,r,s,u)=>p=>t(Y1,()=>Y1(p))?Promise.resolve(t(u,u)).then(d=>{if(!d){const b=s(p,512,0,1);p.oncomplete=()=>{b.onaudioprocess=null,b.disconnect()},b.onaudioprocess=()=>p.currentTime,b.connect(p.destination)}return p.startRendering()}):new Promise(d=>{const b=r(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});p.oncomplete=k=>{b.disconnect(),d(k.renderedBuffer)},b.connect(p.destination),p.startRendering()}),EB=t=>(r,s)=>t.set(r,s),PB={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},MB=(t,r,s,u,p,d)=>class extends t{constructor(k,y){const _=p(k),S={...PB,...y},P=s(_,S),N=d(_),L=N?u():null;super(k,!1,P,L),this._pan=r(this,N,P.pan)}get pan(){return this._pan}},NB=(t,r,s,u,p)=>()=>{const d=new WeakMap,b=async(k,y)=>{let _=s(k);const S=Or(_,y);if(!S){const P={channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,pan:_.pan.value};_=r(y,P)}return d.set(y,_),S?await t(y,k.pan,_.pan):await u(y,k.pan,_.pan),fl(_)?await p(k,y,_.inputs[0]):await p(k,y,_),_};return{render(k,y){const _=d.get(y);return _!==void 0?Promise.resolve(_):b(k,y)}}},IB=t=>()=>{if(t===null)return!1;try{new t({length:1,sampleRate:44100})}catch{return!1}return!0},RB=(t,r)=>async()=>{if(t===null)return!0;if(r===null)return!1;const s=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),u=new r(1,128,44100),p=URL.createObjectURL(s);let d=!1,b=!1;try{await u.audioWorklet.addModule(p);const k=new t(u,"a",{numberOfOutputs:0}),y=u.createOscillator();k.port.onmessage=()=>d=!0,k.onprocessorerror=()=>b=!0,y.connect(k),y.start(0),await u.startRendering(),await new Promise(_=>setTimeout(_))}catch{}finally{URL.revokeObjectURL(p)}return d&&!b},TB=(t,r)=>()=>{if(r===null)return Promise.resolve(!1);const s=new r(1,1,44100),u=t(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(p=>{s.oncomplete=()=>{u.disconnect(),p(s.currentTime!==0)},s.startRendering()})},FB=()=>new DOMException("","UnknownError"),LB={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},DB=(t,r,s,u,p,d,b)=>class extends t{constructor(y,_){const S=p(y),P={...LB,..._},N=s(S,P),R=d(S)?u():null;super(y,!0,N,R),this._isCurveNullified=!1,this._nativeWaveShaperNode=N,b(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(y){if(y===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(y.length<2)throw r();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=y}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(y){this._nativeWaveShaperNode.oversample=y}},OB=(t,r,s)=>()=>{const u=new WeakMap,p=async(d,b)=>{let k=r(d);if(!Or(k,b)){const _={channelCount:k.channelCount,channelCountMode:k.channelCountMode,channelInterpretation:k.channelInterpretation,curve:k.curve,oversample:k.oversample};k=t(b,_)}return u.set(b,k),fl(k)?await s(d,b,k.inputs[0]):await s(d,b,k),k};return{render(d,b){const k=u.get(b);return k!==void 0?Promise.resolve(k):p(d,b)}}},BB=()=>typeof window>"u"?null:window,jB=(t,r)=>s=>{s.copyFromChannel=(u,p,d=0)=>{const b=t(d),k=t(p);if(k>=s.numberOfChannels)throw r();const y=s.length,_=s.getChannelData(k),S=u.length;for(let P=b<0?-b:0;P+b{const b=t(d),k=t(p);if(k>=s.numberOfChannels)throw r();const y=s.length,_=s.getChannelData(k),S=u.length;for(let P=b<0?-b:0;P+br=>{r.copyFromChannel=(s=>(u,p,d=0)=>{const b=t(d),k=t(p);if(b(u,p,d=0)=>{const b=t(d),k=t(p);if(b(r,s)=>{const u=s.createBuffer(1,1,44100);r.buffer===null&&(r.buffer=u),t(r,"buffer",p=>()=>{const d=p.call(r);return d===u?null:d},p=>d=>p.call(r,d===null?u:d))},WB=(t,r)=>(s,u)=>{u.channelCount=1,u.channelCountMode="explicit",Object.defineProperty(u,"channelCount",{get:()=>1,set:()=>{throw t()}}),Object.defineProperty(u,"channelCountMode",{get:()=>"explicit",set:()=>{throw t()}});const p=s.createBufferSource();r(u,()=>{const k=u.numberOfInputs;for(let y=0;yp.disconnect(u))},s_=(t,r,s)=>t.copyFromChannel===void 0?t.getChannelData(s)[0]:(t.copyFromChannel(r,s),r[0]),l_=t=>{if(t===null)return!1;const r=t.length;return r%2!==0?t[Math.floor(r/2)]!==0:t[r/2-1]+t[r/2]!==0},Kc=(t,r,s,u)=>{let p=t;for(;!p.hasOwnProperty(r);)p=Object.getPrototypeOf(p);const{get:d,set:b}=Object.getOwnPropertyDescriptor(p,r);Object.defineProperty(t,r,{get:s(d),set:u(b)})},UB=t=>({...t,channelCount:t.numberOfOutputs}),HB=t=>{const{imag:r,real:s}=t;return r===void 0?s===void 0?{...t,imag:[0,0],real:[0,0]}:{...t,imag:Array.from(s,()=>0),real:s}:s===void 0?{...t,imag:r,real:Array.from(r,()=>0)}:{...t,imag:r,real:s}},c_=(t,r,s)=>{try{t.setValueAtTime(r,s)}catch(u){if(u.code!==9)throw u;c_(t,r,s+1e-7)}},GB=t=>{const r=t.createBufferSource();r.start();try{r.start()}catch{return!0}return!1},QB=t=>{const r=t.createBufferSource(),s=t.createBuffer(1,1,44100);r.buffer=s;try{r.start(0,1)}catch{return!1}return!0},YB=t=>{const r=t.createBufferSource();r.start();try{r.stop()}catch{return!1}return!0},Rh=t=>{const r=t.createOscillator();try{r.start(-1)}catch(s){return s instanceof RangeError}return!1},u_=t=>{const r=t.createBuffer(1,1,44100),s=t.createBufferSource();s.buffer=r,s.start(),s.stop();try{return s.stop(),!0}catch{return!1}},Th=t=>{const r=t.createOscillator();try{r.stop(-1)}catch(s){return s instanceof RangeError}return!1},KB=t=>{t.start=(r=>(s=0,u=0,p)=>{const d=t.buffer,b=d===null?u:Math.min(d.duration,u);d!==null&&b>d.duration-.5/t.context.sampleRate?r.call(t,s,0,0):r.call(t,s,b,p)})(t.start)},f_=(t,r)=>{const s=r.createGain();t.connect(s);const u=(p=>()=>{p.call(t,s),t.removeEventListener("ended",u)})(t.disconnect);t.addEventListener("ended",u),dl(t,s),t.stop=(p=>{let d=!1;return(b=0)=>{if(d)try{p.call(t,b)}catch{s.gain.setValueAtTime(0,b)}else p.call(t,b),d=!0}})(t.stop)},Xc=(t,r)=>s=>{const u={value:t};return Object.defineProperties(s,{currentTarget:u,target:u}),typeof r=="function"?r.call(t,s):r.handleEvent.call(t,s)},XB=WL(Ka),qB=KL(Ka),ZB=$D(id),d_=new WeakMap,JB=hO(d_),Ti=ID(new Map,new WeakMap),si=BB(),p_=BO(Ti,Ya),h_=pO(io),Er=CB(io,h_,Ha),$B=JL(p_,Fn,Er),Cn=gO(Yy),Xa=aB(si),kn=PO(Xa),m_=new WeakMap,g_=sO(Xc),qc=WO(si),b_=CO(qc),v_=xO(si),ej=SO(si),K1=HO(si),$n=CD(UL(Uy),YL(XB,qB,K0,ZB,X0,io,JB,Hc,Fn,Ka,Ci,Ha,u0),Ti,AO(U1,X0,io,Fn,Ic,Ci),Ya,ad,Mo,XD(K0,U1,io,Fn,Ic,Cn,Ci,kn),tO(m_,io,ha),g_,Cn,b_,v_,ej,kn,K1),tj=ZL($n,$B,Ya,p_,Cn,kn),k_=new WeakSet,Vv=jO(si),y_=UD(new Uint32Array(1)),__=jB(y_,Ya),w_=zB(y_),nj=eD(k_,Ti,Mo,Vv,Xa,IB(Vv),__,w_),ld=XL(Wo),A_=xB(h_,Qc,Ha),Fi=BD(A_),Zc=VO(ld,Ti,GB,QB,YB,Rh,u_,Th,KB,VB(Kc),f_),Li=AB(mO(Qc),A_),rj=rD(Fi,Zc,Fn,Li,Er),ci=xD(HL(Gy),m_,Qy,SD,DL,OL,BL,jL,zL,z1,Vy,qc,c_),oj=nD($n,rj,ci,Fr,Zc,Cn,kn,Xc),ij=pD($n,hD,Ya,Fr,UO(Wo,Kc),Cn,kn,Er),aj=ND(Fi,o_,Fn,Li,Er),qa=EB(d_),sj=MD($n,ci,aj,ad,o_,Cn,kn,qa),pl=DO(Ka,v_),lj=WB(Fr,pl),hl=QO(qc,lj),cj=FD(hl,Fn,Er),uj=TD($n,cj,hl,Cn,kn),fj=OD(Ih,Fn,Er),dj=DD($n,fj,Ih,Cn,kn,UB),pj=XO(ld,Zc,Wo,pl),cd=KO(ld,Ti,pj,Rh,Th),hj=WD(Fi,cd,Fn,Li,Er),mj=VD($n,ci,hj,cd,Cn,kn,Xc),C_=qO(Mo,Kc),gj=QD(C_,Fn,Er),bj=GD($n,gj,C_,Cn,kn,qa),vj=JD(Fi,i_,Fn,Li,Er),kj=ZD($n,ci,vj,i_,Cn,kn,qa),x_=ZO(Mo),yj=oO(Fi,x_,Fn,Li,Er),_j=rO($n,ci,yj,x_,Mo,Cn,kn,qa),wj=dO(Fi,Wo,Fn,Li,Er),Aj=fO($n,ci,wj,Wo,Cn,kn),Cj=tB(ad,Fr,sd,Mo),S_=SB(Ti,Wo,sd,TB(Wo,Xa)),xj=wO(Zc,Fn,Xa,Er,S_),Sj=JO(Cj),Ej=yO($n,Sj,xj,Cn,kn,qa),Pj=mD(ci,hl,cd,sd,Mo,s_,kn,Kc),Mj=new WeakMap,Nj=LO(ij,Pj,g_,kn,Mj,Xc),E_=sB(ld,Ti,Rh,u_,Th,f_),Ij=bB(Fi,E_,Fn,Li,Er),Rj=gB($n,ci,E_,Ij,Cn,kn,Xc),P_=jD(Zc),Tj=hB(P_,Fr,Wo,l_,pl),ud=pB(P_,Fr,Tj,l_,pl,qc,Kc),Fj=cB(K0,Fr,hl,Wo,sd,ud,Mo,X0,s_,pl),M_=lB(Fj),Lj=yB(Fi,hl,cd,Wo,M_,Fn,Xa,Li,Er,S_),Dj=kB($n,ci,M_,Lj,Cn,kn,qa),Oj=uB(Ya),Bj=wB(Oj,Cn,new WeakSet,HB),jj=dB(hl,Ih,Wo,ud,Mo,pl),N_=fB(jj,Mo),zj=NB(Fi,N_,Fn,Li,Er),Vj=MB($n,ci,N_,zj,Cn,kn),Wj=OB(ud,Fn,Er),Uj=DB($n,Fr,ud,Wj,Cn,kn,qa),Hj=MO(si),Gj=lO(si),Qj=new WeakMap,Yj=bO(Qj,Xa),Kj=Hj?QL(Ti,Mo,aO(si),Gj,cO(VL),Cn,Yj,kn,K1,new WeakMap,new WeakMap,RB(K1,Xa),si):void 0,Xj=EO(b_,kn),qj=KD(k_,Ti,YD,iO,new WeakSet,Cn,Xj,G1,Y1,__,w_),Zj=ED(Kj,tj,nj,oj,sj,uj,dj,mj,bj,qj,kj,_j,Aj,Ej,Nj,Rj,Dj,Bj,Vj,Uj),Jj=NO($n,nB,Cn,kn),$j=RO($n,rB,Cn,kn),ez=TO($n,oB,Cn,kn),tz=iB(Fr,kn),nz=FO($n,tz,Cn),Wv=dD(Zj,Fr,Mo,FB,Jj,$j,ez,nz,qc);function rz(){const t=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return t?parseInt(t[2]):null}function oz(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const r=Math.random()*16|0;return(t==="x"?r:r&3|8).toString(16)})}class _i{constructor(r,s){Ie(this,"sec",0);Ie(this,"usec",0);this.sec=r,this.usec=s}setMilliseconds(r){this.sec=Math.floor(r/1e3),this.usec=Math.floor(r*1e3)%1e6}getMilliseconds(){return this.sec*1e3+this.usec/1e3}}class fd{constructor(){Ie(this,"type",0);Ie(this,"id",0);Ie(this,"refersTo",0);Ie(this,"received",new _i(0,0));Ie(this,"sent",new _i(0,0));Ie(this,"size",0)}deserialize(r){const s=new DataView(r);this.type=s.getUint16(0,!0),this.id=s.getUint16(2,!0),this.refersTo=s.getUint16(4,!0),this.received=new _i(s.getInt32(6,!0),s.getInt32(10,!0)),this.sent=new _i(s.getInt32(14,!0),s.getInt32(18,!0)),this.size=s.getUint32(22,!0)}serialize(){this.size=26+this.getSize();const r=new ArrayBuffer(this.size),s=new DataView(r);return s.setUint16(0,this.type,!0),s.setUint16(2,this.id,!0),s.setUint16(4,this.refersTo,!0),s.setInt32(6,this.sent.sec,!0),s.setInt32(10,this.sent.usec,!0),s.setInt32(14,this.received.sec,!0),s.setInt32(18,this.received.usec,!0),s.setUint32(22,this.size,!0),r}getSize(){return 0}}class iz extends fd{constructor(s){super();Ie(this,"codec","");Ie(this,"payload");this.payload=new ArrayBuffer(0),s&&this.deserialize(s),this.type=1}deserialize(s){super.deserialize(s);const u=new DataView(s),p=u.getInt32(26,!0),d=new TextDecoder("utf-8");this.codec=d.decode(s.slice(30,30+p));const b=u.getInt32(30+p,!0);console.debug("payload size: "+b),this.payload=s.slice(34+p,34+p+b),console.debug("payload: "+this.payload)}}class Uv extends fd{constructor(s){super();Ie(this,"latency",new _i(0,0));s&&this.deserialize(s),this.type=4}deserialize(s){super.deserialize(s);const u=new DataView(s);this.latency=new _i(u.getInt32(26,!0),u.getInt32(30,!0))}serialize(){const s=super.serialize(),u=new DataView(s);return u.setInt32(26,this.latency.sec,!0),u.setInt32(30,this.latency.usec,!0),s}getSize(){return 8}}class I_ extends fd{constructor(s){super();Ie(this,"json");s&&this.deserialize(s)}deserialize(s){super.deserialize(s);const p=new DataView(s).getUint32(26,!0),d=new TextDecoder;this.json=JSON.parse(d.decode(s.slice(30,30+p)))}serialize(){const s=super.serialize(),u=new DataView(s),p=JSON.stringify(this.json);u.setUint32(26,p.length,!0);const b=new TextEncoder().encode(p);for(let k=0;kthis.payloadSize()/p&&(u=this.payloadSize()/p-this.idx);const d=this.idx*p;this.idx+=u;const b=d+u*p;return this.payload.slice(d,b)}getFrameCount(){return this.payloadSize()/this.sampleFormat.frameSize()}isEndOfChunk(){return this.idx>=this.getFrameCount()}startMs(){return this.timestamp.getMilliseconds()+1e3*(this.idx/this.sampleFormat.rate)}duration(){return 1e3*((this.getFrameCount()-this.idx)/this.sampleFormat.rate)}payloadSize(){return this.payload.byteLength}clearPayload(){this.payload=new ArrayBuffer(0)}addPayload(s){const u=new ArrayBuffer(this.payload.byteLength+s.byteLength),p=new DataView(u),d=new DataView(this.payload),b=new DataView(s);for(let k=0;k "+this.volume+", muted: "+this.muted),this.muted=s}addChunk(r){for(this.chunks.push(r);this.chunks.length>0;){const s=this._timeProvider.serverNow()-this.chunks[0].timestamp.getMilliseconds();if(s>5e3+this._bufferMs)this.chunks.shift(),console.log("Dropping old chunk: "+s.toFixed(2)+", left: "+this.chunks.length);else break}}getNextBuffer(r,s){this.chunk||(this.chunk=this.chunks.shift());const u=r.length,p=new Float32Array(u),d=new Float32Array(u);let b=0,k=0;const y=this._timeProvider.serverTime(s);if(this.chunk){let _=y-this.chunk.startMs();const S=u/this._sampleFormat.msRate(),P=Math.floor(Date.now()/1e3);if(this.lastLog!==P&&(this.lastLog=P,console.log("age: "+_.toFixed(2)+", req: "+S)),_<-S)console.log("age: "+_.toFixed(2)+" < req: "+S*-1+", chunk.startMs: "+this.chunk.startMs().toFixed(2)+", timestamp: "+this.chunk.timestamp.getMilliseconds().toFixed(2)),console.log("Chunk too young, returning silence");else{if(Math.abs(_)>5){for(;this.chunk&&_>this.chunk.duration()&&(console.log("Chunk too old, dropping (age: "+_.toFixed(2)+" > "+this.chunk.duration().toFixed(2)+")"),this.chunk=this.chunks.shift(),!!this.chunk);)_=y-this.chunk.startMs();if(this.chunk){if(_>0)console.log("Fast forwarding "+_.toFixed(2)+"ms"),this.chunk.readFrames(Math.floor(_*this.chunk.sampleFormat.msRate()));else if(_<0){console.log("Playing silence "+-_.toFixed(2)+"ms");const O=Math.floor(-_*this.chunk.sampleFormat.msRate());p.fill(0,0,O),d.fill(0,0,O),b=O,k=O}_=0}}let N=0,L=0;_>.1?N=Math.ceil(_):_<-.1&&(N=Math.floor(_));const R=u+N-b;for(N!==0&&(L=Math.ceil((u+N-b)/(Math.abs(N)+1)));b0?k--:(p[k+1]=p[k],d[k+1]=d[k],k++)),k++;O.isEndOfChunk()&&(this.chunk=this.chunks.shift())}N!==0&&console.debug("Pos: "+k+", frames: "+u+", add: "+N+", everyN: "+L),b===R&&(b=u)}}b100&&this.diffBuffer.shift();const u=[...this.diffBuffer];u.sort(),this.diff=u[Math.floor(u.length/2)]}}now(){if(this.ctx){const r=this.ctx,s=r.getOutputTimestamp?r.getOutputTimestamp().contextTime:void 0;return(s!==void 0?s:r.currentTime)*1e3}else return window.performance.now()}nowSec(){return this.now()/1e3}serverNow(){return this.serverTime(this.now())}serverTime(r){return r+this.diff}}class dd{constructor(){Ie(this,"rate",48e3);Ie(this,"channels",2);Ie(this,"bits",16)}msRate(){return this.rate/1e3}toString(){return this.rate+":"+this.bits+":"+this.channels}sampleSize(){return this.bits===24?4:this.bits/8}frameSize(){return this.channels*this.sampleSize()}durationMs(r){return r/this.frameSize()*this.msRate()}}class Fh{setHeader(r){return new dd}decode(r){return null}}class fz extends Fh{setHeader(r){const s=new DataView(r),u=1330664787;if(r.byteLength<12)return console.error("Opus header too small: "+r.byteLength),null;if(s.getUint32(0,!0)!==u)return console.error("Opus header too small: "+r.byteLength),null;const p=new dd;return p.rate=s.getUint32(4,!0),p.bits=s.getUint16(8,!0),p.channels=s.getUint16(10,!0),console.log("Opus samplerate: "+p.toString()),p}decode(r){return null}}class dz extends Fh{constructor(){super();Ie(this,"sampleFormat");Ie(this,"decoder");Ie(this,"header",null);Ie(this,"flacChunk");Ie(this,"pcmChunk");Ie(this,"cacheInfo",{isCachedChunk:!1,cachedBlocks:0});if(this.decoder=vs.create_libflac_decoder(!0),this.decoder){const s=vs.init_decoder_stream(this.decoder,this.read_callback_fn.bind(this),this.write_callback_fn.bind(this),this.error_callback_fn.bind(this),this.metadata_callback_fn.bind(this),!1);console.log("Flac init: "+s),vs.setOptions(this.decoder,{analyseSubframes:!0,analyseResiduals:!0})}this.sampleFormat=new dd,this.flacChunk=new ArrayBuffer(0)}decode(s){for(this.flacChunk=s.payload.slice(0),this.pcmChunk=s,this.pcmChunk.clearPayload(),this.cacheInfo={cachedBlocks:0,isCachedChunk:!0};this.flacChunk.byteLength&&vs.FLAC__stream_decoder_process_single(this.decoder);)vs.FLAC__stream_decoder_get_state(this.decoder);if(this.cacheInfo.cachedBlocks>0){const u=this.cacheInfo.cachedBlocks/this.sampleFormat.msRate();this.pcmChunk.timestamp.setMilliseconds(this.pcmChunk.timestamp.getMilliseconds()-u)}return this.pcmChunk}read_callback_fn(s){if(this.header){console.log(" header: "+this.header.byteLength);const u=new Uint8Array(this.header);return this.header=null,{buffer:u,readDataLength:u.byteLength,error:!1}}else if(this.flacChunk){this.cacheInfo.isCachedChunk=!1;const u=new Uint8Array(this.flacChunk.slice(0,Math.min(s,this.flacChunk.byteLength)));return this.flacChunk=this.flacChunk.slice(u.byteLength),{buffer:u,readDataLength:u.byteLength,error:!1}}return{buffer:new Uint8Array(0),readDataLength:0,error:!1}}write_callback_fn(s,u){this.cacheInfo.isCachedChunk&&(this.cacheInfo.cachedBlocks+=u.blocksize);const p=new ArrayBuffer(u.bitsPerSample/8*u.channels*u.blocksize),d=new DataView(p);for(let b=0;b{}}start(){this.source.onended=()=>{this.onended(this)},this.source.start(this.playTime)}}class hz extends Fh{setHeader(r){const s=new dd,u=new DataView(r);return s.channels=u.getUint16(22,!0),s.rate=u.getUint32(24,!0),s.bits=u.getUint16(34,!0),s}decode(r){return r}}class q0{constructor(r){Ie(this,"baseUrl");Ie(this,"streamsocket");Ie(this,"playTime",0);Ie(this,"msgId",0);Ie(this,"bufferDurationMs",80);Ie(this,"bufferFrameCount",3844);Ie(this,"syncHandle",-1);Ie(this,"audioBuffers",new Array);Ie(this,"freeBuffers",new Array);Ie(this,"timeProvider");Ie(this,"stream");Ie(this,"ctx");Ie(this,"gainNode");Ie(this,"serverSettings");Ie(this,"decoder");Ie(this,"sampleFormat");Ie(this,"audioBufferCount",3);Ie(this,"bufferMs",1e3);Ie(this,"bufferNum",0);Ie(this,"latency",0);this.baseUrl=r,this.timeProvider=new uz,this.setupAudioContext()?this.connect():alert("Sorry, but the Web Audio API is not supported by your browser")}resume(){this.ctx.resume()}setupAudioContext(){if(Wv){let r;r={latencyHint:"playback",sampleRate:this.sampleFormat?this.sampleFormat.rate:void 0};const s=rz();(s!==null&&s<55||!window.AudioContext)&&(r=void 0),this.ctx=new Wv(r),this.gainNode=this.ctx.createGain(),this.gainNode.connect(this.ctx.destination)}else return!1;return!0}static getClientId(){return c0("uniqueId",oz())}connect(){this.streamsocket=new WebSocket(this.baseUrl+"/stream"),this.streamsocket.binaryType="arraybuffer",this.streamsocket.onmessage=r=>this.onMessage(r),this.streamsocket.onopen=()=>{console.log("on open");const r=new az;r.mac="00:00:00:00:00:00",r.arch="web",r.os=(navigator==null?void 0:navigator.platform)||"unknown",r.hostname="Snapweb client",r.uniqueId=q0.getClientId(),this.sendMessage(r),this.syncTime(),this.syncHandle=window.setInterval(()=>this.syncTime(),1e3)},this.streamsocket.onerror=r=>{console.error("error:",r)},this.streamsocket.onclose=()=>{window.clearInterval(this.syncHandle),console.info("connection lost, reconnecting in 1s"),setTimeout(()=>this.connect(),1e3)}}onMessage(r){const u=new DataView(r.data).getUint16(0,!0);if(u===1){const p=new iz(r.data);console.log("Codec: "+p.codec),p.codec==="flac"?this.decoder=new dz:p.codec==="pcm"?this.decoder=new hz:(p.codec==="opus"&&(this.decoder=new fz),alert("Codec not supported: "+p.codec)),this.decoder&&(this.sampleFormat=this.decoder.setHeader(p.payload),console.log("Sampleformat: "+this.sampleFormat.toString()),this.sampleFormat.channels!==2||this.sampleFormat.bits!==16?alert("Stream must be stereo with 16 bit depth, actual format: "+this.sampleFormat.toString()):(this.bufferDurationMs!==0&&(this.bufferFrameCount=Math.floor(this.bufferDurationMs*this.sampleFormat.msRate())),window.AudioContext&&this.sampleFormat.rate!==this.ctx.sampleRate.valueOf()&&(console.log("Stream samplerate != audio context samplerate ("+this.sampleFormat.rate+" != "+this.ctx.sampleRate.valueOf()+"), switching audio context to "+this.sampleFormat.rate+" Hz"),this.stopAudio(),this.setupAudioContext()),this.ctx.resume(),this.timeProvider.setAudioContext(this.ctx),this.gainNode.gain.value=this.serverSettings.muted?0:this.serverSettings.volumePercent/100,this.stream=new cz(this.timeProvider,this.sampleFormat,this.bufferMs),this.latency=(this.ctx.baseLatency!==void 0?this.ctx.baseLatency:0)+(this.ctx.outputLatency!==void 0?this.ctx.outputLatency:0),console.log("Base latency: "+this.ctx.baseLatency+", output latency: "+this.ctx.outputLatency+", latency: "+this.latency),this.play()))}else if(u===2){const p=new lz(r.data,this.sampleFormat);if(this.decoder){const d=this.decoder.decode(p);d&&this.stream.addChunk(d)}}else if(u===3)this.serverSettings=new sz(r.data),this.gainNode.gain.value=this.serverSettings.muted?0:this.serverSettings.volumePercent/100,this.bufferMs=this.serverSettings.bufferMs-this.serverSettings.latency,console.log("ServerSettings bufferMs: "+this.serverSettings.bufferMs+", latency: "+this.serverSettings.latency+", volume: "+this.serverSettings.volumePercent+", muted: "+this.serverSettings.muted);else if(u===4){if(this.timeProvider){const p=new Uv(r.data);this.timeProvider.setDiff(p.latency.getMilliseconds(),this.timeProvider.now()-p.sent.getMilliseconds())}}else console.info("Message not handled, type: "+u)}sendMessage(r){r.sent=new _i(0,0),r.sent.setMilliseconds(this.timeProvider.now()),r.id=++this.msgId,this.streamsocket.readyState===this.streamsocket.OPEN&&this.streamsocket.send(r.serialize())}syncTime(){const r=new Uv;r.latency.setMilliseconds(this.timeProvider.now()),this.sendMessage(r)}stopAudio(){for(this.ctx.suspend();this.audioBuffers.length>0;){const r=this.audioBuffers.pop();r.onended=()=>{},r.source.stop()}for(;this.freeBuffers.length>0;)this.freeBuffers.pop()}stop(){window.clearInterval(this.syncHandle),this.stopAudio(),(this.streamsocket.readyState===WebSocket.OPEN||this.streamsocket.readyState===WebSocket.CONNECTING)&&(this.streamsocket.onclose=()=>{},this.streamsocket.close())}play(){this.playTime=this.timeProvider.nowSec()+.1;for(let r=1;r<=this.audioBufferCount;++r)this.playNext()}playNext(){const r=this.freeBuffers.pop()||this.ctx.createBuffer(this.sampleFormat.channels,this.bufferFrameCount,this.sampleFormat.rate),s=(this.playTime+this.latency)*1e3-this.bufferMs;this.stream.getNextBuffer(r,s);const u=this.ctx.createBufferSource(),p=new pz(r,this.playTime,u,this.gainNode);this.audioBuffers.push(p),p.num=++this.bufferNum,p.onended=d=>{this.freeBuffers.push(this.audioBuffers.splice(this.audioBuffers.indexOf(d),1)[0].buffer),this.playNext()},p.start(),this.playTime+=this.bufferFrameCount/this.sampleFormat.rate}}const mz="/assets/10-seconds-of-silence-j39Pm5R-.mp3",gz="/assets/snapcast-512-B1PzHP_P.png",bz=Yf({palette:{primary:{light:"#757ce8",main:"#607d8b",dark:"#002884",contrastText:"#fff"},secondary:{light:"#ff7961",main:"#f44336",dark:"#ba000d",contrastText:"#000"}},typography:{subtitle1:{fontSize:17},body1:{fontWeight:500},h5:{fontWeight:300}}}),vz=Yf({palette:{mode:"dark",primary:{light:"#757ce8",main:"#607d8b",dark:"#002884",contrastText:"#fff"},secondary:{light:"#ff7961",main:"#f44336",dark:"#ba000d",contrastText:"#000"}},typography:{subtitle1:{fontSize:17},body1:{fontWeight:500},h5:{fontWeight:300}}});function kz(){const[t,r]=$.useState(0),[s,u]=$.useState(new Fa.Server),[p,d]=$.useState(!1),[b,k]=$.useState(Cr.showOffline),[y,_]=$.useState(Cr.theme),[S,P]=$.useState(Cr.baseUrl),[N,L]=$.useState(!1),[R,O]=$.useState(!1),[q,F]=$.useState(!1),[D,z]=$.useState(!1),[Y,U]=$.useState(""),ee=$.useRef(null),Z=$.useRef(new Audio),X=$.useRef(new NL),de=b7("(prefers-color-scheme: dark)");window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",ge=>{_(Cr.theme)}),$.useEffect(()=>{console.debug("server updated")},[s]),$.useEffect(()=>{console.debug("serverUrl updated: "+S),u(new Fa.Server),X.current.connect(S);const ge=X.current;return()=>{ge.disconnect()}},[S]);function le(ge){console.debug("Update: "+s.groups.length+" => "+ge.groups.length),u(ge),r(t+1),pe()}X.current.onChange=(ge,_e)=>le(_e),X.current.onConnectionChanged=(ge,_e,ve)=>{console.log("Connection state changed: "+_e+", error: "+ve),_e||(F(!1),u(new Fa.Server),ve&&U(ve)),z(_e)};function me(){try{const ge=X.current.getGroupFromClient(q0.getClientId());return X.current.getStream(ge.stream_id).id}catch{return""}}function pe(){if(console.debug("updateMediaSession"),!!ee.current)try{const ge=me(),_e=X.current.getStream(ge).properties,ve=_e.metadata,ce=(ve==null?void 0:ve.title)||"Unknown Title",ke=(ve==null?void 0:ve.artist)!==void 0?ve==null?void 0:ve.artist.join(", "):"Unknown Artist",Pe=(ve==null?void 0:ve.album)||"";let Ae=[{src:gz,sizes:"512x512",type:"image/png"}];(ve==null?void 0:ve.artUrl)!==void 0&&(Ae=[{src:ve.artUrl,sizes:"96x96",type:"image/png"},{src:ve.artUrl,sizes:"128x128",type:"image/png"},{src:ve.artUrl,sizes:"192x192",type:"image/png"},{src:ve.artUrl,sizes:"256x256",type:"image/png"},{src:ve.artUrl,sizes:"384x384",type:"image/png"},{src:ve.artUrl,sizes:"512x512",type:"image/png"}]),console.info("Metadata title: "+ce+", artist: "+ke+", album: "+Pe+", artwork: "+Ae),navigator.mediaSession.metadata=new MediaMetadata({title:ce,artist:ke,album:Pe,artwork:Ae});const Me=navigator.mediaSession;let tt="none";_e.playbackStatus!==void 0&&(_e.playbackStatus==="playing"?(console.debug("updateMediaSession: playing"),Z.current.play(),tt="playing"):_e.playbackStatus==="paused"?(console.debug("updateMediaSession: paused"),Z.current.pause(),tt="paused"):_e.playbackStatus==="stopped"&&(console.debug("updateMediaSession: stopped"),Z.current.pause(),tt="none")),Me.playbackState=tt,Me.setActionHandler("play",_e.canPlay?()=>{X.current.control(ge,"play")}:null),Me.setActionHandler("pause",_e.canPause?()=>{X.current.control(ge,"pause")}:null),Me.setActionHandler("previoustrack",_e.canGoPrevious?()=>{X.current.control(ge,"previous")}:null),Me.setActionHandler("nexttrack",_e.canGoNext?()=>{X.current.control(ge,"next")}:null);try{Me.setActionHandler("stop",_e.canControl?()=>{X.current.control(ge,"stop")}:null)}catch{console.debug('Warning! The "stop" media session action is not supported.')}const He=10;Me.setActionHandler("seekbackward",_e.canSeek?Ge=>{const pt=(Ge.seekOffset||He)*-1;_e.position!==void 0&&Math.max(_e.position+pt,0),X.current.control(ge,"seek",{offset:pt})}:null),Me.setActionHandler("seekforward",_e.canSeek?Ge=>{const pt=Ge.seekOffset||He;(ve==null?void 0:ve.duration)!==void 0&&_e.position!==void 0&&Math.min(_e.position+pt,ve.duration),X.current.control(ge,"seek",{offset:pt})}:null);try{Me.setActionHandler("seekto",_e.canSeek?Ge=>{const pt=Ge.seekTime||0;(ve==null?void 0:ve.duration)!==void 0&&Math.min(pt,ve.duration),X.current.control(ge,"setPosition",{position:pt})}:null)}catch{console.debug('Warning! The "seekto" media session action is not supported.')}(ve==null?void 0:ve.duration)!==void 0&&_e.position!==void 0&&_e.position<=ve.duration?"setPositionState"in Me&&(console.debug("Updating position state: "+_e.position+"/"+ve.duration),Me.setPositionState({duration:ve.duration,playbackRate:1,position:_e.position})):Me.setPositionState({duration:0,playbackRate:1,position:0})}catch(ge){console.debug("updateMediaSession failed: "+ge);return}}$.useEffect(()=>{q?(console.debug("isPlaying changed to true"),Z.current.src=mz,Z.current.loop=!0,Z.current.play().then(()=>{ee.current=new q0(Cr.baseUrl)})):(console.debug("isPlaying changed to false"),ee.current&&ee.current.stop(),ee.current=null,Z.current.pause(),Z.current.src="")},[q]);function xe(){return j.jsx(Ua,{role:"presentation",sx:{mt:1},children:j.jsxs(Sy,{children:[j.jsx(dv,{disablePadding:!0,children:j.jsx(fv,{onClick:()=>{L(!0),d(!1)},children:j.jsx(hv,{primary:"About..."})})},"about"),j.jsx(dv,{disablePadding:!0,children:j.jsx(fv,{onClick:()=>{O(!0),d(!1)},children:j.jsx(hv,{primary:"Settings..."})})},"settings")]})})}function we(){return D?null:j.jsx(Oy,{open:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},onClose:(ge,_e)=>{_e!=="clickaway"&&console.log("Snackbar - onClose")},children:j.jsx(ay,{onClose:ge=>{console.log("Snackbar - alert onClose")},severity:"error",sx:{width:"100%"},action:j.jsx(Ai,{color:"inherit",size:"small",onClick:ge=>{O(!0)},children:"Settings"}),children:Y+` +Snapserver host: `+Cr.baseUrl})},"connect-error")}return j.jsxs($E,{theme:y==bi.Dark||y==bi.System&&de?vz:bz,children:[j.jsx(bN,{}),j.jsxs("div",{className:"SnapWeb",children:[j.jsx(bP,{position:"sticky",children:j.jsxs(sL,{children:[j.jsx(Do,{size:"large",edge:"start",color:"inherit","aria-label":"menu",sx:{mr:2},onClick:ge=>{d(!0)},children:j.jsx(hL,{})}),j.jsx(oo,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Snapcast"}),D?j.jsx(Do,{size:"large",edge:"start",color:"inherit","aria-label":"menu",sx:{mr:2},onClick:ge=>{F(!q)},children:q?j.jsx(yL,{fontSize:"large"}):j.jsx(By,{fontSize:"large"})}):j.jsx(Do,{})]})}),j.jsx(AI,{anchor:"top",open:p,onClose:()=>{d(!1)},children:xe()}),j.jsx(CL,{server:s,snapcontrol:X.current,showOffline:b}),we(),j.jsx(SL,{open:N,onClose:()=>{L(!1)}}),j.jsx(ML,{open:R,onClose:ge=>{console.log("Apply: "+ge+", Serrver url: "+Cr.baseUrl),O(!1),ge&&(P(Cr.baseUrl),_(Cr.theme),k(Cr.showOffline))}})]})]})}const yz=L2.createRoot(document.getElementById("root"));console.log("Welcome to snapweb 0.7.0-beta.1");yz.render(j.jsx(Oo.StrictMode,{children:j.jsx(kz,{})})); diff --git a/music_assistant/server/providers/snapcast/snapweb/assets/logo192-wKJb_L8G.png b/music_assistant/server/providers/snapcast/snapweb/assets/logo192-wKJb_L8G.png new file mode 100644 index 000000000..9eb0bcadb Binary files /dev/null and b/music_assistant/server/providers/snapcast/snapweb/assets/logo192-wKJb_L8G.png differ diff --git a/music_assistant/server/providers/snapcast/snapweb/assets/snapcast-512-B1PzHP_P.png b/music_assistant/server/providers/snapcast/snapweb/assets/snapcast-512-B1PzHP_P.png new file mode 100644 index 000000000..964044047 Binary files /dev/null and b/music_assistant/server/providers/snapcast/snapweb/assets/snapcast-512-B1PzHP_P.png differ diff --git a/music_assistant/server/providers/snapcast/snapweb/favicon.ico b/music_assistant/server/providers/snapcast/snapweb/favicon.ico new file mode 100644 index 000000000..34cc0b66e Binary files /dev/null and b/music_assistant/server/providers/snapcast/snapweb/favicon.ico differ diff --git a/music_assistant/server/providers/snapcast/snapweb/index.html b/music_assistant/server/providers/snapcast/snapweb/index.html new file mode 100644 index 000000000..c4d52759e --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/index.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + Snapweb + + + + + + +
+ + + diff --git a/music_assistant/server/providers/snapcast/snapweb/logo.svg b/music_assistant/server/providers/snapcast/snapweb/logo.svg new file mode 100644 index 000000000..eb27634c3 --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/logo.svg @@ -0,0 +1,192 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/music_assistant/server/providers/snapcast/snapweb/manifest.webmanifest b/music_assistant/server/providers/snapcast/snapweb/manifest.webmanifest new file mode 100644 index 000000000..34eec47f2 --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/manifest.webmanifest @@ -0,0 +1 @@ +{"name":"Snapweb - Snapcast web client","short_name":"Snapweb","start_url":"/","display":"standalone","background_color":"#ffffff","lang":"en","scope":"/","theme_color":"#ffffff","icons":[{"src":"pwa-64x64.png","sizes":"64x64","type":"image/png"},{"src":"pwa-192x192.png","sizes":"192x192","type":"image/png"},{"src":"pwa-512x512.png","sizes":"512x512","type":"image/png"},{"src":"maskable-icon-512x512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}]} diff --git a/music_assistant/server/providers/snapcast/snapweb/maskable-icon-512x512.png b/music_assistant/server/providers/snapcast/snapweb/maskable-icon-512x512.png new file mode 100644 index 000000000..e14502a11 Binary files /dev/null and b/music_assistant/server/providers/snapcast/snapweb/maskable-icon-512x512.png differ diff --git a/music_assistant/server/providers/snapcast/snapweb/pwa-192x192.png b/music_assistant/server/providers/snapcast/snapweb/pwa-192x192.png new file mode 100644 index 000000000..444e7300a Binary files /dev/null and b/music_assistant/server/providers/snapcast/snapweb/pwa-192x192.png differ diff --git a/music_assistant/server/providers/snapcast/snapweb/pwa-512x512.png b/music_assistant/server/providers/snapcast/snapweb/pwa-512x512.png new file mode 100644 index 000000000..efbafef40 Binary files /dev/null and b/music_assistant/server/providers/snapcast/snapweb/pwa-512x512.png differ diff --git a/music_assistant/server/providers/snapcast/snapweb/pwa-64x64.png b/music_assistant/server/providers/snapcast/snapweb/pwa-64x64.png new file mode 100644 index 000000000..a7fd7e1ff Binary files /dev/null and b/music_assistant/server/providers/snapcast/snapweb/pwa-64x64.png differ diff --git a/music_assistant/server/providers/snapcast/snapweb/registerSW.js b/music_assistant/server/providers/snapcast/snapweb/registerSW.js new file mode 100644 index 000000000..82025feb1 --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/registerSW.js @@ -0,0 +1 @@ +if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('/sw.js', { scope: '/' })})} diff --git a/music_assistant/server/providers/snapcast/snapweb/robots.txt b/music_assistant/server/providers/snapcast/snapweb/robots.txt new file mode 100644 index 000000000..e9e57dc4d --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/music_assistant/server/providers/snapcast/snapweb/sw.js b/music_assistant/server/providers/snapcast/snapweb/sw.js new file mode 100644 index 000000000..feb48d090 --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/sw.js @@ -0,0 +1 @@ +if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()})).then((()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(s,r)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(i[o])return;let t={};const c=e=>n(e,o),l={module:{uri:o},exports:t,require:c};i[o]=Promise.all(s.map((e=>l[e]||c(e)))).then((e=>(r(...e),t)))}}define(["./workbox-3e911b1d"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-BDBx6C_I.css",revision:null},{url:"assets/index-DDLZhQdU.js",revision:null},{url:"index.html",revision:"196f334c599a25058e6672f32a6623eb"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"favicon.ico",revision:"7fdc1662d6e00b235ce85c4b73b7d67b"},{url:"pwa-64x64.png",revision:"0066803230966cc6ac241c8770003ee7"},{url:"pwa-192x192.png",revision:"61f5c7ab58978aaa789d945876887087"},{url:"pwa-512x512.png",revision:"c288ab9e43159776e6ee4feb2616f2b3"},{url:"maskable-icon-512x512.png",revision:"390549b472894ff2c812e9ef94c3def4"},{url:"manifest.webmanifest",revision:"6db81a405a3719b7dd657bb69278f941"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); diff --git a/music_assistant/server/providers/snapcast/snapweb/workbox-3e911b1d.js b/music_assistant/server/providers/snapcast/snapweb/workbox-3e911b1d.js new file mode 100644 index 000000000..8c012bc70 --- /dev/null +++ b/music_assistant/server/providers/snapcast/snapweb/workbox-3e911b1d.js @@ -0,0 +1 @@ +define(["exports"],(function(t){"use strict";try{self["workbox:core:7.0.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.0.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function h(t,e,n){let o;if("string"==typeof t){const s=new URL(t,location.href);o=new i((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)o=new r(t,e,n);else if("function"==typeof t)o=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return a().registerRoute(o),o}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter((t=>t&&t.length>0)).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.0.0"]&&_()}catch(t){}function p(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class y{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class g{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let R;async function m(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,c=function(){if(void 0===R){const t=new Response("");if("body"in t)try{new Response(t.body),R=!0}catch(t){R=!1}R=!1}return R}()?i.body:await i.blob();return new Response(c,o)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class q{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const U=new Set;try{self["workbox:strategies:7.0.0"]&&_()}catch(t){}function L(t){return"string"==typeof t?new Request(t):t}class b{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new q,this.R=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=L(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=L(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=L(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const c=await this.q(e);if(!c)return!1;const{cacheName:a,matchOptions:h}=this.l,u=await self.caches.open(a),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of U)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:a,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=L(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.v.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.R.push(t),t}async doneWaiting(){let t;for(;t=this.R.shift();)await t}destroy(){this.p.resolve(null)}async q(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class C{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new b(this,{event:e,request:s,params:n}),r=this.U(i,s,e);return[r,this.L(r,i,s,e)]}async U(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this._(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async L(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class E extends C{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this.C=!1!==t.fallbackToNetwork,this.plugins.push(E.copyRedirectedCacheableResponsesPlugin)}async _(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.O(t,e):await this.N(t,e))}async N(t,e){let n;const i=e.params||{};if(!this.C)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&o&&"no-cors"!==t.mode&&(this.k(),await e.cachePut(t,n.clone()))}return n}async O(t,e){this.k();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}k(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==E.copyRedirectedCacheableResponsesPlugin&&(n===E.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(E.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}E.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},E.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await m(t):t};class O{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.K=new Map,this.P=new Map,this.T=new Map,this.l=new E({cacheName:f(t),plugins:[...e,new g({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.W||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.W=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=p(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.K.has(i)&&this.K.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.K.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.T.has(t)&&this.T.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.T.set(t,n.integrity)}if(this.K.set(i,t),this.P.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return d(t,(async()=>{const e=new y;this.strategy.plugins.push(e);for(const[e,s]of this.K){const n=this.T.get(s),i=this.P.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return d(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.K.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.K}getCachedURLs(){return[...this.K.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.K.get(e.href)}getIntegrityForCacheKey(t){return this.T.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let x;const N=()=>(x||(x=new O),x);class k extends i{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.j(t)),t),this.M=e,this.S=s}j({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.S)if(t.test(s))return!1;return!!this.M.some((t=>t.test(s)))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.createHandlerBoundToURL=function(t){return N().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){N().precache(t)}(t),function(t){const e=N();h(new k(e,t))}(e)},t.registerRoute=h})); diff --git a/pyproject.toml b/pyproject.toml index 11bb57270..45acec3cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,7 @@ mass = "music_assistant.__main__:main" [tool.codespell] ignore-words-list = "provid,hass,followings,childs" +skip = "*.js" [tool.setuptools] include-package-data = true