KISS Translator

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name          KISS Translator
// @namespace     https://github.com/fishjar/kiss-translator
// @version       2.0.32
// @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://kiss-translator.rayjar.com/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       translation.googleapis.com
// @connect       generativelanguage.googleapis.com
// @connect       api.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       api.ephone.ai
// @connect       ephone.ai
// @connect       translate.volcengine.com
// @connect       translate.api.cloud.yandex.net
// @connect       translate.yandex.net
// @connect       dict.youdao.com
// @connect       api.anthropic.com
// @connect       api.deepseek.com
// @connect       opencode.ai
// @connect       api.siliconflow.cn
// @connect       api.xiaomimimo.com
// @connect       dashscope.aliyuncs.com
// @connect       api.cerebras.ai
// @connect       open.bigmodel.cn
// @connect       api.cloudflare.com
// @connect       openrouter.ai
// @connect       api.orcarouter.ai
// @connect       localhost
// @connect       127.0.0.1
// @run-at        document-end
// ==/UserScript==


(()=>{var e,t,n={32(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6175).A},43(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},73(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(2577).A},171(e,t,n){"use strict";n.d(t,{b:()=>i});n(8661);var r=n(7441);n(5089);function i(e){return(0,r.b)(e)}},252(e,t,n){"use strict";n.d(t,{Zy:()=>a,aQ:()=>o});var r=n(9992);const i="userscript",o=r.vGH.includes(i),a=i===r.tPe;r.n_K,r.ojT,i===r.PT8||r.ojT},288(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(6253)},328(e,t,n){"use strict";n.d(t,{DC:()=>u,EW:()=>y,Ee:()=>E,F_:()=>g,GR:()=>d,Gt:()=>C,I:()=>h,J4:()=>k,K8:()=>A,KD:()=>F,M:()=>S,Qz:()=>i,Rf:()=>p,U3:()=>D,XR:()=>I,_T:()=>c,_V:()=>T,cO:()=>w,gr:()=>m,j7:()=>o,kY:()=>a,k_:()=>x,km:()=>L,mu:()=>b,n1:()=>f,nR:()=>P,sR:()=>_,u2:()=>l,vL:()=>r,wP:()=>v,x2:()=>s});const r="kiss_fetch",i="get_httpcache",o="put_httpcache",a="open_options",s="save_rule",l="toggle_translate",u="toggle_translate_only",c="toggle_styles",d="open_tranbox",h="trans_getrule",p="trans_putrule",f="toggle_transbox",m="toggle_popup",g="toggle_mousehover",v="toggle_hover_node",y="toggle_input_translation",b="input_translate",A="command_shortcuts",x="inject_css",w="builtinai_detect",k="builtinai_translte",S="set_loglevel",E="clear_caches",C="open_separate_window",_="kiss_stream_fetch",T="update_icon",D="sha256",P="kiss_translator_inner",I="kiss_translator",F="kiss_favorite_word_change",L="KISS_XHR_DATA_YOUTUBE"},457(e,t,n){"use strict";n.d(t,{C:()=>u,E:()=>g,T:()=>d,c:()=>f,h:()=>h,w:()=>c});var r=n(8661),i=n(5449),o=n(696),a=n(3385),s=n(4430),l=r.createContext("undefined"!=typeof HTMLElement?(0,i.A)({key:"css"}):null),u=l.Provider,c=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},m=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},g=c(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],u="";"string"==typeof e.className?u=(0,o.Rk)(t.registered,l,e.className):null!=e.className&&(u=e.className+" ");var c=(0,a.J)(l,void 0,r.useContext(d));u+=t.key+"-"+c.name;var f={};for(var g in e)h.call(e,g)&&"css"!==g&&g!==p&&(f[g]=e[g]);return f.className=u,n&&(f.ref=n),r.createElement(r.Fragment,null,r.createElement(m,{cache:t,serialized:c,isStringTag:"string"==typeof s}),r.createElement(s,f))})},609(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},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)}}},727(e,t,n){"use strict";var r=n(8898);t.X4=p,t.e$=f,t.tL=g,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=m;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 u=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 c(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 u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),c({type:s,values:u})}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,c(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 c(e)}function m(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 c(e)}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return h(e)>.5?f(e,t):m(e,t)}},785(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},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"),u=Symbol.for("react.forward_ref"),c=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(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,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 A=b.prototype=new y;A.constructor=b,m(A,v.prototype),A.isPureReactComponent=!0;var x=Array.isArray,w=Object.prototype.hasOwnProperty,k={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function E(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)w.call(t,i)&&!S.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}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:k.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var _=/\/+/g;function T(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 D(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?"."+T(l,0):o,x(a)?(i="",null!=e&&(i=e.replace(_,"$&/")+"/"),D(a,t,i,"",function(e){return e})):null!=a&&(C(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)),t.push(a)),1;if(l=0,o=""===o?".":o+":",x(e))for(var u=0;u<e.length;u++){var c=o+T(s=e[u],u);l+=D(s,t,i,c,a)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=D(s=s.value,t,i,c=o+T(s,u++),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 D(e,r,"","",function(e){return t.call(n,e,i++)}),r}function I(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 F={current:null},L={transition:null},z={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:L,ReactCurrentOwner:k};function O(){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(!C(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=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,t.act=O,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=m({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)w.call(t,u)&&!S.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+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=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:I}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},t.unstable_act=O,t.useCallback=function(e,t){return F.current.useCallback(e,t)},t.useContext=function(e){return F.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return F.current.useDeferredValue(e)},t.useEffect=function(e,t){return F.current.useEffect(e,t)},t.useId=function(){return F.current.useId()},t.useImperativeHandle=function(e,t,n){return F.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return F.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return F.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return F.current.useMemo(e,t)},t.useReducer=function(e,t,n){return F.current.useReducer(e,t,n)},t.useRef=function(e){return F.current.useRef(e)},t.useState=function(e){return F.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return F.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return F.current.useTransition()},t.version="18.3.1"},1093(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(2561).A},1099(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},1152(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(5482);function i(e){return function(){return new o(e.apply(this,arguments))}}function o(e){var t,n;function i(t,n){try{var a=e[t](n),s=a.value,l=s instanceof r.A;Promise.resolve(l?s.v:s).then(function(n){if(l){var r="return"===t?"return":"next";if(!s.k||n.done)return i(r,n);n=e[r](n).value}o(a.done?"return":"normal",n)},function(e){i("throw",e)})}catch(e){o("throw",e)}}function o(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(e,r){return new Promise(function(o,a){var s={key:e,arg:r,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,i(e,r))})},"function"!=typeof e.return&&(this.return=void 0)}o.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},o.prototype.next=function(e){return this._invoke("next",e)},o.prototype.throw=function(e){return this._invoke("throw",e)},o.prototype.return=function(e){return this._invoke("return",e)}},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})},1166(e,t,n){"use strict";function r(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}n.d(t,{$Q:()=>h,IO:()=>x,LR:()=>g,Ln:()=>v,MF:()=>u,Ms:()=>m,Mt:()=>C,NS:()=>i,NW:()=>d,Qv:()=>S,Sk:()=>y,Sm:()=>p,T9:()=>f,dt:()=>o,eg:()=>A,f6:()=>b,if:()=>r,jJ:()=>E,nF:()=>l,sg:()=>s,sz:()=>k,uv:()=>c,wj:()=>w,yy:()=>a});const i=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},o=(e,t)=>0===e.length||e.includes(t)?t:e[0],a=e=>new Promise(t=>{const n=setTimeout(()=>{clearTimeout(n),t()},e)}),s=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},l=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 u=function(){const u=Date.now();s||!1!==r.leading||(s=u);const c=t-(u-s);for(var d=arguments.length,h=new Array(d),p=0;p<d;p++)h[p]=arguments[p];return o=h,a=this,c<=0||c>t?(i&&(clearTimeout(i),i=null),s=u,n=e.apply(a,o),i||(a=o=null)):i||!1===r.trailing||(i=setTimeout(l,c)),n};return u.cancel=()=>{clearTimeout(i),s=0,i=null,a=o=null},u},u=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},c=(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||u(t,"*",r)},d=e=>Object.prototype.toString.call(e).match(/\[object (.*?)\]/)[1].toLowerCase(),h=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("")},p=()=>"kiss-".concat(btoa(Math.random()).slice(3,11)),f=(e,t)=>{const n=new Set([...e,...t]);return n.size===e.size&&n.size===t.size},m=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)},g=(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+([^]+)/)},v=e=>/^[a-zA-Z-]+$/.test(e),y=e=>new Promise(t=>{const n=new FileReader;n.onloadend=()=>t(n.result),n.readAsDataURL(e)}),b=e=>{if(!e||"string"!==d(e))return{};try{return"{"!==e.trim()[0]&&(e="{".concat(e,"}")),JSON.parse(e)}catch(e){}return{}},A=e=>{const t=e.match(/({[^]*}|\[[^]*\])/);return t?t[0]:null},x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return window.requestIdleCallback?requestIdleCallback(e,{timeout:t}):setTimeout(e,t)},w=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))])},k=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(" "))+" …"};function S(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 E(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{}}}const C=e=>/^[\u4e00-\u9fa5]$/.test(e||"")},1223(e,t,n){"use strict";n.d(t,{Lx:()=>s,T:()=>r,_9:()=>o,tc:()=>a});const r=function(){try{return n(9286)}catch(e){}}(),i=()=>{const e=globalThis.__KISS_CONTEXT__;return e||"undefined"},o=()=>"background"===i(),a=()=>"options"===i(),s="LanguageDetector"in globalThis&&"Translator"in globalThis},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},1257(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(32),u=n(171),c=n(7562),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 m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,c.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,u,c,d,h,p,f,m;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==(u=l.pxToRem)?void 0:u.call(l,24))||"1.5rem",large:(null==(c=t.typography)||null==(d=c.pxToRem)?void 0:d.call(c,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==(m=(t.vars||t).palette)||null==(m=m.action)?void 0:m.disabled,inherit:void 0}[n.color]}}),v=i.forwardRef(function(e,t){const n=(0,u.b)({props:e,name:"MuiSvgIcon"}),{children:c,className:d,color:h="inherit",component:v="svg",fontSize:y="medium",htmlColor:b,inheritViewBox:A=!1,titleAccess:x,viewBox:w="0 0 24 24"}=n,k=(0,o.A)(n,m),S=i.isValidElement(c)&&"svg"===c.type,E=(0,r.A)({},n,{color:h,component:v,fontSize:y,instanceFontSize:e.fontSize,inheritViewBox:A,viewBox:w,hasSvgAsChild:S}),C={};A||(C.viewBox=w);const _=(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)})(E);return(0,f.jsxs)(g,(0,r.A)({as:v,className:(0,a.A)(_.root,d),focusable:"false",color:b,"aria-hidden":!x||void 0,role:x?"img":void 0,ref:t},C,k,S&&c.props,{ownerState:E,children:[S?c.props.children:c,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))}},1270(e,t,n){"use strict";n.d(t,{n:()=>o});const r=e=>String(e).toLowerCase().replace(/[’‘]/g,"'").replace(/[-‐–—]/g," ").split(/\s+/).map(e=>e.replace(/(?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u065F\u066A-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07BF\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u0890-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0965\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09E5\u09F2\u09F3\u09FA\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A65\u0A70\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AE5\u0AF0-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B65\u0B70\u0B78-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0BE5\u0BF3-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5E\u0C5F\u0C62-\u0C65\u0C70-\u0C77\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDB\u0CDF\u0CE2-\u0CE5\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57\u0D62-\u0D65\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DE5\u0DF0-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F1F\u0F34-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u104A-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u1368\u137D-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u17DF\u17EA-\u17EF\u17FA-\u180F\u181A-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19FF\u1A17-\u1A1F\u1A55-\u1A7F\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B4F\u1B5A-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BFF\u1C24-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C8B-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u206F\u2072\u2073\u207A-\u207E\u208A-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A-\u245F\u249C-\u24E9\u2500-\u2775\u2794-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFC\u2CFE\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3008-\u3020\u302A-\u3030\u3036\u3037\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u3191\u3196-\u319F\u31C0-\u31EF\u3200-\u321F\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6F0-\uA716\uA720\uA721\uA789\uA78A\uA7DD-\uA7F0\uA802\uA806\uA80B\uA823-\uA82F\uA836-\uA83F\uA874-\uA881\uA8B4-\uA8CF\uA8DA-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9DA-\uA9DF\uA9E5\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD06\uDD34-\uDD3F\uDD79-\uDD89\uDD8C-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEE0\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDBF\uDDF4-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC57\uDC77\uDC78\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1F\uDD3A-\uDD3F\uDD5A-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE3F\uDE49-\uDE5F\uDE7F\uDEA0-\uDEBF\uDEC8\uDEE5-\uDEEA\uDEF0-\uDEFF\uDF36-\uDF3F\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD24-\uDD2F\uDD3A-\uDD3F\uDD66-\uDD6E\uDD86-\uDE5F\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEC1\uDEC8-\uDEFF\uDF28-\uDF2F\uDF46-\uDF50\uDF55-\uDF6F\uDF82-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC51\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDD02\uDD27-\uDD35\uDD40-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDCF\uDDDB\uDDDD-\uDDE0\uDDF5-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDEEF\uDEFA-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDF7F\uDF8A\uDF8C\uDF8D\uDF8F\uDFB6\uDFB8-\uDFD0\uDFD2\uDFD4-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC4F\uDC5A-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEBF\uDECA-\uDECF\uDEE4-\uDEFF\uDF1B-\uDF2F\uDF3C-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFBF\uDFE1-\uDFEF\uDFFA-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC4F\uDC6D-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDD9F\uDDAA-\uDDAF\uDDDC-\uDDDF\uDDEA-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDF4F\uDF5A-\uDFAF\uDFB1-\uDFBF\uDFD5-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD812-\uD817\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD836\uD83D\uD83F\uD87C\uD87D\uD87F\uD88E-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDC5F]|\uD810[\uDFFB-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD818[\uDC00-\uDCFF\uDD1E-\uDD2F\uDD3A-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6F\uDEBF\uDECA-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDD3F\uDD6D-\uDD6F\uDD7A-\uDE3F\uDE97-\uDE9F\uDEB9\uDEBA\uDED4-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFF1\uDFF7-\uDFFF]|\uD823[\uDCD6-\uDCFE\uDD1F-\uDD7F\uDDF3-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD833[\uDC00-\uDCEF\uDCFA-\uDFFF]|\uD834[\uDC00-\uDEBF\uDED4-\uDEDF\uDEF4-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDEEF\uDEFA-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDCEF\uDCFA-\uDDCF\uDDEE\uDDEF\uDDFB-\uDEBF\uDEDF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5-\uDEFD\uDF00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD0-\uDCFF\uDD44-\uDD4A\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCAC\uDCB0\uDCB5-\uDD00\uDD2E\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEAE\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD88D[\uDC7A-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,"")).filter(Boolean),i=(e,t,n)=>Math.max(t,Math.min(e,n)),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[],n=[];for(let i=0;i<e.length;i++){n[i]=t.length;for(const n of r(String(null!==(o=null===(a=e[i])||void 0===a?void 0:a.text)&&void 0!==o?o:""))){var o,a;t.push({w:n,ei:i})}}const s=(e,n)=>{if(e<0||e+n.length>t.length)return!1;for(let r=0;r<n.length;r++)if(t[e+r].w!==n[r])return!1;return!0};return{realign:(o,a,l)=>{const u=r(l),c=u.length;if(c<2||0===t.length)return null;const d=i(o,0,e.length-1),h=i(a,d,e.length-1),p=[];for(let e=n[d];e<t.length&&t[e].ei<=h;e++)p.push(t[e].w);if(p.length===c&&p.every((e,t)=>e===u[t]))return null;const f=i(n[d],0,t.length-1),m=u.slice(-Math.min(3,c)),g=2===c?[0]:[0,1,2].filter(e=>e+3<=c),v=new Map;for(const e of g){const n=2===c?u.slice(0,2):u.slice(e,e+3),r=Math.max(0,f-32),i=Math.min(t.length-n.length,f+32);for(let o=r;o<=i;o++){if(!s(o,n))continue;const r=o-e;if(r<0)continue;const i=r+c-1;if(i>=t.length)continue;const a=r+c-m.length;let l=!1,u=i;for(let e=0;e<=4&&!l;e++){const t=0===e?[a]:[a-e,a+e];for(const e of t)if(e>=r&&s(e,m)){l=!0,u=e+m.length-1;break}}const d={startPos:r,endPos:u,tailOK:l,offset:e,dist:Math.abs(r-f)};v.has(r)||v.set(r,d)}}const y=[...v.values()];if(!y.length)return null;if(2===c&&y.length>1)return null;const b=y.filter(e=>e.tailOK);let A=null;if(b.length){b.sort((e,t)=>(e.offset>0)-(t.offset>0)||e.dist-t.dist);const[e,t]=b;if(t&&Boolean(e.offset>0)===Boolean(t.offset>0)&&e.dist===t.dist)return null;A=e}else{if(1!==y.length||0!==y[0].offset||c<3)return null;A=y[0]}const x=t[A.startPos].ei,w=Math.max(x,t[A.endPos].ei);return x===d&&w===h?null:{startIdx:x,endIdx:w}}}}},1296(e,t,n){"use strict";n.r(t),n.d(t,{GlobalStyles:()=>w.A,StyledEngineProvider:()=>x,ThemeContext:()=>i.T,css:()=>v.AH,default:()=>k,internal_processStyles:()=>S,internal_serializeStyles:()=>C,keyframes:()=>v.i7});var r=n(4320),i=n(457),o=n(3385),a=n(4430),s=n(696),l=n(8661),u=n(7601),c=/^((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,u.A)(function(e){return c.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},m=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},g=function e(t,n){var a,u,c=t.__emotion_real===t,d=c&&t.__emotion_base||t;void 0!==n&&(a=n.label,u=n.target);var h=f(t,n,c),g=h||p(d),v=!g("as");return function(){var y=arguments,b=c&&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 A=y[0];b.push(A[0]);for(var x=y.length,w=1;w<x;w++)b.push(y[w],A[w])}var k=(0,i.w)(function(e,t,n){var r=v&&e.as||d,a="",c=[],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,c,e.className):null!=e.className&&(a=e.className+" ");var A=(0,o.J)(b.concat(c),t.registered,f);a+=t.key+"-"+A.name,void 0!==u&&(a+=" "+u);var x=v&&void 0===h?p(r):g,w={};for(var k in e)v&&"as"===k||x(k)&&(w[k]=e[k]);return w.className=a,n&&(w.ref=n),l.createElement(l.Fragment,null,l.createElement(m,{cache:t,serialized:A,isStringTag:"string"==typeof r}),l.createElement(r,w))});return k.displayName=void 0!==a?a:"Styled("+("string"==typeof d?d:d.displayName||d.name||"Component")+")",k.defaultProps=t.defaultProps,k.__emotion_real=k,k.__emotion_base=d,k.__emotion_styles=b,k.__emotion_forwardProp=h,Object.defineProperty(k,"toString",{value:function(){return"."+u}}),k.withComponent=function(t,i){return e(t,(0,r.A)({},n,i,{shouldForwardProp:f(k,i,!0)})).apply(void 0,b)},k}}.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){g[e]=g(e)});var v=n(1834),y=n(5449),b=n(5089);const A=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&&A.has(e))return A.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 A.set(e,r),r},[t,n]);return t||n?(0,b.jsx)(i.C,{value:o,children:r}):r}var w=n(7802);function k(e,t){return g(e,t)}const S=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},E=[];function C(e){return E[0]=e,(0,o.J)(E)}},1367(e,t,n){"use strict";n.d(t,{$E:()=>f,As:()=>o,ED:()=>b,Hz:()=>v,Qs:()=>c,Rr:()=>A,SX:()=>g,TY:()=>s,VE:()=>y,Vf:()=>i,WD:()=>l,_s:()=>d,e:()=>p,hr:()=>a,ms:()=>u,ns:()=>r,p5:()=>w,q_:()=>x,zM:()=>m,zw:()=>h});const r="style_none",i="under_line",o="dot_line",a="dash_line",s="dash_line_bold",l="dash_box",u="dash_box_bold",c="wavy_line",d="wavy_line_bold",h="marker",p="gradient_marker",f="fuzzy",m="highlight",g="blockquote",v="gradient",y="blink",b="glow",A="colorful",x=[r,i,o,a,s,c,d,l,u,h,p,f,m,g,v,y,b,A],w=[{styleSlug:"custom",styleName:"Custom Style",styleCode:"color: #209CEE;"}]},1442(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(5482);function i(e){return new r.A(e,0)}},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){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var c=!("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 m(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 g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){g[e]=new m(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new m(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new m(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new m(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new m(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new m(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=g.hasOwnProperty(t)?g[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);g[t]=new m(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);g[t]=new m(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);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)});var A=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),w=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),_=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),F=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var L=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var z=Symbol.iterator;function O(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=z&&e[z]||e["@@iterator"])?e:null}var N,j=Object.assign;function R(e){if(void 0===N)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return"\n"+N+e}var M=!1;function B(e,t){if(!e||M)return"";M=!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{M=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?R(e):""}function W(e){switch(e.tag){case 5:return R(e.type);case 16:return R("Lazy");case 13:return R("Suspense");case 19:return R("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(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 k:return"Fragment";case w:return"Portal";case E:return"Profiler";case S:return"StrictMode";case D:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case _:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case I:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return U(e(t))}catch(e){}}return null}function H(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===S?"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 V(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 K(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 q(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 Y(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 X(e,t){var n=t.checked;return j({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function $(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(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=V(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,V(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&&Y(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=""+V(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 j({},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:V(n)}}function oe(e,t){var n=V(t.value),r=V(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 ue,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.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 ce(e,t)})}:ce);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 me(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 ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(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=j({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function 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 Ae=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,ke=null,Se=null;function Ee(e){if(e=bi(e)){if("function"!=typeof we)throw Error(o(280));var t=e.stateNode;t&&(t=xi(t),we(e.stateNode,e.type,t))}}function Ce(e){ke?Se?Se.push(e):Se=[e]:ke=e}function _e(){if(ke){var e=ke,t=Se;if(Se=ke=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Te(e,t){return e(t)}function De(){}var Pe=!1;function Ie(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return Te(e,t,n)}finally{Pe=!1,(null!==ke||null!==Se)&&(De(),_e())}}function Fe(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 Le=!1;if(c)try{var ze={};Object.defineProperty(ze,"passive",{get:function(){Le=!0}}),window.addEventListener("test",ze,ze),window.removeEventListener("test",ze,ze)}catch(ce){Le=!1}function Oe(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var Ne=!1,je=null,Re=!1,Me=null,Be={onError:function(e){Ne=!0,je=e}};function We(e,t,n,r,i,o,a,s,l){Ne=!1,je=null,Oe.apply(Be,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 He(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 Ve(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 Ve(i),e;if(a===r)return Ve(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))?Ke(e):null}function Ke(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ke(e);if(null!==t)return t;e=e.sibling}return null}var qe=i.unstable_scheduleCallback,Ye=i.unstable_cancelCallback,Xe=i.unstable_shouldYield,$e=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 ut=64,ct=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 mt(){var e=ut;return!(4194240&(ut<<=1))&&(ut=64),e}function gt(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 At(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var xt,wt,kt,St,Et,Ct=!1,_t=[],Tt=null,Dt=null,Pt=null,It=new Map,Ft=new Map,Lt=[],zt="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 Ot(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Dt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":It.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ft.delete(t.pointerId)}}function Nt(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))&&wt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function jt(e){var t=yi(e.target);if(null!==t){var n=Ue(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void Et(e.priority,function(){kt(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 Rt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&wt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Ae=r,n.target.dispatchEvent(r),Ae=null,t.shift()}return!0}function Mt(e,t,n){Rt(e)&&n.delete(t)}function Bt(){Ct=!1,null!==Tt&&Rt(Tt)&&(Tt=null),null!==Dt&&Rt(Dt)&&(Dt=null),null!==Pt&&Rt(Pt)&&(Pt=null),It.forEach(Mt),Ft.forEach(Mt)}function Wt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Bt)))}function Ut(e){function t(t){return Wt(t,e)}if(0<_t.length){Wt(_t[0],e);for(var n=1;n<_t.length;n++){var r=_t[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&Wt(Tt,e),null!==Dt&&Wt(Dt,e),null!==Pt&&Wt(Pt,e),It.forEach(t),Ft.forEach(t),n=0;n<Lt.length;n++)(r=Lt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Lt.length&&null===(n=Lt[0]).blockedOn;)jt(n),null===n.blockedOn&&Lt.shift()}var Ht=A.ReactCurrentBatchConfig,Vt=!0;function Gt(e,t,n,r){var i=bt,o=Ht.transition;Ht.transition=null;try{bt=1,qt(e,t,n,r)}finally{bt=i,Ht.transition=o}}function Kt(e,t,n,r){var i=bt,o=Ht.transition;Ht.transition=null;try{bt=4,qt(e,t,n,r)}finally{bt=i,Ht.transition=o}}function qt(e,t,n,r){if(Vt){var i=Xt(e,t,n,r);if(null===i)Vr(e,t,r,Yt,n),Ot(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Tt=Nt(Tt,e,t,n,r,i),!0;case"dragenter":return Dt=Nt(Dt,e,t,n,r,i),!0;case"mouseover":return Pt=Nt(Pt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return It.set(o,Nt(It.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Ft.set(o,Nt(Ft.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Ot(e,r),4&t&&-1<zt.indexOf(e)){for(;null!==i;){var o=bi(i);if(null!==o&&xt(o),null===(o=Xt(e,t,n,r))&&Vr(e,t,r,Yt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Vr(e,t,r,null,n)}}var Yt=null;function Xt(e,t,n,r){if(Yt=null,null!==(e=yi(e=xe(r))))if(null===(t=Ue(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(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 Yt=e,null}function $t(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 j(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,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=on(un),dn=j({},un,{view:0,detail:0}),hn=on(dn),pn=j({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,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),mn=on(j({},pn,{dataTransfer:0})),gn=on(j({},dn,{relatedTarget:0})),vn=on(j({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=j({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(yn),An=on(j({},un,{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"},wn={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"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=kn[e])&&!!t[e]}function En(){return Sn}var Cn=j({},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?wn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,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}}),_n=on(Cn),Tn=on(j({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Dn=on(j({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Pn=on(j({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=j({},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}),Fn=on(In),Ln=[9,13,27,32],zn=c&&"CompositionEvent"in window,On=null;c&&"documentMode"in document&&(On=document.documentMode);var Nn=c&&"TextEvent"in window&&!On,jn=c&&(!zn||On&&8<On&&11>=On),Rn=String.fromCharCode(32),Mn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Ln.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 Hn={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 Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Gn(e,t,n,r){Ce(r),0<(t=Kr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,qn=null;function Yn(e){Rr(e,0)}function Xn(e){if(q(Ai(e)))return e}function $n(e,t){if("change"===e)return t}var Jn=!1;if(c){var Qn;if(c){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(){Kn&&(Kn.detachEvent("onpropertychange",nr),qn=Kn=null)}function nr(e){if("value"===e.propertyName&&Xn(qn)){var t=[];Gn(t,qn,e,xe(e)),Ie(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),qn=n,(Kn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(qn)}function or(e,t){if("click"===e)return Xn(t)}function ar(e,t){if("input"===e||"change"===e)return Xn(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 ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(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=ur(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=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Y((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=cr(n,o);var a=cr(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 mr=c&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,yr=null,br=!1;function Ar(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==Y(r)||("selectionStart"in(r=gr)&&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=Kr(vr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wr={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},kr={},Sr={};function Er(e){if(kr[e])return kr[e];if(!wr[e])return e;var t,n=wr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return kr[e]=n[t];return e}c&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var Cr=Er("animationend"),_r=Er("animationiteration"),Tr=Er("animationstart"),Dr=Er("transitionend"),Pr=new Map,Ir="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 Fr(e,t){Pr.set(e,t),l(t,[e])}for(var Lr=0;Lr<Ir.length;Lr++){var zr=Ir[Lr];Fr(zr.toLowerCase(),"on"+(zr[0].toUpperCase()+zr.slice(1)))}Fr(Cr,"onAnimationEnd"),Fr(_r,"onAnimationIteration"),Fr(Tr,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(Dr,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("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 Or="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(" "),Nr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function jr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,u){if(We.apply(this,arguments),Ne){if(!Ne)throw Error(o(198));var c=je;Ne=!1,je=null,Re||(Re=!0,Me=c)}}(r,t,void 0,e),e.currentTarget=null}function Rr(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,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;jr(i,s,u),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;jr(i,s,u),o=l}}}if(Re)throw e=Me,Re=!1,Me=null,e}function Mr(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),Hr(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&&(Nr.has(t)||Br(t,!1,e),Br(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Wr]||(t[Wr]=!0,Br("selectionchange",!1,t))}}function Hr(e,t,n,r){switch($t(t)){case 1:var i=Gt;break;case 4:i=Kt;break;default:i=qt}n=i.bind(null,t,n,e),i=void 0,!Le||"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 Vr(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}Ie(function(){var r=o,i=xe(n),a=[];e:{var s=Pr.get(e);if(void 0!==s){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=_n;break;case"focusin":u="focus",l=gn;break;case"focusout":u="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;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=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Dn;break;case Cr:case _r:case Tr:l=vn;break;case Dr:l=Pn;break;case"scroll":l=hn;break;case"wheel":l=Fn;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=Tn}var c=!!(4&t),d=!c&&"scroll"===e,h=c?null!==s?s+"Capture":null:s;c=[];for(var p,f=r;null!==f;){var m=(p=f).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==h&&(null!=(m=Fe(f,h))&&c.push(Gr(f,m,p)))),d)break;f=f.return}0<c.length&&(s=new l(s,u,null,n,i),a.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Ae||!(u=n.relatedTarget||n.fromElement)||!yi(u)&&!u[fi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?yi(u):null)&&(u!==(d=Ue(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=fn,m="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,m="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?s:Ai(l),p=null==u?s:Ai(u),(s=new c(m,f+"leave",l,n,i)).target=d,s.relatedTarget=p,m=null,yi(i)===r&&((c=new c(h,f+"enter",u,n,i)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(h=u,f=0,p=c=l;p;p=qr(p))f++;for(p=0,m=h;m;m=qr(m))p++;for(;0<f-p;)c=qr(c),f--;for(;0<p-f;)h=qr(h),p--;for(;f--;){if(c===h||null!==h&&c===h.alternate)break e;c=qr(c),h=qr(h)}c=null}else c=null;null!==l&&Yr(a,s,l,c,!1),null!==u&&null!==d&&Yr(a,d,u,c,!0)}if("select"===(l=(s=r?Ai(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=$n;else if(Vn(s))if(Jn)g=ar;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=or);switch(g&&(g=g(e,r))?Gn(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?Ai(r):window,e){case"focusin":(Vn(v)||"true"===v.contentEditable)&&(gr=v,vr=r,yr=null);break;case"focusout":yr=vr=gr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,Ar(a,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":Ar(a,n,i)}var y;if(zn)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?Bn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(jn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=en()):(Qt="value"in(Jt=i)?Jt.value:Jt.textContent,Un=!0)),0<(v=Kr(r,b)).length&&(b=new An(b,e,null,n,i),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Wn(n))&&(b.data=y))),(y=Nn?function(e,t){switch(e){case"compositionend":return Wn(t);case"keypress":return 32!==t.which?null:(Mn=!0,Rn);case"textInput":return(e=t.data)===Rn&&Mn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!zn&&Bn(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 jn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Kr(r,"onBeforeInput")).length&&(i=new An("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Rr(a,t)})}function Gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kr(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=Fe(e,n))&&r.unshift(Gr(e,o,i)),null!=(o=Fe(e,t))&&r.push(Gr(e,o,i))),e=e.return}return r}function qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,i?null!=(l=Fe(n,o))&&a.unshift(Gr(n,l,s)):i||null!=(l=Fe(n,o))&&a.push(Gr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Xr=/\r\n?/g,$r=/\u0000|\uFFFD/g;function Jr(e){return("string"==typeof e?e:""+e).replace(Xr,"\n").replace($r,"")}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 ui(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 ci(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,mi="__reactEvents$"+di,gi="__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=ci(e);null!==e;){if(n=e[hi])return n;e=ci(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 Ai(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function xi(e){return e[pi]||null}var wi=[],ki=-1;function Si(e){return{current:e}}function Ei(e){0>ki||(e.current=wi[ki],wi[ki]=null,ki--)}function Ci(e,t){ki++,wi[ki]=e.current,e.current=t}var _i={},Ti=Si(_i),Di=Si(!1),Pi=_i;function Ii(e,t){var n=e.type.contextTypes;if(!n)return _i;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 Fi(e){return null!=(e=e.childContextTypes)}function Li(){Ei(Di),Ei(Ti)}function zi(e,t,n){if(Ti.current!==_i)throw Error(o(168));Ci(Ti,t),Ci(Di,n)}function Oi(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,H(e)||"Unknown",i));return j({},n,r)}function Ni(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_i,Pi=Ti.current,Ci(Ti,e),Ci(Di,Di.current),!0}function ji(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Oi(e,t,Pi),r.__reactInternalMemoizedMergedChildContext=e,Ei(Di),Ei(Ti),Ci(Ti,e)):Ei(Di),Ci(Di,n)}var Ri=null,Mi=!1,Bi=!1;function Wi(e){null===Ri?Ri=[e]:Ri.push(e)}function Ui(){if(!Bi&&null!==Ri){Bi=!0;var e=0,t=bt;try{var n=Ri;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ri=null,Mi=!1}catch(t){throw null!==Ri&&(Ri=Ri.slice(e+1)),qe(Ze,Ui),t}finally{bt=t,Bi=!1}}return null}var Hi=[],Vi=0,Gi=null,Ki=0,qi=[],Yi=0,Xi=null,$i=1,Ji="";function Qi(e,t){Hi[Vi++]=Ki,Hi[Vi++]=Gi,Gi=e,Ki=t}function Zi(e,t,n){qi[Yi++]=$i,qi[Yi++]=Ji,qi[Yi++]=Xi,Xi=e;var r=$i;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,$i=1<<32-at(t)+i|n<<i|r,Ji=o+e}else $i=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=Hi[--Vi],Hi[Vi]=null,Ki=Hi[--Vi],Hi[Vi]=null;for(;e===Xi;)Xi=qi[--Yi],qi[Yi]=null,Ji=qi[--Yi],qi[Yi]=null,$i=qi[--Yi],qi[Yi]=null}var no=null,ro=null,io=!1,oo=null;function ao(e,t){var n=Pu(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=ui(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!==Xi?{id:$i,overflow:Ji}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Pu(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 uo(e){if(io){var t=ro;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ui(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 co(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 co(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=ui(t.nextSibling)}if(co(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=ui(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ui(e.stateNode.nextSibling):null;return!0}function po(){for(var e=ro;e;)e=ui(e.nextSibling)}function fo(){ro=no=null,io=!1}function mo(e){null===oo?oo=[e]:oo.push(e)}var go=A.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 Ao(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=Fu(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=Nu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var o=n.type;return o===k?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===F&&bo(o)===t.type)?((r=i(t,n.props)).ref=vo(e,t,n),r.return=e,r):((r=Lu(n.type,n.key,n.props,null,e.mode,r)).ref=vo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=ju(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=zu(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=Nu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Lu(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case w:return(t=ju(t,e.mode,n)).return=e,t;case F:return h(e,(0,t._init)(t._payload),n)}if(te(t)||O(t))return(t=zu(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?u(e,t,n,r):null;case w:return n.key===i?c(e,t,n,r):null;case F:return p(e,t,(i=n._init)(n._payload),r)}if(te(n)||O(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 u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case F:return f(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||O(r))return d(t,e=e.get(n)||null,r,i,null);yo(t,r)}return null}function m(i,o,s,l){for(var u=null,c=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=p(i,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,m),null===c?u=v:c.sibling=v,c=v,d=g}if(m===s.length)return n(i,d),io&&Qi(i,m),u;if(null===d){for(;m<s.length;m++)null!==(d=h(i,s[m],l))&&(o=a(d,o,m),null===c?u=d:c.sibling=d,c=d);return io&&Qi(i,m),u}for(d=r(i,d);m<s.length;m++)null!==(g=f(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach(function(e){return t(i,e)}),io&&Qi(i,m),u}function g(i,s,l,u){var c=O(l);if("function"!=typeof c)throw Error(o(150));if(null==(l=c.call(l)))throw Error(o(151));for(var d=c=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=p(i,m,y.value,u);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=a(b,s,g),null===d?c=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),io&&Qi(i,g),c;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(i,y.value,u))&&(s=a(y,s,g),null===d?c=y:d.sibling=y,d=y);return io&&Qi(i,g),c}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=f(m,i,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(i,e)}),io&&Qi(i,g),c}return function e(r,o,a,l){if("object"==typeof a&&null!==a&&a.type===k&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case x:e:{for(var u=a.key,c=o;null!==c;){if(c.key===u){if((u=a.type)===k){if(7===c.tag){n(r,c.sibling),(o=i(c,a.props.children)).return=r,r=o;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===F&&bo(u)===c.type){n(r,c.sibling),(o=i(c,a.props)).ref=vo(r,c,a),o.return=r,r=o;break e}n(r,c);break}t(r,c),c=c.sibling}a.type===k?((o=zu(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=Lu(a.type,a.key,a.props,null,r.mode,l)).ref=vo(r,o,a),l.return=r,r=l)}return s(r);case w:e:{for(c=a.key;null!==o;){if(o.key===c){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=ju(a,r.mode,l)).return=r,r=o}return s(r);case F:return e(r,o,(c=a._init)(a._payload),l)}if(te(a))return m(r,o,a,l);if(O(a))return g(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=Nu(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var xo=Ao(!0),wo=Ao(!1),ko=Si(null),So=null,Eo=null,Co=null;function _o(){Co=Eo=So=null}function To(e){var t=ko.current;Ei(ko),e._currentValue=t}function Do(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){So=e,Co=Eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Io(e){var t=e._currentValue;if(Co!==e)if(e={context:e,memoizedValue:t,next:null},null===Eo){if(null===So)throw Error(o(308));Eo=e,So.dependencies={lanes:0,firstContext:e}}else Eo=Eo.next=e;return t}var Fo=null;function Lo(e){null===Fo?Fo=[e]:Fo.push(e)}function zo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Lo(t)):(n.next=i.next,i.next=n),t.interleaved=n,Oo(e,r)}function Oo(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 No=!1;function jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ro(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 Mo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&_l){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Oo(e,n)}return null===(i=r.interleaved)?(t.next=t,Lo(r)):(t.next=i.next,i.next=t),r.interleaved=t,Oo(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 Ho(e,t,n,r){var i=e.updateQueue;No=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?o=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,c=u=l=null,s=o;;){var h=s.lane,p=s.eventTime;if((r&h)===h){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,m=s;switch(h=t,p=n,m.tag){case 1:if("function"==typeof(f=m.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=m.payload)?f.call(p,d,h):f))break e;d=j({},d,h);break e;case 2:No=!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===c?(u=c=p,l=d):c=c.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===c&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Ol|=a,e.lanes=a,e.memoizedState=d}}function Vo(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={},Ko=Si(Go),qo=Si(Go),Yo=Si(Go);function Xo(e){if(e===Go)throw Error(o(174));return e}function $o(e,t){switch(Ci(Yo,t),Ci(qo,e),Ci(Ko,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)}Ei(Ko),Ci(Ko,t)}function Jo(){Ei(Ko),Ei(qo),Ei(Yo)}function Qo(e){Xo(Yo.current);var t=Xo(Ko.current),n=le(t,e.type);t!==n&&(Ci(qo,e),Ci(Ko,n))}function Zo(e){qo.current===e&&(Ei(Ko),Ei(qo))}var ea=Si(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=A.ReactCurrentDispatcher,oa=A.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ua=null,ca=!1,da=!1,ha=0,pa=0;function fa(){throw Error(o(321))}function ma(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 ga(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,ua=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,ua=la=sa=null,ca=!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===ua?sa.memoizedState=ua=e:ua=ua.next=e,ua}function ba(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ua?sa.memoizedState:ua.next;if(null!==t)ua=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===ua?sa.memoizedState=ua=e:ua=ua.next=e}return ua}function Aa(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,u=null,c=a;do{var d=c.lane;if((aa&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=h,s=r):u=u.next=h,sa.lanes|=d,Ol|=d}c=c.next}while(null!==c&&c!==a);null===u?s=r:u.next=l,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,sa.lanes|=a,Ol|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wa(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 ka(){}function Sa(e,t){var n=sa,r=ba(),i=t(),a=!sr(r.memoizedState,i);if(a&&(r.memoizedState=i,bs=!0),r=r.queue,Na(_a.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ua&&1&ua.memoizedState.tag){if(n.flags|=2048,Ia(9,Ca.bind(null,n,r,i,t),void 0,null),null===Tl)throw Error(o(349));30&aa||Ea(n,t,i)}return i}function Ea(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 Ca(e,t,n,r){t.value=n,t.getSnapshot=r,Ta(t)&&Da(e)}function _a(e,t,n){return n(function(){Ta(t)&&Da(e)})}function Ta(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(e){return!0}}function Da(e){var t=Oo(e,1);null!==t&&tu(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:Aa,lastRenderedState:e},t.queue=e,e=e.dispatch=Ya.bind(null,sa,e),[t.memoizedState,e]}function Ia(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 Fa(){return ba().memoizedState}function La(e,t,n,r){var i=ya();sa.flags|=e,i.memoizedState=Ia(1|t,n,void 0,void 0===r?null:r)}function za(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&&ma(r,a.deps))return void(i.memoizedState=Ia(t,n,o,r))}sa.flags|=e,i.memoizedState=Ia(1|t,n,o,r)}function Oa(e,t){return La(8390656,8,e,t)}function Na(e,t){return za(2048,8,e,t)}function ja(e,t){return za(4,2,e,t)}function Ra(e,t){return za(4,4,e,t)}function Ma(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 Ba(e,t,n){return n=null!=n?n.concat([e]):null,za(4,4,Ma.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&&ma(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ha(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Va(e,t,n){return 21&aa?(sr(n,t)||(n=mt(),sa.lanes|=n,Ol|=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 Ka(){return ba().memoizedState}function qa(e,t,n){var r=eu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xa(e))$a(t,n);else if(null!==(n=zo(e,t,n,r))){tu(n,e,r,Zl()),Ja(n,t,r)}}function Ya(e,t,n){var r=eu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xa(e))$a(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,Lo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=zo(e,t,i,r))&&(tu(n,e,r,i=Zl()),Ja(n,t,r))}}function Xa(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function $a(e,t){da=ca=!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:Io,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:Io,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:Io,useEffect:Oa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,La(4194308,4,Ma.bind(null,t,e),n)},useLayoutEffect:function(e,t){return La(4194308,4,e,t)},useInsertionEffect:function(e,t){return La(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=qa.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===Tl)throw Error(o(349));30&aa||Ea(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Oa(_a.bind(null,r,a,e),[e]),r.flags|=2048,Ia(9,Ca.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=Tl.identifierPrefix;if(io){var n=Ji;t=":"+t+"R"+(n=($i&~(1<<32-at($i)-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:Io,useCallback:Ua,useContext:Io,useEffect:Na,useImperativeHandle:Ba,useInsertionEffect:ja,useLayoutEffect:Ra,useMemo:Ha,useReducer:xa,useRef:Fa,useState:function(){return xa(Aa)},useDebugValue:Wa,useDeferredValue:function(e){return Va(ba(),la.memoizedState,e)},useTransition:function(){return[xa(Aa)[0],ba().memoizedState]},useMutableSource:ka,useSyncExternalStore:Sa,useId:Ka,unstable_isNewReconciler:!1},ts={readContext:Io,useCallback:Ua,useContext:Io,useEffect:Na,useImperativeHandle:Ba,useInsertionEffect:ja,useLayoutEffect:Ra,useMemo:Ha,useReducer:wa,useRef:Fa,useState:function(){return wa(Aa)},useDebugValue:Wa,useDeferredValue:function(e){var t=ba();return null===la?t.memoizedState=e:Va(t,la.memoizedState,e)},useTransition:function(){return[wa(Aa)[0],ba().memoizedState]},useMutableSource:ka,useSyncExternalStore:Sa,useId:Ka,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=j({},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:j({},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=eu(e),o=Mo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Bo(e,o,i))&&(tu(t,e,i,r),Wo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Zl(),i=eu(e),o=Mo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Bo(e,o,i))&&(tu(t,e,i,r),Wo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Zl(),r=eu(e),i=Mo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Bo(e,i,r))&&(tu(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=_i,o=t.contextType;return"object"==typeof o&&null!==o?o=Io(o):(i=Fi(t)?Pi:Ti.current,o=(r=null!=(r=t.contextTypes))?Ii(e,i):_i),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={},jo(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Io(o):(o=Fi(t)?Pi:Ti.current,i.context=Ii(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),Ho(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function us(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 cs(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=Mo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),ds(0,t)},n}function fs(e,t,n){(n=Mo(-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 ms(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=Su.bind(null,e,t,n),t.then(e,e))}function gs(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=Mo(-1,1)).tag=2,Bo(n,t,1))),n.lanes|=1),e)}var ys=A.ReactCurrentOwner,bs=!1;function As(e,t,n,r){t.child=null===e?wo(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=ga(e,t,n,r,o,i),n=va(),null===e||bs?(io&&n&&eo(t),t.flags|=1,As(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hs(e,t,i))}function ws(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Iu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Lu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,ks(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 Hs(e,t,i)}return t.flags|=1,(e=Fu(o,r)).ref=t.ref,e.return=t,t.child=e}function ks(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,Hs(e,t,i);131072&e.flags&&(bs=!0)}}return Cs(e,t,n,r,i)}function Ss(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,Ci(Fl,Il),Il|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ci(Fl,Il),Il|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ci(Fl,Il),Il|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ci(Fl,Il),Il|=r;return As(e,t,i,n),t.child}function Es(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Cs(e,t,n,r,i){var o=Fi(n)?Pi:Ti.current;return o=Ii(t,o),Po(t,i),n=ga(e,t,n,r,o,i),r=va(),null===e||bs?(io&&r&&eo(t),t.flags|=1,As(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hs(e,t,i))}function _s(e,t,n,r,i){if(Fi(n)){var o=!0;Ni(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,u=n.contextType;"object"==typeof u&&null!==u?u=Io(u):u=Ii(t,u=Fi(n)?Pi:Ti.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&ss(t,a,r,u),No=!1;var h=t.memoizedState;a.state=h,Ho(t,r,a,i),l=t.memoizedState,s!==r||h!==l||Di.current||No?("function"==typeof c&&(rs(t,n,c,r),l=t.memoizedState),(s=No||os(t,n,s,r,h,l,u))?(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=u,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ro(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ns(t.type,s),a.props=u,d=t.pendingProps,h=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Io(l):l=Ii(t,l=Fi(n)?Pi:Ti.current);var p=n.getDerivedStateFromProps;(c="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),No=!1,h=t.memoizedState,a.state=h,Ho(t,r,a,i);var f=t.memoizedState;s!==d||h!==f||Di.current||No?("function"==typeof p&&(rs(t,n,p,r),f=t.memoizedState),(u=No||os(t,n,u,r,h,f,l)||!1)?(c||"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=u):("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 Ts(e,t,n,r,o,i)}function Ts(e,t,n,r,i,o){Es(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&ji(t,n,!1),Hs(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)):As(e,t,s,o),t.memoizedState=r.state,i&&ji(t,n,!0),t.child}function Ds(e){var t=e.stateNode;t.pendingContext?zi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&zi(0,t.context,!1),$o(e,t.containerInfo)}function Ps(e,t,n,r,i){return fo(),mo(i),t.flags|=256,As(e,t,n,r),t.child}var Is,Fs,Ls,zs={dehydrated:null,treeContext:null,retryLane:0};function Os(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ns(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),Ci(ea,1&a),null===e)return uo(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=Ou(l,i,0,null):(s.childLanes=0,s.pendingProps=l),e=zu(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Os(n),t.memoizedState=zs,e):js(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,Rs(e,t,s,r=cs(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Ou({mode:"visible",children:r.children},i,0,null),(a=zu(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=Os(s),t.memoizedState=zs,a);if(!(1&t.mode))return Rs(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Rs(e,t,s,r=cs(a=Error(o(419)),r,void 0))}if(l=0!==(s&e.childLanes),bs||l){if(null!==(r=Tl)){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,Oo(e,i),tu(r,e,i,-1))}return fu(),Rs(e,t,s,r=cs(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Cu.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ro=ui(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(qi[Yi++]=$i,qi[Yi++]=Ji,qi[Yi++]=Xi,$i=e.id,Ji=e.overflow,Xi=t),t=js(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 u={mode:"hidden",children:i.children};return 1&l||t.child===a?(i=Fu(a,u)).subtreeFlags=14680064&a.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null),null!==r?s=Fu(r,s):(s=zu(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)?Os(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=zs,i}return e=(s=e.child).sibling,i=Fu(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 js(e,t){return(t=Ou({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Rs(e,t,n,r){return null!==r&&mo(r),xo(t,e.child,null,n),(e=js(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ms(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Do(e.return,t,n)}function Bs(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(As(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&&Ms(e,n,t);else if(19===e.tag)Ms(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(Ci(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),Bs(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}Bs(t,!0,n,null,o);break;case"together":Bs(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 Hs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ol|=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=Fu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Fu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Vs(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 Ks(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 Fi(t.type)&&Li(),Gs(t),null;case 3:return r=t.stateNode,Jo(),Ei(Di),Ei(Ti),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&&(ou(oo),oo=null))),Gs(t),null;case 5:Zo(t);var i=Xo(Yo.current);if(n=t.type,null!==e&&null!=t.stateNode)Fs(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=Xo(Ko.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":Mr("cancel",r),Mr("close",r);break;case"iframe":case"object":case"embed":Mr("load",r);break;case"video":case"audio":for(i=0;i<Or.length;i++)Mr(Or[i],r);break;case"source":Mr("error",r);break;case"img":case"image":case"link":Mr("error",r),Mr("load",r);break;case"details":Mr("toggle",r);break;case"input":$(r,a),Mr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Mr("invalid",r);break;case"textarea":ie(r,a),Mr("invalid",r)}for(var l in ye(n,a),i=null,a)if(a.hasOwnProperty(l)){var u=a[l];"children"===l?"string"==typeof u?r.textContent!==u&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,u,e),i=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,u,e),i=["children",""+u]):s.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Mr("scroll",r)}switch(n){case"input":K(r),Z(r,a,!0);break;case"textarea":K(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,Is(e,t),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Mr("cancel",e),Mr("close",e),i=r;break;case"iframe":case"object":case"embed":Mr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Or.length;i++)Mr(Or[i],e);i=r;break;case"source":Mr("error",e),i=r;break;case"img":case"image":case"link":Mr("error",e),Mr("load",e),i=r;break;case"details":Mr("toggle",e),i=r;break;case"input":$(e,r),i=X(e,r),Mr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=j({},r,{value:void 0}),Mr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Mr("invalid",e)}for(a in ye(n,i),u=i)if(u.hasOwnProperty(a)){var c=u[a];"style"===a?ge(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===a?"string"==typeof c?("textarea"!==n||""!==c)&&he(e,c):"number"==typeof c&&he(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=c&&"onScroll"===a&&Mr("scroll",e):null!=c&&b(e,a,c,l))}switch(n){case"input":K(e),Z(e,r,!1);break;case"textarea":K(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+V(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)Ls(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(n=Xo(Yo.current),Xo(Ko.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(Ei(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&&(ou(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===Ll&&(Ll=3):fu())),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 To(t.type._context),Gs(t),null;case 19:if(Ei(ea),null===(a=t.memoizedState))return Gs(t),null;if(r=!!(128&t.flags),null===(l=a.rendering))if(r)Vs(a,!1);else{if(0!==Ll||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Vs(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 Ci(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Je()>Wl&&(t.flags|=128,r=!0,Vs(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),Vs(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,Vs(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,Ci(ea,r?1&n|2:1&n),t):(Gs(t),null);case 22:case 23:return cu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Il)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function qs(e,t){switch(to(t),t.tag){case 1:return Fi(t.type)&&Li(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),Ei(Di),Ei(Ti),ra(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zo(t),null;case 13:if(Ei(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 Ei(ea),null;case 4:return Jo(),null;case 10:return To(t.type._context),null;case 22:case 23:return cu(),null;default:return null}}Is=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}},Fs=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Xo(Ko.current);var o,a=null;switch(n){case"input":i=X(e,i),r=X(e,r),a=[];break;case"select":i=j({},i,{value:void 0}),r=j({},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(c in ye(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Mr("scroll",e),a||l===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ys=!1,Xs=!1,$s="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){ku(e,t,n)}else n.current=null}function Zs(e,t,n){try{n()}catch(n){ku(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[mi],delete t[gi],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 ul=null,cl=!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:Xs||Qs(n,t);case 6:var r=ul,i=cl;ul=null,dl(e,t,n),cl=i,null!==(ul=r)&&(cl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(cl?(e=ul,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ut(e)):li(ul,n.stateNode));break;case 4:r=ul,i=cl,ul=n.stateNode.containerInfo,cl=!0,dl(e,t,n),ul=r,cl=i;break;case 0:case 11:case 14:case 15:if(!Xs&&(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(!Xs&&(Qs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){ku(n,t,e)}dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:1&n.mode?(Xs=(r=Xs)||null!==n.memoizedState,dl(e,t,n),Xs=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 $s),t.forEach(function(t){var r=_u.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:ul=l.stateNode,cl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,cl=!0;break e}l=l.return}if(null===ul)throw Error(o(160));hl(a,s,i),ul=null,cl=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(e){ku(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ml(t,e),t=t.sibling}function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fl(t,e),gl(e),4&r){try{tl(3,e,e.return),nl(3,e)}catch(t){ku(e,e.return,t)}try{tl(5,e,e.return)}catch(t){ku(e,e.return,t)}}break;case 1:fl(t,e),gl(e),512&r&&null!==n&&Qs(n,n.return);break;case 5:if(fl(t,e),gl(e),512&r&&null!==n&&Qs(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(t){ku(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&J(i,a),be(l,s);var c=be(l,a);for(s=0;s<u.length;s+=2){var d=u[s],h=u[s+1];"style"===d?ge(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):b(i,d,h,c)}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){ku(e,e.return,t)}}break;case 6:if(fl(t,e),gl(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(t){ku(e,e.return,t)}}break;case 3:if(fl(t,e),gl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ut(t.containerInfo)}catch(t){ku(e,e.return,t)}break;case 4:default:fl(t,e),gl(e);break;case 13:fl(t,e),gl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(Bl=Je())),4&r&&pl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Xs=(c=Xs)||d,fl(t,e),Xs=c):fl(t,e),gl(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!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 m=p.stateNode;if("function"==typeof m.componentWillUnmount){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){ku(r,n,e)}}break;case 5:Qs(p,p.return);break;case 22:if(null!==p.memoizedState){Al(h);continue}}null!==f?(f.return=p,Js=f):Al(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,c?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=null!=(u=h.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=me("display",s))}catch(t){ku(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(t){ku(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),gl(e),4&r&&pl(e);case 21:}}function gl(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){ku(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||Ys;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Xs;s=Ys;var u=Xs;if(Ys=a,(Xs=l)&&!u)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,Ys=s,Xs=u}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:Xs||nl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xs)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&&Vo(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}Vo(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Ut(h)}}}break;default:throw Error(o(163))}Xs||512&t.flags&&rl(t)}catch(e){ku(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 Al(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){ku(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){ku(t,i,e)}}var o=t.return;try{rl(t)}catch(e){ku(t,o,e)}break;case 5:var a=t.return;try{rl(t)}catch(e){ku(t,a,e)}}}catch(e){ku(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 wl,kl=Math.ceil,Sl=A.ReactCurrentDispatcher,El=A.ReactCurrentOwner,Cl=A.ReactCurrentBatchConfig,_l=0,Tl=null,Dl=null,Pl=0,Il=0,Fl=Si(0),Ll=0,zl=null,Ol=0,Nl=0,jl=0,Rl=null,Ml=null,Bl=0,Wl=1/0,Ul=null,Hl=!1,Vl=null,Gl=null,Kl=!1,ql=null,Yl=0,Xl=0,$l=null,Jl=-1,Ql=0;function Zl(){return 6&_l?Je():-1!==Jl?Jl:Jl=Je()}function eu(e){return 1&e.mode?2&_l&&0!==Pl?Pl&-Pl:null!==go.transition?(0===Ql&&(Ql=mt()),Ql):0!==(e=bt)?e:e=void 0===(e=window.event)?16:$t(e.type):1}function tu(e,t,n,r){if(50<Xl)throw Xl=0,$l=null,Error(o(185));vt(e,n,r),2&_l&&e===Tl||(e===Tl&&(!(2&_l)&&(Nl|=n),4===Ll&&au(e,Pl)),nu(e,r),1===n&&0===_l&&!(1&t.mode)&&(Wl=Je()+500,Mi&&Ui()))}function nu(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===Tl?Pl:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Mi=!0,Wi(e)}(su.bind(null,e)):Wi(su.bind(null,e)),ai(function(){!(6&_l)&&Ui()}),n=null;else{switch(At(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Tu(n,ru.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ru(e,t){if(Jl=-1,Ql=0,6&_l)throw Error(o(327));var n=e.callbackNode;if(xu()&&e.callbackNode!==n)return null;var r=ht(e,e===Tl?Pl:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=mu(e,r);else{t=r;var i=_l;_l|=2;var a=pu();for(Tl===e&&Pl===t||(Ul=null,Wl=Je()+500,du(e,t));;)try{vu();break}catch(t){hu(e,t)}_o(),Sl.current=a,_l=i,null!==Dl?t=0:(Tl=null,Pl=0,t=Ll)}if(0!==t){if(2===t&&(0!==(i=ft(e))&&(r=i,t=iu(e,i))),1===t)throw n=zl,du(e,0),au(e,r),nu(e,Je()),n;if(6===t)au(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=mu(e,r),2===t&&(a=ft(e),0!==a&&(r=a,t=iu(e,a))),1!==t)))throw n=zl,du(e,0),au(e,r),nu(e,Je()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:Au(e,Ml,Ul);break;case 3:if(au(e,r),(130023424&r)===r&&10<(t=Bl+500-Je())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){Zl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(Au.bind(null,e,Ml,Ul),t);break}Au(e,Ml,Ul);break;case 4:if(au(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*kl(r/1960))-r)){e.timeoutHandle=ri(Au.bind(null,e,Ml,Ul),r);break}Au(e,Ml,Ul);break;default:throw Error(o(329))}}}return nu(e,Je()),e.callbackNode===n?ru.bind(null,e):null}function iu(e,t){var n=Rl;return e.current.memoizedState.isDehydrated&&(du(e,t).flags|=256),2!==(e=mu(e,t))&&(t=Ml,Ml=n,null!==t&&ou(t)),e}function ou(e){null===Ml?Ml=e:Ml.push.apply(Ml,e)}function au(e,t){for(t&=~jl,t&=~Nl,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 su(e){if(6&_l)throw Error(o(327));xu();var t=ht(e,0);if(!(1&t))return nu(e,Je()),null;var n=mu(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=iu(e,r))}if(1===n)throw n=zl,du(e,0),au(e,t),nu(e,Je()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Au(e,Ml,Ul),nu(e,Je()),null}function lu(e,t){var n=_l;_l|=1;try{return e(t)}finally{0===(_l=n)&&(Wl=Je()+500,Mi&&Ui())}}function uu(e){null!==ql&&0===ql.tag&&!(6&_l)&&xu();var t=_l;_l|=1;var n=Cl.transition,r=bt;try{if(Cl.transition=null,bt=1,e)return e()}finally{bt=r,Cl.transition=n,!(6&(_l=t))&&Ui()}}function cu(){Il=Fl.current,Ei(Fl)}function du(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Dl)for(n=Dl.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Li();break;case 3:Jo(),Ei(Di),Ei(Ti),ra();break;case 5:Zo(r);break;case 4:Jo();break;case 13:case 19:Ei(ea);break;case 10:To(r.type._context);break;case 22:case 23:cu()}n=n.return}if(Tl=e,Dl=e=Fu(e.current,null),Pl=Il=t,Ll=0,zl=null,jl=Nl=Ol=0,Ml=Rl=null,null!==Fo){for(t=0;t<Fo.length;t++)if(null!==(r=(n=Fo[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}Fo=null}return e}function hu(e,t){for(;;){var n=Dl;try{if(_o(),ia.current=Qa,ca){for(var r=sa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ca=!1}if(aa=0,ua=la=sa=null,da=!1,ha=0,El.current=null,null===n||null===n.return){Ll=1,zl=t,Dl=null;break}e:{var a=e,s=n.return,l=n,u=t;if(t=Pl,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,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=gs(s);if(null!==f){f.flags&=-257,vs(f,s,l,0,t),1&f.mode&&ms(a,c,t),u=c;var m=(t=f).updateQueue;if(null===m){var g=new Set;g.add(u),t.updateQueue=g}else m.add(u);break e}if(!(1&t)){ms(a,c,t),fu();break e}u=Error(o(426))}else if(io&&1&l.mode){var v=gs(s);if(null!==v){!(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),mo(us(u,l));break e}}a=u=us(u,l),4!==Ll&&(Ll=2),null===Rl?Rl=[a]:Rl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Uo(a,ps(0,u,t));break e;case 1:l=u;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)}bu(n)}catch(e){t=e,Dl===n&&null!==n&&(Dl=n=n.return);continue}break}}function pu(){var e=Sl.current;return Sl.current=Qa,null===e?Qa:e}function fu(){0!==Ll&&3!==Ll&&2!==Ll||(Ll=4),null===Tl||!(268435455&Ol)&&!(268435455&Nl)||au(Tl,Pl)}function mu(e,t){var n=_l;_l|=2;var r=pu();for(Tl===e&&Pl===t||(Ul=null,du(e,t));;)try{gu();break}catch(t){hu(e,t)}if(_o(),_l=n,Sl.current=r,null!==Dl)throw Error(o(261));return Tl=null,Pl=0,Ll}function gu(){for(;null!==Dl;)yu(Dl)}function vu(){for(;null!==Dl&&!Xe();)yu(Dl)}function yu(e){var t=wl(e.alternate,e,Il);e.memoizedProps=e.pendingProps,null===t?bu(e):Dl=t,El.current=null}function bu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=qs(n,t)))return n.flags&=32767,void(Dl=n);if(null===e)return Ll=6,void(Dl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ks(n,t,Il)))return void(Dl=n);if(null!==(t=t.sibling))return void(Dl=t);Dl=t=e}while(null!==t);0===Ll&&(Ll=5)}function Au(e,t,n){var r=bt,i=Cl.transition;try{Cl.transition=null,bt=1,function(e,t,n,r){do{xu()}while(null!==ql);if(6&_l)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===Tl&&(Dl=Tl=null,Pl=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Kl||(Kl=!0,Tu(tt,function(){return xu(),null})),a=!!(15990&n.flags),!!(15990&n.subtreeFlags)||a){a=Cl.transition,Cl.transition=null;var s=bt;bt=1;var l=_l;_l|=4,El.current=null,function(e,t){if(ei=Vt,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,u=-1,c=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||(u=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&&++c===i&&(l=s),p===a&&++d===r&&(u=s),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Vt=!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 m=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!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var A=t.stateNode.containerInfo;1===A.nodeType?A.textContent="":9===A.nodeType&&A.documentElement&&A.removeChild(A.documentElement);break;default:throw Error(o(163))}}catch(e){ku(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}m=el,el=!1}(e,n),ml(n,e),fr(ti),Vt=!!ei,ti=ei=null,e.current=n,vl(n,e,i),$e(),_l=l,bt=s,Cl.transition=a}else e.current=n;if(Kl&&(Kl=!1,ql=e,Yl=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),nu(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(Hl)throw Hl=!1,e=Vl,Vl=null,e;!!(1&Yl)&&0!==e.tag&&xu(),a=e.pendingLanes,1&a?e===$l?Xl++:(Xl=0,$l=e):Xl=0,Ui()}(e,t,n,r)}finally{Cl.transition=i,bt=r}return null}function xu(){if(null!==ql){var e=At(Yl),t=Cl.transition,n=bt;try{if(Cl.transition=null,bt=16>e?16:e,null===ql)var r=!1;else{if(e=ql,ql=null,Yl=0,6&_l)throw Error(o(331));var i=_l;for(_l|=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 u=0;u<l.length;u++){var c=l[u];for(Js=c;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===c){Js=null;break}if(null!==p){p.return=f,Js=p;break}Js=f}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}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 A=(s=Js).child;if(2064&s.subtreeFlags&&null!==A)A.return=s,Js=A;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){ku(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(_l=i,Ui(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Cl.transition=t}}return!1}function wu(e,t,n){e=Bo(e,t=ps(0,t=us(n,t),1),1),t=Zl(),null!==e&&(vt(e,1,t),nu(e,t))}function ku(e,t,n){if(3===e.tag)wu(e,e,n);else for(;null!==t;){if(3===t.tag){wu(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=Bo(t,e=fs(t,e=us(n,e),1),1),e=Zl(),null!==t&&(vt(t,1,e),nu(t,e));break}}t=t.return}}function Su(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Zl(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(Pl&n)===n&&(4===Ll||3===Ll&&(130023424&Pl)===Pl&&500>Je()-Bl?du(e,0):jl|=n),nu(e,t)}function Eu(e,t){0===t&&(1&e.mode?(t=ct,!(130023424&(ct<<=1))&&(ct=4194304)):t=1);var n=Zl();null!==(e=Oo(e,t))&&(vt(e,t,n),nu(e,n))}function Cu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Eu(e,n)}function _u(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),Eu(e,n)}function Tu(e,t){return qe(e,t)}function Du(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 Pu(e,t,n,r){return new Du(e,t,n,r)}function Iu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Fu(e,t){var n=e.alternate;return null===n?((n=Pu(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 Lu(e,t,n,r,i,a){var s=2;if(r=e,"function"==typeof e)Iu(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case k:return zu(n.children,i,a,t);case S:s=8,i|=8;break;case E:return(e=Pu(12,n,t,2|i)).elementType=E,e.lanes=a,e;case D:return(e=Pu(13,n,t,i)).elementType=D,e.lanes=a,e;case P:return(e=Pu(19,n,t,i)).elementType=P,e.lanes=a,e;case L:return Ou(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case _:s=9;break e;case T:s=11;break e;case I:s=14;break e;case F:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Pu(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function zu(e,t,n,r){return(e=Pu(7,e,r,t)).lanes=n,e}function Ou(e,t,n,r){return(e=Pu(22,e,r,t)).elementType=L,e.lanes=n,e.stateNode={isHidden:!1},e}function Nu(e,t,n){return(e=Pu(6,e,null,t)).lanes=n,e}function ju(e,t,n){return(t=Pu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ru(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=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Mu(e,t,n,r,i,o,a,s,l){return e=new Ru(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Pu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jo(o),e}function Bu(e){if(!e)return _i;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(Fi(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(Fi(n))return Oi(e,n,t)}return t}function Wu(e,t,n,r,i,o,a,s,l){return(e=Mu(n,r,!0,e,0,o,0,s,l)).context=Bu(null),n=e.current,(o=Mo(r=Zl(),i=eu(n))).callback=null!=t?t:null,Bo(n,o,i),e.current.lanes=i,vt(e,i,r),nu(e,r),e}function Uu(e,t,n,r){var i=t.current,o=Zl(),a=eu(i);return n=Bu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Bo(i,t,a))&&(tu(e,i,a,o),Wo(e,i,a)),a}function Hu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gu(e,t){Vu(e,t),(e=e.alternate)&&Vu(e,t)}wl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Di.current)bs=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:Ds(t),fo();break;case 5:Qo(t);break;case 1:Fi(t.type)&&Ni(t);break;case 4:$o(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ci(ko,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ci(ea,1&ea.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ns(e,t,n):(Ci(ea,1&ea.current),null!==(e=Hs(e,t,n))?e.sibling:null);Ci(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),Ci(ea,ea.current),r)break;return null;case 22:case 23:return t.lanes=0,Ss(e,t,n)}return Hs(e,t,n)}(e,t,n);bs=!!(131072&e.flags)}else bs=!1,io&&1048576&t.flags&&Zi(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Us(e,t),e=t.pendingProps;var i=Ii(t,Ti.current);Po(t,n),i=ga(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,Fi(r)?(a=!0,Ni(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,jo(t),i.updater=is,t.stateNode=i,i._reactInternals=t,ls(t,r,e,n),t=Ts(null,t,r,!0,a,n)):(t.tag=0,io&&a&&eo(t),As(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 Iu(e)?1:0;if(null!=e){if((e=e.$$typeof)===T)return 11;if(e===I)return 14}return 2}(r),e=ns(r,e),i){case 0:t=Cs(null,t,r,e,n);break e;case 1:t=_s(null,t,r,e,n);break e;case 11:t=xs(null,t,r,e,n);break e;case 14:t=ws(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,Cs(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 1:return r=t.type,i=t.pendingProps,_s(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 3:e:{if(Ds(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,Ro(e,t),Ho(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=us(Error(o(423)),t));break e}if(r!==i){t=Ps(e,t,r,n,i=us(Error(o(424)),t));break e}for(ro=ui(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=wo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fo(),r===i){t=Hs(e,t,n);break e}As(e,t,r,n)}t=t.child}return t;case 5:return Qo(t),null===e&&uo(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),Es(e,t),As(e,t,s,n),t.child;case 6:return null===e&&uo(t),null;case 13:return Ns(e,t,n);case 4:return $o(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=xo(t,null,r,n):As(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 As(e,t,t.pendingProps,n),t.child;case 8:case 12:return As(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,Ci(ko,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===i.children&&!Di.current){t=Hs(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 u=l.firstContext;null!==u;){if(u.context===r){if(1===a.tag){(u=Mo(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),Do(a.return,n,t),l.lanes|=n;break}u=u.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),Do(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}As(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=Io(i)),t.flags|=1,As(e,t,r,n),t.child;case 14:return i=ns(r=t.type,t.pendingProps),ws(e,t,r,i=ns(r.type,i),n);case 15:return ks(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,Fi(r)?(e=!0,Ni(t)):e=!1,Po(t,n),as(t,r,i),ls(t,r,i,n),Ts(null,t,r,!0,e,n);case 19:return Ws(e,t,n);case 22:return Ss(e,t,n)}throw Error(o(156,t.tag))};var Ku="function"==typeof reportError?reportError:function(e){console.error(e)};function qu(e){this._internalRoot=e}function Yu(e){this._internalRoot=e}function Xu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function $u(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Ju(){}function Qu(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=Hu(a);s.call(e)}}Uu(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=Hu(a);o.call(e)}}var a=Wu(t,r,e,0,null,!1,0,"",Ju);return e._reactRootContainer=a,e[fi]=a.current,Ur(8===e.nodeType?e.parentNode:e),uu(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Hu(l);s.call(e)}}var l=Mu(e,0,!1,null,0,!1,0,"",Ju);return e._reactRootContainer=l,e[fi]=l.current,Ur(8===e.nodeType?e.parentNode:e),uu(function(){Uu(t,l,n,r)}),l}(n,t,e,i,r);return Hu(a)}Yu.prototype.render=qu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Uu(e,t,null,null)},Yu.prototype.unmount=qu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uu(function(){Uu(null,e,null,null)}),t[fi]=null}},Yu.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lt.length&&0!==t&&t<Lt[n].priority;n++);Lt.splice(n,0,e),0===n&&jt(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),nu(t,Je()),!(6&_l)&&(Wl=Je()+500,Ui()))}break;case 13:uu(function(){var t=Oo(e,1);if(null!==t){var n=Zl();tu(t,e,1,n)}}),Gu(e,1)}},wt=function(e){if(13===e.tag){var t=Oo(e,134217728);if(null!==t)tu(t,e,134217728,Zl());Gu(e,134217728)}},kt=function(e){if(13===e.tag){var t=eu(e),n=Oo(e,t);if(null!==n)tu(n,e,t,Zl());Gu(e,t)}},St=function(){return bt},Et=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},we=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));q(r),Q(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=lu,De=uu;var Zu={usingClientEntryPoint:!1,Events:[bi,Ai,xi,Ce,_e,lu]},ec={findFiberByHostInstance:yi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tc={bundleType:ec.bundleType,version:ec.version,rendererPackageName:ec.rendererPackageName,rendererConfig:ec.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ge(e))?null:e.stateNode},findFiberByHostInstance:ec.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 nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nc.isDisabled&&nc.supportsFiber)try{it=nc.inject(tc),ot=nc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xu(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Xu(e))throw Error(o(299));var n=!1,r="",i=Ku;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Mu(e,1,!1,null,0,n,0,r,i),e[fi]=t.current,Ur(8===e.nodeType?e.parentNode:e),new qu(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 uu(e)},t.hydrate=function(e,t,n){if(!$u(t))throw Error(o(200));return Qu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Xu(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=Ku;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Wu(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 Yu(t)},t.render=function(e,t,n){if(!$u(t))throw Error(o(200));return Qu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!$u(e))throw Error(o(40));return!!e._reactRootContainer&&(uu(function(){Qu(null,null,e,!1,function(){e._reactRootContainer=null,e[fi]=null})}),!0)},t.unstable_batchedUpdates=lu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$u(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Qu(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},1464(e,t,n){"use strict";n.d(t,{LX:()=>f,MA:()=>p,_W:()=>m,Lc:()=>y,Ms:()=>b});var r=n(2680),i=n(8853),o=n(7304);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"},u=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]}),c=["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=[...c,...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 m(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 g(e,t,n,i){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=m(t,n),e),{})}(u(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=>g(e,t,r,n)).reduce(o.A,{})}function y(e){return v(e,c)}function b(e){return v(e,d)}function A(e){return v(e,h)}y.propTypes={},y.filterProps=c,b.propTypes={},b.filterProps=d,A.propTypes={},A.filterProps=h},1496(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},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],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}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 u=[],c=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function A(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function x(e){if(g=!1,A(e),!m)if(null!==r(u))m=!0,L(w);else{var t=r(c);null!==t&&z(x,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(C),C=-1),f=!0;var o=p;try{for(A(n),h=r(u);null!==h&&(!(h.expirationTime>n)||e&&!D());){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(u)&&i(u),A(n)}else i(u);h=r(u)}if(null!==h)var l=!0;else{var d=r(c);null!==d&&z(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 k,S=!1,E=null,C=-1,_=5,T=-1;function D(){return!(t.unstable_now()-T<_)}function P(){if(null!==E){var e=t.unstable_now();T=e;var n=!0;try{n=E(!0,e)}finally{n?k():(S=!1,E=null)}}else S=!1}if("function"==typeof b)k=function(){b(P)};else if("undefined"!=typeof MessageChannel){var I=new MessageChannel,F=I.port2;I.port1.onmessage=P,k=function(){F.postMessage(null)}}else k=function(){v(P,0)};function L(e){E=e,S||(S=!0,k())}function z(e,n){C=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(){m||f||(m=!0,L(w))},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"):_=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(u)},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(c,e),null===r(u)&&e===r(c)&&(g?(y(C),C=-1):g=!0,z(x,o-a))):(e.sortIndex=s,n(u,e),m||f||(m=!0,L(w))),e},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},1533(e,t,n){"use strict";n.d(t,{A:()=>i});var r=0;function i(e){return"__private_"+r+++"_"+e}},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)}},1762(e,t,n){"use strict";n.d(t,{Fb:()=>p,NR:()=>b,OW:()=>m,eS:()=>g,fetchHandle:()=>x,fnPolyfill:()=>w,iI:()=>A,uX:()=>f});var r=n(7301),i=n(4107),o=n(252),a=n(2770),s=n(8930),l=n(9992),u=n(1223),c=n(4181),d=n(5628);const h=["fn","msg"],p=e=>{const t=e||l.$Kd;return t>600?t:1e3*t},f=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.httpTimeout;if(!t)try{var n;t=null===(n=await(0,s.C$)())||void 0===n?void 0:n.httpTimeout}catch(e){(0,c.h9)("getSettingWithDefault",e)}return p(t)},m=function(){var e;const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(Boolean);if(0===t.length)return;if(1===t.length)return t[0];if(null!==(e=AbortSignal)&&void 0!==e&&e.any)return AbortSignal.any(t);const n=new AbortController,r=e=>{n.signal.aborted||n.abort(null==e?void 0:e.reason)};for(const e of t){if(e.aborted){r(e);break}e.addEventListener("abort",()=>r(e),{once:!0})}return n.signal},g=e=>{var t;return null!==(t=AbortSignal)&&void 0!==t&&t.timeout&&e?AbortSignal.timeout(e):void 0},v=e=>{const t={};try{e&&e.split(/\r?\n/).forEach(e=>{const[n,r]=e.split(":").map(e=>e.trim());n&&r&&(t[n]=r)})}catch(e){(0,c.h9)("fetchGM parse headers error",e)}return t},y=function(){let{response:e,responseHeaders:t,status:n,statusText:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{body:e,headers:v(t),status:n,statusText:r}},b=async function(e){let{method:t="GET",headers:n,body:r,timeout:i,signal:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((a,s)=>{var l;let u=null,c=!1;const d=(e,t)=>{var n;c||(c=!0,null==o||null===(n=o.removeEventListener)||void 0===n||n.call(o,"abort",h),e(t))},h=()=>{var e,t;null===(e=u)||void 0===e||null===(t=e.abort)||void 0===t||t.call(e),d(s,new DOMException("The operation was aborted.","AbortError"))};null!=o&&o.aborted?h():(null==o||null===(l=o.addEventListener)||void 0===l||l.call(o,"abort",h,{once:!0}),u=GM.xmlHttpRequest({method:t,url:e,headers:n,data:r,anonymous:!0,timeout:i,onload(e){d(a,y(e||this))},onerror:e=>d(s,e),onabort:()=>d(s,new DOMException("The operation was aborted.","AbortError")),ontimeout:()=>d(s,new Error("GM request timeout."))}))})},A=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=await f(n),a=m([t.signal,null==n?void 0:n.signal,g(r)]),s=(0,i.A)((0,i.A)({},t),{},{signal:a});if(o.Zy){const t=(0,i.A)((0,i.A)({},s),{},{timeout:r}),{body:n,headers:o,status:a,statusText:l}=window.KISS_GM?await async function(e){let{method:t="GET",headers:n,body:r,timeout:i,signal:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((a,s)=>{var l;let u=null,c=!1;const d=(e,t)=>{var n;c||(c=!0,null==o||null===(n=o.removeEventListener)||void 0===n||n.call(o,"abort",h),e(t))},h=()=>{var e,t;null===(e=u)||void 0===e||null===(t=e.abort)||void 0===t||t.call(e),d(s,new DOMException("The operation was aborted.","AbortError"))};null!=o&&o.aborted?h():(null==o||null===(l=o.addEventListener)||void 0===l||l.call(o,"abort",h,{once:!0}),u=window.KISS_GM.xmlHttpRequest({method:t,url:e,headers:n,data:r,anonymous:!0,timeout:i,onload:e=>d(a,y(e)),onerror:e=>d(s,e),onabort:()=>d(s,new DOMException("The operation was aborted.","AbortError")),ontimeout:()=>d(s,new Error("GM request timeout."))}))})}(e,t):await b(e,t);return new Response(n,{headers:new Headers(o),status:a,statusText:l})}return fetch(e,s)},x=async e=>{let{input:t,init:n,opts:r={}}=e;const i=await A(t,n,r);return(0,d.x)(i,r.expect)},w=e=>{let{fn:t,msg:n=l.vLL}=e,s=(0,r.A)(e,h);if(o.aQ&&!(0,u._9)()){var c;const e=null===(c=s.opts)||void 0===c?void 0:c.signal,t=(0,i.A)((0,i.A)({},s),{},{opts:(0,i.A)((0,i.A)({},s.opts),{},{signal:void 0})}),r=(0,a.Ru)(n,t);if(e){const t=new Promise((t,n)=>{e.aborted?n(new DOMException("The operation was aborted.","AbortError")):e.addEventListener("abort",()=>n(new DOMException("The operation was aborted.","AbortError")),{once:!0})});return Promise.race([r,t])}return r}return t((0,i.A)({},s))}},1825(e,t,n){"use strict";n.d(t,{Qw:()=>u,Xq:()=>c,ek:()=>l,qG:()=>d});var r=n(4107),i=n(7301);const o=["order"],a=e=>e,s=e=>e.slice().sort((e,t)=>e.id-t.id||e.order-t.order).map(e=>{let{order:t}=e;return(0,i.A)(e,o)}),l=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,{decodeText:r=a}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"object"!=typeof e)return null;const i=void 0!==e.text?e.text:void 0!==e.translation?e.translation:void 0;if(void 0===i)return null;const o=null!==(t=e.id)&&void 0!==t?t:n,s=Number(o);return Number.isInteger(s)?{id:s,translation:[r(String(i||"")),String(e.sourceLanguage||e.src||"")]}:null},u=e=>{const t=[],n=/<(t|item|seg)\b([^>]*)>([\s\S]*?)<\/\1>/gi;let r;for(;null!==(r=n.exec(e));){const e=r[2]||"",n=e.match(/\bid\s*=\s*["']?(\d+)["']?/i),i=e.match(/\bsourceLanguage\s*=\s*["']([^"']*)["']/i),o=n?Number(n[1]):t.length;Number.isInteger(o)&&t.push({id:o,order:t.length,translation:[r[3].trim(),(null==i?void 0:i[1])||""]})}return s(t)},c=function(e){let{requireCompleteLine:t=!1,decodeText:n=a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=e.endsWith("\n"),i=e.split("\n"),o=t&&!r?i.slice(0,-1):i,l=[];for(const e of o){const t=e.trim();if(!t)continue;const r=t.match(/^(\d+)\s*\|\s*(.*)/);r&&l.push({id:Number(r[1]),order:l.length,translation:[n(r[2].trim().replace(/<br\s*\/?>/gi,"\n")),""]})}return s(l)},d=function(e){let{decodeText:t=a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=function(e){let{decodeText:t=a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.search(/(\{|\[)/),i=Math.max(e.lastIndexOf("}"),e.lastIndexOf("]"));if(n<0||i<0)return[];try{const o=JSON.parse(e.substring(n,i+1)),a=Array.isArray(o)?o:o.translations||(o.result?[o.result]:[o]);if(!Array.isArray(a)||0===a.length)return[];const u=a.map((e,n)=>l(e,n,{decodeText:t})).filter(Boolean).map((e,t)=>(0,r.A)((0,r.A)({},e),{},{order:t}));return s(u)}catch(e){return[]}}(e,{decodeText:t});if(n.length>0)return n;const i=u(e);return i.length>0?i:c(e,{decodeText:t})}},1834(e,t,n){"use strict";n.d(t,{AH:()=>c,i7:()=>d,mL:()=>u});var r=n(457),i=n(8661),o=n(696),a=n(4430),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 u=(0,r.w)(function(e,t){var n=e.styles,l=(0,s.J)([n],void 0,i.useContext(r.T)),u=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])),u.current=[n,r],function(){n.flush()}},[t]),(0,a.i)(function(){var e=u.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 c(){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=c.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_"}}}},1852(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home")},1941(e,t,n){"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})},1957(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},1985(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},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)},[])]}},2375(e,t,n){"use strict";n.d(t,{Xg:()=>v,f8:()=>g,uP:()=>m});var r=n(4107),i=n(2974);const o="xmlHttpRequest",a="xmlHttpRequestAbort",s="setValue",l="getValue",u="deleteValue",c="info",d=["onloadstart","onprogress","onreadystatechange","onload","onerror","onabort","ontimeout"],h=new Set(["onload","onerror","onabort","ontimeout"]),p=new Map;function f(){return"undefined"!=typeof GM?GM:globalThis.GM}function m(e,t){const n=[...arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],f()];for(const t of n){const n=null==t?void 0:t[e];if("function"==typeof n)return n.bind(t)}const r=globalThis[t];if("function"==typeof r)return r;throw new Error("GM API is not available: ".concat(e))}const g=e=>{window.APP_INFO={name:"KISS Translator",version:"2.0.32",eventName:e}},v=async e=>{var t,n;let g,v;try{const{action:y,args:b={},pong:A}=(null==e?void 0:e.detail)||{},x=b||{};if(g=A,!y)return;switch(y){case o:if(Object.prototype.hasOwnProperty.call(x,"input")){const{input:e,init:t}=x;v=await(0,i.NR)(e,t);break}return void p.set(g,m("xmlHttpRequest","GM_xmlhttpRequest")(d.reduce((e,t)=>(0,r.A)((0,r.A)({},e),{},{[t]:e=>{window.dispatchEvent(new CustomEvent(g,{detail:{callback:t,data:e}})),h.has(t)&&p.delete(g)}}),x.details)));case a:return null===(t=p.get(x.requestId))||void 0===t||null===(n=t.abort)||void 0===n||n.call(t),void p.delete(x.requestId);case s:const{key:e,val:b}=x;await m("setValue","GM_setValue")(e,b),v=b;break;case l:v=await m("getValue","GM_getValue")(x.key);break;case u:await m("deleteValue","GM_deleteValue")(x.key),v="ok";break;case c:v=function(){const e=f();return(null==e?void 0:e.info)||globalThis.GM_info}();break;default:throw new Error("message action is unavailable: ".concat(y))}g&&window.dispatchEvent(new CustomEvent(g,{detail:{data:v}}))}catch(e){g&&window.dispatchEvent(new CustomEvent(g,{detail:{error:e.message}}))}}},2392(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6489).A},2464(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},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(8839);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 u(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function c(){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",u,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!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}}},2615(e,t,n){"use strict";var r=n(2464);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},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)},2639(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(9476);function i(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},2680(e,t,n){"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>u,kW:()=>c,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 u(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 c(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),{})}},2770(e,t,n){"use strict";n.d(t,{QI:()=>i,Ru:()=>o,xJ:()=>a});var r=n(1223);const i=async()=>{const[e]=await r.T.tabs.query({active:!0,lastFocusedWindow:!0});return e},o=(e,t)=>null===r.T||void 0===r.T?void 0:r.T.runtime.sendMessage({action:e,args:t}),a=async(e,t)=>{const n=await(async()=>{const e=await i();return null==e?void 0:e.id})();if(n)return r.T.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})}},2902(e,t,n){"use strict";e.exports=n(9770)},2964(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},2974(e,t,n){"use strict";n.d(t,{Fd:()=>C,NR:()=>h.NR,iI:()=>h.iI,xF:()=>_,Qy:()=>h.fnPolyfill});var r=n(4107),i=n(7301),o=n(1152),a=n(1442),s=n(3951),l=n(6639),u=n(9793),c=n(7325),d=n(4218),h=n(1762),p=n(9286),f=n.n(p),m=n(252),g=n(1223),v=n(9992);const y=["signal"];function b(){return b=(0,o.A)(function(e){let{method:t="GET",headers:n,body:r,timeout:i,signal:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(u,c){const h=(0,d.Sn)();let p=(0,d.HP)(),f=!1,m=null,g=!1,v=0,y=!1,b="unknown",A="";const x=new TextDecoder,w=()=>{y||(y=!0,h.finish())},k=e=>{y||(y=!0,h.error(e))},S=e=>{for(const t of p(e))g=!0,h.push(t)},E=(e,t)=>{const n=new Uint8Array(e.length);for(let t=0;t<e.length;t+=1)n[t]=255&e.charCodeAt(t);return x.decode(n,t)},C=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e||t)if("utf8-bytes"!==b){if(A+=e,"unknown"===b)if((e=>{for(let t=0;t<e.length;t+=1)if(e.charCodeAt(t)>255)return!0;return!1})(A))b="text";else if((e=>/[\u00c2-\u00f4][\u0080-\u00bf]/.test(e))(A))b="utf8-bytes";else{if((e=>/[\u0080-\u00ff]/.test(e))(A)&&!t)return;b="text"}S("utf8-bytes"===b?E(A,{stream:!t}):A),A=""}else S(E(e,{stream:!t}))},_=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(f||y)return;const n=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"string"==typeof t.responseText?t.responseText:"string"==typeof(null===(e=t.response)||void 0===e?void 0:e.responseText)?t.response.responseText:"string"==typeof t.response?t.response:""}(e);if(n.length<=v)return void C("",t);const r=n.slice(v);v=n.length,C(r,t)},T=((null===(u=window.KISS_GM)||void 0===u?void 0:u.xmlHttpRequest)||GM.xmlHttpRequest)({method:t,url:e,headers:n,data:r,anonymous:!0,timeout:i,responseType:"stream",onloadstart:async function(){let e,{response:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.getReader){f=!0;try{e=t.getReader();const n=new TextDecoder;for(;;){const{done:t,value:r}=await e.read();if(t)break;for(const e of p(n.decode(r,{stream:!0})))g=!0,h.push(e)}}catch(t){if(!g&&(i=t,String((null==i?void 0:i.message)||i).includes("Accessing TypedArray data over Xrays"))){f=!1,m=t,p=(0,d.HP)();try{var n,r;await(null===(n=e)||void 0===n||null===(r=n.cancel)||void 0===r?void 0:r.call(n))}catch(e){}return}return void k(t)}var i;w()}},onprogress:e=>_(e),onload:e=>{f||y||(_(e,!0),g?w():k(m||new Error("GM stream response is not readable.")))},onerror:e=>k(e),onabort:()=>k(new DOMException("The operation was aborted.","AbortError")),ontimeout:()=>k(new Error("GM stream request timeout"))}),D=()=>{var e;return null==T||null===(e=T.abort)||void 0===e?void 0:e.call(T)};null!=o&&o.aborted&&D(),null==o||null===(c=o.addEventListener)||void 0===c||c.call(o,"abort",D,{once:!0});try{yield*(0,s.A)((0,l.A)(h.iterate()),a.A)}finally{var P,I;null==o||null===(P=o.removeEventListener)||void 0===P||P.call(o,"abort",D),null==T||null===(I=T.abort)||void 0===I||I.call(T)}}()}),b.apply(this,arguments)}function A(){return A=(0,o.A)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const i="number"==typeof n?{httpTimeout:n}:n||{},o=(0,h.Fb)(i.httpTimeout),s=(0,h.OW)([t.signal,i.signal,(0,h.eS)(o)]),l=yield(0,a.A)(fetch(e,(0,r.A)((0,r.A)({},t),{},{signal:s})));if(!l.ok)throw new Error("HTTP error! status: ".concat(l.status));const u=l.body.getReader(),c=new TextDecoder,p=(0,d.HP)();try{for(;;){const{done:e,value:t}=yield(0,a.A)(u.read());if(e)break;for(const e of p(c.decode(t,{stream:!0})))yield e}}finally{var f;yield(0,a.A)(null===(f=u.cancel)||void 0===f?void 0:f.call(u))}}()}),A.apply(this,arguments)}function x(){return(x=(0,o.A)(function*(e,t,n){const r=(0,d.Sn)(),o=n||{},{signal:u}=o,c=(0,i.A)(o,y);let h;try{h=f().runtime.connect({name:v.sRu})}catch(e){throw new Error("Failed to connect to background: "+e.message)}const p=()=>{try{h.disconnect()}catch(e){}};h.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))}}),h.onDisconnect.addListener(()=>{const e=f().runtime.lastError;e&&r.error(new Error(e.message||"Port disconnected"))});const m=()=>{r.error(new DOMException("The operation was aborted.","AbortError")),p()},g=null==u?void 0:u.aborted;var b;g?m():null==u||null===(b=u.addEventListener)||void 0===b||b.call(u,"abort",m,{once:!0});g||h.postMessage({action:"start",args:{input:e,init:t,opts:c}});try{yield*(0,s.A)((0,l.A)(r.iterate()),a.A)}finally{var A;null==u||null===(A=u.removeEventListener)||void 0===A||A.call(u,"abort",m),p()}})).apply(this,arguments)}function w(e,t){return k.apply(this,arguments)}function k(){return k=(0,o.A)(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const i=yield(0,a.A)((0,h.uX)(n));n=(0,r.A)((0,r.A)({},n),{},{httpTimeout:i}),!m.aQ||(0,g._9)()?m.Zy?yield*(0,s.A)((0,l.A)(function(e){return b.apply(this,arguments)}(e,(0,r.A)((0,r.A)({},t),{},{timeout:n.httpTimeout,signal:n.signal}))),a.A):yield*(0,s.A)((0,l.A)(function(e){return A.apply(this,arguments)}(e,t,n)),a.A):yield*(0,s.A)((0,l.A)(function(e,t,n){return x.apply(this,arguments)}(e,t,n)),a.A)}()}),k.apply(this,arguments)}const S=["useCache","usePool","fetchInterval","fetchLimit"],E=["useCache","usePool","fetchInterval","fetchLimit"],C=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{useCache:r,usePool:o,fetchInterval:a,fetchLimit:s}=n,l=(0,i.A)(n,S);if(null==e||!e.trim())throw new Error("URL is empty");if(r){const n=await(0,c.QF)(e,t);if(n)return n}if(o){return(0,u.Fz)(a,s).push(h.fnPolyfill,{fn:h.fetchHandle,input:e,init:t,opts:l})}return(0,h.fnPolyfill)({fn:h.fetchHandle,input:e,init:t,opts:l})};function _(e,t){return T.apply(this,arguments)}function T(){return T=(0,o.A)(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{useCache:o,usePool:p,fetchInterval:f,fetchLimit:m}=n,g=(0,i.A)(n,E);return function*(){if(null==e||!e.trim())throw new Error("URL is empty");if(o){const n=yield(0,a.A)((0,c.QF)(e,t));if(n)return void(yield n)}if(p){const n=(0,u.Fz)(f,m),i=(0,d.Sn)(),o=new AbortController,c=(0,r.A)((0,r.A)({},g),{},{signal:(0,h.OW)([g.signal,o.signal])}),p=n.push(async()=>{try{var n,r=!1,o=!1;try{for(var a,s=(0,l.A)(w(e,t,c));r=!(a=await s.next()).done;r=!1){const e=a.value;i.push(e)}}catch(e){o=!0,n=e}finally{try{r&&null!=s.return&&await s.return()}finally{if(o)throw n}}i.finish()}catch(e){i.error(e)}return null});try{yield*(0,s.A)((0,l.A)(i.iterate()),a.A)}finally{o.abort(),yield(0,a.A)(p.catch(()=>{}))}return}yield*(0,s.A)((0,l.A)(w(e,t,g)),a.A)}()}),T.apply(this,arguments)}},3013(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(4320),i=n(8915),o=n(6997),a=n(9682);const s={borderRadius:4};var l=n(1464);var u=n(3367),c=n(9718),d=n(6620);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,m=(0,i.A)(e,h),g=(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:g,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:v,shape:(0,r.A)({},s,f)},m);y.applyStyles=d.A;for(var b=arguments.length,A=new Array(b>1?b-1:0),x=1;x<b;x++)A[x-1]=arguments[x];return y=A.reduce((e,t)=>(0,o.A)(e,t),y),y.unstable_sxConfig=(0,r.A)({},c.A,null==m?void 0:m.unstable_sxConfig),y.unstable_sx=function(e){return(0,u.A)({sx:e,theme:this})},y}},3072(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},3073(e,t,n){"use strict";function r(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}n.d(t,{A:()=>r})},3181(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(6175)},3367(e,t,n){"use strict";n.d(t,{A:()=>c,k:()=>l});var r=n(6175),i=n(7304),o=n(8853),a=n(2680),s=n(9718);function l(){function e(e,t,n,i){const s={[e]:t,theme:n},l=i[e];if(!l)return{[e]:t};const{cssProperty:u=e,themeKey:c,transform:d,style:h}=l;if(null==t)return null;if("typography"===c&&"inherit"===t)return{[e]:t};const p=(0,o.Yn)(n,c)||{};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===u?n:{[u]:n}})}return function t(n){var r;const{sx:o,theme:l={},nested:u}=n||{};if(!o)return null;const c=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],u=l,"function"==typeof s?s(u):s);var s,u;if(null!=o)if("object"==typeof o)if(c[n])d=(0,i.A)(d,e(n,o,l,c));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,c))}),!u&&l.modularCssLayers?{"@layer sx":(0,a.vf)(s,d)}:(0,a.vf)(s,d)}return Array.isArray(o)?o.map(d):d(o)}}const u=l();u.filterProps=["sx"];const c=u},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},u=(0,i.A)(function(e){return s(e)?e:e.replace(o,"-$&").toLowerCase()}),c=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+=u(o)+":"+c(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+=u(o)+":"+h+";";break;default:r+=o+"{"+h+"}"}}else for(var p=0;p<a.length;p++)l(a[p])&&(r+=u(o)+":"+c(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 m=t[f];return void 0!==m?m: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 u=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:u,styles:i,next:h}}},3399(e,t){"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case h:case p:return e;default:switch(e=e&&e.$$typeof){case c:case u:case d:case m:case f:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference"),t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=o,t.Lazy=m,t.Memo=f,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.SuspenseList=p,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return v(e)===u},t.isContextProvider=function(e){return v(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return v(e)===d},t.isFragment=function(e){return v(e)===o},t.isLazy=function(e){return v(e)===m},t.isMemo=function(e){return v(e)===f},t.isPortal=function(e){return v(e)===i},t.isProfiler=function(e){return v(e)===s},t.isStrictMode=function(e){return v(e)===a},t.isSuspense=function(e){return v(e)===h},t.isSuspenseList=function(e){return v(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===a||e===h||e===p||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=v},3413(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(3367),i=n(5219),o=n(9718)},3439(e){"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(f&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(d,{name:n,newValue:e(f,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},3473(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(2037).A},3565(e,t,n){"use strict";n.d(t,{AF:()=>x,Az:()=>P,BQ:()=>T,Cx:()=>h,Ee:()=>g,H7:()=>O,IF:()=>l,Jg:()=>I,No:()=>F,Oc:()=>z,T2:()=>c,TP:()=>S,UP:()=>m,Vh:()=>E,XZ:()=>k,aq:()=>d,ax:()=>y,eU:()=>b,ee:()=>v,fF:()=>D,l:()=>R,mo:()=>L,ue:()=>A,ux:()=>_,vc:()=>C,y:()=>N,yz:()=>u});var r=n(4181),i=n(5493),o=n(4307),a=n(7306),s=n(1367);const l="toggleTranslate",u="toggleTransOnly",c="toggleStyle",d="togglePopup",h="openSetting",p={[l]:["AltLeft","KeyQ"],[c]:["AltLeft","KeyC"],[d]:["AltLeft","KeyK"],[h]:["AltLeft","KeyO"]},f="KISS-Worker",m="WebDAV",g="GitHub Gist",v={syncType:f,syncUrl:"",syncUser:"",syncKey:"",syncEncryptKey:"",syncMeta:{},subRulesSyncAt:0,dataCaches:{}},y="-",b="mobile",A=["AltLeft","KeyI"],x={transOpen:!0,blacklist:"",apiSlug:i.kX,fromLang:"auto",toLang:"en",triggerShortcut:A,triggerCount:1,triggerTime:200,transSign:"/",showDot:b},w="click",k="hover",S="select",E="dblclick",C="fixed",_="mouse",T="click",D="dblclick",P=(i.i8.filter(e=>{let[t]=e;return"zh-CN"!==t&&"zh-TW"!==t}),{transOpen:!0,blacklist:"",apiSlugs:[i.kX],singleWordNoTrans:!1,autoFavWord:!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:w,btnPositionMode:C,tranboxInteractMode:"-",skipLangs:[],enDict:i.GD,enSug:i.s1,aiDictApiSlug:"-",aiDictPromptSlug:o.Qs}),I="on",F="off",L="mobile_off",z={enabled:!0,apiSlug:i.kX,segSlug:"-",forceSubtitleRetranslate:!1,chunkLength:1e3,longSentenceThreshold:100,useAlgorithmBreaker:"rule",preTrans:90,throttleTrans:30,toLang:"zh-CN",autoTranslate:!0,isBilingual:!0,displayOrder:"original-first",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:L,autoFavWord:!1,showList:L,hideSubtitleButton:!1,aiContextSlug:"-",segPromptMode:o.Qs,segPromptSlug:o.Ef},O="bubble",N="max-width: min(420px, calc(100vw - 32px));\npadding: 10px 12px;\nborder-radius: 8px;\nbackground: rgb(25, 118, 210);\ncolor: #fff;\nfont-size: 14px;\nline-height: 1.5;\nbox-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);\nbackdrop-filter: blur(8px);",j={useMouseHover:!1,blacklist:"",mouseHoverKey:["ControlLeft"],mouseHoverKey2:[],displayMode:"bilingual",apiSlug:a.WL,bubbleStyle:N},R={version:o.xo,darkMode:"auto",uiLang:"en",minLength:2,maxLength:1e5,newlineLength:20,httpTimeout:i.$K,clearCache:!1,autoTranslateClipboard:!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:i._T,prompts:[],deletedTransApiSlugs:[],shortcuts:p,inputRule:x,tranboxSetting:P,touchModes:[2],blacklist:["https://fishjar.github.io/kiss-translator/options.html","https://translate.google.com","https://www.deepl.com/translator"].join(",\n"),csplist:[].join(",\n"),orilist:["https://dict.youdao.com"].join(",\n"),skipLangs:[],translateVariants:!0,transInterval:100,langDetector:"-",mouseHoverSetting:j,preInit:!0,transAllnow:!1,subtitleSetting:z,logLevel:r.$b.INFO.value,rootMargin:500,customStyles:s.p5}},3598(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(1683).A},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}},3739(e,t,n){"use strict";n.d(t,{A:()=>z});var r=n(4320),i=n(8915),o=n(6253),a=n(6997),s=n(9718),l=n(3367),u=n(3013);var c=n(727);const d={black:"#000",white:"#fff"},h={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"},p={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"},f={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"},m={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"},g={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"},v={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"},y={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"},b=["mode","contrastThreshold","tonalOffset"],A={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:d.white,default:d.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}},x={text:{primary:d.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:d.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 w(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,c.a)(e.main,i):"dark"===t&&(e.dark=(0,c.e$)(e.main,o)))}function k(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,l=(0,i.A)(e,b),u=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(t),k=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[200],light:p[50],dark:p[400]}:{main:p[500],light:p[300],dark:p[700]}}(t),S=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:f[500],light:f[300],dark:f[700]}:{main:f[700],light:f[400],dark:f[800]}}(t),E=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),C=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[400],light:y[300],dark:y[700]}:{main:y[800],light:y[500],dark:y[900]}}(t),_=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(t);function T(e){return(0,c.eM)(e,x.text.primary)>=n?x.text.primary:A.text.primary}const D=e=>{let{color:t,name:n,mainShade:i=500,lightShade:a=300,darkShade:l=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 w(t,"light",a,s),w(t,"dark",l,s),t.contrastText||(t.contrastText=T(t.main)),t},P={dark:x,light:A};return(0,a.A)((0,r.A)({common:(0,r.A)({},d),mode:t,primary:D({color:u,name:"primary"}),secondary:D({color:k,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:D({color:S,name:"error"}),warning:D({color:_,name:"warning"}),info:D({color:E,name:"info"}),success:D({color:C,name:"success"}),grey:h,contrastThreshold:n,getContrastText:T,augmentColor:D,tonalOffset:s},P[t]),l)}const S=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const E={textTransform:"uppercase"},C='"Roboto", "Helvetica", "Arial", sans-serif';function _(e,t){const n="function"==typeof t?t(e):t,{fontFamily:o=C,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:u=400,fontWeightMedium:c=500,fontWeightBold:d=700,htmlFontSize:h=16,allVariants:p,pxToRem:f}=n,m=(0,i.A)(n,S);const g=s/14,v=f||(e=>"".concat(e/h*g,"rem")),y=(e,t,n,i,a)=>{return(0,r.A)({fontFamily:o,fontWeight:e,fontSize:v(t),lineHeight:n},o===C?{letterSpacing:"".concat((s=i/t,Math.round(1e5*s)/1e5),"em")}:{},a,p);var s},b={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(u,48,1.167,0),h4:y(u,34,1.235,.25),h5:y(u,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(u,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(u,16,1.5,.15),body2:y(u,14,1.43,.15),button:y(c,14,1.75,.4,E),caption:y(u,12,1.66,.4),overline:y(u,12,2.66,1,E),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,a.A)((0,r.A)({htmlFontSize:h,pxToRem:v,fontFamily:o,fontSize:s,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:c,fontWeightBold:d},b),m,{clone:!1})}function T(){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 D=["none",T(0,2,1,-1,0,1,1,0,0,1,3,0),T(0,3,1,-2,0,2,2,0,0,1,5,0),T(0,3,3,-2,0,3,4,0,0,1,8,0),T(0,2,4,-1,0,4,5,0,0,1,10,0),T(0,3,5,-1,0,5,8,0,0,1,14,0),T(0,3,5,-1,0,6,10,0,0,1,18,0),T(0,4,5,-2,0,7,10,1,0,2,16,1),T(0,5,5,-3,0,8,10,1,0,3,14,2),T(0,5,6,-3,0,9,12,1,0,3,16,2),T(0,6,6,-3,0,10,14,1,0,4,18,3),T(0,6,7,-4,0,11,15,1,0,4,20,3),T(0,7,8,-4,0,12,17,2,0,5,22,4),T(0,7,8,-4,0,13,19,2,0,5,24,4),T(0,7,9,-4,0,14,21,2,0,5,26,4),T(0,8,9,-5,0,15,22,2,0,6,28,5),T(0,8,10,-5,0,16,24,2,0,6,30,5),T(0,8,11,-5,0,17,26,2,0,6,32,5),T(0,9,11,-5,0,18,28,2,0,7,34,6),T(0,9,12,-6,0,19,29,2,0,7,36,6),T(0,10,13,-6,0,20,31,3,0,8,38,7),T(0,10,13,-6,0,21,33,3,0,8,40,7),T(0,10,14,-6,0,22,35,3,0,8,42,7),T(0,11,14,-7,0,23,36,3,0,9,44,8),T(0,11,15,-7,0,24,38,3,0,9,46,8)];var P=n(5293);const I={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},F=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:c={},typography:d={}}=e,h=(0,i.A)(e,F);if(e.vars&&void 0===e.generateCssVars)throw new Error((0,o.A)(18));const p=k(n),f=(0,u.A)(e);let m=(0,a.A)(f,{mixins:(g=f.breakpoints,v=t,(0,r.A)({toolbar:{minHeight:56,[g.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[g.up("sm")]:{minHeight:64}}},v)),palette:p,shadows:D.slice(),typography:_(p,d),transitions:(0,P.Ay)(c),zIndex:(0,r.A)({},I)});var g,v;m=(0,a.A)(m,h);for(var y=arguments.length,b=new Array(y>1?y-1:0),A=1;A<y;A++)b[A-1]=arguments[A];return m=b.reduce((e,t)=>(0,a.A)(e,t),m),m.unstable_sxConfig=(0,r.A)({},s.A,null==h?void 0:h.unstable_sxConfig),m.unstable_sx=function(e){return(0,l.A)({sx:e,theme:this})},m}const z=L},3795(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},3948(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6267).A},3951(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(5482);function i(e){var t={},n=!1;function i(t,i){return n=!0,i=new Promise(function(n){n(e[t](i))}),{done:!1,value:new r.A(i,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):i("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return i("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):i("return",e)}),t}},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)}},4107(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(9371);function i(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}},4181(e,t,n){"use strict";n.d(t,{$b:()=>r,h9:()=>o,vF:()=>i});const r={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 i=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config={level:e.level||r.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(r).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(r).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 r.ERROR:return console.error;case r.WARN:return console.warn;case r.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(r.DEBUG,...t)}info(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(r.INFO,...t)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(r.WARN,...t)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(r.ERROR,...t)}},o=i.info.bind(i)},4218(e,t,n){"use strict";n.d(t,{Sn:()=>D,Tg:()=>N,HP:()=>T,Sv:()=>F,Az:()=>z,$P:()=>O,tN:()=>P,yb:()=>I});var r,i=n(4107),o=n(1442),a=n(1152);!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"}(r||(r={}));const s={[r.QUOTATION_MARK]:r.QUOTATION_MARK,[r.REVERSE_SOLIDUS]:r.REVERSE_SOLIDUS,[r.SOLIDUS]:r.SOLIDUS,[r.LATIN_SMALL_LETTER_B]:r.BACKSPACE,[r.LATIN_SMALL_LETTER_F]:r.FORM_FEED,[r.LATIN_SMALL_LETTER_N]:r.NEWLINE,[r.LATIN_SMALL_LETTER_R]:r.CARRIAGE_RETURN,[r.LATIN_SMALL_LETTER_T]:r.TAB};class l{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 u{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 c;!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"}(c||(c={}));const d=c;var h;function p(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"}(h||(h={}));const f={stringBufferSize:0,numberBufferSize:0,separator:void 0,emitPartialTokens:!1};class m extends Error{constructor(e){super(e),Object.setPrototypeOf(this,m.prototype)}}class g{constructor(e){this.state=h.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({},f),e),this.emitPartialTokens=!0===e.emitPartialTokens,this.bufferedString=e.stringBufferSize&&e.stringBufferSize>4?new u(e.stringBufferSize):new l,this.bufferedNumber=e.numberBufferSize&&e.numberBufferSize>0?new u(e.numberBufferSize):new l,this.separator=e.separator,this.separatorBytes=e.separator?this.encoder.encode(e.separator):void 0}get isEnded(){return this.state===h.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 i=t[n];switch(this.state){case h.BOM_OR_START:if(e instanceof Uint8Array&&239===i){this.bom=[239,187,191],this.bomIndex+=1,this.state=h.BOM;continue}if(e instanceof Uint16Array){if(254===i){this.bom=[254,255],this.bomIndex+=1,this.state=h.BOM;continue}if(255===i){this.bom=[255,254],this.bomIndex+=1,this.state=h.BOM;continue}}if(e instanceof Uint32Array){if(0===i){this.bom=[0,0,254,255],this.bomIndex+=1,this.state=h.BOM;continue}if(255===i){this.bom=[255,254,0,0],this.bomIndex+=1,this.state=h.BOM;continue}}case h.START:if(this.offset+=1,this.separatorBytes&&i===this.separatorBytes[0]){if(1===this.separatorBytes.length){this.state=h.START,this.onToken({token:d.SEPARATOR,value:this.separator,offset:this.offset+this.separatorBytes.length-1});continue}this.state=h.SEPARATOR;continue}if(i===r.SPACE||i===r.NEWLINE||i===r.CARRIAGE_RETURN||i===r.TAB)continue;if(i===r.LEFT_CURLY_BRACKET){this.onToken({token:d.LEFT_BRACE,value:"{",offset:this.offset});continue}if(i===r.RIGHT_CURLY_BRACKET){this.onToken({token:d.RIGHT_BRACE,value:"}",offset:this.offset});continue}if(i===r.LEFT_SQUARE_BRACKET){this.onToken({token:d.LEFT_BRACKET,value:"[",offset:this.offset});continue}if(i===r.RIGHT_SQUARE_BRACKET){this.onToken({token:d.RIGHT_BRACKET,value:"]",offset:this.offset});continue}if(i===r.COLON){this.onToken({token:d.COLON,value:":",offset:this.offset});continue}if(i===r.COMMA){this.onToken({token:d.COMMA,value:",",offset:this.offset});continue}if(i===r.LATIN_SMALL_LETTER_T){this.state=h.TRUE1;continue}if(i===r.LATIN_SMALL_LETTER_F){this.state=h.FALSE1;continue}if(i===r.LATIN_SMALL_LETTER_N){this.state=h.NULL1;continue}if(i===r.QUOTATION_MARK){this.bufferedString.reset(),this.escapedCharsByteLength=0,this.state=h.STRING_DEFAULT;continue}if(i>=r.DIGIT_ONE&&i<=r.DIGIT_NINE){this.bufferedNumber.reset(),this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_INITIAL_NON_ZERO;continue}if(i===r.DIGIT_ZERO){this.bufferedNumber.reset(),this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_INITIAL_ZERO;continue}if(i===r.HYPHEN_MINUS){this.bufferedNumber.reset(),this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_INITIAL_MINUS;continue}break;case h.STRING_DEFAULT:if(i===r.QUOTATION_MARK){const e=this.bufferedString.toString();this.state=h.START,this.onToken({token:d.STRING,value:e,offset:this.offset}),this.offset+=this.escapedCharsByteLength+this.bufferedString.byteLength+1;continue}if(i===r.REVERSE_SOLIDUS){this.state=h.STRING_AFTER_BACKSLASH;continue}if(i>=128){if(this.bytes_in_sequence=i>=194&&i<=223?2:i<=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=h.STRING_INCOMPLETE_CHAR;continue}if(i>=r.SPACE){this.bufferedString.appendChar(i);continue}break;case h.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=h.STRING_DEFAULT;continue;case h.STRING_AFTER_BACKSLASH:const o=s[i];if(o){this.bufferedString.appendChar(o),this.escapedCharsByteLength+=1,this.state=h.STRING_DEFAULT;continue}if(i===r.LATIN_SMALL_LETTER_U){this.unicode="",this.state=h.STRING_UNICODE_DIGIT_1;continue}break;case h.STRING_UNICODE_DIGIT_1:case h.STRING_UNICODE_DIGIT_2:case h.STRING_UNICODE_DIGIT_3:if(i>=r.DIGIT_ZERO&&i<=r.DIGIT_NINE||i>=r.LATIN_CAPITAL_LETTER_A&&i<=r.LATIN_CAPITAL_LETTER_F||i>=r.LATIN_SMALL_LETTER_A&&i<=r.LATIN_SMALL_LETTER_F){this.unicode+=String.fromCharCode(i),this.state+=1;continue}break;case h.STRING_UNICODE_DIGIT_4:if(i>=r.DIGIT_ZERO&&i<=r.DIGIT_NINE||i>=r.LATIN_CAPITAL_LETTER_A&&i<=r.LATIN_CAPITAL_LETTER_F||i>=r.LATIN_SMALL_LETTER_A&&i<=r.LATIN_SMALL_LETTER_F){const e=parseInt(this.unicode+String.fromCharCode(i),16);let t;if(void 0===this.highSurrogate){if(e>=55296&&e<=56319){this.highSurrogate=e,this.state=h.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=h.STRING_DEFAULT;continue}break;case h.NUMBER_AFTER_INITIAL_MINUS:if(i===r.DIGIT_ZERO){this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_INITIAL_ZERO;continue}if(i>=r.DIGIT_ONE&&i<=r.DIGIT_NINE){this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_INITIAL_NON_ZERO;continue}break;case h.NUMBER_AFTER_INITIAL_ZERO:if(i===r.FULL_STOP){this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_FULL_STOP;continue}if(i===r.LATIN_SMALL_LETTER_E||i===r.LATIN_CAPITAL_LETTER_E){this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_E;continue}n-=1,this.state=h.START,this.emitNumber();continue;case h.NUMBER_AFTER_INITIAL_NON_ZERO:if(i>=r.DIGIT_ZERO&&i<=r.DIGIT_NINE){this.bufferedNumber.appendChar(i);continue}if(i===r.FULL_STOP){this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_FULL_STOP;continue}if(i===r.LATIN_SMALL_LETTER_E||i===r.LATIN_CAPITAL_LETTER_E){this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_E;continue}n-=1,this.state=h.START,this.emitNumber();continue;case h.NUMBER_AFTER_FULL_STOP:if(i>=r.DIGIT_ZERO&&i<=r.DIGIT_NINE){this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_DECIMAL;continue}break;case h.NUMBER_AFTER_DECIMAL:if(i>=r.DIGIT_ZERO&&i<=r.DIGIT_NINE){this.bufferedNumber.appendChar(i);continue}if(i===r.LATIN_SMALL_LETTER_E||i===r.LATIN_CAPITAL_LETTER_E){this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_E;continue}n-=1,this.state=h.START,this.emitNumber();continue;case h.NUMBER_AFTER_E:if(i===r.PLUS_SIGN||i===r.HYPHEN_MINUS){this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_E_AND_SIGN;continue}case h.NUMBER_AFTER_E_AND_SIGN:if(i>=r.DIGIT_ZERO&&i<=r.DIGIT_NINE){this.bufferedNumber.appendChar(i),this.state=h.NUMBER_AFTER_E_AND_DIGIT;continue}break;case h.NUMBER_AFTER_E_AND_DIGIT:if(i>=r.DIGIT_ZERO&&i<=r.DIGIT_NINE){this.bufferedNumber.appendChar(i);continue}n-=1,this.state=h.START,this.emitNumber();continue;case h.TRUE1:if(i===r.LATIN_SMALL_LETTER_R){this.state=h.TRUE2;continue}break;case h.TRUE2:if(i===r.LATIN_SMALL_LETTER_U){this.state=h.TRUE3;continue}break;case h.TRUE3:if(i===r.LATIN_SMALL_LETTER_E){this.state=h.START,this.onToken({token:d.TRUE,value:!0,offset:this.offset}),this.offset+=3;continue}break;case h.FALSE1:if(i===r.LATIN_SMALL_LETTER_A){this.state=h.FALSE2;continue}break;case h.FALSE2:if(i===r.LATIN_SMALL_LETTER_L){this.state=h.FALSE3;continue}break;case h.FALSE3:if(i===r.LATIN_SMALL_LETTER_S){this.state=h.FALSE4;continue}break;case h.FALSE4:if(i===r.LATIN_SMALL_LETTER_E){this.state=h.START,this.onToken({token:d.FALSE,value:!1,offset:this.offset}),this.offset+=4;continue}break;case h.NULL1:if(i===r.LATIN_SMALL_LETTER_U){this.state=h.NULL2;continue}break;case h.NULL2:if(i===r.LATIN_SMALL_LETTER_L){this.state=h.NULL3;continue}break;case h.NULL3:if(i===r.LATIN_SMALL_LETTER_L){this.state=h.START,this.onToken({token:d.NULL,value:null,offset:this.offset}),this.offset+=3;continue}break;case h.SEPARATOR:if(this.separatorIndex+=1,!this.separatorBytes||i!==this.separatorBytes[this.separatorIndex])break;this.separatorIndex===this.separatorBytes.length-1&&(this.state=h.START,this.onToken({token:d.SEPARATOR,value:this.separator,offset:this.offset+this.separatorIndex}),this.separatorIndex=0);continue;case h.BOM:if(i===this.bom[this.bomIndex]){if(this.bomIndex===this.bom.length-1){this.state=h.START,this.bom=void 0,this.bomIndex=0;continue}this.bomIndex+=1;continue}break;case h.ENDED:if(i===r.SPACE||i===r.NEWLINE||i===r.CARRIAGE_RETURN||i===r.TAB)continue}throw new m('Unexpected "'.concat(String.fromCharCode(i),'" at position "').concat(n,'" in state ').concat(p(this.state)))}if(this.emitPartialTokens)switch(this.state){case h.TRUE1:case h.TRUE2:case h.TRUE3:this.onToken({token:d.TRUE,value:!0,offset:this.offset,partial:!0});break;case h.FALSE1:case h.FALSE2:case h.FALSE3:case h.FALSE4:this.onToken({token:d.FALSE,value:!1,offset:this.offset,partial:!0});break;case h.NULL1:case h.NULL2:case h.NULL3:this.onToken({token:d.NULL,value:null,offset:this.offset,partial:!0});break;case h.STRING_DEFAULT:{const e=this.bufferedString.toString();this.onToken({token:d.STRING,value:e,offset:this.offset,partial:!0});break}case h.NUMBER_AFTER_INITIAL_ZERO:case h.NUMBER_AFTER_INITIAL_NON_ZERO:case h.NUMBER_AFTER_DECIMAL:case h.NUMBER_AFTER_E_AND_DIGIT:try{this.onToken({token:d.NUMBER,value:this.parseNumber(this.bufferedNumber.toString()),offset:this.offset,partial:!0})}catch(e){}}}catch(e){this.error(e)}}emitNumber(){this.onToken({token:d.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!==h.ENDED&&(this.state=h.ERROR),this.onError(e)}end(){switch(this.state){case h.NUMBER_AFTER_INITIAL_ZERO:case h.NUMBER_AFTER_INITIAL_NON_ZERO:case h.NUMBER_AFTER_DECIMAL:case h.NUMBER_AFTER_E_AND_DIGIT:this.state=h.ENDED,this.emitNumber(),this.onEnd();break;case h.BOM_OR_START:case h.START:case h.ERROR:case h.SEPARATOR:this.state=h.ENDED,this.onEnd();break;default:this.error(new m("Tokenizer ended in the middle of a token (state: ".concat(p(this.state),"). Either not all the data was received or the data was invalid.")))}}onToken(e){throw new m('Can\'t emit tokens before the "onToken" callback has been set up.')}onError(e){throw e}onEnd(){}}var v,y;function b(e){return["VALUE","KEY","COLON","COMMA","ENDED","ERROR","SEPARATOR"][e]}!function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"}(v||(v={})),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"}(y||(y={}));const A={paths:void 0,keepStack:!0,separator:void 0,emitPartialValues:!1};class x extends Error{constructor(e){super(e),Object.setPrototypeOf(this,x.prototype)}}class w{constructor(e){this.state=y.VALUE,this.mode=void 0,this.key=void 0,this.value=void 0,this.stack=[],(e=Object.assign(Object.assign({},A),e)).paths&&(this.paths=e.paths.map(e=>{if(void 0===e||"$*"===e)return;if(!e.startsWith("$"))throw new x('Invalid selector "'.concat(e,'". Should start with "$".'));const t=e.split(".").slice(1);if(t.includes(""))throw new x('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?y.COMMA:y.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=y.SEPARATOR:void 0===this.separator&&this.end())}emitPartial(e){this.shouldEmit()&&(this.state!==y.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===y.ENDED}write(e){let{token:t,value:n,partial:i}=e;try{if(i)return void this.emitPartial(n);if(this.state===y.VALUE){if(t===d.STRING||t===d.NUMBER||t===d.TRUE||t===d.FALSE||t===d.NULL)return this.mode===v.OBJECT?(this.value[this.key]=n,this.state=y.COMMA):this.mode===v.ARRAY&&(this.value.push(n),this.state=y.COMMA),void this.emit(n,this.shouldEmit());if(t===d.LEFT_BRACE){if(this.push(),this.mode===v.OBJECT)this.value=this.value[this.key]={};else if(this.mode===v.ARRAY){const e={};this.value.push(e),this.value=e}else this.value={};return this.mode=v.OBJECT,this.state=y.KEY,this.key=void 0,void this.emitPartial()}if(t===d.LEFT_BRACKET){if(this.push(),this.mode===v.OBJECT)this.value=this.value[this.key]=[];else if(this.mode===v.ARRAY){const e=[];this.value.push(e),this.value=e}else this.value=[];return this.mode=v.ARRAY,this.state=y.VALUE,this.key=0,void this.emitPartial()}if(this.mode===v.ARRAY&&t===d.RIGHT_BRACKET&&0===this.value.length)return void this.pop()}if(this.state===y.KEY){if(t===d.STRING)return this.key=n,this.state=y.COLON,void this.emitPartial();if(t===d.RIGHT_BRACE&&0===Object.keys(this.value).length)return void this.pop()}if(this.state===y.COLON&&t===d.COLON)return void(this.state=y.VALUE);if(this.state===y.COMMA){if(t===d.COMMA){if(this.mode===v.ARRAY)return this.state=y.VALUE,void(this.key+=1);if(this.mode===v.OBJECT)return void(this.state=y.KEY)}if(t===d.RIGHT_BRACE&&this.mode===v.OBJECT||t===d.RIGHT_BRACKET&&this.mode===v.ARRAY)return void this.pop()}if(this.state===y.SEPARATOR&&t===d.SEPARATOR&&n===this.separator)return void(this.state=y.VALUE);if(t===d.SEPARATOR&&this.state!==y.SEPARATOR&&Array.from(n).map(e=>e.charCodeAt(0)).every(e=>e===r.SPACE||e===r.NEWLINE||e===r.CARRIAGE_RETURN||e===r.TAB))return;throw new x("Unexpected ".concat(d[t]," (").concat(JSON.stringify(n),") in state ").concat(b(this.state)))}catch(e){this.error(e)}}error(e){this.state!==y.ENDED&&(this.state=y.ERROR),this.onError(e)}end(){this.state!==y.VALUE&&this.state!==y.SEPARATOR||this.stack.length>0?this.error(new Error("Parser ended in mid-parsing (state: ".concat(b(this.state),"). Either not all the data was received or the data was invalid."))):(this.state=y.ENDED,this.onEnd())}onValue(e){throw new x('Can\'t emit data before the "onValue" callback has been set up.')}onError(e){throw e}onEnd(){}}class k{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.tokenizer=new g(e),this.tokenParser=new w(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)}}}var S=n(9992),E=n(1825),C=n(1270),_=n(9385);const T=()=>{let e="";return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function*(){e+=t,e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n");let n=e.indexOf("\n\n");for(;-1!==n;){const t=e.slice(0,n);e=e.slice(n+2);const r=[];for(const e of t.split("\n")){if(e.startsWith(":"))continue;if(!e.startsWith("data:"))continue;let t=e.slice(5);t.startsWith(" ")&&(t=t.slice(1)),r.push(t)}if(r.length){const e=r.join("\n");"[DONE]"!==e.trim()&&(yield e)}n=e.indexOf("\n\n")}}()}},D=()=>{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:()=>(0,a.A)(function*(){const i=e=>{t=e};for(;!n||e.length>0;)e.length>0?yield e.shift():n||(yield(0,o.A)(new Promise(i)));if(r)throw r})()}};function P(e,t){var n,r,i;switch(t){case S.C3L:case S.KBl:case S.rUY:case S.FsV:case S.F16:case S.EjO:case S.NQu:case S.cbe:case S.kYm:case S.dGW:case S.mmp:case S.edy:case S.lbn: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 S.lLy:{var o,a,s,l;const t=e.event_type||e.type;if("error"===t){var u;const t=new Error((null===(u=e.error)||void 0===u?void 0:u.message)||"Gemini interaction stream failed");throw t.isAIStreamTerminal=!0,t}if("interaction.status_update"===t&&["failed","cancelled","incomplete","budget_exceeded"].includes(e.status)){const t=new Error("Gemini interaction stream ended with status: ".concat(e.status));throw t.isAIStreamTerminal=!0,t}var c;if(t)return"step.delta"===t&&"text"===(null===(c=e.delta)||void 0===c?void 0:c.type)&&e.delta.text||"";const n=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(n)?n.find(e=>!e.thought):void 0)||void 0===l?void 0:l.text)||""}case S.EsI:var d;return"content_block_delta"===e.type&&(null===(d=e.delta)||void 0===d?void 0:d.text)||"";default:return""}}function*I(e,t){if(!e)return;const n=(0,E.Qw)(e);if(n.length>0)for(const{id:e,translation:r}of n)t.has(e)||(t.add(e),yield{id:e,translation:r});else for(const{id:n,translation:r}of(0,E.Xq)(e,{requireCompleteLine:!0}))t.has(n)||(t.add(n),yield{id:n,translation:r})}function F(){const e=[],t=new k({paths:["$.translations.*","$.*"],keepStack:!1});return t.onValue=t=>{let{value:n}=t;const r=(0,E.ek)(n,NaN);r&&e.push(r)},t.onError=()=>{},{*write(n){try{t.write(n)}catch(e){}for(;e.length>0;)yield e.shift()},end(){try{t.end()}catch(e){}}}}const L=function(e){var t,n,r,o,a,s,l,u;let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=arguments.length>2?arguments[2]:void 0;const h=Number(null!==(t=null==e?void 0:e.s)&&void 0!==t?t:null==e?void 0:e.start_id),p=Number(null!==(n=null==e?void 0:e.e)&&void 0!==n?n:null==e?void 0:e.end_id);if(!Number.isInteger(h)||!Number.isInteger(p)||0===c.length)return null;const f=Math.max(0,Math.min(h,c.length-1)),m=Math.max(f,Math.min(p,c.length-1)),g=String(null!==(r=null!==(o=e.o)&&void 0!==o?o:e.original)&&void 0!==r?r:""),v=null==d?void 0:d.realign(h,p,g);return(0,i.A)({start:c[null!==(a=null==v?void 0:v.startIdx)&&void 0!==a?a:f].start,end:c[null!==(s=null==v?void 0:v.endIdx)&&void 0!==s?s:m].end,text:g,translation:String(null!==(l=null!==(u=e.t)&&void 0!==u?u:e.translation)&&void 0!==l?l:""),_si:h,_ei:p},v&&{_alignedSi:v.startIdx,_alignedEi:v.endIdx})};function z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{fromLang:t="auto"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",r=!1,i=0;const o=new Set,a=(0,C.n)(e);let s=null,l=0,u=!1;const c=()=>{if(r)return;const e=n.search(/[[{]/);-1!==e?(n=n.slice(e),r=!0,i=0):n=n.slice(-20)},d=()=>{const e=[];let t=0,r=-1,o=!1,a=!1,s=-1;for(let l=i;l<n.length;l++){const i=n[l];o?a?a=!1:"\\"===i?a=!0:'"'===i&&(o=!1):'"'!==i?"{"!==i?"}"===i&&(t-=1,0===t&&-1!==r&&(e.push(n.slice(r,l+1)),s=l+1,r=-1)):(0===t&&(r=l),t+=1):o=!0}return-1!==s?(n=n.slice(s),i=0):i=Math.max(0,r),e},h=n=>{const r=[];for(const i of n)try{if(u)break;const n=JSON.parse(i),c=(0,_.Tt)(n)?"index-v1":"boundary";if(s||(s=c),s!==c){u=!0;break}const d="boundary"===s?(0,_.Ir)(n,e,l,t):L(n,e,a);if(!d){if("boundary"===s){u=!0;break}continue}"boundary"===s&&(l=d._ei+1);const h="".concat(d._si,":").concat(d._ei);if(o.has(h))continue;o.add(h),r.push(d)}catch(e){}return r};return{write(){return n+=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",c(),r?h(d()):[]},end:()=>(c(),r?h(d()):[])}}function O(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};return{isJson:"json"===o.reduce((e,t)=>e.pos<t.pos?e:t).type,detected:!0}}function N(){let e=null,t="";const n=[],r=new Map,o=new k({paths:["$.translations.*.text","$.translations.*.translation","$.*.text","$.*.translation","$.text","$.translation"],keepStack:!0,emitPartialTokens:!0,emitPartialValues:!0});o.onValue=e=>{let{value:t,key:o,parent:a}=e;if(void 0===t)return;const s=(0,E.ek)((0,i.A)((0,i.A)({},a),{},{[o]:t}),NaN);if(!s)return;const[l]=s.translation;l&&r.get(s.id)!==l&&(r.set(s.id,l),n.push({id:s.id,partialText:l,isComplete:!1}))},o.onError=()=>{};return{write(r){if(t+=r,!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);case"json":return(e=>{try{o.write(e)}catch(e){}return n.splice(0)})(r);default:return[]}},getFormat:()=>e,getBuffer:()=>t}}},4307(e,t,n){"use strict";n.d(t,{Ef:()=>g,Es:()=>C,Pc:()=>H,Qs:()=>u,Vn:()=>M,a5:()=>U,cP:()=>W,uM:()=>y,xo:()=>b,zh:()=>B});var r=n(4107),i=n(5493);const o="nobatch-translation",a="batch-translation-json",s="subtitle-segmentation",l="dictionary-en-zh",u="follow_api",c="batch system prompt",d="user prompt",h="subtitle prompt",p="dictionary prompt",f=o,m=a,g=s,v=l,y=2,b=3,A=[{slug:o,category:d,nameKey:"preset_prompt_nobatch_translation",name:"Non-batch translation",systemPrompt:i.$1,userPrompt:i.EE},{slug:a,category:c,nameKey:"preset_prompt_batch_translation_json",name:"Batch translation (JSON)",systemPrompt:i.lo,userPrompt:""},{slug:"batch-translation-xml",category:c,nameKey:"preset_prompt_batch_translation_xml",name:"Batch translation (XML)",systemPrompt:i.ad,userPrompt:""},{slug:"batch-translation-line",category:c,nameKey:"preset_prompt_batch_translation_line",name:"Batch translation (LINE)",systemPrompt:i.Ww,userPrompt:""},{slug:s,category:h,nameKey:"preset_prompt_subtitle_segmentation",name:"Subtitle AI segmentation",systemPrompt:i.U$,userPrompt:""},{slug:l,category:p,nameKey:"preset_prompt_dictionary_en_zh",name:"AI English-Chinese Dictionary",systemPrompt:i.im,userPrompt:i.fk},{slug:"dictionary-en-ja",category:p,nameKey:"preset_prompt_dictionary_en_ja",name:"AI English-Japanese Dictionary",systemPrompt:i.Im,userPrompt:i.fk},{slug:"dictionary-en-ko",category:p,nameKey:"preset_prompt_dictionary_en_ko",name:"AI English-Korean Dictionary",systemPrompt:i.ts,userPrompt:i.fk},{slug:"dictionary-en-vi",category:p,nameKey:"preset_prompt_dictionary_en_vi",name:"AI English-Vietnamese Dictionary",systemPrompt:i.oe,userPrompt:i.fk},{slug:"dictionary-en-ru",category:p,nameKey:"preset_prompt_dictionary_en_ru",name:"AI English-Russian Dictionary",systemPrompt:i.om,userPrompt:i.fk}],x=new Set(A.map(e=>e.slug)),w=["slug","category","name","systemPrompt","userPrompt"];function k(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{slug:String(e.slug||""),category:String(e.category||""),nameKey:String(e.nameKey||""),name:String(e.name||""),systemPrompt:String(e.systemPrompt||""),userPrompt:String(e.userPrompt||"")}}function S(e){return x.has(e)}function E(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(Array.isArray(e)?e:[]).map(k).filter(e=>e.slug&&!S(e.slug)).map(e=>{let{slug:t,category:n,name:r,systemPrompt:i,userPrompt:o}=e;return{slug:t,category:n,name:r,systemPrompt:i,userPrompt:o}})}function C(){let e=arguments.length>1?arguments[1]:void 0;return e?function(){const e=E(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);return[...A,...e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find(t=>(null==t?void 0:t.slug)===e):null}function _(e,t,n){return C(e,t)||C(e,n)}function T(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return Object.prototype.hasOwnProperty.call(e,t)}function D(){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]:"";return T(e,t)?e[t]:n}function P(){return T(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}function I(){return String((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})[arguments.length>1?arguments[1]:void 0]||"")}function F(e,t){const n=k(e),r=k(t);return n.category===r.category&&n.systemPrompt===r.systemPrompt&&n.userPrompt===r.userPrompt}function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const n=String(e.apiName||e.apiSlug||"API");return"".concat(n," ").concat(t)}function z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=function(e){const t=String(e);let n=2166136261,r=16777619;for(let e=0;e<t.length;e+=1){const i=t.charCodeAt(e);n=Math.imul(n^i,16777619),r=Math.imul(r^i+e,2166136261)}return"".concat((n>>>0).toString(36)).concat((r>>>0).toString(36))}(JSON.stringify({apiSlug:String(e.apiSlug||""),promptType:t,category:n.category,systemPrompt:n.systemPrompt,userPrompt:n.userPrompt}));return"prompt_migrated_".concat(t,"_").concat(r)}function O(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e)return e;if(!(T(e,"batchPromptId")||T(e,"nobatchPromptId")||T(e,"subtitlePromptId")||T(e,"dictPromptId")))return e;const t=(0,r.A)({},e);return delete t.batchPromptId,delete t.nobatchPromptId,delete t.subtitlePromptId,delete t.dictPromptId,t}const N=[{promptType:"batch",promptLabel:"Batch prompt",category:c,systemPromptFieldName:"systemPrompt",userPromptFieldName:"",promptSlugFieldName:"batchPromptSlug"},{promptType:"nobatch",promptLabel:"Non-batch prompt",category:d,systemPromptFieldName:"nobatchPrompt",userPromptFieldName:"nobatchUserPrompt",promptSlugFieldName:"nobatchPromptSlug"},{promptType:"subtitle",promptLabel:"Subtitle prompt",category:h,systemPromptFieldName:"subtitlePrompt",userPromptFieldName:"",promptSlugFieldName:"subtitlePromptSlug"},{promptType:"dict",promptLabel:"Dictionary prompt",category:p,systemPromptFieldName:"dictPrompt",userPromptFieldName:"dictUserPrompt",promptSlugFieldName:"dictPromptSlug"}];function j(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=new Map;return e.forEach(e=>{const n=null==e?void 0:e.slug;n&&!t.has(n)&&t.set(n,e)}),t}function R(e,t,n){if(P(e,t.promptSlugFieldName))return"";const i=function(e,t){return T(e,t.systemPromptFieldName)?{slug:"",category:t.category,nameKey:"",name:L(e,t.promptLabel),systemPrompt:I(e,t.systemPromptFieldName),userPrompt:t.userPromptFieldName?I(e,t.userPromptFieldName):""}:null}(e,t);if(!i)return"";const o=function(e){return A.find(t=>F(t,e))}(i);if(o)return o.slug;const a=z(e,t.promptType,i),s=function(e,t,n){let r=1,i=n;for(;e.has(i);){if(F(e.get(i),t))return i;r+=1,i="".concat(n,"_").concat(r)}return i}(n.promptBySlug,i,a);if(!n.promptBySlug.has(s)){const e=(0,r.A)((0,r.A)({},i),{},{slug:s});n.prompts.push(e),n.promptBySlug.set(s,e),n.hasPromptChanges=!0}return s}function M(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Number((null==e?void 0:e.version)||1);return Number.isFinite(t)&&t>=1?t:1}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e||"object"!=typeof e)return e;if(!Array.isArray(e.transApis))return(0,r.A)((0,r.A)({},e),{},{version:y});const t=Array.isArray(e.prompts)?e.prompts:[],n=E(t),o=!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return Array.isArray(e)?e.length===t.length&&e.every((e,n)=>!(!e||"object"!=typeof e)&&(Object.keys(e).every(e=>w.includes(e))&&JSON.stringify(k(e))===JSON.stringify(t[n]))):0===t.length}(t,n),a=function(e){if(!e||!T(e,"segPromptId"))return e;const t=(0,r.A)({},e);return delete t.segPromptId,t}(e.subtitleSetting),s=a!==e.subtitleSetting,l={prompts:[...n],promptBySlug:j([...A,...n]),hasPromptChanges:o};let u=!1;const c=e.transApis.map(e=>{if(!e||"object"!=typeof e)return e;let t=O(e);return t!==e&&(u=!0),N.forEach(n=>{const o=Boolean(t.apiType)&&!i.sN.ai.has(t.apiType),a="string"==typeof t[n.systemPromptFieldName]?t[n.systemPromptFieldName].trim():"",s=n.userPromptFieldName&&"string"==typeof t[n.userPromptFieldName]?t[n.userPromptFieldName].trim():"";if(o||!a&&!s)return void((T(t,n.systemPromptFieldName)||n.userPromptFieldName&&T(t,n.userPromptFieldName))&&(t===e&&(t=(0,r.A)({},e)),t=function(e,t){const n=(0,r.A)({},e);return delete n[t.systemPromptFieldName],t.userPromptFieldName&&delete n[t.userPromptFieldName],n}(t,n),u=!0));const c=R(t,n,l);c&&t[n.promptSlugFieldName]!==c&&(t===e&&(t=(0,r.A)({},e)),t[n.promptSlugFieldName]=c,delete t[n.systemPromptFieldName],n.userPromptFieldName&&delete t[n.userPromptFieldName],u=!0)}),t}),d=(0,r.A)({},e);return d.version=y,d.transApis=u?c:e.transApis,d.prompts=l.hasPromptChanges?l.prompts:n,s&&(d.subtitleSetting=a),d}function W(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e||"object"!=typeof e)return e;const t=M(e)<y?B(e):e;if(M(t)>=3)return t;const n=Array.isArray(t.transApis)?t.transApis.map(e=>{if((null==e?void 0:e.apiType)!==i.lL)return e;const t=e.url||"";return t.includes("generativelanguage.googleapis.com")&&t.includes("interactions")?(0,r.A)((0,r.A)({},e),{},{url:i.GY}):e}):t.transApis;return(0,r.A)((0,r.A)({},t),{},{transApis:n,version:3})}function U(){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]:{};if(!e)return e;const i=O(e),o=i===e?(0,r.A)({},e):i,a=P(o,"batchPromptSlug"),s=T(o,"systemPrompt"),l=_(t,D(o,"batchPromptSlug",m),m);!l||!a&&s||(o.batchPromptSlug=l.slug,o.systemPrompt=l.systemPrompt);const u=P(o,"nobatchPromptSlug"),c=T(o,"nobatchPrompt")||T(o,"nobatchUserPrompt"),d=_(t,D(o,"nobatchPromptSlug",f),f);!d||!u&&c||(o.nobatchPromptSlug=d.slug,o.nobatchPrompt=d.systemPrompt,o.nobatchUserPrompt=d.userPrompt);const h="global"===(null==n?void 0:n.segPromptMode),p=P(o,"subtitlePromptSlug"),y=T(o,"subtitlePrompt"),b=_(t,h?D(n,"segPromptSlug",g):D(o,"subtitlePromptSlug",g),g);b&&(h||p||!y)&&(h||(o.subtitlePromptSlug=b.slug),o.subtitlePrompt=b.systemPrompt);const A=P(o,"dictPromptSlug"),x=T(o,"dictPrompt")||T(o,"dictUserPrompt"),w=_(t,D(o,"dictPromptSlug",v),v);return!w||!A&&x||(o.dictPromptSlug=w.slug,o.dictPrompt=w.systemPrompt,o.dictUserPrompt=w.userPrompt),o}function H(){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]:{};return(Array.isArray(e)?e:[]).map(e=>U(e,t,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})},4430(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},4481(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=g,rootShouldForwardProp:r=f,slotShouldForwardProp:l=f}=e,c=e=>(0,u.default)((0,i.default)({},e,{theme:y((0,i.default)({},e,{defaultTheme:n,themeId:t}))}));return c.__mui_systemSx=!0,function(e){let u=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:m,skipSx:g,overridesResolver:x=b(v(p))}=u,w=(0,o.default)(u,h),k=d&&d.startsWith("Mui")||p?"components":"custom",S=void 0!==m?m:p&&"Root"!==p&&"root"!==p||!1,E=g||!1;let C=f;"Root"===p||"root"===p?C=r:p?C=l:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const _=(0,a.default)(e,(0,i.default)({shouldForwardProp:C,label:undefined},w)),T=e=>"function"==typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>{const o=y({theme:r.theme,defaultTheme:n,themeId:t});return A(e,(0,i.default)({},r,{theme:o}),o.modularCssLayers?k:void 0)}:e,D=function(r){let o=T(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 u=s?s.map(T):[];d&&x&&u.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]=A(o,(0,i.default)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),x(e,a)}),d&&!S&&u.push(e=>{var r;const o=y((0,i.default)({},e,{defaultTheme:n,themeId:t}));return A({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)}),E||u.push(c);const h=u.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=_(o,...u);return e.muiName&&(p.muiName=e.muiName),p};return _.withConfig&&(D.withConfig=_.withConfig),D}};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(1296)),s=n(2623),l=(r(n(3181)),r(n(2621)),r(n(7946))),u=r(n(3413));const c=["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 m(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 g=(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 A(e,t,n){let{ownerState:r}=t,s=(0,o.default)(t,c);const l="function"==typeof e?e((0,i.default)({ownerState:r},s)):e;if(Array.isArray(l))return l.flatMap(e=>A(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?m((0,a.internal_serializeStyles)(o),n):o)}}),t}return n?m((0,a.internal_serializeStyles)(l),n):l}},4519(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6333).A},4651(e,t,n){"use strict";e.exports=n(1508)},4690(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},4743(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},4837(e){e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},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},4882(e,t,n){"use strict";n.d(t,{A:()=>r});const r="$$material"},5089(e,t,n){"use strict";e.exports=n(7811)},5219(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(4320),i=n(8915),o=n(6997),a=n(9718);const s=["sx"];function l(e){const{sx:t}=e,n=(0,i.A)(e,s),{systemProps:l,otherProps:u}=(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 c;return c=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)({},u,{sx:c})}},5293(e,t,n){"use strict";n.d(t,{Ay:()=>c});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 u(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function c(e){const t=(0,i.A)({},a,e.easing),n=(0,i.A)({},s,e.duration);return(0,i.A)({getAutoHeightDuration:u,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:u=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 u?u:l(u))).join(",")}},e,{easing:t,duration:n})}},5362(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},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 u(e,t){return e.indexOf(t)}function c(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 m=1,g=1,v=0,y=0,b=0,A="";function x(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:m,column:g,length:a,return:""}}function w(e,t){return a(x("",null,null,"",null,null,0),e,{length:-e.length},t)}function k(){return b=y>0?c(A,--y):0,g--,10===b&&(g=1,m--),b}function S(){return b=y<v?c(A,y++):0,g++,10===b&&(g=1,m++),b}function E(){return c(A,y)}function C(){return y}function _(e,t){return d(A,e,t)}function T(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 D(e){return m=g=1,v=h(A=e),y=0,[]}function P(e){return A="",e}function I(e){return s(_(y-1,z(91===e?e+2:40===e?e+1:e)))}function F(e){for(;(b=E())&&b<33;)S();return T(e)>2||T(b)>3?"":" "}function L(e,t){for(;--t&&S()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return _(e,C()+(t<6&&32==E()&&32==S()))}function z(e){for(;S();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&z(b);break;case 40:41===e&&z(e);break;case 92:S()}return y}function O(e,t){for(;S()&&e+b!==57&&(e+b!==84||47!==E()););return"/*"+_(t,y-1)+"*"+o(47===e?e:S())}function N(e){for(;!T(E());)S();return _(e,y)}var j="-ms-",R="-moz-",M="-webkit-",B="comm",W="rule",U="decl",H="@keyframes";function V(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 B:return"";case H:return e.return=e.value+"{"+V(e.children,r)+"}";case W:e.value=e.props.join(",")}return h(n=V(e.children,r))?e.return=e.value+"{"+n+"}":""}function K(e){return P(q("",null,null,null,[""],e=D(e),0,[0],e))}function q(e,t,n,r,i,a,s,d,p){for(var m=0,g=0,v=s,y=0,b=0,A=0,x=1,w=1,_=1,T=0,D="",P=i,z=a,j=r,R=D;w;)switch(A=T,T=S()){case 40:if(108!=A&&58==c(R,v-1)){-1!=u(R+=l(I(T),"&","&\f"),"&\f")&&(_=-1);break}case 34:case 39:case 91:R+=I(T);break;case 9:case 10:case 13:case 32:R+=F(A);break;case 92:R+=L(C()-1,7);continue;case 47:switch(E()){case 42:case 47:f(X(O(S(),C()),t,n),p);break;default:R+="/"}break;case 123*x:d[m++]=h(R)*_;case 125*x:case 59:case 0:switch(T){case 0:case 125:w=0;case 59+g:-1==_&&(R=l(R,/\f/g,"")),b>0&&h(R)-v&&f(b>32?$(R+";",r,n,v-1):$(l(R," ","")+";",r,n,v-2),p);break;case 59:R+=";";default:if(f(j=Y(R,t,n,m,g,i,d,D,P=[],z=[],v),a),123===T)if(0===g)q(R,t,j,j,P,a,v,d,z);else switch(99===y&&110===c(R,3)?100:y){case 100:case 108:case 109:case 115:q(e,j,j,r&&f(Y(e,j,j,0,0,i,d,D,i,P=[],v),z),i,z,v,d,r?P:z);break;default:q(R,j,j,j,[""],z,0,d,z)}}m=g=b=0,x=_=1,D=R="",v=s;break;case 58:v=1+h(R),b=A;default:if(x<1)if(123==T)--x;else if(125==T&&0==x++&&125==k())continue;switch(R+=o(T),T*x){case 38:_=g>0?1:(R+="\f",-1);break;case 44:d[m++]=(h(R)-1)*_,_=1;break;case 64:45===E()&&(R+=I(S())),y=E(),g=v=h(D=R+=N(C())),T++;break;case 45:45===A&&2==h(R)&&(x=0)}}return a}function Y(e,t,n,r,o,a,u,c,h,f,m){for(var g=o-1,v=0===o?a:[""],y=p(v),b=0,A=0,w=0;b<r;++b)for(var k=0,S=d(e,g+1,g=i(A=u[b])),E=e;k<y;++k)(E=s(A>0?v[k]+" "+S:l(S,/&\f/g,v[k])))&&(h[w++]=E);return x(e,t,n,0===o?W:c,h,f,m)}function X(e,t,n){return x(e,t,n,B,o(b),d(e,2,-2),0)}function $(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=E(),38===r&&12===i&&(t[n]=1),!T(i);)S();return _(e,y)},Q=function(e,t){return P(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===E()&&(t[n]=1),e[n]+=J(y-1,t,n);break;case 2:e[n]+=I(r);break;case 4:if(44===r){e[++n]=58===E()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=S());return e}(D(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 u=0;u<a.length;u++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[u]):a[u]+" "+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^c(e,0)?(((t<<2^c(e,0))<<2^c(e,1))<<2^c(e,2))<<2^c(e,3):0}(e,t)){case 5103:return M+"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 M+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return M+e+R+e+j+e+e;case 6828:case 4268:return M+e+j+e+e;case 6165:return M+e+j+"flex-"+e+e;case 5187:return M+e+l(e,/(\w+).+(:[^]+)/,M+"box-$1$2"+j+"flex-$1$2")+e;case 5443:return M+e+j+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return M+e+j+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return M+e+j+l(e,"shrink","negative")+e;case 5292:return M+e+j+l(e,"basis","preferred-size")+e;case 6060:return M+"box-"+l(e,"-grow","")+M+e+j+l(e,"grow","positive")+e;case 4554:return M+l(e,/([^-])(transform)/g,"$1"+M+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,M+"$1"),/(image-set)/,M+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,M+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,M+"box-pack:$3"+j+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+M+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,M+"$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(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+M+"$2-$3$1"+R+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,h(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+M)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+M+(45===c(e,14)?"inline-":"")+"box$3$1"+M+"$2$3$1"+j+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return M+e+j+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return M+e+j+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return M+e+j+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return M+e+j+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 H:return V([w(e,{value:l(e.value,"@","@"+M)})],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 V([w(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return V([w(e,{props:[l(t,/:(plac\w+)/,":"+M+"input-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,j+"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 u,c,d,h,f=[G,(h=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&h(e)})],m=(c=[ee,te].concat(a,f),d=p(c),function(e,t,n,r){for(var i="",o=0;o<d;o++)i+=c[o](e,t,n,r)||"";return i});o=function(e,t,n,r){u=n,V(K(e?e+"{"+t.styles+"}":t.styles),m),r&&(g.inserted[t.name]=!0)};var g={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 g.sheet.hydrate(l),g}},5460(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(6228);const i=e=>(0,r.A)(e)&&"classes"!==e},5482(e,t,n){"use strict";function r(e,t){this.v=e,this.k=t}n.d(t,{A:()=>r})},5493(e,t,n){"use strict";n.d(t,{$1:()=>et,$K:()=>i,$Q:()=>Ke,An:()=>$,Bi:()=>ee,C3:()=>re,EE:()=>tt,Ej:()=>V,Es:()=>ae,F$:()=>T,F1:()=>H,FS:()=>M,Fs:()=>U,Fx:()=>We,G8:()=>fe,GD:()=>C,GY:()=>E,HH:()=>pe,HO:()=>De,IE:()=>G,Im:()=>st,JI:()=>L,JW:()=>c,Jq:()=>Ce,KB:()=>B,L3:()=>f,NQ:()=>K,O0:()=>F,PP:()=>o,Qf:()=>h,S6:()=>S,SQ:()=>P,U$:()=>ht,UF:()=>qe,WT:()=>u,Wd:()=>m,Ww:()=>it,X6:()=>g,Xv:()=>Qe,Ym:()=>y,Z2:()=>Ge,ZI:()=>te,_T:()=>gt,ad:()=>rt,b9:()=>k,bC:()=>O,bN:()=>se,bq:()=>s,br:()=>j,c0:()=>X,cb:()=>q,dG:()=>ue,dy:()=>_,e7:()=>Y,eA:()=>Xe,ed:()=>le,fD:()=>p,fF:()=>Z,fk:()=>dt,fq:()=>de,h8:()=>z,i8:()=>Ue,iP:()=>Fe,iV:()=>yt,im:()=>ot,jg:()=>l,jy:()=>a,k0:()=>Je,kX:()=>R,kY:()=>oe,lL:()=>ie,lW:()=>Te,lb:()=>J,lo:()=>nt,mS:()=>Ze,mm:()=>ce,oe:()=>ut,om:()=>ct,q7:()=>D,qK:()=>Pe,rU:()=>W,s1:()=>I,sN:()=>me,sn:()=>A,to:()=>He,ts:()=>lt,ul:()=>N,vH:()=>Ve,w6:()=>d,xN:()=>Q,xf:()=>w,xh:()=>x,yC:()=>Se,yD:()=>b,zC:()=>ne,zJ:()=>v});var r=n(4107);const i=30,o=10,a=100,s=400,l=20,u=1e4,c=10,d=3,h="{{from}}",p="{{to}}",f="{{fromLang}}",m="{{toLang}}",g="{{text}}",v="{{tone}}",y="{{title}}",b="{{description}}",A="{{summary}}",x="{{context}}",w="{{key}}",k="{{model}}",S="{{glossary}}",E="https://generativelanguage.googleapis.com/v1beta/models/".concat(k,":generateContent"),C="Bing",_="Youdao",T=[C,_],D=new Set(T),P="Baidu",I="Youdao",F=[P,I],L=new Set(F),z="BuiltinAI",O="Google",N="Google2",j="GoogleCloud",R="Microsoft",M="AzureAI",B="DeepSeek",W="OpenCodeGo",U="SiliconFlow",H="XiaomiMimo",V="AliyunBailian",G="QwenMT",K="Cerebras",q="Zai",Y="DeepL",X="DeepLX",$="DeepLFree",J="ePhoneAI",Q="Baidu",Z="Tencent",ee="Volcengine",te="Yandex",ne="YandexFree",re="OpenAI",ie="Gemini",oe="Gemini2",ae="Claude",se="CloudflareAI",le="Ollama",ue="OpenRouter",ce="OrcaRouter",de="Custom",he=[z,O,N,j,R,M,B,W,U,H,V,G,K,q,Z,ee,te,ne,Y,$,X,J,re,ie,oe,ae,se,le,ue,ce,de],pe=[z,O,Q,Z],fe=new Set(pe),me={builtin:new Set(he),machine:new Set([R,$,Q,Z,ee,ne,G]),ai:new Set([J,re,B,W,U,H,V,K,q,ie,oe,ae,le,ue,ce,de]),mulkeys:new Set([M,j,te,B,W,U,H,V,G,K,q,Y,re,ie,oe,ae,se,le,ue,ce,J,de]),batch:new Set([M,B,W,U,H,V,K,q,N,j,te,R,Z,Y,re,ie,oe,ae,le,ue,ce,J,de]),context:new Set([B,W,U,H,V,K,q,re,ie,oe,ae,le,ue,ce,J,de]),stream:new Set([B,W,U,H,V,K,q,re,ie,oe,ae,le,ue,ce,J]),sponsors:new Set([J]),darkIcon:new Set([U,H,J,q,Y,$,X,re,le,ue])},ge={max:"Max",xhigh:"X-High",high:"High",medium:"Medium",low:"Low",minimal:"Minimal"},ve={none:0,minimal:1,low:2,medium:3,high:4,xhigh:5,max:6},ye=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(e=>({value:e,label:ge[e]||e}))},be=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.A)({efforts:e?ye(e):null},t)},Ae=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return be(e,(0,r.A)({enable:"effort",disable:"none"},t))},xe=function(){const e=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLowerCase().replace(/^openai\//,"");return/^gpt-5\.6(?:-|$)/.test(e)?Ae(["max","xhigh","high","medium","low"]):/^gpt-5\.(?:4|2)-pro(?:-|$)/.test(e)?Ae(["xhigh","high","medium"]):/^gpt-5-pro(?:-|$)/.test(e)?Ae(["high"]):/^gpt-5\.[23]-codex(?:-|$)/.test(e)||/^gpt-5\.(?:5|4|2)(?:-|$)/.test(e)?Ae(["xhigh","high","medium","low"]):/^gpt-5\.1(?:-\d{4}-\d{2}-\d{2})?$/.test(e)?Ae(["high","medium","low"],{defaultEnabled:!1,defaultEffort:"none"}):/^gpt-5\.1(?:-|$)/.test(e)?Ae(["high","medium","low"]):/^gpt-5(?:-|$)/.test(e)?Ae(["high","medium","low","minimal"]):null},we=e=>{let{apiType:t,url:n="",model:r=""}=e;const i=Be({apiType:t,model:r});if(!i)return null;const o=De(r);let a=null;t===oe&&Oe(o)?a="none":t===ie&&Pe(n)&&ze(o)?a="omit":t===ie&&!Pe(n)&&Oe(o)&&(a=0);let s=null,l=!0;return Le(o)?(l=!ze(o),l&&t===ie&&!Pe(n)&&(s=-1)):o.startsWith("gemini-3.6-flash")||o.startsWith("gemini-3.5-flash")&&!o.startsWith("gemini-3.5-flash-lite")?s="medium":o.includes("flash-lite")||Re(o)?s="minimal":(Ne(o)||je(o)||o.startsWith("gemini-3-flash"))&&(s="high"),be(i.map(e=>e.value),{enable:"effort",disable:a,defaultEffort:s,defaultEnabled:l})},ke=(e,t)=>()=>be(e,t),Se={[B]:{adapter:"deepseek",resolveCapability:ke(["max","high"],{enable:"explicit",disable:"explicit"})},[W]:{adapter:"deepseek",resolveCapability:ke(["max","high"],{enable:"explicit",disable:"explicit"})},[H]:{adapter:"deepseek",resolveCapability:ke(null,{enable:"explicit",disable:"explicit"})},[q]:{adapter:"deepseek",resolveCapability:ke(null,{enable:"explicit",disable:"explicit"})},[V]:{adapter:"boolean",resolveCapability:ke(null,{enable:"explicit",disable:"explicit"})},[U]:{adapter:"siliconflow",resolveCapability:ke(["max","high","medium","low","minimal"],{enable:"explicit",disable:"explicit"})},[K]:{adapter:"openai",resolveCapability:e=>{let{model:t=""}=e;return/^gpt-oss-120b(?:-|$)/i.test(t)?Ae(["high","medium","low"]):null}},[J]:{adapter:"openai",resolveCapability:e=>{let{model:t}=e;return xe(t)}},[re]:{adapter:"openai",resolveCapability:e=>{let{model:t}=e;return xe(t)}},[le]:{adapter:"openai",resolveCapability:e=>{let{model:t}=e;return xe(t)}},[ce]:{adapter:"openai",resolveCapability:e=>{let{model:t}=e;return xe(t)}},[ue]:{adapter:"openrouter",resolveCapability:e=>{let{model:t,openRouterMetadata:n}=e;return((e,t)=>{if(!t||t.model!==e)return null;const n=Array.isArray(t.supportedEfforts)?t.supportedEfforts.filter(e=>"none"!==e&&void 0!==ve[e]):[];return n.length?be(n,{enable:"effort",disable:t.mandatory?null:"none",defaultEffort:t.defaultEffort,defaultEnabled:t.defaultEnabled}):null})(t,n)}},[ie]:{adapter:"gemini",resolveCapability:we},[oe]:{adapter:"gemini",resolveCapability:we},[ae]:{adapter:"claude",resolveCapability:e=>{let{model:t}=e;return function(){const e=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLowerCase();if(!(/^claude-(?:opus|sonnet)-(?:[5-9](?:-|$)|4-[6-9](?:-|$))/.test(e)||/^claude-(?:fable|mythos)-5(?:-|$)/.test(e)||e.startsWith("claude-mythos-preview")))return null;const t=/^claude-(?:fable|mythos)-5(?:-|$)/.test(e)||e.startsWith("claude-mythos-preview");return be(["max","xhigh","high","medium","low"],{enable:"explicit",disable:t?null:"explicit"})}(t)}}},Ee=e=>{var t,n;const r=e.efforts||[],i=null!==(t=null===(n=r[r.length-1])||void 0===n?void 0:n.value)&&void 0!==t?t:null;return!1===e.defaultEnabled||"none"===e.defaultEffort?i:null===e.defaultEffort?null:"number"==typeof e.defaultEffort||r.some(t=>t.value===e.defaultEffort)?e.defaultEffort:null},Ce=e=>{var t,n,i;let{apiType:o,url:a="",model:s="",thinkingMode:l="disabled",thinkingEffort:u="_default",openRouterMetadata:c}=e;if("auto"===l)return{thinkingMode:l,thinkingEffort:"_default"};const d=(e=>{let{apiType:t,url:n="",model:i="",openRouterMetadata:o}=e;const a=Se[t];if(!a)return null;const s=a.resolveCapability({apiType:t,url:n,model:i,openRouterMetadata:o});return s?(0,r.A)({adapter:a.adapter},s):null})({apiType:o,url:a,model:s,openRouterMetadata:c});if(!d){return{thinkingMode:l,thinkingEffort:o===ue&&void 0!==u&&"_default"!==u?u:"_default"}}const h=null!=u&&"_default"!==u,p=h&&u===d.defaultEffort?u:function(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map(e=>e.value);if(!t.length)return null;if(null==e||"_default"===e)return null;if(t.includes(e))return e;const n=ve[e];return void 0===n?null:t.reduce((e,t)=>Math.abs(ve[t]-n)<Math.abs(ve[e]-n)?t:e)}(u,d.efforts||[]);if("enabled"===l)return{thinkingMode:l,thinkingEffort:"explicit"!==d.enable||h?h?p:Ee(d):null};const f=d.efforts||[];return{thinkingMode:l,thinkingEffort:"explicit"===d.disable||"omit"===d.disable?null:null!==(t=null!==(n=d.disable)&&void 0!==n?n:null===(i=f[f.length-1])||void 0===i?void 0:i.value)&&void 0!==t?t:null}},_e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Se[e.apiType])return e;const t=Ce(e);return t.thinkingMode===e.thinkingMode&&t.thinkingEffort===e.thinkingEffort?e:(0,r.A)((0,r.A)({},e),t)},Te=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!Array.isArray(e))return e;let t=!1;const n=e.map(e=>{const n=_e(e);return n!==e&&(t=!0),n});return t?n:e},De=function(){return String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().replace(/^models\//i,"").toLowerCase()},Pe=function(){return/\/v1(?:beta\d*)?\/interactions(?:[/?]|$)/i.test(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")},Ie={high:{value:"high",label:"High"},medium:{value:"medium",label:"Medium"},low:{value:"low",label:"Low"},minimal:{value:"minimal",label:"Minimal"}},Fe={minimal:1024,low:1024,medium:8192,high:24576},Le=e=>e.startsWith("gemini-2.5-"),ze=e=>e.startsWith("gemini-2.5-flash-lite"),Oe=e=>Le(e)&&!(e=>e.startsWith("gemini-2.5-pro"))(e),Ne=e=>e.startsWith("gemini-3.1-pro"),je=e=>e.startsWith("gemini-3-pro"),Re=e=>e.startsWith("gemini-3.1-flash-lite-image"),Me=e=>e.map(e=>Ie[e]),Be=e=>{let{apiType:t,model:n=""}=e;const r=De(n);return Le(r)||Re(r)||Ne(r)||je(r)||r.startsWith("gemini-3")&&r.includes("flash")?t===oe?Me(["high","medium","low","minimal"]):Le(r)?Me(["high","medium","low"]):Re(r)?Me(["high","minimal"]):Ne(r)?Me(["high","medium","low"]):je(r)?Me(["high","low"]):r.startsWith("gemini-3")&&r.includes("flash")?Me(["high","medium","low","minimal"]):null:null},We=["formal","casual","neutral","technical","marketing","Literary","academic","legal","literal","idiomatic","transcreation","machine-like","concise"],Ue=[["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"]],He=Ue.map(e=>{let[t]=e;return t}),Ve=[["auto","AutoDetect - AutoDetect"],...Ue],Ge=new Map(Ue),Ke=Ue.map(e=>{let[t,n]=e;return[t,n.split(" - ").reverse().join(" - ")]}),qe=Ve.map(e=>{let[t,n]=e;return[t,n.split(" - ").reverse().join(" - ")]}),Ye=new Map(Ve.map(e=>{let[t,n]=e;return[t,n.split(" - ")[0]]})),Xe=new Map(Ve.map(e=>{let[t]=e;return[t,t]})),$e=new Map(Ve.map(e=>{let[t]=e;return[t,t.toUpperCase()]})),Je={[z]:new Map([...Xe,["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[O]:Xe,[N]:Xe,[j]:Xe,[te]:new Map([...Xe,["zh-CN","zh"],["zh-TW","zh"],["nb","no"]]),[ne]:new Map([...Xe,["auto",""],["zh-CN","zh"],["zh-TW","zh"],["nb","no"]]),[R]:new Map([...Xe,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[M]:new Map([...Xe,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[Y]:new Map([...$e,["auto",""],["zh-CN","ZH-HANS"],["zh-TW","ZH-HANT"]]),[$]:new Map([...$e,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[X]:new Map([...$e,["auto","auto"],["zh-CN","ZH-HANS"],["zh-TW","ZH-HANT"]]),[B]:Ye,[W]:Ye,[U]:Ye,[H]:Ye,[V]:Ye,[G]:new Map([...Ye,["auto","auto"]]),[K]:Ye,[q]:Ye,[ee]:new Map([...Xe,["auto","auto"],["zh-CN","zh"],["zh-TW","zh-Hant"]]),[Q]:new Map([...Xe,["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"]]),[Z]: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"]]),[J]:Ye,[re]:Ye,[ie]:Ye,[oe]:Ye,[ae]:Ye,[le]:Ye,[ue]:Ye,[ce]:Ye,[se]:new Map([...Xe,["auto","en"],["zh-CN","zh"],["zh-TW","zh"]]),[de]:Ye},Qe=(0,r.A)((0,r.A)({},Je),{},{[Y]:new Map([...Je[Y],["zh-CN","ZH"],["zh-TW","ZH"]]),[X]:new Map([...Je[X],["zh-CN","ZH"],["zh-TW","ZH"]])}),Ze={};Object.entries(Je).forEach(e=>{let[t,n]=e;Ze[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)}),[Y,X].forEach(e=>{Ze[e].set("ZH","zh-CN")});const et="You are a professional, authentic machine translation engine.",tt="# Context\nTitle: ".concat(y,"\nDescription: ").concat(b,"\nSummary: ").concat(A,"\nTone: ").concat(v,"\n\n# Glossary:\n").concat(S,"\n\n# Task\nTranslate the Source Text below to ").concat(p,".\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(g,"\n\nTranslated Text:"),nt='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":[]}.',rt='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>',it='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.',ot=at({targetLanguage:"Chinese",translationExample:"用于 Web 和原生用户界面的库",labels:{entry:"词条",essentials:"基础形态与音标",pronunciation:"发音标注",meanings:"词性与核心义项",context:"语境精析",contextMeaning:"当前语义锁定",register:"语境色调",replacements:"原句平替词",deepDive:"词源深度解构与辨析",etymology:"词源与记忆锚点",collocations:"高频搭配",synonyms:"同义词微观辨析",examples:"语料库双解例句",translation:"中文翻译",scene:"场景标签"}});function at(e){let{targetLanguage:t,translationExample:n,labels:r}=e;return"# Role\nYou are an expert English-".concat(t," lexicographer specializing in contrastive linguistics and modern corpus linguistics. Analyze the user's English text with academic rigor and clear, elegant formatting, or translate it naturally into ").concat(t," when dictionary analysis is not appropriate.\n\n# Execution Rules\n1. **Smart routing (CRITICAL)**: Choose the mode strictly from the length and nature of `[Target]`:\n   - **Dictionary mode**: Use the dictionary output format only when `[Target]` is clearly a single English word, an idiom, or a fixed collocation of no more than 3 words.\n   - **Pure translation mode**: Use pure translation for complete sentences, clauses, natural-language phrases, paragraphs, long text, or any continuous text longer than 3 words. When uncertain, choose pure translation mode.\n2. **Context first**: In dictionary mode, if `[Context]` contains useful information, put the contextually correct sense first.\n3. **Target-language contract**: All headings, labels, definitions, explanations, usage notes, and example translations in dictionary mode must be written in ").concat(t,". Keep English only for the entry, English examples, pronunciation, and English words being compared.\n4. **No extra framing**: Follow the selected format exactly. Do not add greetings, prefaces, or closing summaries.\n\n---\n\n# Pure Translation Output Contract (only for pure translation mode)\n\nYour entire response must contain only the ").concat(t,' translation itself:\n- Do not output the source text, bilingual comparison, headings, labels, language names, quotation marks, Markdown, or explanations.\n- Do not add prefixes such as "Translation:" or include pronunciation, etymology, collocations, examples, or acknowledgements.\n- If the source has one paragraph, output one paragraph. Preserve paragraph breaks only when the source has multiple paragraphs.\n\nExample:\n- Input: The library for web and native user interfaces\n- Correct output: ').concat(n,"\n\n# Output Format (only for dictionary mode)\n\n## ").concat(r.entry,": [original word or phrase]\n> [If the form is inflected in `[Context]`, provide its lemma in parentheses.]\n\n### 1. ").concat(r.essentials,"\n- **").concat(r.pronunciation,"**: 🇺🇸 [US IPA] | 🇬🇧 [UK IPA]\n- **").concat(r.meanings,"**:\n  - `[part of speech]` ① [primary ").concat(t," definition] ② [secondary ").concat(t," definition]\n  - `[part of speech]` ① [primary ").concat(t," definition]\n\n### 2. ").concat(r.context," *[include only when useful Context exists]*\n- **").concat(r.contextMeaning,"**: State the part of speech and precise meaning in the given context.\n- **").concat(r.register,"**: Describe sentiment, register, formality, and tone.\n- **").concat(r.replacements,"**: Give 1-2 English synonyms that can replace the entry in this context without changing the meaning.\n\n### 3. ").concat(r.deepDive,"\n- **").concat(r.etymology,"**: Explain roots, affixes, historical development, or provide a logical memory aid.\n- **").concat(r.collocations,"**:\n  * `[collocation 1]` ➔ [precise ").concat(t," translation]\n  * `[collocation 2]` ➔ [precise ").concat(t," translation]\n- **").concat(r.synonyms,"**:\n  * **[entry] vs [synonym 1] vs [synonym 2]**: Explain their differences in context, intensity, register, or collocation habits in 1-2 sentences.\n\n### 4. ").concat(r.examples,"\n[Provide 2-3 natural examples from publications, news, professional writing, or everyday English.]\n\n1. **[natural English example]**\n   - 💡 *").concat(r.translation,"*: [accurate, idiomatic ").concat(t," translation]\n   - 📌 *").concat(r.scene,"*: `[localized scene label]`")}const st=at({targetLanguage:"Japanese",translationExample:"Webおよびネイティブのユーザーインターフェース向けライブラリ",labels:{entry:"見出し語",essentials:"基本情報と発音",pronunciation:"発音",meanings:"品詞と主要な意味",context:"文脈分析",contextMeaning:"文脈上の意味",register:"語調と使用域",replacements:"文脈に合う言い換え",deepDive:"語源・用法・類義語",etymology:"語源と記憶の手がかり",collocations:"頻出コロケーション",synonyms:"類義語の使い分け",examples:"コーパス用例",translation:"日本語訳",scene:"使用場面"}}),lt=at({targetLanguage:"Korean",translationExample:"웹 및 네이티브 사용자 인터페이스용 라이브러리",labels:{entry:"표제어",essentials:"기본 정보와 발음",pronunciation:"발음",meanings:"품사와 핵심 의미",context:"문맥 분석",contextMeaning:"문맥상 의미",register:"어조와 사용역",replacements:"문맥에 맞는 대체어",deepDive:"어원·용법·유의어",etymology:"어원과 기억 단서",collocations:"주요 연어",synonyms:"유의어 뉘앙스 비교",examples:"말뭉치 예문",translation:"한국어 번역",scene:"사용 상황"}}),ut=at({targetLanguage:"Vietnamese",translationExample:"Thư viện dành cho giao diện người dùng web và native",labels:{entry:"Mục từ",essentials:"Thông tin cơ bản và phát âm",pronunciation:"Phát âm",meanings:"Từ loại và nghĩa cốt lõi",context:"Phân tích ngữ cảnh",contextMeaning:"Nghĩa trong ngữ cảnh",register:"Sắc thái và phong cách",replacements:"Từ thay thế phù hợp",deepDive:"Từ nguyên, cách dùng và từ đồng nghĩa",etymology:"Từ nguyên và mẹo ghi nhớ",collocations:"Cụm từ thường gặp",synonyms:"Phân biệt từ đồng nghĩa",examples:"Ví dụ ngữ liệu",translation:"Bản dịch tiếng Việt",scene:"Ngữ cảnh sử dụng"}}),ct=at({targetLanguage:"Russian",translationExample:"Библиотека для веб-интерфейсов и нативных пользовательских интерфейсов",labels:{entry:"Словарная статья",essentials:"Основная информация и произношение",pronunciation:"Произношение",meanings:"Часть речи и основные значения",context:"Контекстный анализ",contextMeaning:"Значение в контексте",register:"Тональность и регистр",replacements:"Контекстные замены",deepDive:"Этимология, употребление и синонимы",etymology:"Этимология и подсказка для запоминания",collocations:"Частотные сочетания",synonyms:"Различия между синонимами",examples:"Корпусные примеры",translation:"Перевод на русский",scene:"Сфера употребления"}}),dt="# Input Data\n\n## [Context] (Optional)\n> Use this information to identify the target text's meaning in context:\n- Document title: ".concat(y,"\n- Document description: ").concat(b,"\n- Document summary: ").concat(A,"\n- Surrounding paragraph: ").concat(x,"\n\n## [Target] (Required)\n> Use this text to choose between dictionary mode and pure translation mode:\n").concat(g),ht="# Context\nTitle: ".concat(y,"\nDescription: ").concat(b,"\nSummary: ").concat(A,"\nTone: ").concat(v,"\n\n# Glossary (Terminology):\n").concat(S,"\n\n# Task\nGroup the input word-level JSON array into readable, well-paced bilingual subtitle segments. Target Language: ").concat(p,'.\n\n# Output Contract\n1. STRICTLY output a valid JSON array only. No markdown formatting (e.g., do not use ```json fences), no preamble, and no postscript.\n2. Format per element: {"e":<last_word_id>, "o":"exact merged source text", "t":"translation"}\n3. The "e" field must be an inclusive, exact word ID from the input and must increase strictly. The first segment starts at ID 0; every later segment starts at the previous "e" + 1.\n4. Completeness: Cover every input item exactly once. The final "e" must equal the final input ID. No missing items, overlaps, or gaps.\n5. For each segment, first determine its exact input range from the previous "e" + 1 through the current "e", then merge every source item in that range verbatim into "o". Do not paraphrase, normalize, translate, omit, or add source text in "o".\n6. Do not return start IDs, timestamps, or any extra fields. The application reconstructs them from the input.\n\n# Rules\n1. Hard Source Length Limit:\n   - For space-separated source languages, each source span MUST contain no more than 15 words; aim for 8-12 words when a natural boundary exists.\n   - For Chinese, Japanese, and other non-space-separated source languages, each source span MUST contain no more than 30 source characters.\n   - If a sentence exceeds the applicable limit, split it at a clause, comma, conjunction, or natural phrase boundary. The hard length limit takes priority over keeping a long grammatical sentence intact.\n2. Sentence Boundaries: Never merge two complete sentences into one subtitle segment. Terminal punctuation such as .?!。!? normally ends the current segment.\n3. Pause Indicators: An optional "pauseMs" field is the timeline gap in milliseconds after the current input item. If "pauseMs" is missing, treat it as 0 milliseconds and do not infer a pause. Larger positive values indicate stronger sentence boundaries, but grammatical correctness and semantic coherence always take priority.\n4. Exact Translation Alignment: Build "o" first from the exact source span covered by the current "e", starting after the previous "e". Then translate only the current "o" into "t". The "t" field MUST NOT omit that span, translate future input items, or carry text from adjacent segments.\n5. Silent Self-Check: Before returning, silently verify that every "e", "o", and "t" correspond one-to-one, every "o" matches its exact input range, all source-length limits are satisfied, and all input items are covered exactly once. Do not output the self-check or any reasoning.\n6. Translation Quality: Keep "t" concise, accurate, and natural while strictly adhering to the provided Context, Tone, and Glossary.\n\n# Example\nInput: [{"id":0,"text":"Once"},{"id":1,"text":"the"},{"id":2,"text":"assets"},{"id":3,"text":"are"},{"id":4,"text":"ready,"},{"id":5,"text":"open"},{"id":6,"text":"the"},{"id":7,"text":"storyboard"},{"id":8,"text":"tab.","pauseMs":850},{"id":9,"text":"This"},{"id":10,"text":"is"},{"id":11,"text":"where"},{"id":12,"text":"everything"},{"id":13,"text":"comes"},{"id":14,"text":"together."},{"id":15,"text":"If"},{"id":16,"text":"a"},{"id":17,"text":"scene"},{"id":18,"text":"does"},{"id":19,"text":"not"},{"id":20,"text":"match"},{"id":21,"text":"your"},{"id":22,"text":"idea,"},{"id":23,"text":"regenerate"},{"id":24,"text":"it"},{"id":25,"text":"or"},{"id":26,"text":"adjust"},{"id":27,"text":"the"},{"id":28,"text":"prompt"},{"id":29,"text":"carefully"},{"id":30,"text":"until"},{"id":31,"text":"it"},{"id":32,"text":"feels"},{"id":33,"text":"right."}]\nOutput: [{"e":8,"o":"Once the assets are ready, open the storyboard tab.","t":"素材准备好后,打开故事板标签页。"},{"e":14,"o":"This is where everything comes together.","t":"一切从这里开始整合。"},{"e":22,"o":"If a scene does not match your idea,","t":"如果某个场景与你的想法不符,"},{"e":33,"o":"regenerate it or adjust the prompt carefully until it feels right.","t":"请重新生成,或仔细调整提示词,直到效果合适。"}]'),pt={apiSlug:"",apiName:"",apiType:"",url:"",key:"",model:"",modelListUrl:"",systemPrompt:"",batchPromptSlug:"batch-translation-json",subtitlePrompt:"",subtitlePromptSlug:"subtitle-segmentation",dictPrompt:"",dictUserPrompt:"",dictPromptSlug:"dictionary-en-zh",nobatchPrompt:"",nobatchUserPrompt:"",nobatchPromptSlug:"nobatch-translation",userPrompt:"",tone:We[0],placeholder:"{ }",placetag:"i",aiTerms:"",customHeader:"",customBody:"",reqHook:"",resHook:"",fetchLimit:o,fetchInterval:a,httpTimeout:i,batchInterval:s,batchSize:l,batchLength:u,batchConcurrency:c,useBatchFetch:!1,useStream:!1,streamRenderMode:"disabled",transAllnow:!1,rootMargin:2e3,useContext:!1,contextSize:d,temperature:0,maxTokens:20480,thinkingMode:"disabled",thinkingEffort:"_default",isDisabled:!1,region:"",sortOrder:0,placetagFormat:"compact"},ft={useBatchFetch:!0,thinkingMode:"disabled",thinkingEffort:"_default",useStream:!0,streamRenderMode:"realtime"},mt={[z]:pt,[O]:(0,r.A)((0,r.A)({},pt),{},{url:"https://translate.googleapis.com/translate_a/single"}),[N]:(0,r.A)((0,r.A)({},pt),{},{url:"https://translate-pa.googleapis.com/v1/translateHtml",key:"AIzaSyATBXajvzQLTDHEQbcpq0Ihe0vWDHmO520",useBatchFetch:!0,placetag:"a",placetagFormat:"attribute"}),[j]:(0,r.A)((0,r.A)({},pt),{},{url:"https://translation.googleapis.com/language/translate/v2",useBatchFetch:!0}),[te]:(0,r.A)((0,r.A)({},pt),{},{url:"https://translate.api.cloud.yandex.net/translate/v2/translate",folderId:"",useBatchFetch:!0}),[ne]:(0,r.A)({},pt),[R]:(0,r.A)((0,r.A)({},pt),{},{useBatchFetch:!0}),[M]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0",useBatchFetch:!0}),[Q]:(0,r.A)({},pt),[Z]:(0,r.A)((0,r.A)({},pt),{},{useBatchFetch:!0}),[ee]:(0,r.A)({},pt),[Y]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api-free.deepl.com/v2/translate",useBatchFetch:!0}),[$]:(0,r.A)((0,r.A)({},pt),{},{fetchLimit:1}),[B]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api.deepseek.com/chat/completions",modelListUrl:"https://api.deepseek.com/models",model:"deepseek-v4-flash"},ft),[W]:(0,r.A)((0,r.A)({},pt),{},{url:"https://opencode.ai/zen/go/v1/chat/completions",model:"deepseek-v4-flash"},ft),[U]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api.siliconflow.cn/v1/chat/completions",modelListUrl:"https://api.siliconflow.cn/v1/models",model:"Pro/zai-org/GLM-4.7"},ft),[H]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api.xiaomimimo.com/v1/chat/completions",modelListUrl:"https://api.xiaomimimo.com/v1/models",model:"mimo-v2.5-pro"},ft),[V]:(0,r.A)((0,r.A)({},pt),{},{url:"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions",modelListUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1/models",model:"qwen-plus"},ft),[G]:(0,r.A)((0,r.A)({},pt),{},{url:"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions",model:"qwen-mt-flash"}),[K]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api.cerebras.ai/v1/chat/completions",modelListUrl:"https://api.cerebras.ai/v1/models",model:"gpt-oss-120b"},ft),[q]:(0,r.A)((0,r.A)({},pt),{},{url:"https://open.bigmodel.cn/api/paas/v4/chat/completions",modelListUrl:"https://open.bigmodel.cn/api/paas/v4/models",model:"glm-5.1"},ft),[X]:(0,r.A)((0,r.A)({},pt),{},{url:"http://localhost:1188/translate"}),[J]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api.ephone.ai/v1/chat/completions"}),[re]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api.openai.com/v1/chat/completions",modelListUrl:"https://api.openai.com/v1/models",model:"gpt-4"},ft),[ie]:(0,r.A)((0,r.A)({},pt),{},{url:"https://generativelanguage.googleapis.com/v1/interactions",modelListUrl:"https://generativelanguage.googleapis.com/v1beta/models",model:"gemini-3.6-flash"},ft),[oe]:(0,r.A)((0,r.A)({},pt),{},{url:"https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",modelListUrl:"https://generativelanguage.googleapis.com/v1beta/openai/models",model:"gemini-3.6-flash"},ft),[ae]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api.anthropic.com/v1/messages",modelListUrl:"https://api.anthropic.com/v1/models",model:"claude-3-haiku-20240307"},ft),[se]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api.cloudflare.com/client/v4/accounts/{{ACCOUNT_ID}}/ai/run/@cf/meta/m2m100-1.2b"}),[le]:(0,r.A)((0,r.A)({},pt),{},{url:"http://localhost:11434/v1/chat/completions",modelListUrl:"http://localhost:11434/v1/models",model:"llama3.1"},ft),[ue]:(0,r.A)((0,r.A)({},pt),{},{url:"https://openrouter.ai/api/v1/chat/completions",modelListUrl:"https://openrouter.ai/api/v1/models",model:"openai/gpt-4o"},ft),[ce]:(0,r.A)((0,r.A)({},pt),{},{url:"https://api.orcarouter.ai/v1/chat/completions",modelListUrl:"https://api.orcarouter.ai/v1/models",model:"openai/gpt-5.4-mini"},ft),[de]:(0,r.A)((0,r.A)({},pt),{},{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};'})},gt=he.map(e=>_e((0,r.A)((0,r.A)({},mt[e]),{},{apiSlug:e,apiName:e,apiType:e})));const vt=R,yt=gt.find(e=>e.apiType===vt)},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}},5628(e,t,n){"use strict";n.d(t,{x:()=>i});var r=n(1166);const i=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")){const t=await e.blob();return(0,r.Sk)(t)}if(n.includes("text/event-stream"))throw new Error("Received text/event-stream in a non-stream request. Use fetchStream instead.");const i=await e.text();if(!i)return null;try{return JSON.parse(i)}catch(e){return i}}},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"),u=Symbol.for("react.forward_ref"),c=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"),m=Symbol.for("react.client.reference");function g(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 c:case d:case f:return e;default:switch(e=e&&e.$$typeof){case l:case u:case p:case h:case s:return e;default:return t}}case r:return t}}}t.vM=u,t.lD=h},5950(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:()=>u.A,ownerDocument:()=>c.A,ownerWindow:()=>d.A,requirePropFactory:()=>h,setRef:()=>p,unstable_ClassNameGenerator:()=>x,unstable_useEnhancedEffect:()=>f.A,unstable_useId:()=>m.A,unsupportedProp:()=>g,useControlled:()=>v.A,useEventCallback:()=>y.A,useForkRef:()=>b.A,useIsFocusVisible:()=>A.A});var r=n(7599),i=n(32),o=n(8711),a=n(1257),s=n(1093);const l=function(e,t){return()=>null};var u=n(7026),c=n(9894),d=n(4519);const h=function(e,t){return()=>null};const p=n(1941).A;var f=n(2392),m=n(8338);const g=function(e,t,n,r,i){return null};var v=n(3473),y=n(3948),b=n(3598),A=n(73);const x={configure:e=>{r.A.configure(e)}}},5995(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},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)}},6228(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},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},6604(e,t,n){"use strict";n.d(t,{b:()=>i});const r=/^(?:>>[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?(?:\[(?:[\0-\t\x0B\f\x0E-\\\^-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\][\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)+$/;function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.test(String(e).trim())}},6620(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})},6639(e,t,n){"use strict";function r(e){var t,n,r,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new i(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function i(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 i=function(e){this.s=e,this.n=e.next},i.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 i(e)}n.d(t,{A:()=>r})},6811(e,t,n){"use strict";var r=n(7458);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},6851(e,t,n){"use strict";e.exports=n(3399)},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}},7026(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)}},7029(e,t,n){e.exports=function(e){"use strict";var t=Object.freeze({__proto__:null,get ExpressionStatement(){return Ue},get BlockStatement(){return He},get EmptyStatement(){return Ve},get DebuggerStatement(){return Ge},get ReturnStatement(){return Ke},get BreakStatement(){return qe},get ContinueStatement(){return Ye},get LabeledStatement(){return Xe},get WithStatement(){return $e},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 ut},get VariableDeclarator(){return ct},get ClassDeclaration(){return dt},get ClassBody(){return ht},get MethodDefinition(){return pt},get PropertyDefinition(){return ft},get StaticBlock(){return mt},get ImportDeclaration(){return gt},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 un},get BreakStatement(){return cn},get ContinueStatement(){return dn},get LabeledStatement(){return hn},get WithStatement(){return pn},get IfStatement(){return fn},get SwitchStatement(){return mn},get SwitchCase(){return gn},get ThrowStatement(){return vn},get TryStatement(){return yn},get CatchClause(){return bn},get WhileStatement(){return An},get DoWhileStatement(){return xn},get ForStatement(){return wn},get ForInStatement(){return kn},get ForOfStatement(){return Sn}}),o=Object.freeze({__proto__:null,get FunctionDeclaration(){return En},get VariableDeclaration(){return Cn},get VariableDeclarator(){return _n},get ClassDeclaration(){return Tn},get ClassBody(){return Dn},get MethodDefinition(){return Pn},get PropertyDefinition(){return In},get StaticBlock(){return Fn},get ImportDeclaration(){return Ln},get ExportDefaultDeclaration(){return zn},get ExportNamedDeclaration(){return On},get ExportAllDeclaration(){return Nn}});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 u(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}var c=Object.freeze,d=Object.defineProperty,h=Object.getOwnPropertyDescriptor,p=Object.prototype.hasOwnProperty;function f(e,t){return p.call(e,t)}var m=Object.getOwnPropertyNames,g=Object.setPrototypeOf;function v(e,t){g?g(e,t):e.__proto__=t}var y=Object.getPrototypeOf;function b(e){return y?y(e):e.__proto__}var A=Object.getOwnPropertyDescriptor;function x(e,t,n){for(;t;){var r=A(t,n),i=void 0!==r&&void 0===r.writable&&"function"==typeof r[e]&&r[e];if(i)return i;t=b(t)}}function w(e,t){return x("get",e,t)}function k(e,t){return x("set",e,t)}var S=Object.create;function E(e,t){v(e,t),e.prototype=S(t.prototype,{constructor:{value:e,writable:!0}})}function C(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 _=Object.assign||C,T=[],D=S(null);try{if(!window.Object)throw 0;T=m(D=window).filter(function(e){return"webkitStorageInfo"!==e})}catch(e){try{if(!n.g.Object)throw 0;T=m(D=n.g).filter(function(e){return"GLOBAL"!==e&&"root"!==e})}catch(e){try{D.Object=Object}catch(e){}try{D.Function=Function}catch(e){}try{D.Array=Array}catch(e){}try{D.Number=Number}catch(e){}try{D.parseFloat=parseFloat}catch(e){}try{D.parseInt=parseInt}catch(e){}try{D.Infinity=1/0}catch(e){}try{D.NaN=NaN}catch(e){}try{D.undefined=void 0}catch(e){}try{D.Boolean=Boolean}catch(e){}try{D.String=String}catch(e){}try{D.Symbol=Symbol}catch(e){}try{D.Date=Date}catch(e){}try{D.Promise=Promise}catch(e){}try{D.RegExp=RegExp}catch(e){}try{D.Error=Error}catch(e){}try{D.EvalError=EvalError}catch(e){}try{D.RangeError=RangeError}catch(e){}try{D.ReferenceError=ReferenceError}catch(e){}try{D.SyntaxError=SyntaxError}catch(e){}try{D.TypeError=TypeError}catch(e){}try{D.URIError=URIError}catch(e){}try{D.JSON=JSON}catch(e){}try{D.Math=Math}catch(e){}try{D.console=console}catch(e){}try{D.Intl=Intl}catch(e){}try{D.ArrayBuffer=ArrayBuffer}catch(e){}try{D.Uint8Array=Uint8Array}catch(e){}try{D.Int8Array=Int8Array}catch(e){}try{D.Uint16Array=Uint16Array}catch(e){}try{D.Int16Array=Int16Array}catch(e){}try{D.Uint32Array=Uint32Array}catch(e){}try{D.Int32Array=Int32Array}catch(e){}try{D.Float32Array=Float32Array}catch(e){}try{D.Float64Array=Float64Array}catch(e){}try{D.Uint8ClampedArray=Uint8ClampedArray}catch(e){}try{D.DataView=DataView}catch(e){}try{D.Map=Map}catch(e){}try{D.Set=Set}catch(e){}try{D.WeakMap=WeakMap}catch(e){}try{D.WeakSet=WeakSet}catch(e){}try{D.Proxy=Proxy}catch(e){}try{D.Reflect=Reflect}catch(e){}try{D.BigInt=BigInt}catch(e){}try{D.decodeURI=decodeURI}catch(e){}try{D.decodeURIComponent=decodeURIComponent}catch(e){}try{D.encodeURI=encodeURI}catch(e){}try{D.encodeURIComponent=encodeURIComponent}catch(e){}try{D.escape=escape}catch(e){}try{D.unescape=unescape}catch(e){}try{D.eval=eval}catch(e){}try{D.isFinite=isFinite}catch(e){}try{D.isNaN=isNaN}catch(e){}try{D.SharedArrayBuffer=SharedArrayBuffer}catch(e){}try{D.Atomics=Atomics}catch(e){}try{D.WebAssembly=WebAssembly}catch(e){}try{D.clearInterval=clearInterval}catch(e){}try{D.clearTimeout=clearTimeout}catch(e){}try{D.setInterval=setInterval}catch(e){}try{D.setTimeout=setTimeout}catch(e){}try{D.crypto=crypto}catch(e){}try{D.URL=URL}catch(e){}T=m(D)}}D.Symbol&&(!D.Symbol.iterator&&(D.Symbol.iterator=O("iterator")),!D.Symbol.asyncIterator&&(D.Symbol.asyncIterator=O("asynciterator")));for(var P=S({}),I=0;I<T.length;I++){var F=T[I];try{P[F]=D[F]}catch(e){}}var L=O("window");function z(){var e;return _(S(((e={})[L]=D,e)),P)}function O(e){return e+Math.random().toString(36).substring(2)}function N(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 j={RES:void 0},R={RES:void 0},M={LABEL:void 0},B={LABEL:void 0},W=O("super"),U=O("supercall"),H=O("noctor"),V=O("clsctor"),G=O("newtarget"),K=O("private"),q=O("noinit"),Y=O("deadzone"),X=O("import"),$=O("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=S(null),this.withContext=S(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!==q&&r.set(t)}else n.context[e]=new Q("var",t===q?void 0:t);if(!n.parent){var i=n.find("window").get();t!==q&&d(i,e,{value:t,writable:!0,enumerable:!0})}},e.prototype.let=function(e,t){var n=this.context[e];if(n&&n.get()!==Y)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()!==Y)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 c(n),null}function u(t){var n;try{n=e.throw(t)}catch(e){return s(e)}c(n)}function c(e){if(e.done)return a(o?e:e.value);if(e.value!==j)return a(e);var t=e.value.RES;return(t&&"function"===t.then?t:Promise.resolve(t)).then(l,u)}"err"in t?u(r):l(n)})}function ne(e,t,n){var r,i,o,s,l,u;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((u=l.get())===Y)throw new ReferenceError(e.name+" is not defined");return[2,u]}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,u,c;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(_e(i,t))]):[3,6];case 2:return n=l.apply(o,[a.sent()]),[3,5];case 3:return c=(u=n).push,[5,s(We(i,t))];case 4:c.apply(u,[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,u,c,p,f,m,g;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=_,l=[n],[5,s(_e(i,t,{spreadProps:!0}))]):[3,11];case 2:return o.apply(void 0,l.concat([a.sent()])),[3,10];case 3:return u=void 0,c=i.key,i.computed?[5,s(We(c,t))]:[3,5];case 4:return u=a.sent(),[3,8];case 5:return"Identifier"!==c.type?[3,6]:(u=c.name,[3,8]);case 6:return p="",[5,s(ie(c))];case 7:u=p+a.sent(),a.label=8;case 8:return[5,s(We(i.value,t))];case 9:f=a.sent(),"init"===(m=i.kind)?n[u]=f:"get"===m?(g=h(n,u),d(n,u,{get:f,set:g&&g.set,enumerable:!0,configurable:!0})):(g=h(n,u),d(n,u,{get:g&&g.get,set:f,enumerable:!0,configurable:!0})),a.label=10;case 10:return r++,[3,1];case 11:return[2,n]}})}function ue(e,t){var n,r;return a(this,function(i){return e.id&&e.id.name?(n=new ee(t),r=Kn(e,n),n.const(e.id.name,r),[2,r]):[2,Kn(e,t)]})}function ce(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(me(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(me(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())[K]||{},[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,u;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(me(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!==(u=r.get())&&void 0!==u?u: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 me(e,t,n){var r,i,o,l,u,c,h,p,f,m,g;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(Ce(e.object,t,{getProto:!0}))];case 1:return u=a.sent(),[3,4];case 2:return[5,s(We(e.object,t))];case 3:u=a.sent(),a.label=4;case 4:return i?[2,u]:(h=!1,e.computed?[5,s(We(e.property,t))]:[3,6]);case 5:return c=a.sent(),[3,7];case 6:"PrivateIdentifier"===e.property.type?(c=e.property.name,h=!0):c=e.property.name,a.label=7;case 7:return h&&(u=u[K]),l?(p=k(u,c),"Super"===e.object.type&&p?(g=t.find("this").get(),f=O(c),d(g,f,{set:p}),[2,new Z(g,f)]):[2,new Z(u,c)]):(m=w(u,c),"Super"===e.object.type&&m?(g=t.find("this").get(),e.optional&&null==g?[2,void 0]:[2,m.call(g)]):e.optional&&null==u?[2,void 0]:[2,u[c]])}})}function ge(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,u,c,d,h,p,f,m,g,v,y;return a(this,function(a){switch(a.label){case 0:return"MemberExpression"!==e.callee.type?[3,5]:[5,s(me(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[K]),"Super"===e.callee.object.type?(u=t.find("this").get(),n=l[i].bind(u)):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[V])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[V]){if("Identifier"===e.callee.type)c=e.callee.name;else try{c=JSON.stringify(n)}catch(e){c=""+n}throw"function"!=typeof n?new TypeError(c+" is not a function"):new TypeError("Class constructor "+c+" 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]:(m=(f=d).concat,[5,s(_e(p,t))]):[3,13];case 9:return d=m.apply(f,[a.sent()]),[3,12];case 10:return v=(g=d).push,[5,s(We(p,t))];case 11:v.apply(g,[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[L])return[2,n.apply(y[L],d)];throw e}}})}function ye(e,t){var n,r,i,o,l,c,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[H])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=(c=i).concat,[5,s(_e(l,t))]):[3,7];case 3:return i=d.apply(c,[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,u([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 Ae(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,Kn(e,t)]})}function we(e,t){var n,r,i,o,l,u,c;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())?(u=i,[5,s(Se(o))]):[3,5];case 2:return i=u+a.sent(),(l=r.shift())?(c=i,[5,s(We(l,t))]):[3,4];case 3:i=c+a.sent(),a.label=4;case 4:return[3,1];case 5:return[2,i]}})}function ke(e,t){var n,r,i,o,l,h,p,f,m;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:c(o)}),l=e.quasi.expressions,h=[],!l)return[3,5];p=0,a.label=2;case 2:return p<l.length?(m=(f=h).push,[5,s(We(l[p],t))]):[3,5];case 3:m.apply(f,[a.sent()]),a.label=4;case 4:return p++,[3,2];case 5:return[2,n.apply(void 0,u([c(i)],h))]}})}function Se(e,t){return a(this,function(t){return[2,e.value.raw]})}function Ee(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(qn(e,n))]):[3,2];case 1:return r=i.sent(),n.const(e.id.name,r),[2,r];case 2:return[5,s(qn(e,t))];case 3:return[2,i.sent()]}})}function Ce(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 _e(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:u(r)]}})}function Te(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 De(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(X+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 Ie(e,t){var n;return a(this,function(r){switch(r.label){case 0:return n=j,[5,s(We(e.argument,t))];case 1:return n.RES=r.sent(),[4,j];case 2:return[2,r.sent()]}})}var Fe=Object.freeze({__proto__:null,ThisExpression:ae,ArrayExpression:se,ObjectExpression:le,FunctionExpression:ue,UnaryExpression:ce,UpdateExpression:de,BinaryExpression:he,AssignmentExpression:pe,LogicalExpression:fe,MemberExpression:me,ConditionalExpression:ge,CallExpression:ve,NewExpression:ye,MetaProperty:be,SequenceExpression:Ae,ArrowFunctionExpression:xe,TemplateLiteral:we,TaggedTemplateExpression:ke,TemplateElement:Se,ClassExpression:Ee,Super:Ce,SpreadElement:_e,ChainExpression:Te,ImportExpression:De,YieldExpression:Pe,AwaitExpression:Ie});function Le(e,t,n){var r,i,o,l,u,c,d,h,p,f,m,g,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,u=n.onlyBlock,c=void 0!==u&&u,d=n.feed,h=void 0===d?{}:d,p=[],f=0,a.label=1;case 1:return f<e.properties.length?(m=e.properties[f],l?c||"var"===i?"Property"!==m.type?[3,5]:"Identifier"!==(v=m.value).type?[3,2]:(t[i](v.name,c?Y:"var"===i?q:void 0),[3,4]):[3,7]:[3,8]):[3,18];case 2:return[5,s(Gn(v,t,{kind:i,hoist:l,onlyBlock:c}))];case 3:a.sent(),a.label=4;case 4:return[3,7];case 5:return[5,s(Oe(m,t,{kind:i,hoist:l,onlyBlock:c}))];case 6:a.sent(),a.label=7;case 7:return[3,17];case 8:return"Property"!==m.type?[3,15]:(g=void 0,m.computed?[5,s(We(m.key,t))]:[3,10]);case 9:return g=a.sent(),[3,11];case 10:g=m.key.name,a.label=11;case 11:return p.push(g),"Identifier"!==(v=m.value).type?[3,12]:(t[i](v.name,h[g]),[3,14]);case 12:return[5,s(Gn(v,t,{kind:i,feed:h[g]}))];case 13:a.sent(),a.label=14;case 14:return[3,17];case 15:for(y=_({},h),b=0;b<p.length;b++)delete y[p[b]];return[5,s(Oe(m,t,{kind:i,feed:y}))];case 16:a.sent(),a.label=17;case 17:return f++,[3,1];case 18:return[2]}})}function ze(e,t,n){var r,i,o,l,u,c,d,h,p,f,m;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,u=void 0!==l&&l,c=n.feed,d=void 0===c?[]:c,h=[],p=0,a.label=1;case 1:return p<e.elements.length?(f=e.elements[p])?o?u||"var"===r?"Identifier"!==f.type?[3,2]:(t[r](f.name,u?Y:"var"===r?q: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:u}))];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:(m=a.sent()).set(d[p]),h.push(m.get()),a.label=8;case 8:return[3,13];case 9:return"RestElement"!==f.type?[3,11]:[5,s(Oe(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 Oe(e,t,n){var r,i,o,l,u,c,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,u=void 0!==l&&l,c=n.feed,d=void 0===c?[]:c,h=e.argument,o?u||"var"===r?"Identifier"!==h.type?[3,1]:(t[r](h.name,u?Y:"var"===r?q:void 0),[3,3]):[3,3]:[3,4];case 1:return[5,s(Gn(h,t,{kind:r,hoist:o,onlyBlock:u}))];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 Ne(e,t,n){var r,i,o,l,u,c,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,u=n.onlyBlock,c=void 0!==u&&u,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?c||"var"===i?"Identifier"!==f.type?[3,4]:(t[i](f.name,c?Y:"var"===i?q:void 0),[3,6]):[3,6]:[3,7];case 4:return[5,s(Gn(f,t,{kind:i,hoist:l,onlyBlock:c}))];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 je=Object.freeze({__proto__:null,ObjectPattern:Le,ArrayPattern:ze,RestElement:Oe,AssignmentPattern:Ne});function Re(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 Me,Be=Object.freeze({__proto__:null,Program:Re});function We(e,n){var i;return a(this,function(o){switch(o.label){case 0:return e?(Me||(Me=_({},r,Fe,re,t,oe,je,Be)),(i=Me[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 He(e,t,n){var r,i,o,l,u,c,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,u=i?t:new ee(t),l?[3,2]:[5,s(Hn(e,u,{onlyBlock:!0}))];case 1:a.sent(),a.label=2;case 2:c=0,a.label=3;case 3:return c<e.body.length?[5,s(We(e.body[c],u))]:[3,6];case 4:if((d=a.sent())===B)return d.LABEL&&d.LABEL===n.label?[3,6]:[2,d];if(d===M||d===R)return[2,d];a.label=5;case 5:return c++,[3,3];case 6:return[2]}})}function Ve(){return a(this,function(e){return[2]})}function Ge(){return a(this,function(e){return[2]})}function Ke(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:return n=R,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,R]}})}function qe(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){var t;return a(this,function(n){return M.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,[2,M]})}function Xe(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(He(e.body,t,{label:n}))];case 12:return"WithStatement"!==e.body.type?[3,14]:[5,s($e(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 $e(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())===B?l.LABEL&&l.LABEL===n.label?[2]:[2,l]:l===M||l===R?[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===B?r.LABEL&&r.LABEL===n.label?[2]:[2,r]:r===M||r===R?[2,r]:[2]}})}function Qe(e,t,n){var r,i,o,l,u,c,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],(u=!i)?(c=!l.test)?[3,4]:[5,s(We(l.test,t))]:[3,5]):[3,8];case 3:c=a.sent()===r,a.label=4;case 4:u=c,a.label=5;case 5:return u&&(i=!0),i?[5,s(Ze(l,t))]:[3,7];case 6:if((d=a.sent())===B)return d.LABEL===n.label?[3,8]:[2,d];if(d===M||d===R)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())===B||r===M||r===R)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,u;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,9,12]),[5,s(He(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]:(u=l.name,o.var(u,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(He(e.finalizer,t))]:[3,11];case 10:r=a.sent(),a.label=11;case 11:return[7];case 12:return r===B?r.LABEL&&r.LABEL===n.label?[2]:[2,r]:r===M||r===R?[2,r]:[2]}})}function nt(e,t){return a(this,function(n){switch(n.label){case 0:return[5,s(He(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())===B?r.LABEL===n.label?[3,3]:[2,r]:r===M?r.LABEL===n.label?[3,0]:[2,r]:r===R?[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())===B)return r.LABEL===n.label?[3,4]:[2,r];if(r===M)return r.LABEL===n.label?[3,2]:[2,r];if(r===R)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(He(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===B)return l.LABEL===n.label?[3,12]:[2,l];if(l===M)return l.LABEL===n.label?[3,10]:[2,l];if(l===R)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,u;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(Yn(e,t,{value:l}))]):[3,5];case 3:if((u=a.sent())===B)return u.LABEL===n.label?[3,5]:[2,u];if(u===M)return u.LABEL===n.label?[3,4]:[2,u];if(u===R)return[2,u];a.label=4;case 4:return o++,[3,2];case 5:return[2]}})}function st(e,t,n){var r,i,o,l,u,c,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=N(r),o=void 0,j.RES=i.next(),[4,j]):[3,8];case 2:o=a.sent(),a.label=3;case 3:return o.done?[3,7]:[5,s(Yn(e,t,{value:o.value}))];case 4:if((d=a.sent())===B)return d.LABEL===n.label?[3,7]:[2,d];if(d===M)return d.LABEL===n.label?[3,5]:[2,d];if(d===R)return[2,d];a.label=5;case 5:return j.RES=i.next(),[4,j];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),u=l.next(),a.label=9;case 9:return u.done?[3,12]:(c=u.value,[5,s(Yn(e,t,{value:c}))]);case 10:if((d=a.sent())===B)return d.LABEL===n.label?[3,12]:[2,d];if(d===M)return d.LABEL===n.label?[3,11]:[2,d];if(d===R)return[2,d];a.label=11;case 11:return u=l.next(),[3,9];case 12:return[3,15];case 13:return h=a.sent(),p={error:h},[3,15];case 14:try{u&&!u.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,Kn(e,t)),[2]})}function ut(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(ct(e.declarations[r],t,_({kind:e.kind},n)))]:[3,4];case 2:i.sent(),i.label=3;case 3:return r++,[3,1];case 4:return[2]}})}function ct(e,t,n){var r,i,o,l,u,c,h,p,f,m,g;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,u=n.onlyBlock,c=void 0!==u&&u,h=n.feed,l?c||"var"===i?"Identifier"!==e.id.type?[3,1]:(t[i](e.id.name,c?Y:"var"===i?q:void 0),[3,3]):[3,3]:[3,4];case 1:return[5,s(Gn(e.id,t,{kind:i,hoist:l,onlyBlock:c}))];case 2:a.sent(),a.label=3;case 3:return[3,10];case 4:return(p="feed"in n)?(m=h,[3,7]):[3,5];case 5:return[5,s(We(e.init,t))];case 6:m=a.sent(),a.label=7;case 7:return f=m,"Identifier"!==e.id.type?[3,8]:(g=e.id.name,"var"!==i||e.init||p?t[i](g,f):t.var(g,q),e.init&&-1!==["ClassExpression","FunctionExpression","ArrowFunctionExpression"].indexOf(e.init.type)&&!f.name&&d(f,"name",{value:g,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(qn(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(mt(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,u,c,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(u=e.static?r:r.prototype,l&&(u[K]||d(u,K,{value:{}}),u=u[K]),c=Kn(e.value,t,{superClass:i}),e.kind){case"constructor":break;case"method":d(u,o,{value:c,writable:!0,configurable:!0});break;case"get":p=h(u,o),d(u,o,{get:c,set:p&&p.set,configurable:!0});break;case"set":p=h(u,o),d(u,o,{get:p&&p.get,set:c,configurable:!0});break;default:throw new SyntaxError("Unexpected token")}return[2]}})}function ft(e,t,n){var r,i,o,l,u,c,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(u=new ee(t,!0)).const("this",r),c=r,l&&(c[K]||d(c,K,{value:{}}),c=c[K]),e.value?[3,4]:(c[o]=void 0,[3,7]);case 4:return"FunctionExpression"!==e.value.type&&"ArrowFunctionExpression"!==e.value.type?[3,5]:(c[o]=Kn(e.value,u,{superClass:i}),[3,7]);case 5:return h=c,p=o,[5,s(We(e.value,u))];case 6:h[p]=a.sent(),a.label=7;case 7:return[2]}})}function mt(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(He(e,i,{invasived:!0}))];case 1:return[2,o.sent()]}})}function gt(e,t){var n,r,i,o,s,l,u;return a(this,function(a){if(n=t.global(),(r=n.find(X+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],u=void 0,"ImportSpecifier"===l.type?u="Identifier"===l.imported.type?l.imported.name:l.imported.value:"ImportDefaultSpecifier"===l.type?u="default":"ImportNamespaceSpecifier"===l.type&&(u="*"),"*"!==u&&!f(i,u))throw new SyntaxError('The requested module "'+e.source.value+'" does not provide an export named "'+u+'"');t.var(l.local.name,"*"===u?_({},i):i[u])}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=Kn(e.declaration,t),t.func(e.declaration.id.name,r),[3,5]);case 1:return"ClassDeclaration"!==e.declaration.type?[3,3]:[5,s(qn(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($))&&(o=i.get())&&"object"==typeof o&&(o.default=r),[2]}})}function yt(e,t){var n,r,i,o,l,u,c,d,h,p,f,m;return a(this,function(a){switch(a.label){case 0:return n=t.global(),e.declaration?"FunctionDeclaration"!==e.declaration.type?[3,1]:(i=Kn(e.declaration,t),t.func(e.declaration.id.name,i),(c=n.find($))&&(r=c.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(qn(e.declaration,t))];case 2:return i=a.sent(),t.func(e.declaration.id.name,i),(c=n.find($))&&(o=c.get())&&"object"==typeof o&&(o[e.declaration.id.name]=i),[3,5];case 3:return"VariableDeclaration"!==e.declaration.type?[3,5]:[5,s(ut(e.declaration,t))];case 4:if(a.sent(),(c=n.find($))&&(l=c.get())&&"object"==typeof l)for(h=0;h<e.declaration.declarations.length;h++)u=e.declaration.declarations[h].id.name,(m=t.find(u))&&(l[u]=m.get());a.label=5;case 5:return[3,7];case 6:if(e.specifiers&&(c=n.find($))&&(d=c.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,(m=t.find(f))&&(d["Identifier"===p.exported.type?p.exported.name:p.exported.value]=m.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(X+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($))&&(l=s.get())&&"object"==typeof l&&_(l,i),[2]})}function At(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===Y)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:At});function wt(e,t){return e.value}var kt=Object.freeze({__proto__:null,Literal:wt});function St(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 Et(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 Ct(e,t){for(var n={},r=0;r<e.properties.length;r++){var i=e.properties[r];if("SpreadElement"===i.type)_(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:""+wt(a);var s=rn(i.value,t),l=i.kind;if("init"===l)n[o]=s;else if("get"===l){var u=h(n,o);d(n,o,{get:s,set:u&&u.set,enumerable:!0,configurable:!0})}else u=h(n,o),d(n,o,{get:u&&u.get,set:s,enumerable:!0,configurable:!0})}}return n}function _t(e,t){if(e.id&&e.id.name){var n=new ee(t),r=Bn(e,n);return n.const(e.id.name,r),r}return Bn(e,t)}function Tt(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 At(n,t,{throwErr:!1}):typeof rn(n,t);case"delete":if("MemberExpression"===n.type)return Lt(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 Dt(e,t){var n,r=e.argument;if("Identifier"===r.type)n=At(r,t,{getVar:!0});else{if("MemberExpression"!==r.type)throw new SyntaxError("Unexpected token");n=Lt(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))[K]||{}):(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 It(e,t){var n,r,i=e.left;if("Identifier"===i.type){if(!(r=At(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 Mn(i,t,{feed:rn(e.right,t)});r=Lt(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 Ft(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 Lt(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?Vt(e.object,t,{getProto:!0}):rn(e.object,t),a)return r;var u=!1;if(e.computed?i=rn(e.property,t):"PrivateIdentifier"===e.property.type?(i=e.property.name,u=!0):i=e.property.name,u&&(r=r[K]),l){var c=k(r,i);if("Super"===e.object.type&&c){var h=t.find("this").get(),p=O(i);return d(h,p,{set:c}),new Z(h,p)}return new Z(r,i)}var f=w(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 zt(e,t){return rn(e.test,t)?rn(e.consequent,t):rn(e.alternate,t)}function Ot(e,t){var n,r;if("MemberExpression"===e.callee.type){if(r=Lt(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[K]),"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[V])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[V]){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 u=[],c=0;c<e.arguments.length;c++){var d=e.arguments[c];"SpreadElement"===d.type?u=u.concat(Gt(d,t)):u.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,u)}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[L])return n.apply(h[L],u)}throw e}}function Nt(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[H])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,u([void 0],i)))}function jt(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 Rt(e,t){for(var n,r=0;r<e.expressions.length;r++)n=rn(e.expressions[r],t);return n}function Mt(e,t){return Bn(e,t)}function Bt(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:c(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,u([c(i)],s))}function Ut(e,t){return e.value.raw}function Ht(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 Vt(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:u(r)}function Kt(e,t){return rn(e.expression,t)}function qt(e,t){var n,r=t.global(),i=rn(e.source,t),o=r.find(X+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 Yt=Object.freeze({__proto__:null,ThisExpression:St,ArrayExpression:Et,ObjectExpression:Ct,FunctionExpression:_t,UnaryExpression:Tt,UpdateExpression:Dt,BinaryExpression:Pt,AssignmentExpression:It,LogicalExpression:Ft,MemberExpression:Lt,ConditionalExpression:zt,CallExpression:Ot,NewExpression:Nt,MetaProperty:jt,SequenceExpression:Rt,ArrowFunctionExpression:Mt,TemplateLiteral:Bt,TaggedTemplateExpression:Wt,TemplateElement:Ut,ClassExpression:Ht,Super:Vt,SpreadElement:Gt,ChainExpression:Kt,ImportExpression:qt});function Xt(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,u=n.feed,c=void 0===u?{}:u,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?Y:"var"===i?q:void 0):Mn(f,t,{kind:i,hoist:a,onlyBlock:l}):Jt(p,t,{kind:i,hoist:a,onlyBlock:l}));else if("Property"===p.type){var f,m=void 0;m=p.computed?rn(p.key,t):p.key.name,d.push(m),"Identifier"===(f=p.value).type?t[i](f.name,c[m]):Mn(f,t,{kind:i,feed:c[m]})}else{for(var g=_({},c),v=0;v<d.length;v++)delete g[d[v]];Jt(p,t,{kind:i,feed:g})}}}function $t(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,u=void 0===l?[]:l,c=[],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?Y:"var"===r?q:void 0):Mn(h,t,{kind:r,hoist:o,onlyBlock:s}));else if("Identifier"===h.type)if(r)t[r](h.name,u[d]);else{var p=At(h,t,{getVar:!0});p.set(u[d]),c.push(p.get())}else"RestElement"===h.type?Jt(h,t,{kind:r,feed:u.slice(d)}):Mn(h,t,{kind:r,feed:u[d]})}if(c.length)return c}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,u=void 0===l?[]:l,c=e.argument;o?(s||"var"===r)&&("Identifier"===c.type?t[r](c.name,s?Y:"var"===r?q:void 0):Mn(c,t,{kind:r,hoist:o,onlyBlock:s})):"Identifier"===c.type?r?t[r](c.name,u):At(c,t,{getVar:!0}).set(u):Mn(c,t,{kind:r,feed:u})}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,u=n.feed,c=void 0===u?rn(e.right,t):u,d=e.left;a?(l||"var"===i)&&("Identifier"===d.type?t[i](d.name,l?Y:"var"===i?q:void 0):Mn(d,t,{kind:i,hoist:a,onlyBlock:l})):"Identifier"===d.type?t[i](d.name,c):Mn(d,t,{kind:i,feed:c})}var Zt=Object.freeze({__proto__:null,ObjectPattern:Xt,ArrayPattern:$t,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=_({},o,Yt,xt,i,kt,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||jn(e,s,{onlyBlock:!0});for(var l=0;l<e.body.length;l++){var u=rn(e.body[l],s);if(u===B){if(u.LABEL&&u.LABEL===n.label)break;return u}if(u===M||u===R)return u}}function sn(){}function ln(){}function un(e,t){return R.RES=e.argument?rn(e.argument,t):void 0,R}function cn(e){var t;return B.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,B}function dn(e){var t;return M.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,M}function hn(e,t){var n=e.label.name;if("WhileStatement"===e.body.type)return An(e.body,t,{label:n});if("DoWhileStatement"===e.body.type)return xn(e.body,t,{label:n});if("ForStatement"===e.body.type)return wn(e.body,t,{label:n});if("ForInStatement"===e.body.type)return kn(e.body,t,{label:n});if("ForOfStatement"===e.body.type)return Sn(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 mn(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===B){if(i.LABEL&&i.LABEL===n.label)return;return i}if(i===M||i===R)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))===B){if(r.LABEL&&r.LABEL===n.label)return;return r}if(r===M||r===R)return r}function mn(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=gn(a,t);if(s===B){if(s.LABEL===n.label)break;return s}if(s===M||s===R)return s}}}function gn(e,t){for(var n=0;n<e.consequent.length;n++){var r=rn(e.consequent[n],t);if(r===B||r===M||r===R)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 Mn(o,t,{feed:n});r=bn(e.handler,i)}finally{e.finalizer&&(r=an(e.finalizer,t))}if(r===B){if(r.LABEL&&r.LABEL===n.label)return;return r}if(r===M||r===R)return r}function bn(e,t){return an(e.body,t,{invasived:!0})}function An(e,t,n){for(void 0===n&&(n={});rn(e.test,t);){var r=rn(e.body,t);if(r===B){if(r.LABEL===n.label)break;return r}if(r===M){if(r.LABEL===n.label)continue;return r}if(r===R)return r}}function xn(e,t,n){void 0===n&&(n={});do{var r=rn(e.body,t);if(r===B){if(r.LABEL===n.label)break;return r}if(r===M){if(r.LABEL===n.label)continue;return r}if(r===R)return r}while(rn(e.test,t))}function wn(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))===B){if(o.LABEL===n.label)break;return o}if(o===M){if(o.LABEL===n.label)continue;return o}if(o===R)return o}}function kn(e,t,n){for(var r in void 0===n&&(n={}),rn(e.right,t)){var i=Un(e,t,{value:r});if(i===B){if(i.LABEL===n.label)break;return i}if(i===M){if(i.LABEL===n.label)continue;return i}if(i===R)return i}}function Sn(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 u=Un(e,t,{value:l.value});if(u===B){if(u.LABEL===n.label)break;return u}if(u===M){if(u.LABEL===n.label)continue;return u}if(u===R)return u}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}function En(e,t){t.func(e.id.name,Bn(e,t))}function Cn(e,t,n){void 0===n&&(n={});for(var r=0;r<e.declarations.length;r++)_n(e.declarations[r],t,_({kind:e.kind},n))}function _n(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,u=n.feed;if(a)(l||"var"===i)&&("Identifier"===e.id.type?t[i](e.id.name,l?Y:"var"===i?q:void 0):Mn(e.id,t,{kind:i,hoist:a,onlyBlock:l}));else{var c="feed"in n,h=c?u:rn(e.init,t);if("Identifier"===e.id.type){var p=e.id.name;"var"!==i||e.init||c?t[i](p,h):t.var(p,q),e.init&&-1!==["ClassExpression","FunctionExpression","ArrowFunctionExpression"].indexOf(e.init.type)&&!h.name&&d(h,"name",{value:p,configurable:!0})}else Mn(e.id,t,{kind:i,feed:h})}}function Tn(e,t){t.func(e.id.name,Wn(e,t))}function Dn(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?In(a,t,{klass:r,superClass:i}):"StaticBlock"===a.type&&Fn(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[K]||d(s,K,{value:{}}),s=s[K]);var l=Bn(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 u=h(s,r);d(s,r,{get:l,set:u&&u.set,configurable:!0});break;case"set":u=h(s,r),d(s,r,{get:u&&u.get,set:l,configurable:!0});break;default:throw new SyntaxError("Unexpected token")}}function In(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[K]||d(l,K,{value:{}}),l=l[K]),e.value?"FunctionExpression"===e.value.type||"ArrowFunctionExpression"===e.value.type?l[r]=Bn(e.value,s,{superClass:o}):l[r]=rn(e.value,s):l[r]=void 0}function Fn(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 Ln(e,t){var n,r=t.global().find(X+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?_({},n):n[s])}}function zn(e,t){var n,r=t.global();"FunctionDeclaration"===e.declaration.type?(n=Bn(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($);if(i){var o=i.get();o&&"object"==typeof o&&(o.default=n)}}function On(e,t){var n=t.global();if(e.declaration){if("FunctionDeclaration"===e.declaration.type){var r=Bn(e.declaration,t);if(t.func(e.declaration.id.name,r),u=n.find($)){var i=u.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),u=n.find($)){var o=u.get();o&&"object"==typeof o&&(o[e.declaration.id.name]=r)}}else if("VariableDeclaration"===e.declaration.type&&(Cn(e.declaration,t),u=n.find($))){var a=u.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 u;if(u=n.find($)){var c=u.get();if(c&&"object"==typeof c)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))&&(c["Identifier"===h.exported.type?h.exported.name:h.exported.value]=d.get())}}}}function Nn(e,t){var n,r=t.global(),i=r.find(X+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($);if(a){var s=a.get();s&&"object"==typeof s&&_(s,n)}}function jn(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)?Cn(l,t,{hoist:!0,onlyBlock:!0}):i||Rn(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 Rn(e,t){switch(e.type){case"VariableDeclaration":Cn(e,t,{hoist:!0});break;case"ForInStatement":case"ForOfStatement":"VariableDeclaration"===e.left.type&&Cn(e.left,t,{hoist:!0});case"ForStatement":"ForStatement"===e.type&&"VariableDeclaration"===e.init.type&&Cn(e.init,t,{hoist:!0});case"WhileStatement":case"DoWhileStatement":Rn(e.body,t);break;case"IfStatement":Rn(e.consequent,t),e.alternate&&Rn(e.alternate,t);break;case"BlockStatement":for(var n=0;n<e.body.length;n++)Rn(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++)Rn(e.cases[n].consequent[r],t);break;case"TryStatement":var i=e.block.body;for(n=0;n<i.length;n++)Rn(i[n],t);var o=e.handler&&e.handler.body.body;if(o)for(n=0;n<o.length;n++)Rn(o[n],t);var a=e.finalizer&&e.finalizer.body;if(a)for(n=0;n<a.length;n++)Rn(a[n],t)}}function Mn(e,t,n){switch(void 0===n&&(n={}),e.type){case"ObjectPattern":return Xt(e,t,n);case"ArrayPattern":return $t(e,t,n);case"RestElement":return Jt(e,t,n);case"AssignmentPattern":return Qt(e,t,n);default:throw new SyntaxError("Unexpected token")}}function Bn(e,t,n){var r;if(void 0===n&&(n={}),e.generator||e.async)return Kn(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 u,c=new ee(t,!0);"ArrowFunctionExpression"!==e.type&&(c.const("this",this),c.let("arguments",arguments),c.const(G,r),o&&o(this),i&&(c.const(W,i),o&&c.let(U,!1)));for(var d=0;d<a.length;d++){var h=a[d];"Identifier"===h.type?c.var(h.name,s[d]):"RestElement"===h.type?Jt(h,c,{kind:"var",feed:s.slice(d)}):Mn(h,c,{kind:"var",feed:s[d]})}if("BlockStatement"===e.body.type?(jn(e.body,c),u=an(e.body,c,{invasived:!0,hoisted:!0})):(u=rn(e.body,c),"ArrowFunctionExpression"===e.type&&(R.RES=u,u=R)),u===R)return u.RES},l=s;"ArrowFunctionExpression"===e.type&&d(l,H,{value:!0}),d(l,"name",{value:e.id&&e.id.name||"",configurable:!0}),d(l,"length",{value:a.length,configurable:!0});var u=null===(r=e.loc)||void 0===r?void 0:r.source;return u&&d(l,"toString",{value:function(){return u.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||In(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=Bn(s.value,t,{superClass:n,construct:i});break}}return n&&E(o,n),Dn(e.body,t,{klass:o,superClass:n}),d(o,V,{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?Cn(i,o,{feed:r}):"Identifier"===i.type?At(i,t,{getVar:!0}).set(r):Mn(i,t,{feed:r}),"BlockStatement"===e.body.type?an(e.body,o,{invasived:!0}):rn(e.body,o)}function Hn(e,t,n){var r,i,o,l,u,c;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:r=n.onlyBlock,i=void 0!==r&&r,o=[],l=[],c=0,a.label=1;case 1:return c<e.body.length?"FunctionDeclaration"!==(u=e.body[c]).type?[3,2]:(o.push(u),l.push(c),[3,6]):[3,7];case 2:return"VariableDeclaration"!==u.type||-1===["const","let"].indexOf(u.kind)?[3,4]:[5,s(ut(u,t,{hoist:!0,onlyBlock:!0}))];case 3:return a.sent(),[3,6];case 4:return i?[3,6]:[5,s(Vn(u,t))];case 5:a.sent(),a.label=6;case 6:return c++,[3,1];case 7:if(l.length){for(c=l.length-1;c>-1;c--)e.body.splice(l[c],1);e.body=o.concat(e.body)}return[2]}})}function Vn(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(ut(e,t,{hoist:!0}))];case 2:return a.sent(),[3,38];case 3:return"VariableDeclaration"!==e.left.type?[3,5]:[5,s(ut(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(ut(e.init,t,{hoist:!0}))];case 6:a.sent(),a.label=7;case 7:return[5,s(Vn(e.body,t))];case 8:return a.sent(),[3,38];case 9:return[5,s(Vn(e.consequent,t))];case 10:return a.sent(),e.alternate?[5,s(Vn(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(Vn(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(Vn(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(Vn(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(Vn(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(Vn(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(Le(e,t,n))];case 2:case 4:case 6:case 8:return[2,r.sent()];case 3:return[5,s(ze(e,t,n))];case 5:return[5,s(Oe(e,t,n))];case 7:return[5,s(Ne(e,t,n))];case 9:throw new SyntaxError("Unexpected token")}})}function Kn(e,t,n){var r;if(void 0===n&&(n={}),!e.generator&&!e.async)return Bn(e,t,n);var i,o=n.superClass,l=n.construct,u=e.params,c=function n(){var r,i,c,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:c=0,n.label=4;case 4:return c<u.length?"Identifier"!==(d=u[c]).type?[3,5]:(i.var(d.name,f[c]),[3,9]):[3,10];case 5:return"RestElement"!==d.type?[3,7]:[5,s(Oe(d,i,{kind:"var",feed:f.slice(c)}))];case 6:return n.sent(),[3,9];case 7:return[5,s(Gn(d,i,{kind:"var",feed:f[c]}))];case 8:n.sent(),n.label=9;case 9:return c++,[3,4];case 10:return"BlockStatement"!==e.body.type?[3,13]:[5,s(Hn(e.body,i))];case 11:return n.sent(),[5,s(He(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&&(R.RES=h,h=R),n.label=15;case 15:return h===R?[2,h.RES]:[2]}})};i=e.async&&e.generator?function(){var e=c.apply(this,arguments),t=Promise.resolve(),n=!1,r=function(r){return t=t.then(function(){return te(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(c.apply(this,arguments))}:c,d(i,H,{value:!0}),d(i,"name",{value:e.id&&e.id.name||"",configurable:!0}),d(i,"length",{value:u.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 qn(e,t){var n,r,i,o,l,u;return a(this,function(c){switch(c.label){case 0:return[5,s(We(e.superClass,t))];case 1:for(n=c.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"===(u=r[l]).type&&"constructor"===u.kind){o=Kn(u.value,t,{superClass:n,construct:i});break}return n&&E(o,n),[5,s(ht(e.body,t,{klass:o,superClass:n}))];case 2:return c.sent(),d(o,V,{value:!0}),d(o,"name",{value:e.id&&e.id.name||"",configurable:!0}),[2,o]}})}function Yn(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(ut(i,o,{feed:r}))];case 1:return a.sent(),[3,6];case 2:return"Identifier"!==i.type?[3,4]:[5,s(At(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(He(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 Xn=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>Xn))throw new Error("unsupported ecmaVer");if(this.options.ecmaVersion=n,this.options.sourceType=a,i){var s=z();this.scope.let("globalThis",s),this.scope.let("window",s),this.scope.let("this",s)}else this.scope.let("globalThis",D),this.scope.let("window",D),this.scope.let("this",D);this.scope.const("module"===a?$:"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=m(e),i=0;i<r.length;i++){var o=r[i],a="module"===this.options.sourceType?X+o:o;this.scope.var(a,e[o])}},t.prototype.parse=function(t,n){return"function"==typeof n?n(t,_({},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(Hn(t,n))];case 1:return e.sent(),[5,s(We(t,n))];case 2:return e.sent(),[2]}})}()):(jn(t,n),rn(t,n))},t.version=J,t}()}(n(8202))},7239(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(3739).A)()},7301(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(8915);function i(e,t){if(null==e)return{};var n,i,o=(0,r.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},7304(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}},7306(e,t,n){"use strict";n.d(t,{AX:()=>f,Gi:()=>h,J5:()=>c,NG:()=>g,OT:()=>s,TW:()=>l,WL:()=>a,_E:()=>d,a7:()=>u,ck:()=>y,lN:()=>v,p1:()=>m,vw:()=>p});var r=n(4107),i=n(5493),o=n(1367);const a="*",s="#209CEE",l="split_disable",u="split_textlength",c="split_punctuation",d=[l,c,u],h="highlight_disable",p="highlight_beforetrans",f="highlight_aftertrans",m=[h,p,f],g={pattern:"",enabled:!0,selector:"",keepSelector:"",blockSelector:"",terms:"",aiTerms:"",apiSlug:a,fromLang:a,toLang:a,textStyle:a,wrapOriginal:a,originalTextStyle:a,transOpen:a,textExtStyle:"",termsStyle:"",highlightStyle:"",selectStyle:"",parentStyle:"",grandStyle:"",injectJs:"",transOnly:a,transOnlyRevert:a,transOnlyRevertDelay:a,transOrder:a,transTag:a,transTitle:a,transStartHook:"",transEndHook:"",autoScan:a,hasRichText:a,hasShadowroot:a,scanAll:a,isPlainText:a,rootsSelector:"",ignoreSelector:"",splitParagraph:a,splitLength:0,highlightWords:a},v={pattern:"*",enabled:!0,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:i.kX,fromLang:"auto",toLang:"zh-CN",textStyle:o.ns,wrapOriginal:"false",originalTextStyle:o.ns,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",isPlainText:"false",rootsSelector:"body",ignoreSelector:"button, footer, pre, mark, nav, svg, img[src*='.svg'], [class*='logo'] svg, [id*='logo'] svg",splitParagraph:l,splitLength:100,highlightWords:h,transOrder:"original-first"},y=[v];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(0,r.A)((0,r.A)({},n),{},{pattern:t})})},7325(e,t,n){"use strict";n.d(t,{QF:()=>d,uk:()=>u,v0:()=>h});var r=n(9992),i=n(4181),o=n(252),a=n(1223),s=n(2770),l=n(5628);const u=async()=>{try{o.aQ&&!(0,a._9)()?await(0,s.Ru)(r.Eev):await caches.delete(r.bzl)}catch(e){(0,i.h9)("clean caches",e)}},c=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},d=(e,t)=>o.aQ&&!(0,a._9)()?(0,s.Ru)(r.QzF,{input:e,init:t}):(async e=>{let{input:t,init:n,expect:o}=e;try{const e=await c(t,n),i=await caches.open(r.bzl),a=await i.match(e);if(a)return await(0,l.x)(a,o)}catch(e){(0,i.h9)("get cache",e)}return null})({input:e,init:t});const h=(e,t,n)=>o.aQ&&!(0,a._9)()?(0,s.Ru)(r.j7m,{input:e,init:t,data:n}):(async e=>{let{input:t,init:n,data:o,maxAge:a=r.$kn}=e;try{const e=await c(t,n),i=await caches.open(r.bzl),s=new Response(JSON.stringify(o),{status:200,headers:{"Content-Type":"application/json","Cache-Control":"max-age=".concat(a)}});await i.put(e,s)}catch(e){(0,i.h9)("put cache",e)}})({input:e,init:t,data:n})},7441(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})}},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)}},7562(e,t,n){"use strict";n.d(t,{Ay:()=>s});var r=n(4481),i=n(7239),o=n(4882),a=n(5460);const s=(0,r.Ay)({themeId:o.A,defaultTheme:i.A,rootShouldForwardProp:a.A})},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})},7698(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},7802(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})}},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 u(e,t,n){var r,o={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=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:u,ref:c,props:o,_owner:s.current}}t.Fragment=o,t.jsx=u,t.jsxs=u},7876(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},7922(e,t,n){var r=n(7930);function i(e,t){var n,i=null;if(!e||"string"!=typeof e)return i;for(var o,a,s=r(e),l="function"==typeof t,u=0,c=s.length;u<c;u++)o=(n=s[u]).property,a=n.value,l?t(o,a,n):a&&(i||(i={}),i[o]=a);return i}e.exports=i,e.exports.default=i},7930(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,u="";function c(e){return e?e.replace(l,u):u}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,h=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");h=~r?e.length-r:h+e.length}function f(){var e={line:d,column:h};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:h},this.source=l.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){y(r)}function A(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return h+=2,p(r),e=e.slice(n),h+=2,t({type:"comment",comment:r})}}function w(){var e=f(),n=y(i);if(n){if(x(),!y(o))return v("property missing ':'");var r=y(a),l=e({type:"declaration",property:c(n[0].replace(t,u)),value:r?c(r[0].replace(t,u)):u});return y(s),l}}return b(),function(){var e,t=[];for(A(t);e=w();)!1!==e&&(t.push(e),A(t));return t}()}},7946(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(3013),i=n(9682),o=n(6620)},8154(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(9476),i=n(2639);function o(e){var t=(0,i.A)(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}},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)?$/,u=new RegExp("["+i+"]"),c=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&&u.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&&c.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 m(e,t){return new f(e,{beforeExpr:!0,binop:t})}var g={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 A={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(",",g),semi:new f(";",g),colon:new f(":",g),dot:new f("."),question:new f("?",g),questionDot:new f("?."),arrow:new f("=>",g),template:new f("template"),invalidTemplate:new f("invalidTemplate"),ellipsis:new f("...",g),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:m("||",1),logicalAND:m("&&",2),bitwiseOR:m("|",3),bitwiseXOR:m("^",4),bitwiseAND:m("&",5),equality:m("==/!=/===/!==",6),relational:m("</>/<=/>=",7),bitShift:m("<</>>/>>>",8),plusMin:new f("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:m("%",10),star:m("*",10),slash:m("/",10),starstar:new f("**",{beforeExpr:!0}),coalesce:m("??",1),_break:b("break"),_case:b("case",g),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",g),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",g),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",v),_if:b("if"),_return:b("return",g),_switch:b("switch"),_throw:b("throw",g),_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",g),_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/,w=new RegExp(x.source,"g");function k(e){return 10===e||13===e||8232===e||8233===e}function S(e,t,n){void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(k(i))return r<n-1&&13===i&&10===e.charCodeAt(r+1)?r+2:r+1}return-1}var E=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,_=Object.prototype,T=_.hasOwnProperty,D=_.toString,P=Object.hasOwn||function(e,t){return T.call(e,t)},I=Array.isArray||function(e){return"[object Array]"===D.call(e)},F=Object.create(null);function L(e){return F[e]||(F[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function z(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var O=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,N=function(e,t){this.line=e,this.column=t};N.prototype.offset=function(e){return new N(this.line,this.column+e)};var j=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function R(e,t){for(var n=1,r=0;;){var i=S(e,r,t);if(i<0)return new N(n,t-r);++n,r=i}}var M={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},B=!1;function W(e){var t={};for(var n in M)t[n]=e&&P(e,n)?e[n]:M[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!B&&"object"==typeof console&&console.warn&&(B=!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),I(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return I(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 j(this,a,s)),e.ranges&&(l.range=[i,o]),t.push(l)}}var H=1,V=2,G=4,K=8,q=16,Y=32,X=64,$=128,J=256,Q=512,Z=H|V|J;function ee(e,t){return V|(e?G:0)|(t?K: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=L(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=L(r);var i=(r?r+" ":"")+o.strict;this.reservedWordsStrict=L(i),this.reservedWordsStrictBind=L(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=A.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(H),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&V)>0},le.inGenerator.get=function(){return(this.currentVarScope().flags&K)>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&V)return(t&G)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},le.allowSuper.get=function(){return(this.currentThisScope().flags&X)>0||this.options.allowSuperOutsideMethod},le.allowDirectSuper.get=function(){return(this.currentThisScope().flags&$)>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&V&&!(t&q))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 ue=se.prototype,ce=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ue.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){C.lastIndex=e,e+=C.exec(this.input)[0].length;var t=ce.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){C.lastIndex=e+t[0].length;var n=C.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,C.lastIndex=e,e+=C.exec(this.input)[0].length,";"===this.input[e]&&e++}},ue.eat=function(e){return this.type===e&&(this.next(),!0)},ue.isContextual=function(e){return this.type===A.name&&this.value===e&&!this.containsEsc},ue.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},ue.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},ue.canInsertSemicolon=function(){return this.type===A.eof||this.type===A.braceR||x.test(this.input.slice(this.lastTokEnd,this.start))},ue.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ue.semicolon=function(){this.eat(A.semi)||this.insertSemicolon()||this.unexpected()},ue.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},ue.expect=function(e){this.eat(e)||this.unexpected()},ue.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};ue.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")}},ue.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")},ue.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")},ue.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!==A.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;C.lastIndex=this.pos;var t=C.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;C.lastIndex=this.pos;var e,t=C.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;C.lastIndex=this.pos;var n=C.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;C.lastIndex=o;var a=C.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 u=this.input.charCodeAt(r);return h(u,!0)||92===u},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=A._var,r="let"),i){case A._break:case A._continue:return this.parseBreakContinueStatement(o,i.keyword);case A._debugger:return this.parseDebuggerStatement(o);case A._do:return this.parseDoStatement(o);case A._for:return this.parseForStatement(o);case A._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(o,!1,!e);case A._class:return e&&this.unexpected(),this.parseClass(o,!0);case A._if:return this.parseIfStatement(o);case A._return:return this.parseReturnStatement(o);case A._switch:return this.parseSwitchStatement(o);case A._throw:return this.parseThrowStatement(o);case A._try:return this.parseTryStatement(o);case A._const:case A._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(o,r);case A._while:return this.parseWhileStatement(o);case A._with:return this.parseWithStatement(o);case A.braceL:return this.parseBlock(!0,o);case A.semi:return this.parseEmptyStatement(o);case A._export:case A._import:if(this.options.ecmaVersion>10&&i===A._import){C.lastIndex=this.pos;var a=C.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===A._import?this.parseImport(o):this.parseExport(o,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(o,!0,!e);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)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"===u&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(o,!1,u),this.semicolon(),this.finishNode(o,"VariableDeclaration");var c=this.value,d=this.parseExpression();return i===A.name&&"Identifier"===d.type&&this.eat(A.colon)?this.parseLabeledStatement(o,c,d,e):this.parseExpressionStatement(o,d)}},he.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(A.semi)||this.insertSemicolon()?e.label=null:this.type!==A.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(A._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(A.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(A.parenL),this.type===A.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===A._var||this.type===A._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 u=this.containsEsc,c=new de,d=this.start,h=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===A._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===A._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(h.start!==d||u||"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,c),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(c,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))},he.parseForAfterInit=function(e,t,n){return(this.type===A._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===A._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,ge|(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(A._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(A.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(A.braceL),this.labels.push(fe),this.enterScope(0);for(var n=!1;this.type!==A.braceR;)if(this.type===A._case||this.type===A._default){var r=this.type===A._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(A.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 me=[];he.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?Y:0),this.checkLValPattern(e,t?oe:re),this.expect(A.parenR),e},he.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===A._catch){var t=this.startNode();this.next(),this.eat(A.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(A._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===A._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(A.braceL),e&&this.enterScope(0);this.type!==A.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(A.semi),e.test=this.type===A.semi?null:this.parseExpression(),this.expect(A.semi),e.update=this.type===A.parenR?null:this.parseExpression(),this.expect(A.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},he.parseForIn=function(e,t){var n=this.type===A._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(A.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(A.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===A._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===A._in||this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===A._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(A.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 ge=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 Ae(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===A.star&&t&ve&&this.unexpected(),e.generator=this.eat(A.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&ge&&(e.id=t&ye&&this.type!==A.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&ge||(e.id=this.type===A.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&ge?"FunctionDeclaration":"FunctionExpression")},he.parseFunctionParams=function(e){this.expect(A.parenL),e.params=this.parseBindingList(A.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(A.braceL);this.type!==A.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(A.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(A.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===A.star?s=!0:r="static"}if(n.static=s,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==A.star||this.canInsertSemicolon()?r="async":o=!0),!r&&(t>=9||!o)&&this.eat(A.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===A.parenL||"method"!==a||i||o){var u=!n.static&&Ae(n,"constructor"),c=u&&e;u&&"method"!==a&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=u?"constructor":a,this.parseClassMethod(n,i,o,c)}else this.parseClassField(n);return n},he.isClassElementNameStart=function(){return this.type===A.name||this.type===A.privateId||this.type===A.num||this.type===A.string||this.type===A.bracketL||this.type.keyword},he.parseClassElementName=function(e){this.type===A.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&&Ae(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 Ae(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Ae(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(A.eq)?(this.enterScope(Q|X),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|X);this.type!==A.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===A.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(A._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!==A.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(A.star))return this.parseExportAllDeclaration(e,t);if(this.eat(A._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!==A.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===A._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,ge|ye,!1,e)}if(this.type===A._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(A.braceL);!this.eat(A.braceR);){if(n)n=!1;else if(this.expect(A.comma),this.afterTrailingComma(A.braceR))break;t.push(this.parseExportSpecifier(e))}return t},he.parseImport=function(e){return this.next(),this.type===A.string?(e.specifiers=me,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===A.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===A.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(A.comma)))return e;if(this.type===A.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(A.braceL);!this.eat(A.braceR);){if(t)t=!1;else if(this.expect(A.comma),this.afterTrailingComma(A.braceR))break;e.push(this.parseImportSpecifier())}return e},he.parseWithClause=function(){var e=[];if(!this.eat(A._with))return e;this.expect(A.braceL);for(var t={},n=!0;!this.eat(A.braceR);){if(n)n=!1;else if(this.expect(A.comma),this.afterTrailingComma(A.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===A.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(A.colon),this.type!==A.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},he.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===A.string){var e=this.parseLiteral(this.value);return O.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!==A.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},xe.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case A.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(A.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case A.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(A.comma),t&&this.type===A.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===A.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),i.push(a),this.type===A.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(A.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 we=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},ke={b_stat:new we("{",!1),b_expr:new we("{",!0),b_tmpl:new we("${",!1),p_stat:new we("(",!1),p_expr:new we("(",!0),q_tmpl:new we("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new we("function",!1),f_expr:new we("function",!0),f_expr_gen:new we("function",!0,!1,null,!0),f_gen:new we("function",!1,!1,null,!0)},Se=se.prototype;Se.initialContext=function(){return[ke.b_stat]},Se.curContext=function(){return this.context[this.context.length-1]},Se.braceIsBlock=function(e){var t=this.curContext();return t===ke.f_expr||t===ke.f_stat||(e!==A.colon||t!==ke.b_stat&&t!==ke.b_expr?e===A._return||e===A.name&&this.exprAllowed?x.test(this.input.slice(this.lastTokEnd,this.start)):e===A._else||e===A.semi||e===A.eof||e===A.parenR||e===A.arrow||(e===A.braceL?t===ke.b_stat:e!==A._var&&e!==A._const&&e!==A.name&&!this.exprAllowed):!t.isExpr)},Se.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},Se.updateContext=function(e){var t,n=this.type;n.keyword&&e===A.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},Se.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},A.parenR.updateContext=A.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===ke.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},A.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ke.b_stat:ke.b_expr),this.exprAllowed=!0},A.dollarBraceL.updateContext=function(){this.context.push(ke.b_tmpl),this.exprAllowed=!0},A.parenL.updateContext=function(e){var t=e===A._if||e===A._for||e===A._with||e===A._while;this.context.push(t?ke.p_stat:ke.p_expr),this.exprAllowed=!0},A.incDec.updateContext=function(){},A._function.updateContext=A._class.updateContext=function(e){!e.beforeExpr||e===A._else||e===A.semi&&this.curContext()!==ke.p_stat||e===A._return&&x.test(this.input.slice(this.lastTokEnd,this.start))||(e===A.colon||e===A.braceL)&&this.curContext()===ke.b_stat?this.context.push(ke.f_stat):this.context.push(ke.f_expr),this.exprAllowed=!1},A.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},A.backQuote.updateContext=function(){this.curContext()===ke.q_tmpl?this.context.pop():this.context.push(ke.q_tmpl),this.exprAllowed=!1},A.star.updateContext=function(e){if(e===A._function){var t=this.context.length-1;this.context[t]===ke.f_expr?this.context[t]=ke.f_expr_gen:this.context[t]=ke.f_gen}this.exprAllowed=!0},A.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==A.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var Ee=se.prototype;function Ce(e){return"Identifier"===e.type||"ParenthesizedExpression"===e.type&&Ce(e.expression)}function _e(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&_e(e.expression)||"ParenthesizedExpression"===e.type&&_e(e.expression)}Ee.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}}},Ee.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===A.comma){var o=this.startNodeAt(n,r);for(o.expressions=[i];this.eat(A.comma);)o.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return i},Ee.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!==A.parenL&&this.type!==A.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,s,l)),this.type.isAssign){var c=this.startNodeAt(s,l);return c.operator=this.value,this.type===A.eq&&(u=this.toAssignable(u,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=u.start&&(t.shorthandAssign=-1),this.type===A.eq?this.checkLValPattern(u):this.checkLValSimple(u),c.left=u,this.next(),c.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),o>-1&&(t.trailingComma=o),u},Ee.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(A.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(A.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i},Ee.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)},Ee.parseExprOp=function(e,t,n,r,i){var o=this.type.binop;if(null!=o&&(!i||this.type!==A._in)&&o>r){var a=this.type===A.logicalOR||this.type===A.logicalAND,s=this.type===A.coalesce;s&&(o=A.logicalAND.binop);var l=this.value;this.next();var u=this.start,c=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),u,c,o,i),h=this.buildBinary(t,n,e,d,l,a||s);return(a&&this.type===A.coalesce||s&&(this.type===A.logicalOR||this.type===A.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},Ee.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")},Ee.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===A.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&&Ce(s.argument)?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):"delete"===s.operator&&_e(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!==A.privateId){if(i=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=this.startNodeAt(o,a);u.operator=this.value,u.prefix=!1,u.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(u,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),i=this.parsePrivateIdent(),this.type!==A._in&&this.unexpected();return n||!this.eat(A.starstar)?i:t?void this.unexpected(this.lastTokStart):this.buildBinary(o,a,i,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},Ee.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},Ee.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}},Ee.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(A.arrow)},Ee.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},Ee.parseSubscript=function(e,t,n,r,i,o,a){var s=this.options.ecmaVersion>=11,l=s&&this.eat(A.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(A.bracketL);if(u||l&&this.type!==A.parenL&&this.type!==A.backQuote||this.eat(A.dot)){var c=this.startNodeAt(t,n);c.object=e,u?(c.property=this.parseExpression(),this.expect(A.bracketR)):this.type===A.privateId&&"Super"!==e.type?c.property=this.parsePrivateIdent():c.property=this.parseIdent("never"!==this.options.allowReserved),c.computed=!!u,s&&(c.optional=l),e=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(A.parenL)){var d=new de,h=this.yieldPos,p=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(A.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,m,a);this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=m,s&&(g.optional=l),e=this.finishNode(g,"CallExpression")}else if(this.type===A.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},Ee.parseExprAtom=function(e,t,n){this.type===A.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case A._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==A.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==A.dot&&this.type!==A.bracketL&&this.type!==A.parenL&&this.unexpected(),this.finishNode(r,"Super");case A._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case A.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(A._function))return this.overrideContext(ke.f_expr),this.parseFunction(this.startNodeAt(o,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(A.arrow))return this.parseArrowExpression(this.startNodeAt(o,a),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===A.name&&!s&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(A.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(o,a),[l],!0,t)}return l;case A.regexp:var u=this.value;return(r=this.parseLiteral(u.value)).regex={pattern:u.pattern,flags:u.flags},r;case A.num:case A.string:return this.parseLiteral(this.value);case A._null:case A._true:case A._false:return(r=this.startNode()).value=this.type===A._null?null:this.type===A._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case A.parenL:var c=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),d;case A.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(A.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case A.braceL:return this.overrideContext(ke.b_expr),this.parseObj(!1,e);case A._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case A._class:return this.parseClass(this.startNode(),!1);case A._new:return this.parseNew();case A.backQuote:return this.parseTemplate();case A._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},Ee.parseExprAtomDefault=function(){this.unexpected()},Ee.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===A.parenL&&!e)return this.parseDynamicImport(t);if(this.type===A.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()},Ee.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(A.parenR)?e.options=null:(this.expect(A.comma),this.afterTrailingComma(A.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(A.parenR)||(this.expect(A.comma),this.afterTrailingComma(A.parenR)||this.unexpected())));else if(!this.eat(A.parenR)){var t=this.start;this.eat(A.comma)&&this.eat(A.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},Ee.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")},Ee.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")},Ee.parseParenExpression=function(){this.expect(A.parenL);var e=this.parseExpression();return this.expect(A.parenR),e},Ee.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Ee.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,u=[],c=!0,d=!1,h=new de,p=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==A.parenR;){if(c?c=!1:this.expect(A.comma),o&&this.afterTrailingComma(A.parenR,!0)){d=!0;break}if(this.type===A.ellipsis){a=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===A.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}u.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(A.parenR),e&&this.shouldParseArrow(u)&&this.eat(A.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=f,this.parseParenArrowList(r,i,u,t);u.length&&!d||this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=f||this.awaitPos,u.length>1?((n=this.startNodeAt(s,l)).expressions=u,this.finishNodeAt(n,"SequenceExpression",m,g)):n=u[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},Ee.parseParenItem=function(e){return e},Ee.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Te=[];Ee.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===A.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(A.parenL)?e.arguments=this.parseExprList(A.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Te,this.finishNode(e,"NewExpression")},Ee.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===A.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===A.backQuote,this.finishNode(n,"TemplateElement")},Ee.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===A.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(A.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(A.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Ee.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===A.name||this.type===A.num||this.type===A.string||this.type===A.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===A.star)&&!x.test(this.input.slice(this.lastTokEnd,this.start))},Ee.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(A.braceR);){if(r)r=!1;else if(this.expect(A.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(A.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")},Ee.parseProperty=function(e,t){var n,r,i,o,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(A.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===A.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===A.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(A.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(A.star),this.parsePropertyName(a)):r=!1,this.parsePropertyValue(a,e,n,r,i,o,t,s),this.finishNode(a,"Property")},Ee.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")},Ee.parsePropertyValue=function(e,t,n,r,i,o,a,s){(n||r)&&this.type===A.colon&&this.unexpected(),this.eat(A.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===A.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===A.comma||this.type===A.braceR||this.type===A.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===A.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))},Ee.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(A.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(A.bracketR),e.key;e.computed=!1}return e.key=this.type===A.num||this.type===A.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Ee.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Ee.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)|X|(n?$:0)),this.expect(A.parenL),r.params=this.parseBindingList(A.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")},Ee.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(ee(n,!1)|q),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")},Ee.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==A.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()},Ee.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if("Identifier"!==n[t].type)return!1;return!0},Ee.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)}},Ee.parseExprList=function(e,t,n,r){for(var i=[],o=!0;!this.eat(e);){if(o)o=!1;else if(this.expect(A.comma),t&&this.afterTrailingComma(e))break;var a=void 0;n&&this.type===A.comma?a=null:this.type===A.ellipsis?(a=this.parseSpread(r),r&&this.type===A.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):a=this.parseMaybeAssign(!1,r),i.push(a)}return i},Ee.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"))},Ee.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},Ee.parseIdentNode=function(){var e=this.startNode();return this.type===A.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=A.name):this.unexpected(),e},Ee.parsePrivateIdent=function(){var e=this.startNode();return this.type===A.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},Ee.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===A.semi||this.canInsertSemicolon()||this.type!==A.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(A.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},Ee.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 De=se.prototype;De.raise=function(e,t){var n=R(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},De.raiseRecoverable=De.raise,De.curPosition=function(){if(this.options.locations)return new N(this.curLine,this.pos-this.lineStart)};var Pe=se.prototype,Ie=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Pe.enterScope=function(e){this.scopeStack.push(new Ie(e))},Pe.exitScope=function(){this.scopeStack.pop()},Pe.treatFunctionsAsVarInScope=function(e){return e.flags&V||!this.inModule&&e.flags&H},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&H&&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&Y&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&H&&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&q))return t}};var Fe=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new j(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Le=se.prototype;function ze(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}Le.startNode=function(){return new Fe(this,this.start,this.startLoc)},Le.startNodeAt=function(e,t){return new Fe(this,e,t)},Le.finishNode=function(e,t){return ze.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Le.finishNodeAt=function(e,t,n,r){return ze.call(this,e,t,n,r)},Le.copyNode=function(e){var t=new Fe(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Oe="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",Ne=Oe+" Extended_Pictographic",je=Ne+" EBase EComp EMod EPres ExtPict",Re={9:Oe,10:Ne,11:Ne,12:je,13:je,14:je},Me={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"},Be="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",He=Ue+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ve=He+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ge=Ve+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ke={9:We,10:Ue,11:He,12:Ve,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"},qe={};function Ye(e){var t=qe[e]={binary:L(Re[e]+" "+Be),binaryOfStrings:L(Me[e]),nonBinary:{General_Category:L(Be),Script:L(Ke[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 Xe=0,$e=[9,10,11,12,13,14];Xe<$e.length;Xe+=1)Ye($e[Xe]);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=qe[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+=z(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+=z(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=z(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()&&!gt(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,ut=2;function ct(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)||gt(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 mt(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 gt(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(ct(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===ut&&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)?ut:void e.raise("Invalid property name")},Je.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";dt(t=e.current());)e.lastStringValue+=z(t),e.advance();return""!==e.lastStringValue},Je.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";ht(t=e.current());)e.lastStringValue+=z(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===ut&&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===ut&&(n=ut);for(var r=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?t!==ut&&(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===ut&&(n=ut)}},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===ut&&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)===ut&&(t=ut);return t},Je.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?lt:ut},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!!mt(t)&&(e.lastIntValue=t,e.advance(),!0)},Je.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!gt(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;gt(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 At=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new j(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},xt=se.prototype;function wt(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function kt(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 At(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 At(this)},"undefined"!=typeof Symbol&&(xt[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===A.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(A.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=S(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&&!k(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&&E.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(A.ellipsis)):(++this.pos,this.finishToken(A.dot))},xt.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(A.assign,2):this.finishOp(A.slash,1)},xt.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?A.star:A.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=A.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(A.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(A.assign,3):this.finishOp(124===e?A.logicalOR:A.logicalAND,2):61===t?this.finishOp(A.assign,2):this.finishOp(124===e?A.bitwiseOR:A.bitwiseAND,1)},xt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(A.assign,2):this.finishOp(A.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(A.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(A.assign,2):this.finishOp(A.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(A.assign,n+1):this.finishOp(A.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(A.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(A.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(A.arrow)):this.finishOp(61===e?A.eq:A.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(A.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(A.assign,3):this.finishOp(A.coalesce,2)}return this.finishOp(A.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(A.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+z(e)+"'")},xt.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(A.parenL);case 41:return++this.pos,this.finishToken(A.parenR);case 59:return++this.pos,this.finishToken(A.semi);case 44:return++this.pos,this.finishToken(A.comma);case 91:return++this.pos,this.finishToken(A.bracketL);case 93:return++this.pos,this.finishToken(A.bracketR);case 123:return++this.pos,this.finishToken(A.braceL);case 125:return++this.pos,this.finishToken(A.braceR);case 58:return++this.pos,this.finishToken(A.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(A.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(A.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+z(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(A.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,u=null==t?1/0:t;l<u;++l,++this.pos){var c=this.input.charCodeAt(this.pos),d=void 0;if(r&&95===c)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=c;else{if((d=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=e)break;s=c,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=kt(this.input.slice(t,this.pos)),++this.pos):h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(A.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=kt(this.input.slice(t,this.pos));return++this.pos,h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(A.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=wt(this.input.slice(t,this.pos),n);return this.finishToken(A.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)):(k(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(A.string,t)};var St={};xt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==St)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},xt.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw St;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!==A.template&&this.type!==A.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(A.template,e)):36===n?(this.pos+=2,this.finishToken(A.dollarBraceL)):(++this.pos,this.finishToken(A.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(k(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(A.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 z(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 k(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+=z(a),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},xt.readWord=function(){var e=this.readWord1(),t=A.name;return this.keywords.test(e)&&(t=y[e]),this.finishToken(t,e)};var Et="8.15.0";function Ct(e,t){return se.parse(e,t)}function _t(e,t,n){return se.parseExpressionAt(e,t,n)}function Tt(e,t){return se.tokenizer(e,t)}se.acorn={Parser:se,version:Et,defaultOptions:M,Position:N,SourceLocation:j,getLineInfo:R,Node:Fe,TokenType:f,tokTypes:A,keywordTypes:y,TokContext:we,tokContexts:ke,isIdentifierChar:p,isIdentifierStart:h,Token:At,isNewLine:k,lineBreak:x,lineBreakG:w,nonASCIIwhitespace:E},e.Node=Fe,e.Parser=se,e.Position=N,e.SourceLocation=j,e.TokContext=we,e.Token=At,e.TokenType=f,e.defaultOptions=M,e.getLineInfo=R,e.isIdentifierChar=p,e.isIdentifierStart=h,e.isNewLine=k,e.keywordTypes=y,e.lineBreak=x,e.lineBreakG=w,e.nonASCIIwhitespace=E,e.parse=Ct,e.parseExpressionAt=_t,e.tokContexts=ke,e.tokTypes=A,e.tokenizer=Tt,e.version=Et}(t)},8338(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(7461).A},8340(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},8379(e,t,n){e.exports=n(2615)()},8442(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(8581)},8514(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(5950)},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)},8711(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(4849).A},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 u=Object.defineProperty,c=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=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<a.length;++g){var v=a[g];if(!(o[v]||r&&r[v]||m&&m[v]||s&&s[v])){var y=h(n,v);try{u(t,v,y)}catch(e){}}}}return t}},8756(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},8839(e,t,n){"use strict";n.d(t,{E:()=>a,A:()=>s});var r=n(8661);const i={};const o=[];class a{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new a}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function s(){const e=function(e,t){const n=r.useRef(i);return n.current===i&&(n.current=e(t)),n}(a.create).current;var t;return t=e.disposeEffect,r.useEffect(t,o),e}},8853(e,t,n){"use strict";n.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>o});var r=n(6175),i=n(2680);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,u=e=>{if(null==e[t])return null;const u=e[t],c=o(e.theme,s)||{};return(0,i.NI)(e,u,e=>{let i=a(c,l,e);return e===i&&"string"==typeof e&&(i=a(c,l,"".concat(t).concat("default"===e?"":(0,r.A)(e)),e)),!1===n?i:{[n]:i}})};return u.propTypes={},u.filterProps=[t],u}},8898(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},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})},8930(e,t,n){"use strict";n.d(t,{Bb:()=>F,C$:()=>k,FX:()=>L,Fb:()=>z,GY:()=>j,IG:()=>y,Kl:()=>T,Qg:()=>E,Sh:()=>P,Sn:()=>D,VX:()=>S,Xn:()=>O,Zu:()=>I,aA:()=>_,lk:()=>C,pK:()=>N,runDataMigration:()=>w});var r=n(4107),i=n(9992),o=n(252),a=n(1223),s=n(4181),l=n(1166),u=n(2375);function c(){return{setValue:(0,u.uP)("setValue","GM_setValue",[window.KISS_GM]),getValue:(0,u.uP)("getValue","GM_getValue",[window.KISS_GM]),deleteValue:(0,u.uP)("deleteValue","GM_deleteValue",[window.KISS_GM])}}async function d(e,t){o.aQ?await a.T.storage.local.set({[e]:t}):o.Zy?await c().setValue(e,t):window.localStorage.setItem(e,t)}async function h(e){if(o.aQ){return(await a.T.storage.local.get([e]))[e]}if(o.Zy){return await c().getValue(e)}return window.localStorage.getItem(e)}async function p(e){o.aQ?await a.T.storage.local.remove([e]):o.Zy?await c().deleteValue(e):window.localStorage.removeItem(e)}async function f(e,t){await d(e,JSON.stringify(t))}async function m(e,t){await h(e)||await f(e,t)}async function g(e){const t=await h(e);if(null==t)return null;try{return JSON.parse(t)}catch(t){(0,s.h9)("parse json in storage err: ",e)}return null}async function v(e,t){var n;const i=null!==(n=await g(e))&&void 0!==n?n:{};await f(e,(0,r.A)((0,r.A)({},i),t))}const y={get:h,set:d,del:p,setObj:f,trySetObj:m,getObj:g,putObj:v},b=()=>g(i.r$0),A=e=>{var t;const n=(0,r.A)((0,r.A)((0,r.A)({},i.la7),e||{}),{},{tranboxSetting:(0,r.A)((0,r.A)({},i.Azs),(null==e?void 0:e.tranboxSetting)||{}),version:null!==(t=null==e?void 0:e.version)&&void 0!==t?t:i.la7.version});return(0,r.A)((0,r.A)({},n),{},{transApis:(0,i.lWF)(n.transApis)})},x=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return(0,i.Vnn)(e)>=i.uMq?e:(await(e=>f(i.rKK,e))(t),(0,i.SEs)(e))},w=async()=>{const e=await b();if(e&&(0,i.Vnn)(e)<i.xoZ)try{const t=await x(e,e),n=(0,i.cPn)(t);await f(i.r$0,n),(0,s.h9)("Migration to V".concat(i.xoZ," completed."))}catch(e){(0,s.h9)("Data migration to V".concat(i.xoZ," failed:"),e)}},k=async()=>{const e=await b();if(!e)return A(i.la7);const t=(0,i.Vnn)(e)<i.xoZ?(0,i.cPn)(e):e;return A(t)},S=async()=>await g(i.iPC)||i.ckw,E=e=>f(i.iPC,e),C=async()=>await g(i.CWU)||{},_=e=>f(i.CWU,e),T=e=>g(i.JCj+e),D=(e,t)=>f(i.JCj+e,t),P=async e=>{if(!e)return[];const t=await g(i.yDM);if(!t)return[];if("object"==typeof t){const n=t[e];return Array.isArray(n)?n:[]}return[]},I=async()=>await g(i.yi6)||{},F=e=>v(i.yi6,e),L=()=>g(i.VFS),z=(0,l.sg)(e=>v(i.VFS,e),300),O=async()=>await g(i.eCV)||i.eeL,N=e=>v(i.eCV,e),j=(0,l.sg)(async e=>{const{syncMeta:t={}}=await O();t[e]=(0,r.A)((0,r.A)({},t[e]||{}),{},{updateAt:Date.now()}),await N({syncMeta:t})},300)},9127(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},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 u=Function.call.bind(Object.prototype.hasOwnProperty);const c=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(u(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&&(u(t,o)||u(n,o)))d=c(d,t[o],n[o]);else{if(!u(n,"*"))return Object.defineProperty(r,o,{configurable:!0,enumerable:!0,get:()=>e[o],set(t){e[o]=t}}),d;d=c(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=c(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 u=!0!==a&&i(a);if(!0!==a&&!u&&!s)return!1;const c=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 c(u?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)},m=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)})},g={devtools:{network:{onRequestFinished:d(h)}},runtime:{onMessage:d(p),onMessageExternal:d(p),sendMessage:m.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:m.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}},c(e,g,n)};e.exports=n(chrome)}else e.exports=globalThis.browser},void 0===(i="function"==typeof n?n.apply(t,r):n)||(e.exports=i)},9311(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),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")},9371(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(8154);function i(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},9385(e,t,n){"use strict";n.d(t,{Ir:()=>a,Tt:()=>s});var r=n(6604);const i=["zh","ja","ko","th","lo","km","my"];function o(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto";return e.slice(t,n+1).map(e=>String((null==e?void 0:e.text)||"").trim()).filter(Boolean).join(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return i.some(t=>String(e).startsWith(t))}(r)?"":" ").trim()}function a(e,t,n){var i,a,s;let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto";const u=Number(null!==(i=null==e?void 0:e.e)&&void 0!==i?i:null==e?void 0:e.end_id);if(!Number.isInteger(u)||!Number.isInteger(n)||n<0||u<n||u>=t.length)return null;const c=o(t,n,u,l);if(!c)return null;const d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,r.b)(e)}(c)?c:String(null!==(a=null!==(s=null==e?void 0:e.t)&&void 0!==s?s:null==e?void 0:e.translation)&&void 0!==a?a:"");return{start:t[n].start,end:t[u].end,text:c,translation:d,_si:n,_ei:u}}const s=e=>e&&(Object.prototype.hasOwnProperty.call(e,"s")||Object.prototype.hasOwnProperty.call(e,"start_id"))},9476(e,t,n){"use strict";function r(e){return r="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},r(e)}n.d(t,{A:()=>r})},9669(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},9682(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),u=Object.keys(l);function c(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=u.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[u[i]]?t[u[i]]:r)-a/100).concat(n,")")}return(0,i.A)({keys:u,values:l,up:c,down:d,between:h,only:function(e){return u.indexOf(e)+1<u.length?h(e,u[u.indexOf(e)+1]):c(e)},not:function(e){const t=u.indexOf(e);return 0===t?c(u[1]):t===u.length-1?d(u[t]):h(e,u[u.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},s)}},9718(e,t,n){"use strict";n.d(t,{A:()=>z});var r=n(1464),i=n(8853),o=n(7304);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(2680);function l(e){return"number"!=typeof e?e:"".concat(e,"px solid")}function u(e,t){return(0,i.Ay)({prop:e,themeKey:"borders",transform:t})}const c=u("border",l),d=u("borderTop",l),h=u("borderRight",l),p=u("borderBottom",l),f=u("borderLeft",l),m=u("borderColor"),g=u("borderTopColor"),v=u("borderRightColor"),y=u("borderBottomColor"),b=u("borderLeftColor"),A=u("outline",l),x=u("outlineColor"),w=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};w.propTypes={},w.filterProps=["borderRadius"];a(c,d,h,p,f,m,g,v,y,b,w,A,x);const k=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};k.propTypes={},k.filterProps=["gap"];const S=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};S.propTypes={},S.filterProps=["columnGap"];const E=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};E.propTypes={},E.filterProps=["rowGap"];a(k,S,E,(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 C(e,t){return"grey"===t?t:e}a((0,i.Ay)({prop:"color",themeKey:"palette",transform:C}),(0,i.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:C}),(0,i.Ay)({prop:"backgroundColor",themeKey:"palette",transform:C}));function _(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const T=(0,i.Ay)({prop:"width",transform:_}),D=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:_(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};D.filterProps=["maxWidth"];const P=(0,i.Ay)({prop:"minWidth",transform:_}),I=(0,i.Ay)({prop:"height",transform:_}),F=(0,i.Ay)({prop:"maxHeight",transform:_}),L=(0,i.Ay)({prop:"minHeight",transform:_}),z=((0,i.Ay)({prop:"size",cssProperty:"width",transform:_}),(0,i.Ay)({prop:"size",cssProperty:"height",transform:_}),a(T,D,P,I,F,L,(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:w},color:{themeKey:"palette",transform:C},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:C},backgroundColor:{themeKey:"palette",transform:C},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:k},rowGap:{style:E},columnGap:{style:S},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:_},maxWidth:{style:D},minWidth:{transform:_},height:{transform:_},maxHeight:{transform:_},minHeight:{transform:_},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},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,u=n?Symbol.for("react.context"):60110,c=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,m=n?Symbol.for("react.memo"):60115,g=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,A=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 c:case d:case o:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case u:case h:case g:case m:case l:return e;default:return t}}case i:return t}}}function w(e){return x(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return w(e)||x(e)===c},t.isConcurrentMode=w,t.isContextConsumer=function(e){return x(e)===u},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)===g},t.isMemo=function(e){return x(e)===m},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===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===A||e.$$typeof===v)},t.typeOf=x},9793(e,t,n){"use strict";n.d(t,{Fz:()=>w,aU:()=>S});var r=n(4107),i=n(3073),o=n(1533),a=n(9992),s=n(4181),l=(0,o.A)("pool"),u=(0,o.A)("maxRetry"),c=(0,o.A)("retryInterval"),d=(0,o.A)("limit"),h=(0,o.A)("interval"),p=(0,o.A)("currentConcurrent"),f=(0,o.A)("lastExecutionTime"),m=(0,o.A)("schedulerTimer"),g=(0,o.A)("scheduleNext"),v=(0,o.A)("execute");class y{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.jy$,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.PPd,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;Object.defineProperty(this,v,{value:A}),Object.defineProperty(this,g,{value:b}),Object.defineProperty(this,l,{writable:!0,value:[]}),Object.defineProperty(this,u,{writable:!0,value:2}),Object.defineProperty(this,c,{writable:!0,value:1e3}),Object.defineProperty(this,d,{writable:!0,value:void 0}),Object.defineProperty(this,h,{writable:!0,value:void 0}),Object.defineProperty(this,p,{writable:!0,value:0}),Object.defineProperty(this,f,{writable:!0,value:0}),Object.defineProperty(this,m,{writable:!0,value:null}),(0,i.A)(this,h)[h]=e,(0,i.A)(this,d)[d]=t,(0,i.A)(this,c)[c]=n}push(e,t){return new Promise((n,r)=>{(0,i.A)(this,l)[l].push({fn:e,args:t,resolve:n,reject:r,retry:0}),(0,i.A)(this,g)[g]()})}update(e,t){e>=0&&((0,i.A)(this,h)[h]=e),t>=1&&((0,i.A)(this,d)[d]=t),(0,i.A)(this,g)[g]()}clear(){for(const e of(0,i.A)(this,l)[l])e.reject("the task pool was cleared");(0,i.A)(this,l)[l].length=0,(0,i.A)(this,m)[m]&&(clearTimeout((0,i.A)(this,m)[m]),(0,i.A)(this,m)[m]=null)}}function b(){if((0,i.A)(this,m)[m])return;if((0,i.A)(this,p)[p]>=(0,i.A)(this,d)[d]||0===(0,i.A)(this,l)[l].length)return;const e=Date.now()-(0,i.A)(this,f)[f],t=Math.max(0,(0,i.A)(this,h)[h]-e);(0,i.A)(this,m)[m]=setTimeout(()=>{if((0,i.A)(this,m)[m]=null,(0,i.A)(this,p)[p]<(0,i.A)(this,d)[d]&&(0,i.A)(this,l)[l].length>0){const e=(0,i.A)(this,l)[l].shift();e&&((0,i.A)(this,f)[f]=Date.now(),(0,i.A)(this,v)[v](e))}(0,i.A)(this,l)[l].length>0&&(0,i.A)(this,g)[g]()},t)}async function A(e){(0,i.A)(this,p)[p]++;const{fn:t,args:n,resolve:o,reject:a,retry:d}=e;try{o(await t(n))}catch(t){(0,s.h9)("task pool",t),d<(0,i.A)(this,u)[u]?setTimeout(()=>{(0,i.A)(this,l)[l].unshift((0,r.A)((0,r.A)({},e),{},{retry:d+1})),(0,i.A)(this,g)[g]()},(0,i.A)(this,c)[c]):a(t)}finally{(0,i.A)(this,p)[p]--,(0,i.A)(this,g)[g]()}}let x;const w=(e,t)=>(x?e&&t&&k(e,t):x=new y(null!=e?e:a.jy$,null!=t?t:a.PPd),x),k=(e,t)=>{var n;null===(n=x)||void 0===n||n.update(e,t)},S=()=>{var e;null===(e=x)||void 0===e||e.clear()}},9894(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(9669).A},9992(e,t,n){"use strict";n.d(t,{sNP:()=>c.sN,Reo:()=>o,jM6:()=>i,C39:()=>r,Fxm:()=>c.Fx,bzl:()=>j,PT8:()=>K,vGH:()=>X,ojT:()=>q,tPe:()=>Y,n_K:()=>G,xoZ:()=>d.xo,iVS:()=>c.iV,JWB:()=>c.JW,bqx:()=>c.bq,WTh:()=>c.WT,jgE:()=>c.jg,$kn:()=>R,OTD:()=>u.OT,w62:()=>c.w6,jy$:()=>c.jy,PPd:()=>c.PP,$Kd:()=>c.$K,AFg:()=>h.AF,ue1:()=>h.ue,ya_:()=>h.y,NGo:()=>u.NG,ckw:()=>u.ck,la7:()=>h.l,eeL:()=>h.ee,Azs:()=>h.Az,qxj:()=>$,KDu:()=>V.KD,nRB:()=>V.nR,XRX:()=>V.XR,iPL:()=>c.iP,WL9:()=>u.WL,lNu:()=>u.lN,THG:()=>w,xhA:()=>c.xh,yDH:()=>c.yD,Qfh:()=>c.Qf,L32:()=>c.L3,S6X:()=>c.S6,xfV:()=>c.xf,b9x:()=>c.b9,snk:()=>c.sn,X6r:()=>c.X6,Ymt:()=>c.Ym,fDS:()=>c.fD,S6q:()=>c.zJ,Wdi:()=>c.Wd,Ed3:()=>S,r1p:()=>_,XEV:()=>C,sgk:()=>E,cO5:()=>V.cO,J4u:()=>V.J4,Eev:()=>V.Ee,K8D:()=>V.K8,vLL:()=>V.vL,QzF:()=>V.Qz,wPo:()=>V.wP,k_j:()=>V.k_,mul:()=>V.mu,F_o:()=>V.F_,kYB:()=>V.kY,GRp:()=>V.GR,grg:()=>V.gr,j7m:()=>V.j7,x2F:()=>V.x2,Mai:()=>V.M,n10:()=>V.n1,EWA:()=>V.EW,IaM:()=>V.I,Rfh:()=>V.Rf,u2k:()=>V.u2,DCB:()=>V.DC,_TK:()=>V._T,_Vq:()=>V._V,km2:()=>V.km,F$3:()=>c.F$,GDU:()=>c.GD,q77:()=>c.q7,dyy:()=>c.dy,moZ:()=>h.mo,Nol:()=>h.No,Jg9:()=>h.Jg,AXe:()=>u.AX,p1w:()=>u.p1,vwl:()=>u.vw,Gie:()=>u.Gi,axl:()=>h.ax,eUB:()=>h.eU,HHP:()=>c.HH,G8K:()=>c.G8,vH2:()=>c.vH,UF6:()=>c.UF,XvU:()=>c.Xv,tok:()=>c.to,Z2L:()=>c.Z2,eA2:()=>c.eA,i8R:()=>c.i8,mSZ:()=>c.mS,$QD:()=>c.$Q,k0k:()=>c.k0,H74:()=>h.H7,aqb:()=>h.aq,CxD:()=>h.Cx,T2s:()=>h.T2,IFN:()=>h.IF,yzF:()=>h.yz,_E_:()=>u._E,TWY:()=>u.TW,J5R:()=>u.J5,a7S:()=>u.a7,VEm:()=>J.VE,SXq:()=>J.SX,Rrc:()=>J.Rr,WDZ:()=>J.WD,msE:()=>J.ms,hrO:()=>J.hr,TYN:()=>J.TY,As$:()=>J.As,$ET:()=>J.$E,EDO:()=>J.ED,HzO:()=>J.Hz,ea4:()=>J.e,zMP:()=>J.zM,VfS:()=>J.Vf,zwp:()=>J.zw,nsG:()=>J.ns,QsO:()=>J.Qs,_sN:()=>J._s,O09:()=>c.O0,SQ0:()=>c.SQ,JIP:()=>c.JI,s1S:()=>c.s1,EeC:()=>h.Ee,UPC:()=>h.UP,vcx:()=>h.vc,uxg:()=>h.ux,BQZ:()=>h.BQ,fFq:()=>h.fF,VhI:()=>h.Vh,XZv:()=>h.XZ,TPN:()=>h.TP,EjO:()=>c.Ej,FS6:()=>c.FS,xN$:()=>c.xN,h8v:()=>c.h8,NQu:()=>c.NQ,EsI:()=>c.Es,bNe:()=>c.bN,fqf:()=>c.fq,e70:()=>c.e7,An9:()=>c.An,c0T:()=>c.c0,KBl:()=>c.KB,lbn:()=>c.lb,lLy:()=>c.lL,kYm:()=>c.kY,bCM:()=>c.bC,ul7:()=>c.ul,brj:()=>c.br,kXF:()=>c.kX,edy:()=>c.ed,C3L:()=>c.C3,rUY:()=>c.rU,dGW:()=>c.dG,mmp:()=>c.mm,IEe:()=>c.IE,FsV:()=>c.Fs,fFW:()=>c.fF,UFr:()=>c.Bi,F16:()=>c.F1,ZIc:()=>c.ZI,zCg:()=>c.zC,cbe:()=>c.cb,sRu:()=>V.sR,Qs8:()=>d.Qs,uMq:()=>d.uM,yDM:()=>N,yi6:()=>L,iPC:()=>P,JCj:()=>O,r$0:()=>T,rKK:()=>D,eCV:()=>F,VFS:()=>z,CWU:()=>I,fSx:()=>l,VwZ:()=>s,yCU:()=>c.yC,aZh:()=>W,Hy8:()=>H,CQi:()=>U,W26:()=>B,N8G:()=>M,fkE:()=>c.fk,$1M:()=>c.$1,EEo:()=>c.EE,U$w:()=>c.U$,loo:()=>c.lo,WwB:()=>c.Ww,adh:()=>c.ad,Es_:()=>d.Es,Vnn:()=>d.Vn,qKR:()=>c.qK,SEs:()=>d.zh,cPn:()=>d.cP,BM1:()=>k,lWF:()=>c.lW,HO1:()=>c.HO,JqB:()=>c.Jq,Pco:()=>d.Pc});const r="KISS Translator".trim().split(/\s+/).join("-"),i=r.toLowerCase(),o=(r.toUpperCase(),{fabID:"".concat(i,"-fab"),boxID:"".concat(i,"-box"),popupID:"".concat(i,"-popup")}),a="2.0.32".split("."),s="light",l="dark";var u=n(7306),c=n(5493),d=n(4307),h=n(3565),p=n(4107);const f='["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',m='// 请求数据默认格式\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(f,"\n"),g='// 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(f,"\n"),v="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}",y="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}",b='// 請求資料預設格式\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(f,"\n"),A=(e,t,n,r,i,o,a)=>({zh:e,en:t,zh_TW:n,ja:r,ko:i,tr:o,vi:a}),x={playground_text_translation:A("文本翻译","Text translation","文字翻譯","テキスト翻訳","텍스트 번역","Metin çevirisi","Dịch văn bản"),playground_merge_single_line_breaks:A("合并单个换行(保留段落)","Merge single line breaks (preserve paragraphs)","合併單個換行(保留段落)","単一改行を結合(段落は保持)","단일 줄바꿈 병합(문단 유지)","Tek satır sonlarını birleştir (paragrafları koru)","Gộp ngắt dòng đơn (giữ đoạn)"),subtitle_segmentation:A("字幕断句","Subtitle segmentation","字幕斷句","字幕分割","자막 분할","Altyazı bölümleme","Phân đoạn phụ đề"),subtitle_playground_invalid_events:A("字幕文件没有有效的 events 数组","The subtitle file has no valid events array","字幕檔案沒有有效的 events 陣列","字幕ファイルに有効な events 配列がありません","자막 파일에 유효한 events 배열이 없습니다","Altyazı dosyasında geçerli bir events dizisi yok","Tệp phụ đề không có mảng events hợp lệ"),subtitle_playground_event_limit:A("字幕事件数量不能超过 {max}","Subtitle events cannot exceed {max}","字幕事件數量不能超過 {max}","字幕イベント数は {max} を超えられません","자막 이벤트 수는 {max}개를 초과할 수 없습니다","Altyazı olayı sayısı {max} değerini aşamaz","Số sự kiện phụ đề không được vượt quá {max}"),subtitle_playground_missing_segments:A("字幕文件缺少 YouTube json3 的 segs 数据","The subtitle file is missing YouTube json3 segs data","字幕檔案缺少 YouTube json3 的 segs 資料","字幕ファイルに YouTube json3 の segs データがありません","자막 파일에 YouTube json3 segs 데이터가 없습니다","Altyazı dosyasında YouTube json3 segs verisi yok","Tệp phụ đề thiếu dữ liệu segs YouTube json3"),subtitle_playground_remote_size_invalid:A("远程字幕样本大小校验失败","Remote subtitle sample size validation failed","遠端字幕樣本大小驗證失敗","リモート字幕サンプルのサイズ検証に失敗しました","원격 자막 샘플 크기 검증에 실패했습니다","Uzak altyazı örneği boyut doğrulaması başarısız","Xác thực kích thước mẫu phụ đề từ xa thất bại"),subtitle_playground_remote_hash_invalid:A("远程字幕样本哈希校验失败","Remote subtitle sample hash validation failed","遠端字幕樣本雜湊驗證失敗","リモート字幕サンプルのハッシュ検証に失敗しました","원격 자막 샘플 해시 검증에 실패했습니다","Uzak altyazı örneği karma doğrulaması başarısız","Xác thực hash mẫu phụ đề từ xa thất bại"),subtitle_playground_remote_index_failed:A("远程字幕样本索引加载失败,可以继续上传本地 JSON","Failed to load the remote sample index. You can still upload a local JSON file","遠端字幕樣本索引載入失敗,仍可上傳本機 JSON","リモート字幕サンプルの索引を読み込めませんでした。ローカル JSON は引き続きアップロードできます","원격 자막 샘플 색인을 불러오지 못했습니다. 로컬 JSON은 계속 업로드할 수 있습니다","Uzak örnek dizini yüklenemedi. Yerel bir JSON dosyası yükleyebilirsiniz","Không tải được chỉ mục mẫu từ xa. Bạn vẫn có thể tải lên tệp JSON cục bộ"),subtitle_playground_sample_load_failed:A("字幕样本加载失败:{message}","Failed to load subtitle sample: {message}","字幕樣本載入失敗:{message}","字幕サンプルの読み込みに失敗しました:{message}","자막 샘플을 불러오지 못했습니다: {message}","Altyazı örneği yüklenemedi: {message}","Không tải được mẫu phụ đề: {message}"),subtitle_playground_file_too_large:A("字幕文件不能超过 10MB","The subtitle file cannot exceed 10 MB","字幕檔案不能超過 10MB","字幕ファイルは 10 MB を超えられません","자막 파일은 10MB를 초과할 수 없습니다","Altyazı dosyası 10 MB'ı aşamaz","Tệp phụ đề không được vượt quá 10 MB"),subtitle_playground_file_parse_failed:A("字幕文件解析失败:{message}","Failed to parse subtitle file: {message}","字幕檔案解析失敗:{message}","字幕ファイルの解析に失敗しました:{message}","자막 파일을 분석하지 못했습니다: {message}","Altyazı dosyası ayrıştırılamadı: {message}","Không phân tích được tệp phụ đề: {message}"),subtitle_playground_ai_confirm_title:A("发送 AI 断句请求","Send AI segmentation requests","傳送 AI 斷句請求","AI 字幕分割リクエストを送信","AI 자막 분할 요청 보내기","AI bölümleme isteklerini gönder","Gửi yêu cầu phân đoạn AI"),subtitle_playground_ai_confirm_message:A("将使用 {api} / {model} 发送约 {count} 个字幕请求。样本文本会发送到当前 AI 服务。","About {count} subtitle requests will be sent using {api} / {model}. The sample text will be sent to the current AI service.","將使用 {api} / {model} 傳送約 {count} 個字幕請求。樣本文字會傳送到目前的 AI 服務。","{api} / {model} を使用して約 {count} 件の字幕リクエストを送信します。サンプルテキストは現在の AI サービスに送信されます。","{api} / {model}을 사용해 약 {count}개의 자막 요청을 보냅니다. 샘플 텍스트가 현재 AI 서비스로 전송됩니다.","{api} / {model} kullanılarak yaklaşık {count} altyazı isteği gönderilecek. Örnek metin mevcut AI hizmetine gönderilecektir.","Khoảng {count} yêu cầu phụ đề sẽ được gửi bằng {api} / {model}. Văn bản mẫu sẽ được gửi đến dịch vụ AI hiện tại."),subtitle_playground_default_model:A("默认模型","Default model","預設模型","既定のモデル","기본 모델","Varsayılan model","Mô hình mặc định"),subtitle_playground_continue:A("继续","Continue","繼續","続行","계속","Devam","Tiếp tục"),subtitle_playground_test_failed:A("字幕断句失败:{message}","Subtitle segmentation failed: {message}","字幕斷句失敗:{message}","字幕分割に失敗しました:{message}","자막 분할에 실패했습니다: {message}","Altyazı bölümleme başarısız: {message}","Phân đoạn phụ đề thất bại: {message}"),subtitle_playground_prompt_global:A("全局字幕设置","Global subtitle settings","全域字幕設定","グローバル字幕設定","전역 자막 설정","Genel altyazı ayarları","Cài đặt phụ đề toàn cục"),subtitle_playground_prompt_preset:A("接口预设","API preset","介面預設","API プリセット","API 프리셋","API ön ayarı","Cài sẵn API"),subtitle_playground_prompt_custom:A("接口自定义","API custom","介面自訂","API カスタム","API 사용자 지정","Özel API","API tùy chỉnh"),subtitle_playground_config_title:A("当前生效的断句配置","Active segmentation configuration","目前生效的斷句設定","現在有効な字幕分割設定","현재 적용 중인 자막 분할 설정","Etkin bölümleme yapılandırması","Cấu hình phân đoạn đang hoạt động"),subtitle_playground_mode:A("模式","Mode","模式","モード","모드","Mod","Chế độ"),subtitle_playground_api:A("API","API","API","API","API","API","API"),subtitle_playground_type_model:A("类型 / 模型","Type / model","類型 / 模型","タイプ / モデル","유형 / 모델","Tür / model","Loại / mô hình"),subtitle_playground_prompt:A("提示词","Prompt","提示詞","プロンプト","프롬프트","İstem","Lời nhắc"),subtitle_playground_api_default:A("接口默认","API default","介面預設","API の既定値","API 기본값","API varsayılanı","Mặc định API"),subtitle_playground_prompt_value:A("{prompt}({source})","{prompt} ({source})","{prompt}({source})","{prompt}({source})","{prompt} ({source})","{prompt} ({source})","{prompt} ({source})"),subtitle_playground_chunk_length:A("Chunk 长度","Chunk length","Chunk 長度","チャンク長","청크 길이","Parça uzunluğu","Độ dài đoạn"),subtitle_playground_estimated_chunks:A("预计 Chunk","Estimated chunks","預估 Chunk","推定チャンク数","예상 청크 수","Tahmini parça sayısı","Số đoạn ước tính"),subtitle_playground_target_language:A("目标语言","Target language","目標語言","翻訳先言語","대상 언어","Hedef dil","Ngôn ngữ đích"),subtitle_playground_streaming:A("流式","Streaming","串流","ストリーミング","스트리밍","Akış","Truyền trực tuyến"),subtitle_playground_enabled:A("启用","Enabled","啟用","有効","사용","Etkin","Đã bật"),subtitle_playground_disabled:A("关闭","Disabled","關閉","無効","사용 안 함","Devre dışı","Đã tắt"),subtitle_playground_protocol:A("协议","Protocol","協定","プロトコル","프로토콜","Protokol","Giao thức"),subtitle_playground_legacy_compatible:A("兼容旧协议","Legacy protocol compatible","相容舊協定","旧プロトコル互換","이전 프로토콜 호환","Eski protokolle uyumlu","Tương thích giao thức cũ"),subtitle_playground_protocol_value:A("{protocol}({compatibility})","{protocol} ({compatibility})","{protocol}({compatibility})","{protocol}({compatibility})","{protocol} ({compatibility})","{protocol} ({compatibility})","{protocol} ({compatibility})"),subtitle_playground_statistical_mode:A("统计断句","Statistical segmentation","統計斷句","統計的字幕分割","통계 자막 분할","İstatistiksel bölümleme","Phân đoạn thống kê"),subtitle_playground_rule_mode:A("规则断句","Rule-based segmentation","規則斷句","ルールベース字幕分割","규칙 기반 자막 분할","Kural tabanlı bölümleme","Phân đoạn theo quy tắc"),subtitle_playground_max_duration:A("最大时长","Maximum duration","最長時長","最大時間","최대 길이","Azami süre","Thời lượng tối đa"),subtitle_playground_max_words:A("最大词数","Maximum words","最多詞數","最大単語数","최대 단어 수","Azami kelime","Số từ tối đa"),subtitle_playground_min_boundary_score:A("最小边界评分","Minimum boundary score","最小邊界分數","最小境界スコア","최소 경계 점수","Asgari sınır puanı","Điểm ranh giới tối thiểu"),subtitle_playground_min_sentence_words:A("最小句子词数","Minimum sentence words","最少句子詞數","文の最小単語数","문장 최소 단어 수","Asgari cümle kelimesi","Số từ câu tối thiểu"),subtitle_playground_source_language:A("源语言","Source language","來源語言","元言語","원본 언어","Kaynak dil","Ngôn ngữ nguồn"),subtitle_playground_source_language_label:A("字幕源语言","Subtitle source language","字幕來源語言","字幕の元言語","자막 원본 언어","Altyazı kaynak dili","Ngôn ngữ nguồn phụ đề"),subtitle_playground_language_required:A("规则和统计断句不支持 AutoDetect,请选择具体的字幕源语言。","Rule-based and statistical segmentation do not support AutoDetect. Select a specific subtitle source language.","規則和統計斷句不支援 AutoDetect,請選擇具體的字幕來源語言。","ルールおよび統計的字幕分割では AutoDetect を使用できません。字幕の元言語を選択してください。","규칙 및 통계 자막 분할은 AutoDetect를 지원하지 않습니다. 자막 원본 언어를 선택하세요.","Kural tabanlı ve istatistiksel bölümleme AutoDetect'i desteklemez. Belirli bir altyazı kaynak dili seçin.","Phân đoạn theo quy tắc và thống kê không hỗ trợ Tự động phát hiện. Hãy chọn ngôn ngữ nguồn phụ đề cụ thể."),subtitle_playground_long_sentence_threshold:A("长句阈值","Long-sentence threshold","長句門檻","長文しきい値","긴 문장 임계값","Uzun cümle eşiği","Ngưỡng câu dài"),subtitle_playground_chunk_risk:A("当前 AI Chunk 长度高于推荐默认值 1000,长输入可能增加漏句或边界退化风险。","The current AI chunk length exceeds the recommended default of 1000. Long input may increase the risk of missing text or degraded boundaries.","目前 AI Chunk 長度高於建議預設值 1000,長輸入可能增加漏句或邊界退化風險。","現在の AI チャンク長は推奨既定値 1000 を超えています。長い入力では文の欠落や境界精度低下のリスクが高まります。","현재 AI 청크 길이가 권장 기본값 1000보다 큽니다. 긴 입력은 문장 누락이나 경계 품질 저하 위험을 높일 수 있습니다.","Geçerli AI parça uzunluğu önerilen varsayılan 1000 değerini aşıyor. Uzun girdiler eksik metin veya sınır kalitesi düşüşü riskini artırabilir.","Độ dài đoạn AI hiện tại vượt quá mặc định khuyến nghị 1000. Đầu vào dài có thể tăng rủi ro thiếu văn bản hoặc suy giảm ranh giới."),subtitle_playground_builtin_sample:A("内置字幕样本","Built-in subtitle sample","內建字幕樣本","内蔵字幕サンプル","내장 자막 샘플","Yerleşik altyazı örneği","Mẫu phụ đề tích hợp"),subtitle_playground_select_sample:A("请选择远程样本","Select a remote sample","請選擇遠端樣本","リモートサンプルを選択","원격 샘플을 선택하세요","Uzak bir örnek seçin","Chọn mẫu từ xa"),subtitle_playground_upload_json:A("上传 JSON","Upload JSON","上傳 JSON","JSON をアップロード","JSON 업로드","JSON yükle","Tải lên JSON"),subtitle_playground_run:A("运行测试","Run test","執行測試","テストを実行","테스트 실행","Testi çalıştır","Chạy kiểm tra"),subtitle_playground_progress:A("正在处理 Chunk {completed}/{total}","Processing chunk {completed}/{total}","正在處理 Chunk {completed}/{total}","チャンク {completed}/{total} を処理中","청크 처리 중 {completed}/{total}","Parça işleniyor {completed}/{total}","Đang xử lý đoạn {completed}/{total}"),subtitle_playground_source_json:A("原始字幕 JSON","Original subtitle JSON","原始字幕 JSON","元の字幕 JSON","원본 자막 JSON","Orijinal altyazı JSON","JSON phụ đề gốc"),subtitle_playground_result:A("断句结果","Segmentation result","斷句結果","字幕分割結果","자막 분할 결과","Bölümleme sonucu","Kết quả phân đoạn"),subtitle_playground_download:A("下载","Download","下載","ダウンロード","다운로드","İndir","Tải xuống"),subtitle_playground_stats_title:A("断句统计信息","Segmentation statistics","斷句統計資訊","字幕分割の統計","자막 분할 통계","Bölümleme istatistikleri","Thống kê phân đoạn"),subtitle_playground_metric_processing:A("处理耗时","Processing time","處理耗時","処理時間","처리 시간","İşleme süresi","Thời gian xử lý"),subtitle_playground_metric_raw_events:A("原始事件","Raw events","原始事件","元イベント","원본 이벤트","Ham olaylar","Sự kiện thô"),subtitle_playground_metric_canonical_events:A("规范化事件","Canonical events","正規化事件","正規化イベント","정규화 이벤트","Standart olaylar","Sự kiện chuẩn hóa"),subtitle_playground_metric_flat_events:A("Flat Events","Flat events","Flat Events","フラットイベント","플랫 이벤트","Düz olaylar","Sự kiện phẳng"),subtitle_playground_metric_filtered_non_speech:A("已过滤非语音片段","Filtered non-speech segments","已過濾非語音片段","除外した非音声区間","필터링된 비음성 구간","Filtrelenen konuşma dışı bölümler","Đã lọc đoạn không phải lời nói"),subtitle_playground_metric_cues:A("字幕条目","Subtitle cues","字幕項目","字幕キュー","자막 큐","Altyazı öğeleri","Mục phụ đề"),subtitle_playground_metric_source_duration:A("源时间跨度","Source duration","來源時間跨度","元の時間範囲","원본 시간 범위","Kaynak süresi","Thời lượng nguồn"),subtitle_playground_metric_covered_duration:A("覆盖时长","Covered duration","涵蓋時長","カバー時間","포함 시간","Kapsanan süre","Thời lượng bao phủ"),subtitle_playground_metric_text_coverage:A("文本覆盖率","Text coverage","文字涵蓋率","テキスト網羅率","텍스트 포함률","Metin kapsamı","Độ bao phủ văn bản"),subtitle_playground_metric_empty_cues:A("空字幕","Empty cues","空字幕","空の字幕","빈 자막","Boş altyazılar","Mục trống"),subtitle_playground_metric_invalid_cues:A("无效字幕","Invalid cues","無效字幕","無効な字幕","유효하지 않은 자막","Geçersiz altyazılar","Mục không hợp lệ"),subtitle_playground_metric_overlaps:A("时间重叠","Time overlaps","時間重疊","時間の重複","시간 겹침","Zaman çakışmaları","Trùng lặp thời gian"),subtitle_playground_metric_non_monotonic:A("时间倒退","Non-monotonic time","時間倒退","時間の逆行","시간 역행","Geri giden zaman","Thời gian không đơn điệu"),subtitle_playground_metric_missing_text:A("文本遗漏","Missing text","文字遺漏","欠落テキスト","누락 텍스트","Eksik metin","Văn bản thiếu"),subtitle_playground_metric_duplicated_text:A("文本重复","Duplicated text","文字重複","重複テキスト","중복 텍스트","Yinelenen metin","Văn bản trùng lặp"),subtitle_playground_metric_avg_chars:A("平均字符","Average characters","平均字元","平均文字数","평균 문자 수","Ortalama karakter","Ký tự trung bình"),subtitle_playground_metric_p95_chars:A("P95 字符","P95 characters","P95 字元","P95 文字数","P95 문자 수","P95 karakter","Ký tự P95"),subtitle_playground_metric_max_chars:A("最大字符","Maximum characters","最多字元","最大文字数","최대 문자 수","Azami karakter","Ký tự tối đa"),subtitle_playground_metric_avg_words:A("平均词数","Average words","平均詞數","平均単語数","평균 단어 수","Ortalama kelime","Số từ trung bình"),subtitle_playground_metric_p95_words:A("P95 词数","P95 words","P95 詞數","P95 単語数","P95 단어 수","P95 kelime","Số từ P95"),subtitle_playground_metric_max_words:A("最大词数","Maximum words","最多詞數","最大単語数","최대 단어 수","Azami kelime","Số từ tối đa"),subtitle_playground_metric_avg_duration:A("平均时长","Average duration","平均時長","平均時間","평균 길이","Ortalama süre","Thời lượng trung bình"),subtitle_playground_metric_p95_duration:A("P95 时长","P95 duration","P95 時長","P95 時間","P95 길이","P95 süre","Thời lượng P95"),subtitle_playground_metric_max_duration:A("最大时长","Maximum duration","最長時長","最大時間","최대 길이","Azami süre","Thời lượng tối đa"),subtitle_playground_structure_error:A("结构错误:{errors}","Structure errors: {errors}","結構錯誤:{errors}","構造エラー:{errors}","구조 오류: {errors}","Yapı hataları: {errors}","Lỗi cấu trúc: {errors}"),subtitle_playground_readability_warning:A("可读性警告:超长文本 {longText},超过 10 秒 {longDuration},短碎片 {fragments},泄漏的非语音字幕 {nonSpeech}","Readability warnings: long text {longText}, over 10 seconds {longDuration}, short fragments {fragments}, leaked non-speech cues {nonSpeech}","可讀性警告:過長文字 {longText},超過 10 秒 {longDuration},短片段 {fragments},洩漏的非語音字幕 {nonSpeech}","可読性の警告:長すぎるテキスト {longText}、10 秒超 {longDuration}、短い断片 {fragments}、混入した非音声字幕 {nonSpeech}","가독성 경고: 너무 긴 텍스트 {longText}, 10초 초과 {longDuration}, 짧은 조각 {fragments}, 유출된 비음성 자막 {nonSpeech}","Okunabilirlik uyarıları: uzun metin {longText}, 10 saniyeyi aşan {longDuration}, kısa parçalar {fragments}, sızan konuşma dışı altyazılar {nonSpeech}","Cảnh báo khả đọc: văn bản dài {longText}, trên 10 giây {longDuration}, đoạn ngắn {fragments}, mục không phải lời nói bị lọt {nonSpeech}"),subtitle_playground_ai_stats:A("AI:协议 {protocol},Chunk {chunks},请求 {requests},重试 {retries},降级字幕 {fallbacks},无效响应 {invalid}","AI: protocol {protocol}, chunks {chunks}, requests {requests}, retries {retries}, fallback cues {fallbacks}, invalid responses {invalid}","AI:協定 {protocol},Chunk {chunks},請求 {requests},重試 {retries},降級字幕 {fallbacks},無效回應 {invalid}","AI:プロトコル {protocol}、チャンク {chunks}、リクエスト {requests}、再試行 {retries}、フォールバック字幕 {fallbacks}、無効な応答 {invalid}","AI: 프로토콜 {protocol}, 청크 {chunks}, 요청 {requests}, 재시도 {retries}, 대체 자막 {fallbacks}, 유효하지 않은 응답 {invalid}","AI: protokol {protocol}, parça {chunks}, istek {requests}, yeniden deneme {retries}, yedek altyazı {fallbacks}, geçersiz yanıt {invalid}","AI: giao thức {protocol}, đoạn {chunks}, yêu cầu {requests}, thử lại {retries}, mục dự phòng {fallbacks}, phản hồi không hợp lệ {invalid}")},w=(0,p.A)((0,p.A)({},x),{},{app_name:{zh:"简约翻译",en:"KISS Translator",zh_TW:"簡約翻譯",ja:"KISS Translator",ko:"KISS Translator",tr:"KISS Translator",vi:"KISS Translator"},translate:{zh:"翻译",en:"Translate",zh_TW:"翻譯",ja:"翻訳",ko:"번역",tr:"Çeviri",vi:"Dịch"},custom_api_help:{zh:m,en:g,zh_TW:b,ja:g,ko:g,tr:g,vi:g},request_hook_helper:{zh:"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}",en:v,zh_TW:"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}",ja:v,ko:v,tr:v,vi:v},response_hook_helper:{zh:"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}",en:y,zh_TW:"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}",ja:y,ko:y,tr:y,vi:y},translate_alt:{zh:"翻译",en:"Translate",zh_TW:"翻譯",ja:"翻訳",ko:"번역",tr:"Çeviri",vi:"Dịch"},basic_setting:{zh:"基本设置",en:"Basic Setting",zh_TW:"基本設定",ja:"基本設定",ko:"기본 설정",tr:"Basit Ayar",vi:"Cài đặt cơ bản"},rules_setting:{zh:"规则设置",en:"Rules Setting",zh_TW:"規則設定",ja:"ルール設定",ko:"규칙 설정",tr:"Kural Ayarı",vi:"Cài đặt quy tắc"},apis_setting:{zh:"接口设置",en:"Apis Setting",zh_TW:"API設定",ja:"API設定",ko:"API 설정",tr:"API Ayarı",vi:"Cài đặt API"},prompt_management:{zh:"提示词管理",en:"Prompt Management",zh_TW:"提示詞管理",ja:"プロンプト管理",ko:"프롬프트 관리",tr:"İstem Yönetimi",vi:"Quản lý lời nhắc"},sync_setting:{zh:"同步设置",en:"Sync Setting",zh_TW:"同步設定",ja:"同期設定",ko:"동기화 설정",tr:"Senkronizasyon Ayarı",vi:"Cài đặt đồng bộ"},patch_setting:{zh:"补丁设置",en:"Patch Setting",zh_TW:"修補設定",ja:"パッチ設定",ko:"패치 설정",tr:"Yama Ayarı",vi:"Cài đặt bản vá"},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:"일부 특수 웹사이트를 위한 수정 스크립트로, 번역 소프트웨어의 표시 효과를 개선합니다.",tr:"Çeviri yazılımının daha iyi görüntü sonuçları alabilmesi için bazı özel web sitelerinin komut dosyaları düzeltildi.",vi:"Corrected scripts for some special websites so that the translation software can get better display results."},inject_webfix:{zh:"注入修复补丁",en:"Inject Webfix",zh_TW:"注入修正補丁",ja:"Webfixを注入",ko:"웹 수정 패치 주입",tr:"Webfix'i Enjekte Edin",vi:"Chèn Webfix"},about:{zh:"关于",en:"About",zh_TW:"關於",ja:"概要",ko:"정보",tr:"Hakkında",vi:"Giới thiệu"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md",ja:"README.ja.md",ko:"README.ko.md",tr:"Readme.En.Md",vi:"README.en.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",")를 클릭하세요."),tr:"Lütfen Ayrıntılar İçin [Buraya Tıkla](".concat("https://github.com/fishjar/kiss-translator",")"),vi:"Vui lòng [nhấp vào đây](".concat("https://github.com/fishjar/kiss-translator",") để biết chi tiết.")},ui_lang:{zh:"界面语言",en:"Interface Language",zh_TW:"介面語言",ja:"インターフェース言語",ko:"인터페이스 언어",tr:"Arayüz Dili",vi:"Ngôn ngữ giao diện"},version_warning:{zh:"当前版本 (v{0}) 不是最新版本 (v{1}),可以等待自动升级或手动",en:"Current version (v{0}) is not the latest version (v{1}). You can wait for auto-update or manually ",zh_TW:"當前版本 (v{0}) 不是最新版本 (v{1}),可以等待自動升級或手動",ja:"現在のバージョン (v{0}) は最新バージョン (v{1}) ではありません。自動更新を待つか、手動で",ko:"현재 버전(v{0})은 최신 버전(v{1})이 아닙니다. 자동 업데이트를 기다리거나 수동으로 ",tr:"Mevcut sürüm (v{0}), en son sürüm (v{1}) değildir. Otomatik güncellemeyi bekleyebilir veya manuel olarak güncelleyebilirsiniz ",vi:"Current version (v{0}) is not the latest version (v{1}). You can wait for auto-update or manually "},download_update:{zh:"下载更新",en:"download update",zh_TW:"下載更新",ja:"アップデートをダウンロード",ko:"업데이트 다운로드",tr:"Güncellemeyi Indir",vi:"tải bản cập nhật"},fetch_limit:{zh:"最大并发请求数量 (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"最大同時請求數量 (1-100)",ja:"最大同時リクエスト数 (1-100)",ko:"최대 동시 요청 수 (1-100)",tr:"Maksimum Eşzamanlı İstek Sayısı (1-100)",vi:"Số lượng yêu cầu đồng thời tối đa (1-100)"},if_think:{zh:"启用或禁用模型的深度思考能力",en:"Enable or disable the model’s thinking behavior ",zh_TW:"啟用或停用模型的深度思考能力",ja:"モデルの思考行動を有効または無効にする",ko:"모델의 사고 행동 활성화 또는 비활성화",tr:"Modelin Düşünme Davranışını Etkinleştirme Veya Devre Dışı Bırakma",vi:"Enable or disable the model’s thinking behavior "},think:{zh:"启用深度思考",en:"enable thinking",zh_TW:"啟用深度思考",ja:"思考を有効にする",ko:"사고 활성화",tr:"Düşünmeyi Etkinleştir",vi:"bật suy nghĩ"},nothink:{zh:"禁用深度思考",en:"disable thinking",zh_TW:"停用深度思考",ja:"思考を無効にする",ko:"사고 비활성화",tr:"Düşünmeyi Devre Dışı Bırak",vi:"tắt suy nghĩ"},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가 지원하지 않는 경우 이 매개변수를 입력해야 합니다",tr:"Aşağıdaki modeller için <think> bloğunu dikkate almayın",vi:"Ignore the <think> block for the following models, comma (,) separated"},thinking_mode:{zh:"思考模式",en:"Thinking Mode",zh_TW:"思考模式",ja:"思考モード",ko:"사고 모드",tr:"Düşünme Modu",vi:"Chế độ suy nghĩ"},thinking_mode_default:{zh:"接口默认",en:"API Default",zh_TW:"介面預設",ja:"APIデフォルト",ko:"API 기본값",tr:"API Varsayılanı",vi:"Mặc định API"},thinking_mode_enabled:{zh:"开启思考",en:"Enable Thinking",zh_TW:"開啟思考",ja:"思考を有効",ko:"사고 활성화",tr:"Düşünmeyi Etkinleştir",vi:"Bật suy nghĩ"},thinking_mode_disabled:{zh:"关闭思考",en:"Disable Thinking",zh_TW:"關閉思考",ja:"思考を無効",ko:"사고 비활성화",tr:"Düşünmeyi Devre Dışı Bırak",vi:"Tắt suy nghĩ"},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 기본값"을 사용하세요.',tr:'API\'ler arasında düşünme parametreleri farklılık gösterir. Hata ile karşılaşırsanız lütfen "API Varsayılanı" seçeneğini kullanın.',vi:'The thinking parameters vary across APIs. If you encounter errors, please use the "API Default" option.'},thinking_unknown_model_helper:{zh:"无法识别当前模型支持的思考参数,本次请求不会发送思考设置。",en:"The current model's thinking parameters are unknown, so no thinking settings will be sent.",zh_TW:"無法識別目前模型支援的思考參數,本次請求不會傳送思考設定。",ja:"現在のモデルが対応する思考パラメータを識別できないため、思考設定は送信されません。",ko:"현재 모델의 사고 매개변수를 확인할 수 없어 사고 설정을 전송하지 않습니다.",tr:"Geçerli modelin düşünme parametreleri tanınmadığından düşünme ayarları gönderilmeyecek.",vi:"Không nhận diện được tham số suy luận của mô hình hiện tại nên yêu cầu sẽ không gửi cài đặt suy luận."},gemini_thinking_minimum_helper:{zh:"当前模型不支持完全关闭思考,将自动使用最低思考级别。",en:"This model cannot disable thinking completely and will use its lowest supported level.",zh_TW:"目前模型不支援完全關閉思考,將自動使用最低思考等級。",ja:"このモデルは思考を完全に無効化できないため、最も低い対応レベルを使用します。",ko:"이 모델은 사고를 완전히 비활성화할 수 없어 지원되는 최저 수준을 사용합니다.",tr:"Bu model düşünmeyi tamamen devre dışı bırakamaz; desteklenen en düşük düzeyi kullanır.",vi:"This model cannot disable thinking completely and will use its lowest supported level."},thinking_effort:{zh:"思考强度",en:"Thinking Effort",zh_TW:"思考強度",ja:"思考レベル",ko:"사고 수준",tr:"Düşünme Çabası",vi:"Mức độ suy nghĩ"},thinking_effort_default:{zh:"接口默认",en:"API Default",zh_TW:"介面預設",ja:"APIデフォルト",ko:"API 기본값",tr:"API Varsayılanı",vi:"Mặc định API"},fetch_interval:{zh:"每次请求间隔时间 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"每次請求間隔時間 (0-5000ms)",ja:"リクエスト間隔 (0-5000ms)",ko:"요청 간 시간 (0-5000ms)",tr:"İstekler Arasındaki Süre (0-5000Ms)",vi:"Thời gian giữa các yêu cầu (0-5000ms)"},translate_interval:{zh:"翻译间隔时间 (1-2000ms)",en:"Translation Interval (1-2000ms)",zh_TW:"翻譯間隔時間 (1-2000ms)",ja:"翻訳間隔 (1-2000ms)",ko:"번역 간격 (1-2000ms)",tr:"Çeviri Aralığı (1-2000Ms)",vi:"Khoảng thời gian dịch (1-2000ms)"},http_timeout:{zh:"请求超时时间 (1-600s)",en:"Request Timeout Time (1-600s)",zh_TW:"請求逾時時間 (1-600s)",ja:"リクエストタイムアウト (1-600s)",ko:"요청 시간 초과 (1-600s)",tr:"İstek Zaman Aşımı Süresi (1-600S)",vi:"Thời gian chờ yêu cầu (1-600s)"},custom_header:{zh:"自定义Header参数",en:"Custom Header Params",zh_TW:"自訂 Header 參數",ja:"カスタムヘッダー",ko:"사용자 지정 헤더",tr:"Özel Başlık Parametreleri",vi:"Tham số Header tùy chỉnh"},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"',tr:'Örneğin, "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0" şeklinde JSON formatını kullanın.',vi:'Use JSON format, for example "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:"사용자 지정 바디",tr:"Özel Gövde Parametreleri",vi:"Tham số Body tùy chỉnh"},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',tr:'JSON formatını kullanın, örneğin "top_p": 0.7',vi:'Use JSON format, for example "top_p": 0.7'},gemini_interactions_custom_body_help:{zh:"使用 Interactions API 顶层 JSON 字段;Request Hook 收到的也是 Interactions 请求结构。",en:"Use top-level Interactions API JSON fields. Request Hook also receives the Interactions request shape.",zh_TW:"使用 Interactions API 頂層 JSON 欄位;Request Hook 收到的也是 Interactions 請求結構。",ja:"Interactions API のトップレベル JSON フィールドを使用します。Request Hook も Interactions のリクエスト形式を受け取ります。",ko:"Interactions API 최상위 JSON 필드를 사용하세요. Request Hook도 Interactions 요청 구조를 받습니다.",tr:"Üst düzey Interactions API JSON alanlarını kullanın. Request Hook da Interactions istek yapısını alır.",vi:"Use top-level Interactions API JSON fields. Request Hook also receives the Interactions request shape."},min_translate_length:{zh:"最小翻译字符数 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"最小翻譯字元數 (1-100)",ja:"最小翻訳文字数 (1-100)",ko:"최소 번역 문자 수 (1-100)",tr:"Minimum Çevrilmiş Karakter Sayısı (1-100)",vi:"Số ký tự dịch tối thiểu (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)",tr:"Maksimum Çevrilmiş Karakter Sayısı (100-100000)",vi:"Số ký tự dịch tối đa (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)",tr:"Yeni Satır Karakter Sayısı (1-1000)",vi:"Số ký tự xuống dòng (1-1000)"},translate_service:{zh:"翻译服务",en:"Translate Service",zh_TW:"翻譯服務",ja:"翻訳サービス",ko:"번역 서비스",tr:"Çeviri Hizmeti",vi:"Dịch vụ dịch"},translate_service_multiple:{zh:"翻译服务 (支持多选)",en:"Translation service (multiple supported)",zh_TW:"翻譯服務 (支援多選)",ja:"翻訳サービス (複数選択可)",ko:"번역 서비스 (다중 선택 지원)",tr:"Çeviri Hizmeti (Birden Fazla Desteklenir)",vi:"Dịch vụ dịch (hỗ trợ nhiều)"},single_word_no_trans:{zh:"单个单词划词不调用翻译服务",en:"Do not use translation services for single word",zh_TW:"選取單一單字時不呼叫翻譯服務",ja:"単一単語は翻訳サービスを使用しない",ko:"단일 단어는 번역 서비스를 사용하지 않음",tr:"Tek Kelime İçin Çeviri Hizmetlerini Kullanmayın",vi:"Không dùng dịch vụ dịch cho từ đơn"},auto_fav_word:{zh:"自动收藏词汇",en:"Automatically favorite words",zh_TW:"自動收藏詞彙",ja:"単語を自動でお気に入りに追加",ko:"단어 자동 즐겨찾기",tr:"Kelimeleri Otomatik Favorilere Ekle",vi:"Tự động yêu thích từ"},translate_timing:{zh:"翻译时机",en:"Translate Timing",zh_TW:"翻譯時機",ja:"翻訳タイミング",ko:"번역 시점",tr:"Çeviri Zamanlaması",vi:"Thời điểm dịch"},mk_pagescroll:{zh:"滚动加载翻译(推荐)",en:"Rolling Loading (Suggested)",zh_TW:"滾動載入翻譯(建議)",ja:"スクロール翻訳 (推奨)",ko:"스크롤 번역 (권장)",tr:"Kademeli Yükleme (Önerilen)",vi:"Tải cuộn (Khuyến nghị)"},mk_pageopen:{zh:"立即全部翻译",en:"Translate all now",zh_TW:"立即全部翻譯",ja:"すぐにすべて翻訳",ko:"즉시 모두 번역",tr:"Hepsini Şimdi Çevir",vi:"Dịch tất cả ngay"},mk_mouseover:{zh:"鼠标悬停翻译",en:"Mouseover",zh_TW:"滑鼠懸停翻譯",ja:"マウスオーバー翻訳",ko:"마우스오버 번역",tr:"Fareyle Üzerine Gelme",vi:"Di chuột"},mk_ctrlKey:{zh:"Control + 鼠标悬停",en:"Control + Mouseover",zh_TW:"Control + 滑鼠懸停",ja:"Control + マウスオーバー",ko:"Control + 마우스오버",tr:"Control + Fareyle Üzerine Gelme",vi:"Control + Di chuột"},mk_shiftKey:{zh:"Shift + 鼠标悬停",en:"Shift + Mouseover",zh_TW:"Shift + 滑鼠懸停",ja:"Shift + マウスオーバー",ko:"Shift + 마우스오버",tr:"Shift + Fareyle Üzerine Gelme",vi:"Shift + Di chuột"},mk_altKey:{zh:"Alt + 鼠标悬停",en:"Alt + Mouseover",zh_TW:"Alt + 滑鼠懸停",ja:"Alt + マウスオーバー",ko:"Alt + 마우스오버",tr:"Alt + Fareyle Üzerine Gelme",vi:"Alt + Di chuột"},from_lang:{zh:"原文语言",en:"Source Language",zh_TW:"原文語言",ja:"原文の言語",ko:"원본 언어",tr:"Kaynak Dil",vi:"Source Language"},to_lang:{zh:"目标语言",en:"Target Language",zh_TW:"目標語言",ja:"翻訳先の言語",ko:"대상 언어",tr:"Hedef Dil",vi:"Target Language"},to_lang2:{zh:"第二目标语言",en:"Target Language 2",zh_TW:"第二目標語言",ja:"第二翻訳先の言語",ko:"두 번째 대상 언어",tr:"Hedef Dil 2",vi:"Target Language 2"},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:"설정 후, 대상 언어와 상호 번역 효과가 발생하지만, 원격 언어 인식에 의존합니다.",tr:"Ayarlar yapıldıktan sonra, hedef dille karşılıklı çeviri etkisi yaratacaktır, ancak uzaktan dil tanıma özelliğine bağlıdır",vi:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition."},text_style:{zh:"译文样式",en:"Text Style",zh_TW:"譯文樣式",ja:"翻訳テキストスタイル",ko:"번역 텍스트 스타일",tr:"Metin Stili",vi:"Kiểu văn bản"},original_text_style:{zh:"原文样式",en:"Original Text Style",zh_TW:"原文樣式",ja:"原文テキストスタイル",ko:"원문 텍스트 스타일",tr:"Orijinal Metin Stili",vi:"Kiểu văn bản gốc"},text_style_alt:{zh:"译文样式",en:"Text Style",zh_TW:"譯文樣式",ja:"翻訳テキストスタイル",ko:"번역 텍스트 스타일",tr:"Metin Stili",vi:"Kiểu văn bản"},bg_color:{zh:"样式颜色",en:"Style Color",zh_TW:"樣式顏色",ja:"スタイルカラー",ko:"스타일 색상",tr:"Stil Rengi",vi:"Màu kiểu dáng"},remain_unchanged:{zh:"保留不变",en:"Remain Unchanged",zh_TW:"保留不變",ja:"変更しない",ko:"변경하지 않음",tr:"Değişmeden Kal",vi:"Giữ nguyên"},google_api:{zh:"谷歌翻译接口",en:"Google Translate API",zh_TW:"Google 翻譯介面",ja:"Google 翻訳 API",ko:"Google 번역 API",tr:"Google Çeviri API'si",vi:"API Google Dịch"},default_selector:{zh:"默认选择器",en:"Default selector",zh_TW:"預設選擇器",ja:"デフォルトセレクタ",ko:"기본 선택자",tr:"Varsayılan Seçici",vi:"Bộ chọn mặc định"},selector_rules:{zh:"选择器规则",en:"Selector Rules",zh_TW:"選擇器規則",ja:"セレクタールール",ko:"선택자 규칙",tr:"Seçici Kuralları",vi:"Quy tắc bộ chọn"},save:{zh:"保存",en:"Save",zh_TW:"儲存",ja:"保存",ko:"저장",tr:"Kaydet",vi:"Lưu"},edit:{zh:"编辑",en:"Edit",zh_TW:"編輯",ja:"編集",ko:"수정",tr:"Düzenle",vi:"Chỉnh sửa"},cancel:{zh:"取消",en:"Cancel",zh_TW:"取消",ja:"キャンセル",ko:"취소",tr:"İptal Et",vi:"Hủy"},delete:{zh:"删除",en:"Delete",zh_TW:"刪除",ja:"削除",ko:"삭제",tr:"Sil",vi:"Xóa"},reset:{zh:"重置",en:"Reset",zh_TW:"重設",ja:"リセット",ko:"초기화",tr:"Sıfırla",vi:"Đặt lại"},add:{zh:"添加",en:"Add",zh_TW:"新增",ja:"追加",ko:"추가",tr:"Ekle",vi:"Thêm"},bulk_actions:{zh:"批量操作",en:"Bulk Actions",zh_TW:"批次操作",ja:"一括操作",ko:"일괄 작업",tr:"Toplu İşlemler",vi:"Thao tác hàng loạt"},select_all:{zh:"全选",en:"Select All",zh_TW:"全選",ja:"すべて選択",ko:"모두 선택",tr:"Tümünü Seç",vi:"Chọn tất cả"},deselect_all:{zh:"全不选",en:"Deselect All",zh_TW:"全部取消選取",ja:"すべて解除",ko:"모두 해제",tr:"Tümünün Seçimini Kaldır",vi:"Bỏ chọn tất cả"},pin_to_top:{zh:"置顶",en:"Pin to Top",zh_TW:"置頂",ja:"先頭に固定",ko:"맨 위에 고정",tr:"En Üste Sabitle",vi:"Ghim lên đầu"},delete_selected_apis_confirm:{zh:"确定删除已选的 {count} 个接口吗?",en:"Delete {count} selected interfaces?",zh_TW:"確定刪除已選的 {count} 個介面嗎?",ja:"選択した {count} 件のインターフェースを削除しますか?",ko:"선택한 인터페이스 {count}개를 삭제할까요?",tr:"Seçili {Count} Arayüzü Silmek İstiyor Musunuz?",vi:"Xóa {count} giao diện đã chọn?"},copy_api:{zh:"复制接口",en:"Copy Interface",zh_TW:"複製介面",ja:"インターフェースをコピー",ko:"인터페이스 복사",tr:"Arayüzü Kopyala",vi:"Sao chép giao diện"},prompt_name:{zh:"名称",en:"Name",zh_TW:"名稱",ja:"名前",ko:"이름",tr:"Ad",vi:"Tên"},system_prompt:{zh:"系统提示词",en:"System Prompt",zh_TW:"系統提示詞",ja:"システムプロンプト",ko:"시스템 프롬프트",tr:"Sistem İstemi",vi:"Lời nhắc hệ thống"},user_prompt:{zh:"用户提示词",en:"User Prompt",zh_TW:"使用者提示詞",ja:"ユーザープロンプト",ko:"사용자 프롬프트",tr:"Kullanıcı İstemi",vi:"Lời nhắc người dùng"},copy_as_template:{zh:"复制为模板",en:"Copy as Template",zh_TW:"複製為範本",ja:"テンプレートとしてコピー",ko:"템플릿으로 복사",tr:"Şablon Olarak Kopyala",vi:"Sao chép làm mẫu"},delete_prompt_confirm:{zh:"确定删除这份提示词吗?",en:"Delete this prompt?",zh_TW:"確定刪除這份提示詞嗎?",ja:"このプロンプトを削除しますか?",ko:"이 프롬프트를 삭제할까요?",tr:"Bu İstem Silinsin Mi?",vi:"Xóa lời nhắc này?"},custom_prompt:{zh:"自定义提示词",en:"Custom Prompt",zh_TW:"自訂提示詞",ja:"カスタムプロンプト",ko:"사용자 프롬프트",tr:"Özel İstem",vi:"Lời nhắc tùy chỉnh"},add_prompt:{zh:"新增提示词",en:"Add Prompt",zh_TW:"新增提示詞",ja:"プロンプトを追加",ko:"프롬프트 추가",tr:"İstem Ekle",vi:"Thêm lời nhắc"},prompt_category_batch_system:{zh:"聚合系统提示词",en:"Batch System Prompt",zh_TW:"聚合系統提示詞",ja:"一括翻訳システムプロンプト",ko:"일괄 시스템 프롬프트",tr:"Toplu Sistem İstemi",vi:"Lời nhắc hệ thống hàng loạt"},prompt_category_user:{zh:"用户提示词",en:"User Prompt",zh_TW:"使用者提示詞",ja:"ユーザープロンプト",ko:"사용자 프롬프트",tr:"Kullanıcı İstemi",vi:"Lời nhắc người dùng"},prompt_category_subtitle:{zh:"字幕提示词",en:"Subtitle Prompt",zh_TW:"字幕提示詞",ja:"字幕プロンプト",ko:"자막 프롬프트",tr:"Altyazı İstemi",vi:"Lời nhắc phụ đề"},prompt_category_dictionary:{zh:"词典提示词",en:"Dictionary Prompt",zh_TW:"詞典提示詞",ja:"辞書プロンプト",ko:"사전 프롬프트",tr:"Sözlük İstemi",vi:"Lời nhắc từ điển"},batch_prompt:{zh:"聚合翻译提示词",en:"Batch Translation Prompt",zh_TW:"聚合翻譯提示詞",ja:"一括翻訳プロンプト",ko:"일괄 번역 프롬프트",tr:"Toplu Çeviri İstemi",vi:"Lời nhắc dịch hàng loạt"},nobatch_prompt:{zh:"非聚合翻译提示词",en:"Non-batch Translation Prompt",zh_TW:"非聚合翻譯提示詞",ja:"非一括翻訳プロンプト",ko:"비일괄 번역 프롬프트",tr:"Toplu Olmayan Çeviri İstemi",vi:"Lời nhắc dịch không hàng loạt"},subtitle_prompt:{zh:"AI断句提示词",en:"AI Segmentation Prompt",zh_TW:"AI斷句提示詞",ja:"AI セグメンテーションプロンプト",ko:"AI 문장 분할 프롬프트",tr:"AI Altyazı İstemi",vi:"Lời nhắc phân đoạn AI"},seg_prompt_mode:{zh:"AI断句提示词",en:"AI Segmentation Prompt",zh_TW:"AI斷句提示詞",ja:"AI セグメンテーションプロンプト",ko:"AI 문장 분할 프롬프트",tr:"AI Segmentasyon İstemi",vi:"Lời nhắc phân đoạn AI"},follow_api_prompt:{zh:"接口默认",en:"Interface Default",zh_TW:"介面預設",ja:"インターフェース既定",ko:"인터페이스 기본값",tr:"Arayüz Varsayılanı",vi:"Mặc định giao diện"},preset_prompt_nobatch_translation:{zh:"非聚合翻译",en:"Non-batch Translation",zh_TW:"非聚合翻譯",ja:"非一括翻訳",ko:"비일괄 번역",tr:"Toplu Olmayan Çeviri",vi:"Dịch không hàng loạt"},preset_prompt_batch_translation_json:{zh:"聚合翻译(JSON)",en:"Batch Translation (JSON)",zh_TW:"聚合翻譯(JSON)",ja:"一括翻訳(JSON)",ko:"일괄 번역(JSON)",tr:"Toplu Çeviri (JSON)",vi:"Dịch hàng loạt (JSON)"},preset_prompt_batch_translation_xml:{zh:"聚合翻译(XML)",en:"Batch Translation (XML)",zh_TW:"聚合翻譯(XML)",ja:"一括翻訳(XML)",ko:"일괄 번역(XML)",tr:"Toplu Çeviri (XML)",vi:"Dịch hàng loạt (XML)"},preset_prompt_batch_translation_line:{zh:"聚合翻译(LINE)",en:"Batch Translation (LINE)",zh_TW:"聚合翻譯(LINE)",ja:"一括翻訳(LINE)",ko:"일괄 번역(LINE)",tr:"Toplu Çeviri (Line)",vi:"Dịch hàng loạt (LINE)"},preset_prompt_subtitle_segmentation:{zh:"字幕 AI 断句",en:"Subtitle AI Segmentation",zh_TW:"字幕 AI 斷句",ja:"字幕 AI セグメンテーション",ko:"자막 AI 문장 분할",tr:"Altyazı AI Segmentasyonu",vi:"Phân đoạn phụ đề AI"},preset_prompt_dictionary_en_zh:{zh:"AI 英汉词典",en:"AI English-Chinese Dictionary",zh_TW:"AI 英漢詞典",ja:"AI 英中辞書",ko:"AI 영중 사전",tr:"AI İngilizce-Çince Sözlük",vi:"Từ điển Anh-Trung AI"},preset_prompt_dictionary_en_ja:{zh:"AI 英日词典",en:"AI English-Japanese Dictionary",zh_TW:"AI 英日詞典",ja:"AI 英和辞書",ko:"AI 영일 사전",tr:"AI İngilizce-Japonca Sözlük",vi:"Từ điển Anh-Nhật AI"},preset_prompt_dictionary_en_ko:{zh:"AI 英韩词典",en:"AI English-Korean Dictionary",zh_TW:"AI 英韓詞典",ja:"AI 英韓辞書",ko:"AI 영한 사전",tr:"AI İngilizce-Korece Sözlük",vi:"Từ điển Anh-Hàn AI"},preset_prompt_dictionary_en_vi:{zh:"AI 英越词典",en:"AI English-Vietnamese Dictionary",zh_TW:"AI 英越詞典",ja:"AI 英越辞書",ko:"AI 영어-베트남어 사전",tr:"AI İngilizce-Vietnamca Sözlük",vi:"Từ điển Anh-Việt AI"},preset_prompt_dictionary_en_ru:{zh:"AI 英俄词典",en:"AI English-Russian Dictionary",zh_TW:"AI 英俄詞典",ja:"AI 英露辞書",ko:"AI 영어-러시아어 사전",tr:"AI İngilizce-Rusça Sözlük",vi:"Từ điển Anh-Nga AI"},inject_rules:{zh:"注入订阅规则",en:"Inject Subscribe Rules",zh_TW:"注入訂閱規則",ja:"購読ルールを注入",ko:"구독 규칙 주입",tr:"Abonelik Kurallarını Ekle",vi:"Chèn quy tắc đăng ký"},personal_rules:{zh:"个人规则",en:"Rules",zh_TW:"個人規則",ja:"個人ルール",ko:"개인 규칙",tr:"Kurallar",vi:"Quy tắc"},subscribe_rules:{zh:"订阅规则",en:"Subscribe",zh_TW:"訂閱規則",ja:"購読ルール",ko:"구독 규칙",tr:"Abonelik Kuralları",vi:"Đăng ký"},overwrite_subscribe_rules:{zh:"覆写订阅规则",en:"Overwrite",zh_TW:"覆寫訂閱規則",ja:"購読ルールを上書き",ko:"구독 규칙 덮어쓰기",tr:"Üzerine Yaz",vi:"Ghi đè"},subscribe_url:{zh:"订阅地址",en:"Subscribe URL",zh_TW:"訂閱網址",ja:"購読URL",ko:"구독 URL",tr:"Abonelik URL'si",vi:"URL đăng ký"},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) 규칙입니다.',tr:'1. Kuralların önceliği şudur: kişisel kurallar > abonelik kuralları > genel kurallar. "Genel kurallar" bir geri dönüş kuralı gibidir',vi:'1. The priority of rules is: personal rules > subscription rules > global rules. "Global rules" are like a fallback rule.'},rules_warn_2:{zh:"2、“订阅规则”选择注入后才会生效。",en:'2. "Subscription rules" will take effect only after injection is selected.',zh_TW:"2、「訂閱規則」選擇注入後才會生效。",ja:"2. 「購読ルール」は注入を選択した後にのみ有効になります。",ko:'2. "구독 규칙"은 주입을 선택한 후에만 적용됩니다.',tr:'2. "Abonelik kuralları" yalnızca enjeksiyon seçildikten sonra geçerli olacaktır.',vi:'2. "Subscription rules" will take effect only after injection is selected.'},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 선택자는 접두사를 지원합니다. "+"는 전역 규칙에 추가, "-"는 제외를 의미합니다.',tr:'3. Kuralların Doldurulmasıyla İlgili Olarak: Genel Kuralı Kullanmak İçin Giriş Kutusunu Boş Bırakın Veya Açılır Kutuda "*" Seçeneğini Seçin. Css Seçicileri Önekleri Destekler: "+" Genel Kurallara Ekleme Anlamına Gelir',vi:'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.'},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 서비스를 구축하는 것을 권장합니다.",tr:"Gizlilikle ilgili verileri senkronize ederken, üçüncü taraf senkronizasyon hizmetlerini seçerken lütfen dikkatli olun. KISS-Worker veya WebDAV kullanarak kendi senkronizasyon hizmetinizi kurmanız önerilir",vi:"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."},sync_warn_gist:{zh:"GitHub Gist 不会出现在公开搜索或发现页面中,但任何拥有该链接的人都可以查看内容。",en:"GitHub Gists do not appear in public searches or discovery pages, but anyone with the link can view the content.",zh_TW:"GitHub Gist 不會出現在公開搜尋或探索頁面中,但任何擁有該連結的人都可以查看內容。",ja:"GitHub Gist は公開検索や発見ページには表示されませんが、リンクを持っている人は誰でも内容を閲覧できます。",ko:"GitHub Gist는 공개 검색이나 탐색 페이지에 표시되지 않지만, 링크를 가진 사람은 누구나 내용을 볼 수 있습니다.",tr:"GitHub Gist'leri herkese açık aramalarda veya keşif sayfalarında görünmez, ancak bağlantıya sahip herkes içeriği görüntüleyebilir.",vi:"GitHub Gists do not appear in public searches or discovery pages, but anyone with the link can view the content."},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:"서버에 다른 클라이언트가 동기화한 데이터가 있는 경우, 첫 번째 동기화는 로컬 구성을 직접 덮어쓰며, 이후에는 수정 시간에 따라 새 항목이 기존 항목을 덮어씁니다.",tr:"Eğer sunucuda diğer istemciler tarafından senkronize edilen veriler varsa, ilk senkronizasyon doğrudan yerel yapılandırmanın üzerine yazılır ve daha sonra, değişiklik zamanına göre, yenisi eskisinin üzerine yazılır",vi:"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."},sync_warn_encryption:{zh:"新版本会自动将旧版明文同步数据迁移为加密数据;同步加密口令独立用于数据解密,请妥善保存,遗失后无法读取已加密的云端数据。",en:"New versions automatically migrate legacy plaintext sync data to encrypted data. The sync encryption passphrase is used independently for data decryption, so keep it safe; encrypted cloud data cannot be read if it is lost.",zh_TW:"新版本會自動將舊版明文同步資料遷移為加密資料;同步加密密碼獨立用於資料解密,請妥善保存,遺失後將無法讀取已加密的雲端資料。",ja:"新しいバージョンでは、従来の平文同期データを暗号化データへ自動移行します。同期暗号化パスフレーズはデータ復号専用に独立して使用されるため、安全に保管してください。紛失すると暗号化済みのクラウドデータは読み取れません。",ko:"새 버전은 기존 일반 텍스트 동기화 데이터를 암호화 데이터로 자동 마이그레이션합니다. 동기화 암호화 암호문은 데이터 복호화에 독립적으로 사용되므로 안전하게 보관하세요. 분실하면 암호화된 클라우드 데이터를 읽을 수 없습니다.",tr:"Yeni sürümler, eski düz metin senkronizasyon verilerini otomatik olarak şifrelenmiş verilere taşır. Senkronizasyon şifreleme parolası, veri şifresinin çözülmesi için bağımsız olarak kullanılır",vi:"New versions automatically migrate legacy plaintext sync data to encrypted data. The sync encryption passphrase is used independently for data decryption, so keep it safe; encrypted cloud data cannot be read if it is lost."},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 데이터 동기화 서비스 자체 호스팅",tr:"KISS-Worker Veri Senkronizasyon Hizmetini Kendi Kendine Barındırma",vi:"Self-hosting a Kiss-worker data sync service"},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 이상 버전에서만 지원됩니다.",tr:"1. BuiltinAI, tarayıcının yerleşik AI çeviri özelliğidir ve şu anda yalnızca Chrome 138 ve üzeri sürümler tarafından desteklenmektedir.",vi:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above."},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 유형을 선택하면 됩니다. “번역 요청을 집합적으로 보낼지 여부”에 대응하는 프롬프트는 서로 다르며, 모든 인터페이스가 집합 번역을 지원하는 것은 아닙니다.",tr:'2. Çoğu AI arayüzü OpenAI ile uyumludur, bu nedenle OpenAI türünü seçmeniz yeterlidir. "Çeviri isteklerinin birleştirilip birleştirilmeyeceği" ile ilgili istemler farklıdır ve tüm arayüzler birleştirilmiş çeviriyi desteklemez.',vi:"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."},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) 인터페이스로 설정하여 사용할 수 있습니다.",tr:"3. Teorik olarak, tüm çeviri arayüzleri özel bir arayüz olarak yapılandırılarak kullanılabilir.",vi:"3. In theory, all translation interfaces can be used by configuring them as a custom interface."},about_api_proxy:{zh:"查看自建一个翻译接口代理",en:"Check out the self-built translation interface proxy",zh_TW:"檢視如何自行架設翻譯介面 Proxy",ja:"自作の翻訳インターフェースプロキシをチェックする",ko:"자체 구축 번역 인터페이스 프록시 확인하기",tr:"Kendi Oluşturduğunuz Çeviri Arayüzü Proxy'sine Göz Atın",vi:"Check out the self-built translation interface proxy"},setting_helper:{zh:"新旧配置并不兼容,导出的旧版配置,勿再次导入。",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"新舊設定並不相容,匯出的舊版設定請勿再次匯入。",ja:"新旧の設定に互換性はありません。エクスポートした古い設定を再度インポートしないでください。",ko:"이전 구성과 새 구성은 호환되지 않습니다. 내보낸 이전 구성을 다시 가져오지 마십시오.",tr:"Eski ve yeni konfigürasyonlar uyumlu değildir. Dışa aktarılan eski konfigürasyonu tekrar içe aktarmayın.",vi:"The old and new configurations are not compatible. Do not import the exported old configuration again."},style_none:{zh:"无",en:"None",zh_TW:"無",ja:"なし",ko:"없음",tr:"Hiçbiri",vi:"None"},under_line:{zh:"下划直线",en:"Underline",zh_TW:"下劃直線",ja:"下線",ko:"밑줄",tr:"Altı Çizili",vi:"Underline"},dot_line:{zh:"下划点状线",en:"Dotted Underline",zh_TW:"下劃點狀線",ja:"点線の下線",ko:"점선 밑줄",tr:"Noktalı Alt Çizgi",vi:"Dotted Underline"},dash_line:{zh:"下划虚线",en:"Dashed Underline",zh_TW:"下劃虛線",ja:"破線の下線",ko:"파선 밑줄",tr:"Kesikli Alt Çizgi",vi:"Dashed Underline"},dash_box:{zh:"虚线框",en:"Dashed Box",zh_TW:"虛線框",ja:"破線ボックス",ko:"파선 상자",tr:"Kesikli Kutu",vi:"Dashed Box"},dash_line_bold:{zh:"下划虚线加粗",en:"Dashed Underline Bold",zh_TW:"下劃虛線",ja:"破線の下線 (太字)",ko:"굵은 파선 밑줄",tr:"Kesikli Altı Çizili Kalın",vi:"Dashed Underline Bold"},dash_box_bold:{zh:"虚线框加粗",en:"Dashed Box Bold",zh_TW:"虛線框加粗",ja:"破線ボックス (太字)",ko:"굵은 파선 상자",tr:"Kesikli Kutu Kalın",vi:"Dashed Box Bold"},marker:{zh:"马克笔",en:"Marker",zh_TW:"馬克筆",ja:"マーカー",ko:"마커",tr:"İşaretleyici",vi:"Marker"},gradient_marker:{zh:"渐变马克笔",en:"Gradient Marker",zh_TW:"漸層馬克筆",ja:"グラデーションマーカー",ko:"그라데이션 마커",tr:"Gradyan İşaretleyici",vi:"Gradient Marker"},wavy_line:{zh:"下划波浪线",en:"Wavy Underline",zh_TW:"下劃波浪線",ja:"波線の下線",ko:"물결 밑줄",tr:"Dalgalı Alt Çizgi",vi:"Wavy Underline"},wavy_line_bold:{zh:"下划波浪线加粗",en:"Wavy Underline Bold",zh_TW:"下劃波浪線加粗",ja:"波線の下線 (太字)",ko:"굵은 물결 밑줄",tr:"Dalgalı Altı Çizili Kalın",vi:"Wavy Underline Bold"},fuzzy:{zh:"模糊",en:"Fuzzy",zh_TW:"模糊",ja:"ぼかし",ko:"흐림",tr:"Bulanık",vi:"Fuzzy"},highlight:{zh:"高亮",en:"Highlight",zh_TW:"反白標示",ja:"ハイライト",ko:"하이라이트",tr:"Vurgu",vi:"Highlight"},blockquote:{zh:"引用",en:"Blockquote",zh_TW:"引用",ja:"引用",ko:"인용",tr:"Blok Alıntı",vi:"Blockquote"},gradient:{zh:"渐变",en:"Gradient",zh_TW:"漸變",ja:"グラデーション",ko:"그라데이션",tr:"Gradyan",vi:"Gradient"},blink:{zh:"闪现",en:"Blink",zh_TW:"閃現",ja:"点滅",ko:"깜박임",tr:"Işıltı",vi:"Blink"},glow:{zh:"发光",en:"Glow",zh_TW:"發光",ja:"発光",ko:"발광",tr:"Parıltı",vi:"Glow"},colorful:{zh:"多彩",en:"Colorful",zh_TW:"多彩",ja:"カラフル",ko:"다채롭게",tr:"Renkli",vi:"Colorful"},setting:{zh:"设置",en:"Setting",zh_TW:"設定",ja:"設定",ko:"설정",tr:"Ayar",vi:"Cài đặt"},pattern:{zh:"匹配网址",en:"URL pattern",zh_TW:"匹配網址",ja:"URLパターン",ko:"URL 패턴",tr:"URL Modeli",vi:"Mẫu 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은 줄바꿈 또는 영어 쉼표 ","로 구분합니다.',tr:"1. Yıldız (*) Joker Karakterini Destekler. 2. Birden Fazla URL'Yi Yeni Satırlarla Veya Virgüllerle Ayırın \"",vi:'1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas ",".'},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 선택자 구문을 따릅니다.",tr:"1. Çevrilecek hedef öğe. 2. Otomatik sayfa tarama etkinleştirildiğinde bu ayar geçersizdir. 3. CSS seçici sözdizimini takip edin.",vi:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax."},translate_switch:{zh:"开启翻译",en:"Translate Switch",zh_TW:"開啟翻譯",ja:"翻訳を有効にする",ko:"번역 켜기",tr:"Çeviri Anahtarı",vi:"Công tắc dịch"},default_enabled:{zh:"默认开启",en:"Enabled",zh_TW:"預設開啟",ja:"デフォルトで有効",ko:"기본으로 사용",tr:"Etkin",vi:"Đã bật"},default_disabled:{zh:"默认关闭",en:"Disabled",zh_TW:"預設關閉",ja:"デフォルトで無効",ko:"기본으로 사용 안함",tr:"Devre Dışı",vi:"Đã tắt"},selector:{zh:"选择器",en:"Selector",zh_TW:"選擇器",ja:"セレクタ",ko:"선택자",tr:"Seçici",vi:"Bộ chọn"},target_selector:{zh:"目标元素选择器",en:"Target element selector",zh_TW:"目標元素選擇器",ja:"対象要素セレクタ",ko:"대상 요소 선택자",tr:"Hedef Öğe Seçici",vi:"Bộ chọn phần tử đích"},keep_selector:{zh:"保留元素选择器",en:"Keep unchanged selector",zh_TW:"保留元素選擇器",ja:"保持要素セレクタ",ko:"유지할 요소 선택자",tr:"Seçiciyi Değiştirmeden Tut",vi:"Bộ chọn giữ nguyên"},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 선택자 구문을 따릅니다.",tr:"1. Hedef öğenin altındaki alt düğümlerin sağlam kalması gerekir. 2. CSS seçici sözdizimini takip edin.",vi:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax."},block_selector:{zh:"块级元素选择器",en:"Block element selector",zh_TW:"區塊元素選擇器",ja:"ブロック要素セレクタ",ko:"블록 요소 선택자",tr:"Blok Öğe Seçici",vi:"Bộ chọn phần tử khối"},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 선택자 구문을 따르세요.",tr:"1. Eşleşen öğeler blok düğümleri olarak ele alınacaktır. 2. CSS seçici sözdizimini takip edin.",vi:"1. Matched elements will be treated as block nodes. 2. Follow the CSS selector syntax."},root_selector:{zh:"根节点选择器",en:"Root node selector",zh_TW:"根節點選擇器",ja:"ルートノードセレクタ",ko:"루트 노드 선택자",tr:"Kök Düğüm Seçici",vi:"Bộ chọn nút gốc"},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 선택자 구문을 따릅니다.",tr:"1. Sayfanın çeviri kapsamını daraltmak için kullanılır. 2. CSS seçici sözdizimini takip edin.",vi:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax."},ignore_selector:{zh:"不翻译节点选择器",en:"Ignore node selectors",zh_TW:"不翻譯節點選擇器",ja:"翻訳しないノードセレクタ",ko:"번역 무시 노드 선택자",tr:"Düğüm Seçicileri Yoksay",vi:"Bộ chọn nút bỏ qua"},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 선택자 구문을 따릅니다.",tr:"1. Göz ardı edilecek düğümler. 2. CSS seçici sözdizimini takip edin.",vi:"1. Nodes to be ignored. 2. Follow CSS selector syntax."},terms:{zh:"专业术语",en:"Terms",zh_TW:"專業術語",ja:"専門用語",ko:"전문 용어",tr:"Şartlar",vi:"Thuật ngữ"},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. 번역이 없는 경우 해당 용어를 번역하지 않는 것으로 간주합니다.',tr:'1. Düzenli ifade eşleştirmeyi destekler, eğik çizgi gerekmez ve değiştiriciler desteklenmez. 2. Birden fazla terim yeni satır veya noktalı virgül ";" ile ayrılır. 3. Terimler ve çeviriler İngilizce virgül "," ile ayrılır. 4. Çeviri yoksa, terim çevrilmemiş olarak kabul edilir.',vi:'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.'},ai_terms:{zh:"AI专业术语",en:"AI Terms",zh_TW:"AI專業術語",ja:"AI専門用語",ko:"AI 전문 용어",tr:"AI Şartları",vi:"Thuật ngữ 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. 번역이 없는 경우 해당 용어를 번역하지 않는 것으로 간주합니다.',tr:'1. Yapay Zekâ Destekli Akıllı Değiştirme, Düzenli Ifadeleri Desteklemez. 2. Birden Fazla Terim, Yeni Satır Veya Noktalı Virgül ";" Ile Ayrılmalıdır. 3. Terimler Ve Çeviriler, İngilizce Virgül "," Ile Ayrılmalıdır. 4. Çeviri Yoksa, Terim Çevrilmemiş Olarak Kabul Edilecektir."',vi:'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.'},text_ext_style:{zh:"译文附加样式",en:"Translation additional styles",zh_TW:"譯文附加樣式",ja:"翻訳の追加スタイル",ko:"번역 추가 스타일",tr:"Çeviriye Ek Stiller",vi:"Kiểu bổ sung bản dịch"},selector_style:{zh:"选择器节点样式",en:"Selector Style",zh_TW:"選擇器節點樣式",ja:"セレクタノードスタイル",ko:"선택자 노드 스타일",tr:"Seçici Stili",vi:"Kiểu bộ chọn"},terms_style:{zh:"专业术语样式",en:"Terms Style",zh_TW:"專業術語樣式",ja:"専門用語スタイル",ko:"전문 용어 스타일",tr:"Terimler Stili",vi:"Kiểu thuật ngữ"},highlight_style:{zh:"词汇高亮样式",en:"Fav Words highlight style",zh_TW:"詞彙醒目標示樣式",ja:"単語ハイライトスタイル",ko:"단어 하이라이트 스타일",tr:"Favori Kelimeler Vurgu Stili",vi:"Kiểu tô sáng từ yêu thích"},selector_style_helper:{zh:"开启翻译时注入。",en:"It is injected when translation is turned on.",zh_TW:"在開啟翻譯時注入。",ja:"翻訳が有効なときに注入されます。",ko:"번역이 켜져 있을 때 주입됩니다.",tr:"Çeviri açıldığında enjekte edilir.",vi:"It is injected when translation is turned on."},selector_parent_style:{zh:"选择器父节点样式",en:"Parent Selector Style",zh_TW:"選擇器父節點樣式",ja:"親セレクタスタイル",ko:"부모 선택자 스타일",tr:"Ebeveyn Seçici Stili",vi:"Kiểu bộ chọn cha"},selector_grand_style:{zh:"选择器祖节点样式",en:"Grand Selector Style",zh_TW:"選擇器祖節點樣式",ja:"祖先セレクタスタイル",ko:"상위 선택자 스타일",tr:"Üst Seçici Stili",vi:"Kiểu bộ chọn ông"},inject_js:{zh:"注入JS",en:"Inject JS",zh_TW:"注入 JS",ja:"JSを注入",ko:"JS 주입",tr:"JS'yi Enjekte Et",vi:"Chèn 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    }",tr:"Ön yükleme sırasında enjekte edilir, sayfa başına yalnızca bir kez çalışır. Dahili global nesne KT: {\n      apiTranslate,\n      apiDectect,\n      apiSetting,\n      apisMap,\n      toLang,\n      docInfo,\n      glossary,\n    }",vi:"Được chèn khi tải trước, chỉ chạy một lần mỗi trang. Đối tượng toàn cục KT tích hợp: {\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 주입",tr:"CSS'yi Enjekte Et",vi:"Chèn CSS"},inject_css_helper:{zh:"预加载时注入,一个页面仅运行一次。",en:"Injected during preload, runs only once per page.",zh_TW:"預先載入時注入,一個頁面僅執行一次。",ja:"プリロード時に注入され、ページごとに1回だけ実行されます。",ko:"미리 로드 시 주입되며 페이지당 한 번만 실행됩니다.",tr:"Ön yükleme sırasında enjekte edildi",vi:"Được chèn khi tải trước, chỉ chạy một lần mỗi trang."},fixer_function:{zh:"修复函数",en:"Fixer Function",zh_TW:"修復函式",ja:"修正関数",ko:"수정 함수",tr:"Onarıcı Fonksiyonu",vi:"Hàm sửa lỗi"},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">로 대체됩니다.',tr:'1. br, <br> satır sonlarını <p "kiss-p"> ile değiştirir. 2. bn, \\n yeni satırı <p "kiss-p"> ile değiştirir. 3. brToDiv ve bnToDiv, <div class="kiss-p"> ile değiştirildi.',vi:'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">.'},import:{zh:"导入",en:"Import",zh_TW:"匯入",ja:"インポート",ko:"가져오기",tr:"İçe Aktar",vi:"Nhập"},export:{zh:"导出",en:"Export",zh_TW:"匯出",ja:"エクスポート",ko:"내보내기",tr:"Dışa Aktar",vi:"Xuất"},export_translation:{zh:"导出释义",en:"Export Translation",zh_TW:"匯出釋義",ja:"訳文のエクスポート",ko:"번역 내보내기",tr:"Çeviriyi Dışa Aktar",vi:"Xuất bản dịch"},error_cant_be_blank:{zh:"不能为空",en:"Can not be blank",zh_TW:"不可為空",ja:"空白にすることはできません",ko:"비워둘 수 없습니다",tr:"Boş Olamaz",vi:"Không được để trống"},error_duplicate_values:{zh:"存在重复的值",en:"There are duplicate values",zh_TW:"存在重複的值",ja:"重複する値が存在します",ko:"중복된 값이 있습니다",tr:"Yinelenen Değerler Var",vi:"Có giá trị trùng lặp"},error_wrong_file_type:{zh:"错误的文件类型",en:"Wrong file type",zh_TW:"檔案類型錯誤",ja:"不正なファイルタイプです",ko:"잘못된 파일 형식입니다",tr:"Yanlış Dosya Türü",vi:"Sai loại tệp"},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 주소가 올바른지 확인하거나 나중에 다시 시도하십시오.",tr:"Lütfen URL adresinin doğru olup olmadığını kontrol edin veya daha sonra tekrar deneyin.",vi:"Please check if the url address is correct or try again later."},deepl_api:{zh:"DeepL 接口",en:"DeepL API",zh_TW:"DeepL 介面",ja:"DeepL API",ko:"DeepL API",tr:"Deepl API'si",vi:"API DeepL"},deepl_key:{zh:"DeepL 密钥",en:"DeepL Key",zh_TW:"DeepL 金鑰",ja:"DeepL キー",ko:"DeepL 키",tr:"Deepl Anahtarı",vi:"Khóa DeepL"},openai_api:{zh:"OpenAI 接口",en:"OpenAI API",zh_TW:"OpenAI 介面",ja:"OpenAI API",ko:"OpenAI API",tr:"OpenAI API",vi:"API OpenAI"},openai_key:{zh:"OpenAI 密钥",en:"OpenAI Key",zh_TW:"OpenAI 金鑰",ja:"OpenAI キー",ko:"OpenAI 키",tr:"OpenAI Anahtarı",vi:"Khóa OpenAI"},openai_model:{zh:"OpenAI 模型",en:"OpenAI Model",zh_TW:"OpenAI 模型",ja:"OpenAI モデル",ko:"OpenAI 모델",tr:"OpenAI Modeli",vi:"Mô hình OpenAI"},openai_prompt:{zh:"OpenAI 提示词",en:"OpenAI Prompt",zh_TW:"OpenAI 提示詞",ja:"OpenAI プロンプト",ko:"OpenAI 프롬프트",tr:"OpenAI İstemi",vi:"Lời nhắc OpenAI"},if_clear_cache:{zh:"是否清除缓存(默认缓存7天)",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"是否清除快取(預設快取7天)",ja:"キャッシュをクリアしますか(デフォルトのキャッシュ期間は7日間です)",ko:"캐시를 지우시겠습니까 (기본 캐시 7일)",tr:"Önbelleğin Temizlenip Temizlenmeyeceği (Varsayılan Önbellek 7 Gündür)",vi:"Có xóa bộ nhớ đệm không (Mặc định 7 ngày)"},clear_cache_never:{zh:"不清除缓存",en:"Never clear cache",zh_TW:"不清除快取",ja:"キャッシュをクリアしない",ko:"캐시 지우지 않음",tr:"Önbelleği Hiçbir Zaman Temizleme",vi:"Không bao giờ xóa bộ nhớ đệm"},clear_cache_restart:{zh:"重启浏览器时清除缓存",en:"Clear cache when restarting browser",zh_TW:"重新啟動瀏覽器時清除快取",ja:"ブラウザ再起動時にキャッシュをクリア",ko:"브라우저 재시작 시 캐시 지우기",tr:"Tarayıcıyı Yeniden Başlatırken Önbelleği Temizle",vi:"Xóa bộ nhớ đệm khi khởi động lại trình duyệt"},data_sync_type:{zh:"同步方式",en:"Sync Type",zh_TW:"同步方式",ja:"同期方式",ko:"동기화 방식",tr:"Senkronizasyon Türü",vi:"Kiểu đồng bộ"},data_sync_url:{zh:"同步接口",en:"Sync API",zh_TW:"同步介面",ja:"同期API",ko:"동기화 API",tr:"API'yi Senkronize Et",vi:"API đồng bộ"},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 읽기/쓰기 권한이 필요합니다.",tr:"GitHub Gist seçildiğinde otomatik olarak gizli bir öz oluşturulacaktır. GitHub PAT'in Gists'in okuma ve yazma iznine ihtiyacı var.",vi:"A secret gist will be created automatically when GitHub Gist is selected. GitHub PAT needs Gists read and write permission."},data_sync_user:{zh:"同步账户",en:"Sync Account",zh_TW:"同步帳號",ja:"同期アカウント",ko:"동기화 계정",tr:"Hesabı Senkronize Et",vi:"Tài khoản đồng bộ"},data_sync_key:{zh:"同步密钥",en:"Sync Key",zh_TW:"同步金鑰",ja:"同期キー",ko:"동기화 키",tr:"Senkronizasyon Anahtarı",vi:"Khóa đồng bộ"},data_sync_encrypt_key:{zh:"加密口令",en:"Encryption Passphrase",zh_TW:"加密密碼",ja:"暗号化パスフレーズ",ko:"암호화 비밀번호",tr:"Şifreleme Parolası",vi:"Mật khẩu mã hóa"},set_sync_encrypt_key:{zh:"设定口令",en:"Set Passphrase",zh_TW:"設定密碼",ja:"パスフレーズを設定",ko:"암호문 설정",tr:"Parolayı Ayarla",vi:"Đặt mật khẩu"},change_sync_encrypt_key:{zh:"修改口令",en:"Change Passphrase",zh_TW:"修改密碼",ja:"パスフレーズを変更",ko:"암호문 변경",tr:"Parolayı Değiştir",vi:"Đổi mật khẩu"},sync_encrypt_key_not_set:{zh:"口令未设置,同步功能不可用。",en:"Passphrase is not set. Sync is unavailable.",zh_TW:"密碼未設定,同步功能無法使用。",ja:"パスフレーズが未設定のため、同期機能は使用できません。",ko:"암호문이 설정되지 않아 동기화 기능을 사용할 수 없습니다.",tr:"Parola ayarlanmadı. Senkronizasyon kullanılamıyor.",vi:"Passphrase is not set. Sync is unavailable."},old_sync_encrypt_key:{zh:"旧口令",en:"Old Passphrase",zh_TW:"舊密碼",ja:"旧パスフレーズ",ko:"기존 암호문",tr:"Eski Parola",vi:"Mật khẩu cũ"},new_sync_encrypt_key:{zh:"新口令",en:"New Passphrase",zh_TW:"新密碼",ja:"新しいパスフレーズ",ko:"새 암호문",tr:"Yeni Parola",vi:"Mật khẩu mới"},confirm_sync_encrypt_key:{zh:"确认口令",en:"Confirm Passphrase",zh_TW:"確認密碼",ja:"パスフレーズを確認",ko:"암호문 확인",tr:"Parolayı Onayla",vi:"Xác nhận mật khẩu"},sync_encrypt_key_too_short:{zh:"口令长度至少 6 位。",en:"Passphrase must be at least 6 characters.",zh_TW:"密碼長度至少 6 位。",ja:"パスフレーズは 6 文字以上にしてください。",ko:"암호문은 최소 6자 이상이어야 합니다.",tr:"Parola en az 6 karakterden oluşmalıdır.",vi:"Passphrase must be at least 6 characters."},sync_encrypt_key_mismatch:{zh:"两次输入的口令不一致。",en:"The two passphrases do not match.",zh_TW:"兩次輸入的密碼不一致。",ja:"入力した 2 つのパスフレーズが一致しません。",ko:"두 번 입력한 암호문이 일치하지 않습니다.",tr:"Her İki Parola Eşleşmiyor.",vi:"The two passphrases do not match."},old_sync_encrypt_key_invalid:{zh:"旧口令不正确。",en:"Old passphrase is incorrect.",zh_TW:"舊密碼不正確。",ja:"旧パスフレーズが正しくありません。",ko:"기존 암호문이 올바르지 않습니다.",tr:"Eski Parola Yanlış.",vi:"Old passphrase is incorrect."},clear_sync_encrypt_key:{zh:"清除本地口令",en:"Clear local passphrase",zh_TW:"清除本機密碼",ja:"ローカルのパスフレーズを消去",ko:"로컬 암호문 지우기",tr:"Yerel parolayı temizle",vi:"Xóa mật khẩu cục bộ"},clear_sync_encrypt_key_title:{zh:"清除本地同步口令?",en:"Clear local sync passphrase?",zh_TW:"清除本機同步密碼?",ja:"ローカルの同期パスフレーズを消去しますか?",ko:"로컬 동기화 암호문을 지울까요?",tr:"Yerel eşitleme parolası temizlensin mi?",vi:"Clear local sync passphrase?"},clear_sync_encrypt_key_message:{zh:"这不会修改云端数据。之后必须重新填入能解密云端数据的口令,才能继续同步。",en:"This does not change cloud data. You must enter the passphrase that decrypts it before syncing again.",zh_TW:"這不會修改雲端資料。之後必須重新填入可解密雲端資料的密碼,才能繼續同步。",ja:"クラウドデータは変更されません。再同期するには、クラウドデータを復号できるパスフレーズを再入力する必要があります。",ko:"클라우드 데이터는 변경되지 않습니다. 다시 동기화하려면 클라우드 데이터를 해독할 수 있는 암호문을 입력해야 합니다.",tr:"Bu işlem bulut verilerini değiştirmez. Yeniden eşitlemek için bulut verilerini çözebilen parolayı girmeniz gerekir.",vi:"This does not change cloud data. You must enter the passphrase that decrypts it before syncing again."},clear_sync_encrypt_key_confirm:{zh:"确认清除",en:"Clear passphrase",zh_TW:"確認清除",ja:"消去する",ko:"지우기",tr:"Parolayı temizle",vi:"Clear passphrase"},clear_sync_encrypt_key_success:{zh:"已清除本地同步口令。",en:"The local sync passphrase has been cleared.",zh_TW:"已清除本機同步密碼。",ja:"ローカルの同期パスフレーズを消去しました。",ko:"로컬 동기화 암호문을 지웠습니다.",tr:"Yerel eşitleme parolası temizlendi.",vi:"The local sync passphrase has been cleared."},sync_encrypt_key_change_failed:{zh:"修改口令失败。请保留旧口令和新口令,检查网络后重试;如果曾有部分数据已用新口令写入云端,必要时请清空远端同步文件后重新同步。",en:"Failed to change the passphrase. Keep both the old and new passphrases, check your network, and retry. If some cloud data was already written with the new passphrase, clear the remote sync files and sync again if needed.",zh_TW:"修改密碼失敗。請保留舊密碼和新密碼,檢查網路後重試;如果已有部分資料用新密碼寫入雲端,必要時請清空遠端同步檔案後重新同步。",ja:"パスフレーズの変更に失敗しました。旧パスフレーズと新パスフレーズの両方を保管し、ネットワークを確認してから再試行してください。一部のクラウドデータが新しいパスフレーズで書き込まれている場合は、必要に応じてリモート同期ファイルを削除してから再同期してください。",ko:"암호문 변경에 실패했습니다. 기존 암호문과 새 암호문을 모두 보관하고 네트워크를 확인한 뒤 다시 시도하세요. 일부 클라우드 데이터가 이미 새 암호문으로 쓰인 경우 필요하면 원격 동기화 파일을 비운 뒤 다시 동기화하세요.",tr:"Parola değiştirme işlemi başarısız oldu. Hem eski hem de yeni parolayı saklayın, ağınızı kontrol edin ve tekrar deneyin. Yeni parola ile bulut verilerine zaten bazı veriler yazılmışsa, uzaktan senkronizasyon dosyalarını temizleyin ve gerekirse tekrar senkronize edin",vi:"Failed to change the passphrase. Keep both the old and new passphrases, check your network, and retry. If some cloud data was already written with the new passphrase, clear the remote sync files and sync again if needed."},sync_now:{zh:"立即同步",en:"Sync Now",zh_TW:"立即同步",ja:"今すぐ同期",ko:"지금 동기화",tr:"Şimdi Senkronize Et",vi:"Đồng bộ ngay"},sync_success:{zh:"同步成功!",en:"Sync Success",zh_TW:"同步成功!",ja:"同期成功!",ko:"동기화 성공!",tr:"Senkronizasyon Başarılı",vi:"Đồng bộ thành công"},sync_failed:{zh:"同步失败!",en:"Sync Error",zh_TW:"同步失敗!",ja:"同期失敗!",ko:"동기화 실패!",tr:"Senkronizasyon Hatası",vi:"Lỗi đồng bộ"},error_got_some_wrong:{zh:"抱歉,出错了!",en:"Sorry, something went wrong!",zh_TW:"抱歉,發生錯誤!",ja:"申し訳ありません、エラーが発生しました!",ko:"죄송합니다, 오류가 발생했습니다!",tr:"Üzgünüm, Bir Sorun Oluştu",vi:"Xin lỗi, đã xảy ra lỗi!"},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"여야 하며, 모든 항목을 빠짐없이 입력해야 합니다.',tr:'Senkronizasyon Türünüz "KISS-Worker" Olmalı Ve Eksiksiz Olarak Doldurulmalıdır',vi:'Your sync type must be "KISS-Worker" and must be filled in completely'},click_test:{zh:"点击测试",en:"Click Test",zh_TW:"點選測試",ja:"クリックしてテスト",ko:"클릭 테스트",tr:"Test Et'I Tıklayın",vi:"Nhấp để kiểm tra"},test_success:{zh:"测试成功",en:"Test success",zh_TW:"測試成功",ja:"テスト成功",ko:"테스트 성공",tr:"Test Başarılı",vi:"Kiểm tra thành công"},test_failed:{zh:"测试失败",en:"Test failed",zh_TW:"測試失敗",ja:"テスト失敗",ko:"테스트 실패",tr:"Test Başarısız Oldu",vi:"Kiểm tra thất bại"},clear_all_cache_now:{zh:"立即清除全部缓存",en:"Clear all cache now",zh_TW:"立即清除全部快取",ja:"すべてのキャッシュを今すぐクリア",ko:"모든 캐시 지금 지우기",tr:"Tüm Önbelleği Şimdi Temizle",vi:"Xóa tất cả bộ nhớ đệm ngay"},clear_cache:{zh:"清除缓存",en:"Clear Cache",zh_TW:"清除快取",ja:"キャッシュをクリア",ko:"캐시 지우기",tr:"Önbelleği Temizle",vi:"Xóa bộ nhớ đệm"},disable_on_mobile:{zh:"移动端禁用",en:"Disable on Mobile",zh_TW:"行動裝置停用",ja:"モバイルで無効にする",ko:"모바일에서 비활성화",tr:"Mobil Cihazda Devre Dışı Bırak",vi:"Disable on Mobile"},clear_success:{zh:"清除成功",en:"Clear success",zh_TW:"清除成功",ja:"クリア成功",ko:"지우기 성공",tr:"Temizleme Başarılı",vi:"Xóa thành công"},clear_failed:{zh:"清除失败",en:"Clear failed",zh_TW:"清除失敗",ja:"クリア失敗",ko:"지우기 실패",tr:"Temizleme Başarısız Oldu",vi:"Xóa thất bại"},share:{zh:"分享",en:"Share",zh_TW:"分享",ja:"共有",ko:"공유",tr:"Paylaş",vi:"Chia sẻ"},clear_all:{zh:"清空",en:"Clear All",zh_TW:"清空",ja:"すべてクリア",ko:"모두 지우기",tr:"Tümünü Temizle",vi:"Xóa tất cả"},help:{zh:"求助",en:"Help",zh_TW:"求助",ja:"ヘルプ",ko:"도움말",tr:"Yardım",vi:"Trợ giúp"},restore_default:{zh:"恢复默认",en:"Restore Default",zh_TW:"恢復預設",ja:"デフォルトに戻す",ko:"기본값 복원",tr:"Varsayılanı Geri Yükle",vi:"Khôi phục mặc định"},shortcuts_setting:{zh:"快捷键设置",en:"Shortcuts Setting",zh_TW:"快速鍵設定",ja:"ショートカット設定",ko:"단축키 설정",tr:"Kısayol Ayarı",vi:"Cài đặt phím tắt"},toggle_translate_shortcut:{zh:'"开启翻译"快捷键',en:'"Toggle Translate" Shortcut',zh_TW:"「開啟翻譯」快速鍵",ja:"「翻訳切り替え」ショートカット",ko:'"번역 켜기" 단축키',tr:'"Çeviriyi Aç/Kapat" Kısayolu',vi:'Phím tắt "Bật/tắt Dịch"'},toggle_transonly_shortcut:{zh:'"隐藏原文"快捷键',en:'"Hide Original" Shortcut',zh_TW:"「隱藏原文」快速鍵",ja:"「原文を隠す」ショートカット",ko:'"원문 숨기기" 단축키',tr:'"Orijinali Gizle" Kısayolu',vi:'Phím tắt "Ẩn bản gốc"'},toggle_style_shortcut:{zh:'"切换样式"快捷键',en:'"Toggle Style" Shortcut',zh_TW:"「切換樣式」快速鍵",ja:"「スタイル切り替え」ショートカット",ko:'"스타일 전환" 단축키',tr:'"Stil Değiştir" Kısayolu',vi:'Phím tắt "Chuyển đổi Kiểu"'},toggle_popup_shortcut:{zh:'"打开弹窗"快捷键',en:'"Open Popup" Shortcut',zh_TW:"「開啟彈出視窗」快速鍵",ja:"「ポップアップを開く」ショートカット",ko:'"팝업 열기" 단축키',tr:'"Açılır Pencereyi Aç" Kısayolu',vi:'Phím tắt "Mở Bật lên"'},open_setting_shortcut:{zh:'"打开设置"快捷键',en:'"Open Setting" Shortcut',zh_TW:"「開啟設定」快速鍵",ja:"「設定を開く」ショートカット",ko:'"설정 열기" 단축키',tr:'"Ayarı Aç" Kısayolu',vi:'Phím tắt "Mở Cài đặt"'},firefox_shortcut_edit_hint:{zh:"Firefox 不支持直接打开扩展快捷键管理页。请在地址栏输入 about:addons,然后点击齿轮菜单中的“管理扩展快捷键”。",en:"Firefox cannot open the extension shortcut manager directly. Enter about:addons in the address bar, then select Manage Extension Shortcuts from the gear menu.",vi:"Firefox không thể mở trực tiếp trình quản lý phím tắt tiện ích. Nhập about:addons vào thanh địa chỉ, sau đó chọn Quản lý Phím tắt Tiện ích từ menu bánh răng."},hide_fab_button:{zh:"隐藏悬浮按钮",en:"Hide Fab Button",zh_TW:"隱藏浮動按鈕",ja:"フローティングボタンを隠す",ko:"플로팅 버튼 숨기기",tr:"Yüzen Eylem Düğmesini Gizle",vi:"Ẩn nút nổi"},fab_exception_list:{zh:"悬浮按钮特例名单",en:"Fab Button Exception List",zh_TW:"浮動按鈕例外清單",ja:"フローティングボタンの例外リスト",ko:"플로팅 버튼 예외 목록",tr:"Yüzen Düğme İstisna Listesi",vi:"Danh sách ngoại lệ nút nổi"},fab_exception_list_helper:{zh:"全局显示时,命中名单的页面隐藏按钮;全局隐藏时,命中名单的页面显示按钮。支持星号(*)通配符,多个网址用换行或逗号分隔。",en:"When shown globally, matching pages hide the button; when hidden globally, matching pages show it. Supports * wildcards; separate URLs with newlines or commas.",zh_TW:"全域顯示時,命中清單的頁面會隱藏按鈕;全域隱藏時,命中清單的頁面會顯示按鈕。支援星號 (*) 萬用字元,網址可用換行或逗號分隔。",ja:"グローバル表示時は一致するページでボタンを隠し、グローバル非表示時は一致するページでボタンを表示します。* のワイルドカードに対応し、URL は改行またはカンマで区切れます。",ko:"전역 표시 시 목록과 일치하는 페이지에서는 버튼을 숨기고, 전역 숨김 시에는 버튼을 표시합니다. * 와일드카드를 지원하며 URL은 줄바꿈 또는 쉼표로 구분합니다.",tr:"Genel olarak gösterildiğinde eşleşen sayfalarda düğme gizlenir; genel olarak gizlendiğinde eşleşen sayfalarda gösterilir. * joker karakteri desteklenir; URL'leri satır sonu veya virgülle ayırın.",vi:"When shown globally, matching pages hide the button; when hidden globally, matching pages show it. Supports * wildcards; separate URLs with newlines or commas."},fab_click_action:{zh:"单击悬浮按钮动作",en:"Single Click Fab Action",zh_TW:"點選浮動按鈕動作",ja:"フローティングボタンのクリック動作",ko:"플로팅 버튼 클릭 동작",tr:"Tek Tıklamayla Yüzen Eylem Düğmesi",vi:"Hành động nhấp nút nổi"},fab_click_menu:{zh:"弹出菜单",en:"Popup Menu",zh_TW:"彈出選單",ja:"メニューを開く",ko:"팝업 메뉴",tr:"Açılır Menü",vi:"Menu bật lên"},fab_click_translate:{zh:"直接翻译",en:"Translate",zh_TW:"直接翻譯",ja:"直接翻訳",ko:"바로 번역",tr:"Çevir",vi:"Dịch"},hide_tran_button:{zh:"隐藏翻译按钮",en:"Hide Translate Button",zh_TW:"隱藏翻譯按鈕",ja:"翻訳ボタンを隠す",ko:"번역 버튼 숨기기",tr:"Çevir Düğmesini Gizle",vi:"Ẩn nút dịch"},hide_click_away:{zh:"点击外部关闭弹窗",en:"Click outside to close the pop-up window",zh_TW:"點選外部區域關閉彈出視窗",ja:"外部クリックでポップアップを閉じる",ko:"바깥쪽 클릭 시 팝업 닫기",tr:"Açılır Pencereyi Kapatmak İçin Dışarıyı Tıklayın",vi:"Nhấp bên ngoài để đóng cửa sổ bật lên"},use_simple_style:{zh:"使用简洁界面",en:"Use a simple interface",zh_TW:"使用簡潔介面",ja:"シンプルUIを使用",ko:"간단한 인터페이스 사용",tr:"Basit Bir Arayüz Kullanın",vi:"Sử dụng giao diện đơn giản"},show:{zh:"显示",en:"Show",zh_TW:"顯示",ja:"表示",ko:"표시",tr:"Göster",vi:"Hiển thị"},hide:{zh:"隐藏",en:"Hide",zh_TW:"隱藏",ja:"非表示",ko:"숨기기",tr:"Gizle",vi:"Ẩn"},save_rule:{zh:"保存本站规则",en:"Save this site rule",zh_TW:"儲存本站規則",ja:"このサイトのルールを保存",ko:"이 사이트 규칙 저장",tr:"Bu Site Kuralını Kaydet",vi:"Lưu quy tắc trang này"},domain:{zh:"网域",en:"Domain",zh_TW:"網域",ja:"ドメイン",ko:"도메인",tr:"Alan",vi:"Tên miền"},global_rule:{zh:"全局规则",en:"Global Rule",zh_TW:"全域規則",ja:"グローバルルール",ko:"전역 규칙",tr:"Küresel Kural",vi:"Quy tắc toàn cục"},input_translate:{zh:"输入框翻译",en:"Input Box Translation",zh_TW:"輸入框翻譯",ja:"入力ボックス翻訳",ko:"입력창 번역",tr:"Giriş Kutusu Çevirisi",vi:"Dịch hộp nhập liệu"},use_input_box_translation:{zh:"启用输入框翻译",en:"Input Box Translation",zh_TW:"啟用輸入框翻譯",ja:"入力ボックス翻訳を有効にする",ko:"입력창 번역 사용",tr:"Giriş Kutusu Çevirisi",vi:"Dịch hộp nhập liệu"},input_selector:{zh:"输入框选择器",en:"Input Selector",zh_TW:"輸入框選擇器",ja:"入力ボックスセレクタ",ko:"입력창 선택자",tr:"Giriş Seçici",vi:"Bộ chọn đầu vào"},input_selector_helper:{zh:"用于输入框翻译。",en:"Used for input box translation.",zh_TW:"用於輸入框翻譯。",ja:"入力ボックスの翻訳に使用します。",ko:"입력창 번역에 사용됩니다.",tr:"Giriş kutusu çevirisi için kullanılır.",vi:"Used for input box translation."},trigger_trans_shortcut:{zh:"触发翻译快捷键",en:"Trigger Translation Shortcut Keys",zh_TW:"觸發翻譯快速鍵",ja:"翻訳ショートカットキー",ko:"번역 실행 단축키",tr:"Çeviri Kısayol Tuşlarını Tetikleyin",vi:"Phím tắt kích hoạt dịch"},trigger_trans_shortcut_help:{zh:"默认为单击“AltLeft+KeyI”",en:'Default is "AltLeft+KeyI"',zh_TW:"預設為按下「AltLeft+KeyI」",ja:"デフォルトは「AltLeft+KeyI」です",ko:'기본값 "AltLeft+KeyI"',tr:'Varsayılan "AltLeft+KeyI"',vi:'Default is "AltLeft+KeyI"'},shortcut_press_count:{zh:"快捷键连击次数",en:"Shortcut Press Number",zh_TW:"快速鍵連按次數",ja:"ショートカットの連続プレス回数",ko:"단축키 연속 입력 횟수",tr:"Kısayol Tuşuna Basın",vi:"Số lần nhấn phím tắt"},combo_timeout:{zh:"连击超时时间 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"連擊逾時 (10-1000ms)",ja:"連続プレスタイムアウト (10-1000ms)",ko:"연속 입력 시간 초과 (10-1000ms)",tr:"Kombo Zaman Aşımı (10-1000 Ms)",vi:"Thời gian chờ tổ hợp phím (10-1000ms)"},input_trans_start_sign:{zh:"翻译起始标识",en:"Translation Start Sign",zh_TW:"翻譯起始標記",ja:"翻訳開始記号",ko:"번역 시작 표시",tr:"Çeviri Başlangıç İşareti",vi:"Ký hiệu bắt đầu dịch"},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"',tr:'İşaretin sonuna hedef dil kodu eklenebilir, örneğin: "/en 你好", "/zh hello"',vi:'The target language code can be added after the sign, such as: "/en 你好", "/zh hello"'},detect_lang_remote:{zh:"远程语言检测",en:"Remote language detection",zh_TW:"遠端語言偵測",ja:"リモート言語検出",ko:"원격 언어 감지",tr:"Uzaktan Dil Algılama",vi:"Phát hiện ngôn ngữ từ xa"},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:"활성화하면 감지 정확도가 높아지지만 번역 속도가 느려질 수 있습니다. 적절히 활성화하십시오.",tr:"Etkinleştirildikten sonra algılama doğruluğu artacak, ancak çeviri hızı düşecektir. Lütfen uygun şekilde etkinleştirin.",vi:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate."},detect_lang_service:{zh:"语言检测服务",en:"Language detect service",zh_TW:"語言偵測服務",ja:"言語検出サービス",ko:"언어 감지 서비스",tr:"Dil Algılama Hizmeti",vi:"Dịch vụ phát hiện ngôn ngữ"},disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화",tr:"Devre Dışı",vi:"Tắt"},enable:{zh:"启用",en:"Enable",zh_TW:"啟用",ja:"有効",ko:"활성화",tr:"Etkin",vi:"Bật"},selection_translate:{zh:"划词翻译",en:"Selection Translation",zh_TW:"選取文字翻譯",ja:"選択翻訳",ko:"선택 번역",tr:"Seçim Çevirisi",vi:"Dịch vùng chọn"},toggle_selection_translate:{zh:"启用划词翻译",en:"Use Selection Translate",zh_TW:"啟用選取文字翻譯",ja:"選択翻訳を有効にする",ko:"선택 번역 사용",tr:"Seçim Çevirmeyi Kullan",vi:"Sử dụng dịch vùng chọn"},trigger_tranbox_shortcut:{zh:"显示翻译框/翻译选中文字快捷键",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"顯示翻譯框/翻譯選取文字快速鍵",ja:"翻訳ポップアップ表示/選択翻訳ショートカット",ko:"번역창 표시/선택 번역 단축키",tr:"Çeviri Açılır Penceresini Aç/Seçilen Kısayolu Çevir",vi:"Phím tắt Mở Bật lên Dịch/Dịch vùng chọn"},tranbtn_offset_x:{zh:"翻译按钮偏移X(±200)",en:"Translate Button Offset X (±200)",zh_TW:"翻譯按鈕位移 X(±200)",ja:"翻訳ボタンオフセットX (±200)",ko:"번역 버튼 오프셋 X (±200)",tr:"Çevirme Düğmesi Ofseti X (±200)",vi:"Độ lệch nút dịch X (±200)"},tranbtn_offset_y:{zh:"翻译按钮偏移Y(±200)",en:"Translate Button Offset Y (±200)",zh_TW:"翻譯按鈕位移 Y(±200)",ja:"翻訳ボタンオフセットY (±200)",ko:"번역 버튼 오프셋 Y (±200)",tr:"Çevirme Düğmesi Ofseti Y (±200)",vi:"Độ lệch nút dịch Y (±200)"},tranbox_offset_x:{zh:"翻译框偏移X(±200)",en:"Translate Box Offset X (±200)",zh_TW:"翻譯框位移 X(±200)",ja:"翻訳ボックスオフセットX (±200)",ko:"번역창 오프셋 X (±200)",tr:"Çevirme Kutusu Ofseti X (±200)",vi:"Độ lệch hộp dịch X (±200)"},tranbox_offset_y:{zh:"翻译框偏移Y(±200)",en:"Translate Box Offset Y (±200)",zh_TW:"翻譯框位移 Y(±200)",ja:"翻訳ボックスオフセットY (±200)",ko:"번역창 오프셋 Y (±200)",tr:"Çevirme Kutusu Ofseti Y (±200)",vi:"Độ lệch hộp dịch Y (±200)"},translated_text:{zh:"译文",en:"Translated Text",zh_TW:"譯文",ja:"翻訳済みテキスト",ko:"번역된 텍스트",tr:"Çevrilmiş Metin",vi:"Văn bản đã dịch"},original_text:{zh:"原文",en:"Original Text",zh_TW:"原文",ja:"原文",ko:"원본 텍스트",tr:"Orijinal Metin",vi:"Văn bản gốc"},favorite_words:{zh:"收藏词汇",en:"Favorite Words",zh_TW:"收藏詞彙",ja:"お気に入り単語",ko:"즐겨찾는 단어",tr:"Favori Kelimeler",vi:"Từ yêu thích"},touch_setting:{zh:"触屏设置",en:"Touch Setting",zh_TW:"觸控設定",ja:"タッチ設定",ko:"터치 설정",tr:"Dokunma Ayarı",vi:"Cài đặt cảm ứng"},touch_translate_shortcut:{zh:"触屏翻译快捷方式 (支持多选)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"觸控翻譯捷徑 (支援多選)",ja:"タッチ翻訳ショートカット (複数選択可)",ko:"터치 번역 단축키 (다중 선택 지원)",tr:"Dokunmatik Çeviri Kısayolu (Birden Fazla Desteklenir)",vi:"Phím tắt Dịch Cảm ứng (hỗ trợ nhiều)"},touch_tap_0:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화",tr:"Devre Dışı",vi:"Tắt"},touch_tap_2:{zh:"双指轻触",en:"Two finger tap",zh_TW:"雙指輕觸",ja:"2本指タップ",ko:"두 손가락 탭",tr:"İki Parmakla Dokunma",vi:"Chạm hai ngón"},touch_tap_3:{zh:"三指轻触",en:"Three finger tap",zh_TW:"三指輕觸",ja:"3本指タップ",ko:"세 손가락 탭",tr:"Üç Parmakla Dokunma",vi:"Chạm ba ngón"},touch_tap_4:{zh:"四指轻触",en:"Four finger tap",zh_TW:"四指輕觸",ja:"4本指タップ",ko:"네 손가락 탭",tr:"Dört Parmakla Dokunma",vi:"Chạm bốn ngón"},touch_tap_5:{zh:"单指双击",en:"Double-click",zh_TW:"單指雙擊",ja:"ダブルクリック",ko:"더블 클릭",tr:"Çift Tıklama",vi:"Nhấp đúp"},touch_tap_6:{zh:"单指三击",en:"Triple-click",zh_TW:"單指三擊",ja:"トリプルクリック",ko:"트리플 클릭",tr:"Üçlü Tıklama",vi:"Nhấp ba lần"},touch_tap_7:{zh:"双指双击",en:"Two-finger double-click",zh_TW:"雙指雙擊",ja:"2本指ダブルクリック",ko:"두 손가락 더블 클릭",tr:"İki Parmakla Çift Tıklama",vi:"Chạm hai ngón nhấp đúp"},translate_blacklist:{zh:"禁用翻译名单",en:"Translate Blacklist",zh_TW:"停用翻譯名單",ja:"翻訳ブラックリスト",ko:"번역 블랙리스트",tr:"Kara Listeyi Çevir",vi:"Danh sách đen dịch"},blacklist:{zh:"禁用黑名单",en:"Blacklist",zh_TW:"停用黑名單",ja:"ブラックリスト",ko:"블랙리스트",tr:"Kara Liste",vi:"Danh sách đen"},add_to_blacklist:{zh:"加入黑名单",en:"Add to Blacklist",zh_TW:"加入黑名單",ja:"ブラックリストに追加",ko:"블랙리스트에 추가",tr:"Kara Listeye Ekle",vi:"Thêm vào danh sách đen"},remove_from_blacklist:{zh:"移出黑名单",en:"Remove from Blacklist",zh_TW:"移出黑名單",ja:"ブラックリストから削除",ko:"블랙리스트에서 제거",tr:"Kara Listeden Kaldır",vi:"Xóa khỏi danh sách đen"},disabled_orilist:{zh:"禁用Origin名单",en:"Disabled Origin List",zh_TW:"停用 Origin 名單",ja:"無効化Originリスト",ko:"비활성화된 Origin 목록",tr:"Devre Dışı Bırakılan Kaynak Listesi",vi:"Danh sách Origin bị tắt"},disabled_csplist:{zh:"禁用CSP名单",en:"Disabled CSP List",zh_TW:"停用 CSP 名單",ja:"無効化CSPリスト",ko:"비활성화된 CSP 목록",tr:"Devre Dışı CSP Listesi",vi:"Danh sách CSP bị tắt"},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를 주입할 수 있습니다. 관련된 위험을 인지하고 있는 경우가 아니라면 주의해서 사용하십시오.",tr:"3. CSP politikasını ayarlayarak, bazı sayfalara JS/CSS/Medya dosyaları eklenebilir. İlgili risklerin farkında değilseniz, lütfen dikkatli kullanın.",vi:"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."},skip_langs:{zh:"不翻译的语言",en:"Disable Languages",zh_TW:"不翻譯的語言",ja:"翻訳しない言語",ko:"번역하지 않을 언어",tr:"Dilleri Devre Dışı Bırak",vi:"Tắt ngôn ngữ"},skip_langs_helper:{zh:"此功能依赖准确的语言检测,建议启用远程语言检测。",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"此功能仰賴準確的語言偵測,建議啟用遠端語言偵測。",ja:"この機能は正確な言語検出に依存しているため、リモート言語検出を有効にすることをお勧めします。",ko:"이 기능은 정확한 언어 감지에 의존하므로 원격 언어 감지를 활성화하는 것이 좋습니다.",tr:"Bu özellik, doğru dil algılamasına bağlıdır. Uzaktan dil algılamayı etkinleştirmeniz önerilir",vi:"This feature relies on accurate language detection. It is recommended to enable remote language detection."},translate_variants:{zh:"变体互译",en:"Translate Language Variants",zh_TW:"語言變體互譯",ja:"言語バリアント間を翻訳",ko:"언어 변형 간 번역",tr:"Dil Varyantlarını Çevir",vi:"Dịch giữa các biến thể ngôn ngữ"},translate_variants_helper:{zh:"开启后,简体中文与繁体中文等语言变体会继续翻译;关闭后将其视为同一语言并跳过。",en:"When enabled, variants such as Simplified and Traditional Chinese are translated between each other. When disabled, they are treated as the same language and skipped.",zh_TW:"開啟後,簡體中文與繁體中文等語言變體會繼續翻譯;關閉後將其視為同一語言並略過。",ja:"有効にすると、簡体字中国語と繁体字中国語などの言語バリアント間も翻訳します。無効にすると同じ言語としてスキップします。",ko:"활성화하면 중국어 간체와 번체 같은 언어 변형 간에도 번역합니다. 비활성화하면 같은 언어로 간주하여 건너뜁니다.",tr:"Etkinleştirildiğinde Basitleştirilmiş ve Geleneksel Çince gibi dil varyantları arasında çeviri yapılır. Devre dışı bırakıldığında aynı dil sayılarak atlanır.",vi:"Khi bật, các biến thể như tiếng Trung giản thể và phồn thể sẽ được dịch qua lại. Khi tắt, chúng được xem là cùng một ngôn ngữ và bị bỏ qua."},context_menus:{zh:"右键菜单",en:"Context Menus",zh_TW:"右鍵選單",ja:"コンテキストメニュー",ko:"컨텍스트 메뉴",tr:"İçerik Menüleri",vi:"Menu ngữ cảnh"},hide_context_menus:{zh:"隐藏右键菜单",en:"Hide Context Menus",zh_TW:"隱藏右鍵選單",ja:"コンテキストメニューを隠す",ko:"컨텍스트 메뉴 숨기기",tr:"İçerik Menülerini Gizle",vi:"Ẩn menu ngữ cảnh"},simple_context_menus:{zh:"简单右键菜单",en:"Simple_context_menus Context Menus",zh_TW:"簡易右鍵選單",ja:"シンプルコンテキストメニュー",ko:"간단한 컨텍스트 메뉴",tr:"Basit İçerik Menüleri",vi:"Menu ngữ cảnh đơn giản"},secondary_context_menus:{zh:"二级右键菜单",en:"Secondary Context Menus",zh_TW:"次級右鍵選單",ja:"サブコンテキストメニュー",ko:"보조 컨텍스트 메뉴",tr:"İkincil İçerik Menüleri",vi:"Menu ngữ cảnh thứ cấp"},mulkeys_help:{zh:"支持用换行或英文逗号“,”分隔,轮询调用。",en:'Supports polling calls separated by newlines or English commas ",".',zh_TW:"支援以換行或英文逗號「,」分隔,輪詢呼叫。",ja:"改行または英語のコンマ「,」で区切ってポーリングコールをサポートします。",ko:'줄바꿈 또는 영어 쉼표 ","로 구분된 폴링 호출을 지원합니다.',tr:'Anket çağrılarının yeni satırlarla veya İngilizce virgüllerle ayrılmasını destekler"',vi:'Supports polling calls separated by newlines or English commas ",".'},translation_element_tag:{zh:"译文元素标签",en:"Translation Element Tag",zh_TW:"譯文元素標籤",ja:"翻訳要素タグ",ko:"번역 요소 태그",tr:"Çeviri Öğesi Etiketi",vi:"Thẻ phần tử dịch"},show_only_translations:{zh:"仅显示译文",en:"Show Only Translations",zh_TW:"僅顯示譯文",ja:"翻訳のみ表示",ko:"번역만 보기",tr:"Yalnızca Çevirileri Göster",vi:"Chỉ hiển thị bản dịch"},show_only_translations_help:{zh:"非完美实现,某些页面可能有样式等问题。",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"此為非完美實作,部分頁面可能出現樣式等問題。",ja:"完全な実装ではなく、一部のページでスタイルの問題が発生する可能性があります。",ko:"완벽한 구현이 아니며 일부 페이지에서 스타일 문제가 발생할 수 있습니다.",tr:"Mükemmel bir uygulama değildir ve bazı sayfalarda stil sorunları olabilir",vi:"It is not a perfect implementation and some pages may have style issues."},trans_order:{zh:"文本顺序",en:"Translation Order",zh_TW:"文字順序",ja:"テキスト順序",ko:"텍스트 순서",tr:"Çeviri Sırası",vi:"Thứ tự dịch"},wrap_original:{zh:"包裹原文",en:"Wrap Original Text",zh_TW:"包裹原文",ja:"原文をラップ",ko:"원문 감싸기",tr:"Orijinal Metni Sar",vi:"Bọc văn bản gốc"},original_first:{zh:"原文在上方",en:"Original First",zh_TW:"原文在上方",ja:"原文が最初",ko:"원문이 먼저",tr:"Orijinal İlk",vi:"Bản gốc trước"},translation_first:{zh:"译文在上方",en:"Translation First",zh_TW:"譯文在上方",ja:"翻訳が最初",ko:"번역이 먼저",tr:"Çeviri İlk",vi:"Bản dịch trước"},transonly_revert:{zh:"悬浮显示原文",en:"Hover to Show Original",zh_TW:"滑鼠懸停時顯示原文",ja:"ホバーで原文を表示",ko:"호버 시 원문 표시",tr:"Orijinali Göstermek İçin Üzerine Gelin",vi:"Di chuột để hiện bản gốc"},transonly_revert_delay:{zh:"悬浮延迟(秒)",en:"Hover Delay (seconds)",zh_TW:"滑鼠懸停延遲(秒)",ja:"ホバー遅延(秒)",ko:"호버 지연(초)",tr:"Vurgulu Gecikme (Saniye)",vi:"Độ trễ di chuột (giây)"},translate_page_title:{zh:"是否翻译页面标题",en:"Translate Page Title",zh_TW:"是否翻譯頁面標題",ja:"ページタイトルを翻訳する",ko:"페이지 제목 번역",tr:"Sayfa Başlığını Çevir",vi:"Dịch tiêu đề trang"},more:{zh:"更多",en:"More",zh_TW:"更多",ja:"もっと見る",ko:"더보기",tr:"Daha Fazla",vi:"Thêm"},less:{zh:"更少",en:"Less",zh_TW:"更少",ja:"少なく",ko:"줄이기",tr:"Daha Az",vi:"Ẩn bớt"},fixer_selector:{zh:"网页修复选择器",en:"Fixer Selector",zh_TW:"網頁修復選擇器",ja:"Web修正セレクタ",ko:"웹페이지 수정 선택자",tr:"Onarıcı Seçici",vi:"Bộ chọn sửa lỗi"},trigger_mode:{zh:"触发方式",en:"Trigger Mode",zh_TW:"觸發方式",ja:"トリガーモード",ko:"트리거 모드",tr:"Tetikleme Modu",vi:"Chế độ kích hoạt"},trigger_click:{zh:"点击触发",en:"Click Trigger",zh_TW:"點選觸發",ja:"クリックトリガー",ko:"클릭 트리거",tr:"Tıklama Tetikleyicisi",vi:"Kích hoạt khi nhấp"},trigger_hover:{zh:"鼠标悬停触发",en:"Hover Trigger",zh_TW:"滑鼠懸停觸發",ja:"ホバートリガー",ko:"호버 트리거",tr:"Fareyle Üzerine Gelme Tetikleyicisi",vi:"Kích hoạt khi di chuột"},trigger_select:{zh:"选中触发",en:"Select Trigger",zh_TW:"選取觸發",ja:"選択トリガー",ko:"선택 트리거",tr:"Tetikleyiciyi Seçin",vi:"Kích hoạt khi chọn"},trigger_dblclick:{zh:"双击触发",en:"Double-click Trigger",zh_TW:"雙擊觸發",ja:"ダブルクリックトリガー",ko:"더블클릭 트리거",tr:"Çift Tıklama Tetikleyicisi",vi:"Kích hoạt khi nhấp đúp"},tranbtn_position_mode:{zh:"弹出按钮位置",en:"Popup Button Position",zh_TW:"彈出按鈕位置",ja:"ポップアップボタン位置",ko:"팝업 버튼 위치",tr:"Açılır Düğme Konumu",vi:"Vị trí nút bật lên"},tranbtn_position_fixed:{zh:"固定位置",en:"Fixed Position",zh_TW:"固定位置",ja:"固定位置",ko:"고정 위치",tr:"Sabit Pozisyon",vi:"Vị trí cố định"},tranbtn_position_mouse:{zh:"跟随鼠标",en:"Follow Mouse",zh_TW:"跟隨滑鼠",ja:"マウスに追従",ko:"마우스 따라가기",tr:"Fareyi Takip Et",vi:"Theo chuột"},extend_styles:{zh:"附加样式",en:"Extend Styles",zh_TW:"附加樣式",ja:"拡張スタイル",ko:"확장 스타일",tr:"Stilleri Genişlet",vi:"Mở rộng kiểu dáng"},custom_option:{zh:"自定义选项",en:"Custom Option",zh_TW:"自訂選項",ja:"カスタムオプション",ko:"사용자 지정 옵션",tr:"Özel Seçenek",vi:"Tùy chọn tùy chỉnh"},translate_selected_text:{zh:"翻译选中文字",en:"Translate Selected Text",zh_TW:"翻譯選取文字",ja:"選択したテキストを翻訳",ko:"선택한 텍스트 번역",tr:"Seçilen Metni Çevir",vi:"Dịch văn bản đã chọn"},toggle_style:{zh:"切换样式",en:"Toggle Style",zh_TW:"切換樣式",ja:"スタイルを切り替え",ko:"스타일 전환",tr:"Stili Değiştir",vi:"Chuyển đổi kiểu dáng"},open_menu:{zh:"打开弹窗菜单",en:"Open Popup Menu",zh_TW:"開啟彈出視窗選單",ja:"ポップアップメニューを開く",ko:"팝업 메뉴 열기",tr:"Açılır Menüyü Aç",vi:"Mở menu bật lên"},open_setting:{zh:"打开设置",en:"Open Setting",zh_TW:"開啟設定",ja:"設定を開く",ko:"설정 열기",tr:"Ayarı Aç",vi:"Mở cài đặt"},follow_selection:{zh:"翻译框跟随选中文本",en:"Transbox Follow Selection",zh_TW:"翻譯框跟隨選取文字",ja:"翻訳ボックスを選択範囲に追従",ko:"번역 상자가 선택 항목 따라가기",tr:"Çeviri Kutusu Takip Seçimi",vi:"Hộp dịch theo vùng chọn"},tranbox_auto_height:{zh:"翻译框自适应高度",en:"Translation box adaptive height",zh_TW:"翻譯框自適應高度",ja:"翻訳ボックスの高さ自動調整",ko:"번역 상자 높이 자동 조절",tr:"Çeviri Kutusu Uyarlanabilir Yükseklik",vi:"Hộp dịch tự động chiều cao"},tranbox_interact_mode:{zh:"翻译框内交互模式",en:"Transbox Interact Mode",zh_TW:"翻譯框內互動模式",ja:"翻訳ボックス内インタラクションモード",ko:"번역 상자 내 인터랙션 모드",tr:"Çeviri Kutusu Etkileşim Modu",vi:"Chế độ tương tác trong hộp dịch"},tranbox_interact_click:{zh:"单击选中文本触发翻译",en:"Click selected text to translate",zh_TW:"單擊選取文字觸發翻譯",ja:"選択したテキストをクリックして翻訳",ko:"선택한 텍스트를 클릭하여 번역",tr:"Çevirmek İçin Seçilen Metni Tıklayın",vi:"Nhấp văn bản đã chọn để dịch"},tranbox_interact_dblclick:{zh:"双击选中文本触发翻译",en:"Double-click selected text to translate",zh_TW:"雙擊選取文字觸發翻譯",ja:"選択したテキストをダブルクリックして翻訳",ko:"선택한 텍스트를 더블클릭하여 번역",tr:"Çevirmek İçin Seçilen Metni Çift Tıklayın",vi:"Nhấp đúp văn bản đã chọn để dịch"},selection_skip_langs:{zh:"忽略的语言",en:"Ignore Languages",zh_TW:"忽略的語言",ja:"無視する言語",ko:"무시할 언어",tr:"Dilleri Yoksay",vi:"Bỏ qua ngôn ngữ"},selection_skip_langs_helper:{zh:"列表中的语言不弹窗(设定后,第二目标语言互译功能将自动禁用)",en:"Don't show popup for languages in this list (when enabled, will automatically disable bidirectional translation for the second target language)",zh_TW:"列表中的語言不彈窗(設定後,第二目標語言的互譯功能將自動禁用)",ja:"リスト内の言語はポップアップを表示しません(有効にすると、第二の対象言語の双方向翻訳機能が自動的に無効になります)",ko:"목록에 있는 언어는 팝업을 표시하지 않습니다 (활성화 시, 두 번째 대상 언어의 양방향 번역 기능이 자동으로 비활성화됩니다)",tr:"Bu listedeki diller için açılır pencere gösterilmez (etkinleştirildiğinde, ikinci hedef dil için çift yönlü çeviri işlevi otomatik olarak devre dışı bırakılır)",vi:"Don't show popup for languages in this list (when enabled, will automatically disable bidirectional translation for the second target language)"},translate_start_hook:{zh:"翻译开始钩子函数",en:"Translate Start Hook",zh_TW:"翻譯開始 Hook",ja:"翻訳開始フック",ko:"번역 시작 후크",tr:"Çeviri Başladığında Tetiklenen İşlev",vi:"Hook bắt đầu dịch"},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,}",tr:"Çeviriden önce çalıştırılır, giriş parametreleri şunlardır: {text,\n      fromLang,\n      toLang,\n      apiSetting,\n      docInfo,\n      glossary,}",vi:"Chạy trước khi dịch, tham số đầu vào: {text,\n      fromLang,\n      toLang,\n      apiSetting,\n      docInfo,\n      glossary,}"},translate_end_hook:{zh:"翻译完成钩子函数",en:"Translate End Hook",zh_TW:"翻譯完成 Hook",ja:"翻訳完了フック",ko:"번역 완료 후크",tr:"Çeviri Bittiğinde Tetiklenen İşlev",vi:"Hook kết thúc dịch"},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})",tr:"Çeviri tamamlandığında, giriş parametreleri şunlardır: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",vi:"Chạy khi dịch hoàn tất, tham số đầu vào: ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"翻译移除钩子函数",en:"Translate Removed Hook",zh_TW:"翻譯移除 Hook",ja:"翻訳削除フック",ko:"번역 제거 후크",tr:"Çeviri Kaldırıldığında Tetiklenen İşlev",vi:"Hook xóa bản dịch"},translate_remove_hook_helper:{zh:"翻译移除时运行,入参为: 翻译节点。",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"移除翻譯時執行,輸入參數為:翻譯節點。",ja:"翻訳削除時に実行、入力パラメータ: 翻訳ノード。",ko:"번역 제거 시 실행, 입력 매개변수: 번역 노드.",tr:"Çeviri kaldırıldığında çalıştırılır, giriş parametreleri şunlardır: çeviri düğümü.",vi:"Chạy khi bản dịch bị xóa, tham số đầu vào: nút dịch."},english_dict:{zh:"英文词典",en:"English Dictionary",zh_TW:"英文字典",ja:"英語辞書",ko:"영어 사전",tr:"İngilizce Sözlük",vi:"Từ điển Anh"},default_dict:{zh:"默认词典",en:"Default Dictionary",zh_TW:"預設詞典",ja:"既定の辞書",ko:"기본 사전",tr:"Varsayılan Sözlük",vi:"Từ điển mặc định"},ai_dict:{zh:"AI 词典",en:"AI Dictionary",zh_TW:"AI 詞典",ja:"AI 辞書",ko:"AI 사전",tr:"AI Sözlüğü",vi:"Từ điển AI"},ai_dict_api:{zh:"AI 词典接口",en:"AI Dictionary API",zh_TW:"AI 詞典介面",ja:"AI 辞書 API",ko:"AI 사전 API",tr:"AI Sözlük API'si",vi:"API từ điển AI"},ai_dict_prompt:{zh:"AI 词典提示词",en:"AI Dictionary Prompt",zh_TW:"AI 詞典提示詞",ja:"AI 辞書プロンプト",ko:"AI 사전 프롬프트",tr:"AI Sözlük İstemi",vi:"Lời nhắc từ điển AI"},english_suggest:{zh:"英文建议",en:"English Suggest",zh_TW:"英文建議",ja:"英語サジェスト",ko:"영어 제안",tr:"İngilizce Öneri",vi:"Gợi ý tiếng Anh"},api_name:{zh:"接口名称",en:"API Name",zh_TW:"介面名稱",ja:"API名",ko:"API 이름",tr:"API Adı",vi:"Tên API"},model_list_url:{zh:"模型列表URL",en:"Model List URL",zh_TW:"模型列表URL",ja:"モデル一覧URL",ko:"모델 목록 URL",tr:"Model Listesi URL'si",vi:"URL danh sách mô hình"},model_list_loading:{zh:"正在加载模型列表...",en:"Loading model list...",zh_TW:"正在載入模型列表...",ja:"モデル一覧を読み込み中...",ko:"모델 목록을 불러오는 중...",tr:"Model Listesi Yükleniyor...",vi:"Đang tải danh sách mô hình..."},model_list_fetch_failed:{zh:"模型列表加载失败",en:"Failed to load model list",zh_TW:"模型列表載入失敗",ja:"モデル一覧の読み込みに失敗しました",ko:"모델 목록을 불러오지 못했습니다",tr:"Model Listesi Yüklenemedi",vi:"Không tải được danh sách mô hình"},model_list_empty:{zh:"未获取到模型列表,可手动填写",en:"No models found. You can enter one manually.",zh_TW:"未取得模型列表,可手動填寫",ja:"モデルが見つかりません。手動入力できます。",ko:"모델을 찾을 수 없습니다. 직접 입력할 수 있습니다.",tr:"Hiçbir model bulunamadı. Manuel olarak bir tane girebilirsiniz.",vi:"Không tìm thấy mô hình. Bạn có thể nhập thủ công."},sort_order:{zh:"排序权重",en:"Sort Order",zh_TW:"排序權重",ja:"ソート順序",ko:"정렬 순서",tr:"Sıralama Düzeni",vi:"Thứ tự sắp xếp"},sort_order_help:{zh:"数值越小越靠前",en:"Smaller values appear first",zh_TW:"數值越小越靠前",ja:"小さい値が先に表示されます",ko:"작은 값이 먼저 표시됩니다",tr:"Önce Küçük Değerler Görünür",vi:"Giá trị nhỏ hơn hiển thị trước"},is_disabled:{zh:"是否禁用",en:"Is Disabled",zh_TW:"是否停用",ja:"無効にする",ko:"비활성화 여부",tr:"Devre dışı Bırakıldı",vi:"Đã tắt"},is_pinned:{zh:"是否置顶",en:"Is Pinned",zh_TW:"是否置頂",ja:"ピン留め",ko:"고정 여부",tr:"Sabitlendi",vi:"Đã ghim"},sort_alphabetically:{zh:"按字母排序",en:"Sort Alphabetically",zh_TW:"按字母排序",ja:"アルファベット順",ko:"알파벳순 정렬",tr:"Alfabetik Olarak Sırala",vi:"Sắp xếp theo bảng chữ cái"},translate_selected:{zh:"是否启用划词翻译",en:"If translate selected",zh_TW:"是否啟用選取文字翻譯",ja:"選択範囲の翻訳を有効にする",ko:"선택 번역 사용 여부",tr:"Çeviri Seçeneği Seçilirse",vi:"Nếu dịch vùng chọn"},use_batch_fetch:{zh:"是否聚合发送翻译请求",en:"Whether to aggregate and send translation requests",zh_TW:"是否彙整發送翻譯請求",ja:"翻訳リクエストをまとめて送信",ko:"번역 요청 일괄 전송 여부",tr:"Çeviri isteklerini bir araya getirip göndermeye karar verilip verilmeyeceği",vi:"Có gộp và gửi yêu cầu dịch không"},batch_interval:{zh:"聚合请求等待时间(10-10000)",en:"Aggregation request waiting time (10-10000)",zh_TW:"彙整請求等待時間(10-10000)",ja:"一括リクエストの待機時間(10-10000)",ko:"일괄 요청 대기 시간(10-10000)",tr:"Toplama İsteği Bekleme Süresi (10-10000)",vi:"Thời gian chờ yêu cầu gộp (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)",tr:"Toplama İsteğindeki Maksimum Paragraf Sayısı (1-100)",vi:"Số đoạn tối đa trong một yêu cầu gộp (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)",tr:"Toplama Istekleri İçin Maksimum Metin Uzunluğu (1000-100000)",vi:"Độ dài văn bản tối đa cho yêu cầu gộp (1000-100000)"},batch_concurrency:{zh:"聚合批次并发数(1-100)",en:"Concurrent aggregation batches (1-100)",zh_TW:"彙整批次並行數(1-100)",ja:"同時実行する一括リクエスト数(1-100)",ko:"동시 일괄 요청 수(1-100)",tr:"Eşzamanlı Toplama Grubu Sayısı (1-100)",vi:"Số lô gộp đồng thời (1-100)"},batch_concurrency_context_hint:{zh:"上下文会话要求批次按顺序执行,因此并发数固定为 1",en:"Context sessions require ordered batches, so concurrency is fixed at 1",zh_TW:"上下文會話要求批次依序執行,因此並行數固定為 1",ja:"コンテキスト利用時は順序を保つため、同時実行数は1に固定されます",ko:"컨텍스트 세션은 순차 실행이 필요하므로 동시 실행 수는 1로 고정됩니다",tr:"Bağlam oturumları sıralı gruplar gerektirdiğinden eşzamanlılık 1 olarak sabitlenir",vi:"Phiên ngữ cảnh yêu cầu lô theo thứ tự, đồng thời cố định là 1"},use_stream:{zh:"是否启用流式传输",en:"Whether to enable streaming",zh_TW:"是否啟用串流傳輸",ja:"ストリーミングを有効にする",ko:"스트리밍 활성화 여부",tr:"Akışın Etkinleştirilip Etkinleştirilmeyeceği",vi:"Có bật truyền trực tuyến không"},stream_render_mode:{zh:"流式渲染模式",en:"Stream render mode",zh_TW:"串流渲染模式",ja:"ストリーミングレンダリングモード",ko:"스트리밍 렌더링 모드",tr:"Akış Oluşturma Modu",vi:"Chế độ kết xuất trực tuyến"},stream_render_realtime:{zh:"实时渲染",en:"Realtime render",zh_TW:"即時渲染",ja:"リアルタイムレンダリング",ko:"실시간 렌더링",tr:"Gerçek Zamanlı Oluşturma",vi:"Kết xuất thời gian thực"},stream_render_segment:{zh:"片段渲染",en:"Segment render",zh_TW:"片段渲染",ja:"セグメントレンダリング",ko:"세그먼트 렌더링",tr:"Segment Oluşturma",vi:"Kết xuất theo đoạn"},use_context:{zh:"是否启用智能上下文",en:"Whether to enable AI context",zh_TW:"是否啟用智慧上下文",ja:"AIコンテキストを有効にする",ko:"AI 컨텍스트 활성화 여부",tr:"AI İçeriklerinin Etkinleştirilip Etkinleştirilmeyeceği",vi:"Có bật ngữ cảnh AI không"},context_size:{zh:"上下文会话数量(1-20)",en:"Number of context sessions(1-20)",zh_TW:"上下文會話數量(1-20)",ja:"コンテキストセッション数(1-20)",ko:"컨텍스트 세션 수(1-20)",tr:"İçerik Oturumlarının Sayısı (1-20)",vi:"Số phiên ngữ cảnh (1-20)"},auto_scan_page:{zh:"自动扫描页面",en:"Auto scan page",zh_TW:"自動掃描頁面",ja:"ページを自動スキャン",ko:"페이지 자동 스캔",tr:"Sayfayı Otomatik Tara",vi:"Tự động quét trang"},has_rich_text:{zh:"启用富文本翻译",en:"Enable rich text translation",zh_TW:"啟用富文字翻譯",ja:"リッチテキスト翻訳を有効にする",ko:"리치 텍스트 번역 활성화",tr:"Zengin Metin Çevirisini Etkinleştir",vi:"Bật dịch văn bản có định dạng"},has_shadowroot:{zh:"扫描Shadowroot",en:"Scan Shadowroot",zh_TW:"掃描Shadowroot",ja:"Shadowrootをスキャン",ko:"Shadowroot 스캔",tr:"Shadowroot'u Tara",vi:"Quét Shadowroot"},mousehover_translate:{zh:"鼠标悬停翻译",en:"Mouseover Translation",zh_TW:"滑鼠懸停翻譯",ja:"マウスオーバー翻訳",ko:"마우스오버 번역",tr:"Fareyle Üzerine Gelme Çevirisi",vi:"Dịch khi di chuột"},use_mousehover_translation:{zh:"启用鼠标悬停翻译",en:"Enable mouseover translation",zh_TW:"啟用滑鼠懸停翻譯",ja:"マウスオーバー翻訳を有効にする",ko:"마우스오버 번역 활성화",tr:"Fareyle Üzerine Gelindiğinde Çeviriyi Etkinleştir",vi:"Bật dịch khi di chuột"},selected_translation_alert:{zh:"划词翻译的开启和关闭请到“规则设置”里面设置。",en:'To turn selected translation on or off, please go to "Rule Settings".',zh_TW:"選取文字翻譯的開啟和關閉請到「規則設定」裡面設定。",ja:"選択翻訳のオン/オフは「ルール設定」で行ってください。",ko:'선택 번역 활성화/비활성화는 "규칙 설정"에서 하십시오.',tr:'Seçilen çeviri özelliğini açmak veya kapatmak için lütfen "Kural Ayarları"na gidin.',vi:'To turn selected translation on or off, please go to "Rule Settings".'},mousehover_key_help:{zh:"当快捷键置空时表示鼠标懸停直接翻译",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"快速鍵留空時表示滑鼠懸停即直接翻譯",ja:"ショートカットキーが空の場合、マウスオーバーで直接翻訳します",ko:"단축키가 비어 있으면 마우스오버 시 바로 번역합니다",tr:"Kısayol tuşu boş olduğunda, fare imlecinin üzerine gelerek doğrudan çeviri yapacağı anlamına gelir",vi:"When the shortcut key is empty, it means that the mouse hovers to translate directly"},mousehover_display_mode:{zh:"展示模式",en:"Display mode",zh_TW:"顯示模式",ja:"表示モード",ko:"표시 모드",tr:"Ekran Modu",vi:"Chế độ hiển thị"},mousehover_display_bilingual:{zh:"双语模式",en:"Bilingual mode",zh_TW:"雙語模式",ja:"バイリンガルモード",ko:"이중 언어 모드",tr:"İki Dilli Mod",vi:"Chế độ song ngữ"},mousehover_display_bubble:{zh:"气泡模式",en:"Bubble mode",zh_TW:"氣泡模式",ja:"バブルモード",ko:"말풍선 모드",tr:"Kabarcık Modu",vi:"Chế độ bong bóng"},mousehover_bubble_style:{zh:"气泡样式 CSS",en:"Bubble style CSS",zh_TW:"氣泡樣式 CSS",ja:"バブルスタイル CSS",ko:"말풍선 스타일 CSS",tr:"Kabarcık Stili Css",vi:"CSS kiểu bong bóng"},mousehover_bubble_style_helper:{zh:"用于自定义气泡容器样式;定位和视口防溢出由程序自动处理。",en:"Customize the bubble container style. Positioning and viewport overflow are handled automatically.",zh_TW:"用於自訂氣泡容器樣式;定位與視窗防溢出由程式自動處理。",ja:"バブルコンテナのスタイルをカスタマイズします。位置と画面外にはみ出す処理は自動で行われます。",ko:"말풍선 컨테이너 스타일을 사용자 지정합니다. 위치와 화면 넘침 방지는 자동으로 처리됩니다.",tr:"Kabarcık kabı stilini özelleştirin. Konumlandırma ve görüntü alanı taşması otomatik olarak gerçekleştirilir.",vi:"Customize the bubble container style. Positioning and viewport overflow are handled automatically."},mousehover_follow_page_rule:{zh:"跟随网页规则",en:"Follow page rule",zh_TW:"跟隨網頁規則",ja:"ページルールに従う",ko:"페이지 규칙 따르기",tr:"Sayfa kuralını takip et",vi:"Theo quy tắc trang"},mousehover_bubble_api_helper:{zh:"仅用于气泡翻译;双语模式仍使用当前网页规则的翻译服务。",en:"Used only for bubble translations; bilingual mode still uses the current page rule.",zh_TW:"僅用於氣泡翻譯;雙語模式仍使用目前網頁規則的翻譯服務。",ja:"バブル翻訳にのみ使用します。バイリンガルモードでは現在のページルールを引き続き使用します。",ko:"말풍선 번역에만 사용됩니다. 이중 언어 모드는 현재 페이지 규칙을 계속 사용합니다.",tr:"Yalnızca balon çevirilerinde kullanılır; iki dilli mod mevcut sayfa kuralını kullanmaya devam eder.",vi:"Chỉ dùng cho bản dịch bong bóng; chế độ song ngữ vẫn dùng quy tắc trang hiện tại."},autoscan_alt:{zh:"自动扫描",en:"Auto Scan",zh_TW:"自動掃描",ja:"自動スキャン",ko:"자동 스캔",tr:"Otomatik Tara",vi:"Tự động quét"},scan_all_nodes:{zh:"扫描全部节点",en:"Scan All Nodes",zh_TW:"掃描全部節點",ja:"すべてのノードをスキャン",ko:"모든 노드 스캔",tr:"Tüm Düğümleri Tara",vi:"Quét tất cả nút"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot",ja:"ShadowRoot",ko:"ShadowRoot",tr:"ShadowRoot",vi:"ShadowRoot"},richtext_alt:{zh:"保留富文本",en:"Rich Text",zh_TW:"保留富文字",ja:"リッチテキスト",ko:"리치 텍스트",tr:"Zengin Metin",vi:"Văn bản có định dạng"},transonly_alt:{zh:"隐藏原文",en:"Hide Original",zh_TW:"隱藏原文",ja:"原文を隠す",ko:"원문 숨기기",tr:"Orijinali Gizle",vi:"Ẩn bản gốc"},confirm_title:{zh:"确认",en:"Confirm",zh_TW:"確認",ja:"確認",ko:"확인",tr:"Onayla",vi:"Xác nhận"},confirm_message:{zh:"确定操作吗?",en:"Are you sure you want to proceed?",zh_TW:"確定操作嗎?",ja:"操作を続行しますか?",ko:"계속하시겠습니까?",tr:"Devam Etmek İstediğinizden Emin Misiniz?",vi:"Bạn có chắc chắn muốn tiếp tục?"},confirm_action:{zh:"确定",en:"Confirm",zh_TW:"確定",ja:"確認",ko:"확인",tr:"Onayla",vi:"Xác nhận"},cancel_action:{zh:"取消",en:"Cancel",zh_TW:"取消",ja:"キャンセル",ko:"취소",tr:"İptal Et",vi:"Hủy"},pls_press_shortcut:{zh:"请按下快捷键组合",en:"Please press the shortcut key combination",zh_TW:"請按下快速鍵組合",ja:"ショートカットキーを押してください",ko:"단축키 조합을 누르세요",tr:"Lütfen Kısayol Tuş Kombinasyonuna Basın",vi:"Vui lòng nhấn tổ hợp phím tắt"},load_setting_err:{zh:"数据加载出错,请刷新页面或卸载后重新安装。",en:"Data loading error, please refresh the page or uninstall and reinstall.",zh_TW:"資料載入發生錯誤,請重新整理頁面或解除安裝後重新安裝。",ja:"データ読み込みエラー。ページを更新するか、アンインストール後に再インストールしてください。",ko:"데이터 로딩 오류. 페이지를 새로 고치거나 제거 후 다시 설치하세요.",tr:"Veri yükleme hatası, lütfen sayfayı yenileyin veya uygulamayı kaldırıp yeniden yükleyin",vi:"Data loading error, please refresh the page or uninstall and reinstall."},translation_style:{zh:"翻译风格",en:"Translation style",zh_TW:"翻譯風格",ja:"翻訳スタイル",ko:"번역 스타일",tr:"Çeviri Stili",vi:"Kiểu dịch"},placeholder:{zh:"占位符",en:"Placeholder",zh_TW:"佔位符",ja:"プレースホルダー",ko:"플레이스홀더",tr:"Yer Tutucu",vi:"Giữ chỗ"},tag_name:{zh:"占位标签名",en:"Placeholder tag name",zh_TW:"佔位標名",ja:"プレースホルダータグ名",ko:"플레이스홀더 태그 이름",tr:"Yer Tutucu Etiket Adı",vi:"Tên thẻ giữ chỗ"},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에서 지원하는 집계 형식을 선택하세요:",tr:"1. İhtiyaçlarınıza Göre AI Tarafından Desteklenen Toplama Formatını Seçin:",vi:"1. Select the aggregation format supported by the AI according to your needs:"},json_output:{zh:"点击切换 “JSON 格式“",en:'Click to switch to "JSON Format"',zh_TW:"點選切換「JSON 格式」",ja:"クリックして「JSON 形式」に切り替え",ko:'클릭하여 "JSON 형식"으로 전환',tr:'"JSON Formatına Geçmek İçin Tıklayın',vi:'Click to switch to "JSON Format"'},xml_output:{zh:"点击切换 “XML 格式“",en:'Click to switch to "XML Format"',zh_TW:"點選切換「XML 格式」",ja:"クリックして「XML 形式」に切り替え",ko:'클릭하여 "XML 형식"으로 전환',tr:'"XML Formatına Geçmek İçin Tıklayın',vi:'Click to switch to "XML Format"'},textlines_output:{zh:"点击切换 “多行文本格式“",en:'Click to switch to "Multi-line Text Format"',zh_TW:"點選切換「多行文字格式」",ja:"クリックして「複数行テキスト形式」に切り替え",ko:'클릭하여 "여러 줄 텍스트 형식"으로 전환',tr:'"Çok Satırlı Metin Formatına Geçmek İçin Tıklayın',vi:'Click to switch to "Multi-line Text Format"'},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. 기본 프롬프트를 완전히 이해하지 않고 수정하지 마십시오. 작동하지 않을 수 있습니다.",tr:"2. Varsayılan komut istemini tam olarak anlamadan değiştirmeyin, aksi takdirde çalışmayabilir",vi:"2. Do not modify the default prompt without fully understanding it, otherwise it may not work."},if_pre_init:{zh:"是否预初始化",en:"Whether to pre-initialize",zh_TW:"是否預初始化",ja:"事前初期化するか",ko:"사전 초기화 여부",tr:"Önceden Başlatılıp Başlatılmayacağı",vi:"Whether to pre-initialize"},export_old:{zh:"导出旧版",en:"Export old version",zh_TW:"匯出舊版",ja:"旧バージョンをエクスポート",ko:"이전 버전 내보내기",tr:"Eski Sürümü Dışa Aktar",vi:"Export old version"},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 파일을 사용하세요.",tr:"Sözlük eklemek için lütfen her satırda bir kelime bulunan bir txt dosyası kullanın",vi:"To import vocabulary, please use a txt file with one word per line."},btn_tip_click_away:{zh:"失焦隐藏/显示",en:"Loss of focus hide/show",zh_TW:"失焦隱藏/顯示",ja:"フォーカスを失った時に非表示/表示",ko:"포커스 잃을 시 숨기기/표시",tr:"Odak Kaybında Gizle/Göster",vi:"Loss of focus hide/show"},btn_tip_follow_selection:{zh:"跟随/固定模式",en:"Follow/Fixed Mode",zh_TW:"跟隨/固定模式",ja:"追従/固定モード",ko:"따라가기/고정 모드",tr:"Takip/Sabit Mod",vi:"Follow/Fixed Mode"},btn_tip_simple_style:{zh:"迷你/常规模式",en:"Mini/Regular Mode",zh_TW:"迷你/常規模式",ja:"ミニ/通常モード",ko:"미니/일반 모드",tr:"Mini/Normal Mod",vi:"Mini/Regular Mode"},btn_tip_dark_mode:{zh:"亮色/暗色/跟随系统",en:"Light/Dark/Auto",zh_TW:"亮色/暗色/跟隨系統",ja:"ライト/ダーク/自動",ko:"라이트/다크/자동",tr:"Açık/Koyu/Otomatik",vi:"Light/Dark/Auto"},api_placeholder:{zh:"占位符",en:"Placeholder",zh_TW:"佔位符",ja:"プレースホルダー",ko:"플레이스홀더",tr:"Yer Tutucu",vi:"Giữ chỗ"},api_placetag:{zh:"占位标签",en:"Placeholder tags",zh_TW:"佔位標",ja:"プレースホルダタグ",ko:"플레이스홀더 태그",tr:"Yer Tutucu Etiketleri",vi:"Thẻ giữ chỗ"},placetag_format:{zh:"占位符格式",en:"Placeholder Format",zh_TW:"佔位符格式",ja:"プレースホルダー形式",ko:"자리 표시자 형식",tr:"Yer Tutucu Formatı",vi:"Định dạng giữ chỗ"},format_compact:{zh:"简洁格式 <a1>",en:"Compact Format <a1>",zh_TW:"簡潔格式 <a1>",ja:"簡潔形式 <a1>",ko:"간결 형식 <a1>",tr:"Kompakt Format <a1>",vi:"Định dạng gọn <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>",tr:"Öznitelik Formatı <a i=1>",vi:"Định dạng thuộc tính <a i=1>"},detected_lang:{zh:"语言检测",en:"Language detection",zh_TW:"語言偵測",ja:"言語検出",ko:"언어 감지",tr:"Dil Algılama",vi:"Phát hiện ngôn ngữ"},detected_result:{zh:"检测结果",en:"Detect result",zh_TW:"偵測結果",ja:"検出結果",ko:"감지 결과",tr:"Sonuç Tespiti",vi:"Kết quả phát hiện"},subtitle_translate:{zh:"字幕翻译",en:"Subtitle Translation",zh_TW:"字幕翻譯",ja:"字幕翻訳",ko:"자막 번역",tr:"Altyazı Çevirisi",vi:"Dịch phụ đề"},bilingual_subtitles:{zh:"双语字幕",en:"Bilingual subtitles",zh_TW:"雙語字幕",ja:"バイリンガル字幕",ko:"이중 언어 자막",tr:"İki Dilli Altyazılar",vi:"Phụ đề song ngữ"},vocabulary_book:{zh:"生词本",en:"Vocabulary",zh_TW:"生詞本",ja:"単語帳",ko:"단어장",tr:"Kelime Bilgisi",vi:"Từ vựng"},download_subtitles_vtt:{zh:"下载字幕 (VTT)",en:"Download subtitles (VTT)",zh_TW:"下載字幕 (VTT)",ja:"字幕をダウンロード (VTT)",ko:"자막 다운로드 (VTT)",tr:"Altyazıları İndir (VTT)",vi:"Tải phụ đề (VTT)"},download_raw_subtitle_events_json:{zh:"下载源数据 (JSON)",en:"Download source data (JSON)",zh_TW:"下載來源資料 (JSON)",ja:"ソースデータをダウンロード (JSON)",ko:"원본 데이터 다운로드 (JSON)",tr:"Kaynak Verilerini İndirin (JSON)",vi:"Tải dữ liệu nguồn (JSON)"},download_translation_subtitles_vtt:{zh:"下载译文字幕 (VTT)",en:"Download translation subtitles (VTT)",zh_TW:"下載譯文字幕 (VTT)",ja:"翻訳字幕をダウンロード (VTT)",ko:"번역 자막 다운로드 (VTT)",tr:"Çeviri Altyazılarını İndir (VTT)",vi:"Tải phụ đề dịch (VTT)"},toggle_subtitle_translate:{zh:"启用字幕翻译",en:"Enable subtitle translation",zh_TW:"啟用字幕翻譯",ja:"字幕翻訳を有効にする",ko:"자막 번역 활성화",tr:"Altyazı Çevirisini Etkinleştir",vi:"Bật dịch phụ đề"},default_subtitle_translate:{zh:"默认立即翻译",en:"Translate subtitles immediately by default",zh_TW:"預設立即翻譯",ja:"デフォルトですぐに字幕を翻訳",ko:"기본적으로 자막 즉시 번역",tr:"Altyazıları varsayılan olarak hemen çevir",vi:"Dịch phụ đề ngay lập tức theo mặc định"},enable_subtitle_translate:{zh:"开启翻译",en:"Enable translation",zh_TW:"開啟翻譯",ja:"翻訳を有効にする",ko:"번역 활성화",tr:"Çeviriyi etkinleştir",vi:"Bật dịch"},is_bilingual_view:{zh:"双语显示",en:"Enable bilingual display",zh_TW:"雙語顯示",ja:"バイリンガル表示",ko:"이중 언어 표시",tr:"İki Dilli Görüntülemeyi Etkinleştir",vi:"Bật hiển thị song ngữ"},is_blur_translation:{zh:"模糊译文",en:"Blur Translation",zh_TW:"模糊譯文",ja:"翻訳をぼかす",ko:"번역 흐림",tr:"Bulanıklık Çevirisi",vi:"Làm mờ bản dịch"},is_skip_ad:{zh:"快进广告",en:"Skip AD",zh_TW:"快轉廣告",ja:"広告をスキップ",ko:"광고 건너뛰기",tr:"Reklamı Atla",vi:"Bỏ qua quảng cáo"},download_subtitles:{zh:"下载字幕",en:"Download subtitles",zh_TW:"下載字幕",ja:"字幕をダウンロード",ko:"자막 다운로드",tr:"Altyazıları İndir",vi:"Tải phụ đề"},background_styles:{zh:"背景样式",en:"Background Style",zh_TW:"背景樣式",ja:"背景スタイル",ko:"배경 스타일",tr:"Arka Plan Stili",vi:"Kiểu nền"},origin_styles:{zh:"原文样式",en:"Original style",zh_TW:"原文樣式",ja:"原文スタイル",ko:"원문 스타일",tr:"Orijinal Stil",vi:"Kiểu gốc"},translation_styles:{zh:"译文样式",en:"Translation style",zh_TW:"譯文樣式",ja:"翻訳スタイル",ko:"번역문 스타일",tr:"Çeviri Stili",vi:"Kiểu dịch"},ai_segmentation:{zh:"AI智能断句",en:"AI intelligent punctuation",zh_TW:"AI智慧斷句",ja:"AIによるインテリジェントな文分割",ko:"AI 지능형 문장 분리",tr:"AI Akıllı Noktalama İşaretleri",vi:"Ngắt câu thông minh AI"},builtin_sentence_break:{zh:"内置断句",en:"Built-in Sentence Break",zh_TW:"內置斷句",ja:"内蔵文分割",ko:"내장 문장 분리",tr:"Yerleşik Cümle Arası",vi:"Ngắt câu tích hợp"},rule_sentence_break:{zh:"规则断句",en:"Rule-based Break",zh_TW:"規則斷句",ja:"ルールベース分割",ko:"규칙 기반 분리",tr:"Kural Tabanlı Mola",vi:"Ngắt câu theo quy tắc"},statistical_sentence_break:{zh:"统计断句",en:"Statistical Break",zh_TW:"統計斷句",ja:"統計的分割",ko:"통계 기반 분리",tr:"İstatistiksel Kırılım",vi:"Ngắt câu thống kê"},force_subtitle_retranslate:{zh:"强制重翻",en:"Force re-translate",zh_TW:"強制重翻",ja:"強制再翻訳",ko:"강제 재번역",tr:"Yeniden Çevirmeye Zorla",vi:"Buộc dịch lại"},ai_enhanced_context:{zh:"增强智能上下文",en:"Enhanced Intelligent Context",zh_TW:"增強智慧上下文",ja:"強化インテリジェントコンテキスト",ko:"강화 지능형 컨텍스트",tr:"Gelişmiş Akıllı İçerik",vi:"Ngữ cảnh thông minh nâng cao"},ai_context_analyzing:{zh:"AI正在分析视频内容...",en:"AI is analyzing video content...",zh_TW:"AI正在分析影片內容...",ja:"AIが動画内容を分析中...",ko:"AI가 비디오 콘텐츠를 분석 중...",tr:"AI video içeriğini analiz ediyor...",vi:"AI đang phân tích nội dung video..."},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)",tr:"AI İşleme Parça Uzunluğu (200-20000)",vi:"Độ dài đoạn xử lý 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 데스크톱 웹사이트만 지원합니다.",tr:"1. Şu anda yalnızca Youtube masaüstü web sitesini desteklemektedir.",vi:"1. Currently only supports Youtube desktop website."},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. 플러그인에는 기본적인 자막 병합 및 문장 분리 알고리즘이 내장되어 있어 대부분의 상황에 대응할 수 있습니다.",tr:"2. Eklenti, çoğu duruma uygun temel altyazı birleştirme ve cümle bölme algoritmalarına sahiptir.",vi:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations."},subtitle_helper_3:{zh:"3、亦可以启用AI智能断句,但需考虑切割长度及AI接口能力,可能处理时间会很长。若处理失败,将自动降级为内置断句并翻译。",en:"3. You can also enable AI intelligent segmentation, but consider the chunk length and AI interface capacity, as processing may take a long time. If it fails, it will automatically fall back to built-in sentence break and translation.",zh_TW:"3. 亦可啟用 AI 智慧斷句,但需考慮切割長度及 AI 介面能力,處理時間可能會很長。若處理失敗,將自動降級為內置斷句並翻譯。",ja:"3. AIによるインテリジェントな文分割を有効にすることもできますが、チャンク長やAIの処理能力を考慮する必要があり、処理に時間がかかる場合があります。処理が失敗した場合は、自動的に内蔵文分割と翻訳にフォールバックされます。",ko:"3. AI 지능형 분리를 활성화할 수도 있지만, 청크 길이와 AI 인터페이스 처리 능력을 고려해야 하며 처리 시간이 길어질 수 있습니다. 처리에 실패할 경우 자동으로 내장 문장 분리 및 번역으로 대체됩니다.",tr:"3. AI destekli akıllı bölümlemeyi de etkinleştirebilirsiniz, ancak işlem uzun sürebileceğinden, öbek uzunluğunu ve yapay zekâ arayüzü kapasitesini göz önünde bulundurun. Başarısız olursa, otomatik olarak yerleşik cümle bölme ve çeviri özelliğine geri dönecektir.",vi:"3. You can also enable AI intelligent segmentation, but consider the chunk length and AI interface capacity, as processing may take a long time. If it fails, it will automatically fall back to built-in sentence break and translation."},show_subtitle_list:{zh:"显示字幕列表",en:"Show Subtitle List",zh_TW:"顯示字幕清單",ja:"字幕リストを表示",ko:"자막 목록 표시",tr:"Altyazı Listesini Göster",vi:"Hiển thị danh sách phụ đề"},subtitle_loading_notification:{zh:"字幕加载通知",en:"Subtitle loading notification",zh_TW:"字幕載入通知",ja:"字幕読み込み通知",ko:"자막 로딩 알림",tr:"Altyazı Yükleme Bildirimi",vi:"Thông báo tải phụ đề"},hide_subtitle_button:{zh:"隐藏功能按钮",en:"Hide function button",zh_TW:"隱藏功能按鈕",ja:"機能ボタンを非表示",ko:"기능 버튼 숨기기",tr:"İşlev Düğmesini Gizle",vi:"Ẩn nút chức năng"},subtitle_hover_lookup:{zh:"悬停查词",en:"Hover Word Lookup",zh_TW:"懸停查詞",ja:"ホバー辞書検索",ko:"호버 단어 조회",tr:"Vurgulu Kelime Arama",vi:"Tra từ khi di chuột"},default_styles_example:{zh:"默认样式参考:",en:"Default styles reference:",zh_TW:"預設樣式參考:",ja:"デフォルトスタイルの例:",ko:"기본 스타일 예시:",tr:"Varsayılan Stiller Referansı:",vi:"Tham khảo kiểu mặc định:"},subtitle_load_succeed:{zh:"双语字幕加载成功!",en:"Bilingual subtitles loaded successfully!",zh_TW:"雙語字幕載入成功!",ja:"バイリンガル字幕の読み込みに成功しました!",ko:"이중 언어 자막 로딩 성공!",tr:"İki Dilli Altyazılar Başarıyla Yüklendi",vi:"Đã tải phụ đề song ngữ thành công!"},subtitle_load_failed:{zh:"双语字幕加载失败!",en:"Failed to load bilingual subtitles!",zh_TW:"雙語字幕載入失敗!",ja:"バイリンガル字幕の読み込みに失敗しました!",ko:"이중 언어 자막 로딩 실패!",tr:"İki Dilli Altyazılar Yüklenemedi",vi:"Tải phụ đề song ngữ thất bại!"},try_get_subtitle_data:{zh:"尝试获取字幕数据,请稍候...",en:"Trying to get subtitle data, please wait...",zh_TW:"嘗試取得字幕資料,請稍候...",ja:"字幕データを取得しています。お待ちください...",ko:"자막 데이터를 가져오는 중입니다. 잠시 기다려주세요...",tr:"Altyazı verileri alınmaya çalışılıyor",vi:"Đang lấy dữ liệu phụ đề, vui lòng chờ..."},subtitle_data_processing:{zh:"字幕数据处理中...",en:"Subtitle data processing...",zh_TW:"字幕資料處理中...",ja:"字幕データを処理中...",ko:"자막 데이터 처리 중...",tr:"Altyazı Verileri İşleniyor...",vi:"Đang xử lý dữ liệu phụ đề..."},starting_to_process_subtitle:{zh:"开始处理字幕数据...",en:"Starting to process subtitle data...",zh_TW:"開始處理字幕資料...",ja:"字幕データの処理を開始します...",ko:"자막 데이터 처리를 시작합니다...",tr:"Altyazı verileri işlenmeye başlıyor...",vi:"Bắt đầu xử lý dữ liệu phụ đề..."},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 버튼을 클릭하여 로드하세요",tr:"Altyazı verileri hazır, yüklemek için lütfen KT düğmesine tıklayın",vi:"Dữ liệu phụ đề đã sẵn sàng, nhấp nút KT để tải"},starting_reprocess_events:{zh:"重新处理字幕数据...",en:"Reprocess the subtitle data...",zh_TW:"重新處理字幕資料...",ja:"字幕データを再処理しています...",ko:"자막 데이터를 다시 처리 중...",tr:"Altyazı verilerini yeniden işleyin...",vi:"Xử lý lại dữ liệu phụ đề..."},waitting_for_subtitle:{zh:"请等待字幕数据",en:"Please wait for the subtitle data.",zh_TW:"請等待字幕資料",ja:"字幕データを待機中",ko:"자막 데이터를 기다려주세요",tr:"Lütfen altyazı verilerini bekleyin.",vi:"Vui lòng chờ dữ liệu phụ đề."},ai_processing_pls_wait:{zh:"AI处理中,请稍等...",en:"AI processing in progress, please wait...",zh_TW:"AI 處理中,請稍候...",ja:"AI処理中です。お待ちください...",ko:"AI 처리 중입니다. 잠시 기다려주세요...",tr:"AI işleme devam ediyor",vi:"AI đang xử lý, vui lòng chờ..."},processing_subtitles:{zh:"字幕处理中...",en:"Subtitle processing...",zh_TW:"字幕處理中...",ja:"字幕処理中...",ko:"자막 처리 중...",tr:"Altyazı İşleniyor...",vi:"Đang xử lý phụ đề..."},waiting_subtitles:{zh:"等待字幕中",en:"Waiting for subtitles",zh_TW:"等待字幕中",ja:"字幕待機中",ko:"자막 대기 중",tr:"Altyazıları Bekliyorum",vi:"Đang chờ phụ đề"},subtitle_is_not_yet_ready:{zh:"字幕数据尚未准备好",en:"Subtitle is not yet ready.",zh_TW:"字幕資料尚未準備好",ja:"字幕データの準備がまだできていません。",ko:"자막 데이터가 아직 준비되지 않았습니다.",tr:"Altyazı henüz hazır değil.",vi:"Phụ đề chưa sẵn sàng."},log_level:{zh:"日志级别",en:"Log Level",zh_TW:"日誌等級",ja:"ログレベル",ko:"로그 레벨",tr:"Günlük Düzeyi",vi:"Mức nhật ký"},goto_custom_api_example:{zh:"点击查看【自定义接口示例】",en:"Click to view [Custom Interface Example]",zh_TW:"點選檢視【自訂介面範例】",ja:"【カスタムインターフェースの例】を見る",ko:"[사용자 지정 인터페이스 예시] 보기",tr:"[Özel Arayüz Örneği]'ni Görüntülemek İçin Tıklayın",vi:"Nhấp để xem [Ví dụ Giao diện Tùy chỉnh]"},split_paragraph:{zh:"切分长段落",en:"Split long paragraph",zh_TW:"切分長段落",ja:"長い段落を分割",ko:"긴 단락 나누기",tr:"Uzun Paragrafı Böl",vi:"Tách đoạn dài"},split_length:{zh:"切分长度 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"切分長度(0-10000)",ja:"分割長(0-10000)",ko:"분할 길이(0-10000)",tr:"Segmentasyon Uzunluğu (0-10000)",vi:"Độ dài phân đoạn (0-10000)"},highlight_words:{zh:"高亮收藏词汇",en:"Highlight favorite words",zh_TW:"醒目標示收藏詞彙",ja:"お気に入り単語をハイライト",ko:"즐겨찾는 단어 하이라이트",tr:"Favori Kelimeleri Vurgulayın",vi:"Tô sáng từ yêu thích"},split_disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화",tr:"Devre Dışı",vi:"Tắt"},split_textlength:{zh:"按照长度切分",en:"Split by length",zh_TW:"依長度切分",ja:"長さで分割",ko:"길이로 나누기",tr:"Uzunluğa Göre Bölünmüş",vi:"Tách theo độ dài"},split_punctuation:{zh:"按照句子切分",en:"Split by sentence",zh_TW:"按照句子切分",ja:"文で分割",ko:"문장으로 나누기",tr:"Cümleye Göre Bölünmüş",vi:"Tách theo câu"},highlight_disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화",tr:"Devre Dışı",vi:"Tắt"},highlight_beforetrans:{zh:"翻译前高亮",en:"Highlight before translation",zh_TW:"翻譯前醒目標示",ja:"翻訳前にハイライト",ko:"번역 전 하이라이트",tr:"Çeviriden Önce Vurgula",vi:"Tô sáng trước khi dịch"},highlight_aftertrans:{zh:"翻译后高亮",en:"Highlight after translation",zh_TW:"翻譯後醒目標示",ja:"翻訳後にハイライト",ko:"번역 후 하이라이트",tr:"Çeviriden Sonra Vurgula",vi:"Tô sáng sau khi dịch"},pagescroll_root_margin:{zh:"滚动加载提前触发 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"滾動載入提前觸發 (0-10000px)",ja:"スクロール読み込みの事前トリガー (0-10000px)",ko:"스크롤 로딩 미리 트리거 (0-10000px)",tr:"Kaydırma Yüklemesinin Erken Tetiklenmesi (0-10000 Piksel)",vi:"Kích hoạt sớm tải cuộn (0-10000px)"},styles_setting:{zh:"样式设置",en:"Style Setting",zh_TW:"樣式設定",ja:"スタイル設定",ko:"스타일 설정",tr:"Stil Ayarı",vi:"Cài đặt kiểu dáng"},style_name:{zh:"样式名称",en:"Style Name",zh_TW:"樣式名稱",ja:"スタイル名",ko:"스타일 이름",tr:"Stil Adı",vi:"Tên kiểu dáng"},style_code:{zh:"样式代码",en:"Style Code",zh_TW:"樣式程式碼",ja:"スタイルコード",ko:"스타일 코드",tr:"Stil Kodu",vi:"Mã kiểu dáng"},long_sentence_threshold:{zh:"规则断句阈值 (20-300字符)",en:"Rule-based segmentation threshold (20-300 chars)",zh_TW:"規則斷句閾值 (20-300 字元)",ja:"ルールベース分割閾値 (20-300文字)",ko:"규칙 기반 분할 임계값 (20-300자)",tr:"Kural Tabanlı Segmentasyon Eşiği (20-300 Karakter)",vi:"Ngưỡng phân đoạn theo quy tắc (20-300 ký tự)"},pre_trans_seconds:{zh:"提前翻译时长 (10-36000s)",en:"Pre translation seconds (10-36000s)",zh_TW:"提前翻譯時長 (10-36000s)",ja:"事前翻訳時間 (10-36000s)",ko:"미리 번역 시간 (10-36000s)",tr:"Çeviri Öncesi Saniye (10-36000s)",vi:"Số giây dịch trước (10-36000s)"},throttle_trans_interval:{zh:"节流翻译间隔 (1-3600s)",en:"Throttling translation interval (1-3600s)",zh_TW:"節流翻譯間隔 (1-3600s)",ja:"翻訳間隔のスロットリング (1-3600s)",ko:"번역 간격 조절 (1-3600s)",tr:"Çeviri Aralığını Daraltma (1-3600s)",vi:"Khoảng giới hạn dịch (1-3600s)"},subtitle_same_lang:{zh:"原语言与目标语言相同,字幕不予处理",en:"The source language is the same as the target language, subtitles will not be processed",zh_TW:"原語言與目標語言相同時,字幕不予處理",ja:"原言語と目標言語が同じ場合、字幕は処理されません",ko:"원본 언어와 대상 언어가 동일한 경우, 자막은 처리되지 않습니다",tr:"Kaynak Dil Hedef Dil İle Aynı",vi:"Ngôn ngữ nguồn giống ngôn ngữ đích, phụ đề sẽ không được xử lý"},plain_text_translate:{zh:"纯文本翻译",en:"Plain text translation",zh_TW:"純文字翻譯",ja:"プレーンテキスト翻訳",ko:"순수 텍스트 번역",tr:"Düz Metin Çevirisi",vi:"Dịch văn bản thuần"},is_enable_enhance:{zh:"启用增强功能",en:"Enable Enhancement Features",zh_TW:"啟用增強功能",ja:"強化機能を有効にする",ko:"향상 기능 활성화",tr:"Gelişmiş Özellikleri Etkinleştir",vi:"Bật tính năng nâng cao"},open_separate_window:{zh:"独立窗口打开",en:"Open in Separate Window",zh_TW:"在獨立視窗中開啟",ja:"別ウィンドウで開く",ko:"별도 창에서 열기",tr:"Ayrı Pencerede Aç",vi:"Mở trong cửa sổ riêng"},auto_translate_clipboard:{zh:"自动翻译剪贴板",en:"Auto-translate Clipboard",zh_TW:"自動翻譯剪貼簿",ja:"クリップボードを自動翻訳",ko:"클립보드 자동 번역",tr:"Panoyu Otomatik Çevir",vi:"Tự động dịch bảng nhớ tạm"},auto_translate_clipboard_helper:{zh:"打开文本翻译面板或重新聚焦独立窗口时自动翻译剪贴板文本",en:"Translate clipboard text when the text panel opens or its separate window regains focus",zh_TW:"開啟文字翻譯面板或重新聚焦獨立視窗時,自動翻譯剪貼簿文字",ja:"テキスト翻訳パネルを開いた時、または別ウィンドウに再フォーカスした時にクリップボードを翻訳します",ko:"텍스트 번역 패널을 열거나 별도 창에 다시 포커스할 때 클립보드 텍스트를 번역합니다",tr:"Metin paneli açıldığında veya ayrı pencere yeniden odaklandığında pano metnini çevirir",vi:"Dịch văn bản trong bảng nhớ tạm khi mở bảng dịch hoặc lấy lại tiêu điểm cửa sổ riêng"},clipboard_permission_required:{zh:"剪贴板权限已失效,点击重新授权",en:"Clipboard permission is missing. Click to grant it again",zh_TW:"剪貼簿權限已失效,點選以重新授權",ja:"クリップボード権限がありません。クリックして再許可してください",ko:"클립보드 권한이 없습니다. 클릭하여 다시 허용하세요",tr:"Pano izni eksik. Yeniden izin vermek için tıklayın",vi:"Thiếu quyền bảng nhớ tạm. Nhấp để cấp lại"},clipboard_permission_granted:{zh:"已开启自动翻译剪贴板",en:"Clipboard auto-translation enabled",zh_TW:"已開啟自動翻譯剪貼簿",ja:"クリップボードの自動翻訳を有効にしました",ko:"클립보드 자동 번역을 사용 설정했습니다",tr:"Pano otomatik çevirisi etkinleştirildi",vi:"Đã bật tự động dịch bảng nhớ tạm"},clipboard_permission_denied:{zh:"未获得剪贴板读取权限,功能保持关闭",en:"Clipboard access was not granted, so the feature remains disabled",zh_TW:"未取得剪貼簿讀取權限,功能維持關閉",ja:"クリップボードの読み取りが許可されなかったため、機能は無効のままです",ko:"클립보드 읽기 권한이 없어 기능이 꺼진 상태로 유지됩니다",tr:"Pano erişimi verilmediği için özellik devre dışı kalır",vi:"Chưa cấp quyền đọc bảng nhớ tạm nên tính năng vẫn tắt"},comment_support:{zh:"好评支持",en:"Leave a Positive Review",zh_TW:"好評支持",ja:"高評価で応援",ko:"좋은 평가로 응원",tr:"Olumlu Bir İnceleme Bırakın",vi:"Để lại đánh giá tích cực"},appreciate_support:{zh:"赞赏支持",en:"Support with a Tip",zh_TW:"贊賞支持",ja:"投げ銭で応援",ko:"후원하기",tr:"Bir Bağış İle Destek Ol",vi:"Ủng hộ bằng tiền tip"},toggle_transbox:{zh:"切换翻译窗",en:"Toggle Translation Box",zh_TW:"切換翻譯視窗",ja:"翻訳ウィンドウを切り替え",ko:"번역 창 전환",tr:"Çeviri Kutusunu Değiştir",vi:"Chuyển đổi hộp dịch"},copy:{zh:"复制",en:"Copy",zh_TW:"複製",ja:"コピー",ko:"복사",tr:"Kopyala",vi:"Sao chép"},paste:{zh:"黏贴",en:"Paste",zh_TW:"貼上",ja:"貼り付け",ko:"붙여넣기",tr:"Yapıştır",vi:"Dán"},submit:{zh:"提交",en:"Submit",zh_TW:"提交",ja:"送信",ko:"제출",tr:"Gönder",vi:"Gửi"},collect:{zh:"收藏",en:"Save",zh_TW:"收藏",ja:"保存",ko:"저장",tr:"Kaydet",vi:"Lưu"},favorite_word_lookup_loading:{zh:"正在查询释义…",en:"Looking up definition…",zh_TW:"正在查詢釋義…",ja:"語義を検索しています…",ko:"뜻을 찾는 중…",tr:"Tanım aranıyor…",vi:"Đang tra nghĩa…"},favorite_word_lookup_unavailable:{zh:"当前词典无法查询该词。",en:"The selected dictionary cannot look up this word.",zh_TW:"目前詞典無法查詢該詞。",ja:"選択した辞書ではこの単語を検索できません。",ko:"선택한 사전에서 이 단어를 찾을 수 없습니다.",tr:"Seçili sözlük bu kelimeyi arayamıyor.",vi:"Từ điển đã chọn không thể tra từ này."},favorite_word_definition_not_found:{zh:"未找到释义。",en:"No definition found.",zh_TW:"找不到釋義。",ja:"語義が見つかりませんでした。",ko:"뜻을 찾을 수 없습니다.",tr:"Tanım bulunamadı.",vi:"Không tìm thấy nghĩa."},favorite_word_lookup_failed:{zh:"释义加载失败。",en:"Failed to load definition.",zh_TW:"釋義載入失敗。",ja:"語義の読み込みに失敗しました。",ko:"뜻을 불러오지 못했습니다.",tr:"Tanım yüklenemedi.",vi:"Không thể tải nghĩa."},show_translation_dot:{zh:"显示翻译圆点",en:"Show Translation Dot",zh_TW:"顯示翻譯圓點",ja:"翻訳ドットを表示",ko:"번역 점 표시",tr:"Çeviri Noktasını Göster",vi:"Hiển thị chấm dịch"},show_dot_mobile:{zh:"仅移动端",en:"Mobile Only",zh_TW:"僅限行動裝置",ja:"モバイルのみ",ko:"모바일 전용",tr:"Yalnızca Mobil",vi:"Chỉ trên di động"},show_dot_always:{zh:"总是显示",en:"Always",zh_TW:"總是顯示",ja:"常に表示",ko:"항상 표시",tr:"Her Zaman",vi:"Luôn luôn"},show_dot_disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"사용 안 함",tr:"Devre Dışı",vi:"Tắt"},rule_disabled:{zh:"规则已禁用",en:"Rule Disabled",zh_TW:"規則已停用",ja:"ルールが無効になっています",ko:"규칙이 비활성화되었습니다",tr:"Kural Devre Dışı",vi:"Quy tắc đã tắt"},rule_enabled:{zh:"规则已启用",en:"Rule Enabled",zh_TW:"規則已啟用",ja:"ルールが有効になっています",ko:"규칙이 활성화되었습니다",tr:"Kural Etkin",vi:"Quy tắc đã bật"},rule_toggle_failed:{zh:"规则切换失败",en:"Failed to toggle rule",zh_TW:"規則切換失敗",ja:"ルールの切り替えに失敗しました",ko:"규칙 전환 실패",tr:"Kural Değiştirilemedi",vi:"Chuyển đổi quy tắc thất bại"},seg_trans_diff_warning:{zh:"断句和翻译服务不同,翻译引擎会重复翻译字幕",en:"Segmentation and translation engines differ; subtitles will be re-translated.",zh_TW:"斷句和翻譯服務不同,翻譯引擎會重複翻譯字幕",ja:"セグメンテーションと翻訳エンジンが異なります。字幕は再翻訳されます。",ko:"분할과 번역 엔진이 다릅니다. 자막이 다시 번역됩니다.",tr:"Segmentasyon ve çeviri motorları farklıdır; altyazılar yeniden çevrilecektir.",vi:"Công cụ phân đoạn và dịch khác nhau; phụ đề sẽ được dịch lại."},subtitle_style_preview:{zh:"样式预览",en:"Style Preview",zh_TW:"樣式預覽",ja:"スタイルプレビュー",ko:"스타일 미리보기",tr:"Stil Önizlemesi",vi:"Xem trước kiểu dáng"},subtitle_preview_sample:{zh:"这是示例字幕文本",en:"This is an example subtitle",zh_TW:"這是範例字幕文字",ja:"これはサンプル字幕テキストです",ko:"예시 자막 텍스트입니다",tr:"Bu Bir Örnek Altyazıdır",vi:"Đây là văn bản phụ đề mẫu"},font_size:{zh:"字体大小",en:"Font Size",zh_TW:"字體大小",ja:"フォントサイズ",ko:"글꼴 크기",tr:"Yazı Tipi Boyutu",vi:"Cỡ chữ"},font_color:{zh:"字体颜色",en:"Font Color",zh_TW:"字體顏色",ja:"フォントの色",ko:"글꼴 색상",tr:"Yazı Tipi Rengi",vi:"Màu chữ"},background_color:{zh:"背景颜色",en:"Background Color",zh_TW:"背景顏色",ja:"背景色",ko:"배경색",tr:"Arka Plan Rengi",vi:"Màu nền"},opacity:{zh:"透明度",en:"Opacity",zh_TW:"透明度",ja:"不透明度",ko:"불투명도",tr:"Opaklık",vi:"Độ mờ"},line_height:{zh:"行高",en:"Line Height",zh_TW:"行高",ja:"行の高さ",ko:"줄 높이",tr:"Satır Yüksekliği",vi:"Chiều cao dòng"},padding:{zh:"内边距",en:"Padding",zh_TW:"內邊距",ja:"余白",ko:"안쪽 여백",tr:"Dolgu",vi:"Khoảng đệm"},vertical:{zh:"上下",en:"Vertical",zh_TW:"上下",ja:"上下",ko:"상하",tr:"Dikey",vi:"Dọc"},horizontal:{zh:"左右",en:"Horizontal",zh_TW:"左右",ja:"左右",ko:"좌우",tr:"Yatay",vi:"Ngang"},text_shadow:{zh:"文字阴影",en:"Text Shadow",zh_TW:"文字陰影",ja:"テキストの影",ko:"텍스트 그림자",tr:"Metin Gölgesi",vi:"Bóng chữ"},advanced_css:{zh:"高级 CSS 编辑",en:"Advanced CSS",zh_TW:"進階 CSS 編輯",ja:"高度な CSS 編集",ko:"고급 CSS 편집",tr:"Gelişmiş CSS",vi:"CSS nâng cao"},close:{zh:"关闭",en:"Close",zh_TW:"關閉",ja:"閉じる",ko:"닫기",tr:"Kapat",vi:"Đóng"}}),k=e=>t=>{var n;return(null===(n=w[t])||void 0===n?void 0:n[e])||""},S="kiss-rules_v".concat(a[0],".json"),E="kiss-words.json",C=("kiss-rules-share_v".concat(a[0],".json"),"kiss-setting_v".concat(a[0],".json")),_="KISS-Translator-SYNC",T=("".concat(r,"_bdauth"),"".concat(r,"_setting"),"".concat(r,"_rules"),"".concat(r,"_setting_v").concat(a[0])),D="".concat(T,"_backup_v1_before_v2"),P="".concat(r,"_rules_v").concat(a[0]),I="".concat(r,"_words"),F="".concat(r,"_sync"),L="".concat(r,"_fab"),z="".concat(r,"_tranbox"),O=("".concat(r,"_separate_window"),"".concat(r,"_rulescache_")),N="".concat(r,"_disabled_sub_rules"),j="".concat(r,"_cache"),R=604800,M="https://".concat(i,"/translate"),B="https://".concat(i,"/subtitle"),W=("https://".concat(i,"/detectlang"),"https://".concat(i,"/bingdict")),U="https://".concat(i,"/dict"),H="https://".concat(i,"/context");var V=n(328);const G="web",K="chrome",q="firefox",Y="userscript",X=[K,"edge",q,"thunderbird"],$="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36";var J=n(1367)}},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:()=>z,extract:()=>T,parse:()=>D,parseUrl:()=>I,pick:()=>L,stringify:()=>P,stringifyUrl:()=>F});var t={};i.r(t),i.d(t,{attentionMarkers:()=>LT,contentInitial:()=>_T,disable:()=>zT,document:()=>CT,flow:()=>DT,flowInitial:()=>TT,insideSpan:()=>FT,string:()=>PT,text:()=>IT});var n={};i.r(n),i.d(n,{boolean:()=>TD,booleanish:()=>DD,commaOrSpaceSeparated:()=>zD,commaSeparated:()=>LD,number:()=>ID,overloadedBoolean:()=>PD,spaceSeparated:()=>FD});var r=i(4107),o=i(9992),a=i(8930);const s=window.self!==window.top;var l=i(1166),u=i(2375),c=i(6639);const d="%[a-f0-9]{2}",h=new RegExp("("+d+")|([^%]+?)","gi"),p=new RegExp("("+d+")+","gi");function f(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([],f(n),f(r))}function m(e){try{return decodeURIComponent(e)}catch(t){let n=e.match(h)||[];for(let t=1;t<n.length;t++)n=(e=f(n,t).join("")).match(h)||[];return e}}function g(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=p.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){const r=m(n[0]);r!==n[0]&&(t[n[0]]=r)}n=p.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 v(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 y(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 b=e=>null==e,A=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())),x=Symbol("encodeFragmentIdentifier");function w(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function k(e,t){return t.encode?t.strict?A(e):encodeURIComponent(e):e}function S(e,t){return t.decode?g(e):e}function E(e){return Array.isArray(e)?e.sort():"object"==typeof e?E(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function C(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function _(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 T(e){const t=(e=C(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function D(e,t){w((t=(0,r.A)({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&&S(n,e).includes(e.arrayFormatSeparator);n=o?S(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map(t=>S(t,e)):null===n?n:S(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?S(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>S(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),i=Object.create(null);if("string"!=typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const r of e.split("&")){if(""===r)continue;const e=t.decode?r.replace(/\+/g," "):r;let[o,a]=v(e,"=");void 0===o&&(o=e),a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:S(a,t),n(S(o,t),a,i)}for(const[e,n]of Object.entries(i))if("object"==typeof n&&null!==n)for(const[e,r]of Object.entries(n))n[e]=_(r,t);else i[e]=_(n,t);return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>{const n=i[t];return e[t]=Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?E(n):n,e},Object.create(null))}function P(e,t){if(!e)return"";w((t=(0,r.A)({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&b(e[n])||t.skipEmptyString&&""===e[n],i=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,[k(t,e),"[",i,"]"].join("")]:[...n,[k(t,e),"[",k(i,e),"]=",k(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[k(t,e),"[]"].join("")]:[...n,[k(t,e),"[]=",k(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,[k(t,e),":list="].join("")]:[...n,[k(t,e),":list=",k(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?[[k(n,e),t,k(i,e)].join("")]:[[r,k(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,k(t,e)]:[...n,[k(t,e),"=",k(r,e)].join("")]}}(t),o={};for(const[t,r]of Object.entries(e))n(t)||(o[t]=r);const a=Object.keys(o);return!1!==t.sort&&a.sort(t.sort),a.map(n=>{const r=e[n];return void 0===r?"":null===r?k(n,t):Array.isArray(r)?0===r.length&&"bracket-separator"===t.arrayFormat?k(n,t)+"[]":r.reduce(i(n),[]).join("&"):k(n,t)+"="+k(r,t)}).filter(e=>e.length>0).join("&")}function I(e,t){var n,i;t=(0,r.A)({decode:!0},t);let[o,a]=v(e,"#");return void 0===o&&(o=e),(0,r.A)({url:null!==(n=null===(i=o)||void 0===i||null===(i=i.split("?"))||void 0===i?void 0:i[0])&&void 0!==n?n:"",query:D(T(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:S(a,t)}:{})}function F(e,t){t=(0,r.A)({encode:!0,strict:!0,[x]:!0},t);const n=C(e.url).split("?")[0]||"",i=T(e.url);let o=P((0,r.A)((0,r.A)({},D(i,{sort:!1})),e.query),t);o&&(o="?".concat(o));let a=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,a=t[x]?r.hash:"#".concat(e.fragmentIdentifier)}return"".concat(n).concat(o).concat(a)}function L(e,t,n){n=(0,r.A)({parseFragmentIdentifier:!0,[x]:!1},n);const{url:i,query:o,fragmentIdentifier:a}=I(e,n);return F({url:i,query:y(o,t),fragmentIdentifier:a},n)}function z(e,t,n){return L(e,Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n),n)}const O=e;var N=i(2974),j=i(5493);const R=new Map(j.to.map(e=>[e.toLowerCase(),e])),M=new Set(["cn","sg","hans"]),B=new Set(["tw","hk","mo","hant"]);function W(e){if("string"!=typeof e)return"";const t=e.trim().replaceAll("_","-").toLowerCase();if(!t||"und"===t)return"";const n=t.split("-").filter(Boolean),r=n[0];return"zh"===r?1===n.length?"zh-CN":n.some(e=>B.has(e))?"zh-TW":n.some(e=>M.has(e))?"zh-CN":"":"no"===r?"nb":R.get(t)||R.get(r)||""}function U(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=W(e),i=W(t);return!(!r||!i)&&(r===i||!n&&r.split("-")[0]===i.split("-")[0])}var H=i(328),V=i(252),G=i(2770);const K=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(e=>{let t=3735928559,n=1103547991;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(n>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")})("".concat(e).concat(t))},q=async function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(null!==(t=globalThis.crypto)&&void 0!==t&&null!==(n=t.subtle)&&void 0!==n&&n.digest)return(0,l.$Q)(e,r);if(V.aQ)try{const t=await(0,G.Ru)(H.U3,{text:e,salt:r});if("string"==typeof t&&t)return t}catch(e){}return K(e,r)};var Y=i(7301),X=i(1152),$=i(1442),J=i(3951);let Q=1e4*Math.round(1e4*Math.random());var Z=i(7029);const ee=new(i.n(Z)())({ecmaVer:"latest",sourceType:"script",sandBox:!0}),{entries:te,setPrototypeOf:ne,isFrozen:re,getPrototypeOf:ie,getOwnPropertyDescriptor:oe}=Object;let{freeze:ae,seal:se,create:le}=Object,{apply:ue,construct:ce}="undefined"!=typeof Reflect&&Reflect;ae||(ae=function(e){return e}),se||(se=function(e){return e}),ue||(ue=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)}),ce||(ce=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 de=Ce(Array.prototype.forEach),he=Ce(Array.prototype.lastIndexOf),pe=Ce(Array.prototype.pop),fe=Ce(Array.prototype.push),me=Ce(Array.prototype.splice),ge=Ce(String.prototype.toLowerCase),ve=Ce(String.prototype.toString),ye=Ce(String.prototype.match),be=Ce(String.prototype.replace),Ae=Ce(String.prototype.indexOf),xe=Ce(String.prototype.trim),we=Ce(Object.prototype.hasOwnProperty),ke=Ce(RegExp.prototype.test),Se=(Ee=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ce(Ee,t)});var Ee;function Ce(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 ue(e,t,r)}}function _e(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ge;ne&&ne(e,null);let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(re(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Te(e){for(let t=0;t<e.length;t++){we(e,t)||(e[t]=null)}return e}function De(e){const t=le(null);for(const[n,r]of te(e)){we(e,n)&&(Array.isArray(r)?t[n]=Te(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=De(r):t[n]=r)}return t}function Pe(e,t){for(;null!==e;){const n=oe(e,t);if(n){if(n.get)return Ce(n.get);if("function"==typeof n.value)return Ce(n.value)}e=ie(e)}return function(){return null}}const Ie=ae(["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"]),Fe=ae(["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"]),Le=ae(["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"]),ze=ae(["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"]),Oe=ae(["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"]),Ne=ae(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),je=ae(["#text"]),Re=ae(["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"]),Me=ae(["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"]),Be=ae(["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"]),We=ae(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ue=se(/\{\{[\w\W]*|[\w\W]*\}\}/gm),He=se(/<%[\w\W]*|[\w\W]*%>/gm),Ve=se(/\$\{[\w\W]*/gm),Ge=se(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ke=se(/^aria-[\-\w]+$/),qe=se(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ye=se(/^(?:\w+script|data):/i),Xe=se(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$e=se(/^html$/i),Je=se(/^[a-z][.\w]*(-[.\w]+)+$/i);var Qe=Object.freeze({__proto__:null,ARIA_ATTR:Ke,ATTR_WHITESPACE:Xe,CUSTOM_ELEMENT:Je,DATA_ATTR:Ge,DOCTYPE_NAME:$e,ERB_EXPR:He,IS_ALLOWED_URI:qe,IS_SCRIPT_OR_DATA:Ye,MUSTACHE_EXPR:Ue,TMPLIT_EXPR:Ve});const Ze=1,et=3,tt=7,nt=8,rt=9,it=function(){return"undefined"==typeof window?null:window};var ot=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:it();const n=t=>e(t);if(n.version="3.4.0",n.removed=[],!t||!t.document||t.document.nodeType!==rt||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const i=r,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:u,NodeFilter:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:f}=t,m=u.prototype,g=Pe(m,"cloneNode"),v=Pe(m,"remove"),y=Pe(m,"nextSibling"),b=Pe(m,"childNodes"),A=Pe(m,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let x,w="";const{implementation:k,createNodeIterator:S,createDocumentFragment:E,getElementsByTagName:C}=r,{importNode:_}=i;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof te&&"function"==typeof A&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:D,ERB_EXPR:P,TMPLIT_EXPR:I,DATA_ATTR:F,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:N}=Qe;let{IS_ALLOWED_URI:j}=Qe,R=null;const M=_e({},[...Ie,...Fe,...Le,...Oe,...je]);let B=null;const W=_e({},[...Re,...Me,...Be,...We]);let U=Object.seal(le(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}})),H=null,V=null;const G=Object.seal(le(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let K=!0,q=!0,Y=!1,X=!0,$=!1,J=!0,Q=!1,Z=!1,ee=!1,ne=!1,re=!1,ie=!1,oe=!0,se=!1,ue=!0,ce=!1,Ee={},Ce=null;const Te=_e({},["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 Ue=null;const He=_e({},["audio","video","img","source","image","track"]);let Ve=null;const Ge=_e({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Xe="http://www.w3.org/1999/xhtml";let Je=Xe,ot=!1,at=null;const st=_e({},[Ke,Ye,Xe],ve);let lt=_e({},["mi","mo","mn","ms","mtext"]),ut=_e({},["annotation-xml"]);const ct=_e({},["title","style","font","a","script"]);let dt=null;const ht=["application/xhtml+xml","text/html"];let pt=null,ft=null;const mt=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},vt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=De(e),dt=-1===ht.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===dt?ve:ge,R=we(e,"ALLOWED_TAGS")?_e({},e.ALLOWED_TAGS,pt):M,B=we(e,"ALLOWED_ATTR")?_e({},e.ALLOWED_ATTR,pt):W,at=we(e,"ALLOWED_NAMESPACES")?_e({},e.ALLOWED_NAMESPACES,ve):st,Ve=we(e,"ADD_URI_SAFE_ATTR")?_e(De(Ge),e.ADD_URI_SAFE_ATTR,pt):Ge,Ue=we(e,"ADD_DATA_URI_TAGS")?_e(De(He),e.ADD_DATA_URI_TAGS,pt):He,Ce=we(e,"FORBID_CONTENTS")?_e({},e.FORBID_CONTENTS,pt):Te,H=we(e,"FORBID_TAGS")?_e({},e.FORBID_TAGS,pt):De({}),V=we(e,"FORBID_ATTR")?_e({},e.FORBID_ATTR,pt):De({}),Ee=!!we(e,"USE_PROFILES")&&e.USE_PROFILES,K=!1!==e.ALLOW_ARIA_ATTR,q=!1!==e.ALLOW_DATA_ATTR,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,$=e.SAFE_FOR_TEMPLATES||!1,J=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ne=e.RETURN_DOM||!1,re=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,oe=!1!==e.SANITIZE_DOM,se=e.SANITIZE_NAMED_PROPS||!1,ue=!1!==e.KEEP_CONTENT,ce=e.IN_PLACE||!1,j=e.ALLOWED_URI_REGEXP||qe,Je=e.NAMESPACE||Xe,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ut=e.HTML_INTEGRATION_POINTS||ut,U=e.CUSTOM_ELEMENT_HANDLING||le(null),e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&gt(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),$&&(q=!1),re&&(ne=!0),Ee&&(R=_e({},je),B=le(null),!0===Ee.html&&(_e(R,Ie),_e(B,Re)),!0===Ee.svg&&(_e(R,Fe),_e(B,Me),_e(B,We)),!0===Ee.svgFilters&&(_e(R,Le),_e(B,Me),_e(B,We)),!0===Ee.mathMl&&(_e(R,Oe),_e(B,Be),_e(B,We))),G.tagCheck=null,G.attributeCheck=null,e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?G.tagCheck=e.ADD_TAGS:(R===M&&(R=De(R)),_e(R,e.ADD_TAGS,pt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?G.attributeCheck=e.ADD_ATTR:(B===W&&(B=De(B)),_e(B,e.ADD_ATTR,pt))),e.ADD_URI_SAFE_ATTR&&_e(Ve,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&(Ce===Te&&(Ce=De(Ce)),_e(Ce,e.FORBID_CONTENTS,pt)),e.ADD_FORBID_CONTENTS&&(Ce===Te&&(Ce=De(Ce)),_e(Ce,e.ADD_FORBID_CONTENTS,pt)),ue&&(R["#text"]=!0),Q&&_e(R,["html","head","body"]),R.table&&(_e(R,["tbody"]),delete H.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Se('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Se('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,w=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 w&&(w=x.createHTML(""));ae&&ae(e),ft=e}},yt=_e({},[...Fe,...Le,...ze]),bt=_e({},[...Oe,...Ne]),At=function(e){fe(n.removed,{element:e});try{A(e).removeChild(e)}catch(t){v(e)}},xt=function(e,t){try{fe(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){fe(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ne||re)try{At(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},wt=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=ye(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===dt&&Je===Xe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=x?x.createHTML(e):e;if(Je===Xe)try{t=(new p).parseFromString(i,dt)}catch(e){}if(!t||!t.documentElement){t=k.createDocument(Je,"template",null);try{t.documentElement.innerHTML=ot?w:i}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),Je===Xe?C.call(t,Q?"html":"body")[0]:Q?t.documentElement:o},kt=function(e){return S.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},St=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)},Et=function(e){return"function"==typeof l&&e instanceof l};function Ct(e,t,r){de(e,e=>{e.call(n,t,r,ft)})}const _t=function(e){let t=null;if(Ct(T.beforeSanitizeElements,e,null),St(e))return At(e),!0;const r=pt(e.nodeName);if(Ct(T.uponSanitizeElement,e,{tagName:r,allowedTags:R}),J&&e.hasChildNodes()&&!Et(e.firstElementChild)&&ke(/<[/\w!]/g,e.innerHTML)&&ke(/<[/\w!]/g,e.textContent))return At(e),!0;if(J&&e.namespaceURI===Xe&&"style"===r&&Et(e.firstElementChild))return At(e),!0;if(e.nodeType===tt)return At(e),!0;if(J&&e.nodeType===nt&&ke(/<[/\w]/g,e.data))return At(e),!0;if(H[r]||!(G.tagCheck instanceof Function&&G.tagCheck(r))&&!R[r]){if(!H[r]&&Dt(r)){if(U.tagNameCheck instanceof RegExp&&ke(U.tagNameCheck,r))return!1;if(U.tagNameCheck instanceof Function&&U.tagNameCheck(r))return!1}if(ue&&!Ce[r]){const t=A(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const i=g(n[r],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,y(e))}}}return At(e),!0}return e instanceof u&&!function(e){let t=A(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=ge(e.tagName),r=ge(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===Ye?t.namespaceURI===Xe?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||lt[r]):Boolean(yt[n]):e.namespaceURI===Ke?t.namespaceURI===Xe?"math"===n:t.namespaceURI===Ye?"math"===n&&ut[r]:Boolean(bt[n]):e.namespaceURI===Xe?!(t.namespaceURI===Ye&&!ut[r])&&!(t.namespaceURI===Ke&&!lt[r])&&!bt[n]&&(ct[n]||!yt[n]):!("application/xhtml+xml"!==dt||!at[e.namespaceURI]))}(e)?(At(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!ke(/<\/no(script|embed|frames)/i,e.innerHTML)?($&&e.nodeType===et&&(t=e.textContent,de([D,P,I],e=>{t=be(t,e," ")}),e.textContent!==t&&(fe(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ct(T.afterSanitizeElements,e,null),!1):(At(e),!0)},Tt=function(e,t,n){if(V[t])return!1;if(oe&&("id"===t||"name"===t)&&(n in r||n in mt))return!1;if(q&&!V[t]&&ke(F,t));else if(K&&ke(L,t));else if(G.attributeCheck instanceof Function&&G.attributeCheck(t,e));else if(!B[t]||V[t]){if(!(Dt(e)&&(U.tagNameCheck instanceof RegExp&&ke(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&ke(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t,e))||"is"===t&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&ke(U.tagNameCheck,n)||U.tagNameCheck instanceof Function&&U.tagNameCheck(n))))return!1}else if(Ve[t]);else if(ke(j,be(n,O,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ae(n,"data:")||!Ue[e]){if(Y&&!ke(z,be(n,O,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&ye(e,N)},Pt=function(e){Ct(T.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||St(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B,forceKeepAttr:void 0};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:s,value:l}=o,u=pt(a),c=l;let d="value"===a?c:xe(c);if(r.attrName=u,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,Ct(T.uponSanitizeAttribute,e,r),d=r.attrValue,!se||"id"!==u&&"name"!==u||(xt(a,e),d="user-content-"+d),J&&ke(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){xt(a,e);continue}if("attributename"===u&&ye(d,"href")){xt(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){xt(a,e);continue}if(!X&&ke(/\/>/i,d)){xt(a,e);continue}$&&de([D,P,I],e=>{d=be(d,e," ")});const h=pt(e.nodeName);if(Tt(h,u,d)){if(x&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(s);else switch(f.getAttributeType(h,u)){case"TrustedHTML":d=x.createHTML(d);break;case"TrustedScriptURL":d=x.createScriptURL(d)}if(d!==c)try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),St(e)?At(e):pe(n.removed)}catch(t){xt(a,e)}}else xt(a,e)}Ct(T.afterSanitizeAttributes,e,null)},It=function(e){let t=null;const n=kt(e);for(Ct(T.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)Ct(T.uponSanitizeShadowNode,t,null),_t(t),Pt(t),t.content instanceof a&&It(t.content);Ct(T.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,u=null;if(ot=!e,ot&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Et(e)){if("function"!=typeof e.toString)throw Se("toString is not a function");if("string"!=typeof(e=e.toString()))throw Se("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||vt(t),n.removed=[],"string"==typeof e&&(ce=!1),ce){if(e.nodeName){const t=pt(e.nodeName);if(!R[t]||H[t])throw Se("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=wt("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),o.nodeType===Ze&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!ne&&!$&&!Q&&-1===e.indexOf("<"))return x&&ie?x.createHTML(e):e;if(r=wt(e),!r)return ne?null:ie?w:""}r&&ee&&At(r.firstChild);const c=kt(ce?e:r);for(;s=c.nextNode();)_t(s),Pt(s),s.content instanceof a&&It(s.content);if(ce)return e;if(ne){if($){r.normalize();let e=r.innerHTML;de([D,P,I],t=>{e=be(e,t," ")}),r.innerHTML=e}if(re)for(u=E.call(r.ownerDocument);r.firstChild;)u.appendChild(r.firstChild);else u=r;return(B.shadowroot||B.shadowrootmode)&&(u=_.call(i,u,!0)),u}let d=Q?r.outerHTML:r.innerHTML;return Q&&R["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&ke($e,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),$&&de([D,P,I],e=>{d=be(d,e," ")}),x&&ie?x.createHTML(d):d},n.setConfig=function(){vt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){ft=null,Z=!1},n.isValidAttribute=function(e,t,n){ft||vt({});const r=pt(e),i=pt(t);return Tt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&fe(T[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=he(T[e],t);return-1===n?void 0:me(T[e],n,1)[0]}return pe(T[e])},n.removeHooks=function(e){T[e]=[]},n.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const at=(()=>{const e="kiss-translator-policy";let t=null,n=!1;const r=()=>{if(t||n)return t;if(!globalThis.trustedTypes||!globalThis.trustedTypes.createPolicy)return n=!0,null;try{t=globalThis.trustedTypes.createPolicy(e,{createHTML:e=>ot.sanitize(e),createScript:e=>e,createScriptURL:e=>e})}catch(o){var r,i;if(null!=o&&null!==(r=o.message)&&void 0!==r&&r.includes("already exists"))t=(null===(i=globalThis.trustedTypes.policies)||void 0===i?void 0:i.get(e))||null;t||(n=!0)}return t};return{createHTML:e=>{const t=r();return t?t.createHTML(e):ot.sanitize(e)},createScript:e=>{const t=r();return t?t.createScript(e):e},createScriptURL:e=>{const t=r();return t?t.createScriptURL(e):e},isEnabled:()=>null!==t}})();function st(e){if(!e||"string"!=typeof e)return e;return(new DOMParser).parseFromString(at.createHTML(e),"text/html").documentElement.textContent||""}const lt=e=>String(e||"").replace(/\r\n|\r|\n/g,"<br>");var ut=i(1825),ct=i(4218),dt=i(1270),ht=i(4181);const pt=new Map,ft=(e,t)=>{if(pt.has(e))return pt.get(e);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.w62;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 pt.set(e,n),n},mt=e=>{pt.delete(e)};function gt(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 vt(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 yt(e){if(!Array.isArray(e))return"WEBVTT";const t=e.map((e,t)=>{const n=vt(e.start),r=vt(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)});return["WEBVTT",...t].join("\n\n")}const bt=e=>e?e.trim().replace(/\s+/g," "):"",At=()=>({title:(()=>{try{return(0,l.sz)(bt(document.title))}catch(e){return""}})(),description:(()=>{try{const e=document.querySelector('meta[name="description"]'),t=(null==e?void 0:e.getAttribute("content"))||"";return(0,l.sz)(bt(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(0,l.sz)(bt(e))})()});var xt=i(9385);const wt=["reqHook"],kt=new Map,St=new Map,Et=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]},Ct=e=>{let{subtitlePrompt:t,tone:n,from:r,to:i,fromLang:a,toLang:s,docInfo:{title:u="",description:c="",summary:d=""}={},aiTerms:h=""}=e;const p=(0,l.jJ)(h),f=Object.entries(p).map(e=>{let[t,n]=e;return"- ".concat(t,": ").concat(n)}).join("\n");return String(t||"").replaceAll(o.Ymt,u).replaceAll(o.yDH,c).replaceAll(o.snk,d).replaceAll(o.S6q,n).replaceAll(o.S6X,f).replaceAll(o.Qfh,r).replaceAll(o.fDS,i).replaceAll(o.L32,a).replaceAll(o.Wdi,s)},_t=function(e){if(!e)return[];if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))return[[e]];let t=(0,l.if)(e).trim();const n=(0,ut.qG)(t,{decodeText:st});return n.length>0?n.map(e=>e.translation):t.split("\n").map(e=>[st(e.replace(/<br\s*\/?>/gi,"\n").trim()),""])},Tt=function(){const e=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"");if(/WEBVTT|MM:SS\.mmm|-->/i.test(e))return"vtt-legacy";if(/\{\s*["']?s["']?\s*:/.test(e))return"index-v1";const t=/["'`]p["'`]/i.test(e),n=/pause\s+levels?|停顿等级|暫停等級/i.test(e);return t&&n?"boundary-v2":"boundary-v3"},Dt=function(e){const t=Tt(arguments.length>1&&void 0!==arguments[1]?arguments[1]:""),n="boundary-v2"===t||"index-v1"===t||"vtt-legacy"===t;return e.map((t,r)=>{const i={id:r,text:t.text};if(n&&r>0){const n=(o=t.start-e[r-1].end,!Number.isFinite(o)||o<=300?0:o<=600?1:o<=1200?2:3);n&&(i.p=n)}else if(!n&&r<e.length-1){const n=Math.round(e[r+1].start-t.end);n>0&&(i.pauseMs=n)}var o;return i})},Pt=function(){return"vtt-legacy"!==Tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")},It=e=>Array.isArray(e)?e.filter(e=>!e.thought&&e.text).map(e=>e.text).join(""):"",Ft=e=>{var t,n,r;return Array.isArray(null==e?void 0:e.steps)?(e=>Array.isArray(null==e?void 0:e.steps)?e.steps.filter(e=>"model_output"===(null==e?void 0:e.type)).flatMap(e=>Array.isArray(e.content)?e.content:[]).filter(e=>"text"===(null==e?void 0:e.type)&&e.text).map(e=>e.text).join(""):"")(e):It(null==e||null===(t=e.candidates)||void 0===t||null===(n=t[0])||void 0===n||null===(r=n.content)||void 0===r?void 0:r.parts)},Lt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(!e)return[];if(null!=t&&t.length){const i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";const i=(0,dt.n)(t),o=e=>{if(!Array.isArray(e)||!e.length)return null;const o=e.map(xt.Tt);if(o.some(Boolean)&&!o.every(Boolean))return null;if(!o[0]){const r=[];let i=0;for(const o of e){const e=(0,xt.Ir)(o,t,i,n);if(!e)break;r.push(e),i=e._ei+1}return r.length?r:null}const a=[];for(const n of e){var s,l,u,c,d,h,p,f;const e=Number(null!==(s=n.s)&&void 0!==s?s:n.start_id),o=Number(null!==(l=n.e)&&void 0!==l?l:n.end_id);if(!Number.isInteger(e)||!Number.isInteger(o))continue;const m=Math.max(0,Math.min(e,t.length-1)),g=Math.max(m,Math.min(o,t.length-1)),v=String(null!==(u=null!==(c=n.o)&&void 0!==c?c:n.original)&&void 0!==u?u:""),y=i.realign(e,o,v);a.push((0,r.A)({start:t[null!==(d=null==y?void 0:y.startIdx)&&void 0!==d?d:m].start,end:t[null!==(h=null==y?void 0:y.endIdx)&&void 0!==h?h:g].end,text:v,translation:String(null!==(p=null!==(f=n.t)&&void 0!==f?f:n.translation)&&void 0!==p?p:""),_si:e,_ei:o},y&&{_alignedSi:y.startIdx,_alignedEi:y.endIdx}))}return a.length?a:null},a=(0,l.if)(String(null!=e?e:"")).trim().replace(/"([a-z_]+)">>/g,'"$1":">>');try{return o(JSON.parse(a))}catch(e){try{const e=a.indexOf("["),t=a.lastIndexOf("}");return e<0||t<e?null:o(JSON.parse(a.slice(e,t+1)+"]"))}catch(e){return null}}}(e,t,n);if(i)return i}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,u]=a[s].split("--\x3e"),c=a.slice(s+1);if(l&&u&&c.length>0){var i,o;const e=st((null===(i=c[0])||void 0===i?void 0:i.trim())||""),t=st((null===(o=c[1])||void 0===o?void 0:o.trim())||"");r.push({start:gt(l),end:gt(u),text:e,translation:t})}}return r}(e);if(Array.isArray(t))return t}catch(e){(0,ht.h9)("parse AI Res: subtitle",e)}return[]},zt={max:32768,high:16384,medium:8192,low:4096,minimal:2048},Ot={deepseek:(e,t)=>{let{thinkingMode:n,thinkingEffort:r}=t;e.thinking={type:n},"enabled"===n&&r&&(e.reasoning_effort=r)},boolean:(e,t)=>{let{thinkingMode:n}=t;e.enable_thinking="enabled"===n},siliconflow:(e,t)=>{let{thinkingMode:n,thinkingEffort:r}=t;e.enable_thinking="enabled"===n,"enabled"===n&&r&&(e.thinking_budget=zt[r]||8192)},openai:(e,t)=>{let{thinkingEffort:n}=t;null!==n&&(e.reasoning_effort=n)},openrouter:(e,t)=>{let{thinkingMode:n,thinkingEffort:r}=t;"enabled"!==n||null!==r?null!==r&&(e.reasoning={effort:r}):e.reasoning={enabled:!0}},claude:(e,t)=>{let{thinkingMode:n,thinkingEffort:r}=t;const i="disabled"===n&&null!==r;e.thinking={type:"enabled"===n||i?"adaptive":"disabled"},r&&(e.output_config={effort:r})},gemini:(e,t)=>{let{apiType:n,url:r,model:i,thinkingMode:a,thinkingEffort:s}=t;if(n===o.kYm)return void(null!==s&&(e.reasoning_effort=s));if(null===s)return;if((0,o.qKR)(r))return void(e.generation_config.thinking_level=s);const l=(0,o.HO1)(i);if(l.startsWith("gemini-2.5-")){const t="disabled"===a&&l.startsWith("gemini-2.5-pro")?128:"number"==typeof s?s:o.iPL[s];return void(e.generationConfig.thinkingConfig={thinkingBudget:t})}e.generationConfig.thinkingConfig={thinkingLevel:s}}},Nt=(e,t)=>{var n;const r=o.yCU[t.apiType];r&&"auto"!==t.thinkingMode&&"_default"!==t.thinkingEffort&&void 0!==t.thinkingEffort&&(null===(n=Ot[r.adapter])||void 0===n||n.call(Ot,e,t))},jt=e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:u=!1,apiType:c,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:u};Nt(f,{apiType:c,url:t,model:o,thinkingMode:d,thinkingEffort:h});return{url:t,body:f,headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n)},userMsg:p}},Rt={[o.bCM]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;const a=O.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"}},[o.ul7]:e=>{let{texts:t,from:n,to:r,url:i,key:o,textFormat:a="text"}=e;return{url:i,body:[["html"===a?t:t.map(lt),n,r],"wt_lib"],headers:{"Content-Type":"application/json+protobuf","X-Goog-API-Key":o}}},[o.brj]:e=>{let{texts:t,from:n,to:i,url:o,key:a,textFormat:s="text"}=e;return{url:o,body:(0,r.A)({q:t,target:i,format:s},"auto"!==n&&{source:n}),headers:{"Content-type":"application/json","X-Goog-Api-Key":a}}},[o.ZIc]:e=>{let{texts:t,from:n,to:i,url:o,key:a,folderId:s}=e;return{url:o,body:(0,r.A)({folderId:s,texts:t,targetLanguageCode:i},"auto"!==n&&{sourceLanguageCode:n}),headers:{"Content-type":"application/json",Authorization:"Api-Key ".concat(a)}}},[o.zCg]:e=>{let{texts:t,from:n,to:r}=e,i="";for(let e=0;e<32;e++)i+=Math.floor(16*Math.random()).toString(16);const o=O.stringify({id:"".concat(i,"-0-0"),srv:"android",source_lang:n,target_lang:r,text:t[0]});return{url:"https://translate.yandex.net/api/v1/tr.json/translate?".concat(o),method:"POST"}},[o.kXF]:e=>{let{texts:t,from:n,to:r}=e;const i=O.stringify({from:n||"",to:r,isEnterpriseClient:!1});return{url:"https://edge.microsoft.com/translate/translatetext?".concat(i),body:t,headers:{"Content-type":"application/json"}}},[o.FS6]:e=>{let{texts:t,from:n,to:r,url:i,key:o,region:a}=e;const s=O.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}},[o.e70]: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)}}},[o.An9]:e=>{let{texts:t,from:n,to:i,toLang:o}=e;const a=t.join(" "),s=(a.match(/[i]/g)||[]).length+1;let l=Date.now();l+=s-l%s,Q++;return{url:"https://www2.deepl.com/jsonrpc",body:{jsonrpc:"2.0",method:"LMT_handle_texts",params:{splitting:"newlines",lang:{target_lang:i,source_lang_user_selected:n},commonJobParams:(0,r.A)((0,r.A)({wasSpoken:!1,transcribe_as:""},"zh-CN"===o&&{regionalVariant:"zh-Hans"}),"zh-TW"===o&&{regionalVariant:"zh-Hant"}),id:Q,timestamp:l,texts:[{text:a,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"}}},[o.KBl]:jt,[o.rUY]:jt,[o.FsV]:jt,[o.F16]:jt,[o.EjO]:jt,[o.IEe]:e=>{let{url:t,key:n,model:i,texts:a,from:s,to:u,glossary:c,aiTerms:d,tone:h}=e;const p={source_lang:s,target_lang:u},f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,r.A)((0,r.A)({},e),(0,l.jJ)(t));return Object.entries(n).filter(e=>{let[t]=e;return String(t).trim()}).map(e=>{let[t,n]=e;const r=String(null!=n?n:"");return{source:t,target:r.trim()?r:t}})}(c,d),m=function(){const e=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim();return e?o.Fxm.includes(e)?"Translate in a ".concat(e.toLowerCase()," style."):e:""}(h);f.length&&(p.terms=f),m&&(p.domains=m);const g={role:"user",content:a[0]};return{url:t,body:{model:i,messages:[g],translation_options:p},headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n)},userMsg:g}},[o.NQu]:jt,[o.cbe]:jt,[o.c0T]: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}},[o.lbn]:jt,[o.xN$]: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":o.qxj}}},[o.fFW]: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":o.qxj,referer:"https://transmart.qq.com/zh-CN/index"}}},[o.UFr]: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"}}},[o.C3L]:jt,[o.lLy]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:a,temperature:s,maxTokens:l,hisMsgs:u=[],useStream:c=!1,apiType:d,thinkingMode:h,thinkingEffort:p}=e;if(t=t.replaceAll(o.b9x,a).replaceAll(o.xfV,n),(0,o.qKR)(t)){const e={type:"user_input",content:[{type:"text",text:i}]},o={max_output_tokens:l,temperature:s},f={model:a,system_instruction:r,input:[...u,e],stream:c,store:!1,generation_config:o};Nt(f,{apiType:d,url:t,model:a,thinkingMode:h,thinkingEffort:p});return{url:t,body:f,headers:{"Content-type":"application/json","x-goog-api-key":n},userMsg:e}}c&&(t=t.replace(":generateContent",":streamGenerateContent"),t+=(t.includes("?")?"&":"?")+"alt=sse");const f={role:"user",parts:[{text:i}]},m={systemInstruction:{parts:[{text:r}]},contents:[...u,f],generationConfig:{maxOutputTokens:l,temperature:s}};Nt(m,{apiType:d,url:t,model:a,thinkingMode:h,thinkingEffort:p}),Object.assign(m,{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:m,headers:{"Content-type":"application/json","x-goog-api-key":n},userMsg:f}},[o.kYm]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:u=!1,apiType:c,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:u};Nt(f,{apiType:c,url:t,model:o,thinkingMode:d,thinkingEffort:h});return{url:t,body:f,headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n)},userMsg:p}},[o.EsI]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:a,temperature:s,maxTokens:l,hisMsgs:u=[],useStream:c=!1,thinkingMode:d,thinkingEffort:h}=e;const p={role:"user",content:i},f={model:a,system:r,messages:[...u,p],temperature:s,max_tokens:l,stream:c};Nt(f,{apiType:o.EsI,url:t,model:a,thinkingMode:d,thinkingEffort:h});return{url:t,body:f,headers:{"Content-type":"application/json","anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true","x-api-key":n},userMsg:p}},[o.bNe]: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)}}},[o.edy]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:a,temperature:s,maxTokens:l,hisMsgs:u=[],useStream:c=!1,thinkingMode:d,thinkingEffort:h}=e;const p={role:"user",content:i},f={model:a,messages:[{role:"system",content:r},...u,p],temperature:s,max_tokens:l};Nt(f,{apiType:o.edy,url:t,model:a,thinkingMode:d,thinkingEffort:h}),f.stream=c;const m={"Content-type":"application/json"};return n&&(m.Authorization="Bearer ".concat(n)),{url:t,body:f,headers:m,userMsg:p}},[o.dGW]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:a,temperature:s,maxTokens:l,hisMsgs:u=[],useStream:c=!1,thinkingMode:d,thinkingEffort:h}=e;const p={role:"user",content:i},f={model:a,messages:[{role:"system",content:r},...u,p],temperature:s,max_tokens:l,stream:c};Nt(f,{apiType:o.dGW,url:t,model:a,thinkingMode:d,thinkingEffort:h});return{url:t,body:f,headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n),"HTTP-Referer":"https://fishjar.github.io/kiss-translator/","X-OpenRouter-Title":"KISS Translator"},userMsg:p}},[o.mmp]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:a,temperature:s,maxTokens:l,hisMsgs:u=[],useStream:c=!1,thinkingMode:d,thinkingEffort:h}=e;const p={role:"user",content:i},f={model:a,messages:[{role:"system",content:r},...u,p],temperature:s,max_completion_tokens:l,stream:c};Nt(f,{apiType:o.mmp,url:t,model:a,thinkingMode:d,thinkingEffort:h});return{url:t,body:f,headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n),"HTTP-Referer":"https://fishjar.github.io/kiss-translator/","X-Title":"KISS Translator"},userMsg:p}},[o.fqf]: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)}}}},Mt=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]},Bt=async e=>{let{reqHook:t}=e,n=(0,Y.A)(e,wt);const{apiType:i,apiSlug:a,key:s,systemPrompt:u,subtitlePrompt:c,nobatchPrompt:d=o.$1M,nobatchUserPrompt:h=o.EEo,useBatchFetch:p,from:f,to:m,fromLang:g,toLang:v,texts:y,glossary:b,aiTerms:A,customHeader:x,customBody:w,events:k,tone:S,docInfo:E}=n;if(o.sNP.mulkeys.has(i)&&(n.key=Et(a,s,kt)),i===o.c0T&&(n.url=Et(a,n.url,St)),o.sNP.ai.has(i)){const e=E||At();let t=k?Ct({subtitlePrompt:c,from:f,to:m,fromLang:g,toLang:v,texts:y,docInfo:e,tone:S,aiTerms:A}):(e=>{let{systemPrompt:t,tone:n,from:r,to:i,fromLang:a,toLang:s,texts:l,docInfo:{title:u="",description:c="",summary:d="",context:h=""}={}}=e;return String(t||"").replaceAll(o.Ymt,u).replaceAll(o.yDH,c).replaceAll(o.snk,d).replaceAll(o.xhA,h).replaceAll(o.S6q,n).replaceAll(o.Qfh,r).replaceAll(o.fDS,i).replaceAll(o.L32,a).replaceAll(o.Wdi,s).replaceAll(o.X6r,l[0])})({systemPrompt:p?u:d,from:f,to:m,fromLang:g,toLang:v,texts:y,docInfo:e,tone:S});n.systemPrompt=t,n.userPrompt=k?(e=>{let{formattedEvents:t}=e;return JSON.stringify(t)})({formattedEvents:Pt(c)?Dt(k,c):k}):(e=>{let{nobatchUserPrompt:t,useBatchFetch:n,tone:i,glossary:a={},aiTerms:s="",from:u,to:c,fromLang:d,toLang:h,texts:p,docInfo:{title:f="",description:m="",summary:g="",context:v=""}={}}=e;if(s){const e=(0,l.jJ)(s);a=(0,r.A)((0,r.A)({},a),e)}if(n){const e={targetLanguage:h,segments:p.map((e,t)=>({id:t,text:e}))};return f&&(e.title=f),m&&(e.description=m),0!==Object.keys(a).length&&(e.glossary=a),i&&(e.tone=i),JSON.stringify(e)}const y=Object.entries(a).map(e=>{let[t,n]=e;return"- ".concat(t,": ").concat(n)}).join("\n");return String(t||"").replaceAll(o.Ymt,f).replaceAll(o.yDH,m).replaceAll(o.snk,g).replaceAll(o.xhA,v).replaceAll(o.S6q,i).replaceAll(o.S6X,y).replaceAll(o.Qfh,u).replaceAll(o.fDS,c).replaceAll(o.L32,d).replaceAll(o.Wdi,h).replaceAll(o.X6r,p[0])})({nobatchUserPrompt:h,useBatchFetch:p,from:f,to:m,fromLang:g,toLang:v,texts:y,docInfo:e,tone:S,glossary:b,aiTerms:A})}const{url:C="",body:_=null,headers:T={},userMsg:D=null,method:P="POST"}=Rt[i](n);if(k&&i===o.lLy&&(null!=_&&_.generation_config?_.response_format={type:"text",mime_type:"application/json"}:null!=_&&_.generationConfig&&(_.generationConfig.responseMimeType="application/json")),null!=x&&x.trim()&&Object.assign(T,(0,l.f6)(x)),null!=w&&w.trim()&&Object.assign(_,(0,l.f6)(w)),null!=t&&t.trim()&&!k)try{const e={url:C,body:_,headers:T,userMsg:D,method:P};ee.run("exports.reqHook = ".concat(t));const i=await ee.exports.reqHook((0,r.A)((0,r.A)({},n),{},{defaultSystemPrompt:o.loo,defaultSystemPromptXml:o.adh,defaultSystemPromptLines:o.WwB,defaultSubtitlePrompt:o.U$w,defaultNobatchPrompt:o.$1M,defaultNobatchUserPrompt:o.EEo,req:e}),e);if(i&&i.url)return Mt(i)}catch(e){throw(0,ht.h9)("run req hook",e),new Error("Request hook error: ".concat(e.message))}return Mt({url:C,body:_,headers:T,userMsg:D,method:P})};function Wt(e,t){var n,r,i,a,s;switch(t){case o.lbn:case o.C3L:case o.KBl:case o.rUY:case o.FsV:case o.F16:case o.EjO:case o.NQu:case o.cbe:case o.kYm:case o.dGW:case o.mmp:case o.edy:return(null==e||null===(n=e.choices)||void 0===n||null===(r=n[0])||void 0===r||null===(i=r.message)||void 0===i?void 0:i.content)||"";case o.lLy:return Ft(e);case o.EsI:return(null==e||null===(a=e.content)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.text)||"";case o.fqf:return"string"==typeof e?e:(null==e?void 0:e.text)||(null==e?void 0:e.result)||""}throw new Error("parse dictionary result: apiType not matched",t)}function Ut(){return Ht.apply(this,arguments)}function Ht(){return Ht=(0,X.A)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{from:t,to:n,fromLang:i,toLang:a,langMap:s,glossary:u,apiSetting:d,usePool:h,docInfo:p,textFormat:f="text",signal:m}=arguments.length>1?arguments[1]:void 0;return function*(){if(null!=m&&m.aborted)return;let g=null,v=[];const{apiType:y,apiSlug:b,contextSize:A,useContext:x,fetchInterval:w,fetchLimit:k,httpTimeout:S,useStream:E}=d;x&&o.sNP.context.has(y)&&(g=ft(b,A),v=g.getAll());const C=E&&o.sNP.stream.has(y)&&!(y===o.lLy&&x&&(0,o.qKR)(d.url)),_=o=>Bt((0,r.A)((0,r.A)({},d),{},{texts:e,from:t,to:n,fromLang:i,toLang:a,langMap:s,glossary:u,textFormat:f,hisMsgs:v,useStream:o,docInfo:p})),T=function(){var u=(0,X.A)(function*(u,c,p){const v=yield(0,$.A)((0,N.Fd)(u,c,{useCache:!1,usePool:h,fetchInterval:w,fetchLimit:k,httpTimeout:S,signal:m}));if(!v)throw new Error("translate got empty response");const y=yield(0,$.A)((async(e,t)=>{var n,r,i,a,s,u,c,d,h,p,f,m,g,v,y,b,A,x,w,k,S,E,C,_;let{texts:T,from:D,to:P,fromLang:I,toLang:F,langMap:L,resHook:z,history:O,userMsg:N,apiType:j,useBatchFetch:R,textFormat:M="text"}=t;if(null!=z&&z.trim())try{ee.run("exports.resHook = ".concat(z));const t=await ee.exports.resHook({apiType:j,userMsg:N,res:e,texts:T,from:D,to:P,fromLang:I,toLang:F,langMap:L,extractJson:l.eg,parseAIRes:_t});if(t&&Array.isArray(t.translations))return O&&N&&t.modelMsg&&O.add(N,t.modelMsg),t.translations;if(Array.isArray(t))return t}catch(e){throw(0,ht.h9)("run res hook",e),new Error("Response hook error: ".concat(e.message))}let B="";switch(j){case o.bCM: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 o.ul7:return null==e||null===(r=e[0])||void 0===r?void 0:r.map((t,n)=>{var r,i,o,a;return["text"===M?(a=null==e||null===(r=e[0])||void 0===r?void 0:r[n],st(String(a||"").replace(/<br\s*\/?>[\t ]*/gi,"\n"))):null==e||null===(i=e[0])||void 0===i?void 0:i[n],null==e||null===(o=e[1])||void 0===o?void 0:o[n]]});case o.brj:return null==e||null===(i=e.data)||void 0===i||null===(a=i.translations)||void 0===a?void 0:a.map(e=>["text"===M?st(e.translatedText):e.translatedText,e.detectedSourceLanguage]);case o.ZIc:return null==e||null===(s=e.translations)||void 0===s?void 0:s.map(e=>[e.text,e.detectedLanguageCode]);case o.zCg:return[[null==e||null===(u=e.text)||void 0===u?void 0:u[0],null==e||null===(c=e.lang)||void 0===c||null===(d=c.split("-"))||void 0===d?void 0:d[0]]];case o.kXF:case o.FS6: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 o.e70:return null==e||null===(h=e.translations)||void 0===h?void 0:h.map(e=>[e.text,e.detected_source_language]);case o.An9:return[[null==e||null===(p=e.result)||void 0===p||null===(f=p.texts)||void 0===f?void 0:f.map(e=>e.text).join(" "),null==e||null===(m=e.result)||void 0===m?void 0:m.lang]];case o.c0T:return[[null==e?void 0:e.data,null==e?void 0:e.source_lang]];case o.xN$: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 o.fFW:return null==e||null===(g=e.auto_translation)||void 0===g?void 0:g.map(t=>[t,null==e?void 0:e.src_lang]);case o.UFr:return[[null==e?void 0:e.translation,null==e?void 0:e.detected_language]];case o.IEe:{var W,U,H;const t=null==e||null===(W=e.choices)||void 0===W||null===(U=W[0])||void 0===U||null===(H=U.message)||void 0===H?void 0:H.content;return"string"==typeof t?[[t]]:[]}case o.lbn:case o.C3L:case o.KBl:case o.rUY:case o.FsV:case o.F16:case o.EjO:case o.NQu:case o.cbe:case o.kYm:case o.dGW:case o.mmp:return B=null==e||null===(v=e.choices)||void 0===v||null===(y=v[0])||void 0===y?void 0:y.message,O&&N&&B&&O.add(N,{role:B.role,content:B.content}),_t(null===(b=B)||void 0===b?void 0:b.content,R);case o.lLy:var V,G;return O&&Array.isArray(null==e?void 0:e.steps)?(O.clear(),O.add(...e.steps)):(B=null==e||null===(V=e.candidates)||void 0===V||null===(G=V[0])||void 0===G?void 0:G.content,O&&N&&B&&O.add(N,B)),_t(Ft(e),R);case o.EsI:return B={role:null==e?void 0:e.role,content:null==e||null===(A=e.content)||void 0===A?void 0:A.text},O&&N&&B&&O.add(N,{role:B.role,content:B.content}),_t(null!==(x=null==e||null===(w=e.content)||void 0===w||null===(k=w[0])||void 0===k?void 0:k.text)&&void 0!==x?x:"",R);case o.bNe:return[[null==e||null===(S=e.result)||void 0===S?void 0:S.translated_text]];case o.edy:return B=null==e||null===(E=e.choices)||void 0===E||null===(C=E[0])||void 0===C?void 0:C.message,O&&N&&B&&O.add(N,{role:B.role,content:B.content}),_t(null===(_=B)||void 0===_?void 0:_.content,R);case o.fqf:var K,q;return R?null===(K=null!==(q=null==e?void 0:e.translations)&&void 0!==q?q:e)||void 0===K?void 0:K.map(e=>[e.text,e.src]):[[e.text,e.src||e.from]]}throw new Error("parse translate result: apiType not matched",j)})(v,(0,r.A)((0,r.A)({texts:e,from:t,to:n,fromLang:i,toLang:a,langMap:s,history:g,userMsg:p},d),{},{textFormat:f})));if(null==y||!y.length)throw new Error("translate got an unexpected result");for(let e=0;e<y.length;e++)yield{id:e,result:y[e]}});return function(e,t,n){return u.apply(this,arguments)}}(),[D,P,I]=yield(0,$.A)(_(C));if(C){try{return void(yield*(0,J.A)((0,c.A)(function(e,t,n,r){return Vt.apply(this,arguments)}(e,D,P,{apiType:y,history:g,userMsg:I,useBatchFetch:d.useBatchFetch,usePool:h,fetchInterval:w,fetchLimit:k,httpTimeout:S,signal:m,streamRenderMode:d.streamRenderMode||"disabled"})),$.A))}catch(e){if("AbortError"===(null==e?void 0:e.name))throw e;(0,ht.h9)("translate stream failed, fallback to non-stream",e)}const[t,n,r]=yield(0,$.A)(_(!1));return void(yield*(0,J.A)((0,c.A)(T(t,n,r)),$.A))}yield*(0,J.A)((0,c.A)(T(D,P,I)),$.A)}()}),Ht.apply(this,arguments)}function Vt(){return Vt=(0,X.A)(function(e,t,n,r){let{apiType:i,history:a,userMsg:s,useBatchFetch:u,usePool:d,fetchInterval:h,fetchLimit:p,httpTimeout:f,signal:m,streamRenderMode:g}=r;return function*(){const r=new Array(e.length).fill(null);let v="";const y=new Set,b=(0,ct.Sv)(),A="realtime"===g?(0,ct.Tg)():null;let x=!1,w=!1;try{var k,S=!1,E=!1;try{for(var C,_=(0,c.A)((0,N.xF)(t,n,{useCache:!1,usePool:d,fetchInterval:h,fetchLimit:p,httpTimeout:f,signal:m}));S=!(C=yield(0,$.A)(_.next())).done;S=!1){const e=C.value;try{const t=JSON.parse(e),n=(0,ct.tN)(t,i);if(n){if(v+=n,v=(0,l.if)(v,!0),!u){"realtime"===g&&(yield{id:0,partialText:v,isComplete:!1});continue}if(A&&"realtime"===g){const e=A.write(n);for(const{id:t,partialText:n,isComplete:r}of e)r||(yield{id:t,partialText:n,isComplete:!1})}if(w)if(x)for(const{id:e,translation:t}of b.write(n))r[e]=t,yield{id:e,result:t};else for(const{id:e,translation:t}of(0,ct.yb)(v,y))r[e]=t,yield{id:e,result:t};else{const{isJson:e,detected:t}=(0,ct.$P)(v);if(t&&(w=!0,x=e,x))for(const{id:e,translation:t}of b.write(v))r[e]=t,yield{id:e,result:t}}}}catch(e){if(null!=e&&e.isAIStreamTerminal)throw e}}}catch(e){E=!0,k=e}finally{try{S&&null!=_.return&&(yield(0,$.A)(_.return()))}finally{if(E)throw k}}x&&b.end()}catch(e){throw(0,ht.h9)("handleTranslateStream error",e),e}const T=r.some(e=>!e);if(T){const t=_t(v,u);for(let n=0;n<e.length&&n<t.length;n++)r[n]||(r[n]=t[n],yield{id:n,result:r[n]})}a&&s&&(i===o.lLy?a.add(s,{role:"model",parts:[{text:v}]}):a.add(s,{role:"assistant",content:v}))}()}),Vt.apply(this,arguments)}const Gt=async e=>{var t,n,i,a,s,l,u;let{events:d,from:h,to:p,apiSetting:f,docInfo:m,onSubtitleChunk:g,signal:v}=e;const{apiType:y,fetchInterval:b,fetchLimit:A,httpTimeout:x,useStream:w}=f,k=Boolean(g)&&w&&o.sNP.stream.has(y),[S,E]=await Bt((0,r.A)((0,r.A)({},f),{},{useStream:k,events:d,from:h,to:p,fromLang:h,toLang:p,docInfo:m}));if(k){try{const e=await async function(e,t,n){let{events:r,apiType:i,fetchInterval:o,fetchLimit:a,httpTimeout:s,fromLang:l,onSubtitleChunk:u,signal:d}=n;const h=(0,ct.Az)(r,{fromLang:l});let p="";const f=[],m=new Set,g=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=[];for(const t of e||[]){const e="".concat(t._si,":").concat(t._ei);m.has(e)||(m.add(e),f.push(t),n.push(t))}n.length&&u({subtitles:n,isFinal:t})};var v,y=!1,b=!1;try{for(var A,x=(0,c.A)((0,N.xF)(e,t,{useCache:!1,usePool:!0,fetchInterval:o,fetchLimit:a,httpTimeout:s,signal:d}));y=!(A=await x.next()).done;y=!1){const e=A.value;if(null!=d&&d.aborted)throw new DOMException("The operation was aborted.","AbortError");try{const t=JSON.parse(e),n=(0,ct.tN)(t,i);if(!n)continue;p+=n,g(h.write(n),!1)}catch(e){if(null!=e&&e.isAIStreamTerminal)throw e}}}catch(e){b=!0,v=e}finally{try{y&&null!=x.return&&await x.return()}finally{if(b)throw v}}g(h.end(),!1);const w=Lt(p,r,l);return g(w,!0),null!=w&&w.length?w:f.sort((e,t)=>e.start-t.start)}(S,E,{events:d,apiType:y,fetchInterval:b,fetchLimit:A,httpTimeout:x,fromLang:h,onSubtitleChunk:g,signal:v});if(null!=e&&e.length)return e}catch(e){if("AbortError"===(null==e?void 0:e.name))throw e;(0,ht.h9)("subtitle stream failed, fallback to non-stream",e)}return Gt({events:d,from:h,to:p,apiSetting:(0,r.A)((0,r.A)({},f),{},{useStream:!1}),docInfo:m,signal:v})}const C=await(0,N.Fd)(S,E,{useCache:!1,usePool:!0,fetchInterval:b,fetchLimit:A,httpTimeout:x,signal:v});if(!C)return(0,ht.h9)("subtitle got empty response"),[];switch(y){case o.lbn:case o.C3L:case o.KBl:case o.rUY:case o.FsV:case o.F16:case o.EjO:case o.NQu:case o.cbe:case o.kYm:case o.dGW:case o.mmp:case o.edy:return Lt(null!==(t=null==C||null===(n=C.choices)||void 0===n||null===(i=n[0])||void 0===i||null===(a=i.message)||void 0===a?void 0:a.content)&&void 0!==t?t:"",d,h);case o.lLy:{var _,T;const{thinkingMode:e}=f,t=e&&"auto"!==e&&"disabled"!==e;if((Array.isArray(null==C?void 0:C.steps)?"incomplete"===(null==C?void 0:C.status)||"budget_exceeded"===(null==C?void 0:C.status):"MAX_TOKENS"===(null==C||null===(_=C.candidates)||void 0===_||null===(T=_[0])||void 0===T?void 0:T.finishReason))&&t){const e=(0,o.JqB)((0,r.A)((0,r.A)({},f),{},{thinkingMode:"disabled",thinkingEffort:"_default"})),[t,n]=await Bt((0,r.A)((0,r.A)((0,r.A)({},f),{},{useStream:!1},e),{},{events:d,from:h,to:p,fromLang:h,toLang:p,docInfo:m})),i=await(0,N.Fd)(t,n,{useCache:!1,usePool:!0,fetchInterval:b,fetchLimit:A,httpTimeout:x}),a=Ft(i);if(a)return Lt(a,d,h)}return Lt(Ft(C),d,h)}case o.EsI:return Lt(null!==(s=null==C||null===(l=C.content)||void 0===l||null===(u=l[0])||void 0===u?void 0:u.text)&&void 0!==s?s:"",d,h);case o.fqf:return C}return[]};var Kt=i(7325);const qt=new Map,Yt=(e,t,n)=>{if(qt.has(e))return qt.get(e);const r=function(e){let{batchInterval:t=o.bqx,batchSize:n=o.jgE,batchLength:r=o.WTh,batchConcurrency:i=o.JWB}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=[],s=Number(i),l=Number.isFinite(s)&&s>=1?Math.floor(s):o.JWB;let u=0,d=null;const h=async()=>{if(d&&(clearTimeout(d),d=null),0===a.length||u>=l)return;u++;let t=[],i=0,o=0;for(const e of a){var s;const t=(null===(s=e.payload)||void 0===s?void 0:s.length)||0;if(o>=n||i+t>r&&o>0)break;i+=t,o++}if(o>0&&(t=a.splice(0,o)),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 f,m=!1,g=!1;try{for(var v,y=(0,c.A)(i);m=!(v=await y.next()).done;m=!1){const e=v.value;{const n=e.id,r=!1!==e.isComplete,i=t[n];var b,A;i&&(!r&&null!==(b=i.args)&&void 0!==b&&b.onStreamChunk&&i.args.onStreamChunk({id:n,text:e.partialText,isComplete:!1}),r&&(null!==(A=i.args)&&void 0!==A&&A.onStreamChunk&&i.args.onStreamChunk({id:n,text:e.result,isComplete:!0}),i.resolved||(i.resolved=!0,i.resolve(e.result))))}}}catch(e){g=!0,f=e}finally{try{m&&null!=y.return&&await y.return()}finally{if(g)throw f}}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{u--,a.length>0&&(a.length>=n?setTimeout(h,0):p())}else u--},p=()=>{u<l&&!d&&a.length>0&&(d=setTimeout(h,t))};return{addTask:(e,t)=>new Promise((r,i)=>{const o=e;a.push({payload:o,resolve:r,reject:i,args:t}),a.length>=n?h():p()}),destroy:()=>{d&&(clearTimeout(d),d=null),a.forEach(e=>e.reject(new Error("Queue instance was destroyed."))),a.length=0}}}(t,n);return qt.set(e,r),r},Xt=()=>{for(const e of qt.values())e.destroy()};var $t=i(1223),Jt=i(3073),Qt=i(1533),Zt=(0,Qt.A)("translatorMap"),en=(0,Qt.A)("detectorPromise"),tn=(0,Qt.A)("lastReliableDetectedLanguage"),nn=(0,Qt.A)("defaultProgressHandler"),rn=(0,Qt.A)("getDetectorPromise"),on=(0,Qt.A)("createTranslator");function an(e,t){(0,ht.h9)("Downloading ".concat(e," model: ").concat(t,"%"))}function sn(){return(0,Jt.A)(this,en)[en]||((0,Jt.A)(this,en)[en]=(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(0,Jt.A)(this,en)[en]=null,e}})()),(0,Jt.A)(this,en)[en]}function ln(e,t){const n="".concat(e,"_").concat(t);if((0,Jt.A)(this,Zt)[Zt].has(n))return(0,Jt.A)(this,Zt)[Zt].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(0,Jt.A)(this,Zt)[Zt].set(n,r),r}catch(e){throw(0,Jt.A)(this,Zt)[Zt].delete(n),e}})();return(0,Jt.A)(this,Zt)[Zt].set(n,r),r}const un=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,on,{value:ln}),Object.defineProperty(this,rn,{value:sn}),Object.defineProperty(this,nn,{value:an}),Object.defineProperty(this,Zt,{writable:!0,value:new Map}),Object.defineProperty(this,en,{writable:!0,value:null}),Object.defineProperty(this,tn,{writable:!0,value:""}),this.onProgress=e.onProgress||(0,Jt.A)(this,nn)[nn]}_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(0,Jt.A)(this,rn)[rn](),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?(0,Jt.A)(this,tn)[tn]?[(0,Jt.A)(this,tn)[tn],""]:["","Confidence of test results (".concat(i," ").concat(o.toFixed(2),") below the set threshold ").concat(t,"。")]:((0,Jt.A)(this,tn)[tn]=i,[i,""])}catch(t){return(0,ht.h9)("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(0,Jt.A)(this,on)[on](r,t);return[await i.translate(e),r,""]}catch(t){return(0,ht.h9)("translateText",t,"(".concat(e,")")),t&&t.message&&t.message.includes("Other generic failures occurred")&&(ht.vF.info("Generic failure detected, resetting translator cache."),(0,Jt.A)(this,Zt)[Zt].clear()),["",n,t.message]}}},cn=e=>un.detectLanguage(e.text),dn=e=>un.translateText(e.text,e.to,e.from);var hn=i(1762),pn=i(9793);const fn="prompt-cache",mn="batch",gn="nobatch",vn="dict",yn="qwen-mt",bn=e=>{let{fromLang:t,toLang:n,to:r,srLang:i,srCode:o,translateVariants:a}=e;if("auto"!==t)return!1;const s=(e=>"string"==typeof e&&/^zh$/i.test(e.trim()))(i),l=s&&a?"":W(o||i),u=W(n);return U(l,u,a)||!s&&(!l||!u)&&i===r};function An(){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]:{},r=[];if(t===mn)r=[e.systemPrompt||""];else if(t===gn){var i;r=[e.nobatchPrompt||"",null!==(i=e.nobatchUserPrompt)&&void 0!==i?i:o.EEo]}else{var a;if(t===vn)return[e.dictPrompt||"",null!==(a=e.dictUserPrompt)&&void 0!==a?a:o.fkE];if(t!==yn)return[];r=[]}r.push(e.tone||"",e.aiTerms||"");const s=Object.entries(n||{}).sort();return s.length&&r.push(JSON.stringify(s)),r}async function xn(){let e=arguments.length>1?arguments[1]:void 0;const t=[e,...An(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e,arguments.length>2?arguments[2]:void 0)].join("\n");return(await q(t,fn)).slice(0,16)}const wn="https://api.github.com/gists",kn=e=>({Accept:"application/vnd.github+json",Authorization:"Bearer ".concat(e),"Content-type":"application/json","X-GitHub-Api-Version":"2022-11-28"}),Sn=async e=>{var t;const n={text:e},r="".concat(o.aZh,"?").concat(O.stringify(n)),i=await(0,Kt.QF)(r);if(i)return i;const a="https://www.bing.com",s="".concat(a,"/dict/search?q=").concat(e,"&FORM=BDVSP6&cc=cn"),l=await(0,N.Fd)(s,{credentials:"include"},{useCache:!1});if(!l)return null;const u=(new DOMParser).parseFromString(at.createHTML(l),"text/html"),c=null===(t=u.querySelector("#headword > h1"))||void 0===t?void 0:t.textContent.trim();if(!c)return null;const d=[];u.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();d.push({pos:o,def:a})});const h=[];u.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();h.push(n)});const p=[];u.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())}),p.push({pos:r,lis:i})});const f=[];u.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&&f.push({eng:o,chs:a})});const m=[],g=u.querySelector("#bigaud_uk"),v=u.querySelector("#bigaud_us");if(g){var y,b,A,x,w;const e=a+(null==g||null===(y=g.dataset)||void 0===y?void 0:y.mp3link),t=null===(b=g.parentElement)||void 0===b?void 0:b.previousElementSibling,n=null==t||null===(A=t.textContent)||void 0===A||null===(x=A.trim())||void 0===x||null===(w=x.match(/\[(.*?)\]/))||void 0===w?void 0:w[1];m.push({key:"英",audio:e,phonetic:n})}if(v){var k,S,E,C,_;const e=a+(null==v||null===(k=v.dataset)||void 0===k?void 0:k.mp3link),t=null===(S=v.parentElement)||void 0===S?void 0:S.previousElementSibling,n=null==t||null===(E=t.textContent)||void 0===E||null===(C=E.trim())||void 0===C||null===(_=C.match(/\[(.*?)\]/))||void 0===_?void 0:_[1];m.push({key:"美",audio:e,phonetic:n})}if(0===m.length){const e=u.querySelector(".hd_pr"),t=u.querySelector(".hd_prUS");if(e){var T;const t=null===(T=e.textContent)||void 0===T?void 0:T.trim(),n=null==t?void 0:t.match(/\[([^\]]+)\]/);n&&m.push({key:"英",phonetic:n[1]})}if(t){var D;const e=null===(D=t.textContent)||void 0===D?void 0:D.trim(),n=null==e?void 0:e.match(/\[([^\]]+)\]/);n&&m.push({key:"美",phonetic:n[1]})}}const P={word:c,trs:d,aus:m,ecs:p,sentences:f,presents:h};return(0,Kt.v0)(r,null,P),P},En=async e=>{const t="https://fanyi.baidu.com/sug",n={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify({kw:e})},r=await(0,N.Fd)(t,n,{useCache:!0});return 0===(null==r?void 0:r.errno)?(await(0,Kt.v0)(t,n,r),r.data):[]},Cn=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(O.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(0,N.Fd)(r,i,{useCache:!0});return 200===(null==o||null===(t=o.result)||void 0===t?void 0:t.code)?(await(0,Kt.v0)(r,i,o),o.data.entries):[]},_n=async e=>{const t="https://dict.youdao.com/jsonapi_s?".concat(O.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:O.stringify({q:e,le:"en",t:3,client:"web",keyfrom:"webdict"})},r=await(0,N.Fd)(t,n,{useCache:!0});return r?(await(0,Kt.v0)(t,n,r),r):null},Tn=async e=>{let{text:t,fromLang:n="auto",toLang:i,apiSetting:a=o.iVS,glossary:s,onStreamChunk:u,docInfo:d,useCache:h=!0,usePool:p=!0,translateVariants:f=!0,textFormat:m="text",signal:g}=e;if(!t)throw new Error("The text cannot be empty.");if(null!=g&&g.aborted)throw new DOMException("The operation was aborted.","AbortError");const{apiType:v,apiSlug:y,useBatchFetch:b}=a,A=o.k0k[v]||o.eA2,x=(o.XvU[v]||A).get(n),w=A.get(i);if(!w)throw new Error("The target lang: ".concat(i," not support"));const[k,S]="2.0.32".split("."),E=await xn(a,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.apiType===o.IEe?yn:o.sNP.ai.has(e.apiType)?e.useBatchFetch&&o.sNP.batch.has(e.apiType)?mn:gn:"plain"}(a),s),C=(0,r.A)({apiSlug:y,text:t,fromLang:n,toLang:i,textFormat:m,translateVariants:f,version:[k,S].join("."),promptSig:E},(null==d?void 0:d.summary)&&{ctx:d.summary.slice(0,50)}),_="".concat(o.N8G,"?").concat(O.stringify(C));if(h){const e=await(0,Kt.QF)(_);if(null!=e&&e.trText)return(0,r.A)((0,r.A)({},e),{},{isSame:bn({fromLang:n,toLang:i,to:w,srLang:e.srLang,srCode:e.srCode,translateVariants:f})})}if(null!=g&&g.aborted)throw new DOMException("The operation was aborted.","AbortError");let T=[];if(v===o.h8v)T=await(async e=>{let{text:t,from:n,to:r,apiSetting:i}=e;if(!$t.Lx)return["",!0];const{fetchInterval:a,fetchLimit:s,httpTimeout:u}=i,c=(0,pn.Fz)(a,s),d=await(0,l.wj)(c.push(N.Qy,{fn:dn,msg:o.J4u,text:t,from:n,to:r}),(0,hn.Fb)(u));if(!d)throw new Error("apiBuiltinAITranslate got null reault");const[h,p,f]=d;if(f)throw new Error("apiBuiltinAITranslate got error: ".concat(f));return[h,p]})({text:t,from:x,to:w,apiSetting:a});else if(b&&o.sNP.batch.has(v)){const{apiSlug:e,batchInterval:r,batchSize:l,batchLength:c,batchConcurrency:h,useStream:f,useContext:y}=a,b=f&&o.sNP.stream.has(v),k=Number(h),S=y&&o.sNP.context.has(v)?1:Number.isFinite(k)&&k>=1?Math.floor(k):1,C="".concat(e,"_").concat(n,"_").concat(i,"_").concat(m,"_").concat(b?"stream":"batch","_").concat(E,"_").concat(S),_=Yt(C,Ut,{batchInterval:r,batchSize:l,batchLength:c,batchConcurrency:S});T=await _.addTask(t,{from:x,to:w,fromLang:n,toLang:i,langMap:A,glossary:s,textFormat:m,apiSetting:a,usePool:p,onStreamChunk:u,docInfo:d,signal:g})}else{const e=Ut([t],{from:x,to:w,fromLang:n,toLang:i,langMap:A,glossary:s,textFormat:m,apiSetting:a,usePool:p,docInfo:d,onStreamChunk:u,signal:g});var D,P=!1,I=!1;try{for(var F,L=(0,c.A)(e);P=!(F=await L.next()).done;P=!1){const e=F.value;if(0!==e.id)continue;if(!(!1!==e.isComplete)){u&&u({id:e.id,text:e.partialText,isComplete:!1});continue}u&&u({id:e.id,text:e.result,isComplete:!0}),T=e.result}}catch(e){I=!0,D=e}finally{try{P&&null!=L.return&&await L.return()}finally{if(I)throw D}}}let z="",j="",R="";if(Array.isArray(T)?([z,j=""]=T,j&&(R=o.mSZ[v].get(j)||"")):"string"==typeof T&&(z=T),!z)throw new Error("tanslate api got empty trtext");const M=bn({fromLang:n,toLang:i,to:w,srLang:j,srCode:R,translateVariants:f});return h&&(0,Kt.v0)(_,null,{trText:z,isSame:M,srLang:j,srCode:R}),{trText:z,srLang:j,srCode:R,isSame:M}},Dn=async e=>{let{text:t,fromLang:n="auto",toLang:i,apiSetting:a=o.iVS,docInfo:s,context:u="",onStreamChunk:d,useCache:h=!0,signal:p}=e;if(!t)throw new Error("The text cannot be empty.");if(null!=p&&p.aborted)throw new DOMException("The operation was aborted.","AbortError");const{apiType:f}=a;if(!o.sNP.ai.has(f))throw new Error("AI dictionary only supports AI APIs.");const m=o.k0k[f]||o.eA2,g=m.get(n),v=m.get(i);if(!v)throw new Error("The target lang: ".concat(i," not support"));const[y,b]="2.0.32".split("."),A=s||At(),x=await q([(null==A?void 0:A.title)||"",(null==A?void 0:A.description)||"",(null==A?void 0:A.summary)||"",u||""].join("\n"),fn),w={apiSlug:a.apiSlug,text:t,fromLang:n,toLang:i,version:[y,b].join("."),promptSig:await xn(a,vn),contextSig:x.slice(0,16)},k="".concat(o.CQi,"?").concat(O.stringify(w));if(h){const e=await(0,Kt.QF)(k);if(null!=e&&e.markdown)return e.markdown}if(null!=p&&p.aborted)throw new DOMException("The operation was aborted.","AbortError");const S=await(async e=>{let{text:t,from:n,to:i,fromLang:a,toLang:s,apiSetting:u,docInfo:d,context:h="",onStreamChunk:p,signal:f}=e;if(null!=f&&f.aborted)throw new DOMException("The operation was aborted.","AbortError");const{apiType:m,fetchInterval:g,fetchLimit:v,httpTimeout:y,dictPrompt:b,dictUserPrompt:A}=u,x=Boolean(p)&&u.useStream&&o.sNP.stream.has(m);if(!b)throw new Error("AI dictionary prompt is empty.");const w=(0,r.A)((0,r.A)({},u),{},{useBatchFetch:!1,useStream:x,nobatchPrompt:b,nobatchUserPrompt:null!=A?A:o.fkE}),k=d||At(),[S,E]=await Bt((0,r.A)((0,r.A)({},w),{},{texts:[t],from:n,to:i,fromLang:a,toLang:s,docInfo:(0,r.A)((0,r.A)({},k||{}),{},{context:h})}));if(x){try{let e="";var C,_=!1,T=!1;try{for(var D,P=(0,c.A)((0,N.xF)(S,E,{useCache:!1,usePool:!0,fetchInterval:g,fetchLimit:v,httpTimeout:y,signal:f}));_=!(D=await P.next()).done;_=!1){const t=D.value;try{const n=JSON.parse(t),r=(0,ct.tN)(n,m);if(!r)continue;e+=r,e=(0,l.if)(e,!0),p({markdown:e})}catch(e){if(null!=e&&e.isAIStreamTerminal)throw e}}}catch(e){T=!0,C=e}finally{try{_&&null!=P.return&&await P.return()}finally{if(T)throw C}}const t=(0,l.if)(e).trim();if(!t)throw new Error("dictionary got empty content");return t}catch(e){if("AbortError"===(null==e?void 0:e.name))throw e;(0,ht.h9)("dictionary stream failed, fallback to non-stream",e)}const[e,o]=await Bt((0,r.A)((0,r.A)({},w),{},{useStream:!1,texts:[t],from:n,to:i,fromLang:a,toLang:s,docInfo:(0,r.A)((0,r.A)({},k||{}),{},{context:h})})),u=await(0,N.Fd)(e,o,{useCache:!1,usePool:!0,fetchInterval:g,fetchLimit:v,httpTimeout:y,signal:f});if(!u)throw new Error("dictionary got empty response");const d=Wt(u,m);if(!d)throw new Error("dictionary got empty content");return d}const I=await(0,N.Fd)(S,E,{useCache:!1,usePool:!0,fetchInterval:g,fetchLimit:v,httpTimeout:y,signal:f});if(!I)throw new Error("dictionary got empty response");const F=Wt(I,m);if(!F)throw new Error("dictionary got empty content");return F})({text:t,from:g,to:v,fromLang:n,toLang:i,apiSetting:a,docInfo:A,context:u,onStreamChunk:d,signal:p});return h&&(0,Kt.v0)(k,null,{markdown:S}),S},Pn=async e=>{let{videoId:t,chunkSign:n,fromLang:r="auto",toLang:i,events:a=[],apiSetting:s,docInfo:l,onSubtitleChunk:u,signal:c}=e;if(null==a||!a.length)return[];const d=Dt(a,s.subtitlePrompt),h=(await q(JSON.stringify(d.map((e,t)=>{var n,r;return[e.id,e.text,null===(n=a[t])||void 0===n?void 0:n.start,null===(r=a[t])||void 0===r?void 0:r.end,e.pauseMs||e.p||0]})),"subtitle-chunk-v4")).slice(0,16),p=Ct({subtitlePrompt:s.subtitlePrompt,tone:s.tone,from:r,to:i,fromLang:r,toLang:i,docInfo:l,aiTerms:s.aiTerms}),f={apiSlug:s.apiSlug,apiType:s.apiType,model:s.model,videoId:t,chunkSign:n,chunkHash:h,fromLang:r,toLang:i,segVer:4,promptSig:(await q(p,fn)).slice(0,16)},m="".concat(o.W26,"?").concat(O.stringify(f)),g=await(0,Kt.QF)(m);if(g)return g;const v=await Gt({events:a,from:r,to:i,apiSetting:s,docInfo:l,onSubtitleChunk:u,signal:c});return null!=v&&v.length?((0,Kt.v0)(m,null,v),v):[]},In=async e=>{let{videoId:t,title:n,description:i,transcript:a,apiSetting:s}=e;const l={apiSlug:s.apiSlug,videoId:t},u="".concat(o.Hy8,"?").concat(O.stringify(l)),c=await(0,Kt.QF)(u);if(c)return c;const d=await(async e=>{var t,n,i,a,s,l,u,c,d,h,p,f,m,g,v,y,b;let{title:A,description:x,transcript:w,apiSetting:k}=e;const{apiType:S,fetchInterval:E,fetchLimit:C,httpTimeout:_}=k,T=[A&&"Title: ".concat(A),x&&"Description: ".concat(x),"\nTranscript:\n".concat(w)].filter(Boolean).join("\n"),[D,P]=await Bt((0,r.A)((0,r.A)({},k),{},{useStream:!1,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:T})),I=await(0,N.Fd)(D,P,{useCache:!1,usePool:!0,fetchInterval:E,fetchLimit:C,httpTimeout:_});if(!I)return"";switch(S){case o.lbn:case o.C3L:case o.KBl:case o.rUY:case o.FsV:case o.F16:case o.EjO:case o.NQu:case o.cbe:case o.kYm:case o.dGW:case o.mmp:case o.edy:return(null==I||null===(t=I.choices)||void 0===t||null===(n=t[0])||void 0===n||null===(i=n.message)||void 0===i||null===(a=i.content)||void 0===a?void 0:a.trim())||"";case o.lLy:return Ft(I).trim()||"";case o.EsI:return(null==I||null===(s=I.content)||void 0===s||null===(l=s[0])||void 0===l||null===(u=l.text)||void 0===u?void 0:u.trim())||"";case o.fqf:return"string"==typeof I?I.trim():(null==I||null===(c=I.choices)||void 0===c||null===(d=c[0])||void 0===d||null===(h=d.message)||void 0===h||null===(p=h.content)||void 0===p?void 0:p.trim())||It(null==I||null===(f=I.candidates)||void 0===f||null===(m=f[0])||void 0===m||null===(g=m.content)||void 0===g?void 0:g.parts).trim()||(null==I||null===(v=I.content)||void 0===v||null===(y=v[0])||void 0===y||null===(b=y.text)||void 0===b?void 0:b.trim())||"";default:return""}})({title:n,description:i,transcript:a,apiSetting:s});return d?((0,Kt.v0)(u,null,d),d):""},Fn=async e=>{const{dataCaches:t={}}=await(0,a.Xn)();t[e]=Date.now(),await(0,a.pK)({dataCaches:t})},Ln=async e=>{const t=await(e=>(0,N.Fd)(e))(e),n=La(t).filter(e=>{let{pattern:t}=e;return!(0,l.MF)(t,o.WL9)});return n.length>0&&await(0,a.Sn)(e,n),n},zn=async e=>{let{subrulesList:t}=e;try{const{subRulesSyncAt:e}=await(0,a.Xn)(),n=Date.now();n-e>864e5&&(await(async e=>{for(const t of e)try{await Ln(t.url),await Fn(t.url)}catch(e){(0,ht.h9)("sync subrule error: ".concat(t.url),e)}})(t),await(0,a.pK)({subRulesSyncAt:n}))}catch(e){(0,ht.h9)("try sync all subrules",e)}};function On(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Nn(e,t,n){On(e,t),t.set(e,n)}var jn,Rn=i(9371);function Mn(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 Bn(e,t){return e.get(Mn(e,t))}function Wn(e,t,n){return e.set(Mn(e,t),n),n}var Un={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),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){for(r=[],o=n.length;c>=0&&!s;)c==l?(r.push(c),l=n.indexOf(e,c+1)):1==r.length?s=[r.pop(),u]:((i=r.pop())<o&&(o=i,a=u),u=n.indexOf(t,c+1)),c=l<u&&l>=0?l:u;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+/",u=/[\t\n\f\r ]/g,c={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="",u=-1,c=e.length-o;++u<c;)t=e.charCodeAt(u)<<16,n=e.charCodeAt(++u)<<8,r=e.charCodeAt(++u),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(u)<<8,n=e.charCodeAt(++u),a+=l.charAt((i=t+n)>>10)+l.charAt(i>>4&63)+l.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(u),a+=l.charAt(i>>2)+l.charAt(i<<4&63)+"=="),a},decode:function(e){var t=(e=String(e).replace(u,"")).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 c}.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.",g(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,u=!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.",g(e,i))}{let m=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,g(e,i))}const b=c(e,i);if(!1===b)return f("InvalidAttr","Attributes for '"+y+"' have open quote.",g(e,i));let A=b.value;if(i=b.index,"/"===A[A.length-1]){const n=i-A.length;A=A.substring(0,A.length-1);const r=h(A,t);if(!0!==r)return f(r.err.code,r.err.msg,g(e,n+r.err.line));l=!0}else if(v){if(!b.tagClosed)return f("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",g(e,i));if(A.trim().length>0)return f("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",g(e,m));if(0===n.length)return f("InvalidTag","Closing tag '"+y+"' has not been opened.",g(e,m));{const t=n.pop();if(y!==t.tagName){let n=g(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+y+"'.",g(e,m))}0==n.length&&(u=!0)}}else{const r=h(A,t);if(!0!==r)return f(r.err.code,r.err.msg,g(e,i-A.length+r.err.line));if(!0===u)return f("InvalidXml","Multiple possible root nodes found.",g(e,i));-1!==t.unpairedTags.indexOf(y)||n.push({tagName:y,tagStartPos:m}),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.",g(e,i));i=t}else if(!0===u&&!o(e[i]))return f("InvalidXml","Extra text at the end",g(e,i));"<"===e[i]&&i--}}}var d;return l?1==n.length?f("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",g(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='"',u="'";function c(e,t){let n="",r="",i=!1;for(;t<e.length;t++){if(e[t]===l||e[t]===u)""===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(!m(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 m(e){return r.isName(e)}function g(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=u),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 u(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 u="",c=!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)),c&&(u+=l),u+=e,c=!1;continue}if(p===a.cdataPropName){c&&(u+=l),u+="<![CDATA[".concat(h[p][0][a.textNodeName],"]]>"),c=!1;continue}if(p===a.commentPropName){u+=l+"\x3c!--".concat(h[p][0][a.textNodeName],"--\x3e"),c=!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:"",u+=t+"<".concat(p).concat(n).concat(e,"?>"),c=!0;continue}let m=l;""!==m&&(m+=a.indentBy);const g=l+"<".concat(p).concat(r(h[":@"],a)),v=t(h[p],a,f,m);-1!==a.unpairedTags.indexOf(p)?a.suppressUnpairedNode?u+=g+">":u+=g+"/>":v&&0!==v.length||!a.suppressEmptyNode?v&&v.endsWith(">")?u+=g+">".concat(v).concat(l,"</").concat(p,">"):(u+=g+">",v&&""!==l&&(v.includes("/>")||v.includes("</"))?u+=l+a.indentBy+v+l:u+=v,u+="</".concat(p,">")):u+=g+"/>",c=!0}return u}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 u(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 c(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[c(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&&u(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 u(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 c(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 u=o.rawTagName;let c=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(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),a=a.substr(0,a.length-1),c=l):c=c.substr(0,c.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))s=o.closeIndex;else{const n=this.readStopNodeData(e,u,h+1);if(!n)throw new Error("Unexpected end of ".concat(u));s=n.i,t=n.tagContent}const r=new i(l);l!==c&&d&&(r[":@"]=this.buildAttributesMap(c,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(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),a=a.substr(0,a.length-1),c=l):c=c.substr(0,c.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const e=new i(l);l!==c&&d&&(e[":@"]=this.buildAttributesMap(c,a,l)),this.addChild(n,e,a),a=a.substr(0,a.lastIndexOf("."))}else{const e=new i(l);this.tagsNodeStack.push(n),l!==c&&d&&(e[":@"]=this.buildAttributesMap(c,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 m=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 g(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 u=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:u}}function A(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=u,this.resolveNameSpace=c,this.buildAttributesMap=h,this.isItStopNode=v,this.replaceEntitiesValue=m,this.readStopNodeData=A,this.saveTextToParentTag=g,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 u=0;u<e.length;u++){const c=e[u],d=r(c);let h="";if(h=void 0===a?d:a+"."+d,d===t.textNodeName)void 0===s?s=c[d]:s+=""+c[d];else{if(void 0===d)continue;if(c[d]){let e=n(c[d],t,h);const r=o(e,t);c[":@"]?i(e,c[":@"],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,u=1732584193,c=-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,m=a._gg,g=a._hh,v=a._ii;for(p=0;p<s.length;p+=16){var y=u,b=c,A=d,x=h;u=f(u,c,d,h,s[p+0],7,-680876936),h=f(h,u,c,d,s[p+1],12,-389564586),d=f(d,h,u,c,s[p+2],17,606105819),c=f(c,d,h,u,s[p+3],22,-1044525330),u=f(u,c,d,h,s[p+4],7,-176418897),h=f(h,u,c,d,s[p+5],12,1200080426),d=f(d,h,u,c,s[p+6],17,-1473231341),c=f(c,d,h,u,s[p+7],22,-45705983),u=f(u,c,d,h,s[p+8],7,1770035416),h=f(h,u,c,d,s[p+9],12,-1958414417),d=f(d,h,u,c,s[p+10],17,-42063),c=f(c,d,h,u,s[p+11],22,-1990404162),u=f(u,c,d,h,s[p+12],7,1804603682),h=f(h,u,c,d,s[p+13],12,-40341101),d=f(d,h,u,c,s[p+14],17,-1502002290),u=m(u,c=f(c,d,h,u,s[p+15],22,1236535329),d,h,s[p+1],5,-165796510),h=m(h,u,c,d,s[p+6],9,-1069501632),d=m(d,h,u,c,s[p+11],14,643717713),c=m(c,d,h,u,s[p+0],20,-373897302),u=m(u,c,d,h,s[p+5],5,-701558691),h=m(h,u,c,d,s[p+10],9,38016083),d=m(d,h,u,c,s[p+15],14,-660478335),c=m(c,d,h,u,s[p+4],20,-405537848),u=m(u,c,d,h,s[p+9],5,568446438),h=m(h,u,c,d,s[p+14],9,-1019803690),d=m(d,h,u,c,s[p+3],14,-187363961),c=m(c,d,h,u,s[p+8],20,1163531501),u=m(u,c,d,h,s[p+13],5,-1444681467),h=m(h,u,c,d,s[p+2],9,-51403784),d=m(d,h,u,c,s[p+7],14,1735328473),u=g(u,c=m(c,d,h,u,s[p+12],20,-1926607734),d,h,s[p+5],4,-378558),h=g(h,u,c,d,s[p+8],11,-2022574463),d=g(d,h,u,c,s[p+11],16,1839030562),c=g(c,d,h,u,s[p+14],23,-35309556),u=g(u,c,d,h,s[p+1],4,-1530992060),h=g(h,u,c,d,s[p+4],11,1272893353),d=g(d,h,u,c,s[p+7],16,-155497632),c=g(c,d,h,u,s[p+10],23,-1094730640),u=g(u,c,d,h,s[p+13],4,681279174),h=g(h,u,c,d,s[p+0],11,-358537222),d=g(d,h,u,c,s[p+3],16,-722521979),c=g(c,d,h,u,s[p+6],23,76029189),u=g(u,c,d,h,s[p+9],4,-640364487),h=g(h,u,c,d,s[p+12],11,-421815835),d=g(d,h,u,c,s[p+15],16,530742520),u=v(u,c=g(c,d,h,u,s[p+2],23,-995338651),d,h,s[p+0],6,-198630844),h=v(h,u,c,d,s[p+7],10,1126891415),d=v(d,h,u,c,s[p+14],15,-1416354905),c=v(c,d,h,u,s[p+5],21,-57434055),u=v(u,c,d,h,s[p+12],6,1700485571),h=v(h,u,c,d,s[p+3],10,-1894986606),d=v(d,h,u,c,s[p+10],15,-1051523),c=v(c,d,h,u,s[p+1],21,-2054922799),u=v(u,c,d,h,s[p+8],6,1873313359),h=v(h,u,c,d,s[p+15],10,-30611744),d=v(d,h,u,c,s[p+6],15,-1560198380),c=v(c,d,h,u,s[p+13],21,1309151649),u=v(u,c,d,h,s[p+4],6,-145523070),h=v(h,u,c,d,s[p+11],10,-1120210379),d=v(d,h,u,c,s[p+2],15,718787259),c=v(c,d,h,u,s[p+9],21,-343485551),u=u+y>>>0,c=c+b>>>0,d=d+A>>>0,h=h+x>>>0}return t.endian([u,c,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)),g(function(e){return e.split("\\\\").join(i).split("\\{").join(o).split("\\}").join(a).split("\\,").join(s).split("\\.").join(l)}(e),!0).map(c)):[]};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 u(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function c(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 m(e,t){return e>=t}function g(e,t){var n=[],i=r("{","}",e);if(!i)return[e];var o=i.pre,s=i.post.length?g(i.post,!1):[""];if(/\$$/.test(i.pre))for(var l=0;l<s.length;l++){var c=o+"{"+i.body+"}"+s[l];n.push(c)}else{var v,y,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),A=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),x=b||A,w=i.body.indexOf(",")>=0;if(!x&&!w)return i.post.match(/,.*\}/)?g(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=g(v[0],!1).map(h)).length)return s.map(function(e){return i.pre+v[0]+e});if(x){var k=u(v[0]),S=u(v[1]),E=Math.max(v[0].length,v[1].length),C=3==v.length?Math.abs(u(v[2])):1,_=f;S<k&&(C*=-1,_=m);var T=v.some(p);y=[];for(var D=k;_(D,S);D+=C){var P;if(A)"\\"===(P=String.fromCharCode(D))&&(P="");else if(P=String(D),T){var I=E-P.length;if(I>0){var F=new Array(I+1).join("0");P=D<0?"-"+F+P.slice(1):F+P}}y.push(P)}}else{y=[];for(var L=0;L<v.length;L++)y.push.apply(y,g(v[L],!1))}for(L=0;L<y.length;L++)for(l=0;l<s.length;l++)c=o+y[L]+s[l],(!t||x||c)&&n.push(c)}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 u=a(l);if("object"===t(u))return u.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 u=[];for(l=a;l<r.length;l++)u.push("..");return(u=u.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+-.]*:\/\//,u=/:\d+$/,c=/^([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 g(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 m(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 g(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=c.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)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):l>=2&&g(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(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,u,c,f,b=p.slice(),A=typeof t,x=this,w=0;for("object"!==A&&"string"!==A&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),i=!(a=v(e||"",t=m(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||!g(x.protocol)))&&(b[3]=[/(.*)/,"pathname"]);w<b.length;w++)"function"!=typeof(u=b[w])?(l=u[0],f=u[1],l!=l?x[f]=e:"string"==typeof l?~(c="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof u[2]?(x[f]=e.slice(0,c),e=e.slice(c+u[2])):(x[f]=e.slice(c),e=e.slice(0,c))):(c=l.exec(e))&&(x[f]=c[1],e=e.slice(0,c.index)),x[f]=x[f]||i&&u[3]&&t[f]||"",u[4]&&(x[f]=x[f].toLowerCase())):e=u(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)&&g(x.protocol)&&(x.pathname="/"+x.pathname),r(x.port,x.protocol)||(x.host=x.hostname,x.port=""),x.username=x.password="",x.auth&&(~(c=x.auth.indexOf(":"))?(x.username=x.auth.slice(0,c),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=x.auth.slice(c+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&&g(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,u.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 c=p[l];c[4]&&(i[c[1]]=i[c[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&g(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||g(n.protocol)?"//":"");return n.username?(a+=n.username,n.password&&(a+=":"+n.password),a+="@"):n.password?(a+=":"+n.password,a+="@"):"file:"!==n.protocol&&g(n.protocol)&&!r&&"/"!==n.pathname&&(a+="@"),(":"===r[r.length-1]||u.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=m,y.trimLeft=h,y.qs=o,e.exports=y},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},Hn={};function Vn(e){var t=Hn[e];if(void 0!==t)return t.exports;var n=Hn[e]={id:e,loaded:!1,exports:{}};return Un[e].call(n.exports,n,n.exports,Vn),n.loaded=!0,n.exports}Vn.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return Vn.d(t,{a:t}),t},Vn.d=(e,t)=>{for(var n in t)Vn.o(t,n)&&!Vn.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Vn.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Vn.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var Gn={};Vn.d(Gn,{hT:()=>yr,O4:()=>br,Kd:()=>gr,YK:()=>vr,UU:()=>oa,Gu:()=>Cr,ky:()=>so,h4:()=>oo,ch:()=>ao,hq:()=>Ji,i5:()=>lo});var Kn=Vn(737),qn=Vn.n(Kn);function Yn(e){if(!Xn(e))throw new Error("Parameter was not an error")}function Xn(e){return!!e&&"object"==typeof e&&"[object Error]"===(t=e,Object.prototype.toString.call(t))||e instanceof Error;var t}class $n extends Error{constructor(e,t){const n=[...arguments],{options:r,shortMessage:i}=function(e){let t,n="";if(0===e.length)t={};else if(Xn(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 Yn(e),e._cause&&Xn(e._cause)?e._cause:null}static fullStack(e){var t;Yn(e);const n=$n.cause(e);return n?"".concat(e.stack,"\ncaused by: ").concat($n.fullStack(n)):null!==(t=e.stack)&&void 0!==t?t:""}static info(e){Yn(e);const t={},n=$n.cause(e);return n&&Object.assign(t,$n.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 Jn=Vn(47),Qn=Vn.n(Jn);const Zn="__PATH_SEPARATOR_POSIX__",er="__PATH_SEPARATOR_WINDOWS__";function tr(e){try{const t=e.replace(/\//g,Zn).replace(/\\\\/g,er);return encodeURIComponent(t).split(er).join("\\\\").split(Zn).join("/")}catch(e){throw new $n(e,"Failed encoding path")}}function nr(e){return e.startsWith("/")?e:"/"+e}function rr(e){let t=e;return"/"!==t[0]&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function ir(e){let t=new(qn())(e).pathname;return t.length<=0&&(t="/"),rr(t)}function or(){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 ar=Vn(542),sr=Vn.n(ar);function lr(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||sr()("".concat(t,":").concat(n,":").concat(r));return e&&"md5-sess"===e.toLowerCase()?sr()("".concat(s,":").concat(i,":").concat(o)):s}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=sr()("".concat(i,":").concat(r)),u=o?sr()("".concat(s,":").concat(t.nonce,":").concat(a,":").concat(t.cnonce,":").concat(o,":").concat(l)):sr()("".concat(s,":").concat(t.nonce,":").concat(l)),c={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:o,response:u,nc:a,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},d=[];for(const e in c)c[e]&&("qop"===e||"nc"===e||"algorithm"===e?d.push("".concat(e,"=").concat(c[e])):d.push("".concat(e,'="').concat(c[e],'"')));return"Digest ".concat(d.join(", "))}function ur(e){return"digest"===(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()}var cr=Vn(101),dr=Vn.n(cr);function hr(e){return dr().decode(e)}function pr(e,t){var n;return"Basic ".concat((n="".concat(e,":").concat(t),dr().encode(n)))}const fr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,mr=fr.fetch.bind(fr),gr=(fr.Headers,fr.Request),vr=fr.Response;let yr=function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e}({}),br=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 Ar(e,t,n,r,i){switch(e.authType){case yr.Auto:t&&n&&(e.headers.Authorization=pr(t,n));break;case yr.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 yr.None:break;case yr.Password:e.headers.Authorization=pr(t,n);break;case yr.Token:e.headers.Authorization="".concat((o=r).token_type," ").concat(o.access_token);break;default:throw new $n({info:{code:br.InvalidAuthType}},"Invalid auth type: ".concat(e.authType))}var o}Vn(345),Vn(800);const xr="@@HOTPATCHER",wr=()=>{};function kr(e){return{original:e,methods:[e],final:!1}}class Sr{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=xr}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__!==xr)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)||wr;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]=kr(t);else if(this.isPatched(e)){const{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(kr(t),{original:n})}else this.configuration.registry[e]=kr(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 Er=null;function Cr(){return Er||(Er=new Sr),Er}function _r(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 Tr(){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?Dr(r,e):_r(e)}return r}function Dr(e,t){const n=_r(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]?Dr(n[e],t[e]):_r(t[e]):n[e]=t[e]:n[e]=t[e]}),n}function Pr(e){const t={};for(const n of e.keys())t[n]=e.get(n);return t}function Ir(){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),{})}Vn(805);const Fr="function"==typeof ArrayBuffer,{toString:Lr}=Object.prototype;function zr(e){return Fr&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Lr.call(e))}function Or(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function Nr(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 jr(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Rr=Nr(function(e){const t=e._digest;return delete e._digest,t.hasDigestAuth&&(e=Tr(e,{headers:{Authorization:lr(e,t)}})),jr(Ur(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(!ur(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 jr(Ur(e=Tr(e,{headers:{Authorization:lr(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})}),Mr=Nr(function(e,t){return jr(Ur(e),function(n){return n.ok?(t.authType=yr.Password,n):401==n.status&&ur(n)?(t.authType=yr.Digest,Ar(t,t.username,t.password,void 0,void 0),e._digest=t.digest,Rr(e)):n})}),Br=Nr(function(e,t){return t.authType===yr.Auto?Mr(e,t):e._digest?Rr(e):Ur(e)});function Wr(e,t,n){const r=_r(e);return r.headers=Ir(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 Ur(e){const t=Cr();return t.patchInline("request",e=>t.patchInline("fetch",mr,e.url,function(e){let t={};const n={method:e.method};if(e.headers&&(t=Ir(t,e.headers)),void 0!==e.data){const[r,i]=function(e){if("string"==typeof e)return[e,{}];if(Or(e))return[e,{}];if(zr(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=Ir(t,i)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials="include"),n.headers=t,n}(e)),e)}var Hr=Vn(285);const Vr=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},Gr={"[: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]},Kr=e=>e.replace(/[[\]\\-]/g,"\\$&"),qr=e=>e.join(""),Yr=(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,u=!1,c=n,d="";e:for(;o<e.length;){const t=e.charAt(o);if("!"!==t&&"^"!==t||o!==n+1){if("]"===t&&a&&!l){c=o+1;break}if(a=!0,"\\"!==t||l){if("["===t&&!l)for(const[t,[a,l,u]]of Object.entries(Gr))if(e.startsWith(t,o)){if(d)return["$.",!1,e.length-n,!0];o+=t.length,u?i.push(a):r.push(a),s=s||l;continue e}l=!1,d?(t>d?r.push(Kr(d)+"-"+Kr(t)):t===d&&r.push(Kr(t)),d="",o++):e.startsWith("-]",o+1)?(r.push(Kr(t+"-")),o+=2):e.startsWith("-",o+1)?(d=t,o+=2):(r.push(Kr(t)),o++)}else l=!0,o++}else u=!0,o++}if(c<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])&&!u)return[(h=2===r[0].length?r[0].slice(-1):r[0],h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,c-n,!1];var h;const p="["+(u?"^":"")+qr(r)+"]",f="["+(u?"":"^")+qr(i)+"]";return[r.length&&i.length?"("+p+"|"+f+")":r.length?p:f,s,c-n,!0]},Xr=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")},$r=new Set(["!","?","+","*","@"]),Jr=e=>$r.has(e),Qr="(?!\\.)",Zr=new Set(["[","."]),ei=new Set(["..","."]),ti=new Set("().*{}+?[]^$\\!"),ni="[^/]",ri=ni+"*?",ii=ni+"+?";var oi=new WeakMap,ai=new WeakMap,si=new WeakMap,li=new WeakMap,ui=new WeakMap,ci=new WeakMap,di=new WeakMap,hi=new WeakMap,pi=new WeakMap,fi=new WeakMap,mi=new WeakMap,gi=new WeakSet;class vi{constructor(e,t){!function(e,t){On(e,t),t.add(e)}(this,gi),(0,Rn.A)(this,"type",void 0),Nn(this,oi,void 0),Nn(this,ai,void 0),Nn(this,si,!1),Nn(this,li,[]),Nn(this,ui,void 0),Nn(this,ci,void 0),Nn(this,di,void 0),Nn(this,hi,!1),Nn(this,pi,void 0),Nn(this,fi,void 0),Nn(this,mi,!1);let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.type=e,e&&Wn(ai,this,!0),Wn(ui,this,t),Wn(oi,this,Bn(ui,this)?Bn(oi,Bn(ui,this)):this),Wn(pi,this,Bn(oi,this)===this?n:Bn(pi,Bn(oi,this))),Wn(di,this,Bn(oi,this)===this?[]:Bn(di,Bn(oi,this))),"!"!==e||Bn(hi,Bn(oi,this))||Bn(di,this).push(this),Wn(ci,this,Bn(ui,this)?Bn(li,Bn(ui,this)).length:0)}get hasMagic(){if(void 0!==Bn(ai,this))return Bn(ai,this);for(const e of Bn(li,this))if("string"!=typeof e&&(e.type||e.hasMagic))return Wn(ai,this,!0);return Bn(ai,this)}toString(){return void 0!==Bn(fi,this)?Bn(fi,this):this.type?Wn(fi,this,this.type+"("+Bn(li,this).map(e=>String(e)).join("|")+")"):Wn(fi,this,Bn(li,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 vi&&Bn(ui,e)===this))throw new Error("invalid part: "+e);Bn(li,this).push(e)}}toJSON(){var e;const t=null===this.type?Bn(li,this).slice().map(e=>"string"==typeof e?e:e.toJSON()):[this.type,...Bn(li,this).map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===Bn(oi,this)||Bn(hi,Bn(oi,this))&&"!"===(null===(e=Bn(ui,this))||void 0===e?void 0:e.type))&&t.push({}),t}isStart(){var e;if(Bn(oi,this)===this)return!0;if(null===(e=Bn(ui,this))||void 0===e||!e.isStart())return!1;if(0===Bn(ci,this))return!0;const t=Bn(ui,this);for(let e=0;e<Bn(ci,this);e++){const n=Bn(li,t)[e];if(!(n instanceof vi&&"!"===n.type))return!1}return!0}isEnd(){var e,t,n;if(Bn(oi,this)===this)return!0;if("!"===(null===(e=Bn(ui,this))||void 0===e?void 0:e.type))return!0;if(null===(t=Bn(ui,this))||void 0===t||!t.isEnd())return!1;if(!this.type)return null===(n=Bn(ui,this))||void 0===n?void 0:n.isEnd();const r=Bn(ui,this)?Bn(li,Bn(ui,this)).length:0;return Bn(ci,this)===r-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new vi(this.type,e);for(const e of Bn(li,this))t.copyIn(e);return t}static fromGlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new vi(null,void 0,t);return bi.call(vi,e,n,0,t),n}toMMPattern(){if(this!==Bn(oi,this))return Bn(oi,this).toMMPattern();const e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||Bn(ai,this)||Bn(pi,this).nocase&&!Bn(pi,this).nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const o=(Bn(pi,this).nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp("^".concat(t,"$"),o),{_src:t,_glob:e})}get options(){return Bn(pi,this)}toRegExpSource(e){const t=null!=e?e:!!Bn(pi,this).dot;if(Bn(oi,this)===this&&Mn(gi,this,yi).call(this),!this.type){var n;const r=this.isStart()&&this.isEnd(),i=Bn(li,this).map(t=>{const[n,i,o,a]="string"==typeof t?xi.call(vi,t,Bn(ai,this),r):t.toRegExpSource(e);return Wn(ai,this,Bn(ai,this)||o),Wn(si,this,Bn(si,this)||a),n}).join("");let o="";if(this.isStart()&&"string"==typeof Bn(li,this)[0]&&(1!==Bn(li,this).length||!ei.has(Bn(li,this)[0]))){const n=Zr,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?Qr:""}let a="";return this.isEnd()&&Bn(hi,Bn(oi,this))&&"!"===(null===(n=Bn(ui,this))||void 0===n?void 0:n.type)&&(a="(?:$|\\/)"),[o+i+a,Xr(i),Wn(ai,this,!!Bn(ai,this)),Bn(si,this)]}const r="*"===this.type||"+"===this.type,i="!"===this.type?"(?:(?!(?:":"(?:";let o=Mn(gi,this,Ai).call(this,t);if(this.isStart()&&this.isEnd()&&!o&&"!"!==this.type){const e=this.toString();return Wn(li,this,[e]),this.type=null,Wn(ai,this,void 0),[e,Xr(this.toString()),!1,!1]}let a=!r||e||t?"":Mn(gi,this,Ai).call(this,!0);a===o&&(a=""),a&&(o="(?:".concat(o,")(?:").concat(a,")*?"));let s="";return s="!"===this.type&&Bn(mi,this)?(this.isStart()&&!t?Qr:"")+ii:i+o+("!"===this.type?"))"+(!this.isStart()||t||e?"":Qr)+ri+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&a?")":"*"===this.type&&a?")?":")".concat(this.type)),[s,Xr(o),Wn(ai,this,!!Bn(ai,this)),Bn(si,this)]}}function yi(){if(this!==Bn(oi,this))throw new Error("should only call on root");if(Bn(hi,this))return this;let e;for(this.toString(),Wn(hi,this,!0);e=Bn(di,this).pop();){if("!"!==e.type)continue;let t=e,n=Bn(ui,t);for(;n;){for(let r=Bn(ci,t)+1;!n.type&&r<Bn(li,n).length;r++)for(const t of Bn(li,e)){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(Bn(li,n)[r])}t=n,n=Bn(ui,t)}}return this}function bi(e,t,n,r){let i=!1,o=!1,a=-1,s=!1;if(null===t.type){let l=n,u="";for(;l<e.length;){const n=e.charAt(l++);if(i||"\\"===n)i=!i,u+=n;else if(o)l===a+1?"^"!==n&&"!"!==n||(s=!0):"]"!==n||l===a+2&&s||(o=!1),u+=n;else if("["!==n)if(r.noext||!Jr(n)||"("!==e.charAt(l))u+=n;else{t.push(u),u="";const i=new jn(n,t);l=bi.call(jn,e,i,l,r),t.push(i)}else o=!0,a=l,s=!1,u+=n}return t.push(u),l}let l=n+1,u=new jn(null,t);const c=[];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(Jr(n)&&"("===e.charAt(l)){u.push(d),d="";const t=new jn(n,u);u.push(t),l=bi.call(jn,e,t,l,r)}else if("|"!==n){if(")"===n)return""===d&&0===Bn(li,t).length&&Wn(mi,t,!0),u.push(d),d="",t.push(...c,u),l;d+=n}else u.push(d),d="",c.push(u),u=new jn(null,t);else o=!0,a=l,s=!1,d+=n}return t.type=null,Wn(ai,t,void 0),Wn(li,t,[e.substring(n-1)]),l}function Ai(e){return Bn(li,this).map(t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[n,r,i,o]=t.toRegExpSource(e);return Wn(si,this,Bn(si,this)||o),n}).filter(e=>!(this.isStart()&&this.isEnd()&&!e)).join("|")}function xi(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+=(ti.has(s)?"\\":"")+s;else if("\\"!==s){if("["===s){const[n,r,s,l]=Yr(e,a);if(s){i+=n,o=o||r,a+=s-1,t=t||l;continue}}"*"!==s?"?"!==s?i+=s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=ni,t=!0):(i+=n&&"*"===e?ii:ri,t=!0)}else a===e.length-1?i+="\\\\":r=!0}return[i,Xr(e),!!t,o]}jn=vi;const wi=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Vr(t),!(!n.nocomment&&"#"===t.charAt(0))&&new Yi(t,n).match(e)},ki=/^\*+([^+@!?\*\[\(]*)$/,Si=e=>t=>!t.startsWith(".")&&t.endsWith(e),Ei=e=>t=>t.endsWith(e),Ci=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),_i=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Ti=/^\*+\.\*+$/,Di=e=>!e.startsWith(".")&&e.includes("."),Pi=e=>"."!==e&&".."!==e&&e.includes("."),Ii=/^\.\*+$/,Fi=e=>"."!==e&&".."!==e&&e.startsWith("."),Li=/^\*+$/,zi=e=>0!==e.length&&!e.startsWith("."),Oi=e=>0!==e.length&&"."!==e&&".."!==e,Ni=/^\?+([^+@!?\*\[\(]*)?$/,ji=e=>{let[t,n=""]=e;const r=Wi([t]);return n?(n=n.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(n)):r},Ri=e=>{let[t,n=""]=e;const r=Ui([t]);return n?(n=n.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(n)):r},Mi=e=>{let[t,n=""]=e;const r=Ui([t]);return n?e=>r(e)&&e.endsWith(n):r},Bi=e=>{let[t,n=""]=e;const r=Wi([t]);return n?e=>r(e)&&e.endsWith(n):r},Wi=e=>{let[t]=e;const n=t.length;return e=>e.length===n&&!e.startsWith(".")},Ui=e=>{let[t]=e;const n=t.length;return e=>e.length===n&&"."!==e&&".."!==e},Hi="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_NAME:"KISS Translator",REACT_APP_NAME_CN:"简约翻译",REACT_APP_VERSION:"2.0.32",REACT_APP_HOMEPAGE:"https://github.com/fishjar/kiss-translator",REACT_APP_RELEASES_URL:"https://github.com/fishjar/kiss-translator/releases",REACT_APP_SITEURL:"https://kiss-translator.rayjar.com",REACT_APP_SITEURL_GITHUB:"https://fishjar.github.io/kiss-translator",REACT_APP_SITEURL_DEV:"https://kiss-translator-dev.rayjar.com",REACT_APP_VERSION_URL:"https://kiss-translator.rayjar.com/version.txt",REACT_APP_VERSION_URL_GITHUB:"https://fishjar.github.io/kiss-translator/version.txt",REACT_APP_VERSION_URL_DEV:"https://kiss-translator-dev.rayjar.com/version.txt",REACT_APP_OPTIONSPAGE:"https://kiss-translator.rayjar.com/options",REACT_APP_OPTIONSPAGE_GITHUB:"https://fishjar.github.io/kiss-translator/options.html",REACT_APP_OPTIONSPAGE_DEV:"https://kiss-translator-dev.rayjar.com/options",REACT_APP_OPTIONSPAGE_LOCAL:"http://localhost:3000/options.html",REACT_APP_LOGOURL:"https://kiss-translator.rayjar.com/images/logo192.png",REACT_APP_RULESURL:"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json",REACT_APP_RULESURL_ON:"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json",REACT_APP_RULESURL_OFF:"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json",REACT_APP_USERSCRIPT_DOWNLOADURL:"https://kiss-translator.rayjar.com/kiss-translator.user.js",REACT_APP_USERSCRIPT_IOS_DOWNLOADURL:"https://kiss-translator.rayjar.com/kiss-translator-ios-safari.user.js"}.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";wi.sep="win32"===Hi?"\\":"/";const Vi=Symbol("globstar **");wi.GLOBSTAR=Vi,wi.filter=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>wi(n,e,t)};const Gi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign({},e,t)};wi.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return wi;const t=wi;return Object.assign(function(n,r){return t(n,r,Gi(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))},{Minimatch:class extends t.Minimatch{constructor(t){super(t,Gi(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}static defaults(n){return t.defaults(Gi(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n){super(t,n,Gi(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,Gi(e,r))}},unescape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.unescape(n,Gi(e,r))},escape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.escape(n,Gi(e,r))},filter:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filter(n,Gi(e,r))},defaults:n=>t.defaults(Gi(e,n)),makeRe:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.makeRe(n,Gi(e,r))},braceExpand:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.braceExpand(n,Gi(e,r))},match:function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.match(n,r,Gi(e,i))},sep:t.sep,GLOBSTAR:Vi})};const Ki=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Vr(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Hr(e)};wi.braceExpand=Ki,wi.makeRe=function(e){return new Yi(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).makeRe()},wi.match=function(e,t){const n=new Yi(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 qi=/[?*]|[+@!]\(.*?\)|\[|\]/;class Yi{constructor(e){(0,Rn.A)(this,"options",void 0),(0,Rn.A)(this,"set",void 0),(0,Rn.A)(this,"pattern",void 0),(0,Rn.A)(this,"windowsPathsNoEscape",void 0),(0,Rn.A)(this,"nonegate",void 0),(0,Rn.A)(this,"negate",void 0),(0,Rn.A)(this,"comment",void 0),(0,Rn.A)(this,"empty",void 0),(0,Rn.A)(this,"preserveMultipleSlashes",void 0),(0,Rn.A)(this,"partial",void 0),(0,Rn.A)(this,"globSet",void 0),(0,Rn.A)(this,"globParts",void 0),(0,Rn.A)(this,"nocase",void 0),(0,Rn.A)(this,"isWindows",void 0),(0,Rn.A)(this,"platform",void 0),(0,Rn.A)(this,"windowsNoMagicRoot",void 0),(0,Rn.A)(this,"regexp",void 0);let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Vr(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Hi,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]&&qi.test(e[2])||qi.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 u=t[a],c=e[o];if(this.debug(t,u,c),!1===u)return!1;if(u===Vi){this.debug("GLOBSTAR",[t,u,c]);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 u?(i=c===u,this.debug("string match",u,c,i)):(i=u.test(c),this.debug("pattern match",u,c,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 Ki(this.pattern,this.options)}parse(e){Vr(e);const t=this.options;if("**"===e)return Vi;if(""===e)return"";let n,r=null;(n=e.match(Li))?r=t.dot?Oi:zi:(n=e.match(ki))?r=(t.nocase?t.dot?_i:Ci:t.dot?Ei:Si)(n[1]):(n=e.match(Ni))?r=(t.nocase?t.dot?Ri:ji:t.dot?Mi:Bi)(n):(n=e.match(Ti))?r=t.dot?Pi:Di:(n=e.match(Ii))&&(r=Fi);const i=vi.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===Vi?Vi:e._src});return t.forEach((e,r)=>{const i=t[r+1],o=t[r-1];e===Vi&&o!==Vi&&(void 0===o?void 0!==i&&i!==Vi?t[r+1]="(?:\\/|"+n+"\\/)?"+i:t[r]=n:void 0===i?t[r-1]=o+"(?:\\/|"+n+")?":i!==Vi&&(t[r-1]=o+"(?:\\/|\\/"+n+"\\/)"+i,t[r+1]=Vi))}),t.filter(e=>e!==Vi).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 wi.defaults(e).Minimatch}}function Xi(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 $i(e,t){const{status:n}=t;if(401===n&&e.digest)return t;if(n>=400)throw Xi(t);return t}function Ji(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?{data:t,headers:e.headers?Pr(e.headers):{},status:e.status,statusText:e.statusText}:t}wi.AST=vi,wi.Minimatch=Yi,wi.escape=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},wi.unescape=Xr;const Qi=(Zi=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Wr({url:or(e.remoteURL,tr(t)),method:"COPY",headers:{Destination:or(e.remoteURL,tr(n)),Overwrite:!1===r.overwrite?"F":"T",Depth:r.shallow?"0":"infinity"}},e,r);return a=function(t){$i(e,t)},(o=Br(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(Zi.apply(this,e))}catch(e){return Promise.reject(e)}});var Zi,eo=Vn(635),to=Vn(829),no=Vn.n(to),ro=function(e){return e.Array="array",e.Object="object",e.Original="original",e}(ro||{});function io(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ro.Original;const r=no().get(e,t);return"array"===n&&!1===Array.isArray(r)?[r]:"object"===n&&Array.isArray(r)?r[0]:r}function oo(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 no().set(n,"multistatus.response",io(n,"multistatus.response",ro.Array)),no().set(n,"multistatus.response",no().get(n,"multistatus.response").map(e=>function(e){const t=Object.assign({},e);return t.status?no().set(t,"status",io(t,"status",ro.Object)):(no().set(t,"propstat",io(t,"propstat",ro.Object)),no().set(t,"propstat.prop",io(t,"propstat.prop",ro.Object))),t}(e))),n}(new eo.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 ao(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",u={filename:t,basename:Qn().basename(t),lastmod:r,size:parseInt(i,10),type:l,etag:"string"==typeof s?s.replace(/"/g,""):null};return"file"===l&&(u.mime=a&&"string"==typeof a?a.split(";")[0]:""),n&&(void 0!==e.displayname&&(e.displayname=String(e.displayname)),u.props=e),u}function so(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),u=parseInt(s,10);if(u>=400){const e=new Error("Invalid response: ".concat(u," ").concat(l));throw e.status=u,e}return ao(i,rr(t),n)}function lo(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function uo(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const co=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=Wr({url:or(e.remoteURL,tr(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,n);return uo(Br(i,e),function(n){return $i(e,n),uo(n.text(),function(e){return uo(oo(e),function(e){const i=so(e,t,r);return Ji(n,i,r)})})})});function ho(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const po=fo(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=function(e){if(!e||"/"===e)return[];let t=e;const n=[];do{n.push(t),t=Qn().dirname(t)}while(t&&"/"!==t);return n}(rr(t));i.sort((e,t)=>e.length>t.length?1:t.length>e.length?-1:0);let o=!1;return function(e,t){if("function"==typeof e[vo]){var n,r,i,o=e[vo]();function u(e){try{for(;!(n=o.next()).done;)if((e=t(n.value))&&e.then){if(!Ao(e))return void e.then(u,i||(i=yo.bind(null,r=new bo,2)));e=e.v}r?yo(r,1,e):r=e}catch(e){yo(r||(r=new bo),2,e)}}if(u(),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(!Ao(s))return void s.then(a,i||(i=yo.bind(null,r=new bo,2)));s=s.v}r?yo(r,1,s):r=s}catch(e){yo(r||(r=new bo),2,e)}}(),r}(s,function(e){return t(s[e])},function(){return!1})}(i,function(i){return a=function(){return function(n,r){try{var o=ho(co(e,i),function(e){if("directory"!==e.type)throw new Error("Path includes a file: ".concat(t))})}catch(e){return r(e)}return o&&o.then?o.then(void 0,r):o}(0,function(t){const a=t;return function(){if(404===a.status)return o=!0,go(xo(e,i,(0,r.A)((0,r.A)({},n),{},{recursive:!1})));throw t}()})},(s=function(){if(o)return go(xo(e,i,(0,r.A)((0,r.A)({},n),{},{recursive:!1})))}())&&s.then?s.then(a):a();var a,s})});function fo(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 mo(){}function go(e,t){if(!t)return e&&e.then?e.then(mo):Promise.resolve()}const vo="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function yo(e,t,n){if(!e.s){if(n instanceof bo){if(!n.s)return void(n.o=yo.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(yo.bind(null,e,t),yo.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}const bo=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{yo(r,1,e(this.v))}catch(e){yo(r,2,e)}return r}return this}return this.o=function(e){try{const i=e.v;1&e.s?yo(r,1,t?t(i):i):n?yo(r,1,n(i)):yo(r,2,i)}catch(e){yo(r,2,e)}},r},e}();function Ao(e){return e instanceof bo&&1&e.s}const xo=fo(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!0===n.recursive)return po(e,t,n);const r=Wr({url:or(e.remoteURL,(i=tr(t),i.endsWith("/")?i:i+"/")),method:"MKCOL"},e,n);var i;return ho(Br(r,e),function(t){$i(e,t)})});var wo=Vn(388),ko=Vn.n(wo);const So=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=Wr({url:or(e.remoteURL,tr(t)),method:"GET",headers:r},e,n);return a=function(t){if($i(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=Br(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a}),Eo=()=>{},Co=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=or(e.remoteURL,tr(t)));const r=Wr(n,e,{});return o=function(t){return $i(e,t),t},(i=Br(r,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}),_o=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=Wr({url:or(e.remoteURL,tr(t)),method:"DELETE"},e,n);return o=function(t){$i(e,t)},(i=Br(r,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}),To=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=co(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 Do(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Po=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=Wr({url:or(e.remoteURL,tr(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},e,n);return Do(Br(r,e),function(r){return $i(e,r),Do(r.text(),function(i){if(!i)throw new Error("Failed parsing directory contents: Empty response");return Do(oo(i),function(i){const o=nr(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=Qn().join(t,"/"),{multistatus:{response:a}}=e,s=a.map(e=>{const t=function(e){try{return e.replace(/^https?:\/\/[^\/]+/,"")}catch(e){throw new $n(e,"Failed normalising HREF")}}(e.href),{propstat:{prop:n}}=e;return ao(n,"/"===o?decodeURIComponent(rr(t)):rr(Qn().relative(decodeURIComponent(o),decodeURIComponent(t))),r)});return i?s:s.filter(e=>e.basename&&("file"===e.type||e.filename!==n.replace(/\/$/,"")))}(i,nr(e.remoteBasePath||e.remotePath),o,n.details,n.includeSelf);return n.glob&&(a=function(e,t){return e.filter(e=>wi(e.filename,t,{matchBase:!0}))}(a,n.glob)),Ji(r,a,n.details)})})})});function Io(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 Fo=Io(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Wr({url:or(e.remoteURL,tr(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[No]},e,n);return Lo(Br(r,e),function(t){return $i(e,t),Lo(t.text(),function(e){return Ji(t,e,n.details)})})});function Lo(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const zo=Io(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Wr({url:or(e.remoteURL,tr(t)),method:"GET"},e,n);return Lo(Br(r,e),function(t){let r;return $i(e,t),function(e,t){var n=e();return n&&n.then?n.then(t):t()}(function(){return Lo(t.arrayBuffer(),function(e){r=e})},function(){return Ji(t,r,n.details)})})}),Oo=Io(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 $n({info:{code:br.InvalidOutputFormat}},"Invalid output format: ".concat(r));return"text"===r?Fo(e,t,n):zo(e,t,n)}),No=e=>e;function jo(e){return new eo.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Ro({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},"d"))}function Ro(e,t){const n=(0,r.A)({},e);for(const e in n)n.hasOwnProperty(e)&&(n[e]&&"object"==typeof n[e]&&-1===e.indexOf(":")?(n["".concat(t,":").concat(e)]=Ro(n[e],t),delete n[e]):!1===/^@_/.test(e)&&(n["".concat(t,":").concat(e)]=n[e],delete n[e]));return n}function Mo(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Bo(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 Wo=Bo(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Wr({url:or(e.remoteURL,tr(t)),method:"UNLOCK",headers:{"Lock-Token":n}},e,r);return Mo(Br(i,e),function(t){if($i(e,t),204!==t.status&&200!==t.status)throw Xi(t)})}),Uo=Bo(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{refreshToken:r,timeout:i=Ho}=n,o={Accept:"text/plain,application/xml",Timeout:i};r&&(o.If=r);const a=Wr({url:or(e.remoteURL,tr(t)),method:"LOCK",headers:o,data:jo(e.contactHref)},e,n);return Mo(Br(a,e),function(t){return $i(e,t),Mo(t.text(),function(e){const n=(o=e,new eo.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(o)),r=no().get(n,"prop.lockdiscovery.activelock.locktoken.href"),i=no().get(n,"prop.lockdiscovery.activelock.timeout");var o;if(!r)throw Xi(t,"No lock token received: ");return{token:r,serverTimeout:i}})})}),Ho="Infinite, Second-4100000000";function Vo(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Go=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=Wr({url:or(e.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return Vo(Br(r,e),function(n){return $i(e,n),Vo(n.text(),function(e){return Vo(oo(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:lo(r)}:null}catch(e){}return null}(e);return Ji(n,r,t.details)})})})});function Ko(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const qo=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=Wr({url:or(e.remoteURL,tr(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":e.headers["Content-Type"]||"application/xml; charset=utf-8"}},e,n);return Ko(Br(i,e),function(n){return $i(e,n),Ko(n.text(),function(e){return Ko(oo(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(tr(t).replace(/\/$/,""))}),e.multistatus.response.forEach(e=>{if(void 0===e.propstat)return;const t=e.href.split("/").map(decodeURIComponent).join("/");r.results.push(ao(e.propstat.prop,t,n))}),r}(e,t,r);return Ji(n,i,r)})})})}),Yo=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=Wr({url:or(e.remoteURL,tr(t)),method:"MOVE",headers:{Destination:or(e.remoteURL,tr(n)),Overwrite:!1===r.overwrite?"F":"T"}},e,r);return a=function(t){$i(e,t)},(o=Br(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a});var Xo=Vn(172);const $o=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(zr(e))return e.byteLength;if(Or(e))return e.length;if("string"==typeof e)return(0,Xo.d)(e);throw new $n({info:{code:br.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}(n))),o||(a["If-None-Match"]="*");const s=Wr({url:or(e.remoteURL,tr(t)),method:"PUT",headers:a,data:n},e,r);return u=function(t){try{$i(e,t)}catch(e){const t=e;if(412!==t.status||o)throw t;return!1}return!0},(l=Br(s,e))&&l.then||(l=Promise.resolve(l)),u?l.then(u):l;var l,u}),Jo=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=Wr({url:or(e.remoteURL,tr(t)),method:"OPTIONS"},e,n);return o=function(t){var n,r;try{$i(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=Br(r,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o});function Qo(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Zo=na(function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new $n({info:{code:br.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=Wr({url:or(e.remoteURL,tr(t)),method:"PUT",headers:a,data:i},e,o);return Qo(Br(s,e),function(t){$i(e,t)})});function ea(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const ta=na(function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new $n({info:{code:br.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=Wr({url:or(e.remoteURL,tr(t)),method:"PATCH",headers:a,data:i},e,o);return Qo(Br(s,e),function(t){$i(e,t)})});function na(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 ra=na(function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return Qo(Jo(e,t,o),function(a){let s=!1;return ea(function(){if(a.compliance.includes("sabredav-partialupdate"))return Qo(ta(e,t,n,r,i,o),function(e){return s=!0,e})},function(l){let u=!1;return s?l:ea(function(){if(a.server.includes("Apache")&&a.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Qo(Zo(e,t,n,r,i,o),function(e){return u=!0,e})},function(e){if(u)return e;throw new $n({info:{code:br.NotSupported}},"Not supported")})})})}),ia="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function oa(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{authType:n=null,remoteBasePath:r,contactHref:i=ia,ha1:o,headers:a={},httpAgent:s,httpsAgent:l,password:u,token:c,username:d,withCredentials:h}=t;let p=n;p||(p=d||u?yr.Password:yr.None);const f={authType:p,remoteBasePath:r,contactHref:i,ha1:o,headers:Object.assign({},a),httpAgent:s,httpsAgent:l,password:u,remotePath:ir(e),remoteURL:e,token:c,username:d,withCredentials:h};return Ar(f,d,u,c,o),{copyFile:(e,t,n)=>Qi(f,e,t,n),createDirectory:(e,t)=>xo(f,e,t),createReadStream:(e,t)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new(0,ko().PassThrough);return So(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]:Eo;const i=new(0,ko().PassThrough),o={};!1===n.overwrite&&(o["If-None-Match"]="*");const a=Wr({url:or(e.remoteURL,tr(t)),method:"PUT",headers:o,data:i,maxRedirects:0},e,n);return Br(a,e).then(t=>$i(e,t)).then(e=>{setTimeout(()=>{r(e)},0)}).catch(e=>{i.emit("error",e)}),i}(f,e,t,n),customRequest:(e,t)=>Co(f,e,t),deleteFile:(e,t)=>_o(f,e,t),exists:(e,t)=>To(f,e,t),getDirectoryContents:(e,t)=>Po(f,e,t),getFileContents:(e,t)=>Oo(f,e,t),getFileDownloadLink:e=>function(e,t){let n=or(e.remoteURL,tr(t));const r=/^https:/i.test(n)?"https":"http";switch(e.authType){case yr.None:break;case yr.Password:{const t=hr(e.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,"".concat(r,"://").concat(t,"@"));break}default:throw new $n({info:{code:br.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(e.authType))}return n}(f,e),getFileUploadLink:e=>function(e,t){let n="".concat(or(e.remoteURL,tr(t)),"?Content-Type=application/octet-stream");const r=/^https:/i.test(n)?"https":"http";switch(e.authType){case yr.None:break;case yr.Password:{const t=hr(e.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,"".concat(r,"://").concat(t,"@"));break}default:throw new $n({info:{code:br.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(e.authType))}return n}(f,e),getHeaders:()=>Object.assign({},f.headers),getQuota:e=>Go(f,e),lock:(e,t)=>Uo(f,e,t),moveFile:(e,t,n)=>Yo(f,e,t,n),putFileContents:(e,t,n)=>$o(f,e,t,n),partialUpdateFileContents:(e,t,n,r,i)=>ra(f,e,t,n,r,i),getDAVCompliance:e=>Jo(f,e),search:(e,t)=>qo(f,e,t),setHeaders:e=>{f.headers=Object.assign({},e)},stat:(e,t)=>co(f,e,t),unlock:(e,t,n)=>Wo(f,e,t,n)}}var aa=Gn.UU,sa=Gn.Gu;const la="AES-GCM",ua="PBKDF2-SHA-256",ca=1e5,da=new TextEncoder,ha=new TextDecoder,pa=()=>{var e;const t=null===(e=globalThis.crypto)||void 0===e?void 0:e.subtle;if(!t)throw new Error("Web Crypto is not available");return t},fa=e=>{let t="";for(let n=0;n<e.length;n+=1)t+=String.fromCharCode(e[n]);return btoa(t)},ma=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e+=1)n[e]=t.charCodeAt(e);return n},ga=async(e,t)=>{const n=pa(),r=await n.importKey("raw",da.encode(e),"PBKDF2",!1,["deriveKey"]);return n.deriveKey({name:"PBKDF2",salt:t,iterations:ca,hash:"SHA-256"},r,{name:la,length:256},!1,["encrypt","decrypt"])},va=async(e,t)=>{const n=globalThis.crypto.getRandomValues(new Uint8Array(16)),r=globalThis.crypto.getRandomValues(new Uint8Array(12)),i=await ga(t,n),o=await pa().encrypt({name:la,iv:r},i,da.encode(e));return JSON.stringify({encrypted:!0,version:1,alg:la,kdf:ua,iterations:ca,salt:fa(n),iv:fa(r),data:fa(new Uint8Array(o))})},ya=async(e,t)=>{const n=(e=>{try{const t=JSON.parse(e);if(!0===(null==t?void 0:t.encrypted)&&t.version&&t.alg&&t.kdf&&t.data)return t}catch(e){}return null})(e);if(!n)return{value:e,encrypted:!1};if(1!==n.version||n.alg!==la||n.kdf!==ua||n.iterations!==ca)throw new Error("Unsupported sync encryption format");const r=await ga(t,ma(n.salt)),i=await pa().decrypt({name:la,iv:ma(n.iv)},r,ma(n.data));return{value:ha.decode(i),encrypted:!0}};let ba=!1;const Aa="kiss translator sync files",xa=async function(e,t){let{syncUrl:n,syncUser:r,syncKey:i}=t,{forceWrite:a=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ba||(ba=!0,sa().patch("request",e=>(0,N.iI)(e.url,{method:e.method,headers:e.headers,body:e.data})));const s=aa(n,{username:r,password:i}),l="/".concat(o.jM6),u="/".concat(o.jM6,"/").concat(e.key);!1===await s.exists(l)&&await s.createDirectory(l);if(await s.exists(u)&&!a){const t=await s.getFileContents(u,{format:"text"}),n=JSON.parse(t);if(n.updateAt>=e.updateAt)return n}return await s.putFileContents(u,JSON.stringify(e,null,2)),e},wa=async(e,t)=>{let{syncUrl:n,syncKey:r}=t;return n=(0,l.Ms)(n,"/"),await(async(e,t,n)=>(0,N.Fd)(e,{headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(await(0,l.$Q)(t,o.r1p))},method:"POST",body:JSON.stringify(n)}))("".concat(n,"/sync"),r,e)},ka=async e=>{const t=await(async e=>(0,N.Fd)("".concat(wn,"?per_page=100"),{method:"GET",headers:kn(e)}))(e);return t.filter(e=>e.description===Aa).sort((e,t)=>{const n=Date.parse(e.updated_at||e.created_at||0);return Date.parse(t.updated_at||t.created_at||0)-n})[0]},Sa=async function(e,t){var n,r;let{syncUrl:i,syncKey:s}=t,{forceWrite:l=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=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);const c=(d=e.key).startsWith("kiss-rules_")?"sync-rules_".concat(d):d===o.sgk?"sync-words_".concat(d):d;var d;const h=JSON.stringify(e,null,2);if(!u){const e=await ka(s);null!=e&&e.id&&(u=e.id,await(0,a.pK)({syncUrl:u}))}if(!u){const t=await(async(e,t,n)=>(0,N.Fd)(wn,{method:"POST",headers:kn(e),body:JSON.stringify({description:n,public:!1,files:{[t.key]:{content:t.content}}})}))(s,{key:c,content:h},Aa);return await(0,a.pK)({syncUrl:t.id}),e}const p=await(async(e,t)=>(0,N.Fd)("".concat(wn,"/").concat(e),{method:"GET",headers:kn(t)}))(u,s),f=(null===(n=p.files)||void 0===n?void 0:n[c])||(null===(r=p.files)||void 0===r?void 0:r[e.key]);if(f&&!l){const t=f.content||await(m=f.raw_url,(0,N.Fd)(m,void 0,{expect:"text"})),n=JSON.parse(t);if(n.updateAt>=e.updateAt)return n}var m;return await(async(e,t,n,r)=>(0,N.Fd)("".concat(wn,"/").concat(e),{method:"PATCH",headers:kn(t),body:JSON.stringify({files:{[n]:{content:r}}})}))(u,s,c,h),e},Ea=async(e,t)=>(0,r.A)((0,r.A)({},e),{},{value:await va(e.value,t)}),Ca=async(e,t,n,r)=>e===o.UPC?await xa(t,n,r):e===o.EeC?await Sa(t,n,r):await wa(t,n),_a=async function(e,t){let{syncEncryptKey:n,forceRemoteRead:i=!1,persistMeta:s=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{syncType:l,syncUrl:u,syncUser:c,syncKey:d,syncEncryptKey:h,syncMeta:p={}}=await(0,a.Xn)(),f=null!=n?n:h;if(!d||!f||l!==o.EeC&&!u||l===o.UPC&&!c)return;let{updateAt:m=0,syncAt:g=0}=p[e]||{};0===g&&(m=0);const v={key:e,value:JSON.stringify(t),updateAt:i?0:m},y={syncUrl:u,syncUser:c,syncKey:d},b=await Ea(v,f),A=await Ca(l,b,y);if(!A)throw new Error("sync data got err",e);const{data:x,encrypted:w}=await(async(e,t)=>{const{value:n,encrypted:i}=await ya(e.value,t);return{data:(0,r.A)((0,r.A)({},e),{},{value:n}),encrypted:i}})(A,f),k=JSON.parse(x.value),S=x.updateAt>m;return w||i||await(async(e,t,n,r)=>{const i=await Ea(t,r);await Ca(e,i,n,{forceWrite:!0})})(l,x,y,f),s&&(p[e]={updateAt:x.updateAt,syncAt:Date.now()},await(0,a.pK)({syncMeta:p})),{value:k,isNew:S}},Ta=async e=>{const t=await(0,a.VX)(),n=await _a(o.Ed3,t,e);return null!=n&&n.isNew&&!1!==(null==e?void 0:e.applyRemote)&&await(0,a.Qg)(n.value),n},Da=async()=>{try{await Ta()}catch(e){(0,ht.h9)("sync user rules",e.message)}};const Pa=(e,t)=>e.find(e=>e.pattern!==o.WL9&&!1!==e.enabled&&e.pattern.split(/\n|,/).some(e=>(0,l.uv)(t,e.trim()))),Ia=(e,t)=>{if(!t)return(0,r.A)({},e);if(!e)return(0,r.A)({},t);const n=(0,r.A)({},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","wrapOriginal","autoScan","hasRichText","hasShadowroot","scanAll","isPlainText","transTag","transTitle","splitParagraph","highlightWords","textStyle","originalTextStyle"].forEach(e=>{t[e]&&t[e]!==o.WL9&&(n[e]=t[e])}),["splitLength","transOnlyRevertDelay"].forEach(e=>{t[e]&&t[e]!==o.WL9&&(n[e]=t[e])}),t.pattern&&(n.pattern=t.pattern),n},Fa=async(e,t)=>{let{injectRules:n,subrulesList:i}=t;const s=await(0,a.VX)(),l=(0,r.A)((0,r.A)({},o.lNu),s.find(e=>e.pattern===o.WL9)||{}),u=Pa(s,e);let c=null;if(n)try{const t=i.find(e=>e.selected);if(null!=t&&t.url){const n=await(async e=>{let t=await(0,a.Kl)(e);return t&&0!==t.length||(t=await Ln(e),await Fn(e)),t||[]})(t.url);c=Pa(n,e);try{const e=await(0,a.Sh)(t.url);c&&e.includes(c.pattern)&&(c=null)}catch(e){(0,ht.h9)("getDisabledSubRules",e)}}}catch(e){(0,ht.h9)("load injectRules",e)}if(!u&&!c)return l;let d=(0,r.A)({},l);return d=Ia(d,c),d=Ia(d,u),d},La=e=>{if("string"===(0,l.NW)(e)&&(e=JSON.parse(e)),"array"!==(0,l.NW)(e))throw new Error("data error");const t=o.vH2.map(e=>e[0]),n=o.i8R.map(e=>e[0]),r=new Set;return e=e.filter(e=>"object"===(0,l.NW)(e)).filter(e=>{let{pattern:t}=e;return"string"===(0,l.NW)(t)&&!r.has(t.trim())&&(r.add(t.trim()),!0)}).map(e=>{let{pattern:r,enabled:i,selector:a,keepSelector:s,blockSelector:u,rootsSelector:c,ignoreSelector:d,terms:h,aiTerms:p,termsStyle:f,highlightStyle:m,textExtStyle:g,selectStyle:v,parentStyle:y,grandStyle:b,injectJs:A,injectCss:x,apiSlug:w,fromLang:k,toLang:S,textStyle:E,wrapOriginal:C,originalTextStyle:_,transOpen:T,transOnly:D,transOnlyRevert:P,transOnlyRevertDelay:I,transOrder:F,autoScan:L,hasRichText:z,hasShadowroot:O,scanAll:N,isPlainText:j,transTag:R,transTitle:M,transStartHook:B,transEndHook:W,splitParagraph:U,splitLength:H,highlightWords:V}=e;return{pattern:r.trim(),enabled:"boolean"!==(0,l.NW)(i)||i,selector:"string"===(0,l.NW)(a)?a:"",keepSelector:"string"===(0,l.NW)(s)?s:"",blockSelector:"string"===(0,l.NW)(u)?u:"",rootsSelector:"string"===(0,l.NW)(c)?c:"",ignoreSelector:"string"===(0,l.NW)(d)?d:"",terms:"string"===(0,l.NW)(h)?h:"",aiTerms:"string"===(0,l.NW)(p)?p:"",termsStyle:"string"===(0,l.NW)(f)?f:"",highlightStyle:"string"===(0,l.NW)(m)?m:"",textExtStyle:"string"===(0,l.NW)(g)?g:"",selectStyle:"string"===(0,l.NW)(v)?v:"",parentStyle:"string"===(0,l.NW)(y)?y:"",grandStyle:"string"===(0,l.NW)(b)?b:"",injectJs:"string"===(0,l.NW)(A)?A:"",injectCss:"string"===(0,l.NW)(x)?x:"",apiSlug:"string"===(0,l.NW)(w)&&""!==w.trim()?w.trim():o.WL9,fromLang:(0,l.dt)([o.WL9,...t],k),toLang:(0,l.dt)([o.WL9,...n],S),textStyle:"string"===(0,l.NW)(E)&&""!==E.trim()?E.trim():o.WL9,wrapOriginal:(0,l.dt)([o.WL9,"true","false"],[o.WL9,"true","false"].includes(C)?C:r.trim()===o.WL9?o.lNu.wrapOriginal:o.WL9),originalTextStyle:"string"===(0,l.NW)(_)&&""!==_.trim()?_.trim():r.trim()===o.WL9?o.lNu.originalTextStyle:o.WL9,transOpen:(0,l.dt)([o.WL9,"true","false"],T),transOnly:(0,l.dt)([o.WL9,"true","false"],D),transOnlyRevert:(0,l.dt)([o.WL9,"true","false"],P),transOnlyRevertDelay:"string"!==(0,l.NW)(I)||isNaN(parseFloat(I))?o.WL9:I,transOrder:(0,l.dt)([o.WL9,"original-first","translation-first"],F),autoScan:(0,l.dt)([o.WL9,"true","false"],L),hasRichText:(0,l.dt)([o.WL9,"true","false"],z),hasShadowroot:(0,l.dt)([o.WL9,"true","false"],O),scanAll:(0,l.dt)([o.WL9,"true","false"],N),isPlainText:(0,l.dt)([o.WL9,"true","false"],j),transTag:(0,l.dt)([o.WL9,"span","font"],R),transTitle:(0,l.dt)([o.WL9,"true","false"],M),transStartHook:"string"===(0,l.NW)(B)?B:"",transEndHook:"string"===(0,l.NW)(W)?W:"",splitParagraph:(0,l.dt)([o.WL9,...o._E_],U),splitLength:Number.isInteger(H)?H:0,highlightWords:(0,l.dt)([o.WL9,...o.p1w],V)}}),e},za=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split(/\n|,/).some(t=>(0,l.uv)(e,t.trim()))};var Oa=i(4307);const Na=(()=>{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 ja(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.moZ;return!0===e?ja(t):!1===e?o.Nol:e===o.Jg9||e===o.Nol||e===o.moZ?e:o.moZ}function Ra(e,t){const n=ja(e,t);return n===o.Jg9||n===o.moZ&&!Na}function Ma(e){let{phonetic:t,definition:n,examples:r}=e;const i={createdAt:Date.now(),phonetic:t,definition:n,examples:r};return Object.keys(i).forEach(e=>{(null===i[e]||void 0===i[e]||Array.isArray(i[e])&&0===i[e].length||"string"==typeof i[e]&&0===i[e].length)&&delete i[e]}),i}async function Ba(e){await(0,a.aA)(e),(0,a.GY)(o.sgk)}function Wa(e,t){document.dispatchEvent(new CustomEvent(o.KDu,{detail:{word:e,isFavorite:t}}))}function Ua(e){let{word:t,data:n,i18n:i=()=>""}=e;const o=document.createElement("button");o.type="button",o.className="kiss-favorite-word-button",o.style.cssText="background: none; border: none; color: inherit; cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 4px;";const s=i("collect")||"Favorite",l=e=>{o.textContent=String.fromCodePoint(e?9829:9825),o.setAttribute("aria-pressed",String(e)),o.setAttribute("aria-label",s),o.title=s};let u=!1;return(async()=>{const e=await async function(e){const t=await(0,a.lk)();return Boolean(t[e])}(t);u||l(e)})(),o.addEventListener("click",async e=>{e.preventDefault(),e.stopPropagation(),u=!0,o.disabled=!0;try{l(await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await(0,a.lk)();if(n[e]){const t=(0,r.A)({},n);return delete t[e],await Ba(t),Wa(e,!1),!1}return await Ba((0,r.A)((0,r.A)({},n),{},{[e]:Ma(t)})),Wa(e,!0),!0}(t,n))}finally{o.disabled=!1}}),o}const Ha=()=>{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)};function Va(e){return String(e||"").replace(/\b([a-zA-Z]+(?:'[a-zA-Z]+)?)\b/g,'<span class="kiss-subtitle-word" data-word="$1">$1</span>')}var Ga=(0,Qt.A)("handleWordHover"),Ka=(0,Qt.A)("handleWordHoverOut"),qa=(0,Qt.A)("extractDictionaryData"),Ya=(0,Qt.A)("dispatchAddWord"),Xa=(0,Qt.A)("addFavoriteButton"),$a=(0,Qt.A)("renderDictionaryResult");class Ja{constructor(e){let{getVideoContainer:t,getTimestamp:n,autoFavWord:r=!1,i18n:i=()=>""}=e;Object.defineProperty(this,$a,{value:rs}),Object.defineProperty(this,Xa,{value:ns}),Object.defineProperty(this,Ya,{value:ts}),Object.defineProperty(this,qa,{value:es}),Object.defineProperty(this,Ka,{value:Za}),Object.defineProperty(this,Ga,{value:Qa}),this.getVideoContainer=t,this.getTimestamp=n,this.autoFavWord=r,this.i18n=i,this.tooltipEl=null,this.hoverTimeout=null,this.activeWordEl=null}attachSpanListeners(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getTimestamp;if(!e)return;e.querySelectorAll(".kiss-subtitle-word").forEach(e=>{if(e.dataset.kissListenerAttached)return;e.addEventListener("pointerenter",e=>(0,Jt.A)(this,Ga)[Ga](e,t)),e.addEventListener("pointerleave",e=>(0,Jt.A)(this,Ka)[Ka](e)),e.dataset.kissListenerAttached="1"})}destroy(){this.clearHoverState()}clearHoverState(){var e;this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),null===(e=this.activeWordEl)||void 0===e||e.classList.remove("kiss-word-hover"),this.activeWordEl=null,this.hideWordTooltip()}async showWordTooltip(e){var t;let{timestamp:n=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.tooltipEl&&this.tooltipEl.remove(),this.tooltipEl=document.createElement("div"),this.tooltipEl.className="kiss-word-tooltip",this.tooltipEl.innerHTML=at.createHTML('<div class="kiss-word-loading">Looking up...</div>');const i=null===(t=this.getVideoContainer)||void 0===t?void 0:t.call(this);if(i){const e=i.getBoundingClientRect(),t=300,n=400,r=e.right-t-45,o=e.top+20,a=window.innerWidth-t-10;this.tooltipEl.style.left=Math.min(a,Math.max(10,r))+"px",this.tooltipEl.style.top=Math.max(10,o)+"px",this.tooltipEl.style.maxWidth=t+"px",this.tooltipEl.style.maxHeight=n+"px",this.tooltipEl.style.overflow="auto"}document.body.appendChild(this.tooltipEl);try{const t=await Sn(e),{phonetic:i,definition:o,examples:s}=(0,Jt.A)(this,qa)[qa](t);(0,Jt.A)(this,Ya)[Ya]({word:e,phonetic:i,definition:o,examples:s,timestamp:n});const l={timestamp:n,phonetic:i,definition:o,examples:s},u=Boolean(t&&(t.trs||t.aus||t.sentences));this.autoFavWord&&u&&await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await(0,a.lk)();return!n[e]&&(await Ba((0,r.A)((0,r.A)({},n),{},{[e]:Ma(t)})),Wa(e,!0),!0)}(e,l),(0,Jt.A)(this,$a)[$a](e,t,l)}catch(t){ht.vF.info("Dictionary lookup failed for word:",e,t),(0,Jt.A)(this,Ya)[Ya]({word:e,phonetic:"",definition:"",examples:[],timestamp:n}),this.tooltipEl&&(this.tooltipEl.innerHTML=at.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>')),(0,Jt.A)(this,Xa)[Xa](e,{timestamp:n}))}}hideWordTooltip(){this.tooltipEl&&(this.tooltipEl.remove(),this.tooltipEl=null)}}function Qa(e,t){const n=e.target;n.classList.contains("kiss-subtitle-word")&&(this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),n.classList.add("kiss-word-hover"),this.activeWordEl=n,this.hoverTimeout=setTimeout(()=>{var e;this.showWordTooltip(n.dataset.word,{timestamp:null!==(e=null==t?void 0:t())&&void 0!==e?e:0})},300))}function Za(e){const t=e.target;t.classList.contains("kiss-subtitle-word")&&(t.classList.remove("kiss-word-hover"),this.activeWordEl===t&&(this.activeWordEl=null),this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),this.hoverTimeout=setTimeout(()=>{this.hideWordTooltip()},100))}function es(e){let t="";if(e&&e.aus){const n=e.aus.find(e=>"美"===e.key);n&&n.phonetic?t=n.phonetic:e.aus.length>0&&e.aus[0].phonetic&&(t=e.aus[0].phonetic)}let n="";e&&e.trs&&(n=e.trs.slice(0,3).map(e=>"".concat(e.pos?e.pos+" ":"").concat(e.def)).join("; "));let r=[];return e&&e.sentences&&(r=e.sentences.slice(0,2).map(e=>({eng:e.eng,chs:e.chs}))),{phonetic:t,definition:n,examples:r}}function ts(e){document.dispatchEvent(new CustomEvent("kiss-add-word",{detail:e}))}function ns(e,t){var n;const r=null===(n=this.tooltipEl)||void 0===n?void 0:n.querySelector(".kiss-word-tooltip-header"),i=null==r?void 0:r.querySelector(".kiss-word-tooltip-close");r&&i&&r.insertBefore(Ua({word:e,data:t,i18n:this.i18n}),i)}function rs(e,t,n){if(t&&(t.trs||t.aus||t.sentences)){let r='<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>');return t.aus&&t.aus.length>0&&(r+="<div>",t.aus.forEach(e=>{e.phonetic&&(r+='<span class="kiss-word-phonetic">'.concat(e.phonetic,"</span>"))}),r+="</div>"),t.trs&&t.trs.slice(0,3).forEach(e=>{r+='<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&&(r+='<div class="kiss-word-example">\n            <div class="kiss-word-example-title">例句</div>',t.sentences.slice(0,2).forEach(e=>{r+='<div class="kiss-word-example-sentence">'.concat(e.eng,'</div>\n              <div class="kiss-word-example-translation">').concat(e.chs,"</div>")}),r+="</div>"),void(this.tooltipEl&&(this.tooltipEl.innerHTML=at.createHTML(r),(0,Jt.A)(this,Xa)[Xa](e,n)))}this.tooltipEl&&(this.tooltipEl.innerHTML=at.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>')),(0,Jt.A)(this,Xa)[Xa](e,n))}var is=(0,Qt.A)("videoEl"),os=(0,Qt.A)("formattedSubtitles"),as=(0,Qt.A)("captionWindowEl"),ss=(0,Qt.A)("paperEl"),ls=(0,Qt.A)("currentSubtitleIndex"),us=(0,Qt.A)("setting"),cs=(0,Qt.A)("isAdPlaying"),ds=(0,Qt.A)("throttledTriggerTranslations"),hs=(0,Qt.A)("wordTooltipController"),ps=(0,Qt.A)("seekSyncRafId"),fs=(0,Qt.A)("translationSessionId"),ms=(0,Qt.A)("abortController"),gs=(0,Qt.A)("wasPlayingBeforeHover"),vs=(0,Qt.A)("hoverTarget"),ys=(0,Qt.A)("playerControlBarObserver"),bs=(0,Qt.A)("syncPaperBottomAfterDrag"),As=(0,Qt.A)("isHoverLookupEnabled"),xs=(0,Qt.A)("observePlayerControlBar"),ws=(0,Qt.A)("createCaptionWindow"),ks=(0,Qt.A)("attachSpanListeners"),Ss=(0,Qt.A)("enableDragging"),Es=(0,Qt.A)("attachEventListeners"),Cs=(0,Qt.A)("removeEventListeners"),_s=(0,Qt.A)("scheduleSeekSettledSync"),Ts=(0,Qt.A)("syncToCurrentTime"),Ds=(0,Qt.A)("findSubtitleIndexForTime"),Ps=(0,Qt.A)("updateCaptionDisplay"),Is=(0,Qt.A)("triggerTranslations"),Fs=(0,Qt.A)("needsRepairTranslation"),Ls=(0,Qt.A)("translateAndStore"),zs=(0,Qt.A)("getCurrentSubtitleStartTime");class Os{constructor(e){var t;let{videoEl:n,formattedSubtitles:r,setting:i}=e;Object.defineProperty(this,zs,{value:$s}),Object.defineProperty(this,Ls,{value:Xs}),Object.defineProperty(this,Fs,{value:Ys}),Object.defineProperty(this,Is,{value:qs}),Object.defineProperty(this,Ps,{value:Ks}),Object.defineProperty(this,Ds,{value:Gs}),Object.defineProperty(this,Ts,{value:Vs}),Object.defineProperty(this,_s,{value:Hs}),Object.defineProperty(this,Cs,{value:Us}),Object.defineProperty(this,Es,{value:Ws}),Object.defineProperty(this,Ss,{value:Bs}),Object.defineProperty(this,ks,{value:Ms}),Object.defineProperty(this,ws,{value:Rs}),Object.defineProperty(this,xs,{value:js}),Object.defineProperty(this,As,{value:Ns}),Object.defineProperty(this,is,{writable:!0,value:void 0}),Object.defineProperty(this,os,{writable:!0,value:[]}),Object.defineProperty(this,as,{writable:!0,value:null}),Object.defineProperty(this,ss,{writable:!0,value:null}),Object.defineProperty(this,ls,{writable:!0,value:-1}),Object.defineProperty(this,us,{writable:!0,value:{}}),Object.defineProperty(this,cs,{writable:!0,value:!1}),Object.defineProperty(this,ds,{writable:!0,value:void 0}),Object.defineProperty(this,hs,{writable:!0,value:null}),Object.defineProperty(this,ps,{writable:!0,value:null}),Object.defineProperty(this,fs,{writable:!0,value:0}),Object.defineProperty(this,ms,{writable:!0,value:null}),Object.defineProperty(this,gs,{writable:!0,value:!1}),Object.defineProperty(this,vs,{writable:!0,value:null}),Object.defineProperty(this,ys,{writable:!0,value:null}),Object.defineProperty(this,bs,{writable:!0,value:null}),(0,Jt.A)(this,us)[us]=i,(0,Jt.A)(this,is)[is]=n,(0,Jt.A)(this,os)[os]=r,(0,Jt.A)(this,ms)[ms]=new AbortController,this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onSeeking=this.onSeeking.bind(this),this.onSeek=this.onSeek.bind(this),(0,Jt.A)(this,ds)[ds]=(0,l.nF)((0,Jt.A)(this,Is)[Is].bind(this),1e3*(null!==(t=i.throttleTrans)&&void 0!==t?t:30)),(0,Jt.A)(this,As)[As]()&&(Ha(),(0,Jt.A)(this,hs)[hs]=new Ja({getVideoContainer:()=>{var e;return null===(e=(0,Jt.A)(this,is)[is].parentElement)||void 0===e?void 0:e.parentElement},getTimestamp:()=>(0,Jt.A)(this,zs)[zs]()}))}start(){0!==(0,Jt.A)(this,os)[os].length?(ht.vF.info("Bilingual Subtitle Manager: Starting..."),(0,Jt.A)(this,ws)[ws](),(0,Jt.A)(this,Es)[Es](),this.onTimeUpdate()):ht.vF.warn("Bilingual Subtitles: No subtitles to display.")}destroy(){var e,t,n,r,i,o,a;ht.vF.info("Bilingual Subtitle Manager: Destroying..."),(0,Jt.A)(this,fs)[fs]+=1,null===(e=(0,Jt.A)(this,ms)[ms])||void 0===e||e.abort(),(0,Jt.A)(this,ms)[ms]=null,this.onSubtitleUpdate=null,(0,Jt.A)(this,Cs)[Cs](),null===(t=(0,Jt.A)(this,ds)[ds])||void 0===t||t.cancel(),null!==(0,Jt.A)(this,ps)[ps]&&(cancelAnimationFrame((0,Jt.A)(this,ps)[ps]),(0,Jt.A)(this,ps)[ps]=null),null===(n=(0,Jt.A)(this,as)[as])||void 0===n||null===(r=n.parentElement)||void 0===r||null===(i=r.parentElement)||void 0===i||i.remove(),null===(o=(0,Jt.A)(this,ys)[ys])||void 0===o||o.disconnect(),(0,Jt.A)(this,ys)[ys]=null,(0,Jt.A)(this,bs)[bs]=null,(0,Jt.A)(this,os)[os]=[],null===(a=(0,Jt.A)(this,hs)[hs])||void 0===a||a.destroy(),(0,Jt.A)(this,hs)[hs]=null}setIsAdPlaying(e){(0,Jt.A)(this,cs)[cs]=e,this.onTimeUpdate()}onTimeUpdate(){(0,Jt.A)(this,Ts)[Ts]()}onSeeking(){(0,Jt.A)(this,ds)[ds].cancel(),(0,Jt.A)(this,Ts)[Ts]({forceRender:!0,triggerTranslations:!1})}onSeek(){(0,Jt.A)(this,ds)[ds].cancel(),(0,Jt.A)(this,Ts)[Ts]({forceRender:!0}),(0,Jt.A)(this,_s)[_s]()}appendSubtitles(e){e&&0!==e.length&&(ht.vF.info("Bilingual Subtitle Manager: Appending ".concat(e.length," new subtitles...")),(0,Jt.A)(this,ls)[ls]=-1,(0,Jt.A)(this,Ts)[Ts]({forceRender:!0,forceTriggerTranslations:!0}))}repairChunkTranslations(e){for(const t of e||[])(0,Jt.A)(this,Fs)[Fs](t)&&!t.isTranslating&&(0,Jt.A)(this,Ls)[Ls](t)}updateSetting(e){(0,Jt.A)(this,us)[us]=(0,r.A)((0,r.A)({},(0,Jt.A)(this,us)[us]),e);const t=(0,Jt.A)(this,os)[os][(0,Jt.A)(this,ls)[ls]];t&&(0,Jt.A)(this,Ps)[Ps](t)}}function Ns(){return Ra((0,Jt.A)(this,us)[us].hoverLookupMode,(0,Jt.A)(this,us)[us].enhanceMode)}function js(){var e=this;const t=(0,Jt.A)(this,is)[is].closest(".html5-video-player");if(!t)return;const n=t.querySelector(".ytp-left-controls");if(!n)return;const r=parseFloat(getComputedStyle(n).height);let i=.05*t.clientHeight,o=null;const a=function(){let{force:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const a=t.classList.contains("ytp-autohide");if(!n&&a===o)return;o=a;const s=!a&&i<2*r?i+r:i;(0,Jt.A)(e,ss)[ss].style.bottom="".concat(s,"px")};(0,Jt.A)(this,bs)[bs]=()=>{i=parseFloat((0,Jt.A)(this,ss)[ss].style.bottom)||0,a({force:!0})},a({force:!0});const s=new MutationObserver(()=>a());s.observe(t,{attributes:!0,attributeFilter:["class"]}),(0,Jt.A)(this,ys)[ys]=s}function Rs(){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:"50",pointerEvents:"auto",display:"none"}),(0,Jt.A)(this,ss)[ss]=n,(0,Jt.A)(this,as)[as]=document.createElement("div"),(0,Jt.A)(this,as)[as].className="kiss-caption-window",(0,Jt.A)(this,as)[as].style.cssText=(0,Jt.A)(this,us)[us].windowStyle,(0,Jt.A)(this,as)[as].style.pointerEvents="auto",(0,Jt.A)(this,as)[as].style.cursor="grab",(0,Jt.A)(this,as)[as].style.opacity="1",(0,Jt.A)(this,ss)[ss].appendChild((0,Jt.A)(this,as)[as]),t.appendChild((0,Jt.A)(this,ss)[ss]);const r=null===(e=(0,Jt.A)(this,is)[is].parentElement)||void 0===e?void 0:e.parentElement;if(!r)return void ht.vF.warn("could not find videoContainer");r.style.position="relative",r.appendChild(t);const i=(0,Jt.A)(this,As)[As]();(0,Jt.A)(this,Ss)[Ss]((0,Jt.A)(this,ss)[ss],t,(0,Jt.A)(this,as)[as],()=>{var e,t;return null===(e=(t=(0,Jt.A)(this,bs))[bs])||void 0===e?void 0:e.call(t)}),i&&((0,Jt.A)(this,as)[as].addEventListener("pointerenter",e=>{e.target===(0,Jt.A)(this,as)[as]&&((0,Jt.A)(this,gs)[gs]=(0,Jt.A)(this,is)[is]&&!(0,Jt.A)(this,is)[is].paused,(0,Jt.A)(this,is)[is]&&!(0,Jt.A)(this,is)[is].paused&&(0,Jt.A)(this,is)[is].pause())}),(0,Jt.A)(this,as)[as].addEventListener("pointerleave",e=>{e.target===(0,Jt.A)(this,as)[as]&&((0,Jt.A)(this,gs)[gs]&&(0,Jt.A)(this,is)[is]&&(0,Jt.A)(this,is)[is].paused&&(0,Jt.A)(this,is)[is].play(),(0,Jt.A)(this,gs)[gs]=!1,(0,Jt.A)(this,vs)[vs]=null)})),(0,Jt.A)(this,xs)[xs]()}function Ms(){var e;null===(e=(0,Jt.A)(this,hs)[hs])||void 0===e||e.attachSpanListeners((0,Jt.A)(this,as)[as])}function Bs(e,t,n,r){let i,o,a,s=!1,l=!1;const u=r=>{"mousedown"===r.type&&0!==r.button||(r.preventDefault(),s=!0,l=!1,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",d,{capture:!0}),document.addEventListener("touchend",d,{capture:!0}))},c=n=>{if(!s)return;n.preventDefault();const r="touchmove"===n.type?n.touches[0].clientY:n.clientY;let u=o-(r-i);const c=t.clientHeight;u=Math.max(0,u),u=Math.min(c-a,u),a>c&&(u=Math.max(0,u)),l=!0,e.style.bottom="".concat(u,"px")},d=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",d,{capture:!0}),document.removeEventListener("touchend",d,{capture:!0}),l&&r&&"function"==typeof r&&r();const i=e.style.bottom;setTimeout(()=>{e.style.bottom=i},50)};n.addEventListener("mousedown",u),n.addEventListener("touchstart",u,{passive:!1})}function Ws(){(0,Jt.A)(this,is)[is].addEventListener("timeupdate",this.onTimeUpdate),(0,Jt.A)(this,is)[is].addEventListener("seeking",this.onSeeking),(0,Jt.A)(this,is)[is].addEventListener("seeked",this.onSeek)}function Us(){(0,Jt.A)(this,is)[is].removeEventListener("timeupdate",this.onTimeUpdate),(0,Jt.A)(this,is)[is].removeEventListener("seeking",this.onSeeking),(0,Jt.A)(this,is)[is].removeEventListener("seeked",this.onSeek)}function Hs(){"function"==typeof requestAnimationFrame&&(null!==(0,Jt.A)(this,ps)[ps]&&cancelAnimationFrame((0,Jt.A)(this,ps)[ps]),(0,Jt.A)(this,ps)[ps]=requestAnimationFrame(()=>{(0,Jt.A)(this,ps)[ps]=requestAnimationFrame(()=>{(0,Jt.A)(this,ps)[ps]=null,(0,Jt.A)(this,Ts)[Ts]({forceRender:!0})})}))}function Vs(){let{forceRender:e=!1,triggerTranslations:t=!0,forceTriggerTranslations:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=1e3*(0,Jt.A)(this,is)[is].currentTime,i=(0,Jt.A)(this,Ds)[Ds](r);var o,a,s;((e||i!==(0,Jt.A)(this,ls)[ls])&&((0,Jt.A)(this,ls)[ls]=i,(0,Jt.A)(this,Ps)[Ps](-1!==i?(0,Jt.A)(this,os)[os][i]:null)),t)&&(null===(o=(a=(0,Jt.A)(this,us)[us]).onSubtitleTimeWindow)||void 0===o||o.call(a,{currentTimeMs:r,preTrans:null!==(s=(0,Jt.A)(this,us)[us].preTrans)&&void 0!==s?s:90}),n?(0,Jt.A)(this,Is)[Is](r):(0,Jt.A)(this,ds)[ds](r))}function Gs(e){const t=(0,Jt.A)(this,os)[os],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 Ks(e){if((0,Jt.A)(this,ss)[ss]&&(0,Jt.A)(this,as)[as])if((0,Jt.A)(this,cs)[cs])(0,Jt.A)(this,ss)[ss].style.display="none";else if(e){const t=document.createElement("p");t.style.cssText=(0,Jt.A)(this,us)[us].originStyle,t.style.margin="0";const n=(0,Jt.A)(this,As)[As]();n?t.innerHTML=at.createHTML(Va(e.text)):t.textContent=(0,l.sz)(e.text);const r=document.createElement("p");if(r.style.cssText=(0,Jt.A)(this,us)[us].translationStyle,r.style.margin="0",n?r.innerHTML=at.createHTML(Va(e.translation||"...")):r.textContent=(0,l.sz)(e.translation)||"...",(0,Jt.A)(this,us)[us].isBilingual){const e="translation-first"===(0,Jt.A)(this,us)[us].displayOrder?[r,t]:[t,r];(0,Jt.A)(this,as)[as].replaceChildren(...e)}else(0,Jt.A)(this,as)[as].replaceChildren(r);if((0,Jt.A)(this,us)[us].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&&(0,Jt.A)(this,ks)[ks](),(0,Jt.A)(this,ss)[ss].style.display="block"}else(0,Jt.A)(this,ss)[ss].style.display="none"}function qs(e){const{preTrans:t=90}=(0,Jt.A)(this,us)[us],n=e+1e3*t,r=(0,Jt.A)(this,os)[os];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._isDraftTranslation||t.isTranslating||(0,Jt.A)(this,Ls)[Ls](t)}}function Ys(e){return"[Translation failed]"===(null==e?void 0:e.translation)}async function Xs(e){var t;const n=(0,Jt.A)(this,fs)[fs],r=null===(t=(0,Jt.A)(this,ms)[ms])||void 0===t?void 0:t.signal;if(null!=r&&r.aborted)return;const i=t=>{if(!t||n!==(0,Jt.A)(this,fs)[fs])return;if(null!=r&&r.aborted)return;e.translation=st(t),e._isDraftTranslation=!1;const i=(0,Jt.A)(this,Ds)[Ds](1e3*(0,Jt.A)(this,is)[is].currentTime);(0,Jt.A)(this,os)[os][i]===e&&(0,Jt.A)(this,Ps)[Ps](e),this.onSubtitleUpdate&&this.onSubtitleUpdate({start:e.start,end:e.end,text:e.text,translation:e.translation})};e.isTranslating=!0;try{const{fromLang:t,toLang:o,apiSetting:a,docInfo:s,translateVariants:l=!0,prompts:u}=(0,Jt.A)(this,us)[us],c=(0,Oa.a5)(a,u,(0,Jt.A)(this,us)[us]),{trText:d}=await Tn({text:e.text,fromLang:t,toLang:o,apiSetting:c,docInfo:s,translateVariants:l,signal:r,onStreamChunk:e=>{let{text:t}=e;i((e=>Array.isArray(e)?e[0]||"":e||"")(t))}});if(n!==(0,Jt.A)(this,fs)[fs])return;i(d)}catch(t){if(n!==(0,Jt.A)(this,fs)[fs])return;if("AbortError"===(null==t?void 0:t.name))return;ht.vF.info("Translation failed for:",e.text,t),e.translation&&"[Translation failed]"!==e.translation||(e.translation="[Translation failed]"),e._isDraftTranslation=!1}finally{if(n!==(0,Jt.A)(this,fs)[fs])return;e.isTranslating=!1,i(e.translation)}}function $s(){const e=1e3*(0,Jt.A)(this,is)[is].currentTime,t=(0,Jt.A)(this,Ds)[Ds](e);return-1!==t?(0,Jt.A)(this,os)[os][t].start:e}class Js{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>"",{enableHoverLookup:n=!1,autoFavWord:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.videoEl=e,this.i18n=t,this.enableHoverLookup=n,this.autoFavWord=r,this.bilingualSubtitles=[],this.rawSubtitleEvents=[],this.vocabulary=[],this.container=null,this.subtitleTabEl=null,this.subtitleListEl=null,this.vocabularyListEl=null,this.subtitleScrollContainer=null,this._cachedSubtitleItems=[],this.subtitleProgress=0,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._playerResizeObserver=null,this._playerSizeListenerAttached=!1,this._wordTooltipController=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),this.handleWindowResize=this.handleWindowResize.bind(this),document.addEventListener("kiss-add-word",this.handleWordAdded),window.addEventListener("message",this.handleJumpMessage),this.enableHoverLookup&&(Ha(),this._wordTooltipController=new Ja({getVideoContainer:()=>this._getPlayerElement(),getTimestamp:()=>1e3*this.videoEl.currentTime,autoFavWord:this.autoFavWord,i18n:this.i18n}))}handleJumpMessage(e){e.data&&"KISS_TRANSLATOR_JUMP_TO_TIME"===e.data.type&&this.jumpToTime(e.data.time)}handleSubtitleScroll(){var e;null===(e=this._wordTooltipController)||void 0===e||e.clearHoverState(),this._scheduleVirtualRender()}handleContainerMouseEnter(){this.turnOffAutoSub()}handleContainerMouseLeave(){this.turnOnAutoSub()}handleVideoEnded(){this.turnOffAutoSub()}handleVideoPause(){this.turnOffAutoSub()}handleVideoPlay(){this.turnOnAutoSub()}handleWindowResize(){this._syncContainerHeightToPlayer()}initialize(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;this.bilingualSubtitles=e||[],this.rawSubtitleEvents=t||[],this.subtitleProgress=this._normalizeProgress(n),this.bilingualSubtitles.length>0&&(this.createSubtitleList(),this.setupEventListeners())}setBilingualSubtitles(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.subtitleProgress;this.bilingualSubtitles=e||[],this.subtitleProgress=this._normalizeProgress(t),this._updateSubtitleTabLabel(),this.subtitleListEl?this.updateBilingualSubtitles():this.bilingualSubtitles.length>0&&(this.createSubtitleList(),this.setupEventListeners())}_normalizeProgress(e){const t=Number(e);return Number.isFinite(t)?Math.min(100,Math.max(0,Math.round(t))):0}_t(e,t){return this.i18n(e)||t}_updateSubtitleTabLabel(){this.subtitleTabEl&&(this.subtitleTabEl.textContent="".concat(this._t("bilingual_subtitles","双语字幕")," [").concat(this.subtitleProgress,"%]"))}destroy(){var e,t;this.turnOffAutoSub(),this._cancelChunkRender(),this._cancelVirtualRender(),this._removeEventListeners(),null===(e=this._playerResizeObserver)||void 0===e||e.disconnect(),this._playerResizeObserver=null,window.removeEventListener("resize",this.handleWindowResize),this._playerSizeListenerAttached=!1,null===(t=this._wordTooltipController)||void 0===t||t.destroy(),this._wordTooltipController=null,document.removeEventListener("kiss-add-word",this.handleWordAdded),window.removeEventListener("message",this.handleJumpMessage),this.container&&(this.container.remove(),this.container=null),this.subtitleTabEl=null,this.subtitleListEl=null,this.vocabularyListEl=null,this.subtitleScrollContainer=null,this.subtitleListUl=null,this.bilingualSubtitles=[],this.rawSubtitleEvents=[],this._cachedSubtitleItems=[],this._virtualHeights=[],this._virtualOffsets=[0],this._pendingCenterIndex=-1,this._pendingSubtitleTabScrollIndex=-1,this.subtitleProgress=0,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",t=yt(this.bilingualSubtitles);(0,l.Qv)(t,"kiss-subtitles-".concat(e,"_").concat(Date.now(),".vtt"))}catch(e){ht.vF.error("Youtube Provider: download subtitles error:",e)}else ht.vF.info("Youtube Provider: No subtitles to download")}downloadTranslationOnlySubtitles(){if(this.bilingualSubtitles&&0!==this.bilingualSubtitles.length)try{const e=this._getYouTubeVideoId()||"video",t=function(e){if(!Array.isArray(e))return"WEBVTT";const t=e.map((e,t)=>{const n=vt(e.start),r=vt(e.end),i=t+1,o="".concat(n," --\x3e ").concat(r),a=e.translation||e.text||"";return"".concat(i,"\n").concat(o,"\n").concat(a)});return["WEBVTT",...t].join("\n\n")}(this.bilingualSubtitles);(0,l.Qv)(t,"kiss-subtitles-translation-".concat(e,"_").concat(Date.now(),".vtt"))}catch(e){ht.vF.error("Youtube Provider: download translation subtitles error:",e)}else ht.vF.info("Youtube Provider: No subtitles to download")}downloadRawSubtitleEvents(){if(this.rawSubtitleEvents&&0!==this.rawSubtitleEvents.length)try{const e=this._getYouTubeVideoId()||"video",t=JSON.stringify(this.rawSubtitleEvents,null,2);(0,l.Qv)(t,"kiss-subtitles-raw-".concat(e,"_").concat(Date.now(),".json"))}catch(e){ht.vF.error("Youtube Provider: download raw subtitles error:",e)}else ht.vF.info("Youtube Provider: No raw subtitle events 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:"600px",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(0,a.C$)(),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.vF.info("failed to apply subtitle list theme vars",e)}})()}this._syncContainerHeightToPlayer(),this._observePlayerSize()}_getPlayerElement(){var e;return(null===(e=this.videoEl)||void 0===e?void 0:e.closest(".html5-video-player"))||this.videoEl}_syncContainerHeightToPlayer(){var e;if(!this.container)return;const t=this._getPlayerElement(),n=null==t||null===(e=t.getBoundingClientRect)||void 0===e?void 0:e.call(t).height;if(!Number.isFinite(n)||n<=0)return;const r="".concat(Math.round(n),"px");this.container.style.height=r,this.container.style.maxHeight=r}_observePlayerSize(){const e=this._getPlayerElement();e&&!this._playerSizeListenerAttached&&(window.addEventListener("resize",this.handleWindowResize),this._playerSizeListenerAttached=!0,"function"==typeof ResizeObserver&&(this._playerResizeObserver=new ResizeObserver(()=>{this._syncContainerHeightToPlayer()}),this._playerResizeObserver.observe(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");this.subtitleTabEl=t,this._updateSubtitleTabLabel();const n=document.createElement("button");n.textContent=this._t("vocabulary_book","生词本");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.textContent="×",i.title=this._t("close","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; gap: 8px; flex-shrink: 0;";const s=document.createElement("button");s.textContent=this._t("download_subtitles_vtt","下载字幕 (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));const l=document.createElement("button");l.textContent=this._t("download_raw_subtitle_events_json","下载源数据 (JSON)"),l.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;",l.addEventListener("mouseenter",()=>{try{const e=getComputedStyle(this.container).getPropertyValue("--kt-btn-hover-bg");e&&(l.style.background=e),l.style.transform="translateY(-1px)"}catch(e){}}),l.addEventListener("mouseleave",()=>{try{const e=getComputedStyle(this.container).getPropertyValue("--kt-btn-bg");e&&(l.style.background=e),l.style.transform="translateY(0)"}catch(e){}}),l.addEventListener("click",this.downloadRawSubtitleEvents.bind(this));const u=document.createElement("button");u.textContent=this._t("download_translation_subtitles_vtt","下载译文字幕 (VTT)"),u.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;",u.addEventListener("mouseenter",()=>{try{const e=getComputedStyle(this.container).getPropertyValue("--kt-btn-hover-bg");e&&(u.style.background=e),u.style.transform="translateY(-1px)"}catch(e){}}),u.addEventListener("mouseleave",()=>{try{const e=getComputedStyle(this.container).getPropertyValue("--kt-btn-bg");e&&(u.style.background=e),u.style.transform="translateY(0)"}catch(e){}}),u.addEventListener("click",this.downloadTranslationOnlySubtitles.bind(this)),a.append(s,u,l),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 c=document.createElement("ul");c.style.cssText="list-style-type: none; padding: 0; margin: 0; position: relative;",this.subtitleListUl=c,this.subtitleScrollContainer.appendChild(c),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="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; cursor: pointer;",r.addEventListener("click",n=>{n.stopPropagation(),this.jumpToTime(e.start,t)});const i=document.createElement("div");i.style.cssText="flex-grow: 1;";const o=document.createElement("div");var a;(o.className="kiss-youtube-original",o.style.cssText="color: var(--kt-text); font-size: 14px; line-height: 1.4; margin-bottom: 4px;",this.enableHoverLookup)?(o.innerHTML=at.createHTML(Va(e.text||"")),null===(a=this._wordTooltipController)||void 0===a||a.attachSpanListeners(o,()=>e.start)):o.textContent=e.text||"";const s=document.createElement("div");return s.className="kiss-youtube-translation",s.textContent=e.translation||"",s.style.display=e.translation?"block":"none",s.style.cssText="color: var(--kt-subtext); font-size: 13px; line-height: 1.4; font-style: italic; min-height: 18px;",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(s),n.appendChild(r),n.appendChild(i),n._translationEl=s,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");r.textContent=e.word,r.style.cssText="color: var(--kt-text); font-weight: bold; font-size: 16px;",n.appendChild(r);const i=Ua({word:e.word,data:{timestamp:e.timestamp,phonetic:e.phonetic,definition:e.definition,examples:e.examples},i18n:this.i18n});if(i.style.marginLeft="auto",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(n.appendChild(i),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=(0,r.A)({},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){const r=new Blob([e],{type:t});(0,l.Qv)(r,"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 Qs(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=W(e),i=W(t);if(r&&i)return U(r,i,n);const o=String(e||"").trim().replaceAll("_","-").toLowerCase(),a=String(t||"").trim().replaceAll("_","-").toLowerCase();return!(!o||!a)&&(n?o===a:o.split("-")[0]===a.split("-")[0])}function Zs(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)}let el=null;async function tl(e){var t,n,r;if((null===(t=el)||void 0===t?void 0:t.videoId)===e)return el.promise;const i=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.vF.info("Youtube Provider: get captionTracks",e),{}}}(e);el={videoId:e,promise:i};const o=await i;return null!==(n=o.captionTracks)&&void 0!==n&&n.length||(null===(r=el)||void 0===r?void 0:r.promise)!==i||(el=null),o}var nl=i(6604);const rl={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 il{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 ol{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 al{constructor(e,t,n,r,i,o,a,s,l,u,c,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=u,this.mad=c,this.robustSigma=d||1.4826*c}}class sl{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 ll(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 ul(e,t,n,r){if(!e.length||!t.length)return[];const{maxDurationMs:i,maxWords:o,minBoundaryScore:a,minSentenceWords:s,minSentenceDurationMs:l,forceBreakOnPunctuation:u,forcePunctuationMinWords:c,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 u=e.gapMs,c=e.prevWord,d=e.nextWord;c.endsWithSentencePunc&&(l+=i),c.endsWithComma&&(l+=o),d.startsWithCapital&&!d.isAllCaps&&(l+=a),c.endsWithSentencePunc&&d.startsWithCapital&&!d.isAllCaps&&(l+=.4*i);let h=0,p=0;t.std>0&&(h=(u-t.mean)/t.std),t.robustSigma>0&&(p=(u-t.median)/t.robustSigma);const f=Math.min(h,p);l+=Math.max(0,f)*r;const m=s&&s.has(u)&&e.isSameEvent?.4:1;return u>=t.p75&&(l+=.5*m),u>=t.p90&&(l+=1*m),u>=t.p95&&(l+=1.5*m),u>=500&&(l+=.3),u>=800&&(l+=.5),u>=1500&&(l+=1),u>=3e3&&(l+=1.5),e.isYoutubeBreak&&(l+=.8),e.isSameEvent?l-=1:l+=.3,l}(e,n,r)),p=[];let f=0,m=-1,g=-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,A=n+1-f+1;if(y.startsWithArrow&&b>=Math.min(l,100)&&A>=s){p.push(n+1),f=n+1,m=-1,g=-1/0;continue}if(u&&v.endsWithSentencePunc&&y.startsWithCapital&&!y.isAllCaps&&A>=Math.max(c,s)&&b>=d&&e.length-(n+1)>=s){p.push(n+1),f=n+1,m=-1,g=-1/0;continue}const x=e[n].endMs-e[f].startMs;r>g&&n-f+1>0&&x>=l&&(g=r,m=n);let w=!1;if((b>=i||A>=o)&&(w=!0),w){const e=m>=0?m:n;p.push(e+1),f=e+1,m=-1,g=-1/0;continue}if(!(A<s)&&r>=a){let e=a;t[n].isSameEvent&&(e=1.5*a),v.endsWithSentencePunc&&A<c&&(e=1/0),r>=e&&(p.push(n+1),f=n+1,m=-1,g=-1/0)}}return Array.from(new Set(p)).sort((e,t)=>e-t)}function cl(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 sl(t,t[0].startMs,t[t.length-1].endMs,s.length))}return s}function dl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,r.A)((0,r.A)({},rl),t),{words:i,gaps:o,wordEventIds:a}=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||(0,nl.b)(l))continue;const u=t+(s.tOffsetMs||0);let c;c=e+1<a.length?t+(a[e+1].tOffsetMs||0):o,n.push(new il(l,u,c)),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 ol(s,t,i,l,r[e]===r[e+1],e))}return{words:n,gaps:a,wordEventIds:r}}(e);if(!i.length)return[];const s=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,o,a),l=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 al(0,0,0,0,0,0,0,0,0,0,0,0);const i=n.reduce((e,t)=>e+t,0)/r,o=ll(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],u=ll(n,25),c=o,d=ll(n,75),h=ll(n,90),p=ll(n,95),f=n.map(e=>Math.abs(e-o)).sort((e,t)=>e-t),m=f.length?ll(f,50):0;return new al(i,o,a,s,l,u,c,d,h,p,m,1.4826*m)}(o,s.size?s:null),u=(0,r.A)((0,r.A)({},n),{},{defaultFillValues:s.size?s:null});let c=ul(i,o,l,u);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}(i,c,u);const d=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 sl(a,s,l,i.length))}const a=[];for(const e of i)e.durationMs<=r?a.push(e):a.push(...cl(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}(i,c,u);return d.map(e=>({text:e.text,start:e.startMs,end:e.endMs}))}function hl(){return String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/<[^>]+>/g,"").replace(/\u200B/g,"").trim().replace(/\s+/g," ")}function pl(){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 u=()=>{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 c=/[.?!…\])]$/.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,m=/^[[(♪]/.test(e.text),g=t&&o[1].has(e.text.toLowerCase().split(" ")[0])&&s.length>1;(c||h||p||f||m||g)&&u()}s.push(e),l+=e.text.split(/\s+/).length}),u(),a}function fl(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.vF.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,i=1e3;for(const o of e)if(o.text){n&&o.start-n.end>i&&(t.push(n),n=null),n?(n.text+=o.text,n.end=o.end):n={text:o.text,start:o.start,end:o.end};(/[。!?.!?…][”’"'」』】)》)\]]*$/.test(o.text)||n.text.length>=r)&&(t.push(n),n=null)}else n&&(t.push(n),n=null);return n&&t.push(n),t}let r=pl({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.vF.debug("Youtube Provider: re-processing long sentence with pause",{length:t.text.length,text:t.text.slice(0,50)+"..."});const e=pl({flatEvents:n,usePause:!0});i.push(...e)}else i.push(t)}else i.push(t);return r=i,r}function ml(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(){let{events:e=[],flatEvents:t=[],fromLang:n="auto",mode:r="rule",longSentenceThreshold:i=120}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=e=>(e||[]).map(e=>({start:e.start,end:e.end,text:e.text,translation:e.translation||""}));if("statistical"===r){ht.vF.info("Youtube Provider: Sentence break mode: STATISTICAL");const t=function(e){try{return dl({events:e}).map(e=>({text:e.text,start:e.start,end:e.end,translation:""}))}catch(e){return ht.vF.info("Youtube Provider: Error in algorithmic segmentation",e),null}}(e);if(null!=t&&t.length)return o(t);ht.vF.info("Youtube Provider: Statistical segmentation returned empty, falling back to rule")}return ht.vF.info("Youtube Provider: Sentence break mode: RULE"),o(fl(t,n,{longSentenceThreshold:i}))}({events:e,flatEvents:t,fromLang:n,mode:r.useAlgorithmBreaker,longSentenceThreshold:r.longSentenceThreshold})}function gl(e,t){const n=Array.isArray(e)?e:[];if(!n.some(e=>Number.isInteger(null==e?void 0:e._ei)||Number.isInteger(null==e?void 0:e._alignedEi)))return{cues:n,coveredEnd:n.length?t-1:-1,verifiable:!1};const r=[];let i=0;for(const e of n){var o,a;const n=null!==(o=e._alignedSi)&&void 0!==o?o:e._si,s=null!==(a=e._alignedEi)&&void 0!==a?a:e._ei;if(!Number.isInteger(n)||!Number.isInteger(s)||n!==i||s<n||s>=t)break;r.push(e),i=s+1}return{cues:r,coveredEnd:i-1,verifiable:!0}}function vl(e,t){return t?(e||[]).map(e=>(0,r.A)((0,r.A)({},e),{},{_isDraftTranslation:!0})):e||[]}function yl(e,t,n,r){const i=[...e||[]].sort((e,t)=>e.start-t.start),o=i.some((e,t)=>{const n=Number(e.start),r=Number(e.end),o=i[t-1];return!String(e.text||"").trim()||!Number.isFinite(n)||!Number.isFinite(r)||r<=n||o&&n<Number(o.end)}),a=e=>(e||[]).map(e=>String((null==e?void 0:e.text)||"")).join("").toLowerCase().replace(/(?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u065F\u066A-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07BF\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u0890-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0965\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09E5\u09F2\u09F3\u09FA\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A65\u0A70\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AE5\u0AF0-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B65\u0B70\u0B78-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0BE5\u0BF3-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5E\u0C5F\u0C62-\u0C65\u0C70-\u0C77\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDB\u0CDF\u0CE2-\u0CE5\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57\u0D62-\u0D65\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DE5\u0DF0-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F1F\u0F34-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u104A-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u1368\u137D-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u17DF\u17EA-\u17EF\u17FA-\u180F\u181A-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19FF\u1A17-\u1A1F\u1A55-\u1A7F\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B4F\u1B5A-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BFF\u1C24-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C8B-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u206F\u2072\u2073\u207A-\u207E\u208A-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A-\u245F\u249C-\u24E9\u2500-\u2775\u2794-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFC\u2CFE\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3008-\u3020\u302A-\u3030\u3036\u3037\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u3191\u3196-\u319F\u31C0-\u31EF\u3200-\u321F\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6F0-\uA716\uA720\uA721\uA789\uA78A\uA7DD-\uA7F0\uA802\uA806\uA80B\uA823-\uA82F\uA836-\uA83F\uA874-\uA881\uA8B4-\uA8CF\uA8DA-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9DA-\uA9DF\uA9E5\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD06\uDD34-\uDD3F\uDD79-\uDD89\uDD8C-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEE0\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDBF\uDDF4-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC57\uDC77\uDC78\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1F\uDD3A-\uDD3F\uDD5A-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE3F\uDE49-\uDE5F\uDE7F\uDEA0-\uDEBF\uDEC8\uDEE5-\uDEEA\uDEF0-\uDEFF\uDF36-\uDF3F\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD24-\uDD2F\uDD3A-\uDD3F\uDD66-\uDD6E\uDD86-\uDE5F\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEC1\uDEC8-\uDEFF\uDF28-\uDF2F\uDF46-\uDF50\uDF55-\uDF6F\uDF82-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC51\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDD02\uDD27-\uDD35\uDD40-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDCF\uDDDB\uDDDD-\uDDE0\uDDF5-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDEEF\uDEFA-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDF7F\uDF8A\uDF8C\uDF8D\uDF8F\uDFB6\uDFB8-\uDFD0\uDFD2\uDFD4-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC4F\uDC5A-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEBF\uDECA-\uDECF\uDEE4-\uDEFF\uDF1B-\uDF2F\uDF3C-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFBF\uDFE1-\uDFEF\uDFFA-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC4F\uDC6D-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDD9F\uDDAA-\uDDAF\uDDDC-\uDDDF\uDDEA-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDF4F\uDF5A-\uDFAF\uDFB1-\uDFBF\uDFD5-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD812-\uD817\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD836\uD83D\uD83F\uD87C\uD87D\uD87F\uD88E-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDC5F]|\uD810[\uDFFB-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD818[\uDC00-\uDCFF\uDD1E-\uDD2F\uDD3A-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6F\uDEBF\uDECA-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDD3F\uDD6D-\uDD6F\uDD7A-\uDE3F\uDE97-\uDE9F\uDEB9\uDEBA\uDED4-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFF1\uDFF7-\uDFFF]|\uD823[\uDCD6-\uDCFE\uDD1F-\uDD7F\uDDF3-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD833[\uDC00-\uDCEF\uDCFA-\uDFFF]|\uD834[\uDC00-\uDEBF\uDED4-\uDEDF\uDEF4-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDEEF\uDEFA-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDCEF\uDCFA-\uDDCF\uDDEE\uDDEF\uDDFB-\uDEBF\uDEDF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5-\uDEFD\uDF00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD0-\uDCFF\uDD44-\uDD4A\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCAC\uDCB0\uDCB5-\uDD00\uDD2E\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEAE\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD88D[\uDC7A-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,""),s=a(i)!==a(t);return o||s?(ht.vF.info("Youtube Provider: AI result validation failed, falling back"),r(t,n).sort((e,t)=>e.start-t.start)):i}async function bl(e){let{videoId:t,fromLang:n,toLang:i,chunkEvents:o,segApiSetting:a,apiSubtitle:s,docInfo:l,formatSubtitles:u,clearSegmentTranslation:c,onSubtitleChunk:d,signal:h,setting:p}=e;const f=(o||[]).filter(e=>null==e?void 0:e.text);if(!f.length)return[];try{const e="".concat(f[0].start," --\x3e ").concat(f[f.length-1].end);ht.vF.debug("Youtube Provider: aiSegment events",{videoId:t,chunkSign:e,fromLang:n,toLang:i,segmentEvents:f});const o=(0,Oa.a5)(a,null==p?void 0:p.prompts,p),v=await s({videoId:t,chunkSign:e,fromLang:n,toLang:i,events:f,apiSetting:o,docInfo:l,signal:h,onSubtitleChunk:e=>{let{subtitles:t}=e;if(null==t||!t.length||!d)return;const n=c?t.map(e=>(0,r.A)((0,r.A)({},e),{},{_isDraftTranslation:!0})):t;d({subtitles:n})}});if(ht.vF.debug("Youtube Provider: aiSegment subtitles",v),Array.isArray(v)){const e=gl(vl(v,c),f.length);if(!e.verifiable||e.coveredEnd===f.length-1)return yl(e.cues,f,n,u);const a=e.coveredEnd+1,d=f.slice(a);let p={cues:[],coveredEnd:-1,verifiable:!0};try{const e="".concat(d[0].start," --\x3e ").concat(d[d.length-1].end);p=gl(vl(await s({videoId:t,chunkSign:e,fromLang:n,toLang:i,events:d,apiSetting:o,docInfo:l,signal:h}),c),d.length)}catch(e){ht.vF.info("Youtube Provider: ai tail retry",e)}const y=(m=p.cues,g=a,(m||[]).map(e=>(0,r.A)((0,r.A)({},e),{},{_si:Number.isInteger(e._si)?e._si+g:e._si,_ei:Number.isInteger(e._ei)?e._ei+g:e._ei,_alignedSi:Number.isInteger(e._alignedSi)?e._alignedSi+g:e._alignedSi,_alignedEi:Number.isInteger(e._alignedEi)?e._alignedEi+g:e._alignedEi}))),b=p.verifiable?a+p.coveredEnd+1:f.length,A=f.slice(b),x=A.length?u(A,n):[];return yl([...e.cues,...y,...x],f,n,u)}}catch(e){ht.vF.info("Youtube Provider: ai segmentation",e)}var m,g;return u(f,n).sort((e,t)=>e.start-t.start)}async function Al(e){let{videoId:t,events:n,flatEvents:r,fromLang:i,setting:o,processingVersion:a,isStaleProcessing:s,showNotification:l,i18n:u,apiSubtitle:c,docInfo:d,builtinSegment:h,formatSubtitles:p,onAppendSubtitles:f,getCurrentVideoId:m,signal:g}=e;const{segSlug:v,transApis:y,chunkLength:b,toLang:A}=o,x=null==y?void 0:y.find(e=>e.apiSlug===v),w=v&&"-"!==v&&x,k=o.forceSubtitleRetranslate&&(null==x?void 0:x.apiSlug)!==o.apiSlug;if(w){if(s(a))return[[],0];ht.vF.info("Youtube Provider: Starting AI segmentation..."),l(u("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=Math.max(1,Number(t)||1e3),a=Math.floor(.8*o),s=()=>{r.length&&(n.push(r),r=[],i=0)};for(let t=0;t<e.length;t++){const n=e[t],l=String((null==n?void 0:n.text)||"").length;if(r.length&&i+l>o&&s(),r.push(n),i+=l,t!==e.length-1&&i>=a){const r=/[.?!…\])]$/.test(n.text),i=e[t+1].start-n.end;(r||i>1e3)&&s()}}return s(),n}(r,b);if(0===e.length)return ht.vF.info("Youtube Provider: AI no chunks, falling back to built-in"),[h(n,r,i,o),100];const v=e[0],y=Math.floor(100/e.length),w=await bl({videoId:t,chunkEvents:v,fromLang:i,toLang:A,segApiSetting:x,apiSubtitle:c,docInfo:d,formatSubtitles:p,clearSegmentTranslation:k,signal:g,setting:o,onSubtitleChunk:e=>{let{subtitles:n}=e;null!=n&&n.length&&!s(a)&&t===m()&&f({subtitles:n,progressed:y,chunkNum:1})}});if(s(a))return[[],0];if(null==w||!w.length)return ht.vF.info("Youtube Provider: AI failed, falling back to built-in"),[h(n,r,i,o),100];if(ht.vF.info("Youtube Provider: Sentence break mode: AI"),1===e.length)return[w,100];const S=function(e){let{chunks:t,firstDoneIndex:n=-1,videoId:r,fromLang:i,toLang:o,segApiSetting:a,setting:s,processingVersion:l,isStaleProcessing:u,apiSubtitle:c,docInfo:d,formatSubtitles:h,clearSegmentTranslation:p,onAppendSubtitles:f,getCurrentVideoId:m,signal:g}=e;const v=t.map(()=>"pending");n>=0&&(v[n]="done");let y=!1,b=null;const A=()=>{const e=v.filter(e=>"done"===e||"failed"===e).length;return Math.floor(100*e/t.length)},x=(e,t,n)=>{const r=e[0],i=e[e.length-1];return!(!r||!i)&&(i.end>=t&&r.start<=n)},w=()=>{if(!b)return-1;const{currentTimeMs:e,endTimeMs:n}=b;return t.findIndex((t,r)=>"pending"===v[r]&&x(t,e,n))},k=async e=>{var n,y;if(u(l))return void ht.vF.info("Youtube Provider: Skip stale chunk processing.");const b=t[e],x=e+1;v[e]="processing",ht.vF.debug("Youtube Provider: Processing subtitle chunk ".concat(x,"/").concat(t.length,": ").concat(null===(n=b[0])||void 0===n?void 0:n.start," --\x3e ").concat(null===(y=b[b.length-1])||void 0===y?void 0:y.start));let w=[];try{const e=await bl({videoId:r,chunkEvents:b,fromLang:i,toLang:o,segApiSetting:a,apiSubtitle:c,docInfo:d,formatSubtitles:h,clearSegmentTranslation:p,signal:g,setting:s,onSubtitleChunk:e=>{let{subtitles:t}=e;null!=t&&t.length&&r===m()&&!u(l)&&f({subtitles:t,progressed:A(),chunkNum:x})}});if(u(l))return;(null==e?void 0:e.length)>0?w=e:(ht.vF.debug("Youtube Provider: AI segmentation for chunk ".concat(x," returned no data.")),w=h(b,i))}catch(t){v[e]="failed",w=h(b,i)}if(r!==m()||u(l))ht.vF.info("Youtube Provider: videoId changed or track replaced!",r,m());else if("failed"!==v[e]&&(v[e]="done"),w.length>0){const e=A();ht.vF.debug("Youtube Provider: Appending ".concat(w.length," subtitles from chunk ").concat(x," (").concat(e,"%).")),f({subtitles:w,progressed:e,chunkNum:x})}else ht.vF.debug("Youtube Provider: Chunk ".concat(x," no subtitles."))},S=async()=>{if(!y){y=!0;try{for(;;){if(null!=g&&g.aborted||u(l))return;const e=w();if(-1===e)return;await k(e)}}finally{y=!1}}};return{scheduleUntil(e){return b={currentTimeMs:e,endTimeMs:e+1e3*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:90)},S()}}}({chunks:e,firstDoneIndex:0,videoId:t,fromLang:i,toLang:A,segApiSetting:x,setting:o,processingVersion:a,isStaleProcessing:s,apiSubtitle:c,docInfo:d,formatSubtitles:p,clearSegmentTranslation:k,onAppendSubtitles:f,getCurrentVideoId:m,signal:g});return[w,Math.floor(100/e.length),S]}return[h(n,r,i,o),100]}var xl=i(8661),wl=i(6811),kl=i(457),Sl=i(5449),El=i(5089),Cl=(0,Qt.A)("hostElement"),_l=(0,Qt.A)("reactRoot"),Tl=(0,Qt.A)("isVisible"),Dl=(0,Qt.A)("isProcessing"),Pl=(0,Qt.A)("mount");class Il{constructor(e){let{id:t,className:n="",reactComponent:r,props:i={},rootElement:o=document.body}=e;if(Object.defineProperty(this,Pl,{value:Fl}),Object.defineProperty(this,Cl,{writable:!0,value:null}),Object.defineProperty(this,_l,{writable:!0,value:null}),Object.defineProperty(this,Tl,{writable:!0,value:!1}),Object.defineProperty(this,Dl,{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(0,Jt.A)(this,Tl)[Tl]}show(e){if(!(0,Jt.A)(this,Tl)[Tl]&&!(0,Jt.A)(this,Dl)[Dl]){if(!(0,Jt.A)(this,Cl)[Cl]){(0,Jt.A)(this,Dl)[Dl]=!0;try{(0,Jt.A)(this,Pl)[Pl](e||this._props)}catch(e){return ht.vF.warn('Failed to mount component with id "'.concat(this._id,'":'),e),void((0,Jt.A)(this,Dl)[Dl]=!1)}finally{(0,Jt.A)(this,Dl)[Dl]=!1}}(0,Jt.A)(this,Cl)[Cl].style.display="",(0,Jt.A)(this,Tl)[Tl]=!0}}hide(){(0,Jt.A)(this,Tl)[Tl]&&(0,Jt.A)(this,Cl)[Cl]&&((0,Jt.A)(this,Cl)[Cl].style.display="none",(0,Jt.A)(this,Tl)[Tl]=!1)}destroy(){(0,Jt.A)(this,Cl)[Cl]&&((0,Jt.A)(this,Dl)[Dl]=!0,(0,Jt.A)(this,_l)[_l]&&(0,Jt.A)(this,_l)[_l].unmount(),(0,Jt.A)(this,Cl)[Cl].remove(),(0,Jt.A)(this,Cl)[Cl]=null,(0,Jt.A)(this,_l)[_l]=null,(0,Jt.A)(this,Tl)[Tl]=!1,(0,Jt.A)(this,Dl)[Dl]=!1,ht.vF.info('Component with id "'.concat(this._id,'" has been destroyed.')))}toggle(e){(0,Jt.A)(this,Tl)[Tl]?this.hide():this.show(e||this._props)}updateProps(e){if((0,Jt.A)(this,_l)[_l]&&(0,Jt.A)(this,Cl)[Cl]){const t=this._ReactComponent,n=(0,Sl.A)({key:this._id,prepend:!0});(0,Jt.A)(this,_l)[_l].render((0,El.jsx)(xl.StrictMode,{children:(0,El.jsx)(kl.C,{value:n,children:(0,El.jsx)(t,(0,r.A)({},e))})}))}}}function Fl(e){const t=document.createElement("div");t.id=this._id,this._className&&(t.className=this._className),this._rootElement.appendChild(t),(0,Jt.A)(this,Cl)[Cl]=t;const n=(0,Sl.A)({key:this._id,prepend:!0}),i=(0,r.A)((0,r.A)({},e),{},{onClose:this.hide.bind(this)}),o=this._ReactComponent;(0,Jt.A)(this,_l)[_l]=wl.createRoot(t),(0,Jt.A)(this,_l)[_l].render((0,El.jsx)(xl.StrictMode,{children:(0,El.jsx)(kl.C,{value:n,children:(0,El.jsx)(o,(0,r.A)({},i))})}))}function Ll(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 zl(){const e=Ll("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=Ll("circle",{fill:"#209CEE",stroke:"none",cx:t.cx,cy:"50",r:"6"}),r=Ll("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:t.values,repeatCount:"indefinite",begin:t.begin});n.appendChild(r),e.appendChild(n)}),e}function Ol(){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=Ll("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=Ll("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)"}),u=Ll("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(u),i}function Nl(e){let{children:t}=e;return(0,El.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t})}function jl(e){let{children:t,onClick:n,disabled:r=!1}=e;const[i,o]=(0,xl.useState)(!1);return(0,El.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 Rl(e){let{label:t,name:n,value:r,onChange:i,disabled:o}=e;const a=(0,xl.useCallback)(()=>{o||i({name:n,value:!r})},[o,i,n,r]);return(0,El.jsxs)(jl,{onClick:a,disabled:o,children:[(0,El.jsx)(Nl,{children:t}),(0,El.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,El.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 Ml(e){let{label:t,name:n,value:r,options:i,onChange:o,disabled:a}=e;const[s,l]=(0,xl.useState)(!1),u=(0,xl.useMemo)(()=>i.find(e=>e.value===r)||i[0],[i,r]),c=(0,xl.useCallback)(()=>{a||l(e=>!e)},[a]),d=(0,xl.useCallback)(e=>{o({name:n,value:e}),l(!1)},[o,n]);return(0,El.jsxs)("div",{style:{position:"relative"},children:[(0,El.jsxs)(jl,{onClick:c,disabled:a,children:[(0,El.jsx)(Nl,{children:t}),(0,El.jsx)("div",{style:{fontSize:12,opacity:.8,maxWidth:130,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null==u?void 0:u.label)||""})]}),s&&(0,El.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,El.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 Bl(e){let{label:t,onClick:n,disabled:r}=e;const i=(0,xl.useCallback)(()=>{r||n()},[r,n]);return(0,El.jsx)(jl,{onClick:i,disabled:r,children:(0,El.jsx)(Nl,{children:t})})}function Wl(e){let{i18n:t,formData:n,progressed:r=0,updateSetting:i,downloadSubtitle:a,transApis:s}=e;const l=(0,xl.useCallback)(e=>{let{name:t,value:n}=e;i({name:t,value:n})},[i]),u=(0,xl.useMemo)(()=>(s||[]).filter(e=>!e.isDisabled),[s]),c=(0,xl.useMemo)(()=>u.filter(e=>o.sNP.ai.has(e.apiType)),[u]),d=(0,xl.useMemo)(()=>{const e=[{value:"-",label:t("disable")||"禁用"}];return c.forEach(t=>{e.push({value:t.apiSlug,label:t.apiName})}),e},[c,t]),h=(0,xl.useMemo)(()=>{const e=[{value:"-",label:t("disable")||"禁用"}];return c.forEach(t=>{e.push({value:t.apiSlug,label:t.apiName})}),e},[c,t]),p=(0,xl.useMemo)(()=>t(0===r?"waiting_subtitles":100===r?"download_subtitles":"processing_subtitles"),[r,t]),{segSlug:f,skipAd:m,isBilingual:g,blurTranslation:v,autoTranslate:y,aiContextSlug:b}=n;return(0,El.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,El.jsx)(Rl,{onChange:l,name:"autoTranslate",value:y,label:t("enable_subtitle_translate")}),(0,El.jsx)(Ml,{onChange:l,name:"segSlug",value:f||"-",options:d,label:t("ai_segmentation"),disabled:d.length<=1}),(0,El.jsx)(Ml,{onChange:l,name:"aiContextSlug",value:b||"-",options:h,label:t("ai_enhanced_context"),disabled:h.length<=1}),(0,El.jsx)(Rl,{onChange:l,name:"isBilingual",value:g,label:t("is_bilingual_view")}),(0,El.jsx)(Rl,{onChange:l,name:"blurTranslation",value:v,label:t("is_blur_translation")}),(0,El.jsx)(Rl,{onChange:l,name:"skipAd",value:m,label:t("is_skip_ad")}),(0,El.jsx)(Bl,{label:"".concat(p," [").concat(r,"%] "),onClick:a})]})}const Ul=".ytp-right-controls",Hl="#ytp-caption-window-container",Vl="button.ytp-subtitles-button";function Gl(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 Kl=(0,Qt.A)("getSetting"),ql=(0,Qt.A)("getMenuProps"),Yl=(0,Qt.A)("getVideoEl"),Xl=(0,Qt.A)("toggleButton"),$l=(0,Qt.A)("isMenuShow"),Jl=(0,Qt.A)("menuManager"),Ql=(0,Qt.A)("notificationEl"),Zl=(0,Qt.A)("notificationTimeout");class eu{constructor(e){let{getSetting:t,getMenuProps:n,getVideoEl:r}=e;Object.defineProperty(this,Kl,{writable:!0,value:void 0}),Object.defineProperty(this,ql,{writable:!0,value:void 0}),Object.defineProperty(this,Yl,{writable:!0,value:void 0}),Object.defineProperty(this,Xl,{writable:!0,value:null}),Object.defineProperty(this,$l,{writable:!0,value:!1}),Object.defineProperty(this,Jl,{writable:!0,value:null}),Object.defineProperty(this,Ql,{writable:!0,value:null}),Object.defineProperty(this,Zl,{writable:!0,value:null}),(0,Jt.A)(this,Kl)[Kl]=t,(0,Jt.A)(this,ql)[ql]=n,(0,Jt.A)(this,Yl)[Yl]=r}updateMenuProps(){(0,Jt.A)(this,Jl)[Jl]&&(0,Jt.A)(this,$l)[$l]&&(0,Jt.A)(this,Jl)[Jl].updateProps((0,Jt.A)(this,ql)[ql]())}injectToggleButton(e){if(!0===(0,Jt.A)(this,Kl)[Kl]().hideSubtitleButton||!e||e.querySelector(".kiss-subtitle-button"))return;const t=document.createElement("div");t.className="notranslate kiss-subtitle-controls",Object.assign(t.style,{height:"100%",position:"relative"});const n=document.createElement("button");n.className="ytp-button kiss-subtitle-button",n.title=o.C39,n.appendChild(Ol()),t.appendChild(n),(0,Jt.A)(this,Jl)[Jl]=new Il({id:"kiss-subtitle-menus",className:"notranslate",reactComponent:Wl,rootElement:t,props:(0,Jt.A)(this,ql)[ql]()}),n.onclick=()=>{var e,t;(0,Jt.A)(this,$l)[$l]?((0,Jt.A)(this,$l)[$l]=!1,null===(e=(0,Jt.A)(this,Xl)[Xl])||void 0===e||e.replaceChildren(Ol()),(0,Jt.A)(this,Jl)[Jl].hide()):((0,Jt.A)(this,$l)[$l]=!0,null===(t=(0,Jt.A)(this,Xl)[Xl])||void 0===t||t.replaceChildren(Ol({isSelected:!0})),(0,Jt.A)(this,Jl)[Jl].show(),this.updateMenuProps())},(0,Jt.A)(this,Xl)[Xl]=n,null==e||e.prepend(t)}removeToggleButton(){var e,t;(0,Jt.A)(this,$l)[$l]=!1,null===(e=(0,Jt.A)(this,Jl)[Jl])||void 0===e||e.destroy(),(0,Jt.A)(this,Jl)[Jl]=null;const n=(null===(t=(0,Jt.A)(this,Xl)[Xl])||void 0===t?void 0:t.closest(".kiss-subtitle-controls"))||document.querySelector(".kiss-subtitle-controls");null==n||n.remove(),(0,Jt.A)(this,Xl)[Xl]=null}hideYtCaption(){const e=document.querySelector(Hl);e&&(e.style.top="-10000px")}showYtCaption(){const e=document.querySelector(Hl);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=(0,Jt.A)(this,Yl)[Yl](),r=null==n||null===(e=n.parentElement)||void 0===e?void 0:e.parentElement;r&&(r.appendChild(t),(0,Jt.A)(this,Ql)[Ql]=t)}hideNotification(){clearTimeout((0,Jt.A)(this,Zl)[Zl]),(0,Jt.A)(this,Ql)[Ql]&&((0,Jt.A)(this,Ql)[Ql].style.opacity="0")}showNotification(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3;!1!==(0,Jt.A)(this,Kl)[Kl]().showLoadNotification?((0,Jt.A)(this,Ql)[Ql]||this.createNotificationElement(),(0,Jt.A)(this,Ql)[Ql]&&((0,Jt.A)(this,Ql)[Ql].textContent=e,(0,Jt.A)(this,Ql)[Ql].style.opacity="1",clearTimeout((0,Jt.A)(this,Zl)[Zl]),(0,Jt.A)(this,Zl)[Zl]=setTimeout(()=>{this.hideNotification()},t))):this.hideNotification()}}var tu=(0,Qt.A)("setting"),nu=(0,Qt.A)("defaultAutoTranslate"),ru=(0,Qt.A)("subtitles"),iu=(0,Qt.A)("events"),ou=(0,Qt.A)("rawSubtitleEvents"),au=(0,Qt.A)("flatEvents"),su=(0,Qt.A)("progressedNum"),lu=(0,Qt.A)("fromLang"),uu=(0,Qt.A)("docInfo"),cu=(0,Qt.A)("fullDescription"),du=(0,Qt.A)("processingId"),hu=(0,Qt.A)("processingVersion"),pu=(0,Qt.A)("activeTrackKey"),fu=(0,Qt.A)("aiChunkScheduler"),mu=(0,Qt.A)("subtitleAbortController"),gu=(0,Qt.A)("managerInstance"),vu=(0,Qt.A)("i18n"),yu=(0,Qt.A)("playerUi"),bu=(0,Qt.A)("ytSubtitleStateObserver"),Au=(0,Qt.A)("subtitleListManager"),xu=(0,Qt.A)("videoId"),wu=(0,Qt.A)("videoEl"),ku=(0,Qt.A)("progressed"),Su=(0,Qt.A)("observeYtSubtitleState"),Eu=(0,Qt.A)("syncYtSubtitleState"),Cu=(0,Qt.A)("isYtSubtitleEnabled"),_u=(0,Qt.A)("moAds"),Tu=(0,Qt.A)("toggleTranslation"),Du=(0,Qt.A)("translateCachedEvents"),Pu=(0,Qt.A)("getMenuProps"),Iu=(0,Qt.A)("isStaleProcessing"),Fu=(0,Qt.A)("handleInterceptedRequest"),Lu=(0,Qt.A)("processEvents"),zu=(0,Qt.A)("upsertProcessedSubtitles"),Ou=(0,Qt.A)("appendProcessedSubtitles"),Nu=(0,Qt.A)("reProcessEvents"),ju=(0,Qt.A)("enrichDocInfoWithAI"),Ru=(0,Qt.A)("reProcessEventsWithContext"),Mu=(0,Qt.A)("scheduleAiChunks"),Bu=(0,Qt.A)("startManager"),Wu=(0,Qt.A)("destroyManager");class Uu{constructor(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,Wu,{value:cc}),Object.defineProperty(this,Bu,{value:uc}),Object.defineProperty(this,Mu,{value:lc}),Object.defineProperty(this,Ru,{value:sc}),Object.defineProperty(this,ju,{value:ac}),Object.defineProperty(this,Nu,{value:oc}),Object.defineProperty(this,Ou,{value:ic}),Object.defineProperty(this,zu,{value:rc}),Object.defineProperty(this,Lu,{value:nc}),Object.defineProperty(this,Fu,{value:tc}),Object.defineProperty(this,Iu,{value:ec}),Object.defineProperty(this,Pu,{value:Zu}),Object.defineProperty(this,Du,{value:Qu}),Object.defineProperty(this,Tu,{value:Ju}),Object.defineProperty(this,_u,{value:$u}),Object.defineProperty(this,Cu,{value:Xu}),Object.defineProperty(this,Eu,{value:Yu}),Object.defineProperty(this,Su,{value:qu}),Object.defineProperty(this,ku,{get:Ku,set:Gu}),Object.defineProperty(this,wu,{get:Vu,set:void 0}),Object.defineProperty(this,xu,{get:Hu,set:void 0}),Object.defineProperty(this,tu,{writable:!0,value:{}}),Object.defineProperty(this,nu,{writable:!0,value:!0}),Object.defineProperty(this,ru,{writable:!0,value:[]}),Object.defineProperty(this,iu,{writable:!0,value:[]}),Object.defineProperty(this,ou,{writable:!0,value:[]}),Object.defineProperty(this,au,{writable:!0,value:[]}),Object.defineProperty(this,su,{writable:!0,value:0}),Object.defineProperty(this,lu,{writable:!0,value:"auto"}),Object.defineProperty(this,uu,{writable:!0,value:{}}),Object.defineProperty(this,cu,{writable:!0,value:""}),Object.defineProperty(this,du,{writable:!0,value:null}),Object.defineProperty(this,hu,{writable:!0,value:0}),Object.defineProperty(this,pu,{writable:!0,value:null}),Object.defineProperty(this,fu,{writable:!0,value:null}),Object.defineProperty(this,mu,{writable:!0,value:null}),Object.defineProperty(this,gu,{writable:!0,value:null}),Object.defineProperty(this,vu,{writable:!0,value:()=>""}),Object.defineProperty(this,yu,{writable:!0,value:null}),Object.defineProperty(this,bu,{writable:!0,value:null}),Object.defineProperty(this,Au,{writable:!0,value:null}),(0,Jt.A)(this,nu)[nu]=null===(e=t.autoTranslate)||void 0===e||e,(0,Jt.A)(this,tu)[tu]=(0,r.A)((0,r.A)({},t),{},{autoTranslate:(0,Jt.A)(this,nu)[nu]}),(0,Jt.A)(this,vu)[vu]=(0,o.BM1)(t.uiLang||"zh"),(0,Jt.A)(this,yu)[yu]=new eu({getSetting:()=>(0,Jt.A)(this,tu)[tu],getMenuProps:()=>(0,Jt.A)(this,Pu)[Pu](),getVideoEl:()=>(0,Jt.A)(this,wu)[wu]})}initialize(){window.addEventListener("message",e=>{var t;if((null===(t=e.data)||void 0===t?void 0:t.type)===o.km2){const{url:t,response:n}=e.data;t&&n&&(0,Jt.A)(this,Fu)[Fu](t,n)}}),window.addEventListener("yt-navigate-finish",()=>{var e;ht.vF.debug("Youtube Provider: yt-navigate-finish",(0,Jt.A)(this,xu)[xu]),(0,Jt.A)(this,Wu)[Wu](),mt((0,Jt.A)(this,tu)[tu].apiSlug),(0,Jt.A)(this,ru)[ru]=[],(0,Jt.A)(this,iu)[iu]=[],(0,Jt.A)(this,ou)[ou]=[],(0,Jt.A)(this,au)[au]=[],(0,Jt.A)(this,ku)[ku]=0,(0,Jt.A)(this,lu)[lu]="auto",(0,Jt.A)(this,uu)[uu]={},(0,Jt.A)(this,cu)[cu]="",(0,Jt.A)(this,du)[du]=null,(0,Jt.A)(this,hu)[hu]+=1,(0,Jt.A)(this,pu)[pu]=null,(0,Jt.A)(this,fu)[fu]=null,null===(e=(0,Jt.A)(this,mu)[mu])||void 0===e||e.abort(),(0,Jt.A)(this,mu)[mu]=null,(0,Jt.A)(this,tu)[tu].autoTranslate=(0,Jt.A)(this,nu)[nu],(0,Jt.A)(this,yu)[yu].updateMenuProps()}),Gl(Ul,e=>{const t=e.querySelector(Vl);t&&(0,Jt.A)(this,Su)[Su](t),(0,Jt.A)(this,yu)[yu].injectToggleButton(e)}),Gl(".video-ads",e=>{(0,Jt.A)(this,_u)[_u](e)})}updateSetting(e){let{name:t,value:n}=e;var r;(0,Jt.A)(this,tu)[tu][t]!==n&&(ht.vF.debug("Youtube Provider: update setting",t,n),(0,Jt.A)(this,tu)[tu][t]=n,(0,Jt.A)(this,yu)[yu].updateMenuProps(),"isBilingual"===t||"blurTranslation"===t||"displayOrder"===t?null===(r=(0,Jt.A)(this,gu)[gu])||void 0===r||r.updateSetting({[t]:n}):"segSlug"===t||"forceSubtitleRetranslate"===t?(0,Jt.A)(this,Nu)[Nu]():"autoTranslate"===t?(0,Jt.A)(this,Tu)[Tu]():"aiContextSlug"===t?(0,Jt.A)(this,Ru)[Ru]():"showLoadNotification"===t&&!1===n?(0,Jt.A)(this,yu)[yu].hideNotification():"hideSubtitleButton"===t&&(!0===n?(0,Jt.A)(this,yu)[yu].removeToggleButton():(0,Jt.A)(this,yu)[yu].injectToggleButton(document.querySelector(Ul))))}downloadSubtitle(){if((0,Jt.A)(this,ru)[ru].length)try{const e=yt((0,Jt.A)(this,ru)[ru]);(0,l.Qv)(e,"kiss-subtitles-".concat((0,Jt.A)(this,xu)[xu],"_").concat(Date.now(),".vtt"))}catch(e){ht.vF.info("Youtube Provider: download subtitles:",e)}else ht.vF.debug("Youtube Provider: The subtitle is not yet ready.")}}function Hu(){return new URL(document.location.href).searchParams.get("v")}function Vu(){return document.querySelector("#container video")}function Gu(e){(0,Jt.A)(this,su)[su]=e,(0,Jt.A)(this,yu)[yu].updateMenuProps()}function Ku(){return(0,Jt.A)(this,su)[su]}function qu(e){var t;null===(t=(0,Jt.A)(this,bu)[bu])||void 0===t||t.disconnect(),(0,Jt.A)(this,bu)[bu]=new MutationObserver(()=>{(0,Jt.A)(this,Eu)[Eu](e)}),(0,Jt.A)(this,bu)[bu].observe(e,{attributes:!0,attributeFilter:["aria-pressed"]}),(0,Jt.A)(this,Eu)[Eu](e)}function Yu(e){"true"===e.getAttribute("aria-pressed")?(0,Jt.A)(this,Bu)[Bu]():(0,Jt.A)(this,Wu)[Wu]()}function Xu(){const e=document.querySelector(Vl);return!e||"true"===e.getAttribute("aria-pressed")}function $u(e){const t=".ytp-ad-player-overlay-layout",n=".ytp-skip-ad-button, .ytp-ad-skip-button, .ytp-ad-skip-button-modern",r=new MutationObserver(e=>{const{skipAd:r=!1}=(0,Jt.A)(this,tu)[tu];for(const i of e){if("childList"!==i.type)continue;const e=(0,Jt.A)(this,wu)[wu];i.addedNodes.forEach(i=>{if(i.nodeType===Node.ELEMENT_NODE){var o;if(i.matches(t))ht.vF.debug("Youtube Provider: AD start playing!",i),e&&r&&(e.playbackRate=16,e.currentTime=e.duration),null===(o=(0,Jt.A)(this,gu)[gu])||void 0===o||o.setIsAdPlaying(!0);else i.matches(n)&&r&&(ht.vF.debug("Youtube Provider: AD skip button!",i),i.click());if(r){const e=null==i?void 0:i.querySelector(n);e&&(ht.vF.debug("Youtube Provider: AD skip button!!",e),e.click())}}}),i.removedNodes.forEach(n=>{var i;n.nodeType===Node.ELEMENT_NODE&&(n.matches(t)&&(ht.vF.debug("Youtube Provider: Ad ends!"),(0,Jt.A)(this,tu)[tu].autoTranslate&&(0,Jt.A)(this,yu)[yu].hideYtCaption(),e&&r&&(e.playbackRate=1),null===(i=(0,Jt.A)(this,gu)[gu])||void 0===i||i.setIsAdPlaying(!1)))})}});r.observe(e,{childList:!0,subtree:!0})}function Ju(){if((0,Jt.A)(this,tu)[tu].autoTranslate)(0,Jt.A)(this,Du)[Du]();else{var e;if((0,Jt.A)(this,au)[au].length)(0,Jt.A)(this,hu)[hu]+=1,null===(e=(0,Jt.A)(this,mu)[mu])||void 0===e||e.abort(),(0,Jt.A)(this,mu)[mu]=null,(0,Jt.A)(this,fu)[fu]=null,(0,Jt.A)(this,du)[du]=null,(0,Jt.A)(this,ru)[ru]=[],(0,Jt.A)(this,ku)[ku]=0,mt((0,Jt.A)(this,tu)[tu].apiSlug);(0,Jt.A)(this,Wu)[Wu]()}}async function Qu(){var e;const t=(0,Jt.A)(this,xu)[xu];if(!(0,Jt.A)(this,tu)[tu].autoTranslate||!t||!(0,Jt.A)(this,au)[au].length)return;const n=(0,Jt.A)(this,hu)[hu]+=1;null===(e=(0,Jt.A)(this,mu)[mu])||void 0===e||e.abort(),(0,Jt.A)(this,mu)[mu]=new AbortController,(0,Jt.A)(this,fu)[fu]=null,(0,Jt.A)(this,ru)[ru]=[],(0,Jt.A)(this,ku)[ku]=0,(0,Jt.A)(this,Wu)[Wu](),mt((0,Jt.A)(this,tu)[tu].apiSlug),(0,Jt.A)(this,uu)[uu]=At(),await(0,Jt.A)(this,ju)[ju]((0,Jt.A)(this,au)[au],n),(0,Jt.A)(this,Iu)[Iu](n)||(0,Jt.A)(this,Lu)[Lu]({videoId:t,flatEvents:(0,Jt.A)(this,au)[au],fromLang:(0,Jt.A)(this,lu)[lu],processingVersion:n,signal:(0,Jt.A)(this,mu)[mu].signal})}function Zu(){const{transApis:e,segSlug:t,skipAd:n,isBilingual:r,blurTranslation:i,autoTranslate:o,aiContextSlug:a}=(0,Jt.A)(this,tu)[tu];return{i18n:(0,Jt.A)(this,vu)[vu],updateSetting:this.updateSetting.bind(this),downloadSubtitle:this.downloadSubtitle.bind(this),transApis:e,progressed:(0,Jt.A)(this,su)[su],formData:{segSlug:t,skipAd:n,isBilingual:r,blurTranslation:i,autoTranslate:o,aiContextSlug:a}}}function ec(e){return e!==(0,Jt.A)(this,hu)[hu]}async function tc(e,t){var n;const i=(0,Jt.A)(this,xu)[xu];if(!i)return void ht.vF.debug("Youtube Provider: videoId not found.");const a=new URL(e);if(i!==a.searchParams.get("v"))return void ht.vF.debug("Youtube Provider: skip other timedtext:",i);const s=a.searchParams.get("lang");if(!s)return void ht.vF.debug("Youtube Provider: timedtext lang not found:",e);const l=a.searchParams.get("kind")||null,u=function(e){const t=e.searchParams;return[t.get("v")||"",t.get("lang")||"",t.get("kind")||"",t.get("name")||"",t.get("tlang")||""].join("|")}(a),c=function(e){const t=W(e);return t||o.eA2.get(e)||o.mSZ[o.kXF].get(e)||"auto"}(s);if((0,Jt.A)(this,au)[au].length&&u===(0,Jt.A)(this,pu)[pu])return void ht.vF.debug("Youtube Provider: track was processed:",u);if((0,Jt.A)(this,du)[du]===u)return void ht.vF.debug("Youtube Provider: track is processing:",u);const d=(0,Jt.A)(this,hu)[hu]+=1;(0,Jt.A)(this,du)[du]=u,null===(n=(0,Jt.A)(this,mu)[mu])||void 0===n||n.abort(),(0,Jt.A)(this,mu)[mu]=new AbortController,(0,Jt.A)(this,fu)[fu]=null,(0,Jt.A)(this,au)[au].length&&((0,Jt.A)(this,Wu)[Wu](),mt((0,Jt.A)(this,tu)[tu].apiSlug),(0,Jt.A)(this,ru)[ru]=[],(0,Jt.A)(this,iu)[iu]=[],(0,Jt.A)(this,ou)[ou]=[],(0,Jt.A)(this,au)[au]=[],(0,Jt.A)(this,ku)[ku]=0,(0,Jt.A)(this,pu)[pu]=null,(0,Jt.A)(this,fu)[fu]=null);try{var h;(0,Jt.A)(this,yu)[yu].showNotification((0,Jt.A)(this,vu)[vu]("starting_to_process_subtitle"));const{toLang:e}=(0,Jt.A)(this,tu)[tu],{captionTracks:n,fullDescription:o}=await tl(i);if((0,Jt.A)(this,Iu)[Iu](d))return;(0,Jt.A)(this,cu)[cu]=o||"";const p=function(e,t,n){if(ht.vF.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&&Qs(e.languageCode,t.languageCode)),r||(r=t))}if(r||(r=e[e.length-1]),r&&Zs(r)){ht.vF.debug("Youtube Provider: detected chat subtitle track, switching to normal subtitle");const n=e.find(e=>Qs(e.languageCode,t)&&!Zs(e));if(n)ht.vF.debug("Youtube Provider: switched to same-language non-chat track"),r=n;else{const t=e.find(e=>!Zs(e));t&&(ht.vF.debug("Youtube Provider: switched to fallback non-chat track"),r=t)}}return r}(n,s,l);if(!p)return void ht.vF.debug("Youtube Provider: CaptionTrack not found:",i);p.baseUrl.startsWith("https")||(p.baseUrl=window.location.origin+p.baseUrl);const f=new URL(p.baseUrl),m=await async function(e,t,n){if(!t.searchParams.get("tlang")&&t.searchParams.get("kind")===e.searchParams.get("kind")&&Qs(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.vF.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.vF.info("Youtube Provider: Failed to fetch subtitles: ".concat(n.status)),null}catch(e){return ht.vF.info("Youtube Provider: fetching subtitles error",e),null}}(f,a,t);if((0,Jt.A)(this,Iu)[Iu](d))return;if(null==m||!m.length)return void ht.vF.debug("Youtube Provider: events not got:",i);if((0,Jt.A)(this,ou)[ou]=m,ht.vF.debug("Youtube Provider: lang: ".concat(s,", fromLang: ").concat(c,", toLang: ").concat(e)),Qs(c,e,null===(h=(0,Jt.A)(this,tu)[tu].translateVariants)||void 0===h||h))return ht.vF.debug("Youtube Provider: skip same lang",c,e),void(0,Jt.A)(this,yu)[yu].showNotification((0,Jt.A)(this,vu)[vu]("subtitle_same_lang"));const{events:g,flatEvents:v}=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const n=[],i=[];let o=0,a=null,s="";const l=e=>{a&&((!a.end||Number.isFinite(e)&&a.end>e)&&(a.end=e),Number.isFinite(a.end)&&a.end>a.start&&i.push(a),a=null)};for(const e of Array.isArray(t)?t:[]){var u;const t=e||{},i=Array.isArray(t.segs)?t.segs:[],c=Number(t.tStartMs)||0,d=Number(t.dDurationMs)||0,h=1===t.aAppend&&1===i.length&&"\n"===(null===(u=i[0])||void 0===u?void 0:u.utf8),p=i.map(e=>(0,r.A)((0,r.A)({},e),{},{utf8:h?"\n":hl(null==e?void 0:e.utf8)})),f=p.map(e=>hl(e.utf8)).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),m=f?"".concat(c,"|").concat(d,"|").concat(f):"";if(m&&m===s)continue;const g=(0,r.A)((0,r.A)({},t),{},{segs:p});n.push(g),s=m;for(let e=0;e<p.length;e+=1){const{utf8:t="",tOffsetMs:n=0}=p[e],r=hl(t),i=c+(Number(n)||0);r?(0,nl.b)(r)?(l(i),o+=1):(l(i),a={text:r,start:i},e===p.length-1&&(a.end=c+d)):(!a||i>a.start)&&l(i)}}return l(null===(e=a)||void 0===e?void 0:e.end),{events:n,flatEvents:i.filter(e=>e&&Number.isFinite(e.start)&&Number.isFinite(e.end)&&e.end>e.start),filteredNonSpeechCount:o}}(m);if(null==v||!v.length)return void ht.vF.debug("Youtube Provider: flatEvents not got:",i);if((0,Jt.A)(this,Iu)[Iu](d))return;if((0,Jt.A)(this,iu)[iu]=g,(0,Jt.A)(this,au)[au]=v,(0,Jt.A)(this,lu)[lu]=c,(0,Jt.A)(this,pu)[pu]=u,(0,Jt.A)(this,uu)[uu]=At(),!(0,Jt.A)(this,tu)[tu].autoTranslate)return void(0,Jt.A)(this,yu)[yu].updateMenuProps();if(await(0,Jt.A)(this,ju)[ju](v,d),(0,Jt.A)(this,Iu)[Iu](d))return;(0,Jt.A)(this,Lu)[Lu]({videoId:i,flatEvents:v,fromLang:c,processingVersion:d,signal:(0,Jt.A)(this,mu)[mu].signal})}catch(e){ht.vF.warn("Youtube Provider: handle subtitle",e),(0,Jt.A)(this,yu)[yu].showNotification((0,Jt.A)(this,vu)[vu]("subtitle_load_failed"))}finally{(0,Jt.A)(this,Iu)[Iu](d)||(0,Jt.A)(this,du)[du]!==u||((0,Jt.A)(this,du)[du]=null)}}async function nc(e){let{videoId:t,flatEvents:n,fromLang:r,processingVersion:i,signal:o}=e;try{var a;const[e,l,u]=await Al({videoId:t,events:(0,Jt.A)(this,iu)[iu],flatEvents:n,fromLang:r,setting:(0,Jt.A)(this,tu)[tu],processingVersion:i,isStaleProcessing:e=>(0,Jt.A)(this,Iu)[Iu](e),showNotification:(e,t)=>(0,Jt.A)(this,yu)[yu].showNotification(e,t),i18n:(0,Jt.A)(this,vu)[vu],apiSubtitle:Pn,docInfo:(0,Jt.A)(this,uu)[uu],builtinSegment:ml,formatSubtitles:(e,t)=>fl(e,t,{longSentenceThreshold:(0,Jt.A)(this,tu)[tu].longSentenceThreshold}),onAppendSubtitles:e=>{let{subtitles:t,progressed:n}=e;(0,Jt.A)(this,Ou)[Ou](t,n)},getCurrentVideoId:()=>(0,Jt.A)(this,xu)[xu],signal:o});if((0,Jt.A)(this,Iu)[Iu](i))return;var s;if((0,Jt.A)(this,fu)[fu]=u||null,(0,Jt.A)(this,fu)[fu]&&(0,Jt.A)(this,wu)[wu])(0,Jt.A)(this,Mu)[Mu](1e3*(0,Jt.A)(this,wu)[wu].currentTime,null!==(s=(0,Jt.A)(this,tu)[tu].preTrans)&&void 0!==s?s:90);if(!(null!=e&&e.length||(0,Jt.A)(this,ru)[ru].length))return void ht.vF.debug("Youtube Provider: events to subtitles got empty",t);if(t!==(0,Jt.A)(this,xu)[xu])return void ht.vF.debug("Youtube Provider: videoId changed!",t,(0,Jt.A)(this,xu)[xu]);const c=(0,Jt.A)(this,zu)[zu](e,l);(0,Jt.A)(this,Bu)[Bu](),null===(a=(0,Jt.A)(this,gu)[gu])||void 0===a||a.repairChunkTranslations(c)}catch(e){if("AbortError"===(null==e?void 0:e.name))return;ht.vF.info("Youtube Provider: process events",e),(0,Jt.A)(this,yu)[yu].showNotification((0,Jt.A)(this,vu)[vu]("subtitle_load_failed"))}}function rc(e,t){if(null==e||!e.length)return(0,Jt.A)(this,ku)[ku]=t,[];const n=new Map((0,Jt.A)(this,ru)[ru].map((e,t)=>["".concat(e.start,":").concat(e.end),t])),i=[];for(const t of e){const e="".concat(t.start,":").concat(t.end),o=n.get(e);void 0!==o?((0,Jt.A)(this,ru)[ru][o]=(0,r.A)((0,r.A)({},(0,Jt.A)(this,ru)[ru][o]),t),i.push((0,Jt.A)(this,ru)[ru][o])):(n.set(e,(0,Jt.A)(this,ru)[ru].length),(0,Jt.A)(this,ru)[ru].push(t),i.push(t))}return(0,Jt.A)(this,ru)[ru].sort((e,t)=>e.start-t.start),(0,Jt.A)(this,ku)[ku]=t,i}function ic(e,t){var n,r,i;const o=(0,Jt.A)(this,zu)[zu](e,t);!(0,Jt.A)(this,gu)[gu]&&(0,Jt.A)(this,ru)[ru].length&&(0,Jt.A)(this,Bu)[Bu](),null===(n=(0,Jt.A)(this,gu)[gu])||void 0===n||n.appendSubtitles(o),null===(r=(0,Jt.A)(this,Au)[Au])||void 0===r||r.setBilingualSubtitles((0,Jt.A)(this,ru)[ru],(0,Jt.A)(this,ku)[ku]),null===(i=(0,Jt.A)(this,gu)[gu])||void 0===i||i.repairChunkTranslations(o)}function oc(){var e;if(!(0,Jt.A)(this,tu)[tu].autoTranslate)return;(0,Jt.A)(this,ku)[ku]=0,(0,Jt.A)(this,ru)[ru]=[];const t=(0,Jt.A)(this,xu)[xu],n=(0,Jt.A)(this,au)[au],r=(0,Jt.A)(this,lu)[lu];if(!t||!n.length)return;(0,Jt.A)(this,yu)[yu].showNotification((0,Jt.A)(this,vu)[vu]("starting_reprocess_events"));const i=(0,Jt.A)(this,hu)[hu]+=1;null===(e=(0,Jt.A)(this,mu)[mu])||void 0===e||e.abort(),(0,Jt.A)(this,mu)[mu]=new AbortController,(0,Jt.A)(this,fu)[fu]=null,(0,Jt.A)(this,Wu)[Wu](),mt((0,Jt.A)(this,tu)[tu].apiSlug),(0,Jt.A)(this,Lu)[Lu]({videoId:t,flatEvents:n,fromLang:r,processingVersion:i,signal:(0,Jt.A)(this,mu)[mu].signal})}async function ac(e,t){const{aiContextSlug:n,transApis:r}=(0,Jt.A)(this,tu)[tu];if(!n||"-"===n)return;if((0,Jt.A)(this,Iu)[Iu](t))return;const i=null==r?void 0:r.find(e=>e.apiSlug===n);if(!i)return;if(!o.sNP.ai.has(i.apiType))return;const a=e.map(e=>e.text).filter(Boolean).join(" ").slice(0,8e3);if(a.length<200)return;const s=(0,Jt.A)(this,xu)[xu],l=(0,Jt.A)(this,uu)[uu];try{(0,Jt.A)(this,yu)[yu].showNotification((0,Jt.A)(this,vu)[vu]("ai_context_analyzing"));const e=await In({videoId:s,title:l.title,description:(0,Jt.A)(this,cu)[cu]||l.description,transcript:a,apiSetting:i});e&&s===(0,Jt.A)(this,xu)[xu]&&!(0,Jt.A)(this,Iu)[Iu](t)&&(l.summary=e)}catch(e){ht.vF.info("Youtube Provider: AI context enrichment failed",e)}}async function sc(){var e;if(!(0,Jt.A)(this,tu)[tu].autoTranslate)return;(0,Jt.A)(this,ku)[ku]=0,(0,Jt.A)(this,ru)[ru]=[];const t=(0,Jt.A)(this,xu)[xu],n=(0,Jt.A)(this,au)[au];if(!t||!n.length)return;const r=(0,Jt.A)(this,hu)[hu]+=1;null===(e=(0,Jt.A)(this,mu)[mu])||void 0===e||e.abort(),(0,Jt.A)(this,mu)[mu]=new AbortController,(0,Jt.A)(this,fu)[fu]=null,(0,Jt.A)(this,Wu)[Wu](),mt((0,Jt.A)(this,tu)[tu].apiSlug),(0,Jt.A)(this,uu)[uu]=At(),await(0,Jt.A)(this,ju)[ju](n,r),(0,Jt.A)(this,Iu)[Iu](r)||(0,Jt.A)(this,Lu)[Lu]({videoId:t,flatEvents:n,fromLang:(0,Jt.A)(this,lu)[lu],processingVersion:r,signal:(0,Jt.A)(this,mu)[mu].signal})}function lc(e,t){var n;null===(n=(0,Jt.A)(this,fu)[fu])||void 0===n||n.scheduleUntil(e,t)}function uc(){if(!(0,Jt.A)(this,Cu)[Cu]())return;if((0,Jt.A)(this,gu)[gu])return;if(!(0,Jt.A)(this,tu)[tu].autoTranslate)return;if(!(0,Jt.A)(this,ru)[ru].length)return void(0,Jt.A)(this,yu)[yu].showNotification((0,Jt.A)(this,vu)[vu]("waitting_for_subtitle"));const e=(0,Jt.A)(this,wu)[wu];if(!e)return void ht.vF.warn("Youtube Provider: No video element found");ht.vF.info("Youtube Provider: Starting manager..."),(0,Jt.A)(this,gu)[gu]=new Os({videoEl:e,formattedSubtitles:(0,Jt.A)(this,ru)[ru],setting:(0,r.A)((0,r.A)({},(0,Jt.A)(this,tu)[tu]),{},{fromLang:(0,Jt.A)(this,lu)[lu],docInfo:(0,Jt.A)(this,uu)[uu],onSubtitleTimeWindow:e=>{let{currentTimeMs:t,preTrans:n}=e;return(0,Jt.A)(this,Mu)[Mu](t,n)}})});Ra((0,Jt.A)(this,tu)[tu].showList,(0,Jt.A)(this,tu)[tu].enhanceMode)&&!(0,Jt.A)(this,Au)[Au]&&((0,Jt.A)(this,Au)[Au]=new Js(e,(0,Jt.A)(this,vu)[vu],{enableHoverLookup:Ra((0,Jt.A)(this,tu)[tu].hoverLookupMode,(0,Jt.A)(this,tu)[tu].enhanceMode),autoFavWord:!0===(0,Jt.A)(this,tu)[tu].autoFavWord}),(0,Jt.A)(this,Au)[Au].initialize((0,Jt.A)(this,ru)[ru],(0,Jt.A)(this,ou)[ou],(0,Jt.A)(this,ku)[ku]),(0,Jt.A)(this,gu)[gu].onSubtitleUpdate=e=>{(0,Jt.A)(this,Au)[Au].updateSingleSubtitle(e)},(0,Jt.A)(this,Au)[Au].turnOnAutoSub()),(0,Jt.A)(this,gu)[gu].start(),(0,Jt.A)(this,yu)[yu].showNotification((0,Jt.A)(this,vu)[vu]("subtitle_load_succeed")),(0,Jt.A)(this,yu)[yu].hideYtCaption()}function cc(){(0,Jt.A)(this,yu)[yu].showYtCaption(),(0,Jt.A)(this,gu)[gu]&&(ht.vF.info("Youtube Provider: Destroying manager..."),(0,Jt.A)(this,gu)[gu].onSubtitleUpdate=null,(0,Jt.A)(this,gu)[gu].destroy(),(0,Jt.A)(this,gu)[gu]=null,(0,Jt.A)(this,Au)[Au]&&((0,Jt.A)(this,Au)[Au].destroy(),(0,Jt.A)(this,Au)[Au]=null))}const dc=(()=>{let e=!1;return async t=>{if(e)return;e=!0,ht.vF.info("Bilingual Subtitle Extension: Initializing...");new Uu(t).initialize()}})();var hc=i(3565);const pc=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=at.createScript(e),(document.head||document.documentElement).appendChild(n)},fc="injector-subtitle.js",mc="injector-shadowroot.js",gc={[fc]:()=>{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)}},[mc]:()=>{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 vc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kiss-translator-inject-js";const n=gc[e];if(n)if(V.aQ){!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=at.createScriptURL(e),(document.head||document.documentElement).appendChild(n)}($t.T.runtime.getURL(e),t)}else pc("(".concat(n,")()"),t)}const yc=[{pattern:"https://www.youtube.com",start:dc}];function bc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ac=i(3385),xc=i(696);function wc(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function kc(e,t,n){var r=[],i=(0,xc.Rk)(e,r,n);return r.length<2?n:i+t(r)}var Sc,Ec,Cc,_c,Tc=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},Dc=function(e){var t=(0,Sl.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,Ac.J)(n,t.registered,void 0);return(0,xc.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 kc(t.registered,n,Tc(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=(0,Ac.J)(n,t.registered);wc(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,Ac.J)(n,t.registered),o="animation-"+i.name;return wc(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:xc.Rk.bind(null,t.registered),merge:kc.bind(null,t.registered,n)}}({key:"css"}),Pc=(Dc.flush,Dc.hydrate,Dc.cx,Dc.merge,Dc.getRegisteredStyles,Dc.injectGlobal,Dc.keyframes),Ic=Dc.css;Dc.sheet,Dc.cache;const Fc=Pc(Sc||(Sc=bc(["\n  to {\n    background-position: 200% center;\n  }\n"]))),Lc=Pc(Ec||(Ec=bc(["\n  0%, 100% {\n    opacity: 1;\n  }\n  50% {\n    opacity: 0;\n  }\n"]))),zc=Pc(Cc||(Cc=bc(["\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"]))),Oc=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")},Nc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.OTD;return{[o.nsG]:"",[o.VfS]:Oc("solid",e),[o.As$]:Oc("dotted",e),[o.hrO]:Oc("dashed",e),[o.TYN]:Oc("dashed",e,2),[o.QsO]:Oc("wavy",e),[o._sN]:Oc("wavy",e,2),[o.WDZ]:"\n    border: 1px dashed ".concat(e,";\n    display: block;\n    padding: 0.2em 0.3em;\n    box-sizing: border-box;\n  "),[o.msE]:"\n    border: 2px dashed ".concat(e,";\n    display: block;\n    padding: 0.2em 0.3em;\n    box-sizing: border-box;\n  "),[o.zwp]:"\n    background: linear-gradient(to top, ".concat(e," 50%, transparent 50%);\n  "),[o.ea4]:"\n    background: linear-gradient(to top, transparent, ".concat(e," 20%, transparent 60%);\n  "),[o.$ET]:"\n    filter: blur(0.2em);\n    -webkit-filter: blur(0.2em);\n    &:hover {\n      filter: none;\n      -webkit-filter: none;\n    }\n  ",[o.zMP]:"\n    color: #fff;\n    background-color: ".concat(e,";\n  "),[o.SXq]:"\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  "),[o.HzO]:"\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(Fc," 4s linear infinite;\n    & * {\n      background-color: transparent !important;\n    }\n  "),[o.VEm]:"\n    animation: ".concat(Lc," 1s infinite;\n  "),[o.EDO]:"\n    animation: ".concat(zc," 2s ease-in-out infinite alternate;\n  "),[o.Rrc]:"\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  "}},jc=Nc(),Rc=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)=>{(0,l.T9)(r,e)&&!i&&t(),1===e.size&&(i=!1)},n)},Mc=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 Rc(e,n,t)},Bc={[o.bCM]: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(O.stringify(t)),r={headers:{"Content-type":"application/json"}},i=await(0,N.Fd)(n,r,{useCache:!0});return null!=i&&i.src?(await(0,Kt.v0)(n,r,i),i.src):""},[o.xN$]:async e=>{const t="https://fanyi.baidu.com/langdetect",n={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify({query:e})},r=await(0,N.Fd)(t,n,{useCache:!0});return 0===(null==r?void 0:r.error)?(await(0,Kt.v0)(t,n,r),r.lan):""},[o.fFW]: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(0,N.Fd)(t,n,{useCache:!0});return null!=r&&r.language?(await(0,Kt.v0)(t,n,r),r.language):""},[o.h8v]:async e=>{if(!$t.Lx)return"";const[t,n]=await(0,N.Qy)({fn:cn,msg:o.cO5,text:e});return n?"":t}},Wc=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n="";if(o.G8K.has(t))try{const r=await Bc[t](e);if(r){n=W(o.mSZ[t].get(r)||r)}}catch(e){(0,ht.h9)("detect lang remote",e)}if(!n)try{var r,i,a;const t=await(null===$t.T||void 0===$t.T||null===(r=$t.T.i18n)||void 0===r?void 0:r.detectLanguage(e)),o=null==t||null===(i=t.languages)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.language,s=W(o);s&&(null!=t&&t.isReliable||/^zh(?:[-_]|$)/i.test(o))&&(n=s)}catch(e){(0,ht.h9)("detect lang local",e)}return n};var Uc,Hc=(0,Qt.A)("setting"),Vc=(0,Qt.A)("rule"),Gc=(0,Qt.A)("isInitialized"),Kc=(0,Qt.A)("isJsInjected"),qc=(0,Qt.A)("isShadowRootJsInjected"),Yc=(0,Qt.A)("mouseHoverEnabled"),Xc=(0,Qt.A)("enabled"),$c=(0,Qt.A)("runId"),Jc=(0,Qt.A)("transOnlyRevertTimer"),Qc=(0,Qt.A)("transOnlyRevertTarget"),Zc=(0,Qt.A)("transOnlyRevertEnabled"),ed=(0,Qt.A)("boundTransOnlyMouseOver"),td=(0,Qt.A)("boundTransOnlyMouseOut"),nd=(0,Qt.A)("termValues"),rd=(0,Qt.A)("combinedTermsRegex"),id=(0,Qt.A)("combinedSkipsRegex"),od=(0,Qt.A)("placeholderCache"),ad=(0,Qt.A)("translationTagName"),sd=(0,Qt.A)("eventName"),ld=(0,Qt.A)("docInfo"),ud=(0,Qt.A)("glossary"),cd=(0,Qt.A)("blockSelectorInvalid"),dd=(0,Qt.A)("textClass"),hd=(0,Qt.A)("textSheet"),pd=(0,Qt.A)("textStylesRaw"),fd=(0,Qt.A)("useSheetFallback"),md=(0,Qt.A)("apisMap"),gd=(0,Qt.A)("favWords"),vd=(0,Qt.A)("favoriteHighlightScopes"),yd=(0,Qt.A)("observedNodes"),bd=(0,Qt.A)("translationNodes"),Ad=(0,Qt.A)("viewNodes"),xd=(0,Qt.A)("processedNodes"),wd=(0,Qt.A)("rootNodes"),kd=(0,Qt.A)("skipMoNodes"),Sd=(0,Qt.A)("ignoredMutationTargets"),Ed=(0,Qt.A)("plainTextPreprocessingNodes"),Cd=(0,Qt.A)("removeKeydownHandler"),_d=(0,Qt.A)("removeKeydownHandler2"),Td=(0,Qt.A)("hoveredNode"),Dd=(0,Qt.A)("hoverPointer"),Pd=(0,Qt.A)("hoverBubbleNode"),Id=(0,Qt.A)("hoverBubbleTarget"),Fd=(0,Qt.A)("hoverBubbleRunId"),Ld=(0,Qt.A)("favoriteHoverTimer"),zd=(0,Qt.A)("favoriteHoverTarget"),Od=(0,Qt.A)("hoverOriginalTimer"),Nd=(0,Qt.A)("hoverOriginalTimerTarget"),jd=(0,Qt.A)("boundMouseMoveHandler"),Rd=(0,Qt.A)("boundKeyDownHandler"),Md=(0,Qt.A)("windowMessageHandler"),Bd=(0,Qt.A)("boundFavoriteWordChange"),Wd=(0,Qt.A)("boundFavoriteMouseOver"),Ud=(0,Qt.A)("boundFavoriteMouseOut"),Hd=(0,Qt.A)("debouncedFindShadowRoot"),Vd=(0,Qt.A)("io"),Gd=(0,Qt.A)("mo"),Kd=(0,Qt.A)("dmm"),qd=(0,Qt.A)("rescanQueue"),Yd=(0,Qt.A)("isQueueProcessing"),Xd=(0,Qt.A)("captureViewportAnchor"),$d=(0,Qt.A)("normalizeViewportAnchor"),Jd=(0,Qt.A)("restoreViewportAnchor"),Qd=(0,Qt.A)("withViewportAnchor"),Zd=(0,Qt.A)("ignoreSelector"),eh=(0,Qt.A)("isIgnoredElement"),th=(0,Qt.A)("matchesBlockSelector"),nh=(0,Qt.A)("appendCssText"),rh=(0,Qt.A)("isBlockNode"),ih=(0,Qt.A)("hasBlockNode"),oh=(0,Qt.A)("getPlainTextChunkLimit"),ah=(0,Qt.A)("findPlainTextBreakIndex"),sh=(0,Qt.A)("readPlainTextNewline"),lh=(0,Qt.A)("findPlainTextLineEnd"),uh=(0,Qt.A)("readNextPlainTextChunk"),ch=(0,Qt.A)("createPlainTextChunkNode"),dh=(0,Qt.A)("appendPlainTextPreBatch"),hh=(0,Qt.A)("initPlainTextPre"),ph=(0,Qt.A)("apiSetting"),fh=(0,Qt.A)("hoverBubbleApiSetting"),mh=(0,Qt.A)("transAllnow"),gh=(0,Qt.A)("rootMargin"),vh=(0,Qt.A)("placeholderConfig"),yh=(0,Qt.A)("run"),bh=(0,Qt.A)("init"),Ah=(0,Qt.A)("handleWindowMessage"),xh=(0,Qt.A)("attachShadowRootListener"),wh=(0,Qt.A)("removeShadowRootListener"),kh=(0,Qt.A)("findAndObserveShadowRoot"),Sh=(0,Qt.A)("createTextStyles"),Eh=(0,Qt.A)("injectSheet"),Ch=(0,Qt.A)("injectSheetFallback"),_h=(0,Qt.A)("parseTerms"),Th=(0,Qt.A)("createIntersectionObserver"),Dh=(0,Qt.A)("createMutationObserver"),Ph=(0,Qt.A)("withIgnoredMutations"),Ih=(0,Qt.A)("createDebounceMouseMover"),Fh=(0,Qt.A)("handleMouseMove"),Lh=(0,Qt.A)("handleKeyDown"),zh=(0,Qt.A)("toggleTargetNode"),Oh=(0,Qt.A)("isMouseHoverBubbleMode"),Nh=(0,Qt.A)("shouldUseOriginalHoverBubble"),jh=(0,Qt.A)("canShowOriginalInHoverBubble"),Rh=(0,Qt.A)("getOriginalText"),Mh=(0,Qt.A)("clearHoverOriginalTimer"),Bh=(0,Qt.A)("scheduleOriginalHoverBubble"),Wh=(0,Qt.A)("showOriginalHoverBubble"),Uh=(0,Qt.A)("getShadowRoot"),Hh=(0,Qt.A)("isKissIgnoredNode"),Vh=(0,Qt.A)("findAllShadowRoots"),Gh=(0,Qt.A)("findChangeContainer"),Kh=(0,Qt.A)("queueForRescan"),qh=(0,Qt.A)("rescanContainer"),Yh=(0,Qt.A)("reIO"),Xh=(0,Qt.A)("reIOViewNodes"),$h=(0,Qt.A)("startObserveShadowRoot"),Jh=(0,Qt.A)("startObserveRoot"),Qh=(0,Qt.A)("startObserveNode"),Zh=(0,Qt.A)("queryNode"),ep=(0,Qt.A)("scanNode"),tp=(0,Qt.A)("processNode"),np=(0,Qt.A)("highlightTextNode"),rp=(0,Qt.A)("highlightWordsDeeply"),ip=(0,Qt.A)("normalizeFavoriteWord"),op=(0,Qt.A)("dedupeFavoriteWords"),ap=(0,Qt.A)("handleFavoriteWordChange"),sp=(0,Qt.A)("removeFavoriteWordHighlights"),lp=(0,Qt.A)("mergeFavoriteHighlightText"),up=(0,Qt.A)("isFavoriteHighlightInScope"),cp=(0,Qt.A)("splitTextNodesBySentence"),dp=(0,Qt.A)("removeHighlights"),hp=(0,Qt.A)("removeBrTags"),pp=(0,Qt.A)("shouldBreak"),fp=(0,Qt.A)("isInvalidText"),mp=(0,Qt.A)("formatTranslateError"),gp=(0,Qt.A)("copyText"),vp=(0,Qt.A)("createRetryErrorNode"),yp=(0,Qt.A)("translateNodeGroup"),bp=(0,Qt.A)("handleFavoriteMouseOver"),Ap=(0,Qt.A)("handleFavoriteMouseOut"),xp=(0,Qt.A)("clearFavoriteHoverTimer"),wp=(0,Qt.A)("showFavoriteWordTooltip"),kp=(0,Qt.A)("normalizeFavoriteDictionaryResult"),Sp=(0,Qt.A)("createFavoriteDictionaryNode"),Ep=(0,Qt.A)("showFavoriteBubble"),Cp=(0,Qt.A)("getHoverBubbleStyle"),_p=(0,Qt.A)("ensureHoverBubble"),Tp=(0,Qt.A)("positionHoverBubble"),Dp=(0,Qt.A)("showHoverBubble"),Pp=(0,Qt.A)("hideHoverBubble"),Ip=(0,Qt.A)("translateHoverBubbleNode"),Fp=(0,Qt.A)("serializeForTranslation"),Lp=(0,Qt.A)("restoreFromTranslation"),zp=(0,Qt.A)("translateFetch"),Op=(0,Qt.A)("findTranslationWrappers"),Np=(0,Qt.A)("cleanupAllNodes"),jp=(0,Qt.A)("cleanupTranslationElements"),Rp=(0,Qt.A)("cleanupAllTranslations"),Mp=(0,Qt.A)("cleanupDirectTranslations"),Bp=(0,Qt.A)("collectExistingTranslationNodes"),Wp=(0,Qt.A)("getTranslationBackup"),Up=(0,Qt.A)("getOrCreateTranslationBackup"),Hp=(0,Qt.A)("getOriginalStyleClass"),Vp=(0,Qt.A)("wrapOriginalNodes"),Gp=(0,Qt.A)("unwrapOriginal"),Kp=(0,Qt.A)("getOriginalUnits"),qp=(0,Qt.A)("setOriginalStyle"),Yp=(0,Qt.A)("tryAdoptExistingTranslationHost"),Xp=(0,Qt.A)("removeTranslationElement"),$p=(0,Qt.A)("restoreOriginal"),Jp=(0,Qt.A)("removeOriginal"),Qp=(0,Qt.A)("toggleTranslationOnly"),Zp=(0,Qt.A)("adjustWrapperPosition"),ef=(0,Qt.A)("updateStyle"),tf=(0,Qt.A)("updateOriginalWrapping"),nf=(0,Qt.A)("updateOriginalStyle"),rf=(0,Qt.A)("updateTransOrder"),of=(0,Qt.A)("refreshNode"),af=(0,Qt.A)("performSyncNode"),sf=(0,Qt.A)("resetOptions"),lf=(0,Qt.A)("enableMouseHover"),uf=(0,Qt.A)("disableMouseHover"),cf=(0,Qt.A)("enableTransOnlyRevert"),df=(0,Qt.A)("disableTransOnlyRevert"),hf=(0,Qt.A)("clearTransOnlyRevertTimer"),pf=(0,Qt.A)("showOriginalTemporarily"),ff=(0,Qt.A)("hideOriginalTemporarily"),mf=(0,Qt.A)("initInjector"),gf=(0,Qt.A)("removeInjector"),vf=(0,Qt.A)("translateTitle"),yf=(0,Qt.A)("syncTransOnlyRevert");class bf{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,a,s,l;if(!bf.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(null!==(i=e.attributes)&&void 0!==i&&null!==(o=i.display)&&void 0!==o&&null!==(a=o.value)&&void 0!==a&&a.includes("block"))return!0;if(bf.TAGS.INLINE.has(null===(s=e.nodeName)||void 0===s?void 0:s.toUpperCase()))return!1;if(bf.TAGS.BLOCK.has(null===(l=e.nodeName)||void 0===l?void 0:l.toUpperCase()))return!0;if(bf.displayCache.has(e))return bf.displayCache.get(e);const u=!window.getComputedStyle(e).display.startsWith("inline");return bf.displayCache.set(e,u),u}static hasBlockNode(e){if(!bf.isElementOrFragment(e))return!1;for(const t of e.childNodes)if(bf.isBlockNode(t))return!0;return!1}static hasTextNode(e){if(!bf.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:n={},favWords:i=[]}=e;Object.defineProperty(this,yf,{value:Ug}),Object.defineProperty(this,vf,{value:Wg}),Object.defineProperty(this,gf,{value:Bg}),Object.defineProperty(this,mf,{value:Mg}),Object.defineProperty(this,ff,{value:Rg}),Object.defineProperty(this,pf,{value:jg}),Object.defineProperty(this,hf,{value:Ng}),Object.defineProperty(this,df,{value:Og}),Object.defineProperty(this,cf,{value:zg}),Object.defineProperty(this,uf,{value:Lg}),Object.defineProperty(this,lf,{value:Fg}),Object.defineProperty(this,sf,{value:Ig}),Object.defineProperty(this,af,{value:Pg}),Object.defineProperty(this,of,{value:Dg}),Object.defineProperty(this,rf,{value:Tg}),Object.defineProperty(this,nf,{value:_g}),Object.defineProperty(this,tf,{value:Cg}),Object.defineProperty(this,ef,{value:Eg}),Object.defineProperty(this,Zp,{value:Sg}),Object.defineProperty(this,Qp,{value:kg}),Object.defineProperty(this,Jp,{value:wg}),Object.defineProperty(this,$p,{value:xg}),Object.defineProperty(this,Xp,{value:Ag}),Object.defineProperty(this,Yp,{value:bg}),Object.defineProperty(this,qp,{value:yg}),Object.defineProperty(this,Kp,{value:vg}),Object.defineProperty(this,Gp,{value:gg}),Object.defineProperty(this,Vp,{value:mg}),Object.defineProperty(this,Hp,{value:fg}),Object.defineProperty(this,Up,{value:pg}),Object.defineProperty(this,Wp,{value:hg}),Object.defineProperty(this,Bp,{value:dg}),Object.defineProperty(this,Mp,{value:cg}),Object.defineProperty(this,Rp,{value:ug}),Object.defineProperty(this,jp,{value:lg}),Object.defineProperty(this,Np,{value:sg}),Object.defineProperty(this,Op,{value:ag}),Object.defineProperty(this,zp,{value:og}),Object.defineProperty(this,Lp,{value:ig}),Object.defineProperty(this,Fp,{value:rg}),Object.defineProperty(this,Ip,{value:ng}),Object.defineProperty(this,Pp,{value:tg}),Object.defineProperty(this,Dp,{value:eg}),Object.defineProperty(this,Tp,{value:Zm}),Object.defineProperty(this,_p,{value:Qm}),Object.defineProperty(this,Cp,{value:Jm}),Object.defineProperty(this,Ep,{value:$m}),Object.defineProperty(this,Sp,{value:Xm}),Object.defineProperty(this,kp,{value:Ym}),Object.defineProperty(this,wp,{value:qm}),Object.defineProperty(this,xp,{value:Km}),Object.defineProperty(this,Ap,{value:Gm}),Object.defineProperty(this,bp,{value:Vm}),Object.defineProperty(this,yp,{value:Hm}),Object.defineProperty(this,vp,{value:Um}),Object.defineProperty(this,gp,{value:Wm}),Object.defineProperty(this,mp,{value:Bm}),Object.defineProperty(this,fp,{value:Mm}),Object.defineProperty(this,pp,{value:Rm}),Object.defineProperty(this,hp,{value:jm}),Object.defineProperty(this,dp,{value:Nm}),Object.defineProperty(this,cp,{value:Om}),Object.defineProperty(this,up,{value:zm}),Object.defineProperty(this,lp,{value:Lm}),Object.defineProperty(this,sp,{value:Fm}),Object.defineProperty(this,ap,{value:Im}),Object.defineProperty(this,op,{value:Pm}),Object.defineProperty(this,ip,{value:Dm}),Object.defineProperty(this,rp,{value:Tm}),Object.defineProperty(this,np,{value:_m}),Object.defineProperty(this,tp,{value:Cm}),Object.defineProperty(this,ep,{value:Em}),Object.defineProperty(this,Zh,{value:Sm}),Object.defineProperty(this,Qh,{value:km}),Object.defineProperty(this,Jh,{value:wm}),Object.defineProperty(this,$h,{value:xm}),Object.defineProperty(this,Xh,{value:Am}),Object.defineProperty(this,Yh,{value:bm}),Object.defineProperty(this,qh,{value:ym}),Object.defineProperty(this,Kh,{value:vm}),Object.defineProperty(this,Gh,{value:gm}),Object.defineProperty(this,Vh,{value:mm}),Object.defineProperty(this,Hh,{value:fm}),Object.defineProperty(this,Uh,{value:pm}),Object.defineProperty(this,Wh,{value:hm}),Object.defineProperty(this,Bh,{value:dm}),Object.defineProperty(this,Mh,{value:cm}),Object.defineProperty(this,Rh,{value:um}),Object.defineProperty(this,jh,{value:lm}),Object.defineProperty(this,Nh,{value:sm}),Object.defineProperty(this,Oh,{value:am}),Object.defineProperty(this,zh,{value:om}),Object.defineProperty(this,Lh,{value:im}),Object.defineProperty(this,Fh,{value:rm}),Object.defineProperty(this,Ih,{value:nm}),Object.defineProperty(this,Ph,{value:tm}),Object.defineProperty(this,Dh,{value:em}),Object.defineProperty(this,Th,{value:Zf}),Object.defineProperty(this,_h,{value:Qf}),Object.defineProperty(this,Ch,{value:Jf}),Object.defineProperty(this,Eh,{value:$f}),Object.defineProperty(this,Sh,{value:Xf}),Object.defineProperty(this,kh,{value:Yf}),Object.defineProperty(this,wh,{value:qf}),Object.defineProperty(this,xh,{value:Kf}),Object.defineProperty(this,Ah,{value:Gf}),Object.defineProperty(this,bh,{value:Vf}),Object.defineProperty(this,yh,{value:Hf}),Object.defineProperty(this,vh,{get:Uf,set:void 0}),Object.defineProperty(this,gh,{get:Wf,set:void 0}),Object.defineProperty(this,mh,{get:Bf,set:void 0}),Object.defineProperty(this,fh,{get:Mf,set:void 0}),Object.defineProperty(this,ph,{get:Rf,set:void 0}),Object.defineProperty(this,hh,{value:jf}),Object.defineProperty(this,dh,{value:Nf}),Object.defineProperty(this,ch,{value:Of}),Object.defineProperty(this,uh,{value:zf}),Object.defineProperty(this,lh,{value:Lf}),Object.defineProperty(this,sh,{value:Ff}),Object.defineProperty(this,ah,{value:If}),Object.defineProperty(this,oh,{value:Pf}),Object.defineProperty(this,ih,{value:Df}),Object.defineProperty(this,rh,{value:Tf}),Object.defineProperty(this,nh,{value:_f}),Object.defineProperty(this,th,{value:Cf}),Object.defineProperty(this,eh,{value:Ef}),Object.defineProperty(this,Zd,{get:Sf,set:void 0}),Object.defineProperty(this,Qd,{value:kf}),Object.defineProperty(this,Jd,{value:wf}),Object.defineProperty(this,$d,{value:xf}),Object.defineProperty(this,Xd,{value:Af}),Object.defineProperty(this,Hc,{writable:!0,value:void 0}),Object.defineProperty(this,Vc,{writable:!0,value:void 0}),Object.defineProperty(this,Gc,{writable:!0,value:!1}),Object.defineProperty(this,Kc,{writable:!0,value:!1}),Object.defineProperty(this,qc,{writable:!0,value:!1}),Object.defineProperty(this,Yc,{writable:!0,value:!1}),Object.defineProperty(this,Xc,{writable:!0,value:!1}),Object.defineProperty(this,$c,{writable:!0,value:0}),Object.defineProperty(this,Jc,{writable:!0,value:null}),Object.defineProperty(this,Qc,{writable:!0,value:null}),Object.defineProperty(this,Zc,{writable:!0,value:!1}),Object.defineProperty(this,ed,{writable:!0,value:null}),Object.defineProperty(this,td,{writable:!0,value:null}),Object.defineProperty(this,nd,{writable:!0,value:[]}),Object.defineProperty(this,rd,{writable:!0,value:void 0}),Object.defineProperty(this,id,{writable:!0,value:void 0}),Object.defineProperty(this,od,{writable:!0,value:null}),Object.defineProperty(this,ad,{writable:!0,value:o.jM6}),Object.defineProperty(this,sd,{writable:!0,value:""}),Object.defineProperty(this,ld,{writable:!0,value:{}}),Object.defineProperty(this,ud,{writable:!0,value:{}}),Object.defineProperty(this,cd,{writable:!0,value:!1}),Object.defineProperty(this,dd,{writable:!0,value:{}}),Object.defineProperty(this,hd,{writable:!0,value:null}),Object.defineProperty(this,pd,{writable:!0,value:""}),Object.defineProperty(this,fd,{writable:!0,value:!1}),Object.defineProperty(this,md,{writable:!0,value:new Map}),Object.defineProperty(this,gd,{writable:!0,value:[]}),Object.defineProperty(this,vd,{writable:!0,value:new Set}),Object.defineProperty(this,yd,{writable:!0,value:new WeakSet}),Object.defineProperty(this,bd,{writable:!0,value:new WeakMap}),Object.defineProperty(this,Ad,{writable:!0,value:new Set}),Object.defineProperty(this,xd,{writable:!0,value:new WeakMap}),Object.defineProperty(this,wd,{writable:!0,value:new Set}),Object.defineProperty(this,kd,{writable:!0,value:new WeakSet}),Object.defineProperty(this,Sd,{writable:!0,value:new WeakSet}),Object.defineProperty(this,Ed,{writable:!0,value:new WeakSet}),Object.defineProperty(this,Cd,{writable:!0,value:void 0}),Object.defineProperty(this,_d,{writable:!0,value:void 0}),Object.defineProperty(this,Td,{writable:!0,value:null}),Object.defineProperty(this,Dd,{writable:!0,value:{x:0,y:0}}),Object.defineProperty(this,Pd,{writable:!0,value:null}),Object.defineProperty(this,Id,{writable:!0,value:null}),Object.defineProperty(this,Fd,{writable:!0,value:0}),Object.defineProperty(this,Ld,{writable:!0,value:null}),Object.defineProperty(this,zd,{writable:!0,value:null}),Object.defineProperty(this,Od,{writable:!0,value:null}),Object.defineProperty(this,Nd,{writable:!0,value:null}),Object.defineProperty(this,jd,{writable:!0,value:void 0}),Object.defineProperty(this,Rd,{writable:!0,value:void 0}),Object.defineProperty(this,Md,{writable:!0,value:null}),Object.defineProperty(this,Bd,{writable:!0,value:null}),Object.defineProperty(this,Wd,{writable:!0,value:null}),Object.defineProperty(this,Ud,{writable:!0,value:null}),Object.defineProperty(this,Hd,{writable:!0,value:null}),Object.defineProperty(this,Vd,{writable:!0,value:void 0}),Object.defineProperty(this,Gd,{writable:!0,value:void 0}),Object.defineProperty(this,Kd,{writable:!0,value:void 0}),Object.defineProperty(this,qd,{writable:!0,value:new Set}),Object.defineProperty(this,Yd,{writable:!0,value:!1}),(0,Jt.A)(this,Hc)[Hc]=(0,r.A)((0,r.A)({},bf.DEFAULT_OPTIONS),n),(0,Jt.A)(this,Vc)[Vc]=(0,r.A)((0,r.A)((0,r.A)({},bf.DEFAULT_RULE),t),{},{isPlainText:!0===t.isPlainText||"true"===t.isPlainText}),(0,Jt.A)(this,gd)[gd]=(0,Jt.A)(this,op)[op](i),(0,Jt.A)(this,md)[md]=new Map((0,Jt.A)(this,Hc)[Hc].transApis.map(e=>[e.apiSlug,e])),(0,Jt.A)(this,sd)[sd]=(0,l.Sm)(),(0,Jt.A)(this,id)[id]=new RegExp(bf.BUILTIN_SKIP_PATTERNS.map(e=>"(".concat(e.source,")")).join("|")),(0,Jt.A)(this,_h)[_h]((0,Jt.A)(this,Vc)[Vc].terms),(0,Jt.A)(this,ud)[ud]=(0,l.jJ)((0,Jt.A)(this,Vc)[Vc].aiTerms),(0,Jt.A)(this,Sh)[Sh](),(0,Jt.A)(this,jd)[jd]=(0,Jt.A)(this,Fh)[Fh].bind(this),(0,Jt.A)(this,Rd)[Rd]=(0,Jt.A)(this,Lh)[Lh].bind(this),(0,Jt.A)(this,Vd)[Vd]=(0,Jt.A)(this,Th)[Th](),(0,Jt.A)(this,Gd)[Gd]=(0,Jt.A)(this,Dh)[Dh](),(0,Jt.A)(this,Kd)[Kd]=(0,Jt.A)(this,Ih)[Ih](),(0,Jt.A)(this,Md)[Md]=(0,Jt.A)(this,Ah)[Ah].bind(this),(0,Jt.A)(this,Bd)[Bd]=(0,Jt.A)(this,ap)[ap].bind(this),(0,Jt.A)(this,Wd)[Wd]=(0,Jt.A)(this,bp)[bp].bind(this),(0,Jt.A)(this,Ud)[Ud]=(0,Jt.A)(this,Ap)[Ap].bind(this),document.addEventListener(o.KDu,(0,Jt.A)(this,Bd)[Bd]),document.addEventListener("mouseover",(0,Jt.A)(this,Wd)[Wd]),document.addEventListener("mouseout",(0,Jt.A)(this,Ud)[Ud]),(0,Jt.A)(this,Hd)[Hd]=(0,l.sg)((0,Jt.A)(this,kh)[kh].bind(this),300),(0,Jt.A)(this,Hc)[Hc].mouseHoverSetting.useMouseHover&&(0,Jt.A)(this,lf)[lf](),"true"===(0,Jt.A)(this,Vc)[Vc].transOnly&&"true"===(0,Jt.A)(this,Vc)[Vc].transOnlyRevert&&(0,Jt.A)(this,cf)[cf](),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>(0,Jt.A)(this,yh)[yh]()):(0,Jt.A)(this,yh)[yh]()}toggleHoverNode(){(0,Jt.A)(this,Lh)[Lh]()}toggleMouseHover(){(0,Jt.A)(this,Yc)[Yc]?(0,Jt.A)(this,uf)[uf]():(0,Jt.A)(this,lf)[lf]()}enable(){(0,Jt.A)(this,Xc)[Xc]||((0,Jt.A)(this,Xc)[Xc]=!0,(0,Jt.A)(this,Vc)[Vc].transOpen="true",(0,Jt.A)(this,$c)[$c]++,(0,Jt.A)(this,Gc)[Gc]?(0,Jt.A)(this,mh)[mh]?this.rescan():(0,Jt.A)(this,Xh)[Xh]():(0,Jt.A)(this,bh)[bh](),"true"===(0,Jt.A)(this,Vc)[Vc].transTitle&&(0,Jt.A)(this,vf)[vf](),V.aQ&&(0,G.Ru)(o._Vq,!0))}disable(){(0,Jt.A)(this,Xc)[Xc]&&((0,Jt.A)(this,Xc)[Xc]=!1,(0,Jt.A)(this,Vc)[Vc].transOpen="false",(0,Jt.A)(this,$c)[$c]++,(0,Jt.A)(this,Np)[Np](),(0,pn.aU)(),Xt(),"true"===(0,Jt.A)(this,Vc)[Vc].transTitle&&(0,Jt.A)(this,ld)[ld].title&&(document.title=(0,Jt.A)(this,ld)[ld].title),V.aQ&&(0,G.Ru)(o._Vq,!1))}rescan(){(0,Jt.A)(this,Gc)[Gc]&&((0,Jt.A)(this,$c)[$c]++,(0,Jt.A)(this,Np)[Np](),(0,Jt.A)(this,sf)[sf](),(0,pn.aU)(),Xt(),(0,Jt.A)(this,bh)[bh]())}toggle(){(0,Jt.A)(this,Xc)[Xc]?this.disable():this.enable()}toggleTransOnly(){if((0,Jt.A)(this,Xc)[Xc]){const e="true"===(0,Jt.A)(this,Vc)[Vc].transOnly?"false":"true";this.updateRule({transOnly:e})}else(0,Jt.A)(this,Vc)[Vc].transOnly="true",this.enable()}toggleStyle(){const e=(0,Jt.A)(this,Vc)[Vc].textStyle===o.$ET?o.nsG:o.$ET;this.updateRule({textStyle:e})}toggleTransbox(){(0,Jt.A)(this,Hc)[Hc].tranboxSetting.transOpen=!(0,Jt.A)(this,Hc)[Hc].tranboxSetting.transOpen}toggleInputTranslate(){(0,Jt.A)(this,Hc)[Hc].inputRule.transOpen=!(0,Jt.A)(this,Hc)[Hc].inputRule.transOpen}stop(){document.removeEventListener(o.KDu,(0,Jt.A)(this,Bd)[Bd]),document.removeEventListener("mouseover",(0,Jt.A)(this,Wd)[Wd]),document.removeEventListener("mouseout",(0,Jt.A)(this,Ud)[Ud]),(0,Jt.A)(this,Pp)[Pp](),this.disable(),(0,Jt.A)(this,sf)[sf](),(0,Jt.A)(this,uf)[uf](),(0,Jt.A)(this,df)[df](),(0,Jt.A)(this,gf)[gf](),(0,Jt.A)(this,Gc)[Gc]=!1}updateRule(e){let t=!1,n=!1;const r=(0,Jt.A)(this,mh)[mh],i=(0,Jt.A)(this,gh)[gh];for(const r in e)Object.prototype.hasOwnProperty.call((0,Jt.A)(this,Vc)[Vc],r)&&(0,Jt.A)(this,Vc)[Vc][r]!==e[r]&&((0,Jt.A)(this,Vc)[Vc][r]=e[r],"autoScan"===r||"blockSelector"===r||"hasShadowroot"===r||"scanAll"===r||"isPlainText"===r?n=!0:t=!0);(0,Jt.A)(this,od)[od]=null,(0,Jt.A)(this,cd)[cd]=!1;const o=(0,Jt.A)(this,Xc)[Xc]&&(r!==(0,Jt.A)(this,mh)[mh]||String(i)!==String((0,Jt.A)(this,gh)[gh]));if(n||o||(0,Jt.A)(this,Xc)[Xc]&&(0,Jt.A)(this,mh)[mh])return this.rescan(),void(0,Jt.A)(this,yf)[yf]();t&&((0,Jt.A)(this,Xh)[Xh](),(0,Jt.A)(this,yf)[yf]())}get setting(){return(0,r.A)({},(0,Jt.A)(this,Hc)[Hc])}get rule(){return(0,r.A)({},(0,Jt.A)(this,Vc)[Vc])}get eventName(){return(0,Jt.A)(this,sd)[sd]}}function Af(e){if(!document.elementFromPoint||!window.scrollBy)return null;const t=[.5,.33,.66];for(const a of t){var n;const t=Math.max(0,Math.floor(window.innerWidth/2)),s=Math.max(0,Math.min(window.innerHeight-1,Math.floor(window.innerHeight*a))),l=document.elementFromPoint(t,s);let u=(0,Jt.A)(this,$d)[$d](l);for(;u&&null!=e&&e.has(u);){var r,i,o;u=u.parentElement||(null===(r=(i=u).getRootNode)||void 0===r||null===(o=r.call(i))||void 0===o?void 0:o.host)||null}if(null===(n=u)||void 0===n||!n.isConnected)continue;const c=u.getBoundingClientRect();if(c.width||c.height)return{element:u,top:c.top}}return null}function xf(e){var t,n;if(!e)return null;const r=null===(t=e.closest)||void 0===t?void 0:t.call(e,".".concat(Uc.KISS_CLASS.warpper));if(!r)return e;const{nodes:i}=(0,Jt.A)(this,bd)[bd].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 wf(e){var t;if(null==e||null===(t=e.element)||void 0===t||!t.isConnected)return;const n=document.scrollingElement||document.documentElement;if(!n)return;const r=window.getComputedStyle(n).overflowY;if(!(n.scrollHeight>n.clientHeight&&"hidden"!==r&&"clip"!==r))return;const i=e.element.getBoundingClientRect().top-e.top;Math.abs(i)>.5&&window.scrollBy(0,i)}function kf(e,t){const n=(0,Jt.A)(this,Xd)[Xd](t);try{return e()}finally{(0,Jt.A)(this,Jd)[Jd](n)}}function Sf(){var e;if("true"===(0,Jt.A)(this,Vc)[Vc].scanAll||(0,Jt.A)(this,Vc)[Vc].isPlainText)return Uc.KISS_IGNORE_SELECTOR;const t=[Uc.KISS_IGNORE_SELECTOR];"false"!==(0,Jt.A)(this,Vc)[Vc].autoScan&&t.push(Uc.BUILTIN_IGNORE_SELECTOR);const n=null===(e=(0,Jt.A)(this,Vc)[Vc].ignoreSelector)||void 0===e?void 0:e.trim();return n&&t.push(n),t.join(", ")}function Ef(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,(0,Jt.A)(this,Zd)[Zd]))}function Cf(e){var t;const n=null===(t=(0,Jt.A)(this,Vc)[Vc].blockSelector)||void 0===t?void 0:t.trim();if(!n||(0,Jt.A)(this,cd)[cd]||!Uc.isElement(e))return!1;try{return e.matches(n)}catch(e){return(0,Jt.A)(this,cd)[cd]=!0,(0,ht.h9)("invalid blockSelector",e),!1}}function _f(e,t,n){if("string"==typeof t&&t.trim())try{const n=null==e?void 0:e.style;if(!n||"object"!=typeof n||"string"!=typeof n.cssText)return;n.cssText="".concat(n.cssText||"").concat(t)}catch(e){(0,ht.h9)("append rule style error",n,e)}}function Tf(e){return!!(0,Jt.A)(this,th)[th](e)||Uc.isBlockNode(e)}function Df(e){if(!Uc.isElementOrFragment(e))return!1;for(const t of e.childNodes)if((0,Jt.A)(this,rh)[rh](t))return!0;return!1}function Pf(){const e=Number((0,Jt.A)(this,Hc)[Hc].maxLength),t=Number.isFinite(e)?Math.max(1,e-1):3e3;return Math.min(3e3,t)}function If(e,t){const n=e.slice(0,t+1);let r=-1;const i=/(?:[。!?]+|[.?!]+(?=\s+|$)|\n+)/g;let o;for(;null!==(o=i.exec(n));){const e=o.index+o[0].length;e>0&&e<=t&&(r=e)}if(r>Math.floor(.4*t))return r;for(let n=t;n>Math.floor(.4*t);n--)if(/\s/.test(e[n-1]))return n;return t}function Ff(e,t){let n=0,r=t;for(;r<e.length;){const t=e[r];if("\r"===t)n++,r+="\n"===e[r+1]?2:1;else{if("\n"!==t)break;n++,r++}}return n?{count:n,nextOffset:r}:null}function Lf(e,t){let n=t;for(;n<e.length;){const t=e[n];if("\r"===t||"\n"===t)break;n++}return n}function zf(e,t,n){if(t>=e.length)return null;const r=(0,Jt.A)(this,sh)[sh](e,t);if(r)return{type:"break",count:Math.max(0,r.count-1),nextOffset:r.nextOffset};const i=(0,Jt.A)(this,lh)[lh](e,t);if(i-t<=n)return{type:"text",value:e.slice(t,i),nextOffset:i};const o=(0,Jt.A)(this,ah)[ah](e.slice(t,i),n);return{type:"text",value:e.slice(t,t+o),nextOffset:t+o}}function Of(e){if("text"!==e.type||!e.value)return null;const t=document.createElement("span");return t.style.cssText="display: block; white-space: pre-wrap;",t.textContent=e.value,t}function Nf(e,t){var n,r;let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.runId!==(0,Jt.A)(this,$c)[$c]||!e.isConnected||!(0,Jt.A)(this,Vc)[Vc].isPlainText)return void(0,Jt.A)(this,Ed)[Ed].delete(e);const o=(0,Jt.A)(this,oh)[oh](),a=i?20:100,s=i?1/0:10,u=(null===(n=(r=performance).now)||void 0===n?void 0:n.call(r))||Date.now(),c=document.createDocumentFragment(),d=[];let h=0;for(;(t.offset<t.source.length||t.pendingBreaks>0)&&h<a;){var p,f;if(t.pendingBreaks>0){c.appendChild(document.createElement("br")),t.pendingBreaks--,h++;continue}const e=(0,Jt.A)(this,uh)[uh](t.source,t.offset,o);if(!e)break;if(t.offset=e.nextOffset,"break"===e.type)t.pendingBreaks+=e.count;else{const t=(0,Jt.A)(this,ch)[ch](e);t&&(c.appendChild(t),d.push(t),h++)}if(!i&&h>0&&((null===(p=(f=performance).now)||void 0===p?void 0:p.call(f))||Date.now())-u>=s)break}c.childNodes.length&&(e.appendChild(c),d.forEach(e=>(0,Jt.A)(this,Qh)[Qh](e))),t.offset<t.source.length||t.pendingBreaks>0?(0,l.IO)(()=>(0,Jt.A)(this,dh)[dh](e,t),100):(0,Jt.A)(this,Ed)[Ed].delete(e)}function jf(e){if("true"===e.dataset.kissPreprocessed)return;const t={source:e.textContent||"",offset:0,runId:(0,Jt.A)(this,$c)[$c],pendingBreaks:0};e.dataset.kissPreprocessed="true",(0,Jt.A)(this,Ed)[Ed].add(e),e.replaceChildren(),(0,Jt.A)(this,dh)[dh](e,t,!0)}function Rf(){return(0,Jt.A)(this,md)[md].get((0,Jt.A)(this,Vc)[Vc].apiSlug)||o.iVS}function Mf(){var e;const t=null===(e=(0,Jt.A)(this,Hc)[Hc].mouseHoverSetting)||void 0===e?void 0:e.apiSlug;if(!t||t===o.WL9)return(0,Jt.A)(this,ph)[ph];const n=(0,Jt.A)(this,md)[md].get(t);return n&&!n.isDisabled?n:(0,Jt.A)(this,ph)[ph]}function Bf(){var e;const t=null===(e=(0,Jt.A)(this,md)[md].get((0,Jt.A)(this,Vc)[Vc].apiSlug))||void 0===e?void 0:e.transAllnow;return void 0!==t?!0===t||"true"===t:!0===(0,Jt.A)(this,Hc)[Hc].transAllnow||"true"===(0,Jt.A)(this,Hc)[Hc].transAllnow}function Wf(){var e;const t=null===(e=(0,Jt.A)(this,md)[md].get((0,Jt.A)(this,Vc)[Vc].apiSlug))||void 0===e?void 0:e.rootMargin,n=(0,Jt.A)(this,Hc)[Hc].rootMargin,r=Number(void 0!==t&&""!==t?t:void 0!==n&&""!==n?n:500);return Number.isFinite(r)?r:500}function Uf(){if((0,Jt.A)(this,od)[od])return(0,Jt.A)(this,od)[od];const[e,t]=(0,Jt.A)(this,ph)[ph].placeholder.split(" ");let n=(0,Jt.A)(this,ph)[ph].placetag;Array.isArray(n)&&(n=n[0]||"i"),"string"!=typeof n&&(n="i");const r=(0,Jt.A)(this,ph)[ph].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=Uc.escapeRegex(e),s=Uc.escapeRegex(t),l="".concat(a,"\\d+").concat(s),u={startDelimiter:e,endDelimiter:t,tagName:n,format:r,safeTag:"span",openRegex:i,closeRegex:o,placeholderRegex:new RegExp(l,"g")};return(0,Jt.A)(this,od)[od]=u,u}function Hf(){"true"===(0,Jt.A)(this,Vc)[Vc].transOpen?this.enable():(0,Jt.A)(this,Hc)[Hc].preInit&&(0,Jt.A)(this,bh)[bh]()}function Vf(){(0,Jt.A)(this,Gc)[Gc]=!0,(0,Jt.A)(this,mf)[mf](),(0,Jt.A)(this,Vc)[Vc].isPlainText&&document.querySelectorAll("pre").forEach(e=>{(0,Jt.A)(this,hh)[hh](e)}),document.querySelectorAll((0,Jt.A)(this,Vc)[Vc].rootsSelector||"body").forEach(e=>{(0,Jt.A)(this,Jh)[Jh](e)}),"true"!==(0,Jt.A)(this,Vc)[Vc].scanAll&&"true"!==(0,Jt.A)(this,Vc)[Vc].hasShadowroot||((0,Jt.A)(this,xh)[xh](),(0,Jt.A)(this,kh)[kh]())}function Gf(e){var t;"KISS_SHADOW_ROOT_CREATED"===(null===(t=e.data)||void 0===t?void 0:t.type)&&(0,Jt.A)(this,Hd)[Hd]()}function Kf(){if(!(0,Jt.A)(this,qc)[qc]){vc(mc,"kiss-translator-inject-shadowroot-js"),(0,Jt.A)(this,qc)[qc]=!0}window.addEventListener("message",(0,Jt.A)(this,Md)[Md])}function qf(){window.removeEventListener("message",(0,Jt.A)(this,Md)[Md])}function Yf(){try{(0,Jt.A)(this,Vh)[Vh]().forEach(e=>{(0,Jt.A)(this,$h)[$h](e)})}catch(e){(0,ht.h9)("findAllShadowRoots",e)}}function Xf(){const[e,t]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=Nc();e.forEach(e=>{t[e.styleSlug]=e.styleCode});const n={};let r="";return Object.entries(t).forEach(e=>{let[t,r]=e;n[t]=Ic(_c||(_c=bc(["\n      ","\n    "])),r)}),Object.entries(t).forEach(e=>{let[t,i]=e;r+="\n      .".concat(n[t]," {\n        ").concat(i,"\n      }\n    ")}),[n,r]}((0,Jt.A)(this,Hc)[Hc].customStyles);(0,Jt.A)(this,dd)[dd]=e,(0,Jt.A)(this,pd)[pd]=t;try{const e=new CSSStyleSheet;e.replaceSync(t),(0,Jt.A)(this,hd)[hd]=e}catch(e){(0,ht.h9)("createTextStyles: CSSStyleSheet not available",e),(0,Jt.A)(this,fd)[fd]=!0}}function $f(e){if(!(0,Jt.A)(this,fd)[fd]&&(0,Jt.A)(this,hd)[hd])try{e.adoptedStyleSheets.includes((0,Jt.A)(this,hd)[hd])||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,(0,Jt.A)(this,hd)[hd]])}catch(t){(0,Jt.A)(this,fd)[fd]=!0,(0,Jt.A)(this,Ch)[Ch](e)}else(0,Jt.A)(this,Ch)[Ch](e)}function Jf(e){const t="".concat(o.jM6,"-fallback-style");if(e.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent=(0,Jt.A)(this,pd)[pd]||"",e.append(n)}function Qf(e){if((0,Jt.A)(this,nd)[nd]=[],(0,Jt.A)(this,rd)[rd]=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,")")),(0,Jt.A)(this,nd)[nd].push(o)}catch(e){(0,ht.h9)('Invalid RegExp for term: "'.concat(i,'"'),e)}}t.length>0&&((0,Jt.A)(this,rd)[rd]=new RegExp(t.join("|"),"g"))}function Zf(){const{transInterval:e}=(0,Jt.A)(this,Hc)[Hc],t=(0,Jt.A)(this,gh)[gh],n=new Set,r=(0,l.sg)(()=>{n.forEach(e=>(0,Jt.A)(this,af)[af](e)),n.clear()},e);return new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?((0,Jt.A)(this,Ad)[Ad].add(e.target),n.add(e.target),r()):(0,Jt.A)(this,Ad)[Ad].delete(e.target)})},{threshold:.01,rootMargin:"".concat(t,"px 0px ").concat(t,"px 0px")})}function em(){return new MutationObserver(e=>{for(const r of e){var t,n;if(!((0,Jt.A)(this,Sd)[Sd].has(r.target)||(0,Jt.A)(this,kd)[kd].has(r.target)||(0,Jt.A)(this,Ed)[Ed].has(r.target)||(null===(t=r.nextSibling)||void 0===t||null===(n=t.tagName)||void 0===n?void 0:n.toLowerCase())===(0,Jt.A)(this,ad)[ad]))if("characterData"===r.type)r.oldValue===r.target.nodeValue||(0,Jt.A)(this,id)[id].test(r.target.nodeValue)||(0,Jt.A)(this,Kh)[Kh](r.target.parentElement);else if("childList"===r.type){let e=new Set,t=!1;r.addedNodes.forEach(n=>{var r;(0,Jt.A)(this,kd)[kd].has(n)||(null===(r=n.nodeName)||void 0===r?void 0:r.toLowerCase())===(0,Jt.A)(this,ad)[ad]||(n.nodeType===Node.TEXT_NODE?t=!0:Uc.isElementOrFragment(n)&&e.add(n))}),t?(0,Jt.A)(this,Kh)[Kh](r.target):e.forEach(e=>(0,Jt.A)(this,Kh)[Kh](e))}}})}function tm(e,t){const n=e.filter(e=>e instanceof Node);n.forEach(e=>(0,Jt.A)(this,Sd)[Sd].add(e));try{return t()}finally{queueMicrotask(()=>{n.forEach(e=>(0,Jt.A)(this,Sd)[Sd].delete(e))})}}function nm(){return(0,l.sg)(e=>{var t,n,r,i;const o=e,a=null===(t=o.closest)||void 0===t?void 0:t.call(o,".".concat(Uc.KISS_CLASS.highlight));if(a&&(0,Jt.A)(this,up)[up](a))return(0,Jt.A)(this,Td)[Td]=null,void(0,Jt.A)(this,Mh)[Mh]();const s=null===(n=o.closest)||void 0===n?void 0:n.call(o,".".concat(Uc.KISS_CLASS.warpper)),{mouseHoverKey:l=[],mouseHoverKey2:u=[]}=(0,Jt.A)(this,Hc)[Hc].mouseHoverSetting,c=l.length>0||u.length>0;if(s)return(0,Jt.A)(this,Td)[Td]=s,void((0,Jt.A)(this,jh)[jh](s)?c?((0,Jt.A)(this,Mh)[Mh](),(0,Jt.A)(this,Id)[Id]!==s&&(0,Jt.A)(this,Pp)[Pp]()):(0,Jt.A)(this,Bh)[Bh](s):(0,Jt.A)(this,Pp)[Pp]());((0,Jt.A)(this,Nd)[Nd]||null!==(r=(0,Jt.A)(this,Id)[Id])&&void 0!==r&&null!==(i=r.classList)&&void 0!==i&&i.contains(Uc.KISS_CLASS.warpper))&&(0,Jt.A)(this,Pp)[Pp]();let d=null;for(;e&&e!==document.body;){if((0,Jt.A)(this,yd)[yd].has(e)){d=e;break}e=e.parentElement}(0,Jt.A)(this,Td)[Td]=d||o,c||(0,Jt.A)(this,Gc)[Gc]||(0,Jt.A)(this,bh)[bh](),!c&&d?(0,Jt.A)(this,zh)[zh](d):!d&&(0,Jt.A)(this,Oh)[Oh]()&&(0,Jt.A)(this,Pp)[Pp]()},100)}function rm(e){(0,Jt.A)(this,Dd)[Dd]={x:e.clientX,y:e.clientY},(0,Jt.A)(this,Oh)[Oh]()&&(0,Jt.A)(this,Pd)[Pd]&&!(0,Jt.A)(this,Pd)[Pd].hidden&&(0,Jt.A)(this,Tp)[Tp]();let t=e.composedPath()[0];(0,Jt.A)(this,Kd)[Kd](t)}function im(){(0,Jt.A)(this,Gc)[Gc]||(0,Jt.A)(this,bh)[bh]();let e=(0,Jt.A)(this,Td)[Td];(0,Jt.A)(this,jh)[jh](e)?(0,Jt.A)(this,Wh)[Wh](e):e&&(0,Jt.A)(this,yd)[yd].has(e)&&(0,Jt.A)(this,zh)[zh](e)}function om(e){if((0,Jt.A)(this,Oh)[Oh]())(0,Jt.A)(this,Ip)[Ip](e);else if((0,Jt.A)(this,xd)[xd].has(e)){if(Array.from((0,Jt.A)(this,Op)[Op](e)).some(e=>!(0,Jt.A)(this,bd)[bd].has(e)))return;(0,Jt.A)(this,Mp)[Mp](e)}else(0,Jt.A)(this,tp)[tp](e)}function am(){var e;return(null===(e=(0,Jt.A)(this,Hc)[Hc].mouseHoverSetting)||void 0===e?void 0:e.displayMode)===o.H74}function sm(){return(0,Jt.A)(this,Yc)[Yc]&&(0,Jt.A)(this,Oh)[Oh]()&&"true"===(0,Jt.A)(this,Vc)[Vc].transOnly}function lm(e){var t,n;if(!(0,Jt.A)(this,Nh)[Nh]()||null==e||null===(t=e.classList)||void 0===t||!t.contains(Uc.KISS_CLASS.warpper))return!1;const r=(0,Jt.A)(this,bd)[bd].get(e);return Boolean((null==r?void 0:r.isHide)&&(null===(n=r.nodes)||void 0===n?void 0:n.length))}function um(e){const{nodes:t=[]}=(0,Jt.A)(this,bd)[bd].get(e)||{};return t.map(e=>e.textContent||"").join("").trim()}function cm(){(0,Jt.A)(this,Od)[Od]&&(clearTimeout((0,Jt.A)(this,Od)[Od]),(0,Jt.A)(this,Od)[Od]=null),(0,Jt.A)(this,Nd)[Nd]=null}function dm(e){var t;if((0,Jt.A)(this,Id)[Id]===e&&null!==(t=(0,Jt.A)(this,Pd)[Pd])&&void 0!==t&&t.isConnected)return;if((0,Jt.A)(this,Nd)[Nd]===e)return;(0,Jt.A)(this,Pp)[Pp]();const n=parseFloat((0,Jt.A)(this,Vc)[Vc].transOnlyRevertDelay),r=Number.isFinite(n)?Math.max(0,n):.5;(0,Jt.A)(this,Nd)[Nd]=e,(0,Jt.A)(this,Od)[Od]=setTimeout(()=>{(0,Jt.A)(this,Od)[Od]=null,(0,Jt.A)(this,Nd)[Nd]=null,(0,Jt.A)(this,Td)[Td]===e&&(0,Jt.A)(this,jh)[jh](e)&&(0,Jt.A)(this,Wh)[Wh](e)},1e3*r)}function hm(e){(0,Jt.A)(this,Mh)[Mh]();const t=(0,Jt.A)(this,Rh)[Rh](e);t?((0,Jt.A)(this,Pp)[Pp](),(0,Jt.A)(this,Id)[Id]=e,(0,Jt.A)(this,Dp)[Dp](t)):(0,Jt.A)(this,Pp)[Pp]()}function pm(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&&e instanceof HTMLElement?globalThis.chrome.dom.openOrClosedShadowRoot(e):e.shadowRoot}function fm(e){var t,n;return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE&&((null===(t=e.matches)||void 0===t?void 0:t.call(e,Uc.KISS_IGNORE_SELECTOR))||(null===(n=e.closest)||void 0===n?void 0:n.call(e,Uc.KISS_IGNORE_SELECTOR)))}function mm(){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;if((0,Jt.A)(this,Hh)[Hh](e))continue;const r=(0,Jt.A)(this,Uh)[Uh](e);r&&(t.add(r),(0,Jt.A)(this,Vh)[Vh](r,t))}}catch(e){(0,ht.h9)("无法访问某个 shadowRoot",e)}return t}function gm(e){var t;if(!Uc.isElementOrFragment(e)||null!==(t=e.closest)&&void 0!==t&&t.call(e,(0,Jt.A)(this,Zd)[Zd]))return null;let n=e;for(;n&&n!==document.body;){var r;if(null!==(r=n.classList)&&void 0!==r&&r.contains(Uc.KISS_CLASS.original))n=n.parentElement;else{if((0,Jt.A)(this,rh)[rh](n)||(0,Jt.A)(this,yd)[yd].has(n))for(const e of(0,Jt.A)(this,wd)[wd])if(e.contains(n))return n;n=n.parentElement}}return null}function vm(e){(0,Jt.A)(this,qd)[qd].add(e),(0,Jt.A)(this,Yd)[Yd]||((0,Jt.A)(this,Yd)[Yd]=!0,(0,l.IO)(()=>{(0,Jt.A)(this,qd)[qd].forEach(e=>(0,Jt.A)(this,qh)[qh](e)),(0,Jt.A)(this,qd)[qd].clear(),(0,Jt.A)(this,Yd)[Yd]=!1},100))}function ym(e){const t=(0,Jt.A)(this,Gh)[Gh](e);t&&((0,Jt.A)(this,xd)[xd].delete(t),(0,Jt.A)(this,Rp)[Rp](t),(0,Jt.A)(this,ep)[ep](t))}function bm(e){(0,Jt.A)(this,Vd)[Vd].unobserve(e),(0,Jt.A)(this,Vd)[Vd].observe(e)}function Am(){(0,Jt.A)(this,Ad)[Ad].forEach(e=>(0,Jt.A)(this,Yh)[Yh](e))}function xm(e){try{if(e.host.matches("#".concat(o.Reo.fabID,", #").concat(o.Reo.boxID)))return;(0,Jt.A)(this,Jh)[Jh](e),(0,Jt.A)(this,Eh)[Eh](e)}catch(e){(0,ht.h9)("startObserveShadowRoot",e)}}function wm(e){(0,Jt.A)(this,wd)[wd].has(e)||((0,Jt.A)(this,wd)[wd].add(e),(0,Jt.A)(this,Gd)[Gd].observe(e,{childList:!0,subtree:!0,characterData:!0,characterDataOldValue:!0}),(0,Jt.A)(this,ep)[ep](e))}function km(e){if(Uc.isElement(e))return(0,Jt.A)(this,Yp)[Yp](e)?((0,Jt.A)(this,Vc)[Vc].highlightWords!==o.vwl&&(0,Jt.A)(this,Vc)[Vc].highlightWords!==o.AXe||(0,Jt.A)(this,vd)[vd].add(e),void((0,Jt.A)(this,yd)[yd].has(e)||((0,Jt.A)(this,yd)[yd].add(e),(0,Jt.A)(this,Vd)[Vd].observe(e)))):((0,Jt.A)(this,Vc)[Vc].highlightWords===o.vwl&&((0,Jt.A)(this,vd)[vd].add(e),(0,Jt.A)(this,rp)[rp](e)),!(0,Jt.A)(this,yd)[yd].has(e)&&(0,Jt.A)(this,Xc)[Xc]&&(0,Jt.A)(this,mh)[mh]?((0,Jt.A)(this,yd)[yd].add(e),void(0,Jt.A)(this,tp)[tp](e)):(0,Jt.A)(this,yd)[yd].has(e)?void(!(0,Jt.A)(this,xd)[xd].has(e)&&(0,Jt.A)(this,Ad)[Ad].has(e)&&(0,Jt.A)(this,Yh)[Yh](e)):((0,Jt.A)(this,yd)[yd].add(e),void(0,Jt.A)(this,Vd)[Vd].observe(e)))}function Sm(e){var t;null!==(t=e.matches)&&void 0!==t&&t.call(e,(0,Jt.A)(this,Vc)[Vc].selector)&&(0,Jt.A)(this,Qh)[Qh](e),e.querySelectorAll((0,Jt.A)(this,Vc)[Vc].selector).forEach(e=>{var t;null!==(t=e.closest)&&void 0!==t&&t.call(e,(0,Jt.A)(this,Zd)[Zd])||(0,Jt.A)(this,Qh)[Qh](e)})}function Em(e){var t;if(!Uc.isElementOrFragment(e)||null!==(t=e.matches)&&void 0!==t&&t.call(e,(0,Jt.A)(this,Zd)[Zd]))return;if("false"===(0,Jt.A)(this,Vc)[Vc].autoScan)return void(0,Jt.A)(this,Zh)[Zh](e);const n=Uc.hasTextNode(e);if(!n&&1===e.children.length){var r;const t=e.children[0];if(null===(r=t.classList)||void 0===r||!r.contains(Uc.KISS_CLASS.warpper))return void(0,Jt.A)(this,ep)[ep](t)}const i=(0,Jt.A)(this,ih)[ih](e);if(!n&&i||(0,Jt.A)(this,Qh)[Qh](e),i)for(const t of e.children){const e=(0,Jt.A)(this,rh)[rh](t);n&&!e||(0,Jt.A)(this,ep)[ep](t)}}async function Cm(e){if((0,Jt.A)(this,xd)[xd].has(e)||!Uc.isElementOrFragment(e))return;if((0,Jt.A)(this,xd)[xd].set(e,(0,r.A)({},(0,Jt.A)(this,Vc)[Vc])),(0,Jt.A)(this,fp)[fp](e.textContent))return;let t="";const{fromLang:n="auto",toLang:i,splitParagraph:a=o.TWY,splitLength:s=100}=(0,Jt.A)(this,Vc)[Vc],{langDetector:l,skipLangs:u=[],translateVariants:c=!0}=(0,Jt.A)(this,Hc)[Hc];if("auto"===n&&(t=await Wc(e.textContent,l),t&&(U(t,i,c)||u.includes(t))))return;a!==o.TWY&&(0,Jt.A)(this,cp)[cp](e,a,s);let d=[];[...e.childNodes].forEach(n=>{const r=(0,Jt.A)(this,pp)[pp](n),i=n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE;!r&&i?d.push(n):r&&d.length&&((0,Jt.A)(this,yp)[yp](d,e,t),d=[])}),d.length&&(0,Jt.A)(this,yp)[yp](d,e,t)}function _m(e,t){var n;if(null!==(n=e.parentElement)&&void 0!==n&&n.closest(".".concat(Uc.KISS_CLASS.highlight,", ").concat(Uc.KISS_IGNORE_SELECTOR)))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=Uc.KISS_CLASS.highlight,t.dataset.kissFavoriteWord=(0,Jt.A)(this,ip)[ip](e),t.style.cssText=(0,Jt.A)(this,Vc)[Vc].highlightStyle||"",t.textContent=e,(0,Jt.A)(this,kd)[kd].add(t),i.push(t)}else{const t=document.createTextNode(e);(0,Jt.A)(this,kd)[kd].add(t),i.push(t)}}),i.length>0&&e.replaceWith(...i)}function Tm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,Jt.A)(this,gd)[gd];if(!e||0===t.length)return;const n=t.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r=new RegExp("\\b(".concat(n.join("|"),")\\b"),"gi");if(e.nodeType===Node.ELEMENT_NODE){const t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>{var t;return null!==(t=e.parentElement)&&void 0!==t&&t.closest(".".concat(Uc.KISS_CLASS.highlight,", ").concat(Uc.KISS_IGNORE_SELECTOR))?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1),n=[];let i;for(;i=t.nextNode();)n.push(i);n.forEach(e=>{(0,Jt.A)(this,np)[np](e,r)})}else e.nodeType===Node.TEXT_NODE&&(0,Jt.A)(this,np)[np](e,r)}function Dm(e){return"string"==typeof e?e.trim().toLowerCase():""}function Pm(e){const t=new Set;return(Array.isArray(e)?e:[]).filter(e=>{const n=(0,Jt.A)(this,ip)[ip](e);return!(!n||t.has(n))&&(t.add(n),!0)})}function Im(e){const{word:t,isFavorite:n}=e.detail||{},r=(0,Jt.A)(this,ip)[ip](t);r&&"boolean"==typeof n&&(n?(0,Jt.A)(this,gd)[gd].some(e=>(0,Jt.A)(this,ip)[ip](e)===r)||((0,Jt.A)(this,gd)[gd]=[...(0,Jt.A)(this,gd)[gd],t.trim()]):(0,Jt.A)(this,gd)[gd]=(0,Jt.A)(this,gd)[gd].filter(e=>(0,Jt.A)(this,ip)[ip](e)!==r),(0,Jt.A)(this,Vc)[Vc].highlightWords!==o.vwl&&(0,Jt.A)(this,Vc)[Vc].highlightWords!==o.AXe||(n?(0,Jt.A)(this,vd)[vd].forEach(e=>{(0,Jt.A)(this,rp)[rp](e,[t.trim()])}):(0,Jt.A)(this,sp)[sp](r)))}function Fm(e){const t=new Set;(0,Jt.A)(this,vd)[vd].forEach(n=>{var r,i;null!==(r=n.matches)&&void 0!==r&&r.call(n,".".concat(Uc.KISS_CLASS.highlight))&&n.dataset.kissFavoriteWord===e&&t.add(n),null===(i=n.querySelectorAll)||void 0===i||i.call(n,".".concat(Uc.KISS_CLASS.highlight)).forEach(n=>{n.dataset.kissFavoriteWord===e&&t.add(n)})}),t.forEach(e=>{const t=document.createTextNode(e.textContent||"");(0,Jt.A)(this,kd)[kd].add(t),e.replaceWith(t),(0,Jt.A)(this,lp)[lp](t)})}function Lm(e){let t=e;const n=t.previousSibling;(null==n?void 0:n.nodeType)===Node.TEXT_NODE&&((0,Jt.A)(this,kd)[kd].add(n),n.nodeValue+=t.nodeValue,t.remove(),t=n);const r=t.nextSibling;(null==r?void 0:r.nodeType)===Node.TEXT_NODE&&((0,Jt.A)(this,kd)[kd].add(t),t.nodeValue+=r.nodeValue,r.remove())}function zm(e){for(const n of(0,Jt.A)(this,vd)[vd]){var t;if(n===e||null!==(t=n.contains)&&void 0!==t&&t.call(n,e))return!0}return!1}function Om(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(0,Jt.A)(this,kd)[kd].add(t),t});e.replaceWith(...s)});const i=/(?:[。!??!]+|(?<!\d)\.)\s*$/;let a=0;[...e.childNodes].forEach(e=>{var r,s;a+=e.textContent.length;if(i.test(e.textContent)&&"BR"!==(null===(r=e.nextSibling)||void 0===r||null===(s=r.nodeName)||void 0===s?void 0:s.toUpperCase())&&(t===o.J5R||t===o.a7S&&a>=n)){a=0;const t=document.createElement("br");t.className=Uc.KISS_CLASS.br,(0,Jt.A)(this,kd)[kd].add(t),e.after(t)}})}function Nm(e){if(!e)return;e.querySelectorAll(".".concat(Uc.KISS_CLASS.highlight)).forEach(e=>{const t=document.createTextNode(e.textContent);e.replaceWith(t)}),e.normalize()}function jm(e){e&&(e.querySelectorAll(".".concat(Uc.KISS_CLASS.br)).forEach(e=>e.remove()),e.normalize())}function Rm(e){var t,n,r;if(!Uc.isElementOrFragment(e))return!1;let i=!1;try{i=e.matches((0,Jt.A)(this,Vc)[Vc].keepSelector)}catch(e){(0,ht.h9)("keepSelector match error in shouldBreak",(0,Jt.A)(this,Vc)[Vc].keepSelector,e)}return!i&&(!!(Uc.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,(0,Jt.A)(this,Zd)[Zd])||(null===(r=e.nodeName)||void 0===r?void 0:r.toLowerCase())===(0,Jt.A)(this,ad)[ad])||(!("true"!==(0,Jt.A)(this,Vc)[Vc].autoScan||!(0,Jt.A)(this,rh)[rh](e))||!("false"!==(0,Jt.A)(this,Vc)[Vc].autoScan||!e.matches((0,Jt.A)(this,Vc)[Vc].selector)&&!e.querySelector((0,Jt.A)(this,Vc)[Vc].selector))))}function Mm(e){if("string"!=typeof e)return!0;const t=e.trim();return!t||(t.length<(0,Jt.A)(this,Hc)[Hc].minLength||t.length>(0,Jt.A)(this,Hc)[Hc].maxLength||(1===t.length&&!t.match(/[a-zA-Z]/)||(!(isNaN(parseFloat(t))||!isFinite(t))||!!(0,Jt.A)(this,id)[id].test(t))))}function Bm(e){if(e instanceof Error){const t=e.name?"[".concat(e.name,"]"):"[UnknownError]",n=e.message?" ".concat(e.message):"";return"".concat(t).concat(n,"\n").concat(e.stack||"")}if("string"==typeof e)return e;try{return JSON.stringify(e)||String(e)}catch(t){return String(e)}}async function Wm(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 Um(e,t){var n,r,i;const a=(0,o.BM1)((0,Jt.A)(this,Hc)[Hc].uiLang||"zh")("copy")||"Copy",s="dark"===(0,Jt.A)(this,Hc)[Hc].darkMode||"auto"===(0,Jt.A)(this,Hc)[Hc].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),l=s?"#1f1f23":"#ffffff",u=s?"rgba(255, 255, 255, 0.82)":"rgba(0, 0, 0, 0.78)",c=s?"rgba(32, 156, 238, 0.45)":"rgba(32, 156, 238, 0.28)",d=s?"0 8px 24px rgba(0, 0, 0, 0.42)":"0 8px 24px rgba(0, 0, 0, 0.16)",h=s?"#ff8a80":"#d32f2f",p=s?"rgba(32, 156, 238, 0.14)":"rgba(32, 156, 238, 0.08)",f=s?"rgba(32, 156, 238, 0.24)":"rgba(32, 156, 238, 0.16)",m=document.createElement("span");m.style.cssText="position: relative; display: inline-flex; align-items: center; vertical-align: middle;";const g=function(){const e=Ll("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=Ll("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(Uc.KISS_CLASS.retry),g.setAttribute("role","button"),g.setAttribute("tabindex","0");const v=document.createElement("span");v.className="notranslate",v.setAttribute("translate","no"),v.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(l),"color: ".concat(u),"box-shadow: ".concat(d),"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 y=document.createElement("span");y.textContent=e,y.style.cssText="color: ".concat(h,";");const b=document.createElement("button");b.type="button",b.textContent=a,b.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(p),"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("; "),b.addEventListener("mouseenter",()=>{b.style.background=f,b.style.borderColor="rgba(32, 156, 238, 0.55)"}),b.addEventListener("mouseleave",()=>{b.style.background=p,b.style.borderColor="rgba(32, 156, 238, 0.35)"}),b.addEventListener("click",async t=>{t.stopPropagation(),t.preventDefault();try{await(0,Jt.A)(this,gp)[gp](e),b.textContent="OK",setTimeout(()=>{b.textContent=a},800)}catch(e){(0,ht.h9)("copy translate error: ",(0,Jt.A)(this,mp)[mp](e))}});let A=null;const x=()=>{A&&(clearTimeout(A),A=null)},w=()=>{if(!m.isConnected)return void S();const e=m.getBoundingClientRect(),t=v.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),v.style.left="".concat(Math.max(8,Math.min(a,i)),"px"),v.style.top="".concat(Math.max(8,Math.min(s,o)),"px"),v.style.visibility="visible"},k=()=>{x(),v.isConnected||document.body.appendChild(v),v.style.display="block",v.style.visibility="hidden",w(),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w)},S=()=>{x(),window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w),v.style.display="none",v.style.visibility="hidden",v.remove()},E=()=>{x(),A=setTimeout(()=>{const e=document.activeElement;m.matches(":hover")||v.matches(":hover")||m.contains(e)||v.contains(e)||S()},80)};return m.addEventListener("mouseenter",k),m.addEventListener("mouseleave",E),m.addEventListener("focusin",k),m.addEventListener("focusout",e=>{v.contains(e.relatedTarget)||m.contains(e.relatedTarget)||E()}),v.addEventListener("mouseenter",k),v.addEventListener("mouseleave",E),v.addEventListener("focusin",k),v.addEventListener("focusout",e=>{m.contains(e.relatedTarget)||v.contains(e.relatedTarget)||E()}),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())}),v.appendChild(y),v.appendChild(b),m.appendChild(g),m}async function Hm(e,t,n){const{transTag:r,textStyle:i,transEndHook:a,transOnly:s,termsStyle:l,textExtStyle:u,selectStyle:c,parentStyle:d,grandStyle:h,toLang:p,highlightWords:f,transOrder:m="original-first",wrapOriginal:g,originalTextStyle:v}=(0,Jt.A)(this,Vc)[Vc],{newlineLength:y}=(0,Jt.A)(this,Hc)[Hc],b=t.parentElement,A="true"===s;try{const[s,x]=(0,Jt.A)(this,Fp)[Fp](e,l);if((0,Jt.A)(this,fp)[fp](s))return;const w=document.createElement((0,Jt.A)(this,ad)[ad]);w.className="".concat(Uc.KISS_CLASS.warpper," notranslate");const k=document.createElement(r);if(k.lang=p,k.className="".concat(Uc.KISS_CLASS.inner," ").concat((0,Jt.A)(this,dd)[dd][i]||""),null!=u&&u.trim()&&(k.style.cssText=u),k.appendChild(zl()),s.length>y){const e=document.createElement("br");e.hidden=A,"translation-first"===m?(w.appendChild(k),w.appendChild(e)):(w.appendChild(e),w.appendChild(k))}else{const e=document.createElement("span");e.textContent=" ",e.className=Uc.KISS_CLASS.space,e.hidden=A,"translation-first"===m?(w.appendChild(k),w.appendChild(e)):(w.appendChild(e),w.appendChild(k))}(0,Jt.A)(this,Qd)[Qd](()=>{"translation-first"===m?e[0].before(w):e[e.length-1].after(w)});const S=(0,Jt.A)(this,$c)[$c],E="disabled"!==((0,Jt.A)(this,ph)[ph].streamRenderMode||"disabled")&&(0,Jt.A)(this,ph)[ph].useStream&&o.sNP.stream.has((0,Jt.A)(this,ph)[ph].apiType);let C=null,_="",T=!1;const D=k,P=()=>{if(T){const e=D.firstChild;e&&(e.nodeValue=_)}else D.textContent="",D.appendChild(document.createTextNode(_)),T=!0;C=null},I=E?e=>{if((0,Jt.A)(this,$c)[$c]!==S)return;const{text:t,isComplete:n}=e;t&&(n?(_=Array.isArray(t)?t[0]:t,C&&(cancelAnimationFrame(C),C=null),P()):(_=t,C||(C=requestAnimationFrame(P))))}:null,{trText:F,isSame:L}=await(0,Jt.A)(this,zp)[zp](s,n,I);if(C&&(cancelAnimationFrame(C),C=null),(0,Jt.A)(this,$c)[$c]!==S)throw new Error("Request terminated");if(!F||L)return void(0,Jt.A)(this,Qd)[Qd](()=>{w.remove()});const z=(0,Jt.A)(this,Lp)[Lp](F,x),O=at.createHTML(z);(0,Jt.A)(this,Qd)[Qd](()=>{k.innerHTML=O});let N=null;"true"===g&&(0,Jt.A)(this,Qd)[Qd](()=>{N=(0,Jt.A)(this,Vp)[Vp](e,v)});const j={nodes:e,originalWrapper:N,isHide:A};if((0,Jt.A)(this,bd)[bd].set(w,j),A&&(0,Jt.A)(this,Qd)[Qd](()=>{(0,Jt.A)(this,Jp)[Jp](j,w)}),(0,Jt.A)(this,nh)[nh](t,c,"selectStyle"),(0,Jt.A)(this,nh)[nh](b,d,"parentStyle"),(0,Jt.A)(this,nh)[nh](null==b?void 0:b.parentElement,h,"grandStyle"),f===o.AXe&&((0,Jt.A)(this,vd)[vd].add(t),e.forEach(e=>(0,Jt.A)(this,rp)[rp](e))),null!=a&&a.trim())try{ee.run("exports.transEndHook = ".concat(a)),ee.exports.transEndHook({hostNode:t,parentNode:b,nodes:e,wrapperNode:w,innerNode:k},{text:s,fromLang:n||(0,Jt.A)(this,Vc)[Vc].fromLang,toLang:p})}catch(e){(0,ht.h9)("transEndHook",e)}}catch(r){const i=(0,Jt.A)(this,mp)[mp](r);if((0,ht.h9)("translate group error: ",i),"Request terminated"===(null==r?void 0:r.message))return void(0,Jt.A)(this,Mp)[Mp](t);try{const r=t.querySelector(":scope > .".concat(Uc.KISS_CLASS.warpper,":last-of-type"));if(r){const o=r.querySelector(".".concat(Uc.KISS_CLASS.inner));if(o){o.textContent="";const a=(0,Jt.A)(this,vp)[vp](i,()=>{(0,Jt.A)(this,Qd)[Qd](()=>{r.remove()}),(0,Jt.A)(this,xd)[xd].delete(t),(0,Jt.A)(this,yp)[yp](e,t,n)});o.appendChild(a)}}}catch(e){(0,ht.h9)("retry icon error: ",e.message),(0,Jt.A)(this,Mp)[Mp](t)}}}function Vm(e){var t,n;const r=(null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])||e.target,i=null===(n=r.closest)||void 0===n?void 0:n.call(r,".".concat(Uc.KISS_CLASS.highlight));i&&(0,Jt.A)(this,up)[up](i)&&(i.contains(e.relatedTarget)||((0,Jt.A)(this,Dd)[Dd]={x:e.clientX,y:e.clientY},(0,Jt.A)(this,zd)[zd]!==i&&((0,Jt.A)(this,Pp)[Pp](),(0,Jt.A)(this,zd)[zd]=i,(0,Jt.A)(this,Ld)[Ld]=setTimeout(()=>{(0,Jt.A)(this,Ld)[Ld]=null,(0,Jt.A)(this,wp)[wp](i)},300))))}function Gm(e){var t,n;const r=(null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])||e.target,i=null===(n=r.closest)||void 0===n?void 0:n.call(r,".".concat(Uc.KISS_CLASS.highlight));i&&(0,Jt.A)(this,up)[up](i)&&(i.contains(e.relatedTarget)||(0,Jt.A)(this,zd)[zd]===i&&(0,Jt.A)(this,Pp)[Pp]())}function Km(){(0,Jt.A)(this,Ld)[Ld]&&(clearTimeout((0,Jt.A)(this,Ld)[Ld]),(0,Jt.A)(this,Ld)[Ld]=null)}async function qm(e){var t;if((0,Jt.A)(this,zd)[zd]!==e||!e.isConnected||!(0,Jt.A)(this,up)[up](e))return;const n=(e.textContent||"").trim(),r=(0,o.BM1)((0,Jt.A)(this,Hc)[Hc].uiLang||"zh"),i=++(0,Jt.A)(this,Fd)[Fd];if((0,Jt.A)(this,Id)[Id]=e,(0,Jt.A)(this,Ep)[Ep](r("favorite_word_lookup_loading")||"Looking up...","loading"),!/^[a-zA-Z]+(?:['’][a-zA-Z]+)?$/.test(n))return void(0,Jt.A)(this,Ep)[Ep](r("favorite_word_lookup_unavailable")||"Dictionary lookup is unavailable for this word.","unavailable");const a=null===(t=(0,Jt.A)(this,Hc)[Hc].tranboxSetting)||void 0===t?void 0:t.enDict;if(o.q77.has(a))try{const t=a===o.GDU?await Sn(n):await _n(n);if((0,Jt.A)(this,Fd)[Fd]!==i||(0,Jt.A)(this,Id)[Id]!==e)return;const s=(0,Jt.A)(this,kp)[kp](a,t,n);if(0===s.definitions.length)return void(0,Jt.A)(this,Ep)[Ep](r("favorite_word_definition_not_found")||"No definition found.","empty");(0,Jt.A)(this,Ep)[Ep]((0,Jt.A)(this,Sp)[Sp](s),"ready")}catch(t){if((0,Jt.A)(this,Fd)[Fd]!==i||(0,Jt.A)(this,Id)[Id]!==e)return;(0,ht.h9)("favorite word lookup failed",t),(0,Jt.A)(this,Ep)[Ep](r("favorite_word_lookup_failed")||"Failed to load definition.","error")}else(0,Jt.A)(this,Ep)[Ep](r("favorite_word_lookup_unavailable")||"Dictionary lookup is unavailable for this word.","unavailable")}function Ym(e,t,n){var r;if(e===o.GDU)return{word:(null==t?void 0:t.word)||n,phonetics:((null==t?void 0:t.aus)||[]).filter(e=>{let{phonetic:t}=e;return t}).map(e=>{let{key:t,phonetic:n}=e;return"".concat(t?"".concat(t," "):"","[").concat(n,"]")}),definitions:((null==t?void 0:t.trs)||[]).filter(e=>{let{def:t}=e;return t}).map(e=>{let{pos:t,def:n}=e;return{pos:t,text:n}})};const i=null==t||null===(r=t.ec)||void 0===r?void 0:r.word,a=[];return null!=i&&i.ukphone&&a.push("英 [".concat(i.ukphone,"]")),null!=i&&i.usphone&&a.push("美 [".concat(i.usphone,"]")),{word:(null==i?void 0:i["return-phrase"])||n,phonetics:a,definitions:((null==i?void 0:i.trs)||[]).filter(e=>{let{tran:t}=e;return t}).map(e=>{let{pos:t,tran:n}=e;return{pos:t,text:n}})}}function Xm(e){let{word:t,phonetics:n,definitions:r}=e;const i=document.createElement("div"),o=document.createElement("div");if(o.style.cssText="font-weight: 700; margin-bottom: 6px;",o.textContent=t,i.appendChild(o),n.length>0){const e=document.createElement("div");e.style.cssText="opacity: 0.75; margin-bottom: 6px;",e.textContent=n.join("  "),i.appendChild(e)}return r.forEach(e=>{let{pos:t,text:n}=e;const r=document.createElement("div");r.style.cssText="margin: 3px 0;",r.textContent="".concat(t?"[".concat(t,"] "):"").concat(n),i.appendChild(r)}),i}function $m(e,t){var n,r;(0,Jt.A)(this,Dp)[Dp](e,t),null===(n=(0,Jt.A)(this,Pd)[Pd])||void 0===n||n.style.setProperty("max-height","60vh","important"),null===(r=(0,Jt.A)(this,Pd)[Pd])||void 0===r||r.style.setProperty("overflow-y","auto","important")}function Jm(){var e;const t=((null===(e=(0,Jt.A)(this,Hc)[Hc].mouseHoverSetting)||void 0===e?void 0:e.bubbleStyle)||o.ya_).trim().replace(/;+$/,"");return"".concat(t,";\nposition: fixed !important;\nz-index: 2147483647 !important;\nbox-sizing: border-box !important;\npointer-events: none !important;\nwhite-space: pre-wrap !important;\noverflow-wrap: anywhere !important;")}function Qm(){var e;if(null!==(e=(0,Jt.A)(this,Pd)[Pd])&&void 0!==e&&e.isConnected)return(0,Jt.A)(this,Pd)[Pd];const t=document.createElement("div");return t.className="".concat(Uc.KISS_CLASS.hoverBubble," notranslate"),t.setAttribute("role","tooltip"),document.body.appendChild(t),(0,Jt.A)(this,Pd)[Pd]=t,t}function Zm(){const e=(0,Jt.A)(this,Pd)[Pd];if(!e)return;let t=(0,Jt.A)(this,Dd)[Dd].x+12,n=(0,Jt.A)(this,Dd)[Dd].y+12;e.style.left="".concat(t,"px"),e.style.top="".concat(n,"px");const r=e.getBoundingClientRect(),i=window.innerWidth-r.width-8,o=window.innerHeight-r.height-8;t=Math.max(8,Math.min(t,i)),n=Math.max(8,Math.min(n,o)),e.style.left="".concat(t,"px"),e.style.top="".concat(n,"px")}function eg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ready";const n=(0,Jt.A)(this,_p)[_p]();n.style.cssText=(0,Jt.A)(this,Cp)[Cp](),n.dataset.state=t,n.replaceChildren(e instanceof Node?e:document.createTextNode(e)),n.hidden=!1,(0,Jt.A)(this,Tp)[Tp]()}function tg(){(0,Jt.A)(this,Mh)[Mh](),(0,Jt.A)(this,xp)[xp](),(0,Jt.A)(this,Fd)[Fd]++,(0,Jt.A)(this,Id)[Id]=null,(0,Jt.A)(this,zd)[zd]=null,(0,Jt.A)(this,Pd)[Pd]&&((0,Jt.A)(this,Pd)[Pd].remove(),(0,Jt.A)(this,Pd)[Pd]=null)}async function ng(e){if((0,Jt.A)(this,Mh)[Mh](),!Uc.isElementOrFragment(e))return;if((0,Jt.A)(this,Id)[Id]===e&&(0,Jt.A)(this,Pd)[Pd])return;const t=e.textContent||"";if((0,Jt.A)(this,fp)[fp](t))return void(0,Jt.A)(this,Pp)[Pp]();const n=++(0,Jt.A)(this,Fd)[Fd];(0,Jt.A)(this,Id)[Id]=e,(0,Jt.A)(this,Dp)[Dp](zl(),"loading");try{let r="";const{fromLang:i="auto",toLang:o}=(0,Jt.A)(this,Vc)[Vc],{langDetector:a,skipLangs:s=[],translateVariants:l=!0}=(0,Jt.A)(this,Hc)[Hc];if("auto"===i&&(r=await Wc(t,a),r&&(U(r,o,l)||s.includes(r))))return void((0,Jt.A)(this,Fd)[Fd]===n&&(0,Jt.A)(this,Pp)[Pp]());const{trText:u,isSame:c}=await(0,Jt.A)(this,zp)[zp](t,r,null,(0,Jt.A)(this,fh)[fh]);if((0,Jt.A)(this,Fd)[Fd]!==n||(0,Jt.A)(this,Id)[Id]!==e)return;if(!u||c)return void(0,Jt.A)(this,Pp)[Pp]();(0,Jt.A)(this,Dp)[Dp](Array.isArray(u)?u[0]:u)}catch(t){if((0,Jt.A)(this,Fd)[Fd]!==n||(0,Jt.A)(this,Id)[Id]!==e)return;(0,Jt.A)(this,Dp)[Dp]((0,Jt.A)(this,mp)[mp](t),"error")}}function rg(e,t){var n=this;let r=0,i=0;const o=new Map,{startDelimiter:a,endDelimiter:s}=(0,Jt.A)(this,vh)[vh],l=e=>{r++;const t="".concat(a).concat(r).concat(s);return o.set(t,e),t},u=e=>{if(e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.TEXT_NODE)return"";if(e.nodeType===Node.TEXT_NODE){let r=e.textContent;return r.trim()?((0,Jt.A)(this,rd)[rd]&&((0,Jt.A)(this,rd)[rd].lastIndex=0,r=r.replace((0,Jt.A)(this,rd)[rd],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=(0,Jt.A)(n,nd)[nd][o];return l('<i class="'.concat(Uc.KISS_CLASS.term,'" style="').concat(t,'">').concat(s||a,"</i>"))})),function(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}(r)):""}if(e.nodeType===Node.ELEMENT_NODE){var r;if(e.classList.contains(Uc.KISS_CLASS.highlight))return Array.from(e.childNodes,u).join("");if((0,Jt.A)(this,eh)[eh](e))return"";let t=!1;try{t=e.matches((0,Jt.A)(this,Vc)[Vc].keepSelector)}catch(e){(0,ht.h9)("keepSelector match error",(0,Jt.A)(this,Vc)[Vc].keepSelector,e)}var a,s;if("true"===(0,Jt.A)(this,Vc)[Vc].hasRichText&&Uc.TAGS.REPLACE.has(e.tagName)||t||!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 n="";if(e.childNodes.forEach(e=>{try{n+=u(e)}catch(t){(0,ht.h9)("traverse child error",e.nodeName,t)}}),"true"===(0,Jt.A)(this,Vc)[Vc].hasRichText&&Uc.TAGS.WARP.has(null===(r=e.tagName)||void 0===r?void 0:r.toUpperCase())){i++;const{tagName:t,format:r}=(0,Jt.A)(this,vh)[vh];let a,s;return o.set("TAG_".concat(i),{openTag:c(e),closeTag:"</".concat(e.localName,">")}),"attribute"===r?(a="<".concat(t," i=").concat(i,">"),s="</".concat(t,">")):(a="<".concat(t).concat(i,">"),s="</".concat(t).concat(i,">")),"".concat(a).concat(n).concat(s)}return n}return""};function c(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}let d=e.map(u).join("").trim();return d=d.replace(/\r?\n|\t/g,e=>l("\t"===e?"&#9;":"&#10;")),[d,o]}function ig(e,t){if(!t.size)return e;if(!e)return"";const{safeTag:n,openRegex:r,closeRegex:i}=(0,Jt.A)(this,vh)[vh],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(at.createHTML(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=at.createHTML("".concat(r.openTag).concat(e.innerHTML).concat(r.closeTag)))}}),s=e.body.innerHTML}catch(e){(0,ht.h9)("DOMParser restore failed, fallback to raw",e)}return s=s.replace((0,Jt.A)(this,vh)[vh].placeholderRegex,e=>t.get(e)||e),s}function og(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const{toLang:o,transStartHook:a}=(0,Jt.A)(this,Vc)[Vc],s=t||(0,Jt.A)(this,Vc)[Vc].fromLang,l=(0,r.A)({},i||(0,Jt.A)(this,ph)[ph]),u=(0,Oa.a5)(l,(0,Jt.A)(this,Hc)[Hc].prompts,(0,Jt.A)(this,Hc)[Hc].subtitleSetting),c=(0,r.A)({},(0,Jt.A)(this,ud)[ud]),d=(0,Jt.A)(this,md)[md],h={text:e,fromLang:s,toLang:o,apiSetting:u,glossary:c,onStreamChunk:n,textFormat:"html",translateVariants:(0,Jt.A)(this,Hc)[Hc].translateVariants};if(null!=a&&a.trim())try{ee.run("exports.transStartHook = ".concat(a));const e=ee.exports.transStartHook((0,r.A)((0,r.A)({},h),{},{apisMap:d}));e&&Object.assign(h,e)}catch(e){(0,ht.h9)("transStartHook",e)}return Tn(h)}function ag(e){return e.querySelectorAll(":scope > .".concat(Uc.KISS_CLASS.warpper))}function sg(){(0,Jt.A)(this,wd)[wd].forEach(e=>(0,Jt.A)(this,Rp)[Rp](e))}function lg(e){const t=Array.from(e);if(!t.length)return;const n=new Set(t);t.forEach(e=>{var t;const r=null===(t=(0,Jt.A)(this,bd)[bd].get(e))||void 0===t?void 0:t.originalWrapper;r&&n.add(r)}),(0,Jt.A)(this,Qd)[Qd](()=>{t.forEach(e=>(0,Jt.A)(this,Xp)[Xp](e))},n)}function ug(e){(0,Jt.A)(this,jp)[jp](e.querySelectorAll(".".concat(Uc.KISS_CLASS.warpper)))}function cg(e){(0,Jt.A)(this,jp)[jp]((0,Jt.A)(this,Op)[Op](e))}function dg(e){var t,n;const{transOrder:r="original-first"}=(0,Jt.A)(this,Vc)[Vc],i=[],o="translation-first"!==r;let a=o?e.previousSibling:e.nextSibling;if(null!==(t=a)&&void 0!==t&&null!==(n=t.classList)&&void 0!==n&&n.contains(Uc.KISS_CLASS.original))return[a];for(;a;){var s;if((0,Jt.A)(this,pp)[pp](a)&&!Uc.TAGS.WARP.has(null===(s=a.nodeName)||void 0===s?void 0:s.toUpperCase()))break;a.nodeType!==Node.ELEMENT_NODE&&a.nodeType!==Node.TEXT_NODE||(o?i.unshift(a):i.push(a)),a=o?a.previousSibling:a.nextSibling}return i}function hg(e){return e.querySelector(":scope > template.".concat(Uc.KISS_CLASS.backup))}function pg(e){let t=(0,Jt.A)(this,Wp)[Wp](e);return t||(t=document.createElement("template"),t.className=Uc.KISS_CLASS.backup,e.appendChild(t)),t}function fg(e){return(0,Jt.A)(this,dd)[dd][e]||(0,Jt.A)(this,dd)[dd][o.nsG]||""}function mg(e,t){if(null==e||!e.length)return null;const n=e[0].parentNode;if(!n||e.some(e=>e.parentNode!==n))return null;const r=document.createElement("span");return r.className=[Uc.KISS_CLASS.original,(0,Jt.A)(this,Hp)[Hp](t)].filter(Boolean).join(" "),(0,Jt.A)(this,Ph)[Ph]([n,r],()=>{e[0].before(r),e.forEach(e=>r.appendChild(e))}),r}function gg(e){if(null==e||!e.parentNode)return;const t=e.parentNode;(0,Jt.A)(this,Ph)[Ph]([t,e],()=>{e.replaceWith(...e.childNodes)})}function vg(){let{nodes:e=[],originalWrapper:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t?[t]:e}function yg(e,t,n){if(!e)return;const r=(0,Jt.A)(this,Hp)[Hp](t),i=(0,Jt.A)(this,Hp)[Hp](n);r&&e.classList.remove(r),i&&e.classList.add(i)}function bg(e){if(!Uc.isElementOrFragment(e))return!1;const t=Array.from(e.children||[]).filter(e=>{var t;return null===(t=e.classList)||void 0===t?void 0:t.contains(Uc.KISS_CLASS.warpper)});return!!t.length&&(t.forEach(e=>{const t=(0,Jt.A)(this,Wp)[Wp](e),n=t?Array.from(t.content.childNodes):[],i=n.length>0,o=i?n:(0,Jt.A)(this,Bp)[Bp](e),a=o.find(e=>{var t;return null===(t=e.classList)||void 0===t?void 0:t.contains(Uc.KISS_CLASS.original)}),s=a?Array.from(a.childNodes):o;(0,Jt.A)(this,bd)[bd].set(e,{nodes:s,originalWrapper:a,isHide:i}),s.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(0,Jt.A)(this,xd)[xd].set(e,(0,r.A)({},(0,Jt.A)(this,Vc)[Vc]))})}),(0,Jt.A)(this,xd)[xd].set(e,(0,r.A)({},(0,Jt.A)(this,Vc)[Vc])),(0,Jt.A)(this,yd)[yd].add(e),(0,Jt.A)(this,Ad)[Ad].add(e),!0)}function Ag(e){const t=e.parentElement;(0,Jt.A)(this,xd)[xd].delete(t);const n=(0,Jt.A)(this,bd)[bd].get(e);null!=n&&n.isHide&&(0,Jt.A)(this,$p)[$p](e,n),null!=n&&n.originalWrapper&&(0,Jt.A)(this,Gp)[Gp](n.originalWrapper),(0,Jt.A)(this,bd)[bd].delete(e),e.remove(),(0,Jt.A)(this,Vc)[Vc].highlightWords===o.AXe&&(0,Jt.A)(this,dp)[dp](t),(0,Jt.A)(this,hp)[hp](t)}function xg(e,t){const n=(0,Jt.A)(this,Kp)[Kp](t);if(n.length){const t=e.parentElement;if(t){const r=n.map(e=>e.parentNode);(0,Jt.A)(this,Ph)[Ph]([...r,t],()=>{const t=document.createDocumentFragment();n.forEach(e=>t.appendChild(e)),"translation-first"===(0,Jt.A)(this,Vc)[Vc].transOrder?e.after(t):e.before(t)})}}}function wg(e,t){const n=(0,Jt.A)(this,Kp)[Kp](e);if(n.length&&t){const e=(0,Jt.A)(this,Up)[Up](t),r=n[0].parentNode;(0,Jt.A)(this,Ph)[Ph]([r],()=>{n.forEach(t=>e.content.appendChild(t))})}}function kg(e,t){(0,Jt.A)(this,Op)[Op](e).forEach(e=>{const n=e.querySelector(":scope > br"),i=e.querySelector(":scope > span.".concat(Uc.KISS_CLASS.space)),o=(0,Jt.A)(this,bd)[bd].get(e);o&&("true"===t?((0,Jt.A)(this,Qd)[Qd](()=>{n&&(n.hidden=!0),i&&(i.hidden=!0),(0,Jt.A)(this,Jp)[Jp](o,e)}),(0,Jt.A)(this,bd)[bd].set(e,(0,r.A)((0,r.A)({},o),{},{isHide:!0}))):((0,Jt.A)(this,Qd)[Qd](()=>{n&&(n.hidden=!1),i&&(i.hidden=!1),(0,Jt.A)(this,$p)[$p](e,o)}),(0,Jt.A)(this,bd)[bd].set(e,(0,r.A)((0,r.A)({},o),{},{isHide:!1}))))})}function Sg(e,t,n){if(!t||!t.length)return;const{originalWrapper:r}=(0,Jt.A)(this,bd)[bd].get(e)||{},i=r?[r]:t,o=i[0],a=i[i.length-1],s=e.parentElement,l=null==o?void 0:o.parentElement,u=null==a?void 0:a.parentElement;s===l&&s===u&&("translation-first"===n?o.previousElementSibling!==e&&o.before(e):a.nextElementSibling!==e&&a.after(e))}function Eg(e,t,n){(0,Jt.A)(this,Op)[Op](e).forEach(e=>{const r=e.querySelector(":scope > .".concat(Uc.KISS_CLASS.inner));r.classList.remove((0,Jt.A)(this,dd)[dd][t]),r.classList.add((0,Jt.A)(this,dd)[dd][n])})}function Cg(e,t,n){(0,Jt.A)(this,Op)[Op](e).forEach(e=>{const i=(0,Jt.A)(this,bd)[bd].get(e);if(i)if("true"!==t||i.originalWrapper)"true"!==t&&i.originalWrapper&&((0,Jt.A)(this,Gp)[Gp](i.originalWrapper),(0,Jt.A)(this,bd)[bd].set(e,(0,r.A)((0,r.A)({},i),{},{originalWrapper:null})));else{const t=(0,Jt.A)(this,Vp)[Vp](i.nodes,n);t&&(0,Jt.A)(this,bd)[bd].set(e,(0,r.A)((0,r.A)({},i),{},{originalWrapper:t}))}})}function _g(e,t,n){(0,Jt.A)(this,Op)[Op](e).forEach(e=>{const{originalWrapper:r}=(0,Jt.A)(this,bd)[bd].get(e)||{};(0,Jt.A)(this,qp)[qp](r,t,n)})}function Tg(e,t){(0,Jt.A)(this,Op)[Op](e).forEach(e=>{const{nodes:n}=(0,Jt.A)(this,bd)[bd].get(e)||{};n&&n.length&&(0,Jt.A)(this,Qd)[Qd](()=>{(0,Jt.A)(this,Zp)[Zp](e,n,t)})})}function Dg(e){(0,Jt.A)(this,Mp)[Mp](e),(0,Jt.A)(this,xd)[xd].delete(e),(0,Jt.A)(this,tp)[tp](e)}function Pg(e){const t=(0,Jt.A)(this,xd)[xd].get(e);if(!t)return void((0,Jt.A)(this,Xc)[Xc]&&(0,Jt.A)(this,tp)[tp](e));const{apiSlug:n,fromLang:r,toLang:i,hasRichText:o,textStyle:a,transOnly:s,transOrder:l="original-first",wrapOriginal:u,originalTextStyle:c}=(0,Jt.A)(this,Vc)[Vc];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,wrapOriginal:u,originalTextStyle:c}),void(0,Jt.A)(this,of)[of](e);if(t.textStyle!==a){const n=t.textStyle;t.textStyle=a,(0,Jt.A)(this,ef)[ef](e,n,a)}if(t.wrapOriginal!==u&&(t.wrapOriginal=u,(0,Jt.A)(this,Qd)[Qd](()=>{(0,Jt.A)(this,tf)[tf](e,u,c)})),t.originalTextStyle!==c){const n=t.originalTextStyle;t.originalTextStyle=c,(0,Jt.A)(this,nf)[nf](e,n,c)}t.transOrder!==l&&(t.transOrder=l,(0,Jt.A)(this,rf)[rf](e,l)),t.transOnly!==s&&(t.transOnly=s,(0,Jt.A)(this,Qp)[Qp](e,s))}function Ig(){(0,Jt.A)(this,wh)[wh](),(0,Jt.A)(this,Vd)[Vd].disconnect(),(0,Jt.A)(this,Gd)[Gd].disconnect(),(0,Jt.A)(this,Ad)[Ad].clear(),(0,Jt.A)(this,wd)[wd].clear(),(0,Jt.A)(this,vd)[vd].clear(),(0,Jt.A)(this,yd)[yd]=new WeakSet,(0,Jt.A)(this,bd)[bd]=new WeakMap,(0,Jt.A)(this,xd)[xd]=new WeakMap,(0,Jt.A)(this,Ed)[Ed]=new WeakSet,(0,Jt.A)(this,Sd)[Sd]=new WeakSet,(0,Jt.A)(this,Vd)[Vd]=(0,Jt.A)(this,Th)[Th]()}function Fg(){if((0,Jt.A)(this,Yc)[Yc])return;(0,Jt.A)(this,Yc)[Yc]=!0,(0,Jt.A)(this,Hc)[Hc].mouseHoverSetting.useMouseHover=!0,(0,Jt.A)(this,Nh)[Nh]()&&(0,Jt.A)(this,Qc)[Qc]&&((0,Jt.A)(this,hf)[hf](),(0,Jt.A)(this,ff)[ff]((0,Jt.A)(this,Qc)[Qc])),document.addEventListener("mousemove",(0,Jt.A)(this,jd)[jd]);const{mouseHoverKey:e=[],mouseHoverKey2:t=[]}=(0,Jt.A)(this,Hc)[Hc].mouseHoverSetting;if(0===e.length&&0===t.length)return;const n=e.length>0,r=t.length>0;(0,Jt.A)(this,Cd)[Cd]=n?Rc(e,(0,Jt.A)(this,Rd)[Rd]):void 0;const i=n&&r&&e.length===t.length&&e.every((e,n)=>e===t[n]);(0,Jt.A)(this,_d)[_d]=r&&!i?Rc(t,(0,Jt.A)(this,Rd)[Rd]):void 0}function Lg(){var e,t,n,r;(0,Jt.A)(this,Yc)[Yc]&&((0,Jt.A)(this,Yc)[Yc]=!1,(0,Jt.A)(this,Hc)[Hc].mouseHoverSetting.useMouseHover=!1,(0,Jt.A)(this,Td)[Td]=null,(0,Jt.A)(this,Pp)[Pp](),document.removeEventListener("mousemove",(0,Jt.A)(this,jd)[jd]),null===(e=(t=(0,Jt.A)(this,Cd))[Cd])||void 0===e||e.call(t),null===(n=(r=(0,Jt.A)(this,_d))[_d])||void 0===n||n.call(r))}function zg(){(0,Jt.A)(this,Zc)[Zc]||((0,Jt.A)(this,Zc)[Zc]=!0,(0,Jt.A)(this,ed)[ed]=e=>{var t,n;if((0,Jt.A)(this,Nh)[Nh]())return;const r=null===(t=(n=e.target).closest)||void 0===t?void 0:t.call(n,".".concat(Uc.KISS_CLASS.warpper));if(r){const e=(0,Jt.A)(this,bd)[bd].get(r);if(!e||!e.isHide)return;if((0,Jt.A)(this,Qc)[Qc]===r)return;(0,Jt.A)(this,hf)[hf]();const t=parseFloat((0,Jt.A)(this,Vc)[Vc].transOnlyRevertDelay)||.5;return void((0,Jt.A)(this,Jc)[Jc]=setTimeout(()=>{(0,Jt.A)(this,pf)[pf](r,e)},1e3*t))}if((0,Jt.A)(this,Qc)[Qc]){const t=(0,Jt.A)(this,bd)[bd].get((0,Jt.A)(this,Qc)[Qc]);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}}}},(0,Jt.A)(this,td)[td]=e=>{if((0,Jt.A)(this,Nh)[Nh]())return;if(!(0,Jt.A)(this,Qc)[Qc]){var t,n;return void((null===(t=(n=e.target).closest)||void 0===t?void 0:t.call(n,".".concat(Uc.KISS_CLASS.warpper)))&&(0,Jt.A)(this,hf)[hf]())}const r=(0,Jt.A)(this,Qc)[Qc],i=e.relatedTarget;if(i&&(r.contains(i)||i===r))return;const o=(0,Jt.A)(this,bd)[bd].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}}(0,Jt.A)(this,hf)[hf](),(0,Jt.A)(this,ff)[ff](r)},document.addEventListener("mouseover",(0,Jt.A)(this,ed)[ed]),document.addEventListener("mouseout",(0,Jt.A)(this,td)[td]))}function Og(){(0,Jt.A)(this,Zc)[Zc]&&((0,Jt.A)(this,Zc)[Zc]=!1,(0,Jt.A)(this,hf)[hf](),(0,Jt.A)(this,Qc)[Qc]&&(0,Jt.A)(this,ff)[ff]((0,Jt.A)(this,Qc)[Qc]),document.removeEventListener("mouseover",(0,Jt.A)(this,ed)[ed]),document.removeEventListener("mouseout",(0,Jt.A)(this,td)[td]),(0,Jt.A)(this,ed)[ed]=null,(0,Jt.A)(this,td)[td]=null)}function Ng(){(0,Jt.A)(this,Jc)[Jc]&&(clearTimeout((0,Jt.A)(this,Jc)[Jc]),(0,Jt.A)(this,Jc)[Jc]=null)}function jg(e,t){(0,Jt.A)(this,Qd)[Qd](()=>{(0,Jt.A)(this,$p)[$p](e,t);const n=e.querySelector(":scope > .".concat(Uc.KISS_CLASS.inner));n&&(n.style.display="none");const r=e.querySelector(":scope > br");r&&(r.hidden=!0)}),(0,Jt.A)(this,Qc)[Qc]=e}function Rg(e){const t=(0,Jt.A)(this,bd)[bd].get(e);t&&((0,Jt.A)(this,Qd)[Qd](()=>{(0,Jt.A)(this,Jp)[Jp](t,e);const n=e.querySelector(":scope > .".concat(Uc.KISS_CLASS.inner));n&&(n.style.display="")}),(0,Jt.A)(this,Qc)[Qc]=null)}function Mg(){if(!(0,Jt.A)(this,Kc)[Kc]){(0,Jt.A)(this,Kc)[Kc]=!0;try{const{injectJs:e,injectCss:t,toLang:n}=(0,Jt.A)(this,Vc)[Vc];if(V.aQ?t&&(0,G.Ru)(o.k_j,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=(0,r.A)({},(0,Jt.A)(this,ph)[ph]),i=(0,r.A)({},(0,Jt.A)(this,ud)[ud]),o=(0,Jt.A)(this,md)[md],a=Wc;ee.import({KT:{apiTranslate:Tn,apiDectect:a,apiSetting:t,apisMap:o,toLang:n,glossary:i}}),ee.run(e)}}catch(e){(0,ht.h9)("inject js",e)}}}function Bg(){var e;null===(e=document.querySelectorAll('[data-source^="kiss-inject"]'))||void 0===e||e.forEach(e=>e.remove())}async function Wg(){const e=At();if(null!=e&&e.title)try{const t=await Wc(e.title),{trText:n}=await(0,Jt.A)(this,zp)[zp](e.title,t);(0,Jt.A)(this,ld)[ld].title=document.title,document.title=n||e.title}catch(e){(0,ht.h9)("tanslate title",e)}}function Ug(){var e,t;(0,Jt.A)(this,Nh)[Nh]()||((0,Jt.A)(this,Mh)[Mh](),null!==(e=(0,Jt.A)(this,Id)[Id])&&void 0!==e&&null!==(t=e.classList)&&void 0!==t&&t.contains(Uc.KISS_CLASS.warpper)&&(0,Jt.A)(this,Pp)[Pp]());const n="true"===(0,Jt.A)(this,Vc)[Vc].transOnly&&"true"===(0,Jt.A)(this,Vc)[Vc].transOnlyRevert;n&&!(0,Jt.A)(this,Zc)[Zc]?(0,Jt.A)(this,cf)[cf]():!n&&(0,Jt.A)(this,Zc)[Zc]&&(0,Jt.A)(this,df)[df]()}function Hg(){let e=document.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}Uc=bf,bf.displayCache=new WeakMap,bf.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"])},bf.KISS_CLASS={warpper:"".concat(o.jM6,"-wrapper"),inner:"".concat(o.jM6,"-inner"),term:"".concat(o.jM6,"-term"),br:"".concat(o.jM6,"-br"),space:"".concat(o.jM6,"-space"),highlight:"".concat(o.jM6,"-highlight"),retry:"".concat(o.jM6,"-retry"),backup:"".concat(o.jM6,"-backup"),original:"".concat(o.jM6,"-original"),hoverBubble:"".concat(o.jM6,"-hover-bubble")},bf.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}$/],bf.DEFAULT_OPTIONS=o.la7,bf.DEFAULT_RULE=o.lNu,bf.KISS_IGNORE_SELECTOR=".".concat(Uc.KISS_CLASS.warpper,", .").concat(Uc.KISS_CLASS.hoverBubble,", .kiss-caption-container, .kiss-subtitle-controls, #kiss-youtube-subtitle-list-container,\n  #").concat(o.Reo.fabID,", .").concat(o.Reo.fabID,"_warpper,\n  #").concat(o.Reo.boxID,", .").concat(o.Reo.boxID,"_warpper,\n  #").concat(o.Reo.popupID,", .").concat(o.Reo.popupID,"_warpper"),bf.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']";const Vg=new Set(["text","search","email","url","tel"]);function Gg(e){var t;if(!e)return!1;if(e.disabled||e.readOnly)return!1;const n=null===(t=e.nodeName)||void 0===t?void 0:t.toUpperCase();return"INPUT"===n?Vg.has(e.type):"TEXTAREA"===n||!(!e.isContentEditable&&"true"!==e.getAttribute("contenteditable"))}function Kg(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 qg(e,t){e.focus(),await(0,l.yy)(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(0,l.yy)(50),n)try{ht.vF.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(0,l.yy)(100),Yg(e,t))return!0}catch(e){ht.vF.debug("Strategy Paste failed",e)}try{if(document.execCommand("insertText",!1,t)&&(await(0,l.yy)(20),Yg(e,t)))return!0}catch(e){ht.vF.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.vF.debug("Strategy 2 (Input Value) failed",e)}return!1}function Yg(e,t){return Kg(e).includes(t.trim())}var Xg=(0,Qt.A)("config"),$g=(0,Qt.A)("unregisterShortcut"),Jg=(0,Qt.A)("isEnabled"),Qg=(0,Qt.A)("triggerShortcut"),Zg=(0,Qt.A)("activeInput"),ev=(0,Qt.A)("floatBtn"),tv=(0,Qt.A)("resizeObserver"),nv=(0,Qt.A)("blurTimer"),rv=(0,Qt.A)("boundFocusIn"),iv=(0,Qt.A)("boundFocusOut"),ov=(0,Qt.A)("boundUpdatePos");class av{constructor(){let{inputRule:e=o.AFg,transApis:t=[],prompts:n=[],subtitleSetting:r={},translateVariants:i=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,Xg,{writable:!0,value:void 0}),Object.defineProperty(this,$g,{writable:!0,value:null}),Object.defineProperty(this,Jg,{writable:!0,value:!1}),Object.defineProperty(this,Qg,{writable:!0,value:void 0}),Object.defineProperty(this,Zg,{writable:!0,value:null}),Object.defineProperty(this,ev,{writable:!0,value:null}),Object.defineProperty(this,tv,{writable:!0,value:null}),Object.defineProperty(this,nv,{writable:!0,value:null}),Object.defineProperty(this,rv,{writable:!0,value:void 0}),Object.defineProperty(this,iv,{writable:!0,value:void 0}),Object.defineProperty(this,ov,{writable:!0,value:void 0}),(0,Jt.A)(this,Xg)[Xg]={inputRule:e,prompts:n,subtitleSetting:r,transApis:t,translateVariants:i};const{triggerShortcut:a}=(0,Jt.A)(this,Xg)[Xg].inputRule;(0,Jt.A)(this,Qg)[Qg]=a&&a.length>0?a:o.ue1,(0,Jt.A)(this,rv)[rv]=this.handleFocusIn.bind(this),(0,Jt.A)(this,iv)[iv]=this.handleFocusOut.bind(this),(0,Jt.A)(this,ov)[ov]=this.updateBtnPosition.bind(this),(0,Jt.A)(this,Xg)[Xg].inputRule.transOpen&&this.enable()}enable(){if((0,Jt.A)(this,Jg)[Jg])return;const{triggerCount:e,triggerTime:t}=(0,Jt.A)(this,Xg)[Xg].inputRule;(0,Jt.A)(this,$g)[$g]=Mc((0,Jt.A)(this,Qg)[Qg],this.handleTranslate.bind(this),e,t),document.addEventListener("focusin",(0,Jt.A)(this,rv)[rv]),document.addEventListener("focusout",(0,Jt.A)(this,iv)[iv]),window.addEventListener("scroll",(0,Jt.A)(this,ov)[ov],!0),window.addEventListener("resize",(0,Jt.A)(this,ov)[ov]),window.visualViewport&&(window.visualViewport.addEventListener("resize",(0,Jt.A)(this,ov)[ov]),window.visualViewport.addEventListener("scroll",(0,Jt.A)(this,ov)[ov])),(0,Jt.A)(this,Jg)[Jg]=!0;Gg(Hg())&&this.handleFocusIn(),ht.vF.info("Input Translator enabled.")}disable(){(0,Jt.A)(this,Jg)[Jg]&&((0,Jt.A)(this,$g)[$g]&&((0,Jt.A)(this,$g)[$g](),(0,Jt.A)(this,$g)[$g]=null),document.removeEventListener("focusin",(0,Jt.A)(this,rv)[rv]),document.removeEventListener("focusout",(0,Jt.A)(this,iv)[iv]),window.removeEventListener("scroll",(0,Jt.A)(this,ov)[ov],!0),window.removeEventListener("resize",(0,Jt.A)(this,ov)[ov]),window.visualViewport&&(window.visualViewport.removeEventListener("resize",(0,Jt.A)(this,ov)[ov]),window.visualViewport.removeEventListener("scroll",(0,Jt.A)(this,ov)[ov])),this.removeFloatButton(),(0,Jt.A)(this,tv)[tv]&&((0,Jt.A)(this,tv)[tv].disconnect(),(0,Jt.A)(this,tv)[tv]=null),(0,Jt.A)(this,Zg)[Zg]=null,(0,Jt.A)(this,Jg)[Jg]=!1,ht.vF.info("Input Translator disabled."))}toggle(){(0,Jt.A)(this,Jg)[Jg]?this.disable():this.enable()}handleFocusIn(){(0,Jt.A)(this,nv)[nv]&&(clearTimeout((0,Jt.A)(this,nv)[nv]),(0,Jt.A)(this,nv)[nv]=null);const e=Hg();Gg(e)&&((0,Jt.A)(this,Zg)[Zg]=e,(0,Jt.A)(this,tv)[tv]&&(0,Jt.A)(this,tv)[tv].disconnect(),(0,Jt.A)(this,tv)[tv]=new ResizeObserver(()=>this.updateBtnPosition()),(0,Jt.A)(this,tv)[tv].observe(e),this.showFloatButton(e))}handleFocusOut(){(0,Jt.A)(this,nv)[nv]=setTimeout(()=>{var e;const t=Hg();t===(0,Jt.A)(this,Zg)[Zg]||null!==(e=(0,Jt.A)(this,ev)[ev])&&void 0!==e&&e.contains(t)||(this.hideFloatButton(),(0,Jt.A)(this,Zg)[Zg]=null,(0,Jt.A)(this,tv)[tv]&&((0,Jt.A)(this,tv)[tv].disconnect(),(0,Jt.A)(this,tv)[tv]=null))},150)}showFloatButton(e){if(!(0,Jt.A)(this,Jg)[Jg])return;const t=(0,Jt.A)(this,Xg)[Xg].inputRule.showDot||o.eUB;if(t!==o.axl){if(t===o.eUB){if(!(Na||navigator.maxTouchPoints>0))return}(0,Jt.A)(this,Zg)[Zg]=e,(0,Jt.A)(this,ev)[ev]||this.createFloatButtonDOM(),(0,Jt.A)(this,ev)[ev].style.display="flex",this.updateBtnPosition()}}createFloatButtonDOM(){(0,Jt.A)(this,ev)[ev]=document.createElement("div");const e=Na||navigator.maxTouchPoints>0?"36px":"30px";(0,Jt.A)(this,ev)[ev].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      "),(0,Jt.A)(this,ev)[ev].innerText="译";const t=e=>{e.preventDefault(),e.stopPropagation()};(0,Jt.A)(this,ev)[ev].addEventListener("mousedown",t),(0,Jt.A)(this,ev)[ev].addEventListener("touchstart",t,{passive:!1});const n=e=>{e.preventDefault(),e.stopPropagation(),(0,Jt.A)(this,Zg)[Zg]&&(0,Jt.A)(this,Zg)[Zg].focus(),this.handleTranslate({isBtnTrigger:!0})};(0,Jt.A)(this,ev)[ev].addEventListener("click",n),(0,Jt.A)(this,ev)[ev].addEventListener("touchend",n),document.body.appendChild((0,Jt.A)(this,ev)[ev])}hideFloatButton(){(0,Jt.A)(this,ev)[ev]&&((0,Jt.A)(this,ev)[ev].style.display="none")}removeFloatButton(){(0,Jt.A)(this,ev)[ev]&&((0,Jt.A)(this,ev)[ev].remove(),(0,Jt.A)(this,ev)[ev]=null)}updateBtnPosition(){if(!(0,Jt.A)(this,Zg)[Zg]||!(0,Jt.A)(this,Zg)[Zg].isConnected||!(0,Jt.A)(this,ev)[ev]||"none"===(0,Jt.A)(this,ev)[ev].style.display)return void((0,Jt.A)(this,ev)[ev]&&this.hideFloatButton());const e=(0,Jt.A)(this,Zg)[Zg].getBoundingClientRect(),t=Na||navigator.maxTouchPoints>0?36:30;let n=e.bottom-t-5,r=e.right-t-5;if(e.height<60){const r=2,i=e.top-t-r,o=e.bottom+r;if(i>=0)n=i;else if(o+t<=window.innerHeight)n=o;else{n=e.top>=window.innerHeight-e.bottom?i:o}}r=Math.max(0,Math.min(r,window.innerWidth-t-2)),n=Math.max(0,Math.min(n,window.innerHeight-t-2)),(0,Jt.A)(this,ev)[ev].style.top="".concat(n,"px"),(0,Jt.A)(this,ev)[ev].style.left="".concat(r,"px")}async handleTranslate(){let{isBtnTrigger:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ht.vF.debug("handle input translate");const t=Hg();if(!t||!Gg(t))return void ht.vF.debug("Active node is not editable");const{apiSlug:n,transSign:r,triggerCount:i}=(0,Jt.A)(this,Xg)[Xg].inputRule;let{fromLang:a,toLang:s}=(0,Jt.A)(this,Xg)[Xg].inputRule,u=Kg(t);if(e||1!==(0,Jt.A)(this,Qg)[Qg].length||1!==(0,Jt.A)(this,Qg)[Qg][0].length||(u=(0,l.Ms)(u,(0,Jt.A)(this,Qg)[Qg][0],i)),!u.trim())return;let c=u;if(r){const e=(0,l.LR)(c,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&&o.tok.includes(t)&&(s=t),c=e[2]}}const d=(0,Jt.A)(this,Xg)[Xg].transApis.find(e=>e.apiSlug===n)||o.iVS,h=(0,Oa.a5)(d,(0,Jt.A)(this,Xg)[Xg].prompts,(0,Jt.A)(this,Xg)[Xg].subtitleSetting),p="kiss-loading-"+(0,l.Sm)();try{!function(e,t){const n=e.getBoundingClientRect();0===n.width||n.height;const r=document.createElement("div");r.id=t,r.appendChild(zl()),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,p),this.hideFloatButton();const{trText:e,isSame:n}=await Tn({text:c,fromLang:a,toLang:s,apiSetting:h,textFormat:"text",translateVariants:(0,Jt.A)(this,Xg)[Xg].translateVariants}),r=(null==e?void 0:e.trim())||"";if(!r||n)return;await qg(t,r)||ht.vF.warn("Text replacement failed after all strategies.")}catch(e){ht.vF.error("Translate input error:",e)}finally{!function(e){const t=document.getElementById(e);t&&t.remove()}(p),(0,Jt.A)(this,Zg)[Zg]===t&&this.showFloatButton(t)}}updateConfig(e){let{inputRule:t,transApis:n,prompts:r,subtitleSetting:i}=e;const a=(0,Jt.A)(this,Jg)[Jg];a&&this.disable(),t&&((0,Jt.A)(this,Xg)[Xg].inputRule=t),r&&((0,Jt.A)(this,Xg)[Xg].prompts=r),i&&((0,Jt.A)(this,Xg)[Xg].subtitleSetting=i),n&&((0,Jt.A)(this,Xg)[Xg].transApis=n);const{triggerShortcut:s}=(0,Jt.A)(this,Xg)[Xg].inputRule;(0,Jt.A)(this,Qg)[Qg]=s&&s.length>0?s:o.ue1,a&&this.enable()}}var sv=i(7458);function lv(e){let{onTrigger:t,btnEvent:n,position:r,btnOffsetX:i,btnOffsetY:o}=e;const a=r.x+i,s=r.y+o,l=(0,El.jsx)("div",{className:"KT-tranbtn",style:{cursor:"pointer",position:"absolute",left:a,top:s,zIndex:2147483647},onMouseDown:e=>e.preventDefault(),[n]:t,children:(0,El.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:Na?"32":"20",height:Na?"32":"20",viewBox:"0 0 32 32",version:"1.1",children:[(0,El.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,El.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,sv.createPortal)(l,document.body)}var uv=i(8915),cv=i(4320),dv=i(5553),hv=i(1163),pv=i(727),fv=i(7562),mv=i(171),gv=i(1683);const vv=function(e){return"string"==typeof e};const yv=function(e,t,n){return void 0===e||vv(e)?t:(0,cv.A)({},t,{ownerState:(0,cv.A)({},t.ownerState,n)})};const bv=function(e,t,n){return"function"==typeof e?e(t,n):e};const Av=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 xv=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 wv=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=(0,dv.A)(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=(0,cv.A)({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),a=(0,cv.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=Av((0,cv.A)({},i,r)),s=xv(r),l=xv(i),u=t(a),c=(0,dv.A)(null==u?void 0:u.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),d=(0,cv.A)({},null==u?void 0:u.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),h=(0,cv.A)({},u,n,l,s);return c.length>0&&(h.className=c),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:u.ref}},kv=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Sv=["component","slots","slotProps"],Ev=["component"];function Cv(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,l=(0,uv.A)(t,kv),{component:u,slots:c={[e]:void 0},slotProps:d={[e]:void 0}}=o,h=(0,uv.A)(o,Sv),p=c[e]||r,f=bv(d[e],i),m=wv((0,cv.A)({className:n},l,{externalForwardedProps:"root"===e?h:void 0,externalSlotProps:f})),{props:{component:g},internalRef:v}=m,y=(0,uv.A)(m.props,Ev),b=(0,gv.A)(v,null==f?void 0:f.ref,t.ref),A=a?a(y):{},x=(0,cv.A)({},i,A),w="root"===e?g||u:g,k=yv(p,(0,cv.A)({},"root"===e&&!u&&!c[e]&&s,"root"!==e&&!c[e]&&s,y,w&&{as:w},{ref:b}),x);return Object.keys(A).forEach(e=>{delete k[e]}),[p,k]}var _v=i(32);const Tv=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};var Dv=i(5421),Pv=i(4089);function Iv(e){return(0,Pv.Ay)("MuiPaper",e)}(0,Dv.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 Fv=["className","component","elevation","square","variant"],Lv=(0,fv.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,cv.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,cv.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,pv.X4)("#fff",Tv(n.elevation)),", ").concat((0,pv.X4)("#fff",Tv(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))}),zv=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=(0,uv.A)(n,Fv),u=(0,cv.A)({},n,{component:i,elevation:o,square:a,variant:s}),c=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,hv.A)(o,Iv,i)})(u);return(0,El.jsx)(Lv,(0,cv.A)({as:i,ownerState:u,className:(0,dv.A)(c.root,r),ref:t},l))});function Ov(e){return(0,Pv.Ay)("MuiAlert",e)}const Nv=(0,Dv.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 jv=i(3598),Rv=i(3948),Mv=i(73);function Bv(e,t){return Bv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bv(e,t)}function Wv(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Bv(e,t)}const Uv=xl.createContext(null);function Hv(e,t){var n=Object.create(null);return e&&xl.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,xl.isValidElement)(e)?t(e):e}(e)}),n}function Vv(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Gv(e,t,n){var r=Hv(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 u=i[l][r];s[i[l][r]]=n(u)}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,xl.isValidElement)(a)){var s=o in t,l=o in r,u=t[o],c=(0,xl.isValidElement)(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&(0,xl.isValidElement)(u)&&(i[o]=(0,xl.cloneElement)(a,{onExited:n.bind(null,a),in:u.props.in,exit:Vv(a,"exit",e),enter:Vv(a,"enter",e)})):i[o]=(0,xl.cloneElement)(a,{in:!1}):i[o]=(0,xl.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:Vv(a,"exit",e),enter:Vv(a,"enter",e)})}}),i}var Kv=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},qv=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}Wv(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,Hv(n.children,function(e){return(0,xl.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:Vv(e,"appear",n),enter:Vv(e,"enter",n),exit:Vv(e,"exit",n)})})):Gv(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Hv(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,cv.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,uv.A)(e,["component","childFactory"]),i=this.state.contextValue,o=Kv(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?xl.createElement(Uv.Provider,{value:i},o):xl.createElement(Uv.Provider,{value:i},xl.createElement(t,r,o))},t}(xl.Component);qv.propTypes={},qv.defaultProps={component:"div",childFactory:function(e){return e}};const Yv=qv;var Xv=i(1834),$v=i(8839);const Jv=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:u}=e,[c,d]=xl.useState(!1),h=(0,dv.A)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-a/2+o,left:-a/2+i},f=(0,dv.A)(n.child,c&&n.childLeaving,r&&n.childPulsate);return s||c||d(!0),xl.useEffect(()=>{if(!s&&null!=l){const e=setTimeout(l,u);return()=>{clearTimeout(e)}}},[l,s,u]),(0,El.jsx)("span",{className:h,style:p,children:(0,El.jsx)("span",{className:f})})};const Qv=(0,Dv.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var Zv,ey,ty,ny;const ry=["center","classes","className"];let iy,oy,ay,sy;const ly=(0,Xv.i7)(iy||(iy=Zv||(Zv=bc(["\n  0% {\n    transform: scale(0);\n    opacity: 0.1;\n  }\n\n  100% {\n    transform: scale(1);\n    opacity: 0.3;\n  }\n"])))),uy=(0,Xv.i7)(oy||(oy=ey||(ey=bc(["\n  0% {\n    opacity: 1;\n  }\n\n  100% {\n    opacity: 0;\n  }\n"])))),cy=(0,Xv.i7)(ay||(ay=ty||(ty=bc(["\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"])))),dy=(0,fv.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),hy=(0,fv.Ay)(Jv,{name:"MuiTouchRipple",slot:"Ripple"})(sy||(sy=ny||(ny=bc(["\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"]))),Qv.rippleVisible,ly,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},Qv.ripplePulsate,e=>{let{theme:t}=e;return t.transitions.duration.shorter},Qv.child,Qv.childLeaving,uy,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},Qv.childPulsate,cy,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),py=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=(0,uv.A)(n,ry),[s,l]=xl.useState([]),u=xl.useRef(0),c=xl.useRef(null);xl.useEffect(()=>{c.current&&(c.current(),c.current=null)},[s]);const d=xl.useRef(!1),h=(0,$v.A)(),p=xl.useRef(null),f=xl.useRef(null),m=xl.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l(e=>[...e,(0,El.jsx)(hy,{classes:{ripple:(0,dv.A)(i.ripple,Qv.ripple),rippleVisible:(0,dv.A)(i.rippleVisible,Qv.rippleVisible),ripplePulsate:(0,dv.A)(i.ripplePulsate,Qv.ripplePulsate),child:(0,dv.A)(i.child,Qv.child),childLeaving:(0,dv.A)(i.childLeaving,Qv.childLeaving),childPulsate:(0,dv.A)(i.childPulsate,Qv.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)]),u.current+=1,c.current=a},[i]),g=xl.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 u,c,g;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),c=Math.round(n-l.top)}if(o)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-c),c)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===p.current&&(p.current=()=>{m({pulsate:i,rippleX:u,rippleY:c,rippleSize:g,cb:n})},h.start(80,()=>{p.current&&(p.current(),p.current=null)})):m({pulsate:i,rippleX:u,rippleY:c,rippleSize:g,cb:n})},[r,m,h]),v=xl.useCallback(()=>{g({},{pulsate:!0})},[g]),y=xl.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),c.current=t},[h]);return xl.useImperativeHandle(t,()=>({pulsate:v,start:g,stop:y}),[v,g,y]),(0,El.jsx)(dy,(0,cv.A)({className:(0,dv.A)(Qv.root,i.root,o),ref:f},a,{children:(0,El.jsx)(Yv,{component:null,exit:!0,children:s})}))});function fy(e){return(0,Pv.Ay)("MuiButtonBase",e)}const my=(0,Dv.A)("MuiButtonBase",["root","disabled","focusVisible"]),gy=["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"],vy=(0,fv.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(my.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),yy=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:u=!1,disableTouchRipple:c=!1,focusRipple:d=!1,LinkComponent:h="a",onBlur:p,onClick:f,onContextMenu:m,onDragLeave:g,onFocus:v,onFocusVisible:y,onKeyDown:b,onKeyUp:A,onMouseDown:x,onMouseLeave:w,onMouseUp:k,onTouchEnd:S,onTouchMove:E,onTouchStart:C,tabIndex:_=0,TouchRippleProps:T,touchRippleRef:D,type:P}=n,I=(0,uv.A)(n,gy),F=xl.useRef(null),L=xl.useRef(null),z=(0,jv.A)(L,D),{isFocusVisibleRef:O,onFocus:N,onBlur:j,ref:R}=(0,Mv.A)(),[M,B]=xl.useState(!1);l&&M&&B(!1),xl.useImperativeHandle(r,()=>({focusVisible:()=>{B(!0),F.current.focus()}}),[]);const[W,U]=xl.useState(!1);xl.useEffect(()=>{U(!0)},[]);const H=W&&!u&&!l;function V(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c;return(0,Rv.A)(r=>{t&&t(r);return!n&&L.current&&L.current[e](r),!0})}xl.useEffect(()=>{M&&d&&!u&&W&&L.current.pulsate()},[u,d,M,W]);const G=V("start",x),K=V("stop",m),q=V("stop",g),Y=V("stop",k),X=V("stop",e=>{M&&e.preventDefault(),w&&w(e)}),$=V("start",C),J=V("stop",S),Q=V("stop",E),Z=V("stop",e=>{j(e),!1===O.current&&B(!1),p&&p(e)},!1),ee=(0,Rv.A)(e=>{F.current||(F.current=e.currentTarget),N(e),!0===O.current&&(B(!0),y&&y(e)),v&&v(e)}),te=()=>{const e=F.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ne=xl.useRef(!1),re=(0,Rv.A)(e=>{d&&!ne.current&&M&&L.current&&" "===e.key&&(ne.current=!0,L.current.stop(e,()=>{L.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,Rv.A)(e=>{d&&" "===e.key&&L.current&&M&&!e.defaultPrevented&&(ne.current=!1,L.current.stop(e,()=>{L.current.pulsate(e)})),A&&A(e),f&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&f(e)});let oe=s;"button"===oe&&(I.href||I.to)&&(oe=h);const ae={};"button"===oe?(ae.type=void 0===P?"button":P,ae.disabled=l):(I.href||I.to||(ae.role="button"),l&&(ae["aria-disabled"]=l));const se=(0,jv.A)(t,R,F);const le=(0,cv.A)({},n,{centerRipple:i,component:s,disabled:l,disableRipple:u,disableTouchRipple:c,focusRipple:d,tabIndex:_,focusVisible:M}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,hv.A)(o,fy,i);return n&&r&&(a.root+=" ".concat(r)),a})(le);return(0,El.jsxs)(vy,(0,cv.A)({as:oe,className:(0,dv.A)(ue.root,a),ownerState:le,onBlur:Z,onClick:f,onContextMenu:K,onFocus:ee,onKeyDown:re,onKeyUp:ie,onMouseDown:G,onMouseLeave:X,onMouseUp:Y,onDragLeave:q,onTouchEnd:J,onTouchMove:Q,onTouchStart:$,ref:se,tabIndex:l?-1:_,type:P},ae,I,{children:[o,H?(0,El.jsx)(py,(0,cv.A)({ref:z,center:i},T)):null]}))});function by(e){return(0,Pv.Ay)("MuiIconButton",e)}const Ay=(0,Dv.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),xy=["edge","children","className","color","disabled","disableFocusRipple","size"],wy=(0,fv.Ay)(yy,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,_v.A)(n.color))],n.edge&&t["edge".concat((0,_v.A)(n.edge))],t["size".concat((0,_v.A)(n.size))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.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,pv.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,cv.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,cv.A)({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":(0,cv.A)({},i&&{backgroundColor:t.vars?"rgba(".concat(i.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,pv.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(Ay.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),ky=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:u="medium"}=n,c=(0,uv.A)(n,xy),d=(0,cv.A)({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:u}),h=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,_v.A)(r)),i&&"edge".concat((0,_v.A)(i)),"size".concat((0,_v.A)(o))]};return(0,hv.A)(a,by,t)})(d);return(0,El.jsx)(wy,(0,cv.A)({className:(0,dv.A)(h.root,o),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},c,{ownerState:d,children:i}))}),Sy=ky;var Ey=i(1257);const Cy=(0,Ey.A)((0,El.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"),_y=(0,Ey.A)((0,El.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Ty=(0,Ey.A)((0,El.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"),Dy=(0,Ey.A)((0,El.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"),Py=(0,Ey.A)((0,El.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"),Iy=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],Fy=(0,fv.Ay)(zv,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,_v.A)(n.color||n.severity))]]}})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?pv.e$:pv.a,r="light"===t.palette.mode?pv.a:pv.e$;return(0,cv.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(Nv.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(Nv.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,cv.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)})}})]})}),Ly=(0,fv.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),zy=(0,fv.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Oy=(0,fv.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}),Ny={success:(0,El.jsx)(Cy,{fontSize:"inherit"}),warning:(0,El.jsx)(_y,{fontSize:"inherit"}),error:(0,El.jsx)(Ty,{fontSize:"inherit"}),info:(0,El.jsx)(Dy,{fontSize:"inherit"})},jy=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:a="Close",color:s,components:l={},componentsProps:u={},icon:c,iconMapping:d=Ny,onClose:h,role:p="alert",severity:f="success",slotProps:m={},slots:g={},variant:v="standard"}=n,y=(0,uv.A)(n,Iy),b=(0,cv.A)({},n,{color:s,severity:f,variant:v,colorSeverity:s||f}),A=(e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root","color".concat((0,_v.A)(n||r)),"".concat(t).concat((0,_v.A)(n||r)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,hv.A)(o,Ov,i)})(b),x={slots:(0,cv.A)({closeButton:l.CloseButton,closeIcon:l.CloseIcon},g),slotProps:(0,cv.A)({},u,m)},[w,k]=Cv("closeButton",{elementType:Sy,externalForwardedProps:x,ownerState:b}),[S,E]=Cv("closeIcon",{elementType:Py,externalForwardedProps:x,ownerState:b});return(0,El.jsxs)(Fy,(0,cv.A)({role:p,elevation:0,ownerState:b,className:(0,dv.A)(A.root,o),ref:t},y,{children:[!1!==c?(0,El.jsx)(Ly,{ownerState:b,className:A.icon,children:c||d[f]||Ny[f]}):null,(0,El.jsx)(zy,{ownerState:b,className:A.message,children:i}),null!=r?(0,El.jsx)(Oy,{ownerState:b,className:A.action,children:r}):null,null==r&&h?(0,El.jsx)(Oy,{ownerState:b,className:A.action,children:(0,El.jsx)(w,(0,cv.A)({size:"small","aria-label":a,title:a,color:"inherit",onClick:h},k,{children:(0,El.jsx)(S,(0,cv.A)({fontSize:"small"},E))}))}):null]}))}),Ry=jy;function My(e,t){const n=(0,xl.useRef)(e);(0,xl.useEffect)(()=>{n.current=e},[e]);const r=(0,xl.useMemo)(()=>(0,l.sg)(function(){return n.current(...arguments)},t),[t]);return(0,xl.useEffect)(()=>()=>{r.cancel()},[r]),r}function By(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const[i,o]=(0,xl.useState)(!0),[s,l]=(0,xl.useState)(t),u=(0,xl.useRef)();(0,xl.useEffect)(()=>{let n=!0;return(async()=>{try{const r=await a.IG.getObj(e);null==r?await a.IG.setObj(e,t):n&&l(r)}catch(t){(0,ht.h9)("storage load error for key: ".concat(e),t)}finally{n&&o(!1)}})(),()=>{n=!1}},[e,t]);const c=My((0,xl.useCallback)(async(e,t)=>{try{const n=await _a(e,t);null!=n&&n.isNew&&l(n.value)}catch(t){(0,ht.h9)("Sync failed",e)}},[]),3e3);(0,xl.useEffect)(()=>{i||null!==s&&(a.IG.setObj(e,s).catch(t=>{(0,ht.h9)("storage save error for key: ".concat(e),t)}),u.current&&Object.is(u.current.value,s)?u.current=void 0:n&&(0,$t.tc)()&&c(n,s))},[e,n,i,s,c]);const d=(0,xl.useCallback)(e=>{l(t=>"function"==typeof e?e(t):e)},[]),h=(0,xl.useCallback)(e=>{l(t=>{const n="function"==typeof e?e(t):e,i="object"==typeof t&&null!==t?t:{};return(0,r.A)((0,r.A)({},i),n)})},[]),p=(0,xl.useCallback)(async()=>{try{await a.IG.del(e),l(null)}catch(t){(0,ht.h9)("storage remove error for key: ".concat(e),t)}},[e]),f=(0,xl.useCallback)(async()=>{try{const n=await a.IG.getObj(e),r=null!=n?n:t;if(function(e,t){if(Object.is(e,t))return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t&&Array.isArray(e)===Array.isArray(t))try{return JSON.stringify(e)===JSON.stringify(t)}catch(e){return!1}return!1}(s,r))return;Object.is(s,r)||(u.current={value:r}),l(r)}catch(t){(0,ht.h9)("storage reload error for key: ".concat(e),t)}},[e,t,s]);return{data:s,save:d,update:h,remove:p,reload:f,isLoading:i}}function Wy(e){return(0,Pv.Ay)("MuiCircularProgress",e)}(0,Dv.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var Uy,Hy,Vy,Gy;const Ky=["className","color","disableShrink","size","style","thickness","value","variant"];let qy,Yy,Xy,$y;const Jy=44,Qy=(0,Xv.i7)(qy||(qy=Uy||(Uy=bc(["\n  0% {\n    transform: rotate(0deg);\n  }\n\n  100% {\n    transform: rotate(360deg);\n  }\n"])))),Zy=(0,Xv.i7)(Yy||(Yy=Hy||(Hy=bc(["\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"])))),eb=(0,fv.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,_v.A)(n.color))]]}})(e=>{let{ownerState:t,theme:n}=e;return(0,cv.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,Xv.AH)(Xy||(Xy=Vy||(Vy=bc(["\n      animation: "," 1.4s linear infinite;\n    "]))),Qy)}),tb=(0,fv.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),nb=(0,fv.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,_v.A)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})(e=>{let{ownerState:t,theme:n}=e;return(0,cv.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,Xv.AH)($y||($y=Gy||(Gy=bc(["\n      animation: "," 1.4s ease-in-out infinite;\n    "]))),Zy)}),rb=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:u=0,variant:c="indeterminate"}=n,d=(0,uv.A)(n,Ky),h=(0,cv.A)({},n,{color:i,disableShrink:o,size:a,thickness:l,value:u,variant:c}),p=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,"color".concat((0,_v.A)(r))],svg:["svg"],circle:["circle","circle".concat((0,_v.A)(n)),i&&"circleDisableShrink"]};return(0,hv.A)(o,Wy,t)})(h),f={},m={},g={};if("determinate"===c){const e=2*Math.PI*((Jy-l)/2);f.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(u),f.strokeDashoffset="".concat(((100-u)/100*e).toFixed(3),"px"),m.transform="rotate(-90deg)"}return(0,El.jsx)(eb,(0,cv.A)({className:(0,dv.A)(p.root,r),style:(0,cv.A)({width:a,height:a},m,s),ownerState:h,ref:t,role:"progressbar"},g,d,{children:(0,El.jsx)(tb,{className:p.svg,ownerState:h,viewBox:"".concat(22," ").concat(22," ").concat(Jy," ").concat(Jy),children:(0,El.jsx)(nb,{className:p.circle,style:f,ownerState:h,cx:Jy,cy:Jy,r:(Jy-l)/2,fill:"none",strokeWidth:l})})}))}),ib=rb;var ob=i(5219);function ab(e){return(0,Pv.Ay)("MuiTypography",e)}(0,Dv.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 sb=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],lb=(0,fv.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,_v.A)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.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})}),ub={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},cb={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},db=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiTypography"}),r=(e=>cb[e]||e)(n.color),i=(0,ob.A)((0,cv.A)({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:u=!1,paragraph:c=!1,variant:d="body1",variantMapping:h=ub}=i,p=(0,uv.A)(i,sb),f=(0,cv.A)({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:u,paragraph:c,variant:d,variantMapping:h}),m=s||(c?"p":h[d]||ub[d])||"span",g=(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,_v.A)(t)),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,hv.A)(s,ab,a)})(f);return(0,El.jsx)(lb,(0,cv.A)({as:m,ref:t,ownerState:f,className:(0,dv.A)(g.root,a)},p))}),hb=db;function pb(e){return(0,Pv.Ay)("MuiLink",e)}const fb=(0,Dv.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var mb=i(8853);const gb={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},vb=e=>{let{theme:t,ownerState:n}=e;const r=(e=>gb[e]||e)(n.color),i=(0,mb.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,mb.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,pv.X4)(i,.4)},yb=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],bb=(0,fv.Ay)(hb,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,_v.A)(n.underline))],"button"===n.component&&t.button]}})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,cv.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:vb({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(fb.focusVisible)]:{outline:"auto"}})}),Ab=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiLink"}),{className:r,color:i="primary",component:o="a",onBlur:a,onFocus:s,TypographyClasses:l,underline:u="always",variant:c="inherit",sx:d}=n,h=(0,uv.A)(n,yb),{isFocusVisibleRef:p,onBlur:f,onFocus:m,ref:g}=(0,Mv.A)(),[v,y]=xl.useState(!1),b=(0,jv.A)(t,g),A=(0,cv.A)({},n,{color:i,component:o,focusVisible:v,underline:u,variant:c}),x=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root","underline".concat((0,_v.A)(i)),"button"===n&&"button",r&&"focusVisible"]};return(0,hv.A)(o,pb,t)})(A);return(0,El.jsx)(bb,(0,cv.A)({color:i,className:(0,dv.A)(x.root,r),classes:l,component:o,onBlur:e=>{f(e),!1===p.current&&y(!1),a&&a(e)},onFocus:e=>{m(e),!0===p.current&&y(!0),s&&s(e)},ref:b,ownerState:A,variant:c,sx:[...Object.keys(gb).includes(i)?[]:[{color:i}],...Array.isArray(d)?d:[d]]},h))}),xb=Ab;function wb(e){return(0,Pv.Ay)("MuiDivider",e)}const kb=(0,Dv.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Sb=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Eb=(0,fv.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,cv.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,pv.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,cv.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,cv.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,cv.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,cv.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%"}})}),Cb=(0,fv.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,cv.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)")})}),_b=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:u="horizontal",role:c=("hr"!==a?"separator":void 0),textAlign:d="center",variant:h="fullWidth"}=n,p=(0,uv.A)(n,Sb),f=(0,cv.A)({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:u,role:c,textAlign:d,variant:h}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e,u={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,hv.A)(u,wb,r)})(f);return(0,El.jsx)(Eb,(0,cv.A)({as:a,className:(0,dv.A)(m.root,o),role:c,ref:t,ownerState:f},p,{children:i?(0,El.jsx)(Cb,{className:m.wrapper,ownerState:f,children:i}):null}))});_b.muiSkipListHighlight=!0;const Tb=_b;function Db(){return(0,El.jsxs)("center",{children:[(0,El.jsx)(Tb,{children:(0,El.jsx)(xb,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.32")})}),(0,El.jsx)(ib,{})]})}const Pb=(0,xl.createContext)({setting:o.la7,updateSetting:()=>{},reloadSetting:()=>{}});function Ib(e){let{children:t,context:n}=e;const i=(0,xl.useMemo)(()=>"options"===n,[n]),{data:s,isLoading:l,update:u,reload:c}=By(o.r$0,o.la7,o.XEV),d=!!s,h=(0,o.Vnn)(s),p=null==s?void 0:s.logLevel;(0,xl.useEffect)(()=>{!d||h>=o.xoZ||u(e=>!e||(0,o.Vnn)(e)>=o.xoZ?e:(0,o.cPn)(e))},[d,h,u]),(0,xl.useEffect)(()=>{"boolean"==typeof(null==s?void 0:s.darkMode)&&u(e=>(0,r.A)((0,r.A)({},e),{},{darkMode:e.darkMode?"dark":"light"}))},[null==s?void 0:s.darkMode,u]),(0,xl.useEffect)(()=>{i&&(async()=>{try{ht.vF.setLevel(p),V.aQ&&await(0,G.Ru)(o.Mai,p)}catch(e){ht.vF.error("Failed to fetch log level, using default.",e)}})()},[i,p]);const f=(0,xl.useCallback)(e=>{u(e),(0,a.GY)(o.XEV)},[u]),m=(0,xl.useCallback)(e=>async t=>{f(n=>(0,r.A)((0,r.A)({},n),{},{[e]:(0,r.A)((0,r.A)({},(null==n?void 0:n[e])||{}),t)}))},[f]),g=(0,xl.useMemo)(()=>({context:n,setting:s,updateSetting:f,updateChild:m,reloadSetting:c}),[n,s,f,m,c]);return l?i?(0,El.jsx)(Db,{}):null:s?(0,El.jsx)(Pb.Provider,{value:g,children:t}):i?(0,El.jsx)("center",{children:(0,El.jsxs)(Ry,{severity:"error",sx:{maxWidth:600,margin:"60px auto"},children:[(0,El.jsx)("p",{children:"数据加载出错,请刷新页面或卸载后重新安装。"}),(0,El.jsx)("p",{children:"Data loading error, please refresh the page or uninstall and reinstall."})]})}):null}function Fb(){return(0,xl.useContext)(Pb)}var Lb=i(3739);const zb=xl.createContext(null);function Ob(){return xl.useContext(zb)}const Nb="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const jb=function(e){const{children:t,theme:n}=e,r=Ob(),i=xl.useMemo(()=>{const e=null===r?n:function(e,t){if("function"==typeof t)return t(e);return(0,cv.A)({},e,t)}(r,n);return null!=e&&(e[Nb]=null!==r),e},[n,r]);return(0,El.jsx)(zb.Provider,{value:i,children:t})};const Rb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=xl.useContext(kl.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},Mb=["value"],Bb=xl.createContext();const Wb=()=>{const e=xl.useContext(Bb);return null!=e&&e},Ub=function(e){let{value:t}=e,n=(0,uv.A)(e,Mb);return(0,El.jsx)(Bb.Provider,(0,cv.A)({value:null==t||t},n))};var Hb=i(7441),Vb=i(6489),Gb=i(7461),Kb=i(1296),qb=i(7802),Yb=i(3013);const Xb=(0,Yb.A)();const $b=function(){return Rb(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xb)};function Jb(e){const t=(0,Kb.internal_serializeStyles)(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles="@layer global{".concat(t.styles,"}")),t):e}const Qb=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const i=$b(r),o=n&&i[n]||i;let a="function"==typeof t?t(o):t;return o.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Jb("function"==typeof e?e(o):e)):Jb(a)),(0,El.jsx)(qb.A,{styles:a})};const Zb={};function eA(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return xl.useMemo(()=>{const i=e&&t[e]||t;if("function"==typeof n){const o=n(i),a=e?(0,cv.A)({},t,{[e]:o}):o;return r?()=>a:a}return e?(0,cv.A)({},t,{[e]:n}):(0,cv.A)({},t,n)},[e,t,n,r])}const tA=function(e){const{children:t,theme:n,themeId:r}=e,i=Rb(Zb),o=Ob()||Zb,a=eA(r,i,n),s=eA(r,o,n,!0),l="rtl"===a.direction,u=function(e){const t=Rb(),n=(0,Gb.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,Vb.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,El.jsx)(Qb,{styles:i}):null}(a);return(0,El.jsx)(jb,{theme:s,children:(0,El.jsx)(kl.T.Provider,{value:a,children:(0,El.jsx)(Ub,{value:l,children:(0,El.jsxs)(Hb.A,{value:null==a?void 0:a.components,children:[u,t]})})})})};var nA=i(4882);const rA=["theme"];function iA(e){let{theme:t}=e,n=(0,uv.A)(e,rA);const r=t[nA.A];let i=r||t;return"function"!=typeof t&&(r&&!r.vars?i=(0,cv.A)({},r,{vars:null}):t&&!t.vars&&(i=(0,cv.A)({},t,{vars:null}))),(0,El.jsx)(tA,(0,cv.A)({},n,{themeId:r?nA.A:void 0,theme:i}))}var oA=i(7239);const aA=function(e){return(0,El.jsx)(Qb,(0,cv.A)({},e,{defaultTheme:oA.A,themeId:nA.A}))},sA=(e,t)=>(0,cv.A)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),lA=e=>(0,cv.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 uA=function(e){const t=(0,mv.b)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return(0,El.jsxs)(xl.Fragment,{children:[(0,El.jsx)(aA,{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,cv.A)({html:sA(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,cv.A)({margin:0},lA(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 cA(){const{setting:{darkMode:e},updateSetting:t}=Fb(),n=(0,xl.useCallback)(()=>{t({darkMode:{light:"dark",dark:"auto",auto:"light"}[e]||"light"})},[e,t]);return{darkMode:e,toggleDarkMode:n}}function dA(e){let{children:t,options:n={},styles:i={}}=e;const{darkMode:a}=cA(),[s,l]=(0,xl.useState)(o.VwZ);(0,xl.useEffect)(()=>{if("function"!=typeof window.matchMedia)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{l(e.matches?o.fSx:o.VwZ)};return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]);const u=(0,xl.useMemo)(()=>{let e=16;try{const t=window.getComputedStyle(document.documentElement).fontSize;e=parseInt(t.replace("px",""))}catch(e){}const t="dark"===a||"auto"===a&&s===o.fSx;return(0,Lb.A)((0,r.A)({palette:{mode:t?o.fSx:o.VwZ},typography:{htmlFontSize:e}},n))},[a,n,s]);return(0,El.jsxs)(iA,{theme:u,children:[(0,El.jsx)(uA,{}),(0,El.jsx)(aA,{styles:i}),t]})}var hA=i(3367);const pA=["className","component"];var fA=i(7599);const mA=(0,Dv.A)("MuiBox",["root"]),gA=(0,Lb.A)(),vA=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,Kb.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(hA.A);return xl.forwardRef(function(e,a){const s=$b(n),l=(0,ob.A)(e),{className:u,component:c="div"}=l,d=(0,uv.A)(l,pA);return(0,El.jsx)(o,(0,cv.A)({as:c,ref:a,className:(0,dv.A)(u,i?i(r):r),theme:t&&s[t]||s},d))})}({themeId:nA.A,defaultTheme:gA,defaultClassName:mA.root,generateClassName:fA.A.generate}),yA=vA;function bA(){const e=$b(oA.A);return e[nA.A]||e}var AA=i(6253),xA=i(8581);function wA(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,xA.A)(e,t,n)}function kA(e){if(e.type)return e;if("#"===e.charAt(0))return kA(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 SA(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 EA(e,t){return e=kA(e),t=wA(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,SA(e)}function CA(e){return e+16}function _A(e){return e+52}function TA(){return Math.max(0,window.innerWidth-16)}function DA(){return Math.max(0,window.innerHeight-52)}function PA(e){return Math.max(0,window.innerWidth-CA(e))}function IA(e){return Math.max(0,window.innerHeight-_A(e))}const FA=["direction","size","setSize","position","setPosition","children","minSize","maxSize","getMaxPositionY"],LA=["header","children","position","size","minSize","maxSize","setSize","setPosition","onChangeSize","onChangePosition","autoHeight"];function zA(e){let{direction:t,size:n,setSize:i,position:o,setPosition:a,children:s,minSize:u,maxSize:c,getMaxPositionY:d}=e,h=(0,Y.A)(e,FA);const[p,f]=(0,xl.useState)(null);function m(e){!Na&&e.target.setPointerCapture(e.pointerId);const{clientX:t,clientY:r}=Na?e.targetTouches[0]:e;f({x:o.x,y:o.y,w:n.w,h:n.h,clientX:t,clientY:r})}function g(e){const{clientX:r,clientY:s}=Na?e.targetTouches[0]:e;if(p){const e=r-p.clientX,h=s-p.clientY;let f=o.x,m=o.y,g=n.w,v=n.h;switch(t){case"Header":f=p.x+e,m=p.y+h;break;case"TopLeft":f=p.x+e,m=p.y+h,g=p.w-e,v=p.h-h;break;case"Top":m=p.y+h,v=p.h-h;break;case"TopRight":m=p.y+h,g=p.w+e,v=p.h-h;break;case"Left":f=p.x+e,g=p.w-e;break;case"Right":g=p.w+e;break;case"BottomLeft":f=p.x+e,g=p.w-e,v=p.h+h;break;case"Bottom":v=p.h+h;break;case"BottomRight":g=p.w+e,v=p.h+h}g<u.w&&(g=u.w,f=o.x),g>c.w&&(g=c.w,f=o.x),v<u.h&&(v=u.h,m=o.y),v>c.h&&(v=c.h,m=o.y);const y={w:(0,l.NS)(g,u.w,TA()),h:(0,l.NS)(v,u.h,DA())};a({x:(0,l.NS)(f,0,PA(y.w)),y:(0,l.NS)(m,0,d(y.h))}),i(y)}}function v(e){e.stopPropagation(),f(null)}const y=Na?{onTouchStart:m,onTouchMove:g,onTouchEnd:v}:{onPointerDown:m,onPointerMove:g,onPointerUp:v};return(0,El.jsx)("div",(0,r.A)((0,r.A)((0,r.A)({},h),y),{},{children:s}))}function OA(e){let{header:t,children:n,position:i={x:0,y:0},size:o={w:600,h:400},minSize:a={w:300,h:200},maxSize:s={w:1200,h:1200},setSize:u,setPosition:c,onChangeSize:d,onChangePosition:h,autoHeight:p}=e,f=(0,Y.A)(e,LA);const m=bA(),g="dark"===m.palette.mode,v=(0,xl.useRef)(null),y=(0,xl.useCallback)(e=>{var t;if(!p)return IA(e);const n=null===(t=v.current)||void 0===t?void 0:t.getBoundingClientRect().height;return Math.max(0,window.innerHeight-(n||_A(e)))},[p]);(0,xl.useLayoutEffect)(()=>{if(!p||!v.current)return;const e=()=>{c(e=>{const t=(0,l.NS)(e.y,0,y(o.h));return t===e.y?e:(0,r.A)((0,r.A)({},e),{},{y:t})})};e();const t=window.ResizeObserver;if(!t)return;const n=new t(e);return n.observe(v.current),()=>n.disconnect()},[p,y,c,o.h]);const b=g?"\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      ",A={size:o,setSize:u,position:i,setPosition:c,minSize:a,maxSize:s,getMaxPositionY:y};return(0,El.jsxs)(yA,(0,r.A)((0,r.A)({ref:v,className:"KT-draggable",style:{touchAction:"none",position:"fixed",left:i.x,top:i.y,display:"grid",gridTemplateColumns:"".concat(8,"px ").concat(o.w,"px ").concat(8,"px"),gridTemplateRows:"".concat(8,"px auto ").concat(8,"px"),zIndex:2147483647,borderRadius:"12px",overflow:"hidden"}},f),{},{children:[(0,El.jsx)(zA,(0,r.A)({direction:"TopLeft",style:{transform:"translate(".concat(4,"px, ").concat(4,"px)"),cursor:"nw-resize"}},A)),(0,El.jsx)(zA,(0,r.A)({direction:"Top",style:{margin:"0 ".concat(4,"px"),transform:"translate(0px, ".concat(4,"px)"),cursor:"row-resize"}},A)),(0,El.jsx)(zA,(0,r.A)({direction:"TopRight",style:{transform:"translate(-".concat(4,"px, ").concat(4,"px)"),cursor:"ne-resize"}},A)),(0,El.jsx)(zA,(0,r.A)({direction:"Left",style:{margin:"".concat(4,"px 0"),transform:"translate(".concat(4,"px, 0px)"),cursor:"col-resize"}},A)),(0,El.jsxs)(zv,{className:"KT-draggable-body",elevation:4,sx:{width:o.w,maxWidth:o.w,minWidth:0,borderRadius:4,overflow:"hidden",backgroundColor:m.palette.background.paper,boxShadow:b},children:[(0,El.jsx)(zA,(0,r.A)((0,r.A)({className:"KT-draggable-header",direction:"Header",style:{cursor:"move"}},A),{},{children:t})),(0,El.jsx)(yA,{className:"KT-draggable-container",sx:()=>{const e=p?{width:o.w,maxHeight:o.h,overflow:"hidden auto",wordBreak:"break-word"}:{width:o.w,height:o.h,overflow:"hidden auto",wordBreak:"break-word"},t="dark"===m.palette.mode?"#1f1f23":m.palette.background.paper,n="dark"===m.palette.mode?EA(m.palette.text.primary,.28):EA(m.palette.text.primary,.24);return(0,r.A)((0,r.A)({},e),{},{backgroundColor:m.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(m.palette.background.paper)},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:EA(m.palette.text.primary,.36)},scrollbarWidth:"thin",scrollbarColor:"".concat(n," ").concat(t)})},children:n})]}),(0,El.jsx)(zA,(0,r.A)({direction:"Right",style:{margin:"".concat(4,"px 0"),transform:"translate(-".concat(4,"px, 0px)"),cursor:"col-resize"}},A)),(0,El.jsx)(zA,(0,r.A)({direction:"BottomLeft",style:{transform:"translate(".concat(4,"px, -").concat(4,"px)"),cursor:"ne-resize"}},A)),(0,El.jsx)(zA,(0,r.A)({direction:"Bottom",style:{margin:"0 ".concat(4,"px"),transform:"translate(0px, -".concat(4,"px)"),cursor:"row-resize"}},A)),(0,El.jsx)(zA,(0,r.A)({direction:"BottomRight",style:{transform:"translate(-".concat(4,"px, -").concat(4,"px)"),cursor:"nw-resize"}},A))]}))}var NA=i(6997);const jA=["ownerState"],RA=["variants"],MA=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function BA(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function WA(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 UA=(0,Yb.A)(),HA=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function VA(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function GA(e){return e?(t,n)=>n[e]:null}function KA(e,t,n){let{ownerState:r}=t,i=(0,uv.A)(t,jA);const o="function"==typeof e?e((0,cv.A)({ownerState:r},i)):e;if(Array.isArray(o))return o.flatMap(e=>KA(e,(0,cv.A)({ownerState:r},i),n));if(o&&"object"==typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,uv.A)(o,RA);return e.forEach(e=>{let o=!0;if("function"==typeof e.props?o=e.props((0,cv.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,cv.A)({ownerState:r},i,r)):e.style;t.push(n?WA((0,Kb.internal_serializeStyles)(o),n):o)}}),t}return n?WA((0,Kb.internal_serializeStyles)(o),n):o}const qA=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=UA,rootShouldForwardProp:r=BA,slotShouldForwardProp:i=BA}=e,o=e=>(0,hA.A)((0,cv.A)({},e,{theme:VA((0,cv.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,Kb.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:s,slot:l,skipVariantsResolver:u,skipSx:c,overridesResolver:d=GA(HA(l))}=a,h=(0,uv.A)(a,MA),p=s&&s.startsWith("Mui")||l?"components":"custom",f=void 0!==u?u:l&&"Root"!==l&&"root"!==l||!1,m=c||!1;let g=BA;"Root"===l||"root"===l?g=r:l?g=i:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(g=void 0);const v=(0,Kb.default)(e,(0,cv.A)({shouldForwardProp:g,label:undefined},h)),y=e=>"function"==typeof e&&e.__emotion_real!==e||(0,NA.Q)(e)?r=>{const i=VA({theme:r.theme,defaultTheme:n,themeId:t});return KA(e,(0,cv.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),u=1;u<a;u++)l[u-1]=arguments[u];const c=l?l.map(y):[];s&&d&&c.push(e=>{const r=VA((0,cv.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]=KA(i,(0,cv.A)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),d(e,o)}),s&&!f&&c.push(e=>{var r;const i=VA((0,cv.A)({},e,{defaultTheme:n,themeId:t}));return KA({variants:null==i||null==(r=i.components)||null==(r=r[s])?void 0:r.variants},(0,cv.A)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),m||c.push(o);const h=c.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,...c);return e.muiName&&(p.muiName=e.muiName),p};return v.withConfig&&(b.withConfig=v.withConfig),b}}(),YA=qA;var XA=i(3699);function $A(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,o=$b(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,XA.A)(t.components[n].defaultProps,r):r}({theme:o,name:n,props:t});return a}var JA=i(2680),QA=i(1464);const ZA=["component","direction","spacing","divider","children","className","useFlexGap"],ex=(0,Yb.A)(),tx=YA("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function nx(e){return $A({props:e,name:"MuiStack",defaultTheme:ex})}function rx(e,t){const n=xl.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(xl.cloneElement(t,{key:"separator-".concat(i)})),e),[])}const ix=e=>{let{ownerState:t,theme:n}=e,r=(0,cv.A)({display:"flex",flexDirection:"column"},(0,JA.NI)({theme:n},(0,JA.kW)({values:t.direction,breakpoints:n.breakpoints.values}),e=>({flexDirection:e})));if(t.spacing){const e=(0,QA.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,JA.kW)({values:t.direction,base:i}),a=(0,JA.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,QA._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,QA._W)(e,n)}};var i};r=(0,NA.A)(r,(0,JA.NI)({theme:n},a,s))}return r=(0,JA.iZ)(n.breakpoints,r),r};const ox=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=tx,useThemeProps:n=nx,componentName:r="MuiStack"}=e,i=t(ix),o=xl.forwardRef(function(e,t){const o=n(e),a=(0,ob.A)(o),{component:s="div",direction:l="column",spacing:u=0,divider:c,children:d,className:h,useFlexGap:p=!1}=a,f=(0,uv.A)(a,ZA),m={direction:l,spacing:u,useFlexGap:p},g=(0,hv.A)({root:["root"]},e=>(0,Pv.Ay)(r,e),{});return(0,El.jsx)(i,(0,cv.A)({as:s,ownerState:m,ref:t,className:(0,dv.A)(g.root,h)},f,{children:c?rx(d,c):d}))});return o}({createStyledComponent:(0,fv.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,mv.b)({props:e,name:"MuiStack"})}),ax=ox;var sx=i(7698),lx=i(4690),ux=i(7876),cx=i(3072),dx=i(5362),hx=i(8756),px=i(1496),fx=i(5995),mx=i(9127),gx=i(8340),vx=i(3795);const yx=["execute"],bx=()=>{const[e,t]=(0,xl.useState)(null),[n,r]=(0,xl.useState)(!1),[i,o]=(0,xl.useState)(null),a=(0,xl.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,xl.useCallback)(()=>{t(null),r(!1),o(null)},[])}},Ax=(e,t)=>{const n=bx(),{execute:i}=n,o=(0,Y.A)(n,yx);return(0,xl.useEffect)(()=>{e&&i(e,t)},[i,e,t]),(0,r.A)({},o)},xx=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===o.THG||void 0===o.THG||null===(r=o.THG[t])||void 0===r?void 0:r[e])&&void 0!==n?n:i}(e,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")},wx=()=>{const{setting:{uiLang:e}}=Fb();return xx(e)};var kx=i(6333),Sx=i(6267),Ex=i(2561);const Cx=["onChange","maxRows","minRows","style","value"];function _x(e){return parseInt(e,10)||0}const Tx={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Dx(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Px=xl.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:o,value:a}=e,s=(0,uv.A)(e,Cx),{current:l}=xl.useRef(null!=a),u=xl.useRef(null),c=(0,gv.A)(t,u),d=xl.useRef(null),h=xl.useRef(null),p=xl.useCallback(()=>{const t=u.current,n=h.current;if(!t||!n)return;const o=(0,kx.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=_x(o.paddingBottom)+_x(o.paddingTop),l=_x(o.borderBottomWidth)+_x(o.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=c;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-c)<=1}},[r,i,e.placeholder]),f=(0,Sx.A)(()=>{const e=u.current,t=p();if(!e||!t||Dx(t))return!1;const n=t.outerHeightStyle;return null!=d.current&&d.current!==n}),m=xl.useCallback(()=>{const e=u.current,t=p();if(!e||!t||Dx(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]),g=xl.useRef(-1);(0,Vb.A)(()=>{const e=(0,Ex.A)(m),t=null==u?void 0:u.current;if(!t)return;const n=(0,kx.A)(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{f()&&(r.unobserve(t),cancelAnimationFrame(g.current),m(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[p,m,f]),(0,Vb.A)(()=>{m()});return(0,El.jsxs)(xl.Fragment,{children:[(0,El.jsx)("textarea",(0,cv.A)({value:a,onChange:e=>{l||m(),n&&n(e)},ref:c,rows:i,style:o},s)),(0,El.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:h,tabIndex:-1,style:(0,cv.A)({},Tx,o,{paddingTop:0,paddingBottom:0})})]})}),Ix=Px;function Fx(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 Lx=xl.createContext(void 0);function zx(){return xl.useContext(Lx)}var Ox=i(2392);function Nx(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function jx(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(Nx(e.value)&&""!==e.value||t&&Nx(e.defaultValue)&&""!==e.defaultValue)}function Rx(e){return(0,Pv.Ay)("MuiInputBase",e)}const Mx=(0,Dv.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Bx=["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"],Wx=(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,_v.A)(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Ux=(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]},Hx=(0,fv.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Wx})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.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(Mx.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,cv.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})}),Vx=(0,fv.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Ux})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,i=(0,cv.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,cv.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(Mx.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(Mx.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"})}),Gx=(0,El.jsx)(aA,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Kx=xl.forwardRef(function(e,t){var n;const r=(0,mv.b)({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:a,className:s,components:l={},componentsProps:u={},defaultValue:c,disabled:d,disableInjectingGlobalStyles:h,endAdornment:p,fullWidth:f=!1,id:m,inputComponent:g="input",inputProps:v={},inputRef:y,maxRows:b,minRows:A,multiline:x=!1,name:w,onBlur:k,onChange:S,onClick:E,onFocus:C,onKeyDown:_,onKeyUp:T,placeholder:D,readOnly:P,renderSuffix:I,rows:F,slotProps:L={},slots:z={},startAdornment:O,type:N="text",value:j}=r,R=(0,uv.A)(r,Bx),M=null!=v.value?v.value:j,{current:B}=xl.useRef(null!=M),W=xl.useRef(),U=xl.useCallback(e=>{0},[]),H=(0,jv.A)(W,y,v.ref,U),[V,G]=xl.useState(!1),K=zx();const q=Fx({props:r,muiFormControl:K,states:["color","disabled","error","hiddenLabel","size","required","filled"]});q.focused=K?K.focused:V,xl.useEffect(()=>{!K&&d&&V&&(G(!1),k&&k())},[K,d,V,k]);const Y=K&&K.onFilled,X=K&&K.onEmpty,$=xl.useCallback(e=>{jx(e)?Y&&Y():X&&X()},[Y,X]);(0,Ox.A)(()=>{B&&$({value:M})},[M,$,B]);xl.useEffect(()=>{$(W.current)},[]);let J=g,Q=v;x&&"input"===J&&(Q=F?(0,cv.A)({type:void 0,minRows:F,maxRows:F},Q):(0,cv.A)({type:void 0,maxRows:b,minRows:A},Q),J=Ix);xl.useEffect(()=>{K&&K.setAdornedStart(Boolean(O))},[K,O]);const Z=(0,cv.A)({},r,{color:q.color||"primary",disabled:q.disabled,endAdornment:p,error:q.error,focused:q.focused,formControl:K,fullWidth:f,hiddenLabel:q.hiddenLabel,multiline:x,size:q.size,startAdornment:O,type:N}),ee=(e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:d,size:h,startAdornment:p,type:f}=e,m={root:["root","color".concat((0,_v.A)(n)),r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",h&&"medium"!==h&&"size".concat((0,_v.A)(h)),c&&"multiline",p&&"adornedStart",o&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===f&&"inputTypeSearch",c&&"inputMultiline","small"===h&&"inputSizeSmall",u&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return(0,hv.A)(m,Rx,t)})(Z),te=z.root||l.Root||Hx,ne=L.root||u.root||{},re=z.input||l.Input||Vx;return Q=(0,cv.A)({},Q,null!=(n=L.input)?n:u.input),(0,El.jsxs)(xl.Fragment,{children:[!h&&Gx,(0,El.jsxs)(te,(0,cv.A)({},ne,!vv(te)&&{ownerState:(0,cv.A)({},Z,ne.ownerState)},{ref:t,onClick:e=>{W.current&&e.currentTarget===e.target&&W.current.focus(),E&&E(e)}},R,{className:(0,dv.A)(ee.root,ne.className,s,P&&"MuiInputBase-readOnly"),children:[O,(0,El.jsx)(Lx.Provider,{value:null,children:(0,El.jsx)(re,(0,cv.A)({ownerState:Z,"aria-invalid":q.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:c,disabled:q.disabled,id:m,onAnimationStart:e=>{$("mui-auto-fill-cancel"===e.animationName?W.current:{value:"x"})},name:w,placeholder:D,readOnly:P,required:q.required,rows:F,value:M,onKeyDown:_,onKeyUp:T,type:N},Q,!vv(re)&&{as:J,ownerState:(0,cv.A)({},Z,Q.ownerState)},{ref:H,className:(0,dv.A)(ee.input,Q.className,P&&"MuiInputBase-readOnly"),onBlur:e=>{k&&k(e),v.onBlur&&v.onBlur(e),K&&K.onBlur?K.onBlur(e):G(!1)},onChange:function(e){if(!B){const t=e.target||W.current;if(null==t)throw new Error((0,AA.A)(1));$({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),S&&S(e,...n)},onFocus:e=>{q.disabled?e.stopPropagation():(C&&C(e),v.onFocus&&v.onFocus(e),K&&K.onFocus?K.onFocus(e):G(!0))}}))}),p,I?I((0,cv.A)({},q,{startAdornment:O})):null]}))]})}),qx=Kx;var Yx=i(5460);function Xx(e){return(0,Pv.Ay)("MuiInput",e)}const $x=(0,cv.A)({},Mx,(0,Dv.A)("MuiInput",["root","underline","input"])),Jx=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Qx=(0,fv.Ay)(Hx,{shouldForwardProp:e=>(0,Yx.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Wx(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,cv.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($x.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat($x.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($x.disabled,", .").concat($x.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(r)}},["&.".concat($x.disabled,":before")]:{borderBottomStyle:"dotted"}})}),Zx=(0,fv.Ay)(Vx,{name:"MuiInput",slot:"Input",overridesResolver:Ux})({}),ew=xl.forwardRef(function(e,t){var n,r,i,o;const a=(0,mv.b)({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:u,fullWidth:c=!1,inputComponent:d="input",multiline:h=!1,slotProps:p,slots:f={},type:m="text"}=a,g=(0,uv.A)(a,Jx),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,hv.A)(r,Xx,t);return(0,cv.A)({},t,i)})(a),y={root:{ownerState:{disableUnderline:s}}},b=(null!=p?p:u)?(0,NA.A)(null!=p?p:u,y):y,A=null!=(n=null!=(r=f.root)?r:l.Root)?n:Qx,x=null!=(i=null!=(o=f.input)?o:l.Input)?i:Zx;return(0,El.jsx)(qx,(0,cv.A)({slots:{root:A,input:x},slotProps:b,fullWidth:c,inputComponent:d,multiline:h,ref:t,type:m},g,{classes:v}))});ew.muiName="Input";const tw=ew;function nw(e){return(0,Pv.Ay)("MuiFilledInput",e)}const rw=(0,cv.A)({},Mx,(0,Dv.A)("MuiFilledInput",["root","underline","input"])),iw=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],ow=(0,fv.Ay)(Hx,{shouldForwardProp:e=>(0,Yx.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Wx(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,cv.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(rw.focused)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},["&.".concat(rw.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(rw.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(rw.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(rw.disabled,", .").concat(rw.error,"):before")]:{borderBottom:"1px solid ".concat((t.vars||t).palette.text.primary)},["&.".concat(rw.disabled,":before")]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,cv.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}))}),aw=(0,fv.Ay)(Vx,{name:"MuiFilledInput",slot:"Input",overridesResolver:Ux})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.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})}),sw=xl.forwardRef(function(e,t){var n,r,i,o;const a=(0,mv.b)({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:u=!1,inputComponent:c="input",multiline:d=!1,slotProps:h,slots:p={},type:f="text"}=a,m=(0,uv.A)(a,iw),g=(0,cv.A)({},a,{fullWidth:u,inputComponent:c,multiline:d,type:f}),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,hv.A)(r,nw,t);return(0,cv.A)({},t,i)})(a),y={root:{ownerState:g},input:{ownerState:g}},b=(null!=h?h:l)?(0,NA.A)(y,null!=h?h:l):y,A=null!=(n=null!=(r=p.root)?r:s.Root)?n:ow,x=null!=(i=null!=(o=p.input)?o:s.Input)?i:aw;return(0,El.jsx)(qx,(0,cv.A)({slots:{root:A,input:x},componentsProps:b,fullWidth:u,inputComponent:c,multiline:d,ref:t,type:f},m,{classes:v}))});sw.muiName="Input";const lw=sw;var uw;const cw=["children","classes","className","label","notched"],dw=(0,fv.Ay)("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Yx.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%"}),hw=(0,fv.Ay)("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Yx.A})(e=>{let{ownerState:t,theme:n}=e;return(0,cv.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,cv.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 pw(e){return(0,Pv.Ay)("MuiOutlinedInput",e)}const fw=(0,cv.A)({},Mx,(0,Dv.A)("MuiOutlinedInput",["root","notchedOutline","input"])),mw=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],gw=(0,fv.Ay)(Hx,{shouldForwardProp:e=>(0,Yx.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Wx})(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,cv.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat(fw.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat(fw.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):r}},["&.".concat(fw.focused," .").concat(fw.notchedOutline)]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},["&.".concat(fw.error," .").concat(fw.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat(fw.disabled," .").concat(fw.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,cv.A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))}),vw=(0,fv.Ay)(function(e){const{className:t,label:n,notched:r}=e,i=(0,uv.A)(e,cw),o=null!=n&&""!==n,a=(0,cv.A)({},e,{notched:r,withLabel:o});return(0,El.jsx)(dw,(0,cv.A)({"aria-hidden":!0,className:t,ownerState:a},i,{children:(0,El.jsx)(hw,{ownerState:a,children:o?(0,El.jsx)("span",{children:n}):uw||(uw=(0,El.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}}),yw=(0,fv.Ay)(Vx,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Ux})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.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})}),bw=xl.forwardRef(function(e,t){var n,r,i,o,a;const s=(0,mv.b)({props:e,name:"MuiOutlinedInput"}),{components:l={},fullWidth:u=!1,inputComponent:c="input",label:d,multiline:h=!1,notched:p,slots:f={},type:m="text"}=s,g=(0,uv.A)(s,mw),v=(e=>{const{classes:t}=e,n=(0,hv.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},pw,t);return(0,cv.A)({},t,n)})(s),y=zx(),b=Fx({props:s,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A=(0,cv.A)({},s,{color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:y,fullWidth:u,hiddenLabel:b.hiddenLabel,multiline:h,size:b.size,type:m}),x=null!=(n=null!=(r=f.root)?r:l.Root)?n:gw,w=null!=(i=null!=(o=f.input)?o:l.Input)?i:yw;return(0,El.jsx)(qx,(0,cv.A)({slots:{root:x,input:w},renderSuffix:e=>(0,El.jsx)(vw,{ownerState:A,className:v.notchedOutline,label:null!=d&&""!==d&&b.required?a||(a=(0,El.jsxs)(xl.Fragment,{children:[d," ","*"]})):d,notched:void 0!==p?p:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:u,inputComponent:c,multiline:h,ref:t,type:m},g,{classes:(0,cv.A)({},v,{notchedOutline:null})}))});bw.muiName="Input";const Aw=bw;function xw(e){return(0,Pv.Ay)("MuiFormLabel",e)}const ww=(0,Dv.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),kw=["children","className","color","component","disabled","error","filled","focused","required"],Sw=(0,fv.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,cv.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(ww.focused)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(ww.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(ww.error)]:{color:(t.vars||t).palette.error.main}})}),Ew=(0,fv.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(ww.error)]:{color:(t.vars||t).palette.error.main}}}),Cw=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiFormLabel"}),{children:r,className:i,component:o="label"}=n,a=(0,uv.A)(n,kw),s=Fx({props:n,muiFormControl:zx(),states:["color","required","focused","disabled","error","filled"]}),l=(0,cv.A)({},n,{color:s.color||"primary",component:o,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),u=(e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:a,required:s}=e,l={root:["root","color".concat((0,_v.A)(n)),i&&"disabled",o&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return(0,hv.A)(l,xw,t)})(l);return(0,El.jsxs)(Sw,(0,cv.A)({as:o,ownerState:l,className:(0,dv.A)(u.root,i),ref:t},a,{children:[r,s.required&&(0,El.jsxs)(Ew,{ownerState:l,"aria-hidden":!0,className:u.asterisk,children:[" ","*"]})]}))}),_w=Cw;function Tw(e){return(0,Pv.Ay)("MuiInputLabel",e)}(0,Dv.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Dw=["disableAnimation","margin","shrink","variant","className"],Pw=(0,fv.Ay)(_w,{shouldForwardProp:e=>(0,Yx.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(ww.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,cv.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,cv.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,cv.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,cv.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)"}))}),Iw=xl.forwardRef(function(e,t){const n=(0,mv.b)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:i,className:o}=n,a=(0,uv.A)(n,Dw),s=zx();let l=i;void 0===l&&s&&(l=s.filled||s.focused||s.adornedStart);const u=Fx({props:n,muiFormControl:s,states:["size","variant","required","focused"]}),c=(0,cv.A)({},n,{disableAnimation:r,formControl:s,shrink:l,size:u.size,variant:u.variant,required:u.required,focused:u.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,_v.A)(r)),a],asterisk:[s&&"asterisk"]},u=(0,hv.A)(l,Tw,t);return(0,cv.A)({},t,u)})(c);return(0,El.jsx)(Pw,(0,cv.A)({"data-shrink":l,ownerState:c,ref:t,className:(0,dv.A)(d.root,o)},a,{classes:d}))});var Fw=i(7026);function Lw(e){return(0,Pv.Ay)("MuiFormControl",e)}(0,Dv.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const zw=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Ow=(0,fv.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,cv.A)({},t.root,t["margin".concat((0,_v.A)(n.margin))],n.fullWidth&&t.fullWidth)}})(e=>{let{ownerState:t}=e;return(0,cv.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%"})}),Nw=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiFormControl"}),{children:r,className:i,color:o="primary",component:a="div",disabled:s=!1,error:l=!1,focused:u,fullWidth:c=!1,hiddenLabel:d=!1,margin:h="none",required:p=!1,size:f="medium",variant:m="outlined"}=n,g=(0,uv.A)(n,zw),v=(0,cv.A)({},n,{color:o,component:a,disabled:s,error:l,fullWidth:c,hiddenLabel:d,margin:h,required:p,size:f,variant:m}),y=(e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root","none"!==n&&"margin".concat((0,_v.A)(n)),r&&"fullWidth"]};return(0,hv.A)(i,Lw,t)})(v),[b,A]=xl.useState(()=>{let e=!1;return r&&xl.Children.forEach(r,t=>{if(!(0,Fw.A)(t,["Input","Select"]))return;const n=(0,Fw.A)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}),e}),[x,w]=xl.useState(()=>{let e=!1;return r&&xl.Children.forEach(r,t=>{(0,Fw.A)(t,["Input","Select"])&&(jx(t.props,!0)||jx(t.props.inputProps,!0))&&(e=!0)}),e}),[k,S]=xl.useState(!1);s&&k&&S(!1);const E=void 0===u||s?k:u;let C;const _=xl.useMemo(()=>({adornedStart:b,setAdornedStart:A,color:o,disabled:s,error:l,filled:x,focused:E,fullWidth:c,hiddenLabel:d,size:f,onBlur:()=>{S(!1)},onEmpty:()=>{w(!1)},onFilled:()=>{w(!0)},onFocus:()=>{S(!0)},registerEffect:C,required:p,variant:m}),[b,o,s,l,x,E,c,d,C,p,f,m]);return(0,El.jsx)(Lx.Provider,{value:_,children:(0,El.jsx)(Ow,(0,cv.A)({as:a,ownerState:v,className:(0,dv.A)(y.root,i),ref:t},g,{children:r}))})}),jw=Nw;function Rw(e){return(0,Pv.Ay)("MuiFormHelperText",e)}const Mw=(0,Dv.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Bw;const Ww=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Uw=(0,fv.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t["size".concat((0,_v.A)(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(Mw.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Mw.error)]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})}),Hw=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiFormHelperText"}),{children:r,className:i,component:o="p"}=n,a=(0,uv.A)(n,Ww),s=Fx({props:n,muiFormControl:zx(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,cv.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}),u=(e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:a,focused:s,required:l}=e,u={root:["root",i&&"disabled",o&&"error",r&&"size".concat((0,_v.A)(r)),n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return(0,hv.A)(u,Rw,t)})(l);return(0,El.jsx)(Uw,(0,cv.A)({as:o,ownerState:l,className:(0,dv.A)(u.root,i),ref:t},a,{children:" "===r?Bw||(Bw=(0,El.jsx)("span",{className:"notranslate",children:"​"})):r}))});function Vw(e){var t;return parseInt(xl.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}var Gw=i(9894);const Kw=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];const qw=function(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,a=(0,uv.A)(e,Kw),s=o?{}:bv(r,i),{props:l,internalRef:u}=wv((0,cv.A)({},a,{externalSlotProps:s})),c=(0,gv.A)(u,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref);return yv(n,(0,cv.A)({},l,{ref:c}),i)};const Yw=xl.createContext({});function Xw(e){return(0,Pv.Ay)("MuiList",e)}(0,Dv.A)("MuiList",["root","padding","dense","subheader"]);const $w=["children","className","component","dense","disablePadding","subheader"],Jw=(0,fv.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,cv.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})}),Qw=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,u=(0,uv.A)(n,$w),c=xl.useMemo(()=>({dense:a}),[a]),d=(0,cv.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,hv.A)(o,Xw,t)})(d);return(0,El.jsx)(Yw.Provider,{value:c,children:(0,El.jsxs)(Jw,(0,cv.A)({as:o,className:(0,dv.A)(h.root,i),ref:t,ownerState:d},u,{children:[l,r]}))})});function Zw(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const ek=Zw,tk=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nk(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function rk(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function ik(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 ok(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")&&ik(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const ak=xl.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:o,className:a,disabledItemsFocusable:s=!1,disableListWrap:l=!1,onKeyDown:u,variant:c="selectedMenu"}=e,d=(0,uv.A)(e,tk),h=xl.useRef(null),p=xl.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,Ox.A)(()=>{r&&h.current.focus()},[r]),xl.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(ek((0,Gw.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,jv.A)(h,t);let m=-1;xl.Children.forEach(o,(e,t)=>{xl.isValidElement(e)?(e.props.disabled||("selectedMenu"===c&&e.props.selected||-1===m)&&(m=t),m===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(m+=1,m>=o.length&&(m=-1))):m===t&&(m+=1,m>=o.length&&(m=-1))});const g=xl.Children.map(o,(e,t)=>{if(t===m){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===c&&(t.tabIndex=0),xl.cloneElement(e,t)}return e});return(0,El.jsx)(Qw,(0,cv.A)({role:"menu",ref:f,className:a,onKeyDown:e=>{const t=h.current,n=e.key,r=(0,Gw.A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),ok(t,r,l,s,nk);else if("ArrowUp"===n)e.preventDefault(),ok(t,r,l,s,rk);else if("Home"===n)e.preventDefault(),ok(t,null,l,s,nk);else if("End"===n)e.preventDefault(),ok(t,null,l,s,rk);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&&ik(r,i);i.previousKeyMatched&&(l||ok(t,r,!1,s,nk,i))?e.preventDefault():i.previousKeyMatched=!1}u&&u(e)},tabIndex:r?0:-1},d,{children:g}))}),sk=ak;var lk=i(1093),uk=i(4519);const ck=!1;var dk="unmounted",hk="exited",pk="entering",fk="entered",mk="exiting",gk=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=hk,r.appearStatus=pk):i=fk:i=t.unmountOnExit||t.mountOnEnter?dk:hk,r.state={status:i},r.nextCallback=null,r}Wv(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===dk?{status:hk}: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!==pk&&n!==fk&&(t=pk):n!==pk&&n!==fk||(t=mk)}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===pk){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:sv.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===hk&&this.setState({status:dk})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[sv.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||ck?this.safeSetState({status:fk},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:pk},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:fk},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:sv.findDOMNode(this);t&&!ck?(this.props.onExit(r),this.safeSetState({status:mk},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:hk},function(){e.props.onExited(r)})})})):this.safeSetState({status:hk},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:sv.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===dk)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,uv.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return xl.createElement(Uv.Provider,{value:null},"function"==typeof n?n(e,r):xl.cloneElement(xl.Children.only(n),r))},t}(xl.Component);function vk(){}gk.contextType=Uv,gk.propTypes={},gk.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:vk,onEntering:vk,onEntered:vk,onExit:vk,onExiting:vk,onExited:vk},gk.UNMOUNTED=dk,gk.EXITED=hk,gk.ENTERING=pk,gk.ENTERED=fk,gk.EXITING=mk;const yk=gk,bk=e=>e.scrollTop;function Ak(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 xk=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function wk(e){return"scale(".concat(e,", ").concat(e**2,")")}const kk={entering:{opacity:1,transform:wk(1)},entered:{opacity:1,transform:"none"}},Sk="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Ek=xl.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:u,onExit:c,onExited:d,onExiting:h,style:p,timeout:f="auto",TransitionComponent:m=yk}=e,g=(0,uv.A)(e,xk),v=(0,$v.A)(),y=xl.useRef(),b=bA(),A=xl.useRef(null),x=(0,jv.A)(A,Vw(i),t),w=e=>t=>{if(e){const n=A.current;void 0===t?e(n):e(n,t)}},k=w(u),S=w((e,t)=>{bk(e);const{duration:n,delay:r,easing:i}=Ak({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:Sk?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)}),E=w(l),C=w(h),_=w(e=>{const{duration:t,delay:n,easing:r}=Ak({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:Sk?i:.666*i,delay:Sk?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=wk(.75),c&&c(e)}),T=w(d);return(0,El.jsx)(m,(0,cv.A)({appear:r,in:a,nodeRef:A,onEnter:S,onEntered:E,onEntering:k,onExit:_,onExited:T,onExiting:C,addEndListener:e=>{"auto"===f&&v.start(y.current||0,e),n&&n(A.current,e)},timeout:"auto"===f?null:f},g,{children:(e,t)=>xl.cloneElement(i,(0,cv.A)({style:(0,cv.A)({opacity:0,transform:wk(.75),visibility:"exited"!==e||a?void 0:"hidden"},kk[e],p,i.props.style),ref:x},t))}))});Ek.muiSupportAuto=!0;const Ck=Ek;var _k=i(9669);const Tk=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Dk(e){const t=[],n=[];return Array.from(e.querySelectorAll(Tk)).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 Pk(){return!0}const Ik=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=Dk,isEnabled:a=Pk,open:s}=e,l=xl.useRef(!1),u=xl.useRef(null),c=xl.useRef(null),d=xl.useRef(null),h=xl.useRef(null),p=xl.useRef(!1),f=xl.useRef(null),m=(0,gv.A)(Vw(t),f),g=xl.useRef(null);xl.useEffect(()=>{s&&f.current&&(p.current=!n)},[n,s]),xl.useEffect(()=>{if(!s||!f.current)return;const e=(0,_k.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]),xl.useEffect(()=>{if(!s||!f.current)return;const e=(0,_k.A)(f.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===f.current&&t.shiftKey&&(l.current=!0,c.current&&c.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!==u.current&&e.activeElement!==c.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!==u.current&&e.activeElement!==c.current||(n=o(f.current)),n.length>0){var i,s;const e=Boolean((null==(i=g.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=g.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,El.jsxs)(xl.Fragment,{children:[(0,El.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":"sentinelStart"}),xl.cloneElement(t,{ref:m,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,El.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:c,"data-testid":"sentinelEnd"})]})};var Fk=i(1941);const Lk=xl.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=xl.useState(null),s=(0,gv.A)(xl.isValidElement(n)?Vw(n):null,t);if((0,Vb.A)(()=>{i||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,i]),(0,Vb.A)(()=>{if(o&&!i)return(0,Fk.A)(t,o),()=>{(0,Fk.A)(t,null)}},[t,o,i]),i){if(xl.isValidElement(n)){const e={ref:s};return xl.cloneElement(n,e)}return(0,El.jsx)(xl.Fragment,{children:n})}return(0,El.jsx)(xl.Fragment,{children:o?sv.createPortal(n,o):o})}),zk=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Ok={entering:{opacity:1},entered:{opacity:1}},Nk=xl.forwardRef(function(e,t){const n=bA(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:u,onEntered:c,onEntering:d,onExit:h,onExited:p,onExiting:f,style:m,timeout:g=r,TransitionComponent:v=yk}=e,y=(0,uv.A)(e,zk),b=xl.useRef(null),A=(0,jv.A)(b,Vw(a),t),x=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},w=x(d),k=x((e,t)=>{bk(e);const r=Ak({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)}),S=x(c),E=x(f),C=x(e=>{const t=Ak({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),h&&h(e)}),_=x(p);return(0,El.jsx)(v,(0,cv.A)({appear:o,in:l,nodeRef:b,onEnter:k,onEntered:S,onEntering:w,onExit:C,onExited:_,onExiting:E,addEndListener:e=>{i&&i(b.current,e)},timeout:g},y,{children:(e,t)=>xl.cloneElement(a,(0,cv.A)({style:(0,cv.A)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},Ok[e],m,a.props.style),ref:A},t))}))}),jk=Nk;function Rk(e){return(0,Pv.Ay)("MuiBackdrop",e)}(0,Dv.A)("MuiBackdrop",["root","invisible"]);const Mk=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Bk=(0,fv.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,cv.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"})}),Wk=xl.forwardRef(function(e,t){var n,r,i;const o=(0,mv.b)({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:u={},componentsProps:c={},invisible:d=!1,open:h,slotProps:p={},slots:f={},TransitionComponent:m=jk,transitionDuration:g}=o,v=(0,uv.A)(o,Mk),y=(0,cv.A)({},o,{component:l,invisible:d}),b=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,hv.A)(r,Rk,t)})(y),A=null!=(n=p.root)?n:c.root;return(0,El.jsx)(m,(0,cv.A)({in:h,timeout:g},v,{children:(0,El.jsx)(Bk,(0,cv.A)({"aria-hidden":!0},A,{as:null!=(r=null!=(i=f.root)?i:u.Root)?r:l,className:(0,dv.A)(b.root,s,null==A?void 0:A.className),ownerState:(0,cv.A)({},y,null==A?void 0:A.ownerState),classes:b,ref:t,children:a}))}))});var Uk=i(4849);function Hk(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Vk(e){return parseInt((0,kx.A)(e).getComputedStyle(e).paddingRight,10)||0}function Gk(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&&Hk(e,i)})}function Kk(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function qk(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,_k.A)(e);return t.body===e?(0,kx.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Zw((0,_k.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(Vk(r)+e,"px");const t=(0,_k.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(Vk(t)+e,"px")})}let e;if(r.parentNode instanceof DocumentFragment)e=(0,_k.A)(r).body;else{const t=r.parentElement,n=(0,kx.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 Yk=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&&Hk(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);Gk(t,e.mount,e.modalRef,r,!0);const i=Kk(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=Kk(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=qk(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=Kk(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&&Hk(e.modalRef,t),Gk(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&&Hk(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const Xk=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Yk,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:u,open:c,rootRef:d}=e,h=xl.useRef({}),p=xl.useRef(null),f=xl.useRef(null),m=(0,gv.A)(f,d),[g,v]=xl.useState(!c),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const A=()=>(h.current.modalRef=f.current,h.current.mount=p.current,h.current),x=()=>{i.mount(A(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},w=(0,Sx.A)(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,_k.A)(p.current).body;i.add(A(),e),f.current&&x()}),k=xl.useCallback(()=>i.isTopModal(A()),[i]),S=(0,Sx.A)(e=>{p.current=e,e&&(c&&k()?x():f.current&&Hk(f.current,b))}),E=xl.useCallback(()=>{i.remove(A(),b)},[b,i]);xl.useEffect(()=>()=>{E()},[E]),xl.useEffect(()=>{c?w():y&&o||E()},[c,E,y,o,w]);const C=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&k()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},_=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Av(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,cv.A)({},n,t);return(0,cv.A)({role:"presentation"},r,{onKeyDown:C(r),ref:m})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,cv.A)({"aria-hidden":!0},e,{onClick:_(e),open:c})},getTransitionProps:()=>({onEnter:(0,Uk.A)(()=>{v(!1),a&&a()},null==l?void 0:l.props.onEnter),onExited:(0,Uk.A)(()=>{v(!0),s&&s(),o&&E()},null==l?void 0:l.props.onExited)}),rootRef:m,portalRef:S,isTopModal:k,exited:g,hasTransition:y}};function $k(e){return(0,Pv.Ay)("MuiModal",e)}(0,Dv.A)("MuiModal",["root","hidden","backdrop"]);const Jk=["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"],Qk=(0,fv.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,cv.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})}),Zk=(0,fv.Ay)(Wk,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),eS=xl.forwardRef(function(e,t){var n,r,i,o,a,s;const l=(0,mv.b)({name:"MuiModal",props:e}),{BackdropComponent:u=Zk,BackdropProps:c,className:d,closeAfterTransition:h=!1,children:p,container:f,component:m,components:g={},componentsProps:v={},disableAutoFocus:y=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:A=!1,disablePortal:x=!1,disableRestoreFocus:w=!1,disableScrollLock:k=!1,hideBackdrop:S=!1,keepMounted:E=!1,onBackdropClick:C,open:_,slotProps:T,slots:D}=l,P=(0,uv.A)(l,Jk),I=(0,cv.A)({},l,{closeAfterTransition:h,disableAutoFocus:y,disableEnforceFocus:b,disableEscapeKeyDown:A,disablePortal:x,disableRestoreFocus:w,disableScrollLock:k,hideBackdrop:S,keepMounted:E}),{getRootProps:F,getBackdropProps:L,getTransitionProps:z,portalRef:O,isTopModal:N,exited:j,hasTransition:R}=Xk((0,cv.A)({},I,{rootRef:t})),M=(0,cv.A)({},I,{exited:j}),B=(e=>{const{open:t,exited:n,classes:r}=e,i={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,hv.A)(i,$k,r)})(M),W={};if(void 0===p.props.tabIndex&&(W.tabIndex="-1"),R){const{onEnter:e,onExited:t}=z();W.onEnter=e,W.onExited=t}const U=null!=(n=null!=(r=null==D?void 0:D.root)?r:g.Root)?n:Qk,H=null!=(i=null!=(o=null==D?void 0:D.backdrop)?o:g.Backdrop)?i:u,V=null!=(a=null==T?void 0:T.root)?a:v.root,G=null!=(s=null==T?void 0:T.backdrop)?s:v.backdrop,K=qw({elementType:U,externalSlotProps:V,externalForwardedProps:P,getSlotProps:F,additionalProps:{ref:t,as:m},ownerState:M,className:(0,dv.A)(d,null==V?void 0:V.className,null==B?void 0:B.root,!M.open&&M.exited&&(null==B?void 0:B.hidden))}),q=qw({elementType:H,externalSlotProps:G,additionalProps:c,getSlotProps:e=>L((0,cv.A)({},e,{onClick:t=>{C&&C(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,dv.A)(null==G?void 0:G.className,null==c?void 0:c.className,null==B?void 0:B.backdrop),ownerState:M});return E||_||R&&!j?(0,El.jsx)(Lk,{ref:O,container:f,disablePortal:x,children:(0,El.jsxs)(U,(0,cv.A)({},K,{children:[!S&&u?(0,El.jsx)(H,(0,cv.A)({},q)):null,(0,El.jsx)(Ik,{disableEnforceFocus:b,disableAutoFocus:y,disableRestoreFocus:w,isEnabled:N,open:_,children:xl.cloneElement(p,W)})]}))}):null}),tS=eS;function nS(e){return(0,Pv.Ay)("MuiPopover",e)}(0,Dv.A)("MuiPopover",["root","paper"]);const rS=["onEntering"],iS=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],oS=["slotProps"];function aS(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function sS(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function lS(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?"".concat(e,"px"):e).join(" ")}function uS(e){return"function"==typeof e?e():e}const cS=(0,fv.Ay)(tS,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),dS=(0,fv.Ay)(zv,{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}),hS=xl.forwardRef(function(e,t){var n,r,i;const o=(0,mv.b)({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:c="anchorEl",children:d,className:h,container:p,elevation:f=8,marginThreshold:m=16,open:g,PaperProps:v={},slots:y,slotProps:b,transformOrigin:A={vertical:"top",horizontal:"left"},TransitionComponent:x=Ck,transitionDuration:w="auto",TransitionProps:{onEntering:k}={},disableScrollLock:S=!1}=o,E=(0,uv.A)(o.TransitionProps,rS),C=(0,uv.A)(o,iS),_=null!=(n=null==b?void 0:b.paper)?n:v,T=xl.useRef(),D=(0,jv.A)(T,_.ref),P=(0,cv.A)({},o,{anchorOrigin:l,anchorReference:c,elevation:f,marginThreshold:m,externalPaperSlotProps:_,transformOrigin:A,TransitionComponent:x,transitionDuration:w,TransitionProps:E}),I=(e=>{const{classes:t}=e;return(0,hv.A)({root:["root"],paper:["paper"]},nS,t)})(P),F=xl.useCallback(()=>{if("anchorPosition"===c)return u;const e=uS(s),t=(e&&1===e.nodeType?e:(0,Gw.A)(T.current).body).getBoundingClientRect();return{top:t.top+aS(t,l.vertical),left:t.left+sS(t,l.horizontal)}},[s,l.horizontal,l.vertical,u,c]),L=xl.useCallback(e=>({vertical:aS(e,A.vertical),horizontal:sS(e,A.horizontal)}),[A.horizontal,A.vertical]),z=xl.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=L(t);if("none"===c)return{top:null,left:null,transformOrigin:lS(n)};const r=F();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,u=(0,uk.A)(uS(s)),d=u.innerHeight-m,h=u.innerWidth-m;if(null!==m&&i<m){const e=i-m;i-=e,n.vertical+=e}else if(null!==m&&a>d){const e=a-d;i-=e,n.vertical+=e}if(null!==m&&o<m){const e=o-m;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:lS(n)}},[s,c,F,L,m]),[O,N]=xl.useState(g),j=xl.useCallback(()=>{const e=T.current;if(!e)return;const t=z(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,N(!0)},[z]);xl.useEffect(()=>(S&&window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)),[s,S,j]);xl.useEffect(()=>{g&&j()}),xl.useImperativeHandle(a,()=>g?{updatePosition:()=>{j()}}:null,[g,j]),xl.useEffect(()=>{if(!g)return;const e=(0,lk.A)(()=>{j()}),t=(0,uk.A)(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[s,g,j]);let R=w;"auto"!==w||x.muiSupportAuto||(R=void 0);const M=p||(s?(0,Gw.A)(uS(s)).body:void 0),B=null!=(r=null==y?void 0:y.root)?r:cS,W=null!=(i=null==y?void 0:y.paper)?i:dS,U=qw({elementType:W,externalSlotProps:(0,cv.A)({},_,{style:O?_.style:(0,cv.A)({},_.style,{opacity:0})}),additionalProps:{elevation:f,ref:D},ownerState:P,className:(0,dv.A)(I.paper,null==_?void 0:_.className)}),H=qw({elementType:B,externalSlotProps:(null==b?void 0:b.root)||{},externalForwardedProps:C,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:M,open:g},ownerState:P,className:(0,dv.A)(I.root,h)}),{slotProps:V}=H,G=(0,uv.A)(H,oS);return(0,El.jsx)(B,(0,cv.A)({},G,!vv(B)&&{slotProps:V,disableScrollLock:S},{children:(0,El.jsx)(x,(0,cv.A)({appear:!0,in:g,onEntering:(e,t)=>{k&&k(e,t),j()},onExited:()=>{N(!1)},timeout:R},E,{children:(0,El.jsx)(W,(0,cv.A)({},U,{children:d}))}))}))});function pS(e){return(0,Pv.Ay)("MuiMenu",e)}(0,Dv.A)("MuiMenu",["root","paper","list"]);const fS=["onEntering"],mS=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],gS={vertical:"top",horizontal:"right"},vS={vertical:"top",horizontal:"left"},yS=(0,fv.Ay)(hS,{shouldForwardProp:e=>(0,Yx.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),bS=(0,fv.Ay)(dS,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),AS=(0,fv.Ay)(sk,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),xS=xl.forwardRef(function(e,t){var n,r;const i=(0,mv.b)({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:s,disableAutoFocusItem:l=!1,MenuListProps:u={},onClose:c,open:d,PaperProps:h={},PopoverClasses:p,transitionDuration:f="auto",TransitionProps:{onEntering:m}={},variant:g="selectedMenu",slots:v={},slotProps:y={}}=i,b=(0,uv.A)(i.TransitionProps,fS),A=(0,uv.A)(i,mS),x=Wb(),w=(0,cv.A)({},i,{autoFocus:o,disableAutoFocusItem:l,MenuListProps:u,onEntering:m,PaperProps:h,transitionDuration:f,TransitionProps:b,variant:g}),k=(e=>{const{classes:t}=e;return(0,hv.A)({root:["root"],paper:["paper"],list:["list"]},pS,t)})(w),S=o&&!l&&d,E=xl.useRef(null);let C=-1;xl.Children.map(a,(e,t)=>{xl.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===C)&&(C=t))});const _=null!=(n=v.paper)?n:bS,T=null!=(r=y.paper)?r:h,D=qw({elementType:v.root,externalSlotProps:y.root,ownerState:w,className:[k.root,s]}),P=qw({elementType:_,externalSlotProps:T,ownerState:w,className:k.paper});return(0,El.jsx)(yS,(0,cv.A)({onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?gS:vS,slots:{paper:_,root:v.root},slotProps:{root:D,paper:P},open:d,ref:t,transitionDuration:f,TransitionProps:(0,cv.A)({onEntering:(e,t)=>{E.current&&E.current.adjustStyleForScrollbar(e,{direction:x?"rtl":"ltr"}),m&&m(e,t)}},b),ownerState:w},A,{classes:p,children:(0,El.jsx)(AS,(0,cv.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),c&&c(e,"tabKeyDown"))},actions:E,autoFocus:o&&(-1===C||l),autoFocusItem:S,variant:g},u,{className:(0,dv.A)(k.list,u.className),children:a}))}))}),wS=xS;function kS(e){return(0,Pv.Ay)("MuiNativeSelect",e)}const SS=(0,Dv.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),ES=["className","disabled","error","IconComponent","inputRef","variant"],CS=e=>{let{ownerState:t,theme:n}=e;return(0,cv.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,cv.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(SS.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}})},_S=(0,fv.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Yx.A,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{["&.".concat(SS.multiple)]:t.multiple}]}})(CS),TS=e=>{let{ownerState:t,theme:n}=e;return(0,cv.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,["&.".concat(SS.disabled)]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},DS=(0,fv.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,_v.A)(n.variant))],n.open&&t.iconOpen]}})(TS),PS=xl.forwardRef(function(e,t){const{className:n,disabled:r,error:i,IconComponent:o,inputRef:a,variant:s="standard"}=e,l=(0,uv.A)(e,ES),u=(0,cv.A)({},e,{disabled:r,variant:s,error:i}),c=(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,_v.A)(n)),o&&"iconOpen",r&&"disabled"]};return(0,hv.A)(s,kS,t)})(u);return(0,El.jsxs)(xl.Fragment,{children:[(0,El.jsx)(_S,(0,cv.A)({ownerState:u,className:(0,dv.A)(c.select,n),disabled:r,ref:a||t},l)),e.multiple?null:(0,El.jsx)(DS,{as:o,ownerState:u,className:c.icon})]})});var IS=i(6228),FS=i(3473);function LS(e){return(0,Pv.Ay)("MuiSelect",e)}const zS=(0,Dv.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var OS;const NS=["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"],jS=(0,fv.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["&.".concat(zS.select)]:t.select},{["&.".concat(zS.select)]:t[n.variant]},{["&.".concat(zS.error)]:t.error},{["&.".concat(zS.multiple)]:t.multiple}]}})(CS,{["&.".concat(zS.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),RS=(0,fv.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,_v.A)(n.variant))],n.open&&t.iconOpen]}})(TS),MS=(0,fv.Ay)("input",{shouldForwardProp:e=>(0,IS.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 BS(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function WS(e){return null==e||"string"==typeof e&&!e.trim()}const US=xl.forwardRef(function(e,t){var n;const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:u,defaultValue:c,disabled:d,displayEmpty:h,error:p=!1,IconComponent:f,inputRef:m,labelId:g,MenuProps:v={},multiple:y,name:b,onBlur:A,onChange:x,onClose:w,onFocus:k,onOpen:S,open:E,readOnly:C,renderValue:_,SelectDisplayProps:T={},tabIndex:D,value:P,variant:I="standard"}=e,F=(0,uv.A)(e,NS),[L,z]=(0,FS.A)({controlled:P,default:c,name:"Select"}),[O,N]=(0,FS.A)({controlled:E,default:u,name:"Select"}),j=xl.useRef(null),R=xl.useRef(null),[M,B]=xl.useState(null),{current:W}=xl.useRef(null!=E),[U,H]=xl.useState(),V=(0,jv.A)(t,m),G=xl.useCallback(e=>{R.current=e,e&&B(e)},[]),K=null==M?void 0:M.parentNode;xl.useImperativeHandle(V,()=>({focus:()=>{R.current.focus()},node:j.current,value:L}),[L]),xl.useEffect(()=>{u&&O&&M&&!W&&(H(a?null:K.clientWidth),R.current.focus())},[M,a]),xl.useEffect(()=>{o&&R.current.focus()},[o]),xl.useEffect(()=>{if(!g)return;const e=(0,Gw.A)(R.current).getElementById(g);if(e){const t=()=>{getSelection().isCollapsed&&R.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[g]);const q=(e,t)=>{e?S&&S(t):w&&w(t),W||(H(a?null:K.clientWidth),N(e))},Y=xl.Children.toArray(s),X=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(L)?L.slice():[];const t=L.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),L!==n&&(z(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||q(!1,t)}},$=null!==M&&O;let J,Q;delete F["aria-invalid"];const Z=[];let ee=!1,te=!1;(jx({value:L})||h)&&(_?J=_(L):ee=!0);const ne=Y.map(e=>{if(!xl.isValidElement(e))return null;let t;if(y){if(!Array.isArray(L))throw new Error((0,AA.A)(2));t=L.some(t=>BS(t,e.props.value)),t&&ee&&Z.push(e.props.children)}else t=BS(L,e.props.value),t&&ee&&(Q=e.props.children);return t&&(te=!0),xl.cloneElement(e,{"aria-selected":t?"true":"false",onClick:X(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&&M&&(ie=K.clientWidth),re=void 0!==D?D:d?null:0;const oe=T.id||(b?"mui-component-select-".concat(b):void 0),ae=(0,cv.A)({},e,{variant:I,value:L,open:$,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,_v.A)(n)),o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,hv.A)(s,LS,t)})(ae),le=(0,cv.A)({},v.PaperProps,null==(n=v.slotProps)?void 0:n.paper),ue=(0,Gb.A)();return(0,El.jsxs)(xl.Fragment,{children:[(0,El.jsx)(jS,(0,cv.A)({ref:G,tabIndex:re,role:"combobox","aria-controls":ue,"aria-disabled":d?"true":void 0,"aria-expanded":$?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[g,oe].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!C){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),q(!0,e))}},onMouseDown:d||C?null:e=>{0===e.button&&(e.preventDefault(),R.current.focus(),q(!0,e))},onBlur:e=>{!$&&A&&(Object.defineProperty(e,"target",{writable:!0,value:{value:L,name:b}}),A(e))},onFocus:k},T,{ownerState:ae,className:(0,dv.A)(T.className,se.select,l),id:oe,children:WS(J)?OS||(OS=(0,El.jsx)("span",{className:"notranslate",children:"​"})):J})),(0,El.jsx)(MS,(0,cv.A)({"aria-invalid":p,value:Array.isArray(L)?L.join(","):L,name:b,ref:j,"aria-hidden":!0,onChange:e=>{const t=Y.find(t=>t.props.value===e.target.value);void 0!==t&&(z(t.props.value),x&&x(e,t))},tabIndex:-1,disabled:d,className:se.nativeInput,autoFocus:o,ownerState:ae},F)),(0,El.jsx)(RS,{as:f,className:se.icon,ownerState:ae}),(0,El.jsx)(wS,(0,cv.A)({id:"menu-".concat(b||""),anchorEl:K,open:$,onClose:e=>{q(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},v,{MenuListProps:(0,cv.A)({"aria-labelledby":g,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:ue},v.MenuListProps),slotProps:(0,cv.A)({},v.slotProps,{paper:(0,cv.A)({},le,{style:(0,cv.A)({minWidth:ie},null!=le?le.style:null)})}),children:ne}))]})}),HS=US,VS=(0,Ey.A)((0,El.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),GS=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],KS=["root"],qS={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,Yx.A)(e)&&"variant"!==e,slot:"Root"},YS=(0,fv.Ay)(tw,qS)(""),XS=(0,fv.Ay)(Aw,qS)(""),$S=(0,fv.Ay)(lw,qS)(""),JS=xl.forwardRef(function(e,t){const n=(0,mv.b)({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:i,classes:o={},className:a,defaultOpen:s=!1,displayEmpty:l=!1,IconComponent:u=VS,id:c,input:d,inputProps:h,label:p,labelId:f,MenuProps:m,multiple:g=!1,native:v=!1,onClose:y,onOpen:b,open:A,renderValue:x,SelectDisplayProps:w,variant:k="outlined"}=n,S=(0,uv.A)(n,GS),E=v?PS:HS,C=Fx({props:n,muiFormControl:zx(),states:["variant","error"]}),_=C.variant||k,T=(0,cv.A)({},n,{variant:_,classes:o}),D=(e=>{const{classes:t}=e;return t})(T),P=(0,uv.A)(D,KS),I=d||{standard:(0,El.jsx)(YS,{ownerState:T}),outlined:(0,El.jsx)(XS,{label:p,ownerState:T}),filled:(0,El.jsx)($S,{ownerState:T})}[_],F=(0,jv.A)(t,Vw(I));return(0,El.jsx)(xl.Fragment,{children:xl.cloneElement(I,(0,cv.A)({inputComponent:E,inputProps:(0,cv.A)({children:i,error:C.error,IconComponent:u,variant:_,type:void 0,multiple:g},v?{id:c}:{autoWidth:r,defaultOpen:s,displayEmpty:l,labelId:f,MenuProps:m,onClose:y,onOpen:b,open:A,renderValue:x,SelectDisplayProps:(0,cv.A)({id:c},w)},h,{classes:h?(0,NA.A)(P,h.classes):P},d?d.props.inputProps:{})},(g&&v||l)&&"outlined"===_?{notched:!0}:{},{ref:F,className:(0,dv.A)(I.props.className,a,D.root)},!d&&{variant:_},S))})});JS.muiName="Select";const QS=JS;function ZS(e){return(0,Pv.Ay)("MuiTextField",e)}(0,Dv.A)("MuiTextField",["root"]);const eE=["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"],tE={standard:tw,filled:lw,outlined:Aw},nE=(0,fv.Ay)(jw,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),rE=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:o,className:a,color:s="primary",defaultValue:l,disabled:u=!1,error:c=!1,FormHelperTextProps:d,fullWidth:h=!1,helperText:p,id:f,InputLabelProps:m,inputProps:g,InputProps:v,inputRef:y,label:b,maxRows:A,minRows:x,multiline:w=!1,name:k,onBlur:S,onChange:E,onFocus:C,placeholder:_,required:T=!1,rows:D,select:P=!1,SelectProps:I,type:F,value:L,variant:z="outlined"}=n,O=(0,uv.A)(n,eE),N=(0,cv.A)({},n,{autoFocus:i,color:s,disabled:u,error:c,fullWidth:h,multiline:w,required:T,select:P,variant:z}),j=(e=>{const{classes:t}=e;return(0,hv.A)({root:["root"]},ZS,t)})(N);const R={};"outlined"===z&&(m&&void 0!==m.shrink&&(R.notched=m.shrink),R.label=b),P&&(I&&I.native||(R.id=void 0),R["aria-describedby"]=void 0);const M=(0,Gb.A)(f),B=p&&M?"".concat(M,"-helper-text"):void 0,W=b&&M?"".concat(M,"-label"):void 0,U=tE[z],H=(0,El.jsx)(U,(0,cv.A)({"aria-describedby":B,autoComplete:r,autoFocus:i,defaultValue:l,fullWidth:h,multiline:w,name:k,rows:D,maxRows:A,minRows:x,type:F,value:L,id:M,inputRef:y,onBlur:S,onChange:E,onFocus:C,placeholder:_,inputProps:g},R,v));return(0,El.jsxs)(nE,(0,cv.A)({className:(0,dv.A)(j.root,a),disabled:u,error:c,fullWidth:h,ref:t,required:T,color:s,variant:z,ownerState:N},O,{children:[null!=b&&""!==b&&(0,El.jsx)(Iw,(0,cv.A)({htmlFor:M,id:W},m,{children:b})),P?(0,El.jsx)(QS,(0,cv.A)({"aria-describedby":B,id:M,labelId:W,value:L,input:H},I,{children:o})):H,p&&(0,El.jsx)(Hw,(0,cv.A)({id:B},d,{children:p}))]}))}),iE=rE;let oE;function aE(){if(oE)return oE;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),oE="reverse",e.scrollLeft>0?oE="default":(e.scrollLeft=1,0===e.scrollLeft&&(oE="negative")),document.body.removeChild(e),oE}function sE(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(aE()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function lE(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const uE=["onChange"],cE={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};const dE=(0,Ey.A)((0,El.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),hE=(0,Ey.A)((0,El.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function pE(e){return(0,Pv.Ay)("MuiTabScrollButton",e)}const fE=(0,Dv.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),mE=["className","slots","slotProps","direction","orientation","disabled"],gE=(0,fv.Ay)(yy,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(e=>{let{ownerState:t}=e;return(0,cv.A)({width:40,flexShrink:0,opacity:.8,["&.".concat(fE.disabled)]:{opacity:0}},"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:"rotate(".concat(t.isRtl?-90:90,"deg)")}})}),vE=xl.forwardRef(function(e,t){var n,r;const i=(0,mv.b)({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:s={},direction:l}=i,u=(0,uv.A)(i,mE),c=Wb(),d=(0,cv.A)({isRtl:c},i),h=(e=>{const{classes:t,orientation:n,disabled:r}=e,i={root:["root",n,r&&"disabled"]};return(0,hv.A)(i,pE,t)})(d),p=null!=(n=a.StartScrollButtonIcon)?n:dE,f=null!=(r=a.EndScrollButtonIcon)?r:hE,m=qw({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),g=qw({elementType:f,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return(0,El.jsx)(gE,(0,cv.A)({component:"div",className:(0,dv.A)(h.root,o),ref:t,role:null,ownerState:d,tabIndex:null},u,{children:"left"===l?(0,El.jsx)(p,(0,cv.A)({},m)):(0,El.jsx)(f,(0,cv.A)({},g))}))});function yE(e){return(0,Pv.Ay)("MuiTabs",e)}const bE=(0,Dv.A)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),AE=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],xE=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,wE=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,kE=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},SE=(0,fv.Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(bE.scrollButtons)]:t.scrollButtons},{["& .".concat(bE.scrollButtons)]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(e=>{let{ownerState:t,theme:n}=e;return(0,cv.A)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{["& .".concat(bE.scrollButtons)]:{[n.breakpoints.down("sm")]:{display:"none"}}})}),EE=(0,fv.Ay)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(e=>{let{ownerState:t}=e;return(0,cv.A)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})}),CE=(0,fv.Ay)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(e=>{let{ownerState:t}=e;return(0,cv.A)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})}),_E=(0,fv.Ay)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(e=>{let{ownerState:t,theme:n}=e;return(0,cv.A)({position:"absolute",height:2,bottom:0,width:"100%",transition:n.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})}),TE=(0,fv.Ay)(function(e){const{onChange:t}=e,n=(0,uv.A)(e,uE),r=xl.useRef(),i=xl.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return(0,Ox.A)(()=>{const e=(0,lk.A)(()=>{const e=r.current;o(),e!==r.current&&t(r.current)}),n=(0,uk.A)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),xl.useEffect(()=>{o(),t(r.current)},[t]),(0,El.jsx)("div",(0,cv.A)({style:cE},n,{ref:i}))})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),DE={};const PE=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiTabs"}),r=bA(),i=Wb(),{"aria-label":o,"aria-labelledby":a,action:s,centered:l=!1,children:u,className:c,component:d="div",allowScrollButtonsMobile:h=!1,indicatorColor:p="primary",onChange:f,orientation:m="horizontal",ScrollButtonComponent:g=vE,scrollButtons:v="auto",selectionFollowsFocus:y,slots:b={},slotProps:A={},TabIndicatorProps:x={},TabScrollButtonProps:w={},textColor:k="primary",value:S,variant:E="standard",visibleScrollbar:C=!1}=n,_=(0,uv.A)(n,AE),T="scrollable"===E,D="vertical"===m,P=D?"scrollTop":"scrollLeft",I=D?"top":"left",F=D?"bottom":"right",L=D?"clientHeight":"clientWidth",z=D?"height":"width",O=(0,cv.A)({},n,{component:d,allowScrollButtonsMobile:h,indicatorColor:p,orientation:m,vertical:D,scrollButtons:v,textColor:k,variant:E,visibleScrollbar:C,fixed:!T,hideScrollbar:T&&!C,scrollableX:T&&!D,scrollableY:T&&D,centered:l&&!T,scrollButtonsHideMobile:!h}),N=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:l}=e,u={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,hv.A)(u,yE,l)})(O),j=qw({elementType:b.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:O}),R=qw({elementType:b.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:O});const[M,B]=xl.useState(!1),[W,U]=xl.useState(DE),[H,V]=xl.useState(!1),[G,K]=xl.useState(!1),[q,Y]=xl.useState(!1),[X,$]=xl.useState({overflow:"hidden",scrollbarWidth:0}),J=new Map,Q=xl.useRef(null),Z=xl.useRef(null),ee=()=>{const e=Q.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:sE(e,i?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==S){const e=Z.current.children;if(e.length>0){const t=e[J.get(S)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},te=(0,Rv.A)(()=>{const{tabsMeta:e,tabMeta:t}=ee();let n,r=0;if(D)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=i?"right":"left",t&&e){const o=i?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(i?-1:1)*(t[n]-e[n]+o)}const o={[n]:r,[z]:t?t[z]:0};if(isNaN(W[n])||isNaN(W[z]))U(o);else{const e=Math.abs(W[n]-o[n]),t=Math.abs(W[z]-o[z]);(e>=1||t>=1)&&U(o)}}),ne=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?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{ease:o=lE,duration:a=300}=r;let s=null;const l=t[e];let u=!1;const c=()=>{u=!0},d=r=>{if(u)return void i(new Error("Animation cancelled"));null===s&&(s=r);const c=Math.min(1,(r-s)/a);t[e]=o(c)*(n-l)+l,c>=1?requestAnimationFrame(()=>{i(null)}):requestAnimationFrame(d)};l===n?i(new Error("Element already at target position")):requestAnimationFrame(d)}(P,Q.current,e,{duration:r.transitions.duration.standard}):Q.current[P]=e},re=e=>{let t=Q.current[P];D?t+=e:(t+=e*(i?-1:1),t*=i&&"reverse"===aE()?-1:1),ne(t)},ie=()=>{const e=Q.current[L];let t=0;const n=Array.from(Z.current.children);for(let r=0;r<n.length;r+=1){const i=n[r];if(t+i[L]>e){0===r&&(t=e);break}t+=i[L]}return t},oe=()=>{re(-1*ie())},ae=()=>{re(ie())},se=xl.useCallback(e=>{$({overflow:null,scrollbarWidth:e})},[]),le=(0,Rv.A)(e=>{const{tabsMeta:t,tabMeta:n}=ee();if(n&&t)if(n[I]<t[I]){const r=t[P]+(n[I]-t[I]);ne(r,{animation:e})}else if(n[F]>t[F]){const r=t[P]+(n[F]-t[F]);ne(r,{animation:e})}}),ue=(0,Rv.A)(()=>{T&&!1!==v&&Y(!q)});xl.useEffect(()=>{const e=(0,lk.A)(()=>{Q.current&&te()});let t;const n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{var n;null==(n=t)||n.unobserve(e)}),e.addedNodes.forEach(e=>{var n;null==(n=t)||n.observe(e)})}),e(),ue()},r=(0,uk.A)(Q.current);let i;return r.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(Z.current.children).forEach(e=>{t.observe(e)})),"undefined"!=typeof MutationObserver&&(i=new MutationObserver(n),i.observe(Z.current,{childList:!0})),()=>{var n,o;e.clear(),r.removeEventListener("resize",e),null==(n=i)||n.disconnect(),null==(o=t)||o.disconnect()}},[te,ue]),xl.useEffect(()=>{const e=Array.from(Z.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&T&&!1!==v){const n=e[0],r=e[t-1],i={root:Q.current,threshold:.99},o=e=>{V(!e[0].isIntersecting)},a=new IntersectionObserver(o,i);a.observe(n);const s=e=>{K(!e[0].isIntersecting)},l=new IntersectionObserver(s,i);return l.observe(r),()=>{a.disconnect(),l.disconnect()}}},[T,v,q,null==u?void 0:u.length]),xl.useEffect(()=>{B(!0)},[]),xl.useEffect(()=>{te()}),xl.useEffect(()=>{le(DE!==W)},[le,W]),xl.useImperativeHandle(s,()=>({updateIndicator:te,updateScrollButtons:ue}),[te,ue]);const ce=(0,El.jsx)(_E,(0,cv.A)({},x,{className:(0,dv.A)(N.indicator,x.className),ownerState:O,style:(0,cv.A)({},W,x.style)}));let de=0;const he=xl.Children.map(u,e=>{if(!xl.isValidElement(e))return null;const t=void 0===e.props.value?de:e.props.value;J.set(t,de);const n=t===S;return de+=1,xl.cloneElement(e,(0,cv.A)({fullWidth:"fullWidth"===E,indicator:n&&!M&&ce,selected:n,selectionFollowsFocus:y,onChange:f,textColor:k,value:t},1!==de||!1!==S||e.props.tabIndex?{}:{tabIndex:0}))}),pe=(()=>{const e={};e.scrollbarSizeListener=T?(0,El.jsx)(TE,{onChange:se,className:(0,dv.A)(N.scrollableX,N.hideScrollbar)}):null;const t=T&&("auto"===v&&(H||G)||!0===v);return e.scrollButtonStart=t?(0,El.jsx)(g,(0,cv.A)({slots:{StartScrollButtonIcon:b.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:j},orientation:m,direction:i?"right":"left",onClick:oe,disabled:!H},w,{className:(0,dv.A)(N.scrollButtons,w.className)})):null,e.scrollButtonEnd=t?(0,El.jsx)(g,(0,cv.A)({slots:{EndScrollButtonIcon:b.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:R},orientation:m,direction:i?"left":"right",onClick:ae,disabled:!G},w,{className:(0,dv.A)(N.scrollButtons,w.className)})):null,e})();return(0,El.jsxs)(SE,(0,cv.A)({className:(0,dv.A)(N.root,c),ownerState:O,ref:t,as:d},_,{children:[pe.scrollButtonStart,pe.scrollbarSizeListener,(0,El.jsxs)(EE,{className:N.scroller,ownerState:O,style:{overflow:X.overflow,[D?"margin".concat(i?"Left":"Right"):"marginBottom"]:C?void 0:-X.scrollbarWidth},ref:Q,children:[(0,El.jsx)(CE,{"aria-label":o,"aria-labelledby":a,"aria-orientation":"vertical"===m?"vertical":null,className:N.flexContainer,ownerState:O,onKeyDown:e=>{const t=Z.current,n=(0,Gw.A)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",o="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&i&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),kE(t,n,wE);break;case o:e.preventDefault(),kE(t,n,xE);break;case"Home":e.preventDefault(),kE(t,null,xE);break;case"End":e.preventDefault(),kE(t,null,wE)}},ref:Z,role:"tablist",children:he}),M&&ce]}),pe.scrollButtonEnd]}))}),IE=PE;function FE(e){return(0,Pv.Ay)("MuiTab",e)}const LE=(0,Dv.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),zE=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],OE=(0,fv.Ay)(yy,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor".concat((0,_v.A)(n.textColor))],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{["& .".concat(LE.iconWrapper)]:t.iconWrapper}]}})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.A)({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},n.label&&{flexDirection:"top"===n.iconPosition||"bottom"===n.iconPosition?"column":"row"},{lineHeight:1.25},n.icon&&n.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > .".concat(LE.iconWrapper)]:(0,cv.A)({},"top"===n.iconPosition&&{marginBottom:6},"bottom"===n.iconPosition&&{marginTop:6},"start"===n.iconPosition&&{marginRight:t.spacing(1)},"end"===n.iconPosition&&{marginLeft:t.spacing(1)})},"inherit"===n.textColor&&{color:"inherit",opacity:.6,["&.".concat(LE.selected)]:{opacity:1},["&.".concat(LE.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"primary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(LE.selected)]:{color:(t.vars||t).palette.primary.main},["&.".concat(LE.disabled)]:{color:(t.vars||t).palette.text.disabled}},"secondary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(LE.selected)]:{color:(t.vars||t).palette.secondary.main},["&.".concat(LE.disabled)]:{color:(t.vars||t).palette.text.disabled}},n.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},n.wrapped&&{fontSize:t.typography.pxToRem(12)})}),NE=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiTab"}),{className:r,disabled:i=!1,disableFocusRipple:o=!1,fullWidth:a,icon:s,iconPosition:l="top",indicator:u,label:c,onChange:d,onClick:h,onFocus:p,selected:f,selectionFollowsFocus:m,textColor:g="inherit",value:v,wrapped:y=!1}=n,b=(0,uv.A)(n,zE),A=(0,cv.A)({},n,{disabled:i,disableFocusRipple:o,selected:f,icon:!!s,iconPosition:l,label:!!c,fullWidth:a,textColor:g,wrapped:y}),x=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:a,selected:s,disabled:l}=e,u={root:["root",o&&a&&"labelIcon","textColor".concat((0,_v.A)(n)),r&&"fullWidth",i&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return(0,hv.A)(u,FE,t)})(A),w=s&&c&&xl.isValidElement(s)?xl.cloneElement(s,{className:(0,dv.A)(x.iconWrapper,s.props.className)}):s;return(0,El.jsxs)(OE,(0,cv.A)({focusRipple:!o,className:(0,dv.A)(x.root,r),ref:t,role:"tab","aria-selected":f,disabled:i,onClick:e=>{!f&&d&&d(e,v),h&&h(e)},onFocus:e=>{m&&!f&&d&&d(e,v),p&&p(e)},ownerState:A,tabIndex:f?0:-1},b,{children:["top"===l||"start"===l?(0,El.jsxs)(xl.Fragment,{children:[w,c]}):(0,El.jsxs)(xl.Fragment,{children:[c,w]}),u]}))});const jE=(0,Dv.A)("MuiListItemIcon",["root","alignItemsFlexStart"]);const RE=(0,Dv.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function ME(e){return(0,Pv.Ay)("MuiMenuItem",e)}const BE=(0,Dv.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),WE=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],UE=(0,fv.Ay)(yy,{shouldForwardProp:e=>(0,Yx.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,cv.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(BE.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,pv.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(BE.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,pv.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(BE.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,pv.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,pv.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(BE.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(BE.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(kb.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(kb.inset)]:{marginLeft:52},["& .".concat(RE.root)]:{marginTop:0,marginBottom:0},["& .".concat(RE.inset)]:{paddingLeft:36},["& .".concat(jE.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,cv.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(jE.root," svg")]:{fontSize:"1.25rem"}}))}),HE=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:o=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:u="menuitem",tabIndex:c,className:d}=n,h=(0,uv.A)(n,WE),p=xl.useContext(Yw),f=xl.useMemo(()=>({dense:o||p.dense||!1,disableGutters:s}),[p.dense,o,s]),m=xl.useRef(null);(0,Ox.A)(()=>{r&&m.current&&m.current.focus()},[r]);const g=(0,cv.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,hv.A)(s,ME,a);return(0,cv.A)({},a,l)})(n),y=(0,jv.A)(m,t);let b;return n.disabled||(b=void 0!==c?c:-1),(0,El.jsx)(Yw.Provider,{value:f,children:(0,El.jsx)(UE,(0,cv.A)({ref:y,role:u,tabIndex:b,component:i,focusVisibleClassName:(0,dv.A)(v.focusVisible,l),className:(0,dv.A)(v.root,d)},h,{ownerState:g,classes:v}))})});const VE=xl.createContext();function GE(e){return(0,Pv.Ay)("MuiGrid",e)}const KE=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],qE=(0,Dv.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)),...KE.map(e=>"grid-xs-".concat(e)),...KE.map(e=>"grid-sm-".concat(e)),...KE.map(e=>"grid-md-".concat(e)),...KE.map(e=>"grid-lg-".concat(e)),...KE.map(e=>"grid-xl-".concat(e))]),YE=qE,XE=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function $E(e){const t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function JE(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 QE=(0,fv.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:u}=n;let c=[];r&&(c=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,u,t));const d=[];return u.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,...c,"row"!==i&&t["direction-xs-".concat(String(i))],"wrap"!==s&&t["wrap-xs-".concat(String(s))],...d]}})(e=>{let{ownerState:t}=e;return(0,cv.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,JA.kW)({values:n.direction,breakpoints:t.breakpoints.values});return(0,JA.NI)({theme:t},r,e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(YE.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,JA.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"==typeof e&&(n=JE({breakpoints:t.breakpoints.values,values:e})),o=(0,JA.NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{marginTop:"-".concat($E(o)),["& > .".concat(YE.item)]:{paddingTop:$E(o)}}:null!=(i=n)&&i.includes(r)?{}:{marginTop:0,["& > .".concat(YE.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,JA.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"==typeof e&&(n=JE({breakpoints:t.breakpoints.values,values:e})),o=(0,JA.NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{width:"calc(100% + ".concat($E(o),")"),marginLeft:"-".concat($E(o)),["& > .".concat(YE.item)]:{paddingLeft:$E(o)}}:null!=(i=n)&&i.includes(r)?{}:{width:"100%",marginLeft:0,["& > .".concat(YE.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,JA.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 u={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t="calc(".concat(l," + ").concat($E(e),")");u={flexBasis:t,maxWidth:t}}}o=(0,cv.A)({flexBasis:l,flexGrow:0,maxWidth:l},u)}return 0===n.breakpoints.values[i]?Object.assign(e,o):e[n.breakpoints.up(i)]=o,e},{})});const ZE=e=>{const{classes:t,container:n,direction:r,item:i,spacing:o,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let u=[];n&&(u=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 c=[];l.forEach(t=>{const n=e[t];n&&c.push("grid-".concat(t,"-").concat(String(n)))});const d={root:["root",n&&"container",i&&"item",s&&"zeroMinWidth",...u,"row"!==r&&"direction-xs-".concat(String(r)),"wrap"!==a&&"wrap-xs-".concat(String(a)),...c]};return(0,hv.A)(d,GE,t)},eC=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiGrid"}),{breakpoints:r}=bA(),i=(0,ob.A)(n),{className:o,columns:a,columnSpacing:s,component:l="div",container:u=!1,direction:c="row",item:d=!1,rowSpacing:h,spacing:p=0,wrap:f="wrap",zeroMinWidth:m=!1}=i,g=(0,uv.A)(i,XE),v=h||p,y=s||p,b=xl.useContext(VE),A=u?a||12:b,x={},w=(0,cv.A)({},g);r.keys.forEach(e=>{null!=g[e]&&(x[e]=g[e],delete w[e])});const k=(0,cv.A)({},i,{columns:A,container:u,direction:c,item:d,rowSpacing:v,columnSpacing:y,wrap:f,zeroMinWidth:m,spacing:p},x,{breakpoints:r.keys}),S=ZE(k);return(0,El.jsx)(VE.Provider,{value:A,children:(0,El.jsx)(QE,(0,cv.A)({ownerState:k,className:(0,dv.A)(S.root,o),as:l,ref:t},w))})});const tC=eC;var nC=i(9311),rC=i(4743),iC=i(1099),oC=i(1985);function aC(e){let{text:t,title:n="copy"}=e;const[r,i]=(0,xl.useState)(!1);return(0,El.jsx)(Sy,{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,El.jsx)(oC.A,{fontSize:"inherit"}):(0,El.jsx)(iC.A,{fontSize:"inherit"})})}const sC=(e,t,n)=>{const r=(e=>Array.isArray(e)?e[0]||"":e||"")(e);return t===o.bCM?r.replace(/[\t ]*(\r\n|\r|\n)[\t ]*/g,"\n"):o.sNP.ai.has(t)&&/\r\n|\r|\n/.test(n)?r.replace(/\\r\\n|\\n|\\r/g,"\n"):r};function lC(e){let{text:t,fromLang:n,toLang:r,apiSlug:i,transApis:a,translateVariants:s=!0,simpleStyle:l=!1}=e;const u=wx(),[c,d]=(0,xl.useState)(""),[h,p]=(0,xl.useState)(!1),[f,m]=(0,xl.useState)(""),g=(0,xl.useMemo)(()=>a.find(e=>e.apiSlug===i),[a,i]);return(0,xl.useEffect)(()=>{if(null==t||!t.trim()||!g)return d(""),p(!1),void m("");let e=!0;const i=new AbortController,a=(e=>Boolean((null==e?void 0:e.useStream)&&o.sNP.stream.has(e.apiType)&&"disabled"!==(e.streamRenderMode||"disabled")))(g),l=a?({text:n})=>{if(!e||i.signal.aborted)return;const r=sC(n,g.apiType,t);r&&d(r)}:void 0;return(async()=>{try{p(!0),d(""),m("");const a=e=>Tn({text:e,fromLang:n,toLang:r,apiSetting:g,textFormat:"text",translateVariants:s,onStreamChunk:l,signal:i.signal}),{trText:u,isSame:c}=g.apiType===o.h8v?await(async(e,t)=>{const n=e.split(/(\r\n|\r|\n)/),r=[],i=await Promise.all(n.map(async(e,n)=>{if(n%2==1||!e.trim())return e;const i=await t(e);return r.push(i),i.trText}));return{trText:i.join(""),isSame:r.length>0&&r.every(e=>e.isSame)}})(t,a):await a(t);e&&d(c?"":sC(u,g.apiType,t))}catch(t){if("AbortError"===(null==t?void 0:t.name))return;e&&m(t.message)}finally{e&&p(!1)}})(),()=>{e=!1,i.abort()}},[t,n,r,g,s]),g?l?(0,El.jsx)(yA,{children:f?(0,El.jsx)(Ry,{severity:"error",children:f}):c?(0,El.jsxs)(ax,{direction:"row",spacing:1,alignItems:"flex-start",children:[h&&(0,El.jsx)(ib,{size:12,sx:{flex:"0 0 auto",mt:"0.35em"}}),(0,El.jsx)(hb,{style:{whiteSpace:"pre-line"},children:c})]}):h?(0,El.jsx)(ib,{size:16}):null}):(0,El.jsx)(yA,{children:(0,El.jsx)(iE,{size:"small",label:"".concat(u("translated_text")," - ").concat(g.apiName),fullWidth:!0,multiline:!0,maxRows:10,sx:{"& textarea":{resize:"vertical"}},value:c,helperText:f,InputProps:{startAdornment:h?(0,El.jsx)(ib,{size:16}):null,endAdornment:(0,El.jsx)(ax,{direction:"row",sx:{position:"absolute",right:0,top:0},children:(0,El.jsx)(aC,{text:c,title:u("copy")})})}})}):null}var uC=i(43),cC=i(1957);const dC={};function hC(e){var t;let{word:n,title:i}=e;const{favWords:s,toggleFav:l}=function(){const{data:e,save:t}=By(o.CWU,dC,o.sgk),n=(0,xl.useCallback)(e=>{t(e),(0,a.GY)(o.sgk)},[t]),i=(0,xl.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];n(n=>{if(!n[e]){const s={createdAt:Date.now(),timestamp:t,phonetic:i,definition:o,examples:a};return Object.keys(s).forEach(e=>{(null===s[e]||void 0===s[e]||Array.isArray(s[e])&&0===s[e].length||"string"==typeof s[e]&&0===s[e].length)&&delete s[e]}),(0,r.A)((0,r.A)({},n),{},{[e]:s})}const s=(0,r.A)({},n);return delete s[e],s})},[n]),s=(0,xl.useCallback)(e=>{n(t=>(0,r.A)((0,r.A)({},e.reduce((e,t)=>(e[t]={createdAt:Date.now()},e),{})),t))},[n]),l=(0,xl.useCallback)(()=>{n({})},[n]),u=(0,xl.useMemo)(()=>Object.entries(e||{}).sort((e,t)=>e[0].localeCompare(t[0])),[e]),c=(0,xl.useMemo)(()=>u.map(e=>{let[t]=e;return t}),[u]);return{favWords:e,favList:u,wordList:c,toggleFav:i,mergeWords:s,clearWords:l}}(),{context:u,setting:c}=Fb(),[d,h]=(0,xl.useState)(!1),p="tranbox"===u&&(null==c||null===(t=c.tranboxSetting)||void 0===t?void 0:t.autoFavWord),f=(0,xl.useCallback)(()=>{try{h(!0);const e=!s[n];l(n),document.dispatchEvent(new CustomEvent(o.KDu,{detail:{word:n,isFavorite:e}}))}catch(e){(0,ht.h9)("set fav",e)}finally{h(!1)}},[s,l,n]);return(0,xl.useEffect)(()=>{p&&n&&!s[n]&&f()},[p,s,f,n]),(0,El.jsx)(Sy,{disabled:d,size:"small",onClick:f,title:i,children:s[n]?(0,El.jsx)(uC.A,{fontSize:"inherit"}):(0,El.jsx)(cC.A,{fontSize:"inherit"})})}var pC=i(2964);function fC(){var e,t;return"function"==typeof(null===(e=globalThis.chrome)||void 0===e||null===(t=e.tts)||void 0===t?void 0:t.speak)}function mC(){var e;return"function"==typeof(null===(e=globalThis.speechSynthesis)||void 0===e?void 0:e.speak)&&"function"==typeof globalThis.SpeechSynthesisUtterance}const gC=new Set(["end","interrupted","cancelled","error"]);function vC(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!mC())return!1;try{const r=new globalThis.SpeechSynthesisUtterance(e);return r.lang=t,r.onend=n.onEnd,r.onerror=n.onEnd,globalThis.speechSynthesis.speak(r),!0}catch(e){return!1}}function yC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=null==e?void 0:e.trim();if(!r)return!1;const i=function(e){const t=String(e||"").trim().replace(/_/g,"-"),n=t.toLowerCase();return t&&"en"!==n&&"auto"!==n&&"detect"!==n&&"und"!==n&&"unknown"!==n&&/^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i.test(t)?t:"en-US"}(t);let o=!1;const a=()=>{var e;o||(o=!0,null===(e=n.onEnd)||void 0===e||e.call(n))};if(fC())try{return globalThis.chrome.tts.speak(r,{lang:i,onEvent:e=>{gC.has(null==e?void 0:e.type)&&a()}},()=>{var e,t;null!==(e=globalThis.chrome)&&void 0!==e&&null!==(t=e.runtime)&&void 0!==t&&t.lastError&&(vC(r,i,{onEnd:a})||a())}),!0}catch(e){return vC(r,i,{onEnd:a})}return vC(r,i,{onEnd:a})}function bC(e){let{src:t}=e;const{error:n,ready:r,playing:i,onPlay:o}=function(e){const t=(0,xl.useRef)(null),[n,r]=(0,xl.useState)(null),[i,o]=(0,xl.useState)(!1),[a,s]=(0,xl.useState)(!1),[l,u]=(0,xl.useState)(!1),c=(0,xl.useCallback)(async()=>{if(t.current)try{await t.current.play()}catch(e){ht.vF.info("Playback failed:",e),s(!1)}},[]),d=(0,xl.useCallback)(()=>{var e;null===(e=t.current)||void 0===e||e.pause()},[]);return(0,xl.useEffect)(()=>{if(!e)return;let n=!1;o(!1),r(null),s(!1),u(!0);const i=new Audio;t.current=i;const a=()=>o(!0),l=()=>s(!0),c=()=>s(!1),d=()=>s(!1),h=e=>{n||(r(i.error||e),o(!1),u(!1))};return i.addEventListener("canplaythrough",a),i.addEventListener("play",l),i.addEventListener("pause",c),i.addEventListener("ended",d),i.addEventListener("error",h),(async()=>{try{const t=await(0,N.Fd)(e,{},{expect:"audio"});if(n)return;i.src=t,u(!1)}catch(e){n||(ht.vF.info("Audio fetch failed:",e),r(e),u(!1))}})(),()=>{n=!0,i.pause(),i.removeAttribute("src"),i.removeEventListener("canplaythrough",a),i.removeEventListener("play",l),i.removeEventListener("pause",c),i.removeEventListener("ended",d),i.removeEventListener("error",h)}},[e]),{loading:l,error:n,ready:i,playing:a,onPlay:c,onPause:d}}(t);return n||!r?(0,El.jsx)(Sy,{disabled:!0,size:"small",children:(0,El.jsx)(pC.A,{fontSize:"inherit"})}):i?(0,El.jsx)(Sy,{color:"primary",size:"small",children:(0,El.jsx)(pC.A,{fontSize:"inherit"})}):(0,El.jsx)(Sy,{onClick:o,size:"small",children:(0,El.jsx)(pC.A,{fontSize:"inherit"})})}function AC(e){let{text:t,lan:n="uk",spd:r=3}=e;if(!t)return null;const i="https://fanyi.baidu.com/gettts?".concat(O.stringify({lan:n,text:t,spd:r}));return(0,El.jsx)(bC,{src:i})}function xC(e){let{text:t,lang:n="en-US"}=e;const[r,i]=(0,xl.useState)(!1);if(null==t||!t.trim()||!fC()&&!mC())return null;return(0,El.jsx)(Sy,{color:r?"primary":"default",onClick:r?void 0:()=>{if(r)return;i(!0);yC(t,n,{onEnd:()=>i(!1)})||i(!1)},size:"small",sx:{ml:.5,verticalAlign:"middle"},children:(0,El.jsx)(pC.A,{fontSize:"inherit"})})}const wC={[o.GDU]:{apiFn:Sn,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,El.jsx)(hb,{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,El.jsxs)(hb,{component:"div",style:{display:"inline-block",paddingRight:"1em"},children:[(0,El.jsx)(hb,{component:"span",children:"".concat(t," [").concat(r||"","]")}),(0,El.jsx)(bC,{src:n})]},t)})})},uiTrans:e=>{var t,n,r,i;return(0,El.jsxs)(hb,{component:"div",children:[(0,El.jsx)(hb,{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,El.jsxs)(hb,{component:"li",children:[n&&"[".concat(n,"] "),r]},t)})}),(null==e||null===(n=e.presents)||void 0===n?void 0:n.length)>0&&(0,El.jsx)(hb,{component:"div",style:{marginTop:"10px"},children:e.presents.join(", ")}),(null==e||null===(r=e.ecs)||void 0===r?void 0:r.length)>0&&(0,El.jsxs)(hb,{component:"div",style:{marginTop:"10px"},children:[(0,El.jsx)(hb,{component:"div",style:{fontWeight:"bold",marginBottom:"5px"},children:"英汉双解"}),e.ecs.map(e=>{let{pos:t,lis:n}=e;return(0,El.jsxs)(hb,{component:"div",children:[(0,El.jsx)(hb,{component:"div",children:t}),(0,El.jsx)(hb,{component:"ul",children:n.map((e,t)=>(0,El.jsx)(hb,{component:"li",children:e},t))})]},t)})]}),(null==e||null===(i=e.sentences)||void 0===i?void 0:i.length)>0&&(0,El.jsxs)(hb,{component:"div",style:{marginTop:"10px"},children:[(0,El.jsx)(hb,{component:"div",style:{fontWeight:"bold",marginBottom:"5px"},children:"例句"}),e.sentences.slice(0,2).map((t,n)=>{var r,i;return(0,El.jsxs)(hb,{component:"div",style:{marginBottom:"5px"},children:[(0,El.jsx)(hb,{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,El.jsxs)("span",{children:[n>0&&(0,El.jsx)("span",{style:{fontWeight:"bold",color:"#1e88e5"},children:e.word}),t]},n))}),(0,El.jsx)(hb,{component:"div",style:{opacity:"0.6",fontStyle:"italic"},children:t.chs})]},n)})]})]})}},[o.dyy]:{apiFn:_n,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,u,c,d,h;return(0,El.jsxs)(hb,{component:"div",children:[(0,El.jsxs)(hb,{component:"div",style:{display:"inline-block",paddingRight:"1em"},children:[(0,El.jsx)(hb,{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,El.jsx)(AC,{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,El.jsxs)(hb,{component:"div",style:{display:"inline-block",paddingRight:"1em"},children:[(0,El.jsx)(hb,{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===(u=e.ec)||void 0===u||null===(c=u.word)||void 0===c?void 0:c.usphone,"]"):"")}),(0,El.jsx)(AC,{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,El.jsxs)(hb,{component:"div",children:[(0,El.jsx)(hb,{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,El.jsxs)(hb,{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,El.jsxs)(hb,{component:"div",style:{marginTop:"10px"},children:[(0,El.jsx)(hb,{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,El.jsxs)(hb,{component:"div",style:{marginBottom:"5px"},children:[(0,El.jsx)(hb,{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,El.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,El.jsx)("span",{style:{fontWeight:"bold",color:"#1e88e5"},children:e.ec.word["return-phrase"]}),t]},n)})}),(0,El.jsx)(hb,{component:"div",style:{opacity:"0.6",fontStyle:"italic"},children:t["sentence-translation"]})]},n)})]})]})}}};function kC(e){let{text:t,setCopyText:n,setRealWord:r,dict:i}=e;const{loading:o,error:a,data:s}=Ax(i.apiFn,t);(0,xl.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,xl.useMemo)(()=>i.uiAudio(s),[s,i]),u=(0,xl.useMemo)(()=>i.uiTrans(s),[s,i]);return o?(0,El.jsx)(ib,{size:16}):a?(0,El.jsx)(Ry,{severity:"error",children:a}):s?(0,El.jsxs)(hb,{component:"div",children:[l,u]}):(0,El.jsx)(hb,{children:"Not found!"})}function SC(e){let{text:t,enDict:n}=e;const r=wx(),[i,o]=(0,xl.useState)(t),[a,s]=(0,xl.useState)(t),l=wC[n];return(0,El.jsxs)(ax,{spacing:1,children:[t&&(0,El.jsxs)(ax,{direction:"row",justifyContent:"space-between",children:[(0,El.jsx)(hb,{variant:"subtitle1",style:{fontWeight:"bold"},children:a}),(0,El.jsxs)(ax,{direction:"row",justifyContent:"space-between",children:[(0,El.jsx)(aC,{text:i,title:r("copy")}),(0,El.jsx)(hC,{word:a,title:r("collect")})]})]}),(0,El.jsx)(Tb,{}),l&&(0,El.jsx)(kC,{text:t,setCopyText:o,setRealWord:s,dict:l})]})}var EC=i(4837);function CC(e){return e&&"object"==typeof e?"position"in e||"type"in e?TC(e.position):"start"in e||"end"in e?TC(e):"line"in e||"column"in e?_C(e):"":""}function _C(e){return DC(e&&e.line)+":"+DC(e&&e.column)}function TC(e){return _C(e&&e.start)+"-"+_C(e&&e.end)}function DC(e){return e&&"number"==typeof e?e:1}class PC extends Error{constructor(e,t,n){const r=[null,null];let i={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n){const e=n.indexOf(":");-1===e?r[1]=n:(r[0]=n.slice(0,e),r[1]=n.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(i=t.position):"start"in t||"end"in t?i=t:("line"in t||"column"in t)&&(i.start=t)),this.name=CC(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=i.start.line,this.column=i.start.column,this.position=i,this.source=r[0],this.ruleId=r[1],this.file,this.actual,this.expected,this.url,this.note}}PC.prototype.file="",PC.prototype.name="",PC.prototype.reason="",PC.prototype.message="",PC.prototype.stack="",PC.prototype.fatal=null,PC.prototype.column=null,PC.prototype.line=null,PC.prototype.source=null,PC.prototype.ruleId=null,PC.prototype.position=null;const IC={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');FC(e);let n,r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1),s>-1&&(e.charCodeAt(o)===t.charCodeAt(s--)?s<0&&(i=o):(s=-1,i=a));r===i?i=a:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(FC(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},extname:function(e){FC(e);let t,n=e.length,r=-1,i=0,o=-1,a=0;for(;n--;){const s=e.charCodeAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==a&&(a=1):o>-1&&(a=-1);else if(t){i=n+1;break}}if(o<0||r<0||0===a||1===a&&o===r-1&&o===i+1)return"";return e.slice(o,r)},join:function(){let e,t=-1;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(;++t<r.length;)FC(r[t]),r[t]&&(e=void 0===e?r[t]:e+"/"+r[t]);return void 0===e?".":function(e){FC(e);const t=47===e.charCodeAt(0);let n=function(e,t){let n,r,i="",o=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",o=0):(i=i.slice(0,r),o=i.length-1-i.lastIndexOf("/")),a=l,s=0;continue}}else if(i.length>0){i="",o=0,a=l,s=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(a+1,l):i=e.slice(a+1,l),o=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/");return t?"/"+n:n}(e)},sep:"/"};function FC(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const LC={cwd:function(){return"/"}};function zC(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function OC(e){if("string"==typeof e)e=new URL(e);else if(!zC(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.charCodeAt(n)&&50===t.charCodeAt(n+1)){const e=t.charCodeAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const NC=["history","path","basename","stem","extname","dirname"];class jC{constructor(e){let t;t=e?"string"==typeof e||function(e){return EC(e)}(e)?{value:e}:zC(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=LC.cwd(),this.value,this.stored,this.result,this.map;let n,r=-1;for(;++r<NC.length;){const e=NC[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)NC.includes(n)||(this[n]=t[n])}get path(){return this.history[this.history.length-1]}set path(e){zC(e)&&(e=OC(e)),MC(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?IC.dirname(this.path):void 0}set dirname(e){BC(this.basename,"dirname"),this.path=IC.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?IC.basename(this.path):void 0}set basename(e){MC(e,"basename"),RC(e,"basename"),this.path=IC.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?IC.extname(this.path):void 0}set extname(e){if(RC(e,"extname"),BC(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=IC.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?IC.basename(this.path,this.extname):void 0}set stem(e){MC(e,"stem"),RC(e,"stem"),this.path=IC.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,n){const r=new PC(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=null,r}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}}function RC(e,t){if(e&&e.includes(IC.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+IC.sep+"`")}function MC(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function BC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function WC(e){if(e)throw e}var UC=i(3439);function HC(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 VC(){const e=[],t={run:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=-1;const o=n.pop();if("function"!=typeof o)throw new TypeError("Expected function as last argument, not "+o);!function t(r){const a=e[++i];let s=-1;if(r)o(r);else{for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];for(;++s<n.length;)null!==u[s]&&void 0!==u[s]||(u[s]=n[s]);n=u,a?function(e,t){let n;return r;function r(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];const s=e.length>r.length;let l;s&&r.push(i);try{l=e.apply(this,r)}catch(e){if(s&&n)throw e;return i(e)}s||(l&&l.then&&"function"==typeof l.then?l.then(o,i):l instanceof Error?i(l):o(l))}function i(e){if(!n){n=!0;for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];t(e,...i)}}function o(e){i(null,e)}}(a,t)(...u):o(null,...u)}}(null,...n)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const GC=function e(){const t=VC(),n=[];let r,i={},o=-1;return a.data=function(e,t){if("string"==typeof e)return 2===arguments.length?($C("data",r),i[e]=t,a):KC.call(i,e)&&i[e]||null;if(e)return $C("data",r),i=e,a;return i},a.Parser=void 0,a.Compiler=void 0,a.freeze=function(){if(r)return a;for(;++o<n.length;){const[e,...r]=n[o];if(!1===r[0])continue;!0===r[0]&&(r[0]=void 0);const i=e.call(a,...r);"function"==typeof i&&t.use(i)}return r=!0,o=Number.POSITIVE_INFINITY,a},a.attachers=n,a.use=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];let l;if($C("use",r),null==e);else if("function"==typeof e)h(e,...o);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?d(e):c(e)}l&&(i.settings=Object.assign(i.settings||{},l));return a;function u(e){if("function"==typeof e)h(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;h(t,...n)}else c(e)}}function c(e){d(e.plugins),e.settings&&(l=Object.assign(l||{},e.settings))}function d(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){u(e[t])}}}function h(e,t){let r,i=-1;for(;++i<n.length;)if(n[i][0]===e){r=n[i];break}r?(HC(r[1])&&HC(t)&&(t=UC(!0,r[1],t)),r[1]=t):n.push([...arguments])}},a.parse=function(e){a.freeze();const t=ZC(e),n=a.Parser;if(YC("parse",n),qC(n,"parse"))return new n(String(t),t).parse();return n(String(t),t)},a.stringify=function(e,t){a.freeze();const n=ZC(t),r=a.Compiler;if(XC("stringify",r),JC(e),qC(r,"compile"))return new r(e,n).compile();return r(e,n)},a.run=function(e,n,r){JC(e),a.freeze(),r||"function"!=typeof n||(r=n,n=void 0);if(!r)return new Promise(i);function i(i,o){function a(t,n,a){n=n||e,t?o(t):i?i(n):r(null,n,a)}t.run(e,ZC(n),a)}i(null,r)},a.runSync=function(e,t){let n,r;return a.run(e,t,i),QC("runSync","run",r),n;function i(e,t){WC(e),n=t,r=!0}},a.process=function(e,t){if(a.freeze(),YC("process",a.Parser),XC("process",a.Compiler),!t)return new Promise(n);function n(n,r){const i=ZC(e);function o(e,i){e||!i?r(e):n?n(i):t(null,i)}a.run(a.parse(i),i,(e,t,n)=>{if(!e&&t&&n){const i=a.stringify(t,n);null==i||("string"==typeof(r=i)||EC(r)?n.value=i:n.result=i),o(e,n)}else o(e);var r})}n(null,t)},a.processSync=function(e){let t;a.freeze(),YC("processSync",a.Parser),XC("processSync",a.Compiler);const n=ZC(e);return a.process(n,r),QC("processSync","process",t),n;function r(e){t=!0,WC(e)}},a;function a(){const t=e();let r=-1;for(;++r<n.length;)t.use(...n[r]);return t.data(UC(!0,{},i)),t}}().freeze(),KC={}.hasOwnProperty;function qC(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(KC.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function YC(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function XC(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function $C(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function JC(e){if(!HC(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function QC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ZC(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new jC(e)}const e_={};function t_(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return n_(e.children,t,n)}return Array.isArray(e)?n_(e,t,n):""}function n_(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=t_(e[i],t,n);return r.join("")}function r_(e,t,n,r){const i=e.length;let o,a=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function i_(e,t){return e.length>0?(r_(e,e.length,0,t),e):t}const o_={}.hasOwnProperty;function a_(e,t){let n;for(n in t){const r=(o_.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){o_.call(r,o)||(r[o]=[]);const e=i[o];s_(r[o],Array.isArray(e)?e:e?[e]:[])}}}function s_(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);r_(e,0,0,r)}const l_=A_(/[A-Za-z]/),u_=A_(/[\dA-Za-z]/),c_=A_(/[#-'*+\--9=?A-Z^-~]/);function d_(e){return null!==e&&(e<32||127===e)}const h_=A_(/\d/),p_=A_(/[\dA-Fa-f]/),f_=A_(/[!-/:-@[-`{-~]/);function m_(e){return null!==e&&e<-2}function g_(e){return null!==e&&(e<0||32===e)}function v_(e){return-2===e||-1===e||32===e}const y_=A_(/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/),b_=A_(/\s/);function A_(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}function x_(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(v_(r))return e.enter(n),a(r);return t(r)};function a(r){return v_(r)&&o++<i?(e.consume(r),a):(e.exit(n),t(r))}}const w_={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),x_(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):m_(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}};const k_={tokenize:function(e){const t=this,n=[];let r,i,o,a=0;return s;function s(r){if(a<n.length){const i=n[a];return t.containerState=i[1],e.attempt(i[0].continuation,l,u)(r)}return u(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let i,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}v(a);let s=n;for(;s<t.events.length;)t.events[s][1].end=Object.assign({},i),s++;return r_(t.events,o+1,0,t.events.slice(n)),t.events.length=s,u(e)}return s(e)}function u(i){if(a===n.length){if(!r)return h(i);if(r.currentConstruct&&r.currentConstruct.concrete)return f(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(S_,c,d)(i)}function c(e){return r&&y(),v(a),h(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,o=t.now().offset,f(e)}function h(n){return t.containerState={},e.attempt(S_,p,f)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),h(e)}function f(n){return null===n?(r&&y(),v(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:r}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(n)):m_(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let i,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){s=t.events[l][1].end;break}i=!0}for(v(a),e=n;e<t.events.length;)t.events[e][1].end=Object.assign({},s),e++;r_(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function v(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},S_={tokenize:function(e,t,n){return x_(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const E_={tokenize:function(e,t,n){return function(t){return v_(t)?x_(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||m_(e)?t(e):n(e)}},partial:!0};function C_(e){const t={};let n,r,i,o,a,s,l,u=-1;for(;++u<e.length;){for(;u in t;)u=t[u];if(n=e[u],u&&"chunkFlow"===n[1].type&&"listItemPrefix"===e[u-1][1].type&&(s=n[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,__(e,u)),u=t[u],l=!0);else if(n[1]._container){for(i=u,r=void 0;i--&&(o=e[i],"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type);)"enter"===o[0]&&(r&&(e[r][1].type="lineEndingBlank"),o[1].type="lineEnding",r=i);r&&(n[1].end=Object.assign({},e[r][1].start),a=e.slice(r,u),a.unshift(n),r_(e,r,u-r+1,a))}}return!l}function __(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],u={};let c,d,h=-1,p=n,f=0,m=0;const g=[m];for(;p;){for(;e[++i][1]!==p;);o.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<s.length;)"exit"===s[h][0]&&"enter"===s[h-1][0]&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=s.slice(g[h],g[h+1]),n=o.pop();l.unshift([n,n+t.length-1]),r_(e,n,2,t)}for(h=-1;++h<l.length;)u[f+l[h][0]]=f+l[h][1],f+=l[h][1]-l[h][0]-1;return u}const T_={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):m_(t)?e.check(D_,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return C_(e),e}},D_={tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),x_(e,i,"linePrefix")};function i(i){if(null===i||m_(i))return n(i);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}},partial:!0};const P_={tokenize:function(e){const t=this,n=e.attempt(E_,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,x_(e,e.attempt(this.parser.constructs.flow,r,e.attempt(T_,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const I_={resolveAll:O_()},F_=z_("string"),L_=z_("text");function z_(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,o,a);return o;function o(e){return l(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:O_("text"===e?N_:void 0)}}function O_(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function N_(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],i=t.sliceStream(r);let o,a=i.length,s=-1,l=0;for(;a--;){const e=i[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){a++;break}}if(l){const i={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+a,_bufferIndex:a?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},i.start),r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}function j_(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}function R_(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[],l=!0;const u={consume:function(e){m_(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,A()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e,l=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=f(),c.events.push(["exit",t,c]),t},attempt:y(function(e,t){b(e,t.from)}),check:y(v),interrupt:y(v,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(o)}i=-2===o,r.push(a)}return r.join("")}(p(e),t)},now:f,defineSkip:function(e){i[e.line]=e.column,A()},write:function(e){if(a=i_(a,e),m(),null!==a[a.length-1])return[];return b(t,0),c.events=j_(o,c.events,c),c.events}};let d,h=t.tokenize.call(c,u);return t.resolveAll&&o.push(t),c;function p(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}(a,e)}function f(){const{line:e,column:t,offset:n,_index:i,_bufferIndex:o}=r;return{line:e,column:t,offset:n,_index:i,_bufferIndex:o}}function m(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)g(t.charCodeAt(r._bufferIndex));else g(t)}}function g(e){l=void 0,d=e,h=h(e)}function v(e,t){t.restore()}function y(e,t){return function(n,i,o){let a,d,h,p;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return m([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function m(e){return a=e,d=0,0===e.length?o:g(e[d])}function g(e){return function(n){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,i=c.events.length,o=Array.from(s);return{restore:a,from:i};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,s=o,A()}}(),h=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y(n);return e.tokenize.call(t?Object.assign(Object.create(c),t):c,u,v,y)(n)}}function v(t){return l=!0,e(h,p),i}function y(e){return l=!0,p.restore(),++d<a.length?g(a[d]):o}}}function b(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&r_(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function A(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}const M_={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),a(o)):i>=3&&(null===o||m_(o))?(e.exit("thematicBreak"),t(o)):n(o)}function a(t){return t===r?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),v_(t)?x_(e,o,"whitespace")(t):o(t))}}};const B_={name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:h_(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(M_,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return h_(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(E_,r.interrupt?n:u,e.attempt(W_,d,c))}function u(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function c(t){return v_(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(E_,i,o);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,x_(e,t,"listItemIndent",r.containerState.size+1)(n)}function o(n){return r.containerState.furtherBlankLines||!v_(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(U_,t,a)(n))}function a(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,x_(e,e.attempt(B_,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},W_={tokenize:function(e,t,n){const r=this;return x_(e,function(e){const i=r.events[r.events.length-1];return!v_(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},U_={tokenize:function(e,t,n){const r=this;return x_(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)},partial:!0};const H_={name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return v_(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(v_(t))return x_(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(r){return e.attempt(H_,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function V_(e,t,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||d_(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),f(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(n))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||m_(t)?n(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function f(i){return c||null!==i&&41!==i&&!g_(i)?c<u&&40===i?(e.consume(i),c++,f):41===i?(e.consume(i),c--,f):null===i||32===i||40===i||d_(i)?n(i):(e.consume(i),92===i?m:f):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function G_(e,t,n,r,i,o){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):m_(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(t){return null===t||91===t||93===t||m_(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s||(s=!v_(t)),92===t?d:c)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}}function K_(e,t,n,r,i,o){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===a?(e.exit(o),s(a)):null===t?n(t):m_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),x_(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===a||null===t||m_(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?c:u)}function c(t){return t===a||92===t?(e.consume(t),u):u(t)}}function q_(e,t){let n;return function r(i){if(m_(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(v_(i))return x_(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}}function Y_(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const X_={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return G_.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=Y_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return g_(t)?q_(e,s)(t):s(t)}function s(t){return V_(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt($_,u,u)(t)}function u(t){return v_(t)?x_(e,c,"whitespace")(t):c(t)}function c(o){return null===o||m_(o)?(e.exit("definition"),r.parser.defined.push(i),t(o)):n(o)}}},$_={tokenize:function(e,t,n){return function(t){return g_(t)?q_(e,r)(t):n(t)};function r(t){return K_(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return v_(t)?x_(e,o,"whitespace")(t):o(t)}function o(e){return null===e||m_(e)?t(e):n(e)}},partial:!0};const J_={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),x_(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):m_(t)?e.attempt(Q_,o,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||m_(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},Q_={tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):m_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):x_(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):m_(e)?i(e):n(e)}},partial:!0};const Z_={name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||g_(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||m_(n)?(e.exit("atxHeading"),t(n)):v_(n)?x_(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||g_(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}},resolve:function(e,t){let n,r,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},r_(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e}};const eT={name:"setextUnderline",tokenize:function(e,t,n){const r=this;let i;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),v_(t)?x_(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||m_(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const a={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=a;return e.push(["exit",a,t]),e}};const tT=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],nT=["pre","script","style","textarea"],rT={name:"htmlFlow",tokenize:function(e,t,n){const r=this;let i,o,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u}(t)};function u(s){return 33===s?(e.consume(s),c):47===s?(e.consume(s),o=!0,p):63===s?(e.consume(s),i=3,r.interrupt?t:z):l_(s)?(e.consume(s),a=String.fromCharCode(s),f):n(s)}function c(o){return 45===o?(e.consume(o),i=2,d):91===o?(e.consume(o),i=5,s=0,h):l_(o)?(e.consume(o),i=4,r.interrupt?t:z):n(o)}function d(i){return 45===i?(e.consume(i),r.interrupt?t:z):n(i)}function h(i){const o="CDATA[";return i===o.charCodeAt(s++)?(e.consume(i),6===s?r.interrupt?t:C:h):n(i)}function p(t){return l_(t)?(e.consume(t),a=String.fromCharCode(t),f):n(t)}function f(s){if(null===s||47===s||62===s||g_(s)){const l=47===s,u=a.toLowerCase();return l||o||!nT.includes(u)?tT.includes(a.toLowerCase())?(i=6,l?(e.consume(s),m):r.interrupt?t(s):C(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):v(s)):(i=1,r.interrupt?t(s):C(s))}return 45===s||u_(s)?(e.consume(s),a+=String.fromCharCode(s),f):n(s)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:C):n(i)}function g(t){return v_(t)?(e.consume(t),g):S(t)}function v(t){return 47===t?(e.consume(t),S):58===t||95===t||l_(t)?(e.consume(t),y):v_(t)?(e.consume(t),v):S(t)}function y(t){return 45===t||46===t||58===t||95===t||u_(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),A):v_(t)?(e.consume(t),b):v(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):v_(t)?(e.consume(t),A):w(t)}function x(t){return t===l?(e.consume(t),l=null,k):null===t||m_(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||g_(t)?b(t):(e.consume(t),w)}function k(e){return 47===e||62===e||v_(e)?v(e):n(e)}function S(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||m_(t)?C(t):v_(t)?(e.consume(t),E):n(t)}function C(t){return 45===t&&2===i?(e.consume(t),P):60===t&&1===i?(e.consume(t),I):62===t&&4===i?(e.consume(t),O):63===t&&3===i?(e.consume(t),z):93===t&&5===i?(e.consume(t),L):!m_(t)||6!==i&&7!==i?null===t||m_(t)?(e.exit("htmlFlowData"),_(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(iT,N,_)(t))}function _(t){return e.check(oT,T,N)(t)}function T(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),D}function D(t){return null===t||m_(t)?_(t):(e.enter("htmlFlowData"),C(t))}function P(t){return 45===t?(e.consume(t),z):C(t)}function I(t){return 47===t?(e.consume(t),a="",F):C(t)}function F(t){if(62===t){const n=a.toLowerCase();return nT.includes(n)?(e.consume(t),O):C(t)}return l_(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),F):C(t)}function L(t){return 93===t?(e.consume(t),z):C(t)}function z(t){return 62===t?(e.consume(t),O):45===t&&2===i?(e.consume(t),z):C(t)}function O(t){return null===t||m_(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),O)}function N(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},iT={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(E_,t,n)}},partial:!0},oT={tokenize:function(e,t,n){const r=this;return function(t){if(m_(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};const aT={tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},sT={name:"codeFenced",tokenize:function(e,t,n){const r=this,i={tokenize:function(e,t,n){let i=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),v_(t)?x_(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):u(t)}function u(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(i++,e.consume(t),c):i>=s?(e.exit("codeFencedFenceSequence"),v_(t)?x_(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||m_(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0};let o,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),v_(t)?x_(e,u,"whitespace")(t):u(t))}function u(n){return null===n||m_(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(aT,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||m_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(t)):v_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x_(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),c)}function d(t){return null===t||m_(t)?u(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||m_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(t)):96===t&&t===o?n(t):(e.consume(t),h)}function p(t){return e.attempt(i,y,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&v_(t)?x_(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||m_(t)?e.check(aT,p,y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||m_(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(n){return e.exit("codeFenced"),t(n)}},concrete:!0};const lT=document.createElement("i");function uT(e){const t="&"+e+";";lT.innerHTML=t;const n=lT.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}const cT={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,o=u_,u(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=p_,u):(e.enter("characterReferenceValue"),i=7,o=h_,u(t))}function u(s){if(59===s&&a){const i=e.exit("characterReferenceValue");return o!==u_||uT(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&a++<i?(e.consume(s),u):n(s)}}};const dT={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return f_(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const hT={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),x_(e,t,"linePrefix")}}};const pT={name:"labelEnd",tokenize:function(e,t,n){const r=this;let i,o,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){i=r.events[a][1];break}return function(t){if(!i)return n(t);if(i._inactive)return c(t);return o=r.parser.defined.includes(Y_(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(fT,u,o?u:c)(t):91===t?e.attempt(mT,u,o?l:c)(t):o?u(t):c(t)}function l(t){return e.attempt(gT,u,c)(t)}function u(e){return t(e)}function c(e){return i._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,i,o,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(i=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[i][1].end)},c={type:"labelText",start:Object.assign({},e[r+s+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",l,t],["enter",u,t]],o=i_(o,e.slice(r+1,r+s+3)),o=i_(o,[["enter",c,t]]),o=i_(o,j_(t.parser.constructs.insideSpan.null,e.slice(r+s+4,i-3),t)),o=i_(o,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),o=i_(o,e.slice(i+1)),o=i_(o,[["exit",l,t]]),r_(e,r,e.length,o),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){const n=e[t][1];"labelImage"!==n.type&&"labelLink"!==n.type&&"labelEnd"!==n.type||(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++)}return e}},fT={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return g_(t)?q_(e,i)(t):i(t)}function i(t){return 41===t?u(t):V_(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return g_(t)?q_(e,s)(t):u(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?K_(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function l(t){return g_(t)?q_(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},mT={tokenize:function(e,t,n){const r=this;return function(t){return G_.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(Y_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},gT={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const vT={name:"labelStartImage",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:pT.resolveAll};function yT(e){return null===e||g_(e)||b_(e)?1:y_(e)?2:void 0}const bT={name:"attention",tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=yT(r);let o;return function(t){return o=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===o)return e.consume(s),a;const l=e.exit("attentionSequence"),u=yT(s),c=!u||2===u&&i||n.includes(s),d=!i||2===i&&u||n.includes(r);return l._open=Boolean(42===o?c:c&&(i||!d)),l._close=Boolean(42===o?d:d&&(u||!c)),t(s)}},resolveAll:function(e,t){let n,r,i,o,a,s,l,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const d=Object.assign({},e[n][1].end),h=Object.assign({},e[c][1].start);AT(d,-s),AT(h,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[c][1].start),end:h},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[c][1].start)},r={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[n][1].end=Object.assign({},o.start),e[c][1].start=Object.assign({},a.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=i_(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=i_(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),l=i_(l,j_(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),l=i_(l,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,l=i_(l,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,r_(e,n-1,c-n+3,l),c=n+l.length-u-2;break}c=-1;for(;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e}};function AT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const xT={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return l_(t)?(e.consume(t),o):l(t)}function o(e){return 43===e||45===e||46===e||u_(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||u_(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||d_(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),u):c_(t)?(e.consume(t),l):n(t)}function u(e){return u_(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,u):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||u_(t))&&r++<63){const n=45===t?d:c;return e.consume(t),n}return n(t)}}};const wT={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,o,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),A):63===t?(e.consume(t),y):l_(t)?(e.consume(t),k):n(t)}function l(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),o=0,p):l_(t)?(e.consume(t),v):n(t)}function u(t){return 45===t?(e.consume(t),h):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),d):m_(t)?(a=c,F(t)):(e.consume(t),c)}function d(t){return 45===t?(e.consume(t),h):c(t)}function h(e){return 62===e?I(e):45===e?d(e):c(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),m):m_(t)?(a=f,F(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?I(t):93===t?(e.consume(t),g):f(t)}function v(t){return null===t||62===t?I(t):m_(t)?(a=v,F(t)):(e.consume(t),v)}function y(t){return null===t?n(t):63===t?(e.consume(t),b):m_(t)?(a=y,F(t)):(e.consume(t),y)}function b(e){return 62===e?I(e):y(e)}function A(t){return l_(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||u_(t)?(e.consume(t),x):w(t)}function w(t){return m_(t)?(a=w,F(t)):v_(t)?(e.consume(t),w):I(t)}function k(t){return 45===t||u_(t)?(e.consume(t),k):47===t||62===t||g_(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),I):58===t||95===t||l_(t)?(e.consume(t),E):m_(t)?(a=S,F(t)):v_(t)?(e.consume(t),S):I(t)}function E(t){return 45===t||46===t||58===t||95===t||u_(t)?(e.consume(t),E):C(t)}function C(t){return 61===t?(e.consume(t),_):m_(t)?(a=C,F(t)):v_(t)?(e.consume(t),C):S(t)}function _(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,T):m_(t)?(a=_,F(t)):v_(t)?(e.consume(t),_):(e.consume(t),D)}function T(t){return t===i?(e.consume(t),i=void 0,P):null===t?n(t):m_(t)?(a=T,F(t)):(e.consume(t),T)}function D(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||g_(t)?S(t):(e.consume(t),D)}function P(e){return 47===e||62===e||g_(e)?S(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function F(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return v_(t)?x_(e,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):z(t)}function z(t){return e.enter("htmlTextData"),a(t)}}};const kT={name:"labelStartLink",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:pT.resolveAll};const ST={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return m_(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const ET={name:"codeText",tokenize:function(e,t,n){let r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,u(t)):m_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||m_(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function u(n){return 96===n?(e.consume(n),r++,u):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}t=i-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};const CT={42:B_,43:B_,45:B_,48:B_,49:B_,50:B_,51:B_,52:B_,53:B_,54:B_,55:B_,56:B_,57:B_,62:H_},_T={91:X_},TT={[-2]:J_,[-1]:J_,32:J_},DT={35:Z_,42:M_,45:[eT,M_],60:rT,61:eT,95:M_,96:sT,126:sT},PT={38:cT,92:dT},IT={[-5]:hT,[-4]:hT,[-3]:hT,33:vT,38:cT,42:bT,60:[xT,wT],91:kT,92:[ST,dT],93:pT,95:bT,96:ET},FT={null:[bT,I_]},LT={null:[42,95]},zT={null:[]};function OT(e){const n=function(e){const t={};let n=-1;for(;++n<e.length;)a_(t,e[n]);return t}([t,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(w_),document:i(k_),flow:i(P_),string:i(F_),text:i(L_)};return r;function i(e){return function(t){return R_(r,e,t)}}}const NT=/[\0\t\n\r]/g;function jT(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCharCode(n)}const RT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function MT(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return jT(n.slice(t?2:1),t?16:10)}return uT(n)||e}const BT={}.hasOwnProperty,WT=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ne),autolinkProtocol:_,autolinkEmail:_,atxHeading:s(Q),blockQuote:s(q),characterEscape:_,characterReference:_,codeFenced:s(Y),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(Y,l),codeText:s(X,l),codeTextData:_,data:_,codeFlowValue:_,definition:s($),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(J),hardBreakEscape:s(Z),hardBreakTrailing:s(Z),htmlFlow:s(ee,l),htmlFlowData:_,htmlText:s(ee,l),htmlTextData:_,image:s(te),label:l,link:s(ne),listItem:s(ie),listItemValue:f,listOrdered:s(re,p),listUnordered:s(re),paragraph:s(oe),reference:W,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(Q),strong:s(ae),thematicBreak:s(le)},exit:{atxHeading:c(),atxHeadingSequence:k,autolink:c(),autolinkEmail:K,autolinkProtocol:G,blockQuote:c(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:V,codeFenced:c(y),codeFencedFence:v,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:T,codeIndented:c(b),codeText:c(L),codeTextData:T,data:T,definition:c(),definitionDestinationString:w,definitionLabelString:A,definitionTitleString:x,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(I),htmlFlowData:T,htmlText:c(F),htmlTextData:T,image:c(O),label:j,labelText:N,lineEnding:D,link:c(z),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:U,resourceDestinationString:R,resourceTitleString:M,resource:B,setextHeading:c(C),setextHeadingLineSequence:E,setextHeadingText:S,strong:c(),thematicBreak:c()}};HT(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let n={type:"root",children:[]};const r={stack:[n],tokenStack:[],config:t,enter:u,exit:d,buffer:l,resume:h,setData:o,getData:a},s=[];let c=-1;for(;++c<e.length;)if("listOrdered"===e[c][1].type||"listUnordered"===e[c][1].type)if("enter"===e[c][0])s.push(c);else{c=i(e,s.pop(),c)}for(c=-1;++c<e.length;){const n=t[e[c][0]];BT.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},r),e[c][1])}if(r.tokenStack.length>0){const e=r.tokenStack[r.tokenStack.length-1];(e[1]||GT).call(r,void 0,e[0])}for(n.position={start:UT(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:UT(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)n=t.transforms[c](n)||n;return n}function i(e,t,n){let r,i,o,a,s=t-1,l=-1,u=!1;for(;++s<=n;){const t=e[s];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?l++:l--,a=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!r||a||l||o||(o=s),a=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(a=void 0),!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(i=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",r,t[2]]),s++,n++}"listItemPrefix"===t[1].type&&(r={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0},e.splice(s,0,["enter",r,t[2]]),s++,n++,o=void 0,a=!0)}}return e[t][1]._spread=u,n}function o(e,t){n[e]=t}function a(e){return n[e]}function s(e,t){return n;function n(n){u.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(e,t,n){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:UT(t.start)},e}function c(e){return t;function t(t){e&&e.call(this,t),d.call(this,t)}}function d(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+CC({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||GT).call(this,e,r[0])}return n.position.end=UT(e.end),n}function h(){return function(e,t){const n=t||e_;return t_(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}(this.stack.pop())}function p(){o("expectingFirstListItemValue",!0)}function f(e){if(a("expectingFirstListItemValue")){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),o("expectingFirstListItemValue")}}function m(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function g(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function v(){a("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function A(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Y_(this.sliceSerialize(e)).toLowerCase()}function x(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function k(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function S(){o("setextHeadingSlurpLineEnding",!0)}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function C(){o("setextHeadingSlurpLineEnding")}function _(e){const t=this.stack[this.stack.length-1];let n=t.children[t.children.length-1];n&&"text"===n.type||(n=se(),n.position={start:UT(e.start)},t.children.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=UT(e.end)}function D(e){const n=this.stack[this.stack.length-1];if(a("atHardBreak")){return n.children[n.children.length-1].position.end=UT(e.end),void o("atHardBreak")}!a("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(n.type)&&(_.call(this,e),T.call(this,e))}function P(){o("atHardBreak",!0)}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function F(){const e=this.resume();this.stack[this.stack.length-1].value=e}function L(){const e=this.resume();this.stack[this.stack.length-1].value=e}function z(){const e=this.stack[this.stack.length-1];if(a("inReference")){const t=a("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;o("referenceType")}function O(){const e=this.stack[this.stack.length-1];if(a("inReference")){const t=a("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;o("referenceType")}function N(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(RT,MT)}(t),n.identifier=Y_(t).toLowerCase()}function j(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(o("inReference",!0),"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function R(){const e=this.resume();this.stack[this.stack.length-1].url=e}function M(){const e=this.resume();this.stack[this.stack.length-1].title=e}function B(){o("inReference")}function W(){o("referenceType","collapsed")}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Y_(this.sliceSerialize(e)).toLowerCase(),o("referenceType","full")}function H(e){o("characterReferenceType",e.type)}function V(e){const t=this.sliceSerialize(e),n=a("characterReferenceType");let r;if(n)r=jT(t,"characterReferenceMarkerNumeric"===n?10:16),o("characterReferenceType");else{r=uT(t)}const i=this.stack.pop();i.value+=r,i.position.end=UT(e.end)}function G(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function K(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function Y(){return{type:"code",lang:null,meta:null,value:""}}function X(){return{type:"inlineCode",value:""}}function $(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function Q(){return{type:"heading",depth:void 0,children:[]}}function Z(){return{type:"break"}}function ee(){return{type:"html",value:""}}function te(){return{type:"image",title:null,url:"",alt:null}}function ne(){return{type:"link",title:null,url:"",children:[]}}function re(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ie(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function se(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!C_(e););return e}(OT(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,o,a){const s=[];let l,u,c,d,h;for(i=n+i.toString(o),c=0,n="",r&&(65279===i.charCodeAt(0)&&c++,r=void 0);c<i.length;){if(NT.lastIndex=c,l=NT.exec(i),d=l&&void 0!==l.index?l.index:i.length,h=i.charCodeAt(d),!l){n=i.slice(c);break}if(10===h&&c===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),c<d&&(s.push(i.slice(c,d)),t+=d-c),h){case 0:s.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),s.push(-2);t++<u;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}c=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))};function UT(e){return{line:e.line,column:e.column,offset:e.offset}}function HT(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?HT(e,r):VT(e,r)}}function VT(e,t){let n;for(n in t)if(BT.call(t,n))if("canContainEols"===n){const r=t[n];r&&e[n].push(...r)}else if("transforms"===n){const r=t[n];r&&e[n].push(...r)}else if("enter"===n||"exit"===n){const r=t[n];r&&Object.assign(e[n],r)}}function GT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+CC({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+CC({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+CC({start:t.start,end:t.end})+") is still open")}function KT(e){Object.assign(this,{Parser:t=>{const n=this.data("settings");return WT(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function qT(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(37===o&&u_(e.charCodeAt(n+1))&&u_(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}const YT=function(e){if(null==e)return $T;if("string"==typeof e)return function(e){return XT(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=YT(e[n]);return XT(r);function r(){let e=-1;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(;++e<t.length;)if(t[e].call(this,...r))return!0;return!1}}(e):function(e){return XT(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return XT(e);throw new Error("Expected function, string, or object as test")};function XT(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...r)))}}function $T(){return!0}const JT=!0,QT=!1,ZT=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const i=YT(t),o=r?-1:1;!function e(a,s,l){const u=a&&"object"==typeof a?a:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return c;function c(){let u,c,d,h=[];if((!t||i(a,s,l[l.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[JT,e];return[e]}(n(a,l)),h[0]===QT))return h;if(a.children&&"skip"!==h[0])for(c=(r?a.children.length:-1)+o,d=l.concat(a);c>-1&&c<a.children.length;){if(u=e(a.children[c],c,d)(),u[0]===QT)return u;c="number"==typeof u[1]?u[1]:c+o}return h}}(e,void 0,[])()};const eD=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),ZT(e,t,function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)},r)},tD=rD("start"),nD=rD("end");function rD(e){return function(t){const n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}const iD={}.hasOwnProperty;function oD(e){return String(e||"").toUpperCase()}function aD(e,t){const n=String(t.identifier).toUpperCase(),r=qT(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;-1===i?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const a=e.footnoteCounts[n],s={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,s);const l={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,l),e.applyData(t,l)}function sD(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function lD(e){const t=e.spread;return null==t?e.children.length>1:t}function uD(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(cD(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(cD(t.slice(i),i>0,!1)),o.join("")}function cD(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const dD={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:aD,footnote:function(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},aD(e,{type:"footnoteReference",identifier:i,position:t.position})},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null},imageReference:function(e,t){const n=e.definition(t.identifier);if(!n)return sD(e,t);const r={src:qT(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:qT(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=e.definition(t.identifier);if(!n)return sD(e,t);const r={href:qT(n.url||"")};null!==n.title&&void 0!==n.title&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:qT(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=lD(n[r])}return t}(n):lD(t),o={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=tD(t.children[1]),a=nD(t.children[t.children.length-1]);o.line&&a.line&&(r.position={start:o,end:a}),i.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=o?o[s]:void 0;a&&(r.align=a);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(t,u)),l.push(u)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){const n={type:"text",value:uD(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:hD,yaml:hD,definition:hD,footnoteDefinition:hD};function hD(){return null}const pD={}.hasOwnProperty;function fD(e,t){const n=t||{},i=n.allowDangerousHtml||!1,o={};return s.dangerous=i,s.clobberPrefix=void 0===n.clobberPrefix||null===n.clobberPrefix?"user-content-":n.clobberPrefix,s.footnoteLabel=n.footnoteLabel||"Footnotes",s.footnoteLabelTagName=n.footnoteLabelTagName||"h2",s.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},s.footnoteBackLabel=n.footnoteBackLabel||"Back to content",s.unknownHandler=n.unknownHandler,s.passThrough=n.passThrough,s.handlers=(0,r.A)((0,r.A)({},dD),n.handlers),s.definition=function(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return eD(e,"definition",e=>{const n=oD(e.identifier);n&&!iD.call(t,n)&&(t[n]=e)}),function(e){const n=oD(e);return n&&iD.call(t,n)?t[n]:null}}(e),s.footnoteById=o,s.footnoteOrder=[],s.footnoteCounts={},s.patch=mD,s.applyData=gD,s.one=function(e,t){return vD(s,e,t)},s.all=function(e){return yD(s,e)},s.wrap=bD,s.augment=a,eD(e,"footnoteDefinition",e=>{const t=String(e.identifier).toUpperCase();pD.call(o,t)||(o[t]=e)}),s;function a(e,t){if(e&&"data"in e&&e.data){const n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties=(0,r.A)((0,r.A)({},t.properties),n.hProperties)),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){const n="type"in e?e:{position:e};(function(e){return!(e&&e.position&&e.position.start&&e.position.start.line&&e.position.start.column&&e.position.end&&e.position.end.line&&e.position.end.column)})(n)||(t.position={start:tD(n),end:nD(n)})}return t}function s(e,t,n,r){return Array.isArray(n)&&(r=n,n={}),a(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}}function mD(e,t){e.position&&(t.position=function(e){return{start:tD(e),end:nD(e)}}(e))}function gD(e,t){let n=t;if(e&&e.data){const t=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:[]}),"element"===n.type&&o&&(n.properties=(0,r.A)((0,r.A)({},n.properties),o)),"children"in n&&n.children&&null!=i&&(n.children=i)}return n}function vD(e,t,n){const i=t&&t.type;if(!i)throw new Error("Expected node, got `"+t+"`");return pD.call(e.handlers,i)?e.handlers[i](e,t,n):e.passThrough&&e.passThrough.includes(i)?"children"in t?(0,r.A)((0,r.A)({},t),{},{children:yD(e,t)}):t:e.unknownHandler?e.unknownHandler(e,t,n):function(e,t){const n=t.data||{},r=!("value"in t)||pD.call(n,"hProperties")||pD.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:yD(e,t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}(e,t)}function yD(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i<r.length;){const o=vD(e,r[i],t);if(o){if(i&&"break"===r[i-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=e.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function bD(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function AD(e,t){const n=fD(e,t),i=n.one(e,null),o=function(e){const t=[];let n=-1;for(;++n<e.footnoteOrder.length;){const r=e.footnoteById[e.footnoteOrder[n]];if(!r)continue;const i=e.all(r),o=String(r.identifier).toUpperCase(),a=qT(o.toLowerCase());let s=0;const l=[];for(;++s<=e.footnoteCounts[o];){const t={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};s>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(s)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(t)}const u=i[i.length-1];if(u&&"element"===u.type&&"p"===u.tagName){const e=u.children[u.children.length-1];e&&"text"===e.type?e.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...l)}else i.push(...l);const c={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+a},children:e.wrap(i,!0)};e.patch(r,c),t.push(c)}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:(0,r.A)((0,r.A)({},JSON.parse(JSON.stringify(e.footnoteLabelProperties))),{},{id:"footnote-label"}),children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}(n);return o&&i.children.push({type:"text",value:"\n"},o),Array.isArray(i)?{type:"root",children:i}:i}const xD=function(e,t){return e&&"run"in e?function(e,t){return(n,r,i)=>{e.run(AD(n,t),r,e=>{i(e)})}}(e,t):function(e){return t=>AD(t,e)}(e||t)};var wD=i(8379);class kD{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function SD(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new kD(n,r,t)}function ED(e){return e.toLowerCase()}kD.prototype.property={},kD.prototype.normal={},kD.prototype.space=null;class CD{constructor(e,t){this.property=e,this.attribute=t}}CD.prototype.space=null,CD.prototype.boolean=!1,CD.prototype.booleanish=!1,CD.prototype.overloadedBoolean=!1,CD.prototype.number=!1,CD.prototype.commaSeparated=!1,CD.prototype.spaceSeparated=!1,CD.prototype.commaOrSpaceSeparated=!1,CD.prototype.mustUseProperty=!1,CD.prototype.defined=!1;let _D=0;const TD=OD(),DD=OD(),PD=OD(),ID=OD(),FD=OD(),LD=OD(),zD=OD();function OD(){return 2**++_D}const ND=Object.keys(n);class jD extends CD{constructor(e,t,r,i){let o=-1;if(super(e,t),RD(this,"space",i),"number"==typeof r)for(;++o<ND.length;){const e=ND[o];RD(this,ND[o],(r&n[e])===n[e])}}}function RD(e,t,n){n&&(e[t]=n)}jD.prototype.defined=!0;const MD={}.hasOwnProperty;function BD(e){const t={},n={};let r;for(r in e.properties)if(MD.call(e.properties,r)){const i=e.properties[r],o=new jD(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ED(r)]=r,n[ED(o.attribute)]=r}return new kD(t,n,e.space)}const WD=BD({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),UD=BD({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function HD(e,t){return t in e?e[t]:t}function VD(e,t){return HD(e,t.toLowerCase())}const GD=BD({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:VD,properties:{xmlns:null,xmlnsXLink:null}}),KD=BD({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:DD,ariaAutoComplete:null,ariaBusy:DD,ariaChecked:DD,ariaColCount:ID,ariaColIndex:ID,ariaColSpan:ID,ariaControls:FD,ariaCurrent:null,ariaDescribedBy:FD,ariaDetails:null,ariaDisabled:DD,ariaDropEffect:FD,ariaErrorMessage:null,ariaExpanded:DD,ariaFlowTo:FD,ariaGrabbed:DD,ariaHasPopup:null,ariaHidden:DD,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:FD,ariaLevel:ID,ariaLive:null,ariaModal:DD,ariaMultiLine:DD,ariaMultiSelectable:DD,ariaOrientation:null,ariaOwns:FD,ariaPlaceholder:null,ariaPosInSet:ID,ariaPressed:DD,ariaReadOnly:DD,ariaRelevant:null,ariaRequired:DD,ariaRoleDescription:FD,ariaRowCount:ID,ariaRowIndex:ID,ariaRowSpan:ID,ariaSelected:DD,ariaSetSize:ID,ariaSort:null,ariaValueMax:ID,ariaValueMin:ID,ariaValueNow:ID,ariaValueText:null,role:null}}),qD=BD({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:VD,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:LD,acceptCharset:FD,accessKey:FD,action:null,allow:null,allowFullScreen:TD,allowPaymentRequest:TD,allowUserMedia:TD,alt:null,as:null,async:TD,autoCapitalize:null,autoComplete:FD,autoFocus:TD,autoPlay:TD,blocking:FD,capture:null,charSet:null,checked:TD,cite:null,className:FD,cols:ID,colSpan:null,content:null,contentEditable:DD,controls:TD,controlsList:FD,coords:ID|LD,crossOrigin:null,data:null,dateTime:null,decoding:null,default:TD,defer:TD,dir:null,dirName:null,disabled:TD,download:PD,draggable:DD,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:TD,formTarget:null,headers:FD,height:ID,hidden:TD,high:ID,href:null,hrefLang:null,htmlFor:FD,httpEquiv:FD,id:null,imageSizes:null,imageSrcSet:null,inert:TD,inputMode:null,integrity:null,is:null,isMap:TD,itemId:null,itemProp:FD,itemRef:FD,itemScope:TD,itemType:FD,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:TD,low:ID,manifest:null,max:null,maxLength:ID,media:null,method:null,min:null,minLength:ID,multiple:TD,muted:TD,name:null,nonce:null,noModule:TD,noValidate:TD,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:TD,optimum:ID,pattern:null,ping:FD,placeholder:null,playsInline:TD,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:TD,referrerPolicy:null,rel:FD,required:TD,reversed:TD,rows:ID,rowSpan:ID,sandbox:FD,scope:null,scoped:TD,seamless:TD,selected:TD,shadowRootClonable:TD,shadowRootDelegatesFocus:TD,shadowRootMode:null,shape:null,size:ID,sizes:null,slot:null,span:ID,spellCheck:DD,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ID,step:null,style:null,tabIndex:ID,target:null,title:null,translate:null,type:null,typeMustMatch:TD,useMap:null,value:DD,width:ID,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:FD,axis:null,background:null,bgColor:null,border:ID,borderColor:null,bottomMargin:ID,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:TD,declare:TD,event:null,face:null,frame:null,frameBorder:null,hSpace:ID,leftMargin:ID,link:null,longDesc:null,lowSrc:null,marginHeight:ID,marginWidth:ID,noResize:TD,noHref:TD,noShade:TD,noWrap:TD,object:null,profile:null,prompt:null,rev:null,rightMargin:ID,rules:null,scheme:null,scrolling:DD,standby:null,summary:null,text:null,topMargin:ID,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ID,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:TD,disableRemotePlayback:TD,prefix:null,property:null,results:ID,security:null,unselectable:null}}),YD=BD({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:HD,properties:{about:zD,accentHeight:ID,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ID,amplitude:ID,arabicForm:null,ascent:ID,attributeName:null,attributeType:null,azimuth:ID,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ID,by:null,calcMode:null,capHeight:ID,className:FD,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ID,diffuseConstant:ID,direction:null,display:null,dur:null,divisor:ID,dominantBaseline:null,download:TD,dx:null,dy:null,edgeMode:null,editable:null,elevation:ID,enableBackground:null,end:null,event:null,exponent:ID,externalResourcesRequired:null,fill:null,fillOpacity:ID,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:LD,g2:LD,glyphName:LD,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ID,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ID,horizOriginX:ID,horizOriginY:ID,id:null,ideographic:ID,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ID,k:ID,k1:ID,k2:ID,k3:ID,k4:ID,kernelMatrix:zD,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ID,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ID,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ID,overlineThickness:ID,paintOrder:null,panose1:null,path:null,pathLength:ID,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:FD,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ID,pointsAtY:ID,pointsAtZ:ID,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zD,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zD,rev:zD,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zD,requiredFeatures:zD,requiredFonts:zD,requiredFormats:zD,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ID,specularExponent:ID,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ID,strikethroughThickness:ID,string:null,stroke:null,strokeDashArray:zD,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ID,strokeOpacity:ID,strokeWidth:null,style:null,surfaceScale:ID,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zD,tabIndex:ID,tableValues:null,target:null,targetX:ID,targetY:ID,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zD,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ID,underlineThickness:ID,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ID,values:null,vAlphabetic:ID,vMathematical:ID,vectorEffect:null,vHanging:ID,vIdeographic:ID,version:null,vertAdvY:ID,vertOriginX:ID,vertOriginY:ID,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ID,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),XD=SD([UD,WD,GD,KD,qD],"html"),$D=SD([UD,WD,GD,KD,YD],"svg");function JD(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{eD(t,"element",(t,n,r)=>{const i=r;let o;if(e.allowedElements?o=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(o=e.disallowedElements.includes(t.tagName)),!o&&e.allowElement&&"number"==typeof n&&(o=!e.allowElement(t,n,i)),o&&"number"==typeof n)return e.unwrapDisallowed&&t.children?i.children.splice(n,1,...t.children):i.children.splice(n,1),n})}}var QD=i(6851);function ZD(e){const t=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}const eP=/^data[-\w.:]+$/i,tP=/-[a-z]/g,nP=/[A-Z]/g;function rP(e){return"-"+e.toLowerCase()}function iP(e){return e.charAt(1).toUpperCase()}const oP={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};const aP=i(7922),sP=["http","https","mailto","tel"];function lP(e){const t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;const r=t.indexOf(":");if(-1===r)return t;let i=-1;for(;++i<sP.length;){const e=sP[i];if(r===e.length&&t.slice(0,e.length).toLowerCase()===e)return t}return i=t.indexOf("?"),-1!==i&&r>i?t:(i=t.indexOf("#"),-1!==i&&r>i?t:"javascript:void(0)")}const uP={}.hasOwnProperty,cP=new Set(["table","thead","tbody","tfoot","tr"]);function dP(e,t){const n=[];let r,i=-1;for(;++i<t.children.length;)r=t.children[i],"element"===r.type?n.push(hP(e,r,i,t)):"text"===r.type?"element"===t.type&&cP.has(t.tagName)&&ZD(r)||n.push(r.value):"raw"!==r.type||e.options.skipHtml||n.push(r.value);return n}function hP(e,t,n,r){const i=e.options,o=void 0===i.transformLinkUri?lP:i.transformLinkUri,a=e.schema,s=t.tagName,l={};let u,c=a;if("html"===a.space&&"svg"===s&&(c=$D,e.schema=c),t.properties)for(u in t.properties)uP.call(t.properties,u)&&fP(l,u,t.properties[u],e);"ol"!==s&&"ul"!==s||e.listDepth++;const d=dP(e,t);"ol"!==s&&"ul"!==s||e.listDepth--,e.schema=a;const h=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=i.components&&uP.call(i.components,s)?i.components[s]:s,f="string"==typeof p||p===xl.Fragment;if(!QD.isValidElementType(p))throw new TypeError("Component for name `".concat(s,"` not defined or is not renderable"));if(l.key=n,"a"===s&&i.linkTarget&&(l.target="function"==typeof i.linkTarget?i.linkTarget(String(l.href||""),t.children,"string"==typeof l.title?l.title:null):i.linkTarget),"a"===s&&o&&(l.href=o(String(l.href||""),t.children,"string"==typeof l.title?l.title:null)),f||"code"!==s||"element"!==r.type||"pre"===r.tagName||(l.inline=!0),f||"h1"!==s&&"h2"!==s&&"h3"!==s&&"h4"!==s&&"h5"!==s&&"h6"!==s||(l.level=Number.parseInt(s.charAt(1),10)),"img"===s&&i.transformImageUri&&(l.src=i.transformImageUri(String(l.src||""),String(l.alt||""),"string"==typeof l.title?l.title:null)),!f&&"li"===s&&"element"===r.type){const e=function(e){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}(t);l.checked=e&&e.properties?Boolean(e.properties.checked):null,l.index=pP(r,t),l.ordered="ol"===r.tagName}var m;return f||"ol"!==s&&"ul"!==s||(l.ordered="ol"===s,l.depth=e.listDepth),"td"!==s&&"th"!==s||(l.align&&(l.style||(l.style={}),l.style.textAlign=l.align,delete l.align),f||(l.isHeader="th"===s)),f||"tr"!==s||"element"!==r.type||(l.isHeader=Boolean("thead"===r.tagName)),i.sourcePos&&(l["data-sourcepos"]=[(m=h).start.line,":",m.start.column,"-",m.end.line,":",m.end.column].map(String).join("")),!f&&i.rawSourcePos&&(l.sourcePosition=t.position),!f&&i.includeElementIndex&&(l.index=pP(r,t),l.siblingCount=pP(r)),f||(l.node=t),d.length>0?xl.createElement(p,l,d):xl.createElement(p,l)}function pP(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)"element"===e.children[n].type&&r++;return r}function fP(e,t,n,r){const i=function(e,t){const n=ED(t);let r=t,i=CD;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&eP.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(tP,iP);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!tP.test(e)){let n=e.replace(nP,rP);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=jD}return new i(r,t)}(r.schema,t);let o=n;null!=o&&o==o&&(Array.isArray(o)&&(o=i.commaSeparated?function(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(o):function(e){return e.join(" ").trim()}(o)),"style"===i.property&&"string"==typeof o&&(o=function(e){const t={};try{aP(e,n)}catch(e){}return t;function n(e,n){const r="-ms-"===e.slice(0,4)?"ms-".concat(e.slice(4)):e;t[r.replace(/-([a-z])/g,mP)]=n}}(o)),i.space&&i.property?e[uP.call(oP,i.property)?oP[i.property]:i.property]=o:i.attribute&&(e[i.attribute]=o))}function mP(e,t){return t.toUpperCase()}const gP={}.hasOwnProperty,vP={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function yP(e){for(const t in vP)if(gP.call(vP,t)&&gP.call(e,t)){const e=vP[t];console.warn("[react-markdown] Warning: please ".concat(e.to?"use `".concat(e.to,"` instead of"):"remove"," `").concat(t,"` (see <").concat("https://github.com/remarkjs/react-markdown/blob/main/changelog.md","#").concat(e.id,"> for more info)")),delete vP[t]}const t=GC().use(KT).use(e.remarkPlugins||[]).use(xD,(0,r.A)((0,r.A)({},e.remarkRehypeOptions),{},{allowDangerousHtml:!0})).use(e.rehypePlugins||[]).use(JD,e),n=new jC;"string"==typeof e.children?n.value=e.children:void 0!==e.children&&null!==e.children&&console.warn("[react-markdown] Warning: please pass a string as `children` (not: `".concat(e.children,"`)"));const i=t.runSync(t.parse(n),n);if("root"!==i.type)throw new TypeError("Expected a `root` node");let o=xl.createElement(xl.Fragment,{},dP({options:e,schema:XD,listDepth:0},i));return e.className&&(o=xl.createElement("div",{className:e.className},o)),o}yP.propTypes={children:wD.string,className:wD.string,allowElement:wD.func,allowedElements:wD.arrayOf(wD.string),disallowedElements:wD.arrayOf(wD.string),unwrapDisallowed:wD.bool,remarkPlugins:wD.arrayOf(wD.oneOfType([wD.object,wD.func,wD.arrayOf(wD.oneOfType([wD.bool,wD.string,wD.object,wD.func,wD.arrayOf(wD.any)]))])),rehypePlugins:wD.arrayOf(wD.oneOfType([wD.object,wD.func,wD.arrayOf(wD.oneOfType([wD.bool,wD.string,wD.object,wD.func,wD.arrayOf(wD.any)]))])),sourcePos:wD.bool,rawSourcePos:wD.bool,skipHtml:wD.bool,includeElementIndex:wD.bool,transformLinkUri:wD.oneOfType([wD.func,wD.bool]),linkTarget:wD.oneOfType([wD.func,wD.string]),transformImageUri:wD.func,components:wD.object};const bP=new Map;function AP(e){let{text:t,fromLang:n,speechLang:r,toLang:i,apiSetting:o,context:a=""}=e;const s=wx(),[l,u]=(0,xl.useState)(""),[c,d]=(0,xl.useState)(!1),[h,p]=(0,xl.useState)(""),f=JSON.stringify(o||{});return(0,xl.useEffect)(()=>{if(null==t||!t.trim()||null==o||!o.apiSlug)return u(""),d(!1),void p("");let e=!0;const r=function(e){let{text:t,fromLang:n,toLang:r,apiSettingKey:i,context:o}=e;return JSON.stringify({text:t,fromLang:n,toLang:r,apiSettingKey:i,context:o})}({text:t,fromLang:n,toLang:i,apiSettingKey:f,context:a}),s=t=>{let{markdown:n}=t;e&&n&&u(n)};return(async()=>{try{d(!0),u(""),p("");let l=bP.get(r);l||(l={subscribers:new Set,promise:null},l.promise=Dn({text:t,fromLang:n,toLang:i,apiSetting:o,context:a,onStreamChunk:e=>{l.subscribers.forEach(t=>t(e))}}).finally(()=>{bP.delete(r)}),bP.set(r,l)),l.subscribers.add(s);const c=await l.promise;e&&u(c)}catch(t){if("AbortError"===(null==t?void 0:t.name))return;e&&p(t.message)}finally{e&&d(!1)}})(),()=>{var t;e=!1,null===(t=bP.get(r))||void 0===t||t.subscribers.delete(s)}},[t,n,i,f,a]),h?(0,El.jsx)(Ry,{severity:"error",children:h}):c&&!l?(0,El.jsx)(ib,{size:16}):l?(0,El.jsxs)(yA,{sx:{position:"relative",pr:8,"& > :first-of-type":{mt:0},"& > :last-child":{mb:0},"& h1, & h2, & h3, & h4, & h5, & h6":{fontSize:"1em",fontWeight:700,lineHeight:1.55,mt:1.25,mb:.75},"& p":{my:1},"& ul, & ol":{pl:3,my:1},"& blockquote":{m:0,pl:1.5,borderLeft:"3px solid",borderColor:"divider",color:"text.secondary"},"& code":{px:.5,py:.1,borderRadius:.5,bgcolor:"action.hover"}},children:[(0,El.jsxs)(yA,{sx:{position:"absolute",top:0,right:0,zIndex:1,display:"flex",alignItems:"center"},children:[(0,El.jsx)(xC,{text:t,lang:r||n||"en-US"}),(0,El.jsx)(aC,{text:l,title:s("copy")})]}),c&&(0,El.jsx)(ib,{size:12,sx:{mr:1}}),(0,El.jsx)(hb,{component:"div",children:(0,El.jsx)(yP,{children:l})})]}):null}function xP(e){let{text:t}=e;const{loading:n,error:r,data:i}=Ax(En,t);return n?(0,El.jsx)(ib,{size:16}):r?(0,El.jsx)(Ry,{severity:"error",children:r}):i?(0,El.jsx)(El.Fragment,{children:i.map(e=>{let{k:t,v:n}=e;return(0,El.jsxs)(hb,{component:"div",children:[(0,El.jsx)(hb,{children:t}),(0,El.jsx)(hb,{component:"ul",style:{margin:"0"},children:(0,El.jsx)(hb,{component:"li",children:n})})]},t)})}):null}function wP(e){let{text:t}=e;const{loading:n,error:r,data:i}=Ax(Cn,t);return n?(0,El.jsx)(ib,{size:16}):r?(0,El.jsx)(Ry,{severity:"error",children:r}):i?(0,El.jsx)(El.Fragment,{children:i.map(e=>{let{entry:t,explain:n}=e;return(0,El.jsxs)(hb,{component:"div",children:[(0,El.jsx)(hb,{children:t}),(0,El.jsx)(hb,{component:"ul",style:{margin:"0"},children:(0,El.jsx)(hb,{component:"li",children:n})})]},t)})}):null}function kP(e){let{text:t,enSug:n}=e;const r={[o.SQ0]:(0,El.jsx)(xP,{text:t}),[o.s1S]:(0,El.jsx)(wP,{text:t})};return(0,El.jsxs)(ax,{spacing:1,children:[(0,El.jsx)(Tb,{}),r[n]||(0,El.jsx)(hb,{children:"Sug not support"})]})}const SP="https://www.zdic.net",EP=e=>(e||"").replace(/\s+/g," ").trim(),CP=e=>e?/^https?:\/\//.test(e)?e:e.startsWith("//")?"https:".concat(e):e.startsWith("/")?"".concat(SP).concat(e):e:"",_P=(e,t)=>{const n=Array.from(e.querySelectorAll(".meta-badge")).find(e=>EP(e.textContent)===t);return(e=>EP(Array.from((null==e?void 0:e.childNodes)||[]).filter(e=>e.nodeType===Node.TEXT_NODE).map(e=>e.textContent).join(""))||EP(null==e?void 0:e.textContent))(null==n?void 0:n.nextElementSibling)},TP=(e,t)=>(e=>Array.from(new Set(e.filter(Boolean))))(Array.from(e.querySelectorAll(t)).map(e=>{var t;return EP(e.getAttribute("title"))||EP(null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("alt"))||EP(e.textContent)})).join(", "),DP=e=>{const t=[];return e.querySelectorAll(".jbjs>.jnr>p>.dicpy").forEach(e=>{var n,r;const i=EP(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(EP(e.textContent))});break}if(s.querySelector(".dicpy"))break;s=s.nextElementSibling}t.push({pinyin:i,audioUrl:CP((null==o?void 0:o.getAttribute("data-src-mp3"))||(null==o?void 0:o.getAttribute("data-audio"))),definitions:a})}),t},PP=async e=>{var t,n,r,i,o,a;const s="".concat(SP,"/hans/").concat(encodeURIComponent(e)),l=await(0,N.Fd)(s,{credentials:"omit"},{useCache:!1});if(!l)return null;const u=(new DOMParser).parseFromString(at.createHTML(l),"text/html"),c=EP(null===(t=u.querySelector(".char-meta"))||void 0===t?void 0:t.getAttribute("content"))||EP(null===(n=u.querySelector("#glyph-img"))||void 0===n?void 0:n.getAttribute("alt"))||EP(null===(r=u.querySelector(".dict-section__char"))||void 0===r?void 0:r.textContent)||EP(null===(i=u.querySelector(".h2_entry>.orth"))||void 0===i?void 0:i.textContent)||e,d=_P(u,"部首")||EP(null===(o=u.querySelector("[class^='z_bs'] a"))||void 0===o?void 0:o.textContent),h=TP(u,"[class^='z_jfz'] a"),p=TP(u,".char-card__variants .variant-link")||TP(u,"[class^='z_yt'] a"),f=_P(u,"五笔")||EP(null===(a=u.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),m=(e=>Array.from(e.querySelectorAll("#jbjs .jbjs-reading")).map(e=>{var t;const n=EP(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=>EP(e.textContent)).filter(Boolean);return{pinyin:n,audioUrl:CP(null==r?void 0:r.getAttribute("data-audio")),definitions:i}}).filter(e=>e.pinyin||e.definitions.length>0))(u),{en:g,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=EP(e.textContent);Object.entries(n).forEach(e=>{let[n,i]=e;!t[i]&&r.startsWith(n)&&(t[i]=EP(r.slice(n.length)))})}),t})(u);return{text:c,bushou:d,fanti:h,yiti:p,wubi:f,results:m.length>0?m:DP(u),en:g,de:v,fr:y}};function IP(e){let{text:t}=e;const[n,r]=(0,xl.useState)(null),[i,o]=(0,xl.useState)(!1);return(0,xl.useEffect)(()=>{if(!t)return;let e=!0;return o(!0),PP(t).then(t=>{e&&(r(t),o(!1))}).catch(t=>{e&&(console.error("获取汉典数据失败:",t),o(!1))}),()=>{e=!1}},[t]),i?(0,El.jsx)(ax,{alignItems:"center",justifyContent:"center",py:2,children:(0,El.jsx)(ib,{size:24})}):n?(0,El.jsxs)(ax,{spacing:1,children:[(0,El.jsx)(hb,{variant:"subtitle1",style:{fontWeight:"bold"},children:n.text}),(0,El.jsx)(Tb,{}),(n.bushou||n.wubi)&&(0,El.jsxs)(hb,{variant:"body2",color:"text.secondary",children:[n.bushou&&"[部首]: ".concat(n.bushou,"  "),n.wubi&&"[五笔]: ".concat(n.wubi)]}),(n.fanti||n.yiti)&&(0,El.jsxs)(hb,{variant:"body2",color:"text.secondary",children:[n.fanti&&"[繁体]: ".concat(n.fanti,"  "),n.yiti&&"[异体]: ".concat(n.yiti)]}),n.results&&n.results.length>0&&(0,El.jsx)(ax,{spacing:1,mt:1,children:n.results.map((e,t)=>(0,El.jsxs)(yA,{children:[(0,El.jsxs)(ax,{direction:"row",alignItems:"center",spacing:1,children:[(0,El.jsxs)(hb,{variant:"body2",color:"primary",style:{fontWeight:"bold"},children:["[",e.pinyin,"]"]}),e.audioUrl&&(0,El.jsx)(bC,{src:e.audioUrl})]}),(0,El.jsx)(yA,{component:"ol",sx:{pl:3,m:0,mt:.5},children:e.definitions&&e.definitions.map((e,t)=>(0,El.jsx)(hb,{component:"li",variant:"body2",sx:{mb:.5},children:e},t))})]},t))}),(n.en||n.de||n.fr)&&(0,El.jsxs)(ax,{spacing:.5,mt:1,children:[n.en&&(0,El.jsxs)(hb,{variant:"body2",sx:{wordBreak:"break-word"},children:["[英]: ",n.en]}),n.de&&(0,El.jsxs)(hb,{variant:"body2",sx:{wordBreak:"break-word"},children:["[德]: ",n.de]}),n.fr&&(0,El.jsxs)(hb,{variant:"body2",sx:{wordBreak:"break-word"},children:["[法]: ",n.fr]})]})]}):(0,El.jsxs)(ax,{spacing:1,children:[(0,El.jsx)(hb,{variant:"subtitle1",style:{fontWeight:"bold"},children:t}),(0,El.jsx)(Tb,{}),(0,El.jsx)(hb,{variant:"body2",color:"text.secondary",children:"暂无字典数据或查询失败"})]})}function FP(e){let{text:t,setText:n,translationText:i=t,apiSlugs:a,fromLang:s,toLang:u,toLang2:c,transApis:d,simpleStyle:h=!1,langDetector:p="-",translateVariants:f=!0,enDict:m="-",enSug:g="-",aiDictApiSlug:v="-",aiDictPromptSlug:y=o.Qs8,prompts:b=[],selectionContext:A="",isPlaygound:x=!1,autoFocusInput:w=!0,syncExternalTextWhileEditing:k=!1}=e;const S=wx(),[E,C]=(0,xl.useState)(!1),[_,T]=(0,xl.useState)(t),[D,P]=(0,xl.useState)(a),[I,F]=(0,xl.useState)(!1),[L,z]=(0,xl.useState)(s),[O,N]=(0,xl.useState)(u),[j,R]=(0,xl.useState)(c),[M,B]=(0,xl.useState)(p),[W,H]=(0,xl.useState)(m),[V,G]=(0,xl.useState)(g),[K,q]=(0,xl.useState)("default"),Y=(0,xl.useRef)(!1),[X,$]=(0,xl.useState)(""),[J,Q]=(0,xl.useState)(!1),Z=(0,xl.useRef)(null);(0,xl.useEffect)(()=>{if(!w)return;const e=Z.current;if(!e)return;e.focus();const t=e.value.length;e.setSelectionRange(t,t)},[w]),(0,xl.useEffect)(()=>{if((0,l.Ln)(t)){const e=new CustomEvent("kiss-add-word",{detail:{word:t}});document.dispatchEvent(e)}},[t]),(0,xl.useEffect)(()=>{I||P(a)},[a,I]),(0,xl.useEffect)(()=>{!k&&E||T(t)},[t,E,k]),(0,xl.useEffect)(()=>{t.trim()?(async()=>{try{Q(!0);const e=await Wc(t,M);e&&$(e)}catch(e){(0,ht.h9)("tranbox: detect lang",e)}finally{Q(!1)}})():$("")},[t,M,$,Q]);const ee=(0,xl.useMemo)(()=>"auto"===L&&O!==j&&"-"!==j&&U(X,O,f)?j:O,[L,O,j,X,f]),te=(0,xl.useMemo)(()=>d.filter(e=>!e.isDisabled).map(e=>({key:e.apiSlug,name:e.apiName||e.apiSlug})),[d]),ne=(0,xl.useMemo)(()=>(0,l.Ln)(t),[t]),re=(0,xl.useMemo)(()=>x?6:4,[x]),ie=(0,xl.useMemo)(()=>x?3:4,[x]),oe=(0,xl.useMemo)(()=>{const e=new Set(te.map(e=>e.key));return D.filter(t=>e.has(t))},[D,te]),ae=ne&&o.q77.has(W)||(0,l.Mt)(t),se=(0,xl.useMemo)(()=>{if(!v||"-"===v)return null;const e=d.find(e=>e.apiSlug===v);if(!e)return null;if(y===o.Qs8)return e.dictPrompt?e:null;const t=(0,o.Es_)(b,y);return t?(0,r.A)((0,r.A)({},e),{},{dictPromptSlug:t.slug,dictPrompt:t.systemPrompt,dictUserPrompt:t.userPrompt}):null},[v,y,b,d]),le=Boolean((null==t?void 0:t.trim())&&se);return(0,xl.useEffect)(()=>{Y.current||(ae?q("default"):le&&q("ai"))},[t,ae,le]),(0,El.jsxs)(ax,{spacing:h?1:2,children:[!h&&(0,El.jsxs)(El.Fragment,{children:[(0,El.jsx)(yA,{children:(0,El.jsxs)(tC,{container:!0,spacing:2,columns:12,children:[(0,El.jsx)(tC,{item:!0,xs:re,md:ie,children:(0,El.jsx)(iE,{select:!0,SelectProps:{multiple:!0,MenuProps:{disablePortal:!x}},fullWidth:!0,size:"small",value:oe,name:"apiSlugs",label:S("translate_service_multiple"),onChange:e=>{F(!0),P(e.target.value)},children:te.map(e=>{let{key:t,name:n}=e;return(0,El.jsx)(HE,{value:t,children:n},t)})})}),(0,El.jsx)(tC,{item:!0,xs:re,md:ie,children:(0,El.jsx)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!x}},fullWidth:!0,size:"small",name:"fromLang",value:L,label:S("from_lang"),onChange:e=>{z(e.target.value)},children:o.UF6.map(e=>{let[t,n]=e;return(0,El.jsx)(HE,{value:t,children:n},t)})})}),(0,El.jsx)(tC,{item:!0,xs:re,md:ie,children:(0,El.jsx)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!x}},fullWidth:!0,size:"small",name:"toLang",value:O,label:S("to_lang"),onChange:e=>{N(e.target.value)},children:o.$QD.map(e=>{let[t,n]=e;return(0,El.jsx)(HE,{value:t,children:n},t)})})}),x&&(0,El.jsxs)(El.Fragment,{children:[(0,El.jsx)(tC,{item:!0,xs:re,md:ie,children:(0,El.jsx)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!x}},fullWidth:!0,size:"small",name:"toLang2",value:j,label:S("to_lang2"),onChange:e=>{R(e.target.value)},children:o.$QD.map(e=>{let[t,n]=e;return(0,El.jsx)(HE,{value:t,children:n},t)})})}),(0,El.jsx)(tC,{item:!0,xs:re,md:ie,children:(0,El.jsxs)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!x}},fullWidth:!0,size:"small",name:"enDict",value:W,label:S("english_dict"),onChange:e=>{H(e.target.value)},children:[(0,El.jsx)(HE,{value:"-",children:S("disable")}),o.F$3.map(e=>(0,El.jsx)(HE,{value:e,children:e},e))]})}),(0,El.jsx)(tC,{item:!0,xs:re,md:ie,children:(0,El.jsxs)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!x}},fullWidth:!0,size:"small",name:"enSug",value:V,label:S("english_suggest"),onChange:e=>{G(e.target.value)},children:[(0,El.jsx)(HE,{value:"-",children:S("disable")}),o.O09.map(e=>(0,El.jsx)(HE,{value:e,children:e},e))]})}),(0,El.jsx)(tC,{item:!0,xs:re,md:ie,children:(0,El.jsxs)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!x}},fullWidth:!0,size:"small",name:"langDetector",value:M,label:S("detected_lang"),onChange:e=>{B(e.target.value)},children:[(0,El.jsx)(HE,{value:"-",children:S("disable")}),o.HHP.map(e=>(0,El.jsx)(HE,{value:e,children:e},e))]})}),(0,El.jsx)(tC,{item:!0,xs:re,md:ie,children:(0,El.jsx)(iE,{fullWidth:!0,size:"small",name:"deLang",value:X&&o.Z2L.get(X),label:S("detected_result"),disabled:!0,InputProps:{startAdornment:J?(0,El.jsx)(ib,{size:16}):null}})})]})]})}),(0,El.jsx)(yA,{children:(0,El.jsx)(iE,{size:"small",label:S("original_text"),fullWidth:!0,multiline:!0,inputRef:Z,minRows:x?2:1,maxRows:10,sx:{"& textarea":{resize:"vertical"}},value:_,onChange:e=>{T(e.target.value)},onFocus:()=>{C(!0)},onBlur:()=>{C(!1),n(_.trim())},InputProps:{endAdornment:(0,El.jsx)(ax,{direction:"row",sx:{position:"absolute",right:0,top:0},children:E?(0,El.jsx)(Sy,{size:"small",onClick:e=>{e.stopPropagation(),C(!1),n(_.trim())},title:S("submit"),children:(0,El.jsx)(nC.A,{fontSize:"inherit"})}):t?(0,El.jsx)(aC,{text:t,title:S("copy")}):(0,El.jsx)(Sy,{size:"small",onClick:async()=>{try{const e=await navigator.clipboard.readText();n(e.trim())}catch(e){}},title:S("paste"),children:(0,El.jsx)(rC.A,{fontSize:"inherit"})})})}})})]}),oe.map(e=>(0,El.jsx)(lC,{text:i,fromLang:L,toLang:ee,simpleStyle:h,apiSlug:e,transApis:d,translateVariants:f},e)),(ae||le)&&(0,El.jsx)(yA,{children:le?(0,El.jsxs)(El.Fragment,{children:[(0,El.jsxs)(IE,{value:ae?K:"ai",onChange:(e,t)=>{Y.current=!0,q(t)},variant:"scrollable",allowScrollButtonsMobile:!0,sx:{minHeight:36,mb:1},children:[ae&&(0,El.jsx)(NE,{value:"default",label:S("default_dict","默认词典"),sx:{minHeight:36,py:.5}}),(0,El.jsx)(NE,{value:"ai",label:S("ai_dict","AI词典"),sx:{minHeight:36,py:.5}})]}),ae&&"default"===K&&(0,El.jsxs)(El.Fragment,{children:[ne&&o.q77.has(W)&&(0,El.jsx)(SC,{text:t,enDict:W}),(0,l.Mt)(t)&&(0,El.jsx)(IP,{text:t})]}),(!ae||"ai"===K)&&(0,El.jsx)(AP,{text:t,fromLang:L,speechLang:"auto"===L?X:L,toLang:ee,apiSetting:se,context:A&&A.includes(t)?A:""})]}):(0,El.jsxs)(El.Fragment,{children:[ne&&o.q77.has(W)&&(0,El.jsx)(SC,{text:t,enDict:W}),(0,l.Mt)(t)&&(0,El.jsx)(IP,{text:t})]})}),ne&&o.JIP.has(V)&&(0,El.jsx)(kP,{text:t,enSug:V})]})}const LP="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=",zP=e=>{let{size:t=16,className:n="",style:i={},onClick:o}=e;return(0,El.jsx)("img",{src:LP,alt:"Logo",className:n,draggable:!1,onClick:o,onDragStart:e=>e.preventDefault(),style:(0,r.A)({width:"".concat(t,"px"),height:"".concat(t,"px"),objectFit:"contain",display:"block"},i)})};function OP(e){let{setShowBox:t,simpleStyle:n,setSimpleStyle:i,hideClickAway:o,setHideClickAway:a,followSelection:s,setFollowSelection:l}=e;const u=bA(),c=wx(),{darkMode:d,toggleDarkMode:h}=cA(),p=u.palette.text.secondary,f=(0,xl.useCallback)(()=>{(0,G.Ru)(H.Gt)},[]),m=e=>e.currentTarget.blur(),g={borderRadius:"6px",padding:"5px",minWidth:"30px",minHeight:"30px",transition:"all 0.2s ease",backgroundColor:"transparent","& svg":{color:p}};return(0,El.jsx)(yA,{onMouseUp:e=>e.stopPropagation(),onTouchEnd:e=>e.stopPropagation(),sx:{backgroundColor:u.palette.background.default,padding:"4px 8px 4px 12px",height:"36px",display:"flex",alignItems:"center",minHeight:"auto"},children:(0,El.jsxs)(ax,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,sx:{width:"100%",height:"100%",minWidth:0},children:[(0,El.jsxs)(ax,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,flex:"1 1 auto",overflow:"hidden"},children:[(0,El.jsx)(yA,{sx:{width:18,height:18,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",backgroundColor:u.palette.background.paper,border:"1px solid ".concat(u.palette.divider),transition:"all 0.2s ease","&:hover":{boxShadow:u.shadows[2],transform:"translateY(-1px)",backgroundColor:u.palette.action.hover}},children:(0,El.jsx)(zP,{size:16})}),(0,El.jsx)(hb,{variant:"caption",sx:{minWidth:0,fontWeight:500,fontSize:"12px",color:u.palette.text.secondary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:"".concat("KISS Translator"," v").concat("2.0.32")})]}),(0,El.jsxs)(ax,{direction:"row",alignItems:"center",spacing:.5,sx:{flexShrink:0},children:[V.aQ&&(0,El.jsx)(Sy,{size:"small",title:c("open_separate_window"),onClick:f,onMouseLeave:m,sx:(0,r.A)((0,r.A)({},g),{},{"&:hover":{backgroundColor:u.palette.primary.light+"20",transform:"scale(1.05)",boxShadow:u.shadows[2],"& svg":{color:u.palette.primary.main}},"&:active":{transform:"scale(0.95)",backgroundColor:u.palette.primary.light+"40"}}),children:(0,El.jsx)(ux.A,{sx:{width:16,height:16}})}),(0,El.jsx)(Sy,{size:"small",title:c("btn_tip_click_away"),onMouseLeave:m,onClick:()=>a(e=>!e),sx:(0,r.A)((0,r.A)({},g),{},{"&:hover":{backgroundColor:u.palette.success.light+"20",transform:"scale(1.05)",boxShadow:u.shadows[2],"& svg":{color:u.palette.success.main}},"&:active":{transform:"scale(0.95)",backgroundColor:u.palette.success.light+"40"}}),children:o?(0,El.jsx)(px.A,{sx:{width:16,height:16,color:u.palette.success.main}}):(0,El.jsx)(hx.A,{sx:{width:16,height:16}})}),(0,El.jsx)(Sy,{size:"small",title:c("btn_tip_follow_selection"),onMouseLeave:m,onClick:()=>l(e=>!e),sx:(0,r.A)((0,r.A)({},g),{},{"&:hover":{backgroundColor:u.palette.warning.light+"20",transform:"scale(1.05)",boxShadow:u.shadows[2],"& svg":{color:u.palette.warning.main}},"&:active":{transform:"scale(0.95)",backgroundColor:u.palette.warning.light+"40"}}),children:s?(0,El.jsx)(dx.A,{sx:{width:16,height:16,color:u.palette.warning.main}}):(0,El.jsx)(cx.A,{sx:{width:16,height:16}})}),(0,El.jsx)(Sy,{size:"small",title:c("btn_tip_simple_style"),onMouseLeave:m,onClick:()=>i(e=>!e),sx:(0,r.A)((0,r.A)({},g),{},{"&:hover":{backgroundColor:u.palette.info.light+"20",transform:"scale(1.05)",boxShadow:u.shadows[2],"& svg":{color:u.palette.info.main}},"&:active":{transform:"scale(0.95)",backgroundColor:u.palette.info.light+"40"}}),children:n?(0,El.jsx)(lx.A,{sx:{width:16,height:16,color:u.palette.info.main}}):(0,El.jsx)(sx.A,{sx:{width:16,height:16}})}),(0,El.jsx)(Sy,{size:"small",title:c("btn_tip_dark_mode"),onMouseLeave:m,onClick:h,sx:(0,r.A)((0,r.A)({},g),{},{"&:hover":{backgroundColor:u.palette.warning.light+"20",transform:"scale(1.05)",boxShadow:u.shadows[2],"& svg":{color:u.palette.warning.main}},"&:active":{transform:"scale(0.95)",backgroundColor:u.palette.warning.light+"40"}}),children:"dark"===d?(0,El.jsx)(gx.A,{sx:{width:16,height:16,color:u.palette.warning.main}}):"auto"===d?(0,El.jsx)(vx.A,{sx:{width:16,height:16,color:u.palette.info.main}}):(0,El.jsx)(mx.A,{sx:{width:16,height:16}})}),(0,El.jsx)(Sy,{size:"small",title:c("close"),onMouseLeave:m,onClick:()=>t(!1),sx:(0,r.A)((0,r.A)({},g),{},{"&:hover":{backgroundColor:u.palette.error.light+"20",transform:"scale(1.05)",boxShadow:u.shadows[2],"& svg":{color:u.palette.error.main}},"&:active":{transform:"scale(0.95)",backgroundColor:u.palette.error.light+"40"}}),children:(0,El.jsx)(fx.A,{sx:{width:16,height:16}})})]})]})})}function NP(e){let{simpleStyle:t,text:n,setText:r,apiSlugs:i,fromLang:o,toLang:a,toLang2:s,transApis:l,langDetector:u,translateVariants:c,enDict:d,enSug:h,aiDictApiSlug:p,aiDictPromptSlug:f,prompts:m,selectionContext:g}=e;const v=bA(),y="dark"===v.palette.mode,b="dark"===v.palette.mode?"#1f1f23":v.palette.background.paper,A="dark"===v.palette.mode?EA(v.palette.text.primary,.28):EA(v.palette.text.primary,.24);return(0,El.jsx)(yA,{sx:{p:t?1:2,backgroundColor:v.palette.background.paper,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:b},"&::-webkit-scrollbar-thumb":{backgroundColor:A,borderRadius:8,border:"2px solid ".concat(v.palette.background.paper)},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:EA(v.palette.text.primary,.36)},scrollbarWidth:"thin",scrollbarColor:"".concat(A," ").concat(b),color:y?"rgba(255,255,255,0.82)":v.palette.text.primary,lineHeight:1.55},children:(0,El.jsx)(FP,{text:n,setText:r,apiSlugs:i,fromLang:o,toLang:a,toLang2:s,transApis:l,prompts:m,simpleStyle:t,langDetector:u,translateVariants:c,enDict:d,enSug:h,aiDictApiSlug:p,aiDictPromptSlug:f,selectionContext:g})})}function jP(e){const[t,n]=(0,xl.useState)(!1),r=e.simpleStyle,i=e.setSimpleStyle,o=e.hideClickAway,a=e.setHideClickAway,s=e.followSelection,u=e.setFollowSelection;let c=e.tranboxSetting.apiSlugs;return e.tranboxSetting.singleWordNoTrans&&(0,l.Ln)(e.text)&&(c=[]),(0,El.jsx)(Ib,{context:"tranbox",children:(0,El.jsx)(dA,{styles:e.extStyles,children:e.showBox&&(0,El.jsx)(OA,{position:e.boxPosition,size:e.boxSize,setSize:e.setBoxSize,setPosition:e.setBoxPosition,autoHeight:e.tranboxSetting.autoHeight,header:(0,El.jsx)(OP,{setShowBox:e.setShowBox,simpleStyle:r,setSimpleStyle:i,hideClickAway:o,setHideClickAway:a,followSelection:s,setFollowSelection:u,mouseHover:t}),onClick:e=>e.stopPropagation(),onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:(0,El.jsx)(NP,{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,prompts:e.prompts,langDetector:e.langDetector,translateVariants:e.translateVariants,enDict:e.tranboxSetting.enDict,enSug:e.tranboxSetting.enSug,aiDictApiSlug:e.tranboxSetting.aiDictApiSlug,aiDictPromptSlug:e.tranboxSetting.aiDictPromptSlug,selectionContext:e.selectionContext})})})})}function RP(e,t){const n=Math.min(e.w,TA()),r=Math.min(e.h,DA());return{size:{w:n,h:r},position:{x:(0,l.NS)(t.x,0,PA(n)),y:(0,l.NS)(t.y,0,IA(r))}}}const MP=new Map,BP=/[\u4e00-\u9fff]/g,WP=/[\u3040-\u309f]/g,UP=/[\u30a0-\u30ff]/g,HP=/[\uac00-\ud7af\u1100-\u11ff\u3130-\u318f]/g,VP=/[\u0400-\u04ff]/g,GP=/[\u0370-\u03ff]/g,KP=/[a-zA-Z]/g,qP=new Set("国华门车东发风见机体为还这各个样时经长运边开来后别问应当设过对给现进们动两从远义学话谁网达问题单数业农产说认门".split("")),YP=new Set("國華門車東發風見機體為還這各個樣時經長運邊開來後別問應當設過對給現進們動兩從遠義學話誰網達問題單數業農產說認門".split(""));function XP(e){const t=t=>(e.match(t)||[]).length,n=t(BP),r=t(WP),i=t(UP),o=t(HP),a=t(VP),s=t(GP),l=t(KP);return r>0||i>0?"ja":o>0?"ko":a>0?"ru":s>0?"el":n>0?function(e){let t=0,n=0;for(const r of e)YP.has(r)?t++:qP.has(r)&&n++;return t>n?"zh-TW":"zh-CN"}(e):function(e,t){if(!t)return"";const n=e.toLowerCase(),r=e=>(n.match(e)||[]).length,i={en:0,de:0,fr:0,es:0};i.en+=r(/\b(the|and|is|of|to|in|that|it|you|for|with|on)\b/g),i.de+=r(/\b(der|die|das|und|ist|nicht|ein|eine|mit|auf|ich)\b/g)+r(/[äöüß]/g),i.fr+=r(/\b(le|la|les|de|des|et|un|une|est|que|pour)\b/g)+r(/[çœàâêîôûëïü]/g),i.es+=r(/\b(el|la|los|las|de|que|y|no|en|un|por|es)\b/g)+r(/[ñ¿¡]/g);let o="",a=0;for(const[e,t]of Object.entries(i))t>a&&(o=e,a=t);return a>=2?o:""}(e,l)||""}const $P=async e=>{if("string"!=typeof e||!e.trim())return"";const t=e.length<=300?e:e.slice(0,300);if(MP.has(t))return MP.get(t);const n=e.slice(0,300);let r=XP(n);if(!r)try{var i,o,a,s;const e=await Promise.race([Promise.resolve(null===$t.T||void 0===$t.T||null===(i=$t.T.i18n)||void 0===i||null===(o=i.detectLanguage)||void 0===o?void 0:o.call(i,n)),new Promise((e,t)=>setTimeout(()=>t(new Error("detect timeout")),100))]),t=null==e||null===(a=e.languages)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.language,l=W(t);l&&(null!=e&&e.isReliable||/^zh(?:[-_]|$)/i.test(t))&&(r=l)}catch(e){(0,ht.h9)("detect lang fast",e)}return function(e,t){if(MP.size>=100){const e=MP.keys().next().value;MP.delete(e)}MP.set(e,t)}(t,r||""),r||""};const JP=Na?32:20,QP=Na?16:12;function ZP(e){var t,n;const r=(null==e||null===(t=e.changedTouches)||void 0===t?void 0:t[0])||(null==e||null===(n=e.touches)||void 0===n?void 0:n[0]);return"number"==typeof(null==r?void 0:r.pageX)&&"number"==typeof(null==r?void 0:r.pageY)?{x:r.pageX,y:r.pageY}:"number"==typeof(null==e?void 0:e.pageX)&&"number"==typeof(null==e?void 0:e.pageY)?{x:e.pageX,y:e.pageY}:null}function eI(e,t,n){const r=Math.max(t,n);return Math.min(Math.max(e,t),r)}function tI(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e)return null;const n=Number(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)||0,r=Number(t)||0,i=window.scrollX,o=window.scrollY,a=i+window.innerWidth,s=o+window.innerHeight;let l=e.x+QP+n,u=e.y+QP+r;l+JP>a&&(l=e.x-QP-JP+n),u+JP>s&&(u=e.y-QP-JP+r);return{x:eI(l,i,a-JP)-n,y:eI(u,o,s-JP)-r}}function nI(e){return"function"==typeof(null==e?void 0:e.composedPath)?e.composedPath():[]}function rI(e){var t;return(null===(t=nI(e))||void 0===t?void 0:t[0])||(null==e?void 0:e.target)}function iI(e){var t;const n=rI(e),r=null==n||null===(t=n.getRootNode)||void 0===t?void 0:t.call(n);return null!=r&&r.getSelection?r:document}function oI(e){return nI(e).some(e=>{var t,n;return(null==e?void 0:e.id)===o.Reo.boxID||(null==e||null===(t=e.classList)||void 0===t||null===(n=t.contains)||void 0===n?void 0:n.call(t,"".concat(o.Reo.boxID,"_wrapper")))})}function aI(e){return nI(e).some(e=>{return t=e,Boolean(null==t||null===(n=t.closest)||void 0===n?void 0:n.call(t,'button, input, textarea, select, [role="tab"], [role="button"]'));var t,n})}function sI(e){return!!e&&Boolean(e.width||e.height||e.left||e.right||e.top||e.bottom)}function lI(e,t,n,r){const i=(e.left+e.right)/2+t,o=e.bottom+n,a=IA(r.h),s=o+_A(r.h)>window.innerHeight?e.top-_A(r.h)-n:o;return{x:(0,l.NS)(i,0,PA(r.w)),y:(0,l.NS)(s,0,a)}}function uI(e){var t;const n=(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null==e?void 0:e.parentElement,r=null==n||null===(t=n.closest)||void 0===t?void 0:t.call(n,"p, li, blockquote, article, section, main, div");return((null==r?void 0:r.textContent)||(null==n?void 0:n.textContent)||"").replace(/\s+/g," ").trim().slice(0,1e3)}function cI(e){try{var t;if(!e||0===e.rangeCount)return"";const n=e.getRangeAt(0).commonAncestorContainer,r=n.nodeType===Node.ELEMENT_NODE?n:n.parentElement,i=null==r||null===(t=r.closest)||void 0===t?void 0:t.call(r,"p, li, blockquote, article, section, main, div");return i?((null==i?void 0:i.textContent)||(null==r?void 0:r.textContent)||"").replace(/\s+/g," ").trim().slice(0,1e3):""}catch(e){return""}}function dI(e){let{tranboxSetting:t,followSelection:n,boxOffsetX:r,boxOffsetY:i,boxSize:a,setBoxPosition:s,hideClickAway:u}=e;const{hideTranBtn:c=!1,triggerMode:d,btnPositionMode:h=o.vcx,btnOffsetX:p=0,btnOffsetY:f=0,tranboxInteractMode:m="-",skipLangs:g=[]}=t,[v,y]=(0,xl.useState)(!1),[b,A]=(0,xl.useState)(!1),[x,w]=(0,xl.useState)(""),[k,S]=(0,xl.useState)(""),[E,C]=(0,xl.useState)(""),[_,T]=(0,xl.useState)({x:0,y:0}),D=(0,xl.useRef)(document),P=(0,xl.useRef)(null),I=(0,xl.useCallback)(()=>{var e,t;return(null===(e=D.current)||void 0===e||null===(t=e.getSelection)||void 0===t?void 0:t.call(e))||window.getSelection()},[]);!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>window.getSelection();(0,xl.useEffect)(()=>{if(!e)return;const r=e=>{2===e.button&&t(!1)},i=()=>{const e=n();e&&!e.isCollapsed||t(!1)};return window.addEventListener("mousedown",r,!0),document.addEventListener("selectionchange",i),()=>{window.removeEventListener("mousedown",r,!0),document.removeEventListener("selectionchange",i)}},[e,t,n])}(b,A,I);const F=(0,xl.useCallback)(e=>{null!=e&&e.text&&(P.current=e,w(e.text),C(e.context),A(!1),S(e.text),y(!0))},[]),L=(0,xl.useCallback)(e=>{const t=P.current,n=e&&(null==t?void 0:t.text)!==e?{text:e,context:"",source:"manual"}:t||{text:x,context:"",source:"manual"};F(n)},[F,x]),z=(0,xl.useCallback)((e,t,n,r)=>{var i;const o=(null==e||null===(i=e.toString())||void 0===i?void 0:i.trim())||"";if(!o)return null;const a=function(e){try{if(!e||0===e.rangeCount)return null;const t=e.getRangeAt(0),n=t.getBoundingClientRect(),r=t.getClientRects();return{rect:n,lastRect:r.length>0?r[r.length-1]:n}}catch(e){return null}}(e),s=sI(null==a?void 0:a.rect)?a.rect:null,l=sI(null==a?void 0:a.lastRect)?a.lastRect:s;return{text:o,context:cI(e)||uI(r),pointerPosition:t,source:n,rect:s,lastRect:l}},[]),O=(0,xl.useCallback)(async e=>{if((e=>!("string"!=typeof e||!e.trim())&&/^[\d\s.,,、\-/::%]+$/.test(e.trim())&&/\d/.test(e))(e))return!0;if("string"!=typeof e||!e.trim())return!1;const t=XP(e);if(e.length<4&&!t)return!1;const n=t||await $P(e);if(!n)return!1;const r=(e=>"string"==typeof e&&e?/^zh(-|$)/i.test(e)?"zh":e:"")(n);return!!g.includes(r)},[g]),N=(0,xl.useCallback)(async e=>{if(null==e||!e.text)return void A(!1);if(P.current=e,w(e.text),await O(e.text))return A(!1),void y(!1);if("panel"===e.source&&"-"!==m)return;if(e.rect&&n&&s(lI(e.rect,r,i,a)),d===o.TPN||d===o.VhI)return void F(e);if(c)return void A(!1);const t=h===o.uxg&&e.pointerPosition?tI(e.pointerPosition,p,f):((l=e.lastRect)?{x:l.right+window.scrollX,y:l.bottom+window.scrollY}:null)||tI(e.pointerPosition,p,f);var l;t?(A(!0),T(t)):A(!1)},[c,d,m,h,p,f,n,r,i,F,a,s,O]),j=(0,xl.useCallback)(async e=>{var t;if(2===e.button)return;if(function(e){return nI(e).some(e=>{var t,n;return null==e||null===(t=e.classList)||void 0===t||null===(n=t.contains)||void 0===n?void 0:n.call(t,"KT-tranbtn")})}(e))return;const n=oI(e);if(n&&aI(e))return;const r=rI(e),i=n?iI(e):document,o=ZP(e);await(0,l.yy)(n?0:200),D.current=i;const a=n?null===(t=i.getSelection)||void 0===t?void 0:t.call(i):window.getSelection(),s=z(a,o,n?"panel":"page",r);await N(s)},[z,N]),R=(0,xl.useCallback)(()=>{var e,t,o,l;A(!1);let u=window.getSelection(),c=z(u,null,"page");var d,h;null!==(e=c)&&void 0!==e&&e.text||!D.current||(u=(null===(d=(h=D.current).getSelection)||void 0===d?void 0:d.call(h))||window.getSelection(),c=z(u,null,"page"));null!==(t=c)&&void 0!==t&&t.text||null===(o=P.current)||void 0===o||!o.text||(c=P.current),null!==(l=c)&&void 0!==l&&l.text?(D.current=document,c.rect&&n&&s(lI(c.rect,r,i,a)),F(c)):y(e=>!e)},[n,r,i,s,a,z,F]),M=(0,xl.useMemo)(()=>Na?"onTouchEnd":d===o.XZv?"onMouseOver":"onMouseUp",[d]);return(0,xl.useEffect)(()=>{let e;return e=d===o.VhI?"dblclick":Na?"touchend":"mouseup",window.addEventListener(e,j),()=>{window.removeEventListener(e,j)}},[j,d]),(0,xl.useEffect)(()=>{if(!u)return;const e=()=>{const e=window.getSelection();e&&""!==e.toString().trim()||y(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}},[u]),(0,xl.useEffect)(()=>{if(m!==o.BQZ&&m!==o.fFq)return;const e=m===o.fFq?"dblclick":"mouseup";function t(e){var t;if(!oI(e))return;const n=rI(e),r=iI(e),i=(null===(t=r.getSelection)||void 0===t?void 0:t.call(r))||window.getSelection(),o=z(i,ZP(e),"panel",n);F(o)}return document.addEventListener(e,t,!0),()=>{document.removeEventListener(e,t,!0)}},[m,z,F]),{showBox:v,setShowBox:y,showBtn:b,setShowBtn:A,selectedText:x,setSelText:w,text:k,setText:S,textContext:E,position:_,setPosition:T,handleOpenTranbox:L,handleToggleTranbox:R,btnEvent:M}}function hI(e){let{contextMenuType:t,tranboxSetting:n,transApis:i,prompts:u,uiLang:c,langDetector:d,translateVariants:h=!0}=e;const{boxSize:p,setBoxSize:f,boxPosition:m,setBoxPosition:g,simpleStyle:v,setSimpleStyle:y,hideClickAway:b,setHideClickAway:A,followSelection:x,setFollowSelection:w,boxOffsetX:k,boxOffsetY:S}=function(e){const{simpleStyle:t=!1,hideClickAway:n=!1,followSelection:i=!1,boxOffsetX:o=0,boxOffsetY:u=10}=e,c=TA(),d=Na||t?400:(0,l.NS)(window.innerWidth,400,800),h=Math.min(d,c),p=DA(),f=Na||t?200:(0,l.NS)(p,200,600),m=Math.min(f,p),g=(0,xl.useRef)({w:h,h:m}),v=(0,xl.useRef)({x:(window.innerWidth-CA(h))/2,y:(window.innerHeight-_A(m))/2}),[y,b]=(0,xl.useState)(g.current),[A,x]=(0,xl.useState)(v.current),[w,k]=(0,xl.useState)(t),[S,E]=(0,xl.useState)(n),[C,_]=(0,xl.useState)(i);return(0,xl.useEffect)(()=>{(async()=>{try{const{w:e,h:t,x:n,y:r}=await(0,a.FX)()||{},i=RP({w:void 0!==e?e:g.current.w,h:void 0!==t?t:g.current.h},{x:void 0!==n?n:v.current.x,y:void 0!==r?r:v.current.y});void 0!==e&&void 0!==t&&b(i.size),void 0!==n&&void 0!==r&&x(i.position)}catch(e){}})()},[]),(0,xl.useEffect)(()=>{function e(){const e=RP(y,A);b(e.size),x(e.position)}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[y,A]),(0,xl.useEffect)(()=>{!s&&y.w>0&&y.h>0&&(0,a.Fb)((0,r.A)((0,r.A)({},y),A))},[y,A]),{boxSize:y,setBoxSize:b,boxPosition:A,setBoxPosition:x,simpleStyle:w,setSimpleStyle:k,hideClickAway:S,setHideClickAway:E,followSelection:C,setFollowSelection:_,boxOffsetX:o,boxOffsetY:u}}(n),{showBox:E,setShowBox:C,showBtn:_,text:T,setText:D,textContext:P,position:I,handleOpenTranbox:F,handleToggleTranbox:L,btnEvent:z}=dI({tranboxSetting:n,followSelection:x,boxOffsetX:k,boxOffsetY:S,boxSize:p,setBoxPosition:g,hideClickAway:b});return function(e){let{showBox:t,setShowBox:n,handleToggleTranbox:r,handleOpenTranbox:i,contextMenuType:a,uiLang:s}=e;const l=xx(s),u=(0,xl.useCallback)(()=>{t?n(!1):r()},[t,r,n]);(0,xl.useEffect)(()=>{const e=e=>{var t;if((null===(t=e.detail)||void 0===t?void 0:t.action)===o.GRp){var n,r,a;const t=null===(n=e.detail)||void 0===n||null===(r=n.args)||void 0===r||null===(a=r.text)||void 0===a?void 0:a.trim();if(t)return void(null==i||i(t));u()}};return document.addEventListener(o.nRB,e),()=>{document.removeEventListener(o.nRB,e)}},[u,i]),(0,xl.useEffect)(()=>{if(V.Zy)try{var e,t;const n=[];return 0!==a&&n.push(null===(e=(t=GM).registerMenuCommand)||void 0===e?void 0:e.call(t,l("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){(0,ht.h9)("registerMenuCommand",e)}},[r,a,l])}({showBox:E,setShowBox:C,handleOpenTranbox:F,handleToggleTranbox:L,contextMenuType:t,uiLang:c}),(0,El.jsxs)(El.Fragment,{children:[(0,El.jsx)(jP,{showBox:E,text:T,setText:D,boxSize:p,setBoxSize:f,boxPosition:m,setBoxPosition:g,tranboxSetting:n,transApis:i,prompts:u,setShowBox:C,simpleStyle:v,setSimpleStyle:y,hideClickAway:b,setHideClickAway:A,followSelection:x,setFollowSelection:w,langDetector:d,translateVariants:h,selectionContext:P}),_&&(0,El.jsx)(lv,{position:I,btnOffsetX:n.btnOffsetX,btnOffsetY:n.btnOffsetY,btnEvent:z,onTrigger:e=>{e.stopPropagation(),F()}})]})}function pI(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.A)((0,r.A)({},e),{},{transApis:(0,o.Pco)(e.transApis,e.prompts,e.subtitleSetting)})}var fI=(0,Qt.A)("container"),mI=(0,Qt.A)("reactRoot"),gI=(0,Qt.A)("shadowContainer"),vI=(0,Qt.A)("cache"),yI=(0,Qt.A)("props"),bI=(0,Qt.A)("render");class AI{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,bI,{value:xI}),Object.defineProperty(this,fI,{writable:!0,value:null}),Object.defineProperty(this,mI,{writable:!0,value:null}),Object.defineProperty(this,gI,{writable:!0,value:null}),Object.defineProperty(this,vI,{writable:!0,value:null}),Object.defineProperty(this,yI,{writable:!0,value:{}}),(0,Jt.A)(this,yI)[yI]=pI(e);const{tranboxSetting:t=o.Azs}=(0,Jt.A)(this,yI)[yI];null!=t&&t.transOpen&&this.enable()}isEnabled(){return!!(0,Jt.A)(this,fI)[fI]&&document.body.contains((0,Jt.A)(this,fI)[fI])}enable(){if(!this.isEnabled()){(0,Jt.A)(this,fI)[fI]=document.createElement("div"),(0,Jt.A)(this,fI)[fI].id=o.Reo.boxID,(0,Jt.A)(this,fI)[fI].className="notranslate",document.body.appendChild((0,Jt.A)(this,fI)[fI]),(0,Jt.A)(this,gI)[gI]=(0,Jt.A)(this,fI)[fI].attachShadow({mode:"open"});const e=document.createElement("div");e.className="".concat(o.Reo.boxID,"_wrapper notranslate"),(0,Jt.A)(this,gI)[gI].appendChild(e),(0,Jt.A)(this,vI)[vI]=(0,Sl.A)({key:o.Reo.boxID,prepend:!0,container:(0,Jt.A)(this,gI)[gI]}),(0,Jt.A)(this,mI)[mI]=wl.createRoot(e),(0,Jt.A)(this,bI)[bI]()}}disable(){this.isEnabled()&&(0,Jt.A)(this,mI)[mI]&&((0,Jt.A)(this,mI)[mI].unmount(),(0,Jt.A)(this,fI)[fI].remove(),(0,Jt.A)(this,fI)[fI]=null,(0,Jt.A)(this,mI)[mI]=null,(0,Jt.A)(this,gI)[gI]=null,(0,Jt.A)(this,vI)[vI]=null)}toggle(){this.isEnabled()?this.disable():this.enable()}update(e){var t,n;((0,Jt.A)(this,yI)[yI]=pI((0,r.A)((0,r.A)({},(0,Jt.A)(this,yI)[yI]),e)),this.isEnabled())?null!==(n=(0,Jt.A)(this,yI)[yI].tranboxSetting)&&void 0!==n&&n.transOpen?(0,Jt.A)(this,bI)[bI]():this.disable():null!==(t=(0,Jt.A)(this,yI)[yI].tranboxSetting)&&void 0!==t&&t.transOpen&&this.enable()}}function xI(){(0,Jt.A)(this,mI)[mI]&&(0,Jt.A)(this,vI)[vI]&&(0,Jt.A)(this,mI)[mI].render((0,El.jsx)(xl.StrictMode,{children:(0,El.jsx)(kl.C,{value:(0,Jt.A)(this,vI)[vI],children:(0,El.jsx)(hI,(0,r.A)({},(0,Jt.A)(this,yI)[yI]))})}))}var wI=(0,Qt.A)("hostElement"),kI=(0,Qt.A)("reactRoot"),SI=(0,Qt.A)("isVisible"),EI=(0,Qt.A)("isProcessing"),CI=(0,Qt.A)("mount");class _I{constructor(e){let{id:t,className:n="",reactComponent:r,props:i={},rootElement:o=document.body}=e;if(Object.defineProperty(this,CI,{value:TI}),Object.defineProperty(this,wI,{writable:!0,value:null}),Object.defineProperty(this,kI,{writable:!0,value:null}),Object.defineProperty(this,SI,{writable:!0,value:!1}),Object.defineProperty(this,EI,{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(0,Jt.A)(this,SI)[SI]}show(e){if(!(0,Jt.A)(this,SI)[SI]&&!(0,Jt.A)(this,EI)[EI]){if(!(0,Jt.A)(this,wI)[wI]){(0,Jt.A)(this,EI)[EI]=!0;try{(0,Jt.A)(this,CI)[CI](e||this._props)}catch(e){return ht.vF.warn('Failed to mount component with id "'.concat(this._id,'":'),e),void((0,Jt.A)(this,EI)[EI]=!1)}finally{(0,Jt.A)(this,EI)[EI]=!1}}(0,Jt.A)(this,wI)[wI].style.display="",(0,Jt.A)(this,SI)[SI]=!0}}hide(){(0,Jt.A)(this,SI)[SI]&&(0,Jt.A)(this,wI)[wI]&&((0,Jt.A)(this,wI)[wI].style.display="none",(0,Jt.A)(this,SI)[SI]=!1)}destroy(){(0,Jt.A)(this,wI)[wI]&&((0,Jt.A)(this,EI)[EI]=!0,(0,Jt.A)(this,kI)[kI]&&(0,Jt.A)(this,kI)[kI].unmount(),(0,Jt.A)(this,wI)[wI].remove(),(0,Jt.A)(this,wI)[wI]=null,(0,Jt.A)(this,kI)[kI]=null,(0,Jt.A)(this,SI)[SI]=!1,(0,Jt.A)(this,EI)[EI]=!1,ht.vF.info('Component with id "'.concat(this._id,'" has been destroyed.')))}toggle(e){(0,Jt.A)(this,SI)[SI]?this.hide():this.show(e||this._props)}}function TI(e){const t=document.createElement("div");t.id=this._id,this._className&&(t.className=this._className),this._rootElement.appendChild(t),(0,Jt.A)(this,wI)[wI]=t;const n=t.attachShadow({mode:"open"}),i=document.createElement("div");i.className="".concat(this._id,"_wrapper notranslate"),n.appendChild(i);const o=(0,Sl.A)({key:this._id,prepend:!0,container:n}),a=(0,r.A)((0,r.A)({},e),{},{onClose:this.hide.bind(this)}),s=this._ReactComponent;(0,Jt.A)(this,kI)[kI]=wl.createRoot(i),(0,Jt.A)(this,kI)[kI].render((0,El.jsx)(xl.StrictMode,{children:(0,El.jsx)(kl.C,{value:o,children:(0,El.jsx)(s,(0,r.A)({},a))})}))}const DI=["children","usePaper"],PI=["left","right","top","bottom"],II=e=>{let{x:t,y:n,width:r,height:i,windowWidth:o,windowHeight:a}=e;const s=o-t-r,l=a-n-i;switch(Math.min(t,n,s,l)){case s:return"right";case t:return"left";case l:return"bottom";default:return"top"}},FI=e=>{let{x:t,y:n,width:r,height:i,windowWidth:o,windowHeight:a,hover:s,edge:l}=e;switch(l){case"right":t=s?o-r:o-r/2;break;case"left":t=s?0:-r/2;break;case"bottom":n=s?a-i:a-i/2;break;default:n=s?0:-i/2}return{x:t,y:n}};function LI(e){let{children:t,usePaper:n}=e,i=(0,Y.A)(e,DI);return n?(0,El.jsx)(zv,(0,r.A)((0,r.A)({},i),{},{elevation:4,children:t})):(0,El.jsx)("div",(0,r.A)((0,r.A)({},i),{},{children:t}))}function zI(e){let{windowSize:{w:t,h:n},width:i,height:o,left:s,top:u,edge:c,show:d=!0,snapEdge:h,onStart:p,onMove:f,handler:m,children:g,usePaper:v}=e;const[y,b]=(0,xl.useState)(!1),[A,x]=(0,xl.useState)(null),[w,k]=(0,xl.useState)(PI.includes(c)?c:null),S=(0,xl.useRef)(null),E=(0,xl.useRef)(!1),C=(0,xl.useRef)({x:s/t,y:u/n}),_=(0,xl.useRef)(w),[T,D]=(0,xl.useState)({x:s/t,y:u/n}),P=(0,xl.useMemo)(()=>(0,l.sg)(a.Bb,500),[]),I=(0,xl.useCallback)((e,t)=>{S.current&&(S.current.style.transform="translate(".concat(e,"px, ").concat(t,"px)"))},[]);(0,xl.useEffect)(()=>{C.current=T},[T]),(0,xl.useEffect)(()=>{_.current=w},[w]),(0,xl.useEffect)(()=>{const e=()=>{if(!S.current)return;const{x:e,y:t}=C.current,n=document.documentElement.clientWidth,a=document.documentElement.clientHeight,s={x:e*n,y:t*a};if(h&&_.current){const e=FI((0,r.A)((0,r.A)({},s),{},{width:i,height:o,windowWidth:n,windowHeight:a,hover:y,edge:_.current}));return void I(e.x,e.y)}I(s.x,s.y)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[I,o,y,h,i]),(0,xl.useEffect)(()=>{if(!h||A)return;const e={x:T.x*t,y:T.y*n},a=w||II((0,r.A)((0,r.A)({},e),{},{width:i,height:o,windowWidth:t,windowHeight:n}));w||(k(a),_.current=a);const s=FI((0,r.A)((0,r.A)({},e),{},{width:i,height:o,windowWidth:t,windowHeight:n,hover:y,edge:a}));I(s.x,s.y);const l={x:s.x/t,y:s.y/n};D(l),P((0,r.A)((0,r.A)({},s),{},{edge:a}))},[w,A,y,i,o,t,n,h,P,T.x,T.y,I]);const F=e=>{var r;!Na&&e.target.setPointerCapture(e.pointerId),p&&p(),E.current=!1;const i=null===(r=S.current)||void 0===r?void 0:r.getBoundingClientRect(),o=i?i.left:T.x*t,a=i?i.top:T.y*n,{clientX:s,clientY:l}=Na?e.targetTouches[0]:e;x({x:o,y:a,clientX:s,clientY:l})},L=e=>{if(f&&f(),!A)return;E.current=!0;const{clientX:r,clientY:a}=Na?e.targetTouches[0]:e,s=r-A.clientX,u=a-A.clientY;let c=A.x+s,d=A.y+u;c=(0,l.NS)(c,-i/2,t-i/2),d=(0,l.NS)(d,0,n-o/2),I(c,d);const h={x:c/t,y:d/n};D(h),C.current=h},z=e=>{if(e.stopPropagation(),h&&E.current){const e={x:C.current.x*t,y:C.current.y*n},a=II((0,r.A)((0,r.A)({},e),{},{width:i,height:o,windowWidth:t,windowHeight:n}));k(a),_.current=a}x(null)},O=(0,xl.useMemo)(()=>h?y||A?1:.2:A?.8:1,[A,h,y]),N=Na?{onTouchStart:F,onTouchMove:L,onTouchEnd:z}:{onPointerDown:F,onPointerMove:L,onPointerUp:z};return(0,El.jsx)("div",{ref:S,style:{opacity:O,position:"fixed",top:0,left:0,zIndex:2147483647,display:d?"block":"none",willChange:"transform"},onMouseEnter:e=>{e.stopPropagation(),b(!0)},onMouseLeave:e=>{e.stopPropagation(),b(!1)},onClick:e=>{e.stopPropagation()},children:(0,El.jsxs)(LI,{usePaper:v,children:[(0,El.jsx)("div",(0,r.A)((0,r.A)({style:{touchAction:"none"}},N),{},{children:m})),(0,El.jsx)("div",{children:g})]})})}var OI=i(1852),NI=i(785);function jI(e){let{onClose:t,toggleTab:n,openSeparateWindow:r}=e;const i=wx();return(0,El.jsxs)(ax,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,El.jsxs)(ax,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[(0,El.jsx)(Sy,{onClick:()=>{window.open("https://github.com/fishjar/kiss-translator","_blank")},children:(0,El.jsx)(OI.A,{})}),(0,El.jsx)(hb,{component:"div",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.32")})]}),t?(0,El.jsx)(Sy,{onClick:()=>{t()},children:(0,El.jsx)(fx.A,{})}):(0,El.jsxs)(ax,{direction:"row",alignItems:"center",title:i("toggle_transbox"),children:[(0,El.jsx)(Sy,{onClick:n,children:(0,El.jsx)(NI.A,{})}),(0,El.jsx)(Sy,{onClick:r,title:i("open_separate_window"),children:(0,El.jsx)(ux.A,{})})]})]})}const RI=function(){const[e,t]=(0,xl.useState)({w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}),n=My(()=>{t({w:document.documentElement.clientWidth,h:document.documentElement.clientHeight})},200);return(0,xl.useEffect)(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[n]),e};function MI(e){return(0,Pv.Ay)("MuiFormControlLabel",e)}const BI=(0,Dv.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),WI=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],UI=(0,fv.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(BI.label)]:t.label},t.root,t["labelPlacement".concat((0,_v.A)(n.labelPlacement))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(BI.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(BI.label)]:{["&.".concat(BI.disabled)]:{color:(t.vars||t).palette.text.disabled}}})}),HI=(0,fv.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(BI.error)]:{color:(t.vars||t).palette.error.main}}}),VI=xl.forwardRef(function(e,t){var n,r;const i=(0,mv.b)({props:e,name:"MuiFormControlLabel"}),{className:o,componentsProps:a={},control:s,disabled:l,disableTypography:u,label:c,labelPlacement:d="end",required:h,slotProps:p={}}=i,f=(0,uv.A)(i,WI),m=zx(),g=null!=(n=null!=l?l:s.props.disabled)?n:null==m?void 0:m.disabled,v=null!=h?h:s.props.required,y={disabled:g,required:v};["checked","name","onChange","value","inputRef"].forEach(e=>{void 0===s.props[e]&&void 0!==i[e]&&(y[e]=i[e])});const b=Fx({props:i,muiFormControl:m,states:["error"]}),A=(0,cv.A)({},i,{disabled:g,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,_v.A)(r)),i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return(0,hv.A)(a,MI,t)})(A),w=null!=(r=p.typography)?r:a.typography;let k=c;return null==k||k.type===hb||u||(k=(0,El.jsx)(hb,(0,cv.A)({component:"span"},w,{className:(0,dv.A)(x.label,null==w?void 0:w.className),children:k}))),(0,El.jsxs)(UI,(0,cv.A)({className:(0,dv.A)(x.root,o),ownerState:A,ref:t},f,{children:[xl.cloneElement(s,y),v?(0,El.jsxs)(ax,{display:"block",children:[k,(0,El.jsxs)(HI,{ownerState:A,"aria-hidden":!0,className:x.asterisk,children:[" ","*"]})]}):k]}))});function GI(e){return(0,Pv.Ay)("PrivateSwitchBase",e)}(0,Dv.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const KI=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],qI=(0,fv.Ay)(yy,{name:"MuiSwitchBase"})(e=>{let{ownerState:t}=e;return(0,cv.A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})}),YI=(0,fv.Ay)("input",{name:"MuiSwitchBase",shouldForwardProp:Yx.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),XI=xl.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:i,className:o,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:u=!1,icon:c,id:d,inputProps:h,inputRef:p,name:f,onBlur:m,onChange:g,onFocus:v,readOnly:y,required:b=!1,tabIndex:A,type:x,value:w}=e,k=(0,uv.A)(e,KI),[S,E]=(0,FS.A)({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),C=zx();let _=s;C&&void 0===_&&(_=C.disabled);const T="checkbox"===x||"radio"===x,D=(0,cv.A)({},e,{checked:S,disabled:_,disableFocusRipple:l,edge:u}),P=(e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&"edge".concat((0,_v.A)(i))],input:["input"]};return(0,hv.A)(o,GI,t)})(D);return(0,El.jsxs)(qI,(0,cv.A)({component:"span",className:(0,dv.A)(P.root,o),centerRipple:!0,focusRipple:!l,disabled:_,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),C&&C.onFocus&&C.onFocus(e)},onBlur:e=>{m&&m(e),C&&C.onBlur&&C.onBlur(e)},ownerState:D,ref:t},k,{children:[(0,El.jsx)(YI,(0,cv.A)({autoFocus:n,checked:r,defaultChecked:a,className:P.input,disabled:_,id:T?d:void 0,name:f,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;E(t),g&&g(e,t)},readOnly:y,ref:p,required:b,ownerState:D,tabIndex:A,type:x},"checkbox"===x&&void 0===w?{}:{value:w},h)),S?i:c]}))}),$I=XI;function JI(e){return(0,Pv.Ay)("MuiSwitch",e)}const QI=(0,Dv.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),ZI=["className","color","edge","size","sx"],eF=(0,fv.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t["edge".concat((0,_v.A)(n.edge))],t["size".concat((0,_v.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(QI.thumb)]:{width:16,height:16},["& .".concat(QI.switchBase)]:{padding:4,["&.".concat(QI.checked)]:{transform:"translateX(16px)"}}}}]}),tF=(0,fv.Ay)($I,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{["& .".concat(QI.input)]:t.input},"default"!==n.color&&t["color".concat((0,_v.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(QI.checked)]:{transform:"translateX(20px)"},["&.".concat(QI.disabled)]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:"".concat("light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600])},["&.".concat(QI.checked," + .").concat(QI.track)]:{opacity:.5},["&.".concat(QI.disabled," + .").concat(QI.track)]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:"".concat("light"===t.palette.mode?.12:.2)},["& .".concat(QI.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,pv.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(QI.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,pv.X4)(t.palette[n].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(QI.disabled)]:{color:t.vars?t.vars.palette.Switch["".concat(n,"DisabledColor")]:"".concat("light"===t.palette.mode?(0,pv.a)(t.palette[n].main,.62):(0,pv.e$)(t.palette[n].main,.55))}},["&.".concat(QI.checked," + .").concat(QI.track)]:{backgroundColor:(t.vars||t).palette[n].main}}}})]}}),nF=(0,fv.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)}}),rF=(0,fv.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%"}}),iF=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiSwitch"}),{className:r,color:i="primary",edge:o=!1,size:a="medium",sx:s}=n,l=(0,uv.A)(n,ZI),u=(0,cv.A)({},n,{color:i,edge:o,size:a}),c=(e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:a}=e,s={root:["root",n&&"edge".concat((0,_v.A)(n)),"size".concat((0,_v.A)(r))],switchBase:["switchBase","color".concat((0,_v.A)(i)),o&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,hv.A)(s,JI,t);return(0,cv.A)({},t,l)})(u),d=(0,El.jsx)(rF,{className:c.thumb,ownerState:u});return(0,El.jsxs)(eF,{className:(0,dv.A)(c.root,r),sx:s,ownerState:u,children:[(0,El.jsx)(tF,(0,cv.A)({type:"checkbox",icon:d,checkedIcon:d,ref:t,ownerState:u},l,{classes:(0,cv.A)({},c,{root:c.switchBase})})),(0,El.jsx)(nF,{className:c.track,ownerState:u})]})}),oF=iF;function aF(e){return(0,Pv.Ay)("MuiButton",e)}const sF=(0,Dv.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 lF=xl.createContext({});const uF=xl.createContext(void 0),cF=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],dF=e=>(0,cv.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}}),hF=(0,fv.Ay)(yy,{shouldForwardProp:e=>(0,Yx.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,_v.A)(n.color))],t["size".concat((0,_v.A)(n.size))],t["".concat(n.variant,"Size").concat((0,_v.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,cv.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,cv.A)({textDecoration:"none",backgroundColor:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,pv.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,pv.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,pv.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,cv.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),["&.".concat(sF.focusVisible)]:(0,cv.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),["&.".concat(sF.disabled)]:(0,cv.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,pv.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(sF.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(sF.disabled)]:{boxShadow:"none"}}}),pF=(0,fv.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t["iconSize".concat((0,_v.A)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,cv.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},dF(t))}),fF=(0,fv.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t["iconSize".concat((0,_v.A)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,cv.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},dF(t))}),mF=xl.forwardRef(function(e,t){const n=xl.useContext(lF),r=xl.useContext(uF),i=(0,XA.A)(n,e),o=(0,mv.b)({props:i,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:u,disabled:c=!1,disableElevation:d=!1,disableFocusRipple:h=!1,endIcon:p,focusVisibleClassName:f,fullWidth:m=!1,size:g="medium",startIcon:v,type:y,variant:b="text"}=o,A=(0,uv.A)(o,cF),x=(0,cv.A)({},o,{color:s,component:l,disabled:c,disableElevation:d,disableFocusRipple:h,fullWidth:m,size:g,type:y,variant:b}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e,s={root:["root",o,"".concat(o).concat((0,_v.A)(t)),"size".concat((0,_v.A)(i)),"".concat(o,"Size").concat((0,_v.A)(i)),"color".concat((0,_v.A)(t)),n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon","iconSize".concat((0,_v.A)(i))],endIcon:["icon","endIcon","iconSize".concat((0,_v.A)(i))]},l=(0,hv.A)(s,aF,a);return(0,cv.A)({},a,l)})(x),k=v&&(0,El.jsx)(pF,{className:w.startIcon,ownerState:x,children:v}),S=p&&(0,El.jsx)(fF,{className:w.endIcon,ownerState:x,children:p}),E=r||"";return(0,El.jsxs)(hF,(0,cv.A)({ownerState:x,className:(0,dv.A)(n.className,w.root,u,E),component:l,disabled:c,focusRipple:!h,focusVisibleClassName:(0,dv.A)(w.focusVisible,f),ref:t,type:y},A,{classes:w,children:[k,a,S]}))}),gF=mF;const vF=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,$v.A)();xl.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,Sx.A)((e,t)=>{null==r||r(e,t)}),l=(0,Sx.A)(e=>{r&&null!=e&&a.start(e,()=>{s(null,"timeout")})});xl.useEffect(()=>(i&&l(t),a.clear),[i,t,l,a]);const u=a.clear,c=xl.useCallback(()=>{null!=t&&l(null!=o?o:.5*t)},[t,o,l]),d=e=>t=>{const n=e.onFocus;null==n||n(t),u()},h=e=>t=>{const n=e.onMouseEnter;null==n||n(t),u()},p=e=>t=>{const n=e.onMouseLeave;null==n||n(t),c()};return xl.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",c),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",c),window.removeEventListener("blur",u)}},[n,i,c,u]),{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,cv.A)({},Av(e),Av(t));return(0,cv.A)({role:"presentation"},t,n,{onBlur:(r=n,e=>{const t=r.onBlur;null==t||t(e),c()}),onFocus:d(n),onMouseEnter:h(n),onMouseLeave:p(n)});var r},onClickAway:e=>{null==r||r(e,"clickaway")}}};function yF(e){return e.substring(2).toLowerCase()}function bF(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,a=xl.useRef(!1),s=xl.useRef(null),l=xl.useRef(!1),u=xl.useRef(!1);xl.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const c=(0,gv.A)(Vw(t),s),d=(0,Sx.A)(e=>{const t=u.current;u.current=!1;const r=(0,_k.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=>{u.current=!0;const r=t.props[e];r&&r(n)},p={ref:c};return!1!==o&&(p[o]=h(o)),xl.useEffect(()=>{if(!1!==o){const e=yF(o),t=(0,_k.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)),xl.useEffect(()=>{if(!1!==r){const e=yF(r),t=(0,_k.A)(s.current);return t.addEventListener(e,d),()=>{t.removeEventListener(e,d)}}},[d,r]),(0,El.jsx)(xl.Fragment,{children:xl.cloneElement(t,p)})}function AF(e){return(0,Pv.Ay)("MuiSnackbarContent",e)}(0,Dv.A)("MuiSnackbarContent",["root","message","action"]);const xF=["action","className","message","role"],wF=(0,fv.Ay)(zv,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?.8:.98,r=(0,pv.tL)(t.palette.background.default,n);return(0,cv.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}})}),kF=(0,fv.Ay)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),SF=(0,fv.Ay)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),EF=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiSnackbarContent"}),{action:r,className:i,message:o,role:a="alert"}=n,s=(0,uv.A)(n,xF),l=n,u=(e=>{const{classes:t}=e;return(0,hv.A)({root:["root"],action:["action"],message:["message"]},AF,t)})(l);return(0,El.jsxs)(wF,(0,cv.A)({role:a,square:!0,elevation:6,className:(0,dv.A)(u.root,i),ownerState:l,ref:t},s,{children:[(0,El.jsx)(kF,{className:u.message,ownerState:l,children:o}),r?(0,El.jsx)(SF,{className:u.action,ownerState:l,children:r}):null]}))});function CF(e){return(0,Pv.Ay)("MuiSnackbar",e)}(0,Dv.A)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const _F=["onEnter","onExited"],TF=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],DF=(0,fv.Ay)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["anchorOrigin".concat((0,_v.A)(n.anchorOrigin.vertical)).concat((0,_v.A)(n.anchorOrigin.horizontal))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,cv.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,cv.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"})})}),PF=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiSnackbar"}),r=bA(),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:u,className:c,ClickAwayListenerProps:d,ContentProps:h,disableWindowBlurListener:p=!1,message:f,open:m,TransitionComponent:g=Ck,transitionDuration:v=i,TransitionProps:{onEnter:y,onExited:b}={}}=n,A=(0,uv.A)(n.TransitionProps,_F),x=(0,uv.A)(n,TF),w=(0,cv.A)({},n,{anchorOrigin:{vertical:a,horizontal:s},autoHideDuration:l,disableWindowBlurListener:p,TransitionComponent:g,transitionDuration:v}),k=(e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root","anchorOrigin".concat((0,_v.A)(n.vertical)).concat((0,_v.A)(n.horizontal))]};return(0,hv.A)(r,CF,t)})(w),{getRootProps:S,onClickAway:E}=vF((0,cv.A)({},w)),[C,_]=xl.useState(!0),T=qw({elementType:DF,getSlotProps:S,externalForwardedProps:x,ownerState:w,additionalProps:{ref:t},className:[k.root,c]});return!m&&C?null:(0,El.jsx)(bF,(0,cv.A)({onClickAway:E},d,{children:(0,El.jsx)(DF,(0,cv.A)({},T,{children:(0,El.jsx)(g,(0,cv.A)({appear:!0,in:m,timeout:v,direction:"top"===a?"down":"up",onEnter:(e,t)=>{_(!1),y&&y(e,t)},onExited:e=>{_(!0),b&&b(e)}},A,{children:u||(0,El.jsx)(EF,(0,cv.A)({message:f,action:o},h))}))}))}))}),IF=PF,FF=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))},LF=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[]}};var zF=i(1367);function OF(){const{customStyles:e,updateSetting:t}=function(){const{setting:e,updateSetting:t}=Fb();return{customStyles:(null==e?void 0:e.customStyles)||[],updateSetting:t}}();return{customStyles:e,addStyle:(0,xl.useCallback)(()=>{const e=zF.p5[0],n=crypto.randomUUID(),i="custom_".concat(crypto.randomUUID()),o="Style_".concat(n.slice(0,8)),a=(0,r.A)((0,r.A)({},e),{},{styleSlug:i,styleName:o});t(e=>(0,r.A)((0,r.A)({},e),{},{customStyles:[...(null==e?void 0:e.customStyles)||[],a]}))},[t]),deleteStyle:(0,xl.useCallback)(e=>{t(t=>(0,r.A)((0,r.A)({},t),{},{customStyles:((null==t?void 0:t.customStyles)||[]).filter(t=>t.styleSlug!==e)}))},[t]),updateStyle:(0,xl.useCallback)((e,n)=>{t(t=>(0,r.A)((0,r.A)({},t),{},{customStyles:((null==t?void 0:t.customStyles)||[]).map(t=>t.styleSlug===e?(0,r.A)((0,r.A)({},t),n):t)}))},[t])}}function NF(e){var t,n,i;let{rule:s,setting:u,setRule:c,setSetting:d,handleOpenSetting:h,processActions:p,isContent:f=!1}=e;const m=wx(),{setting:g,updateSetting:v}=Fb(),[y,b]=(0,xl.useState)({}),[A,x]=(0,xl.useState)([]),[w,k]=(0,xl.useState)(""),[S,E]=(0,xl.useState)({open:!1,message:""}),{allTextStyles:C}=function(){const{customStyles:e}=OF(),t=wx(),n=(0,xl.useMemo)(()=>zF.q_.map(e=>({styleSlug:e,styleName:t(e),styleCode:jc[e]||""})),[t]),r=(0,xl.useMemo)(()=>[...n,...e],[n,e]);return{builtinStyles:n,customStyles:e,allTextStyles:r}}(),[_,T]=(0,xl.useState)(""),D=(null==g?void 0:g.blacklist)||"",P=(0,xl.useMemo)(()=>!(!w||!D)&&za(_,D),[w,D,_]),I=(0,xl.useCallback)(()=>{if(!w)return;const e=D?"".concat(D,"\n").concat(w):w;v(t=>(0,r.A)((0,r.A)({},t),{},{blacklist:e})),E({open:!0,message:"".concat(m("add_to_blacklist"),": ").concat(w)})},[w,D,v,m]),F=(0,xl.useCallback)(()=>{if(!w)return;const e=D.split(/\n|,/).map(e=>e.trim()).filter(e=>e!==w).join("\n");v(t=>(0,r.A)((0,r.A)({},t),{},{blacklist:e})),E({open:!0,message:"".concat(m("remove_from_blacklist"),": ").concat(w)})},[w,D,v,m]),L=async e=>{try{let{name:t,value:n,checked:i}=e.target;"isPlainText"===t&&(n=i),c(e=>(0,r.A)((0,r.A)({},e),{},{[t]:n})),p?p({action:o.Rfh,args:{[t]:n}}):await(0,G.xJ)(o.Rfh,{[t]:n})}catch(e){(0,ht.h9)("update rule",e)}};(0,xl.useEffect)(()=>{(async()=>{try{let t="";if(f){var e;t=null===(e=window.location)||void 0===e?void 0:e.href}else{const e=await(0,G.QI)();t=(null==e?void 0:e.url)||""}if(t&&"string"==typeof t){T(t);const e=LF(t);x(e),e.length>0&&k(e[0])}}catch(e){(0,ht.h9)("get domain options",e)}})()},[f]),(0,xl.useEffect)(()=>{(async()=>{try{const e={};if(V.aQ){(await(0,G.Ru)(o.K8D)).forEach(t=>{let{name:n,shortcut:r}=t;e[n]=r})}else{const t=null==u?void 0:u.shortcuts;t&&Object.entries(t).forEach(t=>{let[n,r]=t;e[n]=r.join("+")})}b(e)}catch(e){(0,ht.h9)("query cmds",e)}})()},[null==u?void 0:u.shortcuts]);const z=(0,xl.useMemo)(()=>((null==u?void 0:u.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==u?void 0:u.transApis]),O=null==u||null===(t=u.tranboxSetting)||void 0===t?void 0:t.transOpen,N=null==u||null===(n=u.mouseHoverSetting)||void 0===n?void 0:n.useMouseHover,j=null==u||null===(i=u.inputRule)||void 0===i?void 0:i.transOpen,{transOpen:R,apiSlug:M,fromLang:B,toLang:W,textStyle:U,autoScan:H,transOnly:K,hasRichText:q,scanAll:Y,isPlainText:X=!1}=s||{},$=!0===X||"true"===X;return(0,El.jsxs)(ax,{sx:{p:2},spacing:2,children:[(0,El.jsxs)(tC,{container:!0,columns:12,spacing:1,children:[(0,El.jsx)(tC,{item:!0,xs:12,children:(0,El.jsx)(VI,{control:(0,El.jsx)(oF,{checked:"true"===R,onChange:async e=>{try{c((0,r.A)((0,r.A)({},s),{},{transOpen:e.target.checked?"true":"false"})),p?p({action:o.u2k}):await(0,G.xJ)(o.u2k)}catch(e){(0,ht.h9)("toggle trans",e)}}}),label:y.toggleTranslate?"".concat(m("translate_alt"),"(").concat(y.toggleTranslate,")"):m("translate_alt")})}),(0,El.jsx)(tC,{item:!0,xs:6,children:(0,El.jsx)(VI,{control:(0,El.jsx)(oF,{size:"small",name:"autoScan",value:"true"===H?"false":"true",checked:"true"===H,onChange:L}),label:m("autoscan_alt")})}),(0,El.jsx)(tC,{item:!0,xs:6,children:(0,El.jsx)(VI,{control:(0,El.jsx)(oF,{size:"small",name:"scanAll",value:"true"===Y?"false":"true",checked:"true"===Y,onChange:L}),label:m("scan_all_nodes")})}),(0,El.jsx)(tC,{item:!0,xs:6,children:(0,El.jsx)(VI,{control:(0,El.jsx)(oF,{size:"small",name:"hasRichText",value:"true"===q?"false":"true",checked:"true"===q,onChange:L}),label:m("richtext_alt")})}),(0,El.jsx)(tC,{item:!0,xs:6,children:(0,El.jsx)(VI,{control:(0,El.jsx)(oF,{size:"small",name:"transOnly",value:"true"===K?"false":"true",checked:"true"===K,onChange:L}),label:m("transonly_alt")})}),(0,El.jsx)(tC,{item:!0,xs:6,children:(0,El.jsx)(VI,{control:(0,El.jsx)(oF,{size:"small",name:"tranboxEnabled",value:!O,checked:O,onChange:async e=>{try{d(t=>(0,r.A)((0,r.A)({},t),{},{tranboxSetting:(0,r.A)((0,r.A)({},t.tranboxSetting),{},{transOpen:e.target.checked})})),p?p({action:o.n10}):await(0,G.xJ)(o.n10)}catch(e){(0,ht.h9)("toggle transbox",e)}}}),label:m("selection_translate")})}),(0,El.jsx)(tC,{item:!0,xs:6,children:(0,El.jsx)(VI,{control:(0,El.jsx)(oF,{size:"small",name:"mouseHoverEnabled",value:!N,checked:N,onChange:async e=>{try{d(t=>(0,r.A)((0,r.A)({},t),{},{mouseHoverSetting:(0,r.A)((0,r.A)({},t.mouseHoverSetting),{},{useMouseHover:e.target.checked})})),p?p({action:o.F_o}):await(0,G.xJ)(o.F_o)}catch(e){(0,ht.h9)("toggle mousehover",e)}}}),label:m("mousehover_translate")})}),(0,El.jsx)(tC,{item:!0,xs:6,children:(0,El.jsx)(VI,{control:(0,El.jsx)(oF,{size:"small",name:"inputTransEnabled",value:!j,checked:j,onChange:async e=>{try{d(t=>(0,r.A)((0,r.A)({},t),{},{inputRule:(0,r.A)((0,r.A)({},t.inputRule),{},{transOpen:e.target.checked})})),p?p({action:o.EWA}):await(0,G.xJ)(o.EWA)}catch(e){(0,ht.h9)("toggle inputtrans",e)}}}),label:m("input_translate")})}),(0,El.jsx)(tC,{item:!0,xs:6,children:(0,El.jsx)(VI,{control:(0,El.jsx)(oF,{size:"small",name:"isPlainText",value:!$,checked:$,onChange:L}),label:m("plain_text_translate")})})]}),(0,El.jsxs)(ax,{direction:"row",spacing:2,children:[(0,El.jsx)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:B,name:"fromLang",label:m("from_lang"),onChange:L,fullWidth:!0,children:o.UF6.map(e=>{let[t,n]=e;return(0,El.jsx)(HE,{value:t,children:n},t)})}),(0,El.jsx)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:W,name:"toLang",label:m("to_lang"),onChange:L,fullWidth:!0,children:o.$QD.map(e=>{let[t,n]=e;return(0,El.jsx)(HE,{value:t,children:n},t)})})]}),(0,El.jsxs)(ax,{direction:"row",spacing:2,children:[(0,El.jsx)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:M,name:"apiSlug",label:m("translate_service"),onChange:L,fullWidth:!0,children:z.map(e=>{let{key:t,name:n}=e;return(0,El.jsx)(HE,{value:t,children:n},t)})}),(0,El.jsx)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:U,name:"textStyle",label:y.toggleStyle?"".concat(m("text_style_alt"),"(").concat(y.toggleStyle,")"):m("text_style_alt"),onChange:L,fullWidth:!0,children:C.map(e=>(0,El.jsx)(HE,{value:e.styleSlug,children:e.styleName},e.styleSlug))})]}),(0,El.jsxs)(ax,{children:[(0,El.jsx)(iE,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:w,label:m("domain"),onChange:e=>k(e.target.value),fullWidth:!0,sx:{mb:1},children:A.map(e=>(0,El.jsx)(HE,{value:e,title:e,children:FF(e)},e))}),(0,El.jsxs)(ax,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,El.jsx)(gF,{variant:"text",onClick:async()=>{try{if(!w)return;const e=(0,r.A)((0,r.A)({},s),{},{pattern:w});V.aQ&&f?(0,G.Ru)(o.x2F,e):(async e=>{const t=await(0,a.VX)(),n=t.findIndex(t=>t.pattern!==o.WL9&&(0,l.uv)(e.pattern,t.pattern));if(-1!==n){const i=t.splice(n,1)[0];e=(0,r.A)((0,r.A)((0,r.A)({},i),e),{},{pattern:i.pattern,selector:i.selector,keepSelector:i.keepSelector,blockSelector:i.blockSelector,rootsSelector:i.rootsSelector,ignoreSelector:i.ignoreSelector})}const i={},s=(0,r.A)((0,r.A)({},o.lNu),t.find(e=>e.pattern===o.WL9)||{});Object.keys(o.lNu).forEach(t=>{if("isPlainText"===t){const n=!0===e[t]||"true"===e[t]?"true":!1===e[t]||"false"===e[t]?"false":o.NGo[t];return void(i[t]=n===s[t]?o.NGo[t]:n)}i[t]=e[t]&&e[t]!==s[t]?e[t]:o.NGo[t]}),t.unshift(i),await(0,a.Qg)(t),Da()})(e),E({open:!0,message:"".concat(m("save_rule"),": ").concat(w)})}catch(e){(0,ht.h9)("save rule",e)}},disabled:0===A.length,children:m("save_rule")}),(0,El.jsx)(gF,{variant:"text",onClick:P?F:I,disabled:0===A.length,children:m(P?"remove_from_blacklist":"add_to_blacklist")}),(0,El.jsx)(gF,{variant:"text",onClick:()=>{(0,Kt.uk)()},children:m("clear_cache")})]}),(0,El.jsxs)(ax,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,El.jsx)(gF,{variant:"text",onClick:()=>{window.open("https://chromewebstore.google.com/detail/kiss-translator/bdiifdefkgmcblbcghdlonllpjhhjgof/reviews","_blank")},children:m("comment_support")}),(0,El.jsx)(gF,{variant:"text",onClick:()=>{window.open("https://github.com/fishjar/kiss-translator#%E8%B5%9E%E8%B5%8F","_blank")},children:m("appreciate_support")}),(0,El.jsx)(gF,{variant:"text",onClick:h,children:m("setting")})]})]}),(0,El.jsx)(IF,{open:S.open,autoHideDuration:3e3,onClose:()=>E({open:!1,message:""}),anchorOrigin:{vertical:"top",horizontal:"center"},children:(0,El.jsx)(Ry,{onClose:()=>E({open:!1,message:""}),severity:"success",variant:"filled",sx:{width:"100%"},children:S.message})})]})}function jF(e){let{translator:t,processActions:n}=e;const[i,a]=(0,xl.useState)(!0),[s,l]=(0,xl.useState)(t.rule),[u,c]=(0,xl.useState)(t.setting),d=RI(),h=(0,xl.useCallback)(()=>{V.aQ?(0,G.Ru)(o.kYB):window.open("https://kiss-translator.rayjar.com/options","_blank")},[]);(0,xl.useEffect)(()=>{const e=()=>{a(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}},[]),(0,xl.useEffect)(()=>{const e=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.action)===o.grg&&a(e=>!e)};return document.addEventListener(o.nRB,e),()=>{document.removeEventListener(o.nRB,e)}},[]),(0,xl.useEffect)(()=>{i&&(l(t.rule),c(t.setting))},[i,t]);const p=(0,xl.useMemo)(()=>{const e=Math.min(d.w,360),t=Math.min(d.h,442),n=(d.w-e)/2,r=(d.h-t)/2;return{windowSize:d,width:e,height:t,left:n,top:r}},[d]);return(0,El.jsx)(Ib,{context:"contentPopup",children:(0,El.jsx)(dA,{children:i&&(0,El.jsx)(zI,(0,r.A)((0,r.A)({},p),{},{usePaper:!0,handler:(0,El.jsxs)(yA,{style:{cursor:"move"},children:[(0,El.jsx)(jI,{onClose:()=>{a(!1)}}),(0,El.jsx)(Tb,{})]}),children:(0,El.jsx)(yA,{width:360,children:(0,El.jsx)(NF,{rule:s,setting:u,setRule:l,setSetting:c,handleOpenSetting:h,processActions:n,isContent:!0})})}),"pop")})})}class RF extends _I{constructor(e){let{translator:t,processActions:n}=e;super({id:o.Reo.popupID,className:"notranslate",reactComponent:jF,props:{translator:t,processActions:n}})}toggle(e){this.isVisible?document.dispatchEvent(new CustomEvent(o.nRB,{detail:{action:o.grg}})):this.show(e||this._props)}}function MF(e){return(0,Pv.Ay)("MuiFab",e)}const BF=(0,Dv.A)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),WF=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],UF=(0,fv.Ay)(yy,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,Yx.A)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,_v.A)(n.size))],"inherit"===n.color&&t.colorInherit,t[(0,_v.A)(n.size)],t[n.color]]}})(e=>{let{theme:t,ownerState:n}=e;var r,i;return(0,cv.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(BF.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,cv.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(BF.disabled)]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),HF=xl.forwardRef(function(e,t){const n=(0,mv.b)({props:e,name:"MuiFab"}),{children:r,className:i,color:o="default",component:a="button",disabled:s=!1,disableFocusRipple:l=!1,focusVisibleClassName:u,size:c="large",variant:d="circular"}=n,h=(0,uv.A)(n,WF),p=(0,cv.A)({},n,{color:o,component:a,disabled:s,disableFocusRipple:l,size:c,variant:d}),f=(e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,"size".concat((0,_v.A)(i)),"inherit"===t?"colorInherit":t]},a=(0,hv.A)(o,MF,r);return(0,cv.A)({},r,a)})(p);return(0,El.jsx)(UF,(0,cv.A)({className:(0,dv.A)(f.root,i),component:a,disabled:s,focusRipple:!l,focusVisibleClassName:(0,dv.A)(f.focusVisible,u),ownerState:p,ref:t},h,{classes:f,children:r}))}),VF=HF;var GF=i(609);function KF(){const[e,t]=(0,xl.useState)(!1);return(0,xl.useEffect)(()=>{const e=()=>{const e=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null;t(function(e){var t;return!!e&&("VIDEO"===e.tagName||Boolean(null===(t=e.querySelector)||void 0===t?void 0:t.call(e,"video")))}(e))};return e(),document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("msfullscreenchange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("msfullscreenchange",e)}},[]),{isVideoFullscreen:e}}function qF(e){let{fabConfig:{x:t,y:n,edge:i,fabClickAction:a=0}={},processActions:s}=e;const l=RI(),[u,c]=(0,xl.useState)(!1),[d,h]=(0,xl.useState)(!0),{isVideoFullscreen:p}=KF();(0,xl.useEffect)(()=>{h(!p)},[p]);const f=(0,xl.useCallback)(()=>{c(!1)},[]),m=(0,xl.useCallback)(()=>{c(!0)},[]),g=(0,xl.useCallback)(()=>{u||s(1===a?{action:o.u2k}:{action:o.grg})},[u,a,s]),v=(0,xl.useMemo)(()=>({windowSize:l,width:40,height:40,left:null!=t?t:-40,top:null!=n?n:l.h/2,edge:i}),[l,40,t,n,i]);return(0,El.jsx)(Ib,{context:"fab",children:(0,El.jsx)(dA,{children:(0,El.jsx)(zI,(0,r.A)((0,r.A)({snapEdge:!0},v),{},{show:d,onStart:f,onMove:m,handler:(0,El.jsx)(VF,{size:"small",color:"primary",onClick:g,children:(0,El.jsx)(GF.A,{sx:{width:24,height:24}})})}),"fab")})})}class YF extends _I{constructor(e){let{processActions:t,fabConfig:n}=e;super({id:o.Reo.fabID,className:"notranslate",reactComponent:qF,props:{processActions:t,fabConfig:n}}),null!=n&&n.isHide||this.show()}}var XF=(0,Qt.A)("clearShortcuts"),$F=(0,Qt.A)("menuCommandIds"),JF=(0,Qt.A)("clearTouchListeners"),QF=(0,Qt.A)("isActive"),ZF=(0,Qt.A)("setting"),eL=(0,Qt.A)("rule"),tL=(0,Qt.A)("fabConfig"),nL=(0,Qt.A)("favWords"),rL=(0,Qt.A)("isUserscript"),iL=(0,Qt.A)("isIframe"),oL=(0,Qt.A)("transboxOnly"),aL=(0,Qt.A)("documentObserver"),sL=(0,Qt.A)("documentElementObserver"),lL=(0,Qt.A)("knownDocumentElement"),uL=(0,Qt.A)("knownBody"),cL=(0,Qt.A)("spaRefreshTimer"),dL=(0,Qt.A)("pendingSpaRefresh"),hL=(0,Qt.A)("pendingSpaRefreshReason"),pL=(0,Qt.A)("innerMessageHandler"),fL=(0,Qt.A)("browserMessageHandler"),mL=(0,Qt.A)("windowMessageHandler"),gL=(0,Qt.A)("pageRestoreHandler"),vL=(0,Qt.A)("spaNavigationHandler"),yL=(0,Qt.A)("createRuntimeModules"),bL=(0,Qt.A)("destroyRuntimeModules"),AL=(0,Qt.A)("cloneConfig"),xL=(0,Qt.A)("snapshotRuntimeState"),wL=(0,Qt.A)("setupSpaListeners"),kL=(0,Qt.A)("teardownSpaListeners"),SL=(0,Qt.A)("refreshDocumentElementObserver"),EL=(0,Qt.A)("handleDocumentContainerMutation"),CL=(0,Qt.A)("handlePageRestore"),_L=(0,Qt.A)("handleSpaNavigation"),TL=(0,Qt.A)("scheduleSpaRefresh"),DL=(0,Qt.A)("clearSpaRefreshTimer"),PL=(0,Qt.A)("hasDocumentContainerChanged"),IL=(0,Qt.A)("setupMessageListeners"),FL=(0,Qt.A)("setupTouchOperations"),LL=(0,Qt.A)("handleWindowMessage"),zL=(0,Qt.A)("handleInnerMessage"),OL=(0,Qt.A)("handleBrowserMessage"),NL=(0,Qt.A)("registerShortcuts"),jL=(0,Qt.A)("registerMenus"),RL=(0,Qt.A)("processActions");class ML{constructor(e){let{setting:t,rule:n,fabConfig:r,favWords:i,isIframe:o,isUserscript:a,transboxOnly:s=!1}=e;Object.defineProperty(this,RL,{value:az}),Object.defineProperty(this,jL,{value:oz}),Object.defineProperty(this,NL,{value:iz}),Object.defineProperty(this,OL,{value:rz}),Object.defineProperty(this,zL,{value:nz}),Object.defineProperty(this,LL,{value:tz}),Object.defineProperty(this,FL,{value:ez}),Object.defineProperty(this,IL,{value:ZL}),Object.defineProperty(this,PL,{value:QL}),Object.defineProperty(this,DL,{value:JL}),Object.defineProperty(this,TL,{value:$L}),Object.defineProperty(this,_L,{value:XL}),Object.defineProperty(this,CL,{value:YL}),Object.defineProperty(this,EL,{value:qL}),Object.defineProperty(this,SL,{value:KL}),Object.defineProperty(this,kL,{value:GL}),Object.defineProperty(this,wL,{value:VL}),Object.defineProperty(this,xL,{value:HL}),Object.defineProperty(this,AL,{value:UL}),Object.defineProperty(this,bL,{value:WL}),Object.defineProperty(this,yL,{value:BL}),Object.defineProperty(this,XF,{writable:!0,value:[]}),Object.defineProperty(this,$F,{writable:!0,value:[]}),Object.defineProperty(this,JF,{writable:!0,value:[]}),Object.defineProperty(this,QF,{writable:!0,value:!1}),Object.defineProperty(this,ZF,{writable:!0,value:void 0}),Object.defineProperty(this,eL,{writable:!0,value:void 0}),Object.defineProperty(this,tL,{writable:!0,value:void 0}),Object.defineProperty(this,nL,{writable:!0,value:void 0}),Object.defineProperty(this,rL,{writable:!0,value:void 0}),Object.defineProperty(this,iL,{writable:!0,value:void 0}),Object.defineProperty(this,oL,{writable:!0,value:void 0}),Object.defineProperty(this,aL,{writable:!0,value:null}),Object.defineProperty(this,sL,{writable:!0,value:null}),Object.defineProperty(this,lL,{writable:!0,value:null}),Object.defineProperty(this,uL,{writable:!0,value:null}),Object.defineProperty(this,cL,{writable:!0,value:null}),Object.defineProperty(this,dL,{writable:!0,value:null}),Object.defineProperty(this,hL,{writable:!0,value:""}),Object.defineProperty(this,pL,{writable:!0,value:null}),Object.defineProperty(this,fL,{writable:!0,value:null}),Object.defineProperty(this,mL,{writable:!0,value:null}),Object.defineProperty(this,gL,{writable:!0,value:null}),Object.defineProperty(this,vL,{writable:!0,value:null}),this._translator=null,this._transboxManager=null,this._inputTranslator=null,this._popupManager=null,this._fabManager=null,(0,Jt.A)(this,ZF)[ZF]=(0,Jt.A)(this,AL)[AL](t),(0,Jt.A)(this,eL)[eL]=(0,Jt.A)(this,AL)[AL](n),(0,Jt.A)(this,tL)[tL]=(0,Jt.A)(this,AL)[AL](r),(0,Jt.A)(this,nL)[nL]=(0,Jt.A)(this,AL)[AL](i),(0,Jt.A)(this,iL)[iL]=o,(0,Jt.A)(this,rL)[rL]=a,(0,Jt.A)(this,oL)[oL]=s,(0,Jt.A)(this,pL)[pL]=(0,Jt.A)(this,zL)[zL].bind(this),(0,Jt.A)(this,fL)[fL]=(0,Jt.A)(this,OL)[OL].bind(this),(0,Jt.A)(this,mL)[mL]=(0,Jt.A)(this,LL)[LL].bind(this),(0,Jt.A)(this,gL)[gL]=(0,Jt.A)(this,CL)[CL].bind(this),(0,Jt.A)(this,vL)[vL]=(0,Jt.A)(this,_L)[_L].bind(this)}start(){(0,Jt.A)(this,QF)[QF]?ht.vF.info("TranslatorManager is already started."):((0,Jt.A)(this,yL)[yL](),(0,Jt.A)(this,IL)[IL](),(0,Jt.A)(this,oL)[oL]||(0,Jt.A)(this,FL)[FL](),(0,Jt.A)(this,oL)[oL]||(0,Jt.A)(this,iL)[iL]||!(0,Jt.A)(this,rL)[rL]||((0,Jt.A)(this,NL)[NL](),(0,Jt.A)(this,jL)[jL]()),(0,Jt.A)(this,oL)[oL]||(0,Jt.A)(this,wL)[wL](),(0,Jt.A)(this,QF)[QF]=!0,ht.vF.info("TranslatorManager started."))}restart(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"spa-navigation";if(!(0,Jt.A)(this,QF)[QF])return void ht.vF.info("TranslatorManager is not running.");const t=(0,Jt.A)(this,xL)[xL]();(0,Jt.A)(this,bL)[bL](),(0,Jt.A)(this,ZF)[ZF]=t.setting,(0,Jt.A)(this,eL)[eL]=t.rule,(0,Jt.A)(this,tL)[tL]=t.fabConfig,(0,Jt.A)(this,nL)[nL]=t.favWords,(0,Jt.A)(this,yL)[yL](),(0,Jt.A)(this,SL)[SL](),ht.vF.info("TranslatorManager restarted: ".concat(e))}stop(){(0,Jt.A)(this,QF)[QF]?((0,Jt.A)(this,DL)[DL](),(0,Jt.A)(this,kL)[kL](),window.removeEventListener(o.XRX,(0,Jt.A)(this,mL)[mL]),(0,Jt.A)(this,rL)[rL]?window.removeEventListener("message",(0,Jt.A)(this,pL)[pL]):($t.T.runtime.onMessage.removeListener((0,Jt.A)(this,fL)[fL]),(0,Jt.A)(this,iL)[iL]&&window.removeEventListener("message",(0,Jt.A)(this,pL)[pL])),(0,Jt.A)(this,XF)[XF].forEach(e=>e()),(0,Jt.A)(this,XF)[XF]=[],(0,Jt.A)(this,JF)[JF].forEach(e=>e()),(0,Jt.A)(this,JF)[JF]=[],globalThis.GM&&(0,Jt.A)(this,$F)[$F].length>0&&((0,Jt.A)(this,$F)[$F].forEach(e=>{var t,n;return null===(t=(n=GM).unregisterMenuCommand)||void 0===t?void 0:t.call(n,e)}),(0,Jt.A)(this,$F)[$F]=[]),(0,Jt.A)(this,bL)[bL](),(0,Jt.A)(this,QF)[QF]=!1,ht.vF.info("TranslatorManager stopped.")):ht.vF.info("TranslatorManager is not running.")}}function BL(){(0,Jt.A)(this,oL)[oL]?this._transboxManager=new AI((0,Jt.A)(this,AL)[AL]((0,Jt.A)(this,ZF)[ZF])):(this._translator=new bf({rule:(0,Jt.A)(this,AL)[AL]((0,Jt.A)(this,eL)[eL]),setting:(0,Jt.A)(this,AL)[AL]((0,Jt.A)(this,ZF)[ZF]),favWords:(0,Jt.A)(this,AL)[AL]((0,Jt.A)(this,nL)[nL]),isUserscript:(0,Jt.A)(this,rL)[rL],isIframe:(0,Jt.A)(this,iL)[iL]}),this._transboxManager=new AI((0,Jt.A)(this,AL)[AL]((0,Jt.A)(this,ZF)[ZF])),(0,Jt.A)(this,iL)[iL]||(this._inputTranslator=new av((0,Jt.A)(this,AL)[AL]((0,Jt.A)(this,ZF)[ZF])),this._popupManager=new RF({translator:this._translator,processActions:(0,Jt.A)(this,RL)[RL].bind(this)}),this._fabManager=new YF({processActions:(0,Jt.A)(this,RL)[RL].bind(this),fabConfig:(0,Jt.A)(this,AL)[AL]((0,Jt.A)(this,tL)[tL])})))}function WL(){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 UL(e){if(null==e)return e;if("function"==typeof globalThis.structuredClone)try{return globalThis.structuredClone(e)}catch(e){ht.vF.debug("structuredClone failed, using JSON clone.",e)}return JSON.parse(JSON.stringify(e))}function HL(){var e,t;return{setting:(0,Jt.A)(this,AL)[AL]((null===(e=this._translator)||void 0===e?void 0:e.setting)||(0,Jt.A)(this,ZF)[ZF]),rule:(0,Jt.A)(this,AL)[AL]((null===(t=this._translator)||void 0===t?void 0:t.rule)||(0,Jt.A)(this,eL)[eL]),fabConfig:(0,Jt.A)(this,AL)[AL]((0,Jt.A)(this,tL)[tL]),favWords:(0,Jt.A)(this,AL)[AL]((0,Jt.A)(this,nL)[nL])}}function VL(){(0,Jt.A)(this,aL)[aL]=new MutationObserver(()=>{(0,Jt.A)(this,EL)[EL]("document")}),(0,Jt.A)(this,aL)[aL].observe(document,{childList:!0}),(0,Jt.A)(this,SL)[SL](),window.addEventListener("pageshow",(0,Jt.A)(this,gL)[gL]),document.addEventListener("turbo:frame-load",(0,Jt.A)(this,vL)[vL],!0)}function GL(){var e,t,n;null===(e=(0,Jt.A)(this,aL)[aL])||void 0===e||e.disconnect(),(0,Jt.A)(this,aL)[aL]=null,null===(t=(0,Jt.A)(this,sL)[sL])||void 0===t||t.disconnect(),(0,Jt.A)(this,sL)[sL]=null,null===(n=(0,Jt.A)(this,lL)[lL])||void 0===n||n.removeEventListener("turbo:load",(0,Jt.A)(this,vL)[vL]),(0,Jt.A)(this,lL)[lL]=null,(0,Jt.A)(this,uL)[uL]=null,window.removeEventListener("pageshow",(0,Jt.A)(this,gL)[gL]),document.removeEventListener("turbo:frame-load",(0,Jt.A)(this,vL)[vL],!0)}function KL(){var e,t;null===(e=(0,Jt.A)(this,sL)[sL])||void 0===e||e.disconnect(),(0,Jt.A)(this,sL)[sL]=null,null===(t=(0,Jt.A)(this,lL)[lL])||void 0===t||t.removeEventListener("turbo:load",(0,Jt.A)(this,vL)[vL]),(0,Jt.A)(this,lL)[lL]=document.documentElement,(0,Jt.A)(this,uL)[uL]=document.body,(0,Jt.A)(this,lL)[lL]&&((0,Jt.A)(this,lL)[lL].addEventListener("turbo:load",(0,Jt.A)(this,vL)[vL]),(0,Jt.A)(this,sL)[sL]=new MutationObserver(()=>{(0,Jt.A)(this,EL)[EL]("documentElement")}),(0,Jt.A)(this,sL)[sL].observe((0,Jt.A)(this,lL)[lL],{childList:!0}))}function qL(e){(0,Jt.A)(this,PL)[PL]()&&(0,Jt.A)(this,TL)[TL]("restart",e)}function YL(e){"pageshow"===e.type&&!0!==e.persisted||(0,Jt.A)(this,TL)[TL]("rescan",e.type)}function XL(e){(0,Jt.A)(this,TL)[TL]("rescan",e.type)}function $L(e,t){(0,Jt.A)(this,QF)[QF]&&((0,Jt.A)(this,cL)[cL]&&(clearTimeout((0,Jt.A)(this,cL)[cL]),(0,Jt.A)(this,cL)[cL]=null),"restart"!==e&&"restart"===(0,Jt.A)(this,dL)[dL]||((0,Jt.A)(this,dL)[dL]=e,(0,Jt.A)(this,hL)[hL]=t),"restart"===e&&((0,Jt.A)(this,hL)[hL]=t),(0,Jt.A)(this,cL)[cL]=setTimeout(()=>{var e;const t=(0,Jt.A)(this,dL)[dL],n=(0,Jt.A)(this,hL)[hL];(0,Jt.A)(this,cL)[cL]=null,(0,Jt.A)(this,dL)[dL]=null,(0,Jt.A)(this,hL)[hL]="",(0,Jt.A)(this,QF)[QF]&&("restart"===t||(0,Jt.A)(this,PL)[PL]()?this.restart(n):(null===(e=this._translator)||void 0===e||e.rescan(),ht.vF.info("TranslatorManager rescanned: ".concat(n))))},0))}function JL(){(0,Jt.A)(this,cL)[cL]&&(clearTimeout((0,Jt.A)(this,cL)[cL]),(0,Jt.A)(this,cL)[cL]=null,(0,Jt.A)(this,dL)[dL]=null,(0,Jt.A)(this,hL)[hL]="")}function QL(){return document.documentElement!==(0,Jt.A)(this,lL)[lL]||document.body!==(0,Jt.A)(this,uL)[uL]}function ZL(){(0,Jt.A)(this,rL)[rL]?window.addEventListener("message",(0,Jt.A)(this,pL)[pL]):($t.T.runtime.onMessage.addListener((0,Jt.A)(this,fL)[fL]),(0,Jt.A)(this,iL)[iL]&&window.addEventListener("message",(0,Jt.A)(this,pL)[pL])),window.addEventListener(o.XRX,(0,Jt.A)(this,mL)[mL])}function ez(){if((0,Jt.A)(this,iL)[iL])return;const{touchModes:e=[2]}=this._translator.setting;if(0===e.length)return;const t=()=>{(0,Jt.A)(this,RL)[RL]({action:o.u2k})},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&&(0,Jt.A)(this,JF)[JF].push(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,r.A)({taps:2,fingers:1,delay:300},t);let i=0,o=0,a=null,s=!1,l=[];const u=e=>{i=Math.max(i,e.touches.length),l=Array.from(e.touches).map(e=>({x:e.clientX,y:e.clientY}))},c=e=>{if(!s)for(let t=0;t<e.touches.length;t++){const n=e.touches[t],r=l[t];if(r&&Math.sqrt(Math.pow(n.clientX-r.x,2)+Math.pow(n.clientY-r.y,2))>10){s=!0;break}}},d=t=>{0===t.touches.length&&(s||i!==n.fingers?(o=0,clearTimeout(a)):(o++,clearTimeout(a),o===n.taps?(e(t),o=0):a=setTimeout(()=>{o=0},n.delay)),i=0,s=!1,l=[])};return document.addEventListener("touchstart",u,{passive:!0}),document.addEventListener("touchmove",c,{passive:!0}),document.addEventListener("touchend",d,{passive:!0}),()=>{clearTimeout(a),document.removeEventListener("touchstart",u),document.removeEventListener("touchmove",c),document.removeEventListener("touchend",d)}}(t,n))};e.forEach(e=>n(e))}function tz(e){ht.vF.debug("handle window message:",e),(0,Jt.A)(this,RL)[RL](e.detail)}function nz(e){(0,Jt.A)(this,RL)[RL](e.data)}function rz(e,t,n){var r,i;return n((0,Jt.A)(this,RL)[RL](e,!0)||{rule:(null===(r=this._translator)||void 0===r?void 0:r.rule)||(0,Jt.A)(this,eL)[eL],setting:(null===(i=this._translator)||void 0===i?void 0:i.setting)||(0,Jt.A)(this,ZF)[ZF]}),!0}function iz(){const{shortcuts:e,tranboxSetting:t}=this._translator.setting;(0,Jt.A)(this,XF)[XF]=[Rc(e[o.IFN],()=>(0,Jt.A)(this,RL)[RL]({action:o.u2k})),Rc(e[o.yzF],()=>(0,Jt.A)(this,RL)[RL]({action:o.DCB})),Rc(e[o.T2s],()=>(0,Jt.A)(this,RL)[RL]({action:o._TK})),Rc(e[o.aqb],()=>(0,Jt.A)(this,RL)[RL]({action:o.grg})),Rc(e[o.CxD],()=>window.open("https://kiss-translator.rayjar.com/options","_blank")),Rc(null==t?void 0:t.tranboxShortcut,()=>(0,Jt.A)(this,RL)[RL]({action:o.n10}))]}function oz(){var e,t,n,r,i,a,s,l,u,c;if(!globalThis.GM)return;const{contextMenuType:d,uiLang:h}=this._translator.setting;if(0===d)return;const p=(0,o.BM1)(h||"zh");(0,Jt.A)(this,$F)[$F]=[null===(e=(t=GM).registerMenuCommand)||void 0===e?void 0:e.call(t,p("translate_switch"),()=>(0,Jt.A)(this,RL)[RL]({action:o.u2k}),"Q"),null===(n=(r=GM).registerMenuCommand)||void 0===n?void 0:n.call(r,p("transonly_alt"),()=>(0,Jt.A)(this,RL)[RL]({action:o.DCB}),"Q"),null===(i=(a=GM).registerMenuCommand)||void 0===i?void 0:i.call(a,p("toggle_style"),()=>(0,Jt.A)(this,RL)[RL]({action:o._TK}),"C"),null===(s=(l=GM).registerMenuCommand)||void 0===s?void 0:s.call(l,p("open_menu"),()=>(0,Jt.A)(this,RL)[RL]({action:o.grg}),"K"),null===(u=(c=GM).registerMenuCommand)||void 0===u?void 0:u.call(c,p("open_setting"),()=>window.open("https://kiss-translator.rayjar.com/options","_blank"),"O")]}function az(){var e,t,n,r,i,a,s,l,u,c,d,h;let{action:p,args:f}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(p)switch(arguments.length>1&&void 0!==arguments[1]&&arguments[1]||((e,t)=>{document.querySelectorAll("iframe").forEach(n=>{n.contentWindow.postMessage({action:e,args:t},"*")})})(p,f),ht.vF.debug("process action:",p,f),p){case o.u2k:null===(e=this._translator)||void 0===e||e.toggle();break;case o.DCB:null===(t=this._translator)||void 0===t||t.toggleTransOnly();break;case o._TK:null===(n=this._translator)||void 0===n||n.toggleStyle();break;case o.IaM:break;case o.Rfh:null===(r=this._translator)||void 0===r||r.updateRule(f);break;case o.GRp:document.dispatchEvent(new CustomEvent(o.nRB,{detail:{action:o.GRp,args:f}}));break;case o.grg:null===(i=this._popupManager)||void 0===i||i.toggle();break;case o.n10:null===(a=this._transboxManager)||void 0===a||a.toggle(),null===(s=this._translator)||void 0===s||s.toggleTransbox();break;case o.F_o:null===(l=this._translator)||void 0===l||l.toggleMouseHover();break;case o.EWA:null===(u=this._inputTranslator)||void 0===u||u.toggle(),null===(c=this._translator)||void 0===c||c.toggleInputTranslate();break;case o.wPo:null===(d=this._translator)||void 0===d||d.toggleHoverNode();break;case o.mul:null===(h=this._inputTranslator)||void 0===h||h.handleTranslate();break;default:return ht.vF.info("Message action is unavailable: ".concat(p)),{error:"Message action is unavailable: ".concat(p)}}}function sz(){if("undefined"!=typeof unsafeWindow)unsafeWindow.GM=GM,unsafeWindow.APP_INFO={name:"KISS Translator",version:"2.0.32"};else{const e=(0,l.Sm)();window.addEventListener(e,u.Xg),pc("(".concat(u.f8,')("').concat(e,'")'),"kiss-translator-options-injector")}}const lz=["script","style","template","noscript","svg","canvas","iframe","input","textarea","select","option",".notranslate","[translate='no']","[contenteditable='true']"].join(", ");async function uz(){return await function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;return"loading"!==document.readyState?Promise.resolve():new Promise(t=>{const n=()=>{clearTimeout(r),document.removeEventListener("DOMContentLoaded",n),t()},r=setTimeout(n,e);document.addEventListener("DOMContentLoaded",n,{once:!0})})}(),function(){if(!document.body)return!1;const e=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,{acceptNode(e){var t,n;return null!==(t=e.nodeValue)&&void 0!==t&&t.trim()?null!==(n=e.parentElement)&&void 0!==n&&n.closest(lz)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}});return Boolean(e.nextNode())}()}!async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var t,n,u,c,d,h,p;const f=(null===(t=document)||void 0===t||null===(n=t.location)||void 0===n?void 0:n.href)||"";if(e){if(globalThis.GM=globalThis.GM||{},globalThis.GM.xmlHttpRequest=globalThis.GM.xmlHttpRequest||globalThis.GM_xmlhttpRequest,globalThis.GM.registerMenuCommand=globalThis.GM.registerMenuCommand||globalThis.GM_registerMenuCommand,globalThis.GM.unregisterMenuCommand=globalThis.GM.unregisterMenuCommand||globalThis.GM_unregisterMenuCommand,globalThis.GM.setValue=globalThis.GM.setValue||globalThis.GM_setValue,globalThis.GM.getValue=globalThis.GM.getValue||globalThis.GM_getValue,globalThis.GM.deleteValue=globalThis.GM.deleteValue||globalThis.GM_deleteValue,globalThis.GM.info=globalThis.GM.info||globalThis.GM_info,function(e){return["https://kiss-translator.rayjar.com/options","https://fishjar.github.io/kiss-translator/options.html","https://kiss-translator-dev.rayjar.com/options","http://localhost:3000/options.html"].filter(Boolean).some(t=>e.startsWith(t))}(f))return void sz();const{runDataMigration:e}=await Promise.resolve().then(i.bind(i,8930));await e()}const m=await(0,a.C$)();ht.vF.setLevel(m.logLevel);const g=(null===(u=document)||void 0===u||null===(c=u.contentType)||void 0===c?void 0:c.toLowerCase())||"",v=g.includes("application/pdf");if(!g.includes("text")&&!g.includes("html")&&!v)return void ht.vF.info("Skip running in document content type: ",g);if(za(f,m.blacklist))return;if(s&&!await uz())return;za(f,null===(d=m.tranboxSetting)||void 0===d?void 0:d.blacklist)&&(m.tranboxSetting.transOpen=!1),za(f,null===(h=m.inputRule)||void 0===h?void 0:h.blacklist)&&(m.inputRule.transOpen=!1),za(f,null===(p=m.mouseHoverSetting)||void 0===p?void 0:p.blacklist)&&(m.mouseHoverSetting.useMouseHover=!1);const y=await Fa(f,m),b=await async function(e){if(e.highlightWords&&e.highlightWords!==o.Gie)try{return Object.keys(await(0,a.lk)())}catch(e){ht.vF.info("get fav words",e)}return[]}(y),A=(0,r.A)({},await(0,a.Zu)());s||v||!za(f,A.hideExceptionList)||(A.isHide=!A.isHide);if(new ML({setting:m,rule:y,fabConfig:A,favWords:b,isIframe:s,isUserscript:e,transboxOnly:v}).start(),s||v)return;!function(e){let{href:t,setting:n}=e;try{const e=n.subtitleSetting||hc.Oc;if(!e.enabled)return;const o=yc.find(e=>(0,l.uv)(t,e.pattern));if(o){var i;vc(fc,"kiss-translator-inject-subtitle-js");const t=n.transApis||[],a=t.find(t=>t.apiSlug===e.apiSlug)||j.iV;o.start((0,r.A)((0,r.A)({},e),{},{apiSetting:a,transApis:t,prompts:n.prompts,uiLang:n.uiLang,translateVariants:null===(i=n.translateVariants)||void 0===i||i}))}}catch(e){ht.vF.error("start subtitle provider failed",e)}}({href:f,setting:m,rule:y,isUserscript:e}),e&&zn(m)}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)})()})();