@tryghost/sodo-search 1.8.16 → 1.8.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,7 +47,7 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
47
47
  .ghost-display {
48
48
  display: none;
49
49
  }
50
- `,n=this.context.stylesUrl;return n?A.jsxs(A.Fragment,{children:[A.jsx("link",{rel:"stylesheet",href:n}),A.jsx("style",{dangerouslySetInnerHTML:{__html:t}}),A.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}):A.jsxs(A.Fragment,{children:[A.jsx("style",{dangerouslySetInnerHTML:{__html:t}}),A.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const t=lm(),n={...t.frame.common};return A.jsx("div",{style:t.modalContainer,className:"gh-root-frame",children:A.jsxs(nm,{style:n,title:"portal-popup",head:this.renderFrameStyles(),searchdir:this.context.dir,children:[A.jsx("div",{onClick:r=>this.handlePopupClose(r),className:"absolute top-0 bottom-0 left-0 right-0 block backdrop-blur-[2px] animate-fadein z-0 bg-gradient-to-br from-[rgba(0,0,0,0.2)] to-[rgba(0,0,0,0.1)]"}),A.jsx(If,{})]})})}render(){const{showPopup:t}=this.context;return t?this.renderFrameContainer():null}}_o(Df,"contextType",we);var F;function he(e,t,n){const r=typeof n,s=typeof e;if(r!=="undefined"){if(s!=="undefined"){if(n){if(s==="function"&&r===s)return function(l){return e(n(l))};if(t=e.constructor,t===n.constructor){if(t===Array)return n.concat(e);if(t===Map){var o=new Map(n);for(var i of e)o.set(i[0],i[1]);return o}if(t===Set){i=new Set(n);for(o of e.values())i.add(o);return i}}}return e}return n}return s==="undefined"?t:e}function se(){return Object.create(null)}function We(e){return typeof e=="string"}function Ur(e){return typeof e=="object"}function Em(e){const t=[];for(const n of e.keys())t.push(n);return t}function Br(e,t){if(We(t))e=e[t];else for(let n=0;e&&n<t.length;n++)e=e[t[n]];return e}function jm(e){let t=0;for(let n=0,r;n<e.length;n++)(r=e[n])&&t<r.length&&(t=r.length);return t}const Am=/[^\p{L}\p{N}]+/u,Tm=/(\d{3})/g,Om=/(\D)(\d{3})/g,Nm=/(\d{3})(\D)/g,bf=/[\u0300-\u036f]/g;function Vr(e={}){if(!this||this.constructor!==Vr)return new Vr(...arguments);if(arguments.length)for(e=0;e<arguments.length;e++)this.assign(arguments[e]);else this.assign(e)}F=Vr.prototype,F.assign=function(e){this.normalize=he(e.normalize,!0,this.normalize);let t=e.include,n=t||e.exclude||e.split,r;if(n||n===""){if(typeof n=="object"&&n.constructor!==RegExp){let s="";r=!t,t||(s+="\\p{Z}"),n.letter&&(s+="\\p{L}"),n.number&&(s+="\\p{N}",r=!!t),n.symbol&&(s+="\\p{S}"),n.punctuation&&(s+="\\p{P}"),n.control&&(s+="\\p{C}"),(n=n.char)&&(s+=typeof n=="object"?n.join(""):n);try{this.split=new RegExp("["+(t?"^":"")+s+"]+","u")}catch{this.split=/\s+/}}else this.split=n,r=n===!1||2>"a1a".split(n).length;this.numeric=he(e.numeric,r)}else{try{this.split=he(this.split,Am)}catch{this.split=/\s+/}this.numeric=he(e.numeric,he(this.numeric,!0))}if(this.prepare=he(e.prepare,null,this.prepare),this.finalize=he(e.finalize,null,this.finalize),n=e.filter,this.filter=typeof n=="function"?n:he(n&&new Set(n),null,this.filter),this.dedupe=he(e.dedupe,!0,this.dedupe),this.matcher=he((n=e.matcher)&&new Map(n),null,this.matcher),this.mapper=he((n=e.mapper)&&new Map(n),null,this.mapper),this.stemmer=he((n=e.stemmer)&&new Map(n),null,this.stemmer),this.replacer=he(e.replacer,null,this.replacer),this.minlength=he(e.minlength,1,this.minlength),this.maxlength=he(e.maxlength,1024,this.maxlength),this.rtl=he(e.rtl,!1,this.rtl),(this.cache=n=he(e.cache,!0,this.cache))&&(this.H=null,this.S=typeof n=="number"?n:2e5,this.B=new Map,this.G=new Map,this.L=this.K=128),this.h="",this.M=null,this.A="",this.N=null,this.matcher)for(const s of this.matcher.keys())this.h+=(this.h?"|":"")+s;if(this.stemmer)for(const s of this.stemmer.keys())this.A+=(this.A?"|":"")+s;return this},F.addStemmer=function(e,t){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(e,t),this.A+=(this.A?"|":"")+e,this.N=null,this.cache&&Qt(this),this},F.addFilter=function(e){return typeof e=="function"?this.filter=e:(this.filter||(this.filter=new Set),this.filter.add(e)),this.cache&&Qt(this),this},F.addMapper=function(e,t){return typeof e=="object"?this.addReplacer(e,t):1<e.length?this.addMatcher(e,t):(this.mapper||(this.mapper=new Map),this.mapper.set(e,t),this.cache&&Qt(this),this)},F.addMatcher=function(e,t){return typeof e=="object"?this.addReplacer(e,t):2>e.length&&(this.dedupe||this.mapper)?this.addMapper(e,t):(this.matcher||(this.matcher=new Map),this.matcher.set(e,t),this.h+=(this.h?"|":"")+e,this.M=null,this.cache&&Qt(this),this)},F.addReplacer=function(e,t){return typeof e=="string"?this.addMatcher(e,t):(this.replacer||(this.replacer=[]),this.replacer.push(e,t),this.cache&&Qt(this),this)},F.encode=function(e){if(this.cache&&e.length<=this.K)if(this.H){if(this.B.has(e))return this.B.get(e)}else this.H=setTimeout(Qt,50,this);this.normalize&&(typeof this.normalize=="function"?e=this.normalize(e):e=bf?e.normalize("NFKD").replace(bf,"").toLowerCase():e.toLowerCase()),this.prepare&&(e=this.prepare(e)),this.numeric&&3<e.length&&(e=e.replace(Om,"$1 $2").replace(Nm,"$1 $2").replace(Tm,"$1 "));const t=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let n=[],r=this.split||this.split===""?e.split(this.split):e;for(let o=0,i,l;o<r.length;o++)if((i=l=r[o])&&!(i.length<this.minlength||i.length>this.maxlength)){if(t)n.push(i);else if(!this.filter||(typeof this.filter=="function"?this.filter(i):!this.filter.has(i))){if(this.cache&&i.length<=this.L)if(this.H){var s=this.G.get(i);if(s||s===""){s&&n.push(s);continue}}else this.H=setTimeout(Qt,50,this);if(this.stemmer&&2<i.length&&(this.N||(this.N=new RegExp("(?!^)("+this.A+")$")),i=i.replace(this.N,a=>this.stemmer.get(a))),i&&(this.mapper||this.dedupe&&1<i.length)){s="";for(let a=0,u="",f,h;a<i.length;a++)f=i.charAt(a),f===u&&this.dedupe||((h=this.mapper&&this.mapper.get(f))||h===""?h===u&&this.dedupe||!(u=h)||(s+=h):s+=u=f);i=s}if(this.matcher&&1<i.length&&(this.M||(this.M=new RegExp("("+this.h+")","g")),i=i.replace(this.M,a=>this.matcher.get(a))),i&&this.replacer)for(s=0;i&&s<this.replacer.length;s+=2)i=i.replace(this.replacer[s],this.replacer[s+1]);this.cache&&l.length<=this.L&&(this.G.set(l,i),this.G.size>this.S&&(this.G.clear(),this.L=this.L/1.1|0)),i&&n.push(i)}}return this.finalize&&(n=this.finalize(n)||n),this.cache&&e.length<=this.K&&(this.B.set(e,n),this.B.size>this.S&&(this.B.clear(),this.K=this.K/1.1|0)),n};function Qt(e){e.H=null,e.B.clear(),e.G.clear()}let Rn,Hr;async function Lm(e){e=e.data;var t=e.task;const n=e.id;let r=e.args;switch(t){case"init":Hr=e.options||{},(t=e.factory)?(Function("return "+t)()(self),Rn=new self.FlexSearch.Index(Hr),delete self.FlexSearch):Rn=new tt(Hr),postMessage({id:n});break;default:let s;t==="export"&&(r[1]?(r[0]=Hr.export,r[2]=0,r[3]=1):r=null),t==="import"?r[0]&&(e=await Hr.import.call(Rn,r[0]),Rn.import(r[0],e)):(s=r&&Rn[t].apply(Rn,r))&&s.then&&(s=await s),postMessage(t==="search"?{id:n,msg:s}:{id:n})}}function Vl(e){Wr.call(e,"add"),Wr.call(e,"append"),Wr.call(e,"search"),Wr.call(e,"update"),Wr.call(e,"remove")}let Hl,Uf,co;function _m(){Hl=co=0}function Wr(e){this[e+"Async"]=function(){const t=arguments;var n=t[t.length-1];let r;if(typeof n=="function"&&(r=n,delete t[t.length-1]),Hl?co||(co=Date.now()-Uf>=this.priority*this.priority*3):(Hl=setTimeout(_m,0),Uf=Date.now()),co){const o=this;return new Promise(i=>{setTimeout(function(){i(o[e+"Async"].apply(o,t))},0)})}const s=this[e].apply(this,t);return n=s.then?s:new Promise(o=>o(s)),r&&n.then(r),n}}let Fn=0;function Kr(e={}){function t(i){function l(a){a=a.data||a;const u=a.id,f=u&&s.h[u];f&&(f(a.msg),delete s.h[u])}if(this.worker=i,this.h=se(),this.worker)return r?this.worker.on("message",l):this.worker.onmessage=l,e.config?new Promise(function(a){s.h[++Fn]=function(){a(s),1e9<Fn&&(Fn=0)},s.worker.postMessage({id:Fn,task:"init",factory:n,options:e})}):(this.worker.postMessage({task:"init",factory:n,options:e}),this.priority=e.priority||4,this)}if(!this||this.constructor!==Kr)return new Kr(e);let n=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;n&&(n=n.toString());const r=typeof window>"u",s=this,o=Rm(n,r,e.worker);return o.then?o.then(function(i){return t.call(s,i)}):t.call(this,o)}Lt("add"),Lt("append"),Lt("search"),Lt("update"),Lt("remove"),Lt("clear"),Lt("export"),Lt("import"),Vl(Kr.prototype);function Lt(e){Kr.prototype[e]=function(){const t=this,n=[].slice.call(arguments);var r=n[n.length-1];let s;return typeof r=="function"&&(s=r,n.pop()),r=new Promise(function(o){e==="export"&&typeof n[0]=="function"&&(n[0]=null),t.h[++Fn]=o,t.worker.postMessage({task:e,id:Fn,args:n})}),s?(r.then(s),this):r}}function Rm(e,t,n){return t?typeof module<"u"?new(require("worker_threads")).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>_h).then(function(r){return new r.Worker("undefined/node/node.mjs")}):e?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Lm.toString()],{type:"text/javascript"}))):new window.Worker(typeof n=="string"?n:(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:re&&re.tagName.toUpperCase()==="SCRIPT"&&re.src||new URL("sodo-search.min.js",document.baseURI).href).replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js"),{type:"module"})}function Wl(e,t=0){let n=[],r=[];t&&(t=25e4/t*5e3|0);for(const s of e.entries())r.push(s),r.length===t&&(n.push(r),r=[]);return r.length&&n.push(r),n}function Kl(e,t){t||(t=new Map);for(let n=0,r;n<e.length;n++)r=e[n],t.set(r[0],r[1]);return t}function Bf(e,t=0){let n=[],r=[];t&&(t=25e4/t*1e3|0);for(const s of e.entries())r.push([s[0],Wl(s[1])[0]]),r.length===t&&(n.push(r),r=[]);return r.length&&n.push(r),n}function Vf(e,t){t||(t=new Map);for(let n=0,r,s;n<e.length;n++)r=e[n],s=t.get(r[0]),t.set(r[0],Kl(r[1],s));return t}function Hf(e){let t=[],n=[];for(const r of e.keys())n.push(r),n.length===25e4&&(t.push(n),n=[]);return n.length&&t.push(n),t}function Wf(e,t){t||(t=new Set);for(let n=0;n<e.length;n++)t.add(e[n]);return t}function fo(e,t,n,r,s,o,i=0){const l=r&&r.constructor===Array;var a=l?r.shift():r;if(!a)return this.export(e,t,s,o+1);if((a=e((t?t+".":"")+(i+1)+"."+n,JSON.stringify(a)))&&a.then){const u=this;return a.then(function(){return fo.call(u,e,t,n,l?r:null,s,o,i+1)})}return fo.call(this,e,t,n,l?r:null,s,o,i+1)}function Kf(e,t){let n="";for(const r of e.entries()){e=r[0];const s=r[1];let o="";for(let i=0,l;i<s.length;i++){l=s[i]||[""];let a="";for(let u=0;u<l.length;u++)a+=(a?",":"")+(t==="string"?'"'+l[u]+'"':l[u]);a="["+a+"]",o+=(o?",":"")+a}o='["'+e+'",['+o+"]]",n+=(n?",":"")+o}return n}function qf(e,t,n,r){let s=[];for(let o=0,i;o<e.index.length;o++)if(i=e.index[o],t>=i.length)t-=i.length;else{t=i[r?"splice":"slice"](t,n);const l=t.length;if(l&&(s=s.length?s.concat(t):t,n-=l,r&&(e.length-=l),!n))break;t=0}return s}function Jt(e){if(!this||this.constructor!==Jt)return new Jt(e);this.index=e?[e]:[],this.length=e?e.length:0;const t=this;return new Proxy([],{get(n,r){if(r==="length")return t.length;if(r==="push")return function(s){t.index[t.index.length-1].push(s),t.length++};if(r==="pop")return function(){if(t.length)return t.length--,t.index[t.index.length-1].pop()};if(r==="indexOf")return function(s){let o=0;for(let i=0,l,a;i<t.index.length;i++){if(l=t.index[i],a=l.indexOf(s),0<=a)return o+a;o+=l.length}return-1};if(r==="includes")return function(s){for(let o=0;o<t.index.length;o++)if(t.index[o].includes(s))return!0;return!1};if(r==="slice")return function(s,o){return qf(t,s||0,o||t.length,!1)};if(r==="splice")return function(s,o){return qf(t,s||0,o||t.length,!0)};if(r==="constructor")return Array;if(typeof r!="symbol")return(n=t.index[r/2**31|0])&&n[r]},set(n,r,s){return n=r/2**31|0,(t.index[n]||(t.index[n]=[]))[r]=s,t.length++,!0}})}Jt.prototype.clear=function(){this.index.length=0},Jt.prototype.destroy=function(){this.proxy=this.index=null},Jt.prototype.push=function(){};function et(e=8){if(!this||this.constructor!==et)return new et(e);this.index=se(),this.h=[],this.size=0,32<e?(this.B=Qf,this.A=BigInt(e)):(this.B=Gf,this.A=e)}et.prototype.get=function(e){const t=this.index[this.B(e)];return t&&t.get(e)},et.prototype.set=function(e,t){var n=this.B(e);let r=this.index[n];r?(n=r.size,r.set(e,t),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[e,t]]),this.h.push(r),this.size++)};function Ke(e=8){if(!this||this.constructor!==Ke)return new Ke(e);this.index=se(),this.h=[],this.size=0,32<e?(this.B=Qf,this.A=BigInt(e)):(this.B=Gf,this.A=e)}Ke.prototype.add=function(e){var t=this.B(e);let n=this.index[t];n?(t=n.size,n.add(e),(t-=n.size)&&this.size++):(this.index[t]=n=new Set([e]),this.h.push(n),this.size++)},F=et.prototype,F.has=Ke.prototype.has=function(e){const t=this.index[this.B(e)];return t&&t.has(e)},F.delete=Ke.prototype.delete=function(e){const t=this.index[this.B(e)];t&&t.delete(e)&&this.size--},F.clear=Ke.prototype.clear=function(){this.index=se(),this.h=[],this.size=0},F.values=Ke.prototype.values=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].values())yield t},F.keys=Ke.prototype.keys=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].keys())yield t},F.entries=Ke.prototype.entries=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].entries())yield t};function Gf(e){let t=2**this.A-1;if(typeof e=="number")return e&t;let n=0,r=this.A+1;for(let s=0;s<e.length;s++)n=(n*r^e.charCodeAt(s))&t;return this.A===32?n+2**31:n}function Qf(e){let t=BigInt(2)**this.A-BigInt(1);var n=typeof e;if(n==="bigint")return e&t;if(n==="number")return BigInt(e)&t;n=BigInt(0);let r=this.A+BigInt(1);for(let s=0;s<e.length;s++)n=(n*r^BigInt(e.charCodeAt(s)))&t;return n}Yt.prototype.add=function(e,t,n){if(Ur(e)&&(t=e,e=Br(t,this.key)),t&&(e||e===0)){if(!n&&this.reg.has(e))return this.update(e,t);for(let l=0,a;l<this.field.length;l++){a=this.D[l];var r=this.index.get(this.field[l]);if(typeof a=="function"){var s=a(t);s&&r.add(e,s,!1,!0)}else s=a.I,(!s||s(t))&&(a.constructor===String?a=[""+a]:We(a)&&(a=[a]),Gl(t,a,this.J,0,r,e,a[0],n))}if(this.tag)for(r=0;r<this.F.length;r++){var o=this.F[r];s=this.tag.get(this.R[r]);let l=se();if(typeof o=="function"){if(o=o(t),!o)continue}else{var i=o.I;if(i&&!i(t))continue;o.constructor===String&&(o=""+o),o=Br(t,o)}if(s&&o){We(o)&&(o=[o]);for(let a=0,u,f;a<o.length;a++)if(u=o[a],!l[u]&&(l[u]=1,(i=s.get(u))?f=i:s.set(u,f=[]),!n||!f.includes(e))){if(f.length===2**31-1){if(i=new Jt(f),this.fastupdate)for(let h of this.reg.values())h.includes(f)&&(h[h.indexOf(f)]=i);s.set(u,f=i)}f.push(e),this.fastupdate&&((i=this.reg.get(e))?i.push(f):this.reg.set(e,[f]))}}}if(this.store&&(!n||!this.store.has(e))){let l;if(this.C){l=se();for(let a=0,u;a<this.C.length;a++){if(u=this.C[a],(n=u.I)&&!n(t))continue;let f;if(typeof u=="function"){if(f=u(t),!f)continue;u=[u.V]}else if(We(u)||u.constructor===String){l[u]=t[u];continue}ql(t,l,u,0,u[0],f)}}this.store.set(e,l||t)}this.worker&&(this.fastupdate||this.reg.add(e))}return this};function ql(e,t,n,r,s,o){if(e=e[s],r===n.length-1)t[s]=o||e;else if(e)if(e.constructor===Array)for(t=t[s]=Array(e.length),s=0;s<e.length;s++)ql(e,t,n,r,s);else t=t[s]||(t[s]=se()),s=n[++r],ql(e,t,n,r,s)}function Gl(e,t,n,r,s,o,i,l){if(e=e[i])if(r===t.length-1){if(e.constructor===Array){if(n[r]){for(t=0;t<e.length;t++)s.add(o,e[t],!0,!0);return}e=e.join(" ")}s.add(o,e,l,!0)}else if(e.constructor===Array)for(i=0;i<e.length;i++)Gl(e,t,n,r,s,o,i,l);else i=t[++r],Gl(e,t,n,r,s,o,i,l);else s.db&&s.remove(o)}function Jf(e,t,n,r,s,o,i){const l=e.length;let a=[],u,f;u=se();for(let h=0,c,m,v,w;h<t;h++)for(let d=0;d<l;d++)if(v=e[d],h<v.length&&(c=v[h]))for(let p=0;p<c.length;p++){if(m=c[p],(f=u[m])?u[m]++:(f=0,u[m]=1),w=a[f]||(a[f]=[]),!i){let g=h+(d||!s?0:o||0);w=w[g]||(w[g]=[])}if(w.push(m),i&&n&&f===l-1&&w.length-r===n)return r?w.slice(r):w}if(e=a.length)if(s)a=1<a.length?Yf(a,n,r,i,o):(a=a[0]).length>n||r?a.slice(r,n+r):a;else{if(e<l)return[];if(a=a[e-1],n||r)if(i)(a.length>n||r)&&(a=a.slice(r,n+r));else{s=[];for(let h=0,c;h<a.length;h++)if(c=a[h],c.length>r)r-=c.length;else if((c.length>n||r)&&(c=c.slice(r,n+r),n-=c.length,r&&(r-=c.length)),s.push(c),!n)break;a=1<s.length?[].concat.apply([],s):s[0]}}return a}function Yf(e,t,n,r,s){const o=[],i=se();let l;var a=e.length;let u;if(r){for(s=a-1;0<=s;s--)if(u=(r=e[s])&&r.length){for(a=0;a<u;a++)if(l=r[a],!i[l]){if(i[l]=1,n)n--;else if(o.push(l),o.length===t)return o}}}else for(let f=a-1,h,c=0;0<=f;f--){h=e[f];for(let m=0;m<h.length;m++)if(u=(r=h[m])&&r.length){for(let v=0;v<u;v++)if(l=r[v],!i[l])if(i[l]=1,n)n--;else{let w=(m+(f<a-1&&s||0))/(f+1)|0;if((o[w]||(o[w]=[])).push(l),++c===t)return o}}}return o}function Fm(e,t,n){const r=se(),s=[];for(let o=0,i;o<t.length;o++){i=t[o];for(let l=0;l<i.length;l++)r[i[l]]=1}if(n)for(let o=0,i;o<e.length;o++)i=e[o],r[i]&&(s.push(i),r[i]=0);else for(let o=0,i,l;o<e.result.length;o++)for(i=e.result[o],t=0;t<i.length;t++)l=i[t],r[l]&&((s[o]||(s[o]=[])).push(l),r[l]=0);return s}function Ql(e,t,n,r){if(!e.length)return e;if(e.length===1)return e=e[0],e=n||e.length>t?t?e.slice(n,n+t):e.slice(n):e,r?_t.call(this,e):e;let s=[];for(let o=0,i,l;o<e.length;o++)if((i=e[o])&&(l=i.length)){if(n){if(n>=l){n-=l;continue}n<l&&(i=t?i.slice(n,n+t):i.slice(n),l=i.length,n=0)}if(l>t&&(i=i.slice(0,t),l=t),!s.length&&l>=t)return r?_t.call(this,i):i;if(s.push(i),t-=l,!t)break}return s=1<s.length?[].concat.apply([],s):s[0],r?_t.call(this,s):s}function ho(e,t,n){var r=n[0];if(r.then)return Promise.all(n).then(function(f){return e[t].apply(e,f)});if(r[0]&&r[0].index)return e[t].apply(e,r);r=[];let s=[],o=0,i=0,l,a,u;for(let f=0,h;f<n.length;f++)if(h=n[f]){let c;if(h.constructor===J)c=h.result;else if(h.constructor===Array)c=h;else if(o=h.limit||0,i=h.offset||0,u=h.suggest,a=h.resolve,l=h.enrich&&a,h.index)h.resolve=!1,c=h.index.search(h).result,h.resolve=a;else if(h.and)c=e.and(h.and);else if(h.or)c=e.or(h.or);else if(h.xor)c=e.xor(h.xor);else if(h.not)c=e.not(h.not);else continue;if(c.then)s.push(c);else if(c.length)r[f]=c;else if(!u&&(t==="and"||t==="xor")){r=[];break}}return{O:r,P:s,limit:o,offset:i,enrich:l,resolve:a,suggest:u}}J.prototype.or=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o}=ho(this,"or",arguments);return Xf.call(this,e,t,n,r,s,o)};function Xf(e,t,n,r,s,o){if(t.length){const i=this;return Promise.all(t).then(function(l){e=[];for(let a=0,u;a<l.length;a++)(u=l[a]).length&&(e[a]=u);return Xf.call(i,e,[],n,r,s,o)})}return e.length&&(this.result.length&&e.push(this.result),2>e.length?this.result=e[0]:(this.result=Yf(e,n,r,!1,this.h),r=0)),o?this.resolve(n,r,s):this}J.prototype.and=function(){let e=this.result.length,t,n,r,s;if(!e){const o=arguments[0];o&&(e=!!o.suggest,s=o.resolve,t=o.limit,n=o.offset,r=o.enrich&&s)}if(e){const{O:o,P:i,limit:l,offset:a,enrich:u,resolve:f,suggest:h}=ho(this,"and",arguments);return Zf.call(this,o,i,l,a,u,f,h)}return s?this.resolve(t,n,r):this};function Zf(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(a){e=[];for(let u=0,f;u<a.length;u++)(f=a[u]).length&&(e[u]=f);return Zf.call(l,e,[],n,r,s,o,i)})}if(e.length)if(this.result.length&&e.unshift(this.result),2>e.length)this.result=e[0];else{if(t=jm(e))return this.result=Jf(e,t,n,r,i,this.h,o),o?s?_t.call(this.index,this.result):this.result:this;this.result=[]}else i||(this.result=e);return o?this.resolve(n,r,s):this}J.prototype.xor=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o,suggest:i}=ho(this,"xor",arguments);return eh.call(this,e,t,n,r,s,o,i)};function eh(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(a){e=[];for(let u=0,f;u<a.length;u++)(f=a[u]).length&&(e[u]=f);return eh.call(l,e,[],n,r,s,o,i)})}if(e.length)if(this.result.length&&e.unshift(this.result),2>e.length)this.result=e[0];else return this.result=Im.call(this,e,n,r,o,this.h),o?s?_t.call(this.index,this.result):this.result:this;else i||(this.result=e);return o?this.resolve(n,r,s):this}function Im(e,t,n,r,s){const o=[],i=se();let l=0;for(let a=0,u;a<e.length;a++)if(u=e[a]){l<u.length&&(l=u.length);for(let f=0,h;f<u.length;f++)if(h=u[f])for(let c=0,m;c<h.length;c++)m=h[c],i[m]=i[m]?2:1}for(let a=0,u,f=0;a<l;a++)for(let h=0,c;h<e.length;h++)if((c=e[h])&&(u=c[a])){for(let m=0,v;m<u.length;m++)if(v=u[m],i[v]===1)if(n)n--;else if(r){if(o.push(v),o.length===t)return o}else{const w=a+(h?s:0);if(o[w]||(o[w]=[]),o[w].push(v),++f===t)return o}}return o}J.prototype.not=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o,suggest:i}=ho(this,"not",arguments);return th.call(this,e,t,n,r,s,o,i)};function th(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(a){e=[];for(let u=0,f;u<a.length;u++)(f=a[u]).length&&(e[u]=f);return th.call(l,e,[],n,r,s,o,i)})}if(e.length&&this.result.length)this.result=zm.call(this,e,n,r,o);else if(o)return this.resolve(n,r,s);return o?s?_t.call(this.index,this.result):this.result:this}function zm(e,t,n,r){const s=[];e=new Set(e.flat().flat());for(let o=0,i,l=0;o<this.result.length;o++)if(i=this.result[o]){for(let a=0,u;a<i.length;a++)if(u=i[a],!e.has(u)){if(n)n--;else if(r){if(s.push(u),s.length===t)return s}else if(s[o]||(s[o]=[]),s[o].push(u),++l===t)return s}}return s}function J(e){if(!this||this.constructor!==J)return new J(e);if(e&&e.index)return e.resolve=!1,this.index=e.index,this.h=e.boost||0,this.result=e.index.search(e).result,this;this.index=null,this.result=e||[],this.h=0}J.prototype.limit=function(e){if(this.result.length){const t=[];for(let n=0,r;n<this.result.length;n++)if(r=this.result[n])if(r.length<=e){if(t[n]=r,e-=r.length,!e)break}else{t[n]=r.slice(0,e);break}this.result=t}return this},J.prototype.offset=function(e){if(this.result.length){const t=[];for(let n=0,r;n<this.result.length;n++)(r=this.result[n])&&(r.length<=e?e-=r.length:(t[n]=r.slice(e),e=0));this.result=t}return this},J.prototype.boost=function(e){return this.h+=e,this},J.prototype.resolve=function(e,t,n){const r=this.result,s=this.index;return this.result=this.index=null,r.length?(typeof e=="object"&&(n=e.enrich,t=e.offset,e=e.limit),Ql.call(s,r,e||100,t,n)):r},Yt.prototype.search=function(e,t,n,r){n||(!t&&Ur(e)?(n=e,e=""):Ur(t)&&(n=t,t=0));let s=[];var o=[],i;let l,a,u,f=0;var h=!0;let c;if(n){n.constructor===Array&&(n={index:n}),e=n.query||e;var m=n.pluck;l=n.merge,a=m||n.field||(a=n.index)&&(a.index?null:a),u=this.tag&&n.tag;var v=n.suggest;h=n.resolve!==!1,h||m||!(a=a||this.field)||(We(a)?m=a:(a.constructor===Array&&a.length===1&&(a=a[0]),m=a.field||a.index)),c=(i=this.store&&n.enrich&&h)&&n.highlight,t=n.limit||t;var w=n.offset||0;if(t||(t=100),u&&(!this.db||!r)){u.constructor!==Array&&(u=[u]);var d=[];for(let y=0,$;y<u.length;y++)if($=u[y],$.field&&$.tag){var p=$.tag;if(p.constructor===Array)for(var g=0;g<p.length;g++)d.push($.field,p[g]);else d.push($.field,p)}else{p=Object.keys($);for(let C=0,P,T;C<p.length;C++)if(P=p[C],T=$[P],T.constructor===Array)for(g=0;g<T.length;g++)d.push(P,T[g]);else d.push(P,T)}if(u=d,!e){if(h=[],d.length)for(o=0;o<d.length;o+=2){if(this.db){if(m=this.index.get(d[o]),!m)continue;h.push(m=m.db.tag(d[o+1],t,w,i))}else m=Mm.call(this,d[o],d[o+1],t,w,i);s.push({field:d[o],tag:d[o+1],result:m})}return h.length?Promise.all(h).then(function(y){for(let $=0;$<y.length;$++)s[$].result=y[$];return s}):s}}a&&a.constructor!==Array&&(a=[a])}a||(a=this.field),d=!r&&(this.worker||this.db)&&[];let S;for(let y=0,$,C,P;y<a.length;y++){if(C=a[y],this.db&&this.tag&&!this.D[y])continue;let T;if(We(C)||(T=C,C=T.field,e=T.query||e,t=T.limit||t,w=T.offset||w,v=T.suggest||v,i=this.store&&(T.enrich||i)),r)$=r[y];else if(p=T||n,g=this.index.get(C),u&&(this.db&&(p.tag=u,S=g.db.support_tag_search,p.field=a),S||(p.enrich=!1)),d){d[y]=g.search(e,t,p),p&&i&&(p.enrich=i);continue}else $=g.search(e,t,p),p&&i&&(p.enrich=i);if(P=$&&(h?$.length:$.result.length),u&&P){if(p=[],g=0,this.db&&r){if(!S)for(let N=a.length;N<r.length;N++){let U=r[N];if(U&&U.length)g++,p.push(U);else if(!v)return h?s:new J(s)}}else for(let N=0,U,Ne;N<u.length;N+=2){if(U=this.tag.get(u[N]),!U){if(v)continue;return h?s:new J(s)}if(Ne=(U=U&&U.get(u[N+1]))&&U.length)g++,p.push(U);else if(!v)return h?s:new J(s)}if(g){if($=Fm($,p,h),P=$.length,!P&&!v)return h?$:new J($);g--}}if(P)o[f]=C,s.push($),f++;else if(a.length===1)return h?s:new J(s)}if(d){if(this.db&&u&&u.length&&!S)for(i=0;i<u.length;i+=2){if(o=this.index.get(u[i]),!o){if(v)continue;return h?s:new J(s)}d.push(o.db.tag(u[i+1],t,w,!1))}const y=this;return Promise.all(d).then(function($){return $.length?y.search(e,t,n,$):$})}if(!f)return h?s:new J(s);if(m&&(!i||!this.store))return s[0];for(d=[],w=0;w<o.length;w++){if(v=s[w],i&&v.length&&typeof v[0].doc>"u"&&(this.db?d.push(v=this.index.get(this.field[0]).db.enrich(v)):v=_t.call(this,v)),m)return h?v:new J(v);s[w]={field:o[w],result:v}}if(i&&this.db&&d.length){const y=this;return Promise.all(d).then(function($){for(let C=0;C<$.length;C++)s[C].result=$[C];return l?rh(s):c?nh(s,e,y.index,y.field,y.D,c):s})}return l?rh(s):c?nh(s,e,this.index,this.field,this.D,c):s};function nh(e,t,n,r,s,o){let i,l,a;for(let u=0,f,h,c,m;u<e.length;u++){if(f=e[u].field,!f)continue;let v=e[u].result;c=n.get(f),h=c.encoder,a=c.tokenize,m=s[r.indexOf(f)],h!==i&&(i=h,l=i.encode(t));for(let w=0;w<v.length;w++){let d="",p=Br(v[w].doc,m).split(/\s+/);for(let g=0,S,y;g<p.length;g++){S=p[g],y=h.encode(S),y=1<y.length?y.join(" "):y[0];let $;if(y&&S)for(let C=0,P;C<l.length;C++)if(P=l[C],a==="strict"){if(y===P){d+=(d?" ":"")+o.replace("$1",S),$=!0;break}}else{const T=y.indexOf(P);if(-1<T){d+=(d?" ":"")+S.substring(0,T)+o.replace("$1",S.substring(T,P.length))+S.substring(T+P.length),$=!0;break}}$||(d+=(d?" ":"")+p[g])}v[w].highlight=d}}return e}function rh(e){const t=[],n=se();for(let r=0,s,o;r<e.length;r++){s=e[r],o=s.result;for(let i=0,l,a,u;i<o.length;i++)a=o[i],typeof a!="object"&&(a={id:a}),l=a.id,(u=n[l])?u.push(s.field):(a.field=n[l]=[s.field],t.push(a))}return t}function Mm(e,t,n,r,s){if(e=this.tag.get(e),!e)return[];if((t=(e=e&&e.get(t))&&e.length-r)&&0<t)return(t>n||r)&&(e=e.slice(r,r+n)),s&&(e=_t.call(this,e)),e}function _t(e){if(!this||!this.store)return e;const t=Array(e.length);for(let n=0,r;n<e.length;n++)r=e[n],t[n]={id:r,doc:this.store.get(r)};return t}function Yt(e){if(!this||this.constructor!==Yt)return new Yt(e);const t=e.document||e.doc||e;let n,r;if(this.D=[],this.field=[],this.J=[],this.key=(n=t.key||t.id)&&po(n,this.J)||"id",(r=e.keystore||0)&&(this.keystore=r),this.fastupdate=!!e.fastupdate,this.reg=!this.fastupdate||e.worker||e.db?r?new Ke(r):new Set:r?new et(r):new Map,this.C=(n=t.store||null)&&n&&n!==!0&&[],this.store=n&&(r?new et(r):new Map),this.cache=(n=e.cache||null)&&new Xt(n),e.cache=!1,this.worker=e.worker,this.priority=e.priority||4,this.index=Dm.call(this,e,t),this.tag=null,(n=t.tag)&&(typeof n=="string"&&(n=[n]),n.length)){this.tag=new Map,this.F=[],this.R=[];for(let s=0,o,i;s<n.length;s++){if(o=n[s],i=o.field||o,!i)throw Error("The tag field from the document descriptor is undefined.");o.custom?this.F[s]=o.custom:(this.F[s]=po(i,this.J),o.filter&&(typeof this.F[s]=="string"&&(this.F[s]=new String(this.F[s])),this.F[s].I=o.filter)),this.R[s]=i,this.tag.set(i,new Map)}}if(this.worker){this.fastupdate=!1,e=[];for(const s of this.index.values())s.then&&e.push(s);if(e.length){const s=this;return Promise.all(e).then(function(o){let i=0;for(const l of s.index.entries()){const a=l[0];l[1].then&&s.index.set(a,o[i++])}return s})}}else e.db&&(this.fastupdate=!1,this.mount(e.db))}F=Yt.prototype,F.mount=function(e){let t=this.field;if(this.tag)for(let s=0,o;s<this.R.length;s++){o=this.R[s];var n=void 0;this.index.set(o,n=new tt({},this.reg)),t===this.field&&(t=t.slice(0)),t.push(o),n.tag=this.tag.get(o)}n=[];const r={db:e.db,type:e.type,fastupdate:e.fastupdate};for(let s=0,o,i;s<t.length;s++){r.field=i=t[s],o=this.index.get(i);const l=new e.constructor(e.id,r);l.id=e.id,n[s]=l.mount(o),o.document=!0,s?o.bypass=!0:o.store=this.store}return this.db=!0,Promise.all(n)},F.commit=async function(e,t){const n=[];for(const r of this.index.values())n.push(r.commit(e,t));await Promise.all(n),this.reg.clear()},F.destroy=function(){const e=[];for(const t of this.index.values())e.push(t.destroy());return Promise.all(e)};function Dm(e,t){const n=new Map;let r=t.index||t.field||t;We(r)&&(r=[r]);for(let s=0,o,i;s<r.length;s++){if(o=r[s],We(o)||(i=o,o=o.field),i=Ur(i)?Object.assign({},e,i):e,this.worker){const l=new Kr(i);n.set(o,l)}this.worker||n.set(o,new tt(i,this.reg)),i.custom?this.D[s]=i.custom:(this.D[s]=po(o,this.J),i.filter&&(typeof this.D[s]=="string"&&(this.D[s]=new String(this.D[s])),this.D[s].I=i.filter)),this.field[s]=o}if(this.C){e=t.store,We(e)&&(e=[e]);for(let s=0,o,i;s<e.length;s++)o=e[s],i=o.field||o,o.custom?(this.C[s]=o.custom,o.custom.V=i):(this.C[s]=po(i,this.J),o.filter&&(typeof this.C[s]=="string"&&(this.C[s]=new String(this.C[s])),this.C[s].I=o.filter))}return n}function po(e,t){const n=e.split(":");let r=0;for(let s=0;s<n.length;s++)e=n[s],e[e.length-1]==="]"&&(e=e.substring(0,e.length-2))&&(t[r]=!0),e&&(n[r++]=e);return r<n.length&&(n.length=r),1<r?n:n[0]}F.append=function(e,t){return this.add(e,t,!0)},F.update=function(e,t){return this.remove(e).add(e,t)},F.remove=function(e){Ur(e)&&(e=Br(e,this.key));for(var t of this.index.values())t.remove(e,!0);if(this.reg.has(e)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){t=r[0];const s=r[1],o=s.indexOf(e);-1<o&&(1<s.length?s.splice(o,1):n.delete(t))}this.store&&this.store.delete(e),this.reg.delete(e)}return this.cache&&this.cache.remove(e),this},F.clear=function(){const e=[];for(const t of this.index.values()){const n=t.clear();n.then&&e.push(n)}if(this.tag)for(const t of this.tag.values())t.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),e.length?Promise.all(e):this},F.contain=function(e){return this.db?this.index.get(this.field[0]).db.has(e):this.reg.has(e)},F.cleanup=function(){for(const e of this.index.values())e.cleanup();return this},F.get=function(e){return this.db?this.index.get(this.field[0]).db.enrich(e).then(function(t){return t[0]&&t[0].doc||null}):this.store.get(e)||null},F.set=function(e,t){return typeof e=="object"&&(t=e,e=Br(t,this.key)),this.store.set(e,t),this},F.searchCache=sh,F.export=function(e,t,n=0,r=0){if(n<this.field.length){const i=this.field[n];if((t=this.index.get(i).export(e,i,n,r=1))&&t.then){const l=this;return t.then(function(){return l.export(e,i,n+1)})}return this.export(e,i,n+1)}let s,o;switch(r){case 0:s="reg",o=Hf(this.reg),t=null;break;case 1:s="tag",o=this.tag&&Bf(this.tag,this.reg.size),t=null;break;case 2:s="doc",o=this.store&&Wl(this.store),t=null;break;default:return}return fo.call(this,e,t,s,o,n,r)},F.import=function(e,t){var n=e.split(".");n[n.length-1]==="json"&&n.pop();const r=2<n.length?n[0]:"";if(n=2<n.length?n[2]:n[1],this.worker&&r)return this.index.get(r).import(e);if(t){if(typeof t=="string"&&(t=JSON.parse(t)),r)return this.index.get(r).import(n,t);switch(n){case"reg":this.fastupdate=!1,this.reg=Wf(t,this.reg);for(let s=0,o;s<this.field.length;s++)o=this.index.get(this.field[s]),o.fastupdate=!1,o.reg=this.reg;if(this.worker){t=[];for(const s of this.index.values())t.push(s.import(e));return Promise.all(t)}break;case"tag":this.tag=Vf(t,this.tag);break;case"doc":this.store=Kl(t,this.store)}}},Vl(Yt.prototype);function sh(e,t,n){e=(typeof e=="object"?""+e.query:e).toLowerCase(),this.cache||(this.cache=new Xt);let r=this.cache.get(e);if(!r){if(r=this.search(e,t,n),r.then){const s=this;r.then(function(o){return s.cache.set(e,o),o})}this.cache.set(e,r)}return r}function Xt(e){this.limit=e&&e!==!0?e:1e3,this.cache=new Map,this.h=""}Xt.prototype.set=function(e,t){this.cache.set(this.h=e,t),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)},Xt.prototype.get=function(e){const t=this.cache.get(e);return t&&this.h!==e&&(this.cache.delete(e),this.cache.set(this.h=e,t)),t},Xt.prototype.remove=function(e){for(const t of this.cache){const n=t[0];t[1].includes(e)&&this.cache.delete(n)}},Xt.prototype.clear=function(){this.cache.clear(),this.h=""};const oh={normalize:!1,numeric:!1,dedupe:!1},go={},Jl=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),ih=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),lh=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],ah={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,ß:2,d:3,t:3,l:4,m:5,n:5,r:6};var uh={Exact:oh,Default:go,Normalize:go,LatinBalance:{mapper:Jl},LatinAdvanced:{mapper:Jl,matcher:ih,replacer:lh},LatinExtra:{mapper:Jl,replacer:lh.concat([/(?!^)[aeo]/g,""]),matcher:ih},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(e){for(let n=0;n<e.length;n++){var t=e[n];let r=t.charAt(0),s=ah[r];for(let o=1,i;o<t.length&&(i=t.charAt(o),i==="h"||i==="w"||!(i=ah[i])||i===s||(r+=i,s=i,r.length!==4));o++);e[n]=r}}},CJK:{split:""},LatinExact:oh,LatinDefault:go,LatinSimple:go};tt.prototype.remove=function(e,t){const n=this.reg.size&&(this.fastupdate?this.reg.get(e):this.reg.has(e));if(n){if(this.fastupdate){for(let r=0,s;r<n.length;r++)if(s=n[r])if(2>s.length)s.pop();else{const o=s.indexOf(e);o===n.length-1?s.pop():s.splice(o,1)}}else qr(this.map,e),this.depth&&qr(this.ctx,e);t||this.reg.delete(e)}return this.db&&(this.commit_task.push({del:e}),this.T&&dh(this)),this.cache&&this.cache.remove(e),this};function qr(e,t){let n=0;var r=typeof t>"u";if(e.constructor===Array){for(let s=0,o,i;s<e.length;s++)if((o=e[s])&&o.length)if(r)n++;else if(i=o.indexOf(t),0<=i){1<o.length?(o.splice(i,1),n++):delete e[s];break}else n++}else for(let s of e.entries()){r=s[0];const o=qr(s[1],t);o?n+=o:e.delete(r)}return n}const bm={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};tt.prototype.add=function(e,t,n,r){if(t&&(e||e===0)){if(!r&&!n&&this.reg.has(e))return this.update(e,t);if(t=this.encoder.encode(t),r=t.length){const u=se(),f=se(),h=this.depth,c=this.resolution;for(let m=0;m<r;m++){let v=t[this.rtl?r-1-m:m];var s=v.length;if(s&&(h||!f[v])){var o=this.score?this.score(t,v,m,null,0):mo(c,r,m),i="";switch(this.tokenize){case"full":if(2<s){for(let w=0,d;w<s;w++)for(o=s;o>w;o--){i=v.substring(w,o),d=this.rtl?s-1-w:w;var l=this.score?this.score(t,v,m,i,d):mo(c,r,m,s,d);Gr(this,f,i,l,e,n)}break}case"bidirectional":case"reverse":if(1<s){for(l=s-1;0<l;l--){i=v[this.rtl?s-1-l:l]+i;var a=this.score?this.score(t,v,m,i,l):mo(c,r,m,s,l);Gr(this,f,i,a,e,n)}i=""}case"forward":if(1<s){for(l=0;l<s;l++)i+=v[this.rtl?s-1-l:l],Gr(this,f,i,o,e,n);break}default:if(Gr(this,f,v,o,e,n),h&&1<r&&m<r-1){for(s=se(),i=this.U,o=v,l=Math.min(h+1,this.rtl?m+1:r-m),s[o]=1,a=1;a<l;a++)if((v=t[this.rtl?r-1-m-a:m+a])&&!s[v]){s[v]=1;const w=this.score?this.score(t,o,m,v,a-1):mo(i+(r/2>i?0:1),r,m,l-1,a-1),d=this.bidirectional&&v>o;Gr(this,u,d?o:v,w,e,n,d?v:o)}}}}}this.fastupdate||this.reg.add(e)}else t=""}return this.db&&(t||this.commit_task.push({del:e}),this.T&&dh(this)),this};function Gr(e,t,n,r,s,o,i){let l=i?e.ctx:e.map,a;if((!t[n]||i&&!(a=t[n])[i])&&(i?(t=a||(t[n]=se()),t[i]=1,(a=l.get(i))?l=a:l.set(i,l=new Map)):t[n]=1,(a=l.get(n))?l=a:l.set(n,l=a=[]),l=l[r]||(l[r]=[]),!o||!l.includes(s))){if(l.length===2**31-1){if(t=new Jt(l),e.fastupdate)for(let u of e.reg.values())u.includes(l)&&(u[u.indexOf(l)]=t);a[r]=l=t}l.push(s),e.fastupdate&&((r=e.reg.get(s))?r.push(l):e.reg.set(s,[l]))}}function mo(e,t,n,r,s){return n&&1<e?t+(r||0)<=e?n+(s||0):(e-1)/(t+(r||0))*(n+(s||0))+1|0:0}tt.prototype.search=function(e,t,n){n||(t||typeof e!="object"?typeof t=="object"&&(n=t,t=0):(n=e,e=""));let r=[],s,o,i,l=0,a,u,f,h,c;n?(e=n.query||e,t=n.limit||t,l=n.offset||0,o=n.context,i=n.suggest,c=(a=n.resolve!==!1)&&n.enrich,f=n.boost,h=n.resolution,u=this.db&&n.tag):a=this.resolve;let m=this.encoder.encode(e);if(s=m.length,t=t||(a?100:0),s===1)return fh.call(this,m[0],"",t,l,a,c,u);if(o=this.depth&&o!==!1,s===2&&o&&!i)return fh.call(this,m[1],m[0],t,l,a,c,u);let v=se(),w=0,d;if(o&&(d=m[0],w=1),h||h===0||(h=d?this.U:this.resolution),this.db){if(this.db.search&&(e=this.db.search(this,m,t,l,i,a,c,u),e!==!1))return e;const p=this;return async function(){for(let g,S;w<s;w++){if((S=m[w])&&!v[S]){if(v[S]=1,g=await Yl(p,S,d,0,0,!1,!1),g=hh(g,r,i,h)){r=g;break}d&&(i&&g&&r.length||(d=S))}i&&d&&w===s-1&&!r.length&&(h=p.resolution,d="",w=-1,v=se())}return ch(r,h,t,l,i,f,a)}()}for(let p,g;w<s;w++){if((g=m[w])&&!v[g]){if(v[g]=1,p=Yl(this,g,d,0,0,!1,!1),p=hh(p,r,i,h)){r=p;break}d&&(i&&p&&r.length||(d=g))}i&&d&&w===s-1&&!r.length&&(h=this.resolution,d="",w=-1,v=se())}return ch(r,h,t,l,i,f,a)};function ch(e,t,n,r,s,o,i){let l=e.length,a=e;if(1<l)a=Jf(e,t,n,r,s,o,i);else if(l===1)return i?Ql.call(null,e[0],n,r):new J(e[0]);return i?a:new J(a)}function fh(e,t,n,r,s,o,i){return e=Yl(this,e,t,n,r,s,o,i),this.db?e.then(function(l){return s?l||[]:new J(l)}):e&&e.length?s?Ql.call(this,e,n,r):new J(e):s?[]:new J}function hh(e,t,n,r){let s=[];if(e&&e.length){if(e.length<=r){t.push(e);return}for(let o=0,i;o<r;o++)(i=e[o])&&(s[o]=i);if(s.length){t.push(s);return}}if(!n)return s}function Yl(e,t,n,r,s,o,i,l){let a;return n&&(a=e.bidirectional&&t>n)&&(a=n,n=t,t=a),e.db?e.db.get(t,n,r,s,o,i,l):(e=n?(e=e.ctx.get(n))&&e.get(t):e.map.get(t),e)}function tt(e,t){if(!this||this.constructor!==tt)return new tt(e);if(e){var n=We(e)?e:e.preset;n&&(e=Object.assign({},bm[n],e))}else e={};n=e.context;const r=n===!0?{depth:1}:n||{},s=We(e.encoder)?uh[e.encoder]:e.encode||e.encoder||{};this.encoder=s.encode?s:typeof s=="object"?new Vr(s):{encode:s},this.resolution=e.resolution||9,this.tokenize=n=(n=e.tokenize)&&n!=="default"&&n!=="exact"&&n||"strict",this.depth=n==="strict"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!e.fastupdate,this.score=e.score||null,(n=e.keystore||0)&&(this.keystore=n),this.map=n?new et(n):new Map,this.ctx=n?new et(n):new Map,this.reg=t||(this.fastupdate?n?new et(n):new Map:n?new Ke(n):new Set),this.U=r.resolution||3,this.rtl=s.rtl||e.rtl||!1,this.cache=(n=e.cache||null)&&new Xt(n),this.resolve=e.resolve!==!1,(n=e.db)&&(this.db=this.mount(n)),this.T=e.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=e.priority||4}F=tt.prototype,F.mount=function(e){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),e.mount(this)},F.commit=function(e,t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this,e,t)},F.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function dh(e){e.commit_timer||(e.commit_timer=setTimeout(function(){e.commit_timer=null,e.db.commit(e,void 0,void 0)},1))}F.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db&&(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[{clear:!0}]),this},F.append=function(e,t){return this.add(e,t,!0)},F.contain=function(e){return this.db?this.db.has(e):this.reg.has(e)},F.update=function(e,t){const n=this,r=this.remove(e);return r&&r.then?r.then(()=>n.add(e,t)):this.add(e,t)},F.cleanup=function(){return this.fastupdate?(qr(this.map),this.depth&&qr(this.ctx),this):this},F.searchCache=sh,F.export=function(e,t,n=0,r=0){let s,o;switch(r){case 0:s="reg",o=Hf(this.reg);break;case 1:s="cfg",o=null;break;case 2:s="map",o=Wl(this.map,this.reg.size);break;case 3:s="ctx",o=Bf(this.ctx,this.reg.size);break;default:return}return fo.call(this,e,t,s,o,n,r)},F.import=function(e,t){if(t)switch(typeof t=="string"&&(t=JSON.parse(t)),e=e.split("."),e[e.length-1]==="json"&&e.pop(),e.length===3&&e.shift(),e=1<e.length?e[1]:e[0],e){case"reg":this.fastupdate=!1,this.reg=Wf(t,this.reg);break;case"map":this.map=Kl(t,this.map);break;case"ctx":this.ctx=Vf(t,this.ctx)}},F.serialize=function(e=!0){let t="",n="",r="";if(this.reg.size){let o;for(var s of this.reg.keys())o||(o=typeof s),t+=(t?",":"")+(o==="string"?'"'+s+'"':s);t="index.reg=new Set(["+t+"]);",n=Kf(this.map,o),n="index.map=new Map(["+n+"]);";for(const i of this.ctx.entries()){s=i[0];let l=Kf(i[1],o);l="new Map(["+l+"])",l='["'+s+'",'+l+"]",r+=(r?",":"")+l}r="index.ctx=new Map(["+r+"]);"}return e?"function inject(index){"+t+n+r+"}":t+n+r},Vl(tt.prototype);const ph=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),yo=["map","ctx","tag","reg","cfg"],Zt=se();function gh(e,t={}){if(!this)return new gh(e,t);typeof e=="object"&&(t=e,e=e.name),e||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(e?":"+e.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=t.field?t.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=t.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}F=gh.prototype,F.mount=function(e){return e.encoder?(e.db=this,this.open()):e.mount(this)},F.open=function(){if(this.db)return this.db;let e=this;navigator.storage&&navigator.storage.persist(),Zt[e.id]||(Zt[e.id]=[]),Zt[e.id].push(e.field);const t=ph.open(e.id,1);return t.onupgradeneeded=function(){const n=e.db=this.result;for(let r=0,s;r<yo.length;r++){s=yo[r];for(let o=0,i;o<Zt[e.id].length;o++)i=Zt[e.id][o],n.objectStoreNames.contains(s+(s!=="reg"&&i?":"+i:""))||n.createObjectStore(s+(s!=="reg"&&i?":"+i:""))}},e.db=Rt(t,function(n){e.db=n,e.db.onversionchange=function(){e.close()}})},F.close=function(){this.db&&this.db.close(),this.db=null},F.destroy=function(){const e=ph.deleteDatabase(this.id);return Rt(e)},F.clear=function(){const e=[];for(let n=0,r;n<yo.length;n++){r=yo[n];for(let s=0,o;s<Zt[this.id].length;s++)o=Zt[this.id][s],e.push(r+(r!=="reg"&&o?":"+o:""))}const t=this.db.transaction(e,"readwrite");for(let n=0;n<e.length;n++)t.objectStore(e[n]).clear();return Rt(t)},F.get=function(e,t,n=0,r=0,s=!0,o=!1){e=this.db.transaction((t?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((t?"ctx":"map")+(this.field?":"+this.field:"")).get(t?t+":"+e:e);const i=this;return Rt(e).then(function(l){let a=[];if(!l||!l.length)return a;if(s){if(!n&&!r&&l.length===1)return l[0];for(let u=0,f;u<l.length;u++)if((f=l[u])&&f.length){if(r>=f.length){r-=f.length;continue}const h=n?r+Math.min(f.length-r,n):f.length;for(let c=r;c<h;c++)a.push(f[c]);if(r=0,a.length===n)break}return o?i.enrich(a):a}return l})},F.tag=function(e,t=0,n=0,r=!1){e=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(e);const s=this;return Rt(e).then(function(o){return!o||!o.length||n>=o.length?[]:!t&&!n?o:(o=o.slice(n,n+t),r?s.enrich(o):o)})},F.enrich=function(e){typeof e!="object"&&(e=[e]);const t=this.db.transaction("reg","readonly").objectStore("reg"),n=[];for(let r=0;r<e.length;r++)n[r]=Rt(t.get(e[r]));return Promise.all(n).then(function(r){for(let s=0;s<r.length;s++)r[s]={id:e[s],doc:r[s]?JSON.parse(r[s]):null};return r})},F.has=function(e){return e=this.db.transaction("reg","readonly").objectStore("reg").getKey(e),Rt(e).then(function(t){return!!t})},F.search=null,F.info=function(){},F.transaction=function(e,t,n){e+=e!=="reg"&&this.field?":"+this.field:"";let r=this.h[e+":"+t];if(r)return n.call(this,r);let s=this.db.transaction(e,t);this.h[e+":"+t]=r=s.objectStore(e);const o=n.call(this,r);return this.h[e+":"+t]=null,Rt(s).finally(function(){return s=r=null,o})},F.commit=async function(e,t,n){if(t)await this.clear(),e.commit_task=[];else{let r=e.commit_task;e.commit_task=[];for(let s=0,o;s<r.length;s++)if(o=r[s],o.clear){await this.clear(),t=!0;break}else r[s]=o.del;t||(n||(r=r.concat(Em(e.reg))),r.length&&await this.remove(r))}e.reg.size&&(await this.transaction("map","readwrite",function(r){for(const s of e.map){const o=s[0],i=s[1];i.length&&(t?r.put(i,o):r.get(o).onsuccess=function(){let l=this.result;var a;if(l&&l.length){const u=Math.max(l.length,i.length);for(let f=0,h,c;f<u;f++)if((c=i[f])&&c.length){if((h=l[f])&&h.length)for(a=0;a<c.length;a++)h.push(c[a]);else l[f]=c;a=1}}else l=i,a=1;a&&r.put(l,o)})}}),await this.transaction("ctx","readwrite",function(r){for(const s of e.ctx){const o=s[0],i=s[1];for(const l of i){const a=l[0],u=l[1];u.length&&(t?r.put(u,o+":"+a):r.get(o+":"+a).onsuccess=function(){let f=this.result;var h;if(f&&f.length){const c=Math.max(f.length,u.length);for(let m=0,v,w;m<c;m++)if((w=u[m])&&w.length){if((v=f[m])&&v.length)for(h=0;h<w.length;h++)v.push(w[h]);else f[m]=w;h=1}}else f=u,h=1;h&&r.put(f,o+":"+a)})}}}),e.store?await this.transaction("reg","readwrite",function(r){for(const s of e.store){const o=s[0],i=s[1];r.put(typeof i=="object"?JSON.stringify(i):1,o)}}):e.bypass||await this.transaction("reg","readwrite",function(r){for(const s of e.reg.keys())r.put(1,s)}),e.tag&&await this.transaction("tag","readwrite",function(r){for(const s of e.tag){const o=s[0],i=s[1];i.length&&(r.get(o).onsuccess=function(){let l=this.result;l=l&&l.length?l.concat(i):i,r.put(l,o)})}}),e.map.clear(),e.ctx.clear(),e.tag&&e.tag.clear(),e.store&&e.store.clear(),e.document||e.reg.clear())};function Xl(e,t,n){const r=e.value;let s,o=0;for(let i=0,l;i<r.length;i++){if(l=n?r:r[i]){for(let a=0,u,f;a<t.length;a++)if(f=t[a],u=l.indexOf(f),0<=u)if(s=1,1<l.length)l.splice(u,1);else{r[i]=[];break}o+=l.length}if(n)break}o?s&&e.update(r):e.delete(),e.continue()}F.remove=function(e){return typeof e!="object"&&(e=[e]),Promise.all([this.transaction("map","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Xl(n,e)}}),this.transaction("ctx","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Xl(n,e)}}),this.transaction("tag","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Xl(n,e,!0)}}),this.transaction("reg","readwrite",function(t){for(let n=0;n<e.length;n++)t.delete(e[n])})])};function Rt(e,t){return new Promise((n,r)=>{e.onsuccess=e.oncomplete=function(){t&&t(this.result),t=null,n(this.result)},e.onerror=e.onblocked=r,e=null})}const vo={Encoder:Vr,Document:Yt},Um=uh,Bm={finalize:e=>{let t=[];for(const n of e)t.push(...Hm(n));return t}};function Vm(e){return e>=19968&&e<=40959||e>=12352&&e<=12543||e>=44032&&e<=55203||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=191471||e>=196608&&e<=205743||e>=191472&&e<=192095||e>=63744&&e<=64255||e>=194560&&e<=195103}function Hm(e){const t=[];let n="";for(const r of e){const s=r.codePointAt(0);Vm(s)?(n&&(t.push(n),n=""),t.push(r)):n+=r}return n&&t.push(n),t}const Zl=new vo.Encoder(Um.Default,Bm);class Wm{constructor({adminUrl:t,apiKey:n,dir:r}){Fd(this,Y);const s=r==="rtl",o=r==="rtl"?"reverse":"forward";this.apiUrl=t,this.apiKey=n,this.postsIndex=new vo.Document({tokenize:o,rtl:s,document:{id:"id",index:["title","excerpt"],store:!0},encoder:Zl}),this.authorsIndex=new vo.Document({tokenize:o,rtl:s,document:{id:"id",index:["name"],store:!0},encoder:Zl}),this.tagsIndex=new vo.Document({tokenize:o,rtl:s,document:{id:"id",index:["name"],store:!0},encoder:Zl}),this.init=this.init.bind(this),this.search=this.search.bind(this)}async init(){await _e(this,Y,Id).call(this),await _e(this,Y,Dd).call(this),await _e(this,Y,Bd).call(this)}search(t){const n=this.postsIndex.search(t,{enrich:!0}),r=this.authorsIndex.search(t,{enrich:!0}),s=this.tagsIndex.search(t,{enrich:!0});return{posts:_e(this,Y,Ro).call(this,n),authors:_e(this,Y,Ro).call(this,r),tags:_e(this,Y,Ro).call(this,s)}}}Y=new WeakSet,Id=async function(){const t=await _e(this,Y,zd).call(this);t.length>0&&_e(this,Y,Md).call(this,t)},zd=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/posts/?key=${this.apiKey}`;return(await(await fetch(t)).json()).posts}catch(t){return console.error("Error fetching posts:",t),[]}},Md=function(t){t.forEach(n=>{this.postsIndex.add(n)})},Dd=async function(){const t=await _e(this,Y,bd).call(this);t.length>0&&_e(this,Y,Ud).call(this,t)},bd=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/authors/?key=${this.apiKey}`;return(await(await fetch(t)).json()).authors}catch(t){return console.error("Error fetching authors:",t),[]}},Ud=function(t){t.forEach(n=>{this.authorsIndex.add(n)})},Bd=async function(){const t=await _e(this,Y,Vd).call(this);t.length>0&&_e(this,Y,Hd).call(this,t)},Vd=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/tags/?key=${this.apiKey}`;return(await(await fetch(t)).json()).tags}catch(t){return console.error("Error fetching tags:",t),[]}},Hd=function(t){t.forEach(n=>{this.tagsIndex.add(n)})},Ro=function(t){const n=[],r={};return t.forEach(s=>{s.result.forEach(o=>{r[o.id]||(n.push(o.doc),r[o.id]=!0)})}),n};var In={exports:{}};const Km={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},qm={Authors:"الكتّاب",Cancel:"إلغاء","No matches found":"لا يوجد نتائج مطابقة",Posts:"منشورات","Search posts, tags and authors":"قم بالبحث عن المنشورات، الوسوم و الكتّاب","Show more results":"اظهر المزيد من النتائج",Tags:"الوسوم"},Gm={Authors:"Автори",Cancel:"Отказ","No matches found":"Няма съвпадения",Posts:"Публикации","Search posts, tags and authors":"Търсене в публикации, етикети и автори","Show more results":"Покажи още резултати",Tags:"Етикети"},Qm={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Jm={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Ym={Authors:"Autors",Cancel:"Cancel·la","No matches found":"No s'ha trobat cap resultat",Posts:"Articles","Search posts, tags and authors":"Cerca articles, etiquetes i autors","Show more results":"Mostra més resultats",Tags:"Etiquetes"},Xm={Authors:"Autoři",Cancel:"Zrušit","No matches found":"Nenalezeno",Posts:"Články","Search posts, tags and authors":"Prohledat články, štítky a autory","Show more results":"Zobrazit více výsledků",Tags:"Štítky"},Zm={Authors:"Forfattere",Cancel:"Annuller","No matches found":"Ingen resultater fundet",Posts:"Indlæg","Search posts, tags and authors":"Søg i indlæg, tags og forfattere","Show more results":"Vis flere resultater",Tags:"Tags"},ey={Authors:"Autor*innen",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Posts","Search posts, tags and authors":"Posts, Tags und Autor*innen durchsuchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},ty={Authors:"Autoren",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Beiträge","Search posts, tags and authors":"Nach Posts, Tags und Autoren suchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},ny={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},ry={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},sy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},oy={Authors:"Autores",Cancel:"Cancelar","No matches found":"No se encontraron resultados",Posts:"Publicaciones","Search posts, tags and authors":"Buscar publicaciones, etiquetas y autores","Show more results":"Mostrar más resultados",Tags:"Etiquetas"},iy={Authors:"Autorid",Cancel:"Tühista","No matches found":"Vasteid ei leitud",Posts:"Postitused","Search posts, tags and authors":"Otsi postitusi, silte ja autoreid","Show more results":"Näita rohkem tulemusi",Tags:"Sildid"},ly={Authors:"Autoreak",Cancel:"Utzi","No matches found":"Ez da bat datorren ezer topatu",Posts:"Artikuluak","Search posts, tags and authors":"Bilatu artikuluak, etiketak eta autoreak","Show more results":"Erakutsi emaitza gehiago",Tags:"Etiketak"},ay={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},uy={Authors:"Kirjoittajat",Cancel:"Peruuta","No matches found":"Ei hakutuloksia",Posts:"Kirjoitukset","Search posts, tags and authors":"Etsi kirjoituksia, tunnisteita ja kirjoittajia","Show more results":"Näytä enemmän tuloksia",Tags:"Tunnisteet"},cy={Authors:"Auteurs",Cancel:"Annuler","No matches found":"Aucun résultat trouvé",Posts:"Articles","Search posts, tags and authors":"Rechercher des articles, des catégories et des auteurs","Show more results":"Plus de résultats",Tags:"Catégories"},fy={Authors:"Ùghdaran",Cancel:"Sguir dheth","No matches found":"Cha deach dad a lorg a fhreagras ris na lorg thu",Posts:"Postaichean","Search posts, tags and authors":"Lorg sna postaichean, tagaichean agus ùghdaran","Show more results":"Seall barrachd thoraidhean",Tags:"Tagaichean"},hy={Authors:"מחברים",Cancel:"ביטול","No matches found":"לא נמצאו התאמות",Posts:"פוסטים","Search posts, tags and authors":"חיפוש פוסטים, תגיות ומחברים","Show more results":"הצגת תוצאות נוספות",Tags:"תגיות"},dy={Authors:"लेखक",Cancel:"रद्द करें","No matches found":"कोई मैच नहीं मिला",Posts:"पोस्ट","Search posts, tags and authors":"पोस्ट, टैग और लेखक की तलाश करें","Show more results":"और परिणाम दिखाएं",Tags:"टैग"},py={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},gy={Authors:"Szerzők",Cancel:"Mégse","No matches found":"Nincs találat",Posts:"Bejegyzések","Search posts, tags and authors":"Keresés a bejegyzések, a címkék és a szerzők között","Show more results":"További találatok megjelenítése",Tags:"Címkék"},my={Authors:"Penulis",Cancel:"Batalkan","No matches found":"Tidak ada hasil yang ditemukan",Posts:"Postingan","Search posts, tags and authors":"Cari postingan, tag, dan penulis","Show more results":"Tampilkan lebih banyak hasil",Tags:"Tag"},yy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},vy={Authors:"Autori",Cancel:"Annulla","No matches found":"Nessun risultato trovato",Posts:"Articoli","Search posts, tags and authors":"Cerca articoli, tag e autori","Show more results":"Mostra più risultati",Tags:"Tag"},wy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Sy={Authors:"작성자",Cancel:"취소","No matches found":"일치하는 결과가 없어요",Posts:"게시물","Search posts, tags and authors":"게시물, 태그, 작성자 검색","Show more results":"더 많은 결과 보기",Tags:"태그"},xy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Cy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},$y={Authors:"Autori",Cancel:"Atcelt","No matches found":"Nav atrasta neviena atbilstība",Posts:"Ziņas","Search posts, tags and authors":"Meklēt ziņas, atzīmes un autorus","Show more results":"Rādīt vairāk rezultātu",Tags:"Tagi"},ky={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Py={Authors:"Нийтлэгчид",Cancel:"Цуцлах","No matches found":"Тохирох хайлтын үр дүн олдсонгүй",Posts:"Нийтлэлүүд","Search posts, tags and authors":"Нийтлэл, ангилал, нийтлэгчдээр хайх","Show more results":"Илүү олон үр дүн харуулах",Tags:"Ангилалууд"},Ey={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},jy={Authors:"Forfattere",Cancel:"Avbryt","No matches found":"Ingen treff funnet",Posts:"Innlegg","Search posts, tags and authors":"Søk i innlegg, etiketter og forfattere","Show more results":"Vis flere resultater",Tags:"Etiketter"},Ay={Authors:"लेखकहरू",Cancel:"रद्द गर्नुहोस्","No matches found":"कुनै परिणाम भेटिएन",Posts:"पोस्टहरू","Search posts, tags and authors":"पोस्टहरू, ट्यागहरू र लेखकहरू खोज्नुहोस्","Show more results":"थप परिणामहरू देखाउनुहोस्",Tags:"ट्यागहरू"},Ty={Authors:"Auteurs",Cancel:"Annuleren","No matches found":"Geen resultaten gevonden",Posts:"Berichten","Search posts, tags and authors":"Zoek berichten, tags en auteurs","Show more results":"Meer resultaten weergeven",Tags:"Tags"},Oy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Ny={Authors:"ਲੇਖਕ",Cancel:"ਰੱਦ ਕਰੋ","No matches found":"ਕੋਈ ਮੇਲ ਨਹੀਂ ਮਿਲਿਆ",Posts:"ਪੋਸਟਾਂ","Search posts, tags and authors":"ਪੋਸਟਾਂ, ਟੈਗ ਅਤੇ ਲੇਖਕ ਖੋਜੋ","Show more results":"ਹੋਰ ਨਤੀਜੇ ਦਿਖਾਓ",Tags:"ਟੈਗ"},Ly={Authors:"Autorzy",Cancel:"Anuluj","No matches found":"Nie znaleziono dopasowań",Posts:"Posty","Search posts, tags and authors":"Szukaj postów, tagów lub autorów","Show more results":"Pokaż więcej wyników",Tags:"Tagi"},_y={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Procurar publicações, marcadores e autores","Show more results":"Mostrar mais resultados",Tags:"Marcadores"},Ry={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Buscar posts, tags e autores","Show more results":"Mostrar mais resultados",Tags:"Tags"},Fy={Authors:"Autori",Cancel:"Anulează","No matches found":"Nu s-au găsit rezultate",Posts:"Postări","Search posts, tags and authors":"Caută postări, etichete și autori","Show more results":"Afișează mai multe rezultate",Tags:"Etichete"},Iy={Authors:"Авторы",Cancel:"Отмена","No matches found":"Совпадений не найдено",Posts:"Записи","Search posts, tags and authors":"Поиск по записям, тегам и авторам","Show more results":"Показать больше результатов",Tags:"Теги"},zy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},My={Authors:"Autori",Cancel:"Zrušiť","No matches found":"Nenašli sa žiadne výsledky",Posts:"Príspevky","Search posts, tags and authors":"Vyhľadajte príspevky, tagy a autorov","Show more results":"Zobraziť viac výsledkov",Tags:"Tagy"},Dy={Authors:"Avtorji",Cancel:"Prekliči","No matches found":"Ni najdenih zadetkov",Posts:"Članki","Search posts, tags and authors":"Iščite članke, oznake in avtorje","Show more results":"Prikaži več rezultatov",Tags:"Oznake"},by={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Uy={Authors:"Autori",Cancel:"Otkažite","No matches found":"Nema rezultata",Posts:"Objave","Search posts, tags and authors":"Pretražite objave, tag-ove i autore","Show more results":"Prikažite više rezultata",Tags:"Tag-ovi"},By={Authors:"Аутори",Cancel:"Откажите","No matches found":"Нема резултата",Posts:"Објаве","Search posts, tags and authors":"Претражите објаве, tag-ове и ауторе","Show more results":"Прикажите више резултата",Tags:"Tag-ови"},Vy={Authors:"Författare",Cancel:"Avbryt","No matches found":"Inga träffar hittade",Posts:"Inlägg","Search posts, tags and authors":"Sök inlägg, taggar och författare","Show more results":"Visa fler resultat",Tags:"Taggar"},Hy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Wy={Authors:"ஆசிரியர்கள்",Cancel:"ரத்து செய்","No matches found":"பொருத்தங்கள் எதுவும் இல்லை",Posts:"பதிவுகள்","Search posts, tags and authors":"பதிவுகள், குறிச்சொற்கள் மற்றும் ஆசிரியர்களைத் தேடுங்கள்","Show more results":"மேலும் முடிவுகளைக் காட்டு",Tags:"குறிச்சொற்கள்"},Ky={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},qy={Authors:"Yazarlar",Cancel:"İptal","No matches found":"Eşleşme bulunamadı",Posts:"Yazılar","Search posts, tags and authors":"Yazıları, etiketleri ve yazarları ara","Show more results":"Daha fazla sonuç göster",Tags:"Etiketler"},Gy={Authors:"Автори",Cancel:"Скасувати","No matches found":"Збігів не знайдено",Posts:"Публікації","Search posts, tags and authors":"Шукайте публікацій, теги та авторів","Show more results":"Показати більше результатів",Tags:"Теги"},Qy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Jy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Yy={Authors:"Tác giả",Cancel:"Hủy","No matches found":"Không tìm thấy",Posts:"Bài viết","Search posts, tags and authors":"Tìm bài viết, chuyên mục & tác giả","Show more results":"Xem thêm kết quả",Tags:"Chuyên mục"},Xy={Authors:"作者",Cancel:"取消","No matches found":"未找到匹配项",Posts:"文章","Search posts, tags and authors":"搜索文章、标签和作者","Show more results":"显示更多结果",Tags:"标签"},Zy={Authors:"作者",Cancel:"取消","No matches found":"無相符結果",Posts:"文章","Search posts, tags and authors":"搜尋文章、標籤與作者","Show more results":"更多結果",Tags:"標籤"};var mh;function yh(){return mh||(mh={"/ghost/i18n/locales/af/search.json":function(){return Km},"/ghost/i18n/locales/ar/search.json":function(){return qm},"/ghost/i18n/locales/bg/search.json":function(){return Gm},"/ghost/i18n/locales/bn/search.json":function(){return Qm},"/ghost/i18n/locales/bs/search.json":function(){return Jm},"/ghost/i18n/locales/ca/search.json":function(){return Ym},"/ghost/i18n/locales/cs/search.json":function(){return Xm},"/ghost/i18n/locales/da/search.json":function(){return Zm},"/ghost/i18n/locales/de/search.json":function(){return ey},"/ghost/i18n/locales/de-CH/search.json":function(){return ty},"/ghost/i18n/locales/el/search.json":function(){return ny},"/ghost/i18n/locales/en/search.json":function(){return ry},"/ghost/i18n/locales/eo/search.json":function(){return sy},"/ghost/i18n/locales/es/search.json":function(){return oy},"/ghost/i18n/locales/et/search.json":function(){return iy},"/ghost/i18n/locales/eu/search.json":function(){return ly},"/ghost/i18n/locales/fa/search.json":function(){return ay},"/ghost/i18n/locales/fi/search.json":function(){return uy},"/ghost/i18n/locales/fr/search.json":function(){return cy},"/ghost/i18n/locales/gd/search.json":function(){return fy},"/ghost/i18n/locales/he/search.json":function(){return hy},"/ghost/i18n/locales/hi/search.json":function(){return dy},"/ghost/i18n/locales/hr/search.json":function(){return py},"/ghost/i18n/locales/hu/search.json":function(){return gy},"/ghost/i18n/locales/id/search.json":function(){return my},"/ghost/i18n/locales/is/search.json":function(){return yy},"/ghost/i18n/locales/it/search.json":function(){return vy},"/ghost/i18n/locales/ja/search.json":function(){return wy},"/ghost/i18n/locales/ko/search.json":function(){return Sy},"/ghost/i18n/locales/kz/search.json":function(){return xy},"/ghost/i18n/locales/lt/search.json":function(){return Cy},"/ghost/i18n/locales/lv/search.json":function(){return $y},"/ghost/i18n/locales/mk/search.json":function(){return ky},"/ghost/i18n/locales/mn/search.json":function(){return Py},"/ghost/i18n/locales/ms/search.json":function(){return Ey},"/ghost/i18n/locales/nb/search.json":function(){return jy},"/ghost/i18n/locales/ne/search.json":function(){return Ay},"/ghost/i18n/locales/nl/search.json":function(){return Ty},"/ghost/i18n/locales/nn/search.json":function(){return Oy},"/ghost/i18n/locales/pa/search.json":function(){return Ny},"/ghost/i18n/locales/pl/search.json":function(){return Ly},"/ghost/i18n/locales/pt/search.json":function(){return _y},"/ghost/i18n/locales/pt-BR/search.json":function(){return Ry},"/ghost/i18n/locales/ro/search.json":function(){return Fy},"/ghost/i18n/locales/ru/search.json":function(){return Iy},"/ghost/i18n/locales/si/search.json":function(){return zy},"/ghost/i18n/locales/sk/search.json":function(){return My},"/ghost/i18n/locales/sl/search.json":function(){return Dy},"/ghost/i18n/locales/sq/search.json":function(){return by},"/ghost/i18n/locales/sr/search.json":function(){return Uy},"/ghost/i18n/locales/sr-Cyrl/search.json":function(){return By},"/ghost/i18n/locales/sv/search.json":function(){return Vy},"/ghost/i18n/locales/sw/search.json":function(){return Hy},"/ghost/i18n/locales/ta/search.json":function(){return Wy},"/ghost/i18n/locales/th/search.json":function(){return Ky},"/ghost/i18n/locales/tr/search.json":function(){return qy},"/ghost/i18n/locales/uk/search.json":function(){return Gy},"/ghost/i18n/locales/ur/search.json":function(){return Qy},"/ghost/i18n/locales/uz/search.json":function(){return Jy},"/ghost/i18n/locales/vi/search.json":function(){return Yy},"/ghost/i18n/locales/zh/search.json":function(){return Xy},"/ghost/i18n/locales/zh-Hant/search.json":function(){return Zy}})}function en(e){function t(n){var r=vh(n,e);if(r!==null)return yh()[r]();throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return t.resolve=function(n){var r=vh(n,e);return r!==null?r:require.resolve(n)},t}function vh(e,t){var n=e0(e);e=wo(e);var r;e[0]==="/"&&(t="");for(var s=yh(),o=["",".js",".json"];n?r=wo(t+"/node_modules/"+e):r=wo(t+"/"+e),!r.endsWith("/..");){for(var i=0;i<o.length;i++){var l=r+o[i];if(s[l])return l}if(!n)break;var a=wo(t+"/..");if(a===t)break;t=a}return null}function e0(e){var t=e[0];if(t==="/"||t==="\\")return!1;var n=e[1],r=e[2];return!(t==="."&&(!n||n==="/"||n==="\\")||t==="."&&n==="."&&(!r||r==="/"||r==="\\")||n===":"&&(r==="/"||r==="\\"))}function wo(e){e=e.replace(/\\/g,"/");for(var t=e.split("/"),n=t[0]==="",r=1;r<t.length;r++)(t[r]==="."||t[r]==="")&&t.splice(r--,1);for(var r=1;r<t.length;r++)t[r]===".."&&r>0&&t[r-1]!==".."&&t[r-1]!=="."&&(t.splice(--r,2),r--);return e=t.join("/"),n&&e[0]!=="/"?e="/"+e:e.length===0&&(e="."),e}var Qr={exports:{}};const z=e=>typeof e=="string",Jr=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},wh=e=>e==null?"":""+e,t0=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},n0=/###/g,Sh=e=>e&&e.indexOf("###")>-1?e.replace(n0,"."):e,xh=e=>!e||z(e),Yr=(e,t,n)=>{const r=z(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(xh(e))return{};const o=Sh(r[s]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return xh(e)?{}:{obj:e,k:Sh(r[s])}},Ch=(e,t,n)=>{const{obj:r,k:s}=Yr(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),l=Yr(e,i,Object);for(;l.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),l=Yr(e,i,Object),l&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},r0=(e,t,n,r)=>{const{obj:s,k:o}=Yr(e,t,Object);s[o]=s[o]||[],s[o].push(n)},So=(e,t)=>{const{obj:n,k:r}=Yr(e,t);if(n)return n[r]},s0=(e,t,n)=>{const r=So(e,n);return r!==void 0?r:So(t,n)},$h=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?z(e[r])||e[r]instanceof String||z(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):$h(e[r],t[r],n):e[r]=t[r]);return e},zn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var o0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const i0=e=>z(e)?e.replace(/[&<>"'\/]/g,t=>o0[t]):e;class l0{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const a0=[" ",",","?","!",";"],u0=new l0(20),c0=(e,t,n)=>{t=t||"",n=n||"";const r=a0.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=u0.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},ea=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let i,l="";for(let a=o;a<r.length;++a)if(a!==o&&(l+=n),l+=r[a],i=s[l],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&a<r.length-1)continue;o+=a-o+1;break}s=i}return s},xo=e=>e&&e.replace("_","-"),f0={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Co{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||f0,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(z(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Co(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Co(this.logger,t)}}var nt=new Co;class $o{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[l,a]=i;for(let u=0;u<a;u++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[l,a]=i;for(let u=0;u<a;u++)l.apply(l,[t,...r])})}}class kh extends $o{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):z(r)&&o?l.push(...r.split(o)):l.push(r)));const a=So(this.data,l);return!a&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),a||!i||!z(r)?a:ea(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."),s=n,n=l[1]),this.addNamespaces(n),Ch(this.data,l,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(z(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),s=r,r=n,n=l[1]),this.addNamespaces(n);let a=So(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?$h(a,r,o):a={...a,...r},Ch(this.data,l,a),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var Ph={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const Eh={};class ko extends $o{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),t0(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=nt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!c0(t,r,s);if(i&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:z(o)?[o]:o};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(s)}return{key:t,namespaces:z(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(t[t.length-1],n),a=l[l.length-1],u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const y=n.nsSeparator||this.options.nsSeparator;return s?{res:`${a}${y}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(n)}:`${a}${y}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(n)}:i}const h=this.resolve(t,n);let c=h&&h.res;const m=h&&h.usedKey||i,v=h&&h.exactUsedKey||i,w=Object.prototype.toString.apply(c),d=["[object Number]","[object Function]","[object RegExp]"],p=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!z(c)&&typeof c!="boolean"&&typeof c!="number";if(g&&c&&S&&d.indexOf(w)<0&&!(z(p)&&Array.isArray(c))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,c,{...n,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(h.res=y,h.usedParams=this.getUsedParamsDetails(n),h):y}if(o){const y=Array.isArray(c),$=y?[]:{},C=y?v:m;for(const P in c)if(Object.prototype.hasOwnProperty.call(c,P)){const T=`${C}${o}${P}`;$[P]=this.translate(T,{...n,joinArrays:!1,ns:l}),$[P]===T&&($[P]=c[P])}c=$}}else if(g&&z(p)&&Array.isArray(c))c=c.join(p),c&&(c=this.extendTranslation(c,t,n,r));else{let y=!1,$=!1;const C=n.count!==void 0&&!z(n.count),P=ko.hasDefaultValue(n),T=C?this.pluralResolver.getSuffix(u,n.count,n):"",N=n.ordinal&&C?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",U=C&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),Ne=U&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${T}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(c)&&P&&(y=!0,c=Ne),this.isValidLookup(c)||($=!0,c=i);const ee=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&$?void 0:c,be=P&&Ne!==c&&this.options.updateMissing;if($||y||be){if(this.logger.log(be?"updateKey":"missingKey",u,a,i,be?Ne:c),o){const k=this.resolve(i,{...n,keySeparator:!1});k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $e=[];const Le=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Le&&Le[0])for(let k=0;k<Le.length;k++)$e.push(Le[k]);else this.options.saveMissingTo==="all"?$e=this.languageUtils.toResolveHierarchy(n.lng||this.language):$e.push(n.lng||this.language);const x=(k,O,H)=>{const E=P&&H!==c?H:ee;this.options.missingKeyHandler?this.options.missingKeyHandler(k,a,O,E,be,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(k,a,O,E,be,n),this.emit("missingKey",k,a,O,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?$e.forEach(k=>{const O=this.pluralResolver.getSuffixes(k,n);U&&n[`defaultValue${this.options.pluralSeparator}zero`]&&O.indexOf(`${this.options.pluralSeparator}zero`)<0&&O.push(`${this.options.pluralSeparator}zero`),O.forEach(H=>{x([k],i+H,n[`defaultValue${H}`]||Ne)})}):x($e,i,Ne))}c=this.extendTranslation(c,t,n,h,r),$&&c===i&&this.options.appendNamespaceToMissingKey&&(c=`${a}:${i}`),($||y)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${i}`:i,y?c:void 0):c=this.options.parseMissingKeyHandler(c))}return s?(h.res=c,h.usedParams=this.getUsedParamsDetails(n),h):c}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=z(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const c=t.match(this.interpolator.nestingRegexp);f=c&&c.length}let h=r.replace&&!z(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||s.usedLng,r),u){const c=t.match(this.interpolator.nestingRegexp),m=c&&c.length;f<m&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var c=arguments.length,m=new Array(c),v=0;v<c;v++)m[v]=arguments[v];return o&&o[0]===m[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):i.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,a=z(l)?[l]:l;return t!=null&&a&&a.length&&r.applyPostProcessor!==!1&&(t=Ph.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,l;return z(t)&&(t=[t]),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),f=u.key;s=f;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const c=n.count!==void 0&&!z(n.count),m=c&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),v=n.context!==void 0&&(z(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(d=>{this.isValidLookup(r)||(l=d,!Eh[`${w[0]}-${d}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Eh[`${w[0]}-${d}`]=!0,this.logger.warn(`key "${s}" for languages "${w.join(", ")}" won't get resolved as namespace "${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!!!")),w.forEach(p=>{if(this.isValidLookup(r))return;i=p;const g=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(g,f,p,d,n);else{let y;c&&(y=this.pluralResolver.getSuffix(p,n.count,n));const $=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(g.push(f+y),n.ordinal&&y.indexOf(C)===0&&g.push(f+y.replace(C,this.options.pluralSeparator)),m&&g.push(f+$)),v){const P=`${f}${this.options.contextSeparator}${n.context}`;g.push(P),c&&(g.push(P+y),n.ordinal&&y.indexOf(C)===0&&g.push(P+y.replace(C,this.options.pluralSeparator)),m&&g.push(P+$))}}let S;for(;S=g.pop();)this.isValidLookup(r)||(o=S,r=this.getResource(p,d,S,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!z(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const ta=e=>e.charAt(0).toUpperCase()+e.slice(1);class jh{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=nt.create("languageUtils")}getScriptPartFromCode(t){if(t=xo(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=xo(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(z(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(t)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=ta(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=ta(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=ta(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),z(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return z(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):z(t)&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let h0=[{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}],d0={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const p0=["v1","v2","v3"],g0=["v4"],Ah={zero:0,one:1,two:2,few:3,many:4,other:5},m0=()=>{const e={};return h0.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:d0[t.fc]}})}),e};class y0{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=nt.create("pluralResolver"),(!this.options.compatibilityJSON||g0.includes(this.options.compatibilityJSON))&&(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=m0(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=xo(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!t.match(/-|_/))return;const a=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(a,n)}return this.pluralRulesCache[o]=i,i}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>Ah[s]-Ah[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!p0.includes(this.options.compatibilityJSON)}}const Th=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=s0(e,t,n);return!o&&s&&z(n)&&(o=ea(e,n,r),o===void 0&&(o=ea(t,n,r))),o},na=e=>e.replace(/\$/g,"$$$$");class v0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=nt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:l,suffixEscaped:a,formatSeparator:u,unescapeSuffix:f,unescapePrefix:h,nestingPrefix:c,nestingPrefixEscaped:m,nestingSuffix:v,nestingSuffixEscaped:w,nestingOptionsSeparator:d,maxReplaces:p,alwaysFormat:g}=t.interpolation;this.escape=n!==void 0?n:i0,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?zn(o):i||"{{",this.suffix=l?zn(l):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=c?zn(c):m||zn("$t("),this.nestingSuffix=v?zn(v):w||zn(")"),this.nestingOptionsSeparator=d||",",this.maxReplaces=p||1e3,this.alwaysFormat=g!==void 0?g:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const p=Th(n,a,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(p,void 0,r,{...s,...n,interpolationkey:m}):p}const v=m.split(this.formatSeparator),w=v.shift().trim(),d=v.join(this.formatSeparator).trim();return this.format(Th(n,a,w,this.options.keySeparator,this.options.ignoreJSONStructure),d,r,{...s,...n,interpolationkey:w})};this.resetRegExp();const f=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,h=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>na(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?na(this.escape(m)):na(m)}].forEach(m=>{for(l=0;o=m.regex.exec(t);){const v=o[1].trim();if(i=u(v),i===void 0)if(typeof f=="function"){const d=f(t,o,s);i=z(d)?d:""}else if(s&&Object.prototype.hasOwnProperty.call(s,v))i="";else if(h){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),i="";else!z(i)&&!this.useRawValueToEscape&&(i=wh(i));const w=m.safeValue(i);if(t=t.replace(o[0],w),h?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const l=(a,u)=>{const f=this.nestingOptionsSeparator;if(a.indexOf(f)<0)return a;const h=a.split(new RegExp(`${f}[ ]*{`));let c=`{${h[1]}`;a=h[0],c=this.interpolate(c,i);const m=c.match(/'/g),v=c.match(/"/g);(m&&m.length%2===0&&!v||v.length%2!==0)&&(c=c.replace(/'/g,'"'));try{i=JSON.parse(c),u&&(i={...u,...i})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,w),`${a}${f}${c}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,a};for(;s=this.nestingRegexp.exec(t);){let a=[];i={...r},i=i.replace&&!z(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(h=>h.trim());s[1]=f.shift(),a=f,u=!0}if(o=n(l.call(this,s[1].trim(),i),i),o&&s[0]===t&&!z(o))return o;z(o)||(o=wh(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),u&&(o=a.reduce((f,h)=>this.format(f,h,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const w0=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[l,...a]=i.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,""),f=l.trim();n[f]||(n[f]=u),u==="false"&&(n[f]=!1),u==="true"&&(n[f]=!0),isNaN(u)||(n[f]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Mn=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let l=t[i];return l||(l=e(xo(r),s),t[i]=l),l(n)}};class S0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=nt.create("formatter"),this.options=t,this.formats={number:Mn((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Mn((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Mn((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Mn((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Mn((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Mn(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){const l=o.findIndex(a=>a.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,a)=>{const{formatName:u,formatOptions:f}=w0(a);if(this.formats[u]){let h=l;try{const c=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=c.locale||c.lng||s.locale||s.lng||r;h=this.formats[u](l,m,{...f,...s,...c})}catch(c){this.logger.warn(c)}return h}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const x0=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class C0 extends $o{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=nt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},l={},a={};return t.forEach(u=>{let f=!0;n.forEach(h=>{const c=`${u}|${h}`;!r.reload&&this.store.hasResourceBundle(u,h)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?i[c]===void 0&&(i[c]=!0):(this.state[c]=1,f=!1,i[c]===void 0&&(i[c]=!0),o[c]===void 0&&(o[c]=!0),a[h]===void 0&&(a[h]=!0)))}),f||(l[u]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(a=>{r0(a.loaded,[o],i),x0(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const f=a.loaded[u];f.length&&f.forEach(h=>{l[u][h]===void 0&&(l[u][h]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const l=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(u,f)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(f=>l(null,f)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=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."),s&&s();z(t)&&(t=this.languageUtils.toResolveHierarchy(t)),z(n)&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,l),this.loaded(t,i,l)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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(!(r==null||r==="")){if(this.backend&&this.backend.create){const a={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(t,n,r,s,a):f=u(t,n,r,s),f&&typeof f.then=="function"?f.then(h=>l(null,h)).catch(l):l(null,f)}catch(f){l(f)}else u(t,n,r,s,l,a)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const Oh=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),z(e[1])&&(t.defaultValue=e[1]),z(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Nh=e=>(z(e.ns)&&(e.ns=[e.ns]),z(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),z(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Po=()=>{},$0=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Xr extends $o{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Nh(t),this.services={},this.logger=nt,this.modules={external:[]},$0(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(z(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=Oh();this.options={...s,...this.options,...Nh(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?nt.init(o(this.modules.logger),this.options):nt.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=S0);const h=new jh(this.options);this.store=new kh(this.options.resources,this.options);const c=this.services;c.logger=nt,c.resourceStore=this.store,c.languageUtils=h,c.pluralResolver=new y0(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(c.formatter=o(f),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new v0(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new C0(o(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(m){for(var v=arguments.length,w=new Array(v>1?v-1:0),d=1;d<v;d++)w[d-1]=arguments[d];t.emit(m,...w)}),this.modules.languageDetector&&(c.languageDetector=o(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=o(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new ko(this.services,this.options),this.translator.on("*",function(m){for(var v=arguments.length,w=new Array(v>1?v-1:0),d=1;d<v;d++)w[d-1]=arguments[d];t.emit(m,...w)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Po),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const a=Jr(),u=()=>{const f=(h,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(c),r(h,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),a}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Po;const s=z(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>i(a)),this.options.preload&&this.options.preload.forEach(l=>i(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const s=Jr();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Po),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Ph.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=Jr();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(a,function(){return r.t(...arguments)})},l=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=z(a)?a:this.services.languageUtils.getBestMatchFromCodes(a);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{i(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),s}getFixedT(t,n,r){var s=this;const o=function(i,l){let a;if(typeof l!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),h=2;h<u;h++)f[h-2]=arguments[h];a=s.options.overloadTranslationOptionHandler([i,l].concat(f))}else a={...l};a.lng=a.lng||o.lng,a.lngs=a.lngs||o.lngs,a.ns=a.ns||o.ns,a.keyPrefix!==""&&(a.keyPrefix=a.keyPrefix||r||o.keyPrefix);const c=s.options.keySeparator||".";let m;return a.keyPrefix&&Array.isArray(i)?m=i.map(v=>`${a.keyPrefix}${c}${v}`):m=a.keyPrefix?`${a.keyPrefix}${c}${i}`:i,s.t(m,a)};return z(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=Jr();return this.options.ns?(z(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Jr();z(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["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"],r=this.services&&this.services.languageUtils||new jh(Oh());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Xr(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Po;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Xr(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new kh(this.store.data,s),o.services.resourceStore=o.store),o.translator=new ko(o.services,s),o.translator.on("*",function(l){for(var a=arguments.length,u=new Array(a>1?a-1:0),f=1;f<a;f++)u[f-1]=arguments[f];o.emit(l,...u)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Lh=Xr.createInstance();Lh.createInstance=Xr.createInstance;var k0=Lh;const _h=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})),Dn=Wd(_h);var ra={exports:{}},sa={},Rh={exports:{}};(function(e){var t=Dn,n=Dn;function r(o){return n.existsSync(t.join(o,"package.json"))}function s(o,i){if(o=o||e.parent.filename,i=i||r,typeof o=="string"&&(o[o.length-1]!==t.sep&&(o+=t.sep),o=o.split(t.sep)),!o.length)throw new Error("package.json not found in path");o.pop();var l=o.join(t.sep);try{if(i(l))return l}catch{}return s(o,i)}e.exports=s})(Rh);var P0=Rh.exports,Fh={exports:{}},Ih=Object.prototype.toString,zh=function(t){var n=Ih.call(t),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Ih.call(t.callee)==="[object Function]"),r},oa,Mh;function E0(){if(Mh)return oa;Mh=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=zh,s=Object.prototype.propertyIsEnumerable,o=!s.call({toString:null},"toString"),i=s.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(c){var m=c.constructor;return m&&m.prototype===c},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!u["$"+c]&&t.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{a(window[c])}catch{return!0}}catch{return!0}return!1}(),h=function(c){if(typeof window>"u"||!f)return a(c);try{return a(c)}catch{return!1}};e=function(m){var v=m!==null&&typeof m=="object",w=n.call(m)==="[object Function]",d=r(m),p=v&&n.call(m)==="[object String]",g=[];if(!v&&!w&&!d)throw new TypeError("Object.keys called on a non-object");var S=i&&w;if(p&&m.length>0&&!t.call(m,0))for(var y=0;y<m.length;++y)g.push(String(y));if(d&&m.length>0)for(var $=0;$<m.length;++$)g.push(String($));else for(var C in m)!(S&&C==="prototype")&&t.call(m,C)&&g.push(String(C));if(o)for(var P=h(m),T=0;T<l.length;++T)!(P&&l[T]==="constructor")&&t.call(m,l[T])&&g.push(l[T]);return g}}return oa=e,oa}var j0=Array.prototype.slice,A0=zh,Dh=Object.keys,Eo=Dh?function(t){return Dh(t)}:E0(),bh=Object.keys;Eo.shim=function(){if(Object.keys){var t=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);t||(Object.keys=function(r){return A0(r)?bh(j0.call(r)):bh(r)})}else Object.keys=Eo;return Object.keys||Eo};var T0=Eo,Uh=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var s=42;t[n]=s;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,n);if(l.value!==s||l.enumerable!==!0)return!1}return!0},ia=Object,O0=Error,N0=EvalError,L0=RangeError,_0=ReferenceError,R0=SyntaxError,Bh=TypeError,F0=URIError,I0=Math.abs,z0=Math.floor,M0=Math.max,D0=Math.min,b0=Math.pow,U0=Math.round,B0=Number.isNaN||function(t){return t!==t},V0=B0,H0=function(t){return V0(t)||t===0?t:t<0?-1:1},W0=Object.getOwnPropertyDescriptor,jo=W0;if(jo)try{jo([],"length")}catch{jo=null}var Vh=jo,Ao=Object.defineProperty||!1;if(Ao)try{Ao({},"a",{value:1})}catch{Ao=!1}var K0=Ao,la,Hh;function q0(){if(Hh)return la;Hh=1;var e=typeof Symbol<"u"&&Symbol,t=Uh;return la=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},la}var aa,Wh;function Kh(){return Wh||(Wh=1,aa=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),aa}var ua,qh;function Gh(){if(qh)return ua;qh=1;var e=ia;return ua=e.getPrototypeOf||null,ua}var G0="Function.prototype.bind called on incompatible ",Q0=Object.prototype.toString,J0=Math.max,Y0="[object Function]",Qh=function(t,n){for(var r=[],s=0;s<t.length;s+=1)r[s]=t[s];for(var o=0;o<n.length;o+=1)r[o+t.length]=n[o];return r},X0=function(t,n){for(var r=[],s=n,o=0;s<t.length;s+=1,o+=1)r[o]=t[s];return r},Z0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},ev=function(t){var n=this;if(typeof n!="function"||Q0.apply(n)!==Y0)throw new TypeError(G0+n);for(var r=X0(arguments,1),s,o=function(){if(this instanceof s){var f=n.apply(this,Qh(r,arguments));return Object(f)===f?f:this}return n.apply(t,Qh(r,arguments))},i=J0(0,n.length-r.length),l=[],a=0;a<i;a++)l[a]="$"+a;if(s=Function("binder","return function ("+Z0(l,",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var u=function(){};u.prototype=n.prototype,s.prototype=new u,u.prototype=null}return s},tv=ev,To=Function.prototype.bind||tv,ca=Function.prototype.call,Jh=Function.prototype.apply,nv=typeof Reflect<"u"&&Reflect&&Reflect.apply,rv=To,sv=Jh,ov=ca,iv=nv,lv=iv||rv.call(ov,sv),av=To,uv=Bh,cv=ca,fv=lv,Yh=function(t){if(t.length<1||typeof t[0]!="function")throw new uv("a function is required");return fv(av,cv,t)},fa,Xh;function hv(){if(Xh)return fa;Xh=1;var e=Yh,t=Vh,n;try{n=[].__proto__===Array.prototype}catch(i){if(!i||typeof i!="object"||!("code"in i)||i.code!=="ERR_PROTO_ACCESS")throw i}var r=!!n&&t&&t(Object.prototype,"__proto__"),s=Object,o=s.getPrototypeOf;return fa=r&&typeof r.get=="function"?e([r.get]):typeof o=="function"?function(l){return o(l==null?l:s(l))}:!1,fa}var ha,Zh;function dv(){if(Zh)return ha;Zh=1;var e=Kh(),t=Gh(),n=hv();return ha=e?function(s){return e(s)}:t?function(s){if(!s||typeof s!="object"&&typeof s!="function")throw new TypeError("getProto: not an object");return t(s)}:n?function(s){return n(s)}:null,ha}var da,ed;function pv(){if(ed)return da;ed=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=To;return da=n.call(e,t),da}var b,gv=ia,mv=O0,yv=N0,vv=L0,wv=_0,bn=R0,Un=Bh,Sv=F0,xv=I0,Cv=z0,$v=M0,kv=D0,Pv=b0,Ev=U0,jv=H0,td=Function,pa=function(e){try{return td('"use strict"; return ('+e+").constructor;")()}catch{}},Zr=Vh,Av=K0,ga=function(){throw new Un},Tv=Zr?function(){try{return arguments.callee,ga}catch{try{return Zr(arguments,"callee").get}catch{return ga}}}():ga,Bn=q0()(),ae=dv(),Ov=Gh(),Nv=Kh(),nd=Jh,es=ca,Vn={},Lv=typeof Uint8Array>"u"||!ae?b:ae(Uint8Array),tn={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?b:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?b:ArrayBuffer,"%ArrayIteratorPrototype%":Bn&&ae?ae([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":Vn,"%AsyncGenerator%":Vn,"%AsyncGeneratorFunction%":Vn,"%AsyncIteratorPrototype%":Vn,"%Atomics%":typeof Atomics>"u"?b:Atomics,"%BigInt%":typeof BigInt>"u"?b:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?b:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?b:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?b:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":mv,"%eval%":eval,"%EvalError%":yv,"%Float16Array%":typeof Float16Array>"u"?b:Float16Array,"%Float32Array%":typeof Float32Array>"u"?b:Float32Array,"%Float64Array%":typeof Float64Array>"u"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?b:FinalizationRegistry,"%Function%":td,"%GeneratorFunction%":Vn,"%Int8Array%":typeof Int8Array>"u"?b:Int8Array,"%Int16Array%":typeof Int16Array>"u"?b:Int16Array,"%Int32Array%":typeof Int32Array>"u"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bn&&ae?ae(ae([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map>"u"?b:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Bn||!ae?b:ae(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":gv,"%Object.getOwnPropertyDescriptor%":Zr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?b:Promise,"%Proxy%":typeof Proxy>"u"?b:Proxy,"%RangeError%":vv,"%ReferenceError%":wv,"%Reflect%":typeof Reflect>"u"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?b:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Bn||!ae?b:ae(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bn&&ae?ae(""[Symbol.iterator]()):b,"%Symbol%":Bn?Symbol:b,"%SyntaxError%":bn,"%ThrowTypeError%":Tv,"%TypedArray%":Lv,"%TypeError%":Un,"%Uint8Array%":typeof Uint8Array>"u"?b:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?b:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?b:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?b:Uint32Array,"%URIError%":Sv,"%WeakMap%":typeof WeakMap>"u"?b:WeakMap,"%WeakRef%":typeof WeakRef>"u"?b:WeakRef,"%WeakSet%":typeof WeakSet>"u"?b:WeakSet,"%Function.prototype.call%":es,"%Function.prototype.apply%":nd,"%Object.defineProperty%":Av,"%Object.getPrototypeOf%":Ov,"%Math.abs%":xv,"%Math.floor%":Cv,"%Math.max%":$v,"%Math.min%":kv,"%Math.pow%":Pv,"%Math.round%":Ev,"%Math.sign%":jv,"%Reflect.getPrototypeOf%":Nv};if(ae)try{null.error}catch(e){var _v=ae(ae(e));tn["%Error.prototype%"]=_v}var Rv=function e(t){var n;if(t==="%AsyncFunction%")n=pa("async function () {}");else if(t==="%GeneratorFunction%")n=pa("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=pa("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=e("%AsyncGenerator%");s&&ae&&(n=ae(s.prototype))}return tn[t]=n,n},rd={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ts=To,Oo=pv(),Fv=ts.call(es,Array.prototype.concat),Iv=ts.call(nd,Array.prototype.splice),sd=ts.call(es,String.prototype.replace),No=ts.call(es,String.prototype.slice),zv=ts.call(es,RegExp.prototype.exec),Mv=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Dv=/\\(\\)?/g,bv=function(t){var n=No(t,0,1),r=No(t,-1);if(n==="%"&&r!=="%")throw new bn("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new bn("invalid intrinsic syntax, expected opening `%`");var s=[];return sd(t,Mv,function(o,i,l,a){s[s.length]=l?sd(a,Dv,"$1"):i||o}),s},Uv=function(t,n){var r=t,s;if(Oo(rd,r)&&(s=rd[r],r="%"+s[0]+"%"),Oo(tn,r)){var o=tn[r];if(o===Vn&&(o=Rv(r)),typeof o>"u"&&!n)throw new Un("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:r,value:o}}throw new bn("intrinsic "+t+" does not exist!")},Bv=function(t,n){if(typeof t!="string"||t.length===0)throw new Un("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Un('"allowMissing" argument must be a boolean');if(zv(/^%?[^%]*%?$/,t)===null)throw new bn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=bv(t),s=r.length>0?r[0]:"",o=Uv("%"+s+"%",n),i=o.name,l=o.value,a=!1,u=o.alias;u&&(s=u[0],Iv(r,Fv([0,1],u)));for(var f=1,h=!0;f<r.length;f+=1){var c=r[f],m=No(c,0,1),v=No(c,-1);if((m==='"'||m==="'"||m==="`"||v==='"'||v==="'"||v==="`")&&m!==v)throw new bn("property names with quotes must have matching quotes");if((c==="constructor"||!h)&&(a=!0),s+="."+c,i="%"+s+"%",Oo(tn,i))l=tn[i];else if(l!=null){if(!(c in l)){if(!n)throw new Un("base intrinsic for "+t+" exists, but the property is not available.");return}if(Zr&&f+1>=r.length){var w=Zr(l,c);h=!!w,h&&"get"in w&&!("originalValue"in w.get)?l=w.get:l=l[c]}else h=Oo(l,c),l=l[c];h&&!a&&(tn[i]=l)}}return l},od=Bv,id=Yh,Vv=id([od("%String.prototype.indexOf%")]),Hv=function(t,n){var r=od(t,!!n);return typeof r=="function"&&Vv(t,".prototype.")>-1?id([r]):r},Wv=T0,ld=Uh(),ad=Hv,Lo=ia,Kv=ad("Array.prototype.push"),ud=ad("Object.prototype.propertyIsEnumerable"),qv=ld?Lo.getOwnPropertySymbols:null,Gv=function(t,n){if(t==null)throw new TypeError("target must be an object");var r=Lo(t);if(arguments.length===1)return r;for(var s=1;s<arguments.length;++s){var o=Lo(arguments[s]),i=Wv(o),l=ld&&(Lo.getOwnPropertySymbols||qv);if(l)for(var a=l(o),u=0;u<a.length;++u){var f=a[u];ud(o,f)&&Kv(i,f)}for(var h=0;h<i.length;++h){var c=i[h];if(ud(o,c)){var m=o[c];r[c]=m}}}return r},ma=Gv,Qv=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),n={},r=0;r<t.length;++r)n[t[r]]=t[r];var s=Object.assign({},n),o="";for(var i in s)o+=i;return e!==o},Jv=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},Yv=function(){return!Object.assign||Qv()||Jv()?ma:Object.assign},cd={},Xv=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},ya={exports:{}};typeof Object.create=="function"?ya.exports=function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:ya.exports=function(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t};var Zv=ya.exports;(function(e){var t=/%[sdj%]/g;e.format=function(x){if(!S(x)){for(var k=[],O=0;O<arguments.length;O++)k.push(s(arguments[O]));return k.join(" ")}for(var O=1,H=arguments,E=H.length,L=String(x).replace(t,function(M){if(M==="%%")return"%";if(O>=E)return M;switch(M){case"%s":return String(H[O++]);case"%d":return Number(H[O++]);case"%j":try{return JSON.stringify(H[O++])}catch{return"[Circular]"}default:return M}}),_=H[O];O<E;_=H[++O])d(_)||!P(_)?L+=" "+_:L+=" "+s(_);return L},e.deprecate=function(x,k){if($(pe.process))return function(){return e.deprecate(x,k).apply(this,arguments)};if(process.noDeprecation===!0)return x;var O=!1;function H(){if(!O){if(process.throwDeprecation)throw new Error(k);process.traceDeprecation?console.trace(k):console.error(k),O=!0}return x.apply(this,arguments)}return H};var n={},r;e.debuglog=function(x){if($(r)&&(r=process.env.NODE_DEBUG||""),x=x.toUpperCase(),!n[x])if(new RegExp("\\b"+x+"\\b","i").test(r)){var k=process.pid;n[x]=function(){var O=e.format.apply(e,arguments);console.error("%s %d: %s",x,k,O)}}else n[x]=function(){};return n[x]};function s(x,k){var O={seen:[],stylize:i};return arguments.length>=3&&(O.depth=arguments[2]),arguments.length>=4&&(O.colors=arguments[3]),w(k)?O.showHidden=k:k&&e._extend(O,k),$(O.showHidden)&&(O.showHidden=!1),$(O.depth)&&(O.depth=2),$(O.colors)&&(O.colors=!1),$(O.customInspect)&&(O.customInspect=!0),O.colors&&(O.stylize=o),a(O,x,O.depth)}e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(x,k){var O=s.styles[k];return O?"\x1B["+s.colors[O][0]+"m"+x+"\x1B["+s.colors[O][1]+"m":x}function i(x,k){return x}function l(x){var k={};return x.forEach(function(O,H){k[O]=!0}),k}function a(x,k,O){if(x.customInspect&&k&&U(k.inspect)&&k.inspect!==e.inspect&&!(k.constructor&&k.constructor.prototype===k)){var H=k.inspect(O,x);return S(H)||(H=a(x,H,O)),H}var E=u(x,k);if(E)return E;var L=Object.keys(k),_=l(L);if(x.showHidden&&(L=Object.getOwnPropertyNames(k)),N(k)&&(L.indexOf("message")>=0||L.indexOf("description")>=0))return f(k);if(L.length===0){if(U(k)){var M=k.name?": "+k.name:"";return x.stylize("[Function"+M+"]","special")}if(C(k))return x.stylize(RegExp.prototype.toString.call(k),"regexp");if(T(k))return x.stylize(Date.prototype.toString.call(k),"date");if(N(k))return f(k)}var B="",Se=!1,Ue=["{","}"];if(v(k)&&(Se=!0,Ue=["[","]"]),U(k)){var nn=k.name?": "+k.name:"";B=" [Function"+nn+"]"}if(C(k)&&(B=" "+RegExp.prototype.toString.call(k)),T(k)&&(B=" "+Date.prototype.toUTCString.call(k)),N(k)&&(B=" "+f(k)),L.length===0&&(!Se||k.length==0))return Ue[0]+B+Ue[1];if(O<0)return C(k)?x.stylize(RegExp.prototype.toString.call(k),"regexp"):x.stylize("[Object]","special");x.seen.push(k);var rt;return Se?rt=h(x,k,O,_,L):rt=L.map(function(N1){return c(x,k,O,_,N1,Se)}),x.seen.pop(),m(rt,B,Ue)}function u(x,k){if($(k))return x.stylize("undefined","undefined");if(S(k)){var O="'"+JSON.stringify(k).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return x.stylize(O,"string")}if(g(k))return x.stylize(""+k,"number");if(w(k))return x.stylize(""+k,"boolean");if(d(k))return x.stylize("null","null")}function f(x){return"["+Error.prototype.toString.call(x)+"]"}function h(x,k,O,H,E){for(var L=[],_=0,M=k.length;_<M;++_)Le(k,String(_))?L.push(c(x,k,O,H,String(_),!0)):L.push("");return E.forEach(function(B){B.match(/^\d+$/)||L.push(c(x,k,O,H,B,!0))}),L}function c(x,k,O,H,E,L){var _,M,B;if(B=Object.getOwnPropertyDescriptor(k,E)||{value:k[E]},B.get?B.set?M=x.stylize("[Getter/Setter]","special"):M=x.stylize("[Getter]","special"):B.set&&(M=x.stylize("[Setter]","special")),Le(H,E)||(_="["+E+"]"),M||(x.seen.indexOf(B.value)<0?(d(O)?M=a(x,B.value,null):M=a(x,B.value,O-1),M.indexOf(`
50
+ `,n=this.context.stylesUrl;return n?A.jsxs(A.Fragment,{children:[A.jsx("link",{rel:"stylesheet",href:n}),A.jsx("style",{dangerouslySetInnerHTML:{__html:t}}),A.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}):A.jsxs(A.Fragment,{children:[A.jsx("style",{dangerouslySetInnerHTML:{__html:t}}),A.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const t=lm(),n={...t.frame.common};return A.jsx("div",{style:t.modalContainer,className:"gh-root-frame",children:A.jsxs(nm,{style:n,title:"portal-popup",head:this.renderFrameStyles(),searchdir:this.context.dir,children:[A.jsx("div",{onClick:r=>this.handlePopupClose(r),className:"absolute top-0 bottom-0 left-0 right-0 block backdrop-blur-[2px] animate-fadein z-0 bg-gradient-to-br from-[rgba(0,0,0,0.2)] to-[rgba(0,0,0,0.1)]"}),A.jsx(If,{})]})})}render(){const{showPopup:t}=this.context;return t?this.renderFrameContainer():null}}_o(Df,"contextType",we);var F;function he(e,t,n){const r=typeof n,s=typeof e;if(r!=="undefined"){if(s!=="undefined"){if(n){if(s==="function"&&r===s)return function(l){return e(n(l))};if(t=e.constructor,t===n.constructor){if(t===Array)return n.concat(e);if(t===Map){var o=new Map(n);for(var i of e)o.set(i[0],i[1]);return o}if(t===Set){i=new Set(n);for(o of e.values())i.add(o);return i}}}return e}return n}return s==="undefined"?t:e}function se(){return Object.create(null)}function We(e){return typeof e=="string"}function Ur(e){return typeof e=="object"}function Em(e){const t=[];for(const n of e.keys())t.push(n);return t}function Br(e,t){if(We(t))e=e[t];else for(let n=0;e&&n<t.length;n++)e=e[t[n]];return e}function jm(e){let t=0;for(let n=0,r;n<e.length;n++)(r=e[n])&&t<r.length&&(t=r.length);return t}const Am=/[^\p{L}\p{N}]+/u,Tm=/(\d{3})/g,Om=/(\D)(\d{3})/g,Nm=/(\d{3})(\D)/g,bf=/[\u0300-\u036f]/g;function Vr(e={}){if(!this||this.constructor!==Vr)return new Vr(...arguments);if(arguments.length)for(e=0;e<arguments.length;e++)this.assign(arguments[e]);else this.assign(e)}F=Vr.prototype,F.assign=function(e){this.normalize=he(e.normalize,!0,this.normalize);let t=e.include,n=t||e.exclude||e.split,r;if(n||n===""){if(typeof n=="object"&&n.constructor!==RegExp){let s="";r=!t,t||(s+="\\p{Z}"),n.letter&&(s+="\\p{L}"),n.number&&(s+="\\p{N}",r=!!t),n.symbol&&(s+="\\p{S}"),n.punctuation&&(s+="\\p{P}"),n.control&&(s+="\\p{C}"),(n=n.char)&&(s+=typeof n=="object"?n.join(""):n);try{this.split=new RegExp("["+(t?"^":"")+s+"]+","u")}catch{this.split=/\s+/}}else this.split=n,r=n===!1||2>"a1a".split(n).length;this.numeric=he(e.numeric,r)}else{try{this.split=he(this.split,Am)}catch{this.split=/\s+/}this.numeric=he(e.numeric,he(this.numeric,!0))}if(this.prepare=he(e.prepare,null,this.prepare),this.finalize=he(e.finalize,null,this.finalize),n=e.filter,this.filter=typeof n=="function"?n:he(n&&new Set(n),null,this.filter),this.dedupe=he(e.dedupe,!0,this.dedupe),this.matcher=he((n=e.matcher)&&new Map(n),null,this.matcher),this.mapper=he((n=e.mapper)&&new Map(n),null,this.mapper),this.stemmer=he((n=e.stemmer)&&new Map(n),null,this.stemmer),this.replacer=he(e.replacer,null,this.replacer),this.minlength=he(e.minlength,1,this.minlength),this.maxlength=he(e.maxlength,1024,this.maxlength),this.rtl=he(e.rtl,!1,this.rtl),(this.cache=n=he(e.cache,!0,this.cache))&&(this.H=null,this.S=typeof n=="number"?n:2e5,this.B=new Map,this.G=new Map,this.L=this.K=128),this.h="",this.M=null,this.A="",this.N=null,this.matcher)for(const s of this.matcher.keys())this.h+=(this.h?"|":"")+s;if(this.stemmer)for(const s of this.stemmer.keys())this.A+=(this.A?"|":"")+s;return this},F.addStemmer=function(e,t){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(e,t),this.A+=(this.A?"|":"")+e,this.N=null,this.cache&&Qt(this),this},F.addFilter=function(e){return typeof e=="function"?this.filter=e:(this.filter||(this.filter=new Set),this.filter.add(e)),this.cache&&Qt(this),this},F.addMapper=function(e,t){return typeof e=="object"?this.addReplacer(e,t):1<e.length?this.addMatcher(e,t):(this.mapper||(this.mapper=new Map),this.mapper.set(e,t),this.cache&&Qt(this),this)},F.addMatcher=function(e,t){return typeof e=="object"?this.addReplacer(e,t):2>e.length&&(this.dedupe||this.mapper)?this.addMapper(e,t):(this.matcher||(this.matcher=new Map),this.matcher.set(e,t),this.h+=(this.h?"|":"")+e,this.M=null,this.cache&&Qt(this),this)},F.addReplacer=function(e,t){return typeof e=="string"?this.addMatcher(e,t):(this.replacer||(this.replacer=[]),this.replacer.push(e,t),this.cache&&Qt(this),this)},F.encode=function(e){if(this.cache&&e.length<=this.K)if(this.H){if(this.B.has(e))return this.B.get(e)}else this.H=setTimeout(Qt,50,this);this.normalize&&(typeof this.normalize=="function"?e=this.normalize(e):e=bf?e.normalize("NFKD").replace(bf,"").toLowerCase():e.toLowerCase()),this.prepare&&(e=this.prepare(e)),this.numeric&&3<e.length&&(e=e.replace(Om,"$1 $2").replace(Nm,"$1 $2").replace(Tm,"$1 "));const t=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let n=[],r=this.split||this.split===""?e.split(this.split):e;for(let o=0,i,l;o<r.length;o++)if((i=l=r[o])&&!(i.length<this.minlength||i.length>this.maxlength)){if(t)n.push(i);else if(!this.filter||(typeof this.filter=="function"?this.filter(i):!this.filter.has(i))){if(this.cache&&i.length<=this.L)if(this.H){var s=this.G.get(i);if(s||s===""){s&&n.push(s);continue}}else this.H=setTimeout(Qt,50,this);if(this.stemmer&&2<i.length&&(this.N||(this.N=new RegExp("(?!^)("+this.A+")$")),i=i.replace(this.N,a=>this.stemmer.get(a))),i&&(this.mapper||this.dedupe&&1<i.length)){s="";for(let a=0,u="",f,h;a<i.length;a++)f=i.charAt(a),f===u&&this.dedupe||((h=this.mapper&&this.mapper.get(f))||h===""?h===u&&this.dedupe||!(u=h)||(s+=h):s+=u=f);i=s}if(this.matcher&&1<i.length&&(this.M||(this.M=new RegExp("("+this.h+")","g")),i=i.replace(this.M,a=>this.matcher.get(a))),i&&this.replacer)for(s=0;i&&s<this.replacer.length;s+=2)i=i.replace(this.replacer[s],this.replacer[s+1]);this.cache&&l.length<=this.L&&(this.G.set(l,i),this.G.size>this.S&&(this.G.clear(),this.L=this.L/1.1|0)),i&&n.push(i)}}return this.finalize&&(n=this.finalize(n)||n),this.cache&&e.length<=this.K&&(this.B.set(e,n),this.B.size>this.S&&(this.B.clear(),this.K=this.K/1.1|0)),n};function Qt(e){e.H=null,e.B.clear(),e.G.clear()}let Rn,Hr;async function Lm(e){e=e.data;var t=e.task;const n=e.id;let r=e.args;switch(t){case"init":Hr=e.options||{},(t=e.factory)?(Function("return "+t)()(self),Rn=new self.FlexSearch.Index(Hr),delete self.FlexSearch):Rn=new tt(Hr),postMessage({id:n});break;default:let s;t==="export"&&(r[1]?(r[0]=Hr.export,r[2]=0,r[3]=1):r=null),t==="import"?r[0]&&(e=await Hr.import.call(Rn,r[0]),Rn.import(r[0],e)):(s=r&&Rn[t].apply(Rn,r))&&s.then&&(s=await s),postMessage(t==="search"?{id:n,msg:s}:{id:n})}}function Vl(e){Wr.call(e,"add"),Wr.call(e,"append"),Wr.call(e,"search"),Wr.call(e,"update"),Wr.call(e,"remove")}let Hl,Uf,co;function _m(){Hl=co=0}function Wr(e){this[e+"Async"]=function(){const t=arguments;var n=t[t.length-1];let r;if(typeof n=="function"&&(r=n,delete t[t.length-1]),Hl?co||(co=Date.now()-Uf>=this.priority*this.priority*3):(Hl=setTimeout(_m,0),Uf=Date.now()),co){const o=this;return new Promise(i=>{setTimeout(function(){i(o[e+"Async"].apply(o,t))},0)})}const s=this[e].apply(this,t);return n=s.then?s:new Promise(o=>o(s)),r&&n.then(r),n}}let Fn=0;function Kr(e={}){function t(i){function l(a){a=a.data||a;const u=a.id,f=u&&s.h[u];f&&(f(a.msg),delete s.h[u])}if(this.worker=i,this.h=se(),this.worker)return r?this.worker.on("message",l):this.worker.onmessage=l,e.config?new Promise(function(a){s.h[++Fn]=function(){a(s),1e9<Fn&&(Fn=0)},s.worker.postMessage({id:Fn,task:"init",factory:n,options:e})}):(this.worker.postMessage({task:"init",factory:n,options:e}),this.priority=e.priority||4,this)}if(!this||this.constructor!==Kr)return new Kr(e);let n=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;n&&(n=n.toString());const r=typeof window>"u",s=this,o=Rm(n,r,e.worker);return o.then?o.then(function(i){return t.call(s,i)}):t.call(this,o)}Lt("add"),Lt("append"),Lt("search"),Lt("update"),Lt("remove"),Lt("clear"),Lt("export"),Lt("import"),Vl(Kr.prototype);function Lt(e){Kr.prototype[e]=function(){const t=this,n=[].slice.call(arguments);var r=n[n.length-1];let s;return typeof r=="function"&&(s=r,n.pop()),r=new Promise(function(o){e==="export"&&typeof n[0]=="function"&&(n[0]=null),t.h[++Fn]=o,t.worker.postMessage({task:e,id:Fn,args:n})}),s?(r.then(s),this):r}}function Rm(e,t,n){return t?typeof module<"u"?new(require("worker_threads")).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>_h).then(function(r){return new r.Worker("undefined/node/node.mjs")}):e?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Lm.toString()],{type:"text/javascript"}))):new window.Worker(typeof n=="string"?n:(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:re&&re.tagName.toUpperCase()==="SCRIPT"&&re.src||new URL("sodo-search.min.js",document.baseURI).href).replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js"),{type:"module"})}function Wl(e,t=0){let n=[],r=[];t&&(t=25e4/t*5e3|0);for(const s of e.entries())r.push(s),r.length===t&&(n.push(r),r=[]);return r.length&&n.push(r),n}function Kl(e,t){t||(t=new Map);for(let n=0,r;n<e.length;n++)r=e[n],t.set(r[0],r[1]);return t}function Bf(e,t=0){let n=[],r=[];t&&(t=25e4/t*1e3|0);for(const s of e.entries())r.push([s[0],Wl(s[1])[0]]),r.length===t&&(n.push(r),r=[]);return r.length&&n.push(r),n}function Vf(e,t){t||(t=new Map);for(let n=0,r,s;n<e.length;n++)r=e[n],s=t.get(r[0]),t.set(r[0],Kl(r[1],s));return t}function Hf(e){let t=[],n=[];for(const r of e.keys())n.push(r),n.length===25e4&&(t.push(n),n=[]);return n.length&&t.push(n),t}function Wf(e,t){t||(t=new Set);for(let n=0;n<e.length;n++)t.add(e[n]);return t}function fo(e,t,n,r,s,o,i=0){const l=r&&r.constructor===Array;var a=l?r.shift():r;if(!a)return this.export(e,t,s,o+1);if((a=e((t?t+".":"")+(i+1)+"."+n,JSON.stringify(a)))&&a.then){const u=this;return a.then(function(){return fo.call(u,e,t,n,l?r:null,s,o,i+1)})}return fo.call(this,e,t,n,l?r:null,s,o,i+1)}function Kf(e,t){let n="";for(const r of e.entries()){e=r[0];const s=r[1];let o="";for(let i=0,l;i<s.length;i++){l=s[i]||[""];let a="";for(let u=0;u<l.length;u++)a+=(a?",":"")+(t==="string"?'"'+l[u]+'"':l[u]);a="["+a+"]",o+=(o?",":"")+a}o='["'+e+'",['+o+"]]",n+=(n?",":"")+o}return n}function qf(e,t,n,r){let s=[];for(let o=0,i;o<e.index.length;o++)if(i=e.index[o],t>=i.length)t-=i.length;else{t=i[r?"splice":"slice"](t,n);const l=t.length;if(l&&(s=s.length?s.concat(t):t,n-=l,r&&(e.length-=l),!n))break;t=0}return s}function Jt(e){if(!this||this.constructor!==Jt)return new Jt(e);this.index=e?[e]:[],this.length=e?e.length:0;const t=this;return new Proxy([],{get(n,r){if(r==="length")return t.length;if(r==="push")return function(s){t.index[t.index.length-1].push(s),t.length++};if(r==="pop")return function(){if(t.length)return t.length--,t.index[t.index.length-1].pop()};if(r==="indexOf")return function(s){let o=0;for(let i=0,l,a;i<t.index.length;i++){if(l=t.index[i],a=l.indexOf(s),0<=a)return o+a;o+=l.length}return-1};if(r==="includes")return function(s){for(let o=0;o<t.index.length;o++)if(t.index[o].includes(s))return!0;return!1};if(r==="slice")return function(s,o){return qf(t,s||0,o||t.length,!1)};if(r==="splice")return function(s,o){return qf(t,s||0,o||t.length,!0)};if(r==="constructor")return Array;if(typeof r!="symbol")return(n=t.index[r/2**31|0])&&n[r]},set(n,r,s){return n=r/2**31|0,(t.index[n]||(t.index[n]=[]))[r]=s,t.length++,!0}})}Jt.prototype.clear=function(){this.index.length=0},Jt.prototype.destroy=function(){this.proxy=this.index=null},Jt.prototype.push=function(){};function et(e=8){if(!this||this.constructor!==et)return new et(e);this.index=se(),this.h=[],this.size=0,32<e?(this.B=Qf,this.A=BigInt(e)):(this.B=Gf,this.A=e)}et.prototype.get=function(e){const t=this.index[this.B(e)];return t&&t.get(e)},et.prototype.set=function(e,t){var n=this.B(e);let r=this.index[n];r?(n=r.size,r.set(e,t),(n-=r.size)&&this.size++):(this.index[n]=r=new Map([[e,t]]),this.h.push(r),this.size++)};function Ke(e=8){if(!this||this.constructor!==Ke)return new Ke(e);this.index=se(),this.h=[],this.size=0,32<e?(this.B=Qf,this.A=BigInt(e)):(this.B=Gf,this.A=e)}Ke.prototype.add=function(e){var t=this.B(e);let n=this.index[t];n?(t=n.size,n.add(e),(t-=n.size)&&this.size++):(this.index[t]=n=new Set([e]),this.h.push(n),this.size++)},F=et.prototype,F.has=Ke.prototype.has=function(e){const t=this.index[this.B(e)];return t&&t.has(e)},F.delete=Ke.prototype.delete=function(e){const t=this.index[this.B(e)];t&&t.delete(e)&&this.size--},F.clear=Ke.prototype.clear=function(){this.index=se(),this.h=[],this.size=0},F.values=Ke.prototype.values=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].values())yield t},F.keys=Ke.prototype.keys=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].keys())yield t},F.entries=Ke.prototype.entries=function*(){for(let e=0;e<this.h.length;e++)for(let t of this.h[e].entries())yield t};function Gf(e){let t=2**this.A-1;if(typeof e=="number")return e&t;let n=0,r=this.A+1;for(let s=0;s<e.length;s++)n=(n*r^e.charCodeAt(s))&t;return this.A===32?n+2**31:n}function Qf(e){let t=BigInt(2)**this.A-BigInt(1);var n=typeof e;if(n==="bigint")return e&t;if(n==="number")return BigInt(e)&t;n=BigInt(0);let r=this.A+BigInt(1);for(let s=0;s<e.length;s++)n=(n*r^BigInt(e.charCodeAt(s)))&t;return n}Yt.prototype.add=function(e,t,n){if(Ur(e)&&(t=e,e=Br(t,this.key)),t&&(e||e===0)){if(!n&&this.reg.has(e))return this.update(e,t);for(let l=0,a;l<this.field.length;l++){a=this.D[l];var r=this.index.get(this.field[l]);if(typeof a=="function"){var s=a(t);s&&r.add(e,s,!1,!0)}else s=a.I,(!s||s(t))&&(a.constructor===String?a=[""+a]:We(a)&&(a=[a]),Gl(t,a,this.J,0,r,e,a[0],n))}if(this.tag)for(r=0;r<this.F.length;r++){var o=this.F[r];s=this.tag.get(this.R[r]);let l=se();if(typeof o=="function"){if(o=o(t),!o)continue}else{var i=o.I;if(i&&!i(t))continue;o.constructor===String&&(o=""+o),o=Br(t,o)}if(s&&o){We(o)&&(o=[o]);for(let a=0,u,f;a<o.length;a++)if(u=o[a],!l[u]&&(l[u]=1,(i=s.get(u))?f=i:s.set(u,f=[]),!n||!f.includes(e))){if(f.length===2**31-1){if(i=new Jt(f),this.fastupdate)for(let h of this.reg.values())h.includes(f)&&(h[h.indexOf(f)]=i);s.set(u,f=i)}f.push(e),this.fastupdate&&((i=this.reg.get(e))?i.push(f):this.reg.set(e,[f]))}}}if(this.store&&(!n||!this.store.has(e))){let l;if(this.C){l=se();for(let a=0,u;a<this.C.length;a++){if(u=this.C[a],(n=u.I)&&!n(t))continue;let f;if(typeof u=="function"){if(f=u(t),!f)continue;u=[u.V]}else if(We(u)||u.constructor===String){l[u]=t[u];continue}ql(t,l,u,0,u[0],f)}}this.store.set(e,l||t)}this.worker&&(this.fastupdate||this.reg.add(e))}return this};function ql(e,t,n,r,s,o){if(e=e[s],r===n.length-1)t[s]=o||e;else if(e)if(e.constructor===Array)for(t=t[s]=Array(e.length),s=0;s<e.length;s++)ql(e,t,n,r,s);else t=t[s]||(t[s]=se()),s=n[++r],ql(e,t,n,r,s)}function Gl(e,t,n,r,s,o,i,l){if(e=e[i])if(r===t.length-1){if(e.constructor===Array){if(n[r]){for(t=0;t<e.length;t++)s.add(o,e[t],!0,!0);return}e=e.join(" ")}s.add(o,e,l,!0)}else if(e.constructor===Array)for(i=0;i<e.length;i++)Gl(e,t,n,r,s,o,i,l);else i=t[++r],Gl(e,t,n,r,s,o,i,l);else s.db&&s.remove(o)}function Jf(e,t,n,r,s,o,i){const l=e.length;let a=[],u,f;u=se();for(let h=0,c,m,v,w;h<t;h++)for(let d=0;d<l;d++)if(v=e[d],h<v.length&&(c=v[h]))for(let p=0;p<c.length;p++){if(m=c[p],(f=u[m])?u[m]++:(f=0,u[m]=1),w=a[f]||(a[f]=[]),!i){let g=h+(d||!s?0:o||0);w=w[g]||(w[g]=[])}if(w.push(m),i&&n&&f===l-1&&w.length-r===n)return r?w.slice(r):w}if(e=a.length)if(s)a=1<a.length?Yf(a,n,r,i,o):(a=a[0]).length>n||r?a.slice(r,n+r):a;else{if(e<l)return[];if(a=a[e-1],n||r)if(i)(a.length>n||r)&&(a=a.slice(r,n+r));else{s=[];for(let h=0,c;h<a.length;h++)if(c=a[h],c.length>r)r-=c.length;else if((c.length>n||r)&&(c=c.slice(r,n+r),n-=c.length,r&&(r-=c.length)),s.push(c),!n)break;a=1<s.length?[].concat.apply([],s):s[0]}}return a}function Yf(e,t,n,r,s){const o=[],i=se();let l;var a=e.length;let u;if(r){for(s=a-1;0<=s;s--)if(u=(r=e[s])&&r.length){for(a=0;a<u;a++)if(l=r[a],!i[l]){if(i[l]=1,n)n--;else if(o.push(l),o.length===t)return o}}}else for(let f=a-1,h,c=0;0<=f;f--){h=e[f];for(let m=0;m<h.length;m++)if(u=(r=h[m])&&r.length){for(let v=0;v<u;v++)if(l=r[v],!i[l])if(i[l]=1,n)n--;else{let w=(m+(f<a-1&&s||0))/(f+1)|0;if((o[w]||(o[w]=[])).push(l),++c===t)return o}}}return o}function Fm(e,t,n){const r=se(),s=[];for(let o=0,i;o<t.length;o++){i=t[o];for(let l=0;l<i.length;l++)r[i[l]]=1}if(n)for(let o=0,i;o<e.length;o++)i=e[o],r[i]&&(s.push(i),r[i]=0);else for(let o=0,i,l;o<e.result.length;o++)for(i=e.result[o],t=0;t<i.length;t++)l=i[t],r[l]&&((s[o]||(s[o]=[])).push(l),r[l]=0);return s}function Ql(e,t,n,r){if(!e.length)return e;if(e.length===1)return e=e[0],e=n||e.length>t?t?e.slice(n,n+t):e.slice(n):e,r?_t.call(this,e):e;let s=[];for(let o=0,i,l;o<e.length;o++)if((i=e[o])&&(l=i.length)){if(n){if(n>=l){n-=l;continue}n<l&&(i=t?i.slice(n,n+t):i.slice(n),l=i.length,n=0)}if(l>t&&(i=i.slice(0,t),l=t),!s.length&&l>=t)return r?_t.call(this,i):i;if(s.push(i),t-=l,!t)break}return s=1<s.length?[].concat.apply([],s):s[0],r?_t.call(this,s):s}function ho(e,t,n){var r=n[0];if(r.then)return Promise.all(n).then(function(f){return e[t].apply(e,f)});if(r[0]&&r[0].index)return e[t].apply(e,r);r=[];let s=[],o=0,i=0,l,a,u;for(let f=0,h;f<n.length;f++)if(h=n[f]){let c;if(h.constructor===J)c=h.result;else if(h.constructor===Array)c=h;else if(o=h.limit||0,i=h.offset||0,u=h.suggest,a=h.resolve,l=h.enrich&&a,h.index)h.resolve=!1,c=h.index.search(h).result,h.resolve=a;else if(h.and)c=e.and(h.and);else if(h.or)c=e.or(h.or);else if(h.xor)c=e.xor(h.xor);else if(h.not)c=e.not(h.not);else continue;if(c.then)s.push(c);else if(c.length)r[f]=c;else if(!u&&(t==="and"||t==="xor")){r=[];break}}return{O:r,P:s,limit:o,offset:i,enrich:l,resolve:a,suggest:u}}J.prototype.or=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o}=ho(this,"or",arguments);return Xf.call(this,e,t,n,r,s,o)};function Xf(e,t,n,r,s,o){if(t.length){const i=this;return Promise.all(t).then(function(l){e=[];for(let a=0,u;a<l.length;a++)(u=l[a]).length&&(e[a]=u);return Xf.call(i,e,[],n,r,s,o)})}return e.length&&(this.result.length&&e.push(this.result),2>e.length?this.result=e[0]:(this.result=Yf(e,n,r,!1,this.h),r=0)),o?this.resolve(n,r,s):this}J.prototype.and=function(){let e=this.result.length,t,n,r,s;if(!e){const o=arguments[0];o&&(e=!!o.suggest,s=o.resolve,t=o.limit,n=o.offset,r=o.enrich&&s)}if(e){const{O:o,P:i,limit:l,offset:a,enrich:u,resolve:f,suggest:h}=ho(this,"and",arguments);return Zf.call(this,o,i,l,a,u,f,h)}return s?this.resolve(t,n,r):this};function Zf(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(a){e=[];for(let u=0,f;u<a.length;u++)(f=a[u]).length&&(e[u]=f);return Zf.call(l,e,[],n,r,s,o,i)})}if(e.length)if(this.result.length&&e.unshift(this.result),2>e.length)this.result=e[0];else{if(t=jm(e))return this.result=Jf(e,t,n,r,i,this.h,o),o?s?_t.call(this.index,this.result):this.result:this;this.result=[]}else i||(this.result=e);return o?this.resolve(n,r,s):this}J.prototype.xor=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o,suggest:i}=ho(this,"xor",arguments);return eh.call(this,e,t,n,r,s,o,i)};function eh(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(a){e=[];for(let u=0,f;u<a.length;u++)(f=a[u]).length&&(e[u]=f);return eh.call(l,e,[],n,r,s,o,i)})}if(e.length)if(this.result.length&&e.unshift(this.result),2>e.length)this.result=e[0];else return this.result=Im.call(this,e,n,r,o,this.h),o?s?_t.call(this.index,this.result):this.result:this;else i||(this.result=e);return o?this.resolve(n,r,s):this}function Im(e,t,n,r,s){const o=[],i=se();let l=0;for(let a=0,u;a<e.length;a++)if(u=e[a]){l<u.length&&(l=u.length);for(let f=0,h;f<u.length;f++)if(h=u[f])for(let c=0,m;c<h.length;c++)m=h[c],i[m]=i[m]?2:1}for(let a=0,u,f=0;a<l;a++)for(let h=0,c;h<e.length;h++)if((c=e[h])&&(u=c[a])){for(let m=0,v;m<u.length;m++)if(v=u[m],i[v]===1)if(n)n--;else if(r){if(o.push(v),o.length===t)return o}else{const w=a+(h?s:0);if(o[w]||(o[w]=[]),o[w].push(v),++f===t)return o}}return o}J.prototype.not=function(){const{O:e,P:t,limit:n,offset:r,enrich:s,resolve:o,suggest:i}=ho(this,"not",arguments);return th.call(this,e,t,n,r,s,o,i)};function th(e,t,n,r,s,o,i){if(t.length){const l=this;return Promise.all(t).then(function(a){e=[];for(let u=0,f;u<a.length;u++)(f=a[u]).length&&(e[u]=f);return th.call(l,e,[],n,r,s,o,i)})}if(e.length&&this.result.length)this.result=zm.call(this,e,n,r,o);else if(o)return this.resolve(n,r,s);return o?s?_t.call(this.index,this.result):this.result:this}function zm(e,t,n,r){const s=[];e=new Set(e.flat().flat());for(let o=0,i,l=0;o<this.result.length;o++)if(i=this.result[o]){for(let a=0,u;a<i.length;a++)if(u=i[a],!e.has(u)){if(n)n--;else if(r){if(s.push(u),s.length===t)return s}else if(s[o]||(s[o]=[]),s[o].push(u),++l===t)return s}}return s}function J(e){if(!this||this.constructor!==J)return new J(e);if(e&&e.index)return e.resolve=!1,this.index=e.index,this.h=e.boost||0,this.result=e.index.search(e).result,this;this.index=null,this.result=e||[],this.h=0}J.prototype.limit=function(e){if(this.result.length){const t=[];for(let n=0,r;n<this.result.length;n++)if(r=this.result[n])if(r.length<=e){if(t[n]=r,e-=r.length,!e)break}else{t[n]=r.slice(0,e);break}this.result=t}return this},J.prototype.offset=function(e){if(this.result.length){const t=[];for(let n=0,r;n<this.result.length;n++)(r=this.result[n])&&(r.length<=e?e-=r.length:(t[n]=r.slice(e),e=0));this.result=t}return this},J.prototype.boost=function(e){return this.h+=e,this},J.prototype.resolve=function(e,t,n){const r=this.result,s=this.index;return this.result=this.index=null,r.length?(typeof e=="object"&&(n=e.enrich,t=e.offset,e=e.limit),Ql.call(s,r,e||100,t,n)):r},Yt.prototype.search=function(e,t,n,r){n||(!t&&Ur(e)?(n=e,e=""):Ur(t)&&(n=t,t=0));let s=[];var o=[],i;let l,a,u,f=0;var h=!0;let c;if(n){n.constructor===Array&&(n={index:n}),e=n.query||e;var m=n.pluck;l=n.merge,a=m||n.field||(a=n.index)&&(a.index?null:a),u=this.tag&&n.tag;var v=n.suggest;h=n.resolve!==!1,h||m||!(a=a||this.field)||(We(a)?m=a:(a.constructor===Array&&a.length===1&&(a=a[0]),m=a.field||a.index)),c=(i=this.store&&n.enrich&&h)&&n.highlight,t=n.limit||t;var w=n.offset||0;if(t||(t=100),u&&(!this.db||!r)){u.constructor!==Array&&(u=[u]);var d=[];for(let y=0,$;y<u.length;y++)if($=u[y],$.field&&$.tag){var p=$.tag;if(p.constructor===Array)for(var g=0;g<p.length;g++)d.push($.field,p[g]);else d.push($.field,p)}else{p=Object.keys($);for(let C=0,P,T;C<p.length;C++)if(P=p[C],T=$[P],T.constructor===Array)for(g=0;g<T.length;g++)d.push(P,T[g]);else d.push(P,T)}if(u=d,!e){if(h=[],d.length)for(o=0;o<d.length;o+=2){if(this.db){if(m=this.index.get(d[o]),!m)continue;h.push(m=m.db.tag(d[o+1],t,w,i))}else m=Mm.call(this,d[o],d[o+1],t,w,i);s.push({field:d[o],tag:d[o+1],result:m})}return h.length?Promise.all(h).then(function(y){for(let $=0;$<y.length;$++)s[$].result=y[$];return s}):s}}a&&a.constructor!==Array&&(a=[a])}a||(a=this.field),d=!r&&(this.worker||this.db)&&[];let S;for(let y=0,$,C,P;y<a.length;y++){if(C=a[y],this.db&&this.tag&&!this.D[y])continue;let T;if(We(C)||(T=C,C=T.field,e=T.query||e,t=T.limit||t,w=T.offset||w,v=T.suggest||v,i=this.store&&(T.enrich||i)),r)$=r[y];else if(p=T||n,g=this.index.get(C),u&&(this.db&&(p.tag=u,S=g.db.support_tag_search,p.field=a),S||(p.enrich=!1)),d){d[y]=g.search(e,t,p),p&&i&&(p.enrich=i);continue}else $=g.search(e,t,p),p&&i&&(p.enrich=i);if(P=$&&(h?$.length:$.result.length),u&&P){if(p=[],g=0,this.db&&r){if(!S)for(let N=a.length;N<r.length;N++){let U=r[N];if(U&&U.length)g++,p.push(U);else if(!v)return h?s:new J(s)}}else for(let N=0,U,Ne;N<u.length;N+=2){if(U=this.tag.get(u[N]),!U){if(v)continue;return h?s:new J(s)}if(Ne=(U=U&&U.get(u[N+1]))&&U.length)g++,p.push(U);else if(!v)return h?s:new J(s)}if(g){if($=Fm($,p,h),P=$.length,!P&&!v)return h?$:new J($);g--}}if(P)o[f]=C,s.push($),f++;else if(a.length===1)return h?s:new J(s)}if(d){if(this.db&&u&&u.length&&!S)for(i=0;i<u.length;i+=2){if(o=this.index.get(u[i]),!o){if(v)continue;return h?s:new J(s)}d.push(o.db.tag(u[i+1],t,w,!1))}const y=this;return Promise.all(d).then(function($){return $.length?y.search(e,t,n,$):$})}if(!f)return h?s:new J(s);if(m&&(!i||!this.store))return s[0];for(d=[],w=0;w<o.length;w++){if(v=s[w],i&&v.length&&typeof v[0].doc>"u"&&(this.db?d.push(v=this.index.get(this.field[0]).db.enrich(v)):v=_t.call(this,v)),m)return h?v:new J(v);s[w]={field:o[w],result:v}}if(i&&this.db&&d.length){const y=this;return Promise.all(d).then(function($){for(let C=0;C<$.length;C++)s[C].result=$[C];return l?rh(s):c?nh(s,e,y.index,y.field,y.D,c):s})}return l?rh(s):c?nh(s,e,this.index,this.field,this.D,c):s};function nh(e,t,n,r,s,o){let i,l,a;for(let u=0,f,h,c,m;u<e.length;u++){if(f=e[u].field,!f)continue;let v=e[u].result;c=n.get(f),h=c.encoder,a=c.tokenize,m=s[r.indexOf(f)],h!==i&&(i=h,l=i.encode(t));for(let w=0;w<v.length;w++){let d="",p=Br(v[w].doc,m).split(/\s+/);for(let g=0,S,y;g<p.length;g++){S=p[g],y=h.encode(S),y=1<y.length?y.join(" "):y[0];let $;if(y&&S)for(let C=0,P;C<l.length;C++)if(P=l[C],a==="strict"){if(y===P){d+=(d?" ":"")+o.replace("$1",S),$=!0;break}}else{const T=y.indexOf(P);if(-1<T){d+=(d?" ":"")+S.substring(0,T)+o.replace("$1",S.substring(T,P.length))+S.substring(T+P.length),$=!0;break}}$||(d+=(d?" ":"")+p[g])}v[w].highlight=d}}return e}function rh(e){const t=[],n=se();for(let r=0,s,o;r<e.length;r++){s=e[r],o=s.result;for(let i=0,l,a,u;i<o.length;i++)a=o[i],typeof a!="object"&&(a={id:a}),l=a.id,(u=n[l])?u.push(s.field):(a.field=n[l]=[s.field],t.push(a))}return t}function Mm(e,t,n,r,s){if(e=this.tag.get(e),!e)return[];if((t=(e=e&&e.get(t))&&e.length-r)&&0<t)return(t>n||r)&&(e=e.slice(r,r+n)),s&&(e=_t.call(this,e)),e}function _t(e){if(!this||!this.store)return e;const t=Array(e.length);for(let n=0,r;n<e.length;n++)r=e[n],t[n]={id:r,doc:this.store.get(r)};return t}function Yt(e){if(!this||this.constructor!==Yt)return new Yt(e);const t=e.document||e.doc||e;let n,r;if(this.D=[],this.field=[],this.J=[],this.key=(n=t.key||t.id)&&po(n,this.J)||"id",(r=e.keystore||0)&&(this.keystore=r),this.fastupdate=!!e.fastupdate,this.reg=!this.fastupdate||e.worker||e.db?r?new Ke(r):new Set:r?new et(r):new Map,this.C=(n=t.store||null)&&n&&n!==!0&&[],this.store=n&&(r?new et(r):new Map),this.cache=(n=e.cache||null)&&new Xt(n),e.cache=!1,this.worker=e.worker,this.priority=e.priority||4,this.index=Dm.call(this,e,t),this.tag=null,(n=t.tag)&&(typeof n=="string"&&(n=[n]),n.length)){this.tag=new Map,this.F=[],this.R=[];for(let s=0,o,i;s<n.length;s++){if(o=n[s],i=o.field||o,!i)throw Error("The tag field from the document descriptor is undefined.");o.custom?this.F[s]=o.custom:(this.F[s]=po(i,this.J),o.filter&&(typeof this.F[s]=="string"&&(this.F[s]=new String(this.F[s])),this.F[s].I=o.filter)),this.R[s]=i,this.tag.set(i,new Map)}}if(this.worker){this.fastupdate=!1,e=[];for(const s of this.index.values())s.then&&e.push(s);if(e.length){const s=this;return Promise.all(e).then(function(o){let i=0;for(const l of s.index.entries()){const a=l[0];l[1].then&&s.index.set(a,o[i++])}return s})}}else e.db&&(this.fastupdate=!1,this.mount(e.db))}F=Yt.prototype,F.mount=function(e){let t=this.field;if(this.tag)for(let s=0,o;s<this.R.length;s++){o=this.R[s];var n=void 0;this.index.set(o,n=new tt({},this.reg)),t===this.field&&(t=t.slice(0)),t.push(o),n.tag=this.tag.get(o)}n=[];const r={db:e.db,type:e.type,fastupdate:e.fastupdate};for(let s=0,o,i;s<t.length;s++){r.field=i=t[s],o=this.index.get(i);const l=new e.constructor(e.id,r);l.id=e.id,n[s]=l.mount(o),o.document=!0,s?o.bypass=!0:o.store=this.store}return this.db=!0,Promise.all(n)},F.commit=async function(e,t){const n=[];for(const r of this.index.values())n.push(r.commit(e,t));await Promise.all(n),this.reg.clear()},F.destroy=function(){const e=[];for(const t of this.index.values())e.push(t.destroy());return Promise.all(e)};function Dm(e,t){const n=new Map;let r=t.index||t.field||t;We(r)&&(r=[r]);for(let s=0,o,i;s<r.length;s++){if(o=r[s],We(o)||(i=o,o=o.field),i=Ur(i)?Object.assign({},e,i):e,this.worker){const l=new Kr(i);n.set(o,l)}this.worker||n.set(o,new tt(i,this.reg)),i.custom?this.D[s]=i.custom:(this.D[s]=po(o,this.J),i.filter&&(typeof this.D[s]=="string"&&(this.D[s]=new String(this.D[s])),this.D[s].I=i.filter)),this.field[s]=o}if(this.C){e=t.store,We(e)&&(e=[e]);for(let s=0,o,i;s<e.length;s++)o=e[s],i=o.field||o,o.custom?(this.C[s]=o.custom,o.custom.V=i):(this.C[s]=po(i,this.J),o.filter&&(typeof this.C[s]=="string"&&(this.C[s]=new String(this.C[s])),this.C[s].I=o.filter))}return n}function po(e,t){const n=e.split(":");let r=0;for(let s=0;s<n.length;s++)e=n[s],e[e.length-1]==="]"&&(e=e.substring(0,e.length-2))&&(t[r]=!0),e&&(n[r++]=e);return r<n.length&&(n.length=r),1<r?n:n[0]}F.append=function(e,t){return this.add(e,t,!0)},F.update=function(e,t){return this.remove(e).add(e,t)},F.remove=function(e){Ur(e)&&(e=Br(e,this.key));for(var t of this.index.values())t.remove(e,!0);if(this.reg.has(e)){if(this.tag&&!this.fastupdate)for(let n of this.tag.values())for(let r of n){t=r[0];const s=r[1],o=s.indexOf(e);-1<o&&(1<s.length?s.splice(o,1):n.delete(t))}this.store&&this.store.delete(e),this.reg.delete(e)}return this.cache&&this.cache.remove(e),this},F.clear=function(){const e=[];for(const t of this.index.values()){const n=t.clear();n.then&&e.push(n)}if(this.tag)for(const t of this.tag.values())t.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),e.length?Promise.all(e):this},F.contain=function(e){return this.db?this.index.get(this.field[0]).db.has(e):this.reg.has(e)},F.cleanup=function(){for(const e of this.index.values())e.cleanup();return this},F.get=function(e){return this.db?this.index.get(this.field[0]).db.enrich(e).then(function(t){return t[0]&&t[0].doc||null}):this.store.get(e)||null},F.set=function(e,t){return typeof e=="object"&&(t=e,e=Br(t,this.key)),this.store.set(e,t),this},F.searchCache=sh,F.export=function(e,t,n=0,r=0){if(n<this.field.length){const i=this.field[n];if((t=this.index.get(i).export(e,i,n,r=1))&&t.then){const l=this;return t.then(function(){return l.export(e,i,n+1)})}return this.export(e,i,n+1)}let s,o;switch(r){case 0:s="reg",o=Hf(this.reg),t=null;break;case 1:s="tag",o=this.tag&&Bf(this.tag,this.reg.size),t=null;break;case 2:s="doc",o=this.store&&Wl(this.store),t=null;break;default:return}return fo.call(this,e,t,s,o,n,r)},F.import=function(e,t){var n=e.split(".");n[n.length-1]==="json"&&n.pop();const r=2<n.length?n[0]:"";if(n=2<n.length?n[2]:n[1],this.worker&&r)return this.index.get(r).import(e);if(t){if(typeof t=="string"&&(t=JSON.parse(t)),r)return this.index.get(r).import(n,t);switch(n){case"reg":this.fastupdate=!1,this.reg=Wf(t,this.reg);for(let s=0,o;s<this.field.length;s++)o=this.index.get(this.field[s]),o.fastupdate=!1,o.reg=this.reg;if(this.worker){t=[];for(const s of this.index.values())t.push(s.import(e));return Promise.all(t)}break;case"tag":this.tag=Vf(t,this.tag);break;case"doc":this.store=Kl(t,this.store)}}},Vl(Yt.prototype);function sh(e,t,n){e=(typeof e=="object"?""+e.query:e).toLowerCase(),this.cache||(this.cache=new Xt);let r=this.cache.get(e);if(!r){if(r=this.search(e,t,n),r.then){const s=this;r.then(function(o){return s.cache.set(e,o),o})}this.cache.set(e,r)}return r}function Xt(e){this.limit=e&&e!==!0?e:1e3,this.cache=new Map,this.h=""}Xt.prototype.set=function(e,t){this.cache.set(this.h=e,t),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)},Xt.prototype.get=function(e){const t=this.cache.get(e);return t&&this.h!==e&&(this.cache.delete(e),this.cache.set(this.h=e,t)),t},Xt.prototype.remove=function(e){for(const t of this.cache){const n=t[0];t[1].includes(e)&&this.cache.delete(n)}},Xt.prototype.clear=function(){this.cache.clear(),this.h=""};const oh={normalize:!1,numeric:!1,dedupe:!1},go={},Jl=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),ih=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),lh=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],ah={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,ß:2,d:3,t:3,l:4,m:5,n:5,r:6};var uh={Exact:oh,Default:go,Normalize:go,LatinBalance:{mapper:Jl},LatinAdvanced:{mapper:Jl,matcher:ih,replacer:lh},LatinExtra:{mapper:Jl,replacer:lh.concat([/(?!^)[aeo]/g,""]),matcher:ih},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(e){for(let n=0;n<e.length;n++){var t=e[n];let r=t.charAt(0),s=ah[r];for(let o=1,i;o<t.length&&(i=t.charAt(o),i==="h"||i==="w"||!(i=ah[i])||i===s||(r+=i,s=i,r.length!==4));o++);e[n]=r}}},CJK:{split:""},LatinExact:oh,LatinDefault:go,LatinSimple:go};tt.prototype.remove=function(e,t){const n=this.reg.size&&(this.fastupdate?this.reg.get(e):this.reg.has(e));if(n){if(this.fastupdate){for(let r=0,s;r<n.length;r++)if(s=n[r])if(2>s.length)s.pop();else{const o=s.indexOf(e);o===n.length-1?s.pop():s.splice(o,1)}}else qr(this.map,e),this.depth&&qr(this.ctx,e);t||this.reg.delete(e)}return this.db&&(this.commit_task.push({del:e}),this.T&&dh(this)),this.cache&&this.cache.remove(e),this};function qr(e,t){let n=0;var r=typeof t>"u";if(e.constructor===Array){for(let s=0,o,i;s<e.length;s++)if((o=e[s])&&o.length)if(r)n++;else if(i=o.indexOf(t),0<=i){1<o.length?(o.splice(i,1),n++):delete e[s];break}else n++}else for(let s of e.entries()){r=s[0];const o=qr(s[1],t);o?n+=o:e.delete(r)}return n}const bm={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};tt.prototype.add=function(e,t,n,r){if(t&&(e||e===0)){if(!r&&!n&&this.reg.has(e))return this.update(e,t);if(t=this.encoder.encode(t),r=t.length){const u=se(),f=se(),h=this.depth,c=this.resolution;for(let m=0;m<r;m++){let v=t[this.rtl?r-1-m:m];var s=v.length;if(s&&(h||!f[v])){var o=this.score?this.score(t,v,m,null,0):mo(c,r,m),i="";switch(this.tokenize){case"full":if(2<s){for(let w=0,d;w<s;w++)for(o=s;o>w;o--){i=v.substring(w,o),d=this.rtl?s-1-w:w;var l=this.score?this.score(t,v,m,i,d):mo(c,r,m,s,d);Gr(this,f,i,l,e,n)}break}case"bidirectional":case"reverse":if(1<s){for(l=s-1;0<l;l--){i=v[this.rtl?s-1-l:l]+i;var a=this.score?this.score(t,v,m,i,l):mo(c,r,m,s,l);Gr(this,f,i,a,e,n)}i=""}case"forward":if(1<s){for(l=0;l<s;l++)i+=v[this.rtl?s-1-l:l],Gr(this,f,i,o,e,n);break}default:if(Gr(this,f,v,o,e,n),h&&1<r&&m<r-1){for(s=se(),i=this.U,o=v,l=Math.min(h+1,this.rtl?m+1:r-m),s[o]=1,a=1;a<l;a++)if((v=t[this.rtl?r-1-m-a:m+a])&&!s[v]){s[v]=1;const w=this.score?this.score(t,o,m,v,a-1):mo(i+(r/2>i?0:1),r,m,l-1,a-1),d=this.bidirectional&&v>o;Gr(this,u,d?o:v,w,e,n,d?v:o)}}}}}this.fastupdate||this.reg.add(e)}else t=""}return this.db&&(t||this.commit_task.push({del:e}),this.T&&dh(this)),this};function Gr(e,t,n,r,s,o,i){let l=i?e.ctx:e.map,a;if((!t[n]||i&&!(a=t[n])[i])&&(i?(t=a||(t[n]=se()),t[i]=1,(a=l.get(i))?l=a:l.set(i,l=new Map)):t[n]=1,(a=l.get(n))?l=a:l.set(n,l=a=[]),l=l[r]||(l[r]=[]),!o||!l.includes(s))){if(l.length===2**31-1){if(t=new Jt(l),e.fastupdate)for(let u of e.reg.values())u.includes(l)&&(u[u.indexOf(l)]=t);a[r]=l=t}l.push(s),e.fastupdate&&((r=e.reg.get(s))?r.push(l):e.reg.set(s,[l]))}}function mo(e,t,n,r,s){return n&&1<e?t+(r||0)<=e?n+(s||0):(e-1)/(t+(r||0))*(n+(s||0))+1|0:0}tt.prototype.search=function(e,t,n){n||(t||typeof e!="object"?typeof t=="object"&&(n=t,t=0):(n=e,e=""));let r=[],s,o,i,l=0,a,u,f,h,c;n?(e=n.query||e,t=n.limit||t,l=n.offset||0,o=n.context,i=n.suggest,c=(a=n.resolve!==!1)&&n.enrich,f=n.boost,h=n.resolution,u=this.db&&n.tag):a=this.resolve;let m=this.encoder.encode(e);if(s=m.length,t=t||(a?100:0),s===1)return fh.call(this,m[0],"",t,l,a,c,u);if(o=this.depth&&o!==!1,s===2&&o&&!i)return fh.call(this,m[1],m[0],t,l,a,c,u);let v=se(),w=0,d;if(o&&(d=m[0],w=1),h||h===0||(h=d?this.U:this.resolution),this.db){if(this.db.search&&(e=this.db.search(this,m,t,l,i,a,c,u),e!==!1))return e;const p=this;return async function(){for(let g,S;w<s;w++){if((S=m[w])&&!v[S]){if(v[S]=1,g=await Yl(p,S,d,0,0,!1,!1),g=hh(g,r,i,h)){r=g;break}d&&(i&&g&&r.length||(d=S))}i&&d&&w===s-1&&!r.length&&(h=p.resolution,d="",w=-1,v=se())}return ch(r,h,t,l,i,f,a)}()}for(let p,g;w<s;w++){if((g=m[w])&&!v[g]){if(v[g]=1,p=Yl(this,g,d,0,0,!1,!1),p=hh(p,r,i,h)){r=p;break}d&&(i&&p&&r.length||(d=g))}i&&d&&w===s-1&&!r.length&&(h=this.resolution,d="",w=-1,v=se())}return ch(r,h,t,l,i,f,a)};function ch(e,t,n,r,s,o,i){let l=e.length,a=e;if(1<l)a=Jf(e,t,n,r,s,o,i);else if(l===1)return i?Ql.call(null,e[0],n,r):new J(e[0]);return i?a:new J(a)}function fh(e,t,n,r,s,o,i){return e=Yl(this,e,t,n,r,s,o,i),this.db?e.then(function(l){return s?l||[]:new J(l)}):e&&e.length?s?Ql.call(this,e,n,r):new J(e):s?[]:new J}function hh(e,t,n,r){let s=[];if(e&&e.length){if(e.length<=r){t.push(e);return}for(let o=0,i;o<r;o++)(i=e[o])&&(s[o]=i);if(s.length){t.push(s);return}}if(!n)return s}function Yl(e,t,n,r,s,o,i,l){let a;return n&&(a=e.bidirectional&&t>n)&&(a=n,n=t,t=a),e.db?e.db.get(t,n,r,s,o,i,l):(e=n?(e=e.ctx.get(n))&&e.get(t):e.map.get(t),e)}function tt(e,t){if(!this||this.constructor!==tt)return new tt(e);if(e){var n=We(e)?e:e.preset;n&&(e=Object.assign({},bm[n],e))}else e={};n=e.context;const r=n===!0?{depth:1}:n||{},s=We(e.encoder)?uh[e.encoder]:e.encode||e.encoder||{};this.encoder=s.encode?s:typeof s=="object"?new Vr(s):{encode:s},this.resolution=e.resolution||9,this.tokenize=n=(n=e.tokenize)&&n!=="default"&&n!=="exact"&&n||"strict",this.depth=n==="strict"&&r.depth||0,this.bidirectional=r.bidirectional!==!1,this.fastupdate=!!e.fastupdate,this.score=e.score||null,(n=e.keystore||0)&&(this.keystore=n),this.map=n?new et(n):new Map,this.ctx=n?new et(n):new Map,this.reg=t||(this.fastupdate?n?new et(n):new Map:n?new Ke(n):new Set),this.U=r.resolution||3,this.rtl=s.rtl||e.rtl||!1,this.cache=(n=e.cache||null)&&new Xt(n),this.resolve=e.resolve!==!1,(n=e.db)&&(this.db=this.mount(n)),this.T=e.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=e.priority||4}F=tt.prototype,F.mount=function(e){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),e.mount(this)},F.commit=function(e,t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this,e,t)},F.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function dh(e){e.commit_timer||(e.commit_timer=setTimeout(function(){e.commit_timer=null,e.db.commit(e,void 0,void 0)},1))}F.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db&&(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[{clear:!0}]),this},F.append=function(e,t){return this.add(e,t,!0)},F.contain=function(e){return this.db?this.db.has(e):this.reg.has(e)},F.update=function(e,t){const n=this,r=this.remove(e);return r&&r.then?r.then(()=>n.add(e,t)):this.add(e,t)},F.cleanup=function(){return this.fastupdate?(qr(this.map),this.depth&&qr(this.ctx),this):this},F.searchCache=sh,F.export=function(e,t,n=0,r=0){let s,o;switch(r){case 0:s="reg",o=Hf(this.reg);break;case 1:s="cfg",o=null;break;case 2:s="map",o=Wl(this.map,this.reg.size);break;case 3:s="ctx",o=Bf(this.ctx,this.reg.size);break;default:return}return fo.call(this,e,t,s,o,n,r)},F.import=function(e,t){if(t)switch(typeof t=="string"&&(t=JSON.parse(t)),e=e.split("."),e[e.length-1]==="json"&&e.pop(),e.length===3&&e.shift(),e=1<e.length?e[1]:e[0],e){case"reg":this.fastupdate=!1,this.reg=Wf(t,this.reg);break;case"map":this.map=Kl(t,this.map);break;case"ctx":this.ctx=Vf(t,this.ctx)}},F.serialize=function(e=!0){let t="",n="",r="";if(this.reg.size){let o;for(var s of this.reg.keys())o||(o=typeof s),t+=(t?",":"")+(o==="string"?'"'+s+'"':s);t="index.reg=new Set(["+t+"]);",n=Kf(this.map,o),n="index.map=new Map(["+n+"]);";for(const i of this.ctx.entries()){s=i[0];let l=Kf(i[1],o);l="new Map(["+l+"])",l='["'+s+'",'+l+"]",r+=(r?",":"")+l}r="index.ctx=new Map(["+r+"]);"}return e?"function inject(index){"+t+n+r+"}":t+n+r},Vl(tt.prototype);const ph=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),yo=["map","ctx","tag","reg","cfg"],Zt=se();function gh(e,t={}){if(!this)return new gh(e,t);typeof e=="object"&&(t=e,e=e.name),e||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(e?":"+e.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=t.field?t.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=t.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}F=gh.prototype,F.mount=function(e){return e.encoder?(e.db=this,this.open()):e.mount(this)},F.open=function(){if(this.db)return this.db;let e=this;navigator.storage&&navigator.storage.persist(),Zt[e.id]||(Zt[e.id]=[]),Zt[e.id].push(e.field);const t=ph.open(e.id,1);return t.onupgradeneeded=function(){const n=e.db=this.result;for(let r=0,s;r<yo.length;r++){s=yo[r];for(let o=0,i;o<Zt[e.id].length;o++)i=Zt[e.id][o],n.objectStoreNames.contains(s+(s!=="reg"&&i?":"+i:""))||n.createObjectStore(s+(s!=="reg"&&i?":"+i:""))}},e.db=Rt(t,function(n){e.db=n,e.db.onversionchange=function(){e.close()}})},F.close=function(){this.db&&this.db.close(),this.db=null},F.destroy=function(){const e=ph.deleteDatabase(this.id);return Rt(e)},F.clear=function(){const e=[];for(let n=0,r;n<yo.length;n++){r=yo[n];for(let s=0,o;s<Zt[this.id].length;s++)o=Zt[this.id][s],e.push(r+(r!=="reg"&&o?":"+o:""))}const t=this.db.transaction(e,"readwrite");for(let n=0;n<e.length;n++)t.objectStore(e[n]).clear();return Rt(t)},F.get=function(e,t,n=0,r=0,s=!0,o=!1){e=this.db.transaction((t?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((t?"ctx":"map")+(this.field?":"+this.field:"")).get(t?t+":"+e:e);const i=this;return Rt(e).then(function(l){let a=[];if(!l||!l.length)return a;if(s){if(!n&&!r&&l.length===1)return l[0];for(let u=0,f;u<l.length;u++)if((f=l[u])&&f.length){if(r>=f.length){r-=f.length;continue}const h=n?r+Math.min(f.length-r,n):f.length;for(let c=r;c<h;c++)a.push(f[c]);if(r=0,a.length===n)break}return o?i.enrich(a):a}return l})},F.tag=function(e,t=0,n=0,r=!1){e=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(e);const s=this;return Rt(e).then(function(o){return!o||!o.length||n>=o.length?[]:!t&&!n?o:(o=o.slice(n,n+t),r?s.enrich(o):o)})},F.enrich=function(e){typeof e!="object"&&(e=[e]);const t=this.db.transaction("reg","readonly").objectStore("reg"),n=[];for(let r=0;r<e.length;r++)n[r]=Rt(t.get(e[r]));return Promise.all(n).then(function(r){for(let s=0;s<r.length;s++)r[s]={id:e[s],doc:r[s]?JSON.parse(r[s]):null};return r})},F.has=function(e){return e=this.db.transaction("reg","readonly").objectStore("reg").getKey(e),Rt(e).then(function(t){return!!t})},F.search=null,F.info=function(){},F.transaction=function(e,t,n){e+=e!=="reg"&&this.field?":"+this.field:"";let r=this.h[e+":"+t];if(r)return n.call(this,r);let s=this.db.transaction(e,t);this.h[e+":"+t]=r=s.objectStore(e);const o=n.call(this,r);return this.h[e+":"+t]=null,Rt(s).finally(function(){return s=r=null,o})},F.commit=async function(e,t,n){if(t)await this.clear(),e.commit_task=[];else{let r=e.commit_task;e.commit_task=[];for(let s=0,o;s<r.length;s++)if(o=r[s],o.clear){await this.clear(),t=!0;break}else r[s]=o.del;t||(n||(r=r.concat(Em(e.reg))),r.length&&await this.remove(r))}e.reg.size&&(await this.transaction("map","readwrite",function(r){for(const s of e.map){const o=s[0],i=s[1];i.length&&(t?r.put(i,o):r.get(o).onsuccess=function(){let l=this.result;var a;if(l&&l.length){const u=Math.max(l.length,i.length);for(let f=0,h,c;f<u;f++)if((c=i[f])&&c.length){if((h=l[f])&&h.length)for(a=0;a<c.length;a++)h.push(c[a]);else l[f]=c;a=1}}else l=i,a=1;a&&r.put(l,o)})}}),await this.transaction("ctx","readwrite",function(r){for(const s of e.ctx){const o=s[0],i=s[1];for(const l of i){const a=l[0],u=l[1];u.length&&(t?r.put(u,o+":"+a):r.get(o+":"+a).onsuccess=function(){let f=this.result;var h;if(f&&f.length){const c=Math.max(f.length,u.length);for(let m=0,v,w;m<c;m++)if((w=u[m])&&w.length){if((v=f[m])&&v.length)for(h=0;h<w.length;h++)v.push(w[h]);else f[m]=w;h=1}}else f=u,h=1;h&&r.put(f,o+":"+a)})}}}),e.store?await this.transaction("reg","readwrite",function(r){for(const s of e.store){const o=s[0],i=s[1];r.put(typeof i=="object"?JSON.stringify(i):1,o)}}):e.bypass||await this.transaction("reg","readwrite",function(r){for(const s of e.reg.keys())r.put(1,s)}),e.tag&&await this.transaction("tag","readwrite",function(r){for(const s of e.tag){const o=s[0],i=s[1];i.length&&(r.get(o).onsuccess=function(){let l=this.result;l=l&&l.length?l.concat(i):i,r.put(l,o)})}}),e.map.clear(),e.ctx.clear(),e.tag&&e.tag.clear(),e.store&&e.store.clear(),e.document||e.reg.clear())};function Xl(e,t,n){const r=e.value;let s,o=0;for(let i=0,l;i<r.length;i++){if(l=n?r:r[i]){for(let a=0,u,f;a<t.length;a++)if(f=t[a],u=l.indexOf(f),0<=u)if(s=1,1<l.length)l.splice(u,1);else{r[i]=[];break}o+=l.length}if(n)break}o?s&&e.update(r):e.delete(),e.continue()}F.remove=function(e){return typeof e!="object"&&(e=[e]),Promise.all([this.transaction("map","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Xl(n,e)}}),this.transaction("ctx","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Xl(n,e)}}),this.transaction("tag","readwrite",function(t){t.openCursor().onsuccess=function(){const n=this.result;n&&Xl(n,e,!0)}}),this.transaction("reg","readwrite",function(t){for(let n=0;n<e.length;n++)t.delete(e[n])})])};function Rt(e,t){return new Promise((n,r)=>{e.onsuccess=e.oncomplete=function(){t&&t(this.result),t=null,n(this.result)},e.onerror=e.onblocked=r,e=null})}const vo={Encoder:Vr,Document:Yt},Um=uh,Bm={finalize:e=>{let t=[];for(const n of e)t.push(...Hm(n));return t}};function Vm(e){return e>=19968&&e<=40959||e>=12352&&e<=12543||e>=44032&&e<=55203||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=191471||e>=196608&&e<=205743||e>=191472&&e<=192095||e>=63744&&e<=64255||e>=194560&&e<=195103}function Hm(e){const t=[];let n="";for(const r of e){const s=r.codePointAt(0);Vm(s)?(n&&(t.push(n),n=""),t.push(r)):n+=r}return n&&t.push(n),t}const Zl=new vo.Encoder(Um.Default,Bm);class Wm{constructor({adminUrl:t,apiKey:n,dir:r}){Fd(this,Y);const s=r==="rtl",o=r==="rtl"?"reverse":"forward";this.apiUrl=t,this.apiKey=n,this.postsIndex=new vo.Document({tokenize:o,rtl:s,document:{id:"id",index:["title","excerpt"],store:!0},encoder:Zl}),this.authorsIndex=new vo.Document({tokenize:o,rtl:s,document:{id:"id",index:["name"],store:!0},encoder:Zl}),this.tagsIndex=new vo.Document({tokenize:o,rtl:s,document:{id:"id",index:["name"],store:!0},encoder:Zl}),this.init=this.init.bind(this),this.search=this.search.bind(this)}async init(){await _e(this,Y,Id).call(this),await _e(this,Y,Dd).call(this),await _e(this,Y,Bd).call(this)}search(t){const n=this.postsIndex.search(t,{enrich:!0}),r=this.authorsIndex.search(t,{enrich:!0}),s=this.tagsIndex.search(t,{enrich:!0});return{posts:_e(this,Y,Ro).call(this,n),authors:_e(this,Y,Ro).call(this,r),tags:_e(this,Y,Ro).call(this,s)}}}Y=new WeakSet,Id=async function(){const t=await _e(this,Y,zd).call(this);t.length>0&&_e(this,Y,Md).call(this,t)},zd=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/posts/?key=${this.apiKey}`;return(await(await fetch(t)).json()).posts}catch(t){return console.error("Error fetching posts:",t),[]}},Md=function(t){t.forEach(n=>{this.postsIndex.add(n)})},Dd=async function(){const t=await _e(this,Y,bd).call(this);t.length>0&&_e(this,Y,Ud).call(this,t)},bd=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/authors/?key=${this.apiKey}`;return(await(await fetch(t)).json()).authors}catch(t){return console.error("Error fetching authors:",t),[]}},Ud=function(t){t.forEach(n=>{this.authorsIndex.add(n)})},Bd=async function(){const t=await _e(this,Y,Vd).call(this);t.length>0&&_e(this,Y,Hd).call(this,t)},Vd=async function(){try{const t=`${this.apiUrl}/ghost/api/content/search-index/tags/?key=${this.apiKey}`;return(await(await fetch(t)).json()).tags}catch(t){return console.error("Error fetching tags:",t),[]}},Hd=function(t){t.forEach(n=>{this.tagsIndex.add(n)})},Ro=function(t){const n=[],r={};return t.forEach(s=>{s.result.forEach(o=>{r[o.id]||(n.push(o.doc),r[o.id]=!0)})}),n};var In={exports:{}};const Km={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},qm={Authors:"الكتّاب",Cancel:"إلغاء","No matches found":"لا يوجد نتائج مطابقة",Posts:"منشورات","Search posts, tags and authors":"قم بالبحث عن المنشورات، الوسوم و الكتّاب","Show more results":"اظهر المزيد من النتائج",Tags:"الوسوم"},Gm={Authors:"Автори",Cancel:"Отказ","No matches found":"Няма съвпадения",Posts:"Публикации","Search posts, tags and authors":"Търсене в публикации, етикети и автори","Show more results":"Покажи още резултати",Tags:"Етикети"},Qm={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Jm={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Ym={Authors:"Autors",Cancel:"Cancel·la","No matches found":"No s'ha trobat cap resultat",Posts:"Articles","Search posts, tags and authors":"Cerca articles, etiquetes i autors","Show more results":"Mostra més resultats",Tags:"Etiquetes"},Xm={Authors:"Autoři",Cancel:"Zrušit","No matches found":"Nenalezeno",Posts:"Články","Search posts, tags and authors":"Prohledat články, štítky a autory","Show more results":"Zobrazit více výsledků",Tags:"Štítky"},Zm={Authors:"Forfattere",Cancel:"Annuller","No matches found":"Ingen resultater fundet",Posts:"Indlæg","Search posts, tags and authors":"Søg i indlæg, tags og forfattere","Show more results":"Vis flere resultater",Tags:"Tags"},ey={Authors:"Autor*innen",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Posts","Search posts, tags and authors":"Posts, Tags und Autor*innen durchsuchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},ty={Authors:"Autoren",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Beiträge","Search posts, tags and authors":"Nach Posts, Tags und Autoren suchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},ny={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},ry={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},sy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},oy={Authors:"Autores",Cancel:"Cancelar","No matches found":"No se encontraron resultados",Posts:"Publicaciones","Search posts, tags and authors":"Buscar publicaciones, etiquetas y autores","Show more results":"Mostrar más resultados",Tags:"Etiquetas"},iy={Authors:"Autorid",Cancel:"Tühista","No matches found":"Vasteid ei leitud",Posts:"Postitused","Search posts, tags and authors":"Otsi postitusi, silte ja autoreid","Show more results":"Näita rohkem tulemusi",Tags:"Sildid"},ly={Authors:"Autoreak",Cancel:"Utzi","No matches found":"Ez da bat datorren ezer topatu",Posts:"Artikuluak","Search posts, tags and authors":"Bilatu artikuluak, etiketak eta autoreak","Show more results":"Erakutsi emaitza gehiago",Tags:"Etiketak"},ay={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},uy={Authors:"Kirjoittajat",Cancel:"Peruuta","No matches found":"Ei hakutuloksia",Posts:"Kirjoitukset","Search posts, tags and authors":"Etsi kirjoituksia, tunnisteita ja kirjoittajia","Show more results":"Näytä enemmän tuloksia",Tags:"Tunnisteet"},cy={Authors:"Auteurs",Cancel:"Annuler","No matches found":"Aucun résultat trouvé",Posts:"Articles","Search posts, tags and authors":"Rechercher des articles, des catégories et des auteurs","Show more results":"Plus de résultats",Tags:"Catégories"},fy={Authors:"Ùghdaran",Cancel:"Sguir dheth","No matches found":"Cha deach dad a lorg a fhreagras ris na lorg thu",Posts:"Postaichean","Search posts, tags and authors":"Lorg sna postaichean, tagaichean agus ùghdaran","Show more results":"Seall barrachd thoraidhean",Tags:"Tagaichean"},hy={Authors:"מחברים",Cancel:"ביטול","No matches found":"לא נמצאו התאמות",Posts:"פוסטים","Search posts, tags and authors":"חיפוש פוסטים, תגיות ומחברים","Show more results":"הצגת תוצאות נוספות",Tags:"תגיות"},dy={Authors:"लेखक",Cancel:"रद्द करें","No matches found":"कोई मैच नहीं मिला",Posts:"पोस्ट","Search posts, tags and authors":"पोस्ट, टैग और लेखक की तलाश करें","Show more results":"और परिणाम दिखाएं",Tags:"टैग"},py={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},gy={Authors:"Szerzők",Cancel:"Mégse","No matches found":"Nincs találat",Posts:"Bejegyzések","Search posts, tags and authors":"Keresés a bejegyzések, a címkék és a szerzők között","Show more results":"További találatok megjelenítése",Tags:"Címkék"},my={Authors:"Penulis",Cancel:"Batalkan","No matches found":"Tidak ada hasil yang ditemukan",Posts:"Postingan","Search posts, tags and authors":"Cari postingan, tag, dan penulis","Show more results":"Tampilkan lebih banyak hasil",Tags:"Tag"},yy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},vy={Authors:"Autori",Cancel:"Annulla","No matches found":"Nessun risultato trovato",Posts:"Articoli","Search posts, tags and authors":"Cerca articoli, tag e autori","Show more results":"Mostra più risultati",Tags:"Tag"},wy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Sy={Authors:"작성자",Cancel:"취소","No matches found":"일치하는 결과가 없어요",Posts:"게시물","Search posts, tags and authors":"게시물, 태그, 작성자 검색","Show more results":"더 많은 결과 보기",Tags:"태그"},xy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Cy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},$y={Authors:"Autori",Cancel:"Atcelt","No matches found":"Nav atrasta neviena atbilstība",Posts:"Ziņas","Search posts, tags and authors":"Meklēt ziņas, atzīmes un autorus","Show more results":"Rādīt vairāk rezultātu",Tags:"Tagi"},ky={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Py={Authors:"Нийтлэгчид",Cancel:"Цуцлах","No matches found":"Тохирох хайлтын үр дүн олдсонгүй",Posts:"Нийтлэлүүд","Search posts, tags and authors":"Нийтлэл, ангилал, нийтлэгчдээр хайх","Show more results":"Илүү олон үр дүн харуулах",Tags:"Ангилалууд"},Ey={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},jy={Authors:"Forfattere",Cancel:"Avbryt","No matches found":"Ingen treff funnet",Posts:"Innlegg","Search posts, tags and authors":"Søk i innlegg, etiketter og forfattere","Show more results":"Vis flere resultater",Tags:"Etiketter"},Ay={Authors:"लेखकहरू",Cancel:"रद्द गर्नुहोस्","No matches found":"कुनै परिणाम भेटिएन",Posts:"पोस्टहरू","Search posts, tags and authors":"पोस्टहरू, ट्यागहरू र लेखकहरू खोज्नुहोस्","Show more results":"थप परिणामहरू देखाउनुहोस्",Tags:"ट्यागहरू"},Ty={Authors:"Auteurs",Cancel:"Annuleren","No matches found":"Geen resultaten gevonden",Posts:"Berichten","Search posts, tags and authors":"Zoek berichten, tags en auteurs","Show more results":"Meer resultaten weergeven",Tags:"Tags"},Oy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Ny={Authors:"ਲੇਖਕ",Cancel:"ਰੱਦ ਕਰੋ","No matches found":"ਕੋਈ ਮੇਲ ਨਹੀਂ ਮਿਲਿਆ",Posts:"ਪੋਸਟਾਂ","Search posts, tags and authors":"ਪੋਸਟਾਂ, ਟੈਗ ਅਤੇ ਲੇਖਕ ਖੋਜੋ","Show more results":"ਹੋਰ ਨਤੀਜੇ ਦਿਖਾਓ",Tags:"ਟੈਗ"},Ly={Authors:"Autorzy",Cancel:"Anuluj","No matches found":"Nie znaleziono dopasowań",Posts:"Posty","Search posts, tags and authors":"Szukaj postów, tagów lub autorów","Show more results":"Pokaż więcej wyników",Tags:"Tagi"},_y={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Procurar publicações, marcadores e autores","Show more results":"Mostrar mais resultados",Tags:"Marcadores"},Ry={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Buscar posts, tags e autores","Show more results":"Mostrar mais resultados",Tags:"Tags"},Fy={Authors:"Autori",Cancel:"Anulează","No matches found":"Nu s-au găsit rezultate",Posts:"Postări","Search posts, tags and authors":"Caută postări, etichete și autori","Show more results":"Afișează mai multe rezultate",Tags:"Etichete"},Iy={Authors:"Авторы",Cancel:"Отмена","No matches found":"Совпадений не найдено",Posts:"Записи","Search posts, tags and authors":"Поиск по записям, тегам и авторам","Show more results":"Показать больше результатов",Tags:"Теги"},zy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},My={Authors:"Autori",Cancel:"Zrušiť","No matches found":"Nenašli sa žiadne výsledky",Posts:"Príspevky","Search posts, tags and authors":"Vyhľadajte príspevky, tagy a autorov","Show more results":"Zobraziť viac výsledkov",Tags:"Tagy"},Dy={Authors:"Avtorji",Cancel:"Prekliči","No matches found":"Ni najdenih zadetkov",Posts:"Članki","Search posts, tags and authors":"Iščite članke, oznake in avtorje","Show more results":"Prikaži več rezultatov",Tags:"Oznake"},by={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Uy={Authors:"Autori",Cancel:"Otkažite","No matches found":"Nema rezultata",Posts:"Objave","Search posts, tags and authors":"Pretražite objave, tag-ove i autore","Show more results":"Prikažite više rezultata",Tags:"Tag-ovi"},By={Authors:"Аутори",Cancel:"Откажите","No matches found":"Нема резултата",Posts:"Објаве","Search posts, tags and authors":"Претражите објаве, tag-ове и ауторе","Show more results":"Прикажите више резултата",Tags:"Tag-ови"},Vy={Authors:"Författare",Cancel:"Avbryt","No matches found":"Inga träffar hittade",Posts:"Inlägg","Search posts, tags and authors":"Sök inlägg, taggar och författare","Show more results":"Visa fler resultat",Tags:"Taggar"},Hy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Wy={Authors:"ஆசிரியர்கள்",Cancel:"ரத்து செய்","No matches found":"பொருத்தங்கள் எதுவும் இல்லை",Posts:"பதிவுகள்","Search posts, tags and authors":"பதிவுகள், குறிச்சொற்கள் மற்றும் ஆசிரியர்களைத் தேடுங்கள்","Show more results":"மேலும் முடிவுகளைக் காட்டு",Tags:"குறிச்சொற்கள்"},Ky={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},qy={Authors:"Yazarlar",Cancel:"İptal","No matches found":"Eşleşme bulunamadı",Posts:"Yazılar","Search posts, tags and authors":"Yazıları, etiketleri ve yazarları ara","Show more results":"Daha fazla sonuç göster",Tags:"Etiketler"},Gy={Authors:"Автори",Cancel:"Скасувати","No matches found":"Збігів не знайдено",Posts:"Публікації","Search posts, tags and authors":"Шукайте публікацій, теги та авторів","Show more results":"Показати більше результатів",Tags:"Теги"},Qy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Jy={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Yy={Authors:"Tác giả",Cancel:"Hủy","No matches found":"Không tìm thấy",Posts:"Bài viết","Search posts, tags and authors":"Tìm bài viết, thẻ & tác giả","Show more results":"Xem thêm kết quả",Tags:"Thẻ"},Xy={Authors:"作者",Cancel:"取消","No matches found":"未找到匹配项",Posts:"文章","Search posts, tags and authors":"搜索文章、标签和作者","Show more results":"显示更多结果",Tags:"标签"},Zy={Authors:"作者",Cancel:"取消","No matches found":"無相符結果",Posts:"文章","Search posts, tags and authors":"搜尋文章、標籤與作者","Show more results":"更多結果",Tags:"標籤"};var mh;function yh(){return mh||(mh={"/ghost/i18n/locales/af/search.json":function(){return Km},"/ghost/i18n/locales/ar/search.json":function(){return qm},"/ghost/i18n/locales/bg/search.json":function(){return Gm},"/ghost/i18n/locales/bn/search.json":function(){return Qm},"/ghost/i18n/locales/bs/search.json":function(){return Jm},"/ghost/i18n/locales/ca/search.json":function(){return Ym},"/ghost/i18n/locales/cs/search.json":function(){return Xm},"/ghost/i18n/locales/da/search.json":function(){return Zm},"/ghost/i18n/locales/de/search.json":function(){return ey},"/ghost/i18n/locales/de-CH/search.json":function(){return ty},"/ghost/i18n/locales/el/search.json":function(){return ny},"/ghost/i18n/locales/en/search.json":function(){return ry},"/ghost/i18n/locales/eo/search.json":function(){return sy},"/ghost/i18n/locales/es/search.json":function(){return oy},"/ghost/i18n/locales/et/search.json":function(){return iy},"/ghost/i18n/locales/eu/search.json":function(){return ly},"/ghost/i18n/locales/fa/search.json":function(){return ay},"/ghost/i18n/locales/fi/search.json":function(){return uy},"/ghost/i18n/locales/fr/search.json":function(){return cy},"/ghost/i18n/locales/gd/search.json":function(){return fy},"/ghost/i18n/locales/he/search.json":function(){return hy},"/ghost/i18n/locales/hi/search.json":function(){return dy},"/ghost/i18n/locales/hr/search.json":function(){return py},"/ghost/i18n/locales/hu/search.json":function(){return gy},"/ghost/i18n/locales/id/search.json":function(){return my},"/ghost/i18n/locales/is/search.json":function(){return yy},"/ghost/i18n/locales/it/search.json":function(){return vy},"/ghost/i18n/locales/ja/search.json":function(){return wy},"/ghost/i18n/locales/ko/search.json":function(){return Sy},"/ghost/i18n/locales/kz/search.json":function(){return xy},"/ghost/i18n/locales/lt/search.json":function(){return Cy},"/ghost/i18n/locales/lv/search.json":function(){return $y},"/ghost/i18n/locales/mk/search.json":function(){return ky},"/ghost/i18n/locales/mn/search.json":function(){return Py},"/ghost/i18n/locales/ms/search.json":function(){return Ey},"/ghost/i18n/locales/nb/search.json":function(){return jy},"/ghost/i18n/locales/ne/search.json":function(){return Ay},"/ghost/i18n/locales/nl/search.json":function(){return Ty},"/ghost/i18n/locales/nn/search.json":function(){return Oy},"/ghost/i18n/locales/pa/search.json":function(){return Ny},"/ghost/i18n/locales/pl/search.json":function(){return Ly},"/ghost/i18n/locales/pt/search.json":function(){return _y},"/ghost/i18n/locales/pt-BR/search.json":function(){return Ry},"/ghost/i18n/locales/ro/search.json":function(){return Fy},"/ghost/i18n/locales/ru/search.json":function(){return Iy},"/ghost/i18n/locales/si/search.json":function(){return zy},"/ghost/i18n/locales/sk/search.json":function(){return My},"/ghost/i18n/locales/sl/search.json":function(){return Dy},"/ghost/i18n/locales/sq/search.json":function(){return by},"/ghost/i18n/locales/sr/search.json":function(){return Uy},"/ghost/i18n/locales/sr-Cyrl/search.json":function(){return By},"/ghost/i18n/locales/sv/search.json":function(){return Vy},"/ghost/i18n/locales/sw/search.json":function(){return Hy},"/ghost/i18n/locales/ta/search.json":function(){return Wy},"/ghost/i18n/locales/th/search.json":function(){return Ky},"/ghost/i18n/locales/tr/search.json":function(){return qy},"/ghost/i18n/locales/uk/search.json":function(){return Gy},"/ghost/i18n/locales/ur/search.json":function(){return Qy},"/ghost/i18n/locales/uz/search.json":function(){return Jy},"/ghost/i18n/locales/vi/search.json":function(){return Yy},"/ghost/i18n/locales/zh/search.json":function(){return Xy},"/ghost/i18n/locales/zh-Hant/search.json":function(){return Zy}})}function en(e){function t(n){var r=vh(n,e);if(r!==null)return yh()[r]();throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return t.resolve=function(n){var r=vh(n,e);return r!==null?r:require.resolve(n)},t}function vh(e,t){var n=e0(e);e=wo(e);var r;e[0]==="/"&&(t="");for(var s=yh(),o=["",".js",".json"];n?r=wo(t+"/node_modules/"+e):r=wo(t+"/"+e),!r.endsWith("/..");){for(var i=0;i<o.length;i++){var l=r+o[i];if(s[l])return l}if(!n)break;var a=wo(t+"/..");if(a===t)break;t=a}return null}function e0(e){var t=e[0];if(t==="/"||t==="\\")return!1;var n=e[1],r=e[2];return!(t==="."&&(!n||n==="/"||n==="\\")||t==="."&&n==="."&&(!r||r==="/"||r==="\\")||n===":"&&(r==="/"||r==="\\"))}function wo(e){e=e.replace(/\\/g,"/");for(var t=e.split("/"),n=t[0]==="",r=1;r<t.length;r++)(t[r]==="."||t[r]==="")&&t.splice(r--,1);for(var r=1;r<t.length;r++)t[r]===".."&&r>0&&t[r-1]!==".."&&t[r-1]!=="."&&(t.splice(--r,2),r--);return e=t.join("/"),n&&e[0]!=="/"?e="/"+e:e.length===0&&(e="."),e}var Qr={exports:{}};const z=e=>typeof e=="string",Jr=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},wh=e=>e==null?"":""+e,t0=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},n0=/###/g,Sh=e=>e&&e.indexOf("###")>-1?e.replace(n0,"."):e,xh=e=>!e||z(e),Yr=(e,t,n)=>{const r=z(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(xh(e))return{};const o=Sh(r[s]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return xh(e)?{}:{obj:e,k:Sh(r[s])}},Ch=(e,t,n)=>{const{obj:r,k:s}=Yr(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),l=Yr(e,i,Object);for(;l.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),l=Yr(e,i,Object),l&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},r0=(e,t,n,r)=>{const{obj:s,k:o}=Yr(e,t,Object);s[o]=s[o]||[],s[o].push(n)},So=(e,t)=>{const{obj:n,k:r}=Yr(e,t);if(n)return n[r]},s0=(e,t,n)=>{const r=So(e,n);return r!==void 0?r:So(t,n)},$h=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?z(e[r])||e[r]instanceof String||z(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):$h(e[r],t[r],n):e[r]=t[r]);return e},zn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var o0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const i0=e=>z(e)?e.replace(/[&<>"'\/]/g,t=>o0[t]):e;class l0{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const a0=[" ",",","?","!",";"],u0=new l0(20),c0=(e,t,n)=>{t=t||"",n=n||"";const r=a0.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=u0.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},ea=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let i,l="";for(let a=o;a<r.length;++a)if(a!==o&&(l+=n),l+=r[a],i=s[l],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&a<r.length-1)continue;o+=a-o+1;break}s=i}return s},xo=e=>e&&e.replace("_","-"),f0={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Co{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||f0,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(z(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Co(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Co(this.logger,t)}}var nt=new Co;class $o{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[l,a]=i;for(let u=0;u<a;u++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[l,a]=i;for(let u=0;u<a;u++)l.apply(l,[t,...r])})}}class kh extends $o{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):z(r)&&o?l.push(...r.split(o)):l.push(r)));const a=So(this.data,l);return!a&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),a||!i||!z(r)?a:ea(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."),s=n,n=l[1]),this.addNamespaces(n),Ch(this.data,l,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(z(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),s=r,r=n,n=l[1]),this.addNamespaces(n);let a=So(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?$h(a,r,o):a={...a,...r},Ch(this.data,l,a),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var Ph={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const Eh={};class ko extends $o{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),t0(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=nt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!c0(t,r,s);if(i&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:z(o)?[o]:o};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(s)}return{key:t,namespaces:z(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(t[t.length-1],n),a=l[l.length-1],u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const y=n.nsSeparator||this.options.nsSeparator;return s?{res:`${a}${y}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(n)}:`${a}${y}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(n)}:i}const h=this.resolve(t,n);let c=h&&h.res;const m=h&&h.usedKey||i,v=h&&h.exactUsedKey||i,w=Object.prototype.toString.apply(c),d=["[object Number]","[object Function]","[object RegExp]"],p=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!z(c)&&typeof c!="boolean"&&typeof c!="number";if(g&&c&&S&&d.indexOf(w)<0&&!(z(p)&&Array.isArray(c))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,c,{...n,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(h.res=y,h.usedParams=this.getUsedParamsDetails(n),h):y}if(o){const y=Array.isArray(c),$=y?[]:{},C=y?v:m;for(const P in c)if(Object.prototype.hasOwnProperty.call(c,P)){const T=`${C}${o}${P}`;$[P]=this.translate(T,{...n,joinArrays:!1,ns:l}),$[P]===T&&($[P]=c[P])}c=$}}else if(g&&z(p)&&Array.isArray(c))c=c.join(p),c&&(c=this.extendTranslation(c,t,n,r));else{let y=!1,$=!1;const C=n.count!==void 0&&!z(n.count),P=ko.hasDefaultValue(n),T=C?this.pluralResolver.getSuffix(u,n.count,n):"",N=n.ordinal&&C?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",U=C&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),Ne=U&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${T}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(c)&&P&&(y=!0,c=Ne),this.isValidLookup(c)||($=!0,c=i);const ee=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&$?void 0:c,be=P&&Ne!==c&&this.options.updateMissing;if($||y||be){if(this.logger.log(be?"updateKey":"missingKey",u,a,i,be?Ne:c),o){const k=this.resolve(i,{...n,keySeparator:!1});k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $e=[];const Le=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Le&&Le[0])for(let k=0;k<Le.length;k++)$e.push(Le[k]);else this.options.saveMissingTo==="all"?$e=this.languageUtils.toResolveHierarchy(n.lng||this.language):$e.push(n.lng||this.language);const x=(k,O,H)=>{const E=P&&H!==c?H:ee;this.options.missingKeyHandler?this.options.missingKeyHandler(k,a,O,E,be,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(k,a,O,E,be,n),this.emit("missingKey",k,a,O,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?$e.forEach(k=>{const O=this.pluralResolver.getSuffixes(k,n);U&&n[`defaultValue${this.options.pluralSeparator}zero`]&&O.indexOf(`${this.options.pluralSeparator}zero`)<0&&O.push(`${this.options.pluralSeparator}zero`),O.forEach(H=>{x([k],i+H,n[`defaultValue${H}`]||Ne)})}):x($e,i,Ne))}c=this.extendTranslation(c,t,n,h,r),$&&c===i&&this.options.appendNamespaceToMissingKey&&(c=`${a}:${i}`),($||y)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${i}`:i,y?c:void 0):c=this.options.parseMissingKeyHandler(c))}return s?(h.res=c,h.usedParams=this.getUsedParamsDetails(n),h):c}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=z(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const c=t.match(this.interpolator.nestingRegexp);f=c&&c.length}let h=r.replace&&!z(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||s.usedLng,r),u){const c=t.match(this.interpolator.nestingRegexp),m=c&&c.length;f<m&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var c=arguments.length,m=new Array(c),v=0;v<c;v++)m[v]=arguments[v];return o&&o[0]===m[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):i.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,a=z(l)?[l]:l;return t!=null&&a&&a.length&&r.applyPostProcessor!==!1&&(t=Ph.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,l;return z(t)&&(t=[t]),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),f=u.key;s=f;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const c=n.count!==void 0&&!z(n.count),m=c&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),v=n.context!==void 0&&(z(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(d=>{this.isValidLookup(r)||(l=d,!Eh[`${w[0]}-${d}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Eh[`${w[0]}-${d}`]=!0,this.logger.warn(`key "${s}" for languages "${w.join(", ")}" won't get resolved as namespace "${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!!!")),w.forEach(p=>{if(this.isValidLookup(r))return;i=p;const g=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(g,f,p,d,n);else{let y;c&&(y=this.pluralResolver.getSuffix(p,n.count,n));const $=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(g.push(f+y),n.ordinal&&y.indexOf(C)===0&&g.push(f+y.replace(C,this.options.pluralSeparator)),m&&g.push(f+$)),v){const P=`${f}${this.options.contextSeparator}${n.context}`;g.push(P),c&&(g.push(P+y),n.ordinal&&y.indexOf(C)===0&&g.push(P+y.replace(C,this.options.pluralSeparator)),m&&g.push(P+$))}}let S;for(;S=g.pop();)this.isValidLookup(r)||(o=S,r=this.getResource(p,d,S,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!z(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const ta=e=>e.charAt(0).toUpperCase()+e.slice(1);class jh{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=nt.create("languageUtils")}getScriptPartFromCode(t){if(t=xo(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=xo(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(z(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(t)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=ta(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=ta(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=ta(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),z(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return z(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):z(t)&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let h0=[{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}],d0={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const p0=["v1","v2","v3"],g0=["v4"],Ah={zero:0,one:1,two:2,few:3,many:4,other:5},m0=()=>{const e={};return h0.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:d0[t.fc]}})}),e};class y0{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=nt.create("pluralResolver"),(!this.options.compatibilityJSON||g0.includes(this.options.compatibilityJSON))&&(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=m0(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=xo(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!t.match(/-|_/))return;const a=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(a,n)}return this.pluralRulesCache[o]=i,i}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>Ah[s]-Ah[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!p0.includes(this.options.compatibilityJSON)}}const Th=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=s0(e,t,n);return!o&&s&&z(n)&&(o=ea(e,n,r),o===void 0&&(o=ea(t,n,r))),o},na=e=>e.replace(/\$/g,"$$$$");class v0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=nt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:l,suffixEscaped:a,formatSeparator:u,unescapeSuffix:f,unescapePrefix:h,nestingPrefix:c,nestingPrefixEscaped:m,nestingSuffix:v,nestingSuffixEscaped:w,nestingOptionsSeparator:d,maxReplaces:p,alwaysFormat:g}=t.interpolation;this.escape=n!==void 0?n:i0,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?zn(o):i||"{{",this.suffix=l?zn(l):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=c?zn(c):m||zn("$t("),this.nestingSuffix=v?zn(v):w||zn(")"),this.nestingOptionsSeparator=d||",",this.maxReplaces=p||1e3,this.alwaysFormat=g!==void 0?g:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const p=Th(n,a,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(p,void 0,r,{...s,...n,interpolationkey:m}):p}const v=m.split(this.formatSeparator),w=v.shift().trim(),d=v.join(this.formatSeparator).trim();return this.format(Th(n,a,w,this.options.keySeparator,this.options.ignoreJSONStructure),d,r,{...s,...n,interpolationkey:w})};this.resetRegExp();const f=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,h=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>na(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?na(this.escape(m)):na(m)}].forEach(m=>{for(l=0;o=m.regex.exec(t);){const v=o[1].trim();if(i=u(v),i===void 0)if(typeof f=="function"){const d=f(t,o,s);i=z(d)?d:""}else if(s&&Object.prototype.hasOwnProperty.call(s,v))i="";else if(h){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),i="";else!z(i)&&!this.useRawValueToEscape&&(i=wh(i));const w=m.safeValue(i);if(t=t.replace(o[0],w),h?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const l=(a,u)=>{const f=this.nestingOptionsSeparator;if(a.indexOf(f)<0)return a;const h=a.split(new RegExp(`${f}[ ]*{`));let c=`{${h[1]}`;a=h[0],c=this.interpolate(c,i);const m=c.match(/'/g),v=c.match(/"/g);(m&&m.length%2===0&&!v||v.length%2!==0)&&(c=c.replace(/'/g,'"'));try{i=JSON.parse(c),u&&(i={...u,...i})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,w),`${a}${f}${c}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,a};for(;s=this.nestingRegexp.exec(t);){let a=[];i={...r},i=i.replace&&!z(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(h=>h.trim());s[1]=f.shift(),a=f,u=!0}if(o=n(l.call(this,s[1].trim(),i),i),o&&s[0]===t&&!z(o))return o;z(o)||(o=wh(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),u&&(o=a.reduce((f,h)=>this.format(f,h,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const w0=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[l,...a]=i.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,""),f=l.trim();n[f]||(n[f]=u),u==="false"&&(n[f]=!1),u==="true"&&(n[f]=!0),isNaN(u)||(n[f]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Mn=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let l=t[i];return l||(l=e(xo(r),s),t[i]=l),l(n)}};class S0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=nt.create("formatter"),this.options=t,this.formats={number:Mn((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Mn((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Mn((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Mn((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Mn((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Mn(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){const l=o.findIndex(a=>a.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,a)=>{const{formatName:u,formatOptions:f}=w0(a);if(this.formats[u]){let h=l;try{const c=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=c.locale||c.lng||s.locale||s.lng||r;h=this.formats[u](l,m,{...f,...s,...c})}catch(c){this.logger.warn(c)}return h}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const x0=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class C0 extends $o{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=nt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},l={},a={};return t.forEach(u=>{let f=!0;n.forEach(h=>{const c=`${u}|${h}`;!r.reload&&this.store.hasResourceBundle(u,h)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?i[c]===void 0&&(i[c]=!0):(this.state[c]=1,f=!1,i[c]===void 0&&(i[c]=!0),o[c]===void 0&&(o[c]=!0),a[h]===void 0&&(a[h]=!0)))}),f||(l[u]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(a=>{r0(a.loaded,[o],i),x0(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const f=a.loaded[u];f.length&&f.forEach(h=>{l[u][h]===void 0&&(l[u][h]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const l=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(u,f)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(f=>l(null,f)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=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."),s&&s();z(t)&&(t=this.languageUtils.toResolveHierarchy(t)),z(n)&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,l),this.loaded(t,i,l)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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(!(r==null||r==="")){if(this.backend&&this.backend.create){const a={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(t,n,r,s,a):f=u(t,n,r,s),f&&typeof f.then=="function"?f.then(h=>l(null,h)).catch(l):l(null,f)}catch(f){l(f)}else u(t,n,r,s,l,a)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const Oh=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),z(e[1])&&(t.defaultValue=e[1]),z(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Nh=e=>(z(e.ns)&&(e.ns=[e.ns]),z(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),z(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Po=()=>{},$0=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Xr extends $o{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Nh(t),this.services={},this.logger=nt,this.modules={external:[]},$0(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(z(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=Oh();this.options={...s,...this.options,...Nh(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?nt.init(o(this.modules.logger),this.options):nt.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=S0);const h=new jh(this.options);this.store=new kh(this.options.resources,this.options);const c=this.services;c.logger=nt,c.resourceStore=this.store,c.languageUtils=h,c.pluralResolver=new y0(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(c.formatter=o(f),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new v0(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new C0(o(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(m){for(var v=arguments.length,w=new Array(v>1?v-1:0),d=1;d<v;d++)w[d-1]=arguments[d];t.emit(m,...w)}),this.modules.languageDetector&&(c.languageDetector=o(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=o(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new ko(this.services,this.options),this.translator.on("*",function(m){for(var v=arguments.length,w=new Array(v>1?v-1:0),d=1;d<v;d++)w[d-1]=arguments[d];t.emit(m,...w)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Po),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const a=Jr(),u=()=>{const f=(h,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(c),r(h,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),a}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Po;const s=z(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>i(a)),this.options.preload&&this.options.preload.forEach(l=>i(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const s=Jr();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Po),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Ph.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=Jr();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(a,function(){return r.t(...arguments)})},l=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=z(a)?a:this.services.languageUtils.getBestMatchFromCodes(a);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{i(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),s}getFixedT(t,n,r){var s=this;const o=function(i,l){let a;if(typeof l!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),h=2;h<u;h++)f[h-2]=arguments[h];a=s.options.overloadTranslationOptionHandler([i,l].concat(f))}else a={...l};a.lng=a.lng||o.lng,a.lngs=a.lngs||o.lngs,a.ns=a.ns||o.ns,a.keyPrefix!==""&&(a.keyPrefix=a.keyPrefix||r||o.keyPrefix);const c=s.options.keySeparator||".";let m;return a.keyPrefix&&Array.isArray(i)?m=i.map(v=>`${a.keyPrefix}${c}${v}`):m=a.keyPrefix?`${a.keyPrefix}${c}${i}`:i,s.t(m,a)};return z(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=Jr();return this.options.ns?(z(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Jr();z(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["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"],r=this.services&&this.services.languageUtils||new jh(Oh());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Xr(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Po;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Xr(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new kh(this.store.data,s),o.services.resourceStore=o.store),o.translator=new ko(o.services,s),o.translator.on("*",function(l){for(var a=arguments.length,u=new Array(a>1?a-1:0),f=1;f<a;f++)u[f-1]=arguments[f];o.emit(l,...u)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Lh=Xr.createInstance();Lh.createInstance=Xr.createInstance;var k0=Lh;const _h=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})),Dn=Wd(_h);var ra={exports:{}},sa={},Rh={exports:{}};(function(e){var t=Dn,n=Dn;function r(o){return n.existsSync(t.join(o,"package.json"))}function s(o,i){if(o=o||e.parent.filename,i=i||r,typeof o=="string"&&(o[o.length-1]!==t.sep&&(o+=t.sep),o=o.split(t.sep)),!o.length)throw new Error("package.json not found in path");o.pop();var l=o.join(t.sep);try{if(i(l))return l}catch{}return s(o,i)}e.exports=s})(Rh);var P0=Rh.exports,Fh={exports:{}},Ih=Object.prototype.toString,zh=function(t){var n=Ih.call(t),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Ih.call(t.callee)==="[object Function]"),r},oa,Mh;function E0(){if(Mh)return oa;Mh=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=zh,s=Object.prototype.propertyIsEnumerable,o=!s.call({toString:null},"toString"),i=s.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(c){var m=c.constructor;return m&&m.prototype===c},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!u["$"+c]&&t.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{a(window[c])}catch{return!0}}catch{return!0}return!1}(),h=function(c){if(typeof window>"u"||!f)return a(c);try{return a(c)}catch{return!1}};e=function(m){var v=m!==null&&typeof m=="object",w=n.call(m)==="[object Function]",d=r(m),p=v&&n.call(m)==="[object String]",g=[];if(!v&&!w&&!d)throw new TypeError("Object.keys called on a non-object");var S=i&&w;if(p&&m.length>0&&!t.call(m,0))for(var y=0;y<m.length;++y)g.push(String(y));if(d&&m.length>0)for(var $=0;$<m.length;++$)g.push(String($));else for(var C in m)!(S&&C==="prototype")&&t.call(m,C)&&g.push(String(C));if(o)for(var P=h(m),T=0;T<l.length;++T)!(P&&l[T]==="constructor")&&t.call(m,l[T])&&g.push(l[T]);return g}}return oa=e,oa}var j0=Array.prototype.slice,A0=zh,Dh=Object.keys,Eo=Dh?function(t){return Dh(t)}:E0(),bh=Object.keys;Eo.shim=function(){if(Object.keys){var t=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);t||(Object.keys=function(r){return A0(r)?bh(j0.call(r)):bh(r)})}else Object.keys=Eo;return Object.keys||Eo};var T0=Eo,Uh=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var s=42;t[n]=s;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,n);if(l.value!==s||l.enumerable!==!0)return!1}return!0},ia=Object,O0=Error,N0=EvalError,L0=RangeError,_0=ReferenceError,R0=SyntaxError,Bh=TypeError,F0=URIError,I0=Math.abs,z0=Math.floor,M0=Math.max,D0=Math.min,b0=Math.pow,U0=Math.round,B0=Number.isNaN||function(t){return t!==t},V0=B0,H0=function(t){return V0(t)||t===0?t:t<0?-1:1},W0=Object.getOwnPropertyDescriptor,jo=W0;if(jo)try{jo([],"length")}catch{jo=null}var Vh=jo,Ao=Object.defineProperty||!1;if(Ao)try{Ao({},"a",{value:1})}catch{Ao=!1}var K0=Ao,la,Hh;function q0(){if(Hh)return la;Hh=1;var e=typeof Symbol<"u"&&Symbol,t=Uh;return la=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},la}var aa,Wh;function Kh(){return Wh||(Wh=1,aa=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),aa}var ua,qh;function Gh(){if(qh)return ua;qh=1;var e=ia;return ua=e.getPrototypeOf||null,ua}var G0="Function.prototype.bind called on incompatible ",Q0=Object.prototype.toString,J0=Math.max,Y0="[object Function]",Qh=function(t,n){for(var r=[],s=0;s<t.length;s+=1)r[s]=t[s];for(var o=0;o<n.length;o+=1)r[o+t.length]=n[o];return r},X0=function(t,n){for(var r=[],s=n,o=0;s<t.length;s+=1,o+=1)r[o]=t[s];return r},Z0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},ev=function(t){var n=this;if(typeof n!="function"||Q0.apply(n)!==Y0)throw new TypeError(G0+n);for(var r=X0(arguments,1),s,o=function(){if(this instanceof s){var f=n.apply(this,Qh(r,arguments));return Object(f)===f?f:this}return n.apply(t,Qh(r,arguments))},i=J0(0,n.length-r.length),l=[],a=0;a<i;a++)l[a]="$"+a;if(s=Function("binder","return function ("+Z0(l,",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var u=function(){};u.prototype=n.prototype,s.prototype=new u,u.prototype=null}return s},tv=ev,To=Function.prototype.bind||tv,ca=Function.prototype.call,Jh=Function.prototype.apply,nv=typeof Reflect<"u"&&Reflect&&Reflect.apply,rv=To,sv=Jh,ov=ca,iv=nv,lv=iv||rv.call(ov,sv),av=To,uv=Bh,cv=ca,fv=lv,Yh=function(t){if(t.length<1||typeof t[0]!="function")throw new uv("a function is required");return fv(av,cv,t)},fa,Xh;function hv(){if(Xh)return fa;Xh=1;var e=Yh,t=Vh,n;try{n=[].__proto__===Array.prototype}catch(i){if(!i||typeof i!="object"||!("code"in i)||i.code!=="ERR_PROTO_ACCESS")throw i}var r=!!n&&t&&t(Object.prototype,"__proto__"),s=Object,o=s.getPrototypeOf;return fa=r&&typeof r.get=="function"?e([r.get]):typeof o=="function"?function(l){return o(l==null?l:s(l))}:!1,fa}var ha,Zh;function dv(){if(Zh)return ha;Zh=1;var e=Kh(),t=Gh(),n=hv();return ha=e?function(s){return e(s)}:t?function(s){if(!s||typeof s!="object"&&typeof s!="function")throw new TypeError("getProto: not an object");return t(s)}:n?function(s){return n(s)}:null,ha}var da,ed;function pv(){if(ed)return da;ed=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=To;return da=n.call(e,t),da}var b,gv=ia,mv=O0,yv=N0,vv=L0,wv=_0,bn=R0,Un=Bh,Sv=F0,xv=I0,Cv=z0,$v=M0,kv=D0,Pv=b0,Ev=U0,jv=H0,td=Function,pa=function(e){try{return td('"use strict"; return ('+e+").constructor;")()}catch{}},Zr=Vh,Av=K0,ga=function(){throw new Un},Tv=Zr?function(){try{return arguments.callee,ga}catch{try{return Zr(arguments,"callee").get}catch{return ga}}}():ga,Bn=q0()(),ae=dv(),Ov=Gh(),Nv=Kh(),nd=Jh,es=ca,Vn={},Lv=typeof Uint8Array>"u"||!ae?b:ae(Uint8Array),tn={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?b:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?b:ArrayBuffer,"%ArrayIteratorPrototype%":Bn&&ae?ae([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":Vn,"%AsyncGenerator%":Vn,"%AsyncGeneratorFunction%":Vn,"%AsyncIteratorPrototype%":Vn,"%Atomics%":typeof Atomics>"u"?b:Atomics,"%BigInt%":typeof BigInt>"u"?b:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?b:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?b:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?b:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":mv,"%eval%":eval,"%EvalError%":yv,"%Float16Array%":typeof Float16Array>"u"?b:Float16Array,"%Float32Array%":typeof Float32Array>"u"?b:Float32Array,"%Float64Array%":typeof Float64Array>"u"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?b:FinalizationRegistry,"%Function%":td,"%GeneratorFunction%":Vn,"%Int8Array%":typeof Int8Array>"u"?b:Int8Array,"%Int16Array%":typeof Int16Array>"u"?b:Int16Array,"%Int32Array%":typeof Int32Array>"u"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bn&&ae?ae(ae([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map>"u"?b:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Bn||!ae?b:ae(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":gv,"%Object.getOwnPropertyDescriptor%":Zr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?b:Promise,"%Proxy%":typeof Proxy>"u"?b:Proxy,"%RangeError%":vv,"%ReferenceError%":wv,"%Reflect%":typeof Reflect>"u"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?b:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Bn||!ae?b:ae(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bn&&ae?ae(""[Symbol.iterator]()):b,"%Symbol%":Bn?Symbol:b,"%SyntaxError%":bn,"%ThrowTypeError%":Tv,"%TypedArray%":Lv,"%TypeError%":Un,"%Uint8Array%":typeof Uint8Array>"u"?b:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?b:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?b:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?b:Uint32Array,"%URIError%":Sv,"%WeakMap%":typeof WeakMap>"u"?b:WeakMap,"%WeakRef%":typeof WeakRef>"u"?b:WeakRef,"%WeakSet%":typeof WeakSet>"u"?b:WeakSet,"%Function.prototype.call%":es,"%Function.prototype.apply%":nd,"%Object.defineProperty%":Av,"%Object.getPrototypeOf%":Ov,"%Math.abs%":xv,"%Math.floor%":Cv,"%Math.max%":$v,"%Math.min%":kv,"%Math.pow%":Pv,"%Math.round%":Ev,"%Math.sign%":jv,"%Reflect.getPrototypeOf%":Nv};if(ae)try{null.error}catch(e){var _v=ae(ae(e));tn["%Error.prototype%"]=_v}var Rv=function e(t){var n;if(t==="%AsyncFunction%")n=pa("async function () {}");else if(t==="%GeneratorFunction%")n=pa("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=pa("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=e("%AsyncGenerator%");s&&ae&&(n=ae(s.prototype))}return tn[t]=n,n},rd={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ts=To,Oo=pv(),Fv=ts.call(es,Array.prototype.concat),Iv=ts.call(nd,Array.prototype.splice),sd=ts.call(es,String.prototype.replace),No=ts.call(es,String.prototype.slice),zv=ts.call(es,RegExp.prototype.exec),Mv=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Dv=/\\(\\)?/g,bv=function(t){var n=No(t,0,1),r=No(t,-1);if(n==="%"&&r!=="%")throw new bn("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new bn("invalid intrinsic syntax, expected opening `%`");var s=[];return sd(t,Mv,function(o,i,l,a){s[s.length]=l?sd(a,Dv,"$1"):i||o}),s},Uv=function(t,n){var r=t,s;if(Oo(rd,r)&&(s=rd[r],r="%"+s[0]+"%"),Oo(tn,r)){var o=tn[r];if(o===Vn&&(o=Rv(r)),typeof o>"u"&&!n)throw new Un("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:r,value:o}}throw new bn("intrinsic "+t+" does not exist!")},Bv=function(t,n){if(typeof t!="string"||t.length===0)throw new Un("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Un('"allowMissing" argument must be a boolean');if(zv(/^%?[^%]*%?$/,t)===null)throw new bn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=bv(t),s=r.length>0?r[0]:"",o=Uv("%"+s+"%",n),i=o.name,l=o.value,a=!1,u=o.alias;u&&(s=u[0],Iv(r,Fv([0,1],u)));for(var f=1,h=!0;f<r.length;f+=1){var c=r[f],m=No(c,0,1),v=No(c,-1);if((m==='"'||m==="'"||m==="`"||v==='"'||v==="'"||v==="`")&&m!==v)throw new bn("property names with quotes must have matching quotes");if((c==="constructor"||!h)&&(a=!0),s+="."+c,i="%"+s+"%",Oo(tn,i))l=tn[i];else if(l!=null){if(!(c in l)){if(!n)throw new Un("base intrinsic for "+t+" exists, but the property is not available.");return}if(Zr&&f+1>=r.length){var w=Zr(l,c);h=!!w,h&&"get"in w&&!("originalValue"in w.get)?l=w.get:l=l[c]}else h=Oo(l,c),l=l[c];h&&!a&&(tn[i]=l)}}return l},od=Bv,id=Yh,Vv=id([od("%String.prototype.indexOf%")]),Hv=function(t,n){var r=od(t,!!n);return typeof r=="function"&&Vv(t,".prototype.")>-1?id([r]):r},Wv=T0,ld=Uh(),ad=Hv,Lo=ia,Kv=ad("Array.prototype.push"),ud=ad("Object.prototype.propertyIsEnumerable"),qv=ld?Lo.getOwnPropertySymbols:null,Gv=function(t,n){if(t==null)throw new TypeError("target must be an object");var r=Lo(t);if(arguments.length===1)return r;for(var s=1;s<arguments.length;++s){var o=Lo(arguments[s]),i=Wv(o),l=ld&&(Lo.getOwnPropertySymbols||qv);if(l)for(var a=l(o),u=0;u<a.length;++u){var f=a[u];ud(o,f)&&Kv(i,f)}for(var h=0;h<i.length;++h){var c=i[h];if(ud(o,c)){var m=o[c];r[c]=m}}}return r},ma=Gv,Qv=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),n={},r=0;r<t.length;++r)n[t[r]]=t[r];var s=Object.assign({},n),o="";for(var i in s)o+=i;return e!==o},Jv=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},Yv=function(){return!Object.assign||Qv()||Jv()?ma:Object.assign},cd={},Xv=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},ya={exports:{}};typeof Object.create=="function"?ya.exports=function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:ya.exports=function(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t};var Zv=ya.exports;(function(e){var t=/%[sdj%]/g;e.format=function(x){if(!S(x)){for(var k=[],O=0;O<arguments.length;O++)k.push(s(arguments[O]));return k.join(" ")}for(var O=1,H=arguments,E=H.length,L=String(x).replace(t,function(M){if(M==="%%")return"%";if(O>=E)return M;switch(M){case"%s":return String(H[O++]);case"%d":return Number(H[O++]);case"%j":try{return JSON.stringify(H[O++])}catch{return"[Circular]"}default:return M}}),_=H[O];O<E;_=H[++O])d(_)||!P(_)?L+=" "+_:L+=" "+s(_);return L},e.deprecate=function(x,k){if($(pe.process))return function(){return e.deprecate(x,k).apply(this,arguments)};if(process.noDeprecation===!0)return x;var O=!1;function H(){if(!O){if(process.throwDeprecation)throw new Error(k);process.traceDeprecation?console.trace(k):console.error(k),O=!0}return x.apply(this,arguments)}return H};var n={},r;e.debuglog=function(x){if($(r)&&(r=process.env.NODE_DEBUG||""),x=x.toUpperCase(),!n[x])if(new RegExp("\\b"+x+"\\b","i").test(r)){var k=process.pid;n[x]=function(){var O=e.format.apply(e,arguments);console.error("%s %d: %s",x,k,O)}}else n[x]=function(){};return n[x]};function s(x,k){var O={seen:[],stylize:i};return arguments.length>=3&&(O.depth=arguments[2]),arguments.length>=4&&(O.colors=arguments[3]),w(k)?O.showHidden=k:k&&e._extend(O,k),$(O.showHidden)&&(O.showHidden=!1),$(O.depth)&&(O.depth=2),$(O.colors)&&(O.colors=!1),$(O.customInspect)&&(O.customInspect=!0),O.colors&&(O.stylize=o),a(O,x,O.depth)}e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(x,k){var O=s.styles[k];return O?"\x1B["+s.colors[O][0]+"m"+x+"\x1B["+s.colors[O][1]+"m":x}function i(x,k){return x}function l(x){var k={};return x.forEach(function(O,H){k[O]=!0}),k}function a(x,k,O){if(x.customInspect&&k&&U(k.inspect)&&k.inspect!==e.inspect&&!(k.constructor&&k.constructor.prototype===k)){var H=k.inspect(O,x);return S(H)||(H=a(x,H,O)),H}var E=u(x,k);if(E)return E;var L=Object.keys(k),_=l(L);if(x.showHidden&&(L=Object.getOwnPropertyNames(k)),N(k)&&(L.indexOf("message")>=0||L.indexOf("description")>=0))return f(k);if(L.length===0){if(U(k)){var M=k.name?": "+k.name:"";return x.stylize("[Function"+M+"]","special")}if(C(k))return x.stylize(RegExp.prototype.toString.call(k),"regexp");if(T(k))return x.stylize(Date.prototype.toString.call(k),"date");if(N(k))return f(k)}var B="",Se=!1,Ue=["{","}"];if(v(k)&&(Se=!0,Ue=["[","]"]),U(k)){var nn=k.name?": "+k.name:"";B=" [Function"+nn+"]"}if(C(k)&&(B=" "+RegExp.prototype.toString.call(k)),T(k)&&(B=" "+Date.prototype.toUTCString.call(k)),N(k)&&(B=" "+f(k)),L.length===0&&(!Se||k.length==0))return Ue[0]+B+Ue[1];if(O<0)return C(k)?x.stylize(RegExp.prototype.toString.call(k),"regexp"):x.stylize("[Object]","special");x.seen.push(k);var rt;return Se?rt=h(x,k,O,_,L):rt=L.map(function(N1){return c(x,k,O,_,N1,Se)}),x.seen.pop(),m(rt,B,Ue)}function u(x,k){if($(k))return x.stylize("undefined","undefined");if(S(k)){var O="'"+JSON.stringify(k).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return x.stylize(O,"string")}if(g(k))return x.stylize(""+k,"number");if(w(k))return x.stylize(""+k,"boolean");if(d(k))return x.stylize("null","null")}function f(x){return"["+Error.prototype.toString.call(x)+"]"}function h(x,k,O,H,E){for(var L=[],_=0,M=k.length;_<M;++_)Le(k,String(_))?L.push(c(x,k,O,H,String(_),!0)):L.push("");return E.forEach(function(B){B.match(/^\d+$/)||L.push(c(x,k,O,H,B,!0))}),L}function c(x,k,O,H,E,L){var _,M,B;if(B=Object.getOwnPropertyDescriptor(k,E)||{value:k[E]},B.get?B.set?M=x.stylize("[Getter/Setter]","special"):M=x.stylize("[Getter]","special"):B.set&&(M=x.stylize("[Setter]","special")),Le(H,E)||(_="["+E+"]"),M||(x.seen.indexOf(B.value)<0?(d(O)?M=a(x,B.value,null):M=a(x,B.value,O-1),M.indexOf(`
51
51
  `)>-1&&(L?M=M.split(`
52
52
  `).map(function(Se){return" "+Se}).join(`
53
53
  `).substr(2):M=`