diff --git a/src/main.ts b/src/main.ts index c3076353..fdfbb366 100644 --- a/src/main.ts +++ b/src/main.ts @@ -273,33 +273,36 @@ export class SakuraApp implements Sakura { // 挂载 i18n if (!Object.getOwnPropertyDescriptor(sakura, "$t")) { + const backends: Array = [ + { + type: "backend", + read( + // @ts-ignore + language: LocaleCode, + // @ts-ignore + namespace: Namespace, + callback: (errorValue: unknown, translations: null | [Namespace]) => void + ) { + import(`./languages/${language}.json`) + .then((resources) => { + callback(null, resources.default); + }) + .catch((error) => { + callback(error, null); + }); + }, + init: () => {}, + }, + ]; + if (import.meta.env.MODE !== "development") { + backends.unshift(LocalStorageBackend) + } i18next .use(LanguageDetector) .use(Backend) .init({ backend: { - backends: [ - LocalStorageBackend, - { - type: "backend", - read( - // @ts-ignore - language: LocaleCode, - // @ts-ignore - namespace: Namespace, - callback: (errorValue: unknown, translations: null | [Namespace]) => void - ) { - import(`./languages/${language}.json`) - .then((resources) => { - callback(null, resources.default); - }) - .catch((error) => { - callback(error, null); - }); - }, - init: () => {}, - }, - ], + backends, backendOptions: [ { prefix: "i18next_sakura_", diff --git a/templates/assets/dist/main.min.js b/templates/assets/dist/main.min.js index 1633cd40..226bd159 100644 --- a/templates/assets/dist/main.min.js +++ b/templates/assets/dist/main.min.js @@ -1,7 +1,7 @@ -var cr=Object.defineProperty;var lr=(r,e,t)=>e in r?cr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var C=(r,e,t)=>(lr(r,typeof e!="symbol"?e+"":e,t),t);import{g as fr}from"./assets/_commonjsHelpers-042e6b4d.js";const dr="modulepreload",gr=function(r){return"/themes/theme-sakura/assets/dist/"+r},Tt={},j=function(e,t,i){if(!t||t.length===0)return e();const n=document.getElementsByTagName("link");return Promise.all(t.map(o=>{if(o=gr(o),o in Tt)return;Tt[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!i)for(let c=n.length-1;c>=0;c--){const f=n[c];if(f.href===o&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":dr,a||(l.as="script",l.crossOrigin=""),l.href=o,document.head.appendChild(l),a)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())},hr=(r,e)=>{const t=r[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((i,n)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})},ne=class{static async retry(e,t=3,i=1e3){try{return await e()}catch(n){if(t>0)return await new Promise(o=>setTimeout(o,i)),await ne.retry(e,t-1,i);throw n}}static jsonToMap(e){try{let t=e;e instanceof String&&(t=JSON.parse(e.toString()));const i=Object.entries(t);return new Map(i)}catch(t){throw new Error(`解析 JSON 失败:${t.message}`)}}static generateColor(){const e=Math.floor(Math.random()*360),t=Math.floor(Math.random()*50)+50,i=Math.floor(Math.random()*40)+50,n=e/60,o=t/100,a=i/100,s=(1-Math.abs(2*a-1))*o,u=s*(1-Math.abs(n%2-1)),l=a-s/2;let c,f,g;0<=n&&n<1?[c,f,g]=[s,u,0]:1<=n&&n<2?[c,f,g]=[u,s,0]:2<=n&&n<3?[c,f,g]=[0,s,u]:3<=n&&n<4?[c,f,g]=[0,u,s]:4<=n&&n<5?[c,f,g]=[u,0,s]:[c,f,g]=[s,0,u],c=Math.round((c+l)*255),f=Math.round((f+l)*255),g=Math.round((g+l)*255);const d=c.toString(16).padStart(2,"0"),h=f.toString(16).padStart(2,"0"),v=g.toString(16).padStart(2,"0");return`#${d}${h}${v}`}static getWordCount(e){var t,i;return((i=(t=e.textContent)==null?void 0:t.normalize().match(ne.wordPattern))==null?void 0:i.length)??0}static caclEstimateReadTime(e,t=3){t=Math.min(6,Math.max(1,t));var n=400+(t-1)*100;return Math.ceil(e/n*60)}};let ge=ne;C(ge,"PatternString",{cjk:"\\p{Script=Han}|\\p{Script=Kana}|\\p{Script=Hira}|\\p{Script=Hangul}",word:"[\\p{L}|\\p{N}|._]+"}),C(ge,"wordPattern",new RegExp(`${ne.PatternString.cjk}|${ne.PatternString.word}`,"gu"));const wt=class{static addEventListener(e,t,i){let n=wt.throttle(t,i),o=this.eventThrottles.get(e);o||(o=new Set,this.eventThrottles.set(e,o)),o.add(n),window.addEventListener(e,n)}static throttle(e,t){let i=null;return(...n)=>{i||(e.apply(this,n),i=window.setTimeout(()=>{i=null},t))}}};let he=wt;C(he,"eventThrottles",new Map);var pr=Object.defineProperty,mr=Object.getOwnPropertyDescriptor,A=(r,e,t,i)=>{for(var n=i>1?void 0:i?mr(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(n=(i?a(e,t,n):a(n))||n);return i&&n&&pr(e,t,n),n};class N{searchModal(){const e=document.querySelector(".searchbox");if(!e)return;if(!S.getPageConfig("showSearchModal")){e.addEventListener("click",()=>{SearchWidget.open()});return}const t=document.querySelector(".js-search-modal.search-form-modal");if(!t)return;e.addEventListener("click",()=>{t.classList.add("is-visible")}),t.addEventListener("submit",n=>{if(!S.$pjax)return;n.preventDefault();const o=n.target;if(!(o&&o instanceof HTMLFormElement))return;const a=o.action,s=o.keyword;S.$pjax.loadUrl(`${a}?${s.name}=${s.value}`),t.classList.remove("is-visible"),S.$pjax.refresh()});const i=document.querySelector(".search-close");i&&i.addEventListener("click",()=>{t.classList.remove("is-visible")})}registerScrollEvent(){var a;const e=((a=document.querySelector(".site-header"))==null?void 0:a.offsetHeight)||75,t=document.querySelector(".cd-top"),i=document.querySelector(".m-cd-top"),n=document.querySelector(".change-skin-gear"),o=document.querySelector(".mobile-change-skin");window.addEventListener("scroll",()=>{document.documentElement.scrollTop>e?(t==null||t.classList.add("cd-is-visible"),n.style.bottom="0",t.offsetHeight>window.innerHeight?t.style.top=`${window.innerHeight-t.offsetHeight-e}px`:t.style.top="0"):(t.style.top="-900px",t==null||t.classList.remove("cd-is-visible"),n.style.bottom="-100px"),document.documentElement.scrollTop>0?(i.classList.add("cd-is-visible"),o.classList.add("cd-is-visible")):(i.classList.remove("cd-is-visible"),o.classList.remove("cd-is-visible"))})}registerBackToTopEvent(){document.querySelectorAll(".cd-top, .m-cd-top").forEach(t=>{t.addEventListener("click",i=>{i.preventDefault(),window.pageYOffset>0&&window.scrollTo({top:0,behavior:"smooth"})})})}registerCopyEvent(){he.addEventListener("copy",()=>{S.$toast&&S.$toast.create(S.translate("common.events.copy","复制成功!
Copied to clipboard successfully!"),2e3)},2e3)}registerCodeBlockZoomEvent(){document.querySelectorAll("pre").forEach(t=>{t.addEventListener("dblclick",i=>{var n;i.target===t&&(t.classList.toggle("code-block-fullscreen"),(n=document.querySelector("html"))==null||n.classList.toggle("code-block-fullscreen-html-scroll"))})})}registerNavigationChangeEvent(){window.addEventListener("hashchange",e=>{if(e.oldURL.includes("#gallery-"))return;const i=location.hash.substring(1);if(!i.match(/^[A-z0-9_-]+$/))return;const n=document.getElementById(i);n&&(n.tagName.match(/^(?:a|select|input|button|textarea)$/i)||(n.tabIndex=-1),n.focus())},!1)}registerMobileNav(){var t,i;const e=document.querySelectorAll(".container, .site-nav-toggle, .site-sidebar");(t=document.querySelector(".nav-toggle"))==null||t.addEventListener("click",()=>{e.forEach(n=>{n.classList.add("open")})}),(i=document.querySelector(".site-sidebar"))==null||i.addEventListener("click",()=>{e.forEach(n=>{n.classList.remove("open")})})}registerHeaderEvent(){let t=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;window.addEventListener("scroll",()=>{const i=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,n=document.querySelector(".site-header");i===0?n==null||n.classList.remove("yya"):n==null||n.classList.add("yya"),i>t?n==null||n.classList.remove("sabit"):n==null||n.classList.add("sabit"),t=i,j(()=>import("./assets/nprogress-2b5a08a9.js").then(o=>o.n),["assets/nprogress-2b5a08a9.js","assets/_commonjsHelpers-042e6b4d.js"]).then(o=>{o.default.configure({minimum:0,template:` +var cr=Object.defineProperty;var lr=(r,e,t)=>e in r?cr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var C=(r,e,t)=>(lr(r,typeof e!="symbol"?e+"":e,t),t);import{g as fr}from"./assets/_commonjsHelpers-042e6b4d.js";const dr="modulepreload",gr=function(r){return"/themes/theme-sakura/assets/dist/"+r},Tt={},j=function(e,t,i){if(!t||t.length===0)return e();const n=document.getElementsByTagName("link");return Promise.all(t.map(o=>{if(o=gr(o),o in Tt)return;Tt[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!i)for(let c=n.length-1;c>=0;c--){const l=n[c];if(l.href===o&&(!a||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const f=document.createElement("link");if(f.rel=a?"stylesheet":dr,a||(f.as="script",f.crossOrigin=""),f.href=o,document.head.appendChild(f),a)return new Promise((c,l)=>{f.addEventListener("load",c),f.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())},hr=(r,e)=>{const t=r[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((i,n)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})},ne=class{static async retry(e,t=3,i=1e3){try{return await e()}catch(n){if(t>0)return await new Promise(o=>setTimeout(o,i)),await ne.retry(e,t-1,i);throw n}}static jsonToMap(e){try{let t=e;e instanceof String&&(t=JSON.parse(e.toString()));const i=Object.entries(t);return new Map(i)}catch(t){throw new Error(`解析 JSON 失败:${t.message}`)}}static generateColor(){const e=Math.floor(Math.random()*360),t=Math.floor(Math.random()*50)+50,i=Math.floor(Math.random()*40)+50,n=e/60,o=t/100,a=i/100,s=(1-Math.abs(2*a-1))*o,u=s*(1-Math.abs(n%2-1)),f=a-s/2;let c,l,g;0<=n&&n<1?[c,l,g]=[s,u,0]:1<=n&&n<2?[c,l,g]=[u,s,0]:2<=n&&n<3?[c,l,g]=[0,s,u]:3<=n&&n<4?[c,l,g]=[0,u,s]:4<=n&&n<5?[c,l,g]=[u,0,s]:[c,l,g]=[s,0,u],c=Math.round((c+f)*255),l=Math.round((l+f)*255),g=Math.round((g+f)*255);const d=c.toString(16).padStart(2,"0"),h=l.toString(16).padStart(2,"0"),v=g.toString(16).padStart(2,"0");return`#${d}${h}${v}`}static getWordCount(e){var t,i;return((i=(t=e.textContent)==null?void 0:t.normalize().match(ne.wordPattern))==null?void 0:i.length)??0}static caclEstimateReadTime(e,t=3){t=Math.min(6,Math.max(1,t));var n=400+(t-1)*100;return Math.ceil(e/n*60)}};let ge=ne;C(ge,"PatternString",{cjk:"\\p{Script=Han}|\\p{Script=Kana}|\\p{Script=Hira}|\\p{Script=Hangul}",word:"[\\p{L}|\\p{N}|._]+"}),C(ge,"wordPattern",new RegExp(`${ne.PatternString.cjk}|${ne.PatternString.word}`,"gu"));const wt=class{static addEventListener(e,t,i){let n=wt.throttle(t,i),o=this.eventThrottles.get(e);o||(o=new Set,this.eventThrottles.set(e,o)),o.add(n),window.addEventListener(e,n)}static throttle(e,t){let i=null;return(...n)=>{i||(e.apply(this,n),i=window.setTimeout(()=>{i=null},t))}}};let he=wt;C(he,"eventThrottles",new Map);var pr=Object.defineProperty,mr=Object.getOwnPropertyDescriptor,A=(r,e,t,i)=>{for(var n=i>1?void 0:i?mr(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(n=(i?a(e,t,n):a(n))||n);return i&&n&&pr(e,t,n),n};class N{searchModal(){const e=document.querySelector(".searchbox");if(!e)return;if(!S.getPageConfig("showSearchModal")){e.addEventListener("click",()=>{SearchWidget.open()});return}const t=document.querySelector(".js-search-modal.search-form-modal");if(!t)return;e.addEventListener("click",()=>{t.classList.add("is-visible")}),t.addEventListener("submit",n=>{if(!S.$pjax)return;n.preventDefault();const o=n.target;if(!(o&&o instanceof HTMLFormElement))return;const a=o.action,s=o.keyword;S.$pjax.loadUrl(`${a}?${s.name}=${s.value}`),t.classList.remove("is-visible"),S.$pjax.refresh()});const i=document.querySelector(".search-close");i&&i.addEventListener("click",()=>{t.classList.remove("is-visible")})}registerScrollEvent(){var a;const e=((a=document.querySelector(".site-header"))==null?void 0:a.offsetHeight)||75,t=document.querySelector(".cd-top"),i=document.querySelector(".m-cd-top"),n=document.querySelector(".change-skin-gear"),o=document.querySelector(".mobile-change-skin");window.addEventListener("scroll",()=>{document.documentElement.scrollTop>e?(t==null||t.classList.add("cd-is-visible"),n.style.bottom="0",t.offsetHeight>window.innerHeight?t.style.top=`${window.innerHeight-t.offsetHeight-e}px`:t.style.top="0"):(t.style.top="-900px",t==null||t.classList.remove("cd-is-visible"),n.style.bottom="-100px"),document.documentElement.scrollTop>0?(i.classList.add("cd-is-visible"),o.classList.add("cd-is-visible")):(i.classList.remove("cd-is-visible"),o.classList.remove("cd-is-visible"))})}registerBackToTopEvent(){document.querySelectorAll(".cd-top, .m-cd-top").forEach(t=>{t.addEventListener("click",i=>{i.preventDefault(),window.pageYOffset>0&&window.scrollTo({top:0,behavior:"smooth"})})})}registerCopyEvent(){he.addEventListener("copy",()=>{S.$toast&&S.$toast.create(S.translate("common.events.copy","复制成功!
Copied to clipboard successfully!"),2e3)},2e3)}registerCodeBlockZoomEvent(){document.querySelectorAll("pre").forEach(t=>{t.addEventListener("dblclick",i=>{var n;i.target===t&&(t.classList.toggle("code-block-fullscreen"),(n=document.querySelector("html"))==null||n.classList.toggle("code-block-fullscreen-html-scroll"))})})}registerNavigationChangeEvent(){window.addEventListener("hashchange",e=>{if(e.oldURL.includes("#gallery-"))return;const i=location.hash.substring(1);if(!i.match(/^[A-z0-9_-]+$/))return;const n=document.getElementById(i);n&&(n.tagName.match(/^(?:a|select|input|button|textarea)$/i)||(n.tabIndex=-1),n.focus())},!1)}registerMobileNav(){var t,i;const e=document.querySelectorAll(".container, .site-nav-toggle, .site-sidebar");(t=document.querySelector(".nav-toggle"))==null||t.addEventListener("click",()=>{e.forEach(n=>{n.classList.add("open")})}),(i=document.querySelector(".site-sidebar"))==null||i.addEventListener("click",()=>{e.forEach(n=>{n.classList.remove("open")})})}registerHeaderEvent(){let t=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;window.addEventListener("scroll",()=>{const i=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,n=document.querySelector(".site-header");i===0?n==null||n.classList.remove("yya"):n==null||n.classList.add("yya"),i>t?n==null||n.classList.remove("sabit"):n==null||n.classList.add("sabit"),t=i,j(()=>import("./assets/nprogress-2b5a08a9.js").then(o=>o.n),["assets/nprogress-2b5a08a9.js","assets/_commonjsHelpers-042e6b4d.js"]).then(o=>{o.default.configure({minimum:0,template:`
-
`});const a=document.documentElement.scrollHeight-document.documentElement.clientHeight,s=i/a;o.default.set(s)})})}registerPostListPaginationEvent(){const e=document.getElementById("pagination");if(!e)return;const t=e.querySelector("a");t&&t.addEventListener("click",i=>{i.preventDefault();const n=document.getElementById("main");if(!n)return;const o=i.target,a=o.href;return o.classList.add("loading"),o.textContent="",fetch(a,{method:"GET"}).then(s=>s.text()).then(s=>{const l=new DOMParser().parseFromString(s,"text/html"),c=l.querySelectorAll("#main .post");c&&c.length>0&&c.forEach(g=>{n.appendChild(g)}),S.$pjax&&S.$pjax.refresh(n);const f=l.querySelector("#pagination a");f?o.href=f.href:e.innerHTML=`${S.translate("page.theend","没有更多文章了")}`}).catch(s=>{console.error(s)}).finally(()=>{o.classList.remove("loading"),o.textContent=S.translate("page.next","下一页"),S.$localize&&S.$localize(".post")}),!1})}registerThemeChangeEvent(){document.querySelectorAll(".theme-change-js").forEach(t=>{t.addEventListener("click",()=>{var i;(i=document.querySelector(".skin-menu"))==null||i.classList.toggle("show")})})}registerThemeItemClickEventAndDefaultTheme(){const e=document.querySelector(".skin-menu"),t=e==null?void 0:e.querySelectorAll(".skin-menu .menu-item");t==null||t.forEach(i=>{const n=JSON.parse(i.getAttribute("data-item")||"{}");n.bg_isdefault&&this.registerThemeRevert(n),i.addEventListener("click",()=>{this.registerThemeRevert(n),localStorage.setItem("sakuraTheme",JSON.stringify(n)),e==null||e.classList.remove("show"),localStorage.setItem("systemMode","false")})}),he.addEventListener("scroll",()=>{e==null||e.classList.remove("show")},200)}registerThemeRevert(e){if(!e){const i=localStorage.getItem("sakuraTheme");if(!i)return;e=JSON.parse(i)}const t=document.querySelector("body");switch(e!=null&&e.bg_url?t.style.backgroundImage=`url(${e==null?void 0:e.bg_url})`:t.style.backgroundImage="",e!=null&&e.bg_night?t.classList.add("dark"):t.classList.remove("dark"),e==null?void 0:e.bg_img_strategy){case"cover":t.style.backgroundSize="cover";break;case"no-repeat":case"repeat":t.style.backgroundRepeat=e.bg_img_strategy;break;default:t.style.backgroundSize="auto",t.style.backgroundRepeat="auto";break}}registerSystemDarkModeChangeEvent(){const e=document.querySelector("body"),t=localStorage.getItem("systemMode"),i=window.matchMedia("(prefers-color-scheme: dark)");(!t||t==="true")&&(i.matches?e.classList.add("dark"):e.classList.remove("dark")),window.matchMedia("(prefers-color-scheme: dark)").onchange=n=>{n.matches?e.classList.add("dark"):e.classList.remove("dark"),localStorage.setItem("systemMode","true")}}}A([P(!1)],N.prototype,"searchModal",1);A([P(!1)],N.prototype,"registerScrollEvent",1);A([P(!1)],N.prototype,"registerBackToTopEvent",1);A([P(!1)],N.prototype,"registerCopyEvent",1);A([P()],N.prototype,"registerCodeBlockZoomEvent",1);A([P(!1)],N.prototype,"registerNavigationChangeEvent",1);A([P(!1)],N.prototype,"registerMobileNav",1);A([P(!1)],N.prototype,"registerHeaderEvent",1);A([P()],N.prototype,"registerPostListPaginationEvent",1);A([P(!1)],N.prototype,"registerThemeChangeEvent",1);A([P(!1)],N.prototype,"registerThemeItemClickEventAndDefaultTheme",1);A([P(!1)],N.prototype,"registerThemeRevert",1);A([P(!1)],N.prototype,"registerSystemDarkModeChangeEvent",1);var vr=Object.defineProperty,yr=Object.getOwnPropertyDescriptor,W=(r,e,t,i)=>{for(var n=i>1?void 0:i?yr(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(n=(i?a(e,t,n):a(n))||n);return i&&n&&vr(e,t,n),n};class Q{loadHeaderAnimationCss(){const e=document.querySelectorAll(".menu-item .animation");e&&e.length>0&&j(()=>Promise.resolve({}),["css/font-awesome-animation.min.min.css"])}registerFixedAPlayer(){var u,l,c,f,g;if(!((u=S.getThemeConfig("additional","aplayer_float",Boolean))==null?void 0:u.valueOf()))return;const t=(l=S.getThemeConfig("additional","aplayer_host",String))==null?void 0:l.valueOf(),i=(c=S.getThemeConfig("additional","aplayer_server",String))==null?void 0:c.valueOf(),n=(f=S.getThemeConfig("additional","aplayer_type",String))==null?void 0:f.valueOf(),o=(g=S.getThemeConfig("additional","aplayer_id",String))==null?void 0:g.valueOf(),a=`${t}?server=${i}&type=${n}&id=${o}&r=${Math.random()}`;fetch(a).then(d=>d.json()).then(d=>{j(()=>import("./assets/APlayer.min-1b5a4167.js").then(h=>h.A),["assets/APlayer.min-1b5a4167.js","assets/_commonjsHelpers-042e6b4d.js"]).then(async h=>{var b,w,x,O,k,T;await j(()=>Promise.resolve({}),["css/APlayer.min.min.css"]);const v=h.default,y=s(),m={container:y,mini:!0,fixed:!0,autoplay:((b=S.getThemeConfig("additional","aplayer_autoplay",Boolean))==null?void 0:b.valueOf())||!1,mutex:!0,lrcType:3,preload:((w=S.getThemeConfig("additional","aplayer_preload",String))==null?void 0:w.valueOf())||"auto",theme:((x=S.getThemeConfig("additional","aplayer_theme",String))==null?void 0:x.valueOf())||"#2980b9",loop:"all",order:((O=S.getThemeConfig("additional","aplayer_order",String))==null?void 0:O.valueOf())||"list",volume:((k=S.getThemeConfig("additional","aplayer_volume",Number))==null?void 0:k.valueOf())||null,listFolded:!1,listMaxHeight:"250px",customAudioType:null,storageName:"sakura",audio:{}};m.audio=d;const p=new v(m);p.lrc.hide(),(T=y.querySelector(".aplayer-body"))==null||T.classList.add("ap-hover"),y.addEventListener("click",()=>{p.lrc.show()},{once:!0})})}).catch(d=>{console.error("APlayer API Error: ",d)});const s=()=>{if(document.querySelector("#aplayer-float"))return document.querySelector("#aplayer-float");const d=document.createElement("div");return d.id="aplayer-float",d.classList.add("aplayer"),d.classList.add("aplayer-float"),document.body.appendChild(d),d}}registerHeaderClass(){const e=document.querySelector(".container");S.getPageConfig("_templateId")==="index"?e.classList.add("is-homepage"):e.classList.remove("is-homepage")}wrapTableWithBox(){const e=document.querySelector(".entry-content"),t=e==null?void 0:e.querySelectorAll("table");t==null||t.forEach(i=>{var o,a;if((o=i.parentElement)!=null&&o.classList.contains("table-wrapper"))return;const n=document.createElement("div");n.classList.add("table-wrapper"),(a=i.parentNode)==null||a.insertBefore(n,i),n.appendChild(i)})}wrapWithFancybox(){const e=document.querySelectorAll(".fancybox-content");e==null||e.forEach(t=>{t.classList.contains("gallery")||(this.wrapImageWithBox(t),this.wrapVideoWithBox(t),j(()=>import("./assets/index.esm-e5442572.js"),[]).then(async i=>{await j(()=>Promise.resolve({}),["css/fancybox.min.css"]),await i.Fancybox.bind(t,'[data-fancybox="gallery"]')}))})}wrapVideoWithBox(e){const t=e==null?void 0:e.querySelectorAll("video");t&&t.forEach(i=>{this.buildFancybox(i).classList.add("video-wrapper")})}wrapImageWithBox(e){const t=e==null?void 0:e.querySelectorAll("img:not(.avatar)");t&&t.forEach(i=>{this.buildFancybox(i).classList.add("image-wrapper")})}buildFancybox(e){var i;const t=document.createElement("a");return t.setAttribute("data-fancybox","gallery"),e.getAttribute("data-src")?t.setAttribute("href",e.getAttribute("data-src")||""):t.setAttribute("href",e.getAttribute("src")||""),(i=e.parentNode)==null||i.insertBefore(t,e),e.classList.add("gallery"),t.appendChild(e),t}registerHighlight(){document.querySelectorAll("pre").forEach(t=>{t.classList.add("highlight-wrap"),t.setAttribute("autocomplete","off"),t.setAttribute("autocorrect","off"),t.setAttribute("autocapitalize","off"),t.setAttribute("spellcheck","false"),t.setAttribute("contenteditable","false");const i=t.querySelector("code");j(()=>import("./assets/index-c0aec26a.js"),["assets/index-c0aec26a.js","assets/_commonjsHelpers-042e6b4d.js"]).then(async n=>{var u;let o="";if(i.classList.forEach(l=>{l.startsWith("language-")&&(o=l.replace("language-",""))}),!n.default.getLanguage(o)){i.classList.remove(`language-${o}`);const l=n.default.highlightAuto(i.textContent||"");l.language?o=l.language:o="text",i.classList.add(`language-${o}`)}if(i.setAttribute("data-rel",o.toUpperCase()),i.classList.add(o.toLowerCase()),n.default.highlightElement(i),(u=S.getThemeConfig("post","code_line",Boolean))==null?void 0:u.valueOf()){const l=await j(()=>import("./libs/highlightjs-line-numbers.min.js"),[]);l.registerHljsLineNumbers(n.default),l.injectHljsLineNumbersCss(),n.default.lineNumbersBlock(i)}})})}registerCopyCode(){document.querySelectorAll("pre code").forEach(t=>{const i=document.createElement("span");i.classList.add("copy-code"),i.setAttribute("title",S.translate("common.copy_code","复制代码")),i.innerHTML='',t.after(i),j(()=>import("./assets/clipboard-8ef9d310.js").then(n=>n.c),["assets/clipboard-8ef9d310.js","assets/_commonjsHelpers-042e6b4d.js"]).then(n=>{new n.default(i,{target:()=>t})})})}registerToc(){const e=document.querySelectorAll(".toc-container"),t=75;e==null||e.forEach(i=>{j(()=>import("./assets/index-5fe31283.js").then(n=>n.i),["assets/index-5fe31283.js","assets/_commonjsHelpers-042e6b4d.js"]).then(n=>{var u;const o=i.querySelector(".toc"),a=i.getBoundingClientRect().top+window.pageYOffset,s=(u=S.getThemeConfig("post","toc_depth",Number))==null?void 0:u.valueOf();o&&n.default.init({tocElement:o,contentSelector:[".entry-content",".links"],headingSelector:"h1, h2, h3, h4, h5",collapseDepth:s,scrollSmooth:!0,headingsOffset:-(a-t),scrollSmoothOffset:-t,disableTocScrollSync:!0})})})}}W([P(!1)],Q.prototype,"loadHeaderAnimationCss",1);W([P(!1)],Q.prototype,"registerFixedAPlayer",1);W([P()],Q.prototype,"registerHeaderClass",1);W([P()],Q.prototype,"wrapTableWithBox",1);W([P()],Q.prototype,"wrapWithFancybox",1);W([P()],Q.prototype,"registerHighlight",1);W([P()],Q.prototype,"registerCopyCode",1);W([P()],Q.prototype,"registerToc",1);/** + `});const a=document.documentElement.scrollHeight-document.documentElement.clientHeight,s=i/a;o.default.set(s)})})}registerPostListPaginationEvent(){const e=document.getElementById("pagination");if(!e)return;const t=e.querySelector("a");t&&t.addEventListener("click",i=>{i.preventDefault();const n=document.getElementById("main");if(!n)return;const o=i.target,a=o.href;return o.classList.add("loading"),o.textContent="",fetch(a,{method:"GET"}).then(s=>s.text()).then(s=>{const f=new DOMParser().parseFromString(s,"text/html"),c=f.querySelectorAll("#main .post");c&&c.length>0&&c.forEach(g=>{n.appendChild(g)}),S.$pjax&&S.$pjax.refresh(n);const l=f.querySelector("#pagination a");l?o.href=l.href:e.innerHTML=`${S.translate("page.theend","没有更多文章了")}`}).catch(s=>{console.error(s)}).finally(()=>{o.classList.remove("loading"),o.textContent=S.translate("page.next","下一页"),S.$localize&&S.$localize(".post")}),!1})}registerThemeChangeEvent(){document.querySelectorAll(".theme-change-js").forEach(t=>{t.addEventListener("click",()=>{var i;(i=document.querySelector(".skin-menu"))==null||i.classList.toggle("show")})})}registerThemeItemClickEventAndDefaultTheme(){const e=document.querySelector(".skin-menu"),t=e==null?void 0:e.querySelectorAll(".skin-menu .menu-item");t==null||t.forEach(i=>{const n=JSON.parse(i.getAttribute("data-item")||"{}");n.bg_isdefault&&this.registerThemeRevert(n),i.addEventListener("click",()=>{this.registerThemeRevert(n),localStorage.setItem("sakuraTheme",JSON.stringify(n)),e==null||e.classList.remove("show"),localStorage.setItem("systemMode","false")})}),he.addEventListener("scroll",()=>{e==null||e.classList.remove("show")},200)}registerThemeRevert(e){if(!e){const i=localStorage.getItem("sakuraTheme");if(!i)return;e=JSON.parse(i)}const t=document.querySelector("body");switch(e!=null&&e.bg_url?t.style.backgroundImage=`url(${e==null?void 0:e.bg_url})`:t.style.backgroundImage="",e!=null&&e.bg_night?t.classList.add("dark"):t.classList.remove("dark"),e==null?void 0:e.bg_img_strategy){case"cover":t.style.backgroundSize="cover";break;case"no-repeat":case"repeat":t.style.backgroundRepeat=e.bg_img_strategy;break;default:t.style.backgroundSize="auto",t.style.backgroundRepeat="auto";break}}registerSystemDarkModeChangeEvent(){const e=document.querySelector("body"),t=localStorage.getItem("systemMode"),i=window.matchMedia("(prefers-color-scheme: dark)");(!t||t==="true")&&(i.matches?e.classList.add("dark"):e.classList.remove("dark")),window.matchMedia("(prefers-color-scheme: dark)").onchange=n=>{n.matches?e.classList.add("dark"):e.classList.remove("dark"),localStorage.setItem("systemMode","true")}}}A([P(!1)],N.prototype,"searchModal",1);A([P(!1)],N.prototype,"registerScrollEvent",1);A([P(!1)],N.prototype,"registerBackToTopEvent",1);A([P(!1)],N.prototype,"registerCopyEvent",1);A([P()],N.prototype,"registerCodeBlockZoomEvent",1);A([P(!1)],N.prototype,"registerNavigationChangeEvent",1);A([P(!1)],N.prototype,"registerMobileNav",1);A([P(!1)],N.prototype,"registerHeaderEvent",1);A([P()],N.prototype,"registerPostListPaginationEvent",1);A([P(!1)],N.prototype,"registerThemeChangeEvent",1);A([P(!1)],N.prototype,"registerThemeItemClickEventAndDefaultTheme",1);A([P(!1)],N.prototype,"registerThemeRevert",1);A([P(!1)],N.prototype,"registerSystemDarkModeChangeEvent",1);var vr=Object.defineProperty,yr=Object.getOwnPropertyDescriptor,W=(r,e,t,i)=>{for(var n=i>1?void 0:i?yr(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(n=(i?a(e,t,n):a(n))||n);return i&&n&&vr(e,t,n),n};class Q{loadHeaderAnimationCss(){const e=document.querySelectorAll(".menu-item .animation");e&&e.length>0&&j(()=>Promise.resolve({}),["css/font-awesome-animation.min.min.css"])}registerFixedAPlayer(){var u,f,c,l,g;if(!((u=S.getThemeConfig("additional","aplayer_float",Boolean))==null?void 0:u.valueOf()))return;const t=(f=S.getThemeConfig("additional","aplayer_host",String))==null?void 0:f.valueOf(),i=(c=S.getThemeConfig("additional","aplayer_server",String))==null?void 0:c.valueOf(),n=(l=S.getThemeConfig("additional","aplayer_type",String))==null?void 0:l.valueOf(),o=(g=S.getThemeConfig("additional","aplayer_id",String))==null?void 0:g.valueOf(),a=`${t}?server=${i}&type=${n}&id=${o}&r=${Math.random()}`;fetch(a).then(d=>d.json()).then(d=>{j(()=>import("./assets/APlayer.min-1b5a4167.js").then(h=>h.A),["assets/APlayer.min-1b5a4167.js","assets/_commonjsHelpers-042e6b4d.js"]).then(async h=>{var b,w,x,O,k,T;await j(()=>Promise.resolve({}),["css/APlayer.min.min.css"]);const v=h.default,y=s(),p={container:y,mini:!0,fixed:!0,autoplay:((b=S.getThemeConfig("additional","aplayer_autoplay",Boolean))==null?void 0:b.valueOf())||!1,mutex:!0,lrcType:3,preload:((w=S.getThemeConfig("additional","aplayer_preload",String))==null?void 0:w.valueOf())||"auto",theme:((x=S.getThemeConfig("additional","aplayer_theme",String))==null?void 0:x.valueOf())||"#2980b9",loop:"all",order:((O=S.getThemeConfig("additional","aplayer_order",String))==null?void 0:O.valueOf())||"list",volume:((k=S.getThemeConfig("additional","aplayer_volume",Number))==null?void 0:k.valueOf())||null,listFolded:!1,listMaxHeight:"250px",customAudioType:null,storageName:"sakura",audio:{}};p.audio=d;const m=new v(p);m.lrc.hide(),(T=y.querySelector(".aplayer-body"))==null||T.classList.add("ap-hover"),y.addEventListener("click",()=>{m.lrc.show()},{once:!0})})}).catch(d=>{console.error("APlayer API Error: ",d)});const s=()=>{if(document.querySelector("#aplayer-float"))return document.querySelector("#aplayer-float");const d=document.createElement("div");return d.id="aplayer-float",d.classList.add("aplayer"),d.classList.add("aplayer-float"),document.body.appendChild(d),d}}registerHeaderClass(){const e=document.querySelector(".container");S.getPageConfig("_templateId")==="index"?e.classList.add("is-homepage"):e.classList.remove("is-homepage")}wrapTableWithBox(){const e=document.querySelector(".entry-content"),t=e==null?void 0:e.querySelectorAll("table");t==null||t.forEach(i=>{var o,a;if((o=i.parentElement)!=null&&o.classList.contains("table-wrapper"))return;const n=document.createElement("div");n.classList.add("table-wrapper"),(a=i.parentNode)==null||a.insertBefore(n,i),n.appendChild(i)})}wrapWithFancybox(){const e=document.querySelectorAll(".fancybox-content");e==null||e.forEach(t=>{t.classList.contains("gallery")||(this.wrapImageWithBox(t),this.wrapVideoWithBox(t),j(()=>import("./assets/index.esm-e5442572.js"),[]).then(async i=>{await j(()=>Promise.resolve({}),["css/fancybox.min.css"]),await i.Fancybox.bind(t,'[data-fancybox="gallery"]')}))})}wrapVideoWithBox(e){const t=e==null?void 0:e.querySelectorAll("video");t&&t.forEach(i=>{this.buildFancybox(i).classList.add("video-wrapper")})}wrapImageWithBox(e){const t=e==null?void 0:e.querySelectorAll("img:not(.avatar)");t&&t.forEach(i=>{this.buildFancybox(i).classList.add("image-wrapper")})}buildFancybox(e){var i;const t=document.createElement("a");return t.setAttribute("data-fancybox","gallery"),e.getAttribute("data-src")?t.setAttribute("href",e.getAttribute("data-src")||""):t.setAttribute("href",e.getAttribute("src")||""),(i=e.parentNode)==null||i.insertBefore(t,e),e.classList.add("gallery"),t.appendChild(e),t}registerHighlight(){document.querySelectorAll("pre").forEach(t=>{t.classList.add("highlight-wrap"),t.setAttribute("autocomplete","off"),t.setAttribute("autocorrect","off"),t.setAttribute("autocapitalize","off"),t.setAttribute("spellcheck","false"),t.setAttribute("contenteditable","false");const i=t.querySelector("code");j(()=>import("./assets/index-c0aec26a.js"),["assets/index-c0aec26a.js","assets/_commonjsHelpers-042e6b4d.js"]).then(async n=>{var u;let o="";if(i.classList.forEach(f=>{f.startsWith("language-")&&(o=f.replace("language-",""))}),!n.default.getLanguage(o)){i.classList.remove(`language-${o}`);const f=n.default.highlightAuto(i.textContent||"");f.language?o=f.language:o="text",i.classList.add(`language-${o}`)}if(i.setAttribute("data-rel",o.toUpperCase()),i.classList.add(o.toLowerCase()),n.default.highlightElement(i),(u=S.getThemeConfig("post","code_line",Boolean))==null?void 0:u.valueOf()){const f=await j(()=>import("./libs/highlightjs-line-numbers.min.js"),[]);f.registerHljsLineNumbers(n.default),f.injectHljsLineNumbersCss(),n.default.lineNumbersBlock(i)}})})}registerCopyCode(){document.querySelectorAll("pre code").forEach(t=>{const i=document.createElement("span");i.classList.add("copy-code"),i.setAttribute("title",S.translate("common.copy_code","复制代码")),i.innerHTML='',t.after(i),j(()=>import("./assets/clipboard-8ef9d310.js").then(n=>n.c),["assets/clipboard-8ef9d310.js","assets/_commonjsHelpers-042e6b4d.js"]).then(n=>{new n.default(i,{target:()=>t})})})}registerToc(){const e=document.querySelectorAll(".toc-container"),t=75;e==null||e.forEach(i=>{j(()=>import("./assets/index-5fe31283.js").then(n=>n.i),["assets/index-5fe31283.js","assets/_commonjsHelpers-042e6b4d.js"]).then(n=>{var u;const o=i.querySelector(".toc"),a=i.getBoundingClientRect().top+window.pageYOffset,s=(u=S.getThemeConfig("post","toc_depth",Number))==null?void 0:u.valueOf();o&&n.default.init({tocElement:o,contentSelector:[".entry-content",".links"],headingSelector:"h1, h2, h3, h4, h5",collapseDepth:s,scrollSmooth:!0,headingsOffset:-(a-t),scrollSmoothOffset:-t,disableTocScrollSync:!0})})})}}W([P(!1)],Q.prototype,"loadHeaderAnimationCss",1);W([P(!1)],Q.prototype,"registerFixedAPlayer",1);W([P()],Q.prototype,"registerHeaderClass",1);W([P()],Q.prototype,"wrapTableWithBox",1);W([P()],Q.prototype,"wrapWithFancybox",1);W([P()],Q.prototype,"registerHighlight",1);W([P()],Q.prototype,"registerCopyCode",1);W([P()],Q.prototype,"registerToc",1);/** * (c) Iconify * * For the full copyright and license information, please view the license.txt or license.gpl.txt @@ -11,5 +11,5 @@ var cr=Object.defineProperty;var lr=(r,e,t)=>e in r?cr(r,e,{enumerable:!0,config * * @license MIT * @version 3.1.0 -*/const pn=Object.freeze({left:0,top:0,width:16,height:16}),Ae=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Se=Object.freeze({...pn,...Ae}),nt=Object.freeze({...Se,body:"",hidden:!1});function br(r,e){const t={};!r.hFlip!=!e.hFlip&&(t.hFlip=!0),!r.vFlip!=!e.vFlip&&(t.vFlip=!0);const i=((r.rotate||0)+(e.rotate||0))%4;return i&&(t.rotate=i),t}function _t(r,e){const t=br(r,e);for(const i in nt)i in Ae?i in r&&!(i in t)&&(t[i]=Ae[i]):i in e?t[i]=e[i]:i in r&&(t[i]=r[i]);return t}function Sr(r,e){const t=r.icons,i=r.aliases||Object.create(null),n=Object.create(null);function o(a){if(t[a])return n[a]=[];if(!(a in n)){n[a]=null;const s=i[a]&&i[a].parent,u=s&&o(s);u&&(n[a]=[s].concat(u))}return n[a]}return(e||Object.keys(t).concat(Object.keys(i))).forEach(o),n}function wr(r,e,t){const i=r.icons,n=r.aliases||Object.create(null);let o={};function a(s){o=_t(i[s]||n[s],o)}return a(e),t.forEach(a),_t(r,o)}function mn(r,e){const t=[];if(typeof r!="object"||typeof r.icons!="object")return t;r.not_found instanceof Array&&r.not_found.forEach(n=>{e(n,null),t.push(n)});const i=Sr(r);for(const n in i){const o=i[n];o&&(e(n,wr(r,n,o)),t.push(n))}return t}const pe=/^[a-z0-9]+(-[a-z0-9]+)*$/,ie=(r,e,t,i="")=>{const n=r.split(":");if(r.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),u=n.pop(),l={provider:n.length>0?n[0]:i,prefix:u,name:s};return e&&!Ie(l)?null:l}const o=n[0],a=o.split("-");if(a.length>1){const s={provider:i,prefix:a.shift(),name:a.join("-")};return e&&!Ie(s)?null:s}if(t&&i===""){const s={provider:i,prefix:"",name:o};return e&&!Ie(s,t)?null:s}return null},Ie=(r,e)=>r?!!((r.provider===""||r.provider.match(pe))&&(e&&r.prefix===""||r.prefix.match(pe))&&r.name.match(pe)):!1,Or={provider:"",aliases:{},not_found:{},...pn};function Ye(r,e){for(const t in e)if(t in r&&typeof r[t]!=typeof e[t])return!1;return!0}function vn(r){if(typeof r!="object"||r===null)return null;const e=r;if(typeof e.prefix!="string"||!r.icons||typeof r.icons!="object"||!Ye(r,Or))return null;const t=e.icons;for(const n in t){const o=t[n];if(!n.match(pe)||typeof o.body!="string"||!Ye(o,nt))return null}const i=e.aliases||Object.create(null);for(const n in i){const o=i[n],a=o.parent;if(!n.match(pe)||typeof a!="string"||!t[a]&&!i[a]||!Ye(o,nt))return null}return e}const Ne=Object.create(null);function xr(r,e){return{provider:r,prefix:e,icons:Object.create(null),missing:new Set}}function H(r,e){const t=Ne[r]||(Ne[r]=Object.create(null));return t[e]||(t[e]=xr(r,e))}function pt(r,e){return vn(e)?mn(e,(t,i)=>{i?r.icons[t]=i:r.missing.add(t)}):[]}function kr(r,e,t){try{if(typeof t.body=="string")return r.icons[e]={...t},!0}catch{}return!1}function Lr(r,e){let t=[];return(typeof r=="string"?[r]:Object.keys(Ne)).forEach(n=>{(typeof n=="string"&&typeof e=="string"?[e]:Object.keys(Ne[n]||{})).forEach(a=>{const s=H(n,a);t=t.concat(Object.keys(s.icons).map(u=>(n!==""?"@"+n+":":"")+a+":"+u))})}),t}let ye=!1;function Pr(r){return typeof r=="boolean"&&(ye=r),ye}function we(r){const e=typeof r=="string"?ie(r,!0,ye):r;if(e){const t=H(e.provider,e.prefix),i=e.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}function yn(r,e){const t=ie(r,!0,ye);if(!t)return!1;const i=H(t.provider,t.prefix);return kr(i,t.name,e)}function bn(r,e){if(typeof r!="object")return!1;if(typeof e!="string"&&(e=r.provider||""),ye&&!e&&!r.prefix){let n=!1;return vn(r)&&(r.prefix="",mn(r,(o,a)=>{a&&yn(o,a)&&(n=!0)})),n}const t=r.prefix;if(!Ie({provider:e,prefix:t,name:"a"}))return!1;const i=H(e,t);return!!pt(i,r)}function Cr(r){return!!we(r)}function Er(r){const e=we(r);return e?{...Se,...e}:null}const Sn=Object.freeze({width:null,height:null}),wn=Object.freeze({...Sn,...Ae}),Tr=/(-?[0-9.]*[0-9]+[0-9.]*)/g,_r=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function rt(r,e,t){if(e===1)return r;if(t=t||100,typeof r=="number")return Math.ceil(r*e*t)/t;if(typeof r!="string")return r;const i=r.split(Tr);if(i===null||!i.length)return r;const n=[];let o=i.shift(),a=_r.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?n.push(o):n.push(Math.ceil(s*e*t)/t)}else n.push(o);if(o=i.shift(),o===void 0)return n.join("");a=!a}}const jr=r=>r==="unset"||r==="undefined"||r==="none";function He(r,e){const t={...Se,...r},i={...wn,...e},n={left:t.left,top:t.top,width:t.width,height:t.height};let o=t.body;[t,i].forEach(h=>{const v=[],y=h.hFlip,m=h.vFlip;let p=h.rotate;y?m?p+=2:(v.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),v.push("scale(-1 1)"),n.top=n.left=0):m&&(v.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),v.push("scale(1 -1)"),n.top=n.left=0);let b;switch(p<0&&(p-=Math.floor(p/4)*4),p=p%4,p){case 1:b=n.height/2+n.top,v.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:v.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:b=n.width/2+n.left,v.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}p%2===1&&(n.left!==n.top&&(b=n.left,n.left=n.top,n.top=b),n.width!==n.height&&(b=n.width,n.width=n.height,n.height=b)),v.length&&(o=''+o+"")});const a=i.width,s=i.height,u=n.width,l=n.height;let c,f;a===null?(f=s===null?"1em":s==="auto"?l:s,c=rt(f,u/l)):(c=a==="auto"?u:a,f=s===null?rt(c,l/u):s==="auto"?l:s);const g={},d=(h,v)=>{jr(v)||(g[h]=v.toString())};return d("width",c),d("height",f),g.viewBox=n.left.toString()+" "+n.top.toString()+" "+u.toString()+" "+l.toString(),{attributes:g,body:o}}const Ir=/\sid="(\S+)"/g,Rr="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ar=0;function On(r,e=Rr){const t=[];let i;for(;i=Ir.exec(r);)t.push(i[1]);if(!t.length)return r;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const a=typeof e=="function"?e(o):e+(Ar++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+n+"$3")}),r=r.replace(new RegExp(n,"g"),""),r}const G={local:!0,session:!0},xn={local:new Set,session:new Set};let mt=!1;function Nr(r){mt=r}const jt="iconify2",be="iconify",kn=be+"-count",It=be+"-version",Ln=36e5,Fr=168;function it(r,e){try{return r.getItem(e)}catch{}}function vt(r,e,t){try{return r.setItem(e,t),!0}catch{}}function Rt(r,e){try{r.removeItem(e)}catch{}}function ot(r,e){return vt(r,kn,e.toString())}function at(r){return parseInt(it(r,kn))||0}let Ee=typeof window>"u"?{}:window;function Pn(r){const e=r+"Storage";try{if(Ee&&Ee[e]&&typeof Ee[e].length=="number")return Ee[e]}catch{}G[r]=!1}function Cn(r,e){const t=Pn(r);if(!t)return;const i=it(t,It);if(i!==jt){if(i){const s=at(t);for(let u=0;u{const u=be+s.toString(),l=it(t,u);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>n&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&e(c,s))return!0}catch{}Rt(t,u)}};let a=at(t);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,ot(t,a)):xn[r].add(s))}function En(){if(!mt){Nr(!0);for(const r in G)Cn(r,e=>{const t=e.data,i=e.provider,n=t.prefix,o=H(i,n);if(!pt(o,t).length)return!1;const a=t.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Tn(r,e){switch(r){case"local":case"session":G[r]=e;break;case"all":for(const t in G)G[t]=e;break}}const st=Object.create(null);function _n(r,e){st[r]=e}function ut(r){return st[r]||st[""]}function yt(r){let e;if(typeof r.resources=="string")e=[r.resources];else if(e=r.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:r.path||"/",maxURL:r.maxURL||500,rotate:r.rotate||750,timeout:r.timeout||5e3,random:r.random===!0,index:r.index||0,dataAfterTimeout:r.dataAfterTimeout!==!1}}const Be=Object.create(null),ce=["https://api.simplesvg.com","https://api.unisvg.com"],Re=[];for(;ce.length>0;)ce.length===1||Math.random()>.5?Re.push(ce.shift()):Re.push(ce.pop());Be[""]=yt({resources:["https://api.iconify.design"].concat(Re)});function jn(r,e){const t=yt(e);return t===null?!1:(Be[r]=t,!0)}function Ve(r){return Be[r]}function qr(){return Object.keys(Be)}const Dr=()=>{let r;try{if(r=fetch,typeof r=="function")return r}catch{}};let Fe=Dr();function Mr(r){Fe=r}function $r(){return Fe}function Hr(r,e){const t=Ve(r);if(!t)return 0;let i;if(!t.maxURL)i=0;else{let n=0;t.resources.forEach(a=>{n=Math.max(n,a.length)});const o=e+".json?icons=";i=t.maxURL-n-t.path.length-o.length}return i}function Br(r){return r===404}const Vr=(r,e,t)=>{const i=[],n=Hr(r,e),o="icons";let a={type:o,provider:r,prefix:e,icons:[]},s=0;return t.forEach((u,l)=>{s+=u.length+1,s>=n&&l>0&&(i.push(a),a={type:o,provider:r,prefix:e,icons:[]},s=u.length),a.icons.push(u)}),i.push(a),i};function Ur(r){if(typeof r=="string"){const e=Ve(r);if(e)return e.path}return"/"}const zr=(r,e,t)=>{if(!Fe){t("abort",424);return}let i=Ur(e.provider);switch(e.type){case"icons":{const o=e.prefix,s=e.icons.join(","),u=new URLSearchParams({icons:s});i+=o+".json?"+u.toString();break}case"custom":{const o=e.uri;i+=o.slice(0,1)==="/"?o.slice(1):o;break}default:t("abort",400);return}let n=503;Fe(r+i).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{t(Br(a)?"abort":"next",a)});return}return n=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?t("abort",o):t("next",n)});return}setTimeout(()=>{t("success",o)})}).catch(()=>{t("next",n)})},Kr={prepare:Vr,send:zr};function Jr(r){const e={loaded:[],missing:[],pending:[]},t=Object.create(null);r.sort((n,o)=>n.provider!==o.provider?n.provider.localeCompare(o.provider):n.prefix!==o.prefix?n.prefix.localeCompare(o.prefix):n.name.localeCompare(o.name));let i={provider:"",prefix:"",name:""};return r.forEach(n=>{if(i.name===n.name&&i.prefix===n.prefix&&i.provider===n.provider)return;i=n;const o=n.provider,a=n.prefix,s=n.name,u=t[o]||(t[o]=Object.create(null)),l=u[a]||(u[a]=H(o,a));let c;s in l.icons?c=e.loaded:a===""||l.missing.has(s)?c=e.missing:c=e.pending;const f={provider:o,prefix:a,name:s};c.push(f)}),e}function In(r,e){r.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(n=>n.id!==e))})}function Wr(r){r.pendingCallbacksFlag||(r.pendingCallbacksFlag=!0,setTimeout(()=>{r.pendingCallbacksFlag=!1;const e=r.loaderCallbacks?r.loaderCallbacks.slice(0):[];if(!e.length)return;let t=!1;const i=r.provider,n=r.prefix;e.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(u=>{if(u.prefix!==n)return!0;const l=u.name;if(r.icons[l])a.loaded.push({provider:i,prefix:n,name:l});else if(r.missing.has(l))a.missing.push({provider:i,prefix:n,name:l});else return t=!0,!0;return!1}),a.pending.length!==s&&(t||In([r],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Qr=0;function Gr(r,e,t){const i=Qr++,n=In.bind(null,t,i);if(!e.pending.length)return n;const o={id:i,icons:e,callback:r,abort:n};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),n}function Yr(r,e=!0,t=!1){const i=[];return r.forEach(n=>{const o=typeof n=="string"?ie(n,e,t):n;o&&i.push(o)}),i}var Zr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Xr(r,e,t,i){const n=r.resources.length,o=r.random?Math.floor(Math.random()*n):r.index;let a;if(r.random){let O=r.resources.slice(0);for(a=[];O.length>1;){const k=Math.floor(Math.random()*O.length);a.push(O[k]),O=O.slice(0,k).concat(O.slice(k+1))}a=a.concat(O)}else a=r.resources.slice(o).concat(r.resources.slice(0,o));const s=Date.now();let u="pending",l=0,c,f=null,g=[],d=[];typeof i=="function"&&d.push(i);function h(){f&&(clearTimeout(f),f=null)}function v(){u==="pending"&&(u="aborted"),h(),g.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),g=[]}function y(O,k){k&&(d=[]),typeof O=="function"&&d.push(O)}function m(){return{startTime:s,payload:e,status:u,queriesSent:l,queriesPending:g.length,subscribe:y,abort:v}}function p(){u="failed",d.forEach(O=>{O(void 0,c)})}function b(){g.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),g=[]}function w(O,k,T){const D=k!=="success";switch(g=g.filter(_=>_!==O),u){case"pending":break;case"failed":if(D||!r.dataAfterTimeout)return;break;default:return}if(k==="abort"){c=T,p();return}if(D){c=T,g.length||(a.length?x():p());return}if(h(),b(),!r.random){const _=r.resources.indexOf(O.resource);_!==-1&&_!==r.index&&(r.index=_)}u="completed",d.forEach(_=>{_(T)})}function x(){if(u!=="pending")return;h();const O=a.shift();if(O===void 0){if(g.length){f=setTimeout(()=>{h(),u==="pending"&&(b(),p())},r.timeout);return}p();return}const k={status:"pending",resource:O,callback:(T,D)=>{w(k,T,D)}};g.push(k),l++,f=setTimeout(x,r.rotate),t(O,e,k.callback)}return setTimeout(x),m}function Rn(r){const e={...Zr,...r};let t=[];function i(){t=t.filter(s=>s().status==="pending")}function n(s,u,l){const c=Xr(e,s,u,(f,g)=>{i(),l&&l(f,g)});return t.push(c),c}function o(s){return t.find(u=>s(u))||null}return{query:n,find:o,setIndex:s=>{e.index=s},getIndex:()=>e.index,cleanup:i}}function At(){}const Ze=Object.create(null);function ei(r){if(!Ze[r]){const e=Ve(r);if(!e)return;const t=Rn(e),i={config:e,redundancy:t};Ze[r]=i}return Ze[r]}function An(r,e,t){let i,n;if(typeof r=="string"){const o=ut(r);if(!o)return t(void 0,424),At;n=o.send;const a=ei(r);a&&(i=a.redundancy)}else{const o=yt(r);if(o){i=Rn(o);const a=r.resources?r.resources[0]:"",s=ut(a);s&&(n=s.send)}}return!i||!n?(t(void 0,424),At):i.query(e,n,t)().abort}function ti(r,e){const t=r.lastModifiedCached;if(t&&t>=e)return t===e;if(r.lastModifiedCached=e,t)for(const i in G)Cn(i,n=>{const o=n.data;return n.provider!==r.provider||o.prefix!==r.prefix||o.lastModified===e});return!0}function ni(r,e){mt||En();function t(i){let n;if(!G[i]||!(n=Pn(i)))return;const o=xn[i];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=at(n),!ot(n,a+1))return;const s={cached:Math.floor(Date.now()/Ln),provider:r.provider,data:e};return vt(n,be+a.toString(),JSON.stringify(s))}e.lastModified&&!ti(r,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),t("local")||t("session"))}function Nt(){}function ri(r){r.iconsLoaderFlag||(r.iconsLoaderFlag=!0,setTimeout(()=>{r.iconsLoaderFlag=!1,Wr(r)}))}function ii(r,e){r.iconsToLoad?r.iconsToLoad=r.iconsToLoad.concat(e).sort():r.iconsToLoad=e,r.iconsQueueFlag||(r.iconsQueueFlag=!0,setTimeout(()=>{r.iconsQueueFlag=!1;const{provider:t,prefix:i}=r,n=r.iconsToLoad;delete r.iconsToLoad;let o;if(!n||!(o=ut(t)))return;o.prepare(t,i,n).forEach(s=>{An(t,s,u=>{if(typeof u!="object")s.icons.forEach(l=>{r.missing.add(l)});else try{const l=pt(r,u);if(!l.length)return;const c=r.pendingIcons;c&&l.forEach(f=>{c.delete(f)}),ni(r,u)}catch(l){console.error(l)}ri(r)})})}))}const oi=r=>{const t=H(r.provider,r.prefix).pendingIcons;return!!(t&&t.has(r.name))},bt=(r,e)=>{const t=Yr(r,!0,Pr()),i=Jr(t);if(!i.pending.length){let u=!0;return e&&setTimeout(()=>{u&&e(i.loaded,i.missing,i.pending,Nt)}),()=>{u=!1}}const n=Object.create(null),o=[];let a,s;return i.pending.forEach(u=>{const{provider:l,prefix:c}=u;if(c===s&&l===a)return;a=l,s=c,o.push(H(l,c));const f=n[l]||(n[l]=Object.create(null));f[c]||(f[c]=[])}),i.pending.forEach(u=>{const{provider:l,prefix:c,name:f}=u,g=H(l,c),d=g.pendingIcons||(g.pendingIcons=new Set);d.has(f)||(d.add(f),n[l][c].push(f))}),o.forEach(u=>{const{provider:l,prefix:c}=u;n[l][c].length&&ii(u,n[l][c])}),e?Gr(e,i,o):Nt},ai=r=>new Promise((e,t)=>{const i=typeof r=="string"?ie(r,!0):r;if(!i){t(r);return}bt([i||r],n=>{if(n.length&&i){const o=we(i);if(o){e({...Se,...o});return}}t(r)})});function Nn(r,e){const t={...r};for(const i in e){const n=e[i],o=typeof n;i in Sn?(n===null||n&&(o==="string"||o==="number"))&&(t[i]=n):o===typeof t[i]&&(t[i]=i==="rotate"?n%4:n)}return t}const Ue={...wn,inline:!1},Xe="iconify",ct="iconify-inline",K="iconifyData"+Date.now();let Y=[];function Oe(r){for(let e=0;edocument.documentElement})}function ui(r){Y=Y.filter(e=>r!==e&&r!==(typeof e.node=="function"?e.node():e.node))}function xe(){return Y}function ci(r){const e=document;e.readyState&&e.readyState!=="loading"?r():e.addEventListener("DOMContentLoaded",r)}let me=null;const li={childList:!0,subtree:!0,attributes:!0};function qn(r){if(!r.observer)return;const e=r.observer;e.pendingScan||(e.pendingScan=setTimeout(()=>{delete e.pendingScan,me&&me(r)}))}function fi(r,e){if(!r.observer)return;const t=r.observer;if(!t.pendingScan)for(let i=0;i0||n.type==="attributes"&&n.target[K]!==void 0){t.paused||qn(r);return}}}function Dn(r,e){r.observer.instance.observe(e,li)}function qe(r){let e=r.observer;if(e&&e.instance)return;const t=typeof r.node=="function"?r.node():r.node;!t||!window||(e||(e={paused:0},r.observer=e),e.instance=new window.MutationObserver(fi.bind(null,r)),Dn(r,t),e.paused||qn(r))}function Ft(){xe().forEach(qe)}function Mn(r){if(!r.observer)return;const e=r.observer;e.pendingScan&&(clearTimeout(e.pendingScan),delete e.pendingScan),e.instance&&(e.instance.disconnect(),delete e.instance)}function di(r){const e=me!==null;if(me!==r&&(me=r,e&&xe().forEach(Mn)),e){Ft();return}ci(Ft)}function lt(r){(r?[r]:xe()).forEach(e=>{if(!e.observer){e.observer={paused:1};return}const t=e.observer;if(t.paused++,t.paused>1||!t.instance)return;t.instance.disconnect()})}function gi(r){if(r){const e=Oe(r);e&<(e)}else lt()}function ft(r){(r?[r]:xe()).forEach(e=>{if(!e.observer){qe(e);return}const t=e.observer;if(t.paused&&(t.paused--,!t.paused)){const i=typeof e.node=="function"?e.node():e.node;if(i)t.instance?Dn(e,i):qe(e);else return}})}function hi(r){if(r){const e=Oe(r);e&&ft(e)}else ft()}function $n(r,e=!1){const t=Fn(r,e);return qe(t),t}function Hn(r){const e=Oe(r);e&&(Mn(e),ui(r))}function pi(r,e){if(r.name!==e.name||r.mode!==e.mode)return!0;const t=r.customisations,i=e.customisations;for(const n in Ue)if(t[n]!==i[n])return!0;return!1}function mi(r,e=0){const t=r.replace(/^-?[0-9.]*/,"");function i(n){for(;n<0;)n+=4;return n%4}if(t===""){const n=parseInt(r);return isNaN(n)?0:i(n)}else if(t!==r){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let o=parseFloat(r.slice(0,r.length-t.length));return isNaN(o)?0:(o=o/n,o%1===0?i(o):0)}}return e}const vi=/[\s,]+/;function yi(r,e){e.split(vi).forEach(t=>{switch(t.trim()){case"horizontal":r.hFlip=!0;break;case"vertical":r.vFlip=!0;break}})}const bi=["width","height"],Si=["inline","hFlip","vFlip"];function wi(r,e){return r===e||r==="true"?!0:r===""||r==="false"?!1:null}function Oi(r){const e=r.getAttribute("data-icon"),t=typeof e=="string"&&ie(e,!0);if(!t)return null;const i={...Ue,inline:r.classList&&r.classList.contains(ct)};bi.forEach(s=>{const u=r.getAttribute("data-"+s);u&&(i[s]=u)});const n=r.getAttribute("data-rotate");typeof n=="string"&&(i.rotate=mi(n));const o=r.getAttribute("data-flip");typeof o=="string"&&yi(i,o),Si.forEach(s=>{const u="data-"+s,l=wi(r.getAttribute(u),u);typeof l=="boolean"&&(i[s]=l)});const a=r.getAttribute("data-mode");return{name:e,icon:t,customisations:i,mode:a}}const xi="svg."+Xe+", i."+Xe+", span."+Xe+", i."+ct+", span."+ct;function ki(r){const e=[];return r.querySelectorAll(xi).forEach(t=>{const i=t[K]||t.tagName.toLowerCase()!=="svg"?Oi(t):null;i&&e.push({node:t,props:i})}),e}function Bn(r,e){let t=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)t+=" "+i+'="'+e[i]+'"';return'"+r+""}function Vn(r){const e=new Set(["iconify"]);return["provider","prefix"].forEach(t=>{r[t]&&e.add("iconify--"+r[t])}),e}function Un(r,e,t,i){const n=r.classList;if(i){const a=i.classList;Array.from(a).forEach(s=>{n.add(s)})}const o=[];return e.forEach(a=>{n.contains(a)?t.has(a)&&o.push(a):(n.add(a),o.push(a))}),t.forEach(a=>{e.has(a)||n.remove(a)}),o}function zn(r,e,t){const i=r.style;(t||[]).forEach(o=>{i.removeProperty(o)});const n=[];for(const o in e)i.getPropertyValue(o)||(n.push(o),i.setProperty(o,e[o]));return n}function Kn(r,e,t){let i;try{i=document.createElement("span")}catch{return r}const n=e.customisations,o=He(t,n),a=r[K],s=Bn(On(o.body),{"aria-hidden":"true",role:"img",...o.attributes});i.innerHTML=s;const u=i.childNodes[0],l=r.attributes;for(let h=0;h/g,"%3E").replace(/\s+/g," ")}function Pi(r){return'url("data:image/svg+xml,'+Li(r)+'")'}const Ci={display:"inline-block"},dt={"background-color":"currentColor"},Jn={"background-color":"transparent"},qt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Dt={"-webkit-mask":dt,mask:dt,background:Jn};for(const r in Dt){const e=Dt[r];for(const t in qt)e[r+"-"+t]=qt[t]}function Mt(r){return r+(r.match(/^[-0-9.]+$/)?"px":"")}function Ei(r,e,t,i){const n=e.customisations,o=He(t,n),a=o.attributes,s=r[K],u=Bn(o.body,{...a,width:t.width+"",height:t.height+""}),l=Vn(e.icon),c=Un(r,l,new Set(s&&s.addedClasses)),g={"--svg":Pi(u),width:Mt(a.width),height:Mt(a.height),...Ci,...i?dt:Jn};n.inline&&(g["vertical-align"]="-0.125em");const d=zn(r,g,s&&s.addedStyles),h={...e,status:"loaded",addedClasses:c,addedStyles:d};return r[K]=h,r}let Te=!1;function Ti(){Te||(Te=!0,setTimeout(()=>{Te&&(Te=!1,re())}))}function re(r,e=!1){const t=Object.create(null);function i(n,o){const{provider:a,prefix:s,name:u}=n,l=H(a,s),c=l.icons[u];if(c)return{status:"loaded",icon:c};if(l.missing.has(u))return{status:"missing"};if(o&&!oi(n)){const f=t[a]||(t[a]=Object.create(null));(f[s]||(f[s]=new Set)).add(u)}return{status:"loading"}}(r?[r]:xe()).forEach(n=>{const o=typeof n.node=="function"?n.node():n.node;if(!o||!o.querySelectorAll)return;let a=!1,s=!1;function u(l,c,f){if(s||(s=!0,lt(n)),l.tagName.toUpperCase()!=="SVG"){const g=c.mode,d=g==="mask"||(g==="bg"?!1:g==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof d=="boolean"){Ei(l,c,{...Se,...f},d);return}}Kn(l,c,f)}ki(o).forEach(({node:l,props:c})=>{const f=l[K];if(!f){const{status:d,icon:h}=i(c.icon,!0);if(h){u(l,c,h);return}a=a||d==="loading",l[K]={...c,status:d};return}let g;if(pi(f,c)){if(g=i(c.icon,f.name!==c.name),!g.icon){a=a||g.status==="loading",Object.assign(f,{...c,status:g.status});return}}else{if(f.status!=="loading")return;if(g=i(c.icon,!1),!g.icon){f.status=g.status;return}}u(l,c,g.icon)}),n.temporary&&!a?Hn(o):e&&a?$n(o,!0):s&&n.observer&&ft(n)});for(const n in t){const o=t[n];for(const a in o){const s=o[a];bt(Array.from(s).map(u=>({provider:n,prefix:a,name:u})),Ti)}}}function _i(r){const e=Oe(r);e?re(e):re({node:r,temporary:!0},!0)}function Wn(r,e,t=!1){const i=we(r);if(!i)return null;const n=ie(r),o=Nn(Ue,e||{}),a=Kn(document.createElement("span"),{name:r,icon:n,customisations:o},i);return t?a.outerHTML:a}function ji(){return"3.1.0"}function Ii(r,e){return Wn(r,e,!1)}function Ri(r,e){return Wn(r,e,!0)}function Ai(r,e){const t=we(r);if(!t)return null;const i=Nn(Ue,e||{});return He(t,i)}function Ni(r){r?_i(r):re()}if(typeof document<"u"&&typeof window<"u"){si();const r=window;if(r.IconifyPreload!==void 0){const e=r.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!bn(i))&&console.error(t)}catch{console.error(t)}})}setTimeout(()=>{di(re),re()})}function Fi(r,e){Tn(r,e!==!1)}function qi(r){Tn(r,!0)}_n("",Kr);if(typeof document<"u"&&typeof window<"u"){En();const r=window;if(r.IconifyProviders!==void 0){const e=r.IconifyProviders;if(typeof e=="object"&&e!==null)for(const t in e){const i="IconifyProviders["+t+"] is invalid.";try{const n=e[t];if(typeof n!="object"||!n||n.resources===void 0)continue;jn(t,n)||console.error(i)}catch{console.error(i)}}}}const Di={getAPIConfig:Ve,setAPIModule:_n,sendAPIQuery:An,setFetch:Mr,getFetch:$r,listAPIProviders:qr},gt={_api:Di,addAPIProvider:jn,loadIcons:bt,loadIcon:ai,iconExists:Cr,getIcon:Er,listIcons:Lr,addIcon:yn,addCollection:bn,replaceIDs:On,calculateSize:rt,buildIcon:He,getVersion:ji,renderSVG:Ii,renderHTML:Ri,renderIcon:Ai,scan:Ni,observe:$n,stopObserving:Hn,pauseObserver:gi,resumeObserver:hi,enableCache:Fi,disableCache:qi};try{self.Iconify===void 0&&(self.Iconify=gt)}catch{}const Mi=gt.default||gt,$i=JSON.parse('[{"prefix":"fa","width":1536,"height":1536,"icons":{"chevron-left":{"body":"","width":1088,"height":1664},"creative-commons":{"body":"","width":1792,"height":1792},"meetup":{"body":"","width":1856,"height":1792},"vimeo":{"body":"","width":1664,"height":1408},"chevron-right":{"body":"","width":1088,"height":1664,"hFlip":true}}},{"prefix":"system-uicons","width":21,"height":21,"icons":{"tags":{"body":""}}},{"prefix":"akar-icons","width":24,"height":24,"icons":{"arrow-forward-thick":{"body":""},"more-horizontal-fill":{"body":""}}}]');$i.forEach(r=>Mi.addCollection(r));class Hi{constructor(e){C(this,"_t",null);C(this,"_timeOut",null);C(this,"_settings",{duration:2e3,width:260,height:60,top:"top",background:"#fe9600",color:"#fff",fontSize:14});e&&(this._settings={...this._settings,...e})}create(e,t){if(this._timeOut&&(clearTimeout(this._timeOut),this._t&&(document.body.removeChild(this._t),this._t=null)),!e){console.error("提示文本不能为空");return}this._t=document.createElement("div"),this._t.className="t-toast",this._t.innerHTML=`

${e}

`,document.body.appendChild(this._t),this.setStyle(),this._timeOut=setTimeout(()=>{this._t&&(document.body.removeChild(this._t),this._t=null),this._timeOut=null},t??this._settings.duration)}setStyle(){if(!this._t){console.error("Toast元素未创建");return}this._t.style.width=`${this._settings.width}px`,this._t.style.height=`${this._settings.height}px`,this._t.style.position="fixed",this._t.style.textAlign="center",this._t.style.zIndex="99999",typeof this._settings.top=="string"&&isNaN(Number(this._settings.top))?this._settings.top==="center"?this._t.style.top=`${window.innerHeight/2}px`:this._settings.top==="top"&&(this._t.style.top="0px"):this._t.style.top=typeof this._settings.top=="number"?`${this._settings.top}px`:"",this._t.style.left="50%",this._t.style.marginLeft=`-${this._settings.width/2}px`,this._t.style.background=this._settings.background,this._t.style.color=this._settings.color,this._t.style.borderBottomLeftRadius="4px",this._t.style.borderBottomRightRadius="4px",this._t.style.fontSize=`${this._settings.fontSize}px`,this._t.style.display="flex",this._t.style.justifyContent="center",this._t.style.alignItems="center"}}function F(r){"@babel/helpers - typeof";return F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(r)}function I(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Bi(r,e){if(F(r)!=="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||"default");if(F(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Qn(r){var e=Bi(r,"string");return F(e)==="symbol"?e:String(e)}function $t(r,e){for(var t=0;tr.length)&&(e=r.length);for(var t=0,i=new Array(e);t1&&arguments[1]!==void 0?arguments[1]:{};I(this,r),this.init(e,t)}return R(r,[{key:"init",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=i.prefix||"i18next:",this.logger=t||Wi,this.options=i,this.debug=i.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,i=new Array(t),n=0;n1?i-1:0),o=1;o-1?s.replace(/###/g,"."):s}function n(){return!r||typeof r=="string"}for(var o=typeof e!="string"?[].concat(e):e.split(".");o.length>1;){if(n())return{};var a=i(o.shift());!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={}}return n()?{}:{obj:r,k:i(o.shift())}}function zt(r,e,t){var i=St(r,e,Object),n=i.obj,o=i.k;n[o]=t}function Yi(r,e,t,i){var n=St(r,e,Object),o=n.obj,a=n.k;o[a]=o[a]||[],i&&(o[a]=o[a].concat(t)),i||o[a].push(t)}function De(r,e){var t=St(r,e),i=t.obj,n=t.k;if(i)return i[n]}function Zi(r,e,t){var i=De(r,t);return i!==void 0?i:De(e,t)}function Gn(r,e,t){for(var i in e)i!=="__proto__"&&i!=="constructor"&&(i in r?typeof r[i]=="string"||r[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?t&&(r[i]=e[i]):Gn(r[i],e[i],t):r[i]=e[i]);return r}function ee(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Xi={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function eo(r){return typeof r=="string"?r.replace(/[&<>"'\/]/g,function(e){return Xi[e]}):r}var Ke=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,to=[" ",",","?","!",";"];function no(r,e,t){e=e||"",t=t||"";var i=to.filter(function(s){return e.indexOf(s)<0&&t.indexOf(s)<0});if(i.length===0)return!0;var n=new RegExp("(".concat(i.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!n.test(r);if(!o){var a=r.indexOf(t);a>0&&!n.test(r.substring(0,a))&&(o=!0)}return o}function Me(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(r){if(r[e])return r[e];for(var i=e.split(t),n=r,o=0;oo+a;)a++,s=i.slice(o,o+a).join(t),u=n[s];if(u===void 0)return;if(u===null)return null;if(e.endsWith(s)){if(typeof u=="string")return u;if(s&&typeof u[s]=="string")return u[s]}var l=i.slice(o+a).join(t);return l?Me(u,l,t):void 0}n=n[i[o]]}return n}}function Kt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function _e(r){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var oo=function(r){ze(t,r);var e=ro(t);function t(i){var n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return I(this,t),n=e.call(this),Ke&&J.call(z(n)),n.data=i||{},n.options=o,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.options.ignoreJSONStructure===void 0&&(n.options.ignoreJSONStructure=!0),n}return R(t,[{key:"addNamespaces",value:function(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}},{key:"removeNamespaces",value:function(n){var o=this.options.ns.indexOf(n);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(n,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[n,o];a&&typeof a!="string"&&(c=c.concat(a)),a&&typeof a=="string"&&(c=c.concat(u?a.split(u):a)),n.indexOf(".")>-1&&(c=n.split("."));var f=De(this.data,c);return f||!l||typeof a!="string"?f:Me(this.data&&this.data[n]&&this.data[n][o],a,u)}},{key:"addResource",value:function(n,o,a,s){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},l=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,c=[n,o];a&&(c=c.concat(l?a.split(l):a)),n.indexOf(".")>-1&&(c=n.split("."),s=o,o=c[1]),this.addNamespaces(o),zt(this.data,c,s),u.silent||this.emit("added",n,o,a,s)}},{key:"addResources",value:function(n,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var u in a)(typeof a[u]=="string"||Object.prototype.toString.apply(a[u])==="[object Array]")&&this.addResource(n,o,u,a[u],{silent:!0});s.silent||this.emit("added",n,o,a)}},{key:"addResourceBundle",value:function(n,o,a,s,u){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[n,o];n.indexOf(".")>-1&&(c=n.split("."),s=a,a=o,o=c[1]),this.addNamespaces(o);var f=De(this.data,c)||{};s?Gn(f,a,u):f=_e(_e({},f),a),zt(this.data,c,f),l.silent||this.emit("added",n,o,a)}},{key:"removeResourceBundle",value:function(n,o){this.hasResourceBundle(n,o)&&delete this.data[n][o],this.removeNamespaces(o),this.emit("removed",n,o)}},{key:"hasResourceBundle",value:function(n,o){return this.getResource(n,o)!==void 0}},{key:"getResourceBundle",value:function(n,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?_e(_e({},{}),this.getResource(n,o)):this.getResource(n,o)}},{key:"getDataByLanguage",value:function(n){return this.data[n]}},{key:"hasLanguageSomeTranslations",value:function(n){var o=this.getDataByLanguage(n),a=o&&Object.keys(o)||[];return!!a.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),t}(J),Yn={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,i,n,o){var a=this;return e.forEach(function(s){a.processors[s]&&(t=a.processors[s].process(t,i,n,o))}),t}};function Jt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function E(r){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Wt={},Qt=function(r){ze(t,r);var e=ao(t);function t(i){var n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I(this,t),n=e.call(this),Ke&&J.call(z(n)),Gi(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,z(n)),n.options=o,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.logger=$.create("translator"),n}return R(t,[{key:"changeLanguage",value:function(n){n&&(this.language=n)}},{key:"exists",value:function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(n==null)return!1;var a=this.resolve(n,o);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(n,o){var a=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=o.ns||this.options.defaultNS||[],l=a&&n.indexOf(a)>-1,c=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!no(n,a,s);if(l&&!c){var f=n.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:n,namespaces:u};var g=n.split(a);(a!==s||a===s&&this.options.ns.indexOf(g[0])>-1)&&(u=g.shift()),n=g.join(s)}return typeof u=="string"&&(u=[u]),{key:n,namespaces:u}}},{key:"translate",value:function(n,o,a){var s=this;if(F(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),F(o)==="object"&&(o=E({},o)),o||(o={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);var u=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=this.extractFromKey(n[n.length-1],o),f=c.key,g=c.namespaces,d=g[g.length-1],h=o.lng||this.language,v=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(v){var y=o.nsSeparator||this.options.nsSeparator;return u?{res:"".concat(d).concat(y).concat(f),usedKey:f,exactUsedKey:f,usedLng:h,usedNS:d}:"".concat(d).concat(y).concat(f)}return u?{res:f,usedKey:f,exactUsedKey:f,usedLng:h,usedNS:d}:f}var m=this.resolve(n,o),p=m&&m.res,b=m&&m.usedKey||f,w=m&&m.exactUsedKey||f,x=Object.prototype.toString.apply(p),O=["[object Number]","[object Function]","[object RegExp]"],k=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,D=typeof p!="string"&&typeof p!="boolean"&&typeof p!="number";if(T&&p&&D&&O.indexOf(x)<0&&!(typeof k=="string"&&x==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,p,E(E({},o),{},{ns:g})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return u?(m.res=_,m):_}if(l){var Ot=x==="[object Array]",Le=Ot?[]:{},or=Ot?w:b;for(var Z in p)if(Object.prototype.hasOwnProperty.call(p,Z)){var xt="".concat(or).concat(l).concat(Z);Le[Z]=this.translate(xt,E(E({},o),{joinArrays:!1,ns:g})),Le[Z]===xt&&(Le[Z]=p[Z])}p=Le}}else if(T&&typeof k=="string"&&x==="[object Array]")p=p.join(k),p&&(p=this.extendTranslation(p,n,o,a));else{var Pe=!1,oe=!1,kt=o.count!==void 0&&typeof o.count!="string",Je=t.hasDefaultValue(o),ar=kt?this.pluralResolver.getSuffix(h,o.count,o):"",ae=o["defaultValue".concat(ar)]||o.defaultValue;!this.isValidLookup(p)&&Je&&(Pe=!0,p=ae),this.isValidLookup(p)||(oe=!0,p=f);var sr=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,ur=sr&&oe?void 0:p,se=Je&&ae!==p&&this.options.updateMissing;if(oe||Pe||se){if(this.logger.log(se?"updateKey":"missingKey",h,d,f,se?ae:p),l){var Lt=this.resolve(f,E(E({},o),{},{keySeparator:!1}));Lt&&Lt.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var ue=[],Ce=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ce&&Ce[0])for(var We=0;We1&&arguments[1]!==void 0?arguments[1]:{},s,u,l,c,f;return typeof n=="string"&&(n=[n]),n.forEach(function(g){if(!o.isValidLookup(s)){var d=o.extractFromKey(g,a),h=d.key;u=h;var v=d.namespaces;o.options.fallbackNS&&(v=v.concat(o.options.fallbackNS));var y=a.count!==void 0&&typeof a.count!="string",m=y&&!a.ordinal&&a.count===0&&o.pluralResolver.shouldUseIntlApi(),p=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",b=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);v.forEach(function(w){o.isValidLookup(s)||(f=w,!Wt["".concat(b[0],"-").concat(w)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(f)&&(Wt["".concat(b[0],"-").concat(w)]=!0,o.logger.warn('key "'.concat(u,'" for languages "').concat(b.join(", "),`" won't get resolved as namespace "`).concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(function(x){if(!o.isValidLookup(s)){c=x;var O=[h];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(O,h,x,w,a);else{var k;y&&(k=o.pluralResolver.getSuffix(x,a.count,a));var T="".concat(o.options.pluralSeparator,"zero");if(y&&(O.push(h+k),m&&O.push(h+T)),p){var D="".concat(h).concat(o.options.contextSeparator).concat(a.context);O.push(D),y&&(O.push(D+k),m&&O.push(D+T))}}for(var _;_=O.pop();)o.isValidLookup(s)||(l=_,s=o.getResource(x,w,_,a))}}))})}}),{res:s,usedKey:u,exactUsedKey:l,usedLng:c,usedNS:f}}},{key:"isValidLookup",value:function(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}},{key:"getResource",value:function(n,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(n,o,a,s):this.resourceStore.getResource(n,o,a,s)}}],[{key:"hasDefaultValue",value:function(n){var o="defaultValue";for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a)&&o===a.substring(0,o.length)&&n[a]!==void 0)return!0;return!1}}]),t}(J);function et(r){return r.charAt(0).toUpperCase()+r.slice(1)}var Gt=function(){function r(e){I(this,r),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}return R(r,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var i=t.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var i=t.split("-");return this.formatLanguageCode(i[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var i=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(o){return o.toLowerCase()}):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),i.indexOf(n[1].toLowerCase())>-1&&(n[1]=et(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),i.indexOf(n[1].toLowerCase())>-1&&(n[1]=et(n[1].toLowerCase())),i.indexOf(n[2].toLowerCase())>-1&&(n[2]=et(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var i=this;if(!t)return null;var n;return t.forEach(function(o){if(!n){var a=i.formatLanguageCode(o);(!i.options.supportedLngs||i.isSupportedCode(a))&&(n=a)}}),!n&&this.options.supportedLngs&&t.forEach(function(o){if(!n){var a=i.getLanguagePartFromCode(o);if(i.isSupportedCode(a))return n=a;n=i.options.supportedLngs.find(function(s){if(s===a)return s;if(!(s.indexOf("-")<0&&a.indexOf("-")<0)&&s.indexOf(a)===0)return s})}}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}},{key:"getFallbackCodes",value:function(t,i){if(!t)return[];if(typeof t=="function"&&(t=t(i)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!i)return t.default||[];var n=t[i];return n||(n=t[this.getScriptPartFromCode(i)]),n||(n=t[this.formatLanguageCode(i)]),n||(n=t[this.getLanguagePartFromCode(i)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,i){var n=this,o=this.getFallbackCodes(i||this.options.fallbackLng||[],t),a=[],s=function(l){l&&(n.isSupportedCode(l)?a.push(l):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(l)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):typeof t=="string"&&s(this.formatLanguageCode(t)),o.forEach(function(u){a.indexOf(u)<0&&s(n.formatLanguageCode(u))}),a}}]),r}(),uo=[{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}],co={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return 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 e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},lo=["v1","v2","v3"],Yt={zero:0,one:1,two:2,few:3,many:4,other:5};function fo(){var r={};return uo.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:co[e.fc]}})}),r}var go=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I(this,r),this.languageUtils=e,this.options=t,this.logger=$.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!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=fo()}return R(r,[{key:"addRule",value:function(t,i){this.rules[t]=i}},{key:"getRule",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:i.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,i);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(function(o){return"".concat(i).concat(o)})}},{key:"getSuffixes",value:function(t){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(t,n);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(a,s){return Yt[a]-Yt[s]}).map(function(a){return"".concat(i.options.prepend).concat(a)}):o.numbers.map(function(a){return i.getSuffix(t,a,n)}):[]}},{key:"getSuffix",value:function(t,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(t,n);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(i)):this.getSuffixRetroCompatible(o,i):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,i){var n=this,o=t.noAbs?t.plurals(i):t.plurals(Math.abs(i)),a=t.numbers[o];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!lo.includes(this.options.compatibilityJSON)}}]),r}();function Zt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function q(r){for(var e=1;e3&&arguments[3]!==void 0?arguments[3]:".",n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Zi(r,e,t);return!o&&n&&typeof t=="string"&&(o=Me(r,t,i),o===void 0&&(o=Me(e,t,i))),o}var ho=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};I(this,r),this.logger=$.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return R(r,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var i=t.interpolation;this.escape=i.escape!==void 0?i.escape:eo,this.escapeValue=i.escapeValue!==void 0?i.escapeValue:!0,this.useRawValueToEscape=i.useRawValueToEscape!==void 0?i.useRawValueToEscape:!1,this.prefix=i.prefix?ee(i.prefix):i.prefixEscaped||"{{",this.suffix=i.suffix?ee(i.suffix):i.suffixEscaped||"}}",this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||",",this.unescapePrefix=i.unescapeSuffix?"":i.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":i.unescapeSuffix||"",this.nestingPrefix=i.nestingPrefix?ee(i.nestingPrefix):i.nestingPrefixEscaped||ee("$t("),this.nestingSuffix=i.nestingSuffix?ee(i.nestingSuffix):i.nestingSuffixEscaped||ee(")"),this.nestingOptionsSeparator=i.nestingOptionsSeparator?i.nestingOptionsSeparator:i.nestingOptionsSeparator||",",this.maxReplaces=i.maxReplaces?i.maxReplaces:1e3,this.alwaysFormat=i.alwaysFormat!==void 0?i.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var i="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(i,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(t,i,n,o){var a=this,s,u,l,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(y){return y.replace(/\$/g,"$$$$")}var g=function(m){if(m.indexOf(a.formatSeparator)<0){var p=Xt(i,c,m,a.options.keySeparator,a.options.ignoreJSONStructure);return a.alwaysFormat?a.format(p,void 0,n,q(q(q({},o),i),{},{interpolationkey:m})):p}var b=m.split(a.formatSeparator),w=b.shift().trim(),x=b.join(a.formatSeparator).trim();return a.format(Xt(i,c,w,a.options.keySeparator,a.options.ignoreJSONStructure),x,n,q(q(q({},o),i),{},{interpolationkey:w}))};this.resetRegExp();var d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,h=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(m){return f(m)}},{regex:this.regexp,safeValue:function(m){return a.escapeValue?f(a.escape(m)):f(m)}}];return v.forEach(function(y){for(l=0;s=y.regex.exec(t);){var m=s[1].trim();if(u=g(m),u===void 0)if(typeof d=="function"){var p=d(t,s,o);u=typeof p=="string"?p:""}else if(o&&Object.prototype.hasOwnProperty.call(o,m))u="";else if(h){u=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(t)),u="";else typeof u!="string"&&!a.useRawValueToEscape&&(u=Ut(u));var b=y.safeValue(u);if(t=t.replace(s[0],b),h?(y.regex.lastIndex+=u.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,l++,l>=a.maxReplaces)break}}),t}},{key:"nest",value:function(t,i){var n=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,u;function l(d,h){var v=this.nestingOptionsSeparator;if(d.indexOf(v)<0)return d;var y=d.split(new RegExp("".concat(v,"[ ]*{"))),m="{".concat(y[1]);d=y[0],m=this.interpolate(m,u);var p=m.match(/'/g),b=m.match(/"/g);(p&&p.length%2===0&&!b||b.length%2!==0)&&(m=m.replace(/'/g,'"'));try{u=JSON.parse(m),h&&(u=q(q({},h),u))}catch(w){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),w),"".concat(d).concat(v).concat(m)}return delete u.defaultValue,d}for(;a=this.nestingRegexp.exec(t);){var c=[];u=q({},o),u=u.replace&&typeof u.replace!="string"?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;var f=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var g=a[1].split(this.formatSeparator).map(function(d){return d.trim()});a[1]=g.shift(),c=g,f=!0}if(s=i(l.call(this,a[1].trim(),u),u),s&&a[0]===t&&typeof s!="string")return s;typeof s!="string"&&(s=Ut(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(t)),s=""),f&&(s=c.reduce(function(d,h){return n.format(d,h,o.lng,q(q({},o),{},{interpolationkey:a[1].trim()}))},s.trim())),t=t.replace(a[0],s),this.regexp.lastIndex=0}return t}}]),r}();function en(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function V(r){for(var e=1;e-1){var i=r.split("(");e=i[0].toLowerCase().trim();var n=i[1].substring(0,i[1].length-1);if(e==="currency"&&n.indexOf(":")<0)t.currency||(t.currency=n.trim());else if(e==="relativetime"&&n.indexOf(":")<0)t.range||(t.range=n.trim());else{var o=n.split(";");o.forEach(function(a){if(a){var s=a.split(":"),u=Ji(s),l=u[0],c=u.slice(1),f=c.join(":").trim().replace(/^'+|'+$/g,"");t[l.trim()]||(t[l.trim()]=f),f==="false"&&(t[l.trim()]=!1),f==="true"&&(t[l.trim()]=!0),isNaN(f)||(t[l.trim()]=parseInt(f,10))}})}}return{formatName:e,formatOptions:t}}function te(r){var e={};return function(i,n,o){var a=n+JSON.stringify(o),s=e[a];return s||(s=r(n,o),e[a]=s),s(i)}}var mo=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};I(this,r),this.logger=$.create("formatter"),this.options=e,this.formats={number:te(function(t,i){var n=new Intl.NumberFormat(t,V({},i));return function(o){return n.format(o)}}),currency:te(function(t,i){var n=new Intl.NumberFormat(t,V(V({},i),{},{style:"currency"}));return function(o){return n.format(o)}}),datetime:te(function(t,i){var n=new Intl.DateTimeFormat(t,V({},i));return function(o){return n.format(o)}}),relativetime:te(function(t,i){var n=new Intl.RelativeTimeFormat(t,V({},i));return function(o){return n.format(o,i.range||"day")}}),list:te(function(t,i){var n=new Intl.ListFormat(t,V({},i));return function(o){return n.format(o)}})},this.init(e)}return R(r,[{key:"init",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},n=i.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(t,i){this.formats[t.toLowerCase().trim()]=i}},{key:"addCached",value:function(t,i){this.formats[t.toLowerCase().trim()]=te(i)}},{key:"format",value:function(t,i,n){var o=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=i.split(this.formatSeparator),u=s.reduce(function(l,c){var f=po(c),g=f.formatName,d=f.formatOptions;if(o.formats[g]){var h=l;try{var v=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},y=v.locale||v.lng||a.locale||a.lng||n;h=o.formats[g](l,y,V(V(V({},d),a),v))}catch(m){o.logger.warn(m)}return h}else o.logger.warn("there was no format function for ".concat(g));return l},t);return u}}]),r}();function tn(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function nn(r){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bo(r,e){r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)}var So=function(r){ze(t,r);var e=vo(t);function t(i,n,o){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return I(this,t),a=e.call(this),Ke&&J.call(z(a)),a.backend=i,a.store=n,a.services=o,a.languageUtils=o.languageUtils,a.options=s,a.logger=$.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,s.backend,s),a}return R(t,[{key:"queueLoad",value:function(n,o,a,s){var u=this,l={},c={},f={},g={};return n.forEach(function(d){var h=!0;o.forEach(function(v){var y="".concat(d,"|").concat(v);!a.reload&&u.store.hasResourceBundle(d,v)?u.state[y]=2:u.state[y]<0||(u.state[y]===1?c[y]===void 0&&(c[y]=!0):(u.state[y]=1,h=!1,c[y]===void 0&&(c[y]=!0),l[y]===void 0&&(l[y]=!0),g[v]===void 0&&(g[v]=!0)))}),h||(f[d]=!0)}),(Object.keys(l).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(l),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(g)}}},{key:"loaded",value:function(n,o,a){var s=n.split("|"),u=s[0],l=s[1];o&&this.emit("failedLoading",u,l,o),a&&this.store.addResourceBundle(u,l,a),this.state[n]=o?-1:2;var c={};this.queue.forEach(function(f){Yi(f.loaded,[u],l),bo(f,n),o&&f.errors.push(o),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(g){c[g]||(c[g]={});var d=f.loaded[g];d.length&&d.forEach(function(h){c[g][h]===void 0&&(c[g][h]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(n,o,a){var s=this,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!n.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:o,fcName:a,tried:u,wait:l,callback:c});return}this.readingCalls++;var f=function(v,y){if(s.readingCalls--,s.waitingReads.length>0){var m=s.waitingReads.shift();s.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(v&&y&&u2&&arguments[2]!==void 0?arguments[2]:{},u=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."),u&&u();typeof n=="string"&&(n=this.languageUtils.toResolveHierarchy(n)),typeof o=="string"&&(o=[o]);var l=this.queueLoad(n,o,s,u);if(!l.toLoad.length)return l.pending.length||u(),null;l.toLoad.forEach(function(c){a.loadOne(c)})}},{key:"load",value:function(n,o,a){this.prepareLoading(n,o,{},a)}},{key:"reload",value:function(n,o,a){this.prepareLoading(n,o,{reload:!0},a)}},{key:"loadOne",value:function(n){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=n.split("|"),u=s[0],l=s[1];this.read(u,l,"read",void 0,void 0,function(c,f){c&&o.logger.warn("".concat(a,"loading namespace ").concat(l," for language ").concat(u," failed"),c),!c&&f&&o.logger.log("".concat(a,"loaded namespace ").concat(l," for language ").concat(u),f),o.loaded(n,c,f)})}},{key:"saveMissing",value:function(n,o,a,s,u){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){var f=nn(nn({},l),{},{isUpdate:u}),g=this.backend.create.bind(this.backend);if(g.length<6)try{var d;g.length===5?d=g(n,o,a,s,f):d=g(n,o,a,s),d&&typeof d.then=="function"?d.then(function(h){return c(null,h)}).catch(c):c(null,d)}catch(h){c(h)}else g(n,o,a,s,c,f)}!n||!n[0]||this.store.addResource(n[0],o,a,s)}}}]),t}(J);function rn(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(F(e[1])==="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),F(e[2])==="object"||F(e[3])==="object"){var i=e[3]||e[2];Object.keys(i).forEach(function(n){t[n]=i[n]})}return t},interpolation:{escapeValue:!0,format:function(e,t,i,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function on(r){return typeof r.ns=="string"&&(r.ns=[r.ns]),typeof r.fallbackLng=="string"&&(r.fallbackLng=[r.fallbackLng]),typeof r.fallbackNS=="string"&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&r.supportedLngs.indexOf("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r}function an(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function M(r){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function je(){}function xo(r){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(r));e.forEach(function(t){typeof r[t]=="function"&&(r[t]=r[t].bind(r))})}var $e=function(r){ze(t,r);var e=wo(t);function t(){var i,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(I(this,t),i=e.call(this),Ke&&J.call(z(i)),i.options=on(n),i.services={},i.logger=$,i.modules={external:[]},xo(z(i)),o&&!i.isInitialized&&!n.isClone){if(!i.options.initImmediate)return i.init(n,o),ke(i,z(i));setTimeout(function(){i.init(n,o)},0)}return i}return R(t,[{key:"init",value:function(){var n=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(a=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=rn();this.options=M(M(M({},s),this.options),on(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=M(M({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function u(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?$.init(u(this.modules.logger),this.options):$.init(null,this.options);var l;this.modules.formatter?l=this.modules.formatter:typeof Intl<"u"&&(l=mo);var c=new Gt(this.options);this.store=new oo(this.options.resources,this.options);var f=this.services;f.logger=$,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new go(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=u(l),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new ho(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new So(u(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var p=arguments.length,b=new Array(p>1?p-1:0),w=1;w1?p-1:0),w=1;w0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var d=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];d.forEach(function(m){n[m]=function(){var p;return(p=n.store)[m].apply(p,arguments)}});var h=["addResource","addResources","addResourceBundle","removeResourceBundle"];h.forEach(function(m){n[m]=function(){var p;return(p=n.store)[m].apply(p,arguments),n}});var v=le(),y=function(){var p=function(w,x){n.isInitialized&&!n.initializedStoreOnce&&n.logger.warn("init: i18next is already initialized. You should call init just once!"),n.isInitialized=!0,n.options.isClone||n.logger.log("initialized",n.options),n.emit("initialized",n.options),v.resolve(x),a(w,x)};if(n.languages&&n.options.compatibilityAPI!=="v1"&&!n.isInitialized)return p(null,n.t.bind(n));n.changeLanguage(n.options.lng,p)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),v}},{key:"loadResources",value:function(n){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:je,s=a,u=typeof n=="string"?n:this.language;if(typeof n=="function"&&(s=n),!this.options.resources||this.options.partialBundledLanguages){if(u&&u.toLowerCase()==="cimode")return s();var l=[],c=function(d){if(d){var h=o.services.languageUtils.toResolveHierarchy(d);h.forEach(function(v){l.indexOf(v)<0&&l.push(v)})}};if(u)c(u);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(g){return c(g)})}this.options.preload&&this.options.preload.forEach(function(g){return c(g)}),this.services.backendConnector.load(l,this.options.ns,function(g){!g&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(g)})}else s(null)}},{key:"reloadResources",value:function(n,o,a){var s=le();return n||(n=this.languages),o||(o=this.options.ns),a||(a=je),this.services.backendConnector.reload(n,o,function(u){s.resolve(),a(u)}),s}},{key:"use",value:function(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&Yn.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}},{key:"setResolvedLanguage",value:function(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1))for(var o=0;o-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(n,o){var a=this;this.isLanguageChangingTo=n;var s=le();this.emit("languageChanging",n);var u=function(g){a.language=g,a.languages=a.services.languageUtils.toResolveHierarchy(g),a.resolvedLanguage=void 0,a.setResolvedLanguage(g)},l=function(g,d){d?(u(d),a.translator.changeLanguage(d),a.isLanguageChangingTo=void 0,a.emit("languageChanged",d),a.logger.log("languageChanged",d)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),o&&o(g,function(){return a.t.apply(a,arguments)})},c=function(g){!n&&!g&&a.services.languageDetector&&(g=[]);var d=typeof g=="string"?g:a.services.languageUtils.getBestMatchFromCodes(g);d&&(a.language||u(d),a.translator.language||a.translator.changeLanguage(d),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(d)),a.loadResources(d,function(h){l(h,d)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n),s}},{key:"getFixedT",value:function(n,o,a){var s=this,u=function l(c,f){var g;if(F(f)!=="object"){for(var d=arguments.length,h=new Array(d>2?d-2:0),v=2;v1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=a.lng||this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var c=function(d,h){var v=o.services.backendConnector.state["".concat(d,"|").concat(h)];return v===-1||v===2};if(a.precheck){var f=a.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(s,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(s,n)&&(!u||c(l,n)))}},{key:"loadNamespaces",value:function(n,o){var a=this,s=le();return this.options.ns?(typeof n=="string"&&(n=[n]),n.forEach(function(u){a.options.ns.indexOf(u)<0&&a.options.ns.push(u)}),this.loadResources(function(u){s.resolve(),o&&o(u)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(n,o){var a=le();typeof n=="string"&&(n=[n]);var s=this.options.preload||[],u=n.filter(function(l){return s.indexOf(l)<0});return u.length?(this.options.preload=s.concat(u),this.loadResources(function(l){a.resolve(),o&&o(l)}),a):(o&&o(),Promise.resolve())}},{key:"dir",value:function(n){if(n||(n=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!n)return"rtl";var o=["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"],a=this.services&&this.services.languageUtils||new Gt(rn());return o.indexOf(a.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var n=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:je,s=M(M(M({},this.options),o),{isClone:!0}),u=new t(s);(o.debug!==void 0||o.prefix!==void 0)&&(u.logger=u.logger.clone(o));var l=["store","services","language"];return l.forEach(function(c){u[c]=n[c]}),u.services=M({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new Qt(u.services,u.options),u.translator.on("*",function(c){for(var f=arguments.length,g=new Array(f>1?f-1:0),d=1;d0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new $e(r,e)});var L=$e.createInstance();L.createInstance=$e.createInstance;L.createInstance;L.dir;L.init;L.loadResources;L.reloadResources;L.use;L.changeLanguage;L.getFixedT;L.t;L.exists;L.setDefaultNamespace;L.hasLoadedNamespace;L.loadNamespaces;L.loadLanguages;var Zn=[],ko=Zn.forEach,Lo=Zn.slice;function Po(r){return ko.call(Lo.call(arguments,1),function(e){if(e)for(var t in e)r[t]===void 0&&(r[t]=e[t])}),r}var sn=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Co=function(e,t,i){var n=i||{};n.path=n.path||"/";var o=encodeURIComponent(t),a="".concat(e,"=").concat(o);if(n.maxAge>0){var s=n.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(s))}if(n.domain){if(!sn.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(n.domain)}if(n.path){if(!sn.test(n.path))throw new TypeError("option path is invalid");a+="; Path=".concat(n.path)}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(n.expires.toUTCString())}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.sameSite){var u=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(u){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},un={create:function(e,t,i,n){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+i*60*1e3)),n&&(o.domain=n),document.cookie=Co(e,encodeURIComponent(t),o)},read:function(e){for(var t="".concat(e,"="),i=document.cookie.split(";"),n=0;n-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var n=i.substring(1),o=n.split("&"),a=0;a0){var u=o[a].substring(0,s);u===e.lookupQuerystring&&(t=o[a].substring(s+1))}}}return t}},fe=null,cn=function(){if(fe!==null)return fe;try{fe=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{fe=!1}return fe},_o={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&cn()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&cn()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},de=null,ln=function(){if(de!==null)return de;try{de=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{de=!1}return de},jo={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&ln()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&ln()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Io={name:"navigator",lookup:function(e){var t=[];if(typeof navigator<"u"){if(navigator.languages)for(var i=0;i0?t:void 0}},Ro={name:"htmlTag",lookup:function(e){var t,i=e.htmlTag||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(t=i.getAttribute("lang")),t}},Ao={name:"path",lookup:function(e){var t;if(typeof window<"u"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;t=i[e.lookupFromPathIndex].replace("/","")}else t=i[0].replace("/","")}return t}},No={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[t]}};function Fo(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var Xn=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I(this,r),this.type="languageDetector",this.detectors={},this.init(e,t)}return R(r,[{key:"init",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=Po(i,this.options||{},Fo()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Eo),this.addDetector(To),this.addDetector(_o),this.addDetector(jo),this.addDetector(Io),this.addDetector(Ro),this.addDetector(Ao),this.addDetector(No)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var i=this;t||(t=this.options.order);var n=[];return t.forEach(function(o){if(i.detectors[o]){var a=i.detectors[o].lookup(i.options);a&&typeof a=="string"&&(a=[a]),a&&(n=n.concat(a))}}),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(t,i){var n=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||i.forEach(function(o){n.detectors[o]&&n.detectors[o].cacheUserLanguage(t,n.options)}))}}]),r}();Xn.type="languageDetector";var er=[],qo=er.forEach,Do=er.slice;function Mo(r){return qo.call(Do.call(arguments,1),function(e){if(e)for(var t in e)r[t]===void 0&&(r[t]=e[t])}),r}function $o(r){return r?typeof r=="function"?new r:r:null}function Ho(){return{handleEmptyResourcesAsFailed:!0,cacheHitMode:"none"}}function fn(r,e,t,i){var n=r.read.bind(r);if(n.length===2){try{var o=n(e,t);o&&typeof o.then=="function"?o.then(function(a){return i(null,a)}).catch(i):i(null,o)}catch(a){i(a)}return}n(e,t,i)}var tr=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I(this,r),this.backends=[],this.type="backend",this.init(e,t)}return R(r,[{key:"init",value:function(t){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;this.services=t,this.options=Mo(n,this.options||{},Ho()),this.options.backends&&this.options.backends.forEach(function(a,s){i.backends[s]=i.backends[s]||$o(a),i.backends[s].init(t,i.options.backendOptions&&i.options.backendOptions[s]||{},o)})}},{key:"read",value:function(t,i,n){var o=this,a=this.backends.length,s=function l(c){if(c>=a)return n(new Error("non of the backend loaded data",!0));var f=c===a-1,g=o.options.handleEmptyResourcesAsFailed&&!f?0:-1,d=o.backends[c];d.read?fn(d,t,i,function(h,v){if(!h&&v&&Object.keys(v).length>g){if(n(null,v,c),u(c-1,v),d.save&&o.options.cacheHitMode&&["refresh","refreshAndUpdateStore"].indexOf(o.options.cacheHitMode)>-1){var y=o.backends[c+1];y&&y.read&&fn(y,t,i,function(m,p){m||p&&(Object.keys(p).length<=g||(u(c,p),o.options.cacheHitMode==="refreshAndUpdateStore"&&o.services&&o.services.resourceStore&&o.services.resourceStore.addResourceBundle(t,i,p)))})}}else l(c+1)}):l(c+1)},u=function l(c,f){if(!(c<0)){var g=o.backends[c];g.save&&g.save(t,i,f),l(c-1,f)}};s(0)}},{key:"create",value:function(t,i,n,o){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){},s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.backends.forEach(function(u){if(u.create){var l=u.create.bind(u);if(l.length<6){try{var c;l.length===5?c=l(t,i,n,o,s):c=l(t,i,n,o),c&&typeof c.then=="function"?c.then(function(f){return a(null,f)}).catch(a):a(null,c)}catch(f){a(f)}return}l(t,i,n,o,a,s)}})}}]),r}();tr.type="backend";function dn(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function tt(r){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};I(this,r),this.init(e,t),this.type="backend"}return R(r,[{key:"init",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.services=t,this.options=tt(tt(tt({},Vo()),this.options),i),this.storage=new Bo(this.options)}},{key:"read",value:function(t,i,n){var o=new Date().getTime();if(!this.storage.store)return n(null,null);var a=this.storage.getItem("".concat(this.options.prefix).concat(t,"-").concat(i));if(a){a=JSON.parse(a);var s=this.getVersion(t);if(a.i18nStamp&&a.i18nStamp+this.options.expirationTime>o&&s===a.i18nVersion)return delete a.i18nVersion,delete a.i18nStamp,n(null,a)}return n(null,null)}},{key:"save",value:function(t,i,n){if(this.storage.store){n.i18nStamp=new Date().getTime();var o=this.getVersion(t);o&&(n.i18nVersion=o),this.storage.setItem("".concat(this.options.prefix).concat(t,"-").concat(i),JSON.stringify(n))}}},{key:"getVersion",value:function(t){return this.options.versions[t]||this.options.defaultVersion}}]),r}();nr.type="backend";var rr={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;function e(a){for(var s=1;s1&&arguments[1]!==void 0?arguments[1]:{};s=e({},i,s);var u=function(h,v){return s.parseDefaultValueFromContent?e({},h,{defaultValue:v}):h};function l(d,h,v){var y="text";if(h.indexOf("[")==0){var m=h.split("]");h=m[1],y=m[0].substr(1,m[0].length-1)}if(h=h.indexOf(";")==h.length-1?h.substr(0,h.length-2):h,y==="html")d.innerHTML=a.t(h,u(v,d.innerHTML));else if(y==="text")d.textContent=a.t(h,u(v,d.textContent));else if(y==="prepend"){var p=d.innerHTML.indexOf(""),b=d.innerHTML.indexOf("")+11;p>-1&&b>6&&(d.innerHTML=[d.innerHTML.substring(0,p),d.innerHTML.slice(b)].join("")),d.innerHTML=["",a.t(h,u(v,d.innerHTML)),"",d.innerHTML].join("")}else if(y==="append"){var w=d.innerHTML.indexOf(""),x=d.innerHTML.indexOf("")+11;w>-1&&x>6&&(d.innerHTML=[d.innerHTML.substring(0,w),d.innerHTML.slice(x)].join("")),d.innerHTML=[d.innerHTML,"",a.t(h,u(v,d.innerHTML),"")].join("")}else if(y.indexOf("data-")===0){var O=y.substr(5),k=a.t(h,u(v,d.getAttribute(O)));d.setAttribute(O,k),d.setAttribute(y,k)}else d.setAttribute(y,a.t(h,u(v,d.getAttribute(y))))}function c(d){return JSON.parse(d.replace(/:\s*"([^"]*)"/g,function(h,v){return': "'+v.replace(/:/g,"@colon@")+'"'}).replace(/:\s*'([^']*)'/g,function(h,v){return': "'+v.replace(/:/g,"@colon@")+'"'}).replace(/(['"])?([a-z0-9A-Z_]+)(['"])?\s*:/g,'"$2": ').replace(/@colon@/g,":"))}function f(d,h){var v=d.getAttribute(s.selectorAttr);if(v){var y=d,m=d.getAttribute(s.targetAttr);if(m!=null&&(y=d.querySelector(m)||d),!h&&s.useOptionsAttr===!0&&(h=c(d.getAttribute(s.optionsAttr)||"{}")),h=h||{},v.indexOf(";")>=0)for(var p=v.split(";"),b=0,w=p.length;b-1;w--)f(b[w],h);f(p,h)}}return g}var o={init:n};r.default=o})(rr);var Uo=rr.default;const zo=fr(Uo);class gn{static DateTimeFormat(e,t=L.language,i,n){const o=new Date(e);return n?new Intl.DateTimeFormat(t,i).format(o).replace(/\//g,n):new Intl.DateTimeFormat(t,i).format(o)}static RelativeTimeFormat(e,t=L.language){const n=new Date().getTime()-e,o=Math.round(n/1e3),a=new Intl.RelativeTimeFormat(t,{style:"long"});return o<60?a.format(-o,"second"):o<3600?a.format(-Math.floor(o/60),"minute"):o<86400?a.format(-Math.floor(o/3600),"hour"):o<2592e3?a.format(-Math.floor(o/86400),"day"):o<31104e3?a.format(-Math.floor(o/2592e3),"month"):a.format(-Math.floor(o/31104e3),"year")}static secondToTimeString(e){let t=Math.floor(e/60),i=e%60,n=Math.floor(t/60);t%=60;let o=Math.floor(n/24);n%=24;let a="";return o>0&&(a+=L.t("common.days",{count:o,defaultValue:"{{ count }} 天"})+" "),n>0&&(a+=L.t("common.hours",{count:n,defaultValue:"{{ count }} 小时"})+" "),t>0&&(a+=L.t("common.minutes",{count:t,defaultValue:"{{ count }} 分钟"})+" "),i>0&&(a+=L.t("common.seconds",{count:i,defaultValue:"{{ count }} 秒"})+" "),a.trim()}}class Ko{constructor(e){C(this,"schemas");this.schemas=e}isEmpty(){return!this.schemas}getValue(e,t){if(!this.isEmpty()&&e.toString()in this.schemas)return new t(this.schemas[e.toString()])}}class ir{constructor(e,t,i,n){C(this,"isRefresh");C(this,"target");C(this,"name");C(this,"method");C(this,"execCount",0);this.target=e,this.name=t,this.method=i,this.isRefresh=n}execute(){!this.isRefresh&&this.execCount.valueOf()>0||(this.method.call(this.target),this.execCount=this.execCount.valueOf()+1)}}class hn{constructor(){C(this,"documentFunctions");this.documentFunctions=new Set}geDocumentFunctionCount(){return this.documentFunctions.size}getDocumentFunctions(){return this.documentFunctions}registerDocumentFunction(e){this.documentFunctions.add(e)}getDocumentFunction(e){if(!(!e||!this.documentFunctions)){for(const t of this.documentFunctions)if(t.name===e)return t}}}class Jo{constructor(e){C(this,"config");C(this,"themeconfigs");C(this,"currPageData",new Map);C(this,"documentFunctionFactory",new hn);C(this,"events",new Map);C(this,"REFRESH_EVENT_NAME","sakura:refresh");this.config=e,this.themeconfigs=new Map,this.refreshThemeConfig()}translate(e,t,i){return S.$t?S.$t(e,{defaultValue:t,...i}):t}refreshThemeConfig(){if(this.config)try{Object.keys(this.config).forEach(e=>{let t=new Ko(this.config[e]);this.themeconfigs.set(e,t)})}catch(e){console.error("解析 themeConfig 失败:",e)}}getThemeConfig(e,t,i){let n=this.themeconfigs.get(e);if(n)return n.getValue(t,i)}getPageConfig(e){if(this.currPageData.has(e))return this.currPageData.get(e)}refresh(){this.prepareRefresh(),this.initEventMulticaster(),this.mountGlobalFunction(),this.registerRoute(),this.obtainFunctionFactory(),this.registerDomProcessors(),this.finishDocumentFunction(),this.finishRefresh()}mountGlobalProperty(e,t){Object.getOwnPropertyDescriptor(S,`$${e}`)||Object.defineProperty(S,`$${e}`,{value:t,writable:!1,enumerable:!1,configurable:!1})}mountGlobalFunction(){var t,i,n,o,a,s,u;((t=S.getThemeConfig("toast","open_toast",Boolean))==null?void 0:t.valueOf())&&!Object.getOwnPropertyDescriptor(S,"$toast")&&Object.defineProperty(S,"$toast",{value:new Hi({width:(i=S.getThemeConfig("toast","toast_width",Number))==null?void 0:i.valueOf(),height:(n=S.getThemeConfig("toast","toast_height",Number))==null?void 0:n.valueOf(),top:(o=S.getThemeConfig("toast","toast_top",String))==null?void 0:o.valueOf(),background:(a=S.getThemeConfig("general","theme_skin",String))==null?void 0:a.valueOf(),color:(s=S.getThemeConfig("toast","toast_color",String))==null?void 0:s.valueOf(),fontSize:(u=S.getThemeConfig("toast","toast_font_size",Number))==null?void 0:u.valueOf()}),writable:!0,configurable:!0,enumerable:!1}),Object.getOwnPropertyDescriptor(S,"$t")?S.$localize("[data-i18n]"):L.use(Xn).use(tr).init({backend:{backends:[nr,{type:"backend",read(l,c,f){hr(Object.assign({"./languages/en.json":()=>j(()=>import("./assets/en-f34a428a.js"),[]),"./languages/ja.json":()=>j(()=>import("./assets/ja-7cf8f196.js"),[]),"./languages/zh.json":()=>j(()=>import("./assets/zh-de28e367.js"),[])}),`./languages/${l}.json`).then(g=>{f(null,g.default)}).catch(g=>{f(g,null)})},init:()=>{}}],backendOptions:[{prefix:"i18next_sakura_",defaultVersion:S.getPageConfig("version")}]},debug:!1,lowerCaseLng:!0,cleanCode:!0,interpolation:{format:function(l,c,f,g){var h,v;const d=g==null?void 0:g.params;switch(c){case"datetimeFormat":let y=d==null?void 0:d.options;if(!y){switch((h=S.getThemeConfig("general","date_format",String))==null?void 0:h.valueOf()){case"time":y={hour:"numeric",minute:"numeric",second:"numeric"};break;case"datetime":y={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",second:"numeric"};break;case"date":default:y={year:"numeric",month:"2-digit",day:"2-digit"};break}(v=S.getThemeConfig("general","hour12",Boolean))!=null&&v.valueOf()&&(y.hour12=!0)}return gn.DateTimeFormat(l,f,y,d==null?void 0:d.separator);case"relativeTimeFormat":return gn.RelativeTimeFormat(l,f);default:return l}},escapeValue:!1}}).then(l=>{let c=this.events.get("sakura:i18n");c||(c=new CustomEvent("sakura:i18n"),this.events.set("sakura:i18n",c)),window.dispatchEvent(c),Object.defineProperty(S,"$t",{value:l,writable:!1,configurable:!1,enumerable:!1});const f=zo.init(L,{selectorAttr:"data-i18n",targetAttr:"i18n-target",optionsAttr:"i18n-options",useOptionsAttr:!0,parseDefaultValueFromContent:!0,document:window.document});f("[data-i18n]"),Object.defineProperty(S,"$localize",{value:f,writable:!1,configurable:!1,enumerable:!1})})}registerDocumentFunction(e){this.obtainFunctionFactory(),this.documentFunctionFactory.registerDocumentFunction(e),e.execute()}finishDocumentFunction(){const e=this.documentFunctionFactory.getDocumentFunctions();for(const t of e)t.execute()}registerDomProcessors(){var t;let e=Wo();for(const i of e){const n=i;this.documentFunctionFactory.registerDocumentFunction(new ir(n.target,n.propertyKey,n.method,n.isRefresh))}e.clear(),(t=this.getThemeConfig("advanced","log",Boolean))!=null&&t.valueOf()&&console.log("共获取预设 documentFunction "+ve.size+" 个")}obtainFunctionFactory(){return this.documentFunctionFactory||(this.documentFunctionFactory=new hn),this.documentFunctionFactory}prepareRefresh(){var e;this.refreshMetadata(),(e=this.getThemeConfig("advanced","log",Boolean))!=null&&e.valueOf()&&console.log("Sakura Refreshing")}refreshMetadata(){try{this.currPageData=ge.jsonToMap(pageData)}catch(e){console.error("解析 pageData 失败:",e)}}async registerRoute(){const e=this.currPageData.get("_templateId");if(!e)return;const t=`./page/${e}.min.js`;await j(()=>import(t),[])}initEventMulticaster(){let e=this.events.get(this.REFRESH_EVENT_NAME);e||(e=new CustomEvent(this.REFRESH_EVENT_NAME.toString(),{detail:{pageData:this.currPageData}}),this.events.set(this.REFRESH_EVENT_NAME,e))}finishRefresh(){var t;let e=this.events.get(this.REFRESH_EVENT_NAME);window.dispatchEvent(e),(t=this.getThemeConfig("advanced","log",Boolean))!=null&&t.valueOf()&&console.log("finish Refreshing"),console.log("%c Github %c","background:#24272A; color:#ffffff","","https://github.com/LIlGG/halo-theme-Sakura")}}var S=new Jo(config);window.sakura=S;S.refresh();var ve;function Wo(){return ve}function P(r=!0){return function(e,t,i){if(!S){ve||(ve=new Set);const n={target:e,propertyKey:t,method:i.value,isRefresh:r};ve.add(n);return}S.registerDocumentFunction(new ir(e,t,i.value,r))}}export{gn as I,ge as U,j as _,P as d,S as s}; +*/const pn=Object.freeze({left:0,top:0,width:16,height:16}),Ae=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Se=Object.freeze({...pn,...Ae}),nt=Object.freeze({...Se,body:"",hidden:!1});function br(r,e){const t={};!r.hFlip!=!e.hFlip&&(t.hFlip=!0),!r.vFlip!=!e.vFlip&&(t.vFlip=!0);const i=((r.rotate||0)+(e.rotate||0))%4;return i&&(t.rotate=i),t}function _t(r,e){const t=br(r,e);for(const i in nt)i in Ae?i in r&&!(i in t)&&(t[i]=Ae[i]):i in e?t[i]=e[i]:i in r&&(t[i]=r[i]);return t}function Sr(r,e){const t=r.icons,i=r.aliases||Object.create(null),n=Object.create(null);function o(a){if(t[a])return n[a]=[];if(!(a in n)){n[a]=null;const s=i[a]&&i[a].parent,u=s&&o(s);u&&(n[a]=[s].concat(u))}return n[a]}return(e||Object.keys(t).concat(Object.keys(i))).forEach(o),n}function wr(r,e,t){const i=r.icons,n=r.aliases||Object.create(null);let o={};function a(s){o=_t(i[s]||n[s],o)}return a(e),t.forEach(a),_t(r,o)}function mn(r,e){const t=[];if(typeof r!="object"||typeof r.icons!="object")return t;r.not_found instanceof Array&&r.not_found.forEach(n=>{e(n,null),t.push(n)});const i=Sr(r);for(const n in i){const o=i[n];o&&(e(n,wr(r,n,o)),t.push(n))}return t}const pe=/^[a-z0-9]+(-[a-z0-9]+)*$/,ie=(r,e,t,i="")=>{const n=r.split(":");if(r.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),u=n.pop(),f={provider:n.length>0?n[0]:i,prefix:u,name:s};return e&&!Ie(f)?null:f}const o=n[0],a=o.split("-");if(a.length>1){const s={provider:i,prefix:a.shift(),name:a.join("-")};return e&&!Ie(s)?null:s}if(t&&i===""){const s={provider:i,prefix:"",name:o};return e&&!Ie(s,t)?null:s}return null},Ie=(r,e)=>r?!!((r.provider===""||r.provider.match(pe))&&(e&&r.prefix===""||r.prefix.match(pe))&&r.name.match(pe)):!1,Or={provider:"",aliases:{},not_found:{},...pn};function Ye(r,e){for(const t in e)if(t in r&&typeof r[t]!=typeof e[t])return!1;return!0}function vn(r){if(typeof r!="object"||r===null)return null;const e=r;if(typeof e.prefix!="string"||!r.icons||typeof r.icons!="object"||!Ye(r,Or))return null;const t=e.icons;for(const n in t){const o=t[n];if(!n.match(pe)||typeof o.body!="string"||!Ye(o,nt))return null}const i=e.aliases||Object.create(null);for(const n in i){const o=i[n],a=o.parent;if(!n.match(pe)||typeof a!="string"||!t[a]&&!i[a]||!Ye(o,nt))return null}return e}const Ne=Object.create(null);function xr(r,e){return{provider:r,prefix:e,icons:Object.create(null),missing:new Set}}function H(r,e){const t=Ne[r]||(Ne[r]=Object.create(null));return t[e]||(t[e]=xr(r,e))}function pt(r,e){return vn(e)?mn(e,(t,i)=>{i?r.icons[t]=i:r.missing.add(t)}):[]}function kr(r,e,t){try{if(typeof t.body=="string")return r.icons[e]={...t},!0}catch{}return!1}function Lr(r,e){let t=[];return(typeof r=="string"?[r]:Object.keys(Ne)).forEach(n=>{(typeof n=="string"&&typeof e=="string"?[e]:Object.keys(Ne[n]||{})).forEach(a=>{const s=H(n,a);t=t.concat(Object.keys(s.icons).map(u=>(n!==""?"@"+n+":":"")+a+":"+u))})}),t}let ye=!1;function Pr(r){return typeof r=="boolean"&&(ye=r),ye}function we(r){const e=typeof r=="string"?ie(r,!0,ye):r;if(e){const t=H(e.provider,e.prefix),i=e.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}function yn(r,e){const t=ie(r,!0,ye);if(!t)return!1;const i=H(t.provider,t.prefix);return kr(i,t.name,e)}function bn(r,e){if(typeof r!="object")return!1;if(typeof e!="string"&&(e=r.provider||""),ye&&!e&&!r.prefix){let n=!1;return vn(r)&&(r.prefix="",mn(r,(o,a)=>{a&&yn(o,a)&&(n=!0)})),n}const t=r.prefix;if(!Ie({provider:e,prefix:t,name:"a"}))return!1;const i=H(e,t);return!!pt(i,r)}function Cr(r){return!!we(r)}function Er(r){const e=we(r);return e?{...Se,...e}:null}const Sn=Object.freeze({width:null,height:null}),wn=Object.freeze({...Sn,...Ae}),Tr=/(-?[0-9.]*[0-9]+[0-9.]*)/g,_r=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function rt(r,e,t){if(e===1)return r;if(t=t||100,typeof r=="number")return Math.ceil(r*e*t)/t;if(typeof r!="string")return r;const i=r.split(Tr);if(i===null||!i.length)return r;const n=[];let o=i.shift(),a=_r.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?n.push(o):n.push(Math.ceil(s*e*t)/t)}else n.push(o);if(o=i.shift(),o===void 0)return n.join("");a=!a}}const jr=r=>r==="unset"||r==="undefined"||r==="none";function He(r,e){const t={...Se,...r},i={...wn,...e},n={left:t.left,top:t.top,width:t.width,height:t.height};let o=t.body;[t,i].forEach(h=>{const v=[],y=h.hFlip,p=h.vFlip;let m=h.rotate;y?p?m+=2:(v.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),v.push("scale(-1 1)"),n.top=n.left=0):p&&(v.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),v.push("scale(1 -1)"),n.top=n.left=0);let b;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:b=n.height/2+n.top,v.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:v.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:b=n.width/2+n.left,v.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}m%2===1&&(n.left!==n.top&&(b=n.left,n.left=n.top,n.top=b),n.width!==n.height&&(b=n.width,n.width=n.height,n.height=b)),v.length&&(o=''+o+"")});const a=i.width,s=i.height,u=n.width,f=n.height;let c,l;a===null?(l=s===null?"1em":s==="auto"?f:s,c=rt(l,u/f)):(c=a==="auto"?u:a,l=s===null?rt(c,f/u):s==="auto"?f:s);const g={},d=(h,v)=>{jr(v)||(g[h]=v.toString())};return d("width",c),d("height",l),g.viewBox=n.left.toString()+" "+n.top.toString()+" "+u.toString()+" "+f.toString(),{attributes:g,body:o}}const Ir=/\sid="(\S+)"/g,Rr="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ar=0;function On(r,e=Rr){const t=[];let i;for(;i=Ir.exec(r);)t.push(i[1]);if(!t.length)return r;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const a=typeof e=="function"?e(o):e+(Ar++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+n+"$3")}),r=r.replace(new RegExp(n,"g"),""),r}const G={local:!0,session:!0},xn={local:new Set,session:new Set};let mt=!1;function Nr(r){mt=r}const jt="iconify2",be="iconify",kn=be+"-count",It=be+"-version",Ln=36e5,Fr=168;function it(r,e){try{return r.getItem(e)}catch{}}function vt(r,e,t){try{return r.setItem(e,t),!0}catch{}}function Rt(r,e){try{r.removeItem(e)}catch{}}function ot(r,e){return vt(r,kn,e.toString())}function at(r){return parseInt(it(r,kn))||0}let Ee=typeof window>"u"?{}:window;function Pn(r){const e=r+"Storage";try{if(Ee&&Ee[e]&&typeof Ee[e].length=="number")return Ee[e]}catch{}G[r]=!1}function Cn(r,e){const t=Pn(r);if(!t)return;const i=it(t,It);if(i!==jt){if(i){const s=at(t);for(let u=0;u{const u=be+s.toString(),f=it(t,u);if(typeof f=="string"){try{const c=JSON.parse(f);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>n&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&e(c,s))return!0}catch{}Rt(t,u)}};let a=at(t);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,ot(t,a)):xn[r].add(s))}function En(){if(!mt){Nr(!0);for(const r in G)Cn(r,e=>{const t=e.data,i=e.provider,n=t.prefix,o=H(i,n);if(!pt(o,t).length)return!1;const a=t.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Tn(r,e){switch(r){case"local":case"session":G[r]=e;break;case"all":for(const t in G)G[t]=e;break}}const st=Object.create(null);function _n(r,e){st[r]=e}function ut(r){return st[r]||st[""]}function yt(r){let e;if(typeof r.resources=="string")e=[r.resources];else if(e=r.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:r.path||"/",maxURL:r.maxURL||500,rotate:r.rotate||750,timeout:r.timeout||5e3,random:r.random===!0,index:r.index||0,dataAfterTimeout:r.dataAfterTimeout!==!1}}const Be=Object.create(null),ce=["https://api.simplesvg.com","https://api.unisvg.com"],Re=[];for(;ce.length>0;)ce.length===1||Math.random()>.5?Re.push(ce.shift()):Re.push(ce.pop());Be[""]=yt({resources:["https://api.iconify.design"].concat(Re)});function jn(r,e){const t=yt(e);return t===null?!1:(Be[r]=t,!0)}function Ve(r){return Be[r]}function qr(){return Object.keys(Be)}const Dr=()=>{let r;try{if(r=fetch,typeof r=="function")return r}catch{}};let Fe=Dr();function Mr(r){Fe=r}function $r(){return Fe}function Hr(r,e){const t=Ve(r);if(!t)return 0;let i;if(!t.maxURL)i=0;else{let n=0;t.resources.forEach(a=>{n=Math.max(n,a.length)});const o=e+".json?icons=";i=t.maxURL-n-t.path.length-o.length}return i}function Br(r){return r===404}const Vr=(r,e,t)=>{const i=[],n=Hr(r,e),o="icons";let a={type:o,provider:r,prefix:e,icons:[]},s=0;return t.forEach((u,f)=>{s+=u.length+1,s>=n&&f>0&&(i.push(a),a={type:o,provider:r,prefix:e,icons:[]},s=u.length),a.icons.push(u)}),i.push(a),i};function Ur(r){if(typeof r=="string"){const e=Ve(r);if(e)return e.path}return"/"}const zr=(r,e,t)=>{if(!Fe){t("abort",424);return}let i=Ur(e.provider);switch(e.type){case"icons":{const o=e.prefix,s=e.icons.join(","),u=new URLSearchParams({icons:s});i+=o+".json?"+u.toString();break}case"custom":{const o=e.uri;i+=o.slice(0,1)==="/"?o.slice(1):o;break}default:t("abort",400);return}let n=503;Fe(r+i).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{t(Br(a)?"abort":"next",a)});return}return n=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?t("abort",o):t("next",n)});return}setTimeout(()=>{t("success",o)})}).catch(()=>{t("next",n)})},Kr={prepare:Vr,send:zr};function Jr(r){const e={loaded:[],missing:[],pending:[]},t=Object.create(null);r.sort((n,o)=>n.provider!==o.provider?n.provider.localeCompare(o.provider):n.prefix!==o.prefix?n.prefix.localeCompare(o.prefix):n.name.localeCompare(o.name));let i={provider:"",prefix:"",name:""};return r.forEach(n=>{if(i.name===n.name&&i.prefix===n.prefix&&i.provider===n.provider)return;i=n;const o=n.provider,a=n.prefix,s=n.name,u=t[o]||(t[o]=Object.create(null)),f=u[a]||(u[a]=H(o,a));let c;s in f.icons?c=e.loaded:a===""||f.missing.has(s)?c=e.missing:c=e.pending;const l={provider:o,prefix:a,name:s};c.push(l)}),e}function In(r,e){r.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(n=>n.id!==e))})}function Wr(r){r.pendingCallbacksFlag||(r.pendingCallbacksFlag=!0,setTimeout(()=>{r.pendingCallbacksFlag=!1;const e=r.loaderCallbacks?r.loaderCallbacks.slice(0):[];if(!e.length)return;let t=!1;const i=r.provider,n=r.prefix;e.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(u=>{if(u.prefix!==n)return!0;const f=u.name;if(r.icons[f])a.loaded.push({provider:i,prefix:n,name:f});else if(r.missing.has(f))a.missing.push({provider:i,prefix:n,name:f});else return t=!0,!0;return!1}),a.pending.length!==s&&(t||In([r],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Qr=0;function Gr(r,e,t){const i=Qr++,n=In.bind(null,t,i);if(!e.pending.length)return n;const o={id:i,icons:e,callback:r,abort:n};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),n}function Yr(r,e=!0,t=!1){const i=[];return r.forEach(n=>{const o=typeof n=="string"?ie(n,e,t):n;o&&i.push(o)}),i}var Zr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Xr(r,e,t,i){const n=r.resources.length,o=r.random?Math.floor(Math.random()*n):r.index;let a;if(r.random){let O=r.resources.slice(0);for(a=[];O.length>1;){const k=Math.floor(Math.random()*O.length);a.push(O[k]),O=O.slice(0,k).concat(O.slice(k+1))}a=a.concat(O)}else a=r.resources.slice(o).concat(r.resources.slice(0,o));const s=Date.now();let u="pending",f=0,c,l=null,g=[],d=[];typeof i=="function"&&d.push(i);function h(){l&&(clearTimeout(l),l=null)}function v(){u==="pending"&&(u="aborted"),h(),g.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),g=[]}function y(O,k){k&&(d=[]),typeof O=="function"&&d.push(O)}function p(){return{startTime:s,payload:e,status:u,queriesSent:f,queriesPending:g.length,subscribe:y,abort:v}}function m(){u="failed",d.forEach(O=>{O(void 0,c)})}function b(){g.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),g=[]}function w(O,k,T){const D=k!=="success";switch(g=g.filter(_=>_!==O),u){case"pending":break;case"failed":if(D||!r.dataAfterTimeout)return;break;default:return}if(k==="abort"){c=T,m();return}if(D){c=T,g.length||(a.length?x():m());return}if(h(),b(),!r.random){const _=r.resources.indexOf(O.resource);_!==-1&&_!==r.index&&(r.index=_)}u="completed",d.forEach(_=>{_(T)})}function x(){if(u!=="pending")return;h();const O=a.shift();if(O===void 0){if(g.length){l=setTimeout(()=>{h(),u==="pending"&&(b(),m())},r.timeout);return}m();return}const k={status:"pending",resource:O,callback:(T,D)=>{w(k,T,D)}};g.push(k),f++,l=setTimeout(x,r.rotate),t(O,e,k.callback)}return setTimeout(x),p}function Rn(r){const e={...Zr,...r};let t=[];function i(){t=t.filter(s=>s().status==="pending")}function n(s,u,f){const c=Xr(e,s,u,(l,g)=>{i(),f&&f(l,g)});return t.push(c),c}function o(s){return t.find(u=>s(u))||null}return{query:n,find:o,setIndex:s=>{e.index=s},getIndex:()=>e.index,cleanup:i}}function At(){}const Ze=Object.create(null);function ei(r){if(!Ze[r]){const e=Ve(r);if(!e)return;const t=Rn(e),i={config:e,redundancy:t};Ze[r]=i}return Ze[r]}function An(r,e,t){let i,n;if(typeof r=="string"){const o=ut(r);if(!o)return t(void 0,424),At;n=o.send;const a=ei(r);a&&(i=a.redundancy)}else{const o=yt(r);if(o){i=Rn(o);const a=r.resources?r.resources[0]:"",s=ut(a);s&&(n=s.send)}}return!i||!n?(t(void 0,424),At):i.query(e,n,t)().abort}function ti(r,e){const t=r.lastModifiedCached;if(t&&t>=e)return t===e;if(r.lastModifiedCached=e,t)for(const i in G)Cn(i,n=>{const o=n.data;return n.provider!==r.provider||o.prefix!==r.prefix||o.lastModified===e});return!0}function ni(r,e){mt||En();function t(i){let n;if(!G[i]||!(n=Pn(i)))return;const o=xn[i];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=at(n),!ot(n,a+1))return;const s={cached:Math.floor(Date.now()/Ln),provider:r.provider,data:e};return vt(n,be+a.toString(),JSON.stringify(s))}e.lastModified&&!ti(r,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),t("local")||t("session"))}function Nt(){}function ri(r){r.iconsLoaderFlag||(r.iconsLoaderFlag=!0,setTimeout(()=>{r.iconsLoaderFlag=!1,Wr(r)}))}function ii(r,e){r.iconsToLoad?r.iconsToLoad=r.iconsToLoad.concat(e).sort():r.iconsToLoad=e,r.iconsQueueFlag||(r.iconsQueueFlag=!0,setTimeout(()=>{r.iconsQueueFlag=!1;const{provider:t,prefix:i}=r,n=r.iconsToLoad;delete r.iconsToLoad;let o;if(!n||!(o=ut(t)))return;o.prepare(t,i,n).forEach(s=>{An(t,s,u=>{if(typeof u!="object")s.icons.forEach(f=>{r.missing.add(f)});else try{const f=pt(r,u);if(!f.length)return;const c=r.pendingIcons;c&&f.forEach(l=>{c.delete(l)}),ni(r,u)}catch(f){console.error(f)}ri(r)})})}))}const oi=r=>{const t=H(r.provider,r.prefix).pendingIcons;return!!(t&&t.has(r.name))},bt=(r,e)=>{const t=Yr(r,!0,Pr()),i=Jr(t);if(!i.pending.length){let u=!0;return e&&setTimeout(()=>{u&&e(i.loaded,i.missing,i.pending,Nt)}),()=>{u=!1}}const n=Object.create(null),o=[];let a,s;return i.pending.forEach(u=>{const{provider:f,prefix:c}=u;if(c===s&&f===a)return;a=f,s=c,o.push(H(f,c));const l=n[f]||(n[f]=Object.create(null));l[c]||(l[c]=[])}),i.pending.forEach(u=>{const{provider:f,prefix:c,name:l}=u,g=H(f,c),d=g.pendingIcons||(g.pendingIcons=new Set);d.has(l)||(d.add(l),n[f][c].push(l))}),o.forEach(u=>{const{provider:f,prefix:c}=u;n[f][c].length&&ii(u,n[f][c])}),e?Gr(e,i,o):Nt},ai=r=>new Promise((e,t)=>{const i=typeof r=="string"?ie(r,!0):r;if(!i){t(r);return}bt([i||r],n=>{if(n.length&&i){const o=we(i);if(o){e({...Se,...o});return}}t(r)})});function Nn(r,e){const t={...r};for(const i in e){const n=e[i],o=typeof n;i in Sn?(n===null||n&&(o==="string"||o==="number"))&&(t[i]=n):o===typeof t[i]&&(t[i]=i==="rotate"?n%4:n)}return t}const Ue={...wn,inline:!1},Xe="iconify",ct="iconify-inline",K="iconifyData"+Date.now();let Y=[];function Oe(r){for(let e=0;edocument.documentElement})}function ui(r){Y=Y.filter(e=>r!==e&&r!==(typeof e.node=="function"?e.node():e.node))}function xe(){return Y}function ci(r){const e=document;e.readyState&&e.readyState!=="loading"?r():e.addEventListener("DOMContentLoaded",r)}let me=null;const li={childList:!0,subtree:!0,attributes:!0};function qn(r){if(!r.observer)return;const e=r.observer;e.pendingScan||(e.pendingScan=setTimeout(()=>{delete e.pendingScan,me&&me(r)}))}function fi(r,e){if(!r.observer)return;const t=r.observer;if(!t.pendingScan)for(let i=0;i0||n.type==="attributes"&&n.target[K]!==void 0){t.paused||qn(r);return}}}function Dn(r,e){r.observer.instance.observe(e,li)}function qe(r){let e=r.observer;if(e&&e.instance)return;const t=typeof r.node=="function"?r.node():r.node;!t||!window||(e||(e={paused:0},r.observer=e),e.instance=new window.MutationObserver(fi.bind(null,r)),Dn(r,t),e.paused||qn(r))}function Ft(){xe().forEach(qe)}function Mn(r){if(!r.observer)return;const e=r.observer;e.pendingScan&&(clearTimeout(e.pendingScan),delete e.pendingScan),e.instance&&(e.instance.disconnect(),delete e.instance)}function di(r){const e=me!==null;if(me!==r&&(me=r,e&&xe().forEach(Mn)),e){Ft();return}ci(Ft)}function lt(r){(r?[r]:xe()).forEach(e=>{if(!e.observer){e.observer={paused:1};return}const t=e.observer;if(t.paused++,t.paused>1||!t.instance)return;t.instance.disconnect()})}function gi(r){if(r){const e=Oe(r);e&<(e)}else lt()}function ft(r){(r?[r]:xe()).forEach(e=>{if(!e.observer){qe(e);return}const t=e.observer;if(t.paused&&(t.paused--,!t.paused)){const i=typeof e.node=="function"?e.node():e.node;if(i)t.instance?Dn(e,i):qe(e);else return}})}function hi(r){if(r){const e=Oe(r);e&&ft(e)}else ft()}function $n(r,e=!1){const t=Fn(r,e);return qe(t),t}function Hn(r){const e=Oe(r);e&&(Mn(e),ui(r))}function pi(r,e){if(r.name!==e.name||r.mode!==e.mode)return!0;const t=r.customisations,i=e.customisations;for(const n in Ue)if(t[n]!==i[n])return!0;return!1}function mi(r,e=0){const t=r.replace(/^-?[0-9.]*/,"");function i(n){for(;n<0;)n+=4;return n%4}if(t===""){const n=parseInt(r);return isNaN(n)?0:i(n)}else if(t!==r){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let o=parseFloat(r.slice(0,r.length-t.length));return isNaN(o)?0:(o=o/n,o%1===0?i(o):0)}}return e}const vi=/[\s,]+/;function yi(r,e){e.split(vi).forEach(t=>{switch(t.trim()){case"horizontal":r.hFlip=!0;break;case"vertical":r.vFlip=!0;break}})}const bi=["width","height"],Si=["inline","hFlip","vFlip"];function wi(r,e){return r===e||r==="true"?!0:r===""||r==="false"?!1:null}function Oi(r){const e=r.getAttribute("data-icon"),t=typeof e=="string"&&ie(e,!0);if(!t)return null;const i={...Ue,inline:r.classList&&r.classList.contains(ct)};bi.forEach(s=>{const u=r.getAttribute("data-"+s);u&&(i[s]=u)});const n=r.getAttribute("data-rotate");typeof n=="string"&&(i.rotate=mi(n));const o=r.getAttribute("data-flip");typeof o=="string"&&yi(i,o),Si.forEach(s=>{const u="data-"+s,f=wi(r.getAttribute(u),u);typeof f=="boolean"&&(i[s]=f)});const a=r.getAttribute("data-mode");return{name:e,icon:t,customisations:i,mode:a}}const xi="svg."+Xe+", i."+Xe+", span."+Xe+", i."+ct+", span."+ct;function ki(r){const e=[];return r.querySelectorAll(xi).forEach(t=>{const i=t[K]||t.tagName.toLowerCase()!=="svg"?Oi(t):null;i&&e.push({node:t,props:i})}),e}function Bn(r,e){let t=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)t+=" "+i+'="'+e[i]+'"';return'"+r+""}function Vn(r){const e=new Set(["iconify"]);return["provider","prefix"].forEach(t=>{r[t]&&e.add("iconify--"+r[t])}),e}function Un(r,e,t,i){const n=r.classList;if(i){const a=i.classList;Array.from(a).forEach(s=>{n.add(s)})}const o=[];return e.forEach(a=>{n.contains(a)?t.has(a)&&o.push(a):(n.add(a),o.push(a))}),t.forEach(a=>{e.has(a)||n.remove(a)}),o}function zn(r,e,t){const i=r.style;(t||[]).forEach(o=>{i.removeProperty(o)});const n=[];for(const o in e)i.getPropertyValue(o)||(n.push(o),i.setProperty(o,e[o]));return n}function Kn(r,e,t){let i;try{i=document.createElement("span")}catch{return r}const n=e.customisations,o=He(t,n),a=r[K],s=Bn(On(o.body),{"aria-hidden":"true",role:"img",...o.attributes});i.innerHTML=s;const u=i.childNodes[0],f=r.attributes;for(let h=0;h/g,"%3E").replace(/\s+/g," ")}function Pi(r){return'url("data:image/svg+xml,'+Li(r)+'")'}const Ci={display:"inline-block"},dt={"background-color":"currentColor"},Jn={"background-color":"transparent"},qt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Dt={"-webkit-mask":dt,mask:dt,background:Jn};for(const r in Dt){const e=Dt[r];for(const t in qt)e[r+"-"+t]=qt[t]}function Mt(r){return r+(r.match(/^[-0-9.]+$/)?"px":"")}function Ei(r,e,t,i){const n=e.customisations,o=He(t,n),a=o.attributes,s=r[K],u=Bn(o.body,{...a,width:t.width+"",height:t.height+""}),f=Vn(e.icon),c=Un(r,f,new Set(s&&s.addedClasses)),g={"--svg":Pi(u),width:Mt(a.width),height:Mt(a.height),...Ci,...i?dt:Jn};n.inline&&(g["vertical-align"]="-0.125em");const d=zn(r,g,s&&s.addedStyles),h={...e,status:"loaded",addedClasses:c,addedStyles:d};return r[K]=h,r}let Te=!1;function Ti(){Te||(Te=!0,setTimeout(()=>{Te&&(Te=!1,re())}))}function re(r,e=!1){const t=Object.create(null);function i(n,o){const{provider:a,prefix:s,name:u}=n,f=H(a,s),c=f.icons[u];if(c)return{status:"loaded",icon:c};if(f.missing.has(u))return{status:"missing"};if(o&&!oi(n)){const l=t[a]||(t[a]=Object.create(null));(l[s]||(l[s]=new Set)).add(u)}return{status:"loading"}}(r?[r]:xe()).forEach(n=>{const o=typeof n.node=="function"?n.node():n.node;if(!o||!o.querySelectorAll)return;let a=!1,s=!1;function u(f,c,l){if(s||(s=!0,lt(n)),f.tagName.toUpperCase()!=="SVG"){const g=c.mode,d=g==="mask"||(g==="bg"?!1:g==="style"?l.body.indexOf("currentColor")!==-1:null);if(typeof d=="boolean"){Ei(f,c,{...Se,...l},d);return}}Kn(f,c,l)}ki(o).forEach(({node:f,props:c})=>{const l=f[K];if(!l){const{status:d,icon:h}=i(c.icon,!0);if(h){u(f,c,h);return}a=a||d==="loading",f[K]={...c,status:d};return}let g;if(pi(l,c)){if(g=i(c.icon,l.name!==c.name),!g.icon){a=a||g.status==="loading",Object.assign(l,{...c,status:g.status});return}}else{if(l.status!=="loading")return;if(g=i(c.icon,!1),!g.icon){l.status=g.status;return}}u(f,c,g.icon)}),n.temporary&&!a?Hn(o):e&&a?$n(o,!0):s&&n.observer&&ft(n)});for(const n in t){const o=t[n];for(const a in o){const s=o[a];bt(Array.from(s).map(u=>({provider:n,prefix:a,name:u})),Ti)}}}function _i(r){const e=Oe(r);e?re(e):re({node:r,temporary:!0},!0)}function Wn(r,e,t=!1){const i=we(r);if(!i)return null;const n=ie(r),o=Nn(Ue,e||{}),a=Kn(document.createElement("span"),{name:r,icon:n,customisations:o},i);return t?a.outerHTML:a}function ji(){return"3.1.0"}function Ii(r,e){return Wn(r,e,!1)}function Ri(r,e){return Wn(r,e,!0)}function Ai(r,e){const t=we(r);if(!t)return null;const i=Nn(Ue,e||{});return He(t,i)}function Ni(r){r?_i(r):re()}if(typeof document<"u"&&typeof window<"u"){si();const r=window;if(r.IconifyPreload!==void 0){const e=r.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!bn(i))&&console.error(t)}catch{console.error(t)}})}setTimeout(()=>{di(re),re()})}function Fi(r,e){Tn(r,e!==!1)}function qi(r){Tn(r,!0)}_n("",Kr);if(typeof document<"u"&&typeof window<"u"){En();const r=window;if(r.IconifyProviders!==void 0){const e=r.IconifyProviders;if(typeof e=="object"&&e!==null)for(const t in e){const i="IconifyProviders["+t+"] is invalid.";try{const n=e[t];if(typeof n!="object"||!n||n.resources===void 0)continue;jn(t,n)||console.error(i)}catch{console.error(i)}}}}const Di={getAPIConfig:Ve,setAPIModule:_n,sendAPIQuery:An,setFetch:Mr,getFetch:$r,listAPIProviders:qr},gt={_api:Di,addAPIProvider:jn,loadIcons:bt,loadIcon:ai,iconExists:Cr,getIcon:Er,listIcons:Lr,addIcon:yn,addCollection:bn,replaceIDs:On,calculateSize:rt,buildIcon:He,getVersion:ji,renderSVG:Ii,renderHTML:Ri,renderIcon:Ai,scan:Ni,observe:$n,stopObserving:Hn,pauseObserver:gi,resumeObserver:hi,enableCache:Fi,disableCache:qi};try{self.Iconify===void 0&&(self.Iconify=gt)}catch{}const Mi=gt.default||gt,$i=JSON.parse('[{"prefix":"fa","width":1536,"height":1536,"icons":{"chevron-left":{"body":"","width":1088,"height":1664},"creative-commons":{"body":"","width":1792,"height":1792},"meetup":{"body":"","width":1856,"height":1792},"vimeo":{"body":"","width":1664,"height":1408},"chevron-right":{"body":"","width":1088,"height":1664,"hFlip":true}}},{"prefix":"system-uicons","width":21,"height":21,"icons":{"tags":{"body":""}}},{"prefix":"akar-icons","width":24,"height":24,"icons":{"arrow-forward-thick":{"body":""},"more-horizontal-fill":{"body":""}}}]');$i.forEach(r=>Mi.addCollection(r));class Hi{constructor(e){C(this,"_t",null);C(this,"_timeOut",null);C(this,"_settings",{duration:2e3,width:260,height:60,top:"top",background:"#fe9600",color:"#fff",fontSize:14});e&&(this._settings={...this._settings,...e})}create(e,t){if(this._timeOut&&(clearTimeout(this._timeOut),this._t&&(document.body.removeChild(this._t),this._t=null)),!e){console.error("提示文本不能为空");return}this._t=document.createElement("div"),this._t.className="t-toast",this._t.innerHTML=`

${e}

`,document.body.appendChild(this._t),this.setStyle(),this._timeOut=setTimeout(()=>{this._t&&(document.body.removeChild(this._t),this._t=null),this._timeOut=null},t??this._settings.duration)}setStyle(){if(!this._t){console.error("Toast元素未创建");return}this._t.style.width=`${this._settings.width}px`,this._t.style.height=`${this._settings.height}px`,this._t.style.position="fixed",this._t.style.textAlign="center",this._t.style.zIndex="99999",typeof this._settings.top=="string"&&isNaN(Number(this._settings.top))?this._settings.top==="center"?this._t.style.top=`${window.innerHeight/2}px`:this._settings.top==="top"&&(this._t.style.top="0px"):this._t.style.top=typeof this._settings.top=="number"?`${this._settings.top}px`:"",this._t.style.left="50%",this._t.style.marginLeft=`-${this._settings.width/2}px`,this._t.style.background=this._settings.background,this._t.style.color=this._settings.color,this._t.style.borderBottomLeftRadius="4px",this._t.style.borderBottomRightRadius="4px",this._t.style.fontSize=`${this._settings.fontSize}px`,this._t.style.display="flex",this._t.style.justifyContent="center",this._t.style.alignItems="center"}}function F(r){"@babel/helpers - typeof";return F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(r)}function I(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Bi(r,e){if(F(r)!=="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||"default");if(F(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Qn(r){var e=Bi(r,"string");return F(e)==="symbol"?e:String(e)}function $t(r,e){for(var t=0;tr.length)&&(e=r.length);for(var t=0,i=new Array(e);t1&&arguments[1]!==void 0?arguments[1]:{};I(this,r),this.init(e,t)}return R(r,[{key:"init",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=i.prefix||"i18next:",this.logger=t||Wi,this.options=i,this.debug=i.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,i=new Array(t),n=0;n1?i-1:0),o=1;o-1?s.replace(/###/g,"."):s}function n(){return!r||typeof r=="string"}for(var o=typeof e!="string"?[].concat(e):e.split(".");o.length>1;){if(n())return{};var a=i(o.shift());!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={}}return n()?{}:{obj:r,k:i(o.shift())}}function zt(r,e,t){var i=St(r,e,Object),n=i.obj,o=i.k;n[o]=t}function Yi(r,e,t,i){var n=St(r,e,Object),o=n.obj,a=n.k;o[a]=o[a]||[],i&&(o[a]=o[a].concat(t)),i||o[a].push(t)}function De(r,e){var t=St(r,e),i=t.obj,n=t.k;if(i)return i[n]}function Zi(r,e,t){var i=De(r,t);return i!==void 0?i:De(e,t)}function Gn(r,e,t){for(var i in e)i!=="__proto__"&&i!=="constructor"&&(i in r?typeof r[i]=="string"||r[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?t&&(r[i]=e[i]):Gn(r[i],e[i],t):r[i]=e[i]);return r}function ee(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Xi={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function eo(r){return typeof r=="string"?r.replace(/[&<>"'\/]/g,function(e){return Xi[e]}):r}var Ke=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,to=[" ",",","?","!",";"];function no(r,e,t){e=e||"",t=t||"";var i=to.filter(function(s){return e.indexOf(s)<0&&t.indexOf(s)<0});if(i.length===0)return!0;var n=new RegExp("(".concat(i.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!n.test(r);if(!o){var a=r.indexOf(t);a>0&&!n.test(r.substring(0,a))&&(o=!0)}return o}function Me(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(r){if(r[e])return r[e];for(var i=e.split(t),n=r,o=0;oo+a;)a++,s=i.slice(o,o+a).join(t),u=n[s];if(u===void 0)return;if(u===null)return null;if(e.endsWith(s)){if(typeof u=="string")return u;if(s&&typeof u[s]=="string")return u[s]}var f=i.slice(o+a).join(t);return f?Me(u,f,t):void 0}n=n[i[o]]}return n}}function Kt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function _e(r){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var oo=function(r){ze(t,r);var e=ro(t);function t(i){var n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return I(this,t),n=e.call(this),Ke&&J.call(z(n)),n.data=i||{},n.options=o,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.options.ignoreJSONStructure===void 0&&(n.options.ignoreJSONStructure=!0),n}return R(t,[{key:"addNamespaces",value:function(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}},{key:"removeNamespaces",value:function(n){var o=this.options.ns.indexOf(n);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(n,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,f=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[n,o];a&&typeof a!="string"&&(c=c.concat(a)),a&&typeof a=="string"&&(c=c.concat(u?a.split(u):a)),n.indexOf(".")>-1&&(c=n.split("."));var l=De(this.data,c);return l||!f||typeof a!="string"?l:Me(this.data&&this.data[n]&&this.data[n][o],a,u)}},{key:"addResource",value:function(n,o,a,s){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,c=[n,o];a&&(c=c.concat(f?a.split(f):a)),n.indexOf(".")>-1&&(c=n.split("."),s=o,o=c[1]),this.addNamespaces(o),zt(this.data,c,s),u.silent||this.emit("added",n,o,a,s)}},{key:"addResources",value:function(n,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var u in a)(typeof a[u]=="string"||Object.prototype.toString.apply(a[u])==="[object Array]")&&this.addResource(n,o,u,a[u],{silent:!0});s.silent||this.emit("added",n,o,a)}},{key:"addResourceBundle",value:function(n,o,a,s,u){var f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[n,o];n.indexOf(".")>-1&&(c=n.split("."),s=a,a=o,o=c[1]),this.addNamespaces(o);var l=De(this.data,c)||{};s?Gn(l,a,u):l=_e(_e({},l),a),zt(this.data,c,l),f.silent||this.emit("added",n,o,a)}},{key:"removeResourceBundle",value:function(n,o){this.hasResourceBundle(n,o)&&delete this.data[n][o],this.removeNamespaces(o),this.emit("removed",n,o)}},{key:"hasResourceBundle",value:function(n,o){return this.getResource(n,o)!==void 0}},{key:"getResourceBundle",value:function(n,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?_e(_e({},{}),this.getResource(n,o)):this.getResource(n,o)}},{key:"getDataByLanguage",value:function(n){return this.data[n]}},{key:"hasLanguageSomeTranslations",value:function(n){var o=this.getDataByLanguage(n),a=o&&Object.keys(o)||[];return!!a.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),t}(J),Yn={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,i,n,o){var a=this;return e.forEach(function(s){a.processors[s]&&(t=a.processors[s].process(t,i,n,o))}),t}};function Jt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function E(r){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Wt={},Qt=function(r){ze(t,r);var e=ao(t);function t(i){var n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I(this,t),n=e.call(this),Ke&&J.call(z(n)),Gi(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,z(n)),n.options=o,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.logger=$.create("translator"),n}return R(t,[{key:"changeLanguage",value:function(n){n&&(this.language=n)}},{key:"exists",value:function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(n==null)return!1;var a=this.resolve(n,o);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(n,o){var a=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=o.ns||this.options.defaultNS||[],f=a&&n.indexOf(a)>-1,c=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!no(n,a,s);if(f&&!c){var l=n.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:n,namespaces:u};var g=n.split(a);(a!==s||a===s&&this.options.ns.indexOf(g[0])>-1)&&(u=g.shift()),n=g.join(s)}return typeof u=="string"&&(u=[u]),{key:n,namespaces:u}}},{key:"translate",value:function(n,o,a){var s=this;if(F(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),F(o)==="object"&&(o=E({},o)),o||(o={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);var u=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,f=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=this.extractFromKey(n[n.length-1],o),l=c.key,g=c.namespaces,d=g[g.length-1],h=o.lng||this.language,v=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(v){var y=o.nsSeparator||this.options.nsSeparator;return u?{res:"".concat(d).concat(y).concat(l),usedKey:l,exactUsedKey:l,usedLng:h,usedNS:d}:"".concat(d).concat(y).concat(l)}return u?{res:l,usedKey:l,exactUsedKey:l,usedLng:h,usedNS:d}:l}var p=this.resolve(n,o),m=p&&p.res,b=p&&p.usedKey||l,w=p&&p.exactUsedKey||l,x=Object.prototype.toString.apply(m),O=["[object Number]","[object Function]","[object RegExp]"],k=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,D=typeof m!="string"&&typeof m!="boolean"&&typeof m!="number";if(T&&m&&D&&O.indexOf(x)<0&&!(typeof k=="string"&&x==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,m,E(E({},o),{},{ns:g})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return u?(p.res=_,p):_}if(f){var Ot=x==="[object Array]",Le=Ot?[]:{},or=Ot?w:b;for(var Z in m)if(Object.prototype.hasOwnProperty.call(m,Z)){var xt="".concat(or).concat(f).concat(Z);Le[Z]=this.translate(xt,E(E({},o),{joinArrays:!1,ns:g})),Le[Z]===xt&&(Le[Z]=m[Z])}m=Le}}else if(T&&typeof k=="string"&&x==="[object Array]")m=m.join(k),m&&(m=this.extendTranslation(m,n,o,a));else{var Pe=!1,oe=!1,kt=o.count!==void 0&&typeof o.count!="string",Je=t.hasDefaultValue(o),ar=kt?this.pluralResolver.getSuffix(h,o.count,o):"",ae=o["defaultValue".concat(ar)]||o.defaultValue;!this.isValidLookup(m)&&Je&&(Pe=!0,m=ae),this.isValidLookup(m)||(oe=!0,m=l);var sr=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,ur=sr&&oe?void 0:m,se=Je&&ae!==m&&this.options.updateMissing;if(oe||Pe||se){if(this.logger.log(se?"updateKey":"missingKey",h,d,l,se?ae:m),f){var Lt=this.resolve(l,E(E({},o),{},{keySeparator:!1}));Lt&&Lt.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var ue=[],Ce=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ce&&Ce[0])for(var We=0;We1&&arguments[1]!==void 0?arguments[1]:{},s,u,f,c,l;return typeof n=="string"&&(n=[n]),n.forEach(function(g){if(!o.isValidLookup(s)){var d=o.extractFromKey(g,a),h=d.key;u=h;var v=d.namespaces;o.options.fallbackNS&&(v=v.concat(o.options.fallbackNS));var y=a.count!==void 0&&typeof a.count!="string",p=y&&!a.ordinal&&a.count===0&&o.pluralResolver.shouldUseIntlApi(),m=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",b=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);v.forEach(function(w){o.isValidLookup(s)||(l=w,!Wt["".concat(b[0],"-").concat(w)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(l)&&(Wt["".concat(b[0],"-").concat(w)]=!0,o.logger.warn('key "'.concat(u,'" for languages "').concat(b.join(", "),`" won't get resolved as namespace "`).concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(function(x){if(!o.isValidLookup(s)){c=x;var O=[h];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(O,h,x,w,a);else{var k;y&&(k=o.pluralResolver.getSuffix(x,a.count,a));var T="".concat(o.options.pluralSeparator,"zero");if(y&&(O.push(h+k),p&&O.push(h+T)),m){var D="".concat(h).concat(o.options.contextSeparator).concat(a.context);O.push(D),y&&(O.push(D+k),p&&O.push(D+T))}}for(var _;_=O.pop();)o.isValidLookup(s)||(f=_,s=o.getResource(x,w,_,a))}}))})}}),{res:s,usedKey:u,exactUsedKey:f,usedLng:c,usedNS:l}}},{key:"isValidLookup",value:function(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}},{key:"getResource",value:function(n,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(n,o,a,s):this.resourceStore.getResource(n,o,a,s)}}],[{key:"hasDefaultValue",value:function(n){var o="defaultValue";for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a)&&o===a.substring(0,o.length)&&n[a]!==void 0)return!0;return!1}}]),t}(J);function et(r){return r.charAt(0).toUpperCase()+r.slice(1)}var Gt=function(){function r(e){I(this,r),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}return R(r,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var i=t.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var i=t.split("-");return this.formatLanguageCode(i[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var i=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(o){return o.toLowerCase()}):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),i.indexOf(n[1].toLowerCase())>-1&&(n[1]=et(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),i.indexOf(n[1].toLowerCase())>-1&&(n[1]=et(n[1].toLowerCase())),i.indexOf(n[2].toLowerCase())>-1&&(n[2]=et(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var i=this;if(!t)return null;var n;return t.forEach(function(o){if(!n){var a=i.formatLanguageCode(o);(!i.options.supportedLngs||i.isSupportedCode(a))&&(n=a)}}),!n&&this.options.supportedLngs&&t.forEach(function(o){if(!n){var a=i.getLanguagePartFromCode(o);if(i.isSupportedCode(a))return n=a;n=i.options.supportedLngs.find(function(s){if(s===a)return s;if(!(s.indexOf("-")<0&&a.indexOf("-")<0)&&s.indexOf(a)===0)return s})}}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}},{key:"getFallbackCodes",value:function(t,i){if(!t)return[];if(typeof t=="function"&&(t=t(i)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!i)return t.default||[];var n=t[i];return n||(n=t[this.getScriptPartFromCode(i)]),n||(n=t[this.formatLanguageCode(i)]),n||(n=t[this.getLanguagePartFromCode(i)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,i){var n=this,o=this.getFallbackCodes(i||this.options.fallbackLng||[],t),a=[],s=function(f){f&&(n.isSupportedCode(f)?a.push(f):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(f)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):typeof t=="string"&&s(this.formatLanguageCode(t)),o.forEach(function(u){a.indexOf(u)<0&&s(n.formatLanguageCode(u))}),a}}]),r}(),uo=[{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}],co={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return 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 e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},lo=["v1","v2","v3"],Yt={zero:0,one:1,two:2,few:3,many:4,other:5};function fo(){var r={};return uo.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:co[e.fc]}})}),r}var go=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I(this,r),this.languageUtils=e,this.options=t,this.logger=$.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!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=fo()}return R(r,[{key:"addRule",value:function(t,i){this.rules[t]=i}},{key:"getRule",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:i.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,i);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(function(o){return"".concat(i).concat(o)})}},{key:"getSuffixes",value:function(t){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(t,n);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(a,s){return Yt[a]-Yt[s]}).map(function(a){return"".concat(i.options.prepend).concat(a)}):o.numbers.map(function(a){return i.getSuffix(t,a,n)}):[]}},{key:"getSuffix",value:function(t,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(t,n);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(i)):this.getSuffixRetroCompatible(o,i):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,i){var n=this,o=t.noAbs?t.plurals(i):t.plurals(Math.abs(i)),a=t.numbers[o];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!lo.includes(this.options.compatibilityJSON)}}]),r}();function Zt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function q(r){for(var e=1;e3&&arguments[3]!==void 0?arguments[3]:".",n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Zi(r,e,t);return!o&&n&&typeof t=="string"&&(o=Me(r,t,i),o===void 0&&(o=Me(e,t,i))),o}var ho=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};I(this,r),this.logger=$.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return R(r,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var i=t.interpolation;this.escape=i.escape!==void 0?i.escape:eo,this.escapeValue=i.escapeValue!==void 0?i.escapeValue:!0,this.useRawValueToEscape=i.useRawValueToEscape!==void 0?i.useRawValueToEscape:!1,this.prefix=i.prefix?ee(i.prefix):i.prefixEscaped||"{{",this.suffix=i.suffix?ee(i.suffix):i.suffixEscaped||"}}",this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||",",this.unescapePrefix=i.unescapeSuffix?"":i.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":i.unescapeSuffix||"",this.nestingPrefix=i.nestingPrefix?ee(i.nestingPrefix):i.nestingPrefixEscaped||ee("$t("),this.nestingSuffix=i.nestingSuffix?ee(i.nestingSuffix):i.nestingSuffixEscaped||ee(")"),this.nestingOptionsSeparator=i.nestingOptionsSeparator?i.nestingOptionsSeparator:i.nestingOptionsSeparator||",",this.maxReplaces=i.maxReplaces?i.maxReplaces:1e3,this.alwaysFormat=i.alwaysFormat!==void 0?i.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var i="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(i,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(t,i,n,o){var a=this,s,u,f,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(y){return y.replace(/\$/g,"$$$$")}var g=function(p){if(p.indexOf(a.formatSeparator)<0){var m=Xt(i,c,p,a.options.keySeparator,a.options.ignoreJSONStructure);return a.alwaysFormat?a.format(m,void 0,n,q(q(q({},o),i),{},{interpolationkey:p})):m}var b=p.split(a.formatSeparator),w=b.shift().trim(),x=b.join(a.formatSeparator).trim();return a.format(Xt(i,c,w,a.options.keySeparator,a.options.ignoreJSONStructure),x,n,q(q(q({},o),i),{},{interpolationkey:w}))};this.resetRegExp();var d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,h=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(p){return l(p)}},{regex:this.regexp,safeValue:function(p){return a.escapeValue?l(a.escape(p)):l(p)}}];return v.forEach(function(y){for(f=0;s=y.regex.exec(t);){var p=s[1].trim();if(u=g(p),u===void 0)if(typeof d=="function"){var m=d(t,s,o);u=typeof m=="string"?m:""}else if(o&&Object.prototype.hasOwnProperty.call(o,p))u="";else if(h){u=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(p," for interpolating ").concat(t)),u="";else typeof u!="string"&&!a.useRawValueToEscape&&(u=Ut(u));var b=y.safeValue(u);if(t=t.replace(s[0],b),h?(y.regex.lastIndex+=u.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,f++,f>=a.maxReplaces)break}}),t}},{key:"nest",value:function(t,i){var n=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,u;function f(d,h){var v=this.nestingOptionsSeparator;if(d.indexOf(v)<0)return d;var y=d.split(new RegExp("".concat(v,"[ ]*{"))),p="{".concat(y[1]);d=y[0],p=this.interpolate(p,u);var m=p.match(/'/g),b=p.match(/"/g);(m&&m.length%2===0&&!b||b.length%2!==0)&&(p=p.replace(/'/g,'"'));try{u=JSON.parse(p),h&&(u=q(q({},h),u))}catch(w){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),w),"".concat(d).concat(v).concat(p)}return delete u.defaultValue,d}for(;a=this.nestingRegexp.exec(t);){var c=[];u=q({},o),u=u.replace&&typeof u.replace!="string"?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;var l=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var g=a[1].split(this.formatSeparator).map(function(d){return d.trim()});a[1]=g.shift(),c=g,l=!0}if(s=i(f.call(this,a[1].trim(),u),u),s&&a[0]===t&&typeof s!="string")return s;typeof s!="string"&&(s=Ut(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(t)),s=""),l&&(s=c.reduce(function(d,h){return n.format(d,h,o.lng,q(q({},o),{},{interpolationkey:a[1].trim()}))},s.trim())),t=t.replace(a[0],s),this.regexp.lastIndex=0}return t}}]),r}();function en(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function V(r){for(var e=1;e-1){var i=r.split("(");e=i[0].toLowerCase().trim();var n=i[1].substring(0,i[1].length-1);if(e==="currency"&&n.indexOf(":")<0)t.currency||(t.currency=n.trim());else if(e==="relativetime"&&n.indexOf(":")<0)t.range||(t.range=n.trim());else{var o=n.split(";");o.forEach(function(a){if(a){var s=a.split(":"),u=Ji(s),f=u[0],c=u.slice(1),l=c.join(":").trim().replace(/^'+|'+$/g,"");t[f.trim()]||(t[f.trim()]=l),l==="false"&&(t[f.trim()]=!1),l==="true"&&(t[f.trim()]=!0),isNaN(l)||(t[f.trim()]=parseInt(l,10))}})}}return{formatName:e,formatOptions:t}}function te(r){var e={};return function(i,n,o){var a=n+JSON.stringify(o),s=e[a];return s||(s=r(n,o),e[a]=s),s(i)}}var mo=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};I(this,r),this.logger=$.create("formatter"),this.options=e,this.formats={number:te(function(t,i){var n=new Intl.NumberFormat(t,V({},i));return function(o){return n.format(o)}}),currency:te(function(t,i){var n=new Intl.NumberFormat(t,V(V({},i),{},{style:"currency"}));return function(o){return n.format(o)}}),datetime:te(function(t,i){var n=new Intl.DateTimeFormat(t,V({},i));return function(o){return n.format(o)}}),relativetime:te(function(t,i){var n=new Intl.RelativeTimeFormat(t,V({},i));return function(o){return n.format(o,i.range||"day")}}),list:te(function(t,i){var n=new Intl.ListFormat(t,V({},i));return function(o){return n.format(o)}})},this.init(e)}return R(r,[{key:"init",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},n=i.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(t,i){this.formats[t.toLowerCase().trim()]=i}},{key:"addCached",value:function(t,i){this.formats[t.toLowerCase().trim()]=te(i)}},{key:"format",value:function(t,i,n){var o=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=i.split(this.formatSeparator),u=s.reduce(function(f,c){var l=po(c),g=l.formatName,d=l.formatOptions;if(o.formats[g]){var h=f;try{var v=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},y=v.locale||v.lng||a.locale||a.lng||n;h=o.formats[g](f,y,V(V(V({},d),a),v))}catch(p){o.logger.warn(p)}return h}else o.logger.warn("there was no format function for ".concat(g));return f},t);return u}}]),r}();function tn(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function nn(r){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bo(r,e){r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)}var So=function(r){ze(t,r);var e=vo(t);function t(i,n,o){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return I(this,t),a=e.call(this),Ke&&J.call(z(a)),a.backend=i,a.store=n,a.services=o,a.languageUtils=o.languageUtils,a.options=s,a.logger=$.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,s.backend,s),a}return R(t,[{key:"queueLoad",value:function(n,o,a,s){var u=this,f={},c={},l={},g={};return n.forEach(function(d){var h=!0;o.forEach(function(v){var y="".concat(d,"|").concat(v);!a.reload&&u.store.hasResourceBundle(d,v)?u.state[y]=2:u.state[y]<0||(u.state[y]===1?c[y]===void 0&&(c[y]=!0):(u.state[y]=1,h=!1,c[y]===void 0&&(c[y]=!0),f[y]===void 0&&(f[y]=!0),g[v]===void 0&&(g[v]=!0)))}),h||(l[d]=!0)}),(Object.keys(f).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(f),pending:Object.keys(c),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(g)}}},{key:"loaded",value:function(n,o,a){var s=n.split("|"),u=s[0],f=s[1];o&&this.emit("failedLoading",u,f,o),a&&this.store.addResourceBundle(u,f,a),this.state[n]=o?-1:2;var c={};this.queue.forEach(function(l){Yi(l.loaded,[u],f),bo(l,n),o&&l.errors.push(o),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(function(g){c[g]||(c[g]={});var d=l.loaded[g];d.length&&d.forEach(function(h){c[g][h]===void 0&&(c[g][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(l){return!l.done})}},{key:"read",value:function(n,o,a){var s=this,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!n.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:o,fcName:a,tried:u,wait:f,callback:c});return}this.readingCalls++;var l=function(v,y){if(s.readingCalls--,s.waitingReads.length>0){var p=s.waitingReads.shift();s.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(v&&y&&u2&&arguments[2]!==void 0?arguments[2]:{},u=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."),u&&u();typeof n=="string"&&(n=this.languageUtils.toResolveHierarchy(n)),typeof o=="string"&&(o=[o]);var f=this.queueLoad(n,o,s,u);if(!f.toLoad.length)return f.pending.length||u(),null;f.toLoad.forEach(function(c){a.loadOne(c)})}},{key:"load",value:function(n,o,a){this.prepareLoading(n,o,{},a)}},{key:"reload",value:function(n,o,a){this.prepareLoading(n,o,{reload:!0},a)}},{key:"loadOne",value:function(n){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=n.split("|"),u=s[0],f=s[1];this.read(u,f,"read",void 0,void 0,function(c,l){c&&o.logger.warn("".concat(a,"loading namespace ").concat(f," for language ").concat(u," failed"),c),!c&&l&&o.logger.log("".concat(a,"loaded namespace ").concat(f," for language ").concat(u),l),o.loaded(n,c,l)})}},{key:"saveMissing",value:function(n,o,a,s,u){var f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){var l=nn(nn({},f),{},{isUpdate:u}),g=this.backend.create.bind(this.backend);if(g.length<6)try{var d;g.length===5?d=g(n,o,a,s,l):d=g(n,o,a,s),d&&typeof d.then=="function"?d.then(function(h){return c(null,h)}).catch(c):c(null,d)}catch(h){c(h)}else g(n,o,a,s,c,l)}!n||!n[0]||this.store.addResource(n[0],o,a,s)}}}]),t}(J);function rn(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(F(e[1])==="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),F(e[2])==="object"||F(e[3])==="object"){var i=e[3]||e[2];Object.keys(i).forEach(function(n){t[n]=i[n]})}return t},interpolation:{escapeValue:!0,format:function(e,t,i,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function on(r){return typeof r.ns=="string"&&(r.ns=[r.ns]),typeof r.fallbackLng=="string"&&(r.fallbackLng=[r.fallbackLng]),typeof r.fallbackNS=="string"&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&r.supportedLngs.indexOf("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r}function an(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function M(r){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function je(){}function xo(r){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(r));e.forEach(function(t){typeof r[t]=="function"&&(r[t]=r[t].bind(r))})}var $e=function(r){ze(t,r);var e=wo(t);function t(){var i,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(I(this,t),i=e.call(this),Ke&&J.call(z(i)),i.options=on(n),i.services={},i.logger=$,i.modules={external:[]},xo(z(i)),o&&!i.isInitialized&&!n.isClone){if(!i.options.initImmediate)return i.init(n,o),ke(i,z(i));setTimeout(function(){i.init(n,o)},0)}return i}return R(t,[{key:"init",value:function(){var n=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(a=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=rn();this.options=M(M(M({},s),this.options),on(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=M(M({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function u(p){return p?typeof p=="function"?new p:p:null}if(!this.options.isClone){this.modules.logger?$.init(u(this.modules.logger),this.options):$.init(null,this.options);var f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=mo);var c=new Gt(this.options);this.store=new oo(this.options.resources,this.options);var l=this.services;l.logger=$,l.resourceStore=this.store,l.languageUtils=c,l.pluralResolver=new go(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(l.formatter=u(f),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new ho(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new So(u(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(p){for(var m=arguments.length,b=new Array(m>1?m-1:0),w=1;w1?m-1:0),w=1;w0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var d=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];d.forEach(function(p){n[p]=function(){var m;return(m=n.store)[p].apply(m,arguments)}});var h=["addResource","addResources","addResourceBundle","removeResourceBundle"];h.forEach(function(p){n[p]=function(){var m;return(m=n.store)[p].apply(m,arguments),n}});var v=le(),y=function(){var m=function(w,x){n.isInitialized&&!n.initializedStoreOnce&&n.logger.warn("init: i18next is already initialized. You should call init just once!"),n.isInitialized=!0,n.options.isClone||n.logger.log("initialized",n.options),n.emit("initialized",n.options),v.resolve(x),a(w,x)};if(n.languages&&n.options.compatibilityAPI!=="v1"&&!n.isInitialized)return m(null,n.t.bind(n));n.changeLanguage(n.options.lng,m)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),v}},{key:"loadResources",value:function(n){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:je,s=a,u=typeof n=="string"?n:this.language;if(typeof n=="function"&&(s=n),!this.options.resources||this.options.partialBundledLanguages){if(u&&u.toLowerCase()==="cimode")return s();var f=[],c=function(d){if(d){var h=o.services.languageUtils.toResolveHierarchy(d);h.forEach(function(v){f.indexOf(v)<0&&f.push(v)})}};if(u)c(u);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach(function(g){return c(g)})}this.options.preload&&this.options.preload.forEach(function(g){return c(g)}),this.services.backendConnector.load(f,this.options.ns,function(g){!g&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(g)})}else s(null)}},{key:"reloadResources",value:function(n,o,a){var s=le();return n||(n=this.languages),o||(o=this.options.ns),a||(a=je),this.services.backendConnector.reload(n,o,function(u){s.resolve(),a(u)}),s}},{key:"use",value:function(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&Yn.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}},{key:"setResolvedLanguage",value:function(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1))for(var o=0;o-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(n,o){var a=this;this.isLanguageChangingTo=n;var s=le();this.emit("languageChanging",n);var u=function(g){a.language=g,a.languages=a.services.languageUtils.toResolveHierarchy(g),a.resolvedLanguage=void 0,a.setResolvedLanguage(g)},f=function(g,d){d?(u(d),a.translator.changeLanguage(d),a.isLanguageChangingTo=void 0,a.emit("languageChanged",d),a.logger.log("languageChanged",d)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),o&&o(g,function(){return a.t.apply(a,arguments)})},c=function(g){!n&&!g&&a.services.languageDetector&&(g=[]);var d=typeof g=="string"?g:a.services.languageUtils.getBestMatchFromCodes(g);d&&(a.language||u(d),a.translator.language||a.translator.changeLanguage(d),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(d)),a.loadResources(d,function(h){f(h,d)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n),s}},{key:"getFixedT",value:function(n,o,a){var s=this,u=function f(c,l){var g;if(F(l)!=="object"){for(var d=arguments.length,h=new Array(d>2?d-2:0),v=2;v1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=a.lng||this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var c=function(d,h){var v=o.services.backendConnector.state["".concat(d,"|").concat(h)];return v===-1||v===2};if(a.precheck){var l=a.precheck(this,c);if(l!==void 0)return l}return!!(this.hasResourceBundle(s,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(s,n)&&(!u||c(f,n)))}},{key:"loadNamespaces",value:function(n,o){var a=this,s=le();return this.options.ns?(typeof n=="string"&&(n=[n]),n.forEach(function(u){a.options.ns.indexOf(u)<0&&a.options.ns.push(u)}),this.loadResources(function(u){s.resolve(),o&&o(u)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(n,o){var a=le();typeof n=="string"&&(n=[n]);var s=this.options.preload||[],u=n.filter(function(f){return s.indexOf(f)<0});return u.length?(this.options.preload=s.concat(u),this.loadResources(function(f){a.resolve(),o&&o(f)}),a):(o&&o(),Promise.resolve())}},{key:"dir",value:function(n){if(n||(n=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!n)return"rtl";var o=["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"],a=this.services&&this.services.languageUtils||new Gt(rn());return o.indexOf(a.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var n=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:je,s=M(M(M({},this.options),o),{isClone:!0}),u=new t(s);(o.debug!==void 0||o.prefix!==void 0)&&(u.logger=u.logger.clone(o));var f=["store","services","language"];return f.forEach(function(c){u[c]=n[c]}),u.services=M({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new Qt(u.services,u.options),u.translator.on("*",function(c){for(var l=arguments.length,g=new Array(l>1?l-1:0),d=1;d0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new $e(r,e)});var L=$e.createInstance();L.createInstance=$e.createInstance;L.createInstance;L.dir;L.init;L.loadResources;L.reloadResources;L.use;L.changeLanguage;L.getFixedT;L.t;L.exists;L.setDefaultNamespace;L.hasLoadedNamespace;L.loadNamespaces;L.loadLanguages;var Zn=[],ko=Zn.forEach,Lo=Zn.slice;function Po(r){return ko.call(Lo.call(arguments,1),function(e){if(e)for(var t in e)r[t]===void 0&&(r[t]=e[t])}),r}var sn=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Co=function(e,t,i){var n=i||{};n.path=n.path||"/";var o=encodeURIComponent(t),a="".concat(e,"=").concat(o);if(n.maxAge>0){var s=n.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(s))}if(n.domain){if(!sn.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(n.domain)}if(n.path){if(!sn.test(n.path))throw new TypeError("option path is invalid");a+="; Path=".concat(n.path)}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(n.expires.toUTCString())}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.sameSite){var u=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(u){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},un={create:function(e,t,i,n){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+i*60*1e3)),n&&(o.domain=n),document.cookie=Co(e,encodeURIComponent(t),o)},read:function(e){for(var t="".concat(e,"="),i=document.cookie.split(";"),n=0;n-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var n=i.substring(1),o=n.split("&"),a=0;a0){var u=o[a].substring(0,s);u===e.lookupQuerystring&&(t=o[a].substring(s+1))}}}return t}},fe=null,cn=function(){if(fe!==null)return fe;try{fe=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{fe=!1}return fe},_o={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&cn()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&cn()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},de=null,ln=function(){if(de!==null)return de;try{de=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{de=!1}return de},jo={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&ln()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&ln()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Io={name:"navigator",lookup:function(e){var t=[];if(typeof navigator<"u"){if(navigator.languages)for(var i=0;i0?t:void 0}},Ro={name:"htmlTag",lookup:function(e){var t,i=e.htmlTag||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(t=i.getAttribute("lang")),t}},Ao={name:"path",lookup:function(e){var t;if(typeof window<"u"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;t=i[e.lookupFromPathIndex].replace("/","")}else t=i[0].replace("/","")}return t}},No={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[t]}};function Fo(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var Xn=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I(this,r),this.type="languageDetector",this.detectors={},this.init(e,t)}return R(r,[{key:"init",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=Po(i,this.options||{},Fo()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Eo),this.addDetector(To),this.addDetector(_o),this.addDetector(jo),this.addDetector(Io),this.addDetector(Ro),this.addDetector(Ao),this.addDetector(No)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var i=this;t||(t=this.options.order);var n=[];return t.forEach(function(o){if(i.detectors[o]){var a=i.detectors[o].lookup(i.options);a&&typeof a=="string"&&(a=[a]),a&&(n=n.concat(a))}}),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(t,i){var n=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||i.forEach(function(o){n.detectors[o]&&n.detectors[o].cacheUserLanguage(t,n.options)}))}}]),r}();Xn.type="languageDetector";var er=[],qo=er.forEach,Do=er.slice;function Mo(r){return qo.call(Do.call(arguments,1),function(e){if(e)for(var t in e)r[t]===void 0&&(r[t]=e[t])}),r}function $o(r){return r?typeof r=="function"?new r:r:null}function Ho(){return{handleEmptyResourcesAsFailed:!0,cacheHitMode:"none"}}function fn(r,e,t,i){var n=r.read.bind(r);if(n.length===2){try{var o=n(e,t);o&&typeof o.then=="function"?o.then(function(a){return i(null,a)}).catch(i):i(null,o)}catch(a){i(a)}return}n(e,t,i)}var tr=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I(this,r),this.backends=[],this.type="backend",this.init(e,t)}return R(r,[{key:"init",value:function(t){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;this.services=t,this.options=Mo(n,this.options||{},Ho()),this.options.backends&&this.options.backends.forEach(function(a,s){i.backends[s]=i.backends[s]||$o(a),i.backends[s].init(t,i.options.backendOptions&&i.options.backendOptions[s]||{},o)})}},{key:"read",value:function(t,i,n){var o=this,a=this.backends.length,s=function f(c){if(c>=a)return n(new Error("non of the backend loaded data",!0));var l=c===a-1,g=o.options.handleEmptyResourcesAsFailed&&!l?0:-1,d=o.backends[c];d.read?fn(d,t,i,function(h,v){if(!h&&v&&Object.keys(v).length>g){if(n(null,v,c),u(c-1,v),d.save&&o.options.cacheHitMode&&["refresh","refreshAndUpdateStore"].indexOf(o.options.cacheHitMode)>-1){var y=o.backends[c+1];y&&y.read&&fn(y,t,i,function(p,m){p||m&&(Object.keys(m).length<=g||(u(c,m),o.options.cacheHitMode==="refreshAndUpdateStore"&&o.services&&o.services.resourceStore&&o.services.resourceStore.addResourceBundle(t,i,m)))})}}else f(c+1)}):f(c+1)},u=function f(c,l){if(!(c<0)){var g=o.backends[c];g.save&&g.save(t,i,l),f(c-1,l)}};s(0)}},{key:"create",value:function(t,i,n,o){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){},s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.backends.forEach(function(u){if(u.create){var f=u.create.bind(u);if(f.length<6){try{var c;f.length===5?c=f(t,i,n,o,s):c=f(t,i,n,o),c&&typeof c.then=="function"?c.then(function(l){return a(null,l)}).catch(a):a(null,c)}catch(l){a(l)}return}f(t,i,n,o,a,s)}})}}]),r}();tr.type="backend";function dn(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function tt(r){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};I(this,r),this.init(e,t),this.type="backend"}return R(r,[{key:"init",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.services=t,this.options=tt(tt(tt({},Vo()),this.options),i),this.storage=new Bo(this.options)}},{key:"read",value:function(t,i,n){var o=new Date().getTime();if(!this.storage.store)return n(null,null);var a=this.storage.getItem("".concat(this.options.prefix).concat(t,"-").concat(i));if(a){a=JSON.parse(a);var s=this.getVersion(t);if(a.i18nStamp&&a.i18nStamp+this.options.expirationTime>o&&s===a.i18nVersion)return delete a.i18nVersion,delete a.i18nStamp,n(null,a)}return n(null,null)}},{key:"save",value:function(t,i,n){if(this.storage.store){n.i18nStamp=new Date().getTime();var o=this.getVersion(t);o&&(n.i18nVersion=o),this.storage.setItem("".concat(this.options.prefix).concat(t,"-").concat(i),JSON.stringify(n))}}},{key:"getVersion",value:function(t){return this.options.versions[t]||this.options.defaultVersion}}]),r}();nr.type="backend";var rr={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;function e(a){for(var s=1;s1&&arguments[1]!==void 0?arguments[1]:{};s=e({},i,s);var u=function(h,v){return s.parseDefaultValueFromContent?e({},h,{defaultValue:v}):h};function f(d,h,v){var y="text";if(h.indexOf("[")==0){var p=h.split("]");h=p[1],y=p[0].substr(1,p[0].length-1)}if(h=h.indexOf(";")==h.length-1?h.substr(0,h.length-2):h,y==="html")d.innerHTML=a.t(h,u(v,d.innerHTML));else if(y==="text")d.textContent=a.t(h,u(v,d.textContent));else if(y==="prepend"){var m=d.innerHTML.indexOf(""),b=d.innerHTML.indexOf("")+11;m>-1&&b>6&&(d.innerHTML=[d.innerHTML.substring(0,m),d.innerHTML.slice(b)].join("")),d.innerHTML=["",a.t(h,u(v,d.innerHTML)),"",d.innerHTML].join("")}else if(y==="append"){var w=d.innerHTML.indexOf(""),x=d.innerHTML.indexOf("")+11;w>-1&&x>6&&(d.innerHTML=[d.innerHTML.substring(0,w),d.innerHTML.slice(x)].join("")),d.innerHTML=[d.innerHTML,"",a.t(h,u(v,d.innerHTML),"")].join("")}else if(y.indexOf("data-")===0){var O=y.substr(5),k=a.t(h,u(v,d.getAttribute(O)));d.setAttribute(O,k),d.setAttribute(y,k)}else d.setAttribute(y,a.t(h,u(v,d.getAttribute(y))))}function c(d){return JSON.parse(d.replace(/:\s*"([^"]*)"/g,function(h,v){return': "'+v.replace(/:/g,"@colon@")+'"'}).replace(/:\s*'([^']*)'/g,function(h,v){return': "'+v.replace(/:/g,"@colon@")+'"'}).replace(/(['"])?([a-z0-9A-Z_]+)(['"])?\s*:/g,'"$2": ').replace(/@colon@/g,":"))}function l(d,h){var v=d.getAttribute(s.selectorAttr);if(v){var y=d,p=d.getAttribute(s.targetAttr);if(p!=null&&(y=d.querySelector(p)||d),!h&&s.useOptionsAttr===!0&&(h=c(d.getAttribute(s.optionsAttr)||"{}")),h=h||{},v.indexOf(";")>=0)for(var m=v.split(";"),b=0,w=m.length;b-1;w--)l(b[w],h);l(m,h)}}return g}var o={init:n};r.default=o})(rr);var Uo=rr.default;const zo=fr(Uo);class gn{static DateTimeFormat(e,t=L.language,i,n){const o=new Date(e);return n?new Intl.DateTimeFormat(t,i).format(o).replace(/\//g,n):new Intl.DateTimeFormat(t,i).format(o)}static RelativeTimeFormat(e,t=L.language){const n=new Date().getTime()-e,o=Math.round(n/1e3),a=new Intl.RelativeTimeFormat(t,{style:"long"});return o<60?a.format(-o,"second"):o<3600?a.format(-Math.floor(o/60),"minute"):o<86400?a.format(-Math.floor(o/3600),"hour"):o<2592e3?a.format(-Math.floor(o/86400),"day"):o<31104e3?a.format(-Math.floor(o/2592e3),"month"):a.format(-Math.floor(o/31104e3),"year")}static secondToTimeString(e){let t=Math.floor(e/60),i=e%60,n=Math.floor(t/60);t%=60;let o=Math.floor(n/24);n%=24;let a="";return o>0&&(a+=L.t("common.days",{count:o,defaultValue:"{{ count }} 天"})+" "),n>0&&(a+=L.t("common.hours",{count:n,defaultValue:"{{ count }} 小时"})+" "),t>0&&(a+=L.t("common.minutes",{count:t,defaultValue:"{{ count }} 分钟"})+" "),i>0&&(a+=L.t("common.seconds",{count:i,defaultValue:"{{ count }} 秒"})+" "),a.trim()}}class Ko{constructor(e){C(this,"schemas");this.schemas=e}isEmpty(){return!this.schemas}getValue(e,t){if(!this.isEmpty()&&e.toString()in this.schemas)return new t(this.schemas[e.toString()])}}class ir{constructor(e,t,i,n){C(this,"isRefresh");C(this,"target");C(this,"name");C(this,"method");C(this,"execCount",0);this.target=e,this.name=t,this.method=i,this.isRefresh=n}execute(){!this.isRefresh&&this.execCount.valueOf()>0||(this.method.call(this.target),this.execCount=this.execCount.valueOf()+1)}}class hn{constructor(){C(this,"documentFunctions");this.documentFunctions=new Set}geDocumentFunctionCount(){return this.documentFunctions.size}getDocumentFunctions(){return this.documentFunctions}registerDocumentFunction(e){this.documentFunctions.add(e)}getDocumentFunction(e){if(!(!e||!this.documentFunctions)){for(const t of this.documentFunctions)if(t.name===e)return t}}}class Jo{constructor(e){C(this,"config");C(this,"themeconfigs");C(this,"currPageData",new Map);C(this,"documentFunctionFactory",new hn);C(this,"events",new Map);C(this,"REFRESH_EVENT_NAME","sakura:refresh");this.config=e,this.themeconfigs=new Map,this.refreshThemeConfig()}translate(e,t,i){return S.$t?S.$t(e,{defaultValue:t,...i}):t}refreshThemeConfig(){if(this.config)try{Object.keys(this.config).forEach(e=>{let t=new Ko(this.config[e]);this.themeconfigs.set(e,t)})}catch(e){console.error("解析 themeConfig 失败:",e)}}getThemeConfig(e,t,i){let n=this.themeconfigs.get(e);if(n)return n.getValue(t,i)}getPageConfig(e){if(this.currPageData.has(e))return this.currPageData.get(e)}refresh(){this.prepareRefresh(),this.initEventMulticaster(),this.mountGlobalFunction(),this.registerRoute(),this.obtainFunctionFactory(),this.registerDomProcessors(),this.finishDocumentFunction(),this.finishRefresh()}mountGlobalProperty(e,t){Object.getOwnPropertyDescriptor(S,`$${e}`)||Object.defineProperty(S,`$${e}`,{value:t,writable:!1,enumerable:!1,configurable:!1})}mountGlobalFunction(){var t,i,n,o,a,s,u;if(((t=S.getThemeConfig("toast","open_toast",Boolean))==null?void 0:t.valueOf())&&!Object.getOwnPropertyDescriptor(S,"$toast")&&Object.defineProperty(S,"$toast",{value:new Hi({width:(i=S.getThemeConfig("toast","toast_width",Number))==null?void 0:i.valueOf(),height:(n=S.getThemeConfig("toast","toast_height",Number))==null?void 0:n.valueOf(),top:(o=S.getThemeConfig("toast","toast_top",String))==null?void 0:o.valueOf(),background:(a=S.getThemeConfig("general","theme_skin",String))==null?void 0:a.valueOf(),color:(s=S.getThemeConfig("toast","toast_color",String))==null?void 0:s.valueOf(),fontSize:(u=S.getThemeConfig("toast","toast_font_size",Number))==null?void 0:u.valueOf()}),writable:!0,configurable:!0,enumerable:!1}),Object.getOwnPropertyDescriptor(S,"$t"))S.$localize("[data-i18n]");else{const f=[{type:"backend",read(c,l,g){hr(Object.assign({"./languages/en.json":()=>j(()=>import("./assets/en-f34a428a.js"),[]),"./languages/ja.json":()=>j(()=>import("./assets/ja-7cf8f196.js"),[]),"./languages/zh.json":()=>j(()=>import("./assets/zh-de28e367.js"),[])}),`./languages/${c}.json`).then(d=>{g(null,d.default)}).catch(d=>{g(d,null)})},init:()=>{}}];f.unshift(nr),L.use(Xn).use(tr).init({backend:{backends:f,backendOptions:[{prefix:"i18next_sakura_",defaultVersion:S.getPageConfig("version")}]},debug:!1,lowerCaseLng:!0,cleanCode:!0,interpolation:{format:function(c,l,g,d){var v,y;const h=d==null?void 0:d.params;switch(l){case"datetimeFormat":let p=h==null?void 0:h.options;if(!p){switch((v=S.getThemeConfig("general","date_format",String))==null?void 0:v.valueOf()){case"time":p={hour:"numeric",minute:"numeric",second:"numeric"};break;case"datetime":p={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",second:"numeric"};break;case"date":default:p={year:"numeric",month:"2-digit",day:"2-digit"};break}(y=S.getThemeConfig("general","hour12",Boolean))!=null&&y.valueOf()&&(p.hour12=!0)}return gn.DateTimeFormat(c,g,p,h==null?void 0:h.separator);case"relativeTimeFormat":return gn.RelativeTimeFormat(c,g);default:return c}},escapeValue:!1}}).then(c=>{let l=this.events.get("sakura:i18n");l||(l=new CustomEvent("sakura:i18n"),this.events.set("sakura:i18n",l)),window.dispatchEvent(l),Object.defineProperty(S,"$t",{value:c,writable:!1,configurable:!1,enumerable:!1});const g=zo.init(L,{selectorAttr:"data-i18n",targetAttr:"i18n-target",optionsAttr:"i18n-options",useOptionsAttr:!0,parseDefaultValueFromContent:!0,document:window.document});g("[data-i18n]"),Object.defineProperty(S,"$localize",{value:g,writable:!1,configurable:!1,enumerable:!1})})}}registerDocumentFunction(e){this.obtainFunctionFactory(),this.documentFunctionFactory.registerDocumentFunction(e),e.execute()}finishDocumentFunction(){const e=this.documentFunctionFactory.getDocumentFunctions();for(const t of e)t.execute()}registerDomProcessors(){var t;let e=Wo();for(const i of e){const n=i;this.documentFunctionFactory.registerDocumentFunction(new ir(n.target,n.propertyKey,n.method,n.isRefresh))}e.clear(),(t=this.getThemeConfig("advanced","log",Boolean))!=null&&t.valueOf()&&console.log("共获取预设 documentFunction "+ve.size+" 个")}obtainFunctionFactory(){return this.documentFunctionFactory||(this.documentFunctionFactory=new hn),this.documentFunctionFactory}prepareRefresh(){var e;this.refreshMetadata(),(e=this.getThemeConfig("advanced","log",Boolean))!=null&&e.valueOf()&&console.log("Sakura Refreshing")}refreshMetadata(){try{this.currPageData=ge.jsonToMap(pageData)}catch(e){console.error("解析 pageData 失败:",e)}}async registerRoute(){const e=this.currPageData.get("_templateId");if(!e)return;const t=`./page/${e}.min.js`;await j(()=>import(t),[])}initEventMulticaster(){let e=this.events.get(this.REFRESH_EVENT_NAME);e||(e=new CustomEvent(this.REFRESH_EVENT_NAME.toString(),{detail:{pageData:this.currPageData}}),this.events.set(this.REFRESH_EVENT_NAME,e))}finishRefresh(){var t;let e=this.events.get(this.REFRESH_EVENT_NAME);window.dispatchEvent(e),(t=this.getThemeConfig("advanced","log",Boolean))!=null&&t.valueOf()&&console.log("finish Refreshing"),console.log("%c Github %c","background:#24272A; color:#ffffff","","https://github.com/LIlGG/halo-theme-Sakura")}}var S=new Jo(config);window.sakura=S;S.refresh();var ve;function Wo(){return ve}function P(r=!0){return function(e,t,i){if(!S){ve||(ve=new Set);const n={target:e,propertyKey:t,method:i.value,isRefresh:r};ve.add(n);return}S.registerDocumentFunction(new ir(e,t,i.value,r))}}export{gn as I,ge as U,j as _,P as d,S as s};