@dao42/d42paas-front 0.9.159 → 0.9.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/DaoPaaS.cjs CHANGED
@@ -46,7 +46,7 @@ Error generating stack: `+s.message+`
46
46
  * This source code is licensed under the MIT license found in the
47
47
  * LICENSE file in the root directory of this source tree.
48
48
  */var ox=I.exports,c$e=VJ.exports;function u$e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var d$e=typeof Object.is=="function"?Object.is:u$e,h$e=c$e.useSyncExternalStore,f$e=ox.useRef,O$e=ox.useEffect,p$e=ox.useMemo,m$e=ox.useDebugValue;jJ.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=f$e(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=p$e(function(){function l(f){if(!c){if(c=!0,u=f,f=r(f),i!==void 0&&o.hasValue){var p=o.value;if(i(p,f))return d=p}return d=f}if(p=d,d$e(u,f))return p;var v=r(f);return i!==void 0&&i(p,v)?p:(u=f,d=v)}var c=!1,u,d,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=h$e(t,s[0],s[1]);return O$e(function(){o.hasValue=!0,o.value=a},[a]),m$e(a),a};ZJ.exports=jJ;var g$e=ZJ.exports;const{useSyncExternalStoreWithSelector:v$e}=g$e;function y$e(t,e=t.getState,n){const r=v$e(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return I.exports.useDebugValue(r),r}const BL=t=>{const e=typeof t=="function"?YJ(t):t,n=(r,i)=>y$e(e,r,i);return Object.assign(n,e),n},b$e=t=>t?BL(t):BL;var _$e=b$e;const $$e=(t,e={})=>(n,r,i)=>{const{enabled:s,anonymousActionType:o,...a}=e;let l;try{l=(s!=null?s:({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&s&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const c=l.connect(a);let u=!0;i.setState=(f,p,v)=>{const O=n(f,p);return u&&c.send(v===void 0?{type:o||"anonymous"}:typeof v=="string"?{type:v}:v,r()),O};const d=(...f)=>{const p=u;u=!1,n(...f),u=p},h=t(i.setState,r,i);if(c.init(h),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let f=!1;const p=i.dispatch;i.dispatch=(...v)=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&v[0].type==="__setState"&&!f&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),f=!0),p(...v)}}return c.subscribe(f=>{var p;switch(f.type){case"ACTION":if(typeof f.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return L9(f.payload,v=>{if(v.type==="__setState"){d(v.state);return}!i.dispatchFromDevtools||typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(f.payload.type){case"RESET":return d(h),c.init(i.getState());case"COMMIT":return c.init(i.getState());case"ROLLBACK":return L9(f.state,v=>{d(v),c.init(i.getState())});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return L9(f.state,v=>{d(v)});case"IMPORT_STATE":{const{nextLiftedState:v}=f.payload,O=(p=v.computedStates.slice(-1)[0])==null?void 0:p.state;if(!O)return;d(O),c.send(null,v);return}case"PAUSE_RECORDING":return u=!u}return}}),h},S$e=$$e,L9=(t,e)=>{let n;try{n=JSON.parse(t)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&e(n)},FS=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return FS(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return FS(r)(n)}}}},w$e=(t,e)=>(n,r,i)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:O=>O,version:0,merge:(O,g)=>({...g,...O}),...e},o=!1;const a=new Set,l=new Set;let c;try{c=s.getStorage()}catch{}if(!c)return t((...O)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...O)},r,i);const u=FS(s.serialize),d=()=>{const O=s.partialize({...r()});let g;const y=u({state:O,version:s.version}).then(b=>c.setItem(s.name,b)).catch(b=>{g=b});if(g)throw g;return y},h=i.setState;i.setState=(O,g)=>{h(O,g),d()};const f=t((...O)=>{n(...O),d()},r,i);let p;const v=()=>{var O;if(!c)return;o=!1,a.forEach(y=>y(r()));const g=((O=s.onRehydrateStorage)==null?void 0:O.call(s,r()))||void 0;return FS(c.getItem.bind(c))(s.name).then(y=>{if(y)return s.deserialize(y)}).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==s.version){if(s.migrate)return s.migrate(y.state,y.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return y.state}).then(y=>{var b;return p=s.merge(y,(b=r())!=null?b:f),n(p,!0),d()}).then(()=>{g==null||g(p,void 0),o=!0,l.forEach(y=>y(p))}).catch(y=>{g==null||g(void 0,y)})};return i.persist={setOptions:O=>{s={...s,...O},O.getStorage&&(c=O.getStorage())},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:O=>(a.add(O),()=>{a.delete(O)}),onFinishHydration:O=>(l.add(O),()=>{l.delete(O)})},v(),p||f},x$e=w$e,k$e=(t,e)=>{const n={};return Object.keys(t.getState()).forEach(r=>{n[r]=i=>{if(t.getState()[r]===i)return;const o=r.replace(/^\S/,a=>a.toUpperCase());t.setState(a=>{a[r]=i},`@@${e}/set${o}`)}}),n},T$e=(t,e)=>{const n=t(e.set,e.get,e);return{...e,set:{...e.set,...n}}},P$e=(t,e)=>{const n={...e.use},r={...e.useTracked},i={...e.get};return Object.keys(t(e.store.getState(),e.get,e)).forEach(s=>{n[s]=(...o)=>e.useStore(a=>{const c=t(a,e.get,e)[s];return c(...o)}),r[s]=(...o)=>{const a=e.useTrackedStore(),c=t(a,e.get,e)[s];return c(...o)},i[s]=(...o)=>{const l=t(e.store.getState(),e.get,e)[s];return l(...o)}}),{...e,get:i,use:n,useTracked:r}},A8=t=>({...t,extendSelectors:e=>A8(P$e(e,t)),extendActions:e=>A8(T$e(e,t))}),Q$e=t=>{const e={};return Object.keys(t.getState()).forEach(n=>{e[n]=()=>t.getState()[n]}),e},E$e=t=>{const e={};return Object.keys(t.getState()).forEach(n=>{e[n]=r=>t(i=>i[n],r)}),e},C$e=(t,e)=>{const n={};return Object.keys(t.getState()).forEach(r=>{n[r]=()=>e()[r]}),n},R$e=t=>(e,n,r)=>{const i=(s,o)=>e(Z_e(s),!0,o);return r.setState=i,t(i,n,r)};function A$e(t,...e){return e.reduce((n,r)=>r(n),t)}const Rb=t=>(e,n={})=>{var r;const{middlewares:i=[],devtools:s,persist:o,immer:a}=n;j_e((r=a==null?void 0:a.enabledAutoFreeze)!==null&&r!==void 0?r:!1),a!=null&&a.enableMapSet&&U_e();const l=[R$e,...i];o!=null&&o.enabled&&l.push($=>x$e($,{...o,name:t})),s!=null&&s.enabled&&l.push($=>S$e($,{...s,name:t})),l.push(YJ);const u=($=>A$e($,...l))(()=>e),d=_$e(u),h=k$e(d,t),f=($,w)=>{u.setState(x=>{Object.assign(x,$)},w||`@@${t}/mergeState`)},p=($,w)=>{u.setState($,w||`@@${t}/setState`)},v=E$e(d),O=Q$e(d),g=J_e(d),y=C$e(d,g),b={get:{state:u.getState,...O},name:t,set:{state:p,mergeState:f,...h},store:u,use:v,useTracked:y,useStore:d,useTrackedStore:g,extendSelectors:()=>b,extendActions:()=>b};return A8(b)};var x$=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function HJ(t,e){return e={exports:{}},t(e,e.exports),e.exports}var I$e=typeof x$=="object"&&x$&&x$.Object===Object&&x$,KJ=I$e,N$e=typeof self=="object"&&self&&self.Object===Object&&self,D$e=KJ||N$e||Function("return this")(),vh=D$e,M$e=vh.Symbol,Df=M$e,JJ=Object.prototype,z$e=JJ.hasOwnProperty,L$e=JJ.toString,Og=Df?Df.toStringTag:void 0;function X$e(t){var e=z$e.call(t,Og),n=t[Og];try{t[Og]=void 0;var r=!0}catch{}var i=L$e.call(t);return r&&(e?t[Og]=n:delete t[Og]),i}var U$e=X$e,W$e=Object.prototype,q$e=W$e.toString;function F$e(t){return q$e.call(t)}var B$e=F$e,Y$e="[object Null]",Z$e="[object Undefined]",YL=Df?Df.toStringTag:void 0;function j$e(t){return t==null?t===void 0?Z$e:Y$e:YL&&YL in Object(t)?U$e(t):B$e(t)}var g0=j$e;function V$e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var LR=V$e,G$e="[object AsyncFunction]",H$e="[object Function]",K$e="[object GeneratorFunction]",J$e="[object Proxy]";function e5e(t){if(!LR(t))return!1;var e=g0(t);return e==H$e||e==K$e||e==G$e||e==J$e}var eee=e5e,t5e=vh["__core-js_shared__"],X9=t5e,ZL=function(){var t=/[^.]+$/.exec(X9&&X9.keys&&X9.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function n5e(t){return!!ZL&&ZL in t}var r5e=n5e,i5e=Function.prototype,s5e=i5e.toString;function o5e(t){if(t!=null){try{return s5e.call(t)}catch{}try{return t+""}catch{}}return""}var Pp=o5e,a5e=/[\\^$.*+?()[\]{}|]/g,l5e=/^\[object .+?Constructor\]$/,c5e=Function.prototype,u5e=Object.prototype,d5e=c5e.toString,h5e=u5e.hasOwnProperty,f5e=RegExp("^"+d5e.call(h5e).replace(a5e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O5e(t){if(!LR(t)||r5e(t))return!1;var e=eee(t)?f5e:l5e;return e.test(Pp(t))}var p5e=O5e;function m5e(t,e){return t==null?void 0:t[e]}var g5e=m5e;function v5e(t,e){var n=g5e(t,e);return p5e(n)?n:void 0}var Qp=v5e,y5e=function(){try{var t=Qp(Object,"defineProperty");return t({},"",{}),t}catch{}}(),jL=y5e;function b5e(t,e,n){e=="__proto__"&&jL?jL(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var _5e=b5e;function $5e(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[t?a:++i];if(n(s[l],l,s)===!1)break}return e}}var S5e=$5e,w5e=S5e(),x5e=w5e;function k5e(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var T5e=k5e;function P5e(t){return t!=null&&typeof t=="object"}var Dm=P5e,Q5e="[object Arguments]";function E5e(t){return Dm(t)&&g0(t)==Q5e}var VL=E5e,tee=Object.prototype,C5e=tee.hasOwnProperty,R5e=tee.propertyIsEnumerable,A5e=VL(function(){return arguments}())?VL:function(t){return Dm(t)&&C5e.call(t,"callee")&&!R5e.call(t,"callee")},nee=A5e,I5e=Array.isArray,uh=I5e;function N5e(){return!1}var D5e=N5e,I8=HJ(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,s=i?vh.Buffer:void 0,o=s?s.isBuffer:void 0,a=o||D5e;t.exports=a}),M5e=9007199254740991,z5e=/^(?:0|[1-9]\d*)$/;function L5e(t,e){var n=typeof t;return e=e==null?M5e:e,!!e&&(n=="number"||n!="symbol"&&z5e.test(t))&&t>-1&&t%1==0&&t<e}var ree=L5e,X5e=9007199254740991;function U5e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=X5e}var XR=U5e,W5e="[object Arguments]",q5e="[object Array]",F5e="[object Boolean]",B5e="[object Date]",Y5e="[object Error]",Z5e="[object Function]",j5e="[object Map]",V5e="[object Number]",G5e="[object Object]",H5e="[object RegExp]",K5e="[object Set]",J5e="[object String]",e2e="[object WeakMap]",t2e="[object ArrayBuffer]",n2e="[object DataView]",r2e="[object Float32Array]",i2e="[object Float64Array]",s2e="[object Int8Array]",o2e="[object Int16Array]",a2e="[object Int32Array]",l2e="[object Uint8Array]",c2e="[object Uint8ClampedArray]",u2e="[object Uint16Array]",d2e="[object Uint32Array]",Ii={};Ii[r2e]=Ii[i2e]=Ii[s2e]=Ii[o2e]=Ii[a2e]=Ii[l2e]=Ii[c2e]=Ii[u2e]=Ii[d2e]=!0;Ii[W5e]=Ii[q5e]=Ii[t2e]=Ii[F5e]=Ii[n2e]=Ii[B5e]=Ii[Y5e]=Ii[Z5e]=Ii[j5e]=Ii[V5e]=Ii[G5e]=Ii[H5e]=Ii[K5e]=Ii[J5e]=Ii[e2e]=!1;function h2e(t){return Dm(t)&&XR(t.length)&&!!Ii[g0(t)]}var f2e=h2e;function O2e(t){return function(e){return t(e)}}var p2e=O2e,GL=HJ(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,s=i&&KJ.process,o=function(){try{var a=r&&r.require&&r.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}}();t.exports=o}),HL=GL&&GL.isTypedArray,m2e=HL?p2e(HL):f2e,iee=m2e,g2e=Object.prototype,v2e=g2e.hasOwnProperty;function y2e(t,e){var n=uh(t),r=!n&&nee(t),i=!n&&!r&&I8(t),s=!n&&!r&&!i&&iee(t),o=n||r||i||s,a=o?T5e(t.length,String):[],l=a.length;for(var c in t)(e||v2e.call(t,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ree(c,l)))&&a.push(c);return a}var b2e=y2e,_2e=Object.prototype;function $2e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||_2e;return t===n}var S2e=$2e;function w2e(t,e){return function(n){return t(e(n))}}var x2e=w2e,k2e=x2e(Object.keys,Object),T2e=k2e,P2e=Object.prototype,Q2e=P2e.hasOwnProperty;function E2e(t){if(!S2e(t))return T2e(t);var e=[];for(var n in Object(t))Q2e.call(t,n)&&n!="constructor"&&e.push(n);return e}var C2e=E2e;function R2e(t){return t!=null&&XR(t.length)&&!eee(t)}var A2e=R2e;function I2e(t){return A2e(t)?b2e(t):C2e(t)}var UR=I2e;function N2e(t,e){return t&&x5e(t,e,UR)}var D2e=N2e;function M2e(){this.__data__=[],this.size=0}var z2e=M2e;function L2e(t,e){return t===e||t!==t&&e!==e}var see=L2e;function X2e(t,e){for(var n=t.length;n--;)if(see(t[n][0],e))return n;return-1}var ax=X2e,U2e=Array.prototype,W2e=U2e.splice;function q2e(t){var e=this.__data__,n=ax(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():W2e.call(e,n,1),--this.size,!0}var F2e=q2e;function B2e(t){var e=this.__data__,n=ax(e,t);return n<0?void 0:e[n][1]}var Y2e=B2e;function Z2e(t){return ax(this.__data__,t)>-1}var j2e=Z2e;function V2e(t,e){var n=this.__data__,r=ax(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var G2e=V2e;function v0(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}v0.prototype.clear=z2e;v0.prototype.delete=F2e;v0.prototype.get=Y2e;v0.prototype.has=j2e;v0.prototype.set=G2e;var lx=v0;function H2e(){this.__data__=new lx,this.size=0}var K2e=H2e;function J2e(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var eSe=J2e;function tSe(t){return this.__data__.get(t)}var nSe=tSe;function rSe(t){return this.__data__.has(t)}var iSe=rSe,sSe=Qp(vh,"Map"),xy=sSe,oSe=Qp(Object,"create"),ky=oSe;function aSe(){this.__data__=ky?ky(null):{},this.size=0}var lSe=aSe;function cSe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var uSe=cSe,dSe="__lodash_hash_undefined__",hSe=Object.prototype,fSe=hSe.hasOwnProperty;function OSe(t){var e=this.__data__;if(ky){var n=e[t];return n===dSe?void 0:n}return fSe.call(e,t)?e[t]:void 0}var pSe=OSe,mSe=Object.prototype,gSe=mSe.hasOwnProperty;function vSe(t){var e=this.__data__;return ky?e[t]!==void 0:gSe.call(e,t)}var ySe=vSe,bSe="__lodash_hash_undefined__";function _Se(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ky&&e===void 0?bSe:e,this}var $Se=_Se;function y0(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}y0.prototype.clear=lSe;y0.prototype.delete=uSe;y0.prototype.get=pSe;y0.prototype.has=ySe;y0.prototype.set=$Se;var KL=y0;function SSe(){this.size=0,this.__data__={hash:new KL,map:new(xy||lx),string:new KL}}var wSe=SSe;function xSe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var kSe=xSe;function TSe(t,e){var n=t.__data__;return kSe(e)?n[typeof e=="string"?"string":"hash"]:n.map}var cx=TSe;function PSe(t){var e=cx(this,t).delete(t);return this.size-=e?1:0,e}var QSe=PSe;function ESe(t){return cx(this,t).get(t)}var CSe=ESe;function RSe(t){return cx(this,t).has(t)}var ASe=RSe;function ISe(t,e){var n=cx(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var NSe=ISe;function b0(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}b0.prototype.clear=wSe;b0.prototype.delete=QSe;b0.prototype.get=CSe;b0.prototype.has=ASe;b0.prototype.set=NSe;var ux=b0,DSe=200;function MSe(t,e){var n=this.__data__;if(n instanceof lx){var r=n.__data__;if(!xy||r.length<DSe-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ux(r)}return n.set(t,e),this.size=n.size,this}var zSe=MSe;function _0(t){var e=this.__data__=new lx(t);this.size=e.size}_0.prototype.clear=K2e;_0.prototype.delete=eSe;_0.prototype.get=nSe;_0.prototype.has=iSe;_0.prototype.set=zSe;var T2=_0,LSe="__lodash_hash_undefined__";function XSe(t){return this.__data__.set(t,LSe),this}var USe=XSe;function WSe(t){return this.__data__.has(t)}var qSe=WSe;function BS(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new ux;++e<n;)this.add(t[e])}BS.prototype.add=BS.prototype.push=USe;BS.prototype.has=qSe;var FSe=BS;function BSe(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var YSe=BSe;function ZSe(t,e){return t.has(e)}var jSe=ZSe,VSe=1,GSe=2;function HSe(t,e,n,r,i,s){var o=n&VSe,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(t),u=s.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&GSe?new FSe:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var p=t[d],v=e[d];if(r)var O=o?r(v,p,d,e,t,s):r(p,v,d,t,e,s);if(O!==void 0){if(O)continue;h=!1;break}if(f){if(!YSe(e,function(g,y){if(!jSe(f,y)&&(p===g||i(p,g,n,r,s)))return f.push(y)})){h=!1;break}}else if(!(p===v||i(p,v,n,r,s))){h=!1;break}}return s.delete(t),s.delete(e),h}var oee=HSe,KSe=vh.Uint8Array,JL=KSe;function JSe(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var e4e=JSe;function t4e(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var n4e=t4e,r4e=1,i4e=2,s4e="[object Boolean]",o4e="[object Date]",a4e="[object Error]",l4e="[object Map]",c4e="[object Number]",u4e="[object RegExp]",d4e="[object Set]",h4e="[object String]",f4e="[object Symbol]",O4e="[object ArrayBuffer]",p4e="[object DataView]",eX=Df?Df.prototype:void 0,U9=eX?eX.valueOf:void 0;function m4e(t,e,n,r,i,s,o){switch(n){case p4e:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case O4e:return!(t.byteLength!=e.byteLength||!s(new JL(t),new JL(e)));case s4e:case o4e:case c4e:return see(+t,+e);case a4e:return t.name==e.name&&t.message==e.message;case u4e:case h4e:return t==e+"";case l4e:var a=e4e;case d4e:var l=r&r4e;if(a||(a=n4e),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;r|=i4e,o.set(t,e);var u=oee(a(t),a(e),r,i,s,o);return o.delete(t),u;case f4e:if(U9)return U9.call(t)==U9.call(e)}return!1}var g4e=m4e;function v4e(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var y4e=v4e;function b4e(t,e,n){var r=e(t);return uh(t)?r:y4e(r,n(t))}var _4e=b4e;function $4e(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}var S4e=$4e;function w4e(){return[]}var x4e=w4e,k4e=Object.prototype,T4e=k4e.propertyIsEnumerable,tX=Object.getOwnPropertySymbols,P4e=tX?function(t){return t==null?[]:(t=Object(t),S4e(tX(t),function(e){return T4e.call(t,e)}))}:x4e,Q4e=P4e;function E4e(t){return _4e(t,UR,Q4e)}var nX=E4e,C4e=1,R4e=Object.prototype,A4e=R4e.hasOwnProperty;function I4e(t,e,n,r,i,s){var o=n&C4e,a=nX(t),l=a.length,c=nX(e),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in e:A4e.call(e,h)))return!1}var f=s.get(t),p=s.get(e);if(f&&p)return f==e&&p==t;var v=!0;s.set(t,e),s.set(e,t);for(var O=o;++d<l;){h=a[d];var g=t[h],y=e[h];if(r)var b=o?r(y,g,h,e,t,s):r(g,y,h,t,e,s);if(!(b===void 0?g===y||i(g,y,n,r,s):b)){v=!1;break}O||(O=h=="constructor")}if(v&&!O){var $=t.constructor,w=e.constructor;$!=w&&"constructor"in t&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof w=="function"&&w instanceof w)&&(v=!1)}return s.delete(t),s.delete(e),v}var N4e=I4e,D4e=Qp(vh,"DataView"),N8=D4e,M4e=Qp(vh,"Promise"),D8=M4e,z4e=Qp(vh,"Set"),M8=z4e,L4e=Qp(vh,"WeakMap"),z8=L4e,rX="[object Map]",X4e="[object Object]",iX="[object Promise]",sX="[object Set]",oX="[object WeakMap]",aX="[object DataView]",U4e=Pp(N8),W4e=Pp(xy),q4e=Pp(D8),F4e=Pp(M8),B4e=Pp(z8),CO=g0;(N8&&CO(new N8(new ArrayBuffer(1)))!=aX||xy&&CO(new xy)!=rX||D8&&CO(D8.resolve())!=iX||M8&&CO(new M8)!=sX||z8&&CO(new z8)!=oX)&&(CO=function(t){var e=g0(t),n=e==X4e?t.constructor:void 0,r=n?Pp(n):"";if(r)switch(r){case U4e:return aX;case W4e:return rX;case q4e:return iX;case F4e:return sX;case B4e:return oX}return e});var lX=CO,Y4e=1,cX="[object Arguments]",uX="[object Array]",k$="[object Object]",Z4e=Object.prototype,dX=Z4e.hasOwnProperty;function j4e(t,e,n,r,i,s){var o=uh(t),a=uh(e),l=o?uX:lX(t),c=a?uX:lX(e);l=l==cX?k$:l,c=c==cX?k$:c;var u=l==k$,d=c==k$,h=l==c;if(h&&I8(t)){if(!I8(e))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new T2),o||iee(t)?oee(t,e,n,r,i,s):g4e(t,e,l,n,r,i,s);if(!(n&Y4e)){var f=u&&dX.call(t,"__wrapped__"),p=d&&dX.call(e,"__wrapped__");if(f||p){var v=f?t.value():t,O=p?e.value():e;return s||(s=new T2),i(v,O,n,r,s)}}return h?(s||(s=new T2),N4e(t,e,n,r,i,s)):!1}var V4e=j4e;function aee(t,e,n,r,i){return t===e?!0:t==null||e==null||!Dm(t)&&!Dm(e)?t!==t&&e!==e:V4e(t,e,n,r,aee,i)}var lee=aee,G4e=1,H4e=2;function K4e(t,e,n,r){var i=n.length,s=i,o=!r;if(t==null)return!s;for(t=Object(t);i--;){var a=n[i];if(o&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<s;){a=n[i];var l=a[0],c=t[l],u=a[1];if(o&&a[2]){if(c===void 0&&!(l in t))return!1}else{var d=new T2;if(r)var h=r(c,u,l,t,e,d);if(!(h===void 0?lee(u,c,G4e|H4e,r,d):h))return!1}}return!0}var J4e=K4e;function ewe(t){return t===t&&!LR(t)}var cee=ewe;function twe(t){for(var e=UR(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,cee(i)]}return e}var nwe=twe;function rwe(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var uee=rwe;function iwe(t){var e=nwe(t);return e.length==1&&e[0][2]?uee(e[0][0],e[0][1]):function(n){return n===t||J4e(n,t,e)}}var swe=iwe,owe="[object Symbol]";function awe(t){return typeof t=="symbol"||Dm(t)&&g0(t)==owe}var WR=awe,lwe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cwe=/^\w*$/;function uwe(t,e){if(uh(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||WR(t)?!0:cwe.test(t)||!lwe.test(t)||e!=null&&t in Object(e)}var qR=uwe,dwe="Expected a function";function FR(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(dwe);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(FR.Cache||ux),n}FR.Cache=ux;var hwe=FR,fwe=500;function Owe(t){var e=hwe(t,function(r){return n.size===fwe&&n.clear(),r}),n=e.cache;return e}var pwe=Owe,mwe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gwe=/\\(\\)?/g,vwe=pwe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(mwe,function(n,r,i,s){e.push(i?s.replace(gwe,"$1"):r||n)}),e}),ywe=vwe;function bwe(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var _we=bwe,$we=1/0,hX=Df?Df.prototype:void 0,fX=hX?hX.toString:void 0;function dee(t){if(typeof t=="string")return t;if(uh(t))return _we(t,dee)+"";if(WR(t))return fX?fX.call(t):"";var e=t+"";return e=="0"&&1/t==-$we?"-0":e}var Swe=dee;function wwe(t){return t==null?"":Swe(t)}var xwe=wwe;function kwe(t,e){return uh(t)?t:qR(t,e)?[t]:ywe(xwe(t))}var hee=kwe,Twe=1/0;function Pwe(t){if(typeof t=="string"||WR(t))return t;var e=t+"";return e=="0"&&1/t==-Twe?"-0":e}var dx=Pwe;function Qwe(t,e){e=hee(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[dx(e[n++])];return n&&n==r?t:void 0}var fee=Qwe;function Ewe(t,e,n){var r=t==null?void 0:fee(t,e);return r===void 0?n:r}var Cwe=Ewe;function Rwe(t,e){return t!=null&&e in Object(t)}var Awe=Rwe;function Iwe(t,e,n){e=hee(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=dx(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&XR(i)&&ree(o,i)&&(uh(t)||nee(t)))}var Nwe=Iwe;function Dwe(t,e){return t!=null&&Nwe(t,e,Awe)}var Mwe=Dwe,zwe=1,Lwe=2;function Xwe(t,e){return qR(t)&&cee(e)?uee(dx(t),e):function(n){var r=Cwe(n,t);return r===void 0&&r===e?Mwe(n,t):lee(e,r,zwe|Lwe)}}var Uwe=Xwe;function Wwe(t){return t}var qwe=Wwe;function Fwe(t){return function(e){return e==null?void 0:e[t]}}var Bwe=Fwe;function Ywe(t){return function(e){return fee(e,t)}}var Zwe=Ywe;function jwe(t){return qR(t)?Bwe(dx(t)):Zwe(t)}var Vwe=jwe;function Gwe(t){return typeof t=="function"?t:t==null?qwe:typeof t=="object"?uh(t)?Uwe(t[0],t[1]):swe(t):Vwe(t)}var Hwe=Gwe;function Kwe(t,e){var n={};return e=Hwe(e),D2e(t,function(r,i,s){_5e(n,i,e(r,i,s))}),n}var Jwe=Kwe;const hx=(t,e)=>Jwe(e,n=>n[t]),Ku=Object.create(null);Ku.open="0";Ku.close="1";Ku.ping="2";Ku.pong="3";Ku.message="4";Ku.upgrade="5";Ku.noop="6";const P2=Object.create(null);Object.keys(Ku).forEach(t=>{P2[Ku[t]]=t});const exe={type:"error",data:"parser error"},txe=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",nxe=typeof ArrayBuffer=="function",rxe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Oee=({type:t,data:e},n,r)=>txe&&e instanceof Blob?n?r(e):OX(e,r):nxe&&(e instanceof ArrayBuffer||rxe(e))?n?r(e):OX(new Blob([e]),r):r(Ku[t]+(e||"")),OX=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+r)},n.readAsDataURL(t)},pX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kg=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let t=0;t<pX.length;t++)Kg[pX.charCodeAt(t)]=t;const ixe=t=>{let e=t.length*.75,n=t.length,r,i=0,s,o,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const c=new ArrayBuffer(e),u=new Uint8Array(c);for(r=0;r<n;r+=4)s=Kg[t.charCodeAt(r)],o=Kg[t.charCodeAt(r+1)],a=Kg[t.charCodeAt(r+2)],l=Kg[t.charCodeAt(r+3)],u[i++]=s<<2|o>>4,u[i++]=(o&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},sxe=typeof ArrayBuffer=="function",pee=(t,e)=>{if(typeof t!="string")return{type:"message",data:mee(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:oxe(t.substring(1),e)}:P2[n]?t.length>1?{type:P2[n],data:t.substring(1)}:{type:P2[n]}:exe},oxe=(t,e)=>{if(sxe){const n=ixe(t);return mee(n,e)}else return{base64:!0,data:t}},mee=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}},gee=String.fromCharCode(30),axe=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((s,o)=>{Oee(s,!1,a=>{r[o]=a,++i===n&&e(r.join(gee))})})},lxe=(t,e)=>{const n=t.split(gee),r=[];for(let i=0;i<n.length;i++){const s=pee(n[i],e);if(r.push(s),s.type==="error")break}return r},vee=4;function Rs(t){if(t)return cxe(t)}function cxe(t){for(var e in Rs.prototype)t[e]=Rs.prototype[e];return t}Rs.prototype.on=Rs.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};Rs.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};Rs.prototype.off=Rs.prototype.removeListener=Rs.prototype.removeAllListeners=Rs.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===e||r.fn===e){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+t],this};Rs.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,e)}return this};Rs.prototype.emitReserved=Rs.prototype.emit;Rs.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};Rs.prototype.hasListeners=function(t){return!!this.listeners(t).length};const lf=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function yee(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const uxe=setTimeout,dxe=clearTimeout;function fx(t,e){e.useNativeTimers?(t.setTimeoutFn=uxe.bind(lf),t.clearTimeoutFn=dxe.bind(lf)):(t.setTimeoutFn=setTimeout.bind(lf),t.clearTimeoutFn=clearTimeout.bind(lf))}const hxe=1.33;function fxe(t){return typeof t=="string"?Oxe(t):Math.ceil((t.byteLength||t.size)*hxe)}function Oxe(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}class pxe extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class bee extends Rs{constructor(e){super(),this.writable=!1,fx(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new pxe(e,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=pee(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}}const _ee="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),L8=64,mxe={};let mX=0,T$=0,gX;function vX(t){let e="";do e=_ee[t%L8]+e,t=Math.floor(t/L8);while(t>0);return e}function $ee(){const t=vX(+new Date);return t!==gX?(mX=0,gX=t):t+"."+vX(mX++)}for(;T$<L8;T$++)mxe[_ee[T$]]=T$;function See(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function gxe(t){let e={},n=t.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}let wee=!1;try{wee=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch{}const vxe=wee;function xee(t){const e=t.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!e||vxe))return new XMLHttpRequest}catch{}if(!e)try{return new lf[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function yxe(){}const bxe=function(){return new xee({xdomain:!1}).responseType!=null}();class _xe extends bee{constructor(e){if(super(e),this.polling=!1,typeof location!="undefined"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location!="undefined"&&e.hostname!==location.hostname||i!==e.port,this.xs=e.secure!==r}const n=e&&e.forceBase64;this.supportsBinary=bxe&&!n}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};lxe(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,axe(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=$ee()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=See(e),s=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(s?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new Yu(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class Yu extends Rs{constructor(e,n){super(),fx(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const e=yee(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const n=this.xhr=new xee(e);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document!="undefined"&&(this.index=Yu.requestsCount++,Yu.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.xhr.onreadystatechange=yxe,e)try{this.xhr.abort()}catch{}typeof document!="undefined"&&delete Yu.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Yu.requestsCount=0;Yu.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",yX);else if(typeof addEventListener=="function"){const t="onpagehide"in lf?"pagehide":"unload";addEventListener(t,yX,!1)}}function yX(){for(let t in Yu.requests)Yu.requests.hasOwnProperty(t)&&Yu.requests[t].abort()}const $xe=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0))(),P$=lf.WebSocket||lf.MozWebSocket,bX=!0,Sxe="arraybuffer",_X=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class wxe extends bee{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=_X?{}:yee(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=bX&&!_X?n?new P$(e,n):new P$(e):new P$(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Sxe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;Oee(r,this.supportsBinary,s=>{const o={};try{bX&&this.ws.send(s)}catch{}i&&$xe(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=$ee()),this.supportsBinary||(e.b64=1);const i=See(e),s=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(s?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!P$}}const xxe={websocket:wxe,polling:_xe},kxe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Txe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function X8(t){const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=kxe.exec(t||""),s={},o=14;for(;o--;)s[Txe[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Pxe(s,s.path),s.queryKey=Qxe(s,s.query),s}function Pxe(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.substr(0,1)=="/"||e.length===0)&&r.splice(0,1),e.substr(e.length-1,1)=="/"&&r.splice(r.length-1,1),r}function Qxe(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}class tf extends Rs{constructor(e,n={}){super(),e&&typeof e=="object"&&(n=e,e=null),e?(e=X8(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=X8(n.host).host),fx(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=gxe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},!1),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=vee,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[e],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new xxe[e](r)}open(){let e;if(this.opts.rememberUpgrade&&tf.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),r=!1;tf.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;tf.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function s(){r||(r=!0,u(),n.close(),n=null)}const o=d=>{const h=new Error("probe error: "+d);h.transport=n.name,s(),this.emitReserved("upgradeError",h)};function a(){o("transport closed")}function l(){o("socket closed")}function c(d){n&&d.name!==n.name&&s()}const u=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",tf.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=fxe(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:e,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){tf.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;r<i;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}}tf.protocol=vee;function Exe(t,e="",n){let r=t;n=n||typeof location!="undefined"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n!="undefined"?t=n.protocol+"//"+t:t="https://"+t),r=X8(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const Cxe=typeof ArrayBuffer=="function",Rxe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,kee=Object.prototype.toString,Axe=typeof Blob=="function"||typeof Blob!="undefined"&&kee.call(Blob)==="[object BlobConstructor]",Ixe=typeof File=="function"||typeof File!="undefined"&&kee.call(File)==="[object FileConstructor]";function BR(t){return Cxe&&(t instanceof ArrayBuffer||Rxe(t))||Axe&&t instanceof Blob||Ixe&&t instanceof File}function Q2(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Q2(t[n]))return!0;return!1}if(BR(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Q2(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Q2(t[n]))return!0;return!1}function Nxe(t){const e=[],n=t.data,r=t;return r.data=U8(n,e),r.attachments=e.length,{packet:r,buffers:e}}function U8(t,e){if(!t)return t;if(BR(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=U8(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=U8(t[r],e));return n}return t}function Dxe(t,e){return t.data=W8(t.data,e),t.attachments=void 0,t}function W8(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=W8(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=W8(t[n],e));return t}const Mxe=5;var Sr;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Sr||(Sr={}));class zxe{constructor(e){this.replacer=e}encode(e){return(e.type===Sr.EVENT||e.type===Sr.ACK)&&Q2(e)?(e.type=e.type===Sr.EVENT?Sr.BINARY_EVENT:Sr.BINARY_ACK,this.encodeAsBinary(e)):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===Sr.BINARY_EVENT||e.type===Sr.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=Nxe(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class YR extends Rs{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string")n=this.decodeString(e),n.type===Sr.BINARY_EVENT||n.type===Sr.BINARY_ACK?(this.reconstructor=new Lxe(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n);else if(BR(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(Sr[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Sr.BINARY_EVENT||r.type===Sr.BINARY_ACK){const s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const o=e.substring(s,n);if(o!=Number(o)||e.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(e.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(s,n)}else r.nsp="/";const i=e.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=e.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===e.length)break}r.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){const s=this.tryParse(e.substr(n));if(YR.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case Sr.CONNECT:return typeof n=="object";case Sr.DISCONNECT:return n===void 0;case Sr.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case Sr.EVENT:case Sr.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case Sr.ACK:case Sr.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Lxe{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=Dxe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var Xxe=Object.freeze(Object.defineProperty({__proto__:null,protocol:Mxe,get PacketType(){return Sr},Encoder:zxe,Decoder:YR},Symbol.toStringTag,{value:"Module"}));function Yc(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Uxe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Tee extends Rs{constructor(e,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Yc(e,"open",this.onopen.bind(this)),Yc(e,"packet",this.onpacket.bind(this)),Yc(e,"error",this.onerror.bind(this)),Yc(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(Uxe.hasOwnProperty(e))throw new Error('"'+e+'" is a reserved event name');n.unshift(e);const r={type:Sr.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,a=n.pop();this._registerAckCallback(o,a),r.id=o}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,n){const r=this.flags.timeout;if(r===void 0){this.acks[e]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===e&&this.sendBuffer.splice(s,1);n.call(this,new Error("operation has timed out"))},r);this.acks[e]=(...s)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...s])}}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this.packet({type:Sr.CONNECT,data:e})}):this.packet({type:Sr.CONNECT,data:this.auth})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Sr.CONNECT:if(e.data&&e.data.sid){const i=e.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Sr.EVENT:case Sr.BINARY_EVENT:this.onevent(e);break;case Sr.ACK:case Sr.BINARY_ACK:this.onack(e);break;case Sr.DISCONNECT:this.ondisconnect();break;case Sr.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e)}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Sr.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(n.apply(this,e.data),delete this.acks[e.id])}onconnect(e){this.id=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Sr.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function $0(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}$0.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};$0.prototype.reset=function(){this.attempts=0};$0.prototype.setMin=function(t){this.ms=t};$0.prototype.setMax=function(t){this.max=t};$0.prototype.setJitter=function(t){this.jitter=t};class q8 extends Rs{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,fx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new $0({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||Xxe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new tf(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Yc(n,"open",function(){r.onopen(),e&&e()}),s=Yc(n,"error",o=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",o),e?e(o):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const o=this._timeout;o===0&&i();const a=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},o);this.opts.autoUnref&&a.unref(),this.subs.push(function(){clearTimeout(a)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Yc(e,"ping",this.onping.bind(this)),Yc(e,"data",this.ondata.bind(this)),Yc(e,"error",this.onerror.bind(this)),Yc(e,"close",this.onclose.bind(this)),Yc(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){this.decoder.add(e)}ondecoded(e){this.emitReserved("packet",e)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r||(r=new Tee(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const pg={};function E2(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=Exe(t,e.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=pg[i]&&s in pg[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let l;return a?l=new q8(r,e):(pg[i]||(pg[i]=new q8(r,e)),l=pg[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(E2,{Manager:q8,Socket:Tee,io:E2,connect:E2});var Mt=(t=>(t.InitError="initError",t.Loading="loading",t.Ready="ready",t.Offline="offline",t.Online="online",t.Reconnecting="reconnecting",t.StatusChanged="statusChanged",t.PausePlayback="pausePlayback",t.LspStatusChanged="lspStatusChanged",t.PlaygroundChanged="playgroundChanged",t.Following="following",t.UnFollowing="unFollowing",t.RunStatusChanged="runStatusChanged",t.FileStructureChanged="fileStructureChanged",t.FileContentChanged="fileContentChanged",t.AppendToConsole="appendToConsole",t.AppendToTerminal="appendToTerminal",t.ApplicationAvailable="ApplicationAvailable",t.PlaybackInfo="playbackInfo",t.ReplayStart="ReplayStart",t.ReplayEnd="ReplayEnd",t.Customize="customize",t.UserEnter="userEnter",t.UserLeave="userLeave",t.UsersUpdated="usersUpdated",t.EditorScroll="editorScroll",t.ConnectionBroken="connectionBroken",t.ConnectionFailed="connectionFailed",t.AuthorizationFailed="authorizationFailed",t.FileStructureDamaged="fileStructureDamaged",t.ErrorFromServer="errorFromServer",t.AppendCustomizeFrameData="appendCustomizeFrameData",t.LineAction="lineAction",t.FileInfo="fileInfo",t.InsertTextById="insertTextById",t.ReplaceCodeById="replaceCodeById",t.UpdateAreaFlags="updateAreaFlags",t.Debug="debug",t.JumpToAreaById="jumpToAreaById",t.Xterm="xterm",t.ResourceMonitoring="resourceMonitoring",t.AnswerAreaOperate="answerAreaOperate",t.AnswerAreaInfo="answerAreaInfo",t.XtermInfo="xtermInfo",t.InsertCodeByCursorPosition="insertCodeByCursorPosition",t.ReplayCodeByRange="replayCodeByRange",t))(Mt||{}),Cn=(t=>(t.GetUnitTestFun="getUnitTestFun",t.RunUnitTestByIdeServer="runUnitTestByIdeServer",t.StopUnitTest="stopUnitTest",t.StopRunCmd="stopRunCmd",t.RumCmd="rumCmd",t.RetainingAllFiles="retainingAllFiles",t.Authorize="auth",t.LiveBrowser="liveBrowser",t.RRWeb="rrweb",t.Active="active",t.Run="run",t.Stop="stop",t.Heartbeat="heartbeat",t.SetFileLockStatus="",t.SetFileVisiable="",t.AddFileToUnitTest="",t.RemoveFileFromUnitTest="",t.KeyEvent="keyEvent",t.File="file",t.CloseFile="closeFile",t.EditFile="editFile",t.FileTree="fileTree",t.Terminal="terminal",t.XtermStatus="XtermStatus",t.Cursor="cursor",t.GetPlaybackInfo="getPlaybackInfo",t.LoadPlaybackData="loadPlaybackData",t.FollowingAgentUser="followingAgentUser",t.UnFollowingAgentUser="unFollowingAgentUser",t.FollowingFocusComponent="followingFocusComponent",t.EditorScroll="editorScroll",t.CustomizeFrameData="appendCustomizeFrameData",t.AddCDNSource="addCDNSource",t.RestartServer="restartServer",t.RestartLSPServer="restartLSPServer",t.SwitchLanguage="switchLanguage",t.StatisticsPlaybackData="statisticsPlaybackData",t.ReconnectOnline="reconnectOnline",t))(Cn||{}),dt=(t=>(t.Connect="connect",t.Disconnect="disconnect",t.AuthAck="authAck",t.Active="active",t.SyncPlaygroundInfo="syncPlaygroundInfo",t.ChangePlaygroundInfo="changePlaygroundInfo",t.RunStatus="runStatus",t.LspStatus="lspStatus",t.Following="following",t.UnFollowing="unFollowing",t.UserEnter="userEnter",t.UserLeave="userLeave",t.UsersUpdated="usersUpdated",t.FileWatchRefreshConfig="fileWatchRefreshConfig",t.ManualRefresh="manualRefresh",t.EditorBlur="editorBlur",t.ForceRefreshFile="forceRefreshFile",t.Simulator="simulator",t.PlaybackInfo="playbackInfo",t.PlaybackData="playbackData",t.File="file",t.FileTree="fileTree",t.Run="run",t.Console="console",t.Terminal="terminal",t.XtermStatus="XtermStatus",t.Editor="editor",t.Debug="debug",t.KeyEvent="keyEvent",t.CloseFile="closeFile",t.FocusComponent="FocusComponent",t.InvisibleComponentActive="InvisibleComponentActive",t.AppendCustomizeFrameData="appendCustomizeFrameData",t.TerminalStatus="terminalStatus",t.LspServerClientStateChange="lspServerClientStateChange",t.I18nLanguage="i18nLanguage",t.PushFormatCode="pushFormatCode",t.ResourceMonitoring="resourceMonitoring",t.CustomExecute="customExecute",t.SelectedUpdated="selectedUpdated",t.SetBreakPoint="setBreakPoint",t.DebugRun="debugRun",t.StoppedData="stoppedData",t.DebugNext="next",t.DebugContinue="continue",t.DebugStatus="debugStatus",t.DebugStepIn="stepIn",t.DebugStepOut="stepOut",t.Variables="variables",t.UpdateArea="updateArea",t.UpdateDebugSupport="updateDebugSupport",t.SyncDebugData="syncDebugData",t))(dt||{}),FO=(t=>(t.NotSupport="notSupport",t.Loading="loading",t.Running="running",t.Shutdown="shutdown",t.LspReady="lspReady",t.Uninitialized="uninitialized",t))(FO||{}),Q$,Wxe=new Uint8Array(16);function qxe(){if(!Q$&&(Q$=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Q$))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Q$(Wxe)}var Fxe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Bxe(t){return typeof t=="string"&&Fxe.test(t)}var vo=[];for(var W9=0;W9<256;++W9)vo.push((W9+256).toString(16).substr(1));function Yxe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(vo[t[e+0]]+vo[t[e+1]]+vo[t[e+2]]+vo[t[e+3]]+"-"+vo[t[e+4]]+vo[t[e+5]]+"-"+vo[t[e+6]]+vo[t[e+7]]+"-"+vo[t[e+8]]+vo[t[e+9]]+"-"+vo[t[e+10]]+vo[t[e+11]]+vo[t[e+12]]+vo[t[e+13]]+vo[t[e+14]]+vo[t[e+15]]).toLowerCase();if(!Bxe(n))throw TypeError("Stringified UUID is invalid");return n}function Mm(t,e,n){t=t||{};var r=t.random||(t.rng||qxe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return Yxe(r)}class Pee{constructor(e,n=2e3){je(this,"name");je(this,"channel");je(this,"_timeout");je(this,"_messageId");je(this,"_messages");je(this,"_filter");this.name=e,this._messageId=0,this.channel=new BroadcastChannel(e),this.channel.onmessage=r=>this.receive(r),this._messages=[],this._timeout=n}setFilter(e){this._filter=e}send(e,n){const r=Mm(),i=new Zxe(r,n||this._timeout),s=new Promise((o,a)=>{i._reject=a,i._resolve=o});return this._messages.push(i),this.channel.postMessage({id:r,type:"request",payload:e}),s}answer(e,n){this.channel.postMessage({id:e,type:"response",payload:n})}receive(e){const n=e.data;if(n.type==="request")(!this._filter||this._filter(n.payload))&&this.answer(n.id,{active:!0});else if(n.type==="response"){const r=this._messages.find(i=>i.id===n.id);r==null||r.reject(n.payload)}}}class Zxe{constructor(e,n){je(this,"_resolve");je(this,"_reject");je(this,"_interval");je(this,"id");this.id=e,this._interval=setTimeout(()=>this.resolve({active:!1,reason:"timeout, no one uses it"}),n)}resolve(e){clearTimeout(this._interval),this._resolve(e)}reject(e){this._reject(e)}}let Y1,BO;async function $X(){BO||(BO=new Pee("dao-paas",200)),Y1="",BO.setFilter(n=>n.id===Y1);const t=JSON.parse(localStorage.getItem("agentUsers")||"[]")||[],e=[];for(const n of t){const r=BO.send(n).then(()=>{if(Y1==="")return n.time=new Date().getTime(),Y1=n.id,localStorage.setItem("agentUsers",JSON.stringify(t)),Promise.resolve(n)});e.push(r)}return Promise.any(e)}async function jxe(t){BO||(BO=new Pee("dao-paas",500));let e=!0;try{await BO.send(t),e=!0}catch{e=!1}return e}function Vxe(t){const e=JSON.parse(localStorage.getItem("agentUsers")||"[]")||[],n=e.find(r=>r.id==t);n?n.time=new Date().getTime():e.push({id:t,time:new Date().getTime()}),localStorage.setItem("agentUsers",JSON.stringify(e)),Y1=t}function Gxe(t){return t===Y1}const Qee="daoLogger",Hxe=typeof module=="object"&&typeof module.exports=="object",q9=Hxe?global:window,Eee=q9&&q9.localStorage?q9.localStorage:{store:{},getItem(t){return this.store[t]},setItem(t,e){this.store[t]=e}},ht=Object.keys(console).reduce((t,e)=>(Eee.getItem(Qee)?t[e]=(...n)=>{var i;(i=console[e])==null||i.call(console,...n);const r=window.customLog;r==null||r(e,n)}:t[e]=function(...n){const r=window.customLog;r==null||r(e,n)},t),{}),Kxe=()=>{Eee.setItem(Qee,"*")};function Na(t){return Na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Na(t)}function la(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SX(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ca(t,e,n){return e&&SX(t.prototype,e),n&&SX(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function cc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function YS(t,e){return YS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YS(t,e)}function Hf(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&YS(t,e)}function S0(t,e){if(e&&(Na(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cc(t)}function pc(t){return pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pc(t)}function Ln(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cee(t){if(Array.isArray(t))return t}function Ree(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function F8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ZR(t,e){if(!!t){if(typeof t=="string")return F8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F8(t,e)}}function Aee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
49
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jxe(t){return Cee(t)||Ree(t)||ZR(t)||Aee()}function wX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xX(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var eke={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,n){console&&console[e]&&console[e].apply(console,n)}},tke=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};la(this,t),this.init(e,n)}return ca(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||eke,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,s){return s&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new t(this.logger,xX(xX({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}}]),t}(),Mu=new tke,Mf=function(){function t(){la(this,t),this.observers={}}return ca(t,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(s){i.observers[s]=i.observers[s]||[],i.observers[s].push(r)}),this}},{key:"off",value:function(n,r){if(!!this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value: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(this.observers[n]){var o=[].concat(this.observers[n]);o.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var a=[].concat(this.observers["*"]);a.forEach(function(l){l.apply(l,[n].concat(i))})}}}]),t}();function mg(){var t,e,n=new Promise(function(r,i){t=r,e=i});return n.resolve=t,n.reject=e,n}function kX(t){return t==null?"":""+t}function nke(t,e,n){t.forEach(function(r){e[r]&&(n[r]=e[r])})}function jR(t,e,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!t||typeof t=="string"}for(var s=typeof e!="string"?[].concat(e):e.split(".");s.length>1;){if(i())return{};var o=r(s.shift());!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={}}return i()?{}:{obj:t,k:r(s.shift())}}function TX(t,e,n){var r=jR(t,e,Object),i=r.obj,s=r.k;i[s]=n}function rke(t,e,n,r){var i=jR(t,e,Object),s=i.obj,o=i.k;s[o]=s[o]||[],r&&(s[o]=s[o].concat(n)),r||s[o].push(n)}function ZS(t,e){var n=jR(t,e),r=n.obj,i=n.k;if(!!r)return r[i]}function PX(t,e,n){var r=ZS(t,n);return r!==void 0?r:ZS(e,n)}function Iee(t,e,n){for(var r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):Iee(t[r],e[r],n):t[r]=e[r]);return t}function n1(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ike={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ske(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return ike[e]}):t}var Ox=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,oke=[" ",",","?","!",";"];function ake(t,e,n){e=e||"",n=n||"";var r=oke.filter(function(a){return e.indexOf(a)<0&&n.indexOf(a)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),s=!i.test(t);if(!s){var o=t.indexOf(n);o>0&&!i.test(t.substring(0,o))&&(s=!0)}return s}function QX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function E$(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?QX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):QX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lke(t){var e=cke();return function(){var r=pc(t),i;if(e){var s=pc(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return S0(this,i)}}function cke(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nee(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!t){if(t[e])return t[e];for(var r=e.split(n),i=t,s=0;s<r.length;++s){if(!i||typeof i[r[s]]=="string"&&s+1<r.length)return;if(i[r[s]]===void 0){for(var o=2,a=r.slice(s,s+o).join(n),l=i[a];l===void 0&&r.length>s+o;)o++,a=r.slice(s,s+o).join(n),l=i[a];if(l===void 0)return;if(l===null)return null;if(e.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}var c=r.slice(s+o).join(n);return c?Nee(l,c,n):void 0}i=i[r[s]]}return i}}var uke=function(t){Hf(n,t);var e=lke(n);function n(r){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return la(this,n),i=e.call(this),Ox&&Mf.call(cc(i)),i.data=r||{},i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return ca(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var s=this.options.ns.indexOf(i);s>-1&&this.options.ns.splice(s,1)}},{key:"getResource",value:function(i,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[i,s];o&&typeof o!="string"&&(u=u.concat(o)),o&&typeof o=="string"&&(u=u.concat(l?o.split(l):o)),i.indexOf(".")>-1&&(u=i.split("."));var d=ZS(this.data,u);return d||!c||typeof o!="string"?d:Nee(this.data&&this.data[i]&&this.data[i][s],o,l)}},{key:"addResource",value:function(i,s,o,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[i,s];o&&(u=u.concat(c?o.split(c):o)),i.indexOf(".")>-1&&(u=i.split("."),a=s,s=u[1]),this.addNamespaces(s),TX(this.data,u,a),l.silent||this.emit("added",i,s,o,a)}},{key:"addResources",value:function(i,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in o)(typeof o[l]=="string"||Object.prototype.toString.apply(o[l])==="[object Array]")&&this.addResource(i,s,l,o[l],{silent:!0});a.silent||this.emit("added",i,s,o)}},{key:"addResourceBundle",value:function(i,s,o,a,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[i,s];i.indexOf(".")>-1&&(u=i.split("."),a=o,o=s,s=u[1]),this.addNamespaces(s);var d=ZS(this.data,u)||{};a?Iee(d,o,l):d=E$(E$({},d),o),TX(this.data,u,d),c.silent||this.emit("added",i,s,o)}},{key:"removeResourceBundle",value:function(i,s){this.hasResourceBundle(i,s)&&delete this.data[i][s],this.removeNamespaces(s),this.emit("removed",i,s)}},{key:"hasResourceBundle",value:function(i,s){return this.getResource(i,s)!==void 0}},{key:"getResourceBundle",value:function(i,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?E$(E$({},{}),this.getResource(i,s)):this.getResource(i,s)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var s=this.getDataByLanguage(i),o=s&&Object.keys(s)||[];return!!o.find(function(a){return s[a]&&Object.keys(s[a]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Mf),Dee={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,n,r,i,s){var o=this;return e.forEach(function(a){o.processors[a]&&(n=o.processors[a].process(n,r,i,s))}),n}};function EX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?EX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):EX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dke(t){var e=hke();return function(){var r=pc(t),i;if(e){var s=pc(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return S0(this,i)}}function hke(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var CX={},RX=function(t){Hf(n,t);var e=dke(n);function n(r){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return la(this,n),i=e.call(this),Ox&&Mf.call(cc(i)),nke(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,cc(i)),i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Mu.create("translator"),i}return ca(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var o=this.resolve(i,s);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(i,s){var o=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ns||this.options.defaultNS||[],c=o&&i.indexOf(o)>-1,u=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!ake(i,o,a);if(c&&!u){var d=i.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:i,namespaces:l};var h=i.split(o);(o!==a||o===a&&this.options.ns.indexOf(h[0])>-1)&&(l=h.shift()),i=h.join(a)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,s,o){var a=this;if(Na(s)!=="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),s||(s={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=this.extractFromKey(i[i.length-1],s),d=u.key,h=u.namespaces,f=h[h.length-1],p=s.lng||this.language,v=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(v){var O=s.nsSeparator||this.options.nsSeparator;return l?(g.res="".concat(f).concat(O).concat(d),g):"".concat(f).concat(O).concat(d)}return l?(g.res=d,g):d}var g=this.resolve(i,s),y=g&&g.res,b=g&&g.usedKey||d,$=g&&g.exactUsedKey||d,w=Object.prototype.toString.apply(y),x=["[object Number]","[object Function]","[object RegExp]"],E=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,C=typeof y!="string"&&typeof y!="boolean"&&typeof y!="number";if(k&&y&&C&&x.indexOf(w)<0&&!(typeof E=="string"&&w==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,y,jo(jo({},s),{},{ns:h})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(g.res=D,g):D}if(c){var A=w==="[object Array]",P=A?[]:{},L=A?$:b;for(var K in y)if(Object.prototype.hasOwnProperty.call(y,K)){var ne="".concat(L).concat(c).concat(K);P[K]=this.translate(ne,jo(jo({},s),{joinArrays:!1,ns:h})),P[K]===ne&&(P[K]=y[K])}y=P}}else if(k&&typeof E=="string"&&w==="[object Array]")y=y.join(E),y&&(y=this.extendTranslation(y,i,s,o));else{var U=!1,N=!1,F=s.count!==void 0&&typeof s.count!="string",Y=n.hasDefaultValue(s),q=F?this.pluralResolver.getSuffix(p,s.count,s):"",Z=s["defaultValue".concat(q)]||s.defaultValue;!this.isValidLookup(y)&&Y&&(U=!0,y=Z),this.isValidLookup(y)||(N=!0,y=d);var J=s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,$e=J&&N?void 0:y,se=Y&&Z!==y&&this.options.updateMissing;if(N||U||se){if(this.logger.log(se?"updateKey":"missingKey",p,f,d,se?Z:y),c){var fe=this.resolve(d,jo(jo({},s),{},{keySeparator:!1}));fe&&fe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var ae=[],ie=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ie&&ie[0])for(var oe=0;oe<ie.length;oe++)ae.push(ie[oe]);else this.options.saveMissingTo==="all"?ae=this.languageUtils.toResolveHierarchy(s.lng||this.language):ae.push(s.lng||this.language);var me=function(Ge,Xe,Qe){var yt=Y&&Qe!==y?Qe:$e;a.options.missingKeyHandler?a.options.missingKeyHandler(Ge,f,Xe,yt,se,s):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(Ge,f,Xe,yt,se,s),a.emit("missingKey",Ge,f,Xe,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&F?ae.forEach(function(Te){a.pluralResolver.getSuffixes(Te,s).forEach(function(Ge){me([Te],d+Ge,s["defaultValue".concat(Ge)]||Z)})}):me(ae,d,Z))}y=this.extendTranslation(y,i,s,g,o),N&&y===d&&this.options.appendNamespaceToMissingKey&&(y="".concat(f,":").concat(d)),(N||U)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(f,":").concat(d):d,U?y:void 0):y=this.options.parseMissingKeyHandler(y))}return l?(g.res=y,g):y}},{key:"extendTranslation",value:function(i,s,o,a,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,jo(jo({},this.options.interpolation.defaultVariables),o),a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init(jo(jo({},o),{interpolation:jo(jo({},this.options.interpolation),o.interpolation)}));var u=typeof i=="string"&&(o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(u){var h=i.match(this.interpolator.nestingRegexp);d=h&&h.length}var f=o.replace&&typeof o.replace!="string"?o.replace:o;if(this.options.interpolation.defaultVariables&&(f=jo(jo({},this.options.interpolation.defaultVariables),f)),i=this.interpolator.interpolate(i,f,o.lng||this.language,o),u){var p=i.match(this.interpolator.nestingRegexp),v=p&&p.length;d<v&&(o.nest=!1)}o.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var y=arguments.length,b=new Array(y),$=0;$<y;$++)b[$]=arguments[$];return l&&l[0]===b[0]&&!o.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(b[0]," in key: ").concat(s[0])),null):c.translate.apply(c,b.concat([s]))},o)),o.interpolation&&this.interpolator.reset()}var O=o.postProcess||this.options.postProcess,g=typeof O=="string"?[O]:O;return i!=null&&g&&g.length&&o.applyPostProcessor!==!1&&(i=Dee.handle(g,i,s,this.options&&this.options.postProcessPassResolved?jo({i18nResolved:a},o):o,this)),i}},{key:"resolve",value:function(i){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,l,c,u,d;return typeof i=="string"&&(i=[i]),i.forEach(function(h){if(!s.isValidLookup(a)){var f=s.extractFromKey(h,o),p=f.key;l=p;var v=f.namespaces;s.options.fallbackNS&&(v=v.concat(s.options.fallbackNS));var O=o.count!==void 0&&typeof o.count!="string",g=O&&!o.ordinal&&o.count===0&&s.pluralResolver.shouldUseIntlApi(),y=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",b=o.lngs?o.lngs:s.languageUtils.toResolveHierarchy(o.lng||s.language,o.fallbackLng);v.forEach(function($){s.isValidLookup(a)||(d=$,!CX["".concat(b[0],"-").concat($)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(d)&&(CX["".concat(b[0],"-").concat($)]=!0,s.logger.warn('key "'.concat(l,'" for languages "').concat(b.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(function(w){if(!s.isValidLookup(a)){u=w;var x=[p];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(x,p,w,$,o);else{var E;O&&(E=s.pluralResolver.getSuffix(w,o.count,o));var k="".concat(s.options.pluralSeparator,"zero");if(O&&(x.push(p+E),g&&x.push(p+k)),y){var C="".concat(p).concat(s.options.contextSeparator).concat(o.context);x.push(C),O&&(x.push(C+E),g&&x.push(C+k))}}for(var D;D=x.pop();)s.isValidLookup(a)||(c=D,a=s.getResource(w,$,D,o))}}))})}}),{res:a,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:d}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,s,o,a):this.resourceStore.getResource(i,s,o,a)}}],[{key:"hasDefaultValue",value:function(i){var s="defaultValue";for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&s===o.substring(0,s.length)&&i[o]!==void 0)return!0;return!1}}]),n}(Mf);function F9(t){return t.charAt(0).toUpperCase()+t.slice(1)}var fke=function(){function t(e){la(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Mu.create("languageUtils")}return ca(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(s){return s.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=F9(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=F9(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=F9(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(s){if(!i){var o=r.formatLanguageCode(s);(!r.options.supportedLngs||r.isSupportedCode(o))&&(i=o)}}),!i&&this.options.supportedLngs&&n.forEach(function(s){if(!i){var o=r.getLanguagePartFromCode(s);if(r.isSupportedCode(o))return i=o;i=r.options.supportedLngs.find(function(a){if(a.indexOf(o)===0)return a})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,s=this.getFallbackCodes(r||this.options.fallbackLng||[],n),o=[],a=function(c){!c||(i.isSupportedCode(c)?o.push(c):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(n))):typeof n=="string"&&a(this.formatLanguageCode(n)),s.forEach(function(l){o.indexOf(l)<0&&a(i.formatLanguageCode(l))}),o}}]),t}(),Oke=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],pke={1:function(e){return Number(e>1)},2:function(e){return Number(e!=1)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(e==1?0:e>=2&&e<=4?1:2)},7:function(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(e!==0)},14:function(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:e!==0?1:2)},17:function(e){return Number(e==1||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(e==0?0:e==1?1:2)},19:function(e){return Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(e==1?0:e==0||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)}},mke=["v1","v2","v3"],AX={zero:0,one:1,two:2,few:3,many:4,other:5};function gke(){var t={};return Oke.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:pke[e.fc]}})}),t}var vke=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};la(this,t),this.languageUtils=e,this.options=n,this.logger=Mu.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl=="undefined"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=gke()}return ca(t,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(s){return"".concat(r).concat(s)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(n,i);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort(function(o,a){return AX[o]-AX[a]}).map(function(o){return"".concat(r.options.prepend).concat(o)}):s.numbers.map(function(o){return r.getSuffix(n,o,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(n,i);return s?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(s.select(r)):this.getSuffixRetroCompatible(s,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,s=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),o=n.numbers[s];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var a=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?a():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}},{key:"shouldUseIntlApi",value:function(){return!mke.includes(this.options.compatibilityJSON)}}]),t}();function IX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Cc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?IX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):IX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var yke=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};la(this,t),this.logger=Mu.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return ca(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:ske,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?n1(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?n1(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?n1(r.nestingPrefix):r.nestingPrefixEscaped||n1("$t("),this.nestingSuffix=r.nestingSuffix?n1(r.nestingSuffix):r.nestingSuffixEscaped||n1(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,s){var o=this,a,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(O){return O.replace(/\$/g,"$$$$")}var h=function(g){if(g.indexOf(o.formatSeparator)<0){var y=PX(r,u,g);return o.alwaysFormat?o.format(y,void 0,i,Cc(Cc(Cc({},s),r),{},{interpolationkey:g})):y}var b=g.split(o.formatSeparator),$=b.shift().trim(),w=b.join(o.formatSeparator).trim();return o.format(PX(r,u,$),w,i,Cc(Cc(Cc({},s),r),{},{interpolationkey:$}))};this.resetRegExp();var f=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,p=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(g){return d(g)}},{regex:this.regexp,safeValue:function(g){return o.escapeValue?d(o.escape(g)):d(g)}}];return v.forEach(function(O){for(c=0;a=O.regex.exec(n);){var g=a[1].trim();if(l=h(g),l===void 0)if(typeof f=="function"){var y=f(n,a,s);l=typeof y=="string"?y:""}else if(s&&s.hasOwnProperty(g))l="";else if(p){l=a[0];continue}else o.logger.warn("missed to pass in variable ".concat(g," for interpolating ").concat(n)),l="";else typeof l!="string"&&!o.useRawValueToEscape&&(l=kX(l));var b=O.safeValue(l);if(n=n.replace(a[0],b),p?(O.regex.lastIndex+=l.length,O.regex.lastIndex-=a[0].length):O.regex.lastIndex=0,c++,c>=o.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,l=Cc({},s);l.applyPostProcessor=!1,delete l.defaultValue;function c(f,p){var v=this.nestingOptionsSeparator;if(f.indexOf(v)<0)return f;var O=f.split(new RegExp("".concat(v,"[ ]*{"))),g="{".concat(O[1]);f=O[0],g=this.interpolate(g,l),g=g.replace(/'/g,'"');try{l=JSON.parse(g),p&&(l=Cc(Cc({},p),l))}catch(y){return this.logger.warn("failed parsing options string in nesting for key ".concat(f),y),"".concat(f).concat(v).concat(g)}return delete l.defaultValue,f}for(;o=this.nestingRegexp.exec(n);){var u=[],d=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var h=o[1].split(this.formatSeparator).map(function(f){return f.trim()});o[1]=h.shift(),u=h,d=!0}if(a=r(c.call(this,o[1].trim(),l),l),a&&o[0]===n&&typeof a!="string")return a;typeof a!="string"&&(a=kX(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(n)),a=""),d&&(a=u.reduce(function(f,p){return i.format(f,p,s.lng,Cc(Cc({},s),{},{interpolationkey:o[1].trim()}))},a.trim())),n=n.replace(o[0],a),this.regexp.lastIndex=0}return n}}]),t}();function NX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Nh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?NX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):NX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bke(t){var e=t.toLowerCase().trim(),n={};if(t.indexOf("(")>-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(e==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var s=i.split(";");s.forEach(function(o){if(!!o){var a=o.split(":"),l=Jxe(a),c=l[0],u=l.slice(1),d=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=d),d==="false"&&(n[c.trim()]=!1),d==="true"&&(n[c.trim()]=!0),isNaN(d)||(n[c.trim()]=parseInt(d,10))}})}}return{formatName:e,formatOptions:n}}var _ke=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};la(this,t),this.logger=Mu.create("formatter"),this.options=e,this.formats={number:function(r,i,s){return new Intl.NumberFormat(i,s).format(r)},currency:function(r,i,s){return new Intl.NumberFormat(i,Nh(Nh({},s),{},{style:"currency"})).format(r)},datetime:function(r,i,s){return new Intl.DateTimeFormat(i,Nh({},s)).format(r)},relativetime:function(r,i,s){return new Intl.RelativeTimeFormat(i,Nh({},s)).format(r,s.range||"day")},list:function(r,i,s){return new Intl.ListFormat(i,Nh({},s)).format(r)}},this.init(e)}return ca(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"format",value:function(n,r,i,s){var o=this,a=r.split(this.formatSeparator),l=a.reduce(function(c,u){var d=bke(u),h=d.formatName,f=d.formatOptions;if(o.formats[h]){var p=c;try{var v=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},O=v.locale||v.lng||s.locale||s.lng||i;p=o.formats[h](c,O,Nh(Nh(Nh({},f),s),v))}catch(g){o.logger.warn(g)}return p}else o.logger.warn("there was no format function for ".concat(h));return c},n);return l}}]),t}();function DX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function MX(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?DX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):DX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $ke(t){var e=Ske();return function(){var r=pc(t),i;if(e){var s=pc(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return S0(this,i)}}function Ske(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wke(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var xke=function(t){Hf(n,t);var e=$ke(n);function n(r,i,s){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return la(this,n),o=e.call(this),Ox&&Mf.call(cc(o)),o.backend=r,o.store=i,o.services=s,o.languageUtils=s.languageUtils,o.options=a,o.logger=Mu.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=a.maxParallelReads||10,o.readingCalls=0,o.maxRetries=a.maxRetries>=0?a.maxRetries:5,o.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(s,a.backend,a),o}return ca(n,[{key:"queueLoad",value:function(i,s,o,a){var l=this,c={},u={},d={},h={};return i.forEach(function(f){var p=!0;s.forEach(function(v){var O="".concat(f,"|").concat(v);!o.reload&&l.store.hasResourceBundle(f,v)?l.state[O]=2:l.state[O]<0||(l.state[O]===1?u[O]===void 0&&(u[O]=!0):(l.state[O]=1,p=!1,u[O]===void 0&&(u[O]=!0),c[O]===void 0&&(c[O]=!0),h[v]===void 0&&(h[v]=!0)))}),p||(d[f]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(h)}}},{key:"loaded",value:function(i,s,o){var a=i.split("|"),l=a[0],c=a[1];s&&this.emit("failedLoading",l,c,s),o&&this.store.addResourceBundle(l,c,o),this.state[i]=s?-1:2;var u={};this.queue.forEach(function(d){rke(d.loaded,[l],c),wke(d,i),s&&d.errors.push(s),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(h){u[h]||(u[h]={});var f=d.loaded[h];f.length&&f.forEach(function(p){u[h][p]===void 0&&(u[h][p]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(i,s,o){var a=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!i.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:s,fcName:o,tried:l,wait:c,callback:u});return}return this.readingCalls++,this.backend[o](i,s,function(d,h){if(a.readingCalls--,a.waitingReads.length>0){var f=a.waitingReads.shift();a.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(d&&h&&l<a.maxRetries){setTimeout(function(){a.read.call(a,i,s,o,l+1,c*2,u)},c);return}u(d,h)})}},{key:"prepareLoading",value:function(i,s){var o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof s=="string"&&(s=[s]);var c=this.queueLoad(i,s,a,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){o.loadOne(u)})}},{key:"load",value:function(i,s,o){this.prepareLoading(i,s,{},o)}},{key:"reload",value:function(i,s,o){this.prepareLoading(i,s,{reload:!0},o)}},{key:"loadOne",value:function(i){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=i.split("|"),l=a[0],c=a[1];this.read(l,c,"read",void 0,void 0,function(u,d){u&&s.logger.warn("".concat(o,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&d&&s.logger.log("".concat(o,"loaded namespace ").concat(c," for language ").concat(l),d),s.loaded(i,u,d)})}},{key:"saveMissing",value:function(i,s,o,a,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}o==null||o===""||(this.backend&&this.backend.create&&this.backend.create(i,s,o,a,null,MX(MX({},c),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],s,o,a))}}]),n}(Mf);function kke(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var n={};if(Na(e[1])==="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),Na(e[2])==="object"||Na(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(e,n,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function zX(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function LX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?LX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):LX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Tke(t){var e=Pke();return function(){var r=pc(t),i;if(e){var s=pc(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return S0(this,i)}}function Pke(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C$(){}function Qke(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var jS=function(t){Hf(n,t);var e=Tke(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(la(this,n),r=e.call(this),Ox&&Mf.call(cc(r)),r.options=zX(i),r.services={},r.logger=Mu,r.modules={external:[]},Qke(cc(r)),s&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,s),S0(r,cc(r));setTimeout(function(){r.init(i,s)},0)}return r}return ca(n,[{key:"init",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof s=="function"&&(o=s,s={}),!s.defaultNS&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));var a=kke();this.options=vu(vu(vu({},a),this.options),zX(s)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=vu(vu({},a.interpolation),this.options.interpolation)),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function l(g){return g?typeof g=="function"?new g:g:null}if(!this.options.isClone){this.modules.logger?Mu.init(l(this.modules.logger),this.options):Mu.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=_ke);var u=new fke(this.options);this.store=new uke(this.options.resources,this.options);var d=this.services;d.logger=Mu,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new vke(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(d.formatter=l(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new yke(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new xke(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(g){for(var y=arguments.length,b=new Array(y>1?y-1:0),$=1;$<y;$++)b[$-1]=arguments[$];i.emit.apply(i,[g].concat(b))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new RX(this.services,this.options),this.translator.on("*",function(g){for(var y=arguments.length,b=new Array(y>1?y-1:0),$=1;$<y;$++)b[$-1]=arguments[$];i.emit.apply(i,[g].concat(b))}),this.modules.external.forEach(function(g){g.init&&g.init(i)})}if(this.format=this.options.interpolation.format,o||(o=C$),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.forEach(function(g){i[g]=function(){var y;return(y=i.store)[g].apply(y,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(g){i[g]=function(){var y;return(y=i.store)[g].apply(y,arguments),i}});var v=mg(),O=function(){var y=function($,w){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),v.resolve(w),o($,w)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return y(null,i.t.bind(i));i.changeLanguage(i.options.lng,y)};return this.options.resources||!this.options.initImmediate?O():setTimeout(O,0),v}},{key:"loadResources",value:function(i){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C$,a=o,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(a=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return a();var c=[],u=function(f){if(!!f){var p=s.services.languageUtils.toResolveHierarchy(f);p.forEach(function(v){c.indexOf(v)<0&&c.push(v)})}};if(l)u(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(h){return u(h)})}this.options.preload&&this.options.preload.forEach(function(h){return u(h)}),this.services.backendConnector.load(c,this.options.ns,function(h){!h&&!s.resolvedLanguage&&s.language&&s.setResolvedLanguage(s.language),a(h)})}else a(null)}},{key:"reloadResources",value:function(i,s,o){var a=mg();return i||(i=this.languages),s||(s=this.options.ns),o||(o=C$),this.services.backendConnector.reload(i,s,function(l){a.resolve(),o(l)}),a}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&Dee.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var s=0;s<this.languages.length;s++){var o=this.languages[s];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(i,s){var o=this;this.isLanguageChangingTo=i;var a=mg();this.emit("languageChanging",i);var l=function(h){o.language=h,o.languages=o.services.languageUtils.toResolveHierarchy(h),o.resolvedLanguage=void 0,o.setResolvedLanguage(h)},c=function(h,f){f?(l(f),o.translator.changeLanguage(f),o.isLanguageChangingTo=void 0,o.emit("languageChanged",f),o.logger.log("languageChanged",f)):o.isLanguageChangingTo=void 0,a.resolve(function(){return o.t.apply(o,arguments)}),s&&s(h,function(){return o.t.apply(o,arguments)})},u=function(h){!i&&!h&&o.services.languageDetector&&(h=[]);var f=typeof h=="string"?h:o.services.languageUtils.getBestMatchFromCodes(h);f&&(o.language||l(f),o.translator.language||o.translator.changeLanguage(f),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(f)),o.loadResources(f,function(p){c(p,f)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(i),a}},{key:"getFixedT",value:function(i,s,o){var a=this,l=function c(u,d){var h;if(Na(d)!=="object"){for(var f=arguments.length,p=new Array(f>2?f-2:0),v=2;v<f;v++)p[v-2]=arguments[v];h=a.options.overloadTranslationOptionHandler([u,d].concat(p))}else h=vu({},d);h.lng=h.lng||c.lng,h.lngs=h.lngs||c.lngs,h.ns=h.ns||c.ns,h.keyPrefix=h.keyPrefix||o||c.keyPrefix;var O=a.options.keySeparator||".",g=h.keyPrefix?"".concat(h.keyPrefix).concat(O).concat(u):u;return a.t(g,h)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=s,l.keyPrefix=o,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var u=function(f,p){var v=s.services.backendConnector.state["".concat(f,"|").concat(p)];return v===-1||v===2};if(o.precheck){var d=o.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(a,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(a,i)&&(!l||u(c,i)))}},{key:"loadNamespaces",value:function(i,s){var o=this,a=mg();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){o.options.ns.indexOf(l)<0&&o.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),s&&s(l)}),a):(s&&s(),Promise.resolve())}},{key:"loadLanguages",value:function(i,s){var o=mg();typeof i=="string"&&(i=[i]);var a=this.options.preload||[],l=i.filter(function(c){return a.indexOf(c)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(c){o.resolve(),s&&s(c)}),o):(s&&s(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return s.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C$,a=vu(vu(vu({},this.options),s),{isClone:!0}),l=new n(a),c=["store","services","language"];return c.forEach(function(u){l[u]=i[u]}),l.services=vu({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new RX(l.services,l.options),l.translator.on("*",function(u){for(var d=arguments.length,h=new Array(d>1?d-1:0),f=1;f<d;f++)h[f-1]=arguments[f];l.emit.apply(l,[u].concat(h))}),l.init(a,o),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Mf);Ln(jS,"createInstance",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new jS(t,e)});var As=jS.createInstance();As.createInstance=jS.createInstance;As.createInstance;As.init;As.loadResources;As.reloadResources;As.use;As.changeLanguage;As.getFixedT;var Eke=As.t;As.exists;As.setDefaultNamespace;As.hasLoadedNamespace;As.loadNamespaces;As.loadLanguages;function zm(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Hs(t,e){if(t==null)return{};var n=zm(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}var Cke=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g,Rke={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026"},Ake=function(e){return Rke[e]},Ike=function(e){return e.replace(Cke,Ake)};function XX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function UX(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?XX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):XX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var B8={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Ike},Mee,Nke=I.exports.createContext();function Dke(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};B8=UX(UX({},B8),t)}function Mke(){return B8}var zke=function(){function t(){la(this,t),this.usedNamespaces={}}return ca(t,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),t}();function Lke(t){Mee=t}function Xke(){return Mee}var Uke={type:"3rdParty",init:function(e){Dke(e.options.react),Lke(e)}};function Wke(){if(console&&console.warn){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(t=console).warn.apply(t,n)}}var WX={};function Y8(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&WX[e[0]]||(typeof e[0]=="string"&&(WX[e[0]]=new Date),Wke.apply(void 0,e))}function qX(t,e,n){t.loadNamespaces(e,function(){if(t.isInitialized)n();else{var r=function i(){setTimeout(function(){t.off("initialized",i)},0),n()};t.on("initialized",r)}})}function qke(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=e.languages[0],i=e.options?e.options.fallbackLng:!1,s=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var o=function(l,c){var u=e.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!o(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||o(r,t)&&(!i||o(s,t)))}function Fke(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return Y8("i18n.languages were undefined or empty",e.languages),!0;var r=e.options.ignoreJSONStructure!==void 0;return r?e.hasLoadedNamespace(t,{precheck:function(s,o){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!o(s.isLanguageChangingTo,t))return!1}}):qke(t,e,n)}function Bke(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function En(t,e){return Cee(t)||Bke(t,e)||ZR(t,e)||Aee()}function FX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function B9(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?FX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):FX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Yke=function(e,n){var r=I.exports.useRef();return I.exports.useEffect(function(){r.current=n?r.current:e},[e,n]),r.current};function ua(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.i18n,r=I.exports.useContext(Nke)||{},i=r.i18n,s=r.defaultNS,o=n||i||Xke();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new zke),!o){Y8("You will need to pass in an i18next instance by using initReactI18next");var a=function(C){return Array.isArray(C)?C[C.length-1]:C},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}o.options.react&&o.options.react.wait!==void 0&&Y8("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=B9(B9(B9({},Mke()),o.options.react),e),u=c.useSuspense,d=c.keyPrefix,h=t||s||o.options&&o.options.defaultNS;h=typeof h=="string"?[h]:h||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(h);var f=(o.isInitialized||o.initializedStoreOnce)&&h.every(function(k){return Fke(k,o,c)});function p(){return o.getFixedT(null,c.nsMode==="fallback"?h:h[0],d)}var v=I.exports.useState(p),O=En(v,2),g=O[0],y=O[1],b=h.join(),$=Yke(b),w=I.exports.useRef(!0);I.exports.useEffect(function(){var k=c.bindI18n,C=c.bindI18nStore;w.current=!0,!f&&!u&&qX(o,h,function(){w.current&&y(p)}),f&&$&&$!==b&&w.current&&y(p);function D(){w.current&&y(p)}return k&&o&&o.on(k,D),C&&o&&o.store.on(C,D),function(){w.current=!1,k&&o&&k.split(" ").forEach(function(A){return o.off(A,D)}),C&&o&&C.split(" ").forEach(function(A){return o.store.off(A,D)})}},[o,b]);var x=I.exports.useRef(!0);I.exports.useEffect(function(){w.current&&!x.current&&y(p),x.current=!1},[o]);var E=[g,o,f];if(E.t=g,E.i18n=o,E.ready=f,f||!f&&!u)return E;throw new Promise(function(k){qX(o,h,function(){k()})})}var Zke={common_success:"Success",common_confirm:"Confirm",common_cancel:"Cancel",common_delete:"Delete",common_hidden:"Hidden",common_locked:"Locked",common_offline:"Offline",common_directory:"Directory",common_file:"File",editor_no_open_file:"None file opened",editor_large_file_tip:"The file size is over 16 MB, preview is not supported",editor_unsupported_format_file_cannot_display:"The file cannot be displayed for unsupported format",editor_picture_not_support_preview:"Picture's preview is not yet supported",editor_search_files_by_name:"Search files by name",editor_pending_update:"{{pendingUpdate}} updates to be written",editor_ot_success:"Success",editor_file_is_not_editable:"The file is not editable",editor_image_preview_failed_to_load_image:"Failed to load image",editor_image_preview_loading:"loading",file_tree_click_to_show:"Click to show",file_tree_click_to_hidden:"Click to hide",file_tree_click_to_cancel:"Click to cancel",file_tree_click_to_locked:"Click to lock",file_tree_joined_the_test:"Joined the test",file_tree_click_to_remove:"Click to remove",file_tree_add_test:"Add test",file_tree_num_of_files_cannot_exceed_500:"The number of files cannot exceed 500",file_tree_x_existed:"{{x}} existed",\u56DE\u653E\u5DF2\u6682\u505C:"Playback already pause.",\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6:"Cannot open the file with playback mode.",file_tree_x_filtered:"{{x}} filtered",file_tree_x_upload_not_allowed:"Upload of {{x}} not allowed",file_tree_renamed:"Renamed",file_tree_upload_files:"Upload files",file_tree_upload_folder:"Upload folder",show_hidden_files:"Show Hidden files",do_no_show_hidden_files:"Do not show hidden files",file_tree_rename:"Rename",file_tree_create_new_file:"New file",\u8DDF\u968F\u89C6\u89D2:"Follow view browser",\u9000\u51FA\u8DDF\u968F:"Back to normal browser",\u5728\u65B0\u7A97\u53E3\u6253\u5F00:"Open with new tab",file_tree_create_new_folder:"New folder",file_tree_down_file:"Download",file_tree_failed_to_download_file:"Failed to download file",file_tree_make_sure_delete_x_unrecoverable:"Are you sure to delete this {{x}}? The file cannot be recovered after deletion",file_tree_kind_tips:"Notice",file_tree_understood:"Know",file_tree_space_char_exist_in_file_or_folder:"There is a space character",file_tree_file_exceeds_size_limit:"The file {{filePath}} exceeds the size limit of 16M",file_tree_rename_cannot_be_empty:"Rename cannot be empty",output_browser_click_run_start_application:"Click \u3010Run\u3011 to start the application",helpers_invalid_parameter_rate_x:"Invalid parameter: rate={{x}}",lib_the_area_already_set_answer_area_cannot_repeatedly:"The area has already set the answering area and cannot be set repeatedly",lib_x_file_cannot_set_the_answer_area:"The {{x}} file cannot set the answer area",lib_locked:"locked",lib_hidden:"hidden",store_user_not_found:"User not found",store_appStatus_transition_error_x:"AppStatus transition error: {{x}}",dao_channel_agentUserId_x_inconsistent:"The agentUserId {{x}} is inconsistent",dao_channel_event_x_is_not_supported:"Event {{x}} is not supported",dao_channel_connection_not_established:"The connection has not been established yet",dao_channel_playground_not_exist:"Playground does not exist",dao_channel_playground_unbound_container:"Playground unbound container",dao_channel_container_startup_failed:"Container startup failed",dao_channel_insufficient_server_resources:"Insufficient server resources",dao_channel_server_is_busy:"Server is busy",dao_channel_activation_timeout:"Docker activation timeout",dao_channel_docker_failed_to_activate:"Docker failed to start",dao_channel_socket_is_not_ready:"Socket is not ready",dao_channel_socket_is_not_ready_for_x:"Socket is not ready for {{x}}",dao_channel_socket_connect_broken:"Socket connection broken",debug_variables:"Variables",debug_call_stack:"Call stack",debug_staring:"staring",debug_tooltip_run:"Run",debug_tooltip_stop:"Stop",debug_tooltip_continue:"Continue",debug_tooltip_step_over:"Step Over",debug_tooltip_step_into:"Step Into",debug_tooltip_step_out:"Step Out",debug_call_stack_cannot_open_file:"Cannot open non-workspace file",dao_paas_cannot_follow_each_other:"Cannot follow each other",\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9:"Cannt copy the content",\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91:"Cannt edit the content",dao_paas_not_find_mount_dom_object_for_x:"Could not find mounted DOM object for {{x}}",dao_paas_x_component_is_not_supported:"{{x}} component is not supported",dao_paas_no_ready:"No ready",\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91:"Pleas go to file tree to select one file and open it",dao_paas_file_does_not_exist:"File does not exist",dao_pass_set_answer_wrong:"Get wrong when insert answer for question",dao_paas_docker_has_been_destoryed:"docker has been destroyed","Unable to create file or directory with system reserved name":"Unable to create file or directory with system reserved name","The file or folder {{path}} already exists in this location, please choose another name":"The file or folder {{path}} already exists in this location, please choose another name","No results":"No results","Collapse the file tree":"Collapse the file tree","Create or rename to hidden files, will not be visible":"Create or rename to hidden files, will not be visible","Live refresh":"Live refresh","Code diagnosis":"Code diagnosis"},jke={common_success:"\u6210\u529F",common_confirm:"\u786E\u5B9A",common_cancel:"\u53D6\u6D88",common_delete:"\u5220\u9664",common_hidden:"\u5DF2\u9690\u85CF",common_locked:"\u5DF2\u52A0\u9501",common_offline:"\u79BB\u7EBF",common_directory:"\u76EE\u5F55",common_file:"\u6587\u4EF6",editor_no_open_file:"\u672A\u6253\u5F00\u6587\u4EF6",editor_large_file_tip:"\u6587\u4EF6\u8D85\u8FC716\u5146\u5927\u5C0F\uFF0C\u6682\u4E0D\u652F\u6301\u9884\u89C8",editor_unsupported_format_file_cannot_display:"\u6B64\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u6216\u4F7F\u7528\u4E86\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u7F16\u7801\uFF0C\u65E0\u6CD5\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A",editor_picture_not_support_preview:"\u56FE\u7247\u6682\u65F6\u4E0D\u652F\u6301\u9884\u89C8",editor_search_files_by_name:"\u6309\u540D\u79F0\u641C\u7D22\u6587\u4EF6",editor_pending_update:"{{pendingUpdate}}\u4E2A\u66F4\u65B0\u5F85\u5199\u5165",editor_ot_success:"\u6210\u529F",editor_file_is_not_editable:"\u8BE5\u6587\u4EF6\u4E0D\u53EF\u7F16\u8F91",editor_image_preview_failed_to_load_image:"\u52A0\u8F7D\u56FE\u7247\u5931\u8D25",editor_image_preview_loading:"\u52A0\u8F7D\u4E2D...",file_tree_click_to_show:"\u70B9\u51FB\u663E\u793A",file_tree_click_to_hidden:"\u70B9\u51FB\u9690\u85CF",file_tree_click_to_cancel:"\u70B9\u51FB\u53D6\u6D88",file_tree_click_to_locked:"\u70B9\u51FB\u9501\u5B9A",file_tree_joined_the_test:"\u5DF2\u52A0\u5165\u6D4B\u8BD5",file_tree_click_to_remove:"\u70B9\u51FB\u79FB\u9664",file_tree_add_test:"\u6DFB\u52A0\u6D4B\u8BD5",file_tree_num_of_files_cannot_exceed_500:"\u6587\u4EF6\u6570\u91CF\u4E0D\u80FD\u8D85\u8FC7500",file_tree_x_existed:"{{x}}\u5DF2\u5B58\u5728",\u56DE\u653E\u5DF2\u6682\u505C:"\u56DE\u653E\u5DF2\u6682\u505C",\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6:"\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6",\u8DDF\u968F\u89C6\u89D2:"\u8DDF\u968F\u89C6\u89D2",\u9000\u51FA\u8DDF\u968F:"\u9000\u51FA\u8DDF\u968F",\u5728\u65B0\u7A97\u53E3\u6253\u5F00:"\u5728\u65B0\u7A97\u53E3\u6253\u5F00",file_tree_x_filtered:"{{x}}\u88AB\u8FC7\u6EE4",file_tree_x_upload_not_allowed:"{{x}}\u4E0D\u5141\u8BB8\u4E0A\u4F20",file_tree_renamed:"\u91CD\u540D\u4E86",file_tree_upload_files:"\u4E0A\u4F20\u6587\u4EF6",file_tree_upload_folder:"\u4E0A\u4F20\u6587\u4EF6\u5939",show_hidden_files:"\u663E\u793A\u9690\u85CF\u6587\u4EF6",do_no_show_hidden_files:"\u4E0D\u663E\u793A\u9690\u85CF\u6587\u4EF6",file_tree_rename:"\u91CD\u547D\u540D",file_tree_create_new_file:"\u65B0\u5EFA\u6587\u4EF6",file_tree_create_new_folder:"\u65B0\u5EFA\u6587\u4EF6\u5939",file_tree_down_file:"\u4E0B\u8F7D",file_tree_failed_to_download_file:"\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25",file_tree_make_sure_delete_x_unrecoverable:"\u786E\u5B9A\u5220\u9664\u8FD9\u4E2A{{x}}\u5417\uFF1F\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D",file_tree_kind_tips:"\u6E29\u99A8\u63D0\u793A",file_tree_understood:"\u77E5\u9053\u4E86",file_tree_space_char_exist_in_file_or_folder:"\u5B58\u5728\u7A7A\u683C\u5B57\u7B26",file_tree_file_exceeds_size_limit:"\u6587\u4EF6{{filePath}}\u8D85\u51FA\u4E8616M\u7684\u5927\u5C0F\u9650\u5236",file_tree_rename_cannot_be_empty:"\u91CD\u547D\u540D\u4E0D\u80FD\u4E3A\u7A7A",output_browser_click_run_start_application:"\u70B9\u51FB\u3010\u8FD0\u884C\u3011\u542F\u52A8\u5E94\u7528",helpers_invalid_parameter_rate_x:"\u65E0\u6548\u7684\u53C2\u6570: rate={{x}}",lib_the_area_already_set_answer_area_cannot_repeatedly:"\u8BE5\u533A\u57DF\u5DF2\u8BBE\u7F6E\u7B54\u9898\u533A\uFF0C\u4E0D\u53EF\u91CD\u590D\u8BBE\u7F6E",lib_x_file_cannot_set_the_answer_area:"{{x}}\u6587\u4EF6\u4E0D\u53EF\u4EE5\u8BBE\u7F6E\u7B54\u9898\u533A",lib_locked:"\u52A0\u9501",lib_hidden:"\u9690\u85CF",store_user_not_found:"\u627E\u4E0D\u5230\u7528\u6237",store_appStatus_transition_error_x:"appStatus \u8F6C\u6362\u9519\u8BEF: {{x}}",dao_channel_agentUserId_x_inconsistent:"agentUserId {{x}} \u4E0D\u4E00\u81F4",dao_channel_event_x_is_not_supported:"\u4E8B\u4EF6 {{x}} \u4E0D\u652F\u6301",dao_channel_connection_not_established:"\u8FDE\u63A5\u5C1A\u672A\u5EFA\u7ACB",dao_channel_playground_not_exist:"playground\u4E0D\u5B58\u5728",dao_channel_playground_unbound_container:"playground\u672A\u7ED1\u5B9A\u5BB9\u5668",dao_channel_container_startup_failed:"\u5BB9\u5668\u542F\u52A8\u5931\u8D25",dao_channel_insufficient_server_resources:"\u670D\u52A1\u5668\u8D44\u6E90\u4E0D\u8DB3",dao_channel_server_is_busy:"\u670D\u52A1\u5668\u7E41\u5FD9",dao_channel_activation_timeout:"docker\u6FC0\u6D3B\u8D85\u65F6",dao_channel_docker_failed_to_activate:"docker\u542F\u52A8\u5931\u8D25",dao_channel_socket_is_not_ready:"socket\u672A\u51C6\u5907\u597D",dao_channel_socket_is_not_ready_for_x:"socket \u8FD8\u6CA1\u6709\u4E3A{{x}}\u51C6\u5907\u597D",dao_channel_socket_connect_broken:"socket\u8FDE\u63A5\u4E2D\u65AD",debug_variables:"\u53D8\u91CF",debug_call_stack:"\u8C03\u7528\u5806\u6808",debug_staring:"\u542F\u52A8\u4E2D",debug_tooltip_run:"\u8FD0\u884C",debug_tooltip_stop:"\u505C\u6B62",debug_tooltip_continue:"\u7EE7\u7EED",debug_tooltip_step_over:"\u5355\u6B65\u8DF3\u8FC7",debug_tooltip_step_into:"\u5355\u6B65\u8C03\u8BD5",debug_tooltip_step_out:"\u5355\u6B65\u8DF3\u51FA",debug_call_stack_cannot_open_file:"\u65E0\u6CD5\u6253\u5F00\u975E\u5DE5\u4F5C\u533A\u6587\u4EF6",dao_paas_cannot_follow_each_other:"\u4E0D\u80FD\u4E92\u76F8\u8DDF\u968F",\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9:"\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9",\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91:"\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91",dao_paas_not_find_mount_dom_object_for_x:"\u627E\u4E0D\u5230\u4E3A{{x}}\u7684\u6302\u8F7DDOM\u5BF9\u8C61",dao_paas_x_component_is_not_supported:"\u7EC4\u4EF6{{x}}\u4E0D\u652F\u6301",dao_paas_no_ready:"\u672A\u51C6\u5907",\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91:"\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91",dao_paas_file_does_not_exist:"\u6587\u4EF6\u4E0D\u5B58\u5728",dao_pass_set_answer_wrong:"\u8BBE\u7F6E\u9898\u76EE\u7B54\u6848\u9519\u8BEF",dao_paas_docker_has_been_destoryed:"docker\u5DF2\u7ECF\u88AB\u9500\u6BC1","Unable to create file or directory with system reserved name":"\u65E0\u6CD5\u4F7F\u7528\u7CFB\u7EDF\u4FDD\u7559\u540D\u79F0\u521B\u5EFA\u6587\u4EF6\u6216\u76EE\u5F55","The file or folder {{path}} already exists in this location, please choose another name":"\u6B64\u4F4D\u7F6E\u5DF2\u5B58\u5728\u6587\u4EF6\u6216\u8005\u6587\u4EF6\u5939 {{path}}\uFF0C\u8BF7\u9009\u62E9\u5176\u5B83\u540D\u79F0","No results":"\u6CA1\u6709\u7ED3\u679C","Collapse the file tree":"\u6536\u8D77\u6587\u4EF6\u6811","Create or rename to hidden files, will not be visible":"\u521B\u5EFA\u6216\u8005\u91CD\u547D\u540D\u4E3A\u9690\u85CF\u6587\u4EF6\uFF0C\u5C06\u4E0D\u53EF\u89C1","Live refresh":"\u5B9E\u65F6\u5237\u65B0","Code diagnosis":"\u4EE3\u7801\u8BCA\u65AD"},VS=(t=>(t.ZH="ZH",t.EN="EN",t))(VS||{});const Vke={EN:{translation:Zke},ZH:{translation:jke}},Gke="ZH";As.use(Uke).init({resources:Vke,lng:Gke,keySeparator:!1,interpolation:{escapeValue:!1}});const zn=As.t,Hke=[1,2,3,5,8,16];class Kke{constructor(e,n,r,i,s,o,a,l){je(this,"start");je(this,"end");je(this,"totalTime");je(this,"rate");je(this,"preFrameTime",0);je(this,"resumeTime",0);je(this,"dataBuffer",[]);je(this,"playing",!1);je(this,"isReplay",!1);je(this,"index",0);je(this,"firstFrameTime",0);je(this,"isMovePosition",!1);je(this,"preTerminalIndex",{});je(this,"preDebugIndex",{});je(this,"preFireTreeIndex",{});je(this,"preTerminalDockerId","");je(this,"preConsoleDockerId","");je(this,"isStopMovePosition",!1);je(this,"triggerEventForMaxTimespanRecord","");je(this,"triggerEventForMaxTimespan",-1);je(this,"eventCustomize");je(this,"eventDispatcher");je(this,"getPlaybackSnapshot");je(this,"progressDispatcher");je(this,"currentDockerId");this.start=e,this.end=n,this.rate=1,this.totalTime=n-e,this.triggerEventForMaxTimespan=i,this.eventDispatcher=s,this.progressDispatcher=o,this.getPlaybackSnapshot=a,this.eventCustomize=l,this.step=this.step.bind(this),this.currentDockerId=""}logger(...e){ht.info(`${new Date(Date.now()).toLocaleString()} [Playback]${e.join(",")}`)}convertToAbsoluteTime(e){return this.start+e}getFileRootPathByDockerId(e){const n=this.index>=this.dataBuffer.length?this.dataBuffer.length-1:this.index;for(let r=n;r>=0;r--){const i=this.dataBuffer[r];if(this.isFileTree(i.eventName)&&i.dockerId===e&&i.data.fileRootPath)return i.data.fileRootPath}for(let r=0;r<this.dataBuffer.length;r++){const i=this.dataBuffer[r];if(this.isFileTree(i.eventName)&&i.dockerId===e&&i.data.fileRootPath)return i.data.fileRootPath}}getCurrentDocByPathAndDocker(e,n){const r=this.index>=this.dataBuffer.length?this.dataBuffer.length-1:this.index,i=(s,o)=>{var l;if(this.isEditor(s.eventName)&&s.dockerId===e&&s.data.openedPath===n)return s.snapshot||(s=((l=this.getPlaybackSnapshot)==null?void 0:l.call(this,s.eventName,s,this.getPreFrameByFrame(s,o)))||s),s};for(let s=r;s>=0;s--){const o=this.dataBuffer[s],a=i(o,s);if(a)return a}for(let s=0;s<this.dataBuffer.length;s++){const o=this.dataBuffer[s],a=i(o,s);if(a)return a}}getCurrentFrame(){return this.index>=this.dataBuffer.length?this.dataBuffer[this.dataBuffer.length-1]:this.dataBuffer[this.index]}setRate(e){e&&!Hke.includes(e)&&this.progressDispatcher&&this.progressDispatcher("error",`${zn("helpers_invalid_parameter_rate_x",{x:e})}`),this.rate=e||this.rate,H.dao.channel().setPlaybackRateAfterHooks(this.rate)}buffer(e){this.dataBuffer=this.dataBuffer.concat(e),this.firstFrameTime=this.dataBuffer[0].timestamp}pause(){if(this.logger("Click Pause!"),!this.playing){ht.warn("Do not pause more than one time");return}this.playing=!1}resume(){this.resumeTime=this.resumeTime||0,this.resumeTime>0?this.isReplay=!0:this.preFrameTime=Date.now(),this.playing=!0,this.isStopMovePosition=!1,window.requestAnimationFrame(this.step)}restart(){this.preFrameTime=Date.now(),this.playing=!0,this.preFireTreeIndex={},this.preTerminalIndex={},this.preDebugIndex={},this.preTerminalDockerId="",this.preConsoleDockerId="",be.file.reset(),this.index=0,window.requestAnimationFrame(this.step)}movePosition(e){var n;if(!((n=this.dataBuffer)!=null&&n.length)){this.resumeTime=e;return}this.isStopMovePosition=!this.playing,this.resumeTime=e,this.isReplay=!0,this.index=this.findFrameByTimeStamp(),this.isMovePosition=!0,this.preTerminalIndex={},this.preDebugIndex={},be.dao.resetTerminal(),be.dao.resetConsole(),H.dao.channel().xtermStatus({resetConsole:!0}),window.requestAnimationFrame(this.step)}findFrameByTimeStamp(){const e=this.resumeTime+this.firstFrameTime,n=this.dataBuffer,r=n.length,i=(a,l)=>{var c,u,d,h;if(a<=l){const f=Math.floor((l-a)/2+a),p=n[f].timestamp;return p===e?f:e===((c=n[f-1])==null?void 0:c.timestamp)?f-1:e===((u=n[f+1])==null?void 0:u.timestamp)?f+1:e>((d=n[f-1])==null?void 0:d.timestamp)&&e<((h=n[f+1])==null?void 0:h.timestamp)?f:(e<p?l=f-1:e>p&&(a=f+1),i(a,l))}else return ht.warn("Do not find the next frame"),this.index=0,this.resumeTime=0,this.resume(),this.index},s=0,o=r-1;return i(s,o)}gotoNextFrame(){var e;!this.isStopMovePosition&&((e=this.progressDispatcher)==null||e.call(this,"progress",this.resumeTime)),this.isStopMovePosition?(this.playing=!1,this.isStopMovePosition=!1):(this.preFrameTime=Date.now(),window.requestAnimationFrame(this.step))}triggerCustomizeEvent(e){var n;(n=this.eventCustomize)==null||n.call(this,e)}step(){var n,r,i;if(!this.playing&&!this.isStopMovePosition)return;if(this.isReplay&&(this.isReplay=!1,this.preFrameTime=Date.now()),this.resumeTime=this.resumeTime+(Date.now()-this.preFrameTime)*this.rate,this.index>this.dataBuffer.length-1){this.playing=!1,this.resumeTime=0,!this.isStopMovePosition&&((n=this.progressDispatcher)==null||n.call(this,"progress",this.totalTime)),(r=this.progressDispatcher)==null||r.call(this,"complete",this.resumeTime);return}let e=this.dataBuffer[this.index];if(!e){this.gotoNextFrame();return}if(e.eventName==="customize"&&(this.firstFrameTime+this.resumeTime>(e==null?void 0:e.timestamp)&&(this.logger(this.index,e.index,e.eventName,e._id),this.index++,this.triggerCustomizeEvent(e)),!this.isStopMovePosition)){this.gotoNextFrame();return}if(this.isMovePosition){this.triggerPreFrames(),this.isMovePosition=!1;return}if(this.firstFrameTime+this.resumeTime>(e==null?void 0:e.timestamp)){let s=0;const o=this.firstFrameTime+this.resumeTime;for(let a=this.index+1;a<this.dataBuffer.length&&this.dataBuffer[a].timestamp<=o;a++)s++,this.index=a;s>0&&(e=this.dataBuffer[this.index],this.isMovePosition=!0),this.isMovePosition?(this.triggerPreFrames(),this.isMovePosition=!1):(e=((i=this.getPlaybackSnapshot)==null?void 0:i.call(this,e.eventName,e,this.getPreFrameByFrame(e,this.index)||e))||e,this.setPreFrameData(e,this.index)),this.trigger(e.eventName,e)}else this.isMovePosition&&(this.triggerPreFrames(),this.isMovePosition=!1);this.gotoNextFrame()}getPreFrameByFrame(e,n){const{eventName:r,dockerId:i}=e,s=this.isEditor(r),o=this.isFileTree(r);let a;if(s){const{data:{openedPath:l}}=e;for(let c=n-1;c>=0;c--){const u=this.dataBuffer[c];if(u.dockerId===i&&u.eventName===r&&u.data.openedPath===l){a=this.dataBuffer[c],!a.snapshot&&c>=0&&this.setSnapshotByIndex(c);break}}}return o&&(a=this.dataBuffer[this.preFireTreeIndex[i]]),a}setPreFrameData(e,n){const{eventName:r,dockerId:i}=e;this.isFileTree(r)&&(this.preFireTreeIndex[i]=n)}isEditor(e){return e===dt.Editor}isFileTree(e){return e===dt.FileTree}isTerminal(e){return e===dt.Terminal}isConsole(e){return e===dt.Console}isDebug(e){return e===dt.Debug}isTerminalOrConsole(e){return[dt.Terminal.toString(),dt.Console.toString()].includes(e)}setSnapshotByIndex(e){var s;const n=this.dataBuffer[e],{eventName:r}=n,i=this.isEditor(r);for(let o=0;o<=e;o++){let a=this.dataBuffer[o];if(a.eventName===n.eventName&&a.dockerId===n.dockerId&&(i?a.data.openedPath===n.data.openedPath:!0)){if(a.snapshot){this.setPreFrameData(a,o);continue}a=((s=this.getPlaybackSnapshot)==null?void 0:s.call(this,a.eventName,a,this.getPreFrameByFrame(a,o)))||a,this.setPreFrameData(a,o)}}}triggerPreFrames(){var o;const e=[dt.FileTree.toString(),dt.Editor.toString(),dt.Terminal.toString(),dt.Console.toString(),dt.Debug.toString()],n=H.file.doc().openedPath;let r=!1;const i=this.index,s=this.dataBuffer[i].dockerId;this.currentDockerId=s;for(let a=i;a>=0;a--){if(!e.length)return;if(e.includes(this.dataBuffer[a].eventName)&&this.dataBuffer[a].dockerId===this.currentDockerId){const l=this.dataBuffer[a],c=e.findIndex(u=>u===l.eventName);e.splice(c,1),l.eventName===dt.Editor.toString()&&!r&&n!==l.data.openedPath&&(H.file.editorView()&&((o=H.file.editorView())==null||o.destroy(),be.file.editorView(void 0),ht.log("%c[Editor]: unmount","color: red")),be.file.resetFile(),r=!0),l.snapshot||this.setSnapshotByIndex(a),this.trigger(l.eventName,l,!1)}}e.forEach(a=>{this.logger("trigger reset eventName:",a),this.trigger(a,null,!1)})}trigger(e,n,r=!0){if(e==="customize"){this.logger(this.index,e,n==null?void 0:n._id),this.triggerCustomizeEvent(n),r&&this.index++;return}const i=this.isTerminalOrConsole(e),s=this.isDebug(e);if(!i&&!s){this.logger(this.index,e,n==null?void 0:n._id),this.eventDispatcher(e,n),r&&this.index++;return}const o=n==null?void 0:n.dockerId;this.logger("[TR]",o);const a=this.preTerminalIndex[o]||0,l=this.preDebugIndex[o]||0,c=s?l:a;for(let u=c+1;u<=this.index;u++){const d=this.dataBuffer[u];d&&(this.isTerminalOrConsole(d.eventName)||s)&&d.dockerId===o&&(this.logger("[TR]",u,this.index,d.eventName,this.dataBuffer[u].dockerId,this.dataBuffer[u]._id),this.isTerminal(e)&&(this.preTerminalDockerId&&this.preTerminalDockerId!==o&&be.dao.resetTerminal(),this.preTerminalDockerId=o),this.isConsole(e)&&(this.preConsoleDockerId&&this.preConsoleDockerId!==o&&(be.dao.resetConsole(),H.dao.channel().xtermStatus({resetConsole:!0})),this.preConsoleDockerId=o),this.eventDispatcher(d.eventName,d))}s?this.preDebugIndex[o]=this.index:this.preTerminalIndex[o]=this.index,r&&this.index++}}const Jke="@dao42/d42paas-front",eTe="0.9.159",tTe="d42paas front",nTe="dao42 paas team",rTe="https://github.com/dao42/d42paas_frontend#readme",iTe="UNLICENSED",sTe="./dist/DaoPaaS.cjs",oTe="./dist/DaoPaaS.cjs",aTe="./dist/DaoPaaS.d.ts",lTe={prebuild:"rimraf dist",build:"cross-env VITE_BUILD_EVENT=true pnpm tsc && pnpm vite && pnpm typedoc",copydist:"cp -r dist/sdk ../demo/public/",vite:"vite build --config ./config/vite.config.ts && shx cp ./src/types/DaoPaaS.d.ts ./dist",typedoc:"npx typedoc --tsconfig ./doc.tsconfig.json",workNameSpaceToFix:"node ./config/workNameSpaceToFix.js",tsc:"tsc -p ./tsconfig.json --isolatedModules false",test1:"jest --coverage",test:"jest",prepublish:"pnpm build",publish:"npm publish --access public"},cTe={"@babel/core":"7.4.5","@babel/preset-env":"7.4.5","@codemirror/autocomplete":"^6.6.1","@codemirror/collab":"^6.0.0","@codemirror/commands":"^6.2.3","@codemirror/lang-cpp":"^6.0.2","@codemirror/lang-css":"^6.1.1","@codemirror/lang-html":"^6.0.0","@codemirror/lang-java":"^6.0.1","@codemirror/lang-javascript":"^6.0.0","@codemirror/lang-json":"^6.0.0","@codemirror/lang-lezer":"^6.0.0","@codemirror/lang-markdown":"^6.1.1","@codemirror/lang-php":"^6.0.0","@codemirror/lang-python":"^6.0.0","@codemirror/lang-rust":"^6.0.0","@codemirror/lang-sql":"^6.4.1","@codemirror/lang-xml":"^6.0.0","@codemirror/language":"6.5.0","@codemirror/legacy-modes":"^6.3.2","@codemirror/lint":"^6.0.0","@codemirror/search":"^6.0.0","@codemirror/state":"^6.2.0","@codemirror/theme-one-dark":"^6.0.0","@codemirror/view":"^6.10.0","@emotion/babel-plugin":"^11.3.0","@emotion/babel-preset-css-prop":"^11.2.0","@emotion/core":"^11.0.0","@emotion/css":"^11.1.3","@emotion/eslint-plugin":"^11.2.0","@emotion/react":"^11.9.3","@emotion/styled":"^11.3.0","@headlessui/react":"^1.4.3","@loadable/component":"^5.15.2","@open-rpc/client-js":"^1.7.1","@testing-library/jest-dom":"^5.16.4","@testing-library/react":"^13.3.0","@testing-library/user-event":"^14.4.3","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.2","@types/loadable__component":"^5.13.4","@types/lodash":"^4.14.175","@types/lodash.clonedeep":"^4.5.7","@types/lodash.debounce":"^4.0.7","@types/lodash.isequal":"^4.5.6","@types/lodash.throttle":"^4.1.7","@types/node":"^16.11.1","@types/ot":"^0.0.5","@types/prop-types":"^15.7.5","@types/react":"^18.0.14","@types/react-dom":"^18.0.5","@types/react-transition-group":"^4.4.5","@types/testing-library__jest-dom":"^5.14.5","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.28.2","@typescript-eslint/parser":"^4.28.2","@udecode/zustood":"^1.1.1","@vitejs/plugin-react":"^1.0.7",ahooks:"^3.3.10","babel-loader":"^8.2.2",bufferutil:"^4.0.6",classnames:"^2.3.1",codemirror:"^6.0.0",concurrently:"^6.3.0","cross-env":"^7.0.3",devicon:"^2.14.0",dexie:"^3.2.0","file-icons-js":"^1.1.0","file-loader":"^6.2.0","fs-extra":"^10.0.0","glob-all":"^3.2.1","highlight.js":"^11.6.0","hotkeys-js":"^3.9.4",immer:"^9.0.14",jest:"27.0.6",lodash:"^4.17.21",msw:"^0.39.2","ninja-keys":"^1.1.12",ot:"^0.0.15","prop-types":"^15.8.1",react:"^18.2.0","react-complex-tree":"^1.1.6","react-content-loader":"^6.2.0","react-dom":"18.2.0","react-icons":"^4.3.1","react-transition-group":"^4.4.2","rehype-document":"^6.1.0","rehype-highlight":"^5.0.2","rehype-katex":"^6.0.2","rehype-stringify":"^9.0.3","remark-gfm":"^3.0.1","remark-math":"^5.1.1","remark-parse":"^10.0.1","remark-rehype":"^10.1.0",rimraf:"^3.0.2","rollup-plugin-visualizer":"^5.9.0",sass:"^1.43.2","sass-loader":"^12.2.0",shx:"^0.3.3","socket.io-client":"^4.5.1","source-map-loader":"^3.0.0","style-loader":"^3.3.1",stylis:"^4.0.10","ts-jest":"^27.1.3","ts-loader":"^9.2.5","ts-node":"^10.0.0",typedoc:"^0.22.12",unified:"^10.1.2","use-immer":"^0.7.0","utf-8-validate":"^5.0.9",uuid:"^8.3.2",vite:"^2.9.15","vite-plugin-html":"^3.0.6","whatwg-fetch":"^3.6.2",xterm:"^5.1.0","xterm-addon-attach":"^0.8.0","xterm-addon-fit":"^0.7.0",zustand:"^4.0.0-rc.1"},uTe=["dist"],dTe={type:"git",url:"git+https://github.com/dao42/d42paas_frontend.git"},hTe={url:"https://github.com/dao42/d42paas_frontend/issues"},fTe={workerDirectory:"src"},OTe={"@babel/plugin-transform-modules-commonjs":"^7.18.2","babel-jest":"^29.3.1","babel-preset-react-app":"^10.0.1","codemirror-lang-elixir":"^3.0.0","detect-indent":"^7.0.1",i18next:"^21.8.16","jest-websocket-mock":"^2.4.0",lib0:"^0.2.58","lodash.clonedeep":"^4.5.0","lodash.debounce":"^4.0.8","lodash.isequal":"^4.5.0","lodash.throttle":"^4.1.1",minimatch:"^5.1.0","range-analyzer":"0.1.1-alpha.2","rc-dropdown":"^4.0.1","rc-menu":"^9.6.3","react-app-polyfill":"^3.0.0","react-i18next":"11.18.3",rrweb:"2.0.0-alpha.4","rrweb-player":"1.0.0-alpha.4","socket.io":"^4.5.1","socket.io-mock":"^1.3.2","socket.io-msgpack-parser":"^3.0.1","xterm-addon-web-links":"^0.8.0"};var pTe={name:Jke,version:eTe,description:tTe,author:nTe,homepage:rTe,license:iTe,main:sTe,module:oTe,types:aTe,scripts:lTe,devDependencies:cTe,files:uTe,repository:dTe,bugs:hTe,msw:fTe,dependencies:OTe};const mTe=()=>pTe.version,gTe=async(t,e,n)=>{const r=window.localStorage.getItem("__paas__testServerCode__"),i=r?{serverCode:r}:{};return new Promise((s,o)=>{fetch(t+"/api/v1/jssdk/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ticket:e,packageVersion:n,...i})}).then(a=>a.json()).then(a=>{s(a)}).catch(a=>{o(a)})})},zee=(t,e=1)=>{t=t||"#ffffff";let n=t.replace("#","");n.length===3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=parseInt(n.substring(0,2),16),i=parseInt(n.substring(2,4),16),s=parseInt(n.substring(4,6),16);return e>1&&e<=100&&(e=e/100),`rgba(${r},${i},${s},${e})`},vTe=()=>{const t=`
49
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jxe(t){return Cee(t)||Ree(t)||ZR(t)||Aee()}function wX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xX(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var eke={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,n){console&&console[e]&&console[e].apply(console,n)}},tke=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};la(this,t),this.init(e,n)}return ca(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||eke,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,s){return s&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new t(this.logger,xX(xX({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}}]),t}(),Mu=new tke,Mf=function(){function t(){la(this,t),this.observers={}}return ca(t,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(s){i.observers[s]=i.observers[s]||[],i.observers[s].push(r)}),this}},{key:"off",value:function(n,r){if(!!this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value: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(this.observers[n]){var o=[].concat(this.observers[n]);o.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var a=[].concat(this.observers["*"]);a.forEach(function(l){l.apply(l,[n].concat(i))})}}}]),t}();function mg(){var t,e,n=new Promise(function(r,i){t=r,e=i});return n.resolve=t,n.reject=e,n}function kX(t){return t==null?"":""+t}function nke(t,e,n){t.forEach(function(r){e[r]&&(n[r]=e[r])})}function jR(t,e,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!t||typeof t=="string"}for(var s=typeof e!="string"?[].concat(e):e.split(".");s.length>1;){if(i())return{};var o=r(s.shift());!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={}}return i()?{}:{obj:t,k:r(s.shift())}}function TX(t,e,n){var r=jR(t,e,Object),i=r.obj,s=r.k;i[s]=n}function rke(t,e,n,r){var i=jR(t,e,Object),s=i.obj,o=i.k;s[o]=s[o]||[],r&&(s[o]=s[o].concat(n)),r||s[o].push(n)}function ZS(t,e){var n=jR(t,e),r=n.obj,i=n.k;if(!!r)return r[i]}function PX(t,e,n){var r=ZS(t,n);return r!==void 0?r:ZS(e,n)}function Iee(t,e,n){for(var r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):Iee(t[r],e[r],n):t[r]=e[r]);return t}function n1(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ike={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ske(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return ike[e]}):t}var Ox=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,oke=[" ",",","?","!",";"];function ake(t,e,n){e=e||"",n=n||"";var r=oke.filter(function(a){return e.indexOf(a)<0&&n.indexOf(a)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),s=!i.test(t);if(!s){var o=t.indexOf(n);o>0&&!i.test(t.substring(0,o))&&(s=!0)}return s}function QX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function E$(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?QX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):QX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lke(t){var e=cke();return function(){var r=pc(t),i;if(e){var s=pc(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return S0(this,i)}}function cke(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nee(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!t){if(t[e])return t[e];for(var r=e.split(n),i=t,s=0;s<r.length;++s){if(!i||typeof i[r[s]]=="string"&&s+1<r.length)return;if(i[r[s]]===void 0){for(var o=2,a=r.slice(s,s+o).join(n),l=i[a];l===void 0&&r.length>s+o;)o++,a=r.slice(s,s+o).join(n),l=i[a];if(l===void 0)return;if(l===null)return null;if(e.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}var c=r.slice(s+o).join(n);return c?Nee(l,c,n):void 0}i=i[r[s]]}return i}}var uke=function(t){Hf(n,t);var e=lke(n);function n(r){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return la(this,n),i=e.call(this),Ox&&Mf.call(cc(i)),i.data=r||{},i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return ca(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var s=this.options.ns.indexOf(i);s>-1&&this.options.ns.splice(s,1)}},{key:"getResource",value:function(i,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[i,s];o&&typeof o!="string"&&(u=u.concat(o)),o&&typeof o=="string"&&(u=u.concat(l?o.split(l):o)),i.indexOf(".")>-1&&(u=i.split("."));var d=ZS(this.data,u);return d||!c||typeof o!="string"?d:Nee(this.data&&this.data[i]&&this.data[i][s],o,l)}},{key:"addResource",value:function(i,s,o,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[i,s];o&&(u=u.concat(c?o.split(c):o)),i.indexOf(".")>-1&&(u=i.split("."),a=s,s=u[1]),this.addNamespaces(s),TX(this.data,u,a),l.silent||this.emit("added",i,s,o,a)}},{key:"addResources",value:function(i,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in o)(typeof o[l]=="string"||Object.prototype.toString.apply(o[l])==="[object Array]")&&this.addResource(i,s,l,o[l],{silent:!0});a.silent||this.emit("added",i,s,o)}},{key:"addResourceBundle",value:function(i,s,o,a,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[i,s];i.indexOf(".")>-1&&(u=i.split("."),a=o,o=s,s=u[1]),this.addNamespaces(s);var d=ZS(this.data,u)||{};a?Iee(d,o,l):d=E$(E$({},d),o),TX(this.data,u,d),c.silent||this.emit("added",i,s,o)}},{key:"removeResourceBundle",value:function(i,s){this.hasResourceBundle(i,s)&&delete this.data[i][s],this.removeNamespaces(s),this.emit("removed",i,s)}},{key:"hasResourceBundle",value:function(i,s){return this.getResource(i,s)!==void 0}},{key:"getResourceBundle",value:function(i,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?E$(E$({},{}),this.getResource(i,s)):this.getResource(i,s)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var s=this.getDataByLanguage(i),o=s&&Object.keys(s)||[];return!!o.find(function(a){return s[a]&&Object.keys(s[a]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Mf),Dee={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,n,r,i,s){var o=this;return e.forEach(function(a){o.processors[a]&&(n=o.processors[a].process(n,r,i,s))}),n}};function EX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?EX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):EX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dke(t){var e=hke();return function(){var r=pc(t),i;if(e){var s=pc(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return S0(this,i)}}function hke(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var CX={},RX=function(t){Hf(n,t);var e=dke(n);function n(r){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return la(this,n),i=e.call(this),Ox&&Mf.call(cc(i)),nke(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,cc(i)),i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Mu.create("translator"),i}return ca(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var o=this.resolve(i,s);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(i,s){var o=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ns||this.options.defaultNS||[],c=o&&i.indexOf(o)>-1,u=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!ake(i,o,a);if(c&&!u){var d=i.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:i,namespaces:l};var h=i.split(o);(o!==a||o===a&&this.options.ns.indexOf(h[0])>-1)&&(l=h.shift()),i=h.join(a)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,s,o){var a=this;if(Na(s)!=="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),s||(s={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=this.extractFromKey(i[i.length-1],s),d=u.key,h=u.namespaces,f=h[h.length-1],p=s.lng||this.language,v=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(v){var O=s.nsSeparator||this.options.nsSeparator;return l?(g.res="".concat(f).concat(O).concat(d),g):"".concat(f).concat(O).concat(d)}return l?(g.res=d,g):d}var g=this.resolve(i,s),y=g&&g.res,b=g&&g.usedKey||d,$=g&&g.exactUsedKey||d,w=Object.prototype.toString.apply(y),x=["[object Number]","[object Function]","[object RegExp]"],E=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,C=typeof y!="string"&&typeof y!="boolean"&&typeof y!="number";if(k&&y&&C&&x.indexOf(w)<0&&!(typeof E=="string"&&w==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,y,jo(jo({},s),{},{ns:h})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(g.res=D,g):D}if(c){var A=w==="[object Array]",P=A?[]:{},L=A?$:b;for(var K in y)if(Object.prototype.hasOwnProperty.call(y,K)){var ne="".concat(L).concat(c).concat(K);P[K]=this.translate(ne,jo(jo({},s),{joinArrays:!1,ns:h})),P[K]===ne&&(P[K]=y[K])}y=P}}else if(k&&typeof E=="string"&&w==="[object Array]")y=y.join(E),y&&(y=this.extendTranslation(y,i,s,o));else{var U=!1,N=!1,F=s.count!==void 0&&typeof s.count!="string",Y=n.hasDefaultValue(s),q=F?this.pluralResolver.getSuffix(p,s.count,s):"",Z=s["defaultValue".concat(q)]||s.defaultValue;!this.isValidLookup(y)&&Y&&(U=!0,y=Z),this.isValidLookup(y)||(N=!0,y=d);var J=s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,$e=J&&N?void 0:y,se=Y&&Z!==y&&this.options.updateMissing;if(N||U||se){if(this.logger.log(se?"updateKey":"missingKey",p,f,d,se?Z:y),c){var fe=this.resolve(d,jo(jo({},s),{},{keySeparator:!1}));fe&&fe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var ae=[],ie=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ie&&ie[0])for(var oe=0;oe<ie.length;oe++)ae.push(ie[oe]);else this.options.saveMissingTo==="all"?ae=this.languageUtils.toResolveHierarchy(s.lng||this.language):ae.push(s.lng||this.language);var me=function(Ge,Xe,Qe){var yt=Y&&Qe!==y?Qe:$e;a.options.missingKeyHandler?a.options.missingKeyHandler(Ge,f,Xe,yt,se,s):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(Ge,f,Xe,yt,se,s),a.emit("missingKey",Ge,f,Xe,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&F?ae.forEach(function(Te){a.pluralResolver.getSuffixes(Te,s).forEach(function(Ge){me([Te],d+Ge,s["defaultValue".concat(Ge)]||Z)})}):me(ae,d,Z))}y=this.extendTranslation(y,i,s,g,o),N&&y===d&&this.options.appendNamespaceToMissingKey&&(y="".concat(f,":").concat(d)),(N||U)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(f,":").concat(d):d,U?y:void 0):y=this.options.parseMissingKeyHandler(y))}return l?(g.res=y,g):y}},{key:"extendTranslation",value:function(i,s,o,a,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,jo(jo({},this.options.interpolation.defaultVariables),o),a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init(jo(jo({},o),{interpolation:jo(jo({},this.options.interpolation),o.interpolation)}));var u=typeof i=="string"&&(o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(u){var h=i.match(this.interpolator.nestingRegexp);d=h&&h.length}var f=o.replace&&typeof o.replace!="string"?o.replace:o;if(this.options.interpolation.defaultVariables&&(f=jo(jo({},this.options.interpolation.defaultVariables),f)),i=this.interpolator.interpolate(i,f,o.lng||this.language,o),u){var p=i.match(this.interpolator.nestingRegexp),v=p&&p.length;d<v&&(o.nest=!1)}o.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var y=arguments.length,b=new Array(y),$=0;$<y;$++)b[$]=arguments[$];return l&&l[0]===b[0]&&!o.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(b[0]," in key: ").concat(s[0])),null):c.translate.apply(c,b.concat([s]))},o)),o.interpolation&&this.interpolator.reset()}var O=o.postProcess||this.options.postProcess,g=typeof O=="string"?[O]:O;return i!=null&&g&&g.length&&o.applyPostProcessor!==!1&&(i=Dee.handle(g,i,s,this.options&&this.options.postProcessPassResolved?jo({i18nResolved:a},o):o,this)),i}},{key:"resolve",value:function(i){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,l,c,u,d;return typeof i=="string"&&(i=[i]),i.forEach(function(h){if(!s.isValidLookup(a)){var f=s.extractFromKey(h,o),p=f.key;l=p;var v=f.namespaces;s.options.fallbackNS&&(v=v.concat(s.options.fallbackNS));var O=o.count!==void 0&&typeof o.count!="string",g=O&&!o.ordinal&&o.count===0&&s.pluralResolver.shouldUseIntlApi(),y=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",b=o.lngs?o.lngs:s.languageUtils.toResolveHierarchy(o.lng||s.language,o.fallbackLng);v.forEach(function($){s.isValidLookup(a)||(d=$,!CX["".concat(b[0],"-").concat($)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(d)&&(CX["".concat(b[0],"-").concat($)]=!0,s.logger.warn('key "'.concat(l,'" for languages "').concat(b.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(function(w){if(!s.isValidLookup(a)){u=w;var x=[p];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(x,p,w,$,o);else{var E;O&&(E=s.pluralResolver.getSuffix(w,o.count,o));var k="".concat(s.options.pluralSeparator,"zero");if(O&&(x.push(p+E),g&&x.push(p+k)),y){var C="".concat(p).concat(s.options.contextSeparator).concat(o.context);x.push(C),O&&(x.push(C+E),g&&x.push(C+k))}}for(var D;D=x.pop();)s.isValidLookup(a)||(c=D,a=s.getResource(w,$,D,o))}}))})}}),{res:a,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:d}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,s,o,a):this.resourceStore.getResource(i,s,o,a)}}],[{key:"hasDefaultValue",value:function(i){var s="defaultValue";for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&s===o.substring(0,s.length)&&i[o]!==void 0)return!0;return!1}}]),n}(Mf);function F9(t){return t.charAt(0).toUpperCase()+t.slice(1)}var fke=function(){function t(e){la(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Mu.create("languageUtils")}return ca(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(s){return s.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=F9(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=F9(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=F9(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(s){if(!i){var o=r.formatLanguageCode(s);(!r.options.supportedLngs||r.isSupportedCode(o))&&(i=o)}}),!i&&this.options.supportedLngs&&n.forEach(function(s){if(!i){var o=r.getLanguagePartFromCode(s);if(r.isSupportedCode(o))return i=o;i=r.options.supportedLngs.find(function(a){if(a.indexOf(o)===0)return a})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,s=this.getFallbackCodes(r||this.options.fallbackLng||[],n),o=[],a=function(c){!c||(i.isSupportedCode(c)?o.push(c):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(n))):typeof n=="string"&&a(this.formatLanguageCode(n)),s.forEach(function(l){o.indexOf(l)<0&&a(i.formatLanguageCode(l))}),o}}]),t}(),Oke=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],pke={1:function(e){return Number(e>1)},2:function(e){return Number(e!=1)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(e==1?0:e>=2&&e<=4?1:2)},7:function(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(e!==0)},14:function(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:e!==0?1:2)},17:function(e){return Number(e==1||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(e==0?0:e==1?1:2)},19:function(e){return Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(e==1?0:e==0||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)}},mke=["v1","v2","v3"],AX={zero:0,one:1,two:2,few:3,many:4,other:5};function gke(){var t={};return Oke.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:pke[e.fc]}})}),t}var vke=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};la(this,t),this.languageUtils=e,this.options=n,this.logger=Mu.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl=="undefined"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=gke()}return ca(t,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(s){return"".concat(r).concat(s)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(n,i);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort(function(o,a){return AX[o]-AX[a]}).map(function(o){return"".concat(r.options.prepend).concat(o)}):s.numbers.map(function(o){return r.getSuffix(n,o,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(n,i);return s?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(s.select(r)):this.getSuffixRetroCompatible(s,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,s=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),o=n.numbers[s];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var a=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?a():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}},{key:"shouldUseIntlApi",value:function(){return!mke.includes(this.options.compatibilityJSON)}}]),t}();function IX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Cc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?IX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):IX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var yke=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};la(this,t),this.logger=Mu.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return ca(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:ske,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?n1(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?n1(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?n1(r.nestingPrefix):r.nestingPrefixEscaped||n1("$t("),this.nestingSuffix=r.nestingSuffix?n1(r.nestingSuffix):r.nestingSuffixEscaped||n1(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,s){var o=this,a,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(O){return O.replace(/\$/g,"$$$$")}var h=function(g){if(g.indexOf(o.formatSeparator)<0){var y=PX(r,u,g);return o.alwaysFormat?o.format(y,void 0,i,Cc(Cc(Cc({},s),r),{},{interpolationkey:g})):y}var b=g.split(o.formatSeparator),$=b.shift().trim(),w=b.join(o.formatSeparator).trim();return o.format(PX(r,u,$),w,i,Cc(Cc(Cc({},s),r),{},{interpolationkey:$}))};this.resetRegExp();var f=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,p=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(g){return d(g)}},{regex:this.regexp,safeValue:function(g){return o.escapeValue?d(o.escape(g)):d(g)}}];return v.forEach(function(O){for(c=0;a=O.regex.exec(n);){var g=a[1].trim();if(l=h(g),l===void 0)if(typeof f=="function"){var y=f(n,a,s);l=typeof y=="string"?y:""}else if(s&&s.hasOwnProperty(g))l="";else if(p){l=a[0];continue}else o.logger.warn("missed to pass in variable ".concat(g," for interpolating ").concat(n)),l="";else typeof l!="string"&&!o.useRawValueToEscape&&(l=kX(l));var b=O.safeValue(l);if(n=n.replace(a[0],b),p?(O.regex.lastIndex+=l.length,O.regex.lastIndex-=a[0].length):O.regex.lastIndex=0,c++,c>=o.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,l=Cc({},s);l.applyPostProcessor=!1,delete l.defaultValue;function c(f,p){var v=this.nestingOptionsSeparator;if(f.indexOf(v)<0)return f;var O=f.split(new RegExp("".concat(v,"[ ]*{"))),g="{".concat(O[1]);f=O[0],g=this.interpolate(g,l),g=g.replace(/'/g,'"');try{l=JSON.parse(g),p&&(l=Cc(Cc({},p),l))}catch(y){return this.logger.warn("failed parsing options string in nesting for key ".concat(f),y),"".concat(f).concat(v).concat(g)}return delete l.defaultValue,f}for(;o=this.nestingRegexp.exec(n);){var u=[],d=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var h=o[1].split(this.formatSeparator).map(function(f){return f.trim()});o[1]=h.shift(),u=h,d=!0}if(a=r(c.call(this,o[1].trim(),l),l),a&&o[0]===n&&typeof a!="string")return a;typeof a!="string"&&(a=kX(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(n)),a=""),d&&(a=u.reduce(function(f,p){return i.format(f,p,s.lng,Cc(Cc({},s),{},{interpolationkey:o[1].trim()}))},a.trim())),n=n.replace(o[0],a),this.regexp.lastIndex=0}return n}}]),t}();function NX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Nh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?NX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):NX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bke(t){var e=t.toLowerCase().trim(),n={};if(t.indexOf("(")>-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(e==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var s=i.split(";");s.forEach(function(o){if(!!o){var a=o.split(":"),l=Jxe(a),c=l[0],u=l.slice(1),d=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=d),d==="false"&&(n[c.trim()]=!1),d==="true"&&(n[c.trim()]=!0),isNaN(d)||(n[c.trim()]=parseInt(d,10))}})}}return{formatName:e,formatOptions:n}}var _ke=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};la(this,t),this.logger=Mu.create("formatter"),this.options=e,this.formats={number:function(r,i,s){return new Intl.NumberFormat(i,s).format(r)},currency:function(r,i,s){return new Intl.NumberFormat(i,Nh(Nh({},s),{},{style:"currency"})).format(r)},datetime:function(r,i,s){return new Intl.DateTimeFormat(i,Nh({},s)).format(r)},relativetime:function(r,i,s){return new Intl.RelativeTimeFormat(i,Nh({},s)).format(r,s.range||"day")},list:function(r,i,s){return new Intl.ListFormat(i,Nh({},s)).format(r)}},this.init(e)}return ca(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"format",value:function(n,r,i,s){var o=this,a=r.split(this.formatSeparator),l=a.reduce(function(c,u){var d=bke(u),h=d.formatName,f=d.formatOptions;if(o.formats[h]){var p=c;try{var v=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},O=v.locale||v.lng||s.locale||s.lng||i;p=o.formats[h](c,O,Nh(Nh(Nh({},f),s),v))}catch(g){o.logger.warn(g)}return p}else o.logger.warn("there was no format function for ".concat(h));return c},n);return l}}]),t}();function DX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function MX(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?DX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):DX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $ke(t){var e=Ske();return function(){var r=pc(t),i;if(e){var s=pc(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return S0(this,i)}}function Ske(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wke(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var xke=function(t){Hf(n,t);var e=$ke(n);function n(r,i,s){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return la(this,n),o=e.call(this),Ox&&Mf.call(cc(o)),o.backend=r,o.store=i,o.services=s,o.languageUtils=s.languageUtils,o.options=a,o.logger=Mu.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=a.maxParallelReads||10,o.readingCalls=0,o.maxRetries=a.maxRetries>=0?a.maxRetries:5,o.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(s,a.backend,a),o}return ca(n,[{key:"queueLoad",value:function(i,s,o,a){var l=this,c={},u={},d={},h={};return i.forEach(function(f){var p=!0;s.forEach(function(v){var O="".concat(f,"|").concat(v);!o.reload&&l.store.hasResourceBundle(f,v)?l.state[O]=2:l.state[O]<0||(l.state[O]===1?u[O]===void 0&&(u[O]=!0):(l.state[O]=1,p=!1,u[O]===void 0&&(u[O]=!0),c[O]===void 0&&(c[O]=!0),h[v]===void 0&&(h[v]=!0)))}),p||(d[f]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(h)}}},{key:"loaded",value:function(i,s,o){var a=i.split("|"),l=a[0],c=a[1];s&&this.emit("failedLoading",l,c,s),o&&this.store.addResourceBundle(l,c,o),this.state[i]=s?-1:2;var u={};this.queue.forEach(function(d){rke(d.loaded,[l],c),wke(d,i),s&&d.errors.push(s),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(h){u[h]||(u[h]={});var f=d.loaded[h];f.length&&f.forEach(function(p){u[h][p]===void 0&&(u[h][p]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(i,s,o){var a=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!i.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:s,fcName:o,tried:l,wait:c,callback:u});return}return this.readingCalls++,this.backend[o](i,s,function(d,h){if(a.readingCalls--,a.waitingReads.length>0){var f=a.waitingReads.shift();a.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(d&&h&&l<a.maxRetries){setTimeout(function(){a.read.call(a,i,s,o,l+1,c*2,u)},c);return}u(d,h)})}},{key:"prepareLoading",value:function(i,s){var o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof s=="string"&&(s=[s]);var c=this.queueLoad(i,s,a,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){o.loadOne(u)})}},{key:"load",value:function(i,s,o){this.prepareLoading(i,s,{},o)}},{key:"reload",value:function(i,s,o){this.prepareLoading(i,s,{reload:!0},o)}},{key:"loadOne",value:function(i){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=i.split("|"),l=a[0],c=a[1];this.read(l,c,"read",void 0,void 0,function(u,d){u&&s.logger.warn("".concat(o,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&d&&s.logger.log("".concat(o,"loaded namespace ").concat(c," for language ").concat(l),d),s.loaded(i,u,d)})}},{key:"saveMissing",value:function(i,s,o,a,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}o==null||o===""||(this.backend&&this.backend.create&&this.backend.create(i,s,o,a,null,MX(MX({},c),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],s,o,a))}}]),n}(Mf);function kke(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var n={};if(Na(e[1])==="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),Na(e[2])==="object"||Na(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(e,n,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function zX(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function LX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?LX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):LX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Tke(t){var e=Pke();return function(){var r=pc(t),i;if(e){var s=pc(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return S0(this,i)}}function Pke(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C$(){}function Qke(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var jS=function(t){Hf(n,t);var e=Tke(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(la(this,n),r=e.call(this),Ox&&Mf.call(cc(r)),r.options=zX(i),r.services={},r.logger=Mu,r.modules={external:[]},Qke(cc(r)),s&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,s),S0(r,cc(r));setTimeout(function(){r.init(i,s)},0)}return r}return ca(n,[{key:"init",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof s=="function"&&(o=s,s={}),!s.defaultNS&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));var a=kke();this.options=vu(vu(vu({},a),this.options),zX(s)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=vu(vu({},a.interpolation),this.options.interpolation)),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function l(g){return g?typeof g=="function"?new g:g:null}if(!this.options.isClone){this.modules.logger?Mu.init(l(this.modules.logger),this.options):Mu.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=_ke);var u=new fke(this.options);this.store=new uke(this.options.resources,this.options);var d=this.services;d.logger=Mu,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new vke(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(d.formatter=l(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new yke(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new xke(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(g){for(var y=arguments.length,b=new Array(y>1?y-1:0),$=1;$<y;$++)b[$-1]=arguments[$];i.emit.apply(i,[g].concat(b))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new RX(this.services,this.options),this.translator.on("*",function(g){for(var y=arguments.length,b=new Array(y>1?y-1:0),$=1;$<y;$++)b[$-1]=arguments[$];i.emit.apply(i,[g].concat(b))}),this.modules.external.forEach(function(g){g.init&&g.init(i)})}if(this.format=this.options.interpolation.format,o||(o=C$),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.forEach(function(g){i[g]=function(){var y;return(y=i.store)[g].apply(y,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(g){i[g]=function(){var y;return(y=i.store)[g].apply(y,arguments),i}});var v=mg(),O=function(){var y=function($,w){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),v.resolve(w),o($,w)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return y(null,i.t.bind(i));i.changeLanguage(i.options.lng,y)};return this.options.resources||!this.options.initImmediate?O():setTimeout(O,0),v}},{key:"loadResources",value:function(i){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C$,a=o,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(a=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return a();var c=[],u=function(f){if(!!f){var p=s.services.languageUtils.toResolveHierarchy(f);p.forEach(function(v){c.indexOf(v)<0&&c.push(v)})}};if(l)u(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(h){return u(h)})}this.options.preload&&this.options.preload.forEach(function(h){return u(h)}),this.services.backendConnector.load(c,this.options.ns,function(h){!h&&!s.resolvedLanguage&&s.language&&s.setResolvedLanguage(s.language),a(h)})}else a(null)}},{key:"reloadResources",value:function(i,s,o){var a=mg();return i||(i=this.languages),s||(s=this.options.ns),o||(o=C$),this.services.backendConnector.reload(i,s,function(l){a.resolve(),o(l)}),a}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&Dee.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var s=0;s<this.languages.length;s++){var o=this.languages[s];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(i,s){var o=this;this.isLanguageChangingTo=i;var a=mg();this.emit("languageChanging",i);var l=function(h){o.language=h,o.languages=o.services.languageUtils.toResolveHierarchy(h),o.resolvedLanguage=void 0,o.setResolvedLanguage(h)},c=function(h,f){f?(l(f),o.translator.changeLanguage(f),o.isLanguageChangingTo=void 0,o.emit("languageChanged",f),o.logger.log("languageChanged",f)):o.isLanguageChangingTo=void 0,a.resolve(function(){return o.t.apply(o,arguments)}),s&&s(h,function(){return o.t.apply(o,arguments)})},u=function(h){!i&&!h&&o.services.languageDetector&&(h=[]);var f=typeof h=="string"?h:o.services.languageUtils.getBestMatchFromCodes(h);f&&(o.language||l(f),o.translator.language||o.translator.changeLanguage(f),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(f)),o.loadResources(f,function(p){c(p,f)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(i),a}},{key:"getFixedT",value:function(i,s,o){var a=this,l=function c(u,d){var h;if(Na(d)!=="object"){for(var f=arguments.length,p=new Array(f>2?f-2:0),v=2;v<f;v++)p[v-2]=arguments[v];h=a.options.overloadTranslationOptionHandler([u,d].concat(p))}else h=vu({},d);h.lng=h.lng||c.lng,h.lngs=h.lngs||c.lngs,h.ns=h.ns||c.ns,h.keyPrefix=h.keyPrefix||o||c.keyPrefix;var O=a.options.keySeparator||".",g=h.keyPrefix?"".concat(h.keyPrefix).concat(O).concat(u):u;return a.t(g,h)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=s,l.keyPrefix=o,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var u=function(f,p){var v=s.services.backendConnector.state["".concat(f,"|").concat(p)];return v===-1||v===2};if(o.precheck){var d=o.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(a,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(a,i)&&(!l||u(c,i)))}},{key:"loadNamespaces",value:function(i,s){var o=this,a=mg();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){o.options.ns.indexOf(l)<0&&o.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),s&&s(l)}),a):(s&&s(),Promise.resolve())}},{key:"loadLanguages",value:function(i,s){var o=mg();typeof i=="string"&&(i=[i]);var a=this.options.preload||[],l=i.filter(function(c){return a.indexOf(c)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(c){o.resolve(),s&&s(c)}),o):(s&&s(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return s.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C$,a=vu(vu(vu({},this.options),s),{isClone:!0}),l=new n(a),c=["store","services","language"];return c.forEach(function(u){l[u]=i[u]}),l.services=vu({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new RX(l.services,l.options),l.translator.on("*",function(u){for(var d=arguments.length,h=new Array(d>1?d-1:0),f=1;f<d;f++)h[f-1]=arguments[f];l.emit.apply(l,[u].concat(h))}),l.init(a,o),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Mf);Ln(jS,"createInstance",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new jS(t,e)});var As=jS.createInstance();As.createInstance=jS.createInstance;As.createInstance;As.init;As.loadResources;As.reloadResources;As.use;As.changeLanguage;As.getFixedT;var Eke=As.t;As.exists;As.setDefaultNamespace;As.hasLoadedNamespace;As.loadNamespaces;As.loadLanguages;function zm(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Hs(t,e){if(t==null)return{};var n=zm(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}var Cke=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g,Rke={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026"},Ake=function(e){return Rke[e]},Ike=function(e){return e.replace(Cke,Ake)};function XX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function UX(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?XX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):XX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var B8={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Ike},Mee,Nke=I.exports.createContext();function Dke(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};B8=UX(UX({},B8),t)}function Mke(){return B8}var zke=function(){function t(){la(this,t),this.usedNamespaces={}}return ca(t,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),t}();function Lke(t){Mee=t}function Xke(){return Mee}var Uke={type:"3rdParty",init:function(e){Dke(e.options.react),Lke(e)}};function Wke(){if(console&&console.warn){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(t=console).warn.apply(t,n)}}var WX={};function Y8(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&WX[e[0]]||(typeof e[0]=="string"&&(WX[e[0]]=new Date),Wke.apply(void 0,e))}function qX(t,e,n){t.loadNamespaces(e,function(){if(t.isInitialized)n();else{var r=function i(){setTimeout(function(){t.off("initialized",i)},0),n()};t.on("initialized",r)}})}function qke(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=e.languages[0],i=e.options?e.options.fallbackLng:!1,s=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var o=function(l,c){var u=e.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!o(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||o(r,t)&&(!i||o(s,t)))}function Fke(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return Y8("i18n.languages were undefined or empty",e.languages),!0;var r=e.options.ignoreJSONStructure!==void 0;return r?e.hasLoadedNamespace(t,{precheck:function(s,o){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!o(s.isLanguageChangingTo,t))return!1}}):qke(t,e,n)}function Bke(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function En(t,e){return Cee(t)||Bke(t,e)||ZR(t,e)||Aee()}function FX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function B9(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?FX(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):FX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Yke=function(e,n){var r=I.exports.useRef();return I.exports.useEffect(function(){r.current=n?r.current:e},[e,n]),r.current};function ua(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.i18n,r=I.exports.useContext(Nke)||{},i=r.i18n,s=r.defaultNS,o=n||i||Xke();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new zke),!o){Y8("You will need to pass in an i18next instance by using initReactI18next");var a=function(C){return Array.isArray(C)?C[C.length-1]:C},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}o.options.react&&o.options.react.wait!==void 0&&Y8("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=B9(B9(B9({},Mke()),o.options.react),e),u=c.useSuspense,d=c.keyPrefix,h=t||s||o.options&&o.options.defaultNS;h=typeof h=="string"?[h]:h||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(h);var f=(o.isInitialized||o.initializedStoreOnce)&&h.every(function(k){return Fke(k,o,c)});function p(){return o.getFixedT(null,c.nsMode==="fallback"?h:h[0],d)}var v=I.exports.useState(p),O=En(v,2),g=O[0],y=O[1],b=h.join(),$=Yke(b),w=I.exports.useRef(!0);I.exports.useEffect(function(){var k=c.bindI18n,C=c.bindI18nStore;w.current=!0,!f&&!u&&qX(o,h,function(){w.current&&y(p)}),f&&$&&$!==b&&w.current&&y(p);function D(){w.current&&y(p)}return k&&o&&o.on(k,D),C&&o&&o.store.on(C,D),function(){w.current=!1,k&&o&&k.split(" ").forEach(function(A){return o.off(A,D)}),C&&o&&C.split(" ").forEach(function(A){return o.store.off(A,D)})}},[o,b]);var x=I.exports.useRef(!0);I.exports.useEffect(function(){w.current&&!x.current&&y(p),x.current=!1},[o]);var E=[g,o,f];if(E.t=g,E.i18n=o,E.ready=f,f||!f&&!u)return E;throw new Promise(function(k){qX(o,h,function(){k()})})}var Zke={common_success:"Success",common_confirm:"Confirm",common_cancel:"Cancel",common_delete:"Delete",common_hidden:"Hidden",common_locked:"Locked",common_offline:"Offline",common_directory:"Directory",common_file:"File",editor_no_open_file:"None file opened",editor_large_file_tip:"The file size is over 16 MB, preview is not supported",editor_unsupported_format_file_cannot_display:"The file cannot be displayed for unsupported format",editor_picture_not_support_preview:"Picture's preview is not yet supported",editor_search_files_by_name:"Search files by name",editor_pending_update:"{{pendingUpdate}} updates to be written",editor_ot_success:"Success",editor_file_is_not_editable:"The file is not editable",editor_image_preview_failed_to_load_image:"Failed to load image",editor_image_preview_loading:"loading",file_tree_click_to_show:"Click to show",file_tree_click_to_hidden:"Click to hide",file_tree_click_to_cancel:"Click to cancel",file_tree_click_to_locked:"Click to lock",file_tree_joined_the_test:"Joined the test",file_tree_click_to_remove:"Click to remove",file_tree_add_test:"Add test",file_tree_num_of_files_cannot_exceed_500:"The number of files cannot exceed 500",file_tree_x_existed:"{{x}} existed",\u56DE\u653E\u5DF2\u6682\u505C:"Playback already pause.",\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6:"Cannot open the file with playback mode.",file_tree_x_filtered:"{{x}} filtered",file_tree_x_upload_not_allowed:"Upload of {{x}} not allowed",file_tree_renamed:"Renamed",file_tree_upload_files:"Upload files",file_tree_upload_folder:"Upload folder",show_hidden_files:"Show Hidden files",do_no_show_hidden_files:"Do not show hidden files",file_tree_rename:"Rename",file_tree_create_new_file:"New file",\u8DDF\u968F\u89C6\u89D2:"Follow view browser",\u9000\u51FA\u8DDF\u968F:"Back to normal browser",\u5728\u65B0\u7A97\u53E3\u6253\u5F00:"Open with new tab",file_tree_create_new_folder:"New folder",file_tree_down_file:"Download",file_tree_failed_to_download_file:"Failed to download file",file_tree_make_sure_delete_x_unrecoverable:"Are you sure to delete this {{x}}? The file cannot be recovered after deletion",file_tree_kind_tips:"Notice",file_tree_understood:"Know",file_tree_space_char_exist_in_file_or_folder:"There is a space character",file_tree_file_exceeds_size_limit:"The file {{filePath}} exceeds the size limit of 16M",file_tree_rename_cannot_be_empty:"Rename cannot be empty",output_browser_click_run_start_application:"Click \u3010Run\u3011 to start the application",helpers_invalid_parameter_rate_x:"Invalid parameter: rate={{x}}",lib_the_area_already_set_answer_area_cannot_repeatedly:"The area has already set the answering area and cannot be set repeatedly",lib_x_file_cannot_set_the_answer_area:"The {{x}} file cannot set the answer area",lib_locked:"locked",lib_hidden:"hidden",store_user_not_found:"User not found",store_appStatus_transition_error_x:"AppStatus transition error: {{x}}",dao_channel_agentUserId_x_inconsistent:"The agentUserId {{x}} is inconsistent",dao_channel_event_x_is_not_supported:"Event {{x}} is not supported",dao_channel_connection_not_established:"The connection has not been established yet",dao_channel_playground_not_exist:"Playground does not exist",dao_channel_playground_unbound_container:"Playground unbound container",dao_channel_container_startup_failed:"Container startup failed",dao_channel_insufficient_server_resources:"Insufficient server resources",dao_channel_server_is_busy:"Server is busy",dao_channel_activation_timeout:"Docker activation timeout",dao_channel_docker_failed_to_activate:"Docker failed to start",dao_channel_socket_is_not_ready:"Socket is not ready",dao_channel_socket_is_not_ready_for_x:"Socket is not ready for {{x}}",dao_channel_socket_connect_broken:"Socket connection broken",debug_variables:"Variables",debug_call_stack:"Call stack",debug_staring:"staring",debug_tooltip_run:"Run",debug_tooltip_stop:"Stop",debug_tooltip_continue:"Continue",debug_tooltip_step_over:"Step Over",debug_tooltip_step_into:"Step Into",debug_tooltip_step_out:"Step Out",debug_call_stack_cannot_open_file:"Cannot open non-workspace file",dao_paas_cannot_follow_each_other:"Cannot follow each other",\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9:"Cannt copy the content",\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91:"Cannt edit the content",dao_paas_not_find_mount_dom_object_for_x:"Could not find mounted DOM object for {{x}}",dao_paas_x_component_is_not_supported:"{{x}} component is not supported",dao_paas_no_ready:"No ready",\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91:"Pleas go to file tree to select one file and open it",dao_paas_file_does_not_exist:"File does not exist",dao_pass_set_answer_wrong:"Get wrong when insert answer for question",dao_paas_docker_has_been_destoryed:"docker has been destroyed","Unable to create file or directory with system reserved name":"Unable to create file or directory with system reserved name","The file or folder {{path}} already exists in this location, please choose another name":"The file or folder {{path}} already exists in this location, please choose another name","No results":"No results","Collapse the file tree":"Collapse the file tree","Create or rename to hidden files, will not be visible":"Create or rename to hidden files, will not be visible","Live refresh":"Live refresh","Code diagnosis":"Code diagnosis"},jke={common_success:"\u6210\u529F",common_confirm:"\u786E\u5B9A",common_cancel:"\u53D6\u6D88",common_delete:"\u5220\u9664",common_hidden:"\u5DF2\u9690\u85CF",common_locked:"\u5DF2\u52A0\u9501",common_offline:"\u79BB\u7EBF",common_directory:"\u76EE\u5F55",common_file:"\u6587\u4EF6",editor_no_open_file:"\u672A\u6253\u5F00\u6587\u4EF6",editor_large_file_tip:"\u6587\u4EF6\u8D85\u8FC716\u5146\u5927\u5C0F\uFF0C\u6682\u4E0D\u652F\u6301\u9884\u89C8",editor_unsupported_format_file_cannot_display:"\u6B64\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u6216\u4F7F\u7528\u4E86\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u7F16\u7801\uFF0C\u65E0\u6CD5\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A",editor_picture_not_support_preview:"\u56FE\u7247\u6682\u65F6\u4E0D\u652F\u6301\u9884\u89C8",editor_search_files_by_name:"\u6309\u540D\u79F0\u641C\u7D22\u6587\u4EF6",editor_pending_update:"{{pendingUpdate}}\u4E2A\u66F4\u65B0\u5F85\u5199\u5165",editor_ot_success:"\u6210\u529F",editor_file_is_not_editable:"\u8BE5\u6587\u4EF6\u4E0D\u53EF\u7F16\u8F91",editor_image_preview_failed_to_load_image:"\u52A0\u8F7D\u56FE\u7247\u5931\u8D25",editor_image_preview_loading:"\u52A0\u8F7D\u4E2D...",file_tree_click_to_show:"\u70B9\u51FB\u663E\u793A",file_tree_click_to_hidden:"\u70B9\u51FB\u9690\u85CF",file_tree_click_to_cancel:"\u70B9\u51FB\u53D6\u6D88",file_tree_click_to_locked:"\u70B9\u51FB\u9501\u5B9A",file_tree_joined_the_test:"\u5DF2\u52A0\u5165\u6D4B\u8BD5",file_tree_click_to_remove:"\u70B9\u51FB\u79FB\u9664",file_tree_add_test:"\u6DFB\u52A0\u6D4B\u8BD5",file_tree_num_of_files_cannot_exceed_500:"\u6587\u4EF6\u6570\u91CF\u4E0D\u80FD\u8D85\u8FC7500",file_tree_x_existed:"{{x}}\u5DF2\u5B58\u5728",\u56DE\u653E\u5DF2\u6682\u505C:"\u56DE\u653E\u5DF2\u6682\u505C",\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6:"\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6",\u8DDF\u968F\u89C6\u89D2:"\u8DDF\u968F\u89C6\u89D2",\u9000\u51FA\u8DDF\u968F:"\u9000\u51FA\u8DDF\u968F",\u5728\u65B0\u7A97\u53E3\u6253\u5F00:"\u5728\u65B0\u7A97\u53E3\u6253\u5F00",file_tree_x_filtered:"{{x}}\u88AB\u8FC7\u6EE4",file_tree_x_upload_not_allowed:"{{x}}\u4E0D\u5141\u8BB8\u4E0A\u4F20",file_tree_renamed:"\u91CD\u540D\u4E86",file_tree_upload_files:"\u4E0A\u4F20\u6587\u4EF6",file_tree_upload_folder:"\u4E0A\u4F20\u6587\u4EF6\u5939",show_hidden_files:"\u663E\u793A\u9690\u85CF\u6587\u4EF6",do_no_show_hidden_files:"\u4E0D\u663E\u793A\u9690\u85CF\u6587\u4EF6",file_tree_rename:"\u91CD\u547D\u540D",file_tree_create_new_file:"\u65B0\u5EFA\u6587\u4EF6",file_tree_create_new_folder:"\u65B0\u5EFA\u6587\u4EF6\u5939",file_tree_down_file:"\u4E0B\u8F7D",file_tree_failed_to_download_file:"\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25",file_tree_make_sure_delete_x_unrecoverable:"\u786E\u5B9A\u5220\u9664\u8FD9\u4E2A{{x}}\u5417\uFF1F\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D",file_tree_kind_tips:"\u6E29\u99A8\u63D0\u793A",file_tree_understood:"\u77E5\u9053\u4E86",file_tree_space_char_exist_in_file_or_folder:"\u5B58\u5728\u7A7A\u683C\u5B57\u7B26",file_tree_file_exceeds_size_limit:"\u6587\u4EF6{{filePath}}\u8D85\u51FA\u4E8616M\u7684\u5927\u5C0F\u9650\u5236",file_tree_rename_cannot_be_empty:"\u91CD\u547D\u540D\u4E0D\u80FD\u4E3A\u7A7A",output_browser_click_run_start_application:"\u70B9\u51FB\u3010\u8FD0\u884C\u3011\u542F\u52A8\u5E94\u7528",helpers_invalid_parameter_rate_x:"\u65E0\u6548\u7684\u53C2\u6570: rate={{x}}",lib_the_area_already_set_answer_area_cannot_repeatedly:"\u8BE5\u533A\u57DF\u5DF2\u8BBE\u7F6E\u7B54\u9898\u533A\uFF0C\u4E0D\u53EF\u91CD\u590D\u8BBE\u7F6E",lib_x_file_cannot_set_the_answer_area:"{{x}}\u6587\u4EF6\u4E0D\u53EF\u4EE5\u8BBE\u7F6E\u7B54\u9898\u533A",lib_locked:"\u52A0\u9501",lib_hidden:"\u9690\u85CF",store_user_not_found:"\u627E\u4E0D\u5230\u7528\u6237",store_appStatus_transition_error_x:"appStatus \u8F6C\u6362\u9519\u8BEF: {{x}}",dao_channel_agentUserId_x_inconsistent:"agentUserId {{x}} \u4E0D\u4E00\u81F4",dao_channel_event_x_is_not_supported:"\u4E8B\u4EF6 {{x}} \u4E0D\u652F\u6301",dao_channel_connection_not_established:"\u8FDE\u63A5\u5C1A\u672A\u5EFA\u7ACB",dao_channel_playground_not_exist:"playground\u4E0D\u5B58\u5728",dao_channel_playground_unbound_container:"playground\u672A\u7ED1\u5B9A\u5BB9\u5668",dao_channel_container_startup_failed:"\u5BB9\u5668\u542F\u52A8\u5931\u8D25",dao_channel_insufficient_server_resources:"\u670D\u52A1\u5668\u8D44\u6E90\u4E0D\u8DB3",dao_channel_server_is_busy:"\u670D\u52A1\u5668\u7E41\u5FD9",dao_channel_activation_timeout:"docker\u6FC0\u6D3B\u8D85\u65F6",dao_channel_docker_failed_to_activate:"docker\u542F\u52A8\u5931\u8D25",dao_channel_socket_is_not_ready:"socket\u672A\u51C6\u5907\u597D",dao_channel_socket_is_not_ready_for_x:"socket \u8FD8\u6CA1\u6709\u4E3A{{x}}\u51C6\u5907\u597D",dao_channel_socket_connect_broken:"socket\u8FDE\u63A5\u4E2D\u65AD",debug_variables:"\u53D8\u91CF",debug_call_stack:"\u8C03\u7528\u5806\u6808",debug_staring:"\u542F\u52A8\u4E2D",debug_tooltip_run:"\u8FD0\u884C",debug_tooltip_stop:"\u505C\u6B62",debug_tooltip_continue:"\u7EE7\u7EED",debug_tooltip_step_over:"\u5355\u6B65\u8DF3\u8FC7",debug_tooltip_step_into:"\u5355\u6B65\u8C03\u8BD5",debug_tooltip_step_out:"\u5355\u6B65\u8DF3\u51FA",debug_call_stack_cannot_open_file:"\u65E0\u6CD5\u6253\u5F00\u975E\u5DE5\u4F5C\u533A\u6587\u4EF6",dao_paas_cannot_follow_each_other:"\u4E0D\u80FD\u4E92\u76F8\u8DDF\u968F",\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9:"\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9",\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91:"\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91",dao_paas_not_find_mount_dom_object_for_x:"\u627E\u4E0D\u5230\u4E3A{{x}}\u7684\u6302\u8F7DDOM\u5BF9\u8C61",dao_paas_x_component_is_not_supported:"\u7EC4\u4EF6{{x}}\u4E0D\u652F\u6301",dao_paas_no_ready:"\u672A\u51C6\u5907",\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91:"\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91",dao_paas_file_does_not_exist:"\u6587\u4EF6\u4E0D\u5B58\u5728",dao_pass_set_answer_wrong:"\u8BBE\u7F6E\u9898\u76EE\u7B54\u6848\u9519\u8BEF",dao_paas_docker_has_been_destoryed:"docker\u5DF2\u7ECF\u88AB\u9500\u6BC1","Unable to create file or directory with system reserved name":"\u65E0\u6CD5\u4F7F\u7528\u7CFB\u7EDF\u4FDD\u7559\u540D\u79F0\u521B\u5EFA\u6587\u4EF6\u6216\u76EE\u5F55","The file or folder {{path}} already exists in this location, please choose another name":"\u6B64\u4F4D\u7F6E\u5DF2\u5B58\u5728\u6587\u4EF6\u6216\u8005\u6587\u4EF6\u5939 {{path}}\uFF0C\u8BF7\u9009\u62E9\u5176\u5B83\u540D\u79F0","No results":"\u6CA1\u6709\u7ED3\u679C","Collapse the file tree":"\u6536\u8D77\u6587\u4EF6\u6811","Create or rename to hidden files, will not be visible":"\u521B\u5EFA\u6216\u8005\u91CD\u547D\u540D\u4E3A\u9690\u85CF\u6587\u4EF6\uFF0C\u5C06\u4E0D\u53EF\u89C1","Live refresh":"\u5B9E\u65F6\u5237\u65B0","Code diagnosis":"\u4EE3\u7801\u8BCA\u65AD"},VS=(t=>(t.ZH="ZH",t.EN="EN",t))(VS||{});const Vke={EN:{translation:Zke},ZH:{translation:jke}},Gke="ZH";As.use(Uke).init({resources:Vke,lng:Gke,keySeparator:!1,interpolation:{escapeValue:!1}});const zn=As.t,Hke=[1,2,3,5,8,16];class Kke{constructor(e,n,r,i,s,o,a,l){je(this,"start");je(this,"end");je(this,"totalTime");je(this,"rate");je(this,"preFrameTime",0);je(this,"resumeTime",0);je(this,"dataBuffer",[]);je(this,"playing",!1);je(this,"isReplay",!1);je(this,"index",0);je(this,"firstFrameTime",0);je(this,"isMovePosition",!1);je(this,"preTerminalIndex",{});je(this,"preDebugIndex",{});je(this,"preFireTreeIndex",{});je(this,"preTerminalDockerId","");je(this,"preConsoleDockerId","");je(this,"isStopMovePosition",!1);je(this,"triggerEventForMaxTimespanRecord","");je(this,"triggerEventForMaxTimespan",-1);je(this,"eventCustomize");je(this,"eventDispatcher");je(this,"getPlaybackSnapshot");je(this,"progressDispatcher");je(this,"currentDockerId");this.start=e,this.end=n,this.rate=1,this.totalTime=n-e,this.triggerEventForMaxTimespan=i,this.eventDispatcher=s,this.progressDispatcher=o,this.getPlaybackSnapshot=a,this.eventCustomize=l,this.step=this.step.bind(this),this.currentDockerId=""}logger(...e){ht.info(`${new Date(Date.now()).toLocaleString()} [Playback]${e.join(",")}`)}convertToAbsoluteTime(e){return this.start+e}getFileRootPathByDockerId(e){const n=this.index>=this.dataBuffer.length?this.dataBuffer.length-1:this.index;for(let r=n;r>=0;r--){const i=this.dataBuffer[r];if(this.isFileTree(i.eventName)&&i.dockerId===e&&i.data.fileRootPath)return i.data.fileRootPath}for(let r=0;r<this.dataBuffer.length;r++){const i=this.dataBuffer[r];if(this.isFileTree(i.eventName)&&i.dockerId===e&&i.data.fileRootPath)return i.data.fileRootPath}}getCurrentDocByPathAndDocker(e,n){const r=this.index>=this.dataBuffer.length?this.dataBuffer.length-1:this.index,i=(s,o)=>{var l;if(this.isEditor(s.eventName)&&s.dockerId===e&&s.data.openedPath===n)return s.snapshot||(s=((l=this.getPlaybackSnapshot)==null?void 0:l.call(this,s.eventName,s,this.getPreFrameByFrame(s,o)))||s),s};for(let s=r;s>=0;s--){const o=this.dataBuffer[s],a=i(o,s);if(a)return a}for(let s=0;s<this.dataBuffer.length;s++){const o=this.dataBuffer[s],a=i(o,s);if(a)return a}}getCurrentFrame(){return this.index>=this.dataBuffer.length?this.dataBuffer[this.dataBuffer.length-1]:this.dataBuffer[this.index]}setRate(e){e&&!Hke.includes(e)&&this.progressDispatcher&&this.progressDispatcher("error",`${zn("helpers_invalid_parameter_rate_x",{x:e})}`),this.rate=e||this.rate,H.dao.channel().setPlaybackRateAfterHooks(this.rate)}buffer(e){this.dataBuffer=this.dataBuffer.concat(e),this.firstFrameTime=this.dataBuffer[0].timestamp}pause(){if(this.logger("Click Pause!"),!this.playing){ht.warn("Do not pause more than one time");return}this.playing=!1}resume(){this.resumeTime=this.resumeTime||0,this.resumeTime>0?this.isReplay=!0:this.preFrameTime=Date.now(),this.playing=!0,this.isStopMovePosition=!1,window.requestAnimationFrame(this.step)}restart(){this.preFrameTime=Date.now(),this.playing=!0,this.preFireTreeIndex={},this.preTerminalIndex={},this.preDebugIndex={},this.preTerminalDockerId="",this.preConsoleDockerId="",be.file.reset(),this.index=0,window.requestAnimationFrame(this.step)}movePosition(e){var n;if(!((n=this.dataBuffer)!=null&&n.length)){this.resumeTime=e;return}this.isStopMovePosition=!this.playing,this.resumeTime=e,this.isReplay=!0,this.index=this.findFrameByTimeStamp(),this.isMovePosition=!0,this.preTerminalIndex={},this.preDebugIndex={},be.dao.resetTerminal(),be.dao.resetConsole(),H.dao.channel().xtermStatus({resetConsole:!0}),window.requestAnimationFrame(this.step)}findFrameByTimeStamp(){const e=this.resumeTime+this.firstFrameTime,n=this.dataBuffer,r=n.length,i=(a,l)=>{var c,u,d,h;if(a<=l){const f=Math.floor((l-a)/2+a),p=n[f].timestamp;return p===e?f:e===((c=n[f-1])==null?void 0:c.timestamp)?f-1:e===((u=n[f+1])==null?void 0:u.timestamp)?f+1:e>((d=n[f-1])==null?void 0:d.timestamp)&&e<((h=n[f+1])==null?void 0:h.timestamp)?f:(e<p?l=f-1:e>p&&(a=f+1),i(a,l))}else return ht.warn("Do not find the next frame"),this.index=0,this.resumeTime=0,this.resume(),this.index},s=0,o=r-1;return i(s,o)}gotoNextFrame(){var e;!this.isStopMovePosition&&((e=this.progressDispatcher)==null||e.call(this,"progress",this.resumeTime)),this.isStopMovePosition?(this.playing=!1,this.isStopMovePosition=!1):(this.preFrameTime=Date.now(),window.requestAnimationFrame(this.step))}triggerCustomizeEvent(e){var n;(n=this.eventCustomize)==null||n.call(this,e)}step(){var n,r,i;if(!this.playing&&!this.isStopMovePosition)return;if(this.isReplay&&(this.isReplay=!1,this.preFrameTime=Date.now()),this.resumeTime=this.resumeTime+(Date.now()-this.preFrameTime)*this.rate,this.index>this.dataBuffer.length-1){this.playing=!1,this.resumeTime=0,!this.isStopMovePosition&&((n=this.progressDispatcher)==null||n.call(this,"progress",this.totalTime)),(r=this.progressDispatcher)==null||r.call(this,"complete",this.resumeTime);return}let e=this.dataBuffer[this.index];if(!e){this.gotoNextFrame();return}if(e.eventName==="customize"&&(this.firstFrameTime+this.resumeTime>(e==null?void 0:e.timestamp)&&(this.logger(this.index,e.index,e.eventName,e._id),this.index++,this.triggerCustomizeEvent(e)),!this.isStopMovePosition)){this.gotoNextFrame();return}if(this.isMovePosition){this.triggerPreFrames(),this.isMovePosition=!1;return}if(this.firstFrameTime+this.resumeTime>(e==null?void 0:e.timestamp)){let s=0;const o=this.firstFrameTime+this.resumeTime;for(let a=this.index+1;a<this.dataBuffer.length&&this.dataBuffer[a].timestamp<=o;a++)s++,this.index=a;s>0&&(e=this.dataBuffer[this.index],this.isMovePosition=!0),this.isMovePosition?(this.triggerPreFrames(),this.isMovePosition=!1):(e=((i=this.getPlaybackSnapshot)==null?void 0:i.call(this,e.eventName,e,this.getPreFrameByFrame(e,this.index)||e))||e,this.setPreFrameData(e,this.index)),this.trigger(e.eventName,e)}else this.isMovePosition&&(this.triggerPreFrames(),this.isMovePosition=!1);this.gotoNextFrame()}getPreFrameByFrame(e,n){const{eventName:r,dockerId:i}=e,s=this.isEditor(r),o=this.isFileTree(r);let a;if(s){const{data:{openedPath:l}}=e;for(let c=n-1;c>=0;c--){const u=this.dataBuffer[c];if(u.dockerId===i&&u.eventName===r&&u.data.openedPath===l){a=this.dataBuffer[c],!a.snapshot&&c>=0&&this.setSnapshotByIndex(c);break}}}return o&&(a=this.dataBuffer[this.preFireTreeIndex[i]]),a}setPreFrameData(e,n){const{eventName:r,dockerId:i}=e;this.isFileTree(r)&&(this.preFireTreeIndex[i]=n)}isEditor(e){return e===dt.Editor}isFileTree(e){return e===dt.FileTree}isTerminal(e){return e===dt.Terminal}isConsole(e){return e===dt.Console}isDebug(e){return e===dt.Debug}isTerminalOrConsole(e){return[dt.Terminal.toString(),dt.Console.toString()].includes(e)}setSnapshotByIndex(e){var s;const n=this.dataBuffer[e],{eventName:r}=n,i=this.isEditor(r);for(let o=0;o<=e;o++){let a=this.dataBuffer[o];if(a.eventName===n.eventName&&a.dockerId===n.dockerId&&(i?a.data.openedPath===n.data.openedPath:!0)){if(a.snapshot){this.setPreFrameData(a,o);continue}a=((s=this.getPlaybackSnapshot)==null?void 0:s.call(this,a.eventName,a,this.getPreFrameByFrame(a,o)))||a,this.setPreFrameData(a,o)}}}triggerPreFrames(){var o;const e=[dt.FileTree.toString(),dt.Editor.toString(),dt.Terminal.toString(),dt.Console.toString(),dt.Debug.toString()],n=H.file.doc().openedPath;let r=!1;const i=this.index,s=this.dataBuffer[i].dockerId;this.currentDockerId=s;for(let a=i;a>=0;a--){if(!e.length)return;if(e.includes(this.dataBuffer[a].eventName)&&this.dataBuffer[a].dockerId===this.currentDockerId){const l=this.dataBuffer[a],c=e.findIndex(u=>u===l.eventName);e.splice(c,1),l.eventName===dt.Editor.toString()&&!r&&n!==l.data.openedPath&&(H.file.editorView()&&((o=H.file.editorView())==null||o.destroy(),be.file.editorView(void 0),ht.log("%c[Editor]: unmount","color: red")),be.file.resetFile(),r=!0),l.snapshot||this.setSnapshotByIndex(a),this.trigger(l.eventName,l,!1)}}e.forEach(a=>{this.logger("trigger reset eventName:",a),this.trigger(a,null,!1)})}trigger(e,n,r=!0){if(e==="customize"){this.logger(this.index,e,n==null?void 0:n._id),this.triggerCustomizeEvent(n),r&&this.index++;return}const i=this.isTerminalOrConsole(e),s=this.isDebug(e);if(!i&&!s){this.logger(this.index,e,n==null?void 0:n._id),this.eventDispatcher(e,n),r&&this.index++;return}const o=n==null?void 0:n.dockerId;this.logger("[TR]",o);const a=this.preTerminalIndex[o]||0,l=this.preDebugIndex[o]||0,c=s?l:a;for(let u=c+1;u<=this.index;u++){const d=this.dataBuffer[u];d&&(this.isTerminalOrConsole(d.eventName)||s)&&d.dockerId===o&&(this.logger("[TR]",u,this.index,d.eventName,this.dataBuffer[u].dockerId,this.dataBuffer[u]._id),this.isTerminal(e)&&(this.preTerminalDockerId&&this.preTerminalDockerId!==o&&be.dao.resetTerminal(),this.preTerminalDockerId=o),this.isConsole(e)&&(this.preConsoleDockerId&&this.preConsoleDockerId!==o&&(be.dao.resetConsole(),H.dao.channel().xtermStatus({resetConsole:!0})),this.preConsoleDockerId=o),this.eventDispatcher(d.eventName,d))}s?this.preDebugIndex[o]=this.index:this.preTerminalIndex[o]=this.index,r&&this.index++}}const Jke="@dao42/d42paas-front",eTe="0.9.161",tTe="d42paas front",nTe="dao42 paas team",rTe="https://github.com/dao42/d42paas_frontend#readme",iTe="UNLICENSED",sTe="./dist/DaoPaaS.cjs",oTe="./dist/DaoPaaS.cjs",aTe="./dist/DaoPaaS.d.ts",lTe={prebuild:"rimraf dist",build:"cross-env VITE_BUILD_EVENT=true pnpm tsc && pnpm vite && pnpm typedoc",copydist:"cp -r dist/sdk ../demo/public/",vite:"vite build --config ./config/vite.config.ts && shx cp ./src/types/DaoPaaS.d.ts ./dist",typedoc:"npx typedoc --tsconfig ./doc.tsconfig.json",workNameSpaceToFix:"node ./config/workNameSpaceToFix.js",tsc:"tsc -p ./tsconfig.json --isolatedModules false",test1:"jest --coverage",test:"jest",prepublish:"pnpm build",publish:"npm publish --access public"},cTe={"@babel/core":"7.4.5","@babel/preset-env":"7.4.5","@codemirror/autocomplete":"^6.6.1","@codemirror/collab":"^6.0.0","@codemirror/commands":"^6.2.3","@codemirror/lang-cpp":"^6.0.2","@codemirror/lang-css":"^6.1.1","@codemirror/lang-html":"^6.0.0","@codemirror/lang-java":"^6.0.1","@codemirror/lang-javascript":"^6.0.0","@codemirror/lang-json":"^6.0.0","@codemirror/lang-lezer":"^6.0.0","@codemirror/lang-markdown":"^6.1.1","@codemirror/lang-php":"^6.0.0","@codemirror/lang-python":"^6.0.0","@codemirror/lang-rust":"^6.0.0","@codemirror/lang-sql":"^6.4.1","@codemirror/lang-xml":"^6.0.0","@codemirror/language":"6.5.0","@codemirror/legacy-modes":"^6.3.2","@codemirror/lint":"^6.0.0","@codemirror/search":"^6.0.0","@codemirror/state":"^6.2.0","@codemirror/theme-one-dark":"^6.0.0","@codemirror/view":"^6.10.0","@emotion/babel-plugin":"^11.3.0","@emotion/babel-preset-css-prop":"^11.2.0","@emotion/core":"^11.0.0","@emotion/css":"^11.1.3","@emotion/eslint-plugin":"^11.2.0","@emotion/react":"^11.9.3","@emotion/styled":"^11.3.0","@headlessui/react":"^1.4.3","@loadable/component":"^5.15.2","@open-rpc/client-js":"^1.7.1","@testing-library/jest-dom":"^5.16.4","@testing-library/react":"^13.3.0","@testing-library/user-event":"^14.4.3","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.2","@types/loadable__component":"^5.13.4","@types/lodash":"^4.14.175","@types/lodash.clonedeep":"^4.5.7","@types/lodash.debounce":"^4.0.7","@types/lodash.isequal":"^4.5.6","@types/lodash.throttle":"^4.1.7","@types/node":"^16.11.1","@types/ot":"^0.0.5","@types/prop-types":"^15.7.5","@types/react":"^18.0.14","@types/react-dom":"^18.0.5","@types/react-transition-group":"^4.4.5","@types/testing-library__jest-dom":"^5.14.5","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.28.2","@typescript-eslint/parser":"^4.28.2","@udecode/zustood":"^1.1.1","@vitejs/plugin-react":"^1.0.7",ahooks:"^3.3.10","babel-loader":"^8.2.2",bufferutil:"^4.0.6",classnames:"^2.3.1",codemirror:"^6.0.0",concurrently:"^6.3.0","cross-env":"^7.0.3",devicon:"^2.14.0",dexie:"^3.2.0","file-icons-js":"^1.1.0","file-loader":"^6.2.0","fs-extra":"^10.0.0","glob-all":"^3.2.1","highlight.js":"^11.6.0","hotkeys-js":"^3.9.4",immer:"^9.0.14",jest:"27.0.6",lodash:"^4.17.21",msw:"^0.39.2","ninja-keys":"^1.1.12",ot:"^0.0.15","prop-types":"^15.8.1",react:"^18.2.0","react-complex-tree":"^1.1.6","react-content-loader":"^6.2.0","react-dom":"18.2.0","react-icons":"^4.3.1","react-transition-group":"^4.4.2","rehype-document":"^6.1.0","rehype-highlight":"^5.0.2","rehype-katex":"^6.0.2","rehype-stringify":"^9.0.3","remark-gfm":"^3.0.1","remark-math":"^5.1.1","remark-parse":"^10.0.1","remark-rehype":"^10.1.0",rimraf:"^3.0.2","rollup-plugin-visualizer":"^5.9.0",sass:"^1.43.2","sass-loader":"^12.2.0",shx:"^0.3.3","socket.io-client":"^4.5.1","source-map-loader":"^3.0.0","style-loader":"^3.3.1",stylis:"^4.0.10","ts-jest":"^27.1.3","ts-loader":"^9.2.5","ts-node":"^10.0.0",typedoc:"^0.22.12",unified:"^10.1.2","use-immer":"^0.7.0","utf-8-validate":"^5.0.9",uuid:"^8.3.2",vite:"^2.9.15","vite-plugin-html":"^3.0.6","whatwg-fetch":"^3.6.2",xterm:"^5.1.0","xterm-addon-attach":"^0.8.0","xterm-addon-fit":"^0.7.0",zustand:"^4.0.0-rc.1"},uTe=["dist"],dTe={type:"git",url:"git+https://github.com/dao42/d42paas_frontend.git"},hTe={url:"https://github.com/dao42/d42paas_frontend/issues"},fTe={workerDirectory:"src"},OTe={"@babel/plugin-transform-modules-commonjs":"^7.18.2","babel-jest":"^29.3.1","babel-preset-react-app":"^10.0.1","codemirror-lang-elixir":"^3.0.0","detect-indent":"^7.0.1",i18next:"^21.8.16","jest-websocket-mock":"^2.4.0",lib0:"^0.2.58","lodash.clonedeep":"^4.5.0","lodash.debounce":"^4.0.8","lodash.isequal":"^4.5.0","lodash.throttle":"^4.1.1",minimatch:"^5.1.0","range-analyzer":"0.1.1-alpha.2","rc-dropdown":"^4.0.1","rc-menu":"^9.6.3","react-app-polyfill":"^3.0.0","react-i18next":"11.18.3",rrweb:"2.0.0-alpha.4","rrweb-player":"1.0.0-alpha.4","socket.io":"^4.5.1","socket.io-mock":"^1.3.2","socket.io-msgpack-parser":"^3.0.1","xterm-addon-web-links":"^0.8.0"};var pTe={name:Jke,version:eTe,description:tTe,author:nTe,homepage:rTe,license:iTe,main:sTe,module:oTe,types:aTe,scripts:lTe,devDependencies:cTe,files:uTe,repository:dTe,bugs:hTe,msw:fTe,dependencies:OTe};const mTe=()=>pTe.version,gTe=async(t,e,n)=>{const r=window.localStorage.getItem("__paas__testServerCode__"),i=r?{serverCode:r}:{};return new Promise((s,o)=>{fetch(t+"/api/v1/jssdk/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ticket:e,packageVersion:n,...i})}).then(a=>a.json()).then(a=>{s(a)}).catch(a=>{o(a)})})},zee=(t,e=1)=>{t=t||"#ffffff";let n=t.replace("#","");n.length===3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=parseInt(n.substring(0,2),16),i=parseInt(n.substring(2,4),16),s=parseInt(n.substring(4,6),16);return e>1&&e<=100&&(e=e/100),`rgba(${r},${i},${s},${e})`},vTe=()=>{const t=`
50
50
  @keyframes fadeOut {
51
51
  0% {opacity: 1;}
52
52
  100% {opacity: 0;}