crmbonus-component-wake 2.0.78 → 2.0.81

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 (107) hide show
  1. package/dist/cjs/countdown-timer_4.cjs.entry.js +7 -5
  2. package/dist/cjs/countdown-timer_4.cjs.entry.js.map +1 -1
  3. package/dist/cjs/crm-bonus-form.cjs.entry.js +2 -1
  4. package/dist/cjs/crm-bonus-form.cjs.entry.js.map +1 -1
  5. package/dist/cjs/crm-bonus-note.cjs.entry.js +3 -2
  6. package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
  7. package/dist/cjs/crm-bonus.cjs.entry.js +36 -36
  8. package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
  9. package/dist/cjs/crm-giftback-form_2.cjs.entry.js +35 -18
  10. package/dist/cjs/crm-giftback-form_2.cjs.entry.js.map +1 -1
  11. package/dist/cjs/crmbonus-component-wake.cjs.js +1 -1
  12. package/dist/cjs/{crmbonus.service-ebe0b3c6.js → crmbonus.service-b2b18a51.js} +7 -14
  13. package/dist/cjs/crmbonus.service-b2b18a51.js.map +1 -0
  14. package/dist/cjs/keys.storage-de7744aa.js +17 -0
  15. package/dist/cjs/keys.storage-de7744aa.js.map +1 -0
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/cjs/pedido-finalizado.cjs.entry.js +2 -1
  18. package/dist/cjs/pedido-finalizado.cjs.entry.js.map +1 -1
  19. package/dist/collection/components/crm-bonus/crm-bonus.js +6 -35
  20. package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
  21. package/dist/collection/components/giftback-form/giftback-form.js +62 -18
  22. package/dist/collection/components/giftback-form/giftback-form.js.map +1 -1
  23. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.css +15 -5
  24. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +6 -4
  25. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js.map +1 -1
  26. package/dist/collection/dto/validate.pin.bonus.js +4 -1
  27. package/dist/collection/dto/validate.pin.bonus.js.map +1 -1
  28. package/dist/collection/helpers/build.payload.helper.js +25 -0
  29. package/dist/collection/helpers/build.payload.helper.js.map +1 -0
  30. package/dist/collection/services/crmbonus.service.js +2 -2
  31. package/dist/collection/services/crmbonus.service.js.map +1 -1
  32. package/dist/collection/utils/keys.storage.js +1 -0
  33. package/dist/collection/utils/keys.storage.js.map +1 -1
  34. package/dist/components/crm-bonus-form.js +1 -1
  35. package/dist/components/crm-bonus-note.js +2 -1
  36. package/dist/components/crm-bonus-note.js.map +1 -1
  37. package/dist/components/crm-bonus.js +37 -38
  38. package/dist/components/crm-bonus.js.map +1 -1
  39. package/dist/components/crm-giftback-form.js +1 -1
  40. package/dist/components/giftback-info.js +1 -1
  41. package/dist/components/{p-998b6c7d.js → p-090c085f.js} +8 -6
  42. package/dist/components/p-090c085f.js.map +1 -0
  43. package/dist/components/{p-9ceca803.js → p-1b08fd54.js} +36 -18
  44. package/dist/components/p-1b08fd54.js.map +1 -0
  45. package/dist/components/{p-a7ddcab4.js → p-641b4efd.js} +5 -11
  46. package/dist/components/p-641b4efd.js.map +1 -0
  47. package/dist/components/p-89c5ef5a.js +12 -0
  48. package/dist/components/p-89c5ef5a.js.map +1 -0
  49. package/dist/components/pedido-finalizado.js +1 -1
  50. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
  51. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
  52. package/dist/crmbonus-component-wake/p-10598ee8.entry.js +2 -0
  53. package/dist/crmbonus-component-wake/p-10598ee8.entry.js.map +1 -0
  54. package/dist/crmbonus-component-wake/p-641b4efd.js +2 -0
  55. package/dist/crmbonus-component-wake/p-641b4efd.js.map +1 -0
  56. package/dist/crmbonus-component-wake/p-7989ccb3.entry.js +2 -0
  57. package/dist/crmbonus-component-wake/{p-b7925fc7.entry.js.map → p-7989ccb3.entry.js.map} +1 -1
  58. package/dist/crmbonus-component-wake/p-7fbf47fc.entry.js +2 -0
  59. package/dist/crmbonus-component-wake/p-7fbf47fc.entry.js.map +1 -0
  60. package/dist/crmbonus-component-wake/p-89c5ef5a.js +2 -0
  61. package/dist/crmbonus-component-wake/p-89c5ef5a.js.map +1 -0
  62. package/dist/crmbonus-component-wake/p-b524a53e.entry.js +2 -0
  63. package/dist/crmbonus-component-wake/{p-304d3f89.entry.js.map → p-b524a53e.entry.js.map} +1 -1
  64. package/dist/crmbonus-component-wake/p-dc3e1c29.entry.js +2 -0
  65. package/dist/crmbonus-component-wake/{p-282b201b.entry.js.map → p-dc3e1c29.entry.js.map} +1 -1
  66. package/dist/crmbonus-component-wake/p-f801e9c0.entry.js +2 -0
  67. package/dist/crmbonus-component-wake/p-f801e9c0.entry.js.map +1 -0
  68. package/dist/esm/countdown-timer_4.entry.js +7 -5
  69. package/dist/esm/countdown-timer_4.entry.js.map +1 -1
  70. package/dist/esm/crm-bonus-form.entry.js +2 -1
  71. package/dist/esm/crm-bonus-form.entry.js.map +1 -1
  72. package/dist/esm/crm-bonus-note.entry.js +2 -1
  73. package/dist/esm/crm-bonus-note.entry.js.map +1 -1
  74. package/dist/esm/crm-bonus.entry.js +36 -36
  75. package/dist/esm/crm-bonus.entry.js.map +1 -1
  76. package/dist/esm/crm-giftback-form_2.entry.js +33 -16
  77. package/dist/esm/crm-giftback-form_2.entry.js.map +1 -1
  78. package/dist/esm/crmbonus-component-wake.js +1 -1
  79. package/dist/esm/{crmbonus.service-84f1cc25.js → crmbonus.service-a21cf811.js} +5 -11
  80. package/dist/esm/crmbonus.service-a21cf811.js.map +1 -0
  81. package/dist/esm/keys.storage-9e276481.js +12 -0
  82. package/dist/esm/keys.storage-9e276481.js.map +1 -0
  83. package/dist/esm/loader.js +1 -1
  84. package/dist/esm/pedido-finalizado.entry.js +2 -1
  85. package/dist/esm/pedido-finalizado.entry.js.map +1 -1
  86. package/dist/types/components/giftback-form/giftback-form.d.ts +2 -1
  87. package/dist/types/components.d.ts +3 -1
  88. package/dist/types/dto/validate.pin.bonus.d.ts +9 -0
  89. package/dist/types/helpers/build.payload.helper.d.ts +2 -0
  90. package/dist/types/utils/keys.storage.d.ts +1 -0
  91. package/package.json +1 -1
  92. package/dist/cjs/crmbonus.service-ebe0b3c6.js.map +0 -1
  93. package/dist/components/p-998b6c7d.js.map +0 -1
  94. package/dist/components/p-9ceca803.js.map +0 -1
  95. package/dist/components/p-a7ddcab4.js.map +0 -1
  96. package/dist/crmbonus-component-wake/p-282b201b.entry.js +0 -2
  97. package/dist/crmbonus-component-wake/p-304d3f89.entry.js +0 -2
  98. package/dist/crmbonus-component-wake/p-a7ddcab4.js +0 -2
  99. package/dist/crmbonus-component-wake/p-a7ddcab4.js.map +0 -1
  100. package/dist/crmbonus-component-wake/p-b7925fc7.entry.js +0 -2
  101. package/dist/crmbonus-component-wake/p-cd95574b.entry.js +0 -2
  102. package/dist/crmbonus-component-wake/p-cd95574b.entry.js.map +0 -1
  103. package/dist/crmbonus-component-wake/p-d4ecfd2b.entry.js +0 -2
  104. package/dist/crmbonus-component-wake/p-d4ecfd2b.entry.js.map +0 -1
  105. package/dist/crmbonus-component-wake/p-d8e5a526.entry.js +0 -2
  106. package/dist/crmbonus-component-wake/p-d8e5a526.entry.js.map +0 -1
  107. package/dist/esm/crmbonus.service-84f1cc25.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","userId","storeName","productsInString","cartId","showModal","products","customer","loading","message","phone","canCancel","amountCancel","sent","session","loading_reprocess","resetBonus","reprocess","stepNext","loadingModal","saveStore","cancel","handleCustomerName","step","bonus","setStep","sendPin","value","isOpen","modalTitle","storename","config","orderId","metadadoString","txtBtn","handleClick","initialValue","disabled","getPhone","size","color","handlerSubmit","validate","resend","pin","isVerified","canResend","reserve","usedValue","selectedOption","sliderPosition","downtime","counter","pinInfo","sucess","error","hasApplyBonus","processBonus","applyName","newValue"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.22.2 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return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L,QAAA,IAAAE,MAAA,IAAAqB,OAAA,KAAAa,IAAA,KAAAC,WAAA,KAAAC,UAAA,2BAAAtC,QAAA,IAAAgB,MAAA,KAAAuB,QAAA,KAAA1B,OAAA,KAAA2B,UAAA,KAAAC,eAAA,KAAAC,eAAA,YAAA1B,MAAA,yCAAA2B,SAAA,KAAAC,QAAA,gDAAAlD,UAAA,gBAAAE,OAAA,cAAAE,SAAA,KAAAC,SAAA,KAAAoB,MAAA,KAAAnB,QAAA,KAAAC,QAAA,KAAAC,MAAA,KAAA2C,QAAA,KAAA9B,KAAA,KAAAC,MAAA,KAAA8B,OAAA,KAAAC,MAAA,KAAAxB,OAAA,KAAAyB,cAAA,KAAA/B,QAAA,KAAAgC,aAAA,+BAAAjD,QAAA,0CAAAK,KAAA,KAAA6B,SAAA,KAAArB,OAAA,KAAAb,QAAA,IAAAoC,IAAA,KAAAC,WAAA,+BAAArC,QAAA,IAAAgB,MAAA,KAAAuB,QAAA,KAAA1B,OAAA,KAAA2B,UAAA,wBAAArB,MAAA,IAAAnB,QAAA,IAAAkD,UAAA,KAAArC,OAAA,KAAAsC,SAAA,KAAAlD,QAAA,gCAAAX,EAAA","ignoreList":[]}
1
+ {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","userId","storeName","productsInString","cartId","showModal","products","customer","loading","message","phone","canCancel","amountCancel","sent","session","loading_reprocess","resetBonus","reprocess","stepNext","loadingModal","saveStore","cancel","handleCustomerName","step","bonus","setStep","sendPin","value","isOpen","modalTitle","storename","config","orderId","metadadoString","txtBtn","handleClick","initialValue","disabled","getPhone","size","color","handlerSubmit","validate","resend","pin","isVerified","canResend","reserve","usedValue","selectedOption","sliderPosition","downtime","counter","loadProducts","pinInfo","sucess","error","hasApplyBonus","processBonus","applyName","newValue"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.22.2 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,M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AAAuB,QAAA,KAAA1B,OAAA,KAAA2B,UAAA,KAAAC,eAAA,KAAAC,eAAA,YAAA1B,MAAA,yCAAA2B,SAAA,KAAAC,QAAA,gDAAAlD,UAAA,gBAAAE,OAAA,cAAAE,SAAA,KAAAC,SAAA,KAAA8C,aAAA,KAAA1B,MAAA,KAAAnB,QAAA,KAAAC,QAAA,KAAAC,MAAA,KAAA4C,QAAA,KAAA/B,KAAA,KAAAC,MAAA,KAAA+B,OAAA,KAAAC,MAAA,KAAAzB,OAAA,KAAA0B,cAAA,KAAAhC,QAAA,KAAAiC,aAAA,+BAAAlD,QAAA,0CAAAK,KAAA,KAAA6B,SAAA,KAAArB,OAAA,KAAAb,QAAA,IAAAoC,IAAA,KAAAC,WAAA,+BAAArC,QAAA,IAAAgB,MAAA,KAAAuB,QAAA,KAAA1B,OAAA,KAAA2B,UAAA,wBAAArB,MAAA,IAAAnB,QAAA,IAAAmD,UAAA,KAAAtC,OAAA,KAAAuC,SAAA,KAAAnD,QAAA,gCAAAX,EAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,h as i}from"./p-24616d67.js";import{C as s}from"./p-641b4efd.js";import{S as e}from"./p-a561251a.js";import{g as o}from"./p-75ba7b9a.js";import{i as a}from"./p-fb505488.js";import{a as n,U as r}from"./p-89c5ef5a.js";const h="*{margin:0;padding:0;box-sizing:border-box}:host{--crmfont-sizebodymd:14px;--crmline-heightbodymd:20px;--crmletter-spacingtitle-md:0px}.container-message{font-family:Roboto;font-size:var(--crmfont-sizebodymd);font-weight:400;line-height:var(--crmline-heightbodymd);letter-spacing:var(--crmletter-spacingtitle-md);text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.crm-container-form{display:flex;flex-direction:column;justify-content:space-around;height:auto;padding:20px 24px 20px 24px;border:1px solid #CCCC;writing-mode:horizontal-tb;gap:16px;border-top:1px solid #ccc !important;border-bottom:1px solid #ccc !important}.crm-phone-form{display:flex;flex-direction:column;height:100%;gap:16px}.crm-subtitle{font-size:14px;color:var(--crm-btn)}.crm-title{font-weight:700;line-height:20px;color:#262626;font-size:16px}.crm-message-info{color:#619013;font-weight:500;font-size:12px}.crm-message-error{color:#E11D48;font-weight:500;font-size:12px}";const c=h;const d=class{constructor(i){t(this,i);this.crmBonusService=s.getInstance();this.storeName=undefined;this.cartId=undefined;this.products=undefined;this.customer=undefined;this.loadProducts=undefined;this.value=undefined;this.loading=false;this.message=undefined;this.phone=undefined;this.pinInfo=undefined;this.step=e.STEP_PHONE;this.bonus=undefined;this.sucess="";this.error="";this.config=undefined;this.hasApplyBonus=false}async setStep(t){this.step=t}async processBonus(t=[],i=false){this.sucess="";console.log("processBonus",[]);if(i){this.products=t}const s=localStorage.getItem(n(this.cartId));if(s){const t=JSON.parse(s);this.bonus=t;this.phone=t.phone;this.pinInfo={storeId:t.storeId,userId:t.userId};await this.validateBonus("2018");this.step=e.STEP_RESERVE}}async handleSendPin(t){this.message="";if(!t){this.message="Informe seu telefone";return}this.phone=t;this.sendPin()}async componentWillLoad(){this.sucess="";this.error="";this.config=o(this.storeName);await this.handleApply()}async handleApply(){console.log("processBonus");await this.processBonus()}convertStringToNumber(){const t=this.phone.replace(/\D/g,"");return Number(t)}async sendPin(){var t,i,s;this.loading=true;this.message="";this.sucess="";this.error="";try{const i=this.convertStringToNumber();this.pinInfo=await this.crmBonusService.sendPin(i,(t=this.customer)===null||t===void 0?void 0:t.name,this.storeName);if(localStorage.getItem(`bc:${this.phone}`)){await this.validateBonus("2018");this.step=e.STEP_RESERVE}else{this.step=e.STEP_PIN}}catch(t){this.message=(s=(i=t===null||t===void 0?void 0:t.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.message}finally{this.loading=false}}changePhone(){this.sucess="";this.error="";this.step=e.STEP_PHONE}async validateBonus(t){var i,s,o;this.loadProducts();const a=localStorage.getItem(r);if(a=="use"){this.step=e.STEP_RESERVE;return}this.loading=true;this.sucess="";this.error="";const h={pin:t,cellphone:this.phone.toString(),storeId:this.pinInfo.storeId.toString(),userId:this.pinInfo.userId.toString(),checkoutId:this.cartId,checkoutProducts:this.products,name:(i=this.customer)===null||i===void 0?void 0:i.name,storeName:this.storeName};try{this.bonus=await this.crmBonusService.validatePinBonus(h);if(!this.bonus.hasBonus){this.loading=false;this.step=e.STEP_NO_BONUS;return}this.sucess="Código validado com sucesso!";localStorage.setItem(n(this.cartId),JSON.stringify(Object.assign(Object.assign({},this.bonus),{phone:this.phone})));localStorage.setItem(`bc:${this.phone}`,"validate");this.step=e.STEP_RESERVE}catch(t){const i=(o=(s=t===null||t===void 0?void 0:t.response)===null||s===void 0?void 0:s.data)===null||o===void 0?void 0:o.message;if(i.includes("Pin")){this.error="Código inválido!"}else{this.error=i;this.step=e.STEP_NO_BONUS}}finally{this.loading=false}}handleCancel(){this.cancel()}async cancel(){this.message="";this.loading=true;try{await this.crmBonusService.cancelBonus(this.cartId,this.storeName);this.save(0)}catch(t){this.message="Não consegui cancelar o bônus, tente novamente!"}finally{this.loading=false}}async reserveApply(t){this.loading=true;this.message="";try{await this.reserve(t);this.save(t)}catch(t){this.message="ocorreu um error ao solicitar a aplicação do bonus! tente novamente";this.step=e.STEP_NO_BONUS;localStorage.removeItem(this.cartId)}finally{this.loading=false}}save(t){localStorage.setItem(this.cartId,t.toString())}async reserve(t){await this.crmBonusService.reserve({redeemedBonus:t,cartId:this.cartId,ticket:this.cartId,grossValue:Number(this.bonus.totalValue),storeName:this.storeName,storeId:this.bonus.storeId.toString(),userId:this.bonus.userId})}render(){return i("div",{key:"b3ee46442ab6dfc062792ba9304153735ea5c221",class:"crm-container-form fbits-responsive-carrinho-desconto"},i("label",{key:"763cc526640bce84ece0b2389b2fb7e99519eab8",class:"crm-title"},this.config.giftbackTitle),this.step===e.STEP_PHONE&&i("phone-form",{key:"1696446b829fd16c006353ad3689c25f51ec6c90",value:this.customer.phone,config:this.config,loading:this.loading,handlerSubmit:t=>this.handleSendPin(t)}),this.step===e.STEP_PIN&&i("pin-form",{key:"0af5348ebf7ad7980b3f3f8364cd442e41ad9fe8",config:this.config,phone:this.phone,cancel:()=>this.changePhone(),resend:()=>this.sendPin(),validate:t=>this.validateBonus(t),loading:this.loading},this.sucess&&i("p",{key:"b11bfde8822d9acf404313f0a8d079189b35a40b",class:"crm-message-info"},this.sucess),this.error&&i("p",{key:"f848df71f4604122b87a59cb59b96e85d4a89057",class:"crm-message-error"},this.error)),this.step===e.STEP_RESERVE&&i("giftback-info",{key:"66480f6f9c5e93162ed2152192d8db76c01f459f",loading:this.loading,cancel:()=>this.handleCancel(),bonus:this.bonus,reserve:t=>this.reserveApply(t)}),this.step===e.STEP_NO_BONUS&&i("div",{key:"054f6a2b7d1bf73daa96d46665f4b840ae85ca64",class:"container-message"},a.t("noGiftback",{storename:this.config.giftbackTitle})))}};d.style=c;const l=".loading-container{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;}.loading-spinner{width:50px;height:50px;border:5px solid rgba(255, 255, 255, 0.3);border-top:5px solid white;border-radius:50%;animation:spin 1s linear infinite;}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.relative-xy{position:relative}";const f=l;const p=class{constructor(i){t(this,i);this.loading=true}render(){return i("div",{key:"422b09da21c691f5eaeb4df9cb30531428409787",class:"relative-xy"},this.loading&&i("div",{key:"4777be23c24bb0b3190d8992ba97a5206eded534",class:"loading-container"},i("div",{key:"0f44c0f2d96890a604e60c2ae5163ef80f55b319",class:"loading-spinner"})),i("slot",{key:"a8f88a43a1fe8ea3348ecd0f5b6855102262f6c5"}))}};p.style=f;export{d as crm_giftback_form,p as loading_container};
2
+ //# sourceMappingURL=p-10598ee8.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["giftbackFormCss","CrmGiftbackFormStyle0","CrmBonus","this","crmBonusService","CrmBonusService","getInstance","StepFormEnum","STEP_PHONE","setStep","step","processBonus","products","hasNewProduct","sucess","console","log","_bonus","localStorage","getItem","getKeyReserveByCartId","cartId","bonus","JSON","parse","phone","pinInfo","storeId","userId","validateBonus","STEP_RESERVE","handleSendPin","message","sendPin","componentWillLoad","error","config","getInfoCustomization","storeName","handleApply","convertStringToNumber","_phone","replace","Number","loading","_a","customer","name","STEP_PIN","_c","_b","response","data","changePhone","pin","loadProducts","used_or_no","USED_KEY","payload","cellphone","toString","checkoutId","checkoutProducts","validatePinBonus","hasBonus","STEP_NO_BONUS","setItem","stringify","Object","assign","_error","includes","handleCancel","cancel","cancelBonus","save","reserveApply","amount","reserve","removeItem","redeemedBonus","ticket","grossValue","totalValue","render","h","key","class","giftbackTitle","value","handlerSubmit","resend","validate","amountRedeemed","i18next","t","storename","loadingContainerCss","LoadingContainerStyle0","LoadingContainer"],"sources":["src/components/giftback-form/giftback-form.css?tag=crm-giftback-form","src/components/giftback-form/giftback-form.tsx","src/components/loading-container/loading-container.css?tag=loading-container","src/components/loading-container/loading-container.tsx"],"sourcesContent":["* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n:host {\n --crmfont-sizebodymd: 14px;\n --crmline-heightbodymd: 20px;\n --crmletter-spacingtitle-md: 0px\n}\n\n.container-message {\n font-family: Roboto;\n font-size: var(--crmfont-sizebodymd);\n font-weight: 400;\n line-height: var(--crmline-heightbodymd);\n letter-spacing: var(--crmletter-spacingtitle-md);\n text-align: left;\n text-underline-position: from-font;\n text-decoration-skip-ink: none;\n}\n\n.crm-container-form {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n height: auto;\n padding: 20px 24px 20px 24px;\n border: 1px solid #CCCC;\n writing-mode: horizontal-tb;\n gap: 16px;\n border-top: 1px solid #ccc !important;\n border-bottom: 1px solid #ccc !important;\n}\n\n/* .fbits-responsive-carrinho-desconto {\n overflow: hidden;\n border: 1px solid #ccc;\n border-top: 0;\n border-bottom: 0;\n} */\n\n.crm-phone-form {\n display: flex;\n flex-direction: column;\n height: 100%;\n /* justify-content: space-around; */\n gap: 16px;\n}\n\n.crm-subtitle {\n font-size: 14px;\n color: var(--crm-btn);\n}\n\n.crm-title {\n font-weight: 700;\n line-height: 20px;\n color: #262626;\n font-size: 16px;\n}\n\n.crm-message-info {\n color: #619013;\n font-weight: 500;\n font-size: 12px;\n}\n\n.crm-message-error {\n color: #E11D48;\n font-weight: 500;\n font-size: 12px;\n}","import { Component, Method, Prop, State, h } from \"@stencil/core\";\nimport { CrmBonusService } from \"../../services/crmbonus.service\";\nimport { StepFormEnum } from \"../../contants\";\nimport { IPinSent } from '../../dto/pin.sent'\nimport { IBonus, ICustomer, IProccesPinBonusDto, IProduct } from \"../../dto/validate.pin.bonus\";\nimport { IInfoStore, getInfoCustomization } from \"../../helpers/info.config.helper\";\n\nimport i18next from \"../../i18n/i18n\"\nimport { USED_KEY, getKeyReserveByCartId } from \"../../utils/keys.storage\";\n\n@Component({\n tag: 'crm-giftback-form',\n styleUrl: 'giftback-form.css'\n})\nexport class CrmBonus {\n // private phoneInputMask: HTMLPhoneFormElement;\n\n private crmBonusService: CrmBonusService = CrmBonusService.getInstance();\n\n @Prop({ attribute: 'storename' }) storeName;\n @Prop() cartId;\n @Prop() products: Array<IProduct>;\n @Prop() customer: ICustomer;\n @Prop() loadProducts: () => void;\n\n @State() value: string;\n @State() loading: boolean = false;\n @State() message: string;\n @State() phone: string;\n @State() pinInfo: IPinSent;\n @State() step: StepFormEnum = StepFormEnum.STEP_PHONE;\n @State() bonus: IBonus;\n\n @State() sucess: string = \"\";\n @State() error: string = \"\";\n @State() config: IInfoStore;\n\n @State() hasApplyBonus = false;\n\n\n @Method()\n async setStep(step: StepFormEnum) {\n this.step = step\n }\n\n @Method()\n async processBonus(products: IProduct[] = [], hasNewProduct = false) {\n this.sucess = \"\";\n\n console.log('processBonus', [])\n if (hasNewProduct) {\n this.products = products;\n }\n const _bonus = localStorage.getItem(getKeyReserveByCartId(this.cartId));\n\n\n if (_bonus) {\n\n const bonus = JSON.parse(_bonus)\n\n this.bonus = bonus;\n\n this.phone = bonus.phone;\n this.pinInfo = {\n storeId: bonus.storeId,\n userId: bonus.userId\n }\n \n await this.validateBonus(\"2018\");\n this.step = StepFormEnum.STEP_RESERVE;\n\n }\n\n\n }\n\n async handleSendPin(phone: string) {\n\n this.message = \"\"\n if (!phone) {\n this.message = \"Informe seu telefone\";\n return;\n }\n\n this.phone = phone;\n\n this.sendPin()\n }\n\n async componentWillLoad() {\n this.sucess = \"\";\n this.error = \"\"\n this.config = getInfoCustomization(this.storeName);\n\n await this.handleApply()\n\n }\n\n async handleApply() {\n console.log('processBonus')\n await this.processBonus();\n\n // const bonus = localStorage.getItem(getKeyReserveByCartId(this.cartId));\n\n // if (bonus) {\n // this.bonus = JSON.parse(bonus);\n // this.step = StepFormEnum.STEP_RESERVE; \n // }\n\n }\n\n private convertStringToNumber(): number {\n const _phone = this.phone.replace(/\\D/g, '');\n return Number(_phone);\n }\n\n public async sendPin() {\n this.loading = true;\n this.message = \"\";\n this.sucess = \"\";\n this.error = \"\"\n\n try {\n\n const _phone = this.convertStringToNumber()\n\n this.pinInfo = await this.crmBonusService.sendPin(_phone, this.customer?.name, this.storeName);\n\n if (localStorage.getItem(`bc:${this.phone}`)) {\n await this.validateBonus(\"2018\");\n this.step = StepFormEnum.STEP_RESERVE;\n } else {\n this.step = StepFormEnum.STEP_PIN;\n }\n\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n changePhone() {\n this.sucess = \"\";\n this.error = \"\"\n this.step = StepFormEnum.STEP_PHONE;\n }\n\n public async validateBonus(pin: string) {\n\n this.loadProducts();\n\n const used_or_no = localStorage.getItem(USED_KEY);\n\n if (used_or_no == \"use\") {\n this.step = StepFormEnum.STEP_RESERVE;\n return\n }\n\n this.loading = true;\n this.sucess = \"\";\n this.error = \"\";\n const payload: IProccesPinBonusDto = {\n pin: pin,\n cellphone: this.phone.toString(),\n storeId: this.pinInfo.storeId.toString(),\n userId: this.pinInfo.userId.toString(),\n checkoutId: this.cartId,\n checkoutProducts: this.products,\n name: this.customer?.name,\n storeName: this.storeName\n }\n\n try {\n this.bonus = await this.crmBonusService.validatePinBonus(payload);\n\n if (!this.bonus.hasBonus) {\n this.loading = false;\n this.step = StepFormEnum.STEP_NO_BONUS;\n return\n }\n\n this.sucess = \"Código validado com sucesso!\";\n localStorage.setItem(getKeyReserveByCartId(this.cartId), JSON.stringify({ ...this.bonus, phone: this.phone }));\n localStorage.setItem(`bc:${this.phone}`, \"validate\")\n\n this.step = StepFormEnum.STEP_RESERVE;\n\n } catch (error) {\n const _error: string = error?.response?.data?.message;\n\n if (_error.includes(\"Pin\")) {\n this.error = \"Código inválido!\"\n } else {\n this.error = _error;\n this.step = StepFormEnum.STEP_NO_BONUS;\n }\n\n\n } finally {\n this.loading = false;\n }\n }\n\n public handleCancel() {\n // this.step = StepFormEnum.STEP_PHONE;\n this.cancel()\n }\n\n async cancel() {\n this.message = \"\";\n this.loading = true;\n try {\n await this.crmBonusService.cancelBonus(this.cartId, this.storeName);\n // localStorage.removeItem(this.cartId);\n this.save(0)\n } catch (error) {\n this.message = \"Não consegui cancelar o bônus, tente novamente!\"\n } finally {\n this.loading = false;\n }\n }\n\n public async reserveApply(amount: number) {\n this.loading = true;\n this.message = \"\";\n try {\n await this.reserve(amount);\n this.save(amount);\n\n } catch (error) {\n this.message = \"ocorreu um error ao solicitar a aplicação do bonus! tente novamente\"\n\n this.step = StepFormEnum.STEP_NO_BONUS;\n localStorage.removeItem(this.cartId);\n } finally {\n this.loading = false;\n }\n }\n\n save(amount: number) {\n localStorage.setItem(this.cartId, amount.toString());\n }\n\n public async reserve(amount: number) {\n\n await this.crmBonusService.reserve({\n redeemedBonus: amount,\n cartId: this.cartId,\n ticket: this.cartId,\n grossValue: Number(this.bonus.totalValue),\n storeName: this.storeName,\n storeId: this.bonus.storeId.toString(),\n userId: this.bonus.userId\n });\n }\n\n render() {\n return (\n <div class=\"crm-container-form fbits-responsive-carrinho-desconto\" >\n\n {/* <loading-container /> */}\n\n <label class=\"crm-title\">{this.config.giftbackTitle}</label>\n\n {this.step === StepFormEnum.STEP_PHONE &&\n <phone-form\n value={this.customer.phone}\n config={this.config}\n loading={this.loading}\n handlerSubmit={(phone) => this.handleSendPin(phone)}\n />}\n {\n this.step === StepFormEnum.STEP_PIN &&\n <pin-form\n config={this.config}\n phone={this.phone}\n cancel={() => this.changePhone()}\n resend={() => this.sendPin()}\n validate={(data) => this.validateBonus(data)}\n loading={this.loading}\n >\n {this.sucess && <p class=\"crm-message-info\">{this.sucess}</p>}\n {this.error && <p class=\"crm-message-error\">{this.error}</p>}\n\n </pin-form>\n }\n\n {\n this.step === StepFormEnum.STEP_RESERVE &&\n <giftback-info\n loading={this.loading}\n cancel={() => this.handleCancel()}\n bonus={this.bonus}\n reserve={(amountRedeemed: number) => this.reserveApply(amountRedeemed)}\n />\n }\n\n {\n this.step === StepFormEnum.STEP_NO_BONUS &&\n (\n <div class=\"container-message\">\n {i18next.t(\"noGiftback\", { storename: this.config.giftbackTitle })}\n </div>\n )\n\n }\n </div>\n )\n }\n}","/* Estilo para centralizar o container do loading */\n.loading-container {\n position: absolute;\n /* Fixa o loading na tela */\n top: 0;\n left: 0;\n width: 100%;\n /* Tamanho total da tela */\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n /* Fundo semitransparente */\n display: flex;\n /* Centraliza o conteúdo */\n justify-content: center;\n align-items: center;\n z-index: 1000;\n /* Coloca o loading acima de outros elementos */\n}\n\n/* Estilo do spinner (círculo giratório) */\n.loading-spinner {\n width: 50px;\n height: 50px;\n border: 5px solid rgba(255, 255, 255, 0.3);\n /* Borda semitransparente */\n border-top: 5px solid white;\n /* Borda que será animada */\n border-radius: 50%;\n /* Faz o círculo */\n animation: spin 1s linear infinite;\n /* Gira continuamente */\n}\n\n/* Keyframes para a animação de rotação */\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.relative-xy {\n position: relative;\n}","import { Component, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'loading-container',\n styleUrl: 'loading-container.css'\n})\nexport class LoadingContainer {\n\n @Prop() loading: boolean = true;\n\n render() {\n return (\n <div class=\"relative-xy\">\n {\n this.loading && (\n <div class=\"loading-container\">\n <div class=\"loading-spinner\">\n\n </div>\n \n </div>\n )\n }\n <slot></slot>\n </div>\n )\n }\n}"],"mappings":"sOAAA,MAAMA,EAAkB,k9BACxB,MAAAC,EAAeD,E,MCaFE,EAAQ,M,yBAGXC,KAAAC,gBAAmCC,EAAgBC,c,6JAS/B,M,6EAIEC,EAAaC,W,iCAGjB,G,WACD,G,yCAGA,K,CAIzB,aAAMC,CAAQC,GACZP,KAAKO,KAAOA,C,CAId,kBAAMC,CAAaC,EAAuB,GAAIC,EAAgB,OAC5DV,KAAKW,OAAS,GAEdC,QAAQC,IAAI,eAAgB,IAC5B,GAAIH,EAAe,CACjBV,KAAKS,SAAWA,C,CAElB,MAAMK,EAASC,aAAaC,QAAQC,EAAsBjB,KAAKkB,SAG/D,GAAIJ,EAAQ,CAEV,MAAMK,EAAQC,KAAKC,MAAMP,GAEzBd,KAAKmB,MAAQA,EAEbnB,KAAKsB,MAAQH,EAAMG,MACnBtB,KAAKuB,QAAU,CACbC,QAASL,EAAMK,QACfC,OAAQN,EAAMM,cAGVzB,KAAK0B,cAAc,QACzB1B,KAAKO,KAAOH,EAAauB,Y,EAO7B,mBAAMC,CAAcN,GAElBtB,KAAK6B,QAAU,GACf,IAAKP,EAAO,CACVtB,KAAK6B,QAAU,uBACf,M,CAGF7B,KAAKsB,MAAQA,EAEbtB,KAAK8B,S,CAGP,uBAAMC,GACJ/B,KAAKW,OAAS,GACdX,KAAKgC,MAAQ,GACbhC,KAAKiC,OAASC,EAAqBlC,KAAKmC,iBAElCnC,KAAKoC,a,CAIb,iBAAMA,GACJxB,QAAQC,IAAI,sBACNb,KAAKQ,c,CAWL,qBAAA6B,GACN,MAAMC,EAAStC,KAAKsB,MAAMiB,QAAQ,MAAO,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RO,EAAQC,EAAE,aAAc,CAAEC,UAAW7F,KAAKiC,OAAOoD,iB,aC9ShE,MAAMS,EAAsB,+bAC5B,MAAAC,EAAeD,E,MCKFE,EAAgB,M,sCAEE,I,CAE3B,MAAAf,GACI,OACIC,EAAA,OAAAC,IAAA,2CAAKC,MAAM,eAEHpF,KAAKyC,SACDyC,EAAA,OAAAC,IAAA,2CAAKC,MAAM,qBACPF,EAAA,OAAAC,IAAA,2CAAKC,MAAM,qBAOvBF,EAAA,QAAAC,IAAA,6C","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{B as t,g as e,U as n}from"./p-89c5ef5a.js";function o(t,e){return function n(){return t.apply(e,arguments)}}const{toString:r}=Object.prototype;const{getPrototypeOf:s}=Object;const i=(t=>e=>{const n=r.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null));const c=t=>{t=t.toLowerCase();return e=>i(e)===t};const u=t=>e=>typeof e===t;const{isArray:a}=Array;const l=u("undefined");function f(t){return t!==null&&!l(t)&&t.constructor!==null&&!l(t.constructor)&&m(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const d=c("ArrayBuffer");function h(t){let e;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){e=ArrayBuffer.isView(t)}else{e=t&&t.buffer&&d(t.buffer)}return e}const p=u("string");const m=u("function");const w=u("number");const y=t=>t!==null&&typeof t==="object";const b=t=>t===true||t===false;const g=t=>{if(i(t)!=="object"){return false}const e=s(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};const R=c("Date");const O=c("File");const E=c("Blob");const S=c("FileList");const T=t=>y(t)&&m(t.pipe);const A=t=>{let e;return t&&(typeof FormData==="function"&&t instanceof FormData||m(t.append)&&((e=i(t))==="formdata"||e==="object"&&m(t.toString)&&t.toString()==="[object FormData]"))};const j=c("URLSearchParams");const[N,x,v,C]=["ReadableStream","Request","Response","Headers"].map(c);const P=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function B(t,e,{allOwnKeys:n=false}={}){if(t===null||typeof t==="undefined"){return}let o;let r;if(typeof t!=="object"){t=[t]}if(a(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 F(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 D=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const U=t=>!l(t)&&t!==D;function _(){const{caseless:t}=U(this)&&this||{};const e={};const n=(n,o)=>{const r=t&&F(e,o)||o;if(g(e[r])&&g(n)){e[r]=_(e[r],n)}else if(g(n)){e[r]=_({},n)}else if(a(n)){e[r]=n.slice()}else{e[r]=n}};for(let t=0,e=arguments.length;t<e;t++){arguments[t]&&B(arguments[t],n)}return e}const k=(t,e,n,{allOwnKeys:r}={})=>{B(e,((e,r)=>{if(n&&m(e)){t[r]=o(e,n)}else{t[r]=e}}),{allOwnKeys:r});return t};const q=t=>{if(t.charCodeAt(0)===65279){t=t.slice(1)}return t};const L=(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 I=(t,e,n,o)=>{let r;let i;let c;const u={};e=e||{};if(t==null)return e;do{r=Object.getOwnPropertyNames(t);i=r.length;while(i-- >0){c=r[i];if((!o||o(c,t,e))&&!u[c]){e[c]=t[c];u[c]=true}}t=n!==false&&s(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e};const z=(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(a(t))return t;let e=t.length;if(!w(e))return null;const n=new Array(e);while(e-- >0){n[e]=t[e]}return n};const $=(t=>e=>t&&e instanceof t)(typeof Uint8Array!=="undefined"&&s(Uint8Array));const H=(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 J=(t,e)=>{let n;const o=[];while((n=t.exec(e))!==null){o.push(n)}return o};const K=c("HTMLFormElement");const V=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function t(e,n,o){return n.toUpperCase()+o}));const W=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype);const G=c("RegExp");const X=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t);const o={};B(n,((n,r)=>{let s;if((s=e(n,r,t))!==false){o[r]=s||n}}));Object.defineProperties(t,o)};const Y=t=>{X(t,((e,n)=>{if(m(t)&&["arguments","caller","callee"].indexOf(n)!==-1){return false}const o=t[n];if(!m(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 Z=(t,e)=>{const n={};const o=t=>{t.forEach((t=>{n[t]=true}))};a(t)?o(t):o(String(t).split(e));return n};const Q=()=>{};const tt=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;const et="abcdefghijklmnopqrstuvwxyz";const nt="0123456789";const ot={DIGIT:nt,ALPHA:et,ALPHA_DIGIT:et+et.toUpperCase()+nt};const rt=(t=16,e=ot.ALPHA_DIGIT)=>{let n="";const{length:o}=e;while(t--){n+=e[Math.random()*o|0]}return n};function st(t){return!!(t&&m(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const it=t=>{const e=new Array(10);const n=(t,o)=>{if(y(t)){if(e.indexOf(t)>=0){return}if(!("toJSON"in t)){e[o]=t;const r=a(t)?[]:{};B(t,((t,e)=>{const s=n(t,o+1);!l(s)&&(r[e]=s)}));e[o]=undefined;return r}}return t};return n(t,0)};const ct=c("AsyncFunction");const ut=t=>t&&(y(t)||m(t))&&m(t.then)&&m(t.catch);const at=((t,e)=>{if(t){return setImmediate}return e?((t,e)=>{D.addEventListener("message",(({source:n,data:o})=>{if(n===D&&o===t){e.length&&e.shift()()}}),false);return n=>{e.push(n);D.postMessage(t,"*")}})(`axios@${Math.random()}`,[]):t=>setTimeout(t)})(typeof setImmediate==="function",m(D.postMessage));const lt=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(D):typeof process!=="undefined"&&process.nextTick||at;const ft={isArray:a,isArrayBuffer:d,isBuffer:f,isFormData:A,isArrayBufferView:h,isString:p,isNumber:w,isBoolean:b,isObject:y,isPlainObject:g,isReadableStream:N,isRequest:x,isResponse:v,isHeaders:C,isUndefined:l,isDate:R,isFile:O,isBlob:E,isRegExp:G,isFunction:m,isStream:T,isURLSearchParams:j,isTypedArray:$,isFileList:S,forEach:B,merge:_,extend:k,trim:P,stripBOM:q,inherits:L,toFlatObject:I,kindOf:i,kindOfTest:c,endsWith:z,toArray:M,forEachEntry:H,matchAll:J,isHTMLForm:K,hasOwnProperty:W,hasOwnProp:W,reduceDescriptors:X,freezeMethods:Y,toObjectSet:Z,toCamelCase:V,noop:Q,toFiniteNumber:tt,findKey:F,global:D,isContextDefined:U,ALPHABET:ot,generateString:rt,isSpecCompliantForm:st,toJSONObject:it,isAsyncFn:ct,isThenable:ut,setImmediate:at,asap:lt};function dt(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}}ft.inherits(dt,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:ft.toJSONObject(this.config),code:this.code,status:this.status}}});const ht=dt.prototype;const pt={};["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=>{pt[t]={value:t}}));Object.defineProperties(dt,pt);Object.defineProperty(ht,"isAxiosError",{value:true});dt.from=(t,e,n,o,r,s)=>{const i=Object.create(ht);ft.toFlatObject(t,i,(function t(e){return e!==Error.prototype}),(t=>t!=="isAxiosError"));dt.call(i,t.message,e,n,o,r);i.cause=t;i.name=t.name;s&&Object.assign(i,s);return i};const mt=null;function wt(t){return ft.isPlainObject(t)||ft.isArray(t)}function yt(t){return ft.endsWith(t,"[]")?t.slice(0,-2):t}function bt(t,e,n){if(!t)return e;return t.concat(e).map((function t(e,o){e=yt(e);return!n&&o?"["+e+"]":e})).join(n?".":"")}function gt(t){return ft.isArray(t)&&!t.some(wt)}const Rt=ft.toFlatObject(ft,{},null,(function t(e){return/^is[A-Z]/.test(e)}));function Ot(t,e,n){if(!ft.isObject(t)){throw new TypeError("target must be an object")}e=e||new FormData;n=ft.toFlatObject(n,{metaTokens:true,dots:false,indexes:false},false,(function t(e,n){return!ft.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&&ft.isSpecCompliantForm(e);if(!ft.isFunction(r)){throw new TypeError("visitor must be a function")}function a(t){if(t===null)return"";if(ft.isDate(t)){return t.toISOString()}if(!u&&ft.isBlob(t)){throw new dt("Blob is not supported. Use a Buffer instead.")}if(ft.isArrayBuffer(t)||ft.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(ft.endsWith(n,"{}")){n=o?n:n.slice(0,-2);t=JSON.stringify(t)}else if(ft.isArray(t)&&gt(t)||(ft.isFileList(t)||ft.endsWith(n,"[]"))&&(c=ft.toArray(t))){n=yt(n);c.forEach((function t(o,r){!(ft.isUndefined(o)||o===null)&&e.append(i===true?bt([n],r,s):i===null?n:n+"[]",a(o))}));return false}}if(wt(t)){return true}e.append(bt(r,n,s),a(t));return false}const f=[];const d=Object.assign(Rt,{defaultVisitor:l,convertValue:a,isVisitable:wt});function h(t,n){if(ft.isUndefined(t))return;if(f.indexOf(t)!==-1){throw Error("Circular reference detected in "+n.join("."))}f.push(t);ft.forEach(t,(function t(o,s){const i=!(ft.isUndefined(o)||o===null)&&r.call(e,o,ft.isString(s)?s.trim():s,n,d);if(i===true){h(o,n?n.concat(s):[s])}}));f.pop()}if(!ft.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 St(t,e){this._pairs=[];t&&Ot(t,this,e)}const Tt=St.prototype;Tt.append=function t(e,n){this._pairs.push([e,n])};Tt.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 At(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function jt(t,e,n){if(!e){return t}const o=n&&n.encode||At;const r=n&&n.serialize;let s;if(r){s=r(e,n)}else{s=ft.isURLSearchParams(e)?e.toString():new St(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 Nt{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){ft.forEach(this.handlers,(function e(n){if(n!==null){t(n)}}))}}const xt=Nt;const vt={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};const Ct=typeof URLSearchParams!=="undefined"?URLSearchParams:St;const Pt=typeof FormData!=="undefined"?FormData:null;const Bt=typeof Blob!=="undefined"?Blob:null;const Ft={isBrowser:true,classes:{URLSearchParams:Ct,FormData:Pt,Blob:Bt},protocols:["http","https","file","blob","url","data"]};const Dt=typeof window!=="undefined"&&typeof document!=="undefined";const Ut=typeof navigator==="object"&&navigator||undefined;const _t=Dt&&(!Ut||["ReactNative","NativeScript","NS"].indexOf(Ut.product)<0);const kt=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const qt=Dt&&window.location.href||"http://localhost";const Lt=Object.freeze({__proto__:null,hasBrowserEnv:Dt,hasStandardBrowserWebWorkerEnv:kt,hasStandardBrowserEnv:_t,navigator:Ut,origin:qt});const It={...Lt,...Ft};function zt(t,e){return Ot(t,new It.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,o){if(It.isNode&&ft.isBuffer(t)){this.append(e,t.toString("base64"));return false}return o.defaultVisitor.apply(this,arguments)}},e))}function Mt(t){return ft.matchAll(/\w+|\[(\w*)]/g,t).map((t=>t[0]==="[]"?"":t[1]||t[0]))}function $t(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 Ht(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&&ft.isArray(o)?o.length:s;if(c){if(ft.hasOwnProp(o,s)){o[s]=[o[s],n]}else{o[s]=n}return!i}if(!o[s]||!ft.isObject(o[s])){o[s]=[]}const u=e(t,n,o[s],r);if(u&&ft.isArray(o[s])){o[s]=$t(o[s])}return!i}if(ft.isFormData(t)&&ft.isFunction(t.entries)){const n={};ft.forEachEntry(t,((t,o)=>{e(Mt(t),o,n,0)}));return n}return null}function Jt(t,e,n){if(ft.isString(t)){try{(e||JSON.parse)(t);return ft.trim(t)}catch(t){if(t.name!=="SyntaxError"){throw t}}}return(n||JSON.stringify)(t)}const Kt={transitional:vt,adapter:["xhr","http","fetch"],transformRequest:[function t(e,n){const o=n.getContentType()||"";const r=o.indexOf("application/json")>-1;const s=ft.isObject(e);if(s&&ft.isHTMLForm(e)){e=new FormData(e)}const i=ft.isFormData(e);if(i){return r?JSON.stringify(Ht(e)):e}if(ft.isArrayBuffer(e)||ft.isBuffer(e)||ft.isStream(e)||ft.isFile(e)||ft.isBlob(e)||ft.isReadableStream(e)){return e}if(ft.isArrayBufferView(e)){return e.buffer}if(ft.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 zt(e,this.formSerializer).toString()}if((c=ft.isFileList(e))||o.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Ot(c?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(s||r){n.setContentType("application/json",false);return Jt(e)}return e}],transformResponse:[function t(e){const n=this.transitional||Kt.transitional;const o=n&&n.forcedJSONParsing;const r=this.responseType==="json";if(ft.isResponse(e)||ft.isReadableStream(e)){return e}if(e&&ft.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 dt.from(t,dt.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:It.classes.FormData,Blob:It.classes.Blob},validateStatus:function t(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};ft.forEach(["delete","get","head","post","put","patch"],(t=>{Kt.headers[t]={}}));const Vt=Kt;const Wt=ft.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 Gt=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]&&Wt[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 Xt=Symbol("internals");function Yt(t){return t&&String(t).trim().toLowerCase()}function Zt(t){if(t===false||t==null){return t}return ft.isArray(t)?t.map(Zt):String(t)}function Qt(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 te=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ee(t,e,n,o,r){if(ft.isFunction(o)){return o.call(this,e,n)}if(r){e=n}if(!ft.isString(e))return;if(ft.isString(o)){return e.indexOf(o)!==-1}if(ft.isRegExp(o)){return o.test(e)}}function ne(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function oe(t,e){const n=ft.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 re{constructor(t){t&&this.set(t)}set(t,e,n){const o=this;function r(t,e,n){const r=Yt(e);if(!r){throw new Error("header name must be a non-empty string")}const s=ft.findKey(o,r);if(!s||o[s]===undefined||n===true||n===undefined&&o[s]!==false){o[s||e]=Zt(t)}}const s=(t,e)=>ft.forEach(t,((t,n)=>r(t,n,e)));if(ft.isPlainObject(t)||t instanceof this.constructor){s(t,e)}else if(ft.isString(t)&&(t=t.trim())&&!te(t)){s(Gt(t),e)}else if(ft.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=Yt(t);if(t){const n=ft.findKey(this,t);if(n){const t=this[n];if(!e){return t}if(e===true){return Qt(t)}if(ft.isFunction(e)){return e.call(this,t,n)}if(ft.isRegExp(e)){return e.exec(t)}throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){t=Yt(t);if(t){const n=ft.findKey(this,t);return!!(n&&this[n]!==undefined&&(!e||ee(this,this[n],n,e)))}return false}delete(t,e){const n=this;let o=false;function r(t){t=Yt(t);if(t){const r=ft.findKey(n,t);if(r&&(!e||ee(n,n[r],r,e))){delete n[r];o=true}}}if(ft.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||ee(this,this[r],r,t,true)){delete this[r];o=true}}return o}normalize(t){const e=this;const n={};ft.forEach(this,((o,r)=>{const s=ft.findKey(n,r);if(s){e[s]=Zt(o);delete e[r];return}const i=t?ne(r):String(r).trim();if(i!==r){delete e[r]}e[i]=Zt(o);n[i]=true}));return this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);ft.forEach(this,((n,o)=>{n!=null&&n!==false&&(e[o]=t&&ft.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[Xt]=this[Xt]={accessors:{}};const n=e.accessors;const o=this.prototype;function r(t){const e=Yt(t);if(!n[e]){oe(o,t);n[e]=true}}ft.isArray(t)?t.forEach(r):r(t);return this}}re.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ft.reduceDescriptors(re.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}));ft.freezeMethods(re);const se=re;function ie(t,e){const n=this||Vt;const o=e||n;const r=se.from(o.headers);let s=o.data;ft.forEach(t,(function t(o){s=o.call(n,s,r.normalize(),e?e.status:undefined)}));r.normalize();return s}function ce(t){return!!(t&&t.__CANCEL__)}function ue(t,e,n){dt.call(this,t==null?"canceled":t,dt.ERR_CANCELED,e,n);this.name="CanceledError"}ft.inherits(ue,dt,{__CANCEL__:true});function ae(t,e,n){const o=n.config.validateStatus;if(!n.status||!o||o(n.status)){t(n)}else{e(new dt("Request failed with status code "+n.status,[dt.ERR_BAD_REQUEST,dt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}}function le(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function fe(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 de(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 he=(t,e,n=3)=>{let o=0;const r=fe(50,250);return de((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 pe=(t,e)=>{const n=t!=null;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]};const me=t=>(...e)=>ft.asap((()=>t(...e)));const we=It.hasStandardBrowserEnv?function t(){const e=It.navigator&&/(msie|trident)/i.test(It.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=ft.isString(e)?r(e):e;return n.protocol===o.protocol&&n.host===o.host}}():function t(){return function t(){return true}}();const ye=It.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const i=[t+"="+encodeURIComponent(e)];ft.isNumber(n)&&i.push("expires="+new Date(n).toGMTString());ft.isString(o)&&i.push("path="+o);ft.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 be(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ge(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Re(t,e){if(t&&!be(e)){return ge(t,e)}return e}const Oe=t=>t instanceof se?{...t}:t;function Ee(t,e){e=e||{};const n={};function o(t,e,n){if(ft.isPlainObject(t)&&ft.isPlainObject(e)){return ft.merge.call({caseless:n},t,e)}else if(ft.isPlainObject(e)){return ft.merge({},e)}else if(ft.isArray(e)){return e.slice()}return e}function r(t,e,n){if(!ft.isUndefined(e)){return o(t,e,n)}else if(!ft.isUndefined(t)){return o(undefined,t,n)}}function s(t,e){if(!ft.isUndefined(e)){return o(undefined,e)}}function i(t,e){if(!ft.isUndefined(e)){return o(undefined,e)}else if(!ft.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(Oe(t),Oe(e),true)};ft.forEach(Object.keys(Object.assign({},t,e)),(function o(s){const i=u[s]||r;const a=i(t[s],e[s],s);ft.isUndefined(a)&&i!==c||(n[s]=a)}));return n}const Se=t=>{const e=Ee({},t);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:c}=e;e.headers=i=se.from(i);e.url=jt(Re(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(ft.isFormData(n)){if(It.hasStandardBrowserEnv||It.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(It.hasStandardBrowserEnv){o&&ft.isFunction(o)&&(o=o(e));if(o||o!==false&&we(e.url)){const t=r&&s&&ye.read(s);if(t){i.set(r,t)}}}return e};const Te=typeof XMLHttpRequest!=="undefined";const Ae=Te&&function(t){return new Promise((function e(n,o){const r=Se(t);let s=r.data;const i=se.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=se.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};ae((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 dt("Request aborted",dt.ECONNABORTED,t,w));w=null};w.onerror=function e(){o(new dt("Network Error",dt.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||vt;if(r.timeoutErrorMessage){n=r.timeoutErrorMessage}o(new dt(n,s.clarifyTimeoutError?dt.ETIMEDOUT:dt.ECONNABORTED,t,w));w=null};s===undefined&&i.setContentType(null);if("setRequestHeader"in w){ft.forEach(i.toJSON(),(function t(e,n){w.setRequestHeader(n,e)}))}if(!ft.isUndefined(r.withCredentials)){w.withCredentials=!!r.withCredentials}if(c&&c!=="json"){w.responseType=r.responseType}if(a){[d,p]=he(a,true);w.addEventListener("progress",d)}if(u&&w.upload){[f,h]=he(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 ue(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=le(r.url);if(b&&It.protocols.indexOf(b)===-1){o(new dt("Unsupported protocol "+b+":",dt.ERR_BAD_REQUEST,t));return}w.send(s||null)}))};const je=(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 dt?e:new ue(e instanceof Error?e.message:e))}};let s=e&&setTimeout((()=>{s=null;r(new dt(`timeout ${e} of ms exceeded`,dt.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=()=>ft.asap(i);return c}};const Ne=je;const xe=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 ve=async function*(t,e){for await(const n of Ce(t)){yield*xe(n,e)}};const Ce=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 Pe=(t,e,n,o)=>{const r=ve(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 Be=typeof fetch==="function"&&typeof Request==="function"&&typeof Response==="function";const Fe=Be&&typeof ReadableStream==="function";const De=Be&&(typeof TextEncoder==="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer()));const Ue=(t,...e)=>{try{return!!t(...e)}catch(t){return false}};const _e=Fe&&Ue((()=>{let t=false;const e=new Request(It.origin,{body:new ReadableStream,method:"POST",get duplex(){t=true;return"half"}}).headers.has("Content-Type");return t&&!e}));const ke=64*1024;const qe=Fe&&Ue((()=>ft.isReadableStream(new Response("").body)));const Le={stream:qe&&(t=>t.body)};Be&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Le[e]&&(Le[e]=ft.isFunction(t[e])?t=>t[e]():(t,n)=>{throw new dt(`Response type '${e}' is not supported`,dt.ERR_NOT_SUPPORT,n)})}))})(new Response);const Ie=async t=>{if(t==null){return 0}if(ft.isBlob(t)){return t.size}if(ft.isSpecCompliantForm(t)){const e=new Request(It.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}if(ft.isArrayBufferView(t)||ft.isArrayBuffer(t)){return t.byteLength}if(ft.isURLSearchParams(t)){t=t+""}if(ft.isString(t)){return(await De(t)).byteLength}};const ze=async(t,e)=>{const n=ft.toFiniteNumber(t.getContentLength());return n==null?Ie(e):n};const Me=Be&&(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}=Se(t);a=a?(a+"").toLowerCase():"text";let h=Ne([r,s&&s.toAbortSignal()],i);let p;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let w;try{if(u&&_e&&n!=="get"&&n!=="head"&&(w=await ze(l,o))!==0){let t=new Request(e,{method:"POST",body:o,duplex:"half"});let n;if(ft.isFormData(o)&&(n=t.headers.get("content-type"))){l.setContentType(n)}if(t.body){const[e,n]=pe(w,he(me(u)));o=Pe(t.body,ke,e,n)}}if(!ft.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=qe&&(a==="stream"||a==="response");if(qe&&(c||i&&m)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=s[e]}));const e=ft.toFiniteNumber(s.headers.get("content-length"));const[n,o]=c&&pe(e,he(me(c),true))||[];s=new Response(Pe(s.body,ke,n,(()=>{o&&o();m&&m()})),t)}a=a||"text";let y=await Le[ft.findKey(Le,a)||"text"](s,t);!i&&m&&m();return await new Promise(((e,n)=>{ae(e,n,{data:y,headers:se.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 dt("Network Error",dt.ERR_NETWORK,t,p),{cause:e.cause||e})}throw dt.from(e,e&&e.code,t,p)}});const $e={http:mt,xhr:Ae,fetch:Me};ft.forEach($e,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const He=t=>`- ${t}`;const Je=t=>ft.isFunction(t)||t===null||t===false;const Ke={getAdapter:t=>{t=ft.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(!Je(n)){o=$e[(e=String(n)).toLowerCase()];if(o===undefined){throw new dt(`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(He).join("\n"):" "+He(t[0]):"as no adapter specified";throw new dt(`There is no suitable adapter to dispatch the request `+n,"ERR_NOT_SUPPORT")}return o},adapters:$e};function Ve(t){if(t.cancelToken){t.cancelToken.throwIfRequested()}if(t.signal&&t.signal.aborted){throw new ue(null,t)}}function We(t){Ve(t);t.headers=se.from(t.headers);t.data=ie.call(t,t.transformRequest);if(["post","put","patch"].indexOf(t.method)!==-1){t.headers.setContentType("application/x-www-form-urlencoded",false)}const e=Ke.getAdapter(t.adapter||Vt.adapter);return e(t).then((function e(n){Ve(t);n.data=ie.call(t,t.transformResponse,n);n.headers=se.from(n.headers);return n}),(function e(n){if(!ce(n)){Ve(t);if(n&&n.response){n.response.data=ie.call(t,t.transformResponse,n.response);n.response.headers=se.from(n.response.headers)}}return Promise.reject(n)}))}const Ge="1.7.7";const Xe={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Xe[t]=function n(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}}));const Ye={};Xe.transitional=function t(e,n,o){function r(t,e){return"[Axios v"+Ge+"] Transitional option '"+t+"'"+e+(o?". "+o:"")}return(t,o,s)=>{if(e===false){throw new dt(r(o," has been removed"+(n?" in "+n:"")),dt.ERR_DEPRECATED)}if(n&&!Ye[o]){Ye[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 Ze(t,e,n){if(typeof t!=="object"){throw new dt("options must be an object",dt.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 dt("option "+s+" must be "+n,dt.ERR_BAD_OPTION_VALUE)}continue}if(n!==true){throw new dt("Unknown option "+s,dt.ERR_BAD_OPTION)}}}const Qe={assertOptions:Ze,validators:Xe};const tn=Qe.validators;class en{constructor(t){this.defaults=t;this.interceptors={request:new xt,response:new xt}}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){Qe.assertOptions(n,{silentJSONParsing:tn.transitional(tn.boolean),forcedJSONParsing:tn.transitional(tn.boolean),clarifyTimeoutError:tn.transitional(tn.boolean)},false)}if(o!=null){if(ft.isFunction(o)){e.paramsSerializer={serialize:o}}else{Qe.assertOptions(o,{encode:tn.function,serialize:tn.function},true)}}e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=r&&ft.merge(r.common,r[e.method]);r&&ft.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]}));e.headers=se.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=[We.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=We.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=Re(t.baseURL,t.url);return jt(e,t.params,t.paramsSerializer)}}ft.forEach(["delete","get","head","options"],(function t(e){en.prototype[e]=function(t,n){return this.request(Ee(n||{},{method:e,url:t,data:(n||{}).data}))}}));ft.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}))}}en.prototype[e]=n();en.prototype[e+"Form"]=n(true)}));const nn=en;class on{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 ue(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 on((function e(n){t=n}));return{token:e,cancel:t}}}const rn=on;function sn(t){return function e(n){return t.apply(null,n)}}function cn(t){return ft.isObject(t)&&t.isAxiosError===true}const un={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(un).forEach((([t,e])=>{un[e]=t}));const an=un;function ln(t){const e=new nn(t);const n=o(nn.prototype.request,e);ft.extend(n,nn.prototype,e,{allOwnKeys:true});ft.extend(n,e,null,{allOwnKeys:true});n.create=function e(n){return ln(Ee(t,n))};return n}const fn=ln(Vt);fn.Axios=nn;fn.CanceledError=ue;fn.CancelToken=rn;fn.isCancel=ce;fn.VERSION=Ge;fn.toFormData=Ot;fn.AxiosError=dt;fn.Cancel=fn.CanceledError;fn.all=function t(e){return Promise.all(e)};fn.spread=sn;fn.isAxiosError=cn;fn.mergeConfig=Ee;fn.AxiosHeaders=se;fn.formToJSON=t=>Ht(ft.isHTMLForm(t)?new FormData(t):t);fn.getAdapter=Ke.getAdapter;fn.HttpStatusCode=an;fn.default=fn;const dn=fn;const hn="https://wake-middleware.crmbonus.com/api";class pn{constructor(){this.axiosInstance=dn.create({baseURL:hn,headers:{"Content-Type":"application/json",accept:"application/json"}})}static getInstance(){if(this._instance){return this._instance}this._instance=new pn;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(t){const e=localStorage.getItem("@BYCODERS_KEY");const n={"Content-Type":"application/json",Authorization:`Bearer ${e}`};await this.axiosInstance.patch(`/checkouts/${t.cartId}/updateOrder`,{orderId:t.orderId,externalId:t.cartIdCrm},{headers:n});localStorage.removeItem("@BYCODERS_KEY")}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(e){var n,o;const r=await this.axiosInstance.post("/wake/requestToken",{storeName:e});this.token=(n=r===null||r===void 0?void 0:r.data)===null||n===void 0?void 0:n.token;localStorage.setItem(t,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 n={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`};const o=await this.axiosInstance.get(`/stores/${t}/customizations`,{headers:n});localStorage.setItem(e(t),JSON.stringify(o.data))}async cancelBonus(e,o){const r=localStorage.getItem(t);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(n)}}pn._instance=null;export{pn as C};
2
+ //# sourceMappingURL=p-641b4efd.js.map