@everymatrix/cashier-receipt-page 1.39.2 → 1.40.0

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.
@@ -573,7 +573,7 @@ e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"}
573
573
  // (67:2) {#if !hidebuttons || hidebuttons === 'false'}
574
574
  function _r(e){let t,r,n,i,o,s,a=/*$_*/e[5]("errorGeneralButton")+"";return{c(){t=m("div"),r=m("slot"),n=m("span"),i=d(a),y(r,"name","button"),y(t,"class","CashierErrorButton")},m(a,l){p(a,t,l),h(t,r),h(r,n),h(n,i),o||(s=b(t,"click",/*close*/e[6]),o=!0)},p(e,t){/*$_*/32&t&&a!==(a=/*$_*/e[5]("errorGeneralButton")+"")&&v(i,a)},d(e){e&&f(t),o=!1,s()}}}function Pr(t){let r,n,i,o,s,a,l,c,u,b,E,T,w=/*$_*/t[5]("errorGeneralTitle")+"",C=/*$_*/t[5](`${/*errorcode*/t[3]||"errorGeneralText"}`)+"",H=/*assetsurl*/t[0]&&Lr(t),B=(!/*hidebuttons*/t[2]||/*hidebuttons*/"false"===t[2])&&_r(t);return{c(){r=m("div"),n=m("div"),i=m("slot"),H&&H.c(),o=g(),s=m("slot"),a=m("span"),l=d(w),c=g(),u=m("slot"),b=m("span"),E=d(C),T=g(),B&&B.c(),this.c=e,y(i,"name","icon"),y(i,"class","CashierErrorIcon"),y(s,"name","title"),y(s,"class","CashierErrorTitle"),y(u,"name","text"),y(u,"class","CashierErrorText"),y(n,"class","CashierErrorContent"),y(r,"class","CashierError")},m(e,f){p(e,r,f),h(r,n),h(n,i),H&&H.m(i,null),h(n,o),h(n,s),h(s,a),h(a,l),h(n,c),h(n,u),h(u,b),h(b,E),h(n,T),B&&B.m(n,null)
575
575
  /*div1_binding*/,t[11](r)},p(e,[t]){/*assetsurl*/e[0]?H?H.p(e,t):(H=Lr(e),H.c(),H.m(i,null)):H&&(H.d(1),H=null),/*$_*/32&t&&w!==(w=/*$_*/e[5]("errorGeneralTitle")+"")&&v(l,w),/*$_, errorcode*/40&t&&C!==(C=/*$_*/e[5](`${/*errorcode*/e[3]||"errorGeneralText"}`)+"")&&v(E,C),/*hidebuttons*/e[2]&&/*hidebuttons*/"false"!==e[2]?B&&(B.d(1),B=null):B?B.p(e,t):(B=_r(e),B.c(),B.m(n,null))},i:e,o:e,d(e){e&&f(r),H&&H.d(),B&&B.d()
576
- /*div1_binding*/,t[11](null)}}}function Sr(e,t,r){let n;c(e,Hr,(e=>r(5,n=e)));let i,{assetsurl:o=""}=t,{imgurl:s=""}=t,{lang:a="en"}=t,{hidebuttons:l=""}=t,{errorcode:u=""}=t,{clientstyling:h=""}=t,{clientstylingurl:p=""}=t,{translationurl:f=""}=t;Object.keys(Ar).forEach((e=>{Br(e,Ar[e])}));const m=()=>{var e;e=a,ir.set(e)};return e.$$set=e=>{"assetsurl"in e&&r(0,o=e.assetsurl),"imgurl"in e&&r(1,s=e.imgurl),"lang"in e&&r(7,a=e.lang),"hidebuttons"in e&&r(2,l=e.hidebuttons),"errorcode"in e&&r(3,u=e.errorcode),"clientstyling"in e&&r(8,h=e.clientstyling),"clientstylingurl"in e&&r(9,p=e.clientstylingurl),"translationurl"in e&&r(10,f=e.translationurl)},e.$$.update=()=>{/*lang*/128&e.$$.dirty&&a&&m(),/*clientstyling, customStylingContainer*/272&e.$$.dirty&&h&&i&&(()=>{let e=document.createElement("style");e.innerHTML=h,i.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/528&e.$$.dirty&&p&&i&&(()=>{let e=new URL(p),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{i.appendChild(t)}),1)}))})(),/*translationurl*/1024&e.$$.dirty&&f&&fetch(f).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Br(t,e[t])}))})).catch((e=>{console.log(e)}))},[o,s,l,u,i,n,()=>{window.postMessage({type:"ErrorClose"},window.location.href)},a,h,p,f,function(e){B[e?"unshift":"push"]((()=>{i=e,r(4,i)}))}]}function Rr(e,t){Rt(e,t)}!customElements.get("cashier-error")&&customElements.define("cashier-error",class extends U{constructor(e){super();const t=document.createElement("style");t.textContent=".CashierError{display:flex;width:100%;justify-content:center}.CashierErrorContent{display:flex;flex-direction:column;width:100%;max-width:400px;align-items:center;gap:var(--emw--spacing-large, 20px);box-sizing:border-box;padding:0 var(--emw--spacing-medium, 15px)}.CashierErrorTitle{color:var(--emw--color-black, #000);font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:120%;text-align:center}.CashierErrorText{color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:120%;text-align:center}.CashierErrorButton{display:flex;width:100%;height:36px;flex-direction:column;justify-content:center;flex-shrink:0;color:var(--emw--color-white, #FFF);cursor:pointer;text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);font-family:inherit;line-height:36px;border-radius:var(--emw--border-radius-medium, 4px);background:var(--emw--color-primary, #7EC51E)}.CashierErrorButton:hover{background:var(--mmw--color-main-button-hover, #71B11B)}.CashierErrorButton:active{background:var(--mmw--color-main-button-active, #5C950F)}",this.shadowRoot.appendChild(t),D(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},Sr,Pr,o,{assetsurl:0,imgurl:1,lang:7,hidebuttons:2,errorcode:3,clientstyling:8,clientstylingurl:9,translationurl:10},null),e&&(e.target&&p(e.target,this,e.anchor),e.props&&(this.$set(e.props),N()))}static get observedAttributes(){return["assetsurl","imgurl","lang","hidebuttons","errorcode","clientstyling","clientstylingurl","translationurl"]}get assetsurl(){return this.$$.ctx[0]}set assetsurl(e){this.$$set({assetsurl:e}),N()}get imgurl(){return this.$$.ctx[1]}set imgurl(e){this.$$set({imgurl:e}),N()}get lang(){return this.$$.ctx[7]}set lang(e){this.$$set({lang:e}),N()}get hidebuttons(){return this.$$.ctx[2]}set hidebuttons(e){this.$$set({hidebuttons:e}),N()}get errorcode(){return this.$$.ctx[3]}set errorcode(e){this.$$set({errorcode:e}),N()}get clientstyling(){return this.$$.ctx[8]}set clientstyling(e){this.$$set({clientstyling:e}),N()}get clientstylingurl(){return this.$$.ctx[9]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),N()}get translationurl(){return this.$$.ctx[10]}set translationurl(e){this.$$set({translationurl:e}),N()}}),Vt({fallbackLocale:"en"});const Or={en:{deposit:{success:{title:"{amount} {currency}",subTitle:"Deposited in your account",text:"Your deposit is successful"},pending:{title:"{amount} {currency}",subTitle:"Transaction is in progress",text:"Thank you. Your deposit is being processed."},reject:{title:"Deposit Rejected",subTitle:" ",text:" "},fail:{title:"Error",subTitle:" ",text:"{errorText}"},cancel:{title:"You have cancelled the transaction",subTitle:" ",text:" "}},withdrawal:{success:{title:"{amount} {currency}",subTitle:"Withdrawn from your account",text:"Your withdrawal is successful"},pending:{title:"{amount} {currency}",subTitle:"Withdrawn from your account",text:"Thank you. Your withdrawal is being processed."},reject:{title:"Withdrawal Rejected",subTitle:" ",text:" "},fail:{title:"Error",subTitle:" ",text:"{errorText}"},cancel:{title:"You have cancelled the transaction",subTitle:" ",text:" "}},reference:"Reference ID: {code}",close:"Close"},"pt-br":{deposit:{success:{title:"{amount} {currency}",subTitle:"Depositado em sua conta",text:"Seu depósito foi bem-sucedido"},pending:{title:"{amount} {currency}",subTitle:"Transação em andamento",text:"Obrigado. Seu depósito está sendo processado."},reject:{title:"Depósito Rejeitado",subTitle:"",text:"{errorText}"},fail:{title:"Erro",subTitle:"",text:"{errorText}"},cancel:{title:"Você cancelou a transação",subTitle:"",text:"{errorText}"}},reference:"Referência ID: {code}",close:"VOLTAR AO PROVEDOR DE PAGAMENTO"},"es-mx":{deposit:{success:{title:"{amount} {currency}",subTitle:"Depositado en tu cuenta",text:"Tu depósito fue exitoso"},pending:{title:"{amount} {currency}",subTitle:"Transacción en proceso",text:"Gracias. Tu depósito está siendo procesado."},reject:{title:"Depósito Rechazado",subTitle:" ",text:"{errorText}"},fail:{title:"Error",subTitle:" ",text:"{errorText}"},cancel:{title:"Has cancelado la transacción",subTitle:" ",text:"{errorText}"}},reference:"Referencia ID: {code}",close:"REGRESAR A PROVEEDOR DE PAGO"}},Nr={Success:"/txn-success.png",Voided:"/txn-success.png",Rejected:"/txn-failed.png",Failed:"/txn-failed.png",Canceled:"/txn-failed.png",PendingNotification:"/txn-pending.png",PendingConfirmation:"/txn-pending.png",PendingApprovalStage1:"/txn-pending.png",PendingApprovalStage2:"/txn-pending.png",PendingApprovalStage3:"/txn-pending.png",PendingOfflineNotification:"/txn-pending.png"},Ir={Deposit:"deposit",Withdraw:"withdrawal"},Mr={Success:"success",Voided:"success",Rejected:"reject",Failed:"fail",Canceled:"cancel",PendingNotification:"pending",PendingConfirmation:"pending",PendingApprovalStage1:"pending",PendingApprovalStage3:"pending",PendingApprovalStage2:"pending",PendingOfflineNotification:"pending"},{document:xr}=u;function $r(e,t,r){const n=e.slice();return n[43]=t[r],n[45]=r,n}
576
+ /*div1_binding*/,t[11](null)}}}function Sr(e,t,r){let n;c(e,Hr,(e=>r(5,n=e)));let i,{assetsurl:o=""}=t,{imgurl:s=""}=t,{lang:a="en"}=t,{hidebuttons:l=""}=t,{errorcode:u=""}=t,{clientstyling:h=""}=t,{clientstylingurl:p=""}=t,{translationurl:f=""}=t;const m=()=>{var e;e=a,ir.set(e)};Object.keys(Ar).forEach((e=>{Br(e,Ar[e])}));return e.$$set=e=>{"assetsurl"in e&&r(0,o=e.assetsurl),"imgurl"in e&&r(1,s=e.imgurl),"lang"in e&&r(7,a=e.lang),"hidebuttons"in e&&r(2,l=e.hidebuttons),"errorcode"in e&&r(3,u=e.errorcode),"clientstyling"in e&&r(8,h=e.clientstyling),"clientstylingurl"in e&&r(9,p=e.clientstylingurl),"translationurl"in e&&r(10,f=e.translationurl)},e.$$.update=()=>{/*lang*/128&e.$$.dirty&&a&&m(),/*clientstyling, customStylingContainer*/272&e.$$.dirty&&h&&i&&(()=>{let e=document.createElement("style");e.innerHTML=h,i.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/528&e.$$.dirty&&p&&i&&(()=>{let e=new URL(p),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{i.appendChild(t)}),1)}))})(),/*translationurl*/1024&e.$$.dirty&&f&&fetch(f).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Br(t,e[t])}))})).catch((e=>{console.log(e)}))},[o,s,l,u,i,n,()=>{window.postMessage({type:"ErrorClose"},window.location.href)},a,h,p,f,function(e){B[e?"unshift":"push"]((()=>{i=e,r(4,i)}))}]}function Rr(e,t){Rt(e,t)}!customElements.get("cashier-error")&&customElements.define("cashier-error",class extends U{constructor(e){super();const t=document.createElement("style");t.textContent=".CashierError{display:flex;width:100%;justify-content:center}.CashierErrorContent{display:flex;flex-direction:column;width:100%;max-width:400px;align-items:center;gap:var(--emw--spacing-large, 20px);box-sizing:border-box;padding:0 var(--emw--spacing-medium, 15px)}.CashierErrorTitle{color:var(--emw--color-black, #000);font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:120%;text-align:center}.CashierErrorText{color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:120%;text-align:center}.CashierErrorButton{display:flex;width:100%;height:36px;flex-direction:column;justify-content:center;flex-shrink:0;color:var(--emw--color-white, #FFF);cursor:pointer;text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);font-family:inherit;line-height:36px;border-radius:var(--emw--border-radius-medium, 4px);background:var(--emw--color-primary, #7EC51E)}.CashierErrorButton:hover{background:var(--mmw--color-main-button-hover, #71B11B)}.CashierErrorButton:active{background:var(--mmw--color-main-button-active, #5C950F)}",this.shadowRoot.appendChild(t),D(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},Sr,Pr,o,{assetsurl:0,imgurl:1,lang:7,hidebuttons:2,errorcode:3,clientstyling:8,clientstylingurl:9,translationurl:10},null),e&&(e.target&&p(e.target,this,e.anchor),e.props&&(this.$set(e.props),N()))}static get observedAttributes(){return["assetsurl","imgurl","lang","hidebuttons","errorcode","clientstyling","clientstylingurl","translationurl"]}get assetsurl(){return this.$$.ctx[0]}set assetsurl(e){this.$$set({assetsurl:e}),N()}get imgurl(){return this.$$.ctx[1]}set imgurl(e){this.$$set({imgurl:e}),N()}get lang(){return this.$$.ctx[7]}set lang(e){this.$$set({lang:e}),N()}get hidebuttons(){return this.$$.ctx[2]}set hidebuttons(e){this.$$set({hidebuttons:e}),N()}get errorcode(){return this.$$.ctx[3]}set errorcode(e){this.$$set({errorcode:e}),N()}get clientstyling(){return this.$$.ctx[8]}set clientstyling(e){this.$$set({clientstyling:e}),N()}get clientstylingurl(){return this.$$.ctx[9]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),N()}get translationurl(){return this.$$.ctx[10]}set translationurl(e){this.$$set({translationurl:e}),N()}}),Vt({fallbackLocale:"en"});const Or={en:{deposit:{success:{title:"{amount} {currency}",subTitle:"Deposited in your account",text:"Your deposit is successful"},pending:{title:"{amount} {currency}",subTitle:"Transaction is in progress",text:"Thank you. Your deposit is being processed."},reject:{title:"Deposit Rejected",subTitle:" ",text:" "},fail:{title:"Error",subTitle:" ",text:"{errorText}"},cancel:{title:"You have cancelled the transaction",subTitle:" ",text:" "}},withdrawal:{success:{title:"{amount} {currency}",subTitle:"Withdrawn from your account",text:"Your withdrawal is successful"},pending:{title:"{amount} {currency}",subTitle:"Withdrawn from your account",text:"Thank you. Your withdrawal is being processed."},reject:{title:"Withdrawal Rejected",subTitle:" ",text:" "},fail:{title:"Error",subTitle:" ",text:"{errorText}"},cancel:{title:"You have cancelled the transaction",subTitle:" ",text:" "}},reference:"Reference ID: {code}",close:"Close"},"pt-br":{deposit:{success:{title:"{amount} {currency}",subTitle:"Depositado em sua conta",text:"Seu depósito foi bem-sucedido"},pending:{title:"{amount} {currency}",subTitle:"Transação em andamento",text:"Obrigado. Seu depósito está sendo processado."},reject:{title:"Depósito Rejeitado",subTitle:"",text:"{errorText}"},fail:{title:"Erro",subTitle:"",text:"{errorText}"},cancel:{title:"Você cancelou a transação",subTitle:"",text:"{errorText}"}},reference:"Referência ID: {code}",close:"VOLTAR AO PROVEDOR DE PAGAMENTO"},"es-mx":{deposit:{success:{title:"{amount} {currency}",subTitle:"Depositado en tu cuenta",text:"Tu depósito fue exitoso"},pending:{title:"{amount} {currency}",subTitle:"Transacción en proceso",text:"Gracias. Tu depósito está siendo procesado."},reject:{title:"Depósito Rechazado",subTitle:" ",text:"{errorText}"},fail:{title:"Error",subTitle:" ",text:"{errorText}"},cancel:{title:"Has cancelado la transacción",subTitle:" ",text:"{errorText}"}},reference:"Referencia ID: {code}",close:"REGRESAR A PROVEEDOR DE PAGO"}},Nr={Success:"/txn-success.png",Voided:"/txn-success.png",Rejected:"/txn-failed.png",Failed:"/txn-failed.png",Canceled:"/txn-failed.png",PendingNotification:"/txn-pending.png",PendingConfirmation:"/txn-pending.png",PendingApprovalStage1:"/txn-pending.png",PendingApprovalStage2:"/txn-pending.png",PendingApprovalStage3:"/txn-pending.png",PendingOfflineNotification:"/txn-pending.png"},Ir={Deposit:"deposit",Withdraw:"withdrawal"},Mr={Success:"success",Voided:"success",Rejected:"reject",Failed:"fail",Canceled:"cancel",PendingNotification:"pending",PendingConfirmation:"pending",PendingApprovalStage1:"pending",PendingApprovalStage3:"pending",PendingApprovalStage2:"pending",PendingOfflineNotification:"pending"},{document:xr}=u;function $r(e,t,r){const n=e.slice();return n[43]=t[r],n[45]=r,n}
577
577
  // (258:65)
578
578
  function Dr(e){let t;return{c(){t=m("cashier-error"),E(t,"assetsurl",/*assetsurl*/e[3]),E(t,"translationurl",/*translationurl*/e[2]),E(t,"clientstylingurl",/*clientstylingurl*/e[5]),E(t,"clientstyling",/*clientstyling*/e[4]),E(t,"hidebuttons","true"),E(t,"errorcode",/*errorResponseCode*/e[15])},m(e,r){p(e,t,r)},p(e,r){/*assetsurl*/8&r[0]&&E(t,"assetsurl",/*assetsurl*/e[3]),/*translationurl*/4&r[0]&&E(t,"translationurl",/*translationurl*/e[2]),/*clientstylingurl*/32&r[0]&&E(t,"clientstylingurl",/*clientstylingurl*/e[5]),/*clientstyling*/16&r[0]&&E(t,"clientstyling",/*clientstyling*/e[4]),/*errorResponseCode*/32768&r[0]&&E(t,"errorcode",/*errorResponseCode*/e[15])},d(e){e&&f(t)}}}
579
579
  // (204:5) {#if txnInfo}