crmbonus-component-wake 2.0.117 → 2.0.119

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.
Files changed (55) hide show
  1. package/dist/cjs/{cart.helper-63c75a64.js → cart.helper-09e4daf4.js} +2 -2
  2. package/dist/cjs/{cart.helper-63c75a64.js.map → cart.helper-09e4daf4.js.map} +1 -1
  3. package/dist/cjs/crm-bonus-form.cjs.entry.js +1 -1
  4. package/dist/cjs/crm-bonus-note.cjs.entry.js +2 -2
  5. package/dist/cjs/crm-bonus.cjs.entry.js +4 -4
  6. package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
  7. package/dist/cjs/crm-giftback-form_2.cjs.entry.js +1 -1
  8. package/dist/cjs/{crmbonus.service-566fc43f.js → crmbonus.service-8dff0944.js} +2 -2
  9. package/dist/cjs/{crmbonus.service-566fc43f.js.map → crmbonus.service-8dff0944.js.map} +1 -1
  10. package/dist/cjs/pedido-finalizado.cjs.entry.js +2 -2
  11. package/dist/collection/components/crm-bonus/crm-bonus.js +2 -2
  12. package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
  13. package/dist/components/crm-bonus-form.js +1 -1
  14. package/dist/components/crm-bonus-note.js +1 -1
  15. package/dist/components/crm-bonus.js +5 -5
  16. package/dist/components/crm-bonus.js.map +1 -1
  17. package/dist/components/crm-giftback-form.js +1 -1
  18. package/dist/components/{p-a61d6a12.js → p-06a20bea.js} +2 -2
  19. package/dist/components/{p-a61d6a12.js.map → p-06a20bea.js.map} +1 -1
  20. package/dist/components/{p-c0ce1213.js → p-22dc683b.js} +2 -2
  21. package/dist/components/{p-c0ce1213.js.map → p-22dc683b.js.map} +1 -1
  22. package/dist/components/{p-e9895f08.js → p-2f3e90b8.js} +2 -2
  23. package/dist/components/{p-e9895f08.js.map → p-2f3e90b8.js.map} +1 -1
  24. package/dist/components/pedido-finalizado.js +2 -2
  25. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
  26. package/dist/crmbonus-component-wake/{p-a61d6a12.js → p-06a20bea.js} +2 -2
  27. package/dist/crmbonus-component-wake/{p-e9895f08.js → p-2f3e90b8.js} +2 -2
  28. package/dist/crmbonus-component-wake/{p-e9895f08.js.map → p-2f3e90b8.js.map} +1 -1
  29. package/dist/crmbonus-component-wake/p-4a36599f.entry.js +2 -0
  30. package/dist/crmbonus-component-wake/p-4a36599f.entry.js.map +1 -0
  31. package/dist/crmbonus-component-wake/{p-432e371d.entry.js → p-55eef7f5.entry.js} +2 -2
  32. package/dist/crmbonus-component-wake/{p-a63f44b6.entry.js → p-6f63c678.entry.js} +2 -2
  33. package/dist/crmbonus-component-wake/{p-7e6797e3.entry.js → p-da78db17.entry.js} +2 -2
  34. package/dist/crmbonus-component-wake/{p-571f0bb1.entry.js → p-fd697405.entry.js} +2 -2
  35. package/dist/env.js +1 -1
  36. package/dist/env.js.map +1 -1
  37. package/dist/esm/{cart.helper-69d64e28.js → cart.helper-035a4633.js} +2 -2
  38. package/dist/esm/{cart.helper-69d64e28.js.map → cart.helper-035a4633.js.map} +1 -1
  39. package/dist/esm/crm-bonus-form.entry.js +1 -1
  40. package/dist/esm/crm-bonus-note.entry.js +2 -2
  41. package/dist/esm/crm-bonus.entry.js +4 -4
  42. package/dist/esm/crm-bonus.entry.js.map +1 -1
  43. package/dist/esm/crm-giftback-form_2.entry.js +1 -1
  44. package/dist/esm/{crmbonus.service-ad8702ce.js → crmbonus.service-d99af814.js} +2 -2
  45. package/dist/esm/{crmbonus.service-ad8702ce.js.map → crmbonus.service-d99af814.js.map} +1 -1
  46. package/dist/esm/pedido-finalizado.entry.js +2 -2
  47. package/dist/types/home/darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +1 -1
  48. package/package.json +1 -1
  49. package/dist/crmbonus-component-wake/p-7df4432d.entry.js +0 -2
  50. package/dist/crmbonus-component-wake/p-7df4432d.entry.js.map +0 -1
  51. /package/dist/crmbonus-component-wake/{p-a61d6a12.js.map → p-06a20bea.js.map} +0 -0
  52. /package/dist/crmbonus-component-wake/{p-432e371d.entry.js.map → p-55eef7f5.entry.js.map} +0 -0
  53. /package/dist/crmbonus-component-wake/{p-a63f44b6.entry.js.map → p-6f63c678.entry.js.map} +0 -0
  54. /package/dist/crmbonus-component-wake/{p-7e6797e3.entry.js.map → p-da78db17.entry.js.map} +0 -0
  55. /package/dist/crmbonus-component-wake/{p-571f0bb1.entry.js.map → p-fd697405.entry.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-3e84f78c.js';
2
- import { C as CrmBonusService } from './p-e9895f08.js';
3
- import { C as CartWake, g as getCart } from './p-a61d6a12.js';
2
+ import { C as CrmBonusService } from './p-2f3e90b8.js';
3
+ import { C as CartWake, g as getCart } from './p-06a20bea.js';
4
4
 
5
5
  const Pedido = /*@__PURE__*/ proxyCustomElement(class Pedido extends H {
6
6
  constructor() {
@@ -1,2 +1,2 @@
1
- import{p as e,b as n}from"./p-3d6152b1.js";export{s as setNonce}from"./p-3d6152b1.js";import{g as a}from"./p-e1255160.js";var o=()=>{const n=import.meta.url;const a={};if(n!==""){a.resourcesUrl=new URL(".",n).href}return e(a)};o().then((async e=>{await a();return n([["p-7df4432d",[[2,"crm-bonus",{cart:[8],showModal:[32],cartWake:[32],customer:[32],loading:[32],message:[32],phone:[32],canCancel:[32],amountCancel:[32],sent:[32],session:[32],loading_reprocess:[32],resetBonus:[64],reprocess:[64]}]]],["p-a63f44b6",[[1,"crm-bonus-form",{storeName:[8,"storename"],cartId:[8,"cart-id"],products:[16],customer:[16],sent:[16],stepNext:[2,"step-next"],phone:[2],loadingModal:[4,"loading-modal"],saveStore:[16],cancel:[16],handleCustomerName:[16],loading:[32],step:[32],message:[32],bonus:[32],setStep:[64]}]]],["p-571f0bb1",[[0,"crm-bonus-note",{cart:[8],cartWake:[32],url:[32],config:[32],bonus:[32],showEdit:[32]}]]],["p-74206c91",[[0,"phone-cancel-input",{sendPin:[16],loading:[4],value:[1]}]]],["p-03b77c41",[[0,"phone-input",{sendPin:[16],loading:[4],value:[1]}]]],["p-885fc30e",[[1,"app-modal",{isOpen:[516,"is-open"],modalTitle:[1,"modal-title"]}]]],["p-7e6797e3",[[0,"pedido-finalizado",{cart:[8]}]]],["p-620ec1a3",[[1,"phone-input-mask",{initialValue:[1,"initial-value"],disabled:[4],phone:[32],message:[32],getPhone:[64]}]]],["p-be3ddacc",[[1,"loading-spinner",{size:[1],color:[1]}]]],["p-90716188",[[0,"crm-button",{txtBtn:[1,"txt-btn"],loading:[4],handleClick:[16]}],[1,"countdown-timer",{downtime:[16],initialValue:[2,"initial-value"],seconds:[32]}]]],["p-7b7fb354",[[0,"phone-form",{value:[1],loading:[4],handlerSubmit:[16],config:[16]}],[1,"pin-form",{validate:[16],cancel:[16],resend:[16],sent:[16],loading:[4],phone:[1],config:[16],pin:[32],isVerified:[32],canResend:[32]}],[0,"giftback-info",{loading:[4],bonus:[16],reserve:[16],cancel:[16],config:[16],usedValue:[32],selectedOption:[32],sliderPosition:[32],sliderValuePosition:[32],loadingTime:[32]},null,{bonus:["changedBonus"]}],[0,"crm-tooltip",{text:[1],identity:[1]}]]],["p-432e371d",[[0,"crm-giftback-form",{storeName:[8,"storename"],cartId:[8,"cart-id"],products:[16],customer:[16],loadProducts:[16],value:[32],loading:[32],message:[32],phone:[32],pinInfo:[32],step:[32],bonus:[32],sucess:[32],error:[32],config:[32],hasApplyBonus:[32],setStep:[64],processBonus:[64]}],[4,"loading-container",{loading:[4]}]]],["p-b7a8f915",[[1,"giftback-pin",{sent:[16],validate:[16],cancel:[16],loading:[4],pin:[32],isVerified:[32]}],[1,"giftback-progress",{loading:[4],bonus:[16],reserve:[16],cancel:[16],usedValue:[32]}],[0,"name-input",{value:[1],loading:[4],applyName:[16],cancel:[16],newValue:[32],message:[32]}],[1,"giftback-finish"]]]],e)}));
1
+ import{p as e,b as n}from"./p-3d6152b1.js";export{s as setNonce}from"./p-3d6152b1.js";import{g as a}from"./p-e1255160.js";var o=()=>{const n=import.meta.url;const a={};if(n!==""){a.resourcesUrl=new URL(".",n).href}return e(a)};o().then((async e=>{await a();return n([["p-4a36599f",[[2,"crm-bonus",{cart:[8],showModal:[32],cartWake:[32],customer:[32],loading:[32],message:[32],phone:[32],canCancel:[32],amountCancel:[32],sent:[32],session:[32],loading_reprocess:[32],resetBonus:[64],reprocess:[64]}]]],["p-6f63c678",[[1,"crm-bonus-form",{storeName:[8,"storename"],cartId:[8,"cart-id"],products:[16],customer:[16],sent:[16],stepNext:[2,"step-next"],phone:[2],loadingModal:[4,"loading-modal"],saveStore:[16],cancel:[16],handleCustomerName:[16],loading:[32],step:[32],message:[32],bonus:[32],setStep:[64]}]]],["p-fd697405",[[0,"crm-bonus-note",{cart:[8],cartWake:[32],url:[32],config:[32],bonus:[32],showEdit:[32]}]]],["p-74206c91",[[0,"phone-cancel-input",{sendPin:[16],loading:[4],value:[1]}]]],["p-03b77c41",[[0,"phone-input",{sendPin:[16],loading:[4],value:[1]}]]],["p-885fc30e",[[1,"app-modal",{isOpen:[516,"is-open"],modalTitle:[1,"modal-title"]}]]],["p-da78db17",[[0,"pedido-finalizado",{cart:[8]}]]],["p-620ec1a3",[[1,"phone-input-mask",{initialValue:[1,"initial-value"],disabled:[4],phone:[32],message:[32],getPhone:[64]}]]],["p-be3ddacc",[[1,"loading-spinner",{size:[1],color:[1]}]]],["p-90716188",[[0,"crm-button",{txtBtn:[1,"txt-btn"],loading:[4],handleClick:[16]}],[1,"countdown-timer",{downtime:[16],initialValue:[2,"initial-value"],seconds:[32]}]]],["p-7b7fb354",[[0,"phone-form",{value:[1],loading:[4],handlerSubmit:[16],config:[16]}],[1,"pin-form",{validate:[16],cancel:[16],resend:[16],sent:[16],loading:[4],phone:[1],config:[16],pin:[32],isVerified:[32],canResend:[32]}],[0,"giftback-info",{loading:[4],bonus:[16],reserve:[16],cancel:[16],config:[16],usedValue:[32],selectedOption:[32],sliderPosition:[32],sliderValuePosition:[32],loadingTime:[32]},null,{bonus:["changedBonus"]}],[0,"crm-tooltip",{text:[1],identity:[1]}]]],["p-55eef7f5",[[0,"crm-giftback-form",{storeName:[8,"storename"],cartId:[8,"cart-id"],products:[16],customer:[16],loadProducts:[16],value:[32],loading:[32],message:[32],phone:[32],pinInfo:[32],step:[32],bonus:[32],sucess:[32],error:[32],config:[32],hasApplyBonus:[32],setStep:[64],processBonus:[64]}],[4,"loading-container",{loading:[4]}]]],["p-b7a8f915",[[1,"giftback-pin",{sent:[16],validate:[16],cancel:[16],loading:[4],pin:[32],isVerified:[32]}],[1,"giftback-progress",{loading:[4],bonus:[16],reserve:[16],cancel:[16],usedValue:[32]}],[0,"name-input",{value:[1],loading:[4],applyName:[16],cancel:[16],newValue:[32],message:[32]}],[1,"giftback-finish"]]]],e)}));
2
2
  //# sourceMappingURL=crmbonus-component-wake.esm.js.map
@@ -1,2 +1,2 @@
1
- import{C as t,a as s}from"./p-e9895f08.js";class o{constructor(t){var s;this.products=[];this.id=t.Metadados.id||t.Id;this.middlewareId=(s=t.Metadados)===null||s===void 0?void 0:s.id;this.orderId=t.PedidoId;this.buildUserInfo(t);this.buildStoreInfo(t);this.products=t.Produtos}buildUserInfo(t){this.user={id:t.Usuario?t.Usuario.Id:null}}buildStoreInfo(t){var s;this.store={name:(s=t.Loja)===null||s===void 0?void 0:s.Nome}}}const i=t.getInstance();const n=async()=>{const t=r();console.log("[URL STORE]: ",t);const s=await i.getInfoCart(t);return new o(s)};const r=()=>{const t=window.location.origin;if(t.includes("localhost")){return s}if(t.includes("checkout")){return t}if(t.includes("fbits")){return t}return`${window.location.protocol}//checkout.${window.location.host}`};export{o as C,n as g};
2
- //# sourceMappingURL=p-a61d6a12.js.map
1
+ import{C as t,a as s}from"./p-2f3e90b8.js";class o{constructor(t){var s;this.products=[];this.id=t.Metadados.id||t.Id;this.middlewareId=(s=t.Metadados)===null||s===void 0?void 0:s.id;this.orderId=t.PedidoId;this.buildUserInfo(t);this.buildStoreInfo(t);this.products=t.Produtos}buildUserInfo(t){this.user={id:t.Usuario?t.Usuario.Id:null}}buildStoreInfo(t){var s;this.store={name:(s=t.Loja)===null||s===void 0?void 0:s.Nome}}}const i=t.getInstance();const n=async()=>{const t=r();console.log("[URL STORE]: ",t);const s=await i.getInfoCart(t);return new o(s)};const r=()=>{const t=window.location.origin;if(t.includes("localhost")){return s}if(t.includes("checkout")){return t}if(t.includes("fbits")){return t}return`${window.location.protocol}//checkout.${window.location.host}`};export{o as C,n as g};
2
+ //# sourceMappingURL=p-06a20bea.js.map
@@ -1,2 +1,2 @@
1
- import{U as t,g as e,B as n,a as o}from"./p-f9aeffc1.js";function r(t,e){return function n(){return t.apply(e,arguments)}}const{toString:s}=Object.prototype;const{getPrototypeOf:i}=Object;const c=(t=>e=>{const n=s.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null));const u=t=>{t=t.toLowerCase();return e=>c(e)===t};const a=t=>e=>typeof e===t;const{isArray:l}=Array;const f=a("undefined");function d(t){return t!==null&&!f(t)&&t.constructor!==null&&!f(t.constructor)&&w(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const h=u("ArrayBuffer");function p(t){let e;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){e=ArrayBuffer.isView(t)}else{e=t&&t.buffer&&h(t.buffer)}return e}const m=a("string");const w=a("function");const y=a("number");const b=t=>t!==null&&typeof t==="object";const g=t=>t===true||t===false;const R=t=>{if(c(t)!=="object"){return false}const e=i(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};const O=u("Date");const S=u("File");const E=u("Blob");const T=u("FileList");const A=t=>b(t)&&w(t.pipe);const j=t=>{let e;return t&&(typeof FormData==="function"&&t instanceof FormData||w(t.append)&&((e=c(t))==="formdata"||e==="object"&&w(t.toString)&&t.toString()==="[object FormData]"))};const N=u("URLSearchParams");const[x,v,C,P]=["ReadableStream","Request","Response","Headers"].map(u);const B=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function F(t,e,{allOwnKeys:n=false}={}){if(t===null||typeof t==="undefined"){return}let o;let r;if(typeof t!=="object"){t=[t]}if(l(t)){for(o=0,r=t.length;o<r;o++){e.call(null,t[o],o,t)}}else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t);const s=r.length;let i;for(o=0;o<s;o++){i=r[o];e.call(null,t[i],i,t)}}}function D(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length;let r;while(o-- >0){r=n[o];if(e===r.toLowerCase()){return r}}return null}const U=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const _=t=>!f(t)&&t!==U;function q(){const{caseless:t}=_(this)&&this||{};const e={};const n=(n,o)=>{const r=t&&D(e,o)||o;if(R(e[r])&&R(n)){e[r]=q(e[r],n)}else if(R(n)){e[r]=q({},n)}else if(l(n)){e[r]=n.slice()}else{e[r]=n}};for(let t=0,e=arguments.length;t<e;t++){arguments[t]&&F(arguments[t],n)}return e}const k=(t,e,n,{allOwnKeys:o}={})=>{F(e,((e,o)=>{if(n&&w(e)){t[o]=r(e,n)}else{t[o]=e}}),{allOwnKeys:o});return t};const L=t=>{if(t.charCodeAt(0)===65279){t=t.slice(1)}return t};const I=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o);t.prototype.constructor=t;Object.defineProperty(t,"super",{value:e.prototype});n&&Object.assign(t.prototype,n)};const z=(t,e,n,o)=>{let r;let s;let c;const u={};e=e||{};if(t==null)return e;do{r=Object.getOwnPropertyNames(t);s=r.length;while(s-- >0){c=r[s];if((!o||o(c,t,e))&&!u[c]){e[c]=t[c];u[c]=true}}t=n!==false&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e};const $=(t,e,n)=>{t=String(t);if(n===undefined||n>t.length){n=t.length}n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n};const M=t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!y(e))return null;const n=new Array(e);while(e-- >0){n[e]=t[e]}return n};const H=(t=>e=>t&&e instanceof t)(typeof Uint8Array!=="undefined"&&i(Uint8Array));const J=(t,e)=>{const n=t&&t[Symbol.iterator];const o=n.call(t);let r;while((r=o.next())&&!r.done){const n=r.value;e.call(t,n[0],n[1])}};const K=(t,e)=>{let n;const o=[];while((n=t.exec(e))!==null){o.push(n)}return o};const V=u("HTMLFormElement");const W=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function t(e,n,o){return n.toUpperCase()+o}));const G=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype);const X=u("RegExp");const Y=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t);const o={};F(n,((n,r)=>{let s;if((s=e(n,r,t))!==false){o[r]=s||n}}));Object.defineProperties(t,o)};const Z=t=>{Y(t,((e,n)=>{if(w(t)&&["arguments","caller","callee"].indexOf(n)!==-1){return false}const o=t[n];if(!w(o))return;e.enumerable=false;if("writable"in e){e.writable=false;return}if(!e.set){e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}}}))};const Q=(t,e)=>{const n={};const o=t=>{t.forEach((t=>{n[t]=true}))};l(t)?o(t):o(String(t).split(e));return n};const tt=()=>{};const et=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;const nt="abcdefghijklmnopqrstuvwxyz";const ot="0123456789";const rt={DIGIT:ot,ALPHA:nt,ALPHA_DIGIT:nt+nt.toUpperCase()+ot};const st=(t=16,e=rt.ALPHA_DIGIT)=>{let n="";const{length:o}=e;while(t--){n+=e[Math.random()*o|0]}return n};function it(t){return!!(t&&w(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const ct=t=>{const e=new Array(10);const n=(t,o)=>{if(b(t)){if(e.indexOf(t)>=0){return}if(!("toJSON"in t)){e[o]=t;const r=l(t)?[]:{};F(t,((t,e)=>{const s=n(t,o+1);!f(s)&&(r[e]=s)}));e[o]=undefined;return r}}return t};return n(t,0)};const ut=u("AsyncFunction");const at=t=>t&&(b(t)||w(t))&&w(t.then)&&w(t.catch);const lt=((t,e)=>{if(t){return setImmediate}return e?((t,e)=>{U.addEventListener("message",(({source:n,data:o})=>{if(n===U&&o===t){e.length&&e.shift()()}}),false);return n=>{e.push(n);U.postMessage(t,"*")}})(`axios@${Math.random()}`,[]):t=>setTimeout(t)})(typeof setImmediate==="function",w(U.postMessage));const ft=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(U):typeof process!=="undefined"&&process.nextTick||lt;const dt={isArray:l,isArrayBuffer:h,isBuffer:d,isFormData:j,isArrayBufferView:p,isString:m,isNumber:y,isBoolean:g,isObject:b,isPlainObject:R,isReadableStream:x,isRequest:v,isResponse:C,isHeaders:P,isUndefined:f,isDate:O,isFile:S,isBlob:E,isRegExp:X,isFunction:w,isStream:A,isURLSearchParams:N,isTypedArray:H,isFileList:T,forEach:F,merge:q,extend:k,trim:B,stripBOM:L,inherits:I,toFlatObject:z,kindOf:c,kindOfTest:u,endsWith:$,toArray:M,forEachEntry:J,matchAll:K,isHTMLForm:V,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:Y,freezeMethods:Z,toObjectSet:Q,toCamelCase:W,noop:tt,toFiniteNumber:et,findKey:D,global:U,isContextDefined:_,ALPHABET:rt,generateString:st,isSpecCompliantForm:it,toJSONObject:ct,isAsyncFn:ut,isThenable:at,setImmediate:lt,asap:ft};function ht(t,e,n,o,r){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=t;this.name="AxiosError";e&&(this.code=e);n&&(this.config=n);o&&(this.request=o);if(r){this.response=r;this.status=r.status?r.status:null}}dt.inherits(ht,Error,{toJSON:function t(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:dt.toJSONObject(this.config),code:this.code,status:this.status}}});const pt=ht.prototype;const mt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{mt[t]={value:t}}));Object.defineProperties(ht,mt);Object.defineProperty(pt,"isAxiosError",{value:true});ht.from=(t,e,n,o,r,s)=>{const i=Object.create(pt);dt.toFlatObject(t,i,(function t(e){return e!==Error.prototype}),(t=>t!=="isAxiosError"));ht.call(i,t.message,e,n,o,r);i.cause=t;i.name=t.name;s&&Object.assign(i,s);return i};const wt=null;function yt(t){return dt.isPlainObject(t)||dt.isArray(t)}function bt(t){return dt.endsWith(t,"[]")?t.slice(0,-2):t}function gt(t,e,n){if(!t)return e;return t.concat(e).map((function t(e,o){e=bt(e);return!n&&o?"["+e+"]":e})).join(n?".":"")}function Rt(t){return dt.isArray(t)&&!t.some(yt)}const Ot=dt.toFlatObject(dt,{},null,(function t(e){return/^is[A-Z]/.test(e)}));function St(t,e,n){if(!dt.isObject(t)){throw new TypeError("target must be an object")}e=e||new FormData;n=dt.toFlatObject(n,{metaTokens:true,dots:false,indexes:false},false,(function t(e,n){return!dt.isUndefined(n[e])}));const o=n.metaTokens;const r=n.visitor||l;const s=n.dots;const i=n.indexes;const c=n.Blob||typeof Blob!=="undefined"&&Blob;const u=c&&dt.isSpecCompliantForm(e);if(!dt.isFunction(r)){throw new TypeError("visitor must be a function")}function a(t){if(t===null)return"";if(dt.isDate(t)){return t.toISOString()}if(!u&&dt.isBlob(t)){throw new ht("Blob is not supported. Use a Buffer instead.")}if(dt.isArrayBuffer(t)||dt.isTypedArray(t)){return u&&typeof Blob==="function"?new Blob([t]):Buffer.from(t)}return t}function l(t,n,r){let c=t;if(t&&!r&&typeof t==="object"){if(dt.endsWith(n,"{}")){n=o?n:n.slice(0,-2);t=JSON.stringify(t)}else if(dt.isArray(t)&&Rt(t)||(dt.isFileList(t)||dt.endsWith(n,"[]"))&&(c=dt.toArray(t))){n=bt(n);c.forEach((function t(o,r){!(dt.isUndefined(o)||o===null)&&e.append(i===true?gt([n],r,s):i===null?n:n+"[]",a(o))}));return false}}if(yt(t)){return true}e.append(gt(r,n,s),a(t));return false}const f=[];const d=Object.assign(Ot,{defaultVisitor:l,convertValue:a,isVisitable:yt});function h(t,n){if(dt.isUndefined(t))return;if(f.indexOf(t)!==-1){throw Error("Circular reference detected in "+n.join("."))}f.push(t);dt.forEach(t,(function t(o,s){const i=!(dt.isUndefined(o)||o===null)&&r.call(e,o,dt.isString(s)?s.trim():s,n,d);if(i===true){h(o,n?n.concat(s):[s])}}));f.pop()}if(!dt.isObject(t)){throw new TypeError("data must be an object")}h(t);return e}function Et(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function t(n){return e[n]}))}function Tt(t,e){this._pairs=[];t&&St(t,this,e)}const At=Tt.prototype;At.append=function t(e,n){this._pairs.push([e,n])};At.toString=function t(e){const n=e?function(t){return e.call(this,t,Et)}:Et;return this._pairs.map((function t(e){return n(e[0])+"="+n(e[1])}),"").join("&")};function jt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Nt(t,e,n){if(!e){return t}const o=n&&n.encode||jt;const r=n&&n.serialize;let s;if(r){s=r(e,n)}else{s=dt.isURLSearchParams(e)?e.toString():new Tt(e,n).toString(o)}if(s){const e=t.indexOf("#");if(e!==-1){t=t.slice(0,e)}t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class xt{constructor(){this.handlers=[]}use(t,e,n){this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(t){if(this.handlers[t]){this.handlers[t]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(t){dt.forEach(this.handlers,(function e(n){if(n!==null){t(n)}}))}}const vt=xt;const Ct={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};const Pt=typeof URLSearchParams!=="undefined"?URLSearchParams:Tt;const Bt=typeof FormData!=="undefined"?FormData:null;const Ft=typeof Blob!=="undefined"?Blob:null;const Dt={isBrowser:true,classes:{URLSearchParams:Pt,FormData:Bt,Blob:Ft},protocols:["http","https","file","blob","url","data"]};const Ut=typeof window!=="undefined"&&typeof document!=="undefined";const _t=typeof navigator==="object"&&navigator||undefined;const qt=Ut&&(!_t||["ReactNative","NativeScript","NS"].indexOf(_t.product)<0);const kt=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const Lt=Ut&&window.location.href||"http://localhost";const It=Object.freeze({__proto__:null,hasBrowserEnv:Ut,hasStandardBrowserWebWorkerEnv:kt,hasStandardBrowserEnv:qt,navigator:_t,origin:Lt});const zt={...It,...Dt};function $t(t,e){return St(t,new zt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,o){if(zt.isNode&&dt.isBuffer(t)){this.append(e,t.toString("base64"));return false}return o.defaultVisitor.apply(this,arguments)}},e))}function Mt(t){return dt.matchAll(/\w+|\[(\w*)]/g,t).map((t=>t[0]==="[]"?"":t[1]||t[0]))}function Ht(t){const e={};const n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++){s=n[o];e[s]=t[s]}return e}function Jt(t){function e(t,n,o,r){let s=t[r++];if(s==="__proto__")return true;const i=Number.isFinite(+s);const c=r>=t.length;s=!s&&dt.isArray(o)?o.length:s;if(c){if(dt.hasOwnProp(o,s)){o[s]=[o[s],n]}else{o[s]=n}return!i}if(!o[s]||!dt.isObject(o[s])){o[s]=[]}const u=e(t,n,o[s],r);if(u&&dt.isArray(o[s])){o[s]=Ht(o[s])}return!i}if(dt.isFormData(t)&&dt.isFunction(t.entries)){const n={};dt.forEachEntry(t,((t,o)=>{e(Mt(t),o,n,0)}));return n}return null}function Kt(t,e,n){if(dt.isString(t)){try{(e||JSON.parse)(t);return dt.trim(t)}catch(t){if(t.name!=="SyntaxError"){throw t}}}return(n||JSON.stringify)(t)}const Vt={transitional:Ct,adapter:["xhr","http","fetch"],transformRequest:[function t(e,n){const o=n.getContentType()||"";const r=o.indexOf("application/json")>-1;const s=dt.isObject(e);if(s&&dt.isHTMLForm(e)){e=new FormData(e)}const i=dt.isFormData(e);if(i){return r?JSON.stringify(Jt(e)):e}if(dt.isArrayBuffer(e)||dt.isBuffer(e)||dt.isStream(e)||dt.isFile(e)||dt.isBlob(e)||dt.isReadableStream(e)){return e}if(dt.isArrayBufferView(e)){return e.buffer}if(dt.isURLSearchParams(e)){n.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return e.toString()}let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1){return $t(e,this.formSerializer).toString()}if((c=dt.isFileList(e))||o.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return St(c?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(s||r){n.setContentType("application/json",false);return Kt(e)}return e}],transformResponse:[function t(e){const n=this.transitional||Vt.transitional;const o=n&&n.forcedJSONParsing;const r=this.responseType==="json";if(dt.isResponse(e)||dt.isReadableStream(e)){return e}if(e&&dt.isString(e)&&(o&&!this.responseType||r)){const t=n&&n.silentJSONParsing;const o=!t&&r;try{return JSON.parse(e)}catch(t){if(o){if(t.name==="SyntaxError"){throw ht.from(t,ht.ERR_BAD_RESPONSE,this,null,this.response)}throw t}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zt.classes.FormData,Blob:zt.classes.Blob},validateStatus:function t(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};dt.forEach(["delete","get","head","post","put","patch"],(t=>{Vt.headers[t]={}}));const Wt=Vt;const Gt=dt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Xt=t=>{const e={};let n;let o;let r;t&&t.split("\n").forEach((function t(s){r=s.indexOf(":");n=s.substring(0,r).trim().toLowerCase();o=s.substring(r+1).trim();if(!n||e[n]&&Gt[n]){return}if(n==="set-cookie"){if(e[n]){e[n].push(o)}else{e[n]=[o]}}else{e[n]=e[n]?e[n]+", "+o:o}}));return e};const Yt=Symbol("internals");function Zt(t){return t&&String(t).trim().toLowerCase()}function Qt(t){if(t===false||t==null){return t}return dt.isArray(t)?t.map(Qt):String(t)}function te(t){const e=Object.create(null);const n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;while(o=n.exec(t)){e[o[1]]=o[2]}return e}const ee=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ne(t,e,n,o,r){if(dt.isFunction(o)){return o.call(this,e,n)}if(r){e=n}if(!dt.isString(e))return;if(dt.isString(o)){return e.indexOf(o)!==-1}if(dt.isRegExp(o)){return o.test(e)}}function oe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function re(t,e){const n=dt.toCamelCase(" "+e);["get","set","has"].forEach((o=>{Object.defineProperty(t,o+n,{value:function(t,n,r){return this[o].call(this,e,t,n,r)},configurable:true})}))}class se{constructor(t){t&&this.set(t)}set(t,e,n){const o=this;function r(t,e,n){const r=Zt(e);if(!r){throw new Error("header name must be a non-empty string")}const s=dt.findKey(o,r);if(!s||o[s]===undefined||n===true||n===undefined&&o[s]!==false){o[s||e]=Qt(t)}}const s=(t,e)=>dt.forEach(t,((t,n)=>r(t,n,e)));if(dt.isPlainObject(t)||t instanceof this.constructor){s(t,e)}else if(dt.isString(t)&&(t=t.trim())&&!ee(t)){s(Xt(t),e)}else if(dt.isHeaders(t)){for(const[e,o]of t.entries()){r(o,e,n)}}else{t!=null&&r(e,t,n)}return this}get(t,e){t=Zt(t);if(t){const n=dt.findKey(this,t);if(n){const t=this[n];if(!e){return t}if(e===true){return te(t)}if(dt.isFunction(e)){return e.call(this,t,n)}if(dt.isRegExp(e)){return e.exec(t)}throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){t=Zt(t);if(t){const n=dt.findKey(this,t);return!!(n&&this[n]!==undefined&&(!e||ne(this,this[n],n,e)))}return false}delete(t,e){const n=this;let o=false;function r(t){t=Zt(t);if(t){const r=dt.findKey(n,t);if(r&&(!e||ne(n,n[r],r,e))){delete n[r];o=true}}}if(dt.isArray(t)){t.forEach(r)}else{r(t)}return o}clear(t){const e=Object.keys(this);let n=e.length;let o=false;while(n--){const r=e[n];if(!t||ne(this,this[r],r,t,true)){delete this[r];o=true}}return o}normalize(t){const e=this;const n={};dt.forEach(this,((o,r)=>{const s=dt.findKey(n,r);if(s){e[s]=Qt(o);delete e[r];return}const i=t?oe(r):String(r).trim();if(i!==r){delete e[r]}e[i]=Qt(o);n[i]=true}));return this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);dt.forEach(this,((n,o)=>{n!=null&&n!==false&&(e[o]=t&&dt.isArray(n)?n.join(", "):n)}));return e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);e.forEach((t=>n.set(t)));return n}static accessor(t){const e=this[Yt]=this[Yt]={accessors:{}};const n=e.accessors;const o=this.prototype;function r(t){const e=Zt(t);if(!n[e]){re(o,t);n[e]=true}}dt.isArray(t)?t.forEach(r):r(t);return this}}se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);dt.reduceDescriptors(se.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}));dt.freezeMethods(se);const ie=se;function ce(t,e){const n=this||Wt;const o=e||n;const r=ie.from(o.headers);let s=o.data;dt.forEach(t,(function t(o){s=o.call(n,s,r.normalize(),e?e.status:undefined)}));r.normalize();return s}function ue(t){return!!(t&&t.__CANCEL__)}function ae(t,e,n){ht.call(this,t==null?"canceled":t,ht.ERR_CANCELED,e,n);this.name="CanceledError"}dt.inherits(ae,ht,{__CANCEL__:true});function le(t,e,n){const o=n.config.validateStatus;if(!n.status||!o||o(n.status)){t(n)}else{e(new ht("Request failed with status code "+n.status,[ht.ERR_BAD_REQUEST,ht.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}}function fe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function de(t,e){t=t||10;const n=new Array(t);const o=new Array(t);let r=0;let s=0;let i;e=e!==undefined?e:1e3;return function c(u){const a=Date.now();const l=o[s];if(!i){i=a}n[r]=u;o[r]=a;let f=s;let d=0;while(f!==r){d+=n[f++];f=f%t}r=(r+1)%t;if(r===s){s=(s+1)%t}if(a-i<e){return}const h=l&&a-l;return h?Math.round(d*1e3/h):undefined}}function he(t,e){let n=0;let o=1e3/e;let r;let s;const i=(e,o=Date.now())=>{n=o;r=null;if(s){clearTimeout(s);s=null}t.apply(null,e)};const c=(...t)=>{const e=Date.now();const c=e-n;if(c>=o){i(t,e)}else{r=t;if(!s){s=setTimeout((()=>{s=null;i(r)}),o-c)}}};const u=()=>r&&i(r);return[c,u]}const pe=(t,e,n=3)=>{let o=0;const r=de(50,250);return he((n=>{const s=n.loaded;const i=n.lengthComputable?n.total:undefined;const c=s-o;const u=r(c);const a=s<=i;o=s;const l={loaded:s,total:i,progress:i?s/i:undefined,bytes:c,rate:u?u:undefined,estimated:u&&i&&a?(i-s)/u:undefined,event:n,lengthComputable:i!=null,[e?"download":"upload"]:true};t(l)}),n)};const me=(t,e)=>{const n=t!=null;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]};const we=t=>(...e)=>dt.asap((()=>t(...e)));const ye=zt.hasStandardBrowserEnv?function t(){const e=zt.navigator&&/(msie|trident)/i.test(zt.navigator.userAgent);const n=document.createElement("a");let o;function r(t){let o=t;if(e){n.setAttribute("href",o);o=n.href}n.setAttribute("href",o);return{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}o=r(window.location.href);return function t(e){const n=dt.isString(e)?r(e):e;return n.protocol===o.protocol&&n.host===o.host}}():function t(){return function t(){return true}}();const be=zt.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const i=[t+"="+encodeURIComponent(e)];dt.isNumber(n)&&i.push("expires="+new Date(n).toGMTString());dt.isString(o)&&i.push("path="+o);dt.isString(r)&&i.push("domain="+r);s===true&&i.push("secure");document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ge(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Re(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Oe(t,e){if(t&&!ge(e)){return Re(t,e)}return e}const Se=t=>t instanceof ie?{...t}:t;function Ee(t,e){e=e||{};const n={};function o(t,e,n){if(dt.isPlainObject(t)&&dt.isPlainObject(e)){return dt.merge.call({caseless:n},t,e)}else if(dt.isPlainObject(e)){return dt.merge({},e)}else if(dt.isArray(e)){return e.slice()}return e}function r(t,e,n){if(!dt.isUndefined(e)){return o(t,e,n)}else if(!dt.isUndefined(t)){return o(undefined,t,n)}}function s(t,e){if(!dt.isUndefined(e)){return o(undefined,e)}}function i(t,e){if(!dt.isUndefined(e)){return o(undefined,e)}else if(!dt.isUndefined(t)){return o(undefined,t)}}function c(n,r,s){if(s in e){return o(n,r)}else if(s in t){return o(undefined,n)}}const u={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(t,e)=>r(Se(t),Se(e),true)};dt.forEach(Object.keys(Object.assign({},t,e)),(function o(s){const i=u[s]||r;const a=i(t[s],e[s],s);dt.isUndefined(a)&&i!==c||(n[s]=a)}));return n}const Te=t=>{const e=Ee({},t);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:c}=e;e.headers=i=ie.from(i);e.url=Nt(Oe(e.baseURL,e.url),t.params,t.paramsSerializer);if(c){i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")))}let u;if(dt.isFormData(n)){if(zt.hasStandardBrowserEnv||zt.hasStandardBrowserWebWorkerEnv){i.setContentType(undefined)}else if((u=i.getContentType())!==false){const[t,...e]=u?u.split(";").map((t=>t.trim())).filter(Boolean):[];i.setContentType([t||"multipart/form-data",...e].join("; "))}}if(zt.hasStandardBrowserEnv){o&&dt.isFunction(o)&&(o=o(e));if(o||o!==false&&ye(e.url)){const t=r&&s&&be.read(s);if(t){i.set(r,t)}}}return e};const Ae=typeof XMLHttpRequest!=="undefined";const je=Ae&&function(t){return new Promise((function e(n,o){const r=Te(t);let s=r.data;const i=ie.from(r.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:a}=r;let l;let f,d;let h,p;function m(){h&&h();p&&p();r.cancelToken&&r.cancelToken.unsubscribe(l);r.signal&&r.signal.removeEventListener("abort",l)}let w=new XMLHttpRequest;w.open(r.method.toUpperCase(),r.url,true);w.timeout=r.timeout;function y(){if(!w){return}const e=ie.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders());const r=!c||c==="text"||c==="json"?w.responseText:w.response;const s={data:r,status:w.status,statusText:w.statusText,headers:e,config:t,request:w};le((function t(e){n(e);m()}),(function t(e){o(e);m()}),s);w=null}if("onloadend"in w){w.onloadend=y}else{w.onreadystatechange=function t(){if(!w||w.readyState!==4){return}if(w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)){return}setTimeout(y)}}w.onabort=function e(){if(!w){return}o(new ht("Request aborted",ht.ECONNABORTED,t,w));w=null};w.onerror=function e(){o(new ht("Network Error",ht.ERR_NETWORK,t,w));w=null};w.ontimeout=function e(){let n=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||Ct;if(r.timeoutErrorMessage){n=r.timeoutErrorMessage}o(new ht(n,s.clarifyTimeoutError?ht.ETIMEDOUT:ht.ECONNABORTED,t,w));w=null};s===undefined&&i.setContentType(null);if("setRequestHeader"in w){dt.forEach(i.toJSON(),(function t(e,n){w.setRequestHeader(n,e)}))}if(!dt.isUndefined(r.withCredentials)){w.withCredentials=!!r.withCredentials}if(c&&c!=="json"){w.responseType=r.responseType}if(a){[d,p]=pe(a,true);w.addEventListener("progress",d)}if(u&&w.upload){[f,h]=pe(u);w.upload.addEventListener("progress",f);w.upload.addEventListener("loadend",h)}if(r.cancelToken||r.signal){l=e=>{if(!w){return}o(!e||e.type?new ae(null,t,w):e);w.abort();w=null};r.cancelToken&&r.cancelToken.subscribe(l);if(r.signal){r.signal.aborted?l():r.signal.addEventListener("abort",l)}}const b=fe(r.url);if(b&&zt.protocols.indexOf(b)===-1){o(new ht("Unsupported protocol "+b+":",ht.ERR_BAD_REQUEST,t));return}w.send(s||null)}))};const Ne=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n=new AbortController;let o;const r=function(t){if(!o){o=true;i();const e=t instanceof Error?t:this.reason;n.abort(e instanceof ht?e:new ae(e instanceof Error?e.message:e))}};let s=e&&setTimeout((()=>{s=null;r(new ht(`timeout ${e} of ms exceeded`,ht.ETIMEDOUT))}),e);const i=()=>{if(t){s&&clearTimeout(s);s=null;t.forEach((t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)}));t=null}};t.forEach((t=>t.addEventListener("abort",r)));const{signal:c}=n;c.unsubscribe=()=>dt.asap(i);return c}};const xe=Ne;const ve=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let o=0;let r;while(o<n){r=o+e;yield t.slice(o,r);o=r}};const Ce=async function*(t,e){for await(const n of Pe(t)){yield*ve(n,e)}};const Pe=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t){break}yield n}}finally{await e.cancel()}};const Be=(t,e,n,o)=>{const r=Ce(t,e);let s=0;let i;let c=t=>{if(!i){i=true;o&&o(t)}};return new ReadableStream({async pull(t){try{const{done:e,value:o}=await r.next();if(e){c();t.close();return}let i=o.byteLength;if(n){let t=s+=i;n(t)}t.enqueue(new Uint8Array(o))}catch(t){c(t);throw t}},cancel(t){c(t);return r.return()}},{highWaterMark:2})};const Fe=typeof fetch==="function"&&typeof Request==="function"&&typeof Response==="function";const De=Fe&&typeof ReadableStream==="function";const Ue=Fe&&(typeof TextEncoder==="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer()));const _e=(t,...e)=>{try{return!!t(...e)}catch(t){return false}};const qe=De&&_e((()=>{let t=false;const e=new Request(zt.origin,{body:new ReadableStream,method:"POST",get duplex(){t=true;return"half"}}).headers.has("Content-Type");return t&&!e}));const ke=64*1024;const Le=De&&_e((()=>dt.isReadableStream(new Response("").body)));const Ie={stream:Le&&(t=>t.body)};Fe&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ie[e]&&(Ie[e]=dt.isFunction(t[e])?t=>t[e]():(t,n)=>{throw new ht(`Response type '${e}' is not supported`,ht.ERR_NOT_SUPPORT,n)})}))})(new Response);const ze=async t=>{if(t==null){return 0}if(dt.isBlob(t)){return t.size}if(dt.isSpecCompliantForm(t)){const e=new Request(zt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}if(dt.isArrayBufferView(t)||dt.isArrayBuffer(t)){return t.byteLength}if(dt.isURLSearchParams(t)){t=t+""}if(dt.isString(t)){return(await Ue(t)).byteLength}};const $e=async(t,e)=>{const n=dt.toFiniteNumber(t.getContentLength());return n==null?ze(e):n};const Me=Fe&&(async t=>{let{url:e,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:u,responseType:a,headers:l,withCredentials:f="same-origin",fetchOptions:d}=Te(t);a=a?(a+"").toLowerCase():"text";let h=xe([r,s&&s.toAbortSignal()],i);let p;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let w;try{if(u&&qe&&n!=="get"&&n!=="head"&&(w=await $e(l,o))!==0){let t=new Request(e,{method:"POST",body:o,duplex:"half"});let n;if(dt.isFormData(o)&&(n=t.headers.get("content-type"))){l.setContentType(n)}if(t.body){const[e,n]=me(w,pe(we(u)));o=Be(t.body,ke,e,n)}}if(!dt.isString(f)){f=f?"include":"omit"}const r="credentials"in Request.prototype;p=new Request(e,{...d,signal:h,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:o,duplex:"half",credentials:r?f:undefined});let s=await fetch(p);const i=Le&&(a==="stream"||a==="response");if(Le&&(c||i&&m)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=s[e]}));const e=dt.toFiniteNumber(s.headers.get("content-length"));const[n,o]=c&&me(e,pe(we(c),true))||[];s=new Response(Be(s.body,ke,n,(()=>{o&&o();m&&m()})),t)}a=a||"text";let y=await Ie[dt.findKey(Ie,a)||"text"](s,t);!i&&m&&m();return await new Promise(((e,n)=>{le(e,n,{data:y,headers:ie.from(s.headers),status:s.status,statusText:s.statusText,config:t,request:p})}))}catch(e){m&&m();if(e&&e.name==="TypeError"&&/fetch/i.test(e.message)){throw Object.assign(new ht("Network Error",ht.ERR_NETWORK,t,p),{cause:e.cause||e})}throw ht.from(e,e&&e.code,t,p)}});const He={http:wt,xhr:je,fetch:Me};dt.forEach(He,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Je=t=>`- ${t}`;const Ke=t=>dt.isFunction(t)||t===null||t===false;const Ve={getAdapter:t=>{t=dt.isArray(t)?t:[t];const{length:e}=t;let n;let o;const r={};for(let s=0;s<e;s++){n=t[s];let e;o=n;if(!Ke(n)){o=He[(e=String(n)).toLowerCase()];if(o===undefined){throw new ht(`Unknown adapter '${e}'`)}}if(o){break}r[e||"#"+s]=o}if(!o){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(e===false?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(Je).join("\n"):" "+Je(t[0]):"as no adapter specified";throw new ht(`There is no suitable adapter to dispatch the request `+n,"ERR_NOT_SUPPORT")}return o},adapters:He};function We(t){if(t.cancelToken){t.cancelToken.throwIfRequested()}if(t.signal&&t.signal.aborted){throw new ae(null,t)}}function Ge(t){We(t);t.headers=ie.from(t.headers);t.data=ce.call(t,t.transformRequest);if(["post","put","patch"].indexOf(t.method)!==-1){t.headers.setContentType("application/x-www-form-urlencoded",false)}const e=Ve.getAdapter(t.adapter||Wt.adapter);return e(t).then((function e(n){We(t);n.data=ce.call(t,t.transformResponse,n);n.headers=ie.from(n.headers);return n}),(function e(n){if(!ue(n)){We(t);if(n&&n.response){n.response.data=ce.call(t,t.transformResponse,n.response);n.response.headers=ie.from(n.response.headers)}}return Promise.reject(n)}))}const Xe="1.7.7";const Ye={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Ye[t]=function n(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}}));const Ze={};Ye.transitional=function t(e,n,o){function r(t,e){return"[Axios v"+Xe+"] Transitional option '"+t+"'"+e+(o?". "+o:"")}return(t,o,s)=>{if(e===false){throw new ht(r(o," has been removed"+(n?" in "+n:"")),ht.ERR_DEPRECATED)}if(n&&!Ze[o]){Ze[o]=true;console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))}return e?e(t,o,s):true}};function Qe(t,e,n){if(typeof t!=="object"){throw new ht("options must be an object",ht.ERR_BAD_OPTION_VALUE)}const o=Object.keys(t);let r=o.length;while(r-- >0){const s=o[r];const i=e[s];if(i){const e=t[s];const n=e===undefined||i(e,s,t);if(n!==true){throw new ht("option "+s+" must be "+n,ht.ERR_BAD_OPTION_VALUE)}continue}if(n!==true){throw new ht("Unknown option "+s,ht.ERR_BAD_OPTION)}}}const tn={assertOptions:Qe,validators:Ye};const en=tn.validators;class nn{constructor(t){this.defaults=t;this.interceptors={request:new vt,response:new vt}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{if(!t.stack){t.stack=n}else if(n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))){t.stack+="\n"+n}}catch(t){}}throw t}}_request(t,e){if(typeof t==="string"){e=e||{};e.url=t}else{e=t||{}}e=Ee(this.defaults,e);const{transitional:n,paramsSerializer:o,headers:r}=e;if(n!==undefined){tn.assertOptions(n,{silentJSONParsing:en.transitional(en.boolean),forcedJSONParsing:en.transitional(en.boolean),clarifyTimeoutError:en.transitional(en.boolean)},false)}if(o!=null){if(dt.isFunction(o)){e.paramsSerializer={serialize:o}}else{tn.assertOptions(o,{encode:en.function,serialize:en.function},true)}}e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=r&&dt.merge(r.common,r[e.method]);r&&dt.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]}));e.headers=ie.concat(s,r);const i=[];let c=true;this.interceptors.request.forEach((function t(n){if(typeof n.runWhen==="function"&&n.runWhen(e)===false){return}c=c&&n.synchronous;i.unshift(n.fulfilled,n.rejected)}));const u=[];this.interceptors.response.forEach((function t(e){u.push(e.fulfilled,e.rejected)}));let a;let l=0;let f;if(!c){const t=[Ge.bind(this),undefined];t.unshift.apply(t,i);t.push.apply(t,u);f=t.length;a=Promise.resolve(e);while(l<f){a=a.then(t[l++],t[l++])}return a}f=i.length;let d=e;l=0;while(l<f){const t=i[l++];const e=i[l++];try{d=t(d)}catch(t){e.call(this,t);break}}try{a=Ge.call(this,d)}catch(t){return Promise.reject(t)}l=0;f=u.length;while(l<f){a=a.then(u[l++],u[l++])}return a}getUri(t){t=Ee(this.defaults,t);const e=Oe(t.baseURL,t.url);return Nt(e,t.params,t.paramsSerializer)}}dt.forEach(["delete","get","head","options"],(function t(e){nn.prototype[e]=function(t,n){return this.request(Ee(n||{},{method:e,url:t,data:(n||{}).data}))}}));dt.forEach(["post","put","patch"],(function t(e){function n(t){return function n(o,r,s){return this.request(Ee(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}nn.prototype[e]=n();nn.prototype[e+"Form"]=n(true)}));const on=nn;class rn{constructor(t){if(typeof t!=="function"){throw new TypeError("executor must be a function.")}let e;this.promise=new Promise((function t(n){e=n}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;while(e-- >0){n._listeners[e](t)}n._listeners=null}));this.promise.then=t=>{let e;const o=new Promise((t=>{n.subscribe(t);e=t})).then(t);o.cancel=function t(){n.unsubscribe(e)};return o};t((function t(o,r,s){if(n.reason){return}n.reason=new ae(o,r,s);e(n.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}}unsubscribe(t){if(!this._listeners){return}const e=this._listeners.indexOf(t);if(e!==-1){this._listeners.splice(e,1)}}toAbortSignal(){const t=new AbortController;const e=e=>{t.abort(e)};this.subscribe(e);t.signal.unsubscribe=()=>this.unsubscribe(e);return t.signal}static source(){let t;const e=new rn((function e(n){t=n}));return{token:e,cancel:t}}}const sn=rn;function cn(t){return function e(n){return t.apply(null,n)}}function un(t){return dt.isObject(t)&&t.isAxiosError===true}const an={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(an).forEach((([t,e])=>{an[e]=t}));const ln=an;function fn(t){const e=new on(t);const n=r(on.prototype.request,e);dt.extend(n,on.prototype,e,{allOwnKeys:true});dt.extend(n,e,null,{allOwnKeys:true});n.create=function e(n){return fn(Ee(t,n))};return n}const dn=fn(Wt);dn.Axios=on;dn.CanceledError=ae;dn.CancelToken=sn;dn.isCancel=ue;dn.VERSION=Xe;dn.toFormData=St;dn.AxiosError=ht;dn.Cancel=dn.CanceledError;dn.all=function t(e){return Promise.all(e)};dn.spread=cn;dn.isAxiosError=un;dn.mergeConfig=Ee;dn.AxiosHeaders=ie;dn.formToJSON=t=>Jt(dt.isHTMLForm(t)?new FormData(t):t);dn.getAdapter=Ve.getAdapter;dn.HttpStatusCode=ln;dn.default=dn;const hn=dn;const pn="http://localhost:4000/api";const mn="http://localhost:3001";class wn{constructor(){this.axiosInstance=hn.create({baseURL:pn,headers:{"Content-Type":"application/json",accept:"application/json"}})}static getInstance(){if(this._instance){return this._instance}this._instance=new wn;return this._instance}async getCustomer(t,e){var n,o;const r={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const s=await this.axiosInstance.get(`/store/${e}/customer/${t}`,{headers:r});this.token=(n=s===null||s===void 0?void 0:s.data)===null||n===void 0?void 0:n.token;return(o=s===null||s===void 0?void 0:s.data)===null||o===void 0?void 0:o.customer}async updateOrder(n){const o=localStorage.getItem("@BYCODERS_KEY");const r={"Content-Type":"application/json",Authorization:`Bearer ${o}`};await this.axiosInstance.patch(`/checkouts/${n.cartId}/updateOrder`,{orderId:n.orderId,externalId:n.cartIdCrm},{headers:r});localStorage.removeItem("@BYCODERS_KEY");localStorage.removeItem(t);localStorage.removeItem(e(n.cartId))}async sendPin(t,e,n){const o={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const r=await this.axiosInstance.post("/crmbonus/send-pin",{cellphone:t,name:e,storeName:n},{headers:o});return{storeId:r.data.storeId,userId:r.data.userId}}async validatePinBonus(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/process-pin-bonus",t,{headers:e});return n.data}async reserve(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/redeem-bonus",t,{headers:e});return n.data}async cancel(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/cancel-apply-bonus",{ticket:t},{headers:e});return n.data}async getToken(t){var e,o;const r=await this.axiosInstance.post("/wake/requestToken",{storeName:t});this.token=(e=r===null||r===void 0?void 0:r.data)===null||e===void 0?void 0:e.token;localStorage.setItem(n,this.token);return(o=r===null||r===void 0?void 0:r.data)===null||o===void 0?void 0:o.token}async getCustomization(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.get(`/stores/${t}/customizations`,{headers:e});localStorage.setItem(o(t),JSON.stringify(n.data))}async cancelBonus(e,o){const r=localStorage.getItem(n);const s={"Content-Type":"application/json",Authorization:`Bearer ${r}`};await this.axiosInstance.post(`/crmbonus/cancel-bonus`,{cartId:e,usedBonus:true,storeName:o},{headers:s});localStorage.setItem(e,"0");localStorage.removeItem(t)}async getInfoCart(t){const e=await this.axiosInstance.get(`${t}/api/carrinho`);return e.data}}wn._instance=null;export{wn as C,mn as a};
2
- //# sourceMappingURL=p-e9895f08.js.map
1
+ import{U as t,g as e,B as n,a as o}from"./p-f9aeffc1.js";function r(t,e){return function n(){return t.apply(e,arguments)}}const{toString:s}=Object.prototype;const{getPrototypeOf:i}=Object;const c=(t=>e=>{const n=s.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null));const u=t=>{t=t.toLowerCase();return e=>c(e)===t};const a=t=>e=>typeof e===t;const{isArray:l}=Array;const f=a("undefined");function d(t){return t!==null&&!f(t)&&t.constructor!==null&&!f(t.constructor)&&w(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const h=u("ArrayBuffer");function p(t){let e;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){e=ArrayBuffer.isView(t)}else{e=t&&t.buffer&&h(t.buffer)}return e}const m=a("string");const w=a("function");const y=a("number");const b=t=>t!==null&&typeof t==="object";const g=t=>t===true||t===false;const R=t=>{if(c(t)!=="object"){return false}const e=i(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};const O=u("Date");const S=u("File");const E=u("Blob");const T=u("FileList");const A=t=>b(t)&&w(t.pipe);const j=t=>{let e;return t&&(typeof FormData==="function"&&t instanceof FormData||w(t.append)&&((e=c(t))==="formdata"||e==="object"&&w(t.toString)&&t.toString()==="[object FormData]"))};const N=u("URLSearchParams");const[x,v,C,P]=["ReadableStream","Request","Response","Headers"].map(u);const B=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function F(t,e,{allOwnKeys:n=false}={}){if(t===null||typeof t==="undefined"){return}let o;let r;if(typeof t!=="object"){t=[t]}if(l(t)){for(o=0,r=t.length;o<r;o++){e.call(null,t[o],o,t)}}else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t);const s=r.length;let i;for(o=0;o<s;o++){i=r[o];e.call(null,t[i],i,t)}}}function D(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length;let r;while(o-- >0){r=n[o];if(e===r.toLowerCase()){return r}}return null}const U=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const _=t=>!f(t)&&t!==U;function k(){const{caseless:t}=_(this)&&this||{};const e={};const n=(n,o)=>{const r=t&&D(e,o)||o;if(R(e[r])&&R(n)){e[r]=k(e[r],n)}else if(R(n)){e[r]=k({},n)}else if(l(n)){e[r]=n.slice()}else{e[r]=n}};for(let t=0,e=arguments.length;t<e;t++){arguments[t]&&F(arguments[t],n)}return e}const q=(t,e,n,{allOwnKeys:o}={})=>{F(e,((e,o)=>{if(n&&w(e)){t[o]=r(e,n)}else{t[o]=e}}),{allOwnKeys:o});return t};const L=t=>{if(t.charCodeAt(0)===65279){t=t.slice(1)}return t};const I=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o);t.prototype.constructor=t;Object.defineProperty(t,"super",{value:e.prototype});n&&Object.assign(t.prototype,n)};const z=(t,e,n,o)=>{let r;let s;let c;const u={};e=e||{};if(t==null)return e;do{r=Object.getOwnPropertyNames(t);s=r.length;while(s-- >0){c=r[s];if((!o||o(c,t,e))&&!u[c]){e[c]=t[c];u[c]=true}}t=n!==false&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e};const $=(t,e,n)=>{t=String(t);if(n===undefined||n>t.length){n=t.length}n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n};const M=t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!y(e))return null;const n=new Array(e);while(e-- >0){n[e]=t[e]}return n};const H=(t=>e=>t&&e instanceof t)(typeof Uint8Array!=="undefined"&&i(Uint8Array));const J=(t,e)=>{const n=t&&t[Symbol.iterator];const o=n.call(t);let r;while((r=o.next())&&!r.done){const n=r.value;e.call(t,n[0],n[1])}};const K=(t,e)=>{let n;const o=[];while((n=t.exec(e))!==null){o.push(n)}return o};const V=u("HTMLFormElement");const W=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function t(e,n,o){return n.toUpperCase()+o}));const G=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype);const X=u("RegExp");const Y=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t);const o={};F(n,((n,r)=>{let s;if((s=e(n,r,t))!==false){o[r]=s||n}}));Object.defineProperties(t,o)};const Z=t=>{Y(t,((e,n)=>{if(w(t)&&["arguments","caller","callee"].indexOf(n)!==-1){return false}const o=t[n];if(!w(o))return;e.enumerable=false;if("writable"in e){e.writable=false;return}if(!e.set){e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}}}))};const Q=(t,e)=>{const n={};const o=t=>{t.forEach((t=>{n[t]=true}))};l(t)?o(t):o(String(t).split(e));return n};const tt=()=>{};const et=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;const nt="abcdefghijklmnopqrstuvwxyz";const ot="0123456789";const rt={DIGIT:ot,ALPHA:nt,ALPHA_DIGIT:nt+nt.toUpperCase()+ot};const st=(t=16,e=rt.ALPHA_DIGIT)=>{let n="";const{length:o}=e;while(t--){n+=e[Math.random()*o|0]}return n};function it(t){return!!(t&&w(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const ct=t=>{const e=new Array(10);const n=(t,o)=>{if(b(t)){if(e.indexOf(t)>=0){return}if(!("toJSON"in t)){e[o]=t;const r=l(t)?[]:{};F(t,((t,e)=>{const s=n(t,o+1);!f(s)&&(r[e]=s)}));e[o]=undefined;return r}}return t};return n(t,0)};const ut=u("AsyncFunction");const at=t=>t&&(b(t)||w(t))&&w(t.then)&&w(t.catch);const lt=((t,e)=>{if(t){return setImmediate}return e?((t,e)=>{U.addEventListener("message",(({source:n,data:o})=>{if(n===U&&o===t){e.length&&e.shift()()}}),false);return n=>{e.push(n);U.postMessage(t,"*")}})(`axios@${Math.random()}`,[]):t=>setTimeout(t)})(typeof setImmediate==="function",w(U.postMessage));const ft=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(U):typeof process!=="undefined"&&process.nextTick||lt;const dt={isArray:l,isArrayBuffer:h,isBuffer:d,isFormData:j,isArrayBufferView:p,isString:m,isNumber:y,isBoolean:g,isObject:b,isPlainObject:R,isReadableStream:x,isRequest:v,isResponse:C,isHeaders:P,isUndefined:f,isDate:O,isFile:S,isBlob:E,isRegExp:X,isFunction:w,isStream:A,isURLSearchParams:N,isTypedArray:H,isFileList:T,forEach:F,merge:k,extend:q,trim:B,stripBOM:L,inherits:I,toFlatObject:z,kindOf:c,kindOfTest:u,endsWith:$,toArray:M,forEachEntry:J,matchAll:K,isHTMLForm:V,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:Y,freezeMethods:Z,toObjectSet:Q,toCamelCase:W,noop:tt,toFiniteNumber:et,findKey:D,global:U,isContextDefined:_,ALPHABET:rt,generateString:st,isSpecCompliantForm:it,toJSONObject:ct,isAsyncFn:ut,isThenable:at,setImmediate:lt,asap:ft};function ht(t,e,n,o,r){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=t;this.name="AxiosError";e&&(this.code=e);n&&(this.config=n);o&&(this.request=o);if(r){this.response=r;this.status=r.status?r.status:null}}dt.inherits(ht,Error,{toJSON:function t(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:dt.toJSONObject(this.config),code:this.code,status:this.status}}});const pt=ht.prototype;const mt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{mt[t]={value:t}}));Object.defineProperties(ht,mt);Object.defineProperty(pt,"isAxiosError",{value:true});ht.from=(t,e,n,o,r,s)=>{const i=Object.create(pt);dt.toFlatObject(t,i,(function t(e){return e!==Error.prototype}),(t=>t!=="isAxiosError"));ht.call(i,t.message,e,n,o,r);i.cause=t;i.name=t.name;s&&Object.assign(i,s);return i};const wt=null;function yt(t){return dt.isPlainObject(t)||dt.isArray(t)}function bt(t){return dt.endsWith(t,"[]")?t.slice(0,-2):t}function gt(t,e,n){if(!t)return e;return t.concat(e).map((function t(e,o){e=bt(e);return!n&&o?"["+e+"]":e})).join(n?".":"")}function Rt(t){return dt.isArray(t)&&!t.some(yt)}const Ot=dt.toFlatObject(dt,{},null,(function t(e){return/^is[A-Z]/.test(e)}));function St(t,e,n){if(!dt.isObject(t)){throw new TypeError("target must be an object")}e=e||new FormData;n=dt.toFlatObject(n,{metaTokens:true,dots:false,indexes:false},false,(function t(e,n){return!dt.isUndefined(n[e])}));const o=n.metaTokens;const r=n.visitor||l;const s=n.dots;const i=n.indexes;const c=n.Blob||typeof Blob!=="undefined"&&Blob;const u=c&&dt.isSpecCompliantForm(e);if(!dt.isFunction(r)){throw new TypeError("visitor must be a function")}function a(t){if(t===null)return"";if(dt.isDate(t)){return t.toISOString()}if(!u&&dt.isBlob(t)){throw new ht("Blob is not supported. Use a Buffer instead.")}if(dt.isArrayBuffer(t)||dt.isTypedArray(t)){return u&&typeof Blob==="function"?new Blob([t]):Buffer.from(t)}return t}function l(t,n,r){let c=t;if(t&&!r&&typeof t==="object"){if(dt.endsWith(n,"{}")){n=o?n:n.slice(0,-2);t=JSON.stringify(t)}else if(dt.isArray(t)&&Rt(t)||(dt.isFileList(t)||dt.endsWith(n,"[]"))&&(c=dt.toArray(t))){n=bt(n);c.forEach((function t(o,r){!(dt.isUndefined(o)||o===null)&&e.append(i===true?gt([n],r,s):i===null?n:n+"[]",a(o))}));return false}}if(yt(t)){return true}e.append(gt(r,n,s),a(t));return false}const f=[];const d=Object.assign(Ot,{defaultVisitor:l,convertValue:a,isVisitable:yt});function h(t,n){if(dt.isUndefined(t))return;if(f.indexOf(t)!==-1){throw Error("Circular reference detected in "+n.join("."))}f.push(t);dt.forEach(t,(function t(o,s){const i=!(dt.isUndefined(o)||o===null)&&r.call(e,o,dt.isString(s)?s.trim():s,n,d);if(i===true){h(o,n?n.concat(s):[s])}}));f.pop()}if(!dt.isObject(t)){throw new TypeError("data must be an object")}h(t);return e}function Et(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function t(n){return e[n]}))}function Tt(t,e){this._pairs=[];t&&St(t,this,e)}const At=Tt.prototype;At.append=function t(e,n){this._pairs.push([e,n])};At.toString=function t(e){const n=e?function(t){return e.call(this,t,Et)}:Et;return this._pairs.map((function t(e){return n(e[0])+"="+n(e[1])}),"").join("&")};function jt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Nt(t,e,n){if(!e){return t}const o=n&&n.encode||jt;const r=n&&n.serialize;let s;if(r){s=r(e,n)}else{s=dt.isURLSearchParams(e)?e.toString():new Tt(e,n).toString(o)}if(s){const e=t.indexOf("#");if(e!==-1){t=t.slice(0,e)}t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class xt{constructor(){this.handlers=[]}use(t,e,n){this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(t){if(this.handlers[t]){this.handlers[t]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(t){dt.forEach(this.handlers,(function e(n){if(n!==null){t(n)}}))}}const vt=xt;const Ct={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};const Pt=typeof URLSearchParams!=="undefined"?URLSearchParams:Tt;const Bt=typeof FormData!=="undefined"?FormData:null;const Ft=typeof Blob!=="undefined"?Blob:null;const Dt={isBrowser:true,classes:{URLSearchParams:Pt,FormData:Bt,Blob:Ft},protocols:["http","https","file","blob","url","data"]};const Ut=typeof window!=="undefined"&&typeof document!=="undefined";const _t=typeof navigator==="object"&&navigator||undefined;const kt=Ut&&(!_t||["ReactNative","NativeScript","NS"].indexOf(_t.product)<0);const qt=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const Lt=Ut&&window.location.href||"http://localhost";const It=Object.freeze({__proto__:null,hasBrowserEnv:Ut,hasStandardBrowserWebWorkerEnv:qt,hasStandardBrowserEnv:kt,navigator:_t,origin:Lt});const zt={...It,...Dt};function $t(t,e){return St(t,new zt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,o){if(zt.isNode&&dt.isBuffer(t)){this.append(e,t.toString("base64"));return false}return o.defaultVisitor.apply(this,arguments)}},e))}function Mt(t){return dt.matchAll(/\w+|\[(\w*)]/g,t).map((t=>t[0]==="[]"?"":t[1]||t[0]))}function Ht(t){const e={};const n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++){s=n[o];e[s]=t[s]}return e}function Jt(t){function e(t,n,o,r){let s=t[r++];if(s==="__proto__")return true;const i=Number.isFinite(+s);const c=r>=t.length;s=!s&&dt.isArray(o)?o.length:s;if(c){if(dt.hasOwnProp(o,s)){o[s]=[o[s],n]}else{o[s]=n}return!i}if(!o[s]||!dt.isObject(o[s])){o[s]=[]}const u=e(t,n,o[s],r);if(u&&dt.isArray(o[s])){o[s]=Ht(o[s])}return!i}if(dt.isFormData(t)&&dt.isFunction(t.entries)){const n={};dt.forEachEntry(t,((t,o)=>{e(Mt(t),o,n,0)}));return n}return null}function Kt(t,e,n){if(dt.isString(t)){try{(e||JSON.parse)(t);return dt.trim(t)}catch(t){if(t.name!=="SyntaxError"){throw t}}}return(n||JSON.stringify)(t)}const Vt={transitional:Ct,adapter:["xhr","http","fetch"],transformRequest:[function t(e,n){const o=n.getContentType()||"";const r=o.indexOf("application/json")>-1;const s=dt.isObject(e);if(s&&dt.isHTMLForm(e)){e=new FormData(e)}const i=dt.isFormData(e);if(i){return r?JSON.stringify(Jt(e)):e}if(dt.isArrayBuffer(e)||dt.isBuffer(e)||dt.isStream(e)||dt.isFile(e)||dt.isBlob(e)||dt.isReadableStream(e)){return e}if(dt.isArrayBufferView(e)){return e.buffer}if(dt.isURLSearchParams(e)){n.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return e.toString()}let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1){return $t(e,this.formSerializer).toString()}if((c=dt.isFileList(e))||o.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return St(c?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(s||r){n.setContentType("application/json",false);return Kt(e)}return e}],transformResponse:[function t(e){const n=this.transitional||Vt.transitional;const o=n&&n.forcedJSONParsing;const r=this.responseType==="json";if(dt.isResponse(e)||dt.isReadableStream(e)){return e}if(e&&dt.isString(e)&&(o&&!this.responseType||r)){const t=n&&n.silentJSONParsing;const o=!t&&r;try{return JSON.parse(e)}catch(t){if(o){if(t.name==="SyntaxError"){throw ht.from(t,ht.ERR_BAD_RESPONSE,this,null,this.response)}throw t}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zt.classes.FormData,Blob:zt.classes.Blob},validateStatus:function t(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};dt.forEach(["delete","get","head","post","put","patch"],(t=>{Vt.headers[t]={}}));const Wt=Vt;const Gt=dt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Xt=t=>{const e={};let n;let o;let r;t&&t.split("\n").forEach((function t(s){r=s.indexOf(":");n=s.substring(0,r).trim().toLowerCase();o=s.substring(r+1).trim();if(!n||e[n]&&Gt[n]){return}if(n==="set-cookie"){if(e[n]){e[n].push(o)}else{e[n]=[o]}}else{e[n]=e[n]?e[n]+", "+o:o}}));return e};const Yt=Symbol("internals");function Zt(t){return t&&String(t).trim().toLowerCase()}function Qt(t){if(t===false||t==null){return t}return dt.isArray(t)?t.map(Qt):String(t)}function te(t){const e=Object.create(null);const n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;while(o=n.exec(t)){e[o[1]]=o[2]}return e}const ee=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ne(t,e,n,o,r){if(dt.isFunction(o)){return o.call(this,e,n)}if(r){e=n}if(!dt.isString(e))return;if(dt.isString(o)){return e.indexOf(o)!==-1}if(dt.isRegExp(o)){return o.test(e)}}function oe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function re(t,e){const n=dt.toCamelCase(" "+e);["get","set","has"].forEach((o=>{Object.defineProperty(t,o+n,{value:function(t,n,r){return this[o].call(this,e,t,n,r)},configurable:true})}))}class se{constructor(t){t&&this.set(t)}set(t,e,n){const o=this;function r(t,e,n){const r=Zt(e);if(!r){throw new Error("header name must be a non-empty string")}const s=dt.findKey(o,r);if(!s||o[s]===undefined||n===true||n===undefined&&o[s]!==false){o[s||e]=Qt(t)}}const s=(t,e)=>dt.forEach(t,((t,n)=>r(t,n,e)));if(dt.isPlainObject(t)||t instanceof this.constructor){s(t,e)}else if(dt.isString(t)&&(t=t.trim())&&!ee(t)){s(Xt(t),e)}else if(dt.isHeaders(t)){for(const[e,o]of t.entries()){r(o,e,n)}}else{t!=null&&r(e,t,n)}return this}get(t,e){t=Zt(t);if(t){const n=dt.findKey(this,t);if(n){const t=this[n];if(!e){return t}if(e===true){return te(t)}if(dt.isFunction(e)){return e.call(this,t,n)}if(dt.isRegExp(e)){return e.exec(t)}throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){t=Zt(t);if(t){const n=dt.findKey(this,t);return!!(n&&this[n]!==undefined&&(!e||ne(this,this[n],n,e)))}return false}delete(t,e){const n=this;let o=false;function r(t){t=Zt(t);if(t){const r=dt.findKey(n,t);if(r&&(!e||ne(n,n[r],r,e))){delete n[r];o=true}}}if(dt.isArray(t)){t.forEach(r)}else{r(t)}return o}clear(t){const e=Object.keys(this);let n=e.length;let o=false;while(n--){const r=e[n];if(!t||ne(this,this[r],r,t,true)){delete this[r];o=true}}return o}normalize(t){const e=this;const n={};dt.forEach(this,((o,r)=>{const s=dt.findKey(n,r);if(s){e[s]=Qt(o);delete e[r];return}const i=t?oe(r):String(r).trim();if(i!==r){delete e[r]}e[i]=Qt(o);n[i]=true}));return this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);dt.forEach(this,((n,o)=>{n!=null&&n!==false&&(e[o]=t&&dt.isArray(n)?n.join(", "):n)}));return e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);e.forEach((t=>n.set(t)));return n}static accessor(t){const e=this[Yt]=this[Yt]={accessors:{}};const n=e.accessors;const o=this.prototype;function r(t){const e=Zt(t);if(!n[e]){re(o,t);n[e]=true}}dt.isArray(t)?t.forEach(r):r(t);return this}}se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);dt.reduceDescriptors(se.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}));dt.freezeMethods(se);const ie=se;function ce(t,e){const n=this||Wt;const o=e||n;const r=ie.from(o.headers);let s=o.data;dt.forEach(t,(function t(o){s=o.call(n,s,r.normalize(),e?e.status:undefined)}));r.normalize();return s}function ue(t){return!!(t&&t.__CANCEL__)}function ae(t,e,n){ht.call(this,t==null?"canceled":t,ht.ERR_CANCELED,e,n);this.name="CanceledError"}dt.inherits(ae,ht,{__CANCEL__:true});function le(t,e,n){const o=n.config.validateStatus;if(!n.status||!o||o(n.status)){t(n)}else{e(new ht("Request failed with status code "+n.status,[ht.ERR_BAD_REQUEST,ht.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}}function fe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function de(t,e){t=t||10;const n=new Array(t);const o=new Array(t);let r=0;let s=0;let i;e=e!==undefined?e:1e3;return function c(u){const a=Date.now();const l=o[s];if(!i){i=a}n[r]=u;o[r]=a;let f=s;let d=0;while(f!==r){d+=n[f++];f=f%t}r=(r+1)%t;if(r===s){s=(s+1)%t}if(a-i<e){return}const h=l&&a-l;return h?Math.round(d*1e3/h):undefined}}function he(t,e){let n=0;let o=1e3/e;let r;let s;const i=(e,o=Date.now())=>{n=o;r=null;if(s){clearTimeout(s);s=null}t.apply(null,e)};const c=(...t)=>{const e=Date.now();const c=e-n;if(c>=o){i(t,e)}else{r=t;if(!s){s=setTimeout((()=>{s=null;i(r)}),o-c)}}};const u=()=>r&&i(r);return[c,u]}const pe=(t,e,n=3)=>{let o=0;const r=de(50,250);return he((n=>{const s=n.loaded;const i=n.lengthComputable?n.total:undefined;const c=s-o;const u=r(c);const a=s<=i;o=s;const l={loaded:s,total:i,progress:i?s/i:undefined,bytes:c,rate:u?u:undefined,estimated:u&&i&&a?(i-s)/u:undefined,event:n,lengthComputable:i!=null,[e?"download":"upload"]:true};t(l)}),n)};const me=(t,e)=>{const n=t!=null;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]};const we=t=>(...e)=>dt.asap((()=>t(...e)));const ye=zt.hasStandardBrowserEnv?function t(){const e=zt.navigator&&/(msie|trident)/i.test(zt.navigator.userAgent);const n=document.createElement("a");let o;function r(t){let o=t;if(e){n.setAttribute("href",o);o=n.href}n.setAttribute("href",o);return{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}o=r(window.location.href);return function t(e){const n=dt.isString(e)?r(e):e;return n.protocol===o.protocol&&n.host===o.host}}():function t(){return function t(){return true}}();const be=zt.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const i=[t+"="+encodeURIComponent(e)];dt.isNumber(n)&&i.push("expires="+new Date(n).toGMTString());dt.isString(o)&&i.push("path="+o);dt.isString(r)&&i.push("domain="+r);s===true&&i.push("secure");document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ge(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Re(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Oe(t,e){if(t&&!ge(e)){return Re(t,e)}return e}const Se=t=>t instanceof ie?{...t}:t;function Ee(t,e){e=e||{};const n={};function o(t,e,n){if(dt.isPlainObject(t)&&dt.isPlainObject(e)){return dt.merge.call({caseless:n},t,e)}else if(dt.isPlainObject(e)){return dt.merge({},e)}else if(dt.isArray(e)){return e.slice()}return e}function r(t,e,n){if(!dt.isUndefined(e)){return o(t,e,n)}else if(!dt.isUndefined(t)){return o(undefined,t,n)}}function s(t,e){if(!dt.isUndefined(e)){return o(undefined,e)}}function i(t,e){if(!dt.isUndefined(e)){return o(undefined,e)}else if(!dt.isUndefined(t)){return o(undefined,t)}}function c(n,r,s){if(s in e){return o(n,r)}else if(s in t){return o(undefined,n)}}const u={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(t,e)=>r(Se(t),Se(e),true)};dt.forEach(Object.keys(Object.assign({},t,e)),(function o(s){const i=u[s]||r;const a=i(t[s],e[s],s);dt.isUndefined(a)&&i!==c||(n[s]=a)}));return n}const Te=t=>{const e=Ee({},t);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:c}=e;e.headers=i=ie.from(i);e.url=Nt(Oe(e.baseURL,e.url),t.params,t.paramsSerializer);if(c){i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")))}let u;if(dt.isFormData(n)){if(zt.hasStandardBrowserEnv||zt.hasStandardBrowserWebWorkerEnv){i.setContentType(undefined)}else if((u=i.getContentType())!==false){const[t,...e]=u?u.split(";").map((t=>t.trim())).filter(Boolean):[];i.setContentType([t||"multipart/form-data",...e].join("; "))}}if(zt.hasStandardBrowserEnv){o&&dt.isFunction(o)&&(o=o(e));if(o||o!==false&&ye(e.url)){const t=r&&s&&be.read(s);if(t){i.set(r,t)}}}return e};const Ae=typeof XMLHttpRequest!=="undefined";const je=Ae&&function(t){return new Promise((function e(n,o){const r=Te(t);let s=r.data;const i=ie.from(r.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:a}=r;let l;let f,d;let h,p;function m(){h&&h();p&&p();r.cancelToken&&r.cancelToken.unsubscribe(l);r.signal&&r.signal.removeEventListener("abort",l)}let w=new XMLHttpRequest;w.open(r.method.toUpperCase(),r.url,true);w.timeout=r.timeout;function y(){if(!w){return}const e=ie.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders());const r=!c||c==="text"||c==="json"?w.responseText:w.response;const s={data:r,status:w.status,statusText:w.statusText,headers:e,config:t,request:w};le((function t(e){n(e);m()}),(function t(e){o(e);m()}),s);w=null}if("onloadend"in w){w.onloadend=y}else{w.onreadystatechange=function t(){if(!w||w.readyState!==4){return}if(w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)){return}setTimeout(y)}}w.onabort=function e(){if(!w){return}o(new ht("Request aborted",ht.ECONNABORTED,t,w));w=null};w.onerror=function e(){o(new ht("Network Error",ht.ERR_NETWORK,t,w));w=null};w.ontimeout=function e(){let n=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||Ct;if(r.timeoutErrorMessage){n=r.timeoutErrorMessage}o(new ht(n,s.clarifyTimeoutError?ht.ETIMEDOUT:ht.ECONNABORTED,t,w));w=null};s===undefined&&i.setContentType(null);if("setRequestHeader"in w){dt.forEach(i.toJSON(),(function t(e,n){w.setRequestHeader(n,e)}))}if(!dt.isUndefined(r.withCredentials)){w.withCredentials=!!r.withCredentials}if(c&&c!=="json"){w.responseType=r.responseType}if(a){[d,p]=pe(a,true);w.addEventListener("progress",d)}if(u&&w.upload){[f,h]=pe(u);w.upload.addEventListener("progress",f);w.upload.addEventListener("loadend",h)}if(r.cancelToken||r.signal){l=e=>{if(!w){return}o(!e||e.type?new ae(null,t,w):e);w.abort();w=null};r.cancelToken&&r.cancelToken.subscribe(l);if(r.signal){r.signal.aborted?l():r.signal.addEventListener("abort",l)}}const b=fe(r.url);if(b&&zt.protocols.indexOf(b)===-1){o(new ht("Unsupported protocol "+b+":",ht.ERR_BAD_REQUEST,t));return}w.send(s||null)}))};const Ne=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n=new AbortController;let o;const r=function(t){if(!o){o=true;i();const e=t instanceof Error?t:this.reason;n.abort(e instanceof ht?e:new ae(e instanceof Error?e.message:e))}};let s=e&&setTimeout((()=>{s=null;r(new ht(`timeout ${e} of ms exceeded`,ht.ETIMEDOUT))}),e);const i=()=>{if(t){s&&clearTimeout(s);s=null;t.forEach((t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)}));t=null}};t.forEach((t=>t.addEventListener("abort",r)));const{signal:c}=n;c.unsubscribe=()=>dt.asap(i);return c}};const xe=Ne;const ve=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let o=0;let r;while(o<n){r=o+e;yield t.slice(o,r);o=r}};const Ce=async function*(t,e){for await(const n of Pe(t)){yield*ve(n,e)}};const Pe=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t){break}yield n}}finally{await e.cancel()}};const Be=(t,e,n,o)=>{const r=Ce(t,e);let s=0;let i;let c=t=>{if(!i){i=true;o&&o(t)}};return new ReadableStream({async pull(t){try{const{done:e,value:o}=await r.next();if(e){c();t.close();return}let i=o.byteLength;if(n){let t=s+=i;n(t)}t.enqueue(new Uint8Array(o))}catch(t){c(t);throw t}},cancel(t){c(t);return r.return()}},{highWaterMark:2})};const Fe=typeof fetch==="function"&&typeof Request==="function"&&typeof Response==="function";const De=Fe&&typeof ReadableStream==="function";const Ue=Fe&&(typeof TextEncoder==="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer()));const _e=(t,...e)=>{try{return!!t(...e)}catch(t){return false}};const ke=De&&_e((()=>{let t=false;const e=new Request(zt.origin,{body:new ReadableStream,method:"POST",get duplex(){t=true;return"half"}}).headers.has("Content-Type");return t&&!e}));const qe=64*1024;const Le=De&&_e((()=>dt.isReadableStream(new Response("").body)));const Ie={stream:Le&&(t=>t.body)};Fe&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ie[e]&&(Ie[e]=dt.isFunction(t[e])?t=>t[e]():(t,n)=>{throw new ht(`Response type '${e}' is not supported`,ht.ERR_NOT_SUPPORT,n)})}))})(new Response);const ze=async t=>{if(t==null){return 0}if(dt.isBlob(t)){return t.size}if(dt.isSpecCompliantForm(t)){const e=new Request(zt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}if(dt.isArrayBufferView(t)||dt.isArrayBuffer(t)){return t.byteLength}if(dt.isURLSearchParams(t)){t=t+""}if(dt.isString(t)){return(await Ue(t)).byteLength}};const $e=async(t,e)=>{const n=dt.toFiniteNumber(t.getContentLength());return n==null?ze(e):n};const Me=Fe&&(async t=>{let{url:e,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:u,responseType:a,headers:l,withCredentials:f="same-origin",fetchOptions:d}=Te(t);a=a?(a+"").toLowerCase():"text";let h=xe([r,s&&s.toAbortSignal()],i);let p;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let w;try{if(u&&ke&&n!=="get"&&n!=="head"&&(w=await $e(l,o))!==0){let t=new Request(e,{method:"POST",body:o,duplex:"half"});let n;if(dt.isFormData(o)&&(n=t.headers.get("content-type"))){l.setContentType(n)}if(t.body){const[e,n]=me(w,pe(we(u)));o=Be(t.body,qe,e,n)}}if(!dt.isString(f)){f=f?"include":"omit"}const r="credentials"in Request.prototype;p=new Request(e,{...d,signal:h,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:o,duplex:"half",credentials:r?f:undefined});let s=await fetch(p);const i=Le&&(a==="stream"||a==="response");if(Le&&(c||i&&m)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=s[e]}));const e=dt.toFiniteNumber(s.headers.get("content-length"));const[n,o]=c&&me(e,pe(we(c),true))||[];s=new Response(Be(s.body,qe,n,(()=>{o&&o();m&&m()})),t)}a=a||"text";let y=await Ie[dt.findKey(Ie,a)||"text"](s,t);!i&&m&&m();return await new Promise(((e,n)=>{le(e,n,{data:y,headers:ie.from(s.headers),status:s.status,statusText:s.statusText,config:t,request:p})}))}catch(e){m&&m();if(e&&e.name==="TypeError"&&/fetch/i.test(e.message)){throw Object.assign(new ht("Network Error",ht.ERR_NETWORK,t,p),{cause:e.cause||e})}throw ht.from(e,e&&e.code,t,p)}});const He={http:wt,xhr:je,fetch:Me};dt.forEach(He,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Je=t=>`- ${t}`;const Ke=t=>dt.isFunction(t)||t===null||t===false;const Ve={getAdapter:t=>{t=dt.isArray(t)?t:[t];const{length:e}=t;let n;let o;const r={};for(let s=0;s<e;s++){n=t[s];let e;o=n;if(!Ke(n)){o=He[(e=String(n)).toLowerCase()];if(o===undefined){throw new ht(`Unknown adapter '${e}'`)}}if(o){break}r[e||"#"+s]=o}if(!o){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(e===false?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(Je).join("\n"):" "+Je(t[0]):"as no adapter specified";throw new ht(`There is no suitable adapter to dispatch the request `+n,"ERR_NOT_SUPPORT")}return o},adapters:He};function We(t){if(t.cancelToken){t.cancelToken.throwIfRequested()}if(t.signal&&t.signal.aborted){throw new ae(null,t)}}function Ge(t){We(t);t.headers=ie.from(t.headers);t.data=ce.call(t,t.transformRequest);if(["post","put","patch"].indexOf(t.method)!==-1){t.headers.setContentType("application/x-www-form-urlencoded",false)}const e=Ve.getAdapter(t.adapter||Wt.adapter);return e(t).then((function e(n){We(t);n.data=ce.call(t,t.transformResponse,n);n.headers=ie.from(n.headers);return n}),(function e(n){if(!ue(n)){We(t);if(n&&n.response){n.response.data=ce.call(t,t.transformResponse,n.response);n.response.headers=ie.from(n.response.headers)}}return Promise.reject(n)}))}const Xe="1.7.7";const Ye={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Ye[t]=function n(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}}));const Ze={};Ye.transitional=function t(e,n,o){function r(t,e){return"[Axios v"+Xe+"] Transitional option '"+t+"'"+e+(o?". "+o:"")}return(t,o,s)=>{if(e===false){throw new ht(r(o," has been removed"+(n?" in "+n:"")),ht.ERR_DEPRECATED)}if(n&&!Ze[o]){Ze[o]=true;console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))}return e?e(t,o,s):true}};function Qe(t,e,n){if(typeof t!=="object"){throw new ht("options must be an object",ht.ERR_BAD_OPTION_VALUE)}const o=Object.keys(t);let r=o.length;while(r-- >0){const s=o[r];const i=e[s];if(i){const e=t[s];const n=e===undefined||i(e,s,t);if(n!==true){throw new ht("option "+s+" must be "+n,ht.ERR_BAD_OPTION_VALUE)}continue}if(n!==true){throw new ht("Unknown option "+s,ht.ERR_BAD_OPTION)}}}const tn={assertOptions:Qe,validators:Ye};const en=tn.validators;class nn{constructor(t){this.defaults=t;this.interceptors={request:new vt,response:new vt}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{if(!t.stack){t.stack=n}else if(n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))){t.stack+="\n"+n}}catch(t){}}throw t}}_request(t,e){if(typeof t==="string"){e=e||{};e.url=t}else{e=t||{}}e=Ee(this.defaults,e);const{transitional:n,paramsSerializer:o,headers:r}=e;if(n!==undefined){tn.assertOptions(n,{silentJSONParsing:en.transitional(en.boolean),forcedJSONParsing:en.transitional(en.boolean),clarifyTimeoutError:en.transitional(en.boolean)},false)}if(o!=null){if(dt.isFunction(o)){e.paramsSerializer={serialize:o}}else{tn.assertOptions(o,{encode:en.function,serialize:en.function},true)}}e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=r&&dt.merge(r.common,r[e.method]);r&&dt.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]}));e.headers=ie.concat(s,r);const i=[];let c=true;this.interceptors.request.forEach((function t(n){if(typeof n.runWhen==="function"&&n.runWhen(e)===false){return}c=c&&n.synchronous;i.unshift(n.fulfilled,n.rejected)}));const u=[];this.interceptors.response.forEach((function t(e){u.push(e.fulfilled,e.rejected)}));let a;let l=0;let f;if(!c){const t=[Ge.bind(this),undefined];t.unshift.apply(t,i);t.push.apply(t,u);f=t.length;a=Promise.resolve(e);while(l<f){a=a.then(t[l++],t[l++])}return a}f=i.length;let d=e;l=0;while(l<f){const t=i[l++];const e=i[l++];try{d=t(d)}catch(t){e.call(this,t);break}}try{a=Ge.call(this,d)}catch(t){return Promise.reject(t)}l=0;f=u.length;while(l<f){a=a.then(u[l++],u[l++])}return a}getUri(t){t=Ee(this.defaults,t);const e=Oe(t.baseURL,t.url);return Nt(e,t.params,t.paramsSerializer)}}dt.forEach(["delete","get","head","options"],(function t(e){nn.prototype[e]=function(t,n){return this.request(Ee(n||{},{method:e,url:t,data:(n||{}).data}))}}));dt.forEach(["post","put","patch"],(function t(e){function n(t){return function n(o,r,s){return this.request(Ee(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}nn.prototype[e]=n();nn.prototype[e+"Form"]=n(true)}));const on=nn;class rn{constructor(t){if(typeof t!=="function"){throw new TypeError("executor must be a function.")}let e;this.promise=new Promise((function t(n){e=n}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;while(e-- >0){n._listeners[e](t)}n._listeners=null}));this.promise.then=t=>{let e;const o=new Promise((t=>{n.subscribe(t);e=t})).then(t);o.cancel=function t(){n.unsubscribe(e)};return o};t((function t(o,r,s){if(n.reason){return}n.reason=new ae(o,r,s);e(n.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}}unsubscribe(t){if(!this._listeners){return}const e=this._listeners.indexOf(t);if(e!==-1){this._listeners.splice(e,1)}}toAbortSignal(){const t=new AbortController;const e=e=>{t.abort(e)};this.subscribe(e);t.signal.unsubscribe=()=>this.unsubscribe(e);return t.signal}static source(){let t;const e=new rn((function e(n){t=n}));return{token:e,cancel:t}}}const sn=rn;function cn(t){return function e(n){return t.apply(null,n)}}function un(t){return dt.isObject(t)&&t.isAxiosError===true}const an={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(an).forEach((([t,e])=>{an[e]=t}));const ln=an;function fn(t){const e=new on(t);const n=r(on.prototype.request,e);dt.extend(n,on.prototype,e,{allOwnKeys:true});dt.extend(n,e,null,{allOwnKeys:true});n.create=function e(n){return fn(Ee(t,n))};return n}const dn=fn(Wt);dn.Axios=on;dn.CanceledError=ae;dn.CancelToken=sn;dn.isCancel=ue;dn.VERSION=Xe;dn.toFormData=St;dn.AxiosError=ht;dn.Cancel=dn.CanceledError;dn.all=function t(e){return Promise.all(e)};dn.spread=cn;dn.isAxiosError=un;dn.mergeConfig=Ee;dn.AxiosHeaders=ie;dn.formToJSON=t=>Jt(dt.isHTMLForm(t)?new FormData(t):t);dn.getAdapter=Ve.getAdapter;dn.HttpStatusCode=ln;dn.default=dn;const hn=dn;const pn="https://wake-middleware.crmbonus.com/api";const mn="http://localhost:3001";class wn{constructor(){this.axiosInstance=hn.create({baseURL:pn,headers:{"Content-Type":"application/json",accept:"application/json"}})}static getInstance(){if(this._instance){return this._instance}this._instance=new wn;return this._instance}async getCustomer(t,e){var n,o;const r={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const s=await this.axiosInstance.get(`/store/${e}/customer/${t}`,{headers:r});this.token=(n=s===null||s===void 0?void 0:s.data)===null||n===void 0?void 0:n.token;return(o=s===null||s===void 0?void 0:s.data)===null||o===void 0?void 0:o.customer}async updateOrder(n){const o=localStorage.getItem("@BYCODERS_KEY");const r={"Content-Type":"application/json",Authorization:`Bearer ${o}`};await this.axiosInstance.patch(`/checkouts/${n.cartId}/updateOrder`,{orderId:n.orderId,externalId:n.cartIdCrm},{headers:r});localStorage.removeItem("@BYCODERS_KEY");localStorage.removeItem(t);localStorage.removeItem(e(n.cartId))}async sendPin(t,e,n){const o={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const r=await this.axiosInstance.post("/crmbonus/send-pin",{cellphone:t,name:e,storeName:n},{headers:o});return{storeId:r.data.storeId,userId:r.data.userId}}async validatePinBonus(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/process-pin-bonus",t,{headers:e});return n.data}async reserve(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/redeem-bonus",t,{headers:e});return n.data}async cancel(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.post("/crmbonus/cancel-apply-bonus",{ticket:t},{headers:e});return n.data}async getToken(t){var e,o;const r=await this.axiosInstance.post("/wake/requestToken",{storeName:t});this.token=(e=r===null||r===void 0?void 0:r.data)===null||e===void 0?void 0:e.token;localStorage.setItem(n,this.token);return(o=r===null||r===void 0?void 0:r.data)===null||o===void 0?void 0:o.token}async getCustomization(t){const e={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const n=await this.axiosInstance.get(`/stores/${t}/customizations`,{headers:e});localStorage.setItem(o(t),JSON.stringify(n.data))}async cancelBonus(e,o){const r=localStorage.getItem(n);const s={"Content-Type":"application/json",Authorization:`Bearer ${r}`};await this.axiosInstance.post(`/crmbonus/cancel-bonus`,{cartId:e,usedBonus:true,storeName:o},{headers:s});localStorage.setItem(e,"0");localStorage.removeItem(t)}async getInfoCart(t){const e=await this.axiosInstance.get(`${t}/api/carrinho`);return e.data}}wn._instance=null;export{wn as C,mn as a};
2
+ //# sourceMappingURL=p-2f3e90b8.js.map