@everymatrix/cashier-method-details 1.39.2 → 1.40.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,8 @@
3
3
 
4
4
  | Version | Release date | Impacted areas | Changes |
5
5
  | ------- | ------------ | ----------------------------- | --------------------------------------- |
6
+ | 1.39.3 | Thu Sep 12 2024 | cashier-method-details | fix(MMFE-1161)(cashier-page,cashier-error,cashier-method-details,cashier-verifications): fix translations for header, fix verifications displaying |
7
+ | 1.39.2 | Tue Sep 10 2024 | cashier-method-details | style(MMFE-1104)(cashier-iframe-redirect,cashier-method-details,cashier-methods-list,cashier-modal,cashier-session-expiration-modal): decrease selectors priority |
6
8
  | 1.39.0 | Tue Sep 03 2024 | cashier-method-details | fix(MMFE-1126)(cashier-page,cashier-header,cashier-method-details,cashier-receipt-page): fix translations for header, fixes for receipt page |
7
9
  | 1.38.0 | Fri Aug 30 2024 | cashier-method-details | feat(MMFE-1100)(cashier-error,cashier-method-details,cashier-page,cashier-session-expiration-modal): add session expiration widget |
8
10
  | 1.37.4 | Fri Aug 16 2024 | cashier-method-details | fix(MMFE-1125)(cashier-method-details,cashier-modal): fix error message displaying for getPaymentMethodDetails, fix styles for modal |
@@ -700,7 +700,7 @@ function Mi(e){let t;return{c(){t=C("cashier-spinner"),L(t,"clientstylingurl",/*
700
700
  // (67:2) {#if !hidebuttons || hidebuttons === 'false'}
701
701
  function Li(e){let t,n,r,i,o,a,s=/*$_*/e[5]("errorGeneralButton")+"";return{c(){t=C("div"),n=C("slot"),r=C("span"),i=E(s),A(n,"name","button"),A(t,"class","CashierErrorButton")},m(s,l){v(s,t,l),y(t,n),y(n,r),y(r,i),o||(a=S(t,"click",/*close*/e[6]),o=!0)},p(e,t){/*$_*/32&t&&s!==(s=/*$_*/e[5]("errorGeneralButton")+"")&&$(i,s)},d(e){e&&k(t),o=!1,a()}}}function _i(t){let n,r,i,o,a,s,l,c,u,d,h,p,f=/*$_*/t[5]("errorGeneralTitle")+"",m=/*$_*/t[5](`${/*errorcode*/t[3]||"errorGeneralText"}`)+"",g=/*assetsurl*/t[0]&&Ai(t),b=(!/*hidebuttons*/t[2]||/*hidebuttons*/"false"===t[2])&&Li(t);return{c(){n=C("div"),r=C("div"),i=C("slot"),g&&g.c(),o=D(),a=C("slot"),s=C("span"),l=E(f),c=D(),u=C("slot"),d=C("span"),h=E(m),p=D(),b&&b.c(),this.c=e,A(i,"name","icon"),A(i,"class","CashierErrorIcon"),A(a,"name","title"),A(a,"class","CashierErrorTitle"),A(u,"name","text"),A(u,"class","CashierErrorText"),A(r,"class","CashierErrorContent"),A(n,"class","CashierError")},m(e,f){v(e,n,f),y(n,r),y(r,i),g&&g.m(i,null),y(r,o),y(r,a),y(a,s),y(s,l),y(r,c),y(r,u),y(u,d),y(d,h),y(r,p),b&&b.m(r,null)
702
702
  /*div1_binding*/,t[11](n)},p(e,[t]){/*assetsurl*/e[0]?g?g.p(e,t):(g=Ai(e),g.c(),g.m(i,null)):g&&(g.d(1),g=null),/*$_*/32&t&&f!==(f=/*$_*/e[5]("errorGeneralTitle")+"")&&$(l,f),/*$_, errorcode*/40&t&&m!==(m=/*$_*/e[5](`${/*errorcode*/e[3]||"errorGeneralText"}`)+"")&&$(h,m),/*hidebuttons*/e[2]&&/*hidebuttons*/"false"!==e[2]?b&&(b.d(1),b=null):b?b.p(e,t):(b=Li(e),b.c(),b.m(r,null))},i:e,o:e,d(e){e&&k(n),g&&g.d(),b&&b.d()
703
- /*div1_binding*/,t[11](null)}}}function $i(e,t,n){let r;u(e,ui,(e=>n(5,r=e)));let i,{assetsurl:o=""}=t,{imgurl:a=""}=t,{lang:s="en"}=t,{hidebuttons:l=""}=t,{errorcode:c=""}=t,{clientstyling:d=""}=t,{clientstylingurl:h=""}=t,{translationurl:p=""}=t;Object.keys(Si).forEach((e=>{Ti(e,Si[e])}));const f=()=>{var e;e=s,Yr.set(e)};return e.$$set=e=>{"assetsurl"in e&&n(0,o=e.assetsurl),"imgurl"in e&&n(1,a=e.imgurl),"lang"in e&&n(7,s=e.lang),"hidebuttons"in e&&n(2,l=e.hidebuttons),"errorcode"in e&&n(3,c=e.errorcode),"clientstyling"in e&&n(8,d=e.clientstyling),"clientstylingurl"in e&&n(9,h=e.clientstylingurl),"translationurl"in e&&n(10,p=e.translationurl)},e.$$.update=()=>{/*lang*/128&e.$$.dirty&&s&&f(),/*clientstyling, customStylingContainer*/272&e.$$.dirty&&d&&i&&(()=>{let e=document.createElement("style");e.innerHTML=d,i.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/528&e.$$.dirty&&h&&i&&(()=>{let e=new URL(h),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&&p&&fetch(p).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Ti(t,e[t])}))})).catch((e=>{console.log(e)}))},[o,a,l,c,i,r,()=>{window.postMessage({type:"ErrorClose"},window.location.href)},s,d,h,p,function(e){K[e?"unshift":"push"]((()=>{i=e,n(4,i)}))}]}function Pi(e,t){yr(e,t)}!customElements.get("cashier-error")&&customElements.define("cashier-error",class extends ge{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),me(this,{target:this.shadowRoot,props:R(this.attributes),customElement:!0},$i,_i,a,{assetsurl:0,imgurl:1,lang:7,hidebuttons:2,errorcode:3,clientstyling:8,clientstylingurl:9,translationurl:10},null),e&&(e.target&&v(e.target,this,e.anchor),e.props&&(this.$set(e.props),ie()))}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}),ie()}get imgurl(){return this.$$.ctx[1]}set imgurl(e){this.$$set({imgurl:e}),ie()}get lang(){return this.$$.ctx[7]}set lang(e){this.$$set({lang:e}),ie()}get hidebuttons(){return this.$$.ctx[2]}set hidebuttons(e){this.$$set({hidebuttons:e}),ie()}get errorcode(){return this.$$.ctx[3]}set errorcode(e){this.$$set({errorcode:e}),ie()}get clientstyling(){return this.$$.ctx[8]}set clientstyling(e){this.$$set({clientstyling:e}),ie()}get clientstylingurl(){return this.$$.ctx[9]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),ie()}get translationurl(){return this.$$.ctx[10]}set translationurl(e){this.$$set({translationurl:e}),ie()}}),Lr({fallbackLocale:"en"});const Oi={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"}},Hi={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"},Ii={Deposit:"deposit",Withdraw:"withdrawal"},Ni={Success:"success",Voided:"success",Rejected:"reject",Failed:"fail",Canceled:"cancel",PendingNotification:"pending",PendingConfirmation:"pending",PendingApprovalStage1:"pending",PendingApprovalStage3:"pending",PendingApprovalStage2:"pending",PendingOfflineNotification:"pending"},{document:Bi}=g;function Ri(e,t,n){const r=e.slice();return r[43]=t[n],r[45]=n,r}
703
+ /*div1_binding*/,t[11](null)}}}function $i(e,t,n){let r;u(e,ui,(e=>n(5,r=e)));let i,{assetsurl:o=""}=t,{imgurl:a=""}=t,{lang:s="en"}=t,{hidebuttons:l=""}=t,{errorcode:c=""}=t,{clientstyling:d=""}=t,{clientstylingurl:h=""}=t,{translationurl:p=""}=t;const f=()=>{var e;e=s,Yr.set(e)};Object.keys(Si).forEach((e=>{Ti(e,Si[e])}));return e.$$set=e=>{"assetsurl"in e&&n(0,o=e.assetsurl),"imgurl"in e&&n(1,a=e.imgurl),"lang"in e&&n(7,s=e.lang),"hidebuttons"in e&&n(2,l=e.hidebuttons),"errorcode"in e&&n(3,c=e.errorcode),"clientstyling"in e&&n(8,d=e.clientstyling),"clientstylingurl"in e&&n(9,h=e.clientstylingurl),"translationurl"in e&&n(10,p=e.translationurl)},e.$$.update=()=>{/*lang*/128&e.$$.dirty&&s&&f(),/*clientstyling, customStylingContainer*/272&e.$$.dirty&&d&&i&&(()=>{let e=document.createElement("style");e.innerHTML=d,i.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/528&e.$$.dirty&&h&&i&&(()=>{let e=new URL(h),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&&p&&fetch(p).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Ti(t,e[t])}))})).catch((e=>{console.log(e)}))},[o,a,l,c,i,r,()=>{window.postMessage({type:"ErrorClose"},window.location.href)},s,d,h,p,function(e){K[e?"unshift":"push"]((()=>{i=e,n(4,i)}))}]}function Pi(e,t){yr(e,t)}!customElements.get("cashier-error")&&customElements.define("cashier-error",class extends ge{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),me(this,{target:this.shadowRoot,props:R(this.attributes),customElement:!0},$i,_i,a,{assetsurl:0,imgurl:1,lang:7,hidebuttons:2,errorcode:3,clientstyling:8,clientstylingurl:9,translationurl:10},null),e&&(e.target&&v(e.target,this,e.anchor),e.props&&(this.$set(e.props),ie()))}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}),ie()}get imgurl(){return this.$$.ctx[1]}set imgurl(e){this.$$set({imgurl:e}),ie()}get lang(){return this.$$.ctx[7]}set lang(e){this.$$set({lang:e}),ie()}get hidebuttons(){return this.$$.ctx[2]}set hidebuttons(e){this.$$set({hidebuttons:e}),ie()}get errorcode(){return this.$$.ctx[3]}set errorcode(e){this.$$set({errorcode:e}),ie()}get clientstyling(){return this.$$.ctx[8]}set clientstyling(e){this.$$set({clientstyling:e}),ie()}get clientstylingurl(){return this.$$.ctx[9]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),ie()}get translationurl(){return this.$$.ctx[10]}set translationurl(e){this.$$set({translationurl:e}),ie()}}),Lr({fallbackLocale:"en"});const Oi={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"}},Hi={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"},Ii={Deposit:"deposit",Withdraw:"withdrawal"},Ni={Success:"success",Voided:"success",Rejected:"reject",Failed:"fail",Canceled:"cancel",PendingNotification:"pending",PendingConfirmation:"pending",PendingApprovalStage1:"pending",PendingApprovalStage3:"pending",PendingApprovalStage2:"pending",PendingOfflineNotification:"pending"},{document:Bi}=g;function Ri(e,t,n){const r=e.slice();return r[43]=t[n],r[45]=n,r}
704
704
  // (258:65)
705
705
  function Fi(e){let t;return{c(){t=C("cashier-error"),L(t,"assetsurl",/*assetsurl*/e[3]),L(t,"translationurl",/*translationurl*/e[2]),L(t,"clientstylingurl",/*clientstylingurl*/e[5]),L(t,"clientstyling",/*clientstyling*/e[4]),L(t,"hidebuttons","true"),L(t,"errorcode",/*errorResponseCode*/e[15])},m(e,n){v(e,t,n)},p(e,n){/*assetsurl*/8&n[0]&&L(t,"assetsurl",/*assetsurl*/e[3]),/*translationurl*/4&n[0]&&L(t,"translationurl",/*translationurl*/e[2]),/*clientstylingurl*/32&n[0]&&L(t,"clientstylingurl",/*clientstylingurl*/e[5]),/*clientstyling*/16&n[0]&&L(t,"clientstyling",/*clientstyling*/e[4]),/*errorResponseCode*/32768&n[0]&&L(t,"errorcode",/*errorResponseCode*/e[15])},d(e){e&&k(t)}}}
706
706
  // (204:5) {#if txnInfo}
@@ -857,7 +857,7 @@ function Ea(e){let t,n,r,i,o,a,s,c,u,d,h,p,f,m,g=/*$_*/e[36]("redirectTitle")+""
857
857
  // (942:6) {#if showReceiptPage}
858
858
  function Da(e){let t,n;return{c(){t=C("div"),n=C("cashier-receipt-page"),L(n,"lang",/*lang*/e[2]),L(n,"translationurl",/*translationurl*/e[4]),L(n,"local",/*local*/e[3]),L(n,"endpoint",/*endpoint*/e[0]),L(n,"customerid",/*customerid*/e[5]),L(n,"assetsurl",/*assetsurl*/e[8]),L(n,"clientstylingurl",/*clientstylingurl*/e[11]),L(n,"clientstyling",/*clientstyling*/e[10]),L(n,"showerrors","false"),L(n,"showclosebutton","true"),L(n,"showcontactbutton","true"),L(n,"transactionid",/*transactionId*/e[34]),L(n,"session",/*playersession*/e[1]),A(t,"class","ReceiptPage")},m(e,r){v(e,t,r),y(t,n)},p(e,t){/*lang*/4&t[0]&&L(n,"lang",/*lang*/e[2]),/*translationurl*/16&t[0]&&L(n,"translationurl",/*translationurl*/e[4]),/*local*/8&t[0]&&L(n,"local",/*local*/e[3]),/*endpoint*/1&t[0]&&L(n,"endpoint",/*endpoint*/e[0]),/*customerid*/32&t[0]&&L(n,"customerid",/*customerid*/e[5]),/*assetsurl*/256&t[0]&&L(n,"assetsurl",/*assetsurl*/e[8]),/*clientstylingurl*/2048&t[0]&&L(n,"clientstylingurl",/*clientstylingurl*/e[11]),/*clientstyling*/1024&t[0]&&L(n,"clientstyling",/*clientstyling*/e[10]),/*transactionId*/8&t[1]&&L(n,"transactionid",/*transactionId*/e[34]),/*playersession*/2&t[0]&&L(n,"session",/*playersession*/e[1])},d(e){e&&k(t)}}}
859
859
  // (964:2) {#if errorResponseCode && !showErrorModal}
860
- function Ta(e){let t,n,r,i,o,a,s=/*$_*/e[36]("backToMethodList")+"";return{c(){t=C("cashier-error"),n=C("div"),r=E(s),A(n,"slot","button"),A(n,"class","ModalButton"),L(t,"assetsurl",/*assetsurl*/e[8]),L(t,"translationurl",/*translationurl*/e[4]),L(t,"clientstylingurl",/*clientstylingurl*/e[11]),L(t,"clientstyling",/*clientstyling*/e[10]),L(t,"hidebuttons",i=`${!/*mobileView*/e[24]}`),L(t,"errorcode",/*errorResponseCode*/e[32])},m(i,s){v(i,t,s),y(t,n),y(n,r),o||(a=S(n,"click",/*backToMethodList*/e[40]),o=!0)},p(e,n){/*$_*/32&n[1]&&s!==(s=/*$_*/e[36]("backToMethodList")+"")&&$(r,s),/*assetsurl*/256&n[0]&&L(t,"assetsurl",/*assetsurl*/e[8]),/*translationurl*/16&n[0]&&L(t,"translationurl",/*translationurl*/e[4]),/*clientstylingurl*/2048&n[0]&&L(t,"clientstylingurl",/*clientstylingurl*/e[11]),/*clientstyling*/1024&n[0]&&L(t,"clientstyling",/*clientstyling*/e[10]),/*mobileView*/16777216&n[0]&&i!==(i=`${!/*mobileView*/e[24]}`)&&L(t,"hidebuttons",i),/*errorResponseCode*/2&n[1]&&L(t,"errorcode",/*errorResponseCode*/e[32])},d(e){e&&k(t),o=!1,a()}}}function Sa(t){let n,r,i,o,a,s,c,u;ee(/*onwindowresize*/t[53]);let d=/*showSpinner*/t[35]&&Zo(t),h=/*selectedPaymentMethod*/t[17]?.Name&&Xo(t),p=/*errorResponseCode*/t[32]&&!/*showErrorModal*/t[33]&&Ta(t);return{c(){n=C("script"),i=D(),o=C("div"),d&&d.c(),a=D(),h&&h.c(),s=D(),p&&p.c(),this.c=e,l(n.src,r=Aa)||A(n,"src",r),A(o,"class","CashierMethodDetails")},m(e,r){y(Go.head,n),v(e,i,r),v(e,o,r),d&&d.m(o,null),y(o,a),h&&h.m(o,null),y(o,s),p&&p.m(o,null)
860
+ function Ta(e){let t,n,r,i,o,a,s=/*$_*/e[36]("backToMethodList")+"";return{c(){t=C("cashier-error"),n=C("div"),r=E(s),A(n,"slot","button"),A(n,"class","ModalButton"),L(t,"assetsurl",/*assetsurl*/e[8]),L(t,"translationurl",/*translationurl*/e[4]),L(t,"clientstylingurl",/*clientstylingurl*/e[11]),L(t,"clientstyling",/*clientstyling*/e[10]),L(t,"lang",/*lang*/e[2]),L(t,"hidebuttons",i=`${!/*mobileView*/e[24]}`),L(t,"errorcode",/*errorResponseCode*/e[32])},m(i,s){v(i,t,s),y(t,n),y(n,r),o||(a=S(n,"click",/*backToMethodList*/e[40]),o=!0)},p(e,n){/*$_*/32&n[1]&&s!==(s=/*$_*/e[36]("backToMethodList")+"")&&$(r,s),/*assetsurl*/256&n[0]&&L(t,"assetsurl",/*assetsurl*/e[8]),/*translationurl*/16&n[0]&&L(t,"translationurl",/*translationurl*/e[4]),/*clientstylingurl*/2048&n[0]&&L(t,"clientstylingurl",/*clientstylingurl*/e[11]),/*clientstyling*/1024&n[0]&&L(t,"clientstyling",/*clientstyling*/e[10]),/*lang*/4&n[0]&&L(t,"lang",/*lang*/e[2]),/*mobileView*/16777216&n[0]&&i!==(i=`${!/*mobileView*/e[24]}`)&&L(t,"hidebuttons",i),/*errorResponseCode*/2&n[1]&&L(t,"errorcode",/*errorResponseCode*/e[32])},d(e){e&&k(t),o=!1,a()}}}function Sa(t){let n,r,i,o,a,s,c,u;ee(/*onwindowresize*/t[53]);let d=/*showSpinner*/t[35]&&Zo(t),h=/*selectedPaymentMethod*/t[17]?.Name&&Xo(t),p=/*errorResponseCode*/t[32]&&!/*showErrorModal*/t[33]&&Ta(t);return{c(){n=C("script"),i=D(),o=C("div"),d&&d.c(),a=D(),h&&h.c(),s=D(),p&&p.c(),this.c=e,l(n.src,r=Aa)||A(n,"src",r),A(o,"class","CashierMethodDetails")},m(e,r){y(Go.head,n),v(e,i,r),v(e,o,r),d&&d.m(o,null),y(o,a),h&&h.m(o,null),y(o,s),p&&p.m(o,null)
861
861
  /*div_binding*/,t[81](o),c||(u=S(Jo,"resize",/*onwindowresize*/t[53]),c=!0)},p(e,t){/*showSpinner*/e[35]?d?d.p(e,t):(d=Zo(e),d.c(),d.m(o,a)):d&&(d.d(1),d=null),/*selectedPaymentMethod*/e[17]?.Name?h?h.p(e,t):(h=Xo(e),h.c(),h.m(o,s)):h&&(h.d(1),h=null),/*errorResponseCode*/e[32]&&!/*showErrorModal*/e[33]?p?p.p(e,t):(p=Ta(e),p.c(),p.m(o,null)):p&&(p.d(1),p=null)},i:e,o:e,d(e){k(n),e&&k(i),e&&k(o),d&&d.d(),h&&h.d(),p&&p.d()
862
- /*div_binding*/,t[81](null),c=!1,u()}}}let Aa="https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js";function La(e,t,n){let r;u(e,ui,(e=>n(36,r=e)));class i{constructor(e){this.correlationFieldName=e.CorrelationFieldName||null,this.correlationFieldValue=e.CorrelationFieldValue&&e.CorrelationFieldValue.length>0?e.CorrelationFieldValue.split(","):[],this.name=e.Name||null,this.label=e.Label||null,this.description=e.Description||null,this.type=m.get(e.Type)||null,this.defaultValue=this.calcDefaultValue(e),this.format=this.setPlaceholderOrFormat(e,h.Format),this.placeholder=this.setPlaceholderOrFormat(e,h.Placeholder),this.isReadonly=e.IsReadonly||!1,this.isRequired=e.IsRequired||!1,this.maxValue=this.setValue(e,h.MaxValue),this.minValue=this.setValue(e,h.MinValue),this.isPrimaryField=e.IsPrimaryField||!1,this.demandUserInput=e.DemandUserInput||!1,this.autoTrim=e.AutoTrim||!1,this.autoUppercase=e.AutoUppercase||!1,this.notEqualToFieldName=e.NotEqualToFieldName||null,this.values=e.Values,this.useCopyButton=e.UseCopyButton||!1,this.inputMask=e.InputMask,this.tags=e.Tags||null}calcDefaultValue(e){return this.type===d.Boolean?"True"===e.DefaultValue:p.has(e.Type)?this.setValue(e,h.DefaultValue):e.DefaultValue||null}setPlaceholderOrFormat(e,t){return p.has(e.Type)&&!f.get(e.Placeholder)?p.get(e.Type)[t]:e[t]||null}setValue(e,t){return p.has(e.Type)&&!f.get(e.Placeholder)?Yo(e[t],e.Placeholder).format(p.get(e.Type).Placeholder):e[t]||null}get descriptionWithLink(){if("Boolean"===d[this.type]&&this.placeholder||"Link"===d[this.type]){const e=/{link}/i,t=`<a href="${this.placeholder||this.defaultValue}" target="_blank" rel="noopener noreferrer">${this.label}</a>`;return this.description.match(e)?this.description.replace(e,t):`${this.description} ${t}`}return this.description}}const o=(e,[t,n])=>[...e,...Array.isArray(t)?[...t.map((e=>[e,n]))]:[[t,n]]];var a,s,l;!function(e){e.Deposit="Deposit",e.Withdraw="Withdraw"}(a||(a={})),function(e){e.PlayerSessionIsNotValid="PlayerSessionIsNotValid",e.Success="Success",e.JwtTokenError="JwtTokenError"}(s||(s={})),function(e){e.Default="Default",e.RedirectWithRetry="Redirect"}(l||(l={}));const c=new Map([[["Default",0],l.Default],[["Redirect",1],l.RedirectWithRetry]].reduce(o,[]));var d,h;!function(e){e.Unknown="Unknown",e.Text="Text",e.Boolean="Boolean",e.Number="Number",e.Money="Money",e.DateTime="DateTime",e.Lookup="Lookup",e.IpAddress="IpAddress",e.Date="Date",e.Time="Time",e.LookupCollection="LookupCollection",e.Hidden="Hidden",e.Label="Label",e.Password="Password",e.Link="Link",e.Image="Image",e.Html="Html",e.QRCode="QR"}(d||(d={})),function(e){e.MaxValue="MaxValue",e.MinValue="MinValue",e.DefaultValue="DefaultValue",e.Placeholder="Placeholder",e.Format="Format"}(h||(h={}));const p=new Map([[d.Date,{Placeholder:"MM/DD/YYYY",Format:"^\\d{2}/\\d{2}/\\d{4}$"}],[d.Time,{Placeholder:"HH:mm",Format:"^\\d{2}:\\d{2}$"}],[d.DateTime,{Placeholder:"MM/DD/YYYY HH:mm",Format:"^\\d{2}/\\d{2}/\\d{4} \\d{2}:\\d{2}$"}]]),f=new Map([["MM/DD/YYYY HH:mm","m/d/Y H:i"],["DD.MM.YYYY HH:mm","d.m.Y H:i"],["YYYY-MM-DD","Y-m-d"],["MM/DD/YYYY","m/d/Y"],["DD/MM/YYYY","d/m/Y"],["YYYY.MM.DD","Y.m.d"],["HH:mm","H:i"]]),m=new Map([[["Unknown",0],d.Unknown],[["Text",1],d.Text],[["Boolean",2],d.Boolean],[["Number",3],d.Number],[["Money",4],d.Money],[["DateTime",5],d.DateTime],[["Lookup",6],d.Lookup],[["IpAddress",7],d.IpAddress],[["Date",8],d.Date],[["Time",9],d.Time],[["LookupCollection",10],d.LookupCollection],[["Hidden",11],d.Hidden],[["Label",12],d.Label],[["Password",13],d.Password],[["Link",14],d.Link],[["Image",15],d.Image],[["Html",19],d.Html],[["QR",20],d.QRCode]].reduce(o,[]));let g,y,b,w,v,k,x,C,M,E,D,{endpoint:T}=t,{session:S}=t,{playersession:A}=t,{lang:L="en"}=t,{local:$="en-US"}=t,{translationurl:P}=t,{customerid:O}=t,{currency:H}=t,{amount:I}=t,{assetsurl:N}=t,{type:B=a.Deposit}=t,{selectedpaymentmethodname:R}=t,{clientstyling:F=""}=t,{clientstylingurl:j=""}=t,{ismobileview:z}=t,U={},Y=[],W={},G=!1,V=!1,Z=[],X=[],q=!1;window.matchMedia("(max-width: 750px)");let Q,ee,te,ne,re=new Intl.NumberFormat($,{minimumFractionDigits:2}),ie="",oe={},ae={},se=!1,le=!1,ce="",ue=!0;const de=()=>{var e;e=L,Yr.set(e)};Object.keys(hi).forEach((e=>{di(e,hi[e])}));const he=()=>{const e=new URL(`${T}/v1/player/${O}/payment/GetPaymentMethod`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json");const r={method:"POST",mode:"cors",headers:t,body:JSON.stringify({PaymentMethodName:R,Currency:H,XPaymentSessionToken:S})};fetch(e,r).then((e=>e.json())).then((e=>{if(!e.error)return e.ResponseCode===s.PlayerSessionIsNotValid||e.ResponseCode===s.JwtTokenError?(n(32,te=e.ResponseCode),void ge()):void(e.ResponseCode===s.Success?(g=e.XPaymentSessionToken,n(17,U=e.PaymentMethod),n(31,ee=Number(I)),U.HideAmountField?n(26,ie=""):Oe(),n(12,Y=U.Fields&&U.Fields.map((e=>new i(e)))),Y.forEach((e=>{(null==e?void 0:e.defaultValue)&&n(18,W[e.name]=e.defaultValue,W),Ie(e)})),ye(),ge(),Ce(),window.postMessage({type:"StartSessionCountdown",xPaymentSessionToken:g,selectedPaymentMethodName:R},window.location.href)):n(32,te=e.ResponseCode));window.postMessage({type:"ShowSessionError",error:e.error},window.location.href)})).finally((()=>n(35,ue=!1)))},pe=e=>{"ErrorResponseCode"===e.data.type&&(n(32,te=e.data.errorResponseCode),n(19,V=e.data.showErrorOutsideReceiptPage)),"ReceiptLoaded"===e.data.type&&Me(),"BackCashier"===e.data.type&&ve(),"CloseCashierReceiptPage"===e.data.type&&Se()};J((()=>(window.addEventListener("closeModal",Ee,!1),window.addEventListener("confirmModal",De,!1),window.addEventListener("closeIframe",Me,!1),window.addEventListener("notificationButtonClick",Te,!1),document.addEventListener("click",fe),window.addEventListener("message",pe,!1),Yo.extend(Wo),()=>{window.removeEventListener("closeModal",Ee),window.removeEventListener("confirmModal",De),window.removeEventListener("closeIframe",Me),window.removeEventListener("notificationButtonClick",Te),window.removeEventListener("message",pe)})));const fe=e=>{M&&(n(27,oe[M]=!0,oe),Ie(Y.find((e=>e.name===M)))),e.composedPath().includes(E)||n(23,M=null)},me=(e,t)=>{if(t===M)return n(27,oe[M]=!0,oe),Ie(Y.find((e=>e.name===M))),void n(23,M=null);e.stopPropagation(),E=e.composedPath()[0];const r=E.getBoundingClientRect(),i=y.getBoundingClientRect(),o=r.y;n(29,se=window.innerHeight-o<200);const a=r.top-i.top-r.height,s=i.bottom-r.bottom-r.height;n(30,Q=se?a:!se&&s<70?150:s),n(23,M=t)},ge=()=>{window.postMessage({type:"ErrorResponseCode",errorResponseCode:te},window.location.href)},ye=()=>{window.postMessage({type:"ShowConfirmModal",showConfirmModal:G,editedAmount:ee,hideAmountField:U.HideAmountField},window.location.href)},be=()=>{window.postMessage({type:"RedirectInfo",redirectMode:k,redirectUrl:b},window.location.href)},we=()=>{n(33,le=!0),window.postMessage({type:"ShowCashierModal",modalErrorMessage:te},window.location.href)},ve=()=>{dispatchEvent(new CustomEvent("backToMethodList",{bubbles:!0,cancelable:!0,composed:!0})),xe()},ke=()=>{window.postMessage({type:"ToggleDisableActionOnPage",disable:C},window.location.href)},xe=()=>{dispatchEvent(new CustomEvent("hidePaymentDetails",{detail:{hideMethodDetails:q},bubbles:!0,cancelable:!0,composed:!0}))},Ce=()=>{dispatchEvent(new CustomEvent("hideMethodsList",{detail:{hideMethodsList:q},bubbles:!0,cancelable:!0,composed:!0}))},Me=()=>{b=null,n(19,V=!0),be()},Ee=()=>{G=!1},De=()=>{n(22,C=!0);const e=new URL(`${T}/v1/player/${O}/payment/GetPaymentConfirm`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json"),ke();const r={method:"POST",mode:"cors",headers:t,body:JSON.stringify({XPaymentSessionToken:g})};fetch(e,r).then((e=>e.json())).then((e=>e.ResponseCode===s.PlayerSessionIsNotValid||e.ResponseCode===s.JwtTokenError?(n(32,te=e.ResponseCode),void ge()):e.ResponseCode!==s.Success?(n(32,te=e.ResponseCode),n(22,C=!1),ke(),void we()):(g=e.XPaymentSessionToken,n(34,ce=e.Transaction.Code),b=e.RedirectUrl,k=c.get(e.RedirectionMode)||c.get("Default"),n(22,C=!1),ke(),be(),window.postMessage({type:"StartSessionCountdown",xPaymentSessionToken:g,selectedpaymentmethodname:R},window.location.href),b||n(19,V=!0),void(k===l.RedirectWithRetry&&(w=window.open(e.RedirectUrl,"_blank"),n(20,v=!!w),w||n(21,x=!0))))))},Te=()=>{w=window.open(b,"_blank"),n(20,v=!0),n(21,x=!1),be()},Se=()=>{n(19,V=!1)},Ae=e=>{e&&window.postMessage({type:"NavigateTo",path:e,target:"_blank",externalLink:!1},window.location.href)},Le=(e,t)=>{n(18,W[e.name]=t,W),Y.filter((e=>e.correlationFieldName)).forEach((e=>Ie(e)))},_e=e=>{if(!e.correlationFieldName)return!0;const t=e.correlationFieldValue.includes(W[e.correlationFieldName]);return!t&&W[e.name]&&delete W[e.name],t},$e=(e,t)=>e.format&&t&&!((e,t)=>{if(!e)return!0;let n,r;return"string"==typeof e?(r="","^"!==e.charAt(0)&&(r+="^"),r+=e,"$"!==e.charAt(e.length-1)&&(r+="$"),n=new RegExp(r)):(r=e.toString(),n=e),n.test(t)})(e.format,t)?r("invalidFieldError",{values:{field:e.label}}):"",Pe=(e,t)=>"boolean"==typeof t||!e.isRequired||t&&t.toString().trim()?"":r("errorEmptyField"),Oe=()=>{n(26,ie=(ee?"":r("errorEmptyField"))||(U.DisplayCurrency.MinAmountLimit>ee?r("minAmountError",{values:{amount:re.format(U.DisplayCurrency.MinAmountLimit),currency:U.DisplayCurrency.Name}}):"")||(U.DisplayCurrency.MaxAmountLimit<ee?r("maxAmountError",{values:{amount:re.format(U.DisplayCurrency.MaxAmountLimit),currency:U.DisplayCurrency.Name}}):"")||(U.AmountMultiplier&&ee%U.AmountMultiplier!=0?r("amountMultiplierError",{values:{multiplier:U.AmountMultiplier}}):"")||(U.IsIntegerAmount&&!Number.isInteger(ee)?r("amountIntError"):"")||(Number(ee).toFixed(2)!=+ee?r("amountDecimalError"):""))},He=e=>{const t=W[e.name],i=e.placeholder,o=Yo(t,i),a=Yo(e.maxValue,i),s=Yo(e.minValue,i);o.isBefore(s)||o.isAfter(a)?n(28,ae[e.name]=r("invalidFieldError",{values:{field:e.label}}),ae):n(28,ae[e.name]=_e(e)?Pe(e,t)||$e(e,t):"",ae)},Ie=e=>{const t=W[e.name];n(28,ae[e.name]=_e(e)?Pe(e,t)||$e(e,t):"",ae)};return e.$$set=e=>{"endpoint"in e&&n(0,T=e.endpoint),"session"in e&&n(50,S=e.session),"playersession"in e&&n(1,A=e.playersession),"lang"in e&&n(2,L=e.lang),"local"in e&&n(3,$=e.local),"translationurl"in e&&n(4,P=e.translationurl),"customerid"in e&&n(5,O=e.customerid),"currency"in e&&n(6,H=e.currency),"amount"in e&&n(7,I=e.amount),"assetsurl"in e&&n(8,N=e.assetsurl),"type"in e&&n(9,B=e.type),"selectedpaymentmethodname"in e&&n(51,R=e.selectedpaymentmethodname),"clientstyling"in e&&n(10,F=e.clientstyling),"clientstylingurl"in e&&n(11,j=e.clientstylingurl),"ismobileview"in e&&n(52,z=e.ismobileview)},e.$$.update=()=>{/*endpoint, currency*/65&e.$$.dirty[0]|/*session, selectedpaymentmethodname*/1572864&e.$$.dirty[1]&&T&&S&&R&&H&&(X.length&&X.forEach((e=>{e&&jo(e).destroy()})),n(19,V=!1),n(21,x=!1),n(15,X=[]),n(12,Y=[]),n(18,W={}),n(27,oe={}),n(28,ae={}),n(14,Z=[]),n(17,U=null),n(32,te=""),n(33,le=!1),n(35,ue=!0),ge(),he()),/*clientstyling, customStylingContainer*/9216&e.$$.dirty[0]&&F&&y&&(()=>{let e=document.createElement("style");e.innerHTML=F,y.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/10240&e.$$.dirty[0]&&j&&y&&(()=>{let e=new URL(j),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{y.appendChild(t)}),1),setTimeout((()=>{}),500)}))})(),/*lang*/4&e.$$.dirty[0]&&L&&de(),/*lang, translationurl*/20&e.$$.dirty[0]&&L&&P&&(()=>{if(P)fetch(P).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{di(t,e[t])}))})).catch((e=>{}))})(),/*ismobileview*/2097152&e.$$.dirty[1]&&z&&n(24,q="true"===z),/*fields, qrCodeContainer*/20480&e.$$.dirty[0]&&Y.length&&Z.length&&Z.forEach((e=>{if(e&&e.innerText){const t=e.innerText;e.innerText="",new QRCode(e,{text:t,width:250,height:250})}})),/*fields, flatpickrEl*/36864&e.$$.dirty[0]&&Y.length&&X.length&&(()=>{const e={[d.Time]:{noCalendar:!0,enableTime:!0,allowInput:!0},[d.Date]:{allowInput:!0,locale:Object.assign({},Uo[L])},[d.DateTime]:{allowInput:!0,enableTime:!0,locale:Object.assign({},Uo[L])}};X.forEach((t=>{if(!t)return;const r=JSON.parse(t.dataset.field),i=f.get(r.placeholder),o=r.type===d.DateTime?f.get(r.placeholder.split(" ")[1]):i;jo(t,Object.assign(Object.assign({},e[r.type]),{dateFormat:i,time_24hr:"H:i"===o,maxDate:r.maxValue,minDate:r.minValue,defaultDate:r.defaultValue,onReady:(e,t)=>{n(18,W[r.name]=t,W),He(r)},onClose:(e,t,i)=>{ae[r.name]?n(18,W[r.name]="",W):n(18,W[r.name]=t,W)}}))}))})()},[T,A,L,$,P,O,H,I,N,B,F,j,Y,y,Z,X,d,U,W,V,v,x,C,M,q,D,ie,oe,ae,se,Q,ee,te,le,ce,ue,r,re,me,()=>{if(ne)return;n(22,C=!0);const e=new URL(`${T}/v1/player/${O}/payment/GetPaymentPrepare`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json"),ke();const r={method:"POST",mode:"cors",headers:t,body:JSON.stringify({XPaymentSessionToken:g,Transaction:{PaymentMethod:U.Name,Amount:ee,Currency:H,CustomFields:W},Account:{}})};fetch(e,r).then((e=>e.json())).then((e=>{if(e.error)postMessage({type:"ShowSessionError",error:e.error},window.location.href);else{if(e.ResponseCode===s.PlayerSessionIsNotValid)return n(32,te=e.ResponseCode),void ge();if(e.ResponseCode===s.JwtTokenError)return n(32,te=e.ResponseCode),void ge();if(e.ResponseCode!==s.Success)return n(32,te=e.ResponseCode),n(22,C=!1),ke(),void we();g=e.XPaymentSessionToken,n(22,C=!1),G=!0,ye(),ke(),window.postMessage({type:"StartSessionCountdown",xPaymentSessionToken:g,selectedPaymentMethodName:U.Name},window.location.href)}}))},ve,Ae,Le,(e,t)=>t?e.find((e=>e.Name===t)).Value:"",_e,Oe,He,Ie,(e,t)=>(ne=!!e||Object.values(t).some((e=>!!e)),ne),i,S,R,z,function(){n(25,D=Jo.innerWidth)},()=>ve(),function(){ee=_(this.value),n(31,ee)},()=>Oe(),()=>{n(27,oe.amount=!0,oe),Oe()},function(e){W[e.name]=this.value,n(18,W)},e=>{Ie(e)},e=>{n(27,oe[e.name]=!0,oe),Ie(e)},function(e){W[e.name]=this.value,n(18,W)},e=>{n(27,oe[e.name]=!0,oe),He(e)},e=>{n(27,oe[e.name]=!0,oe),He(e)},e=>{n(27,oe[e.name]=!0,oe),He(e)},function(e){K[e?"unshift":"push"]((()=>{X[X.length]=e,n(15,X)}))},function(e){W[e.name]=_(this.value),n(18,W)},e=>{Ie(e)},e=>{n(27,oe[e.name]=!0,oe),Ie(e)},function(e){W[e.name]=this.value,n(18,W)},e=>{Ie(e)},e=>{n(27,oe[e.name]=!0,oe),Ie(e)},function(e){W[e.name]=this.value,n(18,W)},(e,t)=>me(t,e.name),(e,t)=>{Le(e,t.Name),n(12,Y)},function(e){W[e.name]=this.checked,n(18,W)},e=>{n(27,oe[e.name]=!0,oe),Ie(e)},function(e){K[e?"unshift":"push"]((()=>{Z[Z.length]=e,n(14,Z)}))},e=>{Ae(e.description)},function(e){W[e.name]=this.value,n(18,W)},()=>{n(20,v=!1)},function(e){K[e?"unshift":"push"]((()=>{y=e,n(13,y)}))}]}class _a extends ge{constructor(e){super();const t=document.createElement("style");t.textContent='@keyframes loading-spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}::-webkit-scrollbar{width:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--mmw--color-grey-105, #E8E9EB)}::-webkit-scrollbar-thumb:hover{background:var(--mmw--color-grey-290, #666)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input::-webkit-date-and-time-value{visibility:hidden}input[type=number]{-moz-appearance:textfield}.CashierMethodDetails{width:100%;height:100%;overflow-y:auto;box-sizing:border-box;scrollbar-gutter:stable both-edges;padding:var(--emw--spacing-large, 20px) var(--emw--spacing-x-small, 10px) var(--emw--spacing-small, 12px) var(--emw--spacing-x-small, 10px);container-name:method-details;container-type:inline-size}.ReceiptPage{background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border-radius:var(--mmw--border-radius-medium-plus, 6px);box-shadow:0 2px 6px 0 var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));padding:0 var(--emw--spacing-small, 12px);margin-bottom:var(--emw--spacing-small-minus, 10px)}.MethodsDetails{position:relative;display:flex;flex-direction:column;height:100%;gap:var(--mmw--spacing-2x-small-plus, 5px)}.MethodsDetails:has(.RedirectionNotification) form{visibility:hidden}.MethodsDetails.DisabledPage:after{content:"";position:absolute;height:100%;width:100%;z-index:1;top:0;left:0;background-color:var(--emw--color-background, rgba(255, 255, 255, 0.5))}.FormLogo{align-items:center;display:flex;height:50px;border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB)}.SelectedLogoDescription{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-small, 14px);margin:var(--mmw--spacing-x-small-minus, 7px) var(--mmw--spacing-2x-small-plus, 5px) var(--mmw--spacing-x-small-minus, 7px) var(--mmw--spacing-x-small-minus, 7px);word-break:break-word}.SelectedLogoWrapper{width:56px;height:32px;flex-shrink:0;background:var(--emw--color-background, #fff);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--mmw--border-radius-medium-plus, 6px)}.SelectedLogoWrapper img{max-height:32px;max-width:56px}.ChangePaymeth{margin-left:auto;cursor:pointer;color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-small, 14px);text-decoration-line:underline}.SelectedMethodDescription{color:var(--mmw--color-grey-290, #666);font-size:var(--emw--font-size-x-small, 12px);margin:var(--emw--spacing-small-minus, 10px) 0 var(--mmw--spacing-2x-small-plus, 5px);line-height:var(--emw--font-size-x-small, 12px);white-space:pre-line}.RedirectionNotification{height:100%;width:100%;position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--emw--spacing-large, 20px)}.RedirectionClose{display:flex;width:234px;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);line-height:normal;text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 4px);background:var(--emw--color-primary, #7EC51E)}.RedirectionTitle{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-x-small, 12px);font-style:normal;text-transform:none;font-weight:var(--mmw--font-weight-semibold-plus, 600)}.RedirectionMessage{color:var(--mmw--color-grey-290, #666);font-size:var(--emw--font-size-x-small, 12px);font-style:normal;text-transform:none}.FieldWrapper,label{display:flex;flex-direction:column}.FieldWrapper{background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border-radius:var(--mmw--border-radius-medium-plus, 6px);box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.1);padding:0 var(--emw--spacing-medium, 15px) var(--emw--spacing-medium, 15px);margin-bottom:var(--emw--spacing-small-minus, 10px)}.FieldWrapper:has(.QRCode, .Label){box-shadow:none;background:transparent}.FieldWrapper.Hidden{height:0;visibility:hidden;margin:0;padding:0}.FieldWrapper.Invalid:has(.Checkbox){border:1px solid var(--emw--color-error, #FE0101)}.Alert{display:none}.Invalid input,.Invalid .Selected{border-color:var(--emw--color-error, #FE0101)}.Invalid .Alert{display:inline-block}.Invalid .AmountLimits{display:none}.Alert{color:var(--emw--color-error, #FE0101);font-size:var(--emw--font-size-x-small, 12px);margin:var(--mmw--spacing-2x-small-plus, 5px) 0 0 var(--emw--spacing-3x-small, 2px);line-height:var(--emw--font-size-x-small, 12px)}.AmountLimits{color:var(--mmw--color-grey-290, #666);font-size:var(--emw--font-size-x-small, 12px);margin:var(--mmw--spacing-2x-small-plus, 5px) 0 0 var(--emw--spacing-3x-small, 2px);line-height:var(--emw--font-size-x-small, 12px)}input,.Selected{border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);height:40px;line-height:var(--emw--size-small, 14px);color:var(--mmw--color-grey-10, #111);padding:0 var(--emw--spacing-medium, 15px);font-style:inherit;font-family:inherit}input:focus,.Selected:focus{outline:none}label{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--size-small, 14px);margin-top:var(--mmw--spacing-x-small-minus, 7px);line-height:27px}label span.Required:before{content:"*";display:inline-block;margin-right:var(--emw--spacing-3x-small, 2px)}.Description{color:var(--mmw--color-grey-290, #666);font-size:var(--emw--font-size-x-small, 12px);margin:0 0 var(--mmw--spacing-2x-small-plus, 5px) var(--emw--spacing-3x-small, 2px);line-height:var(--emw--font-size-x-small, 12px)}.PrimaryButton{color:var(--emw--color-white, #FFF);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-normal, 400);font-family:inherit;height:46px;border-radius:50px;line-height:normal;border:none;background:var(--emw--color-primary, #7EC51E);width:100%;margin:var(--emw--spacing-small, 12px) 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--mmw--spacing-2x-small-plus, 5px)}.PrimaryButton:has(.ButtonSpinner),.PrimaryButton:has(.ButtonSpinner):hover,.PrimaryButton:active{background:var(--mmw--color-main-button-active, #5C950F)}.PrimaryButton .ButtonAmount{font-weight:var(--mmw--font-weight-semibold-plus, 600)}.PrimaryButton .ButtonSpinner{animation:loading-spinner 1s linear infinite}.PrimaryButton[disabled]{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843));cursor:auto;pointer-events:none}.PrimaryButton:hover{background:var(--mmw--color-main-button-hover, #71B11B)}.QRCode{width:250px;margin:auto}.Checkbox{display:flex;position:relative;margin-top:var(--emw--spacing-small, 12px)}.Checkbox .Description{margin:0 0 0 var(--emw--spacing-large, 20px);cursor:pointer;line-height:var(--emw--font-size-medium, 16px)}.Checkbox .Checkmark{position:absolute;top:2px;left:0;height:12px;width:12px;border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);background-color:var(--emw--color-white, #FFF);cursor:pointer}.Checkbox .Checkmark:after{content:"";position:absolute;display:none}.Checkbox .Checkmark:after{left:4px;top:0;width:2px;height:8px;border:solid var(--emw--color-white, #FFF);border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.Checkbox input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.Checkbox input:checked~.Checkmark{background-color:var(--emw--color-primary, #7EC51E);border-color:var(--emw--color-primary, #7EC51E)}.Checkbox input:checked~.Checkmark:after{display:block}.DateInput{position:relative}.DateInput .MobileDateInput{display:none}.DateInput:has(.flatpickr-mobile) .DateTimePicker{-webkit-appearance:none;-moz-appearance:none;background:none;width:-webkit-fill-available;font-size:0;width:-moz-available}.DateInput:has(.flatpickr-mobile) .MobileDateInput{display:block;position:absolute;top:50%;transform:translateY(-50%);left:15px}.DateTimePicker{width:-webkit-fill-available;width:-moz-available}.CustomSelect{width:100%;position:relative}.Selected{display:flex;align-items:center;cursor:pointer}.Selected .SelectedValue{max-width:95%}.Selected:after{position:absolute;content:"";top:19px;right:10px;width:0;height:0;border:6px solid transparent;border-color:var(--mmw--color-border, rgb(168, 169, 170)) transparent transparent transparent}.OptionList{display:none;position:absolute;left:0;right:0;z-index:99;background-color:var(--emw--color-white, #fff);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin-top:var(--mmw--spacing-2x-small-plus, 5px);overflow:auto;box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.1)}.OptionList.Top{transform:translate(0, calc(-1 * (100% + 40px + 10px)))}.OptionList div{padding:var(--emw--spacing-x-small, 8px) var(--emw--spacing-medium, 16px);cursor:pointer;user-select:none;line-height:calc(var(--emw--size-small, 14px) + 3px);font-size:var(--emw--size-small, 14px)}.OptionList div:hover{background-color:var(--emw--color-gray-50, #F9F9F9)}.OptionList.Opened{display:block}@container method-details (width < 450px){.FormLogo .SelectedLogoDescription{font-size:var(--emw--font-size-x-small, 12px);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}label,input,.Description,.FormLogo .ChangePaymeth,.OptionList div{font-size:var(--emw--font-size-x-small, 12px)}.SelectedMethodDescription,.AmountLimits{font-size:var(--emw--font-size-2x-small, 10px)}}',this.shadowRoot.appendChild(t),me(this,{target:this.shadowRoot,props:R(this.attributes),customElement:!0},La,Sa,a,{PaymentMethodDetails:49,endpoint:0,session:50,playersession:1,lang:2,local:3,translationurl:4,customerid:5,currency:6,amount:7,assetsurl:8,type:9,selectedpaymentmethodname:51,clientstyling:10,clientstylingurl:11,ismobileview:52},null,[-1,-1,-1,-1,-1]),e&&(e.target&&v(e.target,this,e.anchor),e.props&&(this.$set(e.props),ie()))}static get observedAttributes(){return["PaymentMethodDetails","endpoint","session","playersession","lang","local","translationurl","customerid","currency","amount","assetsurl","type","selectedpaymentmethodname","clientstyling","clientstylingurl","ismobileview"]}get PaymentMethodDetails(){return this.$$.ctx[49]}get endpoint(){return this.$$.ctx[0]}set endpoint(e){this.$$set({endpoint:e}),ie()}get session(){return this.$$.ctx[50]}set session(e){this.$$set({session:e}),ie()}get playersession(){return this.$$.ctx[1]}set playersession(e){this.$$set({playersession:e}),ie()}get lang(){return this.$$.ctx[2]}set lang(e){this.$$set({lang:e}),ie()}get local(){return this.$$.ctx[3]}set local(e){this.$$set({local:e}),ie()}get translationurl(){return this.$$.ctx[4]}set translationurl(e){this.$$set({translationurl:e}),ie()}get customerid(){return this.$$.ctx[5]}set customerid(e){this.$$set({customerid:e}),ie()}get currency(){return this.$$.ctx[6]}set currency(e){this.$$set({currency:e}),ie()}get amount(){return this.$$.ctx[7]}set amount(e){this.$$set({amount:e}),ie()}get assetsurl(){return this.$$.ctx[8]}set assetsurl(e){this.$$set({assetsurl:e}),ie()}get type(){return this.$$.ctx[9]}set type(e){this.$$set({type:e}),ie()}get selectedpaymentmethodname(){return this.$$.ctx[51]}set selectedpaymentmethodname(e){this.$$set({selectedpaymentmethodname:e}),ie()}get clientstyling(){return this.$$.ctx[10]}set clientstyling(e){this.$$set({clientstyling:e}),ie()}get clientstylingurl(){return this.$$.ctx[11]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),ie()}get ismobileview(){return this.$$.ctx[52]}set ismobileview(e){this.$$set({ismobileview:e}),ie()}}return!customElements.get("cashier-method-details")&&customElements.define("cashier-method-details",_a),_a}));
862
+ /*div_binding*/,t[81](null),c=!1,u()}}}let Aa="https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js";function La(e,t,n){let r;u(e,ui,(e=>n(36,r=e)));class i{constructor(e){this.correlationFieldName=e.CorrelationFieldName||null,this.correlationFieldValue=e.CorrelationFieldValue&&e.CorrelationFieldValue.length>0?e.CorrelationFieldValue.split(","):[],this.name=e.Name||null,this.label=e.Label||null,this.description=e.Description||null,this.type=m.get(e.Type)||null,this.defaultValue=this.calcDefaultValue(e),this.format=this.setPlaceholderOrFormat(e,h.Format),this.placeholder=this.setPlaceholderOrFormat(e,h.Placeholder),this.isReadonly=e.IsReadonly||!1,this.isRequired=e.IsRequired||!1,this.maxValue=this.setValue(e,h.MaxValue),this.minValue=this.setValue(e,h.MinValue),this.isPrimaryField=e.IsPrimaryField||!1,this.demandUserInput=e.DemandUserInput||!1,this.autoTrim=e.AutoTrim||!1,this.autoUppercase=e.AutoUppercase||!1,this.notEqualToFieldName=e.NotEqualToFieldName||null,this.values=e.Values,this.useCopyButton=e.UseCopyButton||!1,this.inputMask=e.InputMask,this.tags=e.Tags||null}calcDefaultValue(e){return this.type===d.Boolean?"True"===e.DefaultValue:p.has(e.Type)?this.setValue(e,h.DefaultValue):e.DefaultValue||null}setPlaceholderOrFormat(e,t){return p.has(e.Type)&&!f.get(e.Placeholder)?p.get(e.Type)[t]:e[t]||null}setValue(e,t){return p.has(e.Type)&&!f.get(e.Placeholder)?Yo(e[t],e.Placeholder).format(p.get(e.Type).Placeholder):e[t]||null}get descriptionWithLink(){if("Boolean"===d[this.type]&&this.placeholder||"Link"===d[this.type]){const e=/{link}/i,t=`<a href="${this.placeholder||this.defaultValue}" target="_blank" rel="noopener noreferrer">${this.label}</a>`;return this.description.match(e)?this.description.replace(e,t):`${this.description} ${t}`}return this.description}}const o=(e,[t,n])=>[...e,...Array.isArray(t)?[...t.map((e=>[e,n]))]:[[t,n]]];var a,s,l;!function(e){e.Deposit="Deposit",e.Withdraw="Withdraw"}(a||(a={})),function(e){e.PlayerSessionIsNotValid="PlayerSessionIsNotValid",e.Success="Success",e.JwtTokenError="JwtTokenError"}(s||(s={})),function(e){e.Default="Default",e.RedirectWithRetry="Redirect"}(l||(l={}));const c=new Map([[["Default",0],l.Default],[["Redirect",1],l.RedirectWithRetry]].reduce(o,[]));var d,h;!function(e){e.Unknown="Unknown",e.Text="Text",e.Boolean="Boolean",e.Number="Number",e.Money="Money",e.DateTime="DateTime",e.Lookup="Lookup",e.IpAddress="IpAddress",e.Date="Date",e.Time="Time",e.LookupCollection="LookupCollection",e.Hidden="Hidden",e.Label="Label",e.Password="Password",e.Link="Link",e.Image="Image",e.Html="Html",e.QRCode="QR"}(d||(d={})),function(e){e.MaxValue="MaxValue",e.MinValue="MinValue",e.DefaultValue="DefaultValue",e.Placeholder="Placeholder",e.Format="Format"}(h||(h={}));const p=new Map([[d.Date,{Placeholder:"MM/DD/YYYY",Format:"^\\d{2}/\\d{2}/\\d{4}$"}],[d.Time,{Placeholder:"HH:mm",Format:"^\\d{2}:\\d{2}$"}],[d.DateTime,{Placeholder:"MM/DD/YYYY HH:mm",Format:"^\\d{2}/\\d{2}/\\d{4} \\d{2}:\\d{2}$"}]]),f=new Map([["MM/DD/YYYY HH:mm","m/d/Y H:i"],["DD.MM.YYYY HH:mm","d.m.Y H:i"],["YYYY-MM-DD","Y-m-d"],["MM/DD/YYYY","m/d/Y"],["DD/MM/YYYY","d/m/Y"],["YYYY.MM.DD","Y.m.d"],["HH:mm","H:i"]]),m=new Map([[["Unknown",0],d.Unknown],[["Text",1],d.Text],[["Boolean",2],d.Boolean],[["Number",3],d.Number],[["Money",4],d.Money],[["DateTime",5],d.DateTime],[["Lookup",6],d.Lookup],[["IpAddress",7],d.IpAddress],[["Date",8],d.Date],[["Time",9],d.Time],[["LookupCollection",10],d.LookupCollection],[["Hidden",11],d.Hidden],[["Label",12],d.Label],[["Password",13],d.Password],[["Link",14],d.Link],[["Image",15],d.Image],[["Html",19],d.Html],[["QR",20],d.QRCode]].reduce(o,[]));let g,y,b,w,v,k,x,C,M,E,D,{endpoint:T}=t,{session:S}=t,{playersession:A}=t,{lang:L="en"}=t,{local:$="en-US"}=t,{translationurl:P}=t,{customerid:O}=t,{currency:H}=t,{amount:I}=t,{assetsurl:N}=t,{type:B=a.Deposit}=t,{selectedpaymentmethodname:R}=t,{clientstyling:F=""}=t,{clientstylingurl:j=""}=t,{ismobileview:z}=t,U={},Y=[],W={},G=!1,V=!1,Z=[],X=[],q=!1;window.matchMedia("(max-width: 750px)");let Q,ee,te,ne,re=new Intl.NumberFormat($,{minimumFractionDigits:2}),ie="",oe={},ae={},se=!1,le=!1,ce="",ue=!0;const de=()=>{var e;e=L,Yr.set(e)};Object.keys(hi).forEach((e=>{di(e,hi[e])}));const he=()=>{const e=new URL(`${T}/v1/player/${O}/payment/GetPaymentMethod`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json");const r={method:"POST",mode:"cors",headers:t,body:JSON.stringify({PaymentMethodName:R,Currency:H,XPaymentSessionToken:S})};fetch(e,r).then((e=>e.json())).then((e=>{if(!e.error)return e.ResponseCode===s.PlayerSessionIsNotValid||e.ResponseCode===s.JwtTokenError?(n(32,te=e.ResponseCode),void ge()):void(e.ResponseCode===s.Success?(g=e.XPaymentSessionToken,n(17,U=e.PaymentMethod),n(31,ee=Number(I)),U.HideAmountField?n(26,ie=""):Oe(),n(12,Y=U.Fields&&U.Fields.map((e=>new i(e)))),Y.forEach((e=>{(null==e?void 0:e.defaultValue)&&n(18,W[e.name]=e.defaultValue,W),Ie(e)})),ye(),ge(),Ce(),window.postMessage({type:"StartSessionCountdown",xPaymentSessionToken:g,selectedPaymentMethodName:R},window.location.href)):n(32,te=e.ResponseCode));window.postMessage({type:"ShowSessionError",error:e.error},window.location.href)})).finally((()=>n(35,ue=!1)))},pe=e=>{"ErrorResponseCode"===e.data.type&&(n(32,te=e.data.errorResponseCode),n(19,V=e.data.showErrorOutsideReceiptPage)),"ReceiptLoaded"===e.data.type&&Me(),"BackCashier"===e.data.type&&ve(),"CloseCashierReceiptPage"===e.data.type&&Se()};J((()=>(window.addEventListener("closeModal",Ee,!1),window.addEventListener("confirmModal",De,!1),window.addEventListener("closeIframe",Me,!1),window.addEventListener("notificationButtonClick",Te,!1),document.addEventListener("click",fe),window.addEventListener("message",pe,!1),Yo.extend(Wo),()=>{window.removeEventListener("closeModal",Ee),window.removeEventListener("confirmModal",De),window.removeEventListener("closeIframe",Me),window.removeEventListener("notificationButtonClick",Te),window.removeEventListener("message",pe)})));const fe=e=>{M&&(n(27,oe[M]=!0,oe),Ie(Y.find((e=>e.name===M)))),e.composedPath().includes(E)||n(23,M=null)},me=(e,t)=>{if(t===M)return n(27,oe[M]=!0,oe),Ie(Y.find((e=>e.name===M))),void n(23,M=null);e.stopPropagation(),E=e.composedPath()[0];const r=E.getBoundingClientRect(),i=y.getBoundingClientRect(),o=r.y;n(29,se=window.innerHeight-o<200);const a=r.top-i.top-r.height,s=i.bottom-r.bottom-r.height;n(30,Q=se?a:!se&&s<70?150:s),n(23,M=t)},ge=()=>{window.postMessage({type:"ErrorResponseCode",errorResponseCode:te},window.location.href)},ye=()=>{window.postMessage({type:"ShowConfirmModal",showConfirmModal:G,editedAmount:ee,hideAmountField:U.HideAmountField},window.location.href)},be=()=>{window.postMessage({type:"RedirectInfo",redirectMode:k,redirectUrl:b},window.location.href)},we=()=>{n(33,le=!0),window.postMessage({type:"ShowCashierModal",modalErrorMessage:te},window.location.href)},ve=()=>{dispatchEvent(new CustomEvent("backToMethodList",{bubbles:!0,cancelable:!0,composed:!0})),xe()},ke=()=>{window.postMessage({type:"ToggleDisableActionOnPage",disable:C},window.location.href)},xe=()=>{dispatchEvent(new CustomEvent("hidePaymentDetails",{detail:{hideMethodDetails:q},bubbles:!0,cancelable:!0,composed:!0}))},Ce=()=>{dispatchEvent(new CustomEvent("hideMethodsList",{detail:{hideMethodsList:q},bubbles:!0,cancelable:!0,composed:!0}))},Me=()=>{b=null,n(19,V=!0),be()},Ee=()=>{G=!1},De=()=>{n(22,C=!0);const e=new URL(`${T}/v1/player/${O}/payment/GetPaymentConfirm`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json"),ke();const r={method:"POST",mode:"cors",headers:t,body:JSON.stringify({XPaymentSessionToken:g})};fetch(e,r).then((e=>e.json())).then((e=>e.ResponseCode===s.PlayerSessionIsNotValid||e.ResponseCode===s.JwtTokenError?(n(32,te=e.ResponseCode),void ge()):e.ResponseCode!==s.Success?(n(32,te=e.ResponseCode),n(22,C=!1),ke(),void we()):(g=e.XPaymentSessionToken,n(34,ce=e.Transaction.Code),b=e.RedirectUrl,k=c.get(e.RedirectionMode)||c.get("Default"),n(22,C=!1),ke(),be(),window.postMessage({type:"StartSessionCountdown",xPaymentSessionToken:g,selectedpaymentmethodname:R},window.location.href),b||n(19,V=!0),void(k===l.RedirectWithRetry&&(w=window.open(e.RedirectUrl,"_blank"),n(20,v=!!w),w||n(21,x=!0))))))},Te=()=>{w=window.open(b,"_blank"),n(20,v=!0),n(21,x=!1),be()},Se=()=>{n(19,V=!1)},Ae=e=>{e&&window.postMessage({type:"NavigateTo",path:e,target:"_blank",externalLink:!1},window.location.href)},Le=(e,t)=>{n(18,W[e.name]=t,W),Y.filter((e=>e.correlationFieldName)).forEach((e=>Ie(e)))},_e=e=>{if(!e.correlationFieldName)return!0;const t=e.correlationFieldValue.includes(W[e.correlationFieldName]);return!t&&W[e.name]&&delete W[e.name],t},$e=(e,t)=>e.format&&t&&!((e,t)=>{if(!e)return!0;let n,r;return"string"==typeof e?(r="","^"!==e.charAt(0)&&(r+="^"),r+=e,"$"!==e.charAt(e.length-1)&&(r+="$"),n=new RegExp(r)):(r=e.toString(),n=e),n.test(t)})(e.format,t)?r("invalidFieldError",{values:{field:e.label}}):"",Pe=(e,t)=>"boolean"==typeof t||!e.isRequired||t&&t.toString().trim()?"":r("errorEmptyField"),Oe=()=>{n(26,ie=(ee?"":r("errorEmptyField"))||(U.DisplayCurrency.MinAmountLimit>ee?r("minAmountError",{values:{amount:re.format(U.DisplayCurrency.MinAmountLimit),currency:U.DisplayCurrency.Name}}):"")||(U.DisplayCurrency.MaxAmountLimit<ee?r("maxAmountError",{values:{amount:re.format(U.DisplayCurrency.MaxAmountLimit),currency:U.DisplayCurrency.Name}}):"")||(U.AmountMultiplier&&ee%U.AmountMultiplier!=0?r("amountMultiplierError",{values:{multiplier:U.AmountMultiplier}}):"")||(U.IsIntegerAmount&&!Number.isInteger(ee)?r("amountIntError"):"")||(Number(ee).toFixed(2)!=+ee?r("amountDecimalError"):""))},He=e=>{const t=W[e.name],i=e.placeholder,o=Yo(t,i),a=Yo(e.maxValue,i),s=Yo(e.minValue,i);o.isBefore(s)||o.isAfter(a)?n(28,ae[e.name]=r("invalidFieldError",{values:{field:e.label}}),ae):n(28,ae[e.name]=_e(e)?Pe(e,t)||$e(e,t):"",ae)},Ie=e=>{const t=W[e.name];n(28,ae[e.name]=_e(e)?Pe(e,t)||$e(e,t):"",ae)};return e.$$set=e=>{"endpoint"in e&&n(0,T=e.endpoint),"session"in e&&n(50,S=e.session),"playersession"in e&&n(1,A=e.playersession),"lang"in e&&n(2,L=e.lang),"local"in e&&n(3,$=e.local),"translationurl"in e&&n(4,P=e.translationurl),"customerid"in e&&n(5,O=e.customerid),"currency"in e&&n(6,H=e.currency),"amount"in e&&n(7,I=e.amount),"assetsurl"in e&&n(8,N=e.assetsurl),"type"in e&&n(9,B=e.type),"selectedpaymentmethodname"in e&&n(51,R=e.selectedpaymentmethodname),"clientstyling"in e&&n(10,F=e.clientstyling),"clientstylingurl"in e&&n(11,j=e.clientstylingurl),"ismobileview"in e&&n(52,z=e.ismobileview)},e.$$.update=()=>{/*endpoint, currency*/65&e.$$.dirty[0]|/*session, selectedpaymentmethodname*/1572864&e.$$.dirty[1]&&T&&S&&R&&H&&(X.length&&X.forEach((e=>{e&&jo(e).destroy()})),n(19,V=!1),n(21,x=!1),n(15,X=[]),n(12,Y=[]),n(18,W={}),n(27,oe={}),n(28,ae={}),n(14,Z=[]),n(17,U=null),n(32,te=""),n(33,le=!1),n(35,ue=!0),ge(),he()),/*clientstyling, customStylingContainer*/9216&e.$$.dirty[0]&&F&&y&&(()=>{let e=document.createElement("style");e.innerHTML=F,y.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/10240&e.$$.dirty[0]&&j&&y&&(()=>{let e=new URL(j),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{y.appendChild(t)}),1),setTimeout((()=>{}),500)}))})(),/*lang*/4&e.$$.dirty[0]&&L&&de(),/*lang, translationurl*/20&e.$$.dirty[0]&&L&&P&&(()=>{if(P)fetch(P).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{di(t,e[t])}))})).catch((e=>{}))})(),/*ismobileview*/2097152&e.$$.dirty[1]&&z&&n(24,q="true"===z),/*fields, qrCodeContainer*/20480&e.$$.dirty[0]&&Y.length&&Z.length&&Z.forEach((e=>{if(e&&e.innerText){const t=e.innerText;e.innerText="",new QRCode(e,{text:t,width:250,height:250})}})),/*fields, flatpickrEl*/36864&e.$$.dirty[0]&&Y.length&&X.length&&(()=>{const e={[d.Time]:{noCalendar:!0,enableTime:!0,allowInput:!0},[d.Date]:{allowInput:!0,locale:Object.assign({},Uo[L])},[d.DateTime]:{allowInput:!0,enableTime:!0,locale:Object.assign({},Uo[L])}};X.forEach((t=>{if(!t)return;const r=JSON.parse(t.dataset.field),i=f.get(r.placeholder),o=r.type===d.DateTime?f.get(r.placeholder.split(" ")[1]):i;jo(t,Object.assign(Object.assign({},e[r.type]),{dateFormat:i,time_24hr:"H:i"===o,maxDate:r.maxValue,minDate:r.minValue,defaultDate:r.defaultValue,onReady:(e,t)=>{n(18,W[r.name]=t,W),He(r)},onClose:(e,t,i)=>{ae[r.name]?n(18,W[r.name]="",W):n(18,W[r.name]=t,W)}}))}))})()},[T,A,L,$,P,O,H,I,N,B,F,j,Y,y,Z,X,d,U,W,V,v,x,C,M,q,D,ie,oe,ae,se,Q,ee,te,le,ce,ue,r,re,me,()=>{if(ne)return;n(22,C=!0);const e=new URL(`${T}/v1/player/${O}/payment/GetPaymentPrepare`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json"),ke();const r={method:"POST",mode:"cors",headers:t,body:JSON.stringify({XPaymentSessionToken:g,Transaction:{PaymentMethod:U.Name,Amount:ee,Currency:H,CustomFields:W},Account:{}})};fetch(e,r).then((e=>e.json())).then((e=>{if(e.error)postMessage({type:"ShowSessionError",error:e.error},window.location.href);else{if(e.ResponseCode===s.PlayerSessionIsNotValid)return n(32,te=e.ResponseCode),void ge();if(e.ResponseCode===s.JwtTokenError)return n(32,te=e.ResponseCode),void ge();if(e.ResponseCode!==s.Success)return n(32,te=e.ResponseCode),n(22,C=!1),ke(),void we();g=e.XPaymentSessionToken,n(22,C=!1),G=!0,ye(),ke(),window.postMessage({type:"StartSessionCountdown",xPaymentSessionToken:g,selectedPaymentMethodName:U.Name},window.location.href)}}))},ve,Ae,Le,(e,t)=>t?e.find((e=>e.Name===t)).Value:"",_e,Oe,He,Ie,(e,t)=>(ne=!!e||Object.values(t).some((e=>!!e)),ne),i,S,R,z,function(){n(25,D=Jo.innerWidth)},()=>ve(),function(){ee=_(this.value),n(31,ee)},()=>Oe(),()=>{n(27,oe.amount=!0,oe),Oe()},function(e){W[e.name]=this.value,n(18,W)},e=>{Ie(e)},e=>{n(27,oe[e.name]=!0,oe),Ie(e)},function(e){W[e.name]=this.value,n(18,W)},e=>{n(27,oe[e.name]=!0,oe),He(e)},e=>{n(27,oe[e.name]=!0,oe),He(e)},e=>{n(27,oe[e.name]=!0,oe),He(e)},function(e){K[e?"unshift":"push"]((()=>{X[X.length]=e,n(15,X)}))},function(e){W[e.name]=_(this.value),n(18,W)},e=>{Ie(e)},e=>{n(27,oe[e.name]=!0,oe),Ie(e)},function(e){W[e.name]=this.value,n(18,W)},e=>{Ie(e)},e=>{n(27,oe[e.name]=!0,oe),Ie(e)},function(e){W[e.name]=this.value,n(18,W)},(e,t)=>me(t,e.name),(e,t)=>{Le(e,t.Name),n(12,Y)},function(e){W[e.name]=this.checked,n(18,W)},e=>{n(27,oe[e.name]=!0,oe),Ie(e)},function(e){K[e?"unshift":"push"]((()=>{Z[Z.length]=e,n(14,Z)}))},e=>{Ae(e.description)},function(e){W[e.name]=this.value,n(18,W)},()=>{n(20,v=!1)},function(e){K[e?"unshift":"push"]((()=>{y=e,n(13,y)}))}]}class _a extends ge{constructor(e){super();const t=document.createElement("style");t.textContent='@keyframes loading-spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}::-webkit-scrollbar{width:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--mmw--color-grey-105, #E8E9EB)}::-webkit-scrollbar-thumb:hover{background:var(--mmw--color-grey-290, #666)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input::-webkit-date-and-time-value{visibility:hidden}input[type=number]{-moz-appearance:textfield}.CashierMethodDetails{width:100%;height:100%;overflow-y:auto;box-sizing:border-box;scrollbar-gutter:stable both-edges;padding:var(--emw--spacing-large, 20px) var(--emw--spacing-x-small, 10px) var(--emw--spacing-small, 12px) var(--emw--spacing-x-small, 10px);container-name:method-details;container-type:inline-size;min-height:200px}.ReceiptPage{background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border-radius:var(--mmw--border-radius-medium-plus, 6px);box-shadow:0 2px 6px 0 var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));padding:0 var(--emw--spacing-small, 12px);margin-bottom:var(--emw--spacing-small-minus, 10px)}.MethodsDetails{position:relative;display:flex;flex-direction:column;height:100%;gap:var(--mmw--spacing-2x-small-plus, 5px)}.MethodsDetails:has(.RedirectionNotification) form{visibility:hidden}.MethodsDetails.DisabledPage:after{content:"";position:absolute;height:100%;width:100%;z-index:1;top:0;left:0;background-color:var(--emw--color-background, rgba(255, 255, 255, 0.5))}.FormLogo{align-items:center;display:flex;height:50px;border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB)}.SelectedLogoDescription{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-small, 14px);margin:var(--mmw--spacing-x-small-minus, 7px) var(--mmw--spacing-2x-small-plus, 5px) var(--mmw--spacing-x-small-minus, 7px) var(--mmw--spacing-x-small-minus, 7px);word-break:break-word}.SelectedLogoWrapper{width:56px;height:32px;flex-shrink:0;background:var(--emw--color-background, #fff);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--mmw--border-radius-medium-plus, 6px)}.SelectedLogoWrapper img{max-height:32px;max-width:56px}.ChangePaymeth{margin-left:auto;cursor:pointer;color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-small, 14px);text-decoration-line:underline}.SelectedMethodDescription{color:var(--mmw--color-grey-290, #666);font-size:var(--emw--font-size-x-small, 12px);margin:var(--emw--spacing-small-minus, 10px) 0 var(--mmw--spacing-2x-small-plus, 5px);line-height:var(--emw--font-size-x-small, 12px);white-space:pre-line}.RedirectionNotification{height:100%;width:100%;position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--emw--spacing-large, 20px)}.RedirectionClose{display:flex;width:234px;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);line-height:normal;text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 4px);background:var(--emw--color-primary, #7EC51E)}.RedirectionTitle{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-x-small, 12px);font-style:normal;text-transform:none;font-weight:var(--mmw--font-weight-semibold-plus, 600)}.RedirectionMessage{color:var(--mmw--color-grey-290, #666);font-size:var(--emw--font-size-x-small, 12px);font-style:normal;text-transform:none}.FieldWrapper,label{display:flex;flex-direction:column}.FieldWrapper{background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border-radius:var(--mmw--border-radius-medium-plus, 6px);box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.1);padding:0 var(--emw--spacing-medium, 15px) var(--emw--spacing-medium, 15px);margin-bottom:var(--emw--spacing-small-minus, 10px)}.FieldWrapper:has(.QRCode, .Label){box-shadow:none;background:transparent}.FieldWrapper.Hidden{height:0;visibility:hidden;margin:0;padding:0}.FieldWrapper.Invalid:has(.Checkbox){border:1px solid var(--emw--color-error, #FE0101)}.Alert{display:none}.Invalid input,.Invalid .Selected{border-color:var(--emw--color-error, #FE0101)}.Invalid .Alert{display:inline-block}.Invalid .AmountLimits{display:none}.Alert{color:var(--emw--color-error, #FE0101);font-size:var(--emw--font-size-x-small, 12px);margin:var(--mmw--spacing-2x-small-plus, 5px) 0 0 var(--emw--spacing-3x-small, 2px);line-height:var(--emw--font-size-x-small, 12px)}.AmountLimits{color:var(--mmw--color-grey-290, #666);font-size:var(--emw--font-size-x-small, 12px);margin:var(--mmw--spacing-2x-small-plus, 5px) 0 0 var(--emw--spacing-3x-small, 2px);line-height:var(--emw--font-size-x-small, 12px)}input,.Selected{border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);height:40px;line-height:var(--emw--size-small, 14px);color:var(--mmw--color-grey-10, #111);padding:0 var(--emw--spacing-medium, 15px);font-style:inherit;font-family:inherit}input:focus,.Selected:focus{outline:none}label{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--size-small, 14px);margin-top:var(--mmw--spacing-x-small-minus, 7px);line-height:27px}label span.Required:before{content:"*";display:inline-block;margin-right:var(--emw--spacing-3x-small, 2px)}.Description{color:var(--mmw--color-grey-290, #666);font-size:var(--emw--font-size-x-small, 12px);margin:0 0 var(--mmw--spacing-2x-small-plus, 5px) var(--emw--spacing-3x-small, 2px);line-height:var(--emw--font-size-x-small, 12px)}.PrimaryButton{color:var(--emw--color-white, #FFF);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-normal, 400);font-family:inherit;height:46px;border-radius:50px;line-height:normal;border:none;background:var(--emw--color-primary, #7EC51E);width:100%;margin:var(--emw--spacing-small, 12px) 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--mmw--spacing-2x-small-plus, 5px)}.PrimaryButton:has(.ButtonSpinner),.PrimaryButton:has(.ButtonSpinner):hover,.PrimaryButton:active{background:var(--mmw--color-main-button-active, #5C950F)}.PrimaryButton .ButtonAmount{font-weight:var(--mmw--font-weight-semibold-plus, 600)}.PrimaryButton .ButtonSpinner{animation:loading-spinner 1s linear infinite}.PrimaryButton[disabled]{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843));cursor:auto;pointer-events:none}.PrimaryButton:hover{background:var(--mmw--color-main-button-hover, #71B11B)}.QRCode{width:250px;margin:auto}.Checkbox{display:flex;position:relative;margin-top:var(--emw--spacing-small, 12px)}.Checkbox .Description{margin:0 0 0 var(--emw--spacing-large, 20px);cursor:pointer;line-height:var(--emw--font-size-medium, 16px)}.Checkbox .Checkmark{position:absolute;top:2px;left:0;height:12px;width:12px;border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);background-color:var(--emw--color-white, #FFF);cursor:pointer}.Checkbox .Checkmark:after{content:"";position:absolute;display:none}.Checkbox .Checkmark:after{left:4px;top:0;width:2px;height:8px;border:solid var(--emw--color-white, #FFF);border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.Checkbox input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.Checkbox input:checked~.Checkmark{background-color:var(--emw--color-primary, #7EC51E);border-color:var(--emw--color-primary, #7EC51E)}.Checkbox input:checked~.Checkmark:after{display:block}.DateInput{position:relative}.DateInput .MobileDateInput{display:none}.DateInput:has(.flatpickr-mobile) .DateTimePicker{-webkit-appearance:none;-moz-appearance:none;background:none;width:-webkit-fill-available;font-size:0;width:-moz-available}.DateInput:has(.flatpickr-mobile) .MobileDateInput{display:block;position:absolute;top:50%;transform:translateY(-50%);left:15px}.DateTimePicker{width:-webkit-fill-available;width:-moz-available}.CustomSelect{width:100%;position:relative}.Selected{display:flex;align-items:center;cursor:pointer}.Selected .SelectedValue{max-width:95%}.Selected:after{position:absolute;content:"";top:19px;right:10px;width:0;height:0;border:6px solid transparent;border-color:var(--mmw--color-border, rgb(168, 169, 170)) transparent transparent transparent}.OptionList{display:none;position:absolute;left:0;right:0;z-index:99;background-color:var(--emw--color-white, #fff);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin-top:var(--mmw--spacing-2x-small-plus, 5px);overflow:auto;box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.1)}.OptionList.Top{transform:translate(0, calc(-1 * (100% + 40px + 10px)))}.OptionList div{padding:var(--emw--spacing-x-small, 8px) var(--emw--spacing-medium, 16px);cursor:pointer;user-select:none;line-height:calc(var(--emw--size-small, 14px) + 3px);font-size:var(--emw--size-small, 14px)}.OptionList div:hover{background-color:var(--emw--color-gray-50, #F9F9F9)}.OptionList.Opened{display:block}@container method-details (width < 450px){.FormLogo .SelectedLogoDescription{font-size:var(--emw--font-size-x-small, 12px);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}label,input,.Description,.FormLogo .ChangePaymeth,.OptionList div{font-size:var(--emw--font-size-x-small, 12px)}.SelectedMethodDescription,.AmountLimits{font-size:var(--emw--font-size-2x-small, 10px)}}',this.shadowRoot.appendChild(t),me(this,{target:this.shadowRoot,props:R(this.attributes),customElement:!0},La,Sa,a,{PaymentMethodDetails:49,endpoint:0,session:50,playersession:1,lang:2,local:3,translationurl:4,customerid:5,currency:6,amount:7,assetsurl:8,type:9,selectedpaymentmethodname:51,clientstyling:10,clientstylingurl:11,ismobileview:52},null,[-1,-1,-1,-1,-1]),e&&(e.target&&v(e.target,this,e.anchor),e.props&&(this.$set(e.props),ie()))}static get observedAttributes(){return["PaymentMethodDetails","endpoint","session","playersession","lang","local","translationurl","customerid","currency","amount","assetsurl","type","selectedpaymentmethodname","clientstyling","clientstylingurl","ismobileview"]}get PaymentMethodDetails(){return this.$$.ctx[49]}get endpoint(){return this.$$.ctx[0]}set endpoint(e){this.$$set({endpoint:e}),ie()}get session(){return this.$$.ctx[50]}set session(e){this.$$set({session:e}),ie()}get playersession(){return this.$$.ctx[1]}set playersession(e){this.$$set({playersession:e}),ie()}get lang(){return this.$$.ctx[2]}set lang(e){this.$$set({lang:e}),ie()}get local(){return this.$$.ctx[3]}set local(e){this.$$set({local:e}),ie()}get translationurl(){return this.$$.ctx[4]}set translationurl(e){this.$$set({translationurl:e}),ie()}get customerid(){return this.$$.ctx[5]}set customerid(e){this.$$set({customerid:e}),ie()}get currency(){return this.$$.ctx[6]}set currency(e){this.$$set({currency:e}),ie()}get amount(){return this.$$.ctx[7]}set amount(e){this.$$set({amount:e}),ie()}get assetsurl(){return this.$$.ctx[8]}set assetsurl(e){this.$$set({assetsurl:e}),ie()}get type(){return this.$$.ctx[9]}set type(e){this.$$set({type:e}),ie()}get selectedpaymentmethodname(){return this.$$.ctx[51]}set selectedpaymentmethodname(e){this.$$set({selectedpaymentmethodname:e}),ie()}get clientstyling(){return this.$$.ctx[10]}set clientstyling(e){this.$$set({clientstyling:e}),ie()}get clientstylingurl(){return this.$$.ctx[11]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),ie()}get ismobileview(){return this.$$.ctx[52]}set ismobileview(e){this.$$set({ismobileview:e}),ie()}}return!customElements.get("cashier-method-details")&&customElements.define("cashier-method-details",_a),_a}));
863
863
  //# sourceMappingURL=cashier-method-details.js.map