@cc-openmrs/cc-esm-active-prescriptions 1.0.63 → 1.0.65
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/cc-openmrs-cc-esm-active-prescriptions-1.0.63.tgz +0 -0
- package/dist/177.js +2 -0
- package/dist/184.js +1 -2
- package/dist/197.js +1 -1
- package/dist/225.js +1 -1
- package/dist/237.js +2 -0
- package/dist/{606.js.LICENSE.txt → 237.js.LICENSE.txt} +2 -2
- package/dist/300.js +1 -1
- package/dist/31.js +2 -0
- package/dist/{68.js.LICENSE.txt → 31.js.LICENSE.txt} +2 -2
- package/dist/311.js +2 -1
- package/dist/{184.js.LICENSE.txt → 311.js.LICENSE.txt} +37 -0
- package/dist/319.js +1 -1
- package/dist/335.js +1 -1
- package/dist/41.js +1 -1
- package/dist/422.js +1 -2
- package/dist/437.js +1 -0
- package/dist/533.js +1 -0
- package/dist/537.js +1 -1
- package/dist/540.js +1 -1
- package/dist/55.js +1 -1
- package/dist/606.js +1 -2
- package/dist/618.js +2 -0
- package/dist/618.js.LICENSE.txt +9 -0
- package/dist/635.js +1 -1
- package/dist/647.js +2 -0
- package/dist/647.js.LICENSE.txt +9 -0
- package/dist/652.js +1 -1
- package/dist/679.js +1 -1
- package/dist/692.js +1 -1
- package/dist/761.js +2 -0
- package/dist/761.js.LICENSE.txt +29 -0
- package/dist/875.js +2 -0
- package/dist/875.js.LICENSE.txt +5 -0
- package/dist/961.js +1 -1
- package/dist/966.js +1 -1
- package/dist/99.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +2 -2
- package/dist/openmrs-esm-template-app.js +1 -1
- package/dist/openmrs-esm-template-app.js.buildmanifest.json +221 -166
- package/dist/routes.json +1 -1
- package/package.json +26 -47
- package/src/carbon-react.d.ts +9 -0
- package/src/index.ts +6 -30
- package/src/prescriptions-actions/prescriptions-action-button.component.tsx +10 -8
- package/dist/279.js +0 -2
- package/dist/279.js.LICENSE.txt +0 -14
- package/dist/353.js +0 -1
- package/dist/499.js +0 -1
- package/dist/68.js +0 -2
- package/dist/845.js +0 -1
- package/dist/866.js +0 -2
- package/dist/866.js.LICENSE.txt +0 -30
- package/dist/993.js +0 -1
- package/src/prescriptions-actions/prescriptions-action-menu-item.component.tsx +0 -29
- package/src/prescriptions-actions/prescriptions-action-menu-item.scss +0 -12
- /package/dist/{422.js.LICENSE.txt → 177.js.LICENSE.txt} +0 -0
package/dist/606.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[225,606],{8493(e,t,n){var r=n(6072),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=r.useState,a=r.useEffect,u=r.useLayoutEffect,d=r.useDebugValue;function o(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=s({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return u(function(){i.value=n,i.getSnapshot=t,o(i)&&c({inst:i})},[e,n,t]),a(function(){return o(i)&&c({inst:i}),e(function(){o(i)&&c({inst:i})})},[e]),d(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},9888(e,t,n){e.exports=n(8493)},4225(e,t,n){n.r(t),n.d(t,{default:()=>c,immutable:()=>o});var r=n(6072),i=n(9888),s=n(8465);const a=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),u={dedupe:!0};s.OBJECT.defineProperty(s.SWRConfig,"defaultValue",{value:s.defaultConfig});const d=(0,s.withArgs)((e,t,n)=>{const{cache:d,compare:o,suspense:c,fallbackData:l,revalidateOnMount:f,revalidateIfStale:E,refreshInterval:g,refreshWhenHidden:v,refreshWhenOffline:h,keepPreviousData:p}=n,[R,S,_,U]=s.SWRGlobalState.get(d),[m,b]=(0,s.serialize)(e),T=(0,r.useRef)(!1),V=(0,r.useRef)(!1),w=(0,r.useRef)(m),C=(0,r.useRef)(t),O=(0,r.useRef)(n),y=()=>O.current,L=()=>y().isVisible()&&y().isOnline(),[I,k,D,A]=(0,s.createCacheHelper)(d,m),N=(0,r.useRef)({}).current,F=(0,s.isUndefined)(l)?n.fallback[m]:l,P=(e,t)=>{for(const n in N){const r=n;if("data"===r){if(!o(e[r],t[r])){if(!(0,s.isUndefined)(e[r]))return!1;if(!o(z,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},j=(0,r.useMemo)(()=>{const e=!!m&&!!t&&((0,s.isUndefined)(f)?!y().isPaused()&&!c&&(!!(0,s.isUndefined)(E)||E):f),n=t=>{const n=(0,s.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=I(),i=A(),a=n(r),u=r===i?a:n(i);let d=a;return[()=>{const e=n(I());return P(e,d)?(d.data=e.data,d.isLoading=e.isLoading,d.isValidating=e.isValidating,d.error=e.error,d):(d=e,e)},()=>u]},[d,m]),x=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>D(m,(t,n)=>{P(n,t)||e()}),[d,m]),j[0],j[1]),M=!T.current,W=R[m]&&R[m].length>0,G=x.data,H=(0,s.isUndefined)(G)?F:G,Y=x.error,q=(0,r.useRef)(H),z=p?(0,s.isUndefined)(G)?q.current:G:H,B=!(W&&!(0,s.isUndefined)(Y))&&(M&&!(0,s.isUndefined)(f)?f:!y().isPaused()&&(c?!(0,s.isUndefined)(H)&&E:(0,s.isUndefined)(H)||E)),J=!!(m&&t&&M&&B),K=(0,s.isUndefined)(x.isValidating)?J:x.isValidating,Q=(0,s.isUndefined)(x.isLoading)?J:x.isLoading,X=(0,r.useCallback)(async e=>{const t=C.current;if(!m||!t||V.current||y().isPaused())return!1;let r,i,a=!0;const u=e||{},d=!_[m]||!u.dedupe,c=()=>s.IS_REACT_LEGACY?!V.current&&m===w.current&&T.current:m===w.current,l={isValidating:!1,isLoading:!1},f=()=>{k(l)},E=()=>{const e=_[m];e&&e[1]===i&&delete _[m]},g={isValidating:!0};(0,s.isUndefined)(I().data)&&(g.isLoading=!0);try{if(d&&(k(g),n.loadingTimeout&&(0,s.isUndefined)(I().data)&&setTimeout(()=>{a&&c()&&y().onLoadingSlow(m,n)},n.loadingTimeout),_[m]=[t(b),(0,s.getTimestamp)()]),[r,i]=_[m],r=await r,d&&setTimeout(E,n.dedupingInterval),!_[m]||_[m][1]!==i)return d&&c()&&y().onDiscarded(m),!1;l.error=s.UNDEFINED;const e=S[m];if(!(0,s.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),d&&c()&&y().onDiscarded(m),!1;const u=I().data;l.data=o(u,r)?u:r,d&&c()&&y().onSuccess(r,m,n)}catch(e){E();const t=y(),{shouldRetryOnError:n}=t;t.isPaused()||(l.error=e,d&&c()&&(t.onError(e,m,t),(!0===n||(0,s.isFunction)(n)&&n(e))&&(y().revalidateOnFocus&&y().revalidateOnReconnect&&!L()||t.onErrorRetry(e,m,t,e=>{const t=R[m];t&&t[0]&&t[0](s.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0}))))}return a=!1,f(),!0},[m,d]),Z=(0,r.useCallback)((...e)=>(0,s.internalMutate)(d,w.current,...e),[]);if((0,s.useIsomorphicLayoutEffect)(()=>{C.current=t,O.current=n,(0,s.isUndefined)(G)||(q.current=G)}),(0,s.useIsomorphicLayoutEffect)(()=>{if(!m)return;const e=X.bind(s.UNDEFINED,u);let t=0;const n=(0,s.subscribeCallback)(m,R,(n,r={})=>{if(n==s.revalidateEvents.FOCUS_EVENT){const n=Date.now();y().revalidateOnFocus&&n>t&&L()&&(t=n+y().focusThrottleInterval,e())}else if(n==s.revalidateEvents.RECONNECT_EVENT)y().revalidateOnReconnect&&L()&&e();else{if(n==s.revalidateEvents.MUTATE_EVENT)return X();if(n==s.revalidateEvents.ERROR_REVALIDATE_EVENT)return X(r)}});return V.current=!1,w.current=m,T.current=!0,k({_k:b}),B&&((0,s.isUndefined)(H)||s.IS_SERVER?e():(0,s.rAF)(e)),()=>{V.current=!0,n()}},[m]),(0,s.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,s.isFunction)(g)?g(I().data):g;t&&-1!==e&&(e=setTimeout(n,t))}function n(){I().error||!v&&!y().isVisible()||!h&&!y().isOnline()?t():X(u).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,v,h,m]),(0,r.useDebugValue)(z),c&&(0,s.isUndefined)(H)&&m){if(!s.IS_REACT_LEGACY&&s.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");C.current=t,O.current=n,V.current=!1;const e=U[m];if(!(0,s.isUndefined)(e)){const t=Z(e);a(t)}if(!(0,s.isUndefined)(Y))throw Y;{const e=X(u);(0,s.isUndefined)(z)||(e.status="fulfilled",e.value=!0),a(e)}}return{mutate:Z,get data(){return N.data=!0,z},get error(){return N.error=!0,Y},get isValidating(){return N.isValidating=!0,K},get isLoading(){return N.isLoading=!0,Q}}}),o=e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)),c=(0,s.withMiddleware)(d,o)}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[225,606],{4225:(e,c,a)=>{a.r(c),a.d(c,{default:()=>i,immutable:()=>r});var s=a(2177),t=a(4993);const r=e=>(c,a,s)=>(s.revalidateOnFocus=!1,s.revalidateIfStale=!1,s.revalidateOnReconnect=!1,s.refreshInterval=0,e(c,a,s)),i=(0,t.Ht)(s.Ay,r)}}]);
|
package/dist/618.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 618.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[237,618,647],{428:(e,r,t)=>{"use strict";t.d(r,{A:()=>c});const n={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var s=t(5556),o=t.n(s),a=t(6072),i=t.n(a);const c=(0,a.forwardRef)(function({className:e,children:r,tabIndex:t,xmlns:s="http://www.w3.org/2000/svg",preserveAspectRatio:o="xMidYMid meet",...a},c){const{tabindex:p,...l}=function({width:e,height:r,viewBox:t=`0 0 ${e} ${r}`,...s}={}){const{tabindex:o,...a}=s,i={...n,...a,width:e,height:r,viewBox:t};return i["aria-label"]||i["aria-labelledby"]?(i.role="img",null!=o&&(i.focusable="true",i.tabindex=o)):i["aria-hidden"]=!0,i}({...a,tabindex:t}),u=l;return e&&(u.className=e),null!=p&&(u.tabIndex="number"==typeof p?p:Number(t)),c&&(u.ref=c),s&&(u.xmlns=s),o&&(u.preserveAspectRatio=o),i().createElement("svg",u,r)});c.displayName="Icon",c.propTypes={"aria-hidden":o().oneOfType([o().bool,o().oneOf(["true","false"])]),"aria-label":o().string,"aria-labelledby":o().string,children:o().node,className:o().string,height:o().oneOfType([o().number,o().string]),preserveAspectRatio:o().string,tabIndex:o().oneOfType([o().number,o().string]),viewBox:o().string,width:o().oneOfType([o().number,o().string]),xmlns:o().string}},1020:(e,r,t)=>{"use strict";var n=t(6072),s=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function p(e,r,t){var n,o={},p=null,l=null;for(n in void 0!==t&&(p=""+t),void 0!==r.key&&(p=""+r.key),void 0!==r.ref&&(l=r.ref),r)a.call(r,n)&&!c.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:s,type:e,key:p,ref:l,props:o,_owner:i.current}}r.Fragment=o,r.jsx=p,r.jsxs=p},2694:(e,r,t)=>{"use strict";var n=t(6925);function s(){}function o(){}o.resetWarningCache=s,e.exports=function(){function e(e,r,t,s,o,a){if(a!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:o,resetWarningCache:s};return t.PropTypes=t,t}},4848:(e,r,t)=>{"use strict";e.exports=t(1020)},5556:(e,r,t)=>{e.exports=t(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);
|
package/dist/635.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[635],{2635(e,t,s){s.d(t,{Ay:()=>q,Rm:()=>R});const i=e=>"string"==typeof e,o=()=>{let e,t;const s=new Promise((s,i)=>{e=s,t=i});return s.resolve=e,s.reject=t,s},n=e=>null==e?"":""+e,a=/###/g,r=e=>e&&e.indexOf("###")>-1?e.replace(a,"."):e,l=e=>!e||i(e),c=(e,t,s)=>{const o=i(t)?t.split("."):t;let n=0;for(;n<o.length-1;){if(l(e))return{};const t=r(o[n]);!e[t]&&s&&(e[t]=new s),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++n}return l(e)?{}:{obj:e,k:r(o[n])}},h=(e,t,s)=>{const{obj:i,k:o}=c(e,t,Object);if(void 0!==i||1===t.length)return void(i[o]=s);let n=t[t.length-1],a=t.slice(0,t.length-1),r=c(e,a,Object);for(;void 0===r.obj&&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),r=c(e,a,Object),r?.obj&&void 0!==r.obj[`${r.k}.${n}`]&&(r.obj=void 0);r.obj[`${r.k}.${n}`]=s},p=(e,t)=>{const{obj:s,k:i}=c(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},u=(e,t,s)=>{for(const o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?i(e[o])||e[o]instanceof String||i(t[o])||t[o]instanceof String?s&&(e[o]=t[o]):u(e[o],t[o],s):e[o]=t[o]);return e},g=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var d={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const f=e=>i(e)?e.replace(/[&<>"'\/]/g,e=>d[e]):e,m=[" ",",","?","!",";"],y=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}(20),x=(e,t,s=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const i=t.split(s);let o=e;for(let e=0;e<i.length;){if(!o||"object"!=typeof o)return;let t,n="";for(let a=e;a<i.length;++a)if(a!==e&&(n+=s),n+=i[a],t=o[n],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<i.length-1)continue;e+=a-e+1;break}o=t}return o},b=e=>e?.replace(/_/g,"-"),v={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class k{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||v,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,s,o){return o&&!this.debug?null:(i(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new k(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new k(this.logger,e)}}var S=new k;class O{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const s=this.observers[e].get(t)||0;this.observers[e].set(t,s+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,s])=>{for(let i=0;i<s;i++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s.apply(s,[e,...t])})}}class L extends O{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,o={}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;e.indexOf(".")>-1?r=e.split("."):(r=[e,t],s&&(Array.isArray(s)?r.push(...s):i(s)&&n?r.push(...s.split(n)):r.push(s)));const l=p(this.data,r);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=r[0],t=r[1],s=r.slice(2).join(".")),!l&&a&&i(s)?x(this.data?.[e]?.[t],s,n):l}addResource(e,t,s,i,o={silent:!1}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];s&&(a=a.concat(n?s.split(n):s)),e.indexOf(".")>-1&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),h(this.data,a,i),o.silent||this.emit("added",e,t,s,i)}addResources(e,t,s,o={silent:!1}){for(const o in s)(i(s[o])||Array.isArray(s[o]))&&this.addResource(e,t,o,s[o],{silent:!0});o.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,o,n={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),i=s,s=t,t=a[1]),this.addNamespaces(t);let r=p(this.data,a)||{};n.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?u(r,s,o):r={...r,...s},h(this.data,a,r),n.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var w={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,o){return e.forEach(e=>{t=this.processors[e]?.process(t,s,i,o)??t}),t}};const $=Symbol("i18next/PATH_KEY");function R(e,t){const{[$]:s}=e(function(){const e=[],t=Object.create(null);let s;return t.get=(i,o)=>(s?.revoke?.(),o===$?e:(e.push(o),s=Proxy.revocable(i,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}()),i=t?.keySeparator??".",o=t?.nsSeparator??":";if(s.length>1&&o){const e=t?.ns;if((e?Array.isArray(e)?e:[e]:[]).includes(s[0]))return`${s[0]}${o}${s.slice(1).join(i)}`}return s.join(i)}const C={},P=e=>!i(e)&&"boolean"!=typeof e&&"number"!=typeof e;class j extends O{constructor(e,t={}){var s,i;super(),s=e,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{s[e]&&(i[e]=s[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=S.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const s={...t};if(null==e)return!1;const i=this.resolve(e,s);if(void 0===i?.res)return!1;const o=P(i.res);return!1!==s.returnObjects||!o}extractFromKey(e,t){let s=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===s&&(s=":");const o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,r=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,s)=>{t=t||"",s=s||"";const i=m.filter(e=>t.indexOf(e)<0&&s.indexOf(e)<0);if(0===i.length)return!0;const o=y.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`);let n=!o.test(e);if(!n){const t=e.indexOf(s);t>0&&!o.test(e.substring(0,t))&&(n=!0)}return n})(e,s,o));if(a&&!r){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i(n)?[n]:n};const a=e.split(s);(s!==o||s===o&&this.options.ns.indexOf(a[0])>-1)&&(n=a.shift()),e=a.join(o)}return{key:e,namespaces:i(n)?[n]:n}}translate(e,t,s){let o="object"==typeof t?{...t}:t;if("object"!=typeof o&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof o&&(o={...o}),o||(o={}),null==e)return"";"function"==typeof e&&(e=R(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?R(e,{...this.options,...o}):String(e));const n=void 0!==o.returnDetails?o.returnDetails:this.options.returnDetails,a=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,{key:r,namespaces:l}=this.extractFromKey(e[e.length-1],o),c=l[l.length-1];let h=void 0!==o.nsSeparator?o.nsSeparator:this.options.nsSeparator;void 0===h&&(h=":");const p=o.lng||this.language,u=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===p?.toLowerCase())return u?n?{res:`${c}${h}${r}`,usedKey:r,exactUsedKey:r,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${h}${r}`:n?{res:r,usedKey:r,exactUsedKey:r,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:r;const g=this.resolve(e,o);let d=g?.res;const f=g?.usedKey||r,m=g?.exactUsedKey||r,y=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==o.count&&!i(o.count),v=j.hasDefaultValue(o),k=b?this.pluralResolver.getSuffix(p,o.count,o):"",S=o.ordinal&&b?this.pluralResolver.getSuffix(p,o.count,{ordinal:!1}):"",O=b&&!o.ordinal&&0===o.count,L=O&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${k}`]||o[`defaultValue${S}`]||o.defaultValue;let w=d;x&&!d&&v&&(w=L);const $=P(w),C=Object.prototype.toString.apply(w);if(!(x&&w&&$&&["[object Number]","[object Function]","[object RegExp]"].indexOf(C)<0)||i(y)&&Array.isArray(w))if(x&&i(y)&&Array.isArray(d))d=d.join(y),d&&(d=this.extendTranslation(d,e,o,s));else{let t=!1,i=!1;!this.isValidLookup(d)&&v&&(t=!0,d=L),this.isValidLookup(d)||(i=!0,d=r);const n=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:d,l=v&&L!==d&&this.options.updateMissing;if(i||t||l){if(this.logger.log(l?"updateKey":"missingKey",p,c,r,l?L:d),a){const e=this.resolve(r,{...o,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let s=0;s<t.length;s++)e.push(t[s]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(o.lng||this.language):e.push(o.lng||this.language);const s=(e,t,s)=>{const i=v&&s!==d?s:n;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,t,i,l,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,c,t,i,l,o),this.emit("missingKey",e,c,t,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,o);O&&o[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{s([e],r+t,o[`defaultValue${t}`]||L)})}):s(e,r,L))}d=this.extendTranslation(d,e,o,g,s),i&&d===r&&this.options.appendNamespaceToMissingKey&&(d=`${c}${h}${r}`),(i||t)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${h}${r}`:r,t?d:void 0,o))}else{if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,w,{...o,ns:l}):`key '${r} (${this.language})' returned an object instead of string.`;return n?(g.res=e,g.usedParams=this.getUsedParamsDetails(o),g):e}if(a){const e=Array.isArray(w),t=e?[]:{},s=e?m:f;for(const e in w)if(Object.prototype.hasOwnProperty.call(w,e)){const i=`${s}${a}${e}`;t[e]=v&&!d?this.translate(i,{...o,defaultValue:P(L)?L[e]:void 0,joinArrays:!1,ns:l}):this.translate(i,{...o,joinArrays:!1,ns:l}),t[e]===i&&(t[e]=w[e])}d=t}}return n?(g.res=d,g.usedParams=this.getUsedParamsDetails(o),g):d}extendTranslation(e,t,s,o,n){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const a=i(e)&&(void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let r;if(a){const t=e.match(this.interpolator.nestingRegexp);r=t&&t.length}let l=s.replace&&!i(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,s.lng||this.language||o.usedLng,s),a){const t=e.match(this.interpolator.nestingRegexp);r<(t&&t.length)&&(s.nest=!1)}!s.lng&&o&&o.res&&(s.lng=this.language||o.usedLng),!1!==s.nest&&(e=this.interpolator.nest(e,(...e)=>n?.[0]!==e[0]||s.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),s)),s.interpolation&&this.interpolator.reset()}const a=s.postProcess||this.options.postProcess,r=i(a)?[a]:a;return null!=e&&r?.length&&!1!==s.applyPostProcessor&&(e=w.handle(r,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,o,n,a,r;return i(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?R(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(s))return;const l=this.extractFromKey(e,t),c=l.key;o=c;let h=l.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const p=void 0!==t.count&&!i(t.count),u=p&&!t.ordinal&&0===t.count,g=void 0!==t.context&&(i(t.context)||"number"==typeof t.context)&&""!==t.context,d=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(e=>{this.isValidLookup(s)||(r=e,C[`${d[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(r)||(C[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${o}" for languages "${d.join(", ")}" won't get resolved as namespace "${r}" 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!!!")),d.forEach(i=>{if(this.isValidLookup(s))return;a=i;const o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,i,e,t);else{let e;p&&(e=this.pluralResolver.getSuffix(i,t.count,t));const s=`${this.options.pluralSeparator}zero`,n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&0===e.indexOf(n)&&o.push(c+e.replace(n,this.options.pluralSeparator)),o.push(c+e),u&&o.push(c+s)),g){const i=`${c}${this.options.contextSeparator||"_"}${t.context}`;o.push(i),p&&(t.ordinal&&0===e.indexOf(n)&&o.push(i+e.replace(n,this.options.pluralSeparator)),o.push(i+e),u&&o.push(i+s))}}let r;for(;r=o.pop();)this.isValidLookup(s)||(n=r,s=this.getResource(i,e,r,t))}))})}),{res:s,usedKey:o,exactUsedKey:n,usedLng:a,usedNS:r}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!i(e.replace);let o=s?e.replace:e;if(s&&void 0!==e.count&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!s){o={...o};for(const e of t)delete o[e]}return o}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class N{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=S.create("languageUtils")}getScriptPartFromCode(e){if(!(e=b(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=b(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(i(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}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("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const s=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(s)||(t=s)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const s=this.getScriptPartFromCode(e);if(this.isSupportedCode(s))return t=s;const i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),i(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),o=[],n=e=>{e&&(this.isSupportedCode(e)?o.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return i(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&n(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&n(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&n(this.getLanguagePartFromCode(e))):i(e)&&n(this.formatLanguageCode(e)),s.forEach(e=>{o.indexOf(e)<0&&n(this.formatLanguageCode(e))}),o}}const E={zero:0,one:1,two:2,few:3,many:4,other:5},F={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class T{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=S.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=b("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:s,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let n;try{n=new Intl.PluralRules(s,{type:i})}catch(s){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),F;if(!e.match(/-|_/))return F;const i=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(i,t)}return this.pluralRulesCache[o]=n,n}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((e,t)=>E[e]-E[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,s={}){const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const I=(e,t,s,o=".",n=!0)=>{let a=((e,t,s)=>{const i=p(e,s);return void 0!==i?i:p(t,s)})(e,t,s);return!a&&n&&i(s)&&(a=x(e,s,o),void 0===a&&(a=x(t,s,o))),a},V=e=>e.replace(/\$/g,"$$$$");class D{constructor(e={}){this.logger=S.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:o,prefixEscaped:n,suffix:a,suffixEscaped:r,formatSeparator:l,unescapeSuffix:c,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:u,nestingSuffix:d,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:x,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:f,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=o?g(o):n||"{{",this.suffix=a?g(a):r||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=p?g(p):u||g("$t("),this.nestingSuffix=d?g(d):m||g(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=x||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"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,s,o){let a,r,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=e=>{if(e.indexOf(this.formatSeparator)<0){const i=I(t,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,s,{...o,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),n=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(I(t,c,n,this.options.keySeparator,this.options.ignoreJSONStructure),a,s,{...o,...t,interpolationkey:n})};this.resetRegExp();const p=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==o?.interpolation?.skipOnVariables?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>V(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?V(this.escape(e)):V(e)}].forEach(t=>{for(l=0;a=t.regex.exec(e);){const s=a[1].trim();if(r=h(s),void 0===r)if("function"==typeof p){const t=p(e,a,o);r=i(t)?t:""}else if(o&&Object.prototype.hasOwnProperty.call(o,s))r="";else{if(u){r=a[0];continue}this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),r=""}else i(r)||this.useRawValueToEscape||(r=n(r));const c=t.safeValue(r);if(e=e.replace(a[0],c),u?(t.regex.lastIndex+=r.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,s={}){let o,a,r;const l=(e,t)=>{const s=this.nestingOptionsSeparator;if(e.indexOf(s)<0)return e;const i=e.split(new RegExp(`${g(s)}[ ]*{`));let o=`{${i[1]}`;e=i[0],o=this.interpolate(o,r);const n=o.match(/'/g),a=o.match(/"/g);((n?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(o=o.replace(/'/g,'"'));try{r=JSON.parse(o),t&&(r={...t,...r})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${o}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};for(;o=this.nestingRegexp.exec(e);){let c=[];r={...s},r=r.replace&&!i(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;const h=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(-1!==h&&(c=o[1].slice(h).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),o[1]=o[1].slice(0,h)),a=t(l.call(this,o[1].trim(),r),r),a&&o[0]===e&&!i(a))return a;i(a)||(a=n(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),c.length&&(a=c.reduce((e,t)=>this.format(e,t,s.lng,{...s,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const A=e=>{const t={};return(s,i,o)=>{let n=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(n={...n,[o.interpolationkey]:void 0});const a=i+JSON.stringify(n);let r=t[a];return r||(r=e(b(i),o),t[a]=r),r(s)}},K=e=>(t,s,i)=>e(b(s),i)(t);class U{constructor(e={}){this.logger=S.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?A:K;this.formats={number:s((e,t)=>{const s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:s((e,t)=>{const s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:s((e,t)=>{const s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:s((e,t)=>{const s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:s((e,t)=>{const s=new Intl.ListFormat(e,{...t});return e=>s.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=A(t)}format(e,t,s,i={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{const{formatName:o,formatOptions:n}=(e=>{let t=e.toLowerCase().trim();const s={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const o=i[1].substring(0,i[1].length-1);"currency"===t&&o.indexOf(":")<0?s.currency||(s.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?s.range||(s.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...i]=e.split(":"),o=i.join(":").trim().replace(/^'+|'+$/g,""),n=t.trim();s[n]||(s[n]=o),"false"===o&&(s[n]=!1),"true"===o&&(s[n]=!0),isNaN(o)||(s[n]=parseInt(o,10))}})}return{formatName:t,formatOptions:s}})(t);if(this.formats[o]){let t=e;try{const a=i?.formatParams?.[i.interpolationkey]||{},r=a.locale||a.lng||i.locale||i.lng||s;t=this.formats[o](e,r,{...n,...i,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class M extends O{constructor(e,t,s,i={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=S.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(e,t,s,i){const o={},n={},a={},r={};return e.forEach(e=>{let i=!0;t.forEach(t=>{const a=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===n[a]&&(n[a]=!0):(this.state[a]=1,i=!1,void 0===n[a]&&(n[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===r[t]&&(r[t]=!0)))}),i||(a[e]=!0)}),(Object.keys(o).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(n),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(r)}}loaded(e,t,s){const i=e.split("|"),o=i[0],n=i[1];t&&this.emit("failedLoading",o,n,t),!t&&s&&this.store.addResourceBundle(o,n,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const a={};this.queue.forEach(s=>{((e,t,s)=>{const{obj:i,k:o}=c(e,t,Object);i[o]=i[o]||[],i[o].push(s)})(s.loaded,[o],n),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(s,e),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(e=>{a[e]||(a[e]={});const t=s.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,s,i=0,o=this.retryTimeout,n){if(!e.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:o,callback:n});this.readingCalls++;const a=(a,r)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&r&&i<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,s,i+1,2*o,n)},o):n(a,r)},r=this.backend[s].bind(this.backend);if(2!==r.length)return r(e,t,a);try{const s=r(e,t);s&&"function"==typeof s.then?s.then(e=>a(null,e)).catch(a):a(null,s)}catch(e){a(e)}}prepareLoading(e,t,s={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();i(e)&&(e=this.languageUtils.toResolveHierarchy(e)),i(t)&&(t=[t]);const n=this.queueLoad(e,t,s,o);if(!n.toLoad.length)return n.pending.length||o(),null;n.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),i=s[0],o=s[1];this.read(i,o,"read",void 0,void 0,(s,n)=>{s&&this.logger.warn(`${t}loading namespace ${o} for language ${i} failed`,s),!s&&n&&this.logger.log(`${t}loaded namespace ${o} for language ${i}`,n),this.loaded(e,s,n)})}saveMissing(e,t,s,i,o,n={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=s&&""!==s){if(this.backend?.create){const r={...n,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,s,i,r):l(e,t,s,i),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,s,i,a,r)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}else this.logger.warn(`did not save key "${s}" 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!!!")}}const z=()=>({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:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),i(e[1])&&(t.defaultValue=e[1]),i(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const s=e[3]||e[2];Object.keys(s).forEach(e=>{t[e]=s[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),H=e=>(i(e.ns)&&(e.ns=[e.ns]),i(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),i(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),_=()=>{},B="__i18next_supportNoticeShown";class J extends O{constructor(e={},t){var s;if(super(),this.options=H(e),this.services={},this.logger=S,this.modules={external:[]},s=this,Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(e=>{"function"==typeof s[e]&&(s[e]=s[e].bind(s))}),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,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(i(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=z();var n;this.options={...s,...this.options,...H(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(n=this,n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(e=>e?.projectId))||"undefined"!=typeof globalThis&&globalThis[B]||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[B]=!0));const a=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?S.init(a(this.modules.logger),this.options):S.init(null,this.options),e=this.modules.formatter?this.modules.formatter:U;const t=new N(this.options);this.store=new L(this.options.resources,this.options);const i=this.services;i.logger=S,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new T(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.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"),!e||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(i.formatter=a(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new D(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new M(a(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=a(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=a(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new j(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=_),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const r=o(),l=()=>{const e=(e,s)=>{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),r.resolve(s),t(e,s)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),r}loadResources(e,t=_){let s=t;const o=i(e)?e:this.language;if("function"==typeof e&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===o?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return s();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};o?t(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),s(e)})}else s(null)}reloadResources(e,t,s){const i=o();return"function"==typeof e&&(s=e,e=void 0),"function"==typeof t&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=_),this.services.backendConnector.reload(e,t,e=>{i.resolve(),s(e)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&w.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;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 s=o();this.emit("languageChanging",e);const n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(i,o)=>{o?this.isLanguageChangingTo===e&&(n(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,s.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},r=t=>{e||t||!this.services.languageDetector||(t=[]);const s=i(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(s)?s:this.services.languageUtils.getBestMatchFromCodes(i(t)?[t]:t);o&&(this.language||n(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{a(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),s}getFixedT(e,t,s){const o=(e,t,...i)=>{let n;n="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},n.lng=n.lng||o.lng,n.lngs=n.lngs||o.lngs,n.ns=n.ns||o.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||s||o.keyPrefix);const a=this.options.keySeparator||".";let r;return n.keyPrefix&&Array.isArray(e)?r=e.map(e=>("function"==typeof e&&(e=R(e,{...this.options,...t})),`${n.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=R(e,{...this.options,...t})),r=n.keyPrefix?`${n.keyPrefix}${a}${e}`:e),this.t(r,n)};return i(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=s,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.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 s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const n=(e,t)=>{const s=this.services.backendConnector.state[`${e}|${t}`];return-1===s||0===s||2===s};if(t.precheck){const e=t.precheck(this,n);if(void 0!==e)return e}return!(!this.hasResourceBundle(s,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!n(s,e)||i&&!n(o,e)))}loadNamespaces(e,t){const s=o();return this.options.ns?(i(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=o();i(e)&&(e=[e]);const n=this.options.preload||[],a=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=n.concat(a),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new N(z());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const s=new J(e,t);return s.createInstance=J.createInstance,s}cloneInstance(e={},t=_){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},o=new J(i);if(void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},s){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((s,i)=>(s[i]={...e[t][i]},s),e[t]),e),{});o.store=new L(e,i),o.services.resourceStore=o.store}if(e.interpolation){const t={...z().interpolation,...this.options.interpolation,...e.interpolation},s={...i,interpolation:t};o.services.interpolator=new D(s)}return o.translator=new j(o.services,i),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(i,t),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const q=J.createInstance();q.createInstance,q.dir,q.init,q.loadResources,q.reloadResources,q.use,q.changeLanguage,q.getFixedT,q.t,q.exists,q.setDefaultNamespace,q.hasLoadedNamespace,q.loadNamespaces,q.loadLanguages}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[635],{2635:(e,t,s)=>{s.d(t,{Ay:()=>q,Rm:()=>R});const i=e=>"string"==typeof e,o=()=>{let e,t;const s=new Promise((s,i)=>{e=s,t=i});return s.resolve=e,s.reject=t,s},n=e=>null==e?"":""+e,a=/###/g,r=e=>e&&e.indexOf("###")>-1?e.replace(a,"."):e,l=e=>!e||i(e),c=(e,t,s)=>{const o=i(t)?t.split("."):t;let n=0;for(;n<o.length-1;){if(l(e))return{};const t=r(o[n]);!e[t]&&s&&(e[t]=new s),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++n}return l(e)?{}:{obj:e,k:r(o[n])}},h=(e,t,s)=>{const{obj:i,k:o}=c(e,t,Object);if(void 0!==i||1===t.length)return void(i[o]=s);let n=t[t.length-1],a=t.slice(0,t.length-1),r=c(e,a,Object);for(;void 0===r.obj&&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),r=c(e,a,Object),r?.obj&&void 0!==r.obj[`${r.k}.${n}`]&&(r.obj=void 0);r.obj[`${r.k}.${n}`]=s},p=(e,t)=>{const{obj:s,k:i}=c(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},u=(e,t,s)=>{for(const o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?i(e[o])||e[o]instanceof String||i(t[o])||t[o]instanceof String?s&&(e[o]=t[o]):u(e[o],t[o],s):e[o]=t[o]);return e},g=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var d={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const f=e=>i(e)?e.replace(/[&<>"'\/]/g,e=>d[e]):e,m=[" ",",","?","!",";"],y=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}(20),x=(e,t,s=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const i=t.split(s);let o=e;for(let e=0;e<i.length;){if(!o||"object"!=typeof o)return;let t,n="";for(let a=e;a<i.length;++a)if(a!==e&&(n+=s),n+=i[a],t=o[n],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<i.length-1)continue;e+=a-e+1;break}o=t}return o},b=e=>e?.replace(/_/g,"-"),v={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class k{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||v,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,s,o){return o&&!this.debug?null:(i(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new k(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new k(this.logger,e)}}var S=new k;class O{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const s=this.observers[e].get(t)||0;this.observers[e].set(t,s+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,s])=>{for(let i=0;i<s;i++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,i])=>{for(let o=0;o<i;o++)s.apply(s,[e,...t])})}}class L extends O{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,o={}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;e.indexOf(".")>-1?r=e.split("."):(r=[e,t],s&&(Array.isArray(s)?r.push(...s):i(s)&&n?r.push(...s.split(n)):r.push(s)));const l=p(this.data,r);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=r[0],t=r[1],s=r.slice(2).join(".")),!l&&a&&i(s)?x(this.data?.[e]?.[t],s,n):l}addResource(e,t,s,i,o={silent:!1}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];s&&(a=a.concat(n?s.split(n):s)),e.indexOf(".")>-1&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),h(this.data,a,i),o.silent||this.emit("added",e,t,s,i)}addResources(e,t,s,o={silent:!1}){for(const o in s)(i(s[o])||Array.isArray(s[o]))&&this.addResource(e,t,o,s[o],{silent:!0});o.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,o,n={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),i=s,s=t,t=a[1]),this.addNamespaces(t);let r=p(this.data,a)||{};n.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?u(r,s,o):r={...r,...s},h(this.data,a,r),n.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var w={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,o){return e.forEach(e=>{t=this.processors[e]?.process(t,s,i,o)??t}),t}};const $=Symbol("i18next/PATH_KEY");function R(e,t){const{[$]:s}=e(function(){const e=[],t=Object.create(null);let s;return t.get=(i,o)=>(s?.revoke?.(),o===$?e:(e.push(o),s=Proxy.revocable(i,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}()),i=t?.keySeparator??".",o=t?.nsSeparator??":";if(s.length>1&&o){const e=t?.ns,n=Array.isArray(e)?e:null;if(n&&n.length>1&&n.slice(1).includes(s[0]))return`${s[0]}${o}${s.slice(1).join(i)}`}return s.join(i)}const C={},P=e=>!i(e)&&"boolean"!=typeof e&&"number"!=typeof e;class N extends O{constructor(e,t={}){var s,i;super(),s=e,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{s[e]&&(i[e]=s[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=S.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const s={...t};if(null==e)return!1;const i=this.resolve(e,s);if(void 0===i?.res)return!1;const o=P(i.res);return!1!==s.returnObjects||!o}extractFromKey(e,t){let s=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===s&&(s=":");const o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,r=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,s)=>{t=t||"",s=s||"";const i=m.filter(e=>t.indexOf(e)<0&&s.indexOf(e)<0);if(0===i.length)return!0;const o=y.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`);let n=!o.test(e);if(!n){const t=e.indexOf(s);t>0&&!o.test(e.substring(0,t))&&(n=!0)}return n})(e,s,o));if(a&&!r){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:i(n)?[n]:n};const a=e.split(s);(s!==o||s===o&&this.options.ns.indexOf(a[0])>-1)&&(n=a.shift()),e=a.join(o)}return{key:e,namespaces:i(n)?[n]:n}}translate(e,t,s){let o="object"==typeof t?{...t}:t;if("object"!=typeof o&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof o&&(o={...o}),o||(o={}),null==e)return"";"function"==typeof e&&(e=R(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?R(e,{...this.options,...o}):String(e));const n=void 0!==o.returnDetails?o.returnDetails:this.options.returnDetails,a=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,{key:r,namespaces:l}=this.extractFromKey(e[e.length-1],o),c=l[l.length-1];let h=void 0!==o.nsSeparator?o.nsSeparator:this.options.nsSeparator;void 0===h&&(h=":");const p=o.lng||this.language,u=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===p?.toLowerCase())return u?n?{res:`${c}${h}${r}`,usedKey:r,exactUsedKey:r,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${h}${r}`:n?{res:r,usedKey:r,exactUsedKey:r,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:r;const g=this.resolve(e,o);let d=g?.res;const f=g?.usedKey||r,m=g?.exactUsedKey||r,y=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==o.count&&!i(o.count),v=N.hasDefaultValue(o),k=b?this.pluralResolver.getSuffix(p,o.count,o):"",S=o.ordinal&&b?this.pluralResolver.getSuffix(p,o.count,{ordinal:!1}):"",O=b&&!o.ordinal&&0===o.count,L=O&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${k}`]||o[`defaultValue${S}`]||o.defaultValue;let w=d;x&&!d&&v&&(w=L);const $=P(w),C=Object.prototype.toString.apply(w);if(!(x&&w&&$&&["[object Number]","[object Function]","[object RegExp]"].indexOf(C)<0)||i(y)&&Array.isArray(w))if(x&&i(y)&&Array.isArray(d))d=d.join(y),d&&(d=this.extendTranslation(d,e,o,s));else{let t=!1,i=!1;!this.isValidLookup(d)&&v&&(t=!0,d=L),this.isValidLookup(d)||(i=!0,d=r);const n=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:d,l=v&&L!==d&&this.options.updateMissing;if(i||t||l){if(this.logger.log(l?"updateKey":"missingKey",p,c,r,l?L:d),a){const e=this.resolve(r,{...o,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let s=0;s<t.length;s++)e.push(t[s]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(o.lng||this.language):e.push(o.lng||this.language);const s=(e,t,s)=>{const i=v&&s!==d?s:n;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,t,i,l,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,c,t,i,l,o),this.emit("missingKey",e,c,t,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,o);O&&o[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{s([e],r+t,o[`defaultValue${t}`]||L)})}):s(e,r,L))}d=this.extendTranslation(d,e,o,g,s),i&&d===r&&this.options.appendNamespaceToMissingKey&&(d=`${c}${h}${r}`),(i||t)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${h}${r}`:r,t?d:void 0,o))}else{if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,w,{...o,ns:l}):`key '${r} (${this.language})' returned an object instead of string.`;return n?(g.res=e,g.usedParams=this.getUsedParamsDetails(o),g):e}if(a){const e=Array.isArray(w),t=e?[]:{},s=e?m:f;for(const e in w)if(Object.prototype.hasOwnProperty.call(w,e)){const i=`${s}${a}${e}`;t[e]=v&&!d?this.translate(i,{...o,defaultValue:P(L)?L[e]:void 0,joinArrays:!1,ns:l}):this.translate(i,{...o,joinArrays:!1,ns:l}),t[e]===i&&(t[e]=w[e])}d=t}}return n?(g.res=d,g.usedParams=this.getUsedParamsDetails(o),g):d}extendTranslation(e,t,s,o,n){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const a=i(e)&&(void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let r;if(a){const t=e.match(this.interpolator.nestingRegexp);r=t&&t.length}let l=s.replace&&!i(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,s.lng||this.language||o.usedLng,s),a){const t=e.match(this.interpolator.nestingRegexp);r<(t&&t.length)&&(s.nest=!1)}!s.lng&&o&&o.res&&(s.lng=this.language||o.usedLng),!1!==s.nest&&(e=this.interpolator.nest(e,(...e)=>n?.[0]!==e[0]||s.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),s)),s.interpolation&&this.interpolator.reset()}const a=s.postProcess||this.options.postProcess,r=i(a)?[a]:a;return null!=e&&r?.length&&!1!==s.applyPostProcessor&&(e=w.handle(r,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,o,n,a,r;return i(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?R(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(s))return;const l=this.extractFromKey(e,t),c=l.key;o=c;let h=l.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const p=void 0!==t.count&&!i(t.count),u=p&&!t.ordinal&&0===t.count,g=void 0!==t.context&&(i(t.context)||"number"==typeof t.context)&&""!==t.context,d=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(e=>{this.isValidLookup(s)||(r=e,C[`${d[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(r)||(C[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${o}" for languages "${d.join(", ")}" won't get resolved as namespace "${r}" 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!!!")),d.forEach(i=>{if(this.isValidLookup(s))return;a=i;const o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,i,e,t);else{let e;p&&(e=this.pluralResolver.getSuffix(i,t.count,t));const s=`${this.options.pluralSeparator}zero`,n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&0===e.indexOf(n)&&o.push(c+e.replace(n,this.options.pluralSeparator)),o.push(c+e),u&&o.push(c+s)),g){const i=`${c}${this.options.contextSeparator||"_"}${t.context}`;o.push(i),p&&(t.ordinal&&0===e.indexOf(n)&&o.push(i+e.replace(n,this.options.pluralSeparator)),o.push(i+e),u&&o.push(i+s))}}let r;for(;r=o.pop();)this.isValidLookup(s)||(n=r,s=this.getResource(i,e,r,t))}))})}),{res:s,usedKey:o,exactUsedKey:n,usedLng:a,usedNS:r}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!i(e.replace);let o=s?e.replace:e;if(s&&void 0!==e.count&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!s){o={...o};for(const e of t)delete o[e]}return o}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class j{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=S.create("languageUtils")}getScriptPartFromCode(e){if(!(e=b(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=b(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(i(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}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("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const s=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(s)||(t=s)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const s=this.getScriptPartFromCode(e);if(this.isSupportedCode(s))return t=s;const i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),i(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),o=[],n=e=>{e&&(this.isSupportedCode(e)?o.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return i(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&n(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&n(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&n(this.getLanguagePartFromCode(e))):i(e)&&n(this.formatLanguageCode(e)),s.forEach(e=>{o.indexOf(e)<0&&n(this.formatLanguageCode(e))}),o}}const E={zero:0,one:1,two:2,few:3,many:4,other:5},T={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class F{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=S.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=b("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:s,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let n;try{n=new Intl.PluralRules(s,{type:i})}catch(s){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),T;if(!e.match(/-|_/))return T;const i=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(i,t)}return this.pluralRulesCache[o]=n,n}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((e,t)=>E[e]-E[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,s={}){const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const I=(e,t,s,o=".",n=!0)=>{let a=((e,t,s)=>{const i=p(e,s);return void 0!==i?i:p(t,s)})(e,t,s);return!a&&n&&i(s)&&(a=x(e,s,o),void 0===a&&(a=x(t,s,o))),a},V=e=>e.replace(/\$/g,"$$$$");class D{constructor(e={}){this.logger=S.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:o,prefixEscaped:n,suffix:a,suffixEscaped:r,formatSeparator:l,unescapeSuffix:c,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:u,nestingSuffix:d,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:x,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:f,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=o?g(o):n||"{{",this.suffix=a?g(a):r||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=p?g(p):u||g("$t("),this.nestingSuffix=d?g(d):m||g(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=x||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"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,s,o){let a,r,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=e=>{if(e.indexOf(this.formatSeparator)<0){const i=I(t,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,s,{...o,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),n=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(I(t,c,n,this.options.keySeparator,this.options.ignoreJSONStructure),a,s,{...o,...t,interpolationkey:n})};this.resetRegExp();const p=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==o?.interpolation?.skipOnVariables?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>V(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?V(this.escape(e)):V(e)}].forEach(t=>{for(l=0;a=t.regex.exec(e);){const s=a[1].trim();if(r=h(s),void 0===r)if("function"==typeof p){const t=p(e,a,o);r=i(t)?t:""}else if(o&&Object.prototype.hasOwnProperty.call(o,s))r="";else{if(u){r=a[0];continue}this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),r=""}else i(r)||this.useRawValueToEscape||(r=n(r));const c=t.safeValue(r);if(e=e.replace(a[0],c),u?(t.regex.lastIndex+=r.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,s={}){let o,a,r;const l=(e,t)=>{const s=this.nestingOptionsSeparator;if(e.indexOf(s)<0)return e;const i=e.split(new RegExp(`${g(s)}[ ]*{`));let o=`{${i[1]}`;e=i[0],o=this.interpolate(o,r);const n=o.match(/'/g),a=o.match(/"/g);((n?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(o=o.replace(/'/g,'"'));try{r=JSON.parse(o),t&&(r={...t,...r})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${o}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};for(;o=this.nestingRegexp.exec(e);){let c=[];r={...s},r=r.replace&&!i(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;const h=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(-1!==h&&(c=o[1].slice(h).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),o[1]=o[1].slice(0,h)),a=t(l.call(this,o[1].trim(),r),r),a&&o[0]===e&&!i(a))return a;i(a)||(a=n(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),c.length&&(a=c.reduce((e,t)=>this.format(e,t,s.lng,{...s,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const A=e=>{const t={};return(s,i,o)=>{let n=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(n={...n,[o.interpolationkey]:void 0});const a=i+JSON.stringify(n);let r=t[a];return r||(r=e(b(i),o),t[a]=r),r(s)}},K=e=>(t,s,i)=>e(b(s),i)(t);class U{constructor(e={}){this.logger=S.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?A:K;this.formats={number:s((e,t)=>{const s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:s((e,t)=>{const s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:s((e,t)=>{const s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:s((e,t)=>{const s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:s((e,t)=>{const s=new Intl.ListFormat(e,{...t});return e=>s.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=A(t)}format(e,t,s,i={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{const{formatName:o,formatOptions:n}=(e=>{let t=e.toLowerCase().trim();const s={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const o=i[1].substring(0,i[1].length-1);"currency"===t&&o.indexOf(":")<0?s.currency||(s.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?s.range||(s.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...i]=e.split(":"),o=i.join(":").trim().replace(/^'+|'+$/g,""),n=t.trim();s[n]||(s[n]=o),"false"===o&&(s[n]=!1),"true"===o&&(s[n]=!0),isNaN(o)||(s[n]=parseInt(o,10))}})}return{formatName:t,formatOptions:s}})(t);if(this.formats[o]){let t=e;try{const a=i?.formatParams?.[i.interpolationkey]||{},r=a.locale||a.lng||i.locale||i.lng||s;t=this.formats[o](e,r,{...n,...i,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class M extends O{constructor(e,t,s,i={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=S.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(e,t,s,i){const o={},n={},a={},r={};return e.forEach(e=>{let i=!0;t.forEach(t=>{const a=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===n[a]&&(n[a]=!0):(this.state[a]=1,i=!1,void 0===n[a]&&(n[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===r[t]&&(r[t]=!0)))}),i||(a[e]=!0)}),(Object.keys(o).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(n),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(r)}}loaded(e,t,s){const i=e.split("|"),o=i[0],n=i[1];t&&this.emit("failedLoading",o,n,t),!t&&s&&this.store.addResourceBundle(o,n,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const a={};this.queue.forEach(s=>{((e,t,s)=>{const{obj:i,k:o}=c(e,t,Object);i[o]=i[o]||[],i[o].push(s)})(s.loaded,[o],n),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(s,e),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(e=>{a[e]||(a[e]={});const t=s.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,s,i=0,o=this.retryTimeout,n){if(!e.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:o,callback:n});this.readingCalls++;const a=(a,r)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&r&&i<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,s,i+1,2*o,n)},o):n(a,r)},r=this.backend[s].bind(this.backend);if(2!==r.length)return r(e,t,a);try{const s=r(e,t);s&&"function"==typeof s.then?s.then(e=>a(null,e)).catch(a):a(null,s)}catch(e){a(e)}}prepareLoading(e,t,s={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();i(e)&&(e=this.languageUtils.toResolveHierarchy(e)),i(t)&&(t=[t]);const n=this.queueLoad(e,t,s,o);if(!n.toLoad.length)return n.pending.length||o(),null;n.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),i=s[0],o=s[1];this.read(i,o,"read",void 0,void 0,(s,n)=>{s&&this.logger.warn(`${t}loading namespace ${o} for language ${i} failed`,s),!s&&n&&this.logger.log(`${t}loaded namespace ${o} for language ${i}`,n),this.loaded(e,s,n)})}saveMissing(e,t,s,i,o,n={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=s&&""!==s){if(this.backend?.create){const r={...n,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,s,i,r):l(e,t,s,i),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,s,i,a,r)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}else this.logger.warn(`did not save key "${s}" 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!!!")}}const _=()=>({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:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),i(e[1])&&(t.defaultValue=e[1]),i(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const s=e[3]||e[2];Object.keys(s).forEach(e=>{t[e]=s[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),z=e=>(i(e.ns)&&(e.ns=[e.ns]),i(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),i(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),H=()=>{},B="__i18next_supportNoticeShown";class J extends O{constructor(e={},t){var s;if(super(),this.options=z(e),this.services={},this.logger=S,this.modules={external:[]},s=this,Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(e=>{"function"==typeof s[e]&&(s[e]=s[e].bind(s))}),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,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(i(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=_();var n;this.options={...s,...this.options,...z(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(n=this,n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(e=>e?.projectId))||"undefined"!=typeof globalThis&&globalThis[B]||"undefined"!=typeof process&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||"undefined"!=typeof process&&process.env||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[B]=!0));const a=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?S.init(a(this.modules.logger),this.options):S.init(null,this.options),e=this.modules.formatter?this.modules.formatter:U;const t=new j(this.options);this.store=new L(this.options.resources,this.options);const i=this.services;i.logger=S,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new F(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.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"),!e||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(i.formatter=a(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new D(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new M(a(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=a(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=a(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new N(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=H),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const r=o(),l=()=>{const e=(e,s)=>{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),r.resolve(s),t(e,s)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),r}loadResources(e,t=H){let s=t;const o=i(e)?e:this.language;if("function"==typeof e&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===o?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return s();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};o?t(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),s(e)})}else s(null)}reloadResources(e,t,s){const i=o();return"function"==typeof e&&(s=e,e=void 0),"function"==typeof t&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=H),this.services.backendConnector.reload(e,t,e=>{i.resolve(),s(e)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&w.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;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 s=o();this.emit("languageChanging",e);const n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(i,o)=>{o?this.isLanguageChangingTo===e&&(n(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,s.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},r=t=>{e||t||!this.services.languageDetector||(t=[]);const s=i(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(s)?s:this.services.languageUtils.getBestMatchFromCodes(i(t)?[t]:t);o&&(this.language||n(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{a(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),s}getFixedT(e,t,s){const o=(e,t,...i)=>{let n;n="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},n.lng=n.lng||o.lng,n.lngs=n.lngs||o.lngs,n.ns=n.ns||o.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||s||o.keyPrefix);const a={...this.options,...n};"function"==typeof n.keyPrefix&&(n.keyPrefix=R(n.keyPrefix,a));const r=this.options.keySeparator||".";let l;return n.keyPrefix&&Array.isArray(e)?l=e.map(e=>("function"==typeof e&&(e=R(e,a)),`${n.keyPrefix}${r}${e}`)):("function"==typeof e&&(e=R(e,a)),l=n.keyPrefix?`${n.keyPrefix}${r}${e}`:e),this.t(l,n)};return i(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=s,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.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 s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const n=(e,t)=>{const s=this.services.backendConnector.state[`${e}|${t}`];return-1===s||0===s||2===s};if(t.precheck){const e=t.precheck(this,n);if(void 0!==e)return e}return!(!this.hasResourceBundle(s,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!n(s,e)||i&&!n(o,e)))}loadNamespaces(e,t){const s=o();return this.options.ns?(i(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=o();i(e)&&(e=[e]);const n=this.options.preload||[],a=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=n.concat(a),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new j(_());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const s=new J(e,t);return s.createInstance=J.createInstance,s}cloneInstance(e={},t=H){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},o=new J(i);if(void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},s){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((s,i)=>(s[i]={...e[t][i]},s),e[t]),e),{});o.store=new L(e,i),o.services.resourceStore=o.store}if(e.interpolation){const t={..._().interpolation,...this.options.interpolation,...e.interpolation},s={...i,interpolation:t};o.services.interpolator=new D(s)}return o.translator=new N(o.services,i),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(i,t),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const q=J.createInstance();q.createInstance,q.dir,q.init,q.loadResources,q.reloadResources,q.use,q.changeLanguage,q.getFixedT,q.t,q.exists,q.setDefaultNamespace,q.hasLoadedNamespace,q.loadNamespaces,q.loadLanguages}}]);
|
package/dist/647.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 647.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[237,618,647],{428:(e,r,t)=>{"use strict";t.d(r,{A:()=>c});const n={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var s=t(5556),o=t.n(s),a=t(6072),i=t.n(a);const c=(0,a.forwardRef)(function({className:e,children:r,tabIndex:t,xmlns:s="http://www.w3.org/2000/svg",preserveAspectRatio:o="xMidYMid meet",...a},c){const{tabindex:p,...l}=function({width:e,height:r,viewBox:t=`0 0 ${e} ${r}`,...s}={}){const{tabindex:o,...a}=s,i={...n,...a,width:e,height:r,viewBox:t};return i["aria-label"]||i["aria-labelledby"]?(i.role="img",null!=o&&(i.focusable="true",i.tabindex=o)):i["aria-hidden"]=!0,i}({...a,tabindex:t}),u=l;return e&&(u.className=e),null!=p&&(u.tabIndex="number"==typeof p?p:Number(t)),c&&(u.ref=c),s&&(u.xmlns=s),o&&(u.preserveAspectRatio=o),i().createElement("svg",u,r)});c.displayName="Icon",c.propTypes={"aria-hidden":o().oneOfType([o().bool,o().oneOf(["true","false"])]),"aria-label":o().string,"aria-labelledby":o().string,children:o().node,className:o().string,height:o().oneOfType([o().number,o().string]),preserveAspectRatio:o().string,tabIndex:o().oneOfType([o().number,o().string]),viewBox:o().string,width:o().oneOfType([o().number,o().string]),xmlns:o().string}},1020:(e,r,t)=>{"use strict";var n=t(6072),s=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function p(e,r,t){var n,o={},p=null,l=null;for(n in void 0!==t&&(p=""+t),void 0!==r.key&&(p=""+r.key),void 0!==r.ref&&(l=r.ref),r)a.call(r,n)&&!c.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:s,type:e,key:p,ref:l,props:o,_owner:i.current}}r.Fragment=o,r.jsx=p,r.jsxs=p},2694:(e,r,t)=>{"use strict";var n=t(6925);function s(){}function o(){}o.resetWarningCache=s,e.exports=function(){function e(e,r,t,s,o,a){if(a!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:o,resetWarningCache:s};return t.PropTypes=t,t}},4848:(e,r,t)=>{"use strict";e.exports=t(1020)},5556:(e,r,t)=>{e.exports=t(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);
|
package/dist/652.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[652],{
|
|
1
|
+
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[652],{2271:e=>{e.exports=JSON.parse('{"casualGreeting":"hey","configSystem":"מערכת התצורה","configSystemExplainer":"הברכה המוצגת להלן מונעת על ידי מערכת התצורה. כדי לשנות את מאפייני התצורה, לחץ על סמל מפתח הברגים בסרגל הניווט כדי למשוך את החלונית Implementer Tools. לאחר מכן, הקלד <2>תבנית</2> בקלט <4>תצורת חיפוש</4>. זה אמור לסנן את מאפייני התצורה כדי להציג רק את אלו הרלוונטיים למודול זה. אתה יכול לשנות את הערכים של מאפיינים אלה וללחוץ על <6>שמור</6> כדי לראות את השינויים המשתקפים בממשק המשתמש","connect":"לְחַבֵּר","connectExplainer":"צור קשר עם הקהילה","dataFetching":"איסוף נתונים","designDocs":"תיעוד עיצוב","designDocsExplainer":"קרא את תיעוד התכנון של O3","explainer":"הדוגמאות הבאות מדגימות כמה תכונות מפתח של מסגרת O3","extensionExplainer":"הנה כמה קופסאות צבעוניות. מכיוון שהם מחוברים כהרחבות בתוך חריץ, מנהל מערכת יכול לשנות אילו תיבות יוצגו באמצעות תצורה. התיבות האלה מוגדרות במקרה במודול הזה, אבל הן יכולות להכנס למשבצת הזו גם אם הן היו במודול אחר","extensionSystem":"מערכת ההרחבה","formalGreeting":"שלום","frontendDocs":"תיעוד חזיתי","getPatient":"קח מטופל בשם","getStarted":"להתחיל","getStartedExplainer":"צור מודול מתבנית זו","learnExplainer":"למד כיצד להשתמש במסגרת O3","loading":"טוען","patientGetterExplainer":"נסה ללחוץ על הכפתור למטה כדי להביא מטופל מאחור","resources":"משאבים נוספים","usefulLinks":"להלן כמה קישורים למשאבים שימושיים","welcomeText":"ברוכים הבאים לאפליקציית O3 Template"}')}}]);
|
package/dist/679.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[679],{6679
|
|
1
|
+
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[679],{6679:e=>{e.exports=JSON.parse('{"prescriptionsActionButton":"Prescrições ativas","prescriptionsActionMenuItem":"Prescrições ativas","activePrescriptionsWorkspaceTitle":"Prescrições ativas","activePrescriptionsHelper":"Revise o contexto do paciente, escolha os detalhes da visita e adicione os pedidos correspondentes à prescrição.","visitTimingLabel":"A visita é","visitTimingNew":"Nova","visitTimingPast":"No passado","visitLocationHeading":"Local da visita","visitLocationHelper":"Selecione o local onde a visita ocorrerá.","visitLocationPlaceholder":"Selecione um local","visitTypeHeading":"Tipo de visita","visitTypeHelper":"Selecione os pedidos que devem entrar nesta prescrição.","ordersEmptyState":"Não existem pedidos ativos para este paciente.","ordersErrorTitle":"Não foi possível carregar os pedidos","ordersErrorSubtitle":"Tente novamente ou atualize o prontuário.","ordersMissingPatientTitle":"Selecione um paciente para continuar","ordersMissingPatientSubtitle":"Abra este painel a partir do prontuário para revisar os pedidos.","insurancePolicyNumberLabel":"Número da apólice de seguro (opcional)","insurancePolicyNumberPlaceholder":"Informe o número da apólice","inPastTabPlaceholderTitle":"As prescrições históricas estarão disponíveis em breve","inPastTabPlaceholderSubtitle":"Volte para a aba Nova para gerenciar os pedidos atuais.","selectedOrdersCount_one":"{{count}} pedido selecionado","selectedOrdersCount_other":"{{count}} pedidos selecionados","signPrescriptionLabel":"Assinar digitalmente a prescrição","printPrescriptionLabel":"Imprimir a prescrição","discardButtonLabel":"Descartar","createPrescriptionButtonLabel":"Criar Prescrição"}')}}]);
|
package/dist/692.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 692.js.LICENSE.txt */
|
|
2
|
-
(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[311,692],{8493(e,t,n){"use strict";var r=n(6072),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,o=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),a=r[0].inst,u=r[1];return o(function(){a.value=n,a.getSnapshot=t,l(a)&&u({inst:a})},[e,n,t]),s(function(){return l(a)&&u({inst:a}),e(function(){l(a)&&u({inst:a})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},9888(e,t,n){"use strict";e.exports=n(8493)},4915(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},3311(e,t,n){"use strict";n.r(t),n.d(t,{I18nContext:()=>K,I18nextProvider:()=>re,IcuTrans:()=>X,IcuTransWithoutContext:()=>Z,Trans:()=>B,TransWithoutContext:()=>z,Translation:()=>ne,composeInitialProps:()=>q,date:()=>se,getDefaults:()=>$,getI18n:()=>C,getInitialProps:()=>M,initReactI18next:()=>D,nodesToString:()=>V,number:()=>ce,plural:()=>ue,select:()=>le,selectOrdinal:()=>pe,setDefaults:()=>k,setI18n:()=>R,time:()=>oe,useSSR:()=>ae,useTranslation:()=>ee,withSSR:()=>ie,withTranslation:()=>te});var r=n(6072),a=n(2635),i=n(4915),s=n.n(i),o=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function c(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(s()[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var a=new RegExp(o),i=null;null!==(i=a.exec(e));)if(i[0].trim())if(i[1]){var c=i[1].trim(),l=[c,""];c.indexOf("=")>-1&&(l=c.split("=")),t.attrs[l[0]]=l[1],a.lastIndex--}else i[2]&&(t.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return t}var l=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,u=/^\s*$/,p=Object.create(null);function d(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(d,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var g={parse:function(e,t){t||(t={}),t.components||(t.components=p);var n,r=[],a=[],i=-1,s=!1;if(0!==e.indexOf("<")){var o=e.indexOf("<");r.push({type:"text",content:-1===o?e:e.substring(0,o)})}return e.replace(l,function(o,l){if(s){if(o!=="</"+n.name+">")return;s=!1}var p,d="/"!==o.charAt(1),g=o.startsWith("\x3c!--"),f=l+o.length,m=e.charAt(f);if(g){var h=c(o);return i<0?(r.push(h),r):((p=a[i]).children.push(h),r)}if(d&&(i++,"tag"===(n=c(o)).type&&t.components[n.name]&&(n.type="component",s=!0),n.voidElement||s||!m||"<"===m||n.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),0===i&&r.push(n),(p=a[i-1])&&p.children.push(n),a[i]=n),(!d||n.voidElement)&&(i>-1&&(n.voidElement||n.name===o.slice(2,-1))&&(i--,n=-1===i?r:a[i]),!s&&"<"!==m&&m)){p=-1===i?r:a[i].children;var y=e.indexOf("<",f),v=e.slice(f,-1===y?void 0:y);u.test(v)&&(v=" "),(y>-1&&i+p.length>=0||" "!==v)&&p.push({type:"text",content:v})}}),r},stringify:function(e){return e.reduce(function(e,t){return e+d("",t)},"")}};const f=g,m=(e,t,n,r)=>{const a=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);x(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...a):console?.warn&&console.warn(...a)},h={},y=(e,t,n,r)=>{x(n)&&h[n]||(x(n)&&(h[n]=new Date),m(e,t,n,r))},v=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},b=(e,t,n)=>{e.loadNamespaces(t,v(e,n))},E=(e,t,n,r)=>{if(x(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return b(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,v(e,r))},N=e=>e.displayName||e.name||(x(e)&&e.length>0?e:"Unknown"),x=e=>"string"==typeof e,O=e=>"object"==typeof e&&null!==e,S=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,I={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},w=e=>I[e],T=e=>e.replace(S,w);let A={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:T,transDefaultProps:void 0};const k=(e={})=>{A={...A,...e}},$=()=>A;let _;const R=e=>{_=e},C=()=>_,j=(e,t)=>{if(!e)return!1;const n=e.props?.children??e.children;return t?n.length>0:!!n},P=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?L(t):t},L=e=>Array.isArray(e)?e:[e],V=(e,t,n,a)=>{if(!e)return"";let i="";const s=L(e),o=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return s.forEach((e,s)=>{if(x(e))i+=`${e}`;else{if((0,r.isValidElement)(e)){const{props:r,type:c}=e,l=Object.keys(r).length,u=o.indexOf(c)>-1,p=r.children;if(!p&&u&&!l)return void(i+=`<${c}/>`);if(!p&&(!u||l)||r.i18nIsDynamicList)return void(i+=`<${s}></${s}>`);if(u&&1===l&&x(p))return void(i+=`<${c}>${p}</${c}>`);const d=V(p,t,n,a);return void(i+=`<${s}>${d}</${s}>`)}if(null!==e){if(O(e)){const{format:t,...r}=e,s=Object.keys(r);if(1===s.length){const e=t?`${s[0]}, ${t}`:s[0];return void(i+=`{{${e}}}`)}return void m(n,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:a,child:e})}m(n,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:a,child:e})}else m(n,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:a})}}),i},U=(e,t,n)=>{const a=e.key||t,i=(0,r.cloneElement)(e,{key:a});return!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0?i:(0,r.createElement)(function(){return(0,r.createElement)(r.Fragment,null,i)},{key:a})};function z({children:e,count:t,parent:n,i18nKey:i,context:s,tOptions:o={},values:c,defaults:l,components:u,ns:p,i18n:d,t:g,shouldUnescape:m,...h}){const v=d||C();if(!v)return y(v,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:i}),e;const b=g||v.t.bind(v)||(e=>e),E={...$(),...v.options?.react};let N=p||b.ns||v.options?.defaultNS;N=x(N)?[N]:N||["translation"];const{transDefaultProps:S}=E,I=S?.tOptions?{...S.tOptions,...o}:o,w=m??S?.shouldUnescape,A=S?.values?{...S.values,...c}:c,k=S?.components?{...S.components,...u}:u,_=V(e,E,v,i),R=l||I?.defaultValue||_||E.transEmptyNodeValue||("function"==typeof i?(0,a.Rm)(i):i),{hashTransKey:z}=E,D=i||(z?z(_||R):_||R);c=v.options?.interpolation?.defaultVariables?A&&Object.keys(A).length>0?{...A,...v.options.interpolation.defaultVariables}:{...v.options.interpolation.defaultVariables}:A;const K=(e=>{const t={};if(!e)return t;const n=e=>{L(e).forEach(e=>{x(e)||(j(e)?n(P(e)):O(e)&&!(0,r.isValidElement)(e)&&Object.assign(t,e))})};return n(e),t})(e);K&&"number"==typeof K.count&&void 0===t&&(t=K.count);const F=c||void 0!==t&&!v.options?.interpolation?.alwaysFormat||!e?I.interpolation:{interpolation:{...I.interpolation,prefix:"#$?",suffix:"?$#"}},q={...I,context:s||I.context,count:t,...c,...F,defaultValue:R,ns:N};let M=D?b(D,q):R;M===D&&R&&(M=R);const B=((e,t,n,r)=>e?Array.isArray(e)?((e,t)=>e.map((e,n)=>U(e,n,t)))(e,t):O(e)?((e,t)=>{const n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:U(e[r],r,t)})}),n})(e,t):(y(n,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:r}),null):null)(k,M,v,i);let W=B||e,H=null;var Y;O(Y=B)&&!Array.isArray(Y)&&Object.keys(Y).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0)&&(H=B,W=e);const Z=((e,t,n,a,i,s,o)=>{if(""===n)return[];const c=i.transKeepBasicHtmlNodesFor||[],l=n&&new RegExp(c.map(e=>`<${e}`).join("|")).test(n);if(!(e||t||l||o))return[n];const u=t??{},p=e=>{L(e).forEach(e=>{x(e)||(j(e)?p(P(e)):O(e)&&!(0,r.isValidElement)(e)&&Object.assign(u,e))})};p(e);const d=((e,t=[],n={})=>{if(!e)return e;const r=[...t,...Object.keys(n)];let a="",i=0;for(;i<e.length;)if("<"===e[i]){let t=!1;const n=e.slice(i).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(n){const e=n[1];(/^\d+$/.test(e)||r.includes(e))&&(t=!0,a+=n[0],i+=n[0].length)}if(!t){const n=e.slice(i).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(n){const e=n[1];(/^\d+$/.test(e)||r.includes(e))&&(t=!0,a+=n[0],i+=n[0].length)}}t||(a+="<",i+=1)}else a+=e[i],i+=1;return a})(n,c,u),g=f.parse(`<0>${d}</0>`),m={...u,...s},h=(e,t,n)=>{const a=P(e),i=v(a,t.children,n);return(e=>Array.isArray(e)&&e.every(r.isValidElement))(a)&&0===i.length||e.props?.i18nIsDynamicList?a:i},y=(e,t,n,a,i)=>{e.dummy?(e.children=t,n.push((0,r.cloneElement)(e,{key:a},i?void 0:t))):n.push(...r.Children.map([e],e=>{const n="data-i18n-is-dynamic-list",s={key:a,[n]:void 0};return e&&e.props&&Object.keys(e.props).forEach(t=>{"ref"!==t&&"children"!==t&&"i18nIsDynamicList"!==t&&t!==n&&(s[t]=e.props[t])}),(0,r.cloneElement)(e,s,i?null:t)}))},v=(e,n,s)=>{const u=L(e);return L(n).reduce((e,n,p)=>{const d=n.children?.[0]?.content&&a.services.interpolator.interpolate(n.children[0].content,m,a.language);if("tag"===n.type){let g=u[parseInt(n.name,10)];!g&&t&&(g=t[n.name]),1!==s.length||g||(g=s[0][n.name]),g||(g={});const f={...n.attrs};o&&Object.keys(f).forEach(e=>{const t=f[e];x(t)&&(f[e]=T(t))});const b=0!==Object.keys(f).length?((e,t)=>{const n={...t};return n.props={...t.props,...e.props},n})({props:f},g):g,E=(0,r.isValidElement)(b),N=E&&j(n,!0)&&!n.voidElement,S=l&&O(b)&&b.dummy&&!E,I=O(t)&&Object.hasOwnProperty.call(t,n.name);if(x(b)){const t=a.services.interpolator.interpolate(b,m,a.language);e.push(t)}else if(j(b)||N){const t=h(b,n,s);y(b,t,e,p)}else if(S){const t=v(u,n.children,s);y(b,t,e,p)}else if(Number.isNaN(parseFloat(n.name)))if(I){const t=h(b,n,s);y(b,t,e,p,n.voidElement)}else if(i.transSupportBasicHtmlNodes&&c.indexOf(n.name)>-1)if(n.voidElement)e.push((0,r.createElement)(n.name,{key:`${n.name}-${p}`}));else{const t=v(u,n.children,s);e.push((0,r.createElement)(n.name,{key:`${n.name}-${p}`},t))}else if(n.voidElement)e.push(`<${n.name} />`);else{const t=v(u,n.children,s);e.push(`<${n.name}>${t}</${n.name}>`)}else if(O(b)&&!E){const t=n.children[0]?d:null;t&&e.push(t)}else y(b,d,e,p,1!==n.children.length||!d)}else if("text"===n.type){const t=i.transWrapTextNodes,s="function"==typeof i.unescape?i.unescape:$().unescape,c=o?s(a.services.interpolator.interpolate(n.content,m,a.language)):a.services.interpolator.interpolate(n.content,m,a.language);t?e.push((0,r.createElement)(t,{key:`${n.name}-${p}`},c)):e.push(c)}return e},[])},b=v([{dummy:!0,children:e||[]}],g,L(e||[]));return P(b[0])})(W,H,M,v,E,q,w),X=n??E.defaultTransParent;return X?(0,r.createElement)(X,h,Z):Z}const D={type:"3rdParty",init(e){k(e.options.react),R(e)}},K=(0,r.createContext)();class F{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const q=e=>async t=>({...await(e.getInitialProps?.(t))??{},...M()}),M=()=>{const e=C();if(!e)return console.warn("react-i18next:: getInitialProps: You will need to pass in an i18next instance by using initReactI18next"),{};const t=e.reportNamespaces?.getUsedNamespaces()??[],n={},r={};return e.languages.forEach(n=>{r[n]={},t.forEach(t=>{r[n][t]=e.getResourceBundle(n,t)||{}})}),n.initialI18nStore=r,n.initialLanguage=e.language,n};function B({children:e,count:t,parent:n,i18nKey:a,context:i,tOptions:s={},values:o,defaults:c,components:l,ns:u,i18n:p,t:d,shouldUnescape:g,...f}){const{i18n:m,defaultNS:h}=(0,r.useContext)(K)||{},y=p||m||C(),v=d||y?.t.bind(y);return z({children:e,count:t,parent:n,i18nKey:a,context:i,tOptions:s,values:o,defaults:c,components:l,ns:u||v?.ns||h||y?.options?.defaultNS,i18n:y,t:d,shouldUnescape:g,...f})}class W extends Error{constructor(e,t,n){super(e),this.name="TranslationParserError",this.position=t,this.translationString=n,Error.captureStackTrace&&Error.captureStackTrace(this,W)}}const H={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'","©":"©","®":"®","™":"™","…":"…","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","•":"•","′":"′","″":"″","‹":"‹","›":"›","§":"§","¶":"¶","·":"·"," ":" "," ":" "," ":" ","€":"€","£":"£","¥":"¥","¢":"¢","¤":"¤","×":"×","÷":"÷","−":"−","±":"±","≠":"≠","≤":"≤","≥":"≥","≈":"≈","≡":"≡","∞":"∞","∫":"∫","∑":"∑","∏":"∏","√":"√","∂":"∂","‰":"‰","°":"°","µ":"µ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","À":"À","Á":"Á","Â":"Â","Ã":"Ã","Ä":"Ä","Å":"Å","Æ":"Æ","Ç":"Ç","È":"È","É":"É","Ê":"Ê","Ë":"Ë","Ì":"Ì","Í":"Í","Î":"Î","Ï":"Ï","Ð":"Ð","Ñ":"Ñ","Ò":"Ò","Ó":"Ó","Ô":"Ô","Õ":"Õ","Ö":"Ö","Ø":"Ø","Ù":"Ù","Ú":"Ú","Û":"Û","Ü":"Ü","Ý":"Ý","Þ":"Þ","ß":"ß","à":"à","á":"á","â":"â","ã":"ã","ä":"ä","å":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","í":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ","¡":"¡","¿":"¿","ƒ":"ƒ","ˆ":"ˆ","˜":"˜","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ª":"ª","º":"º","¯":"¯","´":"´","¸":"¸","¹":"¹","²":"²","³":"³","¼":"¼","½":"½","¾":"¾","♠":"♠","♣":"♣","♥":"♥","♦":"♦","◊":"◊","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","ℵ":"ℵ"},Y=new RegExp(Object.keys(H).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g");function Z({i18nKey:e,defaultTranslation:t,content:n,ns:a,values:i={},i18n:s,t:o}){const c=s||C();if(!c)return y(c,"NO_I18NEXT_INSTANCE","IcuTrans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:e}),r.createElement(r.Fragment,{},t);const l=o||c.t?.bind(c)||(e=>e);let u=a||l.ns||c.options?.defaultNS;u=x(u)?[u]:u||["translation"];let p=i;c.options?.interpolation?.defaultVariables&&(p=i&&Object.keys(i).length>0?{...i,...c.options.interpolation.defaultVariables}:{...c.options.interpolation.defaultVariables});const d=l(e,{defaultValue:t,...p,ns:u});try{const e=((e,t=[])=>{if(!e)return[];const n=(e=>{const t=[];let n=0,r="";const a=()=>{r&&(t.push({type:"Text",value:r,position:n-r.length}),r="")};for(;n<e.length;){const i=e[n];if("<"===i){const s=e.slice(n).match(/^<(\d+)>/);if(s)a(),t.push({type:"TagOpen",value:s[0],position:n,tagNumber:parseInt(s[1],10)}),n+=s[0].length;else{const s=e.slice(n).match(/^<\/(\d+)>/);s?(a(),t.push({type:"TagClose",value:s[0],position:n,tagNumber:parseInt(s[1],10)}),n+=s[0].length):(r+=i,n+=1)}}else r+=i,n+=1}return a(),t})(e),a=[],i=[],s=new Set;if(n.forEach(n=>{switch(n.type){case"Text":{const e=n.value.replace(Y,e=>H[e]).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&#x([0-9a-fA-F]+);/g,(e,t)=>String.fromCharCode(parseInt(t,16)));(i.length>0?i[i.length-1].children:a).push(e)}break;case"TagOpen":{const{tagNumber:e}=n,r=(()=>{if(0===i.length)return t;const e=i[i.length-1];return e.declaration.props?.children&&Array.isArray(e.declaration.props.children)?e.declaration.props.children:e.declarations})(),o=r[e];if(!o){s.add(e);const t=`<${e}>`;(i.length>0?i[i.length-1].children:a).push(t);break}i.push({tagNumber:e,children:[],position:n.position,declaration:o,declarations:r})}break;case"TagClose":{const{tagNumber:t}=n;if(s.has(t)){const e=`</${t}>`;(i.length>0?i[i.length-1].children:a).push(e),s.delete(t);break}if(0===i.length)throw new W(`Unexpected closing tag </${t}> at position ${n.position}`,n.position,e);const o=i.pop();if(o.tagNumber!==t)throw new W(`Mismatched tags: expected </${o.tagNumber}> but got </${t}> at position ${n.position}`,n.position,e);const c=((e,t,n)=>{const{type:a,props:i={}}=e;if(i.children&&Array.isArray(i.children)&&n){const{children:e,...n}=i;return r.createElement(a,n,...t)}return 0===t.length?r.createElement(a,i):1===t.length?r.createElement(a,i,t[0]):r.createElement(a,i,...t)})(o.declaration,o.children,o.declarations);(i.length>0?i[i.length-1].children:a).push(c)}}}),i.length>0){const t=i[i.length-1];throw new W(`Unclosed tag <${t.tagNumber}> at position ${t.position}`,t.position,e)}return a})(d,n);return r.createElement(r.Fragment,{},...e)}catch(t){return m(c,"ICU_TRANS_RENDER_ERROR",`IcuTrans component error for key "${e}": ${t.message}`,{i18nKey:e,error:t}),r.createElement(r.Fragment,{},d)}}function X({i18nKey:e,defaultTranslation:t,content:n,ns:a,values:i={},i18n:s,t:o}){const{i18n:c,defaultNS:l}=(0,r.useContext)(K)||{},u=s||c||C(),p=o||u?.t.bind(u);return Z({i18nKey:e,defaultTranslation:t,content:n,ns:a||p?.ns||l||u?.options?.defaultNS,values:i,i18n:u,t:o})}Z.displayName="IcuTransWithoutContext",X.displayName="IcuTrans";var G=n(9888);const J={t:(e,t)=>{if(x(t))return t;if(O(t)&&x(t.defaultValue))return t.defaultValue;if("function"==typeof e)return"";if(Array.isArray(e)){const t=e[e.length-1];return"function"==typeof t?"":t}return e},ready:!1},Q=()=>()=>{},ee=(e,t={})=>{const{i18n:n}=t,{i18n:a,defaultNS:i}=(0,r.useContext)(K)||{},s=n||a||C();s&&!s.reportNamespaces&&(s.reportNamespaces=new F),s||y(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const o=(0,r.useMemo)(()=>({...$(),...s?.options?.react,...t}),[s,t]),{useSuspense:c,keyPrefix:l}=o,u=e||i||s?.options?.defaultNS,p=x(u)?[u]:u||["translation"],d=(0,r.useMemo)(()=>p,p);s?.reportNamespaces?.addUsedNamespaces?.(d);const g=(0,r.useRef)(0),f=(0,r.useCallback)(e=>{if(!s)return Q;const{bindI18n:t,bindI18nStore:n}=o,r=()=>{g.current+=1,e()};return t&&s.on(t,r),n&&s.store.on(n,r),()=>{t&&t.split(" ").forEach(e=>s.off(e,r)),n&&n.split(" ").forEach(e=>s.store.off(e,r))}},[s,o]),m=(0,r.useRef)(),h=(0,r.useCallback)(()=>{if(!s)return J;const e=!(!s.isInitialized&&!s.initializedStoreOnce)&&d.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(y(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,s,o)),n=t.lng||s.language,r=g.current,a=m.current;if(a&&a.ready===e&&a.lng===n&&a.keyPrefix===l&&a.revision===r)return a;const i={t:s.getFixedT(n,"fallback"===o.nsMode?d:d[0],l),ready:e,lng:n,keyPrefix:l,revision:r};return m.current=i,i},[s,d,l,o,t.lng]),[v,N]=(0,r.useState)(0),{t:O,ready:S}=(0,G.useSyncExternalStore)(f,h,h);(0,r.useEffect)(()=>{if(s&&!S&&!c){const e=()=>N(e=>e+1);t.lng?E(s,t.lng,d,e):b(s,d,e)}},[s,t.lng,d,S,c,v]);const I=s||{},w=(0,r.useRef)(null),T=(0,r.useRef)(),A=e=>{const t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;const n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,"__original"))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch(e){}return n},k=(0,r.useMemo)(()=>{const e=I,t=e?.language;let n=e;e&&(w.current&&w.current.__original===e?T.current!==t?(n=A(e),w.current=n,T.current=t):n=w.current:(n=A(e),w.current=n,T.current=t));const r=[O,n,S];return r.t=O,r.i18n=n,r.ready=S,r},[O,I,S,I.resolvedLanguage,I.language,I.languages]);if(s&&c&&!S)throw new Promise(e=>{const n=()=>e();t.lng?E(s,t.lng,d,n):b(s,d,n)});return k},te=(e,t={})=>function(n){function a({forwardedRef:a,...i}){const[s,o,c]=ee(e,{...i,keyPrefix:t.keyPrefix}),l={...i,t:s,i18n:o,tReady:c};return t.withRef&&a?l.ref=a:!t.withRef&&a&&(l.forwardedRef=a),(0,r.createElement)(n,l)}return a.displayName=`withI18nextTranslation(${N(n)})`,a.WrappedComponent=n,t.withRef?(0,r.forwardRef)((e,t)=>(0,r.createElement)(a,Object.assign({},e,{forwardedRef:t}))):a},ne=({ns:e,children:t,...n})=>{const[r,a,i]=ee(e,n);return t(r,{i18n:a,lng:a?.language},i)};function re({i18n:e,defaultNS:t,children:n}){const a=(0,r.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,r.createElement)(K.Provider,{value:a},n)}const ae=(e,t,n={})=>{const{i18n:a}=n,{i18n:i}=(0,r.useContext)(K)||{},s=a||i||C();if(s){if(!s.options?.isClone){if(e&&!s.initializedStoreOnce){if(!s.services?.resourceStore)return void y(s,"I18N_NOT_INITIALIZED","useSSR: i18n instance was found but not initialized (services.resourceStore is missing). Make sure you call i18next.init() before using useSSR — e.g. at module level, not only in getStaticProps/getServerSideProps.");s.services.resourceStore.data=e,s.options.ns=Object.values(e).reduce((e,t)=>(Object.keys(t).forEach(t=>{e.indexOf(t)<0&&e.push(t)}),e),s.options.ns),s.initializedStoreOnce=!0,s.isInitialized=!0}t&&!s.initializedLanguageOnce&&(s.changeLanguage(t),s.initializedLanguageOnce=!0)}}else y(s,"NO_I18NEXT_INSTANCE","useSSR: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.")},ie=()=>function(e){function t({initialI18nStore:t,initialLanguage:n,...a}){return ae(t,n),(0,r.createElement)(e,{...a})}return t.getInitialProps=q(e),t.displayName=`withI18nextSSR(${N(e)})`,t.WrappedComponent=e,t},se=()=>"",oe=()=>"",ce=()=>"",le=()=>"",ue=()=>"",pe=()=>""}}]);
|
|
2
|
+
(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[692],{3311:(e,t,n)=>{"use strict";n.r(t),n.d(t,{I18nContext:()=>B,I18nextProvider:()=>ce,IcuTrans:()=>te,IcuTransWithoutContext:()=>ee,Trans:()=>Z,TransWithoutContext:()=>q,Translation:()=>oe,composeInitialProps:()=>H,date:()=>pe,getDefaults:()=>$,getI18n:()=>C,getInitialProps:()=>Y,initReactI18next:()=>M,nodesToString:()=>U,number:()=>ge,plural:()=>me,select:()=>fe,selectOrdinal:()=>he,setDefaults:()=>k,setI18n:()=>R,time:()=>de,useSSR:()=>le,useTranslation:()=>ie,withSSR:()=>ue,withTranslation:()=>se});var r=n(6072),a=n(2635),i=n(4915),s=n.n(i),o=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function c(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(s()[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var a=new RegExp(o),i=null;null!==(i=a.exec(e));)if(i[0].trim())if(i[1]){var c=i[1].trim(),l=[c,""];c.indexOf("=")>-1&&(l=c.split("=")),t.attrs[l[0]]=l[1],a.lastIndex--}else i[2]&&(t.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return t}var l=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,u=/^\s*$/,p=Object.create(null);function d(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(d,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var g={parse:function(e,t){t||(t={}),t.components||(t.components=p);var n,r=[],a=[],i=-1,s=!1;if(0!==e.indexOf("<")){var o=e.indexOf("<");r.push({type:"text",content:-1===o?e:e.substring(0,o)})}return e.replace(l,function(o,l){if(s){if(o!=="</"+n.name+">")return;s=!1}var p,d="/"!==o.charAt(1),g=o.startsWith("\x3c!--"),f=l+o.length,m=e.charAt(f);if(g){var h=c(o);return i<0?(r.push(h),r):((p=a[i]).children.push(h),r)}if(d&&(i++,"tag"===(n=c(o)).type&&t.components[n.name]&&(n.type="component",s=!0),n.voidElement||s||!m||"<"===m||n.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),0===i&&r.push(n),(p=a[i-1])&&p.children.push(n),a[i]=n),(!d||n.voidElement)&&(i>-1&&(n.voidElement||n.name===o.slice(2,-1))&&(i--,n=-1===i?r:a[i]),!s&&"<"!==m&&m)){p=-1===i?r:a[i].children;var y=e.indexOf("<",f),v=e.slice(f,-1===y?void 0:y);u.test(v)&&(v=" "),(y>-1&&i+p.length>=0||" "!==v)&&p.push({type:"text",content:v})}}),r},stringify:function(e){return e.reduce(function(e,t){return e+d("",t)},"")}};const f=g,m=(e,t,n,r)=>{const a=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);x(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...a):console?.warn&&console.warn(...a)},h={},y=(e,t,n,r)=>{x(n)&&h[n]||(x(n)&&(h[n]=new Date),m(e,t,n,r))},v=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},b=(e,t,n)=>{e.loadNamespaces(t,v(e,n))},E=(e,t,n,r)=>{if(x(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return b(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,v(e,r))},N=e=>e.displayName||e.name||(x(e)&&e.length>0?e:"Unknown"),x=e=>"string"==typeof e,O=e=>"object"==typeof e&&null!==e,S=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,I={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},w=e=>I[e],T=e=>e.replace(S,w);let A={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:T,transDefaultProps:void 0};const k=(e={})=>{A={...A,...e}},$=()=>A;let _;const R=e=>{_=e},C=()=>_,j=(e,t)=>{if(!e)return!1;const n=e.props?.children??e.children;return t?n.length>0:!!n},P=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?L(t):t},L=e=>Array.isArray(e)?e:[e],V=e=>{const t={};if(!e)return t;const n=e=>{L(e).forEach(e=>{x(e)||(j(e)?n(P(e)):O(e)&&!(0,r.isValidElement)(e)&&Object.assign(t,e))})};return n(e),t},U=(e,t,n,a)=>{if(!e)return"";let i="";const s=L(e),o=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return s.forEach((e,s)=>{if(x(e))i+=`${e}`;else{if((0,r.isValidElement)(e)){const{props:r,type:c}=e,l=Object.keys(r).length,u=o.indexOf(c)>-1,p=r.children;if(!p&&u&&!l)return void(i+=`<${c}/>`);if(!p&&(!u||l)||r.i18nIsDynamicList)return void(i+=`<${s}></${s}>`);if(u&&1===l&&x(p))return void(i+=`<${c}>${p}</${c}>`);const d=U(p,t,n,a);return void(i+=`<${s}>${d}</${s}>`)}if(null!==e){if(O(e)){const{format:t,...r}=e,s=Object.keys(r);if(1===s.length){const e=t?`${s[0]}, ${t}`:s[0];return void(i+=`{{${e}}}`)}return void m(n,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:a,child:e})}m(n,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:a,child:e})}else m(n,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:a})}}),i},z=(e,t,n,a,i,s,o)=>{if(""===n)return[];const c=i.transKeepBasicHtmlNodesFor||[],l=n&&new RegExp(c.map(e=>`<${e}`).join("|")).test(n);if(!(e||t||l||o))return[n];const u=t??{},p=e=>{L(e).forEach(e=>{x(e)||(j(e)?p(P(e)):O(e)&&!(0,r.isValidElement)(e)&&Object.assign(u,e))})};p(e);const d=((e,t=[],n={})=>{if(!e)return e;const r=[...t,...Object.keys(n)];let a="",i=0;for(;i<e.length;)if("<"===e[i]){let t=!1;const n=e.slice(i).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(n){const e=n[1];(/^\d+$/.test(e)||r.includes(e))&&(t=!0,a+=n[0],i+=n[0].length)}if(!t){const n=e.slice(i).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(n){const e=n[1];(/^\d+$/.test(e)||r.includes(e))&&(t=!0,a+=n[0],i+=n[0].length)}}t||(a+="<",i+=1)}else a+=e[i],i+=1;return a})(n,c,u),g=f.parse(`<0>${d}</0>`),m={...u,...s},h=(e,t,n)=>{const a=P(e),i=v(a,t.children,n);return(e=>Array.isArray(e)&&e.every(r.isValidElement))(a)&&0===i.length||e.props?.i18nIsDynamicList?a:i},y=(e,t,n,a,i)=>{e.dummy?(e.children=t,n.push((0,r.cloneElement)(e,{key:a},i?void 0:t))):n.push(...r.Children.map([e],e=>{const n="data-i18n-is-dynamic-list",s={key:a,[n]:void 0};return e&&e.props&&Object.keys(e.props).forEach(t=>{"ref"!==t&&"children"!==t&&"i18nIsDynamicList"!==t&&t!==n&&(s[t]=e.props[t])}),(0,r.cloneElement)(e,s,i?null:t)}))},v=(e,n,s)=>{const u=L(e);return L(n).reduce((e,n,p)=>{const d=n.children?.[0]?.content&&a.services.interpolator.interpolate(n.children[0].content,m,a.language);if("tag"===n.type){let g=u[parseInt(n.name,10)];!g&&t&&(g=t[n.name]),1!==s.length||g||(g=s[0][n.name]),g||(g={});const f={...n.attrs};o&&Object.keys(f).forEach(e=>{const t=f[e];x(t)&&(f[e]=T(t))});const b=0!==Object.keys(f).length?((e,t)=>{const n={...t};return n.props={...t.props,...e.props},n})({props:f},g):g,E=(0,r.isValidElement)(b),N=E&&j(n,!0)&&!n.voidElement,S=l&&O(b)&&b.dummy&&!E,I=O(t)&&Object.hasOwnProperty.call(t,n.name);if(x(b)){const t=a.services.interpolator.interpolate(b,m,a.language);e.push(t)}else if(j(b)||N){const t=h(b,n,s);y(b,t,e,p)}else if(S){const t=v(u,n.children,s);y(b,t,e,p)}else if(Number.isNaN(parseFloat(n.name)))if(I){const t=h(b,n,s);y(b,t,e,p,n.voidElement)}else if(i.transSupportBasicHtmlNodes&&c.indexOf(n.name)>-1)if(n.voidElement)e.push((0,r.createElement)(n.name,{key:`${n.name}-${p}`}));else{const t=v(u,n.children,s);e.push((0,r.createElement)(n.name,{key:`${n.name}-${p}`},t))}else if(n.voidElement)e.push(`<${n.name} />`);else{const t=v(u,n.children,s);e.push(`<${n.name}>${t}</${n.name}>`)}else if(O(b)&&!E){const t=n.children[0]?d:null;t&&e.push(t)}else y(b,d,e,p,1!==n.children.length||!d)}else if("text"===n.type){const t=i.transWrapTextNodes,s="function"==typeof i.unescape?i.unescape:$().unescape,c=o?s(a.services.interpolator.interpolate(n.content,m,a.language)):a.services.interpolator.interpolate(n.content,m,a.language);t?e.push((0,r.createElement)(t,{key:`${n.name}-${p}`},c)):e.push(c)}return e},[])},b=v([{dummy:!0,children:e||[]}],g,L(e||[]));return P(b[0])},D=(e,t,n)=>{const a=e.key||t,i=(0,r.cloneElement)(e,{key:a});return!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0?i:(0,r.createElement)(function(){return(0,r.createElement)(r.Fragment,null,i)},{key:a})},K=(e,t,n,r)=>e?Array.isArray(e)?((e,t)=>e.map((e,n)=>D(e,n,t)))(e,t):O(e)?((e,t)=>{const n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:D(e[r],r,t)})}),n})(e,t):(y(n,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:r}),null):null,F=e=>!!O(e)&&!Array.isArray(e)&&Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function q({children:e,count:t,parent:n,i18nKey:i,context:s,tOptions:o={},values:c,defaults:l,components:u,ns:p,i18n:d,t:g,shouldUnescape:f,...m}){const h=d||C();if(!h)return y(h,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:i}),e;const v=g||h.t.bind(h)||(e=>e),b={...$(),...h.options?.react};let E=p||v.ns||h.options?.defaultNS;E=x(E)?[E]:E||["translation"];const{transDefaultProps:N}=b,O=N?.tOptions?{...N.tOptions,...o}:o,S=f??N?.shouldUnescape,I=N?.values?{...N.values,...c}:c,w=N?.components?{...N.components,...u}:u,T=U(e,b,h,i),A=l||O?.defaultValue||T||b.transEmptyNodeValue||("function"==typeof i?(0,a.Rm)(i):i),{hashTransKey:k}=b,_=i||(k?k(T||A):T||A);c=h.options?.interpolation?.defaultVariables?I&&Object.keys(I).length>0?{...I,...h.options.interpolation.defaultVariables}:{...h.options.interpolation.defaultVariables}:I;const R=V(e);R&&"number"==typeof R.count&&void 0===t&&(t=R.count);const j=c||void 0!==t&&!h.options?.interpolation?.alwaysFormat||!e?O.interpolation:{interpolation:{...O.interpolation,prefix:"#$?",suffix:"?$#"}},P={...O,context:s||O.context,count:t,...c,...j,defaultValue:A,ns:E};let L=_?v(_,P):A;L===_&&A&&(L=A);const D=K(w,L,h,i);let q=D||e,M=null;F(D)&&(M=D,q=e);const B=z(q,M,L,h,b,P,S),W=n??b.defaultTransParent;return W?(0,r.createElement)(W,m,B):B}const M={type:"3rdParty",init(e){k(e.options.react),R(e)}},B=(0,r.createContext)();class W{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const H=e=>async t=>({...await(e.getInitialProps?.(t))??{},...Y()}),Y=()=>{const e=C();if(!e)return console.warn("react-i18next:: getInitialProps: You will need to pass in an i18next instance by using initReactI18next"),{};const t=e.reportNamespaces?.getUsedNamespaces()??[],n={},r={};return e.languages.forEach(n=>{r[n]={},t.forEach(t=>{r[n][t]=e.getResourceBundle(n,t)||{}})}),n.initialI18nStore=r,n.initialLanguage=e.language,n};function Z({children:e,count:t,parent:n,i18nKey:a,context:i,tOptions:s={},values:o,defaults:c,components:l,ns:u,i18n:p,t:d,shouldUnescape:g,...f}){const{i18n:m,defaultNS:h}=(0,r.useContext)(B)||{},y=p||m||C(),v=d||y?.t.bind(y);return q({children:e,count:t,parent:n,i18nKey:a,context:i,tOptions:s,values:o,defaults:c,components:l,ns:u||v?.ns||h||y?.options?.defaultNS,i18n:y,t:d,shouldUnescape:g,...f})}class X extends Error{constructor(e,t,n){super(e),this.name="TranslationParserError",this.position=t,this.translationString=n,Error.captureStackTrace&&Error.captureStackTrace(this,X)}}const G={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'","©":"©","®":"®","™":"™","…":"…","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","•":"•","′":"′","″":"″","‹":"‹","›":"›","§":"§","¶":"¶","·":"·"," ":" "," ":" "," ":" ","€":"€","£":"£","¥":"¥","¢":"¢","¤":"¤","×":"×","÷":"÷","−":"−","±":"±","≠":"≠","≤":"≤","≥":"≥","≈":"≈","≡":"≡","∞":"∞","∫":"∫","∑":"∑","∏":"∏","√":"√","∂":"∂","‰":"‰","°":"°","µ":"µ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","À":"À","Á":"Á","Â":"Â","Ã":"Ã","Ä":"Ä","Å":"Å","Æ":"Æ","Ç":"Ç","È":"È","É":"É","Ê":"Ê","Ë":"Ë","Ì":"Ì","Í":"Í","Î":"Î","Ï":"Ï","Ð":"Ð","Ñ":"Ñ","Ò":"Ò","Ó":"Ó","Ô":"Ô","Õ":"Õ","Ö":"Ö","Ø":"Ø","Ù":"Ù","Ú":"Ú","Û":"Û","Ü":"Ü","Ý":"Ý","Þ":"Þ","ß":"ß","à":"à","á":"á","â":"â","ã":"ã","ä":"ä","å":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","í":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ","¡":"¡","¿":"¿","ƒ":"ƒ","ˆ":"ˆ","˜":"˜","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ª":"ª","º":"º","¯":"¯","´":"´","¸":"¸","¹":"¹","²":"²","³":"³","¼":"¼","½":"½","¾":"¾","♠":"♠","♣":"♣","♥":"♥","♦":"♦","◊":"◊","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","ℵ":"ℵ"},J=new RegExp(Object.keys(G).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g"),Q=(e,t=[])=>{if(!e)return[];const n=(e=>{const t=[];let n=0,r="";const a=()=>{r&&(t.push({type:"Text",value:r,position:n-r.length}),r="")};for(;n<e.length;){const i=e[n];if("<"===i){const s=e.slice(n).match(/^<(\d+)>/);if(s)a(),t.push({type:"TagOpen",value:s[0],position:n,tagNumber:parseInt(s[1],10)}),n+=s[0].length;else{const s=e.slice(n).match(/^<\/(\d+)>/);s?(a(),t.push({type:"TagClose",value:s[0],position:n,tagNumber:parseInt(s[1],10)}),n+=s[0].length):(r+=i,n+=1)}}else r+=i,n+=1}return a(),t})(e),a=[],i=[],s=new Set;if(n.forEach(n=>{switch(n.type){case"Text":{const e=n.value.replace(J,e=>G[e]).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&#x([0-9a-fA-F]+);/g,(e,t)=>String.fromCharCode(parseInt(t,16)));(i.length>0?i[i.length-1].children:a).push(e)}break;case"TagOpen":{const{tagNumber:e}=n,r=(()=>{if(0===i.length)return t;const e=i[i.length-1];return e.declaration.props?.children&&Array.isArray(e.declaration.props.children)?e.declaration.props.children:e.declarations})(),o=r[e];if(!o){s.add(e);const t=`<${e}>`;(i.length>0?i[i.length-1].children:a).push(t);break}i.push({tagNumber:e,children:[],position:n.position,declaration:o,declarations:r})}break;case"TagClose":{const{tagNumber:t}=n;if(s.has(t)){const e=`</${t}>`;(i.length>0?i[i.length-1].children:a).push(e),s.delete(t);break}if(0===i.length)throw new X(`Unexpected closing tag </${t}> at position ${n.position}`,n.position,e);const o=i.pop();if(o.tagNumber!==t)throw new X(`Mismatched tags: expected </${o.tagNumber}> but got </${t}> at position ${n.position}`,n.position,e);const c=((e,t,n)=>{const{type:a,props:i={}}=e;if(i.children&&Array.isArray(i.children)&&n){const{children:e,...n}=i;return r.createElement(a,n,...t)}return 0===t.length?r.createElement(a,i):1===t.length?r.createElement(a,i,t[0]):r.createElement(a,i,...t)})(o.declaration,o.children,o.declarations);(i.length>0?i[i.length-1].children:a).push(c)}}}),i.length>0){const t=i[i.length-1];throw new X(`Unclosed tag <${t.tagNumber}> at position ${t.position}`,t.position,e)}return a};function ee({i18nKey:e,defaultTranslation:t,content:n,ns:a,values:i={},i18n:s,t:o}){const c=s||C();if(!c)return y(c,"NO_I18NEXT_INSTANCE","IcuTrans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:e}),r.createElement(r.Fragment,{},t);const l=o||c.t?.bind(c)||(e=>e);let u=a||l.ns||c.options?.defaultNS;u=x(u)?[u]:u||["translation"];let p=i;c.options?.interpolation?.defaultVariables&&(p=i&&Object.keys(i).length>0?{...i,...c.options.interpolation.defaultVariables}:{...c.options.interpolation.defaultVariables});const d=l(e,{defaultValue:t,...p,ns:u});try{const e=Q(d,n);return r.createElement(r.Fragment,{},...e)}catch(t){return m(c,"ICU_TRANS_RENDER_ERROR",`IcuTrans component error for key "${e}": ${t.message}`,{i18nKey:e,error:t}),r.createElement(r.Fragment,{},d)}}function te({i18nKey:e,defaultTranslation:t,content:n,ns:a,values:i={},i18n:s,t:o}){const{i18n:c,defaultNS:l}=(0,r.useContext)(B)||{},u=s||c||C(),p=o||u?.t.bind(u);return ee({i18nKey:e,defaultTranslation:t,content:n,ns:a||p?.ns||l||u?.options?.defaultNS,values:i,i18n:u,t:o})}ee.displayName="IcuTransWithoutContext",te.displayName="IcuTrans";var ne=n(9888);const re={t:(e,t)=>{if(x(t))return t;if(O(t)&&x(t.defaultValue))return t.defaultValue;if("function"==typeof e)return"";if(Array.isArray(e)){const t=e[e.length-1];return"function"==typeof t?"":t}return e},ready:!1},ae=()=>()=>{},ie=(e,t={})=>{const{i18n:n}=t,{i18n:a,defaultNS:i}=(0,r.useContext)(B)||{},s=n||a||C();s&&!s.reportNamespaces&&(s.reportNamespaces=new W),s||y(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const o=(0,r.useMemo)(()=>({...$(),...s?.options?.react,...t}),[s,t]),{useSuspense:c,keyPrefix:l}=o,u=e||i||s?.options?.defaultNS,p=x(u)?[u]:u||["translation"],d=(0,r.useMemo)(()=>p,p);s?.reportNamespaces?.addUsedNamespaces?.(d);const g=(0,r.useRef)(0),f=(0,r.useCallback)(e=>{if(!s)return ae;const{bindI18n:t,bindI18nStore:n}=o,r=()=>{g.current+=1,e()};return t&&s.on(t,r),n&&s.store.on(n,r),()=>{t&&t.split(" ").forEach(e=>s.off(e,r)),n&&n.split(" ").forEach(e=>s.store.off(e,r))}},[s,o]),m=(0,r.useRef)(),h=(0,r.useCallback)(()=>{if(!s)return re;const e=!(!s.isInitialized&&!s.initializedStoreOnce)&&d.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(y(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,s,o)),n=t.lng||s.language,r=g.current,a=m.current;if(a&&a.ready===e&&a.lng===n&&a.keyPrefix===l&&a.revision===r)return a;const i={t:s.getFixedT(n,"fallback"===o.nsMode?d:d[0],l),ready:e,lng:n,keyPrefix:l,revision:r};return m.current=i,i},[s,d,l,o,t.lng]),[v,N]=(0,r.useState)(0),{t:O,ready:S}=(0,ne.useSyncExternalStore)(f,h,h);(0,r.useEffect)(()=>{if(s&&!S&&!c){const e=()=>N(e=>e+1);t.lng?E(s,t.lng,d,e):b(s,d,e)}},[s,t.lng,d,S,c,v]);const I=s||{},w=(0,r.useRef)(null),T=(0,r.useRef)(),A=e=>{const t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;const n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,"__original"))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch(e){}return n},k=(0,r.useMemo)(()=>{const e=I,t=e?.language;let n=e;e&&(w.current&&w.current.__original===e?T.current!==t?(n=A(e),w.current=n,T.current=t):n=w.current:(n=A(e),w.current=n,T.current=t));const r=[O,n,S];return r.t=O,r.i18n=n,r.ready=S,r},[O,I,S,I.resolvedLanguage,I.language,I.languages]);if(s&&c&&!S)throw new Promise(e=>{const n=()=>e();t.lng?E(s,t.lng,d,n):b(s,d,n)});return k},se=(e,t={})=>function(n){function a({forwardedRef:a,...i}){const[s,o,c]=ie(e,{...i,keyPrefix:t.keyPrefix}),l={...i,t:s,i18n:o,tReady:c};return t.withRef&&a?l.ref=a:!t.withRef&&a&&(l.forwardedRef=a),(0,r.createElement)(n,l)}return a.displayName=`withI18nextTranslation(${N(n)})`,a.WrappedComponent=n,t.withRef?(0,r.forwardRef)((e,t)=>(0,r.createElement)(a,Object.assign({},e,{forwardedRef:t}))):a},oe=({ns:e,children:t,...n})=>{const[r,a,i]=ie(e,n);return t(r,{i18n:a,lng:a?.language},i)};function ce({i18n:e,defaultNS:t,children:n}){const a=(0,r.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,r.createElement)(B.Provider,{value:a},n)}const le=(e,t,n={})=>{const{i18n:a}=n,{i18n:i}=(0,r.useContext)(B)||{},s=a||i||C();if(s){if(!s.options?.isClone){if(e&&!s.initializedStoreOnce){if(!s.services?.resourceStore)return void y(s,"I18N_NOT_INITIALIZED","useSSR: i18n instance was found but not initialized (services.resourceStore is missing). Make sure you call i18next.init() before using useSSR — e.g. at module level, not only in getStaticProps/getServerSideProps.");s.services.resourceStore.data=e,s.options.ns=Object.values(e).reduce((e,t)=>(Object.keys(t).forEach(t=>{e.indexOf(t)<0&&e.push(t)}),e),s.options.ns),s.initializedStoreOnce=!0,s.isInitialized=!0}t&&!s.initializedLanguageOnce&&(s.changeLanguage(t),s.initializedLanguageOnce=!0)}}else y(s,"NO_I18NEXT_INSTANCE","useSSR: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.")},ue=()=>function(e){function t({initialI18nStore:t,initialLanguage:n,...a}){return le(t,n),(0,r.createElement)(e,{...a})}return t.getInitialProps=H(e),t.displayName=`withI18nextSSR(${N(e)})`,t.WrappedComponent=e,t},pe=()=>"",de=()=>"",ge=()=>"",fe=()=>"",me=()=>"",he=()=>""},4915:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},8493:(e,t,n)=>{"use strict";var r=n(6072),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,o=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),a=r[0].inst,u=r[1];return o(function(){a.value=n,a.getSnapshot=t,l(a)&&u({inst:a})},[e,n,t]),s(function(){return l(a)&&u({inst:a}),e(function(){l(a)&&u({inst:a})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},9888:(e,t,n)=>{"use strict";e.exports=n(8493)}}]);
|