@everymatrix/cashier-page 1.93.30 → 1.93.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{CashierMethodDetails-D43_BByC.js → CashierMethodDetails-D5zqf686.js} +9 -5
- package/components/{CashierMethodDetails-fgXAscSs.cjs → CashierMethodDetails-KWA_Sq4l.cjs} +2 -2
- package/components/{CashierMethodDetails-QnYW0RhM.js → CashierMethodDetails-RvdJ1C5s.js} +295 -291
- package/components/{CashierMethodsList-CIZqw7vl.cjs → CashierMethodsList-Bgo_LwHP.cjs} +1 -1
- package/components/{CashierMethodsList-D9Cau8Pp.js → CashierMethodsList-Cbh3LWkT.js} +45 -51
- package/components/{CashierMethodsList-CxX_fYhq.js → CashierMethodsList-lFN0tDnv.js} +36 -42
- package/components/{CashierPage-DMD49nLC.js → CashierPage-2KmHM6zH.js} +6 -6
- package/components/{CashierPage-DVMUYXPq.js → CashierPage-CD2qxexq.js} +6 -6
- package/components/{CashierPage-Ct9EikF7.cjs → CashierPage-xLl95GUo.cjs} +1 -1
- package/components/{CashierReceiptPage-BLs2bB7p.js → CashierReceiptPage-BHu7eFQe.js} +2 -2
- package/components/{CashierReceiptPage-C94sLh_w.cjs → CashierReceiptPage-DECgCKrA.cjs} +1 -1
- package/components/{CashierReceiptPage-BaWYLIjg.js → CashierReceiptPage-yyz93m_1.js} +2 -2
- package/components/{CashierSessionExpirationModal-D9p_gSiz.cjs → CashierSessionExpirationModal-Chi9ZGEw.cjs} +1 -1
- package/components/{CashierSessionExpirationModal-BQqOUaL1.js → CashierSessionExpirationModal-DSlaopTF.js} +2 -2
- package/components/{CashierSessionExpirationModal-OB-OzKmD.js → CashierSessionExpirationModal-DulGbuH9.js} +2 -2
- package/components/{CashierTransactionHistory-DScR_cOH.js → CashierTransactionHistory-BbYNhBtq.js} +2 -2
- package/components/{CashierTransactionHistory-DnPpQqqR.js → CashierTransactionHistory-CThHgzsf.js} +2 -2
- package/components/{CashierTransactionHistory-Df2Bbdf6.cjs → CashierTransactionHistory-SwiU26Df.cjs} +1 -1
- package/components/{CashierVerifications-BDF-0-Ps.js → CashierVerifications-BbrGxnsr.js} +1 -1
- package/components/{CashierVerifications-CSrCD2d3.js → CashierVerifications-DC27ce9g.js} +1 -1
- package/components/{CashierVerifications-CRuBWs_5.cjs → CashierVerifications-WhS-2imA.cjs} +1 -1
- package/es2015/cashier-page.cjs +1 -1
- package/es2015/cashier-page.js +1 -1
- package/esnext/cashier-page.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Re=Object.defineProperty,Fe=Object.defineProperties;var Oe=Object.getOwnPropertyDescriptors;var we=Object.getOwnPropertySymbols;var Ue=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable;var _e=(n,t,s)=>t in n?Re(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s,fe=(n,t)=>{for(var s in t||(t={}))Ue.call(t,s)&&_e(n,s,t[s]);if(we)for(var s of we(t))je.call(t,s)&&_e(n,s,t[s]);return n},he=(n,t)=>Fe(n,Oe(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CashierCarousel-DMrMmClP.cjs"),te=require("./CashierMethodDetails-fgXAscSs.cjs");function Me(n,t){e.addMessages(n,t)}function Ie(n){e.init({fallbackLocale:"en"}),e.$locale.set(n)}const be={en:{generalMin:"Min",generalMax:"Max",showAll:"SHOW ALL",showLess:"SHOW LESS",error:"Error",noPaymentMethods:"No payment methods available",favorite:"Favorite",promoLabel:"Recommended",otherMethodsTitle:"All Methods",otherMethodsDescription:"Discover our incredible selection of unique products that you won't want to miss!"},tr:{generalMin:"Min",generalMax:"Maks",showAll:"HEPSİNİ GÖSTER",showLess:"DAHA AZ GÖSTER",error:"Hata",noPaymentMethods:"Hiçbir ödeme yöntemi mevcut değil",favorite:"Favori",promoLabel:"Favori",otherMethodsTitle:"Tüm Yöntemler",otherMethodsDescription:"Kaçırmak istemeyeceğiniz benzersiz ürünlerimizden oluşan inanılmaz seçkimizi keşfedin!"},fr:{generalMin:"Min",generalMax:"Max",showAll:"AFFICHER TOUT",showLess:"AFFICHER MOINS",error:"Erreur",noPaymentMethods:"Aucun moyen de paiement disponible",favorite:"Favori",promoLabel:"Recommandé",otherMethodsTitle:"Toutes les méthodes",otherMethodsDescription:"Découvrez notre incroyable sélection de produits uniques à ne pas manquer !"}};function He(n){e.append_styles(n,"svelte-njj9wo",'*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;max-width:100%;gap:5px;margin:10px}.SelectorWrapper{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;cursor:pointer;position:relative;box-sizing:border-box;padding:5px 0;border-radius:10px;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);overflow:hidden;z-index:1;transition:transform 0.3s ease-in-out}.SelectorWrapper:hover{box-shadow:inset 0px 0px 7px var(--emw--color-primary);transform:scale(1.02)}.SelectorWrapper::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:10px;background:linear-gradient(140deg, var(--emw--color-white, #f5f5f5) 5%, var(--emw--color-cashier-bg, var(--emw--color-background, #23281f)) 40%, var(--emw--color-black, #000000) 60%);opacity:0.2}.CashierMethodListWidget{background-color:var(--emw--color-cashier-bg, var(--emw--color-background, #23281f));height:100%;padding-bottom:20px}.MethodsListDescription{color:var(--emw--color-typography, var(--emw--color-white, #ffffff));padding:10px}.MethodsListDescription h3{font-size:12px;text-transform:uppercase;margin:10px 0}.MethodsListDescription p{color:white;opacity:0.55;font-size:12px}.MethodLogo{margin:5px}.MethodLogo img{width:100%;height:100%;max-height:22px}.MethodPromoLabel{background:var(--emw--color-button-background, #f1f3ff);color:var(--emw--color-primary, #f9c405);font-size:14px;font-weight:700;text-transform:uppercase;padding:5px 10px;min-width:100px;border-radius:10px;margin:10px;text-align:center}.MethodInfo{width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.MethodTitle{color:var(--emw--color-typography, var(--emw--color-white, #ffffff));margin:5px;word-break:break-word;font-weight:var(--emw--font-weight-bold, 700);line-height:10px}.MethodLimits{word-break:break-word;margin:5px}.Limits{max-width:100%;font-weight:var(--emw--font-weight-normal, 300);font-style:normal;color:var(--emw--color-typography, var(--emw--color-white, #ffffff));opacity:0.7}.MethodFavorite{font-size:var(--emw--font-size-x-small, 8px);color:var(--emw--color-typography, #fff);background-color:var(--emw--color-red, red);border-radius:15px;margin:0 5px;line-height:10px;height:16px}.MethodFavorite p{padding:3px}.PaymentProcessing{padding:5px;color:var(--emw--color-primary, #ffce00);font-style:italic;font-size:var(--emw--font-size-small, 12px)}@media(min-width: 499px){.MethodLogo{margin:5px}.MethodLogo img{width:100%;height:100%;max-height:36px}.SelectorWrapper{padding:10px}.MethodTitle{font-size:var(--emw--font-size-medium, 12px)}.Limits{font-size:var(--emw--font-size-small, 10px)}}@media(max-width: 500px){.PaymentProcessing{font-size:var(--emw--font-size-x-small, 8px)}.MethodTitle{font-size:var(--emw--font-size-small, 10px)}.Limits{font-size:var(--emw--font-size-x-small, 8px)}}.EmptyContentMessageWrapper{position:relative;display:flex;justify-content:flex-end}.EmptyContentMessageContent{display:flex;flex-direction:column;row-gap:var(--emw--spacing-small, 12px);bottom:10%}.EmptyContentMessageImg{width:250px}.EmptyContentMessageImg img{border-radius:0 0 var(--emw--border-radius-medium-plus, 6px) 0;height:100%;width:100%}.EmptyContentMessageTitle{font-size:var(--emw--font-size-medium, 20px);font-weight:var(--emw--font-weight-bold, 800);line-height:calc(var(--emw--font-size-medium, 16px) + 4px);color:var(--emw--color-primary);text-transform:uppercase}.EmptyContentMessageText{word-break:break-word;font-size:var(--emw--font-size-small, 14px);line-height:calc(var(--emw--font-size-medium, 16px) + 4px);color:var(--emw--color-typography, #fff)}.EmptyContentMessageDesktop{justify-content:flex-start}.EmptyContentMessageDesktop .EmptyContentMessageContent{bottom:auto;margin-top:10px}.EmptyContentMessageDesktop .EmptyContentMessageImg{width:auto}.EmptyContentMessageDesktop .EmptyContentMessageImg img{transform:scaleX(-1)}.IconWarning{width:30px;display:flex}.IconWarning svg{height:18px;fill:var(--emw--color-warning, rgb(250, 146, 0))}.ShowAllButton{cursor:pointer;color:var(--emw--color-grey-290, #666);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;background:var(--emw--color-gray-50, #f7f8fa);line-height:normal;border:1px solid var(--emw--color-grey-105, #e8e9eb);border-radius:var(--emw--border-radius-medium, 4px);margin:var(--emw--spacing-small, 12px) auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}.ShowAllButton:hover{background:var(--emw--color-background, #fff)}.ErrorMessage{color:var(--emw--color-typography, var(--emw--color-white, #ffffff));font-size:12px}')}function ve(n,t,s){const r=n.slice();return r[58]=t[s],r[60]=s,r}function Le(n){let t,s,r,o,l=!n[15]&&Ce(n);function a(c,p){return c[15]&&c[14]?qe:We}let d=a(n),u=d(n),m=n[10]&&Se(n);return{c(){t=e.element("div"),l&&l.c(),s=e.space(),r=e.element("div"),u.c(),o=e.space(),m&&m.c(),e.attr(r,"class","CashierMethodList"),e.attr(t,"class","CashierMethodListWidget")},m(c,p){e.insert(c,t,p),l&&l.m(t,null),e.append(t,s),e.append(t,r),u.m(r,null),e.append(t,o),m&&m.m(t,null),n[34](t)},p(c,p){c[15]?l&&(l.d(1),l=null):l?l.p(c,p):(l=Ce(c),l.c(),l.m(t,s)),d===(d=a(c))&&u?u.p(c,p):(u.d(1),u=d(c),u&&(u.c(),u.m(r,null))),c[10]?m?m.p(c,p):(m=Se(c),m.c(),m.m(t,null)):m&&(m.d(1),m=null)},d(c){c&&e.detach(t),l&&l.d(),u.d(),m&&m.d(),n[34](null)}}}function Ce(n){let t,s,r=n[17]("otherMethodsTitle")+"",o,l,a,d=n[17]("otherMethodsDescription")+"",u;return{c(){t=e.element("div"),s=e.element("h3"),o=e.text(r),l=e.space(),a=e.element("p"),u=e.text(d),e.attr(t,"class","MethodsListDescription")},m(m,c){e.insert(m,t,c),e.append(t,s),e.append(s,o),e.append(t,l),e.append(t,a),e.append(a,u)},p(m,c){c[0]&131072&&r!==(r=m[17]("otherMethodsTitle")+"")&&e.set_data(o,r),c[0]&131072&&d!==(d=m[17]("otherMethodsDescription")+"")&&e.set_data(u,d)},d(m){m&&e.detach(t)}}}function We(n){let t,s=e.ensure_array_like(n[11]),r=[];for(let o=0;o<s.length;o+=1)r[o]=De(ve(n,s,o));return{c(){for(let o=0;o<r.length;o+=1)r[o].c();t=e.empty()},m(o,l){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(o,l);e.insert(o,t,l)},p(o,l){if(l[0]&469824){s=e.ensure_array_like(o[11]);let a;for(a=0;a<s.length;a+=1){const d=ve(o,s,a);r[a]?r[a].p(d,l):(r[a]=De(d),r[a].c(),r[a].m(t.parentNode,t))}for(;a<r.length;a+=1)r[a].d(1);r.length=s.length}},d(o){o&&e.detach(t),e.destroy_each(r,o)}}}function qe(n){let t,s,r,o=n[17]("error")+"",l,a,d,u=n[17]("noPaymentMethods")+"",m;return{c(){t=e.element("div"),s=e.element("div"),r=e.element("p"),l=e.text(o),a=e.space(),d=e.element("p"),m=e.text(u),e.attr(r,"class","EmptyContentMessageTitle"),e.attr(d,"class","EmptyContentMessageText"),e.attr(s,"class","EmptyContentMessageContent"),e.attr(t,"class","EmptyContentMessageWrapper"),e.toggle_class(t,"EmptyContentMessageDesktop",n[13])},m(c,p){e.insert(c,t,p),e.append(t,s),e.append(s,r),e.append(r,l),e.append(s,a),e.append(s,d),e.append(d,m)},p(c,p){p[0]&131072&&o!==(o=c[17]("error")+"")&&e.set_data(l,o),p[0]&131072&&u!==(u=c[17]("noPaymentMethods")+"")&&e.set_data(m,u),p[0]&8192&&e.toggle_class(t,"EmptyContentMessageDesktop",c[13])},d(c){c&&e.detach(t)}}}function ke(n){let t,s=n[17]("favorite")+"",r;return{c(){t=e.element("p"),r=e.text(s)},m(o,l){e.insert(o,t,l),e.append(t,r)},p(o,l){l[0]&131072&&s!==(s=o[17]("favorite")+"")&&e.set_data(r,s)},d(o){o&&e.detach(t)}}}function Pe(n){let t,s=n[17](`${n[6]}${n[58].ProcessingTime}`)+"",r;return{c(){t=e.element("span"),r=e.text(s),e.attr(t,"class","PaymentProcessing")},m(o,l){e.insert(o,t,l),e.append(t,r)},p(o,l){l[0]&133184&&s!==(s=o[17](`${o[6]}${o[58].ProcessingTime}`)+"")&&e.set_data(r,s)},d(o){o&&e.detach(t)}}}function Te(n){let t,s=n[17](`${n[6]}${n[58].ProcessingTime}`)+"",r;return{c(){t=e.element("span"),r=e.text(s),e.attr(t,"class","PaymentProcessing")},m(o,l){e.insert(o,t,l),e.append(t,r)},p(o,l){l[0]&133184&&s!==(s=o[17](`${o[6]}${o[58].ProcessingTime}`)+"")&&e.set_data(r,s)},d(o){o&&e.detach(t)}}}function De(n){var V,K,J,oe,re,ie,le,ae;let t,s,r,o,l,a,d,u,m,c,p,j=(n[58].Label||n[58].Name)+"",I,T,A,E,P,D,N=n[17]("generalMin")+"",H,Y,R=e.formatCurrency(n[58].DisplayCurrency.MinAmountLimit,n[58].DisplayCurrency.Name,{maximumFractionDigits:n[8][(K=(V=n[58])==null?void 0:V.DisplayCurrency)==null?void 0:K.Name]||n[16],minimumFractionDigits:n[8][(oe=(J=n[58])==null?void 0:J.DisplayCurrency)==null?void 0:oe.Name]||n[16]})+"",X,F,x,W=n[17]("generalMax")+"",L,ne,G=e.formatCurrency(n[58].DisplayCurrency.MaxAmountLimit,n[58].DisplayCurrency.Name,{maximumFractionDigits:n[8][(ie=(re=n[58])==null?void 0:re.DisplayCurrency)==null?void 0:ie.Name]||n[16],minimumFractionDigits:n[8][(ae=(le=n[58])==null?void 0:le.DisplayCurrency)==null?void 0:ae.Name]||n[16]})+"",C,O,U,b,q,y=n[58].isMethodPromoted&&ke(n),w=!n[13]&&Pe(n),g=n[13]&&Te(n);function se(){return n[32](n[58])}return{c(){t=e.element("div"),s=e.element("div"),r=e.element("img"),a=e.space(),d=e.element("div"),y&&y.c(),u=e.space(),m=e.element("div"),c=e.element("div"),p=e.element("span"),I=e.text(j),T=e.space(),w&&w.c(),A=e.space(),E=e.element("div"),P=e.element("span"),D=e.element("p"),H=e.text(N),Y=e.space(),X=e.text(R),F=e.space(),x=e.element("p"),L=e.text(W),ne=e.space(),C=e.text(G),O=e.space(),g&&g.c(),U=e.space(),e.src_url_equal(r.src,o=n[58].LogoRelativeUrl?`${window.origin}payMeth.LogoRelativeUrl`:n[58].LogoUrl)||e.attr(r,"src",o),e.attr(r,"alt",l=n[58].Label),e.attr(s,"class","MethodLogo"),e.attr(d,"class","MethodFavorite"),e.attr(c,"class","MethodTitle"),e.attr(P,"class","Limits"),e.attr(E,"class","MethodLimits"),e.attr(m,"class","MethodInfo"),e.attr(t,"class","SelectorWrapper"),e.toggle_class(t,"checked",n[9]===n[58].Name)},m(B,_){e.insert(B,t,_),e.append(t,s),e.append(s,r),e.append(t,a),e.append(t,d),y&&y.m(d,null),e.append(t,u),e.append(t,m),e.append(m,c),e.append(c,p),e.append(p,I),e.append(m,T),w&&w.m(m,null),e.append(m,A),e.append(m,E),e.append(E,P),e.append(P,D),e.append(D,H),e.append(D,Y),e.append(D,X),e.append(P,F),e.append(P,x),e.append(x,L),e.append(x,ne),e.append(x,C),e.append(m,O),g&&g.m(m,null),e.append(t,U),b||(q=[e.listen(t,"click",se),e.listen(t,"keyup",Xe)],b=!0)},p(B,_){var me,ce,Z,de,ue,Q,$,pe;n=B,_[0]&2048&&!e.src_url_equal(r.src,o=n[58].LogoRelativeUrl?`${window.origin}payMeth.LogoRelativeUrl`:n[58].LogoUrl)&&e.attr(r,"src",o),_[0]&2048&&l!==(l=n[58].Label)&&e.attr(r,"alt",l),n[58].isMethodPromoted?y?y.p(n,_):(y=ke(n),y.c(),y.m(d,null)):y&&(y.d(1),y=null),_[0]&2048&&j!==(j=(n[58].Label||n[58].Name)+"")&&e.set_data(I,j),n[13]?w&&(w.d(1),w=null):w?w.p(n,_):(w=Pe(n),w.c(),w.m(m,A)),_[0]&131072&&N!==(N=n[17]("generalMin")+"")&&e.set_data(H,N),_[0]&67840&&R!==(R=e.formatCurrency(n[58].DisplayCurrency.MinAmountLimit,n[58].DisplayCurrency.Name,{maximumFractionDigits:n[8][(ce=(me=n[58])==null?void 0:me.DisplayCurrency)==null?void 0:ce.Name]||n[16],minimumFractionDigits:n[8][(de=(Z=n[58])==null?void 0:Z.DisplayCurrency)==null?void 0:de.Name]||n[16]})+"")&&e.set_data(X,R),_[0]&131072&&W!==(W=n[17]("generalMax")+"")&&e.set_data(L,W),_[0]&67840&&G!==(G=e.formatCurrency(n[58].DisplayCurrency.MaxAmountLimit,n[58].DisplayCurrency.Name,{maximumFractionDigits:n[8][(Q=(ue=n[58])==null?void 0:ue.DisplayCurrency)==null?void 0:Q.Name]||n[16],minimumFractionDigits:n[8][(pe=($=n[58])==null?void 0:$.DisplayCurrency)==null?void 0:pe.Name]||n[16]})+"")&&e.set_data(C,G),n[13]?g?g.p(n,_):(g=Te(n),g.c(),g.m(m,null)):g&&(g.d(1),g=null),_[0]&2560&&e.toggle_class(t,"checked",n[9]===n[58].Name)},d(B){B&&e.detach(t),y&&y.d(),w&&w.d(),g&&g.d(),b=!1,e.run_all(q)}}}function Se(n){let t,s,r,o;return{c(){t=e.element("div"),s=e.text(n[10]),e.attr(t,"class","ShowAllButton")},m(l,a){e.insert(l,t,a),e.append(t,s),r||(o=e.listen(t,"click",n[33]),r=!0)},p(l,a){a[0]&1024&&e.set_data(s,l[10])},d(l){l&&e.detach(t),r=!1,o()}}}function Ee(n){let t,s,r;return{c(){t=e.element("cashier-error"),s=e.element("span"),r=e.text(n[12]),e.attr(s,"class","ErrorMessage"),e.attr(s,"slot","text"),e.set_custom_element_data(t,"lang",n[0]),e.set_custom_element_data(t,"assetsurl",n[1]),e.set_custom_element_data(t,"translationurl",n[2]),e.set_custom_element_data(t,"clientstylingurl",n[5]),e.set_custom_element_data(t,"clientstyling",n[4]),e.set_custom_element_data(t,"mbsource",n[3]),e.set_custom_element_data(t,"hidebuttons","true")},m(o,l){e.insert(o,t,l),e.append(t,s),e.append(s,r)},p(o,l){l[0]&4096&&e.set_data(r,o[12]),l[0]&1&&e.set_custom_element_data(t,"lang",o[0]),l[0]&2&&e.set_custom_element_data(t,"assetsurl",o[1]),l[0]&4&&e.set_custom_element_data(t,"translationurl",o[2]),l[0]&32&&e.set_custom_element_data(t,"clientstylingurl",o[5]),l[0]&16&&e.set_custom_element_data(t,"clientstyling",o[4]),l[0]&8&&e.set_custom_element_data(t,"mbsource",o[3])},d(o){o&&e.detach(t)}}}function Be(n){let t,s,r=n[14]&&Le(n),o=n[12]&&Ee(n);return{c(){r&&r.c(),t=e.space(),o&&o.c(),s=e.empty()},m(l,a){r&&r.m(l,a),e.insert(l,t,a),o&&o.m(l,a),e.insert(l,s,a)},p(l,a){l[14]?r?r.p(l,a):(r=Le(l),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null),l[12]?o?o.p(l,a):(o=Ee(l),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i:e.noop,o:e.noop,d(l){l&&(e.detach(t),e.detach(s)),r&&r.d(l),o&&o.d(l)}}}const Ye="PaymentPromotion",Xe=()=>{};function Ge(n,t,s){let r,o,l;e.component_subscribe(n,e.$format,i=>s(17,o=i)),e.component_subscribe(n,te.xPaymentSessionToken,i=>s(42,l=i)),te.dayjs.extend(te.utc);let{lang:a="en"}=t,{local:d="en-US"}=t,{endpoint:u}=t,{paymentsession:m}=t,{playersession:c}=t,{customerid:p}=t,{assetsurl:j}=t,{currency:I}=t,{numberofmethodsshown:T}=t,{translationurl:A=""}=t,{mbsource:E}=t,{clientstyling:P}=t,{clientstylingurl:D}=t,{currencydecimals:N="0"}=t,{currencysymbol:H=""}=t,{currencyposition:Y=""}=t,{promotedmethods:R="false"}=t,{type:X}=t,{userroles:F=""}=t,x,W={},L,ne,G=window.navigator.userAgent,C=[],O,U="",b=[],q=[],y="",w,g=!0,se=!1,V=!1,K=[];var J;(function(i){i.PlayerSessionIsNotValid="PlayerSessionIsNotValid",i.Success="Success",i.JwtTokenError="JwtTokenError"})(J||(J={}));const oe=()=>{let i=A;if(i)return fetch(i).then(f=>f.json()).then(f=>{Object.keys(f).forEach(S=>{Me(S,f[S])})}).catch(f=>{console.log(f)})};Object.keys(be).forEach(i=>{Me(i,be[i])});const re=()=>{Ie(a)},ie=i=>{l&&le(i)},le=i=>{const{currency:f}=i,h=x!==void 0&&x!==f?"MetadataLoading":"DataLoading";x=f,window.postMessage({type:h,isDataLoaded:!1},window.location.href);const M=new URL(`${u}/v2/player/${p}/payment/GetPaymentMetadata`),k=new Headers;k.append("accept","application/json"),k.append("Content-Type","application/json"),k.append("X-Client-Request-Timestamp",te.dayjs.utc().format("YYYY-MM-DD HH:mm:ss.SSS")),k.append("X-SessionId",`${c}`),k.append("X-Payment-Session-Token",`${m||l}`),K.indexOf("MM_CHANNEL_BETA")!=-1&&k.append("MM_CHANNEL","BETA");const z={method:"POST",headers:k,mode:"cors",body:JSON.stringify(he(fe({},f&&{Currency:f}),{Tags:{UserAgent:window.navigator.userAgent}}))};fetch(M,z).then(v=>{const ee=v.headers.get("X-Payment-Session-Token");return ee&&te.xPaymentSessionToken.set(ee),v.json()}).then(v=>{var ee;if(v.error){s(12,y=v.error);return}if(v.ResponseCode!==J.Success){w=v.ResponseCode,me();return}C=(ee=v.PaymentMethods)!=null&&ee.Ordering?ae(v):B(v),window.postMessage({type:"PromotedPaymentMethods",promotedPaymentMethods:q},window.location.href),s(10,U=T&&+T>0&&C.length>+T?o("showAll"):""),s(11,b=U?C.slice(0,+T):C),R=="false"&&s(11,b=b.sort((ge,ye)=>ge.isMethodPromoted&&!ye.isMethodPromoted?-1:!ge.isMethodPromoted&&ye.isMethodPromoted?1:0)),s(15,V=!b.length),window.postMessage({type:"StartSessionCountdown",paymentMethodName:C[0].Name},window.location.href),window.postMessage({type:h,isDataLoaded:!0},window.location.href)}).finally(()=>{s(14,se=!0),window.postMessage({type:h,isDataLoaded:!0},window.location.href)})},ae=i=>{const f=[];return q=[],i.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach(S=>{const h=i.PaymentMethods.PaymentMethods.find(M=>M.Name===S);if(h){const M=(h==null?void 0:h.Logos.find(v=>v.LogoType==="Desktop"))||{},k=(h==null?void 0:h.Logos.find(v=>v.LogoType==="Mobile"))||{},z=g?M:k;h.isMethodPromoted=Q(h.Tags),h.LogoUrl=z.LogoUrl?`https:${z.LogoUrl}`:"",h.isMethodPromoted&&q.push(h),f.push(h)}}),f},B=i=>{const f=i.PaymentMethods.PaymentMethods.map(M=>he(fe({},M),{isMethodPromoted:Q(M.Tags),LogoUrl:M.Logos&&M.Logos.length&&M.Logos[0].LogoUrl?`https:${M.Logos[0].LogoUrl}`:""})),[S,h]=f.reduce(([M,k],z)=>(z&&z.isMethodPromoted?M.push(z):k.promo(z),[M,k]),[[],[]]);return q=S,h},_=i=>{s(9,O=i.Name),window.postMessage({type:"SelectPayMeth",details:i},window.location.href),dispatchEvent(new CustomEvent("selectPayMeth",{detail:i,bubbles:!0,cancelable:!0,composed:!0}))},me=()=>{window.postMessage({type:"ErrorResponseCode",errorResponseCode:w},window.location.href)},ce=()=>{s(13,g=!e.isMobile(G))},Z=()=>{b==C?ue():de()},de=()=>{s(11,b=C),s(10,U=o("showLess"))},ue=()=>{s(11,b=C.slice(0,+T)),O&&!b.find(i=>i.Name===O)&&b.splice(0,0,C.find(i=>i.Name===O)),s(10,U=o("showAll"))},Q=i=>i&&i.split(",").some(f=>f===Ye),$=i=>{var S;const{data:{type:f}={}}=i||{};switch(f){case"PrecisionCurrenciesMap":{s(8,W=((S=i==null?void 0:i.data)==null?void 0:S.payload)||{});break}}},pe=()=>{F.length>0&&(K=F.split(","))};e.onMount(()=>(ce(),e.initCurrencyFormatter(d,H,Y,N),window.postMessage({type:"CashierMethodsListReady"},window.location.href),window.addEventListener("message",$),()=>{window.removeEventListener("message",$)}));const xe=i=>_(i),ze=()=>Z();function Ae(i){e.binding_callbacks[i?"unshift":"push"](()=>{L=i,s(7,L)})}return n.$$set=i=>{"lang"in i&&s(0,a=i.lang),"local"in i&&s(20,d=i.local),"endpoint"in i&&s(21,u=i.endpoint),"paymentsession"in i&&s(22,m=i.paymentsession),"playersession"in i&&s(23,c=i.playersession),"customerid"in i&&s(24,p=i.customerid),"assetsurl"in i&&s(1,j=i.assetsurl),"currency"in i&&s(25,I=i.currency),"numberofmethodsshown"in i&&s(26,T=i.numberofmethodsshown),"translationurl"in i&&s(2,A=i.translationurl),"mbsource"in i&&s(3,E=i.mbsource),"clientstyling"in i&&s(4,P=i.clientstyling),"clientstylingurl"in i&&s(5,D=i.clientstylingurl),"currencydecimals"in i&&s(27,N=i.currencydecimals),"currencysymbol"in i&&s(28,H=i.currencysymbol),"currencyposition"in i&&s(29,Y=i.currencyposition),"promotedmethods"in i&&s(30,R=i.promotedmethods),"type"in i&&s(6,X=i.type),"userroles"in i&&s(31,F=i.userroles)},n.$$.update=()=>{n.$$.dirty[1]&1&&F&&pe(),n.$$.dirty[0]&56623104&&u&&!m&&p&&ie({currency:I}),n.$$.dirty[0]&1&&a&&re(),n.$$.dirty[0]&144&&P&&L&&e.setClientStyling(L,P),n.$$.dirty[0]&160&&D&&L&&e.setClientStylingURL(L,D),n.$$.dirty[0]&136&&E&&L&&e.setStreamStyling(L,`${E}.Style`,ne),n.$$.dirty[0]&5&&a&&A&&oe(),n.$$.dirty[0]&134217728&&s(16,r=Number(N))},[a,j,A,E,P,D,X,L,W,O,U,b,y,g,se,V,r,o,_,Z,d,u,m,c,p,I,T,N,H,Y,R,F,xe,ze,Ae]}class Ne extends e.SvelteComponent{constructor(t){super(),e.init$1(this,t,Ge,Be,e.safe_not_equal,{lang:0,local:20,endpoint:21,paymentsession:22,playersession:23,customerid:24,assetsurl:1,currency:25,numberofmethodsshown:26,translationurl:2,mbsource:3,clientstyling:4,clientstylingurl:5,currencydecimals:27,currencysymbol:28,currencyposition:29,promotedmethods:30,type:6,userroles:31},He,[-1,-1])}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),e.flush()}get local(){return this.$$.ctx[20]}set local(t){this.$$set({local:t}),e.flush()}get endpoint(){return this.$$.ctx[21]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get paymentsession(){return this.$$.ctx[22]}set paymentsession(t){this.$$set({paymentsession:t}),e.flush()}get playersession(){return this.$$.ctx[23]}set playersession(t){this.$$set({playersession:t}),e.flush()}get customerid(){return this.$$.ctx[24]}set customerid(t){this.$$set({customerid:t}),e.flush()}get assetsurl(){return this.$$.ctx[1]}set assetsurl(t){this.$$set({assetsurl:t}),e.flush()}get currency(){return this.$$.ctx[25]}set currency(t){this.$$set({currency:t}),e.flush()}get numberofmethodsshown(){return this.$$.ctx[26]}set numberofmethodsshown(t){this.$$set({numberofmethodsshown:t}),e.flush()}get translationurl(){return this.$$.ctx[2]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get mbsource(){return this.$$.ctx[3]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get clientstyling(){return this.$$.ctx[4]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[5]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get currencydecimals(){return this.$$.ctx[27]}set currencydecimals(t){this.$$set({currencydecimals:t}),e.flush()}get currencysymbol(){return this.$$.ctx[28]}set currencysymbol(t){this.$$set({currencysymbol:t}),e.flush()}get currencyposition(){return this.$$.ctx[29]}set currencyposition(t){this.$$set({currencyposition:t}),e.flush()}get promotedmethods(){return this.$$.ctx[30]}set promotedmethods(t){this.$$set({promotedmethods:t}),e.flush()}get type(){return this.$$.ctx[6]}set type(t){this.$$set({type:t}),e.flush()}get userroles(){return this.$$.ctx[31]}set userroles(t){this.$$set({userroles:t}),e.flush()}}e.create_custom_element(Ne,{lang:{},local:{},endpoint:{},paymentsession:{},playersession:{},customerid:{},assetsurl:{},currency:{},numberofmethodsshown:{},translationurl:{},mbsource:{},clientstyling:{},clientstylingurl:{},currencydecimals:{},currencysymbol:{},currencyposition:{},promotedmethods:{},type:{},userroles:{}},[],[],!0);exports.default=Ne;
|
|
1
|
+
"use strict";var Fe=Object.defineProperty,Oe=Object.defineProperties;var Re=Object.getOwnPropertyDescriptors;var we=Object.getOwnPropertySymbols;var je=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable;var _e=(n,t,s)=>t in n?Fe(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s,fe=(n,t)=>{for(var s in t||(t={}))je.call(t,s)&&_e(n,s,t[s]);if(we)for(var s of we(t))Ue.call(t,s)&&_e(n,s,t[s]);return n},he=(n,t)=>Oe(n,Re(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CashierCarousel-DMrMmClP.cjs"),te=require("./CashierMethodDetails-KWA_Sq4l.cjs");function Me(n,t){e.addMessages(n,t)}function Ie(n){e.init({fallbackLocale:"en"}),e.$locale.set(n)}const be={en:{generalMin:"Min",generalMax:"Max",showAll:"SHOW ALL",showLess:"SHOW LESS",error:"Error",noPaymentMethods:"No payment methods available",favorite:"Favorite",promoLabel:"Recommended",otherMethodsTitle:"All Methods",otherMethodsDescription:"Discover our incredible selection of unique products that you won't want to miss!"},tr:{generalMin:"Min",generalMax:"Maks",showAll:"HEPSİNİ GÖSTER",showLess:"DAHA AZ GÖSTER",error:"Hata",noPaymentMethods:"Hiçbir ödeme yöntemi mevcut değil",favorite:"Favori",promoLabel:"Favori",otherMethodsTitle:"Tüm Yöntemler",otherMethodsDescription:"Kaçırmak istemeyeceğiniz benzersiz ürünlerimizden oluşan inanılmaz seçkimizi keşfedin!"},fr:{generalMin:"Min",generalMax:"Max",showAll:"AFFICHER TOUT",showLess:"AFFICHER MOINS",error:"Erreur",noPaymentMethods:"Aucun moyen de paiement disponible",favorite:"Favori",promoLabel:"Recommandé",otherMethodsTitle:"Toutes les méthodes",otherMethodsDescription:"Découvrez notre incroyable sélection de produits uniques à ne pas manquer !"}};function He(n){e.append_styles(n,"svelte-njj9wo",'*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;max-width:100%;gap:5px;margin:10px}.SelectorWrapper{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;cursor:pointer;position:relative;box-sizing:border-box;padding:5px 0;border-radius:10px;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);overflow:hidden;z-index:1;transition:transform 0.3s ease-in-out}.SelectorWrapper:hover{box-shadow:inset 0px 0px 7px var(--emw--color-primary);transform:scale(1.02)}.SelectorWrapper::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:10px;background:linear-gradient(140deg, var(--emw--color-white, #f5f5f5) 5%, var(--emw--color-cashier-bg, var(--emw--color-background, #23281f)) 40%, var(--emw--color-black, #000000) 60%);opacity:0.2}.CashierMethodListWidget{background-color:var(--emw--color-cashier-bg, var(--emw--color-background, #23281f));height:100%;padding-bottom:20px}.MethodsListDescription{color:var(--emw--color-typography, var(--emw--color-white, #ffffff));padding:10px}.MethodsListDescription h3{font-size:12px;text-transform:uppercase;margin:10px 0}.MethodsListDescription p{color:white;opacity:0.55;font-size:12px}.MethodLogo{margin:5px}.MethodLogo img{width:100%;height:100%;max-height:22px}.MethodPromoLabel{background:var(--emw--color-button-background, #f1f3ff);color:var(--emw--color-primary, #f9c405);font-size:14px;font-weight:700;text-transform:uppercase;padding:5px 10px;min-width:100px;border-radius:10px;margin:10px;text-align:center}.MethodInfo{width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.MethodTitle{color:var(--emw--color-typography, var(--emw--color-white, #ffffff));margin:5px;word-break:break-word;font-weight:var(--emw--font-weight-bold, 700);line-height:10px}.MethodLimits{word-break:break-word;margin:5px}.Limits{max-width:100%;font-weight:var(--emw--font-weight-normal, 300);font-style:normal;color:var(--emw--color-typography, var(--emw--color-white, #ffffff));opacity:0.7}.MethodFavorite{font-size:var(--emw--font-size-x-small, 8px);color:var(--emw--color-typography, #fff);background-color:var(--emw--color-red, red);border-radius:15px;margin:0 5px;line-height:10px;height:16px}.MethodFavorite p{padding:3px}.PaymentProcessing{padding:5px;color:var(--emw--color-primary, #ffce00);font-style:italic;font-size:var(--emw--font-size-small, 12px)}@media(min-width: 499px){.MethodLogo{margin:5px}.MethodLogo img{width:100%;height:100%;max-height:36px}.SelectorWrapper{padding:10px}.MethodTitle{font-size:var(--emw--font-size-medium, 12px)}.Limits{font-size:var(--emw--font-size-small, 10px)}}@media(max-width: 500px){.PaymentProcessing{font-size:var(--emw--font-size-x-small, 8px)}.MethodTitle{font-size:var(--emw--font-size-small, 10px)}.Limits{font-size:var(--emw--font-size-x-small, 8px)}}.EmptyContentMessageWrapper{position:relative;display:flex;justify-content:flex-end}.EmptyContentMessageContent{display:flex;flex-direction:column;row-gap:var(--emw--spacing-small, 12px);bottom:10%}.EmptyContentMessageImg{width:250px}.EmptyContentMessageImg img{border-radius:0 0 var(--emw--border-radius-medium-plus, 6px) 0;height:100%;width:100%}.EmptyContentMessageTitle{font-size:var(--emw--font-size-medium, 20px);font-weight:var(--emw--font-weight-bold, 800);line-height:calc(var(--emw--font-size-medium, 16px) + 4px);color:var(--emw--color-primary);text-transform:uppercase}.EmptyContentMessageText{word-break:break-word;font-size:var(--emw--font-size-small, 14px);line-height:calc(var(--emw--font-size-medium, 16px) + 4px);color:var(--emw--color-typography, #fff)}.EmptyContentMessageDesktop{justify-content:flex-start}.EmptyContentMessageDesktop .EmptyContentMessageContent{bottom:auto;margin-top:10px}.EmptyContentMessageDesktop .EmptyContentMessageImg{width:auto}.EmptyContentMessageDesktop .EmptyContentMessageImg img{transform:scaleX(-1)}.IconWarning{width:30px;display:flex}.IconWarning svg{height:18px;fill:var(--emw--color-warning, rgb(250, 146, 0))}.ShowAllButton{cursor:pointer;color:var(--emw--color-grey-290, #666);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;background:var(--emw--color-gray-50, #f7f8fa);line-height:normal;border:1px solid var(--emw--color-grey-105, #e8e9eb);border-radius:var(--emw--border-radius-medium, 4px);margin:var(--emw--spacing-small, 12px) auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}.ShowAllButton:hover{background:var(--emw--color-background, #fff)}.ErrorMessage{color:var(--emw--color-typography, var(--emw--color-white, #ffffff));font-size:12px}')}function ve(n,t,s){const r=n.slice();return r[58]=t[s],r[60]=s,r}function Le(n){let t,s,r,o,l=!n[15]&&Ce(n);function a(c,p){return c[15]&&c[14]?qe:We}let d=a(n),u=d(n),m=n[10]&&Se(n);return{c(){t=e.element("div"),l&&l.c(),s=e.space(),r=e.element("div"),u.c(),o=e.space(),m&&m.c(),e.attr(r,"class","CashierMethodList"),e.attr(t,"class","CashierMethodListWidget")},m(c,p){e.insert(c,t,p),l&&l.m(t,null),e.append(t,s),e.append(t,r),u.m(r,null),e.append(t,o),m&&m.m(t,null),n[34](t)},p(c,p){c[15]?l&&(l.d(1),l=null):l?l.p(c,p):(l=Ce(c),l.c(),l.m(t,s)),d===(d=a(c))&&u?u.p(c,p):(u.d(1),u=d(c),u&&(u.c(),u.m(r,null))),c[10]?m?m.p(c,p):(m=Se(c),m.c(),m.m(t,null)):m&&(m.d(1),m=null)},d(c){c&&e.detach(t),l&&l.d(),u.d(),m&&m.d(),n[34](null)}}}function Ce(n){let t,s,r=n[17]("otherMethodsTitle")+"",o,l,a,d=n[17]("otherMethodsDescription")+"",u;return{c(){t=e.element("div"),s=e.element("h3"),o=e.text(r),l=e.space(),a=e.element("p"),u=e.text(d),e.attr(t,"class","MethodsListDescription")},m(m,c){e.insert(m,t,c),e.append(t,s),e.append(s,o),e.append(t,l),e.append(t,a),e.append(a,u)},p(m,c){c[0]&131072&&r!==(r=m[17]("otherMethodsTitle")+"")&&e.set_data(o,r),c[0]&131072&&d!==(d=m[17]("otherMethodsDescription")+"")&&e.set_data(u,d)},d(m){m&&e.detach(t)}}}function We(n){let t,s=e.ensure_array_like(n[11]),r=[];for(let o=0;o<s.length;o+=1)r[o]=De(ve(n,s,o));return{c(){for(let o=0;o<r.length;o+=1)r[o].c();t=e.empty()},m(o,l){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(o,l);e.insert(o,t,l)},p(o,l){if(l[0]&469824){s=e.ensure_array_like(o[11]);let a;for(a=0;a<s.length;a+=1){const d=ve(o,s,a);r[a]?r[a].p(d,l):(r[a]=De(d),r[a].c(),r[a].m(t.parentNode,t))}for(;a<r.length;a+=1)r[a].d(1);r.length=s.length}},d(o){o&&e.detach(t),e.destroy_each(r,o)}}}function qe(n){let t,s,r,o=n[17]("error")+"",l,a,d,u=n[17]("noPaymentMethods")+"",m;return{c(){t=e.element("div"),s=e.element("div"),r=e.element("p"),l=e.text(o),a=e.space(),d=e.element("p"),m=e.text(u),e.attr(r,"class","EmptyContentMessageTitle"),e.attr(d,"class","EmptyContentMessageText"),e.attr(s,"class","EmptyContentMessageContent"),e.attr(t,"class","EmptyContentMessageWrapper"),e.toggle_class(t,"EmptyContentMessageDesktop",n[13])},m(c,p){e.insert(c,t,p),e.append(t,s),e.append(s,r),e.append(r,l),e.append(s,a),e.append(s,d),e.append(d,m)},p(c,p){p[0]&131072&&o!==(o=c[17]("error")+"")&&e.set_data(l,o),p[0]&131072&&u!==(u=c[17]("noPaymentMethods")+"")&&e.set_data(m,u),p[0]&8192&&e.toggle_class(t,"EmptyContentMessageDesktop",c[13])},d(c){c&&e.detach(t)}}}function ke(n){let t,s=n[17]("favorite")+"",r;return{c(){t=e.element("p"),r=e.text(s)},m(o,l){e.insert(o,t,l),e.append(t,r)},p(o,l){l[0]&131072&&s!==(s=o[17]("favorite")+"")&&e.set_data(r,s)},d(o){o&&e.detach(t)}}}function Pe(n){let t,s=n[17](`${n[6]}${n[58].ProcessingTime}`)+"",r;return{c(){t=e.element("span"),r=e.text(s),e.attr(t,"class","PaymentProcessing")},m(o,l){e.insert(o,t,l),e.append(t,r)},p(o,l){l[0]&133184&&s!==(s=o[17](`${o[6]}${o[58].ProcessingTime}`)+"")&&e.set_data(r,s)},d(o){o&&e.detach(t)}}}function Te(n){let t,s=n[17](`${n[6]}${n[58].ProcessingTime}`)+"",r;return{c(){t=e.element("span"),r=e.text(s),e.attr(t,"class","PaymentProcessing")},m(o,l){e.insert(o,t,l),e.append(t,r)},p(o,l){l[0]&133184&&s!==(s=o[17](`${o[6]}${o[58].ProcessingTime}`)+"")&&e.set_data(r,s)},d(o){o&&e.detach(t)}}}function De(n){var V,K,J,oe,re,ie,le,ae;let t,s,r,o,l,a,d,u,m,c,p,U=(n[58].Label||n[58].Name)+"",I,T,A,x,P,D,N=n[17]("generalMin")+"",H,Y,F=e.formatCurrency(n[58].DisplayCurrency.MinAmountLimit,n[58].DisplayCurrency.Name,{maximumFractionDigits:n[8][(K=(V=n[58])==null?void 0:V.DisplayCurrency)==null?void 0:K.Name]||n[16],minimumFractionDigits:n[8][(oe=(J=n[58])==null?void 0:J.DisplayCurrency)==null?void 0:oe.Name]||n[16]})+"",X,O,z,W=n[17]("generalMax")+"",L,ne,G=e.formatCurrency(n[58].DisplayCurrency.MaxAmountLimit,n[58].DisplayCurrency.Name,{maximumFractionDigits:n[8][(ie=(re=n[58])==null?void 0:re.DisplayCurrency)==null?void 0:ie.Name]||n[16],minimumFractionDigits:n[8][(ae=(le=n[58])==null?void 0:le.DisplayCurrency)==null?void 0:ae.Name]||n[16]})+"",C,R,j,b,q,y=n[58].isMethodPromoted&&ke(n),w=!n[13]&&Pe(n),g=n[13]&&Te(n);function se(){return n[32](n[58])}return{c(){t=e.element("div"),s=e.element("div"),r=e.element("img"),a=e.space(),d=e.element("div"),y&&y.c(),u=e.space(),m=e.element("div"),c=e.element("div"),p=e.element("span"),I=e.text(U),T=e.space(),w&&w.c(),A=e.space(),x=e.element("div"),P=e.element("span"),D=e.element("p"),H=e.text(N),Y=e.space(),X=e.text(F),O=e.space(),z=e.element("p"),L=e.text(W),ne=e.space(),C=e.text(G),R=e.space(),g&&g.c(),j=e.space(),e.src_url_equal(r.src,o=n[58].LogoUrl)||e.attr(r,"src",o),e.attr(r,"alt",l=n[58].Label),e.attr(s,"class","MethodLogo"),e.attr(d,"class","MethodFavorite"),e.attr(c,"class","MethodTitle"),e.attr(P,"class","Limits"),e.attr(x,"class","MethodLimits"),e.attr(m,"class","MethodInfo"),e.attr(t,"class","SelectorWrapper"),e.toggle_class(t,"checked",n[9]===n[58].Name)},m(B,_){e.insert(B,t,_),e.append(t,s),e.append(s,r),e.append(t,a),e.append(t,d),y&&y.m(d,null),e.append(t,u),e.append(t,m),e.append(m,c),e.append(c,p),e.append(p,I),e.append(m,T),w&&w.m(m,null),e.append(m,A),e.append(m,x),e.append(x,P),e.append(P,D),e.append(D,H),e.append(D,Y),e.append(D,X),e.append(P,O),e.append(P,z),e.append(z,L),e.append(z,ne),e.append(z,C),e.append(m,R),g&&g.m(m,null),e.append(t,j),b||(q=[e.listen(t,"click",se),e.listen(t,"keyup",Xe)],b=!0)},p(B,_){var me,ce,Z,de,ue,Q,$,pe;n=B,_[0]&2048&&!e.src_url_equal(r.src,o=n[58].LogoUrl)&&e.attr(r,"src",o),_[0]&2048&&l!==(l=n[58].Label)&&e.attr(r,"alt",l),n[58].isMethodPromoted?y?y.p(n,_):(y=ke(n),y.c(),y.m(d,null)):y&&(y.d(1),y=null),_[0]&2048&&U!==(U=(n[58].Label||n[58].Name)+"")&&e.set_data(I,U),n[13]?w&&(w.d(1),w=null):w?w.p(n,_):(w=Pe(n),w.c(),w.m(m,A)),_[0]&131072&&N!==(N=n[17]("generalMin")+"")&&e.set_data(H,N),_[0]&67840&&F!==(F=e.formatCurrency(n[58].DisplayCurrency.MinAmountLimit,n[58].DisplayCurrency.Name,{maximumFractionDigits:n[8][(ce=(me=n[58])==null?void 0:me.DisplayCurrency)==null?void 0:ce.Name]||n[16],minimumFractionDigits:n[8][(de=(Z=n[58])==null?void 0:Z.DisplayCurrency)==null?void 0:de.Name]||n[16]})+"")&&e.set_data(X,F),_[0]&131072&&W!==(W=n[17]("generalMax")+"")&&e.set_data(L,W),_[0]&67840&&G!==(G=e.formatCurrency(n[58].DisplayCurrency.MaxAmountLimit,n[58].DisplayCurrency.Name,{maximumFractionDigits:n[8][(Q=(ue=n[58])==null?void 0:ue.DisplayCurrency)==null?void 0:Q.Name]||n[16],minimumFractionDigits:n[8][(pe=($=n[58])==null?void 0:$.DisplayCurrency)==null?void 0:pe.Name]||n[16]})+"")&&e.set_data(C,G),n[13]?g?g.p(n,_):(g=Te(n),g.c(),g.m(m,null)):g&&(g.d(1),g=null),_[0]&2560&&e.toggle_class(t,"checked",n[9]===n[58].Name)},d(B){B&&e.detach(t),y&&y.d(),w&&w.d(),g&&g.d(),b=!1,e.run_all(q)}}}function Se(n){let t,s,r,o;return{c(){t=e.element("div"),s=e.text(n[10]),e.attr(t,"class","ShowAllButton")},m(l,a){e.insert(l,t,a),e.append(t,s),r||(o=e.listen(t,"click",n[33]),r=!0)},p(l,a){a[0]&1024&&e.set_data(s,l[10])},d(l){l&&e.detach(t),r=!1,o()}}}function Ee(n){let t,s,r;return{c(){t=e.element("cashier-error"),s=e.element("span"),r=e.text(n[12]),e.attr(s,"class","ErrorMessage"),e.attr(s,"slot","text"),e.set_custom_element_data(t,"lang",n[0]),e.set_custom_element_data(t,"assetsurl",n[1]),e.set_custom_element_data(t,"translationurl",n[2]),e.set_custom_element_data(t,"clientstylingurl",n[5]),e.set_custom_element_data(t,"clientstyling",n[4]),e.set_custom_element_data(t,"mbsource",n[3]),e.set_custom_element_data(t,"hidebuttons","true")},m(o,l){e.insert(o,t,l),e.append(t,s),e.append(s,r)},p(o,l){l[0]&4096&&e.set_data(r,o[12]),l[0]&1&&e.set_custom_element_data(t,"lang",o[0]),l[0]&2&&e.set_custom_element_data(t,"assetsurl",o[1]),l[0]&4&&e.set_custom_element_data(t,"translationurl",o[2]),l[0]&32&&e.set_custom_element_data(t,"clientstylingurl",o[5]),l[0]&16&&e.set_custom_element_data(t,"clientstyling",o[4]),l[0]&8&&e.set_custom_element_data(t,"mbsource",o[3])},d(o){o&&e.detach(t)}}}function Be(n){let t,s,r=n[14]&&Le(n),o=n[12]&&Ee(n);return{c(){r&&r.c(),t=e.space(),o&&o.c(),s=e.empty()},m(l,a){r&&r.m(l,a),e.insert(l,t,a),o&&o.m(l,a),e.insert(l,s,a)},p(l,a){l[14]?r?r.p(l,a):(r=Le(l),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null),l[12]?o?o.p(l,a):(o=Ee(l),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i:e.noop,o:e.noop,d(l){l&&(e.detach(t),e.detach(s)),r&&r.d(l),o&&o.d(l)}}}const Ye="PaymentPromotion",Xe=()=>{};function Ge(n,t,s){let r,o,l;e.component_subscribe(n,e.$format,i=>s(17,o=i)),e.component_subscribe(n,te.xPaymentSessionToken,i=>s(42,l=i)),te.dayjs.extend(te.utc);let{lang:a="en"}=t,{local:d="en-US"}=t,{endpoint:u}=t,{paymentsession:m}=t,{playersession:c}=t,{customerid:p}=t,{assetsurl:U}=t,{currency:I}=t,{numberofmethodsshown:T}=t,{translationurl:A=""}=t,{mbsource:x}=t,{clientstyling:P}=t,{clientstylingurl:D}=t,{currencydecimals:N="0"}=t,{currencysymbol:H=""}=t,{currencyposition:Y=""}=t,{promotedmethods:F="false"}=t,{type:X}=t,{userroles:O=""}=t,z,W={},L,ne,G=window.navigator.userAgent,C=[],R,j="",b=[],q=[],y="",w,g=!0,se=!1,V=!1,K=[];var J;(function(i){i.PlayerSessionIsNotValid="PlayerSessionIsNotValid",i.Success="Success",i.JwtTokenError="JwtTokenError"})(J||(J={}));const oe=()=>{let i=A;if(i)return fetch(i).then(f=>f.json()).then(f=>{Object.keys(f).forEach(S=>{Me(S,f[S])})}).catch(f=>{console.log(f)})};Object.keys(be).forEach(i=>{Me(i,be[i])});const re=()=>{Ie(a)},ie=i=>{l&&le(i)},le=i=>{const{currency:f}=i,h=z!==void 0&&z!==f?"MetadataLoading":"DataLoading";z=f,window.postMessage({type:h,isDataLoaded:!1},window.location.href);const M=new URL(`${u}/v2/player/${p}/payment/GetPaymentMetadata`),k=new Headers;k.append("accept","application/json"),k.append("Content-Type","application/json"),k.append("X-Client-Request-Timestamp",te.dayjs.utc().format("YYYY-MM-DD HH:mm:ss.SSS")),k.append("X-SessionId",`${c}`),k.append("X-Payment-Session-Token",`${m||l}`),K.indexOf("MM_CHANNEL_BETA")!=-1&&k.append("MM_CHANNEL","BETA");const E={method:"POST",headers:k,mode:"cors",body:JSON.stringify(he(fe({},f&&{Currency:f}),{Tags:{UserAgent:window.navigator.userAgent}}))};fetch(M,E).then(v=>{const ee=v.headers.get("X-Payment-Session-Token");return ee&&te.xPaymentSessionToken.set(ee),v.json()}).then(v=>{var ee;if(v.error){s(12,y=v.error);return}if(v.ResponseCode!==J.Success){w=v.ResponseCode,me();return}C=(ee=v.PaymentMethods)!=null&&ee.Ordering?ae(v):B(v),window.postMessage({type:"PromotedPaymentMethods",promotedPaymentMethods:q},window.location.href),s(10,j=T&&+T>0&&C.length>+T?o("showAll"):""),s(11,b=j?C.slice(0,+T):C),F=="false"&&s(11,b=b.sort((ge,ye)=>ge.isMethodPromoted&&!ye.isMethodPromoted?-1:!ge.isMethodPromoted&&ye.isMethodPromoted?1:0)),s(15,V=!b.length),window.postMessage({type:"StartSessionCountdown",paymentMethodName:C[0].Name},window.location.href),window.postMessage({type:h,isDataLoaded:!0},window.location.href)}).finally(()=>{s(14,se=!0),window.postMessage({type:h,isDataLoaded:!0},window.location.href)})},ae=i=>{const f=[];return q=[],i.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach(S=>{const h=i.PaymentMethods.PaymentMethods.find(M=>M.Name===S);if(h){const M=(h==null?void 0:h.Logos.find(v=>v.LogoType==="Desktop"))||{},k=(h==null?void 0:h.Logos.find(v=>v.LogoType==="Mobile"))||{},E=g?M:k;h.isMethodPromoted=Q(h.Tags),h.LogoUrl=E.LogoRelativeUrl?`${window.origin}${E.LogoRelativeUrl}`:`${E.LogoUrl}`,h.isMethodPromoted&&q.push(h),f.push(h)}}),f},B=i=>{const f=i.PaymentMethods.PaymentMethods.map(M=>he(fe({},M),{isMethodPromoted:Q(M.Tags),LogoUrl:M.Logos&&M.Logos.length&&M.Logos[0].LogoUrl?`https:${M.Logos[0].LogoUrl}`:""})),[S,h]=f.reduce(([M,k],E)=>(E&&E.isMethodPromoted?M.push(E):k.promo(E),[M,k]),[[],[]]);return q=S,h},_=i=>{s(9,R=i.Name),window.postMessage({type:"SelectPayMeth",details:i},window.location.href),dispatchEvent(new CustomEvent("selectPayMeth",{detail:i,bubbles:!0,cancelable:!0,composed:!0}))},me=()=>{window.postMessage({type:"ErrorResponseCode",errorResponseCode:w},window.location.href)},ce=()=>{s(13,g=!e.isMobile(G))},Z=()=>{b==C?ue():de()},de=()=>{s(11,b=C),s(10,j=o("showLess"))},ue=()=>{s(11,b=C.slice(0,+T)),R&&!b.find(i=>i.Name===R)&&b.splice(0,0,C.find(i=>i.Name===R)),s(10,j=o("showAll"))},Q=i=>i&&i.split(",").some(f=>f===Ye),$=i=>{var S;const{data:{type:f}={}}=i||{};switch(f){case"PrecisionCurrenciesMap":{s(8,W=((S=i==null?void 0:i.data)==null?void 0:S.payload)||{});break}}},pe=()=>{O.length>0&&(K=O.split(","))};e.onMount(()=>(ce(),e.initCurrencyFormatter(d,H,Y,N),window.postMessage({type:"CashierMethodsListReady"},window.location.href),window.addEventListener("message",$),()=>{window.removeEventListener("message",$)}));const Ne=i=>_(i),ze=()=>Z();function Ae(i){e.binding_callbacks[i?"unshift":"push"](()=>{L=i,s(7,L)})}return n.$$set=i=>{"lang"in i&&s(0,a=i.lang),"local"in i&&s(20,d=i.local),"endpoint"in i&&s(21,u=i.endpoint),"paymentsession"in i&&s(22,m=i.paymentsession),"playersession"in i&&s(23,c=i.playersession),"customerid"in i&&s(24,p=i.customerid),"assetsurl"in i&&s(1,U=i.assetsurl),"currency"in i&&s(25,I=i.currency),"numberofmethodsshown"in i&&s(26,T=i.numberofmethodsshown),"translationurl"in i&&s(2,A=i.translationurl),"mbsource"in i&&s(3,x=i.mbsource),"clientstyling"in i&&s(4,P=i.clientstyling),"clientstylingurl"in i&&s(5,D=i.clientstylingurl),"currencydecimals"in i&&s(27,N=i.currencydecimals),"currencysymbol"in i&&s(28,H=i.currencysymbol),"currencyposition"in i&&s(29,Y=i.currencyposition),"promotedmethods"in i&&s(30,F=i.promotedmethods),"type"in i&&s(6,X=i.type),"userroles"in i&&s(31,O=i.userroles)},n.$$.update=()=>{n.$$.dirty[1]&1&&O&&pe(),n.$$.dirty[0]&56623104&&u&&!m&&p&&ie({currency:I}),n.$$.dirty[0]&1&&a&&re(),n.$$.dirty[0]&144&&P&&L&&e.setClientStyling(L,P),n.$$.dirty[0]&160&&D&&L&&e.setClientStylingURL(L,D),n.$$.dirty[0]&136&&x&&L&&e.setStreamStyling(L,`${x}.Style`,ne),n.$$.dirty[0]&5&&a&&A&&oe(),n.$$.dirty[0]&134217728&&s(16,r=Number(N))},[a,U,A,x,P,D,X,L,W,R,j,b,y,g,se,V,r,o,_,Z,d,u,m,c,p,I,T,N,H,Y,F,O,Ne,ze,Ae]}class xe extends e.SvelteComponent{constructor(t){super(),e.init$1(this,t,Ge,Be,e.safe_not_equal,{lang:0,local:20,endpoint:21,paymentsession:22,playersession:23,customerid:24,assetsurl:1,currency:25,numberofmethodsshown:26,translationurl:2,mbsource:3,clientstyling:4,clientstylingurl:5,currencydecimals:27,currencysymbol:28,currencyposition:29,promotedmethods:30,type:6,userroles:31},He,[-1,-1])}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),e.flush()}get local(){return this.$$.ctx[20]}set local(t){this.$$set({local:t}),e.flush()}get endpoint(){return this.$$.ctx[21]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get paymentsession(){return this.$$.ctx[22]}set paymentsession(t){this.$$set({paymentsession:t}),e.flush()}get playersession(){return this.$$.ctx[23]}set playersession(t){this.$$set({playersession:t}),e.flush()}get customerid(){return this.$$.ctx[24]}set customerid(t){this.$$set({customerid:t}),e.flush()}get assetsurl(){return this.$$.ctx[1]}set assetsurl(t){this.$$set({assetsurl:t}),e.flush()}get currency(){return this.$$.ctx[25]}set currency(t){this.$$set({currency:t}),e.flush()}get numberofmethodsshown(){return this.$$.ctx[26]}set numberofmethodsshown(t){this.$$set({numberofmethodsshown:t}),e.flush()}get translationurl(){return this.$$.ctx[2]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get mbsource(){return this.$$.ctx[3]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get clientstyling(){return this.$$.ctx[4]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[5]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get currencydecimals(){return this.$$.ctx[27]}set currencydecimals(t){this.$$set({currencydecimals:t}),e.flush()}get currencysymbol(){return this.$$.ctx[28]}set currencysymbol(t){this.$$set({currencysymbol:t}),e.flush()}get currencyposition(){return this.$$.ctx[29]}set currencyposition(t){this.$$set({currencyposition:t}),e.flush()}get promotedmethods(){return this.$$.ctx[30]}set promotedmethods(t){this.$$set({promotedmethods:t}),e.flush()}get type(){return this.$$.ctx[6]}set type(t){this.$$set({type:t}),e.flush()}get userroles(){return this.$$.ctx[31]}set userroles(t){this.$$set({userroles:t}),e.flush()}}e.create_custom_element(xe,{lang:{},local:{},endpoint:{},paymentsession:{},playersession:{},customerid:{},assetsurl:{},currency:{},numberofmethodsshown:{},translationurl:{},mbsource:{},clientstyling:{},clientstylingurl:{},currencydecimals:{},currencysymbol:{},currencyposition:{},promotedmethods:{},type:{},userroles:{}},[],[],!0);exports.default=xe;
|
|
@@ -11,8 +11,8 @@ var Ee = (t, e, o) => e in t ? Qe(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
11
11
|
return t;
|
|
12
12
|
}, Ce = (t, e) => $e(t, et(e));
|
|
13
13
|
import { a as st, i as nt, $ as it, S as rt, b as lt, s as at, f as w, c as mt, G as Ne, e as A, k as x, n as P, r as Je, p as ze, q as ct, O as dt, l as a, m as f, o as h, v as D, A as N, w as T, N as ut, y as ft, x as Pe, W as Le, Z as Ae, a4 as ht, U as ve, a2 as gt, z as xe, B as pt, C as yt, D as wt, E as Mt, F as bt } from "./CashierCarousel-DwrGzk7c.js";
|
|
14
|
-
import { d as
|
|
15
|
-
function
|
|
14
|
+
import { d as Fe, u as _t, x as Oe } from "./CashierMethodDetails-D5zqf686.js";
|
|
15
|
+
function Re(t, e) {
|
|
16
16
|
st(t, e);
|
|
17
17
|
}
|
|
18
18
|
function vt(t) {
|
|
@@ -20,7 +20,7 @@ function vt(t) {
|
|
|
20
20
|
fallbackLocale: "en"
|
|
21
21
|
}), it.set(t);
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const Ue = {
|
|
24
24
|
en: {
|
|
25
25
|
generalMin: "Min",
|
|
26
26
|
generalMax: "Max",
|
|
@@ -281,7 +281,7 @@ function Ye(t) {
|
|
|
281
281
|
/*payMeth*/
|
|
282
282
|
(t[58].Label || /*payMeth*/
|
|
283
283
|
t[58].Name) + ""
|
|
284
|
-
), V,
|
|
284
|
+
), V, O, q, I, F, R, H = (
|
|
285
285
|
/*$_*/
|
|
286
286
|
t[17]("generalMin") + ""
|
|
287
287
|
), Z, ee, B = ve(
|
|
@@ -307,7 +307,7 @@ function Ye(t) {
|
|
|
307
307
|
t[16]
|
|
308
308
|
)
|
|
309
309
|
}
|
|
310
|
-
) + "", te, Y,
|
|
310
|
+
) + "", te, Y, W, K = (
|
|
311
311
|
/*$_*/
|
|
312
312
|
t[17]("generalMax") + ""
|
|
313
313
|
), S, ce, oe = ve(
|
|
@@ -352,12 +352,9 @@ function Ye(t) {
|
|
|
352
352
|
}
|
|
353
353
|
return {
|
|
354
354
|
c() {
|
|
355
|
-
e = f("div"), o = f("div"), n = f("img"), l = P(), d = f("div"), b && b.c(), u = P(), m = f("div"), c = f("div"), g = f("span"), V = T(J),
|
|
356
|
-
t[58].
|
|
357
|
-
|
|
358
|
-
t[58].LogoUrl
|
|
359
|
-
)) || h(n, "src", s), h(n, "alt", r = /*payMeth*/
|
|
360
|
-
t[58].Label), h(o, "class", "MethodLogo"), h(d, "class", "MethodFavorite"), h(c, "class", "MethodTitle"), h(R, "class", "Limits"), h(j, "class", "MethodLimits"), h(m, "class", "MethodInfo"), h(e, "class", "SelectorWrapper"), Le(
|
|
355
|
+
e = f("div"), o = f("div"), n = f("img"), l = P(), d = f("div"), b && b.c(), u = P(), m = f("div"), c = f("div"), g = f("span"), V = T(J), O = P(), _ && _.c(), q = P(), I = f("div"), F = f("span"), R = f("p"), Z = T(H), ee = P(), te = T(B), Y = P(), W = f("p"), S = T(K), ce = P(), E = T(oe), G = P(), M && M.c(), X = P(), xe(n.src, s = /*payMeth*/
|
|
356
|
+
t[58].LogoUrl) || h(n, "src", s), h(n, "alt", r = /*payMeth*/
|
|
357
|
+
t[58].Label), h(o, "class", "MethodLogo"), h(d, "class", "MethodFavorite"), h(c, "class", "MethodTitle"), h(F, "class", "Limits"), h(I, "class", "MethodLimits"), h(m, "class", "MethodInfo"), h(e, "class", "SelectorWrapper"), Le(
|
|
361
358
|
e,
|
|
362
359
|
"checked",
|
|
363
360
|
/*selectedPaymentMethod*/
|
|
@@ -366,7 +363,7 @@ function Ye(t) {
|
|
|
366
363
|
);
|
|
367
364
|
},
|
|
368
365
|
m($, v) {
|
|
369
|
-
x($, e, v), a(e, o), a(o, n), a(e, l), a(e, d), b && b.m(d, null), a(e, u), a(e, m), a(m, c), a(c, g), a(g, V), a(m,
|
|
366
|
+
x($, e, v), a(e, o), a(o, n), a(e, l), a(e, d), b && b.m(d, null), a(e, u), a(e, m), a(m, c), a(c, g), a(g, V), a(m, O), _ && _.m(m, null), a(m, q), a(m, I), a(I, F), a(F, R), a(R, Z), a(R, ee), a(R, te), a(F, Y), a(F, W), a(W, S), a(W, ce), a(W, E), a(m, G), M && M.m(m, null), a(e, X), k || (Q = [
|
|
370
367
|
Pe(e, "click", de),
|
|
371
368
|
Pe(e, "keyup", Tt)
|
|
372
369
|
], k = !0);
|
|
@@ -375,10 +372,7 @@ function Ye(t) {
|
|
|
375
372
|
var ye, we, re, Me, be, le, ae, _e;
|
|
376
373
|
t = $, v[0] & /*paymentMethodsToShow*/
|
|
377
374
|
2048 && !xe(n.src, s = /*payMeth*/
|
|
378
|
-
t[58].
|
|
379
|
-
/*payMeth*/
|
|
380
|
-
t[58].LogoUrl
|
|
381
|
-
)) && h(n, "src", s), v[0] & /*paymentMethodsToShow*/
|
|
375
|
+
t[58].LogoUrl) && h(n, "src", s), v[0] & /*paymentMethodsToShow*/
|
|
382
376
|
2048 && r !== (r = /*payMeth*/
|
|
383
377
|
t[58].Label) && h(n, "alt", r), /*payMeth*/
|
|
384
378
|
t[58].isMethodPromoted ? b ? b.p(t, v) : (b = We(t), b.c(), b.m(d, null)) : b && (b.d(1), b = null), v[0] & /*paymentMethodsToShow*/
|
|
@@ -386,8 +380,8 @@ function Ye(t) {
|
|
|
386
380
|
(t[58].Label || /*payMeth*/
|
|
387
381
|
t[58].Name) + "") && D(V, J), /*desktopView*/
|
|
388
382
|
t[13] ? _ && (_.d(1), _ = null) : _ ? _.p(t, v) : (_ = qe(t), _.c(), _.m(m, q)), v[0] & /*$_*/
|
|
389
|
-
131072 &&
|
|
390
|
-
t[17]("generalMin") + "") && D(Z,
|
|
383
|
+
131072 && H !== (H = /*$_*/
|
|
384
|
+
t[17]("generalMin") + "") && D(Z, H), v[0] & /*paymentMethodsToShow, precisionCurrenciesMap, numericCurrencyDecimals*/
|
|
391
385
|
67840 && B !== (B = ve(
|
|
392
386
|
/*payMeth*/
|
|
393
387
|
t[58].DisplayCurrency.MinAmountLimit,
|
|
@@ -604,8 +598,8 @@ const Dt = "PaymentPromotion", Tt = () => {
|
|
|
604
598
|
};
|
|
605
599
|
function St(t, e, o) {
|
|
606
600
|
let n, s, r;
|
|
607
|
-
ze(t, bt, (i) => o(17, s = i)), ze(t,
|
|
608
|
-
let { lang: l = "en" } = e, { local: d = "en-US" } = e, { endpoint: u } = e, { paymentsession: m } = e, { playersession: c } = e, { customerid: g } = e, { assetsurl: J } = e, { currency: V } = e, { numberofmethodsshown:
|
|
601
|
+
ze(t, bt, (i) => o(17, s = i)), ze(t, Oe, (i) => o(42, r = i)), Fe.extend(_t);
|
|
602
|
+
let { lang: l = "en" } = e, { local: d = "en-US" } = e, { endpoint: u } = e, { paymentsession: m } = e, { playersession: c } = e, { customerid: g } = e, { assetsurl: J } = e, { currency: V } = e, { numberofmethodsshown: O } = e, { translationurl: q = "" } = e, { mbsource: I } = e, { clientstyling: F } = e, { clientstylingurl: R } = e, { currencydecimals: H = "0" } = e, { currencysymbol: Z = "" } = e, { currencyposition: ee = "" } = e, { promotedmethods: B = "false" } = e, { type: te } = e, { userroles: Y = "" } = e, W, K = {}, S, ce, oe = window.navigator.userAgent, E = [], G, X = "", k = [], Q = [], b = "", _, M = !0, de = !1, ne = !1, ie = [];
|
|
609
603
|
var se;
|
|
610
604
|
(function(i) {
|
|
611
605
|
i.PlayerSessionIsNotValid = "PlayerSessionIsNotValid", i.Success = "Success", i.JwtTokenError = "JwtTokenError";
|
|
@@ -614,26 +608,26 @@ function St(t, e, o) {
|
|
|
614
608
|
let i = q;
|
|
615
609
|
if (i)
|
|
616
610
|
return fetch(i).then((p) => p.json()).then((p) => {
|
|
617
|
-
Object.keys(p).forEach((
|
|
618
|
-
|
|
611
|
+
Object.keys(p).forEach((U) => {
|
|
612
|
+
Re(U, p[U]);
|
|
619
613
|
});
|
|
620
614
|
}).catch((p) => {
|
|
621
615
|
console.log(p);
|
|
622
616
|
});
|
|
623
617
|
};
|
|
624
|
-
Object.keys(
|
|
625
|
-
|
|
618
|
+
Object.keys(Ue).forEach((i) => {
|
|
619
|
+
Re(i, Ue[i]);
|
|
626
620
|
});
|
|
627
621
|
const fe = () => {
|
|
628
622
|
vt(l);
|
|
629
623
|
}, he = (i) => {
|
|
630
624
|
r && ge(i);
|
|
631
625
|
}, ge = (i) => {
|
|
632
|
-
const { currency: p } = i, y =
|
|
633
|
-
|
|
626
|
+
const { currency: p } = i, y = W !== void 0 && W !== p ? "MetadataLoading" : "DataLoading";
|
|
627
|
+
W = p, window.postMessage({ type: y, isDataLoaded: !1 }, window.location.href);
|
|
634
628
|
const L = new URL(`${u}/v2/player/${g}/payment/GetPaymentMetadata`), z = new Headers();
|
|
635
|
-
z.append("accept", "application/json"), z.append("Content-Type", "application/json"), z.append("X-Client-Request-Timestamp",
|
|
636
|
-
const
|
|
629
|
+
z.append("accept", "application/json"), z.append("Content-Type", "application/json"), z.append("X-Client-Request-Timestamp", Fe.utc().format("YYYY-MM-DD HH:mm:ss.SSS")), z.append("X-SessionId", `${c}`), z.append("X-Payment-Session-Token", `${m || r}`), ie.indexOf("MM_CHANNEL_BETA") != -1 && z.append("MM_CHANNEL", "BETA");
|
|
630
|
+
const j = {
|
|
637
631
|
method: "POST",
|
|
638
632
|
headers: z,
|
|
639
633
|
mode: "cors",
|
|
@@ -641,9 +635,9 @@ function St(t, e, o) {
|
|
|
641
635
|
Tags: { UserAgent: window.navigator.userAgent }
|
|
642
636
|
}))
|
|
643
637
|
};
|
|
644
|
-
fetch(L,
|
|
638
|
+
fetch(L, j).then((C) => {
|
|
645
639
|
const me = C.headers.get("X-Payment-Session-Token");
|
|
646
|
-
return me &&
|
|
640
|
+
return me && Oe.set(me), C.json();
|
|
647
641
|
}).then((C) => {
|
|
648
642
|
var me;
|
|
649
643
|
if (C.error) {
|
|
@@ -660,7 +654,7 @@ function St(t, e, o) {
|
|
|
660
654
|
promotedPaymentMethods: Q
|
|
661
655
|
},
|
|
662
656
|
window.location.href
|
|
663
|
-
), o(10, X =
|
|
657
|
+
), o(10, X = O && +O > 0 && E.length > +O ? s("showAll") : ""), o(11, k = X ? E.slice(0, +O) : E), B == "false" && o(11, k = k.sort((De, Te) => De.isMethodPromoted && !Te.isMethodPromoted ? -1 : !De.isMethodPromoted && Te.isMethodPromoted ? 1 : 0)), o(15, ne = !k.length), window.postMessage(
|
|
664
658
|
{
|
|
665
659
|
type: "StartSessionCountdown",
|
|
666
660
|
paymentMethodName: E[0].Name
|
|
@@ -672,22 +666,22 @@ function St(t, e, o) {
|
|
|
672
666
|
});
|
|
673
667
|
}, pe = (i) => {
|
|
674
668
|
const p = [];
|
|
675
|
-
return Q = [], i.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach((
|
|
676
|
-
const y = i.PaymentMethods.PaymentMethods.find((L) => L.Name ===
|
|
669
|
+
return Q = [], i.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach((U) => {
|
|
670
|
+
const y = i.PaymentMethods.PaymentMethods.find((L) => L.Name === U);
|
|
677
671
|
if (y) {
|
|
678
|
-
const L = (y == null ? void 0 : y.Logos.find((C) => C.LogoType === "Desktop")) || {}, z = (y == null ? void 0 : y.Logos.find((C) => C.LogoType === "Mobile")) || {},
|
|
679
|
-
y.isMethodPromoted = le(y.Tags), y.LogoUrl =
|
|
672
|
+
const L = (y == null ? void 0 : y.Logos.find((C) => C.LogoType === "Desktop")) || {}, z = (y == null ? void 0 : y.Logos.find((C) => C.LogoType === "Mobile")) || {}, j = M ? L : z;
|
|
673
|
+
y.isMethodPromoted = le(y.Tags), y.LogoUrl = j.LogoRelativeUrl ? `${window.origin}${j.LogoRelativeUrl}` : `${j.LogoUrl}`, y.isMethodPromoted && Q.push(y), p.push(y);
|
|
680
674
|
}
|
|
681
675
|
}), p;
|
|
682
676
|
}, $ = (i) => {
|
|
683
677
|
const p = i.PaymentMethods.PaymentMethods.map((L) => Ce(ke({}, L), {
|
|
684
678
|
isMethodPromoted: le(L.Tags),
|
|
685
679
|
LogoUrl: L.Logos && L.Logos.length && L.Logos[0].LogoUrl ? `https:${L.Logos[0].LogoUrl}` : ""
|
|
686
|
-
})), [
|
|
687
|
-
([L, z],
|
|
680
|
+
})), [U, y] = p.reduce(
|
|
681
|
+
([L, z], j) => (j && j.isMethodPromoted ? L.push(j) : z.promo(j), [L, z]),
|
|
688
682
|
[[], []]
|
|
689
683
|
);
|
|
690
|
-
return Q =
|
|
684
|
+
return Q = U, y;
|
|
691
685
|
}, v = (i) => {
|
|
692
686
|
o(9, G = i.Name), window.postMessage({ type: "SelectPayMeth", details: i }, window.location.href), dispatchEvent(new CustomEvent(
|
|
693
687
|
"selectPayMeth",
|
|
@@ -713,20 +707,20 @@ function St(t, e, o) {
|
|
|
713
707
|
}, Me = () => {
|
|
714
708
|
o(11, k = E), o(10, X = s("showLess"));
|
|
715
709
|
}, be = () => {
|
|
716
|
-
o(11, k = E.slice(0, +
|
|
710
|
+
o(11, k = E.slice(0, +O)), G && !k.find((i) => i.Name === G) && k.splice(0, 0, E.find((i) => i.Name === G)), o(10, X = s("showAll"));
|
|
717
711
|
}, le = (i) => i && i.split(",").some((p) => p === Dt), ae = (i) => {
|
|
718
|
-
var
|
|
712
|
+
var U;
|
|
719
713
|
const { data: { type: p } = {} } = i || {};
|
|
720
714
|
switch (p) {
|
|
721
715
|
case "PrecisionCurrenciesMap": {
|
|
722
|
-
o(8, K = ((
|
|
716
|
+
o(8, K = ((U = i == null ? void 0 : i.data) == null ? void 0 : U.payload) || {});
|
|
723
717
|
break;
|
|
724
718
|
}
|
|
725
719
|
}
|
|
726
720
|
}, _e = () => {
|
|
727
721
|
Y.length > 0 && (ie = Y.split(","));
|
|
728
722
|
};
|
|
729
|
-
ct(() => (we(), dt(d, Z, ee,
|
|
723
|
+
ct(() => (we(), dt(d, Z, ee, H), window.postMessage({ type: "CashierMethodsListReady" }, window.location.href), window.addEventListener("message", ae), () => {
|
|
730
724
|
window.removeEventListener("message", ae);
|
|
731
725
|
}));
|
|
732
726
|
const Ve = (i) => v(i), Ze = () => re();
|
|
@@ -736,24 +730,24 @@ function St(t, e, o) {
|
|
|
736
730
|
});
|
|
737
731
|
}
|
|
738
732
|
return t.$$set = (i) => {
|
|
739
|
-
"lang" in i && o(0, l = i.lang), "local" in i && o(20, d = i.local), "endpoint" in i && o(21, u = i.endpoint), "paymentsession" in i && o(22, m = i.paymentsession), "playersession" in i && o(23, c = i.playersession), "customerid" in i && o(24, g = i.customerid), "assetsurl" in i && o(1, J = i.assetsurl), "currency" in i && o(25, V = i.currency), "numberofmethodsshown" in i && o(26,
|
|
733
|
+
"lang" in i && o(0, l = i.lang), "local" in i && o(20, d = i.local), "endpoint" in i && o(21, u = i.endpoint), "paymentsession" in i && o(22, m = i.paymentsession), "playersession" in i && o(23, c = i.playersession), "customerid" in i && o(24, g = i.customerid), "assetsurl" in i && o(1, J = i.assetsurl), "currency" in i && o(25, V = i.currency), "numberofmethodsshown" in i && o(26, O = i.numberofmethodsshown), "translationurl" in i && o(2, q = i.translationurl), "mbsource" in i && o(3, I = i.mbsource), "clientstyling" in i && o(4, F = i.clientstyling), "clientstylingurl" in i && o(5, R = i.clientstylingurl), "currencydecimals" in i && o(27, H = i.currencydecimals), "currencysymbol" in i && o(28, Z = i.currencysymbol), "currencyposition" in i && o(29, ee = i.currencyposition), "promotedmethods" in i && o(30, B = i.promotedmethods), "type" in i && o(6, te = i.type), "userroles" in i && o(31, Y = i.userroles);
|
|
740
734
|
}, t.$$.update = () => {
|
|
741
735
|
t.$$.dirty[1] & /*userroles*/
|
|
742
736
|
1 && Y && _e(), t.$$.dirty[0] & /*endpoint, paymentsession, customerid, currency*/
|
|
743
737
|
56623104 && u && !m && g && he({ currency: V }), t.$$.dirty[0] & /*lang*/
|
|
744
738
|
1 && l && fe(), t.$$.dirty[0] & /*clientstyling, customStylingContainer*/
|
|
745
|
-
144 &&
|
|
746
|
-
160 &&
|
|
747
|
-
136 &&
|
|
739
|
+
144 && F && S && pt(S, F), t.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
|
|
740
|
+
160 && R && S && yt(S, R), t.$$.dirty[0] & /*mbsource, customStylingContainer*/
|
|
741
|
+
136 && I && S && wt(S, `${I}.Style`, ce), t.$$.dirty[0] & /*lang, translationurl*/
|
|
748
742
|
5 && l && q && ue(), t.$$.dirty[0] & /*currencydecimals*/
|
|
749
|
-
134217728 && o(16, n = Number(
|
|
743
|
+
134217728 && o(16, n = Number(H));
|
|
750
744
|
}, [
|
|
751
745
|
l,
|
|
752
746
|
J,
|
|
753
747
|
q,
|
|
754
|
-
|
|
748
|
+
I,
|
|
749
|
+
F,
|
|
755
750
|
R,
|
|
756
|
-
U,
|
|
757
751
|
te,
|
|
758
752
|
S,
|
|
759
753
|
K,
|
|
@@ -774,8 +768,8 @@ function St(t, e, o) {
|
|
|
774
768
|
c,
|
|
775
769
|
g,
|
|
776
770
|
V,
|
|
777
|
-
|
|
778
|
-
|
|
771
|
+
O,
|
|
772
|
+
H,
|
|
779
773
|
Z,
|
|
780
774
|
ee,
|
|
781
775
|
B,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as Xe, i as Je, $ as Ve, S as Ze, b as Ke, s as Qe, f as y, c as $e, G as ge, e as A, k as x, n as P, r as ze, p as pe, q as et, O as tt, l as a, m as f, o as h, v as D, A as N, w as T, N as ot, y as st, x as me, W as le, Z as ye, a4 as nt, U as re, a2 as it, z as we, B as rt, C as lt, D as at, E as mt, F as ct } from "./CashierCarousel-DJXsZKF9.js";
|
|
2
|
-
import { d as Me, u as dt, x as be } from "./CashierMethodDetails-
|
|
2
|
+
import { d as Me, u as dt, x as be } from "./CashierMethodDetails-RvdJ1C5s.js";
|
|
3
3
|
function _e(t, e) {
|
|
4
4
|
Xe(t, e);
|
|
5
5
|
}
|
|
@@ -268,7 +268,7 @@ function Se(t) {
|
|
|
268
268
|
/*payMeth*/
|
|
269
269
|
(t[58].Label || /*payMeth*/
|
|
270
270
|
t[58].Name) + ""
|
|
271
|
-
), V,
|
|
271
|
+
), V, O, W, j, F, R, I = (
|
|
272
272
|
/*$_*/
|
|
273
273
|
t[17]("generalMin") + ""
|
|
274
274
|
), Z, ee, q = re(
|
|
@@ -294,7 +294,7 @@ function Se(t) {
|
|
|
294
294
|
t[16]
|
|
295
295
|
)
|
|
296
296
|
}
|
|
297
|
-
) + "", te, B,
|
|
297
|
+
) + "", te, B, H, K = (
|
|
298
298
|
/*$_*/
|
|
299
299
|
t[17]("generalMax") + ""
|
|
300
300
|
), S, ne, oe = re(
|
|
@@ -339,12 +339,9 @@ function Se(t) {
|
|
|
339
339
|
}
|
|
340
340
|
return {
|
|
341
341
|
c() {
|
|
342
|
-
e = f("div"), o = f("div"), n = f("img"), l = P(), d = f("div"), M && M.c(), u = P(), m = f("div"), c = f("div"), g = f("span"), V = T(J),
|
|
343
|
-
t[58].
|
|
344
|
-
|
|
345
|
-
t[58].LogoUrl
|
|
346
|
-
)) || h(n, "src", s), h(n, "alt", i = /*payMeth*/
|
|
347
|
-
t[58].Label), h(o, "class", "MethodLogo"), h(d, "class", "MethodFavorite"), h(c, "class", "MethodTitle"), h(R, "class", "Limits"), h(O, "class", "MethodLimits"), h(m, "class", "MethodInfo"), h(e, "class", "SelectorWrapper"), le(
|
|
342
|
+
e = f("div"), o = f("div"), n = f("img"), l = P(), d = f("div"), M && M.c(), u = P(), m = f("div"), c = f("div"), g = f("span"), V = T(J), O = P(), b && b.c(), W = P(), j = f("div"), F = f("span"), R = f("p"), Z = T(I), ee = P(), te = T(q), B = P(), H = f("p"), S = T(K), ne = P(), E = T(oe), Y = P(), w && w.c(), G = P(), we(n.src, s = /*payMeth*/
|
|
343
|
+
t[58].LogoUrl) || h(n, "src", s), h(n, "alt", i = /*payMeth*/
|
|
344
|
+
t[58].Label), h(o, "class", "MethodLogo"), h(d, "class", "MethodFavorite"), h(c, "class", "MethodTitle"), h(F, "class", "Limits"), h(j, "class", "MethodLimits"), h(m, "class", "MethodInfo"), h(e, "class", "SelectorWrapper"), le(
|
|
348
345
|
e,
|
|
349
346
|
"checked",
|
|
350
347
|
/*selectedPaymentMethod*/
|
|
@@ -353,7 +350,7 @@ function Se(t) {
|
|
|
353
350
|
);
|
|
354
351
|
},
|
|
355
352
|
m(X, _) {
|
|
356
|
-
x(X, e, _), a(e, o), a(o, n), a(e, l), a(e, d), M && M.m(d, null), a(e, u), a(e, m), a(m, c), a(c, g), a(g, V), a(m,
|
|
353
|
+
x(X, e, _), a(e, o), a(o, n), a(e, l), a(e, d), M && M.m(d, null), a(e, u), a(e, m), a(m, c), a(c, g), a(g, V), a(m, O), b && b.m(m, null), a(m, W), a(m, j), a(j, F), a(F, R), a(R, Z), a(R, ee), a(R, te), a(F, B), a(F, H), a(H, S), a(H, ne), a(H, E), a(m, Y), w && w.m(m, null), a(e, G), k || (Q = [
|
|
357
354
|
me(e, "click", ie),
|
|
358
355
|
me(e, "keyup", wt)
|
|
359
356
|
], k = !0);
|
|
@@ -361,10 +358,7 @@ function Se(t) {
|
|
|
361
358
|
p(X, _) {
|
|
362
359
|
t = X, _[0] & /*paymentMethodsToShow*/
|
|
363
360
|
2048 && !we(n.src, s = /*payMeth*/
|
|
364
|
-
t[58].
|
|
365
|
-
/*payMeth*/
|
|
366
|
-
t[58].LogoUrl
|
|
367
|
-
)) && h(n, "src", s), _[0] & /*paymentMethodsToShow*/
|
|
361
|
+
t[58].LogoUrl) && h(n, "src", s), _[0] & /*paymentMethodsToShow*/
|
|
368
362
|
2048 && i !== (i = /*payMeth*/
|
|
369
363
|
t[58].Label) && h(n, "alt", i), /*payMeth*/
|
|
370
364
|
t[58].isMethodPromoted ? M ? M.p(t, _) : (M = Pe(t), M.c(), M.m(d, null)) : M && (M.d(1), M = null), _[0] & /*paymentMethodsToShow*/
|
|
@@ -372,8 +366,8 @@ function Se(t) {
|
|
|
372
366
|
(t[58].Label || /*payMeth*/
|
|
373
367
|
t[58].Name) + "") && D(V, J), /*desktopView*/
|
|
374
368
|
t[13] ? b && (b.d(1), b = null) : b ? b.p(t, _) : (b = De(t), b.c(), b.m(m, W)), _[0] & /*$_*/
|
|
375
|
-
131072 &&
|
|
376
|
-
t[17]("generalMin") + "") && D(Z,
|
|
369
|
+
131072 && I !== (I = /*$_*/
|
|
370
|
+
t[17]("generalMin") + "") && D(Z, I), _[0] & /*paymentMethodsToShow, precisionCurrenciesMap, numericCurrencyDecimals*/
|
|
377
371
|
67840 && q !== (q = re(
|
|
378
372
|
/*payMeth*/
|
|
379
373
|
t[58].DisplayCurrency.MinAmountLimit,
|
|
@@ -591,7 +585,7 @@ const yt = "PaymentPromotion", wt = () => {
|
|
|
591
585
|
function Mt(t, e, o) {
|
|
592
586
|
let n, s, i;
|
|
593
587
|
pe(t, ct, (r) => o(17, s = r)), pe(t, be, (r) => o(42, i = r)), Me.extend(dt);
|
|
594
|
-
let { lang: l = "en" } = e, { local: d = "en-US" } = e, { endpoint: u } = e, { paymentsession: m } = e, { playersession: c } = e, { customerid: g } = e, { assetsurl: J } = e, { currency: V } = e, { numberofmethodsshown:
|
|
588
|
+
let { lang: l = "en" } = e, { local: d = "en-US" } = e, { endpoint: u } = e, { paymentsession: m } = e, { playersession: c } = e, { customerid: g } = e, { assetsurl: J } = e, { currency: V } = e, { numberofmethodsshown: O } = e, { translationurl: W = "" } = e, { mbsource: j } = e, { clientstyling: F } = e, { clientstylingurl: R } = e, { currencydecimals: I = "0" } = e, { currencysymbol: Z = "" } = e, { currencyposition: ee = "" } = e, { promotedmethods: q = "false" } = e, { type: te } = e, { userroles: B = "" } = e, H, K = {}, S, ne, oe = window.navigator.userAgent, E = [], Y, G = "", k = [], Q = [], M = "", b, w = !0, ie = !1, X = !1, _ = [];
|
|
595
589
|
var ae;
|
|
596
590
|
(function(r) {
|
|
597
591
|
r.PlayerSessionIsNotValid = "PlayerSessionIsNotValid", r.Success = "Success", r.JwtTokenError = "JwtTokenError";
|
|
@@ -612,14 +606,14 @@ function Mt(t, e, o) {
|
|
|
612
606
|
});
|
|
613
607
|
const xe = () => {
|
|
614
608
|
ut(l);
|
|
615
|
-
}, Re = (r) => {
|
|
616
|
-
i && Fe(r);
|
|
617
609
|
}, Fe = (r) => {
|
|
618
|
-
|
|
619
|
-
|
|
610
|
+
i && Oe(r);
|
|
611
|
+
}, Oe = (r) => {
|
|
612
|
+
const { currency: p } = r, v = H !== void 0 && H !== p ? "MetadataLoading" : "DataLoading";
|
|
613
|
+
H = p, window.postMessage({ type: v, isDataLoaded: !1 }, window.location.href);
|
|
620
614
|
const L = new URL(`${u}/v2/player/${g}/payment/GetPaymentMetadata`), z = new Headers();
|
|
621
615
|
z.append("accept", "application/json"), z.append("Content-Type", "application/json"), z.append("X-Client-Request-Timestamp", Me.utc().format("YYYY-MM-DD HH:mm:ss.SSS")), z.append("X-SessionId", `${c}`), z.append("X-Payment-Session-Token", `${m || i}`), _.indexOf("MM_CHANNEL_BETA") != -1 && z.append("MM_CHANNEL", "BETA");
|
|
622
|
-
const
|
|
616
|
+
const U = {
|
|
623
617
|
method: "POST",
|
|
624
618
|
headers: z,
|
|
625
619
|
mode: "cors",
|
|
@@ -628,7 +622,7 @@ function Mt(t, e, o) {
|
|
|
628
622
|
Tags: { UserAgent: window.navigator.userAgent }
|
|
629
623
|
})
|
|
630
624
|
};
|
|
631
|
-
fetch(L,
|
|
625
|
+
fetch(L, U).then((C) => {
|
|
632
626
|
const se = C.headers.get("X-Payment-Session-Token");
|
|
633
627
|
return se && be.set(se), C.json();
|
|
634
628
|
}).then((C) => {
|
|
@@ -640,13 +634,13 @@ function Mt(t, e, o) {
|
|
|
640
634
|
b = C.ResponseCode, je();
|
|
641
635
|
return;
|
|
642
636
|
}
|
|
643
|
-
E = C.PaymentMethods?.Ordering ?
|
|
637
|
+
E = C.PaymentMethods?.Ordering ? Re(C) : Ue(C), window.postMessage(
|
|
644
638
|
{
|
|
645
639
|
type: "PromotedPaymentMethods",
|
|
646
640
|
promotedPaymentMethods: Q
|
|
647
641
|
},
|
|
648
642
|
window.location.href
|
|
649
|
-
), o(10, G =
|
|
643
|
+
), o(10, G = O && +O > 0 && E.length > +O ? s("showAll") : ""), o(11, k = G ? E.slice(0, +O) : E), q == "false" && o(11, k = k.sort((se, he) => se.isMethodPromoted && !he.isMethodPromoted ? -1 : !se.isMethodPromoted && he.isMethodPromoted ? 1 : 0)), o(15, X = !k.length), window.postMessage(
|
|
650
644
|
{
|
|
651
645
|
type: "StartSessionCountdown",
|
|
652
646
|
paymentMethodName: E[0].Name
|
|
@@ -656,22 +650,22 @@ function Mt(t, e, o) {
|
|
|
656
650
|
}).finally(() => {
|
|
657
651
|
o(14, ie = !0), window.postMessage({ type: v, isDataLoaded: !0 }, window.location.href);
|
|
658
652
|
});
|
|
659
|
-
},
|
|
653
|
+
}, Re = (r) => {
|
|
660
654
|
const p = [];
|
|
661
655
|
return Q = [], r.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach(($) => {
|
|
662
656
|
const v = r.PaymentMethods.PaymentMethods.find((L) => L.Name === $);
|
|
663
657
|
if (v) {
|
|
664
|
-
const L = v?.Logos.find((C) => C.LogoType === "Desktop") || {}, z = v?.Logos.find((C) => C.LogoType === "Mobile") || {},
|
|
665
|
-
v.isMethodPromoted = ue(v.Tags), v.LogoUrl =
|
|
658
|
+
const L = v?.Logos.find((C) => C.LogoType === "Desktop") || {}, z = v?.Logos.find((C) => C.LogoType === "Mobile") || {}, U = w ? L : z;
|
|
659
|
+
v.isMethodPromoted = ue(v.Tags), v.LogoUrl = U.LogoRelativeUrl ? `${window.origin}${U.LogoRelativeUrl}` : `${U.LogoUrl}`, v.isMethodPromoted && Q.push(v), p.push(v);
|
|
666
660
|
}
|
|
667
661
|
}), p;
|
|
668
|
-
},
|
|
662
|
+
}, Ue = (r) => {
|
|
669
663
|
const p = r.PaymentMethods.PaymentMethods.map((L) => ({
|
|
670
664
|
...L,
|
|
671
665
|
isMethodPromoted: ue(L.Tags),
|
|
672
666
|
LogoUrl: L.Logos && L.Logos.length && L.Logos[0].LogoUrl ? `https:${L.Logos[0].LogoUrl}` : ""
|
|
673
667
|
})), [$, v] = p.reduce(
|
|
674
|
-
([L, z],
|
|
668
|
+
([L, z], U) => (U && U.isMethodPromoted ? L.push(U) : z.promo(U), [L, z]),
|
|
675
669
|
[[], []]
|
|
676
670
|
);
|
|
677
671
|
return Q = $, v;
|
|
@@ -700,7 +694,7 @@ function Mt(t, e, o) {
|
|
|
700
694
|
}, He = () => {
|
|
701
695
|
o(11, k = E), o(10, G = s("showLess"));
|
|
702
696
|
}, We = () => {
|
|
703
|
-
o(11, k = E.slice(0, +
|
|
697
|
+
o(11, k = E.slice(0, +O)), Y && !k.find((r) => r.Name === Y) && k.splice(0, 0, E.find((r) => r.Name === Y)), o(10, G = s("showAll"));
|
|
704
698
|
}, ue = (r) => r && r.split(",").some((p) => p === yt), fe = (r) => {
|
|
705
699
|
const { data: { type: p } = {} } = r || {};
|
|
706
700
|
switch (p) {
|
|
@@ -712,7 +706,7 @@ function Mt(t, e, o) {
|
|
|
712
706
|
}, qe = () => {
|
|
713
707
|
B.length > 0 && (_ = B.split(","));
|
|
714
708
|
};
|
|
715
|
-
et(() => (Ie(), tt(d, Z, ee,
|
|
709
|
+
et(() => (Ie(), tt(d, Z, ee, I), window.postMessage({ type: "CashierMethodsListReady" }, window.location.href), window.addEventListener("message", fe), () => {
|
|
716
710
|
window.removeEventListener("message", fe);
|
|
717
711
|
}));
|
|
718
712
|
const Be = (r) => ce(r), Ye = () => de();
|
|
@@ -722,24 +716,24 @@ function Mt(t, e, o) {
|
|
|
722
716
|
});
|
|
723
717
|
}
|
|
724
718
|
return t.$$set = (r) => {
|
|
725
|
-
"lang" in r && o(0, l = r.lang), "local" in r && o(20, d = r.local), "endpoint" in r && o(21, u = r.endpoint), "paymentsession" in r && o(22, m = r.paymentsession), "playersession" in r && o(23, c = r.playersession), "customerid" in r && o(24, g = r.customerid), "assetsurl" in r && o(1, J = r.assetsurl), "currency" in r && o(25, V = r.currency), "numberofmethodsshown" in r && o(26,
|
|
719
|
+
"lang" in r && o(0, l = r.lang), "local" in r && o(20, d = r.local), "endpoint" in r && o(21, u = r.endpoint), "paymentsession" in r && o(22, m = r.paymentsession), "playersession" in r && o(23, c = r.playersession), "customerid" in r && o(24, g = r.customerid), "assetsurl" in r && o(1, J = r.assetsurl), "currency" in r && o(25, V = r.currency), "numberofmethodsshown" in r && o(26, O = r.numberofmethodsshown), "translationurl" in r && o(2, W = r.translationurl), "mbsource" in r && o(3, j = r.mbsource), "clientstyling" in r && o(4, F = r.clientstyling), "clientstylingurl" in r && o(5, R = r.clientstylingurl), "currencydecimals" in r && o(27, I = r.currencydecimals), "currencysymbol" in r && o(28, Z = r.currencysymbol), "currencyposition" in r && o(29, ee = r.currencyposition), "promotedmethods" in r && o(30, q = r.promotedmethods), "type" in r && o(6, te = r.type), "userroles" in r && o(31, B = r.userroles);
|
|
726
720
|
}, t.$$.update = () => {
|
|
727
721
|
t.$$.dirty[1] & /*userroles*/
|
|
728
722
|
1 && B && qe(), t.$$.dirty[0] & /*endpoint, paymentsession, customerid, currency*/
|
|
729
|
-
56623104 && u && !m && g &&
|
|
723
|
+
56623104 && u && !m && g && Fe({ currency: V }), t.$$.dirty[0] & /*lang*/
|
|
730
724
|
1 && l && xe(), t.$$.dirty[0] & /*clientstyling, customStylingContainer*/
|
|
731
|
-
144 &&
|
|
732
|
-
160 &&
|
|
733
|
-
136 &&
|
|
725
|
+
144 && F && S && rt(S, F), t.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
|
|
726
|
+
160 && R && S && lt(S, R), t.$$.dirty[0] & /*mbsource, customStylingContainer*/
|
|
727
|
+
136 && j && S && at(S, `${j}.Style`, ne), t.$$.dirty[0] & /*lang, translationurl*/
|
|
734
728
|
5 && l && W && Ae(), t.$$.dirty[0] & /*currencydecimals*/
|
|
735
|
-
134217728 && o(16, n = Number(
|
|
729
|
+
134217728 && o(16, n = Number(I));
|
|
736
730
|
}, [
|
|
737
731
|
l,
|
|
738
732
|
J,
|
|
739
733
|
W,
|
|
740
|
-
|
|
734
|
+
j,
|
|
735
|
+
F,
|
|
741
736
|
R,
|
|
742
|
-
U,
|
|
743
737
|
te,
|
|
744
738
|
S,
|
|
745
739
|
K,
|
|
@@ -760,8 +754,8 @@ function Mt(t, e, o) {
|
|
|
760
754
|
c,
|
|
761
755
|
g,
|
|
762
756
|
V,
|
|
763
|
-
|
|
764
|
-
|
|
757
|
+
O,
|
|
758
|
+
I,
|
|
765
759
|
Z,
|
|
766
760
|
ee,
|
|
767
761
|
q,
|