@nizza/core 0.4.0 → 0.4.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/environments/environment.prod.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var vr=Object.defineProperty;var pr=(e,t,i)=>t in e?vr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var C=(e,t,i)=>(pr(e,typeof t!="symbol"?t+"":t,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),gr=require("react/jsx-runtime");function kr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const q=kr(M);let yr=0;function _r(e,t){const i=`atom${++yr}`,n={toString:()=>i};return typeof e=="function"?n.read=e:(n.init=e,n.read=a=>a(n),n.write=(a,r,o)=>r(n,typeof o=="function"?o(a(n)):o)),t&&(n.write=t),n}const Wt=e=>"init"in e,qt=e=>!!e.write,Nt=new WeakMap,br=(e,t)=>{Nt.set(e,t),e.catch(()=>{}).finally(()=>Nt.delete(e))},Vn=(e,t)=>{const i=Nt.get(e);i&&(Nt.delete(e),i(t))},jn=(e,t)=>{e.status="fulfilled",e.value=t},Un=(e,t)=>{e.status="rejected",e.reason=t},gt=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),Mn=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),Jt=e=>"v"in e&&e.v instanceof Promise,kt=e=>{if("e"in e)throw e.e;return e.v},Oi=()=>{const e=new WeakMap,t=new WeakMap,i=new Map;let n,a;({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}&&"production")!=="production"&&(n=new Set,a=new Set);const r=f=>e.get(f),o=(f,h)=>{({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}&&"production")!=="production"&&Object.freeze(h);const k=e.get(f);if(e.set(f,h),i.has(f)||i.set(f,k),k&&Jt(k)){const S="v"in h?h.v instanceof Promise?h.v:Promise.resolve(h.v):Promise.reject(h.e);Vn(k.v,S)}},s=(f,h,k)=>{const S=new Map;let E=!1;k.forEach((w,R)=>{!w&&R===f&&(w=h),w?(S.set(R,w),h.d.get(R)!==w&&(E=!0)):({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}&&"production")!=="production"&&console.warn("[Bug] atom state not found")}),(E||h.d.size!==S.size)&&(h.d=S)},u=(f,h,k)=>{const S=r(f),E={d:(S==null?void 0:S.d)||new Map,v:h};return k&&s(f,E,k),S&>(S,E)&&S.d===E.d?S:(o(f,E),E)},l=(f,h,k,S)=>{if(h instanceof Promise){let E;const w=new Promise((R,ie)=>{let P=!1;h.then(V=>{if(!P){P=!0;const I=r(f),K=u(f,w,k);jn(w,V),R(V),(I==null?void 0:I.d)!==K.d&&T(f,K,I==null?void 0:I.d)}},V=>{if(!P){P=!0;const I=r(f),K=u(f,w,k);Un(w,V),ie(V),(I==null?void 0:I.d)!==K.d&&T(f,K,I==null?void 0:I.d)}}),E=V=>{P||(P=!0,V.then(I=>jn(w,I),I=>Un(w,I)),R(V))}});return w.status="pending",br(w,R=>{R&&E(R),S==null||S()}),u(f,w,k)}return u(f,h,k)},d=(f,h,k)=>{const S=r(f),E={d:(S==null?void 0:S.d)||new Map,e:h};return k&&s(f,E,k),S&&Mn(S,E)&&S.d===E.d?S:(o(f,E),E)},c=f=>{const h=r(f);if(h&&(h.d.forEach((P,V)=>{V!==f&&!t.has(V)&&c(V)}),Array.from(h.d).every(([P,V])=>P===f||r(P)===V)))return h;const k=new Map;let S=!0;const E=P=>{if(P===f){const I=r(P);if(I)return k.set(P,I),kt(I);if(Wt(P))return k.set(P,void 0),P.init;throw new Error("no atom init")}const V=c(P);return k.set(P,V),kt(V)};let w,R;const ie={get signal(){return w||(w=new AbortController),w.signal},get setSelf(){return({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}&&"production")!=="production"&&!qt(f)&&console.warn("setSelf function cannot be used with read-only atom"),!R&&qt(f)&&(R=(...P)=>{if(({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}&&"production")!=="production"&&S&&console.warn("setSelf function cannot be called in sync"),!S)return N(f,...P)}),R}};try{const P=f.read(E,ie);return l(f,P,k,()=>w==null?void 0:w.abort())}catch(P){return d(f,P,k)}finally{S=!1}},p=f=>kt(c(f)),g=f=>{let h=t.get(f);return h||(h=A(f)),h},b=(f,h)=>!h.l.size&&(!h.t.size||h.t.size===1&&h.t.has(f)),v=f=>{const h=t.get(f);h&&b(f,h)&&O(f)},m=f=>{const h=t.get(f);h==null||h.t.forEach(k=>{if(k!==f){const S=r(k),E=c(k);(!S||!gt(S,E))&&m(k)}})},y=(f,...h)=>{let k=!0;const S=R=>kt(c(R)),E=(R,...ie)=>{let P;if(R===f){if(!Wt(R))throw new Error("atom not writable");const V=r(R),I=l(R,ie[0]);(!V||!gt(V,I))&&m(R)}else P=y(R,...ie);return k||L(),P},w=f.write(S,E,...h);return k=!1,w},N=(f,...h)=>{const k=y(f,...h);return L(),k},A=(f,h)=>{const k={t:new Set(h&&[h]),l:new Set};if(t.set(f,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}&&"production")!=="production"&&a.add(f),c(f).d.forEach((S,E)=>{const w=t.get(E);w?w.t.add(f):E!==f&&A(E,f)}),c(f),qt(f)&&f.onMount){const S=f.onMount((...E)=>N(f,...E));S&&(k.u=S)}return k},O=f=>{var h;const k=(h=t.get(f))==null?void 0:h.u;k&&k(),t.delete(f),({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}&&"production")!=="production"&&a.delete(f);const S=r(f);S?(Jt(S)&&Vn(S.v),S.d.forEach((E,w)=>{if(w!==f){const R=t.get(w);R&&(R.t.delete(f),b(w,R)&&O(w))}})):({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}&&"production")!=="production"&&console.warn("[Bug] could not find atom state to unmount",f)},T=(f,h,k)=>{const S=new Set(h.d.keys());k==null||k.forEach((E,w)=>{if(S.has(w)){S.delete(w);return}const R=t.get(w);R&&(R.t.delete(f),b(w,R)&&O(w))}),S.forEach(E=>{const w=t.get(E);w?w.t.add(f):t.has(f)&&A(E,f)})},L=()=>{for(;i.size;){const f=Array.from(i);i.clear(),f.forEach(([h,k])=>{const S=r(h);if(S){S.d!==(k==null?void 0:k.d)&&T(h,S,k==null?void 0:k.d);const E=t.get(h);E&&!(k&&!Jt(k)&&(gt(k,S)||Mn(k,S)))&&E.l.forEach(w=>w())}else({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}&&"production")!=="production"&&console.warn("[Bug] no atom state to flush")})}({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}&&"production")!=="production"&&n.forEach(f=>f("state"))},z=(f,h)=>{const k=g(f);L();const S=k.l;return S.add(h),({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}&&"production")!=="production"&&n.forEach(E=>E("sub")),()=>{S.delete(h),v(f),({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}&&"production")!=="production"&&n.forEach(E=>E("unsub"))}};return({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}&&"production")!=="production"?{get:p,set:N,sub:z,dev_subscribe_store:f=>(n.add(f),()=>{n.delete(f)}),dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:f=>e.get(f),dev_get_mounted:f=>t.get(f),dev_restore_atoms:f=>{for(const[h,k]of f)Wt(h)&&(l(h,k),m(h));L()}}:{get:p,set:N,sub:z}};let Ht;const Sr=()=>(Ht||(Ht=Oi()),Ht),Nr=M.createContext(void 0),Ei=e=>{const t=M.useContext(Nr);return(e==null?void 0:e.store)||t||Sr()},Or=e=>e instanceof Promise,Er=M.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function wr(e,t){const i=Ei(t),[[n,a,r],o]=M.useReducer(l=>{const d=i.get(e);return Object.is(l[0],d)&&l[1]===i&&l[2]===e?l:[d,i,e]},void 0,()=>[i.get(e),i,e]);let s=n;(a!==i||r!==e)&&(o(),s=i.get(e));const u=t==null?void 0:t.delay;return M.useEffect(()=>{const l=i.sub(e,()=>{if(typeof u=="number"){setTimeout(o,u);return}o()});return o(),l},[i,e,u]),M.useDebugValue(s),Or(s)?Er(s):s}function Ar(e,t){const i=Ei(t);return M.useCallback((...a)=>{if(({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}&&"production")!=="production"&&!("write"in e))throw new Error("not writable atom");return i.set(e,...a)},[i,e])}function Fr(e,t){return[wr(e,t),Ar(e,t)]}const Pt=_r(null);Pt.debugLabel="accountAtom";const{NZ_AWS_REGION:Cr,NZ_BACKOFFICE_BACK_URL:Rr,NZ_CORE_SERVICES_GRAPHQL_URL:Tr,NZ_CORE_SERVICES_REST_URL:xr}={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},Dr={AWS:{region:Cr,cognito:{userPoolId:"us-east-1_EZ7wuZ4ig",userPoolWebClientId:"2jok7cst8ebf6ppscrhji57gvr"}},apiUrls:{restV1:Rr||"https://b133h34s56.execute-api.us-east-1.amazonaws.com",restV2:xr||"https://core-services-prod.nizza.com/api",graphql:Tr||"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"}};async function hn(e){const{url:t,method:i="GET",body:n,raw:a=!1,contentTypeJson:r=!0,timeout:o,...s}=e,u=r&&!e.headers?new Headers({"content-type":"application/json"}):e.headers;try{const l=new AbortController,{signal:d}=l;let c;const p=fetch(t,{method:i,headers:u,body:n,signal:d,...s});o&&(c=setTimeout(()=>{l.abort()},o));const g=await p;if(a)return g;const b=await g.json();if(clearTimeout(c),!g.ok){const v=b?JSON.stringify(b):g.statusText;throw new Error(v)}return b}catch(l){throw console.error("[CustomFetch] ",l),l}}const Pr=e=>hn({...e,contentTypeJson:!1,raw:!1});function Lr(e,t,i){fetch(t).then(n=>n.blob()).then(n=>wi(n,`${e}.${i}`))}const wi=(e,t,i)=>{const n=[e],a=new Blob(n,{type:i!=null?i:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(a,t);const r=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),o=document.createElement("a");return o.style.display="none",o.href=r,o.setAttribute("download",t),typeof o.download=="undefined"&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o),window.URL.revokeObjectURL(r)},200)};let Ir=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,i)=>(i&=63,i<36?t+=i.toString(36):i<62?t+=(i-26).toString(36).toUpperCase():i>62?t+="-":t+="_",t),"");const Ai=(e=8)=>Ir(e),Vr=e=>{const t=Object.entries(e).reduce((i,[n,a])=>a!==void 0?`${i}${i?"&":""}${n}=${a}`:i,"");return t?`?${t}`:""};function jr(){const e=new Error().stack.split(`
|
|
1
|
+
"use strict";var vr=Object.defineProperty;var pr=(e,t,i)=>t in e?vr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var C=(e,t,i)=>(pr(e,typeof t!="symbol"?t+"":t,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),gr=require("react/jsx-runtime");function kr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const q=kr(M);let yr=0;function _r(e,t){const i=`atom${++yr}`,n={toString:()=>i};return typeof e=="function"?n.read=e:(n.init=e,n.read=a=>a(n),n.write=(a,r,o)=>r(n,typeof o=="function"?o(a(n)):o)),t&&(n.write=t),n}const Wt=e=>"init"in e,qt=e=>!!e.write,Nt=new WeakMap,br=(e,t)=>{Nt.set(e,t),e.catch(()=>{}).finally(()=>Nt.delete(e))},Vn=(e,t)=>{const i=Nt.get(e);i&&(Nt.delete(e),i(t))},jn=(e,t)=>{e.status="fulfilled",e.value=t},Un=(e,t)=>{e.status="rejected",e.reason=t},gt=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),Mn=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),Jt=e=>"v"in e&&e.v instanceof Promise,kt=e=>{if("e"in e)throw e.e;return e.v},Oi=()=>{const e=new WeakMap,t=new WeakMap,i=new Map;let n,a;({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}&&"production")!=="production"&&(n=new Set,a=new Set);const r=f=>e.get(f),o=(f,h)=>{({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}&&"production")!=="production"&&Object.freeze(h);const k=e.get(f);if(e.set(f,h),i.has(f)||i.set(f,k),k&&Jt(k)){const S="v"in h?h.v instanceof Promise?h.v:Promise.resolve(h.v):Promise.reject(h.e);Vn(k.v,S)}},s=(f,h,k)=>{const S=new Map;let E=!1;k.forEach((w,R)=>{!w&&R===f&&(w=h),w?(S.set(R,w),h.d.get(R)!==w&&(E=!0)):({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}&&"production")!=="production"&&console.warn("[Bug] atom state not found")}),(E||h.d.size!==S.size)&&(h.d=S)},u=(f,h,k)=>{const S=r(f),E={d:(S==null?void 0:S.d)||new Map,v:h};return k&&s(f,E,k),S&>(S,E)&&S.d===E.d?S:(o(f,E),E)},l=(f,h,k,S)=>{if(h instanceof Promise){let E;const w=new Promise((R,ie)=>{let P=!1;h.then(V=>{if(!P){P=!0;const I=r(f),K=u(f,w,k);jn(w,V),R(V),(I==null?void 0:I.d)!==K.d&&T(f,K,I==null?void 0:I.d)}},V=>{if(!P){P=!0;const I=r(f),K=u(f,w,k);Un(w,V),ie(V),(I==null?void 0:I.d)!==K.d&&T(f,K,I==null?void 0:I.d)}}),E=V=>{P||(P=!0,V.then(I=>jn(w,I),I=>Un(w,I)),R(V))}});return w.status="pending",br(w,R=>{R&&E(R),S==null||S()}),u(f,w,k)}return u(f,h,k)},d=(f,h,k)=>{const S=r(f),E={d:(S==null?void 0:S.d)||new Map,e:h};return k&&s(f,E,k),S&&Mn(S,E)&&S.d===E.d?S:(o(f,E),E)},c=f=>{const h=r(f);if(h&&(h.d.forEach((P,V)=>{V!==f&&!t.has(V)&&c(V)}),Array.from(h.d).every(([P,V])=>P===f||r(P)===V)))return h;const k=new Map;let S=!0;const E=P=>{if(P===f){const I=r(P);if(I)return k.set(P,I),kt(I);if(Wt(P))return k.set(P,void 0),P.init;throw new Error("no atom init")}const V=c(P);return k.set(P,V),kt(V)};let w,R;const ie={get signal(){return w||(w=new AbortController),w.signal},get setSelf(){return({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}&&"production")!=="production"&&!qt(f)&&console.warn("setSelf function cannot be used with read-only atom"),!R&&qt(f)&&(R=(...P)=>{if(({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}&&"production")!=="production"&&S&&console.warn("setSelf function cannot be called in sync"),!S)return N(f,...P)}),R}};try{const P=f.read(E,ie);return l(f,P,k,()=>w==null?void 0:w.abort())}catch(P){return d(f,P,k)}finally{S=!1}},p=f=>kt(c(f)),g=f=>{let h=t.get(f);return h||(h=A(f)),h},b=(f,h)=>!h.l.size&&(!h.t.size||h.t.size===1&&h.t.has(f)),v=f=>{const h=t.get(f);h&&b(f,h)&&O(f)},m=f=>{const h=t.get(f);h==null||h.t.forEach(k=>{if(k!==f){const S=r(k),E=c(k);(!S||!gt(S,E))&&m(k)}})},y=(f,...h)=>{let k=!0;const S=R=>kt(c(R)),E=(R,...ie)=>{let P;if(R===f){if(!Wt(R))throw new Error("atom not writable");const V=r(R),I=l(R,ie[0]);(!V||!gt(V,I))&&m(R)}else P=y(R,...ie);return k||L(),P},w=f.write(S,E,...h);return k=!1,w},N=(f,...h)=>{const k=y(f,...h);return L(),k},A=(f,h)=>{const k={t:new Set(h&&[h]),l:new Set};if(t.set(f,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}&&"production")!=="production"&&a.add(f),c(f).d.forEach((S,E)=>{const w=t.get(E);w?w.t.add(f):E!==f&&A(E,f)}),c(f),qt(f)&&f.onMount){const S=f.onMount((...E)=>N(f,...E));S&&(k.u=S)}return k},O=f=>{var h;const k=(h=t.get(f))==null?void 0:h.u;k&&k(),t.delete(f),({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}&&"production")!=="production"&&a.delete(f);const S=r(f);S?(Jt(S)&&Vn(S.v),S.d.forEach((E,w)=>{if(w!==f){const R=t.get(w);R&&(R.t.delete(f),b(w,R)&&O(w))}})):({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}&&"production")!=="production"&&console.warn("[Bug] could not find atom state to unmount",f)},T=(f,h,k)=>{const S=new Set(h.d.keys());k==null||k.forEach((E,w)=>{if(S.has(w)){S.delete(w);return}const R=t.get(w);R&&(R.t.delete(f),b(w,R)&&O(w))}),S.forEach(E=>{const w=t.get(E);w?w.t.add(f):t.has(f)&&A(E,f)})},L=()=>{for(;i.size;){const f=Array.from(i);i.clear(),f.forEach(([h,k])=>{const S=r(h);if(S){S.d!==(k==null?void 0:k.d)&&T(h,S,k==null?void 0:k.d);const E=t.get(h);E&&!(k&&!Jt(k)&&(gt(k,S)||Mn(k,S)))&&E.l.forEach(w=>w())}else({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}&&"production")!=="production"&&console.warn("[Bug] no atom state to flush")})}({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}&&"production")!=="production"&&n.forEach(f=>f("state"))},z=(f,h)=>{const k=g(f);L();const S=k.l;return S.add(h),({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}&&"production")!=="production"&&n.forEach(E=>E("sub")),()=>{S.delete(h),v(f),({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}&&"production")!=="production"&&n.forEach(E=>E("unsub"))}};return({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}&&"production")!=="production"?{get:p,set:N,sub:z,dev_subscribe_store:f=>(n.add(f),()=>{n.delete(f)}),dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:f=>e.get(f),dev_get_mounted:f=>t.get(f),dev_restore_atoms:f=>{for(const[h,k]of f)Wt(h)&&(l(h,k),m(h));L()}}:{get:p,set:N,sub:z}};let Ht;const Sr=()=>(Ht||(Ht=Oi()),Ht),Nr=M.createContext(void 0),Ei=e=>{const t=M.useContext(Nr);return(e==null?void 0:e.store)||t||Sr()},Or=e=>e instanceof Promise,Er=M.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function wr(e,t){const i=Ei(t),[[n,a,r],o]=M.useReducer(l=>{const d=i.get(e);return Object.is(l[0],d)&&l[1]===i&&l[2]===e?l:[d,i,e]},void 0,()=>[i.get(e),i,e]);let s=n;(a!==i||r!==e)&&(o(),s=i.get(e));const u=t==null?void 0:t.delay;return M.useEffect(()=>{const l=i.sub(e,()=>{if(typeof u=="number"){setTimeout(o,u);return}o()});return o(),l},[i,e,u]),M.useDebugValue(s),Or(s)?Er(s):s}function Ar(e,t){const i=Ei(t);return M.useCallback((...a)=>{if(({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}&&"production")!=="production"&&!("write"in e))throw new Error("not writable atom");return i.set(e,...a)},[i,e])}function Fr(e,t){return[wr(e,t),Ar(e,t)]}const Pt=_r(null);Pt.debugLabel="accountAtom";const{NZ_AWS_REGION:Cr,NZ_BACKOFFICE_BACK_URL:Rr,NZ_CORE_SERVICES_GRAPHQL_URL:Tr,NZ_CORE_SERVICES_REST_URL:xr}={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},Dr={AWS:{region:Cr,cognito:{userPoolId:"us-east-1_EZ7wuZ4ig",userPoolWebClientId:"2jok7cst8ebf6ppscrhji57gvr"}},apiUrls:{restV1:Rr||"https://b133h34s56.execute-api.us-east-1.amazonaws.com",restV2:xr||"https://core-services-prod.nizza.com/api",graphql:Tr||"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 hn(e){const{url:t,method:i="GET",body:n,raw:a=!1,contentTypeJson:r=!0,timeout:o,...s}=e,u=r&&!e.headers?new Headers({"content-type":"application/json"}):e.headers;try{const l=new AbortController,{signal:d}=l;let c;const p=fetch(t,{method:i,headers:u,body:n,signal:d,...s});o&&(c=setTimeout(()=>{l.abort()},o));const g=await p;if(a)return g;const b=await g.json();if(clearTimeout(c),!g.ok){const v=b?JSON.stringify(b):g.statusText;throw new Error(v)}return b}catch(l){throw console.error("[CustomFetch] ",l),l}}const Pr=e=>hn({...e,contentTypeJson:!1,raw:!1});function Lr(e,t,i){fetch(t).then(n=>n.blob()).then(n=>wi(n,`${e}.${i}`))}const wi=(e,t,i)=>{const n=[e],a=new Blob(n,{type:i!=null?i:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(a,t);const r=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),o=document.createElement("a");return o.style.display="none",o.href=r,o.setAttribute("download",t),typeof o.download=="undefined"&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o),window.URL.revokeObjectURL(r)},200)};let Ir=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,i)=>(i&=63,i<36?t+=i.toString(36):i<62?t+=(i-26).toString(36).toUpperCase():i>62?t+="-":t+="_",t),"");const Ai=(e=8)=>Ir(e),Vr=e=>{const t=Object.entries(e).reduce((i,[n,a])=>a!==void 0?`${i}${i?"&":""}${n}=${a}`:i,"");return t?`?${t}`:""};function jr(){const e=new Error().stack.split(`
|
|
2
2
|
`);return e.length<3?"":e[2].trim().substring(3)}var Fi=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ci(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ri={exports:{}};(function(e){(function(t,i){e.exports?e.exports=i():t.prefix=i(t)})(Fi,function(t){var i=function(d){for(var c=1,p=arguments.length,g;c<p;c++)for(g in arguments[c])Object.prototype.hasOwnProperty.call(arguments[c],g)&&(d[g]=arguments[c][g]);return d},n={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={},o=function(d){if(!d||!d.getLogger)throw new TypeError("Argument is not a root logger");a=d},s=function(d,c){if(!d||!d.setLevel)throw new TypeError("Argument is not a logger");var p=d.methodFactory,g=d.name||"",b=r[g]||r[""]||n;function v(m,y,N){var A=p(m,y,N),O=r[N]||r[""],T=O.template.indexOf("%t")!==-1,L=O.template.indexOf("%l")!==-1,z=O.template.indexOf("%n")!==-1;return function(){for(var f="",h=arguments.length,k=Array(h),S=0;S<h;S++)k[S]=arguments[S];if(g||!r[N]){var E=O.timestampFormatter(new Date),w=O.levelFormatter(m),R=O.nameFormatter(N);O.format?f+=O.format(w,R,E):(f+=O.template,T&&(f=f.replace(/%t/,E)),L&&(f=f.replace(/%l/,w)),z&&(f=f.replace(/%n/,R))),k.length&&typeof k[0]=="string"?k[0]=f+" "+k[0]:k.unshift(f)}A.apply(void 0,k)}}return r[g]||(d.methodFactory=v),c=c||{},c.template&&(c.format=void 0),r[g]=i({},b,c),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},u={reg:o,apply:s},l;return t&&(l=t.prefix,u.noConflict=function(){return t.prefix===u&&(t.prefix=l),u}),u})})(Ri);var Ur=Ri.exports;const Ti=Ci(Ur);var xi={exports:{}};(function(e){(function(t,i){e.exports?e.exports=i():t.log=i()})(Fi,function(){var t=function(){},i="undefined",n=typeof window!==i&&typeof window.navigator!==i&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"];function r(v,m){var y=v[m];if(typeof y.bind=="function")return y.bind(v);try{return Function.prototype.bind.call(y,v)}catch{return function(){return Function.prototype.apply.apply(y,[v,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(v){return v==="debug"&&(v="log"),typeof console===i?!1:v==="trace"&&n?o:console[v]!==void 0?r(console,v):console.log!==void 0?r(console,"log"):t}function u(v,m){for(var y=0;y<a.length;y++){var N=a[y];this[N]=y<v?t:this.methodFactory(N,v,m)}this.log=this.debug}function l(v,m,y){return function(){typeof console!==i&&(u.call(this,m,y),this[v].apply(this,arguments))}}function d(v,m,y){return s(v)||l.apply(this,arguments)}function c(v,m,y){var N=this,A;m=m==null?"WARN":m;var O="loglevel";typeof v=="string"?O+=":"+v:typeof v=="symbol"&&(O=void 0);function T(h){var k=(a[h]||"silent").toUpperCase();if(!(typeof window===i||!O)){try{window.localStorage[O]=k;return}catch{}try{window.document.cookie=encodeURIComponent(O)+"="+k+";"}catch{}}}function L(){var h;if(!(typeof window===i||!O)){try{h=window.localStorage[O]}catch{}if(typeof h===i)try{var k=window.document.cookie,S=k.indexOf(encodeURIComponent(O)+"=");S!==-1&&(h=/^([^;]+)/.exec(k.slice(S))[1])}catch{}return N.levels[h]===void 0&&(h=void 0),h}}function z(){if(!(typeof window===i||!O)){try{window.localStorage.removeItem(O);return}catch{}try{window.document.cookie=encodeURIComponent(O)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}N.name=v,N.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},N.methodFactory=y||d,N.getLevel=function(){return A},N.setLevel=function(h,k){if(typeof h=="string"&&N.levels[h.toUpperCase()]!==void 0&&(h=N.levels[h.toUpperCase()]),typeof h=="number"&&h>=0&&h<=N.levels.SILENT){if(A=h,k!==!1&&T(h),u.call(N,h,v),typeof console===i&&h<N.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+h},N.setDefaultLevel=function(h){m=h,L()||N.setLevel(h,!1)},N.resetLevel=function(){N.setLevel(m,!1),z()},N.enableAll=function(h){N.setLevel(N.levels.TRACE,h)},N.disableAll=function(h){N.setLevel(N.levels.SILENT,h)};var f=L();f==null&&(f=m),N.setLevel(f,!1)}var p=new c,g={};p.getLogger=function(m){if(typeof m!="symbol"&&typeof m!="string"||m==="")throw new TypeError("You must supply a name when creating a logger.");var y=g[m];return y||(y=g[m]=new c(m,p.getLevel(),p.methodFactory)),y};var b=typeof window!==i?window.log:void 0;return p.noConflict=function(){return typeof window!==i&&window.log===p&&(window.log=b),p},p.getLoggers=function(){return g},p.default=p,p})})(xi);var Mr=xi.exports;const Br=Ci(Mr);function D(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(i.length?" "+i.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var zr={};function Di(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:zr}var Pi=Object.assign,Ot=Object.getOwnPropertyDescriptor,ee=Object.defineProperty,Lt=Object.prototype,rn=[];Object.freeze(rn);var vn={};Object.freeze(vn);var Gr=typeof Proxy!="undefined",$r=Object.toString();function Li(){Gr||D("Proxy not available")}function Ii(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Ae=function(){};function X(e){return typeof e=="function"}function ye(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function It(e){return e!==null&&typeof e=="object"}function ue(e){if(!It(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof i=="function"&&i.toString()===$r}function Vi(e){var t=e==null?void 0:e.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function it(e,t,i){ee(e,t,{enumerable:!1,writable:!0,configurable:!0,value:i})}function ji(e,t,i){ee(e,t,{enumerable:!1,writable:!1,configurable:!0,value:i})}function Se(e,t){var i="isMobX"+e;return t.prototype[i]=!0,function(n){return It(n)&&n[i]===!0}}function Ve(e){return e instanceof Map}function at(e){return e instanceof Set}var Ui=typeof Object.getOwnPropertySymbols!="undefined";function Kr(e){var t=Object.keys(e);if(!Ui)return t;var i=Object.getOwnPropertySymbols(e);return i.length?[].concat(t,i.filter(function(n){return Lt.propertyIsEnumerable.call(e,n)})):t}var Re=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Ui?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function Mi(e){return e===null?null:typeof e=="object"?""+e:e}function se(e,t){return Lt.hasOwnProperty.call(e,t)}var Qr=Object.getOwnPropertyDescriptors||function(t){var i={};return Re(t).forEach(function(n){i[n]=Ot(t,n)}),i};function Bn(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jr(n.key),n)}}function pn(e,t,i){return t&&Bn(e.prototype,t),i&&Bn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},Te.apply(this,arguments)}function Bi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,on(e,t)}function on(e,t){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},on(e,t)}function Zt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wr(e,t){if(e){if(typeof e=="string")return zn(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return zn(e,t)}}function zn(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function Fe(e,t){var i=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=Wr(e))||t&&e&&typeof e.length=="number"){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qr(e,t){if(typeof e!="object"||e===null)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var n=i.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jr(e){var t=qr(e,"string");return typeof t=="symbol"?t:String(t)}var Y=Symbol("mobx-stored-annotations");function te(e){function t(i,n){rt(i,n,e)}return Object.assign(t,e)}function rt(e,t,i){se(e,Y)||it(e,Y,Te({},e[Y])),ao(i)||(e[Y][t]=i)}function Hr(e){return se(e,Y)||it(e,Y,Te({},e[Y])),e[Y]}var F=Symbol("mobx administration"),ot=function(){function e(i){i===void 0&&(i="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=x.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=i}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return sa(this)},t.reportChanged=function(){G(),ua(this),_.stateVersion=_.stateVersion<Number.MAX_SAFE_INTEGER?_.stateVersion+1:Number.MIN_SAFE_INTEGER,$()},t.toString=function(){return this.name_},e}(),gn=Se("Atom",ot);function zi(e,t,i){t===void 0&&(t=Ae),i===void 0&&(i=Ae);var n=new ot(e);return t!==Ae&&is(n,t),i!==Ae&&pa(n,i),n}function Zr(e,t){return e===t}function Xr(e,t){return On(e,t)}function Yr(e,t){return On(e,t,1)}function eo(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e===1/t:e!==e&&t!==t}var xe={identity:Zr,structural:Xr,default:eo,shallow:Yr};function De(e,t,i){return dt(e)?e:Array.isArray(e)?B.array(e,{name:i}):ue(e)?B.object(e,void 0,{name:i}):Ve(e)?B.map(e,{name:i}):at(e)?B.set(e,{name:i}):typeof e=="function"&&!_n(e)&&!Ct(e)?Vi(e)?Xe(e):Ze(i,e):e}function to(e,t,i){if(e==null||Ye(e)||Mt(e)||Ne(e)||Ue(e))return e;if(Array.isArray(e))return B.array(e,{name:i,deep:!1});if(ue(e))return B.object(e,void 0,{name:i,deep:!1});if(Ve(e))return B.map(e,{name:i,deep:!1});if(at(e))return B.set(e,{name:i,deep:!1})}function Vt(e){return e}function no(e,t){return On(e,t)?t:e}var io="override";function ao(e){return e.annotationType_===io}function st(e,t){return{annotationType_:e,options_:t,make_:ro,extend_:oo}}function ro(e,t,i,n){var a;if((a=this.options_)!=null&&a.bound)return this.extend_(e,t,i,!1)===null?0:1;if(n===e.target_)return this.extend_(e,t,i,!1)===null?0:2;if(_n(i.value))return 1;var r=Gi(e,this,t,i,!1);return ee(n,t,r),2}function oo(e,t,i,n){var a=Gi(e,this,t,i);return e.defineProperty_(t,a,n)}function so(e,t,i,n){t.annotationType_,n.value}function Gi(e,t,i,n,a){var r,o,s,u,l,d,c;a===void 0&&(a=_.safeDescriptors),so(e,t,i,n);var p=n.value;if((r=t.options_)!=null&&r.bound){var g;p=p.bind((g=e.proxy_)!=null?g:e.target_)}return{value:Pe((o=(s=t.options_)==null?void 0:s.name)!=null?o:i.toString(),p,(u=(l=t.options_)==null?void 0:l.autoAction)!=null?u:!1,(d=t.options_)!=null&&d.bound?(c=e.proxy_)!=null?c:e.target_:void 0),configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function $i(e,t){return{annotationType_:e,options_:t,make_:uo,extend_:lo}}function uo(e,t,i,n){var a;if(n===e.target_)return this.extend_(e,t,i,!1)===null?0:2;if((a=this.options_)!=null&&a.bound&&(!se(e.target_,t)||!Ct(e.target_[t]))&&this.extend_(e,t,i,!1)===null)return 0;if(Ct(i.value))return 1;var r=Ki(e,this,t,i,!1,!1);return ee(n,t,r),2}function lo(e,t,i,n){var a,r=Ki(e,this,t,i,(a=this.options_)==null?void 0:a.bound);return e.defineProperty_(t,r,n)}function co(e,t,i,n){t.annotationType_,n.value}function Ki(e,t,i,n,a,r){r===void 0&&(r=_.safeDescriptors),co(e,t,i,n);var o=n.value;if(Ct(o)||(o=Xe(o)),a){var s;o=o.bind((s=e.proxy_)!=null?s:e.target_),o.isMobXFlow=!0}return{value:o,configurable:r?e.isPlainObject_:!0,enumerable:!1,writable:!r}}function kn(e,t){return{annotationType_:e,options_:t,make_:fo,extend_:mo}}function fo(e,t,i){return this.extend_(e,t,i,!1)===null?0:1}function mo(e,t,i,n){return ho(e,this,t,i),e.defineComputedProperty_(t,Te({},this.options_,{get:i.get,set:i.set}),n)}function ho(e,t,i,n){t.annotationType_,n.get}function jt(e,t){return{annotationType_:e,options_:t,make_:vo,extend_:po}}function vo(e,t,i){return this.extend_(e,t,i,!1)===null?0:1}function po(e,t,i,n){var a,r;return go(e,this),e.defineObservableProperty_(t,i.value,(a=(r=this.options_)==null?void 0:r.enhancer)!=null?a:De,n)}function go(e,t,i,n){t.annotationType_}var ko="true",yo=Qi();function Qi(e){return{annotationType_:ko,options_:e,make_:_o,extend_:bo}}function _o(e,t,i,n){var a,r;if(i.get)return fe.make_(e,t,i,n);if(i.set){var o=Pe(t.toString(),i.set);return n===e.target_?e.defineProperty_(t,{configurable:_.safeDescriptors?e.isPlainObject_:!0,set:o})===null?0:2:(ee(n,t,{configurable:!0,set:o}),2)}if(n!==e.target_&&typeof i.value=="function"){var s;if(Vi(i.value)){var u,l=(u=this.options_)!=null&&u.autoBind?Xe.bound:Xe;return l.make_(e,t,i,n)}var d=(s=this.options_)!=null&&s.autoBind?Ze.bound:Ze;return d.make_(e,t,i,n)}var c=((a=this.options_)==null?void 0:a.deep)===!1?B.ref:B;if(typeof i.value=="function"&&(r=this.options_)!=null&&r.autoBind){var p;i.value=i.value.bind((p=e.proxy_)!=null?p:e.target_)}return c.make_(e,t,i,n)}function bo(e,t,i,n){var a,r;if(i.get)return fe.extend_(e,t,i,n);if(i.set)return e.defineProperty_(t,{configurable:_.safeDescriptors?e.isPlainObject_:!0,set:Pe(t.toString(),i.set)},n);if(typeof i.value=="function"&&(a=this.options_)!=null&&a.autoBind){var o;i.value=i.value.bind((o=e.proxy_)!=null?o:e.target_)}var s=((r=this.options_)==null?void 0:r.deep)===!1?B.ref:B;return s.extend_(e,t,i,n)}var So="observable",No="observable.ref",Oo="observable.shallow",Eo="observable.struct",Wi={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Wi);function yt(e){return e||Wi}var qi=jt(So),wo=jt(No,{enhancer:Vt}),Ao=jt(Oo,{enhancer:to}),Fo=jt(Eo,{enhancer:no}),Ji=te(qi);function _t(e){return e.deep===!0?De:e.deep===!1?Vt:Ro(e.defaultDecorator)}function Co(e){var t;return e?(t=e.defaultDecorator)!=null?t:Qi(e):void 0}function Ro(e){var t,i;return e&&(t=(i=e.options_)==null?void 0:i.enhancer)!=null?t:De}function Hi(e,t,i){if(ye(t)){rt(e,t,qi);return}return dt(e)?e:ue(e)?B.object(e,t,i):Array.isArray(e)?B.array(e,t):Ve(e)?B.map(e,t):at(e)?B.set(e,t):typeof e=="object"&&e!==null?e:B.box(e,t)}Pi(Hi,Ji);var To={box:function(t,i){var n=yt(i);return new Ce(t,_t(n),n.name,!0,n.equals)},array:function(t,i){var n=yt(i);return(_.useProxies===!1||n.proxy===!1?Os:vs)(t,_t(n),n.name)},map:function(t,i){var n=yt(i);return new Na(t,_t(n),n.name)},set:function(t,i){var n=yt(i);return new wa(t,_t(n),n.name)},object:function(t,i,n){return ka(_.useProxies===!1||(n==null?void 0:n.proxy)===!1?mt({},n):ds({},n),t,i)},ref:te(wo),shallow:te(Ao),deep:Ji,struct:te(Fo)},B=Pi(Hi,To),Zi="computed",xo="computed.struct",Xi=kn(Zi),Do=kn(xo,{equals:xe.structural}),fe=function(t,i){if(ye(i))return rt(t,i,Xi);if(ue(t))return te(kn(Zi,t));var n=ue(i)?i:{};return n.get=t,n.name||(n.name=t.name||""),new He(n)};Object.assign(fe,Xi);fe.struct=te(Do);var Gn,$n,Et=0,Po=1,Lo=(Gn=($n=Ot(function(){},"name"))==null?void 0:$n.configurable)!=null?Gn:!1,Kn={value:"action",configurable:!0,writable:!1,enumerable:!1};function Pe(e,t,i,n){i===void 0&&(i=!1);function a(){return Io(e,i,t,n||this,arguments)}return a.isMobxAction=!0,Lo&&(Kn.value=e,ee(a,"name",Kn)),a}function Io(e,t,i,n,a){var r=Vo(e,t);try{return i.apply(n,a)}catch(o){throw r.error_=o,o}finally{jo(r)}}function Vo(e,t,i,n){var a=!1,r=0,o=_.trackingDerivation,s=!t||!o;G();var u=_.allowStateChanges;s&&(je(),u=ut(!0));var l=yn(!0),d={runAsAction_:s,prevDerivation_:o,prevAllowStateChanges_:u,prevAllowStateReads_:l,notifySpy_:a,startTime_:r,actionId_:Po++,parentActionId_:Et};return Et=d.actionId_,d}function jo(e){Et!==e.actionId_&&D(30),Et=e.parentActionId_,e.error_!==void 0&&(_.suppressReactionErrors=!0),lt(e.prevAllowStateChanges_),We(e.prevAllowStateReads_),$(),e.runAsAction_&&ve(e.prevDerivation_),_.suppressReactionErrors=!1}function Yi(e,t){var i=ut(e);try{return t()}finally{lt(i)}}function ut(e){var t=_.allowStateChanges;return _.allowStateChanges=e,t}function lt(e){_.allowStateChanges=e}var ea;ea=Symbol.toPrimitive;var Ce=function(e){Bi(t,e);function t(n,a,r,o,s){var u;return r===void 0&&(r="ObservableValue"),s===void 0&&(s=xe.default),u=e.call(this,r)||this,u.enhancer=void 0,u.name_=void 0,u.equals=void 0,u.hasUnreportedChange_=!1,u.interceptors_=void 0,u.changeListeners_=void 0,u.value_=void 0,u.dehancer=void 0,u.enhancer=a,u.name_=r,u.equals=s,u.value_=a(n,void 0,r),u}var i=t.prototype;return i.dehanceValue=function(a){return this.dehancer!==void 0?this.dehancer(a):a},i.set=function(a){this.value_,a=this.prepareNewValue_(a),a!==_.UNCHANGED&&this.setNewValue_(a)},i.prepareNewValue_=function(a){if(Q(this)){var r=W(this,{object:this,type:ne,newValue:a});if(!r)return _.UNCHANGED;a=r.newValue}return a=this.enhancer(a,this.value_,this.name_),this.equals(this.value_,a)?_.UNCHANGED:a},i.setNewValue_=function(a){var r=this.value_;this.value_=a,this.reportChanged(),J(this)&&H(this,{type:ne,object:this,newValue:a,oldValue:r})},i.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},i.intercept_=function(a){return ct(this,a)},i.observe_=function(a,r){return r&&a({observableKind:"value",debugObjectName:this.name_,object:this,type:ne,newValue:this.value_,oldValue:void 0}),ft(this,a)},i.raw=function(){return this.value_},i.toJSON=function(){return this.get()},i.toString=function(){return this.name_+"["+this.value_+"]"},i.valueOf=function(){return Mi(this.get())},i[ea]=function(){return this.valueOf()},t}(ot),ta;ta=Symbol.toPrimitive;var He=function(){function e(i){this.dependenciesState_=x.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_=x.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_=ke.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,i.get||D(31),this.derivation=i.get,this.name_=i.name||"ComputedValue",i.set&&(this.setter_=Pe("ComputedValue-setter",i.set)),this.equals_=i.equals||(i.compareStructural||i.struct?xe.structural:xe.default),this.scope_=i.context,this.requiresReaction_=i.requiresReaction,this.keepAlive_=!!i.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){zo(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.get=function(){if(this.isComputing_&&D(32,this.name_,this.derivation),_.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)sn(this)&&(this.warnAboutUntrackedRead_(),G(),this.value_=this.computeValue_(!1),$());else if(sa(this),sn(this)){var n=_.trackingContext;this.keepAlive_&&!n&&(_.trackingContext=this),this.trackAndCompute()&&Bo(this),_.trackingContext=n}var a=this.value_;if(St(a))throw a.cause;return a},t.set=function(n){if(this.setter_){this.isRunningSetter_&&D(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter_=!1}}else D(34,this.name_)},t.trackAndCompute=function(){var n=this.value_,a=this.dependenciesState_===x.NOT_TRACKING_,r=this.computeValue_(!0),o=a||St(n)||St(r)||!this.equals_(n,r);return o&&(this.value_=r),o},t.computeValue_=function(n){this.isComputing_=!0;var a=ut(!1),r;if(n)r=na(this,this.derivation,this.scope_);else if(_.disableErrorBoundaries===!0)r=this.derivation.call(this.scope_);else try{r=this.derivation.call(this.scope_)}catch(o){r=new wt(o)}return lt(a),this.isComputing_=!1,r},t.suspend_=function(){this.keepAlive_||(un(this),this.value_=void 0)},t.observe_=function(n,a){var r=this,o=!0,s=void 0;return bn(function(){var u=r.get();if(!o||a){var l=je();n({observableKind:"computed",debugObjectName:r.name_,type:ne,object:r,newValue:u,oldValue:s}),ve(l)}o=!1,s=u})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return Mi(this.get())},t[ta]=function(){return this.valueOf()},e}(),Ut=Se("ComputedValue",He),x;(function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"})(x||(x={}));var ke;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(ke||(ke={}));var wt=function(t){this.cause=void 0,this.cause=t};function St(e){return e instanceof wt}function sn(e){switch(e.dependenciesState_){case x.UP_TO_DATE_:return!1;case x.NOT_TRACKING_:case x.STALE_:return!0;case x.POSSIBLY_STALE_:{for(var t=yn(!0),i=je(),n=e.observing_,a=n.length,r=0;r<a;r++){var o=n[r];if(Ut(o)){if(_.disableErrorBoundaries)o.get();else try{o.get()}catch{return ve(i),We(t),!0}if(e.dependenciesState_===x.STALE_)return ve(i),We(t),!0}}return aa(e),ve(i),We(t),!1}}}function na(e,t,i){var n=yn(!0);aa(e),e.newObserving_=new Array(e.observing_.length+100),e.unboundDepsCount_=0,e.runId_=++_.runId;var a=_.trackingDerivation;_.trackingDerivation=e,_.inBatch++;var r;if(_.disableErrorBoundaries===!0)r=t.call(i);else try{r=t.call(i)}catch(o){r=new wt(o)}return _.inBatch--,_.trackingDerivation=a,Uo(e),We(n),r}function Uo(e){for(var t=e.observing_,i=e.observing_=e.newObserving_,n=x.UP_TO_DATE_,a=0,r=e.unboundDepsCount_,o=0;o<r;o++){var s=i[o];s.diffValue_===0&&(s.diffValue_=1,a!==o&&(i[a]=s),a++),s.dependenciesState_>n&&(n=s.dependenciesState_)}for(i.length=a,e.newObserving_=null,r=t.length;r--;){var u=t[r];u.diffValue_===0&&ra(u,e),u.diffValue_=0}for(;a--;){var l=i[a];l.diffValue_===1&&(l.diffValue_=0,Mo(l,e))}n!==x.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function un(e){var t=e.observing_;e.observing_=[];for(var i=t.length;i--;)ra(t[i],e);e.dependenciesState_=x.NOT_TRACKING_}function ia(e){var t=je();try{return e()}finally{ve(t)}}function je(){var e=_.trackingDerivation;return _.trackingDerivation=null,e}function ve(e){_.trackingDerivation=e}function yn(e){var t=_.allowStateReads;return _.allowStateReads=e,t}function We(e){_.allowStateReads=e}function aa(e){if(e.dependenciesState_!==x.UP_TO_DATE_){e.dependenciesState_=x.UP_TO_DATE_;for(var t=e.observing_,i=t.length;i--;)t[i].lowestObserverState_=x.UP_TO_DATE_}}var Xt=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,this.stateVersion=Number.MIN_SAFE_INTEGER},Yt=!0,_=function(){var e=Di();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Yt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new Xt().version&&(Yt=!1),Yt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Xt):(setTimeout(function(){D(35)},1),new Xt)}();function Mo(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function ra(e,t){e.observers_.delete(t),e.observers_.size===0&&oa(e)}function oa(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,_.pendingUnobservations.push(e))}function G(){_.inBatch++}function $(){if(--_.inBatch===0){la();for(var e=_.pendingUnobservations,t=0;t<e.length;t++){var i=e[t];i.isPendingUnobservation_=!1,i.observers_.size===0&&(i.isBeingObserved_&&(i.isBeingObserved_=!1,i.onBUO()),i instanceof He&&i.suspend_())}_.pendingUnobservations=[]}}function sa(e){var t=_.trackingDerivation;return t!==null?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&_.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),e.isBeingObserved_):(e.observers_.size===0&&_.inBatch>0&&oa(e),!1)}function ua(e){e.lowestObserverState_!==x.STALE_&&(e.lowestObserverState_=x.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===x.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=x.STALE_}))}function Bo(e){e.lowestObserverState_!==x.STALE_&&(e.lowestObserverState_=x.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===x.POSSIBLY_STALE_?t.dependenciesState_=x.STALE_:t.dependenciesState_===x.UP_TO_DATE_&&(e.lowestObserverState_=x.UP_TO_DATE_)}))}function zo(e){e.lowestObserverState_===x.UP_TO_DATE_&&(e.lowestObserverState_=x.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===x.UP_TO_DATE_&&(t.dependenciesState_=x.POSSIBLY_STALE_,t.onBecomeStale_())}))}var At=function(){function e(i,n,a,r){i===void 0&&(i="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=x.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_=ke.NONE,this.name_=i,this.onInvalidate_=n,this.errorHandler_=a,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,_.pendingReactions.push(this),la())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){G(),this.isScheduled_=!1;var n=_.trackingContext;if(_.trackingContext=this,sn(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}_.trackingContext=n,$()}},t.track=function(n){if(!this.isDisposed_){G(),this.isRunning_=!0;var a=_.trackingContext;_.trackingContext=this;var r=na(this,n,void 0);_.trackingContext=a,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&un(this),St(r)&&this.reportExceptionInDerivation_(r.cause),$()}},t.reportExceptionInDerivation_=function(n){var a=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(_.disableErrorBoundaries)throw n;var r="[mobx] uncaught error in '"+this+"'";_.suppressReactionErrors||console.error(r,n),_.globalReactionErrorHandlers.forEach(function(o){return o(n,a)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(G(),un(this),$()))},t.getDisposer_=function(){var n=this.dispose.bind(this);return n[F]=this,n},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(n){n===void 0&&(n=!1),ss(this,n)},e}(),Go=100,$o=function(t){return t()};function la(){_.inBatch>0||_.isRunningReactions||$o(Ko)}function Ko(){_.isRunningReactions=!0;for(var e=_.pendingReactions,t=0;e.length>0;){++t===Go&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var i=e.splice(0),n=0,a=i.length;n<a;n++)i[n].runReaction_()}_.isRunningReactions=!1}var Ft=Se("Reaction",At);function qe(){return!1}function Qo(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var da="action",Wo="action.bound",ca="autoAction",qo="autoAction.bound",Jo="<unnamed action>",fa=st(da),Ho=st(Wo,{bound:!0}),ma=st(ca,{autoAction:!0}),Zo=st(qo,{autoAction:!0,bound:!0});function ha(e){var t=function(n,a){if(X(n))return Pe(n.name||Jo,n,e);if(X(a))return Pe(n,a,e);if(ye(a))return rt(n,a,e?ma:fa);if(ye(n))return te(st(e?ca:da,{name:n,autoAction:e}))};return t}var me=ha(!1);Object.assign(me,fa);var Ze=ha(!0);Object.assign(Ze,ma);me.bound=te(Ho);Ze.bound=te(Zo);function _n(e){return X(e)&&e.isMobxAction===!0}function bn(e,t){var i,n;t===void 0&&(t=vn);var a=(i=(n=t)==null?void 0:n.name)!=null?i:"Autorun",r=!t.scheduler&&!t.delay,o;if(r)o=new At(a,function(){this.track(l)},t.onError,t.requiresObservable);else{var s=va(t),u=!1;o=new At(a,function(){u||(u=!0,s(function(){u=!1,o.isDisposed_||o.track(l)}))},t.onError,t.requiresObservable)}function l(){e(o)}return o.schedule_(),o.getDisposer_()}var Xo=function(t){return t()};function va(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Xo}function Yo(e,t,i){var n;i===void 0&&(i=vn);var a=(n=i.name)!=null?n:"Reaction",r=me(a,i.onError?es(i.onError,t):t),o=!i.scheduler&&!i.delay,s=va(i),u=!0,l=!1,d,c,p=i.compareStructural?xe.structural:i.equals||xe.default,g=new At(a,function(){u||o?b():l||(l=!0,s(b))},i.onError,i.requiresObservable);function b(){if(l=!1,!g.isDisposed_){var v=!1;g.track(function(){var m=Yi(!1,function(){return e(g)});v=u||!p(d,m),c=d,d=m}),(u&&i.fireImmediately||!u&&v)&&r(d,c,g),u=!1}}return g.schedule_(),g.getDisposer_()}function es(e,t){return function(){try{return t.apply(this,arguments)}catch(i){e.call(this,i)}}}var ts="onBO",ns="onBUO";function is(e,t,i){return ga(ts,e,t,i)}function pa(e,t,i){return ga(ns,e,t,i)}function ga(e,t,i,n){var a=typeof n=="function"?_e(t,i):_e(t),r=X(n)?n:i,o=e+"L";return a[o]?a[o].add(r):a[o]=new Set([r]),function(){var s=a[o];s&&(s.delete(r),s.size===0&&delete a[o])}}function ka(e,t,i,n){var a=Qr(t),r=mt(e,n)[F];G();try{Re(a).forEach(function(o){r.extend_(o,a[o],i&&o in i?i[o]:!0)})}finally{$()}return e}var as=0;function ya(){this.message="FLOW_CANCELLED"}ya.prototype=Object.create(Error.prototype);var Qn=$i("flow"),rs=$i("flow.bound",{bound:!0}),Xe=Object.assign(function(t,i){if(ye(i))return rt(t,i,Qn);var n=t,a=n.name||"<unnamed flow>",r=function(){var s=this,u=arguments,l=++as,d=me(a+" - runid: "+l+" - init",n).apply(s,u),c,p=void 0,g=new Promise(function(b,v){var m=0;c=v;function y(O){p=void 0;var T;try{T=me(a+" - runid: "+l+" - yield "+m++,d.next).call(d,O)}catch(L){return v(L)}A(T)}function N(O){p=void 0;var T;try{T=me(a+" - runid: "+l+" - yield "+m++,d.throw).call(d,O)}catch(L){return v(L)}A(T)}function A(O){if(X(O==null?void 0:O.then)){O.then(A,v);return}return O.done?b(O.value):(p=Promise.resolve(O.value),p.then(y,N))}y(void 0)});return g.cancel=me(a+" - runid: "+l+" - cancel",function(){try{p&&Wn(p);var b=d.return(void 0),v=Promise.resolve(b.value);v.then(Ae,Ae),Wn(v),c(new ya)}catch(m){c(m)}}),g};return r.isMobXFlow=!0,r},Qn);Xe.bound=te(rs);function Wn(e){X(e.cancel)&&e.cancel()}function Ct(e){return(e==null?void 0:e.isMobXFlow)===!0}function os(e,t){return e?t!==void 0?Ye(e)?e[F].values_.has(t):!1:Ye(e)||!!e[F]||gn(e)||Ft(e)||Ut(e):!1}function dt(e){return os(e)}function ss(){D("trace() is not available in production builds");for(var e=!1,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];typeof i[i.length-1]=="boolean"&&(e=i.pop());var a=us(i);if(!a)return D("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");a.isTracing_===ke.NONE&&console.log("[mobx.trace] '"+a.name_+"' tracing enabled"),a.isTracing_=e?ke.BREAK:ke.LOG}function us(e){switch(e.length){case 0:return _.trackingDerivation;case 1:return _e(e[0]);case 2:return _e(e[0],e[1])}}function re(e,t){t===void 0&&(t=void 0),G();try{return e.apply(t)}finally{$()}}function Ee(e){return e[F]}var ls={has:function(t,i){return Ee(t).has_(i)},get:function(t,i){return Ee(t).get_(i)},set:function(t,i,n){var a;return ye(i)?(a=Ee(t).set_(i,n,!0))!=null?a:!0:!1},deleteProperty:function(t,i){var n;return ye(i)?(n=Ee(t).delete_(i,!0))!=null?n:!0:!1},defineProperty:function(t,i,n){var a;return(a=Ee(t).defineProperty_(i,n))!=null?a:!0},ownKeys:function(t){return Ee(t).ownKeys_()},preventExtensions:function(t){D(13)}};function ds(e,t){var i,n;return Li(),e=mt(e,t),(n=(i=e[F]).proxy_)!=null?n:i.proxy_=new Proxy(e,ls)}function Q(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function ct(e,t){var i=e.interceptors_||(e.interceptors_=[]);return i.push(t),Ii(function(){var n=i.indexOf(t);n!==-1&&i.splice(n,1)})}function W(e,t){var i=je();try{for(var n=[].concat(e.interceptors_||[]),a=0,r=n.length;a<r&&(t=n[a](t),t&&!t.type&&D(14),!!t);a++);return t}finally{ve(i)}}function J(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function ft(e,t){var i=e.changeListeners_||(e.changeListeners_=[]);return i.push(t),Ii(function(){var n=i.indexOf(t);n!==-1&&i.splice(n,1)})}function H(e,t){var i=je(),n=e.changeListeners_;if(n){n=n.slice();for(var a=0,r=n.length;a<r;a++)n[a](t);ve(i)}}function cs(e,t,i){var n=mt(e,i)[F];G();try{var a;(a=t)!=null||(t=Hr(e)),Re(t).forEach(function(r){return n.make_(r,t[r])})}finally{$()}return e}var en=Symbol("mobx-keys");function fs(e,t,i){if(ue(e))return ka(e,e,t,i);var n=mt(e,i)[F];if(!e[en]){var a=Object.getPrototypeOf(e),r=new Set([].concat(Re(e),Re(a)));r.delete("constructor"),r.delete(F),it(a,en,r)}G();try{e[en].forEach(function(o){return n.make_(o,t&&o in t?t[o]:!0)})}finally{$()}return e}var qn="splice",ne="update",ms=1e4,hs={get:function(t,i){var n=t[F];return i===F?n:i==="length"?n.getArrayLength_():typeof i=="string"&&!isNaN(i)?n.get_(parseInt(i)):se(Rt,i)?Rt[i]:t[i]},set:function(t,i,n){var a=t[F];return i==="length"&&a.setArrayLength_(n),typeof i=="symbol"||isNaN(i)?t[i]=n:a.set_(parseInt(i),n),!0},preventExtensions:function(){D(15)}},Sn=function(){function e(i,n,a,r){i===void 0&&(i="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 ot(i),this.enhancer_=function(o,s){return n(o,s,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.dehanceValues_=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},t.intercept_=function(n){return ct(this,n)},t.observe_=function(n,a){return a===void 0&&(a=!1),a&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),ft(this,n)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&D("Out of range: "+n);var a=this.values_.length;if(n!==a)if(n>a){for(var r=new Array(n-a),o=0;o<n-a;o++)r[o]=void 0;this.spliceWithArray_(a,0,r)}else this.spliceWithArray_(n,a-n)},t.updateArrayLength_=function(n,a){n!==this.lastKnownLength_&&D(16),this.lastKnownLength_+=a,this.legacyMode_&&a>0&&Ra(n+a+1)},t.spliceWithArray_=function(n,a,r){var o=this;this.atom_;var s=this.values_.length;if(n===void 0?n=0:n>s?n=s:n<0&&(n=Math.max(0,s+n)),arguments.length===1?a=s-n:a==null?a=0:a=Math.max(0,Math.min(a,s-n)),r===void 0&&(r=rn),Q(this)){var u=W(this,{object:this.proxy_,type:qn,index:n,removedCount:a,added:r});if(!u)return rn;a=u.removedCount,r=u.added}if(r=r.length===0?r:r.map(function(c){return o.enhancer_(c,void 0)}),this.legacyMode_){var l=r.length-a;this.updateArrayLength_(s,l)}var d=this.spliceItemsIntoValues_(n,a,r);return(a!==0||r.length!==0)&&this.notifyArraySplice_(n,r,d),this.dehanceValues_(d)},t.spliceItemsIntoValues_=function(n,a,r){if(r.length<ms){var o;return(o=this.values_).splice.apply(o,[n,a].concat(r))}else{var s=this.values_.slice(n,n+a),u=this.values_.slice(n+a);this.values_.length+=r.length-a;for(var l=0;l<r.length;l++)this.values_[n+l]=r[l];for(var d=0;d<u.length;d++)this.values_[n+r.length+d]=u[d];return s}},t.notifyArrayChildUpdate_=function(n,a,r){var o=!this.owned_&&qe(),s=J(this),u=s||o?{observableKind:"array",object:this.proxy_,type:ne,debugObjectName:this.atom_.name_,index:n,newValue:a,oldValue:r}:null;this.atom_.reportChanged(),s&&H(this,u)},t.notifyArraySplice_=function(n,a,r){var o=!this.owned_&&qe(),s=J(this),u=s||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:qn,index:n,removed:r,added:a,removedCount:r.length,addedCount:a.length}:null;this.atom_.reportChanged(),s&&H(this,u)},t.get_=function(n){if(this.legacyMode_&&n>=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},t.set_=function(n,a){var r=this.values_;if(this.legacyMode_&&n>r.length&&D(17,n,r.length),n<r.length){this.atom_;var o=r[n];if(Q(this)){var s=W(this,{type:ne,object:this.proxy_,index:n,newValue:a});if(!s)return;a=s.newValue}a=this.enhancer_(a,o);var u=a!==o;u&&(r[n]=a,this.notifyArrayChildUpdate_(n,a,o))}else{for(var l=new Array(n+1-r.length),d=0;d<l.length-1;d++)l[d]=void 0;l[l.length-1]=a,this.spliceWithArray_(r.length,0,l)}},e}();function vs(e,t,i,n){i===void 0&&(i="ObservableArray"),n===void 0&&(n=!1),Li();var a=new Sn(i,t,n,!1);ji(a.values_,F,a);var r=new Proxy(a.values_,hs);if(a.proxy_=r,e&&e.length){var o=ut(!0);a.spliceWithArray_(0,0,e),lt(o)}return r}var Rt={clear:function(){return this.splice(0)},replace:function(t){var i=this[F];return i.spliceWithArray_(0,i.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,i){for(var n=arguments.length,a=new Array(n>2?n-2:0),r=2;r<n;r++)a[r-2]=arguments[r];var o=this[F];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(t);case 2:return o.spliceWithArray_(t,i)}return o.spliceWithArray_(t,i,a)},spliceWithArray:function(t,i,n){return this[F].spliceWithArray_(t,i,n)},push:function(){for(var t=this[F],i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return t.spliceWithArray_(t.values_.length,0,n),t.values_.length},pop:function(){return this.splice(Math.max(this[F].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[F],i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return t.spliceWithArray_(0,0,n),t.values_.length},reverse:function(){return _.trackingDerivation&&D(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){_.trackingDerivation&&D(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var i=this[F],n=i.dehanceValues_(i.values_).indexOf(t);return n>-1?(this.splice(n,1),!0):!1}};U("concat",le);U("flat",le);U("includes",le);U("indexOf",le);U("join",le);U("lastIndexOf",le);U("slice",le);U("toString",le);U("toLocaleString",le);U("every",ge);U("filter",ge);U("find",ge);U("findIndex",ge);U("flatMap",ge);U("forEach",ge);U("map",ge);U("some",ge);U("reduce",_a);U("reduceRight",_a);function U(e,t){typeof Array.prototype[e]=="function"&&(Rt[e]=t(e))}function le(e){return function(){var t=this[F];t.atom_.reportObserved();var i=t.dehanceValues_(t.values_);return i[e].apply(i,arguments)}}function ge(e){return function(t,i){var n=this,a=this[F];a.atom_.reportObserved();var r=a.dehanceValues_(a.values_);return r[e](function(o,s){return t.call(i,o,s,n)})}}function _a(e){return function(){var t=this,i=this[F];i.atom_.reportObserved();var n=i.dehanceValues_(i.values_),a=arguments[0];return arguments[0]=function(r,o,s){return a(r,o,s,t)},n[e].apply(n,arguments)}}var ps=Se("ObservableArrayAdministration",Sn);function Mt(e){return It(e)&&ps(e[F])}var ba,Sa,gs={},he="add",Tt="delete";ba=Symbol.iterator;Sa=Symbol.toStringTag;var Na=function(){function e(i,n,a){var r=this;n===void 0&&(n=De),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[F]=gs,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_=n,this.name_=a,X(Map)||D(18),this.keysAtom_=zi("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,Yi(!0,function(){r.merge(i)})}var t=e.prototype;return t.has_=function(n){return this.data_.has(n)},t.has=function(n){var a=this;if(!_.trackingDerivation)return this.has_(n);var r=this.hasMap_.get(n);if(!r){var o=r=new Ce(this.has_(n),Vt,"ObservableMap.key?",!1);this.hasMap_.set(n,o),pa(o,function(){return a.hasMap_.delete(n)})}return r.get()},t.set=function(n,a){var r=this.has_(n);if(Q(this)){var o=W(this,{type:r?ne:he,object:this,newValue:a,name:n});if(!o)return this;a=o.newValue}return r?this.updateValue_(n,a):this.addValue_(n,a),this},t.delete=function(n){var a=this;if(this.keysAtom_,Q(this)){var r=W(this,{type:Tt,object:this,name:n});if(!r)return!1}if(this.has_(n)){var o=qe(),s=J(this),u=s||o?{observableKind:"map",debugObjectName:this.name_,type:Tt,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return re(function(){var l;a.keysAtom_.reportChanged(),(l=a.hasMap_.get(n))==null||l.setNewValue_(!1);var d=a.data_.get(n);d.setNewValue_(void 0),a.data_.delete(n)}),s&&H(this,u),!0}return!1},t.updateValue_=function(n,a){var r=this.data_.get(n);if(a=r.prepareNewValue_(a),a!==_.UNCHANGED){var o=qe(),s=J(this),u=s||o?{observableKind:"map",debugObjectName:this.name_,type:ne,object:this,oldValue:r.value_,name:n,newValue:a}:null;r.setNewValue_(a),s&&H(this,u)}},t.addValue_=function(n,a){var r=this;this.keysAtom_,re(function(){var l,d=new Ce(a,r.enhancer_,"ObservableMap.key",!1);r.data_.set(n,d),a=d.value_,(l=r.hasMap_.get(n))==null||l.setNewValue_(!0),r.keysAtom_.reportChanged()});var o=qe(),s=J(this),u=s||o?{observableKind:"map",debugObjectName:this.name_,type:he,object:this,name:n,newValue:a}:null;s&&H(this,u)},t.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var n=this,a=this.keys();return et({next:function(){var o=a.next(),s=o.done,u=o.value;return{done:s,value:s?void 0:n.get(u)}}})},t.entries=function(){var n=this,a=this.keys();return et({next:function(){var o=a.next(),s=o.done,u=o.value;return{done:s,value:s?void 0:[u,n.get(u)]}}})},t[ba]=function(){return this.entries()},t.forEach=function(n,a){for(var r=Fe(this),o;!(o=r()).done;){var s=o.value,u=s[0],l=s[1];n.call(a,l,u,this)}},t.merge=function(n){var a=this;return Ne(n)&&(n=new Map(n)),re(function(){ue(n)?Kr(n).forEach(function(r){return a.set(r,n[r])}):Array.isArray(n)?n.forEach(function(r){var o=r[0],s=r[1];return a.set(o,s)}):Ve(n)?(n.constructor!==Map&&D(19,n),n.forEach(function(r,o){return a.set(o,r)})):n!=null&&D(20,n)}),this},t.clear=function(){var n=this;re(function(){ia(function(){for(var a=Fe(n.keys()),r;!(r=a()).done;){var o=r.value;n.delete(o)}})})},t.replace=function(n){var a=this;return re(function(){for(var r=ks(n),o=new Map,s=!1,u=Fe(a.data_.keys()),l;!(l=u()).done;){var d=l.value;if(!r.has(d)){var c=a.delete(d);if(c)s=!0;else{var p=a.data_.get(d);o.set(d,p)}}}for(var g=Fe(r.entries()),b;!(b=g()).done;){var v=b.value,m=v[0],y=v[1],N=a.data_.has(m);if(a.set(m,y),a.data_.has(m)){var A=a.data_.get(m);o.set(m,A),N||(s=!0)}}if(!s)if(a.data_.size!==o.size)a.keysAtom_.reportChanged();else for(var O=a.data_.keys(),T=o.keys(),L=O.next(),z=T.next();!L.done;){if(L.value!==z.value){a.keysAtom_.reportChanged();break}L=O.next(),z=T.next()}a.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(n,a){return ft(this,n)},t.intercept_=function(n){return ct(this,n)},pn(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Sa,get:function(){return"Map"}}]),e}(),Ne=Se("ObservableMap",Na);function ks(e){if(Ve(e)||Ne(e))return e;if(Array.isArray(e))return new Map(e);if(ue(e)){var t=new Map;for(var i in e)t.set(i,e[i]);return t}else return D(21,e)}var Oa,Ea,ys={};Oa=Symbol.iterator;Ea=Symbol.toStringTag;var wa=function(){function e(i,n,a){n===void 0&&(n=De),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[F]=ys,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,X(Set)||D(22),this.atom_=zi(this.name_),this.enhancer_=function(r,o){return n(r,o,a)},i&&this.replace(i)}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;re(function(){ia(function(){for(var a=Fe(n.data_.values()),r;!(r=a()).done;){var o=r.value;n.delete(o)}})})},t.forEach=function(n,a){for(var r=Fe(this),o;!(o=r()).done;){var s=o.value;n.call(a,s,s,this)}},t.add=function(n){var a=this;if(this.atom_,Q(this)){var r=W(this,{type:he,object:this,newValue:n});if(!r)return this}if(!this.has(n)){re(function(){a.data_.add(a.enhancer_(n,void 0)),a.atom_.reportChanged()});var o=!1,s=J(this),u=s||o?{observableKind:"set",debugObjectName:this.name_,type:he,object:this,newValue:n}:null;s&&H(this,u)}return this},t.delete=function(n){var a=this;if(Q(this)){var r=W(this,{type:Tt,object:this,oldValue:n});if(!r)return!1}if(this.has(n)){var o=!1,s=J(this),u=s||o?{observableKind:"set",debugObjectName:this.name_,type:Tt,object:this,oldValue:n}:null;return re(function(){a.atom_.reportChanged(),a.data_.delete(n)}),s&&H(this,u),!0}return!1},t.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},t.entries=function(){var n=0,a=Array.from(this.keys()),r=Array.from(this.values());return et({next:function(){var s=n;return n+=1,s<r.length?{value:[a[s],r[s]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var n=this,a=0,r=Array.from(this.data_.values());return et({next:function(){return a<r.length?{value:n.dehanceValue_(r[a++]),done:!1}:{done:!0}}})},t.replace=function(n){var a=this;return Ue(n)&&(n=new Set(n)),re(function(){Array.isArray(n)?(a.clear(),n.forEach(function(r){return a.add(r)})):at(n)?(a.clear(),n.forEach(function(r){return a.add(r)})):n!=null&&D("Cannot initialize set from "+n)}),this},t.observe_=function(n,a){return ft(this,n)},t.intercept_=function(n){return ct(this,n)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Oa]=function(){return this.values()},pn(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Ea,get:function(){return"Set"}}]),e}(),Ue=Se("ObservableSet",wa),Jn=Object.create(null),Hn="remove",Aa=function(){function e(i,n,a,r){n===void 0&&(n=new Map),r===void 0&&(r=yo),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_=i,this.values_=n,this.name_=a,this.defaultAnnotation_=r,this.keysAtom_=new ot("ObservableObject.keys"),this.isPlainObject_=ue(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(n){return this.values_.get(n).get()},t.setObservablePropValue_=function(n,a){var r=this.values_.get(n);if(r instanceof He)return r.set(a),!0;if(Q(this)){var o=W(this,{type:ne,object:this.proxy_||this.target_,name:n,newValue:a});if(!o)return null;a=o.newValue}if(a=r.prepareNewValue_(a),a!==_.UNCHANGED){var s=J(this),u=!1,l=s||u?{type:ne,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:r.value_,name:n,newValue:a}:null;r.setNewValue_(a),s&&H(this,l)}return!0},t.get_=function(n){return _.trackingDerivation&&!se(this.target_,n)&&this.has_(n),this.target_[n]},t.set_=function(n,a,r){return r===void 0&&(r=!1),se(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,a):r?Reflect.set(this.target_,n,a):(this.target_[n]=a,!0):this.extend_(n,{value:a,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,r)},t.has_=function(n){if(!_.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var a=this.pendingKeys_.get(n);return a||(a=new Ce(n in this.target_,Vt,"ObservableObject.key?",!1),this.pendingKeys_.set(n,a)),a.get()},t.make_=function(n,a){if(a===!0&&(a=this.defaultAnnotation_),a!==!1){if(!(n in this.target_)){var r;if((r=this.target_[Y])!=null&&r[n])return;D(1,a.annotationType_,this.name_+"."+n.toString())}for(var o=this.target_;o&&o!==Lt;){var s=Ot(o,n);if(s){var u=a.make_(this,n,s,o);if(u===0)return;if(u===1)break}o=Object.getPrototypeOf(o)}Xn(this,a,n)}},t.extend_=function(n,a,r,o){if(o===void 0&&(o=!1),r===!0&&(r=this.defaultAnnotation_),r===!1)return this.defineProperty_(n,a,o);var s=r.extend_(this,n,a,o);return s&&Xn(this,r,n),s},t.defineProperty_=function(n,a,r){r===void 0&&(r=!1);try{G();var o=this.delete_(n);if(!o)return o;if(Q(this)){var s=W(this,{object:this.proxy_||this.target_,name:n,type:he,newValue:a.value});if(!s)return null;var u=s.newValue;a.value!==u&&(a=Te({},a,{value:u}))}if(r){if(!Reflect.defineProperty(this.target_,n,a))return!1}else ee(this.target_,n,a);this.notifyPropertyAddition_(n,a.value)}finally{$()}return!0},t.defineObservableProperty_=function(n,a,r,o){o===void 0&&(o=!1);try{G();var s=this.delete_(n);if(!s)return s;if(Q(this)){var u=W(this,{object:this.proxy_||this.target_,name:n,type:he,newValue:a});if(!u)return null;a=u.newValue}var l=Zn(n),d={configurable:_.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:l.get,set:l.set};if(o){if(!Reflect.defineProperty(this.target_,n,d))return!1}else ee(this.target_,n,d);var c=new Ce(a,r,"ObservableObject.key",!1);this.values_.set(n,c),this.notifyPropertyAddition_(n,c.value_)}finally{$()}return!0},t.defineComputedProperty_=function(n,a,r){r===void 0&&(r=!1);try{G();var o=this.delete_(n);if(!o)return o;if(Q(this)){var s=W(this,{object:this.proxy_||this.target_,name:n,type:he,newValue:void 0});if(!s)return null}a.name||(a.name="ObservableObject.key"),a.context=this.proxy_||this.target_;var u=Zn(n),l={configurable:_.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:u.get,set:u.set};if(r){if(!Reflect.defineProperty(this.target_,n,l))return!1}else ee(this.target_,n,l);this.values_.set(n,new He(a)),this.notifyPropertyAddition_(n,void 0)}finally{$()}return!0},t.delete_=function(n,a){if(a===void 0&&(a=!1),!se(this.target_,n))return!0;if(Q(this)){var r=W(this,{object:this.proxy_||this.target_,name:n,type:Hn});if(!r)return null}try{var o,s;G();var u=J(this),l=!1,d=this.values_.get(n),c=void 0;if(!d&&(u||l)){var p;c=(p=Ot(this.target_,n))==null?void 0:p.value}if(a){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(d&&(this.values_.delete(n),d instanceof Ce&&(c=d.value_),ua(d)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(s=o.get(n))==null||s.set(n in this.target_),u||l){var g={type:Hn,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:n};u&&H(this,g)}}finally{$()}return!0},t.observe_=function(n,a){return ft(this,n)},t.intercept_=function(n){return ct(this,n)},t.notifyPropertyAddition_=function(n,a){var r,o,s=J(this),u=!1;if(s||u){var l=s||u?{type:he,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:a}:null;s&&H(this,l)}(r=this.pendingKeys_)==null||(o=r.get(n))==null||o.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),Re(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function mt(e,t){var i;if(se(e,F))return e;var n=(i=t==null?void 0:t.name)!=null?i:"ObservableObject",a=new Aa(e,new Map,String(n),Co(t));return it(e,F,a),e}var _s=Se("ObservableObjectAdministration",Aa);function Zn(e){return Jn[e]||(Jn[e]={get:function(){return this[F].getObservablePropValue_(e)},set:function(i){return this[F].setObservablePropValue_(e,i)}})}function Ye(e){return It(e)?_s(e[F]):!1}function Xn(e,t,i){var n;(n=e.target_[Y])==null||delete n[i]}var bs=Ca(0),tn=0,Fa=function(){};function Ss(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__!==void 0?e.prototype.__proto__=t:e.prototype=t}Ss(Fa,Array.prototype);var Nn=function(e,t,i){Bi(n,e);function n(r,o,s,u){var l;s===void 0&&(s="ObservableArray"),u===void 0&&(u=!1),l=e.call(this)||this;var d=new Sn(s,o,u,!0);if(d.proxy_=Zt(l),ji(Zt(l),F,d),r&&r.length){var c=ut(!0);l.spliceWithArray(0,0,r),lt(c)}return Object.defineProperty(Zt(l),"0",bs),l}var a=n.prototype;return a.concat=function(){this[F].atom_.reportObserved();for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];return Array.prototype.concat.apply(this.slice(),s.map(function(l){return Mt(l)?l.slice():l}))},a[i]=function(){var r=this,o=0;return et({next:function(){return o<r.length?{value:r[o++],done:!1}:{done:!0,value:void 0}}})},pn(n,[{key:"length",get:function(){return this[F].getArrayLength_()},set:function(o){this[F].setArrayLength_(o)}},{key:t,get:function(){return"Array"}}]),n}(Fa,Symbol.toStringTag,Symbol.iterator);Object.entries(Rt).forEach(function(e){var t=e[0],i=e[1];t!=="concat"&&it(Nn.prototype,t,i)});function Ca(e){return{enumerable:!1,configurable:!0,get:function(){return this[F].get_(e)},set:function(i){this[F].set_(e,i)}}}function Ns(e){ee(Nn.prototype,""+e,Ca(e))}function Ra(e){if(e>tn){for(var t=tn;t<e+100;t++)Ns(t);tn=e}}Ra(1e3);function Os(e,t,i){return new Nn(e,t,i)}function _e(e,t){if(typeof e=="object"&&e!==null){if(Mt(e))return t!==void 0&&D(23),e[F].atom_;if(Ue(e))return e.atom_;if(Ne(e)){if(t===void 0)return e.keysAtom_;var i=e.data_.get(t)||e.hasMap_.get(t);return i||D(25,t,ln(e)),i}if(Ye(e)){if(!t)return D(26);var n=e[F].values_.get(t);return n||D(27,t,ln(e)),n}if(gn(e)||Ut(e)||Ft(e))return e}else if(X(e)&&Ft(e[F]))return e[F];D(28)}function Ta(e,t){if(e||D(29),t!==void 0)return Ta(_e(e,t));if(gn(e)||Ut(e)||Ft(e)||Ne(e)||Ue(e))return e;if(e[F])return e[F];D(24,e)}function ln(e,t){var i;if(t!==void 0)i=_e(e,t);else{if(_n(e))return e.name;Ye(e)||Ne(e)||Ue(e)?i=Ta(e):i=_e(e)}return i.name_}var Yn=Lt.toString;function On(e,t,i){return i===void 0&&(i=-1),dn(e,t,i)}function dn(e,t,i,n,a){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var r=typeof e;if(r!=="function"&&r!=="object"&&typeof t!="object")return!1;var o=Yn.call(e);if(o!==Yn.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":i>=0&&i++;break}e=ei(e),t=ei(t);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var u=e.constructor,l=t.constructor;if(u!==l&&!(X(u)&&u instanceof u&&X(l)&&l instanceof l)&&"constructor"in e&&"constructor"in t)return!1}if(i===0)return!1;i<0&&(i=-1),n=n||[],a=a||[];for(var d=n.length;d--;)if(n[d]===e)return a[d]===t;if(n.push(e),a.push(t),s){if(d=e.length,d!==t.length)return!1;for(;d--;)if(!dn(e[d],t[d],i-1,n,a))return!1}else{var c=Object.keys(e),p;if(d=c.length,Object.keys(t).length!==d)return!1;for(;d--;)if(p=c[d],!(se(t,p)&&dn(e[p],t[p],i-1,n,a)))return!1}return n.pop(),a.pop(),!0}function ei(e){return Mt(e)?e.slice():Ve(e)||Ne(e)||at(e)||Ue(e)?Array.from(e.entries()):e}function et(e){return e[Symbol.iterator]=Es,e}function Es(){return this}["Symbol","Map","Set"].forEach(function(e){var t=Di();typeof t[e]=="undefined"&&D("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Qo,extras:{getDebugName:ln},$mobx:F});class ht extends Error{constructor(t,i,n){super(i),this.value=n,this.name=t}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value}}}}class xa extends ht{constructor(t){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${t}' not found.`,t)}}class Da extends ht{constructor(t){var i;super("APP_UNEXPECTED_ERROR",(i=t.message)!=null?i:"An unexpected error occurred.",t)}}class ws extends ht{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class Pa extends ht{constructor(t){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
|
|
4
4
|
Configuration property invalid: "${t}".
|
package/dist/index.mjs
CHANGED
|
@@ -345,7 +345,9 @@ const {
|
|
|
345
345
|
// Nizza CDN
|
|
346
346
|
nizzaCdn: "https://cdn.nizza.com",
|
|
347
347
|
// Bundle
|
|
348
|
-
bundleSite: "https://bundle.nizza.com"
|
|
348
|
+
bundleSite: "https://bundle.nizza.com",
|
|
349
|
+
// WSS IVS CHAT
|
|
350
|
+
wssIVSChat: "wss://edge.ivschat.us-east-1.amazonaws.com"
|
|
349
351
|
}
|
|
350
352
|
};
|
|
351
353
|
async function Ni(e) {
|
package/dist/package.json
CHANGED