KISS Translator

A simple bilingual translation extension & Greasemonkey script (一个简约的双语对照翻译扩展 & 油猴脚本)

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name          KISS Translator
// @namespace     https://github.com/fishjar/kiss-translator
// @version       2.0.22
// @description   A simple bilingual translation extension & Greasemonkey script (一个简约的双语对照翻译扩展 & 油猴脚本)
// @author        Gabe<[email protected]>
// @homepageURL   https://github.com/fishjar/kiss-translator
// @license       GPL-3.0
// @match         *://*/*
// @icon          https://fishjar.github.io/kiss-translator/images/logo192.png
// @grant         GM.xmlHttpRequest
// @grant         GM_xmlhttpRequest
// @grant         GM.registerMenuCommand
// @grant         GM_registerMenuCommand
// @grant         GM.unregisterMenuCommand
// @grant         GM_unregisterMenuCommand
// @grant         GM.setValue
// @grant         GM_setValue
// @grant         GM.getValue
// @grant         GM_getValue
// @grant         GM.deleteValue
// @grant         GM_deleteValue
// @grant         GM.info
// @grant         GM_info
// @grant         unsafeWindow
// @connect       translate.googleapis.com
// @connect       translate-pa.googleapis.com
// @connect       generativelanguage.googleapis.com
// @connect       api-edge.cognitive.microsofttranslator.com
// @connect       edge.microsoft.com
// @connect       bing.com
// @connect       api-free.deepl.com
// @connect       api.deepl.com
// @connect       www2.deepl.com
// @connect       api.openai.com
// @connect       generativelanguage.googleapis.com
// @connect       openai.azure.com
// @connect       workers.dev
// @connect       github.io
// @connect       github.com
// @connect       api.github.com
// @connect       githubusercontent.com
// @connect       kiss-translator.rayjar.com
// @connect       ghproxy.com
// @connect       dav.jianguoyun.com
// @connect       fanyi.baidu.com
// @connect       transmart.qq.com
// @connect       niutrans.com
// @connect       ephone.ai
// @connect       translate.volcengine.com
// @connect       dict.youdao.com
// @connect       api.anthropic.com
// @connect       api.siliconflow.cn
// @connect       api.cloudflare.com
// @connect       openrouter.ai
// @connect       localhost
// @connect       127.0.0.1
// @run-at        document-end
// ==/UserScript==


(()=>{var e,t,n={63(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(7461).A},288(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(6253)},383(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"m12.87 15.07-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2zm-2.62 7 1.62-4.33L19.12 17z"}),"Translate")},457(e,t,n){"use strict";n.d(t,{C:()=>c,E:()=>m,T:()=>d,c:()=>f,h:()=>h,w:()=>u});var r=n(8661),i=n(5449),o=n(696),a=n(3385),s=n(4774),l=r.createContext("undefined"!=typeof HTMLElement?(0,i.A)({key:"css"}):null),c=l.Provider,u=function(e){return(0,r.forwardRef)(function(t,n){var i=(0,r.useContext)(l);return e(t,i,n)})},d=r.createContext({});var h={}.hasOwnProperty,p="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",f=function(e,t){var n={};for(var r in t)h.call(t,r)&&(n[r]=t[r]);return n[p]=e,n},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,o.SF)(t,n,r),(0,s.s)(function(){return(0,o.sk)(t,n,r)}),null},m=u(function(e,t,n){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var s=e[p],l=[i],c="";"string"==typeof e.className?c=(0,o.Rk)(t.registered,l,e.className):null!=e.className&&(c=e.className+" ");var u=(0,a.J)(l,void 0,r.useContext(d));c+=t.key+"-"+u.name;var f={};for(var m in e)h.call(e,m)&&"css"!==m&&m!==p&&(f[m]=e[m]);return f.className=c,n&&(f.ref=n),r.createElement(r.Fragment,null,r.createElement(g,{cache:t,serialized:u,isStringTag:"string"==typeof s}),r.createElement(s,f))})},561(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z"}),"Favorite")},696(e,t,n){"use strict";n.d(t,{Rk:()=>r,SF:()=>i,sk:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},704(e,t,n){"use strict";n.d(t,{A:()=>r});const r={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"}},1006(e,t,n){"use strict";function r(e,t){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})},1029(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy")},1092(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var w=b.prototype=new y;w.constructor=b,g(w,v.prototype),w.isPureReactComponent=!0;var x=Array.isArray,A=Object.prototype.hasOwnProperty,S={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,r){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)A.call(t,i)&&!k.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:S.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function I(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===o?"."+C(l,0):o,x(a)?(i="",null!=e&&(i=e.replace(E,"$&/")+"/"),I(a,t,i,"",function(e){return e})):null!=a&&(T(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(l=0,o=""===o?".":o+":",x(e))for(var c=0;c<e.length;c++){var u=o+C(s=e[c],c);l+=I(s,t,i,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=I(s=s.value,t,i,u=o+C(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function P(e,t,n){if(null==e)return e;var r=[],i=0;return I(e,r,"","",function(e){return t.call(n,e,i++)}),r}function L(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},N={transition:null},O={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:N,ReactCurrentOwner:S};function j(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=a,t.PureComponent=b,t.StrictMode=o,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.act=j,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=g({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=S.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)A.call(t,c)&&!k.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:n,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=T,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:L}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},t.unstable_act=j,t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.current.useTransition()},t.version="18.3.1"},1128(e,t,n){"use strict";n.d(t,{A:()=>r});const r={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"}},1163(e,t,n){"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,{A:()=>r})},1210(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(8755).A)()},1229(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},1310(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode")},1437(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done")},1446(e,t,n){"use strict";var r=n(8661),i=n(4651);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},f={};function g(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){m[e]=new g(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){m[e]=new g(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){m[e]=new g(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){m[e]=new g(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){m[e]=new g(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)}),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)});var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),A=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),E=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var N=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var O=Symbol.iterator;function j(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var z,M=Object.assign;function D(e){if(void 0===z)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var B=!1;function F(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?D(e):""}function W(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case A:return"Portal";case _:return"Profiler";case k:return"StrictMode";case I:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case T:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case L:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return U(e(t))}catch(e){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===k?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function G(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=G(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=G(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function $(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return M({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function X(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){J(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&$(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return M({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function oe(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ue(e,t)})}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={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},fe=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(pe).forEach(function(e){fe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]})});var ve=M({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 ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ae=null,Se=null,ke=null;function _e(e){if(e=bi(e)){if("function"!=typeof Ae)throw Error(o(280));var t=e.stateNode;t&&(t=xi(t),Ae(e.stateNode,e.type,t))}}function Te(e){Se?ke?ke.push(e):ke=[e]:Se=e}function Ee(){if(Se){var e=Se,t=ke;if(ke=Se=null,_e(e),t)for(e=0;e<t.length;e++)_e(t[e])}}function Ce(e,t){return e(t)}function Ie(){}var Pe=!1;function Le(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return Ce(e,t,n)}finally{Pe=!1,(null!==Se||null!==ke)&&(Ie(),Ee())}}function Re(e,t){var n=e.stateNode;if(null===n)return null;var r=xi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Ne=!1;if(u)try{var Oe={};Object.defineProperty(Oe,"passive",{get:function(){Ne=!0}}),window.addEventListener("test",Oe,Oe),window.removeEventListener("test",Oe,Oe)}catch(ue){Ne=!1}function je(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var ze=!1,Me=null,De=!1,Be=null,Fe={onError:function(e){ze=!0,Me=e}};function We(e,t,n,r,i,o,a,s,l){ze=!1,Me=null,je.apply(Fe,arguments)}function Ue(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function He(e){if(Ue(e)!==e)throw Error(o(188))}function Ge(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ue(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return He(i),e;if(a===r)return He(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var Ke=i.unstable_scheduleCallback,$e=i.unstable_cancelCallback,Ye=i.unstable_shouldYield,Xe=i.unstable_requestPaint,Je=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Ze=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=dt(s):0!==(o&=a)&&(r=dt(o))}else 0!==(a=n&~i)?r=dt(a):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var xt,At,St,kt,_t,Tt=!1,Et=[],Ct=null,It=null,Pt=null,Lt=new Map,Rt=new Map,Nt=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function jt(e,t){switch(e){case"focusin":case"focusout":Ct=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":Lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rt.delete(t.pointerId)}}function zt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=bi(t))&&At(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Mt(e){var t=yi(e.target);if(null!==t){var n=Ue(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void _t(e.priority,function(){St(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Dt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&At(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Bt(e,t,n){Dt(e)&&n.delete(t)}function Ft(){Tt=!1,null!==Ct&&Dt(Ct)&&(Ct=null),null!==It&&Dt(It)&&(It=null),null!==Pt&&Dt(Pt)&&(Pt=null),Lt.forEach(Bt),Rt.forEach(Bt)}function Wt(e,t){e.blockedOn===t&&(e.blockedOn=null,Tt||(Tt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ft)))}function Ut(e){function t(t){return Wt(t,e)}if(0<Et.length){Wt(Et[0],e);for(var n=1;n<Et.length;n++){var r=Et[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ct&&Wt(Ct,e),null!==It&&Wt(It,e),null!==Pt&&Wt(Pt,e),Lt.forEach(t),Rt.forEach(t),n=0;n<Nt.length;n++)(r=Nt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Nt.length&&null===(n=Nt[0]).blockedOn;)Mt(n),null===n.blockedOn&&Nt.shift()}var Vt=w.ReactCurrentBatchConfig,Ht=!0;function Gt(e,t,n,r){var i=bt,o=Vt.transition;Vt.transition=null;try{bt=1,Kt(e,t,n,r)}finally{bt=i,Vt.transition=o}}function qt(e,t,n,r){var i=bt,o=Vt.transition;Vt.transition=null;try{bt=4,Kt(e,t,n,r)}finally{bt=i,Vt.transition=o}}function Kt(e,t,n,r){if(Ht){var i=Yt(e,t,n,r);if(null===i)Hr(e,t,r,$t,n),jt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ct=zt(Ct,e,t,n,r,i),!0;case"dragenter":return It=zt(It,e,t,n,r,i),!0;case"mouseover":return Pt=zt(Pt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Lt.set(o,zt(Lt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Rt.set(o,zt(Rt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(jt(e,r),4&t&&-1<Ot.indexOf(e)){for(;null!==i;){var o=bi(i);if(null!==o&&xt(o),null===(o=Yt(e,t,n,r))&&Hr(e,t,r,$t,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var $t=null;function Yt(e,t,n,r){if($t=null,null!==(e=yi(e=xe(r))))if(null===(t=Ue(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return $t=e,null}function Xt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Jt=null,Qt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Qt,r=n.length,i="value"in Jt?Jt.value:Jt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=M({},cn,{view:0,detail:0}),hn=on(dn),pn=M({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),fn=on(pn),gn=on(M({},pn,{dataTransfer:0})),mn=on(M({},dn,{relatedTarget:0})),vn=on(M({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=M({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(yn),wn=on(M({},cn,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},An={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function _n(){return kn}var Tn=M({},dn,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?An[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),En=on(Tn),Cn=on(M({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=on(M({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),Pn=on(M({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=M({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=on(Ln),Nn=[9,13,27,32],On=u&&"CompositionEvent"in window,jn=null;u&&"documentMode"in document&&(jn=document.documentMode);var zn=u&&"TextEvent"in window&&!jn,Mn=u&&(!On||jn&&8<jn&&11>=jn),Dn=String.fromCharCode(32),Bn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Gn(e,t,n,r){Te(r),0<(t=qr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Kn=null;function $n(e){Dr(e,0)}function Yn(e){if(K(wi(e)))return e}function Xn(e,t){if("change"===e)return t}var Jn=!1;if(u){var Qn;if(u){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"==typeof er.oninput}Qn=Zn}else Qn=!1;Jn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Kn=qn=null)}function nr(e){if("value"===e.propertyName&&Yn(Kn)){var t=[];Gn(t,Kn,e,xe(e)),Le($n,t)}}function rr(e,t,n){"focusin"===e?(tr(),Kn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yn(Kn)}function or(e,t){if("click"===e)return Yn(t)}function ar(e,t){if("input"===e||"change"===e)return Yn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=$();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=$((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var a=ur(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=u&&"documentMode"in document&&11>=document.documentMode,mr=null,vr=null,yr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==mr||mr!==$(r)||("selectionStart"in(r=mr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=qr(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ar={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},Sr={},kr={};function _r(e){if(Sr[e])return Sr[e];if(!Ar[e])return e;var t,n=Ar[e];for(t in n)if(n.hasOwnProperty(t)&&t in kr)return Sr[e]=n[t];return e}u&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),"TransitionEvent"in window||delete Ar.transitionend.transition);var Tr=_r("animationend"),Er=_r("animationiteration"),Cr=_r("animationstart"),Ir=_r("transitionend"),Pr=new Map,Lr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rr(e,t){Pr.set(e,t),l(t,[e])}for(var Nr=0;Nr<Lr.length;Nr++){var Or=Lr[Nr];Rr(Or.toLowerCase(),"on"+(Or[0].toUpperCase()+Or.slice(1)))}Rr(Tr,"onAnimationEnd"),Rr(Er,"onAnimationIteration"),Rr(Cr,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(Ir,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),zr=new Set("cancel close invalid load scroll toggle".split(" ").concat(jr));function Mr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,c){if(We.apply(this,arguments),ze){if(!ze)throw Error(o(198));var u=Me;ze=!1,Me=null,De||(De=!0,Be=u)}}(r,t,void 0,e),e.currentTarget=null}function Dr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Mr(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Mr(i,s,c),o=l}}}if(De)throw e=Be,De=!1,Be=null,e}function Br(e,t){var n=t[gi];void 0===n&&(n=t[gi]=new Set);var r=e+"__bubble";n.has(r)||(Vr(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),Vr(n,e,r,t)}var Wr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[Wr]){e[Wr]=!0,a.forEach(function(t){"selectionchange"!==t&&(zr.has(t)||Fr(t,!1,e),Fr(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Wr]||(t[Wr]=!0,Fr("selectionchange",!1,t))}}function Vr(e,t,n,r){switch(Xt(t)){case 1:var i=Gt;break;case 4:i=qt;break;default:i=Kt}n=i.bind(null,t,n,e),i=void 0,!Ne||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=yi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Le(function(){var r=o,i=xe(n),a=[];e:{var s=Pr.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=En;break;case"focusin":c="focus",l=mn;break;case"focusout":c="blur",l=mn;break;case"beforeblur":case"afterblur":l=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=In;break;case Tr:case Er:case Cr:l=vn;break;case Ir:l=Pn;break;case"scroll":l=hn;break;case"wheel":l=Rn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Cn}var u=!!(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var p,f=r;null!==f;){var g=(p=f).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==h&&(null!=(g=Re(f,h))&&u.push(Gr(f,g,p)))),d)break;f=f.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(c=n.relatedTarget||n.fromElement)||!yi(c)&&!c[fi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?yi(c):null)&&(c!==(d=Ue(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=fn,g="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=Cn,g="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?s:wi(l),p=null==c?s:wi(c),(s=new u(g,f+"leave",l,n,i)).target=d,s.relatedTarget=p,g=null,yi(i)===r&&((u=new u(h,f+"enter",c,n,i)).target=p,u.relatedTarget=d,g=u),d=g,l&&c)e:{for(h=c,f=0,p=u=l;p;p=Kr(p))f++;for(p=0,g=h;g;g=Kr(g))p++;for(;0<f-p;)u=Kr(u),f--;for(;0<p-f;)h=Kr(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=Kr(u),h=Kr(h)}u=null}else u=null;null!==l&&$r(a,s,l,u,!1),null!==c&&null!==d&&$r(a,d,c,u,!0)}if("select"===(l=(s=r?wi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=Xn;else if(Hn(s))if(Jn)m=ar;else{m=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=or);switch(m&&(m=m(e,r))?Gn(a,m,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?wi(r):window,e){case"focusin":(Hn(v)||"true"===v.contentEditable)&&(mr=v,vr=r,yr=null);break;case"focusout":yr=vr=mr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(a,n,i);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":wr(a,n,i)}var y;if(On)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?Fn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Mn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=en()):(Qt="value"in(Jt=i)?Jt.value:Jt.textContent,Un=!0)),0<(v=qr(r,b)).length&&(b=new wn(b,e,null,n,i),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Wn(n))&&(b.data=y))),(y=zn?function(e,t){switch(e){case"compositionend":return Wn(t);case"keypress":return 32!==t.which?null:(Bn=!0,Dn);case"textInput":return(e=t.data)===Dn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!On&&Fn(e,t)?(e=en(),Zt=Qt=Jt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=qr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Dr(a,t)})}function Gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Re(e,n))&&r.unshift(Gr(e,o,i)),null!=(o=Re(e,t))&&r.push(Gr(e,o,i))),e=e.return}return r}function Kr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function $r(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Re(n,o))&&a.unshift(Gr(n,l,s)):i||null!=(l=Re(n,o))&&a.push(Gr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Yr=/\r\n?/g,Xr=/\u0000|\uFFFD/g;function Jr(e){return("string"==typeof e?e:""+e).replace(Yr,"\n").replace(Xr,"")}function Qr(e,t,n){if(t=Jr(t),Jr(e)!==t&&n)throw Error(o(425))}function Zr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,oi="function"==typeof Promise?Promise:void 0,ai="function"==typeof queueMicrotask?queueMicrotask:void 0!==oi?function(e){return oi.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout(function(){throw e})}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ut(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ut(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,pi="__reactProps$"+di,fi="__reactContainer$"+di,gi="__reactEvents$"+di,mi="__reactListeners$"+di,vi="__reactHandles$"+di;function yi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[hi])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[hi]||e[fi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function xi(e){return e[pi]||null}var Ai=[],Si=-1;function ki(e){return{current:e}}function _i(e){0>Si||(e.current=Ai[Si],Ai[Si]=null,Si--)}function Ti(e,t){Si++,Ai[Si]=e.current,e.current=t}var Ei={},Ci=ki(Ei),Ii=ki(!1),Pi=Ei;function Li(e,t){var n=e.type.contextTypes;if(!n)return Ei;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ri(e){return null!=(e=e.childContextTypes)}function Ni(){_i(Ii),_i(Ci)}function Oi(e,t,n){if(Ci.current!==Ei)throw Error(o(168));Ti(Ci,t),Ti(Ii,n)}function ji(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,V(e)||"Unknown",i));return M({},n,r)}function zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ei,Pi=Ci.current,Ti(Ci,e),Ti(Ii,Ii.current),!0}function Mi(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=ji(e,t,Pi),r.__reactInternalMemoizedMergedChildContext=e,_i(Ii),_i(Ci),Ti(Ci,e)):_i(Ii),Ti(Ii,n)}var Di=null,Bi=!1,Fi=!1;function Wi(e){null===Di?Di=[e]:Di.push(e)}function Ui(){if(!Fi&&null!==Di){Fi=!0;var e=0,t=bt;try{var n=Di;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Di=null,Bi=!1}catch(t){throw null!==Di&&(Di=Di.slice(e+1)),Ke(Ze,Ui),t}finally{bt=t,Fi=!1}}return null}var Vi=[],Hi=0,Gi=null,qi=0,Ki=[],$i=0,Yi=null,Xi=1,Ji="";function Qi(e,t){Vi[Hi++]=qi,Vi[Hi++]=Gi,Gi=e,qi=t}function Zi(e,t,n){Ki[$i++]=Xi,Ki[$i++]=Ji,Ki[$i++]=Yi,Yi=e;var r=Xi;e=Ji;var i=32-at(r)-1;r&=~(1<<i),n+=1;var o=32-at(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Xi=1<<32-at(t)+i|n<<i|r,Ji=o+e}else Xi=1<<o|n<<i|r,Ji=e}function eo(e){null!==e.return&&(Qi(e,1),Zi(e,1,0))}function to(e){for(;e===Gi;)Gi=Vi[--Hi],Vi[Hi]=null,qi=Vi[--Hi],Vi[Hi]=null;for(;e===Yi;)Yi=Ki[--$i],Ki[$i]=null,Ji=Ki[--$i],Ki[$i]=null,Xi=Ki[--$i],Ki[$i]=null}var no=null,ro=null,io=!1,oo=null;function ao(e,t){var n=Pc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,ro=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yi?{id:Xi,overflow:Ji}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Pc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return!(!(1&e.mode)||128&e.flags)}function co(e){if(io){var t=ro;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ci(n.nextSibling);var r=no;t&&so(e,t)?ao(r,n):(e.flags=-4097&e.flags|2,io=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,no=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!io)return uo(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw po(),Error(o(418));for(;t;)ao(e,t),t=ci(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ci(e.stateNode.nextSibling):null;return!0}function po(){for(var e=ro;e;)e=ci(e.nextSibling)}function fo(){ro=no=null,io=!1}function go(e){null===oo?oo=[e]:oo.push(e)}var mo=w.ReactCurrentBatchConfig;function vo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function yo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bo(e){return(0,e._init)(e._payload)}function wo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Rc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=zc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===S?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===R&&bo(o)===t.type)?((r=i(t,n.props)).ref=vo(e,t,n),r.return=e,r):((r=Nc(n.type,n.key,n.props,null,e.mode,r)).ref=vo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Mc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Oc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=zc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Nc(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case A:return(t=Mc(t,e.mode,n)).return=e,t;case R:return h(e,(0,t._init)(t._payload),n)}if(te(t)||j(t))return(t=Oc(t,e.mode,n,null)).return=e,t;yo(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===i?c(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case R:return p(e,t,(i=n._init)(n._payload),r)}if(te(n)||j(n))return null!==i?null:d(e,t,n,r,null);yo(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case x:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case A:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case R:return f(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||j(r))return d(t,e=e.get(n)||null,r,i,null);yo(t,r)}return null}function g(i,o,s,l){for(var c=null,u=null,d=o,g=o=0,m=null;null!==d&&g<s.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var v=p(i,d,s[g],l);if(null===v){null===d&&(d=m);break}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,g),null===u?c=v:u.sibling=v,u=v,d=m}if(g===s.length)return n(i,d),io&&Qi(i,g),c;if(null===d){for(;g<s.length;g++)null!==(d=h(i,s[g],l))&&(o=a(d,o,g),null===u?c=d:u.sibling=d,u=d);return io&&Qi(i,g),c}for(d=r(i,d);g<s.length;g++)null!==(m=f(d,i,g,s[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),o=a(m,o,g),null===u?c=m:u.sibling=m,u=m);return e&&d.forEach(function(e){return t(i,e)}),io&&Qi(i,g),c}function m(i,s,l,c){var u=j(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,g=s,m=s=0,v=null,y=l.next();null!==g&&!y.done;m++,y=l.next()){g.index>m?(v=g,g=null):v=g.sibling;var b=p(i,g,y.value,c);if(null===b){null===g&&(g=v);break}e&&g&&null===b.alternate&&t(i,g),s=a(b,s,m),null===d?u=b:d.sibling=b,d=b,g=v}if(y.done)return n(i,g),io&&Qi(i,m),u;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=h(i,y.value,c))&&(s=a(y,s,m),null===d?u=y:d.sibling=y,d=y);return io&&Qi(i,m),u}for(g=r(i,g);!y.done;m++,y=l.next())null!==(y=f(g,i,m,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),s=a(y,s,m),null===d?u=y:d.sibling=y,d=y);return e&&g.forEach(function(e){return t(i,e)}),io&&Qi(i,m),u}return function e(r,o,a,l){if("object"==typeof a&&null!==a&&a.type===S&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case x:e:{for(var c=a.key,u=o;null!==u;){if(u.key===c){if((c=a.type)===S){if(7===u.tag){n(r,u.sibling),(o=i(u,a.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===R&&bo(c)===u.type){n(r,u.sibling),(o=i(u,a.props)).ref=vo(r,u,a),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===S?((o=Oc(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=Nc(a.type,a.key,a.props,null,r.mode,l)).ref=vo(r,o,a),l.return=r,r=l)}return s(r);case A:e:{for(u=a.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Mc(a,r.mode,l)).return=r,r=o}return s(r);case R:return e(r,o,(u=a._init)(a._payload),l)}if(te(a))return g(r,o,a,l);if(j(a))return m(r,o,a,l);yo(r,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=zc(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var xo=wo(!0),Ao=wo(!1),So=ki(null),ko=null,_o=null,To=null;function Eo(){To=_o=ko=null}function Co(e){var t=So.current;_i(So),e._currentValue=t}function Io(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Po(e,t){ko=e,To=_o=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Lo(e){var t=e._currentValue;if(To!==e)if(e={context:e,memoizedValue:t,next:null},null===_o){if(null===ko)throw Error(o(308));_o=e,ko.dependencies={lanes:0,firstContext:e}}else _o=_o.next=e;return t}var Ro=null;function No(e){null===Ro?Ro=[e]:Ro.push(e)}function Oo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,No(t)):(n.next=i.next,i.next=n),t.interleaved=n,jo(e,r)}function jo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var zo=!1;function Mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Do(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&El){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,jo(e,n)}return null===(i=r.interleaved)?(t.next=t,No(r)):(t.next=i.next,i.next=t),r.interleaved=t,jo(e,n)}function Wo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Uo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Vo(e,t,n,r){var i=e.updateQueue;zo=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var h=s.lane,p=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,g=s;switch(h=t,p=n,g.tag){case 1:if("function"==typeof(f=g.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(h="function"==typeof(f=g.payload)?f.call(p,d,h):f))break e;d=M({},d,h);break e;case 2:zo=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);jl|=a,e.lanes=a,e.memoizedState=d}}function Ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var Go={},qo=ki(Go),Ko=ki(Go),$o=ki(Go);function Yo(e){if(e===Go)throw Error(o(174));return e}function Xo(e,t){switch(Ti($o,t),Ti(Ko,e),Ti(qo,Go),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}_i(qo),Ti(qo,t)}function Jo(){_i(qo),_i(Ko),_i($o)}function Qo(e){Yo($o.current);var t=Yo(qo.current),n=le(t,e.type);t!==n&&(Ti(Ko,e),Ti(qo,n))}function Zo(e){Ko.current===e&&(_i(qo),_i(Ko))}var ea=ki(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ra(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var ia=w.ReactCurrentDispatcher,oa=w.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,ua=!1,da=!1,ha=0,pa=0;function fa(){throw Error(o(321))}function ga(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ma(e,t,n,r,i,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ia.current=null===e||null===e.memoizedState?Za:es,e=n(r,i),da){a=0;do{if(da=!1,ha=0,25<=a)throw Error(o(301));a+=1,ca=la=null,t.updateQueue=null,ia.current=ts,e=n(r,i)}while(da)}if(ia.current=Qa,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,ua=!1,t)throw Error(o(300));return e}function va(){var e=0!==ha;return ha=0,e}function ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function ba(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(o(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function wa(e,t){return"function"==typeof t?t(e):t}function xa(e){var t=ba(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=la,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((aa&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,sa.lanes|=d,jl|=d}u=u.next}while(null!==u&&u!==a);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,sa.lanes|=a,jl|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Aa(e){var t=ba(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);sr(a,t.memoizedState)||(bs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Sa(){}function ka(e,t){var n=sa,r=ba(),i=t(),a=!sr(r.memoizedState,i);if(a&&(r.memoizedState=i,bs=!0),r=r.queue,za(Ea.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,La(9,Ta.bind(null,n,r,i,t),void 0,null),null===Cl)throw Error(o(349));30&aa||_a(n,t,i)}return i}function _a(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ta(e,t,n,r){t.value=n,t.getSnapshot=r,Ca(t)&&Ia(e)}function Ea(e,t,n){return n(function(){Ca(t)&&Ia(e)})}function Ca(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(e){return!0}}function Ia(e){var t=jo(e,1);null!==t&&tc(t,e,1,-1)}function Pa(e){var t=ya();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:e},t.queue=e,e=e.dispatch=$a.bind(null,sa,e),[t.memoizedState,e]}function La(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ra(){return ba().memoizedState}function Na(e,t,n,r){var i=ya();sa.flags|=e,i.memoizedState=La(1|t,n,void 0,void 0===r?null:r)}function Oa(e,t,n,r){var i=ba();r=void 0===r?null:r;var o=void 0;if(null!==la){var a=la.memoizedState;if(o=a.destroy,null!==r&&ga(r,a.deps))return void(i.memoizedState=La(t,n,o,r))}sa.flags|=e,i.memoizedState=La(1|t,n,o,r)}function ja(e,t){return Na(8390656,8,e,t)}function za(e,t){return Oa(2048,8,e,t)}function Ma(e,t){return Oa(4,2,e,t)}function Da(e,t){return Oa(4,4,e,t)}function Ba(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Fa(e,t,n){return n=null!=n?n.concat([e]):null,Oa(4,4,Ba.bind(null,t,e),n)}function Wa(){}function Ua(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Va(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ha(e,t,n){return 21&aa?(sr(n,t)||(n=gt(),sa.lanes|=n,jl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bs=!0),e.memoizedState=n)}function Ga(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=oa.transition;oa.transition={};try{e(!1),t()}finally{bt=n,oa.transition=r}}function qa(){return ba().memoizedState}function Ka(e,t,n){var r=ec(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ya(e))Xa(t,n);else if(null!==(n=Oo(e,t,n,r))){tc(n,e,r,Zl()),Ja(n,t,r)}}function $a(e,t,n){var r=ec(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ya(e))Xa(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(i.next=i,No(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Oo(e,t,i,r))&&(tc(n,e,r,i=Zl()),Ja(n,t,r))}}function Ya(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Xa(e,t){da=ua=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ja(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Qa={readContext:Lo,useCallback:fa,useContext:fa,useEffect:fa,useImperativeHandle:fa,useInsertionEffect:fa,useLayoutEffect:fa,useMemo:fa,useReducer:fa,useRef:fa,useState:fa,useDebugValue:fa,useDeferredValue:fa,useTransition:fa,useMutableSource:fa,useSyncExternalStore:fa,useId:fa,unstable_isNewReconciler:!1},Za={readContext:Lo,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:Lo,useEffect:ja,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Na(4194308,4,Ba.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Na(4194308,4,e,t)},useInsertionEffect:function(e,t){return Na(4,2,e,t)},useMemo:function(e,t){var n=ya();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ya();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ka.bind(null,sa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ya().memoizedState=e},useState:Pa,useDebugValue:Wa,useDeferredValue:function(e){return ya().memoizedState=e},useTransition:function(){var e=Pa(!1),t=e[0];return e=Ga.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sa,i=ya();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Cl)throw Error(o(349));30&aa||_a(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ja(Ea.bind(null,r,a,e),[e]),r.flags|=2048,La(9,Ta.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=Cl.identifierPrefix;if(io){var n=Ji;t=":"+t+"R"+(n=(Xi&~(1<<32-at(Xi)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=pa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Lo,useCallback:Ua,useContext:Lo,useEffect:za,useImperativeHandle:Fa,useInsertionEffect:Ma,useLayoutEffect:Da,useMemo:Va,useReducer:xa,useRef:Ra,useState:function(){return xa(wa)},useDebugValue:Wa,useDeferredValue:function(e){return Ha(ba(),la.memoizedState,e)},useTransition:function(){return[xa(wa)[0],ba().memoizedState]},useMutableSource:Sa,useSyncExternalStore:ka,useId:qa,unstable_isNewReconciler:!1},ts={readContext:Lo,useCallback:Ua,useContext:Lo,useEffect:za,useImperativeHandle:Fa,useInsertionEffect:Ma,useLayoutEffect:Da,useMemo:Va,useReducer:Aa,useRef:Ra,useState:function(){return Aa(wa)},useDebugValue:Wa,useDeferredValue:function(e){var t=ba();return null===la?t.memoizedState=e:Ha(t,la.memoizedState,e)},useTransition:function(){return[Aa(wa)[0],ba().memoizedState]},useMutableSource:Sa,useSyncExternalStore:ka,useId:qa,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=M({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:M({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Zl(),i=ec(e),o=Bo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Fo(e,o,i))&&(tc(t,e,i,r),Wo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Zl(),i=ec(e),o=Bo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Fo(e,o,i))&&(tc(t,e,i,r),Wo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Zl(),r=ec(e),i=Bo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Fo(e,i,r))&&(tc(t,e,r,n),Wo(t,e,r))}};function os(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,o))}function as(e,t,n){var r=!1,i=Ei,o=t.contextType;return"object"==typeof o&&null!==o?o=Lo(o):(i=Ri(t)?Pi:Ci.current,o=(r=null!=(r=t.contextTypes))?Li(e,i):Ei),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Mo(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Lo(o):(o=Ri(t)?Pi:Ci.current,i.context=Li(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(rs(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Vo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function us(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var hs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Bo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,Hl=r),ds(0,t)},n}function fs(e,t,n){(n=Bo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!=typeof r&&(null===Gl?Gl=new Set([this]):Gl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function ms(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Bo(-1,1)).tag=2,Fo(n,t,1))),n.lanes|=1),e)}var ys=w.ReactCurrentOwner,bs=!1;function ws(e,t,n,r){t.child=null===e?Ao(t,null,n,r):xo(t,e.child,n,r)}function xs(e,t,n,r,i){n=n.render;var o=t.ref;return Po(t,i),r=ma(e,t,n,r,o,i),n=va(),null===e||bs?(io&&n&&eo(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function As(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Lc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ss(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Vs(e,t,i)}return t.flags|=1,(e=Rc(o,r)).ref=t.ref,e.return=t,t.child=e}function Ss(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Vs(e,t,i);131072&e.flags&&(bs=!0)}}return Ts(e,t,n,r,i)}function ks(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ti(Rl,Ll),Ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ti(Rl,Ll),Ll|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ti(Rl,Ll),Ll|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ti(Rl,Ll),Ll|=r;return ws(e,t,i,n),t.child}function _s(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ts(e,t,n,r,i){var o=Ri(n)?Pi:Ci.current;return o=Li(t,o),Po(t,i),n=ma(e,t,n,r,o,i),r=va(),null===e||bs?(io&&r&&eo(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function Es(e,t,n,r,i){if(Ri(n)){var o=!0;zi(t)}else o=!1;if(Po(t,i),null===t.stateNode)Us(e,t),as(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Lo(c):c=Li(t,c=Ri(n)?Pi:Ci.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,a,r,c),zo=!1;var h=t.memoizedState;a.state=h,Vo(t,r,a,i),l=t.memoizedState,s!==r||h!==l||Ii.current||zo?("function"==typeof u&&(rs(t,n,u,r),l=t.memoizedState),(s=zo||os(t,n,s,r,h,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Do(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Lo(l):l=Li(t,l=Ri(n)?Pi:Ci.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&ss(t,a,r,l),zo=!1,h=t.memoizedState,a.state=h,Vo(t,r,a,i);var f=t.memoizedState;s!==d||h!==f||Ii.current||zo?("function"==typeof p&&(rs(t,n,p,r),f=t.memoizedState),(c=zo||os(t,n,c,r,h,f,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Cs(e,t,n,r,o,i)}function Cs(e,t,n,r,i,o){_s(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&Mi(t,n,!1),Vs(e,t,o);r=t.stateNode,ys.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=xo(t,e.child,null,o),t.child=xo(t,null,s,o)):ws(e,t,s,o),t.memoizedState=r.state,i&&Mi(t,n,!0),t.child}function Is(e){var t=e.stateNode;t.pendingContext?Oi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Oi(0,t.context,!1),Xo(e,t.containerInfo)}function Ps(e,t,n,r,i){return fo(),go(i),t.flags|=256,ws(e,t,n,r),t.child}var Ls,Rs,Ns,Os={dehydrated:null,treeContext:null,retryLane:0};function js(e){return{baseLanes:e,cachePool:null,transitions:null}}function zs(e,t,n){var r,i=t.pendingProps,a=ea.current,s=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ti(ea,1&a),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},1&i||null===s?s=jc(l,i,0,null):(s.childLanes=0,s.pendingProps=l),e=Oc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=js(n),t.memoizedState=Os,e):Ms(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,s){if(n)return 256&t.flags?(t.flags&=-257,Ds(e,t,s,r=us(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=jc({mode:"visible",children:r.children},i,0,null),(a=Oc(a,i,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,1&t.mode&&xo(t,e.child,null,s),t.child.memoizedState=js(s),t.memoizedState=Os,a);if(!(1&t.mode))return Ds(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Ds(e,t,s,r=us(a=Error(o(419)),r,void 0))}if(l=0!==(s&e.childLanes),bs||l){if(null!==(r=Cl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,jo(e,i),tc(r,e,i,-1))}return fc(),Ds(e,t,s,r=us(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Tc.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Ki[$i++]=Xi,Ki[$i++]=Ji,Ki[$i++]=Yi,Xi=e.id,Ji=e.overflow,Yi=t),t=Ms(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,a,n);if(s){s=i.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 1&l||t.child===a?(i=Rc(a,c)).subtreeFlags=14680064&a.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null),null!==r?s=Rc(r,s):(s=Oc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?js(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Os,i}return e=(s=e.child).sibling,i=Rc(s,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Ms(e,t){return(t=jc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ds(e,t,n,r){return null!==r&&go(r),xo(t,e.child,null,n),(e=Ms(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Io(e.return,t,n)}function Fs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ws(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ws(e,t,r.children,n),2&(r=ea.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bs(e,n,t);else if(19===e.tag)Bs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ti(ea,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ta(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fs(t,!0,n,null,o);break;case"together":Fs(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Us(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),jl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Rc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Rc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Hs(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qs(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gs(t),null;case 1:case 17:return Ri(t.type)&&Ni(),Gs(t),null;case 3:return r=t.stateNode,Jo(),_i(Ii),_i(Ci),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==oo&&(oc(oo),oo=null))),Gs(t),null;case 5:Zo(t);var i=Yo($o.current);if(n=t.type,null!==e&&null!=t.stateNode)Rs(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Gs(t),null}if(e=Yo(qo.current),ho(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[hi]=t,r[pi]=a,e=!!(1&t.mode),n){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(i=0;i<jr.length;i++)Br(jr[i],r);break;case"source":Br("error",r);break;case"img":case"image":case"link":Br("error",r),Br("load",r);break;case"details":Br("toggle",r);break;case"input":X(r,a),Br("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Br("invalid",r);break;case"textarea":ie(r,a),Br("invalid",r)}for(var l in ye(n,a),i=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Br("scroll",r)}switch(n){case"input":q(r),Z(r,a,!0);break;case"textarea":q(r),ae(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Zr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[pi]=r,Ls(e,t),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Br("cancel",e),Br("close",e),i=r;break;case"iframe":case"object":case"embed":Br("load",e),i=r;break;case"video":case"audio":for(i=0;i<jr.length;i++)Br(jr[i],e);i=r;break;case"source":Br("error",e),i=r;break;case"img":case"image":case"link":Br("error",e),Br("load",e),i=r;break;case"details":Br("toggle",e),i=r;break;case"input":X(e,r),i=Y(e,r),Br("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=M({},r,{value:void 0}),Br("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Br("invalid",e)}for(a in ye(n,i),c=i)if(c.hasOwnProperty(a)){var u=c[a];"style"===a?me(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"==typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"==typeof u&&he(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Br("scroll",e):null!=u&&b(e,a,u,l))}switch(n){case"input":q(e),Z(e,r,!1);break;case"textarea":q(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Gs(t),null;case 6:if(e&&null!=t.stateNode)Ns(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(n=Yo($o.current),Yo(qo.current),ho(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(a=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Qr(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,!!(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Gs(t),null;case 13:if(_i(ea),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==ro&&1&t.mode&&!(128&t.flags))po(),fo(),t.flags|=98560,a=!1;else if(a=ho(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[hi]=t}else fo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gs(t),a=!1}else null!==oo&&(oc(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ea.current?0===Nl&&(Nl=3):fc())),null!==t.updateQueue&&(t.flags|=4),Gs(t),null);case 4:return Jo(),null===e&&Ur(t.stateNode.containerInfo),Gs(t),null;case 10:return Co(t.type._context),Gs(t),null;case 19:if(_i(ea),null===(a=t.memoizedState))return Gs(t),null;if(r=!!(128&t.flags),null===(l=a.rendering))if(r)Hs(a,!1);else{if(0!==Nl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Hs(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ti(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Je()>Wl&&(t.flags|=128,r=!0,Hs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ta(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Hs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!io)return Gs(t),null}else 2*Je()-a.renderingStartTime>Wl&&1073741824!==n&&(t.flags|=128,r=!0,Hs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Je(),t.sibling=null,n=ea.current,Ti(ea,r?1&n|2:1&n),t):(Gs(t),null);case 22:case 23:return uc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Ll)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ks(e,t){switch(to(t),t.tag){case 1:return Ri(t.type)&&Ni(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),_i(Ii),_i(Ci),ra(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zo(t),null;case 13:if(_i(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));fo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return _i(ea),null;case 4:return Jo(),null;case 10:return Co(t.type._context),null;case 22:case 23:return uc(),null;default:return null}}Ls=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Rs=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Yo(qo.current);var o,a=null;switch(n){case"input":i=Y(e,i),r=Y(e,r),a=[];break;case"select":i=M({},i,{value:void 0}),r=M({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Zr)}for(u in ye(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(a=a||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Br("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Ns=function(e,t,n,r){n!==r&&(t.flags|=4)};var $s=!1,Ys=!1,Xs="function"==typeof WeakSet?WeakSet:Set,Js=null;function Qs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Sc(e,t,n)}else n.current=null}function Zs(e,t,n){try{n()}catch(n){Sc(e,t,n)}}var el=!1;function tl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Zs(t,n,o)}i=i.next}while(i!==r)}}function nl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function il(e){var t=e.alternate;null!==t&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[pi],delete t[gi],delete t[mi],delete t[vi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ol(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function sl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(sl(e,t,n),e=e.sibling;null!==e;)sl(e,t,n),e=e.sibling}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}var cl=null,ul=!1;function dl(e,t,n){for(n=n.child;null!==n;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Ys||Qs(n,t);case 6:var r=cl,i=ul;cl=null,dl(e,t,n),ul=i,null!==(cl=r)&&(ul?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(ul?(e=cl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ut(e)):li(cl,n.stateNode));break;case 4:r=cl,i=ul,cl=n.stateNode.containerInfo,ul=!0,dl(e,t,n),cl=r,ul=i;break;case 0:case 11:case 14:case 15:if(!Ys&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&Zs(n,t,a),i=i.next}while(i!==r)}dl(e,t,n);break;case 1:if(!Ys&&(Qs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Sc(n,t,e)}dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,dl(e,t,n),Ys=r):dl(e,t,n);break;default:dl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xs),t.forEach(function(t){var r=Ec.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function fl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:cl=l.stateNode,ul=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===cl)throw Error(o(160));hl(a,s,i),cl=null,ul=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){Sc(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fl(t,e),ml(e),4&r){try{tl(3,e,e.return),nl(3,e)}catch(t){Sc(e,e.return,t)}try{tl(5,e,e.return)}catch(t){Sc(e,e.return,t)}}break;case 1:fl(t,e),ml(e),512&r&&null!==n&&Qs(n,n.return);break;case 5:if(fl(t,e),ml(e),512&r&&null!==n&&Qs(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(t){Sc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&J(i,a),be(l,s);var u=be(l,a);for(s=0;s<c.length;s+=2){var d=c[s],h=c[s+1];"style"===d?me(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):b(i,d,h,u)}switch(l){case"input":Q(i,a);break;case"textarea":oe(i,a);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var f=a.value;null!=f?ne(i,!!a.multiple,f,!1):p!==!!a.multiple&&(null!=a.defaultValue?ne(i,!!a.multiple,a.defaultValue,!0):ne(i,!!a.multiple,a.multiple?[]:"",!1))}i[pi]=a}catch(t){Sc(e,e.return,t)}}break;case 6:if(fl(t,e),ml(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(t){Sc(e,e.return,t)}}break;case 3:if(fl(t,e),ml(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ut(t.containerInfo)}catch(t){Sc(e,e.return,t)}break;case 4:default:fl(t,e),ml(e);break;case 13:fl(t,e),ml(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(Fl=Je())),4&r&&pl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ys=(u=Ys)||d,fl(t,e),Ys=u):fl(t,e),ml(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&1&e.mode)for(Js=e,d=e.child;null!==d;){for(h=Js=d;null!==Js;){switch(f=(p=Js).child,p.tag){case 0:case 11:case 14:case 15:tl(4,p,p.return);break;case 1:Qs(p,p.return);var g=p.stateNode;if("function"==typeof g.componentWillUnmount){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){Sc(r,n,e)}}break;case 5:Qs(p,p.return);break;case 22:if(null!==p.memoizedState){wl(h);continue}}null!==f?(f.return=p,Js=f):wl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=ge("display",s))}catch(t){Sc(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(t){Sc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:fl(t,e),ml(e),4&r&&pl(e);case 21:}}function ml(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ol(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),ll(e,al(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;sl(e,al(e),a);break;default:throw Error(o(161))}}catch(t){Sc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vl(e,t,n){Js=e,yl(e,t,n)}function yl(e,t,n){for(var r=!!(1&e.mode);null!==Js;){var i=Js,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||$s;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Ys;s=$s;var c=Ys;if($s=a,(Ys=l)&&!c)for(Js=i;null!==Js;)l=(a=Js).child,22===a.tag&&null!==a.memoizedState?xl(i):null!==l?(l.return=a,Js=l):xl(i);for(;null!==o;)Js=o,yl(o,t,n),o=o.sibling;Js=i,$s=s,Ys=c}bl(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,Js=o):bl(e)}}function bl(e){for(;null!==Js;){var t=Js;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ys||nl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ys)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Ho(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ho(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Ut(h)}}}break;default:throw Error(o(163))}Ys||512&t.flags&&rl(t)}catch(e){Sc(t,t.return,e)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function wl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function xl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{nl(4,t)}catch(e){Sc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Sc(t,i,e)}}var o=t.return;try{rl(t)}catch(e){Sc(t,o,e)}break;case 5:var a=t.return;try{rl(t)}catch(e){Sc(t,a,e)}}}catch(e){Sc(t,t.return,e)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var Al,Sl=Math.ceil,kl=w.ReactCurrentDispatcher,_l=w.ReactCurrentOwner,Tl=w.ReactCurrentBatchConfig,El=0,Cl=null,Il=null,Pl=0,Ll=0,Rl=ki(0),Nl=0,Ol=null,jl=0,zl=0,Ml=0,Dl=null,Bl=null,Fl=0,Wl=1/0,Ul=null,Vl=!1,Hl=null,Gl=null,ql=!1,Kl=null,$l=0,Yl=0,Xl=null,Jl=-1,Ql=0;function Zl(){return 6&El?Je():-1!==Jl?Jl:Jl=Je()}function ec(e){return 1&e.mode?2&El&&0!==Pl?Pl&-Pl:null!==mo.transition?(0===Ql&&(Ql=gt()),Ql):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Xt(e.type):1}function tc(e,t,n,r){if(50<Yl)throw Yl=0,Xl=null,Error(o(185));vt(e,n,r),2&El&&e===Cl||(e===Cl&&(!(2&El)&&(zl|=n),4===Nl&&ac(e,Pl)),nc(e,r),1===n&&0===El&&!(1&t.mode)&&(Wl=Je()+500,Bi&&Ui()))}function nc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=pt(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=ht(e,e===Cl?Pl:0);if(0===r)null!==n&&$e(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&$e(n),1===t)0===e.tag?function(e){Bi=!0,Wi(e)}(sc.bind(null,e)):Wi(sc.bind(null,e)),ai(function(){!(6&El)&&Ui()}),n=null;else{switch(wt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Cc(n,rc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function rc(e,t){if(Jl=-1,Ql=0,6&El)throw Error(o(327));var n=e.callbackNode;if(xc()&&e.callbackNode!==n)return null;var r=ht(e,e===Cl?Pl:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var i=El;El|=2;var a=pc();for(Cl===e&&Pl===t||(Ul=null,Wl=Je()+500,dc(e,t));;)try{vc();break}catch(t){hc(e,t)}Eo(),kl.current=a,El=i,null!==Il?t=0:(Cl=null,Pl=0,t=Nl)}if(0!==t){if(2===t&&(0!==(i=ft(e))&&(r=i,t=ic(e,i))),1===t)throw n=Ol,dc(e,0),ac(e,r),nc(e,Je()),n;if(6===t)ac(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!sr(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=gc(e,r),2===t&&(a=ft(e),0!==a&&(r=a,t=ic(e,a))),1!==t)))throw n=Ol,dc(e,0),ac(e,r),nc(e,Je()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:wc(e,Bl,Ul);break;case 3:if(ac(e,r),(130023424&r)===r&&10<(t=Fl+500-Je())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){Zl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(wc.bind(null,e,Bl,Ul),t);break}wc(e,Bl,Ul);break;case 4:if(ac(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=ri(wc.bind(null,e,Bl,Ul),r);break}wc(e,Bl,Ul);break;default:throw Error(o(329))}}}return nc(e,Je()),e.callbackNode===n?rc.bind(null,e):null}function ic(e,t){var n=Dl;return e.current.memoizedState.isDehydrated&&(dc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=Bl,Bl=n,null!==t&&oc(t)),e}function oc(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function ac(e,t){for(t&=~Ml,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function sc(e){if(6&El)throw Error(o(327));xc();var t=ht(e,0);if(!(1&t))return nc(e,Je()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=ic(e,r))}if(1===n)throw n=Ol,dc(e,0),ac(e,t),nc(e,Je()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wc(e,Bl,Ul),nc(e,Je()),null}function lc(e,t){var n=El;El|=1;try{return e(t)}finally{0===(El=n)&&(Wl=Je()+500,Bi&&Ui())}}function cc(e){null!==Kl&&0===Kl.tag&&!(6&El)&&xc();var t=El;El|=1;var n=Tl.transition,r=bt;try{if(Tl.transition=null,bt=1,e)return e()}finally{bt=r,Tl.transition=n,!(6&(El=t))&&Ui()}}function uc(){Ll=Rl.current,_i(Rl)}function dc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ni();break;case 3:Jo(),_i(Ii),_i(Ci),ra();break;case 5:Zo(r);break;case 4:Jo();break;case 13:case 19:_i(ea);break;case 10:Co(r.type._context);break;case 22:case 23:uc()}n=n.return}if(Cl=e,Il=e=Rc(e.current,null),Pl=Ll=t,Nl=0,Ol=null,Ml=zl=jl=0,Bl=Dl=null,null!==Ro){for(t=0;t<Ro.length;t++)if(null!==(r=(n=Ro[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Ro=null}return e}function hc(e,t){for(;;){var n=Il;try{if(Eo(),ia.current=Qa,ua){for(var r=sa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ua=!1}if(aa=0,ca=la=sa=null,da=!1,ha=0,_l.current=null,null===n||null===n.return){Nl=1,Ol=t,Il=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=Pl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(!(1&d.mode||0!==h&&11!==h&&15!==h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=ms(s);if(null!==f){f.flags&=-257,vs(f,s,l,0,t),1&f.mode&&gs(a,u,t),c=u;var g=(t=f).updateQueue;if(null===g){var m=new Set;m.add(c),t.updateQueue=m}else g.add(c);break e}if(!(1&t)){gs(a,u,t),fc();break e}c=Error(o(426))}else if(io&&1&l.mode){var v=ms(s);if(null!==v){!(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),go(cs(c,l));break e}}a=c=cs(c,l),4!==Nl&&(Nl=2),null===Dl?Dl=[a]:Dl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Uo(a,ps(0,c,t));break e;case 1:l=c;var y=a.type,b=a.stateNode;if(!(128&a.flags||"function"!=typeof y.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Gl&&Gl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Uo(a,fs(a,l,t));break e}}a=a.return}while(null!==a)}bc(n)}catch(e){t=e,Il===n&&null!==n&&(Il=n=n.return);continue}break}}function pc(){var e=kl.current;return kl.current=Qa,null===e?Qa:e}function fc(){0!==Nl&&3!==Nl&&2!==Nl||(Nl=4),null===Cl||!(268435455&jl)&&!(268435455&zl)||ac(Cl,Pl)}function gc(e,t){var n=El;El|=2;var r=pc();for(Cl===e&&Pl===t||(Ul=null,dc(e,t));;)try{mc();break}catch(t){hc(e,t)}if(Eo(),El=n,kl.current=r,null!==Il)throw Error(o(261));return Cl=null,Pl=0,Nl}function mc(){for(;null!==Il;)yc(Il)}function vc(){for(;null!==Il&&!Ye();)yc(Il)}function yc(e){var t=Al(e.alternate,e,Ll);e.memoizedProps=e.pendingProps,null===t?bc(e):Il=t,_l.current=null}function bc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ks(n,t)))return n.flags&=32767,void(Il=n);if(null===e)return Nl=6,void(Il=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=qs(n,t,Ll)))return void(Il=n);if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Nl&&(Nl=5)}function wc(e,t,n){var r=bt,i=Tl.transition;try{Tl.transition=null,bt=1,function(e,t,n,r){do{xc()}while(null!==Kl);if(6&El)throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===Cl&&(Il=Cl=null,Pl=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||ql||(ql=!0,Cc(tt,function(){return xc(),null})),a=!!(15990&n.flags),!!(15990&n.subtreeFlags)||a){a=Tl.transition,Tl.transition=null;var s=bt;bt=1;var l=El;El|=4,_l.current=null,function(e,t){if(ei=Ht,pr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==a||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===i&&(l=s),p===a&&++d===r&&(c=s),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Ht=!1,Js=t;null!==Js;)if(e=(t=Js).child,1028&t.subtreeFlags&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var g=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,v=g.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:ns(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(o(163))}}catch(e){Sc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}g=el,el=!1}(e,n),gl(n,e),fr(ti),Ht=!!ei,ti=ei=null,e.current=n,vl(n,e,i),Xe(),El=l,bt=s,Tl.transition=a}else e.current=n;if(ql&&(ql=!1,Kl=e,$l=i),a=e.pendingLanes,0===a&&(Gl=null),function(e){if(ot&&"function"==typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),nc(e,Je()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Vl)throw Vl=!1,e=Hl,Hl=null,e;!!(1&$l)&&0!==e.tag&&xc(),a=e.pendingLanes,1&a?e===Xl?Yl++:(Yl=0,Xl=e):Yl=0,Ui()}(e,t,n,r)}finally{Tl.transition=i,bt=r}return null}function xc(){if(null!==Kl){var e=wt($l),t=Tl.transition,n=bt;try{if(Tl.transition=null,bt=16>e?16:e,null===Kl)var r=!1;else{if(e=Kl,Kl=null,$l=0,6&El)throw Error(o(331));var i=El;for(El|=4,Js=e.current;null!==Js;){var a=Js,s=a.child;if(16&Js.flags){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Js=u;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:tl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Js=h;else for(;null!==Js;){var p=(d=Js).sibling,f=d.return;if(il(d),d===u){Js=null;break}if(null!==p){p.return=f,Js=p;break}Js=f}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(null!==m)}}Js=a}}if(2064&a.subtreeFlags&&null!==s)s.return=a,Js=s;else e:for(;null!==Js;){if(2048&(a=Js).flags)switch(a.tag){case 0:case 11:case 15:tl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Js=y;break e}Js=a.return}}var b=e.current;for(Js=b;null!==Js;){var w=(s=Js).child;if(2064&s.subtreeFlags&&null!==w)w.return=s,Js=w;else e:for(s=b;null!==Js;){if(2048&(l=Js).flags)try{switch(l.tag){case 0:case 11:case 15:nl(9,l)}}catch(e){Sc(l,l.return,e)}if(l===s){Js=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,Js=x;break e}Js=l.return}}if(El=i,Ui(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Tl.transition=t}}return!1}function Ac(e,t,n){e=Fo(e,t=ps(0,t=cs(n,t),1),1),t=Zl(),null!==e&&(vt(e,1,t),nc(e,t))}function Sc(e,t,n){if(3===e.tag)Ac(e,e,n);else for(;null!==t;){if(3===t.tag){Ac(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Gl||!Gl.has(r))){t=Fo(t,e=fs(t,e=cs(n,e),1),1),e=Zl(),null!==t&&(vt(t,1,e),nc(t,e));break}}t=t.return}}function kc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Zl(),e.pingedLanes|=e.suspendedLanes&n,Cl===e&&(Pl&n)===n&&(4===Nl||3===Nl&&(130023424&Pl)===Pl&&500>Je()-Fl?dc(e,0):Ml|=n),nc(e,t)}function _c(e,t){0===t&&(1&e.mode?(t=ut,!(130023424&(ut<<=1))&&(ut=4194304)):t=1);var n=Zl();null!==(e=jo(e,t))&&(vt(e,t,n),nc(e,n))}function Tc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),_c(e,n)}function Ec(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),_c(e,n)}function Cc(e,t){return Ke(e,t)}function Ic(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pc(e,t,n,r){return new Ic(e,t,n,r)}function Lc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Rc(e,t){var n=e.alternate;return null===n?((n=Pc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nc(e,t,n,r,i,a){var s=2;if(r=e,"function"==typeof e)Lc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case S:return Oc(n.children,i,a,t);case k:s=8,i|=8;break;case _:return(e=Pc(12,n,t,2|i)).elementType=_,e.lanes=a,e;case I:return(e=Pc(13,n,t,i)).elementType=I,e.lanes=a,e;case P:return(e=Pc(19,n,t,i)).elementType=P,e.lanes=a,e;case N:return jc(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case T:s=10;break e;case E:s=9;break e;case C:s=11;break e;case L:s=14;break e;case R:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Pc(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Oc(e,t,n,r){return(e=Pc(7,e,r,t)).lanes=n,e}function jc(e,t,n,r){return(e=Pc(22,e,r,t)).elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function zc(e,t,n){return(e=Pc(6,e,null,t)).lanes=n,e}function Mc(e,t,n){return(t=Pc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Dc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bc(e,t,n,r,i,o,a,s,l){return e=new Dc(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Pc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mo(o),e}function Fc(e){if(!e)return Ei;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ri(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Ri(n))return ji(e,n,t)}return t}function Wc(e,t,n,r,i,o,a,s,l){return(e=Bc(n,r,!0,e,0,o,0,s,l)).context=Fc(null),n=e.current,(o=Bo(r=Zl(),i=ec(n))).callback=null!=t?t:null,Fo(n,o,i),e.current.lanes=i,vt(e,i,r),nc(e,r),e}function Uc(e,t,n,r){var i=t.current,o=Zl(),a=ec(i);return n=Fc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Bo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Fo(i,t,a))&&(tc(e,i,a,o),Wo(e,i,a)),a}function Vc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Hc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gc(e,t){Hc(e,t),(e=e.alternate)&&Hc(e,t)}Al=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ii.current)bs=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:Is(t),fo();break;case 5:Qo(t);break;case 1:Ri(t.type)&&zi(t);break;case 4:Xo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ti(So,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ti(ea,1&ea.current),t.flags|=128,null):0!==(n&t.child.childLanes)?zs(e,t,n):(Ti(ea,1&ea.current),null!==(e=Vs(e,t,n))?e.sibling:null);Ti(ea,1&ea.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Ws(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ti(ea,ea.current),r)break;return null;case 22:case 23:return t.lanes=0,ks(e,t,n)}return Vs(e,t,n)}(e,t,n);bs=!!(131072&e.flags)}else bs=!1,io&&1048576&t.flags&&Zi(t,qi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Us(e,t),e=t.pendingProps;var i=Li(t,Ci.current);Po(t,n),i=ma(null,t,r,e,i,n);var a=va();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ri(r)?(a=!0,zi(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Mo(t),i.updater=is,t.stateNode=i,i._reactInternals=t,ls(t,r,e,n),t=Cs(null,t,r,!0,a,n)):(t.tag=0,io&&a&&eo(t),ws(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Us(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Lc(e)?1:0;if(null!=e){if((e=e.$$typeof)===C)return 11;if(e===L)return 14}return 2}(r),e=ns(r,e),i){case 0:t=Ts(null,t,r,e,n);break e;case 1:t=Es(null,t,r,e,n);break e;case 11:t=xs(null,t,r,e,n);break e;case 14:t=As(null,t,r,ns(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ts(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 1:return r=t.type,i=t.pendingProps,Es(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 3:e:{if(Is(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,Do(e,t),Vo(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ps(e,t,r,n,i=cs(Error(o(423)),t));break e}if(r!==i){t=Ps(e,t,r,n,i=cs(Error(o(424)),t));break e}for(ro=ci(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=Ao(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fo(),r===i){t=Vs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return Qo(t),null===e&&co(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==a&&ni(r,a)&&(t.flags|=32),_s(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&co(t),null;case 13:return zs(e,t,n);case 4:return Xo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=xo(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,xs(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Ti(So,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===i.children&&!Ii.current){t=Vs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=Bo(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),Io(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Io(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Po(t,n),r=r(i=Lo(i)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return i=ns(r=t.type,t.pendingProps),As(e,t,r,i=ns(r.type,i),n);case 15:return Ss(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ns(r,i),Us(e,t),t.tag=1,Ri(r)?(e=!0,zi(t)):e=!1,Po(t,n),as(t,r,i),ls(t,r,i,n),Cs(null,t,r,!0,e,n);case 19:return Ws(e,t,n);case 22:return ks(e,t,n)}throw Error(o(156,t.tag))};var qc="function"==typeof reportError?reportError:function(e){console.error(e)};function Kc(e){this._internalRoot=e}function $c(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Jc(){}function Qc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Vc(a);s.call(e)}}Uc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Vc(a);o.call(e)}}var a=Wc(t,r,e,0,null,!1,0,"",Jc);return e._reactRootContainer=a,e[fi]=a.current,Ur(8===e.nodeType?e.parentNode:e),cc(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Vc(l);s.call(e)}}var l=Bc(e,0,!1,null,0,!1,0,"",Jc);return e._reactRootContainer=l,e[fi]=l.current,Ur(8===e.nodeType?e.parentNode:e),cc(function(){Uc(t,l,n,r)}),l}(n,t,e,i,r);return Vc(a)}$c.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Uc(e,t,null,null)},$c.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cc(function(){Uc(null,e,null,null)}),t[fi]=null}},$c.prototype.unstable_scheduleHydration=function(e){if(e){var t=kt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&0!==t&&t<Nt[n].priority;n++);Nt.splice(n,0,e),0===n&&Mt(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),nc(t,Je()),!(6&El)&&(Wl=Je()+500,Ui()))}break;case 13:cc(function(){var t=jo(e,1);if(null!==t){var n=Zl();tc(t,e,1,n)}}),Gc(e,1)}},At=function(e){if(13===e.tag){var t=jo(e,134217728);if(null!==t)tc(t,e,134217728,Zl());Gc(e,134217728)}},St=function(e){if(13===e.tag){var t=ec(e),n=jo(e,t);if(null!==n)tc(n,e,t,Zl());Gc(e,t)}},kt=function(){return bt},_t=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Ae=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=xi(r);if(!i)throw Error(o(90));K(r),Q(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ce=lc,Ie=cc;var Zc={usingClientEntryPoint:!1,Events:[bi,wi,xi,Te,Ee,lc]},eu={findFiberByHostInstance:yi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tu={bundleType:eu.bundleType,version:eu.version,rendererPackageName:eu.rendererPackageName,rendererConfig:eu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ge(e))?null:e.stateNode},findFiberByHostInstance:eu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nu.isDisabled&&nu.supportsFiber)try{it=nu.inject(tu),ot=nu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yc(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:A,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Yc(e))throw Error(o(299));var n=!1,r="",i=qc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Bc(e,1,!1,null,0,n,0,r,i),e[fi]=t.current,Ur(8===e.nodeType?e.parentNode:e),new Kc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ge(t))?null:e.stateNode},t.flushSync=function(e){return cc(e)},t.hydrate=function(e,t,n){if(!Xc(t))throw Error(o(200));return Qc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=qc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Wc(t,null,e,1,null!=n?n:null,i,0,a,s),e[fi]=t.current,Ur(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $c(t)},t.render=function(e,t,n){if(!Xc(t))throw Error(o(200));return Qc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xc(e))throw Error(o(40));return!!e._reactRootContainer&&(cc(function(){Qc(null,null,e,!1,function(){e._reactRootContainer=null,e[fi]=null})}),!0)},t.unstable_batchedUpdates=lc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Qc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},1508(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,g=!1,m=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function x(e){if(m=!1,w(e),!g)if(null!==r(c))g=!0,N(A);else{var t=r(u);null!==t&&O(x,t.startTime-e)}}function A(e,n){g=!1,m&&(m=!1,y(T),T=-1),f=!0;var o=p;try{for(w(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!I());){var a=h.callback;if("function"==typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),w(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&O(x,d.startTime-n),l=!1}return l}finally{h=null,p=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,k=!1,_=null,T=-1,E=5,C=-1;function I(){return!(t.unstable_now()-C<E)}function P(){if(null!==_){var e=t.unstable_now();C=e;var n=!0;try{n=_(!0,e)}finally{n?S():(k=!1,_=null)}}else k=!1}if("function"==typeof b)S=function(){b(P)};else if("undefined"!=typeof MessageChannel){var L=new MessageChannel,R=L.port2;L.port1.onmessage=P,S=function(){R.postMessage(null)}}else S=function(){v(P,0)};function N(e){_=e,k||(k=!0,S())}function O(e,n){T=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||f||(g=!0,N(A))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(m?(y(T),T=-1):m=!0,O(x,o-a))):(e.sortIndex=s,n(c,e),g||f||(g=!0,N(A))),e},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},1634(e,t,n){"use strict";n.d(t,{A:()=>r});const r={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},1683(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8661),i=n(1941);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo(()=>t.every(e=>null==e)?null:e=>{t.forEach(t=>{(0,i.A)(t,e)})},t)}},1686(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(6997);const i=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},1687(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8661);const i={};function o(e,t){const n=r.useRef(i);return n.current===i&&(n.current=e(t)),n}},1834(e,t,n){"use strict";n.d(t,{AH:()=>u,i7:()=>d,mL:()=>c});var r=n(457),i=n(8661),o=n(696),a=n(4774),s=n(3385),l=(n(5449),n(8720),function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return i.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=r.E,a[1]=(0,r.c)(e,t);for(var s=2;s<o;s++)a[s]=n[s];return i.createElement.apply(null,a)});!function(e){var t;t||(t=e.JSX||(e.JSX={}))}(l||(l={}));var c=(0,r.w)(function(e,t){var n=e.styles,l=(0,s.J)([n],void 0,i.useContext(r.T)),c=i.useRef();return(0,a.i)(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",e),n.hydrate([i])),c.current=[n,r],function(){n.flush()}},[t]),(0,a.i)(function(){var e=c.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,o.sk)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)}},[t,l.name]),null});function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.J)(t)}function d(){var e=u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},1867(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(8661);const i=function(e,t){var n,i;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(i=e.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)}},1876(e,t,n){"use strict";n.r(t),n.d(t,{GlobalStyles:()=>A.A,StyledEngineProvider:()=>x,ThemeContext:()=>i.T,css:()=>v.AH,default:()=>S,internal_processStyles:()=>k,internal_serializeStyles:()=>T,keyframes:()=>v.i7});var r=n(4320),i=n(457),o=n(3385),a=n(4774),s=n(696),l=n(8661),c=n(7601),u=/^((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|fetchpriority|fetchPriority|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|popover|popoverTarget|popoverTargetAction|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)-.*))$/,d=(0,c.A)(function(e){return u.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),h=function(e){return"theme"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?d:h},f=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,s.SF)(t,n,r),(0,a.s)(function(){return(0,s.sk)(t,n,r)}),null},m=function e(t,n){var a,c,u=t.__emotion_real===t,d=u&&t.__emotion_base||t;void 0!==n&&(a=n.label,c=n.target);var h=f(t,n,u),m=h||p(d),v=!m("as");return function(){var y=arguments,b=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&b.push("label:"+a+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{var w=y[0];b.push(w[0]);for(var x=y.length,A=1;A<x;A++)b.push(y[A],w[A])}var S=(0,i.w)(function(e,t,n){var r=v&&e.as||d,a="",u=[],f=e;if(null==e.theme){for(var y in f={},e)f[y]=e[y];f.theme=l.useContext(i.T)}"string"==typeof e.className?a=(0,s.Rk)(t.registered,u,e.className):null!=e.className&&(a=e.className+" ");var w=(0,o.J)(b.concat(u),t.registered,f);a+=t.key+"-"+w.name,void 0!==c&&(a+=" "+c);var x=v&&void 0===h?p(r):m,A={};for(var S in e)v&&"as"===S||x(S)&&(A[S]=e[S]);return A.className=a,n&&(A.ref=n),l.createElement(l.Fragment,null,l.createElement(g,{cache:t,serialized:w,isStringTag:"string"==typeof r}),l.createElement(r,A))});return S.displayName=void 0!==a?a:"Styled("+("string"==typeof d?d:d.displayName||d.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=d,S.__emotion_styles=b,S.__emotion_forwardProp=h,Object.defineProperty(S,"toString",{value:function(){return"."+c}}),S.withComponent=function(t,i){return e(t,(0,r.A)({},n,i,{shouldForwardProp:f(S,i,!0)})).apply(void 0,b)},S}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){m[e]=m(e)});var v=n(1834),y=n(5449),b=n(5089);const w=new Map;function x(e){const{injectFirst:t,enableCssLayer:n,children:r}=e,o=l.useMemo(()=>{const e="".concat(t,"-").concat(n);if("object"==typeof document&&w.has(e))return w.get(e);const r=function(e,t){const n=(0,y.A)({key:"css",prepend:e});if(t){const e=n.insert;n.insert=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n[1].styles.match(/^@layer\s+[^{]*$/)||(n[1].styles="@layer mui {".concat(n[1].styles,"}")),e(...n)}}return n}(t,n);return w.set(e,r),r},[t,n]);return t||n?(0,b.jsx)(i.C,{value:o,children:r}):r}var A=n(3780);function S(e,t){return m(e,t)}const k=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},_=[];function T(e){return _[0]=e,(0,o.J)(_)}},1941(e,t,n){"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})},1985(e,t,n){"use strict";n.d(t,{A:()=>u,k:()=>l});var r=n(6175),i=n(1686),o=n(8343),a=n(3830),s=n(2692);function l(){function e(e,t,n,i){const s={[e]:t,theme:n},l=i[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:h}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const p=(0,o.Yn)(n,u)||{};if(h)return h(s);return(0,a.NI)(s,t,t=>{let n=(0,o.BO)(p,d,t);return t===n&&"string"==typeof t&&(n=(0,o.BO)(p,d,"".concat(e).concat("default"===t?"":(0,r.A)(t)),t)),!1===c?n:{[c]:n}})}return function t(n){var r;const{sx:o,theme:l={},nested:c}=n||{};if(!o)return null;const u=null!=(r=l.unstable_sxConfig)?r:s.A;function d(n){let r=n;if("function"==typeof n)r=n(l);else if("object"!=typeof n)return n;if(!r)return null;const o=(0,a.EU)(l.breakpoints),s=Object.keys(o);let d=o;return Object.keys(r).forEach(n=>{const o=(s=r[n],c=l,"function"==typeof s?s(c):s);var s,c;if(null!=o)if("object"==typeof o)if(u[n])d=(0,i.A)(d,e(n,o,l,u));else{const e=(0,a.NI)({theme:l},o,e=>({[n]:e}));!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(r);return t.every(e=>i.size===Object.keys(e).length)}(e,o)?d=(0,i.A)(d,e):d[n]=t({sx:o,theme:l,nested:!0})}else d=(0,i.A)(d,e(n,o,l,u))}),!c&&l.modularCssLayers?{"@layer sx":(0,a.vf)(s,d)}:(0,a.vf)(s,d)}return Array.isArray(o)?o.map(d):d(o)}}const c=l();c.filterProps=["sx"];const u=c},2037(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(8661);function i(e){let{controlled:t,default:n,name:i,state:o="value"}=e;const{current:a}=r.useRef(void 0!==t),[s,l]=r.useState(n);return[a?t:s,r.useCallback(e=>{a||l(e)},[])]}},2156(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(2037).A},2223(e,t,n){"use strict";n.d(t,{A:()=>i});function r(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const i=["none",r(0,2,1,-1,0,1,1,0,0,1,3,0),r(0,3,1,-2,0,2,2,0,0,1,5,0),r(0,3,3,-2,0,3,4,0,0,1,8,0),r(0,2,4,-1,0,4,5,0,0,1,10,0),r(0,3,5,-1,0,5,8,0,0,1,14,0),r(0,3,5,-1,0,6,10,0,0,1,18,0),r(0,4,5,-2,0,7,10,1,0,2,16,1),r(0,5,5,-3,0,8,10,1,0,3,14,2),r(0,5,6,-3,0,9,12,1,0,3,16,2),r(0,6,6,-3,0,10,14,1,0,4,18,3),r(0,6,7,-4,0,11,15,1,0,4,20,3),r(0,7,8,-4,0,12,17,2,0,5,22,4),r(0,7,8,-4,0,13,19,2,0,5,24,4),r(0,7,9,-4,0,14,21,2,0,5,26,4),r(0,8,9,-5,0,15,22,2,0,6,28,5),r(0,8,10,-5,0,16,24,2,0,6,30,5),r(0,8,11,-5,0,17,26,2,0,6,32,5),r(0,9,11,-5,0,18,28,2,0,7,34,6),r(0,9,12,-6,0,19,29,2,0,7,36,6),r(0,10,13,-6,0,20,31,3,0,8,38,7),r(0,10,13,-6,0,21,33,3,0,8,40,7),r(0,10,14,-6,0,22,35,3,0,8,42,7),r(0,11,14,-7,0,23,36,3,0,9,44,8),r(0,11,15,-7,0,24,38,3,0,9,46,8)]},2266(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew")},2297(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:()=>i.A,createChainedFunction:()=>o.A,createSvgIcon:()=>a.A,debounce:()=>s.A,deprecatedPropType:()=>l,isMuiElement:()=>c.A,ownerDocument:()=>u.A,ownerWindow:()=>d.A,requirePropFactory:()=>h,setRef:()=>p,unstable_ClassNameGenerator:()=>x,unstable_useEnhancedEffect:()=>f.A,unstable_useId:()=>g.A,unsupportedProp:()=>m,useControlled:()=>v.A,useEventCallback:()=>y.A,useForkRef:()=>b.A,useIsFocusVisible:()=>w.A});var r=n(7599),i=n(5227),o=n(7830),a=n(4270),s=n(3806);const l=function(e,t){return()=>null};var c=n(1867),u=n(5571),d=n(6614);const h=function(e,t){return()=>null};const p=n(1941).A;var f=n(4077),g=n(63);const m=function(e,t,n,r,i){return null};var v=n(2156),y=n(5471),b=n(2513),w=n(4188);const x={configure:e=>{r.A.configure(e)}}},2428(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore")},2513(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(1683).A},2561(e,t,n){"use strict";function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout(()=>{e.apply(this,i)},n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{A:()=>r})},2577(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(8661),i=n(8791);let o=!0,a=!1;const s=new i.E,l={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 c(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function u(){o=!1}function d(){"hidden"===this.visibilityState&&a&&(o=!0)}function h(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return o||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!l[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function p(){const e=r.useCallback(e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))},[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!h(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,s.start(100,()=>{a=!1}),t.current=!1,!0)},ref:e}}},2621(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>o});var r=n(5823);const i=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function o(e){const t="".concat(e).match(i);return t&&t[1]||""}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||o(e)||t}function s(e,t,n){const r=a(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function l(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return a(e,"Component");if("object"==typeof e)switch(e.$$typeof){case r.vM:return s(e,e.render,"ForwardRef");case r.lD:return s(e,e.type,"memo");default:return}}}},2623(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A,isPlainObject:()=>r.Q});var r=n(6997)},2692(e,t,n){"use strict";n.d(t,{A:()=>O});var r=n(4262),i=n(8343),o=n(1686);const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),i=e=>Object.keys(e).reduce((t,n)=>r[n]?(0,o.A)(t,r[n](e)):t,{});return i.propTypes={},i.filterProps=t.reduce((e,t)=>e.concat(t.filterProps),[]),i};var s=n(3830);function l(e){return"number"!=typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,i.Ay)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),h=c("borderRight",l),p=c("borderBottom",l),f=c("borderLeft",l),g=c("borderColor"),m=c("borderTopColor"),v=c("borderRightColor"),y=c("borderBottomColor"),b=c("borderLeftColor"),w=c("outline",l),x=c("outlineColor"),A=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r._W)(t,e)});return(0,s.NI)(e,e.borderRadius,n)}return null};A.propTypes={},A.filterProps=["borderRadius"];a(u,d,h,p,f,g,m,v,y,b,A,w,x);const S=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r._W)(t,e)});return(0,s.NI)(e,e.gap,n)}return null};S.propTypes={},S.filterProps=["gap"];const k=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.columnGap,n)}return null};k.propTypes={},k.filterProps=["columnGap"];const _=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.rowGap,n)}return null};_.propTypes={},_.filterProps=["rowGap"];a(S,k,_,(0,i.Ay)({prop:"gridColumn"}),(0,i.Ay)({prop:"gridRow"}),(0,i.Ay)({prop:"gridAutoFlow"}),(0,i.Ay)({prop:"gridAutoColumns"}),(0,i.Ay)({prop:"gridAutoRows"}),(0,i.Ay)({prop:"gridTemplateColumns"}),(0,i.Ay)({prop:"gridTemplateRows"}),(0,i.Ay)({prop:"gridTemplateAreas"}),(0,i.Ay)({prop:"gridArea"}));function T(e,t){return"grey"===t?t:e}a((0,i.Ay)({prop:"color",themeKey:"palette",transform:T}),(0,i.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:T}),(0,i.Ay)({prop:"backgroundColor",themeKey:"palette",transform:T}));function E(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const C=(0,i.Ay)({prop:"width",transform:E}),I=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||s.zu[t];return i?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:"".concat(i).concat(e.theme.breakpoints.unit)}:{maxWidth:i}:{maxWidth:E(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};I.filterProps=["maxWidth"];const P=(0,i.Ay)({prop:"minWidth",transform:E}),L=(0,i.Ay)({prop:"height",transform:E}),R=(0,i.Ay)({prop:"maxHeight",transform:E}),N=(0,i.Ay)({prop:"minHeight",transform:E}),O=((0,i.Ay)({prop:"size",cssProperty:"width",transform:E}),(0,i.Ay)({prop:"size",cssProperty:"height",transform:E}),a(C,I,P,L,R,N,(0,i.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:A},color:{themeKey:"palette",transform:T},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:T},backgroundColor:{themeKey:"palette",transform:T},p:{style:r.Ms},pt:{style:r.Ms},pr:{style:r.Ms},pb:{style:r.Ms},pl:{style:r.Ms},px:{style:r.Ms},py:{style:r.Ms},padding:{style:r.Ms},paddingTop:{style:r.Ms},paddingRight:{style:r.Ms},paddingBottom:{style:r.Ms},paddingLeft:{style:r.Ms},paddingX:{style:r.Ms},paddingY:{style:r.Ms},paddingInline:{style:r.Ms},paddingInlineStart:{style:r.Ms},paddingInlineEnd:{style:r.Ms},paddingBlock:{style:r.Ms},paddingBlockStart:{style:r.Ms},paddingBlockEnd:{style:r.Ms},m:{style:r.Lc},mt:{style:r.Lc},mr:{style:r.Lc},mb:{style:r.Lc},ml:{style:r.Lc},mx:{style:r.Lc},my:{style:r.Lc},margin:{style:r.Lc},marginTop:{style:r.Lc},marginRight:{style:r.Lc},marginBottom:{style:r.Lc},marginLeft:{style:r.Lc},marginX:{style:r.Lc},marginY:{style:r.Lc},marginInline:{style:r.Lc},marginInlineStart:{style:r.Lc},marginInlineEnd:{style:r.Lc},marginBlock:{style:r.Lc},marginBlockStart:{style:r.Lc},marginBlockEnd:{style:r.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:S},rowGap:{style:_},columnGap:{style:k},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:E},maxWidth:{style:I},minWidth:{transform:E},height:{transform:E},maxHeight:{transform:E},minHeight:{transform:E},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},2705(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste")},2791(e,t,n){"use strict";var r=n(8898);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=m,rootShouldForwardProp:r=f,slotShouldForwardProp:l=f}=e,u=e=>(0,c.default)((0,i.default)({},e,{theme:y((0,i.default)({},e,{defaultTheme:n,themeId:t}))}));return u.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:d,slot:p,skipVariantsResolver:g,skipSx:m,overridesResolver:x=b(v(p))}=c,A=(0,o.default)(c,h),S=d&&d.startsWith("Mui")||p?"components":"custom",k=void 0!==g?g:p&&"Root"!==p&&"root"!==p||!1,_=m||!1;let T=f;"Root"===p||"root"===p?T=r:p?T=l:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(T=void 0);const E=(0,a.default)(e,(0,i.default)({shouldForwardProp:T,label:undefined},A)),C=e=>"function"==typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>{const o=y({theme:r.theme,defaultTheme:n,themeId:t});return w(e,(0,i.default)({},r,{theme:o}),o.modularCssLayers?S:void 0)}:e,I=function(r){let o=C(r);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];const c=s?s.map(C):[];d&&x&&c.push(e=>{const r=y((0,i.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[d]||!r.components[d].styleOverrides)return null;const o=r.components[d].styleOverrides,a={};return Object.entries(o).forEach(t=>{let[n,o]=t;a[n]=w(o,(0,i.default)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),x(e,a)}),d&&!k&&c.push(e=>{var r;const o=y((0,i.default)({},e,{defaultTheme:n,themeId:t}));return w({variants:null==o||null==(r=o.components)||null==(r=r[d])?void 0:r.variants},(0,i.default)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),_||c.push(u);const h=c.length-s.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");o=[...r,...e],o.raw=[...r.raw,...e]}const p=E(o,...c);return e.muiName&&(p.muiName=e.muiName),p};return E.withConfig&&(I.withConfig=E.withConfig),I}};var i=r(n(4858)),o=r(n(1229)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(1876)),s=n(2623),l=(r(n(3181)),r(n(2621)),r(n(4440))),c=r(n(9903));const u=["ownerState"],d=["variants"],h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function g(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles="@layer ".concat(t,"{").concat(String(e.styles),"}")),e}const m=(0,l.default)(),v=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function y(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function b(e){return e?(t,n)=>n[e]:null}function w(e,t,n){let{ownerState:r}=t,s=(0,o.default)(t,u);const l="function"==typeof e?e((0,i.default)({ownerState:r},s)):e;if(Array.isArray(l))return l.flatMap(e=>w(e,(0,i.default)({ownerState:r},s),n));if(l&&"object"==typeof l&&Array.isArray(l.variants)){const{variants:e=[]}=l;let t=(0,o.default)(l,d);return e.forEach(e=>{let o=!0;if("function"==typeof e.props?o=e.props((0,i.default)({ownerState:r},s,r)):Object.keys(e.props).forEach(t=>{(null==r?void 0:r[t])!==e.props[t]&&s[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);const o="function"==typeof e.style?e.style((0,i.default)({ownerState:r},s,r)):e.style;t.push(n?g((0,a.internal_serializeStyles)(o),n):o)}}),t}return n?g((0,a.internal_serializeStyles)(l),n):l}},2890(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{fillRule:"evenodd",d:"M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3"}),"PushPin")},2902(e,t,n){"use strict";e.exports=n(9770)},2939(e,t,n){"use strict";n.d(t,{A:()=>r});const r={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"}},2979(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(4320),i=n(8915),o=n(6997),a=n(9428);const s={borderRadius:4};var l=n(4262);var c=n(1985),u=n(2692),d=n(1006);const h=["breakpoints","palette","spacing","shape"];const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:p,shape:f={}}=e,g=(0,i.A)(e,h),m=(0,a.A)(t),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0===n.length?[1]:n).map(e=>{const n=t(e);return"number"==typeof n?"".concat(n,"px"):n}).join(" ")};return n.mui=!0,n}(p);let y=(0,o.A)({breakpoints:m,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:v,shape:(0,r.A)({},s,f)},g);y.applyStyles=d.A;for(var b=arguments.length,w=new Array(b>1?b-1:0),x=1;x<b;x++)w[x-1]=arguments[x];return y=w.reduce((e,t)=>(0,o.A)(e,t),y),y.unstable_sxConfig=(0,r.A)({},u.A,null==g?void 0:g.unstable_sxConfig),y.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},y}},3142(e,t,n){"use strict";n.d(t,{b:()=>i});n(8661);var r=n(5779);n(5089);function i(e){return(0,r.b)(e)}},3181(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(6175)},3285(e,t,n){"use strict";n.d(t,{Ay:()=>w});var r=n(4320),i=n(8915),o=n(6253),a=n(6997),s=n(7197),l=n(8579),c=n(8193),u=n(5476),d=n(2939),h=n(704),p=n(7046),f=n(1128),g=n(7451);const m=["mode","contrastThreshold","tonalOffset"],v={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:l.A.white,default:l.A.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}},y={text:{primary:l.A.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:l.A.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 b(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,s.a)(e.main,i):"dark"===t&&(e.dark=(0,s.e$)(e.main,o)))}function w(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:w=.2}=e,x=(0,i.A)(e,m),A=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p.A[200],light:p.A[50],dark:p.A[400]}:{main:p.A[700],light:p.A[400],dark:p.A[800]}}(t),S=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:u.A[200],light:u.A[50],dark:u.A[400]}:{main:u.A[500],light:u.A[300],dark:u.A[700]}}(t),k=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:d.A[500],light:d.A[300],dark:d.A[700]}:{main:d.A[700],light:d.A[400],dark:d.A[800]}}(t),_=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:f.A[400],light:f.A[300],dark:f.A[700]}:{main:f.A[700],light:f.A[500],dark:f.A[900]}}(t),T=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g.A[400],light:g.A[300],dark:g.A[700]}:{main:g.A[800],light:g.A[500],dark:g.A[900]}}(t),E=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h.A[400],light:h.A[300],dark:h.A[700]}:{main:"#ed6c02",light:h.A[500],dark:h.A[900]}}(t);function C(e){return(0,s.eM)(e,y.text.primary)>=n?y.text.primary:v.text.primary}const I=e=>{let{color:t,name:n,mainShade:i=500,lightShade:a=300,darkShade:s=700}=e;if(t=(0,r.A)({},t),!t.main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,o.A)(11,n?" (".concat(n,")"):"",i));if("string"!=typeof t.main)throw new Error((0,o.A)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return b(t,"light",a,w),b(t,"dark",s,w),t.contrastText||(t.contrastText=C(t.main)),t},P={dark:y,light:v};return(0,a.A)((0,r.A)({common:(0,r.A)({},l.A),mode:t,primary:I({color:A,name:"primary"}),secondary:I({color:S,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:I({color:k,name:"error"}),warning:I({color:E,name:"warning"}),info:I({color:_,name:"info"}),success:I({color:T,name:"success"}),grey:c.A,contrastThreshold:n,getContrastText:C,augmentColor:I,tonalOffset:w},P[t]),x)}},3385(e,t,n){"use strict";n.d(t,{J:()=>f});var r={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,scale: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},i=n(7601),o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},c=(0,i.A)(function(e){return s(e)?e:e.replace(o,"-$&").toLowerCase()}),u=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,function(e,t,n){return h={name:t,styles:n,next:h},t})}return 1===r[e]||s(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return h={name:i.name,styles:i.styles,next:h},i.name;var o=n;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)h={name:a.name,styles:a.styles,next:h},a=a.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=d(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":l(s)&&(r+=c(o)+":"+u(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var h=d(e,t,a);switch(o){case"animation":case"animationName":r+=c(o)+":"+h+";";break;default:r+=o+"{"+h+"}"}}else for(var p=0;p<a.length;p++)l(a[p])&&(r+=c(o)+":"+u(o,a[p])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=h,p=n(e);return h=s,d(e,t,p)}}var f=n;if(null==t)return f;var g=t[f];return void 0!==g?g:f}var h,p=/label:\s*([^\s;{]+)\s*(;|$)/g;function f(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";h=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=d(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=d(n,t,e[a]),r)i+=o[a]}p.lastIndex=0;for(var s,l="";null!==(s=p.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:h}}},3684(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(2297)},3699(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(4320);function i(e,t){const n=(0,r.A)({},t);return Object.keys(e).forEach(o=>{if(o.toString().match(/^(components|slots)$/))n[o]=(0,r.A)({},e[o],n[o]);else if(o.toString().match(/^(componentsProps|slotProps)$/)){const a=e[o]||{},s=t[o];n[o]={},s&&Object.keys(s)?a&&Object.keys(a)?(n[o]=(0,r.A)({},s),Object.keys(a).forEach(e=>{n[o][e]=i(a[e],s[e])})):n[o]=s:n[o]=a}else void 0===n[o]&&(n[o]=e[o])}),n}},3780(e,t,n){"use strict";n.d(t,{A:()=>o});n(8661);var r=n(1834),i=n(5089);function o(e){const{styles:t,defaultTheme:n={}}=e,o="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return(0,i.jsx)(r.mL,{styles:o})}},3806(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(2561).A},3830(e,t,n){"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>i});var r=n(6997);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(i[e],"px)")};function a(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||o;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"==typeof t){const e=r.breakpoints||o;return Object.keys(t).reduce((r,o)=>{if(-1!==Object.keys(e.values||i).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r},{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}function l(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function c(e){const t=s(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];const a=[t,...i].reduce((e,t)=>(0,r.A)(e,t),{});return l(Object.keys(t),a)}function u(e){let{values:t,breakpoints:n,base:r}=e;const i=r||function(e,t){if("object"!=typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{null!=e[t]&&(n[t]=!0)}),n}(t,n),o=Object.keys(i);if(0===o.length)return t;let a;return o.reduce((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"==typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e),{})}},3850(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(4320);function i(e,t){return(0,r.A)({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}},4077(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6489).A},4089(e,t,n){"use strict";n.d(t,{Ay:()=>o});var r=n(7599);const i={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 o(e,t){const n=i[t];return n?"".concat(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui","-").concat(n):"".concat(r.A.generate(e),"-").concat(t)}},4188(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(2577).A},4262(e,t,n){"use strict";n.d(t,{LX:()=>f,MA:()=>p,_W:()=>g,Lc:()=>y,Ms:()=>b});var r=n(3830),i=n(8343),o=n(1686);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=a[t],i=s[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]}),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...u,...d];function p(e,t,n,r){var o;const a=null!=(o=(0,i.Yn)(e,t,!1))?o:n;return"number"==typeof a?e=>"string"==typeof e?e:a*e:Array.isArray(a)?e=>"string"==typeof e?e:a[e]:"function"==typeof a?a:()=>{}}function f(e){return p(e,"spacing",8)}function g(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:"-".concat(n)}function m(e,t,n,i){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=g(t,n),e),{})}(c(n),i),a=e[n];return(0,r.NI)(e,a,o)}function v(e,t){const n=f(e.theme);return Object.keys(e).map(r=>m(e,t,r,n)).reduce(o.A,{})}function y(e){return v(e,u)}function b(e){return v(e,d)}function w(e){return v(e,h)}y.propTypes={},y.filterProps=u,b.propTypes={},b.filterProps=d,w.propTypes={},w.filterProps=h},4270(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(4320),i=n(8661),o=n(8915),a=n(5553),s=n(1163),l=n(5227),c=n(3142),u=n(7183),d=n(5421),h=n(4089);function p(e){return(0,h.Ay)("MuiSvgIcon",e)}(0,d.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var f=n(5089);const g=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],m=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.A)(n.color))],t["fontSize".concat((0,l.A)(n.fontSize))]]}})(e=>{let{theme:t,ownerState:n}=e;var r,i,o,a,s,l,c,u,d,h,p,f,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(i=r.create)?void 0:i.call(r,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[n.fontSize],color:null!=(h=null==(p=(t.vars||t).palette)||null==(p=p[n.color])?void 0:p.main)?h:{action:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.active,disabled:null==(g=(t.vars||t).palette)||null==(g=g.action)?void 0:g.disabled,inherit:void 0}[n.color]}}),v=i.forwardRef(function(e,t){const n=(0,c.b)({props:e,name:"MuiSvgIcon"}),{children:u,className:d,color:h="inherit",component:v="svg",fontSize:y="medium",htmlColor:b,inheritViewBox:w=!1,titleAccess:x,viewBox:A="0 0 24 24"}=n,S=(0,o.A)(n,g),k=i.isValidElement(u)&&"svg"===u.type,_=(0,r.A)({},n,{color:h,component:v,fontSize:y,instanceFontSize:e.fontSize,inheritViewBox:w,viewBox:A,hasSvgAsChild:k}),T={};w||(T.viewBox=A);const E=(e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&"color".concat((0,l.A)(t)),"fontSize".concat((0,l.A)(n))]};return(0,s.A)(i,p,r)})(_);return(0,f.jsxs)(m,(0,r.A)({as:v,className:(0,a.A)(E.root,d),focusable:"false",color:b,"aria-hidden":!x||void 0,role:x?"img":void 0,ref:t},T,S,k&&u.props,{ownerState:_,children:[k?u.props.children:u,x?(0,f.jsx)("title",{children:x}):null]}))});v.muiName="SvgIcon";const y=v;function b(e,t){function n(n,i){return(0,f.jsx)(y,(0,r.A)({"data-testid":"".concat(t,"Icon"),ref:i},n,{children:e}))}return n.muiName=y.muiName,i.memo(i.forwardRef(n))}},4320(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},4324(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M14 4v5c0 1.12.37 2.16 1 3H9c.65-.86 1-1.9 1-3V4zm3-2H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3V4h1c.55 0 1-.45 1-1s-.45-1-1-1"}),"PushPinOutlined")},4440(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A,private_createBreakpoints:()=>i.A,unstable_applyStyles:()=>o.A});var r=n(2979),i=n(9428),o=n(1006)},4539(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(6920);const i=e=>(0,r.A)(e)&&"classes"!==e},4651(e,t,n){"use strict";e.exports=n(1508)},4762(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.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")},4774(e,t,n){"use strict";var r;n.d(t,{i:()=>s,s:()=>a});var i=n(8661),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,a=o||function(e){return e()},s=o||i.useLayoutEffect},4849(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((e,t)=>null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)},()=>{})}n.d(t,{A:()=>r})},4858(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5058(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z"}),"LockOpen")},5089(e,t,n){"use strict";e.exports=n(7811)},5227(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6175).A},5261(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M10.85 12.65h2.3L12 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM14.3 16l-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9z"}),"BrightnessAuto")},5323(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7.53 12L9 10.5l1.4-1.41 2.07 2.08L17.6 6 19 7.41zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4z"}),"LibraryAddCheck")},5326(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode")},5421(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(4089);function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i={};return t.forEach(t=>{i[t]=(0,r.Ay)(e,t,n)}),i}},5449(e,t,n){"use strict";n.d(t,{A:()=>ie});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),i=Math.abs,o=String.fromCharCode,a=Object.assign;function s(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function d(e,t,n){return e.slice(t,n)}function h(e){return e.length}function p(e){return e.length}function f(e,t){return t.push(e),e}var g=1,m=1,v=0,y=0,b=0,w="";function x(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:g,column:m,length:a,return:""}}function A(e,t){return a(x("",null,null,"",null,null,0),e,{length:-e.length},t)}function S(){return b=y>0?u(w,--y):0,m--,10===b&&(m=1,g--),b}function k(){return b=y<v?u(w,y++):0,m++,10===b&&(m=1,g++),b}function _(){return u(w,y)}function T(){return y}function E(e,t){return d(w,e,t)}function C(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function I(e){return g=m=1,v=h(w=e),y=0,[]}function P(e){return w="",e}function L(e){return s(E(y-1,O(91===e?e+2:40===e?e+1:e)))}function R(e){for(;(b=_())&&b<33;)k();return C(e)>2||C(b)>3?"":" "}function N(e,t){for(;--t&&k()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return E(e,T()+(t<6&&32==_()&&32==k()))}function O(e){for(;k();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&O(b);break;case 40:41===e&&O(e);break;case 92:k()}return y}function j(e,t){for(;k()&&e+b!==57&&(e+b!==84||47!==_()););return"/*"+E(t,y-1)+"*"+o(47===e?e:k())}function z(e){for(;!C(_());)k();return E(e,y)}var M="-ms-",D="-moz-",B="-webkit-",F="comm",W="rule",U="decl",V="@keyframes";function H(e,t){for(var n="",r=p(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function G(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case U:return e.return=e.return||e.value;case F:return"";case V:return e.return=e.value+"{"+H(e.children,r)+"}";case W:e.value=e.props.join(",")}return h(n=H(e.children,r))?e.return=e.value+"{"+n+"}":""}function q(e){return P(K("",null,null,null,[""],e=I(e),0,[0],e))}function K(e,t,n,r,i,a,s,d,p){for(var g=0,m=0,v=s,y=0,b=0,w=0,x=1,A=1,E=1,C=0,I="",P=i,O=a,M=r,D=I;A;)switch(w=C,C=k()){case 40:if(108!=w&&58==u(D,v-1)){-1!=c(D+=l(L(C),"&","&\f"),"&\f")&&(E=-1);break}case 34:case 39:case 91:D+=L(C);break;case 9:case 10:case 13:case 32:D+=R(w);break;case 92:D+=N(T()-1,7);continue;case 47:switch(_()){case 42:case 47:f(Y(j(k(),T()),t,n),p);break;default:D+="/"}break;case 123*x:d[g++]=h(D)*E;case 125*x:case 59:case 0:switch(C){case 0:case 125:A=0;case 59+m:-1==E&&(D=l(D,/\f/g,"")),b>0&&h(D)-v&&f(b>32?X(D+";",r,n,v-1):X(l(D," ","")+";",r,n,v-2),p);break;case 59:D+=";";default:if(f(M=$(D,t,n,g,m,i,d,I,P=[],O=[],v),a),123===C)if(0===m)K(D,t,M,M,P,a,v,d,O);else switch(99===y&&110===u(D,3)?100:y){case 100:case 108:case 109:case 115:K(e,M,M,r&&f($(e,M,M,0,0,i,d,I,i,P=[],v),O),i,O,v,d,r?P:O);break;default:K(D,M,M,M,[""],O,0,d,O)}}g=m=b=0,x=E=1,I=D="",v=s;break;case 58:v=1+h(D),b=w;default:if(x<1)if(123==C)--x;else if(125==C&&0==x++&&125==S())continue;switch(D+=o(C),C*x){case 38:E=m>0?1:(D+="\f",-1);break;case 44:d[g++]=(h(D)-1)*E,E=1;break;case 64:45===_()&&(D+=L(k())),y=_(),m=v=h(I=D+=z(T())),C++;break;case 45:45===w&&2==h(D)&&(x=0)}}return a}function $(e,t,n,r,o,a,c,u,h,f,g){for(var m=o-1,v=0===o?a:[""],y=p(v),b=0,w=0,A=0;b<r;++b)for(var S=0,k=d(e,m+1,m=i(w=c[b])),_=e;S<y;++S)(_=s(w>0?v[S]+" "+k:l(k,/&\f/g,v[S])))&&(h[A++]=_);return x(e,t,n,0===o?W:u,h,f,g)}function Y(e,t,n){return x(e,t,n,F,o(b),d(e,2,-2),0)}function X(e,t,n,r){return x(e,t,n,U,d(e,0,r),d(e,r+1,-1),r)}var J=function(e,t,n){for(var r=0,i=0;r=i,i=_(),38===r&&12===i&&(t[n]=1),!C(i);)k();return E(e,y)},Q=function(e,t){return P(function(e,t){var n=-1,r=44;do{switch(C(r)){case 0:38===r&&12===_()&&(t[n]=1),e[n]+=J(y-1,t,n);break;case 2:e[n]+=L(r);break;case 4:if(44===r){e[++n]=58===_()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=k());return e}(I(e),t))},Z=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Z.get(n))&&!r){Z.set(e,!0);for(var i=[],o=Q(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},te=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ne(e,t){switch(function(e,t){return 45^u(e,0)?(((t<<2^u(e,0))<<2^u(e,1))<<2^u(e,2))<<2^u(e,3):0}(e,t)){case 5103:return B+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return B+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return B+e+D+e+M+e+e;case 6828:case 4268:return B+e+M+e+e;case 6165:return B+e+M+"flex-"+e+e;case 5187:return B+e+l(e,/(\w+).+(:[^]+)/,B+"box-$1$2"+M+"flex-$1$2")+e;case 5443:return B+e+M+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return B+e+M+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return B+e+M+l(e,"shrink","negative")+e;case 5292:return B+e+M+l(e,"basis","preferred-size")+e;case 6060:return B+"box-"+l(e,"-grow","")+B+e+M+l(e,"grow","positive")+e;case 4554:return B+l(e,/([^-])(transform)/g,"$1"+B+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,B+"$1"),/(image-set)/,B+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,B+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,B+"box-pack:$3"+M+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+B+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,B+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(e)-1-t>6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+D+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,h(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+B)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===u(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+M+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return B+e+M+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+M+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+M+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+M+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case U:e.return=ne(e.value,e.length);break;case V:return H([A(e,{value:l(e.value,"@","@"+B)})],r);case W:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([A(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return H([A(e,{props:[l(t,/:(plac\w+)/,":"+B+"input-$1")]}),A(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),A(e,{props:[l(t,/:(plac\w+)/,M+"input-$1")]})],r)}return""})}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var i,o,a=e.stylisPlugins||re,s={},l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;l.push(e)});var c,u,d,h,f=[G,(h=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&h(e)})],g=(u=[ee,te].concat(a,f),d=p(u),function(e,t,n,r){for(var i="",o=0;o<d;o++)i+=u[o](e,t,n,r)||"";return i});o=function(e,t,n,r){c=n,H(q(e?e+"{"+t.styles+"}":t.styles),g),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new r({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return m.sheet.hydrate(l),m}},5471(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6267).A},5476(e,t,n){"use strict";n.d(t,{A:()=>r});const r={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"}},5553(e,t,n){"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}n.d(t,{A:()=>i});const i=function(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},5555(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05"}),"FavoriteBorder")},5571(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(9669).A},5779(e,t,n){"use strict";n.d(t,{A:()=>l,b:()=>s});var r=n(8661),i=n(3699),o=n(5089);const a=r.createContext(void 0);function s(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?(0,i.A)(o.defaultProps,r):o.styleOverrides||o.variants?r:(0,i.A)(o,r)}({props:t,name:n,theme:{components:r.useContext(a)}})}const l=function(e){let{value:t,children:n}=e;return(0,o.jsx)(a.Provider,{value:t,children:n})}},5823(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function m(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case u:case d:case f:return e;default:switch(e=e&&e.$$typeof){case l:case c:case p:case h:case s:return e;default:return t}}case r:return t}}}t.vM=c,t.lD=h},5863(e,t,n){"use strict";n.d(t,{A:()=>r});const r="$$material"},6175(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(6253);function i(e){if("string"!=typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},6253(e,t,n){"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{A:()=>r})},6267(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8661),i=n(6489);const o=function(e){const t=r.useRef(e);return(0,i.A)(()=>{t.current=e}),r.useRef(function(){return(0,t.current)(...arguments)}).current}},6333(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(9669);function i(e){return(0,r.A)(e).defaultView||window}},6489(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(8661);const i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},6614(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6333).A},6652(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"}),"UnfoldLess")},6811(e,t,n){"use strict";var r=n(7458);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},6920(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},6997(e,t,n){"use strict";n.d(t,{A:()=>s,Q:()=>o});var r=n(4320),i=n(8661);function o(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function a(e){if(i.isValidElement(e)||!o(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=a(e[n])}),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const l=n.clone?(0,r.A)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach(r=>{i.isValidElement(t[r])?l[r]=t[r]:o(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&o(e[r])?l[r]=s(e[r],t[r],n):n.clone?l[r]=o(t[r])?a(t[r]):t[r]:l[r]=t[r]}),l}},7029(e,t,n){e.exports=function(e){"use strict";var t=Object.freeze({__proto__:null,get ExpressionStatement(){return Ue},get BlockStatement(){return Ve},get EmptyStatement(){return He},get DebuggerStatement(){return Ge},get ReturnStatement(){return qe},get BreakStatement(){return Ke},get ContinueStatement(){return $e},get LabeledStatement(){return Ye},get WithStatement(){return Xe},get IfStatement(){return Je},get SwitchStatement(){return Qe},get SwitchCase(){return Ze},get ThrowStatement(){return et},get TryStatement(){return tt},get CatchClause(){return nt},get WhileStatement(){return rt},get DoWhileStatement(){return it},get ForStatement(){return ot},get ForInStatement(){return at},get ForOfStatement(){return st}}),r=Object.freeze({__proto__:null,get FunctionDeclaration(){return lt},get VariableDeclaration(){return ct},get VariableDeclarator(){return ut},get ClassDeclaration(){return dt},get ClassBody(){return ht},get MethodDefinition(){return pt},get PropertyDefinition(){return ft},get StaticBlock(){return gt},get ImportDeclaration(){return mt},get ExportDefaultDeclaration(){return vt},get ExportNamedDeclaration(){return yt},get ExportAllDeclaration(){return bt}}),i=Object.freeze({__proto__:null,get ExpressionStatement(){return on},get BlockStatement(){return an},get EmptyStatement(){return sn},get DebuggerStatement(){return ln},get ReturnStatement(){return cn},get BreakStatement(){return un},get ContinueStatement(){return dn},get LabeledStatement(){return hn},get WithStatement(){return pn},get IfStatement(){return fn},get SwitchStatement(){return gn},get SwitchCase(){return mn},get ThrowStatement(){return vn},get TryStatement(){return yn},get CatchClause(){return bn},get WhileStatement(){return wn},get DoWhileStatement(){return xn},get ForStatement(){return An},get ForInStatement(){return Sn},get ForOfStatement(){return kn}}),o=Object.freeze({__proto__:null,get FunctionDeclaration(){return _n},get VariableDeclaration(){return Tn},get VariableDeclarator(){return En},get ClassDeclaration(){return Cn},get ClassBody(){return In},get MethodDefinition(){return Pn},get PropertyDefinition(){return Ln},get StaticBlock(){return Rn},get ImportDeclaration(){return Nn},get ExportDefaultDeclaration(){return On},get ExportNamedDeclaration(){return jn},get ExportAllDeclaration(){return zn}});function a(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function s(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function c(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}var u=Object.freeze,d=Object.defineProperty,h=Object.getOwnPropertyDescriptor,p=Object.prototype.hasOwnProperty;function f(e,t){return p.call(e,t)}var g=Object.getOwnPropertyNames,m=Object.setPrototypeOf;function v(e,t){m?m(e,t):e.__proto__=t}var y=Object.getPrototypeOf;function b(e){return y?y(e):e.__proto__}var w=Object.getOwnPropertyDescriptor;function x(e,t,n){for(;t;){var r=w(t,n),i=void 0!==r&&void 0===r.writable&&"function"==typeof r[e]&&r[e];if(i)return i;t=b(t)}}function A(e,t){return x("get",e,t)}function S(e,t){return x("set",e,t)}var k=Object.create;function _(e,t){v(e,t),e.prototype=k(t.prototype,{constructor:{value:e,writable:!0}})}function T(e){for(var t=1;t<arguments.length;++t){var n=arguments[t];for(var r in n)f(n,r)&&(e[r]=n[r])}return e}var E=Object.assign||T,C=[],I=k(null);try{if(!window.Object)throw 0;C=g(I=window).filter(function(e){return"webkitStorageInfo"!==e})}catch(e){try{if(!n.g.Object)throw 0;C=g(I=n.g).filter(function(e){return"GLOBAL"!==e&&"root"!==e})}catch(e){try{I.Object=Object}catch(e){}try{I.Function=Function}catch(e){}try{I.Array=Array}catch(e){}try{I.Number=Number}catch(e){}try{I.parseFloat=parseFloat}catch(e){}try{I.parseInt=parseInt}catch(e){}try{I.Infinity=1/0}catch(e){}try{I.NaN=NaN}catch(e){}try{I.undefined=void 0}catch(e){}try{I.Boolean=Boolean}catch(e){}try{I.String=String}catch(e){}try{I.Symbol=Symbol}catch(e){}try{I.Date=Date}catch(e){}try{I.Promise=Promise}catch(e){}try{I.RegExp=RegExp}catch(e){}try{I.Error=Error}catch(e){}try{I.EvalError=EvalError}catch(e){}try{I.RangeError=RangeError}catch(e){}try{I.ReferenceError=ReferenceError}catch(e){}try{I.SyntaxError=SyntaxError}catch(e){}try{I.TypeError=TypeError}catch(e){}try{I.URIError=URIError}catch(e){}try{I.JSON=JSON}catch(e){}try{I.Math=Math}catch(e){}try{I.console=console}catch(e){}try{I.Intl=Intl}catch(e){}try{I.ArrayBuffer=ArrayBuffer}catch(e){}try{I.Uint8Array=Uint8Array}catch(e){}try{I.Int8Array=Int8Array}catch(e){}try{I.Uint16Array=Uint16Array}catch(e){}try{I.Int16Array=Int16Array}catch(e){}try{I.Uint32Array=Uint32Array}catch(e){}try{I.Int32Array=Int32Array}catch(e){}try{I.Float32Array=Float32Array}catch(e){}try{I.Float64Array=Float64Array}catch(e){}try{I.Uint8ClampedArray=Uint8ClampedArray}catch(e){}try{I.DataView=DataView}catch(e){}try{I.Map=Map}catch(e){}try{I.Set=Set}catch(e){}try{I.WeakMap=WeakMap}catch(e){}try{I.WeakSet=WeakSet}catch(e){}try{I.Proxy=Proxy}catch(e){}try{I.Reflect=Reflect}catch(e){}try{I.BigInt=BigInt}catch(e){}try{I.decodeURI=decodeURI}catch(e){}try{I.decodeURIComponent=decodeURIComponent}catch(e){}try{I.encodeURI=encodeURI}catch(e){}try{I.encodeURIComponent=encodeURIComponent}catch(e){}try{I.escape=escape}catch(e){}try{I.unescape=unescape}catch(e){}try{I.eval=eval}catch(e){}try{I.isFinite=isFinite}catch(e){}try{I.isNaN=isNaN}catch(e){}try{I.SharedArrayBuffer=SharedArrayBuffer}catch(e){}try{I.Atomics=Atomics}catch(e){}try{I.WebAssembly=WebAssembly}catch(e){}try{I.clearInterval=clearInterval}catch(e){}try{I.clearTimeout=clearTimeout}catch(e){}try{I.setInterval=setInterval}catch(e){}try{I.setTimeout=setTimeout}catch(e){}try{I.crypto=crypto}catch(e){}try{I.URL=URL}catch(e){}C=g(I)}}I.Symbol&&(!I.Symbol.iterator&&(I.Symbol.iterator=j("iterator")),!I.Symbol.asyncIterator&&(I.Symbol.asyncIterator=j("asynciterator")));for(var P=k({}),L=0;L<C.length;L++){var R=C[L];try{P[R]=I[R]}catch(e){}}var N=j("window");function O(){var e;return E(k(((e={})[N]=I,e)),P)}function j(e){return e+Math.random().toString(36).substring(2)}function z(e){var t;if("function"==typeof Symbol&&!(t=e[Symbol.asyncIterator])&&(t=e[Symbol.iterator]),t)return t.call(e);if("function"==typeof e.next)return e;var n=0;return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}var M={RES:void 0},D={RES:void 0},B={LABEL:void 0},F={LABEL:void 0},W=j("super"),U=j("supercall"),V=j("noctor"),H=j("clsctor"),G=j("newtarget"),q=j("private"),K=j("noinit"),$=j("deadzone"),Y=j("import"),X=j("exports"),J="0.5.9",Q=function(){function e(e,t){this.kind=e,this.value=t}return e.prototype.get=function(){return this.value},e.prototype.set=function(e){if("const"===this.kind)throw new TypeError("Assignment to constant variable");return this.value=e},e}(),Z=function(){function e(e,t){this.object=e,this.property=t}return e.prototype.get=function(){return this.object[this.property]},e.prototype.set=function(e){return this.object[this.property]=e,!0},e.prototype.del=function(){return delete this.object[this.property]},e}(),ee=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=!1),this.context=k(null),this.withContext=k(null),this.parent=e,this.isolated=t}return e.prototype.global=function(){for(var e=this;e.parent;)e=e.parent;return e},e.prototype.find=function(e){if(this.context[e])return this.context[e];if(e in this.withContext)return new Z(this.withContext,e);if(this.parent)return this.parent.find(e);var t=this.global().find("window").get();return e in t?new Z(t,e):null},e.prototype.var=function(e,t){for(var n=this;n.parent&&!n.isolated;)n=n.parent;var r=n.context[e];if(r){if("var"!==r.kind)throw new SyntaxError("Identifier '"+e+"' has already been declared");t!==K&&r.set(t)}else n.context[e]=new Q("var",t===K?void 0:t);if(!n.parent){var i=n.find("window").get();t!==K&&d(i,e,{value:t,writable:!0,enumerable:!0})}},e.prototype.let=function(e,t){var n=this.context[e];if(n&&n.get()!==$)throw new SyntaxError("Identifier '"+e+"' has already been declared");this.context[e]=new Q("let",t)},e.prototype.const=function(e,t){var n=this.context[e];if(n&&n.get()!==$)throw new SyntaxError("Identifier '"+e+"' has already been declared");this.context[e]=new Q("const",t)},e.prototype.func=function(e,t){var n=this.context[e];if(n&&"var"!==n.kind)throw new SyntaxError("Identifier '"+e+"' has already been declared");this.context[e]=new Q("var",t)},e.prototype.with=function(e){Object.keys(e)&&(this.withContext=e)},e}();function te(e,t){void 0===t&&(t={});var n=t.res,r=t.err,i=t.ret,o=t.fullRet;return new Promise(function(a,s){if("ret"in t)return a(e.return(i));function l(t){var n;try{n=e.next(t)}catch(e){return s(e)}return u(n),null}function c(t){var n;try{n=e.throw(t)}catch(e){return s(e)}u(n)}function u(e){if(e.done)return a(o?e:e.value);if(e.value!==M)return a(e);var t=e.value.RES;return(t&&"function"===t.then?t:Promise.resolve(t)).then(l,c)}"err"in t?c(r):l(n)})}function ne(e,t,n){var r,i,o,s,l,c;return void 0===n&&(n={}),a(this,function(a){if(r=n.getVar,i=void 0!==r&&r,o=n.throwErr,s=void 0===o||o,"undefined"===e.name)return[2,void 0];if(l=t.find(e.name)){if(i)return[2,l];if((c=l.get())===$)throw new ReferenceError(e.name+" is not defined");return[2,c]}if(s)throw new ReferenceError(e.name+" is not defined");return[2,void 0]})}var re=Object.freeze({__proto__:null,Identifier:ne});function ie(e,t){return a(this,function(t){return[2,e.value]})}var oe=Object.freeze({__proto__:null,Literal:ie});function ae(e,t){var n;return a(this,function(e){if((n=t.find(U))&&!n.get())throw new ReferenceError("Must call super constructor in derived class before accessing 'this' or returning from derived constructor");return[2,t.find("this").get()]})}function se(e,t){var n,r,i,o,l,c,u;return a(this,function(a){switch(a.label){case 0:n=[],r=0,a.label=1;case 1:return r<e.elements.length?"SpreadElement"!==(i=e.elements[r]).type?[3,3]:(l=(o=n).concat,[5,s(Ee(i,t))]):[3,6];case 2:return n=l.apply(o,[a.sent()]),[3,5];case 3:return u=(c=n).push,[5,s(We(i,t))];case 4:u.apply(c,[a.sent()]),a.label=5;case 5:return r++,[3,1];case 6:return[2,n]}})}function le(e,t){var n,r,i,o,l,c,u,p,f,g,m;return a(this,function(a){switch(a.label){case 0:n={},r=0,a.label=1;case 1:return r<e.properties.length?"SpreadElement"!==(i=e.properties[r]).type?[3,3]:(o=E,l=[n],[5,s(Ee(i,t,{spreadProps:!0}))]):[3,11];case 2:return o.apply(void 0,l.concat([a.sent()])),[3,10];case 3:return c=void 0,u=i.key,i.computed?[5,s(We(u,t))]:[3,5];case 4:return c=a.sent(),[3,8];case 5:return"Identifier"!==u.type?[3,6]:(c=u.name,[3,8]);case 6:return p="",[5,s(ie(u))];case 7:c=p+a.sent(),a.label=8;case 8:return[5,s(We(i.value,t))];case 9:f=a.sent(),"init"===(g=i.kind)?n[c]=f:"get"===g?(m=h(n,c),d(n,c,{get:f,set:m&&m.set,enumerable:!0,configurable:!0})):(m=h(n,c),d(n,c,{get:m&&m.get,set:f,enumerable:!0,configurable:!0})),a.label=10;case 10:return r++,[3,1];case 11:return[2,n]}})}function ce(e,t){var n,r;return a(this,function(i){return e.id&&e.id.name?(n=new ee(t),r=qn(e,n),n.const(e.id.name,r),[2,r]):[2,qn(e,t)]})}function ue(e,t){var n;return a(this,function(r){switch(r.label){case 0:switch(n=e.argument,e.operator){case"+":return[3,1];case"-":return[3,3];case"!":return[3,5];case"~":return[3,7];case"void":return[3,9];case"typeof":return[3,11];case"delete":return[3,15]}return[3,20];case 1:case 3:case 5:case 7:case 9:case 13:case 18:return[5,s(We(n,t))];case 2:return[2,+r.sent()];case 4:return[2,-r.sent()];case 6:return[2,!r.sent()];case 8:return[2,~r.sent()];case 10:return[2,void r.sent()];case 11:return"Identifier"!==n.type?[3,13]:[5,s(ne(n,t,{throwErr:!1}))];case 12:case 14:return[2,typeof r.sent()];case 15:return"MemberExpression"!==n.type?[3,17]:[5,s(ge(n,t,{getVar:!0}))];case 16:return[2,r.sent().del()];case 17:if("Identifier"!==n.type)return[3,18];throw new SyntaxError("Delete of an unqualified identifier in strict mode");case 19:return r.sent(),[2,!0];case 20:throw new SyntaxError("Unexpected token "+e.operator)}})}function de(e,t){var n,r,i;return a(this,function(o){switch(o.label){case 0:return"Identifier"!==(n=e.argument).type?[3,2]:[5,s(ne(n,t,{getVar:!0}))];case 1:case 3:return r=o.sent(),[3,5];case 2:return"MemberExpression"!==n.type?[3,4]:[5,s(ge(n,t,{getVar:!0}))];case 4:throw new SyntaxError("Unexpected token");case 5:if(i=r.get(),"++"===e.operator)return r.set(i+1),[2,e.prefix?r.get():i];if("--"===e.operator)return r.set(i-1),[2,e.prefix?r.get():i];throw new SyntaxError("Unexpected token "+e.operator)}})}function he(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:return"PrivateIdentifier"!==e.left.type?[3,2]:(n=e.left.name,[5,s(We(e.right,t))]);case 1:return r=(r=i.sent())[q]||{},[3,5];case 2:return[5,s(We(e.left,t))];case 3:return n=i.sent(),[5,s(We(e.right,t))];case 4:r=i.sent(),i.label=5;case 5:switch(e.operator){case"==":return[2,n==r];case"!=":return[2,n!=r];case"===":return[2,n===r];case"!==":return[2,n!==r];case"<":return[2,n<r];case"<=":return[2,n<=r];case">":return[2,n>r];case">=":return[2,n>=r];case"<<":return[2,n<<r];case">>":return[2,n>>r];case">>>":return[2,n>>>r];case"+":return[2,n+r];case"-":return[2,n-r];case"*":return[2,n*r];case"**":return[2,Math.pow(n,r)];case"/":return[2,n/r];case"%":return[2,n%r];case"|":return[2,n|r];case"^":return[2,n^r];case"&":return[2,n&r];case"in":return[2,n in r];case"instanceof":return[2,n instanceof r];default:throw new SyntaxError("Unexpected token "+e.operator)}}})}function pe(e,t){var n,r,i,o,l,c;return a(this,function(a){switch(a.label){case 0:return"Identifier"!==(n=e.left).type?[3,2]:[5,s(ne(n,t,{getVar:!0,throwErr:!1}))];case 1:return(r=a.sent())||(i=t.global().find("window").get(),r=new Z(i,n.name)),[3,7];case 2:return"MemberExpression"!==n.type?[3,4]:[5,s(ge(n,t,{getVar:!0}))];case 3:return r=a.sent(),[3,7];case 4:case 7:return[5,s(We(e.right,t))];case 5:return o=a.sent(),[5,s(Gn(n,t,{feed:o}))];case 6:return[2,a.sent()];case 8:switch(l=a.sent(),e.operator){case"=":return r.set(l),[2,r.get()];case"+=":return r.set(r.get()+l),[2,r.get()];case"-=":return r.set(r.get()-l),[2,r.get()];case"*=":return r.set(r.get()*l),[2,r.get()];case"/=":return r.set(r.get()/l),[2,r.get()];case"%=":return r.set(r.get()%l),[2,r.get()];case"**=":return r.set(Math.pow(r.get(),l)),[2,r.get()];case"<<=":return r.set(r.get()<<l),[2,r.get()];case">>=":return r.set(r.get()>>l),[2,r.get()];case">>>=":return r.set(r.get()>>>l),[2,r.get()];case"|=":return r.set(r.get()|l),[2,r.get()];case"^=":return r.set(r.get()^l),[2,r.get()];case"&=":return r.set(r.get()&l),[2,r.get()];case"??=":return r.set(null!==(c=r.get())&&void 0!==c?c:l),[2,r.get()];case"&&=":return r.set(r.get()&&l),[2,r.get()];case"||=":return r.set(r.get()||l),[2,r.get()];default:throw new SyntaxError("Unexpected token "+e.operator)}}})}function fe(e,t){var n,r,i,o;return a(this,function(a){switch(a.label){case 0:switch(e.operator){case"||":return[3,1];case"&&":return[3,5];case"??":return[3,9]}return[3,14];case 1:return[5,s(We(e.left,t))];case 2:return(n=a.sent())?[3,4]:[5,s(We(e.right,t))];case 3:n=a.sent(),a.label=4;case 4:return[2,n];case 5:return[5,s(We(e.left,t))];case 6:return(r=a.sent())?[5,s(We(e.right,t))]:[3,8];case 7:r=a.sent(),a.label=8;case 8:return[2,r];case 9:return[5,s(We(e.left,t))];case 10:return null===(o=a.sent())||void 0===o?[3,11]:(i=o,[3,13]);case 11:return[5,s(We(e.right,t))];case 12:i=a.sent(),a.label=13;case 13:return[2,i];case 14:throw new SyntaxError("Unexpected token "+e.operator)}})}function ge(e,t,n){var r,i,o,l,c,u,h,p,f,g,m;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.getObj,i=void 0!==r&&r,o=n.getVar,l=void 0!==o&&o,"Super"!==e.object.type?[3,2]:[5,s(Te(e.object,t,{getProto:!0}))];case 1:return c=a.sent(),[3,4];case 2:return[5,s(We(e.object,t))];case 3:c=a.sent(),a.label=4;case 4:return i?[2,c]:(h=!1,e.computed?[5,s(We(e.property,t))]:[3,6]);case 5:return u=a.sent(),[3,7];case 6:"PrivateIdentifier"===e.property.type?(u=e.property.name,h=!0):u=e.property.name,a.label=7;case 7:return h&&(c=c[q]),l?(p=S(c,u),"Super"===e.object.type&&p?(m=t.find("this").get(),f=j(u),d(m,f,{set:p}),[2,new Z(m,f)]):[2,new Z(c,u)]):(g=A(c,u),"Super"===e.object.type&&g?(m=t.find("this").get(),e.optional&&null==m?[2,void 0]:[2,g.call(m)]):e.optional&&null==c?[2,void 0]:[2,c[u]])}})}function me(e,t){var n;return a(this,function(r){switch(r.label){case 0:return[5,s(We(e.test,t))];case 1:return r.sent()?[5,s(We(e.consequent,t))]:[3,3];case 2:return n=r.sent(),[3,5];case 3:return[5,s(We(e.alternate,t))];case 4:n=r.sent(),r.label=5;case 5:return[2,n]}})}function ve(e,t){var n,r,i,o,l,c,u,d,h,p,f,g,m,v,y;return a(this,function(a){switch(a.label){case 0:return"MemberExpression"!==e.callee.type?[3,5]:[5,s(ge(e.callee,t,{getObj:!0}))];case 1:return r=a.sent(),e.callee.optional&&null==r?[2,void 0]:(i=void 0,o=!1,e.callee.computed?[5,s(We(e.callee.property,t))]:[3,3]);case 2:return i=a.sent(),[3,4];case 3:"PrivateIdentifier"===e.callee.property.type?(i=e.callee.property.name,o=!0):i=e.callee.property.name,a.label=4;case 4:if(l=r,o&&(l=l[q]),"Super"===e.callee.object.type?(c=t.find("this").get(),n=l[i].bind(c)):n=l[i],e.optional&&null==n)return[2,void 0];if("function"!=typeof n)throw new TypeError(i+" is not a function");if(n[H])throw new TypeError("Class constructor "+i+" cannot be invoked without 'new'");return[3,7];case 5:return r=t.find("this").get(),[5,s(We(e.callee,t))];case 6:if(n=a.sent(),e.optional&&null==n)return[2,void 0];if("function"!=typeof n||"Super"!==e.callee.type&&n[H]){if("Identifier"===e.callee.type)u=e.callee.name;else try{u=JSON.stringify(n)}catch(e){u=""+n}throw"function"!=typeof n?new TypeError(u+" is not a function"):new TypeError("Class constructor "+u+" cannot be invoked without 'new'")}a.label=7;case 7:d=[],h=0,a.label=8;case 8:return h<e.arguments.length?"SpreadElement"!==(p=e.arguments[h]).type?[3,10]:(g=(f=d).concat,[5,s(Ee(p,t))]):[3,13];case 9:return d=g.apply(f,[a.sent()]),[3,12];case 10:return v=(m=d).push,[5,s(We(p,t))];case 11:v.apply(m,[a.sent()]),a.label=12;case 12:return h++,[3,8];case 13:if("Super"===e.callee.type){if(t.find(U).get())throw new ReferenceError("Super constructor may only be called once");t.find(U).set(!0)}try{return[2,n.apply(r,d)]}catch(e){if(e instanceof TypeError&&"Illegal invocation"===e.message&&-1!==n.toString().indexOf("[native code]")&&(y=t.global().find("window").get())&&y[N])return[2,n.apply(y[N],d)];throw e}}})}function ye(e,t){var n,r,i,o,l,u,d,h,p;return a(this,function(a){switch(a.label){case 0:return[5,s(We(e.callee,t))];case 1:if("function"!=typeof(n=a.sent())){if("Identifier"===e.callee.type)r=e.callee.name;else try{r=JSON.stringify(n)}catch(e){r=""+n}throw new TypeError(r+" is not a constructor")}if(n[V])throw new TypeError((n.name||"(intermediate value)")+" is not a constructor");i=[],o=0,a.label=2;case 2:return o<e.arguments.length?"SpreadElement"!==(l=e.arguments[o]).type?[3,4]:(d=(u=i).concat,[5,s(Ee(l,t))]):[3,7];case 3:return i=d.apply(u,[a.sent()]),[3,6];case 4:return p=(h=i).push,[5,s(We(l,t))];case 5:p.apply(h,[a.sent()]),a.label=6;case 6:return o++,[3,2];case 7:return[2,new(n.bind.apply(n,c([void 0],i)))]}})}function be(e,t){return a(this,function(n){return"new"===e.meta.name&&"target"===e.property.name?[2,t.find(G).get()]:"import"===e.meta.name&&"meta"===e.property.name?[2,{url:""}]:[2]})}function we(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:r=0,i.label=1;case 1:return r<e.expressions.length?[5,s(We(e.expressions[r],t))]:[3,4];case 2:n=i.sent(),i.label=3;case 3:return r++,[3,1];case 4:return[2,n]}})}function xe(e,t){return a(this,function(n){return[2,qn(e,t)]})}function Ae(e,t){var n,r,i,o,l,c,u;return a(this,function(a){switch(a.label){case 0:n=e.quasis.slice(),r=e.expressions.slice(),i="",a.label=1;case 1:return(o=n.shift())?(c=i,[5,s(ke(o))]):[3,5];case 2:return i=c+a.sent(),(l=r.shift())?(u=i,[5,s(We(l,t))]):[3,4];case 3:i=u+a.sent(),a.label=4;case 4:return[3,1];case 5:return[2,i]}})}function Se(e,t){var n,r,i,o,l,h,p,f,g;return a(this,function(a){switch(a.label){case 0:return[5,s(We(e.tag,t))];case 1:if(n=a.sent(),r=e.quasi.quasis,i=r.map(function(e){return e.value.cooked}),o=r.map(function(e){return e.value.raw}),d(i,"raw",{value:u(o)}),l=e.quasi.expressions,h=[],!l)return[3,5];p=0,a.label=2;case 2:return p<l.length?(g=(f=h).push,[5,s(We(l[p],t))]):[3,5];case 3:g.apply(f,[a.sent()]),a.label=4;case 4:return p++,[3,2];case 5:return[2,n.apply(void 0,c([u(i)],h))]}})}function ke(e,t){return a(this,function(t){return[2,e.value.raw]})}function _e(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:return e.id&&e.id.name?(n=new ee(t),[5,s(Kn(e,n))]):[3,2];case 1:return r=i.sent(),n.const(e.id.name,r),[2,r];case 2:return[5,s(Kn(e,t))];case 3:return[2,i.sent()]}})}function Te(e,t,n){var r,i,o;return void 0===n&&(n={}),a(this,function(e){return r=n.getProto,i=void 0!==r&&r,o=t.find(W).get(),[2,i?o.prototype:o]})}function Ee(e,t,n){var r;return void 0===n&&(n={}),a(this,function(i){switch(i.label){case 0:return[5,s(We(e.argument,t))];case 1:return r=i.sent(),[2,n.spreadProps?r:c(r)]}})}function Ce(e,t){return a(this,function(n){switch(n.label){case 0:return[5,s(We(e.expression,t))];case 1:return[2,n.sent()]}})}function Ie(e,t){var n,r,i,o,l;return a(this,function(a){switch(a.label){case 0:return n=t.global(),[5,s(We(e.source,t))];case 1:return r=a.sent(),(i=n.find(Y+r))&&(l=i.get())&&("function"==typeof l?o=l():"object"==typeof l&&(o=l)),o&&"object"==typeof o?[2,Promise.resolve(o)]:[2,Promise.reject(new TypeError('Failed to resolve module specifier "'+r+'"'))]}})}function Pe(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:return[5,s(We(e.argument,t))];case 1:return n=i.sent(),e.delegate?[5,s(n)]:[3,3];case 2:return r=i.sent(),[3,5];case 3:return[4,n];case 4:r=i.sent(),i.label=5;case 5:return[2,r]}})}function Le(e,t){var n;return a(this,function(r){switch(r.label){case 0:return n=M,[5,s(We(e.argument,t))];case 1:return n.RES=r.sent(),[4,M];case 2:return[2,r.sent()]}})}var Re=Object.freeze({__proto__:null,ThisExpression:ae,ArrayExpression:se,ObjectExpression:le,FunctionExpression:ce,UnaryExpression:ue,UpdateExpression:de,BinaryExpression:he,AssignmentExpression:pe,LogicalExpression:fe,MemberExpression:ge,ConditionalExpression:me,CallExpression:ve,NewExpression:ye,MetaProperty:be,SequenceExpression:we,ArrowFunctionExpression:xe,TemplateLiteral:Ae,TaggedTemplateExpression:Se,TemplateElement:ke,ClassExpression:_e,Super:Te,SpreadElement:Ee,ChainExpression:Ce,ImportExpression:Ie,YieldExpression:Pe,AwaitExpression:Le});function Ne(e,t,n){var r,i,o,l,c,u,d,h,p,f,g,m,v,y,b;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:r=n.kind,i=void 0===r?"var":r,o=n.hoist,l=void 0!==o&&o,c=n.onlyBlock,u=void 0!==c&&c,d=n.feed,h=void 0===d?{}:d,p=[],f=0,a.label=1;case 1:return f<e.properties.length?(g=e.properties[f],l?u||"var"===i?"Property"!==g.type?[3,5]:"Identifier"!==(v=g.value).type?[3,2]:(t[i](v.name,u?$:"var"===i?K:void 0),[3,4]):[3,7]:[3,8]):[3,18];case 2:return[5,s(Gn(v,t,{kind:i,hoist:l,onlyBlock:u}))];case 3:a.sent(),a.label=4;case 4:return[3,7];case 5:return[5,s(je(g,t,{kind:i,hoist:l,onlyBlock:u}))];case 6:a.sent(),a.label=7;case 7:return[3,17];case 8:return"Property"!==g.type?[3,15]:(m=void 0,g.computed?[5,s(We(g.key,t))]:[3,10]);case 9:return m=a.sent(),[3,11];case 10:m=g.key.name,a.label=11;case 11:return p.push(m),"Identifier"!==(v=g.value).type?[3,12]:(t[i](v.name,h[m]),[3,14]);case 12:return[5,s(Gn(v,t,{kind:i,feed:h[m]}))];case 13:a.sent(),a.label=14;case 14:return[3,17];case 15:for(y=E({},h),b=0;b<p.length;b++)delete y[p[b]];return[5,s(je(g,t,{kind:i,feed:y}))];case 16:a.sent(),a.label=17;case 17:return f++,[3,1];case 18:return[2]}})}function Oe(e,t,n){var r,i,o,l,c,u,d,h,p,f,g;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:r=n.kind,i=n.hoist,o=void 0!==i&&i,l=n.onlyBlock,c=void 0!==l&&l,u=n.feed,d=void 0===u?[]:u,h=[],p=0,a.label=1;case 1:return p<e.elements.length?(f=e.elements[p])?o?c||"var"===r?"Identifier"!==f.type?[3,2]:(t[r](f.name,c?$:"var"===r?K:void 0),[3,4]):[3,4]:[3,5]:[3,13]:[3,14];case 2:return[5,s(Gn(f,t,{kind:r,hoist:o,onlyBlock:c}))];case 3:a.sent(),a.label=4;case 4:return[3,13];case 5:return"Identifier"!==f.type?[3,9]:r?(t[r](f.name,d[p]),[3,8]):[3,6];case 6:return[5,s(ne(f,t,{getVar:!0}))];case 7:(g=a.sent()).set(d[p]),h.push(g.get()),a.label=8;case 8:return[3,13];case 9:return"RestElement"!==f.type?[3,11]:[5,s(je(f,t,{kind:r,feed:d.slice(p)}))];case 10:return a.sent(),[3,13];case 11:return[5,s(Gn(f,t,{kind:r,feed:d[p]}))];case 12:a.sent(),a.label=13;case 13:return p++,[3,1];case 14:return h.length?[2,h]:[2]}})}function je(e,t,n){var r,i,o,l,c,u,d,h;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.kind,i=n.hoist,o=void 0!==i&&i,l=n.onlyBlock,c=void 0!==l&&l,u=n.feed,d=void 0===u?[]:u,h=e.argument,o?c||"var"===r?"Identifier"!==h.type?[3,1]:(t[r](h.name,c?$:"var"===r?K:void 0),[3,3]):[3,3]:[3,4];case 1:return[5,s(Gn(h,t,{kind:r,hoist:o,onlyBlock:c}))];case 2:a.sent(),a.label=3;case 3:return[3,10];case 4:return"Identifier"!==h.type?[3,8]:r?(t[r](h.name,d),[3,7]):[3,5];case 5:return[5,s(ne(h,t,{getVar:!0}))];case 6:a.sent().set(d),a.label=7;case 7:return[3,10];case 8:return[5,s(Gn(h,t,{kind:r,feed:d}))];case 9:a.sent(),a.label=10;case 10:return[2]}})}function ze(e,t,n){var r,i,o,l,c,u,d,h,p,f;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.kind,i=void 0===r?"var":r,o=n.hoist,l=void 0!==o&&o,c=n.onlyBlock,u=void 0!==c&&c,void 0!==(d=n.feed)?[3,2]:[5,s(We(e.right,t))];case 1:return p=a.sent(),[3,3];case 2:p=d,a.label=3;case 3:return h=p,f=e.left,l?u||"var"===i?"Identifier"!==f.type?[3,4]:(t[i](f.name,u?$:"var"===i?K:void 0),[3,6]):[3,6]:[3,7];case 4:return[5,s(Gn(f,t,{kind:i,hoist:l,onlyBlock:u}))];case 5:a.sent(),a.label=6;case 6:return[3,10];case 7:return"Identifier"!==f.type?[3,8]:(t[i](f.name,h),[3,10]);case 8:return[5,s(Gn(f,t,{kind:i,feed:h}))];case 9:a.sent(),a.label=10;case 10:return[2]}})}var Me=Object.freeze({__proto__:null,ObjectPattern:Ne,ArrayPattern:Oe,RestElement:je,AssignmentPattern:ze});function De(e,t){var n;return a(this,function(r){switch(r.label){case 0:n=0,r.label=1;case 1:return n<e.body.length?[5,s(We(e.body[n],t))]:[3,4];case 2:r.sent(),r.label=3;case 3:return n++,[3,1];case 4:return[2]}})}var Be,Fe=Object.freeze({__proto__:null,Program:De});function We(e,n){var i;return a(this,function(o){switch(o.label){case 0:return e?(Be||(Be=E({},r,Re,re,t,oe,Me,Fe)),(i=Be[e.type])?[5,s(i(e,n))]:[3,2]):[2];case 1:return[2,o.sent()];case 2:throw new Error(e.type+" isn't implemented")}})}function Ue(e,t){return a(this,function(n){switch(n.label){case 0:return[5,s(We(e.expression,t))];case 1:return n.sent(),[2]}})}function Ve(e,t,n){var r,i,o,l,c,u,d;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.invasived,i=void 0!==r&&r,o=n.hoisted,l=void 0!==o&&o,c=i?t:new ee(t),l?[3,2]:[5,s(Vn(e,c,{onlyBlock:!0}))];case 1:a.sent(),a.label=2;case 2:u=0,a.label=3;case 3:return u<e.body.length?[5,s(We(e.body[u],c))]:[3,6];case 4:if((d=a.sent())===F)return d.LABEL&&d.LABEL===n.label?[3,6]:[2,d];if(d===B||d===D)return[2,d];a.label=5;case 5:return u++,[3,3];case 6:return[2]}})}function He(){return a(this,function(e){return[2]})}function Ge(){return a(this,function(e){return[2]})}function qe(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:return n=D,e.argument?[5,s(We(e.argument,t))]:[3,2];case 1:return r=i.sent(),[3,3];case 2:r=void 0,i.label=3;case 3:return n.RES=r,[2,D]}})}function Ke(e){var t;return a(this,function(n){return F.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,[2,F]})}function $e(e){var t;return a(this,function(n){return B.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,[2,B]})}function Ye(e,t){var n;return a(this,function(r){switch(r.label){case 0:return n=e.label.name,"WhileStatement"!==e.body.type?[3,2]:[5,s(rt(e.body,t,{label:n}))];case 1:case 3:case 5:case 7:case 9:case 11:case 13:case 15:case 17:case 19:return[2,r.sent()];case 2:return"DoWhileStatement"!==e.body.type?[3,4]:[5,s(it(e.body,t,{label:n}))];case 4:return"ForStatement"!==e.body.type?[3,6]:[5,s(ot(e.body,t,{label:n}))];case 6:return"ForInStatement"!==e.body.type?[3,8]:[5,s(at(e.body,t,{label:n}))];case 8:return"ForOfStatement"!==e.body.type?[3,10]:[5,s(st(e.body,t,{label:n}))];case 10:return"BlockStatement"!==e.body.type?[3,12]:[5,s(Ve(e.body,t,{label:n}))];case 12:return"WithStatement"!==e.body.type?[3,14]:[5,s(Xe(e.body,t,{label:n}))];case 14:return"IfStatement"!==e.body.type?[3,16]:[5,s(Je(e.body,t,{label:n}))];case 16:return"SwitchStatement"!==e.body.type?[3,18]:[5,s(Qe(e.body,t,{label:n}))];case 18:return"TryStatement"!==e.body.type?[3,20]:[5,s(tt(e.body,t,{label:n}))];case 20:throw new SyntaxError(e.body.type+" cannot be labeled")}})}function Xe(e,t,n){var r,i,o,l;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=new ee(t),o=(i=r).with,[5,s(We(e.object,t))];case 1:return o.apply(i,[a.sent()]),[5,s(We(e.body,r))];case 2:return(l=a.sent())===F?l.LABEL&&l.LABEL===n.label?[2]:[2,l]:l===B||l===D?[2,l]:[2]}})}function Je(e,t,n){var r;return void 0===n&&(n={}),a(this,function(i){switch(i.label){case 0:return[5,s(We(e.test,t))];case 1:return i.sent()?[5,s(We(e.consequent,t))]:[3,3];case 2:return r=i.sent(),[3,5];case 3:return[5,s(We(e.alternate,t))];case 4:r=i.sent(),i.label=5;case 5:return r===F?r.LABEL&&r.LABEL===n.label?[2]:[2,r]:r===B||r===D?[2,r]:[2]}})}function Qe(e,t,n){var r,i,o,l,c,u,d;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return[5,s(We(e.discriminant,t))];case 1:r=a.sent(),i=!1,o=0,a.label=2;case 2:return o<e.cases.length?(l=e.cases[o],(c=!i)?(u=!l.test)?[3,4]:[5,s(We(l.test,t))]:[3,5]):[3,8];case 3:u=a.sent()===r,a.label=4;case 4:c=u,a.label=5;case 5:return c&&(i=!0),i?[5,s(Ze(l,t))]:[3,7];case 6:if((d=a.sent())===F)return d.LABEL===n.label?[3,8]:[2,d];if(d===B||d===D)return[2,d];a.label=7;case 7:return o++,[3,2];case 8:return[2]}})}function Ze(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:n=0,i.label=1;case 1:return n<e.consequent.length?[5,s(We(e.consequent[n],t))]:[3,4];case 2:if((r=i.sent())===F||r===B||r===D)return[2,r];i.label=3;case 3:return n++,[3,1];case 4:return[2]}})}function et(e,t){return a(this,function(n){switch(n.label){case 0:return[5,s(We(e.argument,t))];case 1:throw n.sent()}})}function tt(e,t,n){var r,i,o,l,c;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,9,12]),[5,s(Ve(e.block,t))];case 1:return r=a.sent(),[3,12];case 2:return i=a.sent(),e.handler?(o=new ee(t),(l=e.handler.param)?"Identifier"!==l.type?[3,3]:(c=l.name,o.var(c,i),[3,5]):[3,5]):[3,7];case 3:return[5,s(Gn(l,t,{feed:i}))];case 4:a.sent(),a.label=5;case 5:return[5,s(nt(e.handler,o))];case 6:return r=a.sent(),[3,8];case 7:throw i;case 8:return[3,12];case 9:return e.finalizer?[5,s(Ve(e.finalizer,t))]:[3,11];case 10:r=a.sent(),a.label=11;case 11:return[7];case 12:return r===F?r.LABEL&&r.LABEL===n.label?[2]:[2,r]:r===B||r===D?[2,r]:[2]}})}function nt(e,t){return a(this,function(n){switch(n.label){case 0:return[5,s(Ve(e.body,t,{invasived:!0}))];case 1:return[2,n.sent()]}})}function rt(e,t,n){var r;return void 0===n&&(n={}),a(this,function(i){switch(i.label){case 0:return[5,s(We(e.test,t))];case 1:return i.sent()?[5,s(We(e.body,t))]:[3,3];case 2:return(r=i.sent())===F?r.LABEL===n.label?[3,3]:[2,r]:r===B?r.LABEL===n.label?[3,0]:[2,r]:r===D?[2,r]:[3,0];case 3:return[2]}})}function it(e,t,n){var r;return void 0===n&&(n={}),a(this,function(i){switch(i.label){case 0:return[5,s(We(e.body,t))];case 1:if((r=i.sent())===F)return r.LABEL===n.label?[3,4]:[2,r];if(r===B)return r.LABEL===n.label?[3,2]:[2,r];if(r===D)return[2,r];i.label=2;case 2:return[5,s(We(e.test,t))];case 3:if(i.sent())return[3,0];i.label=4;case 4:return[2]}})}function ot(e,t,n){var r,i,o,l;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=new ee(t),[5,s(We(e.init,r))];case 1:a.sent(),a.label=2;case 2:return e.test?[5,s(We(e.test,r))]:[3,4];case 3:return i=a.sent(),[3,5];case 4:i=!0,a.label=5;case 5:return i?(o=new ee(r),l=void 0,"BlockStatement"!==e.body.type?[3,7]:[5,s(Ve(e.body,o,{invasived:!0}))]):[3,12];case 6:return l=a.sent(),[3,9];case 7:return[5,s(We(e.body,o))];case 8:l=a.sent(),a.label=9;case 9:if(l===F)return l.LABEL===n.label?[3,12]:[2,l];if(l===B)return l.LABEL===n.label?[3,10]:[2,l];if(l===D)return[2,l];a.label=10;case 10:return[5,s(We(e.update,r))];case 11:return a.sent(),[3,2];case 12:return[2]}})}function at(e,t,n){var r,i,o,l,c;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=[],[5,s(We(e.right,t))];case 1:for(i in a.sent())r.push(i);o=0,a.label=2;case 2:return o<r.length?(l=r[o],[5,s($n(e,t,{value:l}))]):[3,5];case 3:if((c=a.sent())===F)return c.LABEL===n.label?[3,5]:[2,c];if(c===B)return c.LABEL===n.label?[3,4]:[2,c];if(c===D)return[2,c];a.label=4;case 4:return o++,[3,2];case 5:return[2]}})}function st(e,t,n){var r,i,o,l,c,u,d,h,p,f;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return[5,s(We(e.right,t))];case 1:return r=a.sent(),e.await?(i=z(r),o=void 0,M.RES=i.next(),[4,M]):[3,8];case 2:o=a.sent(),a.label=3;case 3:return o.done?[3,7]:[5,s($n(e,t,{value:o.value}))];case 4:if((d=a.sent())===F)return d.LABEL===n.label?[3,7]:[2,d];if(d===B)return d.LABEL===n.label?[3,5]:[2,d];if(d===D)return[2,d];a.label=5;case 5:return M.RES=i.next(),[4,M];case 6:return o=a.sent(),[3,3];case 7:return[3,15];case 8:a.trys.push([8,13,14,15]),l=s(r),c=l.next(),a.label=9;case 9:return c.done?[3,12]:(u=c.value,[5,s($n(e,t,{value:u}))]);case 10:if((d=a.sent())===F)return d.LABEL===n.label?[3,12]:[2,d];if(d===B)return d.LABEL===n.label?[3,11]:[2,d];if(d===D)return[2,d];a.label=11;case 11:return c=l.next(),[3,9];case 12:return[3,15];case 13:return h=a.sent(),p={error:h},[3,15];case 14:try{c&&!c.done&&(f=l.return)&&f.call(l)}finally{if(p)throw p.error}return[7];case 15:return[2]}})}function lt(e,t){return a(this,function(n){return t.func(e.id.name,qn(e,t)),[2]})}function ct(e,t,n){var r;return void 0===n&&(n={}),a(this,function(i){switch(i.label){case 0:r=0,i.label=1;case 1:return r<e.declarations.length?[5,s(ut(e.declarations[r],t,E({kind:e.kind},n)))]:[3,4];case 2:i.sent(),i.label=3;case 3:return r++,[3,1];case 4:return[2]}})}function ut(e,t,n){var r,i,o,l,c,u,h,p,f,g,m;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.kind,i=void 0===r?"var":r,o=n.hoist,l=void 0!==o&&o,c=n.onlyBlock,u=void 0!==c&&c,h=n.feed,l?u||"var"===i?"Identifier"!==e.id.type?[3,1]:(t[i](e.id.name,u?$:"var"===i?K:void 0),[3,3]):[3,3]:[3,4];case 1:return[5,s(Gn(e.id,t,{kind:i,hoist:l,onlyBlock:u}))];case 2:a.sent(),a.label=3;case 3:return[3,10];case 4:return(p="feed"in n)?(g=h,[3,7]):[3,5];case 5:return[5,s(We(e.init,t))];case 6:g=a.sent(),a.label=7;case 7:return f=g,"Identifier"!==e.id.type?[3,8]:(m=e.id.name,"var"!==i||e.init||p?t[i](m,f):t.var(m,K),e.init&&-1!==["ClassExpression","FunctionExpression","ArrowFunctionExpression"].indexOf(e.init.type)&&!f.name&&d(f,"name",{value:m,configurable:!0}),[3,10]);case 8:return[5,s(Gn(e.id,t,{kind:i,feed:f}))];case 9:a.sent(),a.label=10;case 10:return[2]}})}function dt(e,t){var n,r,i;return a(this,function(o){switch(o.label){case 0:return r=(n=t).func,i=[e.id.name],[5,s(Kn(e,t))];case 1:return r.apply(n,i.concat([o.sent()])),[2]}})}function ht(e,t,n){var r,i,o,l;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:r=n.klass,i=n.superClass,o=0,a.label=1;case 1:return o<e.body.length?"MethodDefinition"!==(l=e.body[o]).type?[3,3]:[5,s(pt(l,t,{klass:r,superClass:i}))]:[3,8];case 2:return a.sent(),[3,7];case 3:return"PropertyDefinition"===l.type&&l.static?[5,s(ft(l,t,{klass:r,superClass:i}))]:[3,5];case 4:return a.sent(),[3,7];case 5:return"StaticBlock"!==l.type?[3,7]:[5,s(gt(l,t,{klass:r,superClass:i}))];case 6:a.sent(),a.label=7;case 7:return o++,[3,1];case 8:return[2]}})}function pt(e,t,n){var r,i,o,l,c,u,p;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.klass,i=n.superClass,l=!1,e.computed?[5,s(We(e.key,t))]:[3,2];case 1:return o=a.sent(),[3,3];case 2:if("Identifier"===e.key.type)o=e.key.name;else{if("PrivateIdentifier"!==e.key.type)throw new SyntaxError("Unexpected token");o=e.key.name,l=!0}a.label=3;case 3:switch(c=e.static?r:r.prototype,l&&(c[q]||d(c,q,{value:{}}),c=c[q]),u=qn(e.value,t,{superClass:i}),e.kind){case"constructor":break;case"method":d(c,o,{value:u,writable:!0,configurable:!0});break;case"get":p=h(c,o),d(c,o,{get:u,set:p&&p.set,configurable:!0});break;case"set":p=h(c,o),d(c,o,{get:p&&p.get,set:u,configurable:!0});break;default:throw new SyntaxError("Unexpected token")}return[2]}})}function ft(e,t,n){var r,i,o,l,c,u,h,p;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.klass,i=n.superClass,l=!1,e.computed?[5,s(We(e.key,t))]:[3,2];case 1:return o=a.sent(),[3,3];case 2:if("Identifier"===e.key.type)o=e.key.name;else{if("PrivateIdentifier"!==e.key.type)throw new SyntaxError("Unexpected token");o=e.key.name,l=!0}a.label=3;case 3:return(c=new ee(t,!0)).const("this",r),u=r,l&&(u[q]||d(u,q,{value:{}}),u=u[q]),e.value?[3,4]:(u[o]=void 0,[3,7]);case 4:return"FunctionExpression"!==e.value.type&&"ArrowFunctionExpression"!==e.value.type?[3,5]:(u[o]=qn(e.value,c,{superClass:i}),[3,7]);case 5:return h=u,p=o,[5,s(We(e.value,c))];case 6:h[p]=a.sent(),a.label=7;case 7:return[2]}})}function gt(e,t,n){var r,i;return void 0===n&&(n={}),a(this,function(o){switch(o.label){case 0:return r=n.klass,(i=new ee(t,!0)).const("this",r),[5,s(Ve(e,i,{invasived:!0}))];case 1:return[2,o.sent()]}})}function mt(e,t){var n,r,i,o,s,l,c;return a(this,function(a){if(n=t.global(),(r=n.find(Y+e.source.value))&&(o=r.get())&&("function"==typeof o?i=o():"object"==typeof o&&(i=o)),!i||"object"!=typeof i)throw new TypeError('Failed to resolve module specifier "'+e.source.value+'"');for(s=0;s<e.specifiers.length;s++){if(l=e.specifiers[s],c=void 0,"ImportSpecifier"===l.type?c="Identifier"===l.imported.type?l.imported.name:l.imported.value:"ImportDefaultSpecifier"===l.type?c="default":"ImportNamespaceSpecifier"===l.type&&(c="*"),"*"!==c&&!f(i,c))throw new SyntaxError('The requested module "'+e.source.value+'" does not provide an export named "'+c+'"');t.var(l.local.name,"*"===c?E({},i):i[c])}return[2]})}function vt(e,t){var n,r,i,o;return a(this,function(a){switch(a.label){case 0:return n=t.global(),"FunctionDeclaration"!==e.declaration.type?[3,1]:(r=qn(e.declaration,t),t.func(e.declaration.id.name,r),[3,5]);case 1:return"ClassDeclaration"!==e.declaration.type?[3,3]:[5,s(Kn(e.declaration,t))];case 2:return r=a.sent(),t.func(e.declaration.id.name,r),[3,5];case 3:return[5,s(We(e.declaration,t))];case 4:r=a.sent(),a.label=5;case 5:return(i=n.find(X))&&(o=i.get())&&"object"==typeof o&&(o.default=r),[2]}})}function yt(e,t){var n,r,i,o,l,c,u,d,h,p,f,g;return a(this,function(a){switch(a.label){case 0:return n=t.global(),e.declaration?"FunctionDeclaration"!==e.declaration.type?[3,1]:(i=qn(e.declaration,t),t.func(e.declaration.id.name,i),(u=n.find(X))&&(r=u.get())&&"object"==typeof r&&(r[e.declaration.id.name]=i),[3,5]):[3,6];case 1:return"ClassDeclaration"!==e.declaration.type?[3,3]:[5,s(Kn(e.declaration,t))];case 2:return i=a.sent(),t.func(e.declaration.id.name,i),(u=n.find(X))&&(o=u.get())&&"object"==typeof o&&(o[e.declaration.id.name]=i),[3,5];case 3:return"VariableDeclaration"!==e.declaration.type?[3,5]:[5,s(ct(e.declaration,t))];case 4:if(a.sent(),(u=n.find(X))&&(l=u.get())&&"object"==typeof l)for(h=0;h<e.declaration.declarations.length;h++)c=e.declaration.declarations[h].id.name,(g=t.find(c))&&(l[c]=g.get());a.label=5;case 5:return[3,7];case 6:if(e.specifiers&&(u=n.find(X))&&(d=u.get())&&"object"==typeof d)for(h=0;h<e.specifiers.length;h++)p=e.specifiers[h],f="Identifier"===p.local.type?p.local.name:p.local.value,(g=t.find(f))&&(d["Identifier"===p.exported.type?p.exported.name:p.exported.value]=g.get());a.label=7;case 7:return[2]}})}function bt(e,t){var n,r,i,o,s,l;return a(this,function(a){if(n=t.global(),(r=n.find(Y+e.source.value))&&(o=r.get())&&("function"==typeof o?i=o():"object"==typeof o&&(i=o)),!i||"object"!=typeof i)throw new TypeError('Failed to resolve module specifier "'+e.source.value+'"');return(s=n.find(X))&&(l=s.get())&&"object"==typeof l&&E(l,i),[2]})}function wt(e,t,n){void 0===n&&(n={});var r=n.getVar,i=void 0!==r&&r,o=n.throwErr,a=void 0===o||o;if("undefined"!==e.name){var s=t.find(e.name);if(s){if(i)return s;var l=s.get();if(l===$)throw new ReferenceError(e.name+" is not defined");return l}if(a)throw new ReferenceError(e.name+" is not defined")}}var xt=Object.freeze({__proto__:null,Identifier:wt});function At(e,t){return e.value}var St=Object.freeze({__proto__:null,Literal:At});function kt(e,t){var n=t.find(U);if(n&&!n.get())throw new ReferenceError("Must call super constructor in derived class before accessing 'this' or returning from derived constructor");return t.find("this").get()}function _t(e,t){for(var n=[],r=0;r<e.elements.length;r++){var i=e.elements[r];"SpreadElement"===i.type?n=n.concat(Gt(i,t)):n.push(rn(i,t))}return n}function Tt(e,t){for(var n={},r=0;r<e.properties.length;r++){var i=e.properties[r];if("SpreadElement"===i.type)E(n,Gt(i,t,{spreadProps:!0}));else{var o=void 0,a=i.key;o=i.computed?rn(a,t):"Identifier"===a.type?a.name:""+At(a);var s=rn(i.value,t),l=i.kind;if("init"===l)n[o]=s;else if("get"===l){var c=h(n,o);d(n,o,{get:s,set:c&&c.set,enumerable:!0,configurable:!0})}else c=h(n,o),d(n,o,{get:c&&c.get,set:s,enumerable:!0,configurable:!0})}}return n}function Et(e,t){if(e.id&&e.id.name){var n=new ee(t),r=Fn(e,n);return n.const(e.id.name,r),r}return Fn(e,t)}function Ct(e,t){var n=e.argument;switch(e.operator){case"+":return+rn(n,t);case"-":return-rn(n,t);case"!":return!rn(n,t);case"~":return~rn(n,t);case"void":return void rn(n,t);case"typeof":return"Identifier"===n.type?typeof wt(n,t,{throwErr:!1}):typeof rn(n,t);case"delete":if("MemberExpression"===n.type)return Nt(n,t,{getVar:!0}).del();if("Identifier"===n.type)throw new SyntaxError("Delete of an unqualified identifier in strict mode");return rn(n,t),!0;default:throw new SyntaxError("Unexpected token "+e.operator)}}function It(e,t){var n,r=e.argument;if("Identifier"===r.type)n=wt(r,t,{getVar:!0});else{if("MemberExpression"!==r.type)throw new SyntaxError("Unexpected token");n=Nt(r,t,{getVar:!0})}var i=n.get();if("++"===e.operator)return n.set(i+1),e.prefix?n.get():i;if("--"===e.operator)return n.set(i-1),e.prefix?n.get():i;throw new SyntaxError("Unexpected token "+e.operator)}function Pt(e,t){var n,r;switch("PrivateIdentifier"===e.left.type?(n=e.left.name,r=(r=rn(e.right,t))[q]||{}):(n=rn(e.left,t),r=rn(e.right,t)),e.operator){case"==":return n==r;case"!=":return n!=r;case"===":return n===r;case"!==":return n!==r;case"<":return n<r;case"<=":return n<=r;case">":return n>r;case">=":return n>=r;case"<<":return n<<r;case">>":return n>>r;case">>>":return n>>>r;case"+":return n+r;case"-":return n-r;case"*":return n*r;case"**":return Math.pow(n,r);case"/":return n/r;case"%":return n%r;case"|":return n|r;case"^":return n^r;case"&":return n&r;case"in":return n in r;case"instanceof":return n instanceof r;default:throw new SyntaxError("Unexpected token "+e.operator)}}function Lt(e,t){var n,r,i=e.left;if("Identifier"===i.type){if(!(r=wt(i,t,{getVar:!0,throwErr:!1}))){var o=t.global().find("window").get();r=new Z(o,i.name)}}else{if("MemberExpression"!==i.type)return Bn(i,t,{feed:rn(e.right,t)});r=Nt(i,t,{getVar:!0})}var a=rn(e.right,t);switch(e.operator){case"=":return r.set(a),r.get();case"+=":return r.set(r.get()+a),r.get();case"-=":return r.set(r.get()-a),r.get();case"*=":return r.set(r.get()*a),r.get();case"/=":return r.set(r.get()/a),r.get();case"%=":return r.set(r.get()%a),r.get();case"**=":return r.set(Math.pow(r.get(),a)),r.get();case"<<=":return r.set(r.get()<<a),r.get();case">>=":return r.set(r.get()>>a),r.get();case">>>=":return r.set(r.get()>>>a),r.get();case"|=":return r.set(r.get()|a),r.get();case"^=":return r.set(r.get()^a),r.get();case"&=":return r.set(r.get()&a),r.get();case"??=":return r.set(null!==(n=r.get())&&void 0!==n?n:a),r.get();case"&&=":return r.set(r.get()&&a),r.get();case"||=":return r.set(r.get()||a),r.get();default:throw new SyntaxError("Unexpected token "+e.operator)}}function Rt(e,t){var n;switch(e.operator){case"||":return rn(e.left,t)||rn(e.right,t);case"&&":return rn(e.left,t)&&rn(e.right,t);case"??":return null!==(n=rn(e.left,t))&&void 0!==n?n:rn(e.right,t);default:throw new SyntaxError("Unexpected token "+e.operator)}}function Nt(e,t,n){void 0===n&&(n={});var r,i,o=n.getObj,a=void 0!==o&&o,s=n.getVar,l=void 0!==s&&s;if(r="Super"===e.object.type?Ht(e.object,t,{getProto:!0}):rn(e.object,t),a)return r;var c=!1;if(e.computed?i=rn(e.property,t):"PrivateIdentifier"===e.property.type?(i=e.property.name,c=!0):i=e.property.name,c&&(r=r[q]),l){var u=S(r,i);if("Super"===e.object.type&&u){var h=t.find("this").get(),p=j(i);return d(h,p,{set:u}),new Z(h,p)}return new Z(r,i)}var f=A(r,i);if("Super"===e.object.type&&f){if(h=t.find("this").get(),e.optional&&null==h)return;return f.call(h)}return e.optional&&null==r?void 0:r[i]}function Ot(e,t){return rn(e.test,t)?rn(e.consequent,t):rn(e.alternate,t)}function jt(e,t){var n,r;if("MemberExpression"===e.callee.type){if(r=Nt(e.callee,t,{getObj:!0}),e.callee.optional&&null==r)return;var i=void 0,o=!1;e.callee.computed?i=rn(e.callee.property,t):"PrivateIdentifier"===e.callee.property.type?(i=e.callee.property.name,o=!0):i=e.callee.property.name;var a=r;if(o&&(a=a[q]),"Super"===e.callee.object.type){var s=t.find("this").get();n=a[i].bind(s)}else n=a[i];if(e.optional&&null==n)return;if("function"!=typeof n)throw new TypeError(i+" is not a function");if(n[H])throw new TypeError("Class constructor "+i+" cannot be invoked without 'new'")}else{if(r=t.find("this").get(),n=rn(e.callee,t),e.optional&&null==n)return;if("function"!=typeof n||"Super"!==e.callee.type&&n[H]){var l;if("Identifier"===e.callee.type)l=e.callee.name;else try{l=JSON.stringify(n)}catch(e){l=""+n}throw"function"!=typeof n?new TypeError(l+" is not a function"):new TypeError("Class constructor "+l+" cannot be invoked without 'new'")}}for(var c=[],u=0;u<e.arguments.length;u++){var d=e.arguments[u];"SpreadElement"===d.type?c=c.concat(Gt(d,t)):c.push(rn(d,t))}if("Super"===e.callee.type){if(t.find(U).get())throw new ReferenceError("Super constructor may only be called once");t.find(U).set(!0)}try{return n.apply(r,c)}catch(e){if(e instanceof TypeError&&"Illegal invocation"===e.message&&-1!==n.toString().indexOf("[native code]")){var h=t.global().find("window").get();if(h&&h[N])return n.apply(h[N],c)}throw e}}function zt(e,t){var n=rn(e.callee,t);if("function"!=typeof n){var r;if("Identifier"===e.callee.type)r=e.callee.name;else try{r=JSON.stringify(n)}catch(e){r=""+n}throw new TypeError(r+" is not a constructor")}if(n[V])throw new TypeError((n.name||"(intermediate value)")+" is not a constructor");for(var i=[],o=0;o<e.arguments.length;o++){var a=e.arguments[o];"SpreadElement"===a.type?i=i.concat(Gt(a,t)):i.push(rn(a,t))}return new(n.bind.apply(n,c([void 0],i)))}function Mt(e,t){return"new"===e.meta.name&&"target"===e.property.name?t.find(G).get():"import"===e.meta.name&&"meta"===e.property.name?{url:""}:void 0}function Dt(e,t){for(var n,r=0;r<e.expressions.length;r++)n=rn(e.expressions[r],t);return n}function Bt(e,t){return Fn(e,t)}function Ft(e,t){for(var n,r,i=e.quasis.slice(),o=e.expressions.slice(),a="";n=i.shift();)a+=Ut(n),(r=o.shift())&&(a+=rn(r,t));return a}function Wt(e,t){var n=rn(e.tag,t),r=e.quasi.quasis,i=r.map(function(e){return e.value.cooked}),o=r.map(function(e){return e.value.raw});d(i,"raw",{value:u(o)});var a=e.quasi.expressions,s=[];if(a)for(var l=0;l<a.length;l++)s.push(rn(a[l],t));return n.apply(void 0,c([u(i)],s))}function Ut(e,t){return e.value.raw}function Vt(e,t){if(e.id&&e.id.name){var n=new ee(t),r=Wn(e,n);return n.const(e.id.name,r),r}return Wn(e,t)}function Ht(e,t,n){void 0===n&&(n={});var r=n.getProto,i=void 0!==r&&r,o=t.find(W).get();return i?o.prototype:o}function Gt(e,t,n){void 0===n&&(n={});var r=rn(e.argument,t);return n.spreadProps?r:c(r)}function qt(e,t){return rn(e.expression,t)}function Kt(e,t){var n,r=t.global(),i=rn(e.source,t),o=r.find(Y+i);if(o){var a=o.get();a&&("function"==typeof a?n=a():"object"==typeof a&&(n=a))}return n&&"object"==typeof n?Promise.resolve(n):Promise.reject(new TypeError('Failed to resolve module specifier "'+i+'"'))}var $t=Object.freeze({__proto__:null,ThisExpression:kt,ArrayExpression:_t,ObjectExpression:Tt,FunctionExpression:Et,UnaryExpression:Ct,UpdateExpression:It,BinaryExpression:Pt,AssignmentExpression:Lt,LogicalExpression:Rt,MemberExpression:Nt,ConditionalExpression:Ot,CallExpression:jt,NewExpression:zt,MetaProperty:Mt,SequenceExpression:Dt,ArrowFunctionExpression:Bt,TemplateLiteral:Ft,TaggedTemplateExpression:Wt,TemplateElement:Ut,ClassExpression:Vt,Super:Ht,SpreadElement:Gt,ChainExpression:qt,ImportExpression:Kt});function Yt(e,t,n){void 0===n&&(n={});for(var r=n.kind,i=void 0===r?"var":r,o=n.hoist,a=void 0!==o&&o,s=n.onlyBlock,l=void 0!==s&&s,c=n.feed,u=void 0===c?{}:c,d=[],h=0;h<e.properties.length;h++){var p=e.properties[h];if(a)(l||"var"===i)&&("Property"===p.type?"Identifier"===(f=p.value).type?t[i](f.name,l?$:"var"===i?K:void 0):Bn(f,t,{kind:i,hoist:a,onlyBlock:l}):Jt(p,t,{kind:i,hoist:a,onlyBlock:l}));else if("Property"===p.type){var f,g=void 0;g=p.computed?rn(p.key,t):p.key.name,d.push(g),"Identifier"===(f=p.value).type?t[i](f.name,u[g]):Bn(f,t,{kind:i,feed:u[g]})}else{for(var m=E({},u),v=0;v<d.length;v++)delete m[d[v]];Jt(p,t,{kind:i,feed:m})}}}function Xt(e,t,n){void 0===n&&(n={});for(var r=n.kind,i=n.hoist,o=void 0!==i&&i,a=n.onlyBlock,s=void 0!==a&&a,l=n.feed,c=void 0===l?[]:l,u=[],d=0;d<e.elements.length;d++){var h=e.elements[d];if(h)if(o)(s||"var"===r)&&("Identifier"===h.type?t[r](h.name,s?$:"var"===r?K:void 0):Bn(h,t,{kind:r,hoist:o,onlyBlock:s}));else if("Identifier"===h.type)if(r)t[r](h.name,c[d]);else{var p=wt(h,t,{getVar:!0});p.set(c[d]),u.push(p.get())}else"RestElement"===h.type?Jt(h,t,{kind:r,feed:c.slice(d)}):Bn(h,t,{kind:r,feed:c[d]})}if(u.length)return u}function Jt(e,t,n){void 0===n&&(n={});var r=n.kind,i=n.hoist,o=void 0!==i&&i,a=n.onlyBlock,s=void 0!==a&&a,l=n.feed,c=void 0===l?[]:l,u=e.argument;o?(s||"var"===r)&&("Identifier"===u.type?t[r](u.name,s?$:"var"===r?K:void 0):Bn(u,t,{kind:r,hoist:o,onlyBlock:s})):"Identifier"===u.type?r?t[r](u.name,c):wt(u,t,{getVar:!0}).set(c):Bn(u,t,{kind:r,feed:c})}function Qt(e,t,n){void 0===n&&(n={});var r=n.kind,i=void 0===r?"var":r,o=n.hoist,a=void 0!==o&&o,s=n.onlyBlock,l=void 0!==s&&s,c=n.feed,u=void 0===c?rn(e.right,t):c,d=e.left;a?(l||"var"===i)&&("Identifier"===d.type?t[i](d.name,l?$:"var"===i?K:void 0):Bn(d,t,{kind:i,hoist:a,onlyBlock:l})):"Identifier"===d.type?t[i](d.name,u):Bn(d,t,{kind:i,feed:u})}var Zt=Object.freeze({__proto__:null,ObjectPattern:Yt,ArrayPattern:Xt,RestElement:Jt,AssignmentPattern:Qt});function en(e,t){for(var n=0;n<e.body.length;n++)rn(e.body[n],t)}var tn,nn=Object.freeze({__proto__:null,Program:en});function rn(e,t){if(e){tn||(tn=E({},o,$t,xt,i,St,Zt,nn));var n=tn[e.type];if(n)return n(e,t);throw new Error(e.type+" isn't implemented")}}function on(e,t){rn(e.expression,t)}function an(e,t,n){void 0===n&&(n={});var r=n.invasived,i=void 0!==r&&r,o=n.hoisted,a=void 0!==o&&o,s=i?t:new ee(t);a||Mn(e,s,{onlyBlock:!0});for(var l=0;l<e.body.length;l++){var c=rn(e.body[l],s);if(c===F){if(c.LABEL&&c.LABEL===n.label)break;return c}if(c===B||c===D)return c}}function sn(){}function ln(){}function cn(e,t){return D.RES=e.argument?rn(e.argument,t):void 0,D}function un(e){var t;return F.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,F}function dn(e){var t;return B.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,B}function hn(e,t){var n=e.label.name;if("WhileStatement"===e.body.type)return wn(e.body,t,{label:n});if("DoWhileStatement"===e.body.type)return xn(e.body,t,{label:n});if("ForStatement"===e.body.type)return An(e.body,t,{label:n});if("ForInStatement"===e.body.type)return Sn(e.body,t,{label:n});if("ForOfStatement"===e.body.type)return kn(e.body,t,{label:n});if("BlockStatement"===e.body.type)return an(e.body,t,{label:n});if("WithStatement"===e.body.type)return pn(e.body,t,{label:n});if("IfStatement"===e.body.type)return fn(e.body,t,{label:n});if("SwitchStatement"===e.body.type)return gn(e.body,t,{label:n});if("TryStatement"===e.body.type)return yn(e.body,t,{label:n});throw new SyntaxError(e.body.type+" cannot be labeled")}function pn(e,t,n){void 0===n&&(n={});var r=new ee(t);r.with(rn(e.object,t));var i=rn(e.body,r);if(i===F){if(i.LABEL&&i.LABEL===n.label)return;return i}if(i===B||i===D)return i}function fn(e,t,n){var r;if(void 0===n&&(n={}),(r=rn(e.test,t)?rn(e.consequent,t):rn(e.alternate,t))===F){if(r.LABEL&&r.LABEL===n.label)return;return r}if(r===B||r===D)return r}function gn(e,t,n){void 0===n&&(n={});for(var r=rn(e.discriminant,t),i=!1,o=0;o<e.cases.length;o++){var a=e.cases[o];if(i||a.test&&rn(a.test,t)!==r||(i=!0),i){var s=mn(a,t);if(s===F){if(s.LABEL===n.label)break;return s}if(s===B||s===D)return s}}}function mn(e,t){for(var n=0;n<e.consequent.length;n++){var r=rn(e.consequent[n],t);if(r===F||r===B||r===D)return r}}function vn(e,t){throw rn(e.argument,t)}function yn(e,t,n){var r;void 0===n&&(n={});try{r=an(e.block,t)}catch(n){if(!e.handler)throw n;var i=new ee(t),o=e.handler.param;if(o)if("Identifier"===o.type){var a=o.name;i.var(a,n)}else Bn(o,t,{feed:n});r=bn(e.handler,i)}finally{e.finalizer&&(r=an(e.finalizer,t))}if(r===F){if(r.LABEL&&r.LABEL===n.label)return;return r}if(r===B||r===D)return r}function bn(e,t){return an(e.body,t,{invasived:!0})}function wn(e,t,n){for(void 0===n&&(n={});rn(e.test,t);){var r=rn(e.body,t);if(r===F){if(r.LABEL===n.label)break;return r}if(r===B){if(r.LABEL===n.label)continue;return r}if(r===D)return r}}function xn(e,t,n){void 0===n&&(n={});do{var r=rn(e.body,t);if(r===F){if(r.LABEL===n.label)break;return r}if(r===B){if(r.LABEL===n.label)continue;return r}if(r===D)return r}while(rn(e.test,t))}function An(e,t,n){void 0===n&&(n={});var r=new ee(t);for(rn(e.init,r);!e.test||rn(e.test,r);rn(e.update,r)){var i=new ee(r),o=void 0;if((o="BlockStatement"===e.body.type?an(e.body,i,{invasived:!0}):rn(e.body,i))===F){if(o.LABEL===n.label)break;return o}if(o===B){if(o.LABEL===n.label)continue;return o}if(o===D)return o}}function Sn(e,t,n){for(var r in void 0===n&&(n={}),rn(e.right,t)){var i=Un(e,t,{value:r});if(i===F){if(i.LABEL===n.label)break;return i}if(i===B){if(i.LABEL===n.label)continue;return i}if(i===D)return i}}function kn(e,t,n){var r,i;void 0===n&&(n={});var o=rn(e.right,t);try{for(var a=s(o),l=a.next();!l.done;l=a.next()){var c=Un(e,t,{value:l.value});if(c===F){if(c.LABEL===n.label)break;return c}if(c===B){if(c.LABEL===n.label)continue;return c}if(c===D)return c}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}function _n(e,t){t.func(e.id.name,Fn(e,t))}function Tn(e,t,n){void 0===n&&(n={});for(var r=0;r<e.declarations.length;r++)En(e.declarations[r],t,E({kind:e.kind},n))}function En(e,t,n){void 0===n&&(n={});var r=n.kind,i=void 0===r?"var":r,o=n.hoist,a=void 0!==o&&o,s=n.onlyBlock,l=void 0!==s&&s,c=n.feed;if(a)(l||"var"===i)&&("Identifier"===e.id.type?t[i](e.id.name,l?$:"var"===i?K:void 0):Bn(e.id,t,{kind:i,hoist:a,onlyBlock:l}));else{var u="feed"in n,h=u?c:rn(e.init,t);if("Identifier"===e.id.type){var p=e.id.name;"var"!==i||e.init||u?t[i](p,h):t.var(p,K),e.init&&-1!==["ClassExpression","FunctionExpression","ArrowFunctionExpression"].indexOf(e.init.type)&&!h.name&&d(h,"name",{value:p,configurable:!0})}else Bn(e.id,t,{kind:i,feed:h})}}function Cn(e,t){t.func(e.id.name,Wn(e,t))}function In(e,t,n){void 0===n&&(n={});for(var r=n.klass,i=n.superClass,o=0;o<e.body.length;o++){var a=e.body[o];"MethodDefinition"===a.type?Pn(a,t,{klass:r,superClass:i}):"PropertyDefinition"===a.type&&a.static?Ln(a,t,{klass:r,superClass:i}):"StaticBlock"===a.type&&Rn(a,t,{klass:r,superClass:i})}}function Pn(e,t,n){void 0===n&&(n={});var r,i=n.klass,o=n.superClass,a=!1;if(e.computed)r=rn(e.key,t);else if("Identifier"===e.key.type)r=e.key.name;else{if("PrivateIdentifier"!==e.key.type)throw new SyntaxError("Unexpected token");r=e.key.name,a=!0}var s=e.static?i:i.prototype;a&&(s[q]||d(s,q,{value:{}}),s=s[q]);var l=Fn(e.value,t,{superClass:o});switch(e.kind){case"constructor":break;case"method":d(s,r,{value:l,writable:!0,configurable:!0});break;case"get":var c=h(s,r);d(s,r,{get:l,set:c&&c.set,configurable:!0});break;case"set":c=h(s,r),d(s,r,{get:c&&c.get,set:l,configurable:!0});break;default:throw new SyntaxError("Unexpected token")}}function Ln(e,t,n){void 0===n&&(n={});var r,i=n.klass,o=n.superClass,a=!1;if(e.computed)r=rn(e.key,t);else if("Identifier"===e.key.type)r=e.key.name;else{if("PrivateIdentifier"!==e.key.type)throw new SyntaxError("Unexpected token");r=e.key.name,a=!0}var s=new ee(t,!0);s.const("this",i);var l=i;a&&(l[q]||d(l,q,{value:{}}),l=l[q]),e.value?"FunctionExpression"===e.value.type||"ArrowFunctionExpression"===e.value.type?l[r]=Fn(e.value,s,{superClass:o}):l[r]=rn(e.value,s):l[r]=void 0}function Rn(e,t,n){void 0===n&&(n={});var r=n.klass,i=new ee(t,!0);return i.const("this",r),an(e,i,{invasived:!0})}function Nn(e,t){var n,r=t.global().find(Y+e.source.value);if(r){var i=r.get();i&&("function"==typeof i?n=i():"object"==typeof i&&(n=i))}if(!n||"object"!=typeof n)throw new TypeError('Failed to resolve module specifier "'+e.source.value+'"');for(var o=0;o<e.specifiers.length;o++){var a=e.specifiers[o],s=void 0;if("ImportSpecifier"===a.type?s="Identifier"===a.imported.type?a.imported.name:a.imported.value:"ImportDefaultSpecifier"===a.type?s="default":"ImportNamespaceSpecifier"===a.type&&(s="*"),"*"!==s&&!f(n,s))throw new SyntaxError('The requested module "'+e.source.value+'" does not provide an export named "'+s+'"');t.var(a.local.name,"*"===s?E({},n):n[s])}}function On(e,t){var n,r=t.global();"FunctionDeclaration"===e.declaration.type?(n=Fn(e.declaration,t),t.func(e.declaration.id.name,n)):"ClassDeclaration"===e.declaration.type?(n=Wn(e.declaration,t),t.func(e.declaration.id.name,n)):n=rn(e.declaration,t);var i=r.find(X);if(i){var o=i.get();o&&"object"==typeof o&&(o.default=n)}}function jn(e,t){var n=t.global();if(e.declaration){if("FunctionDeclaration"===e.declaration.type){var r=Fn(e.declaration,t);if(t.func(e.declaration.id.name,r),c=n.find(X)){var i=c.get();i&&"object"==typeof i&&(i[e.declaration.id.name]=r)}}else if("ClassDeclaration"===e.declaration.type){if(r=Wn(e.declaration,t),t.func(e.declaration.id.name,r),c=n.find(X)){var o=c.get();o&&"object"==typeof o&&(o[e.declaration.id.name]=r)}}else if("VariableDeclaration"===e.declaration.type&&(Tn(e.declaration,t),c=n.find(X))){var a=c.get();if(a&&"object"==typeof a)for(var s=0;s<e.declaration.declarations.length;s++){var l=e.declaration.declarations[s].id.name;(d=t.find(l))&&(a[l]=d.get())}}}else if(e.specifiers){var c;if(c=n.find(X)){var u=c.get();if(u&&"object"==typeof u)for(s=0;s<e.specifiers.length;s++){var d,h=e.specifiers[s],p="Identifier"===h.local.type?h.local.name:h.local.value;(d=t.find(p))&&(u["Identifier"===h.exported.type?h.exported.name:h.exported.value]=d.get())}}}}function zn(e,t){var n,r=t.global(),i=r.find(Y+e.source.value);if(i){var o=i.get();o&&("function"==typeof o?n=o():"object"==typeof o&&(n=o))}if(!n||"object"!=typeof n)throw new TypeError('Failed to resolve module specifier "'+e.source.value+'"');var a=r.find(X);if(a){var s=a.get();s&&"object"==typeof s&&E(s,n)}}function Mn(e,t,n){void 0===n&&(n={});for(var r=n.onlyBlock,i=void 0!==r&&r,o=[],a=[],s=0;s<e.body.length;s++){var l=e.body[s];"FunctionDeclaration"===l.type?(o.push(l),a.push(s)):"VariableDeclaration"===l.type&&-1!==["const","let"].indexOf(l.kind)?Tn(l,t,{hoist:!0,onlyBlock:!0}):i||Dn(l,t)}if(a.length){for(s=a.length-1;s>-1;s--)e.body.splice(a[s],1);e.body=o.concat(e.body)}}function Dn(e,t){switch(e.type){case"VariableDeclaration":Tn(e,t,{hoist:!0});break;case"ForInStatement":case"ForOfStatement":"VariableDeclaration"===e.left.type&&Tn(e.left,t,{hoist:!0});case"ForStatement":"ForStatement"===e.type&&"VariableDeclaration"===e.init.type&&Tn(e.init,t,{hoist:!0});case"WhileStatement":case"DoWhileStatement":Dn(e.body,t);break;case"IfStatement":Dn(e.consequent,t),e.alternate&&Dn(e.alternate,t);break;case"BlockStatement":for(var n=0;n<e.body.length;n++)Dn(e.body[n],t);break;case"SwitchStatement":for(n=0;n<e.cases.length;n++)for(var r=0;r<e.cases[n].consequent.length;r++)Dn(e.cases[n].consequent[r],t);break;case"TryStatement":var i=e.block.body;for(n=0;n<i.length;n++)Dn(i[n],t);var o=e.handler&&e.handler.body.body;if(o)for(n=0;n<o.length;n++)Dn(o[n],t);var a=e.finalizer&&e.finalizer.body;if(a)for(n=0;n<a.length;n++)Dn(a[n],t)}}function Bn(e,t,n){switch(void 0===n&&(n={}),e.type){case"ObjectPattern":return Yt(e,t,n);case"ArrayPattern":return Xt(e,t,n);case"RestElement":return Jt(e,t,n);case"AssignmentPattern":return Qt(e,t,n);default:throw new SyntaxError("Unexpected token")}}function Fn(e,t,n){var r;if(void 0===n&&(n={}),e.generator||e.async)return qn(e,t,n);var i=n.superClass,o=n.construct,a=e.params,s=function n(){for(var r=this&&this instanceof n?this.constructor:void 0,s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c,u=new ee(t,!0);"ArrowFunctionExpression"!==e.type&&(u.const("this",this),u.let("arguments",arguments),u.const(G,r),o&&o(this),i&&(u.const(W,i),o&&u.let(U,!1)));for(var d=0;d<a.length;d++){var h=a[d];"Identifier"===h.type?u.var(h.name,s[d]):"RestElement"===h.type?Jt(h,u,{kind:"var",feed:s.slice(d)}):Bn(h,u,{kind:"var",feed:s[d]})}if("BlockStatement"===e.body.type?(Mn(e.body,u),c=an(e.body,u,{invasived:!0,hoisted:!0})):(c=rn(e.body,u),"ArrowFunctionExpression"===e.type&&(D.RES=c,c=D)),c===D)return c.RES},l=s;"ArrowFunctionExpression"===e.type&&d(l,V,{value:!0}),d(l,"name",{value:e.id&&e.id.name||"",configurable:!0}),d(l,"length",{value:a.length,configurable:!0});var c=null===(r=e.loc)||void 0===r?void 0:r.source;return c&&d(l,"toString",{value:function(){return c.substring(e.start,e.end)},configurable:!0}),l}function Wn(e,t){for(var n=rn(e.superClass,t),r=e.body.body,i=function(e){for(var i=0;i<r.length;i++){var o=r[i];"PropertyDefinition"!==o.type||o.static||Ln(o,t,{klass:e,superClass:n})}},o=function(){i(this),n&&n.apply(this)},a=0;a<r.length;a++){var s=r[a];if("MethodDefinition"===s.type&&"constructor"===s.kind){o=Fn(s.value,t,{superClass:n,construct:i});break}}return n&&_(o,n),In(e.body,t,{klass:o,superClass:n}),d(o,H,{value:!0}),d(o,"name",{value:e.id&&e.id.name||"",configurable:!0}),o}function Un(e,t,n){var r=n.value,i=e.left,o=new ee(t);return"VariableDeclaration"===i.type?Tn(i,o,{feed:r}):"Identifier"===i.type?wt(i,t,{getVar:!0}).set(r):Bn(i,t,{feed:r}),"BlockStatement"===e.body.type?an(e.body,o,{invasived:!0}):rn(e.body,o)}function Vn(e,t,n){var r,i,o,l,c,u;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:r=n.onlyBlock,i=void 0!==r&&r,o=[],l=[],u=0,a.label=1;case 1:return u<e.body.length?"FunctionDeclaration"!==(c=e.body[u]).type?[3,2]:(o.push(c),l.push(u),[3,6]):[3,7];case 2:return"VariableDeclaration"!==c.type||-1===["const","let"].indexOf(c.kind)?[3,4]:[5,s(ct(c,t,{hoist:!0,onlyBlock:!0}))];case 3:return a.sent(),[3,6];case 4:return i?[3,6]:[5,s(Hn(c,t))];case 5:a.sent(),a.label=6;case 6:return u++,[3,1];case 7:if(l.length){for(u=l.length-1;u>-1;u--)e.body.splice(l[u],1);e.body=o.concat(e.body)}return[2]}})}function Hn(e,t){var n,r,i,o,l;return a(this,function(a){switch(a.label){case 0:switch(e.type){case"VariableDeclaration":return[3,1];case"ForInStatement":case"ForOfStatement":return[3,3];case"ForStatement":return[3,5];case"WhileStatement":case"DoWhileStatement":return[3,7];case"IfStatement":return[3,9];case"BlockStatement":return[3,13];case"SwitchStatement":return[3,18];case"TryStatement":return[3,25]}return[3,38];case 1:return[5,s(ct(e,t,{hoist:!0}))];case 2:return a.sent(),[3,38];case 3:return"VariableDeclaration"!==e.left.type?[3,5]:[5,s(ct(e.left,t,{hoist:!0}))];case 4:a.sent(),a.label=5;case 5:return"ForStatement"!==e.type||"VariableDeclaration"!==e.init.type?[3,7]:[5,s(ct(e.init,t,{hoist:!0}))];case 6:a.sent(),a.label=7;case 7:return[5,s(Hn(e.body,t))];case 8:return a.sent(),[3,38];case 9:return[5,s(Hn(e.consequent,t))];case 10:return a.sent(),e.alternate?[5,s(Hn(e.alternate,t))]:[3,12];case 11:a.sent(),a.label=12;case 12:return[3,38];case 13:l=0,a.label=14;case 14:return l<e.body.length?[5,s(Hn(e.body[l],t))]:[3,17];case 15:a.sent(),a.label=16;case 16:return l++,[3,14];case 17:return[3,38];case 18:l=0,a.label=19;case 19:if(!(l<e.cases.length))return[3,24];n=0,a.label=20;case 20:return n<e.cases[l].consequent.length?[5,s(Hn(e.cases[l].consequent[n],t))]:[3,23];case 21:a.sent(),a.label=22;case 22:return n++,[3,20];case 23:return l++,[3,19];case 24:return[3,38];case 25:r=e.block.body,l=0,a.label=26;case 26:return l<r.length?[5,s(Hn(r[l],t))]:[3,29];case 27:a.sent(),a.label=28;case 28:return l++,[3,26];case 29:if(!(i=e.handler&&e.handler.body.body))return[3,33];l=0,a.label=30;case 30:return l<i.length?[5,s(Hn(i[l],t))]:[3,33];case 31:a.sent(),a.label=32;case 32:return l++,[3,30];case 33:if(!(o=e.finalizer&&e.finalizer.body))return[3,37];l=0,a.label=34;case 34:return l<o.length?[5,s(Hn(o[l],t))]:[3,37];case 35:a.sent(),a.label=36;case 36:return l++,[3,34];case 37:return[3,38];case 38:return[2]}})}function Gn(e,t,n){return void 0===n&&(n={}),a(this,function(r){switch(r.label){case 0:switch(e.type){case"ObjectPattern":return[3,1];case"ArrayPattern":return[3,3];case"RestElement":return[3,5];case"AssignmentPattern":return[3,7]}return[3,9];case 1:return[5,s(Ne(e,t,n))];case 2:case 4:case 6:case 8:return[2,r.sent()];case 3:return[5,s(Oe(e,t,n))];case 5:return[5,s(je(e,t,n))];case 7:return[5,s(ze(e,t,n))];case 9:throw new SyntaxError("Unexpected token")}})}function qn(e,t,n){var r;if(void 0===n&&(n={}),!e.generator&&!e.async)return Fn(e,t,n);var i,o=n.superClass,l=n.construct,c=e.params,u=function n(){var r,i,u,d,h,p=this&&this instanceof n?this.constructor:void 0,f=[];for(r=0;r<arguments.length;r++)f[r]=arguments[r];return a(this,function(n){switch(n.label){case 0:return i=new ee(t,!0),"ArrowFunctionExpression"===e.type?[3,3]:(i.const("this",this),i.let("arguments",arguments),i.const(G,p),l?[5,s(l(this))]:[3,2]);case 1:n.sent(),n.label=2;case 2:o&&(i.const(W,o),l&&i.let(U,!1)),n.label=3;case 3:u=0,n.label=4;case 4:return u<c.length?"Identifier"!==(d=c[u]).type?[3,5]:(i.var(d.name,f[u]),[3,9]):[3,10];case 5:return"RestElement"!==d.type?[3,7]:[5,s(je(d,i,{kind:"var",feed:f.slice(u)}))];case 6:return n.sent(),[3,9];case 7:return[5,s(Gn(d,i,{kind:"var",feed:f[u]}))];case 8:n.sent(),n.label=9;case 9:return u++,[3,4];case 10:return"BlockStatement"!==e.body.type?[3,13]:[5,s(Vn(e.body,i))];case 11:return n.sent(),[5,s(Ve(e.body,i,{invasived:!0,hoisted:!0}))];case 12:return h=n.sent(),[3,15];case 13:return[5,s(We(e.body,i))];case 14:h=n.sent(),"ArrowFunctionExpression"===e.type&&(D.RES=h,h=D),n.label=15;case 15:return h===D?[2,h.RES]:[2]}})};i=e.async&&e.generator?function(){var e=u.apply(this,arguments),t=Promise.resolve(),n=!1,r=function(r){return t=t.then(function(){return te(e,E({fullRet:!0},r))}).catch(function(e){if(!n)return n=!0,Promise.reject(e)})},i={next:function(e){return r({res:e})},throw:function(e){return r({err:e})},return:function(e){return r({ret:e})}};return"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i}:e.async?function(){return te(u.apply(this,arguments))}:u,d(i,V,{value:!0}),d(i,"name",{value:e.id&&e.id.name||"",configurable:!0}),d(i,"length",{value:c.length,configurable:!0});var h=null===(r=e.loc)||void 0===r?void 0:r.source;return h&&d(i,"toString",{value:function(){return h.substring(e.start,e.end)},configurable:!0}),i}function Kn(e,t){var n,r,i,o,l,c;return a(this,function(u){switch(u.label){case 0:return[5,s(We(e.superClass,t))];case 1:for(n=u.sent(),r=e.body.body,i=function(e){var i,o;return a(this,function(a){switch(a.label){case 0:i=0,a.label=1;case 1:return i<r.length?"PropertyDefinition"!==(o=r[i]).type||o.static?[3,3]:[5,s(ft(o,t,{klass:e,superClass:n}))]:[3,4];case 2:a.sent(),a.label=3;case 3:return i++,[3,1];case 4:return[2]}})},o=function(){return a(this,function(e){switch(e.label){case 0:return[5,s(i(this))];case 1:return e.sent(),n&&n.apply(this),[2]}})},l=0;l<r.length;l++)if("MethodDefinition"===(c=r[l]).type&&"constructor"===c.kind){o=qn(c.value,t,{superClass:n,construct:i});break}return n&&_(o,n),[5,s(ht(e.body,t,{klass:o,superClass:n}))];case 2:return u.sent(),d(o,H,{value:!0}),d(o,"name",{value:e.id&&e.id.name||"",configurable:!0}),[2,o]}})}function $n(e,t,n){var r,i,o,l;return a(this,function(a){switch(a.label){case 0:return r=n.value,i=e.left,o=new ee(t),"VariableDeclaration"!==i.type?[3,2]:[5,s(ct(i,o,{feed:r}))];case 1:return a.sent(),[3,6];case 2:return"Identifier"!==i.type?[3,4]:[5,s(wt(i,t,{getVar:!0}))];case 3:return a.sent().set(r),[3,6];case 4:return[5,s(Gn(i,t,{feed:r}))];case 5:a.sent(),a.label=6;case 6:return"BlockStatement"!==e.body.type?[3,8]:[5,s(Ve(e.body,o,{invasived:!0}))];case 7:return l=a.sent(),[3,10];case 8:return[5,s(We(e.body,o))];case 9:l=a.sent(),a.label=10;case 10:return[2,l]}})}var Yn=15;return function(){function t(e){void 0===e&&(e={}),this.options={ecmaVersion:"latest"},this.scope=new ee(null,!0),this.exports={};var t=e.ecmaVer,n=void 0===t?"latest":t,r=e.sandBox,i=void 0===r||r,o=e.sourceType,a=void 0===o?"script":o;if("number"==typeof n&&(n-=n<2015?0:2009),"latest"!==n&&3!==n&&(n<5||n>Yn))throw new Error("unsupported ecmaVer");if(this.options.ecmaVersion=n,this.options.sourceType=a,i){var s=O();this.scope.let("globalThis",s),this.scope.let("window",s),this.scope.let("this",s)}else this.scope.let("globalThis",I),this.scope.let("window",I),this.scope.let("this",I);this.scope.const("module"===a?X:"exports",this.exports={})}return t.prototype.import=function(e,t){var n;if("string"==typeof e&&((n={})[e]=t,e=n),"object"==typeof e)for(var r=g(e),i=0;i<r.length;i++){var o=r[i],a="module"===this.options.sourceType?Y+o:o;this.scope.var(a,e[o])}},t.prototype.parse=function(t,n){return"function"==typeof n?n(t,E({},this.options)):e.parse(t,this.options)},t.prototype.run=function(e){var t="string"==typeof e?this.parse(e):e,n=this.scope;"module"===this.options.sourceType&&("latest"===this.options.ecmaVersion||this.options.ecmaVersion>=13)?te(function(){return a(this,function(e){switch(e.label){case 0:return[5,s(Vn(t,n))];case 1:return e.sent(),[5,s(We(t,n))];case 2:return e.sent(),[2]}})}()):(Mn(t,n),rn(t,n))},t.version=J,t}()}(n(8202))},7046(e,t,n){"use strict";n.d(t,{A:()=>r});const r={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"}},7183(e,t,n){"use strict";n.d(t,{Ay:()=>s});var r=n(2791),i=n(1210),o=n(5863),a=n(4539);const s=(0,r.Ay)({themeId:o.A,defaultTheme:i.A,rootShouldForwardProp:a.A})},7197(e,t,n){"use strict";var r=n(8898);t.X4=p,t.e$=f,t.tL=m,t.eM=function(e,t){const n=h(e),r=h(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.a=g;var i=r(n(288)),o=r(n(8442));function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,o.default)(e,t,n)}function s(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", "),")"):""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(s(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,i.default)(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,i.default)(10,r))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:n,values:o,colorSpace:r}}const c=e=>{const t=l(e);return t.values.slice(0,3).map((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?"".concat(e,"%"):e).join(" ")};function u(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function d(e){e=l(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)};let s="rgb";const c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",c.push(t[3])),u({type:s,values:c})}function h(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(d(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function p(e,t){return e=l(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,u(e)}function f(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return u(e)}function g(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return u(e)}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return h(e)>.5?f(e,t):g(e,t)}},7451(e,t,n){"use strict";n.d(t,{A:()=>r});const r={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"}},7458(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(1446)},7461(e,t,n){"use strict";var r;n.d(t,{A:()=>s});var i=n(8661);let o=0;const a=(r||(r=n.t(i,2)))["useId".toString()];function s(e){if(void 0!==a){const t=a();return null!=e?e:t}return function(e){const[t,n]=i.useState(e),r=e||t;return i.useEffect(()=>{null==t&&(o+=1,n("mui-".concat(o)))},[t]),r}(e)}},7599(e,t,n){"use strict";n.d(t,{A:()=>i});const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},7601(e,t,n){"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},7782(e,t,n){"use strict";n.d(t,{Ay:()=>u});var r=n(8915),i=n(4320);const o=["duration","easing","delay"],a={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)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return"".concat(Math.round(e),"ms")}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function u(e){const t=(0,i.A)({},a,e.easing),n=(0,i.A)({},s,e.duration);return(0,i.A)({getAutoHeightDuration:c,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:a=n.standard,easing:s=t.easeInOut,delay:c=0}=i;(0,r.A)(i,o);return(Array.isArray(e)?e:[e]).map(e=>"".concat(e," ").concat("string"==typeof a?a:l(a)," ").concat(s," ").concat("string"==typeof c?c:l(c))).join(",")}},e,{easing:t,duration:n})}},7811(e,t,n){"use strict";var r=n(8661),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:s.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},7830(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(4849).A},7997(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8661);const i=[];function o(e){r.useEffect(e,i)}},8193(e,t,n){"use strict";n.d(t,{A:()=>r});const r={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"}},8201(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.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")},8202(e,t){!function(e){"use strict";var t=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],n=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],r="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",i="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",o={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},a="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",s={5:a,"5module":a+" export import",6:a+" const class extends export import super"},l=/^in(stanceof)?$/,c=new RegExp("["+i+"]"),u=new RegExp("["+i+r+"]");function d(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}return!1}function h(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&c.test(String.fromCharCode(e)):!1!==t&&d(e,n)))}function p(e,r){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&u.test(String.fromCharCode(e)):!1!==r&&(d(e,n)||d(e,t)))))}var f=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function g(e,t){return new f(e,{beforeExpr:!0,binop:t})}var m={beforeExpr:!0},v={startsExpr:!0},y={};function b(e,t){return void 0===t&&(t={}),t.keyword=e,y[e]=new f(e,t)}var w={num:new f("num",v),regexp:new f("regexp",v),string:new f("string",v),name:new f("name",v),privateId:new f("privateId",v),eof:new f("eof"),bracketL:new f("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new f("]"),braceL:new f("{",{beforeExpr:!0,startsExpr:!0}),braceR:new f("}"),parenL:new f("(",{beforeExpr:!0,startsExpr:!0}),parenR:new f(")"),comma:new f(",",m),semi:new f(";",m),colon:new f(":",m),dot:new f("."),question:new f("?",m),questionDot:new f("?."),arrow:new f("=>",m),template:new f("template"),invalidTemplate:new f("invalidTemplate"),ellipsis:new f("...",m),backQuote:new f("`",v),dollarBraceL:new f("${",{beforeExpr:!0,startsExpr:!0}),eq:new f("=",{beforeExpr:!0,isAssign:!0}),assign:new f("_=",{beforeExpr:!0,isAssign:!0}),incDec:new f("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new f("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:g("||",1),logicalAND:g("&&",2),bitwiseOR:g("|",3),bitwiseXOR:g("^",4),bitwiseAND:g("&",5),equality:g("==/!=/===/!==",6),relational:g("</>/<=/>=",7),bitShift:g("<</>>/>>>",8),plusMin:new f("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:g("%",10),star:g("*",10),slash:g("/",10),starstar:new f("**",{beforeExpr:!0}),coalesce:g("??",1),_break:b("break"),_case:b("case",m),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",m),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",m),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",v),_if:b("if"),_return:b("return",m),_switch:b("switch"),_throw:b("throw",m),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",v),_super:b("super",v),_class:b("class",v),_extends:b("extends",m),_export:b("export"),_import:b("import",v),_null:b("null",v),_true:b("true",v),_false:b("false",v),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},x=/\r\n?|\n|\u2028|\u2029/,A=new RegExp(x.source,"g");function S(e){return 10===e||13===e||8232===e||8233===e}function k(e,t,n){void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(S(i))return r<n-1&&13===i&&10===e.charCodeAt(r+1)?r+2:r+1}return-1}var _=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,T=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,E=Object.prototype,C=E.hasOwnProperty,I=E.toString,P=Object.hasOwn||function(e,t){return C.call(e,t)},L=Array.isArray||function(e){return"[object Array]"===I.call(e)},R=Object.create(null);function N(e){return R[e]||(R[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function O(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var j=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,z=function(e,t){this.line=e,this.column=t};z.prototype.offset=function(e){return new z(this.line,this.column+e)};var M=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function D(e,t){for(var n=1,r=0;;){var i=k(e,r,t);if(i<0)return new z(n,t-r);++n,r=i}}var B={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},F=!1;function W(e){var t={};for(var n in B)t[n]=e&&P(e,n)?e[n]:B[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!F&&"object"==typeof console&&console.warn&&(F=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),L(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return L(t.onComment)&&(t.onComment=U(t,t.onComment)),t}function U(e,t){return function(n,r,i,o,a,s){var l={type:n?"Block":"Line",value:r,start:i,end:o};e.locations&&(l.loc=new M(this,a,s)),e.ranges&&(l.range=[i,o]),t.push(l)}}var V=1,H=2,G=4,q=8,K=16,$=32,Y=64,X=128,J=256,Q=512,Z=V|H|J;function ee(e,t){return H|(e?G:0)|(t?q:0)}var te=0,ne=1,re=2,ie=3,oe=4,ae=5,se=function(e,t,n){this.options=e=W(e),this.sourceFile=e.sourceFile,this.keywords=N(s[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=o[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=N(r);var i=(r?r+" ":"")+o.strict;this.reservedWordsStrict=N(i),this.reservedWordsStrictBind=N(i+" "+o.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(x).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=w.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(V),this.regexpState=null,this.privateNameStack=[]},le={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};se.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},le.inFunction.get=function(){return(this.currentVarScope().flags&H)>0},le.inGenerator.get=function(){return(this.currentVarScope().flags&q)>0},le.inAsync.get=function(){return(this.currentVarScope().flags&G)>0},le.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(J|Q))return!1;if(t&H)return(t&G)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},le.allowSuper.get=function(){return(this.currentThisScope().flags&Y)>0||this.options.allowSuperOutsideMethod},le.allowDirectSuper.get=function(){return(this.currentThisScope().flags&X)>0},le.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},le.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(J|Q)||t&H&&!(t&K))return!0}return!1},le.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&J)>0},se.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},se.parse=function(e,t){return new this(t,e).parse()},se.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},se.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(se.prototype,le);var ce=se.prototype,ue=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ce.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){T.lastIndex=e,e+=T.exec(this.input)[0].length;var t=ue.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){T.lastIndex=e+t[0].length;var n=T.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return";"===i||"}"===i||x.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}e+=t[0].length,T.lastIndex=e,e+=T.exec(this.input)[0].length,";"===this.input[e]&&e++}},ce.eat=function(e){return this.type===e&&(this.next(),!0)},ce.isContextual=function(e){return this.type===w.name&&this.value===e&&!this.containsEsc},ce.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},ce.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},ce.canInsertSemicolon=function(){return this.type===w.eof||this.type===w.braceR||x.test(this.input.slice(this.lastTokEnd,this.start))},ce.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ce.semicolon=function(){this.eat(w.semi)||this.insertSemicolon()||this.unexpected()},ce.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},ce.expect=function(e){this.eat(e)||this.unexpected()},ce.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var de=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ce.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},ce.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},ce.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},ce.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var he=se.prototype;he.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==w.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var o=i[r];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var pe={kind:"loop"},fe={kind:"switch"};he.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;T.lastIndex=this.pos;var t=T.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r||92===r)return!0;if(e)return!1;if(123===r||r>55295&&r<56320)return!0;if(h(r,!0)){for(var i=n+1;p(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var o=this.input.slice(n,i);if(!l.test(o))return!0}return!1},he.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;T.lastIndex=this.pos;var e,t=T.exec(this.input),n=this.pos+t[0].length;return!(x.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(p(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},he.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;T.lastIndex=this.pos;var n=T.exec(this.input),r=this.pos+n[0].length;if(x.test(this.input.slice(this.pos,r)))return!1;if(e){var i,o=r+5;if("using"!==this.input.slice(r,o)||o===this.input.length||p(i=this.input.charCodeAt(o))||i>55295&&i<56320)return!1;T.lastIndex=o;var a=T.exec(this.input);if(a&&x.test(this.input.slice(o,o+a[0].length)))return!1}if(t){var s,l=r+2;if(!("of"!==this.input.slice(r,l)||l!==this.input.length&&(p(s=this.input.charCodeAt(l))||s>55295&&s<56320)))return!1}var c=this.input.charCodeAt(r);return h(c,!0)||92===c},he.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},he.isUsing=function(e){return this.isUsingKeyword(!1,e)},he.parseStatement=function(e,t,n){var r,i=this.type,o=this.startNode();switch(this.isLet(e)&&(i=w._var,r="let"),i){case w._break:case w._continue:return this.parseBreakContinueStatement(o,i.keyword);case w._debugger:return this.parseDebuggerStatement(o);case w._do:return this.parseDoStatement(o);case w._for:return this.parseForStatement(o);case w._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(o,!1,!e);case w._class:return e&&this.unexpected(),this.parseClass(o,!0);case w._if:return this.parseIfStatement(o);case w._return:return this.parseReturnStatement(o);case w._switch:return this.parseSwitchStatement(o);case w._throw:return this.parseThrowStatement(o);case w._try:return this.parseTryStatement(o);case w._const:case w._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(o,r);case w._while:return this.parseWhileStatement(o);case w._with:return this.parseWithStatement(o);case w.braceL:return this.parseBlock(!0,o);case w.semi:return this.parseEmptyStatement(o);case w._export:case w._import:if(this.options.ecmaVersion>10&&i===w._import){T.lastIndex=this.pos;var a=T.exec(this.input),s=this.pos+a[0].length,l=this.input.charCodeAt(s);if(40===l||46===l)return this.parseExpressionStatement(o,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===w._import?this.parseImport(o):this.parseExport(o,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(o,!0,!e);var c=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(c)return t&&"script"===this.options.sourceType&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),"await using"===c&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(o,!1,c),this.semicolon(),this.finishNode(o,"VariableDeclaration");var u=this.value,d=this.parseExpression();return i===w.name&&"Identifier"===d.type&&this.eat(w.colon)?this.parseLabeledStatement(o,u,d,e):this.parseExpressionStatement(o,d)}},he.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(w.semi)||this.insertSemicolon()?e.label=null:this.type!==w.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},he.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},he.parseDoStatement=function(e){return this.next(),this.labels.push(pe),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(w._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(w.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},he.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(pe),this.enterScope(0),this.expect(w.parenL),this.type===w.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===w._var||this.type===w._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var o=this.isContextual("let"),a=!1,s=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(s){var l=this.startNode();return this.next(),"await using"===s&&this.next(),this.parseVar(l,!0,s),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var c=this.containsEsc,u=new de,d=this.start,h=t>-1?this.parseExprSubscripts(u,"await"):this.parseExpression(!0,u);return this.type===w._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===w._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(h.start!==d||c||"Identifier"!==h.type||"async"!==h.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),o&&a&&this.raise(h.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(h,!1,u),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))},he.parseForAfterInit=function(e,t,n){return(this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===w._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},he.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,me|(n?0:ve),!1,t)},he.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(w._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},he.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(w.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},he.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(w.braceL),this.labels.push(fe),this.enterScope(0);for(var n=!1;this.type!==w.braceR;)if(this.type===w._case||this.type===w._default){var r=this.type===w._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(w.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},he.parseThrowStatement=function(e){return this.next(),x.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ge=[];he.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?$:0),this.checkLValPattern(e,t?oe:re),this.expect(w.parenR),e},he.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===w._catch){var t=this.startNode();this.next(),this.eat(w.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(w._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},he.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},he.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(pe),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},he.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},he.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},he.parseLabeledStatement=function(e,t,n,r){for(var i=0,o=this.labels;i<o.length;i+=1)o[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var a=this.type.isLoop?"loop":this.type===w._switch?"switch":null,s=this.labels.length-1;s>=0;s--){var l=this.labels[s];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=a}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},he.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},he.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(w.braceL),e&&this.enterScope(0);this.type!==w.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},he.parseFor=function(e,t){return e.init=t,this.expect(w.semi),e.test=this.type===w.semi?null:this.parseExpression(),this.expect(w.semi),e.update=this.type===w.parenR?null:this.parseExpression(),this.expect(w.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},he.parseForIn=function(e,t){var n=this.type===w._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(w.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},he.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(w.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===w._in||this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===w._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(w.comma))break}return e},he.parseVarId=function(e,t){e.id="using"===t||"await using"===t?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?ne:re,!1)};var me=1,ve=2,ye=4;function be(e,t){var n=t.key.name,r=e[n],i="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(i=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===i||"iset"===r&&"iget"===i||"sget"===r&&"sset"===i||"sset"===r&&"sget"===i?(e[n]="true",!1):!!r||(e[n]=i,!1)}function we(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}he.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===w.star&&t&ve&&this.unexpected(),e.generator=this.eat(w.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&me&&(e.id=t&ye&&this.type!==w.name?null:this.parseIdent(),!e.id||t&ve||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?ne:re:ie));var o=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ee(e.async,e.generator)),t&me||(e.id=this.type===w.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=o,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,t&me?"FunctionDeclaration":"FunctionExpression")},he.parseFunctionParams=function(e){this.expect(w.parenL),e.params=this.parseBindingList(w.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},he.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),o=!1;for(i.body=[],this.expect(w.braceL);this.type!==w.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(i.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(o&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),o=!0):a.key&&"PrivateIdentifier"===a.key.type&&be(r,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},he.parseClassElement=function(e){if(this.eat(w.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,o=!1,a="method",s=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(w.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===w.star?s=!0:r="static"}if(n.static=s,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==w.star||this.canInsertSemicolon()?r="async":o=!0),!r&&(t>=9||!o)&&this.eat(w.star)&&(i=!0),!r&&!o&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===w.parenL||"method"!==a||i||o){var c=!n.static&&we(n,"constructor"),u=c&&e;c&&"method"!==a&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":a,this.parseClassMethod(n,i,o,u)}else this.parseClassField(n);return n},he.isClassElementNameStart=function(){return this.type===w.name||this.type===w.privateId||this.type===w.num||this.type===w.string||this.type===w.bracketL||this.type.keyword},he.parseClassElementName=function(e){this.type===w.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},he.parseClassMethod=function(e,t,n,r){var i=e.key;"constructor"===e.kind?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&we(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var o=e.value=this.parseMethod(t,n,r);return"get"===e.kind&&0!==o.params.length&&this.raiseRecoverable(o.start,"getter should have no params"),"set"===e.kind&&1!==o.params.length&&this.raiseRecoverable(o.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===o.params[0].type&&this.raiseRecoverable(o.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},he.parseClassField=function(e){return we(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&we(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(w.eq)?(this.enterScope(Q|Y),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},he.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(J|Y);this.type!==w.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},he.parseClassId=function(e,t){this.type===w.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,re,!1)):(!0===t&&this.unexpected(),e.id=null)},he.parseClassSuper=function(e){e.superClass=this.eat(w._extends)?this.parseExprSubscripts(null,!1):null},he.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},he.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=0===r?null:this.privateNameStack[r-1],o=0;o<n.length;++o){var a=n[o];P(t,a.name)||(i?i.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},he.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==w.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},he.parseExport=function(e,t){if(this.next(),this.eat(w.star))return this.parseExportAllDeclaration(e,t);if(this.eat(w._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==w.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),"Literal"===i.local.type&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},he.parseExportDeclaration=function(e){return this.parseStatement(null)},he.parseExportDefaultDeclaration=function(){var e;if(this.type===w._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,me|ye,!1,e)}if(this.type===w._class){var n=this.startNode();return this.parseClass(n,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},he.checkExport=function(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),P(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},he.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var o=i[r];this.checkPatternExport(e,o)}else if("ArrayPattern"===n)for(var a=0,s=t.elements;a<s.length;a+=1){var l=s[a];l&&this.checkPatternExport(e,l)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n&&this.checkPatternExport(e,t.argument)},he.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},he.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},he.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},he.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(w.braceL);!this.eat(w.braceR);){if(n)n=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;t.push(this.parseExportSpecifier(e))}return t},he.parseImport=function(e){return this.next(),this.type===w.string?(e.specifiers=ge,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===w.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},he.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,re),this.finishNode(e,"ImportSpecifier")},he.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,re),this.finishNode(e,"ImportDefaultSpecifier")},he.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,re),this.finishNode(e,"ImportNamespaceSpecifier")},he.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===w.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(w.comma)))return e;if(this.type===w.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(w.braceL);!this.eat(w.braceR);){if(t)t=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;e.push(this.parseImportSpecifier())}return e},he.parseWithClause=function(){var e=[];if(!this.eat(w._with))return e;this.expect(w.braceL);for(var t={},n=!0;!this.eat(w.braceR);){if(n)n=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;var r=this.parseImportAttribute(),i="Identifier"===r.key.type?r.key.name:r.key.value;P(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e},he.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===w.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(w.colon),this.type!==w.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},he.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===w.string){var e=this.parseLiteral(this.value);return j.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},he.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},he.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var xe=se.prototype;xe.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];this.toAssignable(o,t),"RestElement"!==o.type||"ArrayPattern"!==o.argument.type&&"ObjectPattern"!==o.argument.type||this.raise(o.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},xe.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var o=e[n-1];6===this.options.ecmaVersion&&t&&o&&"RestElement"===o.type&&"Identifier"!==o.argument.type&&this.unexpected(o.argument.start)}return e},xe.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},xe.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==w.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},xe.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case w.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(w.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case w.braceL:return this.parseObj(!0)}return this.parseIdent()},xe.parseBindingList=function(e,t,n,r){for(var i=[],o=!0;!this.eat(e);)if(o?o=!1:this.expect(w.comma),t&&this.type===w.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===w.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),i.push(a),this.type===w.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}i.push(this.parseAssignableListItem(r))}return i},xe.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},xe.parseBindingListItem=function(e){return e},xe.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(w.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},xe.checkLValSimple=function(e,t,n){void 0===t&&(t=te);var r=t!==te;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(t===re&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(P(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t!==ae&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},xe.checkLValPattern=function(e,t,n){switch(void 0===t&&(t=te),e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,t,n)}break;case"ArrayPattern":for(var a=0,s=e.elements;a<s.length;a+=1){var l=s[a];l&&this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}},xe.checkLValInnerPattern=function(e,t,n){switch(void 0===t&&(t=te),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Ae=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},Se={b_stat:new Ae("{",!1),b_expr:new Ae("{",!0),b_tmpl:new Ae("${",!1),p_stat:new Ae("(",!1),p_expr:new Ae("(",!0),q_tmpl:new Ae("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Ae("function",!1),f_expr:new Ae("function",!0),f_expr_gen:new Ae("function",!0,!1,null,!0),f_gen:new Ae("function",!1,!1,null,!0)},ke=se.prototype;ke.initialContext=function(){return[Se.b_stat]},ke.curContext=function(){return this.context[this.context.length-1]},ke.braceIsBlock=function(e){var t=this.curContext();return t===Se.f_expr||t===Se.f_stat||(e!==w.colon||t!==Se.b_stat&&t!==Se.b_expr?e===w._return||e===w.name&&this.exprAllowed?x.test(this.input.slice(this.lastTokEnd,this.start)):e===w._else||e===w.semi||e===w.eof||e===w.parenR||e===w.arrow||(e===w.braceL?t===Se.b_stat:e!==w._var&&e!==w._const&&e!==w.name&&!this.exprAllowed):!t.isExpr)},ke.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ke.updateContext=function(e){var t,n=this.type;n.keyword&&e===w.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},ke.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},w.parenR.updateContext=w.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===Se.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},w.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Se.b_stat:Se.b_expr),this.exprAllowed=!0},w.dollarBraceL.updateContext=function(){this.context.push(Se.b_tmpl),this.exprAllowed=!0},w.parenL.updateContext=function(e){var t=e===w._if||e===w._for||e===w._with||e===w._while;this.context.push(t?Se.p_stat:Se.p_expr),this.exprAllowed=!0},w.incDec.updateContext=function(){},w._function.updateContext=w._class.updateContext=function(e){!e.beforeExpr||e===w._else||e===w.semi&&this.curContext()!==Se.p_stat||e===w._return&&x.test(this.input.slice(this.lastTokEnd,this.start))||(e===w.colon||e===w.braceL)&&this.curContext()===Se.b_stat?this.context.push(Se.f_stat):this.context.push(Se.f_expr),this.exprAllowed=!1},w.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},w.backQuote.updateContext=function(){this.curContext()===Se.q_tmpl?this.context.pop():this.context.push(Se.q_tmpl),this.exprAllowed=!1},w.star.updateContext=function(e){if(e===w._function){var t=this.context.length-1;this.context[t]===Se.f_expr?this.context[t]=Se.f_expr_gen:this.context[t]=Se.f_gen}this.exprAllowed=!0},w.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==w.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var _e=se.prototype;function Te(e){return"Identifier"===e.type||"ParenthesizedExpression"===e.type&&Te(e.expression)}function Ee(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&Ee(e.expression)||"ParenthesizedExpression"===e.type&&Ee(e.expression)}_e.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var o=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===o&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var a=t[r="$"+r];a?("init"===o?this.strict&&a.init||a.get||a.set:a.init||a[o])&&this.raiseRecoverable(i.start,"Redefinition of property"):a=t[r]={init:!1,get:!1,set:!1},a[o]=!0}}},_e.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===w.comma){var o=this.startNodeAt(n,r);for(o.expressions=[i];this.eat(w.comma);)o.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return i},_e.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,o=-1,a=-1;t?(i=t.parenthesizedAssign,o=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new de,r=!0);var s=this.start,l=this.startLoc;this.type!==w.parenL&&this.type!==w.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var c=this.parseMaybeConditional(e,t);if(n&&(c=n.call(this,c,s,l)),this.type.isAssign){var u=this.startNodeAt(s,l);return u.operator=this.value,this.type===w.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===w.eq?this.checkLValPattern(c):this.checkLValSimple(c),u.left=c,this.next(),u.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(u,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),o>-1&&(t.trailingComma=o),c},_e.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(w.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(w.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i},_e.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},_e.parseExprOp=function(e,t,n,r,i){var o=this.type.binop;if(null!=o&&(!i||this.type!==w._in)&&o>r){var a=this.type===w.logicalOR||this.type===w.logicalAND,s=this.type===w.coalesce;s&&(o=w.logicalAND.binop);var l=this.value;this.next();var c=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),c,u,o,i),h=this.buildBinary(t,n,e,d,l,a||s);return(a&&this.type===w.coalesce||s&&(this.type===w.logicalOR||this.type===w.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(h,t,n,r,i)}return e},_e.buildBinary=function(e,t,n,r,i,o){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=n,a.operator=i,a.right=r,this.finishNode(a,o?"LogicalExpression":"BinaryExpression")},_e.parseMaybeUnary=function(e,t,n,r){var i,o=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)i=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),l=this.type===w.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(s.argument):this.strict&&"delete"===s.operator&&Te(s.argument)?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):"delete"===s.operator&&Ee(s.argument)?this.raiseRecoverable(s.start,"Private fields can not be deleted"):t=!0,i=this.finishNode(s,l?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==w.privateId){if(i=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(o,a);c.operator=this.value,c.prefix=!1,c.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(c,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),i=this.parsePrivateIdent(),this.type!==w._in&&this.unexpected();return n||!this.eat(w.starstar)?i:t?void this.unexpected(this.lastTokStart):this.buildBinary(o,a,i,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},_e.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return i;var o=this.parseSubscripts(i,n,r,!1,t);return e&&"MemberExpression"===o.type&&(e.parenthesizedAssign>=o.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=o.start&&(e.parenthesizedBind=-1),e.trailingComma>=o.start&&(e.trailingComma=-1)),o},_e.parseSubscripts=function(e,t,n,r,i){for(var o=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;;){var s=this.parseSubscript(e,t,n,r,o,a,i);if(s.optional&&(a=!0),s===e||"ArrowFunctionExpression"===s.type){if(a){var l=this.startNodeAt(t,n);l.expression=s,s=this.finishNode(l,"ChainExpression")}return s}e=s}},_e.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(w.arrow)},_e.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},_e.parseSubscript=function(e,t,n,r,i,o,a){var s=this.options.ecmaVersion>=11,l=s&&this.eat(w.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(w.bracketL);if(c||l&&this.type!==w.parenL&&this.type!==w.backQuote||this.eat(w.dot)){var u=this.startNodeAt(t,n);u.object=e,c?(u.property=this.parseExpression(),this.expect(w.bracketR)):this.type===w.privateId&&"Super"!==e.type?u.property=this.parsePrivateIdent():u.property=this.parseIdent("never"!==this.options.allowReserved),u.computed=!!c,s&&(u.optional=l),e=this.finishNode(u,"MemberExpression")}else if(!r&&this.eat(w.parenL)){var d=new de,h=this.yieldPos,p=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var g=this.parseExprList(w.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=p,this.awaitIdentPos=f,this.parseSubscriptAsyncArrow(t,n,g,a);this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var m=this.startNodeAt(t,n);m.callee=e,m.arguments=g,s&&(m.optional=l),e=this.finishNode(m,"CallExpression")}else if(this.type===w.backQuote){(l||o)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var v=this.startNodeAt(t,n);v.tag=e,v.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(v,"TaggedTemplateExpression")}return e},_e.parseExprAtom=function(e,t,n){this.type===w.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case w._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==w.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==w.dot&&this.type!==w.bracketL&&this.type!==w.parenL&&this.unexpected(),this.finishNode(r,"Super");case w._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case w.name:var o=this.start,a=this.startLoc,s=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(w._function))return this.overrideContext(Se.f_expr),this.parseFunction(this.startNodeAt(o,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(w.arrow))return this.parseArrowExpression(this.startNodeAt(o,a),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===w.name&&!s&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(w.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(o,a),[l],!0,t)}return l;case w.regexp:var c=this.value;return(r=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},r;case w.num:case w.string:return this.parseLiteral(this.value);case w._null:case w._true:case w._false:return(r=this.startNode()).value=this.type===w._null?null:this.type===w._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case w.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case w.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(w.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case w.braceL:return this.overrideContext(Se.b_expr),this.parseObj(!1,e);case w._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case w._class:return this.parseClass(this.startNode(),!1);case w._new:return this.parseNew();case w.backQuote:return this.parseTemplate();case w._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},_e.parseExprAtomDefault=function(){this.unexpected()},_e.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===w.parenL&&!e)return this.parseDynamicImport(t);if(this.type===w.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}this.unexpected()},_e.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(w.parenR)?e.options=null:(this.expect(w.comma),this.afterTrailingComma(w.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(w.parenR)||(this.expect(w.comma),this.afterTrailingComma(w.parenR)||this.unexpected())));else if(!this.eat(w.parenR)){var t=this.start;this.eat(w.comma)&&this.eat(w.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},_e.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},_e.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=null!=t.value?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},_e.parseParenExpression=function(){this.expect(w.parenL);var e=this.parseExpression();return this.expect(w.parenR),e},_e.shouldParseArrow=function(e){return!this.canInsertSemicolon()},_e.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,i=this.startLoc,o=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,s=this.start,l=this.startLoc,c=[],u=!0,d=!1,h=new de,p=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==w.parenR;){if(u?u=!1:this.expect(w.comma),o&&this.afterTrailingComma(w.parenR,!0)){d=!0;break}if(this.type===w.ellipsis){a=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===w.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var g=this.lastTokEnd,m=this.lastTokEndLoc;if(this.expect(w.parenR),e&&this.shouldParseArrow(c)&&this.eat(w.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=f,this.parseParenArrowList(r,i,c,t);c.length&&!d||this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=f||this.awaitPos,c.length>1?((n=this.startNodeAt(s,l)).expressions=c,this.finishNodeAt(n,"SequenceExpression",g,m)):n=c[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(r,i);return v.expression=n,this.finishNode(v,"ParenthesizedExpression")}return n},_e.parseParenItem=function(e){return e},_e.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Ce=[];_e.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===w.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(w.parenL)?e.arguments=this.parseExprList(w.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Ce,this.finishNode(e,"NewExpression")},_e.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===w.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===w.backQuote,this.finishNode(n,"TemplateElement")},_e.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===w.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(w.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(w.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},_e.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===w.name||this.type===w.num||this.type===w.string||this.type===w.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===w.star)&&!x.test(this.input.slice(this.lastTokEnd,this.start))},_e.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(w.braceR);){if(r)r=!1;else if(this.expect(w.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(w.braceR))break;var o=this.parseProperty(e,t);e||this.checkPropClash(o,i,t),n.properties.push(o)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},_e.parseProperty=function(e,t){var n,r,i,o,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(w.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===w.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(a.argument=this.parseMaybeAssign(!1,t),this.type===w.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(e||t)&&(i=this.start,o=this.startLoc),e||(n=this.eat(w.star)));var s=this.containsEsc;return this.parsePropertyName(a),!e&&!s&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(a)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(w.star),this.parsePropertyName(a)):r=!1,this.parsePropertyValue(a,e,n,r,i,o,t,s),this.finishNode(a,"Property")},_e.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n="get"===e.kind?0:1;if(e.value.params.length!==n){var r=e.value.start;"get"===e.kind?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},_e.parsePropertyValue=function(e,t,n,r,i,o,a,s){(n||r)&&this.type===w.colon&&this.unexpected(),this.eat(w.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===w.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):t||s||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===w.comma||this.type===w.braceR||this.type===w.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key)):this.type===w.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected():((n||r)&&this.unexpected(),this.parseGetterSetter(e))},_e.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(w.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(w.bracketR),e.key;e.computed=!1}return e.key=this.type===w.num||this.type===w.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},_e.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},_e.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ee(t,r.generator)|Y|(n?X:0)),this.expect(w.parenL),r.params=this.parseBindingList(w.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")},_e.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(ee(n,!1)|K),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")},_e.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==w.braceL,o=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);o&&!s||(a=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!o&&!a&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,ae),e.body=this.parseBlock(!1,void 0,a&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},_e.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if("Identifier"!==n[t].type)return!1;return!0},_e.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,ne,t?null:n)}},_e.parseExprList=function(e,t,n,r){for(var i=[],o=!0;!this.eat(e);){if(o)o=!1;else if(this.expect(w.comma),t&&this.afterTrailingComma(e))break;var a=void 0;n&&this.type===w.comma?a=null:this.type===w.ellipsis?(a=this.parseSpread(r),r&&this.type===w.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):a=this.parseMaybeAssign(!1,r),i.push(a)}return i},_e.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&Z||"arguments"!==r||this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},_e.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),"await"!==t.name||this.awaitIdentPos||(this.awaitIdentPos=t.start)),t},_e.parseIdentNode=function(){var e=this.startNode();return this.type===w.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,"class"!==e.name&&"function"!==e.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=w.name):this.unexpected(),e},_e.parsePrivateIdent=function(){var e=this.startNode();return this.type===w.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},_e.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===w.semi||this.canInsertSemicolon()||this.type!==w.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(w.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},_e.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Ie=se.prototype;Ie.raise=function(e,t){var n=D(this.input,e);t+=" ("+n.line+":"+n.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},Ie.raiseRecoverable=Ie.raise,Ie.curPosition=function(){if(this.options.locations)return new z(this.curLine,this.pos-this.lineStart)};var Pe=se.prototype,Le=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Pe.enterScope=function(e){this.scopeStack.push(new Le(e))},Pe.exitScope=function(){this.scopeStack.pop()},Pe.treatFunctionsAsVarInScope=function(e){return e.flags&H||!this.inModule&&e.flags&V},Pe.declareName=function(e,t,n){var r=!1;if(t===re){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&V&&delete this.undefinedExports[e]}else if(t===oe)this.currentScope().lexical.push(e);else if(t===ie){var o=this.currentScope();r=this.treatFunctionsAsVar?o.lexical.indexOf(e)>-1:o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var s=this.scopeStack[a];if(s.lexical.indexOf(e)>-1&&!(s.flags&$&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&V&&delete this.undefinedExports[e],s.flags&Z)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},Pe.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Pe.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Pe.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Z|Q|J))return t}},Pe.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Z|Q|J)&&!(t.flags&K))return t}};var Re=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new M(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Ne=se.prototype;function Oe(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}Ne.startNode=function(){return new Re(this,this.start,this.startLoc)},Ne.startNodeAt=function(e,t){return new Re(this,e,t)},Ne.finishNode=function(e,t){return Oe.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Ne.finishNodeAt=function(e,t,n,r){return Oe.call(this,e,t,n,r)},Ne.copyNode=function(e){var t=new Re(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var je="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ze=je+" Extended_Pictographic",Me=ze+" EBase EComp EMod EPres ExtPict",De={9:je,10:ze,11:ze,12:Me,13:Me,14:Me},Be={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Fe="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",We="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Ue=We+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ve=Ue+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",He=Ve+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ge=He+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",qe={9:We,10:Ue,11:Ve,12:He,13:Ge,14:Ge+" Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"},Ke={};function $e(e){var t=Ke[e]={binary:N(De[e]+" "+Fe),binaryOfStrings:N(Be[e]),nonBinary:{General_Category:N(Fe),Script:N(qe[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Ye=0,Xe=[9,10,11,12,13,14];Ye<Xe.length;Ye+=1)$e(Xe[Ye]);var Je=se.prototype,Qe=function(e,t){this.parent=e,this.base=t||this};Qe.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},Qe.prototype.sibling=function(){return new Qe(this.parent,this.base)};var Ze=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Ke[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function et(e){for(var t in e)return!0;return!1}function tt(e){return 105===e||109===e||115===e}function nt(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function rt(e){return h(e,!0)||36===e||95===e}function it(e){return p(e,!0)||36===e||95===e||8204===e||8205===e}function ot(e){return e>=65&&e<=90||e>=97&&e<=122}function at(e){return e>=0&&e<=1114111}Ze.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("v"),i=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},Ze.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Ze.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!t&&!this.switchU||i<=55295||i>=57344||e+1>=r)return i;var o=n.charCodeAt(e+1);return o>=56320&&o<=57343?(i<<10)+o-56613888:i},Ze.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i,o=n.charCodeAt(e);return!t&&!this.switchU||o<=55295||o>=57344||e+1>=r||(i=n.charCodeAt(e+1))<56320||i>57343?e+1:e+2},Ze.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Ze.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Ze.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Ze.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Ze.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var o=i[r],a=this.at(n,t);if(-1===a||a!==o)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},Je.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,o=0;o<n.length;o++){var a=n.charAt(o);-1===t.indexOf(a)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(a,o+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===a&&(r=!0),"v"===a&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")},Je.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&et(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},Je.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}},Je.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Qe(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},Je.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Je.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},Je.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Je.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Je.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Je.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},Je.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Je.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Je.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var o=n.charAt(i);n.indexOf(o,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var a=this.regexp_eatModifiers(e);n||a||58!==e.current()||e.raise("Invalid regular expression modifiers");for(var s=0;s<a.length;s++){var l=a.charAt(s);(a.indexOf(l,s+1)>-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},Je.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Je.regexp_eatModifiers=function(e){for(var t="",n=0;-1!==(n=e.current())&&tt(n);)t+=O(n),e.advance();return t},Je.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Je.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Je.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!nt(t)&&(e.lastIntValue=t,e.advance(),!0)},Je.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!nt(n);)e.advance();return e.pos!==t},Je.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},Je.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise("Duplicate capture group name");else e.raise("Duplicate capture group name");t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},Je.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Je.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=O(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=O(e.lastIntValue);return!0}return!1},Je.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),rt(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Je.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),it(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Je.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Je.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Je.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Je.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Je.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Je.regexp_eatZero=function(e){return 48===e.current()&&!mt(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Je.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Je.regexp_eatControlLetter=function(e){var t=e.current();return!!ot(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Je.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(i-55296)+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&at(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1},Je.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},Je.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};var st=0,lt=1,ct=2;function ut(e){return 100===e||68===e||115===e||83===e||119===e||87===e}function dt(e){return ot(e)||95===e}function ht(e){return dt(e)||mt(e)}function pt(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}function ft(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}function gt(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}function mt(e){return e>=48&&e<=57}function vt(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function yt(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function bt(e){return e>=48&&e<=55}Je.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(ut(t))return e.lastIntValue=-1,e.advance(),lt;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=80===t)||112===t)){var r;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===ct&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return st},Je.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),lt}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return st},Je.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){P(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},Je.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?lt:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?ct:void e.raise("Invalid property name")},Je.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";dt(t=e.current());)e.lastStringValue+=O(t),e.advance();return""!==e.lastStringValue},Je.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";ht(t=e.current());)e.lastStringValue+=O(t),e.advance();return""!==e.lastStringValue},Je.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Je.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&n===ct&&e.raise("Negated character class may contain strings"),!0}return!1},Je.regexp_classContents=function(e){return 93===e.current()?lt:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),lt)},Je.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},Je.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||bt(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},Je.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Je.regexp_classSetExpression=function(e){var t,n=lt;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){t===ct&&(n=ct);for(var r=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?t!==ct&&(n=lt):e.raise("Invalid character in character class");if(r!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return n}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;t===ct&&(n=ct)}},Je.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return-1!==n&&-1!==r&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},Je.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?lt:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Je.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===ct&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},Je.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null},Je.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===ct&&(t=ct);return t},Je.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?lt:ct},Je.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e)&&(e.eat(98)?(e.lastIntValue=8,0):(e.pos=t,1)));var n=e.current();return!(n<0||n===e.lookahead()&&pt(n)||ft(n)||(e.advance(),e.lastIntValue=n,0))},Je.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!gt(t)&&(e.lastIntValue=t,e.advance(),!0)},Je.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!mt(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},Je.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Je.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;mt(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},Je.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;vt(n=e.current());)e.lastIntValue=16*e.lastIntValue+yt(n),e.advance();return e.pos!==t},Je.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},Je.regexp_eatOctalDigit=function(e){var t=e.current();return bt(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Je.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!vt(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+yt(i),e.advance()}return!0};var wt=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new M(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},xt=se.prototype;function At(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function St(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}xt.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new wt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},xt.getToken=function(){return this.next(),new wt(this)},"undefined"!=typeof Symbol&&(xt[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===w.eof,value:t}}}}),xt.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(w.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},xt.readToken=function(e){return h(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},xt.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},xt.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=k(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},xt.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!S(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},xt.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&_.test(String.fromCharCode(e))))break e;++this.pos}}},xt.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},xt.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(w.ellipsis)):(++this.pos,this.finishToken(w.dot))},xt.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(w.assign,2):this.finishOp(w.slash,1)},xt.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?w.star:w.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=w.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(w.assign,n+1):this.finishOp(r,n)},xt.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(w.assign,3):this.finishOp(124===e?w.logicalOR:w.logicalAND,2):61===t?this.finishOp(w.assign,2):this.finishOp(124===e?w.bitwiseOR:w.bitwiseAND,1)},xt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(w.assign,2):this.finishOp(w.bitwiseXOR,1)},xt.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!x.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(w.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(w.assign,2):this.finishOp(w.plusMin,1)},xt.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(w.assign,n+1):this.finishOp(w.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(w.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},xt.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(w.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(w.arrow)):this.finishOp(61===e?w.eq:w.prefix,1)},xt.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(w.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(w.assign,3):this.finishOp(w.coalesce,2)}return this.finishOp(w.question,1)},xt.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,h(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(w.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+O(e)+"'")},xt.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(w.parenL);case 41:return++this.pos,this.finishToken(w.parenR);case 59:return++this.pos,this.finishToken(w.semi);case 44:return++this.pos,this.finishToken(w.comma);case 91:return++this.pos,this.finishToken(w.bracketL);case 93:return++this.pos,this.finishToken(w.bracketR);case 123:return++this.pos,this.finishToken(w.braceL);case 125:return++this.pos,this.finishToken(w.braceR);case 58:return++this.pos,this.finishToken(w.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(w.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(w.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+O(e)+"'")},xt.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},xt.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(x.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var o=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(o);var s=this.regexpState||(this.regexpState=new Ze(this));s.reset(n,i,a),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var l=null;try{l=new RegExp(i,a)}catch(e){}return this.finishToken(w.regexp,{pattern:i,flags:a,value:l})},xt.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&void 0===t,i=n&&48===this.input.charCodeAt(this.pos),o=this.pos,a=0,s=0,l=0,c=null==t?1/0:t;l<c;++l,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&95===u)i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===s&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===l&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),s=u;else{if((d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;s=u,a=a*e+d}}return r&&95===s&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===o||null!=t&&this.pos-o!==t?null:a},xt.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=St(this.input.slice(t,this.pos)),++this.pos):h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(w.num,n)},xt.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===r){var i=St(this.input.slice(t,this.pos));return++this.pos,h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(w.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o=At(this.input.slice(t,this.pos),n);return this.finishToken(w.num,o)},xt.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},xt.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(S(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(w.string,t)};var kt={};xt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==kt)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},xt.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw kt;this.raise(e,t)},xt.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==w.template&&this.type!==w.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(w.template,e)):36===n?(this.pos+=2,this.finishToken(w.dollarBraceL)):(++this.pos,this.finishToken(w.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(S(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},xt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(w.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},xt.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return O(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),"0"===r&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return S(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},xt.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},xt.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(p(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var o=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?h:p)(a,r)||this.invalidStringToken(o,"Invalid Unicode escape"),e+=O(a),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},xt.readWord=function(){var e=this.readWord1(),t=w.name;return this.keywords.test(e)&&(t=y[e]),this.finishToken(t,e)};var _t="8.15.0";function Tt(e,t){return se.parse(e,t)}function Et(e,t,n){return se.parseExpressionAt(e,t,n)}function Ct(e,t){return se.tokenizer(e,t)}se.acorn={Parser:se,version:_t,defaultOptions:B,Position:z,SourceLocation:M,getLineInfo:D,Node:Re,TokenType:f,tokTypes:w,keywordTypes:y,TokContext:Ae,tokContexts:Se,isIdentifierChar:p,isIdentifierStart:h,Token:wt,isNewLine:S,lineBreak:x,lineBreakG:A,nonASCIIwhitespace:_},e.Node=Re,e.Parser=se,e.Position=z,e.SourceLocation=M,e.TokContext=Ae,e.Token=wt,e.TokenType=f,e.defaultOptions=B,e.getLineInfo=D,e.isIdentifierChar=p,e.isIdentifierStart=h,e.isNewLine=S,e.keywordTypes=y,e.lineBreak=x,e.lineBreakG=A,e.nonASCIIwhitespace=_,e.parse=Tt,e.parseExpressionAt=Et,e.tokContexts=Se,e.tokTypes=w,e.tokenizer=Ct,e.version=_t}(t)},8343(e,t,n){"use strict";n.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>o});var r=n(6175),i=n(3830);function o(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function a(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||i:o(e,n)||i,t&&(r=t(r,i,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=o(e.theme,s)||{};return(0,i.NI)(e,c,e=>{let i=a(u,l,e);return e===i&&"string"==typeof e&&(i=a(u,l,"".concat(t).concat("default"===e?"":(0,r.A)(e)),e)),!1===n?i:{[n]:i}})};return c.propTypes={},c.filterProps=[t],c}},8442(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(8581)},8579(e,t,n){"use strict";n.d(t,{A:()=>r});const r={black:"#000",white:"#fff"}},8581(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},8661(e,t,n){"use strict";e.exports=n(1092)},8720(e,t,n){"use strict";var r=n(2902),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),g=l(n),m=0;m<a.length;++m){var v=a[m];if(!(o[v]||r&&r[v]||g&&g[v]||s&&s[v])){var y=h(n,v);try{c(t,v,y)}catch(e){}}}}return t}},8755(e,t,n){"use strict";n.d(t,{A:()=>y});var r=n(4320),i=n(8915),o=n(6253),a=n(6997),s=n(1985),l=n(2692),c=n(2979),u=n(3850),d=n(3285),h=n(9697),p=n(2223),f=n(7782),g=n(1634);const m=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:v={},typography:y={}}=e,b=(0,i.A)(e,m);if(e.vars&&void 0===e.generateCssVars)throw new Error((0,o.A)(18));const w=(0,d.Ay)(n),x=(0,c.A)(e);let A=(0,a.A)(x,{mixins:(0,u.A)(x.breakpoints,t),palette:w,shadows:p.A.slice(),typography:(0,h.A)(w,y),transitions:(0,f.Ay)(v),zIndex:(0,r.A)({},g.A)});A=(0,a.A)(A,b);for(var S=arguments.length,k=new Array(S>1?S-1:0),_=1;_<S;_++)k[_-1]=arguments[_];return A=k.reduce((e,t)=>(0,a.A)(e,t),A),A.unstable_sxConfig=(0,r.A)({},l.A,null==b?void 0:b.unstable_sxConfig),A.unstable_sx=function(e){return(0,s.A)({sx:e,theme:this})},A}const y=v},8757(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(4320),i=n(8915),o=n(6997),a=n(2692);const s=["sx"];function l(e){const{sx:t}=e,n=(0,i.A)(e,s),{systemProps:l,otherProps:c}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:a.A;return Object.keys(e).forEach(t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r})(n);let u;return u=Array.isArray(t)?[l,...t]:"function"==typeof t?function(){const e=t(...arguments);return(0,o.Q)(e)?(0,r.A)({},l,e):l}:(0,r.A)({},l,t),(0,r.A)({},c,{sx:u})}},8791(e,t,n){"use strict";n.d(t,{A:()=>a,E:()=>o});var r=n(1687),i=n(7997);class o{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new o}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function a(){const e=(0,r.A)(o.create).current;return(0,i.A)(e.disposeEffect),e}},8898(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},8902(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home")},8915(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},9079(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z"}),"SyncAlt")},9150(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(3684)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock")},9286(e,t){var n,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[e],n=function(e){"use strict";var t;if(null===(t=globalThis.chrome)||void 0===t||null===(t=t.runtime)||void 0===t||!t.id)throw new Error("This script should only be loaded in a browser extension.");if(void 0===globalThis.browser||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){const t="The message port closed before a response was received.",n=e=>{const n={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(n).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class r extends WeakMap{constructor(e){super(arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}const i=e=>e&&"object"==typeof e&&"function"==typeof e.then,o=(t,n)=>function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];e.runtime.lastError?t.reject(new Error(e.runtime.lastError.message)):n.singleCallbackArg||i.length<=1&&!1!==n.singleCallbackArg?t.resolve(i[0]):t.resolve(i)},a=e=>1==e?"argument":"arguments",s=(e,t)=>function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];if(i.length<t.minArgs)throw new Error("Expected at least ".concat(t.minArgs," ").concat(a(t.minArgs)," for ").concat(e,"(), got ").concat(i.length));if(i.length>t.maxArgs)throw new Error("Expected at most ".concat(t.maxArgs," ").concat(a(t.maxArgs)," for ").concat(e,"(), got ").concat(i.length));return new Promise((r,a)=>{if(t.fallbackToNoCallback)try{n[e](...i,o({resolve:r,reject:a},t))}catch(o){console.warn("".concat(e," API method doesn't seem to support the callback parameter, ")+"falling back to call it without a callback: ",o),n[e](...i),t.fallbackToNoCallback=!1,t.noCallback=!0,r()}else t.noCallback?(n[e](...i),r()):n[e](...i,o({resolve:r,reject:a},t))})},l=(e,t,n)=>new Proxy(t,{apply:(t,r,i)=>n.call(r,e,...i)});let c=Function.call.bind(Object.prototype.hasOwnProperty);const u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(null),i={has:(t,n)=>n in e||n in r,get(i,o,a){if(o in r)return r[o];if(!(o in e))return;let d=e[o];if("function"==typeof d)if("function"==typeof t[o])d=l(e,e[o],t[o]);else if(c(n,o)){let t=s(o,n[o]);d=l(e,e[o],t)}else d=d.bind(e);else if("object"==typeof d&&null!==d&&(c(t,o)||c(n,o)))d=u(d,t[o],n[o]);else{if(!c(n,"*"))return Object.defineProperty(r,o,{configurable:!0,enumerable:!0,get:()=>e[o],set(t){e[o]=t}}),d;d=u(d,t[o],n["*"])}return r[o]=d,d},set:(t,n,i,o)=>(n in r?r[n]=i:e[n]=i,!0),defineProperty:(e,t,n)=>Reflect.defineProperty(r,t,n),deleteProperty:(e,t)=>Reflect.deleteProperty(r,t)},o=Object.create(e);return new Proxy(o,i)},d=e=>({addListener(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];t.addListener(e.get(n),...i)},hasListener:(t,n)=>t.hasListener(e.get(n)),removeListener(t,n){t.removeListener(e.get(n))}}),h=new r(e=>"function"!=typeof e?e:function(t){const n=u(t,{},{getContent:{minArgs:0,maxArgs:0}});e(n)}),p=new r(e=>"function"!=typeof e?e:function(t,n,r){let o,a,s=!1,l=new Promise(e=>{o=function(t){s=!0,e(t)}});try{a=e(t,n,o)}catch(e){a=Promise.reject(e)}const c=!0!==a&&i(a);if(!0!==a&&!c&&!s)return!1;const u=e=>{e.then(e=>{r(e)},e=>{let t;t=e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred",r({__mozWebExtensionPolyfillReject__:!0,message:t})}).catch(e=>{console.error("Failed to send onMessage rejected reply",e)})};return u(c?a:l),!0}),f=(n,r)=>{let{reject:i,resolve:o}=n;e.runtime.lastError?e.runtime.lastError.message===t?o():i(new Error(e.runtime.lastError.message)):r&&r.__mozWebExtensionPolyfillReject__?i(new Error(r.message)):o(r)},g=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(i.length<t.minArgs)throw new Error("Expected at least ".concat(t.minArgs," ").concat(a(t.minArgs)," for ").concat(e,"(), got ").concat(i.length));if(i.length>t.maxArgs)throw new Error("Expected at most ".concat(t.maxArgs," ").concat(a(t.maxArgs)," for ").concat(e,"(), got ").concat(i.length));return new Promise((e,t)=>{const r=f.bind(null,{resolve:e,reject:t});i.push(r),n.sendMessage(...i)})},m={devtools:{network:{onRequestFinished:d(h)}},runtime:{onMessage:d(p),onMessageExternal:d(p),sendMessage:g.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:g.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},v={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return n.privacy={network:{"*":v},services:{"*":v},websites:{"*":v}},u(e,m,n)};e.exports=n(chrome)}else e.exports=globalThis.browser},void 0===(i="function"==typeof n?n.apply(t,r):n)||(e.exports=i)},9428(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(8915),i=n(4320);const o=["values","unit","step"];function a(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,s=(0,r.A)(e,o),l=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,i.A)({},e,{[t.key]:t.val}),{})})(t),c=Object.keys(l);function u(e){const r="number"==typeof t[e]?t[e]:e;return"@media (min-width:".concat(r).concat(n,")")}function d(e){const r="number"==typeof t[e]?t[e]:e;return"@media (max-width:".concat(r-a/100).concat(n,")")}function h(e,r){const i=c.indexOf(r);return"@media (min-width:".concat("number"==typeof t[e]?t[e]:e).concat(n,") and ")+"(max-width:".concat((-1!==i&&"number"==typeof t[c[i]]?t[c[i]]:r)-a/100).concat(n,")")}return(0,i.A)({keys:c,values:l,up:u,down:d,between:h,only:function(e){return c.indexOf(e)+1<c.length?h(e,c[c.indexOf(e)+1]):u(e)},not:function(e){const t=c.indexOf(e);return 0===t?u(c[1]):t===c.length-1?d(c[t]):h(e,c[c.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},s)}},9669(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},9697(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(4320),i=n(8915),o=n(6997);const a=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const s={textTransform:"uppercase"},l='"Roboto", "Helvetica", "Arial", sans-serif';function c(e,t){const n="function"==typeof t?t(e):t,{fontFamily:c=l,fontSize:u=14,fontWeightLight:d=300,fontWeightRegular:h=400,fontWeightMedium:p=500,fontWeightBold:f=700,htmlFontSize:g=16,allVariants:m,pxToRem:v}=n,y=(0,i.A)(n,a);const b=u/14,w=v||(e=>"".concat(e/g*b,"rem")),x=(e,t,n,i,o)=>{return(0,r.A)({fontFamily:c,fontWeight:e,fontSize:w(t),lineHeight:n},c===l?{letterSpacing:"".concat((a=i/t,Math.round(1e5*a)/1e5),"em")}:{},o,m);var a},A={h1:x(d,96,1.167,-1.5),h2:x(d,60,1.2,-.5),h3:x(h,48,1.167,0),h4:x(h,34,1.235,.25),h5:x(h,24,1.334,0),h6:x(p,20,1.6,.15),subtitle1:x(h,16,1.75,.15),subtitle2:x(p,14,1.57,.1),body1:x(h,16,1.5,.15),body2:x(h,14,1.43,.15),button:x(p,14,1.75,.4,s),caption:x(h,12,1.66,.4),overline:x(h,12,2.66,1,s),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,o.A)((0,r.A)({htmlFontSize:g,pxToRem:w,fontFamily:c,fontSize:u,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:p,fontWeightBold:f},A),y,{clone:!1})}},9770(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case m:case g:case l:return e;default:return t}}case i:return t}}}function A(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return A(e)||x(e)===u},t.isConcurrentMode=A,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===h},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===p||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=x},9903(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A,extendSxProp:()=>i.A,unstable_createStyleFunctionSx:()=>r.k,unstable_defaultSxConfig:()=>o.A});var r=n(1985),i=n(8757),o=n(2692)}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e].call(o.exports,o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);i.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>n[e]);return a.default=()=>n,i.d(o,a),o},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};i.r(e),i.d(e,{exclude:()=>po,extract:()=>ao,parse:()=>so,parseUrl:()=>co,pick:()=>ho,stringify:()=>lo,stringifyUrl:()=>uo});const t="KISS Translator".trim().split(/\s+/).join("-"),n=t.toLowerCase(),r=(t.toUpperCase(),{fabID:"".concat(n,"-fab"),boxID:"".concat(n,"-box"),popupID:"".concat(n,"-popup")}),o="2.0.22".split("."),a="light",s="dark";function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}function u(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const p=1e4,f=400,g=10,m=1e4,v="{{from}}",y="{{to}}",b="{{fromLang}}",w="{{toLang}}",x="{{text}}",A="{{tone}}",S="{{title}}",k="{{description}}",_="{{summary}}",T="{{model}}",E="{{glossary}}",C="Bing",I="Youdao",P=[C,I],L=new Set(P),R="Baidu",N="Youdao",O=[R,N],j=new Set(O),z="BuiltinAI",M="Google",D="Google2",B="Microsoft",F="AzureAI",W="DeepSeek",U="SiliconFlow",V="XiaomiMimo",H="AliyunBailian",G="Cerebras",q="Zai",K="DeepL",$="DeepLX",Y="DeepLFree",X="ePhoneAI",J="Baidu",Q="Tencent",Z="Volcengine",ee="OpenAI",te="Gemini",ne="Gemini2",re="Claude",ie="CloudflareAI",oe="Ollama",ae="OpenRouter",se="Custom",le=[z,M,D,B,F,W,U,V,H,G,q,Q,Z,K,Y,$,X,ee,te,ne,re,ie,oe,ae,se],ce=[z,M,B,J,Q],ue=new Set(ce),de={builtin:new Set(le),machine:new Set([B,Y,J,Q,Z]),ai:new Set([X,ee,W,U,V,H,G,q,te,ne,re,oe,ae,se]),mulkeys:new Set([F,W,U,V,H,G,q,K,ee,te,ne,re,ie,oe,ae,X,se]),batch:new Set([F,W,U,V,H,G,q,D,B,Q,K,ee,te,ne,re,oe,ae,X,se]),context:new Set([W,U,V,H,G,q,ee,te,ne,re,oe,ae,X,se]),stream:new Set([W,U,V,H,G,q,ee,te,ne,re,oe,ae,X]),sponsors:new Set([X]),darkIcon:new Set([U,V,X,q,K,Y,$,ee,oe,ae])},he={[W]:{type:"deepseek",efforts:[{value:"max",label:"Max"},{value:"high",label:"High"}]},[U]:{type:"siliconflow",efforts:[{value:"max",label:"Max (32768)"},{value:"high",label:"High (16384)"},{value:"medium",label:"Medium (8192)"},{value:"low",label:"Low (4096)"},{value:"minimal",label:"Minimal (2048)"}]},[V]:{type:"deepseek",efforts:null},[H]:{type:"aliyunbailian",efforts:null},[G]:{type:"cerebras",efforts:[{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"}]},[q]:{type:"deepseek",efforts:null},[te]:{type:"gemini",efforts:[{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"},{value:"minimal",label:"Minimal"}]},[re]:{type:"claude",disableSupported:!1,efforts:[{value:"max",label:"Max"},{value:"xhigh",label:"X-High"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"}]},[oe]:{type:"cerebras",efforts:[{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"}]},[ae]:{type:"openrouter",disableSupported:!1,efforts:[{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"},{value:"minimal",label:"Minimal"}]}},pe=[["en","English - English"],["zh-CN","Simplified Chinese - 简体中文"],["zh-TW","Traditional Chinese - 繁體中文"],["ar","Arabic - العربية"],["bg","Bulgarian - Български"],["ca","Catalan - Català"],["hr","Croatian - Hrvatski"],["cs","Czech - Čeština"],["da","Danish - Dansk"],["nl","Dutch - Nederlands"],["fa","Persian - فارسی"],["fi","Finnish - Suomi"],["fr","French - Français"],["de","German - Deutsch"],["el","Greek - Ελληνικά"],["hi","Hindi - हिन्दी"],["hu","Hungarian - Magyar"],["id","Indonesian - Indonesia"],["it","Italian - Italiano"],["ja","Japanese - 日本語"],["ko","Korean - 한국어"],["ms","Malay - Melayu"],["mt","Maltese - Malti"],["nb","Norwegian - Norsk Bokmål"],["pl","Polish - Polski"],["pt","Portuguese - Português"],["ro","Romanian - Română"],["ru","Russian - Русский"],["sk","Slovak - Slovenčina"],["sl","Slovenian - Slovenščina"],["es","Spanish - Español"],["sv","Swedish - Svenska"],["ta","Tamil - தமிழ்"],["te","Telugu - తెలుగు"],["th","Thai - ไทย"],["tr","Turkish - Türkçe"],["uk","Ukrainian - Українська"],["vi","Vietnamese - Tiếng Việt"]],fe=pe.map(e=>{let[t]=e;return t}),ge=[["auto","AutoDetect - AutoDetect"],...pe],me=new Map(pe),ve=pe.map(e=>{let[t,n]=e;return[t,n.split(" - ").reverse().join(" - ")]}),ye=ge.map(e=>{let[t,n]=e;return[t,n.split(" - ").reverse().join(" - ")]}),be=new Map(ge.map(e=>{let[t,n]=e;return[t,n.split(" - ")[0]]})),we=new Map(ge.map(e=>{let[t]=e;return[t,t]})),xe=new Map(ge.map(e=>{let[t]=e;return[t,t.toUpperCase()]})),Ae={[z]:new Map([...we,["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[M]:we,[D]:we,[B]:new Map([...we,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[F]:new Map([...we,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[K]:new Map([...xe,["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[Y]:new Map([...xe,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[$]:new Map([...xe,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[W]:be,[U]:be,[V]:be,[H]:be,[G]:be,[q]:be,[Z]:new Map([...we,["auto","auto"],["zh-CN","zh"],["zh-TW","zh-Hant"]]),[J]:new Map([...we,["zh-CN","zh"],["zh-TW","cht"],["ar","ara"],["bg","bul"],["ca","cat"],["hr","hrv"],["da","dan"],["fi","fin"],["fr","fra"],["hi","mai"],["ja","jp"],["ko","kor"],["ms","may"],["mt","mlt"],["nb","nor"],["ro","rom"],["ru","ru"],["sl","slo"],["es","spa"],["sv","swe"],["ta","tam"],["te","tel"],["uk","ukr"],["vi","vie"]]),[Q]:new Map([["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ar","ar"],["de","de"],["ru","ru"],["fr","fr"],["fi","fil"],["ko","ko"],["ms","ms"],["pt","pt"],["ja","ja"],["th","th"],["tr","tr"],["es","es"],["it","it"],["hi","hi"],["id","id"],["vi","vi"]]),[X]:be,[ee]:be,[te]:be,[ne]:be,[re]:be,[oe]:be,[ae]:be,[ie]:new Map([...we,["auto","en"],["zh-CN","zh"],["zh-TW","zh"]]),[se]:be},Se={};Object.entries(Ae).forEach(e=>{let[t,n]=e;Se[t]=(e=>new Map(Array.from(e.entries()).map(e=>{let[t,n]=e;return""===n?["auto","auto"]:"zh"===n||"ZH"===n?[n,"zh-CN"]:[n,t]})))(n)});const ke="You are a professional, authentic machine translation engine.",_e="# Context\nTitle: ".concat(S,"\nDescription: ").concat(k,"\nSummary: ").concat(_,"\nTone: ").concat(A,"\n\n# Task\nTranslate the Source Text below to ").concat(y,".\n1. Use the Context to ensure accuracy.\n2. Adapt the wording to match the specified Tone.\n3. Output ONLY the translated text. No markdown, no explanations.\n\nSource Text: ").concat(x,"\n\nTranslated Text:"),Te='Act as a translation API. Output raw XML-like format only. No Markdown fences (xml). No conversational filler.\n\nInput:\n{"targetLanguage":"<lang>","title":"<context>","description":"<context>","summary":"<context>","segments":[{"id":1,"text":"..."}],"glossary":{"sourceTerm":"targetTerm"},"tone":"<formal|casual>"}\n\nOutput Format:\n<root>\n    <t id="0" sourceLanguage="<detected_source_lang>">Translated text content...</t>\n    <t id="1" sourceLanguage="<detected_source_lang>">Translated text content...</t>\n</root>\n\nRules:\n1.  **Strict Format**: Output ONLY the <root> element and its children. Do not include "xml" version declarations or markdown code blocks.\n2.  **Structure**: Maintain the exact "id" from the input in the "id" attribute. Detect the source language for the "sourceLanguage" attribute.\n3.  **HTML & Whitespace**: Preserve all HTML tags (e.g., <b>, <span>, <br>) and whitespace exactly as they appear in the structure. Only translate the text content inside them.\n4.  **Glossary**: Highest priority. Use the glossary value for translation. If the value is "", keep the source term as is.\n5.  **Do Not Translate**: Content inside <code>, <pre>, text in backticks ("code"), and placeholders like {1}, {{1}}, [1], [[1]].\n6.  **Context**: Use the "title" and "description" fields to understand the context for better translation accuracy, but do not output them.\n7.  **Tone**: Apply the specified "tone" (formal/casual).\n\nExample:\nInput:\n{"targetLanguage":"zh-CN","segments":[{"id":0,"text":"Hello <b>World</b>!"}],"glossary":{"World":"世界"},"tone":"formal"}\n\nOutput:\n<root>\n    <t id="0" sourceLanguage="en">你好 <b>世界</b>!</t>\n</root>',Ee="# Context\nTitle: ".concat(S,"\nDescription: ").concat(k,"\nSummary: ").concat(_,"\nTone: ").concat(A,"\n\n# Glossary (Terminology):\n").concat(E,"\n\n# Task\nGroup the input word-level JSON into bilingual subtitle segments. Target Language: ").concat(y,'.\n\n# Output Contract\n1. Output a JSON array only. No markdown, no code fences, no extra text.\n2. Each element: {"s":<first_word_id>,"e":<last_word_id>,"o":"merged original text","t":"translation"}\n3. "s" and "e" are inclusive word IDs from the input.\n4. Cover all input words exactly once (no gaps, no overlaps).\n\n# Rules\n1. Merge words into complete sentences, split at natural pauses into readable segments.\n2. Some input words include "p" (pause level 1-3). Higher "p" suggests a stronger sentence boundary, but grammar and meaning take priority.\n3. Translate using Context and Tone.\n\n# Example\nInput: [{"id":0,"text":"Hello"},{"id":1,"text":"world!"},{"id":2,"text":"Good","p":2},{"id":3,"text":"morning."}]\nOutput: [{"s":0,"e":1,"o":"Hello world!","t":"你好,世界!"},{"s":2,"e":3,"o":"Good morning.","t":"早上好。"}]'),Ce={apiSlug:"",apiName:"",apiType:"",url:"",key:"",model:"",systemPrompt:Te,subtitlePrompt:Ee,nobatchPrompt:ke,nobatchUserPrompt:_e,userPrompt:"",tone:"formal",placeholder:"{ }",placetag:"i",aiTerms:"",customHeader:"",customBody:"",reqHook:"",resHook:"",fetchLimit:10,fetchInterval:100,httpTimeout:3e4,batchInterval:f,batchSize:g,batchLength:m,useBatchFetch:!1,useStream:!1,streamRenderMode:"disabled",transAllnow:!1,rootMargin:500,useContext:!1,contextSize:3,temperature:0,maxTokens:20480,thinkingMode:"auto",thinkingEffort:"_default",isDisabled:!1,region:"",sortOrder:0,placetagFormat:"compact"},Ie={[z]:Ce,[M]:h(h({},Ce),{},{url:"https://translate.googleapis.com/translate_a/single"}),[D]:h(h({},Ce),{},{url:"https://translate-pa.googleapis.com/v1/translateHtml",key:"AIzaSyATBXajvzQLTDHEQbcpq0Ihe0vWDHmO520",useBatchFetch:!0,placetag:"a",placetagFormat:"attribute"}),[B]:h(h({},Ce),{},{useBatchFetch:!0}),[F]:h(h({},Ce),{},{url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0",useBatchFetch:!0}),[J]:h({},Ce),[Q]:h(h({},Ce),{},{useBatchFetch:!0}),[Z]:h({},Ce),[K]:h(h({},Ce),{},{url:"https://api-free.deepl.com/v2/translate",useBatchFetch:!0}),[Y]:h(h({},Ce),{},{fetchLimit:1}),[W]:h(h({},Ce),{},{url:"https://api.deepseek.com/chat/completions",model:"deepseek-v4-flash",useBatchFetch:!0,thinkingMode:"disabled",thinkingEffort:"high"}),[U]:h(h({},Ce),{},{url:"https://api.siliconflow.cn/v1/chat/completions",model:"Pro/zai-org/GLM-4.7",useBatchFetch:!0,thinkingMode:"disabled",thinkingEffort:"minimal"}),[V]:h(h({},Ce),{},{url:"https://api.xiaomimimo.com/v1/chat/completions",model:"mimo-v2.5-pro",useBatchFetch:!0,thinkingMode:"disabled"}),[H]:h(h({},Ce),{},{url:"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions",model:"qwen-plus",useBatchFetch:!0,thinkingMode:"disabled"}),[G]:h(h({},Ce),{},{url:"https://api.cerebras.ai/v1/chat/completions",model:"gpt-oss-120b",useBatchFetch:!0,thinkingMode:"disabled",thinkingEffort:"low"}),[q]:h(h({},Ce),{},{url:"https://open.bigmodel.cn/api/paas/v4/chat/completions",model:"glm-5.1",useBatchFetch:!0,thinkingMode:"disabled"}),[$]:h(h({},Ce),{},{url:"http://localhost:1188/translate"}),[X]:h(h({},Ce),{},{url:"https://api.ephone.ai/v1/chat/completions"}),[ee]:h(h({},Ce),{},{url:"https://api.openai.com/v1/chat/completions",model:"gpt-4",useBatchFetch:!0}),[te]:h(h({},Ce),{},{url:"https://generativelanguage.googleapis.com/v1beta/models/".concat(T,":generateContent"),model:"gemini-2.5-flash",useBatchFetch:!0,thinkingMode:"disabled",thinkingEffort:"minimal"}),[ne]:h(h({},Ce),{},{url:"https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",model:"gemini-2.0-flash",useBatchFetch:!0}),[re]:h(h({},Ce),{},{url:"https://api.anthropic.com/v1/messages",model:"claude-3-haiku-20240307",useBatchFetch:!0,thinkingMode:"enabled",thinkingEffort:"low"}),[ie]:h(h({},Ce),{},{url:"https://api.cloudflare.com/client/v4/accounts/{{ACCOUNT_ID}}/ai/run/@cf/meta/m2m100-1.2b"}),[oe]:h(h({},Ce),{},{url:"http://localhost:11434/v1/chat/completions",model:"llama3.1",useBatchFetch:!0,thinkingMode:"disabled",thinkingEffort:"low"}),[ae]:h(h({},Ce),{},{url:"https://openrouter.ai/api/v1/chat/completions",model:"openai/gpt-4o",useBatchFetch:!0,thinkingMode:"enabled",thinkingEffort:"minimal"}),[se]:h(h({},Ce),{},{reqHook:'async (args, { url, body, headers, userMsg, method } = {}) => {\n  console.log("request hook args:", { args, url, body, headers, userMsg, method });\n  // return { url, body, headers, userMsg, method };\n};',resHook:'async ({ res, ...args }) => {\n  console.log("reaponse hook args:", { res, args });\n  // const translations = [["你好", "zh"]];\n  // const modelMsg = "";\n  // return { translations, modelMsg };\n};'})},Pe=le.map(e=>h(h({},Ie[e]),{},{apiSlug:e,apiName:e,apiType:e})),Le=B,Re=Pe.find(e=>e.apiType===Le),Ne="style_none",Oe="under_line",je="dot_line",ze="dash_line",Me="dash_line_bold",De="dash_box",Be="dash_box_bold",Fe="wavy_line",We="wavy_line_bold",Ue="marker",Ve="gradient_marker",He="fuzzy",Ge="highlight",qe="blockquote",Ke="gradient",$e="blink",Ye="glow",Xe="colorful",Je=[Ne,Oe,je,ze,Me,Fe,We,De,Be,Ue,Ve,He,Ge,qe,Ke,$e,Ye,Xe],Qe=[{styleSlug:"custom",styleName:"Custom Style",styleCode:"color: #209CEE;"}],Ze="*",et="split_disable",tt="split_textlength",nt="split_punctuation",rt=[et,nt,tt],it="highlight_disable",ot="highlight_beforetrans",at="highlight_aftertrans",st=[it,ot,at],lt={pattern:"",selector:"",keepSelector:"",blockSelector:"",terms:"",aiTerms:"",apiSlug:Ze,fromLang:Ze,toLang:Ze,textStyle:Ze,transOpen:Ze,textExtStyle:"",termsStyle:"",highlightStyle:"",selectStyle:"",parentStyle:"",grandStyle:"",injectJs:"",transOnly:Ze,transOnlyRevert:Ze,transOnlyRevertDelay:Ze,transOrder:Ze,transTag:Ze,transTitle:Ze,transStartHook:"",transEndHook:"",autoScan:Ze,hasRichText:Ze,hasShadowroot:Ze,scanAll:Ze,rootsSelector:"",ignoreSelector:"",splitParagraph:Ze,splitLength:0,highlightWords:Ze},ct={pattern:"*",selector:"h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend",keepSelector:"code, cite, math, .math, a:has(code)",blockSelector:"",terms:"",aiTerms:"",apiSlug:B,fromLang:"auto",toLang:"zh-CN",textStyle:Ne,transOpen:"false",textExtStyle:"",termsStyle:"font-weight: bold;",highlightStyle:"color: red;",selectStyle:"-webkit-line-clamp: unset; max-height: none; height: auto;",parentStyle:"",grandStyle:"",injectJs:"",injectCss:"",transOnly:"false",transOnlyRevert:"false",transOnlyRevertDelay:"0.5",transTag:"font",transTitle:"false",transStartHook:"",transEndHook:"",autoScan:"true",hasRichText:"true",hasShadowroot:"false",scanAll:"false",rootsSelector:"body",ignoreSelector:"button, footer, pre, mark, nav, svg, img[src*='.svg'], [class*='logo'] svg, [id*='logo'] svg",splitParagraph:et,splitLength:100,highlightWords:it,transOrder:"original-first"},ut=[ct],dt=(Object.entries({"en.wikipedia.org":{ignoreSelector:".button, code, footer, form, mark, pre, .mwe-math-element, .mw-editsection"},"news.ycombinator.com":{selector:"p, .titleline, .commtext, .hn-item-title, .hn-comment-text, .hn-story-title",keepSelector:"code, img, svg, pre, .sitebit",ignoreSelector:"button, code, footer, form, header, mark, nav, pre, .reply",autoScan:"false"},"twitter.com, https://x.com":{selector:"[data-testid='tweetText'], [data-testid='twitter-article-title'], [data-testid='UserDescription'], .public-DraftStyleDefault-block, span.text-body, div.css-175oi2r.r-3pj75a div.css-175oi2r>span, div.css-175oi2r.r-3pj75a li>span, div.r-1s2bzr4>div.r-16dba41, div.r-16y2uox>div.r-1jeg54m",keepSelector:"img, svg, a, span:has(a), div:has(a)",ignoreSelector:"[data-testid='videoPlayer'], [data-testid^='tweetTextarea']",autoScan:"false",selectStyle:"-webkit-line-clamp: unset; max-height: none; height: auto;"},"www.youtube.com/live_chat":{rootsSelector:"div#items",selector:"span.yt-live-chat-text-message-renderer",autoScan:"false"},"www.youtube.com":{rootsSelector:"ytd-page-manager",ignoreSelector:"aside, button, footer, form, header, pre, mark, nav, #player, #container, .caption-window, .ytp-settings-menu, #kiss-youtube-subtitle-list-container",selectStyle:"-webkit-line-clamp: unset; max-height: none; height: auto;",parentStyle:"-webkit-line-clamp: unset; max-height: none; height: auto;",grandStyle:"-webkit-line-clamp: unset; max-height: none; height: auto;"},"web.telegram.org":{autoScan:"false",selector:".text-content, .embedded-text-wrapper",rootsSelector:".Transition"},"github.com":{autoScan:"false",selector:'h1, h2, h3, h4, h5, h6, .markdown-body li, p, dd, blockquote, figcaption, label, legend, .user-profile-bio>div, [data-testid="results-list"] .search-match, .Subhead-description, [class^="prc-SelectPanel-Subtitle-"], [class^="prc-ActionList-ItemLabel-"], [role="dialog"] .overflow-auto, .h4, .repos-list-description, .discussion-title, [class*="PinnedIssue-module__Link"] span, .js-wiki-sidebar-page-container :is(.Truncate-text, .Link--primary)',ignoreSelector:"button, p.pinned-item-desc+p"}}).map(e=>{let[t,n]=e;return h(h({},n),{},{pattern:t})}),{DEBUG:{value:0,name:"DEBUG",color:"#6495ED"},INFO:{value:1,name:"INFO",color:"#4CAF50"},WARN:{value:2,name:"WARN",color:"#FFC107"},ERROR:{value:3,name:"ERROR",color:"#F44336"},SILENT:{value:4,name:"SILENT"}});const ht=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config={level:e.level||dt.INFO,prefix:e.prefix||"KISS-Translator"}}setLevel(e){let t;if("string"==typeof e){if(t=function(e){if("string"!=typeof e||0===e.length)return;const t=e.toUpperCase();return Object.values(dt).find(e=>e.name===t)}(e),!t)return void this.warn('Invalid log level name provided: "'.concat(e,'". Keeping current level.'))}else if("number"==typeof e){if(n=e,t=Object.values(dt).find(e=>e.value===n),!t)return void this.warn("Invalid log level value provided: ".concat(e,". Keeping current level."))}else{if(!e||"number"!=typeof e.value)return void this.warn("Invalid argument passed to setLevel. Must be a LogLevel object, number, or string.");t=e}var n;this.config.level.value!==t.value&&(this.config.level=t,console.log("[".concat(this.config.prefix,"] Log level dynamically set to ").concat(this.config.level.name)))}_log(e){if(e.value<this.config.level.value)return;const t=(new Date).toISOString(),n="[".concat(this.config.prefix,"]"),r="[".concat(e.name,"]"),i="undefined"!=typeof window&&void 0!==window.document;for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(i){this._getConsoleMethod(e)("%c".concat(t," %c").concat(n," %c").concat(r),"color: gray; font-weight: lighter;","color: #7c57e0; font-weight: bold;","color: ".concat(e.color,"; font-weight: bold;"),...a)}else{this._getConsoleMethod(e)(t,n,r,...a)}}_getConsoleMethod(e){switch(e){case dt.ERROR:return console.error;case dt.WARN:return console.warn;case dt.INFO:return console.info;default:return console.log}}debug(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(dt.DEBUG,...t)}info(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(dt.INFO,...t)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(dt.WARN,...t)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(dt.ERROR,...t)}},pt=ht.info.bind(ht),ft="toggleTranslate",gt="toggleStyle",mt="togglePopup",vt="openSetting",yt="KISS-Worker",bt="WebDAV",wt="GitHub Gist",xt={syncType:yt,syncUrl:"",syncUser:"",syncKey:"",syncMeta:{},subRulesSyncAt:0,dataCaches:{}},At="mobile",St=["AltLeft","KeyI"],kt={transOpen:!0,blacklist:"",apiSlug:B,fromLang:"auto",toLang:"en",triggerShortcut:St,triggerCount:1,triggerTime:200,transSign:"/",showDot:At},_t="click",Tt="hover",Et="select",Ct={transOpen:!0,blacklist:"",apiSlugs:[B],singleWordNoTrans:!1,fromLang:"auto",toLang:"zh-CN",toLang2:"en",tranboxShortcut:["AltLeft","KeyS"],btnOffsetX:0,btnOffsetY:0,boxOffsetX:0,boxOffsetY:10,hideTranBtn:!1,hideClickAway:!1,simpleStyle:!1,followSelection:!1,autoHeight:!1,triggerMode:_t,enDict:C,enSug:N},It="mobile_off",Pt={enabled:!0,apiSlug:B,segSlug:"-",chunkLength:1e3,longSentenceThreshold:120,useAlgorithmBreaker:"rule",preTrans:90,throttleTrans:30,toLang:"zh-CN",isBilingual:!0,blurTranslation:!1,skipAd:!1,windowStyle:"padding: 0.5em 1em;\nbackground-color: rgba(0, 0, 0, 0.5);\ncolor: white;\nline-height: 1.3;\ntext-shadow: 1px 1px 2px black;\ndisplay: inline-block",originStyle:"font-size: clamp(1rem, 2cqw, 3rem);",translationStyle:"font-size: clamp(1rem, 2cqw, 3rem);",hoverLookupMode:It,showList:It,hideSubtitleButton:!1,aiContextSlug:"-"},Lt={useMouseHover:!1,blacklist:"",mouseHoverKey:["ControlLeft"],mouseHoverKey2:[]},Rt={darkMode:"auto",uiLang:"en",minLength:2,maxLength:1e5,newlineLength:20,httpTimeout:p,clearCache:!1,injectRules:!0,fabClickAction:0,contextMenuType:1,subrulesList:[{url:"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json",selected:!0},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json",selected:!1},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json",selected:!1}],transApis:Pe,deletedTransApiSlugs:[],shortcuts:{[ft]:["AltLeft","KeyQ"],[gt]:["AltLeft","KeyC"],[mt]:["AltLeft","KeyK"],[vt]:["AltLeft","KeyO"]},inputRule:kt,tranboxSetting:Ct,touchModes:[2],blacklist:["https://fishjar.github.io/kiss-translator/options.html","https://translate.google.com","https://www.deepl.com/translator"].join(",\n"),iframeWhitelist:[].join(",\n"),csplist:[].join(",\n"),orilist:["https://dict.youdao.com"].join(",\n"),skipLangs:[],transInterval:100,langDetector:"-",mouseHoverSetting:Lt,preInit:!0,transAllnow:!1,subtitleSetting:Pt,logLevel:dt.INFO.value,rootMargin:500,customStyles:Qe},Nt='["en", "English - English"],\n["zh-CN", "Simplified Chinese - 简体中文"],\n["zh-TW", "Traditional Chinese - 繁體中文"],\n["ar", "Arabic - العربية"],\n["bg", "Bulgarian - Български"],\n["ca", "Catalan - Català"],\n["hr", "Croatian - Hrvatski"],\n["cs", "Czech - Čeština"],\n["da", "Danish - Dansk"],\n["nl", "Dutch - Nederlands"],\n["fi", "Finnish - Suomi"],\n["fr", "French - Français"],\n["de", "German - Deutsch"],\n["el", "Greek - Ελληνικά"],\n["hi", "Hindi - हिन्दी"],\n["hu", "Hungarian - Magyar"],\n["id", "Indonesian - Indonesia"],\n["it", "Italian - Italiano"],\n["ja", "Japanese - 日本語"],\n["ko", "Korean - 한국어"],\n["ms", "Malay - Melayu"],\n["mt", "Maltese - Malti"],\n["nb", "Norwegian - Norsk Bokmål"],\n["pl", "Polish - Polski"],\n["pt", "Portuguese - Português"],\n["ro", "Romanian - Română"],\n["ru", "Russian - Русский"],\n["sk", "Slovak - Slovenčina"],\n["sl", "Slovenian - Slovenščina"],\n["es", "Spanish - Español"],\n["sv", "Swedish - Svenska"],\n["ta", "Tamil - தமிழ்"],\n["te", "Telugu - తెలుగు"],\n["th", "Thai - ไทย"],\n["tr", "Turkish - Türkçe"],\n["uk", "Ukrainian - Українська"],\n["vi", "Vietnamese - Tiếng Việt"],\n',Ot='// 请求数据默认格式\n{\n  "url": "{{url}}",\n  "method": "POST",\n  "headers": {\n    "Content-type": "application/json",\n    "Authorization": "Bearer {{key}}"\n  },\n  "body": {\n    "text": "{{text}}", // 待翻译文字\n    "from": "{{from}}", // 文字的语言(可能为空)\n    "to": "{{to}}",     // 目标语言\n  },\n}\n\n\n// 返回数据默认格式\n{\n  text: "", // 翻译后的文字\n  from: "", // 识别的源语言\n  to: "",   // 目标语言(可选)\n}\n\n\n// Hook 范例\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n  headers: {\n      "Content-type": "application/json",\n  },\n  method: "GET",\n  body: null,\n}]\n\n// Response Hook\n// 其中返回数组第一个值表示译文字符串,第二个值为布尔值,表示原文语言与目标语言是否相同\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(" "), to === res.src]\n\n\n// 支持的语言代码如下\n'.concat(Nt,"\n"),jt='// Default request\n{\n  "url": "{{url}}",\n  "method": "POST",\n  "headers": {\n    "Content-type": "application/json",\n    "Authorization": "Bearer {{key}}"\n  },\n  "body": {\n    "text": "{{text}}", // Text to be translated\n    "from": "{{from}}", // The language of the text (may be empty)\n    "to": "{{to}}",     // Target language\n  },\n}\n\n\n// Default response\n{\n  text: "", // translated text\n  from: "", // Recognized source language\n  to: "",   // Target language (optional)\n}\n\n\n/// Hook Example\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n  headers: {\n      "Content-type": "application/json",\n  },\n  method: "GET",\n  body: null,\n}]\n\n// Response Hook\n// In the returned array, the first value is the translated string, while the second value is a boolean\n// that indicates whether the source language is the same as the target language.\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(" "), to === res.src]\n\n\n// The supported language codes are as follows\n'.concat(Nt,"\n"),zt="1、第一个参数包含如下字段:'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2、返回值必须是包含以下字段的对象: 'url', 'body', 'headers', 'method'\n3、如返回空值,则hook函数不会产生任何效果。\n\n// 示例\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n  return { url, body, headers, userMsg, method };\n}",Mt="1. The first parameter contains the following fields: 'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2. The return value must be an object containing the following fields: 'url', 'body', 'headers', 'method'\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n  return { url, body, headers, userMsg, method };\n}",Dt="1、第一个参数包含如下字段:'res', ...\n2、返回值必须是包含以下字段的对象: 'translations'\n  ('translations' 应为一个二维数组:[[译文, 原文语言]])\n3、如返回空值,则hook函数不会产生任何效果。\n\n// 示例\nasync ({ res, ...args }) => {\n  const translations = [[\"你好\", \"en\"]];\n  const modelMsg = {}; // 用于AI上下文\n  return { translations, modelMsg };\n}",Bt="1. The first parameter contains the following fields: 'res', ...\n2. The return value must be an object containing the following fields: 'translations'\n  ('translations' should be a two-dimensional array: [[translation, source language]]).\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync ({ res, ...args }) => {\n  const translations = [[\"你好\", \"en\"]];\n  const modelMsg = {}; // For AI context\n  return { translations, modelMsg };\n}",Ft={app_name:{zh:"简约翻译",en:"KISS Translator",zh_TW:"簡約翻譯",ja:"KISS Translator",ko:"KISS Translator"},translate:{zh:"翻译",en:"Translate",zh_TW:"翻譯",ja:"翻訳",ko:"번역"},custom_api_help:{zh:Ot,en:jt,zh_TW:Ot,ja:jt,ko:jt},request_hook_helper:{zh:zt,en:Mt,zh_TW:zt,ja:Mt,ko:Mt},response_hook_helper:{zh:Dt,en:Bt,zh_TW:Dt,ja:Bt,ko:Bt},translate_alt:{zh:"翻译",en:"Translate",zh_TW:"翻譯",ja:"翻訳",ko:"번역"},basic_setting:{zh:"基本设置",en:"Basic Setting",zh_TW:"基本設定",ja:"基本設定",ko:"기본 설정"},rules_setting:{zh:"规则设置",en:"Rules Setting",zh_TW:"規則設定",ja:"ルール設定",ko:"규칙 설정"},apis_setting:{zh:"接口设置",en:"Apis Setting",zh_TW:"API設定",ja:"API設定",ko:"API 설정"},sync_setting:{zh:"同步设置",en:"Sync Setting",zh_TW:"同步設定",ja:"同期設定",ko:"동기화 설정"},patch_setting:{zh:"补丁设置",en:"Patch Setting",zh_TW:"修補設定",ja:"パッチ設定",ko:"패치 설정"},patch_setting_help:{zh:"针对一些特殊网站的修正脚本,以便翻译软件得到更好的展示效果。",en:"Corrected scripts for some special websites so that the translation software can get better display results.",zh_TW:"針對某些特殊網站的修正腳本,讓翻譯軟體有更好的顯示效果。",ja:"一部の特殊なウェブサイト用の修正スクリプトで、翻訳ソフトウェアの表示効果を向上させます。",ko:"일부 특수 웹사이트를 위한 수정 스크립트로, 번역 소프트웨어의 표시 효과를 개선합니다."},inject_webfix:{zh:"注入修复补丁",en:"Inject Webfix",zh_TW:"注入修正補丁",ja:"Webfixを注入",ko:"웹 수정 패치 주입"},about:{zh:"关于",en:"About",zh_TW:"關於",ja:"概要",ko:"정보"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md",ja:"README.ja.md",ko:"README.ko.md"},about_md_local:{zh:"请 [点击这里](".concat("https://github.com/fishjar/kiss-translator",") 查看详情。"),en:"Please [click here](".concat("https://github.com/fishjar/kiss-translator",") for details."),zh_TW:"請 [點這裡](".concat("https://github.com/fishjar/kiss-translator",") 檢視詳細內容。"),ja:"詳細は [こちら](".concat("https://github.com/fishjar/kiss-translator",") をクリックしてください。"),ko:"자세한 내용은 [여기](".concat("https://github.com/fishjar/kiss-translator",")를 클릭하세요.")},ui_lang:{zh:"界面语言",en:"Interface Language",zh_TW:"介面語言",ja:"インターフェース言語",ko:"인터페이스 언어"},fetch_limit:{zh:"最大并发请求数量 (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"最大同時請求數量 (1-100)",ja:"最大同時リクエスト数 (1-100)",ko:"최대 동시 요청 수 (1-100)"},if_think:{zh:"启用或禁用模型的深度思考能力",en:"Enable or disable the model’s thinking behavior ",zh_TW:"啟用或停用模型的深度思考能力",ja:"モデルの思考行動を有効または無効にする",ko:"모델의 사고 행동 활성화 또는 비활성화"},think:{zh:"启用深度思考",en:"enable thinking",zh_TW:"啟用深度思考",ja:"思考を有効にする",ko:"사고 활성화"},nothink:{zh:"禁用深度思考",en:"disable thinking",zh_TW:"停用深度思考",ja:"思考を無効にする",ko:"사고 비활성화"},think_ignore:{zh:"忽略以下模型的<think>输出,逗号(,)分割,当模型支持思考但ollama不支持时需要填写本参数",en:"Ignore the <think> block for the following models, comma (,) separated",zh_TW:"忽略以下模型的 <think> 輸出,以逗號 (,) 分隔;當模型支援思考但 ollama 不支援時需要填寫此參數",ja:"以下のモデルの<think>出力を無視する (コンマ(,)区切り)。モデルが思考をサポートしているが、ollamaがサポートしていない場合に記入が必要です",ko:"다음 모델의 <think> 블록 무시 (쉼표(,)로 구분), 모델이 사고를 지원하지만 ollama가 지원하지 않는 경우 이 매개변수를 입력해야 합니다"},thinking_mode:{zh:"思考模式",en:"Thinking Mode",zh_TW:"思考模式",ja:"思考モード",ko:"사고 모드"},thinking_mode_default:{zh:"接口默认",en:"API Default",zh_TW:"介面預設",ja:"APIデフォルト",ko:"API 기본값"},thinking_mode_enabled:{zh:"开启思考",en:"Enable Thinking",zh_TW:"開啟思考",ja:"思考を有効",ko:"사고 활성화"},thinking_mode_disabled:{zh:"关闭思考",en:"Disable Thinking",zh_TW:"關閉思考",ja:"思考を無効",ko:"사고 비활성화"},thinking_mode_helper:{zh:"目前各家接口混乱,如果出现异常,请使用接口默认选项",en:'The thinking parameters vary across APIs. If you encounter errors, please use the "API Default" option.',zh_TW:"目前各家介面混亂,如果出現異常,請使用介面預設選項",ja:"各APIの思考パラメータは統一されていません。エラーが発生した場合は「APIデフォルト」を使用してください。",ko:'API별 사고 매개변수가 통일되어 있지 않습니다. 오류 발생 시 "API 기본값"을 사용하세요.'},thinking_effort:{zh:"思考强度",en:"Thinking Effort",zh_TW:"思考強度",ja:"思考レベル",ko:"사고 수준"},thinking_effort_default:{zh:"接口默认",en:"API Default",zh_TW:"介面預設",ja:"APIデフォルト",ko:"API 기본값"},fetch_interval:{zh:"每次请求间隔时间 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"每次請求間隔時間 (0-5000ms)",ja:"リクエスト間隔 (0-5000ms)",ko:"요청 간 시간 (0-5000ms)"},translate_interval:{zh:"翻译间隔时间 (1-2000ms)",en:"Translation Interval (1-2000ms)",zh_TW:"翻譯間隔時間 (1-2000ms)",ja:"翻訳間隔 (1-2000ms)",ko:"번역 간격 (1-2000ms)"},http_timeout:{zh:"请求超时时间 (100-600000ms)",en:"Request Timeout Time (100-600000ms)",zh_TW:"請求逾時時間 (100-60000ms)",ja:"リクエストタイムアウト (100-600000ms)",ko:"요청 시간 초과 (100-600000ms)"},custom_header:{zh:"自定义Header参数",en:"Custom Header Params",zh_TW:"自訂 Header 參數",ja:"カスタムヘッダー",ko:"사용자 지정 헤더"},custom_header_help:{zh:'使用JSON格式,例如 "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"',en:'Use JSON format, for example "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"',zh_TW:'使用JSON格式,例如 "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"',ja:'JSON形式を使用してください。例: "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"',ko:'JSON 형식을 사용하세요. 예: "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"'},custom_body:{zh:"自定义Body参数",en:"Custom Body Params",zh_TW:"自訂 Body 參數",ja:"カスタムボディ",ko:"사용자 지정 바디"},custom_body_help:{zh:'使用JSON格式,例如 "top_p": 0.7',en:'Use JSON format, for example "top_p": 0.7',zh_TW:'使用JSON格式,例如 "top_p": 0.7',ja:'JSON形式を使用してください。例: "top_p": 0.7',ko:'JSON 형식을 사용하세요. 예: "top_p": 0.7'},min_translate_length:{zh:"最小翻译字符数 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"最小翻譯字元數 (1-100)",ja:"最小翻訳文字数 (1-100)",ko:"최소 번역 문자 수 (1-100)"},max_translate_length:{zh:"最大翻译字符数 (100-100000)",en:"Maximum number Of Translated Characters (100-100000)",zh_TW:"最大翻譯字元數 (100-100000)",ja:"最大翻訳文字数 (100-100000)",ko:"최대 번역 문자 수 (100-100000)"},num_of_newline_characters:{zh:"换行字符数 (1-1000)",en:"Number of Newline Characters (1-1000)",zh_TW:"換行字元數 (1-1000)",ja:"改行文字数 (1-1000)",ko:"줄바꿈 문자 수 (1-1000)"},translate_service:{zh:"翻译服务",en:"Translate Service",zh_TW:"翻譯服務",ja:"翻訳サービス",ko:"번역 서비스"},translate_service_multiple:{zh:"翻译服务 (支持多选)",en:"Translation service (multiple supported)",zh_TW:"翻譯服務 (支援多選)",ja:"翻訳サービス (複数選択可)",ko:"번역 서비스 (다중 선택 지원)"},single_word_no_trans:{zh:"单个单词划词不调用翻译服务",en:"Do not use translation services for single word",zh_TW:"選取單一單字時不呼叫翻譯服務",ja:"単一単語は翻訳サービスを使用しない",ko:"단일 단어는 번역 서비스를 사용하지 않음"},translate_timing:{zh:"翻译时机",en:"Translate Timing",zh_TW:"翻譯時機",ja:"翻訳タイミング",ko:"번역 시점"},mk_pagescroll:{zh:"滚动加载翻译(推荐)",en:"Rolling Loading (Suggested)",zh_TW:"滾動載入翻譯(建議)",ja:"スクロール翻訳 (推奨)",ko:"스크롤 번역 (권장)"},mk_pageopen:{zh:"立即全部翻译",en:"Translate all now",zh_TW:"立即全部翻譯",ja:"すぐにすべて翻訳",ko:"즉시 모두 번역"},mk_mouseover:{zh:"鼠标悬停翻译",en:"Mouseover",zh_TW:"滑鼠懸停翻譯",ja:"マウスオーバー翻訳",ko:"마우스오버 번역"},mk_ctrlKey:{zh:"Control + 鼠标悬停",en:"Control + Mouseover",zh_TW:"Control + 滑鼠懸停",ja:"Control + マウスオーバー",ko:"Control + 마우스오버"},mk_shiftKey:{zh:"Shift + 鼠标悬停",en:"Shift + Mouseover",zh_TW:"Shift + 滑鼠懸停",ja:"Shift + マウスオーバー",ko:"Shift + 마우스오버"},mk_altKey:{zh:"Alt + 鼠标悬停",en:"Alt + Mouseover",zh_TW:"Alt + 滑鼠懸停",ja:"Alt + マウスオーバー",ko:"Alt + 마우스오버"},from_lang:{zh:"原文语言",en:"Source Language",zh_TW:"原文語言",ja:"原文の言語",ko:"원본 언어"},to_lang:{zh:"目标语言",en:"Target Language",zh_TW:"目標語言",ja:"翻訳先の言語",ko:"대상 언어"},to_lang2:{zh:"第二目标语言",en:"Target Language 2",zh_TW:"第二目標語言",ja:"第二翻訳先の言語",ko:"두 번째 대상 언어"},to_lang2_helper:{zh:"设定后,与目标语言产生互译效果,但依赖远程语言识别。",en:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition.",zh_TW:"設定後會與目標語言互譯,但依賴遠端語言偵測。",ja:"設定後、ターゲット言語との相互翻訳が可能になりますが、リモート言語認識に依存します。",ko:"설정 후, 대상 언어와 상호 번역 효과가 발생하지만, 원격 언어 인식에 의존합니다."},text_style:{zh:"译文样式",en:"Text Style",zh_TW:"譯文樣式",ja:"翻訳テキストスタイル",ko:"번역 텍스트 스타일"},text_style_alt:{zh:"译文样式",en:"Text Style",zh_TW:"譯文樣式",ja:"翻訳テキストスタイル",ko:"번역 텍스트 스타일"},bg_color:{zh:"样式颜色",en:"Style Color",zh_TW:"樣式顏色",ja:"スタイルカラー",ko:"스타일 색상"},remain_unchanged:{zh:"保留不变",en:"Remain Unchanged",zh_TW:"保留不變",ja:"変更しない",ko:"변경하지 않음"},google_api:{zh:"谷歌翻译接口",en:"Google Translate API",zh_TW:"Google 翻譯介面",ja:"Google 翻訳 API",ko:"Google 번역 API"},default_selector:{zh:"默认选择器",en:"Default selector",zh_TW:"預設選擇器",ja:"デフォルトセレクタ",ko:"기본 선택자"},selector_rules:{zh:"选择器规则",en:"Selector Rules",zh_TW:"選擇器規則",ja:"セレクタールール",ko:"선택자 규칙"},save:{zh:"保存",en:"Save",zh_TW:"儲存",ja:"保存",ko:"저장"},edit:{zh:"编辑",en:"Edit",zh_TW:"編輯",ja:"編集",ko:"수정"},cancel:{zh:"取消",en:"Cancel",zh_TW:"取消",ja:"キャンセル",ko:"취소"},delete:{zh:"删除",en:"Delete",zh_TW:"刪除",ja:"削除",ko:"삭제"},reset:{zh:"重置",en:"Reset",zh_TW:"重設",ja:"リセット",ko:"초기화"},add:{zh:"添加",en:"Add",zh_TW:"新增",ja:"追加",ko:"추가"},bulk_actions:{zh:"批量操作",en:"Bulk Actions",zh_TW:"批量操作",ja:"一括操作",ko:"일괄 작업"},select_all:{zh:"全选",en:"Select All",zh_TW:"全選",ja:"すべて選択",ko:"모두 선택"},deselect_all:{zh:"全不选",en:"Deselect All",zh_TW:"全部取消選取",ja:"すべて解除",ko:"모두 해제"},pin_to_top:{zh:"置顶",en:"Pin to Top",zh_TW:"置頂",ja:"先頭に固定",ko:"맨 위에 고정"},delete_selected_apis_confirm:{zh:"确定删除已选的 {count} 个接口吗?",en:"Delete {count} selected interfaces?",zh_TW:"確定刪除已選的 {count} 個介面嗎?",ja:"選択した {count} 件のインターフェースを削除しますか?",ko:"선택한 인터페이스 {count}개를 삭제할까요?"},copy_api:{zh:"复制接口",en:"Copy Interface",zh_TW:"複製介面",ja:"インターフェースをコピー",ko:"인터페이스 복사"},inject_rules:{zh:"注入订阅规则",en:"Inject Subscribe Rules",zh_TW:"注入訂閱規則",ja:"購読ルールを注入",ko:"구독 규칙 주입"},personal_rules:{zh:"个人规则",en:"Rules",zh_TW:"個人規則",ja:"個人ルール",ko:"개인 규칙"},subscribe_rules:{zh:"订阅规则",en:"Subscribe",zh_TW:"訂閱規則",ja:"購読ルール",ko:"구독 규칙"},overwrite_subscribe_rules:{zh:"覆写订阅规则",en:"Overwrite",zh_TW:"覆寫訂閱規則",ja:"購読ルールを上書き",ko:"구독 규칙 덮어쓰기"},subscribe_url:{zh:"订阅地址",en:"Subscribe URL",zh_TW:"訂閱網址",ja:"購読URL",ko:"구독 URL"},rules_warn_1:{zh:'1、规则生效的优先级依次为:个人规则 > 订阅规则 > 全局规则。"全局规则"相当于兜底规则。',en:'1. The priority of rules is: personal rules > subscription rules > global rules. "Global rules" are like a fallback rule.',zh_TW:"1. 規則生效的優先順序依序為:個人規則 > 訂閱規則 > 全域規則。「全域規則」相當於備援規則。",ja:"1. ルールの優先順位: 個人ルール > 購読ルール > グローバルルール。「グローバルルール」はフォールバックルールのようなものです。",ko:'1. 규칙 우선순위: 개인 규칙 > 구독 규칙 > 전역 규칙. "전역 규칙"은 일종의 폴백(fallback) 규칙입니다.'},rules_warn_2:{zh:"2、“订阅规则”选择注入后才会生效。",en:'2. "Subscription rules" will take effect only after injection is selected.',zh_TW:"2、「訂閱規則」選擇注入後才會生效。",ja:"2. 「購読ルール」は注入を選択した後にのみ有効になります。",ko:'2. "구독 규칙"은 주입을 선택한 후에만 적용됩니다.'},rules_warn_3:{zh:"3、关于规则填写:输入框留空或下拉框选“*”表示采用全局规则。CSS选择器支持 + 号前缀表示在全局规则基础上追加,- 号表示剔除。",en:'3. Regarding filling in the rules: Leave the input box blank or select "*" in the drop-down box to use global rule. CSS selectors support prefixes: "+" means add to the global rules, "-" means exclude.',zh_TW:"3. 規則填寫說明:輸入框留空或下拉選擇「*」表示使用全域規則。CSS 選擇器支援使用前綴:「+」表示在全域規則基礎上新增,「-」表示排除。",ja:"3. ルールの記入について: 入力ボックスを空白にするか、ドロップダウンで「*」を選択すると、グローバルルールが使用されます。CSS セレクターはプレフィックスに対応しています。「+」はグローバルルールへの追加、「-」は除外を意味します。",ko:'3. 규칙 작성 관련: 입력란을 비워두거나 드롭다운에서 "*"를 선택하면 전역 규칙이 사용됩니다. CSS 선택자는 접두사를 지원합니다. "+"는 전역 규칙에 추가, "-"는 제외를 의미합니다.'},sync_warn:{zh:"涉及隐私数据的同步请谨慎选择第三方同步服务,建议自行搭建 kiss-worker 或 WebDAV 服务。",en:"When synchronizing data that involves privacy, please be cautious about choosing third-party sync services. It is recommended to set up your own sync service using kiss-worker or WebDAV.",zh_TW:"同步涉及隱私資料時,請謹慎選擇第三方同步服務;建議自行架設 kiss-worker 或 WebDAV 服務。",ja:"プライバシーに関わるデータを同期する場合、サードパーティの同期サービスは慎重に選択してください。kiss-worker や WebDAV サービスを自己ホスティングすることをお勧めします。",ko:"개인정보가 포함된 데이터를 동기화할 경우, 타사 동기화 서비스 선택에 신중을 기하십시오. 자체 kiss-worker 또는 WebDAV 서비스를 구축하는 것을 권장합니다."},sync_warn_2:{zh:"如果服务器存在其他客户端同步的数据,第一次同步将直接覆盖本地配置,后面则根据修改时间,新的覆盖旧的。",en:"If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.",zh_TW:"若伺服器上存在其他用戶端同步的資料,第一次同步會直接覆蓋本機設定;之後則依修改時間,由新的覆蓋舊的。",ja:"サーバーに他のクライアントによって同期されたデータがある場合、最初の同期はローカル設定を直接上書きし、その後は変更時間に応じて新しいものが古いものを上書きします。",ko:"서버에 다른 클라이언트가 동기화한 데이터가 있는 경우, 첫 번째 동기화는 로컬 구성을 직접 덮어쓰며, 이후에는 수정 시간에 따라 새 항목이 기존 항목을 덮어씁니다."},about_sync_api:{zh:"自建kiss-wroker数据同步服务",en:"Self-hosting a Kiss-worker data sync service",zh_TW:"自行架設 kiss-worker 資料同步服務",ja:"Kiss-worker データ同期サービスをセルフホストする",ko:"Kiss-worker 데이터 동기화 서비스 자체 호스팅"},about_api:{zh:"1、其中 BuiltinAI 为浏览器内置AI翻译,目前仅 Chrome 138 及以上版本得到支持。",en:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above.",zh_TW:"1.其中 BuiltinAI 為瀏覽器內建AI翻譯,目前僅 Chrome 138 以上版本支援。",ja:"1. BuiltinAI はブラウザ内蔵のAI翻訳で、現在 Chrome 138 以降のバージョンでのみサポートされています。",ko:"1. BuiltinAI는 브라우저 내장 AI 번역으로, 현재 Chrome 138 이상 버전에서만 지원됩니다."},about_api_2:{zh:"2、大部分AI接口都与OpenAI兼容,因此选择OpenAI类型即可。“是否聚合发送翻译请求”所对应的 Prompt 并不相同,并且不是所有接口都支持聚合翻译。",en:"2. Most AI interfaces are compatible with OpenAI, so you can simply select the OpenAI type. The prompts corresponding to “Whether to aggregate translation requests” are different, and not all interfaces support aggregated translation.",zh_TW:"2. 大部分的 AI 介面都與 OpenAI 相容,因此選擇 OpenAI 類型即可。「是否彙整發送翻譯請求」所對應的 Prompt 並不相同,並且不是所有介面都支援彙整翻譯。",ja:"2. ほとんどの AI インターフェースは OpenAI と互換性があるため、OpenAI タイプを選択すれば問題ありません。「翻訳リクエストをまとめて送信するかどうか」に対応するプロンプトは異なり、すべてのインターフェースが集約翻訳をサポートしているわけではありません。",ko:"2. 대부분의 AI 인터페이스는 OpenAI와 호환되므로 OpenAI 유형을 선택하면 됩니다. “번역 요청을 집합적으로 보낼지 여부”에 대응하는 프롬프트는 서로 다르며, 모든 인터페이스가 집합 번역을 지원하는 것은 아닙니다."},about_api_3:{zh:"3、理论上,所有翻译接口,都可以通过自定义接口 (Custom) 的形式使用。",en:"3. In theory, all translation interfaces can be used by configuring them as a custom interface.",zh_TW:"3. 理論上,所有翻譯介面都可以透過自訂介面(Custom)的方式來使用。",ja:"3. 理論的には、すべての翻訳インターフェースはカスタム(Custom)インターフェースとして設定することで利用できます。",ko:"3. 이론적으로 모든 번역 인터페이스는 커스텀(Custom) 인터페이스로 설정하여 사용할 수 있습니다."},about_api_proxy:{zh:"查看自建一个翻译接口代理",en:"Check out the self-built translation interface proxy",zh_TW:"檢視如何自行架設翻譯介面 Proxy",ja:"自作の翻訳インターフェースプロキシをチェックする",ko:"자체 구축 번역 인터페이스 프록시 확인하기"},setting_helper:{zh:"新旧配置并不兼容,导出的旧版配置,勿再次导入。",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"新舊設定並不相容,匯出的舊版設定請勿再次匯入。",ja:"新旧の設定に互換性はありません。エクスポートした古い設定を再度インポートしないでください。",ko:"이전 구성과 새 구성은 호환되지 않습니다. 내보낸 이전 구성을 다시 가져오지 마십시오."},style_none:{zh:"无",en:"None",zh_TW:"無",ja:"なし",ko:"없음"},under_line:{zh:"下划直线",en:"Underline",zh_TW:"下劃直線",ja:"下線",ko:"밑줄"},dot_line:{zh:"下划点状线",en:"Dotted Underline",zh_TW:"下劃點狀線",ja:"点線の下線",ko:"점선 밑줄"},dash_line:{zh:"下划虚线",en:"Dashed Underline",zh_TW:"下劃虛線",ja:"破線の下線",ko:"파선 밑줄"},dash_box:{zh:"虚线框",en:"Dashed Box",zh_TW:"虛線框",ja:"破線ボックス",ko:"파선 상자"},dash_line_bold:{zh:"下划虚线加粗",en:"Dashed Underline Bold",zh_TW:"下劃虛線",ja:"破線の下線 (太字)",ko:"굵은 파선 밑줄"},dash_box_bold:{zh:"虚线框加粗",en:"Dashed Box Bold",zh_TW:"虛線框加粗",ja:"破線ボックス (太字)",ko:"굵은 파선 상자"},marker:{zh:"马克笔",en:"Marker",zh_TW:"馬克筆",ja:"マーカー",ko:"마커"},gradient_marker:{zh:"渐变马克笔",en:"Gradient Marker",zh_TW:"漸層馬克筆",ja:"グラデーションマーカー",ko:"그라데이션 마커"},wavy_line:{zh:"下划波浪线",en:"Wavy Underline",zh_TW:"下劃波浪線",ja:"波線の下線",ko:"물결 밑줄"},wavy_line_bold:{zh:"下划波浪线加粗",en:"Wavy Underline Bold",zh_TW:"下劃波浪線加粗",ja:"波線の下線 (太字)",ko:"굵은 물결 밑줄"},fuzzy:{zh:"模糊",en:"Fuzzy",zh_TW:"模糊",ja:"ぼかし",ko:"흐림"},highlight:{zh:"高亮",en:"Highlight",zh_TW:"反白標示",ja:"ハイライト",ko:"하이라이트"},blockquote:{zh:"引用",en:"Blockquote",zh_TW:"引用",ja:"引用",ko:"인용"},gradient:{zh:"渐变",en:"Gradient",zh_TW:"漸變",ja:"グラデーション",ko:"그라데이션"},blink:{zh:"闪现",en:"Blink",zh_TW:"閃現",ja:"点滅",ko:"깜박임"},glow:{zh:"发光",en:"Glow",zh_TW:"發光",ja:"発光",ko:"발광"},colorful:{zh:"多彩",en:"Colorful",zh_TW:"多彩",ja:"カラフル",ko:"다채롭게"},setting:{zh:"设置",en:"Setting",zh_TW:"設定",ja:"設定",ko:"설정"},pattern:{zh:"匹配网址",en:"URL pattern",zh_TW:"匹配網址",ja:"URLパターン",ko:"URL 패턴"},pattern_helper:{zh:"1、支持星号(*)通配符。2、多个URL用换行或英文逗号“,”分隔。",en:'1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas ",".',zh_TW:"1. 支援星號 (*) 萬用字元。2. 多個 URL 請以換行或英文逗號「,」分隔。",ja:"1. アスタリスク (*) ワイルドカードをサポートします。 2. 複数のURLは改行または英語のコンマ「,」で区切ります。",ko:'1. 별표(*) 와일드카드 문자를 지원합니다. 2. 여러 URL은 줄바꿈 또는 영어 쉼표 ","로 구분합니다.'},selector_helper:{zh:"1、需要翻译的目标元素。2、开启自动扫描页面后,本设置无效。3、遵循CSS选择器语法。",en:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax.",zh_TW:"1、需要翻譯的目標元素。 2.開啟自動掃描頁面後,本設定無效。 3.遵循CSS選擇器語法。",ja:"1. 翻訳対象の要素。 2. ページの自動スキャンを有効にすると、この設定は無効になります。 3. CSSセレクタ構文に従ってください。",ko:"1. 번역할 대상 요소입니다. 2. 자동 페이지 스캔이 활성화되면 이 설정은 무효화됩니다. 3. CSS 선택자 구문을 따릅니다."},translate_switch:{zh:"开启翻译",en:"Translate Switch",zh_TW:"開啟翻譯",ja:"翻訳を有効にする",ko:"번역 켜기"},default_enabled:{zh:"默认开启",en:"Enabled",zh_TW:"預設開啟",ja:"デフォルトで有効",ko:"기본으로 사용"},default_disabled:{zh:"默认关闭",en:"Disabled",zh_TW:"預設關閉",ja:"デフォルトで無効",ko:"기본으로 사용 안함"},selector:{zh:"选择器",en:"Selector",zh_TW:"選擇器",ja:"セレクタ",ko:"선택자"},target_selector:{zh:"目标元素选择器",en:"Target element selector",zh_TW:"目標元素選擇器",ja:"対象要素セレクタ",ko:"대상 요소 선택자"},keep_selector:{zh:"保留元素选择器",en:"Keep unchanged selector",zh_TW:"保留元素選擇器",ja:"保持要素セレクタ",ko:"유지할 요소 선택자"},keep_selector_helper:{zh:"1、目标元素下面需要原样保留的子节点。2、遵循CSS选择器语法。",en:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax.",zh_TW:"1. 目標元素下的子節點需要保持原樣。 2. 遵循 CSS 選擇器語法。",ja:"1. 対象要素の下にある、そのまま保持する必要がある子ノード。 2. CSSセレクタ構文に従ってください。",ko:"1. 대상 요소 아래의 자식 노드 중 그대로 유지해야 하는 노드. 2. CSS 선택자 구문을 따릅니다."},block_selector:{zh:"块级元素选择器",en:"Block element selector",zh_TW:"區塊元素選擇器",ja:"ブロック要素セレクタ",ko:"블록 요소 선택자"},block_selector_helper:{zh:"1、匹配到的元素会被当作块级节点处理。2、遵循CSS选择器语法。",en:"1. Matched elements will be treated as block nodes. 2. Follow the CSS selector syntax.",zh_TW:"1. 符合的元素會被當作區塊節點處理。2. 遵循 CSS 選擇器語法。",ja:"1. 一致した要素はブロックノードとして扱われます。2. CSSセレクタ構文に従ってください。",ko:"1. 일치하는 요소는 블록 노드로 처리됩니다. 2. CSS 선택자 구문을 따르세요."},root_selector:{zh:"根节点选择器",en:"Root node selector",zh_TW:"根節點選擇器",ja:"ルートノードセレクタ",ko:"루트 노드 선택자"},root_selector_helper:{zh:"1、用于缩小页面翻译范围。2、遵循CSS选择器语法。",en:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax.",zh_TW:"1.用於縮小頁面翻譯範圍。 2、遵循CSS選擇器語法。",ja:"1. ページの翻訳範囲を絞り込むために使用します。 2. CSSセレクタ構文に従ってください。",ko:"1. 페이지의 번역 범위를 좁히는 데 사용됩니다. 2. CSS 선택자 구문을 따릅니다."},ignore_selector:{zh:"不翻译节点选择器",en:"Ignore node selectors",zh_TW:"不翻譯節點選擇器",ja:"翻訳しないノードセレクタ",ko:"번역 무시 노드 선택자"},ignore_selector_helper:{zh:"1、需要忽略的节点。2、遵循CSS选择器语法。",en:"1. Nodes to be ignored. 2. Follow CSS selector syntax.",zh_TW:"1、需要忽略的節點。 2、遵循CSS選擇器語法。",ja:"1. 無視するノード。 2. CSSセレクタ構文に従ってください。",ko:"1. 무시할 노드. 2. CSS 선택자 구문을 따릅니다."},terms:{zh:"专业术语",en:"Terms",zh_TW:"專業術語",ja:"専門用語",ko:"전문 용어"},terms_helper:{zh:"1、支持正则表达式匹配,无需斜杆,不支持修饰符。2、多条术语用换行或分号“;”隔开。3、术语和译文用英文逗号“,”隔开。4、没有译文视为不翻译术语。",en:'1. Supports regular expression matching, no slash required, and no modifiers are supported. 2. Separate multiple terms with newlines or semicolons ";". 3. Terms and translations are separated by English commas ",". 4. If there is no translation, the term will be deemed not to be translated.',zh_TW:"1. 支援正規表示式比對,不需斜線,且不支援修飾符。2. 多條術語以換行或分號「;」分隔。3. 術語與譯文以英文逗號「,」分隔。4. 無譯文者視為不翻譯該術語。",ja:"1. 正規表現マッチングをサポート (スラッシュ不要、修飾子非対応)。 2. 複数の用語は改行またはセミコロン「;」で区切ります。 3. 用語と翻訳は英語のコンマ「,」で区切ります。 4. 翻訳がない場合は、その用語を翻訳しないものとみなします。",ko:'1. 정규식 일치를 지원하며, 슬래시가 필요 없고 수정자는 지원되지 않습니다. 2. 여러 용어는 줄바꿈 또는 세미콜론 ";"으로 구분합니다. 3. 용어와 번역은 영어 쉼표 ","로 구분합니다. 4. 번역이 없는 경우 해당 용어를 번역하지 않는 것으로 간주합니다.'},ai_terms:{zh:"AI专业术语",en:"AI Terms",zh_TW:"AI專業術語",ja:"AI専門用語",ko:"AI 전문 용어"},ai_terms_helper:{zh:"1、AI智能替换,不支持正则表达式。2、多条术语用换行或分号“;”隔开。3、术语和译文用英文逗号“,”隔开。4、没有译文视为不翻译术语。",en:'1. AI intelligent replacement does not support regular expressions.2. Separate multiple terms with newlines or semicolons ";". 3. Terms and translations are separated by English commas ",". 4. If there is no translation, the term will be deemed not to be translated.',zh_TW:"1. AI 智慧替換,不支援正規表示式。2. 多條術語以換行或分號「;」分隔。3. 術語與譯文以英文逗號「,」分隔。4. 無譯文者視為不翻譯該術語。",ja:"1. AIによるインテリジェントな置換 (正規表現非対応)。 2. 複数の用語は改行またはセミコロン「;」で区切ります。 3. 用語と翻訳は英語のコンマ「,」で区切ります。 4. 翻訳がない場合は、その用語を翻訳しないものとみなします。",ko:'1. AI 지능형 대체, 정규식을 지원하지 않습니다. 2. 여러 용어는 줄바꿈 또는 세미콜론 ";"으로 구분합니다. 3. 용어와 번역은 영어 쉼표 ","로 구분합니다. 4. 번역이 없는 경우 해당 용어를 번역하지 않는 것으로 간주합니다.'},text_ext_style:{zh:"译文附加样式",en:"Translation additional styles",zh_TW:"譯文附加樣式",ja:"翻訳の追加スタイル",ko:"번역 추가 스타일"},selector_style:{zh:"选择器节点样式",en:"Selector Style",zh_TW:"選擇器節點樣式",ja:"セレクタノードスタイル",ko:"선택자 노드 스타일"},terms_style:{zh:"专业术语样式",en:"Terms Style",zh_TW:"專業術語樣式",ja:"専門用語スタイル",ko:"전문 용어 스타일"},highlight_style:{zh:"词汇高亮样式",en:"Fav Words highlight style",zh_TW:"詞彙醒目標示樣式",ja:"単語ハイライトスタイル",ko:"단어 하이라이트 스타일"},selector_style_helper:{zh:"开启翻译时注入。",en:"It is injected when translation is turned on.",zh_TW:"在開啟翻譯時注入。",ja:"翻訳が有効なときに注入されます。",ko:"번역이 켜져 있을 때 주입됩니다."},selector_parent_style:{zh:"选择器父节点样式",en:"Parent Selector Style",zh_TW:"選擇器父節點樣式",ja:"親セレクタスタイル",ko:"부모 선택자 스타일"},selector_grand_style:{zh:"选择器祖节点样式",en:"Grand Selector Style",zh_TW:"選擇器祖節點樣式",ja:"祖先セレクタスタイル",ko:"상위 선택자 스타일"},inject_js:{zh:"注入JS",en:"Inject JS",zh_TW:"注入 JS",ja:"JSを注入",ko:"JS 주입"},inject_js_helper:{zh:"预加载时注入,一个页面仅运行一次。内置全局对象 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",en:"Injected during preload, runs only once per page. Built-in global object KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",zh_TW:"預先載入時注入,一個頁面僅執行一次。內建全域物件 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",ja:"プリロード時に注入され、ページごとに1回だけ実行されます。組み込みグローバルオブジェクト KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",ko:"미리 로드 시 주입되며 페이지당 한 번만 실행됩니다. 내장 전역 객체 KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }"},inject_css:{zh:"注入CSS",en:"Inject CSS",zh_TW:"注入 CSS",ja:"CSSを注入",ko:"CSS 주입"},inject_css_helper:{zh:"预加载时注入,一个页面仅运行一次。",en:"Injected during preload, runs only once per page.",zh_TW:"預先載入時注入,一個頁面僅執行一次。",ja:"プリロード時に注入され、ページごとに1回だけ実行されます。",ko:"미리 로드 시 주입되며 페이지당 한 번만 실행됩니다."},fixer_function:{zh:"修复函数",en:"Fixer Function",zh_TW:"修復函式",ja:"修正関数",ko:"수정 함수"},fixer_function_helper:{zh:'1、br是将<br>换行替换成<p "kiss-p">。2、bn是将\\n换行替换成<p "kiss-p">。3、brToDiv和bnToDiv是替换成<div class="kiss-p">。',en:'1. br replaces <br> line breaks with <p "kiss-p">. 2. bn replaces \\n newline with <p "kiss-p">. 3. brToDiv and bnToDiv are replaced with <div class="kiss-p">.',zh_TW:'1. br 會將 <br> 換行替換為 <p "kiss-p">。2. bn 會將 \\n 換行替換為 <p "kiss-p">。3. brToDiv 與 bnToDiv 會替換為 <div class="kiss-p">。',ja:'1. br は <br> 改行を <p "kiss-p"> に置き換えます。 2. bn は \\n 改行を <p "kiss-p"> に置き換えます。 3. brToDiv と bnToDiv は <div class="kiss-p"> に置き換えます。',ko:'1. br은 <br> 줄바꿈을 <p "kiss-p">로 대체합니다. 2. bn은 \\n 줄바꿈을 <p "kiss-p">로 대체합니다. 3. brToDiv 및 bnToDiv는 <div class="kiss-p">로 대체됩니다.'},import:{zh:"导入",en:"Import",zh_TW:"匯入",ja:"インポート",ko:"가져오기"},export:{zh:"导出",en:"Export",zh_TW:"匯出",ja:"エクスポート",ko:"내보내기"},export_translation:{zh:"导出释义",en:"Export Translation",zh_TW:"匯出釋義",ja:"訳文のエクスポート",ko:"번역 내보내기"},error_cant_be_blank:{zh:"不能为空",en:"Can not be blank",zh_TW:"不可為空",ja:"空白にすることはできません",ko:"비워둘 수 없습니다"},error_duplicate_values:{zh:"存在重复的值",en:"There are duplicate values",zh_TW:"存在重複的值",ja:"重複する値が存在します",ko:"중복된 값이 있습니다"},error_wrong_file_type:{zh:"错误的文件类型",en:"Wrong file type",zh_TW:"檔案類型錯誤",ja:"不正なファイルタイプです",ko:"잘못된 파일 형식입니다"},error_fetch_url:{zh:"请检查url地址是否正确或稍后再试。",en:"Please check if the url address is correct or try again later.",zh_TW:"請檢查 URL 是否正確或稍後再試。",ja:"URLアドレスが正しいか確認するか、後でもう一度お試しください。",ko:"URL 주소가 올바른지 확인하거나 나중에 다시 시도하십시오."},deepl_api:{zh:"DeepL 接口",en:"DeepL API",zh_TW:"DeepL 介面",ja:"DeepL API",ko:"DeepL API"},deepl_key:{zh:"DeepL 密钥",en:"DeepL Key",zh_TW:"DeepL 金鑰",ja:"DeepL キー",ko:"DeepL 키"},openai_api:{zh:"OpenAI 接口",en:"OpenAI API",zh_TW:"OpenAI 介面",ja:"OpenAI API",ko:"OpenAI API"},openai_key:{zh:"OpenAI 密钥",en:"OpenAI Key",zh_TW:"OpenAI 金鑰",ja:"OpenAI キー",ko:"OpenAI 키"},openai_model:{zh:"OpenAI 模型",en:"OpenAI Model",zh_TW:"OpenAI 模型",ja:"OpenAI モデル",ko:"OpenAI 모델"},openai_prompt:{zh:"OpenAI 提示词",en:"OpenAI Prompt",zh_TW:"OpenAI 提示詞",ja:"OpenAI プロンプト",ko:"OpenAI 프롬프트"},if_clear_cache:{zh:"是否清除缓存(默认缓存7天)",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"是否清除快取(預設快取7天)",ja:"キャッシュをクリアしますか(デフォルトのキャッシュ期間は7日間です)",ko:"캐시를 지우시겠습니까 (기본 캐시 7일)"},clear_cache_never:{zh:"不清除缓存",en:"Never clear cache",zh_TW:"不清除快取",ja:"キャッシュをクリアしない",ko:"캐시 지우지 않음"},clear_cache_restart:{zh:"重启浏览器时清除缓存",en:"Clear cache when restarting browser",zh_TW:"重新啟動瀏覽器時清除快取",ja:"ブラウザ再起動時にキャッシュをクリア",ko:"브라우저 재시작 시 캐시 지우기"},data_sync_type:{zh:"数据同步方式",en:"Data Sync Type",zh_TW:"資料同步方式",ja:"データ同期タイプ",ko:"데이터 동기화 유형"},data_sync_url:{zh:"数据同步接口",en:"Data Sync API",zh_TW:"資料同步介面",ja:"データ同期API",ko:"데이터 동기화 API"},gist_sync_tip:{zh:"选择 GitHub Gist 时会自动创建私密 Gist。GitHub PAT 需要 Gists 读写权限。",en:"A secret gist will be created automatically when GitHub Gist is selected. GitHub PAT needs Gists read and write permission.",zh_TW:"選擇 GitHub Gist 時會自動建立私密 Gist。GitHub PAT 需要 Gists 讀寫權限。",ja:"GitHub Gist を選択すると Secret Gist が自動作成されます。GitHub PAT には Gists の読み書き権限が必要です。",ko:"GitHub Gist를 선택하면 비공개 Gist가 자동으로 생성됩니다. GitHub PAT에는 Gists 읽기/쓰기 권한이 필요합니다."},data_sync_user:{zh:"数据同步账户",en:"Data Sync User",zh_TW:"資料同步帳號",ja:"データ同期アカウント",ko:"데이터 동기화 계정"},data_sync_key:{zh:"数据同步密钥",en:"Data Sync Key",zh_TW:"資料同步金鑰",ja:"データ同期キー",ko:"데이터 동기화 키"},sync_now:{zh:"立即同步",en:"Sync Now",zh_TW:"立即同步",ja:"今すぐ同期",ko:"지금 동기화"},sync_success:{zh:"同步成功!",en:"Sync Success",zh_TW:"同步成功!",ja:"同期成功!",ko:"동기화 성공!"},sync_failed:{zh:"同步失败!",en:"Sync Error",zh_TW:"同步失敗!",ja:"同期失敗!",ko:"동기화 실패!"},error_got_some_wrong:{zh:"抱歉,出错了!",en:"Sorry, something went wrong!",zh_TW:"抱歉,發生錯誤!",ja:"申し訳ありません、エラーが発生しました!",ko:"죄송합니다, 오류가 발생했습니다!"},error_sync_setting:{zh:"您的同步类型必须为“KISS-Worker”,且需填写完整",en:'Your sync type must be "KISS-Worker" and must be filled in completely',zh_TW:"您的同步型態必須為「KISS-Worker」,且需填寫完整。",ja:"同期タイプは「KISS-Worker」である必要があり、すべて入力する必要があります。",ko:'동기화 유형은 "KISS-Worker"여야 하며, 모든 항목을 빠짐없이 입력해야 합니다.'},click_test:{zh:"点击测试",en:"Click Test",zh_TW:"點選測試",ja:"クリックしてテスト",ko:"클릭 테스트"},test_success:{zh:"测试成功",en:"Test success",zh_TW:"測試成功",ja:"テスト成功",ko:"테스트 성공"},test_failed:{zh:"测试失败",en:"Test failed",zh_TW:"測試失敗",ja:"テスト失敗",ko:"테스트 실패"},clear_all_cache_now:{zh:"立即清除全部缓存",en:"Clear all cache now",zh_TW:"立即清除全部快取",ja:"すべてのキャッシュを今すぐクリア",ko:"모든 캐시 지금 지우기"},clear_cache:{zh:"清除缓存",en:"Clear Cache",zh_TW:"清除快取",ja:"キャッシュをクリア",ko:"캐시 지우기"},disable_on_mobile:{zh:"移动端禁用",en:"Disable on Mobile",zh_TW:"行動裝置停用",ja:"モバイルで無効にする",ko:"모바일에서 비활성화"},clear_success:{zh:"清除成功",en:"Clear success",zh_TW:"清除成功",ja:"クリア成功",ko:"지우기 성공"},clear_failed:{zh:"清除失败",en:"Clear failed",zh_TW:"清除失敗",ja:"クリア失敗",ko:"지우기 실패"},share:{zh:"分享",en:"Share",zh_TW:"分享",ja:"共有",ko:"공유"},clear_all:{zh:"清空",en:"Clear All",zh_TW:"清空",ja:"すべてクリア",ko:"모두 지우기"},help:{zh:"求助",en:"Help",zh_TW:"求助",ja:"ヘルプ",ko:"도움말"},restore_default:{zh:"恢复默认",en:"Restore Default",zh_TW:"恢復預設",ja:"デフォルトに戻す",ko:"기본값 복원"},shortcuts_setting:{zh:"快捷键设置",en:"Shortcuts Setting",zh_TW:"快速鍵設定",ja:"ショートカット設定",ko:"단축키 설정"},toggle_translate_shortcut:{zh:'"开启翻译"快捷键',en:'"Toggle Translate" Shortcut',zh_TW:"「開啟翻譯」快速鍵",ja:"「翻訳切り替え」ショートカット",ko:'"번역 켜기" 단축키'},toggle_transonly_shortcut:{zh:'"隐藏原文"快捷键',en:'"Hide Original" Shortcut',zh_TW:"「隱藏原文」快速鍵",ja:"「原文を隠す」ショートカット",ko:'"원문 숨기기" 단축키'},toggle_style_shortcut:{zh:'"切换样式"快捷键',en:'"Toggle Style" Shortcut',zh_TW:"「切換樣式」快速鍵",ja:"「スタイル切り替え」ショートカット",ko:'"스타일 전환" 단축키'},toggle_popup_shortcut:{zh:'"打开弹窗"快捷键',en:'"Open Popup" Shortcut',zh_TW:"「開啟彈出視窗」快速鍵",ja:"「ポップアップを開く」ショートカット",ko:'"팝업 열기" 단축키'},open_setting_shortcut:{zh:'"打开设置"快捷键',en:'"Open Setting" Shortcut',zh_TW:"「開啟設定」快速鍵",ja:"「設定を開く」ショートカット",ko:'"설정 열기" 단축키'},hide_fab_button:{zh:"隐藏悬浮按钮",en:"Hide Fab Button",zh_TW:"隱藏浮動按鈕",ja:"フローティングボタンを隠す",ko:"플로팅 버튼 숨기기"},fab_click_action:{zh:"单击悬浮按钮动作",en:"Single Click Fab Action",zh_TW:"點選浮動按鈕動作",ja:"フローティングボタンのクリック動作",ko:"플로팅 버튼 클릭 동작"},fab_click_menu:{zh:"弹出菜单",en:"Popup Menu",zh_TW:"彈出選單",ja:"メニューを開く",ko:"팝업 메뉴"},fab_click_translate:{zh:"直接翻译",en:"Translate",zh_TW:"直接翻譯",ja:"直接翻訳",ko:"바로 번역"},hide_tran_button:{zh:"隐藏翻译按钮",en:"Hide Translate Button",zh_TW:"隱藏翻譯按鈕",ja:"翻訳ボタンを隠す",ko:"번역 버튼 숨기기"},hide_click_away:{zh:"点击外部关闭弹窗",en:"Click outside to close the pop-up window",zh_TW:"點選外部區域關閉彈出視窗",ja:"外部クリックでポップアップを閉じる",ko:"바깥쪽 클릭 시 팝업 닫기"},use_simple_style:{zh:"使用简洁界面",en:"Use a simple interface",zh_TW:"使用簡潔介面",ja:"シンプルUIを使用",ko:"간단한 인터페이스 사용"},show:{zh:"显示",en:"Show",zh_TW:"顯示",ja:"表示",ko:"표시"},hide:{zh:"隐藏",en:"Hide",zh_TW:"隱藏",ja:"非表示",ko:"숨기기"},save_rule:{zh:"保存本站规则",en:"Save this site rule",zh_TW:"儲存本站規則",ja:"このサイトのルールを保存",ko:"이 사이트 규칙 저장"},domain:{zh:"网域",en:"Domain",zh_TW:"網域",ja:"ドメイン",ko:"도메인"},global_rule:{zh:"全局规则",en:"Global Rule",zh_TW:"全域規則",ja:"グローバルルール",ko:"전역 규칙"},input_translate:{zh:"输入框翻译",en:"Input Box Translation",zh_TW:"輸入框翻譯",ja:"入力ボックス翻訳",ko:"입력창 번역"},use_input_box_translation:{zh:"启用输入框翻译",en:"Input Box Translation",zh_TW:"啟用輸入框翻譯",ja:"入力ボックス翻訳を有効にする",ko:"입력창 번역 사용"},input_selector:{zh:"输入框选择器",en:"Input Selector",zh_TW:"輸入框選擇器",ja:"入力ボックスセレクタ",ko:"입력창 선택자"},input_selector_helper:{zh:"用于输入框翻译。",en:"Used for input box translation.",zh_TW:"用於輸入框翻譯。",ja:"入力ボックスの翻訳に使用します。",ko:"입력창 번역에 사용됩니다."},trigger_trans_shortcut:{zh:"触发翻译快捷键",en:"Trigger Translation Shortcut Keys",zh_TW:"觸發翻譯快速鍵",ja:"翻訳ショートカットキー",ko:"번역 실행 단축키"},trigger_trans_shortcut_help:{zh:"默认为单击“AltLeft+KeyI”",en:'Default is "AltLeft+KeyI"',zh_TW:"預設為按下「AltLeft+KeyI」",ja:"デフォルトは「AltLeft+KeyI」です",ko:'기본값 "AltLeft+KeyI"'},shortcut_press_count:{zh:"快捷键连击次数",en:"Shortcut Press Number",zh_TW:"快速鍵連按次數",ja:"ショートカットの連続プレス回数",ko:"단축키 연속 입력 횟수"},combo_timeout:{zh:"连击超时时间 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"連擊逾時 (10-1000ms)",ja:"連続プレスタイムアウト (10-1000ms)",ko:"연속 입력 시간 초과 (10-1000ms)"},input_trans_start_sign:{zh:"翻译起始标识",en:"Translation Start Sign",zh_TW:"翻譯起始標記",ja:"翻訳開始記号",ko:"번역 시작 표시"},input_trans_start_sign_help:{zh:"标识后面可以加目标语言代码,如: “/en 你好”、“/zh hello”",en:'The target language code can be added after the sign, such as: "/en 你好", "/zh hello"',zh_TW:"標記後可加上目標語言代碼,例如:「/en 你好」、「/zh hello」",ja:"記号の後に対象言語コードを追加できます。例:「/en 你好」、「/zh hello」",ko:'표시 뒤에 대상 언어 코드를 추가할 수 있습니다. 예: "/en 你好", "/zh hello"'},detect_lang_remote:{zh:"远程语言检测",en:"Remote language detection",zh_TW:"遠端語言偵測",ja:"リモート言語検出",ko:"원격 언어 감지"},detect_lang_remote_help:{zh:"启用后检测准确度增加,但会降低翻译速度,请酌情开启",en:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate.",zh_TW:"啟用後可提升偵測準確度,但會降低翻譯速度,請視需要開啟。",ja:"有効にすると検出精度が向上しますが、翻訳速度が低下する可能性があります。必要に応じて有効にしてください。",ko:"활성화하면 감지 정확도가 높아지지만 번역 속도가 느려질 수 있습니다. 적절히 활성화하십시오."},detect_lang_service:{zh:"语言检测服务",en:"Language detect service",zh_TW:"語言偵測服務",ja:"言語検出サービス",ko:"언어 감지 서비스"},disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화"},enable:{zh:"启用",en:"Enable",zh_TW:"啟用",ja:"有効",ko:"활성화"},selection_translate:{zh:"划词翻译",en:"Selection Translation",zh_TW:"選取文字翻譯",ja:"選択翻訳",ko:"선택 번역"},toggle_selection_translate:{zh:"启用划词翻译",en:"Use Selection Translate",zh_TW:"啟用選取文字翻譯",ja:"選択翻訳を有効にする",ko:"선택 번역 사용"},trigger_tranbox_shortcut:{zh:"显示翻译框/翻译选中文字快捷键",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"顯示翻譯框/翻譯選取文字快速鍵",ja:"翻訳ポップアップ表示/選択翻訳ショートカット",ko:"번역창 표시/선택 번역 단축키"},tranbtn_offset_x:{zh:"翻译按钮偏移X(±200)",en:"Translate Button Offset X (±200)",zh_TW:"翻譯按鈕位移 X(±200)",ja:"翻訳ボタンオフセットX (±200)",ko:"번역 버튼 오프셋 X (±200)"},tranbtn_offset_y:{zh:"翻译按钮偏移Y(±200)",en:"Translate Button Offset Y (±200)",zh_TW:"翻譯按鈕位移 Y(±200)",ja:"翻訳ボタンオフセットY (±200)",ko:"번역 버튼 오프셋 Y (±200)"},tranbox_offset_x:{zh:"翻译框偏移X(±200)",en:"Translate Box Offset X (±200)",zh_TW:"翻譯框位移 X(±200)",ja:"翻訳ボックスオフセットX (±200)",ko:"번역창 오프셋 X (±200)"},tranbox_offset_y:{zh:"翻译框偏移Y(±200)",en:"Translate Box Offset Y (±200)",zh_TW:"翻譯框位移 Y(±200)",ja:"翻訳ボックスオフセットY (±200)",ko:"번역창 오프셋 Y (±200)"},translated_text:{zh:"译文",en:"Translated Text",zh_TW:"譯文",ja:"翻訳済みテキスト",ko:"번역된 텍스트"},original_text:{zh:"原文",en:"Original Text",zh_TW:"原文",ja:"原文",ko:"원본 텍스트"},favorite_words:{zh:"收藏词汇",en:"Favorite Words",zh_TW:"收藏詞彙",ja:"お気に入り単語",ko:"즐겨찾는 단어"},touch_setting:{zh:"触屏设置",en:"Touch Setting",zh_TW:"觸控設定",ja:"タッチ設定",ko:"터치 설정"},touch_translate_shortcut:{zh:"触屏翻译快捷方式 (支持多选)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"觸控翻譯捷徑 (支援多選)",ja:"タッチ翻訳ショートカット (複数選択可)",ko:"터치 번역 단축키 (다중 선택 지원)"},touch_tap_0:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화"},touch_tap_2:{zh:"双指轻触",en:"Two finger tap",zh_TW:"雙指輕觸",ja:"2本指タップ",ko:"두 손가락 탭"},touch_tap_3:{zh:"三指轻触",en:"Three finger tap",zh_TW:"三指輕觸",ja:"3本指タップ",ko:"세 손가락 탭"},touch_tap_4:{zh:"四指轻触",en:"Four finger tap",zh_TW:"四指輕觸",ja:"4本指タップ",ko:"네 손가락 탭"},touch_tap_5:{zh:"单指双击",en:"Double-click",zh_TW:"單指雙擊",ja:"ダブルクリック",ko:"더블 클릭"},touch_tap_6:{zh:"单指三击",en:"Triple-click",zh_TW:"單指三擊",ja:"トリプルクリック",ko:"트리플 클릭"},touch_tap_7:{zh:"双指双击",en:"Two-finger double-click",zh_TW:"雙指雙擊",ja:"2本指ダブルクリック",ko:"두 손가락 더블 클릭"},translate_blacklist:{zh:"禁用翻译名单",en:"Translate Blacklist",zh_TW:"停用翻譯名單",ja:"翻訳ブラックリスト",ko:"번역 블랙리스트"},iframe_whitelist:{zh:"iframe翻译白名单",en:"iframe Translate Whitelist",zh_TW:"iframe翻譯白名單",ja:"iframe翻訳ホワイトリスト",ko:"iframe 번역 화이트리스트"},blacklist:{zh:"禁用黑名单",en:"Blacklist",zh_TW:"停用黑名單",ja:"ブラックリスト",ko:"블랙리스트"},add_to_blacklist:{zh:"加入黑名单",en:"Add to Blacklist",zh_TW:"加入黑名單",ja:"ブラックリストに追加",ko:"블랙리스트에 추가"},remove_from_blacklist:{zh:"移出黑名单",en:"Remove from Blacklist",zh_TW:"移出黑名單",ja:"ブラックリストから削除",ko:"블랙리스트에서 제거"},disabled_orilist:{zh:"禁用Origin名单",en:"Disabled Origin List",zh_TW:"停用 Origin 名單",ja:"無効化Originリスト",ko:"비활성화된 Origin 목록"},disabled_csplist:{zh:"禁用CSP名单",en:"Disabled CSP List",zh_TW:"停用 CSP 名單",ja:"無効化CSPリスト",ko:"비활성화된 CSP 목록"},disabled_csplist_helper:{zh:"3、通过调整CSP策略,使得某些页面能够注入JS/CSS/Media,请谨慎使用,除非您已知晓相关风险。",en:"3. By adjusting the CSP policy, some pages can inject JS/CSS/Media. Please use it with caution unless you are aware of the related risks.",zh_TW:"3. 透過調整 CSP 政策,使部分頁面可注入 JS/CSS/Media。請謹慎使用,除非您已知悉相關風險。",ja:"3. CSPポリシーを調整することにより、一部のページでJS/CSS/Mediaの注入が可能になります。関連するリスクを承知していない限り、慎重に使用してください。",ko:"3. CSP 정책을 조정하여 일부 페이지에서 JS/CSS/Media를 주입할 수 있습니다. 관련된 위험을 인지하고 있는 경우가 아니라면 주의해서 사용하십시오."},skip_langs:{zh:"不翻译的语言",en:"Disable Languages",zh_TW:"不翻譯的語言",ja:"翻訳しない言語",ko:"번역하지 않을 언어"},skip_langs_helper:{zh:"此功能依赖准确的语言检测,建议启用远程语言检测。",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"此功能仰賴準確的語言偵測,建議啟用遠端語言偵測。",ja:"この機能は正確な言語検出に依存しているため、リモート言語検出を有効にすることをお勧めします。",ko:"이 기능은 정확한 언어 감지에 의존하므로 원격 언어 감지를 활성화하는 것이 좋습니다."},context_menus:{zh:"右键菜单",en:"Context Menus",zh_TW:"右鍵選單",ja:"コンテキストメニュー",ko:"컨텍스트 메뉴"},hide_context_menus:{zh:"隐藏右键菜单",en:"Hide Context Menus",zh_TW:"隱藏右鍵選單",ja:"コンテキストメニューを隠す",ko:"컨텍스트 메뉴 숨기기"},simple_context_menus:{zh:"简单右键菜单",en:"Simple_context_menus Context Menus",zh_TW:"簡易右鍵選單",ja:"シンプルコンテキストメニュー",ko:"간단한 컨텍스트 메뉴"},secondary_context_menus:{zh:"二级右键菜单",en:"Secondary Context Menus",zh_TW:"次級右鍵選單",ja:"サブコンテキストメニュー",ko:"보조 컨텍스트 메뉴"},mulkeys_help:{zh:"支持用换行或英文逗号“,”分隔,轮询调用。",en:'Supports polling calls separated by newlines or English commas ",".',zh_TW:"支援以換行或英文逗號「,」分隔,輪詢呼叫。",ja:"改行または英語のコンマ「,」で区切ってポーリングコールをサポートします。",ko:'줄바꿈 또는 영어 쉼표 ","로 구분된 폴링 호출을 지원합니다.'},translation_element_tag:{zh:"译文元素标签",en:"Translation Element Tag",zh_TW:"譯文元素標籤",ja:"翻訳要素タグ",ko:"번역 요소 태그"},show_only_translations:{zh:"仅显示译文",en:"Show Only Translations",zh_TW:"僅顯示譯文",ja:"翻訳のみ表示",ko:"번역만 보기"},show_only_translations_help:{zh:"非完美实现,某些页面可能有样式等问题。",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"此為非完美實作,部分頁面可能出現樣式等問題。",ja:"完全な実装ではなく、一部のページでスタイルの問題が発生する可能性があります。",ko:"완벽한 구현이 아니며 일부 페이지에서 스타일 문제가 발생할 수 있습니다."},trans_order:{zh:"文本顺序",en:"Translation Order",zh_TW:"文字順序",ja:"テキスト順序",ko:"텍스트 순서"},original_first:{zh:"原文在上方",en:"Original First",zh_TW:"原文在上方",ja:"原文が最初",ko:"원문이 먼저"},translation_first:{zh:"译文在上方",en:"Translation First",zh_TW:"譯文在上方",ja:"翻訳が最初",ko:"번역이 먼저"},transonly_revert:{zh:"悬浮显示原文",en:"Hover to Show Original",zh_TW:"滑鼠懸停時顯示原文",ja:"ホバーで原文を表示",ko:"호버 시 원문 표시"},transonly_revert_delay:{zh:"悬浮延迟(秒)",en:"Hover Delay (seconds)",zh_TW:"滑鼠懸停延遲(秒)",ja:"ホバー遅延(秒)",ko:"호버 지연(초)"},translate_page_title:{zh:"是否翻译页面标题",en:"Translate Page Title",zh_TW:"是否翻譯頁面標題",ja:"ページタイトルを翻訳する",ko:"페이지 제목 번역"},more:{zh:"更多",en:"More",zh_TW:"更多",ja:"もっと見る",ko:"더보기"},less:{zh:"更少",en:"Less",zh_TW:"更少",ja:"少なく",ko:"줄이기"},fixer_selector:{zh:"网页修复选择器",en:"Fixer Selector",zh_TW:"網頁修復選擇器",ja:"Web修正セレクタ",ko:"웹페이지 수정 선택자"},trigger_mode:{zh:"触发方式",en:"Trigger Mode",zh_TW:"觸發方式",ja:"トリガーモード",ko:"트리거 모드"},trigger_click:{zh:"点击触发",en:"Click Trigger",zh_TW:"點選觸發",ja:"クリックトリガー",ko:"클릭 트리거"},trigger_hover:{zh:"鼠标悬停触发",en:"Hover Trigger",zh_TW:"滑鼠懸停觸發",ja:"ホバートリガー",ko:"호버 트리거"},trigger_select:{zh:"选中触发",en:"Select Trigger",zh_TW:"選取觸發",ja:"選択トリガー",ko:"선택 트리거"},extend_styles:{zh:"附加样式",en:"Extend Styles",zh_TW:"附加樣式",ja:"拡張スタイル",ko:"확장 스타일"},custom_option:{zh:"自定义选项",en:"Custom Option",zh_TW:"自訂選項",ja:"カスタムオプション",ko:"사용자 지정 옵션"},translate_selected_text:{zh:"翻译选中文字",en:"Translate Selected Text",zh_TW:"翻譯選取文字",ja:"選択したテキストを翻訳",ko:"선택한 텍스트 번역"},toggle_style:{zh:"切换样式",en:"Toggle Style",zh_TW:"切換樣式",ja:"スタイルを切り替え",ko:"스타일 전환"},open_menu:{zh:"打开弹窗菜单",en:"Open Popup Menu",zh_TW:"開啟彈出視窗選單",ja:"ポップアップメニューを開く",ko:"팝업 메뉴 열기"},open_setting:{zh:"打开设置",en:"Open Setting",zh_TW:"開啟設定",ja:"設定を開く",ko:"설정 열기"},follow_selection:{zh:"翻译框跟随选中文本",en:"Transbox Follow Selection",zh_TW:"翻譯框跟隨選取文字",ja:"翻訳ボックスを選択範囲に追従",ko:"번역 상자가 선택 항목 따라가기"},tranbox_auto_height:{zh:"翻译框自适应高度",en:"Translation box adaptive height",zh_TW:"翻譯框自適應高度",ja:"翻訳ボックスの高さ自動調整",ko:"번역 상자 높이 자동 조절"},translate_start_hook:{zh:"翻译开始钩子函数",en:"Translate Start Hook",zh_TW:"翻譯開始 Hook",ja:"翻訳開始フック",ko:"번역 시작 후크"},translate_start_hook_helper:{zh:"翻译前时运行,入参为: {text,\n      fromLang,\n      toLang,\n      apiSetting,\n      docInfo,\n      glossary,}",en:"Run before translation, input parameters are: {text,\n      fromLang,\n      toLang,\n      apiSetting,\n      docInfo,\n      glossary,}",zh_TW:"翻譯前執行,輸入參數為: {text,\n      fromLang,\n      toLang,\n      apiSetting,\n      docInfo,\n      glossary,}",ja:"翻訳前に実行、入力パラメータ: {text,\n      fromLang,\n      toLang,\n      apiSetting,\n      docInfo,\n      glossary,}",ko:"번역 전 실행, 입력 매개변수: {text,\n      fromLang,\n      toLang,\n      apiSetting,\n      docInfo,\n      glossary,}"},translate_end_hook:{zh:"翻译完成钩子函数",en:"Translate End Hook",zh_TW:"翻譯完成 Hook",ja:"翻訳完了フック",ko:"번역 완료 후크"},translate_end_hook_helper:{zh:"翻译完成时运行,入参为: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",en:"Run when translation is complete, input parameters are: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",zh_TW:"翻譯完成時執行,輸入參數為: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",ja:"翻訳完了時に実行、入力パラメータ: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",ko:"번역 완료 시 실행, 입력 매개변수: ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"翻译移除钩子函数",en:"Translate Removed Hook",zh_TW:"翻譯移除 Hook",ja:"翻訳削除フック",ko:"번역 제거 후크"},translate_remove_hook_helper:{zh:"翻译移除时运行,入参为: 翻译节点。",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"移除翻譯時執行,輸入參數為:翻譯節點。",ja:"翻訳削除時に実行、入力パラメータ: 翻訳ノード。",ko:"번역 제거 시 실행, 입력 매개변수: 번역 노드."},english_dict:{zh:"英文词典",en:"English Dictionary",zh_TW:"英文字典",ja:"英語辞書",ko:"영어 사전"},english_suggest:{zh:"英文建议",en:"English Suggest",zh_TW:"英文建議",ja:"英語サジェスト",ko:"영어 제안"},api_name:{zh:"接口名称",en:"API Name",zh_TW:"介面名稱",ja:"API名",ko:"API 이름"},sort_order:{zh:"排序权重",en:"Sort Order",zh_TW:"排序權重",ja:"ソート順序",ko:"정렬 순서"},sort_order_help:{zh:"数值越小越靠前",en:"Smaller values appear first",zh_TW:"數值越小越靠前",ja:"小さい値が先に表示されます",ko:"작은 값이 먼저 표시됩니다"},is_disabled:{zh:"是否禁用",en:"Is Disabled",zh_TW:"是否停用",ja:"無効にする",ko:"비활성화 여부"},is_pinned:{zh:"是否置顶",en:"Is Pinned",zh_TW:"是否置頂",ja:"ピン留め",ko:"고정 여부"},sort_alphabetically:{zh:"按字母排序",en:"Sort Alphabetically",zh_TW:"按字母排序",ja:"アルファベット順",ko:"알파벳순 정렬"},translate_selected:{zh:"是否启用划词翻译",en:"If translate selected",zh_TW:"是否啟用選取文字翻譯",ja:"選択範囲の翻訳を有効にする",ko:"선택 번역 사용 여부"},use_batch_fetch:{zh:"是否聚合发送翻译请求",en:"Whether to aggregate and send translation requests",zh_TW:"是否彙整發送翻譯請求",ja:"翻訳リクエストをまとめて送信",ko:"번역 요청 일괄 전송 여부"},batch_interval:{zh:"聚合请求等待时间(10-10000)",en:"Aggregation request waiting time (10-10000)",zh_TW:"彙整請求等待時間(10-10000)",ja:"一括リクエストの待機時間(10-10000)",ko:"일괄 요청 대기 시간(10-10000)"},batch_size:{zh:"聚合请求最大段落数(1-100)",en:"Maximum number of paragraphs in an aggregation request (1-100)",zh_TW:"彙整請求最大段落數(1-100)",ja:"一括リクエストの最大段落数(1-100)",ko:"일괄 요청 최대 단락 수(1-100)"},batch_length:{zh:"聚合请求最大文本长度(1000-100000)",en:"Maximum text length for aggregation requests (1000-100000)",zh_TW:"彙整請求最大文字長度(1000-100000)",ja:"一括リクエストの最大テキスト長(1000-100000)",ko:"일괄 요청 최대 텍스트 길이(1000-100000)"},use_stream:{zh:"是否启用流式传输",en:"Whether to enable streaming",zh_TW:"是否啟用串流傳輸",ja:"ストリーミングを有効にする",ko:"스트리밍 활성화 여부"},stream_render_mode:{zh:"流式渲染模式",en:"Stream render mode",zh_TW:"串流渲染模式",ja:"ストリーミングレンダリングモード",ko:"스트리밍 렌더링 모드"},stream_render_realtime:{zh:"实时渲染",en:"Realtime render",zh_TW:"即時渲染",ja:"リアルタイムレンダリング",ko:"실시간 렌더링"},stream_render_segment:{zh:"片段渲染",en:"Segment render",zh_TW:"片段渲染",ja:"セグメントレンダリング",ko:"세그먼트 렌더링"},use_context:{zh:"是否启用智能上下文",en:"Whether to enable AI context",zh_TW:"是否啟用智慧上下文",ja:"AIコンテキストを有効にする",ko:"AI 컨텍스트 활성화 여부"},context_size:{zh:"上下文会话数量(1-20)",en:"Number of context sessions(1-20)",zh_TW:"上下文會話數量(1-20)",ja:"コンテキストセッション数(1-20)",ko:"컨텍스트 세션 수(1-20)"},auto_scan_page:{zh:"自动扫描页面",en:"Auto scan page",zh_TW:"自動掃描頁面",ja:"ページを自動スキャン",ko:"페이지 자동 스캔"},has_rich_text:{zh:"启用富文本翻译",en:"Enable rich text translation",zh_TW:"啟用富文字翻譯",ja:"リッチテキスト翻訳を有効にする",ko:"리치 텍스트 번역 활성화"},has_shadowroot:{zh:"扫描Shadowroot",en:"Scan Shadowroot",zh_TW:"掃描Shadowroot",ja:"Shadowrootをスキャン",ko:"Shadowroot 스캔"},mousehover_translate:{zh:"鼠标悬停翻译",en:"Mouseover Translation",zh_TW:"滑鼠懸停翻譯",ja:"マウスオーバー翻訳",ko:"마우스오버 번역"},use_mousehover_translation:{zh:"启用鼠标悬停翻译",en:"Enable mouseover translation",zh_TW:"啟用滑鼠懸停翻譯",ja:"マウスオーバー翻訳を有効にする",ko:"마우스오버 번역 활성화"},selected_translation_alert:{zh:"划词翻译的开启和关闭请到“规则设置”里面设置。",en:'To turn selected translation on or off, please go to "Rule Settings".',zh_TW:"選取文字翻譯的開啟和關閉請到「規則設定」裡面設定。",ja:"選択翻訳のオン/オフは「ルール設定」で行ってください。",ko:'선택 번역 활성화/비활성화는 "규칙 설정"에서 하십시오.'},mousehover_key_help:{zh:"当快捷键置空时表示鼠标懸停直接翻译",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"快速鍵留空時表示滑鼠懸停即直接翻譯",ja:"ショートカットキーが空の場合、マウスオーバーで直接翻訳します",ko:"단축키가 비어 있으면 마우스오버 시 바로 번역합니다"},autoscan_alt:{zh:"自动扫描",en:"Auto Scan",zh_TW:"自動掃描",ja:"自動スキャン",ko:"자동 스캔"},scan_all_nodes:{zh:"扫描全部节点",en:"Scan All Nodes",zh_TW:"掃描全部節點",ja:"すべてのノードをスキャン",ko:"모든 노드 스캔"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot",ja:"ShadowRoot",ko:"ShadowRoot"},richtext_alt:{zh:"保留富文本",en:"Rich Text",zh_TW:"保留富文字",ja:"リッチテキスト",ko:"리치 텍스트"},transonly_alt:{zh:"隐藏原文",en:"Hide Original",zh_TW:"隱藏原文",ja:"原文を隠す",ko:"원문 숨기기"},confirm_title:{zh:"确认",en:"Confirm",zh_TW:"確認",ja:"確認",ko:"확인"},confirm_message:{zh:"确定操作吗?",en:"Are you sure you want to proceed?",zh_TW:"確定操作嗎?",ja:"操作を続行しますか?",ko:"계속하시겠습니까?"},confirm_action:{zh:"确定",en:"Confirm",zh_TW:"確定",ja:"確認",ko:"확인"},cancel_action:{zh:"取消",en:"Cancel",zh_TW:"取消",ja:"キャンセル",ko:"취소"},pls_press_shortcut:{zh:"请按下快捷键组合",en:"Please press the shortcut key combination",zh_TW:"請按下快速鍵組合",ja:"ショートカットキーを押してください",ko:"단축키 조합을 누르세요"},load_setting_err:{zh:"数据加载出错,请刷新页面或卸载后重新安装。",en:"Data loading error, please refresh the page or uninstall and reinstall.",zh_TW:"資料載入發生錯誤,請重新整理頁面或解除安裝後重新安裝。",ja:"データ読み込みエラー。ページを更新するか、アンインストール後に再インストールしてください。",ko:"데이터 로딩 오류. 페이지를 새로 고치거나 제거 후 다시 설치하세요."},translation_style:{zh:"翻译风格",en:"Translation style",zh_TW:"翻譯風格",ja:"翻訳スタイル",ko:"번역 스타일"},placeholder:{zh:"占位符",en:"Placeholder",zh_TW:"佔位符",ja:"プレースホルダー",ko:"플레이스홀더"},tag_name:{zh:"占位标签名",en:"Placeholder tag name",zh_TW:"佔位標名",ja:"プレースホルダータグ名",ko:"플레이스홀더 태그 이름"},system_prompt_helper_1:{zh:"1. 根据实际情况选择AI支持的聚合格式:",en:"1. Select the aggregation format supported by the AI according to your needs:",zh_TW:"1. 請依實際情況選擇 AI 支援的彙整格式:",ja:"1. 実際の状況に応じて、AI が対応している集約形式を選択してください:",ko:"1. 상황에 맞게 AI에서 지원하는 집계 형식을 선택하세요:"},json_output:{zh:"点击切换 “JSON 格式“",en:'Click to switch to "JSON Format"',zh_TW:"點選切換「JSON 格式」",ja:"クリックして「JSON 形式」に切り替え",ko:'클릭하여 "JSON 형식"으로 전환'},xml_output:{zh:"点击切换 “XML 格式“",en:'Click to switch to "XML Format"',zh_TW:"點選切換「XML 格式」",ja:"クリックして「XML 形式」に切り替え",ko:'클릭하여 "XML 형식"으로 전환'},textlines_output:{zh:"点击切换 “多行文本格式“",en:'Click to switch to "Multi-line Text Format"',zh_TW:"點選切換「多行文字格式」",ja:"クリックして「複数行テキスト形式」に切り替え",ko:'클릭하여 "여러 줄 텍스트 형식"으로 전환'},system_prompt_helper_2:{zh:"2. 在未完全理解默认Prompt的情况下,请勿随意修改,否则可能无法工作。",en:"2. Do not modify the default prompt without fully understanding it, otherwise it may not work.",zh_TW:"2. 在未完全理解預設Prompt的情況下,請勿隨意修改,否則可能無法運作。",ja:"2. デフォルトのプロンプトを完全に理解せずに変更しないでください。動作しなくなる可能性があります。",ko:"2. 기본 프롬프트를 완전히 이해하지 않고 수정하지 마십시오. 작동하지 않을 수 있습니다."},if_pre_init:{zh:"是否预初始化",en:"Whether to pre-initialize",zh_TW:"是否預初始化",ja:"事前初期化するか",ko:"사전 초기화 여부"},export_old:{zh:"导出旧版",en:"Export old version",zh_TW:"匯出舊版",ja:"旧バージョンをエクスポート",ko:"이전 버전 내보내기"},favorite_words_helper:{zh:"导入词汇请使用txt文件,每一行一个单词。",en:"To import vocabulary, please use a txt file with one word per line.",zh_TW:"匯入詞彙請使用 txt 檔案,每一行一個單字。",ja:"単語をインポートするには、1行に1単語ずつ記述したtxtファイルを使用してください。",ko:"단어를 가져오려면 한 줄에 한 단어씩 .txt 파일을 사용하세요."},btn_tip_click_away:{zh:"失焦隐藏/显示",en:"Loss of focus hide/show",zh_TW:"失焦隱藏/顯示",ja:"フォーカスを失った時に非表示/表示",ko:"포커스 잃을 시 숨기기/표시"},btn_tip_follow_selection:{zh:"跟随/固定模式",en:"Follow/Fixed Mode",zh_TW:"跟隨/固定模式",ja:"追従/固定モード",ko:"따라가기/고정 모드"},btn_tip_simple_style:{zh:"迷你/常规模式",en:"Mini/Regular Mode",zh_TW:"迷你/常規模式",ja:"ミニ/通常モード",ko:"미니/일반 모드"},btn_tip_dark_mode:{zh:"亮色/暗色/跟随系统",en:"Light/Dark/Auto",zh_TW:"亮色/暗色/跟隨系統",ja:"ライト/ダーク/自動",ko:"라이트/다크/자동"},api_placeholder:{zh:"占位符",en:"Placeholder",zh_TW:"佔位符",ja:"プレースホルダー",ko:"플레이스홀더"},api_placetag:{zh:"占位标签",en:"Placeholder tags",zh_TW:"佔位標",ja:"プレースホルダタグ",ko:"플레이스홀더 태그"},placetag_format:{zh:"占位符格式",en:"Placeholder Format",zh_TW:"佔位符格式",ja:"プレースホルダー形式",ko:"자리 표시자 형식"},format_compact:{zh:"简洁格式 <a1>",en:"Compact Format <a1>",zh_TW:"簡潔格式 <a1>",ja:"簡潔形式 <a1>",ko:"간결 형식 <a1>"},format_attribute:{zh:"属性格式 <a i=1>",en:"Attribute Format <a i=1>",zh_TW:"屬性格式 <a i=1>",ja:"属性形式 <a i=1>",ko:"속성 형식 <a i=1>"},detected_lang:{zh:"语言检测",en:"Language detection",zh_TW:"語言偵測",ja:"言語検出",ko:"언어 감지"},detected_result:{zh:"检测结果",en:"Detect result",zh_TW:"偵測結果",ja:"検出結果",ko:"감지 결과"},subtitle_translate:{zh:"字幕翻译",en:"Subtitle Translation",zh_TW:"字幕翻譯",ja:"字幕翻訳",ko:"자막 번역"},toggle_subtitle_translate:{zh:"启用字幕翻译",en:"Enable subtitle translation",zh_TW:"啟用字幕翻譯",ja:"字幕翻訳を有効にする",ko:"자막 번역 활성화"},is_bilingual_view:{zh:"双语显示",en:"Enable bilingual display",zh_TW:"雙語顯示",ja:"バイリンガル表示",ko:"이중 언어 표시"},is_blur_translation:{zh:"模糊译文",en:"Blur Translation",zh_TW:"模糊譯文",ja:"翻訳をぼかす",ko:"번역 흐림"},is_skip_ad:{zh:"快进广告",en:"Skip AD",zh_TW:"快轉廣告",ja:"広告をスキップ",ko:"광고 건너뛰기"},download_subtitles:{zh:"下载字幕",en:"Download subtitles",zh_TW:"下載字幕",ja:"字幕をダウンロード",ko:"자막 다운로드"},background_styles:{zh:"背景样式",en:"Background Style",zh_TW:"背景樣式",ja:"背景スタイル",ko:"배경 스타일"},origin_styles:{zh:"原文样式",en:"Original style",zh_TW:"原文樣式",ja:"原文スタイル",ko:"원문 스타일"},translation_styles:{zh:"译文样式",en:"Translation style",zh_TW:"譯文樣式",ja:"翻訳スタイル",ko:"번역문 스타일"},ai_segmentation:{zh:"AI智能断句",en:"AI intelligent punctuation",zh_TW:"AI智慧斷句",ja:"AIによるインテリジェントな文分割",ko:"AI 지능형 문장 분리"},builtin_sentence_break:{zh:"内置断句",en:"Built-in Sentence Break",zh_TW:"內置斷句",ja:"内蔵文分割",ko:"내장 문장 분리"},rule_sentence_break:{zh:"规则断句",en:"Rule-based Break",zh_TW:"規則斷句",ja:"ルールベース分割",ko:"규칙 기반 분리"},statistical_sentence_break:{zh:"统计断句",en:"Statistical Break",zh_TW:"統計斷句",ja:"統計的分割",ko:"통계 기반 분리"},ai_enhanced_context:{zh:"增强智能上下文",en:"Enhanced Intelligent Context",zh_TW:"增強智慧上下文",ja:"強化インテリジェントコンテキスト",ko:"강화 지능형 컨텍스트"},ai_context_analyzing:{zh:"AI正在分析视频内容...",en:"AI is analyzing video content...",zh_TW:"AI正在分析影片內容...",ja:"AIが動画内容を分析中...",ko:"AI가 비디오 콘텐츠를 분석 중..."},ai_chunk_length:{zh:"AI处理切割长度(200-20000)",en:"AI processing chunk length(200-20000)",zh_TW:"AI 處理切割長度(200-20000)",ja:"AI処理のチャンク長(200-20000)",ko:"AI 처리 청크 길이(200-20000)"},subtitle_helper_1:{zh:"1、目前仅支持Youtube桌面网站。",en:"1. Currently only supports Youtube desktop website.",zh_TW:"1.目前僅支援Youtube桌面網站,且僅支援瀏覽器擴充功能。",ja:"1. 現在、Youtubeのデスクトップサイトのみサポートしています。",ko:"1. 현재 Youtube 데스크톱 웹사이트만 지원합니다."},subtitle_helper_2:{zh:"2、插件内置基础的字幕合并、断句算法,可满足大部分情况。",en:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations.",zh_TW:"2. 擴充功能內建基礎的字幕合併、斷句演算法,可滿足大部分情況。",ja:"2. プラグインには基本的な字幕結合と文分割アルゴリズムが組み込まれており、ほとんどの状況に対応できます。",ko:"2. 플러그인에는 기본적인 자막 병합 및 문장 분리 알고리즘이 내장되어 있어 대부분의 상황에 대응할 수 있습니다."},subtitle_helper_3:{zh:"3、亦可以启用AI智能断句,但需考虑切割长度及AI接口能力,可能处理时间会很长,甚至处理失败,导致无法看到字幕。",en:"3. You can also enable AI intelligent segmentation, but you need to consider the segmentation length and AI interface capabilities. The processing time may be very long or even fail, resulting in the inability to see subtitles.",zh_TW:"3. 亦可啟用 AI 智慧斷句,但需考慮切割長度及 AI 介面能力,處理時間可能會很長,甚至處理失敗,導致無法看到字幕。",ja:"3. AIインテリジェント文分割を有効にすることもできますが、分割長とAIインターフェースの能力を考慮する必要があり、処理時間が長くなったり、失敗して字幕が表示されなくなる可能性があります。",ko:"3. AI 지능형 분리를 활성화할 수도 있지만, 분리 길이와 AI 인터페이스의 능력을 고려해야 하며, 처리 시간이 매우 길거나 실패하여 자막을 볼 수 없게 될 수도 있습니다."},show_subtitle_list:{zh:"显示字幕列表",en:"Show Subtitle List",zh_TW:"顯示字幕清單",ja:"字幕リストを表示",ko:"자막 목록 표시"},subtitle_loading_notification:{zh:"字幕加载通知",en:"Subtitle loading notification",zh_TW:"字幕載入通知",ja:"字幕読み込み通知",ko:"자막 로딩 알림"},hide_subtitle_button:{zh:"隐藏功能按钮",en:"Hide function button",zh_TW:"隱藏功能按鈕",ja:"機能ボタンを非表示",ko:"기능 버튼 숨기기"},subtitle_hover_lookup:{zh:"悬停查词",en:"Hover Word Lookup",zh_TW:"懸停查詞",ja:"ホバー辞書検索",ko:"호버 단어 조회"},default_styles_example:{zh:"默认样式参考:",en:"Default styles reference:",zh_TW:"預設樣式參考:",ja:"デフォルトスタイルの例:",ko:"기본 스타일 예시:"},subtitle_load_succeed:{zh:"双语字幕加载成功!",en:"Bilingual subtitles loaded successfully!",zh_TW:"雙語字幕載入成功!",ja:"バイリンガル字幕の読み込みに成功しました!",ko:"이중 언어 자막 로딩 성공!"},subtitle_load_failed:{zh:"双语字幕加载失败!",en:"Failed to load bilingual subtitles!",zh_TW:"雙語字幕載入失敗!",ja:"バイリンガル字幕の読み込みに失敗しました!",ko:"이중 언어 자막 로딩 실패!"},try_get_subtitle_data:{zh:"尝试获取字幕数据,请稍候...",en:"Trying to get subtitle data, please wait...",zh_TW:"嘗試取得字幕資料,請稍候...",ja:"字幕データを取得しています。お待ちください...",ko:"자막 데이터를 가져오는 중입니다. 잠시 기다려주세요..."},subtitle_data_processing:{zh:"字幕数据处理中...",en:"Subtitle data processing...",zh_TW:"字幕資料處理中...",ja:"字幕データを処理中...",ko:"자막 데이터 처리 중..."},starting_to_process_subtitle:{zh:"开始处理字幕数据...",en:"Starting to process subtitle data...",zh_TW:"開始處理字幕資料...",ja:"字幕データの処理を開始します...",ko:"자막 데이터 처리를 시작합니다..."},subtitle_data_is_ready:{zh:"字幕数据已准备就绪,请点击KT按钮加载",en:"The subtitle data is ready, please click the KT button to load it",zh_TW:"字幕資料已準備就緒,請點選 KT 按鈕載入",ja:"字幕データの準備ができました。KTボタンをクリックして読み込んでください",ko:"자막 데이터가 준비되었습니다. KT 버튼을 클릭하여 로드하세요"},starting_reprocess_events:{zh:"重新处理字幕数据...",en:"Reprocess the subtitle data...",zh_TW:"重新處理字幕資料...",ja:"字幕データを再処理しています...",ko:"자막 데이터를 다시 처리 중..."},waitting_for_subtitle:{zh:"请等待字幕数据",en:"Please wait for the subtitle data.",zh_TW:"請等待字幕資料",ja:"字幕データを待機中",ko:"자막 데이터를 기다려주세요"},ai_processing_pls_wait:{zh:"AI处理中,请稍等...",en:"AI processing in progress, please wait...",zh_TW:"AI 處理中,請稍候...",ja:"AI処理中です。お待ちください...",ko:"AI 처리 중입니다. 잠시 기다려주세요..."},processing_subtitles:{zh:"字幕处理中...",en:"Subtitle processing...",zh_TW:"字幕處理中...",ja:"字幕処理中...",ko:"자막 처리 중..."},waiting_subtitles:{zh:"等待字幕中",en:"Waiting for subtitles",zh_TW:"等待字幕中",ja:"字幕待機中",ko:"자막 대기 중"},subtitle_is_not_yet_ready:{zh:"字幕数据尚未准备好",en:"Subtitle is not yet ready.",zh_TW:"字幕資料尚未準備好",ja:"字幕データの準備がまだできていません。",ko:"자막 데이터가 아직 준비되지 않았습니다."},log_level:{zh:"日志级别",en:"Log Level",zh_TW:"日誌等級",ja:"ログレベル",ko:"로그 레벨"},goto_custom_api_example:{zh:"点击查看【自定义接口示例】",en:"Click to view [Custom Interface Example]",zh_TW:"點選檢視【自訂介面範例】",ja:"【カスタムインターフェースの例】を見る",ko:"[사용자 지정 인터페이스 예시] 보기"},split_paragraph:{zh:"切分长段落",en:"Split long paragraph",zh_TW:"切分長段落",ja:"長い段落を分割",ko:"긴 단락 나누기"},split_length:{zh:"切分长度 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"切分長度(0-10000)",ja:"分割長(0-10000)",ko:"분할 길이(0-10000)"},highlight_words:{zh:"高亮收藏词汇",en:"Highlight favorite words",zh_TW:"醒目標示收藏詞彙",ja:"お気に入り単語をハイライト",ko:"즐겨찾는 단어 하이라이트"},split_disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화"},split_textlength:{zh:"按照长度切分",en:"Split by length",zh_TW:"依長度切分",ja:"長さで分割",ko:"길이로 나누기"},split_punctuation:{zh:"按照句子切分",en:"Split by sentence",zh_TW:"按照句子切分",ja:"文で分割",ko:"문장으로 나누기"},highlight_disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화"},highlight_beforetrans:{zh:"翻译前高亮",en:"Highlight before translation",zh_TW:"翻譯前醒目標示",ja:"翻訳前にハイライト",ko:"번역 전 하이라이트"},highlight_aftertrans:{zh:"翻译后高亮",en:"Highlight after translation",zh_TW:"翻譯後醒目標示",ja:"翻訳後にハイライト",ko:"번역 후 하이라이트"},pagescroll_root_margin:{zh:"滚动加载提前触发 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"滾動載入提前觸發 (0-10000px)",ja:"スクロール読み込みの事前トリガー (0-10000px)",ko:"스크롤 로딩 미리 트리거 (0-10000px)"},styles_setting:{zh:"样式设置",en:"Style Setting",zh_TW:"樣式設定",ja:"スタイル設定",ko:"스타일 설정"},style_name:{zh:"样式名称",en:"Style Name",zh_TW:"樣式名稱",ja:"スタイル名",ko:"스타일 이름"},style_code:{zh:"样式代码",en:"Style Code",zh_TW:"樣式程式碼",ja:"スタイルコード",ko:"스타일 코드"},long_sentence_threshold:{zh:"规则断句阈值 (20-300字符)",en:"Rule-based segmentation threshold (20-300 chars)",zh_TW:"規則斷句閾值 (20-300 字元)",ja:"ルールベース分割閾値 (20-300文字)",ko:"규칙 기반 분할 임계값 (20-300자)"},pre_trans_seconds:{zh:"提前翻译时长 (10-36000s)",en:"Pre translation seconds (10-36000s)",zh_TW:"提前翻譯時長 (10-36000s)",ja:"事前翻訳時間 (10-36000s)",ko:"미리 번역 시간 (10-36000s)"},throttle_trans_interval:{zh:"节流翻译间隔 (1-3600s)",en:"Throttling translation interval (1-3600s)",zh_TW:"節流翻譯間隔 (1-3600s)",ja:"翻訳間隔のスロットリング (1-3600s)",ko:"번역 간격 조절 (1-3600s)"},show_origin_subtitle:{zh:"显示原字幕",en:"Show original subtitles",zh_TW:"顯示原字幕",ja:"原字幕を表示",ko:"원본 자막 표시"},subtitle_same_lang:{zh:"原语言与目标语言相同,字幕不予处理",en:"The source language is the same as the target language, subtitles will not be processed",zh_TW:"原語言與目標語言相同時,字幕不予處理",ja:"原言語と目標言語が同じ場合、字幕は処理されません",ko:"원본 언어와 대상 언어가 동일한 경우, 자막은 처리되지 않습니다"},plain_text_translate:{zh:"纯文本翻译",en:"Plain text translation",zh_TW:"純文字翻譯",ja:"プレーンテキスト翻訳",ko:"순수 텍스트 번역"},is_enable_enhance:{zh:"启用增强功能",en:"Enable Enhancement Features",zh_TW:"啟用增強功能",ja:"強化機能を有効にする",ko:"향상 기능 활성화"},open_separate_window:{zh:"独立窗口打开",en:"Open in Separate Window",zh_TW:"在獨立視窗中開啟",ja:"別ウィンドウで開く",ko:"별도 창에서 열기"},comment_support:{zh:"好评支持",en:"Leave a Positive Review",zh_TW:"好評支持",ja:"高評価で応援",ko:"좋은 평가로 응원"},appreciate_support:{zh:"赞赏支持",en:"Support with a Tip",zh_TW:"贊賞支持",ja:"投げ銭で応援",ko:"후원하기"},toggle_transbox:{zh:"切换翻译窗",en:"Toggle Translation Box",zh_TW:"切換翻譯視窗",ja:"翻訳ウィンドウを切り替え",ko:"번역 창 전환"},copy:{zh:"复制",en:"Copy",zh_TW:"複製",ja:"コピー",ko:"복사"},paste:{zh:"黏贴",en:"Paste",zh_TW:"貼上",ja:"貼り付け",ko:"붙여넣기"},submit:{zh:"提交",en:"Submit",zh_TW:"提交",ja:"送信",ko:"제출"},collect:{zh:"收藏",en:"Save",zh_TW:"收藏",ja:"保存",ko:"저장"},show_translation_dot:{zh:"显示翻译圆点",en:"Show Translation Dot",zh_TW:"顯示翻譯圓點",ja:"翻訳ドットを表示",ko:"번역 점 표시"},show_dot_mobile:{zh:"仅移动端",en:"Mobile Only",zh_TW:"僅限行動裝置",ja:"モバイルのみ",ko:"모바일 전용"},show_dot_always:{zh:"总是显示",en:"Always",zh_TW:"總是顯示",ja:"常に表示",ko:"항상 표시"},show_dot_disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"사용 안 함"},rule_disabled:{zh:"规则已禁用",en:"Rule Disabled",zh_TW:"規則已停用",ja:"ルールが無効になっています",ko:"규칙이 비활성화되었습니다"},rule_enabled:{zh:"规则已启用",en:"Rule Enabled",zh_TW:"規則已啟用",ja:"ルールが有効になっています",ko:"규칙이 활성화되었습니다"},rule_toggle_failed:{zh:"规则切换失败",en:"Failed to toggle rule",zh_TW:"規則切換失敗",ja:"ルールの切り替えに失敗しました",ko:"규칙 전환 실패"}},Wt=e=>t=>{var n;return(null===(n=Ft[t])||void 0===n?void 0:n[e])||""},Ut="kiss-rules_v".concat(o[0],".json"),Vt="kiss-words.json",Ht=("kiss-rules-share_v".concat(o[0],".json"),"kiss-setting_v".concat(o[0],".json")),Gt="".concat(t,"_msauth"),qt=("".concat(t,"_bdauth"),"".concat(t,"_setting"),"".concat(t,"_rules"),"".concat(t,"_setting_v").concat(o[0])),Kt="".concat(t,"_rules_v").concat(o[0]),$t="".concat(t,"_words"),Yt="".concat(t,"_sync"),Xt="".concat(t,"_fab"),Jt="".concat(t,"_tranbox"),Qt=("".concat(t,"_separate_window"),"".concat(t,"_rulescache_")),Zt="".concat(t,"_disabled_sub_rules"),en="".concat(t,"_cache"),tn=604800,nn="https://".concat(n,"/translate"),rn="https://".concat(n,"/subtitle"),on="https://".concat(n,"/detectlang"),an="https://".concat(n,"/bingdict"),sn="https://".concat(n,"/context"),ln="kiss_fetch",cn="get_httpcache",un="toggle_translate",dn="toggle_translate_only",hn="toggle_styles",pn="open_tranbox",fn="trans_putrule",gn="toggle_transbox",mn="toggle_popup",vn="toggle_mousehover",yn="toggle_input_translation",bn="update_icon",wn="kiss_translator_inner",xn="kiss_translator",An="firefox",Sn="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",kn="userscript",_n=["chrome","edge",An,"thunderbird"].includes(kn);const Tn=function(){try{return i(9286)}catch(e){}}(),En=()=>{const e=globalThis.__KISS_CONTEXT__;return e||"undefined"},Cn=()=>"background"===En(),In="LanguageDetector"in globalThis&&"Translator"in globalThis;function Pn(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return"";let n=e.replace(/^```[a-z]*\s*\n?/i,"");return t||(n=n.replace(/\n?```$/i,"")),n}const Ln=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;const r=parseInt(e);return Number.isNaN(r)||r<t?t:r>n?n:r},Rn=(e,t)=>0===e.length||e.includes(t)?t:e[0],Nn=e=>new Promise(t=>{const n=setTimeout(()=>{clearTimeout(n),t()},e)}),On=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;const r=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n&&clearTimeout(n),n=setTimeout(()=>{e(...i),n=null},t)};return r.cancel=()=>{clearTimeout(n),n=null},r},jn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(;n<e.length;){if(e[n]!==t)return!1;n++}return!0},zn=(e,t)=>{if(0===e.length||0===t.length)return!1;t="*"+t+"*";let[n,r]=[0,0],[i,o]=[-1,-1];for(;n<e.length&&o<t.length;)if("*"===t[r])r++,[i,o]=[n,r];else if(e[n]===t[r])n++,r++;else{if(!(i+1<e.length))return!1;i++,[n,r]=[i,o]}return t.length===r||jn(t,"*",r)},Mn=e=>Object.prototype.toString.call(e).match(/\[object (.*?)\]/)[1].toLowerCase(),Dn=async(e,t)=>{const n=(new TextEncoder).encode(e+t),r=await crypto.subtle.digest({name:"SHA-256"},n);return[...new Uint8Array(r)].map(e=>e.toString(16).padStart(2,"0")).join("")},Bn=()=>"kiss-".concat(btoa(Math.random()).slice(3,11)),Fn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(!e)return"";let r=e.length;for(;r>e.length-n&&e[r-1]===t;)r--;return e.slice(0,r)},Wn=e=>/^[a-zA-Z-]+$/.test(e),Un=e=>{if(!e||"string"!==Mn(e))return{};try{return"{"!==e.trim()[0]&&(e="{".concat(e,"}")),JSON.parse(e)}catch(e){}return{}},Vn=e=>{const t=e.match(/({[^]*}|\[[^]*\])/);return t?t[0]:null},Hn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;if("string"!=typeof e)return"";if(e.length<=t)return e;const n=e.slice(0,t);return n.slice(0,n.lastIndexOf(" "))+" …"},Gn=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=Math.random()*(t-e)+e;return n?Math.floor(r):r};function qn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kiss-file.txt";const n=function(e){const t="application/octet-stream";return e&&-1!==e.indexOf(".")&&{txt:"text/plain;charset=utf-8",html:"text/html;charset=utf-8",css:"text/css;charset=utf-8",js:"text/javascript;charset=utf-8",json:"application/json;charset=utf-8",xml:"application/xml;charset=utf-8",md:"text/markdown;charset=utf-8",vtt:"text/vtt;charset=utf-8",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",ico:"image/x-icon",mp3:"audio/mpeg",mp4:"video/mp4",webm:"video/webm",wav:"audio/wav",pdf:"application/pdf",zip:"application/zip",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}[e.split(".").pop().toLowerCase()]||t}(t),r=new Blob([e],{type:n}),i=URL.createObjectURL(r),o=document.createElement("a");o.style.display="none",o.href=i,o.download=t||"kiss-file.txt",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(i)}function Kn(e){if(!e||"string"!=typeof e)return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value}function $n(e){if("string"!=typeof e||""===e.trim())return{};try{return Object.fromEntries(e.split(/\n|;/).map(e=>{const[t="",n=""]=e.split(",").map(e=>e.trim());return[t,n]}).filter(e=>{let[t]=e;return t}))}catch(e){return{}}}async function Yn(e,t){_n?await Tn.storage.local.set({[e]:t}):await(window.KISS_GM||GM).setValue(e,t)}async function Xn(e){if(_n){return(await Tn.storage.local.get([e]))[e]}return await(window.KISS_GM||GM).getValue(e)}async function Jn(e){_n?await Tn.storage.local.remove([e]):await(window.KISS_GM||GM).deleteValue(e)}async function Qn(e,t){await Yn(e,JSON.stringify(t))}async function Zn(e,t){await Xn(e)||await Qn(e,t)}async function er(e){const t=await Xn(e);if(null==t)return null;try{return JSON.parse(t)}catch(t){pt("parse json in storage err: ",e)}return null}async function tr(e,t){var n;const r=null!==(n=await er(e))&&void 0!==n?n:{};await Qn(e,h(h({},r),t))}const nr={get:Xn,set:Yn,del:Jn,setObj:Qn,trySetObj:Zn,getObj:er,putObj:tr},rr=async()=>h(h({},Rt),await er(qt)||{}),ir=async()=>await er(Kt)||ut,or=e=>Qn(Kt,e),ar=async()=>await er($t)||{},sr=e=>er(Qt+e),lr=async()=>await er(Xt)||{},cr=e=>tr(Xt,e),ur=On(e=>tr(Jt,e),300),dr=async()=>await er(Yt)||xt,hr=e=>tr(Yt,e),pr=On(async e=>{const{syncMeta:t={}}=await dr();t[e]=h(h({},t[e]||{}),{},{updateAt:Date.now()}),await hr({syncMeta:t})},300),fr=window.self!==window.top;var gr=i(8915);function mr(e,t){if(null==e)return{};var n,r,i=(0,gr.A)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function vr(e,t){this.v=e,this.k=t}function yr(e){return function(){return new br(e.apply(this,arguments))}}function br(e){var t,n;function r(t,n){try{var o=e[t](n),a=o.value,s=a instanceof vr;Promise.resolve(s?a.v:a).then(function(n){if(s){var l="return"===t?"return":"next";if(!a.k||n.done)return r(l,n);n=e[l](n).value}i(o.done?"return":"normal",n)},function(e){r("throw",e)})}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},"function"!=typeof e.return&&(this.return=void 0)}function wr(e){return new vr(e,0)}function xr(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise(function(n){n(e[t](r))}),{done:!1,value:new vr(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function Ar(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Sr(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Sr(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return Sr=function(e){this.s=e,this.n=e.next},Sr.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Sr(e)}br.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},br.prototype.next=function(e){return this._invoke("next",e)},br.prototype.throw=function(e){return this._invoke("throw",e)},br.prototype.return=function(e){return this._invoke("return",e)};const kr=async()=>{const[e]=await Tn.tabs.query({active:!0,lastFocusedWindow:!0});return e},_r=(e,t)=>null==Tn?void 0:Tn.runtime.sendMessage({action:e,args:t}),Tr=async(e,t)=>{const n=await(async()=>{const e=await kr();return null==e?void 0:e.id})();if(n)return Tn.tabs.sendMessage(n,{action:e,args:t}).catch(e=>{var t,n;if(!(null!=e&&null!==(t=e.message)&&void 0!==t&&t.includes("Could not establish connection")||null!=e&&null!==(n=e.message)&&void 0!==n&&n.includes("Receiving end does not exist")))throw e;console.warn("sendTabMsg warning: ",null==e?void 0:e.message)})};function Er(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Cr=0;function Ir(e){return"__private_"+Cr+++"_"+e}var Pr=Ir("pool"),Lr=Ir("maxRetry"),Rr=Ir("retryInterval"),Nr=Ir("limit"),Or=Ir("interval"),jr=Ir("currentConcurrent"),zr=Ir("lastExecutionTime"),Mr=Ir("schedulerTimer"),Dr=Ir("scheduleNext"),Br=Ir("execute");class Fr{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;Object.defineProperty(this,Br,{value:Ur}),Object.defineProperty(this,Dr,{value:Wr}),Object.defineProperty(this,Pr,{writable:!0,value:[]}),Object.defineProperty(this,Lr,{writable:!0,value:2}),Object.defineProperty(this,Rr,{writable:!0,value:1e3}),Object.defineProperty(this,Nr,{writable:!0,value:void 0}),Object.defineProperty(this,Or,{writable:!0,value:void 0}),Object.defineProperty(this,jr,{writable:!0,value:0}),Object.defineProperty(this,zr,{writable:!0,value:0}),Object.defineProperty(this,Mr,{writable:!0,value:null}),Er(this,Or)[Or]=e,Er(this,Nr)[Nr]=t,Er(this,Rr)[Rr]=n}push(e,t){return new Promise((n,r)=>{Er(this,Pr)[Pr].push({fn:e,args:t,resolve:n,reject:r,retry:0}),Er(this,Dr)[Dr]()})}update(e,t){e>=0&&(Er(this,Or)[Or]=e),t>=1&&(Er(this,Nr)[Nr]=t),Er(this,Dr)[Dr]()}clear(){for(const e of Er(this,Pr)[Pr])e.reject("the task pool was cleared");Er(this,Pr)[Pr].length=0,Er(this,Mr)[Mr]&&(clearTimeout(Er(this,Mr)[Mr]),Er(this,Mr)[Mr]=null)}}function Wr(){if(Er(this,Mr)[Mr])return;if(Er(this,jr)[jr]>=Er(this,Nr)[Nr]||0===Er(this,Pr)[Pr].length)return;const e=Date.now()-Er(this,zr)[zr],t=Math.max(0,Er(this,Or)[Or]-e);Er(this,Mr)[Mr]=setTimeout(()=>{if(Er(this,Mr)[Mr]=null,Er(this,jr)[jr]<Er(this,Nr)[Nr]&&Er(this,Pr)[Pr].length>0){const e=Er(this,Pr)[Pr].shift();e&&(Er(this,zr)[zr]=Date.now(),Er(this,Br)[Br](e))}Er(this,Pr)[Pr].length>0&&Er(this,Dr)[Dr]()},t)}async function Ur(e){Er(this,jr)[jr]++;const{fn:t,args:n,resolve:r,reject:i,retry:o}=e;try{r(await t(n))}catch(t){pt("task pool",t),o<Er(this,Lr)[Lr]?setTimeout(()=>{Er(this,Pr)[Pr].unshift(h(h({},e),{},{retry:o+1})),Er(this,Dr)[Dr]()},Er(this,Rr)[Rr]):i(t)}finally{Er(this,jr)[jr]--,Er(this,Dr)[Dr]()}}let Vr;const Hr=(e,t)=>(Vr?e&&t&&Gr(e,t):Vr=new Fr(null!=e?e:100,null!=t?t:10),Vr),Gr=(e,t)=>{var n;null===(n=Vr)||void 0===n||n.update(e,t)},qr=()=>{var e;null===(e=Vr)||void 0===e||e.clear()},Kr=async(e,t)=>{let n=new Request(e,t);if("GET"!==n.method){const e=await n.text(),t=new URL(n.url);t.pathname+=e,n=new Request(t.toString(),{method:"GET"})}return n},$r=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new Error("Response object does not exist");if(!e.ok){const t={url:e.url,status:e.status,statusText:e.statusText};try{const n=await e.clone().text();try{t.response=JSON.parse(n)}catch(e){t.response=n}}catch(e){t.response="Unable to read error body"}throw new Error(JSON.stringify(t))}const n=e.headers.get("Content-Type")||"";if("blob"===t)return e.blob();if("text"===t)return e.text();if("json"===t)return e.json();if("audio"===t||n.includes("audio")||n.includes("image")||n.includes("video")){return(e=>new Promise(t=>{const n=new FileReader;n.onloadend=()=>t(n.result),n.readAsDataURL(e)}))(await e.blob())}const r=await e.text();if(!r)return null;try{return JSON.parse(r)}catch(e){return r}},Yr=(e,t)=>_n&&!Cn()?_r(cn,{input:e,init:t}):(async e=>{let{input:t,init:n,expect:r}=e;try{const e=await Kr(t,n),i=await caches.open(en),o=await i.match(e);if(o)return await $r(o,r)}catch(e){pt("get cache",e)}return null})({input:e,init:t});const Xr=(e,t,n)=>_n&&!Cn()?_r("put_httpcache",{input:e,init:t,data:n}):(async e=>{let{input:t,init:n,data:r,maxAge:i=tn}=e;try{const e=await Kr(t,n),o=await caches.open(en),a=new Response(JSON.stringify(r),{status:200,headers:{"Content-Type":"application/json","Cache-Control":"max-age=".concat(i)}});await o.put(e,a)}catch(e){pt("put cache",e)}})({input:e,init:t,data:n});var Jr;!function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"}(Jr||(Jr={}));const Qr={[Jr.QUOTATION_MARK]:Jr.QUOTATION_MARK,[Jr.REVERSE_SOLIDUS]:Jr.REVERSE_SOLIDUS,[Jr.SOLIDUS]:Jr.SOLIDUS,[Jr.LATIN_SMALL_LETTER_B]:Jr.BACKSPACE,[Jr.LATIN_SMALL_LETTER_F]:Jr.FORM_FEED,[Jr.LATIN_SMALL_LETTER_N]:Jr.NEWLINE,[Jr.LATIN_SMALL_LETTER_R]:Jr.CARRIAGE_RETURN,[Jr.LATIN_SMALL_LETTER_T]:Jr.TAB};class Zr{constructor(){this.decoder=new TextDecoder("utf-8"),this.strings=[],this.byteLength=0}appendChar(e){this.strings.push(String.fromCharCode(e)),this.byteLength+=1}appendBuf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;this.strings.push(this.decoder.decode(e.subarray(t,n))),this.byteLength+=n-t}reset(){this.strings=[],this.byteLength=0}toString(){return this.strings.join("")}}class ei{constructor(e){this.decoder=new TextDecoder("utf-8"),this.bufferOffset=0,this.string="",this.byteLength=0,this.buffer=new Uint8Array(e)}appendChar(e){this.bufferOffset>=this.buffer.length&&this.flushStringBuffer(),this.buffer[this.bufferOffset++]=e,this.byteLength+=1}appendBuf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const r=n-t;this.bufferOffset+r>this.buffer.length&&this.flushStringBuffer(),this.buffer.set(e.subarray(t,n),this.bufferOffset),this.bufferOffset+=r,this.byteLength+=r}flushStringBuffer(){this.string+=this.decoder.decode(this.buffer.subarray(0,this.bufferOffset)),this.bufferOffset=0}reset(){this.string="",this.bufferOffset=0,this.byteLength=0}toString(){return this.flushStringBuffer(),this.string}}var ti;!function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"}(ti||(ti={}));const ni=ti;var ri;function ii(e){return["START","ENDED","ERROR","TRUE1","TRUE2","TRUE3","FALSE1","FALSE2","FALSE3","FALSE4","NULL1","NULL2","NULL3","STRING_DEFAULT","STRING_AFTER_BACKSLASH","STRING_UNICODE_DIGIT_1","STRING_UNICODE_DIGIT_2","STRING_UNICODE_DIGIT_3","STRING_UNICODE_DIGIT_4","STRING_INCOMPLETE_CHAR","NUMBER_AFTER_INITIAL_MINUS","NUMBER_AFTER_INITIAL_ZERO","NUMBER_AFTER_INITIAL_NON_ZERO","NUMBER_AFTER_FULL_STOP","NUMBER_AFTER_DECIMAL","NUMBER_AFTER_E","NUMBER_AFTER_E_AND_SIGN","NUMBER_AFTER_E_AND_DIGIT","SEPARATOR","BOM_OR_START","BOM"][e]}!function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR",e[e.BOM_OR_START=29]="BOM_OR_START",e[e.BOM=30]="BOM"}(ri||(ri={}));const oi={stringBufferSize:0,numberBufferSize:0,separator:void 0,emitPartialTokens:!1};class ai extends Error{constructor(e){super(e),Object.setPrototypeOf(this,ai.prototype)}}class si{constructor(e){this.state=ri.BOM_OR_START,this.bomIndex=0,this.separatorIndex=0,this.escapedCharsByteLength=0,this.bytes_remaining=0,this.bytes_in_sequence=0,this.char_split_buffer=new Uint8Array(4),this.encoder=new TextEncoder,this.offset=-1,e=Object.assign(Object.assign({},oi),e),this.emitPartialTokens=!0===e.emitPartialTokens,this.bufferedString=e.stringBufferSize&&e.stringBufferSize>4?new ei(e.stringBufferSize):new Zr,this.bufferedNumber=e.numberBufferSize&&e.numberBufferSize>0?new ei(e.numberBufferSize):new Zr,this.separator=e.separator,this.separatorBytes=e.separator?this.encoder.encode(e.separator):void 0}get isEnded(){return this.state===ri.ENDED}write(e){try{let t;if(e instanceof Uint8Array)t=e;else if("string"==typeof e)t=this.encoder.encode(e);else if(Array.isArray(e))t=Uint8Array.from(e);else{if(!ArrayBuffer.isView(e))throw new TypeError("Unexpected type. The `write` function only accepts Arrays, TypedArrays and Strings.");t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}for(let n=0;n<t.length;n+=1){const r=t[n];switch(this.state){case ri.BOM_OR_START:if(e instanceof Uint8Array&&239===r){this.bom=[239,187,191],this.bomIndex+=1,this.state=ri.BOM;continue}if(e instanceof Uint16Array){if(254===r){this.bom=[254,255],this.bomIndex+=1,this.state=ri.BOM;continue}if(255===r){this.bom=[255,254],this.bomIndex+=1,this.state=ri.BOM;continue}}if(e instanceof Uint32Array){if(0===r){this.bom=[0,0,254,255],this.bomIndex+=1,this.state=ri.BOM;continue}if(255===r){this.bom=[255,254,0,0],this.bomIndex+=1,this.state=ri.BOM;continue}}case ri.START:if(this.offset+=1,this.separatorBytes&&r===this.separatorBytes[0]){if(1===this.separatorBytes.length){this.state=ri.START,this.onToken({token:ni.SEPARATOR,value:this.separator,offset:this.offset+this.separatorBytes.length-1});continue}this.state=ri.SEPARATOR;continue}if(r===Jr.SPACE||r===Jr.NEWLINE||r===Jr.CARRIAGE_RETURN||r===Jr.TAB)continue;if(r===Jr.LEFT_CURLY_BRACKET){this.onToken({token:ni.LEFT_BRACE,value:"{",offset:this.offset});continue}if(r===Jr.RIGHT_CURLY_BRACKET){this.onToken({token:ni.RIGHT_BRACE,value:"}",offset:this.offset});continue}if(r===Jr.LEFT_SQUARE_BRACKET){this.onToken({token:ni.LEFT_BRACKET,value:"[",offset:this.offset});continue}if(r===Jr.RIGHT_SQUARE_BRACKET){this.onToken({token:ni.RIGHT_BRACKET,value:"]",offset:this.offset});continue}if(r===Jr.COLON){this.onToken({token:ni.COLON,value:":",offset:this.offset});continue}if(r===Jr.COMMA){this.onToken({token:ni.COMMA,value:",",offset:this.offset});continue}if(r===Jr.LATIN_SMALL_LETTER_T){this.state=ri.TRUE1;continue}if(r===Jr.LATIN_SMALL_LETTER_F){this.state=ri.FALSE1;continue}if(r===Jr.LATIN_SMALL_LETTER_N){this.state=ri.NULL1;continue}if(r===Jr.QUOTATION_MARK){this.bufferedString.reset(),this.escapedCharsByteLength=0,this.state=ri.STRING_DEFAULT;continue}if(r>=Jr.DIGIT_ONE&&r<=Jr.DIGIT_NINE){this.bufferedNumber.reset(),this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_INITIAL_NON_ZERO;continue}if(r===Jr.DIGIT_ZERO){this.bufferedNumber.reset(),this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_INITIAL_ZERO;continue}if(r===Jr.HYPHEN_MINUS){this.bufferedNumber.reset(),this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_INITIAL_MINUS;continue}break;case ri.STRING_DEFAULT:if(r===Jr.QUOTATION_MARK){const e=this.bufferedString.toString();this.state=ri.START,this.onToken({token:ni.STRING,value:e,offset:this.offset}),this.offset+=this.escapedCharsByteLength+this.bufferedString.byteLength+1;continue}if(r===Jr.REVERSE_SOLIDUS){this.state=ri.STRING_AFTER_BACKSLASH;continue}if(r>=128){if(this.bytes_in_sequence=r>=194&&r<=223?2:r<=239?3:4,this.bytes_in_sequence<=t.length-n){this.bufferedString.appendBuf(t,n,n+this.bytes_in_sequence),n+=this.bytes_in_sequence-1;continue}this.bytes_remaining=n+this.bytes_in_sequence-t.length,this.char_split_buffer.set(t.subarray(n)),n=t.length-1,this.state=ri.STRING_INCOMPLETE_CHAR;continue}if(r>=Jr.SPACE){this.bufferedString.appendChar(r);continue}break;case ri.STRING_INCOMPLETE_CHAR:this.char_split_buffer.set(t.subarray(n,n+this.bytes_remaining),this.bytes_in_sequence-this.bytes_remaining),this.bufferedString.appendBuf(this.char_split_buffer,0,this.bytes_in_sequence),n=this.bytes_remaining-1,this.state=ri.STRING_DEFAULT;continue;case ri.STRING_AFTER_BACKSLASH:const i=Qr[r];if(i){this.bufferedString.appendChar(i),this.escapedCharsByteLength+=1,this.state=ri.STRING_DEFAULT;continue}if(r===Jr.LATIN_SMALL_LETTER_U){this.unicode="",this.state=ri.STRING_UNICODE_DIGIT_1;continue}break;case ri.STRING_UNICODE_DIGIT_1:case ri.STRING_UNICODE_DIGIT_2:case ri.STRING_UNICODE_DIGIT_3:if(r>=Jr.DIGIT_ZERO&&r<=Jr.DIGIT_NINE||r>=Jr.LATIN_CAPITAL_LETTER_A&&r<=Jr.LATIN_CAPITAL_LETTER_F||r>=Jr.LATIN_SMALL_LETTER_A&&r<=Jr.LATIN_SMALL_LETTER_F){this.unicode+=String.fromCharCode(r),this.state+=1;continue}break;case ri.STRING_UNICODE_DIGIT_4:if(r>=Jr.DIGIT_ZERO&&r<=Jr.DIGIT_NINE||r>=Jr.LATIN_CAPITAL_LETTER_A&&r<=Jr.LATIN_CAPITAL_LETTER_F||r>=Jr.LATIN_SMALL_LETTER_A&&r<=Jr.LATIN_SMALL_LETTER_F){const e=parseInt(this.unicode+String.fromCharCode(r),16);let t;if(void 0===this.highSurrogate){if(e>=55296&&e<=56319){this.highSurrogate=e,this.state=ri.STRING_DEFAULT;continue}t=String.fromCharCode(e)}else t=e>=56320&&e<=57343?String.fromCharCode(this.highSurrogate,e):String.fromCharCode(this.highSurrogate),this.highSurrogate=void 0;const n=this.encoder.encode(t);this.bufferedString.appendBuf(n),this.escapedCharsByteLength+=6-n.byteLength,this.state=ri.STRING_DEFAULT;continue}break;case ri.NUMBER_AFTER_INITIAL_MINUS:if(r===Jr.DIGIT_ZERO){this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_INITIAL_ZERO;continue}if(r>=Jr.DIGIT_ONE&&r<=Jr.DIGIT_NINE){this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_INITIAL_NON_ZERO;continue}break;case ri.NUMBER_AFTER_INITIAL_ZERO:if(r===Jr.FULL_STOP){this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_FULL_STOP;continue}if(r===Jr.LATIN_SMALL_LETTER_E||r===Jr.LATIN_CAPITAL_LETTER_E){this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_E;continue}n-=1,this.state=ri.START,this.emitNumber();continue;case ri.NUMBER_AFTER_INITIAL_NON_ZERO:if(r>=Jr.DIGIT_ZERO&&r<=Jr.DIGIT_NINE){this.bufferedNumber.appendChar(r);continue}if(r===Jr.FULL_STOP){this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_FULL_STOP;continue}if(r===Jr.LATIN_SMALL_LETTER_E||r===Jr.LATIN_CAPITAL_LETTER_E){this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_E;continue}n-=1,this.state=ri.START,this.emitNumber();continue;case ri.NUMBER_AFTER_FULL_STOP:if(r>=Jr.DIGIT_ZERO&&r<=Jr.DIGIT_NINE){this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_DECIMAL;continue}break;case ri.NUMBER_AFTER_DECIMAL:if(r>=Jr.DIGIT_ZERO&&r<=Jr.DIGIT_NINE){this.bufferedNumber.appendChar(r);continue}if(r===Jr.LATIN_SMALL_LETTER_E||r===Jr.LATIN_CAPITAL_LETTER_E){this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_E;continue}n-=1,this.state=ri.START,this.emitNumber();continue;case ri.NUMBER_AFTER_E:if(r===Jr.PLUS_SIGN||r===Jr.HYPHEN_MINUS){this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_E_AND_SIGN;continue}case ri.NUMBER_AFTER_E_AND_SIGN:if(r>=Jr.DIGIT_ZERO&&r<=Jr.DIGIT_NINE){this.bufferedNumber.appendChar(r),this.state=ri.NUMBER_AFTER_E_AND_DIGIT;continue}break;case ri.NUMBER_AFTER_E_AND_DIGIT:if(r>=Jr.DIGIT_ZERO&&r<=Jr.DIGIT_NINE){this.bufferedNumber.appendChar(r);continue}n-=1,this.state=ri.START,this.emitNumber();continue;case ri.TRUE1:if(r===Jr.LATIN_SMALL_LETTER_R){this.state=ri.TRUE2;continue}break;case ri.TRUE2:if(r===Jr.LATIN_SMALL_LETTER_U){this.state=ri.TRUE3;continue}break;case ri.TRUE3:if(r===Jr.LATIN_SMALL_LETTER_E){this.state=ri.START,this.onToken({token:ni.TRUE,value:!0,offset:this.offset}),this.offset+=3;continue}break;case ri.FALSE1:if(r===Jr.LATIN_SMALL_LETTER_A){this.state=ri.FALSE2;continue}break;case ri.FALSE2:if(r===Jr.LATIN_SMALL_LETTER_L){this.state=ri.FALSE3;continue}break;case ri.FALSE3:if(r===Jr.LATIN_SMALL_LETTER_S){this.state=ri.FALSE4;continue}break;case ri.FALSE4:if(r===Jr.LATIN_SMALL_LETTER_E){this.state=ri.START,this.onToken({token:ni.FALSE,value:!1,offset:this.offset}),this.offset+=4;continue}break;case ri.NULL1:if(r===Jr.LATIN_SMALL_LETTER_U){this.state=ri.NULL2;continue}break;case ri.NULL2:if(r===Jr.LATIN_SMALL_LETTER_L){this.state=ri.NULL3;continue}break;case ri.NULL3:if(r===Jr.LATIN_SMALL_LETTER_L){this.state=ri.START,this.onToken({token:ni.NULL,value:null,offset:this.offset}),this.offset+=3;continue}break;case ri.SEPARATOR:if(this.separatorIndex+=1,!this.separatorBytes||r!==this.separatorBytes[this.separatorIndex])break;this.separatorIndex===this.separatorBytes.length-1&&(this.state=ri.START,this.onToken({token:ni.SEPARATOR,value:this.separator,offset:this.offset+this.separatorIndex}),this.separatorIndex=0);continue;case ri.BOM:if(r===this.bom[this.bomIndex]){if(this.bomIndex===this.bom.length-1){this.state=ri.START,this.bom=void 0,this.bomIndex=0;continue}this.bomIndex+=1;continue}break;case ri.ENDED:if(r===Jr.SPACE||r===Jr.NEWLINE||r===Jr.CARRIAGE_RETURN||r===Jr.TAB)continue}throw new ai('Unexpected "'.concat(String.fromCharCode(r),'" at position "').concat(n,'" in state ').concat(ii(this.state)))}if(this.emitPartialTokens)switch(this.state){case ri.TRUE1:case ri.TRUE2:case ri.TRUE3:this.onToken({token:ni.TRUE,value:!0,offset:this.offset,partial:!0});break;case ri.FALSE1:case ri.FALSE2:case ri.FALSE3:case ri.FALSE4:this.onToken({token:ni.FALSE,value:!1,offset:this.offset,partial:!0});break;case ri.NULL1:case ri.NULL2:case ri.NULL3:this.onToken({token:ni.NULL,value:null,offset:this.offset,partial:!0});break;case ri.STRING_DEFAULT:{const e=this.bufferedString.toString();this.onToken({token:ni.STRING,value:e,offset:this.offset,partial:!0});break}case ri.NUMBER_AFTER_INITIAL_ZERO:case ri.NUMBER_AFTER_INITIAL_NON_ZERO:case ri.NUMBER_AFTER_DECIMAL:case ri.NUMBER_AFTER_E_AND_DIGIT:try{this.onToken({token:ni.NUMBER,value:this.parseNumber(this.bufferedNumber.toString()),offset:this.offset,partial:!0})}catch(e){}}}catch(e){this.error(e)}}emitNumber(){this.onToken({token:ni.NUMBER,value:this.parseNumber(this.bufferedNumber.toString()),offset:this.offset}),this.offset+=this.bufferedNumber.byteLength-1}parseNumber(e){return Number(e)}error(e){this.state!==ri.ENDED&&(this.state=ri.ERROR),this.onError(e)}end(){switch(this.state){case ri.NUMBER_AFTER_INITIAL_ZERO:case ri.NUMBER_AFTER_INITIAL_NON_ZERO:case ri.NUMBER_AFTER_DECIMAL:case ri.NUMBER_AFTER_E_AND_DIGIT:this.state=ri.ENDED,this.emitNumber(),this.onEnd();break;case ri.BOM_OR_START:case ri.START:case ri.ERROR:case ri.SEPARATOR:this.state=ri.ENDED,this.onEnd();break;default:this.error(new ai("Tokenizer ended in the middle of a token (state: ".concat(ii(this.state),"). Either not all the data was received or the data was invalid.")))}}onToken(e){throw new ai('Can\'t emit tokens before the "onToken" callback has been set up.')}onError(e){throw e}onEnd(){}}var li,ci;function ui(e){return["VALUE","KEY","COLON","COMMA","ENDED","ERROR","SEPARATOR"][e]}!function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"}(li||(li={})),function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"}(ci||(ci={}));const di={paths:void 0,keepStack:!0,separator:void 0,emitPartialValues:!1};class hi extends Error{constructor(e){super(e),Object.setPrototypeOf(this,hi.prototype)}}class pi{constructor(e){this.state=ci.VALUE,this.mode=void 0,this.key=void 0,this.value=void 0,this.stack=[],(e=Object.assign(Object.assign({},di),e)).paths&&(this.paths=e.paths.map(e=>{if(void 0===e||"$*"===e)return;if(!e.startsWith("$"))throw new hi('Invalid selector "'.concat(e,'". Should start with "$".'));const t=e.split(".").slice(1);if(t.includes(""))throw new hi('Invalid selector "'.concat(e,'". ".." syntax not supported.'));return t})),this.keepStack=e.keepStack||!1,this.separator=e.separator,e.emitPartialValues||(this.emitPartial=()=>{})}shouldEmit(){return!this.paths||this.paths.some(e=>{var t;if(void 0===e)return!0;if(e.length!==this.stack.length)return!1;for(let t=0;t<e.length-1;t++){const n=e[t],r=this.stack[t+1].key;if("*"!==n&&n!==(null==r?void 0:r.toString()))return!1}const n=e[e.length-1];return"*"===n||n===(null===(t=this.key)||void 0===t?void 0:t.toString())})}push(){this.stack.push({key:this.key,value:this.value,mode:this.mode,emit:this.shouldEmit()})}pop(){const e=this.value;let t;({key:this.key,value:this.value,mode:this.mode,emit:t}=this.stack.pop()),this.state=void 0!==this.mode?ci.COMMA:ci.VALUE,this.emit(e,t)}emit(e,t){!this.keepStack&&this.value&&this.stack.every(e=>!e.emit)&&delete this.value[this.key],t&&this.onValue({value:e,key:this.key,parent:this.value,stack:this.stack}),0===this.stack.length&&(this.separator?this.state=ci.SEPARATOR:void 0===this.separator&&this.end())}emitPartial(e){this.shouldEmit()&&(this.state!==ci.KEY?this.onValue({value:e,key:this.key,parent:this.value,stack:this.stack,partial:!0}):this.onValue({value:void 0,key:e,parent:this.value,stack:this.stack,partial:!0}))}get isEnded(){return this.state===ci.ENDED}write(e){let{token:t,value:n,partial:r}=e;try{if(r)return void this.emitPartial(n);if(this.state===ci.VALUE){if(t===ni.STRING||t===ni.NUMBER||t===ni.TRUE||t===ni.FALSE||t===ni.NULL)return this.mode===li.OBJECT?(this.value[this.key]=n,this.state=ci.COMMA):this.mode===li.ARRAY&&(this.value.push(n),this.state=ci.COMMA),void this.emit(n,this.shouldEmit());if(t===ni.LEFT_BRACE){if(this.push(),this.mode===li.OBJECT)this.value=this.value[this.key]={};else if(this.mode===li.ARRAY){const e={};this.value.push(e),this.value=e}else this.value={};return this.mode=li.OBJECT,this.state=ci.KEY,this.key=void 0,void this.emitPartial()}if(t===ni.LEFT_BRACKET){if(this.push(),this.mode===li.OBJECT)this.value=this.value[this.key]=[];else if(this.mode===li.ARRAY){const e=[];this.value.push(e),this.value=e}else this.value=[];return this.mode=li.ARRAY,this.state=ci.VALUE,this.key=0,void this.emitPartial()}if(this.mode===li.ARRAY&&t===ni.RIGHT_BRACKET&&0===this.value.length)return void this.pop()}if(this.state===ci.KEY){if(t===ni.STRING)return this.key=n,this.state=ci.COLON,void this.emitPartial();if(t===ni.RIGHT_BRACE&&0===Object.keys(this.value).length)return void this.pop()}if(this.state===ci.COLON&&t===ni.COLON)return void(this.state=ci.VALUE);if(this.state===ci.COMMA){if(t===ni.COMMA){if(this.mode===li.ARRAY)return this.state=ci.VALUE,void(this.key+=1);if(this.mode===li.OBJECT)return void(this.state=ci.KEY)}if(t===ni.RIGHT_BRACE&&this.mode===li.OBJECT||t===ni.RIGHT_BRACKET&&this.mode===li.ARRAY)return void this.pop()}if(this.state===ci.SEPARATOR&&t===ni.SEPARATOR&&n===this.separator)return void(this.state=ci.VALUE);if(t===ni.SEPARATOR&&this.state!==ci.SEPARATOR&&Array.from(n).map(e=>e.charCodeAt(0)).every(e=>e===Jr.SPACE||e===Jr.NEWLINE||e===Jr.CARRIAGE_RETURN||e===Jr.TAB))return;throw new hi("Unexpected ".concat(ni[t]," (").concat(JSON.stringify(n),") in state ").concat(ui(this.state)))}catch(e){this.error(e)}}error(e){this.state!==ci.ENDED&&(this.state=ci.ERROR),this.onError(e)}end(){this.state!==ci.VALUE&&this.state!==ci.SEPARATOR||this.stack.length>0?this.error(new Error("Parser ended in mid-parsing (state: ".concat(ui(this.state),"). Either not all the data was received or the data was invalid."))):(this.state=ci.ENDED,this.onEnd())}onValue(e){throw new hi('Can\'t emit data before the "onValue" callback has been set up.')}onError(e){throw e}onEnd(){}}class fi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.tokenizer=new si(e),this.tokenParser=new pi(e),this.tokenizer.onToken=this.tokenParser.write.bind(this.tokenParser),this.tokenizer.onEnd=()=>{this.tokenParser.isEnded||this.tokenParser.end()},this.tokenParser.onError=this.tokenizer.error.bind(this.tokenizer),this.tokenParser.onEnd=()=>{this.tokenizer.isEnded||this.tokenizer.end()}}get isEnded(){return this.tokenizer.isEnded&&this.tokenParser.isEnded}write(e){this.tokenizer.write(e)}end(){this.tokenizer.end()}set onToken(e){this.tokenizer.onToken=t=>{e(t),this.tokenParser.write(t)}}set onValue(e){this.tokenParser.onValue=e}set onError(e){this.tokenizer.onError=e}set onEnd(e){this.tokenParser.onEnd=()=>{this.tokenizer.isEnded||this.tokenizer.end(),e.call(this.tokenParser)}}}const gi=()=>{let e="";return function*(t){e+=t;const n=e.split("\n");e=n.pop()||"";for(const e of n){if(!e.startsWith("data: "))continue;const t=e.slice(6);"[DONE]"!==t&&(yield t)}}},mi=()=>{const e=[];let t=null,n=!1,r=null;return{push:n=>{e.push(n),t&&(t(),t=null)},finish:()=>{n=!0,t&&(t(),t=null)},error:e=>{r=e,n=!0,t&&(t(),t=null)},iterate:()=>yr(function*(){const i=e=>{t=e};for(;!n||e.length>0;)e.length>0?yield e.shift():n||(yield wr(new Promise(i)));if(r)throw r})()}};function vi(e,t){var n,r,i;switch(t){case ee:case W:case U:case V:case H:case G:case q:case ne:case ae:case oe:return(null===(n=e.choices)||void 0===n||null===(r=n[0])||void 0===r||null===(i=r.delta)||void 0===i?void 0:i.content)||"";case te:{var o,a,s,l;const t=null===(o=e.candidates)||void 0===o||null===(a=o[0])||void 0===a||null===(s=a.content)||void 0===s?void 0:s.parts;return(null===(l=Array.isArray(t)?t.find(e=>!e.thought):void 0)||void 0===l?void 0:l.text)||""}case re:var c;return"content_block_delta"===e.type&&(null===(c=e.delta)||void 0===c?void 0:c.text)||"";default:return""}}function*yi(e,t){if(!e)return;const n=/<(t|item|seg)\s+id="(\d+)"(?:\s+sourceLanguage="([^"]*)")?[^>]*>([\s\S]*?)<\/\1>/gi;let r,i=!1;for(;null!==(r=n.exec(e));){i=!0;const e=parseInt(r[2],10);if(!t.has(e)){t.add(e);const n=r[3]||"",i=[r[4].trim(),n];yield{id:e,translation:i}}}if(i)return;const o=e.endsWith("\n"),a=e.split("\n"),s=o?a:a.slice(0,-1);for(const e of s){const n=e.trim();if(!n)continue;const r=n.match(/^(\d+)\s*\|\s*(.*)/);if(r){const e=parseInt(r[1],10);if(!t.has(e)){t.add(e);const n=[r[2].trim().replace(/<br\s*\/?>/gi,"\n"),""];yield{id:e,translation:n}}}}}function bi(e){const t=e.trim(),n=t.search(/[{[]/),r=t.search(/<(t|item|seg)\s/i),i=t.search(/^\d+\s*\|/m);if(-1===n&&-1===r&&-1===i)return{isJson:!1,detected:!1};const o=[{type:"json",pos:n},{type:"xml",pos:r},{type:"line",pos:i}].filter(e=>-1!==e.pos);if(0===o.length)return{isJson:!1,detected:!1};const a=o.reduce((e,t)=>e.pos<t.pos?e:t);return{isJson:"json"===a.type,detected:!0}}function wi(){let e=null,t="";return{write(n){if(t+=n,!e&&(e=(e=>{const t=e.trim();return-1!==t.search(/[{[]/)?"json":-1!==t.search(/<(t|item|seg)\s/i)?"xml":-1!==t.search(/^\d+\s*\|/m)?"line":null})(t),!e))return[];switch(e){case"xml":return(e=>{const t=[],n=/<(t|item|seg)\s+id="(\d+)"(?:\s[^>]*)?>([\s\S]*?)<\/\1>/gi;let r;for(;null!==(r=n.exec(e));){const e=parseInt(r[2],10);t.push({id:e,partialText:r[3],isComplete:!0})}let i=e;i=i.replace(/<(t|item|seg)\s+id="\d+"(?:\s[^>]*)?>[\s\S]*?<\/\1>/gi,"");const o=i.match(/<(t|item|seg)\s+id="(\d+)"(?:\s[^>]*)?>([^]*)$/);if(o){const e=parseInt(o[2],10),n=o[3].replace(/<\/[^>]*$/,"");t.push({id:e,partialText:n,isComplete:!1})}return t})(t);case"line":return(e=>{const t=[],n=e.split("\n");for(let e=0;e<n.length;e++){const r=n[e].trim().match(/^(\d+)\s*\|\s*(.*)/);if(r){const i=parseInt(r[1],10),o=r[2].trim().replace(/<br\s*\/?>/gi,"\n"),a=e<n.length-1;t.push({id:i,partialText:o,isComplete:a})}}return t})(t);default:return[]}},getFormat:()=>e,getBuffer:()=>t}}var xi=i(9286),Ai=i.n(xi);const Si=["fn","msg"],ki=["useCache","usePool","fetchInterval","fetchLimit"],_i=["useCache","usePool","fetchInterval","fetchLimit"],Ti=async function(e){let{method:t="GET",headers:n,body:r,timeout:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,a)=>{GM.xmlHttpRequest({method:t,url:e,headers:n,data:r,anonymous:!0,timeout:i,onload:e=>{let{response:t,responseHeaders:n,status:r,statusText:i}=e;const a={};try{n&&n.split("\n").forEach(e=>{const[t,n]=e.split(":").map(e=>e.trim());t&&n&&(a[t]=n)})}catch(e){pt("fetchGM parse headers error",e)}o({body:t,headers:a,status:r,statusText:i})},onerror:a,onabort:()=>{a(new Error("GM request onabort."))},ontimeout:()=>{a(new Error("GM request timeout."))}})})},Ei=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=null==n?void 0:n.httpTimeout;if(!r)try{r=(await rr()).httpTimeout}catch(e){pt("getSettingWithDefault",e)}r||(r=p);{Object.assign(t,{timeout:r});const{body:n,headers:i,status:o,statusText:a}=window.KISS_GM?await window.KISS_GM.fetch(e,t):await Ti(e,t);return new Response(n,{headers:new Headers(i),status:o,statusText:a})}},Ci=async e=>{let{input:t,init:n,opts:r}=e;const i=await Ei(t,n,r);return $r(i,r.expect)},Ii=e=>{let{fn:t,msg:n=ln}=e,r=mr(e,Si);return _n&&!Cn()?_r(n,h({},r)):t(h({},r))},Pi=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{useCache:r,usePool:i,fetchInterval:o,fetchLimit:a}=n,s=mr(n,ki);if(null==e||!e.trim())throw new Error("URL is empty");if(r){const n=await Yr(e,t);if(n)return n}if(i){return Hr(o,a).push(Ii,{fn:Ci,input:e,init:t,opts:s})}return Ii({fn:Ci,input:e,init:t,opts:s})};function Li(){return Li=yr(function(e){let{method:t="GET",headers:n,body:r,timeout:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(o){const a=mi(),s=gi(),l=((null===(o=window.KISS_GM)||void 0===o?void 0:o.xmlHttpRequest)||GM.xmlHttpRequest)({method:t,url:e,headers:n,data:r,anonymous:!0,timeout:i,responseType:"stream",onloadstart:async e=>{let{response:t}=e;try{const e=t.getReader(),n=new TextDecoder;for(;;){const{done:t,value:r}=await e.read();if(t)break;for(const e of s(n.decode(r,{stream:!0})))a.push(e)}}catch(e){return void a.error(e)}a.finish()},onerror:e=>a.error(e),onabort:()=>a.error(new Error("GM stream request aborted")),ontimeout:()=>a.error(new Error("GM stream request timeout"))});try{yield*xr(Ar(a.iterate()))}finally{var c;null==l||null===(c=l.abort)||void 0===c||c.call(l)}}()}),Li.apply(this,arguments)}function Ri(){return Ri=yr(function*(e,t,n){const r=mi();let i;try{i=Ai().runtime.connect({name:"kiss_stream_fetch"})}catch(e){throw new Error("Failed to connect to background: "+e.message)}i.onMessage.addListener(e=>{switch(e.type){case"delta":r.push(e.data);break;case"done":r.finish();break;case"error":r.error(new Error(e.error))}}),i.onDisconnect.addListener(()=>{const e=Ai().runtime.lastError;e&&r.error(new Error(e.message||"Port disconnected"))}),i.postMessage({action:"start",args:{input:e,init:t,opts:n}});try{yield*xr(Ar(r.iterate()))}finally{i.disconnect()}}),Ri.apply(this,arguments)}function Ni(e,t,n){return Oi.apply(this,arguments)}function Oi(){return Oi=yr(function*(e,t,n){var r,i;(n=h(h({},n),{},{httpTimeout:(null===(r=n)||void 0===r?void 0:r.httpTimeout)||p}),!_n||Cn())?yield*xr(Ar(function(e){return Li.apply(this,arguments)}(e,h(h({},t),{},{timeout:null===(i=n)||void 0===i?void 0:i.httpTimeout})))):yield*xr(Ar(function(e,t,n){return Ri.apply(this,arguments)}(e,t,n)))}),Oi.apply(this,arguments)}function ji(){return ji=yr(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{useCache:r,usePool:i,fetchInterval:o,fetchLimit:a}=n,s=mr(n,_i);return function*(){if(null==e||!e.trim())throw new Error("URL is empty");if(r){const n=yield wr(Yr(e,t));if(n)return void(yield n)}if(i){const n=Hr(o,a),r=mi(),i=n.push(async()=>{try{var n,i=!1,o=!1;try{for(var a,l=Ar(Ni(e,t,s));i=!(a=await l.next()).done;i=!1){const e=a.value;r.push(e)}}catch(e){o=!0,n=e}finally{try{i&&null!=l.return&&await l.return()}finally{if(o)throw n}}r.finish()}catch(e){r.error(e)}return null});return yield*xr(Ar(r.iterate())),void(yield wr(i))}yield*xr(Ar(Ni(e,t,s)))}()}),ji.apply(this,arguments)}const zi="xmlHttpRequest",Mi="setValue",Di="getValue",Bi="deleteValue",Fi="info",Wi=e=>{window.APP_INFO={name:"KISS Translator",version:"2.0.22",eventName:e}},Ui=async e=>{const{action:t,args:n,pong:r}=e.detail;let i;try{switch(t){case zi:const{input:e,init:r}=n;i=await Ti(e,r);break;case Mi:const{key:o,val:a}=n;await GM.setValue(o,a),i=a;break;case Di:i=await GM.getValue(n.key);break;case Bi:await GM.deleteValue(n.key),i="ok";break;case Fi:i=GM.info;break;default:throw new Error("message action is unavailable: ".concat(t))}window.dispatchEvent(new CustomEvent(r,{detail:{data:i}}))}catch(e){window.dispatchEvent(new CustomEvent(r,{detail:{error:e.message}}))}},Vi="%[a-f0-9]{2}",Hi=new RegExp("("+Vi+")|([^%]+?)","gi"),Gi=new RegExp("("+Vi+")+","gi");function qi(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],qi(n),qi(r))}function Ki(e){try{return decodeURIComponent(e)}catch(t){let n=e.match(Hi)||[];for(let t=1;t<n.length;t++)n=(e=qi(n,t).join("")).match(Hi)||[];return e}}function $i(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch(t){return function(e){const t={"%FE%FF":"��","%FF%FE":"��"};let n=Gi.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){const r=Ki(n[0]);r!==n[0]&&(t[n[0]]=r)}n=Gi.exec(e)}t["%C2"]="�";const r=Object.keys(t);for(const n of r)e=e.replace(new RegExp(n,"g"),t[n]);return e}(e)}}function Yi(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const n=e.indexOf(t);return-1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}function Xi(e,t){const n={};if(Array.isArray(t))for(const r of t){const t=Object.getOwnPropertyDescriptor(e,r);null!=t&&t.enumerable&&Object.defineProperty(n,r,t)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){t(r,e[r],e)&&Object.defineProperty(n,r,i)}}return n}const Ji=e=>null==e,Qi=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())),Zi=Symbol("encodeFragmentIdentifier");function eo(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function to(e,t){return t.encode?t.strict?Qi(e):encodeURIComponent(e):e}function no(e,t){return t.decode?$i(e):e}function ro(e){return Array.isArray(e)?e.sort():"object"==typeof e?ro(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function io(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function oo(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function ao(e){const t=(e=io(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function so(e,t){eo((t=h({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&no(n,e).includes(e.arrayFormatSeparator);n=o?no(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map(t=>no(t,e)):null===n?n:no(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{const i=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!i)return void(r[t]=n?no(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>no(t,e));void 0!==r[t]?r[t]=[...r[t],...o]:r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;const e=t.decode?i.replace(/\+/g," "):i;let[o,a]=Yi(e,"=");void 0===o&&(o=e),a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:no(a,t),n(no(o,t),a,r)}for(const[e,n]of Object.entries(r))if("object"==typeof n&&null!==n)for(const[e,r]of Object.entries(n))n[e]=oo(r,t);else r[e]=oo(n,t);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return e[t]=Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?ro(n):n,e},Object.create(null))}function lo(e,t){if(!e)return"";eo((t=h({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&Ji(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[to(t,e),"[",i,"]"].join("")]:[...n,[to(t,e),"[",to(i,e),"]=",to(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[to(t,e),"[]"].join("")]:[...n,[to(t,e),"[]=",to(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[to(t,e),":list="].join("")]:[...n,[to(t,e),":list=",to(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[to(n,e),t,to(i,e)].join("")]:[[r,to(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,to(t,e)]:[...n,[to(t,e),"=",to(r,e)].join("")]}}(t),i={};for(const[t,r]of Object.entries(e))n(t)||(i[t]=r);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map(n=>{const i=e[n];return void 0===i?"":null===i?to(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?to(n,t)+"[]":i.reduce(r(n),[]).join("&"):to(n,t)+"="+to(i,t)}).filter(e=>e.length>0).join("&")}function co(e,t){var n,r;t=h({decode:!0},t);let[i,o]=Yi(e,"#");return void 0===i&&(i=e),h({url:null!==(n=null===(r=i)||void 0===r||null===(r=r.split("?"))||void 0===r?void 0:r[0])&&void 0!==n?n:"",query:so(ao(e),t)},t&&t.parseFragmentIdentifier&&o?{fragmentIdentifier:no(o,t)}:{})}function uo(e,t){t=h({encode:!0,strict:!0,[Zi]:!0},t);const n=io(e.url).split("?")[0]||"";let r=lo(h(h({},so(ao(e.url),{sort:!1})),e.query),t);r&&(r="?".concat(r));let i=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);if(e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,i=t[Zi]?r.hash:"#".concat(e.fragmentIdentifier)}return"".concat(n).concat(r).concat(i)}function ho(e,t,n){n=h({parseFragmentIdentifier:!0,[Zi]:!1},n);const{url:r,query:i,fragmentIdentifier:o}=co(e,n);return uo({url:r,query:Xi(i,t),fragmentIdentifier:o},n)}function po(e,t,n){return ho(e,Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n),n)}const fo=e,go=e=>{try{return JSON.parse(atob(e.split(".")[1])).exp}catch(e){pt("parseMSToken",e)}return 0},mo=(()=>{let e=null;const t=async()=>{try{const t=Date.now(),n=await er(Gt);if(n){const e=1e3*go(n);if(e>t+1e3)return{token:n,expiresAt:e}}const r=await ua();if(!r)throw new Error("Failed to fetch ms token");const i=1e3*go(r);return await(e=r,Qn(Gt,e)),{token:r,expiresAt:i}}catch(e){throw pt("get msauth failed",e),e}var e};return async()=>{if(e)try{const t=await e;if(t.expiresAt>Date.now()+1e3)return t.token}catch(e){}e=t();return(await e).token}})();let vo=1e4*Math.round(1e4*Math.random());var yo=i(7029);const bo=new(i.n(yo)())({ecmaVer:"latest",sourceType:"script",sandBox:!0}),wo=new Map,xo=(e,t)=>{if(wo.has(e))return wo.get(e);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;const t=[];return{add:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.push(...r.filter(Boolean));const o=t.length-e;o>0&&t.splice(0,o)},getAll:()=>[...t],clear:()=>{t.length=0}}}(t);return wo.set(e,n),n},Ao=e=>{wo.delete(e)};function So(e){const t=e.trim();if(!t.includes(":")&&!t.includes("."))return parseInt(t,10)||0;let n=t,r="0";if(t.includes(".")){const e=t.split(".");n=e[0],r=e[1]}else{const e=t.split(":");e.length>1&&3===e[e.length-1].length&&(r=e.pop(),n=e.join(":"))}const i=n.split(":").map(e=>parseInt(e,10)||0);let o=0,a=0,s=0;3===i.length?[o,a,s]=i:2===i.length?[a,s]=i:1===i.length&&([s]=i);return 1e3*(3600*o+60*a+s)+(parseInt(r.padEnd(3,"0"),10)||0)}function ko(e){const t=Math.floor(e/1e3),n=String(e%1e3).padStart(3,"0"),r=Math.floor(t/60),i=String(t%60).padStart(2,"0"),o=String(Math.floor(r/60)).padStart(2,"0"),a=String(r%60).padStart(2,"0");return"".concat(o,":").concat(a,":").concat(i,".").concat(n)}function _o(e){if(!Array.isArray(e))return"WEBVTT";return["WEBVTT",...e.map((e,t)=>{const n=ko(e.start),r=ko(e.end),i=t+1,o="".concat(n," --\x3e ").concat(r),a=e.text||"",s=e.translation||"";return"".concat(i,"\n").concat(o,"\n").concat(a,"\n").concat(s)})].join("\n\n")}const To=e=>e?e.trim().replace(/\s+/g," "):"",Eo=()=>({title:(()=>{try{return Hn(To(document.title))}catch(e){return""}})(),description:(()=>{try{const e=document.querySelector('meta[name="description"]'),t=(null==e?void 0:e.getAttribute("content"))||"";return Hn(To(t))}catch(e){return""}})(),summary:(()=>{let e="";try{var t,n;const o=(null===(t=document)||void 0===t||null===(n=t.location)||void 0===n?void 0:n.href)||"",a="https://www.youtube.com";if(o.startsWith(a)){const t=document.querySelector("#collapsed-title")||document.querySelector("#description-inline-expander");t&&(e=t.textContent)}var r,i;e||(e=(null===(r=document.querySelector('meta[property="og:description"]'))||void 0===r?void 0:r.getAttribute("content"))||""),e||(e=(null===(i=document.querySelector('meta[name="keywords"]'))||void 0===i?void 0:i.getAttribute("content"))||"")}catch(e){}return Hn(To(e))})()}),Co=["reqHook"],Io=new Map,Po=new Map,Lo=function(e){var t;let n=arguments.length>2?arguments[2]:void 0;const r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split(/\n|,/).map(e=>e.trim()).filter(Boolean);if(0===r.length)return"";const i=((null!==(t=n.get(e))&&void 0!==t?t:-1)+1)%r.length;return n.set(e,i),r[i]},Ro=e=>String(null!=e?e:"").replace(/\s+/g," ").trim().slice(0,400),No=function(e){if(!e)return[];if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))return[[e]];let t=Pn(e).trim();try{const e=t.search(/(\{|\[)/),n=t.lastIndexOf(t.includes("}")?"}":"]");if(e>-1&&n>-1){const r=t.substring(e,n+1),i=JSON.parse(r),o=Array.isArray(i)?i:i.translations||(i.result?[i.result]:[i]);if(o.length>0&&(void 0!==o[0].text||o[0].translations))return o.map(e=>[Kn(String(e.text||"")),String(e.sourceLanguage||"")])}}catch(e){}if(/<(t|item|seg)\b/i.test(t))try{const e=new DOMParser,n=e.parseFromString(t,"text/html").querySelectorAll("t, item, seg");if(n.length>0)return Array.from(n).map(e=>[e.innerHTML.trim(),e.getAttribute("sourceLanguage")||""])}catch(e){}return t.split("\n").map(e=>{const t=e.match(/^\d+\s*\|\s*(.*)/);if(t)return[Kn(t[1].trim()),""];return[Kn(e.replace(/<br\s*\/?>/gi,"\n").trim()),""]})},Oo=e=>e.map((t,n)=>{const r={id:n,text:t.text};if(n>0){const o=(i=t.start-e[n-1].end,!Number.isFinite(i)||i<=300?0:i<=600?1:i<=1200?2:3);o&&(r.p=o)}var i;return r}),jo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!(!/\{\s*["']?s["']?\s*:/.test(e)||!/\bid\b/i.test(e))||(/WEBVTT|MM:SS\.mmm|-->/i.test(e),!1)},zo=e=>Array.isArray(e)?e.filter(e=>!e.thought&&e.text).map(e=>e.text).join(""):"",Mo=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return[];if(null!=t&&t.length){const n=((e,t)=>{const n=e=>{if(!Array.isArray(e)||!e.length)return null;const n=[];for(const c of e){var r,i,o,a,s,l;const e=Number(null!==(r=c.s)&&void 0!==r?r:c.start_id),u=Number(null!==(i=c.e)&&void 0!==i?i:c.end_id);if(!Number.isInteger(e)||!Number.isInteger(u))continue;const d=Math.max(0,Math.min(e,t.length-1)),h=Math.max(d,Math.min(u,t.length-1));n.push({start:t[d].start,end:t[h].end,text:String(null!==(o=null!==(a=c.o)&&void 0!==a?a:c.original)&&void 0!==o?o:""),translation:String(null!==(s=null!==(l=c.t)&&void 0!==l?l:c.translation)&&void 0!==s?s:""),_si:e,_ei:u})}return n.length?n:null};try{return n(JSON.parse(e))}catch(t){try{const t=String(null!=e?e:""),r=Math.max(t.lastIndexOf("},"),t.lastIndexOf("}\n"),t.lastIndexOf("}\r"));return r<0?null:n(JSON.parse(t.slice(0,r+1)+"]"))}catch(e){return null}}})(e,t);if(n)return n}try{const t=function(e){const t=e.replace(/^\uFEFF/,"").trim();if(!t)return[];const n=t.split(/\n\n+/),r=[];for(let e=n[0].toUpperCase().includes("WEBVTT")?1:0;e<n.length;e++){const t=n[e];if(!t.includes("--\x3e"))continue;const a=t.split("\n"),s=a.findIndex(e=>e.includes("--\x3e"));if(-1===s)continue;const[l,c]=a[s].split("--\x3e"),u=a.slice(s+1);if(l&&c&&u.length>0){var i,o;const e=Kn((null===(i=u[0])||void 0===i?void 0:i.trim())||""),t=Kn((null===(o=u[1])||void 0===o?void 0:o.trim())||"");r.push({start:So(l),end:So(c),text:e,translation:t})}}return r}(e);if(Array.isArray(t))return t}catch(e){pt("parse AI Res: subtitle",e)}return[]},Do={max:32768,high:16384,medium:8192,low:4096,minimal:2048},Bo=(e,t)=>{let{apiType:n,thinkingMode:r,thinkingEffort:i}=t;if("auto"===r)return;const o=he[n];if(!o)return;const a=i&&"_default"!==i;switch(o.type){case"deepseek":e.thinking={type:"enabled"===r?"enabled":"disabled"},"enabled"===r&&a&&(e.reasoning_effort=i);break;case"aliyunbailian":e.enable_thinking="enabled"===r;break;case"siliconflow":e.enable_thinking="enabled"===r,"enabled"===r&&a&&(e.thinking_budget=Do[i]||8192);break;case"cerebras":"disabled"===r?e.reasoning_effort="none":a&&(e.reasoning_effort=i);break;case"openrouter":a&&(e.reasoning={effort:i})}},Fo=e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1,apiType:u,thinkingMode:d,thinkingEffort:h}=e;const p={role:"user",content:i},f={model:o,messages:[{role:"system",content:r},...l,p],temperature:a,max_completion_tokens:s,stream:c};Bo(f,{apiType:u,thinkingMode:d,thinkingEffort:h});return{url:t,body:f,headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n)},userMsg:p}},Wo={[M]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;const a=fo.stringify({client:"gtx",dt:"t",dj:1,ie:"UTF-8",sl:n,tl:r,q:t.join(" ")});i="".concat(i,"?").concat(a);const s={"Content-type":"application/json"};return o&&(s.Authorization="Bearer ".concat(o)),{url:i,headers:s,method:"GET"}},[D]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;return{url:i,body:[[t,n,r],"wt_lib"],headers:{"Content-Type":"application/json+protobuf","X-Goog-API-Key":o}}},[B]:e=>{let{texts:t,from:n,to:r,token:i}=e;const o=fo.stringify({from:n,to:r,"api-version":"3.0"}),a="https://api-edge.cognitive.microsofttranslator.com/translate?".concat(o),s={"Content-type":"application/json",Authorization:"Bearer ".concat(i)};return{url:a,body:t.map(e=>({Text:e})),headers:s}},[F]:e=>{let{texts:t,from:n,to:r,url:i,key:o,region:a}=e;const s=fo.stringify({from:n,to:r});i=i.endsWith("&")?"".concat(i).concat(s):"".concat(i,"&").concat(s);const l={"Content-type":"application/json","Ocp-Apim-Subscription-Key":o,"Ocp-Apim-Subscription-Region":a};return{url:i,body:t.map(e=>({Text:e})),headers:l}},[K]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;return{url:i,body:{text:t,target_lang:r,source_lang:n},headers:{"Content-type":"application/json",Authorization:"DeepL-Auth-Key ".concat(o)}}},[Y]:e=>{let{texts:t,from:n,to:r}=e;const i=t.join(" "),o=(i.match(/[i]/g)||[]).length+1;let a=Date.now();a+=o-a%o,vo++;return{url:"https://www2.deepl.com/jsonrpc",body:{jsonrpc:"2.0",method:"LMT_handle_texts",params:{splitting:"newlines",lang:{target_lang:r,source_lang_user_selected:n},commonJobParams:{wasSpoken:!1,transcribe_as:""},id:vo,timestamp:a,texts:[{text:i,requestAlternatives:3}]}},headers:{"Content-Type":"application/json",Accept:"*/*","x-app-os-name":"iOS","x-app-os-version":"16.3.0","Accept-Language":"en-US,en;q=0.9","Accept-Encoding":"gzip, deflate, br","x-app-device":"iPhone13,2","User-Agent":"DeepL-iOS/2.9.1 iOS 16.3.0 (iPhone13,2)","x-app-build":"510265","x-app-version":"2.9.1"}}},[W]:Fo,[U]:Fo,[V]:Fo,[H]:Fo,[G]:Fo,[q]:Fo,[$]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;const a={text:t.join(" "),target_lang:r,source_lang:n},s={"Content-type":"application/json"};return o&&(s.Authorization="Bearer ".concat(o)),{url:i,body:a,headers:s}},[X]:Fo,[J]:e=>{let{texts:t,from:n,to:r}=e;return{url:"https://fanyi.baidu.com/transapi",body:{from:n,to:r,query:t.join(" "),source:"txt"},headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","User-Agent":Sn}}},[Q]:e=>{let{texts:t,from:n,to:r}=e;return{url:"https://transmart.qq.com/api/imt",body:{header:{fn:"auto_translation",client_key:"browser-chrome-110.0.0-Mac OS-df4bd4c5-a65d-44b2-a40f-42f34f3535f2-1677486696487"},type:"plain",model_category:"normal",source:{text_list:t,lang:n},target:{lang:r}},headers:{"Content-Type":"application/json","user-agent":Sn,referer:"https://transmart.qq.com/zh-CN/index"}}},[Z]:e=>{let{texts:t,from:n,to:r}=e;return{url:"https://translate.volcengine.com/crx/translate/v1",body:{source_language:n,target_language:r,text:t.join(" ")},headers:{"Content-type":"application/json"}}},[ee]:Fo,[te]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1,thinkingMode:u,thinkingEffort:d}=e;t=t.replaceAll(T,o).replaceAll("{{key}}",n),c&&(t=t.replace(":generateContent",":streamGenerateContent"),t+=(t.includes("?")?"&":"?")+"alt=sse");const h={role:"user",parts:[{text:i}]},p={contents:[{role:"model",parts:[{text:r}]},...l,h],generationConfig:{maxOutputTokens:s,temperature:a}};"disabled"===u?p.generationConfig.thinkingConfig={thinkingBudget:0}:u&&"auto"!==u&&d&&"_default"!==d&&(p.generationConfig.thinkingConfig={thinkingLevel:d}),Object.assign(p,{safetySettings:[{category:"HARM_CATEGORY_HARASSMENT",threshold:"BLOCK_NONE"},{category:"HARM_CATEGORY_HATE_SPEECH",threshold:"BLOCK_NONE"},{category:"HARM_CATEGORY_SEXUALLY_EXPLICIT",threshold:"BLOCK_NONE"},{category:"HARM_CATEGORY_DANGEROUS_CONTENT",threshold:"BLOCK_NONE"}]});return{url:t,body:p,headers:{"Content-type":"application/json","x-goog-api-key":n},userMsg:h}},[ne]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1,apiType:u,thinkingMode:d,thinkingEffort:h}=e;const p={role:"user",content:i},f={model:o,messages:[{role:"system",content:r},...l,p],temperature:a,max_tokens:s,stream:c};Bo(f,{apiType:u,thinkingMode:d,thinkingEffort:h});return{url:t,body:f,headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n)},userMsg:p}},[re]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1,thinkingMode:u,thinkingEffort:d}=e;const h={role:"user",content:i},p={model:o,system:r,messages:[...l,h],temperature:a,max_tokens:s,stream:c};u&&"auto"!==u&&"enabled"===u&&(p.thinking={type:"adaptive"},d&&"_default"!==d&&(p.output_config={effort:d}));return{url:t,body:p,headers:{"Content-type":"application/json","anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true","x-api-key":n},userMsg:h}},[ie]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;return{url:i,body:{text:t.join(" "),source_lang:n,target_lang:r},headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(o)}}},[oe]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1,thinkingMode:u,thinkingEffort:d}=e;const h={role:"user",content:i},p={model:o,messages:[{role:"system",content:r},...l,h],temperature:a,max_tokens:s};Bo(p,{apiType:oe,thinkingMode:u,thinkingEffort:d}),p.stream=c;const f={"Content-type":"application/json"};return n&&(f.Authorization="Bearer ".concat(n)),{url:t,body:p,headers:f,userMsg:h}},[ae]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1,thinkingMode:u,thinkingEffort:d}=e;const h={role:"user",content:i},p={model:o,messages:[{role:"system",content:r},...l,h],temperature:a,max_tokens:s,stream:c};Bo(p,{apiType:ae,thinkingMode:u,thinkingEffort:d});return{url:t,body:p,headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n)},userMsg:h}},[se]:e=>{let{texts:t,fromLang:n,toLang:r,url:i,key:o,useBatchFetch:a}=e;return{url:i,body:a?{texts:t,from:n,to:r}:{text:t[0],from:n,to:r},headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(o)}}}},Uo=e=>{let{url:t="",body:n=null,headers:r={},userMsg:i=null,method:o="POST"}=e;if(!t)throw new Error("genInit: url is empty");const a={method:o,headers:r};if("GET"!==o&&"HEAD"!==o&&n){var s;let e=JSON.stringify(n);const t=null==n||null===(s=n.params)||void 0===s?void 0:s.id;t&&(e=e.replace('method":"',(t+3)%13==0||(t+5)%29==0?'method" : "':'method": "')),Object.assign(a,{body:e})}return[t,a,i]},Vo=async e=>{let{reqHook:t}=e,n=mr(e,Co);const{apiType:r,apiSlug:i,key:o,systemPrompt:a,subtitlePrompt:s,nobatchPrompt:l=ke,nobatchUserPrompt:c=_e,useBatchFetch:u,from:d,to:p,fromLang:f,toLang:g,texts:m,glossary:T,aiTerms:C,customHeader:I,customBody:P,events:L,tone:R,prevContext:N,nextContext:O,docInfo:j}=n;if(de.mulkeys.has(r)&&(n.key=Lo(i,o,Io)),r===$&&(n.url=Lo(i,n.url,Po)),de.ai.has(r)){const e=j&&(j.title||j.description||j.summary),t=e?j:Eo(),r=e?{}:t;let i=L?(e=>{let{subtitlePrompt:t,tone:n,from:r,to:i,fromLang:o,toLang:a,docInfo:{title:s="",description:l="",summary:c=""}={},aiTerms:u=""}=e;const d=$n(u),h=Object.entries(d).map(e=>{let[t,n]=e;return"- ".concat(t,": ").concat(n)}).join("\n");return t.replaceAll(S,s).replaceAll(k,l).replaceAll(_,c).replaceAll(A,n).replaceAll(E,h).replaceAll(v,r).replaceAll(y,i).replaceAll(b,o).replaceAll(w,a)})({subtitlePrompt:s,from:d,to:p,fromLang:f,toLang:g,texts:m,docInfo:t,tone:R,aiTerms:C}):(e=>{let{systemPrompt:t,tone:n,from:r,to:i,fromLang:o,toLang:a,texts:s,docInfo:{title:l="",description:c="",summary:u=""}={}}=e;return t.replaceAll(S,l).replaceAll(k,c).replaceAll(_,u).replaceAll(A,n).replaceAll(v,r).replaceAll(y,i).replaceAll(b,o).replaceAll(w,a).replaceAll(x,s[0])})({systemPrompt:u?a:l,from:d,to:p,fromLang:f,toLang:g,texts:m,docInfo:t,tone:R});if(e){const e=L?s:u?a:l,n=[];t.title&&!e.includes(S)&&n.push("Title: ".concat(t.title)),t.description&&!e.includes(k)&&n.push("Description: ".concat(t.description)),t.summary&&!e.includes(_)&&n.push("Summary: ".concat(t.summary)),n.length&&(i+="\n\n# Context\n".concat(n.join("\n")))}n.systemPrompt=i,n.userPrompt=L?(e=>{let{formattedEvents:t,prevContext:n="",nextContext:r=""}=e;const i=JSON.stringify(t),o=Ro(n),a=Ro(r);if(!o&&!a)return i;const s=[];return o&&s.push("[Previous context (read-only, do NOT segment)]\n".concat(JSON.stringify(o))),s.push("[Main input]\n".concat(i)),a&&s.push("[Next context (read-only, do NOT segment)]\n".concat(JSON.stringify(a))),s.join("\n\n")})({formattedEvents:jo(s)?Oo(L):L,prevContext:N,nextContext:O}):(e=>{let{nobatchUserPrompt:t,useBatchFetch:n,tone:r,glossary:i={},aiTerms:o="",from:a,to:s,fromLang:l,toLang:c,texts:u,docInfo:{title:d="",description:p="",summary:f=""}={}}=e;if(n){const e={targetLanguage:c,segments:u.map((e,t)=>({id:t,text:e}))};if(d&&(e.title=d),p&&(e.description=p),o){const e=$n(o);i=h(h({},i),e)}return 0!==Object.keys(i).length&&(e.glossary=i),r&&(e.tone=r),JSON.stringify(e)}return t.replaceAll(S,d).replaceAll(k,p).replaceAll(_,f).replaceAll(A,r).replaceAll(v,a).replaceAll(y,s).replaceAll(b,l).replaceAll(w,c).replaceAll(x,u[0])})({nobatchUserPrompt:c,useBatchFetch:u,from:d,to:p,fromLang:f,toLang:g,texts:m,docInfo:r,tone:R,glossary:T,aiTerms:C})}const{url:z="",body:M=null,headers:D={},userMsg:B=null,method:F="POST"}=Wo[r](n);if(L&&r===te&&null!=M&&M.generationConfig&&(M.generationConfig.responseMimeType="application/json"),null!=I&&I.trim()&&Object.assign(D,Un(I)),null!=P&&P.trim()&&Object.assign(M,Un(P)),null!=t&&t.trim()&&!L)try{const e={url:z,body:M,headers:D,userMsg:B,method:F};bo.run("exports.reqHook = ".concat(t));const r=await bo.exports.reqHook(h(h({},n),{},{defaultSystemPrompt:'Act as a translation API. Output a single raw JSON object only. No extra text or fences.\n\nInput:\n{"targetLanguage":"<lang>","title":"<context>","description":"<context>","summary":"<context>","segments":[{"id":1,"text":"..."}],"glossary":{"sourceTerm":"targetTerm"},"tone":"<formal|casual>"}\n\nOutput:\n{"translations":[{"id":1,"text":"...","sourceLanguage":"<detected>"}]}\n\nRules:\n1.  Use title/description for context only; do not output them.\n2.  Keep id, order, and count of segments.\n3.  Preserve whitespace, HTML entities, and all HTML-like tags (e.g., <i1>, <a1>). Translate inner text only.\n4.  Highest priority: Follow \'glossary\'. Use value for translation; if value is "", keep the key.\n5.  Do not translate: content in <code>, <pre>, text enclosed in backticks, or placeholders like {1}, {{1}}, [1], [[1]].\n6.  Apply the specified tone to the translation.\n7.  Detect sourceLanguage for each segment.\n8.  Return empty or unchanged inputs as is.\n\nExample:\nInput: {"targetLanguage":"zh-CN","segments":[{"id":1,"text":"A <b>React</b> component."}],"glossary":{"component":"组件","React":""}}\nOutput: {"translations":[{"id":1,"text":"一个<b>React</b>组件","sourceLanguage":"en"}]}\n\nFail-safe: On any error, return {"translations":[]}.',defaultSystemPromptXml:Te,defaultSystemPromptLines:'Act as a translation API. Output raw text lines in "ID | Text" format. No Markdown. No conversational filler.\n\nInput:\n{"targetLanguage":"<lang>","title":"<context>","description":"<context>","summary":"<context>","segments":[{"id":1,"text":"..."}],"glossary":{"sourceTerm":"targetTerm"},"tone":"<formal|casual>"}\n\nOutput Format:\n<id> | <Translation for Segment>\n<id> | <Translation for Segment>\n...\n\nRules:\n1.  **Strict Format**: Output exactly one line per segment using the format: "{id} | {translated_text}".\n2.  **ID Mapping**: You MUST copy the exact "id" from the input segment to the output line.\n3.  **Newline Handling**: If the translated text contains a newline, replace it with the HTML tag "<br>" to ensure it stays on a single line.\n4.  **Separator**: Use the pipe symbol " | " strictly to separate the ID and the text.\n5.  **Context**: Use title/description for context only; do not output them.\n6.  **HTML/Tags**: Preserve whitespace, HTML entities, and all HTML-like tags (e.g., <i1>, <b>). Translate inner text only.\n7.  **Glossary**: Highest priority. Follow \'glossary\'. Use value for translation; if value is "", keep the key.\n8.  **Do Not Translate**: content in <code>, <pre>, text enclosed in backticks, or placeholders like {1}, {{1}}, [1].\n9.  **Tone**: Apply the specified tone.\n\nExample:\nInput: {"targetLanguage":"zh-CN","segments":[{"id":0,"text":"Hello."},{"id":1,"text":"Line 1\nLine 2"}],"glossary":{}}\nOutput:\n0 | 你好。\n1 | 第一行<br>第二行\n\nFail-safe: On error, return "{id} | {original_text}" line by line.',defaultSubtitlePrompt:Ee,defaultNobatchPrompt:ke,defaultNobatchUserPrompt:_e,req:e}),e);if(r&&r.url)return Uo(r)}catch(e){throw pt("run req hook",e),new Error("Request hook error: ".concat(e.message))}return Uo({url:z,body:M,headers:D,userMsg:B,method:F})};function Ho(){return Go.apply(this,arguments)}function Go(){return Go=yr(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{from:t,to:n,fromLang:r,toLang:i,langMap:o,glossary:a,apiSetting:s,usePool:l,docInfo:c,signal:u}=arguments.length>1?arguments[1]:void 0;return function*(){if(null!=u&&u.aborted)return;let d=null,p=[];const{apiType:f,apiSlug:g,contextSize:m,useContext:v,fetchInterval:y,fetchLimit:b,httpTimeout:w,useStream:x}=s;v&&de.context.has(f)&&(d=xo(g,m),p=d.getAll());const A=x&&de.stream.has(f);let S="";if(f===B&&(S=yield wr(mo()),!S))throw new Error("got msauth error");const[k,_,T]=yield wr(Vo(h(h({},s),{},{texts:e,from:t,to:n,fromLang:r,toLang:i,langMap:o,glossary:a,hisMsgs:p,token:S,useStream:A,docInfo:c})));if(A)yield*xr(Ar(function(e,t,n,r){return qo.apply(this,arguments)}(e,k,_,{apiType:f,history:d,userMsg:T,usePool:l,fetchInterval:y,fetchLimit:b,httpTimeout:w,streamRenderMode:s.streamRenderMode||"disabled"})));else{const a=yield wr(Pi(k,_,{useCache:!1,usePool:l,fetchInterval:y,fetchLimit:b,httpTimeout:w}));if(!a)throw new Error("translate got empty response");const c=yield wr((async(e,t)=>{var n,r,i,o,a,s,l,c,u,d,h,p,f,g,m,v,y,b,w,x,A;let{texts:S,from:k,to:_,fromLang:T,toLang:E,langMap:C,resHook:I,history:P,userMsg:L,apiType:R,useBatchFetch:N}=t;if(null!=I&&I.trim())try{bo.run("exports.resHook = ".concat(I));const t=await bo.exports.resHook({apiType:R,userMsg:L,res:e,texts:S,from:k,to:_,fromLang:T,toLang:E,langMap:C,extractJson:Vn,parseAIRes:No});if(t&&Array.isArray(t.translations))return P&&L&&t.modelMsg&&P.add(L,t.modelMsg),t.translations;if(Array.isArray(t))return t}catch(e){throw pt("run res hook",e),new Error("Response hook error: ".concat(e.message))}let O="";switch(R){case M:return[[null==e||null===(n=e.sentences)||void 0===n?void 0:n.map(e=>e.trans).join(" "),null==e?void 0:e.src]];case D:return null==e||null===(r=e[0])||void 0===r?void 0:r.map((t,n)=>{var r,i;return[null==e||null===(r=e[0])||void 0===r?void 0:r[n],null==e||null===(i=e[1])||void 0===i?void 0:i[n]]});case B:case F:return null==e?void 0:e.map(e=>{var t;return[e.translations.map(e=>e.text).join(" "),null===(t=e.detectedLanguage)||void 0===t?void 0:t.language]});case K:return null==e||null===(i=e.translations)||void 0===i?void 0:i.map(e=>[e.text,e.detected_source_language]);case Y:return[[null==e||null===(o=e.result)||void 0===o||null===(a=o.texts)||void 0===a?void 0:a.map(e=>e.text).join(" "),null==e||null===(s=e.result)||void 0===s?void 0:s.lang]];case $:return[[null==e?void 0:e.data,null==e?void 0:e.source_lang]];case J:if(1===e.type)return[[Object.keys(JSON.parse(e.result).content[0].mean[0].cont)[0],e.from]];if(2===e.type)return[[e.data.map(e=>e.dst).join(" "),e.from]];break;case Q:return null==e||null===(l=e.auto_translation)||void 0===l?void 0:l.map(t=>[t,null==e?void 0:e.src_lang]);case Z:return[[null==e?void 0:e.translation,null==e?void 0:e.detected_language]];case X:case ee:case W:case U:case V:case H:case G:case q:case ne:case ae:return O=null==e||null===(c=e.choices)||void 0===c||null===(u=c[0])||void 0===u?void 0:u.message,P&&L&&O&&P.add(L,{role:O.role,content:O.content}),No(null===(d=O)||void 0===d?void 0:d.content,N);case te:return O=null==e||null===(h=e.candidates)||void 0===h||null===(p=h[0])||void 0===p?void 0:p.content,P&&L&&O&&P.add(L,O),No(zo(null===(f=O)||void 0===f?void 0:f.parts),N);case re:return O={role:null==e?void 0:e.role,content:null==e||null===(g=e.content)||void 0===g?void 0:g.text},P&&L&&O&&P.add(L,{role:O.role,content:O.content}),No(null!==(m=null==e||null===(v=e.content)||void 0===v||null===(y=v[0])||void 0===y?void 0:y.text)&&void 0!==m?m:"",N);case ie:return[[null==e||null===(b=e.result)||void 0===b?void 0:b.translated_text]];case oe:return O=null==e||null===(w=e.choices)||void 0===w||null===(x=w[0])||void 0===x?void 0:x.message,P&&L&&O&&P.add(L,{role:O.role,content:O.content}),No(null===(A=O)||void 0===A?void 0:A.content,N);case se:var j,z;return N?null===(j=null!==(z=null==e?void 0:e.translations)&&void 0!==z?z:e)||void 0===j?void 0:j.map(e=>[e.text,e.src]):[[e.text,e.src||e.from]]}throw new Error("parse translate result: apiType not matched",R)})(a,h({texts:e,from:t,to:n,fromLang:r,toLang:i,langMap:o,history:d,userMsg:T},s)));if(null==c||!c.length)throw new Error("translate got an unexpected result");for(let e=0;e<c.length;e++)yield{id:e,result:c[e]}}}()}),Go.apply(this,arguments)}function qo(){return qo=yr(function(e,t,n,r){let{apiType:i,history:o,userMsg:a,usePool:s,fetchInterval:l,fetchLimit:c,httpTimeout:u,streamRenderMode:d}=r;return function*(){const r=new Array(e.length).fill(null);let h="";const p=new Set,f=function(){const e=[],t=new fi({paths:["$.translations.*","$.*"],keepStack:!1});return t.onValue=t=>{let{value:n}=t;if(n&&"object"==typeof n&&"number"==typeof n.id&&("string"==typeof n.text||"string"==typeof n.translation)){const t=n.id,r=n.text||n.translation||"",i=n.sourceLanguage||n.src||"";e.push({id:t,translation:[r,i]})}},t.onError=()=>{},{*write(n){try{t.write(n)}catch(e){}for(;e.length>0;)yield e.shift()},end(){try{t.end()}catch(e){}}}}(),g="realtime"===d?wi():null;let m=!1,v=!1;try{var y,b=!1,w=!1;try{for(var x,A=Ar(function(e,t){return ji.apply(this,arguments)}(t,n,{useCache:!1,usePool:s,fetchInterval:l,fetchLimit:c,httpTimeout:u}));b=!(x=yield wr(A.next())).done;b=!1){const e=x.value;try{const t=vi(JSON.parse(e),i);if(t){if(h+=t,h=Pn(h,!0),v)if(m)for(const{id:e,translation:n}of f.write(t))r[e]=n,yield{id:e,result:n};else for(const{id:e,translation:t}of yi(h,p))r[e]=t,yield{id:e,result:t};else{const{isJson:e,detected:t}=bi(h);if(t&&(v=!0,m=e,m))for(const{id:e,translation:t}of f.write(h))r[e]=t,yield{id:e,result:t}}if(g&&"realtime"===d){const e=g.write(t);for(const{id:t,partialText:n,isComplete:r}of e)r||(yield{id:t,partialText:n,isComplete:!1})}}}catch(e){}}}catch(e){w=!0,y=e}finally{try{b&&null!=A.return&&(yield wr(A.return()))}finally{if(w)throw y}}m&&f.end()}catch(e){throw pt("handleTranslateStream error",e),e}const S=r.some(e=>!e);if(S){const t=No(h,!0);for(let n=0;n<e.length&&n<t.length;n++)r[n]||(r[n]=t[n],yield{id:n,result:r[n]})}o&&a&&(i===te?o.add(a,{role:"model",parts:[{text:h}]}):o.add(a,{role:"assistant",content:h}))}()}),qo.apply(this,arguments)}const Ko=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=await mo(),n={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(t)},method:"POST",body:JSON.stringify(e.map(e=>({Text:e})))},r=await Pi("https://api-edge.cognitive.microsofttranslator.com/detect?api-version=3.0",n,{useCache:!1});return Array.isArray(r)?r.map(e=>e.language):[]},$o=new Map,Yo=(e,t,n)=>{if($o.has(e))return $o.get(e);const r=function(e){let{batchInterval:t=f,batchSize:n=g,batchLength:r=m}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=[];let o=!1,a=null;const s=async()=>{if(a&&(clearTimeout(a),a=null),0===i.length||o)return;o=!0;let t=[],c=0,u=0;for(const e of i){var d;const t=(null===(d=e.payload)||void 0===d?void 0:d.length)||0;if(u>=n||c+t>r&&u>0)break;c+=t,u++}if(u>0&&(t=i.splice(0,u)),0!==t.length)try{const n=t.map(e=>e.payload),r=t[0].args,i=e(n,r);if(i&&"function"==typeof i[Symbol.asyncIterator]){var h,p=!1,f=!1;try{for(var g,m=Ar(i);p=!(g=await m.next()).done;p=!1){const e=g.value;{const n=e.id,r=!1!==e.isComplete,i=t[n];var v,y;i&&(!r&&null!==(v=i.args)&&void 0!==v&&v.onStreamChunk&&i.args.onStreamChunk({id:n,text:e.partialText,isComplete:!1}),r&&(null!==(y=i.args)&&void 0!==y&&y.onStreamChunk&&i.args.onStreamChunk({id:n,text:e.result,isComplete:!0}),i.resolved||(i.resolved=!0,i.resolve(e.result))))}}}catch(e){f=!0,h=e}finally{try{p&&null!=m.return&&await m.return()}finally{if(f)throw h}}t.forEach((e,t)=>{e.resolved||e.reject(new Error("No response for item at index ".concat(t)))})}else{const e=await i;if(!Array.isArray(e))throw new Error("responses format error");t.forEach((t,n)=>{const r=e[n];r?t.resolve(r):t.reject(new Error("No response for item at index ".concat(n)))})}}catch(e){t.forEach(t=>{t.resolved||(t.resolved=!0,t.reject(e))})}finally{o=!1,i.length>0&&(i.length>=n?setTimeout(s,0):l())}else o=!1},l=()=>{!o&&!a&&i.length>0&&(a=setTimeout(s,t))};return{addTask:(e,t)=>new Promise((r,o)=>{const a=e;i.push({payload:a,resolve:r,reject:o,args:t}),i.length>=n?s():l()}),destroy:()=>{a&&(clearTimeout(a),a=null),i.forEach(e=>e.reject(new Error("Queue instance was destroyed."))),i.length=0}}}(t,n);return $o.set(e,r),r},Xo=()=>{for(const e of $o.values())e.destroy()};var Jo=Ir("translatorMap"),Qo=Ir("detectorPromise"),Zo=Ir("defaultProgressHandler"),ea=Ir("getDetectorPromise"),ta=Ir("createTranslator");function na(e,t){pt("Downloading ".concat(e," model: ").concat(t,"%"))}function ra(){return Er(this,Qo)[Qo]||(Er(this,Qo)[Qo]=(async()=>{try{if("unavailable"===await LanguageDetector.availability())throw new Error("LanguageDetector unavailable");return await LanguageDetector.create({monitor:e=>this._monitorProgress(e,"detector")})}catch(e){throw Er(this,Qo)[Qo]=null,e}})()),Er(this,Qo)[Qo]}function ia(e,t){const n="".concat(e,"_").concat(t);if(Er(this,Jo)[Jo].has(n))return Er(this,Jo)[Jo].get(n);const r=(async()=>{try{if("unavailable"===await Translator.availability({sourceLanguage:e,targetLanguage:t}))throw new Error("Translator ".concat(e,"_").concat(t," unavailable"));const r=await Translator.create({sourceLanguage:e,targetLanguage:t,monitor:e=>this._monitorProgress(e,"translator (".concat(n,")"))});return Er(this,Jo)[Jo].set(n,r),r}catch(e){throw Er(this,Jo)[Jo].delete(n),e}})();return Er(this,Jo)[Jo].set(n,r),r}const oa=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,ta,{value:ia}),Object.defineProperty(this,ea,{value:ra}),Object.defineProperty(this,Zo,{value:na}),Object.defineProperty(this,Jo,{writable:!0,value:new Map}),Object.defineProperty(this,Qo,{writable:!0,value:null}),this.onProgress=e.onProgress||Er(this,Zo)[Zo]}_monitorProgress(e,t){e.addEventListener("downloadprogress",e=>{const n=e.total>0?Math.round(e.loaded/e.total*100):0;this.onProgress(t,n)})}async detectLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.4;if(!e)return["","Input text cannot be empty."];try{const n=await Er(this,ea)[ea](),r=await n.detect(e);if(!r||0===r.length)return["","No language could be detected."];const{detectedLanguage:i,confidence:o}=r[0];return o<t?["","Confidence of test results (".concat(i," ").concat(o.toFixed(2),") below the set threshold ").concat(t,"。")]:[i,""]}catch(t){return pt("detectLanguage",t,"(".concat(e,")")),["",t.message]}}async translateText(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(!e||!t||"string"!=typeof e)return["",n,"Input text cannot be empty."];try{let r=n;if("auto"===n){const[t,n]=await this.detectLanguage(e);if(n||!t){return["",r,"Automatic detection of source language failed: ".concat(n||"Unable to determine source language.")]}r=t}if(r===t)return["",r,"Same lang"];const i=await Er(this,ta)[ta](r,t);return[await i.translate(e),r,""]}catch(t){return pt("translateText",t,"(".concat(e,")")),t&&t.message&&t.message.includes("Other generic failures occurred")&&(ht.info("Generic failure detected, resetting translator cache."),Er(this,Jo)[Jo].clear()),["",n,t.message]}}},aa=e=>oa.detectLanguage(e.text),sa=e=>oa.translateText(e.text,e.to,e.from),la="https://api.github.com/gists",ca=e=>({Accept:"application/vnd.github+json",Authorization:"Bearer ".concat(e),"Content-type":"application/json","X-GitHub-Api-Version":"2022-11-28"}),ua=async()=>Pi("https://edge.microsoft.com/translate/auth"),da=async e=>{var t;const n={text:e},r="".concat(an,"?").concat(fo.stringify(n)),i=await Yr(r);if(i)return i;const o="https://www.bing.com",a="".concat(o,"/dict/search?q=").concat(e,"&FORM=BDVSP6&cc=cn"),s=await Pi(a,{credentials:"include"},{useCache:!1});if(!s)return null;const l=(new DOMParser).parseFromString(s,"text/html"),c=null===(t=l.querySelector("#headword > h1"))||void 0===t?void 0:t.textContent.trim();if(!c)return null;const u=[];l.querySelectorAll("div.qdef > ul > li").forEach(e=>{var t,n,r,i;const o=null===(t=e.querySelector(".pos"))||void 0===t||null===(n=t.textContent)||void 0===n?void 0:n.trim(),a=null===(r=e.querySelector(".def"))||void 0===r||null===(i=r.textContent)||void 0===i?void 0:i.trim();u.push({pos:o,def:a})});const d=[];l.querySelectorAll("div.hd_div1>.hd_if>.p1-5").forEach(e=>{var t;const n=null===(t=e.textContent)||void 0===t?void 0:t.trim();d.push(n)});const h=[];l.querySelectorAll(".each_seg>.li_pos").forEach(e=>{var t,n;const r=null===(t=e.querySelector(".pos_lin>.pos"))||void 0===t||null===(n=t.textContent)||void 0===n?void 0:n.trim(),i=[];e.querySelectorAll(".de_seg>.se_lis").forEach(e=>{var t,n;i.push(null===(t=e.querySelector(".de_co"))||void 0===t||null===(n=t.textContent)||void 0===n?void 0:n.trim())}),h.push({pos:r,lis:i})});const p=[];l.querySelectorAll("#sentenceSeg .se_li").forEach(e=>{var t,n,r,i;const o=null===(t=e.querySelector(".sen_en"))||void 0===t||null===(n=t.textContent)||void 0===n?void 0:n.trim(),a=null===(r=e.querySelector(".sen_cn"))||void 0===r||null===(i=r.textContent)||void 0===i?void 0:i.trim();o&&a&&p.push({eng:o,chs:a})});const f=[],g=l.querySelector("#bigaud_uk"),m=l.querySelector("#bigaud_us");if(g){var v,y,b,w,x;const e=o+(null==g||null===(v=g.dataset)||void 0===v?void 0:v.mp3link),t=null===(y=g.parentElement)||void 0===y?void 0:y.previousElementSibling,n=null==t||null===(b=t.textContent)||void 0===b||null===(w=b.trim())||void 0===w||null===(x=w.match(/\[(.*?)\]/))||void 0===x?void 0:x[1];f.push({key:"英",audio:e,phonetic:n})}if(m){var A,S,k,_,T;const e=o+(null==m||null===(A=m.dataset)||void 0===A?void 0:A.mp3link),t=null===(S=m.parentElement)||void 0===S?void 0:S.previousElementSibling,n=null==t||null===(k=t.textContent)||void 0===k||null===(_=k.trim())||void 0===_||null===(T=_.match(/\[(.*?)\]/))||void 0===T?void 0:T[1];f.push({key:"美",audio:e,phonetic:n})}if(0===f.length){const e=l.querySelector(".hd_pr"),t=l.querySelector(".hd_prUS");if(e){var E;const t=null===(E=e.textContent)||void 0===E?void 0:E.trim(),n=null==t?void 0:t.match(/\[([^\]]+)\]/);n&&f.push({key:"英",phonetic:n[1]})}if(t){var C;const e=null===(C=t.textContent)||void 0===C?void 0:C.trim(),n=null==e?void 0:e.match(/\[([^\]]+)\]/);n&&f.push({key:"美",phonetic:n[1]})}}const I={word:c,trs:u,aus:f,ecs:h,sentences:p,presents:d};return Xr(r,null,I),I},ha=async e=>{const t="https://fanyi.baidu.com/sug",n={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify({kw:e})},r=await Pi(t,n,{useCache:!0});return 0===(null==r?void 0:r.errno)?(await Xr(t,n,r),r.data):[]},pa=async e=>{var t;const n={num:5,ver:3,doctype:"json",cache:!1,le:"en",q:e},r="https://dict.youdao.com/suggest?".concat(fo.stringify(n)),i={headers:{accept:"application/json, text/plain, */*","accept-language":"en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,ja;q=0.6","content-type":"application/x-www-form-urlencoded"},method:"GET"},o=await Pi(r,i,{useCache:!0});return 200===(null==o||null===(t=o.result)||void 0===t?void 0:t.code)?(await Xr(r,i,o),o.data.entries):[]},fa=async e=>{let{text:t,from:n,to:r,apiSetting:i}=e;if(!In)return["",!0];const{fetchInterval:o,fetchLimit:a,httpTimeout:s}=i,l=Hr(o,a),c=await function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Task timed out";const r="function"==typeof e?e():e;return Promise.race([r,new Promise((e,r)=>setTimeout(()=>r(new Error(n)),t))])}(l.push(Ii,{fn:sa,msg:"builtinai_translte",text:t,from:n,to:r}),s);if(!c)throw new Error("apiBuiltinAITranslate got null reault");const[u,d,h]=c;if(h)throw new Error("apiBuiltinAITranslate got error",h);return[u,d]},ga=async e=>{let{text:t,fromLang:n="auto",toLang:r,apiSetting:i=Re,glossary:o,onStreamChunk:a,docInfo:s,useCache:l=!0,usePool:c=!0,signal:u}=e;if(!t)throw new Error("The text cannot be empty.");if(null!=u&&u.aborted)throw new DOMException("The operation was aborted.","AbortError");const{apiType:d,apiSlug:p,useBatchFetch:f}=i,g=Ae[d]||we,m=g.get(n),v=g.get(r);if(!v)throw new Error("The target lang: ".concat(r," not support"));const[y,b]="2.0.22".split("."),w=h({apiSlug:p,text:t,fromLang:n,toLang:r,version:[y,b].join(".")},(null==s?void 0:s.summary)&&{ctx:s.summary.slice(0,50)}),x="".concat(nn,"?").concat(fo.stringify(w));if(l){const e=await Yr(x);if(null!=e&&e.trText)return e}if(null!=u&&u.aborted)throw new DOMException("The operation was aborted.","AbortError");let A=[];if(d===z)A=await fa({text:t,from:m,to:v,apiSetting:i});else if(f&&de.batch.has(d)){const{apiSlug:e,batchInterval:l,batchSize:h,batchLength:p,useStream:f}=i,y=f&&de.stream.has(d),b="".concat(e,"_").concat(n,"_").concat(r,"_").concat(y?"stream":"batch"),w=Yo(b,Ho,{batchInterval:l,batchSize:h,batchLength:p});A=await w.addTask(t,{from:m,to:v,fromLang:n,toLang:r,langMap:g,glossary:o,apiSetting:i,usePool:c,onStreamChunk:a,docInfo:s,signal:u})}else{const{value:e}=await Ho([t],{from:m,to:v,fromLang:n,toLang:r,langMap:g,glossary:o,apiSetting:i,usePool:c,docInfo:s,signal:u}).next();A=null==e?void 0:e.result}let S="",k="",_="";if(Array.isArray(A)?([S,k=""]=A,k&&(_=Se[d].get(k)||"")):"string"==typeof A&&(S=A),!S)throw new Error("tanslate api got empty trtext");const T="auto"===n&&k===v;return l&&Xr(x,null,{trText:S,isSame:T,srLang:k,srCode:_}),{trText:S,srLang:k,srCode:_,isSame:T}},ma=async e=>{var t;let{videoId:n,chunkSign:r,fromLang:i="auto",toLang:o,events:a=[],apiSetting:s,docInfo:l,prevContext:c="",nextContext:u=""}=e;if(null==a||!a.length)return[];const d={apiSlug:s.apiSlug,videoId:n,chunkSign:r,fromLang:i,toLang:o,segVer:2,ctx:(null==l||null===(t=l.summary)||void 0===t?void 0:t.slice(0,50))||""},p="".concat(rn,"?").concat(fo.stringify(d)),f=await Yr(p);if(f)return f;const g=await(async e=>{var t,n,r,i,o,a,s;let{events:l,from:c,to:u,apiSetting:d,docInfo:p,prevContext:f="",nextContext:g=""}=e;const{apiType:m,fetchInterval:v,fetchLimit:y,httpTimeout:b}=d,[w,x]=await Vo(h(h({},d),{},{events:l,from:c,to:u,docInfo:p,prevContext:f,nextContext:g})),A=await Pi(w,x,{useCache:!1,usePool:!0,fetchInterval:v,fetchLimit:y,httpTimeout:b});if(!A)return pt("subtitle got empty response"),[];switch(m){case ee:case ne:case ae:case oe:return Mo(null!==(t=null==A||null===(n=A.choices)||void 0===n||null===(r=n[0])||void 0===r||null===(i=r.message)||void 0===i?void 0:i.content)&&void 0!==t?t:"",l);case te:{var S,k;const e=null==A||null===(S=A.candidates)||void 0===S?void 0:S[0],{thinkingMode:t}=d,n=t&&"auto"!==t&&"disabled"!==t;if("MAX_TOKENS"===(null==e?void 0:e.finishReason)&&n){var _,T,E;const[e,t]=await Vo(h(h({},d),{},{thinkingMode:"disabled",events:l,from:c,to:u,docInfo:p,prevContext:f,nextContext:g})),n=await Pi(e,t,{useCache:!1,usePool:!0,fetchInterval:v,fetchLimit:y,httpTimeout:b});if(null!=n&&null!==(_=n.candidates)&&void 0!==_&&null!==(T=_[0])&&void 0!==T&&null!==(E=T.content)&&void 0!==E&&E.parts)return Mo(zo(n.candidates[0].content.parts),l)}return Mo(zo(null==e||null===(k=e.content)||void 0===k?void 0:k.parts),l)}case re:return Mo(null!==(o=null==A||null===(a=A.content)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.text)&&void 0!==o?o:"",l);case se:return A}return[]})({events:a,from:i,to:o,apiSetting:s,docInfo:l,prevContext:c,nextContext:u});return null!=g&&g.length?(Xr(p,null,g),g):[]},va=async e=>{let{videoId:t,title:n,description:r,transcript:i,apiSetting:o}=e;const a={apiSlug:o.apiSlug,videoId:t},s="".concat(sn,"?").concat(fo.stringify(a)),l=await Yr(s);if(l)return l;const c=await(async e=>{var t,n,r,i,o,a,s,l,c,u,d,p,f,g,m,v,y,b,w,x;let{title:A,description:S,transcript:k,apiSetting:_}=e;const{apiType:T,fetchInterval:E,fetchLimit:C,httpTimeout:I}=_,P=[A&&"Title: ".concat(A),S&&"Description: ".concat(S),"\nTranscript:\n".concat(k)].filter(Boolean).join("\n"),[L,R]=await Vo(h(h({},_),{},{texts:[""],from:"auto",to:"en",fromLang:"auto",toLang:"en",useBatchFetch:!1,nobatchPrompt:"Analyze the video title, description, and transcript below. Produce a concise briefing (max 300 words) to help a subtitle translator understand the content accurately.\n\nCover these aspects:\n1. Main topic, themes, and subject domain\n2. Key terminology with brief definitions or context\n3. Important proper nouns (people, organizations, products, places)\n4. Speaker's tone and register\n5. Abbreviations, jargon, or ambiguous terms needing consistent handling\n\nOutput plain text only. No markdown, no formatting, no headers.",nobatchUserPrompt:P})),N=await Pi(L,R,{useCache:!1,usePool:!0,fetchInterval:E,fetchLimit:C,httpTimeout:I});if(!N)return"";switch(T){case ee:case ne:case ae:case oe:return(null==N||null===(t=N.choices)||void 0===t||null===(n=t[0])||void 0===n||null===(r=n.message)||void 0===r||null===(i=r.content)||void 0===i?void 0:i.trim())||"";case te:return zo(null==N||null===(o=N.candidates)||void 0===o||null===(a=o[0])||void 0===a||null===(s=a.content)||void 0===s?void 0:s.parts).trim()||"";case re:return(null==N||null===(l=N.content)||void 0===l||null===(c=l[0])||void 0===c||null===(u=c.text)||void 0===u?void 0:u.trim())||"";case se:return"string"==typeof N?N.trim():(null==N||null===(d=N.choices)||void 0===d||null===(p=d[0])||void 0===p||null===(f=p.message)||void 0===f||null===(g=f.content)||void 0===g?void 0:g.trim())||zo(null==N||null===(m=N.candidates)||void 0===m||null===(v=m[0])||void 0===v||null===(y=v.content)||void 0===y?void 0:y.parts).trim()||(null==N||null===(b=N.content)||void 0===b||null===(w=b[0])||void 0===w||null===(x=w.text)||void 0===x?void 0:x.trim())||"";default:return""}})({title:n,description:r,transcript:i,apiSetting:o});return c?(Xr(s,null,c),c):""},ya=async e=>{const{dataCaches:t={}}=await dr();t[e]=Date.now(),await hr({dataCaches:t})},ba=async e=>{const t=await(e=>Pi(e))(e),n=eu(t).filter(e=>{let{pattern:t}=e;return!jn(t,Ze)});return n.length>0&&await((e,t)=>Qn(Qt+e,t))(e,n),n},wa=async e=>{let{subrulesList:t}=e;try{const{subRulesSyncAt:e}=await dr(),n=Date.now();n-e>864e5&&(await(async e=>{for(const t of e)try{await ba(t.url),await ya(t.url)}catch(e){pt("sync subrule error: ".concat(t.url),e)}})(t),await hr({subRulesSyncAt:n}))}catch(e){pt("try sync all subrules",e)}};function xa(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Aa(e,t,n){xa(e,t),t.set(e,n)}function Sa(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function ka(e,t){return e.get(Sa(e,t))}function _a(e,t,n){return e.set(Sa(e,t),n),n}var Ta,Ea={2:e=>{function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,a,s,l=n.indexOf(e),c=n.indexOf(t,l+1),u=l;if(l>=0&&c>0){for(r=[],o=n.length;u>=0&&!s;)u==l?(r.push(u),l=n.indexOf(e,u+1)):1==r.length?s=[r.pop(),c]:((i=r.pop())<o&&(o=i,a=c),c=n.indexOf(t,u+1)),u=l<c&&l>=0?l:c;r.length&&(s=[o,a])}return s}e.exports=t,t.range=r},101:function(e,t,n){var r;e=n.nmd(e),function(){var o=(e&&e.exports,"object"==typeof i.g&&i.g);o.global!==o&&o.window;var a=function(e){this.message=e};(a.prototype=new Error).name="InvalidCharacterError";var s=function(e){throw new a(e)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,u={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&s("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,i,o=e.length%3,a="",c=-1,u=e.length-o;++c<u;)t=e.charCodeAt(c)<<16,n=e.charCodeAt(++c)<<8,r=e.charCodeAt(++c),a+=l.charAt((i=t+n+r)>>18&63)+l.charAt(i>>12&63)+l.charAt(i>>6&63)+l.charAt(63&i);return 2==o?(t=e.charCodeAt(c)<<8,n=e.charCodeAt(++c),a+=l.charAt((i=t+n)>>10)+l.charAt(i>>4&63)+l.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(c),a+=l.charAt(i>>2)+l.charAt(i<<4&63)+"=="),a},decode:function(e){var t=(e=String(e).replace(c,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",a=-1;++a<t;)r=l.indexOf(e.charAt(a)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o},version:"1.0.0"};void 0===(r=function(){return u}.call(t,n,t,e))||(e.exports=r)}()},172:(e,t)=>{t.d=function(e){if(!e)return 0;for(var t=(e=e.toString()).length,n=e.length;n--;){var r=e.charCodeAt(n);56320<=r&&r<=57343&&n--,127<r&&r<=2047?t++:2047<r&&r<=65535&&(t+=2)}return t}},526:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},298:e=>{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var i=e[r]<<16|e[r+1]<<8|e[r+2],o=0;o<4;o++)8*r+6*o<=8*e.length?n.push(t.charAt(i>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r<e.length;i=++r%4)0!=i&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(e.charAt(r))>>>6-2*i);return n}},e.exports=n},635:(e,t,n)=>{const r=n(31),i=n(338),o=n(221);e.exports={XMLParser:i,XMLValidator:r,XMLBuilder:o}},118:e=>{e.exports=function(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const n of e){if("string"==typeof n&&t===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}}:()=>!1}},705:(e,t)=>{const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+r+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let o=0;o<i;o++)e[r[o]]="strict"===n?[t[r[o]]]:t[r[o]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(e){return!(null==i.exec(e))},t.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const o=r.length;for(let e=0;e<o;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n},t.nameRegexp=r},31:(e,t,n)=>{const r=n(705),i={allowBooleanAttributes:!1,unpairedTags:[]};function o(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function a(e,t){const n=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const r=e.substr(n,t-n);if(t>5&&"xml"===r)return f("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},i,t);const n=[];let l=!1,c=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=a(e,i),i.err)return i}else{if("<"!==e[i]){if(o(e[i]))continue;return f("InvalidChar","char '"+e[i]+"' is not expected.",m(e,i))}{let g=i;if(i++,"!"===e[i]){i=s(e,i);continue}{let v=!1;"/"===e[i]&&(v=!0,i++);let y="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)y+=e[i];if(y=y.trim(),"/"===y[y.length-1]&&(y=y.substring(0,y.length-1),i--),d=y,!r.isName(d)){let t;return t=0===y.trim().length?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",f("InvalidTag",t,m(e,i))}const b=u(e,i);if(!1===b)return f("InvalidAttr","Attributes for '"+y+"' have open quote.",m(e,i));let w=b.value;if(i=b.index,"/"===w[w.length-1]){const n=i-w.length;w=w.substring(0,w.length-1);const r=h(w,t);if(!0!==r)return f(r.err.code,r.err.msg,m(e,n+r.err.line));l=!0}else if(v){if(!b.tagClosed)return f("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",m(e,i));if(w.trim().length>0)return f("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",m(e,g));if(0===n.length)return f("InvalidTag","Closing tag '"+y+"' has not been opened.",m(e,g));{const t=n.pop();if(y!==t.tagName){let n=m(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+y+"'.",m(e,g))}0==n.length&&(c=!0)}}else{const r=h(w,t);if(!0!==r)return f(r.err.code,r.err.msg,m(e,i-w.length+r.err.line));if(!0===c)return f("InvalidXml","Multiple possible root nodes found.",m(e,i));-1!==t.unpairedTags.indexOf(y)||n.push({tagName:y,tagStartPos:g}),l=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=s(e,i);continue}if("?"!==e[i+1])break;if(i=a(e,++i),i.err)return i}else if("&"===e[i]){const t=p(e,i);if(-1==t)return f("InvalidChar","char '&' is not expected.",m(e,i));i=t}else if(!0===c&&!o(e[i]))return f("InvalidXml","Extra text at the end",m(e,i));"<"===e[i]&&i--}}}var d;return l?1==n.length?f("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",m(e,n[0].tagStartPos)):!(n.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(n.map(e=>e.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};const l='"',c="'";function u(e,t){let n="",r="",i=!1;for(;t<e.length;t++){if(e[t]===l||e[t]===c)""===r?r=e[t]:r!==e[t]||(r="");else if(">"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function h(e,t){const n=r.getAllMatches(e,d),i={};for(let e=0;e<n.length;e++){if(0===n[e][1].length)return f("InvalidAttr","Attribute '"+n[e][2]+"' has no space in starting.",v(n[e]));if(void 0!==n[e][3]&&void 0===n[e][4])return f("InvalidAttr","Attribute '"+n[e][2]+"' is without value.",v(n[e]));if(void 0===n[e][3]&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+n[e][2]+"' is not allowed.",v(n[e]));const r=n[e][2];if(!g(r))return f("InvalidAttr","Attribute '"+r+"' is an invalid name.",v(n[e]));if(i.hasOwnProperty(r))return f("InvalidAttr","Attribute '"+r+"' is repeated.",v(n[e]));i[r]=1}return!0}function p(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function f(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function g(e){return r.isName(e)}function m(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function v(e){return e.startIndex+e[1].length}},221:(e,t,n)=>{const r=n(87),i=n(118),o={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:"  ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function a(e){this.options=Object.assign({},o,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=i(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=s,this.options.format?(this.indentate=l,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function s(e,t,n,r){const i=this.j2x(e,n+1,r.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function l(e){return this.options.indentBy.repeat(e)}function c(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}a.prototype.build=function(e){return this.options.preserveOrder?r(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},a.prototype.j2x=function(e,t,n){let r="",i="";const o=n.join(".");for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))if(void 0===e[a])this.isAttribute(a)&&(i+="");else if(null===e[a])this.isAttribute(a)?i+="":"?"===a[0]?i+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(e[a]instanceof Date)i+=this.buildTextValNode(e[a],a,"",t);else if("object"!=typeof e[a]){const n=this.isAttribute(a);if(n&&!this.ignoreAttributesFn(n,o))r+=this.buildAttrPairStr(n,""+e[a]);else if(!n)if(a===this.options.textNodeName){let t=this.options.tagValueProcessor(a,""+e[a]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[a],a,"",t)}else if(Array.isArray(e[a])){const r=e[a].length;let o="",s="";for(let l=0;l<r;l++){const r=e[a][l];if(void 0===r);else if(null===r)"?"===a[0]?i+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){const e=this.j2x(r,t+1,n.concat(a));o+=e.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else o+=this.processTextOrObjNode(r,a,t,n);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(a,r);e=this.replaceEntitiesValue(e),o+=e}else o+=this.buildTextValNode(r,a,"",t)}this.options.oneListGroup&&(o=this.buildObjectNode(o,a,s,t)),i+=o}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){const t=Object.keys(e[a]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[a][t[i]])}else i+=this.processTextOrObjNode(e[a],a,t,n);return{attrStr:r,val:i}},a.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},a.prototype.buildObjectNode=function(e,t,n,r){if(""===e)return"?"===t[0]?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",i=""),!n&&""!==n||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(r)+"\x3c!--".concat(e,"--\x3e")+this.newLine:this.indentate(r)+"<"+t+n+o+this.tagEndChar+e+this.indentate(r)+i:this.indentate(r)+"<"+t+n+o+">"+e+i}},a.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":"></".concat(e),t},a.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+"<![CDATA[".concat(e,"]]>")+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+"\x3c!--".concat(e,"--\x3e")+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"</"+t+this.tagEndChar}},a.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e},e.exports=a},87:e=>{function t(e,a,s,l){let c="",u=!1;for(let d=0;d<e.length;d++){const h=e[d],p=n(h);if(void 0===p)continue;let f="";if(f=0===s.length?p:"".concat(s,".").concat(p),p===a.textNodeName){let e=h[p];i(f,a)||(e=a.tagValueProcessor(p,e),e=o(e,a)),u&&(c+=l),c+=e,u=!1;continue}if(p===a.cdataPropName){u&&(c+=l),c+="<![CDATA[".concat(h[p][0][a.textNodeName],"]]>"),u=!1;continue}if(p===a.commentPropName){c+=l+"\x3c!--".concat(h[p][0][a.textNodeName],"--\x3e"),u=!0;continue}if("?"===p[0]){const e=r(h[":@"],a),t="?xml"===p?"":l;let n=h[p][0][a.textNodeName];n=0!==n.length?" "+n:"",c+=t+"<".concat(p).concat(n).concat(e,"?>"),u=!0;continue}let g=l;""!==g&&(g+=a.indentBy);const m=l+"<".concat(p).concat(r(h[":@"],a)),v=t(h[p],a,f,g);-1!==a.unpairedTags.indexOf(p)?a.suppressUnpairedNode?c+=m+">":c+=m+"/>":v&&0!==v.length||!a.suppressEmptyNode?v&&v.endsWith(">")?c+=m+">".concat(v).concat(l,"</").concat(p,">"):(c+=m+">",v&&""!==l&&(v.includes("/>")||v.includes("</"))?c+=l+a.indentBy+v+l:c+=v,c+="</".concat(p,">")):c+=m+"/>",u=!0}return c}function n(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];if(e.hasOwnProperty(r)&&":@"!==r)return r}}function r(e,t){let n="";if(e&&!t.ignoreAttributes)for(let r in e){if(!e.hasOwnProperty(r))continue;let i=t.attributeValueProcessor(r,e[r]);i=o(i,t),!0===i&&t.suppressBooleanAttributes?n+=" ".concat(r.substr(t.attributeNamePrefix.length)):n+=" ".concat(r.substr(t.attributeNamePrefix.length),'="').concat(i,'"')}return n}function i(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]==="*."+n)return!0;return!1}function o(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const r=t.entities[n];e=e.replace(r.regex,r.val)}return e}e.exports=function(e,n){let r="";return n.format&&n.indentBy.length>0&&(r="\n"),t(e,n,"",r)}},193:(e,t,n)=>{const r=n(705);function i(e,t){let n="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const r=e[t++];let i="";for(;t<e.length&&e[t]!==r;t++)i+=e[t];return[n,i,t]}function o(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function l(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function c(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function u(e){if(r.isName(e))return e;throw new Error("Invalid entity name ".concat(e))}e.exports=function(e,t){const n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let r=1,d=!1,h=!1,p="";for(;t<e.length;t++)if("<"!==e[t]||h)if(">"===e[t]){if(h?"-"===e[t-1]&&"-"===e[t-2]&&(h=!1,r--):r--,0===r)break}else"["===e[t]?d=!0:p+=e[t];else{if(d&&a(e,t)){let r,o;t+=7,[r,o,t]=i(e,t+1),-1===o.indexOf("&")&&(n[u(r)]={regx:RegExp("&".concat(r,";"),"g"),val:o})}else if(d&&s(e,t))t+=8;else if(d&&l(e,t))t+=8;else if(d&&c(e,t))t+=9;else{if(!o)throw new Error("Invalid DOCTYPE");h=!0}r++,p=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}}},63:(e,t)=>{const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};t.buildOptions=function(e){return Object.assign({},n,e)},t.defaultOptions=n},299:(e,t,n)=>{const r=n(705),i=n(365),o=n(193),a=n(494),s=n(118);function l(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:e[r]}}}function c(e,t,n,r,i,o,a){if(void 0!==e&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){a||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,o);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?x(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const d=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function h(e,t,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=r.getAllMatches(e,d),i=n.length,o={};for(let e=0;e<i;e++){const r=this.resolveNameSpace(n[e][1]);if(this.ignoreAttributesFn(r,t))continue;let i=n[e][4],a=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const e=this.options.attributeValueProcessor(r,i,t);o[a]=null==e?i:typeof e!=typeof i||e!==i?e:x(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[a]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const p=function(e){e=e.replace(/\r\n?/g,"\n");const t=new i("!xml");let n=t,r="",a="";for(let s=0;s<e.length;s++)if("<"===e[s])if("/"===e[s+1]){const t=y(e,">",s,"Closing Tag is not closed.");let i=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,a));const o=a.substring(a.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error("Unpaired tag can not be used as closing tag: </".concat(i,">"));let l=0;o&&-1!==this.options.unpairedTags.indexOf(o)?(l=a.lastIndexOf(".",a.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=a.lastIndexOf("."),a=a.substring(0,l),n=this.tagsNodeStack.pop(),r="",s=t}else if("?"===e[s+1]){let t=b(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,a),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new i(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,a,t.tagName)),this.addChild(n,e,a)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=y(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,a),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=t}else if("!D"===e.substr(s+1,2)){const t=o(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=y(e,"]]>",s,"CDATA is not closed.")-2,i=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,a);let o=this.parseTextData(i,n.tagname,a,!0,!1,!0,!0);null==o&&(o=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,o),s=t+2}else{let o=b(e,s,this.options.removeNSPrefix),l=o.tagName;const c=o.rawTagName;let u=o.tagExp,d=o.attrExpPresent,h=o.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,a,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),a=a.substring(0,a.lastIndexOf("."))),l!==t.tagname&&(a+=a?"."+l:l),this.isItStopNode(this.options.stopNodes,a,l)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),a=a.substr(0,a.length-1),u=l):u=u.substr(0,u.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))s=o.closeIndex;else{const n=this.readStopNodeData(e,c,h+1);if(!n)throw new Error("Unexpected end of ".concat(c));s=n.i,t=n.tagContent}const r=new i(l);l!==u&&d&&(r[":@"]=this.buildAttributesMap(u,a,l)),t&&(t=this.parseTextData(t,l,a,!0,d,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,a)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),a=a.substr(0,a.length-1),u=l):u=u.substr(0,u.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const e=new i(l);l!==u&&d&&(e[":@"]=this.buildAttributesMap(u,a,l)),this.addChild(n,e,a),a=a.substr(0,a.lastIndexOf("."))}else{const e=new i(l);this.tagsNodeStack.push(n),l!==u&&d&&(e[":@"]=this.buildAttributesMap(u,a,l)),this.addChild(n,e,a),n=e}r="",s=h}}else r+=e[s];return t.child};function f(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r?(t.tagname=r,e.addChild(t)):e.addChild(t))}const g=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function m(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function v(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function y(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function b(e,t,n){const r=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="";for(let o=t;o<e.length;o++){let t=e[o];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:i,index:o};if(e[o+1]===r[1])return{data:i,index:o}}else"\t"===t&&(t=" ");i+=t}}(e,t+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(!r)return;let i=r.data;const o=r.index,a=i.search(/\s/);let s=i,l=!0;-1!==a&&(s=i.substring(0,a),i=i.substring(a+1).trimStart());const c=s;if(n){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1),l=s!==r.data.substr(e+1))}return{tagName:s,tagExp:i,closeIndex:o,attrExpPresent:l,rawTagName:c}}function w(e,t,n){const r=n;let i=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const o=y(e,">",n,"".concat(t," is not closed"));if(e.substring(n+2,o).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:o};n=o}else if("?"===e[n+1])n=y(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=y(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=y(e,"]]>",n,"StopNode is not closed.")-2;else{const r=b(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function x(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&a(e,n)}return r.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=l,this.parseXml=p,this.parseTextData=c,this.resolveNameSpace=u,this.buildAttributesMap=h,this.isItStopNode=v,this.replaceEntitiesValue=g,this.readStopNodeData=w,this.saveTextToParentTag=m,this.addChild=f,this.ignoreAttributesFn=s(this.options.ignoreAttributes)}}},338:(e,t,n)=>{const{buildOptions:r}=n(63),i=n(299),{prettify:o}=n(728),a=n(31);e.exports=class{constructor(e){this.externalEntities={},this.options=r(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=a.validate(e,t);if(!0!==n)throw Error("".concat(n.err.msg,":").concat(n.err.line,":").concat(n.err.col))}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:o(r,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},728:(e,t)=>{function n(e,t,a){let s;const l={};for(let c=0;c<e.length;c++){const u=e[c],d=r(u);let h="";if(h=void 0===a?d:a+"."+d,d===t.textNodeName)void 0===s?s=u[d]:s+=""+u[d];else{if(void 0===d)continue;if(u[d]){let e=n(u[d],t,h);const r=o(e,t);u[":@"]?i(e,u[":@"],h,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==l[d]&&l.hasOwnProperty(d)?(Array.isArray(l[d])||(l[d]=[l[d]]),l[d].push(e)):t.isArray(d,h,r)?l[d]=[e]:l[d]=e}}}return"string"==typeof s?s.length>0&&(l[t.textNodeName]=s):void 0!==s&&(l[t.textNodeName]=s),l}function r(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function i(e,t,n,r){if(t){const i=Object.keys(t),o=i.length;for(let a=0;a<o;a++){const o=i[a];r.isArray(o,n+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function o(e,t){const{textNodeName:n}=t,r=Object.keys(e).length;return 0===r||!(1!==r||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n])}t.prettify=function(e,t){return n(e,t)}},365:e=>{e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},135:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},542:(e,t,n)=>{!function(){var t=n(298),r=n(526).utf8,i=n(135),o=n(526).bin,a=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?o.stringToBytes(e):r.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),l=8*e.length,c=1732584193,u=-271733879,d=-1732584194,h=271733878,p=0;p<s.length;p++)s[p]=16711935&(s[p]<<8|s[p]>>>24)|4278255360&(s[p]<<24|s[p]>>>8);s[l>>>5]|=128<<l%32,s[14+(l+64>>>9<<4)]=l;var f=a._ff,g=a._gg,m=a._hh,v=a._ii;for(p=0;p<s.length;p+=16){var y=c,b=u,w=d,x=h;c=f(c,u,d,h,s[p+0],7,-680876936),h=f(h,c,u,d,s[p+1],12,-389564586),d=f(d,h,c,u,s[p+2],17,606105819),u=f(u,d,h,c,s[p+3],22,-1044525330),c=f(c,u,d,h,s[p+4],7,-176418897),h=f(h,c,u,d,s[p+5],12,1200080426),d=f(d,h,c,u,s[p+6],17,-1473231341),u=f(u,d,h,c,s[p+7],22,-45705983),c=f(c,u,d,h,s[p+8],7,1770035416),h=f(h,c,u,d,s[p+9],12,-1958414417),d=f(d,h,c,u,s[p+10],17,-42063),u=f(u,d,h,c,s[p+11],22,-1990404162),c=f(c,u,d,h,s[p+12],7,1804603682),h=f(h,c,u,d,s[p+13],12,-40341101),d=f(d,h,c,u,s[p+14],17,-1502002290),c=g(c,u=f(u,d,h,c,s[p+15],22,1236535329),d,h,s[p+1],5,-165796510),h=g(h,c,u,d,s[p+6],9,-1069501632),d=g(d,h,c,u,s[p+11],14,643717713),u=g(u,d,h,c,s[p+0],20,-373897302),c=g(c,u,d,h,s[p+5],5,-701558691),h=g(h,c,u,d,s[p+10],9,38016083),d=g(d,h,c,u,s[p+15],14,-660478335),u=g(u,d,h,c,s[p+4],20,-405537848),c=g(c,u,d,h,s[p+9],5,568446438),h=g(h,c,u,d,s[p+14],9,-1019803690),d=g(d,h,c,u,s[p+3],14,-187363961),u=g(u,d,h,c,s[p+8],20,1163531501),c=g(c,u,d,h,s[p+13],5,-1444681467),h=g(h,c,u,d,s[p+2],9,-51403784),d=g(d,h,c,u,s[p+7],14,1735328473),c=m(c,u=g(u,d,h,c,s[p+12],20,-1926607734),d,h,s[p+5],4,-378558),h=m(h,c,u,d,s[p+8],11,-2022574463),d=m(d,h,c,u,s[p+11],16,1839030562),u=m(u,d,h,c,s[p+14],23,-35309556),c=m(c,u,d,h,s[p+1],4,-1530992060),h=m(h,c,u,d,s[p+4],11,1272893353),d=m(d,h,c,u,s[p+7],16,-155497632),u=m(u,d,h,c,s[p+10],23,-1094730640),c=m(c,u,d,h,s[p+13],4,681279174),h=m(h,c,u,d,s[p+0],11,-358537222),d=m(d,h,c,u,s[p+3],16,-722521979),u=m(u,d,h,c,s[p+6],23,76029189),c=m(c,u,d,h,s[p+9],4,-640364487),h=m(h,c,u,d,s[p+12],11,-421815835),d=m(d,h,c,u,s[p+15],16,530742520),c=v(c,u=m(u,d,h,c,s[p+2],23,-995338651),d,h,s[p+0],6,-198630844),h=v(h,c,u,d,s[p+7],10,1126891415),d=v(d,h,c,u,s[p+14],15,-1416354905),u=v(u,d,h,c,s[p+5],21,-57434055),c=v(c,u,d,h,s[p+12],6,1700485571),h=v(h,c,u,d,s[p+3],10,-1894986606),d=v(d,h,c,u,s[p+10],15,-1051523),u=v(u,d,h,c,s[p+1],21,-2054922799),c=v(c,u,d,h,s[p+8],6,1873313359),h=v(h,c,u,d,s[p+15],10,-30611744),d=v(d,h,c,u,s[p+6],15,-1560198380),u=v(u,d,h,c,s[p+13],21,1309151649),c=v(c,u,d,h,s[p+4],6,-145523070),h=v(h,c,u,d,s[p+11],10,-1120210379),d=v(d,h,c,u,s[p+2],15,718787259),u=v(u,d,h,c,s[p+9],21,-343485551),c=c+y>>>0,u=u+b>>>0,d=d+w>>>0,h=h+x>>>0}return t.endian([c,u,d,h])};a._ff=function(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},a._gg=function(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},a._hh=function(e,t,n,r,i,o,a){var s=e+(t^n^r)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},a._ii=function(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+(i>>>0)+a;return(s<<o|s>>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(null==e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(a(e,n));return n&&n.asBytes?r:n&&n.asString?o.bytesToString(r):t.bytesToHex(r)}}()},285:(e,t,n)=>{var r=n(2);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),m(function(e){return e.split("\\\\").join(i).split("\\{").join(o).split("\\}").join(a).split("\\,").join(s).split("\\.").join(l)}(e),!0).map(u)):[]};var i="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(i).join("\\").split(o).join("{").split(a).join("}").split(s).join(",").split(l).join(".")}function d(e){if(!e)return[""];var t=[],n=r("{","}",e);if(!n)return e.split(",");var i=n.pre,o=n.body,a=n.post,s=i.split(",");s[s.length-1]+="{"+o+"}";var l=d(a);return a.length&&(s[s.length-1]+=l.shift(),s.push.apply(s,l)),t.push.apply(t,s),t}function h(e){return"{"+e+"}"}function p(e){return/^-?0\d/.test(e)}function f(e,t){return e<=t}function g(e,t){return e>=t}function m(e,t){var n=[],i=r("{","}",e);if(!i)return[e];var o=i.pre,s=i.post.length?m(i.post,!1):[""];if(/\$$/.test(i.pre))for(var l=0;l<s.length;l++){var u=o+"{"+i.body+"}"+s[l];n.push(u)}else{var v,y,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),w=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),x=b||w,A=i.body.indexOf(",")>=0;if(!x&&!A)return i.post.match(/,.*\}/)?m(e=i.pre+"{"+i.body+a+i.post):[e];if(x)v=i.body.split(/\.\./);else if(1===(v=d(i.body)).length&&1===(v=m(v[0],!1).map(h)).length)return s.map(function(e){return i.pre+v[0]+e});if(x){var S=c(v[0]),k=c(v[1]),_=Math.max(v[0].length,v[1].length),T=3==v.length?Math.abs(c(v[2])):1,E=f;k<S&&(T*=-1,E=g);var C=v.some(p);y=[];for(var I=S;E(I,k);I+=T){var P;if(w)"\\"===(P=String.fromCharCode(I))&&(P="");else if(P=String(I),C){var L=_-P.length;if(L>0){var R=new Array(L+1).join("0");P=I<0?"-"+R+P.slice(1):R+P}}y.push(P)}}else{y=[];for(var N=0;N<v.length;N++)y.push.apply(y,m(v[N],!1))}for(N=0;N<y.length;N++)for(l=0;l<s.length;l++)u=o+y[N]+s[l],(!t||x||u)&&n.push(u)}return n}},829:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var t="function"==typeof Map?new Map:void 0;return n=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return r(e,arguments,o(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),i(a,e)},n(e)}function r(e,t,n){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o},r.apply(null,arguments)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var a=function(e){function n(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=function(e,n){return!n||"object"!==t(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}(this,o(n).call(this,e))).name="ObjectPrototypeMutationError",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(n,e),n}(n(Error));function s(e,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=n.split("."),o=i.length,a=function(t){var n=i[t];if(!e)return{v:void 0};if("+"===n){if(Array.isArray(e))return{v:e.map(function(n,o){var a=i.slice(t+1);return a.length>0?s(n,a.join("."),r):r(e,o,i,t)})};var o=i.slice(0,t).join(".");throw new Error("Object at wildcard (".concat(o,") is not an array"))}e=r(e,n,i,t)},l=0;l<o;l++){var c=a(l);if("object"===t(c))return c.v}return e}function l(e,t){return e.length===t+1}e.exports={set:function(e,n,r){if("object"!=t(e)||null===e)return e;if(void 0===n)return e;if("number"==typeof n)return e[n]=r,e[n];try{return s(e,n,function(e,t,n,i){if(e===Reflect.getPrototypeOf({}))throw new a("Attempting to mutate Object.prototype");if(!e[t]){var o=Number.isInteger(Number(n[i+1])),s="+"===n[i+1];e[t]=o||s?[]:{}}return l(n,i)&&(e[t]=r),e[t]})}catch(t){if(t instanceof a)throw t;return e}},get:function(e,n){if("object"!=t(e)||null===e)return e;if(void 0===n)return e;if("number"==typeof n)return e[n];try{return s(e,n,function(e,t){return e[t]})}catch(t){return e}},has:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("object"!=t(e)||null===e)return!1;if(void 0===n)return!1;if("number"==typeof n)return n in e;try{var i=!1;return s(e,n,function(e,t,n,o){if(!l(n,o))return e&&e[t];i=r.own?e.hasOwnProperty(t):t in e}),i}catch(e){return!1}},hasOwn:function(e,t,n){return this.has(e,t,n||{own:!0})},isIn:function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("object"!=t(e)||null===e)return!1;if(void 0===n)return!1;try{var o=!1,a=!1;return s(e,n,function(e,n,i,s){return o=o||e===r||!!e&&e[n]===r,a=l(i,s)&&"object"===t(e)&&n in e,e&&e[n]}),i.validPath?o&&a:o}catch(e){return!1}},ObjectPrototypeMutationError:a}},47:(e,t,n)=>{var r=n(410),i=function(e){return"string"==typeof e};function o(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];i&&"."!==i&&(".."===i?n.length&&".."!==n[n.length-1]?n.pop():t&&n.push(".."):n.push(i))}return n}var a=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s={};function l(e){return a.exec(e).slice(1)}s.resolve=function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:process.cwd();if(!i(r))throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,t="/"===r.charAt(0))}return(t?"/":"")+(e=o(e.split("/"),!t).join("/"))||"."},s.normalize=function(e){var t=s.isAbsolute(e),n="/"===e.substr(-1);return(e=o(e.split("/"),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},s.isAbsolute=function(e){return"/"===e.charAt(0)},s.join=function(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];if(!i(n))throw new TypeError("Arguments to path.join must be strings");n&&(e+=e?"/"+n:n)}return s.normalize(e)},s.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n+1)}e=s.resolve(e).substr(1),t=s.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),a=o,l=0;l<o;l++)if(r[l]!==i[l]){a=l;break}var c=[];for(l=a;l<r.length;l++)c.push("..");return(c=c.concat(i.slice(a))).join("/")},s._makeLong=function(e){return e},s.dirname=function(e){var t=l(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},s.basename=function(e,t){var n=l(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},s.extname=function(e){return l(e)[3]},s.format=function(e){if(!r.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!i(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);return(e.dir?e.dir+s.sep:"")+(e.base||"")},s.parse=function(e){if(!i(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=l(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,t[1].length-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},s.sep="/",s.delimiter=":",e.exports=s},647:(e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function i(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,a=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,i={};t=n.exec(e);){var o=r(t[1]),a=r(t[2]);null===o||null===a||o in i||(i[o]=a)}return i}},670:e=>{e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},494:e=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i=Object.assign({},r,i),!e||"string"!=typeof e)return e;let o=e.trim();if(void 0!==i.skipLike&&i.skipLike.test(o))return e;if(i.hex&&t.test(o))return Number.parseInt(o,16);{const t=n.exec(o);if(t){const n=t[1],r=t[2];let s=(a=t[3])&&-1!==a.indexOf(".")?("."===(a=a.replace(/0+$/,""))?a="0":"."===a[0]?a="0"+a:"."===a[a.length-1]&&(a=a.substr(0,a.length-1)),a):a;const l=t[4]||t[6];if(!i.leadingZeros&&r.length>0&&n&&"."!==o[2])return e;if(!i.leadingZeros&&r.length>0&&!n&&"."!==o[1])return e;{const t=Number(o),a=""+t;return-1!==a.search(/[eE]/)||l?i.eNotation?t:e:-1!==o.indexOf(".")?"0"===a&&""===s||a===s||n&&a==="-"+s?t:e:r?s===a||n+s===a?t:e:o===a||o===n+a?t:e}}return e}var a}},737:(e,t,n)=>{var r=n(670),o=n(647),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,l=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function h(e){return(e||"").toString().replace(a,"")}var p=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function g(e){var t,n=("undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{}).location||{},r={},o=typeof(e=e||n);if("blob:"===e.protocol)r=new y(unescape(e.pathname),{});else if("string"===o)for(t in r=new y(e,{}),f)delete r[t];else if("object"===o){for(t in e)t in f||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=l.test(e.href))}return r}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function v(e,t){e=(e=h(e)).replace(s,""),t=t||{};var n,r=u.exec(e),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],l=0;return o?a?(n=r[2]+r[3]+r[4],l=r[2].length+r[3].length):(n=r[2]+r[4],l=r[2].length):a?(n=r[3]+r[4],l=r[3].length):n=r[4],"file:"===i?l>=2&&(n=n.slice(2)):m(i)?n=r[4]:i?o&&(n=n.slice(2)):l>=2&&m(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||m(i),slashesCount:l,rest:n}}function y(e,t,n){if(e=(e=h(e)).replace(s,""),!(this instanceof y))return new y(e,t,n);var i,a,l,c,u,f,b=p.slice(),w=typeof t,x=this,A=0;for("object"!==w&&"string"!==w&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),i=!(a=v(e||"",t=g(t))).protocol&&!a.slashes,x.slashes=a.slashes||i&&t.slashes,x.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(x.protocol)))&&(b[3]=[/(.*)/,"pathname"]);A<b.length;A++)"function"!=typeof(c=b[A])?(l=c[0],f=c[1],l!=l?x[f]=e:"string"==typeof l?~(u="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof c[2]?(x[f]=e.slice(0,u),e=e.slice(u+c[2])):(x[f]=e.slice(u),e=e.slice(0,u))):(u=l.exec(e))&&(x[f]=u[1],e=e.slice(0,u.index)),x[f]=x[f]||i&&c[3]&&t[f]||"",c[4]&&(x[f]=x[f].toLowerCase())):e=c(e,x);n&&(x.query=n(x.query)),i&&t.slashes&&"/"!==x.pathname.charAt(0)&&(""!==x.pathname||""!==t.pathname)&&(x.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(x.pathname,t.pathname)),"/"!==x.pathname.charAt(0)&&m(x.protocol)&&(x.pathname="/"+x.pathname),r(x.port,x.protocol)||(x.host=x.hostname,x.port=""),x.username=x.password="",x.auth&&(~(u=x.auth.indexOf(":"))?(x.username=x.auth.slice(0,u),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=x.auth.slice(u+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(x.auth)),x.auth=x.password?x.username+":"+x.password:x.username),x.origin="file:"!==x.protocol&&m(x.protocol)&&x.host?x.protocol+"//"+x.host:"null",x.href=x.toString()}y.prototype={set:function(e,t,n){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,r(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,c.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!n;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(i.username=t.slice(0,s),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(s+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<p.length;l++){var u=p[l];u[4]&&(i[u[1]]=i[u[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&m(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,n=this,r=n.host,i=n.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var a=i+(n.protocol&&n.slashes||m(n.protocol)?"//":"");return n.username?(a+=n.username,n.password&&(a+=":"+n.password),a+="@"):n.password?(a+=":"+n.password,a+="@"):"file:"!==n.protocol&&m(n.protocol)&&!r&&"/"!==n.pathname&&(a+="@"),(":"===r[r.length-1]||c.test(n.hostname)&&!n.port)&&(r+=":"),a+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(a+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(a+=n.hash),a}},y.extractProtocol=v,y.location=g,y.trimLeft=h,y.qs=o,e.exports=y},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},Ca={};function Ia(e){var t=Ca[e];if(void 0!==t)return t.exports;var n=Ca[e]={id:e,loaded:!1,exports:{}};return Ea[e].call(n.exports,n,n.exports,Ia),n.loaded=!0,n.exports}Ia.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return Ia.d(t,{a:t}),t},Ia.d=(e,t)=>{for(var n in t)Ia.o(t,n)&&!Ia.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Ia.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ia.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var Pa={};Ia.d(Pa,{hT:()=>rs,O4:()=>is,Kd:()=>ts,YK:()=>ns,UU:()=>Vc,Gu:()=>ds,ky:()=>ql,h4:()=>Hl,ch:()=>Gl,hq:()=>zl,i5:()=>Kl});var La=Ia(737),Ra=Ia.n(La);function Na(e){if(!Oa(e))throw new Error("Parameter was not an error")}function Oa(e){return!!e&&"object"==typeof e&&"[object Error]"===(t=e,Object.prototype.toString.call(t))||e instanceof Error;var t}class ja extends Error{constructor(e,t){const n=[...arguments],{options:r,shortMessage:i}=function(e){let t,n="";if(0===e.length)t={};else if(Oa(e[0]))t={cause:e[0]},n=e.slice(1).join(" ")||"";else if(e[0]&&"object"==typeof e[0])t=Object.assign({},e[0]),n=e.slice(1).join(" ")||"";else{if("string"!=typeof e[0])throw new Error("Invalid arguments passed to Layerr");t={},n=n=e.join(" ")||""}return{options:t,shortMessage:n}}(n);let o=i;if(r.cause&&(o="".concat(o,": ").concat(r.cause.message)),super(o),this.message=o,r.name&&"string"==typeof r.name?this.name=r.name:this.name="Layerr",r.cause&&Object.defineProperty(this,"_cause",{value:r.cause}),Object.defineProperty(this,"_info",{value:{}}),r.info&&"object"==typeof r.info&&Object.assign(this._info,r.info),Error.captureStackTrace){const e=r.constructorOpt||this.constructor;Error.captureStackTrace(this,e)}}static cause(e){return Na(e),e._cause&&Oa(e._cause)?e._cause:null}static fullStack(e){var t;Na(e);const n=ja.cause(e);return n?"".concat(e.stack,"\ncaused by: ").concat(ja.fullStack(n)):null!==(t=e.stack)&&void 0!==t?t:""}static info(e){Na(e);const t={},n=ja.cause(e);return n&&Object.assign(t,ja.info(n)),e._info&&Object.assign(t,e._info),t}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e="".concat(e,": ").concat(this.message)),e}}var za=Ia(47),Ma=Ia.n(za);const Da="__PATH_SEPARATOR_POSIX__",Ba="__PATH_SEPARATOR_WINDOWS__";function Fa(e){try{const t=e.replace(/\//g,Da).replace(/\\\\/g,Ba);return encodeURIComponent(t).split(Ba).join("\\\\").split(Da).join("/")}catch(e){throw new ja(e,"Failed encoding path")}}function Wa(e){return e.startsWith("/")?e:"/"+e}function Ua(e){let t=e;return"/"!==t[0]&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function Va(e){let t=new(Ra())(e).pathname;return t.length<=0&&(t="/"),Ua(t)}function Ha(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return function(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var i=e[r];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(r>0&&(i=i.replace(/^[\/]+/,"")),i=r<e.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),t.push(i))}var o=t.join("/"),a=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}(t.reduce((e,t,n)=>((0===n||"/"!==t||"/"===t&&"/"!==e[e.length-1])&&e.push(t),e),[]))}var Ga=Ia(542),qa=Ia.n(Ga);function Ka(e,t){const n=e.url.replace("//",""),r=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),i=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",a="00000000".concat(t.nc).slice(-8),s=function(e,t,n,r,i,o,a){const s=a||qa()("".concat(t,":").concat(n,":").concat(r));return e&&"md5-sess"===e.toLowerCase()?qa()("".concat(s,":").concat(i,":").concat(o)):s}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=qa()("".concat(i,":").concat(r)),c=o?qa()("".concat(s,":").concat(t.nonce,":").concat(a,":").concat(t.cnonce,":").concat(o,":").concat(l)):qa()("".concat(s,":").concat(t.nonce,":").concat(l)),u={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:o,response:c,nc:a,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},d=[];for(const e in u)u[e]&&("qop"===e||"nc"===e||"algorithm"===e?d.push("".concat(e,"=").concat(u[e])):d.push("".concat(e,'="').concat(u[e],'"')));return"Digest ".concat(d.join(", "))}function $a(e){return"digest"===(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()}var Ya=Ia(101),Xa=Ia.n(Ya);function Ja(e){return Xa().decode(e)}function Qa(e,t){var n;return"Basic ".concat((n="".concat(e,":").concat(t),Xa().encode(n)))}const Za="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,es=Za.fetch.bind(Za),ts=(Za.Headers,Za.Request),ns=Za.Response;let rs=function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e}({}),is=function(e){return e.DataTypeNoLength="data-type-no-length",e.InvalidAuthType="invalid-auth-type",e.InvalidOutputFormat="invalid-output-format",e.LinkUnsupportedAuthType="link-unsupported-auth",e.InvalidUpdateRange="invalid-update-range",e.NotSupported="not-supported",e}({});function os(e,t,n,r,i){switch(e.authType){case rs.Auto:t&&n&&(e.headers.Authorization=Qa(t,n));break;case rs.Digest:e.digest=function(e,t,n){return{username:e,password:t,ha1:n,nc:0,algorithm:"md5",hasDigestAuth:!1}}(t,n,i);break;case rs.None:break;case rs.Password:e.headers.Authorization=Qa(t,n);break;case rs.Token:e.headers.Authorization="".concat((o=r).token_type," ").concat(o.access_token);break;default:throw new ja({info:{code:is.InvalidAuthType}},"Invalid auth type: ".concat(e.authType))}var o}Ia(345),Ia(800);const as="@@HOTPATCHER",ss=()=>{};function ls(e){return{original:e,methods:[e],final:!1}}class cs{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=as}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e||e.__type__!==as)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach(n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])}),e._configuration=this.configuration,this}execute(e){const t=this.get(e)||ss;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t(...r)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error("Failed handling method request: No method provided for override: ".concat(e));default:throw new Error("Failed handling request which resulted in an empty method: Invalid empty-action specified: ".concat(this.getEmptyAction))}return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Failed creating sequence: No functions provided");return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let i=n;const o=this;for(;t.length>0;)i=[t.shift().apply(o,i)];return i[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{chain:r=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error("Failed patching '".concat(e,"': Method marked as being final"));if("function"!=typeof t)throw new Error("Failed patching '".concat(e,"': Provided method is not a function"));if(r)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=ls(t);else if(this.isPatched(e)){const{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(ls(t),{original:n})}else this.configuration.registry[e]=ls(t);return this}patchInline(e,t){this.isPatched(e)||this.patch(e,t);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return this.execute(e,...r)}plugin(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach(t=>{this.patch(e,t,{chain:!0})}),this}restore(e){if(!this.isPatched(e))throw new Error("Failed restoring method: No method present for key: ".concat(e));if("function"!=typeof this.configuration.registry[e].original)throw new Error("Failed restoring method: Original method not found or of invalid type for key: ".concat(e));return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error("Failed marking '".concat(e,"' as final: No method found for key"));return this.configuration.registry[e].final=!0,this}}let us=null;function ds(){return us||(us=new cs),us}function hs(e){return function(e){if("object"!=typeof e||null===e||"[object Object]"!=Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function ps(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=null,i=[...t];for(;i.length>0;){const e=i.shift();r=r?fs(r,e):hs(e)}return r}function fs(e,t){const n=hs(e);return Object.keys(t).forEach(e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:"object"==typeof t[e]&&t[e]?n[e]="object"==typeof n[e]&&n[e]?fs(n[e],t[e]):hs(t[e]):n[e]=t[e]:n[e]=t[e]}),n}function gs(e){const t={};for(const n of e.keys())t[n]=e.get(n);return t}function ms(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};const r={};return t.reduce((e,t)=>(Object.keys(t).forEach(n=>{const i=n.toLowerCase();r.hasOwnProperty(i)?e[r[i]]=t[n]:(r[i]=n,e[n]=t[n])}),e),{})}Ia(805);const vs="function"==typeof ArrayBuffer,{toString:ys}=Object.prototype;function bs(e){return vs&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===ys.call(e))}function ws(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function xs(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function As(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Ss=xs(function(e){const t=e._digest;return delete e._digest,t.hasDigestAuth&&(e=ps(e,{headers:{Authorization:Ka(e,t)}})),As(Es(e),function(n){let r=!1;return i=function(e){return r?e:n},(o=function(){if(401==n.status)return t.hasDigestAuth=function(e,t){if(!$a(e))return!1;const n=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const r=e.headers&&e.headers.get("www-authenticate")||"",i=n.exec(r);if(!i)break;t[i[1]]=i[2]||i[3]}return t.nc+=1,t.cnonce=function(){let e="";for(let t=0;t<32;++t)e="".concat(e).concat("abcdef0123456789"[Math.floor(16*Math.random())]);return e}(),!0}(n,t),function(){if(t.hasDigestAuth)return As(Es(e=ps(e,{headers:{Authorization:Ka(e,t)}})),function(e){return 401==e.status?t.hasDigestAuth=!1:t.nc++,r=!0,e})}();t.nc++}())&&o.then?o.then(i):i(o);var i,o})}),ks=xs(function(e,t){return As(Es(e),function(n){return n.ok?(t.authType=rs.Password,n):401==n.status&&$a(n)?(t.authType=rs.Digest,os(t,t.username,t.password,void 0,void 0),e._digest=t.digest,Ss(e)):n})}),_s=xs(function(e,t){return t.authType===rs.Auto?ks(e,t):e._digest?Ss(e):Es(e)});function Ts(e,t,n){const r=hs(e);return r.headers=ms(t.headers,r.headers||{},n.headers||{}),void 0!==n.data&&(r.data=n.data),n.signal&&(r.signal=n.signal),t.httpAgent&&(r.httpAgent=t.httpAgent),t.httpsAgent&&(r.httpsAgent=t.httpsAgent),t.digest&&(r._digest=t.digest),"boolean"==typeof t.withCredentials&&(r.withCredentials=t.withCredentials),r}function Es(e){const t=ds();return t.patchInline("request",e=>t.patchInline("fetch",es,e.url,function(e){let t={};const n={method:e.method};if(e.headers&&(t=ms(t,e.headers)),void 0!==e.data){const[r,i]=function(e){if("string"==typeof e)return[e,{}];if(ws(e))return[e,{}];if(bs(e))return[e,{}];if(e&&"object"==typeof e)return[JSON.stringify(e),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof e)}(e.data);n.body=r,t=ms(t,i)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials="include"),n.headers=t,n}(e)),e)}var Cs=Ia(285);const Is=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},Ps={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Ls=e=>e.replace(/[[\]\\-]/g,"\\$&"),Rs=e=>e.join(""),Ns=(e,t)=>{const n=t;if("["!==e.charAt(n))throw new Error("not in a brace expression");const r=[],i=[];let o=n+1,a=!1,s=!1,l=!1,c=!1,u=n,d="";e:for(;o<e.length;){const t=e.charAt(o);if("!"!==t&&"^"!==t||o!==n+1){if("]"===t&&a&&!l){u=o+1;break}if(a=!0,"\\"!==t||l){if("["===t&&!l)for(const[t,[a,l,c]]of Object.entries(Ps))if(e.startsWith(t,o)){if(d)return["$.",!1,e.length-n,!0];o+=t.length,c?i.push(a):r.push(a),s=s||l;continue e}l=!1,d?(t>d?r.push(Ls(d)+"-"+Ls(t)):t===d&&r.push(Ls(t)),d="",o++):e.startsWith("-]",o+1)?(r.push(Ls(t+"-")),o+=2):e.startsWith("-",o+1)?(d=t,o+=2):(r.push(Ls(t)),o++)}else l=!0,o++}else c=!0,o++}if(u<o)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,e.length-n,!0];if(0===i.length&&1===r.length&&/^\\?.$/.test(r[0])&&!c)return[(h=2===r[0].length?r[0].slice(-1):r[0],h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-n,!1];var h;const p="["+(c?"^":"")+Rs(r)+"]",f="["+(c?"":"^")+Rs(i)+"]";return[r.length&&i.length?"("+p+"|"+f+")":r.length?p:f,s,u-n,!0]},Os=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},js=new Set(["!","?","+","*","@"]),zs=e=>js.has(e),Ms="(?!\\.)",Ds=new Set(["[","."]),Bs=new Set(["..","."]),Fs=new Set("().*{}+?[]^$\\!"),Ws="[^/]",Us=Ws+"*?",Vs=Ws+"+?";var Hs=new WeakMap,Gs=new WeakMap,qs=new WeakMap,Ks=new WeakMap,$s=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,Js=new WeakMap,Qs=new WeakMap,Zs=new WeakMap,el=new WeakMap,tl=new WeakSet;class nl{constructor(e,t){!function(e,t){xa(e,t),t.add(e)}(this,tl),u(this,"type",void 0),Aa(this,Hs,void 0),Aa(this,Gs,void 0),Aa(this,qs,!1),Aa(this,Ks,[]),Aa(this,$s,void 0),Aa(this,Ys,void 0),Aa(this,Xs,void 0),Aa(this,Js,!1),Aa(this,Qs,void 0),Aa(this,Zs,void 0),Aa(this,el,!1);let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.type=e,e&&_a(Gs,this,!0),_a($s,this,t),_a(Hs,this,ka($s,this)?ka(Hs,ka($s,this)):this),_a(Qs,this,ka(Hs,this)===this?n:ka(Qs,ka(Hs,this))),_a(Xs,this,ka(Hs,this)===this?[]:ka(Xs,ka(Hs,this))),"!"!==e||ka(Js,ka(Hs,this))||ka(Xs,this).push(this),_a(Ys,this,ka($s,this)?ka(Ks,ka($s,this)).length:0)}get hasMagic(){if(void 0!==ka(Gs,this))return ka(Gs,this);for(const e of ka(Ks,this))if("string"!=typeof e&&(e.type||e.hasMagic))return _a(Gs,this,!0);return ka(Gs,this)}toString(){return void 0!==ka(Zs,this)?ka(Zs,this):this.type?_a(Zs,this,this.type+"("+ka(Ks,this).map(e=>String(e)).join("|")+")"):_a(Zs,this,ka(Ks,this).map(e=>String(e)).join(""))}push(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof nl&&ka($s,e)===this))throw new Error("invalid part: "+e);ka(Ks,this).push(e)}}toJSON(){var e;const t=null===this.type?ka(Ks,this).slice().map(e=>"string"==typeof e?e:e.toJSON()):[this.type,...ka(Ks,this).map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===ka(Hs,this)||ka(Js,ka(Hs,this))&&"!"===(null===(e=ka($s,this))||void 0===e?void 0:e.type))&&t.push({}),t}isStart(){var e;if(ka(Hs,this)===this)return!0;if(null===(e=ka($s,this))||void 0===e||!e.isStart())return!1;if(0===ka(Ys,this))return!0;const t=ka($s,this);for(let e=0;e<ka(Ys,this);e++){const n=ka(Ks,t)[e];if(!(n instanceof nl&&"!"===n.type))return!1}return!0}isEnd(){var e,t,n;if(ka(Hs,this)===this)return!0;if("!"===(null===(e=ka($s,this))||void 0===e?void 0:e.type))return!0;if(null===(t=ka($s,this))||void 0===t||!t.isEnd())return!1;if(!this.type)return null===(n=ka($s,this))||void 0===n?void 0:n.isEnd();const r=ka($s,this)?ka(Ks,ka($s,this)).length:0;return ka(Ys,this)===r-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new nl(this.type,e);for(const e of ka(Ks,this))t.copyIn(e);return t}static fromGlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new nl(null,void 0,t);return il.call(nl,e,n,0,t),n}toMMPattern(){if(this!==ka(Hs,this))return ka(Hs,this).toMMPattern();const e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||ka(Gs,this)||ka(Qs,this).nocase&&!ka(Qs,this).nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const o=(ka(Qs,this).nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp("^".concat(t,"$"),o),{_src:t,_glob:e})}get options(){return ka(Qs,this)}toRegExpSource(e){const t=null!=e?e:!!ka(Qs,this).dot;if(ka(Hs,this)===this&&Sa(tl,this,rl).call(this),!this.type){var n;const r=this.isStart()&&this.isEnd(),i=ka(Ks,this).map(t=>{const[n,i,o,a]="string"==typeof t?al.call(nl,t,ka(Gs,this),r):t.toRegExpSource(e);return _a(Gs,this,ka(Gs,this)||o),_a(qs,this,ka(qs,this)||a),n}).join("");let o="";if(this.isStart()&&"string"==typeof ka(Ks,this)[0]&&(1!==ka(Ks,this).length||!Bs.has(ka(Ks,this)[0]))){const n=Ds,r=t&&n.has(i.charAt(0))||i.startsWith("\\.")&&n.has(i.charAt(2))||i.startsWith("\\.\\.")&&n.has(i.charAt(4)),a=!t&&!e&&n.has(i.charAt(0));o=r?"(?!(?:^|/)\\.\\.?(?:$|/))":a?Ms:""}let a="";return this.isEnd()&&ka(Js,ka(Hs,this))&&"!"===(null===(n=ka($s,this))||void 0===n?void 0:n.type)&&(a="(?:$|\\/)"),[o+i+a,Os(i),_a(Gs,this,!!ka(Gs,this)),ka(qs,this)]}const r="*"===this.type||"+"===this.type,i="!"===this.type?"(?:(?!(?:":"(?:";let o=Sa(tl,this,ol).call(this,t);if(this.isStart()&&this.isEnd()&&!o&&"!"!==this.type){const e=this.toString();return _a(Ks,this,[e]),this.type=null,_a(Gs,this,void 0),[e,Os(this.toString()),!1,!1]}let a=!r||e||t?"":Sa(tl,this,ol).call(this,!0);a===o&&(a=""),a&&(o="(?:".concat(o,")(?:").concat(a,")*?"));let s="";return s="!"===this.type&&ka(el,this)?(this.isStart()&&!t?Ms:"")+Vs:i+o+("!"===this.type?"))"+(!this.isStart()||t||e?"":Ms)+Us+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&a?")":"*"===this.type&&a?")?":")".concat(this.type)),[s,Os(o),_a(Gs,this,!!ka(Gs,this)),ka(qs,this)]}}function rl(){if(this!==ka(Hs,this))throw new Error("should only call on root");if(ka(Js,this))return this;let e;for(this.toString(),_a(Js,this,!0);e=ka(Xs,this).pop();){if("!"!==e.type)continue;let t=e,n=ka($s,t);for(;n;){for(let r=ka(Ys,t)+1;!n.type&&r<ka(Ks,n).length;r++)for(const t of ka(Ks,e)){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(ka(Ks,n)[r])}t=n,n=ka($s,t)}}return this}function il(e,t,n,r){let i=!1,o=!1,a=-1,s=!1;if(null===t.type){let l=n,c="";for(;l<e.length;){const n=e.charAt(l++);if(i||"\\"===n)i=!i,c+=n;else if(o)l===a+1?"^"!==n&&"!"!==n||(s=!0):"]"!==n||l===a+2&&s||(o=!1),c+=n;else if("["!==n)if(r.noext||!zs(n)||"("!==e.charAt(l))c+=n;else{t.push(c),c="";const i=new Ta(n,t);l=il.call(Ta,e,i,l,r),t.push(i)}else o=!0,a=l,s=!1,c+=n}return t.push(c),l}let l=n+1,c=new Ta(null,t);const u=[];let d="";for(;l<e.length;){const n=e.charAt(l++);if(i||"\\"===n)i=!i,d+=n;else if(o)l===a+1?"^"!==n&&"!"!==n||(s=!0):"]"!==n||l===a+2&&s||(o=!1),d+=n;else if("["!==n)if(zs(n)&&"("===e.charAt(l)){c.push(d),d="";const t=new Ta(n,c);c.push(t),l=il.call(Ta,e,t,l,r)}else if("|"!==n){if(")"===n)return""===d&&0===ka(Ks,t).length&&_a(el,t,!0),c.push(d),d="",t.push(...u,c),l;d+=n}else c.push(d),d="",u.push(c),c=new Ta(null,t);else o=!0,a=l,s=!1,d+=n}return t.type=null,_a(Gs,t,void 0),_a(Ks,t,[e.substring(n-1)]),l}function ol(e){return ka(Ks,this).map(t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[n,r,i,o]=t.toRegExpSource(e);return _a(qs,this,ka(qs,this)||o),n}).filter(e=>!(this.isStart()&&this.isEnd()&&!e)).join("|")}function al(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,i="",o=!1;for(let a=0;a<e.length;a++){const s=e.charAt(a);if(r)r=!1,i+=(Fs.has(s)?"\\":"")+s;else if("\\"!==s){if("["===s){const[n,r,s,l]=Ns(e,a);if(s){i+=n,o=o||r,a+=s-1,t=t||l;continue}}"*"!==s?"?"!==s?i+=s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=Ws,t=!0):(i+=n&&"*"===e?Vs:Us,t=!0)}else a===e.length-1?i+="\\\\":r=!0}return[i,Os(e),!!t,o]}Ta=nl;const sl=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Is(t),!(!n.nocomment&&"#"===t.charAt(0))&&new Nl(t,n).match(e)},ll=/^\*+([^+@!?\*\[\(]*)$/,cl=e=>t=>!t.startsWith(".")&&t.endsWith(e),ul=e=>t=>t.endsWith(e),dl=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),hl=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),pl=/^\*+\.\*+$/,fl=e=>!e.startsWith(".")&&e.includes("."),gl=e=>"."!==e&&".."!==e&&e.includes("."),ml=/^\.\*+$/,vl=e=>"."!==e&&".."!==e&&e.startsWith("."),yl=/^\*+$/,bl=e=>0!==e.length&&!e.startsWith("."),wl=e=>0!==e.length&&"."!==e&&".."!==e,xl=/^\?+([^+@!?\*\[\(]*)?$/,Al=e=>{let[t,n=""]=e;const r=Tl([t]);return n?(n=n.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(n)):r},Sl=e=>{let[t,n=""]=e;const r=El([t]);return n?(n=n.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(n)):r},kl=e=>{let[t,n=""]=e;const r=El([t]);return n?e=>r(e)&&e.endsWith(n):r},_l=e=>{let[t,n=""]=e;const r=Tl([t]);return n?e=>r(e)&&e.endsWith(n):r},Tl=e=>{let[t]=e;const n=t.length;return e=>e.length===n&&!e.startsWith(".")},El=e=>{let[t]=e;const n=t.length;return e=>e.length===n&&"."!==e&&".."!==e},Cl="object"==typeof process&&process?{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_CLIENT:"userscript",REACT_APP_HOMEPAGE:"https://github.com/fishjar/kiss-translator",REACT_APP_LOGOURL:"https://fishjar.github.io/kiss-translator/images/logo192.png",REACT_APP_NAME:"KISS Translator",REACT_APP_NAME_CN:"简约翻译",REACT_APP_OPTIONSPAGE:"https://fishjar.github.io/kiss-translator/options.html",REACT_APP_OPTIONSPAGE_DEV:"http://localhost:3000/options.html",REACT_APP_RULESURL:"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json",REACT_APP_RULESURL_OFF:"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json",REACT_APP_RULESURL_ON:"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json",REACT_APP_USERSCRIPT_DOWNLOADURL:"https://fishjar.github.io/kiss-translator/kiss-translator.user.js",REACT_APP_USERSCRIPT_IOS_DOWNLOADURL:"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js",REACT_APP_VERSION:"2.0.22"}.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";sl.sep="win32"===Cl?"\\":"/";const Il=Symbol("globstar **");sl.GLOBSTAR=Il,sl.filter=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>sl(n,e,t)};const Pl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign({},e,t)};sl.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return sl;const t=sl;return Object.assign(function(n,r){return t(n,r,Pl(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))},{Minimatch:class extends t.Minimatch{constructor(t){super(t,Pl(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}static defaults(n){return t.defaults(Pl(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n){super(t,n,Pl(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}static fromGlob(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.AST.fromGlob(n,Pl(e,r))}},unescape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.unescape(n,Pl(e,r))},escape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.escape(n,Pl(e,r))},filter:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filter(n,Pl(e,r))},defaults:n=>t.defaults(Pl(e,n)),makeRe:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.makeRe(n,Pl(e,r))},braceExpand:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.braceExpand(n,Pl(e,r))},match:function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.match(n,r,Pl(e,i))},sep:t.sep,GLOBSTAR:Il})};const Ll=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Is(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Cs(e)};sl.braceExpand=Ll,sl.makeRe=function(e){return new Nl(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).makeRe()},sl.match=function(e,t){const n=new Nl(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return e=e.filter(e=>n.match(e)),n.options.nonull&&!e.length&&e.push(t),e};const Rl=/[?*]|[+@!]\(.*?\)|\[|\]/;class Nl{constructor(e){u(this,"options",void 0),u(this,"set",void 0),u(this,"pattern",void 0),u(this,"windowsPathsNoEscape",void 0),u(this,"nonegate",void 0),u(this,"negate",void 0),u(this,"comment",void 0),u(this,"empty",void 0),u(this,"preserveMultipleSlashes",void 0),u(this,"partial",void 0),u(this,"globSet",void 0),u(this,"globParts",void 0),u(this,"nocase",void 0),u(this,"isWindows",void 0),u(this,"platform",void 0),u(this,"windowsNoMagicRoot",void 0),u(this,"regexp",void 0);let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Is(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Cl,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&Rl.test(e[2])||Rl.test(e[3])),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>-1===e.indexOf(!1)),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)"**"===e[t][n]&&(e[t][n]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let n=t;for(;"**"===e[n+1];)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>0===(e=e.reduce((e,t)=>{const n=e[e.length-1];return"**"===t&&"**"===n?e:".."===t&&n&&".."!==n&&"."!==n&&"**"!==n?(e.pop(),e):(e.push(t),e)},[])).length?[""]:e)}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){const r=e[n];1===n&&""===r&&""===e[0]||"."!==r&&""!==r||(t=!0,e.splice(n,1),n--)}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let n=0;for(;-1!==(n=e.indexOf("..",n+1));){const r=e[n-1];r&&"."!==r&&".."!==r&&"**"!==r&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;-1!==(r=n.indexOf("**",r+1));){let i=r;for(;"**"===n[i+1];)i++;i>r&&n.splice(r+1,i-r);let o=n[r+1];const a=n[r+2],s=n[r+3];if(".."!==o)continue;if(!a||"."===a||".."===a||!s||"."===s||".."===s)continue;t=!0,n.splice(r,1);const l=n.slice(0);l[r]="**",e.push(l),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){const r=n[e];1===e&&""===r&&""===n[0]||"."!==r&&""!==r||(t=!0,n.splice(e,1),e--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(t=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const e=n[i-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===i&&"**"===n[i+1]?["."]:[];n.splice(i-1,2,...e),0===n.length&&n.push(""),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){const r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=0,i=0,o=[],a="";for(;r<e.length&&i<t.length;)if(e[r]===t[i])o.push("b"===a?t[i]:e[r]),r++,i++;else if(n&&"**"===e[r]&&t[i]===e[r+1])o.push(e[r]),r++;else if(n&&"**"===t[i]&&e[r]===t[i+1])o.push(t[i]),i++;else if("*"!==e[r]||!t[i]||!this.options.dot&&t[i].startsWith(".")||"**"===t[i]){if("*"!==t[i]||!e[r]||!this.options.dot&&e[r].startsWith(".")||"**"===e[r])return!1;if("a"===a)return!1;a="b",o.push(t[i]),r++,i++}else{if("b"===a)return!1;a="a",o.push(e[r]),r++,i++}return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let r=0;r<e.length&&"!"===e.charAt(r);r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.options;if(this.isWindows){const n="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),r=!n&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),i="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),o=r?3:n?0:void 0,a=!i&&""===t[0]&&""===t[1]&&"?"===t[2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])?3:i?0:void 0;if("number"==typeof o&&"number"==typeof a){const[n,r]=[e[o],t[a]];n.toLowerCase()===r.toLowerCase()&&(t[a]=n,a>o?t=t.slice(a):o>a&&(e=e.slice(o)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,a=0,s=e.length,l=t.length;o<s&&a<l;o++,a++){this.debug("matchOne loop");var c=t[a],u=e[o];if(this.debug(t,c,u),!1===c)return!1;if(c===Il){this.debug("GLOBSTAR",[t,c,u]);var d=o,h=a+1;if(h===l){for(this.debug("** at the end");o<s;o++)if("."===e[o]||".."===e[o]||!r.dot&&"."===e[o].charAt(0))return!1;return!0}for(;d<s;){var p=e[d];if(this.debug("\nglobstar while",e,d,t,h,p),this.matchOne(e.slice(d),t.slice(h),n))return this.debug("globstar found match!",d,s,p),!0;if("."===p||".."===p||!r.dot&&"."===p.charAt(0)){this.debug("dot detected!",e,d,t,h);break}this.debug("globstar swallow a segment, and continue"),d++}return!(!n||(this.debug("\n>>> no match, partial?",e,d,t,h),d!==s))}let i;if("string"==typeof c?(i=u===c,this.debug("string match",c,u,i)):(i=c.test(u),this.debug("pattern match",c,u,i)),!i)return!1}if(o===s&&a===l)return!0;if(o===s)return n;if(a===l)return o===s-1&&""===e[o];throw new Error("wtf?")}braceExpand(){return Ll(this.pattern,this.options)}parse(e){Is(e);const t=this.options;if("**"===e)return Il;if(""===e)return"";let n,r=null;(n=e.match(yl))?r=t.dot?wl:bl:(n=e.match(ll))?r=(t.nocase?t.dot?hl:dl:t.dot?ul:cl)(n[1]):(n=e.match(xl))?r=(t.nocase?t.dot?Sl:Al:t.dot?kl:_l)(n):(n=e.match(pl))?r=t.dot?gl:fl:(n=e.match(ml))&&(r=vl);const i=nl.fromGlob(e,this.options).toMMPattern();return r&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:r}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?"[^/]*?":t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=new Set(t.nocase?["i"]:[]);let i=e.map(e=>{const t=e.map(e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))r.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===Il?Il:e._src});return t.forEach((e,r)=>{const i=t[r+1],o=t[r-1];e===Il&&o!==Il&&(void 0===o?void 0!==i&&i!==Il?t[r+1]="(?:\\/|"+n+"\\/)?"+i:t[r]=n:void 0===i?t[r-1]=o+"(?:\\/|"+n+")?":i!==Il&&(t[r-1]=o+"(?:\\/|\\/"+n+"\\/)"+i,t[r+1]=Il))}),t.filter(e=>e!==Il).join("/")}).join("|");const[o,a]=e.length>1?["(?:",")"]:["",""];i="^"+o+i+a+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...r].join(""))}catch(e){this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.partial;if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;this.isWindows&&(e=e.split("\\").join("/"));const r=this.slashSplit(e);this.debug(this.pattern,"split",r);const i=this.set;this.debug(this.pattern,"set",i);let o=r[r.length-1];if(!o)for(let e=r.length-2;!o&&e>=0;e--)o=r[e];for(let e=0;e<i.length;e++){const a=i[e];let s=r;if(n.matchBase&&1===a.length&&(s=[o]),this.matchOne(s,a,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return sl.defaults(e).Minimatch}}function Ol(e){const t=new Error("".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"","Invalid response: ").concat(e.status," ").concat(e.statusText));return t.status=e.status,t.response=e,t}function jl(e,t){const{status:n}=t;if(401===n&&e.digest)return t;if(n>=400)throw Ol(t);return t}function zl(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?{data:t,headers:e.headers?gs(e.headers):{},status:e.status,statusText:e.statusText}:t}sl.AST=nl,sl.Minimatch=Nl,sl.escape=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},sl.unescape=Os;const Ml=(Dl=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Ts({url:Ha(e.remoteURL,Fa(t)),method:"COPY",headers:{Destination:Ha(e.remoteURL,Fa(n)),Overwrite:!1===r.overwrite?"F":"T",Depth:r.shallow?"0":"infinity"}},e,r);return a=function(t){jl(e,t)},(o=_s(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(Dl.apply(this,e))}catch(e){return Promise.reject(e)}});var Dl,Bl=Ia(635),Fl=Ia(829),Wl=Ia.n(Fl),Ul=function(e){return e.Array="array",e.Object="object",e.Original="original",e}(Ul||{});function Vl(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ul.Original;const r=Wl().get(e,t);return"array"===n&&!1===Array.isArray(r)?[r]:"object"===n&&Array.isArray(r)?r[0]:r}function Hl(e){return new Promise(t=>{t(function(e){const{multistatus:t}=e;if(""===t)return{multistatus:{response:[]}};if(!t)throw new Error("Invalid response: No root multistatus found");const n={multistatus:Array.isArray(t)?t[0]:t};return Wl().set(n,"multistatus.response",Vl(n,"multistatus.response",Ul.Array)),Wl().set(n,"multistatus.response",Wl().get(n,"multistatus.response").map(e=>function(e){const t=Object.assign({},e);return t.status?Wl().set(t,"status",Vl(t,"status",Ul.Object)):(Wl().set(t,"propstat",Vl(t,"propstat",Ul.Object)),Wl().set(t,"propstat.prop",Vl(t,"propstat.prop",Ul.Object))),t}(e))),n}(new Bl.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(e,t,n)=>"true"===t||"false"===t?"true"===t:t,tagValueProcessor(e,t,n){if(!n.endsWith("propstat.prop.displayname"))return t}}).parse(e)))})}function Gl(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{getlastmodified:r=null,getcontentlength:i="0",resourcetype:o=null,getcontenttype:a=null,getetag:s=null}=e,l=o&&"object"==typeof o&&void 0!==o.collection?"directory":"file",c={filename:t,basename:Ma().basename(t),lastmod:r,size:parseInt(i,10),type:l,etag:"string"==typeof s?s.replace(/"/g,""):null};return"file"===l&&(c.mime=a&&"string"==typeof a?a.split(";")[0]:""),n&&(void 0!==e.displayname&&(e.displayname=String(e.displayname)),c.props=e),c}function ql(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=null;try{e.multistatus.response[0].propstat&&(r=e.multistatus.response[0])}catch(e){}if(!r)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:i,status:o}}=r,[a,s,l]=o.split(" ",3),c=parseInt(s,10);if(c>=400){const e=new Error("Invalid response: ".concat(c," ").concat(l));throw e.status=c,e}return Gl(i,Ua(t),n)}function Kl(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function $l(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Yl=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,i=Ts({url:Ha(e.remoteURL,Fa(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,n);return $l(_s(i,e),function(n){return jl(e,n),$l(n.text(),function(e){return $l(Hl(e),function(e){const i=ql(e,t,r);return zl(n,i,r)})})})});function Xl(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Jl=Ql(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(e){if(!e||"/"===e)return[];let t=e;const n=[];do{n.push(t),t=Ma().dirname(t)}while(t&&"/"!==t);return n}(Ua(t));r.sort((e,t)=>e.length>t.length?1:t.length>e.length?-1:0);let i=!1;return function(e,t){if("function"==typeof e[tc]){var n,r,i,o=e[tc]();function c(e){try{for(;!(n=o.next()).done;)if((e=t(n.value))&&e.then){if(!ic(e))return void e.then(c,i||(i=nc.bind(null,r=new rc,2)));e=e.v}r?nc(r,1,e):r=e}catch(e){nc(r||(r=new rc),2,e)}}if(c(),o.return){var a=function(e){try{n.done||o.return()}catch(e){}return e};if(r&&r.then)return r.then(a,function(e){throw a(e)});a()}return r}if(!("length"in e))throw new TypeError("Object is not iterable");for(var s=[],l=0;l<e.length;l++)s.push(e[l]);return function(e,t,n){var r,i,o=-1;return function a(s){try{for(;++o<e.length&&(!n||!n());)if((s=t(o))&&s.then){if(!ic(s))return void s.then(a,i||(i=nc.bind(null,r=new rc,2)));s=s.v}r?nc(r,1,s):r=s}catch(e){nc(r||(r=new rc),2,e)}}(),r}(s,function(e){return t(s[e])},function(){return!1})}(r,function(r){return o=function(){return function(n,i){try{var o=Xl(Yl(e,r),function(e){if("directory"!==e.type)throw new Error("Path includes a file: ".concat(t))})}catch(e){return i(e)}return o&&o.then?o.then(void 0,i):o}(0,function(t){const o=t;return function(){if(404===o.status)return i=!0,ec(oc(e,r,h(h({},n),{},{recursive:!1})));throw t}()})},(a=function(){if(i)return ec(oc(e,r,h(h({},n),{},{recursive:!1})))}())&&a.then?a.then(o):o();var o,a})});function Ql(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function Zl(){}function ec(e,t){if(!t)return e&&e.then?e.then(Zl):Promise.resolve()}const tc="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function nc(e,t,n){if(!e.s){if(n instanceof rc){if(!n.s)return void(n.o=nc.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(nc.bind(null,e,t),nc.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}const rc=function(){function e(){}return e.prototype.then=function(t,n){const r=new e,i=this.s;if(i){const e=1&i?t:n;if(e){try{nc(r,1,e(this.v))}catch(e){nc(r,2,e)}return r}return this}return this.o=function(e){try{const i=e.v;1&e.s?nc(r,1,t?t(i):i):n?nc(r,1,n(i)):nc(r,2,i)}catch(e){nc(r,2,e)}},r},e}();function ic(e){return e instanceof rc&&1&e.s}const oc=Ql(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!0===n.recursive)return Jl(e,t,n);const r=Ts({url:Ha(e.remoteURL,(i=Fa(t),i.endsWith("/")?i:i+"/")),method:"MKCOL"},e,n);var i;return Xl(_s(r,e),function(t){jl(e,t)})});var ac=Ia(388),sc=Ia.n(ac);const lc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};if("object"==typeof n.range&&"number"==typeof n.range.start){let e="bytes=".concat(n.range.start,"-");"number"==typeof n.range.end&&(e="".concat(e).concat(n.range.end)),r.Range=e}const i=Ts({url:Ha(e.remoteURL,Fa(t)),method:"GET",headers:r},e,n);return a=function(t){if(jl(e,t),r.Range&&206!==t.status){const e=new Error("Invalid response code for partial request: ".concat(t.status));throw e.status=t.status,e}return n.callback&&setTimeout(()=>{n.callback(t)},0),t.body},(o=_s(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a}),cc=()=>{},uc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t,n){n.url||(n.url=Ha(e.remoteURL,Fa(t)));const r=Ts(n,e,{});return o=function(t){return jl(e,t),t},(i=_s(r,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}),dc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Ts({url:Ha(e.remoteURL,Fa(t)),method:"DELETE"},e,n);return o=function(t){jl(e,t)},(i=_s(r,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}),hc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r,i){try{var o=(a=Yl(e,t,n),s=function(){return!0},a&&a.then||(a=Promise.resolve(a)),s?a.then(s):a)}catch(e){return i(e)}var a,s;return o&&o.then?o.then(void 0,i):o}(0,function(e){if(404===e.status)return!1;throw e})});function pc(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const fc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Ts({url:Ha(e.remoteURL,Fa(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},e,n);return pc(_s(r,e),function(r){return jl(e,r),pc(r.text(),function(i){if(!i)throw new Error("Failed parsing directory contents: Empty response");return pc(Hl(i),function(i){const o=Wa(t);let a=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=Ma().join(t,"/"),{multistatus:{response:a}}=e,s=a.map(e=>{const t=function(e){try{return e.replace(/^https?:\/\/[^\/]+/,"")}catch(e){throw new ja(e,"Failed normalising HREF")}}(e.href),{propstat:{prop:n}}=e;return Gl(n,"/"===o?decodeURIComponent(Ua(t)):Ua(Ma().relative(decodeURIComponent(o),decodeURIComponent(t))),r)});return i?s:s.filter(e=>e.basename&&("file"===e.type||e.filename!==n.replace(/\/$/,"")))}(i,Wa(e.remoteBasePath||e.remotePath),o,n.details,n.includeSelf);return n.glob&&(a=function(e,t){return e.filter(e=>sl(e.filename,t,{matchBase:!0}))}(a,n.glob)),zl(r,a,n.details)})})})});function gc(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}const mc=gc(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Ts({url:Ha(e.remoteURL,Fa(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[wc]},e,n);return vc(_s(r,e),function(t){return jl(e,t),vc(t.text(),function(e){return zl(t,e,n.details)})})});function vc(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const yc=gc(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Ts({url:Ha(e.remoteURL,Fa(t)),method:"GET"},e,n);return vc(_s(r,e),function(t){let r;return jl(e,t),function(e,t){var n=e();return n&&n.then?n.then(t):t()}(function(){return vc(t.arrayBuffer(),function(e){r=e})},function(){return zl(t,r,n.details)})})}),bc=gc(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{format:r="binary"}=n;if("binary"!==r&&"text"!==r)throw new ja({info:{code:is.InvalidOutputFormat}},"Invalid output format: ".concat(r));return"text"===r?mc(e,t,n):yc(e,t,n)}),wc=e=>e;function xc(e){return new Bl.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Ac({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},"d"))}function Ac(e,t){const n=h({},e);for(const e in n)n.hasOwnProperty(e)&&(n[e]&&"object"==typeof n[e]&&-1===e.indexOf(":")?(n["".concat(t,":").concat(e)]=Ac(n[e],t),delete n[e]):!1===/^@_/.test(e)&&(n["".concat(t,":").concat(e)]=n[e],delete n[e]));return n}function Sc(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function kc(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}const _c=kc(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Ts({url:Ha(e.remoteURL,Fa(t)),method:"UNLOCK",headers:{"Lock-Token":n}},e,r);return Sc(_s(i,e),function(t){if(jl(e,t),204!==t.status&&200!==t.status)throw Ol(t)})}),Tc=kc(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{refreshToken:r,timeout:i=Ec}=n,o={Accept:"text/plain,application/xml",Timeout:i};r&&(o.If=r);const a=Ts({url:Ha(e.remoteURL,Fa(t)),method:"LOCK",headers:o,data:xc(e.contactHref)},e,n);return Sc(_s(a,e),function(t){return jl(e,t),Sc(t.text(),function(e){const n=(o=e,new Bl.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(o)),r=Wl().get(n,"prop.lockdiscovery.activelock.locktoken.href"),i=Wl().get(n,"prop.lockdiscovery.activelock.timeout");var o;if(!r)throw Ol(t,"No lock token received: ");return{token:r,serverTimeout:i}})})}),Ec="Infinite, Second-4100000000";function Cc(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Ic=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.path||"/",r=Ts({url:Ha(e.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return Cc(_s(r,e),function(n){return jl(e,n),Cc(n.text(),function(e){return Cc(Hl(e),function(e){const r=function(e){try{const[t]=e.multistatus.response,{propstat:{prop:{"quota-used-bytes":n,"quota-available-bytes":r}}}=t;return void 0!==n&&void 0!==r?{used:parseInt(String(n),10),available:Kl(r)}:null}catch(e){}return null}(e);return zl(n,r,t.details)})})})});function Pc(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Lc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,i=Ts({url:Ha(e.remoteURL,Fa(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":e.headers["Content-Type"]||"application/xml; charset=utf-8"}},e,n);return Pc(_s(i,e),function(n){return jl(e,n),Pc(n.text(),function(e){return Pc(Hl(e),function(e){const i=function(e,t,n){const r={truncated:!1,results:[]};return r.truncated=e.multistatus.response.some(e=>{var n,r;return"507"===(null===(n=(e.status||(null===(r=e.propstat)||void 0===r?void 0:r.status)).split(" ",3))||void 0===n?void 0:n[1])&&e.href.replace(/\/$/,"").endsWith(Fa(t).replace(/\/$/,""))}),e.multistatus.response.forEach(e=>{if(void 0===e.propstat)return;const t=e.href.split("/").map(decodeURIComponent).join("/");r.results.push(Gl(e.propstat.prop,t,n))}),r}(e,t,r);return zl(n,i,r)})})})}),Rc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Ts({url:Ha(e.remoteURL,Fa(t)),method:"MOVE",headers:{Destination:Ha(e.remoteURL,Fa(n)),Overwrite:!1===r.overwrite?"F":"T"}},e,r);return a=function(t){jl(e,t)},(o=_s(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a});var Nc=Ia(172);const Oc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{contentLength:i=!0,overwrite:o=!0}=r,a={"Content-Type":"application/octet-stream"};!1===i||(a["Content-Length"]="".concat("number"==typeof i?i:function(e){if(bs(e))return e.byteLength;if(ws(e))return e.length;if("string"==typeof e)return(0,Nc.d)(e);throw new ja({info:{code:is.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}(n))),o||(a["If-None-Match"]="*");const s=Ts({url:Ha(e.remoteURL,Fa(t)),method:"PUT",headers:a,data:n},e,r);return c=function(t){try{jl(e,t)}catch(e){const t=e;if(412!==t.status||o)throw t;return!1}return!0},(l=_s(s,e))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l;var l,c}),jc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Ts({url:Ha(e.remoteURL,Fa(t)),method:"OPTIONS"},e,n);return o=function(t){var n,r;try{jl(e,t)}catch(e){throw e}return{compliance:(null!==(n=t.headers.get("DAV"))&&void 0!==n?n:"").split(",").map(e=>e.trim()),server:null!==(r=t.headers.get("Server"))&&void 0!==r?r:""}},(i=_s(r,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o});function zc(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Mc=Fc(function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new ja({info:{code:is.InvalidUpdateRange}},"Invalid update range ".concat(n," for partial update"));const a={"Content-Type":"application/octet-stream","Content-Length":""+(r-n+1),"Content-Range":"bytes ".concat(n,"-").concat(r,"/*")},s=Ts({url:Ha(e.remoteURL,Fa(t)),method:"PUT",headers:a,data:i},e,o);return zc(_s(s,e),function(t){jl(e,t)})});function Dc(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const Bc=Fc(function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new ja({info:{code:is.InvalidUpdateRange}},"Invalid update range ".concat(n," for partial update"));const a={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(r-n+1),"X-Update-Range":"bytes=".concat(n,"-").concat(r)},s=Ts({url:Ha(e.remoteURL,Fa(t)),method:"PATCH",headers:a,data:i},e,o);return zc(_s(s,e),function(t){jl(e,t)})});function Fc(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}const Wc=Fc(function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return zc(jc(e,t,o),function(a){let s=!1;return Dc(function(){if(a.compliance.includes("sabredav-partialupdate"))return zc(Bc(e,t,n,r,i,o),function(e){return s=!0,e})},function(l){let c=!1;return s?l:Dc(function(){if(a.server.includes("Apache")&&a.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return zc(Mc(e,t,n,r,i,o),function(e){return c=!0,e})},function(e){if(c)return e;throw new ja({info:{code:is.NotSupported}},"Not supported")})})})}),Uc="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Vc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{authType:n=null,remoteBasePath:r,contactHref:i=Uc,ha1:o,headers:a={},httpAgent:s,httpsAgent:l,password:c,token:u,username:d,withCredentials:h}=t;let p=n;p||(p=d||c?rs.Password:rs.None);const f={authType:p,remoteBasePath:r,contactHref:i,ha1:o,headers:Object.assign({},a),httpAgent:s,httpsAgent:l,password:c,remotePath:Va(e),remoteURL:e,token:u,username:d,withCredentials:h};return os(f,d,c,u,o),{copyFile:(e,t,n)=>Ml(f,e,t,n),createDirectory:(e,t)=>oc(f,e,t),createReadStream:(e,t)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new(0,sc().PassThrough);return lc(e,t,n).then(e=>{e.pipe(r)}).catch(e=>{r.emit("error",e)}),r}(f,e,t),createWriteStream:(e,t,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:cc;const i=new(0,sc().PassThrough),o={};!1===n.overwrite&&(o["If-None-Match"]="*");const a=Ts({url:Ha(e.remoteURL,Fa(t)),method:"PUT",headers:o,data:i,maxRedirects:0},e,n);return _s(a,e).then(t=>jl(e,t)).then(e=>{setTimeout(()=>{r(e)},0)}).catch(e=>{i.emit("error",e)}),i}(f,e,t,n),customRequest:(e,t)=>uc(f,e,t),deleteFile:(e,t)=>dc(f,e,t),exists:(e,t)=>hc(f,e,t),getDirectoryContents:(e,t)=>fc(f,e,t),getFileContents:(e,t)=>bc(f,e,t),getFileDownloadLink:e=>function(e,t){let n=Ha(e.remoteURL,Fa(t));const r=/^https:/i.test(n)?"https":"http";switch(e.authType){case rs.None:break;case rs.Password:{const t=Ja(e.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,"".concat(r,"://").concat(t,"@"));break}default:throw new ja({info:{code:is.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(e.authType))}return n}(f,e),getFileUploadLink:e=>function(e,t){let n="".concat(Ha(e.remoteURL,Fa(t)),"?Content-Type=application/octet-stream");const r=/^https:/i.test(n)?"https":"http";switch(e.authType){case rs.None:break;case rs.Password:{const t=Ja(e.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,"".concat(r,"://").concat(t,"@"));break}default:throw new ja({info:{code:is.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(e.authType))}return n}(f,e),getHeaders:()=>Object.assign({},f.headers),getQuota:e=>Ic(f,e),lock:(e,t)=>Tc(f,e,t),moveFile:(e,t,n)=>Rc(f,e,t,n),putFileContents:(e,t,n)=>Oc(f,e,t,n),partialUpdateFileContents:(e,t,n,r,i)=>Wc(f,e,t,n,r,i),getDAVCompliance:e=>jc(f,e),search:(e,t)=>Lc(f,e,t),setHeaders:e=>{f.headers=Object.assign({},e)},stat:(e,t)=>Yl(f,e,t),unlock:(e,t,n)=>_c(f,e,t,n)}}var Hc=Pa.UU;(0,Pa.Gu)().patch("request",e=>Ei(e.url,{method:e.method,headers:e.headers,body:e.data}));const Gc=async(e,t)=>{let{syncUrl:n,syncKey:r}=t;return n=Fn(n,"/"),await(async(e,t,n)=>Pi(e,{headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(await Dn(t,"KISS-Translator-SYNC"))},method:"POST",body:JSON.stringify(n)}))("".concat(n,"/sync"),r,e)},qc=async e=>{const t="kiss translator sync files",n=await(async e=>Pi("".concat(la,"?per_page=100"),{method:"GET",headers:ca(e)}))(e);return n.some(e=>e.description===t)?"".concat(t,"-").concat(Date.now()):t},Kc=async(e,t)=>{var n,r;let{syncUrl:i,syncKey:o}=t;const a=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim();if(!e)return"";try{const t=new URL(e).pathname.split("/").filter(Boolean);return t[t.length-1]||""}catch(t){return e}}(i),s=(l=e.key).startsWith("kiss-rules_")?"sync-rules_".concat(l):l===Vt?"sync-words_".concat(l):l;var l;const c=JSON.stringify(e,null,2);if(!a){const t=await(async(e,t,n)=>Pi(la,{method:"POST",headers:ca(e),body:JSON.stringify({description:n,public:!1,files:{[t.key]:{content:t.content}}})}))(o,{key:s,content:c},await qc(o));return await hr({syncUrl:t.id}),e}const u=await(async(e,t)=>Pi("".concat(la,"/").concat(e),{method:"GET",headers:ca(t)}))(a,o),d=(null===(n=u.files)||void 0===n?void 0:n[s])||(null===(r=u.files)||void 0===r?void 0:r[e.key]);if(d){const t=d.content||await(h=d.raw_url,Pi(h,void 0,{expect:"text"})),n=JSON.parse(t);if(n.updateAt>=e.updateAt)return n}var h;return await(async(e,t,n,r)=>Pi("".concat(la,"/").concat(e),{method:"PATCH",headers:ca(t),body:JSON.stringify({files:{[n]:{content:r}}})}))(a,o,s,c),e},$c=async(e,t)=>{const{syncType:r,syncUrl:i,syncUser:o,syncKey:a,syncMeta:s={}}=await dr();if(!a||r!==wt&&!i||r===bt&&!o)return;let{updateAt:l=0,syncAt:c=0}=s[e]||{};0===c&&(l=0);const u={key:e,value:JSON.stringify(t),updateAt:l},d={syncUrl:i,syncUser:o,syncKey:a},h=r===bt?await(async(e,t)=>{let{syncUrl:r,syncUser:i,syncKey:o}=t;const a=Hc(r,{username:i,password:o}),s="/".concat(n),l="/".concat(n,"/").concat(e.key);if(!1===await a.exists(s)&&await a.createDirectory(s),await a.exists(l)){const t=await a.getFileContents(l,{format:"text"}),n=JSON.parse(t);if(n.updateAt>=e.updateAt)return n}return await a.putFileContents(l,JSON.stringify(e,null,2)),e})(u,d):r===wt?await Kc(u,d):await Gc(u,d);if(!h)throw new Error("sync data got err",e);const p=JSON.parse(h.value),f=h.updateAt>l;return s[e]={updateAt:h.updateAt,syncAt:Date.now()},await hr({syncMeta:s}),{value:p,isNew:f}},Yc=async()=>{const e=await ir(),t=await $c(Ut,e);null!=t&&t.isNew&&await or(t.value)},Xc=async()=>{try{await Yc()}catch(e){pt("sync user rules",e.message)}};const Jc=(e,t)=>e.find(e=>e.pattern!==Ze&&e.pattern.split(/\n|,/).some(e=>zn(t,e.trim()))),Qc=(e,t)=>{if(!t)return h({},e);if(!e)return h({},t);const n=h({},e);return["selector","keepSelector","blockSelector","rootsSelector","ignoreSelector"].forEach(r=>{n[r]=function(e,t){if(!t||!t.trim())return e;const n=e.split(",").map(e=>e.trim()).filter(Boolean),r=t.split(",").map(e=>e.trim()).filter(Boolean),i=r.some(e=>e.startsWith("+")||e.startsWith("-"));if(!i)return[...new Set(r)].join(", ");let o=new Set(n),a="add";return r.forEach(e=>{let t=e;e.startsWith("+")?(a="add",t=e.slice(1).trim()):e.startsWith("-")&&(a="remove",t=e.slice(1).trim()),t&&("remove"===a?o.delete(t):o.add(t))}),[...o].join(", ")}(e[r]||"",t[r]||"")}),["terms","aiTerms","termsStyle","highlightStyle","textExtStyle","selectStyle","parentStyle","grandStyle","injectJs","injectCss","transStartHook","transEndHook"].forEach(e=>{var r;null!==(r=t[e])&&void 0!==r&&r.trim()&&(n[e]=t[e])}),["apiSlug","fromLang","toLang","transOpen","transOnly","transOnlyRevert","transOrder","autoScan","hasRichText","hasShadowroot","scanAll","transTag","transTitle","splitParagraph","highlightWords","textStyle"].forEach(e=>{t[e]&&t[e]!==Ze&&(n[e]=t[e])}),["splitLength","transOnlyRevertDelay"].forEach(e=>{t[e]&&t[e]!==Ze&&(n[e]=t[e])}),t.pattern&&(n.pattern=t.pattern),n},Zc=async(e,t)=>{let{injectRules:n,subrulesList:r}=t;const i=await ir(),o=h(h({},ct),i.find(e=>e.pattern===Ze)||{}),a=Jc(i,e);let s=null;if(n)try{const t=r.find(e=>e.selected);if(null!=t&&t.url){const n=await(async e=>{let t=await sr(e);return t&&0!==t.length||(t=await ba(e),await ya(e)),t||[]})(t.url);s=Jc(n,e);try{const e=await(async e=>{if(!e)return[];const t=await er(Zt);if(!t)return[];if("object"==typeof t){const n=t[e];return Array.isArray(n)?n:[]}return[]})(t.url);s&&e.includes(s.pattern)&&(s=null)}catch(e){pt("getDisabledSubRules",e)}}}catch(e){pt("load injectRules",e)}if(!a&&!s)return o;let l=h({},o);return l=Qc(l,s),l=Qc(l,a),l},eu=e=>{if("string"===Mn(e)&&(e=JSON.parse(e)),"array"!==Mn(e))throw new Error("data error");const t=ge.map(e=>e[0]),n=pe.map(e=>e[0]),r=new Set;return e=e.filter(e=>"object"===Mn(e)).filter(e=>{let{pattern:t}=e;return"string"===Mn(t)&&!r.has(t.trim())&&(r.add(t.trim()),!0)}).map(e=>{let{pattern:r,selector:i,keepSelector:o,blockSelector:a,rootsSelector:s,ignoreSelector:l,terms:c,aiTerms:u,termsStyle:d,highlightStyle:h,textExtStyle:p,selectStyle:f,parentStyle:g,grandStyle:m,injectJs:v,injectCss:y,apiSlug:b,fromLang:w,toLang:x,textStyle:A,transOpen:S,transOnly:k,transOnlyRevert:_,transOnlyRevertDelay:T,transOrder:E,autoScan:C,hasRichText:I,hasShadowroot:P,scanAll:L,transTag:R,transTitle:N,transStartHook:O,transEndHook:j,splitParagraph:z,splitLength:M,highlightWords:D}=e;return{pattern:r.trim(),selector:"string"===Mn(i)?i:"",keepSelector:"string"===Mn(o)?o:"",blockSelector:"string"===Mn(a)?a:"",rootsSelector:"string"===Mn(s)?s:"",ignoreSelector:"string"===Mn(l)?l:"",terms:"string"===Mn(c)?c:"",aiTerms:"string"===Mn(u)?u:"",termsStyle:"string"===Mn(d)?d:"",highlightStyle:"string"===Mn(h)?h:"",textExtStyle:"string"===Mn(p)?p:"",selectStyle:"string"===Mn(f)?f:"",parentStyle:"string"===Mn(g)?g:"",grandStyle:"string"===Mn(m)?m:"",injectJs:"string"===Mn(v)?v:"",injectCss:"string"===Mn(y)?y:"",apiSlug:"string"===Mn(b)&&""!==b.trim()?b.trim():Ze,fromLang:Rn([Ze,...t],w),toLang:Rn([Ze,...n],x),textStyle:"string"===Mn(A)&&""!==A.trim()?A.trim():Ze,transOpen:Rn([Ze,"true","false"],S),transOnly:Rn([Ze,"true","false"],k),transOnlyRevert:Rn([Ze,"true","false"],_),transOnlyRevertDelay:"string"!==Mn(T)||isNaN(parseFloat(T))?Ze:T,transOrder:Rn([Ze,"original-first","translation-first"],E),autoScan:Rn([Ze,"true","false"],C),hasRichText:Rn([Ze,"true","false"],I),hasShadowroot:Rn([Ze,"true","false"],P),scanAll:Rn([Ze,"true","false"],L),transTag:Rn([Ze,"span","font"],R),transTitle:Rn([Ze,"true","false"],N),transStartHook:"string"===Mn(O)?O:"",transEndHook:"string"===Mn(j)?j:"",splitParagraph:Rn([Ze,...rt],z),splitLength:Number.isInteger(M)?M:0,highlightWords:Rn([Ze,...st],D)}}),e},tu=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split(/\n|,/).some(t=>zn(e,t.trim()))},{entries:nu,setPrototypeOf:ru,isFrozen:iu,getPrototypeOf:ou,getOwnPropertyDescriptor:au}=Object;let{freeze:su,seal:lu,create:cu}=Object,{apply:uu,construct:du}="undefined"!=typeof Reflect&&Reflect;su||(su=function(e){return e}),lu||(lu=function(e){return e}),uu||(uu=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),du||(du=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const hu=Eu(Array.prototype.forEach),pu=Eu(Array.prototype.lastIndexOf),fu=Eu(Array.prototype.pop),gu=Eu(Array.prototype.push),mu=Eu(Array.prototype.splice),vu=Eu(String.prototype.toLowerCase),yu=Eu(String.prototype.toString),bu=Eu(String.prototype.match),wu=Eu(String.prototype.replace),xu=Eu(String.prototype.indexOf),Au=Eu(String.prototype.trim),Su=Eu(Object.prototype.hasOwnProperty),ku=Eu(RegExp.prototype.test),_u=(Tu=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return du(Tu,t)});var Tu;function Eu(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return uu(e,t,r)}}function Cu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vu;ru&&ru(e,null);let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(iu(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Iu(e){for(let t=0;t<e.length;t++){Su(e,t)||(e[t]=null)}return e}function Pu(e){const t=cu(null);for(const[n,r]of nu(e)){Su(e,n)&&(Array.isArray(r)?t[n]=Iu(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=Pu(r):t[n]=r)}return t}function Lu(e,t){for(;null!==e;){const n=au(e,t);if(n){if(n.get)return Eu(n.get);if("function"==typeof n.value)return Eu(n.value)}e=ou(e)}return function(){return null}}const Ru=su(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Nu=su(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ou=su(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ju=su(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),zu=su(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Mu=su(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Du=su(["#text"]),Bu=su(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Fu=su(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Wu=su(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Uu=su(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vu=lu(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Hu=lu(/<%[\w\W]*|[\w\W]*%>/gm),Gu=lu(/\$\{[\w\W]*/gm),qu=lu(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ku=lu(/^aria-[\-\w]+$/),$u=lu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yu=lu(/^(?:\w+script|data):/i),Xu=lu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ju=lu(/^html$/i),Qu=lu(/^[a-z][.\w]*(-[.\w]+)+$/i);var Zu=Object.freeze({__proto__:null,ARIA_ATTR:Ku,ATTR_WHITESPACE:Xu,CUSTOM_ELEMENT:Qu,DATA_ATTR:qu,DOCTYPE_NAME:Ju,ERB_EXPR:Hu,IS_ALLOWED_URI:$u,IS_SCRIPT_OR_DATA:Yu,MUSTACHE_EXPR:Vu,TMPLIT_EXPR:Gu});const ed=1,td=3,nd=7,rd=8,id=9,od=function(){return"undefined"==typeof window?null:window};var ad=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:od();const n=t=>e(t);if(n.version="3.4.0",n.removed=[],!t||!t.document||t.document.nodeType!==id||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const i=r,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:f}=t,g=c.prototype,m=Lu(g,"cloneNode"),v=Lu(g,"remove"),y=Lu(g,"nextSibling"),b=Lu(g,"childNodes"),w=Lu(g,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let x,A="";const{implementation:S,createNodeIterator:k,createDocumentFragment:_,getElementsByTagName:T}=r,{importNode:E}=i;let C={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof nu&&"function"==typeof w&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:P,TMPLIT_EXPR:L,DATA_ATTR:R,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:j,CUSTOM_ELEMENT:z}=Zu;let{IS_ALLOWED_URI:M}=Zu,D=null;const B=Cu({},[...Ru,...Nu,...Ou,...zu,...Du]);let F=null;const W=Cu({},[...Bu,...Fu,...Wu,...Uu]);let U=Object.seal(cu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,H=null;const G=Object.seal(cu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let q=!0,K=!0,$=!1,Y=!0,X=!1,J=!0,Q=!1,Z=!1,ee=!1,te=!1,ne=!1,re=!1,ie=!0,oe=!1,ae=!0,se=!1,le={},ce=null;const ue=Cu({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const he=Cu({},["audio","video","img","source","image","track"]);let pe=null;const fe=Cu({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml";let ye=ve,be=!1,we=null;const xe=Cu({},[ge,me,ve],yu);let Ae=Cu({},["mi","mo","mn","ms","mtext"]),Se=Cu({},["annotation-xml"]);const ke=Cu({},["title","style","font","a","script"]);let _e=null;const Te=["application/xhtml+xml","text/html"];let Ee=null,Ce=null;const Ie=r.createElement("form"),Pe=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&"object"==typeof e||(e={}),e=Pu(e),_e=-1===Te.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===_e?yu:vu,D=Su(e,"ALLOWED_TAGS")?Cu({},e.ALLOWED_TAGS,Ee):B,F=Su(e,"ALLOWED_ATTR")?Cu({},e.ALLOWED_ATTR,Ee):W,we=Su(e,"ALLOWED_NAMESPACES")?Cu({},e.ALLOWED_NAMESPACES,yu):xe,pe=Su(e,"ADD_URI_SAFE_ATTR")?Cu(Pu(fe),e.ADD_URI_SAFE_ATTR,Ee):fe,de=Su(e,"ADD_DATA_URI_TAGS")?Cu(Pu(he),e.ADD_DATA_URI_TAGS,Ee):he,ce=Su(e,"FORBID_CONTENTS")?Cu({},e.FORBID_CONTENTS,Ee):ue,V=Su(e,"FORBID_TAGS")?Cu({},e.FORBID_TAGS,Ee):Pu({}),H=Su(e,"FORBID_ATTR")?Cu({},e.FORBID_ATTR,Ee):Pu({}),le=!!Su(e,"USE_PROFILES")&&e.USE_PROFILES,q=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,$=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,X=e.SAFE_FOR_TEMPLATES||!1,J=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,re=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,M=e.ALLOWED_URI_REGEXP||$u,ye=e.NAMESPACE||ve,Ae=e.MATHML_TEXT_INTEGRATION_POINTS||Ae,Se=e.HTML_INTEGRATION_POINTS||Se,U=e.CUSTOM_ELEMENT_HANDLING||cu(null),e.CUSTOM_ELEMENT_HANDLING&&Pe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Pe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(U.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(K=!1),ne&&(te=!0),le&&(D=Cu({},Du),F=cu(null),!0===le.html&&(Cu(D,Ru),Cu(F,Bu)),!0===le.svg&&(Cu(D,Nu),Cu(F,Fu),Cu(F,Uu)),!0===le.svgFilters&&(Cu(D,Ou),Cu(F,Fu),Cu(F,Uu)),!0===le.mathMl&&(Cu(D,zu),Cu(F,Wu),Cu(F,Uu))),G.tagCheck=null,G.attributeCheck=null,e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?G.tagCheck=e.ADD_TAGS:(D===B&&(D=Pu(D)),Cu(D,e.ADD_TAGS,Ee))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?G.attributeCheck=e.ADD_ATTR:(F===W&&(F=Pu(F)),Cu(F,e.ADD_ATTR,Ee))),e.ADD_URI_SAFE_ATTR&&Cu(pe,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(ce===ue&&(ce=Pu(ce)),Cu(ce,e.FORBID_CONTENTS,Ee)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=Pu(ce)),Cu(ce,e.ADD_FORBID_CONTENTS,Ee)),ae&&(D["#text"]=!0),Q&&Cu(D,["html","head","body"]),D.table&&(Cu(D,["tbody"]),delete V.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _u('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _u('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,A=x.createHTML("")}else void 0===x&&(x=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(f,o)),null!==x&&"string"==typeof A&&(A=x.createHTML(""));su&&su(e),Ce=e}},Re=Cu({},[...Nu,...Ou,...ju]),Ne=Cu({},[...zu,...Mu]),Oe=function(e){gu(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){v(e)}},je=function(e,t){try{gu(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){gu(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{Oe(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ze=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=bu(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===_e&&ye===ve&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=x?x.createHTML(e):e;if(ye===ve)try{t=(new p).parseFromString(i,_e)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(ye,"template",null);try{t.documentElement.innerHTML=be?A:i}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),ye===ve?T.call(t,Q?"html":"body")[0]:Q?t.documentElement:o},Me=function(e){return k.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},De=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"function"==typeof l&&e instanceof l};function Fe(e,t,r){hu(e,e=>{e.call(n,t,r,Ce)})}const We=function(e){let t=null;if(Fe(C.beforeSanitizeElements,e,null),De(e))return Oe(e),!0;const r=Ee(e.nodeName);if(Fe(C.uponSanitizeElement,e,{tagName:r,allowedTags:D}),J&&e.hasChildNodes()&&!Be(e.firstElementChild)&&ku(/<[/\w!]/g,e.innerHTML)&&ku(/<[/\w!]/g,e.textContent))return Oe(e),!0;if(J&&e.namespaceURI===ve&&"style"===r&&Be(e.firstElementChild))return Oe(e),!0;if(e.nodeType===nd)return Oe(e),!0;if(J&&e.nodeType===rd&&ku(/<[/\w]/g,e.data))return Oe(e),!0;if(V[r]||!(G.tagCheck instanceof Function&&G.tagCheck(r))&&!D[r]){if(!V[r]&&Ve(r)){if(U.tagNameCheck instanceof RegExp&&ku(U.tagNameCheck,r))return!1;if(U.tagNameCheck instanceof Function&&U.tagNameCheck(r))return!1}if(ae&&!ce[r]){const t=w(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const i=m(n[r],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,y(e))}}}return Oe(e),!0}return e instanceof c&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=vu(e.tagName),r=vu(t.tagName);return!!we[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ve?"svg"===n:t.namespaceURI===ge?"svg"===n&&("annotation-xml"===r||Ae[r]):Boolean(Re[n]):e.namespaceURI===ge?t.namespaceURI===ve?"math"===n:t.namespaceURI===me?"math"===n&&Se[r]:Boolean(Ne[n]):e.namespaceURI===ve?!(t.namespaceURI===me&&!Se[r])&&!(t.namespaceURI===ge&&!Ae[r])&&!Ne[n]&&(ke[n]||!Re[n]):!("application/xhtml+xml"!==_e||!we[e.namespaceURI]))}(e)?(Oe(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!ku(/<\/no(script|embed|frames)/i,e.innerHTML)?(X&&e.nodeType===td&&(t=e.textContent,hu([I,P,L],e=>{t=wu(t,e," ")}),e.textContent!==t&&(gu(n.removed,{element:e.cloneNode()}),e.textContent=t)),Fe(C.afterSanitizeElements,e,null),!1):(Oe(e),!0)},Ue=function(e,t,n){if(H[t])return!1;if(ie&&("id"===t||"name"===t)&&(n in r||n in Ie))return!1;if(K&&!H[t]&&ku(R,t));else if(q&&ku(N,t));else if(G.attributeCheck instanceof Function&&G.attributeCheck(t,e));else if(!F[t]||H[t]){if(!(Ve(e)&&(U.tagNameCheck instanceof RegExp&&ku(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&ku(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t,e))||"is"===t&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&ku(U.tagNameCheck,n)||U.tagNameCheck instanceof Function&&U.tagNameCheck(n))))return!1}else if(pe[t]);else if(ku(M,wu(n,j,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==xu(n,"data:")||!de[e]){if($&&!ku(O,wu(n,j,"")));else if(n)return!1}else;return!0},Ve=function(e){return"annotation-xml"!==e&&bu(e,z)},He=function(e){Fe(C.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||De(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:s,value:l}=o,c=Ee(a),u=l;let d="value"===a?u:Au(u);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,Fe(C.uponSanitizeAttribute,e,r),d=r.attrValue,!oe||"id"!==c&&"name"!==c||(je(a,e),d="user-content-"+d),J&&ku(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){je(a,e);continue}if("attributename"===c&&bu(d,"href")){je(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){je(a,e);continue}if(!Y&&ku(/\/>/i,d)){je(a,e);continue}X&&hu([I,P,L],e=>{d=wu(d,e," ")});const h=Ee(e.nodeName);if(Ue(h,c,d)){if(x&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(s);else switch(f.getAttributeType(h,c)){case"TrustedHTML":d=x.createHTML(d);break;case"TrustedScriptURL":d=x.createScriptURL(d)}if(d!==u)try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),De(e)?Oe(e):fu(n.removed)}catch(t){je(a,e)}}else je(a,e)}Fe(C.afterSanitizeAttributes,e,null)},Ge=function(e){let t=null;const n=Me(e);for(Fe(C.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)Fe(C.uponSanitizeShadowNode,t,null),We(t),He(t),t.content instanceof a&&Ge(t.content);Fe(C.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,c=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Be(e)){if("function"!=typeof e.toString)throw _u("toString is not a function");if("string"!=typeof(e=e.toString()))throw _u("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Le(t),n.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){const t=Ee(e.nodeName);if(!D[t]||V[t])throw _u("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=ze("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),o.nodeType===ed&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!te&&!X&&!Q&&-1===e.indexOf("<"))return x&&re?x.createHTML(e):e;if(r=ze(e),!r)return te?null:re?A:""}r&&ee&&Oe(r.firstChild);const u=Me(se?e:r);for(;s=u.nextNode();)We(s),He(s),s.content instanceof a&&Ge(s.content);if(se)return e;if(te){if(X){r.normalize();let e=r.innerHTML;hu([I,P,L],t=>{e=wu(e,t," ")}),r.innerHTML=e}if(ne)for(c=_.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(F.shadowroot||F.shadowrootmode)&&(c=E.call(i,c,!0)),c}let d=Q?r.outerHTML:r.innerHTML;return Q&&D["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&ku(Ju,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),X&&hu([I,P,L],e=>{d=wu(d,e," ")}),x&&re?x.createHTML(d):d},n.setConfig=function(){Le(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){Ce=null,Z=!1},n.isValidAttribute=function(e,t,n){Ce||Le({});const r=Ee(e),i=Ee(t);return Ue(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&gu(C[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=pu(C[e],t);return-1===n?void 0:mu(C[e],n,1)[0]}return fu(C[e])},n.removeHooks=function(e){C[e]=[]},n.removeAllHooks=function(){C={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const sd=(()=>{const e="kiss-translator-policy";let t=null;if(globalThis.trustedTypes&&globalThis.trustedTypes.createPolicy)try{t=globalThis.trustedTypes.createPolicy(e,{createHTML:e=>ad.sanitize(e),createScript:e=>e,createScriptURL:e=>e})}catch(n){n.message.includes("already exists")?t=globalThis.trustedTypes.policies.get(e):ht.info("cont create Trusted Types",n)}return{createHTML:e=>t?t.createHTML(e):e,createScript:e=>t?t.createScript(e):e,createScriptURL:e=>t?t.createScriptURL(e):e,isEnabled:()=>null!==t}})(),ld=(()=>{try{if("undefined"==typeof navigator)return!1;const e=navigator.userAgent,t=/Android/i.test(e),n=/iPhone|iPad|iPod/i.test(e),r=/Macintosh/i.test(e)&&navigator.maxTouchPoints>1;return t||n||r}catch(e){return!1}})();function cd(e){return!0===e?cd(arguments.length>1&&void 0!==arguments[1]?arguments[1]:It):!1===e?"off":"on"===e||"off"===e||e===It?e:It}function ud(e,t){const n=cd(e,t);return"on"===n||n===It&&!ld}var dd=Ir("videoEl"),hd=Ir("formattedSubtitles"),pd=Ir("captionWindowEl"),fd=Ir("captionDragged"),gd=Ir("paperEl"),md=Ir("currentSubtitleIndex"),vd=Ir("setting"),yd=Ir("isAdPlaying"),bd=Ir("throttledTriggerTranslations"),wd=Ir("tooltipEl"),xd=Ir("hoverTimeout"),Ad=Ir("seekSyncRafId"),Sd=Ir("translationSessionId"),kd=Ir("abortController"),_d=Ir("wasPlayingBeforeHover"),Td=Ir("hoverTarget"),Ed=Ir("playerControlBarObserver"),Cd=Ir("isHoverLookupEnabled"),Id=Ir("observePlayerControlBar"),Pd=Ir("createCaptionWindow"),Ld=Ir("handleWordHover"),Rd=Ir("handleWordHoverOut"),Nd=Ir("handleWordMouseMove"),Od=Ir("attachSpanListeners"),jd=Ir("showWordTooltip"),zd=Ir("hideWordTooltip"),Md=Ir("enableDragging"),Dd=Ir("attachEventListeners"),Bd=Ir("removeEventListeners"),Fd=Ir("scheduleSeekSettledSync"),Wd=Ir("syncToCurrentTime"),Ud=Ir("findSubtitleIndexForTime"),Vd=Ir("updateCaptionDisplay"),Hd=Ir("wrapWordsWithSpans"),Gd=Ir("triggerTranslations"),qd=Ir("translateAndStore"),Kd=Ir("getCurrentSubtitleStartTime");class $d{constructor(e){var t;let{videoEl:n,formattedSubtitles:r,setting:i}=e;Object.defineProperty(this,Kd,{value:fh}),Object.defineProperty(this,qd,{value:ph}),Object.defineProperty(this,Gd,{value:hh}),Object.defineProperty(this,Hd,{value:dh}),Object.defineProperty(this,Vd,{value:uh}),Object.defineProperty(this,Ud,{value:ch}),Object.defineProperty(this,Wd,{value:lh}),Object.defineProperty(this,Fd,{value:sh}),Object.defineProperty(this,Bd,{value:ah}),Object.defineProperty(this,Dd,{value:oh}),Object.defineProperty(this,Md,{value:ih}),Object.defineProperty(this,zd,{value:rh}),Object.defineProperty(this,jd,{value:nh}),Object.defineProperty(this,Od,{value:th}),Object.defineProperty(this,Nd,{value:eh}),Object.defineProperty(this,Rd,{value:Zd}),Object.defineProperty(this,Ld,{value:Qd}),Object.defineProperty(this,Pd,{value:Jd}),Object.defineProperty(this,Id,{value:Xd}),Object.defineProperty(this,Cd,{value:Yd}),Object.defineProperty(this,dd,{writable:!0,value:void 0}),Object.defineProperty(this,hd,{writable:!0,value:[]}),Object.defineProperty(this,pd,{writable:!0,value:null}),Object.defineProperty(this,fd,{writable:!0,value:!1}),Object.defineProperty(this,gd,{writable:!0,value:null}),Object.defineProperty(this,md,{writable:!0,value:-1}),Object.defineProperty(this,vd,{writable:!0,value:{}}),Object.defineProperty(this,yd,{writable:!0,value:!1}),Object.defineProperty(this,bd,{writable:!0,value:void 0}),Object.defineProperty(this,wd,{writable:!0,value:null}),Object.defineProperty(this,xd,{writable:!0,value:null}),Object.defineProperty(this,Ad,{writable:!0,value:null}),Object.defineProperty(this,Sd,{writable:!0,value:0}),Object.defineProperty(this,kd,{writable:!0,value:null}),Object.defineProperty(this,_d,{writable:!0,value:!1}),Object.defineProperty(this,Td,{writable:!0,value:null}),Object.defineProperty(this,Ed,{writable:!0,value:null}),Er(this,vd)[vd]=i,Er(this,dd)[dd]=n,Er(this,hd)[hd]=r,Er(this,kd)[kd]=new AbortController,this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onSeeking=this.onSeeking.bind(this),this.onSeek=this.onSeek.bind(this),Er(this,bd)[bd]=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{leading:!0,trailing:!0},i=null,o=null,a=null,s=0;function l(){s=!1===r.leading?0:Date.now(),i=null,n=e.apply(a,o),i||(a=o=null)}const c=function(){const c=Date.now();s||!1!==r.leading||(s=c);const u=t-(c-s);for(var d=arguments.length,h=new Array(d),p=0;p<d;p++)h[p]=arguments[p];return o=h,a=this,u<=0||u>t?(i&&(clearTimeout(i),i=null),s=c,n=e.apply(a,o),i||(a=o=null)):i||!1===r.trailing||(i=setTimeout(l,u)),n};return c.cancel=()=>{clearTimeout(i),s=0,i=null,a=o=null},c}(Er(this,Gd)[Gd].bind(this),1e3*(null!==(t=i.throttleTrans)&&void 0!==t?t:30)),Er(this,Cd)[Cd]()&&(()=>{if(document.getElementById("kiss-word-hover-styles"))return;const e=document.createElement("style");e.id="kiss-word-hover-styles",e.textContent="\n    /* 鼠标 hover 的单词样式:呈现下划线,指示可点击查词 */\n    .kiss-word-hover {\n      cursor: pointer;\n      text-decoration: underline;\n      text-decoration-color: #4fc3f7;\n      text-decoration-thickness: 2px;\n    }\n    \n    /* 查词气泡弹窗主体样式 */\n    .kiss-word-tooltip {\n      position: fixed;\n      background: rgba(0, 0, 0, 0.9);\n      color: white;\n      border-radius: 6px;\n      padding: 12px;\n      font-size: 14px;\n      z-index: 2147483647;\n      max-width: 300px;\n      word-wrap: break-word;\n      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);\n      backdrop-filter: blur(4px);\n      border: 1px solid rgba(255, 255, 255, 0.1);\n      font-family: Arial, sans-serif;\n    }\n    \n    /* 气泡弹窗头部(包含单词名和关闭按钮) */\n    .kiss-word-tooltip-header {\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n      margin-bottom: 8px;\n      font-weight: bold;\n      font-size: 16px;\n      color: #4fc3f7;\n    }\n    \n    /* 关闭气泡弹窗的 X 按钮 */\n    .kiss-word-tooltip-close {\n      background: none;\n      border: none;\n      color: #aaa;\n      cursor: pointer;\n      font-size: 18px;\n      padding: 0;\n      margin-left: 10px;\n      width: 24px;\n      height: 24px;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n    }\n    \n    .kiss-word-tooltip-close:hover {\n      color: white;\n      background: rgba(255, 255, 255, 0.1);\n      border-radius: 50%;\n    }\n    \n    /* 释义加载中状态文案 */\n    .kiss-word-loading {\n      color: #bbb;\n      font-style: italic;\n    }\n    \n    /* 单词词性释义行 */\n    .kiss-word-definition {\n      margin: 4px 0;\n    }\n    \n    /* 词性前缀标记(如 n. / v. 等) */\n    .kiss-word-pos {\n      color: #4fc3f7;\n      font-weight: bold;\n    }\n    \n    /* 音标字符样式 */\n    .kiss-word-phonetic {\n      color: #bbb;\n      font-style: italic;\n      margin-right: 10px;\n    }\n    \n    /* 例句包裹区 */\n    .kiss-word-example {\n      margin-top: 10px;\n      padding-top: 8px;\n      border-top: 1px solid #444;\n    }\n    \n    .kiss-word-example-title {\n      font-weight: bold;\n      margin-bottom: 5px;\n    }\n    \n    /* 例句英文正文 */\n    .kiss-word-example-sentence {\n      margin-bottom: 3px;\n    }\n    \n    /* 例句中文翻译 */\n    .kiss-word-example-translation {\n      color: #bbb;\n      font-style: italic;\n    }\n  ",document.head.appendChild(e)})()}start(){0!==Er(this,hd)[hd].length?(ht.info("Bilingual Subtitle Manager: Starting..."),Er(this,Pd)[Pd](),Er(this,Dd)[Dd](),this.onTimeUpdate()):ht.warn("Bilingual Subtitles: No subtitles to display.")}destroy(){var e,t,n,r,i,o;ht.info("Bilingual Subtitle Manager: Destroying..."),Er(this,Sd)[Sd]+=1,null===(e=Er(this,kd)[kd])||void 0===e||e.abort(),Er(this,kd)[kd]=null,this.onSubtitleUpdate=null,Er(this,Bd)[Bd](),null===(t=Er(this,bd)[bd])||void 0===t||t.cancel(),null!==Er(this,Ad)[Ad]&&(cancelAnimationFrame(Er(this,Ad)[Ad]),Er(this,Ad)[Ad]=null),null===(n=Er(this,pd)[pd])||void 0===n||null===(r=n.parentElement)||void 0===r||null===(i=r.parentElement)||void 0===i||i.remove(),null===(o=Er(this,Ed)[Ed])||void 0===o||o.disconnect(),Er(this,Ed)[Ed]=null,Er(this,hd)[hd]=[],Er(this,wd)[wd]&&(Er(this,wd)[wd].remove(),Er(this,wd)[wd]=null),Er(this,xd)[xd]&&(clearTimeout(Er(this,xd)[xd]),Er(this,xd)[xd]=null)}setIsAdPlaying(e){Er(this,yd)[yd]=e,this.onTimeUpdate()}onTimeUpdate(){Er(this,Wd)[Wd]()}onSeeking(){Er(this,bd)[bd].cancel(),Er(this,Wd)[Wd]({forceRender:!0,triggerTranslations:!1})}onSeek(){Er(this,bd)[bd].cancel(),Er(this,Wd)[Wd]({forceRender:!0}),Er(this,Fd)[Fd]()}appendSubtitles(e){e&&0!==e.length&&(ht.info("Bilingual Subtitle Manager: Appending ".concat(e.length," new subtitles...")),Er(this,md)[md]=-1,this.onTimeUpdate())}updateSetting(e){Er(this,vd)[vd]=h(h({},Er(this,vd)[vd]),e)}}function Yd(){return ud(Er(this,vd)[vd].hoverLookupMode,Er(this,vd)[vd].enhanceMode)}function Xd(){const e=Er(this,dd)[dd].closest(".html5-video-player");if(!e)return;const t=e.querySelector(".ytp-left-controls");if(!t)return;let n=parseFloat(getComputedStyle(t).height);const r=e.classList.contains("ytp-autohide");let i=.05*e.clientHeight;r||(i+=n),Er(this,gd)[gd].style.bottom="".concat(i,"px");let o=r;const a=()=>{const t=e.classList.contains("ytp-autohide");if(t===o)return;o=t;let r=parseFloat(Er(this,gd)[gd].style.bottom)||0,i=t?r-n:r+n;Er(this,gd)[gd].style.bottom="".concat(i,"px")},s=new MutationObserver(()=>{Er(this,fd)[fd]||a()});s.observe(e,{attributes:!0,attributeFilter:["class"]}),Er(this,Ed)[Ed]=s}function Jd(){var e;const t=document.createElement("div");t.className="kiss-caption-container notranslate",Object.assign(t.style,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",pointerEvents:"none"});const n=document.createElement("div");n.className="kiss-caption-paper",Object.assign(n.style,{position:"absolute",width:"80%",left:"50%",transform:"translateX(-50%)",textAlign:"center",containerType:"inline-size",zIndex:"2147483647",pointerEvents:"auto",display:"none"}),Er(this,gd)[gd]=n,Er(this,pd)[pd]=document.createElement("div"),Er(this,pd)[pd].className="kiss-caption-window",Er(this,pd)[pd].style.cssText=Er(this,vd)[vd].windowStyle,Er(this,pd)[pd].style.pointerEvents="auto",Er(this,pd)[pd].style.cursor="grab",Er(this,pd)[pd].style.opacity="1",Er(this,gd)[gd].appendChild(Er(this,pd)[pd]),t.appendChild(Er(this,gd)[gd]);const r=null===(e=Er(this,dd)[dd].parentElement)||void 0===e?void 0:e.parentElement;if(!r)return void ht.warn("could not find videoContainer");r.style.position="relative",r.appendChild(t);const i=Er(this,Cd)[Cd]();Er(this,Md)[Md](Er(this,gd)[gd],t,Er(this,pd)[pd],()=>Er(this,fd)[fd]=!0),i&&(Er(this,pd)[pd].addEventListener("pointerenter",e=>{e.target===Er(this,pd)[pd]&&(Er(this,_d)[_d]=Er(this,dd)[dd]&&!Er(this,dd)[dd].paused,Er(this,dd)[dd]&&!Er(this,dd)[dd].paused&&Er(this,dd)[dd].pause())}),Er(this,pd)[pd].addEventListener("pointerleave",e=>{e.target===Er(this,pd)[pd]&&(Er(this,_d)[_d]&&Er(this,dd)[dd]&&Er(this,dd)[dd].paused&&Er(this,dd)[dd].play(),Er(this,_d)[_d]=!1,Er(this,Td)[Td]=null)})),Er(this,Id)[Id]()}function Qd(e){const t=e.target;t.classList.contains("kiss-subtitle-word")&&(Er(this,xd)[xd]&&(clearTimeout(Er(this,xd)[xd]),Er(this,xd)[xd]=null),t.classList.add("kiss-word-hover"),Er(this,xd)[xd]=setTimeout(()=>{Er(this,jd)[jd](t.dataset.word,e.clientX,e.clientY)},300))}function Zd(e){const t=e.target;t.classList.contains("kiss-subtitle-word")&&(t.classList.remove("kiss-word-hover"),Er(this,xd)[xd]&&(clearTimeout(Er(this,xd)[xd]),Er(this,xd)[xd]=null),Er(this,xd)[xd]=setTimeout(()=>{Er(this,zd)[zd]()},100))}function eh(e){}function th(){if(!Er(this,pd)[pd])return;Er(this,pd)[pd].querySelectorAll(".kiss-subtitle-word").forEach(e=>{if(e.dataset.kissListenerAttached)return;e.addEventListener("pointerenter",e=>Er(this,Ld)[Ld](e)),e.addEventListener("pointerleave",e=>Er(this,Rd)[Rd](e)),e.dataset.kissListenerAttached="1"})}async function nh(e,t,n){var r;Er(this,wd)[wd]&&Er(this,wd)[wd].remove(),Er(this,wd)[wd]=document.createElement("div"),Er(this,wd)[wd].className="kiss-word-tooltip",Er(this,wd)[wd].innerHTML=sd.createHTML('<div class="kiss-word-loading">Looking up...</div>');const i=null===(r=Er(this,dd)[dd].parentElement)||void 0===r?void 0:r.parentElement;if(i){const e=i.getBoundingClientRect(),t=300,n=400,r=e.right-t-45,o=e.top+20,a=window.innerWidth-t-10;Er(this,wd)[wd].style.left=Math.min(a,Math.max(10,r))+"px",Er(this,wd)[wd].style.top=Math.max(10,o)+"px",Er(this,wd)[wd].style.maxWidth=t+"px",Er(this,wd)[wd].style.maxHeight=n+"px",Er(this,wd)[wd].style.overflow="auto"}document.body.appendChild(Er(this,wd)[wd]);try{const t=await da(e);let n="";if(t&&t.aus){const e=t.aus.find(e=>"美"===e.key);e&&e.phonetic?n=e.phonetic:t.aus.length>0&&t.aus[0].phonetic&&(n=t.aus[0].phonetic)}let r="";t&&t.trs&&(r=t.trs.slice(0,3).map(e=>"".concat(e.pos?e.pos+" ":"").concat(e.def)).join("; "));let i=[];t&&t.sentences&&(i=t.sentences.slice(0,2).map(e=>({eng:e.eng,chs:e.chs})));const o=Er(this,Kd)[Kd](),a=new CustomEvent("kiss-add-word",{detail:{word:e,phonetic:n,definition:r,examples:i,timestamp:o}});if(document.dispatchEvent(a),t&&(t.trs||t.aus||t.sentences)){let n='<div class="kiss-word-tooltip-header">\n          <span>'.concat(e,'</span>\n          <button class="kiss-word-tooltip-close" onclick="this.closest(\'.kiss-word-tooltip\').remove()">×</button>\n        </div>');t.aus&&t.aus.length>0&&(n+="<div>",t.aus.forEach(e=>{e.phonetic&&(n+='<span class="kiss-word-phonetic">'.concat(e.phonetic,"</span>"))}),n+="</div>"),t.trs&&t.trs.slice(0,3).forEach(e=>{n+='<div class="kiss-word-definition">'.concat(e.pos?'<span class="kiss-word-pos">'+e.pos+"</span> ":"").concat(e.def,"</div>")}),t.sentences&&t.sentences.length>0&&(n+='<div class="kiss-word-example">\n            <div class="kiss-word-example-title">例句</div>',t.sentences.slice(0,2).forEach(e=>{n+='<div class="kiss-word-example-sentence">'.concat(e.eng,'</div>\n              <div class="kiss-word-example-translation">').concat(e.chs,"</div>")}),n+="</div>"),Er(this,wd)[wd]&&(Er(this,wd)[wd].innerHTML=sd.createHTML(n))}else Er(this,wd)[wd]&&(Er(this,wd)[wd].innerHTML=sd.createHTML('<div class="kiss-word-tooltip-header">\n          <span>'.concat(e,'</span>\n          <button class="kiss-word-tooltip-close" onclick="this.closest(\'.kiss-word-tooltip\').remove()">×</button>\n        </div>\n        <div class="kiss-word-definition">No definition found</div>')))}catch(t){ht.info("Dictionary lookup failed for word:",e,t);const n=Er(this,Kd)[Kd](),r=new CustomEvent("kiss-add-word",{detail:{word:e,phonetic:"",definition:"",examples:[],timestamp:n}});document.dispatchEvent(r),Er(this,wd)[wd]&&(Er(this,wd)[wd].innerHTML=sd.createHTML('<div class="kiss-word-tooltip-header">\n        <span>'.concat(e,'</span>\n        <button class="kiss-word-tooltip-close" onclick="this.closest(\'.kiss-word-tooltip\').remove()">×</button>\n      </div>\n      <div class="kiss-word-definition">Failed to load definition</div>')))}}function rh(){Er(this,wd)[wd]&&(Er(this,wd)[wd].remove(),Er(this,wd)[wd]=null)}function ih(e,t,n,r){let i,o,a,s=!1;const l=r=>{"mousedown"===r.type&&0!==r.button||(r.preventDefault(),s=!0,n.style.cursor="grabbing",i="touchstart"===r.type?r.touches[0].clientY:r.clientY,o=t.getBoundingClientRect().bottom-e.getBoundingClientRect().bottom,a=e.offsetHeight,document.addEventListener("mousemove",c,{capture:!0}),document.addEventListener("touchmove",c,{capture:!0,passive:!1}),document.addEventListener("mouseup",u,{capture:!0}),document.addEventListener("touchend",u,{capture:!0}))},c=n=>{if(!s)return;n.preventDefault();const l="touchmove"===n.type?n.touches[0].clientY:n.clientY;let c=o-(l-i);const u=t.clientHeight;c=Math.max(0,c),c=Math.min(u-a,c),a>u&&(c=Math.max(0,c)),e.style.bottom="".concat(c,"px"),r&&"function"==typeof r&&r()},u=t=>{if(!s)return;t.preventDefault(),s=!1,n.style.cursor="grab",document.removeEventListener("mousemove",c,{capture:!0}),document.removeEventListener("touchmove",c,{capture:!0}),document.removeEventListener("mouseup",u,{capture:!0}),document.removeEventListener("touchend",u,{capture:!0});const r=e.style.bottom;setTimeout(()=>{e.style.bottom=r},50)};n.addEventListener("mousedown",l),n.addEventListener("touchstart",l,{passive:!1})}function oh(){Er(this,dd)[dd].addEventListener("timeupdate",this.onTimeUpdate),Er(this,dd)[dd].addEventListener("seeking",this.onSeeking),Er(this,dd)[dd].addEventListener("seeked",this.onSeek)}function ah(){Er(this,dd)[dd].removeEventListener("timeupdate",this.onTimeUpdate),Er(this,dd)[dd].removeEventListener("seeking",this.onSeeking),Er(this,dd)[dd].removeEventListener("seeked",this.onSeek)}function sh(){"function"==typeof requestAnimationFrame&&(null!==Er(this,Ad)[Ad]&&cancelAnimationFrame(Er(this,Ad)[Ad]),Er(this,Ad)[Ad]=requestAnimationFrame(()=>{Er(this,Ad)[Ad]=requestAnimationFrame(()=>{Er(this,Ad)[Ad]=null,Er(this,Wd)[Wd]({forceRender:!0})})}))}function lh(){let{forceRender:e=!1,triggerTranslations:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=1e3*Er(this,dd)[dd].currentTime,r=Er(this,Ud)[Ud](n);(e||r!==Er(this,md)[md])&&(Er(this,md)[md]=r,Er(this,Vd)[Vd](-1!==r?Er(this,hd)[hd][r]:null)),t&&Er(this,bd)[bd](n)}function ch(e){const t=Er(this,hd)[hd],n=t.length;if(0===n)return-1;if(e<t[0].start||e>t[n-1].end)return-1;let r=0,i=n-1;for(;r<=i;){const n=Math.floor((r+i)/2),o=t[n];if(e>=o.start&&e<=o.end)return n;e<o.start?i=n-1:r=n+1}return-1}function uh(e){if(Er(this,gd)[gd]&&Er(this,pd)[pd])if(Er(this,yd)[yd])Er(this,gd)[gd].style.display="none";else if(e){const t=document.createElement("p");t.style.cssText=Er(this,vd)[vd].originStyle,t.style.margin="0";const n=Er(this,Cd)[Cd]();n?t.innerHTML=sd.createHTML(Er(this,Hd)[Hd](e.text)):t.textContent=Hn(e.text);const r=document.createElement("p");if(r.style.cssText=Er(this,vd)[vd].translationStyle,r.style.margin="0",n?r.innerHTML=sd.createHTML(Er(this,Hd)[Hd](e.translation||"...")):r.textContent=Hn(e.translation)||"...",Er(this,vd)[vd].isBilingual?Er(this,pd)[pd].replaceChildren(t,r):Er(this,pd)[pd].replaceChildren(r),Er(this,vd)[vd].blurTranslation){const e="blur(6px)";r.style.setProperty("filter",e),r.addEventListener("pointerenter",()=>{r.style.removeProperty("filter")}),r.addEventListener("pointerleave",()=>{r.style.setProperty("filter",e)})}n&&Er(this,Od)[Od](),Er(this,gd)[gd].style.display="block"}else Er(this,gd)[gd].style.display="none"}function dh(e){return e.replace(/\b([a-zA-Z]+(?:'[a-zA-Z]+)?)\b/g,'<span class="kiss-subtitle-word" data-word="$1">$1</span>')}function hh(e){const{preTrans:t=90}=Er(this,vd)[vd],n=e+1e3*t,r=Er(this,hd)[hd];let i=0,o=r.length-1,a=r.length;for(;i<=o;){const t=i+o>>>1;r[t].end>=e?(a=t,o=t-1):i=t+1}for(let e=a;e<r.length;e++){const t=r[e];if(t.start>n)break;t.translation||t.isTranslating||Er(this,qd)[qd](t)}}async function ph(e){var t;const n=Er(this,Sd)[Sd],r=null===(t=Er(this,kd)[kd])||void 0===t?void 0:t.signal;if(null==r||!r.aborted){e.isTranslating=!0;try{const{fromLang:t,toLang:i,apiSetting:o,docInfo:a}=Er(this,vd)[vd],{trText:s}=await ga({text:e.text,fromLang:t,toLang:i,apiSetting:o,docInfo:a,signal:r});if(n!==Er(this,Sd)[Sd])return;e.translation=Kn(s)}catch(t){if(n!==Er(this,Sd)[Sd])return;if("AbortError"===(null==t?void 0:t.name))return;ht.info("Translation failed for:",e.text,t),e.translation="[Translation failed]"}finally{if(n!==Er(this,Sd)[Sd])return;e.isTranslating=!1;const t=Er(this,Ud)[Ud](1e3*Er(this,dd)[dd].currentTime);Er(this,hd)[hd][t]===e&&Er(this,Vd)[Vd](e),this.onSubtitleUpdate&&this.onSubtitleUpdate({start:e.start,end:e.end,text:e.text,translation:e.translation})}}}function fh(){const e=1e3*Er(this,dd)[dd].currentTime,t=Er(this,Ud)[Ud](e);return-1!==t?Er(this,hd)[hd][t].start:e}class gh{constructor(e){this.videoEl=e,this.bilingualSubtitles=[],this.vocabulary=[],this.container=null,this.subtitleListEl=null,this.vocabularyListEl=null,this.subtitleScrollContainer=null,this._cachedSubtitleItems=[],this.loopAutoScroll=null,this.activeTab="subtitles",this._lastActiveIndex=-1,this._virtualHeights=[],this._virtualOffsets=[0],this._virtualStart=-1,this._virtualEnd=-1,this._virtualRenderRaf=null,this._virtualRenderForce=!1,this._estimatedItemHeight=76,this._subtitleItemGap=4,this._virtualTopPadding=16,this._virtualBottomPadding=16,this._virtualOverscan=8,this._pendingCenterIndex=-1,this._pendingSubtitleTabScrollIndex=-1,this._eventListenersAttached=!1,this._vocabularyDirty=!1,this._chunkRenderCancel=null,this.handleWordAdded=this.handleWordAdded.bind(this),this.handleJumpMessage=this.handleJumpMessage.bind(this),this.handleSubtitleScroll=this.handleSubtitleScroll.bind(this),this.handleContainerMouseEnter=this.handleContainerMouseEnter.bind(this),this.handleContainerMouseLeave=this.handleContainerMouseLeave.bind(this),this.handleVideoEnded=this.handleVideoEnded.bind(this),this.handleVideoPause=this.handleVideoPause.bind(this),this.handleVideoPlay=this.handleVideoPlay.bind(this),document.addEventListener("kiss-add-word",this.handleWordAdded),window.addEventListener("message",this.handleJumpMessage)}handleJumpMessage(e){e.data&&"KISS_TRANSLATOR_JUMP_TO_TIME"===e.data.type&&this.jumpToTime(e.data.time)}handleSubtitleScroll(){this._scheduleVirtualRender()}handleContainerMouseEnter(){this.turnOffAutoSub()}handleContainerMouseLeave(){this.turnOnAutoSub()}handleVideoEnded(){this.turnOffAutoSub()}handleVideoPause(){this.turnOffAutoSub()}handleVideoPlay(){this.turnOnAutoSub()}initialize(e){this.bilingualSubtitles=e||[],this.bilingualSubtitles.length>0&&(this.createSubtitleList(),this.setupEventListeners())}setBilingualSubtitles(e){this.bilingualSubtitles=e||[],this.subtitleListEl?this.updateBilingualSubtitles():this.bilingualSubtitles.length>0&&(this.createSubtitleList(),this.setupEventListeners())}destroy(){this.turnOffAutoSub(),this._cancelChunkRender(),this._cancelVirtualRender(),this._removeEventListeners(),document.removeEventListener("kiss-add-word",this.handleWordAdded),window.removeEventListener("message",this.handleJumpMessage),this.container&&(this.container.remove(),this.container=null),this.subtitleListEl=null,this.vocabularyListEl=null,this.subtitleScrollContainer=null,this.subtitleListUl=null,this.bilingualSubtitles=[],this._cachedSubtitleItems=[],this._virtualHeights=[],this._virtualOffsets=[0],this._pendingCenterIndex=-1,this._pendingSubtitleTabScrollIndex=-1,this.vocabulary=[]}_cancelChunkRender(){this._chunkRenderCancel&&(this._chunkRenderCancel(),this._chunkRenderCancel=null)}_scheduleIdle(e){if("function"==typeof requestIdleCallback){const t=requestIdleCallback(e,{timeout:100});this._chunkRenderCancel=()=>cancelIdleCallback(t)}else{const t=setTimeout(e,0);this._chunkRenderCancel=()=>clearTimeout(t)}}_renderSubtitlesInChunks(e){this.subtitleListUl=e,this._resetVirtualMetrics(),this._scheduleVirtualRender(!0)}_resetVirtualMetrics(){let{preserveHeights:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e?this._virtualHeights:[];this._cachedSubtitleItems=[],this._virtualStart=-1,this._virtualEnd=-1,this._virtualHeights=this.bilingualSubtitles.map((e,n)=>t[n]||this._estimatedItemHeight),this._rebuildVirtualOffsets()}_rebuildVirtualOffsets(){const e=[0];let t=0;for(let n=0;n<this._virtualHeights.length;n++)t+=this._virtualHeights[n]||this._estimatedItemHeight,e.push(t);this._virtualOffsets=e,this.subtitleListUl&&(this.subtitleListUl.style.height="".concat(t+this._virtualTopPadding+this._virtualBottomPadding,"px"))}_scheduleVirtualRender(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._virtualRenderForce=this._virtualRenderForce||e,this._virtualRenderRaf)return;const t="function"==typeof requestAnimationFrame?requestAnimationFrame:e=>setTimeout(e,16);this._virtualRenderRaf=t(()=>{this._virtualRenderRaf=null;const e=this._virtualRenderForce;this._virtualRenderForce=!1,this._renderVirtualSubtitles(e)})}_cancelVirtualRender(){this._virtualRenderRaf&&("function"==typeof cancelAnimationFrame?cancelAnimationFrame(this._virtualRenderRaf):clearTimeout(this._virtualRenderRaf),this._virtualRenderRaf=null,this._virtualRenderForce=!1)}_isSubtitleTabVisible(){return"subtitles"===this.activeTab&&this.subtitleListEl&&this.subtitleScrollContainer&&"none"!==this.subtitleListEl.style.display&&this.subtitleListEl.getClientRects().length>0}_findIndexByOffset(e){const t=this.bilingualSubtitles.length;if(0===t)return-1;let n=0,r=t-1,i=0;for(;n<=r;){const t=n+r>>1;this._virtualOffsets[t]<=e?(i=t,n=t+1):r=t-1}return Math.min(i,t-1)}_getVirtualRange(){const e=this.subtitleScrollContainer,t=this.bilingualSubtitles.length;if(!e||0===t)return{start:0,end:0};const n=Math.max(0,e.scrollTop-this._virtualTopPadding),r=n+e.clientHeight;return{start:Math.max(0,this._findIndexByOffset(n)-this._virtualOverscan),end:Math.min(t,this._findIndexByOffset(r)+this._virtualOverscan+1)}}_renderVirtualSubtitles(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.subtitleListUl||!this.subtitleScrollContainer)return;if(!this._isSubtitleTabVisible())return;const{start:t,end:n}=this._getVirtualRange();if(!e&&t===this._virtualStart&&n===this._virtualEnd)return;this._virtualStart=t,this._virtualEnd=n,this._cachedSubtitleItems=[];const r=document.createDocumentFragment();for(let e=t;e<n;e++){const t=this._createSubtitleListItem(this.bilingualSubtitles[e],e);t.style.position="absolute",t.style.left="0",t.style.right="0",t.style.top="".concat(this._virtualTopPadding+this._virtualOffsets[e],"px"),t.style.contain="layout paint style",e===this._lastActiveIndex&&(t.style.opacity=1,t.classList.add("active-subtitle")),this._cachedSubtitleItems[e]=t,r.appendChild(t)}this.subtitleListUl.replaceChildren(r),this._measureVisibleSubtitleItems()}_measureVisibleSubtitleItems(){if(!this._isSubtitleTabVisible())return;let e=!1;for(let t=this._virtualStart;t<this._virtualEnd;t++){const n=this._cachedSubtitleItems[t];if(!n)continue;const r=n.offsetHeight+this._subtitleItemGap;Number.isFinite(r)&&Math.abs((this._virtualHeights[t]||0)-r)>1&&(this._virtualHeights[t]=r,e=!0)}if(!e)return void(this._pendingCenterIndex=-1);this._rebuildVirtualOffsets();const t=this._pendingCenterIndex;this._pendingCenterIndex=-1,-1===t?this._scheduleVirtualRender(!0):this._scrollIndexIntoView(t,{stabilizeAfterMeasure:!1})}jumpToTime(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.videoEl&&Number.isFinite(e)){this.videoEl.currentTime=e/1e3;const n=Number.isInteger(t)&&t>=0&&t<this.bilingualSubtitles.length?t:this._binarySearchSubtitle(e);if(-1!==n){const e="subtitles"===this.activeTab;this._setActiveSubtitle(n,e),e||(this._pendingSubtitleTabScrollIndex=n)}this.videoEl.paused&&this.videoEl.play()}}handleWordAdded(e){e.detail&&e.detail.word&&this.addWord(e.detail.word,e.detail.phonetic||"",e.detail.definition||"",e.detail.examples||[],e.detail.timestamp||null)}addWord(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(!e)return;const o=this.vocabulary.findIndex(t=>t.word===e);if(-1!==o){const e=this.vocabulary[o];t&&(e.phonetic=t),n&&(e.definition=n),r.length>0&&(e.examples=r),i&&(e.timestamp=i)}else this.vocabulary.push({word:e,phonetic:t,definition:n,examples:r,timestamp:i});"vocabulary"===this.activeTab?this._renderVocabulary():this._vocabularyDirty=!0}downloadSubtitles(){if(this.bilingualSubtitles&&0!==this.bilingualSubtitles.length)try{const e=this._getYouTubeVideoId()||"video";qn(_o(this.bilingualSubtitles),"kiss-subtitles-".concat(e,"_").concat(Date.now(),".vtt"))}catch(e){ht.error("Youtube Provider: download subtitles error:",e)}else ht.info("Youtube Provider: No subtitles to download")}createSubtitleList(){if(!this.videoEl)return;this._ensureContainer(),0===this.container.children.length&&this._renderTabsAndStructure(),this._cancelChunkRender();const e=this.subtitleListEl.querySelector("ul");e.replaceChildren(),this._renderSubtitlesInChunks(e),this._renderVocabulary()}_ensureContainer(){if(this.container=document.getElementById("kiss-youtube-subtitle-list-container"),!this.container){this.container=document.createElement("div"),this.container.id="kiss-youtube-subtitle-list-container",this.container.className="notranslate",Object.assign(this.container.style,{height:"calc(100vh - 220px)",maxHeight:"none",zIndex:"999",background:"var(--kt-bg, rgba(255, 255, 255, 0.9))",backdropFilter:"blur(10px)",top:"60px",right:"0",fontSize:"14px",padding:"0",border:"var(--kt-border, 1px solid rgba(0, 0, 0, 0.1))",borderRadius:"8px",minWidth:"320px",maxWidth:"400px",boxShadow:"0 4px 20px rgba(0,0,0,0.15)",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",display:"flex",flexDirection:"column",marginBottom:"12px"});const e=document.getElementById("secondary-inner");e&&e.prepend(this.container),(async()=>{try{const e=await rr(),t=null==e?void 0:e.darkMode,n="function"==typeof window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,r="dark"===t||"auto"===t&&n?{"--kt-bg":"rgba(18,18,18,0.85)","--kt-border":"1px solid rgba(255, 255, 255, 0.06)","--kt-text":"#e6e6e6","--kt-subtext":"#bdbdbd","--kt-primary":"#90caf9","--kt-time-bg":"rgba(144,202,249,0.08)","--kt-divider":"rgba(255,255,255,0.06)","--kt-active-bg":"rgba(144,202,249,0.12)","--kt-btn-bg":"linear-gradient(180deg,#0f0f0f,#1b1b1b)","--kt-btn-color":"#e6e6e6","--kt-btn-border":"1px solid rgba(255,255,255,0.04)","--kt-btn-hover-bg":"linear-gradient(180deg,#141414,#262626)"}:{"--kt-bg":"rgba(255, 255, 255, 0.9)","--kt-border":"1px solid rgba(0, 0, 0, 0.1)","--kt-text":"#333","--kt-subtext":"#666","--kt-primary":"#1e88e5","--kt-time-bg":"rgba(30, 136, 229, 0.1)","--kt-divider":"rgba(240,240,240,0.6)","--kt-active-bg":"rgba(30, 136, 229, 0.1)","--kt-btn-bg":"var(--kt-primary)","--kt-btn-color":"white","--kt-btn-border":"none","--kt-btn-hover-bg":"rgba(30,136,229,0.85)"};Object.keys(r).forEach(e=>this.container.style.setProperty(e,r[e]))}catch(e){ht.info("failed to apply subtitle list theme vars",e)}})()}}_renderTabsAndStructure(){const e=document.createElement("div");e.style.cssText="display: flex; border-bottom: 1px solid var(--kt-divider); padding: 0 16px; flex-shrink: 0;";const t=document.createElement("button");t.textContent="双语字幕";const n=document.createElement("button");n.textContent="生词本";const r=(e,t)=>{e.style.cssText="padding: 12px 16px; cursor: pointer; border: none; background: transparent; font-size: 15px; font-weight: ".concat(t?"600":"500","; color: ").concat(t?"var(--kt-primary)":"var(--kt-text)","; border-bottom: 2px solid ").concat(t?"var(--kt-primary)":"transparent","; margin-bottom: -1px; outline: none;")},i=document.createElement("button");i.innerHTML="&times;",i.title="Close",i.style.cssText="\n      margin-left: auto; \n      background: transparent; \n      border: none; \n      color: var(--kt-subtext); \n      font-size: 22px; \n      line-height: 1;\n      cursor: pointer; \n      padding: 0 8px;\n      display: flex;\n      align-items: center;\n      transition: color 0.2s;\n    ",i.addEventListener("click",()=>{this.destroy()}),i.addEventListener("mouseenter",()=>i.style.color="var(--kt-text)"),i.addEventListener("mouseleave",()=>i.style.color="var(--kt-subtext)");const o=document.createElement("div");o.style.cssText="overflow: hidden; flex-grow: 1; display: flex; flex-direction: column; height: calc(100% - 40px);",this.subtitleListEl=document.createElement("div"),this.subtitleListEl.id="kiss-youtube-subtitle-list",this.subtitleListEl.style.cssText="display: flex; flex-direction: column; height: 100%; overflow: hidden;";const a=document.createElement("div");a.style.cssText="padding: 10px 16px; border-bottom: 1px solid var(--kt-divider); display: flex; justify-content: center; flex-shrink: 0;";const s=document.createElement("button");s.textContent="下载字幕 (VTT)",s.style.cssText="padding: 6px 12px; background: var(--kt-btn-bg); color: var(--kt-btn-color); border: var(--kt-btn-border); border-radius: 4px; cursor: pointer; font-size: 12px; transition: background 220ms ease, color 200ms ease, transform 160ms ease;",s.addEventListener("mouseenter",()=>{try{const e=getComputedStyle(this.container).getPropertyValue("--kt-btn-hover-bg");e&&(s.style.background=e),s.style.transform="translateY(-1px)"}catch(e){}}),s.addEventListener("mouseleave",()=>{try{const e=getComputedStyle(this.container).getPropertyValue("--kt-btn-bg");e&&(s.style.background=e),s.style.transform="translateY(0)"}catch(e){}}),s.addEventListener("click",this.downloadSubtitles.bind(this)),a.appendChild(s),this.subtitleListEl.appendChild(a),this.subtitleScrollContainer=document.createElement("div"),this.subtitleScrollContainer.style.cssText="overflow-y: auto; flex: 1; padding: 0 16px; position: relative;",this.subtitleScrollContainer.addEventListener("scroll",this.handleSubtitleScroll,{passive:!0});const l=document.createElement("ul");l.style.cssText="list-style-type: none; padding: 0; margin: 0; position: relative;",this.subtitleListUl=l,this.subtitleScrollContainer.appendChild(l),this.subtitleListEl.appendChild(this.subtitleScrollContainer),this.vocabularyListEl=document.createElement("div"),this.vocabularyListEl.id="kiss-youtube-vocabulary-list",this.vocabularyListEl.style.cssText="display: none; flex-direction: column; height: 100%; overflow: hidden;",t.addEventListener("click",()=>{this.activeTab="subtitles",r(t,!0),r(n,!1),this.subtitleListEl.style.display="flex",this.vocabularyListEl.style.display="none",this._scrollPendingSubtitleTabIndex()||this._scheduleVirtualRender(!0)}),n.addEventListener("click",()=>{this.activeTab="vocabulary",r(t,!1),r(n,!0),this.subtitleListEl.style.display="none",this.vocabularyListEl.style.display="flex",this._vocabularyDirty&&(this._renderVocabulary(),this._vocabularyDirty=!1)}),r(t,!0),r(n,!1),e.append(t,n,i),o.append(this.subtitleListEl,this.vocabularyListEl),this.container.append(e,o)}_createSubtitleListItem(e,t){const n=document.createElement("li");n.id="kiss-youtube-item-".concat(t),n.className="kiss-youtube-item",n.dataset.index=t,n.dataset.time=e.start,n.style.cssText="cursor: pointer; padding: 12px 16px; border-bottom: 1px solid var(--kt-divider); transition: opacity 0.2s ease; opacity: 0.6; border-radius: 6px; margin-bottom: 4px; display: flex; align-items: flex-start;";const r=document.createElement("span");r.textContent="".concat(this.millisToMinutesAndSeconds(e.start)," "),r.style.cssText="color: var(--kt-primary); font-weight: 600; margin-right: 10px; font-size: 12px; background: var(--kt-time-bg); padding: 2px 6px; border-radius: 4px; flex-shrink: 0; line-height: 20px;";const i=document.createElement("div");i.style.cssText="flex-grow: 1;";const o=document.createElement("div");o.className="kiss-youtube-original",o.textContent=e.text||"",o.style.cssText="color: var(--kt-text); font-size: 14px; line-height: 1.4; margin-bottom: 4px;";const a=document.createElement("div");return a.className="kiss-youtube-translation",a.textContent=e.translation||"",a.style.display=e.translation?"block":"none",a.style.cssText="color: var(--kt-subtext); font-size: 13px; line-height: 1.4; font-style: italic; min-height: 18px;",n.addEventListener("click",()=>this.jumpToTime(e.start,t)),n.addEventListener("mouseenter",()=>{n.classList.contains("active-subtitle")||(n.style.opacity=1)}),n.addEventListener("mouseleave",()=>{n.classList.contains("active-subtitle")||(n.style.opacity=.6)}),i.appendChild(o),i.appendChild(a),n.appendChild(r),n.appendChild(i),n._translationEl=a,n}updateBilingualSubtitles(){this.subtitleListEl&&(this._resetVirtualMetrics({preserveHeights:!0}),this._scheduleVirtualRender(!0))}updateSingleSubtitle(e){if(!this.subtitleListEl)return;const{start:t,translation:n}=e,r=this._findSubtitleIndexByStart(t);if(-1===r)return;this.bilingualSubtitles[r].translation=n;const i=this._cachedSubtitleItems[r];if(i){const e=i._translationEl||i.querySelector(".kiss-youtube-translation");e&&(e.textContent=n||"",e.style.display=n?"block":"none",this._scheduleVirtualRender(!0))}}_findSubtitleIndexByStart(e){let t=0,n=this.bilingualSubtitles.length-1;for(;t<=n;){const r=Math.floor((t+n)/2),i=this.bilingualSubtitles[r];if(i.start===e)return r;i.start>e?n=r-1:t=r+1}return-1}_renderVocabulary(){if(!this.vocabularyListEl)return;this.vocabularyListEl.replaceChildren();const e=this._createExportContainer(),t=this._createVocabListContainer();this.vocabularyListEl.appendChild(e),this.vocabularyListEl.appendChild(t)}_createExportContainer(){const e=document.createElement("div");if(e.style.cssText="padding: 10px 16px; border-bottom: 1px solid var(--kt-divider); display: flex; justify-content: center; flex-shrink: 0; gap: 8px;",this.vocabulary.length>0){const t=(e,t)=>{const n=document.createElement("button");return n.textContent=e,n.style.cssText="padding: 6px 12px; background: var(--kt-primary); color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px;",t&&n.addEventListener("click",t.bind(this)),n};e.appendChild(t("导出JSON",this.exportVocabularyAsJson)),e.appendChild(t("导出CSV",this.exportVocabularyAsCsv)),e.appendChild(t("导出TXT",this.exportVocabularyAsTxt)),e.appendChild(t("导出MD",this.exportVocabularyAsMd))}else{const t=document.createElement("span");t.textContent="暂无生词,在字幕中添加",t.style.color="var(--kt-subtext)",t.style.fontSize="12px",e.appendChild(t)}return e}_createVocabListContainer(){const e=document.createElement("div");e.style.cssText="overflow-y: auto; overflow-x: hidden; flex: 1; padding: 0 16px; min-height: 0;";const t=document.createElement("div");return t.style.cssText="display: flex; flex-direction: column; gap: 16px; padding: 16px 0; width: 100%;",this.vocabulary.forEach(e=>{const n=this._createVocabItemElement(e);t.appendChild(n)}),e.appendChild(t),e}_createVocabItemElement(e){const t=document.createElement("div");t.style.cssText="border-bottom: 1px solid var(--kt-divider); word-wrap: break-word; word-break: break-word;";const n=document.createElement("div");n.style.cssText="display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap;";const r=document.createElement("div");if(r.textContent=e.word,r.style.cssText="color: var(--kt-text); font-weight: bold; font-size: 16px;",n.appendChild(r),e.phonetic){const t=document.createElement("div"),r=e.phonetic;t.textContent="[".concat(r,"]"),t.style.cssText="color: var(--kt-subtext); font-style: italic; font-size: 14px;",n.appendChild(t)}if(e.timestamp){const t=document.createElement("button");t.textContent="".concat(this.millisToMinutesAndSeconds(e.timestamp)),t.style.cssText="color: var(--kt-primary); background: none; border: none; padding: 0 4px; font-size: 14px; cursor: pointer;",t.addEventListener("click",()=>this.jumpToTime(e.timestamp)),n.appendChild(t)}if(t.appendChild(n),e.definition){const n=document.createElement("div");n.textContent=e.definition,n.style.cssText="color: var(--kt-text); margin: 8px 0; font-size: 14px; line-height: 1.4;",t.appendChild(n)}if(e.examples&&e.examples.length>0){const n=document.createElement("div");n.style.cssText="color: var(--kt-subtext); font-size: 13px; line-height: 1.4;",e.examples.forEach(e=>{const t=document.createElement("div");t.style.marginBottom="8px";const r=document.createElement("div");if(r.textContent=e.eng,t.appendChild(r),e.chs){const n=document.createElement("div");n.textContent=e.chs,n.style.cssText="color: var(--kt-subtext); font-style: italic;",t.appendChild(n)}n.appendChild(t)}),t.appendChild(n)}return t}exportVocabularyAsJson(){if(0===this.vocabulary.length)return;const e=this._getYouTubeVideoId(),t=this.vocabulary.map(e=>{const t=h({},e);if(e.phonetic){const n=e.phonetic;t.phonetic=n?"[".concat(n,"]"):""}return t}),n={videoInfo:{title:this._getYouTubeVideoTitle(),url:e?"https://www.youtube.com/watch?v=".concat(e):"",exportTime:(new Date).toISOString()},vocabulary:t};this._downloadFile(JSON.stringify(n,null,2),"application/json","json")}exportVocabularyAsCsv(){if(0===this.vocabulary.length)return;const e=this._getYouTubeVideoId(),t=this.vocabulary.map(t=>{var n,r;const i=t.phonetic,o=i?"[".concat(i,"]"):"",a=null===(n=t.examples)||void 0===n?void 0:n[0],s=null===(r=t.examples)||void 0===r?void 0:r[1];let l="";return t.timestamp&&e&&(l="https://www.youtube.com/watch?v=".concat(e,"&t=").concat(Math.floor(t.timestamp/1e3),"s")),[t.word,o,t.definition,(null==a?void 0:a.eng)||"",(null==a?void 0:a.chs)||"",(null==s?void 0:s.eng)||"",(null==s?void 0:s.chs)||"",l].map(e=>e?'"'.concat(e.toString().replace(/"/g,'""'),'"'):'""').join(",")}),n=['"'.concat(this._getYouTubeVideoTitle(),'",,,,,,,'),'"'.concat(e?"https://www.youtube.com/watch?v=".concat(e):"生词本",'",,,,,,,'),",,,,,,,,","Word,Phonetic,Definition,Example1,Translation1,Example2,Translation2,Video Link",...t].join("\n");this._downloadFile("\ufeff"+n,"text/csv;charset=utf-8;","csv")}exportVocabularyAsTxt(){if(0===this.vocabulary.length)return;const e=this._getYouTubeVideoId(),t=[];t.push("生词本导出文件"),t.push("视频标题: ".concat(this._getYouTubeVideoTitle())),e&&t.push("视频链接: https://www.youtube.com/watch?v=".concat(e)),t.push("导出时间: ".concat((new Date).toLocaleString("zh-CN"))),t.push(""),this.vocabulary.forEach((n,r)=>{t.push("".concat(r+1,". ").concat(n.word));const i=n.phonetic;i&&t.push("   音标: [".concat(i,"]")),n.definition&&t.push("   释义: ".concat(n.definition)),n.examples&&n.examples.length>0&&(t.push("   例句:"),n.examples.slice(0,2).forEach((e,n)=>{t.push("   ".concat(n+1,". ").concat(e.eng)),e.chs&&t.push("      ".concat(e.chs))})),n.timestamp&&e&&t.push("   视频链接: https://www.youtube.com/watch?v=".concat(e,"&t=").concat(Math.floor(n.timestamp/1e3),"s")),t.push("")}),this._downloadFile(t.join("\n"),"text/plain;charset=utf-8;","txt")}exportVocabularyAsMd(){if(0===this.vocabulary.length)return;const e=this._getYouTubeVideoId(),t=e?"https://www.youtube.com/watch?v=".concat(e):"",n=[];n.push("# 生词本导出文件"),n.push("**视频标题:** ".concat(this._getYouTubeVideoTitle())),t&&n.push("**视频链接:** [".concat(t,"](").concat(t,")")),n.push("**导出时间:** ".concat((new Date).toLocaleString("zh-CN"))),n.push(""),this.vocabulary.forEach((t,r)=>{n.push("".concat(r+1,". **").concat(t.word,"**"));const i=t.phonetic;if(i&&n.push("   *音标 Phonetic:* [".concat(i,"]")),t.definition&&n.push("   *释义 Definition:* ".concat(t.definition)),t.examples&&t.examples.length>0&&(n.push("   *例句 Examples:*"),t.examples.slice(0,2).forEach((e,t)=>{n.push("   ".concat(t+1,". ").concat(e.eng)),e.chs&&n.push("      ".concat(e.chs))})),t.timestamp&&e){const r="https://www.youtube.com/watch?v=".concat(e,"&t=").concat(Math.floor(t.timestamp/1e3),"s");n.push("   *视频链接 Video Link:* [跳转到视频时间点](".concat(r,")"))}n.push("")}),this._downloadFile(n.join("\n"),"text/markdown;charset=utf-8;","md")}setupEventListeners(){this.container&&this.videoEl&&(this._eventListenersAttached||(this.container.addEventListener("mouseenter",this.handleContainerMouseEnter),this.container.addEventListener("mouseleave",this.handleContainerMouseLeave),this.videoEl.addEventListener("ended",this.handleVideoEnded),this.videoEl.addEventListener("pause",this.handleVideoPause),this.videoEl.addEventListener("play",this.handleVideoPlay),this._eventListenersAttached=!0))}_removeEventListeners(){this.subtitleScrollContainer&&this.subtitleScrollContainer.removeEventListener("scroll",this.handleSubtitleScroll),this.container&&(this.container.removeEventListener("mouseenter",this.handleContainerMouseEnter),this.container.removeEventListener("mouseleave",this.handleContainerMouseLeave)),this.videoEl&&(this.videoEl.removeEventListener("ended",this.handleVideoEnded),this.videoEl.removeEventListener("pause",this.handleVideoPause),this.videoEl.removeEventListener("play",this.handleVideoPlay)),this._eventListenersAttached=!1}turnOnAutoSub(){this.turnOffAutoSub(),this.videoEl.paused||(this.loopAutoScroll=setInterval(()=>{if(!this.videoEl||"subtitles"!==this.activeTab||0===this.bilingualSubtitles.length)return;const e=1e3*this.videoEl.currentTime;let t=this._binarySearchSubtitle(e);this._lastActiveIndex!==t&&this._setActiveSubtitle(t,!0)},200))}_setActiveSubtitle(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this._lastActiveIndex;this._lastActiveIndex=e,this._updateSubtitleItemActive(n,!1),this._updateSubtitleItemActive(e,!0),t&&-1!==e&&this._scrollIndexIntoView(e)}_updateSubtitleItemActive(e,t){if(-1===e)return;const n=this._cachedSubtitleItems[e];n&&(n.style.opacity=t?1:.6,n.classList.toggle("active-subtitle",t))}_scrollPendingSubtitleTabIndex(){const e=this._pendingSubtitleTabScrollIndex;return!(-1===e||!this._isSubtitleTabVisible())&&(this._pendingSubtitleTabScrollIndex=-1,this._scrollIndexIntoView(e),!0)}_scrollIndexIntoView(e){let{stabilizeAfterMeasure:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.subtitleScrollContainer;if(!n||e<0||e>=this.bilingualSubtitles.length)return;if(!this._isSubtitleTabVisible())return void(this._pendingSubtitleTabScrollIndex=e);t&&(this._pendingCenterIndex=e);const r=this._virtualTopPadding+this._virtualOffsets[e],i=this._virtualHeights[e]||this._estimatedItemHeight,o=r-n.clientHeight/2+i/2;n.scrollTop=Math.max(0,o),this._scheduleVirtualRender(!0)}_binarySearchSubtitle(e){let t=0,n=this.bilingualSubtitles.length-1,r=-1;for(;t<=n;){const i=Math.floor((t+n)/2),o=this.bilingualSubtitles[i],a=i===this.bilingualSubtitles.length-1;if(e>=o.start&&(e<o.end||a))return i;e<o.start?n=i-1:(t=i+1,r=i)}return r}turnOffAutoSub(){this.loopAutoScroll&&(clearInterval(this.loopAutoScroll),this.loopAutoScroll=null)}_downloadFile(e,t,n){qn(new Blob([e],{type:t}),"kiss-vocabulary-".concat((new Date).toISOString().slice(0,10),".").concat(n))}millisToMinutesAndSeconds(e){if(!Number.isFinite(e))return"0:00";const t=Math.floor(e/6e4),n=(e%6e4/1e3).toFixed(0);return t+":"+(n<10?"0":"")+n}_getYouTubeVideoId(){try{return new URLSearchParams(window.location.search).get("v")}catch(e){return null}}_getYouTubeVideoTitle(){try{const e=document.querySelector("h1 yt-formatted-string");return e?e.textContent:"YouTube Video"}catch(e){return"YouTube Video"}}}function mh(e,t){return!(!e||!t)&&e.slice(0,2)===t.slice(0,2)}function vh(e){var t,n,r,i;if(!e)return!1;const o=(null===(t=e.name)||void 0===t?void 0:t.simpleText)||(null===(n=e.name)||void 0===n||null===(r=n.runs)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.text)||"";return/chat/i.test(o)}const yh={maxDurationMs:7e3,maxWords:30,sensitivity:2,punctuationBreakBonus:2.5,commaBreakBonus:1,capitalBreakBonus:.5,minBoundaryScore:1.2,minSentenceWords:4,minSentenceDurationMs:500,forceBreakOnPunctuation:!0,forcePunctuationMinWords:6,forcePunctuationMinDurationMs:2e3};class bh{constructor(e,t,n){this.text=e,this.startMs=t,this.endMs=n}get stripped(){return this.text.trim()}get endsWithSentencePunc(){return this.stripped.endsWith(".")||this.stripped.endsWith("?")||this.stripped.endsWith("!")}get endsWithComma(){return this.stripped.endsWith(",")}get startsWithCapital(){const e=this.stripped;return e&&e[0]===e[0].toUpperCase()}get isAllCaps(){const e=this.stripped;return e&&e.length>=2&&e===e.toUpperCase()}get startsWithArrow(){return this.text.startsWith(">>")}}class wh{constructor(e,t,n,r,i,o){this.gapMs=e,this.prevWord=t,this.nextWord=n,this.isYoutubeBreak=r,this.isSameEvent=i,this.gapIndex=o}}class xh{constructor(e,t,n,r,i,o,a,s,l,c,u,d){this.mean=e,this.median=t,this.std=n,this.minVal=r,this.maxVal=i,this.p25=o,this.p50=a,this.p75=s,this.p90=l,this.p95=c,this.mad=u,this.robustSigma=d||1.4826*u}}class Ah{constructor(e,t,n,r){this.words=e||[],this.startMs=t||0,this.endMs=n||0,this.index=r||0}get text(){const e=[];for(const t of this.words){const n=t.text;"\n"!==n&&(e.length?n.startsWith(" ")?e.push(n):e.push(" "+n):e.push(n.trimStart()))}return e.join("").trim()}get durationMs(){return this.endMs-this.startMs}}function Sh(e,t){if(!e.length)return 0;const n=(e.length-1)*t/100,r=Math.floor(n),i=Math.ceil(n);return r===i?e[Math.floor(n)]:e[r]*(i-n)+e[i]*(n-r)}function kh(e,t,n,r){if(!e.length||!t.length)return[];const{maxDurationMs:i,maxWords:o,minBoundaryScore:a,minSentenceWords:s,minSentenceDurationMs:l,forceBreakOnPunctuation:c,forcePunctuationMinWords:u,forcePunctuationMinDurationMs:d}=r,h=t.map(e=>function(e,t,n){if(e.gapMs<=0)return-100;const{sensitivity:r,punctuationBreakBonus:i,commaBreakBonus:o,capitalBreakBonus:a,defaultFillValues:s}=n;let l=0;const c=e.gapMs,u=e.prevWord,d=e.nextWord;u.endsWithSentencePunc&&(l+=i),u.endsWithComma&&(l+=o),d.startsWithCapital&&!d.isAllCaps&&(l+=a),u.endsWithSentencePunc&&d.startsWithCapital&&!d.isAllCaps&&(l+=.4*i);let h=0,p=0;t.std>0&&(h=(c-t.mean)/t.std),t.robustSigma>0&&(p=(c-t.median)/t.robustSigma);const f=Math.min(h,p);l+=Math.max(0,f)*r;const g=s&&s.has(c)&&e.isSameEvent?.4:1;return c>=t.p75&&(l+=.5*g),c>=t.p90&&(l+=1*g),c>=t.p95&&(l+=1.5*g),c>=500&&(l+=.3),c>=800&&(l+=.5),c>=1500&&(l+=1),c>=3e3&&(l+=1.5),e.isYoutubeBreak&&(l+=.8),e.isSameEvent?l-=1:l+=.3,l}(e,n,r)),p=[];let f=0,g=-1,m=-1/0;for(let n=0;n<t.length;n++){const r=h[n],v=t[n].prevWord,y=t[n].nextWord,b=y.endMs-e[f].startMs,w=n+1-f+1;if(y.startsWithArrow&&b>=Math.min(l,100)&&w>=s){p.push(n+1),f=n+1,g=-1,m=-1/0;continue}if(c&&v.endsWithSentencePunc&&y.startsWithCapital&&!y.isAllCaps&&w>=Math.max(u,s)&&b>=d&&e.length-(n+1)>=s){p.push(n+1),f=n+1,g=-1,m=-1/0;continue}const x=e[n].endMs-e[f].startMs;r>m&&n-f+1>0&&x>=l&&(m=r,g=n);let A=!1;if((b>=i||w>=o)&&(A=!0),A){const e=g>=0?g:n;p.push(e+1),f=e+1,g=-1,m=-1/0;continue}if(!(w<s)&&r>=a){let e=a;t[n].isSameEvent&&(e=1.5*a),v.endsWithSentencePunc&&w<u&&(e=1/0),r>=e&&(p.push(n+1),f=n+1,g=-1,m=-1/0)}}return Array.from(new Set(p)).sort((e,t)=>e-t)}function _h(e,t){const n=e.words,r=n.length;if(r<=1)return[e];const i=e.durationMs,o=Math.ceil(i/t),a=Math.ceil(r/o),s=[];for(let e=0;e<r;e+=a){const t=n.slice(e,e+a);t.length&&s.push(new Ah(t,t[0].startMs,t[t.length-1].endMs,s.length))}return s}function Th(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=h(h({},yh),t),{words:r,gaps:i,wordEventIds:o}=function(e){const t=e.events||[],n=[],r=[];let i=0;for(const e of t){const t=e.tStartMs||0,o=t+(e.dDurationMs||0),a=e.segs||[],s=1===e.aAppend;if(a.length)if(s&&1===a.length&&"\n"===a[0].utf8)i++;else{for(let e=0;e<a.length;e++){const s=a[e],l=s.utf8||"";if(!l||"\n"===l)continue;const c=t+(s.tOffsetMs||0);let u;u=e+1<a.length?t+(a[e+1].tOffsetMs||0):o,n.push(new bh(l,c,u)),r.push(i)}i++}else i++}const o=[];for(const e of t){const t=1===e.aAppend,n=e.segs||[];t&&1===n.length&&"\n"===n[0].utf8&&o.push(e.tStartMs||0)}const a=[];for(let e=0;e<n.length-1;e++){const t=n[e],i=n[e+1];let s=i.startMs-t.startMs;s<0&&(s=0);let l=!1;for(const e of o)if(t.startMs<=e&&e<=i.startMs){l=!0;break}a.push(new wh(s,t,i,l,r[e]===r[e+1],e))}return{words:n,gaps:a,wordEventIds:r}}(e);if(!r.length)return[];const a=function(e,t,n){const r=[];for(let e=0;e<t.length;e++){const i=t[e],o=n[e]===n[e+1];r.push({gapMs:i.gapMs,isSameEvent:o})}const i=new Map,o=new Set;for(const e of r)e.isSameEvent?i.set(e.gapMs,(i.get(e.gapMs)||0)+1):o.add(e.gapMs);const a=r.filter(e=>e.isSameEvent).length,s=new Set;if(a<10)return s;for(const[e,t]of i){const n=t/a,i=o.has(e)?r.filter(t=>!t.isSameEvent&&t.gapMs===e).length/Math.max(r.filter(e=>!e.isSameEvent).length,1):0;n>=.08&&i<.02&&s.add(e)}return s}(0,i,o),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[];for(const r of e)null!==t&&t.has(r.gapMs)||n.push(r.gapMs);n.sort((e,t)=>e-t);const r=n.length;if(0===r)return new xh(0,0,0,0,0,0,0,0,0,0,0,0);const i=n.reduce((e,t)=>e+t,0)/r,o=Sh(n,50);let a=0;if(r>=2){const e=n.reduce((e,t)=>e+Math.pow(t-i,2),0)/(r-1);a=Math.sqrt(e)}const s=n[0],l=n[r-1],c=Sh(n,25),u=o,d=Sh(n,75),h=Sh(n,90),p=Sh(n,95),f=n.map(e=>Math.abs(e-o)).sort((e,t)=>e-t),g=f.length?Sh(f,50):0;return new xh(i,o,a,s,l,c,u,d,h,p,g,1.4826*g)}(i,a.size?a:null),l=h(h({},n),{},{defaultFillValues:a.size?a:null});let c=kh(r,i,s,l);c=function(e,t,n){const{minSentenceWords:r,maxDurationMs:i}=n;let o=0;const a=[];for(let n=0;n<t.length;n++){const s=t[n];if(s-o<r&&a.length&&!(s<e.length&&e[s].startsWithArrow)){const t=o>0?e[s].startMs-e[o-1].endMs:0,n=a.length>=2?a[a.length-2]:0,r=e[s-1].endMs-e[n].startMs;if(t<=3e3&&r<=i){a.pop(),o=a.length?a[a.length-1]:0;continue}}a.push(s),o=s}if(e.length-o<r&&a.length>=1){const t=a[a.length-1],n=t<e.length?e[t]:null;if(!n||!n.startsWithArrow){const n=t>0?e[t].startMs-e[t-1].endMs:0,r=a.length>=2?a[a.length-2]:0,o=e[e.length-1].endMs-e[r].startMs;n<=3e3&&o<=i&&a.pop()}}return a}(r,c,l);const u=function(e,t,n){const{maxDurationMs:r}=n,i=[],o=[0,...t];o[o.length-1]<e.length&&o.push(e.length);for(let t=0;t<o.length-1;t++){const n=o[t],r=o[t+1],a=e.slice(n,r);if(!a.length)continue;const s=a[0].startMs,l=a[a.length-1].endMs;i.push(new Ah(a,s,l,i.length))}const a=[];for(const e of i)e.durationMs<=r?a.push(e):a.push(..._h(e,r));for(let e=0;e<a.length-1;e++){const t=a[e+1].startMs;a[e].endMs>t&&(a[e].endMs=t)}for(let e=0;e<a.length;e++)a[e].index=e;return a}(r,c,l);return u.map(e=>({text:e.text,start:e.startMs,end:e.endMs}))}function Eh(){return String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/<[^>]+>/g,"").replace(/\u200B/g,"").trim().replace(/\s+/g," ")}function Ch(){let{flatEvents:e,usePause:t=!1,timeout:n=1e3,maxWords:r=15,maxDurationMs:i=1e4}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o={1:new Set(["actually","also","although","and","anyway","as","basically","because","but","eventually","frankly","honestly","hopefully","however","if","instead","it's","just","let's","like","literally","maybe","meanwhile","nevertheless","nonetheless","now","okay","or","otherwise","perhaps","personally","probably","right","since","so","suddenly","that's","then","there's","therefore","though","thus","unless","until","well","while"])},a=[];let s=[],l=0;const c=()=>{s.length>0&&a.push({text:s.map(e=>e.text).join(" ").trim(),start:s[0].start,end:s[s.length-1].end}),s=[],l=0};return e.forEach(e=>{if(!e.text)return;const a=s[s.length-1];if(a){const u=/[.?!…\])]$/.test(a.text),d=/[,]$/.test(a.text),h=e.start-a.end>n,p=e.start-s[0].start>=i,f=(t||d)&&l>=r,g=/^[[(♪]/.test(e.text),m=t&&o[1].has(e.text.toLowerCase().split(" ")[0])&&s.length>1;(u||h||p||f||g||m)&&c()}s.push(e),l+=e.text.split(/\s+/).length}),c(),a}function Ih(e,t){let{longSentenceThreshold:n=120}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null==e||!e.length)return[];if(["zh","ja","ko","th","lo","km","my"].some(e=>null==t?void 0:t.startsWith(e))){const t=[];if(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1;if(0===e.length)return!1;const r=e.filter(e=>e.text.length>t).length;return ht.debug("Youtube Provider: quality check",{longLinesCount:r,totalLines:e.length,percentage:r/e.length}),r/e.length>n}(e,5,.5))return e;let n=null;const r=30;for(const i of e)i.text?(n?(n.text+=i.text,n.end=i.end):n={text:i.text,start:i.start,end:i.end},n.text.length>=r&&(t.push(n),n=null)):n&&(t.push(n),n=null);return n&&t.push(n),t}let r=Ch({flatEvents:e});const i=[];for(const t of r)if(t.text.length>n){const n=e.filter(e=>e.start>=t.start&&e.start<t.end);if(n.length>1){ht.debug("Youtube Provider: re-processing long sentence with pause",{length:t.text.length,text:t.text.slice(0,50)+"..."});const e=Ch({flatEvents:n,usePause:!0});i.push(...e)}else i.push(t)}else i.push(t);return r=i,r}function Ph(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{useAlgorithmBreaker:i}=r;if("statistical"===i){ht.info("Youtube Provider: Sentence break mode: STATISTICAL");const t=function(e){try{return Th({events:e}).map(e=>({text:e.text,start:e.start,end:e.end,translation:""}))}catch(e){return ht.info("Youtube Provider: Error in algorithmic segmentation",e),null}}(e);return null!=t&&t.length?t:(ht.info("Youtube Provider: Statistical segmentation returned empty"),[])}return ht.info("Youtube Provider: Sentence break mode: RULE"),Ih(t,n,{longSentenceThreshold:r.longSentenceThreshold})}function Lh(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:240;const o=/^\[.+\]$/i,a="prev"===n?e[t-1]:e[t+1];if(null==a||!a.length)return"";return("prev"===n?a.slice(-r):a.slice(0,r)).map(e=>{var t;return String(null!==(t=null==e?void 0:e.text)&&void 0!==t?t:"").trim()}).filter(e=>e&&!o.test(e)).join(" ").replace(/\s+/g," ").trim().slice(0,i)}async function Rh(e){let{videoId:t,fromLang:n,toLang:r,chunkEvents:i,segApiSetting:o,apiSubtitle:a,docInfo:s,formatSubtitles:l,clearSegmentTranslation:c,prevContext:u="",nextContext:d=""}=e;const p=/^\[.+\]$/i,f=[],g=[];for(const e of i)e.text&&(p.test(e.text.trim())?g.push(e):f.push(e));const m=e=>({start:e.start,end:e.end,text:e.text,translation:e.text});if(!f.length)return g.map(m);try{const e="".concat(f[0].start," --\x3e ").concat(f[f.length-1].end);ht.debug("Youtube Provider: aiSegment events",{videoId:t,chunkSign:e,fromLang:n,toLang:r,speechEvents:f});const i=await a({videoId:t,chunkSign:e,fromLang:n,toLang:r,events:f,apiSetting:o,docInfo:s,prevContext:u,nextContext:d});if(ht.debug("Youtube Provider: aiSegment subtitles",i),Array.isArray(i)&&i.length){let e=i;c&&(e=i.map(e=>h(h({},e),{},{translation:""})));const p=Math.max(...e.map(e=>{var t;return null!==(t=e._ei)&&void 0!==t?t:-1}));if(p>=0&&p<f.length-1){const i=f.slice(p+1);if(i.length<=.5*f.length)try{var v;const c="".concat(i[0].start," --\x3e ").concat(i[i.length-1].end),h=(null===(v=e[e.length-1])||void 0===v?void 0:v.text)||"",p=await a({videoId:t,chunkSign:c,fromLang:n,toLang:r,events:i,apiSetting:o,docInfo:s,prevContext:[u,h].filter(Boolean).join(" "),nextContext:d});e=null!=p&&p.length?[...e,...p]:[...e,...l(i,n)]}catch(t){e=[...e,...l(i,n)]}}const y=g.filter(t=>!e.some(e=>t.start<e.end&&t.end>e.start)).map(m);return[...e,...y].sort((e,t)=>e.start-t.start)}}catch(e){ht.info("Youtube Provider: ai segmentation",e)}return g.map(m)}async function Nh(e){let{videoId:t,events:n,flatEvents:r,fromLang:i,setting:o,processingVersion:a,isStaleProcessing:s,showNotification:l,i18n:c,apiSubtitle:u,docInfo:d,builtinSegment:h,formatSubtitles:p,onAppendSubtitles:f,getCurrentVideoId:g}=e;const{segSlug:m,transApis:v,chunkLength:y,toLang:b}=o,w=null==v?void 0:v.find(e=>e.apiSlug===m);if(m&&"-"!==m&&w){if(s(a))return[[],0];ht.info("Youtube Provider: Starting AI segmentation..."),l(c("ai_processing_pls_wait"));const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(!e||0===e.length)return[];const n=[];let r=[],i=0;const o=t+500;for(let a=0;a<e.length;a++){const s=e[a];if(r.push(s),i+=s.text.length,a===e.length-1)continue;let l=!1;if(i>=o)l=!0;else if(i>=t){const t=/[.?!…\])]$/.test(s.text),n=e[a+1].start-s.end;(t||n>1e3)&&(l=!0)}l&&(n.push(r),r=[],i=0)}return r.length>0&&n.push(r),n}(r,y);if(0===e.length)return ht.info("Youtube Provider: AI no chunks, falling back to built-in"),[h(n,r,i,o),100];const m=e[0],v=await Rh({videoId:t,chunkEvents:m,fromLang:i,toLang:b,segApiSetting:w,apiSubtitle:u,docInfo:d,formatSubtitles:p,clearSegmentTranslation:w.apiSlug!==o.apiSlug,prevContext:"",nextContext:Lh(e,0,"next")});if(s(a))return[[],0];if(null==v||!v.length)return ht.info("Youtube Provider: AI failed, falling back to built-in"),[h(n,r,i,o),100];if(ht.info("Youtube Provider: Sentence break mode: AI"),e.length>1){!async function(e){let{chunks:t,startIndex:n=0,videoId:r,fromLang:i,toLang:o,segApiSetting:a,setting:s,processingVersion:l,isStaleProcessing:c,apiSubtitle:u,docInfo:d,formatSubtitles:h,onAppendSubtitles:p,getCurrentVideoId:f}=e;ht.info("Youtube Provider: Starting async from chunk ".concat(n+1,"/").concat(t.length,"."));for(let e=n;e<t.length;e++){var g,m;if(c(l)){ht.info("Youtube Provider: Skip stale chunk processing.");break}const n=t[e],v=e+1;ht.debug("Youtube Provider: Processing subtitle chunk ".concat(v,"/").concat(t.length,": ").concat(null===(g=n[0])||void 0===g?void 0:g.start," --\x3e ").concat(null===(m=n[n.length-1])||void 0===m?void 0:m.start));let y=[];try{const p=await Rh({videoId:r,chunkEvents:n,fromLang:i,toLang:o,segApiSetting:a,apiSubtitle:u,docInfo:d,formatSubtitles:h,clearSegmentTranslation:a.apiSlug!==s.apiSlug,prevContext:Lh(t,e,"prev"),nextContext:Lh(t,e,"next")});if(c(l))break;(null==p?void 0:p.length)>0?y=p:(ht.debug("Youtube Provider: AI segmentation for chunk ".concat(v," returned no data.")),y=h(n,i))}catch(e){y=h(n,i)}if(r!==f()||c(l)){ht.info("Youtube Provider: videoId changed or track replaced!",r,f());break}if(y.length>0){const e=Math.floor(100*v/t.length);ht.debug("Youtube Provider: Appending ".concat(y.length," subtitles from chunk ").concat(v," (").concat(e,"%).")),p({subtitles:y,progressed:e,chunkNum:v})}else ht.debug("Youtube Provider: Chunk ".concat(v," no subtitles."));await Nn(Gn(500,1e3))}ht.info("Youtube Provider: All subtitle chunks processed.")}({chunks:e,startIndex:1,videoId:t,fromLang:i,toLang:b,segApiSetting:w,setting:o,processingVersion:a,isStaleProcessing:s,apiSubtitle:u,docInfo:d,formatSubtitles:p,onAppendSubtitles:f,getCurrentVideoId:g});return[v,Math.floor(100/e.length)]}return[v,100]}return[h(n,r,i,o),100]}var Oh=i(8661),jh=i(6811),zh=i(457),Mh=i(5449),Dh=i(5089),Bh=Ir("hostElement"),Fh=Ir("reactRoot"),Wh=Ir("isVisible"),Uh=Ir("isProcessing"),Vh=Ir("mount");class Hh{constructor(e){let{id:t,className:n="",reactComponent:r,props:i={},rootElement:o=document.body}=e;if(Object.defineProperty(this,Vh,{value:Gh}),Object.defineProperty(this,Bh,{writable:!0,value:null}),Object.defineProperty(this,Fh,{writable:!0,value:null}),Object.defineProperty(this,Wh,{writable:!0,value:!1}),Object.defineProperty(this,Uh,{writable:!0,value:!1}),!t||!r)throw new Error("ID and a React Component must be provided.");this._id=t,this._className=n,this._ReactComponent=r,this._props=i,this._rootElement=o}get isVisible(){return Er(this,Wh)[Wh]}show(e){if(!Er(this,Wh)[Wh]&&!Er(this,Uh)[Uh]){if(!Er(this,Bh)[Bh]){Er(this,Uh)[Uh]=!0;try{Er(this,Vh)[Vh](e||this._props)}catch(e){return ht.warn('Failed to mount component with id "'.concat(this._id,'":'),e),void(Er(this,Uh)[Uh]=!1)}finally{Er(this,Uh)[Uh]=!1}}Er(this,Bh)[Bh].style.display="",Er(this,Wh)[Wh]=!0}}hide(){Er(this,Wh)[Wh]&&Er(this,Bh)[Bh]&&(Er(this,Bh)[Bh].style.display="none",Er(this,Wh)[Wh]=!1)}destroy(){Er(this,Bh)[Bh]&&(Er(this,Uh)[Uh]=!0,Er(this,Fh)[Fh]&&Er(this,Fh)[Fh].unmount(),Er(this,Bh)[Bh].remove(),Er(this,Bh)[Bh]=null,Er(this,Fh)[Fh]=null,Er(this,Wh)[Wh]=!1,Er(this,Uh)[Uh]=!1,ht.info('Component with id "'.concat(this._id,'" has been destroyed.')))}toggle(e){Er(this,Wh)[Wh]?this.hide():this.show(e||this._props)}updateProps(e){if(Er(this,Fh)[Fh]&&Er(this,Bh)[Bh]){const t=this._ReactComponent,n=(0,Mh.A)({key:this._id,prepend:!0});Er(this,Fh)[Fh].render((0,Dh.jsx)(Oh.StrictMode,{children:(0,Dh.jsx)(zh.C,{value:n,children:(0,Dh.jsx)(t,h({},e))})}))}}}function Gh(e){const t=document.createElement("div");t.id=this._id,this._className&&(t.className=this._className),this._rootElement.appendChild(t),Er(this,Bh)[Bh]=t;const n=(0,Mh.A)({key:this._id,prepend:!0}),r=h(h({},e),{},{onClose:this.hide.bind(this)}),i=this._ReactComponent;Er(this,Fh)[Fh]=jh.createRoot(t),Er(this,Fh)[Fh].render((0,Dh.jsx)(Oh.StrictMode,{children:(0,Dh.jsx)(zh.C,{value:n,children:(0,Dh.jsx)(i,h({},r))})}))}function qh(e,t){const n=document.createElementNS("http://www.w3.org/2000/svg",e);for(const e in t)n.setAttribute(e,t[e]);return n}function Kh(){const e=qh("svg",{viewBox:"-20 0 100 100",style:"display: inline-block; width: 1em; height: 1em; vertical-align: middle;"});return[{cx:"6",begin:"0.1",values:"0 15 ; 0 -15; 0 15"},{cx:"30",begin:"0.2",values:"0 10 ; 0 -10; 0 10"},{cx:"54",begin:"0.3",values:"0 5 ; 0 -5; 0 5"}].forEach(t=>{const n=qh("circle",{fill:"#209CEE",stroke:"none",cx:t.cx,cy:"50",r:"6"}),r=qh("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:t.values,repeatCount:"indefinite",begin:t.begin});n.appendChild(r),e.appendChild(n)}),e}function $h(){let{width:e="24",height:t="24",viewBox:n="-5 -5 40 40",isSelected:r=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=qh("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:n,version:"1.1"}),o="#209CEE",a="#E9F5FD",s=r?o:a,l=qh("path",{d:"M0 0 C10.56 0 21.12 0 32 0 C32 10.56 32 21.12 32 32 C21.44 32 10.88 32 0 32 C0 21.44 0 10.88 0 0 Z ",fill:r?a:o,transform:"translate(0,0)"}),c=qh("path",{d:"M0 0 C0.66 0 1.32 0 2 0 C2 2.97 2 5.94 2 9 C2.969375 8.2575 3.93875 7.515 4.9375 6.75 C5.48277344 6.33234375 6.02804688 5.9146875 6.58984375 5.484375 C8.39053593 3.83283924 8.39053593 3.83283924 9 0 C13.95 0 18.9 0 24 0 C24 0.99 24 1.98 24 3 C22.68 3 21.36 3 20 3 C20 9.27 20 15.54 20 22 C19.01 22 18.02 22 17 22 C17 15.73 17 9.46 17 3 C15.35 3 13.7 3 12 3 C11.731875 3.598125 11.46375 4.19625 11.1875 4.8125 C10.01506533 6.97224808 8.80630718 8.35790256 7 10 C8.01790655 12.27071461 8.77442829 13.80784632 10.6875 15.4375 C11.120625 15.953125 11.55375 16.46875 12 17 C11.6875 19.6875 11.6875 19.6875 11 22 C10.34 22 9.68 22 9 22 C8.773125 21.236875 8.54625 20.47375 8.3125 19.6875 C6.73268318 16.45263699 5.16717283 15.58358642 2 14 C2 16.64 2 19.28 2 22 C1.34 22 0.68 22 0 22 C0 14.74 0 7.48 0 0 Z ",fill:s,transform:"translate(4,5)"});return i.appendChild(l),i.appendChild(c),i}function Yh(e){let{children:t}=e;return(0,Dh.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t})}function Xh(e){let{children:t,onClick:n,disabled:r=!1}=e;const[i,o]=(0,Oh.useState)(!1);return(0,Dh.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0px 8px",opacity:i?1:.8,background:"rgba(255, 255, 255, ".concat(i?.1:0,")"),cursor:r?"default":"pointer",transition:"background 0.2s, opacity 0.2s",borderRadius:5},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:n,children:t})}function Jh(e){let{label:t,name:n,value:r,onChange:i,disabled:o}=e;const a=(0,Oh.useCallback)(()=>{o||i({name:n,value:!r})},[o,i,n,r]);return(0,Dh.jsxs)(Xh,{onClick:a,disabled:o,children:[(0,Dh.jsx)(Yh,{children:t}),(0,Dh.jsx)("div",{style:{width:40,height:24,borderRadius:12,background:r?"rgba(32,156,238,.8)":"rgba(255,255,255,.3)",position:"relative"},children:(0,Dh.jsx)("div",{style:{width:20,height:20,borderRadius:10,position:"absolute",left:2,top:2,background:"rgba(255,255,255,.9)",transform:"translateX(".concat(r?16:0,"px)")}})})]})}function Qh(e){let{label:t,name:n,value:r,options:i,onChange:o,disabled:a}=e;const[s,l]=(0,Oh.useState)(!1),c=(0,Oh.useMemo)(()=>i.find(e=>e.value===r)||i[0],[i,r]),u=(0,Oh.useCallback)(()=>{a||l(e=>!e)},[a]),d=(0,Oh.useCallback)(e=>{o({name:n,value:e}),l(!1)},[o,n]);return(0,Dh.jsxs)("div",{style:{position:"relative"},children:[(0,Dh.jsxs)(Xh,{onClick:u,disabled:a,children:[(0,Dh.jsx)(Yh,{children:t}),(0,Dh.jsx)("div",{style:{fontSize:12,opacity:.8,maxWidth:130,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null==c?void 0:c.label)||""})]}),s&&(0,Dh.jsx)("div",{style:{position:"absolute",right:0,top:"100%",background:"rgba(0,0,0,.8)",borderRadius:5,minWidth:250,maxHeight:200,overflow:"auto",zIndex:1e3,marginTop:4},children:i.map(e=>(0,Dh.jsx)("div",{onClick:()=>d(e.value),style:{padding:"8px 12px",cursor:"pointer",background:e.value===r?"rgba(32,156,238,.3)":"transparent",opacity:e.value===r?1:.8,transition:"all 0.2s"},onMouseEnter:e=>{e.currentTarget.style.background="rgba(255,255,255,.1)"},onMouseLeave:t=>{t.currentTarget.style.background=e.value===r?"rgba(32,156,238,.3)":"transparent"},children:e.label},e.value))})]})}function Zh(e){let{label:t,onClick:n,disabled:r}=e;const i=(0,Oh.useCallback)(()=>{r||n()},[r,n]);return(0,Dh.jsx)(Xh,{onClick:i,disabled:r,children:(0,Dh.jsx)(Yh,{children:t})})}function ep(e){let{i18n:t,formData:n,progressed:r=0,updateSetting:i,downloadSubtitle:o,transApis:a}=e;const s=(0,Oh.useCallback)(e=>{let{name:t,value:n}=e;i({name:t,value:n})},[i]),l=(0,Oh.useMemo)(()=>(a||[]).filter(e=>!e.isDisabled),[a]),c=(0,Oh.useMemo)(()=>l.filter(e=>de.ai.has(e.apiType)),[l]),u=(0,Oh.useMemo)(()=>{const e=[{value:"-",label:t("disable")||"禁用"}];return c.forEach(t=>{e.push({value:t.apiSlug,label:t.apiName})}),e},[c,t]),d=(0,Oh.useMemo)(()=>{const e=[{value:"-",label:t("disable")||"禁用"}];return c.forEach(t=>{e.push({value:t.apiSlug,label:t.apiName})}),e},[c,t]),h=(0,Oh.useMemo)(()=>t(0===r?"waiting_subtitles":100===r?"download_subtitles":"processing_subtitles"),[r,t]),{segSlug:p,skipAd:f,isBilingual:g,blurTranslation:m,showOrigin:v,aiContextSlug:y}=n;return(0,Dh.jsxs)("div",{style:{position:"absolute",left:0,bottom:100,background:"rgba(0,0,0,.6)",width:250,lineHeight:"40px",fontSize:16,padding:8,borderRadius:5},children:[(0,Dh.jsx)(Qh,{onChange:s,name:"segSlug",value:p||"-",options:u,label:t("ai_segmentation"),disabled:u.length<=1}),(0,Dh.jsx)(Qh,{onChange:s,name:"aiContextSlug",value:y||"-",options:d,label:t("ai_enhanced_context"),disabled:d.length<=1}),(0,Dh.jsx)(Jh,{onChange:s,name:"isBilingual",value:g,label:t("is_bilingual_view")}),(0,Dh.jsx)(Jh,{onChange:s,name:"blurTranslation",value:m,label:t("is_blur_translation")}),(0,Dh.jsx)(Jh,{onChange:s,name:"showOrigin",value:v,label:t("show_origin_subtitle")}),(0,Dh.jsx)(Jh,{onChange:s,name:"skipAd",value:f,label:t("is_skip_ad")}),(0,Dh.jsx)(Zh,{label:"".concat(h," [").concat(r,"%] "),onClick:o,disabled:100!==r})]})}const tp=".ytp-right-controls",np="#ytp-caption-window-container",rp="button.ytp-subtitles-button";function ip(e,t){const n=document.querySelector(e);if(n)return void t(n);new MutationObserver((n,r)=>{const i=document.querySelector(e);i&&(r.disconnect(),t(i))}).observe(document.body,{childList:!0,subtree:!0})}var op=Ir("getSetting"),ap=Ir("getMenuProps"),sp=Ir("getVideoEl"),lp=Ir("toggleButton"),cp=Ir("isMenuShow"),up=Ir("menuManager"),dp=Ir("notificationEl"),hp=Ir("notificationTimeout");class pp{constructor(e){let{getSetting:t,getMenuProps:n,getVideoEl:r}=e;Object.defineProperty(this,op,{writable:!0,value:void 0}),Object.defineProperty(this,ap,{writable:!0,value:void 0}),Object.defineProperty(this,sp,{writable:!0,value:void 0}),Object.defineProperty(this,lp,{writable:!0,value:null}),Object.defineProperty(this,cp,{writable:!0,value:!1}),Object.defineProperty(this,up,{writable:!0,value:null}),Object.defineProperty(this,dp,{writable:!0,value:null}),Object.defineProperty(this,hp,{writable:!0,value:null}),Er(this,op)[op]=t,Er(this,ap)[ap]=n,Er(this,sp)[sp]=r}updateMenuProps(){Er(this,up)[up]&&Er(this,cp)[cp]&&Er(this,up)[up].updateProps(Er(this,ap)[ap]())}injectToggleButton(e){if(!0===Er(this,op)[op]().hideSubtitleButton||!e||e.querySelector(".kiss-subtitle-button"))return;const n=document.createElement("div");n.className="notranslate kiss-subtitle-controls",Object.assign(n.style,{height:"100%",position:"relative"});const r=document.createElement("button");r.className="ytp-button kiss-subtitle-button",r.title=t,r.appendChild($h()),n.appendChild(r),Er(this,up)[up]=new Hh({id:"kiss-subtitle-menus",className:"notranslate",reactComponent:ep,rootElement:n,props:Er(this,ap)[ap]()}),r.onclick=()=>{var e,t;Er(this,cp)[cp]?(Er(this,cp)[cp]=!1,null===(e=Er(this,lp)[lp])||void 0===e||e.replaceChildren($h()),Er(this,up)[up].hide()):(Er(this,cp)[cp]=!0,null===(t=Er(this,lp)[lp])||void 0===t||t.replaceChildren($h({isSelected:!0})),Er(this,up)[up].show(),this.updateMenuProps())},Er(this,lp)[lp]=r,null==e||e.prepend(n)}removeToggleButton(){var e,t;Er(this,cp)[cp]=!1,null===(e=Er(this,up)[up])||void 0===e||e.destroy(),Er(this,up)[up]=null;const n=(null===(t=Er(this,lp)[lp])||void 0===t?void 0:t.closest(".kiss-subtitle-controls"))||document.querySelector(".kiss-subtitle-controls");null==n||n.remove(),Er(this,lp)[lp]=null}hideYtCaption(){const e=document.querySelector(np);e&&(e.style.top="-10000px")}showYtCaption(){const e=document.querySelector(np);e&&(e.style.top="0")}createNotificationElement(){var e;const t=document.createElement("div");t.className="kiss-notification",Object.assign(t.style,{position:"absolute",top:"16px",left:"50%",transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.5)",color:"#fff",padding:"8px 12px",borderRadius:"8px",zIndex:"2147483647",opacity:"0",transition:"opacity 0.3s ease-in-out",pointerEvents:"none",fontSize:"16px",lineHeight:"1.4",width:"auto",maxWidth:"min(360px, calc(100% - 32px))",textAlign:"left",boxSizing:"border-box",boxShadow:"0 2px 8px rgba(0,0,0,0.25)"});const n=Er(this,sp)[sp](),r=null==n||null===(e=n.parentElement)||void 0===e?void 0:e.parentElement;r&&(r.appendChild(t),Er(this,dp)[dp]=t)}hideNotification(){clearTimeout(Er(this,hp)[hp]),Er(this,dp)[dp]&&(Er(this,dp)[dp].style.opacity="0")}showNotification(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3;!1!==Er(this,op)[op]().showLoadNotification?(Er(this,dp)[dp]||this.createNotificationElement(),Er(this,dp)[dp]&&(Er(this,dp)[dp].textContent=e,Er(this,dp)[dp].style.opacity="1",clearTimeout(Er(this,hp)[hp]),Er(this,hp)[hp]=setTimeout(()=>{this.hideNotification()},t))):this.hideNotification()}}var fp=Ir("setting"),gp=Ir("subtitles"),mp=Ir("events"),vp=Ir("flatEvents"),yp=Ir("progressedNum"),bp=Ir("fromLang"),wp=Ir("docInfo"),xp=Ir("fullDescription"),Ap=Ir("processingId"),Sp=Ir("processingVersion"),kp=Ir("activeTrackKey"),_p=Ir("managerInstance"),Tp=Ir("i18n"),Ep=Ir("playerUi"),Cp=Ir("ytSubtitleStateObserver"),Ip=Ir("subtitleListManager"),Pp=Ir("videoId"),Lp=Ir("videoEl"),Rp=Ir("progressed"),Np=Ir("observeYtSubtitleState"),Op=Ir("syncYtSubtitleState"),jp=Ir("isYtSubtitleEnabled"),zp=Ir("moAds"),Mp=Ir("toggleShowOrigin"),Dp=Ir("getMenuProps"),Bp=Ir("isStaleProcessing"),Fp=Ir("handleInterceptedRequest"),Wp=Ir("processEvents"),Up=Ir("appendProcessedSubtitles"),Vp=Ir("reProcessEvents"),Hp=Ir("enrichDocInfoWithAI"),Gp=Ir("reProcessEventsWithContext"),qp=Ir("startManager"),Kp=Ir("destroyManager");class $p{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,Kp,{value:ff}),Object.defineProperty(this,qp,{value:pf}),Object.defineProperty(this,Gp,{value:hf}),Object.defineProperty(this,Hp,{value:df}),Object.defineProperty(this,Vp,{value:uf}),Object.defineProperty(this,Up,{value:cf}),Object.defineProperty(this,Wp,{value:lf}),Object.defineProperty(this,Fp,{value:sf}),Object.defineProperty(this,Bp,{value:af}),Object.defineProperty(this,Dp,{value:of}),Object.defineProperty(this,Mp,{value:rf}),Object.defineProperty(this,zp,{value:nf}),Object.defineProperty(this,jp,{value:tf}),Object.defineProperty(this,Op,{value:ef}),Object.defineProperty(this,Np,{value:Zp}),Object.defineProperty(this,Rp,{get:Qp,set:Jp}),Object.defineProperty(this,Lp,{get:Xp,set:void 0}),Object.defineProperty(this,Pp,{get:Yp,set:void 0}),Object.defineProperty(this,fp,{writable:!0,value:{}}),Object.defineProperty(this,gp,{writable:!0,value:[]}),Object.defineProperty(this,mp,{writable:!0,value:[]}),Object.defineProperty(this,vp,{writable:!0,value:[]}),Object.defineProperty(this,yp,{writable:!0,value:0}),Object.defineProperty(this,bp,{writable:!0,value:"auto"}),Object.defineProperty(this,wp,{writable:!0,value:{}}),Object.defineProperty(this,xp,{writable:!0,value:""}),Object.defineProperty(this,Ap,{writable:!0,value:null}),Object.defineProperty(this,Sp,{writable:!0,value:0}),Object.defineProperty(this,kp,{writable:!0,value:null}),Object.defineProperty(this,_p,{writable:!0,value:null}),Object.defineProperty(this,Tp,{writable:!0,value:()=>""}),Object.defineProperty(this,Ep,{writable:!0,value:null}),Object.defineProperty(this,Cp,{writable:!0,value:null}),Object.defineProperty(this,Ip,{writable:!0,value:null}),Er(this,fp)[fp]=h(h({},e),{},{showOrigin:!1}),Er(this,Tp)[Tp]=Wt(e.uiLang||"zh"),Er(this,Ep)[Ep]=new pp({getSetting:()=>Er(this,fp)[fp],getMenuProps:()=>Er(this,Dp)[Dp](),getVideoEl:()=>Er(this,Lp)[Lp]})}initialize(){window.addEventListener("message",e=>{var t;if("KISS_XHR_DATA_YOUTUBE"===(null===(t=e.data)||void 0===t?void 0:t.type)){const{url:t,response:n}=e.data;t&&n&&Er(this,Fp)[Fp](t,n)}}),window.addEventListener("yt-navigate-finish",()=>{ht.debug("Youtube Provider: yt-navigate-finish",Er(this,Pp)[Pp]),Er(this,Kp)[Kp](),Ao(Er(this,fp)[fp].apiSlug),Er(this,gp)[gp]=[],Er(this,mp)[mp]=[],Er(this,vp)[vp]=[],Er(this,Rp)[Rp]=0,Er(this,bp)[bp]="auto",Er(this,wp)[wp]={},Er(this,xp)[xp]="",Er(this,Ap)[Ap]=null,Er(this,Sp)[Sp]+=1,Er(this,kp)[kp]=null,Er(this,Ep)[Ep].updateMenuProps()}),ip(tp,e=>{const t=e.querySelector(rp);t&&Er(this,Np)[Np](t),Er(this,Ep)[Ep].injectToggleButton(e)}),ip(".video-ads",e=>{Er(this,zp)[zp](e)})}updateSetting(e){let{name:t,value:n}=e;var r;Er(this,fp)[fp][t]!==n&&(ht.debug("Youtube Provider: update setting",t,n),Er(this,fp)[fp][t]=n,Er(this,Ep)[Ep].updateMenuProps(),"isBilingual"===t||"blurTranslation"===t?null===(r=Er(this,_p)[_p])||void 0===r||r.updateSetting({[t]:n}):"segSlug"===t?Er(this,Vp)[Vp]():"showOrigin"===t?Er(this,Mp)[Mp]():"aiContextSlug"===t?Er(this,Gp)[Gp]():"showLoadNotification"===t&&!1===n?Er(this,Ep)[Ep].hideNotification():"hideSubtitleButton"===t&&(!0===n?Er(this,Ep)[Ep].removeToggleButton():Er(this,Ep)[Ep].injectToggleButton(document.querySelector(tp))))}downloadSubtitle(){if(Er(this,gp)[gp].length&&100===Er(this,Rp)[Rp])try{qn(_o(Er(this,gp)[gp]),"kiss-subtitles-".concat(Er(this,Pp)[Pp],"_").concat(Date.now(),".vtt"))}catch(e){ht.info("Youtube Provider: download subtitles:",e)}else ht.debug("Youtube Provider: The subtitle is not yet ready.")}}function Yp(){return new URL(document.location.href).searchParams.get("v")}function Xp(){return document.querySelector("#container video")}function Jp(e){Er(this,yp)[yp]=e,Er(this,Ep)[Ep].updateMenuProps()}function Qp(){return Er(this,yp)[yp]}function Zp(e){var t;null===(t=Er(this,Cp)[Cp])||void 0===t||t.disconnect(),Er(this,Cp)[Cp]=new MutationObserver(()=>{Er(this,Op)[Op](e)}),Er(this,Cp)[Cp].observe(e,{attributes:!0,attributeFilter:["aria-pressed"]}),Er(this,Op)[Op](e)}function ef(e){"true"===e.getAttribute("aria-pressed")?Er(this,qp)[qp]():Er(this,Kp)[Kp]()}function tf(){const e=document.querySelector(rp);return!e||"true"===e.getAttribute("aria-pressed")}function nf(e){const t=".ytp-ad-player-overlay-layout",n=".ytp-skip-ad-button, .ytp-ad-skip-button, .ytp-ad-skip-button-modern";new MutationObserver(e=>{const{skipAd:r=!1}=Er(this,fp)[fp];for(const i of e){if("childList"!==i.type)continue;const e=Er(this,Lp)[Lp];i.addedNodes.forEach(i=>{if(i.nodeType===Node.ELEMENT_NODE){var o;if(i.matches(t))ht.debug("Youtube Provider: AD start playing!",i),e&&r&&(e.playbackRate=16,e.currentTime=e.duration),null===(o=Er(this,_p)[_p])||void 0===o||o.setIsAdPlaying(!0);else i.matches(n)&&r&&(ht.debug("Youtube Provider: AD skip button!",i),i.click());if(r){const e=null==i?void 0:i.querySelector(n);e&&(ht.debug("Youtube Provider: AD skip button!!",e),e.click())}}}),i.removedNodes.forEach(n=>{var i;n.nodeType===Node.ELEMENT_NODE&&(n.matches(t)&&(ht.debug("Youtube Provider: Ad ends!"),Er(this,fp)[fp].showOrigin||Er(this,Ep)[Ep].hideYtCaption(),e&&r&&(e.playbackRate=1),null===(i=Er(this,_p)[_p])||void 0===i||i.setIsAdPlaying(!1)))})}}).observe(e,{childList:!0,subtree:!0})}function rf(){Er(this,fp)[fp].showOrigin?Er(this,Kp)[Kp]():Er(this,qp)[qp]()}function of(){const{transApis:e,segSlug:t,skipAd:n,isBilingual:r,blurTranslation:i,showOrigin:o,aiContextSlug:a}=Er(this,fp)[fp];return{i18n:Er(this,Tp)[Tp],updateSetting:this.updateSetting.bind(this),downloadSubtitle:this.downloadSubtitle.bind(this),transApis:e,progressed:Er(this,yp)[yp],formData:{segSlug:t,skipAd:n,isBilingual:r,blurTranslation:i,showOrigin:o,aiContextSlug:a}}}function af(e){return e!==Er(this,Sp)[Sp]}async function sf(e,t){const n=Er(this,Pp)[Pp];if(!n)return void ht.debug("Youtube Provider: videoId not found.");const r=new URL(e);if(n!==r.searchParams.get("v"))return void ht.debug("Youtube Provider: skip other timedtext:",n);const i=r.searchParams.get("lang");if(!i)return void ht.debug("Youtube Provider: timedtext lang not found:",e);const o=r.searchParams.get("kind")||null,a=function(e){const t=e.searchParams;return[t.get("v")||"",t.get("lang")||"",t.get("kind")||"",t.get("name")||"",t.get("tlang")||""].join("|")}(r),s=function(e){return"zh"===e?"zh-CN":we.get(e)||we.get(e.slice(0,2))||Se[B].get(e)||Se[B].get(e.slice(0,2))||"auto"}(i);if(Er(this,vp)[vp].length&&a===Er(this,kp)[kp])return void ht.debug("Youtube Provider: track was processed:",a);if(Er(this,Ap)[Ap]===a)return void ht.debug("Youtube Provider: track is processing:",a);const l=Er(this,Sp)[Sp]+=1;Er(this,Ap)[Ap]=a,Er(this,vp)[vp].length&&(Er(this,Kp)[Kp](),Ao(Er(this,fp)[fp].apiSlug),Er(this,gp)[gp]=[],Er(this,mp)[mp]=[],Er(this,vp)[vp]=[],Er(this,Rp)[Rp]=0,Er(this,kp)[kp]=null);try{Er(this,Ep)[Ep].showNotification(Er(this,Tp)[Tp]("starting_to_process_subtitle"));const{toLang:e}=Er(this,fp)[fp],{captionTracks:c,fullDescription:u}=await async function(e){try{var t,n,r;const i="https://www.youtube.com/watch?v=".concat(e),o=await fetch(i).then(e=>e.text()),a=o.match(/ytInitialPlayerResponse\s*=\s*(\{[^]*?\});/);if(!a)return{};const s=JSON.parse(a[1]);return{captionTracks:null===(t=s.captions)||void 0===t||null===(n=t.playerCaptionsTracklistRenderer)||void 0===n?void 0:n.captionTracks,fullDescription:(null===(r=s.videoDetails)||void 0===r?void 0:r.shortDescription)||""}}catch(e){return ht.info("Youtube Provider: get captionTracks",e),{}}}(n);if(Er(this,Bp)[Bp](l))return;Er(this,xp)[xp]=u||"";const d=function(e,t,n){if(ht.debug("Youtube Provider: find caption track",{captionTracks:e,lang:t,kind:n}),null==e||!e.length)return null;let r=e.find(e=>e.languageCode===t&&(e.kind||null)===(n||null));if(r||(r=e.find(e=>e.languageCode===t)),!r){const t=e.find(e=>"asr"===e.kind);t&&(r=e.find(e=>"asr"!==e.kind&&mh(e.languageCode,t.languageCode)),r||(r=t))}if(r||(r=e.pop()),r&&vh(r)){ht.debug("Youtube Provider: detected chat subtitle track, switching to normal subtitle");const n=e.find(e=>mh(e.languageCode,t)&&!vh(e));if(n)ht.debug("Youtube Provider: switched to same-language non-chat track"),r=n;else{const t=e.find(e=>!vh(e));t&&(ht.debug("Youtube Provider: switched to fallback non-chat track"),r=t)}}return r}(c,i,o);if(!d)return void ht.debug("Youtube Provider: CaptionTrack not found:",n);d.baseUrl.startsWith("https")||(d.baseUrl=window.location.origin+d.baseUrl);const p=new URL(d.baseUrl),f=await async function(e,t,n){if(!t.searchParams.get("tlang")&&t.searchParams.get("kind")===e.searchParams.get("kind")&&mh(t.searchParams.get("lang"),e.searchParams.get("lang")))try{const e=JSON.parse(n);return null==e?void 0:e.events}catch(e){return ht.info("Youtube Provider: parse responseText",e),null}try{t.searchParams.delete("tlang"),t.searchParams.delete("name"),t.searchParams.set("lang",e.searchParams.get("lang")),t.searchParams.set("fmt","json3"),e.searchParams.get("kind")?t.searchParams.set("kind",e.searchParams.get("kind")):t.searchParams.delete("kind");const n=await fetch(t.href);if(null!=n&&n.ok){const e=await n.json();return null==e?void 0:e.events}return ht.info("Youtube Provider: Failed to fetch subtitles: ".concat(n.status)),null}catch(e){return ht.info("Youtube Provider: fetching subtitles error",e),null}}(p,r,t);if(Er(this,Bp)[Bp](l))return;if(null==f||!f.length)return void ht.debug("Youtube Provider: events not got:",n);if(ht.debug("Youtube Provider: lang: ".concat(i,", fromLang: ").concat(s,", toLang: ").concat(e)),mh(s,e))return ht.debug("Youtube Provider: skip same lang",s,e),void Er(this,Ep)[Ep].showNotification(Er(this,Tp)[Tp]("subtitle_same_lang"));const g=function(){const e=[];let t="";return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(n=>{var r;const{segs:i=[],tStartMs:o=0,dDurationMs:a=0}=n||{};if(1===(null==n?void 0:n.aAppend)&&1===i.length&&"\n"===(null===(r=i[0])||void 0===r?void 0:r.utf8))return e.push(n),void(t="");const s=i.map(e=>h(h({},e),{},{utf8:Eh(null==e?void 0:e.utf8)})),l=s.filter(e=>e.utf8);if(!l.length)return e.push(h(h({},n),{},{segs:s})),void(t="");const c=l.map(e=>e.utf8).join(" ").replace(/\s+/g," ").trim(),u="".concat(o,"|").concat(a,"|").concat(c);u!==t&&(e.push(h(h({},n),{},{segs:s})),t=u)}),e}(f),m=function(){const e=[];let t=null;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(n=>{let{segs:r=[],tStartMs:i=0,dDurationMs:o=0}=n;r.forEach((n,a)=>{let{utf8:s="",tOffsetMs:l=0}=n;const c=Eh(s),u=i+l;c?(t&&((!t.end||t.end>u)&&(t.end=u),t.end>t.start&&e.push(t),t=null),t={text:c,start:u},a===r.length-1&&(t.end=i+o)):t&&((!t.end||t.end>u)&&(t.end=u),t.end>t.start&&e.push(t),t=null)})}),t&&t.end>t.start&&e.push(t),e.filter(e=>e&&"number"==typeof e.start&&e.end>e.start)}(g);if(null==m||!m.length)return void ht.debug("Youtube Provider: flatEvents not got:",n);if(Er(this,Bp)[Bp](l))return;if(Er(this,mp)[mp]=g,Er(this,vp)[vp]=m,Er(this,bp)[bp]=s,Er(this,kp)[kp]=a,Er(this,wp)[wp]=Eo(),await Er(this,Hp)[Hp](m,l),Er(this,Bp)[Bp](l))return;Er(this,Wp)[Wp]({videoId:n,flatEvents:m,fromLang:s,processingVersion:l})}catch(e){ht.warn("Youtube Provider: handle subtitle",e),Er(this,Ep)[Ep].showNotification(Er(this,Tp)[Tp]("subtitle_load_failed"))}finally{Er(this,Bp)[Bp](l)||Er(this,Ap)[Ap]!==a||(Er(this,Ap)[Ap]=null)}}async function lf(e){let{videoId:t,flatEvents:n,fromLang:r,processingVersion:i}=e;try{const[e,o]=await Nh({videoId:t,events:Er(this,mp)[mp],flatEvents:n,fromLang:r,setting:Er(this,fp)[fp],processingVersion:i,isStaleProcessing:e=>Er(this,Bp)[Bp](e),showNotification:(e,t)=>Er(this,Ep)[Ep].showNotification(e,t),i18n:Er(this,Tp)[Tp],apiSubtitle:ma,docInfo:Er(this,wp)[wp],builtinSegment:Ph,formatSubtitles:(e,t)=>Ih(e,t,{longSentenceThreshold:Er(this,fp)[fp].longSentenceThreshold}),onAppendSubtitles:e=>{let{subtitles:t,progressed:n}=e;Er(this,Up)[Up](t,n)},getCurrentVideoId:()=>Er(this,Pp)[Pp]});if(Er(this,Bp)[Bp](i))return;if(null==e||!e.length)return void ht.debug("Youtube Provider: events to subtitles got empty",t);if(t!==Er(this,Pp)[Pp])return void ht.debug("Youtube Provider: videoId changed!",t,Er(this,Pp)[Pp]);Er(this,gp)[gp]=e,Er(this,Rp)[Rp]=o,Er(this,qp)[qp]()}catch(e){ht.info("Youtube Provider: process events",e),Er(this,Ep)[Ep].showNotification(Er(this,Tp)[Tp]("subtitle_load_failed"))}}function cf(e,t){var n,r;Er(this,gp)[gp].push(...e),Er(this,gp)[gp].sort((e,t)=>e.start-t.start),Er(this,Rp)[Rp]=t,null===(n=Er(this,_p)[_p])||void 0===n||n.appendSubtitles(e),null===(r=Er(this,Ip)[Ip])||void 0===r||r.setBilingualSubtitles(Er(this,gp)[gp])}function uf(){Er(this,Rp)[Rp]=0,Er(this,gp)[gp]=[];const e=Er(this,Pp)[Pp],t=Er(this,vp)[vp],n=Er(this,bp)[bp];if(!e||!t.length)return;Er(this,Ep)[Ep].showNotification(Er(this,Tp)[Tp]("starting_reprocess_events"));const r=Er(this,Sp)[Sp]+=1;Er(this,Kp)[Kp](),Ao(Er(this,fp)[fp].apiSlug),Er(this,Wp)[Wp]({videoId:e,flatEvents:t,fromLang:n,processingVersion:r})}async function df(e,t){const{aiContextSlug:n,transApis:r}=Er(this,fp)[fp];if(!n||"-"===n)return;if(Er(this,Bp)[Bp](t))return;const i=null==r?void 0:r.find(e=>e.apiSlug===n);if(!i)return;if(!de.ai.has(i.apiType))return;const o=e.map(e=>e.text).filter(Boolean).join(" ").slice(0,8e3);if(o.length<200)return;const a=Er(this,Pp)[Pp],s=Er(this,wp)[wp];try{Er(this,Ep)[Ep].showNotification(Er(this,Tp)[Tp]("ai_context_analyzing"));const e=await va({videoId:a,title:s.title,description:Er(this,xp)[xp]||s.description,transcript:o,apiSetting:i});e&&a===Er(this,Pp)[Pp]&&!Er(this,Bp)[Bp](t)&&(s.summary=e)}catch(e){ht.info("Youtube Provider: AI context enrichment failed",e)}}async function hf(){Er(this,Rp)[Rp]=0,Er(this,gp)[gp]=[];const e=Er(this,Pp)[Pp],t=Er(this,vp)[vp];if(!e||!t.length)return;const n=Er(this,Sp)[Sp]+=1;Er(this,Kp)[Kp](),Ao(Er(this,fp)[fp].apiSlug),Er(this,wp)[wp]=Eo(),await Er(this,Hp)[Hp](t,n),Er(this,Bp)[Bp](n)||Er(this,Wp)[Wp]({videoId:e,flatEvents:t,fromLang:Er(this,bp)[bp],processingVersion:n})}function pf(){if(!Er(this,jp)[jp]())return;if(Er(this,_p)[_p])return;if(Er(this,fp)[fp].showOrigin)return;if(!Er(this,gp)[gp].length)return void Er(this,Ep)[Ep].showNotification(Er(this,Tp)[Tp]("waitting_for_subtitle"));const e=Er(this,Lp)[Lp];if(!e)return void ht.warn("Youtube Provider: No video element found");ht.info("Youtube Provider: Starting manager..."),Er(this,_p)[_p]=new $d({videoEl:e,formattedSubtitles:Er(this,gp)[gp],setting:h(h({},Er(this,fp)[fp]),{},{fromLang:Er(this,bp)[bp],docInfo:Er(this,wp)[wp]})});ud(Er(this,fp)[fp].showList,Er(this,fp)[fp].enhanceMode)&&!Er(this,Ip)[Ip]&&(Er(this,Ip)[Ip]=new gh(e),Er(this,Ip)[Ip].initialize(Er(this,gp)[gp]),Er(this,_p)[_p].onSubtitleUpdate=e=>{Er(this,Ip)[Ip].updateSingleSubtitle(e)},Er(this,Ip)[Ip].turnOnAutoSub()),Er(this,_p)[_p].start(),Er(this,Ep)[Ep].showNotification(Er(this,Tp)[Tp]("subtitle_load_succeed")),Er(this,Ep)[Ep].hideYtCaption()}function ff(){Er(this,Ep)[Ep].showYtCaption(),Er(this,_p)[_p]&&(ht.info("Youtube Provider: Destroying manager..."),Er(this,_p)[_p].onSubtitleUpdate=null,Er(this,_p)[_p].destroy(),Er(this,_p)[_p]=null,Er(this,Ip)[Ip]&&(Er(this,Ip)[Ip].destroy(),Er(this,Ip)[Ip]=null))}const gf=(()=>{let e=!1;return async t=>{if(e)return;e=!0,ht.info("Bilingual Subtitle Extension: Initializing...");new $p(t).initialize()}})(),mf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kiss-translator-inline-js";if(document.getElementById(t))return;const n=document.createElement("script");n.setAttribute("data-source","kiss-inject injectInlineJs"),n.type="text/javascript",n.id=t,n.textContent=sd.createScript(e),(document.head||document.documentElement).appendChild(n)},vf="injector-subtitle.js",yf="injector-shadowroot.js",bf={[vf]:()=>{try{const e=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=n[1];return"string"==typeof i&&i.includes("timedtext")&&this.addEventListener("load",function(){window.postMessage({type:"KISS_XHR_DATA_YOUTUBE",url:this.responseURL,response:this.responseText},window.location.origin)}),e.apply(this,n)}}catch(e){console.log("XMLHttpRequestInjector",e)}},[yf]:()=>{try{const e=Element.prototype.attachShadow;Element.prototype.attachShadow=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=e.apply(this,n);return window.postMessage({type:"KISS_SHADOW_ROOT_CREATED"},"*"),i}}catch(e){console.log("shadowRootInjector",e)}}};function wf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kiss-translator-inject-js";const n=bf[e];if(n)if(_n){!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kiss-translator-external-js";if(document.getElementById(t))return;const n=document.createElement("script");n.setAttribute("data-source","kiss-inject injectExternalJs"),n.type="text/javascript",n.id=t,n.src=sd.createScriptURL(e),(document.head||document.documentElement).appendChild(n)}(Tn.runtime.getURL(e),t)}else mf("(".concat(n,")()"),t)}const xf=[{pattern:"https://www.youtube.com",start:gf}];function Af(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Sf=i(3385),kf=i(696);function _f(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function Tf(e,t,n){var r=[],i=(0,kf.Rk)(e,r,n);return r.length<2?n:i+t(r)}var Ef,Cf,If,Pf,Lf=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=e(i);else for(var a in o="",i)i[a]&&a&&(o&&(o+=" "),o+=a);break;default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},Rf=function(e){var t=(0,Mh.A)(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=(0,Sf.J)(n,t.registered,void 0);return(0,kf.sk)(t,i,!1),t.key+"-"+i.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return Tf(t.registered,n,Lf(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=(0,Sf.J)(n,t.registered);_f(t,i)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=(0,Sf.J)(n,t.registered),o="animation-"+i.name;return _f(t,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(e){e.forEach(function(e){t.inserted[e]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:kf.Rk.bind(null,t.registered),merge:Tf.bind(null,t.registered,n)}}({key:"css"}),Nf=(Rf.flush,Rf.hydrate,Rf.cx,Rf.merge,Rf.getRegisteredStyles,Rf.injectGlobal,Rf.keyframes),Of=Rf.css;Rf.sheet,Rf.cache;const jf=Nf(Ef||(Ef=Af(["\n  to {\n    background-position: 200% center;\n  }\n"]))),zf=Nf(Cf||(Cf=Af(["\n  0%, 100% {\n    opacity: 1;\n  }\n  50% {\n    opacity: 0;\n  }\n"]))),Mf=Nf(If||(If=Af(["\n  from {\n    text-shadow: 0 0 10px #fff, \n    0 0 20px #fff, \n    0 0 30px #0073e6, \n    0 0 40px #0073e6;\n  }\n  to {\n    text-shadow: 0 0 20px #fff, \n    0 0 30px #ff4da6, \n    0 0 40px #ff4da6, \n    0 0 50px #ff4da6;\n  }\n"]))),Df=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return"\n  text-decoration-line: underline;\n  text-decoration-style: ".concat(e,";\n  text-decoration-color: ").concat(t,";\n  text-decoration-thickness: ").concat(n,"px;\n  text-underline-offset: 0.3em;\n  -webkit-text-decoration-line: underline;\n  -webkit-text-decoration-style: ").concat(e,";\n  -webkit-text-decoration-color: ").concat(t,";\n  -webkit-text-decoration-thickness: 1px;\n  -webkit-text-underline-offset: 0.3em;\n\n  opacity: 0.8;\n  -webkit-opacity: 0.8;\n  &:hover {\n    opacity: 1;\n    -webkit-opacity: 1;\n  }\n")},Bf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#209CEE";return{[Ne]:"",[Oe]:Df("solid",e),[je]:Df("dotted",e),[ze]:Df("dashed",e),[Me]:Df("dashed",e,2),[Fe]:Df("wavy",e),[We]:Df("wavy",e,2),[De]:"\n    border: 1px dashed ".concat(e,";\n    display: block;\n    padding: 0.2em 0.3em;\n    box-sizing: border-box;\n  "),[Be]:"\n    border: 2px dashed ".concat(e,";\n    display: block;\n    padding: 0.2em 0.3em;\n    box-sizing: border-box;\n  "),[Ue]:"\n    background: linear-gradient(to top, ".concat(e," 50%, transparent 50%);\n  "),[Ve]:"\n    background: linear-gradient(to top, transparent, ".concat(e," 20%, transparent 60%);\n  "),[He]:"\n    filter: blur(0.2em);\n    -webkit-filter: blur(0.2em);\n    &:hover {\n      filter: none;\n      -webkit-filter: none;\n    }\n  ",[Ge]:"\n    color: #fff;\n    background-color: ".concat(e,";\n  "),[qe]:"\n    opacity: 0.8;\n    -webkit-opacity: 0.8;\n    display: block;\n    padding: 0.25em 0.5em;\n    border-left: 0.25em solid ".concat(e,";\n    background: rgb(32, 156, 238, 0.2);\n    &:hover {\n      opacity: 1;\n      -webkit-opacity: 1;\n    }\n  "),[Ke]:"\n    background-image: linear-gradient(\n      90deg,\n      #3b82f6,\n      #9333ea,\n      #ec4899,\n      #3b82f6\n    );\n    background-size: 200% auto;\n    color: transparent;\n    -webkit-background-clip: text;\n    background-clip: text;\n    animation: ".concat(jf," 4s linear infinite;\n  "),[$e]:"\n    animation: ".concat(zf," 1s infinite;\n  "),[Ye]:"\n    animation: ".concat(Mf," 2s ease-in-out infinite alternate;\n  "),[Xe]:"\n    color: #333;\n    background: linear-gradient(\n      45deg,\n      LightGreen 20%,\n      LightPink 20% 40%,\n      LightSalmon 40% 60%,\n      LightSeaGreen 60% 80%,\n      LightSkyBlue 80%\n    );\n    &:hover {\n      color: #111;\n    };\n  "}},Ff=Bf(),Wf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(0===e.length)return()=>{};const r=new Set(e);let i=!1;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;const r=new Set,i=t=>{t.code&&(r.has(t.code)||(r.add(t.code),e(new Set(r),t)))},o=e=>{e.code&&(t(new Set(r),e),r.delete(e.code))},a=()=>{r.clear()};return n.addEventListener("keydown",i,!0),n.addEventListener("keyup",o,!0),window.addEventListener("blur",a),()=>{n.removeEventListener("keydown",i,!0),n.removeEventListener("keyup",o,!0),window.removeEventListener("blur",a),r.clear()}}((e,t)=>{r.has(t.code)||(i=!0)},(e,n)=>{((e,t)=>{const n=new Set([...e,...t]);return n.size===e.size&&n.size===t.size})(r,e)&&!i&&t(),1===e.size&&(i=!1)},n)},Uf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const n=((e,t,n)=>{let r=0,i=null;return()=>{i&&clearTimeout(i),i=setTimeout(()=>{r=0},n),r++,r===t&&(r=0,clearTimeout(i),e())}})(arguments.length>1?arguments[1]:void 0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,arguments.length>3&&void 0!==arguments[3]?arguments[3]:500);return Wf(e,n,t)},Vf={[M]:async e=>{const t={client:"gtx",dt:"t",dj:1,ie:"UTF-8",sl:"auto",tl:"zh-CN",q:e},n="https://translate.googleapis.com/translate_a/single?".concat(fo.stringify(t)),r={headers:{"Content-type":"application/json"}},i=await Pi(n,r,{useCache:!0});return null!=i&&i.src?(await Xr(n,r,i),i.src):""},[B]:async e=>{const t={text:e,detector:B},n="".concat(on,"?").concat(fo.stringify(t)),r=await Yr(n);if(r)return r;const i="".concat(on,"_").concat(B),o=Yo(i,Ko,{batchInterval:200,batchSize:20,batchLength:1e5}),a=await o.addTask(e);return a?(Xr(n,null,a),a):""},[J]:async e=>{const t="https://fanyi.baidu.com/langdetect",n={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify({query:e})},r=await Pi(t,n,{useCache:!0});return 0===(null==r?void 0:r.error)?(await Xr(t,n,r),r.lan):""},[Q]:async e=>{const t="https://transmart.qq.com/api/imt",n={headers:{"Content-type":"application/json","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36",referer:"https://transmart.qq.com/zh-CN/index"},method:"POST",body:JSON.stringify({header:{fn:"text_analysis",client_key:"browser-chrome-110.0.0-Mac OS-df4bd4c5-a65d-44b2-a40f-42f34f3535f2-1677486696487"},text:e})},r=await Pi(t,n,{useCache:!0});return null!=r&&r.language?(await Xr(t,n,r),r.language):""},[z]:async e=>{if(!In)return"";const[t,n]=await Ii({fn:aa,msg:"builtinai_detect",text:e});return n?"":t}},Hf=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n="";if(ue.has(t))try{const r=await Vf[t](e);r&&(n=Se[t].get(r)||"")}catch(e){pt("detect lang remote",e)}if(!n)try{var r,i,o;const t=await(null==Tn||null===(r=Tn.i18n)||void 0===r?void 0:r.detectLanguage(e)),a=null==t||null===(i=t.languages)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.language;t.isReliable&&a&&me.has(a)?n=a:null!=a&&a.startsWith("zh")&&(n="zh-CN")}catch(e){pt("detect lang local",e)}return n};var Gf,qf=Ir("setting"),Kf=Ir("rule"),$f=Ir("isInitialized"),Yf=Ir("isJsInjected"),Xf=Ir("isShadowRootJsInjected"),Jf=Ir("mouseHoverEnabled"),Qf=Ir("enabled"),Zf=Ir("runId"),eg=Ir("transOnlyRevertTimer"),tg=Ir("transOnlyRevertTarget"),ng=Ir("transOnlyRevertEnabled"),rg=Ir("boundTransOnlyMouseOver"),ig=Ir("boundTransOnlyMouseOut"),og=Ir("termValues"),ag=Ir("combinedTermsRegex"),sg=Ir("combinedSkipsRegex"),lg=Ir("placeholderCache"),cg=Ir("translationTagName"),ug=Ir("eventName"),dg=Ir("docInfo"),hg=Ir("glossary"),pg=Ir("blockSelectorInvalid"),fg=Ir("textClass"),gg=Ir("textSheet"),mg=Ir("apisMap"),vg=Ir("favWords"),yg=Ir("observedNodes"),bg=Ir("translationNodes"),wg=Ir("viewNodes"),xg=Ir("processedNodes"),Ag=Ir("rootNodes"),Sg=Ir("skipMoNodes"),kg=Ir("removeKeydownHandler"),_g=Ir("removeKeydownHandler2"),Tg=Ir("hoveredNode"),Eg=Ir("boundMouseMoveHandler"),Cg=Ir("boundKeyDownHandler"),Ig=Ir("windowMessageHandler"),Pg=Ir("debouncedFindShadowRoot"),Lg=Ir("io"),Rg=Ir("mo"),Ng=Ir("dmm"),Og=Ir("rescanQueue"),jg=Ir("isQueueProcessing"),zg=Ir("captureViewportAnchor"),Mg=Ir("normalizeViewportAnchor"),Dg=Ir("restoreViewportAnchor"),Bg=Ir("withViewportAnchor"),Fg=Ir("ignoreSelector"),Wg=Ir("isIgnoredElement"),Ug=Ir("matchesBlockSelector"),Vg=Ir("isBlockNode"),Hg=Ir("hasBlockNode"),Gg=Ir("apiSetting"),qg=Ir("transAllnow"),Kg=Ir("rootMargin"),$g=Ir("placeholderConfig"),Yg=Ir("run"),Xg=Ir("init"),Jg=Ir("handleWindowMessage"),Qg=Ir("attachShadowRootListener"),Zg=Ir("removeShadowRootListener"),em=Ir("findAndObserveShadowRoot"),tm=Ir("createTextStyles"),nm=Ir("injectSheet"),rm=Ir("parseTerms"),im=Ir("createIntersectionObserver"),om=Ir("createMutationObserver"),am=Ir("createDebounceMouseMover"),sm=Ir("handleMouseMove"),lm=Ir("handleKeyDown"),cm=Ir("toggleTargetNode"),um=Ir("getShadowRoot"),dm=Ir("findAllShadowRoots"),hm=Ir("findChangeContainer"),pm=Ir("queueForRescan"),fm=Ir("rescanContainer"),gm=Ir("reIO"),mm=Ir("reIOViewNodes"),vm=Ir("startObserveShadowRoot"),ym=Ir("startObserveRoot"),bm=Ir("startObserveNode"),wm=Ir("queryNode"),xm=Ir("scanNode"),Am=Ir("processNode"),Sm=Ir("highlightTextNode"),km=Ir("highlightWordsDeeply"),_m=Ir("splitTextNodesBySentence"),Tm=Ir("removeHighlights"),Em=Ir("removeBrTags"),Cm=Ir("shouldBreak"),Im=Ir("isInvalidText"),Pm=Ir("formatTranslateError"),Lm=Ir("copyText"),Rm=Ir("createRetryErrorNode"),Nm=Ir("translateNodeGroup"),Om=Ir("serializeForTranslation"),jm=Ir("restoreFromTranslation"),zm=Ir("translateFetch"),Mm=Ir("findTranslationWrappers"),Dm=Ir("cleanupAllNodes"),Bm=Ir("cleanupAllTranslations"),Fm=Ir("cleanupDirectTranslations"),Wm=Ir("removeTranslationElement"),Um=Ir("restoreOriginal"),Vm=Ir("removeNodes"),Hm=Ir("toggleTranslationOnly"),Gm=Ir("adjustWrapperPosition"),qm=Ir("updateStyle"),Km=Ir("updateTransOrder"),$m=Ir("refreshNode"),Ym=Ir("performSyncNode"),Xm=Ir("resetOptions"),Jm=Ir("enableMouseHover"),Qm=Ir("disableMouseHover"),Zm=Ir("enableTransOnlyRevert"),ev=Ir("disableTransOnlyRevert"),tv=Ir("clearTransOnlyRevertTimer"),nv=Ir("showOriginalTemporarily"),rv=Ir("hideOriginalTemporarily"),iv=Ir("initInjector"),ov=Ir("removeInjector"),av=Ir("translateTitle"),sv=Ir("syncTransOnlyRevert");class lv{static isElement(e){return e instanceof Element}static isElementOrFragment(e){return e instanceof Element||e instanceof DocumentFragment}static isBlockNode(e){var t,n,r,i,o;if(!lv.isElementOrFragment(e))return!1;if(null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.display)&&void 0!==n&&null!==(r=n.value)&&void 0!==r&&r.includes("inline"))return!1;if(lv.TAGS.INLINE.has(null===(i=e.nodeName)||void 0===i?void 0:i.toUpperCase()))return!1;if(lv.TAGS.BLOCK.has(null===(o=e.nodeName)||void 0===o?void 0:o.toUpperCase()))return!0;if(lv.displayCache.has(e))return lv.displayCache.get(e);const a=!window.getComputedStyle(e).display.startsWith("inline");return lv.displayCache.set(e,a),a}static hasBlockNode(e){if(!lv.isElementOrFragment(e))return!1;for(const t of e.childNodes)if(lv.isBlockNode(t))return!0;return!1}static hasTextNode(e){if(!lv.isElementOrFragment(e))return!1;for(const t of e.childNodes)if(t.nodeType===Node.TEXT_NODE&&/\S/.test(t.nodeValue))return!0;return!1}static escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}constructor(e){let{rule:t={},setting:r={},favWords:i=[]}=e;Object.defineProperty(this,sv,{value:Oy}),Object.defineProperty(this,av,{value:Ny}),Object.defineProperty(this,ov,{value:Ry}),Object.defineProperty(this,iv,{value:Ly}),Object.defineProperty(this,rv,{value:Py}),Object.defineProperty(this,nv,{value:Iy}),Object.defineProperty(this,tv,{value:Cy}),Object.defineProperty(this,ev,{value:Ey}),Object.defineProperty(this,Zm,{value:Ty}),Object.defineProperty(this,Qm,{value:_y}),Object.defineProperty(this,Jm,{value:ky}),Object.defineProperty(this,Xm,{value:Sy}),Object.defineProperty(this,Ym,{value:Ay}),Object.defineProperty(this,$m,{value:xy}),Object.defineProperty(this,Km,{value:wy}),Object.defineProperty(this,qm,{value:by}),Object.defineProperty(this,Gm,{value:yy}),Object.defineProperty(this,Hm,{value:vy}),Object.defineProperty(this,Vm,{value:my}),Object.defineProperty(this,Um,{value:gy}),Object.defineProperty(this,Wm,{value:fy}),Object.defineProperty(this,Fm,{value:py}),Object.defineProperty(this,Bm,{value:hy}),Object.defineProperty(this,Dm,{value:dy}),Object.defineProperty(this,Mm,{value:uy}),Object.defineProperty(this,zm,{value:cy}),Object.defineProperty(this,jm,{value:ly}),Object.defineProperty(this,Om,{value:sy}),Object.defineProperty(this,Nm,{value:ay}),Object.defineProperty(this,Rm,{value:oy}),Object.defineProperty(this,Lm,{value:iy}),Object.defineProperty(this,Pm,{value:ry}),Object.defineProperty(this,Im,{value:ny}),Object.defineProperty(this,Cm,{value:ty}),Object.defineProperty(this,Em,{value:ey}),Object.defineProperty(this,Tm,{value:Zv}),Object.defineProperty(this,_m,{value:Qv}),Object.defineProperty(this,km,{value:Jv}),Object.defineProperty(this,Sm,{value:Xv}),Object.defineProperty(this,Am,{value:Yv}),Object.defineProperty(this,xm,{value:$v}),Object.defineProperty(this,wm,{value:Kv}),Object.defineProperty(this,bm,{value:qv}),Object.defineProperty(this,ym,{value:Gv}),Object.defineProperty(this,vm,{value:Hv}),Object.defineProperty(this,mm,{value:Vv}),Object.defineProperty(this,gm,{value:Uv}),Object.defineProperty(this,fm,{value:Wv}),Object.defineProperty(this,pm,{value:Fv}),Object.defineProperty(this,hm,{value:Bv}),Object.defineProperty(this,dm,{value:Dv}),Object.defineProperty(this,um,{value:Mv}),Object.defineProperty(this,cm,{value:zv}),Object.defineProperty(this,lm,{value:jv}),Object.defineProperty(this,sm,{value:Ov}),Object.defineProperty(this,am,{value:Nv}),Object.defineProperty(this,om,{value:Rv}),Object.defineProperty(this,im,{value:Lv}),Object.defineProperty(this,rm,{value:Pv}),Object.defineProperty(this,nm,{value:Iv}),Object.defineProperty(this,tm,{value:Cv}),Object.defineProperty(this,em,{value:Ev}),Object.defineProperty(this,Zg,{value:Tv}),Object.defineProperty(this,Qg,{value:_v}),Object.defineProperty(this,Jg,{value:kv}),Object.defineProperty(this,Xg,{value:Sv}),Object.defineProperty(this,Yg,{value:Av}),Object.defineProperty(this,$g,{get:xv,set:void 0}),Object.defineProperty(this,Kg,{get:wv,set:void 0}),Object.defineProperty(this,qg,{get:bv,set:void 0}),Object.defineProperty(this,Gg,{get:yv,set:void 0}),Object.defineProperty(this,Hg,{value:vv}),Object.defineProperty(this,Vg,{value:mv}),Object.defineProperty(this,Ug,{value:gv}),Object.defineProperty(this,Wg,{value:fv}),Object.defineProperty(this,Fg,{get:pv,set:void 0}),Object.defineProperty(this,Bg,{value:hv}),Object.defineProperty(this,Dg,{value:dv}),Object.defineProperty(this,Mg,{value:uv}),Object.defineProperty(this,zg,{value:cv}),Object.defineProperty(this,qf,{writable:!0,value:void 0}),Object.defineProperty(this,Kf,{writable:!0,value:void 0}),Object.defineProperty(this,$f,{writable:!0,value:!1}),Object.defineProperty(this,Yf,{writable:!0,value:!1}),Object.defineProperty(this,Xf,{writable:!0,value:!1}),Object.defineProperty(this,Jf,{writable:!0,value:!1}),Object.defineProperty(this,Qf,{writable:!0,value:!1}),Object.defineProperty(this,Zf,{writable:!0,value:0}),Object.defineProperty(this,eg,{writable:!0,value:null}),Object.defineProperty(this,tg,{writable:!0,value:null}),Object.defineProperty(this,ng,{writable:!0,value:!1}),Object.defineProperty(this,rg,{writable:!0,value:null}),Object.defineProperty(this,ig,{writable:!0,value:null}),Object.defineProperty(this,og,{writable:!0,value:[]}),Object.defineProperty(this,ag,{writable:!0,value:void 0}),Object.defineProperty(this,sg,{writable:!0,value:void 0}),Object.defineProperty(this,lg,{writable:!0,value:null}),Object.defineProperty(this,cg,{writable:!0,value:n}),Object.defineProperty(this,ug,{writable:!0,value:""}),Object.defineProperty(this,dg,{writable:!0,value:{}}),Object.defineProperty(this,hg,{writable:!0,value:{}}),Object.defineProperty(this,pg,{writable:!0,value:!1}),Object.defineProperty(this,fg,{writable:!0,value:{}}),Object.defineProperty(this,gg,{writable:!0,value:""}),Object.defineProperty(this,mg,{writable:!0,value:new Map}),Object.defineProperty(this,vg,{writable:!0,value:[]}),Object.defineProperty(this,yg,{writable:!0,value:new WeakSet}),Object.defineProperty(this,bg,{writable:!0,value:new WeakMap}),Object.defineProperty(this,wg,{writable:!0,value:new Set}),Object.defineProperty(this,xg,{writable:!0,value:new WeakMap}),Object.defineProperty(this,Ag,{writable:!0,value:new Set}),Object.defineProperty(this,Sg,{writable:!0,value:new WeakSet}),Object.defineProperty(this,kg,{writable:!0,value:void 0}),Object.defineProperty(this,_g,{writable:!0,value:void 0}),Object.defineProperty(this,Tg,{writable:!0,value:null}),Object.defineProperty(this,Eg,{writable:!0,value:void 0}),Object.defineProperty(this,Cg,{writable:!0,value:void 0}),Object.defineProperty(this,Ig,{writable:!0,value:null}),Object.defineProperty(this,Pg,{writable:!0,value:null}),Object.defineProperty(this,Lg,{writable:!0,value:void 0}),Object.defineProperty(this,Rg,{writable:!0,value:void 0}),Object.defineProperty(this,Ng,{writable:!0,value:void 0}),Object.defineProperty(this,Og,{writable:!0,value:new Set}),Object.defineProperty(this,jg,{writable:!0,value:!1}),Er(this,qf)[qf]=h(h({},lv.DEFAULT_OPTIONS),r),Er(this,Kf)[Kf]=h(h(h({},lv.DEFAULT_RULE),t),{},{isPlainText:!1}),Er(this,vg)[vg]=i,Er(this,mg)[mg]=new Map(Er(this,qf)[qf].transApis.map(e=>[e.apiSlug,e])),Er(this,ug)[ug]=Bn(),Er(this,sg)[sg]=new RegExp(lv.BUILTIN_SKIP_PATTERNS.map(e=>"(".concat(e.source,")")).join("|")),Er(this,rm)[rm](Er(this,Kf)[Kf].terms),Er(this,hg)[hg]=$n(Er(this,Kf)[Kf].aiTerms),Er(this,tm)[tm](),Er(this,Eg)[Eg]=Er(this,sm)[sm].bind(this),Er(this,Cg)[Cg]=Er(this,lm)[lm].bind(this),Er(this,Lg)[Lg]=Er(this,im)[im](),Er(this,Rg)[Rg]=Er(this,om)[om](),Er(this,Ng)[Ng]=Er(this,am)[am](),Er(this,Ig)[Ig]=Er(this,Jg)[Jg].bind(this),Er(this,Pg)[Pg]=On(Er(this,em)[em].bind(this),300),Er(this,qf)[qf].mouseHoverSetting.useMouseHover&&Er(this,Jm)[Jm](),"true"===Er(this,Kf)[Kf].transOnly&&"true"===Er(this,Kf)[Kf].transOnlyRevert&&Er(this,Zm)[Zm](),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>Er(this,Yg)[Yg]()):Er(this,Yg)[Yg]()}toggleHoverNode(){Er(this,lm)[lm]()}toggleMouseHover(){Er(this,Jf)[Jf]?Er(this,Qm)[Qm]():Er(this,Jm)[Jm]()}enable(){Er(this,Qf)[Qf]||(Er(this,Qf)[Qf]=!0,Er(this,Kf)[Kf].transOpen="true",Er(this,Zf)[Zf]++,Er(this,$f)[$f]?Er(this,qg)[qg]?this.rescan():Er(this,mm)[mm]():Er(this,Xg)[Xg](),"true"===Er(this,Kf)[Kf].transTitle&&Er(this,av)[av](),_n&&_r(bn,!0))}disable(){Er(this,Qf)[Qf]&&(Er(this,Qf)[Qf]=!1,Er(this,Kf)[Kf].transOpen="false",Er(this,Zf)[Zf]++,Er(this,Dm)[Dm](),qr(),Xo(),"true"===Er(this,Kf)[Kf].transTitle&&Er(this,dg)[dg].title&&(document.title=Er(this,dg)[dg].title),_n&&_r(bn,!1))}rescan(){Er(this,$f)[$f]&&(Er(this,Zf)[Zf]++,Er(this,Dm)[Dm](),Er(this,Xm)[Xm](),qr(),Xo(),Er(this,Xg)[Xg]())}toggle(){Er(this,Qf)[Qf]?this.disable():this.enable()}toggleTransOnly(){if(Er(this,Qf)[Qf]){const e="true"===Er(this,Kf)[Kf].transOnly?"false":"true";this.updateRule({transOnly:e})}else Er(this,Kf)[Kf].transOnly="true",this.enable()}toggleStyle(){const e=Er(this,Kf)[Kf].textStyle===He?Ne:He;this.updateRule({textStyle:e})}toggleTransbox(){Er(this,qf)[qf].tranboxSetting.transOpen=!Er(this,qf)[qf].tranboxSetting.transOpen}toggleInputTranslate(){Er(this,qf)[qf].inputRule.transOpen=!Er(this,qf)[qf].inputRule.transOpen}stop(){this.disable(),Er(this,Xm)[Xm](),Er(this,Qm)[Qm](),Er(this,ev)[ev](),Er(this,ov)[ov](),Er(this,$f)[$f]=!1}updateRule(e){let t=!1,n=!1;const r=Er(this,qg)[qg],i=Er(this,Kg)[Kg];for(const r in e)Object.prototype.hasOwnProperty.call(Er(this,Kf)[Kf],r)&&Er(this,Kf)[Kf][r]!==e[r]&&(Er(this,Kf)[Kf][r]=e[r],"autoScan"===r||"blockSelector"===r||"hasShadowroot"===r||"scanAll"===r||"isPlainText"===r?n=!0:t=!0);Er(this,lg)[lg]=null,Er(this,pg)[pg]=!1;const o=Er(this,Qf)[Qf]&&(r!==Er(this,qg)[qg]||String(i)!==String(Er(this,Kg)[Kg]));if(n||o||Er(this,Qf)[Qf]&&Er(this,qg)[qg])return this.rescan(),void Er(this,sv)[sv]();t&&(Er(this,mm)[mm](),Er(this,sv)[sv]())}get setting(){return h({},Er(this,qf)[qf])}get rule(){return h({},Er(this,Kf)[Kf])}get eventName(){return Er(this,ug)[ug]}}function cv(){if(!document.elementFromPoint||!window.scrollBy)return null;const e=[.5,.33,.66];for(const t of e){const e=Math.max(0,Math.floor(window.innerWidth/2)),n=Math.max(0,Math.min(window.innerHeight-1,Math.floor(window.innerHeight*t))),r=document.elementFromPoint(e,n),i=Er(this,Mg)[Mg](r);if(null==i||!i.isConnected)continue;const o=i.getBoundingClientRect();if(o.width||o.height)return{element:i,top:o.top}}return null}function uv(e){var t,n;if(!e)return null;const r=null===(t=e.closest)||void 0===t?void 0:t.call(e,".".concat(Gf.KISS_CLASS.warpper));if(!r)return e;const{nodes:i}=Er(this,bg)[bg].get(r)||{},o=null==i?void 0:i.find(e=>e.isConnected);return(null==o?void 0:o.nodeType)===Node.ELEMENT_NODE?o:null!=o&&null!==(n=o.parentElement)&&void 0!==n&&n.isConnected?o.parentElement:r.previousElementSibling||r.parentElement}function dv(e){var t;if(null==e||null===(t=e.element)||void 0===t||!t.isConnected)return;const n=e.element.getBoundingClientRect().top-e.top;Math.abs(n)>.5&&window.scrollBy(0,n)}function hv(e){const t=Er(this,zg)[zg]();try{return e()}finally{Er(this,Dg)[Dg](t)}}function pv(){var e;if("true"===Er(this,Kf)[Kf].scanAll||Er(this,Kf)[Kf].isPlainText)return Gf.KISS_IGNORE_SELECTOR;const t=[Gf.KISS_IGNORE_SELECTOR];"false"!==Er(this,Kf)[Kf].autoScan&&t.push(Gf.BUILTIN_IGNORE_SELECTOR);const n=null===(e=Er(this,Kf)[Kf].ignoreSelector)||void 0===e?void 0:e.trim();return n&&t.push(n),t.join(", ")}function fv(e){var t;return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE&&(null===(t=e.matches)||void 0===t?void 0:t.call(e,Er(this,Fg)[Fg]))}function gv(e){var t;const n=null===(t=Er(this,Kf)[Kf].blockSelector)||void 0===t?void 0:t.trim();if(!n||Er(this,pg)[pg]||!Gf.isElement(e))return!1;try{return e.matches(n)}catch(e){return Er(this,pg)[pg]=!0,pt("invalid blockSelector",e),!1}}function mv(e){return!!Er(this,Ug)[Ug](e)||Gf.isBlockNode(e)}function vv(e){if(!Gf.isElementOrFragment(e))return!1;for(const t of e.childNodes)if(Er(this,Vg)[Vg](t))return!0;return!1}function yv(){return Er(this,mg)[mg].get(Er(this,Kf)[Kf].apiSlug)||Re}function bv(){var e;const t=null===(e=Er(this,mg)[mg].get(Er(this,Kf)[Kf].apiSlug))||void 0===e?void 0:e.transAllnow;return void 0!==t?!0===t||"true"===t:!0===Er(this,qf)[qf].transAllnow||"true"===Er(this,qf)[qf].transAllnow}function wv(){var e;const t=null===(e=Er(this,mg)[mg].get(Er(this,Kf)[Kf].apiSlug))||void 0===e?void 0:e.rootMargin,n=Er(this,qf)[qf].rootMargin,r=Number(void 0!==t&&""!==t?t:void 0!==n&&""!==n?n:500);return Number.isFinite(r)?r:500}function xv(){if(Er(this,lg)[lg])return Er(this,lg)[lg];const[e,t]=Er(this,Gg)[Gg].placeholder.split(" ");let n=Er(this,Gg)[Gg].placetag;Array.isArray(n)&&(n=n[0]||"i"),"string"!=typeof n&&(n="i");const r=Er(this,Gg)[Gg].placetagFormat||"compact";let i,o;"attribute"===r?(i=new RegExp("<".concat(n,"\\s+i=(\\d+)>"),"gi"),o=new RegExp("<\\/".concat(n,">"),"gi")):(i=new RegExp("<".concat(n,"(\\d+)>"),"gi"),o=new RegExp("<\\/".concat(n,"(\\d+)>"),"gi"));const a=Gf.escapeRegex(e),s=Gf.escapeRegex(t),l="".concat(a,"\\d+").concat(s),c={startDelimiter:e,endDelimiter:t,tagName:n,format:r,safeTag:"span",openRegex:i,closeRegex:o,placeholderRegex:new RegExp(l,"g")};return Er(this,lg)[lg]=c,c}function Av(){"true"===Er(this,Kf)[Kf].transOpen?this.enable():Er(this,qf)[qf].preInit&&Er(this,Xg)[Xg]()}function Sv(){Er(this,$f)[$f]=!0,Er(this,iv)[iv](),Er(this,Kf)[Kf].isPlainText&&document.querySelectorAll("pre").forEach(e=>{var t;return e.innerHTML=null===(t=e.innerHTML)||void 0===t?void 0:t.replace(/(?:\r\n|\r|\n)/g,"<br />")}),document.querySelectorAll(Er(this,Kf)[Kf].rootsSelector||"body").forEach(e=>{Er(this,ym)[ym](e)}),"true"!==Er(this,Kf)[Kf].scanAll&&"true"!==Er(this,Kf)[Kf].hasShadowroot||(Er(this,Qg)[Qg](),Er(this,em)[em]())}function kv(e){var t;"KISS_SHADOW_ROOT_CREATED"===(null===(t=e.data)||void 0===t?void 0:t.type)&&Er(this,Pg)[Pg]()}function _v(){if(!Er(this,Xf)[Xf]){wf(yf,"kiss-translator-inject-shadowroot-js"),Er(this,Xf)[Xf]=!0}window.addEventListener("message",Er(this,Ig)[Ig])}function Tv(){window.removeEventListener("message",Er(this,Ig)[Ig])}function Ev(){try{Er(this,dm)[dm]().forEach(e=>{Er(this,vm)[vm](e)})}catch(e){pt("findAllShadowRoots",e)}}function Cv(){const[e,t]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=Bf();e.forEach(e=>{t[e.styleSlug]=e.styleCode});const n={};let r="";return Object.entries(t).forEach(e=>{let[t,r]=e;n[t]=Of(Pf||(Pf=Af(["\n      ","\n    "])),r)}),Object.entries(t).forEach(e=>{let[t,i]=e;r+="\n      .".concat(n[t]," {\n        ").concat(i,"\n      }\n    ")}),[n,r]}(Er(this,qf)[qf].customStyles),n=new CSSStyleSheet;n.replaceSync(t),Er(this,fg)[fg]=e,Er(this,gg)[gg]=n}function Iv(e){e.adoptedStyleSheets.includes(Er(this,gg)[gg])||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,Er(this,gg)[gg]])}function Pv(e){if(Er(this,og)[og]=[],Er(this,ag)[ag]=null,!e||"string"!=typeof e)return;const t=[],n=e.split(/\n|;/);for(const e of n){const n=e.trim();if(!n)continue;let r=n.lastIndexOf(",");-1===r&&(r=n.length);const i=n.substring(0,r).trim(),o=n.substring(r+1).trim();if(i)try{new RegExp(i),t.push("(".concat(i,")")),Er(this,og)[og].push(o)}catch(e){pt('Invalid RegExp for term: "'.concat(i,'"'),e)}}t.length>0&&(Er(this,ag)[ag]=new RegExp(t.join("|"),"g"))}function Lv(){const{transInterval:e}=Er(this,qf)[qf],t=Er(this,Kg)[Kg],n=new Set,r=On(()=>{n.forEach(e=>Er(this,Ym)[Ym](e)),n.clear()},e);return new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(Er(this,wg)[wg].add(e.target),n.add(e.target),r()):Er(this,wg)[wg].delete(e.target)})},{threshold:.01,rootMargin:"".concat(t,"px 0px ").concat(t,"px 0px")})}function Rv(){return new MutationObserver(e=>{for(const r of e){var t,n;if(!Er(this,Sg)[Sg].has(r.target)&&(null===(t=r.nextSibling)||void 0===t||null===(n=t.tagName)||void 0===n?void 0:n.toLowerCase())!==Er(this,cg)[cg])if("characterData"===r.type)r.oldValue===r.target.nodeValue||Er(this,sg)[sg].test(r.target.nodeValue)||Er(this,pm)[pm](r.target.parentElement);else if("childList"===r.type){let e=new Set,t=!1;r.addedNodes.forEach(n=>{var r;Er(this,Sg)[Sg].has(n)||(null===(r=n.nodeName)||void 0===r?void 0:r.toLowerCase())===Er(this,cg)[cg]||(n.nodeType===Node.TEXT_NODE?t=!0:Gf.isElementOrFragment(n)&&e.add(n))}),t?Er(this,pm)[pm](r.target):e.forEach(e=>Er(this,pm)[pm](e))}}})}function Nv(){return On(e=>{const t=e;let n=null;for(;e&&e!==document.body;){if(Er(this,yg)[yg].has(e)){n=e;break}e=e.parentElement}Er(this,Tg)[Tg]=n||t;const{mouseHoverKey:r=[],mouseHoverKey2:i=[]}=Er(this,qf)[qf].mouseHoverSetting,o=r.length>0||i.length>0;o||Er(this,$f)[$f]||Er(this,Xg)[Xg](),!o&&n&&Er(this,cm)[cm](n)},100)}function Ov(e){let t=e.composedPath()[0];Er(this,Ng)[Ng](t)}function jv(){Er(this,$f)[$f]||Er(this,Xg)[Xg]();let e=Er(this,Tg)[Tg];e&&Er(this,yg)[yg].has(e)&&Er(this,cm)[cm](e)}function zv(e){Er(this,xg)[xg].has(e)?Er(this,Fm)[Fm](e):Er(this,Am)[Am](e)}function Mv(e){var t,n;return e.openOrClosedShadowRoot?e.openOrClosedShadowRoot:"undefined"!=typeof globalThis&&null!==(t=globalThis.chrome)&&void 0!==t&&null!==(n=t.dom)&&void 0!==n&&n.openOrClosedShadowRoot?globalThis.chrome.dom.openOrClosedShadowRoot(e):e.shadowRoot}function Dv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;try{const n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;n.nextNode();){const e=n.currentNode,r=Er(this,um)[um](e);r&&(t.add(r),Er(this,dm)[dm](r,t))}}catch(e){pt("无法访问某个 shadowRoot",e)}return t}function Bv(e){var t;if(!Gf.isElementOrFragment(e)||null!==(t=e.closest)&&void 0!==t&&t.call(e,Er(this,Fg)[Fg]))return null;let n=e;for(;n&&n!==document.body;){if(Er(this,Vg)[Vg](n)||Er(this,yg)[yg].has(n))for(const e of Er(this,Ag)[Ag])if(e.contains(n))return n;n=n.parentElement}return null}function Fv(e){Er(this,Og)[Og].add(e),Er(this,jg)[jg]||(Er(this,jg)[jg]=!0,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;window.requestIdleCallback?requestIdleCallback(e,{timeout:t}):setTimeout(e,t)}(()=>{Er(this,Og)[Og].forEach(e=>Er(this,fm)[fm](e)),Er(this,Og)[Og].clear(),Er(this,jg)[jg]=!1},100))}function Wv(e){const t=Er(this,hm)[hm](e);t&&(Er(this,Bm)[Bm](t),Er(this,xm)[xm](t))}function Uv(e){Er(this,Lg)[Lg].unobserve(e),Er(this,Lg)[Lg].observe(e)}function Vv(){Er(this,wg)[wg].forEach(e=>Er(this,gm)[gm](e))}function Hv(e){e.host.matches("#".concat(r.fabID,", #").concat(r.boxID))||(Er(this,ym)[ym](e),Er(this,nm)[nm](e))}function Gv(e){Er(this,Ag)[Ag].has(e)||(Er(this,Ag)[Ag].add(e),Er(this,Rg)[Rg].observe(e,{childList:!0,subtree:!0,characterData:!0,characterDataOldValue:!0}),Er(this,xm)[xm](e))}function qv(e){if(Gf.isElement(e))return Er(this,Kf)[Kf].highlightWords===ot&&Er(this,km)[km](e),!Er(this,yg)[yg].has(e)&&Er(this,Qf)[Qf]&&Er(this,qg)[qg]?(Er(this,yg)[yg].add(e),void Er(this,Am)[Am](e)):Er(this,yg)[yg].has(e)?void(!Er(this,xg)[xg].has(e)&&Er(this,wg)[wg].has(e)&&Er(this,gm)[gm](e)):(Er(this,yg)[yg].add(e),void Er(this,Lg)[Lg].observe(e))}function Kv(e){var t;null!==(t=e.matches)&&void 0!==t&&t.call(e,Er(this,Kf)[Kf].selector)&&Er(this,bm)[bm](e),e.querySelectorAll(Er(this,Kf)[Kf].selector).forEach(e=>{var t;null!==(t=e.closest)&&void 0!==t&&t.call(e,Er(this,Fg)[Fg])||Er(this,bm)[bm](e)})}function $v(e){var t;if(!Gf.isElementOrFragment(e)||null!==(t=e.matches)&&void 0!==t&&t.call(e,Er(this,Fg)[Fg]))return;if("false"===Er(this,Kf)[Kf].autoScan)return void Er(this,wm)[wm](e);const n=Gf.hasTextNode(e);if(!n&&1===e.children.length)return void Er(this,xm)[xm](e.children[0]);const r=Er(this,Hg)[Hg](e);if(!n&&r||Er(this,bm)[bm](e),r)for(const t of e.children){const e=Er(this,Vg)[Vg](t);n&&!e||Er(this,xm)[xm](t)}}async function Yv(e){if(Er(this,xg)[xg].has(e)||!Gf.isElementOrFragment(e))return;if(Er(this,xg)[xg].set(e,h({},Er(this,Kf)[Kf])),Er(this,Im)[Im](e.textContent))return;let t="";const{fromLang:n="auto",toLang:r,splitParagraph:i=et,splitLength:o=100}=Er(this,Kf)[Kf],{langDetector:a,skipLangs:s=[]}=Er(this,qf)[qf];if("auto"===n&&(t=await Hf(e.textContent,a),t&&(r.slice(0,2)===t.slice(0,2)||s.includes(t))))return;i!==et&&Er(this,_m)[_m](e,i,o);let l=[];[...e.childNodes].forEach(n=>{const r=Er(this,Cm)[Cm](n),i=n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE;!r&&i?l.push(n):r&&l.length&&(Er(this,Nm)[Nm](l,e,t),l=[])}),l.length&&Er(this,Nm)[Nm](l,e,t)}function Xv(e,t){var n;if("b"===(null===(n=e.parentNode)||void 0===n?void 0:n.nodeName.toLowerCase()))return;if(!t.test(e.textContent))return;t.lastIndex=0;const r=e.textContent.split(t),i=[];r.forEach((e,t)=>{if(e)if(t%2==1){const t=document.createElement("b");t.className=Gf.KISS_CLASS.highlight,t.style.cssText=Er(this,Kf)[Kf].highlightStyle||"",t.textContent=e,Er(this,Sg)[Sg].add(t),i.push(t)}else{const t=document.createTextNode(e);Er(this,Sg)[Sg].add(t),i.push(t)}}),i.length>0&&e.replaceWith(...i)}function Jv(e){if(!e||0===Er(this,vg)[vg].length)return;const t=Er(this,vg)[vg].map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),n=new RegExp("\\b(".concat(t.join("|"),")\\b"),"gi");if(e.nodeType===Node.ELEMENT_NODE){const t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),r=[];let i;for(;i=t.nextNode();)r.push(i);r.forEach(e=>{Er(this,Sm)[Sm](e,n)})}else e.nodeType===Node.TEXT_NODE&&Er(this,Sm)[Sm](e,n)}function Qv(e,t,n){const r=/[。!?]+|[.?!]+(?=\s+|$)/g;[...e.childNodes].forEach(e=>{if(e.nodeType!==Node.TEXT_NODE||""===e.textContent.trim())return;const t=e.textContent,n=[];let i,o=0;for(;null!==(i=r.exec(t));){let e=i.index+i[0].length;for(;e<t.length&&/\s/.test(t[e]);)e++;n.push(t.substring(o,e)),o=e,r.lastIndex=e}o<t.length&&n.push(t.substring(o));const a=n.filter(e=>e.trim().length>0);if(a.length<=1)return;const s=a.map(e=>{const t=document.createTextNode(e);return Er(this,Sg)[Sg].add(t),t});e.replaceWith(...s)});const i=/(?:[。!??!]+|(?<!\d)\.)\s*$/;let o=0;[...e.childNodes].forEach(e=>{var r,a;o+=e.textContent.length;if(i.test(e.textContent)&&"BR"!==(null===(r=e.nextSibling)||void 0===r||null===(a=r.nodeName)||void 0===a?void 0:a.toUpperCase())&&(t===nt||t===tt&&o>=n)){o=0;const t=document.createElement("br");t.className=Gf.KISS_CLASS.br,Er(this,Sg)[Sg].add(t),e.after(t)}})}function Zv(e){if(!e)return;e.querySelectorAll(".".concat(Gf.KISS_CLASS.highlight)).forEach(e=>{const t=document.createTextNode(e.textContent);e.replaceWith(t)}),e.normalize()}function ey(e){e&&(e.querySelectorAll(".".concat(Gf.KISS_CLASS.br)).forEach(e=>e.remove()),e.normalize())}function ty(e){var t,n,r;return!!Gf.isElementOrFragment(e)&&(!e.matches(Er(this,Kf)[Kf].keepSelector)&&(!!(Gf.TAGS.BREAK_LINE.has(null===(t=e.nodeName)||void 0===t?void 0:t.toUpperCase())||null!==(n=e.matches)&&void 0!==n&&n.call(e,Er(this,Fg)[Fg])||(null===(r=e.nodeName)||void 0===r?void 0:r.toLowerCase())===Er(this,cg)[cg])||(!(!Er(this,Kf)[Kf].autoScan||!Er(this,Vg)[Vg](e))||!(Er(this,Kf)[Kf].autoScan||!e.matches(Er(this,Kf)[Kf].selector)&&!e.querySelector(Er(this,Kf)[Kf].selector)))))}function ny(e){if("string"!=typeof e)return!0;const t=e.trim();return t.length<Er(this,qf)[qf].minLength||t.length>Er(this,qf)[qf].maxLength||(1===t.length&&!t.match(/[a-zA-Z]/)||(!(isNaN(parseFloat(t))||!isFinite(t))||!!Er(this,sg)[sg].test(t)))}function ry(e){if(e instanceof Error)return e.stack||e.message||e.name||String(e);if("string"==typeof e)return e;try{return JSON.stringify(e)||String(e)}catch(t){return String(e)}}async function iy(e){var t;if(null!==(t=navigator.clipboard)&&void 0!==t&&t.writeText)return void await navigator.clipboard.writeText(e);const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.cssText="position: fixed; left: -9999px; top: 0; opacity: 0;",document.body.appendChild(n);try{n.focus(),n.select(),document.execCommand("copy")}finally{n.remove()}}function oy(e,t){var n,r,i;const o=Wt(Er(this,qf)[qf].uiLang||"zh")("copy")||"Copy",a="dark"===Er(this,qf)[qf].darkMode||"auto"===Er(this,qf)[qf].darkMode&&(null===(n=(r=window).matchMedia)||void 0===n||null===(i=n.call(r,"(prefers-color-scheme: dark)"))||void 0===i?void 0:i.matches),s=a?"#1f1f23":"#ffffff",l=a?"rgba(255, 255, 255, 0.82)":"rgba(0, 0, 0, 0.78)",c=a?"rgba(32, 156, 238, 0.45)":"rgba(32, 156, 238, 0.28)",u=a?"0 8px 24px rgba(0, 0, 0, 0.42)":"0 8px 24px rgba(0, 0, 0, 0.16)",d=a?"#ff8a80":"#d32f2f",h=a?"rgba(32, 156, 238, 0.14)":"rgba(32, 156, 238, 0.08)",p=a?"rgba(32, 156, 238, 0.24)":"rgba(32, 156, 238, 0.16)",f=document.createElement("span");f.style.cssText="position: relative; display: inline-flex; align-items: center; vertical-align: middle;";const g=function(){const e=qh("svg",{viewBox:"0 0 24 24",style:"display: inline-block; width: 1em; height: 1em; vertical-align: middle; cursor: pointer; opacity: 0.7;"});e.addEventListener("mouseenter",()=>{e.style.opacity="1"}),e.addEventListener("mouseleave",()=>{e.style.opacity="0.7"});const t=qh("path",{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4C7.58 4 4.01 7.58 4.01 12S7.58 20 12 20c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:"#F44336"});return e.appendChild(t),e}();g.classList.add(Gf.KISS_CLASS.retry),g.setAttribute("role","button"),g.setAttribute("tabindex","0");const m=document.createElement("span");m.className="notranslate",m.setAttribute("translate","no"),m.style.cssText=["position: fixed","left: 0","top: 0","z-index: 2147483647","display: none","box-sizing: border-box","width: max-content","max-width: min(420px, calc(100vw - 16px))","max-height: 240px","overflow: auto","padding: 10px 10px 8px 12px","border: 1px solid ".concat(c),"border-left: 3px solid #209CEE","border-radius: 6px","background: ".concat(s),"color: ".concat(l),"box-shadow: ".concat(u),"font-size: 12px","line-height: 1.5","font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif","white-space: pre-wrap","overflow-wrap: anywhere","user-select: text","visibility: hidden"].join("; ");const v=document.createElement("span");v.textContent=e,v.style.cssText="color: ".concat(d,";");const y=document.createElement("button");y.type="button",y.textContent=o,y.style.cssText=["display: flex","align-items: center","justify-content: center","width: fit-content","margin-top: 8px","padding: 3px 8px","border: 1px solid rgba(32, 156, 238, 0.35)","border-radius: 4px","background: ".concat(h),"color: #209CEE","font-size: 12px","line-height: 1.4","font-weight: 500","cursor: pointer","transition: background 0.2s ease, border-color 0.2s ease"].join("; "),y.addEventListener("mouseenter",()=>{y.style.background=p,y.style.borderColor="rgba(32, 156, 238, 0.55)"}),y.addEventListener("mouseleave",()=>{y.style.background=h,y.style.borderColor="rgba(32, 156, 238, 0.35)"}),y.addEventListener("click",async t=>{t.stopPropagation(),t.preventDefault();try{await Er(this,Lm)[Lm](e),y.textContent="OK",setTimeout(()=>{y.textContent=o},800)}catch(e){pt("copy translate error: ",Er(this,Pm)[Pm](e))}});let b=null;const w=()=>{b&&(clearTimeout(b),b=null)},x=()=>{if(!f.isConnected)return void S();const e=f.getBoundingClientRect(),t=m.getBoundingClientRect(),n=t.width,r=t.height,i=window.innerWidth-n-8,o=window.innerHeight-r-8;let a=e.left,s=e.bottom+6;s>o&&(s=e.top-r-6),m.style.left="".concat(Math.max(8,Math.min(a,i)),"px"),m.style.top="".concat(Math.max(8,Math.min(s,o)),"px"),m.style.visibility="visible"},A=()=>{w(),m.isConnected||document.body.appendChild(m),m.style.display="block",m.style.visibility="hidden",x(),window.addEventListener("scroll",x,!0),window.addEventListener("resize",x)},S=()=>{w(),window.removeEventListener("scroll",x,!0),window.removeEventListener("resize",x),m.style.display="none",m.style.visibility="hidden",m.remove()},k=()=>{w(),b=setTimeout(()=>{const e=document.activeElement;f.matches(":hover")||m.matches(":hover")||f.contains(e)||m.contains(e)||S()},80)};return f.addEventListener("mouseenter",A),f.addEventListener("mouseleave",k),f.addEventListener("focusin",A),f.addEventListener("focusout",e=>{m.contains(e.relatedTarget)||f.contains(e.relatedTarget)||k()}),m.addEventListener("mouseenter",A),m.addEventListener("mouseleave",k),m.addEventListener("focusin",A),m.addEventListener("focusout",e=>{f.contains(e.relatedTarget)||m.contains(e.relatedTarget)||k()}),g.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),S(),t()}),g.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.stopPropagation(),e.preventDefault(),S(),t())}),m.appendChild(v),m.appendChild(y),f.appendChild(g),f}async function ay(e,t,n){const{transTag:r,textStyle:i,transEndHook:o,transOnly:a,termsStyle:s,textExtStyle:l,selectStyle:c,parentStyle:u,grandStyle:d,toLang:h,highlightWords:p,transOrder:f="original-first"}=Er(this,Kf)[Kf],{newlineLength:g}=Er(this,qf)[qf],m=t.parentElement,v="true"===a;try{const[a,y]=Er(this,Om)[Om](e,s);if(Er(this,Im)[Im](a))return;const b=document.createElement(Er(this,cg)[cg]);b.className="".concat(Gf.KISS_CLASS.warpper," notranslate");const w=document.createElement(r);if(w.lang=h,w.className="".concat(Gf.KISS_CLASS.inner," ").concat(Er(this,fg)[fg][i]||""),null!=l&&l.trim()&&(w.style.cssText=l),w.appendChild(Kh()),a.length>g){const e=document.createElement("br");e.hidden=v,"translation-first"===f?(b.appendChild(w),b.appendChild(e)):(b.appendChild(e),b.appendChild(w))}else b.appendChild(w);Er(this,Bg)[Bg](()=>{"translation-first"===f?e[0].before(b):e[e.length-1].after(b)});const x=Er(this,Zf)[Zf],A="disabled"!==(Er(this,Gg)[Gg].streamRenderMode||"disabled")&&Er(this,Gg)[Gg].useStream&&Er(this,Gg)[Gg].useBatchFetch;let S=null,k="",_=!1;const T=w,E=()=>{if(_){const e=T.firstChild;e&&(e.nodeValue=k)}else T.textContent="",T.appendChild(document.createTextNode(k)),_=!0;S=null},C=A?e=>{if(Er(this,Zf)[Zf]!==x)return;const{text:t,isComplete:n}=e;t&&(n?(k=Array.isArray(t)?t[0]:t,S&&(cancelAnimationFrame(S),S=null),E()):(k=t,S||(S=requestAnimationFrame(E))))}:null,{trText:I,isSame:P}=await Er(this,zm)[zm](a,n,C);if(S&&(cancelAnimationFrame(S),S=null),Er(this,Zf)[Zf]!==x)throw new Error("Request terminated");if(!I||P)return void Er(this,Bg)[Bg](()=>{b.remove()});const L=Er(this,jm)[jm](I,y),R=sd.createHTML(L);if(Er(this,Bg)[Bg](()=>{w.innerHTML=R}),Er(this,bg)[bg].set(b,{nodes:e,isHide:v}),v&&Er(this,Bg)[Bg](()=>{Er(this,Vm)[Vm](e)}),c&&t.style&&(t.style.cssText+=c),u&&m&&m.style&&(m.style.cssText+=u),d&&m&&m.parentElement&&(m.parentElement.style.cssText+=d),p===at&&e.forEach(e=>Er(this,km)[km](e)),null!=o&&o.trim())try{bo.run("exports.transEndHook = ".concat(o)),bo.exports.transEndHook({hostNode:t,parentNode:m,nodes:e,wrapperNode:b,innerNode:w},{text:a,fromLang:n||Er(this,Kf)[Kf].fromLang,toLang:h})}catch(e){pt("transEndHook",e)}}catch(r){const i=Er(this,Pm)[Pm](r);if(pt("translate group error: ",i),"Request terminated"===(null==r?void 0:r.message))return void Er(this,Fm)[Fm](t);try{const r=t.querySelector(":scope > .".concat(Gf.KISS_CLASS.warpper,":last-of-type"));if(r){const o=r.querySelector(".".concat(Gf.KISS_CLASS.inner));if(o){o.textContent="";const a=Er(this,Rm)[Rm](i,()=>{Er(this,Bg)[Bg](()=>{r.remove()}),Er(this,xg)[xg].delete(t),Er(this,Nm)[Nm](e,t,n)});o.appendChild(a)}}}catch(e){pt("retry icon error: ",e.message),Er(this,Fm)[Fm](t)}}}function sy(e,t){var n=this;let r=0,i=0;const o=new Map,{startDelimiter:a,endDelimiter:s}=Er(this,$g)[$g],l=e=>{r++;const t="".concat(a).concat(r).concat(s);return o.set(t,e),t},c=e=>{if(e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.TEXT_NODE)return"";if(e.nodeType===Node.TEXT_NODE){let r=e.textContent;return Er(this,ag)[ag]&&(Er(this,ag)[ag].lastIndex=0,r=r.replace(Er(this,ag)[ag],function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];const o=r.slice(1,-2).findIndex(e=>void 0!==e),a=r[0],s=Er(n,og)[og][o];return l('<i class="'.concat(Gf.KISS_CLASS.term,'" style="').concat(t,'">').concat(s||a,"</i>"))})),r=r.replace(/\r?\n/g,()=>l("&#10;")),function(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}(r)}if(e.nodeType===Node.ELEMENT_NODE){var r,a,s;if(Er(this,Wg)[Wg](e))return"";if("true"===Er(this,Kf)[Kf].hasRichText&&Gf.TAGS.REPLACE.has(e.tagName)||e.matches(Er(this,Kf)[Kf].keepSelector)||!e.textContent.trim())return"IMG"!==(null===(a=e.tagName)||void 0===a?void 0:a.toUpperCase())&&"SVG"!==(null===(s=e.tagName)||void 0===s?void 0:s.toUpperCase())||(e.style.width="".concat(e.offsetWidth,"px"),e.style.height="".concat(e.offsetHeight,"px")),l(e.outerHTML);let t="";if(e.childNodes.forEach(e=>{t+=c(e)}),"true"===Er(this,Kf)[Kf].hasRichText&&Gf.TAGS.WARP.has(null===(r=e.tagName)||void 0===r?void 0:r.toUpperCase())){i++;const{tagName:n,format:r}=Er(this,$g)[$g];let a,s;return o.set("TAG_".concat(i),{openTag:u(e),closeTag:"</".concat(e.localName,">")}),"attribute"===r?(a="<".concat(n," i=").concat(i,">"),s="</".concat(n,">")):(a="<".concat(n).concat(i,">"),s="</".concat(n).concat(i,">")),"".concat(a).concat(t).concat(s)}return t}return""};function u(e){const t=e=>e.replace(/"/g,"&quot;");let n="<".concat(e.tagName.toLowerCase());for(const r of e.attributes)n+=" ".concat(r.name,'="').concat(t(r.value),'"');return n+=">",n}return[e.map(c).join("").trim(),o]}function ly(e,t){if(!t.size)return e;if(!e)return"";const{safeTag:n,openRegex:r,closeRegex:i}=Er(this,$g)[$g],o="data-kiss-restore";let a=e,s=e;try{a=a.replace(r,"<".concat(n," ").concat(o,'="$1">')),a=a.replace(i,"</".concat(n,">"));const e=(new DOMParser).parseFromString(a,"text/html"),l="".concat(n,"[").concat(o,"]");Array.from(e.querySelectorAll(l)).reverse().forEach(e=>{const n=e.getAttribute(o);if(n){const r=t.get("TAG_".concat(n));r&&(e.outerHTML="".concat(r.openTag).concat(e.innerHTML).concat(r.closeTag))}}),s=e.body.innerHTML}catch(e){pt("DOMParser restore failed, fallback to raw",e)}return s=s.replace(Er(this,$g)[$g].placeholderRegex,e=>t.get(e)||e),s}function cy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{toLang:r,transStartHook:i}=Er(this,Kf)[Kf],o=t||Er(this,Kf)[Kf].fromLang,a=h({},Er(this,Gg)[Gg]),s=h({},Er(this,hg)[hg]),l=Er(this,mg)[mg],c={text:e,fromLang:o,toLang:r,apiSetting:a,glossary:s,onStreamChunk:n};if(null!=i&&i.trim())try{bo.run("exports.transStartHook = ".concat(i));const e=bo.exports.transStartHook(h(h({},c),{},{apisMap:l}));e&&Object.assign(c,e)}catch(e){pt("transStartHook",e)}return ga(c)}function uy(e){return e.querySelectorAll(":scope > .".concat(Gf.KISS_CLASS.warpper))}function dy(){Er(this,Ag)[Ag].forEach(e=>Er(this,Bm)[Bm](e))}function hy(e){e.querySelectorAll(".".concat(Gf.KISS_CLASS.warpper)).forEach(e=>Er(this,Wm)[Wm](e))}function py(e){Er(this,Mm)[Mm](e).forEach(e=>{Er(this,Wm)[Wm](e)})}function fy(e){Er(this,Bg)[Bg](()=>{const t=e.parentElement;Er(this,xg)[xg].delete(t);const{nodes:n,isHide:r}=Er(this,bg)[bg].get(e)||{};r&&Er(this,Um)[Um](e,n),Er(this,bg)[bg].delete(e),e.remove(),Er(this,Kf)[Kf].highlightWords===at&&Er(this,Tm)[Tm](t),Er(this,Em)[Em](t)})}function gy(e,t){if(t){const n=document.createDocumentFragment();t.forEach(e=>n.appendChild(e));const r=e.parentElement;null==r||r.insertBefore(n,e)}}function my(e){if(e){const t=document.createDocumentFragment();e.forEach(e=>t.appendChild(e))}}function vy(e,t){const{transOrder:n="original-first"}=Er(this,Kf)[Kf];Er(this,Mm)[Mm](e).forEach(e=>{const r=e.querySelector(":scope > br"),{nodes:i}=Er(this,bg)[bg].get(e)||{};"true"===t?(Er(this,Bg)[Bg](()=>{r&&(r.hidden=!0),Er(this,Vm)[Vm](i)}),Er(this,bg)[bg].set(e,{nodes:i,isHide:!0})):(Er(this,Bg)[Bg](()=>{if(r&&(r.hidden=!1),i&&i.length){const t=document.createDocumentFragment();i.forEach(e=>t.appendChild(e));e.parentElement&&("translation-first"===n?e.after(t):e.before(t))}}),Er(this,bg)[bg].set(e,{nodes:i,isHide:!1}))})}function yy(e,t,n){if(!t||!t.length)return;const r=t[0],i=t[t.length-1],o=e.parentElement,a=null==r?void 0:r.parentElement,s=null==i?void 0:i.parentElement;o===a&&o===s&&("translation-first"===n?r.previousElementSibling!==e&&r.before(e):i.nextElementSibling!==e&&i.after(e))}function by(e,t,n){Er(this,Mm)[Mm](e).forEach(e=>{const r=e.querySelector(":scope > .".concat(Gf.KISS_CLASS.inner));r.classList.remove(Er(this,fg)[fg][t]),r.classList.add(Er(this,fg)[fg][n])})}function wy(e,t){Er(this,Mm)[Mm](e).forEach(e=>{const{nodes:n}=Er(this,bg)[bg].get(e)||{};n&&n.length&&Er(this,Bg)[Bg](()=>{Er(this,Gm)[Gm](e,n,t)})})}function xy(e){Er(this,Fm)[Fm](e),Er(this,Am)[Am](e)}function Ay(e){const t=Er(this,xg)[xg].get(e);if(!t)return void(Er(this,Qf)[Qf]&&Er(this,Am)[Am](e));const{apiSlug:n,fromLang:r,toLang:i,hasRichText:o,textStyle:a,transOnly:s,transOrder:l="original-first"}=Er(this,Kf)[Kf];if(t.apiSlug!==n||t.fromLang!==r||t.toLang!==i||t.hasRichText!==o)return Object.assign(t,{apiSlug:n,fromLang:r,toLang:i,hasRichText:o,textStyle:a,transOnly:s,transOrder:l}),void Er(this,$m)[$m](e);if(t.textStyle!==a){const n=t.textStyle;t.textStyle=a,Er(this,qm)[qm](e,n,a)}t.transOrder!==l&&(t.transOrder=l,Er(this,Km)[Km](e,l)),t.transOnly!==s&&(t.transOnly=s,Er(this,Hm)[Hm](e,s))}function Sy(){Er(this,Zg)[Zg](),Er(this,Lg)[Lg].disconnect(),Er(this,Rg)[Rg].disconnect(),Er(this,wg)[wg].clear(),Er(this,Ag)[Ag].clear(),Er(this,yg)[yg]=new WeakSet,Er(this,bg)[bg]=new WeakMap,Er(this,xg)[xg]=new WeakMap,Er(this,Lg)[Lg]=Er(this,im)[im]()}function ky(){if(Er(this,Jf)[Jf])return;Er(this,Jf)[Jf]=!0,Er(this,qf)[qf].mouseHoverSetting.useMouseHover=!0,document.addEventListener("mousemove",Er(this,Eg)[Eg]);const{mouseHoverKey:e=[],mouseHoverKey2:t=[]}=Er(this,qf)[qf].mouseHoverSetting;if(0===e.length&&0===t.length)return;const n=e.length>0,r=t.length>0;Er(this,kg)[kg]=n?Wf(e,Er(this,Cg)[Cg]):void 0;const i=n&&r&&e.length===t.length&&e.every((e,n)=>e===t[n]);Er(this,_g)[_g]=r&&!i?Wf(t,Er(this,Cg)[Cg]):void 0}function _y(){var e,t,n,r;Er(this,Jf)[Jf]&&(Er(this,Jf)[Jf]=!1,Er(this,qf)[qf].mouseHoverSetting.useMouseHover=!1,document.removeEventListener("mousemove",Er(this,Eg)[Eg]),null===(e=(t=Er(this,kg))[kg])||void 0===e||e.call(t),null===(n=(r=Er(this,_g))[_g])||void 0===n||n.call(r))}function Ty(){Er(this,ng)[ng]||(Er(this,ng)[ng]=!0,Er(this,rg)[rg]=e=>{var t,n;const r=null===(t=(n=e.target).closest)||void 0===t?void 0:t.call(n,".".concat(Gf.KISS_CLASS.warpper));if(r){const e=Er(this,bg)[bg].get(r);if(!e||!e.isHide)return;if(Er(this,tg)[tg]===r)return;Er(this,tv)[tv]();const t=parseFloat(Er(this,Kf)[Kf].transOnlyRevertDelay)||.5;return void(Er(this,eg)[eg]=setTimeout(()=>{Er(this,nv)[nv](r,e)},1e3*t))}if(Er(this,tg)[tg]){const t=Er(this,bg)[bg].get(Er(this,tg)[tg]);if(t){const n=t.nodes||[];for(const t of n){var i;if(t===e.target||null!==(i=t.contains)&&void 0!==i&&i.call(t,e.target))return}}}},Er(this,ig)[ig]=e=>{if(!Er(this,tg)[tg]){var t,n;return void((null===(t=(n=e.target).closest)||void 0===t?void 0:t.call(n,".".concat(Gf.KISS_CLASS.warpper)))&&Er(this,tv)[tv]())}const r=Er(this,tg)[tg],i=e.relatedTarget;if(i&&(r.contains(i)||i===r))return;const o=Er(this,bg)[bg].get(r);if(o&&i){const e=o.nodes||[];for(const t of e){var a;if(t===i||null!==(a=t.contains)&&void 0!==a&&a.call(t,i))return}}Er(this,tv)[tv](),Er(this,rv)[rv](r)},document.addEventListener("mouseover",Er(this,rg)[rg]),document.addEventListener("mouseout",Er(this,ig)[ig]))}function Ey(){Er(this,ng)[ng]&&(Er(this,ng)[ng]=!1,Er(this,tv)[tv](),Er(this,tg)[tg]&&Er(this,rv)[rv](Er(this,tg)[tg]),document.removeEventListener("mouseover",Er(this,rg)[rg]),document.removeEventListener("mouseout",Er(this,ig)[ig]),Er(this,rg)[rg]=null,Er(this,ig)[ig]=null)}function Cy(){Er(this,eg)[eg]&&(clearTimeout(Er(this,eg)[eg]),Er(this,eg)[eg]=null)}function Iy(e,t){const{nodes:n}=t;Er(this,Bg)[Bg](()=>{Er(this,Um)[Um](e,n);const t=e.querySelector(":scope > .".concat(Gf.KISS_CLASS.inner));t&&(t.style.display="none");const r=e.querySelector(":scope > br");r&&(r.hidden=!0)}),Er(this,tg)[tg]=e}function Py(e){const t=Er(this,bg)[bg].get(e);if(!t)return;const{nodes:n}=t;Er(this,Bg)[Bg](()=>{Er(this,Vm)[Vm](n);const t=e.querySelector(":scope > .".concat(Gf.KISS_CLASS.inner));t&&(t.style.display="")}),Er(this,tg)[tg]=null}function Ly(){if(!Er(this,Yf)[Yf]){Er(this,Yf)[Yf]=!0;try{const{injectJs:e,injectCss:t,toLang:n}=Er(this,Kf)[Kf];if(_n?t&&_r("inject_css",t):t&&(e=>{var t;const n=document.createElement("style");n.setAttribute("data-source","kiss-inject injectInternalCss"),n.textContent=e,null===(t=document.head)||void 0===t||t.appendChild(n)})(t),null!=e&&e.trim()){const t=h({},Er(this,Gg)[Gg]),r=h({},Er(this,hg)[hg]),i=Er(this,mg)[mg],o=Hf;bo.import({KT:{apiTranslate:ga,apiDectect:o,apiSetting:t,apisMap:i,toLang:n,glossary:r}}),bo.run(e)}}catch(e){pt("inject js",e)}}}function Ry(){var e;null===(e=document.querySelectorAll('[data-source^="kiss-inject"]'))||void 0===e||e.forEach(e=>e.remove())}async function Ny(){const e=Eo();if(null!=e&&e.title)try{const t=await Hf(e.title),{trText:n}=await Er(this,zm)[zm](e.title,t);Er(this,dg)[dg].title=document.title,document.title=n||e.title}catch(e){pt("tanslate title",e)}}function Oy(){const e="true"===Er(this,Kf)[Kf].transOnly&&"true"===Er(this,Kf)[Kf].transOnlyRevert;e&&!Er(this,ng)[ng]?Er(this,Zm)[Zm]():!e&&Er(this,ng)[ng]&&Er(this,ev)[ev]()}function jy(){let e=document.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function zy(e){var t;if(!e)return!1;const n=null===(t=e.nodeName)||void 0===t?void 0:t.toUpperCase();return"INPUT"===n||"TEXTAREA"===n||!(!e.isContentEditable&&"true"!==e.getAttribute("contenteditable"))}function My(e){var t;const n=null===(t=e.nodeName)||void 0===t?void 0:t.toUpperCase();return"INPUT"===n||"TEXTAREA"===n?e.value||"":e.innerText||e.textContent||""}async function Dy(e,t){e.focus(),await Nn(10);const n=e.isContentEditable||"true"===e.getAttribute("contenteditable");if((()=>{if("function"!=typeof e.select)try{document.execCommand("selectAll",!1,null)}catch(t){const n=window.getSelection();n.removeAllRanges();const r=document.createRange();r.selectNodeContents(e),n.addRange(r)}else e.select()})(),await Nn(50),n)try{ht.debug("Rich Editor detected: Priority Strategy (Clipboard Paste)");const n=new DataTransfer;n.setData("text/plain",t);const r=new ClipboardEvent("paste",{clipboardData:n,bubbles:!0,cancelable:!0,composed:!0,view:window});if(e.dispatchEvent(r),await Nn(100),By(e,t))return!0}catch(e){ht.debug("Strategy Paste failed",e)}try{if(document.execCommand("insertText",!1,t)&&(await Nn(20),By(e,t)))return!0}catch(e){ht.debug("Strategy 1 (insertText) failed",e)}if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName)try{return function(e,t){var n,r;const i=null===(n=Object.getOwnPropertyDescriptor(e,"value"))||void 0===n?void 0:n.set,o=Object.getPrototypeOf(e),a=null===(r=Object.getOwnPropertyDescriptor(o,"value"))||void 0===r?void 0:r.set;a&&i!==a?a.call(e,t):e.value=t,e.dispatchEvent(new Event("input",{bubbles:!0}))}(e,t),!0}catch(e){ht.debug("Strategy 2 (Input Value) failed",e)}return!1}function By(e,t){return My(e).includes(t.trim())}Gf=lv,lv.displayCache=new WeakMap,lv.TAGS={BREAK_LINE:new Set(["BR","WBR"]),BLOCK:new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","CANVAS","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","NOSCRIPT","OL","P","PRE","SECTION","TABLE","TFOOT","UL","VIDEO"]),INLINE:new Set(["ABBR","ACRONYM","B","BDO","BIG","BR","BUTTON","CITE","CODE","DFN","DEL","FONT","EM","I","IMG","INPUT","INS","KBD","LABEL","MAP","MARK","OBJECT","OUTPUT","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","STRONG","SUB","SUP","TEXTAREA","TIME","TT","U","VAR"]),REPLACE:new Set(["ABBR","CODE","DFN","IMG","KBD","OUTPUT","RP","RT","SAMP","SUB","SUP","SVG","TIME","VAR"]),WARP:new Set(["A","B","BDO","BDI","BIG","CITE","DEL","EM","FONT","I","INS","MARK","Q","RUBY","S","SMALL","SPAN","STRONG","U"])},lv.KISS_CLASS={warpper:"".concat(n,"-wrapper"),inner:"".concat(n,"-inner"),term:"".concat(n,"-term"),br:"".concat(n,"-br"),highlight:"".concat(n,"-highlight"),retry:"".concat(n,"-retry")},lv.BUILTIN_SKIP_PATTERNS=[/^(?:(?:https?|ftp|file):\/\/|www\.)[^\s/$.?#].[^\s]*$/i,/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,/^(?:[a-zA-Z]:\\|\/|\\)(?:[\w\-. ]+\/|[\w\-. ]+\\)*[\w\-. ]*\.?[\w\-. ]*$/,/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,/^[$\u00A2-\u00A5\u20A0-\u20CF]?\s?-?\d{1,3}(?:[.,]\d{3})*(?:[.,]\d+)?\s?(?:px|%|em|rem|pt|vw|vh|deg|s|ms)?$/,/^v?\d+(\.\d+){1,3}$/,/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?)?$/,/^({{[^}]+}}|\${[^}]+}|__\w+__|%\w+)$/,/^(?:\.|#)[\w-]+$|^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,/^@[\w.-]+$/,/^&\w+;$/,/^\[\d+\]$/,/^\d{1,2}:\d{2}(:\d{2})?$/,/^[^\s\\/:]+?\.[a-zA-Z0-9]{2,5}$/],lv.DEFAULT_OPTIONS=Rt,lv.DEFAULT_RULE=ct,lv.KISS_IGNORE_SELECTOR=".".concat(Gf.KISS_CLASS.warpper,", .kiss-caption-container, .kiss-subtitle-controls, #kiss-youtube-subtitle-list-container,\n  #").concat(r.fabID,", .").concat(r.fabID,"_warpper,\n  #").concat(r.boxID,", .").concat(r.boxID,"_warpper,\n  #").concat(r.popupID,", .").concat(r.popupID,"_warpper"),lv.BUILTIN_IGNORE_SELECTOR="address, area, audio, br, canvas,\n  data, datalist, embed, head, iframe, input, noscript, map,\n  object, option, param, picture, progress,\n  select, script, style, svg, track, textarea, template,\n  video, wbr, .notranslate, [contenteditable='true'], [translate='no']";var Fy=Ir("config"),Wy=Ir("unregisterShortcut"),Uy=Ir("isEnabled"),Vy=Ir("triggerShortcut"),Hy=Ir("activeInput"),Gy=Ir("floatBtn"),qy=Ir("resizeObserver"),Ky=Ir("blurTimer"),$y=Ir("boundFocusIn"),Yy=Ir("boundFocusOut"),Xy=Ir("boundUpdatePos");class Jy{constructor(){let{inputRule:e=kt,transApis:t=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,Fy,{writable:!0,value:void 0}),Object.defineProperty(this,Wy,{writable:!0,value:null}),Object.defineProperty(this,Uy,{writable:!0,value:!1}),Object.defineProperty(this,Vy,{writable:!0,value:void 0}),Object.defineProperty(this,Hy,{writable:!0,value:null}),Object.defineProperty(this,Gy,{writable:!0,value:null}),Object.defineProperty(this,qy,{writable:!0,value:null}),Object.defineProperty(this,Ky,{writable:!0,value:null}),Object.defineProperty(this,$y,{writable:!0,value:void 0}),Object.defineProperty(this,Yy,{writable:!0,value:void 0}),Object.defineProperty(this,Xy,{writable:!0,value:void 0}),Er(this,Fy)[Fy]={inputRule:e,transApis:t};const{triggerShortcut:n}=Er(this,Fy)[Fy].inputRule;Er(this,Vy)[Vy]=n&&n.length>0?n:St,Er(this,$y)[$y]=this.handleFocusIn.bind(this),Er(this,Yy)[Yy]=this.handleFocusOut.bind(this),Er(this,Xy)[Xy]=this.updateBtnPosition.bind(this),Er(this,Fy)[Fy].inputRule.transOpen&&this.enable()}enable(){if(Er(this,Uy)[Uy])return;const{triggerCount:e,triggerTime:t}=Er(this,Fy)[Fy].inputRule;Er(this,Wy)[Wy]=Uf(Er(this,Vy)[Vy],this.handleTranslate.bind(this),e,t),document.addEventListener("focusin",Er(this,$y)[$y]),document.addEventListener("focusout",Er(this,Yy)[Yy]),window.addEventListener("scroll",Er(this,Xy)[Xy],!0),window.addEventListener("resize",Er(this,Xy)[Xy]),window.visualViewport&&(window.visualViewport.addEventListener("resize",Er(this,Xy)[Xy]),window.visualViewport.addEventListener("scroll",Er(this,Xy)[Xy])),Er(this,Uy)[Uy]=!0;zy(jy())&&this.handleFocusIn(),ht.info("Input Translator enabled.")}disable(){Er(this,Uy)[Uy]&&(Er(this,Wy)[Wy]&&(Er(this,Wy)[Wy](),Er(this,Wy)[Wy]=null),document.removeEventListener("focusin",Er(this,$y)[$y]),document.removeEventListener("focusout",Er(this,Yy)[Yy]),window.removeEventListener("scroll",Er(this,Xy)[Xy],!0),window.removeEventListener("resize",Er(this,Xy)[Xy]),window.visualViewport&&(window.visualViewport.removeEventListener("resize",Er(this,Xy)[Xy]),window.visualViewport.removeEventListener("scroll",Er(this,Xy)[Xy])),this.removeFloatButton(),Er(this,qy)[qy]&&(Er(this,qy)[qy].disconnect(),Er(this,qy)[qy]=null),Er(this,Hy)[Hy]=null,Er(this,Uy)[Uy]=!1,ht.info("Input Translator disabled."))}toggle(){Er(this,Uy)[Uy]?this.disable():this.enable()}handleFocusIn(){Er(this,Ky)[Ky]&&(clearTimeout(Er(this,Ky)[Ky]),Er(this,Ky)[Ky]=null);const e=jy();zy(e)&&(Er(this,Hy)[Hy]=e,Er(this,qy)[qy]&&Er(this,qy)[qy].disconnect(),Er(this,qy)[qy]=new ResizeObserver(()=>this.updateBtnPosition()),Er(this,qy)[qy].observe(e),this.showFloatButton(e))}handleFocusOut(){Er(this,Ky)[Ky]=setTimeout(()=>{var e;const t=jy();t===Er(this,Hy)[Hy]||null!==(e=Er(this,Gy)[Gy])&&void 0!==e&&e.contains(t)||(this.hideFloatButton(),Er(this,Hy)[Hy]=null,Er(this,qy)[qy]&&(Er(this,qy)[qy].disconnect(),Er(this,qy)[qy]=null))},150)}showFloatButton(e){if(!Er(this,Uy)[Uy])return;const t=Er(this,Fy)[Fy].inputRule.showDot||At;if("-"!==t){if(t===At){if(!(ld||navigator.maxTouchPoints>0))return}Er(this,Hy)[Hy]=e,Er(this,Gy)[Gy]||this.createFloatButtonDOM(),Er(this,Gy)[Gy].style.display="flex",this.updateBtnPosition()}}createFloatButtonDOM(){Er(this,Gy)[Gy]=document.createElement("div");const e=ld||navigator.maxTouchPoints>0?"36px":"30px";Er(this,Gy)[Gy].style.cssText="\n        position: fixed;\n        width: ".concat(e,"; height: ").concat(e,";\n        background: #209CEE;\n        border-radius: 50%;\n        z-index: 2147483647;\n        cursor: pointer;\n        display: flex; align-items: center; justify-content: center;\n        box-shadow: 0 2px 5px rgba(0,0,0,0.2);\n        transition: opacity 0.2s;\n        font-size: 13px; color: white;\n        user-select: none; -webkit-user-select: none;\n      "),Er(this,Gy)[Gy].innerText="译";const t=e=>{e.preventDefault(),e.stopPropagation()};Er(this,Gy)[Gy].addEventListener("mousedown",t),Er(this,Gy)[Gy].addEventListener("touchstart",t,{passive:!1});const n=e=>{e.preventDefault(),e.stopPropagation(),Er(this,Hy)[Hy]&&Er(this,Hy)[Hy].focus(),this.handleTranslate({isBtnTrigger:!0})};Er(this,Gy)[Gy].addEventListener("click",n),Er(this,Gy)[Gy].addEventListener("touchend",n),document.body.appendChild(Er(this,Gy)[Gy])}hideFloatButton(){Er(this,Gy)[Gy]&&(Er(this,Gy)[Gy].style.display="none")}removeFloatButton(){Er(this,Gy)[Gy]&&(Er(this,Gy)[Gy].remove(),Er(this,Gy)[Gy]=null)}updateBtnPosition(){if(!Er(this,Hy)[Hy]||!Er(this,Hy)[Hy].isConnected||!Er(this,Gy)[Gy]||"none"===Er(this,Gy)[Gy].style.display)return void(Er(this,Gy)[Gy]&&this.hideFloatButton());const e=Er(this,Hy)[Hy].getBoundingClientRect(),t=ld||navigator.maxTouchPoints>0?36:30;let n=e.bottom-t-5,r=e.right-t-5;e.height<60&&(n=e.top-t-2),r=Math.max(0,Math.min(r,window.innerWidth-t-2)),n=Math.max(0,Math.min(n,window.innerHeight-t-2)),Er(this,Gy)[Gy].style.top="".concat(n,"px"),Er(this,Gy)[Gy].style.left="".concat(r,"px")}async handleTranslate(){let{isBtnTrigger:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ht.debug("handle input translate");const t=jy();if(!t||!zy(t))return void ht.debug("Active node is not editable");const{apiSlug:n,transSign:r,triggerCount:i}=Er(this,Fy)[Fy].inputRule;let{fromLang:o,toLang:a}=Er(this,Fy)[Fy].inputRule,s=My(t);if(e||1!==Er(this,Vy)[Vy].length||1!==Er(this,Vy)[Vy][0].length||(s=Fn(s,Er(this,Vy)[Vy][0],i)),!s.trim())return;let l=s;if(r){const e=((e,t)=>{switch(t){case"//":return e.match(/\/\/([\w-]+)\s+([^]+)/);case"\\":return e.match(/\\([\w-]+)\s+([^]+)/);case"\\\\":return e.match(/\\\\([\w-]+)\s+([^]+)/);case">":return e.match(/>([\w-]+)\s+([^]+)/);case">>":return e.match(/>>([\w-]+)\s+([^]+)/)}return e.match(/\/([\w-]+)\s+([^]+)/)})(l,r);if(e){let t=e[1];const n={zh:"zh-CN",cn:"zh-CN",tw:"zh-TW",hk:"zh-TW",jp:"ja",kr:"ko"};n[t.toLowerCase()]&&(t=n[t.toLowerCase()]),t&&fe.includes(t)&&(a=t),l=e[2]}}const c=Er(this,Fy)[Fy].transApis.find(e=>e.apiSlug===n)||Re,u="kiss-loading-"+Bn();try{!function(e,t){const n=e.getBoundingClientRect();0===n.width||n.height;const r=document.createElement("div");r.id=t,r.appendChild(Kh()),r.style.cssText="\n        position: fixed;\n        left: ".concat(n.left,"px;\n        top: ").concat(n.top,"px;\n        min-width: 20px;\n        width: ").concat(n.width||100,"px;\n        height: ").concat(n.height||30,"px;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        z-index: 2147483647;\n        pointer-events: none;\n        background: transparent;\n    "),document.body.appendChild(r)}(t,u),this.hideFloatButton();const{trText:e,isSame:n}=await ga({text:l,fromLang:o,toLang:a,apiSetting:c}),r=(null==e?void 0:e.trim())||"";if(!r||n)return;await Dy(t,r)||ht.warn("Text replacement failed after all strategies.")}catch(e){ht.error("Translate input error:",e)}finally{!function(e){const t=document.getElementById(e);t&&t.remove()}(u),Er(this,Hy)[Hy]===t&&this.showFloatButton(t)}}updateConfig(e){let{inputRule:t,transApis:n}=e;const r=Er(this,Uy)[Uy];r&&this.disable(),t&&(Er(this,Fy)[Fy].inputRule=t),n&&(Er(this,Fy)[Fy].transApis=n);const{triggerShortcut:i}=Er(this,Fy)[Fy].inputRule;Er(this,Vy)[Vy]=i&&i.length>0?i:St,r&&this.enable()}}var Qy=i(7458);function Zy(e){let{onTrigger:t,btnEvent:n,position:r,btnOffsetX:i,btnOffsetY:o}=e;const a=r.x+i,s=r.y+o,l=(0,Dh.jsx)("div",{className:"KT-tranbtn",style:{cursor:"pointer",position:"absolute",left:a,top:s,zIndex:2147483647},onMouseDown:e=>e.preventDefault(),[n]:t,children:(0,Dh.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:ld?"32":"20",height:ld?"32":"20",viewBox:"0 0 32 32",version:"1.1",children:[(0,Dh.jsx)("path",{d:"M0 0 C10.56 0 21.12 0 32 0 C32 10.56 32 21.12 32 32 C21.44 32 10.88 32 0 32 C0 21.44 0 10.88 0 0 Z ",fill:"#209CEE",transform:"translate(0,0)"}),(0,Dh.jsx)("path",{d:"M0 0 C0.66 0 1.32 0 2 0 C2 2.97 2 5.94 2 9 C2.969375 8.2575 3.93875 7.515 4.9375 6.75 C5.48277344 6.33234375 6.02804688 5.9146875 6.58984375 5.484375 C8.39053593 3.83283924 8.39053593 3.83283924 9 0 C13.95 0 18.9 0 24 0 C24 0.99 24 1.98 24 3 C22.68 3 21.36 3 20 3 C20 9.27 20 15.54 20 22 C19.01 22 18.02 22 17 22 C17 15.73 17 9.46 17 3 C15.35 3 13.7 3 12 3 C11.731875 3.598125 11.46375 4.19625 11.1875 4.8125 C10.01506533 6.97224808 8.80630718 8.35790256 7 10 C8.01790655 12.27071461 8.77442829 13.80784632 10.6875 15.4375 C11.120625 15.953125 11.55375 16.46875 12 17 C11.6875 19.6875 11.6875 19.6875 11 22 C10.34 22 9.68 22 9 22 C8.773125 21.236875 8.54625 20.47375 8.3125 19.6875 C6.73268318 16.45263699 5.16717283 15.58358642 2 14 C2 16.64 2 19.28 2 22 C1.34 22 0.68 22 0 22 C0 14.74 0 7.48 0 0 Z ",fill:"#E9F5FD",transform:"translate(4,5)"})]})});return(0,Qy.createPortal)(l,document.body)}var eb=i(4320),tb=i(5553),nb=i(1163),rb=i(7197),ib=i(7183),ob=i(3142),ab=i(1683);const sb=function(e){return"string"==typeof e};const lb=function(e,t,n){return void 0===e||sb(e)?t:(0,eb.A)({},t,{ownerState:(0,eb.A)({},t.ownerState,n)})};const cb=function(e,t,n){return"function"==typeof e?e(t,n):e};const ub=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n};const db=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t};const hb=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=(0,tb.A)(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=(0,eb.A)({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),a=(0,eb.A)({},n,i,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=ub((0,eb.A)({},i,r)),s=db(r),l=db(i),c=t(a),u=(0,tb.A)(null==c?void 0:c.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),d=(0,eb.A)({},null==c?void 0:c.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),h=(0,eb.A)({},c,n,l,s);return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}},pb=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],fb=["component","slots","slotProps"],gb=["component"];function mb(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,l=(0,gr.A)(t,pb),{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0}}=o,h=(0,gr.A)(o,fb),p=u[e]||r,f=cb(d[e],i),g=hb((0,eb.A)({className:n},l,{externalForwardedProps:"root"===e?h:void 0,externalSlotProps:f})),{props:{component:m},internalRef:v}=g,y=(0,gr.A)(g.props,gb),b=(0,ab.A)(v,null==f?void 0:f.ref,t.ref),w=a?a(y):{},x=(0,eb.A)({},i,w),A="root"===e?m||c:m,S=lb(p,(0,eb.A)({},"root"===e&&!c&&!u[e]&&s,"root"!==e&&!u[e]&&s,y,A&&{as:A},{ref:b}),x);return Object.keys(w).forEach(e=>{delete S[e]}),[p,S]}var vb=i(5227);const yb=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};var bb=i(5421),wb=i(4089);function xb(e){return(0,wb.Ay)("MuiPaper",e)}(0,bb.A)("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 Ab=["className","component","elevation","square","variant"],Sb=(0,ib.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})(e=>{let{theme:t,ownerState:n}=e;var r;return(0,eb.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,eb.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,rb.X4)("#fff",yb(n.elevation)),", ").concat((0,rb.X4)("#fff",yb(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))}),kb=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=(0,gr.A)(n,Ab),c=(0,eb.A)({},n,{component:i,elevation:o,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,nb.A)(o,xb,i)})(c);return(0,Dh.jsx)(Sb,(0,eb.A)({as:i,ownerState:c,className:(0,tb.A)(u.root,r),ref:t},l))});function _b(e){return(0,wb.Ay)("MuiAlert",e)}const Tb=(0,bb.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);var Eb=i(2513),Cb=i(5471),Ib=i(4188);function Pb(e,t){return Pb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pb(e,t)}function Lb(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pb(e,t)}const Rb=Oh.createContext(null);function Nb(e,t){var n=Object.create(null);return e&&Oh.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,Oh.isValidElement)(e)?t(e):e}(e)}),n}function Ob(e,t,n){return null!=n[t]?n[t]:e.props[t]}function jb(e,t,n){var r=Nb(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach(function(o){var a=i[o];if((0,Oh.isValidElement)(a)){var s=o in t,l=o in r,c=t[o],u=(0,Oh.isValidElement)(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&(0,Oh.isValidElement)(c)&&(i[o]=(0,Oh.cloneElement)(a,{onExited:n.bind(null,a),in:c.props.in,exit:Ob(a,"exit",e),enter:Ob(a,"enter",e)})):i[o]=(0,Oh.cloneElement)(a,{in:!1}):i[o]=(0,Oh.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:Ob(a,"exit",e),enter:Ob(a,"enter",e)})}}),i}var zb=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Mb=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Lb(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,Nb(n.children,function(e){return(0,Oh.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:Ob(e,"appear",n),enter:Ob(e,"enter",n),exit:Ob(e,"exit",n)})})):jb(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Nb(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,eb.A)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,gr.A)(e,["component","childFactory"]),i=this.state.contextValue,o=zb(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?Oh.createElement(Rb.Provider,{value:i},o):Oh.createElement(Rb.Provider,{value:i},Oh.createElement(t,r,o))},t}(Oh.Component);Mb.propTypes={},Mb.defaultProps={component:"div",childFactory:function(e){return e}};const Db=Mb;var Bb=i(1834),Fb=i(8791);const Wb=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=Oh.useState(!1),h=(0,tb.A)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-a/2+o,left:-a/2+i},f=(0,tb.A)(n.child,u&&n.childLeaving,r&&n.childPulsate);return s||u||d(!0),Oh.useEffect(()=>{if(!s&&null!=l){const e=setTimeout(l,c);return()=>{clearTimeout(e)}}},[l,s,c]),(0,Dh.jsx)("span",{className:h,style:p,children:(0,Dh.jsx)("span",{className:f})})};const Ub=(0,bb.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var Vb,Hb,Gb,qb;const Kb=["center","classes","className"];let $b,Yb,Xb,Jb;const Qb=(0,Bb.i7)($b||($b=Vb||(Vb=Af(["\n  0% {\n    transform: scale(0);\n    opacity: 0.1;\n  }\n\n  100% {\n    transform: scale(1);\n    opacity: 0.3;\n  }\n"])))),Zb=(0,Bb.i7)(Yb||(Yb=Hb||(Hb=Af(["\n  0% {\n    opacity: 1;\n  }\n\n  100% {\n    opacity: 0;\n  }\n"])))),ew=(0,Bb.i7)(Xb||(Xb=Gb||(Gb=Af(["\n  0% {\n    transform: scale(1);\n  }\n\n  50% {\n    transform: scale(0.92);\n  }\n\n  100% {\n    transform: scale(1);\n  }\n"])))),tw=(0,ib.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),nw=(0,ib.Ay)(Wb,{name:"MuiTouchRipple",slot:"Ripple"})(Jb||(Jb=qb||(qb=Af(["\n  opacity: 0;\n  position: absolute;\n\n  &."," {\n    opacity: 0.3;\n    transform: scale(1);\n    animation-name: ",";\n    animation-duration: ","ms;\n    animation-timing-function: ",";\n  }\n\n  &."," {\n    animation-duration: ","ms;\n  }\n\n  & ."," {\n    opacity: 1;\n    display: block;\n    width: 100%;\n    height: 100%;\n    border-radius: 50%;\n    background-color: currentColor;\n  }\n\n  & ."," {\n    opacity: 0;\n    animation-name: ",";\n    animation-duration: ","ms;\n    animation-timing-function: ",";\n  }\n\n  & ."," {\n    position: absolute;\n    /* @noflip */\n    left: 0px;\n    top: 0;\n    animation-name: ",";\n    animation-duration: 2500ms;\n    animation-timing-function: ",";\n    animation-iteration-count: infinite;\n    animation-delay: 200ms;\n  }\n"]))),Ub.rippleVisible,Qb,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},Ub.ripplePulsate,e=>{let{theme:t}=e;return t.transitions.duration.shorter},Ub.child,Ub.childLeaving,Zb,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},Ub.childPulsate,ew,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),rw=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=(0,gr.A)(n,Kb),[s,l]=Oh.useState([]),c=Oh.useRef(0),u=Oh.useRef(null);Oh.useEffect(()=>{u.current&&(u.current(),u.current=null)},[s]);const d=Oh.useRef(!1),h=(0,Fb.A)(),p=Oh.useRef(null),f=Oh.useRef(null),g=Oh.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l(e=>[...e,(0,Dh.jsx)(nw,{classes:{ripple:(0,tb.A)(i.ripple,Ub.ripple),rippleVisible:(0,tb.A)(i.rippleVisible,Ub.rippleVisible),ripplePulsate:(0,tb.A)(i.ripplePulsate,Ub.ripplePulsate),child:(0,tb.A)(i.child,Ub.child),childLeaving:(0,tb.A)(i.childLeaving,Ub.childLeaving),childPulsate:(0,tb.A)(i.childPulsate,Ub.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},c.current)]),c.current+=1,u.current=a},[i]),m=Oh.useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:f.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,m;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)m=Math.sqrt((2*l.width**2+l.height**2)/3),m%2==0&&(m+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;m=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===p.current&&(p.current=()=>{g({pulsate:i,rippleX:c,rippleY:u,rippleSize:m,cb:n})},h.start(80,()=>{p.current&&(p.current(),p.current=null)})):g({pulsate:i,rippleX:c,rippleY:u,rippleSize:m,cb:n})},[r,g,h]),v=Oh.useCallback(()=>{m({},{pulsate:!0})},[m]),y=Oh.useCallback((e,t)=>{if(h.clear(),"touchend"===(null==e?void 0:e.type)&&p.current)return p.current(),p.current=null,void h.start(0,()=>{y(e,t)});p.current=null,l(e=>e.length>0?e.slice(1):e),u.current=t},[h]);return Oh.useImperativeHandle(t,()=>({pulsate:v,start:m,stop:y}),[v,m,y]),(0,Dh.jsx)(tw,(0,eb.A)({className:(0,tb.A)(Ub.root,i.root,o),ref:f},a,{children:(0,Dh.jsx)(Db,{component:null,exit:!0,children:s})}))});function iw(e){return(0,wb.Ay)("MuiButtonBase",e)}const ow=(0,bb.A)("MuiButtonBase",["root","disabled","focusVisible"]),aw=["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"],sw=(0,ib.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.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"},["&.".concat(ow.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),lw=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:h="a",onBlur:p,onClick:f,onContextMenu:g,onDragLeave:m,onFocus:v,onFocusVisible:y,onKeyDown:b,onKeyUp:w,onMouseDown:x,onMouseLeave:A,onMouseUp:S,onTouchEnd:k,onTouchMove:_,onTouchStart:T,tabIndex:E=0,TouchRippleProps:C,touchRippleRef:I,type:P}=n,L=(0,gr.A)(n,aw),R=Oh.useRef(null),N=Oh.useRef(null),O=(0,Eb.A)(N,I),{isFocusVisibleRef:j,onFocus:z,onBlur:M,ref:D}=(0,Ib.A)(),[B,F]=Oh.useState(!1);l&&B&&F(!1),Oh.useImperativeHandle(r,()=>({focusVisible:()=>{F(!0),R.current.focus()}}),[]);const[W,U]=Oh.useState(!1);Oh.useEffect(()=>{U(!0)},[]);const V=W&&!c&&!l;function H(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;return(0,Cb.A)(r=>{t&&t(r);return!n&&N.current&&N.current[e](r),!0})}Oh.useEffect(()=>{B&&d&&!c&&W&&N.current.pulsate()},[c,d,B,W]);const G=H("start",x),q=H("stop",g),K=H("stop",m),$=H("stop",S),Y=H("stop",e=>{B&&e.preventDefault(),A&&A(e)}),X=H("start",T),J=H("stop",k),Q=H("stop",_),Z=H("stop",e=>{M(e),!1===j.current&&F(!1),p&&p(e)},!1),ee=(0,Cb.A)(e=>{R.current||(R.current=e.currentTarget),z(e),!0===j.current&&(F(!0),y&&y(e)),v&&v(e)}),te=()=>{const e=R.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ne=Oh.useRef(!1),re=(0,Cb.A)(e=>{d&&!ne.current&&B&&N.current&&" "===e.key&&(ne.current=!0,N.current.stop(e,()=>{N.current.start(e)})),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!l&&(e.preventDefault(),f&&f(e))}),ie=(0,Cb.A)(e=>{d&&" "===e.key&&N.current&&B&&!e.defaultPrevented&&(ne.current=!1,N.current.stop(e,()=>{N.current.pulsate(e)})),w&&w(e),f&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&f(e)});let oe=s;"button"===oe&&(L.href||L.to)&&(oe=h);const ae={};"button"===oe?(ae.type=void 0===P?"button":P,ae.disabled=l):(L.href||L.to||(ae.role="button"),l&&(ae["aria-disabled"]=l));const se=(0,Eb.A)(t,D,R);const le=(0,eb.A)({},n,{centerRipple:i,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:E,focusVisible:B}),ce=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,nb.A)(o,iw,i);return n&&r&&(a.root+=" ".concat(r)),a})(le);return(0,Dh.jsxs)(sw,(0,eb.A)({as:oe,className:(0,tb.A)(ce.root,a),ownerState:le,onBlur:Z,onClick:f,onContextMenu:q,onFocus:ee,onKeyDown:re,onKeyUp:ie,onMouseDown:G,onMouseLeave:Y,onMouseUp:$,onDragLeave:K,onTouchEnd:J,onTouchMove:Q,onTouchStart:X,ref:se,tabIndex:l?-1:E,type:P},ae,L,{children:[o,V?(0,Dh.jsx)(rw,(0,eb.A)({ref:O,center:i},C)):null]}))}),cw=lw;function uw(e){return(0,wb.Ay)("MuiIconButton",e)}const dw=(0,bb.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),hw=["edge","children","className","color","disabled","disableFocusRipple","size"],pw=(0,ib.Ay)(cw,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,vb.A)(n.color))],n.edge&&t["edge".concat((0,vb.A)(n.edge))],t["size".concat((0,vb.A)(n.size))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({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})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,rb.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})},e=>{let{theme:t,ownerState:n}=e;var r;const i=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,eb.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,eb.A)({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":(0,eb.A)({},i&&{backgroundColor:t.vars?"rgba(".concat(i.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,rb.X4)(i.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(dw.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),fw=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=(0,gr.A)(n,hw),d=(0,eb.A)({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),h=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,vb.A)(r)),i&&"edge".concat((0,vb.A)(i)),"size".concat((0,vb.A)(o))]};return(0,nb.A)(a,uw,t)})(d);return(0,Dh.jsx)(pw,(0,eb.A)({className:(0,tb.A)(h.root,o),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},u,{ownerState:d,children:i}))});var gw=i(4270);const mw=(0,gw.A)((0,Dh.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"),vw=(0,gw.A)((0,Dh.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),yw=(0,gw.A)((0,Dh.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"),bw=(0,gw.A)((0,Dh.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"),ww=(0,gw.A)((0,Dh.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"),xw=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],Aw=(0,ib.Ay)(kb,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,vb.A)(n.color||n.severity))]]}})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?rb.e$:rb.a,r="light"===t.palette.mode?rb.a:rb.e$;return(0,eb.A)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[i]=e;return{props:{colorSeverity:i,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert["".concat(i,"Color")]:n(t.palette[i].light,.6),backgroundColor:t.vars?t.vars.palette.Alert["".concat(i,"StandardBg")]:r(t.palette[i].light,.9),["& .".concat(Tb.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(i,"IconColor")]}:{color:t.palette[i].main}}}}),...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[r]=e;return{props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert["".concat(r,"Color")]:n(t.palette[r].light,.6),border:"1px solid ".concat((t.vars||t).palette[r].light),["& .".concat(Tb.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(r,"IconColor")]}:{color:t.palette[r].main}}}}),...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.dark}).map(e=>{let[n]=e;return{props:{colorSeverity:n,variant:"filled"},style:(0,eb.A)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert["".concat(n,"FilledColor")],backgroundColor:t.vars.palette.Alert["".concat(n,"FilledBg")]}:{backgroundColor:"dark"===t.palette.mode?t.palette[n].dark:t.palette[n].main,color:t.palette.getContrastText(t.palette[n].main)})}})]})}),Sw=(0,ib.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),kw=(0,ib.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),_w=(0,ib.Ay)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Tw={success:(0,Dh.jsx)(mw,{fontSize:"inherit"}),warning:(0,Dh.jsx)(vw,{fontSize:"inherit"}),error:(0,Dh.jsx)(yw,{fontSize:"inherit"}),info:(0,Dh.jsx)(bw,{fontSize:"inherit"})},Ew=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:a="Close",color:s,components:l={},componentsProps:c={},icon:u,iconMapping:d=Tw,onClose:h,role:p="alert",severity:f="success",slotProps:g={},slots:m={},variant:v="standard"}=n,y=(0,gr.A)(n,xw),b=(0,eb.A)({},n,{color:s,severity:f,variant:v,colorSeverity:s||f}),w=(e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root","color".concat((0,vb.A)(n||r)),"".concat(t).concat((0,vb.A)(n||r)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,nb.A)(o,_b,i)})(b),x={slots:(0,eb.A)({closeButton:l.CloseButton,closeIcon:l.CloseIcon},m),slotProps:(0,eb.A)({},c,g)},[A,S]=mb("closeButton",{elementType:fw,externalForwardedProps:x,ownerState:b}),[k,_]=mb("closeIcon",{elementType:ww,externalForwardedProps:x,ownerState:b});return(0,Dh.jsxs)(Aw,(0,eb.A)({role:p,elevation:0,ownerState:b,className:(0,tb.A)(w.root,o),ref:t},y,{children:[!1!==u?(0,Dh.jsx)(Sw,{ownerState:b,className:w.icon,children:u||d[f]||Tw[f]}):null,(0,Dh.jsx)(kw,{ownerState:b,className:w.message,children:i}),null!=r?(0,Dh.jsx)(_w,{ownerState:b,className:w.action,children:r}):null,null==r&&h?(0,Dh.jsx)(_w,{ownerState:b,className:w.action,children:(0,Dh.jsx)(A,(0,eb.A)({size:"small","aria-label":a,title:a,color:"inherit",onClick:h},S,{children:(0,Dh.jsx)(k,(0,eb.A)({fontSize:"small"},_))}))}):null]}))});function Cw(e,t){const n=(0,Oh.useRef)(e);(0,Oh.useEffect)(()=>{n.current=e},[e]);const r=(0,Oh.useMemo)(()=>On(function(){return n.current(...arguments)},t),[t]);return(0,Oh.useEffect)(()=>()=>{r.cancel()},[r]),r}function Iw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const[r,i]=(0,Oh.useState)(!0),[o,a]=(0,Oh.useState)(t);(0,Oh.useEffect)(()=>{let n=!0;return(async()=>{try{const r=await nr.getObj(e);null==r?await nr.setObj(e,t):n&&a(r)}catch(t){pt("storage load error for key: ".concat(e),t)}finally{n&&i(!1)}})(),()=>{n=!1}},[e,t]);const s=Cw((0,Oh.useCallback)(async(e,t)=>{try{const n=await $c(e,t);null!=n&&n.isNew&&a(n.value)}catch(t){pt("Sync failed",e)}},[]),3e3);(0,Oh.useEffect)(()=>{r||null!==o&&(nr.setObj(e,o).catch(t=>{pt("storage save error for key: ".concat(e),t)}),n&&"options"===En()&&s(n,o))},[e,n,r,o,s]);const l=(0,Oh.useCallback)(e=>{a(t=>"function"==typeof e?e(t):e)},[]),c=(0,Oh.useCallback)(e=>{a(t=>{const n="function"==typeof e?e(t):e;return h(h({},"object"==typeof t&&null!==t?t:{}),n)})},[]),u=(0,Oh.useCallback)(async()=>{try{await nr.del(e),a(null)}catch(t){pt("storage remove error for key: ".concat(e),t)}},[e]),d=(0,Oh.useCallback)(async()=>{try{const n=await nr.getObj(e);a(null!=n?n:t)}catch(t){pt("storage reload error for key: ".concat(e),t)}},[e,t]);return{data:o,save:l,update:c,remove:u,reload:d,isLoading:r}}function Pw(e){return(0,wb.Ay)("MuiCircularProgress",e)}(0,bb.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var Lw,Rw,Nw,Ow;const jw=["className","color","disableShrink","size","style","thickness","value","variant"];let zw,Mw,Dw,Bw;const Fw=44,Ww=(0,Bb.i7)(zw||(zw=Lw||(Lw=Af(["\n  0% {\n    transform: rotate(0deg);\n  }\n\n  100% {\n    transform: rotate(360deg);\n  }\n"])))),Uw=(0,Bb.i7)(Mw||(Mw=Rw||(Rw=Af(["\n  0% {\n    stroke-dasharray: 1px, 200px;\n    stroke-dashoffset: 0;\n  }\n\n  50% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -15px;\n  }\n\n  100% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -125px;\n  }\n"])))),Vw=(0,ib.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,vb.A)(n.color))]]}})(e=>{let{ownerState:t,theme:n}=e;return(0,eb.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,Bb.AH)(Dw||(Dw=Nw||(Nw=Af(["\n      animation: "," 1.4s linear infinite;\n    "]))),Ww)}),Hw=(0,ib.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Gw=(0,ib.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,vb.A)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})(e=>{let{ownerState:t,theme:n}=e;return(0,eb.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,Bb.AH)(Bw||(Bw=Ow||(Ow=Af(["\n      animation: "," 1.4s ease-in-out infinite;\n    "]))),Uw)}),qw=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:u="indeterminate"}=n,d=(0,gr.A)(n,jw),h=(0,eb.A)({},n,{color:i,disableShrink:o,size:a,thickness:l,value:c,variant:u}),p=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,"color".concat((0,vb.A)(r))],svg:["svg"],circle:["circle","circle".concat((0,vb.A)(n)),i&&"circleDisableShrink"]};return(0,nb.A)(o,Pw,t)})(h),f={},g={},m={};if("determinate"===u){const e=2*Math.PI*((Fw-l)/2);f.strokeDasharray=e.toFixed(3),m["aria-valuenow"]=Math.round(c),f.strokeDashoffset="".concat(((100-c)/100*e).toFixed(3),"px"),g.transform="rotate(-90deg)"}return(0,Dh.jsx)(Vw,(0,eb.A)({className:(0,tb.A)(p.root,r),style:(0,eb.A)({width:a,height:a},g,s),ownerState:h,ref:t,role:"progressbar"},m,d,{children:(0,Dh.jsx)(Hw,{className:p.svg,ownerState:h,viewBox:"".concat(22," ").concat(22," ").concat(Fw," ").concat(Fw),children:(0,Dh.jsx)(Gw,{className:p.circle,style:f,ownerState:h,cx:Fw,cy:Fw,r:(Fw-l)/2,fill:"none",strokeWidth:l})})}))}),Kw=qw;var $w=i(8757);function Yw(e){return(0,wb.Ay)("MuiTypography",e)}(0,bb.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Xw=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Jw=(0,ib.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat((0,vb.A)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})}),Qw={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Zw={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},ex=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiTypography"}),r=(e=>Zw[e]||e)(n.color),i=(0,$w.A)((0,eb.A)({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:h=Qw}=i,p=(0,gr.A)(i,Xw),f=(0,eb.A)({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:h}),g=s||(u?"p":h[d]||Qw[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e,s={root:["root",o,"inherit"!==e.align&&"align".concat((0,vb.A)(t)),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,nb.A)(s,Yw,a)})(f);return(0,Dh.jsx)(Jw,(0,eb.A)({as:g,ref:t,ownerState:f,className:(0,tb.A)(m.root,a)},p))});function tx(e){return(0,wb.Ay)("MuiLink",e)}const nx=(0,bb.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var rx=i(8343);const ix={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},ox=e=>{let{theme:t,ownerState:n}=e;const r=(e=>ix[e]||e)(n.color),i=(0,rx.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,rx.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,rb.X4)(i,.4)},ax=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],sx=(0,ib.Ay)(ex,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,vb.A)(n.underline))],"button"===n.component&&t.button]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,eb.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:ox({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(nx.focusVisible)]:{outline:"auto"}})}),lx=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiLink"}),{className:r,color:i="primary",component:o="a",onBlur:a,onFocus:s,TypographyClasses:l,underline:c="always",variant:u="inherit",sx:d}=n,h=(0,gr.A)(n,ax),{isFocusVisibleRef:p,onBlur:f,onFocus:g,ref:m}=(0,Ib.A)(),[v,y]=Oh.useState(!1),b=(0,Eb.A)(t,m),w=(0,eb.A)({},n,{color:i,component:o,focusVisible:v,underline:c,variant:u}),x=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root","underline".concat((0,vb.A)(i)),"button"===n&&"button",r&&"focusVisible"]};return(0,nb.A)(o,tx,t)})(w);return(0,Dh.jsx)(sx,(0,eb.A)({color:i,className:(0,tb.A)(x.root,r),classes:l,component:o,onBlur:e=>{f(e),!1===p.current&&y(!1),a&&a(e)},onFocus:e=>{g(e),!0===p.current&&y(!0),s&&s(e)},ref:b,ownerState:w,variant:u,sx:[...Object.keys(ix).includes(i)?[]:[{color:i}],...Array.isArray(d)?d:[d]]},h))});function cx(e){return(0,wb.Ay)("MuiDivider",e)}const ux=(0,bb.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),dx=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],hx=(0,ib.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,rb.X4)(t.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,eb.A)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,eb.A)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),px=(0,ib.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===n.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),fx=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:h="fullWidth"}=n,p=(0,gr.A)(n,dx),f=(0,eb.A)({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:h}),g=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e,c={root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]};return(0,nb.A)(c,cx,r)})(f);return(0,Dh.jsx)(hx,(0,eb.A)({as:a,className:(0,tb.A)(g.root,o),role:u,ref:t,ownerState:f},p,{children:i?(0,Dh.jsx)(px,{className:g.wrapper,ownerState:f,children:i}):null}))});fx.muiSkipListHighlight=!0;const gx=fx;function mx(){return(0,Dh.jsxs)("center",{children:[(0,Dh.jsx)(gx,{children:(0,Dh.jsx)(lx,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.22")})}),(0,Dh.jsx)(Kw,{})]})}const vx=(0,Oh.createContext)({setting:Rt,updateSetting:()=>{},reloadSetting:()=>{}});function yx(e){let{children:t,context:n}=e;const r=(0,Oh.useMemo)(()=>"options"===n,[n]),{data:i,isLoading:o,update:a,reload:s}=Iw(qt,Rt,Ht);(0,Oh.useEffect)(()=>{"boolean"==typeof(null==i?void 0:i.darkMode)&&a(e=>h(h({},e),{},{darkMode:e.darkMode?"dark":"light"}))},[null==i?void 0:i.darkMode,a]),(0,Oh.useEffect)(()=>{r&&(async()=>{try{ht.setLevel(null==i?void 0:i.logLevel),_n&&await _r("set_loglevel",null==i?void 0:i.logLevel)}catch(e){ht.error("Failed to fetch log level, using default.",e)}})()},[r,null==i?void 0:i.logLevel]);const l=(0,Oh.useCallback)(e=>{a(e),pr(Ht)},[a]),c=(0,Oh.useCallback)(e=>async t=>{l(n=>h(h({},n),{},{[e]:h(h({},(null==n?void 0:n[e])||{}),t)}))},[l]),u=(0,Oh.useMemo)(()=>({context:n,setting:i,updateSetting:l,updateChild:c,reloadSetting:s}),[n,i,l,c,s]);return o?r?(0,Dh.jsx)(mx,{}):null:i?(0,Dh.jsx)(vx.Provider,{value:u,children:t}):r?(0,Dh.jsx)("center",{children:(0,Dh.jsxs)(Ew,{severity:"error",sx:{maxWidth:600,margin:"60px auto"},children:[(0,Dh.jsx)("p",{children:"数据加载出错,请刷新页面或卸载后重新安装。"}),(0,Dh.jsx)("p",{children:"Data loading error, please refresh the page or uninstall and reinstall."})]})}):null}function bx(){return(0,Oh.useContext)(vx)}var wx=i(8755);const xx=Oh.createContext(null);function Ax(){return Oh.useContext(xx)}const Sx="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const kx=function(e){const{children:t,theme:n}=e,r=Ax(),i=Oh.useMemo(()=>{const e=null===r?n:function(e,t){if("function"==typeof t)return t(e);return(0,eb.A)({},e,t)}(r,n);return null!=e&&(e[Sx]=null!==r),e},[n,r]);return(0,Dh.jsx)(xx.Provider,{value:i,children:t})};const _x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=Oh.useContext(zh.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},Tx=["value"],Ex=Oh.createContext();const Cx=function(e){let{value:t}=e,n=(0,gr.A)(e,Tx);return(0,Dh.jsx)(Ex.Provider,(0,eb.A)({value:null==t||t},n))};var Ix=i(5779),Px=i(6489),Lx=i(7461),Rx=i(1876),Nx=i(3780),Ox=i(2979);const jx=(0,Ox.A)();const zx=function(){return _x(arguments.length>0&&void 0!==arguments[0]?arguments[0]:jx)};function Mx(e){const t=(0,Rx.internal_serializeStyles)(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles="@layer global{".concat(t.styles,"}")),t):e}const Dx=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const i=zx(r),o=n&&i[n]||i;let a="function"==typeof t?t(o):t;return o.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Mx("function"==typeof e?e(o):e)):Mx(a)),(0,Dh.jsx)(Nx.A,{styles:a})};const Bx={};function Fx(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Oh.useMemo(()=>{const i=e&&t[e]||t;if("function"==typeof n){const o=n(i),a=e?(0,eb.A)({},t,{[e]:o}):o;return r?()=>a:a}return e?(0,eb.A)({},t,{[e]:n}):(0,eb.A)({},t,n)},[e,t,n,r])}const Wx=function(e){const{children:t,theme:n,themeId:r}=e,i=_x(Bx),o=Ax()||Bx,a=Fx(r,i,n),s=Fx(r,o,n,!0),l="rtl"===a.direction,c=function(e){const t=_x(),n=(0,Lx.A)()||"",{modularCssLayers:r}=e;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return i=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,i):"@layer ".concat(i,";"):"",(0,Px.A)(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(i){var r;if(t&&null!=(r=t.hasAttribute)&&r.call(t,"data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const o=document.createElement("style");o.setAttribute("data-mui-layer-order",n),o.textContent=i,e.prepend(o)}else{var o;null==(o=e.querySelector('style[data-mui-layer-order="'.concat(n,'"]')))||o.remove()}},[i,n]),i?(0,Dh.jsx)(Dx,{styles:i}):null}(a);return(0,Dh.jsx)(kx,{theme:s,children:(0,Dh.jsx)(zh.T.Provider,{value:a,children:(0,Dh.jsx)(Cx,{value:l,children:(0,Dh.jsxs)(Ix.A,{value:null==a?void 0:a.components,children:[c,t]})})})})};var Ux=i(5863);const Vx=["theme"];function Hx(e){let{theme:t}=e,n=(0,gr.A)(e,Vx);const r=t[Ux.A];let i=r||t;return"function"!=typeof t&&(r&&!r.vars?i=(0,eb.A)({},r,{vars:null}):t&&!t.vars&&(i=(0,eb.A)({},t,{vars:null}))),(0,Dh.jsx)(Wx,(0,eb.A)({},n,{themeId:r?Ux.A:void 0,theme:i}))}var Gx=i(1210);const qx=function(e){return(0,Dh.jsx)(Dx,(0,eb.A)({},e,{defaultTheme:Gx.A,themeId:Ux.A}))},Kx=(e,t)=>(0,eb.A)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),$x=e=>(0,eb.A)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}});const Yx=function(e){const t=(0,ob.b)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return(0,Dh.jsxs)(Oh.Fragment,{children:[(0,Dh.jsx)(qx,{styles:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(t=>{let[n,i]=t;var o;r[e.getColorSchemeSelector(n).replace(/\s*&/,"")]={colorScheme:null==(o=i.palette)?void 0:o.mode}});let i=(0,eb.A)({html:Kx(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,eb.A)({margin:0},$x(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=null==(n=e.components)||null==(n=n.MuiCssBaseline)?void 0:n.styleOverrides;return o&&(i=[i,o]),i}(e,r)}),n]})};function Xx(){const{setting:{darkMode:e},updateSetting:t}=bx(),n=(0,Oh.useCallback)(()=>{t({darkMode:{light:"dark",dark:"auto",auto:"light"}[e]||"light"})},[e,t]);return{darkMode:e,toggleDarkMode:n}}function Jx(e){let{children:t,options:n={},styles:r={}}=e;const{darkMode:i}=Xx(),[o,l]=(0,Oh.useState)(a);(0,Oh.useEffect)(()=>{if("function"!=typeof window.matchMedia)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{l(e.matches?s:a)};return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]);const c=(0,Oh.useMemo)(()=>{let e=16;try{const t=window.getComputedStyle(document.documentElement).fontSize;e=parseInt(t.replace("px",""))}catch(e){}const t="dark"===i||"auto"===i&&o===s;return(0,wx.A)(h({palette:{mode:t?s:a},typography:{htmlFontSize:e}},n))},[i,n,o]);return(0,Dh.jsxs)(Hx,{theme:c,children:[(0,Dh.jsx)(Yx,{}),(0,Dh.jsx)(qx,{styles:r}),t]})}var Qx=i(1985);const Zx=["className","component"];var eA=i(7599);const tA=(0,bb.A)("MuiBox",["root"]),nA=(0,wx.A)(),rA=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=(0,Rx.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Qx.A);return Oh.forwardRef(function(e,a){const s=zx(n),l=(0,$w.A)(e),{className:c,component:u="div"}=l,d=(0,gr.A)(l,Zx);return(0,Dh.jsx)(o,(0,eb.A)({as:u,ref:a,className:(0,tb.A)(c,i?i(r):r),theme:t&&s[t]||s},d))})}({themeId:Ux.A,defaultTheme:nA,defaultClassName:tA.root,generateClassName:eA.A.generate}),iA=rA;function oA(){const e=zx(Gx.A);return e[Ux.A]||e}var aA=i(6253),sA=i(8581);function lA(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,sA.A)(e,t,n)}function cA(e){if(e.type)return e;if("#"===e.charAt(0))return cA(function(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", "),")"):""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,aA.A)(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,aA.A)(10,r))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:n,values:i,colorSpace:r}}function uA(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function dA(e,t){return e=cA(e),t=lA(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,uA(e)}const hA=["direction","size","setSize","position","setPosition","children","minSize","maxSize"],pA=["header","children","position","size","minSize","maxSize","setSize","setPosition","onChangeSize","onChangePosition","autoHeight"];function fA(e){let{direction:t,size:n,setSize:r,position:i,setPosition:o,children:a,minSize:s,maxSize:l}=e,c=mr(e,hA);const[u,d]=(0,Oh.useState)(null);function p(e){!ld&&e.target.setPointerCapture(e.pointerId);const{clientX:t,clientY:r}=ld?e.targetTouches[0]:e;d({x:i.x,y:i.y,w:n.w,h:n.h,clientX:t,clientY:r})}function f(e){const{clientX:a,clientY:c}=ld?e.targetTouches[0]:e;if(u){const e=a-u.clientX,d=c-u.clientY;let h=i.x,p=i.y,f=n.w,g=n.h;switch(t){case"Header":h=u.x+e,p=u.y+d;break;case"TopLeft":h=u.x+e,p=u.y+d,f=u.w-e,g=u.h-d;break;case"Top":p=u.y+d,g=u.h-d;break;case"TopRight":p=u.y+d,f=u.w+e,g=u.h-d;break;case"Left":h=u.x+e,f=u.w-e;break;case"Right":f=u.w+e;break;case"BottomLeft":h=u.x+e,f=u.w-e,g=u.h+d;break;case"Bottom":g=u.h+d;break;case"BottomRight":f=u.w+e,g=u.h+d}f<s.w&&(f=s.w,h=i.x),f>l.w&&(f=l.w,h=i.x),g<s.h&&(g=s.h,p=i.y),g>l.h&&(g=l.h,p=i.y),o({x:Ln(h,0,window.innerWidth-f),y:Ln(p,0,window.innerHeight-50)}),r({w:Ln(f,s.w,window.innerWidth),h:Ln(g,s.h,window.innerHeight)})}}function g(e){e.stopPropagation(),d(null)}const m=ld?{onTouchStart:p,onTouchMove:f,onTouchEnd:g}:{onPointerDown:p,onPointerMove:f,onPointerUp:g};return(0,Dh.jsx)("div",h(h(h({},c),m),{},{children:a}))}function gA(e){let{header:t,children:n,position:r={x:0,y:0},size:i={w:600,h:400},minSize:o={w:300,h:200},maxSize:a={w:1200,h:1200},setSize:s,setPosition:l,onChangeSize:c,onChangePosition:u,autoHeight:d}=e,p=mr(e,pA);const f=oA(),g="dark"===f.palette.mode?"\n        0 0 0 1px rgba(255,255,255,0.18),\n        0 0 10px 2px rgba(255,255,255,0.18),\n        0 8px 32px rgba(0,0,0,0.35)\n      ":" \n        0 4px 18px rgba(0, 0, 0, 0.15)\n      ",m={size:i,setSize:s,position:r,setPosition:l,minSize:o,maxSize:a};return(0,Dh.jsxs)(iA,h(h({className:"KT-draggable",style:{touchAction:"none",position:"fixed",left:r.x,top:r.y,display:"grid",gridTemplateColumns:"".concat(8,"px auto ").concat(8,"px"),gridTemplateRows:"".concat(8,"px auto ").concat(8,"px"),zIndex:2147483647,borderRadius:"12px",overflow:"hidden"}},p),{},{children:[(0,Dh.jsx)(fA,h({direction:"TopLeft",style:{transform:"translate(".concat(4,"px, ").concat(4,"px)"),cursor:"nw-resize"}},m)),(0,Dh.jsx)(fA,h({direction:"Top",style:{margin:"0 ".concat(4,"px"),transform:"translate(0px, ".concat(4,"px)"),cursor:"row-resize"}},m)),(0,Dh.jsx)(fA,h({direction:"TopRight",style:{transform:"translate(-".concat(4,"px, ").concat(4,"px)"),cursor:"ne-resize"}},m)),(0,Dh.jsx)(fA,h({direction:"Left",style:{margin:"".concat(4,"px 0"),transform:"translate(".concat(4,"px, 0px)"),cursor:"col-resize"}},m)),(0,Dh.jsxs)(kb,{className:"KT-draggable-body",elevation:4,sx:{borderRadius:4,overflow:"hidden",backgroundColor:f.palette.background.paper,boxShadow:g},children:[(0,Dh.jsx)(fA,h(h({className:"KT-draggable-header",direction:"Header",style:{cursor:"move"}},m),{},{children:t})),(0,Dh.jsx)(iA,{className:"KT-draggable-container",sx:()=>{const e=d?{width:i.w,maxHeight:i.h,overflow:"hidden auto",wordBreak:"break-word"}:{width:i.w,height:i.h,overflow:"hidden auto",wordBreak:"break-word"},t="dark"===f.palette.mode?"#1f1f23":f.palette.background.paper,n="dark"===f.palette.mode?dA(f.palette.text.primary,.28):dA(f.palette.text.primary,.24);return h(h({},e),{},{backgroundColor:f.palette.background.paper,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:t},"&::-webkit-scrollbar-thumb":{backgroundColor:n,borderRadius:8,border:"2px solid ".concat(f.palette.background.paper)},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:dA(f.palette.text.primary,.36)},scrollbarWidth:"thin",scrollbarColor:"".concat(n," ").concat(t)})},children:n})]}),(0,Dh.jsx)(fA,h({direction:"Right",style:{margin:"".concat(4,"px 0"),transform:"translate(-".concat(4,"px, 0px)"),cursor:"col-resize"}},m)),(0,Dh.jsx)(fA,h({direction:"BottomLeft",style:{transform:"translate(".concat(4,"px, -").concat(4,"px)"),cursor:"ne-resize"}},m)),(0,Dh.jsx)(fA,h({direction:"Bottom",style:{margin:"0 ".concat(4,"px"),transform:"translate(0px, -".concat(4,"px)"),cursor:"row-resize"}},m)),(0,Dh.jsx)(fA,h({direction:"BottomRight",style:{transform:"translate(-".concat(4,"px, -").concat(4,"px)"),cursor:"nw-resize"}},m))]}))}var mA=i(6997);const vA=["ownerState"],yA=["variants"],bA=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function wA(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function xA(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles="@layer ".concat(t,"{").concat(String(e.styles),"}")),e}const AA=(0,Ox.A)(),SA=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function kA(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function _A(e){return e?(t,n)=>n[e]:null}function TA(e,t,n){let{ownerState:r}=t,i=(0,gr.A)(t,vA);const o="function"==typeof e?e((0,eb.A)({ownerState:r},i)):e;if(Array.isArray(o))return o.flatMap(e=>TA(e,(0,eb.A)({ownerState:r},i),n));if(o&&"object"==typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,gr.A)(o,yA);return e.forEach(e=>{let o=!0;if("function"==typeof e.props?o=e.props((0,eb.A)({ownerState:r},i,r)):Object.keys(e.props).forEach(t=>{(null==r?void 0:r[t])!==e.props[t]&&i[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);const o="function"==typeof e.style?e.style((0,eb.A)({ownerState:r},i,r)):e.style;t.push(n?xA((0,Rx.internal_serializeStyles)(o),n):o)}}),t}return n?xA((0,Rx.internal_serializeStyles)(o),n):o}const EA=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=AA,rootShouldForwardProp:r=wA,slotShouldForwardProp:i=wA}=e,o=e=>(0,Qx.A)((0,eb.A)({},e,{theme:kA((0,eb.A)({},e,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,Rx.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:s,slot:l,skipVariantsResolver:c,skipSx:u,overridesResolver:d=_A(SA(l))}=a,h=(0,gr.A)(a,bA),p=s&&s.startsWith("Mui")||l?"components":"custom",f=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,g=u||!1;let m=wA;"Root"===l||"root"===l?m=r:l?m=i:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const v=(0,Rx.default)(e,(0,eb.A)({shouldForwardProp:m,label:undefined},h)),y=e=>"function"==typeof e&&e.__emotion_real!==e||(0,mA.Q)(e)?r=>{const i=kA({theme:r.theme,defaultTheme:n,themeId:t});return TA(e,(0,eb.A)({},r,{theme:i}),i.modularCssLayers?p:void 0)}:e,b=function(r){let i=y(r);for(var a=arguments.length,l=new Array(a>1?a-1:0),c=1;c<a;c++)l[c-1]=arguments[c];const u=l?l.map(y):[];s&&d&&u.push(e=>{const r=kA((0,eb.A)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const i=r.components[s].styleOverrides,o={};return Object.entries(i).forEach(t=>{let[n,i]=t;o[n]=TA(i,(0,eb.A)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),d(e,o)}),s&&!f&&u.push(e=>{var r;const i=kA((0,eb.A)({},e,{defaultTheme:n,themeId:t}));return TA({variants:null==i||null==(r=i.components)||null==(r=r[s])?void 0:r.variants},(0,eb.A)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),g||u.push(o);const h=u.length-l.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const p=v(i,...u);return e.muiName&&(p.muiName=e.muiName),p};return v.withConfig&&(b.withConfig=v.withConfig),b}}(),CA=EA;var IA=i(3699);function PA(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,o=zx(r);i&&(o=o[i]||o);const a=function(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,IA.A)(t.components[n].defaultProps,r):r}({theme:o,name:n,props:t});return a}var LA=i(3830),RA=i(4262);const NA=["component","direction","spacing","divider","children","className","useFlexGap"],OA=(0,Ox.A)(),jA=CA("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function zA(e){return PA({props:e,name:"MuiStack",defaultTheme:OA})}function MA(e,t){const n=Oh.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(Oh.cloneElement(t,{key:"separator-".concat(i)})),e),[])}const DA=e=>{let{ownerState:t,theme:n}=e,r=(0,eb.A)({display:"flex",flexDirection:"column"},(0,LA.NI)({theme:n},(0,LA.kW)({values:t.direction,breakpoints:n.breakpoints.values}),e=>({flexDirection:e})));if(t.spacing){const e=(0,RA.LX)(n),i=Object.keys(n.breakpoints.values).reduce((e,n)=>(("object"==typeof t.spacing&&null!=t.spacing[n]||"object"==typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e),{}),o=(0,LA.kW)({values:t.direction,base:i}),a=(0,LA.kW)({values:t.spacing,base:i});"object"==typeof o&&Object.keys(o).forEach((e,t,n)=>{if(!o[e]){const r=t>0?o[n[t-1]]:"column";o[e]=r}});const s=(n,r)=>{return t.useFlexGap?{gap:(0,RA._W)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{["margin".concat((i=r?o[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[i]))]:(0,RA._W)(e,n)}};var i};r=(0,mA.A)(r,(0,LA.NI)({theme:n},a,s))}return r=(0,LA.iZ)(n.breakpoints,r),r};const BA=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=jA,useThemeProps:n=zA,componentName:r="MuiStack"}=e,i=t(DA),o=Oh.forwardRef(function(e,t){const o=n(e),a=(0,$w.A)(o),{component:s="div",direction:l="column",spacing:c=0,divider:u,children:d,className:h,useFlexGap:p=!1}=a,f=(0,gr.A)(a,NA),g={direction:l,spacing:c,useFlexGap:p},m=(0,nb.A)({root:["root"]},e=>(0,wb.Ay)(r,e),{});return(0,Dh.jsx)(i,(0,eb.A)({as:s,ownerState:g,ref:t,className:(0,tb.A)(m.root,h)},f,{children:u?MA(d,u):d}))});return o}({createStyledComponent:(0,ib.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,ob.b)({props:e,name:"MuiStack"})}),FA=BA;var WA=i(6652),UA=i(2428),VA=i(2266),HA=i(2890),GA=i(4324),qA=i(9150),KA=i(5058),$A=i(8201),YA=i(1310),XA=i(5326),JA=i(5261);const QA=["execute"],ZA=()=>{const[e,t]=(0,Oh.useState)(null),[n,r]=(0,Oh.useState)(!1),[i,o]=(0,Oh.useState)(null),a=(0,Oh.useCallback)(async function(e){if(e){r(!0),o(null);try{for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];const o=await e(...i);return t(o),r(!1),o}catch(e){o((null==e?void 0:e.message)||"An unknown error occurred"),r(!1)}}},[]);return{data:e,loading:n,error:i,execute:a,reset:(0,Oh.useCallback)(()=>{t(null),r(!1),o(null)},[])}},eS=(e,t)=>{const n=ZA(),{execute:r}=n,i=mr(n,QA);return(0,Oh.useEffect)(()=>{e&&r(e,t)},[r,e,t]),h({},i)},tS=e=>function(t){return function(e,t){var n,r;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!==(n=null==Ft||null===(r=Ft[t])||void 0===r?void 0:r[e])&&void 0!==n?n:i}(e,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")},nS=()=>{const{setting:{uiLang:e}}=bx();return tS(e)};var rS=i(6333),iS=i(6267),oS=i(2561);const aS=["onChange","maxRows","minRows","style","value"];function sS(e){return parseInt(e,10)||0}const lS={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function cS(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const uS=Oh.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:o,value:a}=e,s=(0,gr.A)(e,aS),{current:l}=Oh.useRef(null!=a),c=Oh.useRef(null),u=(0,ab.A)(t,c),d=Oh.useRef(null),h=Oh.useRef(null),p=Oh.useCallback(()=>{const t=c.current,n=h.current;if(!t||!n)return;const o=(0,rS.A)(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=sS(o.paddingBottom)+sS(o.paddingTop),l=sS(o.borderBottomWidth)+sS(o.borderTopWidth),u=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=u;i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),f=(0,iS.A)(()=>{const e=c.current,t=p();if(!e||!t||cS(t))return!1;const n=t.outerHeightStyle;return null!=d.current&&d.current!==n}),g=Oh.useCallback(()=>{const e=c.current,t=p();if(!e||!t||cS(t))return;const n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height="".concat(n,"px")),e.style.overflow=t.overflowing?"hidden":""},[p]),m=Oh.useRef(-1);(0,Px.A)(()=>{const e=(0,oS.A)(g),t=null==c?void 0:c.current;if(!t)return;const n=(0,rS.A)(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{f()&&(r.unobserve(t),cancelAnimationFrame(m.current),g(),m.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(m.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[p,g,f]),(0,Px.A)(()=>{g()});return(0,Dh.jsxs)(Oh.Fragment,{children:[(0,Dh.jsx)("textarea",(0,eb.A)({value:a,onChange:e=>{l||g(),n&&n(e)},ref:u,rows:i,style:o},s)),(0,Dh.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:h,tabIndex:-1,style:(0,eb.A)({},lS,o,{paddingTop:0,paddingBottom:0})})]})}),dS=uS;function hS(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce((e,n)=>(e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e),{})}const pS=Oh.createContext(void 0);function fS(){return Oh.useContext(pS)}var gS=i(4077);function mS(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function vS(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(mS(e.value)&&""!==e.value||t&&mS(e.defaultValue)&&""!==e.defaultValue)}function yS(e){return(0,wb.Ay)("MuiInputBase",e)}const bS=(0,bb.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),wS=["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"],xS=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t["color".concat((0,vb.A)(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},AS=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},SS=(0,ib.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:xS})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({},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",["&.".concat(bS.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,eb.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})}),kS=(0,ib.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:AS})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,i=(0,eb.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),o={opacity:"0 !important"},a=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,eb.A)({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":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},["label[data-shrink=false] + .".concat(bS.formControl," &")]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},["&.".concat(bS.disabled)]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})}),_S=(0,Dh.jsx)(qx,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),TS=Oh.forwardRef(function(e,t){var n;const r=(0,ob.b)({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:a,className:s,components:l={},componentsProps:c={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:h,endAdornment:p,fullWidth:f=!1,id:g,inputComponent:m="input",inputProps:v={},inputRef:y,maxRows:b,minRows:w,multiline:x=!1,name:A,onBlur:S,onChange:k,onClick:_,onFocus:T,onKeyDown:E,onKeyUp:C,placeholder:I,readOnly:P,renderSuffix:L,rows:R,slotProps:N={},slots:O={},startAdornment:j,type:z="text",value:M}=r,D=(0,gr.A)(r,wS),B=null!=v.value?v.value:M,{current:F}=Oh.useRef(null!=B),W=Oh.useRef(),U=Oh.useCallback(e=>{0},[]),V=(0,Eb.A)(W,y,v.ref,U),[H,G]=Oh.useState(!1),q=fS();const K=hS({props:r,muiFormControl:q,states:["color","disabled","error","hiddenLabel","size","required","filled"]});K.focused=q?q.focused:H,Oh.useEffect(()=>{!q&&d&&H&&(G(!1),S&&S())},[q,d,H,S]);const $=q&&q.onFilled,Y=q&&q.onEmpty,X=Oh.useCallback(e=>{vS(e)?$&&$():Y&&Y()},[$,Y]);(0,gS.A)(()=>{F&&X({value:B})},[B,X,F]);Oh.useEffect(()=>{X(W.current)},[]);let J=m,Q=v;x&&"input"===J&&(Q=R?(0,eb.A)({type:void 0,minRows:R,maxRows:R},Q):(0,eb.A)({type:void 0,maxRows:b,minRows:w},Q),J=dS);Oh.useEffect(()=>{q&&q.setAdornedStart(Boolean(j))},[q,j]);const Z=(0,eb.A)({},r,{color:K.color||"primary",disabled:K.disabled,endAdornment:p,error:K.error,focused:K.focused,formControl:q,fullWidth:f,hiddenLabel:K.hiddenLabel,multiline:x,size:K.size,startAdornment:j,type:z}),ee=(e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:h,startAdornment:p,type:f}=e,g={root:["root","color".concat((0,vb.A)(n)),r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",h&&"medium"!==h&&"size".concat((0,vb.A)(h)),u&&"multiline",p&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===f&&"inputTypeSearch",u&&"inputMultiline","small"===h&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return(0,nb.A)(g,yS,t)})(Z),te=O.root||l.Root||SS,ne=N.root||c.root||{},re=O.input||l.Input||kS;return Q=(0,eb.A)({},Q,null!=(n=N.input)?n:c.input),(0,Dh.jsxs)(Oh.Fragment,{children:[!h&&_S,(0,Dh.jsxs)(te,(0,eb.A)({},ne,!sb(te)&&{ownerState:(0,eb.A)({},Z,ne.ownerState)},{ref:t,onClick:e=>{W.current&&e.currentTarget===e.target&&W.current.focus(),_&&_(e)}},D,{className:(0,tb.A)(ee.root,ne.className,s,P&&"MuiInputBase-readOnly"),children:[j,(0,Dh.jsx)(pS.Provider,{value:null,children:(0,Dh.jsx)(re,(0,eb.A)({ownerState:Z,"aria-invalid":K.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:u,disabled:K.disabled,id:g,onAnimationStart:e=>{X("mui-auto-fill-cancel"===e.animationName?W.current:{value:"x"})},name:A,placeholder:I,readOnly:P,required:K.required,rows:R,value:B,onKeyDown:E,onKeyUp:C,type:z},Q,!sb(re)&&{as:J,ownerState:(0,eb.A)({},Z,Q.ownerState)},{ref:V,className:(0,tb.A)(ee.input,Q.className,P&&"MuiInputBase-readOnly"),onBlur:e=>{S&&S(e),v.onBlur&&v.onBlur(e),q&&q.onBlur?q.onBlur(e):G(!1)},onChange:function(e){if(!F){const t=e.target||W.current;if(null==t)throw new Error((0,aA.A)(1));X({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];v.onChange&&v.onChange(e,...n),k&&k(e,...n)},onFocus:e=>{K.disabled?e.stopPropagation():(T&&T(e),v.onFocus&&v.onFocus(e),q&&q.onFocus?q.onFocus(e):G(!0))}}))}),p,L?L((0,eb.A)({},K,{startAdornment:j})):null]}))]})}),ES=TS;var CS=i(4539);function IS(e){return(0,wb.Ay)("MuiInput",e)}const PS=(0,eb.A)({},bS,(0,bb.A)("MuiInput",["root","underline","input"])),LS=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],RS=(0,ib.Ay)(SS,{shouldForwardProp:e=>(0,CS.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...xS(e,t),!n.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r="rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")")),(0,eb.A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat((t.vars||t).palette[n.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"},["&.".concat(PS.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(PS.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(r),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(.".concat(PS.disabled,", .").concat(PS.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(r)}},["&.".concat(PS.disabled,":before")]:{borderBottomStyle:"dotted"}})}),NS=(0,ib.Ay)(kS,{name:"MuiInput",slot:"Input",overridesResolver:AS})({}),OS=Oh.forwardRef(function(e,t){var n,r,i,o;const a=(0,ob.b)({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:h=!1,slotProps:p,slots:f={},type:g="text"}=a,m=(0,gr.A)(a,LS),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,nb.A)(r,IS,t);return(0,eb.A)({},t,i)})(a),y={root:{ownerState:{disableUnderline:s}}},b=(null!=p?p:c)?(0,mA.A)(null!=p?p:c,y):y,w=null!=(n=null!=(r=f.root)?r:l.Root)?n:RS,x=null!=(i=null!=(o=f.input)?o:l.Input)?i:NS;return(0,Dh.jsx)(ES,(0,eb.A)({slots:{root:w,input:x},slotProps:b,fullWidth:u,inputComponent:d,multiline:h,ref:t,type:g},m,{classes:v}))});OS.muiName="Input";const jS=OS;function zS(e){return(0,wb.Ay)("MuiFilledInput",e)}const MS=(0,eb.A)({},bS,(0,bb.A)("MuiFilledInput",["root","underline","input"])),DS=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],BS=(0,ib.Ay)(SS,{shouldForwardProp:e=>(0,CS.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...xS(e,t),!n.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:n}=e;var r;const i="light"===t.palette.mode,o=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,eb.A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a,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:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a}},["&.".concat(MS.focused)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},["&.".concat(MS.disabled)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:l}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat(null==(r=(t.vars||t).palette[n.color||"primary"])?void 0:r.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"},["&.".concat(MS.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(MS.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")"):o),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(.".concat(MS.disabled,", .").concat(MS.error,"):before")]:{borderBottom:"1px solid ".concat((t.vars||t).palette.text.primary)},["&.".concat(MS.disabled,":before")]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,eb.A)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))}),FS=(0,ib.Ay)(kS,{name:"MuiFilledInput",slot:"Input",overridesResolver:AS})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?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"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})}),WS=Oh.forwardRef(function(e,t){var n,r,i,o;const a=(0,ob.b)({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:d=!1,slotProps:h,slots:p={},type:f="text"}=a,g=(0,gr.A)(a,DS),m=(0,eb.A)({},a,{fullWidth:c,inputComponent:u,multiline:d,type:f}),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,nb.A)(r,zS,t);return(0,eb.A)({},t,i)})(a),y={root:{ownerState:m},input:{ownerState:m}},b=(null!=h?h:l)?(0,mA.A)(y,null!=h?h:l):y,w=null!=(n=null!=(r=p.root)?r:s.Root)?n:BS,x=null!=(i=null!=(o=p.input)?o:s.Input)?i:FS;return(0,Dh.jsx)(ES,(0,eb.A)({slots:{root:w,input:x},componentsProps:b,fullWidth:c,inputComponent:u,multiline:d,ref:t,type:f},g,{classes:v}))});WS.muiName="Input";const US=WS;var VS;const HS=["children","classes","className","label","notched"],GS=(0,ib.Ay)("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:CS.A})({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%"}),qS=(0,ib.Ay)("legend",{name:"MuiNotchedOutlined",shouldForwardProp:CS.A})(e=>{let{ownerState:t,theme:n}=e;return(0,eb.A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,eb.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))});function KS(e){return(0,wb.Ay)("MuiOutlinedInput",e)}const $S=(0,eb.A)({},bS,(0,bb.A)("MuiOutlinedInput",["root","notchedOutline","input"])),YS=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],XS=(0,ib.Ay)(SS,{shouldForwardProp:e=>(0,CS.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:xS})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,eb.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat($S.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat($S.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):r}},["&.".concat($S.focused," .").concat($S.notchedOutline)]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},["&.".concat($S.error," .").concat($S.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat($S.disabled," .").concat($S.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,eb.A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))}),JS=(0,ib.Ay)(function(e){const{className:t,label:n,notched:r}=e,i=(0,gr.A)(e,HS),o=null!=n&&""!==n,a=(0,eb.A)({},e,{notched:r,withLabel:o});return(0,Dh.jsx)(GS,(0,eb.A)({"aria-hidden":!0,className:t,ownerState:a},i,{children:(0,Dh.jsx)(qS,{ownerState:a,children:o?(0,Dh.jsx)("span",{children:n}):VS||(VS=(0,Dh.jsx)("span",{className:"notranslate",children:"​"}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):n}}),QS=(0,ib.Ay)(kS,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:AS})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?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"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})}),ZS=Oh.forwardRef(function(e,t){var n,r,i,o,a;const s=(0,ob.b)({props:e,name:"MuiOutlinedInput"}),{components:l={},fullWidth:c=!1,inputComponent:u="input",label:d,multiline:h=!1,notched:p,slots:f={},type:g="text"}=s,m=(0,gr.A)(s,YS),v=(e=>{const{classes:t}=e,n=(0,nb.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},KS,t);return(0,eb.A)({},t,n)})(s),y=fS(),b=hS({props:s,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w=(0,eb.A)({},s,{color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:y,fullWidth:c,hiddenLabel:b.hiddenLabel,multiline:h,size:b.size,type:g}),x=null!=(n=null!=(r=f.root)?r:l.Root)?n:XS,A=null!=(i=null!=(o=f.input)?o:l.Input)?i:QS;return(0,Dh.jsx)(ES,(0,eb.A)({slots:{root:x,input:A},renderSuffix:e=>(0,Dh.jsx)(JS,{ownerState:w,className:v.notchedOutline,label:null!=d&&""!==d&&b.required?a||(a=(0,Dh.jsxs)(Oh.Fragment,{children:[d," ","*"]})):d,notched:void 0!==p?p:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:c,inputComponent:u,multiline:h,ref:t,type:g},m,{classes:(0,eb.A)({},v,{notchedOutline:null})}))});ZS.muiName="Input";const ek=ZS;function tk(e){return(0,wb.Ay)("MuiFormLabel",e)}const nk=(0,bb.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),rk=["children","className","color","component","disabled","error","filled","focused","required"],ik=(0,ib.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,eb.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(nk.focused)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(nk.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(nk.error)]:{color:(t.vars||t).palette.error.main}})}),ok=(0,ib.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(nk.error)]:{color:(t.vars||t).palette.error.main}}}),ak=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiFormLabel"}),{children:r,className:i,component:o="label"}=n,a=(0,gr.A)(n,rk),s=hS({props:n,muiFormControl:fS(),states:["color","required","focused","disabled","error","filled"]}),l=(0,eb.A)({},n,{color:s.color||"primary",component:o,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:a,required:s}=e,l={root:["root","color".concat((0,vb.A)(n)),i&&"disabled",o&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return(0,nb.A)(l,tk,t)})(l);return(0,Dh.jsxs)(ik,(0,eb.A)({as:o,ownerState:l,className:(0,tb.A)(c.root,i),ref:t},a,{children:[r,s.required&&(0,Dh.jsxs)(ok,{ownerState:l,"aria-hidden":!0,className:c.asterisk,children:[" ","*"]})]}))});function sk(e){return(0,wb.Ay)("MuiInputLabel",e)}(0,bb.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const lk=["disableAnimation","margin","shrink","variant","className"],ck=(0,ib.Ay)(ak,{shouldForwardProp:e=>(0,CS.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(nk.asterisk)]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,eb.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,eb.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,eb.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))}),uk=Oh.forwardRef(function(e,t){const n=(0,ob.b)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:i,className:o}=n,a=(0,gr.A)(n,lk),s=fS();let l=i;void 0===l&&s&&(l=s.filled||s.focused||s.adornedStart);const c=hS({props:n,muiFormControl:s,states:["size","variant","required","focused"]}),u=(0,eb.A)({},n,{disableAnimation:r,formControl:s,shrink:l,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),d=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:a,required:s}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&"normal"!==r&&"size".concat((0,vb.A)(r)),a],asterisk:[s&&"asterisk"]},c=(0,nb.A)(l,sk,t);return(0,eb.A)({},t,c)})(u);return(0,Dh.jsx)(ck,(0,eb.A)({"data-shrink":l,ownerState:u,ref:t,className:(0,tb.A)(d.root,o)},a,{classes:d}))});var dk=i(1867);function hk(e){return(0,wb.Ay)("MuiFormControl",e)}(0,bb.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const pk=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],fk=(0,ib.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,eb.A)({},t.root,t["margin".concat((0,vb.A)(n.margin))],n.fullWidth&&t.fullWidth)}})(e=>{let{ownerState:t}=e;return(0,eb.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})}),gk=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiFormControl"}),{children:r,className:i,color:o="primary",component:a="div",disabled:s=!1,error:l=!1,focused:c,fullWidth:u=!1,hiddenLabel:d=!1,margin:h="none",required:p=!1,size:f="medium",variant:g="outlined"}=n,m=(0,gr.A)(n,pk),v=(0,eb.A)({},n,{color:o,component:a,disabled:s,error:l,fullWidth:u,hiddenLabel:d,margin:h,required:p,size:f,variant:g}),y=(e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root","none"!==n&&"margin".concat((0,vb.A)(n)),r&&"fullWidth"]};return(0,nb.A)(i,hk,t)})(v),[b,w]=Oh.useState(()=>{let e=!1;return r&&Oh.Children.forEach(r,t=>{if(!(0,dk.A)(t,["Input","Select"]))return;const n=(0,dk.A)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}),e}),[x,A]=Oh.useState(()=>{let e=!1;return r&&Oh.Children.forEach(r,t=>{(0,dk.A)(t,["Input","Select"])&&(vS(t.props,!0)||vS(t.props.inputProps,!0))&&(e=!0)}),e}),[S,k]=Oh.useState(!1);s&&S&&k(!1);const _=void 0===c||s?S:c;let T;const E=Oh.useMemo(()=>({adornedStart:b,setAdornedStart:w,color:o,disabled:s,error:l,filled:x,focused:_,fullWidth:u,hiddenLabel:d,size:f,onBlur:()=>{k(!1)},onEmpty:()=>{A(!1)},onFilled:()=>{A(!0)},onFocus:()=>{k(!0)},registerEffect:T,required:p,variant:g}),[b,o,s,l,x,_,u,d,T,p,f,g]);return(0,Dh.jsx)(pS.Provider,{value:E,children:(0,Dh.jsx)(fk,(0,eb.A)({as:a,ownerState:v,className:(0,tb.A)(y.root,i),ref:t},m,{children:r}))})});function mk(e){return(0,wb.Ay)("MuiFormHelperText",e)}const vk=(0,bb.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var yk;const bk=["children","className","component","disabled","error","filled","focused","margin","required","variant"],wk=(0,ib.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t["size".concat((0,vb.A)(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(vk.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(vk.error)]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})}),xk=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiFormHelperText"}),{children:r,className:i,component:o="p"}=n,a=(0,gr.A)(n,bk),s=hS({props:n,muiFormControl:fS(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,eb.A)({},n,{component:o,contained:"filled"===s.variant||"outlined"===s.variant,variant:s.variant,size:s.size,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:a,focused:s,required:l}=e,c={root:["root",i&&"disabled",o&&"error",r&&"size".concat((0,vb.A)(r)),n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return(0,nb.A)(c,mk,t)})(l);return(0,Dh.jsx)(wk,(0,eb.A)({as:o,ownerState:l,className:(0,tb.A)(c.root,i),ref:t},a,{children:" "===r?yk||(yk=(0,Dh.jsx)("span",{className:"notranslate",children:"​"})):r}))});function Ak(e){var t;return parseInt(Oh.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}var Sk=i(5571);const kk=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];const _k=function(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,a=(0,gr.A)(e,kk),s=o?{}:cb(r,i),{props:l,internalRef:c}=hb((0,eb.A)({},a,{externalSlotProps:s})),u=(0,ab.A)(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref);return lb(n,(0,eb.A)({},l,{ref:u}),i)};const Tk=Oh.createContext({});function Ek(e){return(0,wb.Ay)("MuiList",e)}(0,bb.A)("MuiList",["root","padding","dense","subheader"]);const Ck=["children","className","component","dense","disablePadding","subheader"],Ik=(0,ib.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(e=>{let{ownerState:t}=e;return(0,eb.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})}),Pk=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=(0,gr.A)(n,Ck),u=Oh.useMemo(()=>({dense:a}),[a]),d=(0,eb.A)({},n,{component:o,dense:a,disablePadding:s}),h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e,o={root:["root",!n&&"padding",r&&"dense",i&&"subheader"]};return(0,nb.A)(o,Ek,t)})(d);return(0,Dh.jsx)(Tk.Provider,{value:u,children:(0,Dh.jsxs)(Ik,(0,eb.A)({as:o,className:(0,tb.A)(h.root,i),ref:t,ownerState:d},c,{children:[l,r]}))})});function Lk(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const Rk=Lk,Nk=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Ok(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function jk(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function zk(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function Mk(e,t,n,r,i,o){let a=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&zk(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const Dk=Oh.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:o,className:a,disabledItemsFocusable:s=!1,disableListWrap:l=!1,onKeyDown:c,variant:u="selectedMenu"}=e,d=(0,gr.A)(e,Nk),h=Oh.useRef(null),p=Oh.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,gS.A)(()=>{r&&h.current.focus()},[r]),Oh.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!h.current.style.width;if(e.clientHeight<h.current.clientHeight&&r){const t="".concat(Rk((0,Sk.A)(e)),"px");h.current.style["rtl"===n?"paddingLeft":"paddingRight"]=t,h.current.style.width="calc(100% + ".concat(t,")")}return h.current}}),[]);const f=(0,Eb.A)(h,t);let g=-1;Oh.Children.forEach(o,(e,t)=>{Oh.isValidElement(e)?(e.props.disabled||("selectedMenu"===u&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=o.length&&(g=-1))):g===t&&(g+=1,g>=o.length&&(g=-1))});const m=Oh.Children.map(o,(e,t)=>{if(t===g){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===u&&(t.tabIndex=0),Oh.cloneElement(e,t)}return e});return(0,Dh.jsx)(Pk,(0,eb.A)({role:"menu",ref:f,className:a,onKeyDown:e=>{const t=h.current,n=e.key,r=(0,Sk.A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Mk(t,r,l,s,Ok);else if("ArrowUp"===n)e.preventDefault(),Mk(t,r,l,s,jk);else if("Home"===n)e.preventDefault(),Mk(t,null,l,s,Ok);else if("End"===n)e.preventDefault(),Mk(t,null,l,s,jk);else if(1===n.length){const i=p.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const l=r&&!i.repeating&&zk(r,i);i.previousKeyMatched&&(l||Mk(t,r,!1,s,Ok,i))?e.preventDefault():i.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1},d,{children:m}))});var Bk=i(3806),Fk=i(6614);const Wk=!1;var Uk="unmounted",Vk="exited",Hk="entering",Gk="entered",qk="exiting",Kk=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Vk,r.appearStatus=Hk):i=Gk:i=t.unmountOnExit||t.mountOnEnter?Uk:Vk,r.state={status:i},r.nextCallback=null,r}Lb(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Uk?{status:Vk}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Hk&&n!==Gk&&(t=Hk):n!==Hk&&n!==Gk||(t=qk)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Hk){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Qy.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Vk&&this.setState({status:Uk})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Qy.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Wk?this.safeSetState({status:Gk},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:Hk},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:Gk},function(){t.props.onEntered(o,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Qy.findDOMNode(this);t&&!Wk?(this.props.onExit(r),this.safeSetState({status:qk},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Vk},function(){e.props.onExited(r)})})})):this.safeSetState({status:Vk},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Qy.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Uk)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,gr.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return Oh.createElement(Rb.Provider,{value:null},"function"==typeof n?n(e,r):Oh.cloneElement(Oh.Children.only(n),r))},t}(Oh.Component);function $k(){}Kk.contextType=Rb,Kk.propTypes={},Kk.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:$k,onEntering:$k,onEntered:$k,onExit:$k,onExiting:$k,onExited:$k},Kk.UNMOUNTED=Uk,Kk.EXITED=Vk,Kk.ENTERING=Hk,Kk.ENTERED=Gk,Kk.EXITING=qk;const Yk=Kk,Xk=e=>e.scrollTop;function Jk(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof o?o[t.mode]:o,delay:a.transitionDelay}}const Qk=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Zk(e){return"scale(".concat(e,", ").concat(e**2,")")}const e_={entering:{opacity:1,transform:Zk(1)},entered:{opacity:1,transform:"none"}},t_="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),n_=Oh.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:h,style:p,timeout:f="auto",TransitionComponent:g=Yk}=e,m=(0,gr.A)(e,Qk),v=(0,Fb.A)(),y=Oh.useRef(),b=oA(),w=Oh.useRef(null),x=(0,Eb.A)(w,Ak(i),t),A=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},S=A(c),k=A((e,t)=>{Xk(e);const{duration:n,delay:r,easing:i}=Jk({style:p,timeout:f,easing:o},{mode:"enter"});let a;"auto"===f?(a=b.transitions.getAutoHeightDuration(e.clientHeight),y.current=a):a=n,e.style.transition=[b.transitions.create("opacity",{duration:a,delay:r}),b.transitions.create("transform",{duration:t_?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)}),_=A(l),T=A(h),E=A(e=>{const{duration:t,delay:n,easing:r}=Jk({style:p,timeout:f,easing:o},{mode:"exit"});let i;"auto"===f?(i=b.transitions.getAutoHeightDuration(e.clientHeight),y.current=i):i=t,e.style.transition=[b.transitions.create("opacity",{duration:i,delay:n}),b.transitions.create("transform",{duration:t_?i:.666*i,delay:t_?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=Zk(.75),u&&u(e)}),C=A(d);return(0,Dh.jsx)(g,(0,eb.A)({appear:r,in:a,nodeRef:w,onEnter:k,onEntered:_,onEntering:S,onExit:E,onExited:C,onExiting:T,addEndListener:e=>{"auto"===f&&v.start(y.current||0,e),n&&n(w.current,e)},timeout:"auto"===f?null:f},m,{children:(e,t)=>Oh.cloneElement(i,(0,eb.A)({style:(0,eb.A)({opacity:0,transform:Zk(.75),visibility:"exited"!==e||a?void 0:"hidden"},e_[e],p,i.props.style),ref:x},t))}))});n_.muiSupportAuto=!0;const r_=n_;var i_=i(9669);const o_=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function a_(e){const t=[],n=[];return Array.from(e.querySelectorAll(o_)).forEach((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t));let n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function s_(){return!0}const l_=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=a_,isEnabled:a=s_,open:s}=e,l=Oh.useRef(!1),c=Oh.useRef(null),u=Oh.useRef(null),d=Oh.useRef(null),h=Oh.useRef(null),p=Oh.useRef(!1),f=Oh.useRef(null),g=(0,ab.A)(Ak(t),f),m=Oh.useRef(null);Oh.useEffect(()=>{s&&f.current&&(p.current=!n)},[n,s]),Oh.useEffect(()=>{if(!s||!f.current)return;const e=(0,i_.A)(f.current);return f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),p.current&&f.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),Oh.useEffect(()=>{if(!s||!f.current)return;const e=(0,i_.A)(f.current),t=t=>{m.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===f.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=f.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==u.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!p.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(n=o(f.current)),n.length>0){var i,s;const e=Boolean((null==(i=m.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=m.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const i=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,a,s,o]);const v=e=>{null===d.current&&(d.current=e.relatedTarget),p.current=!0};return(0,Dh.jsxs)(Oh.Fragment,{children:[(0,Dh.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:c,"data-testid":"sentinelStart"}),Oh.cloneElement(t,{ref:g,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),p.current=!0,h.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,Dh.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":"sentinelEnd"})]})};var c_=i(1941);const u_=Oh.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=Oh.useState(null),s=(0,ab.A)(Oh.isValidElement(n)?Ak(n):null,t);if((0,Px.A)(()=>{i||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,i]),(0,Px.A)(()=>{if(o&&!i)return(0,c_.A)(t,o),()=>{(0,c_.A)(t,null)}},[t,o,i]),i){if(Oh.isValidElement(n)){const e={ref:s};return Oh.cloneElement(n,e)}return(0,Dh.jsx)(Oh.Fragment,{children:n})}return(0,Dh.jsx)(Oh.Fragment,{children:o?Qy.createPortal(n,o):o})}),d_=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],h_={entering:{opacity:1},entered:{opacity:1}},p_=Oh.forwardRef(function(e,t){const n=oA(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:h,onExited:p,onExiting:f,style:g,timeout:m=r,TransitionComponent:v=Yk}=e,y=(0,gr.A)(e,d_),b=Oh.useRef(null),w=(0,Eb.A)(b,Ak(a),t),x=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},A=x(d),S=x((e,t)=>{Xk(e);const r=Jk({style:g,timeout:m,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),k=x(u),_=x(f),T=x(e=>{const t=Jk({style:g,timeout:m,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),h&&h(e)}),E=x(p);return(0,Dh.jsx)(v,(0,eb.A)({appear:o,in:l,nodeRef:b,onEnter:S,onEntered:k,onEntering:A,onExit:T,onExited:E,onExiting:_,addEndListener:e=>{i&&i(b.current,e)},timeout:m},y,{children:(e,t)=>Oh.cloneElement(a,(0,eb.A)({style:(0,eb.A)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},h_[e],g,a.props.style),ref:w},t))}))}),f_=p_;function g_(e){return(0,wb.Ay)("MuiBackdrop",e)}(0,bb.A)("MuiBackdrop",["root","invisible"]);const m_=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],v_=(0,ib.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(e=>{let{ownerState:t}=e;return(0,eb.A)({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"})}),y_=Oh.forwardRef(function(e,t){var n,r,i;const o=(0,ob.b)({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:h,slotProps:p={},slots:f={},TransitionComponent:g=f_,transitionDuration:m}=o,v=(0,gr.A)(o,m_),y=(0,eb.A)({},o,{component:l,invisible:d}),b=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,nb.A)(r,g_,t)})(y),w=null!=(n=p.root)?n:u.root;return(0,Dh.jsx)(g,(0,eb.A)({in:h,timeout:m},v,{children:(0,Dh.jsx)(v_,(0,eb.A)({"aria-hidden":!0},w,{as:null!=(r=null!=(i=f.root)?i:c.Root)?r:l,className:(0,tb.A)(b.root,s,null==w?void 0:w.className),ownerState:(0,eb.A)({},y,null==w?void 0:w.ownerState),classes:b,ref:t,children:a}))}))});var b_=i(4849);function w_(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function x_(e){return parseInt((0,rS.A)(e).getComputedStyle(e).paddingRight,10)||0}function A_(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&w_(e,i)})}function S_(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function k_(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,i_.A)(e);return t.body===e?(0,rS.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Lk((0,i_.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(x_(r)+e,"px");const t=(0,i_.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(x_(t)+e,"px")})}let e;if(r.parentNode instanceof DocumentFragment)e=(0,i_.A)(r).body;else{const t=r.parentElement,n=(0,rS.A)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)})}}const __=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&w_(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);A_(t,e.mount,e.modalRef,r,!0);const i=S_(this.containers,e=>e.container===t);return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=S_(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=k_(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=S_(this.containers,t=>-1!==t.modals.indexOf(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&w_(e.modalRef,t),A_(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&w_(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const T_=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=__,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=e,h=Oh.useRef({}),p=Oh.useRef(null),f=Oh.useRef(null),g=(0,ab.A)(f,d),[m,v]=Oh.useState(!u),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const w=()=>(h.current.modalRef=f.current,h.current.mount=p.current,h.current),x=()=>{i.mount(w(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},A=(0,iS.A)(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,i_.A)(p.current).body;i.add(w(),e),f.current&&x()}),S=Oh.useCallback(()=>i.isTopModal(w()),[i]),k=(0,iS.A)(e=>{p.current=e,e&&(u&&S()?x():f.current&&w_(f.current,b))}),_=Oh.useCallback(()=>{i.remove(w(),b)},[b,i]);Oh.useEffect(()=>()=>{_()},[_]),Oh.useEffect(()=>{u?A():y&&o||_()},[u,_,y,o,A]);const T=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},E=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=ub(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,eb.A)({},n,t);return(0,eb.A)({role:"presentation"},r,{onKeyDown:T(r),ref:g})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,eb.A)({"aria-hidden":!0},e,{onClick:E(e),open:u})},getTransitionProps:()=>({onEnter:(0,b_.A)(()=>{v(!1),a&&a()},null==l?void 0:l.props.onEnter),onExited:(0,b_.A)(()=>{v(!0),s&&s(),o&&_()},null==l?void 0:l.props.onExited)}),rootRef:g,portalRef:k,isTopModal:S,exited:m,hasTransition:y}};function E_(e){return(0,wb.Ay)("MuiModal",e)}(0,bb.A)("MuiModal",["root","hidden","backdrop"]);const C_=["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"],I_=(0,ib.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})}),P_=(0,ib.Ay)(y_,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),L_=Oh.forwardRef(function(e,t){var n,r,i,o,a,s;const l=(0,ob.b)({name:"MuiModal",props:e}),{BackdropComponent:c=P_,BackdropProps:u,className:d,closeAfterTransition:h=!1,children:p,container:f,component:g,components:m={},componentsProps:v={},disableAutoFocus:y=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:w=!1,disablePortal:x=!1,disableRestoreFocus:A=!1,disableScrollLock:S=!1,hideBackdrop:k=!1,keepMounted:_=!1,onBackdropClick:T,open:E,slotProps:C,slots:I}=l,P=(0,gr.A)(l,C_),L=(0,eb.A)({},l,{closeAfterTransition:h,disableAutoFocus:y,disableEnforceFocus:b,disableEscapeKeyDown:w,disablePortal:x,disableRestoreFocus:A,disableScrollLock:S,hideBackdrop:k,keepMounted:_}),{getRootProps:R,getBackdropProps:N,getTransitionProps:O,portalRef:j,isTopModal:z,exited:M,hasTransition:D}=T_((0,eb.A)({},L,{rootRef:t})),B=(0,eb.A)({},L,{exited:M}),F=(e=>{const{open:t,exited:n,classes:r}=e,i={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,nb.A)(i,E_,r)})(B),W={};if(void 0===p.props.tabIndex&&(W.tabIndex="-1"),D){const{onEnter:e,onExited:t}=O();W.onEnter=e,W.onExited=t}const U=null!=(n=null!=(r=null==I?void 0:I.root)?r:m.Root)?n:I_,V=null!=(i=null!=(o=null==I?void 0:I.backdrop)?o:m.Backdrop)?i:c,H=null!=(a=null==C?void 0:C.root)?a:v.root,G=null!=(s=null==C?void 0:C.backdrop)?s:v.backdrop,q=_k({elementType:U,externalSlotProps:H,externalForwardedProps:P,getSlotProps:R,additionalProps:{ref:t,as:g},ownerState:B,className:(0,tb.A)(d,null==H?void 0:H.className,null==F?void 0:F.root,!B.open&&B.exited&&(null==F?void 0:F.hidden))}),K=_k({elementType:V,externalSlotProps:G,additionalProps:u,getSlotProps:e=>N((0,eb.A)({},e,{onClick:t=>{T&&T(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,tb.A)(null==G?void 0:G.className,null==u?void 0:u.className,null==F?void 0:F.backdrop),ownerState:B});return _||E||D&&!M?(0,Dh.jsx)(u_,{ref:j,container:f,disablePortal:x,children:(0,Dh.jsxs)(U,(0,eb.A)({},q,{children:[!k&&c?(0,Dh.jsx)(V,(0,eb.A)({},K)):null,(0,Dh.jsx)(l_,{disableEnforceFocus:b,disableAutoFocus:y,disableRestoreFocus:A,isEnabled:z,open:E,children:Oh.cloneElement(p,W)})]}))}):null}),R_=L_;function N_(e){return(0,wb.Ay)("MuiPopover",e)}(0,bb.A)("MuiPopover",["root","paper"]);const O_=["onEntering"],j_=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],z_=["slotProps"];function M_(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function D_(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function B_(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?"".concat(e,"px"):e).join(" ")}function F_(e){return"function"==typeof e?e():e}const W_=(0,ib.Ay)(R_,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),U_=(0,ib.Ay)(kb,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),V_=Oh.forwardRef(function(e,t){var n,r,i;const o=(0,ob.b)({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:u="anchorEl",children:d,className:h,container:p,elevation:f=8,marginThreshold:g=16,open:m,PaperProps:v={},slots:y,slotProps:b,transformOrigin:w={vertical:"top",horizontal:"left"},TransitionComponent:x=r_,transitionDuration:A="auto",TransitionProps:{onEntering:S}={},disableScrollLock:k=!1}=o,_=(0,gr.A)(o.TransitionProps,O_),T=(0,gr.A)(o,j_),E=null!=(n=null==b?void 0:b.paper)?n:v,C=Oh.useRef(),I=(0,Eb.A)(C,E.ref),P=(0,eb.A)({},o,{anchorOrigin:l,anchorReference:u,elevation:f,marginThreshold:g,externalPaperSlotProps:E,transformOrigin:w,TransitionComponent:x,transitionDuration:A,TransitionProps:_}),L=(e=>{const{classes:t}=e;return(0,nb.A)({root:["root"],paper:["paper"]},N_,t)})(P),R=Oh.useCallback(()=>{if("anchorPosition"===u)return c;const e=F_(s),t=(e&&1===e.nodeType?e:(0,Sk.A)(C.current).body).getBoundingClientRect();return{top:t.top+M_(t,l.vertical),left:t.left+D_(t,l.horizontal)}},[s,l.horizontal,l.vertical,c,u]),N=Oh.useCallback(e=>({vertical:M_(e,w.vertical),horizontal:D_(e,w.horizontal)}),[w.horizontal,w.vertical]),O=Oh.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=N(t);if("none"===u)return{top:null,left:null,transformOrigin:B_(n)};const r=R();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,c=(0,Fk.A)(F_(s)),d=c.innerHeight-g,h=c.innerWidth-g;if(null!==g&&i<g){const e=i-g;i-=e,n.vertical+=e}else if(null!==g&&a>d){const e=a-d;i-=e,n.vertical+=e}if(null!==g&&o<g){const e=o-g;o-=e,n.horizontal+=e}else if(l>h){const e=l-h;o-=e,n.horizontal+=e}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(o),"px"),transformOrigin:B_(n)}},[s,u,R,N,g]),[j,z]=Oh.useState(m),M=Oh.useCallback(()=>{const e=C.current;if(!e)return;const t=O(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,z(!0)},[O]);Oh.useEffect(()=>(k&&window.addEventListener("scroll",M),()=>window.removeEventListener("scroll",M)),[s,k,M]);Oh.useEffect(()=>{m&&M()}),Oh.useImperativeHandle(a,()=>m?{updatePosition:()=>{M()}}:null,[m,M]),Oh.useEffect(()=>{if(!m)return;const e=(0,Bk.A)(()=>{M()}),t=(0,Fk.A)(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[s,m,M]);let D=A;"auto"!==A||x.muiSupportAuto||(D=void 0);const B=p||(s?(0,Sk.A)(F_(s)).body:void 0),F=null!=(r=null==y?void 0:y.root)?r:W_,W=null!=(i=null==y?void 0:y.paper)?i:U_,U=_k({elementType:W,externalSlotProps:(0,eb.A)({},E,{style:j?E.style:(0,eb.A)({},E.style,{opacity:0})}),additionalProps:{elevation:f,ref:I},ownerState:P,className:(0,tb.A)(L.paper,null==E?void 0:E.className)}),V=_k({elementType:F,externalSlotProps:(null==b?void 0:b.root)||{},externalForwardedProps:T,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:B,open:m},ownerState:P,className:(0,tb.A)(L.root,h)}),{slotProps:H}=V,G=(0,gr.A)(V,z_);return(0,Dh.jsx)(F,(0,eb.A)({},G,!sb(F)&&{slotProps:H,disableScrollLock:k},{children:(0,Dh.jsx)(x,(0,eb.A)({appear:!0,in:m,onEntering:(e,t)=>{S&&S(e,t),M()},onExited:()=>{z(!1)},timeout:D},_,{children:(0,Dh.jsx)(W,(0,eb.A)({},U,{children:d}))}))}))});function H_(e){return(0,wb.Ay)("MuiMenu",e)}(0,bb.A)("MuiMenu",["root","paper","list"]);const G_=["onEntering"],q_=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],K_={vertical:"top",horizontal:"right"},$_={vertical:"top",horizontal:"left"},Y_=(0,ib.Ay)(V_,{shouldForwardProp:e=>(0,CS.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),X_=(0,ib.Ay)(U_,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),J_=(0,ib.Ay)(Dk,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Q_=Oh.forwardRef(function(e,t){var n,r;const i=(0,ob.b)({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:s,disableAutoFocusItem:l=!1,MenuListProps:c={},onClose:u,open:d,PaperProps:h={},PopoverClasses:p,transitionDuration:f="auto",TransitionProps:{onEntering:g}={},variant:m="selectedMenu",slots:v={},slotProps:y={}}=i,b=(0,gr.A)(i.TransitionProps,G_),w=(0,gr.A)(i,q_),x=(()=>{const e=Oh.useContext(Ex);return null!=e&&e})(),A=(0,eb.A)({},i,{autoFocus:o,disableAutoFocusItem:l,MenuListProps:c,onEntering:g,PaperProps:h,transitionDuration:f,TransitionProps:b,variant:m}),S=(e=>{const{classes:t}=e;return(0,nb.A)({root:["root"],paper:["paper"],list:["list"]},H_,t)})(A),k=o&&!l&&d,_=Oh.useRef(null);let T=-1;Oh.Children.map(a,(e,t)=>{Oh.isValidElement(e)&&(e.props.disabled||("selectedMenu"===m&&e.props.selected||-1===T)&&(T=t))});const E=null!=(n=v.paper)?n:X_,C=null!=(r=y.paper)?r:h,I=_k({elementType:v.root,externalSlotProps:y.root,ownerState:A,className:[S.root,s]}),P=_k({elementType:E,externalSlotProps:C,ownerState:A,className:S.paper});return(0,Dh.jsx)(Y_,(0,eb.A)({onClose:u,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?K_:$_,slots:{paper:E,root:v.root},slotProps:{root:I,paper:P},open:d,ref:t,transitionDuration:f,TransitionProps:(0,eb.A)({onEntering:(e,t)=>{_.current&&_.current.adjustStyleForScrollbar(e,{direction:x?"rtl":"ltr"}),g&&g(e,t)}},b),ownerState:A},w,{classes:p,children:(0,Dh.jsx)(J_,(0,eb.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),u&&u(e,"tabKeyDown"))},actions:_,autoFocus:o&&(-1===T||l),autoFocusItem:k,variant:m},c,{className:(0,tb.A)(S.list,c.className),children:a}))}))});function Z_(e){return(0,wb.Ay)("MuiNativeSelect",e)}const eT=(0,bb.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),tT=["className","disabled","error","IconComponent","inputRef","variant"],nT=e=>{let{ownerState:t,theme:n}=e;return(0,eb.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,eb.A)({},n.vars?{backgroundColor:"rgba(".concat(n.vars.palette.common.onBackgroundChannel," / 0.05)")}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},["&.".concat(eT.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},rT=(0,ib.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:CS.A,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{["&.".concat(eT.multiple)]:t.multiple}]}})(nT),iT=e=>{let{ownerState:t,theme:n}=e;return(0,eb.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,["&.".concat(eT.disabled)]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},oT=(0,ib.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,vb.A)(n.variant))],n.open&&t.iconOpen]}})(iT),aT=Oh.forwardRef(function(e,t){const{className:n,disabled:r,error:i,IconComponent:o,inputRef:a,variant:s="standard"}=e,l=(0,gr.A)(e,tT),c=(0,eb.A)({},e,{disabled:r,variant:s,error:i}),u=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon","icon".concat((0,vb.A)(n)),o&&"iconOpen",r&&"disabled"]};return(0,nb.A)(s,Z_,t)})(c);return(0,Dh.jsxs)(Oh.Fragment,{children:[(0,Dh.jsx)(rT,(0,eb.A)({ownerState:c,className:(0,tb.A)(u.select,n),disabled:r,ref:a||t},l)),e.multiple?null:(0,Dh.jsx)(oT,{as:o,ownerState:c,className:u.icon})]})});var sT=i(6920),lT=i(2156);function cT(e){return(0,wb.Ay)("MuiSelect",e)}const uT=(0,bb.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var dT;const hT=["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"],pT=(0,ib.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["&.".concat(uT.select)]:t.select},{["&.".concat(uT.select)]:t[n.variant]},{["&.".concat(uT.error)]:t.error},{["&.".concat(uT.multiple)]:t.multiple}]}})(nT,{["&.".concat(uT.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),fT=(0,ib.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,vb.A)(n.variant))],n.open&&t.iconOpen]}})(iT),gT=(0,ib.Ay)("input",{shouldForwardProp:e=>(0,sT.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function mT(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function vT(e){return null==e||"string"==typeof e&&!e.trim()}const yT=Oh.forwardRef(function(e,t){var n;const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:h,error:p=!1,IconComponent:f,inputRef:g,labelId:m,MenuProps:v={},multiple:y,name:b,onBlur:w,onChange:x,onClose:A,onFocus:S,onOpen:k,open:_,readOnly:T,renderValue:E,SelectDisplayProps:C={},tabIndex:I,value:P,variant:L="standard"}=e,R=(0,gr.A)(e,hT),[N,O]=(0,lT.A)({controlled:P,default:u,name:"Select"}),[j,z]=(0,lT.A)({controlled:_,default:c,name:"Select"}),M=Oh.useRef(null),D=Oh.useRef(null),[B,F]=Oh.useState(null),{current:W}=Oh.useRef(null!=_),[U,V]=Oh.useState(),H=(0,Eb.A)(t,g),G=Oh.useCallback(e=>{D.current=e,e&&F(e)},[]),q=null==B?void 0:B.parentNode;Oh.useImperativeHandle(H,()=>({focus:()=>{D.current.focus()},node:M.current,value:N}),[N]),Oh.useEffect(()=>{c&&j&&B&&!W&&(V(a?null:q.clientWidth),D.current.focus())},[B,a]),Oh.useEffect(()=>{o&&D.current.focus()},[o]),Oh.useEffect(()=>{if(!m)return;const e=(0,Sk.A)(D.current).getElementById(m);if(e){const t=()=>{getSelection().isCollapsed&&D.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[m]);const K=(e,t)=>{e?k&&k(t):A&&A(t),W||(V(a?null:q.clientWidth),z(e))},$=Oh.Children.toArray(s),Y=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(N)?N.slice():[];const t=N.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),N!==n&&(O(n),x)){const r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:b}}),x(i,e)}y||K(!1,t)}},X=null!==B&&j;let J,Q;delete R["aria-invalid"];const Z=[];let ee=!1,te=!1;(vS({value:N})||h)&&(E?J=E(N):ee=!0);const ne=$.map(e=>{if(!Oh.isValidElement(e))return null;let t;if(y){if(!Array.isArray(N))throw new Error((0,aA.A)(2));t=N.some(t=>mT(t,e.props.value)),t&&ee&&Z.push(e.props.children)}else t=mT(N,e.props.value),t&&ee&&(Q=e.props.children);return t&&(te=!0),Oh.cloneElement(e,{"aria-selected":t?"true":"false",onClick:Y(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});ee&&(J=y?0===Z.length?null:Z.reduce((e,t,n)=>(e.push(t),n<Z.length-1&&e.push(", "),e),[]):Q);let re,ie=U;!a&&W&&B&&(ie=q.clientWidth),re=void 0!==I?I:d?null:0;const oe=C.id||(b?"mui-component-select-".concat(b):void 0),ae=(0,eb.A)({},e,{variant:L,value:N,open:X,error:p}),se=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon","icon".concat((0,vb.A)(n)),o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,nb.A)(s,cT,t)})(ae),le=(0,eb.A)({},v.PaperProps,null==(n=v.slotProps)?void 0:n.paper),ce=(0,Lx.A)();return(0,Dh.jsxs)(Oh.Fragment,{children:[(0,Dh.jsx)(pT,(0,eb.A)({ref:G,tabIndex:re,role:"combobox","aria-controls":ce,"aria-disabled":d?"true":void 0,"aria-expanded":X?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[m,oe].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!T){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),K(!0,e))}},onMouseDown:d||T?null:e=>{0===e.button&&(e.preventDefault(),D.current.focus(),K(!0,e))},onBlur:e=>{!X&&w&&(Object.defineProperty(e,"target",{writable:!0,value:{value:N,name:b}}),w(e))},onFocus:S},C,{ownerState:ae,className:(0,tb.A)(C.className,se.select,l),id:oe,children:vT(J)?dT||(dT=(0,Dh.jsx)("span",{className:"notranslate",children:"​"})):J})),(0,Dh.jsx)(gT,(0,eb.A)({"aria-invalid":p,value:Array.isArray(N)?N.join(","):N,name:b,ref:M,"aria-hidden":!0,onChange:e=>{const t=$.find(t=>t.props.value===e.target.value);void 0!==t&&(O(t.props.value),x&&x(e,t))},tabIndex:-1,disabled:d,className:se.nativeInput,autoFocus:o,ownerState:ae},R)),(0,Dh.jsx)(fT,{as:f,className:se.icon,ownerState:ae}),(0,Dh.jsx)(Q_,(0,eb.A)({id:"menu-".concat(b||""),anchorEl:q,open:X,onClose:e=>{K(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},v,{MenuListProps:(0,eb.A)({"aria-labelledby":m,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:ce},v.MenuListProps),slotProps:(0,eb.A)({},v.slotProps,{paper:(0,eb.A)({},le,{style:(0,eb.A)({minWidth:ie},null!=le?le.style:null)})}),children:ne}))]})}),bT=yT,wT=(0,gw.A)((0,Dh.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),xT=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],AT=["root"],ST={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,CS.A)(e)&&"variant"!==e,slot:"Root"},kT=(0,ib.Ay)(jS,ST)(""),_T=(0,ib.Ay)(ek,ST)(""),TT=(0,ib.Ay)(US,ST)(""),ET=Oh.forwardRef(function(e,t){const n=(0,ob.b)({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:i,classes:o={},className:a,defaultOpen:s=!1,displayEmpty:l=!1,IconComponent:c=wT,id:u,input:d,inputProps:h,label:p,labelId:f,MenuProps:g,multiple:m=!1,native:v=!1,onClose:y,onOpen:b,open:w,renderValue:x,SelectDisplayProps:A,variant:S="outlined"}=n,k=(0,gr.A)(n,xT),_=v?aT:bT,T=hS({props:n,muiFormControl:fS(),states:["variant","error"]}),E=T.variant||S,C=(0,eb.A)({},n,{variant:E,classes:o}),I=(e=>{const{classes:t}=e;return t})(C),P=(0,gr.A)(I,AT),L=d||{standard:(0,Dh.jsx)(kT,{ownerState:C}),outlined:(0,Dh.jsx)(_T,{label:p,ownerState:C}),filled:(0,Dh.jsx)(TT,{ownerState:C})}[E],R=(0,Eb.A)(t,Ak(L));return(0,Dh.jsx)(Oh.Fragment,{children:Oh.cloneElement(L,(0,eb.A)({inputComponent:_,inputProps:(0,eb.A)({children:i,error:T.error,IconComponent:c,variant:E,type:void 0,multiple:m},v?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:l,labelId:f,MenuProps:g,onClose:y,onOpen:b,open:w,renderValue:x,SelectDisplayProps:(0,eb.A)({id:u},A)},h,{classes:h?(0,mA.A)(P,h.classes):P},d?d.props.inputProps:{})},(m&&v||l)&&"outlined"===E?{notched:!0}:{},{ref:R,className:(0,tb.A)(L.props.className,a,I.root)},!d&&{variant:E},k))})});ET.muiName="Select";const CT=ET;function IT(e){return(0,wb.Ay)("MuiTextField",e)}(0,bb.A)("MuiTextField",["root"]);const PT=["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"],LT={standard:jS,filled:US,outlined:ek},RT=(0,ib.Ay)(gk,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),NT=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:o,className:a,color:s="primary",defaultValue:l,disabled:c=!1,error:u=!1,FormHelperTextProps:d,fullWidth:h=!1,helperText:p,id:f,InputLabelProps:g,inputProps:m,InputProps:v,inputRef:y,label:b,maxRows:w,minRows:x,multiline:A=!1,name:S,onBlur:k,onChange:_,onFocus:T,placeholder:E,required:C=!1,rows:I,select:P=!1,SelectProps:L,type:R,value:N,variant:O="outlined"}=n,j=(0,gr.A)(n,PT),z=(0,eb.A)({},n,{autoFocus:i,color:s,disabled:c,error:u,fullWidth:h,multiline:A,required:C,select:P,variant:O}),M=(e=>{const{classes:t}=e;return(0,nb.A)({root:["root"]},IT,t)})(z);const D={};"outlined"===O&&(g&&void 0!==g.shrink&&(D.notched=g.shrink),D.label=b),P&&(L&&L.native||(D.id=void 0),D["aria-describedby"]=void 0);const B=(0,Lx.A)(f),F=p&&B?"".concat(B,"-helper-text"):void 0,W=b&&B?"".concat(B,"-label"):void 0,U=LT[O],V=(0,Dh.jsx)(U,(0,eb.A)({"aria-describedby":F,autoComplete:r,autoFocus:i,defaultValue:l,fullWidth:h,multiline:A,name:S,rows:I,maxRows:w,minRows:x,type:R,value:N,id:B,inputRef:y,onBlur:k,onChange:_,onFocus:T,placeholder:E,inputProps:m},D,v));return(0,Dh.jsxs)(RT,(0,eb.A)({className:(0,tb.A)(M.root,a),disabled:c,error:u,fullWidth:h,ref:t,required:C,color:s,variant:O,ownerState:z},j,{children:[null!=b&&""!==b&&(0,Dh.jsx)(uk,(0,eb.A)({htmlFor:B,id:W},g,{children:b})),P?(0,Dh.jsx)(CT,(0,eb.A)({"aria-describedby":F,id:B,labelId:W,value:N,input:V},L,{children:o})):V,p&&(0,Dh.jsx)(xk,(0,eb.A)({id:F},d,{children:p}))]}))}),OT=NT;const jT=(0,bb.A)("MuiListItemIcon",["root","alignItemsFlexStart"]);const zT=(0,bb.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function MT(e){return(0,wb.Ay)("MuiMenuItem",e)}const DT=(0,bb.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),BT=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],FT=(0,ib.Ay)(cw,{shouldForwardProp:e=>(0,CS.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({},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"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(DT.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,rb.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(DT.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,rb.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(DT.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,rb.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,rb.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(DT.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(DT.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(ux.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(ux.inset)]:{marginLeft:52},["& .".concat(zT.root)]:{marginTop:0,marginBottom:0},["& .".concat(zT.inset)]:{paddingLeft:36},["& .".concat(jT.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,eb.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(jT.root," svg")]:{fontSize:"1.25rem"}}))}),WT=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:o=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:u,className:d}=n,h=(0,gr.A)(n,BT),p=Oh.useContext(Tk),f=Oh.useMemo(()=>({dense:o||p.dense||!1,disableGutters:s}),[p.dense,o,s]),g=Oh.useRef(null);(0,gS.A)(()=>{r&&g.current&&g.current.focus()},[r]);const m=(0,eb.A)({},n,{dense:f.dense,divider:a,disableGutters:s}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e,s={root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},l=(0,nb.A)(s,MT,a);return(0,eb.A)({},a,l)})(n),y=(0,Eb.A)(g,t);let b;return n.disabled||(b=void 0!==u?u:-1),(0,Dh.jsx)(Tk.Provider,{value:f,children:(0,Dh.jsx)(FT,(0,eb.A)({ref:y,role:c,tabIndex:b,component:i,focusVisibleClassName:(0,tb.A)(v.focusVisible,l),className:(0,tb.A)(v.root,d)},h,{ownerState:m,classes:v}))})});const UT=Oh.createContext();function VT(e){return(0,wb.Ay)("MuiGrid",e)}const HT=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],GT=(0,bb.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>"spacing-xs-".concat(e)),...["column-reverse","column","row-reverse","row"].map(e=>"direction-xs-".concat(e)),...["nowrap","wrap-reverse","wrap"].map(e=>"wrap-xs-".concat(e)),...HT.map(e=>"grid-xs-".concat(e)),...HT.map(e=>"grid-sm-".concat(e)),...HT.map(e=>"grid-md-".concat(e)),...HT.map(e=>"grid-lg-".concat(e)),...HT.map(e=>"grid-xl-".concat(e))]),qT=GT,KT=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function $T(e){const t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function YT(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach(e=>{""===r&&0!==n[e]&&(r=e)});const i=Object.keys(t).sort((e,n)=>t[e]-t[n]);return i.slice(0,i.indexOf(r))}const XT=(0,ib.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:i,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n["spacing-xs-".concat(String(e))]];const r=[];return t.forEach(t=>{const i=e[t];Number(i)>0&&r.push(n["spacing-".concat(t,"-").concat(String(i))])}),r}(a,c,t));const d=[];return c.forEach(e=>{const r=n[e];r&&d.push(t["grid-".concat(e,"-").concat(String(r))])}),[t.root,r&&t.container,o&&t.item,l&&t.zeroMinWidth,...u,"row"!==i&&t["direction-xs-".concat(String(i))],"wrap"!==s&&t["wrap-xs-".concat(String(s))],...d]}})(e=>{let{ownerState:t}=e;return(0,eb.A)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})},function(e){let{theme:t,ownerState:n}=e;const r=(0,LA.kW)({values:n.direction,breakpoints:t.breakpoints.values});return(0,LA.NI)({theme:t},r,e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(qT.item)]={maxWidth:"none"}),t})},function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:i}=n;let o={};if(r&&0!==i){const e=(0,LA.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"==typeof e&&(n=YT({breakpoints:t.breakpoints.values,values:e})),o=(0,LA.NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{marginTop:"-".concat($T(o)),["& > .".concat(qT.item)]:{paddingTop:$T(o)}}:null!=(i=n)&&i.includes(r)?{}:{marginTop:0,["& > .".concat(qT.item)]:{paddingTop:0}}})}return o},function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:i}=n;let o={};if(r&&0!==i){const e=(0,LA.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"==typeof e&&(n=YT({breakpoints:t.breakpoints.values,values:e})),o=(0,LA.NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{width:"calc(100% + ".concat($T(o),")"),marginLeft:"-".concat($T(o)),["& > .".concat(qT.item)]:{paddingLeft:$T(o)}}:null!=(i=n)&&i.includes(r)?{}:{width:"100%",marginLeft:0,["& > .".concat(qT.item)]:{paddingLeft:0}}})}return o},function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce((e,i)=>{let o={};if(r[i]&&(t=r[i]),!t)return e;if(!0===t)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=(0,LA.kW)({values:r.columns,breakpoints:n.breakpoints.values}),s="object"==typeof a?a[i]:a;if(null==s)return e;const l="".concat(Math.round(t/s*1e8)/1e6,"%");let c={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t="calc(".concat(l," + ").concat($T(e),")");c={flexBasis:t,maxWidth:t}}}o=(0,eb.A)({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===n.breakpoints.values[i]?Object.assign(e,o):e[n.breakpoints.up(i)]=o,e},{})});const JT=e=>{const{classes:t,container:n,direction:r,item:i,spacing:o,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return["spacing-xs-".concat(String(e))];const n=[];return t.forEach(t=>{const r=e[t];if(Number(r)>0){const e="spacing-".concat(t,"-").concat(String(r));n.push(e)}}),n}(o,l));const u=[];l.forEach(t=>{const n=e[t];n&&u.push("grid-".concat(t,"-").concat(String(n)))});const d={root:["root",n&&"container",i&&"item",s&&"zeroMinWidth",...c,"row"!==r&&"direction-xs-".concat(String(r)),"wrap"!==a&&"wrap-xs-".concat(String(a)),...u]};return(0,nb.A)(d,VT,t)},QT=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiGrid"}),{breakpoints:r}=oA(),i=(0,$w.A)(n),{className:o,columns:a,columnSpacing:s,component:l="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:h,spacing:p=0,wrap:f="wrap",zeroMinWidth:g=!1}=i,m=(0,gr.A)(i,KT),v=h||p,y=s||p,b=Oh.useContext(UT),w=c?a||12:b,x={},A=(0,eb.A)({},m);r.keys.forEach(e=>{null!=m[e]&&(x[e]=m[e],delete A[e])});const S=(0,eb.A)({},i,{columns:w,container:c,direction:u,item:d,rowSpacing:v,columnSpacing:y,wrap:f,zeroMinWidth:g,spacing:p},x,{breakpoints:r.keys}),k=JT(S);return(0,Dh.jsx)(UT.Provider,{value:w,children:(0,Dh.jsx)(XT,(0,eb.A)({ownerState:S,className:(0,tb.A)(k.root,o),as:l,ref:t},A))})});const ZT=QT;var eE=i(1437),tE=i(2705),nE=i(1029),rE=i(5323);function iE(e){let{text:t,title:n="copy"}=e;const[r,i]=(0,Oh.useState)(!1);return(0,Dh.jsx)(fw,{size:"small",sx:{opacity:.5,"&:hover":{opacity:1}},onClick:async e=>{e.stopPropagation(),await navigator.clipboard.writeText(t),i(!0);const n=setTimeout(()=>{clearTimeout(n),i(!1)},500)},title:n,children:r?(0,Dh.jsx)(rE.A,{fontSize:"inherit"}):(0,Dh.jsx)(nE.A,{fontSize:"inherit"})})}function oE(e){let{text:t,fromLang:n,toLang:r,apiSlug:i,transApis:o,simpleStyle:a=!1}=e;const s=nS(),[l,c]=(0,Oh.useState)(""),[u,d]=(0,Oh.useState)(!1),[h,p]=(0,Oh.useState)(""),f=(0,Oh.useMemo)(()=>o.find(e=>e.apiSlug===i),[o,i]);return(0,Oh.useEffect)(()=>{null!=t&&t.trim()&&f&&(async()=>{try{d(!0),c(""),p("");const{trText:e}=await ga({text:t,fromLang:n,toLang:r,apiSetting:f});c(e)}catch(e){p(e.message)}finally{d(!1)}})()},[t,n,r,f]),f?a?(0,Dh.jsx)(iA,{children:h?(0,Dh.jsx)(Ew,{severity:"error",children:h}):u?(0,Dh.jsx)(Kw,{size:16}):(0,Dh.jsx)(ex,{style:{whiteSpace:"pre-line"},children:l})}):(0,Dh.jsx)(iA,{children:(0,Dh.jsx)(OT,{size:"small",label:"".concat(s("translated_text")," - ").concat(f.apiName),fullWidth:!0,multiline:!0,value:l,helperText:h,InputProps:{startAdornment:u?(0,Dh.jsx)(Kw,{size:16}):null,endAdornment:(0,Dh.jsx)(FA,{direction:"row",sx:{position:"absolute",right:0,top:0},children:(0,Dh.jsx)(iE,{text:l,title:s("copy")})})}})}):null}var aE=i(561),sE=i(5555);const lE={};function cE(e){let{word:t,title:n}=e;const{favWords:r,toggleFav:i}=function(){const{data:e,save:t}=Iw($t,lE,Vt),n=(0,Oh.useCallback)(e=>{t(e),pr(Vt)},[t]),r=(0,Oh.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];n(n=>{if(!n[e]){const a={createdAt:Date.now(),timestamp:t,phonetic:r,definition:i,examples:o};return Object.keys(a).forEach(e=>{(null===a[e]||void 0===a[e]||Array.isArray(a[e])&&0===a[e].length||"string"==typeof a[e]&&0===a[e].length)&&delete a[e]}),h(h({},n),{},{[e]:a})}const a=h({},n);return delete a[e],a})},[n]),i=(0,Oh.useCallback)(e=>{n(t=>h(h({},e.reduce((e,t)=>(e[t]={createdAt:Date.now()},e),{})),t))},[n]),o=(0,Oh.useCallback)(()=>{n({})},[n]),a=(0,Oh.useMemo)(()=>Object.entries(e||{}).sort((e,t)=>e[0].localeCompare(t[0])),[e]),s=(0,Oh.useMemo)(()=>a.map(e=>{let[t]=e;return t}),[a]);return{favWords:e,favList:a,wordList:s,toggleFav:r,mergeWords:i,clearWords:o}}(),[o,a]=(0,Oh.useState)(!1);return(0,Dh.jsx)(fw,{disabled:o,size:"small",onClick:()=>{try{a(!0),i(t)}catch(e){pt("set fav",e)}finally{a(!1)}},title:n,children:r[t]?(0,Dh.jsx)(aE.A,{fontSize:"inherit"}):(0,Dh.jsx)(sE.A,{fontSize:"inherit"})})}var uE=i(4762);function dE(e){let{src:t}=e;const{error:n,ready:r,playing:i,onPlay:o}=function(e){const t=(0,Oh.useRef)(null),[n,r]=(0,Oh.useState)(null),[i,o]=(0,Oh.useState)(!1),[a,s]=(0,Oh.useState)(!1),[l,c]=(0,Oh.useState)(!1),u=(0,Oh.useCallback)(async()=>{if(t.current)try{await t.current.play()}catch(e){ht.info("Playback failed:",e),s(!1)}},[]),d=(0,Oh.useCallback)(()=>{var e;null===(e=t.current)||void 0===e||e.pause()},[]);return(0,Oh.useEffect)(()=>{if(!e)return;let n=!1;o(!1),r(null),s(!1),c(!0);const i=new Audio;t.current=i;const a=()=>o(!0),l=()=>s(!0),u=()=>s(!1),d=()=>s(!1),h=e=>{n||(r(i.error||e),o(!1),c(!1))};return i.addEventListener("canplaythrough",a),i.addEventListener("play",l),i.addEventListener("pause",u),i.addEventListener("ended",d),i.addEventListener("error",h),(async()=>{try{const t=await Pi(e,{},{expect:"audio"});if(n)return;i.src=t,c(!1)}catch(e){n||(ht.info("Audio fetch failed:",e),r(e),c(!1))}})(),()=>{n=!0,i.pause(),i.removeAttribute("src"),i.removeEventListener("canplaythrough",a),i.removeEventListener("play",l),i.removeEventListener("pause",u),i.removeEventListener("ended",d),i.removeEventListener("error",h)}},[e]),{loading:l,error:n,ready:i,playing:a,onPlay:u,onPause:d}}(t);return n||!r?(0,Dh.jsx)(fw,{disabled:!0,size:"small",children:(0,Dh.jsx)(uE.A,{fontSize:"inherit"})}):i?(0,Dh.jsx)(fw,{color:"primary",size:"small",children:(0,Dh.jsx)(uE.A,{fontSize:"inherit"})}):(0,Dh.jsx)(fw,{onClick:o,size:"small",children:(0,Dh.jsx)(uE.A,{fontSize:"inherit"})})}function hE(e){let{text:t,lan:n="uk",spd:r=3}=e;if(!t)return null;const i="https://fanyi.baidu.com/gettts?".concat(fo.stringify({lan:n,text:t,spd:r}));return(0,Dh.jsx)(dE,{src:i})}const pE={[C]:{apiFn:da,reWord:e=>null==e?void 0:e.word,toText:e=>{var t;return(null==e||null===(t=e.trs)||void 0===t?void 0:t.map(e=>{let{pos:t,def:n}=e;return"".concat(t?"[".concat(t,"] "):"").concat(n)}))||[]},uiAudio:e=>{var t;return(0,Dh.jsx)(ex,{component:"div",children:null==e||null===(t=e.aus)||void 0===t?void 0:t.map(e=>{let{key:t,audio:n,phonetic:r}=e;return(0,Dh.jsxs)(ex,{component:"div",style:{display:"inline-block",paddingRight:"1em"},children:[(0,Dh.jsx)(ex,{component:"span",children:"".concat(t," [").concat(r||"","]")}),(0,Dh.jsx)(dE,{src:n})]},t)})})},uiTrans:e=>{var t,n,r,i;return(0,Dh.jsxs)(ex,{component:"div",children:[(0,Dh.jsx)(ex,{component:"ul",children:null==e||null===(t=e.trs)||void 0===t?void 0:t.map((e,t)=>{let{pos:n,def:r}=e;return(0,Dh.jsxs)(ex,{component:"li",children:[n&&"[".concat(n,"] "),r]},t)})}),(null==e||null===(n=e.presents)||void 0===n?void 0:n.length)>0&&(0,Dh.jsx)(ex,{component:"div",style:{marginTop:"10px"},children:e.presents.join(", ")}),(null==e||null===(r=e.ecs)||void 0===r?void 0:r.length)>0&&(0,Dh.jsxs)(ex,{component:"div",style:{marginTop:"10px"},children:[(0,Dh.jsx)(ex,{component:"div",style:{fontWeight:"bold",marginBottom:"5px"},children:"英汉双解"}),e.ecs.map(e=>{let{pos:t,lis:n}=e;return(0,Dh.jsxs)(ex,{component:"div",children:[(0,Dh.jsx)(ex,{component:"div",children:t}),(0,Dh.jsx)(ex,{component:"ul",children:n.map((e,t)=>(0,Dh.jsx)(ex,{component:"li",children:e},t))})]},t)})]}),(null==e||null===(i=e.sentences)||void 0===i?void 0:i.length)>0&&(0,Dh.jsxs)(ex,{component:"div",style:{marginTop:"10px"},children:[(0,Dh.jsx)(ex,{component:"div",style:{fontWeight:"bold",marginBottom:"5px"},children:"例句"}),e.sentences.slice(0,2).map((t,n)=>{var r,i;return(0,Dh.jsxs)(ex,{component:"div",style:{marginBottom:"5px"},children:[(0,Dh.jsx)(ex,{component:"div",children:null===(r=t.eng)||void 0===r||null===(i=r.split(e.word))||void 0===i?void 0:i.map((t,n,r)=>(0,Dh.jsxs)("span",{children:[n>0&&(0,Dh.jsx)("span",{style:{fontWeight:"bold",color:"#1e88e5"},children:e.word}),t]},n))}),(0,Dh.jsx)(ex,{component:"div",style:{opacity:"0.6",fontStyle:"italic"},children:t.chs})]},n)})]})]})}},[I]:{apiFn:async e=>{const t="https://dict.youdao.com/jsonapi_s?".concat(fo.stringify({doctype:"json",jsonversion:4})),n={headers:{accept:"application/json, text/plain, */*","accept-language":"en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,ja;q=0.6","content-type":"application/x-www-form-urlencoded"},method:"POST",body:fo.stringify({q:e,le:"en",t:3,client:"web",keyfrom:"webdict"})},r=await Pi(t,n,{useCache:!0});return r?(await Xr(t,n,r),r):null},reWord:e=>{var t,n;return null==e||null===(t=e.ec)||void 0===t||null===(n=t.word)||void 0===n?void 0:n["return-phrase"]},toText:e=>{var t,n,r;return(null==e||null===(t=e.ec)||void 0===t||null===(n=t.word)||void 0===n||null===(r=n.trs)||void 0===r?void 0:r.map(e=>{let{pos:t,tran:n}=e;return"".concat(t?"[".concat(t,"] "):"").concat(n)}))||[]},uiAudio:e=>{var t,n,r,i,o,a,s,l,c,u,d,h;return(0,Dh.jsxs)(ex,{component:"div",children:[(0,Dh.jsxs)(ex,{component:"div",style:{display:"inline-block",paddingRight:"1em"},children:[(0,Dh.jsx)(ex,{component:"span",children:"英 ".concat(null!=e&&null!==(t=e.ec)&&void 0!==t&&null!==(n=t.word)&&void 0!==n&&n.ukphone?"[".concat(null==e||null===(r=e.ec)||void 0===r||null===(i=r.word)||void 0===i?void 0:i.ukphone,"]"):"")}),(0,Dh.jsx)(hE,{text:null==e||null===(o=e.ec)||void 0===o||null===(a=o.word)||void 0===a?void 0:a["return-phrase"],lan:"uk"})]}),(0,Dh.jsxs)(ex,{component:"div",style:{display:"inline-block",paddingRight:"1em"},children:[(0,Dh.jsx)(ex,{component:"span",children:"美 ".concat(null!=e&&null!==(s=e.ec)&&void 0!==s&&null!==(l=s.word)&&void 0!==l&&l.usphone?"[".concat(null==e||null===(c=e.ec)||void 0===c||null===(u=c.word)||void 0===u?void 0:u.usphone,"]"):"")}),(0,Dh.jsx)(hE,{text:null==e||null===(d=e.ec)||void 0===d||null===(h=d.word)||void 0===h?void 0:h["return-phrase"],lan:"en"})]})]})},uiTrans:e=>{var t,n,r,i,o;return(0,Dh.jsxs)(ex,{component:"div",children:[(0,Dh.jsx)(ex,{component:"ul",children:null==e||null===(t=e.ec)||void 0===t||null===(n=t.word)||void 0===n||null===(r=n.trs)||void 0===r?void 0:r.map((e,t)=>{let{pos:n,tran:r}=e;return(0,Dh.jsxs)(ex,{component:"li",children:[n&&"[".concat(n,"] "),r]},t)})}),(null==e||null===(i=e.blng_sents_part)||void 0===i||null===(o=i["sentence-pair"])||void 0===o?void 0:o.length)>0&&(0,Dh.jsxs)(ex,{component:"div",style:{marginTop:"10px"},children:[(0,Dh.jsx)(ex,{component:"div",style:{fontWeight:"bold",marginBottom:"5px"},children:"例句"}),e.blng_sents_part["sentence-pair"].slice(0,2).map((t,n)=>{var r,i,o,a;return(0,Dh.jsxs)(ex,{component:"div",style:{marginBottom:"5px"},children:[(0,Dh.jsx)(ex,{component:"div",children:null===(r=t.sentence)||void 0===r||null===(i=r.split(null===(o=e.ec)||void 0===o||null===(a=o.word)||void 0===a?void 0:a["return-phrase"]))||void 0===i?void 0:i.map((t,n,r)=>{var i,o;return(0,Dh.jsxs)("span",{children:[n>0&&(null===(i=e.ec)||void 0===i||null===(o=i.word)||void 0===o?void 0:o["return-phrase"])&&(0,Dh.jsx)("span",{style:{fontWeight:"bold",color:"#1e88e5"},children:e.ec.word["return-phrase"]}),t]},n)})}),(0,Dh.jsx)(ex,{component:"div",style:{opacity:"0.6",fontStyle:"italic"},children:t["sentence-translation"]})]},n)})]})]})}}};function fE(e){let{text:t,setCopyText:n,setRealWord:r,dict:i}=e;const{loading:o,error:a,data:s}=eS(i.apiFn,t);(0,Oh.useEffect)(()=>{if(!s)return;const e=i.reWord(s)||t,o=[e,i.toText(s).join("\n")].join("\n");r(e),n(o)},[s,t,i,n,r]);const l=(0,Oh.useMemo)(()=>i.uiAudio(s),[s,i]),c=(0,Oh.useMemo)(()=>i.uiTrans(s),[s,i]);return o?(0,Dh.jsx)(Kw,{size:16}):a?(0,Dh.jsx)(Ew,{severity:"error",children:a}):s?(0,Dh.jsxs)(ex,{component:"div",children:[l,c]}):(0,Dh.jsx)(ex,{children:"Not found!"})}function gE(e){let{text:t,enDict:n}=e;const r=nS(),[i,o]=(0,Oh.useState)(t),[a,s]=(0,Oh.useState)(t),l=pE[n];return(0,Dh.jsxs)(FA,{spacing:1,children:[t&&(0,Dh.jsxs)(FA,{direction:"row",justifyContent:"space-between",children:[(0,Dh.jsx)(ex,{variant:"subtitle1",style:{fontWeight:"bold"},children:a}),(0,Dh.jsxs)(FA,{direction:"row",justifyContent:"space-between",children:[(0,Dh.jsx)(iE,{text:i,title:r("copy")}),(0,Dh.jsx)(cE,{word:a,title:r("collect")})]})]}),(0,Dh.jsx)(gx,{}),l&&(0,Dh.jsx)(fE,{text:t,setCopyText:o,setRealWord:s,dict:l})]})}function mE(e){let{text:t}=e;const{loading:n,error:r,data:i}=eS(ha,t);return n?(0,Dh.jsx)(Kw,{size:16}):r?(0,Dh.jsx)(Ew,{severity:"error",children:r}):i?(0,Dh.jsx)(Dh.Fragment,{children:i.map(e=>{let{k:t,v:n}=e;return(0,Dh.jsxs)(ex,{component:"div",children:[(0,Dh.jsx)(ex,{children:t}),(0,Dh.jsx)(ex,{component:"ul",style:{margin:"0"},children:(0,Dh.jsx)(ex,{component:"li",children:n})})]},t)})}):null}function vE(e){let{text:t}=e;const{loading:n,error:r,data:i}=eS(pa,t);return n?(0,Dh.jsx)(Kw,{size:16}):r?(0,Dh.jsx)(Ew,{severity:"error",children:r}):i?(0,Dh.jsx)(Dh.Fragment,{children:i.map(e=>{let{entry:t,explain:n}=e;return(0,Dh.jsxs)(ex,{component:"div",children:[(0,Dh.jsx)(ex,{children:t}),(0,Dh.jsx)(ex,{component:"ul",style:{margin:"0"},children:(0,Dh.jsx)(ex,{component:"li",children:n})})]},t)})}):null}function yE(e){let{text:t,enSug:n}=e;const r={[R]:(0,Dh.jsx)(mE,{text:t}),[N]:(0,Dh.jsx)(vE,{text:t})};return(0,Dh.jsxs)(FA,{spacing:1,children:[(0,Dh.jsx)(gx,{}),r[n]||(0,Dh.jsx)(ex,{children:"Sug not support"})]})}const bE="https://www.zdic.net",wE=e=>(e||"").replace(/\s+/g," ").trim(),xE=e=>e?/^https?:\/\//.test(e)?e:e.startsWith("//")?"https:".concat(e):e.startsWith("/")?"".concat(bE).concat(e):e:"",AE=(e,t)=>{const n=Array.from(e.querySelectorAll(".meta-badge")).find(e=>wE(e.textContent)===t);return r=null==n?void 0:n.nextElementSibling,wE(Array.from((null==r?void 0:r.childNodes)||[]).filter(e=>e.nodeType===Node.TEXT_NODE).map(e=>e.textContent).join(""))||wE(null==r?void 0:r.textContent);var r},SE=(e,t)=>{return(n=Array.from(e.querySelectorAll(t)).map(e=>{var t;return wE(e.getAttribute("title"))||wE(null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("alt"))||wE(e.textContent)}),Array.from(new Set(n.filter(Boolean)))).join(", ");var n},kE=e=>{const t=[];return e.querySelectorAll(".jbjs>.jnr>p>.dicpy").forEach(e=>{var n,r;const i=wE(null===(n=e.childNodes[0])||void 0===n?void 0:n.nodeValue),o=e.querySelector(".audio_play_button"),a=[];let s=null===(r=e.parentElement)||void 0===r?void 0:r.nextElementSibling;for(;s;){var l;if("ol"===(null===(l=s.tagName)||void 0===l?void 0:l.toLowerCase())){s.querySelectorAll("li").forEach(e=>{a.push(wE(e.textContent))});break}if(s.querySelector(".dicpy"))break;s=s.nextElementSibling}t.push({pinyin:i,audioUrl:xE((null==o?void 0:o.getAttribute("data-src-mp3"))||(null==o?void 0:o.getAttribute("data-audio"))),definitions:a})}),t},_E=async e=>{var t,n,r,i,o,a;const s="".concat(bE,"/hans/").concat(encodeURIComponent(e)),l=await Pi(s,{credentials:"omit"},{useCache:!1});if(!l)return null;const c=(new DOMParser).parseFromString(l,"text/html"),u=wE(null===(t=c.querySelector(".char-meta"))||void 0===t?void 0:t.getAttribute("content"))||wE(null===(n=c.querySelector("#glyph-img"))||void 0===n?void 0:n.getAttribute("alt"))||wE(null===(r=c.querySelector(".dict-section__char"))||void 0===r?void 0:r.textContent)||wE(null===(i=c.querySelector(".h2_entry>.orth"))||void 0===i?void 0:i.textContent)||e,d=AE(c,"部首")||wE(null===(o=c.querySelector("[class^='z_bs'] a"))||void 0===o?void 0:o.textContent),h=SE(c,"[class^='z_jfz'] a"),p=SE(c,".char-card__variants .variant-link")||SE(c,"[class^='z_yt'] a"),f=AE(c,"五笔")||wE(null===(a=c.querySelector(".entry_title table.dsk:nth-child(2) tr:nth-child(2) > td.dsk_2_1:nth-child(1) > p"))||void 0===a?void 0:a.textContent),g=(e=>Array.from(e.querySelectorAll("#jbjs .jbjs-reading")).map(e=>{var t;const n=wE(null===(t=e.querySelector(".jbjs-reading__py"))||void 0===t?void 0:t.textContent),r=e.querySelector(".audio-btn"),i=Array.from(e.querySelectorAll(".jbjs-list li")).map(e=>wE(e.textContent)).filter(Boolean);return{pinyin:n,audioUrl:xE(null==r?void 0:r.getAttribute("data-audio")),definitions:i}}).filter(e=>e.pinyin||e.definitions.length>0))(c),{en:m,de:v,fr:y}=(e=>{const t={en:"",de:"",fr:""},n={英语:"en",德语:"de",法语:"fr"};return Array.from(e.querySelectorAll(".enbox p, #jbjs p, #jbjs div")).forEach(e=>{const r=wE(e.textContent);Object.entries(n).forEach(e=>{let[n,i]=e;!t[i]&&r.startsWith(n)&&(t[i]=wE(r.slice(n.length)))})}),t})(c);return{text:u,bushou:d,fanti:h,yiti:p,wubi:f,results:g.length>0?g:kE(c),en:m,de:v,fr:y}};function TE(e){let{text:t}=e;const[n,r]=(0,Oh.useState)(null),[i,o]=(0,Oh.useState)(!1);return(0,Oh.useEffect)(()=>{if(!t)return;let e=!0;return o(!0),_E(t).then(t=>{e&&(r(t),o(!1))}).catch(t=>{e&&(console.error("获取汉典数据失败:",t),o(!1))}),()=>{e=!1}},[t]),i?(0,Dh.jsx)(FA,{alignItems:"center",justifyContent:"center",py:2,children:(0,Dh.jsx)(Kw,{size:24})}):n?(0,Dh.jsxs)(FA,{spacing:1,children:[(0,Dh.jsx)(ex,{variant:"subtitle1",style:{fontWeight:"bold"},children:n.text}),(0,Dh.jsx)(gx,{}),(n.bushou||n.wubi)&&(0,Dh.jsxs)(ex,{variant:"body2",color:"text.secondary",children:[n.bushou&&"[部首]: ".concat(n.bushou,"  "),n.wubi&&"[五笔]: ".concat(n.wubi)]}),(n.fanti||n.yiti)&&(0,Dh.jsxs)(ex,{variant:"body2",color:"text.secondary",children:[n.fanti&&"[繁体]: ".concat(n.fanti,"  "),n.yiti&&"[异体]: ".concat(n.yiti)]}),n.results&&n.results.length>0&&(0,Dh.jsx)(FA,{spacing:1,mt:1,children:n.results.map((e,t)=>(0,Dh.jsxs)(iA,{children:[(0,Dh.jsxs)(FA,{direction:"row",alignItems:"center",spacing:1,children:[(0,Dh.jsxs)(ex,{variant:"body2",color:"primary",style:{fontWeight:"bold"},children:["[",e.pinyin,"]"]}),e.audioUrl&&(0,Dh.jsx)(dE,{src:e.audioUrl})]}),(0,Dh.jsx)(iA,{component:"ol",sx:{pl:3,m:0,mt:.5},children:e.definitions&&e.definitions.map((e,t)=>(0,Dh.jsx)(ex,{component:"li",variant:"body2",sx:{mb:.5},children:e},t))})]},t))}),(n.en||n.de||n.fr)&&(0,Dh.jsxs)(FA,{spacing:.5,mt:1,children:[n.en&&(0,Dh.jsxs)(ex,{variant:"body2",sx:{wordBreak:"break-word"},children:["[英]: ",n.en]}),n.de&&(0,Dh.jsxs)(ex,{variant:"body2",sx:{wordBreak:"break-word"},children:["[德]: ",n.de]}),n.fr&&(0,Dh.jsxs)(ex,{variant:"body2",sx:{wordBreak:"break-word"},children:["[法]: ",n.fr]})]})]}):(0,Dh.jsxs)(FA,{spacing:1,children:[(0,Dh.jsx)(ex,{variant:"subtitle1",style:{fontWeight:"bold"},children:t}),(0,Dh.jsx)(gx,{}),(0,Dh.jsx)(ex,{variant:"body2",color:"text.secondary",children:"暂无字典数据或查询失败"})]})}function EE(e){let{text:t,setText:n,apiSlugs:r,fromLang:i,toLang:o,toLang2:a,transApis:s,simpleStyle:l=!1,langDetector:c="-",enDict:u="-",enSug:d="-",isPlaygound:h=!1}=e;const p=nS(),[f,g]=(0,Oh.useState)(!1),[m,v]=(0,Oh.useState)(t),[y,b]=(0,Oh.useState)(r),[w,x]=(0,Oh.useState)(i),[A,S]=(0,Oh.useState)(o),[k,_]=(0,Oh.useState)(a),[T,E]=(0,Oh.useState)(c),[C,I]=(0,Oh.useState)(u),[R,N]=(0,Oh.useState)(d),[z,M]=(0,Oh.useState)(""),[D,B]=(0,Oh.useState)(!1),F=(0,Oh.useRef)(null);(0,Oh.useEffect)(()=>{const e=F.current;if(!e)return;e.focus();const t=e.value.length;e.setSelectionRange(t,t)},[]),(0,Oh.useEffect)(()=>{if(Wn(t)){const e=new CustomEvent("kiss-add-word",{detail:{word:t}});document.dispatchEvent(e)}},[t]),(0,Oh.useEffect)(()=>{b(r)},[r]),(0,Oh.useEffect)(()=>{f||v(t)},[t,f]),(0,Oh.useEffect)(()=>{t.trim()?(async()=>{try{B(!0);const e=await Hf(t,T);e&&M(e)}catch(e){pt("tranbox: detect lang",e)}finally{B(!1)}})():M("")},[t,T,M,B]);const W=(0,Oh.useMemo)(()=>"auto"===w&&A!==k&&"-"!==k&&z===A?k:A,[w,A,k,z]),U=(0,Oh.useMemo)(()=>s.filter(e=>!e.isDisabled).map(e=>({key:e.apiSlug,name:e.apiName||e.apiSlug})),[s]),V=(0,Oh.useMemo)(()=>Wn(t),[t]),H=(0,Oh.useMemo)(()=>h?6:4,[h]),G=(0,Oh.useMemo)(()=>h?3:4,[h]),q=(0,Oh.useMemo)(()=>{const e=new Set(U.map(e=>e.key));return y.filter(t=>e.has(t))},[y,U]);return(0,Dh.jsxs)(FA,{spacing:l?1:2,children:[!l&&(0,Dh.jsxs)(Dh.Fragment,{children:[(0,Dh.jsx)(iA,{children:(0,Dh.jsxs)(ZT,{container:!0,spacing:2,columns:12,children:[(0,Dh.jsx)(ZT,{item:!0,xs:H,md:G,children:(0,Dh.jsx)(OT,{select:!0,SelectProps:{multiple:!0,MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",value:q,name:"apiSlugs",label:p("translate_service_multiple"),onChange:e=>{b(e.target.value)},children:U.map(e=>{let{key:t,name:n}=e;return(0,Dh.jsx)(WT,{value:t,children:n},t)})})}),(0,Dh.jsx)(ZT,{item:!0,xs:H,md:G,children:(0,Dh.jsx)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"fromLang",value:w,label:p("from_lang"),onChange:e=>{x(e.target.value)},children:ye.map(e=>{let[t,n]=e;return(0,Dh.jsx)(WT,{value:t,children:n},t)})})}),(0,Dh.jsx)(ZT,{item:!0,xs:H,md:G,children:(0,Dh.jsx)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"toLang",value:A,label:p("to_lang"),onChange:e=>{S(e.target.value)},children:ve.map(e=>{let[t,n]=e;return(0,Dh.jsx)(WT,{value:t,children:n},t)})})}),h&&(0,Dh.jsxs)(Dh.Fragment,{children:[(0,Dh.jsx)(ZT,{item:!0,xs:H,md:G,children:(0,Dh.jsx)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"toLang2",value:k,label:p("to_lang2"),onChange:e=>{_(e.target.value)},children:ve.map(e=>{let[t,n]=e;return(0,Dh.jsx)(WT,{value:t,children:n},t)})})}),(0,Dh.jsx)(ZT,{item:!0,xs:H,md:G,children:(0,Dh.jsxs)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"enDict",value:C,label:p("english_dict"),onChange:e=>{I(e.target.value)},children:[(0,Dh.jsx)(WT,{value:"-",children:p("disable")}),P.map(e=>(0,Dh.jsx)(WT,{value:e,children:e},e))]})}),(0,Dh.jsx)(ZT,{item:!0,xs:H,md:G,children:(0,Dh.jsxs)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"enSug",value:R,label:p("english_suggest"),onChange:e=>{N(e.target.value)},children:[(0,Dh.jsx)(WT,{value:"-",children:p("disable")}),O.map(e=>(0,Dh.jsx)(WT,{value:e,children:e},e))]})}),(0,Dh.jsx)(ZT,{item:!0,xs:H,md:G,children:(0,Dh.jsxs)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"langDetector",value:T,label:p("detected_lang"),onChange:e=>{E(e.target.value)},children:[(0,Dh.jsx)(WT,{value:"-",children:p("disable")}),ce.map(e=>(0,Dh.jsx)(WT,{value:e,children:e},e))]})}),(0,Dh.jsx)(ZT,{item:!0,xs:H,md:G,children:(0,Dh.jsx)(OT,{fullWidth:!0,size:"small",name:"deLang",value:z&&me.get(z),label:p("detected_result"),disabled:!0,InputProps:{startAdornment:D?(0,Dh.jsx)(Kw,{size:16}):null}})})]})]})}),(0,Dh.jsx)(iA,{children:(0,Dh.jsx)(OT,{size:"small",label:p("original_text"),fullWidth:!0,multiline:!0,inputRef:F,minRows:h?2:1,maxRows:10,value:m,onChange:e=>{v(e.target.value)},onFocus:()=>{g(!0)},onBlur:()=>{g(!1),n(m.trim())},InputProps:{endAdornment:(0,Dh.jsx)(FA,{direction:"row",sx:{position:"absolute",right:0,top:0},children:f?(0,Dh.jsx)(fw,{size:"small",onClick:e=>{e.stopPropagation(),g(!1),n(m.trim())},title:p("submit"),children:(0,Dh.jsx)(eE.A,{fontSize:"inherit"})}):t?(0,Dh.jsx)(iE,{text:t,title:p("copy")}):(0,Dh.jsx)(fw,{size:"small",onClick:async()=>{try{const e=await navigator.clipboard.readText();n(e.trim())}catch(e){}},title:p("paste"),children:(0,Dh.jsx)(tE.A,{fontSize:"inherit"})})})}})})]}),q.map(e=>(0,Dh.jsx)(oE,{text:t,fromLang:w,toLang:W,simpleStyle:l,apiSlug:e,transApis:s},e)),V&&L.has(C)&&(0,Dh.jsx)(gE,{text:t,enDict:C}),V&&j.has(R)&&(0,Dh.jsx)(yE,{text:t,enSug:R}),(K=t,/^[\u4e00-\u9fa5]$/.test(K||"")&&(0,Dh.jsx)(TE,{text:t}))]});var K}const CE="data:image/x-icon;base64,AAABAAMAMDAAAAEAIACoJQAANgAAACAgAAABACAAqBAAAN4lAAAQEAAAAQAgAGgEAACGNgAAKAAAADAAAABgAAAAAQAgAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAADunB8Q7pwgd+6cINTunCD67pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD67pwg1O6cIHfunR8QAAAAAO6cHxDunCCW7pwg+e6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIPnunCCW7pwfEO6cIHfunCD47pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD47pwgd+6cINPunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg0+6cIPnunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg+e6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6bHv/umx3/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unB//7psd/+6bHf/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pse/+6bHf/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7p0i//GsRP/ytlv/8a9K/+6eJf/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cH//vnyj/8bFP//K2Wv/wqj7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCH/8Kk9//KzVf/xrUb/7p4k/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx7/8rVY//3y4v/++/f//fbq//S+bP/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/2yIT//vjw//779//87db/8axF/+6bHv/unCD/7pwg/+6cIP/unCD/7pwg/+6bHv/xsEz//O7Z//769P/99en/9MBx/+6bHv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9smG//////////////////jVn//unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6fJv/64r7//////////////v3/9L9v/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/1xHn/////////////////+Nmq/+6dIf/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suK//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/++fKP/65MH///////////////7/9MF0/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dut/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/++fJ//65MH//////////////v7/9MFz/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwf/++gKf/75cX//////////////v7/9MFz/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pod//GuSP/98+T///////////////7/9MF0/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx7/8a1G//rkw////////////////////vz/9L5t/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwf/+6cH//ytlz//O3W///////////////////////98eH/8axE/+6bHv/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/umx//7p4k//TCdv/99ej///////////////////////3x4P/zu2b/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jWpP/unCD/7pwg/+6bHv/voSz/98+S//769P//////////////////////++jK//KxUP/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpf/unB//7psd//CnOf/5267///37///////////////////9+//53K//8Kg7/+6bHf/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////vmx//wpjj/8rFQ//vmx////////////////////////vrz//fOkf/voSz/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ///////////////////9+v/87df//fXo///////////////////////99Ob/9MFz/+6dI//umx//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////////////////////////////////////zr0v/ytVj/7psf/+6cH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ////////////////////////////////////////////++fJ//GrQv/umx3/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ////////////////////////////////////////////9cN3/+6aG//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ////////////////////////////////////////////+Nai/+6eJf/unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ/////////////////////////////////////////////vv2//bKiP/uniT/7pwf/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ///////////////////+/f/+9+3///z5//////////////////769f/2yYX/7p0j/+6cH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////zr0v/xsE7/9siE//748P/////////////////++vT/9siD/+6dI//unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jYp//umx7/7pwh//XFfP/++fH//////////////////vrz//XHgP/unSL/7pwf/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jWpP/unCD/7pwf/+6dIv/1xn3//vny//////////////////758v/1xn7/7p0i/+6cH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cH//unSL/9cZ///758//////////////////++fH/9cV7/+6dIv/unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unB//7p0j//XHgf/++vP//////////////////vjw//XDef/unSH/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwf/+6dI//1yIP//vr0//////////////////747//0wXP/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cH//uniP/9smF//769f/////////////////98d//8KpB/+6bHv/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/1xX7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unB//7p4k//fOkf///vz//////////////fz/9L1q/+6aHP/unB//7psf/+6bH//umx//7pse/+6aG//2yof/////////////////+d60/+6dIv/umx7/7psf/+6bH//umx//7pwf/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pse//CnOP/879r//////////////v7/9MFz/+6aHP/vnyf/8KY2//CmN//wpjf/8KY3//KxT//76Mv//////////////////fPk//O6ZP/wpjj/8KY3//CmN//wpjb/76Er/+6cH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwf/++gKP/65MP//////////////v7/9MBy/++kMf/5267//PDe//3x3//88d///fHf//737v////7///////////////////////768//98uH//PHf//3x3//88d//+uTB//GuSP/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suK//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/++fKP/65MH///////////////7/9MBw//O4X////fr///////////////////////////////////////////////////////////////////////////////////////bJhv/umx3/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9smF//////////////////jUnv/unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6fJv/64r3//////////////v3/9L1q//O6Y////fv///////////////////////////////////////////////////////////////////////////////////////bLif/umx3/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx7/8rNU//zv3P/++vP//fTl//O7Z//umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cH//1xn7//fbr//768//76tD/8KpA//CoO//75sj//vjw//748P/++PD//vjw//748P/++PD//vjw//748P/++PD//vjw//748P/++PD//vjw//748P/++PD//O7a//KzVf/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwh//CpPv/ys1P/8axD/+6dI//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unib/8a5I//KyUv/wpzn/7pwg/+6cIP/wpTT/8a9M//GwTf/xsE3/8bBN//GwTf/xsE3/8bBN//GwTf/xsE3/8bBN//GwTf/xsE3/8bBN//GwTf/xsE3/8Kg7/+6cIf/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6bHv/umx3/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pse/+6bHf/umx7/7pwg/+6cIP/umx//7psd/+6bHf/umx3/7psd/+6bHf/umx3/7psd/+6bHf/umx3/7psd/+6bHf/umx3/7psd/+6bHf/umx3/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIPnunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg+e6cINTunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg1O6cIHfunCD47pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD47pwgd+6cHxDunCCW7pwg+e6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIPnunCCW7pwfEAAAAADunB8Q7pwgd+6cINTunCD67pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD67pwg1O6cIHfunB8QAAAAAOAAAAAABwAAgAAAAAABAACAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAQAAgAAAAAABAADgAAAAAAcAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAADunB8S7pwgie6cIOvunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIOvunCCJ7pwgEu6cIInunCD57pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIPnunCCJ7pwg6u6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIOrunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cH//uniX/7p8m/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cH//uniT/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6dIf/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx7/8KpA//netf/64bz/8a5J/+6bHv/unCD/7pwg/+6cIP/umx//76Qz//jZqf/65MP/87Zc/+6bHv/unCD/7pwg/+6cIP/uniX/9syL//vlxP/0wnb/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/zvGn///78///////1xHr/7poc/+6cIP/unCD/7pwg/+6bHf/yslP//vr0///////30pr/7pse/+6cIP/unCD/7psf/++kM//87tr///////rjwP/unyb/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S+bP///v3///////XFff/umhz/7pwg/+6cIP/unCD/7psd//KzVP/++vX///////jUnf/umx7/7pwg/+6cIP/umx//8KU1//zv3P//////+uTC/++fJ//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f//////9cV9/+6aHP/unCD/7pwg/+6cIP/umhv/87de//78+P//////+NSd/+6bHv/unCD/7pwg/+6bH//wpTX//O/c///////65ML/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vWz///79///////1xX3/7poc/+6cIP/unCD/7psd//CmN//637j////////////30pn/7pse/+6cIP/unCD/7psf//ClNf/879z///////rkwv/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S9bP///v3///////XFff/umhz/7pwg/+6bHv/xr0r/++bG/////////////vft//O5Yf/umx3/7pwg/+6cIP/umx//8KU1//zv3P//////+uTC/++fJ//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f//////9cV8/+6aHP/unCD/87lh//zv3P////////////3x3//zvGf/7p0h/+6cIP/unCD/7pwg/+6bH//wpTX//O/c///////65ML/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vWz///79///////2yIP/7p0i//XFfP/+9uz////////////758n/8bBN/+6bHv/unCD/7pwg/+6cIP/unCD/7psf//ClNf/879z///////rkwv/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S9bP///v3///////zt1v/53rT//vv1/////////fv/+dut//CnOf/umx3/7pwg/+6cIP/unCD/7pwg/+6cIP/umx//8KU1//zv3P//////+uTC/++fJ//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f///////////////////////vr1//bOkP/voSv/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6bH//wpTX//O/c///////65ML/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vWz///79///////////////////////526//7p0i/+6bH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7psf//ClNf/879z///////rkwv/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S9bP///v3///////////////////////voy//wpzj/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx//8KU1//zv3P//////+uTC/++fJ//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f///////vv3//768/////////////rguv/wpjb/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6bH//wpTX//O/c///////65ML/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vWz///79///////41J7/87hf//zv2/////////////rft//wpTX/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7psf//ClNf/879z///////rkwv/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S9bP///v3///////XFfP/tmRn/8rNV//zw3P////////////netf/wpTT/7pse/+6cIP/unCD/7pwg/+6cIP/umx//8KU1//zv3P//////+uTC/++fJ//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f//////9cV9/+6aHP/umx7/8rRW//zw3v/////////+//nds//vpDP/7pse/+6cIP/unCD/7pwg/+6bH//wpTX//O/c///////65ML/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vWz///79///////1xX3/7poc/+6cIP/umx7/8rVY//3x3//////////+//ncsP/vozD/7pwf/+6cIP/unCD/7psf//ClNf/879z///////rkwv/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S9bP///v3///////XFff/umhz/7pwg/+6cIP/umx7/8rVZ//3y4v////////79//XEev/umx3/7psf/+6bHv/umx3/76Qz//zw3P//////+uTC/+6eJf/umx7/7pse/+6cH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f//////9cV9/+6aHP/unCD/7pwg/+6cIP/umx3/9cV7///+/f//////99Ob/+6cIf/wpTT/8Kc4//CmN//zu2b//vjv///////88N7/8rJT//CmN//wpzj/76Mx/+6cIf/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vmz///79///////1xX3/7poc/+6cIP/unCD/7pwg/+6bHf/ytFX//vv1///////30pv/87tn//zv2//98uH//fLh//758f///////////////v/+9+3//fHh//3y4f/76tD/8bBM/+6bHv/unCD/7pwg/+6cIP/unCD/7poc//O8af///vz///////XEef/umhz/7pwg/+6cIP/unCD/7psd//KyUv/++vP///////fRlv/3zpH////////////////////////////////////////////////////////+/P/0vWv/7poc/+6cIP/unCD/7pwg/+6cIP/umx7/8Kk+//ncsP/537b/8a1H/+6bHv/unCD/7pwg/+6cIP/unB//76Qx//jWo//64r7/8rRW//KyUv/537f/+uO///riv//64r//+uK///riv//64r//+uK///riv//647//+dqs//CpPv/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unB//7p4k/+6eJP/unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unB//7p0j/+6eJf/unB//7pwf/+6eJP/unib/7p4l/+6eJf/uniX/7p4l/+6eJf/uniX/7p4l/+6eJv/unSP/7pwf/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg6u6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIOrunCCJ7pwg+e6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD57pwgie6cIBLunCCJ7pwg6+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg6+6cIInunB8SgAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAEoAAAAEAAAACAAAAABACAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAA7pwgnu6cIPjunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD47pwgnu6cIPfunB//7psd/+6cH//unCD/7pwg/+6bHv/umx3/7pwg/+6cIP/umx7/7psd/+6cIP/unCD/7pwg/+6cIPfunB//76Mv//S9a//vpDH/7pwf/+6cH//xsE7/87dc/+6cIf/umx//8axD//O5Yf/unSP/7pwg/+6cIP/unCD/7psd//KxT//99en/8rRX/+6bHf/umx7/+NWh//vmxv/vnyf/7poc//bLiv/87NX/76Iu/+6cH//unCD/7pwg/+6bHf/yslH//fbr//K1Wf/umhr/76Iu//rkw//75sb/7p8n/+6aHP/2zIz//O3X/++jL//unB//7pwg/+6cIP/umx3/8rJR//326//ytFX/8Kc4//netv/+9+3/9cN4/+6cIP/umh3/9syM//zt1//voy//7pwf/+6cIP/unCD/7psd//KyUf/++O//99Oc//voy//98eD/87tl/+6cIf/unCD/7psd//bMjP/87df/76Mv/+6cH//unCD/7pwg/+6bHf/ysVD//vrz///////98uL/8bBO/+6bHf/unCD/7pwg/+6aHf/2zIz//O3X/++jL//unB//7pwg/+6cIP/umx3/8rFQ//768//++/b//fXo//O3Xf/umx7/7pwg/+6cIP/umh3/9syM//zt1//voy//7pwf/+6cIP/unCD/7psd//KyUf/+9+3/9cV9//rguf/98+P/8rZb/+6bHv/unCD/7pod//bMjP/87df/76Mv/+6cH//unCD/7pwg/+6bHf/yslH//fbr//K0Vv/vpTT/+uK+//3y4f/ytFf/7pse/+6aG//2y4v//O3X/++iLf/umx7/7pwg/+6cIP/umx3/8rJR//326//ytVn/7pka//CnOf/869L/+uG7/++kM//wpjj/+NWh//3y4f/xr0z/8KU1/+6dI//unCD/7psd//KxT//99en/8rRX/+6bHf/umx3/+Nai//vnyv/52ar//fTm//779f///v3//fXp//zs0//xrET/7psd/+6cH//voi7/87xo/++jMf/unB//7pwf//GvTP/ytlv/8rZZ//XEev/1w3j/9cN3//XEef/0v3D/76Iu/+6cH//unCD37pwf/+6bHf/unB//7pwg/+6cIP/umx7/7psd/+6bHf/umhz/7poc/+6aHP/umhz/7poc/+6cH//unCD37pwgnu6cIPjunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD47pwgngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",IE=e=>{let{size:t=16,className:n="",style:r={},onClick:i}=e;return(0,Dh.jsx)("img",{src:CE,alt:"Logo",className:n,onClick:i,style:h({width:"".concat(t,"px"),height:"".concat(t,"px"),objectFit:"contain",display:"block"},r)})};function PE(e){let{setShowBox:t,simpleStyle:n,setSimpleStyle:r,hideClickAway:i,setHideClickAway:o,followSelection:a,setFollowSelection:s}=e;const l=oA(),c=nS(),{darkMode:u,toggleDarkMode:d}=Xx(),p=l.palette.text.secondary,f=(0,Oh.useCallback)(()=>{_r("open_separate_window")},[]),g=e=>e.currentTarget.blur(),m={borderRadius:"6px",padding:"5px",minWidth:"30px",minHeight:"30px",transition:"all 0.2s ease",backgroundColor:"transparent","& svg":{color:p}};return(0,Dh.jsx)(iA,{onMouseUp:e=>e.stopPropagation(),onTouchEnd:e=>e.stopPropagation(),sx:{backgroundColor:l.palette.background.default,padding:"4px 8px 4px 12px",height:"36px",display:"flex",alignItems:"center",minHeight:"auto"},children:(0,Dh.jsxs)(FA,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,sx:{width:"100%",height:"100%"},children:[(0,Dh.jsxs)(FA,{direction:"row",alignItems:"center",spacing:1,children:[(0,Dh.jsx)(iA,{sx:{width:18,height:18,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",backgroundColor:l.palette.background.paper,border:"1px solid ".concat(l.palette.divider),transition:"all 0.2s ease","&:hover":{boxShadow:l.shadows[2],transform:"translateY(-1px)",backgroundColor:l.palette.action.hover}},children:(0,Dh.jsx)(IE,{size:16})}),!n&&(0,Dh.jsx)(ex,{variant:"caption",sx:{fontWeight:500,fontSize:"12px",color:l.palette.text.secondary},children:"".concat("KISS Translator"," v").concat("2.0.22")})]}),(0,Dh.jsxs)(FA,{direction:"row",alignItems:"center",spacing:.5,children:[_n&&(0,Dh.jsx)(fw,{size:"small",title:c("open_separate_window"),onClick:f,onMouseLeave:g,sx:h(h({},m),{},{"&:hover":{backgroundColor:l.palette.primary.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.primary.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.primary.light+"40"}}),children:(0,Dh.jsx)(VA.A,{sx:{width:16,height:16}})}),(0,Dh.jsx)(fw,{size:"small",title:c("btn_tip_click_away"),onMouseLeave:g,onClick:()=>o(e=>!e),sx:h(h({},m),{},{"&:hover":{backgroundColor:l.palette.success.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.success.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.success.light+"40"}}),children:i?(0,Dh.jsx)(KA.A,{sx:{width:16,height:16,color:l.palette.success.main}}):(0,Dh.jsx)(qA.A,{sx:{width:16,height:16}})}),(0,Dh.jsx)(fw,{size:"small",title:c("btn_tip_follow_selection"),onMouseLeave:g,onClick:()=>s(e=>!e),sx:h(h({},m),{},{"&:hover":{backgroundColor:l.palette.warning.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.warning.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.warning.light+"40"}}),children:a?(0,Dh.jsx)(GA.A,{sx:{width:16,height:16,color:l.palette.warning.main}}):(0,Dh.jsx)(HA.A,{sx:{width:16,height:16}})}),(0,Dh.jsx)(fw,{size:"small",title:c("btn_tip_simple_style"),onMouseLeave:g,onClick:()=>r(e=>!e),sx:h(h({},m),{},{"&:hover":{backgroundColor:l.palette.info.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.info.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.info.light+"40"}}),children:n?(0,Dh.jsx)(UA.A,{sx:{width:16,height:16,color:l.palette.info.main}}):(0,Dh.jsx)(WA.A,{sx:{width:16,height:16}})}),(0,Dh.jsx)(fw,{size:"small",title:c("btn_tip_dark_mode"),onMouseLeave:g,onClick:d,sx:h(h({},m),{},{"&:hover":{backgroundColor:l.palette.warning.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.warning.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.warning.light+"40"}}),children:"dark"===u?(0,Dh.jsx)(XA.A,{sx:{width:16,height:16,color:l.palette.warning.main}}):"auto"===u?(0,Dh.jsx)(JA.A,{sx:{width:16,height:16,color:l.palette.info.main}}):(0,Dh.jsx)(YA.A,{sx:{width:16,height:16}})}),(0,Dh.jsx)(fw,{size:"small",title:c("close"),onMouseLeave:g,onClick:()=>t(!1),sx:h(h({},m),{},{"&:hover":{backgroundColor:l.palette.error.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.error.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.error.light+"40"}}),children:(0,Dh.jsx)($A.A,{sx:{width:16,height:16}})})]})]})})}function LE(e){let{simpleStyle:t,text:n,setText:r,apiSlugs:i,fromLang:o,toLang:a,toLang2:s,transApis:l,langDetector:c,enDict:u,enSug:d}=e;const h=oA(),p="dark"===h.palette.mode,f="dark"===h.palette.mode?"#1f1f23":h.palette.background.paper,g="dark"===h.palette.mode?dA(h.palette.text.primary,.28):dA(h.palette.text.primary,.24);return(0,Dh.jsx)(iA,{sx:{p:t?1:2,backgroundColor:h.palette.background.paper,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:f},"&::-webkit-scrollbar-thumb":{backgroundColor:g,borderRadius:8,border:"2px solid ".concat(h.palette.background.paper)},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:dA(h.palette.text.primary,.36)},scrollbarWidth:"thin",scrollbarColor:"".concat(g," ").concat(f),color:p?"rgba(255,255,255,0.82)":h.palette.text.primary,lineHeight:1.55},children:(0,Dh.jsx)(EE,{text:n,setText:r,apiSlugs:i,fromLang:o,toLang:a,toLang2:s,transApis:l,simpleStyle:t,langDetector:c,enDict:u,enSug:d})})}function RE(e){const[t,n]=(0,Oh.useState)(!1),r=e.simpleStyle,i=e.setSimpleStyle,o=e.hideClickAway,a=e.setHideClickAway,s=e.followSelection,l=e.setFollowSelection;let c=e.tranboxSetting.apiSlugs;return e.tranboxSetting.singleWordNoTrans&&Wn(e.text)&&(c=[]),(0,Dh.jsx)(yx,{context:"tranbox",children:(0,Dh.jsx)(Jx,{styles:e.extStyles,children:e.showBox&&(0,Dh.jsx)(gA,{position:e.boxPosition,size:e.boxSize,setSize:e.setBoxSize,setPosition:e.setBoxPosition,autoHeight:e.tranboxSetting.autoHeight,header:(0,Dh.jsx)(PE,{setShowBox:e.setShowBox,simpleStyle:r,setSimpleStyle:i,hideClickAway:o,setHideClickAway:a,followSelection:s,setFollowSelection:l,mouseHover:t}),onClick:e=>e.stopPropagation(),onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:(0,Dh.jsx)(LE,{simpleStyle:r,text:e.text,setText:e.setText,apiSlugs:c,fromLang:e.tranboxSetting.fromLang,toLang:e.tranboxSetting.toLang,toLang2:e.tranboxSetting.toLang2,transApis:e.transApis,langDetector:e.langDetector,enDict:e.tranboxSetting.enDict,enSug:e.tranboxSetting.enSug})})})})}function NE(e){const{simpleStyle:t=!1,hideClickAway:n=!1,followSelection:r=!1,boxOffsetX:i=0,boxOffsetY:o=10}=e,a=ld||t?400:Ln(window.innerWidth,400,800),s=ld||t?200:Ln(window.innerHeight,200,600),[l,c]=(0,Oh.useState)({w:a,h:s}),[u,d]=(0,Oh.useState)({x:(window.innerWidth-a)/2,y:(window.innerHeight-s)/2}),[p,f]=(0,Oh.useState)(t),[g,m]=(0,Oh.useState)(n),[v,y]=(0,Oh.useState)(r);return(0,Oh.useEffect)(()=>{(async()=>{try{const{w:e,h:t,x:n,y:r}=await er(Jt)||{};void 0!==e&&void 0!==t&&c({w:Math.min(e,window.innerWidth),h:Math.min(t,window.innerHeight)}),void 0!==n&&void 0!==r&&d({x:Ln(n,0,window.innerWidth-e),y:Ln(r,0,window.innerHeight-50)})}catch(e){}})()},[]),(0,Oh.useEffect)(()=>{!fr&&l.w>0&&l.h>0&&ur(h(h({},l),u))},[l,u]),{boxSize:l,setBoxSize:c,boxPosition:u,setBoxPosition:d,simpleStyle:p,setSimpleStyle:f,hideClickAway:g,setHideClickAway:m,followSelection:v,setFollowSelection:y,boxOffsetX:i,boxOffsetY:o}}function OE(e){let{tranboxSetting:t,followSelection:n,boxOffsetX:r,boxOffsetY:i,boxSize:o,setBoxPosition:a,hideClickAway:s}=e;const{hideTranBtn:l=!1,triggerMode:c}=t,[u,d]=(0,Oh.useState)(!1),[h,p]=(0,Oh.useState)(!1),[f,g]=(0,Oh.useState)(""),[m,v]=(0,Oh.useState)(""),[y,b]=(0,Oh.useState)({x:0,y:0});!function(e,t){(0,Oh.useEffect)(()=>{if(!e)return;const n=e=>{2===e.button&&t(!1)},r=()=>{const e=window.getSelection();e&&!e.isCollapsed||t(!1)};return window.addEventListener("mousedown",n,!0),document.addEventListener("selectionchange",r),()=>{window.removeEventListener("mousedown",n,!0),document.removeEventListener("selectionchange",r)}},[e,t])}(h,p);const w=(0,Oh.useCallback)(e=>{p(!1),v(e||f),d(!0)},[f]),x=(0,Oh.useCallback)(()=>{var e,t;p(!1);const s=window.getSelection(),l=(null==s||null===(e=s.toString())||void 0===e?void 0:e.trim())||"";if(!l)return void d(e=>!e);const c=null==s||null===(t=s.getRangeAt(0))||void 0===t?void 0:t.getBoundingClientRect();if(c&&n){const e=(c.left+c.right)/2+r,t=c.bottom+i;a({x:Ln(e,0,window.innerWidth-o.w),y:Ln(t,0,window.innerHeight-50)})}g(l),v(l),d(!0)},[n,r,i,a,o]),A=(0,Oh.useMemo)(()=>ld?"onTouchEnd":c===Tt?"onMouseOver":"onMouseUp",[c]);return(0,Oh.useEffect)(()=>{const e=ld?"touchend":"mouseup";async function t(e){var t,s;if(2===e.button)return;await Nn(200);const u=window.getSelection(),d=(null==u||null===(t=u.toString())||void 0===t?void 0:t.trim())||"";if(g(d),!d)return void p(!1);const h=null==u||null===(s=u.getRangeAt(0))||void 0===s?void 0:s.getBoundingClientRect();if(h&&n){const e=(h.left+h.right)/2+r,t=h.bottom+i;a({x:Ln(e,0,window.innerWidth-o.w),y:Ln(t,0,window.innerHeight-50)})}if(c!==Et)if(l)p(!1);else{const e=function(){const e=window.getSelection();if(!e||e.isCollapsed)return null;try{const t=e.getRangeAt(0).getClientRects();if(0===t.length)return null;const n=t[t.length-1];return{x:n.right+window.scrollX,y:n.bottom+window.scrollY}}catch(e){return null}}();e?(p(!0),b(e)):p(!1)}else w(d)}return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}},[l,c,n,r,i,w,o,a]),(0,Oh.useEffect)(()=>{if(s){const e=()=>{d(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}}},[s]),{showBox:u,setShowBox:d,showBtn:h,setShowBtn:p,selectedText:f,setSelText:g,text:m,setText:v,position:y,setPosition:b,handleOpenTranbox:w,handleToggleTranbox:x,btnEvent:A}}function jE(e){let{contextMenuType:t,tranboxSetting:n,transApis:r,uiLang:i,langDetector:o}=e;const{boxSize:a,setBoxSize:s,boxPosition:l,setBoxPosition:c,simpleStyle:u,setSimpleStyle:d,hideClickAway:h,setHideClickAway:p,followSelection:f,setFollowSelection:g,boxOffsetX:m,boxOffsetY:v}=NE(n),{showBox:y,setShowBox:b,showBtn:w,text:x,setText:A,position:S,handleOpenTranbox:k,handleToggleTranbox:_,btnEvent:T}=OE({tranboxSetting:n,followSelection:f,boxOffsetX:m,boxOffsetY:v,boxSize:a,setBoxPosition:c,hideClickAway:h});return function(e){let{showBox:t,setShowBox:n,handleToggleTranbox:r,contextMenuType:i,uiLang:o}=e;const a=tS(o),s=(0,Oh.useCallback)(()=>{t?n(!1):r()},[t,r,n]);(0,Oh.useEffect)(()=>{const e=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.action)===pn&&s()};return document.addEventListener(wn,e),()=>{document.removeEventListener(wn,e)}},[s]),(0,Oh.useEffect)(()=>{try{var e,t;const n=[];return 0!==i&&n.push(null===(e=(t=GM).registerMenuCommand)||void 0===e?void 0:e.call(t,a("translate_selected_text"),e=>{r()},"S")),()=>{n.forEach(e=>{var t,n;null===(t=(n=GM).unregisterMenuCommand)||void 0===t||t.call(n,e)})}}catch(e){pt("registerMenuCommand",e)}},[r,i,a])}({showBox:y,setShowBox:b,handleToggleTranbox:_,contextMenuType:t,uiLang:i}),(0,Dh.jsxs)(Dh.Fragment,{children:[(0,Dh.jsx)(RE,{showBox:y,text:x,setText:A,boxSize:a,setBoxSize:s,boxPosition:l,setBoxPosition:c,tranboxSetting:n,transApis:r,setShowBox:b,simpleStyle:u,setSimpleStyle:d,hideClickAway:h,setHideClickAway:p,followSelection:f,setFollowSelection:g,langDetector:o}),w&&(0,Dh.jsx)(Zy,{position:S,btnOffsetX:n.btnOffsetX,btnOffsetY:n.btnOffsetY,btnEvent:T,onTrigger:e=>{e.stopPropagation(),k()}})]})}var zE=Ir("container"),ME=Ir("reactRoot"),DE=Ir("shadowContainer"),BE=Ir("props");class FE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,zE,{writable:!0,value:null}),Object.defineProperty(this,ME,{writable:!0,value:null}),Object.defineProperty(this,DE,{writable:!0,value:null}),Object.defineProperty(this,BE,{writable:!0,value:{}}),Er(this,BE)[BE]=e;const{tranboxSetting:t=Ct}=Er(this,BE)[BE];null!=t&&t.transOpen&&this.enable()}isEnabled(){return!!Er(this,zE)[zE]&&document.body.contains(Er(this,zE)[zE])}enable(){if(!this.isEnabled()){Er(this,zE)[zE]=document.createElement("div"),Er(this,zE)[zE].id=r.boxID,Er(this,zE)[zE].className="notranslate",document.body.appendChild(Er(this,zE)[zE]),Er(this,DE)[DE]=Er(this,zE)[zE].attachShadow({mode:"open"});const e=document.createElement("div");e.className="".concat(r.boxID,"_wrapper notranslate"),Er(this,DE)[DE].appendChild(e);const t=(0,Mh.A)({key:r.boxID,prepend:!0,container:Er(this,DE)[DE]});Er(this,ME)[ME]=jh.createRoot(e),Er(this,ME)[ME].render((0,Dh.jsx)(Oh.StrictMode,{children:(0,Dh.jsx)(zh.C,{value:t,children:(0,Dh.jsx)(jE,h({},Er(this,BE)[BE]))})}))}}disable(){this.isEnabled()&&Er(this,ME)[ME]&&(Er(this,ME)[ME].unmount(),Er(this,zE)[zE].remove(),Er(this,zE)[zE]=null,Er(this,ME)[ME]=null,Er(this,DE)[DE]=null)}toggle(){this.isEnabled()?this.disable():this.enable()}update(e){var t;(Er(this,BE)[BE]=h(h({},Er(this,BE)[BE]),e),this.isEnabled())&&(null!==(t=Er(this,BE)[BE].tranboxSetting)&&void 0!==t&&t.transOpen?this.enable():this.disable())}}var WE=Ir("hostElement"),UE=Ir("reactRoot"),VE=Ir("isVisible"),HE=Ir("isProcessing"),GE=Ir("mount");class qE{constructor(e){let{id:t,className:n="",reactComponent:r,props:i={},rootElement:o=document.body}=e;if(Object.defineProperty(this,GE,{value:KE}),Object.defineProperty(this,WE,{writable:!0,value:null}),Object.defineProperty(this,UE,{writable:!0,value:null}),Object.defineProperty(this,VE,{writable:!0,value:!1}),Object.defineProperty(this,HE,{writable:!0,value:!1}),!t||!r)throw new Error("ID and a React Component must be provided.");this._id=t,this._className=n,this._ReactComponent=r,this._props=i,this._rootElement=o}get isVisible(){return Er(this,VE)[VE]}show(e){if(!Er(this,VE)[VE]&&!Er(this,HE)[HE]){if(!Er(this,WE)[WE]){Er(this,HE)[HE]=!0;try{Er(this,GE)[GE](e||this._props)}catch(e){return ht.warn('Failed to mount component with id "'.concat(this._id,'":'),e),void(Er(this,HE)[HE]=!1)}finally{Er(this,HE)[HE]=!1}}Er(this,WE)[WE].style.display="",Er(this,VE)[VE]=!0}}hide(){Er(this,VE)[VE]&&Er(this,WE)[WE]&&(Er(this,WE)[WE].style.display="none",Er(this,VE)[VE]=!1)}destroy(){Er(this,WE)[WE]&&(Er(this,HE)[HE]=!0,Er(this,UE)[UE]&&Er(this,UE)[UE].unmount(),Er(this,WE)[WE].remove(),Er(this,WE)[WE]=null,Er(this,UE)[UE]=null,Er(this,VE)[VE]=!1,Er(this,HE)[HE]=!1,ht.info('Component with id "'.concat(this._id,'" has been destroyed.')))}toggle(e){Er(this,VE)[VE]?this.hide():this.show(e||this._props)}}function KE(e){const t=document.createElement("div");t.id=this._id,this._className&&(t.className=this._className),this._rootElement.appendChild(t),Er(this,WE)[WE]=t;const n=t.attachShadow({mode:"open"}),r=document.createElement("div");r.className="".concat(this._id,"_wrapper notranslate"),n.appendChild(r);const i=(0,Mh.A)({key:this._id,prepend:!0,container:n}),o=h(h({},e),{},{onClose:this.hide.bind(this)}),a=this._ReactComponent;Er(this,UE)[UE]=jh.createRoot(r),Er(this,UE)[UE].render((0,Dh.jsx)(Oh.StrictMode,{children:(0,Dh.jsx)(zh.C,{value:i,children:(0,Dh.jsx)(a,h({},o))})}))}const $E=["children","usePaper"];function YE(e){let{children:t,usePaper:n}=e,r=mr(e,$E);return n?(0,Dh.jsx)(kb,h(h({},r),{},{elevation:4,children:t})):(0,Dh.jsx)("div",h(h({},r),{},{children:t}))}function XE(e){let{windowSize:{w:t,h:n},width:r,height:i,left:o,top:a,show:s=!0,snapEdge:l,onStart:c,onMove:u,handler:d,children:p,usePaper:f}=e;const[g,m]=(0,Oh.useState)(!1),[v,y]=(0,Oh.useState)(null),b=(0,Oh.useRef)(null),w=(0,Oh.useRef)({x:o/t,y:a/n}),[x,A]=(0,Oh.useState)({x:o/t,y:a/n}),S=(0,Oh.useMemo)(()=>On(cr,500),[]),k=(0,Oh.useCallback)((e,t)=>{b.current&&(b.current.style.transform="translate(".concat(e,"px, ").concat(t,"px)"))},[]);(0,Oh.useEffect)(()=>{w.current=x},[x]),(0,Oh.useEffect)(()=>{const e=()=>{if(!b.current)return;const{x:e,y:t}=w.current,n=e*window.innerWidth,r=t*window.innerHeight;k(n,r)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[k]),(0,Oh.useEffect)(()=>{if(!l||v)return;const e={x:x.x*t,y:x.y*n},o=(e=>{let{x:t,y:n,width:r,height:i,windowWidth:o,windowHeight:a,hover:s}=e;const l=o-t-r,c=a-n-i;switch(Math.min(t,n,l,c)){case l:t=s?o-r:o-r/2;break;case t:t=s?0:-r/2;break;case c:n=s?a-i:a-i/2;break;default:n=s?0:-i/2}return{x:t,y:n}})({x:e.x,y:e.y,width:r,height:i,windowWidth:t,windowHeight:n,hover:g});k(o.x,o.y);const a={x:o.x/t,y:o.y/n};A(a),S(o)},[v,g,r,i,t,n,l,S,x.x,x.y,k]);const _=e=>{var r;!ld&&e.target.setPointerCapture(e.pointerId),c&&c();const i=null===(r=b.current)||void 0===r?void 0:r.getBoundingClientRect(),o=i?i.left:x.x*t,a=i?i.top:x.y*n,{clientX:s,clientY:l}=ld?e.targetTouches[0]:e;y({x:o,y:a,clientX:s,clientY:l})},T=e=>{if(u&&u(),!v)return;const{clientX:o,clientY:a}=ld?e.targetTouches[0]:e,s=o-v.clientX,l=a-v.clientY;let c=v.x+s,d=v.y+l;c=Ln(c,-r/2,t-r/2),d=Ln(d,0,n-i/2),k(c,d);const h={x:c/t,y:d/n};A(h),w.current=h},E=e=>{e.stopPropagation(),y(null)},C=(0,Oh.useMemo)(()=>l?g||v?1:.2:v?.8:1,[v,l,g]),I=ld?{onTouchStart:_,onTouchMove:T,onTouchEnd:E}:{onPointerDown:_,onPointerMove:T,onPointerUp:E};return(0,Dh.jsx)("div",{ref:b,style:{opacity:C,position:"fixed",top:0,left:0,zIndex:2147483647,display:s?"block":"none",willChange:"transform"},onMouseEnter:e=>{e.stopPropagation(),m(!0)},onMouseLeave:e=>{e.stopPropagation(),m(!1)},onClick:e=>{e.stopPropagation()},children:(0,Dh.jsxs)(YE,{usePaper:f,children:[(0,Dh.jsx)("div",h(h({style:{touchAction:"none"}},I),{},{children:d})),(0,Dh.jsx)("div",{children:p})]})})}var JE=i(8902),QE=i(9079);function ZE(e){let{onClose:t,toggleTab:n,openSeparateWindow:r}=e;const i=nS();return(0,Dh.jsxs)(FA,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,Dh.jsxs)(FA,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[(0,Dh.jsx)(fw,{onClick:()=>{window.open("https://github.com/fishjar/kiss-translator","_blank")},children:(0,Dh.jsx)(JE.A,{})}),(0,Dh.jsx)(ex,{component:"div",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.22")})]}),t?(0,Dh.jsx)(fw,{onClick:()=>{t()},children:(0,Dh.jsx)($A.A,{})}):(0,Dh.jsxs)(FA,{direction:"row",alignItems:"center",title:i("toggle_transbox"),children:[(0,Dh.jsx)(fw,{onClick:n,children:(0,Dh.jsx)(QE.A,{})}),(0,Dh.jsx)(fw,{onClick:r,title:i("open_separate_window"),children:(0,Dh.jsx)(VA.A,{})})]})]})}const eC=function(){const[e,t]=(0,Oh.useState)({w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}),n=Cw(()=>{t({w:document.documentElement.clientWidth,h:document.documentElement.clientHeight})},200);return(0,Oh.useEffect)(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[n]),e};function tC(e){return(0,wb.Ay)("MuiFormControlLabel",e)}const nC=(0,bb.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),rC=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],iC=(0,ib.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(nC.label)]:t.label},t.root,t["labelPlacement".concat((0,vb.A)(n.labelPlacement))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(nC.disabled)]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(nC.label)]:{["&.".concat(nC.disabled)]:{color:(t.vars||t).palette.text.disabled}}})}),oC=(0,ib.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(nC.error)]:{color:(t.vars||t).palette.error.main}}}),aC=Oh.forwardRef(function(e,t){var n,r;const i=(0,ob.b)({props:e,name:"MuiFormControlLabel"}),{className:o,componentsProps:a={},control:s,disabled:l,disableTypography:c,label:u,labelPlacement:d="end",required:h,slotProps:p={}}=i,f=(0,gr.A)(i,rC),g=fS(),m=null!=(n=null!=l?l:s.props.disabled)?n:null==g?void 0:g.disabled,v=null!=h?h:s.props.required,y={disabled:m,required:v};["checked","name","onChange","value","inputRef"].forEach(e=>{void 0===s.props[e]&&void 0!==i[e]&&(y[e]=i[e])});const b=hS({props:i,muiFormControl:g,states:["error"]}),w=(0,eb.A)({},i,{disabled:m,labelPlacement:d,required:v,error:b.error}),x=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,a={root:["root",n&&"disabled","labelPlacement".concat((0,vb.A)(r)),i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return(0,nb.A)(a,tC,t)})(w),A=null!=(r=p.typography)?r:a.typography;let S=u;return null==S||S.type===ex||c||(S=(0,Dh.jsx)(ex,(0,eb.A)({component:"span"},A,{className:(0,tb.A)(x.label,null==A?void 0:A.className),children:S}))),(0,Dh.jsxs)(iC,(0,eb.A)({className:(0,tb.A)(x.root,o),ownerState:w,ref:t},f,{children:[Oh.cloneElement(s,y),v?(0,Dh.jsxs)(FA,{display:"block",children:[S,(0,Dh.jsxs)(oC,{ownerState:w,"aria-hidden":!0,className:x.asterisk,children:[" ","*"]})]}):S]}))});function sC(e){return(0,wb.Ay)("PrivateSwitchBase",e)}(0,bb.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const lC=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],cC=(0,ib.Ay)(cw,{name:"MuiSwitchBase"})(e=>{let{ownerState:t}=e;return(0,eb.A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})}),uC=(0,ib.Ay)("input",{name:"MuiSwitchBase",shouldForwardProp:CS.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),dC=Oh.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:i,className:o,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:h,inputRef:p,name:f,onBlur:g,onChange:m,onFocus:v,readOnly:y,required:b=!1,tabIndex:w,type:x,value:A}=e,S=(0,gr.A)(e,lC),[k,_]=(0,lT.A)({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),T=fS();let E=s;T&&void 0===E&&(E=T.disabled);const C="checkbox"===x||"radio"===x,I=(0,eb.A)({},e,{checked:k,disabled:E,disableFocusRipple:l,edge:c}),P=(e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&"edge".concat((0,vb.A)(i))],input:["input"]};return(0,nb.A)(o,sC,t)})(I);return(0,Dh.jsxs)(cC,(0,eb.A)({component:"span",className:(0,tb.A)(P.root,o),centerRipple:!0,focusRipple:!l,disabled:E,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),T&&T.onFocus&&T.onFocus(e)},onBlur:e=>{g&&g(e),T&&T.onBlur&&T.onBlur(e)},ownerState:I,ref:t},S,{children:[(0,Dh.jsx)(uC,(0,eb.A)({autoFocus:n,checked:r,defaultChecked:a,className:P.input,disabled:E,id:C?d:void 0,name:f,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;_(t),m&&m(e,t)},readOnly:y,ref:p,required:b,ownerState:I,tabIndex:w,type:x},"checkbox"===x&&void 0===A?{}:{value:A},h)),k?i:u]}))}),hC=dC;function pC(e){return(0,wb.Ay)("MuiSwitch",e)}const fC=(0,bb.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),gC=["className","color","edge","size","sx"],mC=(0,ib.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t["edge".concat((0,vb.A)(n.edge))],t["size".concat((0,vb.A)(n.size))]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,["& .".concat(fC.thumb)]:{width:16,height:16},["& .".concat(fC.switchBase)]:{padding:4,["&.".concat(fC.checked)]:{transform:"translateX(16px)"}}}}]}),vC=(0,ib.Ay)(hC,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{["& .".concat(fC.input)]:t.input},"default"!==n.color&&t["color".concat((0,vb.A)(n.color))]]}})(e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:"".concat("light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]),transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),["&.".concat(fC.checked)]:{transform:"translateX(20px)"},["&.".concat(fC.disabled)]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:"".concat("light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600])},["&.".concat(fC.checked," + .").concat(fC.track)]:{opacity:.5},["&.".concat(fC.disabled," + .").concat(fC.track)]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:"".concat("light"===t.palette.mode?.12:.2)},["& .".concat(fC.input)]:{left:"-100%",width:"300%"}}},e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,rb.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[n]=e;return{props:{color:n},style:{["&.".concat(fC.checked)]:{color:(t.vars||t).palette[n].main,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,rb.X4)(t.palette[n].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(fC.disabled)]:{color:t.vars?t.vars.palette.Switch["".concat(n,"DisabledColor")]:"".concat("light"===t.palette.mode?(0,rb.a)(t.palette[n].main,.62):(0,rb.e$)(t.palette[n].main,.55))}},["&.".concat(fC.checked," + .").concat(fC.track)]:{backgroundColor:(t.vars||t).palette[n].main}}}})]}}),yC=(0,ib.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}}),bC=(0,ib.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}}),wC=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiSwitch"}),{className:r,color:i="primary",edge:o=!1,size:a="medium",sx:s}=n,l=(0,gr.A)(n,gC),c=(0,eb.A)({},n,{color:i,edge:o,size:a}),u=(e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:a}=e,s={root:["root",n&&"edge".concat((0,vb.A)(n)),"size".concat((0,vb.A)(r))],switchBase:["switchBase","color".concat((0,vb.A)(i)),o&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,nb.A)(s,pC,t);return(0,eb.A)({},t,l)})(c),d=(0,Dh.jsx)(bC,{className:u.thumb,ownerState:c});return(0,Dh.jsxs)(mC,{className:(0,tb.A)(u.root,r),sx:s,ownerState:c,children:[(0,Dh.jsx)(vC,(0,eb.A)({type:"checkbox",icon:d,checkedIcon:d,ref:t,ownerState:c},l,{classes:(0,eb.A)({},u,{root:u.switchBase})})),(0,Dh.jsx)(yC,{className:u.track,ownerState:c})]})});function xC(e){return(0,wb.Ay)("MuiButton",e)}const AC=(0,bb.A)("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"]);const SC=Oh.createContext({});const kC=Oh.createContext(void 0),_C=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],TC=e=>(0,eb.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),EC=(0,ib.Ay)(cw,{shouldForwardProp:e=>(0,CS.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,vb.A)(n.color))],t["size".concat((0,vb.A)(n.size))],t["".concat(n.variant,"Size").concat((0,vb.A)(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(e=>{let{theme:t,ownerState:n}=e;var r,i;const o="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],a="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,eb.A)({},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":(0,eb.A)({textDecoration:"none",backgroundColor:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,rb.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,rb.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:"1px solid ".concat((t.vars||t).palette[n.color].main),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,rb.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,eb.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),["&.".concat(AC.focusVisible)]:(0,eb.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),["&.".concat(AC.disabled)]:(0,eb.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.action.disabledBackground)},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?"1px solid rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):"1px solid ".concat((0,rb.X4)(t.palette[n.color].main,.5))},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:o,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})},e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(AC.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(AC.disabled)]:{boxShadow:"none"}}}),CC=(0,ib.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t["iconSize".concat((0,vb.A)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,eb.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},TC(t))}),IC=(0,ib.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t["iconSize".concat((0,vb.A)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,eb.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},TC(t))}),PC=Oh.forwardRef(function(e,t){const n=Oh.useContext(SC),r=Oh.useContext(kC),i=(0,IA.A)(n,e),o=(0,ob.b)({props:i,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:h=!1,endIcon:p,focusVisibleClassName:f,fullWidth:g=!1,size:m="medium",startIcon:v,type:y,variant:b="text"}=o,w=(0,gr.A)(o,_C),x=(0,eb.A)({},o,{color:s,component:l,disabled:u,disableElevation:d,disableFocusRipple:h,fullWidth:g,size:m,type:y,variant:b}),A=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e,s={root:["root",o,"".concat(o).concat((0,vb.A)(t)),"size".concat((0,vb.A)(i)),"".concat(o,"Size").concat((0,vb.A)(i)),"color".concat((0,vb.A)(t)),n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon","iconSize".concat((0,vb.A)(i))],endIcon:["icon","endIcon","iconSize".concat((0,vb.A)(i))]},l=(0,nb.A)(s,xC,a);return(0,eb.A)({},a,l)})(x),S=v&&(0,Dh.jsx)(CC,{className:A.startIcon,ownerState:x,children:v}),k=p&&(0,Dh.jsx)(IC,{className:A.endIcon,ownerState:x,children:p}),_=r||"";return(0,Dh.jsxs)(EC,(0,eb.A)({ownerState:x,className:(0,tb.A)(n.className,A.root,c,_),component:l,disabled:u,focusRipple:!h,focusVisibleClassName:(0,tb.A)(A.focusVisible,f),ref:t,type:y},w,{classes:A,children:[S,a,k]}))}),LC=PC;const RC=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,a=(0,Fb.A)();Oh.useEffect(()=>{if(i)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==r||r(e,"escapeKeyDown")}},[i,r]);const s=(0,iS.A)((e,t)=>{null==r||r(e,t)}),l=(0,iS.A)(e=>{r&&null!=e&&a.start(e,()=>{s(null,"timeout")})});Oh.useEffect(()=>(i&&l(t),a.clear),[i,t,l,a]);const c=a.clear,u=Oh.useCallback(()=>{null!=t&&l(null!=o?o:.5*t)},[t,o,l]),d=e=>t=>{const n=e.onFocus;null==n||n(t),c()},h=e=>t=>{const n=e.onMouseEnter;null==n||n(t),c()},p=e=>t=>{const n=e.onMouseLeave;null==n||n(t),u()};return Oh.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",u),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",u),window.removeEventListener("blur",c)}},[n,i,u,c]),{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,eb.A)({},ub(e),ub(t));return(0,eb.A)({role:"presentation"},t,n,{onBlur:(r=n,e=>{const t=r.onBlur;null==t||t(e),u()}),onFocus:d(n),onMouseEnter:h(n),onMouseLeave:p(n)});var r},onClickAway:e=>{null==r||r(e,"clickaway")}}};function NC(e){return e.substring(2).toLowerCase()}function OC(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,a=Oh.useRef(!1),s=Oh.useRef(null),l=Oh.useRef(!1),c=Oh.useRef(!1);Oh.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=(0,ab.A)(Ak(t),s),d=(0,iS.A)(e=>{const t=c.current;c.current=!1;const r=(0,i_.A)(s.current);if(!l.current||!s.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,r))return;if(a.current)return void(a.current=!1);let o;o=e.composedPath?e.composedPath().indexOf(s.current)>-1:!r.documentElement.contains(e.target)||s.current.contains(e.target),o||!n&&t||i(e)}),h=e=>n=>{c.current=!0;const r=t.props[e];r&&r(n)},p={ref:u};return!1!==o&&(p[o]=h(o)),Oh.useEffect(()=>{if(!1!==o){const e=NC(o),t=(0,i_.A)(s.current),n=()=>{a.current=!0};return t.addEventListener(e,d),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,d),t.removeEventListener("touchmove",n)}}},[d,o]),!1!==r&&(p[r]=h(r)),Oh.useEffect(()=>{if(!1!==r){const e=NC(r),t=(0,i_.A)(s.current);return t.addEventListener(e,d),()=>{t.removeEventListener(e,d)}}},[d,r]),(0,Dh.jsx)(Oh.Fragment,{children:Oh.cloneElement(t,p)})}function jC(e){return(0,wb.Ay)("MuiSnackbarContent",e)}(0,bb.A)("MuiSnackbarContent",["root","message","action"]);const zC=["action","className","message","role"],MC=(0,ib.Ay)(kb,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?.8:.98,r=(0,rb.tL)(t.palette.background.default,n);return(0,eb.A)({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(r),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:r,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}})}),DC=(0,ib.Ay)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),BC=(0,ib.Ay)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),FC=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiSnackbarContent"}),{action:r,className:i,message:o,role:a="alert"}=n,s=(0,gr.A)(n,zC),l=n,c=(e=>{const{classes:t}=e;return(0,nb.A)({root:["root"],action:["action"],message:["message"]},jC,t)})(l);return(0,Dh.jsxs)(MC,(0,eb.A)({role:a,square:!0,elevation:6,className:(0,tb.A)(c.root,i),ownerState:l,ref:t},s,{children:[(0,Dh.jsx)(DC,{className:c.message,ownerState:l,children:o}),r?(0,Dh.jsx)(BC,{className:c.action,ownerState:l,children:r}):null]}))});function WC(e){return(0,wb.Ay)("MuiSnackbar",e)}(0,bb.A)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const UC=["onEnter","onExited"],VC=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],HC=(0,ib.Ay)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["anchorOrigin".concat((0,vb.A)(n.anchorOrigin.vertical)).concat((0,vb.A)(n.anchorOrigin.horizontal))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===n.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===n.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===n.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:(0,eb.A)({},"top"===n.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===n.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===n.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===n.anchorOrigin.horizontal&&{right:24,left:"auto"})})}),GC=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiSnackbar"}),r=oA(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{action:o,anchorOrigin:{vertical:a,horizontal:s}={vertical:"bottom",horizontal:"left"},autoHideDuration:l=null,children:c,className:u,ClickAwayListenerProps:d,ContentProps:h,disableWindowBlurListener:p=!1,message:f,open:g,TransitionComponent:m=r_,transitionDuration:v=i,TransitionProps:{onEnter:y,onExited:b}={}}=n,w=(0,gr.A)(n.TransitionProps,UC),x=(0,gr.A)(n,VC),A=(0,eb.A)({},n,{anchorOrigin:{vertical:a,horizontal:s},autoHideDuration:l,disableWindowBlurListener:p,TransitionComponent:m,transitionDuration:v}),S=(e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root","anchorOrigin".concat((0,vb.A)(n.vertical)).concat((0,vb.A)(n.horizontal))]};return(0,nb.A)(r,WC,t)})(A),{getRootProps:k,onClickAway:_}=RC((0,eb.A)({},A)),[T,E]=Oh.useState(!0),C=_k({elementType:HC,getSlotProps:k,externalForwardedProps:x,ownerState:A,additionalProps:{ref:t},className:[S.root,u]});return!g&&T?null:(0,Dh.jsx)(OC,(0,eb.A)({onClickAway:_},d,{children:(0,Dh.jsx)(HC,(0,eb.A)({},C,{children:(0,Dh.jsx)(m,(0,eb.A)({appear:!0,in:g,timeout:v,direction:"top"===a?"down":"up",onEnter:(e,t)=>{E(!1),y&&y(e,t)},onExited:e=>{E(!0),b&&b(e)}},w,{children:c||(0,Dh.jsx)(FC,(0,eb.A)({message:f,action:o},h))}))}))}))}),qC=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:45;if(e.length<=t)return e;const n=t-3,r=Math.ceil(n/2),i=Math.floor(n/2);return"".concat(e.slice(0,r)).concat("...").concat(e.slice(-i))},KC=e=>{if(!e||"string"!=typeof e)return[];try{if(e.startsWith("file"))return(e=>{const t=e.replace(/^file:\/\//,""),n=t.substring(t.lastIndexOf("/")+1),r=t.substring(0,t.lastIndexOf("/")),i=n.includes(".")?n.substring(n.lastIndexOf(".")):"",o=[];if(t)try{o.push(decodeURIComponent(t))}catch(e){o.push(t)}if(r&&o.push("".concat(r,"/*")),i&&o.push("*".concat(i)),n&&n!==t)try{o.push(decodeURIComponent(n))}catch(e){o.push(n)}return o})(e);if(!e.startsWith("http"))return[];const t=new URL(e),{hostname:n,port:r,protocol:i}=t,o="https:"===i?"443":"80",a=(e=>{if((e=>{const t=/^(\d{1,3}\.){3}\d{1,3}$/.test(e),n=e.includes(":");return t||n})(e))return[e];const t=e.split(".");if(t.length<=1)return[e];if(2===t.length)return[e,"*.".concat(e)];const n=[e],r=t.slice(-2).join(".");for(let e=1;e<=t.length-2;e++){const i="*.".repeat(e),o=t.slice(e).join(".");o===r&&1!==e||n.push("".concat(i).concat(o))}return n})(n);if(r&&r!==o){const e=a[0];return["".concat(e,":").concat(r),"".concat(e,":*"),e,...a.slice(1)]}return a}catch(e){return[]}};function $C(){const{customStyles:e,updateSetting:t}=function(){const{setting:e,updateSetting:t}=bx();return{customStyles:(null==e?void 0:e.customStyles)||[],updateSetting:t}}();return{customStyles:e,addStyle:(0,Oh.useCallback)(()=>{const e=Qe[0],n=crypto.randomUUID(),r="custom_".concat(crypto.randomUUID()),i="Style_".concat(n.slice(0,8)),o=h(h({},e),{},{styleSlug:r,styleName:i});t(e=>h(h({},e),{},{customStyles:[...(null==e?void 0:e.customStyles)||[],o]}))},[t]),deleteStyle:(0,Oh.useCallback)(e=>{t(t=>h(h({},t),{},{customStyles:((null==t?void 0:t.customStyles)||[]).filter(t=>t.styleSlug!==e)}))},[t]),updateStyle:(0,Oh.useCallback)((e,n)=>{t(t=>h(h({},t),{},{customStyles:((null==t?void 0:t.customStyles)||[]).map(t=>t.styleSlug===e?h(h({},t),n):t)}))},[t])}}function YC(e){var t,n,r;let{rule:i,setting:o,setRule:a,setSetting:s,handleOpenSetting:l,processActions:c,isContent:u=!1}=e;const d=nS(),{setting:p,updateSetting:f}=bx(),[g,m]=(0,Oh.useState)({}),[v,y]=(0,Oh.useState)([]),[b,w]=(0,Oh.useState)(""),[x,A]=(0,Oh.useState)({open:!1,message:""}),{allTextStyles:S}=function(){const{customStyles:e}=$C(),t=nS(),n=(0,Oh.useMemo)(()=>Je.map(e=>({styleSlug:e,styleName:t(e),styleCode:Ff[e]||""})),[t]),r=(0,Oh.useMemo)(()=>[...n,...e],[n,e]);return{builtinStyles:n,customStyles:e,allTextStyles:r}}(),[k,_]=(0,Oh.useState)(""),T=(null==p?void 0:p.blacklist)||"",E=(0,Oh.useMemo)(()=>!(!b||!T)&&tu(k,T),[b,T,k]),C=(0,Oh.useCallback)(()=>{if(!b)return;const e=T?"".concat(T,"\n").concat(b):b;f(t=>h(h({},t),{},{blacklist:e})),A({open:!0,message:"".concat(d("add_to_blacklist"),": ").concat(b)})},[b,T,f,d]),I=(0,Oh.useCallback)(()=>{if(!b)return;const e=T.split(/\n|,/).map(e=>e.trim()).filter(e=>e!==b).join("\n");f(t=>h(h({},t),{},{blacklist:e})),A({open:!0,message:"".concat(d("remove_from_blacklist"),": ").concat(b)})},[b,T,f,d]),P=async e=>{try{let{name:t,value:n,checked:r}=e.target;"isPlainText"===t&&(n=r),a(e=>h(h({},e),{},{[t]:n})),c?c({action:fn,args:{[t]:n}}):await Tr(fn,{[t]:n})}catch(e){pt("update rule",e)}};(0,Oh.useEffect)(()=>{(async()=>{try{let t="";if(u){var e;t=null===(e=window.location)||void 0===e?void 0:e.href}else{const e=await kr();t=(null==e?void 0:e.url)||""}if(t&&"string"==typeof t){_(t);const e=KC(t);y(e),e.length>0&&w(e[0])}}catch(e){pt("get domain options",e)}})()},[u]),(0,Oh.useEffect)(()=>{(async()=>{try{const e={};if(_n){(await _r("command_shortcuts")).forEach(t=>{let{name:n,shortcut:r}=t;e[n]=r})}else{const t=null==o?void 0:o.shortcuts;t&&Object.entries(t).forEach(t=>{let[n,r]=t;e[n]=r.join("+")})}m(e)}catch(e){pt("query cmds",e)}})()},[null==o?void 0:o.shortcuts]);const L=(0,Oh.useMemo)(()=>((null==o?void 0:o.transApis)||[]).filter(e=>!e.isDisabled).sort((e,t)=>(e.sortOrder||0)-(t.sortOrder||0)).map(e=>({key:e.apiSlug,name:e.apiName||e.apiSlug})),[null==o?void 0:o.transApis]),R=null==o||null===(t=o.tranboxSetting)||void 0===t?void 0:t.transOpen,N=null==o||null===(n=o.mouseHoverSetting)||void 0===n?void 0:n.useMouseHover,O=null==o||null===(r=o.inputRule)||void 0===r?void 0:r.transOpen,{transOpen:j,apiSlug:z,fromLang:M,toLang:D,textStyle:B,autoScan:F,transOnly:W,hasRichText:U,scanAll:V,isPlainText:H=!1}=i||{};return(0,Dh.jsxs)(FA,{sx:{p:2},spacing:2,children:[(0,Dh.jsxs)(ZT,{container:!0,columns:12,spacing:1,children:[(0,Dh.jsx)(ZT,{item:!0,xs:12,children:(0,Dh.jsx)(aC,{control:(0,Dh.jsx)(wC,{checked:"true"===j,onChange:async e=>{try{a(h(h({},i),{},{transOpen:e.target.checked?"true":"false"})),c?c({action:un}):await Tr(un)}catch(e){pt("toggle trans",e)}}}),label:g.toggleTranslate?"".concat(d("translate_alt"),"(").concat(g.toggleTranslate,")"):d("translate_alt")})}),(0,Dh.jsx)(ZT,{item:!0,xs:6,children:(0,Dh.jsx)(aC,{control:(0,Dh.jsx)(wC,{size:"small",name:"autoScan",value:"true"===F?"false":"true",checked:"true"===F,onChange:P}),label:d("autoscan_alt")})}),(0,Dh.jsx)(ZT,{item:!0,xs:6,children:(0,Dh.jsx)(aC,{control:(0,Dh.jsx)(wC,{size:"small",name:"scanAll",value:"true"===V?"false":"true",checked:"true"===V,onChange:P}),label:d("scan_all_nodes")})}),(0,Dh.jsx)(ZT,{item:!0,xs:6,children:(0,Dh.jsx)(aC,{control:(0,Dh.jsx)(wC,{size:"small",name:"hasRichText",value:"true"===U?"false":"true",checked:"true"===U,onChange:P}),label:d("richtext_alt")})}),(0,Dh.jsx)(ZT,{item:!0,xs:6,children:(0,Dh.jsx)(aC,{control:(0,Dh.jsx)(wC,{size:"small",name:"transOnly",value:"true"===W?"false":"true",checked:"true"===W,onChange:P}),label:d("transonly_alt")})}),(0,Dh.jsx)(ZT,{item:!0,xs:6,children:(0,Dh.jsx)(aC,{control:(0,Dh.jsx)(wC,{size:"small",name:"tranboxEnabled",value:!R,checked:R,onChange:async e=>{try{s(t=>h(h({},t),{},{tranboxSetting:h(h({},t.tranboxSetting),{},{transOpen:e.target.checked})})),c?c({action:gn}):await Tr(gn)}catch(e){pt("toggle transbox",e)}}}),label:d("selection_translate")})}),(0,Dh.jsx)(ZT,{item:!0,xs:6,children:(0,Dh.jsx)(aC,{control:(0,Dh.jsx)(wC,{size:"small",name:"mouseHoverEnabled",value:!N,checked:N,onChange:async e=>{try{s(t=>h(h({},t),{},{mouseHoverSetting:h(h({},t.mouseHoverSetting),{},{useMouseHover:e.target.checked})})),c?c({action:vn}):await Tr(vn)}catch(e){pt("toggle mousehover",e)}}}),label:d("mousehover_translate")})}),(0,Dh.jsx)(ZT,{item:!0,xs:6,children:(0,Dh.jsx)(aC,{control:(0,Dh.jsx)(wC,{size:"small",name:"inputTransEnabled",value:!O,checked:O,onChange:async e=>{try{s(t=>h(h({},t),{},{inputRule:h(h({},t.inputRule),{},{transOpen:e.target.checked})})),c?c({action:yn}):await Tr(yn)}catch(e){pt("toggle inputtrans",e)}}}),label:d("input_translate")})}),(0,Dh.jsx)(ZT,{item:!0,xs:6,children:(0,Dh.jsx)(aC,{control:(0,Dh.jsx)(wC,{size:"small",name:"isPlainText",value:!H,checked:H,onChange:P}),label:d("plain_text_translate")})})]}),(0,Dh.jsxs)(FA,{direction:"row",spacing:2,children:[(0,Dh.jsx)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:M,name:"fromLang",label:d("from_lang"),onChange:P,fullWidth:!0,children:ye.map(e=>{let[t,n]=e;return(0,Dh.jsx)(WT,{value:t,children:n},t)})}),(0,Dh.jsx)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:D,name:"toLang",label:d("to_lang"),onChange:P,fullWidth:!0,children:ve.map(e=>{let[t,n]=e;return(0,Dh.jsx)(WT,{value:t,children:n},t)})})]}),(0,Dh.jsxs)(FA,{direction:"row",spacing:2,children:[(0,Dh.jsx)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:z,name:"apiSlug",label:d("translate_service"),onChange:P,fullWidth:!0,children:L.map(e=>{let{key:t,name:n}=e;return(0,Dh.jsx)(WT,{value:t,children:n},t)})}),(0,Dh.jsx)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:B,name:"textStyle",label:g.toggleStyle?"".concat(d("text_style_alt"),"(").concat(g.toggleStyle,")"):d("text_style_alt"),onChange:P,fullWidth:!0,children:S.map(e=>(0,Dh.jsx)(WT,{value:e.styleSlug,children:e.styleName},e.styleSlug))})]}),(0,Dh.jsxs)(FA,{children:[(0,Dh.jsx)(OT,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:b,label:d("domain"),onChange:e=>w(e.target.value),fullWidth:!0,sx:{mb:1},children:v.map(e=>(0,Dh.jsx)(WT,{value:e,title:e,children:qC(e)},e))}),(0,Dh.jsxs)(FA,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,Dh.jsx)(LC,{variant:"text",onClick:async()=>{try{if(!b)return;const e=h(h({},i),{},{pattern:b});_n&&u?_r("save_rule",e):(async e=>{const t=await ir(),n=t.findIndex(t=>t.pattern!==Ze&&zn(e.pattern,t.pattern));if(-1!==n){const r=t.splice(n,1)[0];e=h(h(h({},r),e),{},{pattern:r.pattern,selector:r.selector,keepSelector:r.keepSelector,blockSelector:r.blockSelector,rootsSelector:r.rootsSelector,ignoreSelector:r.ignoreSelector})}const r={},i=h(h({},ct),t.find(e=>e.pattern===Ze)||{});Object.keys(ct).forEach(t=>{r[t]=e[t]&&e[t]!==i[t]?e[t]:lt[t]}),t.unshift(r),await or(t),Xc()})(e),A({open:!0,message:"".concat(d("save_rule"),": ").concat(b)})}catch(e){pt("save rule",e)}},disabled:0===v.length,children:d("save_rule")}),(0,Dh.jsx)(LC,{variant:"text",onClick:E?I:C,disabled:0===v.length,children:d(E?"remove_from_blacklist":"add_to_blacklist")}),(0,Dh.jsx)(LC,{variant:"text",onClick:()=>{(async()=>{try{_n&&!Cn()?await _r("clear_caches"):await caches.delete(en)}catch(e){pt("clean caches",e)}})()},children:d("clear_cache")})]}),(0,Dh.jsxs)(FA,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,Dh.jsx)(LC,{variant:"text",onClick:()=>{window.open("https://chromewebstore.google.com/detail/kiss-translator/bdiifdefkgmcblbcghdlonllpjhhjgof/reviews","_blank")},children:d("comment_support")}),(0,Dh.jsx)(LC,{variant:"text",onClick:()=>{window.open("https://github.com/fishjar/kiss-translator#%E8%B5%9E%E8%B5%8F","_blank")},children:d("appreciate_support")}),(0,Dh.jsx)(LC,{variant:"text",onClick:l,children:d("setting")})]})]}),(0,Dh.jsx)(GC,{open:x.open,autoHideDuration:3e3,onClose:()=>A({open:!1,message:""}),anchorOrigin:{vertical:"top",horizontal:"center"},children:(0,Dh.jsx)(Ew,{onClose:()=>A({open:!1,message:""}),severity:"success",variant:"filled",sx:{width:"100%"},children:x.message})})]})}function XC(e){let{translator:t,processActions:n}=e;const[r,i]=(0,Oh.useState)(!0),[o,a]=(0,Oh.useState)(t.rule),[s,l]=(0,Oh.useState)(t.setting),c=eC(),u=(0,Oh.useCallback)(()=>{_n?_r("open_options"):window.open("https://fishjar.github.io/kiss-translator/options.html","_blank")},[]);(0,Oh.useEffect)(()=>{const e=()=>{i(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}},[]),(0,Oh.useEffect)(()=>{const e=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.action)===mn&&i(e=>!e)};return document.addEventListener(wn,e),()=>{document.removeEventListener(wn,e)}},[]),(0,Oh.useEffect)(()=>{r&&(a(t.rule),l(t.setting))},[r,t]);const d=(0,Oh.useMemo)(()=>{const e=Math.min(c.w,360),t=Math.min(c.h,442),n=(c.w-e)/2,r=(c.h-t)/2;return{windowSize:c,width:e,height:t,left:n,top:r}},[c]);return(0,Dh.jsx)(yx,{context:"contentPopup",children:(0,Dh.jsx)(Jx,{children:r&&(0,Dh.jsx)(XE,h(h({},d),{},{usePaper:!0,handler:(0,Dh.jsxs)(iA,{style:{cursor:"move"},children:[(0,Dh.jsx)(ZE,{onClose:()=>{i(!1)}}),(0,Dh.jsx)(gx,{})]}),children:(0,Dh.jsx)(iA,{width:360,children:(0,Dh.jsx)(YC,{rule:o,setting:s,setRule:a,setSetting:l,handleOpenSetting:u,processActions:n,isContent:!0})})}),"pop")})})}class JC extends qE{constructor(e){let{translator:t,processActions:n}=e;super({id:r.popupID,className:"notranslate",reactComponent:XC,props:{translator:t,processActions:n}})}toggle(e){this.isVisible?document.dispatchEvent(new CustomEvent(wn,{detail:{action:mn}})):this.show(e||this._props)}}function QC(e){return(0,wb.Ay)("MuiFab",e)}const ZC=(0,bb.A)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),eI=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],tI=(0,ib.Ay)(cw,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,CS.A)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,vb.A)(n.size))],"inherit"===n.color&&t.colorInherit,t[(0,vb.A)(n.size)],t[n.color]]}})(e=>{let{theme:t,ownerState:n}=e;var r,i;return(0,eb.A)({},t.typography.button,{minHeight:36,transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(t.vars||t).zIndex.fab,boxShadow:(t.vars||t).shadows[6],"&:active":{boxShadow:(t.vars||t).shadows[12]},color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],"&:hover":{backgroundColor:(t.vars||t).palette.grey.A100,"@media (hover: none)":{backgroundColor:(t.vars||t).palette.grey[300]},textDecoration:"none"},["&.".concat(ZC.focusVisible)]:{boxShadow:(t.vars||t).shadows[6]}},"small"===n.size&&{width:40,height:40},"medium"===n.size&&{width:48,height:48},"extended"===n.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===n.variant&&"small"===n.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===n.variant&&"medium"===n.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===n.color&&{color:"inherit"})},e=>{let{theme:t,ownerState:n}=e;return(0,eb.A)({},"inherit"!==n.color&&"default"!==n.color&&null!=(t.vars||t).palette[n.color]&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}})},e=>{let{theme:t}=e;return{["&.".concat(ZC.disabled)]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),nI=Oh.forwardRef(function(e,t){const n=(0,ob.b)({props:e,name:"MuiFab"}),{children:r,className:i,color:o="default",component:a="button",disabled:s=!1,disableFocusRipple:l=!1,focusVisibleClassName:c,size:u="large",variant:d="circular"}=n,h=(0,gr.A)(n,eI),p=(0,eb.A)({},n,{color:o,component:a,disabled:s,disableFocusRipple:l,size:u,variant:d}),f=(e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,"size".concat((0,vb.A)(i)),"inherit"===t?"colorInherit":t]},a=(0,nb.A)(o,QC,r);return(0,eb.A)({},r,a)})(p);return(0,Dh.jsx)(tI,(0,eb.A)({className:(0,tb.A)(f.root,i),component:a,disabled:s,focusRipple:!l,focusVisibleClassName:(0,tb.A)(f.focusVisible,c),ownerState:p,ref:t},h,{classes:f,children:r}))});var rI=i(383);function iI(e){let{fabConfig:{x:t,y:n,fabClickAction:r=0}={},processActions:i}=e;const o=eC(),[a,s]=(0,Oh.useState)(!1),l=(0,Oh.useCallback)(()=>{s(!1)},[]),c=(0,Oh.useCallback)(()=>{s(!0)},[]),u=(0,Oh.useCallback)(()=>{a||i(1===r?{action:un}:{action:mn})},[a,r,i]),d=(0,Oh.useMemo)(()=>({windowSize:o,width:40,height:40,left:null!=t?t:-40,top:null!=n?n:o.h/2}),[o,40,t,n]);return(0,Dh.jsx)(yx,{context:"fab",children:(0,Dh.jsx)(Jx,{children:(0,Dh.jsx)(XE,h(h({snapEdge:!0},d),{},{onStart:l,onMove:c,handler:(0,Dh.jsx)(nI,{size:"small",color:"primary",onClick:u,children:(0,Dh.jsx)(rI.A,{sx:{width:24,height:24}})})}),"fab")})})}class oI extends qE{constructor(e){let{processActions:t,fabConfig:n}=e;super({id:r.fabID,className:"notranslate",reactComponent:iI,props:{processActions:t,fabConfig:n}}),null!=n&&n.isHide||this.show()}}var aI=Ir("clearShortcuts"),sI=Ir("menuCommandIds"),lI=Ir("clearTouchListeners"),cI=Ir("isActive"),uI=Ir("setting"),dI=Ir("rule"),hI=Ir("fabConfig"),pI=Ir("favWords"),fI=Ir("isUserscript"),gI=Ir("isIframe"),mI=Ir("documentObserver"),vI=Ir("documentElementObserver"),yI=Ir("knownDocumentElement"),bI=Ir("knownBody"),wI=Ir("spaRefreshTimer"),xI=Ir("pendingSpaRefresh"),AI=Ir("pendingSpaRefreshReason"),SI=Ir("innerMessageHandler"),kI=Ir("browserMessageHandler"),_I=Ir("windowMessageHandler"),TI=Ir("pageRestoreHandler"),EI=Ir("spaNavigationHandler"),CI=Ir("createRuntimeModules"),II=Ir("destroyRuntimeModules"),PI=Ir("cloneConfig"),LI=Ir("snapshotRuntimeState"),RI=Ir("setupSpaListeners"),NI=Ir("teardownSpaListeners"),OI=Ir("refreshDocumentElementObserver"),jI=Ir("handleDocumentContainerMutation"),zI=Ir("handlePageRestore"),MI=Ir("handleSpaNavigation"),DI=Ir("scheduleSpaRefresh"),BI=Ir("clearSpaRefreshTimer"),FI=Ir("hasDocumentContainerChanged"),WI=Ir("setupMessageListeners"),UI=Ir("setupTouchOperations"),VI=Ir("handleWindowMessage"),HI=Ir("handleInnerMessage"),GI=Ir("handleBrowserMessage"),qI=Ir("registerShortcuts"),KI=Ir("registerMenus"),$I=Ir("processActions");class YI{constructor(e){let{setting:t,rule:n,fabConfig:r,favWords:i,isIframe:o,isUserscript:a}=e;Object.defineProperty(this,$I,{value:mP}),Object.defineProperty(this,KI,{value:gP}),Object.defineProperty(this,qI,{value:fP}),Object.defineProperty(this,GI,{value:pP}),Object.defineProperty(this,HI,{value:hP}),Object.defineProperty(this,VI,{value:dP}),Object.defineProperty(this,UI,{value:uP}),Object.defineProperty(this,WI,{value:cP}),Object.defineProperty(this,FI,{value:lP}),Object.defineProperty(this,BI,{value:sP}),Object.defineProperty(this,DI,{value:aP}),Object.defineProperty(this,MI,{value:oP}),Object.defineProperty(this,zI,{value:iP}),Object.defineProperty(this,jI,{value:rP}),Object.defineProperty(this,OI,{value:nP}),Object.defineProperty(this,NI,{value:tP}),Object.defineProperty(this,RI,{value:eP}),Object.defineProperty(this,LI,{value:ZI}),Object.defineProperty(this,PI,{value:QI}),Object.defineProperty(this,II,{value:JI}),Object.defineProperty(this,CI,{value:XI}),Object.defineProperty(this,aI,{writable:!0,value:[]}),Object.defineProperty(this,sI,{writable:!0,value:[]}),Object.defineProperty(this,lI,{writable:!0,value:[]}),Object.defineProperty(this,cI,{writable:!0,value:!1}),Object.defineProperty(this,uI,{writable:!0,value:void 0}),Object.defineProperty(this,dI,{writable:!0,value:void 0}),Object.defineProperty(this,hI,{writable:!0,value:void 0}),Object.defineProperty(this,pI,{writable:!0,value:void 0}),Object.defineProperty(this,fI,{writable:!0,value:void 0}),Object.defineProperty(this,gI,{writable:!0,value:void 0}),Object.defineProperty(this,mI,{writable:!0,value:null}),Object.defineProperty(this,vI,{writable:!0,value:null}),Object.defineProperty(this,yI,{writable:!0,value:null}),Object.defineProperty(this,bI,{writable:!0,value:null}),Object.defineProperty(this,wI,{writable:!0,value:null}),Object.defineProperty(this,xI,{writable:!0,value:null}),Object.defineProperty(this,AI,{writable:!0,value:""}),Object.defineProperty(this,SI,{writable:!0,value:null}),Object.defineProperty(this,kI,{writable:!0,value:null}),Object.defineProperty(this,_I,{writable:!0,value:null}),Object.defineProperty(this,TI,{writable:!0,value:null}),Object.defineProperty(this,EI,{writable:!0,value:null}),this._translator=null,this._transboxManager=null,this._inputTranslator=null,this._popupManager=null,this._fabManager=null,Er(this,uI)[uI]=Er(this,PI)[PI](t),Er(this,dI)[dI]=Er(this,PI)[PI](n),Er(this,hI)[hI]=Er(this,PI)[PI](r),Er(this,pI)[pI]=Er(this,PI)[PI](i),Er(this,gI)[gI]=o,Er(this,fI)[fI]=a,Er(this,SI)[SI]=Er(this,HI)[HI].bind(this),Er(this,kI)[kI]=Er(this,GI)[GI].bind(this),Er(this,_I)[_I]=Er(this,VI)[VI].bind(this),Er(this,TI)[TI]=Er(this,zI)[zI].bind(this),Er(this,EI)[EI]=Er(this,MI)[MI].bind(this)}start(){Er(this,cI)[cI]?ht.info("TranslatorManager is already started."):(Er(this,CI)[CI](),Er(this,WI)[WI](),Er(this,UI)[UI](),!Er(this,gI)[gI]&&Er(this,fI)[fI]&&(Er(this,qI)[qI](),Er(this,KI)[KI]()),Er(this,RI)[RI](),Er(this,cI)[cI]=!0,ht.info("TranslatorManager started."))}restart(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"spa-navigation";if(!Er(this,cI)[cI])return void ht.info("TranslatorManager is not running.");const t=Er(this,LI)[LI]();Er(this,II)[II](),Er(this,uI)[uI]=t.setting,Er(this,dI)[dI]=t.rule,Er(this,hI)[hI]=t.fabConfig,Er(this,pI)[pI]=t.favWords,Er(this,CI)[CI](),Er(this,OI)[OI](),ht.info("TranslatorManager restarted: ".concat(e))}stop(){Er(this,cI)[cI]?(Er(this,BI)[BI](),Er(this,NI)[NI](),window.removeEventListener(xn,Er(this,_I)[_I]),Er(this,fI)[fI]?window.removeEventListener("message",Er(this,SI)[SI]):(Tn.runtime.onMessage.removeListener(Er(this,kI)[kI]),Er(this,gI)[gI]&&window.removeEventListener("message",Er(this,SI)[SI])),Er(this,aI)[aI].forEach(e=>e()),Er(this,aI)[aI]=[],Er(this,lI)[lI].forEach(e=>e()),Er(this,lI)[lI]=[],globalThis.GM&&Er(this,sI)[sI].length>0&&(Er(this,sI)[sI].forEach(e=>{var t,n;return null===(t=(n=GM).unregisterMenuCommand)||void 0===t?void 0:t.call(n,e)}),Er(this,sI)[sI]=[]),Er(this,II)[II](),Er(this,cI)[cI]=!1,ht.info("TranslatorManager stopped.")):ht.info("TranslatorManager is not running.")}}function XI(){this._translator=new lv({rule:Er(this,PI)[PI](Er(this,dI)[dI]),setting:Er(this,PI)[PI](Er(this,uI)[uI]),favWords:Er(this,PI)[PI](Er(this,pI)[pI]),isUserscript:Er(this,fI)[fI],isIframe:Er(this,gI)[gI]}),this._transboxManager=new FE(Er(this,PI)[PI](Er(this,uI)[uI])),Er(this,gI)[gI]||(this._inputTranslator=new Jy(Er(this,PI)[PI](Er(this,uI)[uI])),this._popupManager=new JC({translator:this._translator,processActions:Er(this,$I)[$I].bind(this)}),this._fabManager=new oI({processActions:Er(this,$I)[$I].bind(this),fabConfig:Er(this,PI)[PI](Er(this,hI)[hI])}))}function JI(){var e,t,n,r,i;null===(e=this._popupManager)||void 0===e||e.destroy(),null===(t=this._fabManager)||void 0===t||t.destroy(),null===(n=this._transboxManager)||void 0===n||n.disable(),null===(r=this._inputTranslator)||void 0===r||r.disable(),null===(i=this._translator)||void 0===i||i.stop(),this._translator=null,this._transboxManager=null,this._inputTranslator=null,this._popupManager=null,this._fabManager=null}function QI(e){if(null==e)return e;if("function"==typeof globalThis.structuredClone)try{return globalThis.structuredClone(e)}catch(e){ht.debug("structuredClone failed, using JSON clone.",e)}return JSON.parse(JSON.stringify(e))}function ZI(){var e,t;return{setting:Er(this,PI)[PI]((null===(e=this._translator)||void 0===e?void 0:e.setting)||Er(this,uI)[uI]),rule:Er(this,PI)[PI]((null===(t=this._translator)||void 0===t?void 0:t.rule)||Er(this,dI)[dI]),fabConfig:Er(this,PI)[PI](Er(this,hI)[hI]),favWords:Er(this,PI)[PI](Er(this,pI)[pI])}}function eP(){Er(this,mI)[mI]=new MutationObserver(()=>{Er(this,jI)[jI]("document")}),Er(this,mI)[mI].observe(document,{childList:!0}),Er(this,OI)[OI](),window.addEventListener("pageshow",Er(this,TI)[TI]),document.addEventListener("turbo:frame-load",Er(this,EI)[EI],!0)}function tP(){var e,t,n;null===(e=Er(this,mI)[mI])||void 0===e||e.disconnect(),Er(this,mI)[mI]=null,null===(t=Er(this,vI)[vI])||void 0===t||t.disconnect(),Er(this,vI)[vI]=null,null===(n=Er(this,yI)[yI])||void 0===n||n.removeEventListener("turbo:load",Er(this,EI)[EI]),Er(this,yI)[yI]=null,Er(this,bI)[bI]=null,window.removeEventListener("pageshow",Er(this,TI)[TI]),document.removeEventListener("turbo:frame-load",Er(this,EI)[EI],!0)}function nP(){var e,t;null===(e=Er(this,vI)[vI])||void 0===e||e.disconnect(),Er(this,vI)[vI]=null,null===(t=Er(this,yI)[yI])||void 0===t||t.removeEventListener("turbo:load",Er(this,EI)[EI]),Er(this,yI)[yI]=document.documentElement,Er(this,bI)[bI]=document.body,Er(this,yI)[yI]&&(Er(this,yI)[yI].addEventListener("turbo:load",Er(this,EI)[EI]),Er(this,vI)[vI]=new MutationObserver(()=>{Er(this,jI)[jI]("documentElement")}),Er(this,vI)[vI].observe(Er(this,yI)[yI],{childList:!0}))}function rP(e){Er(this,FI)[FI]()&&Er(this,DI)[DI]("restart",e)}function iP(e){"pageshow"===e.type&&!0!==e.persisted||Er(this,DI)[DI]("rescan",e.type)}function oP(e){Er(this,DI)[DI]("rescan",e.type)}function aP(e,t){Er(this,cI)[cI]&&(Er(this,wI)[wI]&&(clearTimeout(Er(this,wI)[wI]),Er(this,wI)[wI]=null),"restart"!==e&&"restart"===Er(this,xI)[xI]||(Er(this,xI)[xI]=e,Er(this,AI)[AI]=t),"restart"===e&&(Er(this,AI)[AI]=t),Er(this,wI)[wI]=setTimeout(()=>{var e;const t=Er(this,xI)[xI],n=Er(this,AI)[AI];Er(this,wI)[wI]=null,Er(this,xI)[xI]=null,Er(this,AI)[AI]="",Er(this,cI)[cI]&&("restart"===t||Er(this,FI)[FI]()?this.restart(n):(null===(e=this._translator)||void 0===e||e.rescan(),ht.info("TranslatorManager rescanned: ".concat(n))))},0))}function sP(){Er(this,wI)[wI]&&(clearTimeout(Er(this,wI)[wI]),Er(this,wI)[wI]=null,Er(this,xI)[xI]=null,Er(this,AI)[AI]="")}function lP(){return document.documentElement!==Er(this,yI)[yI]||document.body!==Er(this,bI)[bI]}function cP(){Er(this,fI)[fI]?window.addEventListener("message",Er(this,SI)[SI]):(Tn.runtime.onMessage.addListener(Er(this,kI)[kI]),Er(this,gI)[gI]&&window.addEventListener("message",Er(this,SI)[SI])),window.addEventListener(xn,Er(this,_I)[_I])}function uP(){if(Er(this,gI)[gI])return;const{touchModes:e=[2]}=this._translator.setting;if(0===e.length)return;const t=()=>{Er(this,$I)[$I]({action:un})},n=e=>{let n=null;switch(e){case 2:case 3:case 4:n={taps:1,fingers:e};break;case 5:n={taps:2,fingers:1};break;case 6:n={taps:3,fingers:1};break;case 7:n={taps:2,fingers:2}}n&&Er(this,lI)[lI].push(function(e){const t=h({taps:2,fingers:1,delay:300},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});let n=0,r=0,i=null,o=!1,a=[];const s=e=>{n=Math.max(n,e.touches.length),a=Array.from(e.touches).map(e=>({x:e.clientX,y:e.clientY}))},l=e=>{if(!o)for(let t=0;t<e.touches.length;t++){const n=e.touches[t],r=a[t];if(r&&Math.sqrt(Math.pow(n.clientX-r.x,2)+Math.pow(n.clientY-r.y,2))>10){o=!0;break}}},c=s=>{0===s.touches.length&&(o||n!==t.fingers?(r=0,clearTimeout(i)):(r++,clearTimeout(i),r===t.taps?(e(s),r=0):i=setTimeout(()=>{r=0},t.delay)),n=0,o=!1,a=[])};return document.addEventListener("touchstart",s,{passive:!0}),document.addEventListener("touchmove",l,{passive:!0}),document.addEventListener("touchend",c,{passive:!0}),()=>{clearTimeout(i),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",l),document.removeEventListener("touchend",c)}}(t,n))};e.forEach(e=>n(e))}function dP(e){ht.debug("handle window message:",e),Er(this,$I)[$I](e.detail)}function hP(e){Er(this,$I)[$I](e.data)}function pP(e,t,n){var r,i;return n(Er(this,$I)[$I](e,!0)||{rule:(null===(r=this._translator)||void 0===r?void 0:r.rule)||Er(this,dI)[dI],setting:(null===(i=this._translator)||void 0===i?void 0:i.setting)||Er(this,uI)[uI]}),!0}function fP(){const{shortcuts:e,tranboxSetting:t}=this._translator.setting;Er(this,aI)[aI]=[Wf(e[ft],()=>Er(this,$I)[$I]({action:un})),Wf(e.toggleTransOnly,()=>Er(this,$I)[$I]({action:dn})),Wf(e[gt],()=>Er(this,$I)[$I]({action:hn})),Wf(e[mt],()=>Er(this,$I)[$I]({action:mn})),Wf(e[vt],()=>window.open("https://fishjar.github.io/kiss-translator/options.html","_blank")),Wf(null==t?void 0:t.tranboxShortcut,()=>Er(this,$I)[$I]({action:gn}))]}function gP(){var e,t,n,r,i,o,a,s,l,c;if(!globalThis.GM)return;const{contextMenuType:u,uiLang:d}=this._translator.setting;if(0===u)return;const h=Wt(d||"zh");Er(this,sI)[sI]=[null===(e=(t=GM).registerMenuCommand)||void 0===e?void 0:e.call(t,h("translate_switch"),()=>Er(this,$I)[$I]({action:un}),"Q"),null===(n=(r=GM).registerMenuCommand)||void 0===n?void 0:n.call(r,h("transonly_alt"),()=>Er(this,$I)[$I]({action:dn}),"Q"),null===(i=(o=GM).registerMenuCommand)||void 0===i?void 0:i.call(o,h("toggle_style"),()=>Er(this,$I)[$I]({action:hn}),"C"),null===(a=(s=GM).registerMenuCommand)||void 0===a?void 0:a.call(s,h("open_menu"),()=>Er(this,$I)[$I]({action:mn}),"K"),null===(l=(c=GM).registerMenuCommand)||void 0===l?void 0:l.call(c,h("open_setting"),()=>window.open("https://fishjar.github.io/kiss-translator/options.html","_blank"),"O")]}function mP(){var e,t,n,r,i,o,a,s,l,c,u,d;let{action:h,args:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(h)switch(arguments.length>1&&void 0!==arguments[1]&&arguments[1]||((e,t)=>{document.querySelectorAll("iframe").forEach(n=>{n.contentWindow.postMessage({action:e,args:t},"*")})})(h,p),ht.debug("process action:",h,p),h){case un:null===(e=this._translator)||void 0===e||e.toggle();break;case dn:null===(t=this._translator)||void 0===t||t.toggleTransOnly();break;case hn:null===(n=this._translator)||void 0===n||n.toggleStyle();break;case"trans_getrule":break;case fn:null===(r=this._translator)||void 0===r||r.updateRule(p);break;case pn:document.dispatchEvent(new CustomEvent(wn,{detail:{action:pn}}));break;case mn:null===(i=this._popupManager)||void 0===i||i.toggle();break;case gn:null===(o=this._transboxManager)||void 0===o||o.toggle(),null===(a=this._translator)||void 0===a||a.toggleTransbox();break;case vn:null===(s=this._translator)||void 0===s||s.toggleMouseHover();break;case yn:null===(l=this._inputTranslator)||void 0===l||l.toggle(),null===(c=this._translator)||void 0===c||c.toggleInputTranslate();break;case"toggle_hover_node":null===(u=this._translator)||void 0===u||u.toggleHoverNode();break;case"input_translate":null===(d=this._inputTranslator)||void 0===d||d.handleTranslate();break;default:return ht.info("Message action is unavailable: ".concat(h)),{error:"Message action is unavailable: ".concat(h)}}}!async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var t,n,r,i,o,a,s;const l=await rr();ht.setLevel(l.logLevel);const c=(null===(t=document)||void 0===t||null===(n=t.contentType)||void 0===n?void 0:n.toLowerCase())||"";if(!c.includes("text")&&!c.includes("html"))return void ht.info("Skip running in document content type: ",c);const u=(null===(r=document)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href)||"";if(e&&(globalThis.GM||(globalThis.GM={xmlHttpRequest:globalThis.GM_xmlhttpRequest,registerMenuCommand:globalThis.GM_registerMenuCommand,unregisterMenuCommand:globalThis.GM_unregisterMenuCommand,setValue:globalThis.GM_setValue,getValue:globalThis.GM_getValue,deleteValue:globalThis.GM_deleteValue,info:globalThis.GM_info}),u.includes("http://localhost:3000/options.html")||u.includes("https://fishjar.github.io/kiss-translator/options.html")))return void function(){var e,t,n;if(null!==(e=GM.info)&&void 0!==e&&null!==(t=e.script)&&void 0!==t&&null!==(n=t.grant)&&void 0!==n&&n.includes("unsafeWindow"))unsafeWindow.GM=GM,unsafeWindow.APP_INFO={name:"KISS Translator",version:"2.0.22"};else{const e=Bn();window.addEventListener(e,Ui),mf("(".concat(Wi,')("').concat(e,'")'),"kiss-translator-options-injector")}}();if(tu(u,l.blacklist))return;if(fr&&!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return!(!t||!t.trim())&&t.split(/\n|,/).some(t=>zn(e,t.trim()))}(u,l.iframeWhitelist))return;tu(u,null===(o=l.tranboxSetting)||void 0===o?void 0:o.blacklist)&&(l.tranboxSetting.transOpen=!1),tu(u,null===(a=l.inputRule)||void 0===a?void 0:a.blacklist)&&(l.inputRule.transOpen=!1),tu(u,null===(s=l.mouseHoverSetting)||void 0===s?void 0:s.blacklist)&&(l.mouseHoverSetting.useMouseHover=!1);const d=await Zc(u,l),p=await async function(e){if(e.highlightWords&&e.highlightWords!==it)try{return Object.keys(await ar())}catch(e){ht.info("get fav words",e)}return[]}(d),f=await lr();if(new YI({setting:l,rule:d,fabConfig:f,favWords:p,isIframe:fr,isUserscript:e}).start(),fr)return;!function(e){let{href:t,setting:n}=e;try{const e=n.subtitleSetting||Pt;if(!e.enabled)return;const r=xf.find(e=>zn(t,e.pattern));if(r){wf(vf,"kiss-translator-inject-subtitle-js");const t=n.transApis.find(t=>t.apiSlug===e.apiSlug)||Re;r.start(h(h({},e),{},{apiSetting:t,transApis:n.transApis,uiLang:n.uiLang}))}}catch(e){ht.error("start subtitle provider failed",e)}}({href:u,setting:l,rule:d,isUserscript:e}),e&&wa(l)}catch(e){console.error("[KISS-Translator]",e),function(e){const t="KISS-Translator-Message",n=document.getElementById(t);n&&n.remove();const r=document.createElement("div");r.id=t,Object.assign(r.style,{position:"fixed",top:"0",left:"0",width:"100%",backgroundColor:"#f44336",color:"white",textAlign:"center",padding:"8px 16px",zIndex:"1001",boxSizing:"border-box",fontSize:"16px",boxShadow:"0 2px 5px rgba(0,0,0,0.2)"});const i=document.createElement("span");i.textContent="×",Object.assign(i.style,{position:"absolute",top:"50%",right:"20px",transform:"translateY(-50%)",cursor:"pointer",fontSize:"22px",fontWeight:"bold"});const o=document.createTextNode("KISS-Translator: ".concat(e));r.appendChild(o),r.appendChild(i),document.body.appendChild(r);const a=()=>{r.style.transition="opacity 0.5s ease",r.style.opacity="0",setTimeout(()=>{r&&r.parentNode&&r.parentNode.removeChild(r)},500)};i.onclick=a,setTimeout(a,1e4)}(e.message)}}(!0)})()})();