From 88c8c9c6585ac4b9bcd2205253385a847f0054c3 Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Wed, 29 Nov 2023 12:09:57 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Fix=20feedback=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- javascript/main.js | 4 ++-- src/components/Giscus/index.tsx | 27 +++++++++++---------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/javascript/main.js b/javascript/main.js index f4136c03..c94629cd 100644 --- a/javascript/main.js +++ b/javascript/main.js @@ -128,7 +128,7 @@ const le=2; iframe.loading { opacity: 0; } - `,xe([ie({reflect:!0})],e.GiscusWidget.prototype,"host",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"repo",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"repoId",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"category",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"categoryId",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"mapping",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"term",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"strict",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"reactionsEnabled",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"emitMetadata",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"inputPosition",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"theme",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"lang",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"loading",2),e.GiscusWidget=xe([function(e){return customElements.get(e)?e=>e:(e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:n,elements:r}=t;return{kind:n,elements:r,finisher(t){customElements.define(e,t)}}})(e,t))(e)}("giscus-widget")],e.GiscusWidget)}(f2)),f2}const h2=Q,g2=B;var m2=function({id:e,host:t,repo:n,repoId:r,category:o,categoryId:i,mapping:a,term:l,strict:s,reactionsEnabled:c,emitMetadata:u,inputPosition:d,theme:f,lang:p,loading:h}){const[g,m]=g2.useState(!1);return g2.useEffect((()=>{g||(Promise.resolve().then((()=>p2())),m(!0))}),[]),g?h2.jsx("giscus-widget",{id:e,host:t,repo:n,repoid:r,category:o,categoryid:i,mapping:a,term:l,strict:s,reactionsenabled:c,emitmetadata:u,inputposition:d,theme:f,lang:p,loading:h}):null};const b2=n(m2);var v2,y2=function(e){return["zh_CN","zh_TW"].includes(e)?e.replace("_","-"):"zh_HK"===e?"zh-TW":e.split("_")[0]},w2=["style","className","reactionsEnabled","mapping","lang","inputPosition","id","loading","emitMetadata"];function x2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S2(e){for(var t=1;t .m-2 {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n }\n\n .gsc-emoji-button.has-reacted {\n border-color: ",";\n border-radius: ","px;\n }\n\n .gsc-loading-image {\n background-image: url(",");\n }\n }\n "])),i,s,l,a,c,c,s,a,a,o,iV(a,.4),o,iV(a,.6),s,l,c,o,o,o,iV(a,.2),s,iV(s,.2),l,iV(a,.2),o,iV(c,.2),l,o,i,c,e.colorText,e.colorFillTertiary,e.colorBorderSecondary,e.colorFillSecondary,e.colorBorder,e.colorFillSecondary,e.colorBorder,e.colorFillSecondary,xV(e.colorPrimary),e.colorPrimary,e.colorPrimaryBorder,e.colorPrimaryHover,e.colorPrimaryBorderHover,e.colorPrimaryActive,iV(xV(e.colorPrimary),.5),iV(e.colorPrimary,.5),iV(e.colorPrimaryBorder,.5),e.colorFillQuaternary,e.colorFillTertiary,e.colorBorder,e.colorText,e.colorTextSecondary,e.colorTextQuaternary,e.colorBgElevated,e.colorFillQuaternary,e.colorBorder,e.colorBorderSecondary,e.colorFillQuaternary,e.colorFillTertiary,e.colorInfo,e.colorInfoBorderHover,e.colorInfoBorder,e.colorInfoBg,e.colorSuccess,e.colorWarning,e.colorWarningBorder,e.colorWarningBg,e.colorError,e.colorErrorBorder,e.colorErrorBg,e.colorBgContainer,e.colorInfoBg,e.colorFillSecondary,e.colorInfoBgHover,r,u,e.colorInfoBorderHover,e.borderRadius,d)}(v,y).styles)}),[y,v]);return Q.jsx("div",{className:n,style:t,children:Q.jsx(b2,S2({emitMetadata:m,id:f,inputPosition:u,lang:y2(s),loading:h,mapping:a,reactionsEnabled:o,theme:"data:text/css;base64,".concat(w)},b))})}));var C2,E2,O2=BB((function(e,t){var n,r=e.css,o=e.token,i=e.isDarkMode,a=e.stylish;switch(t){case"large":n=o.borderRadiusLG;break;case"middle":default:n=o.borderRadius;break;case"small":n=o.borderRadiusSM}return{button:r(C2||(C2=hf(["\n position: relative;\n z-index: 1;\n ","\n border: none;\n border-radius: ","px !important;\n\n &::before {\n content: '';\n\n position: absolute;\n z-index: -1;\n top: 1px;\n left: 1px;\n\n width: calc(100% - 2px);\n height: calc(100% - 2px);\n\n background: ",";\n border-radius: ","px;\n }\n "])),a.gradientAnimation,n,o.colorBgLayout,n-1),glow:r(E2||(E2=hf(["\n ","\n position: absolute;\n z-index: -2;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 100%;\n\n opacity: ",";\n filter: blur(","em);\n border-radius: inherit;\n "])),a.gradientAnimation,i?.5:.3,i?1.5:1)}})),D2=["glow","children","className","size"];function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j2(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function l3(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n code {\n padding: 0 !important;\n border: none !important;\n }\n }\n\n > :not([data-code-type='highlighter']) code {\n padding: 2px 6px;\n\n font-size: ","px;\n color: ",";\n\n background: ",";\n border: 1px solid ",";\n border-radius: ","px;\n }\n\n table {\n border-spacing: 0;\n\n width: 100%;\n margin-block: 1em 1em;\n margin-inline: 0 0;\n padding: 8px;\n\n border: 1px solid ",";\n border-radius: ","px;\n\n code {\n display: inline-flex;\n }\n }\n\n th,\n td {\n padding-block: 10px 10px;\n padding-inline: 16px 16px;\n }\n\n thead {\n tr {\n th {\n background: ",";\n\n &:first-child {\n border-top-left-radius: ","px;\n border-bottom-left-radius: ","px;\n }\n\n &:last-child {\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n }\n }\n }\n }\n\n > ol > li::marker {\n color: "," !important;\n }\n\n > ul > li {\n line-height: 1.8;\n list-style-type: disc;\n\n &::marker {\n color: "," !important;\n }\n }\n\n ol,\n ul {\n > li::marker {\n color: ",";\n }\n }\n\n details {\n margin-bottom: 1em;\n padding: 12px 16px;\n\n background: ",";\n border: 1px solid ",";\n border-radius: ","px;\n\n transition: all 400ms ",";\n }\n\n details[open] {\n summary {\n padding-bottom: 12px;\n border-bottom: 1px solid ",";\n }\n }\n "])),n.colorText,n.colorText,n.colorTextDescription,n.colorLink,n.colorLinkHover,n.colorLinkActive,n.borderRadius,n.fontSizeSM,i,a,r?n.cyan1A:n.cyan6A,n.borderRadiusSM,n.colorBorderSecondary,n.borderRadius,n.colorFillTertiary,n.borderRadius,n.borderRadius,n.borderRadius,n.borderRadius,r?n.cyan9A:n.cyan10A,r?n.cyan9A:n.cyan10A,n.colorTextDescription,n.colorFillTertiary,n.colorBorderSecondary,n.borderRadiusLG,n.motionEaseOut,n.colorBorder),markdownInChat:t(X5||(X5=hf(["\n h1 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.6em;\n }\n\n h2 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.4em;\n }\n\n h3 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.2em;\n }\n\n h4 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.1em;\n }\n\n h5 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1em;\n }\n\n > *:last-child {\n margin-bottom: 0 !important;\n }\n\n p {\n line-height: 1.8 !important;\n\n + * {\n margin-block-end: 0.5em !important;\n }\n\n &:not(:last-child) {\n margin-bottom: 1em !important;\n }\n }\n "]))),noScrollbar:t(K5||(K5=hf(["\n ::-webkit-scrollbar {\n display: none;\n width: 0;\n height: 0;\n background-color: transparent;\n }\n "]))),resetLinkColor:t(Y5||(Y5=hf(["\n cursor: pointer;\n color: ",";\n\n &:hover {\n color: ",";\n }\n "])),n.colorTextSecondary,n.colorText)}}(e)),null==n?void 0:n(e))}),[n]),p=B.useCallback((function(e){return e4(e4({},function(e){for(var t=e.isDarkMode,n={},r=0,o=Object.entries(KZ);r0&&d.map((function(e){return Q.jsx(b1,{url:e},e)})),Q.jsx(qB,{speedy:!0,children:Q.jsxs(GB,e4(e4({customStylish:f,customToken:p},c),{},{theme:h,children:[Q.jsx(Q3,{}),Q.jsx(_$,{style:{minHeight:"inherit",width:"inherit"},children:t})]}))})]})})),n4={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class r4{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||n4,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)})),this}off(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((e=>e!==t)):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{e(...n)}))}if(this.observers["*"]){[].concat(this.observers["*"]).forEach((t=>{t.apply(t,[e,...n])}))}}}function a4(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function l4(e){return null==e?"":""+e}function s4(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}const i="string"!=typeof t?[].concat(t):t.split(".");for(;i.length>1;){if(o())return{};const t=r(i.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function c4(e,t,n){const{obj:r,k:o}=s4(e,t,Object);r[o]=n}function u4(e,t){const{obj:n,k:r}=s4(e,t);if(n)return n[r]}function d4(e,t,n){for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):d4(e[r],t[r],n):e[r]=t[r]);return e}function f4(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var p4={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function h4(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>p4[e])):e}const g4=[" ",",","?","!",";"];function m4(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;ii+e;)e++,a=r.slice(i,i+e).join(n),l=o[a];if(void 0===l)return;if(null===l)return null;if(t.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}const s=r.slice(i+e).join(n);return s?m4(l,s,n):void 0}o=o[r[i]]}return o}function b4(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class v4 extends i4{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));const l=u4(this.data,a);return l||!i||"string"!=typeof n?l:m4(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),c4(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let l=u4(this.data,a)||{};r?d4(l,n,o):l={...l,...n},c4(this.data,a,l),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var y4={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))})),t}};const w4={};class x4 extends i4{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){e.forEach((e=>{t[e]&&(n[e]=t[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=o4.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=g4.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=new RegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i}(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],s=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(s&&"cimode"===s.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:i}const u=this.resolve(e,t);let d=u&&u.res;const f=u&&u.usedKey||i,p=u&&u.exactUsedKey||i,h=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&d&&("string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0&&("string"!=typeof g||"[object Array]"!==h)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(o){const e="[object Array]"===h,n=e?[]:{},r=e?p:f;for(const i in d)if(Object.prototype.hasOwnProperty.call(d,i)){const e=`${r}${o}${i}`;n[i]=this.translate(e,{...t,joinArrays:!1,ns:a}),n[i]===e&&(n[i]=d[i])}d=n}}else if(m&&"string"==typeof g&&"[object Array]"===h)d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const c=void 0!==t.count&&"string"!=typeof t.count,f=x4.hasDefaultValue(t),p=c?this.pluralResolver.getSuffix(s,t.count,t):"",h=t.ordinal&&c?this.pluralResolver.getSuffix(s,t.count,{ordinal:!1}):"",g=t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=g),this.isValidLookup(d)||(a=!0,d=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,b=f&&g!==d&&this.options.updateMissing;if(a||r||b){if(this.logger.log(b?"updateKey":"missingKey",s,l,i,b?g:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.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.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t{const o=f&&r!==d?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,n,o,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,l,n,o,b,t),this.emit("missingKey",e,l,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{this.pluralResolver.getSuffixes(e,t).forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||g)}))})):r(e,i,g))}d=this.extendTranslation(d,e,t,u,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(a){const t=e.match(this.interpolator.nestingRegexp);l=t&&t.length}let s=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language,n),a){const t=e.match(this.interpolator.nestingRegexp);l<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const l=this.extractFromKey(e,a),s=l.key;n=s;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==a.count&&"string"!=typeof a.count,d=u&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(i=e,!w4[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(w4[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" 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!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[s];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,s,n,e,a);else{let e;u&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.push(s+e),a.ordinal&&0===e.indexOf(r)&&i.push(s+e.replace(r,this.options.pluralSeparator)),d&&i.push(s+t)),f){const n=`${s}${this.options.contextSeparator}${a.context}`;i.push(n),u&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let l;for(;l=i.pop();)this.isValidLookup(t)||(r=l,t=this.getResource(n,e,l,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}function S4(e){return e.charAt(0).toUpperCase()+e.slice(1)}class k4{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=o4.create("languageUtils")}getScriptPartFromCode(e){if(!(e=b4(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=b4(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=S4(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=S4(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=S4(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:0===e.indexOf(n)?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let C4=[{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}],E4={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},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(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?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:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||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(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};const O4=["v1","v2","v3"],D4=["v4"],$4={zero:0,one:1,two:2,few:3,many:4,other:5};class j4{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=o4.create("pluralResolver"),this.options.compatibilityJSON&&!D4.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&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=function(){const e={};return C4.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:E4[t.fc]}}))})),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(b4(e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>$4[e]-$4[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!O4.includes(this.options.compatibilityJSON)}}function P4(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=function(e,t,n){const r=u4(e,n);return void 0!==r?r:u4(t,n)}(e,t,n);return!i&&o&&"string"==typeof n&&(i=m4(e,n,r),void 0===i&&(i=m4(t,n,r))),i}class N4{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=o4.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=void 0!==t.escape?t.escape:h4,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?f4(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?f4(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?f4(t.nestingPrefix):t.nestingPrefixEscaped||f4("$t("),this.nestingSuffix=t.nestingSuffix?f4(t.nestingSuffix):t.nestingSuffixEscaped||f4(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,t,n,r){let o,i,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function s(e){return e.replace(/\$/g,"$$$$")}const c=e=>{if(e.indexOf(this.formatSeparator)<0){const o=P4(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(P4(t,l,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const u=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>s(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?s(this.escape(e)):s(e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=c(n),void 0===i)if("function"==typeof u){const t=u(e,o,r);i="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(d){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=l4(i));const l=t.safeValue(i);if(e=e.replace(o[0],l),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),l=i.match(/"/g);(a&&a.length%2==0&&!l||l.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(GY){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,GY),`${e}${n}${i}`}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let l=[];o={...i},o=o.replace&&"string"!=typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let s=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),l=e,s=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=l4(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),s&&(r=l.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function _4(e){const t={};return function(n,r,o){const i=r+JSON.stringify(o);let a=t[i];return a||(a=e(b4(r),o),t[i]=a),a(n)}}class I4{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=o4.create("formatter"),this.options=e,this.formats={number:_4(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:_4(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:_4(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:_4(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:_4(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=_4(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:o,formatOptions:i}=function(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(!e)return;const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=o),"false"===o&&(n[t.trim()]=!1),"true"===o&&(n[t.trim()]=!0),isNaN(o)||(n[t.trim()]=parseInt(o,10))}))}return{formatName:t,formatOptions:n}}(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,l,{...i,...r,...a})}catch(a){this.logger.warn(a)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}class T4 extends i4{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=o4.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},l={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;const a={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:o,k:i}=s4(e,t,Object);o[i]=o[i]||[],r&&(o[i]=o[i].concat(n)),r||o[i].push(n)}(n.loaded,[o],i),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&l&&r{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,l)},l=this.backend[n].bind(this.backend);if(2!==l.length)return l(e,t,a);try{const n=l(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(s){a(s)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=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."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let o;o=5===c.length?c(e,t,n,r,s):c(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(l){a(l)}else c(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function F4(){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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function A4(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function R4(){}class M4 extends i4{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=A4(e),this.services={},this.logger=o4,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=F4();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...A4(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?o4.init(o(this.modules.logger),this.options):o4.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=I4);const n=new k4(this.options);this.store=new v4(this.options.resources,this.options);const i=this.services;i.logger=o4,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new j4(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new N4(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new T4(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=R4),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=a4(),a=()=>{const e=(e,t)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R4;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=a4();return e||(e=this.languages),t||(t=this.options.ns),n||(n=R4),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&y4.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=a4();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,l=new Array(a>2?a-2:0),s=2;s`${i.keyPrefix}${c}${e}`)):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,r.t(u,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?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;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=a4();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=a4();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new k4(F4());return["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"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new M4(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R4;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new M4(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new v4(this.store.data,r),o.services.resourceStore=o.store),o.translator=new x4(o.services,r),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():l&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(m)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=g(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function S(e,t){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},v.call(w.prototype),v.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];S.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(E){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function C(n,r){return new Promise((function(o,a){var s=new w(n,r);if(s.signal&&s.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}c.onload=function(){var e,t,n={status:c.status,statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var r="response"in c?c.response:c.responseText;setTimeout((function(){o(new S(r,n))}),0)},c.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.onabort=function(){setTimeout((function(){a(new e.DOMException("Aborted","AbortError"))}),0)},c.open(s.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(GY){return e}}(s.url),!0),"include"===s.credentials?c.withCredentials=!0:"omit"===s.credentials&&(c.withCredentials=!1),"responseType"in c&&(i?c.responseType="blob":l&&s.headers.get("Content-Type")&&-1!==s.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof p?s.headers.forEach((function(e,t){c.setRequestHeader(t,e)})):Object.getOwnPropertyNames(r.headers).forEach((function(e){c.setRequestHeader(e,d(r.headers[e]))})),s.signal&&(s.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&s.signal.removeEventListener("abort",u)}),c.send(void 0===s._bodyInit?null:s._bodyInit)}))}C.polyfill=!0,t.fetch||(t.fetch=C,t.Headers=p,t.Request=w,t.Response=S),e.Headers=p,e.Request=w,e.Response=S,e.fetch=C}({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=o.fetch?o:i;(n=a.fetch).default=a.fetch,n.fetch=a.fetch,n.Headers=a.Headers,n.Request=a.Request,n.Response=a.Response,e.exports=n}(K4,K4.exports)),K4.exports}!function(e,n){var r;if("function"==typeof fetch&&(r=void 0!==t&&t.fetch?t.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),void 0!==G4&&("undefined"==typeof window||void 0===window.document)){var o=r||Y4();o.default&&(o=o.default),n.default=o,e.exports=n.default}}(X4,X4.exports);var Q4=X4.exports;const J4=n(Q4),Z4=e({__proto__:null,default:J4},[Q4]);function e6(e){return(e6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var t6,n6,r6;"function"==typeof fetch&&(t6="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),V4()&&("undefined"!=typeof global&&global.XMLHttpRequest?n6=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(n6=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?r6=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(r6=window.ActiveXObject)),t6||!Z4||n6||r6||(t6=J4||Z4),"function"!=typeof t6&&(t6=void 0);var o6=function(e,t){if(t&&"object"===e6(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},i6=function(e,t,n){var r=function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)};"function"==typeof fetch?fetch(e,t).then(r).catch(n):t6(e,t).then(r).catch(n)},a6=!1,l6=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},t6&&0!==t.indexOf("file:")?function(e,t,n,r){e.queryStringParams&&(t=o6(t,e.queryStringParams));var o=U4({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&"undefined"!=typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=U4({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},a6?{}:i);try{i6(t,a,r)}catch(GY){if(!i||0===Object.keys(i).length||!GY.message||GY.message.indexOf("not implemented")<0)return r(GY);try{Object.keys(i).forEach((function(e){delete a[e]})),i6(t,a,r),a6=!0}catch(l){r(l)}}}(e,t,n,r):V4()||"function"==typeof ActiveXObject?function(e,t,n,r){n&&"object"===e6(n)&&(n=o6("",n).slice(1)),e.queryStringParams&&(t=o6(t,e.queryStringParams));try{var o;(o=n6?new n6:new r6("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var i=e.customHeaders;if(i="function"==typeof i?i():i)for(var a in i)o.setRequestHeader(a,i[a]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(GY){console&&console.log(GY)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function s6(e){return(s6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c6(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}var t,n,r;return t=e,n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=U4(n,this.options||{},d6()),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,a=this,l=this.options.loadPath;"function"==typeof this.options.loadPath&&(l=this.options.loadPath(e,n)),(l=function(e){return!!e&&"function"==typeof e.then}(i=l)?i:Promise.resolve(i)).then((function(i){if(!i)return o(null,{});var l=a.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});a.loadUrl(l,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,r){var o=this,i="string"==typeof n?[n]:n,a="string"==typeof r?[r]:r,l=this.options.parseLoadPayload(i,a);this.options.request(this.options,e,l,(function(i,a){if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&i&&i.message&&i.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+i.message,!0);if(i)return t(i,!1);var l,s;try{l="string"==typeof a.data?o.options.parse(a.data,n,r):a.data}catch(GY){s="failed parsing "+e+" to json"}if(s)return t(s,!1);t(null,l)}))}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,r),l=0,s=[],c=[];e.forEach((function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var u=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,u,a,(function(t,n){l+=1,s.push(t),c.push(n),l===e.length&&"function"==typeof o&&o(s,c)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var a=[],l=function(e){r.toResolveHierarchy(e).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};l(i),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return l(e)})),a.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)}))}))}))}}}],n&&c6(t.prototype,n),r&&c6(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();f6.type="backend";const p6={};function h6(){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}};function m6(e,t,n){e.loadNamespaces(t,g6(e,n))}function b6(e,t,n,r){"string"==typeof n&&(n=[n]),n.forEach((t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,g6(e,r))}const v6=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,y6={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},w6=e=>y6[e];let x6,S6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(v6,w6)};const k6={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};S6={...S6,...e}}(e.options.react),function(e){x6=e}(e)}},C6=B.createContext();class E6{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function O6(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=B.useContext(C6)||{},i=n||r||x6;if(i&&!i.reportNamespaces&&(i.reportNamespaces=new E6),!i){h6("You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}i.options.react&&void 0!==i.options.react.wait&&h6("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...S6,...i.options.react,...t},{useSuspense:l,keyPrefix:s}=a;let c=e||o||i.options&&i.options.defaultNS;c="string"==typeof c?[c]:c||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every((e=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.languages[0],o=!!t.options&&t.options.fallbackLng,i=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;const a=(e,n)=>{const r=t.services.backendConnector.state[`${e}|${n}`];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}(e,t,n):(h6("i18n.languages were undefined or empty",t.languages),!0)}(e,i,a)));function d(){return i.getFixedT(t.lng||null,"fallback"===a.nsMode?c:c[0],s)}const[f,p]=B.useState(d);let h=c.join();t.lng&&(h=`${t.lng}${h}`);const g=((e,t)=>{const n=B.useRef();return B.useEffect((()=>{n.current=t?n.current:e}),[e,t]),n.current})(h),m=B.useRef(!0);B.useEffect((()=>{const{bindI18n:e,bindI18nStore:n}=a;function r(){m.current&&p(d)}return m.current=!0,u||l||(t.lng?b6(i,t.lng,c,(()=>{m.current&&p(d)})):m6(i,c,(()=>{m.current&&p(d)}))),u&&g&&g!==h&&m.current&&p(d),e&&i&&i.on(e,r),n&&i&&i.store.on(n,r),()=>{m.current=!1,e&&i&&e.split(" ").forEach((e=>i.off(e,r))),n&&i&&n.split(" ").forEach((e=>i.store.off(e,r)))}}),[i,h]);const b=B.useRef(!0);B.useEffect((()=>{m.current&&!b.current&&p(d),b.current=!1}),[i,s]);const v=[f,i,u];if(v.t=f,v.i18n=i,v.ready=u,u)return v;if(!u&&!l)return v;throw new Promise((e=>{t.lng?b6(i,t.lng,c,(()=>e())):m6(i,c,(()=>e()))}))}var D6={BASE_URL:"/dev",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const $6=new Map,j6=e=>{const t=$6.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},P6=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:a,store:l,...s}=t;let c;try{c=(null!=i?i:"production"!==(D6?"production":void 0))&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(GY){}if(!c)return"production"!==(D6?"production":void 0)&&i&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,o);const{connection:u,...d}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const r=$6.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return $6.set(n.name,o),{type:"tracked",store:e,...o}})(l,c,s);let f=!0;o.setState=(e,t,i)=>{const c=n(e,t);if(!f)return c;const d=void 0===i?{type:a||"anonymous"}:"string"==typeof i?{type:i}:i;return void 0===l?(null==u||u.send(d,r()),c):(null==u||u.send({...d,type:`${l}/${d.type}`},{...j6(s.name),[l]:o.getState()}),c)};const p=(...e)=>{const t=f;f=!1,n(...e),f=t},h=e(o.setState,r,o);if("untracked"===d.type?null==u||u.init(h):(d.stores[d.store]=o,null==u||u.init(Object.fromEntries(Object.entries(d.stores).map((([e,t])=>[e,e===d.store?h:t.getState()]))))),o.dispatchFromDevtools&&"function"==typeof o.dispatch){let e=!1;const t=o.dispatch;o.dispatch=(...n)=>{"production"===(D6?"production":void 0)||"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):N6(e.payload,(e=>{if("__setState"!==e.type)o.dispatchFromDevtools&&"function"==typeof o.dispatch&&o.dispatch(e);else{if(void 0===l)return void p(e.state);1!==Object.keys(e.state).length&&console.error('\n [zustand devtools middleware] Unsupported __setState action format. \n When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n ');const t=e.state[l];if(null==t)return;JSON.stringify(o.getState())!==JSON.stringify(t)&&p(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return p(h),void 0===l?null==u?void 0:u.init(o.getState()):null==u?void 0:u.init(j6(s.name));case"COMMIT":return void 0===l?void(null==u||u.init(o.getState())):null==u?void 0:u.init(j6(s.name));case"ROLLBACK":return N6(e.state,(e=>{if(void 0===l)return p(e),void(null==u||u.init(o.getState()));p(e[l]),null==u||u.init(j6(s.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return N6(e.state,(e=>{void 0!==l?JSON.stringify(o.getState())!==JSON.stringify(e[l])&&p(e[l]):p(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;return p(void 0===l?r:r[l]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return f=!f}return}})),h},N6=(e,t)=>{let n;try{n=JSON.parse(e)}catch(GY){console.error("[zustand devtools middleware] Could not parse the received json",GY)}void 0!==n&&t(n)};var _6={exports:{}},I6={},T6=B,F6=ZJ;var A6="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},R6=F6.useSyncExternalStore,M6=T6.useRef,L6=T6.useEffect,z6=T6.useMemo,B6=T6.useDebugValue;I6.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=M6(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=z6((function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return l=t}return l=e}if(t=l,A6(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,l=n)}var i,l,s=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var l=R6(e,i[0],i[1]);return L6((function(){a.hasValue=!0,a.value=l}),[l]),B6(l),l},_6.exports=I6;const H6=n(_6.exports);var W6={BASE_URL:"/dev",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const U6=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{"production"!==(W6?"production":void 0)&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},{useDebugValue:V6}=H,{useSyncExternalStoreWithSelector:G6}=H6;const q6=(e,t)=>{const n=(e=>e?U6(e):U6)(e),r=(e,r=t)=>function(e,t=e.getState,n){const r=G6(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return V6(r),r}(n,e,r);return Object.assign(r,n),r};var X6={exports:{}};var K6={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Y6={};var Q6="object"==typeof process&&Y6&&Y6.NODE_DEBUG&&/\bsemver\b/i.test(Y6.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=K6,i=Q6,a=(t=e.exports={}).re=[],l=t.safeRe=[],s=t.src=[],c=t.t={};let u=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",o],[d,r]],p=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),o=u++;i(e,o,t),c[e]=o,s[o]=t,a[o]=new RegExp(t,n?"g":void 0),l[o]=new RegExp(r,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${s[c.NUMERICIDENTIFIER]})\\.(${s[c.NUMERICIDENTIFIER]})\\.(${s[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${s[c.NUMERICIDENTIFIERLOOSE]})\\.(${s[c.NUMERICIDENTIFIERLOOSE]})\\.(${s[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${s[c.NUMERICIDENTIFIER]}|${s[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${s[c.NUMERICIDENTIFIERLOOSE]}|${s[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${s[c.PRERELEASEIDENTIFIER]}(?:\\.${s[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${s[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${s[c.BUILDIDENTIFIER]}(?:\\.${s[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${s[c.MAINVERSION]}${s[c.PRERELEASE]}?${s[c.BUILD]}?`),p("FULL",`^${s[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${s[c.MAINVERSIONLOOSE]}${s[c.PRERELEASELOOSE]}?${s[c.BUILD]}?`),p("LOOSE",`^${s[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${s[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${s[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${s[c.XRANGEIDENTIFIER]})(?:\\.(${s[c.XRANGEIDENTIFIER]})(?:\\.(${s[c.XRANGEIDENTIFIER]})(?:${s[c.PRERELEASE]})?${s[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${s[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[c.XRANGEIDENTIFIERLOOSE]})(?:${s[c.PRERELEASELOOSE]})?${s[c.BUILD]}?)?)?`),p("XRANGE",`^${s[c.GTLT]}\\s*${s[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${s[c.GTLT]}\\s*${s[c.XRANGEPLAINLOOSE]}$`),p("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),p("COERCERTL",s[c.COERCE],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${s[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${s[c.LONETILDE]}${s[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${s[c.LONETILDE]}${s[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${s[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${s[c.LONECARET]}${s[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${s[c.LONECARET]}${s[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${s[c.GTLT]}\\s*(${s[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${s[c.GTLT]}\\s*(${s[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${s[c.GTLT]}\\s*(${s[c.LOOSEPLAIN]}|${s[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${s[c.XRANGEPLAIN]})\\s+-\\s+(${s[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${s[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(X6,X6.exports);var J6=X6.exports;const Z6=Object.freeze({loose:!0}),e8=Object.freeze({});var t8=e=>e?"object"!=typeof e?Z6:e:e8;const n8=/^[0-9]+$/,r8=(e,t)=>{const n=n8.test(e),r=n8.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:er8(t,e)};const i8=Q6,{MAX_LENGTH:a8,MAX_SAFE_INTEGER:l8}=K6,{safeRe:s8,t:c8}=J6,u8=t8,{compareIdentifiers:d8}=o8;var f8=class e{constructor(t,n){if(n=u8(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>a8)throw new TypeError(`version is longer than ${a8} characters`);i8("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?s8[c8.LOOSE]:s8[c8.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>l8||this.major<0)throw new TypeError("Invalid major version");if(this.minor>l8||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>l8||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===d8(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const p8=f8;var h8=(e,t,n=!1)=>{if(e instanceof p8)return e;try{return new p8(e,t)}catch(r){if(!n)return null;throw r}};const g8=h8;var m8=(e,t)=>{const n=g8(e,t);return n?n.version:null};const b8=h8;var v8=(e,t)=>{const n=b8(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const y8=f8;var w8=(e,t,n,r,o)=>{"string"==typeof n&&(o=r,r=n,n=void 0);try{return new y8(e instanceof y8?e.version:e,n).inc(t,r,o).version}catch(i){return null}};const x8=h8;var S8=(e,t)=>{const n=x8(e,null,!0),r=x8(t,null,!0),o=n.compare(r);if(0===o)return null;const i=o>0,a=i?n:r,l=i?r:n,s=!!a.prerelease.length;if(!!l.prerelease.length&&!s)return l.patch||l.minor?a.patch?"patch":a.minor?"minor":"major":"major";const c=s?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};const k8=f8;var C8=(e,t)=>new k8(e,t).major;const E8=f8;var O8=(e,t)=>new E8(e,t).minor;const D8=f8;var $8=(e,t)=>new D8(e,t).patch;const j8=h8;var P8=(e,t)=>{const n=j8(e,t);return n&&n.prerelease.length?n.prerelease:null};const N8=f8;var _8=(e,t,n)=>new N8(e,n).compare(new N8(t,n));const I8=_8;var T8=(e,t,n)=>I8(t,e,n);const F8=_8;var A8=(e,t)=>F8(e,t,!0);const R8=f8;var M8=(e,t,n)=>{const r=new R8(e,n),o=new R8(t,n);return r.compare(o)||r.compareBuild(o)};const L8=M8;var z8=(e,t)=>e.sort(((e,n)=>L8(e,n,t)));const B8=M8;var H8=(e,t)=>e.sort(((e,n)=>B8(n,e,t)));const W8=_8;var U8=(e,t,n)=>W8(e,t,n)>0;const V8=_8;var G8=(e,t,n)=>V8(e,t,n)<0;const q8=_8;var X8=(e,t,n)=>0===q8(e,t,n);const K8=_8;var Y8=(e,t,n)=>0!==K8(e,t,n);const Q8=_8;var J8=(e,t,n)=>Q8(e,t,n)>=0;const Z8=_8;var e7=(e,t,n)=>Z8(e,t,n)<=0;const t7=X8,n7=Y8,r7=U8,o7=J8,i7=G8,a7=e7;var l7=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return t7(e,n,r);case"!=":return n7(e,n,r);case">":return r7(e,n,r);case">=":return o7(e,n,r);case"<":return i7(e,n,r);case"<=":return a7(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};const s7=f8,c7=h8,{safeRe:u7,t:d7}=J6;var f7,p7,h7=(e,t)=>{if(e instanceof s7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=u7[d7.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),u7[d7.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;u7[d7.COERCERTL].lastIndex=-1}else n=e.match(u7[d7.COERCE]);return null===n?null:c7(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};var g7=m7;function m7(e){var t=this;if(t instanceof m7||(t=new m7),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},m7.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},m7.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},m7.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},m7.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new m7;if(tthis.length&&(t=this.length);for(var r=0,o=this.head;null!==o&&rthis.length&&(t=this.length);for(var r=this.length,o=this.tail;null!==o&&r>t;r--)o=o.prev;for(;null!==o&&r>e;r--,o=o.prev)n.push(o.value);return n},m7.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&r1;const I7=(e,t,n)=>{const r=e[P7].get(t);if(r){const t=r.value;if(T7(e,t)){if(A7(e,r),!e[E7])return}else n&&(e[N7]&&(r.value.now=Date.now()),e[j7].unshiftNode(r));return t.value}},T7=(e,t)=>{if(!t||!t.maxAge&&!e[O7])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[O7]&&n>e[O7]},F7=e=>{if(e[k7]>e[S7])for(let t=e[j7].tail;e[k7]>e[S7]&&null!==t;){const n=t.prev;A7(e,t),t=n}},A7=(e,t)=>{if(t){const n=t.value;e[D7]&&e[D7](n.key,n.value),e[k7]-=n.length,e[P7].delete(n.key),e[j7].removeNode(t)}};class R7{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const M7=(e,t,n,r)=>{let o=n.value;T7(e,o)&&(A7(e,n),e[E7]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};var L7,z7,B7,H7,W7=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[S7]=e.max||1/0;const t=e.length||_7;if(this[C7]="function"!=typeof t?_7:t,this[E7]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[O7]=e.maxAge||0,this[D7]=e.dispose,this[$7]=e.noDisposeOnSet||!1,this[N7]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[S7]=e||1/0,F7(this)}get max(){return this[S7]}set allowStale(e){this[E7]=!!e}get allowStale(){return this[E7]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[O7]=e,F7(this)}get maxAge(){return this[O7]}set lengthCalculator(e){"function"!=typeof e&&(e=_7),e!==this[C7]&&(this[C7]=e,this[k7]=0,this[j7].forEach((e=>{e.length=this[C7](e.value,e.key),this[k7]+=e.length}))),F7(this)}get lengthCalculator(){return this[C7]}get length(){return this[k7]}get itemCount(){return this[j7].length}rforEach(e,t){t=t||this;for(let n=this[j7].tail;null!==n;){const r=n.prev;M7(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[j7].head;null!==n;){const r=n.next;M7(this,e,n,t),n=r}}keys(){return this[j7].toArray().map((e=>e.key))}values(){return this[j7].toArray().map((e=>e.value))}reset(){this[D7]&&this[j7]&&this[j7].length&&this[j7].forEach((e=>this[D7](e.key,e.value))),this[P7]=new Map,this[j7]=new x7,this[k7]=0}dump(){return this[j7].map((e=>!T7(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[j7]}set(e,t,n){if((n=n||this[O7])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,o=this[C7](t,e);if(this[P7].has(e)){if(o>this[S7])return A7(this,this[P7].get(e)),!1;const i=this[P7].get(e).value;return this[D7]&&(this[$7]||this[D7](e,i.value)),i.now=r,i.maxAge=n,i.value=t,this[k7]+=o-i.length,i.length=o,this.get(e),F7(this),!0}const i=new R7(e,t,o,r,n);return i.length>this[S7]?(this[D7]&&this[D7](e,t),!1):(this[k7]+=i.length,this[j7].unshift(i),this[P7].set(e,this[j7].head),F7(this),!0)}has(e){if(!this[P7].has(e))return!1;const t=this[P7].get(e).value;return!T7(this,t)}get(e){return I7(this,e,!0)}peek(e){return I7(this,e,!1)}pop(){const e=this[j7].tail;return e?(A7(this,e),e.value):null}del(e){A7(this,this[P7].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[P7].forEach(((e,t)=>I7(this,t,!1)))}};function U7(){if(z7)return L7;z7=1;class e{constructor(t,o){if(o=n(o),t instanceof e)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new e(t.raw,o);if(t instanceof r)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!p(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&h(t[0])){this.set=[t];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const n=((this.options.includePrerelease&&d)|(this.options.loose&&f))+":"+e,i=t.get(n);if(i)return i;const h=this.options.loose,g=h?a[l.HYPHENRANGELOOSE]:a[l.HYPHENRANGE];e=e.replace(g,O(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(a[l.COMPARATORTRIM],s),o("comparator trim",e),e=e.replace(a[l.TILDETRIM],c),o("tilde trim",e),e=e.replace(a[l.CARETTRIM],u),o("caret trim",e);let b=e.split(" ").map((e=>m(e,this.options))).join(" ").split(/\s+/).map((e=>E(e,this.options)));h&&(b=b.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(a[l.COMPARATORLOOSE]))))),o("range list",b);const v=new Map,y=b.map((e=>new r(e,this.options)));for(const t of y){if(p(t))return[t];v.set(t.value,t)}v.size>1&&v.has("")&&v.delete("");const w=[...v.values()];return t.set(n,w),w}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>g(e,n)&&t.set.some((t=>g(t,n)&&e.every((e=>t.every((t=>e.intersects(t,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new i(e,this.options)}catch(mue){return!1}for(let t=0;t"<0.0.0-0"===e.value,h=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},m=(e,t)=>(o("comp",e,t),e=w(e,t),o("caret",e),e=v(e,t),o("tildes",e),e=S(e,t),o("xrange",e),e=C(e,t),o("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,v=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const n=t.loose?a[l.TILDELOOSE]:a[l.TILDE];return e.replace(n,((t,n,r,i,a)=>{let l;return o("tilde",e,t,n,r,i,a),b(n)?l="":b(r)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:b(i)?l=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o("replaceTilde pr",a),l=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):l=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",l),l}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{o("caret",e,t);const n=t.loose?a[l.CARETLOOSE]:a[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,l)=>{let s;return o("caret",e,t,n,i,a,l),b(n)?s="":b(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:b(a)?s="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:l?(o("replaceCaret pr",l),s="0"===n?"0"===i?`>=${n}.${i}.${a}-${l} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${l} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${l} <${+n+1}.0.0-0`):(o("no pr"),s="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",s),s}))},S=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>k(e,t))).join(" ")),k=(e,t)=>{e=e.trim();const n=t.loose?a[l.XRANGELOOSE]:a[l.XRANGE];return e.replace(n,((n,r,i,a,l,s)=>{o("xRange",e,n,r,i,a,l,s);const c=b(i),u=c||b(a),d=u||b(l),f=d;return"="===r&&f&&(r=""),s=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(u&&(a=0),l=0,">"===r?(r=">=",u?(i=+i+1,a=0,l=0):(a=+a+1,l=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),"<"===r&&(s="-0"),n=`${r+i}.${a}.${l}${s}`):u?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),o("xRange return",n),n}))},C=(e,t)=>(o("replaceStars",e,t),e.trim().replace(a[l.STAR],"")),E=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),O=e=>(t,n,r,o,i,a,l,s,c,u,d,f,p)=>`${n=b(r)?"":b(o)?`>=${r}.0.0${e?"-0":""}`:b(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${s=b(c)?"":b(u)?`<${+c+1}.0.0-0`:b(d)?`<${c}.${+u+1}.0-0`:f?`<=${c}.${u}.${d}-${f}`:e?`<${c}.${u}.${+d+1}-0`:`<=${s}`}`.trim(),D=(e,t,n)=>{for(let r=0;r0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return L7}function V7(){if(H7)return B7;H7=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,o){if(o=n(o),r instanceof t){if(r.loose===!!o.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],i=t.match(n);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new l(i[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new l(t,this.options)}catch(mue){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new s(e.value,r).test(this.value):""===e.operator?""===e.value||new s(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(i(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(i(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}B7=t;const n=t8,{safeRe:r,t:o}=J6,i=l7,a=Q6,l=f8,s=U7();return B7}const G7=U7();var q7=(e,t,n)=>{try{t=new G7(t,n)}catch(mue){return!1}return t.test(e)};const X7=U7();var K7=(e,t)=>new X7(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const Y7=f8,Q7=U7();var J7=(e,t,n)=>{let r=null,o=null,i=null;try{i=new Q7(t,n)}catch(mue){return null}return e.forEach((e=>{i.test(e)&&(r&&-1!==o.compare(e)||(r=e,o=new Y7(r,n)))})),r};const Z7=f8,e9=U7();var t9=(e,t,n)=>{let r=null,o=null,i=null;try{i=new e9(t,n)}catch(mue){return null}return e.forEach((e=>{i.test(e)&&(r&&1!==o.compare(e)||(r=e,o=new Z7(r,n)))})),r};const n9=f8,r9=U7(),o9=U8;var i9=(e,t)=>{e=new r9(e,t);let n=new n9("0.0.0");if(e.test(n))return n;if(n=new n9("0.0.0-0"),e.test(n))return n;n=null;for(let r=0;r{const t=new n9(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!o9(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!o||n&&!o9(n,o)||(n=o)}return n&&e.test(n)?n:null};const a9=U7();var l9=(e,t)=>{try{return new a9(e,t).range||"*"}catch(mue){return null}};const s9=f8,c9=V7(),{ANY:u9}=c9,d9=U7(),f9=q7,p9=U8,h9=G8,g9=e7,m9=J8;var b9=(e,t,n,r)=>{let o,i,a,l,s;switch(e=new s9(e,r),t=new d9(t,r),n){case">":o=p9,i=g9,a=h9,l=">",s=">=";break;case"<":o=h9,i=m9,a=p9,l="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(f9(e,t,r))return!1;for(let c=0;c{e.semver===u9&&(e=new c9(">=0.0.0")),u=u||e,d=d||e,o(e.semver,u.semver,r)?u=e:a(e.semver,d.semver,r)&&(d=e)})),u.operator===l||u.operator===s)return!1;if((!d.operator||d.operator===l)&&i(e,d.semver))return!1;if(d.operator===s&&a(e,d.semver))return!1}return!0};const v9=b9;var y9=(e,t,n)=>v9(e,t,">",n);const w9=b9;var x9=(e,t,n)=>w9(e,t,"<",n);const S9=U7();var k9=(e,t,n)=>(e=new S9(e,n),t=new S9(t,n),e.intersects(t,n));const C9=q7,E9=_8;const O9=U7(),D9=V7(),{ANY:$9}=D9,j9=q7,P9=_8,N9=[new D9(">=0.0.0-0")],_9=[new D9(">=0.0.0")],I9=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===$9){if(1===t.length&&t[0].semver===$9)return!0;e=n.includePrerelease?N9:_9}if(1===t.length&&t[0].semver===$9){if(n.includePrerelease)return!0;t=_9}const r=new Set;let o,i,a,l,s,c,u;for(const p of e)">"===p.operator||">="===p.operator?o=T9(o,p,n):"<"===p.operator||"<="===p.operator?i=F9(i,p,n):r.add(p.semver);if(r.size>1)return null;if(o&&i){if(a=P9(o.semver,i.semver,n),a>0)return null;if(0===a&&(">="!==o.operator||"<="!==i.operator))return null}for(const p of r){if(o&&!j9(p,String(o),n))return null;if(i&&!j9(p,String(i),n))return null;for(const e of t)if(!j9(p,String(e),n))return!1;return!0}let d=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver,f=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver;d&&1===d.prerelease.length&&"<"===i.operator&&0===d.prerelease[0]&&(d=!1);for(const p of t){if(u=u||">"===p.operator||">="===p.operator,c=c||"<"===p.operator||"<="===p.operator,o)if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),">"===p.operator||">="===p.operator){if(l=T9(o,p,n),l===p&&l!==o)return!1}else if(">="===o.operator&&!j9(o.semver,String(p),n))return!1;if(i)if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),"<"===p.operator||"<="===p.operator){if(s=F9(i,p,n),s===p&&s!==i)return!1}else if("<="===i.operator&&!j9(i.semver,String(p),n))return!1;if(!p.operator&&(i||o)&&0!==a)return!1}return!(o&&c&&!i&&0!==a)&&(!(i&&u&&!o&&0!==a)&&(!f&&!d))},T9=(e,t,n)=>{if(!e)return t;const r=P9(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},F9=(e,t,n)=>{if(!e)return t;const r=P9(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var A9=(e,t,n={})=>{if(e===t)return!0;e=new O9(e,n),t=new O9(t,n);let r=!1;e:for(const o of e.set){for(const e of t.set){const t=I9(o,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const R9=J6,M9=K6,L9=f8,z9=o8,B9=(e,t,n)=>{const r=[];let o=null,i=null;const a=e.sort(((e,t)=>E9(e,t,n)));for(const u of a){C9(u,t,n)?(i=u,o||(o=u)):(i&&r.push([o,i]),i=null,o=null)}o&&r.push([o,null]);const l=[];for(const[u,d]of r)u===d?l.push(u):d||u!==a[0]?d?u===a[0]?l.push(`<=${d}`):l.push(`${u} - ${d}`):l.push(`>=${u}`):l.push("*");const s=l.join(" || "),c="string"==typeof t.raw?t.raw:String(t);return s.length{await fetch("/lobe/config",{body:JSON.stringify(e),headers:{"Content-Type":"application/json"},method:"POST"})},Y9={confirmPageUnload:!1,enableExtraNetworkSidebar:!0,enableHighlight:!1,enableImageInfo:!0,enableSidebar:!0,enableWebFont:!0,extraNetworkCardSize:86,extraNetworkFixedMode:"fixed",extraNetworkSidebarExpand:!0,extraNetworkSidebarWidth:340,i18n:"en_US",layoutHideFooter:!1,layoutSplitPreview:!1,liteAnimation:!1,logoCustomTitle:"",logoCustomUrl:"",logoType:"lobe",neutralColor:void 0,primaryColor:void 0,promptEditor:!1,promptTextareaType:"resizable",sidebarExpand:!0,sidebarFixedMode:"fixed",sidebarWidth:280,svgIcon:!0},Q9={currentTab:"tab_txt2img",latestVersion:q9,loading:!0,localeOptions:X9,setting:Y9,themeMode:"dark",version:q9},J9="SD-LOBE-SETTING",Z9=(e,t)=>({onInit:async()=>{e((()=>({loading:!0})),!1,"onInit");const{onLoadSetting:n,onLoadVersion:r,onLoadLatestVersion:o,onLoadLocalOptions:i}=t();await i(),await r(),await o(),await n(),e((()=>({loading:!1})),!1,"onInit")},onLoadLatestVersion:async()=>{const t=await(async()=>{const e=await fetch(`https://api.github.com/repos/${V9.replace("https://github.com/","")}/releases/latest`),t=await e.json();return t&&t.tag_name&&H9.clean(t.tag_name)||q9})();e((()=>({latestVersion:t})),!1,"onLoadLatestVersion")},onLoadLocalOptions:async()=>{const t=await(async()=>{const e=await fetch("/lobe/locales/options"),t=await e.json();return t&&0!==(null==t?void 0:t.length)?t:X9})();e((()=>({localeOptions:t})),!1,"onLoadLocalOptions")},onLoadSetting:async()=>{let t;const n=await(async()=>{const e=await fetch("/lobe/config"),t=await e.json();if(t&&!(null==t?void 0:t.empty))return t})();if(n&&(ue.start("🤯 [setting] loaded webui setting"),t=n),!t){const e=localStorage.getItem(J9);e&&(ue.info("🤯 [setting] loaded local setting"),t=JSON.parse(e))}if(!t){const e=localStorage.getItem("SD-KITCHEN-SETTING");e&&(ue.info("🤯 [setting] loaded fallback local setting"),t=JSON.parse(e))}t||(ue.info("🤯 [setting] loaded default setting"),t=Y9);const r={...Y9,...t};await K9(r),e((()=>({setting:r})),!1,"onLoadSetting"),ue.success("🤯 [setting] loaded"),console.table(r)},onLoadVersion:async()=>{const t=await(async()=>{const e=await fetch("/lobe/package"),t=await e.json();return t&&!t.empty&&t.version?t.version:q9})();e((()=>({version:t})),!1,"onLoadVersion")},onSetSetting:async n=>{const r={...t().setting,...n};localStorage.setItem(J9,JSON.stringify(r)),await K9(r),e((()=>({setting:r})),!1,"onSetSetting")},onSetThemeMode:t=>{e((()=>({themeMode:t})),!1,"onSetThemeMode")},setCurrentTab:()=>{var n;const r=null==(n=get_uiCurrentTabContent())?void 0:n.id;ue.info("🤯 [tab] onChange",r),r&&r!==t().currentTab&&e({currentTab:r},!1,"setCurrentTab")}}),eee=e=>({...Y9,...e.setting}),tee=e=>e.currentTab,nee=e=>e.themeMode,ree=(oee?q6(oee,iee):q6)(P6(((...e)=>({...Q9,...Z9(...e)}))),(function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{const[r,o]=B.useState("");return B.useEffect((()=>{const r=new MutationObserver((e=>{var r;for(const i of e)if("childList"===i.type||"characterData"===i.type)if(t){const e=i.target.querySelector(t);o(String(e[n]))}else o(String(null==(r=i.target)?void 0:r.innerHTML))})),i=gradioApp().querySelector(e);if(i){r.observe(i,lee);const e=t?i.querySelector(t):i;o(String(null==e?void 0:e[n]))}return()=>{r.disconnect()}}),[e,t,n]),String(r)},cee=BB((({css:e,token:t,isDarkMode:n})=>{const r=n?"dark":"light",o=n?KZ.lime[r][9]:KZ.green[r][10];return{configTitle:e` + `,xe([ie({reflect:!0})],e.GiscusWidget.prototype,"host",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"repo",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"repoId",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"category",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"categoryId",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"mapping",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"term",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"strict",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"reactionsEnabled",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"emitMetadata",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"inputPosition",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"theme",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"lang",2),xe([ie({reflect:!0})],e.GiscusWidget.prototype,"loading",2),e.GiscusWidget=xe([function(e){return customElements.get(e)?e=>e:(e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:n,elements:r}=t;return{kind:n,elements:r,finisher(t){customElements.define(e,t)}}})(e,t))(e)}("giscus-widget")],e.GiscusWidget)}(f2)),f2}const h2=Q,g2=B;var m2=function({id:e,host:t,repo:n,repoId:r,category:o,categoryId:i,mapping:a,term:l,strict:s,reactionsEnabled:c,emitMetadata:u,inputPosition:d,theme:f,lang:p,loading:h}){const[g,m]=g2.useState(!1);return g2.useEffect((()=>{g||(Promise.resolve().then((()=>p2())),m(!0))}),[]),g?h2.jsx("giscus-widget",{id:e,host:t,repo:n,repoid:r,category:o,categoryid:i,mapping:a,term:l,strict:s,reactionsenabled:c,emitmetadata:u,inputposition:d,theme:f,lang:p,loading:h}):null};const b2=n(m2);var v2,y2=function(e){return["zh_CN","zh_TW"].includes(e)?e.replace("_","-"):"zh_HK"===e?"zh-TW":e.split("_")[0]},w2=["style","className","reactionsEnabled","mapping","lang","inputPosition","id","loading","emitMetadata"];function x2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S2(e){for(var t=1;t .m-2 {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n }\n\n .gsc-emoji-button.has-reacted {\n border-color: ",";\n border-radius: ","px;\n }\n\n .gsc-loading-image {\n background-image: url(",");\n }\n }\n "])),i,s,l,a,c,c,s,a,a,o,iV(a,.4),o,iV(a,.6),s,l,c,o,o,o,iV(a,.2),s,iV(s,.2),l,iV(a,.2),o,iV(c,.2),l,o,i,c,e.colorText,e.colorFillTertiary,e.colorBorderSecondary,e.colorFillSecondary,e.colorBorder,e.colorFillSecondary,e.colorBorder,e.colorFillSecondary,xV(e.colorPrimary),e.colorPrimary,e.colorPrimaryBorder,e.colorPrimaryHover,e.colorPrimaryBorderHover,e.colorPrimaryActive,iV(xV(e.colorPrimary),.5),iV(e.colorPrimary,.5),iV(e.colorPrimaryBorder,.5),e.colorFillQuaternary,e.colorFillTertiary,e.colorBorder,e.colorText,e.colorTextSecondary,e.colorTextQuaternary,e.colorBgElevated,e.colorFillQuaternary,e.colorBorder,e.colorBorderSecondary,e.colorFillQuaternary,e.colorFillTertiary,e.colorInfo,e.colorInfoBorderHover,e.colorInfoBorder,e.colorInfoBg,e.colorSuccess,e.colorWarning,e.colorWarningBorder,e.colorWarningBg,e.colorError,e.colorErrorBorder,e.colorErrorBg,e.colorBgContainer,e.colorInfoBg,e.colorFillSecondary,e.colorInfoBgHover,r,u,e.colorInfoBorderHover,e.borderRadius,d)}(v,y).styles)}),[y,v]);return Q.jsx("div",{className:n,style:t,children:Q.jsx(b2,S2({emitMetadata:m,id:f,inputPosition:u,lang:y2(s),loading:h,mapping:a,reactionsEnabled:o,theme:"data:text/css;base64,".concat(w)},b))})}));var C2,E2,O2=BB((function(e,t){var n,r=e.css,o=e.token,i=e.isDarkMode,a=e.stylish;switch(t){case"large":n=o.borderRadiusLG;break;case"middle":default:n=o.borderRadius;break;case"small":n=o.borderRadiusSM}return{button:r(C2||(C2=hf(["\n position: relative;\n z-index: 1;\n ","\n border: none;\n border-radius: ","px !important;\n\n &::before {\n content: '';\n\n position: absolute;\n z-index: -1;\n top: 1px;\n left: 1px;\n\n width: calc(100% - 2px);\n height: calc(100% - 2px);\n\n background: ",";\n border-radius: ","px;\n }\n "])),a.gradientAnimation,n,o.colorBgLayout,n-1),glow:r(E2||(E2=hf(["\n ","\n position: absolute;\n z-index: -2;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 100%;\n\n opacity: ",";\n filter: blur(","em);\n border-radius: inherit;\n "])),a.gradientAnimation,i?.5:.3,i?1.5:1)}})),D2=["glow","children","className","size"];function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j2(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function l3(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n code {\n padding: 0 !important;\n border: none !important;\n }\n }\n\n > :not([data-code-type='highlighter']) code {\n padding: 2px 6px;\n\n font-size: ","px;\n color: ",";\n\n background: ",";\n border: 1px solid ",";\n border-radius: ","px;\n }\n\n table {\n border-spacing: 0;\n\n width: 100%;\n margin-block: 1em 1em;\n margin-inline: 0 0;\n padding: 8px;\n\n border: 1px solid ",";\n border-radius: ","px;\n\n code {\n display: inline-flex;\n }\n }\n\n th,\n td {\n padding-block: 10px 10px;\n padding-inline: 16px 16px;\n }\n\n thead {\n tr {\n th {\n background: ",";\n\n &:first-child {\n border-top-left-radius: ","px;\n border-bottom-left-radius: ","px;\n }\n\n &:last-child {\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n }\n }\n }\n }\n\n > ol > li::marker {\n color: "," !important;\n }\n\n > ul > li {\n line-height: 1.8;\n list-style-type: disc;\n\n &::marker {\n color: "," !important;\n }\n }\n\n ol,\n ul {\n > li::marker {\n color: ",";\n }\n }\n\n details {\n margin-bottom: 1em;\n padding: 12px 16px;\n\n background: ",";\n border: 1px solid ",";\n border-radius: ","px;\n\n transition: all 400ms ",";\n }\n\n details[open] {\n summary {\n padding-bottom: 12px;\n border-bottom: 1px solid ",";\n }\n }\n "])),n.colorText,n.colorText,n.colorTextDescription,n.colorLink,n.colorLinkHover,n.colorLinkActive,n.borderRadius,n.fontSizeSM,i,a,r?n.cyan1A:n.cyan6A,n.borderRadiusSM,n.colorBorderSecondary,n.borderRadius,n.colorFillTertiary,n.borderRadius,n.borderRadius,n.borderRadius,n.borderRadius,r?n.cyan9A:n.cyan10A,r?n.cyan9A:n.cyan10A,n.colorTextDescription,n.colorFillTertiary,n.colorBorderSecondary,n.borderRadiusLG,n.motionEaseOut,n.colorBorder),markdownInChat:t(X5||(X5=hf(["\n h1 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.6em;\n }\n\n h2 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.4em;\n }\n\n h3 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.2em;\n }\n\n h4 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1.1em;\n }\n\n h5 {\n margin-top: 0;\n margin-block-start: 0;\n font-size: 1em;\n }\n\n > *:last-child {\n margin-bottom: 0 !important;\n }\n\n p {\n line-height: 1.8 !important;\n\n + * {\n margin-block-end: 0.5em !important;\n }\n\n &:not(:last-child) {\n margin-bottom: 1em !important;\n }\n }\n "]))),noScrollbar:t(K5||(K5=hf(["\n ::-webkit-scrollbar {\n display: none;\n width: 0;\n height: 0;\n background-color: transparent;\n }\n "]))),resetLinkColor:t(Y5||(Y5=hf(["\n cursor: pointer;\n color: ",";\n\n &:hover {\n color: ",";\n }\n "])),n.colorTextSecondary,n.colorText)}}(e)),null==n?void 0:n(e))}),[n]),p=B.useCallback((function(e){return e4(e4({},function(e){for(var t=e.isDarkMode,n={},r=0,o=Object.entries(KZ);r0&&d.map((function(e){return Q.jsx(b1,{url:e},e)})),Q.jsx(qB,{speedy:!0,children:Q.jsxs(GB,e4(e4({customStylish:f,customToken:p},c),{},{theme:h,children:[Q.jsx(Q3,{}),Q.jsx(_$,{style:{minHeight:"inherit",width:"inherit"},children:t})]}))})]})})),n4={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class r4{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||n4,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)})),this}off(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((e=>e!==t)):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{e(...n)}))}if(this.observers["*"]){[].concat(this.observers["*"]).forEach((t=>{t.apply(t,[e,...n])}))}}}function a4(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function l4(e){return null==e?"":""+e}function s4(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}const i="string"!=typeof t?[].concat(t):t.split(".");for(;i.length>1;){if(o())return{};const t=r(i.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function c4(e,t,n){const{obj:r,k:o}=s4(e,t,Object);r[o]=n}function u4(e,t){const{obj:n,k:r}=s4(e,t);if(n)return n[r]}function d4(e,t,n){for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):d4(e[r],t[r],n):e[r]=t[r]);return e}function f4(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var p4={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function h4(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>p4[e])):e}const g4=[" ",",","?","!",";"];function m4(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;ii+e;)e++,a=r.slice(i,i+e).join(n),l=o[a];if(void 0===l)return;if(null===l)return null;if(t.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}const s=r.slice(i+e).join(n);return s?m4(l,s,n):void 0}o=o[r[i]]}return o}function b4(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class v4 extends i4{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));const l=u4(this.data,a);return l||!i||"string"!=typeof n?l:m4(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),c4(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let l=u4(this.data,a)||{};r?d4(l,n,o):l={...l,...n},c4(this.data,a,l),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var y4={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))})),t}};const w4={};class x4 extends i4{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){e.forEach((e=>{t[e]&&(n[e]=t[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=o4.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=g4.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=new RegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i}(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],s=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(s&&"cimode"===s.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:i}const u=this.resolve(e,t);let d=u&&u.res;const f=u&&u.usedKey||i,p=u&&u.exactUsedKey||i,h=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&d&&("string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0&&("string"!=typeof g||"[object Array]"!==h)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(o){const e="[object Array]"===h,n=e?[]:{},r=e?p:f;for(const i in d)if(Object.prototype.hasOwnProperty.call(d,i)){const e=`${r}${o}${i}`;n[i]=this.translate(e,{...t,joinArrays:!1,ns:a}),n[i]===e&&(n[i]=d[i])}d=n}}else if(m&&"string"==typeof g&&"[object Array]"===h)d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const c=void 0!==t.count&&"string"!=typeof t.count,f=x4.hasDefaultValue(t),p=c?this.pluralResolver.getSuffix(s,t.count,t):"",h=t.ordinal&&c?this.pluralResolver.getSuffix(s,t.count,{ordinal:!1}):"",g=t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=g),this.isValidLookup(d)||(a=!0,d=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,b=f&&g!==d&&this.options.updateMissing;if(a||r||b){if(this.logger.log(b?"updateKey":"missingKey",s,l,i,b?g:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.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.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t{const o=f&&r!==d?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,n,o,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,l,n,o,b,t),this.emit("missingKey",e,l,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{this.pluralResolver.getSuffixes(e,t).forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||g)}))})):r(e,i,g))}d=this.extendTranslation(d,e,t,u,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(a){const t=e.match(this.interpolator.nestingRegexp);l=t&&t.length}let s=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language,n),a){const t=e.match(this.interpolator.nestingRegexp);l<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const l=this.extractFromKey(e,a),s=l.key;n=s;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==a.count&&"string"!=typeof a.count,d=u&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(i=e,!w4[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(w4[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" 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!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[s];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,s,n,e,a);else{let e;u&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.push(s+e),a.ordinal&&0===e.indexOf(r)&&i.push(s+e.replace(r,this.options.pluralSeparator)),d&&i.push(s+t)),f){const n=`${s}${this.options.contextSeparator}${a.context}`;i.push(n),u&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let l;for(;l=i.pop();)this.isValidLookup(t)||(r=l,t=this.getResource(n,e,l,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}function S4(e){return e.charAt(0).toUpperCase()+e.slice(1)}class k4{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=o4.create("languageUtils")}getScriptPartFromCode(e){if(!(e=b4(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=b4(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=S4(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=S4(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=S4(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:0===e.indexOf(n)?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let C4=[{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}],E4={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},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(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?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:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||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(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};const O4=["v1","v2","v3"],D4=["v4"],$4={zero:0,one:1,two:2,few:3,many:4,other:5};class j4{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=o4.create("pluralResolver"),this.options.compatibilityJSON&&!D4.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&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=function(){const e={};return C4.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:E4[t.fc]}}))})),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(b4(e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>$4[e]-$4[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!O4.includes(this.options.compatibilityJSON)}}function P4(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=function(e,t,n){const r=u4(e,n);return void 0!==r?r:u4(t,n)}(e,t,n);return!i&&o&&"string"==typeof n&&(i=m4(e,n,r),void 0===i&&(i=m4(t,n,r))),i}class N4{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=o4.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=void 0!==t.escape?t.escape:h4,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?f4(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?f4(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?f4(t.nestingPrefix):t.nestingPrefixEscaped||f4("$t("),this.nestingSuffix=t.nestingSuffix?f4(t.nestingSuffix):t.nestingSuffixEscaped||f4(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,t,n,r){let o,i,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function s(e){return e.replace(/\$/g,"$$$$")}const c=e=>{if(e.indexOf(this.formatSeparator)<0){const o=P4(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(P4(t,l,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const u=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>s(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?s(this.escape(e)):s(e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=c(n),void 0===i)if("function"==typeof u){const t=u(e,o,r);i="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(d){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=l4(i));const l=t.safeValue(i);if(e=e.replace(o[0],l),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),l=i.match(/"/g);(a&&a.length%2==0&&!l||l.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(GY){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,GY),`${e}${n}${i}`}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let l=[];o={...i},o=o.replace&&"string"!=typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let s=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),l=e,s=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=l4(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),s&&(r=l.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function _4(e){const t={};return function(n,r,o){const i=r+JSON.stringify(o);let a=t[i];return a||(a=e(b4(r),o),t[i]=a),a(n)}}class I4{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=o4.create("formatter"),this.options=e,this.formats={number:_4(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:_4(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:_4(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:_4(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:_4(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=_4(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:o,formatOptions:i}=function(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(!e)return;const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=o),"false"===o&&(n[t.trim()]=!1),"true"===o&&(n[t.trim()]=!0),isNaN(o)||(n[t.trim()]=parseInt(o,10))}))}return{formatName:t,formatOptions:n}}(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,l,{...i,...r,...a})}catch(a){this.logger.warn(a)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}class T4 extends i4{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=o4.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},l={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;const a={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:o,k:i}=s4(e,t,Object);o[i]=o[i]||[],r&&(o[i]=o[i].concat(n)),r||o[i].push(n)}(n.loaded,[o],i),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&l&&r{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,l)},l=this.backend[n].bind(this.backend);if(2!==l.length)return l(e,t,a);try{const n=l(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(s){a(s)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=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."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let o;o=5===c.length?c(e,t,n,r,s):c(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(l){a(l)}else c(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function F4(){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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function A4(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function R4(){}class M4 extends i4{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=A4(e),this.services={},this.logger=o4,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=F4();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...A4(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?o4.init(o(this.modules.logger),this.options):o4.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=I4);const n=new k4(this.options);this.store=new v4(this.options.resources,this.options);const i=this.services;i.logger=o4,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new j4(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new N4(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new T4(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=R4),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=a4(),a=()=>{const e=(e,t)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R4;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=a4();return e||(e=this.languages),t||(t=this.options.ns),n||(n=R4),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&y4.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=a4();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,l=new Array(a>2?a-2:0),s=2;s`${i.keyPrefix}${c}${e}`)):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,r.t(u,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?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;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=a4();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=a4();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new k4(F4());return["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"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new M4(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R4;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new M4(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new v4(this.store.data,r),o.services.resourceStore=o.store),o.translator=new x4(o.services,r),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():l&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(m)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=g(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function S(e,t){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},v.call(w.prototype),v.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];S.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(E){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function C(n,r){return new Promise((function(o,a){var s=new w(n,r);if(s.signal&&s.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}c.onload=function(){var e,t,n={status:c.status,statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var r="response"in c?c.response:c.responseText;setTimeout((function(){o(new S(r,n))}),0)},c.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.onabort=function(){setTimeout((function(){a(new e.DOMException("Aborted","AbortError"))}),0)},c.open(s.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(GY){return e}}(s.url),!0),"include"===s.credentials?c.withCredentials=!0:"omit"===s.credentials&&(c.withCredentials=!1),"responseType"in c&&(i?c.responseType="blob":l&&s.headers.get("Content-Type")&&-1!==s.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof p?s.headers.forEach((function(e,t){c.setRequestHeader(t,e)})):Object.getOwnPropertyNames(r.headers).forEach((function(e){c.setRequestHeader(e,d(r.headers[e]))})),s.signal&&(s.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&s.signal.removeEventListener("abort",u)}),c.send(void 0===s._bodyInit?null:s._bodyInit)}))}C.polyfill=!0,t.fetch||(t.fetch=C,t.Headers=p,t.Request=w,t.Response=S),e.Headers=p,e.Request=w,e.Response=S,e.fetch=C}({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=o.fetch?o:i;(n=a.fetch).default=a.fetch,n.fetch=a.fetch,n.Headers=a.Headers,n.Request=a.Request,n.Response=a.Response,e.exports=n}(K4,K4.exports)),K4.exports}!function(e,n){var r;if("function"==typeof fetch&&(r=void 0!==t&&t.fetch?t.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),void 0!==G4&&("undefined"==typeof window||void 0===window.document)){var o=r||Y4();o.default&&(o=o.default),n.default=o,e.exports=n.default}}(X4,X4.exports);var Q4=X4.exports;const J4=n(Q4),Z4=e({__proto__:null,default:J4},[Q4]);function e6(e){return(e6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var t6,n6,r6;"function"==typeof fetch&&(t6="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),V4()&&("undefined"!=typeof global&&global.XMLHttpRequest?n6=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(n6=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?r6=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(r6=window.ActiveXObject)),t6||!Z4||n6||r6||(t6=J4||Z4),"function"!=typeof t6&&(t6=void 0);var o6=function(e,t){if(t&&"object"===e6(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},i6=function(e,t,n){var r=function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)};"function"==typeof fetch?fetch(e,t).then(r).catch(n):t6(e,t).then(r).catch(n)},a6=!1,l6=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},t6&&0!==t.indexOf("file:")?function(e,t,n,r){e.queryStringParams&&(t=o6(t,e.queryStringParams));var o=U4({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&"undefined"!=typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=U4({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},a6?{}:i);try{i6(t,a,r)}catch(GY){if(!i||0===Object.keys(i).length||!GY.message||GY.message.indexOf("not implemented")<0)return r(GY);try{Object.keys(i).forEach((function(e){delete a[e]})),i6(t,a,r),a6=!0}catch(l){r(l)}}}(e,t,n,r):V4()||"function"==typeof ActiveXObject?function(e,t,n,r){n&&"object"===e6(n)&&(n=o6("",n).slice(1)),e.queryStringParams&&(t=o6(t,e.queryStringParams));try{var o;(o=n6?new n6:new r6("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var i=e.customHeaders;if(i="function"==typeof i?i():i)for(var a in i)o.setRequestHeader(a,i[a]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(GY){console&&console.log(GY)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function s6(e){return(s6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c6(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}var t,n,r;return t=e,n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=U4(n,this.options||{},d6()),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,a=this,l=this.options.loadPath;"function"==typeof this.options.loadPath&&(l=this.options.loadPath(e,n)),(l=function(e){return!!e&&"function"==typeof e.then}(i=l)?i:Promise.resolve(i)).then((function(i){if(!i)return o(null,{});var l=a.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});a.loadUrl(l,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,r){var o=this,i="string"==typeof n?[n]:n,a="string"==typeof r?[r]:r,l=this.options.parseLoadPayload(i,a);this.options.request(this.options,e,l,(function(i,a){if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&i&&i.message&&i.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+i.message,!0);if(i)return t(i,!1);var l,s;try{l="string"==typeof a.data?o.options.parse(a.data,n,r):a.data}catch(GY){s="failed parsing "+e+" to json"}if(s)return t(s,!1);t(null,l)}))}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,r),l=0,s=[],c=[];e.forEach((function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var u=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,u,a,(function(t,n){l+=1,s.push(t),c.push(n),l===e.length&&"function"==typeof o&&o(s,c)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var a=[],l=function(e){r.toResolveHierarchy(e).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};l(i),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return l(e)})),a.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)}))}))}))}}}],n&&c6(t.prototype,n),r&&c6(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();f6.type="backend";const p6={};function h6(){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}};function m6(e,t,n){e.loadNamespaces(t,g6(e,n))}function b6(e,t,n,r){"string"==typeof n&&(n=[n]),n.forEach((t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,g6(e,r))}const v6=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,y6={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},w6=e=>y6[e];let x6,S6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(v6,w6)};const k6={type:"3rdParty",init(e){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};S6={...S6,...e}}(e.options.react),function(e){x6=e}(e)}},C6=B.createContext();class E6{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function O6(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=B.useContext(C6)||{},i=n||r||x6;if(i&&!i.reportNamespaces&&(i.reportNamespaces=new E6),!i){h6("You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}i.options.react&&void 0!==i.options.react.wait&&h6("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...S6,...i.options.react,...t},{useSuspense:l,keyPrefix:s}=a;let c=e||o||i.options&&i.options.defaultNS;c="string"==typeof c?[c]:c||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every((e=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.languages[0],o=!!t.options&&t.options.fallbackLng,i=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;const a=(e,n)=>{const r=t.services.backendConnector.state[`${e}|${n}`];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}(e,t,n):(h6("i18n.languages were undefined or empty",t.languages),!0)}(e,i,a)));function d(){return i.getFixedT(t.lng||null,"fallback"===a.nsMode?c:c[0],s)}const[f,p]=B.useState(d);let h=c.join();t.lng&&(h=`${t.lng}${h}`);const g=((e,t)=>{const n=B.useRef();return B.useEffect((()=>{n.current=t?n.current:e}),[e,t]),n.current})(h),m=B.useRef(!0);B.useEffect((()=>{const{bindI18n:e,bindI18nStore:n}=a;function r(){m.current&&p(d)}return m.current=!0,u||l||(t.lng?b6(i,t.lng,c,(()=>{m.current&&p(d)})):m6(i,c,(()=>{m.current&&p(d)}))),u&&g&&g!==h&&m.current&&p(d),e&&i&&i.on(e,r),n&&i&&i.store.on(n,r),()=>{m.current=!1,e&&i&&e.split(" ").forEach((e=>i.off(e,r))),n&&i&&n.split(" ").forEach((e=>i.store.off(e,r)))}}),[i,h]);const b=B.useRef(!0);B.useEffect((()=>{m.current&&!b.current&&p(d),b.current=!1}),[i,s]);const v=[f,i,u];if(v.t=f,v.i18n=i,v.ready=u,u)return v;if(!u&&!l)return v;throw new Promise((e=>{t.lng?b6(i,t.lng,c,(()=>e())):m6(i,c,(()=>e()))}))}var D6={BASE_URL:"/dev",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const $6=new Map,j6=e=>{const t=$6.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},P6=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:a,store:l,...s}=t;let c;try{c=(null!=i?i:"production"!==(D6?"production":void 0))&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(GY){}if(!c)return"production"!==(D6?"production":void 0)&&i&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,o);const{connection:u,...d}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const r=$6.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return $6.set(n.name,o),{type:"tracked",store:e,...o}})(l,c,s);let f=!0;o.setState=(e,t,i)=>{const c=n(e,t);if(!f)return c;const d=void 0===i?{type:a||"anonymous"}:"string"==typeof i?{type:i}:i;return void 0===l?(null==u||u.send(d,r()),c):(null==u||u.send({...d,type:`${l}/${d.type}`},{...j6(s.name),[l]:o.getState()}),c)};const p=(...e)=>{const t=f;f=!1,n(...e),f=t},h=e(o.setState,r,o);if("untracked"===d.type?null==u||u.init(h):(d.stores[d.store]=o,null==u||u.init(Object.fromEntries(Object.entries(d.stores).map((([e,t])=>[e,e===d.store?h:t.getState()]))))),o.dispatchFromDevtools&&"function"==typeof o.dispatch){let e=!1;const t=o.dispatch;o.dispatch=(...n)=>{"production"===(D6?"production":void 0)||"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):N6(e.payload,(e=>{if("__setState"!==e.type)o.dispatchFromDevtools&&"function"==typeof o.dispatch&&o.dispatch(e);else{if(void 0===l)return void p(e.state);1!==Object.keys(e.state).length&&console.error('\n [zustand devtools middleware] Unsupported __setState action format. \n When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n ');const t=e.state[l];if(null==t)return;JSON.stringify(o.getState())!==JSON.stringify(t)&&p(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return p(h),void 0===l?null==u?void 0:u.init(o.getState()):null==u?void 0:u.init(j6(s.name));case"COMMIT":return void 0===l?void(null==u||u.init(o.getState())):null==u?void 0:u.init(j6(s.name));case"ROLLBACK":return N6(e.state,(e=>{if(void 0===l)return p(e),void(null==u||u.init(o.getState()));p(e[l]),null==u||u.init(j6(s.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return N6(e.state,(e=>{void 0!==l?JSON.stringify(o.getState())!==JSON.stringify(e[l])&&p(e[l]):p(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;return p(void 0===l?r:r[l]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return f=!f}return}})),h},N6=(e,t)=>{let n;try{n=JSON.parse(e)}catch(GY){console.error("[zustand devtools middleware] Could not parse the received json",GY)}void 0!==n&&t(n)};var _6={exports:{}},I6={},T6=B,F6=ZJ;var A6="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},R6=F6.useSyncExternalStore,M6=T6.useRef,L6=T6.useEffect,z6=T6.useMemo,B6=T6.useDebugValue;I6.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=M6(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=z6((function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return l=t}return l=e}if(t=l,A6(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,l=n)}var i,l,s=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var l=R6(e,i[0],i[1]);return L6((function(){a.hasValue=!0,a.value=l}),[l]),B6(l),l},_6.exports=I6;const H6=n(_6.exports);var W6={BASE_URL:"/dev",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const U6=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{"production"!==(W6?"production":void 0)&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},{useDebugValue:V6}=H,{useSyncExternalStoreWithSelector:G6}=H6;const q6=(e,t)=>{const n=(e=>e?U6(e):U6)(e),r=(e,r=t)=>function(e,t=e.getState,n){const r=G6(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return V6(r),r}(n,e,r);return Object.assign(r,n),r};var X6={exports:{}};var K6={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Y6={};var Q6="object"==typeof process&&Y6&&Y6.NODE_DEBUG&&/\bsemver\b/i.test(Y6.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=K6,i=Q6,a=(t=e.exports={}).re=[],l=t.safeRe=[],s=t.src=[],c=t.t={};let u=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",o],[d,r]],p=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),o=u++;i(e,o,t),c[e]=o,s[o]=t,a[o]=new RegExp(t,n?"g":void 0),l[o]=new RegExp(r,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${s[c.NUMERICIDENTIFIER]})\\.(${s[c.NUMERICIDENTIFIER]})\\.(${s[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${s[c.NUMERICIDENTIFIERLOOSE]})\\.(${s[c.NUMERICIDENTIFIERLOOSE]})\\.(${s[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${s[c.NUMERICIDENTIFIER]}|${s[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${s[c.NUMERICIDENTIFIERLOOSE]}|${s[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${s[c.PRERELEASEIDENTIFIER]}(?:\\.${s[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${s[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${s[c.BUILDIDENTIFIER]}(?:\\.${s[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${s[c.MAINVERSION]}${s[c.PRERELEASE]}?${s[c.BUILD]}?`),p("FULL",`^${s[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${s[c.MAINVERSIONLOOSE]}${s[c.PRERELEASELOOSE]}?${s[c.BUILD]}?`),p("LOOSE",`^${s[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${s[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${s[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${s[c.XRANGEIDENTIFIER]})(?:\\.(${s[c.XRANGEIDENTIFIER]})(?:\\.(${s[c.XRANGEIDENTIFIER]})(?:${s[c.PRERELEASE]})?${s[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${s[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[c.XRANGEIDENTIFIERLOOSE]})(?:${s[c.PRERELEASELOOSE]})?${s[c.BUILD]}?)?)?`),p("XRANGE",`^${s[c.GTLT]}\\s*${s[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${s[c.GTLT]}\\s*${s[c.XRANGEPLAINLOOSE]}$`),p("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),p("COERCERTL",s[c.COERCE],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${s[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${s[c.LONETILDE]}${s[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${s[c.LONETILDE]}${s[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${s[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${s[c.LONECARET]}${s[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${s[c.LONECARET]}${s[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${s[c.GTLT]}\\s*(${s[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${s[c.GTLT]}\\s*(${s[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${s[c.GTLT]}\\s*(${s[c.LOOSEPLAIN]}|${s[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${s[c.XRANGEPLAIN]})\\s+-\\s+(${s[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${s[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(X6,X6.exports);var J6=X6.exports;const Z6=Object.freeze({loose:!0}),e8=Object.freeze({});var t8=e=>e?"object"!=typeof e?Z6:e:e8;const n8=/^[0-9]+$/,r8=(e,t)=>{const n=n8.test(e),r=n8.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:er8(t,e)};const i8=Q6,{MAX_LENGTH:a8,MAX_SAFE_INTEGER:l8}=K6,{safeRe:s8,t:c8}=J6,u8=t8,{compareIdentifiers:d8}=o8;var f8=class e{constructor(t,n){if(n=u8(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>a8)throw new TypeError(`version is longer than ${a8} characters`);i8("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?s8[c8.LOOSE]:s8[c8.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>l8||this.major<0)throw new TypeError("Invalid major version");if(this.minor>l8||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>l8||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===d8(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const p8=f8;var h8=(e,t,n=!1)=>{if(e instanceof p8)return e;try{return new p8(e,t)}catch(r){if(!n)return null;throw r}};const g8=h8;var m8=(e,t)=>{const n=g8(e,t);return n?n.version:null};const b8=h8;var v8=(e,t)=>{const n=b8(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const y8=f8;var w8=(e,t,n,r,o)=>{"string"==typeof n&&(o=r,r=n,n=void 0);try{return new y8(e instanceof y8?e.version:e,n).inc(t,r,o).version}catch(i){return null}};const x8=h8;var S8=(e,t)=>{const n=x8(e,null,!0),r=x8(t,null,!0),o=n.compare(r);if(0===o)return null;const i=o>0,a=i?n:r,l=i?r:n,s=!!a.prerelease.length;if(!!l.prerelease.length&&!s)return l.patch||l.minor?a.patch?"patch":a.minor?"minor":"major":"major";const c=s?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};const k8=f8;var C8=(e,t)=>new k8(e,t).major;const E8=f8;var O8=(e,t)=>new E8(e,t).minor;const D8=f8;var $8=(e,t)=>new D8(e,t).patch;const j8=h8;var P8=(e,t)=>{const n=j8(e,t);return n&&n.prerelease.length?n.prerelease:null};const N8=f8;var _8=(e,t,n)=>new N8(e,n).compare(new N8(t,n));const I8=_8;var T8=(e,t,n)=>I8(t,e,n);const F8=_8;var A8=(e,t)=>F8(e,t,!0);const R8=f8;var M8=(e,t,n)=>{const r=new R8(e,n),o=new R8(t,n);return r.compare(o)||r.compareBuild(o)};const L8=M8;var z8=(e,t)=>e.sort(((e,n)=>L8(e,n,t)));const B8=M8;var H8=(e,t)=>e.sort(((e,n)=>B8(n,e,t)));const W8=_8;var U8=(e,t,n)=>W8(e,t,n)>0;const V8=_8;var G8=(e,t,n)=>V8(e,t,n)<0;const q8=_8;var X8=(e,t,n)=>0===q8(e,t,n);const K8=_8;var Y8=(e,t,n)=>0!==K8(e,t,n);const Q8=_8;var J8=(e,t,n)=>Q8(e,t,n)>=0;const Z8=_8;var e7=(e,t,n)=>Z8(e,t,n)<=0;const t7=X8,n7=Y8,r7=U8,o7=J8,i7=G8,a7=e7;var l7=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return t7(e,n,r);case"!=":return n7(e,n,r);case">":return r7(e,n,r);case">=":return o7(e,n,r);case"<":return i7(e,n,r);case"<=":return a7(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};const s7=f8,c7=h8,{safeRe:u7,t:d7}=J6;var f7,p7,h7=(e,t)=>{if(e instanceof s7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=u7[d7.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),u7[d7.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;u7[d7.COERCERTL].lastIndex=-1}else n=e.match(u7[d7.COERCE]);return null===n?null:c7(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};var g7=m7;function m7(e){var t=this;if(t instanceof m7||(t=new m7),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},m7.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},m7.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},m7.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},m7.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new m7;if(tthis.length&&(t=this.length);for(var r=0,o=this.head;null!==o&&rthis.length&&(t=this.length);for(var r=this.length,o=this.tail;null!==o&&r>t;r--)o=o.prev;for(;null!==o&&r>e;r--,o=o.prev)n.push(o.value);return n},m7.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&r1;const I7=(e,t,n)=>{const r=e[P7].get(t);if(r){const t=r.value;if(T7(e,t)){if(A7(e,r),!e[E7])return}else n&&(e[N7]&&(r.value.now=Date.now()),e[j7].unshiftNode(r));return t.value}},T7=(e,t)=>{if(!t||!t.maxAge&&!e[O7])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[O7]&&n>e[O7]},F7=e=>{if(e[k7]>e[S7])for(let t=e[j7].tail;e[k7]>e[S7]&&null!==t;){const n=t.prev;A7(e,t),t=n}},A7=(e,t)=>{if(t){const n=t.value;e[D7]&&e[D7](n.key,n.value),e[k7]-=n.length,e[P7].delete(n.key),e[j7].removeNode(t)}};class R7{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const M7=(e,t,n,r)=>{let o=n.value;T7(e,o)&&(A7(e,n),e[E7]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};var L7,z7,B7,H7,W7=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[S7]=e.max||1/0;const t=e.length||_7;if(this[C7]="function"!=typeof t?_7:t,this[E7]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[O7]=e.maxAge||0,this[D7]=e.dispose,this[$7]=e.noDisposeOnSet||!1,this[N7]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[S7]=e||1/0,F7(this)}get max(){return this[S7]}set allowStale(e){this[E7]=!!e}get allowStale(){return this[E7]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[O7]=e,F7(this)}get maxAge(){return this[O7]}set lengthCalculator(e){"function"!=typeof e&&(e=_7),e!==this[C7]&&(this[C7]=e,this[k7]=0,this[j7].forEach((e=>{e.length=this[C7](e.value,e.key),this[k7]+=e.length}))),F7(this)}get lengthCalculator(){return this[C7]}get length(){return this[k7]}get itemCount(){return this[j7].length}rforEach(e,t){t=t||this;for(let n=this[j7].tail;null!==n;){const r=n.prev;M7(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[j7].head;null!==n;){const r=n.next;M7(this,e,n,t),n=r}}keys(){return this[j7].toArray().map((e=>e.key))}values(){return this[j7].toArray().map((e=>e.value))}reset(){this[D7]&&this[j7]&&this[j7].length&&this[j7].forEach((e=>this[D7](e.key,e.value))),this[P7]=new Map,this[j7]=new x7,this[k7]=0}dump(){return this[j7].map((e=>!T7(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[j7]}set(e,t,n){if((n=n||this[O7])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,o=this[C7](t,e);if(this[P7].has(e)){if(o>this[S7])return A7(this,this[P7].get(e)),!1;const i=this[P7].get(e).value;return this[D7]&&(this[$7]||this[D7](e,i.value)),i.now=r,i.maxAge=n,i.value=t,this[k7]+=o-i.length,i.length=o,this.get(e),F7(this),!0}const i=new R7(e,t,o,r,n);return i.length>this[S7]?(this[D7]&&this[D7](e,t),!1):(this[k7]+=i.length,this[j7].unshift(i),this[P7].set(e,this[j7].head),F7(this),!0)}has(e){if(!this[P7].has(e))return!1;const t=this[P7].get(e).value;return!T7(this,t)}get(e){return I7(this,e,!0)}peek(e){return I7(this,e,!1)}pop(){const e=this[j7].tail;return e?(A7(this,e),e.value):null}del(e){A7(this,this[P7].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[P7].forEach(((e,t)=>I7(this,t,!1)))}};function U7(){if(z7)return L7;z7=1;class e{constructor(t,o){if(o=n(o),t instanceof e)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new e(t.raw,o);if(t instanceof r)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!p(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&h(t[0])){this.set=[t];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const n=((this.options.includePrerelease&&d)|(this.options.loose&&f))+":"+e,i=t.get(n);if(i)return i;const h=this.options.loose,g=h?a[l.HYPHENRANGELOOSE]:a[l.HYPHENRANGE];e=e.replace(g,O(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(a[l.COMPARATORTRIM],s),o("comparator trim",e),e=e.replace(a[l.TILDETRIM],c),o("tilde trim",e),e=e.replace(a[l.CARETTRIM],u),o("caret trim",e);let b=e.split(" ").map((e=>m(e,this.options))).join(" ").split(/\s+/).map((e=>E(e,this.options)));h&&(b=b.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(a[l.COMPARATORLOOSE]))))),o("range list",b);const v=new Map,y=b.map((e=>new r(e,this.options)));for(const t of y){if(p(t))return[t];v.set(t.value,t)}v.size>1&&v.has("")&&v.delete("");const w=[...v.values()];return t.set(n,w),w}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>g(e,n)&&t.set.some((t=>g(t,n)&&e.every((e=>t.every((t=>e.intersects(t,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new i(e,this.options)}catch(mue){return!1}for(let t=0;t"<0.0.0-0"===e.value,h=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},m=(e,t)=>(o("comp",e,t),e=w(e,t),o("caret",e),e=v(e,t),o("tildes",e),e=S(e,t),o("xrange",e),e=C(e,t),o("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,v=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const n=t.loose?a[l.TILDELOOSE]:a[l.TILDE];return e.replace(n,((t,n,r,i,a)=>{let l;return o("tilde",e,t,n,r,i,a),b(n)?l="":b(r)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:b(i)?l=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o("replaceTilde pr",a),l=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):l=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",l),l}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{o("caret",e,t);const n=t.loose?a[l.CARETLOOSE]:a[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,l)=>{let s;return o("caret",e,t,n,i,a,l),b(n)?s="":b(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:b(a)?s="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:l?(o("replaceCaret pr",l),s="0"===n?"0"===i?`>=${n}.${i}.${a}-${l} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${l} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${l} <${+n+1}.0.0-0`):(o("no pr"),s="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",s),s}))},S=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>k(e,t))).join(" ")),k=(e,t)=>{e=e.trim();const n=t.loose?a[l.XRANGELOOSE]:a[l.XRANGE];return e.replace(n,((n,r,i,a,l,s)=>{o("xRange",e,n,r,i,a,l,s);const c=b(i),u=c||b(a),d=u||b(l),f=d;return"="===r&&f&&(r=""),s=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(u&&(a=0),l=0,">"===r?(r=">=",u?(i=+i+1,a=0,l=0):(a=+a+1,l=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),"<"===r&&(s="-0"),n=`${r+i}.${a}.${l}${s}`):u?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),o("xRange return",n),n}))},C=(e,t)=>(o("replaceStars",e,t),e.trim().replace(a[l.STAR],"")),E=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),O=e=>(t,n,r,o,i,a,l,s,c,u,d,f,p)=>`${n=b(r)?"":b(o)?`>=${r}.0.0${e?"-0":""}`:b(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${s=b(c)?"":b(u)?`<${+c+1}.0.0-0`:b(d)?`<${c}.${+u+1}.0-0`:f?`<=${c}.${u}.${d}-${f}`:e?`<${c}.${u}.${+d+1}-0`:`<=${s}`}`.trim(),D=(e,t,n)=>{for(let r=0;r0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return L7}function V7(){if(H7)return B7;H7=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,o){if(o=n(o),r instanceof t){if(r.loose===!!o.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],i=t.match(n);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new l(i[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new l(t,this.options)}catch(mue){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new s(e.value,r).test(this.value):""===e.operator?""===e.value||new s(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(i(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(i(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}B7=t;const n=t8,{safeRe:r,t:o}=J6,i=l7,a=Q6,l=f8,s=U7();return B7}const G7=U7();var q7=(e,t,n)=>{try{t=new G7(t,n)}catch(mue){return!1}return t.test(e)};const X7=U7();var K7=(e,t)=>new X7(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const Y7=f8,Q7=U7();var J7=(e,t,n)=>{let r=null,o=null,i=null;try{i=new Q7(t,n)}catch(mue){return null}return e.forEach((e=>{i.test(e)&&(r&&-1!==o.compare(e)||(r=e,o=new Y7(r,n)))})),r};const Z7=f8,e9=U7();var t9=(e,t,n)=>{let r=null,o=null,i=null;try{i=new e9(t,n)}catch(mue){return null}return e.forEach((e=>{i.test(e)&&(r&&1!==o.compare(e)||(r=e,o=new Z7(r,n)))})),r};const n9=f8,r9=U7(),o9=U8;var i9=(e,t)=>{e=new r9(e,t);let n=new n9("0.0.0");if(e.test(n))return n;if(n=new n9("0.0.0-0"),e.test(n))return n;n=null;for(let r=0;r{const t=new n9(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!o9(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!o||n&&!o9(n,o)||(n=o)}return n&&e.test(n)?n:null};const a9=U7();var l9=(e,t)=>{try{return new a9(e,t).range||"*"}catch(mue){return null}};const s9=f8,c9=V7(),{ANY:u9}=c9,d9=U7(),f9=q7,p9=U8,h9=G8,g9=e7,m9=J8;var b9=(e,t,n,r)=>{let o,i,a,l,s;switch(e=new s9(e,r),t=new d9(t,r),n){case">":o=p9,i=g9,a=h9,l=">",s=">=";break;case"<":o=h9,i=m9,a=p9,l="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(f9(e,t,r))return!1;for(let c=0;c{e.semver===u9&&(e=new c9(">=0.0.0")),u=u||e,d=d||e,o(e.semver,u.semver,r)?u=e:a(e.semver,d.semver,r)&&(d=e)})),u.operator===l||u.operator===s)return!1;if((!d.operator||d.operator===l)&&i(e,d.semver))return!1;if(d.operator===s&&a(e,d.semver))return!1}return!0};const v9=b9;var y9=(e,t,n)=>v9(e,t,">",n);const w9=b9;var x9=(e,t,n)=>w9(e,t,"<",n);const S9=U7();var k9=(e,t,n)=>(e=new S9(e,n),t=new S9(t,n),e.intersects(t,n));const C9=q7,E9=_8;const O9=U7(),D9=V7(),{ANY:$9}=D9,j9=q7,P9=_8,N9=[new D9(">=0.0.0-0")],_9=[new D9(">=0.0.0")],I9=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===$9){if(1===t.length&&t[0].semver===$9)return!0;e=n.includePrerelease?N9:_9}if(1===t.length&&t[0].semver===$9){if(n.includePrerelease)return!0;t=_9}const r=new Set;let o,i,a,l,s,c,u;for(const p of e)">"===p.operator||">="===p.operator?o=T9(o,p,n):"<"===p.operator||"<="===p.operator?i=F9(i,p,n):r.add(p.semver);if(r.size>1)return null;if(o&&i){if(a=P9(o.semver,i.semver,n),a>0)return null;if(0===a&&(">="!==o.operator||"<="!==i.operator))return null}for(const p of r){if(o&&!j9(p,String(o),n))return null;if(i&&!j9(p,String(i),n))return null;for(const e of t)if(!j9(p,String(e),n))return!1;return!0}let d=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver,f=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver;d&&1===d.prerelease.length&&"<"===i.operator&&0===d.prerelease[0]&&(d=!1);for(const p of t){if(u=u||">"===p.operator||">="===p.operator,c=c||"<"===p.operator||"<="===p.operator,o)if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),">"===p.operator||">="===p.operator){if(l=T9(o,p,n),l===p&&l!==o)return!1}else if(">="===o.operator&&!j9(o.semver,String(p),n))return!1;if(i)if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),"<"===p.operator||"<="===p.operator){if(s=F9(i,p,n),s===p&&s!==i)return!1}else if("<="===i.operator&&!j9(i.semver,String(p),n))return!1;if(!p.operator&&(i||o)&&0!==a)return!1}return!(o&&c&&!i&&0!==a)&&(!(i&&u&&!o&&0!==a)&&(!f&&!d))},T9=(e,t,n)=>{if(!e)return t;const r=P9(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},F9=(e,t,n)=>{if(!e)return t;const r=P9(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var A9=(e,t,n={})=>{if(e===t)return!0;e=new O9(e,n),t=new O9(t,n);let r=!1;e:for(const o of e.set){for(const e of t.set){const t=I9(o,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const R9=J6,M9=K6,L9=f8,z9=o8,B9=(e,t,n)=>{const r=[];let o=null,i=null;const a=e.sort(((e,t)=>E9(e,t,n)));for(const u of a){C9(u,t,n)?(i=u,o||(o=u)):(i&&r.push([o,i]),i=null,o=null)}o&&r.push([o,null]);const l=[];for(const[u,d]of r)u===d?l.push(u):d||u!==a[0]?d?u===a[0]?l.push(`<=${d}`):l.push(`${u} - ${d}`):l.push(`>=${u}`):l.push("*");const s=l.join(" || "),c="string"==typeof t.raw?t.raw:String(t);return s.length{await fetch("/lobe/config",{body:JSON.stringify(e),headers:{"Content-Type":"application/json"},method:"POST"})},Y9={confirmPageUnload:!1,enableExtraNetworkSidebar:!0,enableHighlight:!1,enableImageInfo:!0,enableSidebar:!0,enableWebFont:!0,extraNetworkCardSize:86,extraNetworkFixedMode:"fixed",extraNetworkSidebarExpand:!0,extraNetworkSidebarWidth:340,i18n:"en_US",layoutHideFooter:!1,layoutSplitPreview:!1,liteAnimation:!1,logoCustomTitle:"",logoCustomUrl:"",logoType:"lobe",neutralColor:void 0,primaryColor:void 0,promptEditor:!1,promptTextareaType:"resizable",sidebarExpand:!0,sidebarFixedMode:"fixed",sidebarWidth:280,svgIcon:!0},Q9={currentTab:"tab_txt2img",latestVersion:q9,loading:!0,localeOptions:X9,setting:Y9,themeMode:"dark",version:q9},J9="SD-LOBE-SETTING",Z9=(e,t)=>({onInit:async()=>{e((()=>({loading:!0})),!1,"onInit");const{onLoadSetting:n,onLoadVersion:r,onLoadLatestVersion:o,onLoadLocalOptions:i}=t();await i(),await r(),await o(),await n(),e((()=>({loading:!1})),!1,"onInit")},onLoadLatestVersion:async()=>{const t=await(async()=>{const e=await fetch(`https://api.github.com/repos/${V9.replace("https://github.com/","")}/releases/latest`),t=await e.json();return t&&t.tag_name&&H9.clean(t.tag_name)||q9})();e((()=>({latestVersion:t})),!1,"onLoadLatestVersion")},onLoadLocalOptions:async()=>{const t=await(async()=>{const e=await fetch("/lobe/locales/options"),t=await e.json();return t&&0!==(null==t?void 0:t.length)?t:X9})();e((()=>({localeOptions:t})),!1,"onLoadLocalOptions")},onLoadSetting:async()=>{let t;const n=await(async()=>{const e=await fetch("/lobe/config"),t=await e.json();if(t&&!(null==t?void 0:t.empty))return t})();if(n&&(ue.start("🤯 [setting] loaded webui setting"),t=n),!t){const e=localStorage.getItem(J9);e&&(ue.info("🤯 [setting] loaded local setting"),t=JSON.parse(e))}if(!t){const e=localStorage.getItem("SD-KITCHEN-SETTING");e&&(ue.info("🤯 [setting] loaded fallback local setting"),t=JSON.parse(e))}t||(ue.info("🤯 [setting] loaded default setting"),t=Y9);const r={...Y9,...t};await K9(r),e((()=>({setting:r})),!1,"onLoadSetting"),ue.success("🤯 [setting] loaded"),console.table(r)},onLoadVersion:async()=>{const t=await(async()=>{const e=await fetch("/lobe/package"),t=await e.json();return t&&!t.empty&&t.version?t.version:q9})();e((()=>({version:t})),!1,"onLoadVersion")},onSetSetting:async n=>{const r={...t().setting,...n};localStorage.setItem(J9,JSON.stringify(r)),await K9(r),e((()=>({setting:r})),!1,"onSetSetting")},onSetThemeMode:t=>{e((()=>({themeMode:t})),!1,"onSetThemeMode")},setCurrentTab:()=>{var n;const r=null==(n=get_uiCurrentTabContent())?void 0:n.id;ue.info("🤯 [tab] onChange",r),r&&r!==t().currentTab&&e({currentTab:r},!1,"setCurrentTab")}}),eee=e=>({...Y9,...e.setting}),tee=e=>e.currentTab,nee=e=>e.themeMode,ree=(oee?q6(oee,iee):q6)(P6(((...e)=>({...Q9,...Z9(...e)}))),(function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{const[r,o]=B.useState("");return B.useEffect((()=>{const r=new MutationObserver((e=>{var r;for(const i of e)if("childList"===i.type||"characterData"===i.type)if(t){const e=i.target.querySelector(t);o(String(e[n]))}else o(String(null==(r=i.target)?void 0:r.innerHTML))})),i=gradioApp().querySelector(e);if(i){r.observe(i,lee);const e=t?i.querySelector(t):i;o(String(null==e?void 0:e[n]))}return()=>{r.disconnect()}}),[e,t,n]),String(r)},cee=BB((({css:e,token:t,isDarkMode:n})=>{const r=n?"dark":"light",o=n?KZ.lime[r][9]:KZ.green[r][10];return{configTitle:e` color: ${t.colorTextSecondary}; `,configValue:e` color: ${t.colorInfoText}; @@ -2153,7 +2153,7 @@ var tte='{if(null==t?void 0:t.isConnected)return e.preventDefault(),e.returnValue=""})),ue.success("🤯 [layout] inject - Footer")}catch(t){ue.error("🤯 [layout] inject - Footer",t)}}),[]),Q.jsx("div",{className:r(o.footer,e),...t,children:Q.jsx(C1,{bottom:Q.jsx("div",{ref:a}),columns:n.layoutHideFooter?[]:[{items:Tte,title:i("footer.resources")},{items:Fte,title:i("footer.community")},{items:Ate,title:i("footer.help")},{items:Rte,title:i("footer.moreProducts")}]})})})),zte=Lte,Bte=B.memo((e=>{const{version:t,latestVersion:n}=ree((e=>({latestVersion:e.latestVersion,version:e.version}))),r=H9.gte(t,n);return Q.jsx("a",{href:V9,rel:"noreferrer",target:"_blank",children:r?Q.jsxs(Hz,{color:"success",...e,children:["v",t]}):Q.jsxs(Hz,{color:"warning",...e,children:["v",t," / latest v",n]})})})),Hte=V9.replace("https://github.com/",""),Wte=B.memo((({open:e,onCancel:t})=>{const n=ree(eee,m1),r=XB(),{t:o}=O6();return Q.jsx(e0,{footer:!1,onCancel:t,open:e,title:Q.jsxs(fU,{align:"center",gap:4,horizontal:!0,children:[Q.jsx("a",{href:"https://discord.gg/AYFPHvv2jT",rel:"noreferrer",target:"_blank",children:Q.jsx(yH,{icon:H2,title:"Discord"})}),Q.jsx("a",{href:V9,rel:"noreferrer",target:"_blank",children:Q.jsx(yH,{icon:Hd,title:Hte})}),Q.jsxs(bM,{children:[o("modal.themeFeedback.title"),Q.jsx(Bte,{})]})]}),children:Q.jsxs(fU,{gap:32,children:[Q.jsxs(YW,{gap:16,horizontal:!0,style:{background:r.colorBgLayout,border:`1px solid ${r.colorBorderSecondary}`,borderRadius:r.borderRadiusLG,padding:"16px 0"},children:[Q.jsx(BC,{icon:Q.jsx(eH,{icon:H2}),size:"large",children:"Join Discover"}),Q.jsx(P2,{icon:Q.jsx(eH,{icon:Hd}),children:"LobeTheme Github"})]}),Q.jsx(k2,{lang:n.i18n,mapping:"number",repo:Hte,repoId:"R_kgDOJCPcNg",term:"53"})]})})})),Ute=Wte,Vte=B.memo((()=>{const{t:e}=O6();return Q.jsx(fU,{height:"100vh",width:"100%",children:Q.jsxs(YW,{flex:1,gap:12,width:"100%",children:[Q.jsx(B5,{extra:"SD",size:48,type:"combine"}),Q.jsxs(YW,{gap:16,horizontal:!0,children:[Q.jsx(eH,{icon:qd,spin:!0}),e("custom.initializing")]})]})})})),Gte=Vte,qte=B.memo((({size:e=32,style:t,logoCustomUrl:n,logoCustomTitle:r})=>{let o=Q.jsx(B5,{size:e,style:t});if(n)if(n.includes("http")||n.includes("data"))o=Q.jsx("img",{alt:"logo",src:n,style:{height:e,...t}});else{const r=NU(n);r&&(o=Q.jsx(FU,{emoji:r,size:e,style:t}))}return Q.jsxs(bM,{align:"center",size:.3*e,children:[o,Q.jsx("b",{style:{fontSize:.6*e,whiteSpace:"nowrap"},children:r})]})})),Xte=B.memo((({size:e=32,style:t,themeMode:n})=>Q.jsx("img",{alt:"logo",src:"dark"===n?"https://gw.alipayobjects.com/zos/bmw-prod/9ecb2822-1592-4cb0-a087-ce0097fef2ca.svg":"https://gw.alipayobjects.com/zos/bmw-prod/e146116d-c65a-4306-a3d2-bb8d05e1c49b.svg",style:{height:e,...t}}))),Kte=B.memo((({size:e=32,style:t})=>{const n=ree(eee,m1),r=ree(nee);return"kitchen"===n.logoType?Q.jsx(Xte,{size:.75*e,style:t,themeMode:r}):"custom"===n.logoType?Q.jsx(qte,{logoCustomTitle:n.logoCustomTitle,logoCustomUrl:n.logoCustomUrl,size:e,style:t}):Q.jsx(B5,{extra:"SD",size:e,style:t,type:"combine"})})),Yte=BB((({css:e})=>({buttonGroup:e` + `}))),Lte=B.memo((({className:e,...t})=>{const n=ree(eee,m1),{cx:r,styles:o}=Mte(),{t:i}=O6(),a=B.useRef(null);return B.useEffect((()=>{var e;try{const t=gradioApp().querySelector("#footer");t&&(null==(e=a.current)||e.append(t)),n.confirmPageUnload&&window.addEventListener("beforeunload",(e=>{if(null==t?void 0:t.isConnected)return e.preventDefault(),e.returnValue=""})),ue.success("🤯 [layout] inject - Footer")}catch(t){ue.error("🤯 [layout] inject - Footer",t)}}),[]),Q.jsx("div",{className:r(o.footer,e),...t,children:Q.jsx(C1,{bottom:Q.jsx("div",{ref:a}),columns:n.layoutHideFooter?[]:[{items:Tte,title:i("footer.resources")},{items:Fte,title:i("footer.community")},{items:Ate,title:i("footer.help")},{items:Rte,title:i("footer.moreProducts")}]})})})),zte=Lte,Bte=B.memo((e=>{const{version:t,latestVersion:n}=ree((e=>({latestVersion:e.latestVersion,version:e.version}))),r=H9.gte(t,n);return Q.jsx("a",{href:V9,rel:"noreferrer",target:"_blank",children:r?Q.jsxs(Hz,{color:"success",...e,children:["v",t]}):Q.jsxs(Hz,{color:"warning",...e,children:["v",t," / latest v",n]})})})),Hte=V9.replace("https://github.com/",""),Wte=B.memo((({open:e,onCancel:t})=>{const n=ree(eee,m1),r=XB(),{t:o}=O6();return Q.jsx(e0,{footer:!1,onCancel:t,open:e,title:Q.jsxs(fU,{align:"center",gap:4,horizontal:!0,children:[o("modal.themeFeedback.title"),Q.jsx(Bte,{})]}),children:Q.jsxs(fU,{gap:32,children:[Q.jsxs(YW,{gap:16,horizontal:!0,style:{background:r.colorBgLayout,border:`1px solid ${r.colorBorderSecondary}`,borderRadius:r.borderRadiusLG,padding:"16px 0"},children:[Q.jsx("a",{href:"https://discord.gg/AYFPHvv2jT",rel:"noreferrer",target:"_blank",children:Q.jsx(BC,{icon:Q.jsx(eH,{icon:H2}),size:"large",children:"Join Discover"})}),Q.jsx("a",{href:V9,rel:"noreferrer",target:"_blank",children:Q.jsx(P2,{icon:Q.jsx(eH,{icon:Hd}),children:"LobeTheme Github"})})]}),Q.jsx(k2,{lang:n.i18n,mapping:"number",repo:Hte,repoId:"R_kgDOJCPcNg",term:"53"})]})})})),Ute=Wte,Vte=B.memo((()=>{const{t:e}=O6();return Q.jsx(fU,{height:"100vh",width:"100%",children:Q.jsxs(YW,{flex:1,gap:12,width:"100%",children:[Q.jsx(B5,{extra:"SD",size:48,type:"combine"}),Q.jsxs(YW,{gap:16,horizontal:!0,children:[Q.jsx(eH,{icon:qd,spin:!0}),e("custom.initializing")]})]})})})),Gte=Vte,qte=B.memo((({size:e=32,style:t,logoCustomUrl:n,logoCustomTitle:r})=>{let o=Q.jsx(B5,{size:e,style:t});if(n)if(n.includes("http")||n.includes("data"))o=Q.jsx("img",{alt:"logo",src:n,style:{height:e,...t}});else{const r=NU(n);r&&(o=Q.jsx(FU,{emoji:r,size:e,style:t}))}return Q.jsxs(bM,{align:"center",size:.3*e,children:[o,Q.jsx("b",{style:{fontSize:.6*e,whiteSpace:"nowrap"},children:r})]})})),Xte=B.memo((({size:e=32,style:t,themeMode:n})=>Q.jsx("img",{alt:"logo",src:"dark"===n?"https://gw.alipayobjects.com/zos/bmw-prod/9ecb2822-1592-4cb0-a087-ce0097fef2ca.svg":"https://gw.alipayobjects.com/zos/bmw-prod/e146116d-c65a-4306-a3d2-bb8d05e1c49b.svg",style:{height:e,...t}}))),Kte=B.memo((({size:e=32,style:t})=>{const n=ree(eee,m1),r=ree(nee);return"kitchen"===n.logoType?Q.jsx(Xte,{size:.75*e,style:t,themeMode:r}):"custom"===n.logoType?Q.jsx(qte,{logoCustomTitle:n.logoCustomTitle,logoCustomUrl:n.logoCustomUrl,size:e,style:t}):Q.jsx(B5,{extra:"SD",size:e,style:t,type:"combine"})})),Yte=BB((({css:e})=>({buttonGroup:e` display: flex; gap: 8px; `,promptView:e` diff --git a/src/components/Giscus/index.tsx b/src/components/Giscus/index.tsx index 072695ac..dcf77507 100644 --- a/src/components/Giscus/index.tsx +++ b/src/components/Giscus/index.tsx @@ -1,5 +1,4 @@ import { - ActionIcon, DiscordIcon, Giscus as G, GradientButton, @@ -7,7 +6,7 @@ import { Modal, type ModalProps, } from '@lobehub/ui'; -import { Button, Space } from 'antd'; +import { Button } from 'antd'; import { useTheme } from 'antd-style'; import isEqual from 'fast-deep-equal'; import { Github } from 'lucide-react'; @@ -37,16 +36,8 @@ const Giscus = memo(({ open, onCancel }) => { open={open} title={ - - - - - - - - {t('modal.themeFeedback.title')} - - + {t('modal.themeFeedback.title')} + } > @@ -61,10 +52,14 @@ const Giscus = memo(({ open, onCancel }) => { padding: '16px 0', }} > - - }>LobeTheme Github + + + + + }>LobeTheme Github +