@nizza/core 0.5.0-beta.9 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,5 +1,7 @@
1
- "use strict";var un=Object.defineProperty;var cn=(n,e,t)=>e in n?un(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var R=(n,e,t)=>(cn(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),mn=require("react/jsx-runtime");function fn(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const M=fn(j);var _={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let pn=0;function hn(n,e){const t=`atom${++pn}`,i={toString:()=>t};return typeof n=="function"?i.read=n:(i.init=n,i.read=function(a){return a(this)},i.write=function(a,s,r){return s(this,typeof r=="function"?r(a(this)):r)}),e&&(i.write=e),i}const ke=n=>"init"in n,ve=n=>!!n.write,re=new WeakMap,gn=(n,e)=>{re.set(n,e),n.catch(()=>{}).finally(()=>re.delete(n))},Pe=(n,e)=>{const t=re.get(n);t&&(re.delete(n),t(e))},Ve=(n,e)=>{n.status="fulfilled",n.value=e},_e=(n,e)=>{n.status="rejected",n.reason=e},kn=n=>typeof(n==null?void 0:n.then)=="function",W=(n,e)=>!!n&&"v"in n&&"v"in e&&Object.is(n.v,e.v),Ue=(n,e)=>!!n&&"e"in n&&"e"in e&&Object.is(n.e,e.e),z=n=>!!n&&"v"in n&&n.v instanceof Promise,vn=(n,e)=>"v"in n&&"v"in e&&n.v.orig&&n.v.orig===e.v.orig,ne=n=>{if("e"in n)throw n.e;return n.v},pt=()=>{const n=new WeakMap,e=new WeakMap,t=new Map;let i,a;(_?"production":void 0)!=="production"&&(i=new Set,a=new Set);const s=m=>n.get(m),r=(m,p)=>{(_?"production":void 0)!=="production"&&Object.freeze(p);const h=n.get(m);if(n.set(m,p),t.has(m)||t.set(m,h),z(h)){const g="v"in p?p.v instanceof Promise?p.v:Promise.resolve(p.v):Promise.reject(p.e);h.v!==g&&Pe(h.v,g)}},o=(m,p,h)=>{const g=new Map;let b=!1;h.forEach((C,v)=>{!C&&v===m&&(C=p),C?(g.set(v,C),p.d.get(v)!==C&&(b=!0)):(_?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(b||p.d.size!==g.size)&&(p.d=g)},l=(m,p,h)=>{const g=s(m),b={d:(g==null?void 0:g.d)||new Map,v:p};if(h&&o(m,b,h),W(g,b)&&g.d===b.d)return g;if(z(g)&&z(b)&&vn(g,b)){if(g.d===b.d)return g;b.v=g.v}return r(m,b),b},u=(m,p,h,g)=>{if(kn(p)){let b;const C=()=>{const E=s(m);if(!z(E)||E.v!==v)return;const P=l(m,v,h);e.has(m)&&E.d!==P.d&&D(m,P,E.d)},v=new Promise((E,P)=>{let x=!1;p.then(T=>{x||(x=!0,Ve(v,T),E(T),C())},T=>{x||(x=!0,_e(v,T),P(T),C())}),b=T=>{x||(x=!0,T.then(V=>Ve(v,V),V=>_e(v,V)),E(T))}});return v.orig=p,v.status="pending",gn(v,E=>{E&&b(E),g==null||g()}),l(m,v,h)}return l(m,p,h)},d=(m,p,h)=>{const g=s(m),b={d:(g==null?void 0:g.d)||new Map,e:p};return h&&o(m,b,h),Ue(g,b)&&g.d===b.d?g:(r(m,b),b)},f=(m,p)=>{const h=s(m);if(!p&&h&&(e.has(m)||Array.from(h.d).every(([x,T])=>{if(x===m)return!0;const V=f(x);return V===T||W(V,T)})))return h;const g=new Map;let b=!0;const C=x=>{if(x===m){const V=s(x);if(V)return g.set(x,V),ne(V);if(ke(x))return g.set(x,void 0),x.init;throw new Error("no atom init")}const T=f(x);return g.set(x,T),ne(T)};let v,E;const P={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return(_?"production":void 0)!=="production"&&!ve(m)&&console.warn("setSelf function cannot be used with read-only atom"),!E&&ve(m)&&(E=(...x)=>{if((_?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return F(m,...x)}),E}};try{const x=m.read(C,P);return u(m,x,g,()=>v==null?void 0:v.abort())}catch(x){return d(m,x,g)}finally{b=!1}},c=m=>ne(f(m)),S=m=>{let p=e.get(m);return p||(p=I(m)),p},y=(m,p)=>!p.l.size&&(!p.t.size||p.t.size===1&&p.t.has(m)),k=m=>{const p=e.get(m);p&&y(m,p)&&w(m)},N=m=>{const p=new Map,h=new WeakMap,g=v=>{var E;const P=new Set((E=e.get(v))==null?void 0:E.t);return t.forEach((x,T)=>{var V;(V=s(T))!=null&&V.d.has(v)&&P.add(T)}),P},b=v=>{g(v).forEach(E=>{E!==v&&(p.set(E,(p.get(E)||new Set).add(v)),h.set(E,(h.get(E)||0)+1),b(E))})};b(m);const C=v=>{g(v).forEach(E=>{var P;if(E!==v){let x=h.get(E);if(x&&h.set(E,--x),!x){let T=!!((P=p.get(E))!=null&&P.size);if(T){const V=s(E),te=f(E,!0);T=!W(V,te)}T||p.forEach(V=>V.delete(E))}C(E)}})};C(m)},O=(m,...p)=>{let h=!0;const g=v=>ne(f(v)),b=(v,...E)=>{let P;if(v===m){if(!ke(v))throw new Error("atom not writable");const x=s(v),T=u(v,E[0]);W(x,T)||N(v)}else P=O(v,...E);if(!h){const x=L();(_?"production":void 0)!=="production"&&i.forEach(T=>T({type:"async-write",flushed:x}))}return P},C=m.write(g,b,...p);return h=!1,C},F=(m,...p)=>{const h=O(m,...p),g=L();return(_?"production":void 0)!=="production"&&i.forEach(b=>b({type:"write",flushed:g})),h},I=(m,p,h)=>{var g;const b=h||[];(g=s(m))==null||g.d.forEach((v,E)=>{const P=e.get(E);P?P.t.add(m):E!==m&&I(E,m,b)}),f(m);const C={t:new Set(p&&[p]),l:new Set};if(e.set(m,C),(_?"production":void 0)!=="production"&&a.add(m),ve(m)&&m.onMount){const{onMount:v}=m;b.push(()=>{const E=v((...P)=>F(m,...P));E&&(C.u=E)})}return h||b.forEach(v=>v()),C},w=m=>{var p;const h=(p=e.get(m))==null?void 0:p.u;h&&h(),e.delete(m),(_?"production":void 0)!=="production"&&a.delete(m);const g=s(m);g?(z(g)&&Pe(g.v),g.d.forEach((b,C)=>{if(C!==m){const v=e.get(C);v&&(v.t.delete(m),y(C,v)&&w(C))}})):(_?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},D=(m,p,h)=>{const g=new Set(p.d.keys());h==null||h.forEach((b,C)=>{if(g.has(C)){g.delete(C);return}const v=e.get(C);v&&(v.t.delete(m),y(C,v)&&w(C))}),g.forEach(b=>{const C=e.get(b);C?C.t.add(m):e.has(m)&&I(b,m)})},L=()=>{let m;for((_?"production":void 0)!=="production"&&(m=new Set);t.size;){const p=Array.from(t);t.clear(),p.forEach(([h,g])=>{const b=s(h);if(b){const C=e.get(h);C&&b.d!==(g==null?void 0:g.d)&&D(h,b,g==null?void 0:g.d),C&&!(!z(g)&&(W(g,b)||Ue(g,b)))&&(C.l.forEach(v=>v()),(_?"production":void 0)!=="production"&&m.add(h))}else(_?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((_?"production":void 0)!=="production")return m},A=(m,p)=>{const h=S(m),g=L(),b=h.l;return b.add(p),(_?"production":void 0)!=="production"&&i.forEach(C=>C({type:"sub",flushed:g})),()=>{b.delete(p),k(m),(_?"production":void 0)!=="production"&&i.forEach(C=>C({type:"unsub"}))}};return(_?"production":void 0)!=="production"?{get:c,set:F,sub:A,dev_subscribe_store:(m,p)=>{if(p!==2)throw new Error("The current StoreListener revision is 2.");return i.add(m),()=>{i.delete(m)}},dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:m=>n.get(m),dev_get_mounted:m=>e.get(m),dev_restore_atoms:m=>{for(const[h,g]of m)ke(h)&&(u(h,g),N(h));const p=L();i.forEach(h=>h({type:"restore",flushed:p}))}}:{get:c,set:F,sub:A}};let Se;(_?"production":void 0)!=="production"&&(typeof globalThis.__NUMBER_OF_JOTAI_INSTANCES__=="number"?++globalThis.__NUMBER_OF_JOTAI_INSTANCES__:globalThis.__NUMBER_OF_JOTAI_INSTANCES__=1);const Sn=()=>(Se||((_?"production":void 0)!=="production"&&globalThis.__NUMBER_OF_JOTAI_INSTANCES__!==1&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"),Se=pt()),Se);var yn={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Nn=j.createContext(void 0),ht=n=>{const e=j.useContext(Nn);return(n==null?void 0:n.store)||e||Sn()},bn=n=>typeof(n==null?void 0:n.then)=="function",Fn=j.use||(n=>{if(n.status==="pending")throw n;if(n.status==="fulfilled")return n.value;throw n.status==="rejected"?n.reason:(n.status="pending",n.then(e=>{n.status="fulfilled",n.value=e},e=>{n.status="rejected",n.reason=e}),n)});function wn(n,e){const t=ht(e),[[i,a,s],r]=j.useReducer(u=>{const d=t.get(n);return Object.is(u[0],d)&&u[1]===t&&u[2]===n?u:[d,t,n]},void 0,()=>[t.get(n),t,n]);let o=i;(a!==t||s!==n)&&(r(),o=t.get(n));const l=e==null?void 0:e.delay;return j.useEffect(()=>{const u=t.sub(n,()=>{if(typeof l=="number"){setTimeout(r,l);return}r()});return r(),u},[t,n,l]),j.useDebugValue(o),bn(o)?Fn(o):o}function Cn(n,e){const t=ht(e);return j.useCallback((...a)=>{if((yn?"production":void 0)!=="production"&&!("write"in n))throw new Error("not writable atom");return t.set(n,...a)},[t,n])}function En(n,e){return[wn(n,e),Cn(n,e)]}const fe=hn(null);fe.debugLabel="accountAtom";var xn={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{NZ_AWS_REGION:On,NZ_BACKOFFICE_BACK_URL:Rn,NZ_CORE_SERVICES_GRAPHQL_URL:Tn,NZ_CORE_SERVICES_REST_URL:In}=xn,Dn={AWS:{region:On,cognito:{userPoolId:"us-east-1_knSlGEmJ0",userPoolWebClientId:"3hmbfhf7nl3kq20qr9i5lihf1p"}},apiUrls:{restV1:Rn||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:In||"https://core-services-dev.nizza.com/api",graphql:Tn||"https://core-services-dev.nizza.com/graphql",corsProxy:"https://1qmd8jteh1.execute-api.us-east-1.amazonaws.com"},publicUrls:{platformSite:"https://platformdev.nizza.com",nizzaCdn:"https://cdn.nizza.com",bundleSite:"https://bundledev.nizza.com",wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};async function Ce(n){const{url:e,method:t="GET",body:i,raw:a=!1,contentTypeJson:s=!0,timeout:r,...o}=n,l=s&&!n.headers?new Headers({"content-type":"application/json"}):n.headers;try{const u=new AbortController,{signal:d}=u;let f;const c=fetch(e,{method:t,headers:l,body:i,signal:d,...o});r&&(f=setTimeout(()=>{u.abort()},r));const S=await c;if(a)return S;const y=await S.json();if(clearTimeout(f),!S.ok){const k=y?JSON.stringify(y):S.statusText;throw new Error(k)}return y}catch(u){throw console.error("[CustomFetch] ",u),u}}const Ln=n=>Ce({...n,contentTypeJson:!1,raw:!1});function An(n,e,t){fetch(e).then(i=>i.blob()).then(i=>gt(i,`${n}.${t}`))}const gt=(n,e,t)=>{const i=[n],a=new Blob(i,{type:t!=null?t:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(a,e);const s=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),r=document.createElement("a");return r.style.display="none",r.href=s,r.setAttribute("download",e),typeof r.download=="undefined"&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),setTimeout(()=>{document.body.removeChild(r),window.URL.revokeObjectURL(s)},200)};function Pn(){var i,a,s;let n=null,e=null,t=null;try{n=(s=(a=(i=Intl.DateTimeFormat())==null?void 0:i.resolvedOptions())==null?void 0:a.timeZone)!=null?s:null;const r=-new Date().getTimezoneOffset();t=r;const o=r>=0?"+":"-",l=String(Math.floor(Math.abs(r)/60)).padStart(2,"0"),u=String(Math.abs(r)%60).padStart(2,"0");e=`${o}${l}:${u}`}catch(r){console.error("getClientTimeZone Error obtaining time zone or offset",r)}return{offset:e,offsetValue:t,value:n,country:null,included:null,label:null}}let Vn=(n=21)=>crypto.getRandomValues(new Uint8Array(n)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");const kt=(n=8)=>Vn(n),_n=n=>{const e=Object.entries(n).reduce((t,[i,a])=>a!==void 0?`${t}${t?"&":""}${i}=${a}`:t,"");return e?`?${e}`:""};function Un(){const n=new Error().stack.split(`
2
- `);return n.length<3?"":n[2].trim().substring(3)}var vt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ee(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var St={exports:{}};(function(n){(function(e,t){n.exports?n.exports=t():e.log=t()})(vt,function(){var e=function(){},t="undefined",i=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"];function s(k,N){var O=k[N];if(typeof O.bind=="function")return O.bind(k);try{return Function.prototype.bind.call(O,k)}catch{return function(){return Function.prototype.apply.apply(O,[k,arguments])}}}function r(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function o(k){return k==="debug"&&(k="log"),typeof console===t?!1:k==="trace"&&i?r:console[k]!==void 0?s(console,k):console.log!==void 0?s(console,"log"):e}function l(k,N){for(var O=0;O<a.length;O++){var F=a[O];this[F]=O<k?e:this.methodFactory(F,k,N)}this.log=this.debug}function u(k,N,O){return function(){typeof console!==t&&(l.call(this,N,O),this[k].apply(this,arguments))}}function d(k,N,O){return o(k)||u.apply(this,arguments)}function f(k,N,O){var F=this,I;N=N==null?"WARN":N;var w="loglevel";typeof k=="string"?w+=":"+k:typeof k=="symbol"&&(w=void 0);function D(p){var h=(a[p]||"silent").toUpperCase();if(!(typeof window===t||!w)){try{window.localStorage[w]=h;return}catch{}try{window.document.cookie=encodeURIComponent(w)+"="+h+";"}catch{}}}function L(){var p;if(!(typeof window===t||!w)){try{p=window.localStorage[w]}catch{}if(typeof p===t)try{var h=window.document.cookie,g=h.indexOf(encodeURIComponent(w)+"=");g!==-1&&(p=/^([^;]+)/.exec(h.slice(g))[1])}catch{}return F.levels[p]===void 0&&(p=void 0),p}}function A(){if(!(typeof window===t||!w)){try{window.localStorage.removeItem(w);return}catch{}try{window.document.cookie=encodeURIComponent(w)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}F.name=k,F.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},F.methodFactory=O||d,F.getLevel=function(){return I},F.setLevel=function(p,h){if(typeof p=="string"&&F.levels[p.toUpperCase()]!==void 0&&(p=F.levels[p.toUpperCase()]),typeof p=="number"&&p>=0&&p<=F.levels.SILENT){if(I=p,h!==!1&&D(p),l.call(F,p,k),typeof console===t&&p<F.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+p},F.setDefaultLevel=function(p){N=p,L()||F.setLevel(p,!1)},F.resetLevel=function(){F.setLevel(N,!1),A()},F.enableAll=function(p){F.setLevel(F.levels.TRACE,p)},F.disableAll=function(p){F.setLevel(F.levels.SILENT,p)};var m=L();m==null&&(m=N),F.setLevel(m,!1)}var c=new f,S={};c.getLogger=function(N){if(typeof N!="symbol"&&typeof N!="string"||N==="")throw new TypeError("You must supply a name when creating a logger.");var O=S[N];return O||(O=S[N]=new f(N,c.getLevel(),c.methodFactory)),O};var y=typeof window!==t?window.log:void 0;return c.noConflict=function(){return typeof window!==t&&window.log===c&&(window.log=y),c},c.getLoggers=function(){return S},c.default=c,c})})(St);var yt=St.exports;const ie=Ee(yt);var Nt={exports:{}};(function(n){(function(e,t){n.exports?n.exports=t():e.prefix=t(e)})(vt,function(e){var t=function(d){for(var f=1,c=arguments.length,S;f<c;f++)for(S in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],S)&&(d[S]=arguments[f][S]);return d},i={template:"[%t] %l:",levelFormatter:function(d){return d.toUpperCase()},nameFormatter:function(d){return d||"root"},timestampFormatter:function(d){return d.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},a,s={},r=function(d){if(!d||!d.getLogger)throw new TypeError("Argument is not a root logger");a=d},o=function(d,f){if(!d||!d.setLevel)throw new TypeError("Argument is not a logger");var c=d.methodFactory,S=d.name||"",y=s[S]||s[""]||i;function k(N,O,F){var I=c(N,O,F),w=s[F]||s[""],D=w.template.indexOf("%t")!==-1,L=w.template.indexOf("%l")!==-1,A=w.template.indexOf("%n")!==-1;return function(){for(var m="",p=arguments.length,h=Array(p),g=0;g<p;g++)h[g]=arguments[g];if(S||!s[F]){var b=w.timestampFormatter(new Date),C=w.levelFormatter(N),v=w.nameFormatter(F);w.format?m+=w.format(C,v,b):(m+=w.template,D&&(m=m.replace(/%t/,b)),L&&(m=m.replace(/%l/,C)),A&&(m=m.replace(/%n/,v))),h.length&&typeof h[0]=="string"?h[0]=m+" "+h[0]:h.unshift(m)}I.apply(void 0,h)}}return s[S]||(d.methodFactory=k),f=f||{},f.template&&(f.format=void 0),s[S]=t({},y,f),d.setLevel(d.getLevel()),a||d.warn("It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"),d},l={reg:r,apply:o},u;return e&&(u=e.prefix,l.noConflict=function(){return e.prefix===l&&(e.prefix=u),l}),l})})(Nt);var jn=Nt.exports;const je=Ee(jn);let bt=class{constructor(e){R(this,"defaultLevel",yt.levels.INFO);R(this,"namePrefix");this.namePrefix=e?`${e}-`:"",ie.setDefaultLevel(this.defaultLevel),je.reg(ie),je.apply(ie,{template:"[%t] %l (%n)",nameFormatter:t=>{var i;return(i=t==null?void 0:t.toLowerCase())!=null?i:""},timestampFormatter:()=>new Date().toTimeString().slice(0,8)})}createLogger(e){const t=this.namePrefix+e.toLowerCase(),i=ie.getLogger(t),a=localStorage.getItem(`loglevel:${t}`);return a?i.setLevel(a):i.setLevel(this.defaultLevel),i}};class Ft{constructor(e){R(this,"aggregate");R(this,"_numSetPropsApplied",0);this.aggregate=e}setProps(e){for(const[t,i]of Object.entries(e))t in this.aggregate&&(this.aggregate[t]=i);this._numSetPropsApplied++}get isFirstSetProps(){return this._numSetPropsApplied===1}}function wt(n){return new Ft(n)}class Mn{}class $n{constructor(e){R(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var xe=(n=>(n.VTEX="VTEX",n.VTEX_IO="VTEX-IO",n.VTEX_CMS="PORTAL-VTEX",n.PLATFORM="PLATFORM",n.UNKNOWN="UNKNOWN",n))(xe||{}),Ct=(n=>(n.PLATFORM="platform_module",n.ADENDA="subscription_module",n.APP_STORE="app_store",n))(Ct||{}),Oe=(n=>(n.ACTIVE="active_contract",n.INACTIVE="inactive_contract",n))(Oe||{}),Et=(n=>(n.LITE="lite",n.STANDARD="standard",n.PRO="pro",n))(Et||{}),xt=(n=>(n.LITE="PLAN_LITE",n.STANDARD="PLAN_ESTANDAR",n.PRO="PLAN_PRO",n.NONE="NO_PLAN",n))(xt||{}),Ot=(n=>(n.PAST="past",n.LIVE="live",n.FUTURE="future",n))(Ot||{});class pe{constructor(e){R(this,"root",wt(this));R(this,"id");R(this,"account");R(this,"accountType",xe.UNKNOWN);R(this,"username");R(this,"currencyConfig");R(this,"contractType");R(this,"nextDateMetricRecord");R(this,"spendedMinutes",0);R(this,"unlimitedService",!1);R(this,"hoursAvailable",0);R(this,"contractStatus",Oe.ACTIVE);R(this,"createdAt");R(this,"installationDateApp");R(this,"cxAccount");R(this,"freeService",!1);R(this,"subscriptionType",null);R(this,"minutesAvailable",0);R(this,"globalPage");R(this,"stripe");R(this,"descriptionPlan");R(this,"planType");R(this,"selectFreeTrial");R(this,"exceededFeatures");R(this,"host",null);this.root.setProps(e)}static toDomain(e){const{createdAt:t,username:i,...a}=e,s={...a,username:i!=null?i:a.account,createdAt:new Date(Number(t))};return new pe(s)}toPrimitives(){const{root:e,createdAt:t,...i}=this;return{...i,created:t.toISOString()}}}const zn=`${Dn.apiUrls.restV1}/accounts/v2`;class Rt{async get(e){const t=`${zn}/${e}`,{data:i}=await Ce({url:t});return i?pe.toDomain(i):null}}class ee extends Error{constructor(e,t,i){super(t),this.value=i,this.name=e}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value}}}}class Tt extends ee{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class It extends ee{constructor(e){var t;super("APP_UNEXPECTED_ERROR",(t=e.message)!=null?t:"An unexpected error occurred.",e)}}class Bn extends ee{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class Dt extends ee{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
1
+ "use strict";var Nr=Object.defineProperty;var Or=(t,e,n)=>e in t?Nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var T=(t,e,n)=>(Or(t,typeof e!="symbol"?e+"":e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),wr=require("react-dom"),Fr=require("react/jsx-runtime");function Ar(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Z=Ar($);var K={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let Er=0;function Cr(t,e){const n=`atom${++Er}`,i={toString:()=>n};return typeof t=="function"?i.read=t:(i.init=t,i.read=Tr,i.write=xr),e&&(i.write=e),i}function Tr(t){return t(this)}function xr(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const Wt=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Jt=t=>"init"in t,Zt=t=>!!t.write,bt=new WeakMap,Rr=(t,e)=>{bt.set(t,e),t.catch(()=>{}).finally(()=>bt.delete(t))},zn=(t,e)=>{const n=bt.get(t);n&&(bt.delete(t),n(e))},Kn=(t,e)=>{t.status="fulfilled",t.value=e},Gn=(t,e)=>{t.status="rejected",t.reason=e},Dr=t=>typeof(t==null?void 0:t.then)=="function",$e=(t,e)=>!!t&&"v"in t&&"v"in e&&Object.is(t.v,e.v),Qn=(t,e)=>!!t&&"e"in t&&"e"in e&&Object.is(t.e,e.e),we=t=>!!t&&"v"in t&&t.v instanceof Promise,Lr=(t,e)=>"v"in t&&"v"in e&&t.v.orig&&t.v.orig===e.v.orig,dt=t=>{if("e"in t)throw t.e;return t.v},Li=()=>{const t=new WeakMap,e=new WeakMap,n=new Map;let i,a;(K?"production":void 0)!=="production"&&(i=new Set,a=new Set);const r=m=>t.get(m),s=(m,y)=>{(K?"production":void 0)!=="production"&&Object.freeze(y);const S=r(m);if(t.set(m,y),n.has(m)||n.set(m,S),we(S)){const h="v"in y?y.v instanceof Promise?y.v:Promise.resolve(y.v):Promise.reject(y.e);S.v!==h&&zn(S.v,h)}},o=(m,y,S,h)=>{const b=new Map(h?y.d:null);let F=!1;S.forEach((p,A)=>{!p&&Wt(m,A)&&(p=y),p?(b.set(A,p),y.d.get(A)!==p&&(F=!0)):(K?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(F||y.d.size!==b.size)&&(y.d=b)},l=(m,y,S,h)=>{const b=r(m),F={d:(b==null?void 0:b.d)||new Map,v:y};if(S&&o(m,F,S,h),$e(b,F)&&b.d===F.d)return b;if(we(b)&&we(F)&&Lr(b,F)){if(b.d===F.d)return b;F.v=b.v}return s(m,F),F},u=(m,y,S,h)=>{if(Dr(y)){let b;const F=()=>{const A=r(m);if(!we(A)||A.v!==p)return;const U=l(m,p,S);e.has(m)&&A.d!==U.d&&C(m,U,A.d)},p=new Promise((A,U)=>{let D=!1;y.then(x=>{D||(D=!0,Kn(p,x),A(x),F())},x=>{D||(D=!0,Gn(p,x),U(x),F())}),b=x=>{D||(D=!0,x.then(B=>Kn(p,B),B=>Gn(p,B)),A(x))}});return p.orig=y,p.status="pending",Rr(p,A=>{A&&b(A),h==null||h()}),l(m,p,S,!0)}return l(m,y,S)},d=(m,y,S)=>{const h=r(m),b={d:(h==null?void 0:h.d)||new Map,e:y};return S&&o(m,b,S),Qn(h,b)&&h.d===b.d?h:(s(m,b),b)},f=(m,y)=>{const S=r(m);if(!y&&S&&(e.has(m)||Array.from(S.d).every(([D,x])=>{if(D===m)return!0;const B=f(D);return B===x||$e(B,x)})))return S;const h=new Map;let b=!0;const F=D=>{if(Wt(m,D)){const B=r(D);if(B)return h.set(D,B),dt(B);if(Jt(D))return h.set(D,void 0),D.init;throw new Error("no atom init")}const x=f(D);return h.set(D,x),dt(x)};let p,A;const U={get signal(){return p||(p=new AbortController),p.signal},get setSelf(){return(K?"production":void 0)!=="production"&&!Zt(m)&&console.warn("setSelf function cannot be used with read-only atom"),!A&&Zt(m)&&(A=(...D)=>{if((K?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return R(m,...D)}),A}};try{const D=m.read(F,U);return u(m,D,h,()=>p==null?void 0:p.abort())}catch(D){return d(m,D,h)}finally{b=!1}},c=m=>dt(f(m)),_=m=>{let y=e.get(m);return y||(y=P(m)),y},O=(m,y)=>!y.l.size&&(!y.t.size||y.t.size===1&&y.t.has(m)),g=m=>{const y=e.get(m);y&&O(m,y)&&w(m)},k=m=>{const y=p=>{var A;const U=new Set((A=e.get(p))==null?void 0:A.t);return n.forEach((D,x)=>{var B;(B=r(x))!=null&&B.d.has(p)&&U.add(x)}),U},S=new Array,h=new Set,b=p=>{if(!h.has(p)){h.add(p);for(const A of y(p))p!==A&&b(A);S.push(p)}};b(m);const F=new Set([m]);for(let p=S.length-1;p>=0;--p){const A=S[p],U=r(A);if(!U)continue;let D=!1;for(const x of U.d.keys())if(x!==A&&F.has(x)){D=!0;break}if(D){const x=f(A,!0);$e(U,x)||F.add(A)}}},N=(m,...y)=>{let S=!0;const h=p=>dt(f(p)),b=(p,...A)=>{let U;if(Wt(m,p)){if(!Jt(p))throw new Error("atom not writable");const D=r(p),x=u(p,A[0]);$e(D,x)||k(p)}else U=N(p,...A);if(!S){const D=I();(K?"production":void 0)!=="production"&&i.forEach(x=>x({type:"async-write",flushed:D}))}return U},F=m.write(h,b,...y);return S=!1,F},R=(m,...y)=>{const S=N(m,...y),h=I();return(K?"production":void 0)!=="production"&&i.forEach(b=>b({type:"write",flushed:h})),S},P=(m,y,S)=>{var h;const b=S||[];(h=r(m))==null||h.d.forEach((p,A)=>{const U=e.get(A);U?U.t.add(m):A!==m&&P(A,m,b)}),f(m);const F={t:new Set(y&&[y]),l:new Set};if(e.set(m,F),(K?"production":void 0)!=="production"&&a.add(m),Zt(m)&&m.onMount){const{onMount:p}=m;b.push(()=>{const A=p((...U)=>R(m,...U));A&&(F.u=A)})}return S||b.forEach(p=>p()),F},w=m=>{var y;const S=(y=e.get(m))==null?void 0:y.u;S&&S(),e.delete(m),(K?"production":void 0)!=="production"&&a.delete(m);const h=r(m);h?(we(h)&&zn(h.v),h.d.forEach((b,F)=>{if(F!==m){const p=e.get(F);p&&(p.t.delete(m),O(F,p)&&w(F))}})):(K?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},C=(m,y,S)=>{const h=new Set(y.d.keys()),b=new Set;S==null||S.forEach((F,p)=>{if(h.has(p)){h.delete(p);return}b.add(p);const A=e.get(p);A&&A.t.delete(m)}),h.forEach(F=>{const p=e.get(F);p?p.t.add(m):e.has(m)&&P(F,m)}),b.forEach(F=>{const p=e.get(F);p&&O(F,p)&&w(F)})},I=()=>{let m;for((K?"production":void 0)!=="production"&&(m=new Set);n.size;){const y=Array.from(n);n.clear(),y.forEach(([S,h])=>{const b=r(S);if(b){const F=e.get(S);F&&b.d!==(h==null?void 0:h.d)&&C(S,b,h==null?void 0:h.d),F&&!(!we(h)&&($e(h,b)||Qn(h,b)))&&(F.l.forEach(p=>p()),(K?"production":void 0)!=="production"&&m.add(S))}else(K?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((K?"production":void 0)!=="production")return m},j=(m,y)=>{const S=_(m),h=I(),b=S.l;return b.add(y),(K?"production":void 0)!=="production"&&i.forEach(F=>F({type:"sub",flushed:h})),()=>{b.delete(y),g(m),(K?"production":void 0)!=="production"&&i.forEach(F=>F({type:"unsub"}))}};return(K?"production":void 0)!=="production"?{get:c,set:R,sub:j,dev_subscribe_store:(m,y)=>{if(y!==2)throw new Error("The current StoreListener revision is 2.");return i.add(m),()=>{i.delete(m)}},dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:m=>t.get(m),dev_get_mounted:m=>e.get(m),dev_restore_atoms:m=>{for(const[S,h]of m)Jt(S)&&(u(S,h),k(S));const y=I();i.forEach(S=>S({type:"restore",flushed:y}))}}:{get:c,set:R,sub:j}};let Xt;(K?"production":void 0)!=="production"&&(typeof globalThis.__NUMBER_OF_JOTAI_INSTANCES__=="number"?++globalThis.__NUMBER_OF_JOTAI_INSTANCES__:globalThis.__NUMBER_OF_JOTAI_INSTANCES__=1);const Pr=()=>(Xt||((K?"production":void 0)!=="production"&&globalThis.__NUMBER_OF_JOTAI_INSTANCES__!==1&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"),Xt=Li()),Xt);var Ir={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Vr=$.createContext(void 0),Pi=t=>{const e=$.useContext(Vr);return(t==null?void 0:t.store)||e||Pr()},jr=t=>typeof(t==null?void 0:t.then)=="function",Ur=$.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)});function Mr(t,e){const n=Pi(e),[[i,a,r],s]=$.useReducer(u=>{const d=n.get(t);return Object.is(u[0],d)&&u[1]===n&&u[2]===t?u:[d,n,t]},void 0,()=>[n.get(t),n,t]);let o=i;(a!==n||r!==t)&&(s(),o=n.get(t));const l=e==null?void 0:e.delay;return $.useEffect(()=>{const u=n.sub(t,()=>{if(typeof l=="number"){setTimeout(s,l);return}s()});return s(),u},[n,t,l]),$.useDebugValue(o),jr(o)?Ur(o):o}function $r(t,e){const n=Pi(e);return $.useCallback((...a)=>{if((Ir?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...a)},[n,t])}function Br(t,e){return[Mr(t,e),$r(t,e)]}const Pt=Cr(null);Pt.debugLabel="accountAtom";var zr={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{NZ_AWS_REGION:Kr,NZ_BACKOFFICE_BACK_URL:Gr,NZ_CORE_SERVICES_GRAPHQL_URL:Qr,NZ_CORE_SERVICES_REST_URL:Hr}=zr,qr={AWS:{region:Kr,cognito:{userPoolId:"us-east-1_EZ7wuZ4ig",userPoolWebClientId:"2jok7cst8ebf6ppscrhji57gvr"}},apiUrls:{restV1:Gr||"https://b133h34s56.execute-api.us-east-1.amazonaws.com",restV2:Hr||"https://core-services-prod.nizza.com/api",graphql:Qr||"https://core-services-prod.nizza.com/graphql",corsProxy:"https://3hvqfl2xcg.execute-api.us-east-1.amazonaws.com"},publicUrls:{platformSite:"https://platform.nizza.com",nizzaCdn:"https://cdn.nizza.com",bundleSite:"https://bundle.nizza.com",wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};async function On(t){const{url:e,method:n="GET",body:i,raw:a=!1,contentTypeJson:r=!0,timeout:s,...o}=t,l=r&&!t.headers?new Headers({"content-type":"application/json"}):t.headers;try{const u=new AbortController,{signal:d}=u;let f;const c=fetch(e,{method:n,headers:l,body:i,signal:d,...o});s&&(f=setTimeout(()=>{u.abort()},s));const _=await c;if(a)return _;const O=await _.json();if(clearTimeout(f),!_.ok){const g=O?JSON.stringify(O):_.statusText;throw new Error(g)}return O}catch(u){throw console.error("[CustomFetch] ",u),u}}const Wr=t=>On({...t,contentTypeJson:!1,raw:!1});function Jr(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Ii(i,`${t}.${n}`))}const Ii=(t,e,n)=>{const i=[t],a=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(a,e);const r=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),s=document.createElement("a");return s.style.display="none",s.href=r,s.setAttribute("download",e),typeof s.download=="undefined"&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout(()=>{document.body.removeChild(s),window.URL.revokeObjectURL(r)},200)};function L(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];throw new Error(typeof t=="number"?"[MobX] minified error nr: "+t+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+t)}var Zr={};function wn(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:Zr}var Vi=Object.assign,St=Object.getOwnPropertyDescriptor,re=Object.defineProperty,It=Object.prototype,on=[];Object.freeze(on);var ji={};Object.freeze(ji);var Xr=typeof Proxy!="undefined",Yr=Object.toString();function Ui(){Xr||L("Proxy not available")}function Mi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var Te=function(){};function te(t){return typeof t=="function"}function ge(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function Vt(t){return t!==null&&typeof t=="object"}function he(t){if(!Vt(t))return!1;var e=Object.getPrototypeOf(t);if(e==null)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n.toString()===Yr}function $i(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function jt(t,e,n){re(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Bi(t,e,n){re(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Se(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Vt(i)&&i[n]===!0}}function Ie(t){return t instanceof Map}function it(t){return t instanceof Set}var zi=typeof Object.getOwnPropertySymbols!="undefined";function es(t){var e=Object.keys(t);if(!zi)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(i){return It.propertyIsEnumerable.call(t,i)})):e}var Ut=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:zi?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function Ki(t){return t===null?null:typeof t=="object"?""+t:t}function de(t,e){return It.hasOwnProperty.call(t,e)}var ts=Object.getOwnPropertyDescriptors||function(e){var n={};return Ut(e).forEach(function(i){n[i]=St(e,i)}),n};function Hn(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,as(i.key),i)}}function Fn(t,e,n){return e&&Hn(t.prototype,e),n&&Hn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ke(){return ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ke.apply(this,arguments)}function Gi(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ln(t,e)}function ln(t,e){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},ln(t,e)}function Yt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ns(t,e){if(t){if(typeof t=="string")return qn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qn(t,e)}}function qn(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function xe(t,e){var n=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=ns(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function is(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function as(t){var e=is(t,"string");return typeof e=="symbol"?e:String(e)}var ie=Symbol("mobx-stored-annotations");function se(t){function e(n,i){if(at(i))return t.decorate_20223_(n,i);Ve(n,i,t)}return Object.assign(e,t)}function Ve(t,e,n){de(t,ie)||jt(t,ie,ke({},t[ie])),ms(n)||(t[ie][e]=n)}function rs(t){return de(t,ie)||jt(t,ie,ke({},t[ie])),t[ie]}function at(t){return typeof t=="object"&&typeof t.kind=="string"}var E=Symbol("mobx administration"),rt=function(){function t(n){n===void 0&&(n="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=V.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=n}var e=t.prototype;return e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(i){return i()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(i){return i()})},e.reportObserved=function(){return ua(this)},e.reportChanged=function(){W(),da(this),J()},e.toString=function(){return this.name_},t}(),An=Se("Atom",rt);function Qi(t,e,n){e===void 0&&(e=Te),n===void 0&&(n=Te);var i=new rt(t);return e!==Te&&ko(i,e),n!==Te&&pa(i,n),i}function ss(t,e){return t===e}function os(t,e){return Ln(t,e)}function ls(t,e){return Ln(t,e,1)}function us(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var _t={identity:ss,structural:os,default:us,shallow:ls};function ye(t,e,n){return ya(t)?t:Array.isArray(t)?z.array(t,{name:n}):he(t)?z.object(t,void 0,{name:n}):Ie(t)?z.map(t,{name:n}):it(t)?z.set(t,{name:n}):typeof t=="function"&&!zt(t)&&!Ze(t)?$i(t)?De(t):Je(n,t):t}function ds(t,e,n){if(t==null||Xe(t)||Kt(t)||Ne(t)||je(t))return t;if(Array.isArray(t))return z.array(t,{name:n,deep:!1});if(he(t))return z.object(t,void 0,{name:n,deep:!1});if(Ie(t))return z.map(t,{name:n,deep:!1});if(it(t))return z.set(t,{name:n,deep:!1})}function Mt(t){return t}function cs(t,e){return Ln(t,e)?e:t}var fs="override";function ms(t){return t.annotationType_===fs}function st(t,e){return{annotationType_:t,options_:e,make_:hs,extend_:ps,decorate_20223_:vs}}function hs(t,e,n,i){var a;if((a=this.options_)!=null&&a.bound)return this.extend_(t,e,n,!1)===null?0:1;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if(zt(n.value))return 1;var r=Hi(t,this,e,n,!1);return re(i,e,r),2}function ps(t,e,n,i){var a=Hi(t,this,e,n);return t.defineProperty_(e,a,i)}function vs(t,e){var n=e.kind,i=e.name,a=e.addInitializer,r=this,s=function(u){var d,f,c,_;return be((d=(f=r.options_)==null?void 0:f.name)!=null?d:i.toString(),u,(c=(_=r.options_)==null?void 0:_.autoAction)!=null?c:!1)};if(n=="field"){a(function(){Ve(this,i,r)});return}if(n=="method"){var o;return zt(t)||(t=s(t)),(o=this.options_)!=null&&o.bound&&a(function(){var l=this,u=l[i].bind(l);u.isMobxAction=!0,l[i]=u}),t}L("Cannot apply '"+r.annotationType_+"' to '"+String(i)+"' (kind: "+n+"):"+(`
3
+ '`+r.annotationType_+"' can only be used on properties with a function value."))}function gs(t,e,n,i){e.annotationType_,i.value}function Hi(t,e,n,i,a){var r,s,o,l,u,d,f;a===void 0&&(a=v.safeDescriptors),gs(t,e,n,i);var c=i.value;if((r=e.options_)!=null&&r.bound){var _;c=c.bind((_=t.proxy_)!=null?_:t.target_)}return{value:be((s=(o=e.options_)==null?void 0:o.name)!=null?s:n.toString(),c,(l=(u=e.options_)==null?void 0:u.autoAction)!=null?l:!1,(d=e.options_)!=null&&d.bound?(f=t.proxy_)!=null?f:t.target_:void 0),configurable:a?t.isPlainObject_:!0,enumerable:!1,writable:!a}}function qi(t,e){return{annotationType_:t,options_:e,make_:ks,extend_:ys,decorate_20223_:bs}}function ks(t,e,n,i){var a;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((a=this.options_)!=null&&a.bound&&(!de(t.target_,e)||!Ze(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(Ze(n.value))return 1;var r=Wi(t,this,e,n,!1,!1);return re(i,e,r),2}function ys(t,e,n,i){var a,r=Wi(t,this,e,n,(a=this.options_)==null?void 0:a.bound);return t.defineProperty_(e,r,i)}function bs(t,e){var n,i=e.name,a=e.addInitializer;return Ze(t)||(t=De(t)),(n=this.options_)!=null&&n.bound&&a(function(){var r=this,s=r[i].bind(r);s.isMobXFlow=!0,r[i]=s}),t}function Ss(t,e,n,i){e.annotationType_,i.value}function Wi(t,e,n,i,a,r){r===void 0&&(r=v.safeDescriptors),Ss(t,e,n,i);var s=i.value;if(Ze(s)||(s=De(s)),a){var o;s=s.bind((o=t.proxy_)!=null?o:t.target_),s.isMobXFlow=!0}return{value:s,configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function En(t,e){return{annotationType_:t,options_:e,make_:_s,extend_:Ns,decorate_20223_:Os}}function _s(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Ns(t,e,n,i){return ws(t,this,e,n),t.defineComputedProperty_(e,ke({},this.options_,{get:n.get,set:n.set}),i)}function Os(t,e){var n=this,i=e.name,a=e.addInitializer;return a(function(){var r=Ue(this)[E],s=ke({},n.options_,{get:t,context:this});s.name||(s.name="ObservableObject."+i.toString()),r.values_.set(i,new Re(s))}),function(){return this[E].getObservablePropValue_(i)}}function ws(t,e,n,i){e.annotationType_,i.get}function $t(t,e){return{annotationType_:t,options_:e,make_:Fs,extend_:As,decorate_20223_:Es}}function Fs(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function As(t,e,n,i){var a,r;return Cs(t,this),t.defineObservableProperty_(e,n.value,(a=(r=this.options_)==null?void 0:r.enhancer)!=null?a:ye,i)}function Es(t,e){var n=this,i=e.kind,a=e.name,r=new WeakSet;function s(o,l){var u,d,f=Ue(o)[E],c=new ve(l,(u=(d=n.options_)==null?void 0:d.enhancer)!=null?u:ye,"ObservableObject."+a.toString(),!1);f.values_.set(a,c),r.add(o)}if(i=="accessor")return{get:function(){return r.has(this)||s(this,t.get.call(this)),this[E].getObservablePropValue_(a)},set:function(l){return r.has(this)||s(this,l),this[E].setObservablePropValue_(a,l)},init:function(l){return r.has(this)||s(this,l),l}}}function Cs(t,e,n,i){e.annotationType_}var Ts="true",xs=Ji();function Ji(t){return{annotationType_:Ts,options_:t,make_:Rs,extend_:Ds,decorate_20223_:Ls}}function Rs(t,e,n,i){var a,r;if(n.get)return pe.make_(t,e,n,i);if(n.set){var s=be(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:v.safeDescriptors?t.isPlainObject_:!0,set:s})===null?0:2:(re(i,e,{configurable:!0,set:s}),2)}if(i!==t.target_&&typeof n.value=="function"){var o;if($i(n.value)){var l,u=(l=this.options_)!=null&&l.autoBind?De.bound:De;return u.make_(t,e,n,i)}var d=(o=this.options_)!=null&&o.autoBind?Je.bound:Je;return d.make_(t,e,n,i)}var f=((a=this.options_)==null?void 0:a.deep)===!1?z.ref:z;if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var c;n.value=n.value.bind((c=t.proxy_)!=null?c:t.target_)}return f.make_(t,e,n,i)}function Ds(t,e,n,i){var a,r;if(n.get)return pe.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:v.safeDescriptors?t.isPlainObject_:!0,set:be(e.toString(),n.set)},i);if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var s;n.value=n.value.bind((s=t.proxy_)!=null?s:t.target_)}var o=((r=this.options_)==null?void 0:r.deep)===!1?z.ref:z;return o.extend_(t,e,n,i)}function Ls(t,e){L("'"+this.annotationType_+"' cannot be used as a decorator")}var Ps="observable",Is="observable.ref",Vs="observable.shallow",js="observable.struct",Zi={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Zi);function ct(t){return t||Zi}var un=$t(Ps),Us=$t(Is,{enhancer:Mt}),Ms=$t(Vs,{enhancer:ds}),$s=$t(js,{enhancer:cs}),Xi=se(un);function ft(t){return t.deep===!0?ye:t.deep===!1?Mt:zs(t.defaultDecorator)}function Bs(t){var e;return t?(e=t.defaultDecorator)!=null?e:Ji(t):void 0}function zs(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:ye}function Yi(t,e,n){if(at(e))return un.decorate_20223_(t,e);if(ge(e)){Ve(t,e,un);return}return ya(t)?t:he(t)?z.object(t,e,n):Array.isArray(t)?z.array(t,e):Ie(t)?z.map(t,e):it(t)?z.set(t,e):typeof t=="object"&&t!==null?t:z.box(t,e)}Vi(Yi,Xi);var Ks={box:function(e,n){var i=ct(n);return new ve(e,ft(i),i.name,!0,i.equals)},array:function(e,n){var i=ct(n);return(v.useProxies===!1||i.proxy===!1?Bo:Ro)(e,ft(i),i.name)},map:function(e,n){var i=ct(n);return new Oa(e,ft(i),i.name)},set:function(e,n){var i=ct(n);return new Aa(e,ft(i),i.name)},object:function(e,n,i){return Oe(function(){return _o(v.useProxies===!1||(i==null?void 0:i.proxy)===!1?Ue({},i):Co({},i),e,n)})},ref:se(Us),shallow:se(Ms),deep:Xi,struct:se($s)},z=Vi(Yi,Ks),ea="computed",Gs="computed.struct",dn=En(ea),Qs=En(Gs,{equals:_t.structural}),pe=function(e,n){if(at(n))return dn.decorate_20223_(e,n);if(ge(n))return Ve(e,n,dn);if(he(e))return se(En(ea,e));var i=he(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new Re(i)};Object.assign(pe,dn);pe.struct=se(Qs);var Wn,Jn,Nt=0,Hs=1,qs=(Wn=(Jn=St(function(){},"name"))==null?void 0:Jn.configurable)!=null?Wn:!1,Zn={value:"action",configurable:!0,writable:!1,enumerable:!1};function be(t,e,n,i){n===void 0&&(n=!1);function a(){return Ws(t,n,e,i||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return e.toString()},qs&&(Zn.value=t,re(a,"name",Zn)),a}function Ws(t,e,n,i,a){var r=Js(t,e);try{return n.apply(i,a)}catch(s){throw r.error_=s,s}finally{Zs(r)}}function Js(t,e,n,i){var a=!1,r=0,s=v.trackingDerivation,o=!e||!s;W();var l=v.allowStateChanges;o&&(_e(),l=Cn(!0));var u=xn(!0),d={runAsAction_:o,prevDerivation_:s,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:a,startTime_:r,actionId_:Hs++,parentActionId_:Nt};return Nt=d.actionId_,d}function Zs(t){Nt!==t.actionId_&&L(30),Nt=t.parentActionId_,t.error_!==void 0&&(v.suppressReactionErrors=!0),Tn(t.prevAllowStateChanges_),Qe(t.prevAllowStateReads_),J(),t.runAsAction_&&ce(t.prevDerivation_),v.suppressReactionErrors=!1}function Cn(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function Tn(t){v.allowStateChanges=t}var ta;ta=Symbol.toPrimitive;var ve=function(t){Gi(e,t);function e(i,a,r,s,o){var l;return r===void 0&&(r="ObservableValue"),o===void 0&&(o=_t.default),l=t.call(this,r)||this,l.enhancer=void 0,l.name_=void 0,l.equals=void 0,l.hasUnreportedChange_=!1,l.interceptors_=void 0,l.changeListeners_=void 0,l.value_=void 0,l.dehancer=void 0,l.enhancer=a,l.name_=r,l.equals=o,l.value_=a(i,void 0,r),l}var n=e.prototype;return n.dehanceValue=function(a){return this.dehancer!==void 0?this.dehancer(a):a},n.set=function(a){this.value_,a=this.prepareNewValue_(a),a!==v.UNCHANGED&&this.setNewValue_(a)},n.prepareNewValue_=function(a){if(H(this)){var r=q(this,{object:this,type:oe,newValue:a});if(!r)return v.UNCHANGED;a=r.newValue}return a=this.enhancer(a,this.value_,this.name_),this.equals(this.value_,a)?v.UNCHANGED:a},n.setNewValue_=function(a){var r=this.value_;this.value_=a,this.reportChanged(),Y(this)&&ee(this,{type:oe,object:this,newValue:a,oldValue:r})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(a){return ot(this,a)},n.observe_=function(a,r){return r&&a({observableKind:"value",debugObjectName:this.name_,object:this,type:oe,newValue:this.value_,oldValue:void 0}),lt(this,a)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Ki(this.get())},n[ta]=function(){return this.valueOf()},e}(rt),na;na=Symbol.toPrimitive;var Re=function(){function t(n){this.dependenciesState_=V.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=V.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new wt(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Ot.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,n.get||L(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=be("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?_t.structural:_t.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){no(this)},e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(i){return i()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(i){return i()})},e.get=function(){if(this.isComputing_&&L(32,this.name_,this.derivation),v.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)cn(this)&&(this.warnAboutUntrackedRead_(),W(),this.value_=this.computeValue_(!1),J());else if(ua(this),cn(this)){var i=v.trackingContext;this.keepAlive_&&!i&&(v.trackingContext=this),this.trackAndCompute()&&to(this),v.trackingContext=i}var a=this.value_;if(vt(a))throw a.cause;return a},e.set=function(i){if(this.setter_){this.isRunningSetter_&&L(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter_=!1}}else L(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,a=this.dependenciesState_===V.NOT_TRACKING_,r=this.computeValue_(!0),s=a||vt(i)||vt(r)||!this.equals_(i,r);return s&&(this.value_=r),s},e.computeValue_=function(i){this.isComputing_=!0;var a=Cn(!1),r;if(i)r=ia(this,this.derivation,this.scope_);else if(v.disableErrorBoundaries===!0)r=this.derivation.call(this.scope_);else try{r=this.derivation.call(this.scope_)}catch(s){r=new wt(s)}return Tn(a),this.isComputing_=!1,r},e.suspend_=function(){this.keepAlive_||(fn(this),this.value_=void 0)},e.observe_=function(i,a){var r=this,s=!0,o=void 0;return mo(function(){var l=r.get();if(!s||a){var u=_e();i({observableKind:"computed",debugObjectName:r.name_,type:oe,object:r,newValue:l,oldValue:o}),ce(u)}s=!1,o=l})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return Ki(this.get())},e[na]=function(){return this.valueOf()},t}(),Bt=Se("ComputedValue",Re),V;(function(t){t[t.NOT_TRACKING_=-1]="NOT_TRACKING_",t[t.UP_TO_DATE_=0]="UP_TO_DATE_",t[t.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",t[t.STALE_=2]="STALE_"})(V||(V={}));var Ot;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(Ot||(Ot={}));var wt=function(e){this.cause=void 0,this.cause=e};function vt(t){return t instanceof wt}function cn(t){switch(t.dependenciesState_){case V.UP_TO_DATE_:return!1;case V.NOT_TRACKING_:case V.STALE_:return!0;case V.POSSIBLY_STALE_:{for(var e=xn(!0),n=_e(),i=t.observing_,a=i.length,r=0;r<a;r++){var s=i[r];if(Bt(s)){if(v.disableErrorBoundaries)s.get();else try{s.get()}catch{return ce(n),Qe(e),!0}if(t.dependenciesState_===V.STALE_)return ce(n),Qe(e),!0}}return ra(t),ce(n),Qe(e),!1}}}function ia(t,e,n){var i=xn(!0);ra(t),t.newObserving_=new Array(t.observing_.length+100),t.unboundDepsCount_=0,t.runId_=++v.runId;var a=v.trackingDerivation;v.trackingDerivation=t,v.inBatch++;var r;if(v.disableErrorBoundaries===!0)r=e.call(n);else try{r=e.call(n)}catch(s){r=new wt(s)}return v.inBatch--,v.trackingDerivation=a,Xs(t),Qe(i),r}function Xs(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=V.UP_TO_DATE_,a=0,r=t.unboundDepsCount_,s=0;s<r;s++){var o=n[s];o.diffValue_===0&&(o.diffValue_=1,a!==s&&(n[a]=o),a++),o.dependenciesState_>i&&(i=o.dependenciesState_)}for(n.length=a,t.newObserving_=null,r=e.length;r--;){var l=e[r];l.diffValue_===0&&oa(l,t),l.diffValue_=0}for(;a--;){var u=n[a];u.diffValue_===1&&(u.diffValue_=0,eo(u,t))}i!==V.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function fn(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)oa(e[n],t);t.dependenciesState_=V.NOT_TRACKING_}function aa(t){var e=_e();try{return t()}finally{ce(e)}}function _e(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function ce(t){v.trackingDerivation=t}function xn(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function Qe(t){v.allowStateReads=t}function ra(t){if(t.dependenciesState_!==V.UP_TO_DATE_){t.dependenciesState_=V.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=V.UP_TO_DATE_}}var gt=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},kt=!0,sa=!1,v=function(){var t=wn();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(kt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new gt().version&&(kt=!1),kt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new gt):(setTimeout(function(){sa||L(35)},1),new gt)}();function Ys(){if((v.pendingReactions.length||v.inBatch||v.isRunningReactions)&&L(36),sa=!0,kt){var t=wn();--t.__mobxInstanceCount===0&&(t.__mobxGlobals=void 0),v=new gt}}function eo(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function oa(t,e){t.observers_.delete(e),t.observers_.size===0&&la(t)}function la(t){t.isPendingUnobservation_===!1&&(t.isPendingUnobservation_=!0,v.pendingUnobservations.push(t))}function W(){v.inBatch++}function J(){if(--v.inBatch===0){ca();for(var t=v.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation_=!1,n.observers_.size===0&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Re&&n.suspend_())}v.pendingUnobservations=[]}}function ua(t){var e=v.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved_&&v.trackingContext&&(t.isBeingObserved_=!0,t.onBO())),t.isBeingObserved_):(t.observers_.size===0&&v.inBatch>0&&la(t),!1)}function da(t){t.lowestObserverState_!==V.STALE_&&(t.lowestObserverState_=V.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===V.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=V.STALE_}))}function to(t){t.lowestObserverState_!==V.STALE_&&(t.lowestObserverState_=V.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===V.POSSIBLY_STALE_?e.dependenciesState_=V.STALE_:e.dependenciesState_===V.UP_TO_DATE_&&(t.lowestObserverState_=V.UP_TO_DATE_)}))}function no(t){t.lowestObserverState_===V.UP_TO_DATE_&&(t.lowestObserverState_=V.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===V.UP_TO_DATE_&&(e.dependenciesState_=V.POSSIBLY_STALE_,e.onBecomeStale_())}))}var We=function(){function t(n,i,a,r){n===void 0&&(n="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=V.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Ot.NONE,this.name_=n,this.onInvalidate_=i,this.errorHandler_=a,this.requiresObservable_=r}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,v.pendingReactions.push(this),ca())},e.isScheduled=function(){return this.isScheduled_},e.runReaction_=function(){if(!this.isDisposed_){W(),this.isScheduled_=!1;var i=v.trackingContext;if(v.trackingContext=this,cn(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}v.trackingContext=i,J()}},e.track=function(i){if(!this.isDisposed_){W(),this.isRunning_=!0;var a=v.trackingContext;v.trackingContext=this;var r=ia(this,i,void 0);v.trackingContext=a,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&fn(this),vt(r)&&this.reportExceptionInDerivation_(r.cause),J()}},e.reportExceptionInDerivation_=function(i){var a=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(v.disableErrorBoundaries)throw i;var r="[mobx] uncaught error in '"+this+"'";v.suppressReactionErrors||console.error(r,i),v.globalReactionErrorHandlers.forEach(function(s){return s(i,a)})},e.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(W(),fn(this),J()))},e.getDisposer_=function(i){var a=this,r=function s(){a.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",s)};return i==null||i.addEventListener==null||i.addEventListener("abort",r),r[E]=this,r},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},t}(),io=100,mn=function(e){return e()};function ca(){v.inBatch>0||v.isRunningReactions||mn(ao)}function ao(){v.isRunningReactions=!0;for(var t=v.pendingReactions,e=0;t.length>0;){++e===io&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),i=0,a=n.length;i<a;i++)n[i].runReaction_()}v.isRunningReactions=!1}var Ft=Se("Reaction",We);function ro(t){var e=mn;mn=function(i){return t(function(){return e(i)})}}function He(){return!1}function so(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var fa="action",oo="action.bound",ma="autoAction",lo="autoAction.bound",uo="<unnamed action>",hn=st(fa),co=st(oo,{bound:!0}),pn=st(ma,{autoAction:!0}),fo=st(lo,{autoAction:!0,bound:!0});function ha(t){var e=function(i,a){if(te(i))return be(i.name||uo,i,t);if(te(a))return be(i,a,t);if(at(a))return(t?pn:hn).decorate_20223_(i,a);if(ge(a))return Ve(i,a,t?pn:hn);if(ge(i))return se(st(t?ma:fa,{name:i,autoAction:t}))};return e}var fe=ha(!1);Object.assign(fe,hn);var Je=ha(!0);Object.assign(Je,pn);fe.bound=se(co);Je.bound=se(fo);function zt(t){return te(t)&&t.isMobxAction===!0}function mo(t,e){var n,i,a,r,s;e===void 0&&(e=ji);var o=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,u;if(l)u=new We(o,function(){this.track(c)},e.onError,e.requiresObservable);else{var d=po(e),f=!1;u=new We(o,function(){f||(f=!0,d(function(){f=!1,u.isDisposed_||u.track(c)}))},e.onError,e.requiresObservable)}function c(){t(u)}return(a=e)!=null&&(r=a.signal)!=null&&r.aborted||u.schedule_(),u.getDisposer_((s=e)==null?void 0:s.signal)}var ho=function(e){return e()};function po(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:ho}var vo="onBO",go="onBUO";function ko(t,e,n){return va(vo,t,e,n)}function pa(t,e,n){return va(go,t,e,n)}function va(t,e,n,i){var a=typeof i=="function"?Le(e,n):Le(e),r=te(i)?i:n,s=t+"L";return a[s]?a[s].add(r):a[s]=new Set([r]),function(){var o=a[s];o&&(o.delete(r),o.size===0&&delete a[s])}}var yo="never",mt="always",bo="observed";function So(t){t.isolateGlobalState===!0&&Ys();var e=t.useProxies,n=t.enforceActions;if(e!==void 0&&(v.useProxies=e===mt?!0:e===yo?!1:typeof Proxy!="undefined"),e==="ifavailable"&&(v.verifyProxies=!0),n!==void 0){var i=n===mt?mt:n===bo;v.enforceActions=i,v.allowStateChanges=!(i===!0||i===mt)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(a){a in t&&(v[a]=!!t[a])}),v.allowStateReads=!v.observableRequiresReaction,t.reactionScheduler&&ro(t.reactionScheduler)}function _o(t,e,n,i){var a=ts(e);return Oe(function(){var r=Ue(t,i)[E];Ut(a).forEach(function(s){r.extend_(s,a[s],n&&s in n?n[s]:!0)})}),t}function No(t,e){return ga(Le(t,e))}function ga(t){var e={name:t.name_};return t.observing_&&t.observing_.length>0&&(e.dependencies=Oo(t.observing_).map(ga)),e}function Oo(t){return Array.from(new Set(t))}var wo=0;function ka(){this.message="FLOW_CANCELLED"}ka.prototype=Object.create(Error.prototype);var en=qi("flow"),Fo=qi("flow.bound",{bound:!0}),De=Object.assign(function(e,n){if(at(n))return en.decorate_20223_(e,n);if(ge(n))return Ve(e,n,en);var i=e,a=i.name||"<unnamed flow>",r=function(){var o=this,l=arguments,u=++wo,d=fe(a+" - runid: "+u+" - init",i).apply(o,l),f,c=void 0,_=new Promise(function(O,g){var k=0;f=g;function N(w){c=void 0;var C;try{C=fe(a+" - runid: "+u+" - yield "+k++,d.next).call(d,w)}catch(I){return g(I)}P(C)}function R(w){c=void 0;var C;try{C=fe(a+" - runid: "+u+" - yield "+k++,d.throw).call(d,w)}catch(I){return g(I)}P(C)}function P(w){if(te(w==null?void 0:w.then)){w.then(P,g);return}return w.done?O(w.value):(c=Promise.resolve(w.value),c.then(N,R))}N(void 0)});return _.cancel=fe(a+" - runid: "+u+" - cancel",function(){try{c&&Xn(c);var O=d.return(void 0),g=Promise.resolve(O.value);g.then(Te,Te),Xn(g),f(new ka)}catch(k){f(k)}}),_};return r.isMobXFlow=!0,r},en);De.bound=se(Fo);function Xn(t){te(t.cancel)&&t.cancel()}function Ze(t){return(t==null?void 0:t.isMobXFlow)===!0}function Ao(t,e){return t?e!==void 0?Xe(t)?t[E].values_.has(e):!1:Xe(t)||!!t[E]||An(t)||Ft(t)||Bt(t):!1}function ya(t){return Ao(t)}function le(t,e){e===void 0&&(e=void 0),W();try{return t.apply(e)}finally{J()}}function Fe(t){return t[E]}var Eo={has:function(e,n){return Fe(e).has_(n)},get:function(e,n){return Fe(e).get_(n)},set:function(e,n,i){var a;return ge(n)?(a=Fe(e).set_(n,i,!0))!=null?a:!0:!1},deleteProperty:function(e,n){var i;return ge(n)?(i=Fe(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var a;return(a=Fe(e).defineProperty_(n,i))!=null?a:!0},ownKeys:function(e){return Fe(e).ownKeys_()},preventExtensions:function(e){L(13)}};function Co(t,e){var n,i;return Ui(),t=Ue(t,e),(i=(n=t[E]).proxy_)!=null?i:n.proxy_=new Proxy(t,Eo)}function H(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function ot(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),Mi(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function q(t,e){var n=_e();try{for(var i=[].concat(t.interceptors_||[]),a=0,r=i.length;a<r&&(e=i[a](e),e&&!e.type&&L(14),!!e);a++);return e}finally{ce(n)}}function Y(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function lt(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),Mi(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function ee(t,e){var n=_e(),i=t.changeListeners_;if(i){i=i.slice();for(var a=0,r=i.length;a<r;a++)i[a](e);ce(n)}}function ba(t,e,n){return Oe(function(){var i,a=Ue(t,n)[E];(i=e)!=null||(e=rs(t)),Ut(e).forEach(function(r){return a.make_(r,e[r])})}),t}var Yn="splice",oe="update",To=1e4,xo={get:function(e,n){var i=e[E];return n===E?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):de(At,n)?At[n]:e[n]},set:function(e,n,i){var a=e[E];return n==="length"&&a.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:a.set_(parseInt(n),i),!0},preventExtensions:function(){L(15)}},Rn=function(){function t(n,i,a,r){n===void 0&&(n="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=a,this.legacyMode_=r,this.atom_=new rt(n),this.enhancer_=function(s,o){return i(s,o,"ObservableArray[..]")}}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.dehanceValues_=function(i){return this.dehancer!==void 0&&i.length>0?i.map(this.dehancer):i},e.intercept_=function(i){return ot(this,i)},e.observe_=function(i,a){return a===void 0&&(a=!1),a&&i({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),lt(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&L("Out of range: "+i);var a=this.values_.length;if(i!==a)if(i>a){for(var r=new Array(i-a),s=0;s<i-a;s++)r[s]=void 0;this.spliceWithArray_(a,0,r)}else this.spliceWithArray_(i,a-i)},e.updateArrayLength_=function(i,a){i!==this.lastKnownLength_&&L(16),this.lastKnownLength_+=a,this.legacyMode_&&a>0&&xa(i+a+1)},e.spliceWithArray_=function(i,a,r){var s=this;this.atom_;var o=this.values_.length;if(i===void 0?i=0:i>o?i=o:i<0&&(i=Math.max(0,o+i)),arguments.length===1?a=o-i:a==null?a=0:a=Math.max(0,Math.min(a,o-i)),r===void 0&&(r=on),H(this)){var l=q(this,{object:this.proxy_,type:Yn,index:i,removedCount:a,added:r});if(!l)return on;a=l.removedCount,r=l.added}if(r=r.length===0?r:r.map(function(f){return s.enhancer_(f,void 0)}),this.legacyMode_){var u=r.length-a;this.updateArrayLength_(o,u)}var d=this.spliceItemsIntoValues_(i,a,r);return(a!==0||r.length!==0)&&this.notifyArraySplice_(i,r,d),this.dehanceValues_(d)},e.spliceItemsIntoValues_=function(i,a,r){if(r.length<To){var s;return(s=this.values_).splice.apply(s,[i,a].concat(r))}else{var o=this.values_.slice(i,i+a),l=this.values_.slice(i+a);this.values_.length+=r.length-a;for(var u=0;u<r.length;u++)this.values_[i+u]=r[u];for(var d=0;d<l.length;d++)this.values_[i+r.length+d]=l[d];return o}},e.notifyArrayChildUpdate_=function(i,a,r){var s=!this.owned_&&He(),o=Y(this),l=o||s?{observableKind:"array",object:this.proxy_,type:oe,debugObjectName:this.atom_.name_,index:i,newValue:a,oldValue:r}:null;this.atom_.reportChanged(),o&&ee(this,l)},e.notifyArraySplice_=function(i,a,r){var s=!this.owned_&&He(),o=Y(this),l=o||s?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Yn,index:i,removed:r,added:a,removedCount:r.length,addedCount:a.length}:null;this.atom_.reportChanged(),o&&ee(this,l)},e.get_=function(i){if(this.legacyMode_&&i>=this.values_.length){console.warn("[mobx] Out of bounds read: "+i);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[i])},e.set_=function(i,a){var r=this.values_;if(this.legacyMode_&&i>r.length&&L(17,i,r.length),i<r.length){this.atom_;var s=r[i];if(H(this)){var o=q(this,{type:oe,object:this.proxy_,index:i,newValue:a});if(!o)return;a=o.newValue}a=this.enhancer_(a,s);var l=a!==s;l&&(r[i]=a,this.notifyArrayChildUpdate_(i,a,s))}else{for(var u=new Array(i+1-r.length),d=0;d<u.length-1;d++)u[d]=void 0;u[u.length-1]=a,this.spliceWithArray_(r.length,0,u)}},t}();function Ro(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),Ui(),Oe(function(){var a=new Rn(n,e,i,!1);Bi(a.values_,E,a);var r=new Proxy(a.values_,xo);return a.proxy_=r,t&&t.length&&a.spliceWithArray_(0,0,t),r})}var At={clear:function(){return this.splice(0)},replace:function(e){var n=this[E];return n.spliceWithArray_(0,n.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,n){for(var i=arguments.length,a=new Array(i>2?i-2:0),r=2;r<i;r++)a[r-2]=arguments[r];var s=this[E];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,n)}return s.spliceWithArray_(e,n,a)},spliceWithArray:function(e,n,i){return this[E].spliceWithArray_(e,n,i)},push:function(){for(var e=this[E],n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e.spliceWithArray_(e.values_.length,0,i),e.values_.length},pop:function(){return this.splice(Math.max(this[E].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[E],n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e.spliceWithArray_(0,0,i),e.values_.length},reverse:function(){return v.trackingDerivation&&L(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){v.trackingDerivation&&L(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[E],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};M("at",Q);M("concat",Q);M("flat",Q);M("includes",Q);M("indexOf",Q);M("join",Q);M("lastIndexOf",Q);M("slice",Q);M("toString",Q);M("toLocaleString",Q);M("toSorted",Q);M("toSpliced",Q);M("with",Q);M("every",ne);M("filter",ne);M("find",ne);M("findIndex",ne);M("findLast",ne);M("findLastIndex",ne);M("flatMap",ne);M("forEach",ne);M("map",ne);M("some",ne);M("toReversed",ne);M("reduce",Sa);M("reduceRight",Sa);function M(t,e){typeof Array.prototype[t]=="function"&&(At[t]=e(t))}function Q(t){return function(){var e=this[E];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function ne(t){return function(e,n){var i=this,a=this[E];a.atom_.reportObserved();var r=a.dehanceValues_(a.values_);return r[t](function(s,o){return e.call(n,s,o,i)})}}function Sa(t){return function(){var e=this,n=this[E];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),a=arguments[0];return arguments[0]=function(r,s,o){return a(r,s,o,e)},i[t].apply(i,arguments)}}var Do=Se("ObservableArrayAdministration",Rn);function Kt(t){return Vt(t)&&Do(t[E])}var _a,Na,Lo={},me="add",Et="delete";_a=Symbol.iterator;Na=Symbol.toStringTag;var Oa=function(){function t(n,i,a){var r=this;i===void 0&&(i=ye),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[E]=Lo,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=i,this.name_=a,te(Map)||L(18),Oe(function(){r.keysAtom_=Qi("ObservableMap.keys()"),r.data_=new Map,r.hasMap_=new Map,n&&r.merge(n)})}var e=t.prototype;return e.has_=function(i){return this.data_.has(i)},e.has=function(i){var a=this;if(!v.trackingDerivation)return this.has_(i);var r=this.hasMap_.get(i);if(!r){var s=r=new ve(this.has_(i),Mt,"ObservableMap.key?",!1);this.hasMap_.set(i,s),pa(s,function(){return a.hasMap_.delete(i)})}return r.get()},e.set=function(i,a){var r=this.has_(i);if(H(this)){var s=q(this,{type:r?oe:me,object:this,newValue:a,name:i});if(!s)return this;a=s.newValue}return r?this.updateValue_(i,a):this.addValue_(i,a),this},e.delete=function(i){var a=this;if(this.keysAtom_,H(this)){var r=q(this,{type:Et,object:this,name:i});if(!r)return!1}if(this.has_(i)){var s=He(),o=Y(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:Et,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return le(function(){var u;a.keysAtom_.reportChanged(),(u=a.hasMap_.get(i))==null||u.setNewValue_(!1);var d=a.data_.get(i);d.setNewValue_(void 0),a.data_.delete(i)}),o&&ee(this,l),!0}return!1},e.updateValue_=function(i,a){var r=this.data_.get(i);if(a=r.prepareNewValue_(a),a!==v.UNCHANGED){var s=He(),o=Y(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:oe,object:this,oldValue:r.value_,name:i,newValue:a}:null;r.setNewValue_(a),o&&ee(this,l)}},e.addValue_=function(i,a){var r=this;this.keysAtom_,le(function(){var u,d=new ve(a,r.enhancer_,"ObservableMap.key",!1);r.data_.set(i,d),a=d.value_,(u=r.hasMap_.get(i))==null||u.setNewValue_(!0),r.keysAtom_.reportChanged()});var s=He(),o=Y(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:me,object:this,name:i,newValue:a}:null;o&&ee(this,l)},e.get=function(i){return this.has(i)?this.dehanceValue_(this.data_.get(i).get()):this.dehanceValue_(void 0)},e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},e.values=function(){var i=this,a=this.keys();return Ye({next:function(){var s=a.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:i.get(l)}}})},e.entries=function(){var i=this,a=this.keys();return Ye({next:function(){var s=a.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:[l,i.get(l)]}}})},e[_a]=function(){return this.entries()},e.forEach=function(i,a){for(var r=xe(this),s;!(s=r()).done;){var o=s.value,l=o[0],u=o[1];i.call(a,u,l,this)}},e.merge=function(i){var a=this;return Ne(i)&&(i=new Map(i)),le(function(){he(i)?es(i).forEach(function(r){return a.set(r,i[r])}):Array.isArray(i)?i.forEach(function(r){var s=r[0],o=r[1];return a.set(s,o)}):Ie(i)?(i.constructor!==Map&&L(19,i),i.forEach(function(r,s){return a.set(s,r)})):i!=null&&L(20,i)}),this},e.clear=function(){var i=this;le(function(){aa(function(){for(var a=xe(i.keys()),r;!(r=a()).done;){var s=r.value;i.delete(s)}})})},e.replace=function(i){var a=this;return le(function(){for(var r=Po(i),s=new Map,o=!1,l=xe(a.data_.keys()),u;!(u=l()).done;){var d=u.value;if(!r.has(d)){var f=a.delete(d);if(f)o=!0;else{var c=a.data_.get(d);s.set(d,c)}}}for(var _=xe(r.entries()),O;!(O=_()).done;){var g=O.value,k=g[0],N=g[1],R=a.data_.has(k);if(a.set(k,N),a.data_.has(k)){var P=a.data_.get(k);s.set(k,P),R||(o=!0)}}if(!o)if(a.data_.size!==s.size)a.keysAtom_.reportChanged();else for(var w=a.data_.keys(),C=s.keys(),I=w.next(),j=C.next();!I.done;){if(I.value!==j.value){a.keysAtom_.reportChanged();break}I=w.next(),j=C.next()}a.data_=s}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,a){return lt(this,i)},e.intercept_=function(i){return ot(this,i)},Fn(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Na,get:function(){return"Map"}}]),t}(),Ne=Se("ObservableMap",Oa);function Po(t){if(Ie(t)||Ne(t))return t;if(Array.isArray(t))return new Map(t);if(he(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return L(21,t)}var wa,Fa,Io={};wa=Symbol.iterator;Fa=Symbol.toStringTag;var Aa=function(){function t(n,i,a){var r=this;i===void 0&&(i=ye),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[E]=Io,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=a,te(Set)||L(22),this.enhancer_=function(s,o){return i(s,o,a)},Oe(function(){r.atom_=Qi(r.name_),n&&r.replace(n)})}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.clear=function(){var i=this;le(function(){aa(function(){for(var a=xe(i.data_.values()),r;!(r=a()).done;){var s=r.value;i.delete(s)}})})},e.forEach=function(i,a){for(var r=xe(this),s;!(s=r()).done;){var o=s.value;i.call(a,o,o,this)}},e.add=function(i){var a=this;if(this.atom_,H(this)){var r=q(this,{type:me,object:this,newValue:i});if(!r)return this}if(!this.has(i)){le(function(){a.data_.add(a.enhancer_(i,void 0)),a.atom_.reportChanged()});var s=!1,o=Y(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:me,object:this,newValue:i}:null;o&&ee(this,l)}return this},e.delete=function(i){var a=this;if(H(this)){var r=q(this,{type:Et,object:this,oldValue:i});if(!r)return!1}if(this.has(i)){var s=!1,o=Y(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:Et,object:this,oldValue:i}:null;return le(function(){a.atom_.reportChanged(),a.data_.delete(i)}),o&&ee(this,l),!0}return!1},e.has=function(i){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(i))},e.entries=function(){var i=0,a=Array.from(this.keys()),r=Array.from(this.values());return Ye({next:function(){var o=i;return i+=1,o<r.length?{value:[a[o],r[o]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var i=this,a=0,r=Array.from(this.data_.values());return Ye({next:function(){return a<r.length?{value:i.dehanceValue_(r[a++]),done:!1}:{done:!0}}})},e.replace=function(i){var a=this;return je(i)&&(i=new Set(i)),le(function(){Array.isArray(i)?(a.clear(),i.forEach(function(r){return a.add(r)})):it(i)?(a.clear(),i.forEach(function(r){return a.add(r)})):i!=null&&L("Cannot initialize set from "+i)}),this},e.observe_=function(i,a){return lt(this,i)},e.intercept_=function(i){return ot(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[wa]=function(){return this.values()},Fn(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Fa,get:function(){return"Set"}}]),t}(),je=Se("ObservableSet",Aa),ei=Object.create(null),ti="remove",Ea=function(){function t(n,i,a,r){i===void 0&&(i=new Map),r===void 0&&(r=xs),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=n,this.values_=i,this.name_=a,this.defaultAnnotation_=r,this.keysAtom_=new rt("ObservableObject.keys"),this.isPlainObject_=he(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(i){return this.values_.get(i).get()},e.setObservablePropValue_=function(i,a){var r=this.values_.get(i);if(r instanceof Re)return r.set(a),!0;if(H(this)){var s=q(this,{type:oe,object:this.proxy_||this.target_,name:i,newValue:a});if(!s)return null;a=s.newValue}if(a=r.prepareNewValue_(a),a!==v.UNCHANGED){var o=Y(this),l=!1,u=o||l?{type:oe,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:r.value_,name:i,newValue:a}:null;r.setNewValue_(a),o&&ee(this,u)}return!0},e.get_=function(i){return v.trackingDerivation&&!de(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,a,r){return r===void 0&&(r=!1),de(this.target_,i)?this.values_.has(i)?this.setObservablePropValue_(i,a):r?Reflect.set(this.target_,i,a):(this.target_[i]=a,!0):this.extend_(i,{value:a,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,r)},e.has_=function(i){if(!v.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var a=this.pendingKeys_.get(i);return a||(a=new ve(i in this.target_,Mt,"ObservableObject.key?",!1),this.pendingKeys_.set(i,a)),a.get()},e.make_=function(i,a){if(a===!0&&(a=this.defaultAnnotation_),a!==!1){if(!(i in this.target_)){var r;if((r=this.target_[ie])!=null&&r[i])return;L(1,a.annotationType_,this.name_+"."+i.toString())}for(var s=this.target_;s&&s!==It;){var o=St(s,i);if(o){var l=a.make_(this,i,o,s);if(l===0)return;if(l===1)break}s=Object.getPrototypeOf(s)}ii(this,a,i)}},e.extend_=function(i,a,r,s){if(s===void 0&&(s=!1),r===!0&&(r=this.defaultAnnotation_),r===!1)return this.defineProperty_(i,a,s);var o=r.extend_(this,i,a,s);return o&&ii(this,r,i),o},e.defineProperty_=function(i,a,r){r===void 0&&(r=!1),this.keysAtom_;try{W();var s=this.delete_(i);if(!s)return s;if(H(this)){var o=q(this,{object:this.proxy_||this.target_,name:i,type:me,newValue:a.value});if(!o)return null;var l=o.newValue;a.value!==l&&(a=ke({},a,{value:l}))}if(r){if(!Reflect.defineProperty(this.target_,i,a))return!1}else re(this.target_,i,a);this.notifyPropertyAddition_(i,a.value)}finally{J()}return!0},e.defineObservableProperty_=function(i,a,r,s){s===void 0&&(s=!1),this.keysAtom_;try{W();var o=this.delete_(i);if(!o)return o;if(H(this)){var l=q(this,{object:this.proxy_||this.target_,name:i,type:me,newValue:a});if(!l)return null;a=l.newValue}var u=ni(i),d={configurable:v.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(s){if(!Reflect.defineProperty(this.target_,i,d))return!1}else re(this.target_,i,d);var f=new ve(a,r,"ObservableObject.key",!1);this.values_.set(i,f),this.notifyPropertyAddition_(i,f.value_)}finally{J()}return!0},e.defineComputedProperty_=function(i,a,r){r===void 0&&(r=!1),this.keysAtom_;try{W();var s=this.delete_(i);if(!s)return s;if(H(this)){var o=q(this,{object:this.proxy_||this.target_,name:i,type:me,newValue:void 0});if(!o)return null}a.name||(a.name="ObservableObject.key"),a.context=this.proxy_||this.target_;var l=ni(i),u={configurable:v.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:l.get,set:l.set};if(r){if(!Reflect.defineProperty(this.target_,i,u))return!1}else re(this.target_,i,u);this.values_.set(i,new Re(a)),this.notifyPropertyAddition_(i,void 0)}finally{J()}return!0},e.delete_=function(i,a){if(a===void 0&&(a=!1),this.keysAtom_,!de(this.target_,i))return!0;if(H(this)){var r=q(this,{object:this.proxy_||this.target_,name:i,type:ti});if(!r)return null}try{var s,o;W();var l=Y(this),u=!1,d=this.values_.get(i),f=void 0;if(!d&&(l||u)){var c;f=(c=St(this.target_,i))==null?void 0:c.value}if(a){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(d&&(this.values_.delete(i),d instanceof ve&&(f=d.value_),da(d)),this.keysAtom_.reportChanged(),(s=this.pendingKeys_)==null||(o=s.get(i))==null||o.set(i in this.target_),l||u){var _={type:ti,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:f,name:i};l&&ee(this,_)}}finally{J()}return!0},e.observe_=function(i,a){return lt(this,i)},e.intercept_=function(i){return ot(this,i)},e.notifyPropertyAddition_=function(i,a){var r,s,o=Y(this),l=!1;if(o||l){var u=o||l?{type:me,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:a}:null;o&&ee(this,u)}(r=this.pendingKeys_)==null||(s=r.get(i))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),Ut(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function Ue(t,e){var n;if(de(t,E))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",a=new Ea(t,new Map,String(i),Bs(e));return jt(t,E,a),t}var Vo=Se("ObservableObjectAdministration",Ea);function ni(t){return ei[t]||(ei[t]={get:function(){return this[E].getObservablePropValue_(t)},set:function(n){return this[E].setObservablePropValue_(t,n)}})}function Xe(t){return Vt(t)?Vo(t[E]):!1}function ii(t,e,n){var i;(i=t.target_[ie])==null||delete i[n]}var jo=Ta(0),Uo=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),tn=0,Ca=function(){};function Mo(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}Mo(Ca,Array.prototype);var Dn=function(t,e,n){Gi(i,t);function i(r,s,o,l){var u;return o===void 0&&(o="ObservableArray"),l===void 0&&(l=!1),u=t.call(this)||this,Oe(function(){var d=new Rn(o,s,l,!0);d.proxy_=Yt(u),Bi(Yt(u),E,d),r&&r.length&&u.spliceWithArray(0,0,r),Uo&&Object.defineProperty(Yt(u),"0",jo)}),u}var a=i.prototype;return a.concat=function(){this[E].atom_.reportObserved();for(var s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];return Array.prototype.concat.apply(this.slice(),o.map(function(u){return Kt(u)?u.slice():u}))},a[n]=function(){var r=this,s=0;return Ye({next:function(){return s<r.length?{value:r[s++],done:!1}:{done:!0,value:void 0}}})},Fn(i,[{key:"length",get:function(){return this[E].getArrayLength_()},set:function(s){this[E].setArrayLength_(s)}},{key:e,get:function(){return"Array"}}]),i}(Ca,Symbol.toStringTag,Symbol.iterator);Object.entries(At).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&jt(Dn.prototype,e,n)});function Ta(t){return{enumerable:!1,configurable:!0,get:function(){return this[E].get_(t)},set:function(n){this[E].set_(t,n)}}}function $o(t){re(Dn.prototype,""+t,Ta(t))}function xa(t){if(t>tn){for(var e=tn;e<t+100;e++)$o(e);tn=t}}xa(1e3);function Bo(t,e,n){return new Dn(t,e,n)}function Le(t,e){if(typeof t=="object"&&t!==null){if(Kt(t))return e!==void 0&&L(23),t[E].atom_;if(je(t))return t.atom_;if(Ne(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||L(25,e,vn(t)),n}if(Xe(t)){if(!e)return L(26);var i=t[E].values_.get(e);return i||L(27,e,vn(t)),i}if(An(t)||Bt(t)||Ft(t))return t}else if(te(t)&&Ft(t[E]))return t[E];L(28)}function Ra(t,e){if(t||L(29),e!==void 0)return Ra(Le(t,e));if(An(t)||Bt(t)||Ft(t)||Ne(t)||je(t))return t;if(t[E])return t[E];L(24,t)}function vn(t,e){var n;if(e!==void 0)n=Le(t,e);else{if(zt(t))return t.name;Xe(t)||Ne(t)||je(t)?n=Ra(t):n=Le(t)}return n.name_}function Oe(t){var e=_e(),n=Cn(!0);W();try{return t()}finally{J(),Tn(n),ce(e)}}var ai=It.toString;function Ln(t,e,n){return n===void 0&&(n=-1),gn(t,e,n)}function gn(t,e,n,i,a){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var r=typeof t;if(r!=="function"&&r!=="object"&&typeof e!="object")return!1;var s=ai.call(t);if(s!==ai.call(e))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":n>=0&&n++;break}t=ri(t),e=ri(e);var o=s==="[object Array]";if(!o){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(te(l)&&l instanceof l&&te(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],a=a||[];for(var d=i.length;d--;)if(i[d]===t)return a[d]===e;if(i.push(t),a.push(e),o){if(d=t.length,d!==e.length)return!1;for(;d--;)if(!gn(t[d],e[d],n-1,i,a))return!1}else{var f=Object.keys(t),c;if(d=f.length,Object.keys(e).length!==d)return!1;for(;d--;)if(c=f[d],!(de(e,c)&&gn(t[c],e[c],n-1,i,a)))return!1}return i.pop(),a.pop(),!0}function ri(t){return Kt(t)?t.slice():Ie(t)||Ne(t)||it(t)||je(t)?Array.from(t.entries()):t}function Ye(t){return t[Symbol.iterator]=zo,t}function zo(){return this}["Symbol","Map","Set"].forEach(function(t){var e=wn();typeof e[t]=="undefined"&&L("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:so,extras:{getDebugName:vn},$mobx:E});class Da{constructor(e){T(this,"channel");T(this,"listeners",new Map);T(this,"eventQueue",new Map);try{this.channel=new BroadcastChannel(e),this.channel.onmessage=n=>this.handleMessage(n),this.channel.onmessageerror=n=>ue.error("NizzaBroadcastChannel:",n)}catch(n){throw ue.error("Failed to create NizzaBroadcastChannel:",n),n}}on(e,n){return this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;for(const[a,r]of this.listeners.entries())this.matchWildcard(a,i)&&r.forEach(s=>s({...n,wildcard:a}))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const i=new Error("Invalid arguments");throw ue.error(i),i}for(const[i,a]of this.listeners.entries())if(this.matchWildcard(i,e)){a.add(n);const r=this.eventQueue.get(i);r&&(r.forEach(s=>{n({...s,wildcard:i})}),this.eventQueue.delete(i));return}this.listeners.set(e,new Set([n]))}emitEvent(e,n,i){if(typeof e!="string"){const s=new Error("Invalid arguments");throw ue.error(s),s}const a={name:e,data:n,attrs:i},r=Array.from(this.getMatchingListeners(e));if(r.length)for(const[s,o]of r)o({...a,wildcard:s});else this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(a);this.channel.postMessage(a)}*getMatchingListeners(e){for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const a of i)yield[n,a]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){const i=this.listeners.get(e);i.delete(n),i.size===0&&this.listeners.delete(e)}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*");return new RegExp(`^${i}$`).test(n)}}let Ko=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const La=(t=8)=>Ko(t),Go=t=>{const e=Object.entries(t).reduce((n,[i,a])=>a!==void 0?`${n}${n?"&":""}${i}=${a}`:n,"");return e?`?${e}`:""};function Qo(){const t=new Error().stack.split(`
4
+ `);return t.length<3?"":t[2].trim().substring(3)}var Pa=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ia(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Va={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(Pa,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"],r={},s=null;function o(g,k){var N=g[k];if(typeof N.bind=="function")return N.bind(g);try{return Function.prototype.bind.call(N,g)}catch{return function(){return Function.prototype.apply.apply(N,[g,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(g){return g==="debug"&&(g="log"),typeof console===n?!1:g==="trace"&&i?l:console[g]!==void 0?o(console,g):console.log!==void 0?o(console,"log"):e}function d(){for(var g=this.getLevel(),k=0;k<a.length;k++){var N=a[k];this[N]=k<g?e:this.methodFactory(N,g,this.name)}if(this.log=this.debug,typeof console===n&&g<this.levels.SILENT)return"No console available for logging"}function f(g){return function(){typeof console!==n&&(d.call(this),this[g].apply(this,arguments))}}function c(g,k,N){return u(g)||f.apply(this,arguments)}function _(g,k){var N=this,R,P,w,C="loglevel";typeof g=="string"?C+=":"+g:typeof g=="symbol"&&(C=void 0);function I(h){var b=(a[h]||"silent").toUpperCase();if(!(typeof window===n||!C)){try{window.localStorage[C]=b;return}catch{}try{window.document.cookie=encodeURIComponent(C)+"="+b+";"}catch{}}}function j(){var h;if(!(typeof window===n||!C)){try{h=window.localStorage[C]}catch{}if(typeof h===n)try{var b=window.document.cookie,F=encodeURIComponent(C),p=b.indexOf(F+"=");p!==-1&&(h=/^([^;]+)/.exec(b.slice(p+F.length+1))[1])}catch{}return N.levels[h]===void 0&&(h=void 0),h}}function m(){if(!(typeof window===n||!C)){try{window.localStorage.removeItem(C)}catch{}try{window.document.cookie=encodeURIComponent(C)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function y(h){var b=h;if(typeof b=="string"&&N.levels[b.toUpperCase()]!==void 0&&(b=N.levels[b.toUpperCase()]),typeof b=="number"&&b>=0&&b<=N.levels.SILENT)return b;throw new TypeError("log.setLevel() called with invalid level: "+h)}N.name=g,N.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},N.methodFactory=k||c,N.getLevel=function(){return w!=null?w:P!=null?P:R},N.setLevel=function(h,b){return w=y(h),b!==!1&&I(w),d.call(N)},N.setDefaultLevel=function(h){P=y(h),j()||N.setLevel(h,!1)},N.resetLevel=function(){w=null,m(),d.call(N)},N.enableAll=function(h){N.setLevel(N.levels.TRACE,h)},N.disableAll=function(h){N.setLevel(N.levels.SILENT,h)},N.rebuild=function(){if(s!==N&&(R=y(s.getLevel())),d.call(N),s===N)for(var h in r)r[h].rebuild()},R=y(s?s.getLevel():"WARN");var S=j();S!=null&&(w=y(S)),d.call(N)}s=new _,s.getLogger=function(k){if(typeof k!="symbol"&&typeof k!="string"||k==="")throw new TypeError("You must supply a name when creating a logger.");var N=r[k];return N||(N=r[k]=new _(k,s.methodFactory)),N};var O=typeof window!==n?window.log:void 0;return s.noConflict=function(){return typeof window!==n&&window.log===s&&(window.log=O),s},s.getLoggers=function(){return r},s.default=s,s})})(Va);var ja=Va.exports;const ht=Ia(ja);var Ua={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.prefix=n(e)})(Pa,function(e){var n=function(d){for(var f=1,c=arguments.length,_;f<c;f++)for(_ in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],_)&&(d[_]=arguments[f][_]);return d},i={template:"[%t] %l:",levelFormatter:function(d){return d.toUpperCase()},nameFormatter:function(d){return d||"root"},timestampFormatter:function(d){return d.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},a,r={},s=function(d){if(!d||!d.getLogger)throw new TypeError("Argument is not a root logger");a=d},o=function(d,f){if(!d||!d.setLevel)throw new TypeError("Argument is not a logger");var c=d.methodFactory,_=d.name||"",O=r[_]||r[""]||i;function g(k,N,R){var P=c(k,N,R),w=r[R]||r[""],C=w.template.indexOf("%t")!==-1,I=w.template.indexOf("%l")!==-1,j=w.template.indexOf("%n")!==-1;return function(){for(var m="",y=arguments.length,S=Array(y),h=0;h<y;h++)S[h]=arguments[h];if(_||!r[R]){var b=w.timestampFormatter(new Date),F=w.levelFormatter(k),p=w.nameFormatter(R);w.format?m+=w.format(F,p,b):(m+=w.template,C&&(m=m.replace(/%t/,b)),I&&(m=m.replace(/%l/,F)),j&&(m=m.replace(/%n/,p))),S.length&&typeof S[0]=="string"?S[0]=m+" "+S[0]:S.unshift(m)}P.apply(void 0,S)}}return r[_]||(d.methodFactory=g),f=f||{},f.template&&(f.format=void 0),r[_]=n({},O,f),d.setLevel(d.getLevel()),a||d.warn("It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"),d},l={reg:s,apply:o},u;return e&&(u=e.prefix,l.noConflict=function(){return e.prefix===l&&(e.prefix=u),l}),l})})(Ua);var Ho=Ua.exports;const si=Ia(Ho);let Ma=class{constructor(e){T(this,"defaultLevel",ja.levels.INFO);T(this,"namePrefix");this.namePrefix=e?`${e}-`:"",ht.setDefaultLevel(this.defaultLevel),si.reg(ht),si.apply(ht,{template:"[%t] %l (%n)",nameFormatter:n=>{var i;return(i=n==null?void 0:n.toLowerCase())!=null?i:""},timestampFormatter:()=>new Date().toTimeString().slice(0,8)})}createLogger(e){const n=this.namePrefix+e.toLowerCase(),i=ht.getLogger(n),a=localStorage.getItem(`loglevel:${n}`);return a?i.setLevel(a):i.setLevel(this.defaultLevel),i}};const X=class X{constructor(){T(this,"version","1");T(this,"instanceId",La());T(this,"_config",null);T(this,"_account");T(this,"_productDataSource");T(this,"_eventBus",new Da("nizza"));T(this,"log",new Ma("nz"));ba(this,{_config:z,_account:z,_productDataSource:z,config:pe,account:pe,accountName:pe,configure:fe,setProductDataSource:fe},{name:"NizzaStore",autoBind:!0})}static instance(){var n;return X._instance||(X._instance=new X),(Number((n=window==null?void 0:window.nizza)==null?void 0:n.version)||0)>Number(X._instance.version)?X._instance=window==null?void 0:window.nizza:(window.nizza=X._instance,window.nz=X._instance),X._instance}async configure(e){var n;try{const i=(n=this._config)==null?void 0:n.account;if(this._config=e,i!==e.account){const a=await rr(e.account);this.setAccount(a)}if(e.getProductDataSource){const a=await e.getProductDataSource();this.setProductDataSource(a)}}catch(i){console.error("Error configuring NizzaStore:",i)}}setAccount(e){this._account=e}setProductDataSource(e){this._productDataSource=e}get config(){return this._config}get account(){return this._account}get accountName(){var e;return(e=this._config)==null?void 0:e.account}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};T(X,"_instance");let et=X;const Gt=et.instance(),qo=Gt.log.createLogger("main"),ue=Gt.log.createLogger("core");function Ce(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function yt(t){return function e(n){return arguments.length===0||Ce(n)?e:t.apply(this,arguments)}}function Pn(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return Ce(n)?e:yt(function(a){return t(n,a)});default:return Ce(n)&&Ce(i)?e:Ce(n)?yt(function(a){return t(a,i)}):Ce(i)?yt(function(a){return t(n,a)}):t(n,i)}}}const Wo=Number.isInteger||function(e){return e<<0===e};function Jo(t){return Object.prototype.toString.call(t)==="[object String]"}var Zo=Pn(function(e,n){var i=e<0?n.length+e:e;return Jo(n)?n.charAt(i):n[i]}),Xo=yt(function(e){return e==null}),Yo=Pn(function(e,n){return e.map(function(i){for(var a=n,r=0,s;r<i.length;){if(a==null)return;s=i[r],a=Wo(s)?Zo(s,a):a[s],r+=1}return a})}),el=Pn(function(e,n){return Yo([e],n)[0]});class ut extends Error{constructor(e,n,i){super(n),this.value=i,this.name=e}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value}}}}class $a extends ut{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class Ba extends ut{constructor(e){var n;super("APP_UNEXPECTED_ERROR",(n=e.message)!=null?n:"An unexpected error occurred.",e)}}class tl extends ut{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class za extends ut{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
3
5
  Configuration property invalid: "${e}".
4
6
 
5
7
  It looks like you are trying to use a configuration property that is required but is "undefined", make sure you have initialized the global object "nizza".
@@ -19,7 +21,7 @@
19
21
  account: env.account,
20
22
  ...
21
23
  });
22
- `)}}class Lt{constructor(e){this.accountRepository=e}async get(e){try{const t=await this.accountRepository.get(e);if(!t)throw new Tt(e);return t}catch(t){throw new It(t)}}}const Qn=new Rt,Re=new Lt(Qn);class Te{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const oe=typeof window=="undefined"||"Deno"in window;function Gn(){}function Me(n){return typeof n=="number"&&n>=0&&n!==1/0}function Kn(n,e){return Math.max(n+(e||0)-Date.now(),0)}function Wn(n,e,t){return qn(n)?typeof e=="function"?{...t,queryKey:n,queryFn:e}:{...e,queryKey:n}:n}function At(n,e){if(n===e)return n;const t=$e(n)&&$e(e);if(t||ze(n)&&ze(e)){const i=t?n.length:Object.keys(n).length,a=t?e:Object.keys(e),s=a.length,r=t?[]:{};let o=0;for(let l=0;l<s;l++){const u=t?l:a[l];r[u]=At(n[u],e[u]),r[u]===n[u]&&o++}return i===s&&o===i?n:r}return e}function be(n,e){if(n&&!e||e&&!n)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}function $e(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ze(n){if(!Be(n))return!1;const e=n.constructor;if(typeof e=="undefined")return!0;const t=e.prototype;return!(!Be(t)||!t.hasOwnProperty("isPrototypeOf"))}function Be(n){return Object.prototype.toString.call(n)==="[object Object]"}function qn(n){return Array.isArray(n)}function Jn(n){return new Promise(e=>{setTimeout(e,n)})}function Qe(n){Jn(0).then(n)}function Ge(n,e,t){return t.isDataEqual!=null&&t.isDataEqual(n,e)?n:typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?At(n,e):e}class Hn extends Te{constructor(){super(),this.setup=e=>{if(!oe&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Zn=new Hn,Ke=["online","offline"];class Xn extends Te{constructor(){super(),this.setup=e=>{if(!oe&&window.addEventListener){const t=()=>e();return Ke.forEach(i=>{window.addEventListener(i,t,!1)}),()=>{Ke.forEach(i=>{window.removeEventListener(i,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const Yn=new Xn;function ei(n){return(n!=null?n:"online")==="online"?Yn.isOnline():!0}class ti{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function ni(n){return n instanceof ti}function ii(){let n=[],e=0,t=d=>{d()},i=d=>{d()};const a=d=>{let f;e++;try{f=d()}finally{e--,e||o()}return f},s=d=>{e?n.push(d):Qe(()=>{t(d)})},r=d=>(...f)=>{s(()=>{d(...f)})},o=()=>{const d=n;n=[],d.length&&Qe(()=>{i(()=>{d.forEach(f=>{t(f)})})})};return{batch:a,batchCalls:r,schedule:s,setNotifyFunction:d=>{t=d},setBatchNotifyFunction:d=>{i=d}}}const Z=ii();class ai extends Te{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),We(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fe(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const i=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),be(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const s=this.hasListeners();s&&qe(this.currentQuery,a,this.options,i)&&this.executeFetch(),this.updateResult(t),s&&(this.currentQuery!==a||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const r=this.computeRefetchInterval();s&&(this.currentQuery!==a||this.options.enabled!==i.enabled||r!==this.currentRefetchInterval)&&this.updateRefetchInterval(r)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),i=this.createResult(t,e);return ri(this,i,e)&&(this.currentResult=i,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),i}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach(i=>{Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),e[i])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),i=this.client.getQueryCache().build(this.client,t);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:(t=e.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(Gn)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),oe||this.currentResult.isStale||!Me(this.options.staleTime))return;const t=Kn(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(oe||this.options.enabled===!1||!Me(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Zn.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const i=this.currentQuery,a=this.options,s=this.currentResult,r=this.currentResultState,o=this.currentResultOptions,l=e!==i,u=l?e.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:c,error:S,errorUpdatedAt:y,fetchStatus:k,status:N}=f,O=!1,F=!1,I;if(t._optimisticResults){const m=this.hasListeners(),p=!m&&We(e,t),h=m&&qe(e,i,t,a);(p||h)&&(k=ei(e.options.networkMode)?"fetching":"paused",c||(N="loading")),t._optimisticResults==="isRestoring"&&(k="idle")}if(t.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&N!=="error")I=d.data,c=d.dataUpdatedAt,N=d.status,O=!0;else if(t.select&&typeof f.data!="undefined")if(s&&f.data===(r==null?void 0:r.data)&&t.select===this.selectFn)I=this.selectResult;else try{this.selectFn=t.select,I=t.select(f.data),I=Ge(s==null?void 0:s.data,I,t),this.selectResult=I,this.selectError=null}catch(m){this.selectError=m}else I=f.data;if(typeof t.placeholderData!="undefined"&&typeof I=="undefined"&&N==="loading"){let m;if(s!=null&&s.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData))m=s.data;else if(m=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof m!="undefined")try{m=t.select(m),this.selectError=null}catch(p){this.selectError=p}typeof m!="undefined"&&(N="success",I=Ge(s==null?void 0:s.data,m,t),F=!0)}this.selectError&&(S=this.selectError,I=this.selectResult,y=Date.now(),N="error");const w=k==="fetching",D=N==="loading",L=N==="error";return{status:N,fetchStatus:k,isLoading:D,isSuccess:N==="success",isError:L,isInitialLoading:D&&w,data:I,dataUpdatedAt:c,error:S,errorUpdatedAt:y,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!D,isLoadingError:L&&f.dataUpdatedAt===0,isPaused:k==="paused",isPlaceholderData:F,isPreviousData:O,isRefetchError:L&&f.dataUpdatedAt!==0,isStale:Ie(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,be(i,t))return;this.currentResult=i;const a={cache:!0},s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.trackedProps.size)return!0;const l=new Set(o!=null?o:this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const d=u;return this.currentResult[d]!==t[d]&&l.has(d)})};(e==null?void 0:e.listeners)!==!1&&s()&&(a.listeners=!0),this.notify({...a,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};e.type==="success"?t.onSuccess=!e.manual:e.type==="error"&&!ni(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){Z.batch(()=>{if(e.onSuccess){var t,i,a,s;(t=(i=this.options).onSuccess)==null||t.call(i,this.currentResult.data),(a=(s=this.options).onSettled)==null||a.call(s,this.currentResult.data,null)}else if(e.onError){var r,o,l,u;(r=(o=this.options).onError)==null||r.call(o,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function si(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function We(n,e){return si(n,e)||n.state.dataUpdatedAt>0&&Fe(n,e,e.refetchOnMount)}function Fe(n,e,t){if(e.enabled!==!1){const i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&Ie(n,e)}return!1}function qe(n,e,t,i){return t.enabled!==!1&&(n!==e||i.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&Ie(n,t)}function Ie(n,e){return n.isStaleByTime(e.staleTime)}function ri(n,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!be(n.getCurrentResult(),e)}var Pt={exports:{}},Vt={};/**
24
+ `)}}function nl(t,e){e.forEach(n=>{if(Xo(el(n.split("."),t)))throw new za(n)})}if(!$.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!ba)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function il(t){t()}function al(t){t||(t=il),So({reactionScheduler:t})}function rl(t){return No(t)}var sl=1e4,ol=1e4,ll=function(){function t(e){var n=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(i){i===void 0&&(i=sl),clearTimeout(n.sweepTimeout),n.sweepTimeout=void 0;var a=Date.now();n.registrations.forEach(function(r,s){a-r.registeredAt>=i&&(n.finalize(r.value),n.registrations.delete(s))}),n.registrations.size>0&&n.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){n.sweep(0)}})}return Object.defineProperty(t.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,n,i){this.registrations.set(i,{value:n,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(t.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(t.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,ol))}}),t}(),ul=typeof FinalizationRegistry!="undefined"?FinalizationRegistry:ll,kn=new ul(function(t){var e;(e=t.reaction)===null||e===void 0||e.dispose(),t.reaction=null}),oi=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,r=[],s;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)r.push(a.value)}catch(o){s={error:o}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return r};function li(t){return"observer".concat(t)}var dl=function(){function t(){}return t}();function cl(){return new dl}function fl(t,e){e===void 0&&(e="observed");var n=oi($.useState(cl),1),i=n[0],a=oi($.useState(),2),r=a[1],s=function(){return r([])},o=$.useRef(null);o.current||(o.current={reaction:null,mounted:!1,changedBeforeMount:!1});var l=o.current;l.reaction||(l.reaction=new We(li(e),function(){l.mounted?s():l.changedBeforeMount=!0}),kn.register(i,l,l)),$.useDebugValue(l.reaction,rl),$.useEffect(function(){return kn.unregister(l),l.mounted=!0,l.reaction?l.changedBeforeMount&&(l.changedBeforeMount=!1,s()):(l.reaction=new We(li(e),function(){s()}),s()),function(){l.reaction.dispose(),l.reaction=null,l.mounted=!1,l.changedBeforeMount=!1}},[]);var u,d;if(l.reaction.track(function(){try{u=t()}catch(f){d=f}}),d)throw d;return u}var Ka=typeof Symbol=="function"&&Symbol.for;Ka?Symbol.for("react.forward_ref"):typeof $.forwardRef=="function"&&$.forwardRef(function(t){return null}).$$typeof;Ka?Symbol.for("react.memo"):typeof $.memo=="function"&&$.memo(function(t){return null}).$$typeof;var nn;al(wr.unstable_batchedUpdates);nn=kn.finalizeAllImmediately;function ml(t,e){return e===void 0&&(e="observed"),fl(t,e)}function Ga(t){return ml(()=>{const e=et.instance();return t(e)})}function hl(){var i,a,r;let t=null,e=null,n=null;try{t=(r=(a=(i=Intl.DateTimeFormat())==null?void 0:i.resolvedOptions())==null?void 0:a.timeZone)!=null?r:null;const s=-new Date().getTimezoneOffset();n=s;const o=s>=0?"+":"-",l=String(Math.floor(Math.abs(s)/60)).padStart(2,"0"),u=String(Math.abs(s)%60).padStart(2,"0");e=`${o}${l}:${u}`}catch{ue.error("Error obtaining time zone or offset")}return{offset:e,offsetValue:n,value:t,country:null,included:null,label:null}}class Qa{constructor(e){T(this,"aggregate");T(this,"_numSetPropsApplied",0);this.aggregate=e}setProps(e){for(const[n,i]of Object.entries(e))n in this.aggregate&&(this.aggregate[n]=i);this._numSetPropsApplied++}get isFirstSetProps(){return this._numSetPropsApplied===1}}function Ha(t){return new Qa(t)}class pl{}class vl{constructor(e){T(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var In=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(In||{}),qa=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(qa||{}),Vn=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(Vn||{}),Wa=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(Wa||{}),Ja=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Ja||{}),Za=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(Za||{});class Qt{constructor(e){T(this,"root",Ha(this));T(this,"id");T(this,"account");T(this,"accountType",In.UNKNOWN);T(this,"username");T(this,"currencyConfig");T(this,"contractType");T(this,"nextDateMetricRecord");T(this,"spendedMinutes",0);T(this,"unlimitedService",!1);T(this,"hoursAvailable",0);T(this,"contractStatus",Vn.ACTIVE);T(this,"createdAt");T(this,"installationDateApp");T(this,"cxAccount");T(this,"freeService",!1);T(this,"subscriptionType",null);T(this,"minutesAvailable",0);T(this,"globalPage");T(this,"stripe");T(this,"descriptionPlan");T(this,"planType");T(this,"selectFreeTrial");T(this,"exceededFeatures");T(this,"host",null);this.root.setProps(e)}static toDomain(e){const{createdAt:n,username:i,...a}=e,r={...a,username:i!=null?i:a.account,createdAt:new Date(Number(n))};return new Qt(r)}toPrimitives(){const{root:e,createdAt:n,...i}=this;return{...i,created:n.toISOString()}}}const gl=`${qr.apiUrls.restV1}/accounts/v2`;class Xa{async get(e){const n=`${gl}/${e}`,{data:i}=await On({url:n});return i?Qt.toDomain(i):null}}class Ya{constructor(e){this.accountRepository=e}async get(e){try{const n=await this.accountRepository.get(e);if(!n)throw new $a(e);return n}catch(n){throw new Ba(n)}}}const kl=new Xa,jn=new Ya(kl);class Un{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const n={listener:e};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Ct=typeof window=="undefined"||"Deno"in window;function yl(){}function ui(t){return typeof t=="number"&&t>=0&&t!==1/0}function bl(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Sl(t,e,n){return _l(t)?typeof e=="function"?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function er(t,e){if(t===e)return t;const n=di(t)&&di(e);if(n||ci(t)&&ci(e)){const i=n?t.length:Object.keys(t).length,a=n?e:Object.keys(e),r=a.length,s=n?[]:{};let o=0;for(let l=0;l<r;l++){const u=n?l:a[l];s[u]=er(t[u],e[u]),s[u]===t[u]&&o++}return i===r&&o===i?t:s}return e}function yn(t,e){if(t&&!e||e&&!t)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function di(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function ci(t){if(!fi(t))return!1;const e=t.constructor;if(typeof e=="undefined")return!0;const n=e.prototype;return!(!fi(n)||!n.hasOwnProperty("isPrototypeOf"))}function fi(t){return Object.prototype.toString.call(t)==="[object Object]"}function _l(t){return Array.isArray(t)}function Nl(t){return new Promise(e=>{setTimeout(e,t)})}function mi(t){Nl(0).then(t)}function hi(t,e,n){return n.isDataEqual!=null&&n.isDataEqual(t,e)?t:typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?er(t,e):e}class Ol extends Un{constructor(){super(),this.setup=e=>{if(!Ct&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const wl=new Ol,pi=["online","offline"];class Fl extends Un{constructor(){super(),this.setup=e=>{if(!Ct&&window.addEventListener){const n=()=>e();return pi.forEach(i=>{window.addEventListener(i,n,!1)}),()=>{pi.forEach(i=>{window.removeEventListener(i,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const Al=new Fl;function El(t){return(t!=null?t:"online")==="online"?Al.isOnline():!0}class Cl{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Tl(t){return t instanceof Cl}function xl(){let t=[],e=0,n=d=>{d()},i=d=>{d()};const a=d=>{let f;e++;try{f=d()}finally{e--,e||o()}return f},r=d=>{e?t.push(d):mi(()=>{n(d)})},s=d=>(...f)=>{r(()=>{d(...f)})},o=()=>{const d=t;t=[],d.length&&mi(()=>{i(()=>{d.forEach(f=>{n(f)})})})};return{batch:a,batchCalls:s,schedule:r,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{i=d}}}const Ge=xl();class Rl extends Un{constructor(e,n){super(),this.client=e,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),vi(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,n){const i=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),yn(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const r=this.hasListeners();r&&gi(this.currentQuery,a,this.options,i)&&this.executeFetch(),this.updateResult(n),r&&(this.currentQuery!==a||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();r&&(this.currentQuery!==a||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(e){const n=this.client.getQueryCache().build(this.client,e),i=this.createResult(n,e);return Ll(this,i,e)&&(this.currentResult=i,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),i}getCurrentResult(){return this.currentResult}trackResult(e){const n={};return Object.keys(e).forEach(i=>{Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),e[i])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...n}={}){return this.fetch({...n,meta:{refetchPage:e}})}fetchOptimistic(e){const n=this.client.defaultQueryOptions(e),i=this.client.getQueryCache().build(this.client,n);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,n))}fetch(e){var n;return this.executeFetch({...e,cancelRefetch:(n=e.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let n=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(yl)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Ct||this.currentResult.isStale||!ui(this.options.staleTime))return;const n=bl(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(Ct||this.options.enabled===!1||!ui(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||wl.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,n){const i=this.currentQuery,a=this.options,r=this.currentResult,s=this.currentResultState,o=this.currentResultOptions,l=e!==i,u=l?e.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:c,error:_,errorUpdatedAt:O,fetchStatus:g,status:k}=f,N=!1,R=!1,P;if(n._optimisticResults){const m=this.hasListeners(),y=!m&&vi(e,n),S=m&&gi(e,i,n,a);(y||S)&&(g=El(e.options.networkMode)?"fetching":"paused",c||(k="loading")),n._optimisticResults==="isRestoring"&&(g="idle")}if(n.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&k!=="error")P=d.data,c=d.dataUpdatedAt,k=d.status,N=!0;else if(n.select&&typeof f.data!="undefined")if(r&&f.data===(s==null?void 0:s.data)&&n.select===this.selectFn)P=this.selectResult;else try{this.selectFn=n.select,P=n.select(f.data),P=hi(r==null?void 0:r.data,P,n),this.selectResult=P,this.selectError=null}catch(m){this.selectError=m}else P=f.data;if(typeof n.placeholderData!="undefined"&&typeof P=="undefined"&&k==="loading"){let m;if(r!=null&&r.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData))m=r.data;else if(m=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof m!="undefined")try{m=n.select(m),this.selectError=null}catch(y){this.selectError=y}typeof m!="undefined"&&(k="success",P=hi(r==null?void 0:r.data,m,n),R=!0)}this.selectError&&(_=this.selectError,P=this.selectResult,O=Date.now(),k="error");const w=g==="fetching",C=k==="loading",I=k==="error";return{status:k,fetchStatus:g,isLoading:C,isSuccess:k==="success",isError:I,isInitialLoading:C&&w,data:P,dataUpdatedAt:c,error:_,errorUpdatedAt:O,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!C,isLoadingError:I&&f.dataUpdatedAt===0,isPaused:g==="paused",isPlaceholderData:R,isPreviousData:N,isRefetchError:I&&f.dataUpdatedAt!==0,isStale:Mn(e,n),refetch:this.refetch,remove:this.remove}}updateResult(e){const n=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,yn(i,n))return;this.currentResult=i;const a={cache:!0},r=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!this.trackedProps.size)return!0;const l=new Set(o!=null?o:this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const d=u;return this.currentResult[d]!==n[d]&&l.has(d)})};(e==null?void 0:e.listeners)!==!1&&r()&&(a.listeners=!0),this.notify({...a,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const n={};e.type==="success"?n.onSuccess=!e.manual:e.type==="error"&&!Tl(e.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(e){Ge.batch(()=>{if(e.onSuccess){var n,i,a,r;(n=(i=this.options).onSuccess)==null||n.call(i,this.currentResult.data),(a=(r=this.options).onSettled)==null||a.call(r,this.currentResult.data,null)}else if(e.onError){var s,o,l,u;(s=(o=this.options).onError)==null||s.call(o,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Dl(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function vi(t,e){return Dl(t,e)||t.state.dataUpdatedAt>0&&bn(t,e,e.refetchOnMount)}function bn(t,e,n){if(e.enabled!==!1){const i=typeof n=="function"?n(t):n;return i==="always"||i!==!1&&Mn(t,e)}return!1}function gi(t,e,n,i){return n.enabled!==!1&&(t!==e||i.enabled===!1)&&(!n.suspense||t.state.status!=="error")&&Mn(t,n)}function Mn(t,e){return t.isStaleByTime(e.staleTime)}function Ll(t,e,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?e.isPlaceholderData:!yn(t.getCurrentResult(),e)}var tr={exports:{}},nr={};/**
23
25
  * @license React
24
26
  * use-sync-external-store-shim.production.min.js
25
27
  *
@@ -27,13 +29,4 @@
27
29
  *
28
30
  * This source code is licensed under the MIT license found in the
29
31
  * LICENSE file in the root directory of this source tree.
30
- */var K=j;function oi(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}var li=typeof Object.is=="function"?Object.is:oi,di=K.useState,ui=K.useEffect,ci=K.useLayoutEffect,mi=K.useDebugValue;function fi(n,e){var t=e(),i=di({inst:{value:t,getSnapshot:e}}),a=i[0].inst,s=i[1];return ci(function(){a.value=t,a.getSnapshot=e,ye(a)&&s({inst:a})},[n,t,e]),ui(function(){return ye(a)&&s({inst:a}),n(function(){ye(a)&&s({inst:a})})},[n]),mi(t),t}function ye(n){var e=n.getSnapshot;n=n.value;try{var t=e();return!li(n,t)}catch{return!0}}function pi(n,e){return e()}var hi=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?pi:fi;Vt.useSyncExternalStore=K.useSyncExternalStore!==void 0?K.useSyncExternalStore:hi;Pt.exports=Vt;var _t=Pt.exports;const gi=_t.useSyncExternalStore,Je=M.createContext(void 0),ki=M.createContext(!1);function vi(n,e){return n||(e&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Je),window.ReactQueryClientContext):Je)}const Si=({context:n}={})=>{const e=M.useContext(vi(n,M.useContext(ki)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Ut=M.createContext(!1),yi=()=>M.useContext(Ut);Ut.Provider;function Ni(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const bi=M.createContext(Ni()),Fi=()=>M.useContext(bi);function wi(n,e){return typeof n=="function"?n(...e):!!n}const Ci=(n,e)=>{(n.suspense||n.useErrorBoundary)&&(e.isReset()||(n.retryOnMount=!1))},Ei=n=>{M.useEffect(()=>{n.clearReset()},[n])},xi=({result:n,errorResetBoundary:e,useErrorBoundary:t,query:i})=>n.isError&&!e.isReset()&&!n.isFetching&&wi(t,[n.error,i]),Oi=n=>{n.suspense&&typeof n.staleTime!="number"&&(n.staleTime=1e3)},Ri=(n,e)=>n.isLoading&&n.isFetching&&!e,Ti=(n,e,t)=>(n==null?void 0:n.suspense)&&Ri(e,t),Ii=(n,e,t)=>e.fetchOptimistic(n).then(({data:i})=>{n.onSuccess==null||n.onSuccess(i),n.onSettled==null||n.onSettled(i,null)}).catch(i=>{t.clearReset(),n.onError==null||n.onError(i),n.onSettled==null||n.onSettled(void 0,i)});function Di(n,e){const t=Si({context:n.context}),i=yi(),a=Fi(),s=t.defaultQueryOptions(n);s._optimisticResults=i?"isRestoring":"optimistic",s.onError&&(s.onError=Z.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=Z.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=Z.batchCalls(s.onSettled)),Oi(s),Ci(s,a),Ei(a);const[r]=M.useState(()=>new e(t,s)),o=r.getOptimisticResult(s);if(gi(M.useCallback(l=>{const u=i?()=>{}:r.subscribe(Z.batchCalls(l));return r.updateResult(),u},[r,i]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),M.useEffect(()=>{r.setOptions(s,{listeners:!1})},[s,r]),Ti(s,o,i))throw Ii(s,r,a);if(xi({result:o,errorResetBoundary:a,useErrorBoundary:s.useErrorBoundary,query:r.getCurrentQuery()}))throw o.error;return s.notifyOnChangeProps?o:r.trackResult(o)}function Li(n,e,t){const i=Wn(n,e,t);return Di(i,ai)}var Ai={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const He=n=>{let e;const t=new Set,i=(l,u)=>{const d=typeof l=="function"?l(e):l;if(!Object.is(d,e)){const f=e;e=(u!=null?u:typeof d!="object"||d===null)?d:Object.assign({},e,d),t.forEach(c=>c(e,f))}},a=()=>e,o={setState:i,getState:a,subscribe:l=>(t.add(l),()=>t.delete(l)),destroy:()=>{(Ai?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),t.clear()}};return e=n(i,a,o),o},Pi=n=>n?He(n):He;var jt={exports:{}},Mt={};/**
31
- * @license React
32
- * use-sync-external-store-shim/with-selector.production.min.js
33
- *
34
- * Copyright (c) Facebook, Inc. and its affiliates.
35
- *
36
- * This source code is licensed under the MIT license found in the
37
- * LICENSE file in the root directory of this source tree.
38
- */var he=j,Vi=_t;function _i(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}var Ui=typeof Object.is=="function"?Object.is:_i,ji=Vi.useSyncExternalStore,Mi=he.useRef,$i=he.useEffect,zi=he.useMemo,Bi=he.useDebugValue;Mt.useSyncExternalStoreWithSelector=function(n,e,t,i,a){var s=Mi(null);if(s.current===null){var r={hasValue:!1,value:null};s.current=r}else r=s.current;s=zi(function(){function l(S){if(!u){if(u=!0,d=S,S=i(S),a!==void 0&&r.hasValue){var y=r.value;if(a(y,S))return f=y}return f=S}if(y=f,Ui(d,S))return y;var k=i(S);return a!==void 0&&a(y,k)?y:(d=S,f=k)}var u=!1,d,f,c=t===void 0?null:t;return[function(){return l(e())},c===null?void 0:function(){return l(c())}]},[e,t,i,a]);var o=ji(n,s[0],s[1]);return $i(function(){r.hasValue=!0,r.value=o},[o]),Bi(o),o};jt.exports=Mt;var Qi=jt.exports;const Gi=Ee(Qi);var $t={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Ki}=j,{useSyncExternalStoreWithSelector:Wi}=Gi;let Ze=!1;function qi(n,e=n.getState,t){($t?"production":void 0)!=="production"&&t&&!Ze&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Ze=!0);const i=Wi(n.subscribe,n.getState,n.getServerState||n.getState,e,t);return Ki(i),i}const Xe=n=>{($t?"production":void 0)!=="production"&&typeof n!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof n=="function"?Pi(n):n,t=(i,a)=>qi(e,i,a);return Object.assign(t,e),t},Ji=n=>n?Xe(n):Xe;class zt{constructor(e){R(this,"channel");R(this,"listeners",new Map);R(this,"eventQueue",new Map);try{this.channel=new BroadcastChannel(e),this.channel.onmessage=t=>this.handleMessage(t),this.channel.onmessageerror=t=>console.error("NizzaBroadcastChannel:",t)}catch(t){throw console.error("Failed to create NizzaBroadcastChannel:",t),t}}on(e,t){return this.subscribeToEvent(e,t),{off:()=>this.unsubscribeFromEvent(e,t)}}emit(e,t,i={}){this.emitEvent(e,t,i)}handleMessage(e){const t=e.data,{name:i}=t;for(const[a,s]of this.listeners.entries())this.matchWildcard(a,i)&&s.forEach(r=>r({...t,wildcard:a}))}subscribeToEvent(e,t){if(typeof e!="string"||typeof t!="function"){const i=new Error("Invalid arguments");throw console.error(i),i}for(const[i,a]of this.listeners.entries())if(this.matchWildcard(i,e)){a.add(t);const s=this.eventQueue.get(i);s&&(s.forEach(r=>{t({...r,wildcard:i})}),this.eventQueue.delete(i));return}this.listeners.set(e,new Set([t]))}emitEvent(e,t,i){if(typeof e!="string"){const r=new Error("Invalid arguments");throw console.error(r),r}const a={name:e,data:t,attrs:i},s=Array.from(this.getMatchingListeners(e));if(s.length)for(const[r,o]of s)o({...a,wildcard:r});else this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(a);this.channel.postMessage(a)}*getMatchingListeners(e){for(const[t,i]of this.listeners.entries())if(this.matchWildcard(t,e))for(const a of i)yield[t,a]}unsubscribeFromEvent(e,t){if(this.listeners.has(e)){const i=this.listeners.get(e);i.delete(t),i.size===0&&this.listeners.delete(e)}}matchWildcard(e,t){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*");return new RegExp(`^${i}$`).test(t)}}exports.nizza=void 0;exports.useNizza=void 0;function Hi(){return exports.nizza=Bt(),exports.useNizza=exports.nizza.store,exports.nizza}function Bt(){if(!window.nizza){const n=Zi();window.nizza=n,window.nz=n}return window.nizza}function Zi(){const n=Ji(()=>({config:null}));return{version:"1.0.4",store:n,configure:Qt,setProductDataSource:Gt,instanceId:kt(),log:new bt("nz"),eventBus:new zt("nizza"),get state(){return n.getState()}}}async function Qt(n){try{const e=exports.nizza.store.getState().account;if(exports.nizza.store.setState({config:n}),(e==null?void 0:e.account)!==n.account){const t=await Wt(n.account);exports.nizza.store.setState({account:t})}if(n.getProductDataSource){const t=await n.getProductDataSource();exports.nizza.store.setState({productDataSource:t})}}catch(e){console.error("Error configuring NizzaStore:",e)}}function Gt(n){exports.nizza.store.setState({productDataSource:n})}function G(n){return n!=null&&typeof n=="object"&&n["@@functional/placeholder"]===!0}function se(n){return function e(t){return arguments.length===0||G(t)?e:n.apply(this,arguments)}}function De(n){return function e(t,i){switch(arguments.length){case 0:return e;case 1:return G(t)?e:se(function(a){return n(t,a)});default:return G(t)&&G(i)?e:G(t)?se(function(a){return n(a,i)}):G(i)?se(function(a){return n(t,a)}):n(t,i)}}}const Xi=Number.isInteger||function(e){return e<<0===e};function Yi(n){return Object.prototype.toString.call(n)==="[object String]"}var ea=De(function(e,t){var i=e<0?t.length+e:e;return Yi(t)?t.charAt(i):t[i]});const ta=ea;var na=se(function(e){return e==null});const ia=na;var aa=De(function(e,t){return e.map(function(i){for(var a=t,s=0,r;s<i.length;){if(a==null)return;r=i[s],a=Xi(r)?ta(r,a):a[r],s+=1}return a})});const sa=aa;var ra=De(function(e,t){return sa([e],t)[0]});const oa=ra;function la(n,e){e.forEach(t=>{if(ia(oa(t.split("."),n)))throw new Dt(t)})}const da=()=>["account"],ua=()=>{const n=exports.useNizza(a=>{var s;return(s=a.config)==null?void 0:s.account}),[e,t]=En(fe),i=Li(da(),()=>Re.get(n),{enabled:!!n&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return j.useEffect(()=>{const a=i.data;!i.isSuccess||!a||t(a)},[i.status]),{findQuery:i,account:e}},Kt=pt();async function Wt(n){const e=await Re.get(n);return Kt.set(fe,e),e}var qt=(n=>(n.CREATED="CREATED",n.STARTING="STARTING",n.LIVE="LIVE",n.FINALIZED="FINALIZED",n))(qt||{});const ca={ALL:"*",CORE:"core:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},ma={EVENT_STATUS_CHANGED:"event:statusChanged"};var Jt=(n=>(n.English="en",n.Spanish="es",n.Portuguese="pt",n))(Jt||{}),Ht=(n=>(n.COMBO="Combo",n))(Ht||{}),Zt=(n=>(n.VTEX="VTEX",n.PLATFORM="platform",n.CACE="CACE",n.GLOBAL_PAGE="globalPage",n.DEV_LOCAL="dev:local",n.CUSTOMIZATION="customization",n.FAST_STORE="faststore",n))(Zt||{});function Xt(n){const e=Object.values(n);return Object.assign({},...e)}function Yt(n){return Object.entries(n).reduce((e,[t,i])=>{const a=Xt(i);return{...e,[t]:a}},{})}function en(n,e){const t=Yt(e);Object.entries(t).forEach(([i,a])=>{n.addResourceBundle(i,"translation",a,!0)})}function fa(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function X(n){"@babel/helpers - typeof";return X=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(n)}function pa(n,e){if(X(n)!=="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e||"default");if(X(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function ha(n){var e=pa(n,"string");return X(e)==="symbol"?e:String(e)}function Ye(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,ha(i.key),i)}}function ga(n,e,t){return e&&Ye(n.prototype,e),t&&Ye(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}var tn=[],ka=tn.forEach,va=tn.slice;function Sa(n){return ka.call(va.call(arguments,1),function(e){if(e)for(var t in e)n[t]===void 0&&(n[t]=e[t])}),n}var et=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ya=function(e,t,i){var a=i||{};a.path=a.path||"/";var s=encodeURIComponent(t),r="".concat(e,"=").concat(s);if(a.maxAge>0){var o=a.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");r+="; Max-Age=".concat(Math.floor(o))}if(a.domain){if(!et.test(a.domain))throw new TypeError("option domain is invalid");r+="; Domain=".concat(a.domain)}if(a.path){if(!et.test(a.path))throw new TypeError("option path is invalid");r+="; Path=".concat(a.path)}if(a.expires){if(typeof a.expires.toUTCString!="function")throw new TypeError("option expires is invalid");r+="; Expires=".concat(a.expires.toUTCString())}if(a.httpOnly&&(r+="; HttpOnly"),a.secure&&(r+="; Secure"),a.sameSite){var l=typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite;switch(l){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return r},tt={create:function(e,t,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+i*60*1e3)),a&&(s.domain=a),document.cookie=ya(e,encodeURIComponent(t),s)},read:function(e){for(var t="".concat(e,"="),i=document.cookie.split(";"),a=0;a<i.length;a++){for(var s=i[a];s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove:function(e){this.create(e,"",-1)}},Na={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&typeof document!="undefined"){var i=tt.read(e.lookupCookie);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&typeof document!="undefined"&&tt.create(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},ba={name:"querystring",lookup:function(e){var t;if(typeof window!="undefined"){var i=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var a=i.substring(1),s=a.split("&"),r=0;r<s.length;r++){var o=s[r].indexOf("=");if(o>0){var l=s[r].substring(0,o);l===e.lookupQuerystring&&(t=s[r].substring(o+1))}}}return t}},q=null,nt=function(){if(q!==null)return q;try{q=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{q=!1}return q},Fa={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&nt()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&nt()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},J=null,it=function(){if(J!==null)return J;try{J=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{J=!1}return J},wa={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&it()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&it()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Ca={name:"navigator",lookup:function(e){var t=[];if(typeof navigator!="undefined"){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)t.push(navigator.languages[i]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},Ea={name:"htmlTag",lookup:function(e){var t,i=e.htmlTag||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(t=i.getAttribute("lang")),t}},xa={name:"path",lookup:function(e){var t;if(typeof window!="undefined"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;t=i[e.lookupFromPathIndex].replace("/","")}else t=i[0].replace("/","")}return t}},Oa={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window!="undefined"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[t]}};function Ra(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var nn=function(){function n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};fa(this,n),this.type="languageDetector",this.detectors={},this.init(e,t)}return ga(n,[{key:"init",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=Sa(i,this.options||{},Ra()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(s){return s.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(Na),this.addDetector(ba),this.addDetector(Fa),this.addDetector(wa),this.addDetector(Ca),this.addDetector(Ea),this.addDetector(xa),this.addDetector(Oa)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var i=this;t||(t=this.options.order);var a=[];return t.forEach(function(s){if(i.detectors[s]){var r=i.detectors[s].lookup(i.options);r&&typeof r=="string"&&(r=[r]),r&&(a=a.concat(r))}}),a=a.map(function(s){return i.options.convertDetectedLanguage(s)}),this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}},{key:"cacheUserLanguage",value:function(t,i){var a=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||i.forEach(function(s){a.detectors[s]&&a.detectors[s].cacheUserLanguage(t,a.options)}))}}]),n}();nn.type="languageDetector";function an(n,e){n.use(e).use(nn).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(t,i,a)=>{if(i){const[s,...r]=i.split(",").map(o=>o.trim());if(s==="number")return new Intl.NumberFormat(a).format(t);if(s==="date")return new Intl.DateTimeFormat(a).format(t);if(s==="currency")return new Intl.NumberFormat(a,{style:"currency",currency:r[0]||"USD",currencyDisplay:"narrowSymbol"}).format(t).replace("$","").trim()}return t}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const Ta={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class le{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Ta,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,a){return a&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new le(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new le(this.logger,e)}}var $=new le;class ge{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]=this.observers[i]||[],this.observers[i].push(t)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(i=>i!==t)}}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),a=1;a<t;a++)i[a-1]=arguments[a];this.observers[e]&&[].concat(this.observers[e]).forEach(r=>{r(...i)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(r=>{r.apply(r,[e,...i])})}}function H(){let n,e;const t=new Promise((i,a)=>{n=i,e=a});return t.resolve=n,t.reject=e,t}function at(n){return n==null?"":""+n}function Ia(n,e,t){n.forEach(i=>{e[i]&&(t[i]=e[i])})}function Le(n,e,t){function i(r){return r&&r.indexOf("###")>-1?r.replace(/###/g,"."):r}function a(){return!n||typeof n=="string"}const s=typeof e!="string"?[].concat(e):e.split(".");for(;s.length>1;){if(a())return{};const r=i(s.shift());!n[r]&&t&&(n[r]=new t),Object.prototype.hasOwnProperty.call(n,r)?n=n[r]:n={}}return a()?{}:{obj:n,k:i(s.shift())}}function st(n,e,t){const{obj:i,k:a}=Le(n,e,Object);i[a]=t}function Da(n,e,t,i){const{obj:a,k:s}=Le(n,e,Object);a[s]=a[s]||[],i&&(a[s]=a[s].concat(t)),i||a[s].push(t)}function de(n,e){const{obj:t,k:i}=Le(n,e);if(t)return t[i]}function La(n,e,t){const i=de(n,t);return i!==void 0?i:de(e,t)}function sn(n,e,t){for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in n?typeof n[i]=="string"||n[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?t&&(n[i]=e[i]):sn(n[i],e[i],t):n[i]=e[i]);return n}function B(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Aa={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Pa(n){return typeof n=="string"?n.replace(/[&<>"'\/]/g,e=>Aa[e]):n}const Va=[" ",",","?","!",";"];function _a(n,e,t){e=e||"",t=t||"";const i=Va.filter(r=>e.indexOf(r)<0&&t.indexOf(r)<0);if(i.length===0)return!0;const a=new RegExp(`(${i.map(r=>r==="?"?"\\?":r).join("|")})`);let s=!a.test(n);if(!s){const r=n.indexOf(t);r>0&&!a.test(n.substring(0,r))&&(s=!0)}return s}function ue(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const i=e.split(t);let a=n;for(let s=0;s<i.length;++s){if(!a||typeof a[i[s]]=="string"&&s+1<i.length)return;if(a[i[s]]===void 0){let r=2,o=i.slice(s,s+r).join(t),l=a[o];for(;l===void 0&&i.length>s+r;)r++,o=i.slice(s,s+r).join(t),l=a[o];if(l===void 0)return;if(l===null)return null;if(e.endsWith(o)){if(typeof l=="string")return l;if(o&&typeof l[o]=="string")return l[o]}const u=i.slice(s+r).join(t);return u?ue(l,u,t):void 0}a=a[i[s]]}return a}function ce(n){return n&&n.indexOf("_")>0?n.replace("_","-"):n}class rt extends ge{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,r=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o=[e,t];i&&typeof i!="string"&&(o=o.concat(i)),i&&typeof i=="string"&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."));const l=de(this.data,o);return l||!r||typeof i!="string"?l:ue(this.data&&this.data[e]&&this.data[e][t],i,s)}addResource(e,t,i,a){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const r=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(o=e.split("."),a=t,t=o[1]),this.addNamespaces(t),st(this.data,o,a),s.silent||this.emit("added",e,t,i,a)}addResources(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in i)(typeof i[s]=="string"||Object.prototype.toString.apply(i[s])==="[object Array]")&&this.addResource(e,t,s,i[s],{silent:!0});a.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,a,s){let r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),a=i,i=t,t=o[1]),this.addNamespaces(t);let l=de(this.data,o)||{};a?sn(l,i,s):l={...l,...i},st(this.data,o,l),r.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(a=>t[a]&&Object.keys(t[a]).length>0)}toJSON(){return this.data}}var rn={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,i,a){return n.forEach(s=>{this.processors[s]&&(e=this.processors[s].process(e,t,i,a))}),e}};const ot={};class me extends ge{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Ia(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=$.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,t);return i&&i.res!==void 0}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const a=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const r=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!_a(e,i,a);if(r&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:s};const u=e.split(i);(i!==a||i===a&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),e=u.join(a)}return typeof s=="string"&&(s=[s]),{key:e,namespaces:s}}translate(e,t,i){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:r,namespaces:o}=this.extractFromKey(e[e.length-1],t),l=o[o.length-1],u=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const w=t.nsSeparator||this.options.nsSeparator;return a?{res:`${l}${w}${r}`,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${w}${r}`}return a?{res:r,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:r}const f=this.resolve(e,t);let c=f&&f.res;const S=f&&f.usedKey||r,y=f&&f.exactUsedKey||r,k=Object.prototype.toString.apply(c),N=["[object Number]","[object Function]","[object RegExp]"],O=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,F=!this.i18nFormat||this.i18nFormat.handleAsObject;if(F&&c&&(typeof c!="string"&&typeof c!="boolean"&&typeof c!="number")&&N.indexOf(k)<0&&!(typeof O=="string"&&k==="[object Array]")){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(S,c,{...t,ns:o}):`key '${r} (${this.language})' returned an object instead of string.`;return a?(f.res=w,f.usedParams=this.getUsedParamsDetails(t),f):w}if(s){const w=k==="[object Array]",D=w?[]:{},L=w?y:S;for(const A in c)if(Object.prototype.hasOwnProperty.call(c,A)){const m=`${L}${s}${A}`;D[A]=this.translate(m,{...t,joinArrays:!1,ns:o}),D[A]===m&&(D[A]=c[A])}c=D}}else if(F&&typeof O=="string"&&k==="[object Array]")c=c.join(O),c&&(c=this.extendTranslation(c,e,t,i));else{let w=!1,D=!1;const L=t.count!==void 0&&typeof t.count!="string",A=me.hasDefaultValue(t),m=L?this.pluralResolver.getSuffix(u,t.count,t):"",p=t.ordinal&&L?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",h=t[`defaultValue${m}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(c)&&A&&(w=!0,c=h),this.isValidLookup(c)||(D=!0,c=r);const b=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:c,C=A&&h!==c&&this.options.updateMissing;if(D||w||C){if(this.logger.log(C?"updateKey":"missingKey",u,l,r,C?h:c),s){const x=this.resolve(r,{...t,keySeparator:!1});x&&x.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 v=[];const E=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&E&&E[0])for(let x=0;x<E.length;x++)v.push(E[x]);else this.options.saveMissingTo==="all"?v=this.languageUtils.toResolveHierarchy(t.lng||this.language):v.push(t.lng||this.language);const P=(x,T,V)=>{const te=A&&V!==c?V:b;this.options.missingKeyHandler?this.options.missingKeyHandler(x,l,T,te,C,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(x,l,T,te,C,t),this.emit("missingKey",x,l,T,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?v.forEach(x=>{this.pluralResolver.getSuffixes(x,t).forEach(T=>{P([x],r+T,t[`defaultValue${T}`]||h)})}):P(v,r,h))}c=this.extendTranslation(c,e,t,f,i),D&&c===r&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${r}`),(D||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${r}`:r,w?c:void 0):c=this.options.parseMissingKeyHandler(c))}return a?(f.res=c,f.usedParams=this.getUsedParamsDetails(t),f):c}extendTranslation(e,t,i,a,s){var r=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const c=e.match(this.interpolator.nestingRegexp);d=c&&c.length}let f=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,i.lng||this.language,i),u){const c=e.match(this.interpolator.nestingRegexp),S=c&&c.length;d<S&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&a&&a.res&&(i.lng=a.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,S=new Array(c),y=0;y<c;y++)S[y]=arguments[y];return s&&s[0]===S[0]&&!i.context?(r.logger.warn(`It seems you are nesting recursively key: ${S[0]} in key: ${t[0]}`),null):r.translate(...S,t)},i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,l=typeof o=="string"?[o]:o;return e!=null&&l&&l.length&&i.applyPostProcessor!==!1&&(e=rn.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,s,r,o;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,t),d=u.key;a=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const c=t.count!==void 0&&typeof t.count!="string",S=c&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),y=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",k=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);f.forEach(N=>{this.isValidLookup(i)||(o=N,!ot[`${k[0]}-${N}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(ot[`${k[0]}-${N}`]=!0,this.logger.warn(`key "${a}" for languages "${k.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),k.forEach(O=>{if(this.isValidLookup(i))return;r=O;const F=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(F,d,O,N,t);else{let w;c&&(w=this.pluralResolver.getSuffix(O,t.count,t));const D=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(F.push(d+w),t.ordinal&&w.indexOf(L)===0&&F.push(d+w.replace(L,this.options.pluralSeparator)),S&&F.push(d+D)),y){const A=`${d}${this.options.contextSeparator}${t.context}`;F.push(A),c&&(F.push(A+w),t.ordinal&&w.indexOf(L)===0&&F.push(A+w.replace(L,this.options.pluralSeparator)),S&&F.push(A+D))}}let I;for(;I=F.pop();)this.isValidLookup(i)||(s=I,i=this.getResource(O,N,I,t))}))})}),{res:i,usedKey:a,exactUsedKey:s,usedLng:r,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,i,a):this.resourceStore.getResource(e,t,i,a)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let a=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!i){a={...a};for(const s of t)delete a[s]}return a}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}function Ne(n){return n.charAt(0).toUpperCase()+n.slice(1)}class lt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}getScriptPartFromCode(e){if(e=ce(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=ce(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(a=>a.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ne(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ne(i[1].toLowerCase())),t.indexOf(i[2].toLowerCase())>-1&&(i[2]=Ne(i[2].toLowerCase()))),i.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 t;return e.forEach(i=>{if(t)return;const a=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(a))&&(t=a)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(s=>{if(s===a)return s;if(!(s.indexOf("-")<0&&a.indexOf("-")<0)&&s.indexOf(a)===0)return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),a=[],s=r=>{r&&(this.isSupportedCode(r)?a.push(r):this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):typeof e=="string"&&s(this.formatLanguageCode(e)),i.forEach(r=>{a.indexOf(r)<0&&s(this.formatLanguageCode(r))}),a}}let Ua=[{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}],ja={1:function(n){return+(n>1)},2:function(n){return+(n!=1)},3:function(n){return 0},4:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},5:function(n){return n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5},6:function(n){return n==1?0:n>=2&&n<=4?1:2},7:function(n){return n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},8:function(n){return n==1?0:n==2?1:n!=8&&n!=11?2:3},9:function(n){return+(n>=2)},10:function(n){return n==1?0:n==2?1:n<7?2:n<11?3:4},11:function(n){return n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3},12:function(n){return+(n%10!=1||n%100==11)},13:function(n){return+(n!==0)},14:function(n){return n==1?0:n==2?1:n==3?2:3},15:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2},16:function(n){return n%10==1&&n%100!=11?0:n!==0?1:2},17:function(n){return n==1||n%10==1&&n%100!=11?0:1},18:function(n){return n==0?0:n==1?1:2},19:function(n){return n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3},20:function(n){return n==1?0:n==0||n%100>0&&n%100<20?1:2},21:function(n){return n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0},22:function(n){return n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3}};const Ma=["v1","v2","v3"],$a=["v4"],dt={zero:0,one:1,two:2,few:3,many:4,other:5};function za(){const n={};return Ua.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:ja[e.fc]}})}),n}class Ba{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=$.create("pluralResolver"),(!this.options.compatibilityJSON||$a.includes(this.options.compatibilityJSON))&&(typeof Intl=="undefined"||!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=za()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(ce(e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,t);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(a=>`${t}${a}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,t);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((a,s)=>dt[a]-dt[s]).map(a=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${a}`):i.numbers.map(a=>this.getSuffix(e,a,t)):[]}getSuffix(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(e,i);return a?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${a.select(t)}`:this.getSuffixRetroCompatible(a,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const i=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let a=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));const s=()=>this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString();return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?`_plural_${a.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Ma.includes(this.options.compatibilityJSON)}}function ut(n,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=La(n,e,t);return!s&&a&&typeof t=="string"&&(s=ue(n,t,i),s===void 0&&(s=ue(e,t,i))),s}class Qa{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=$.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=t.escape!==void 0?t.escape:Pa,this.escapeValue=t.escapeValue!==void 0?t.escapeValue:!0,this.useRawValueToEscape=t.useRawValueToEscape!==void 0?t.useRawValueToEscape:!1,this.prefix=t.prefix?B(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?B(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?B(t.nestingPrefix):t.nestingPrefixEscaped||B("$t("),this.nestingSuffix=t.nestingSuffix?B(t.nestingSuffix):t.nestingSuffixEscaped||B(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=t.alwaysFormat!==void 0?t.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const i=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(i,"g")}interpolate(e,t,i,a){let s,r,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(y){return y.replace(/\$/g,"$$$$")}const d=y=>{if(y.indexOf(this.formatSeparator)<0){const F=ut(t,l,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(F,void 0,i,{...a,...t,interpolationkey:y}):F}const k=y.split(this.formatSeparator),N=k.shift().trim(),O=k.join(this.formatSeparator).trim();return this.format(ut(t,l,N,this.options.keySeparator,this.options.ignoreJSONStructure),O,i,{...a,...t,interpolationkey:N})};this.resetRegExp();const f=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,c=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>u(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?u(this.escape(y)):u(y)}].forEach(y=>{for(o=0;s=y.regex.exec(e);){const k=s[1].trim();if(r=d(k),r===void 0)if(typeof f=="function"){const O=f(e,s,a);r=typeof O=="string"?O:""}else if(a&&Object.prototype.hasOwnProperty.call(a,k))r="";else if(c){r=s[0];continue}else this.logger.warn(`missed to pass in variable ${k} for interpolating ${e}`),r="";else typeof r!="string"&&!this.useRawValueToEscape&&(r=at(r));const N=y.safeValue(r);if(e=e.replace(s[0],N),c?(y.regex.lastIndex+=r.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,r;function o(l,u){const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let c=`{${f[1]}`;l=f[0],c=this.interpolate(c,r);const S=c.match(/'/g),y=c.match(/"/g);(S&&S.length%2===0&&!y||y.length%2!==0)&&(c=c.replace(/'/g,'"'));try{r=JSON.parse(c),u&&(r={...u,...r})}catch(k){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,k),`${l}${d}${c}`}return delete r.defaultValue,l}for(;a=this.nestingRegexp.exec(e);){let l=[];r={...i},r=r.replace&&typeof r.replace!="string"?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;let u=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const d=a[1].split(this.formatSeparator).map(f=>f.trim());a[1]=d.shift(),l=d,u=!0}if(s=t(o.call(this,a[1].trim(),r),r),s&&a[0]===e&&typeof s!="string")return s;typeof s!="string"&&(s=at(s)),s||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),s=""),u&&(s=l.reduce((d,f)=>this.format(d,f,i.lng,{...i,interpolationkey:a[1].trim()}),s.trim())),e=e.replace(a[0],s),this.regexp.lastIndex=0}return e}}function Ga(n){let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const i=n.split("(");e=i[0].toLowerCase().trim();const a=i[1].substring(0,i[1].length-1);e==="currency"&&a.indexOf(":")<0?t.currency||(t.currency=a.trim()):e==="relativetime"&&a.indexOf(":")<0?t.range||(t.range=a.trim()):a.split(";").forEach(r=>{if(!r)return;const[o,...l]=r.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");t[o.trim()]||(t[o.trim()]=u),u==="false"&&(t[o.trim()]=!1),u==="true"&&(t[o.trim()]=!0),isNaN(u)||(t[o.trim()]=parseInt(u,10))})}return{formatName:e,formatOptions:t}}function Q(n){const e={};return function(i,a,s){const r=a+JSON.stringify(s);let o=e[r];return o||(o=n(ce(a),s),e[r]=o),o(i)}}class Ka{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=$.create("formatter"),this.options=e,this.formats={number:Q((t,i)=>{const a=new Intl.NumberFormat(t,{...i});return s=>a.format(s)}),currency:Q((t,i)=>{const a=new Intl.NumberFormat(t,{...i,style:"currency"});return s=>a.format(s)}),datetime:Q((t,i)=>{const a=new Intl.DateTimeFormat(t,{...i});return s=>a.format(s)}),relativetime:Q((t,i)=>{const a=new Intl.RelativeTimeFormat(t,{...i});return s=>a.format(s,i.range||"day")}),list:Q((t,i)=>{const a=new Intl.ListFormat(t,{...i});return s=>a.format(s)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Q(t)}format(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((o,l)=>{const{formatName:u,formatOptions:d}=Ga(l);if(this.formats[u]){let f=o;try{const c=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},S=c.locale||c.lng||a.locale||a.lng||i;f=this.formats[u](o,S,{...d,...a,...c})}catch(c){this.logger.warn(c)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}function Wa(n,e){n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)}class qa extends ge{constructor(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=a,this.logger=$.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,a.backend,a)}queueLoad(e,t,i,a){const s={},r={},o={},l={};return e.forEach(u=>{let d=!0;t.forEach(f=>{const c=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?r[c]===void 0&&(r[c]=!0):(this.state[c]=1,d=!1,r[c]===void 0&&(r[c]=!0),s[c]===void 0&&(s[c]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(o[u]=!0)}),(Object.keys(s).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,i){const a=e.split("|"),s=a[0],r=a[1];t&&this.emit("failedLoading",s,r,t),i&&this.store.addResourceBundle(s,r,i),this.state[e]=t?-1:2;const o={};this.queue.forEach(l=>{Da(l.loaded,[s],r),Wa(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{o[u][f]===void 0&&(o[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,r=arguments.length>5?arguments[5]:void 0;if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:a,wait:s,callback:r});return}this.readingCalls++;const o=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,a+1,s*2,r)},s);return}r(u,d)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(d=>o(null,d)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=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."),a&&a();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const s=this.queueLoad(e,t,i,a);if(!s.toLoad.length)return s.pending.length||a(),null;s.toLoad.forEach(r=>{this.loadOne(r)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),a=i[0],s=i[1];this.read(a,s,"read",void 0,void 0,(r,o)=>{r&&this.logger.warn(`${t}loading namespace ${s} for language ${a} failed`,r),!r&&o&&this.logger.log(`${t}loaded namespace ${s} for language ${a}`,o),this.loaded(e,r,o)})}saveMissing(e,t,i,a,s){let r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){const l={...r,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,t,i,a,l):d=u(e,t,i,a),d&&typeof d.then=="function"?d.then(f=>o(null,f)).catch(o):o(null,d)}catch(d){o(d)}else u(e,t,i,a,o,l)}!e||!e[0]||this.store.addResource(e[0],t,i,a)}}}function ct(){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 t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(a=>{t[a]=i[a]})}return t},interpolation:{escapeValue:!0,format:(n,e,t,i)=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function mt(n){return typeof n.ns=="string"&&(n.ns=[n.ns]),typeof n.fallbackLng=="string"&&(n.fallbackLng=[n.fallbackLng]),typeof n.fallbackNS=="string"&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n}function ae(){}function Ja(n){Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})}class Y extends ge{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=mt(e),this.services={},this.logger=$,this.modules={external:[]},Ja(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof t=="function"&&(i=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(typeof t.ns=="string"?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const a=ct();this.options={...a,...this.options,...mt(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...a.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);function s(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?$.init(s(this.modules.logger),this.options):$.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl!="undefined"&&(d=Ka);const f=new lt(this.options);this.store=new rt(this.options.resources,this.options);const c=this.services;c.logger=$,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new Ba(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(c.formatter=s(d),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Qa(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new qa(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(S){for(var y=arguments.length,k=new Array(y>1?y-1:0),N=1;N<y;N++)k[N-1]=arguments[N];e.emit(S,...k)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new me(this.services,this.options),this.translator.on("*",function(S){for(var y=arguments.length,k=new Array(y>1?y-1:0),N=1;N<y;N++)k[N-1]=arguments[N];e.emit(S,...k)}),this.modules.external.forEach(S=>{S.init&&S.init(this)})}if(this.format=this.options.interpolation.format,i||(i=ae),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const l=H(),u=()=>{const d=(f,c)=>{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),l.resolve(c),i(f,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ae;const a=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const s=[],r=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};a?r(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>r(l)),this.options.preload&&this.options.preload.forEach(o=>r(o)),this.services.backendConnector.load(s,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,t,i){const a=H();return e||(e=this.languages),t||(t=this.options.ns),i||(i=ae),this.services.backendConnector.reload(e,t,s=>{a.resolve(),i(s)}),a}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"&&rn.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,t){var i=this;this.isLanguageChangingTo=e;const a=H();this.emit("languageChanging",e);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},r=(l,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,a.resolve(function(){return i.t(...arguments)}),t&&t(l,function(){return i.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{r(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),a}getFixedT(e,t,i){var a=this;const s=function(r,o){let l;if(typeof o!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];l=a.options.overloadTranslationOptionHandler([r,o].concat(d))}else l={...o};l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix=l.keyPrefix||i||s.keyPrefix;const c=a.options.keySeparator||".";let S;return l.keyPrefix&&Array.isArray(r)?S=r.map(y=>`${l.keyPrefix}${c}${y}`):S=l.keyPrefix?`${l.keyPrefix}${c}${r}`:r,a.t(S,l)};return typeof e=="string"?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=i,s}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 t=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 i=t.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const r=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===2};if(t.precheck){const o=t.precheck(this,r);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(i,e)&&(!a||r(s,e)))}loadNamespaces(e,t){const i=H();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{i.resolve(),t&&t(a)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=H();typeof e=="string"&&(e=[e]);const a=this.options.preload||[],s=e.filter(r=>a.indexOf(r)<0);return s.length?(this.options.preload=a.concat(s),this.loadResources(r=>{i.resolve(),t&&t(r)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new lt(ct());return t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Y(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ae;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},s=new Y(a);return(e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(o=>{s[o]=this[o]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i&&(s.store=new rt(this.store.data,a),s.services.resourceStore=s.store),s.translator=new me(s.services,a),s.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];s.emit(o,...u)}),s.init(a,t),s.translator.options=a,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const U=Y.createInstance();U.createInstance=Y.createInstance;U.createInstance;U.dir;U.init;U.loadResources;U.reloadResources;U.use;U.changeLanguage;U.getFixedT;U.t;U.exists;U.setDefaultNamespace;U.hasLoadedNamespace;U.loadNamespaces;U.loadLanguages;const Ha=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Za={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Xa=n=>Za[n],Ya=n=>n.replace(Ha,Xa);let ft={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Ya};function es(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ft={...ft,...n}}const ts={type:"3rdParty",init(n){es(n.options.react)}};an(U,ts);const ns=n=>en(U,n);let Ae=new Map;const we=j.createContext(Ae),is=({children:n,stores:e})=>{const t=j.useContext(we),i=j.useMemo(()=>{const a=new Map;return e.forEach(s=>a.set(s.class,s.value)),Ae=new Map([...t,...a])},[]);return mn.jsx(we.Provider,{value:i,children:n})};function as(n){return j.useContext(we).get(n)}function ss(n){return Ae.get(n)}var on=(n=>(n.Created="CREATED",n.Finalized="FINALIZED",n.Live="LIVE",n.Starting="STARTING",n))(on||{}),ln=(n=>(n.Add="add",n.Remove="remove",n))(ln||{}),dn=(n=>(n.Active="active",n.Inactive="inactive",n))(dn||{});const rs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},os={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ls={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ds={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},us={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ManageCollectionProductInInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},cs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ms={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},fs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindMinimalEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"thumbnails"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ps={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchMinimalEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},hs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BlockUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BlockUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BlockUserSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},gs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ChangeAccountUsername"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeAccountUsername"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ks={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},vs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetAllChatMessageInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatMessageArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"connectionId"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"idEvent"}},{kind:"Field",name:{kind:"Name",value:"sendDate"}},{kind:"Field",name:{kind:"Name",value:"sessionId"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"isAdmin"}},{kind:"Field",name:{kind:"Name",value:"urlGif"}},{kind:"Field",name:{kind:"Name",value:"second"}},{kind:"Field",name:{kind:"Name",value:"ip"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ss={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetChatRoomToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetChatRoomInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getChatRoomToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatRoomTokenData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ys={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PinChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PinChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PinChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Ns={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInputAccount"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},bs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"section"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Fs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ws={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTimeLine"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetTimeLineInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTimeLine"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TimeLineArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"time"}},{kind:"Field",name:{kind:"Name",value:"likes"}},{kind:"Field",name:{kind:"Name",value:"comments"}},{kind:"Field",name:{kind:"Name",value:"viewers"}},{kind:"Field",name:{kind:"Name",value:"orders"}},{kind:"Field",name:{kind:"Name",value:"minute"}},{kind:"Field",name:{kind:"Name",value:"hour"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Cs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppendProductsToSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RelateToProductsSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appendProductsSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Es={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateSnackVideoBatch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},xs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteRelationshipWithSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteRelationshipSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}}]}}]}}]},Os={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Rs={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindManySnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindManySnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findManySnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ts={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Is={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSnackVideoRelationships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRelationshipSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RelationshipSnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceEntity"}},{kind:"Field",name:{kind:"Name",value:"attributeId"}}]}}]}}]}}]}}]},Ds={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ls={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindByProductSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindByProductSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findByProductSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},As=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:rs,AppendProductsToSnackVideoDocument:Cs,BlockUserDocument:hs,ChangeAccountUsernameDocument:gs,CreateSnackVideoBatchDocument:Es,DeleteAllCustomizationDocument:Ns,DeleteChatMessageDocument:ks,DeleteCollectionDocument:os,DeleteRelationshipWithSnackVideoDocument:xs,DeleteSnackVideoDocument:Os,EventStatus:on,FindByProductSnackVideoDocument:Ls,FindCollectionDocument:ls,FindManySnackVideosDocument:Rs,FindMinimalEventDocument:fs,GetAllChatMessageDocument:vs,GetAllCollectionsDocument:ds,GetAllCustomizationDocument:bs,GetAllSnackVideosDocument:Ts,GetChatRoomTokenDocument:Ss,GetSnackVideoRelationshipsDocument:Is,GetTimeLineDocument:ws,ManageCollectionProductDocument:us,Methods:ln,PinChatMessageDocument:ys,SearchCollectionsDocument:cs,SearchMinimalEventsDocument:ps,SearchSnackVideosDocument:Ds,Status:dn,UpdateCollectionDocument:ms,UpdateCustomizationDocument:Fs},Symbol.toStringTag,{value:"Module"}));function Ps(n){return{class:n,_value:null,get value(){return this._value||(this._value=new n,Object.freeze(this)),this._value}}}exports.AccountContractStatusTypes=Oe;exports.AccountContractTypes=Ct;exports.AccountInvalidError=Bn;exports.AccountPlanDescriptionTypes=xt;exports.AccountRestRepository=Rt;exports.AccountService=Lt;exports.AccountSubscriptionTypes=Et;exports.AccountTypes=xe;exports.AggregateRoot=Ft;exports.ApiGraphqlTypes=As;exports.BaseMobxStore=Mn;exports.BroadcastChannelEventBus=zt;exports.DomainError=ee;exports.EventBusWildcards=ca;exports.EventNames=ma;exports.GlobalPageSectionTypes=Ot;exports.InvalidNizzaGlobalObjectError=Dt;exports.LanguageTypes=Jt;exports.Logger=bt;exports.NizzaAccount=pe;exports.NizzaEventStatus=qt;exports.NizzaProductRequestOriginTypes=Zt;exports.NizzaVariationTypes=Ht;exports.ResourceNotFoundError=Tt;exports.StoreProvider=is;exports.UnexpectedError=It;exports.ValueObject=$n;exports.accountAtom=fe;exports.accountService=Re;exports.apiCall=Ln;exports.buildLanguageTranslations=Xt;exports.buildTranslations=Yt;exports.configure=Qt;exports.createAggregateRoot=wt;exports.createStore=Ps;exports.customFetch=Ce;exports.downloadFile=An;exports.fileOrigin=Un;exports.getAccount=Wt;exports.getClientTimeZone=Pn;exports.getInstance=Bt;exports.getStore=ss;exports.globalAtomStore=Kt;exports.i18Init=an;exports.jsDownload=gt;exports.nizzaInit=Hi;exports.registerTranslations=ns;exports.registerTranslationsOf=en;exports.searchParams=_n;exports.setProductDataSource=Gt;exports.shortId=kt;exports.useAccount=ua;exports.useStore=as;exports.validateRequiredProps=la;
39
- //# sourceMappingURL=index.cjs.map
32
+ */var Pe=$;function Pl(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Il=typeof Object.is=="function"?Object.is:Pl,Vl=Pe.useState,jl=Pe.useEffect,Ul=Pe.useLayoutEffect,Ml=Pe.useDebugValue;function $l(t,e){var n=e(),i=Vl({inst:{value:n,getSnapshot:e}}),a=i[0].inst,r=i[1];return Ul(function(){a.value=n,a.getSnapshot=e,an(a)&&r({inst:a})},[t,n,e]),jl(function(){return an(a)&&r({inst:a}),t(function(){an(a)&&r({inst:a})})},[t]),Ml(n),n}function an(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Il(t,n)}catch{return!0}}function Bl(t,e){return e()}var zl=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?Bl:$l;nr.useSyncExternalStore=Pe.useSyncExternalStore!==void 0?Pe.useSyncExternalStore:zl;tr.exports=nr;var Kl=tr.exports;const Gl=Kl.useSyncExternalStore,ki=Z.createContext(void 0),Ql=Z.createContext(!1);function Hl(t,e){return t||(e&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ki),window.ReactQueryClientContext):ki)}const ql=({context:t}={})=>{const e=Z.useContext(Hl(t,Z.useContext(Ql)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},ir=Z.createContext(!1),Wl=()=>Z.useContext(ir);ir.Provider;function Jl(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const Zl=Z.createContext(Jl()),Xl=()=>Z.useContext(Zl);function Yl(t,e){return typeof t=="function"?t(...e):!!t}const eu=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},tu=t=>{Z.useEffect(()=>{t.clearReset()},[t])},nu=({result:t,errorResetBoundary:e,useErrorBoundary:n,query:i})=>t.isError&&!e.isReset()&&!t.isFetching&&Yl(n,[t.error,i]),iu=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},au=(t,e)=>t.isLoading&&t.isFetching&&!e,ru=(t,e,n)=>(t==null?void 0:t.suspense)&&au(e,n),su=(t,e,n)=>e.fetchOptimistic(t).then(({data:i})=>{t.onSuccess==null||t.onSuccess(i),t.onSettled==null||t.onSettled(i,null)}).catch(i=>{n.clearReset(),t.onError==null||t.onError(i),t.onSettled==null||t.onSettled(void 0,i)});function ou(t,e){const n=ql({context:t.context}),i=Wl(),a=Xl(),r=n.defaultQueryOptions(t);r._optimisticResults=i?"isRestoring":"optimistic",r.onError&&(r.onError=Ge.batchCalls(r.onError)),r.onSuccess&&(r.onSuccess=Ge.batchCalls(r.onSuccess)),r.onSettled&&(r.onSettled=Ge.batchCalls(r.onSettled)),iu(r),eu(r,a),tu(a);const[s]=Z.useState(()=>new e(n,r)),o=s.getOptimisticResult(r);if(Gl(Z.useCallback(l=>{const u=i?()=>{}:s.subscribe(Ge.batchCalls(l));return s.updateResult(),u},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),Z.useEffect(()=>{s.setOptions(r,{listeners:!1})},[r,s]),ru(r,o,i))throw su(r,s,a);if(nu({result:o,errorResetBoundary:a,useErrorBoundary:r.useErrorBoundary,query:s.getCurrentQuery()}))throw o.error;return r.notifyOnChangeProps?o:s.trackResult(o)}function lu(t,e,n){const i=Sl(t,e,n);return ou(i,Rl)}const uu=()=>["account"],du=()=>{const t=Ga(a=>a.accountName),[e,n]=Br(Pt),i=lu(uu(),()=>jn.get(t),{enabled:!!t&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return $.useEffect(()=>{const a=i.data;!i.isSuccess||!a||n(a)},[i.status]),{findQuery:i,account:e}},ar=Li();async function rr(t){const e=await jn.get(t);return ar.set(Pt,e),e}var sr=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(sr||{});const cu={ALL:"*",CORE:"core:**",ADD_TO_CART_HOOKS:"core:addToCartHooks:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},or={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var lr=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(lr||{}),ur=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(ur||{}),dr=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.DEV_LOCAL="dev:local",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t))(dr||{}),cr=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(cr||{}),fr=(t=>(t.Add="add",t.Remove="remove",t))(fr||{}),mr=(t=>(t.Active="active",t.Inactive="inactive",t))(mr||{});const fu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},mu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},hu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},pu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},vu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ManageCollectionProductInInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},gu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ku={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},yu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindMinimalEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"thumbnails"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},bu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchMinimalEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Su={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BlockUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BlockUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BlockUserSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},_u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ChangeAccountUsername"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeAccountUsername"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Nu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Ou={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetAllChatMessageInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatMessageArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"connectionId"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"idEvent"}},{kind:"Field",name:{kind:"Name",value:"sendDate"}},{kind:"Field",name:{kind:"Name",value:"sessionId"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"isAdmin"}},{kind:"Field",name:{kind:"Name",value:"urlGif"}},{kind:"Field",name:{kind:"Name",value:"second"}},{kind:"Field",name:{kind:"Name",value:"ip"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},wu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetChatRoomToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetChatRoomInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getChatRoomToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatRoomTokenData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Fu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PinChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PinChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PinChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Au={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInputAccount"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Eu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"section"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Cu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Tu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTimeLine"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetTimeLineInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTimeLine"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TimeLineArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"time"}},{kind:"Field",name:{kind:"Name",value:"likes"}},{kind:"Field",name:{kind:"Name",value:"comments"}},{kind:"Field",name:{kind:"Name",value:"viewers"}},{kind:"Field",name:{kind:"Name",value:"orders"}},{kind:"Field",name:{kind:"Name",value:"minute"}},{kind:"Field",name:{kind:"Name",value:"hour"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},xu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppendProductsToSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RelateToProductsSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appendProductsSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ru={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateSnackVideoBatch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Du={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteRelationshipWithSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteRelationshipSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}}]}}]}}]},Lu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Pu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindManySnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindManySnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findManySnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Iu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayLists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayLists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"updated"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"order"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Vu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ju={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSnackVideoRelationships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRelationshipSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RelationshipSnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceEntity"}},{kind:"Field",name:{kind:"Name",value:"attributeId"}}]}}]}}]}}]}}]},Uu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Mu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindByProductSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindByProductSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findByProductSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},$u=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:fu,AppendProductsToSnackVideoDocument:xu,BlockUserDocument:Su,ChangeAccountUsernameDocument:_u,CreateSnackVideoBatchDocument:Ru,DeleteAllCustomizationDocument:Au,DeleteChatMessageDocument:Nu,DeleteCollectionDocument:mu,DeleteRelationshipWithSnackVideoDocument:Du,DeleteSnackVideoDocument:Lu,EventStatus:cr,FindByProductSnackVideoDocument:Mu,FindCollectionDocument:hu,FindManySnackVideosDocument:Pu,FindMinimalEventDocument:yu,GetAllChatMessageDocument:Ou,GetAllCollectionsDocument:pu,GetAllCustomizationDocument:Eu,GetAllSnackVideosDocument:Vu,GetChatRoomTokenDocument:wu,GetPlayListsDocument:Iu,GetSnackVideoRelationshipsDocument:ju,GetTimeLineDocument:Tu,ManageCollectionProductDocument:vu,Methods:fr,PinChatMessageDocument:Fu,SearchCollectionsDocument:gu,SearchMinimalEventsDocument:bu,SearchSnackVideosDocument:Uu,Status:mr,UpdateCollectionDocument:ku,UpdateCustomizationDocument:Cu},Symbol.toStringTag,{value:"Module"}));var Ht=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(Ht||{});function Bu(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}const rn="addToCartHooks.notification.error",Sn={errorAddingToCart:rn,errorOpeningVariationSelector:rn,errorOpeningNewTab:rn,successAddingToCart:"addToCartHooks.notification.success"};async function zu(t){const e={...t,action:{type:Ht.ADD_TO_CART,exec:()=>ue.error("addToCartHooks: action no implemented in validate hook")}};try{const n=await Ku(e),i=await Gu(n);await Qu(i)}catch(n){ue.error("addToCartHooks: error unhandled",n)}}async function Ku(t){var r,s;const{context:e,userAddToCartConfig:n}=t,i=(r=n==null?void 0:n.hooks)==null?void 0:r.transform;let a=t.product;if(i)try{a=await i({product:{...a},data:(s=e.data)!=null?s:{}})}catch(o){Tt("transform",o)}return{...t,product:a}}async function Gu(t){var l,u;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:a}=t,r=hr(t),s=(l=i==null?void 0:i.hooks)==null?void 0:l.validate;let o=n.validate({...t,actionFactory:r});if(s)try{o=await s({product:{...a},defaultAction:{...o},action:r,data:(u=e.data)!=null?u:{}})}catch(d){Tt("validate",d)}return{...t,action:o,actionFactory:r}}async function Qu(t){var g;const{product:e,userAddToCartConfig:n,notifyFactory:i,action:a,actionFactory:r}=t,{isVariationSelectorOpen:s,data:o={}}=t.context,l=(g=n==null?void 0:n.hooks)==null?void 0:g.end,u=a.type===Ht.ADD_TO_CART;let d=null,f=!1;const c=()=>{!u||!s||r.openVariationSelector(!1).exec()},_=()=>{!u||f||(d?i.error(Sn.errorAddingToCart):i.success(Sn.successAddingToCart))},O=()=>{const k={product:e,actionType:a.type,success:!d,error:d};Gt.eventBus.emit(or.ATCH_ACTION_EXECUTED,k)};try{if(!a.type||!a.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await a.exec()}catch(k){Tt("end",k),d=k}if(l)try{f=!!await l({data:o,error:d,notify:i,actionExecuted:a})}catch(k){Tt("end",k)}c(),_(),O()}function hr(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=a=>Object.entries(a!=null?a:{}).reduce((r,[s,o])=>({...r,[s]:l=>({type:s,exec:()=>o(l)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function Tt(t,e){ue.error(`addToCartHooks error running ${t}: `,e)}function pr(t){const e=Object.values(t);return Object.assign({},...e)}function vr(t){return Object.entries(t).reduce((e,[n,i])=>{const a=pr(i);return{...e,[n]:a}},{})}function gr(t,e){const n=vr(e);Object.entries(n).forEach(([i,a])=>{t.addResourceBundle(i,"translation",a,!0)})}function Hu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t){"@babel/helpers - typeof";return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tt(t)}function qu(t,e){if(tt(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(tt(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wu(t){var e=qu(t,"string");return tt(e)=="symbol"?e:String(e)}function yi(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Wu(i.key),i)}}function Ju(t,e,n){return e&&yi(t.prototype,e),n&&yi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var kr=[],Zu=kr.forEach,Xu=kr.slice;function Yu(t){return Zu.call(Xu.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var bi=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ed=function(e,n,i){var a=i||{};a.path=a.path||"/";var r=encodeURIComponent(n),s="".concat(e,"=").concat(r);if(a.maxAge>0){var o=a.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(o))}if(a.domain){if(!bi.test(a.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(a.domain)}if(a.path){if(!bi.test(a.path))throw new TypeError("option path is invalid");s+="; Path=".concat(a.path)}if(a.expires){if(typeof a.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(a.expires.toUTCString())}if(a.httpOnly&&(s+="; HttpOnly"),a.secure&&(s+="; Secure"),a.sameSite){var l=typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},Si={create:function(e,n,i,a){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+i*60*1e3)),a&&(r.domain=a),document.cookie=ed(e,encodeURIComponent(n),r)},read:function(e){for(var n="".concat(e,"="),i=document.cookie.split(";"),a=0;a<i.length;a++){for(var r=i[a];r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(n)===0)return r.substring(n.length,r.length)}return null},remove:function(e){this.create(e,"",-1)}},td={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&typeof document!="undefined"){var i=Si.read(e.lookupCookie);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&typeof document!="undefined"&&Si.create(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},nd={name:"querystring",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var a=i.substring(1),r=a.split("&"),s=0;s<r.length;s++){var o=r[s].indexOf("=");if(o>0){var l=r[s].substring(0,o);l===e.lookupQuerystring&&(n=r[s].substring(o+1))}}}return n}},Be=null,_i=function(){if(Be!==null)return Be;try{Be=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Be=!1}return Be},id={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&_i()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&_i()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},ze=null,Ni=function(){if(ze!==null)return ze;try{ze=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ze=!1}return ze},ad={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&Ni()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&Ni()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},rd={name:"navigator",lookup:function(e){var n=[];if(typeof navigator!="undefined"){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)n.push(navigator.languages[i]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},sd={name:"htmlTag",lookup:function(e){var n,i=e.htmlTag||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},od={name:"path",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;n=i[e.lookupFromPathIndex].replace("/","")}else n=i[0].replace("/","")}return n}},ld={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window!="undefined"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};function ud(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var yr=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Hu(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return Ju(t,[{key:"init",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=Yu(i,this.options||{},ud()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(r){return r.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(td),this.addDetector(nd),this.addDetector(id),this.addDetector(ad),this.addDetector(rd),this.addDetector(sd),this.addDetector(od),this.addDetector(ld)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var i=this;n||(n=this.options.order);var a=[];return n.forEach(function(r){if(i.detectors[r]){var s=i.detectors[r].lookup(i.options);s&&typeof s=="string"&&(s=[s]),s&&(a=a.concat(s))}}),a=a.map(function(r){return i.options.convertDetectedLanguage(r)}),this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}},{key:"cacheUserLanguage",value:function(n,i){var a=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||i.forEach(function(r){a.detectors[r]&&a.detectors[r].cacheUserLanguage(n,a.options)}))}}]),t}();yr.type="languageDetector";function br(t,e){t.use(e).use(yr).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,a)=>{if(i){const[r,...s]=i.split(",").map(o=>o.trim());if(r==="number")return new Intl.NumberFormat(a).format(n);if(r==="date")return new Intl.DateTimeFormat(a).format(n);if(r==="currency")return new Intl.NumberFormat(a,{style:"currency",currency:s[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const dd={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 xt{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||dd,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,a){return a&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new xt(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new xt(this.logger,e)}}var ae=new xt;class qt{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const a=this.observers[i].get(n)||0;this.observers[i].set(n,a+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,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(s=>{let[o,l]=s;for(let u=0;u<l;u++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[o,l]=s;for(let u=0;u<l;u++)o.apply(o,[e,...i])})}}function Ke(){let t,e;const n=new Promise((i,a)=>{t=i,e=a});return n.resolve=t,n.reject=e,n}function Oi(t){return t==null?"":""+t}function cd(t,e,n){t.forEach(i=>{e[i]&&(n[i]=e[i])})}const fd=/###/g;function qe(t,e,n){function i(o){return o&&o.indexOf("###")>-1?o.replace(fd,"."):o}function a(){return!t||typeof t=="string"}const r=typeof e!="string"?e:e.split(".");let s=0;for(;s<r.length-1;){if(a())return{};const o=i(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return a()?{}:{obj:t,k:i(r[s])}}function wi(t,e,n){const{obj:i,k:a}=qe(t,e,Object);if(i!==void 0||e.length===1){i[a]=n;return}let r=e[e.length-1],s=e.slice(0,e.length-1),o=qe(t,s,Object);for(;o.obj===void 0&&s.length;)r=`${s[s.length-1]}.${r}`,s=s.slice(0,s.length-1),o=qe(t,s,Object),o&&o.obj&&typeof o.obj[`${o.k}.${r}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=n}function md(t,e,n,i){const{obj:a,k:r}=qe(t,e,Object);a[r]=a[r]||[],i&&(a[r]=a[r].concat(n)),i||a[r].push(n)}function Rt(t,e){const{obj:n,k:i}=qe(t,e);if(n)return n[i]}function hd(t,e,n){const i=Rt(t,n);return i!==void 0?i:Rt(e,n)}function Sr(t,e,n){for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?typeof t[i]=="string"||t[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?n&&(t[i]=e[i]):Sr(t[i],e[i],n):t[i]=e[i]);return t}function Ae(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var pd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function vd(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>pd[e]):t}class gd{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 i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const kd=[" ",",","?","!",";"],yd=new gd(20);function bd(t,e,n){e=e||"",n=n||"";const i=kd.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const a=yd.getRegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let r=!a.test(t);if(!r){const s=t.indexOf(n);s>0&&!a.test(t.substring(0,s))&&(r=!0)}return r}function _n(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let a=t;for(let r=0;r<i.length;){if(!a||typeof a!="object")return;let s,o="";for(let l=r;l<i.length;++l)if(l!==r&&(o+=n),o+=i[l],s=a[o],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&l<i.length-1)continue;r+=l-r+1;break}a=s}return a}function Dt(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class Fi extends qt{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,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],i&&(Array.isArray(i)?o.push(...i):typeof i=="string"&&r?o.push(...i.split(r)):o.push(i)));const l=Rt(this.data,o);return!l&&!n&&!i&&e.indexOf(".")>-1&&(e=o[0],n=o[1],i=o.slice(2).join(".")),l||!s||typeof i!="string"?l:_n(this.data&&this.data[e]&&this.data[e][n],i,r)}addResource(e,n,i,a){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,n];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),a=n,n=o[1]),this.addNamespaces(n),wi(this.data,o,a),r.silent||this.emit("added",e,n,i,a)}addResources(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in i)(typeof i[r]=="string"||Object.prototype.toString.apply(i[r])==="[object Array]")&&this.addResource(e,n,r,i[r],{silent:!0});a.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,a,r){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),a=i,i=n,n=o[1]),this.addNamespaces(n);let l=Rt(this.data,o)||{};a?Sr(l,i,r):l={...l,...i},wi(this.data,o,l),s.silent||this.emit("added",e,n,i)}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(a=>n[a]&&Object.keys(n[a]).length>0)}toJSON(){return this.data}}var _r={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,a){return t.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,n,i,a))}),e}};const Ai={};class Lt extends qt{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),cd(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ae.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 i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let r=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!bd(e,i,a);if(s&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:r};const u=e.split(i);(i!==a||i===a&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(a)}return typeof r=="string"&&(r=[r]),{key:e,namespaces:r}}translate(e,n,i){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 a=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:o}=this.extractFromKey(e[e.length-1],n),l=o[o.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const w=n.nsSeparator||this.options.nsSeparator;return a?{res:`${l}${w}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${w}${s}`}return a?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const f=this.resolve(e,n);let c=f&&f.res;const _=f&&f.usedKey||s,O=f&&f.exactUsedKey||s,g=Object.prototype.toString.apply(c),k=["[object Number]","[object Function]","[object RegExp]"],N=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject;if(R&&c&&(typeof c!="string"&&typeof c!="boolean"&&typeof c!="number")&&k.indexOf(g)<0&&!(typeof N=="string"&&g==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,c,{...n,ns:o}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(f.res=w,f.usedParams=this.getUsedParamsDetails(n),f):w}if(r){const w=g==="[object Array]",C=w?[]:{},I=w?O:_;for(const j in c)if(Object.prototype.hasOwnProperty.call(c,j)){const m=`${I}${r}${j}`;C[j]=this.translate(m,{...n,joinArrays:!1,ns:o}),C[j]===m&&(C[j]=c[j])}c=C}}else if(R&&typeof N=="string"&&g==="[object Array]")c=c.join(N),c&&(c=this.extendTranslation(c,e,n,i));else{let w=!1,C=!1;const I=n.count!==void 0&&typeof n.count!="string",j=Lt.hasDefaultValue(n),m=I?this.pluralResolver.getSuffix(u,n.count,n):"",y=n.ordinal&&I?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",S=I&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=S&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${m}`]||n[`defaultValue${y}`]||n.defaultValue;!this.isValidLookup(c)&&j&&(w=!0,c=h),this.isValidLookup(c)||(C=!0,c=s);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:c,p=j&&h!==c&&this.options.updateMissing;if(C||w||p){if(this.logger.log(p?"updateKey":"missingKey",u,l,s,p?h:c),r){const x=this.resolve(s,{...n,keySeparator:!1});x&&x.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 A=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let x=0;x<U.length;x++)A.push(U[x]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(n.lng||this.language):A.push(n.lng||this.language);const D=(x,B,Me)=>{const Bn=j&&Me!==c?Me:F;this.options.missingKeyHandler?this.options.missingKeyHandler(x,l,B,Bn,p,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(x,l,B,Bn,p,n),this.emit("missingKey",x,l,B,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?A.forEach(x=>{const B=this.pluralResolver.getSuffixes(x,n);S&&n[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(Me=>{D([x],s+Me,n[`defaultValue${Me}`]||h)})}):D(A,s,h))}c=this.extendTranslation(c,e,n,f,i),C&&c===s&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${s}`),(C||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,w?c:void 0):c=this.options.parseMissingKeyHandler(c))}return a?(f.res=c,f.usedParams=this.getUsedParamsDetails(n),f):c}extendTranslation(e,n,i,a,r){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const c=e.match(this.interpolator.nestingRegexp);d=c&&c.length}let f=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,i.lng||this.language,i),u){const c=e.match(this.interpolator.nestingRegexp),_=c&&c.length;d<_&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&a&&a.res&&(i.lng=a.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,_=new Array(c),O=0;O<c;O++)_[O]=arguments[O];return r&&r[0]===_[0]&&!i.context?(s.logger.warn(`It seems you are nesting recursively key: ${_[0]} in key: ${n[0]}`),null):s.translate(..._,n)},i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,l=typeof o=="string"?[o]:o;return e!=null&&l&&l.length&&i.applyPostProcessor!==!1&&(e=_r.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,r,s,o;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,n),d=u.key;a=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const c=n.count!==void 0&&typeof n.count!="string",_=c&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),O=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);f.forEach(k=>{this.isValidLookup(i)||(o=k,!Ai[`${g[0]}-${k}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Ai[`${g[0]}-${k}`]=!0,this.logger.warn(`key "${a}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(N=>{if(this.isValidLookup(i))return;s=N;const R=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(R,d,N,k,n);else{let w;c&&(w=this.pluralResolver.getSuffix(N,n.count,n));const C=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(R.push(d+w),n.ordinal&&w.indexOf(I)===0&&R.push(d+w.replace(I,this.options.pluralSeparator)),_&&R.push(d+C)),O){const j=`${d}${this.options.contextSeparator}${n.context}`;R.push(j),c&&(R.push(j+w),n.ordinal&&w.indexOf(I)===0&&R.push(j+w.replace(I,this.options.pluralSeparator)),_&&R.push(j+C))}}let P;for(;P=R.pop();)this.isValidLookup(i)||(r=P,i=this.getResource(N,k,P,n))}))})}),{res:i,usedKey:a,exactUsedKey:r,usedLng:s,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,a):this.resourceStore.getResource(e,n,i,a)}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"],i=e.replace&&typeof e.replace!="string";let a=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!i){a={...a};for(const r of n)delete a[r]}return a}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}function sn(t){return t.charAt(0).toUpperCase()+t.slice(1)}class Ei{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ae.create("languageUtils")}getScriptPartFromCode(e){if(e=Dt(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=Dt(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 i=e.split("-");return this.options.lowerCaseLng?i=i.map(a=>a.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=sn(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=sn(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=sn(i[2].toLowerCase()))),i.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(i=>{if(n)return;const a=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(r=>{if(r===a)return r;if(!(r.indexOf("-")<0&&a.indexOf("-")<0)&&r.indexOf(a)===0)return r})}),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]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),a=[],r=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):typeof e=="string"&&r(this.formatLanguageCode(e)),i.forEach(s=>{a.indexOf(s)<0&&r(this.formatLanguageCode(s))}),a}}let Sd=[{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}],_d={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 Nd=["v1","v2","v3"],Od=["v4"],Ci={zero:0,one:1,two:2,few:3,many:4,other:5};function wd(){const t={};return Sd.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:_d[e.fc]}})}),t}class Fd{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=ae.create("pluralResolver"),(!this.options.compatibilityJSON||Od.includes(this.options.compatibilityJSON))&&(typeof Intl=="undefined"||!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=wd()}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(Dt(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 i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(a=>`${n}${a}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((a,r)=>Ci[a]-Ci[r]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):i.numbers.map(a=>this.getSuffix(e,a,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(e,i);return a?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:this.getSuffixRetroCompatible(a,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let a=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));const r=()=>this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString();return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?`_plural_${a.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Nd.includes(this.options.compatibilityJSON)}}function Ti(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=hd(t,e,n);return!r&&a&&typeof n=="string"&&(r=_n(t,n,i),r===void 0&&(r=_n(e,n,i))),r}class Ad{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ae.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 n=e.interpolation;this.escape=n.escape!==void 0?n.escape:vd,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Ae(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Ae(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?Ae(n.nestingPrefix):n.nestingPrefixEscaped||Ae("$t("),this.nestingSuffix=n.nestingSuffix?Ae(n.nestingSuffix):n.nestingSuffixEscaped||Ae(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,a){let r,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(O){return O.replace(/\$/g,"$$$$")}const d=O=>{if(O.indexOf(this.formatSeparator)<0){const R=Ti(n,l,O,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,i,{...a,...n,interpolationkey:O}):R}const g=O.split(this.formatSeparator),k=g.shift().trim(),N=g.join(this.formatSeparator).trim();return this.format(Ti(n,l,k,this.options.keySeparator,this.options.ignoreJSONStructure),N,i,{...a,...n,interpolationkey:k})};this.resetRegExp();const f=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,c=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:O=>u(O)},{regex:this.regexp,safeValue:O=>this.escapeValue?u(this.escape(O)):u(O)}].forEach(O=>{for(o=0;r=O.regex.exec(e);){const g=r[1].trim();if(s=d(g),s===void 0)if(typeof f=="function"){const N=f(e,r,a);s=typeof N=="string"?N:""}else if(a&&Object.prototype.hasOwnProperty.call(a,g))s="";else if(c){s=r[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Oi(s));const k=O.safeValue(s);if(e=e.replace(r[0],k),c?(O.regex.lastIndex+=s.length,O.regex.lastIndex-=r[0].length):O.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,r,s;function o(l,u){const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let c=`{${f[1]}`;l=f[0],c=this.interpolate(c,s);const _=c.match(/'/g),O=c.match(/"/g);(_&&_.length%2===0&&!O||O.length%2!==0)&&(c=c.replace(/'/g,'"'));try{s=JSON.parse(c),u&&(s={...u,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${d}${c}`}return delete s.defaultValue,l}for(;a=this.nestingRegexp.exec(e);){let l=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const d=a[1].split(this.formatSeparator).map(f=>f.trim());a[1]=d.shift(),l=d,u=!0}if(r=n(o.call(this,a[1].trim(),s),s),r&&a[0]===e&&typeof r!="string")return r;typeof r!="string"&&(r=Oi(r)),r||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((d,f)=>this.format(d,f,i.lng,{...i,interpolationkey:a[1].trim()}),r.trim())),e=e.replace(a[0],r),this.regexp.lastIndex=0}return e}}function Ed(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const a=i[1].substring(0,i[1].length-1);e==="currency"&&a.indexOf(":")<0?n.currency||(n.currency=a.trim()):e==="relativetime"&&a.indexOf(":")<0?n.range||(n.range=a.trim()):a.split(";").forEach(s=>{if(!s)return;const[o,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[o.trim()]||(n[o.trim()]=u),u==="false"&&(n[o.trim()]=!1),u==="true"&&(n[o.trim()]=!0),isNaN(u)||(n[o.trim()]=parseInt(u,10))})}return{formatName:e,formatOptions:n}}function Ee(t){const e={};return function(i,a,r){const s=a+JSON.stringify(r);let o=e[s];return o||(o=t(Dt(a),r),e[s]=o),o(i)}}class Cd{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ae.create("formatter"),this.options=e,this.formats={number:Ee((n,i)=>{const a=new Intl.NumberFormat(n,{...i});return r=>a.format(r)}),currency:Ee((n,i)=>{const a=new Intl.NumberFormat(n,{...i,style:"currency"});return r=>a.format(r)}),datetime:Ee((n,i)=>{const a=new Intl.DateTimeFormat(n,{...i});return r=>a.format(r)}),relativetime:Ee((n,i)=>{const a=new Intl.RelativeTimeFormat(n,{...i});return r=>a.format(r,i.range||"day")}),list:Ee((n,i)=>{const a=new Intl.ListFormat(n,{...i});return r=>a.format(r)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Ee(n)}format(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((o,l)=>{const{formatName:u,formatOptions:d}=Ed(l);if(this.formats[u]){let f=o;try{const c=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},_=c.locale||c.lng||a.locale||a.lng||i;f=this.formats[u](o,_,{...d,...a,...c})}catch(c){this.logger.warn(c)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}function Td(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class xd extends qt{constructor(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=a,this.logger=ae.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,a.backend,a)}queueLoad(e,n,i,a){const r={},s={},o={},l={};return e.forEach(u=>{let d=!0;n.forEach(f=>{const c=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?s[c]===void 0&&(s[c]=!0):(this.state[c]=1,d=!1,s[c]===void 0&&(s[c]=!0),r[c]===void 0&&(r[c]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(o[u]=!0)}),(Object.keys(r).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(r),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const a=e.split("|"),r=a[0],s=a[1];n&&this.emit("failedLoading",r,s,n),i&&this.store.addResourceBundle(r,s,i),this.state[e]=n?-1:2;const o={};this.queue.forEach(l=>{md(l.loaded,[r],s),Td(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{o[u][f]===void 0&&(o[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:a,wait:r,callback:s});return}this.readingCalls++;const o=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,a+1,r*2,s)},r);return}s(u,d)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>o(null,d)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,n,o)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=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."),a&&a();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const r=this.queueLoad(e,n,i,a);if(!r.toLoad.length)return r.pending.length||a(),null;r.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),a=i[0],r=i[1];this.read(a,r,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${r} for language ${a} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${r} for language ${a}`,o),this.loaded(e,s,o)})}saveMissing(e,n,i,a,r){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=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 "${i}" 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(!(i==null||i==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,i,a,l):d=u(e,n,i,a),d&&typeof d.then=="function"?d.then(f=>o(null,f)).catch(o):o(null,d)}catch(d){o(d)}else u(e,n,i,a,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,a)}}}function xi(){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 i=e[3]||e[2];Object.keys(i).forEach(a=>{n[a]=i[a]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ri(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 pt(){}function Rd(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class nt extends qt{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ri(e),this.services={},this.logger=ae,this.modules={external:[]},Rd(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]:{},i=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(i=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 a=xi();this.options={...a,...this.options,...Ri(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...a.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function r(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?ae.init(r(this.modules.logger),this.options):ae.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl!="undefined"&&(d=Cd);const f=new Ei(this.options);this.store=new Fi(this.options.resources,this.options);const c=this.services;c.logger=ae,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new Fd(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(c.formatter=r(d),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Ad(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new xd(r(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(_){for(var O=arguments.length,g=new Array(O>1?O-1:0),k=1;k<O;k++)g[k-1]=arguments[k];e.emit(_,...g)}),this.modules.languageDetector&&(c.languageDetector=r(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=r(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new Lt(this.services,this.options),this.translator.on("*",function(_){for(var O=arguments.length,g=new Array(O>1?O-1:0),k=1;k<O;k++)g[k-1]=arguments[k];e.emit(_,...g)}),this.modules.external.forEach(_=>{_.init&&_.init(this)})}if(this.format=this.options.interpolation.format,i||(i=pt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const l=Ke(),u=()=>{const d=(f,c)=>{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),l.resolve(c),i(f,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt;const a=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const r=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};a?s(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(o=>s(o)),this.services.backendConnector.load(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,n,i){const a=Ke();return e||(e=this.languages),n||(n=this.options.ns),i||(i=pt),this.services.backendConnector.reload(e,n,r=>{a.resolve(),i(r)}),a}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"&&_r.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 i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const a=Ke();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(r(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,a.resolve(function(){return i.t(...arguments)}),n&&n(l,function(){return i.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{s(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),a}getFixedT(e,n,i){var a=this;const r=function(s,o){let l;if(typeof o!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];l=a.options.overloadTranslationOptionHandler([s,o].concat(d))}else l={...o};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix=l.keyPrefix||i||r.keyPrefix;const c=a.options.keySeparator||".";let _;return l.keyPrefix&&Array.isArray(s)?_=s.map(O=>`${l.keyPrefix}${c}${O}`):_=l.keyPrefix?`${l.keyPrefix}${c}${s}`:s,a.t(_,l)};return typeof e=="string"?r.lng=e:r.lngs=e,r.ns=n,r.keyPrefix=i,r}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 i=n.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!a||s(r,e)))}loadNamespaces(e,n){const i=Ke();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{i.resolve(),n&&n(a)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Ke();typeof e=="string"&&(e=[e]);const a=this.options.preload||[],r=e.filter(s=>a.indexOf(s)<0);return r.length?(this.options.preload=a.concat(r),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(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"],i=this.services&&this.services.languageUtils||new Ei(xi());return n.indexOf(i.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 nt(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},r=new nt(a);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},i&&(r.store=new Fi(this.store.data,a),r.services.resourceStore=r.store),r.translator=new Lt(r.services,a),r.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];r.emit(o,...u)}),r.init(a,n),r.translator.options=a,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const G=nt.createInstance();G.createInstance=nt.createInstance;G.createInstance;G.dir;G.init;G.loadResources;G.reloadResources;G.use;G.changeLanguage;G.getFixedT;G.t;G.exists;G.setDefaultNamespace;G.hasLoadedNamespace;G.loadNamespaces;G.loadLanguages;const Dd=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ld={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Pd=t=>Ld[t],Id=t=>t.replace(Dd,Pd);let Di={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Id};function Vd(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Di={...Di,...t}}const jd={type:"3rdParty",init(t){Vd(t.options.react)}};br(G,jd);const Ud=t=>gr(G,t);let $n=new Map;const Nn=$.createContext($n),Md=({children:t,stores:e})=>{const n=$.useContext(Nn),i=$.useMemo(()=>{const a=new Map;return e.forEach(r=>a.set(r.class,r.value)),$n=new Map([...n,...a])},[]);return Fr.jsx(Nn.Provider,{value:i,children:t})};function $d(t){return $.useContext(Nn).get(t)}function Bd(t){return $n.get(t)}exports.AccountContractStatusTypes=Vn;exports.AccountContractTypes=qa;exports.AccountInvalidError=tl;exports.AccountPlanDescriptionTypes=Ja;exports.AccountRestRepository=Xa;exports.AccountService=Ya;exports.AccountSubscriptionTypes=Wa;exports.AccountTypes=In;exports.AddToCartActionTypes=Ht;exports.AggregateRoot=Qa;exports.ApiGraphqlTypes=$u;exports.BaseMobxStore=pl;exports.BroadcastChannelEventBus=Da;exports.DomainError=ut;exports.EventBusWildcards=cu;exports.EventNames=or;exports.GlobalPageSectionTypes=Za;exports.InvalidNizzaGlobalObjectError=za;exports.LanguageTypes=lr;exports.Logger=Ma;exports.NizzaAccount=Qt;exports.NizzaEventStatus=sr;exports.NizzaProductRequestOriginTypes=dr;exports.NizzaStore=et;exports.NizzaVariationTypes=ur;exports.ResourceNotFoundError=$a;exports.StoreProvider=Md;exports.UnexpectedError=Ba;exports.ValueObject=vl;exports.accountAtom=Pt;exports.accountService=jn;exports.addToCartMessages=Sn;exports.apiCall=Wr;exports.buildLanguageTranslations=pr;exports.buildTranslations=vr;exports.coreLogger=ue;exports.createActionFactory=hr;exports.createAggregateRoot=Ha;exports.createStore=Bu;exports.customFetch=On;exports.downloadFile=Jr;exports.fileOrigin=Qo;exports.getAccount=rr;exports.getClientTimeZone=hl;exports.getStore=Bd;exports.globalAtomStore=ar;exports.i18Init=br;exports.jsDownload=Ii;exports.logger=qo;exports.nizza=Gt;exports.registerTranslations=Ud;exports.registerTranslationsOf=gr;exports.runAddToCartHooks=zu;exports.searchParams=Go;exports.shortId=La;exports.useAccount=du;exports.useNizza=Ga;exports.useStore=$d;exports.validateRequiredProps=nl;