@leatcom/portal-sessions 0.0.112 → 0.0.114

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.
@@ -1,4 +1,4 @@
1
- (function(yt,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(yt=typeof globalThis<"u"?globalThis:yt||self,x(yt.PortalSessions={},yt.React,yt.ReactDOM))})(this,function(yt,x,Pi){"use strict";var fR=Object.defineProperty;var hR=(yt,x,Pi)=>x in yt?fR(yt,x,{enumerable:!0,configurable:!0,writable:!0,value:Pi}):yt[x]=Pi;var wn=(yt,x,Pi)=>hR(yt,typeof x!="symbol"?x+"":x,Pi);try{let yt=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},x=new yt.Error().stack;x&&(yt._sentryDebugIds=yt._sentryDebugIds||{},yt._sentryDebugIds[x]="8a0fc39e-57f8-4895-a240-255cc512bcf7",yt._sentryDebugIdIdentifier="sentry-dbid-8a0fc39e-57f8-4895-a240-255cc512bcf7")}catch{}{let yt=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};yt._sentryModuleMetadata=yt._sentryModuleMetadata||{},yt._sentryModuleMetadata[new yt.Error().stack]=Object.assign({},yt._sentryModuleMetadata[new yt.Error().stack],{"_sentryBundlerPluginAppKey:portal-sessions-application-key":!0})}function Tw(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}function xw(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ce=Tw(x);{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"16c57f2081a2abfe3122bc6a94484db56c870ee0"}}var Jo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ll(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dl={exports:{}},_a={};/**
1
+ (function(yt,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(yt=typeof globalThis<"u"?globalThis:yt||self,x(yt.PortalSessions={},yt.React,yt.ReactDOM))})(this,function(yt,x,Pi){"use strict";var fR=Object.defineProperty;var hR=(yt,x,Pi)=>x in yt?fR(yt,x,{enumerable:!0,configurable:!0,writable:!0,value:Pi}):yt[x]=Pi;var wn=(yt,x,Pi)=>hR(yt,typeof x!="symbol"?x+"":x,Pi);try{let yt=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},x=new yt.Error().stack;x&&(yt._sentryDebugIds=yt._sentryDebugIds||{},yt._sentryDebugIds[x]="7db89d32-762f-4f12-9ef4-e67c69a803e3",yt._sentryDebugIdIdentifier="sentry-dbid-7db89d32-762f-4f12-9ef4-e67c69a803e3")}catch{}{let yt=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};yt._sentryModuleMetadata=yt._sentryModuleMetadata||{},yt._sentryModuleMetadata[new yt.Error().stack]=Object.assign({},yt._sentryModuleMetadata[new yt.Error().stack],{"_sentryBundlerPluginAppKey:portal-sessions-application-key":!0})}function Tw(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}function xw(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ce=Tw(x);{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"63943231f5aff85a1d5587e1eb8d59b81d9b118d"}}var Jo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ll(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dl={exports:{}},_a={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -48,7 +48,7 @@ React keys must be passed directly to JSX without using spread:
48
48
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[gp]=this[gp]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=ka(a);r[s]||(u4(o,a),r[s]=!0)}return de.isArray(e)?e.forEach(i):i(e),this}}Qn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),de.reduceDescriptors(Qn.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),de.freezeMethods(Qn);function Dl(t,e){const n=this||Pa,r=e||n,o=Qn.from(r.headers);let i=r.data;return de.forEach(t,function(s){i=s.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function mp(t){return!!(t&&t.__CANCEL__)}function Bi(t,e,n){Je.call(this,t??"canceled",Je.ERR_CANCELED,e,n),this.name="CanceledError"}de.inherits(Bi,Je,{__CANCEL__:!0});function yp(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Je("Request failed with status code "+n.status,[Je.ERR_BAD_REQUEST,Je.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function l4(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function d4(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,a;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),f=r[i];a||(a=l),n[o]=c,r[o]=l;let h=i,d=0;for(;h!==o;)d+=n[h++],h=h%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),l-a<e)return;const p=f&&l-f;return p?Math.round(d*1e3/p):void 0}}function f4(t,e){let n=0,r=1e3/e,o,i;const a=(l,f=Date.now())=>{n=f,o=null,i&&(clearTimeout(i),i=null),t.apply(null,l)};return[(...l)=>{const f=Date.now(),h=f-n;h>=r?a(l,f):(o=l,i||(i=setTimeout(()=>{i=null,a(o)},r-h)))},()=>o&&a(o)]}const tc=(t,e,n=3)=>{let r=0;const o=d4(50,250);return f4(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,c=a-r,l=o(c),f=a<=s;r=a;const h={loaded:a,total:s,progress:s?a/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s&&f?(s-a)/l:void 0,event:i,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(h)},n)},vp=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},wp=t=>(...e)=>de.asap(()=>t(...e)),h4=Dn.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Dn.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Dn.origin),Dn.navigator&&/(msie|trident)/i.test(Dn.navigator.userAgent)):()=>!0,p4=Dn.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];de.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),de.isString(r)&&a.push("path="+r),de.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function g4(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function m4(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function bp(t,e,n){let r=!g4(e);return t&&r||n==!1?m4(t,e):e}const Ep=t=>t instanceof Qn?{...t}:t;function ei(t,e){e=e||{};const n={};function r(l,f,h,d){return de.isPlainObject(l)&&de.isPlainObject(f)?de.merge.call({caseless:d},l,f):de.isPlainObject(f)?de.merge({},f):de.isArray(f)?f.slice():f}function o(l,f,h,d){if(de.isUndefined(f)){if(!de.isUndefined(l))return r(void 0,l,h,d)}else return r(l,f,h,d)}function i(l,f){if(!de.isUndefined(f))return r(void 0,f)}function a(l,f){if(de.isUndefined(f)){if(!de.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function s(l,f,h){if(h in e)return r(l,f);if(h in t)return r(void 0,l)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,f,h)=>o(Ep(l),Ep(f),h,!0)};return de.forEach(Object.keys(Object.assign({},t,e)),function(f){const h=c[f]||o,d=h(t[f],e[f],f);de.isUndefined(d)&&h!==s||(n[f]=d)}),n}const Cp=t=>{const e=ei({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=e;e.headers=a=Qn.from(a),e.url=dp(bp(e.baseURL,e.url),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(de.isFormData(n)){if(Dn.hasStandardBrowserEnv||Dn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(h=>h.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(Dn.hasStandardBrowserEnv&&(r&&de.isFunction(r)&&(r=r(e)),r||r!==!1&&h4(e.url))){const l=o&&i&&p4.read(i);l&&a.set(o,l)}return e},y4=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const o=Cp(t);let i=o.data;const a=Qn.from(o.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:l}=o,f,h,d,p,u;function g(){p&&p(),u&&u(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let m=new XMLHttpRequest;m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout;function y(){if(!m)return;const b=Qn.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:b,config:t,request:m};yp(function(T){n(T),g()},function(T){r(T),g()},C),m=null}"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(y)},m.onabort=function(){m&&(r(new Je("Request aborted",Je.ECONNABORTED,t,m)),m=null)},m.onerror=function(){r(new Je("Network Error",Je.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const C=o.transitional||hp;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new Je(E,C.clarifyTimeoutError?Je.ETIMEDOUT:Je.ECONNABORTED,t,m)),m=null},i===void 0&&a.setContentType(null),"setRequestHeader"in m&&de.forEach(a.toJSON(),function(E,C){m.setRequestHeader(C,E)}),de.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),s&&s!=="json"&&(m.responseType=o.responseType),l&&([d,u]=tc(l,!0),m.addEventListener("progress",d)),c&&m.upload&&([h,p]=tc(c),m.upload.addEventListener("progress",h),m.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(f=b=>{m&&(r(!b||b.type?new Bi(null,t,m):b),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=l4(o.url);if(w&&Dn.protocols.indexOf(w)===-1){r(new Je("Unsupported protocol "+w+":",Je.ERR_BAD_REQUEST,t));return}m.send(i||null)})},v4=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const i=function(l){if(!o){o=!0,s();const f=l instanceof Error?l:this.reason;r.abort(f instanceof Je?f:new Bi(f instanceof Error?f.message:f))}};let a=e&&setTimeout(()=>{a=null,i(new Je(`timeout ${e} of ms exceeded`,Je.ETIMEDOUT))},e);const s=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),t=null)};t.forEach(l=>l.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>de.asap(s),c}},w4=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},b4=async function*(t,e){for await(const n of E4(t))yield*w4(n,e)},E4=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},_p=(t,e,n,r)=>{const o=b4(t,e);let i=0,a,s=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){s(),c.close();return}let h=f.byteLength;if(n){let d=i+=h;n(d)}c.enqueue(new Uint8Array(f))}catch(l){throw s(l),l}},cancel(c){return s(c),o.return()}},{highWaterMark:2})},nc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ap=nc&&typeof ReadableStream=="function",C4=nc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Sp=(t,...e)=>{try{return!!t(...e)}catch{return!1}},_4=Ap&&Sp(()=>{let t=!1;const e=new Request(Dn.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ip=64*1024,Ml=Ap&&Sp(()=>de.isReadableStream(new Response("").body)),rc={stream:Ml&&(t=>t.body)};nc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!rc[e]&&(rc[e]=de.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Je(`Response type '${e}' is not supported`,Je.ERR_NOT_SUPPORT,r)})})})(new Response);const A4=async t=>{if(t==null)return 0;if(de.isBlob(t))return t.size;if(de.isSpecCompliantForm(t))return(await new Request(Dn.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(de.isArrayBufferView(t)||de.isArrayBuffer(t))return t.byteLength;if(de.isURLSearchParams(t)&&(t=t+""),de.isString(t))return(await C4(t)).byteLength},S4=async(t,e)=>{const n=de.toFiniteNumber(t.getContentLength());return n??A4(e)},Ll={http:Yb,xhr:y4,fetch:nc&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:f,withCredentials:h="same-origin",fetchOptions:d}=Cp(t);l=l?(l+"").toLowerCase():"text";let p=v4([o,i&&i.toAbortSignal()],a),u;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(c&&_4&&n!=="get"&&n!=="head"&&(m=await S4(f,r))!==0){let C=new Request(e,{method:"POST",body:r,duplex:"half"}),S;if(de.isFormData(r)&&(S=C.headers.get("content-type"))&&f.setContentType(S),C.body){const[T,P]=vp(m,tc(wp(c)));r=_p(C.body,Ip,T,P)}}de.isString(h)||(h=h?"include":"omit");const y="credentials"in Request.prototype;u=new Request(e,{...d,signal:p,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:y?h:void 0});let w=await fetch(u);const b=Ml&&(l==="stream"||l==="response");if(Ml&&(s||b&&g)){const C={};["status","statusText","headers"].forEach(N=>{C[N]=w[N]});const S=de.toFiniteNumber(w.headers.get("content-length")),[T,P]=s&&vp(S,tc(wp(s),!0))||[];w=new Response(_p(w.body,Ip,T,()=>{P&&P(),g&&g()}),C)}l=l||"text";let E=await rc[de.findKey(rc,l)||"text"](w,t);return!b&&g&&g(),await new Promise((C,S)=>{yp(C,S,{data:E,headers:Qn.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:u})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new Je("Network Error",Je.ERR_NETWORK,t,u),{cause:y.cause||y}):Je.from(y,y&&y.code,t,u)}})};de.forEach(Ll,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Tp=t=>`- ${t}`,I4=t=>de.isFunction(t)||t===null||t===!1,xp={getAdapter:t=>{t=de.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){n=t[i];let a;if(r=n,!I4(n)&&(r=Ll[(a=String(n)).toLowerCase()],r===void 0))throw new Je(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since :
49
49
  `+i.map(Tp).join(`
50
50
  `):" "+Tp(i[0]):"as no adapter specified";throw new Je("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Ll};function Fl(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Bi(null,t)}function Op(t){return Fl(t),t.headers=Qn.from(t.headers),t.data=Dl.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),xp.getAdapter(t.adapter||Pa.adapter)(t).then(function(r){return Fl(t),r.data=Dl.call(t,t.transformResponse,r),r.headers=Qn.from(r.headers),r},function(r){return mp(r)||(Fl(t),r&&r.response&&(r.response.data=Dl.call(t,t.transformResponse,r.response),r.response.headers=Qn.from(r.response.headers))),Promise.reject(r)})}const Pp="1.8.2",oc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{oc[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const kp={};oc.transitional=function(e,n,r){function o(i,a){return"[Axios v"+Pp+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(e===!1)throw new Je(o(a," has been removed"+(n?" in "+n:"")),Je.ERR_DEPRECATED);return n&&!kp[a]&&(kp[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,a,s):!0}},oc.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function T4(t,e,n){if(typeof t!="object")throw new Je("options must be an object",Je.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const s=t[i],c=s===void 0||a(s,i,t);if(c!==!0)throw new Je("option "+i+" must be "+c,Je.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Je("Unknown option "+i,Je.ERR_BAD_OPTION)}}const ic={assertOptions:T4,validators:oc},qr=ic.validators;class ti{constructor(e){this.defaults=e,this.interceptors={request:new fp,response:new fp}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
51
- `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ei(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&ic.assertOptions(r,{silentJSONParsing:qr.transitional(qr.boolean),forcedJSONParsing:qr.transitional(qr.boolean),clarifyTimeoutError:qr.transitional(qr.boolean)},!1),o!=null&&(de.isFunction(o)?n.paramsSerializer={serialize:o}:ic.assertOptions(o,{encode:qr.function,serialize:qr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ic.assertOptions(n,{baseUrl:qr.spelling("baseURL"),withXsrfToken:qr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&de.merge(i.common,i[n.method]);i&&de.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),n.headers=Qn.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let f,h=0,d;if(!c){const u=[Op.bind(this),void 0];for(u.unshift.apply(u,s),u.push.apply(u,l),d=u.length,f=Promise.resolve(n);h<d;)f=f.then(u[h++],u[h++]);return f}d=s.length;let p=n;for(h=0;h<d;){const u=s[h++],g=s[h++];try{p=u(p)}catch(m){g.call(this,m);break}}try{f=Op.call(this,p)}catch(u){return Promise.reject(u)}for(h=0,d=l.length;h<d;)f=f.then(l[h++],l[h++]);return f}getUri(e){e=ei(this.defaults,e);const n=bp(e.baseURL,e.url,e.allowAbsoluteUrls);return dp(n,e.params,e.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(e){ti.prototype[e]=function(n,r){return this.request(ei(r||{},{method:e,url:n,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(e){function n(r){return function(i,a,s){return this.request(ei(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ti.prototype[e]=n(),ti.prototype[e+"Form"]=n(!0)});class jl{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},e(function(i,a,s){r.reason||(r.reason=new Bi(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new jl(function(o){e=o}),cancel:e}}}function x4(t){return function(n){return t.apply(null,n)}}function O4(t){return de.isObject(t)&&t.isAxiosError===!0}const Vl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vl).forEach(([t,e])=>{Vl[e]=t});function Bp(t){const e=new ti(t),n=Qh(ti.prototype.request,e);return de.extend(n,ti.prototype,e,{allOwnKeys:!0}),de.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Bp(ei(t,o))},n}const nn=Bp(Pa);nn.Axios=ti,nn.CanceledError=Bi,nn.CancelToken=jl,nn.isCancel=mp,nn.VERSION=Pp,nn.toFormData=Zs,nn.AxiosError=Je,nn.Cancel=nn.CanceledError,nn.all=function(e){return Promise.all(e)},nn.spread=x4,nn.isAxiosError=O4,nn.mergeConfig=ei,nn.AxiosHeaders=Qn,nn.formToJSON=t=>pp(de.isHTMLForm(t)?new FormData(t):t),nn.getAdapter=xp.getAdapter,nn.HttpStatusCode=Vl,nn.default=nn;const P4={UNAUTHORIZED:401,MAINTENANCE_MODE:503},k4=t=>{var n,r;const e=(n=t.response)==null?void 0:n.status;if(e&&e!==P4.UNAUTHORIZED){const o=(r=t.response)==null?void 0:r.data;console.table(o)}return Promise.reject(t)};function B4(){const t=x.useContext(fl);if(!t)throw new Error("Only use 'useApiContext' within a ApiContext Provider");return t}const N4="0.0.111";function Dt(){const{apiKey:t,host:e}=B4(),n=(s,c={},l={})=>a("GET",s,c,l),r=(s,c={},l={})=>a("POST",s,c,l),o=(s,c={},l={})=>a("PUT",s,c,l),i=(s,c={})=>a("DELETE",s,c),a=(s,c,l={},f={})=>{const h=nn.create({baseURL:`${e??"https://api.piggy.eu"}/api/v1/portal-sessions`,...f,headers:{Authorization:`Bearer ${t}`,...f.headers,"X-SDK-Version":N4}});return h.interceptors.response.use(void 0,k4),h.request({method:s,url:c,params:s=="GET"?l:{},data:l})};return{get:n,post:r,put:o,destroy:i}}function Np(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Np(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function So(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Np(t))&&(r&&(r+=" "),r+=e);return r}const Ba=t=>typeof t=="number"&&!isNaN(t),ni=t=>typeof t=="string",lr=t=>typeof t=="function",ac=t=>ni(t)||lr(t)?t:null,Ul=t=>x.isValidElement(t)||ni(t)||lr(t)||Ba(t);function R4(t,e,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=t;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(e,n)})})}function sc(t){let{enter:e,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=t;return function(a){let{children:s,position:c,preventExitTransition:l,done:f,nodeRef:h,isIn:d,playToast:p}=a;const u=r?`${e}--${c}`:e,g=r?`${n}--${c}`:n,m=x.useRef(0);return x.useLayoutEffect(()=>{const y=h.current,w=u.split(" "),b=E=>{E.target===h.current&&(p(),y.removeEventListener("animationend",b),y.removeEventListener("animationcancel",b),m.current===0&&E.type!=="animationcancel"&&y.classList.remove(...w))};y.classList.add(...w),y.addEventListener("animationend",b),y.addEventListener("animationcancel",b)},[]),x.useEffect(()=>{const y=h.current,w=()=>{y.removeEventListener("animationend",w),o?R4(y,f,i):f()};d||(l?w():(m.current=1,y.className+=` ${g}`,y.addEventListener("animationend",w)))},[d]),x.createElement(x.Fragment,null,s)}}function Rp(t,e){return t!=null?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}const Gn=new Map;let Na=[];const Gl=new Set,D4=t=>Gl.forEach(e=>e(t)),Dp=()=>Gn.size>0;function Mp(t,e){var n;if(e)return!((n=Gn.get(e))==null||!n.isToastActive(t));let r=!1;return Gn.forEach(o=>{o.isToastActive(t)&&(r=!0)}),r}function Lp(t,e){Ul(t)&&(Dp()||Na.push({content:t,options:e}),Gn.forEach(n=>{n.buildToast(t,e)}))}function Fp(t,e){Gn.forEach(n=>{e!=null&&e!=null&&e.containerId?(e==null?void 0:e.containerId)===n.id&&n.toggle(t,e==null?void 0:e.id):n.toggle(t,e==null?void 0:e.id)})}function M4(t){const{subscribe:e,getSnapshot:n,setProps:r}=x.useRef(function(i){const a=i.containerId||1;return{subscribe(s){const c=function(f,h,d){let p=1,u=0,g=[],m=[],y=[],w=h;const b=new Map,E=new Set,C=()=>{y=Array.from(b.values()),E.forEach(P=>P())},S=P=>{m=P==null?[]:m.filter(N=>N!==P),C()},T=P=>{const{toastId:N,onOpen:L,updateId:U,children:j}=P.props,K=U==null;P.staleId&&b.delete(P.staleId),b.set(N,P),m=[...m,P.props.toastId].filter(G=>G!==P.staleId),C(),d(Rp(P,K?"added":"updated")),K&&lr(L)&&L(x.isValidElement(j)&&j.props)};return{id:f,props:w,observe:P=>(E.add(P),()=>E.delete(P)),toggle:(P,N)=>{b.forEach(L=>{N!=null&&N!==L.props.toastId||lr(L.toggle)&&L.toggle(P)})},removeToast:S,toasts:b,clearQueue:()=>{u-=g.length,g=[]},buildToast:(P,N)=>{if((we=>{let{containerId:le,toastId:Ce,updateId:ye}=we;const H=le?le!==f:f!==1,W=b.has(Ce)&&ye==null;return H||W})(N))return;const{toastId:L,updateId:U,data:j,staleId:K,delay:G}=N,k=()=>{S(L)},V=U==null;V&&u++;const z={...w,style:w.toastStyle,key:p++,...Object.fromEntries(Object.entries(N).filter(we=>{let[le,Ce]=we;return Ce!=null})),toastId:L,updateId:U,data:j,closeToast:k,isIn:!1,className:ac(N.className||w.toastClassName),bodyClassName:ac(N.bodyClassName||w.bodyClassName),progressClassName:ac(N.progressClassName||w.progressClassName),autoClose:!N.isLoading&&(te=N.autoClose,re=w.autoClose,te===!1||Ba(te)&&te>0?te:re),deleteToast(){const we=b.get(L),{onClose:le,children:Ce}=we.props;lr(le)&&le(x.isValidElement(Ce)&&Ce.props),d(Rp(we,"removed")),b.delete(L),u--,u<0&&(u=0),g.length>0?T(g.shift()):C()}};var te,re;z.closeButton=w.closeButton,N.closeButton===!1||Ul(N.closeButton)?z.closeButton=N.closeButton:N.closeButton===!0&&(z.closeButton=!Ul(w.closeButton)||w.closeButton);let ne=P;x.isValidElement(P)&&!ni(P.type)?ne=x.cloneElement(P,{closeToast:k,toastProps:z,data:j}):lr(P)&&(ne=P({closeToast:k,toastProps:z,data:j}));const se={content:ne,props:z,staleId:K};w.limit&&w.limit>0&&u>w.limit&&V?g.push(se):Ba(G)?setTimeout(()=>{T(se)},G):T(se)},setProps(P){w=P},setToggle:(P,N)=>{b.get(P).toggle=N},isToastActive:P=>m.some(N=>N===P),getSnapshot:()=>w.newestOnTop?y.reverse():y}}(a,i,D4);Gn.set(a,c);const l=c.observe(s);return Na.forEach(f=>Lp(f.content,f.options)),Na=[],()=>{l(),Gn.delete(a)}},setProps(s){var c;(c=Gn.get(a))==null||c.setProps(s)},getSnapshot(){var s;return(s=Gn.get(a))==null?void 0:s.getSnapshot()}}}(t)).current;r(t);const o=x.useSyncExternalStore(e,n,n);return{getToastToRender:function(i){if(!o)return[];const a=new Map;return o.forEach(s=>{const{position:c}=s.props;a.has(c)||a.set(c,[]),a.get(c).push(s)}),Array.from(a,s=>i(s[0],s[1]))},isToastActive:Mp,count:o==null?void 0:o.length}}function L4(t){const[e,n]=x.useState(!1),[r,o]=x.useState(!1),i=x.useRef(null),a=x.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:h}=t;var d,p;function u(){n(!0)}function g(){n(!1)}function m(b){const E=i.current;a.canDrag&&E&&(a.didMove=!0,e&&g(),a.delta=t.draggableDirection==="x"?b.clientX-a.start:b.clientY-a.start,a.start!==b.clientX&&(a.canCloseOnClick=!1),E.style.transform=`translate3d(${t.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,E.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function y(){document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",y);const b=i.current;if(a.canDrag&&a.didMove&&b){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),t.closeToast(),void t.collapseAll();b.style.transition="transform 0.2s, opacity 0.2s",b.style.removeProperty("transform"),b.style.removeProperty("opacity")}}(p=Gn.get((d={id:t.toastId,containerId:t.containerId,fn:n}).containerId||1))==null||p.setToggle(d.id,d.fn),x.useEffect(()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||g(),window.addEventListener("focus",u),window.addEventListener("blur",g),()=>{window.removeEventListener("focus",u),window.removeEventListener("blur",g)}},[t.pauseOnFocusLoss]);const w={onPointerDown:function(b){if(t.draggable===!0||t.draggable===b.pointerType){a.didMove=!1,document.addEventListener("pointermove",m),document.addEventListener("pointerup",y);const E=i.current;a.canCloseOnClick=!0,a.canDrag=!0,E.style.transition="none",t.draggableDirection==="x"?(a.start=b.clientX,a.removalDistance=E.offsetWidth*(t.draggablePercent/100)):(a.start=b.clientY,a.removalDistance=E.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(b){const{top:E,bottom:C,left:S,right:T}=i.current.getBoundingClientRect();b.nativeEvent.type!=="touchend"&&t.pauseOnHover&&b.clientX>=S&&b.clientX<=T&&b.clientY>=E&&b.clientY<=C?g():u()}};return s&&c&&(w.onMouseEnter=g,t.stacked||(w.onMouseLeave=u)),h&&(w.onClick=b=>{f&&f(b),a.canCloseOnClick&&l()}),{playToast:u,pauseToast:g,isRunning:e,preventExitTransition:r,toastRef:i,eventHandlers:w}}function F4(t){let{delay:e,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:s,controlledProgress:c,progress:l,rtl:f,isIn:h,theme:d}=t;const p=i||c&&l===0,u={...s,animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};c&&(u.transform=`scaleX(${l})`);const g=So("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),m=lr(a)?a({rtl:f,type:o,defaultClassName:g}):So(g,a),y={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{h&&r()}};return x.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},x.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${d} Toastify__progress-bar--${o}`}),x.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:m,style:u,...y}))}let j4=1;const jp=()=>""+j4++;function V4(t){return t&&(ni(t.toastId)||Ba(t.toastId))?t.toastId:jp()}function Ra(t,e){return Lp(t,e),e.toastId}function cc(t,e){return{...e,type:e&&e.type||t,toastId:V4(e)}}function uc(t){return(e,n)=>Ra(e,cc(t,n))}function Tt(t,e){return Ra(t,cc("default",e))}Tt.loading=(t,e)=>Ra(t,cc("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),Tt.promise=function(t,e,n){let r,{pending:o,error:i,success:a}=e;o&&(r=ni(o)?Tt.loading(o,n):Tt.loading(o.render,{...n,...o}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,h,d)=>{if(h==null)return void Tt.dismiss(r);const p={type:f,...s,...n,data:d},u=ni(h)?{render:h}:h;return r?Tt.update(r,{...p,...u}):Tt(u.render,{...p,...u}),d},l=lr(t)?t():t;return l.then(f=>c("success",a,f)).catch(f=>c("error",i,f)),l},Tt.success=uc("success"),Tt.info=uc("info"),Tt.error=uc("error"),Tt.warning=uc("warning"),Tt.warn=Tt.warning,Tt.dark=(t,e)=>Ra(t,cc("default",{theme:"dark",...e})),Tt.dismiss=function(t){(function(e){var n;if(Dp()){if(e==null||ni(n=e)||Ba(n))Gn.forEach(r=>{r.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){const r=Gn.get(e.containerId);r?r.removeToast(e.id):Gn.forEach(o=>{o.removeToast(e.id)})}}else Na=Na.filter(r=>e!=null&&r.options.toastId!==e)})(t)},Tt.clearWaitingQueue=function(t){t===void 0&&(t={}),Gn.forEach(e=>{!e.props.limit||t.containerId&&e.id!==t.containerId||e.clearQueue()})},Tt.isActive=Mp,Tt.update=function(t,e){e===void 0&&(e={});const n=((r,o)=>{var i;let{containerId:a}=o;return(i=Gn.get(a||1))==null?void 0:i.toasts.get(r)})(t,e);if(n){const{props:r,content:o}=n,i={delay:100,...r,...e,toastId:e.toastId||t,updateId:jp()};i.toastId!==t&&(i.staleId=t);const a=i.render||o;delete i.render,Ra(a,i)}},Tt.done=t=>{Tt.update(t,{progress:1})},Tt.onChange=function(t){return Gl.add(t),()=>{Gl.delete(t)}},Tt.play=t=>Fp(!0,t),Tt.pause=t=>Fp(!1,t);const U4=typeof window<"u"?x.useLayoutEffect:x.useEffect,lc=t=>{let{theme:e,type:n,isLoading:r,...o}=t;return x.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},ql={info:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return x.createElement("div",{className:"Toastify__spinner"})}},G4=t=>{const{isRunning:e,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:i}=L4(t),{closeButton:a,children:s,autoClose:c,onClick:l,type:f,hideProgressBar:h,closeToast:d,transition:p,position:u,className:g,style:m,bodyClassName:y,bodyStyle:w,progressClassName:b,progressStyle:E,updateId:C,role:S,progress:T,rtl:P,toastId:N,deleteToast:L,isIn:U,isLoading:j,closeOnClick:K,theme:G}=t,k=So("Toastify__toast",`Toastify__toast-theme--${G}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":P},{"Toastify__toast--close-on-click":K}),V=lr(g)?g({rtl:P,position:u,type:f,defaultClassName:k}):So(k,g),z=function(se){let{theme:we,type:le,isLoading:Ce,icon:ye}=se,H=null;const W={theme:we,type:le};return ye===!1||(lr(ye)?H=ye({...W,isLoading:Ce}):x.isValidElement(ye)?H=x.cloneElement(ye,W):Ce?H=ql.spinner():(J=>J in ql)(le)&&(H=ql[le](W))),H}(t),te=!!T||!c,re={closeToast:d,type:f,theme:G};let ne=null;return a===!1||(ne=lr(a)?a(re):x.isValidElement(a)?x.cloneElement(a,re):function(se){let{closeToast:we,theme:le,ariaLabel:Ce="close"}=se;return x.createElement("button",{className:`Toastify__close-button Toastify__close-button--${le}`,type:"button",onClick:ye=>{ye.stopPropagation(),we(ye)},"aria-label":Ce},x.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},x.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(re)),x.createElement(p,{isIn:U,done:L,position:u,preventExitTransition:n,nodeRef:r,playToast:i},x.createElement("div",{id:N,onClick:l,"data-in":U,className:V,...o,style:m,ref:r},x.createElement("div",{...U&&{role:S},className:lr(y)?y({type:f}):So("Toastify__toast-body",y),style:w},z!=null&&x.createElement("div",{className:So("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},z),x.createElement("div",null,s)),ne,x.createElement(F4,{...C&&!te?{key:`pb-${C}`}:{},rtl:P,theme:G,delay:c,isRunning:e,isIn:U,closeToast:d,hide:h,type:f,style:E,className:b,controlledProgress:te,progress:T||0})))},dc=function(t,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},q4=sc(dc("bounce",!0));sc(dc("slide",!0)),sc(dc("zoom")),sc(dc("flip"));const H4={position:"top-right",transition:q4,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function W4(t){let e={...H4,...t};const n=t.stacked,[r,o]=x.useState(!0),i=x.useRef(null),{getToastToRender:a,isToastActive:s,count:c}=M4(e),{className:l,style:f,rtl:h,containerId:d}=e;function p(g){const m=So("Toastify__toast-container",`Toastify__toast-container--${g}`,{"Toastify__toast-container--rtl":h});return lr(l)?l({position:g,rtl:h,defaultClassName:m}):So(m,ac(l))}function u(){n&&(o(!0),Tt.play())}return U4(()=>{if(n){var g;const m=i.current.querySelectorAll('[data-in="true"]'),y=12,w=(g=e.position)==null?void 0:g.includes("top");let b=0,E=0;Array.from(m).reverse().forEach((C,S)=>{const T=C;T.classList.add("Toastify__toast--stacked"),S>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=w?"top":"bot");const P=b*(r?.2:1)+(r?0:y*S);T.style.setProperty("--y",`${w?P:-1*P}px`),T.style.setProperty("--g",`${y}`),T.style.setProperty("--s",""+(1-(r?E:0))),b+=T.offsetHeight,E+=.025})}},[r,c,n]),x.createElement("div",{ref:i,className:"Toastify",id:d,onMouseEnter:()=>{n&&(o(!1),Tt.pause())},onMouseLeave:u},a((g,m)=>{const y=m.length?{...f}:{...f,pointerEvents:"none"};return x.createElement("div",{className:p(g),style:y,key:`container-${g}`},m.map(w=>{let{content:b,props:E}=w;return x.createElement(G4,{...E,stacked:n,collapseAll:u,isIn:s(E.toastId,E.containerId),style:E.style,key:`toast-${E.key}`},b)}))}))}const Y4="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_15_20)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23E7FBF4'/%3e%3cpath%20d='M10.6668%2017.3333L14.6668%2020L21.3335%2012'%20stroke='%23039855'%20stroke-width='1.6875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_15_20'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",K4="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_95)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FEF3F2'/%3e%3cpath%20d='M12.0003%2012L20.0003%2020M12.0003%2020L20.0003%2012'%20stroke='%23E02731'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_95'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",z4="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_99)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FFFAEB'/%3e%3cpath%20d='M16.0002%2017.3333V13.3333M16.0002%2020V20.0067M23.0353%2019.3333L17.942%2010.456C17.0833%208.95867%2014.9167%208.95867%2014.058%2010.456L8.96533%2019.3333C8.11266%2020.8187%209.18933%2022.6667%2010.9073%2022.6667H21.0933C22.8107%2022.6667%2023.8873%2020.8187%2023.0353%2019.3333Z'%20stroke='%23CFAA25'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_99'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200C24.8366%200%2032%207.16344%2032%2016C32%2024.8366%2024.8366%2032%2016%2032C7.16344%2032%200%2024.8366%200%2016Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";function $4(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const Vp={};function Hl(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&Vp[e[0]]||(typeof e[0]=="string"&&(Vp[e[0]]=new Date),$4(...e))}const Up=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}};function Gp(t,e,n){t.loadNamespaces(e,Up(t,n))}function qp(t,e,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(e,Up(t,r))}function X4(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=e.languages[0],o=e.options?e.options.fallbackLng:!1,i=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,c)=>{const l=e.services.backendConnector.state[`${s}|${c}`];return l===-1||l===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}function Q4(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(Hl("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:n.lng,precheck:(o,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!i(o.isLanguageChangingTo,t))return!1}}):X4(t,e,n)}const J4=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Z4={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},e3=t=>Z4[t];let Wl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:t=>t.replace(J4,e3)};function t3(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wl={...Wl,...t}}function n3(){return Wl}let Hp;function r3(t){Hp=t}function o3(){return Hp}const i3={type:"3rdParty",init(t){t3(t.options.react),r3(t)}},a3=x.createContext();class s3{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const c3=(t,e)=>{const n=x.useRef();return x.useEffect(()=>{n.current=t},[t,e]),n.current};function Wp(t,e,n,r){return t.getFixedT(e,n,r)}function u3(t,e,n,r){return x.useCallback(Wp(t,e,n,r),[t,e,n,r])}function Ve(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=e,{i18n:r,defaultNS:o}=x.useContext(a3)||{},i=n||r||o3();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new s3),!i){Hl("You will need to pass in an i18next instance by using initReactI18next");const E=(S,T)=>typeof T=="string"?T:T&&typeof T=="object"&&typeof T.defaultValue=="string"?T.defaultValue:Array.isArray(S)?S[S.length-1]:S,C=[E,{},!1];return C.t=E,C.i18n={},C.ready=!1,C}i.options.react&&i.options.react.wait!==void 0&&Hl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...n3(),...i.options.react,...e},{useSuspense:s,keyPrefix:c}=a;let l=o||i.options&&i.options.defaultNS;l=typeof l=="string"?[l]:l||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(l);const f=(i.isInitialized||i.initializedStoreOnce)&&l.every(E=>Q4(E,i,a)),h=u3(i,e.lng||null,a.nsMode==="fallback"?l:l[0],c),d=()=>h,p=()=>Wp(i,e.lng||null,a.nsMode==="fallback"?l:l[0],c),[u,g]=x.useState(d);let m=l.join();e.lng&&(m=`${e.lng}${m}`);const y=c3(m),w=x.useRef(!0);x.useEffect(()=>{const{bindI18n:E,bindI18nStore:C}=a;w.current=!0,!f&&!s&&(e.lng?qp(i,e.lng,l,()=>{w.current&&g(p)}):Gp(i,l,()=>{w.current&&g(p)})),f&&y&&y!==m&&w.current&&g(p);function S(){w.current&&g(p)}return E&&i&&i.on(E,S),C&&i&&i.store.on(C,S),()=>{w.current=!1,E&&i&&E.split(" ").forEach(T=>i.off(T,S)),C&&i&&C.split(" ").forEach(T=>i.store.off(T,S))}},[i,m]),x.useEffect(()=>{w.current&&f&&g(d)},[i,c,f]);const b=[u,i,f];if(b.t=u,b.i18n=i,b.ready=f,f||!f&&!s)return b;throw new Promise(E=>{e.lng?qp(i,e.lng,l,()=>E()):Gp(i,l,()=>E())})}function jt(){const{t}=Ve(),n={closeButton:!1,icon:s=>s.type==="success"?v.jsx("img",{src:Y4,alt:"success"}):s.type==="error"?v.jsx("img",{src:K4,alt:"error"}):v.jsx("img",{src:z4,alt:"warning"})},r=(s,c)=>{if(s==="success")return o(c);a(c)},o=(s=t("success"),c={})=>{Tt.success(s,{...n,...c})},i=(s=t("warning"))=>{Tt.warning(s,n)},a=(s=t("somethingWentWrong"))=>{var f,h;const c=(f=s.response)==null?void 0:f.data.errors,l=v.jsxs("div",{children:[v.jsx("p",{children:(h=s.response)==null?void 0:h.data.message}),c&&Object.keys(c).map(d=>c[d].map(p=>v.jsx("li",{children:p},p)))]});Tt.error(l,n)};return{toast:r,successToast:o,warningToast:i,errorToast:a}}const dr=t=>{const e=Dt(),{errorToast:n}=jt(),r=l=>e.get(l,t.params),{data:o,error:i,isLoading:a,isValidating:s,mutate:c}=sb(t.url,r,{shouldRetryOnError:!1,revalidateIfStale:!1});return x.useEffect(()=>{o&&t.onData&&t.onData(o==null?void 0:o.data.data,o==null?void 0:o.data.meta)},[o]),x.useEffect(()=>{i&&n(i)},[i]),{data:o,pending:s,error:i,isLoading:a,isValidating:s,mutate:c}};var Yp=(t=>(t[t.CREDIT_RECEPTION=1]="CREDIT_RECEPTION",t[t.PHYSICAL_REWARD_RECEPTION=2]="PHYSICAL_REWARD_RECEPTION",t[t.DIGITAL_REWARD_RECEPTION=3]="DIGITAL_REWARD_RECEPTION",t))(Yp||{}),Ni=(t=>(t.IDENTIFIER="identifier",t.EMAIL="email",t))(Ni||{}),fc=(t=>(t.OPT_OUT="OPT_OUT",t.OPT_IN="OPT_IN",t.DOUBLE_OPT_IN="DOUBLE_OPT_IN",t.FUNCTIONAL="FUNCTIONAL",t))(fc||{}),Da=(t=>(t.INACTIVE="INACTIVE",t.ACTIVE="ACTIVE",t.EXPIRED="EXPIRED",t.LOCKED="LOCKED",t.REDEEMED="REDEEMED",t.DEACTIVATED="DEACTIVATED",t))(Da||{});function Kp({uuid:t,children:e}){const[n,r]=x.useState(new Ws),{mutate:o,error:i}=dr({url:t,onData:s=>{const c=new Ws;c.type=s.type,c.uuid=s.uuid,c.contact=s.contact,c.currency=s.currency,c.events=s.events,c.inputData=s.input_data,c.loyaltyProgram=s.loyalty_program,c.results=s.results,r(c)}}),a=x.useMemo(()=>({uuid:t,portalSession:n,mutate:o,error:i}),[n,o,i]);return v.jsx(Lh.Provider,{value:a,children:e})}var rn=(t=>(t.GENERIC="GENERIC",t.GIFTCARD="GIFTCARD",t.REDEEM_GIFTCARD="REDEEM_GIFTCARD",t.TOP_UP_GIFTCARD="TOP_UP_GIFTCARD",t.PORTAL="PORTAL",t.PREPAID="PREPAID",t.PAY_PREPAID="PAY_PREPAID",t.TOP_UP_PREPAID="TOP_UP_PREPAID",t.POINTS_TRANSACTION="POINTS_TRANSACTION",t.VOUCHER="VOUCHER",t))(rn||{}),Ge=(t=>(t.GENERIC="/generic",t.GIFTCARD="/giftcard",t.PORTAL="/portal",t.PREPAID="/prepaid",t.PAY_PREPAID="/pay-prepaid",t.TOP_UP_PREPAID="/top-up-prepaid",t.POINTS_TRANSACTION="/points-transaction",t.VOUCHER="/voucher",t))(Ge||{}),Io=(t=>(t.CREDIT_RECEPTION="credit_reception",t.GIFTCARD_TRANSACTION="giftcard_transaction",t.VOUCHER_REDEEMED="voucher_redeemed",t.REWARD_RECEPTION="reward_reception",t.PREPAID_TRANSACTION="prepaid_transaction",t))(Io||{}),hc=(t=>(t[t.INPUT_INVALID=1003]="INPUT_INVALID",t[t.CONTACT_NOT_FOUND=55031]="CONTACT_NOT_FOUND",t))(hc||{}),Sn=(t=>(t.USER="user",t.ENVIRONMENT="environment",t))(Sn||{});const l3={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class pc{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||l3,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,o){return o&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new pc(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new pc(this.logger,e)}}var Hr=new pc;class gc{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[s,c]=a;for(let l=0;l<c;l++)s(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[s,c]=a;for(let l=0;l<c;l++)s.apply(s,[e,...r])})}}function Ma(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function zp(t){return t==null?"":""+t}function d3(t,e,n){t.forEach(r=>{e[r]&&(n[r]=e[r])})}const f3=/###/g;function La(t,e,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(f3,"."):s}function o(){return!t||typeof t=="string"}const i=typeof e!="string"?e:e.split(".");let a=0;for(;a<i.length-1;){if(o())return{};const s=r(i[a]);!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++a}return o()?{}:{obj:t,k:r(i[a])}}function $p(t,e,n){const{obj:r,k:o}=La(t,e,Object);if(r!==void 0||e.length===1){r[o]=n;return}let i=e[e.length-1],a=e.slice(0,e.length-1),s=La(t,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=La(t,a,Object),s&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n}function h3(t,e,n,r){const{obj:o,k:i}=La(t,e,Object);o[i]=o[i]||[],o[i].push(n)}function mc(t,e){const{obj:n,k:r}=La(t,e);if(n)return n[r]}function p3(t,e,n){const r=mc(t,n);return r!==void 0?r:mc(e,n)}function Xp(t,e,n){for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):Xp(t[r],e[r],n):t[r]=e[r]);return t}function Ri(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var g3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function m3(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>g3[e]):t}class y3{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const v3=[" ",",","?","!",";"],w3=new y3(20);function b3(t,e,n){e=e||"",n=n||"";const r=v3.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=w3.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(t);if(!i){const a=t.indexOf(n);a>0&&!o.test(t.substring(0,a))&&(i=!0)}return i}function Yl(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let o=t;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let a,s="";for(let c=i;c<r.length;++c)if(c!==i&&(s+=n),s+=r[c],a=o[s],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;i+=c-i+1;break}o=a}return o}function yc(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class Qp extends gc{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,n],r&&(Array.isArray(r)?s.push(...r):typeof r=="string"&&i?s.push(...r.split(i)):s.push(r)));const c=mc(this.data,s);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=s[0],n=s[1],r=s.slice(2).join(".")),c||!a||typeof r!="string"?c:Yl(this.data&&this.data[e]&&this.data[e][n],r,i)}addResource(e,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[e,n];r&&(s=s.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(s=e.split("."),o=n,n=s[1]),this.addNamespaces(n),$p(this.data,s,o),i.silent||this.emit("added",e,n,r,o)}addResources(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Array.isArray(r[i]))&&this.addResource(e,n,i,r[i],{silent:!0});o.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[e,n];e.indexOf(".")>-1&&(s=e.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let c=mc(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Xp(c,r,i):c={...c,...r},$p(this.data,s,c),a.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Jp={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,n,r,o))}),e}};const Zp={};class vc extends gc{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),d3(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Hr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,n);return r&&r.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!b3(e,r,o);if(a&&!s){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:i};const l=e.split(r);(r!==o||r===o&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(o)}return typeof i=="string"&&(i=[i]),{key:e,namespaces:i}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],n),c=s[s.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(f){const E=n.nsSeparator||this.options.nsSeparator;return o?{res:`${c}${E}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${E}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const h=this.resolve(e,n);let d=h&&h.res;const p=h&&h.usedKey||a,u=h&&h.exactUsedKey||a,g=Object.prototype.toString.apply(d),m=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&m.indexOf(g)<0&&!(typeof y=="string"&&Array.isArray(d))){if(!n.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(p,d,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(h.res=E,h.usedParams=this.getUsedParamsDetails(n),h):E}if(i){const E=Array.isArray(d),C=E?[]:{},S=E?u:p;for(const T in d)if(Object.prototype.hasOwnProperty.call(d,T)){const P=`${S}${i}${T}`;C[T]=this.translate(P,{...n,joinArrays:!1,ns:s}),C[T]===P&&(C[T]=d[T])}d=C}}else if(w&&typeof y=="string"&&Array.isArray(d))d=d.join(y),d&&(d=this.extendTranslation(d,e,n,r));else{let E=!1,C=!1;const S=n.count!==void 0&&typeof n.count!="string",T=vc.hasDefaultValue(n),P=S?this.pluralResolver.getSuffix(l,n.count,n):"",N=n.ordinal&&S?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",L=S&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),U=L&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${P}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(d)&&T&&(E=!0,d=U),this.isValidLookup(d)||(C=!0,d=a);const K=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:d,G=T&&U!==d&&this.options.updateMissing;if(C||E||G){if(this.logger.log(G?"updateKey":"missingKey",l,c,a,G?U:d),i){const te=this.resolve(a,{...n,keySeparator:!1});te&&te.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 k=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let te=0;te<V.length;te++)k.push(V[te]);else this.options.saveMissingTo==="all"?k=this.languageUtils.toResolveHierarchy(n.lng||this.language):k.push(n.lng||this.language);const z=(te,re,ne)=>{const se=T&&ne!==d?ne:K;this.options.missingKeyHandler?this.options.missingKeyHandler(te,c,re,se,G,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(te,c,re,se,G,n),this.emit("missingKey",te,c,re,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?k.forEach(te=>{const re=this.pluralResolver.getSuffixes(te,n);L&&n[`defaultValue${this.options.pluralSeparator}zero`]&&re.indexOf(`${this.options.pluralSeparator}zero`)<0&&re.push(`${this.options.pluralSeparator}zero`),re.forEach(ne=>{z([te],a+ne,n[`defaultValue${ne}`]||U)})}):z(k,a,U))}d=this.extendTranslation(d,e,n,h,r),C&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${c}:${a}`),(C||E)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,E?d:void 0):d=this.options.parseMissingKeyHandler(d))}return o?(h.res=d,h.usedParams=this.getUsedParamsDetails(n),h):d}extendTranslation(e,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=typeof e=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(l){const d=e.match(this.interpolator.nestingRegexp);f=d&&d.length}let h=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language,r),l){const d=e.match(this.interpolator.nestingRegexp),p=d&&d.length;f<p&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(r.lng=o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var d=arguments.length,p=new Array(d),u=0;u<d;u++)p[u]=arguments[u];return i&&i[0]===p[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):a.translate(...p,n)},r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,c=typeof s=="string"?[s]:s;return e!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(e=Jp.handle(c,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,a,s;return typeof e=="string"&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(c,n),f=l.key;o=f;let h=l.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=n.count!==void 0&&typeof n.count!="string",p=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),u=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(m=>{this.isValidLookup(r)||(s=m,!Zp[`${g[0]}-${m}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(Zp[`${g[0]}-${m}`]=!0,this.logger.warn(`key "${o}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" 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!!!")),g.forEach(y=>{if(this.isValidLookup(r))return;a=y;const w=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,y,m,n);else{let E;d&&(E=this.pluralResolver.getSuffix(y,n.count,n));const C=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(w.push(f+E),n.ordinal&&E.indexOf(S)===0&&w.push(f+E.replace(S,this.options.pluralSeparator)),p&&w.push(f+C)),u){const T=`${f}${this.options.contextSeparator}${n.context}`;w.push(T),d&&(w.push(T+E),n.ordinal&&E.indexOf(S)===0&&w.push(T+E.replace(S,this.options.pluralSeparator)),p&&w.push(T+C))}}let b;for(;b=w.pop();)this.isValidLookup(r)||(i=b,r=this.getResource(y,m,b,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,o):this.resourceStore.getResource(e,n,r,o)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&typeof e.replace!="string";let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}function Kl(t){return t.charAt(0).toUpperCase()+t.slice(1)}class e1{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Hr.create("languageUtils")}getScriptPartFromCode(e){if(e=yc(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=yc(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Kl(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Kl(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Kl(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):typeof e=="string"&&i(this.formatLanguageCode(e)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}let E3=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],C3={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const _3=["v1","v2","v3"],A3=["v4"],t1={zero:0,one:1,two:2,few:3,many:4,other:5};function S3(){const t={};return E3.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:C3[e.fc]}})}),t}class I3{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=Hr.create("pluralResolver"),(!this.options.compatibilityJSON||A3.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=S3()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(yc(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(o=>`${n}${o}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>t1[o]-t1[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(e,o,n)):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(e,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const r=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let o=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!_3.includes(this.options.compatibilityJSON)}}function n1(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=p3(t,e,n);return!i&&o&&typeof n=="string"&&(i=Yl(t,n,r),i===void 0&&(i=Yl(e,n,r))),i}class T3{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Hr.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:c,formatSeparator:l,unescapeSuffix:f,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:u,nestingSuffixEscaped:g,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:w}=e.interpolation;this.escape=n!==void 0?n:m3,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Ri(i):a||"{{",this.suffix=s?Ri(s):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Ri(d):p||Ri("$t("),this.nestingSuffix=u?Ri(u):g||Ri(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"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,n,r,o){let i,a,s;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(u){return u.replace(/\$/g,"$$$$")}const f=u=>{if(u.indexOf(this.formatSeparator)<0){const w=n1(n,c,u,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...o,...n,interpolationkey:u}):w}const g=u.split(this.formatSeparator),m=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(n1(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:m})};this.resetRegExp();const h=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:u=>l(u)},{regex:this.regexp,safeValue:u=>this.escapeValue?l(this.escape(u)):l(u)}].forEach(u=>{for(s=0;i=u.regex.exec(e);){const g=i[1].trim();if(a=f(g),a===void 0)if(typeof h=="function"){const y=h(e,i,o);a=typeof y=="string"?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))a="";else if(d){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=zp(a));const m=u.safeValue(a);if(e=e.replace(i[0],m),d?(u.regex.lastIndex+=a.length,u.regex.lastIndex-=i[0].length):u.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a;function s(c,l){const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const h=c.split(new RegExp(`${f}[ ]*{`));let d=`{${h[1]}`;c=h[0],d=this.interpolate(d,a);const p=d.match(/'/g),u=d.match(/"/g);(p&&p.length%2===0&&!u||u.length%2!==0)&&(d=d.replace(/'/g,'"'));try{a=JSON.parse(d),l&&(a={...l,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${f}${d}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c}for(;o=this.nestingRegexp.exec(e);){let c=[];a={...r},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const f=o[1].split(this.formatSeparator).map(h=>h.trim());o[1]=f.shift(),c=f,l=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===e&&typeof i!="string")return i;typeof i!="string"&&(i=zp(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),i=""),l&&(i=c.reduce((f,h)=>this.format(f,h,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),e=e.replace(o[0],i),this.regexp.lastIndex=0}return e}}function x3(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...c]=a.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),f=s.trim();n[f]||(n[f]=l),l==="false"&&(n[f]=!1),l==="true"&&(n[f]=!0),isNaN(l)||(n[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:n}}function Di(t){const e={};return function(r,o,i){const a=o+JSON.stringify(i);let s=e[a];return s||(s=t(yc(o),i),e[a]=s),s(r)}}class O3{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Hr.create("formatter"),this.options=e,this.formats={number:Di((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Di((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Di((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Di((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Di((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(e)}init(e){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Di(n)}format(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((s,c)=>{const{formatName:l,formatOptions:f}=x3(c);if(this.formats[l]){let h=s;try{const d=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},p=d.locale||d.lng||o.locale||o.lng||r;h=this.formats[l](s,p,{...f,...o,...d})}catch(d){this.logger.warn(d)}return h}else this.logger.warn(`there was no format function for ${l}`);return s},e)}}function P3(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class k3 extends gc{constructor(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Hr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(e,n,r,o){const i={},a={},s={},c={};return e.forEach(l=>{let f=!0;n.forEach(h=>{const d=`${l}|${h}`;!r.reload&&this.store.hasResourceBundle(l,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?a[d]===void 0&&(a[d]=!0):(this.state[d]=1,f=!1,a[d]===void 0&&(a[d]=!0),i[d]===void 0&&(i[d]=!0),c[h]===void 0&&(c[h]=!0)))}),f||(s[l]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const o=e.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const s={};this.queue.forEach(c=>{h3(c.loaded,[i],a),P3(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{s[l]||(s[l]={});const f=c.loaded[l];f.length&&f.forEach(h=>{s[l][h]===void 0&&(s[l][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(l&&f&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,o+1,i*2,a)},i);return}a(l,f)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const l=c(e,n);l&&typeof l.then=="function"?l.then(f=>s(null,f)).catch(s):s(null,l)}catch(l){s(l)}return}return c(e,n,s)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(e,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(e,a,s)})}saveMissing(e,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...a,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let f;l.length===5?f=l(e,n,r,o,c):f=l(e,n,r,o),f&&typeof f.then=="function"?f.then(h=>s(null,h)).catch(s):s(null,f)}catch(f){s(f)}else l(e,n,r,o,s,c)}!e||!e[0]||this.store.addResource(e[0],n,r,o)}}}function r1(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function o1(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function wc(){}function B3(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class Fa extends gc{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=o1(e),this.services={},this.logger=Hr,this.modules={external:[]},B3(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=r1();this.options={...o,...this.options,...o1(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?Hr.init(i(this.modules.logger),this.options):Hr.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=O3);const h=new e1(this.options);this.store=new Qp(this.options.resources,this.options);const d=this.services;d.logger=Hr,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new I3(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(d.formatter=i(f),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new T3(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new k3(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(p){for(var u=arguments.length,g=new Array(u>1?u-1:0),m=1;m<u;m++)g[m-1]=arguments[m];e.emit(p,...g)}),this.modules.languageDetector&&(d.languageDetector=i(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=i(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new vc(this.services,this.options),this.translator.on("*",function(p){for(var u=arguments.length,g=new Array(u>1?u-1:0),m=1;m<u;m++)g[m-1]=arguments[m];e.emit(p,...g)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=wc),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const c=Ma(),l=()=>{const f=(h,d)=>{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),c.resolve(d),r(h,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wc;const o=typeof e=="string"?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&i.indexOf(l)<0&&i.push(l)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,n,r){const o=Ma();return e||(e=this.languages),n||(n=this.options.ns),r||(r=wc),this.services.backendConnector.reload(e,n,i=>{o.resolve(),r(i)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Jp.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const o=Ma();this.emit("languageChanging",e);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,l)=>{l?(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},s=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const l=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,f=>{a(f,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),o}getFixedT(e,n,r){var o=this;const i=function(a,s){let c;if(typeof s!="object"){for(var l=arguments.length,f=new Array(l>2?l-2:0),h=2;h<l;h++)f[h-2]=arguments[h];c=o.options.overloadTranslationOptionHandler([a,s].concat(f))}else c={...s};c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix=c.keyPrefix||r||i.keyPrefix;const d=o.options.keySeparator||".";let p;return c.keyPrefix&&Array.isArray(a)?p=a.map(u=>`${c.keyPrefix}${d}${u}`):p=c.keyPrefix?`${c.keyPrefix}${d}${a}`:a,o.t(p,c)};return typeof e=="string"?i.lng=e:i.lngs=e,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,c)=>{const l=this.services.backendConnector.state[`${s}|${c}`];return l===-1||l===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!o||a(i,e)))}loadNamespaces(e,n){const r=Ma();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Ma();typeof e=="string"&&(e=[e]);const o=this.options.preload||[],i=e.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new e1(r1());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Fa(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wc;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},i=new Fa(o);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new Qp(this.store.data,o),i.services.resourceStore=i.store),i.translator=new vc(i.services,o),i.translator.on("*",function(s){for(var c=arguments.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=arguments[f];i.emit(s,...l)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const dn=Fa.createInstance();dn.createInstance=Fa.createInstance,dn.createInstance,dn.dir,dn.init,dn.loadResources,dn.reloadResources,dn.use,dn.changeLanguage,dn.getFixedT,dn.t,dn.exists,dn.setDefaultNamespace,dn.hasLoadedNamespace,dn.loadNamespaces,dn.loadLanguages;const Mi=(t,e="EUR")=>new Intl.NumberFormat(dn.language,{style:"currency",currency:e??"EUR"}).format(t/100),N3=t=>0 .toLocaleString(dn.language,{style:"currency",currency:t??"EUR",minimumFractionDigits:0,maximumFractionDigits:0}).replace(/\d/g,"").trim(),R3=t=>{window.parent.postMessage(t,"*")},i1=(t,e)=>Math.abs(Math.round((e.getTime()-t.getTime())/(1e3*3600*24))),a1=(t,e)=>Math.abs(Math.round((e.getTime()-t.getTime())/(1e3*3600*24*7))),s1=(t,e)=>Math.abs(Math.round((e.getTime()-t.getTime())/(1e3*3600*24*365.25)));function D3(t){const{errorToast:e}=jt(),[n,r]=x.useState(),o=Dt(),i=()=>{const s={type:t.type??rn.PORTAL,api_key:t.apiKey,shop_uuid:t.shopUuid,contact_uuid:t.contactUuid};return t.cameraService&&(s.camera_service=t.cameraService),t.cameraFacingMode&&(s.facing_mode=t.cameraFacingMode),t.amountInCents&&(s.amount_in_cents=t.amountInCents),t.allowMultipleGiftcards&&(s.allow_multiple_giftcards=t.allowMultipleGiftcards),t.enableRegistration&&(s.enable_registration=t.enableRegistration),t.enableEmailIdentification&&(s.enable_email_identification=t.enableEmailIdentification),t.enableOnScreenKeyboard&&(s.enable_on_screen_keyboard=t.enableOnScreenKeyboard),t.primaryIdentificationMethod&&(s.primary_identification_method=t.primaryIdentificationMethod),t.enableMarketingPreferences&&(s.enable_marketing_preferences=t.enableMarketingPreferences),s},a=()=>{o.post("/",i(),{baseURL:`${t.host}/api/v1/portal-sessions`,headers:{Authorization:`Bearer ${t.apiKey}`}}).then(s=>{const c=new Ws;c.type=s.data.data.type,c.uuid=s.data.data.uuid,c.contact=s.data.data.contact,c.currency=s.data.data.currency,c.events=s.data.data.events,c.inputData=s.data.data.input_data,c.loyaltyProgram=s.data.data.loyalty_program,c.results=s.data.data.results,r(c)}).catch(e)};return x.useEffect(()=>a(),[]),{portalSession:n}}var c1={exports:{}};/*!
51
+ `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ei(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&ic.assertOptions(r,{silentJSONParsing:qr.transitional(qr.boolean),forcedJSONParsing:qr.transitional(qr.boolean),clarifyTimeoutError:qr.transitional(qr.boolean)},!1),o!=null&&(de.isFunction(o)?n.paramsSerializer={serialize:o}:ic.assertOptions(o,{encode:qr.function,serialize:qr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ic.assertOptions(n,{baseUrl:qr.spelling("baseURL"),withXsrfToken:qr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&de.merge(i.common,i[n.method]);i&&de.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),n.headers=Qn.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let f,h=0,d;if(!c){const u=[Op.bind(this),void 0];for(u.unshift.apply(u,s),u.push.apply(u,l),d=u.length,f=Promise.resolve(n);h<d;)f=f.then(u[h++],u[h++]);return f}d=s.length;let p=n;for(h=0;h<d;){const u=s[h++],g=s[h++];try{p=u(p)}catch(m){g.call(this,m);break}}try{f=Op.call(this,p)}catch(u){return Promise.reject(u)}for(h=0,d=l.length;h<d;)f=f.then(l[h++],l[h++]);return f}getUri(e){e=ei(this.defaults,e);const n=bp(e.baseURL,e.url,e.allowAbsoluteUrls);return dp(n,e.params,e.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(e){ti.prototype[e]=function(n,r){return this.request(ei(r||{},{method:e,url:n,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(e){function n(r){return function(i,a,s){return this.request(ei(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ti.prototype[e]=n(),ti.prototype[e+"Form"]=n(!0)});class jl{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},e(function(i,a,s){r.reason||(r.reason=new Bi(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new jl(function(o){e=o}),cancel:e}}}function x4(t){return function(n){return t.apply(null,n)}}function O4(t){return de.isObject(t)&&t.isAxiosError===!0}const Vl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vl).forEach(([t,e])=>{Vl[e]=t});function Bp(t){const e=new ti(t),n=Qh(ti.prototype.request,e);return de.extend(n,ti.prototype,e,{allOwnKeys:!0}),de.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Bp(ei(t,o))},n}const nn=Bp(Pa);nn.Axios=ti,nn.CanceledError=Bi,nn.CancelToken=jl,nn.isCancel=mp,nn.VERSION=Pp,nn.toFormData=Zs,nn.AxiosError=Je,nn.Cancel=nn.CanceledError,nn.all=function(e){return Promise.all(e)},nn.spread=x4,nn.isAxiosError=O4,nn.mergeConfig=ei,nn.AxiosHeaders=Qn,nn.formToJSON=t=>pp(de.isHTMLForm(t)?new FormData(t):t),nn.getAdapter=xp.getAdapter,nn.HttpStatusCode=Vl,nn.default=nn;const P4={UNAUTHORIZED:401,MAINTENANCE_MODE:503},k4=t=>{var n,r;const e=(n=t.response)==null?void 0:n.status;if(e&&e!==P4.UNAUTHORIZED){const o=(r=t.response)==null?void 0:r.data;console.table(o)}return Promise.reject(t)};function B4(){const t=x.useContext(fl);if(!t)throw new Error("Only use 'useApiContext' within a ApiContext Provider");return t}const N4="0.0.114";function Dt(){const{apiKey:t,host:e}=B4(),n=(s,c={},l={})=>a("GET",s,c,l),r=(s,c={},l={})=>a("POST",s,c,l),o=(s,c={},l={})=>a("PUT",s,c,l),i=(s,c={})=>a("DELETE",s,c),a=(s,c,l={},f={})=>{const h=nn.create({baseURL:`${e??"https://api.piggy.eu"}/api/v1/portal-sessions`,...f,headers:{Authorization:`Bearer ${t}`,...f.headers,"X-SDK-Version":N4}});return h.interceptors.response.use(void 0,k4),h.request({method:s,url:c,params:s=="GET"?l:{},data:l})};return{get:n,post:r,put:o,destroy:i}}function Np(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Np(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function So(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Np(t))&&(r&&(r+=" "),r+=e);return r}const Ba=t=>typeof t=="number"&&!isNaN(t),ni=t=>typeof t=="string",lr=t=>typeof t=="function",ac=t=>ni(t)||lr(t)?t:null,Ul=t=>x.isValidElement(t)||ni(t)||lr(t)||Ba(t);function R4(t,e,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=t;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(e,n)})})}function sc(t){let{enter:e,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=t;return function(a){let{children:s,position:c,preventExitTransition:l,done:f,nodeRef:h,isIn:d,playToast:p}=a;const u=r?`${e}--${c}`:e,g=r?`${n}--${c}`:n,m=x.useRef(0);return x.useLayoutEffect(()=>{const y=h.current,w=u.split(" "),b=E=>{E.target===h.current&&(p(),y.removeEventListener("animationend",b),y.removeEventListener("animationcancel",b),m.current===0&&E.type!=="animationcancel"&&y.classList.remove(...w))};y.classList.add(...w),y.addEventListener("animationend",b),y.addEventListener("animationcancel",b)},[]),x.useEffect(()=>{const y=h.current,w=()=>{y.removeEventListener("animationend",w),o?R4(y,f,i):f()};d||(l?w():(m.current=1,y.className+=` ${g}`,y.addEventListener("animationend",w)))},[d]),x.createElement(x.Fragment,null,s)}}function Rp(t,e){return t!=null?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}const Gn=new Map;let Na=[];const Gl=new Set,D4=t=>Gl.forEach(e=>e(t)),Dp=()=>Gn.size>0;function Mp(t,e){var n;if(e)return!((n=Gn.get(e))==null||!n.isToastActive(t));let r=!1;return Gn.forEach(o=>{o.isToastActive(t)&&(r=!0)}),r}function Lp(t,e){Ul(t)&&(Dp()||Na.push({content:t,options:e}),Gn.forEach(n=>{n.buildToast(t,e)}))}function Fp(t,e){Gn.forEach(n=>{e!=null&&e!=null&&e.containerId?(e==null?void 0:e.containerId)===n.id&&n.toggle(t,e==null?void 0:e.id):n.toggle(t,e==null?void 0:e.id)})}function M4(t){const{subscribe:e,getSnapshot:n,setProps:r}=x.useRef(function(i){const a=i.containerId||1;return{subscribe(s){const c=function(f,h,d){let p=1,u=0,g=[],m=[],y=[],w=h;const b=new Map,E=new Set,C=()=>{y=Array.from(b.values()),E.forEach(P=>P())},S=P=>{m=P==null?[]:m.filter(N=>N!==P),C()},T=P=>{const{toastId:N,onOpen:L,updateId:U,children:j}=P.props,K=U==null;P.staleId&&b.delete(P.staleId),b.set(N,P),m=[...m,P.props.toastId].filter(G=>G!==P.staleId),C(),d(Rp(P,K?"added":"updated")),K&&lr(L)&&L(x.isValidElement(j)&&j.props)};return{id:f,props:w,observe:P=>(E.add(P),()=>E.delete(P)),toggle:(P,N)=>{b.forEach(L=>{N!=null&&N!==L.props.toastId||lr(L.toggle)&&L.toggle(P)})},removeToast:S,toasts:b,clearQueue:()=>{u-=g.length,g=[]},buildToast:(P,N)=>{if((we=>{let{containerId:le,toastId:Ce,updateId:ye}=we;const H=le?le!==f:f!==1,W=b.has(Ce)&&ye==null;return H||W})(N))return;const{toastId:L,updateId:U,data:j,staleId:K,delay:G}=N,k=()=>{S(L)},V=U==null;V&&u++;const z={...w,style:w.toastStyle,key:p++,...Object.fromEntries(Object.entries(N).filter(we=>{let[le,Ce]=we;return Ce!=null})),toastId:L,updateId:U,data:j,closeToast:k,isIn:!1,className:ac(N.className||w.toastClassName),bodyClassName:ac(N.bodyClassName||w.bodyClassName),progressClassName:ac(N.progressClassName||w.progressClassName),autoClose:!N.isLoading&&(te=N.autoClose,re=w.autoClose,te===!1||Ba(te)&&te>0?te:re),deleteToast(){const we=b.get(L),{onClose:le,children:Ce}=we.props;lr(le)&&le(x.isValidElement(Ce)&&Ce.props),d(Rp(we,"removed")),b.delete(L),u--,u<0&&(u=0),g.length>0?T(g.shift()):C()}};var te,re;z.closeButton=w.closeButton,N.closeButton===!1||Ul(N.closeButton)?z.closeButton=N.closeButton:N.closeButton===!0&&(z.closeButton=!Ul(w.closeButton)||w.closeButton);let ne=P;x.isValidElement(P)&&!ni(P.type)?ne=x.cloneElement(P,{closeToast:k,toastProps:z,data:j}):lr(P)&&(ne=P({closeToast:k,toastProps:z,data:j}));const se={content:ne,props:z,staleId:K};w.limit&&w.limit>0&&u>w.limit&&V?g.push(se):Ba(G)?setTimeout(()=>{T(se)},G):T(se)},setProps(P){w=P},setToggle:(P,N)=>{b.get(P).toggle=N},isToastActive:P=>m.some(N=>N===P),getSnapshot:()=>w.newestOnTop?y.reverse():y}}(a,i,D4);Gn.set(a,c);const l=c.observe(s);return Na.forEach(f=>Lp(f.content,f.options)),Na=[],()=>{l(),Gn.delete(a)}},setProps(s){var c;(c=Gn.get(a))==null||c.setProps(s)},getSnapshot(){var s;return(s=Gn.get(a))==null?void 0:s.getSnapshot()}}}(t)).current;r(t);const o=x.useSyncExternalStore(e,n,n);return{getToastToRender:function(i){if(!o)return[];const a=new Map;return o.forEach(s=>{const{position:c}=s.props;a.has(c)||a.set(c,[]),a.get(c).push(s)}),Array.from(a,s=>i(s[0],s[1]))},isToastActive:Mp,count:o==null?void 0:o.length}}function L4(t){const[e,n]=x.useState(!1),[r,o]=x.useState(!1),i=x.useRef(null),a=x.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:h}=t;var d,p;function u(){n(!0)}function g(){n(!1)}function m(b){const E=i.current;a.canDrag&&E&&(a.didMove=!0,e&&g(),a.delta=t.draggableDirection==="x"?b.clientX-a.start:b.clientY-a.start,a.start!==b.clientX&&(a.canCloseOnClick=!1),E.style.transform=`translate3d(${t.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,E.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function y(){document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",y);const b=i.current;if(a.canDrag&&a.didMove&&b){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),t.closeToast(),void t.collapseAll();b.style.transition="transform 0.2s, opacity 0.2s",b.style.removeProperty("transform"),b.style.removeProperty("opacity")}}(p=Gn.get((d={id:t.toastId,containerId:t.containerId,fn:n}).containerId||1))==null||p.setToggle(d.id,d.fn),x.useEffect(()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||g(),window.addEventListener("focus",u),window.addEventListener("blur",g),()=>{window.removeEventListener("focus",u),window.removeEventListener("blur",g)}},[t.pauseOnFocusLoss]);const w={onPointerDown:function(b){if(t.draggable===!0||t.draggable===b.pointerType){a.didMove=!1,document.addEventListener("pointermove",m),document.addEventListener("pointerup",y);const E=i.current;a.canCloseOnClick=!0,a.canDrag=!0,E.style.transition="none",t.draggableDirection==="x"?(a.start=b.clientX,a.removalDistance=E.offsetWidth*(t.draggablePercent/100)):(a.start=b.clientY,a.removalDistance=E.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(b){const{top:E,bottom:C,left:S,right:T}=i.current.getBoundingClientRect();b.nativeEvent.type!=="touchend"&&t.pauseOnHover&&b.clientX>=S&&b.clientX<=T&&b.clientY>=E&&b.clientY<=C?g():u()}};return s&&c&&(w.onMouseEnter=g,t.stacked||(w.onMouseLeave=u)),h&&(w.onClick=b=>{f&&f(b),a.canCloseOnClick&&l()}),{playToast:u,pauseToast:g,isRunning:e,preventExitTransition:r,toastRef:i,eventHandlers:w}}function F4(t){let{delay:e,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:s,controlledProgress:c,progress:l,rtl:f,isIn:h,theme:d}=t;const p=i||c&&l===0,u={...s,animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};c&&(u.transform=`scaleX(${l})`);const g=So("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),m=lr(a)?a({rtl:f,type:o,defaultClassName:g}):So(g,a),y={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{h&&r()}};return x.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},x.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${d} Toastify__progress-bar--${o}`}),x.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:m,style:u,...y}))}let j4=1;const jp=()=>""+j4++;function V4(t){return t&&(ni(t.toastId)||Ba(t.toastId))?t.toastId:jp()}function Ra(t,e){return Lp(t,e),e.toastId}function cc(t,e){return{...e,type:e&&e.type||t,toastId:V4(e)}}function uc(t){return(e,n)=>Ra(e,cc(t,n))}function Tt(t,e){return Ra(t,cc("default",e))}Tt.loading=(t,e)=>Ra(t,cc("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),Tt.promise=function(t,e,n){let r,{pending:o,error:i,success:a}=e;o&&(r=ni(o)?Tt.loading(o,n):Tt.loading(o.render,{...n,...o}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,h,d)=>{if(h==null)return void Tt.dismiss(r);const p={type:f,...s,...n,data:d},u=ni(h)?{render:h}:h;return r?Tt.update(r,{...p,...u}):Tt(u.render,{...p,...u}),d},l=lr(t)?t():t;return l.then(f=>c("success",a,f)).catch(f=>c("error",i,f)),l},Tt.success=uc("success"),Tt.info=uc("info"),Tt.error=uc("error"),Tt.warning=uc("warning"),Tt.warn=Tt.warning,Tt.dark=(t,e)=>Ra(t,cc("default",{theme:"dark",...e})),Tt.dismiss=function(t){(function(e){var n;if(Dp()){if(e==null||ni(n=e)||Ba(n))Gn.forEach(r=>{r.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){const r=Gn.get(e.containerId);r?r.removeToast(e.id):Gn.forEach(o=>{o.removeToast(e.id)})}}else Na=Na.filter(r=>e!=null&&r.options.toastId!==e)})(t)},Tt.clearWaitingQueue=function(t){t===void 0&&(t={}),Gn.forEach(e=>{!e.props.limit||t.containerId&&e.id!==t.containerId||e.clearQueue()})},Tt.isActive=Mp,Tt.update=function(t,e){e===void 0&&(e={});const n=((r,o)=>{var i;let{containerId:a}=o;return(i=Gn.get(a||1))==null?void 0:i.toasts.get(r)})(t,e);if(n){const{props:r,content:o}=n,i={delay:100,...r,...e,toastId:e.toastId||t,updateId:jp()};i.toastId!==t&&(i.staleId=t);const a=i.render||o;delete i.render,Ra(a,i)}},Tt.done=t=>{Tt.update(t,{progress:1})},Tt.onChange=function(t){return Gl.add(t),()=>{Gl.delete(t)}},Tt.play=t=>Fp(!0,t),Tt.pause=t=>Fp(!1,t);const U4=typeof window<"u"?x.useLayoutEffect:x.useEffect,lc=t=>{let{theme:e,type:n,isLoading:r,...o}=t;return x.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},ql={info:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return x.createElement("div",{className:"Toastify__spinner"})}},G4=t=>{const{isRunning:e,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:i}=L4(t),{closeButton:a,children:s,autoClose:c,onClick:l,type:f,hideProgressBar:h,closeToast:d,transition:p,position:u,className:g,style:m,bodyClassName:y,bodyStyle:w,progressClassName:b,progressStyle:E,updateId:C,role:S,progress:T,rtl:P,toastId:N,deleteToast:L,isIn:U,isLoading:j,closeOnClick:K,theme:G}=t,k=So("Toastify__toast",`Toastify__toast-theme--${G}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":P},{"Toastify__toast--close-on-click":K}),V=lr(g)?g({rtl:P,position:u,type:f,defaultClassName:k}):So(k,g),z=function(se){let{theme:we,type:le,isLoading:Ce,icon:ye}=se,H=null;const W={theme:we,type:le};return ye===!1||(lr(ye)?H=ye({...W,isLoading:Ce}):x.isValidElement(ye)?H=x.cloneElement(ye,W):Ce?H=ql.spinner():(J=>J in ql)(le)&&(H=ql[le](W))),H}(t),te=!!T||!c,re={closeToast:d,type:f,theme:G};let ne=null;return a===!1||(ne=lr(a)?a(re):x.isValidElement(a)?x.cloneElement(a,re):function(se){let{closeToast:we,theme:le,ariaLabel:Ce="close"}=se;return x.createElement("button",{className:`Toastify__close-button Toastify__close-button--${le}`,type:"button",onClick:ye=>{ye.stopPropagation(),we(ye)},"aria-label":Ce},x.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},x.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(re)),x.createElement(p,{isIn:U,done:L,position:u,preventExitTransition:n,nodeRef:r,playToast:i},x.createElement("div",{id:N,onClick:l,"data-in":U,className:V,...o,style:m,ref:r},x.createElement("div",{...U&&{role:S},className:lr(y)?y({type:f}):So("Toastify__toast-body",y),style:w},z!=null&&x.createElement("div",{className:So("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},z),x.createElement("div",null,s)),ne,x.createElement(F4,{...C&&!te?{key:`pb-${C}`}:{},rtl:P,theme:G,delay:c,isRunning:e,isIn:U,closeToast:d,hide:h,type:f,style:E,className:b,controlledProgress:te,progress:T||0})))},dc=function(t,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},q4=sc(dc("bounce",!0));sc(dc("slide",!0)),sc(dc("zoom")),sc(dc("flip"));const H4={position:"top-right",transition:q4,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function W4(t){let e={...H4,...t};const n=t.stacked,[r,o]=x.useState(!0),i=x.useRef(null),{getToastToRender:a,isToastActive:s,count:c}=M4(e),{className:l,style:f,rtl:h,containerId:d}=e;function p(g){const m=So("Toastify__toast-container",`Toastify__toast-container--${g}`,{"Toastify__toast-container--rtl":h});return lr(l)?l({position:g,rtl:h,defaultClassName:m}):So(m,ac(l))}function u(){n&&(o(!0),Tt.play())}return U4(()=>{if(n){var g;const m=i.current.querySelectorAll('[data-in="true"]'),y=12,w=(g=e.position)==null?void 0:g.includes("top");let b=0,E=0;Array.from(m).reverse().forEach((C,S)=>{const T=C;T.classList.add("Toastify__toast--stacked"),S>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=w?"top":"bot");const P=b*(r?.2:1)+(r?0:y*S);T.style.setProperty("--y",`${w?P:-1*P}px`),T.style.setProperty("--g",`${y}`),T.style.setProperty("--s",""+(1-(r?E:0))),b+=T.offsetHeight,E+=.025})}},[r,c,n]),x.createElement("div",{ref:i,className:"Toastify",id:d,onMouseEnter:()=>{n&&(o(!1),Tt.pause())},onMouseLeave:u},a((g,m)=>{const y=m.length?{...f}:{...f,pointerEvents:"none"};return x.createElement("div",{className:p(g),style:y,key:`container-${g}`},m.map(w=>{let{content:b,props:E}=w;return x.createElement(G4,{...E,stacked:n,collapseAll:u,isIn:s(E.toastId,E.containerId),style:E.style,key:`toast-${E.key}`},b)}))}))}const Y4="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_15_20)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23E7FBF4'/%3e%3cpath%20d='M10.6668%2017.3333L14.6668%2020L21.3335%2012'%20stroke='%23039855'%20stroke-width='1.6875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_15_20'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",K4="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_95)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FEF3F2'/%3e%3cpath%20d='M12.0003%2012L20.0003%2020M12.0003%2020L20.0003%2012'%20stroke='%23E02731'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_95'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",z4="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_99)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FFFAEB'/%3e%3cpath%20d='M16.0002%2017.3333V13.3333M16.0002%2020V20.0067M23.0353%2019.3333L17.942%2010.456C17.0833%208.95867%2014.9167%208.95867%2014.058%2010.456L8.96533%2019.3333C8.11266%2020.8187%209.18933%2022.6667%2010.9073%2022.6667H21.0933C22.8107%2022.6667%2023.8873%2020.8187%2023.0353%2019.3333Z'%20stroke='%23CFAA25'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_99'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200C24.8366%200%2032%207.16344%2032%2016C32%2024.8366%2024.8366%2032%2016%2032C7.16344%2032%200%2024.8366%200%2016Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";function $4(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const Vp={};function Hl(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&Vp[e[0]]||(typeof e[0]=="string"&&(Vp[e[0]]=new Date),$4(...e))}const Up=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}};function Gp(t,e,n){t.loadNamespaces(e,Up(t,n))}function qp(t,e,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(e,Up(t,r))}function X4(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=e.languages[0],o=e.options?e.options.fallbackLng:!1,i=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,c)=>{const l=e.services.backendConnector.state[`${s}|${c}`];return l===-1||l===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}function Q4(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(Hl("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:n.lng,precheck:(o,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!i(o.isLanguageChangingTo,t))return!1}}):X4(t,e,n)}const J4=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Z4={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},e3=t=>Z4[t];let Wl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:t=>t.replace(J4,e3)};function t3(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wl={...Wl,...t}}function n3(){return Wl}let Hp;function r3(t){Hp=t}function o3(){return Hp}const i3={type:"3rdParty",init(t){t3(t.options.react),r3(t)}},a3=x.createContext();class s3{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const c3=(t,e)=>{const n=x.useRef();return x.useEffect(()=>{n.current=t},[t,e]),n.current};function Wp(t,e,n,r){return t.getFixedT(e,n,r)}function u3(t,e,n,r){return x.useCallback(Wp(t,e,n,r),[t,e,n,r])}function Ve(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=e,{i18n:r,defaultNS:o}=x.useContext(a3)||{},i=n||r||o3();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new s3),!i){Hl("You will need to pass in an i18next instance by using initReactI18next");const E=(S,T)=>typeof T=="string"?T:T&&typeof T=="object"&&typeof T.defaultValue=="string"?T.defaultValue:Array.isArray(S)?S[S.length-1]:S,C=[E,{},!1];return C.t=E,C.i18n={},C.ready=!1,C}i.options.react&&i.options.react.wait!==void 0&&Hl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...n3(),...i.options.react,...e},{useSuspense:s,keyPrefix:c}=a;let l=o||i.options&&i.options.defaultNS;l=typeof l=="string"?[l]:l||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(l);const f=(i.isInitialized||i.initializedStoreOnce)&&l.every(E=>Q4(E,i,a)),h=u3(i,e.lng||null,a.nsMode==="fallback"?l:l[0],c),d=()=>h,p=()=>Wp(i,e.lng||null,a.nsMode==="fallback"?l:l[0],c),[u,g]=x.useState(d);let m=l.join();e.lng&&(m=`${e.lng}${m}`);const y=c3(m),w=x.useRef(!0);x.useEffect(()=>{const{bindI18n:E,bindI18nStore:C}=a;w.current=!0,!f&&!s&&(e.lng?qp(i,e.lng,l,()=>{w.current&&g(p)}):Gp(i,l,()=>{w.current&&g(p)})),f&&y&&y!==m&&w.current&&g(p);function S(){w.current&&g(p)}return E&&i&&i.on(E,S),C&&i&&i.store.on(C,S),()=>{w.current=!1,E&&i&&E.split(" ").forEach(T=>i.off(T,S)),C&&i&&C.split(" ").forEach(T=>i.store.off(T,S))}},[i,m]),x.useEffect(()=>{w.current&&f&&g(d)},[i,c,f]);const b=[u,i,f];if(b.t=u,b.i18n=i,b.ready=f,f||!f&&!s)return b;throw new Promise(E=>{e.lng?qp(i,e.lng,l,()=>E()):Gp(i,l,()=>E())})}function jt(){const{t}=Ve(),n={closeButton:!1,icon:s=>s.type==="success"?v.jsx("img",{src:Y4,alt:"success"}):s.type==="error"?v.jsx("img",{src:K4,alt:"error"}):v.jsx("img",{src:z4,alt:"warning"})},r=(s,c)=>{if(s==="success")return o(c);a(c)},o=(s=t("success"),c={})=>{Tt.success(s,{...n,...c})},i=(s=t("warning"))=>{Tt.warning(s,n)},a=(s=t("somethingWentWrong"))=>{var f,h;const c=(f=s.response)==null?void 0:f.data.errors,l=v.jsxs("div",{children:[v.jsx("p",{children:(h=s.response)==null?void 0:h.data.message}),c&&Object.keys(c).map(d=>c[d].map(p=>v.jsx("li",{children:p},p)))]});Tt.error(l,n)};return{toast:r,successToast:o,warningToast:i,errorToast:a}}const dr=t=>{const e=Dt(),{errorToast:n}=jt(),r=l=>e.get(l,t.params),{data:o,error:i,isLoading:a,isValidating:s,mutate:c}=sb(t.url,r,{shouldRetryOnError:!1,revalidateIfStale:!1});return x.useEffect(()=>{o&&t.onData&&t.onData(o==null?void 0:o.data.data,o==null?void 0:o.data.meta)},[o]),x.useEffect(()=>{i&&n(i)},[i]),{data:o,pending:s,error:i,isLoading:a,isValidating:s,mutate:c}};var Yp=(t=>(t[t.CREDIT_RECEPTION=1]="CREDIT_RECEPTION",t[t.PHYSICAL_REWARD_RECEPTION=2]="PHYSICAL_REWARD_RECEPTION",t[t.DIGITAL_REWARD_RECEPTION=3]="DIGITAL_REWARD_RECEPTION",t))(Yp||{}),Ni=(t=>(t.IDENTIFIER="identifier",t.EMAIL="email",t))(Ni||{}),fc=(t=>(t.OPT_OUT="OPT_OUT",t.OPT_IN="OPT_IN",t.DOUBLE_OPT_IN="DOUBLE_OPT_IN",t.FUNCTIONAL="FUNCTIONAL",t))(fc||{}),Da=(t=>(t.INACTIVE="INACTIVE",t.ACTIVE="ACTIVE",t.EXPIRED="EXPIRED",t.LOCKED="LOCKED",t.REDEEMED="REDEEMED",t.DEACTIVATED="DEACTIVATED",t))(Da||{});function Kp({uuid:t,children:e}){const[n,r]=x.useState(new Ws),{mutate:o,error:i}=dr({url:t,onData:s=>{const c=new Ws;c.type=s.type,c.uuid=s.uuid,c.contact=s.contact,c.currency=s.currency,c.events=s.events,c.inputData=s.input_data,c.loyaltyProgram=s.loyalty_program,c.results=s.results,r(c)}}),a=x.useMemo(()=>({uuid:t,portalSession:n,mutate:o,error:i}),[n,o,i]);return v.jsx(Lh.Provider,{value:a,children:e})}var rn=(t=>(t.GENERIC="GENERIC",t.GIFTCARD="GIFTCARD",t.REDEEM_GIFTCARD="REDEEM_GIFTCARD",t.TOP_UP_GIFTCARD="TOP_UP_GIFTCARD",t.PORTAL="PORTAL",t.PREPAID="PREPAID",t.PAY_PREPAID="PAY_PREPAID",t.TOP_UP_PREPAID="TOP_UP_PREPAID",t.POINTS_TRANSACTION="POINTS_TRANSACTION",t.VOUCHER="VOUCHER",t))(rn||{}),Ge=(t=>(t.GENERIC="/generic",t.GIFTCARD="/giftcard",t.PORTAL="/portal",t.PREPAID="/prepaid",t.PAY_PREPAID="/pay-prepaid",t.TOP_UP_PREPAID="/top-up-prepaid",t.POINTS_TRANSACTION="/points-transaction",t.VOUCHER="/voucher",t))(Ge||{}),Io=(t=>(t.CREDIT_RECEPTION="credit_reception",t.GIFTCARD_TRANSACTION="giftcard_transaction",t.VOUCHER_REDEEMED="voucher_redeemed",t.REWARD_RECEPTION="reward_reception",t.PREPAID_TRANSACTION="prepaid_transaction",t))(Io||{}),hc=(t=>(t[t.INPUT_INVALID=1003]="INPUT_INVALID",t[t.CONTACT_NOT_FOUND=55031]="CONTACT_NOT_FOUND",t))(hc||{}),Sn=(t=>(t.USER="user",t.ENVIRONMENT="environment",t))(Sn||{});const l3={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class pc{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||l3,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,o){return o&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new pc(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new pc(this.logger,e)}}var Hr=new pc;class gc{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[s,c]=a;for(let l=0;l<c;l++)s(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[s,c]=a;for(let l=0;l<c;l++)s.apply(s,[e,...r])})}}function Ma(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function zp(t){return t==null?"":""+t}function d3(t,e,n){t.forEach(r=>{e[r]&&(n[r]=e[r])})}const f3=/###/g;function La(t,e,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(f3,"."):s}function o(){return!t||typeof t=="string"}const i=typeof e!="string"?e:e.split(".");let a=0;for(;a<i.length-1;){if(o())return{};const s=r(i[a]);!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++a}return o()?{}:{obj:t,k:r(i[a])}}function $p(t,e,n){const{obj:r,k:o}=La(t,e,Object);if(r!==void 0||e.length===1){r[o]=n;return}let i=e[e.length-1],a=e.slice(0,e.length-1),s=La(t,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=La(t,a,Object),s&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n}function h3(t,e,n,r){const{obj:o,k:i}=La(t,e,Object);o[i]=o[i]||[],o[i].push(n)}function mc(t,e){const{obj:n,k:r}=La(t,e);if(n)return n[r]}function p3(t,e,n){const r=mc(t,n);return r!==void 0?r:mc(e,n)}function Xp(t,e,n){for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):Xp(t[r],e[r],n):t[r]=e[r]);return t}function Ri(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var g3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function m3(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>g3[e]):t}class y3{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const v3=[" ",",","?","!",";"],w3=new y3(20);function b3(t,e,n){e=e||"",n=n||"";const r=v3.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=w3.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(t);if(!i){const a=t.indexOf(n);a>0&&!o.test(t.substring(0,a))&&(i=!0)}return i}function Yl(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let o=t;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let a,s="";for(let c=i;c<r.length;++c)if(c!==i&&(s+=n),s+=r[c],a=o[s],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;i+=c-i+1;break}o=a}return o}function yc(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class Qp extends gc{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,n],r&&(Array.isArray(r)?s.push(...r):typeof r=="string"&&i?s.push(...r.split(i)):s.push(r)));const c=mc(this.data,s);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=s[0],n=s[1],r=s.slice(2).join(".")),c||!a||typeof r!="string"?c:Yl(this.data&&this.data[e]&&this.data[e][n],r,i)}addResource(e,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[e,n];r&&(s=s.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(s=e.split("."),o=n,n=s[1]),this.addNamespaces(n),$p(this.data,s,o),i.silent||this.emit("added",e,n,r,o)}addResources(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Array.isArray(r[i]))&&this.addResource(e,n,i,r[i],{silent:!0});o.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[e,n];e.indexOf(".")>-1&&(s=e.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let c=mc(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Xp(c,r,i):c={...c,...r},$p(this.data,s,c),a.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Jp={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,n,r,o))}),e}};const Zp={};class vc extends gc{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),d3(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Hr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,n);return r&&r.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!b3(e,r,o);if(a&&!s){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:i};const l=e.split(r);(r!==o||r===o&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(o)}return typeof i=="string"&&(i=[i]),{key:e,namespaces:i}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],n),c=s[s.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(f){const E=n.nsSeparator||this.options.nsSeparator;return o?{res:`${c}${E}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${E}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const h=this.resolve(e,n);let d=h&&h.res;const p=h&&h.usedKey||a,u=h&&h.exactUsedKey||a,g=Object.prototype.toString.apply(d),m=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&m.indexOf(g)<0&&!(typeof y=="string"&&Array.isArray(d))){if(!n.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(p,d,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(h.res=E,h.usedParams=this.getUsedParamsDetails(n),h):E}if(i){const E=Array.isArray(d),C=E?[]:{},S=E?u:p;for(const T in d)if(Object.prototype.hasOwnProperty.call(d,T)){const P=`${S}${i}${T}`;C[T]=this.translate(P,{...n,joinArrays:!1,ns:s}),C[T]===P&&(C[T]=d[T])}d=C}}else if(w&&typeof y=="string"&&Array.isArray(d))d=d.join(y),d&&(d=this.extendTranslation(d,e,n,r));else{let E=!1,C=!1;const S=n.count!==void 0&&typeof n.count!="string",T=vc.hasDefaultValue(n),P=S?this.pluralResolver.getSuffix(l,n.count,n):"",N=n.ordinal&&S?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",L=S&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),U=L&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${P}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(d)&&T&&(E=!0,d=U),this.isValidLookup(d)||(C=!0,d=a);const K=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:d,G=T&&U!==d&&this.options.updateMissing;if(C||E||G){if(this.logger.log(G?"updateKey":"missingKey",l,c,a,G?U:d),i){const te=this.resolve(a,{...n,keySeparator:!1});te&&te.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 k=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let te=0;te<V.length;te++)k.push(V[te]);else this.options.saveMissingTo==="all"?k=this.languageUtils.toResolveHierarchy(n.lng||this.language):k.push(n.lng||this.language);const z=(te,re,ne)=>{const se=T&&ne!==d?ne:K;this.options.missingKeyHandler?this.options.missingKeyHandler(te,c,re,se,G,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(te,c,re,se,G,n),this.emit("missingKey",te,c,re,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?k.forEach(te=>{const re=this.pluralResolver.getSuffixes(te,n);L&&n[`defaultValue${this.options.pluralSeparator}zero`]&&re.indexOf(`${this.options.pluralSeparator}zero`)<0&&re.push(`${this.options.pluralSeparator}zero`),re.forEach(ne=>{z([te],a+ne,n[`defaultValue${ne}`]||U)})}):z(k,a,U))}d=this.extendTranslation(d,e,n,h,r),C&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${c}:${a}`),(C||E)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,E?d:void 0):d=this.options.parseMissingKeyHandler(d))}return o?(h.res=d,h.usedParams=this.getUsedParamsDetails(n),h):d}extendTranslation(e,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=typeof e=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(l){const d=e.match(this.interpolator.nestingRegexp);f=d&&d.length}let h=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language,r),l){const d=e.match(this.interpolator.nestingRegexp),p=d&&d.length;f<p&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(r.lng=o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var d=arguments.length,p=new Array(d),u=0;u<d;u++)p[u]=arguments[u];return i&&i[0]===p[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):a.translate(...p,n)},r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,c=typeof s=="string"?[s]:s;return e!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(e=Jp.handle(c,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,a,s;return typeof e=="string"&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(c,n),f=l.key;o=f;let h=l.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=n.count!==void 0&&typeof n.count!="string",p=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),u=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(m=>{this.isValidLookup(r)||(s=m,!Zp[`${g[0]}-${m}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(Zp[`${g[0]}-${m}`]=!0,this.logger.warn(`key "${o}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" 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!!!")),g.forEach(y=>{if(this.isValidLookup(r))return;a=y;const w=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,y,m,n);else{let E;d&&(E=this.pluralResolver.getSuffix(y,n.count,n));const C=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(w.push(f+E),n.ordinal&&E.indexOf(S)===0&&w.push(f+E.replace(S,this.options.pluralSeparator)),p&&w.push(f+C)),u){const T=`${f}${this.options.contextSeparator}${n.context}`;w.push(T),d&&(w.push(T+E),n.ordinal&&E.indexOf(S)===0&&w.push(T+E.replace(S,this.options.pluralSeparator)),p&&w.push(T+C))}}let b;for(;b=w.pop();)this.isValidLookup(r)||(i=b,r=this.getResource(y,m,b,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,o):this.resourceStore.getResource(e,n,r,o)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&typeof e.replace!="string";let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}function Kl(t){return t.charAt(0).toUpperCase()+t.slice(1)}class e1{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Hr.create("languageUtils")}getScriptPartFromCode(e){if(e=yc(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=yc(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Kl(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Kl(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Kl(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):typeof e=="string"&&i(this.formatLanguageCode(e)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}let E3=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],C3={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const _3=["v1","v2","v3"],A3=["v4"],t1={zero:0,one:1,two:2,few:3,many:4,other:5};function S3(){const t={};return E3.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:C3[e.fc]}})}),t}class I3{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=Hr.create("pluralResolver"),(!this.options.compatibilityJSON||A3.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=S3()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(yc(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(o=>`${n}${o}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>t1[o]-t1[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(e,o,n)):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(e,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const r=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let o=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!_3.includes(this.options.compatibilityJSON)}}function n1(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=p3(t,e,n);return!i&&o&&typeof n=="string"&&(i=Yl(t,n,r),i===void 0&&(i=Yl(e,n,r))),i}class T3{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Hr.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:c,formatSeparator:l,unescapeSuffix:f,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:u,nestingSuffixEscaped:g,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:w}=e.interpolation;this.escape=n!==void 0?n:m3,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Ri(i):a||"{{",this.suffix=s?Ri(s):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Ri(d):p||Ri("$t("),this.nestingSuffix=u?Ri(u):g||Ri(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"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,n,r,o){let i,a,s;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(u){return u.replace(/\$/g,"$$$$")}const f=u=>{if(u.indexOf(this.formatSeparator)<0){const w=n1(n,c,u,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...o,...n,interpolationkey:u}):w}const g=u.split(this.formatSeparator),m=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(n1(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:m})};this.resetRegExp();const h=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:u=>l(u)},{regex:this.regexp,safeValue:u=>this.escapeValue?l(this.escape(u)):l(u)}].forEach(u=>{for(s=0;i=u.regex.exec(e);){const g=i[1].trim();if(a=f(g),a===void 0)if(typeof h=="function"){const y=h(e,i,o);a=typeof y=="string"?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))a="";else if(d){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=zp(a));const m=u.safeValue(a);if(e=e.replace(i[0],m),d?(u.regex.lastIndex+=a.length,u.regex.lastIndex-=i[0].length):u.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a;function s(c,l){const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const h=c.split(new RegExp(`${f}[ ]*{`));let d=`{${h[1]}`;c=h[0],d=this.interpolate(d,a);const p=d.match(/'/g),u=d.match(/"/g);(p&&p.length%2===0&&!u||u.length%2!==0)&&(d=d.replace(/'/g,'"'));try{a=JSON.parse(d),l&&(a={...l,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${f}${d}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c}for(;o=this.nestingRegexp.exec(e);){let c=[];a={...r},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const f=o[1].split(this.formatSeparator).map(h=>h.trim());o[1]=f.shift(),c=f,l=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===e&&typeof i!="string")return i;typeof i!="string"&&(i=zp(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),i=""),l&&(i=c.reduce((f,h)=>this.format(f,h,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),e=e.replace(o[0],i),this.regexp.lastIndex=0}return e}}function x3(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...c]=a.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),f=s.trim();n[f]||(n[f]=l),l==="false"&&(n[f]=!1),l==="true"&&(n[f]=!0),isNaN(l)||(n[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:n}}function Di(t){const e={};return function(r,o,i){const a=o+JSON.stringify(i);let s=e[a];return s||(s=t(yc(o),i),e[a]=s),s(r)}}class O3{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Hr.create("formatter"),this.options=e,this.formats={number:Di((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Di((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Di((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Di((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Di((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(e)}init(e){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Di(n)}format(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((s,c)=>{const{formatName:l,formatOptions:f}=x3(c);if(this.formats[l]){let h=s;try{const d=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},p=d.locale||d.lng||o.locale||o.lng||r;h=this.formats[l](s,p,{...f,...o,...d})}catch(d){this.logger.warn(d)}return h}else this.logger.warn(`there was no format function for ${l}`);return s},e)}}function P3(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class k3 extends gc{constructor(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Hr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(e,n,r,o){const i={},a={},s={},c={};return e.forEach(l=>{let f=!0;n.forEach(h=>{const d=`${l}|${h}`;!r.reload&&this.store.hasResourceBundle(l,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?a[d]===void 0&&(a[d]=!0):(this.state[d]=1,f=!1,a[d]===void 0&&(a[d]=!0),i[d]===void 0&&(i[d]=!0),c[h]===void 0&&(c[h]=!0)))}),f||(s[l]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const o=e.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const s={};this.queue.forEach(c=>{h3(c.loaded,[i],a),P3(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{s[l]||(s[l]={});const f=c.loaded[l];f.length&&f.forEach(h=>{s[l][h]===void 0&&(s[l][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(l&&f&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,o+1,i*2,a)},i);return}a(l,f)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const l=c(e,n);l&&typeof l.then=="function"?l.then(f=>s(null,f)).catch(s):s(null,l)}catch(l){s(l)}return}return c(e,n,s)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(e,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(e,a,s)})}saveMissing(e,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...a,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let f;l.length===5?f=l(e,n,r,o,c):f=l(e,n,r,o),f&&typeof f.then=="function"?f.then(h=>s(null,h)).catch(s):s(null,f)}catch(f){s(f)}else l(e,n,r,o,s,c)}!e||!e[0]||this.store.addResource(e[0],n,r,o)}}}function r1(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function o1(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function wc(){}function B3(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class Fa extends gc{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=o1(e),this.services={},this.logger=Hr,this.modules={external:[]},B3(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=r1();this.options={...o,...this.options,...o1(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?Hr.init(i(this.modules.logger),this.options):Hr.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=O3);const h=new e1(this.options);this.store=new Qp(this.options.resources,this.options);const d=this.services;d.logger=Hr,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new I3(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(d.formatter=i(f),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new T3(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new k3(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(p){for(var u=arguments.length,g=new Array(u>1?u-1:0),m=1;m<u;m++)g[m-1]=arguments[m];e.emit(p,...g)}),this.modules.languageDetector&&(d.languageDetector=i(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=i(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new vc(this.services,this.options),this.translator.on("*",function(p){for(var u=arguments.length,g=new Array(u>1?u-1:0),m=1;m<u;m++)g[m-1]=arguments[m];e.emit(p,...g)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=wc),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const c=Ma(),l=()=>{const f=(h,d)=>{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),c.resolve(d),r(h,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wc;const o=typeof e=="string"?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&i.indexOf(l)<0&&i.push(l)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,n,r){const o=Ma();return e||(e=this.languages),n||(n=this.options.ns),r||(r=wc),this.services.backendConnector.reload(e,n,i=>{o.resolve(),r(i)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Jp.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const o=Ma();this.emit("languageChanging",e);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,l)=>{l?(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},s=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const l=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,f=>{a(f,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),o}getFixedT(e,n,r){var o=this;const i=function(a,s){let c;if(typeof s!="object"){for(var l=arguments.length,f=new Array(l>2?l-2:0),h=2;h<l;h++)f[h-2]=arguments[h];c=o.options.overloadTranslationOptionHandler([a,s].concat(f))}else c={...s};c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix=c.keyPrefix||r||i.keyPrefix;const d=o.options.keySeparator||".";let p;return c.keyPrefix&&Array.isArray(a)?p=a.map(u=>`${c.keyPrefix}${d}${u}`):p=c.keyPrefix?`${c.keyPrefix}${d}${a}`:a,o.t(p,c)};return typeof e=="string"?i.lng=e:i.lngs=e,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,c)=>{const l=this.services.backendConnector.state[`${s}|${c}`];return l===-1||l===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!o||a(i,e)))}loadNamespaces(e,n){const r=Ma();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Ma();typeof e=="string"&&(e=[e]);const o=this.options.preload||[],i=e.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new e1(r1());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Fa(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wc;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},i=new Fa(o);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new Qp(this.store.data,o),i.services.resourceStore=i.store),i.translator=new vc(i.services,o),i.translator.on("*",function(s){for(var c=arguments.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=arguments[f];i.emit(s,...l)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const dn=Fa.createInstance();dn.createInstance=Fa.createInstance,dn.createInstance,dn.dir,dn.init,dn.loadResources,dn.reloadResources,dn.use,dn.changeLanguage,dn.getFixedT,dn.t,dn.exists,dn.setDefaultNamespace,dn.hasLoadedNamespace,dn.loadNamespaces,dn.loadLanguages;const Mi=(t,e="EUR")=>new Intl.NumberFormat(dn.language,{style:"currency",currency:e??"EUR"}).format(t/100),N3=t=>0 .toLocaleString(dn.language,{style:"currency",currency:t??"EUR",minimumFractionDigits:0,maximumFractionDigits:0}).replace(/\d/g,"").trim(),R3=t=>{window.parent.postMessage(t,"*")},i1=(t,e)=>Math.abs(Math.round((e.getTime()-t.getTime())/(1e3*3600*24))),a1=(t,e)=>Math.abs(Math.round((e.getTime()-t.getTime())/(1e3*3600*24*7))),s1=(t,e)=>Math.abs(Math.round((e.getTime()-t.getTime())/(1e3*3600*24*365.25)));function D3(t){const{errorToast:e}=jt(),[n,r]=x.useState(),o=Dt(),i=()=>{const s={type:t.type??rn.PORTAL,api_key:t.apiKey,shop_uuid:t.shopUuid,contact_uuid:t.contactUuid};return t.cameraService&&(s.camera_service=t.cameraService),t.cameraFacingMode&&(s.facing_mode=t.cameraFacingMode),t.amountInCents&&(s.amount_in_cents=t.amountInCents),t.allowMultipleGiftcards&&(s.allow_multiple_giftcards=t.allowMultipleGiftcards),t.enableRegistration&&(s.enable_registration=t.enableRegistration),t.enableEmailIdentification&&(s.enable_email_identification=t.enableEmailIdentification),t.enableOnScreenKeyboard&&(s.enable_on_screen_keyboard=t.enableOnScreenKeyboard),t.primaryIdentificationMethod&&(s.primary_identification_method=t.primaryIdentificationMethod),t.enableMarketingPreferences&&(s.enable_marketing_preferences=t.enableMarketingPreferences),s},a=()=>{o.post("/",i(),{baseURL:`${t.host}/api/v1/portal-sessions`,headers:{Authorization:`Bearer ${t.apiKey}`}}).then(s=>{const c=new Ws;c.type=s.data.data.type,c.uuid=s.data.data.uuid,c.contact=s.data.data.contact,c.currency=s.data.data.currency,c.events=s.data.data.events,c.inputData=s.data.data.input_data,c.loyaltyProgram=s.data.data.loyalty_program,c.results=s.data.data.results,r(c)}).catch(e)};return x.useEffect(()=>a(),[]),{portalSession:n}}var c1={exports:{}};/*!
52
52
  Copyright (c) 2018 Jed Watson.
53
53
  Licensed under the MIT License (MIT), see
54
54
  http://jedwatson.github.io/classnames
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leatcom/portal-sessions",
3
- "version": "0.0.112",
3
+ "version": "0.0.114",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -26,7 +26,7 @@
26
26
  "build:development": "tsc && vite build --mode staging",
27
27
  "build:production": "tsc && vite build --mode production",
28
28
  "preview": "vite preview",
29
- "publish-to-registry": "yarn build:production && yarn publish --patch --network-timeout 600000 && git push",
29
+ "publish-to-registry": "yarn version --patch && yarn build:production && yarn publish --non-interactive --network-timeout 600000 && git push --follow-tags",
30
30
  "publish-beta": "yarn build:production && yarn publish --tag beta",
31
31
  "test": "vitest --environment=jsdom",
32
32
  "link-local": "yarn link && cd node_modules/react && yarn link && cd ../react-dom && yarn link",