@mp-front/components 0.0.1-next-11 → 0.0.1-next-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/steps/index.d.ts +1 -1
- package/dist/components/steps/index.d.ts.map +1 -1
- package/dist/components/steps/steps.component.d.ts +1 -1
- package/dist/components/steps/steps.component.d.ts.map +1 -1
- package/dist/components/steps/steps.functions.d.ts +1 -0
- package/dist/components/steps/steps.functions.d.ts.map +1 -1
- package/dist/components/steps/steps.stories.d.ts +12 -0
- package/dist/components/steps/steps.stories.d.ts.map +1 -1
- package/dist/components/steps/steps.types.d.ts +10 -0
- package/dist/components/steps/steps.types.d.ts.map +1 -1
- package/dist/layout/root-layout.component.d.ts +31 -9
- package/dist/layout/root-layout.component.d.ts.map +1 -1
- package/dist/styles.css +2 -2
- package/dist/ui-components-index.cjs +2 -2
- package/dist/ui-components-index.js +416 -414
- package/dist/ui-components-layout.cjs +1 -1
- package/dist/ui-components-layout.js +218 -190
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./proxy-2cglvzJh.cjs"),D=require("./classNames-CN12fVA7.cjs"),Y=require("react"),j=require("./carousel.component-BcjDXzve.cjs"),G=require("./useTranslation-2Dz5dMlm.cjs"),Ve=require("./index-DGDeDoym.cjs");function De(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const B=De(Y);var Ae="Separator",he="horizontal",He=["horizontal","vertical"],Pe=B.forwardRef((r,e)=>{const{decorative:t,orientation:i=he,...s}=r,n=Me(i)?i:he,o=t?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return x.jsxRuntimeExports.jsx(j.Primitive.div,{"data-orientation":n,...o,...s,ref:e})});Pe.displayName=Ae;function Me(r){return He.includes(r)}var Ke=Pe;const g=r=>typeof r=="string",K=()=>{let r,e;const t=new Promise((i,s)=>{r=i,e=s});return t.resolve=r,t.reject=e,t},de=r=>r==null?"":""+r,ze=(r,e,t)=>{r.forEach(i=>{e[i]&&(t[i]=e[i])})},Ue=/###/g,pe=r=>r&&r.indexOf("###")>-1?r.replace(Ue,"."):r,ge=r=>!r||g(r),z=(r,e,t)=>{const i=g(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(ge(r))return{};const n=pe(i[s]);!r[n]&&t&&(r[n]=new t),Object.prototype.hasOwnProperty.call(r,n)?r=r[n]:r={},++s}return ge(r)?{}:{obj:r,k:pe(i[s])}},me=(r,e,t)=>{const{obj:i,k:s}=z(r,e,Object);if(i!==void 0||e.length===1){i[s]=t;return}let n=e[e.length-1],a=e.slice(0,e.length-1),o=z(r,a,Object);for(;o.obj===void 0&&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),o=z(r,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${n}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${n}`]=t},Be=(r,e,t,i)=>{const{obj:s,k:n}=z(r,e,Object);s[n]=s[n]||[],s[n].push(t)},Q=(r,e)=>{const{obj:t,k:i}=z(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i]},Je=(r,e,t)=>{const i=Q(r,t);return i!==void 0?i:Q(e,t)},$e=(r,e,t)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in r?g(r[i])||r[i]instanceof String||g(e[i])||e[i]instanceof String?t&&(r[i]=e[i]):$e(r[i],e[i],t):r[i]=e[i]);return r},V=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Ze=r=>g(r)?r.replace(/[&<>"'\/]/g,e=>_e[e]):r;class We{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const qe=[" ",",","?","!",";"],Ye=new We(20),Ge=(r,e,t)=>{e=e||"",t=t||"";const i=qe.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(i.length===0)return!0;const s=Ye.getRegExp(`(${i.map(a=>a==="?"?"\\?":a).join("|")})`);let n=!s.test(r);if(!n){const a=r.indexOf(t);a>0&&!s.test(r.substring(0,a))&&(n=!0)}return n},ae=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const i=e.split(t);let s=r;for(let n=0;n<i.length;){if(!s||typeof s!="object")return;let a,o="";for(let u=n;u<i.length;++u)if(u!==n&&(o+=t),o+=i[u],a=s[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&u<i.length-1)continue;n+=u-n+1;break}s=a}return s},J=r=>r==null?void 0:r.replace("_","-"),Qe={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,i;(i=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||i.call(t,console,e)}};class X{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Qe,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,s){return s&&!this.debug?null:(g(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new X(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new X(this.logger,e)}}var $=new X;class te{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(t)||0;this.observers[i].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,n])=>{for(let a=0;a<n;a++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,n])=>{for(let a=0;a<n;a++)s.apply(s,[e,...t])})}}class xe extends te{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,s={}){var l,f;const n=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],i&&(Array.isArray(i)?o.push(...i):g(i)&&n?o.push(...i.split(n)):o.push(i)));const u=Q(this.data,o);return!u&&!t&&!i&&e.indexOf(".")>-1&&(e=o[0],t=o[1],i=o.slice(2).join(".")),u||!a||!g(i)?u:ae((f=(l=this.data)==null?void 0:l[e])==null?void 0:f[t],i,n)}addResource(e,t,i,s,n={silent:!1}){const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(a?i.split(a):i)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),me(this.data,o,s),n.silent||this.emit("added",e,t,i,s)}addResources(e,t,i,s={silent:!1}){for(const n in i)(g(i[n])||Array.isArray(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});s.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,s,n,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=i,i=t,t=o[1]),this.addNamespaces(t);let u=Q(this.data,o)||{};a.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?$e(u,i,n):u={...u,...i},me(this.data,o,u),a.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var Ee={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,i,s){return r.forEach(n=>{var a;e=((a=this.processors[n])==null?void 0:a.process(e,t,i,s))??e}),e}};const ke=Symbol("i18next/PATH_KEY");function Xe(){const r=[],e=Object.create(null);let t;return e.get=(i,s)=>{var n;return(n=t==null?void 0:t.revoke)==null||n.call(t),s===ke?r:(r.push(s),t=Proxy.revocable(i,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function oe(r,e){const{[ke]:t}=r(Xe());return t.join((e==null?void 0:e.keySeparator)??".")}const ye={},ie=r=>!g(r)&&typeof r!="boolean"&&typeof r!="number";class ee extends te{constructor(e,t={}){super(),ze(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=$.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const i={...t};if(e==null)return!1;const s=this.resolve(e,i);if((s==null?void 0:s.res)===void 0)return!1;const n=ie(s.res);return!(i.returnObjects===!1&&n)}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const a=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ge(e,i,s);if(a&&!o){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:g(n)?[n]:n};const l=e.split(i);(i!==s||i===s&&this.options.ns.indexOf(l[0])>-1)&&(n=l.shift()),e=l.join(s)}return{key:e,namespaces:g(n)?[n]:n}}translate(e,t,i){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=oe(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]);const n=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:u}=this.extractFromKey(e[e.length-1],s),l=u[u.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const c=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return p?n?{res:`${l}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:`${l}${f}${o}`:n?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:o;const d=this.resolve(e,s);let h=d==null?void 0:d.res;const m=(d==null?void 0:d.usedKey)||o,y=(d==null?void 0:d.exactUsedKey)||o,v=["[object Number]","[object Function]","[object RegExp]"],w=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,O=s.count!==void 0&&!g(s.count),E=ee.hasDefaultValue(s),Z=O?this.pluralResolver.getSuffix(c,s.count,s):"",k=s.ordinal&&O?this.pluralResolver.getSuffix(c,s.count,{ordinal:!1}):"",A=O&&!s.ordinal&&s.count===0,L=A&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${Z}`]||s[`defaultValue${k}`]||s.defaultValue;let b=h;T&&!h&&E&&(b=L);const Te=ie(b),Ie=Object.prototype.toString.apply(b);if(T&&b&&Te&&v.indexOf(Ie)<0&&!(g(w)&&Array.isArray(b))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const N=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,b,{...s,ns:u}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(d.res=N,d.usedParams=this.getUsedParamsDetails(s),d):N}if(a){const N=Array.isArray(b),R=N?[]:{},le=N?y:m;for(const P in b)if(Object.prototype.hasOwnProperty.call(b,P)){const F=`${le}${a}${P}`;E&&!h?R[P]=this.translate(F,{...s,defaultValue:ie(L)?L[P]:void 0,joinArrays:!1,ns:u}):R[P]=this.translate(F,{...s,joinArrays:!1,ns:u}),R[P]===F&&(R[P]=b[P])}h=R}}else if(T&&g(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,e,s,i));else{let N=!1,R=!1;!this.isValidLookup(h)&&E&&(N=!0,h=L),this.isValidLookup(h)||(R=!0,h=o);const P=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:h,F=E&&L!==h&&this.options.updateMissing;if(R||N||F){if(this.logger.log(F?"updateKey":"missingKey",c,l,o,F?L:h),a){const C=this.resolve(o,{...s,keySeparator:!1});C&&C.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 H=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let C=0;C<W.length;C++)H.push(W[C]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(s.lng||this.language):H.push(s.lng||this.language);const ue=(C,I,M)=>{var fe;const ce=E&&M!==h?M:P;this.options.missingKeyHandler?this.options.missingKeyHandler(C,l,I,ce,F,s):(fe=this.backendConnector)!=null&&fe.saveMissing&&this.backendConnector.saveMissing(C,l,I,ce,F,s),this.emit("missingKey",C,l,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?H.forEach(C=>{const I=this.pluralResolver.getSuffixes(C,s);A&&s[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(M=>{ue([C],o+M,s[`defaultValue${M}`]||L)})}):ue(H,o,L))}h=this.extendTranslation(h,e,s,d,i),R&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}${f}${o}`),(R||N)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${f}${o}`:o,N?h:void 0,s))}return n?(d.res=h,d.usedParams=this.getUsedParamsDetails(s),d):h}extendTranslation(e,t,i,s,n){var u,l;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const f=g(e)&&(((l=i==null?void 0:i.interpolation)==null?void 0:l.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(f){const d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let p=i.replace&&!g(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,i.lng||this.language||s.usedLng,i),f){const d=e.match(this.interpolator.nestingRegexp),h=d&&d.length;c<h&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>(n==null?void 0:n[0])===d[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),i)),i.interpolation&&this.interpolator.reset()}const a=i.postProcess||this.options.postProcess,o=g(a)?[a]:a;return e!=null&&(o!=null&&o.length)&&i.applyPostProcessor!==!1&&(e=Ee.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,s,n,a,o;return g(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(i))return;const l=this.extractFromKey(u,t),f=l.key;s=f;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=t.count!==void 0&&!g(t.count),d=p&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(g(t.context)||typeof t.context=="number")&&t.context!=="",m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(y=>{var v,w;this.isValidLookup(i)||(o=y,!ye[`${m[0]}-${y}`]&&((v=this.utils)!=null&&v.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(o))&&(ye[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(T=>{var Z;if(this.isValidLookup(i))return;a=T;const O=[f];if((Z=this.i18nFormat)!=null&&Z.addLookupKeys)this.i18nFormat.addLookupKeys(O,f,T,y,t);else{let k;p&&(k=this.pluralResolver.getSuffix(T,t.count,t));const A=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&k.indexOf(L)===0&&O.push(f+k.replace(L,this.options.pluralSeparator)),O.push(f+k),d&&O.push(f+A)),h){const b=`${f}${this.options.contextSeparator||"_"}${t.context}`;O.push(b),p&&(t.ordinal&&k.indexOf(L)===0&&O.push(b+k.replace(L,this.options.pluralSeparator)),O.push(b+k),d&&O.push(b+A))}}let E;for(;E=O.pop();)this.isValidLookup(i)||(n=E,i=this.getResource(T,y,E,t))}))})}),{res:i,usedKey:s,exactUsedKey:n,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i,s={}){var n;return(n=this.i18nFormat)!=null&&n.getResource?this.i18nFormat.getResource(e,t,i,s):this.resourceStore.getResource(e,t,i,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!g(e.replace);let s=i?e.replace:e;if(i&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const n of t)delete s[n]}return s}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}class Se{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}getScriptPartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(g(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(i=>{if(t)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return t=s;const n=this.getLanguagePartFromCode(i);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(a=>{if(a===n)return a;if(!(a.indexOf("-")<0&&n.indexOf("-")<0)&&(a.indexOf("-")>0&&n.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===n||a.indexOf(n)===0&&n.length>1))return a})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),g(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],n=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return g(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&n(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&n(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&n(this.getLanguagePartFromCode(e))):g(e)&&n(this.formatLanguageCode(e)),i.forEach(a=>{s.indexOf(a)<0&&n(this.formatLanguageCode(a))}),s}}const be={zero:0,one:1,two:2,few:3,many:4,other:5},Oe={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class et{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=$.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=J(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:i,type:s});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let a;try{a=new Intl.PluralRules(i,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Oe;if(!e.match(/-|_/))return Oe;const u=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(u,t)}return this.pluralRulesCache[n]=a,a}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((s,n)=>be[s]-be[n]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,i={}){const s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}const Le=(r,e,t,i=".",s=!0)=>{let n=Je(r,e,t);return!n&&s&&g(t)&&(n=ae(r,t,i),n===void 0&&(n=ae(e,t,i))),n},ne=r=>r.replace(/\$/g,"$$$$");class Ce{constructor(e={}){var t;this.logger=$.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(i=>i),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:s,prefix:n,prefixEscaped:a,suffix:o,suffixEscaped:u,formatSeparator:l,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:v,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:Ze,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=n?V(n):a||"{{",this.suffix=o?V(o):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?V(p):d||V("$t("),this.nestingSuffix=h?V(h):m||V(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=v||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,i)=>(t==null?void 0:t.source)===i?(t.lastIndex=0,t):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,s){var d;let n,a,o;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=h=>{if(h.indexOf(this.formatSeparator)<0){const w=Le(t,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,i,{...s,...t,interpolationkey:h}):w}const m=h.split(this.formatSeparator),y=m.shift().trim(),v=m.join(this.formatSeparator).trim();return this.format(Le(t,u,y,this.options.keySeparator,this.options.ignoreJSONStructure),v,i,{...s,...t,interpolationkey:y})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((d=s==null?void 0:s.interpolation)==null?void 0:d.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>ne(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?ne(this.escape(h)):ne(h)}].forEach(h=>{for(o=0;n=h.regex.exec(e);){const m=n[1].trim();if(a=l(m),a===void 0)if(typeof f=="function"){const v=f(e,n,s);a=g(v)?v:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))a="";else if(c){a=n[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),a="";else!g(a)&&!this.useRawValueToEscape&&(a=de(a));const y=h.safeValue(a);if(e=e.replace(n[0],y),c?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=n[0].length):h.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,i={}){let s,n,a;const o=(u,l)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const c=u.split(new RegExp(`${V(f)}[ ]*{`));let p=`{${c[1]}`;u=c[0],p=this.interpolate(p,a);const d=p.match(/'/g),h=p.match(/"/g);(((d==null?void 0:d.length)??0)%2===0&&!h||((h==null?void 0:h.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),l&&(a={...l,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${f}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;s=this.nestingRegexp.exec(e);){let u=[];a={...i},a=a.replace&&!g(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const l=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(l!==-1&&(u=s[1].slice(l).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),s[1]=s[1].slice(0,l)),n=t(o.call(this,s[1].trim(),a),a),n&&s[0]===e&&!g(n))return n;g(n)||(n=de(n)),n||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),n=""),u.length&&(n=u.reduce((f,c)=>this.format(f,c,i.lng,{...i,interpolationkey:s[1].trim()}),n.trim())),e=e.replace(s[0],n),this.regexp.lastIndex=0}return e}}const tt=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const i=r.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(a=>{if(a){const[o,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=l),l==="false"&&(t[f]=!1),l==="true"&&(t[f]=!0),isNaN(l)||(t[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},we=r=>{const e={};return(t,i,s)=>{let n=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(n={...n,[s.interpolationkey]:void 0});const a=i+JSON.stringify(n);let o=e[a];return o||(o=r(J(i),s),e[a]=o),o(t)}},st=r=>(e,t,i)=>r(J(t),i)(e);class it{constructor(e={}){this.logger=$.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?we:st;this.formats={number:i((s,n)=>{const a=new Intl.NumberFormat(s,{...n});return o=>a.format(o)}),currency:i((s,n)=>{const a=new Intl.NumberFormat(s,{...n,style:"currency"});return o=>a.format(o)}),datetime:i((s,n)=>{const a=new Intl.DateTimeFormat(s,{...n});return o=>a.format(o)}),relativetime:i((s,n)=>{const a=new Intl.RelativeTimeFormat(s,{...n});return o=>a.format(o,n.range||"day")}),list:i((s,n)=>{const a=new Intl.ListFormat(s,{...n});return o=>a.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=we(t)}format(e,t,i,s={}){const n=t.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find(o=>o.indexOf(")")>-1)){const o=n.findIndex(u=>u.indexOf(")")>-1);n[0]=[n[0],...n.splice(1,o)].join(this.formatSeparator)}return n.reduce((o,u)=>{var c;const{formatName:l,formatOptions:f}=tt(u);if(this.formats[l]){let p=o;try{const d=((c=s==null?void 0:s.formatParams)==null?void 0:c[s.interpolationkey])||{},h=d.locale||d.lng||s.locale||s.lng||i;p=this.formats[l](o,h,{...f,...s,...d})}catch(d){this.logger.warn(d)}return p}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}const nt=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class rt extends te{constructor(e,t,i,s={}){var n,a;super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=$.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=[],(a=(n=this.backend)==null?void 0:n.init)==null||a.call(n,i,s.backend,s)}queueLoad(e,t,i,s){const n={},a={},o={},u={};return e.forEach(l=>{let f=!0;t.forEach(c=>{const p=`${l}|${c}`;!i.reload&&this.store.hasResourceBundle(l,c)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,f=!1,a[p]===void 0&&(a[p]=!0),n[p]===void 0&&(n[p]=!0),u[c]===void 0&&(u[c]=!0)))}),f||(o[l]=!0)}),(Object.keys(n).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(n),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(u)}}loaded(e,t,i){const s=e.split("|"),n=s[0],a=s[1];t&&this.emit("failedLoading",n,a,t),!t&&i&&this.store.addResourceBundle(n,a,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(u=>{Be(u.loaded,[n],a),nt(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{o[l]||(o[l]={});const f=u.loaded[l];f.length&&f.forEach(c=>{o[l][c]===void 0&&(o[l][c]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(u=>!u.done)}read(e,t,i,s=0,n=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:n,callback:a});return}this.readingCalls++;const o=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(l&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,s+1,n*2,a)},n);return}a(l,f)},u=this.backend[i].bind(this.backend);if(u.length===2){try{const l=u(e,t);l&&typeof l.then=="function"?l.then(f=>o(null,f)).catch(o):o(null,l)}catch(l){o(l)}return}return u(e,t,o)}prepareLoading(e,t,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();g(e)&&(e=this.languageUtils.toResolveHierarchy(e)),g(t)&&(t=[t]);const n=this.queueLoad(e,t,i,s);if(!n.toLoad.length)return n.pending.length||s(),null;n.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),s=i[0],n=i[1];this.read(s,n,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${n} for language ${s} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${n} for language ${s}`,o),this.loaded(e,a,o)})}saveMissing(e,t,i,s,n,a={},o=()=>{}){var u,l,f,c,p;if((l=(u=this.services)==null?void 0:u.utils)!=null&&l.hasLoadedNamespace&&!((c=(f=this.services)==null?void 0:f.utils)!=null&&c.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((p=this.backend)!=null&&p.create){const d={...a,isUpdate:n},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(e,t,i,s,d):m=h(e,t,i,s),m&&typeof m.then=="function"?m.then(y=>o(null,y)).catch(o):o(null,m)}catch(m){o(m)}else h(e,t,i,s,o,d)}!e||!e[0]||this.store.addResource(e[0],t,i,s)}}}const re=()=>({debug:!1,initAsync:!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:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),g(r[1])&&(e.defaultValue=r[1]),g(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(i=>{e[i]=t[i]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ve=r=>{var e,t;return g(r.ns)&&(r.ns=[r.ns]),g(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),g(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},q=()=>{},at=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};let Re=!1;const ot=r=>{var e,t,i,s,n,a,o,u,l;return!!(((i=(t=(e=r==null?void 0:r.modules)==null?void 0:e.backend)==null?void 0:t.name)==null?void 0:i.indexOf("Locize"))>0||((o=(a=(n=(s=r==null?void 0:r.modules)==null?void 0:s.backend)==null?void 0:n.constructor)==null?void 0:a.name)==null?void 0:o.indexOf("Locize"))>0||(l=(u=r==null?void 0:r.options)==null?void 0:u.backend)!=null&&l.backends&&r.options.backend.backends.some(f=>{var c,p,d;return((c=f==null?void 0:f.name)==null?void 0:c.indexOf("Locize"))>0||((d=(p=f==null?void 0:f.constructor)==null?void 0:p.name)==null?void 0:d.indexOf("Locize"))>0}))};class U extends te{constructor(e={},t){if(super(),this.options=ve(e),this.services={},this.logger=$,this.modules={external:[]},at(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(g(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=re();this.options={...i,...this.options,...ve(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ot(this)&&!Re&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),Re=!0);const s=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?$.init(s(this.modules.logger),this.options):$.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=it;const f=new Se(this.options);this.store=new xe(this.options.resources,this.options);const c=this.services;c.logger=$,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new et(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),l&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(c.formatter=s(l),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Ce(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new rt(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new ee(this.services,this.options),this.translator.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=q),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[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(l=>{this[l]=(...f)=>this.store[l](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...f)=>(this.store[l](...f),this)});const o=K(),u=()=>{const l=(f,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),o.resolve(c),t(f,c)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),o}loadResources(e,t=q){var n,a;let i=t;const s=g(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const o=[],u=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};s?u(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),(a=(n=this.options.preload)==null?void 0:n.forEach)==null||a.call(n,l=>u(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,t,i){const s=K();return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=q),this.services.backendConnector.reload(e,t,n=>{s.resolve(),i(n)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Ee.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const i=K();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},n=(o,u)=>{u?this.isLanguageChangingTo===e&&(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve((...l)=>this.t(...l)),t&&t(o,(...l)=>this.t(...l))},a=o=>{var f,c;!e&&!o&&this.services.languageDetector&&(o=[]);const u=g(o)?o:o&&o[0],l=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(g(o)?[o]:o);l&&(this.language||s(l),this.translator.language||this.translator.changeLanguage(l),(c=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||c.call(f,l)),this.loadResources(l,p=>{n(p,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),i}getFixedT(e,t,i){const s=(n,a,...o)=>{let u;typeof a!="object"?u=this.options.overloadTranslationOptionHandler([n,a].concat(o)):u={...a},u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||i||s.keyPrefix);const l=this.options.keySeparator||".";let f;return u.keyPrefix&&Array.isArray(n)?f=n.map(c=>(typeof c=="function"&&(c=oe(c,{...this.options,...a})),`${u.keyPrefix}${l}${c}`)):(typeof n=="function"&&(n=oe(n,{...this.options,...a})),f=u.keyPrefix?`${u.keyPrefix}${l}${n}`:n),this.t(f,u)};return g(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=i,s}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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 i=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,n=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const a=(o,u)=>{const l=this.services.backendConnector.state[`${o}|${u}`];return l===-1||l===0||l===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(i,e)&&(!s||a(n,e)))}loadNamespaces(e,t){const i=K();return this.options.ns?(g(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),t&&t(s)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=K();g(e)&&(e=[e]);const s=this.options.preload||[],n=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return n.length?(this.options.preload=s.concat(n),this.loadResources(a=>{i.resolve(),t&&t(a)}),i):(t&&t(),Promise.resolve())}dir(e){var s,n;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const a=new Intl.Locale(e);if(a&&a.getTextInfo){const o=a.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const t=["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"],i=((n=this.services)==null?void 0:n.languageUtils)||new Se(re());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const i=new U(e,t);return i.createInstance=U.createInstance,i}cloneInstance(e={},t=q){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},n=new U(s);if((e.debug!==void 0||e.prefix!==void 0)&&(n.logger=n.logger.clone(e)),["store","services","language"].forEach(o=>{n[o]=this[o]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},i){const o=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},u[l]=Object.keys(u[l]).reduce((f,c)=>(f[c]={...u[l][c]},f),u[l]),u),{});n.store=new xe(o,s),n.services.resourceStore=n.store}if(e.interpolation){const u={...re().interpolation,...this.options.interpolation,...e.interpolation},l={...s,interpolation:u};n.services.interpolator=new Ce(l)}return n.translator=new ee(n.services,s),n.translator.on("*",(o,...u)=>{n.emit(o,...u)}),n.init(s,t),n.translator.options=s,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const S=U.createInstance();S.createInstance;S.dir;S.init;S.loadResources;S.reloadResources;S.use;S.changeLanguage;S.getFixedT;S.t;S.exists;S.setDefaultNamespace;S.hasLoadedNamespace;S.loadNamespaces;S.loadLanguages;const lt={type:"3rdParty",init(r){G.setDefaults(r.options.react),G.setI18n(r)}};function ut({i18n:r,defaultNS:e,children:t}){const i=Y.useMemo(()=>({i18n:r,defaultNS:e}),[r,e]);return Y.createElement(G.I18nContext.Provider,{value:i},t)}const ct=({className:r,...e})=>x.jsxRuntimeExports.jsx("div",{className:D.cn("[&_svg]:w-40",r),...e}),ft=r=>B.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...r},B.createElement("path",{d:"M1.86879 5.11875C2.52504 3.25 4.28754 2 6.26879 2H25.7813C27.7625 2 29.525 3.25 30.1813 5.11875L31.3313 8.40625C32.0188 10.375 31.3938 12.4 30.025 13.6812V25.5063C30.025 27.9937 28.0125 30.0063 25.525 30.0063H6.52504C4.03754 30.0063 2.02504 27.9937 2.02504 25.5063V13.6812C0.656291 12.4 0.0312907 10.375 0.718791 8.40625L1.86879 5.11875ZM5.02504 14.9875V20H27.025V14.9875C26.9 14.9938 26.7813 15 26.6563 15C25.2938 15 24.0438 14.4437 23.1438 13.5437C22.2313 14.4437 20.9813 15 19.5875 15C18.2 15 16.9375 14.4375 16.025 13.5312C15.1125 14.4375 13.85 15 12.4625 15C11.0688 15 9.81879 14.4437 8.90629 13.5437C8.00629 14.45 6.76254 15 5.39379 15C5.26879 15 5.14379 14.9938 5.01879 14.9875H5.02504ZM10.8813 5L10.4063 9.73125C10.2875 10.9437 11.2375 12 12.4563 12C13.5938 12 14.5188 11.075 14.5188 9.9375V5H10.875H10.8813ZM17.525 9.9375C17.525 11.075 18.45 12 19.5875 12C20.8063 12 21.7625 10.9437 21.6375 9.73125L21.1625 5H17.5188V9.9375H17.525ZM24.7063 10.2375C24.8063 11.2375 25.65 12 26.65 12C28 12 28.9438 10.6687 28.4938 9.4L27.35 6.1125C27.1188 5.44375 26.4875 5 25.7813 5H24.1813L24.7063 10.2375ZM5.40004 12C6.40629 12 7.24379 11.2375 7.34379 10.2375L7.86879 5H6.26879C5.56254 5 4.93754 5.44375 4.70004 6.1125L3.55004 9.4C3.10629 10.675 4.05004 12 5.39379 12H5.40004ZM5.02504 25.5C5.02504 26.3312 5.69379 27 6.52504 27H25.525C26.3563 27 27.025 26.3312 27.025 25.5V23H5.02504V25.5Z"})),ht=r=>B.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...r},B.createElement("path",{d:"M14.7688 8.45C15.5563 7.80625 16.7125 7.85625 17.4438 8.5875L25.4438 16.5875C26.0188 17.1625 26.1875 18.0188 25.875 18.7688C25.5625 19.5188 24.8375 20 24.0313 20H8.03127C7.22502 20 6.49377 19.5125 6.18127 18.7625C5.86877 18.0125 6.04377 17.1563 6.61877 16.5875L14.6188 8.5875L14.7688 8.45Z"})),{Text:je}=j.Typography,dt=({className:r,children:e})=>{const{t}=G.useTranslation();return!e||e.trim()===""?null:x.jsxRuntimeExports.jsxs(j.Flex,{className:r,align:"center",gap:2,children:[x.jsxRuntimeExports.jsxs(j.Flex,{align:"center",gap:1,children:[x.jsxRuntimeExports.jsx(ft,{className:"text-primary-blue size-6"}),x.jsxRuntimeExports.jsx(je,{className:"text-primary-blue",size:"sm",weight:"semibold",children:t("layout.header.store")})]}),x.jsxRuntimeExports.jsx(je,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:e})]})},{Text:Ne}=j.Typography,pt=({name:r,role:e,imageUrl:t,items:i=[]})=>{const{md:s}=Ve.useBreakpoint();if(!r||r.trim()==="")return null;const n=x.jsxRuntimeExports.jsxs(j.Flex,{gap:1,direction:"vertical",children:[x.jsxRuntimeExports.jsx(Ne,{className:"text-primary-blue",size:"sm",weight:"semibold",children:r}),x.jsxRuntimeExports.jsx(Ne,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:e})]});return x.jsxRuntimeExports.jsxs(j.Flex,{align:"center",gap:2,children:[x.jsxRuntimeExports.jsx(j.Avatar,{src:t,alt:r,size:"sm"}),s&&n,x.jsxRuntimeExports.jsx(j.Dropdown,{classNames:{trigger:"size-6.5 p-0",content:"z-10 shadow-sm"},trigger:x.jsxRuntimeExports.jsx(ht,{className:"rotate-180"}),items:s?i:[{label:n,id:"user-name",type:"label"},{id:"separator-1",type:"separator"},...i]})]})},Fe=({className:r,children:e})=>{if(Array.isArray(e)&&e.length===0)return null;const t=e.filter(s=>s!==null),i=s=>s===t.length-1;return x.jsxRuntimeExports.jsx(j.Flex,{align:"center",gap:4,className:D.cn(r),children:t.map((s,n)=>x.jsxRuntimeExports.jsxs(Y.Fragment,{children:[s,i(n)?null:x.jsxRuntimeExports.jsx(Ke,{"data-slot":"separator",orientation:"vertical",decorative:!0,className:D.cn("shrink-0 bg-grays-macropay-05 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch")})]},n))})};Fe.disPlayName="Layout.Header.RightSide";const _=({className:r,...e})=>x.jsxRuntimeExports.jsx("header",{className:D.cn("sticky top-0 flex h-17 shrink-0 items-center justify-between gap-2 border-b border-gray-200 bg-white px-4 shadow-lg z-1",r),...e});_.LeftSide=ct;_.Store=dt;_.User=pt;_.RightSide=Fe;const gt=({className:r,children:e,...t})=>x.jsxRuntimeExports.jsx("div",{className:D.cn("flex w-full flex-1 flex-col px-0 md:px-4 pt-5 [&>div]:flex [&>div]:items-start [&>div]:justify-center [&>div>div]:w-full [&>div>div]:max-w-243",r),...t,children:x.jsxRuntimeExports.jsx("div",{className:"flex-1 rounded-lg bg-white p-4",children:e})}),mt=({className:r,...e})=>x.jsxRuntimeExports.jsx("footer",{className:D.cn("bottom-0 w-full px-6 py-4 text-center text-xs text-grays-macropay-05",r),...e}),xt={login:{btnLabel:"Iniciar sesión"}},yt={translation:{layout:{...xt,header:{store:"Centro"}},header:{signOut:"Cerrar Sesión",store:"Tienda",cashRegister:"Caja",roleName:"Vendedor",sessionExp:"Tu sesión está por expirar",continueSessionPrefix:"La sesión se cerrará automáticamente en",continueSessionSuffix:"segundos, confirma para continuar con la sesión"},common:{yes:"Si",accept:"Aceptar",no:"No",cancel:"Cancelar",send:"Enviar",save:"Guardar",name:"Nombre",names:"Nombre(s)",lastName:"Apellido paterno",secondName:"Apellido materno",street:"Calle",extNumber:"Número exterior",colony:"Colonia",CP:"Código postal",upload:"Cargar archivo",goBack:"Regresar",goForward:"Continuar",goToLoginButton:"Ir a login",search:"Buscar",htmlTitle:"Macropay HelpDesk",themedark:"Modo Oscuro",goToMenu:"Ir a menú",closeMenu:"Cerrar",step:"Paso {{value}}",changeCenter:"Cambiar centro",closeSession:"Cerrar sesión",yesForward:"Si, continuar",blackList:{title:"Verifica para continuar",message:"¿Estás seguro que deseas continuar?"},messageChangeCenter:"Regresarás al menú principal para cambiar el centro. ¿Estás seguro que deseas realizar esta acción? Perderás el flujo actual.",messageCloseSession:"¿Estás seguro que deseas cerrar la sesión de tu cuenta?"}}};S.use(lt).init({resources:{es:yt},lng:"es",interpolation:{escapeValue:!1}});const se=({children:r,loading:e,...t})=>x.jsxRuntimeExports.jsx(ut,{i18n:S,children:x.jsxRuntimeExports.jsxs("main",{"data-slot":"sidebar-inset",className:"relative flex min-h-svh w-full flex-1 flex-col bg-grays-macropay-02",...t,children:[r,e&&x.jsxRuntimeExports.jsx(j.Root$3,{className:"position bg-opacity-50 absolute top-0 left-0 z-50 flex h-full w-full items-center justify-center"})]})});se.Header=_;se.Content=gt;se.Footer=mt;exports.RootLayout=se;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./proxy-2cglvzJh.cjs"),D=require("./classNames-CN12fVA7.cjs"),Y=require("react"),w=require("./carousel.component-BcjDXzve.cjs"),G=require("./useTranslation-2Dz5dMlm.cjs"),Ve=require("./index-DGDeDoym.cjs");function De(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const B=De(Y);var Ae="Separator",he="horizontal",He=["horizontal","vertical"],Pe=B.forwardRef((r,e)=>{const{decorative:t,orientation:i=he,...s}=r,n=Me(i)?i:he,o=t?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return m.jsxRuntimeExports.jsx(w.Primitive.div,{"data-orientation":n,...o,...s,ref:e})});Pe.displayName=Ae;function Me(r){return He.includes(r)}var Ke=Pe;const g=r=>typeof r=="string",K=()=>{let r,e;const t=new Promise((i,s)=>{r=i,e=s});return t.resolve=r,t.reject=e,t},de=r=>r==null?"":""+r,ze=(r,e,t)=>{r.forEach(i=>{e[i]&&(t[i]=e[i])})},Ue=/###/g,pe=r=>r&&r.indexOf("###")>-1?r.replace(Ue,"."):r,ge=r=>!r||g(r),z=(r,e,t)=>{const i=g(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(ge(r))return{};const n=pe(i[s]);!r[n]&&t&&(r[n]=new t),Object.prototype.hasOwnProperty.call(r,n)?r=r[n]:r={},++s}return ge(r)?{}:{obj:r,k:pe(i[s])}},me=(r,e,t)=>{const{obj:i,k:s}=z(r,e,Object);if(i!==void 0||e.length===1){i[s]=t;return}let n=e[e.length-1],a=e.slice(0,e.length-1),o=z(r,a,Object);for(;o.obj===void 0&&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),o=z(r,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${n}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${n}`]=t},Be=(r,e,t,i)=>{const{obj:s,k:n}=z(r,e,Object);s[n]=s[n]||[],s[n].push(t)},Q=(r,e)=>{const{obj:t,k:i}=z(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i]},Je=(r,e,t)=>{const i=Q(r,t);return i!==void 0?i:Q(e,t)},Ee=(r,e,t)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in r?g(r[i])||r[i]instanceof String||g(e[i])||e[i]instanceof String?t&&(r[i]=e[i]):Ee(r[i],e[i],t):r[i]=e[i]);return r},V=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Ze=r=>g(r)?r.replace(/[&<>"'\/]/g,e=>_e[e]):r;class We{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const qe=[" ",",","?","!",";"],Ye=new We(20),Ge=(r,e,t)=>{e=e||"",t=t||"";const i=qe.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(i.length===0)return!0;const s=Ye.getRegExp(`(${i.map(a=>a==="?"?"\\?":a).join("|")})`);let n=!s.test(r);if(!n){const a=r.indexOf(t);a>0&&!s.test(r.substring(0,a))&&(n=!0)}return n},ae=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const i=e.split(t);let s=r;for(let n=0;n<i.length;){if(!s||typeof s!="object")return;let a,o="";for(let u=n;u<i.length;++u)if(u!==n&&(o+=t),o+=i[u],a=s[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&u<i.length-1)continue;n+=u-n+1;break}s=a}return s},J=r=>r==null?void 0:r.replace("_","-"),Qe={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,i;(i=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||i.call(t,console,e)}};class X{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Qe,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,s){return s&&!this.debug?null:(g(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new X(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new X(this.logger,e)}}var E=new X;class te{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(t)||0;this.observers[i].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,n])=>{for(let a=0;a<n;a++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,n])=>{for(let a=0;a<n;a++)s.apply(s,[e,...t])})}}class xe extends te{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,s={}){var l,f;const n=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],i&&(Array.isArray(i)?o.push(...i):g(i)&&n?o.push(...i.split(n)):o.push(i)));const u=Q(this.data,o);return!u&&!t&&!i&&e.indexOf(".")>-1&&(e=o[0],t=o[1],i=o.slice(2).join(".")),u||!a||!g(i)?u:ae((f=(l=this.data)==null?void 0:l[e])==null?void 0:f[t],i,n)}addResource(e,t,i,s,n={silent:!1}){const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(a?i.split(a):i)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),me(this.data,o,s),n.silent||this.emit("added",e,t,i,s)}addResources(e,t,i,s={silent:!1}){for(const n in i)(g(i[n])||Array.isArray(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});s.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,s,n,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=i,i=t,t=o[1]),this.addNamespaces(t);let u=Q(this.data,o)||{};a.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?Ee(u,i,n):u={...u,...i},me(this.data,o,u),a.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var $e={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,i,s){return r.forEach(n=>{var a;e=((a=this.processors[n])==null?void 0:a.process(e,t,i,s))??e}),e}};const ke=Symbol("i18next/PATH_KEY");function Xe(){const r=[],e=Object.create(null);let t;return e.get=(i,s)=>{var n;return(n=t==null?void 0:t.revoke)==null||n.call(t),s===ke?r:(r.push(s),t=Proxy.revocable(i,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function oe(r,e){const{[ke]:t}=r(Xe());return t.join((e==null?void 0:e.keySeparator)??".")}const ye={},ie=r=>!g(r)&&typeof r!="boolean"&&typeof r!="number";class ee extends te{constructor(e,t={}){super(),ze(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=E.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const i={...t};if(e==null)return!1;const s=this.resolve(e,i);if((s==null?void 0:s.res)===void 0)return!1;const n=ie(s.res);return!(i.returnObjects===!1&&n)}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const a=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ge(e,i,s);if(a&&!o){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:g(n)?[n]:n};const l=e.split(i);(i!==s||i===s&&this.options.ns.indexOf(l[0])>-1)&&(n=l.shift()),e=l.join(s)}return{key:e,namespaces:g(n)?[n]:n}}translate(e,t,i){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=oe(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]);const n=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:u}=this.extractFromKey(e[e.length-1],s),l=u[u.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const c=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return p?n?{res:`${l}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:`${l}${f}${o}`:n?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:o;const d=this.resolve(e,s);let h=d==null?void 0:d.res;const x=(d==null?void 0:d.usedKey)||o,y=(d==null?void 0:d.exactUsedKey)||o,R=["[object Number]","[object Function]","[object RegExp]"],v=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,O=s.count!==void 0&&!g(s.count),$=ee.hasDefaultValue(s),Z=O?this.pluralResolver.getSuffix(c,s.count,s):"",k=s.ordinal&&O?this.pluralResolver.getSuffix(c,s.count,{ordinal:!1}):"",A=O&&!s.ordinal&&s.count===0,L=A&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${Z}`]||s[`defaultValue${k}`]||s.defaultValue;let b=h;T&&!h&&$&&(b=L);const Te=ie(b),Ie=Object.prototype.toString.apply(b);if(T&&b&&Te&&R.indexOf(Ie)<0&&!(g(v)&&Array.isArray(b))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const N=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,b,{...s,ns:u}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(d.res=N,d.usedParams=this.getUsedParamsDetails(s),d):N}if(a){const N=Array.isArray(b),j=N?[]:{},le=N?y:x;for(const P in b)if(Object.prototype.hasOwnProperty.call(b,P)){const F=`${le}${a}${P}`;$&&!h?j[P]=this.translate(F,{...s,defaultValue:ie(L)?L[P]:void 0,joinArrays:!1,ns:u}):j[P]=this.translate(F,{...s,joinArrays:!1,ns:u}),j[P]===F&&(j[P]=b[P])}h=j}}else if(T&&g(v)&&Array.isArray(h))h=h.join(v),h&&(h=this.extendTranslation(h,e,s,i));else{let N=!1,j=!1;!this.isValidLookup(h)&&$&&(N=!0,h=L),this.isValidLookup(h)||(j=!0,h=o);const P=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:h,F=$&&L!==h&&this.options.updateMissing;if(j||N||F){if(this.logger.log(F?"updateKey":"missingKey",c,l,o,F?L:h),a){const C=this.resolve(o,{...s,keySeparator:!1});C&&C.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 H=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let C=0;C<W.length;C++)H.push(W[C]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(s.lng||this.language):H.push(s.lng||this.language);const ue=(C,I,M)=>{var fe;const ce=$&&M!==h?M:P;this.options.missingKeyHandler?this.options.missingKeyHandler(C,l,I,ce,F,s):(fe=this.backendConnector)!=null&&fe.saveMissing&&this.backendConnector.saveMissing(C,l,I,ce,F,s),this.emit("missingKey",C,l,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?H.forEach(C=>{const I=this.pluralResolver.getSuffixes(C,s);A&&s[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(M=>{ue([C],o+M,s[`defaultValue${M}`]||L)})}):ue(H,o,L))}h=this.extendTranslation(h,e,s,d,i),j&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}${f}${o}`),(j||N)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${f}${o}`:o,N?h:void 0,s))}return n?(d.res=h,d.usedParams=this.getUsedParamsDetails(s),d):h}extendTranslation(e,t,i,s,n){var u,l;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const f=g(e)&&(((l=i==null?void 0:i.interpolation)==null?void 0:l.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(f){const d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let p=i.replace&&!g(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,i.lng||this.language||s.usedLng,i),f){const d=e.match(this.interpolator.nestingRegexp),h=d&&d.length;c<h&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>(n==null?void 0:n[0])===d[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),i)),i.interpolation&&this.interpolator.reset()}const a=i.postProcess||this.options.postProcess,o=g(a)?[a]:a;return e!=null&&(o!=null&&o.length)&&i.applyPostProcessor!==!1&&(e=$e.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,s,n,a,o;return g(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(i))return;const l=this.extractFromKey(u,t),f=l.key;s=f;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=t.count!==void 0&&!g(t.count),d=p&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(g(t.context)||typeof t.context=="number")&&t.context!=="",x=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(y=>{var R,v;this.isValidLookup(i)||(o=y,!ye[`${x[0]}-${y}`]&&((R=this.utils)!=null&&R.hasLoadedNamespace)&&!((v=this.utils)!=null&&v.hasLoadedNamespace(o))&&(ye[`${x[0]}-${y}`]=!0,this.logger.warn(`key "${s}" for languages "${x.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),x.forEach(T=>{var Z;if(this.isValidLookup(i))return;a=T;const O=[f];if((Z=this.i18nFormat)!=null&&Z.addLookupKeys)this.i18nFormat.addLookupKeys(O,f,T,y,t);else{let k;p&&(k=this.pluralResolver.getSuffix(T,t.count,t));const A=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&k.indexOf(L)===0&&O.push(f+k.replace(L,this.options.pluralSeparator)),O.push(f+k),d&&O.push(f+A)),h){const b=`${f}${this.options.contextSeparator||"_"}${t.context}`;O.push(b),p&&(t.ordinal&&k.indexOf(L)===0&&O.push(b+k.replace(L,this.options.pluralSeparator)),O.push(b+k),d&&O.push(b+A))}}let $;for(;$=O.pop();)this.isValidLookup(i)||(n=$,i=this.getResource(T,y,$,t))}))})}),{res:i,usedKey:s,exactUsedKey:n,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i,s={}){var n;return(n=this.i18nFormat)!=null&&n.getResource?this.i18nFormat.getResource(e,t,i,s):this.resourceStore.getResource(e,t,i,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!g(e.replace);let s=i?e.replace:e;if(i&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const n of t)delete s[n]}return s}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}class Se{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=E.create("languageUtils")}getScriptPartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(g(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(i=>{if(t)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return t=s;const n=this.getLanguagePartFromCode(i);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(a=>{if(a===n)return a;if(!(a.indexOf("-")<0&&n.indexOf("-")<0)&&(a.indexOf("-")>0&&n.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===n||a.indexOf(n)===0&&n.length>1))return a})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),g(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],n=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return g(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&n(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&n(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&n(this.getLanguagePartFromCode(e))):g(e)&&n(this.formatLanguageCode(e)),i.forEach(a=>{s.indexOf(a)<0&&n(this.formatLanguageCode(a))}),s}}const be={zero:0,one:1,two:2,few:3,many:4,other:5},Oe={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class et{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=E.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=J(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:i,type:s});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let a;try{a=new Intl.PluralRules(i,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Oe;if(!e.match(/-|_/))return Oe;const u=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(u,t)}return this.pluralRulesCache[n]=a,a}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((s,n)=>be[s]-be[n]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,i={}){const s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}const Le=(r,e,t,i=".",s=!0)=>{let n=Je(r,e,t);return!n&&s&&g(t)&&(n=ae(r,t,i),n===void 0&&(n=ae(e,t,i))),n},ne=r=>r.replace(/\$/g,"$$$$");class Ce{constructor(e={}){var t;this.logger=E.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(i=>i),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:s,prefix:n,prefixEscaped:a,suffix:o,suffixEscaped:u,formatSeparator:l,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:x,nestingOptionsSeparator:y,maxReplaces:R,alwaysFormat:v}=e.interpolation;this.escape=t!==void 0?t:Ze,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=n?V(n):a||"{{",this.suffix=o?V(o):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?V(p):d||V("$t("),this.nestingSuffix=h?V(h):x||V(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=R||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,i)=>(t==null?void 0:t.source)===i?(t.lastIndex=0,t):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,s){var d;let n,a,o;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=h=>{if(h.indexOf(this.formatSeparator)<0){const v=Le(t,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,i,{...s,...t,interpolationkey:h}):v}const x=h.split(this.formatSeparator),y=x.shift().trim(),R=x.join(this.formatSeparator).trim();return this.format(Le(t,u,y,this.options.keySeparator,this.options.ignoreJSONStructure),R,i,{...s,...t,interpolationkey:y})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((d=s==null?void 0:s.interpolation)==null?void 0:d.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>ne(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?ne(this.escape(h)):ne(h)}].forEach(h=>{for(o=0;n=h.regex.exec(e);){const x=n[1].trim();if(a=l(x),a===void 0)if(typeof f=="function"){const R=f(e,n,s);a=g(R)?R:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))a="";else if(c){a=n[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${e}`),a="";else!g(a)&&!this.useRawValueToEscape&&(a=de(a));const y=h.safeValue(a);if(e=e.replace(n[0],y),c?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=n[0].length):h.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,i={}){let s,n,a;const o=(u,l)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const c=u.split(new RegExp(`${V(f)}[ ]*{`));let p=`{${c[1]}`;u=c[0],p=this.interpolate(p,a);const d=p.match(/'/g),h=p.match(/"/g);(((d==null?void 0:d.length)??0)%2===0&&!h||((h==null?void 0:h.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),l&&(a={...l,...a})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,x),`${u}${f}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;s=this.nestingRegexp.exec(e);){let u=[];a={...i},a=a.replace&&!g(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const l=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(l!==-1&&(u=s[1].slice(l).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),s[1]=s[1].slice(0,l)),n=t(o.call(this,s[1].trim(),a),a),n&&s[0]===e&&!g(n))return n;g(n)||(n=de(n)),n||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),n=""),u.length&&(n=u.reduce((f,c)=>this.format(f,c,i.lng,{...i,interpolationkey:s[1].trim()}),n.trim())),e=e.replace(s[0],n),this.regexp.lastIndex=0}return e}}const tt=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const i=r.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(a=>{if(a){const[o,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=l),l==="false"&&(t[f]=!1),l==="true"&&(t[f]=!0),isNaN(l)||(t[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},ve=r=>{const e={};return(t,i,s)=>{let n=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(n={...n,[s.interpolationkey]:void 0});const a=i+JSON.stringify(n);let o=e[a];return o||(o=r(J(i),s),e[a]=o),o(t)}},st=r=>(e,t,i)=>r(J(t),i)(e);class it{constructor(e={}){this.logger=E.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?ve:st;this.formats={number:i((s,n)=>{const a=new Intl.NumberFormat(s,{...n});return o=>a.format(o)}),currency:i((s,n)=>{const a=new Intl.NumberFormat(s,{...n,style:"currency"});return o=>a.format(o)}),datetime:i((s,n)=>{const a=new Intl.DateTimeFormat(s,{...n});return o=>a.format(o)}),relativetime:i((s,n)=>{const a=new Intl.RelativeTimeFormat(s,{...n});return o=>a.format(o,n.range||"day")}),list:i((s,n)=>{const a=new Intl.ListFormat(s,{...n});return o=>a.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ve(t)}format(e,t,i,s={}){const n=t.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find(o=>o.indexOf(")")>-1)){const o=n.findIndex(u=>u.indexOf(")")>-1);n[0]=[n[0],...n.splice(1,o)].join(this.formatSeparator)}return n.reduce((o,u)=>{var c;const{formatName:l,formatOptions:f}=tt(u);if(this.formats[l]){let p=o;try{const d=((c=s==null?void 0:s.formatParams)==null?void 0:c[s.interpolationkey])||{},h=d.locale||d.lng||s.locale||s.lng||i;p=this.formats[l](o,h,{...f,...s,...d})}catch(d){this.logger.warn(d)}return p}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}const nt=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class rt extends te{constructor(e,t,i,s={}){var n,a;super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=E.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=[],(a=(n=this.backend)==null?void 0:n.init)==null||a.call(n,i,s.backend,s)}queueLoad(e,t,i,s){const n={},a={},o={},u={};return e.forEach(l=>{let f=!0;t.forEach(c=>{const p=`${l}|${c}`;!i.reload&&this.store.hasResourceBundle(l,c)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,f=!1,a[p]===void 0&&(a[p]=!0),n[p]===void 0&&(n[p]=!0),u[c]===void 0&&(u[c]=!0)))}),f||(o[l]=!0)}),(Object.keys(n).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(n),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(u)}}loaded(e,t,i){const s=e.split("|"),n=s[0],a=s[1];t&&this.emit("failedLoading",n,a,t),!t&&i&&this.store.addResourceBundle(n,a,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(u=>{Be(u.loaded,[n],a),nt(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{o[l]||(o[l]={});const f=u.loaded[l];f.length&&f.forEach(c=>{o[l][c]===void 0&&(o[l][c]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(u=>!u.done)}read(e,t,i,s=0,n=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:n,callback:a});return}this.readingCalls++;const o=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(l&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,s+1,n*2,a)},n);return}a(l,f)},u=this.backend[i].bind(this.backend);if(u.length===2){try{const l=u(e,t);l&&typeof l.then=="function"?l.then(f=>o(null,f)).catch(o):o(null,l)}catch(l){o(l)}return}return u(e,t,o)}prepareLoading(e,t,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();g(e)&&(e=this.languageUtils.toResolveHierarchy(e)),g(t)&&(t=[t]);const n=this.queueLoad(e,t,i,s);if(!n.toLoad.length)return n.pending.length||s(),null;n.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),s=i[0],n=i[1];this.read(s,n,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${n} for language ${s} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${n} for language ${s}`,o),this.loaded(e,a,o)})}saveMissing(e,t,i,s,n,a={},o=()=>{}){var u,l,f,c,p;if((l=(u=this.services)==null?void 0:u.utils)!=null&&l.hasLoadedNamespace&&!((c=(f=this.services)==null?void 0:f.utils)!=null&&c.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((p=this.backend)!=null&&p.create){const d={...a,isUpdate:n},h=this.backend.create.bind(this.backend);if(h.length<6)try{let x;h.length===5?x=h(e,t,i,s,d):x=h(e,t,i,s),x&&typeof x.then=="function"?x.then(y=>o(null,y)).catch(o):o(null,x)}catch(x){o(x)}else h(e,t,i,s,o,d)}!e||!e[0]||this.store.addResource(e[0],t,i,s)}}}const re=()=>({debug:!1,initAsync:!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:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),g(r[1])&&(e.defaultValue=r[1]),g(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(i=>{e[i]=t[i]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),we=r=>{var e,t;return g(r.ns)&&(r.ns=[r.ns]),g(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),g(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},q=()=>{},at=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};let Re=!1;const ot=r=>{var e,t,i,s,n,a,o,u,l;return!!(((i=(t=(e=r==null?void 0:r.modules)==null?void 0:e.backend)==null?void 0:t.name)==null?void 0:i.indexOf("Locize"))>0||((o=(a=(n=(s=r==null?void 0:r.modules)==null?void 0:s.backend)==null?void 0:n.constructor)==null?void 0:a.name)==null?void 0:o.indexOf("Locize"))>0||(l=(u=r==null?void 0:r.options)==null?void 0:u.backend)!=null&&l.backends&&r.options.backend.backends.some(f=>{var c,p,d;return((c=f==null?void 0:f.name)==null?void 0:c.indexOf("Locize"))>0||((d=(p=f==null?void 0:f.constructor)==null?void 0:p.name)==null?void 0:d.indexOf("Locize"))>0}))};class U extends te{constructor(e={},t){if(super(),this.options=we(e),this.services={},this.logger=E,this.modules={external:[]},at(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(g(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=re();this.options={...i,...this.options,...we(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ot(this)&&!Re&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),Re=!0);const s=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?E.init(s(this.modules.logger),this.options):E.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=it;const f=new Se(this.options);this.store=new xe(this.options.resources,this.options);const c=this.services;c.logger=E,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new et(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),l&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(c.formatter=s(l),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Ce(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new rt(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new ee(this.services,this.options),this.translator.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=q),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[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(l=>{this[l]=(...f)=>this.store[l](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...f)=>(this.store[l](...f),this)});const o=K(),u=()=>{const l=(f,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),o.resolve(c),t(f,c)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),o}loadResources(e,t=q){var n,a;let i=t;const s=g(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const o=[],u=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};s?u(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),(a=(n=this.options.preload)==null?void 0:n.forEach)==null||a.call(n,l=>u(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,t,i){const s=K();return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=q),this.services.backendConnector.reload(e,t,n=>{s.resolve(),i(n)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&$e.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const i=K();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},n=(o,u)=>{u?this.isLanguageChangingTo===e&&(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve((...l)=>this.t(...l)),t&&t(o,(...l)=>this.t(...l))},a=o=>{var f,c;!e&&!o&&this.services.languageDetector&&(o=[]);const u=g(o)?o:o&&o[0],l=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(g(o)?[o]:o);l&&(this.language||s(l),this.translator.language||this.translator.changeLanguage(l),(c=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||c.call(f,l)),this.loadResources(l,p=>{n(p,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),i}getFixedT(e,t,i){const s=(n,a,...o)=>{let u;typeof a!="object"?u=this.options.overloadTranslationOptionHandler([n,a].concat(o)):u={...a},u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||i||s.keyPrefix);const l=this.options.keySeparator||".";let f;return u.keyPrefix&&Array.isArray(n)?f=n.map(c=>(typeof c=="function"&&(c=oe(c,{...this.options,...a})),`${u.keyPrefix}${l}${c}`)):(typeof n=="function"&&(n=oe(n,{...this.options,...a})),f=u.keyPrefix?`${u.keyPrefix}${l}${n}`:n),this.t(f,u)};return g(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=i,s}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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 i=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,n=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const a=(o,u)=>{const l=this.services.backendConnector.state[`${o}|${u}`];return l===-1||l===0||l===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(i,e)&&(!s||a(n,e)))}loadNamespaces(e,t){const i=K();return this.options.ns?(g(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),t&&t(s)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=K();g(e)&&(e=[e]);const s=this.options.preload||[],n=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return n.length?(this.options.preload=s.concat(n),this.loadResources(a=>{i.resolve(),t&&t(a)}),i):(t&&t(),Promise.resolve())}dir(e){var s,n;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const a=new Intl.Locale(e);if(a&&a.getTextInfo){const o=a.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const t=["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"],i=((n=this.services)==null?void 0:n.languageUtils)||new Se(re());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const i=new U(e,t);return i.createInstance=U.createInstance,i}cloneInstance(e={},t=q){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},n=new U(s);if((e.debug!==void 0||e.prefix!==void 0)&&(n.logger=n.logger.clone(e)),["store","services","language"].forEach(o=>{n[o]=this[o]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},i){const o=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},u[l]=Object.keys(u[l]).reduce((f,c)=>(f[c]={...u[l][c]},f),u[l]),u),{});n.store=new xe(o,s),n.services.resourceStore=n.store}if(e.interpolation){const u={...re().interpolation,...this.options.interpolation,...e.interpolation},l={...s,interpolation:u};n.services.interpolator=new Ce(l)}return n.translator=new ee(n.services,s),n.translator.on("*",(o,...u)=>{n.emit(o,...u)}),n.init(s,t),n.translator.options=s,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const S=U.createInstance();S.createInstance;S.dir;S.init;S.loadResources;S.reloadResources;S.use;S.changeLanguage;S.getFixedT;S.t;S.exists;S.setDefaultNamespace;S.hasLoadedNamespace;S.loadNamespaces;S.loadLanguages;const lt={type:"3rdParty",init(r){G.setDefaults(r.options.react),G.setI18n(r)}};function ut({i18n:r,defaultNS:e,children:t}){const i=Y.useMemo(()=>({i18n:r,defaultNS:e}),[r,e]);return Y.createElement(G.I18nContext.Provider,{value:i},t)}const ct=({className:r,...e})=>m.jsxRuntimeExports.jsx("div",{className:D.cn("[&_svg]:w-40",r),...e}),ft=r=>B.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...r},B.createElement("path",{d:"M1.86879 5.11875C2.52504 3.25 4.28754 2 6.26879 2H25.7813C27.7625 2 29.525 3.25 30.1813 5.11875L31.3313 8.40625C32.0188 10.375 31.3938 12.4 30.025 13.6812V25.5063C30.025 27.9937 28.0125 30.0063 25.525 30.0063H6.52504C4.03754 30.0063 2.02504 27.9937 2.02504 25.5063V13.6812C0.656291 12.4 0.0312907 10.375 0.718791 8.40625L1.86879 5.11875ZM5.02504 14.9875V20H27.025V14.9875C26.9 14.9938 26.7813 15 26.6563 15C25.2938 15 24.0438 14.4437 23.1438 13.5437C22.2313 14.4437 20.9813 15 19.5875 15C18.2 15 16.9375 14.4375 16.025 13.5312C15.1125 14.4375 13.85 15 12.4625 15C11.0688 15 9.81879 14.4437 8.90629 13.5437C8.00629 14.45 6.76254 15 5.39379 15C5.26879 15 5.14379 14.9938 5.01879 14.9875H5.02504ZM10.8813 5L10.4063 9.73125C10.2875 10.9437 11.2375 12 12.4563 12C13.5938 12 14.5188 11.075 14.5188 9.9375V5H10.875H10.8813ZM17.525 9.9375C17.525 11.075 18.45 12 19.5875 12C20.8063 12 21.7625 10.9437 21.6375 9.73125L21.1625 5H17.5188V9.9375H17.525ZM24.7063 10.2375C24.8063 11.2375 25.65 12 26.65 12C28 12 28.9438 10.6687 28.4938 9.4L27.35 6.1125C27.1188 5.44375 26.4875 5 25.7813 5H24.1813L24.7063 10.2375ZM5.40004 12C6.40629 12 7.24379 11.2375 7.34379 10.2375L7.86879 5H6.26879C5.56254 5 4.93754 5.44375 4.70004 6.1125L3.55004 9.4C3.10629 10.675 4.05004 12 5.39379 12H5.40004ZM5.02504 25.5C5.02504 26.3312 5.69379 27 6.52504 27H25.525C26.3563 27 27.025 26.3312 27.025 25.5V23H5.02504V25.5Z"})),ht=r=>B.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...r},B.createElement("path",{d:"M14.7688 8.45C15.5563 7.80625 16.7125 7.85625 17.4438 8.5875L25.4438 16.5875C26.0188 17.1625 26.1875 18.0188 25.875 18.7688C25.5625 19.5188 24.8375 20 24.0313 20H8.03127C7.22502 20 6.49377 19.5125 6.18127 18.7625C5.86877 18.0125 6.04377 17.1563 6.61877 16.5875L14.6188 8.5875L14.7688 8.45Z"})),{Text:je}=w.Typography,dt=({className:r,children:e})=>{const{t}=G.useTranslation();return!e||e.trim()===""?null:m.jsxRuntimeExports.jsxs(w.Flex,{className:r,align:"center",gap:2,children:[m.jsxRuntimeExports.jsxs(w.Flex,{align:"center",gap:1,children:[m.jsxRuntimeExports.jsx(ft,{className:"text-primary-blue size-6"}),m.jsxRuntimeExports.jsx(je,{className:"text-primary-blue",size:"sm",weight:"semibold",children:t("layout.header.store")})]}),m.jsxRuntimeExports.jsx(je,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:e})]})},{Text:Ne}=w.Typography,pt=({name:r,role:e,imageUrl:t,items:i=[]})=>{const{md:s}=Ve.useBreakpoint();if(!r||r.trim()==="")return null;const n=m.jsxRuntimeExports.jsxs(w.Flex,{gap:1,direction:"vertical",children:[m.jsxRuntimeExports.jsx(Ne,{className:"text-primary-blue",size:"sm",weight:"semibold",children:r}),m.jsxRuntimeExports.jsx(Ne,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:e})]});return m.jsxRuntimeExports.jsxs(w.Flex,{align:"center",gap:2,children:[m.jsxRuntimeExports.jsx(w.Avatar,{src:t,alt:r,size:"sm"}),s&&n,m.jsxRuntimeExports.jsx(w.Dropdown,{classNames:{trigger:"size-6.5 p-0",content:"z-10 shadow-sm"},trigger:m.jsxRuntimeExports.jsx(ht,{className:"rotate-180"}),items:s?i:[{label:n,id:"user-name",type:"label"},{id:"separator-1",type:"separator"},...i]})]})},Fe=({className:r,children:e})=>{if(Array.isArray(e)&&e.length===0)return null;const t=e.filter(s=>s!==null),i=s=>s===t.length-1;return m.jsxRuntimeExports.jsx(w.Flex,{align:"center",gap:4,className:D.cn(r),children:t.map((s,n)=>m.jsxRuntimeExports.jsxs(Y.Fragment,{children:[s,i(n)?null:m.jsxRuntimeExports.jsx(Ke,{"data-slot":"separator",orientation:"vertical",decorative:!0,className:D.cn("shrink-0 bg-grays-macropay-05 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch")})]},n))})};Fe.disPlayName="Layout.Header.RightSide";const _=({className:r,...e})=>m.jsxRuntimeExports.jsx("header",{className:D.cn("sticky top-0 flex h-17 shrink-0 items-center justify-between gap-2 border-b border-gray-200 bg-white px-4 shadow-lg z-1",r),...e});_.LeftSide=ct;_.Store=dt;_.User=pt;_.RightSide=Fe;const gt=({className:r,children:e,...t})=>m.jsxRuntimeExports.jsx("div",{className:D.cn("flex w-full flex-1 flex-col px-0 md:px-4 pt-5 [&>div]:flex [&>div]:items-start [&>div]:justify-center [&>div>div]:w-full [&>div>div]:max-w-243",r),...t,children:m.jsxRuntimeExports.jsx("div",{className:"flex-1 rounded-lg bg-white p-4",children:e})}),mt=({className:r,...e})=>m.jsxRuntimeExports.jsx("footer",{className:D.cn("bottom-0 w-full px-6 py-4 text-center text-xs text-grays-macropay-05",r),...e}),xt={login:{btnLabel:"Iniciar sesión"}},yt={translation:{layout:{...xt,header:{store:"Centro"}},header:{signOut:"Cerrar Sesión",store:"Tienda",cashRegister:"Caja",roleName:"Vendedor",sessionExp:"Tu sesión está por expirar",continueSessionPrefix:"La sesión se cerrará automáticamente en",continueSessionSuffix:"segundos, confirma para continuar con la sesión"},common:{yes:"Si",accept:"Aceptar",no:"No",cancel:"Cancelar",send:"Enviar",save:"Guardar",name:"Nombre",names:"Nombre(s)",lastName:"Apellido paterno",secondName:"Apellido materno",street:"Calle",extNumber:"Número exterior",colony:"Colonia",CP:"Código postal",upload:"Cargar archivo",goBack:"Regresar",goForward:"Continuar",goToLoginButton:"Ir a login",search:"Buscar",htmlTitle:"Macropay HelpDesk",themedark:"Modo Oscuro",goToMenu:"Ir a menú",closeMenu:"Cerrar",step:"Paso {{value}}",changeCenter:"Cambiar centro",closeSession:"Cerrar sesión",yesForward:"Si, continuar",blackList:{title:"Verifica para continuar",message:"¿Estás seguro que deseas continuar?"},messageChangeCenter:"Regresarás al menú principal para cambiar el centro. ¿Estás seguro que deseas realizar esta acción? Perderás el flujo actual.",messageCloseSession:"¿Estás seguro que deseas cerrar la sesión de tu cuenta?"}}};S.use(lt).init({resources:{es:yt},lng:"es",interpolation:{escapeValue:!1}});const se=({children:r,loading:e,...t})=>{const i=s=>s===0?[0,6,0]:s===2?[0,-6,0]:0;return m.jsxRuntimeExports.jsx(ut,{i18n:S,children:m.jsxRuntimeExports.jsxs("main",{"data-slot":"sidebar-inset",className:"relative flex min-h-svh w-full flex-1 flex-col bg-grays-macropay-02",...t,children:[r,m.jsxRuntimeExports.jsx(w.AnimatePresence,{children:e&&m.jsxRuntimeExports.jsx(w.Root$3,{asChild:!0,children:m.jsxRuntimeExports.jsx(m.motion.div,{className:"position backdrop-blur-sm bg-white/30 absolute top-0 left-0 z-50 flex h-full w-full items-center justify-center",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:m.jsxRuntimeExports.jsx("div",{className:"flex gap-3",children:[0,1,2].map(s=>m.jsxRuntimeExports.jsx(m.motion.div,{className:`w-3 h-3 rounded-full ${s===1?"bg-primary-blue":"bg-grays-macropay-05"}`,animate:{y:s===1?[0,-8,0]:0,x:i(s)},transition:{duration:.8,repeat:1/0,ease:"easeInOut"}},s))})})})})]})})};se.Header=_;se.Content=gt;se.Footer=mt;exports.RootLayout=se;
|