@everymatrix/casino-header-controller 1.50.1 → 1.52.0
Sign up to get free protection for your applications and to get access to all the features.
- package/components/{CasinoHamburgerMenu-BCpMAPAe.js → CasinoHamburgerMenu-1MgwMavL.js} +3 -0
- package/components/{CasinoHamburgerMenu-vpzEIIT_.cjs → CasinoHamburgerMenu-CX83WE31.cjs} +1 -1
- package/components/{CasinoHeaderController-Bqi-X-8L.cjs → CasinoHeaderController-B2KEKztq.cjs} +5 -5
- package/components/{CasinoHeaderController-CsLzZTan.js → CasinoHeaderController-CDaojOuP.js} +11 -5
- package/components/{CasinoSlider-DJSVy9ND.js → CasinoSlider-DonAdyJx.js} +202 -197
- package/components/CasinoSlider-DsD-Fhk7.cjs +1 -0
- package/components/{PlayerAccountBalanceModal-Ck5Xpx4C.js → PlayerAccountBalanceModal-CwDfcNRi.js} +96 -85
- package/components/{PlayerAccountBalanceModal-YLBXGRdn.cjs → PlayerAccountBalanceModal-D_BA3ijd.cjs} +5 -5
- package/components/{PlayerDeposit-DJ0jHpbl.cjs → PlayerDeposit-Bw-RuWFA.cjs} +1 -1
- package/components/{PlayerDeposit-DWYXaqBZ.js → PlayerDeposit-DOnHqNTx.js} +28 -28
- package/es2015/casino-header-controller.cjs +1 -1
- package/es2015/casino-header-controller.js +1 -1
- package/package.json +1 -1
- package/components/CasinoSlider-CnDv74QC.cjs +0 -1
package/components/{PlayerAccountBalanceModal-YLBXGRdn.cjs → PlayerAccountBalanceModal-D_BA3ijd.cjs}
RENAMED
@@ -1,13 +1,13 @@
|
|
1
|
-
"use strict";var at=Object.defineProperty,rt=Object.defineProperties;var ot=Object.getOwnPropertyDescriptors;var He=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var ze=(o,e,n)=>e in o?at(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,Ue=(o,e)=>{for(var n in e||(e={}))it.call(e,n)&&ze(o,n,e[n]);if(He)for(var n of He(e))st.call(e,n)&&ze(o,n,e[n]);return o},Pe=(o,e)=>rt(o,ot(e));var Ge=(o,e,n)=>new Promise((i,d)=>{var u=g=>{try{p(n.next(g))}catch(v){d(v)}},y=g=>{try{p(n.throw(g))}catch(v){d(v)}},p=g=>g.done?i(g.value):Promise.resolve(g.value).then(u,y);p((n=n.apply(o,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CasinoHamburgerMenu-
|
1
|
+
"use strict";var at=Object.defineProperty,rt=Object.defineProperties;var ot=Object.getOwnPropertyDescriptors;var He=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var ze=(o,e,n)=>e in o?at(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,Ue=(o,e)=>{for(var n in e||(e={}))it.call(e,n)&&ze(o,n,e[n]);if(He)for(var n of He(e))st.call(e,n)&&ze(o,n,e[n]);return o},Pe=(o,e)=>rt(o,ot(e));var Ge=(o,e,n)=>new Promise((i,d)=>{var u=g=>{try{p(n.next(g))}catch(v){d(v)}},y=g=>{try{p(n.throw(g))}catch(v){d(v)}},p=g=>g.done?i(g.value):Promise.resolve(g.value).then(u,y);p((n=n.apply(o,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CasinoHamburgerMenu-CX83WE31.cjs");function Xe(o,e){t.addMessages(o,e)}function lt(o){t.$locale.set(o)}const qe={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",DepositButton:"存款",Loading:"載入中 ..."},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",DepositButton:"Einzahlen",Loading:"Wird geladen ..."},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",DepositButton:"Deposita",Loading:"Caricamento ..."},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",DepositButton:"Dépôt",Loading:"Chargement ..."},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",DepositButton:"Yatır",Loading:"Yükleniyor ..."},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",DepositButton:"Депозит",Loading:"Загружается ..."},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",DepositButton:"Depozit",Loading:"Se încarcă ..."},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",DepositButton:"Depozit",Loading:"Učitavanje ..."},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",DepositButton:"Befizetés",Loading:"Betöltés ..."},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",DepositButton:"Wpłać",Loading:"Ładowanie ..."},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",DepositButton:"Depozit",Loading:"Nalaganje ..."},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",DepositButton:"Depozit",Loading:"Učitavanje ..."},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},"en-us":{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."}};var Ie={exports:{}};/** @license
|
2
2
|
* eventsource.js
|
3
3
|
* Available under MIT License (MIT)
|
4
4
|
* https://github.com/Yaffle/EventSource/
|
5
|
-
*/(function(o,e){(function(n){var i=n.setTimeout,d=n.clearTimeout,u=n.XMLHttpRequest,y=n.XDomainRequest,p=n.ActiveXObject,g=n.EventSource,v=n.document,x=n.Promise,F=n.fetch,
|
6
|
-
`),s=0;s<c.length;s+=1){var l=c[s],m=l.split(": "),b=m.shift(),k=m.join(": ");r[U(b)]=k}this._map=r}D.prototype.get=function(a){return this._map[U(a)]},u!=null&&u.HEADERS_RECEIVED==null&&(u.HEADERS_RECEIVED=2);function q(){}q.prototype.open=function(a,r,c,s,l,m,b){a.open("GET",l);var k=0;a.onprogress=function(){var E=a.responseText,L=E.slice(k);k+=L.length,c(L)},a.onerror=function(E){E.preventDefault(),s(new Error("NetworkError"))},a.onload=function(){s(null)},a.onabort=function(){s(null)},a.onreadystatechange=function(){if(a.readyState===u.HEADERS_RECEIVED){var E=a.status,L=a.statusText,w=a.getResponseHeader("Content-Type"),O=a.getAllResponseHeaders();r(E,L,w,new D(O))}},a.withCredentials=m;for(var _ in b)Object.prototype.hasOwnProperty.call(b,_)&&a.setRequestHeader(_,b[_]);return a.send(),a};function ie(a){this._headers=a}ie.prototype.get=function(a){return this._headers.get(a)};function se(){}se.prototype.open=function(a,r,c,s,l,m,b){var k=null,_=new H,E=_.signal,L=new
|
7
|
-
`,he+=oe):re==="id"?Re=oe:re==="event"?ae=oe:re==="retry"?(m=
|
5
|
+
*/(function(o,e){(function(n){var i=n.setTimeout,d=n.clearTimeout,u=n.XMLHttpRequest,y=n.XDomainRequest,p=n.ActiveXObject,g=n.EventSource,v=n.document,x=n.Promise,F=n.fetch,B=n.Response,T=n.TextDecoder,A=n.TextEncoder,H=n.AbortController;if(typeof window!="undefined"&&typeof v!="undefined"&&!("readyState"in v)&&v.body==null&&(v.readyState="loading",window.addEventListener("load",function(a){v.readyState="complete"},!1)),u==null&&p!=null&&(u=function(){return new p("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(a){function r(){}return r.prototype=a,new r}),Date.now||(Date.now=function(){return new Date().getTime()}),H==null){var M=F;F=function(a,r){var c=r.signal;return M(a,{headers:r.headers,credentials:r.credentials,cache:r.cache}).then(function(s){var l=s.body.getReader();return c._reader=l,c._aborted&&c._reader.cancel(),{status:s.status,statusText:s.statusText,headers:s.headers,body:{getReader:function(){return l}}}})},H=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function V(){this.bitsNeeded=0,this.codePoint=0}V.prototype.decode=function(a){function r(E,L,w){if(w===1)return E>=128>>L&&E<<L<=2047;if(w===2)return E>=2048>>L&&E<<L<=55295||E>=57344>>L&&E<<L<=65535;if(w===3)return E>=65536>>L&&E<<L<=1114111;throw new Error}function c(E,L){if(E===6*1)return L>>6>15?3:L>31?2:1;if(E===6*2)return L>15?3:2;if(E===6*3)return 3;throw new Error}for(var s=65533,l="",m=this.bitsNeeded,b=this.codePoint,k=0;k<a.length;k+=1){var _=a[k];m!==0&&(_<128||_>191||!r(b<<6|_&63,m-6,c(m,b)))&&(m=0,b=s,l+=String.fromCharCode(b)),m===0?(_>=0&&_<=127?(m=0,b=_):_>=192&&_<=223?(m=6*1,b=_&31):_>=224&&_<=239?(m=6*2,b=_&15):_>=240&&_<=247?(m=6*3,b=_&7):(m=0,b=s),m!==0&&!r(b,m,c(m,b))&&(m=0,b=s)):(m-=6,b=b<<6|_&63),m===0&&(b<=65535?l+=String.fromCharCode(b):(l+=String.fromCharCode(55296+(b-65535-1>>10)),l+=String.fromCharCode(56320+(b-65535-1&1023))))}return this.bitsNeeded=m,this.codePoint=b,l};var z=function(){try{return new T().decode(new A().encode("test"),{stream:!0})==="test"}catch(a){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+a)}return!1};(T==null||A==null||!z())&&(T=V);var S=function(){};function R(a){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=S,this.onload=S,this.onerror=S,this.onreadystatechange=S,this._contentType="",this._xhr=a,this._sendTimeout=0,this._abort=S}R.prototype.open=function(a,r){this._abort(!0);var c=this,s=this._xhr,l=1,m=0;this._abort=function(w){c._sendTimeout!==0&&(d(c._sendTimeout),c._sendTimeout=0),(l===1||l===2||l===3)&&(l=4,s.onload=S,s.onerror=S,s.onabort=S,s.onprogress=S,s.onreadystatechange=S,s.abort(),m!==0&&(d(m),m=0),w||(c.readyState=4,c.onabort(null),c.onreadystatechange())),l=0};var b=function(){if(l===1){var w=0,O="",ne=void 0;if("contentType"in s)w=200,O="OK",ne=s.contentType;else try{w=s.status,O=s.statusText,ne=s.getResponseHeader("Content-Type")}catch(Te){w=0,O="",ne=void 0}w!==0&&(l=2,c.readyState=2,c.status=w,c.statusText=O,c._contentType=ne,c.onreadystatechange())}},k=function(){if(b(),l===2||l===3){l=3;var w="";try{w=s.responseText}catch(O){}c.readyState=3,c.responseText=w,c.onprogress()}},_=function(w,O){if((O==null||O.preventDefault==null)&&(O={preventDefault:S}),k(),l===1||l===2||l===3){if(l=4,m!==0&&(d(m),m=0),c.readyState=4,w==="load")c.onload(O);else if(w==="error")c.onerror(O);else if(w==="abort")c.onabort(O);else throw new TypeError;c.onreadystatechange()}},E=function(w){s!=null&&(s.readyState===4?(!("onload"in s)||!("onerror"in s)||!("onabort"in s))&&_(s.responseText===""?"error":"load",w):s.readyState===3?"onprogress"in s||k():s.readyState===2&&b())},L=function(){m=i(function(){L()},500),s.readyState===3&&k()};"onload"in s&&(s.onload=function(w){_("load",w)}),"onerror"in s&&(s.onerror=function(w){_("error",w)}),"onabort"in s&&(s.onabort=function(w){_("abort",w)}),"onprogress"in s&&(s.onprogress=k),"onreadystatechange"in s&&(s.onreadystatechange=function(w){E(w)}),("contentType"in s||!("ontimeout"in u.prototype))&&(r+=(r.indexOf("?")===-1?"?":"&")+"padding=true"),s.open(a,r,!0),"readyState"in s&&(m=i(function(){L()},0))},R.prototype.abort=function(){this._abort(!1)},R.prototype.getResponseHeader=function(a){return this._contentType},R.prototype.setRequestHeader=function(a,r){var c=this._xhr;"setRequestHeader"in c&&c.setRequestHeader(a,r)},R.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},R.prototype.send=function(){if((!("ontimeout"in u.prototype)||!("sendAsBinary"in u.prototype)&&!("mozAnon"in u.prototype))&&v!=null&&v.readyState!=null&&v.readyState!=="complete"){var a=this;a._sendTimeout=i(function(){a._sendTimeout=0,a.send()},4);return}var r=this._xhr;"withCredentials"in r&&(r.withCredentials=this.withCredentials);try{r.send(void 0)}catch(c){throw c}};function U(a){return a.replace(/[A-Z]/g,function(r){return String.fromCharCode(r.charCodeAt(0)+32)})}function D(a){for(var r=Object.create(null),c=a.split(`\r
|
6
|
+
`),s=0;s<c.length;s+=1){var l=c[s],m=l.split(": "),b=m.shift(),k=m.join(": ");r[U(b)]=k}this._map=r}D.prototype.get=function(a){return this._map[U(a)]},u!=null&&u.HEADERS_RECEIVED==null&&(u.HEADERS_RECEIVED=2);function q(){}q.prototype.open=function(a,r,c,s,l,m,b){a.open("GET",l);var k=0;a.onprogress=function(){var E=a.responseText,L=E.slice(k);k+=L.length,c(L)},a.onerror=function(E){E.preventDefault(),s(new Error("NetworkError"))},a.onload=function(){s(null)},a.onabort=function(){s(null)},a.onreadystatechange=function(){if(a.readyState===u.HEADERS_RECEIVED){var E=a.status,L=a.statusText,w=a.getResponseHeader("Content-Type"),O=a.getAllResponseHeaders();r(E,L,w,new D(O))}},a.withCredentials=m;for(var _ in b)Object.prototype.hasOwnProperty.call(b,_)&&a.setRequestHeader(_,b[_]);return a.send(),a};function ie(a){this._headers=a}ie.prototype.get=function(a){return this._headers.get(a)};function se(){}se.prototype.open=function(a,r,c,s,l,m,b){var k=null,_=new H,E=_.signal,L=new T;return F(l,{headers:b,credentials:m?"include":"same-origin",signal:E,cache:"no-store"}).then(function(w){return k=w.body.getReader(),r(w.status,w.statusText,w.headers.get("Content-Type"),new ie(w.headers)),new x(function(O,ne){var Te=function(){k.read().then(function(W){if(W.done)O(void 0);else{var P=L.decode(W.value,{stream:!0});c(P),Te()}}).catch(function(W){ne(W)})};Te()})}).catch(function(w){if(w.name!=="AbortError")return w}).then(function(w){s(w)}),{abort:function(){k!=null&&k.cancel(),_.abort()}}};function h(){this._listeners=Object.create(null)}function le(a){i(function(){throw a},0)}h.prototype.dispatchEvent=function(a){a.target=this;var r=this._listeners[a.type];if(r!=null)for(var c=r.length,s=0;s<c;s+=1){var l=r[s];try{typeof l.handleEvent=="function"?l.handleEvent(a):l.call(this,a)}catch(m){le(m)}}},h.prototype.addEventListener=function(a,r){a=String(a);var c=this._listeners,s=c[a];s==null&&(s=[],c[a]=s);for(var l=!1,m=0;m<s.length;m+=1)s[m]===r&&(l=!0);l||s.push(r)},h.prototype.removeEventListener=function(a,r){a=String(a);var c=this._listeners,s=c[a];if(s!=null){for(var l=[],m=0;m<s.length;m+=1)s[m]!==r&&l.push(s[m]);l.length===0?delete c[a]:c[a]=l}};function ce(a){this.type=a,this.target=void 0}function ge(a,r){ce.call(this,a),this.data=r.data,this.lastEventId=r.lastEventId}ge.prototype=Object.create(ce.prototype);function ye(a,r){ce.call(this,a),this.status=r.status,this.statusText=r.statusText,this.headers=r.headers}ye.prototype=Object.create(ce.prototype);function _e(a,r){ce.call(this,a),this.error=r.error}_e.prototype=Object.create(ce.prototype);var ve=-1,Q=0,te=1,ue=2,fe=-1,Z=0,we=1,be=2,De=3,Le=/^text\/event\-stream(;.*)?$/i,Ae=1e3,Me=18e6,Ce=function(a,r){var c=a==null?r:parseInt(a,10);return c!==c&&(c=r),Be(c)},Be=function(a){return Math.min(Math.max(a,Ae),Me)},de=function(a,r,c){try{typeof r=="function"&&r.call(a,c)}catch(s){le(s)}};function K(a,r){h.call(this),r=r||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,f(this,a,r)}function Fe(){return u!=null&&"withCredentials"in u.prototype||y==null?new u:new y}var ke=F!=null&&B!=null&&"body"in B.prototype;function f(a,r,c){r=String(r);var s=!!c.withCredentials,l=c.lastEventIdQueryParameterName||"lastEventId",m=Be(1e3),b=Ce(c.heartbeatTimeout,45e3),k="",_=m,E=!1,L=0,w=c.headers||{},O=c.Transport,ne=ke&&O==null?void 0:new R(O!=null?new O:Fe()),Te=O!=null&&typeof O!="string"?new O:ne==null?new se:new q,W=void 0,P=0,$=ve,he="",Re="",ae="",Ee="",G=Z,Oe=0,pe=0,tt=function(I,N,Y,J){if($===Q)if(I===200&&Y!=null&&Le.test(Y)){$=te,E=Date.now(),_=m,a.readyState=te;var X=new ye("open",{status:I,statusText:N,headers:J});a.dispatchEvent(X),de(a,a.onopen,X)}else{var j="";I!==200?(N&&(N=N.replace(/\s+/g," ")),j="EventSource's response has a status "+I+" "+N+" that is not 200. Aborting the connection."):j="EventSource's response has a Content-Type specifying an unsupported type: "+(Y==null?"-":Y.replace(/\s+/g," "))+". Aborting the connection.",Ne();var X=new ye("error",{status:I,statusText:N,headers:J});a.dispatchEvent(X),de(a,a.onerror,X),console.error(j)}},nt=function(I){if($===te){for(var N=-1,Y=0;Y<I.length;Y+=1){var J=I.charCodeAt(Y);(J===10||J===13)&&(N=Y)}var X=(N!==-1?Ee:"")+I.slice(0,N+1);Ee=(N===-1?Ee:"")+I.slice(N+1),I!==""&&(E=Date.now(),L+=I.length);for(var j=0;j<X.length;j+=1){var J=X.charCodeAt(j);if(G===fe&&J===10)G=Z;else if(G===fe&&(G=Z),J===13||J===10){if(G!==Z){G===we&&(pe=j+1);var re=X.slice(Oe,pe-1),oe=X.slice(pe+(pe<j&&X.charCodeAt(pe)===32?1:0),j);re==="data"?(he+=`
|
7
|
+
`,he+=oe):re==="id"?Re=oe:re==="event"?ae=oe:re==="retry"?(m=Ce(oe,m),_=m):re==="heartbeatTimeout"&&(b=Ce(oe,b),P!==0&&(d(P),P=i(function(){Se()},b)))}if(G===Z){if(he!==""){k=Re,ae===""&&(ae="message");var me=new ge(ae,{data:he.slice(1),lastEventId:Re});if(a.dispatchEvent(me),ae==="open"?de(a,a.onopen,me):ae==="message"?de(a,a.onmessage,me):ae==="error"&&de(a,a.onerror,me),$===ue)return}he="",ae=""}G=J===13?fe:Z}else G===Z&&(Oe=j,G=we),G===we?J===58&&(pe=j+1,G=be):G===be&&(G=De)}}},je=function(I){if($===te||$===Q){$=ve,P!==0&&(d(P),P=0),P=i(function(){Se()},_),_=Be(Math.min(m*16,_*2)),a.readyState=Q;var N=new _e("error",{error:I});a.dispatchEvent(N),de(a,a.onerror,N),I!=null&&console.error(I)}},Ne=function(){$=ue,W!=null&&(W.abort(),W=void 0),P!==0&&(d(P),P=0),a.readyState=ue},Se=function(){if(P=0,$!==ve){if(!E&&W!=null)je(new Error("No activity within "+b+" milliseconds. "+($===Q?"No response received.":L+" chars received.")+" Reconnecting.")),W!=null&&(W.abort(),W=void 0);else{var I=Math.max((E||Date.now())+b-Date.now(),1);E=!1,P=i(function(){Se()},I)}return}E=!1,L=0,P=i(function(){Se()},b),$=Q,he="",ae="",Re=k,Ee="",Oe=0,pe=0,G=Z;var N=r;if(r.slice(0,5)!=="data:"&&r.slice(0,5)!=="blob:"&&k!==""){var Y=r.indexOf("?");N=Y===-1?r:r.slice(0,Y+1)+r.slice(Y+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(oe,me){return me===l?"":oe}),N+=(r.indexOf("?")===-1?"?":"&")+l+"="+encodeURIComponent(k)}var J=a.withCredentials,X={};X.Accept="text/event-stream";var j=a.headers;if(j!=null)for(var re in j)Object.prototype.hasOwnProperty.call(j,re)&&(X[re]=j[re]);try{W=Te.open(ne,tt,nt,je,N,J,X)}catch(oe){throw Ne(),oe}};a.url=r,a.readyState=Q,a.withCredentials=s,a.headers=w,a._close=Ne,Se()}K.prototype=Object.create(h.prototype),K.prototype.CONNECTING=Q,K.prototype.OPEN=te,K.prototype.CLOSED=ue,K.prototype.close=function(){this._close()},K.CONNECTING=Q,K.OPEN=te,K.CLOSED=ue,K.prototype.withCredentials=void 0;var C=g;u!=null&&(g==null||!("withCredentials"in g.prototype))&&(C=K),function(a){{var r=a(e);r!==void 0&&(o.exports=r)}}(function(a){a.EventSourcePolyfill=K,a.NativeEventSource=g,a.EventSource=C})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:t.commonjsGlobal:globalThis)})(Ie,Ie.exports);var ct=Ie.exports;/*!
|
8
8
|
* currency.js - v2.0.4
|
9
9
|
* http://scurker.github.io/currency.js
|
10
10
|
*
|
11
11
|
* Copyright (c) 2021 Jason Wilson
|
12
12
|
* Released under MIT license
|
13
|
-
*/var dt={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:ht,fromCents:!1},$e=function(e){return Math.round(e)},Ve=function(e){return Math.pow(10,e)},ut=function(e,n){return $e(e/n)*n},ft=/(\d)(?=(\d{3})+\b)/g,pt=/(\d)(?=(\d\d)+\d\b)/g;function ee(o,e){var n=this;if(!(n instanceof ee))return new ee(o,e);var i=Object.assign({},dt,e),d=Ve(i.precision),u=xe(o,i);n.intValue=u,n.value=u/d,i.increment=i.increment||1/d,i.useVedic?i.groups=pt:i.groups=ft,this.s=i,this.p=d}function xe(o,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=0,d=e.decimal,u=e.errorOnInvalid,y=e.precision,p=e.fromCents,g=Ve(y),v=typeof o=="number",x=o instanceof ee;if(x&&p)return o.intValue;if(v||x)i=x?o.value:o;else if(typeof o=="string"){var F=new RegExp("[^-\\d"+d+"]","g"),C=new RegExp("\\"+d,"g");i=o.replace(/\((.*)\)/,"-$1").replace(F,"").replace(C,"."),i=i||0}else{if(u)throw Error("Invalid Input");i=0}return p||(i*=g,i=i.toFixed(4)),n?$e(i):i}function ht(o,e){var n=e.pattern,i=e.negativePattern,d=e.symbol,u=e.separator,y=e.decimal,p=e.groups,g=(""+o).replace(/^-/,"").split("."),v=g[0],x=g[1];return(o.value>=0?n:i).replace("!",d).replace("#",v.replace(p,"$1"+u)+(x?y+x:""))}ee.prototype={add:function(e){var n=this.intValue,i=this.s,d=this.p;return ee((n+=xe(e,i))/(i.fromCents?1:d),i)},subtract:function(e){var n=this.intValue,i=this.s,d=this.p;return ee((n-=xe(e,i))/(i.fromCents?1:d),i)},multiply:function(e){var n=this.intValue,i=this.s;return ee((n*=e)/(i.fromCents?1:Ve(i.precision)),i)},divide:function(e){var n=this.intValue,i=this.s;return ee(n/=xe(e,i,!1),i)},distribute:function(e){for(var n=this.intValue,i=this.p,d=this.s,u=[],y=Math[n>=0?"floor":"ceil"](n/e),p=Math.abs(n-y*e),g=d.fromCents?1:i;e!==0;e--){var v=ee(y/g,d);p-- >0&&(v=v[n>=0?"add":"subtract"](1/g)),u.push(v)}return u},dollars:function(){return~~this.value},cents:function(){var e=this.intValue,n=this.p;return~~(e%n)},format:function(e){var n=this.s;return typeof e=="function"?e(this,n):n.format(this,Object.assign({},n,e))},toString:function(){var e=this.intValue,n=this.p,i=this.s;return ut(e/n,i.increment).toFixed(i.precision)},toJSON:function(){return this.value}};function mt(o){t.append_styles(o,"svelte-113krup",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #D0046C));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #D0046C));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}')}function Ke(o,e,n){const i=o.slice();return i[47]=e[n],i}function We(o,e,n){const i=o.slice();return i[50]=e[n],i}function gt(o){let e,n=(o[4].Total?o[6](o[4].Total[0].amount):"0")+"",i,d,u,y,p,g,v,x,F,C=o[2]&&Je(o);return{c(){e=t.element("p"),i=t.text(n),d=t.space(),u=t.text(o[3]),y=t.space(),p=t.element("span"),p.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>',g=t.space(),C&&C.c(),v=t.empty(),t.attr(e,"class","BalanceValue"),t.attr(e,"part","BalanceValue")},m(B,A){t.insert(B,e,A),t.append(e,i),t.append(e,d),t.append(e,u),t.append(e,y),t.append(e,p),t.insert(B,g,A),C&&C.m(B,A),t.insert(B,v,A),x||(F=t.listen(e,"click",o[22]),x=!0)},p(B,A){A[0]&16&&n!==(n=(B[4].Total?B[6](B[4].Total[0].amount):"0")+"")&&t.set_data(i,n),A[0]&8&&t.set_data(u,B[3]),B[2]?C?C.p(B,A):(C=Je(B),C.c(),C.m(v.parentNode,v)):C&&(C.d(1),C=null)},d(B){B&&(t.detach(e),t.detach(g),t.detach(v)),C&&C.d(B),x=!1,F()}}}function yt(o){let e,n=o[5]("Loading")+"",i;return{c(){e=t.element("p"),i=t.text(n)},m(d,u){t.insert(d,e,u),t.append(e,i)},p(d,u){u[0]&32&&n!==(n=d[5]("Loading")+"")&&t.set_data(i,n)},d(d){d&&t.detach(e)}}}function Je(o){let e,n,i,d,u,y,p=o[5]("Title")+"",g,v,x,F,C,B,A=o[5]("DepositButton")+"",H,M,V,z=t.ensure_array_like(Object.keys(o[4])),S=[];for(let R=0;R<z.length;R+=1)S[R]=Qe(Ke(o,z,R));return{c(){e=t.element("div"),n=t.element("div"),i=t.space(),d=t.element("div"),u=t.element("div"),y=t.element("p"),g=t.text(p),v=t.space(),x=t.element("div");for(let R=0;R<S.length;R+=1)S[R].c();F=t.space(),C=t.element("div"),B=t.element("button"),H=t.text(A),t.attr(n,"class","BalanceModalClose"),t.attr(y,"class","BalanceModalTitle"),t.attr(u,"class","BalanceModalHeader"),t.attr(x,"class","BalanceModalBody"),t.attr(B,"class","BalanceModalAction"),t.attr(C,"class","BalanceModalFooter"),t.attr(d,"class","BalanceModal"),t.attr(e,"class","BalanceModalWrapper")},m(R,U){t.insert(R,e,U),t.append(e,n),t.append(e,i),t.append(e,d),t.append(d,u),t.append(u,y),t.append(y,g),t.append(d,v),t.append(d,x);for(let D=0;D<S.length;D+=1)S[D]&&S[D].m(x,null);t.append(d,F),t.append(d,C),t.append(C,B),t.append(B,H),M||(V=[t.listen(n,"click",o[23]),t.listen(B,"click",o[24])],M=!0)},p(R,U){if(U[0]&32&&p!==(p=R[5]("Title")+"")&&t.set_data(g,p),U[0]&120){z=t.ensure_array_like(Object.keys(R[4]));let D;for(D=0;D<z.length;D+=1){const q=Ke(R,z,D);S[D]?S[D].p(q,U):(S[D]=Qe(q),S[D].c(),S[D].m(x,null))}for(;D<S.length;D+=1)S[D].d(1);S.length=z.length}U[0]&32&&A!==(A=R[5]("DepositButton")+"")&&t.set_data(H,A)},d(R){R&&t.detach(e),t.destroy_each(S,R),M=!1,t.run_all(V)}}}function Ye(o){let e,n,i=o[5](o[47])+"",d,u,y=(o[50].productType?o[5](o[50].productType):"")+"",p,g,v,x,F=(o[50].amount?o[6](o[50].amount):"0")+"",C,B,A,H;return{c(){e=t.element("div"),n=t.element("p"),d=t.text(i),u=t.space(),p=t.text(y),g=t.space(),v=t.element("p"),x=t.element("span"),C=t.text(F),B=t.space(),A=t.element("span"),H=t.text(o[3]),t.attr(n,"class","BalanceModalText"),t.attr(x,"class","BalanceModalAmount"),t.attr(A,"class","BalanceModalCurrency"),t.attr(v,"class","BalanceModalValue"),t.attr(e,"class","BalanceModalRowLine")},m(M,V){t.insert(M,e,V),t.append(e,n),t.append(n,d),t.append(n,u),t.append(n,p),t.append(e,g),t.append(e,v),t.append(v,x),t.append(x,C),t.append(v,B),t.append(v,A),t.append(A,H)},p(M,V){V[0]&48&&i!==(i=M[5](M[47])+"")&&t.set_data(d,i),V[0]&48&&y!==(y=(M[50].productType?M[5](M[50].productType):"")+"")&&t.set_data(p,y),V[0]&16&&F!==(F=(M[50].amount?M[6](M[50].amount):"0")+"")&&t.set_data(C,F),V[0]&8&&t.set_data(H,M[3])},d(M){M&&t.detach(e)}}}function Qe(o){let e,n,i=t.ensure_array_like(o[4][o[47]]),d=[];for(let u=0;u<i.length;u+=1)d[u]=Ye(We(o,i,u));return{c(){e=t.element("div");for(let u=0;u<d.length;u+=1)d[u].c();n=t.space(),t.attr(e,"class","BalanceModalRowBoth")},m(u,y){t.insert(u,e,y);for(let p=0;p<d.length;p+=1)d[p]&&d[p].m(e,null);t.append(e,n)},p(u,y){if(y[0]&120){i=t.ensure_array_like(u[4][u[47]]);let p;for(p=0;p<i.length;p+=1){const g=We(u,i,p);d[p]?d[p].p(g,y):(d[p]=Ye(g),d[p].c(),d[p].m(e,n))}for(;p<d.length;p+=1)d[p].d(1);d.length=i.length}},d(u){u&&t.detach(e),t.destroy_each(d,u)}}}function Ze(o){let e,n,i;return{c(){e=t.element("div"),t.attr(e,"class","ShowBalanceModalOverlay")},m(d,u){t.insert(d,e,u),n||(i=t.listen(e,"click",o[25]),n=!0)},p:t.noop,d(d){d&&t.detach(e),n=!1,i()}}}function vt(o){let e,n,i;function d(g,v){return g[1]?yt:gt}let u=d(o),y=u(o),p=o[2]&&Ze(o);return{c(){e=t.element("div"),n=t.element("div"),y.c(),i=t.space(),p&&p.c(),t.attr(n,"class","ShowBalance"),t.attr(n,"part","ShowBalance")},m(g,v){t.insert(g,e,v),t.append(e,n),y.m(n,null),t.append(e,i),p&&p.m(e,null),o[26](e)},p(g,v){u===(u=d(g))&&y?y.p(g,v):(y.d(1),y=u(g),y&&(y.c(),y.m(n,null))),g[2]?p?p.p(g,v):(p=Ze(g),p.c(),p.m(e,null)):p&&(p.d(1),p=null)},i:t.noop,o:t.noop,d(g){g&&t.detach(e),y.d(),p&&p.d(),o[26](null)}}}function wt(o,e,n){let i;t.component_subscribe(o,t.$format,f=>n(5,i=f));let{userid:d=""}=e,{session:u=""}=e,{endpoint:y=""}=e,{lang:p="en"}=e,{clientstyling:g=""}=e,{clientstylingurl:v=""}=e,{translationurl:x=""}=e,{customlocaleidentifier:F=""}=e,{gmversion:C="gm16"}=e,{displaybalanceoption:B="All"}=e,{totalcalculationmode:A="totalCashAmount"}=e,{currencyseparator:H=""}=e,{currencydecimal:M=""}=e,{currencyprecision:V=""}=e,z,S,R,U=!1,D="",q=[],ie,se=!1;const h={},le=["totalCashAmount","totalRealAmount"],ce=()=>{fetch(x).then(f=>f.json()).then(f=>Object.keys(f).forEach(T=>Xe(T,f[T]))).catch(f=>console.log(f))};Object.keys(qe).forEach(f=>Xe(f,qe[f]));const ge=()=>{if(F.includes(p))return F},ye=f=>F?new Intl.NumberFormat(ge(),{useGrouping:!0}).format(f):H&&M?ee(f,{separator:H,decimal:M,symbol:"",precision:parseInt(V||"2",10)}).format():ee(f,{separator:".",decimal:",",symbol:"",precision:parseInt(V||"2",10)}).format(),_e=()=>Ge(this,null,function*(){var T,a,r;n(1,z=!0);const f=new URL(`${y}/v1/player/${d}/account`);try{const c=yield fetch(f,{method:"GET",headers:{"X-SessionID":u}}),s=yield c.json();if(c.ok)q=s.items,n(3,D=(T=q.find(l=>l.displayName==="Casino"))==null?void 0:T.currency),n(4,h.Total=[{amount:s.totalAmount[D]}],h),n(4,h.Real=[{amount:(a=q.find(l=>l.displayName==="Casino"))==null?void 0:a.balanceAmount}],h),n(4,h.Bonus=[{amount:(r=q.find(l=>l.displayName==="UBS"))==null?void 0:r.balanceAmount}],h);else throw new Error("Failed to fetch balance data !")}catch(c){console.log("Balance error: ",c)}finally{n(1,z=!1)}}),ve=()=>{n(1,z=!0);const f=new URL(`${y}/v2/player/${d}/balance`),T=new Headers;T.append("X-SessionID",u),fetch(f,{method:"GET",headers:T}).then(r=>r.json()).then(r=>{r[A]||n(8,A=le[0]);const c=r.items.find(l=>l.type==="Real"&&l.walletAccountType==="Ordinary");if(n(3,D=c.currency),se=!!c.productType,n(4,h.Total=[{amount:0}],h),n(4,h.Real=[],h),n(4,h.Bonus=[],h),n(4,h.Credit=[],h),!se){ie={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(4,h.Total[0].amount=r[A][D],h);for(const l of r.items)switch(l.type){case"Bonus":h.Bonus.length===0?h.Bonus.push({amount:l.amount}):n(4,h.Bonus[0].amount+=l.amount,h);break;case"Real":if(l.creditLine&&h.Credit.length===0&&h.Credit.push({amount:l.creditLine}),A==="totalRealAmount")continue;h.Real.length===0?h.Real.push({amount:l.amount}):n(4,h.Real[0].amount+=l.amount,h);break}for(const[l,m]of Object.entries(h))m.length<1&&delete h[l];n(1,z=!1);return}ie={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let s=r.items;B&&B!=="All"&&(s=r.items.filter(l=>l.productType===B));for(const l of s){let m;switch(l.type){case"Bonus":m=h.Bonus.findIndex(b=>b.productType===l.productType),m>0?n(4,h.Bonus[m].amount+=l.amount,h):h.Bonus.push({amount:l.amount,productType:l.productType});break;case"Real":l.creditLine&&h.Credit.push({amount:l.creditLine,productType:l.productType}),m=h.Real.findIndex(b=>b.productType===l.productType),m>0?n(4,h.Real[m].amount+=l.amount,h):h.Real.push({amount:l.amount,productType:l.productType});break}}Z();for(const[l,m]of Object.entries(h))m.length<1&&delete h[l];n(1,z=!1)}).catch(r=>{throw n(1,z=!1),new Error("Failed to fetch balance data !")})},Q=()=>{if(R&&R.close(),u.length<1)return;let f,T;switch(C){case"gm16":f=new URL(`${y}/v2/player/${d}/information/updates`),T=c=>we(c);break;case"gmcore":f=new URL(`${y}/v1/player/${d}/balance/updates`),T=c=>ue(c);break}const a={accept:"text/event-stream","X-SessionId":u},r=new ct.EventSourcePolyfill(f,{headers:a});R=r,r.addEventListener("message",T)},te=f=>{let T;try{T=JSON.parse(f)}catch(a){console.log("Balance stream failed: ",a);return}return T},ue=f=>{var c,s;const T=te(f.data);if(!T){Q();return}let a="0";const r=T.balanceChange;q=q.map(l=>(r&&r[l.id]&&(l=Pe(Ue({},l),{balanceAmount:r[l.id].afterAmount})),a=(parseFloat(l==null?void 0:l.balanceAmount)+parseFloat(a)).toString(),l)),n(4,h.Real=[{amount:(c=q[0])==null?void 0:c.balanceAmount}],h),n(4,h.Bonus=[{amount:(s=q[1])==null?void 0:s.balanceAmount}],h),n(4,h.Total=[{amount:Number(a)}],h)},fe=(f,T,a)=>{let r=null;switch(a.walletAccountType){case"Ordinary":a.afterAmount!==a.affectedAmount&&(T.lastOrdinaryAfterAmount=a.afterAmount,T.showCreditLineAfterAmount||(r=a.afterAmount));break;case"CreditLine":a.afterAmount!==0?(r=a.afterAmount,T.showCreditLineAfterAmount=!0):(r=T.lastOrdinaryAfterAmount,T.showCreditLineAfterAmount=!1);break;default:r=a.afterAmount}return r===null?f:r},Z=()=>{switch(A){case"totalCashAmount":let f=0;for(const a of["Real","Bonus"])for(const r of h[a])f+=Math.max(r.amount,0);n(4,h.Total[0].amount=f,h);break;case"totalRealAmount":if(!se)return;let T=0;for(const a of h.Real)T+=a.amount;n(4,h.Total[0].amount=T,h)}},we=f=>{const T=te(f.data);if(!T){Q();return}if(T.type!=="BALANCE_UPDATE_V2")return;const a=T.body.balanceChange;for(const[r,c]of Object.entries(a))if(A==="totalRealAmount"&&r==="Real"&&!se&&n(4,h.Total[0].amount=fe(h.Total[0].amount,ie,c),h),!!h[r])for(const s of h[r]){if(!se){s.amount=r==="Real"?fe(s.amount,ie,c):c.afterAmount;continue}c.productType===s.productType&&(s.amount=r==="Real"?fe(s.amount,ie[s.productType],c):c.afterAmount)}Z()},be=()=>{n(2,U=!1),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},De=()=>{le.includes(A)||(console.error(`Unsupported value ('${A}') for totalcalculationmode parameter. Only the following values are supported ${le}. Using default value ('${le[0]}').`),n(8,A=le[0]))},Le=()=>{switch(lt(p),De(),C){case"gmcore":_e();break;case"gm16":ve();break;default:throw Error(`Invalid apiversion attribute: ${C}`)}},Ae=f=>f.data&&f.data.type==="LogoutSuccessfull"&&R.close(),Me=()=>{const f=document.createElement("style");f.innerHTML=g,S.appendChild(f)},Te=()=>{const f=new URL(v),T=document.createElement("style");fetch(f.href).then(a=>a.text()).then(a=>{T.innerHTML=a,setTimeout(()=>{S.appendChild(T)},1)})};t.onMount(()=>(window.addEventListener("message",Ae,!1),()=>{window.removeEventListener("message",Ae),R&&R.close()}));const Ce=()=>n(2,U=!0),de=()=>n(2,U=!1),K=()=>be(),Fe=()=>n(2,U=!1);function ke(f){t.binding_callbacks[f?"unshift":"push"](()=>{S=f,n(0,S)})}return o.$$set=f=>{"userid"in f&&n(9,d=f.userid),"session"in f&&n(10,u=f.session),"endpoint"in f&&n(11,y=f.endpoint),"lang"in f&&n(12,p=f.lang),"clientstyling"in f&&n(13,g=f.clientstyling),"clientstylingurl"in f&&n(14,v=f.clientstylingurl),"translationurl"in f&&n(15,x=f.translationurl),"customlocaleidentifier"in f&&n(16,F=f.customlocaleidentifier),"gmversion"in f&&n(17,C=f.gmversion),"displaybalanceoption"in f&&n(18,B=f.displaybalanceoption),"totalcalculationmode"in f&&n(8,A=f.totalcalculationmode),"currencyseparator"in f&&n(19,H=f.currencyseparator),"currencydecimal"in f&&n(20,M=f.currencydecimal),"currencyprecision"in f&&n(21,V=f.currencyprecision)},o.$$.update=()=>{o.$$.dirty[0]&4096&&p&&ge(),o.$$.dirty[0]&400896&&y&&d&&u&&p&&C&&B&&Le(),o.$$.dirty[0]&134656&&y&&d&&u&&C&&Q(),o.$$.dirty[0]&8193&&g&&S&&Me(),o.$$.dirty[0]&16385&&v&&S&&Te(),o.$$.dirty[0]&32768&&x&&ce()},[S,z,U,D,h,i,ye,be,A,d,u,y,p,g,v,x,F,C,B,H,M,V,Ce,de,K,Fe,ke]}class et extends t.SvelteComponent{constructor(e){super(),t.init(this,e,wt,vt,t.safe_not_equal,{userid:9,session:10,endpoint:11,lang:12,clientstyling:13,clientstylingurl:14,translationurl:15,customlocaleidentifier:16,gmversion:17,displaybalanceoption:18,totalcalculationmode:8,currencyseparator:19,currencydecimal:20,currencyprecision:21},mt,[-1,-1])}get userid(){return this.$$.ctx[9]}set userid(e){this.$$set({userid:e}),t.flush()}get session(){return this.$$.ctx[10]}set session(e){this.$$set({session:e}),t.flush()}get endpoint(){return this.$$.ctx[11]}set endpoint(e){this.$$set({endpoint:e}),t.flush()}get lang(){return this.$$.ctx[12]}set lang(e){this.$$set({lang:e}),t.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(e){this.$$set({translationurl:e}),t.flush()}get customlocaleidentifier(){return this.$$.ctx[16]}set customlocaleidentifier(e){this.$$set({customlocaleidentifier:e}),t.flush()}get gmversion(){return this.$$.ctx[17]}set gmversion(e){this.$$set({gmversion:e}),t.flush()}get displaybalanceoption(){return this.$$.ctx[18]}set displaybalanceoption(e){this.$$set({displaybalanceoption:e}),t.flush()}get totalcalculationmode(){return this.$$.ctx[8]}set totalcalculationmode(e){this.$$set({totalcalculationmode:e}),t.flush()}get currencyseparator(){return this.$$.ctx[19]}set currencyseparator(e){this.$$set({currencyseparator:e}),t.flush()}get currencydecimal(){return this.$$.ctx[20]}set currencydecimal(e){this.$$set({currencydecimal:e}),t.flush()}get currencyprecision(){return this.$$.ctx[21]}set currencyprecision(e){this.$$set({currencyprecision:e}),t.flush()}}t.create_custom_element(et,{userid:{},session:{},endpoint:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},customlocaleidentifier:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencyseparator:{},currencydecimal:{},currencyprecision:{}},[],[],!0);exports.default=et;
|
13
|
+
*/var dt={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:ht,fromCents:!1},$e=function(e){return Math.round(e)},Ve=function(e){return Math.pow(10,e)},ut=function(e,n){return $e(e/n)*n},ft=/(\d)(?=(\d{3})+\b)/g,pt=/(\d)(?=(\d\d)+\d\b)/g;function ee(o,e){var n=this;if(!(n instanceof ee))return new ee(o,e);var i=Object.assign({},dt,e),d=Ve(i.precision),u=xe(o,i);n.intValue=u,n.value=u/d,i.increment=i.increment||1/d,i.useVedic?i.groups=pt:i.groups=ft,this.s=i,this.p=d}function xe(o,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=0,d=e.decimal,u=e.errorOnInvalid,y=e.precision,p=e.fromCents,g=Ve(y),v=typeof o=="number",x=o instanceof ee;if(x&&p)return o.intValue;if(v||x)i=x?o.value:o;else if(typeof o=="string"){var F=new RegExp("[^-\\d"+d+"]","g"),B=new RegExp("\\"+d,"g");i=o.replace(/\((.*)\)/,"-$1").replace(F,"").replace(B,"."),i=i||0}else{if(u)throw Error("Invalid Input");i=0}return p||(i*=g,i=i.toFixed(4)),n?$e(i):i}function ht(o,e){var n=e.pattern,i=e.negativePattern,d=e.symbol,u=e.separator,y=e.decimal,p=e.groups,g=(""+o).replace(/^-/,"").split("."),v=g[0],x=g[1];return(o.value>=0?n:i).replace("!",d).replace("#",v.replace(p,"$1"+u)+(x?y+x:""))}ee.prototype={add:function(e){var n=this.intValue,i=this.s,d=this.p;return ee((n+=xe(e,i))/(i.fromCents?1:d),i)},subtract:function(e){var n=this.intValue,i=this.s,d=this.p;return ee((n-=xe(e,i))/(i.fromCents?1:d),i)},multiply:function(e){var n=this.intValue,i=this.s;return ee((n*=e)/(i.fromCents?1:Ve(i.precision)),i)},divide:function(e){var n=this.intValue,i=this.s;return ee(n/=xe(e,i,!1),i)},distribute:function(e){for(var n=this.intValue,i=this.p,d=this.s,u=[],y=Math[n>=0?"floor":"ceil"](n/e),p=Math.abs(n-y*e),g=d.fromCents?1:i;e!==0;e--){var v=ee(y/g,d);p-- >0&&(v=v[n>=0?"add":"subtract"](1/g)),u.push(v)}return u},dollars:function(){return~~this.value},cents:function(){var e=this.intValue,n=this.p;return~~(e%n)},format:function(e){var n=this.s;return typeof e=="function"?e(this,n):n.format(this,Object.assign({},n,e))},toString:function(){var e=this.intValue,n=this.p,i=this.s;return ut(e/n,i.increment).toFixed(i.precision)},toJSON:function(){return this.value}};function mt(o){t.append_styles(o,"svelte-113krup",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #D0046C));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #D0046C));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}')}function Ke(o,e,n){const i=o.slice();return i[47]=e[n],i}function We(o,e,n){const i=o.slice();return i[50]=e[n],i}function gt(o){let e,n=(o[4].Total?o[6](o[4].Total[0].amount):"0")+"",i,d,u,y,p,g,v,x,F,B=o[2]&&Ye(o);return{c(){e=t.element("p"),i=t.text(n),d=t.space(),u=t.text(o[3]),y=t.space(),p=t.element("span"),p.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>',g=t.space(),B&&B.c(),v=t.empty(),t.attr(e,"class","BalanceValue"),t.attr(e,"part","BalanceValue")},m(T,A){t.insert(T,e,A),t.append(e,i),t.append(e,d),t.append(e,u),t.append(e,y),t.append(e,p),t.insert(T,g,A),B&&B.m(T,A),t.insert(T,v,A),x||(F=t.listen(e,"click",o[22]),x=!0)},p(T,A){A[0]&16&&n!==(n=(T[4].Total?T[6](T[4].Total[0].amount):"0")+"")&&t.set_data(i,n),A[0]&8&&t.set_data(u,T[3]),T[2]?B?B.p(T,A):(B=Ye(T),B.c(),B.m(v.parentNode,v)):B&&(B.d(1),B=null)},d(T){T&&(t.detach(e),t.detach(g),t.detach(v)),B&&B.d(T),x=!1,F()}}}function yt(o){let e,n=o[5]("Loading")+"",i;return{c(){e=t.element("p"),i=t.text(n)},m(d,u){t.insert(d,e,u),t.append(e,i)},p(d,u){u[0]&32&&n!==(n=d[5]("Loading")+"")&&t.set_data(i,n)},d(d){d&&t.detach(e)}}}function Ye(o){let e,n,i,d,u,y,p=o[5]("Title")+"",g,v,x,F,B,T,A=o[5]("DepositButton")+"",H,M,V,z=t.ensure_array_like(Object.keys(o[4])),S=[];for(let R=0;R<z.length;R+=1)S[R]=Qe(Ke(o,z,R));return{c(){e=t.element("div"),n=t.element("div"),i=t.space(),d=t.element("div"),u=t.element("div"),y=t.element("p"),g=t.text(p),v=t.space(),x=t.element("div");for(let R=0;R<S.length;R+=1)S[R].c();F=t.space(),B=t.element("div"),T=t.element("button"),H=t.text(A),t.attr(n,"class","BalanceModalClose"),t.attr(y,"class","BalanceModalTitle"),t.attr(u,"class","BalanceModalHeader"),t.attr(x,"class","BalanceModalBody"),t.attr(T,"class","BalanceModalAction"),t.attr(B,"class","BalanceModalFooter"),t.attr(d,"class","BalanceModal"),t.attr(e,"class","BalanceModalWrapper")},m(R,U){t.insert(R,e,U),t.append(e,n),t.append(e,i),t.append(e,d),t.append(d,u),t.append(u,y),t.append(y,g),t.append(d,v),t.append(d,x);for(let D=0;D<S.length;D+=1)S[D]&&S[D].m(x,null);t.append(d,F),t.append(d,B),t.append(B,T),t.append(T,H),M||(V=[t.listen(n,"click",o[23]),t.listen(T,"click",o[24])],M=!0)},p(R,U){if(U[0]&32&&p!==(p=R[5]("Title")+"")&&t.set_data(g,p),U[0]&120){z=t.ensure_array_like(Object.keys(R[4]));let D;for(D=0;D<z.length;D+=1){const q=Ke(R,z,D);S[D]?S[D].p(q,U):(S[D]=Qe(q),S[D].c(),S[D].m(x,null))}for(;D<S.length;D+=1)S[D].d(1);S.length=z.length}U[0]&32&&A!==(A=R[5]("DepositButton")+"")&&t.set_data(H,A)},d(R){R&&t.detach(e),t.destroy_each(S,R),M=!1,t.run_all(V)}}}function Je(o){let e,n,i=o[5](o[47])+"",d,u,y=(o[50].productType?o[5](o[50].productType):"")+"",p,g,v,x,F=(o[50].amount?o[6](o[50].amount):"0")+"",B,T,A,H;return{c(){e=t.element("div"),n=t.element("p"),d=t.text(i),u=t.space(),p=t.text(y),g=t.space(),v=t.element("p"),x=t.element("span"),B=t.text(F),T=t.space(),A=t.element("span"),H=t.text(o[3]),t.attr(n,"class","BalanceModalText"),t.attr(x,"class","BalanceModalAmount"),t.attr(A,"class","BalanceModalCurrency"),t.attr(v,"class","BalanceModalValue"),t.attr(e,"class","BalanceModalRowLine")},m(M,V){t.insert(M,e,V),t.append(e,n),t.append(n,d),t.append(n,u),t.append(n,p),t.append(e,g),t.append(e,v),t.append(v,x),t.append(x,B),t.append(v,T),t.append(v,A),t.append(A,H)},p(M,V){V[0]&48&&i!==(i=M[5](M[47])+"")&&t.set_data(d,i),V[0]&48&&y!==(y=(M[50].productType?M[5](M[50].productType):"")+"")&&t.set_data(p,y),V[0]&16&&F!==(F=(M[50].amount?M[6](M[50].amount):"0")+"")&&t.set_data(B,F),V[0]&8&&t.set_data(H,M[3])},d(M){M&&t.detach(e)}}}function Qe(o){let e,n,i=t.ensure_array_like(o[4][o[47]]),d=[];for(let u=0;u<i.length;u+=1)d[u]=Je(We(o,i,u));return{c(){e=t.element("div");for(let u=0;u<d.length;u+=1)d[u].c();n=t.space(),t.attr(e,"class","BalanceModalRowBoth")},m(u,y){t.insert(u,e,y);for(let p=0;p<d.length;p+=1)d[p]&&d[p].m(e,null);t.append(e,n)},p(u,y){if(y[0]&120){i=t.ensure_array_like(u[4][u[47]]);let p;for(p=0;p<i.length;p+=1){const g=We(u,i,p);d[p]?d[p].p(g,y):(d[p]=Je(g),d[p].c(),d[p].m(e,n))}for(;p<d.length;p+=1)d[p].d(1);d.length=i.length}},d(u){u&&t.detach(e),t.destroy_each(d,u)}}}function Ze(o){let e,n,i;return{c(){e=t.element("div"),t.attr(e,"class","ShowBalanceModalOverlay")},m(d,u){t.insert(d,e,u),n||(i=t.listen(e,"click",o[25]),n=!0)},p:t.noop,d(d){d&&t.detach(e),n=!1,i()}}}function vt(o){let e,n,i;function d(g,v){return g[1]?yt:gt}let u=d(o),y=u(o),p=o[2]&&Ze(o);return{c(){e=t.element("div"),n=t.element("div"),y.c(),i=t.space(),p&&p.c(),t.attr(n,"class","ShowBalance"),t.attr(n,"part","ShowBalance")},m(g,v){t.insert(g,e,v),t.append(e,n),y.m(n,null),t.append(e,i),p&&p.m(e,null),o[26](e)},p(g,v){u===(u=d(g))&&y?y.p(g,v):(y.d(1),y=u(g),y&&(y.c(),y.m(n,null))),g[2]?p?p.p(g,v):(p=Ze(g),p.c(),p.m(e,null)):p&&(p.d(1),p=null)},i:t.noop,o:t.noop,d(g){g&&t.detach(e),y.d(),p&&p.d(),o[26](null)}}}function wt(o,e,n){let i;t.component_subscribe(o,t.$format,f=>n(5,i=f));let{userid:d=""}=e,{session:u=""}=e,{endpoint:y=""}=e,{lang:p="en"}=e,{clientstyling:g=""}=e,{clientstylingurl:v=""}=e,{translationurl:x=""}=e,{customlocaleidentifier:F=""}=e,{gmversion:B="gm16"}=e,{displaybalanceoption:T="All"}=e,{totalcalculationmode:A="totalCashAmount"}=e,{currencyseparator:H=""}=e,{currencydecimal:M=""}=e,{currencyprecision:V=""}=e,z,S,R,U=!1,D="",q=[],ie,se=!1;const h={},le=["totalCashAmount","totalRealAmount"],ce=()=>{fetch(x).then(f=>f.json()).then(f=>Object.keys(f).forEach(C=>Xe(C,f[C]))).catch(f=>console.log(f))};Object.keys(qe).forEach(f=>Xe(f,qe[f]));const ge=()=>{if(F.includes(p))return F},ye=f=>F?new Intl.NumberFormat(ge(),{useGrouping:!0}).format(f):H&&M?ee(f,{separator:H,decimal:M,symbol:"",precision:parseInt(V||"2",10)}).format():ee(f,{separator:".",decimal:",",symbol:"",precision:parseInt(V||"2",10)}).format(),_e=()=>Ge(this,null,function*(){var C,a,r;n(1,z=!0);const f=new URL(`${y}/v1/player/${d}/account`);try{const c=yield fetch(f,{method:"GET",headers:{"X-SessionID":u}}),s=yield c.json();if(c.ok)q=s.items,n(3,D=(C=q.find(l=>l.displayName==="Casino"))==null?void 0:C.currency),n(4,h.Total=[{amount:s.totalAmount[D]}],h),n(4,h.Real=[{amount:(a=q.find(l=>l.displayName==="Casino"))==null?void 0:a.balanceAmount}],h),n(4,h.Bonus=[{amount:(r=q.find(l=>l.displayName==="UBS"))==null?void 0:r.balanceAmount}],h);else throw new Error("Failed to fetch balance data !")}catch(c){console.log("Balance error: ",c)}finally{n(1,z=!1)}}),ve=()=>{n(1,z=!0);const f=new URL(`${y}/v2/player/${d}/balance`),C=new Headers;C.append("X-SessionID",u),fetch(f,{method:"GET",headers:C}).then(r=>r.json()).then(r=>{r[A]||n(8,A=le[0]);const c=r.items.find(l=>l.type==="Real"&&l.walletAccountType==="Ordinary");if(n(3,D=c.currency),se=!!c.productType,n(4,h.Total=[{amount:0}],h),n(4,h.Real=[],h),n(4,h.Bonus=[],h),n(4,h.Credit=[],h),!se){ie={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(4,h.Total[0].amount=r[A][D],h);for(const l of r.items)switch(l.type){case"Bonus":h.Bonus.length===0?h.Bonus.push({amount:l.amount}):n(4,h.Bonus[0].amount+=l.amount,h);break;case"Real":if(l.creditLine&&h.Credit.length===0&&h.Credit.push({amount:l.creditLine}),A==="totalRealAmount")continue;h.Real.length===0?h.Real.push({amount:l.amount}):n(4,h.Real[0].amount+=l.amount,h);break}for(const[l,m]of Object.entries(h))m.length<1&&delete h[l];n(1,z=!1);return}ie={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let s=r.items;T&&T!=="All"&&(s=r.items.filter(l=>l.productType===T));for(const l of s){let m;switch(l.type){case"Bonus":m=h.Bonus.findIndex(b=>b.productType===l.productType),m>0?n(4,h.Bonus[m].amount+=l.amount,h):h.Bonus.push({amount:l.amount,productType:l.productType});break;case"Real":l.creditLine&&h.Credit.push({amount:l.creditLine,productType:l.productType}),m=h.Real.findIndex(b=>b.productType===l.productType),m>0?n(4,h.Real[m].amount+=l.amount,h):h.Real.push({amount:l.amount,productType:l.productType});break}}Z();for(const[l,m]of Object.entries(h))m.length<1&&delete h[l];n(1,z=!1)}).catch(r=>{throw n(1,z=!1),new Error("Failed to fetch balance data !")})},Q=()=>{if(R&&R.close(),u.length<1)return;let f,C;switch(B){case"gm16":f=new URL(`${y}/v2/player/${d}/information/updates`),C=c=>we(c);break;case"gmcore":f=new URL(`${y}/v1/player/${d}/balance/updates`),C=c=>ue(c);break}const a={accept:"text/event-stream","X-SessionId":u},r=new ct.EventSourcePolyfill(f,{headers:a});R=r,r.addEventListener("message",C)},te=f=>{let C;try{C=JSON.parse(f)}catch(a){console.log("Balance stream failed: ",a);return}return C},ue=f=>{var c,s;const C=te(f.data);if(!C){Q();return}let a="0";const r=C.balanceChange;q=q.map(l=>(r&&r[l.id]&&(l=Pe(Ue({},l),{balanceAmount:r[l.id].afterAmount})),a=(parseFloat(l==null?void 0:l.balanceAmount)+parseFloat(a)).toString(),l)),n(4,h.Real=[{amount:(c=q[0])==null?void 0:c.balanceAmount}],h),n(4,h.Bonus=[{amount:(s=q[1])==null?void 0:s.balanceAmount}],h),n(4,h.Total=[{amount:Number(a)}],h)},fe=(f,C,a)=>{let r=null;switch(a.walletAccountType){case"Ordinary":a.afterAmount!==a.affectedAmount&&(C.lastOrdinaryAfterAmount=a.afterAmount,C.showCreditLineAfterAmount||(r=a.afterAmount));break;case"CreditLine":a.afterAmount!==0?(r=a.afterAmount,C.showCreditLineAfterAmount=!0):(r=C.lastOrdinaryAfterAmount,C.showCreditLineAfterAmount=!1);break;default:r=a.afterAmount}return r===null?f:r},Z=()=>{switch(A){case"totalCashAmount":let f=0;for(const a of["Real","Bonus"])for(const r of h[a])f+=Math.max(r.amount,0);n(4,h.Total[0].amount=f,h);break;case"totalRealAmount":if(!se)return;let C=0;for(const a of h.Real)C+=a.amount;n(4,h.Total[0].amount=C,h)}},we=f=>{const C=te(f.data);if(!C){Q();return}if(C.type!=="BALANCE_UPDATE_V2")return;const a=C.body.balanceChange;for(const[r,c]of Object.entries(a))if(A==="totalRealAmount"&&r==="Real"&&!se&&n(4,h.Total[0].amount=fe(h.Total[0].amount,ie,c),h),!!h[r])for(const s of h[r]){if(!se){s.amount=r==="Real"?fe(s.amount,ie,c):c.afterAmount;continue}c.productType===s.productType&&(s.amount=r==="Real"?fe(s.amount,ie[s.productType],c):c.afterAmount)}Z()},be=()=>{n(2,U=!1),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},De=()=>{le.includes(A)||(console.error(`Unsupported value ('${A}') for totalcalculationmode parameter. Only the following values are supported ${le}. Using default value ('${le[0]}').`),n(8,A=le[0]))},Le=()=>{switch(lt(p),De(),B){case"gmcore":_e();break;case"gm16":ve();break;default:throw Error(`Invalid apiversion attribute: ${B}`)}},Ae=f=>f.data&&f.data.type==="LogoutSuccessfull"&&R.close(),Me=()=>{const f=document.createElement("style");f.innerHTML=g,S.appendChild(f)},Ce=()=>{const f=new URL(v),C=document.createElement("style");fetch(f.href).then(a=>a.text()).then(a=>{C.innerHTML=a,setTimeout(()=>{S.appendChild(C)},1)})};t.onMount(()=>(window.addEventListener("message",Ae,!1),()=>{window.removeEventListener("message",Ae),R&&R.close()}));const Be=()=>n(2,U=!0),de=()=>n(2,U=!1),K=()=>be(),Fe=()=>n(2,U=!1);function ke(f){t.binding_callbacks[f?"unshift":"push"](()=>{S=f,n(0,S)})}return o.$$set=f=>{"userid"in f&&n(9,d=f.userid),"session"in f&&n(10,u=f.session),"endpoint"in f&&n(11,y=f.endpoint),"lang"in f&&n(12,p=f.lang),"clientstyling"in f&&n(13,g=f.clientstyling),"clientstylingurl"in f&&n(14,v=f.clientstylingurl),"translationurl"in f&&n(15,x=f.translationurl),"customlocaleidentifier"in f&&n(16,F=f.customlocaleidentifier),"gmversion"in f&&n(17,B=f.gmversion),"displaybalanceoption"in f&&n(18,T=f.displaybalanceoption),"totalcalculationmode"in f&&n(8,A=f.totalcalculationmode),"currencyseparator"in f&&n(19,H=f.currencyseparator),"currencydecimal"in f&&n(20,M=f.currencydecimal),"currencyprecision"in f&&n(21,V=f.currencyprecision)},o.$$.update=()=>{o.$$.dirty[0]&4096&&p&&ge(),o.$$.dirty[0]&400896&&y&&d&&u&&p&&B&&T&&Le(),o.$$.dirty[0]&134656&&y&&d&&u&&B&&Q(),o.$$.dirty[0]&8193&&g&&S&&Me(),o.$$.dirty[0]&16385&&v&&S&&Ce(),o.$$.dirty[0]&32768&&x&&ce()},[S,z,U,D,h,i,ye,be,A,d,u,y,p,g,v,x,F,B,T,H,M,V,Be,de,K,Fe,ke]}class et extends t.SvelteComponent{constructor(e){super(),t.init(this,e,wt,vt,t.safe_not_equal,{userid:9,session:10,endpoint:11,lang:12,clientstyling:13,clientstylingurl:14,translationurl:15,customlocaleidentifier:16,gmversion:17,displaybalanceoption:18,totalcalculationmode:8,currencyseparator:19,currencydecimal:20,currencyprecision:21},mt,[-1,-1])}get userid(){return this.$$.ctx[9]}set userid(e){this.$$set({userid:e}),t.flush()}get session(){return this.$$.ctx[10]}set session(e){this.$$set({session:e}),t.flush()}get endpoint(){return this.$$.ctx[11]}set endpoint(e){this.$$set({endpoint:e}),t.flush()}get lang(){return this.$$.ctx[12]}set lang(e){this.$$set({lang:e}),t.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(e){this.$$set({translationurl:e}),t.flush()}get customlocaleidentifier(){return this.$$.ctx[16]}set customlocaleidentifier(e){this.$$set({customlocaleidentifier:e}),t.flush()}get gmversion(){return this.$$.ctx[17]}set gmversion(e){this.$$set({gmversion:e}),t.flush()}get displaybalanceoption(){return this.$$.ctx[18]}set displaybalanceoption(e){this.$$set({displaybalanceoption:e}),t.flush()}get totalcalculationmode(){return this.$$.ctx[8]}set totalcalculationmode(e){this.$$set({totalcalculationmode:e}),t.flush()}get currencyseparator(){return this.$$.ctx[19]}set currencyseparator(e){this.$$set({currencyseparator:e}),t.flush()}get currencydecimal(){return this.$$.ctx[20]}set currencydecimal(e){this.$$set({currencydecimal:e}),t.flush()}get currencyprecision(){return this.$$.ctx[21]}set currencyprecision(e){this.$$set({currencyprecision:e}),t.flush()}}t.create_custom_element(et,{userid:{},session:{},endpoint:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},customlocaleidentifier:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencyseparator:{},currencydecimal:{},currencyprecision:{}},[],[],!0);exports.default=et;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenu-
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenu-CX83WE31.cjs");function x(n,t){e.addMessages(n,t)}function A(n){e.$locale.set(n)}const L={en:{titleDeposit:"Deposit",loading:"Loading, please wait ..."},"zh-hk":{titleDeposit:"訂金",loading:"加載請稍候…"},fr:{titleDeposit:"Dépôt",loading:"Chargement, veuillez patienter ..."},tr:{titleDeposit:"PARA YATIR",loading:"Yükleniyor ..."},ro:{titleDeposit:"Depunere",loading:"Se încarcă..."},es:{titleDeposit:"Deposita",loading:"Cargando ..."},pt:{titleDeposit:"Depósito",loading:"Carregando, por favor espere ..."},hr:{titleDeposit:"Uplata",loading:"Učitavanje"},"pt-br":{titleDeposit:"Depositar",Loading:"Carregando, por favor espere..."},"es-mx":{titleDeposit:"Depositar",Loading:"Cargando, por favor espere..."}};function W(n){e.append_styles(n,"svelte-lvm6lo","button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}")}function j(n){let t,a,l,r,c,m,p,h,f,o,s=n[4]("titleDeposit")+"",d,w,b;return{c(){t=e.element("div"),a=e.svg_element("svg"),l=e.svg_element("defs"),r=e.svg_element("style"),c=e.text(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"),m=e.svg_element("g"),p=e.svg_element("g"),h=e.svg_element("path"),f=e.space(),o=e.element("h2"),d=e.text(s),e.attr(h,"class","aaa"),e.attr(h,"d","M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"),e.attr(h,"transform","translate(15 15) rotate(180)"),e.attr(p,"transform","translate(20 158)"),e.attr(m,"transform","translate(-20 -158)"),e.attr(a,"xmlns","http://www.w3.org/2000/svg"),e.attr(a,"width","15"),e.attr(a,"height","15"),e.attr(a,"viewBox","0 0 15 15"),e.attr(o,"class","DepositTitleMobile"),e.attr(t,"class","MenuReturnButton")},m(u,D){e.insert(u,t,D),e.append(t,a),e.append(a,l),e.append(l,r),e.append(r,c),e.append(a,m),e.append(m,p),e.append(p,h),e.append(t,f),e.append(t,o),e.append(o,d),w||(b=e.listen(t,"click",n[17]),w=!0)},p(u,D){D&16&&s!==(s=u[4]("titleDeposit")+"")&&e.set_data(d,s)},d(u){u&&e.detach(t),w=!1,b()}}}function z(n){let t,a,l;return{c(){t=e.element("div"),a=e.element("iframe"),e.src_url_equal(a.src,l=n[3])||e.attr(a,"src",l),e.attr(a,"title","Deposit Iframe"),e.attr(t,"class","DepositIframeWrapper")},m(r,c){e.insert(r,t,c),e.append(t,a)},p(r,c){c&8&&!e.src_url_equal(a.src,l=r[3])&&e.attr(a,"src",l)},d(r){r&&e.detach(t)}}}function G(n){let t,a=n[4]("loading")+"",l;return{c(){t=e.element("p"),l=e.text(a)},m(r,c){e.insert(r,t,c),e.append(t,l)},p(r,c){c&16&&a!==(a=r[4]("loading")+"")&&e.set_data(l,a)},d(r){r&&e.detach(t)}}}function q(n){let t,a,l,r=n[4]("titleDeposit")+"",c,m,p=n[5]&&j(n);function h(s,d){return s[1]?G:z}let f=h(n),o=f(n);return{c(){t=e.element("div"),p&&p.c(),a=e.space(),l=e.element("h2"),c=e.text(r),m=e.space(),o.c(),e.attr(l,"class","DepositTitle "+(n[5]?"DepositTitleNone":"")),e.attr(t,"class","DepositWrapper "+(n[5]?"DepositWrapperMobile":"")),e.set_style(t,"--dynamic-height",n[2])},m(s,d){e.insert(s,t,d),p&&p.m(t,null),e.append(t,a),e.append(t,l),e.append(l,c),e.append(t,m),o.m(t,null),n[18](t)},p(s,[d]){s[5]&&p.p(s,d),d&16&&r!==(r=s[4]("titleDeposit")+"")&&e.set_data(c,r),f===(f=h(s))&&o?o.p(s,d):(o.d(1),o=f(s),o&&(o.c(),o.m(t,null))),d&4&&e.set_style(t,"--dynamic-height",s[2])},i:e.noop,o:e.noop,d(s){s&&e.detach(t),p&&p.d(),o.d(),n[18](null)}}}function N(n,t,a){let l,r;e.component_subscribe(n,e.$format,i=>a(4,r=i));let{endpoint:c=""}=t,{session:m=""}=t,{playerid:p=""}=t,{lang:h="en"}=t,{hasdefaultamount:f=""}=t,{clientstyling:o=""}=t,{clientstylingurl:s=""}=t,{translationurl:d=""}=t,{playercurrency:w=""}=t,{shortcashierenabled:b="false"}=t,u,D=window.navigator.userAgent,v=e.getDevice(D)!=="PC",M=!0,C,_=0,k="";const R=()=>{fetch(d).then(y=>y.json()).then(y=>{Object.keys(y).forEach(g=>{x(g,y[g])})}).catch(y=>{console.log(y)})};Object.keys(L).forEach(i=>{x(i,L[i])});const S=()=>{window.postMessage({type:"GoToPreviousRoute",isMobile:v},window.location.href)},T=i=>{if(i.data){switch(i.data.type){case"ProfileDetailsData":a(7,w=i.data.profileDetails.currency);break}switch(i.data["MMFE:setQuickDepositHeight"]&&a(2,C=i.data["MMFE:setQuickDepositHeight"].toString()+"px"),i.data["MMFE:openFullCashier"]==="true"&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),i.data.redirect){case"mm-hc-casino":window.postMessage({type:"GoToCasino"},window.location.href);break;case"mm-hc-sports":window.postMessage({type:"GoToSports"},window.location.href);break;case"mm-hc-contact":window.postMessage({type:"GoToCustomerSupport"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href);break;case"mm-hc-back-to-merchant":window.postMessage({type:"GoToHomepage"},window.location.href);break;case"mm-wm-hc-init-deposit":window.postMessage({type:"RedirectWithdrawDepositCloseModal"},window.location.href);break;case"mm-wm-hc-init-deposit-quick":window.postMessage({type:"CloseShortCashier"},window.location.href);break}}},B=()=>{let i=new URL(`${c}/v1/player/${p}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);if(i.searchParams.append("language",h),l&&i.searchParams.append("isShortCashier",b),f)switch(w){case"USD":_=.4;break;case"CDF":_=1e3;break}let y={method:"POST",headers:{"X-SessionId":m,currency:w||"EUR",amount:_,cashierMode:"Default",IsShortCashier:b,accept:"application/json"}};fetch(i.href,y).then(g=>g.json()).then(g=>{a(1,M=!1),a(3,k=g.CashierUrl)},g=>{console.error(g)})},H=()=>{A(h)},P=()=>{let i=document.createElement("style");i.innerHTML=o,u.appendChild(i)},U=()=>{let i=new URL(s),y=document.createElement("style");fetch(i.href).then(g=>g.text()).then(g=>{y.innerHTML=g,setTimeout(()=>{u.appendChild(y)},1)})};e.onMount(()=>(window.addEventListener("message",T,!1),()=>{window.removeEventListener("message",T)}));const F=()=>S();function I(i){e.binding_callbacks[i?"unshift":"push"](()=>{u=i,a(0,u)})}return n.$$set=i=>{"endpoint"in i&&a(8,c=i.endpoint),"session"in i&&a(9,m=i.session),"playerid"in i&&a(10,p=i.playerid),"lang"in i&&a(11,h=i.lang),"hasdefaultamount"in i&&a(12,f=i.hasdefaultamount),"clientstyling"in i&&a(13,o=i.clientstyling),"clientstylingurl"in i&&a(14,s=i.clientstylingurl),"translationurl"in i&&a(15,d=i.translationurl),"playercurrency"in i&&a(7,w=i.playercurrency),"shortcashierenabled"in i&&a(16,b=i.shortcashierenabled)},n.$$.update=()=>{n.$$.dirty&2048&&h&&H(),n.$$.dirty&65536&&(l=b.toLocaleLowerCase()==="true"),n.$$.dirty&16385&&s&&u&&U(),n.$$.dirty&8193&&o&&u&&P(),n.$$.dirty&32768&&d&&R(),n.$$.dirty&69504&&m&&p&&c&&w&&h&&b&&B()},[u,M,C,k,r,v,S,w,c,m,p,h,f,o,s,d,b,F,I]}class E extends e.SvelteComponent{constructor(t){super(),e.init(this,t,N,q,e.safe_not_equal,{endpoint:8,session:9,playerid:10,lang:11,hasdefaultamount:12,clientstyling:13,clientstylingurl:14,translationurl:15,playercurrency:7,shortcashierenabled:16},W)}get endpoint(){return this.$$.ctx[8]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get session(){return this.$$.ctx[9]}set session(t){this.$$set({session:t}),e.flush()}get playerid(){return this.$$.ctx[10]}set playerid(t){this.$$set({playerid:t}),e.flush()}get lang(){return this.$$.ctx[11]}set lang(t){this.$$set({lang:t}),e.flush()}get hasdefaultamount(){return this.$$.ctx[12]}set hasdefaultamount(t){this.$$set({hasdefaultamount:t}),e.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get playercurrency(){return this.$$.ctx[7]}set playercurrency(t){this.$$set({playercurrency:t}),e.flush()}get shortcashierenabled(){return this.$$.ctx[16]}set shortcashierenabled(t){this.$$set({shortcashierenabled:t}),e.flush()}}e.create_custom_element(E,{endpoint:{},session:{},playerid:{},lang:{},hasdefaultamount:{},clientstyling:{},clientstylingurl:{},translationurl:{},playercurrency:{},shortcashierenabled:{}},[],[],!0);exports.default=E;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { b as X, $ as Z, S as J, i as K, f as
|
2
|
-
function
|
1
|
+
import { b as X, $ as Z, S as J, i as K, f as b, c as $, s as ee, d as te, g as _, e as E, t as C, u as d, M as I, j as S, v as p, x as L, n as P, k as T, l as ie, E as ae, o as se, A as M, w as ne, p as re, F as W, D as oe } from "./CasinoHamburgerMenu-1MgwMavL.js";
|
2
|
+
function j(a, e) {
|
3
3
|
X(a, e);
|
4
4
|
}
|
5
5
|
function le(a) {
|
@@ -48,24 +48,24 @@ const z = {
|
|
48
48
|
}
|
49
49
|
};
|
50
50
|
function ce(a) {
|
51
|
-
te(a, "svelte-
|
51
|
+
te(a, "svelte-lvm6lo", "button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}");
|
52
52
|
}
|
53
53
|
function de(a) {
|
54
54
|
let e, i, r, s, l, m, c, u, y, o, n = (
|
55
55
|
/*$_*/
|
56
56
|
a[4]("titleDeposit") + ""
|
57
|
-
), h,
|
57
|
+
), h, D, v;
|
58
58
|
return {
|
59
59
|
c() {
|
60
60
|
e = _("div"), i = M("svg"), r = M("defs"), s = M("style"), l = C(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), m = M("g"), c = M("g"), u = M("path"), y = E(), o = _("h2"), h = C(n), d(u, "class", "aaa"), d(u, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), d(u, "transform", "translate(15 15) rotate(180)"), d(c, "transform", "translate(20 158)"), d(m, "transform", "translate(-20 -158)"), d(i, "xmlns", "http://www.w3.org/2000/svg"), d(i, "width", "15"), d(i, "height", "15"), d(i, "viewBox", "0 0 15 15"), d(o, "class", "DepositTitleMobile"), d(e, "class", "MenuReturnButton");
|
61
61
|
},
|
62
62
|
m(g, k) {
|
63
|
-
S(g, e, k), p(e, i), p(i, r), p(r, s), p(s, l), p(i, m), p(m, c), p(c, u), p(e, y), p(e, o), p(o, h),
|
63
|
+
S(g, e, k), p(e, i), p(i, r), p(r, s), p(s, l), p(i, m), p(m, c), p(c, u), p(e, y), p(e, o), p(o, h), D || (v = ne(
|
64
64
|
e,
|
65
65
|
"click",
|
66
66
|
/*click_handler*/
|
67
67
|
a[17]
|
68
|
-
),
|
68
|
+
), D = !0);
|
69
69
|
},
|
70
70
|
p(g, k) {
|
71
71
|
k & /*$_*/
|
@@ -73,7 +73,7 @@ function de(a) {
|
|
73
73
|
g[4]("titleDeposit") + "") && L(h, n);
|
74
74
|
},
|
75
75
|
d(g) {
|
76
|
-
g && T(e),
|
76
|
+
g && T(e), D = !1, v();
|
77
77
|
}
|
78
78
|
};
|
79
79
|
}
|
@@ -81,7 +81,7 @@ function he(a) {
|
|
81
81
|
let e, i, r;
|
82
82
|
return {
|
83
83
|
c() {
|
84
|
-
e = _("div"), i = _("iframe"),
|
84
|
+
e = _("div"), i = _("iframe"), W(i.src, r = /*iframeUrl*/
|
85
85
|
a[3]) || d(i, "src", r), d(i, "title", "Deposit Iframe"), d(e, "class", "DepositIframeWrapper");
|
86
86
|
},
|
87
87
|
m(s, l) {
|
@@ -89,7 +89,7 @@ function he(a) {
|
|
89
89
|
},
|
90
90
|
p(s, l) {
|
91
91
|
l & /*iframeUrl*/
|
92
|
-
8 && !
|
92
|
+
8 && !W(i.src, r = /*iframeUrl*/
|
93
93
|
s[3]) && d(i, "src", r);
|
94
94
|
},
|
95
95
|
d(s) {
|
@@ -170,18 +170,18 @@ function ue(a) {
|
|
170
170
|
function ge(a, e, i) {
|
171
171
|
let r, s;
|
172
172
|
ie(a, oe, (t) => i(4, s = t));
|
173
|
-
let { endpoint: l = "" } = e, { session: m = "" } = e, { playerid: c = "" } = e, { lang: u = "en" } = e, { hasdefaultamount: y = "" } = e, { clientstyling: o = "" } = e, { clientstylingurl: n = "" } = e, { translationurl: h = "" } = e, { playercurrency:
|
173
|
+
let { endpoint: l = "" } = e, { session: m = "" } = e, { playerid: c = "" } = e, { lang: u = "en" } = e, { hasdefaultamount: y = "" } = e, { clientstyling: o = "" } = e, { clientstylingurl: n = "" } = e, { translationurl: h = "" } = e, { playercurrency: D = "" } = e, { shortcashierenabled: v = "false" } = e, g, k = window.navigator.userAgent, R = ae(k) !== "PC", B = !0, F, x = 0, U = "";
|
174
174
|
const G = () => {
|
175
175
|
fetch(h).then((w) => w.json()).then((w) => {
|
176
176
|
Object.keys(w).forEach((f) => {
|
177
|
-
|
177
|
+
j(f, w[f]);
|
178
178
|
});
|
179
179
|
}).catch((w) => {
|
180
180
|
console.log(w);
|
181
181
|
});
|
182
182
|
};
|
183
183
|
Object.keys(z).forEach((t) => {
|
184
|
-
|
184
|
+
j(t, z[t]);
|
185
185
|
});
|
186
186
|
const A = () => {
|
187
187
|
window.postMessage({ type: "GoToPreviousRoute", isMobile: R }, window.location.href);
|
@@ -189,7 +189,7 @@ function ge(a, e, i) {
|
|
189
189
|
if (t.data) {
|
190
190
|
switch (t.data.type) {
|
191
191
|
case "ProfileDetailsData":
|
192
|
-
i(7,
|
192
|
+
i(7, D = t.data.profileDetails.currency);
|
193
193
|
break;
|
194
194
|
}
|
195
195
|
switch (t.data["MMFE:setQuickDepositHeight"] && i(2, F = t.data["MMFE:setQuickDepositHeight"].toString() + "px"), t.data["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), t.data.redirect) {
|
@@ -221,7 +221,7 @@ function ge(a, e, i) {
|
|
221
221
|
}, N = () => {
|
222
222
|
let t = new URL(`${l}/v1/player/${c}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);
|
223
223
|
if (t.searchParams.append("language", u), r && t.searchParams.append("isShortCashier", v), y)
|
224
|
-
switch (
|
224
|
+
switch (D) {
|
225
225
|
case "USD":
|
226
226
|
x = 0.4;
|
227
227
|
break;
|
@@ -233,7 +233,7 @@ function ge(a, e, i) {
|
|
233
233
|
method: "POST",
|
234
234
|
headers: {
|
235
235
|
"X-SessionId": m,
|
236
|
-
currency:
|
236
|
+
currency: D || "EUR",
|
237
237
|
amount: x,
|
238
238
|
cashierMode: "Default",
|
239
239
|
IsShortCashier: v,
|
@@ -274,7 +274,7 @@ function ge(a, e, i) {
|
|
274
274
|
});
|
275
275
|
}
|
276
276
|
return a.$$set = (t) => {
|
277
|
-
"endpoint" in t && i(8, l = t.endpoint), "session" in t && i(9, m = t.session), "playerid" in t && i(10, c = t.playerid), "lang" in t && i(11, u = t.lang), "hasdefaultamount" in t && i(12, y = t.hasdefaultamount), "clientstyling" in t && i(13, o = t.clientstyling), "clientstylingurl" in t && i(14, n = t.clientstylingurl), "translationurl" in t && i(15, h = t.translationurl), "playercurrency" in t && i(7,
|
277
|
+
"endpoint" in t && i(8, l = t.endpoint), "session" in t && i(9, m = t.session), "playerid" in t && i(10, c = t.playerid), "lang" in t && i(11, u = t.lang), "hasdefaultamount" in t && i(12, y = t.hasdefaultamount), "clientstyling" in t && i(13, o = t.clientstyling), "clientstylingurl" in t && i(14, n = t.clientstylingurl), "translationurl" in t && i(15, h = t.translationurl), "playercurrency" in t && i(7, D = t.playercurrency), "shortcashierenabled" in t && i(16, v = t.shortcashierenabled);
|
278
278
|
}, a.$$.update = () => {
|
279
279
|
a.$$.dirty & /*lang*/
|
280
280
|
2048 && u && O(), a.$$.dirty & /*shortcashierenabled*/
|
@@ -282,7 +282,7 @@ function ge(a, e, i) {
|
|
282
282
|
16385 && n && g && Q(), a.$$.dirty & /*clientstyling, customStylingContainer*/
|
283
283
|
8193 && o && g && q(), a.$$.dirty & /*translationurl*/
|
284
284
|
32768 && h && G(), a.$$.dirty & /*session, playerid, endpoint, playercurrency, lang, shortcashierenabled*/
|
285
|
-
69504 && m && c && l &&
|
285
|
+
69504 && m && c && l && D && u && v && N();
|
286
286
|
}, [
|
287
287
|
g,
|
288
288
|
B,
|
@@ -291,7 +291,7 @@ function ge(a, e, i) {
|
|
291
291
|
s,
|
292
292
|
R,
|
293
293
|
A,
|
294
|
-
|
294
|
+
D,
|
295
295
|
l,
|
296
296
|
m,
|
297
297
|
c,
|
@@ -332,61 +332,61 @@ class me extends J {
|
|
332
332
|
return this.$$.ctx[8];
|
333
333
|
}
|
334
334
|
set endpoint(e) {
|
335
|
-
this.$$set({ endpoint: e }),
|
335
|
+
this.$$set({ endpoint: e }), b();
|
336
336
|
}
|
337
337
|
get session() {
|
338
338
|
return this.$$.ctx[9];
|
339
339
|
}
|
340
340
|
set session(e) {
|
341
|
-
this.$$set({ session: e }),
|
341
|
+
this.$$set({ session: e }), b();
|
342
342
|
}
|
343
343
|
get playerid() {
|
344
344
|
return this.$$.ctx[10];
|
345
345
|
}
|
346
346
|
set playerid(e) {
|
347
|
-
this.$$set({ playerid: e }),
|
347
|
+
this.$$set({ playerid: e }), b();
|
348
348
|
}
|
349
349
|
get lang() {
|
350
350
|
return this.$$.ctx[11];
|
351
351
|
}
|
352
352
|
set lang(e) {
|
353
|
-
this.$$set({ lang: e }),
|
353
|
+
this.$$set({ lang: e }), b();
|
354
354
|
}
|
355
355
|
get hasdefaultamount() {
|
356
356
|
return this.$$.ctx[12];
|
357
357
|
}
|
358
358
|
set hasdefaultamount(e) {
|
359
|
-
this.$$set({ hasdefaultamount: e }),
|
359
|
+
this.$$set({ hasdefaultamount: e }), b();
|
360
360
|
}
|
361
361
|
get clientstyling() {
|
362
362
|
return this.$$.ctx[13];
|
363
363
|
}
|
364
364
|
set clientstyling(e) {
|
365
|
-
this.$$set({ clientstyling: e }),
|
365
|
+
this.$$set({ clientstyling: e }), b();
|
366
366
|
}
|
367
367
|
get clientstylingurl() {
|
368
368
|
return this.$$.ctx[14];
|
369
369
|
}
|
370
370
|
set clientstylingurl(e) {
|
371
|
-
this.$$set({ clientstylingurl: e }),
|
371
|
+
this.$$set({ clientstylingurl: e }), b();
|
372
372
|
}
|
373
373
|
get translationurl() {
|
374
374
|
return this.$$.ctx[15];
|
375
375
|
}
|
376
376
|
set translationurl(e) {
|
377
|
-
this.$$set({ translationurl: e }),
|
377
|
+
this.$$set({ translationurl: e }), b();
|
378
378
|
}
|
379
379
|
get playercurrency() {
|
380
380
|
return this.$$.ctx[7];
|
381
381
|
}
|
382
382
|
set playercurrency(e) {
|
383
|
-
this.$$set({ playercurrency: e }),
|
383
|
+
this.$$set({ playercurrency: e }), b();
|
384
384
|
}
|
385
385
|
get shortcashierenabled() {
|
386
386
|
return this.$$.ctx[16];
|
387
387
|
}
|
388
388
|
set shortcashierenabled(e) {
|
389
|
-
this.$$set({ shortcashierenabled: e }),
|
389
|
+
this.$$set({ shortcashierenabled: e }), b();
|
390
390
|
}
|
391
391
|
}
|
392
392
|
$(me, { endpoint: {}, session: {}, playerid: {}, lang: {}, hasdefaultamount: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, playercurrency: {}, shortcashierenabled: {} }, [], [], !0);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoHeaderController-
|
1
|
+
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoHeaderController-B2KEKztq.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller")&&customElements.define("casino-header-controller",t.element)})}
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
10
10
|
}
|
11
11
|
};
|
12
12
|
};
|
13
|
-
customElements.define = n(customElements.define), import("../components/CasinoHeaderController-
|
13
|
+
customElements.define = n(customElements.define), import("../components/CasinoHeaderController-CDaojOuP.js").then(({ default: t }) => {
|
14
14
|
!customElements.get("casino-header-controller") && customElements.define("casino-header-controller", t.element);
|
15
15
|
});
|
16
16
|
}
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CasinoHamburgerMenu-vpzEIIT_.cjs");function ye({withLocale:i,translations:e}){t.$locale.subscribe(r=>{r==null&&(t.$dictionary.set(e),t.$locale.set(i))})}function U(i,e){t.addMessages(i,e)}function we(i){t.$locale.set(i)}const Y={en:{login:"Login",register:"Register",deposit:"Deposit"},"zh-hk":{login:"登錄",register:"登記",deposit:"訂金"},fr:{login:"Connexion",register:"Registre",deposit:"Dépôt"},tr:{login:"Giriş",register:"Kayıt",deposit:"Para Yatır"},ro:{login:"Autentificare",register:"Inregistrare",deposit:"Depozit"},es:{login:"Iniciar sesión",register:"Regístrate",deposit:"Deposita"},pt:{login:"Entrar",register:"Registro",deposit:"Depósito"},hr:{login:"Prijava",register:"Registracija",deposit:"Uplata"},"pt-br":{login:"Entrem",register:"Registro",deposit:"Depósito"},"es-mx":{login:"Entrar",register:"Registro",deposit:"Depósito"}};function be(i){t.append_styles(i,"svelte-1lgwoo3",'*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.CarouselWrapper{background:-webkit-linear-gradient(to left, var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839)), var(--emw--categories-color-primary, var(--emw--color-primary, #D0046C)));background:linear-gradient(to left, var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839)), var(--emw--categories-color-primary, var(--emw--color-primary, #D0046C)))}.CarouselWrapper.CarouselWrapperHeaderMain{background:transparent}.CarouselContainer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%;color:var(--emw--categories-typography, var(--emw--color-white, #FFFFFF));margin:0 auto;max-width:1300px}.CarouselContainer.CarouselContainerMobile{padding:0}.CarouselContainer ul{align-items:center}.CarouselContainer ul::-webkit-scrollbar{display:none}.CarouselContainer ul li{height:100%;align-items:center;font-size:15px;font-weight:500;line-height:26px;white-space:nowrap;display:inline-block;text-align:left;word-spacing:normal}.CarouselContainer ul li>a{position:relative}.CarouselContainer ul li.SecondaryMenu:hover,.CarouselContainer ul li.SecondaryMenu.active,.CarouselContainer ul li.SecondaryMenu:focus,.CarouselContainer ul li.SecondaryMenu:focus-within{background:var(--emw--categories-contrast, var(--emw--color-background, #07072A));cursor:pointer}.CarouselContainer ul li>a{position:relative}.CarouselContainer ul li:hover,.CarouselContainer ul>li>a:hover,.CarouselContainer ul li:focus,.CarouselContainer ul>li>a:focus{z-index:105}.CarouselContainer .CarouselItems li:hover>ul{left:auto;top:auto;opacity:1;transition:opacity 0.5s linear}.CarouselContainer .CarouselItems li:focus-within>ul{left:auto;top:auto;opacity:1;transition:opacity 0.5s linear, top 0.5s}.CarouselContainer .CarouselItems ul ul{transition:opacity 0.4s, left 0s 0.4s, margin 0s 0.4s;z-index:103}.CarouselContainer .CarouselItems li li:hover ul{top:auto;margin-left:100%;transform:translateY(-2.2rem);opacity:1;transition:opacity 0.5s linear, margin 0.5s}.CarouselContainer .CarouselItems li li:focus-within ul{top:auto;margin-left:100%;transform:translateY(-2.2rem);opacity:1;transition:opacity 0.5s linear, margin 0.5s}.CarouselContainer .CarouselLeftArrow,.CarouselContainer .CarouselRightArrow{display:flex;align-items:center;justify-content:center;width:50%;max-width:64px;background:var(--emw--categories-arrows-bg, var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3)))}.CarouselContainer .CarouselLeftArrow svg,.CarouselContainer .CarouselRightArrow svg{width:100%;max-width:39px;stroke:var(--emw--categories-arrows, var(--emw--color-white, #FFFFFF))}.CarouselContainer h1{text-align:center}.CarouselContainer ul{margin:0;padding:0;list-style:none}.CarouselContainer .CarouselNavWrap{overflow-y:scroll;white-space:nowrap;list-style-type:none;-ms-overflow-style:none;scrollbar-width:none}.CarouselContainer .CarouselNavWrap::-webkit-scrollbar{display:none}.CarouselContainer .CarouselItems{display:table;width:100%;text-align:center}.CarouselContainer .CarouselItems li{display:inline-block;text-align:left;padding:7px 10px}.CarouselContainer .CarouselItems li>a{position:relative}.CarouselContainer .CarouselItems li li{display:block}.CarouselContainer .CarouselItems button{background:none;border:none;color:var(--emw--categories-typography, var(--emw--color-white, #FFFFFF));text-decoration:none;white-space:nowrap;position:relative}.CarouselContainer .CarouselItems a{display:block;color:var(--emw--categories-typography, var(--emw--color-white, #FFFFFF));text-decoration:none;white-space:nowrap;position:relative}.CarouselContainer .CarouselItems.SecondaryMenu li:hover>a,.CarouselContainer .CarouselItems.SecondaryMenu a:hover,.CarouselContainer .CarouselItems.SecondaryMenu li:focus>a,.CarouselContainer .CarouselItems.SecondaryMenu a:focus{background:var(--emw--categories-contrast, var(--emw--color-background, #07072A))}.CarouselContainer .CarouselItems ul{position:absolute;z-index:104;left:-999em;top:0;opacity:0;transition:opacity 0.1s, left 0s 0.1s, top 0.1s;background:var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839));background:-webkit-linear-gradient(var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839)), var(--emw--categories-color-primary, var(--emw--color-primary, #D0046C)));background:linear-gradient(var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839)), var(--emw--categories-color-primary, var(--emw--color-primary, #D0046C)))}.CarouselContainer .CarouselItems .TouchOnly{display:none;left:-10px}.CarouselContainer .touch-device .CarouselItems .TouchOnly{display:inline-block}.CarouselContainer .touch-device .CarouselItems .TouchOnly a{background:var(--emw--categories-contrast, var(--emw--color-background, #07072A));color:var(--emw--categories-typography, var(--emw--color-white, #FFFFFF))}.CarouselContainer .isScrolling .CarouselItems ul.DropDown{left:-999em;opacity:0}.CarouselContainer .SubDropDown:hover,.CarouselContainer .SubDropDown.active{color:var(--emw--categories-contrast, var(--emw--color-contrast, #07072A));background:var(--emw--categories-typography, var(--emw--color-white, #FFFFFF))}.CarouselContainerHeaderMain .CarouselItems .CarouselItem:hover a,.CarouselContainerHeaderMain .CarouselItems .CarouselItem.active a,.CarouselContainerHeaderMain .CarouselItems .CarouselItem:focus a,.CarouselContainerHeaderMain .CarouselItems .CarouselItem:focus-within a{border-bottom:1px solid var(--emw--header-color-primary, var(--emw--color-primary, #D0046C));color:var(--emw--header-color-primary, var(--emw--color-primary, #D0046C))}.CarouselContainerHeaderMain .CarouselItems .CarouselItem span{border-top:1px solid transparent;padding-top:5px;transition-duration:0.3s}.CarouselContainerHeaderMain{background:transparent;margin:0;padding:0}.CarouselContainerHeaderMain .CarouselLeftArrow,.CarouselContainerHeaderMain .CarouselRightArrow{background:transparent;width:unset;display:none}.CarouselContainerHeaderMain .CarouselItem a{color:var(--emw--header-typography, var(--emw--color-white, #FFFFFF));text-decoration:none}.CarouselItems li a:first-child:not(:last-child){padding-right:20px}.CarouselItems li a:first-child:not(:last-child):after{content:"";position:absolute;right:3px;top:50%;margin-top:-6px;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid var(--emw--color-white, #FFFFFF)}.CarouselItems>li>a:first-child:not(:last-child):after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid var(--emw--color-white, #FFFFFF);border-bottom:none;margin-top:-3px}.CarouselItems li:hover a:first-child:not(:last-child):after{border-left-color:var(--emw--color-white, #FFFFFF)}.CarouselItems li:focus-within a:first-child:not(:last-child):after{border-left-color:var(--emw--color-white, #FFFFFF)}.CarouselItems>li:hover>a:first-child:not(:last-child):after{border-left-color:transparent;border-top-color:var(--emw--color-white, #FFFFFF)}.CarouselItems>li:focus-within>a:first-child:not(:last-child):after{border-left-color:transparent;border-top-color:var(--emw--color-white, #FFFFFF)}@media only screen and (max-width: 1024px){.CarouselContainerHeaderMain .CarouselLeftArrow,.CarouselContainerHeaderMain .CarouselRightArrow{display:flex}}.CategoryIconImg{height:20px;margin:0 auto;display:block}.DisplayNone{display:none}')}function P(i,e,r){const o=i.slice();return o[49]=e[r],o[51]=r,o}function K(i,e,r){const o=i.slice();return o[52]=e[r],o}function X(i,e,r){const o=i.slice();return o[55]=e[r],o[57]=r,o}function J(i){let e=[],r=new Map,o,l=t.ensure_array_like(i[9]);const s=n=>n[49].id;for(let n=0;n<l.length;n+=1){let c=P(i,l,n),m=s(c);r.set(m,e[n]=te(m,c))}return{c(){for(let n=0;n<e.length;n+=1)e[n].c();o=t.empty()},m(n,c){for(let m=0;m<e.length;m+=1)e[m]&&e[m].m(n,c);t.insert(n,o,c)},p(n,c){c[0]&77775&&(l=t.ensure_array_like(n[9]),e=t.update_keyed_each(e,c,s,1,n,l,r,o.parentNode,t.destroy_block,te,o,P))},d(n){n&&t.detach(o);for(let c=0;c<e.length;c+=1)e[c].d(n)}}}function ve(i){let e,r=i[49].name+"",o;return{c(){e=t.element("button"),o=t.text(r),t.attr(e,"class","CategoryButton")},m(l,s){t.insert(l,e,s),t.append(e,o)},p(l,s){s[0]&512&&r!==(r=l[49].name+"")&&t.set_data(o,r)},d(l){l&&t.detach(e)}}}function _e(i){let e,r=i[49].label+"",o,l;return{c(){e=t.element("a"),o=t.text(r),t.attr(e,"href",l=i[49].path)},m(s,n){t.insert(s,e,n),t.append(e,o)},p(s,n){n[0]&512&&r!==(r=s[49].label+"")&&t.set_data(o,r),n[0]&512&&l!==(l=s[49].path)&&t.attr(e,"href",l)},d(s){s&&t.detach(e)}}}function Q(i){let e,r=i[10].length>0&&i[2]=="true"&&V(i);return{c(){r&&r.c(),e=t.empty()},m(o,l){r&&r.m(o,l),t.insert(o,e,l)},p(o,l){o[10].length>0&&o[2]=="true"?r?r.p(o,l):(r=V(o),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(o){o&&t.detach(e),r&&r.d(o)}}}function V(i){let e,r=t.ensure_array_like(i[10]),o=[];for(let l=0;l<r.length;l+=1)o[l]=ee(K(i,r,l));return{c(){e=t.element("ul");for(let l=0;l<o.length;l+=1)o[l].c();t.attr(e,"class","DropDown")},m(l,s){t.insert(l,e,s);for(let n=0;n<o.length;n+=1)o[n]&&o[n].m(e,null)},p(l,s){if(s[0]&10176){r=t.ensure_array_like(l[10]);let n;for(n=0;n<r.length;n+=1){const c=K(l,r,n);o[n]?o[n].p(c,s):(o[n]=ee(c),o[n].c(),o[n].m(e,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=r.length}},d(l){l&&t.detach(e),t.destroy_each(o,l)}}}function Z(i){var C;let e,r,o=((C=i[55])==null?void 0:C.name)+"",l,s,n,c,m;function v(...f){return i[32](i[49],i[51],i[55],i[57],...f)}return{c(){e=t.element("li"),r=t.element("a"),l=t.text(o),n=t.space(),t.attr(r,"class",s="SubDropDown "+(i[51]==i[6]&&(i[7]==i[57]||i[8]==i[57])?"active":""))},m(f,y){t.insert(f,e,y),t.append(e,r),t.append(r,l),t.append(e,n),c||(m=t.listen(e,"click",v),c=!0)},p(f,y){var _;i=f,y[0]&1024&&o!==(o=((_=i[55])==null?void 0:_.name)+"")&&t.set_data(l,o),y[0]&1984&&s!==(s="SubDropDown "+(i[51]==i[6]&&(i[7]==i[57]||i[8]==i[57])?"active":""))&&t.attr(r,"class",s)},d(f){f&&t.detach(e),c=!1,m()}}}function $(i,e){let r,o,l=e[51]==e[52].index&&Z(e);return{key:i,first:null,c(){r=t.empty(),l&&l.c(),o=t.empty(),this.first=r},m(s,n){t.insert(s,r,n),l&&l.m(s,n),t.insert(s,o,n)},p(s,n){e=s,e[51]==e[52].index?l?l.p(e,n):(l=Z(e),l.c(),l.m(o.parentNode,o)):l&&(l.d(1),l=null)},d(s){s&&(t.detach(r),t.detach(o)),l&&l.d(s)}}}function ee(i){let e=[],r=new Map,o,l=t.ensure_array_like(i[52].items);const s=n=>n[55].id;for(let n=0;n<l.length;n+=1){let c=X(i,l,n),m=s(c);r.set(m,e[n]=$(m,c))}return{c(){for(let n=0;n<e.length;n+=1)e[n].c();o=t.empty()},m(n,c){for(let m=0;m<e.length;m+=1)e[m]&&e[m].m(n,c);t.insert(n,o,c)},p(n,c){c[0]&10176&&(l=t.ensure_array_like(n[52].items),e=t.update_keyed_each(e,c,s,1,n,l,r,o.parentNode,t.destroy_block,$,o,X))},d(n){n&&t.detach(o);for(let c=0;c<e.length;c+=1)e[c].d(n)}}}function te(i,e){let r,o,l,s,n,c,m,v,C,f,y;function _(h,b){return h[0]==="headerMain"?_e:ve}let k=_(e),g=k(e),u=e[11][e[51]]==!0&&Q(e);function w(...h){return e[33](e[49],e[51],...h)}return{key:i,first:null,c(){var h,b;r=t.element("li"),o=t.element("div"),l=t.element("img"),c=t.space(),g.c(),m=t.space(),u&&u.c(),v=t.space(),t.attr(l,"class",s="CategoryIconImg "+(e[3]==="true"?"":"DisplayNone")),t.src_url_equal(l.src,n=e[16](e[49]))||t.attr(l,"src",n),t.attr(o,"class","CategoryIcon"),t.attr(r,"class",C="CarouselItem "+(((h=e[1])==null?void 0:h.toString().indexOf("$"))>-1?((b=e[1])==null?void 0:b.split("$").pop())==e[49].id.split("$").pop()?"active":"":e[1]==e[49].id?"active":"")+" "+(e[0]=="headerMain"?"":"SecondaryMenu")),t.attr(r,"part","CarouselItem"),this.first=r},m(h,b){t.insert(h,r,b),t.append(r,o),t.append(o,l),t.append(r,c),g.m(r,null),t.append(r,m),u&&u.m(r,null),t.append(r,v),f||(y=t.listen(r,"click",w),f=!0)},p(h,b){var L,R;e=h,b[0]&8&&s!==(s="CategoryIconImg "+(e[3]==="true"?"":"DisplayNone"))&&t.attr(l,"class",s),b[0]&512&&!t.src_url_equal(l.src,n=e[16](e[49]))&&t.attr(l,"src",n),k===(k=_(e))&&g?g.p(e,b):(g.d(1),g=k(e),g&&(g.c(),g.m(r,m))),e[11][e[51]]==!0?u?u.p(e,b):(u=Q(e),u.c(),u.m(r,v)):u&&(u.d(1),u=null),b[0]&515&&C!==(C="CarouselItem "+(((L=e[1])==null?void 0:L.toString().indexOf("$"))>-1?((R=e[1])==null?void 0:R.split("$").pop())==e[49].id.split("$").pop()?"active":"":e[1]==e[49].id?"active":"")+" "+(e[0]=="headerMain"?"":"SecondaryMenu"))&&t.attr(r,"class",C)},d(h){h&&t.detach(r),g.d(),u&&u.d(),f=!1,y()}}}function ke(i){let e,r,o,l,s,n,c,m,v,C,f,y,_,k,g,u=i[9].length>0&&J(i);return{c(){e=t.element("div"),r=t.element("div"),o=t.element("div"),o.innerHTML='<svg fill="none" stroke="var(--emw--categories-arrows, var( --emw--color-white, #FFFFFF));" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path></svg>',l=t.space(),s=t.element("div"),n=t.element("ul"),c=t.element("li"),c.innerHTML='<a href="#CarouselNav">Close Subs</a>',m=t.space(),u&&u.c(),v=t.space(),C=t.element("div"),C.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>',t.attr(o,"class","CarouselLeftArrow"),t.attr(c,"class","TouchOnly"),t.attr(n,"id","CarouselNav"),t.attr(n,"class","CarouselItems"),t.attr(s,"class","CarouselNavWrap"),t.attr(C,"class","CarouselRightArrow"),t.attr(r,"class",f=`CarouselContainer CarouselContainerMobile ${i[0]==="headerMain"?"CarouselContainerHeaderMain":""}`),t.attr(r,"style",y=i[0]==="headerMain"?"max-width: auto":void 0),t.attr(e,"class",_="CarouselWrapper "+(i[0]==="headerMain"?"CarouselWrapperHeaderMain":""))},m(w,h){t.insert(w,e,h),t.append(e,r),t.append(r,o),t.append(r,l),t.append(r,s),t.append(s,n),t.append(n,c),t.append(n,m),u&&u.m(n,null),i[34](n),i[35](s),t.append(r,v),t.append(r,C),i[37](e),k||(g=[t.listen(o,"click",i[31]),t.listen(C,"click",i[36])],k=!0)},p(w,h){w[9].length>0?u?u.p(w,h):(u=J(w),u.c(),u.m(n,null)):u&&(u.d(1),u=null),h[0]&1&&f!==(f=`CarouselContainer CarouselContainerMobile ${w[0]==="headerMain"?"CarouselContainerHeaderMain":""}`)&&t.attr(r,"class",f),h[0]&1&&y!==(y=w[0]==="headerMain"?"max-width: auto":void 0)&&t.attr(r,"style",y),h[0]&1&&_!==(_="CarouselWrapper "+(w[0]==="headerMain"?"CarouselWrapperHeaderMain":""))&&t.attr(e,"class",_)},i:t.noop,o:t.noop,d(w){w&&t.detach(e),u&&u.d(),i[34](null),i[35](null),i[37](null),k=!1,t.run_all(g)}}}function Fe(i,e,r){let{endpoint:o=""}=e,{datasource:l=""}=e,{onclickeventname:s="defaultEvent"}=e,{actionevent:n="defaultEvent"}=e,{favoritesnumber:c="0"}=e,{location:m=""}=e,{clientstyling:v=""}=e,{clientstylingurl:C=""}=e,{identity:f=""}=e,{translationurl:y=""}=e,{isprimarymenu:_=!1}=e,{issecondarymenu:k=!1}=e,{lang:g=""}=e,{activeindex:u="0"}=e,{showsubgroups:w="false"}=e,{categoriesicon:h="false"}=e,{lobbyiconimage:b=""}=e,{mygamesiconimage:L=""}=e;ye({withLocale:"en",translations:{}});const R=()=>{fetch(y).then(d=>d.json()).then(d=>{Object.keys(d).forEach(p=>{U(p,d[p])})}).catch(d=>{console.log(d)})};Object.keys(Y).forEach(a=>{U(a,Y[a])});let H,A,E,W,I,N=[],T=[],j=[],F,z=(a,d,p,D,M)=>{var S;if(!(a.subGroups&&D===null)){if(O(),r(6,A=d),r(6,A),M!="secondary"){window.postMessage({type:n=="CategoryChange"?"CategoryChange":"NavigateTo",buzz:"1",itemId:a.id,index:d,item:a,path:a.path,externalLink:a.externalLink||!1,target:((S=a.attrs)==null?void 0:S.target)||null},window.location.href),r(7,E=null),r(8,W=null);return}r(7,E=D),r(7,E),r(8,W=E),window.postMessage({type:n,itemId:p.id,subIndex:D,subItem:p},window.location.href)}},B=()=>{F.scrollBy({left:-250,behavior:"smooth"})},G=()=>{F.scrollBy({left:250,behavior:"smooth"})};const x=a=>{a.data.type=="SliderData"&&a.data.identity==f&&(r(9,N=a.data.data),r(11,j=new Array(N.length).fill(!1)),w=="true"&&oe()),a.data.type=="GoToHomepage"&&N.forEach((d,p)=>{d.path.endsWith("/casino")&&(r(6,A=p),r(6,A))})},ne=()=>{we(g)},ae=(a,d,p)=>{if(m=="secondaryMenu"&&o&&l&&g&&a.id){let D=new URL(`${o}/v1/casino/groups/${l}/${a.id}/subGroups?language=${g}`);fetch(D.href).then(M=>M.json()).then(M=>{M.index=d,r(10,T=T.concat(M)),w=="false"&&window.postMessage({type:n,itemId:a.id,index:d,item:a},window.location.href);const S=[];T.map(pe=>(pe.items.forEach(q=>{S.find(Ce=>q.id==Ce)||S.push(q.id)}),S.flat())),window.postMessage({type:"SubgroupsIds",subGroupsIds:S},window.location.href)}).then(()=>{H.querySelectorAll(".DropDown")&&O()})}m=="headerMain"&&window.postMessage({type:n,item:a},window.location.href)},O=()=>{const a=H.querySelectorAll(".DropDown");document.activeElement.blur(),F.classList.add("isScrolling");for(let d=0;d<a.length;d++)a[d].style.transform="translateX(-"+F.scrollLeft+"px)";F.classList.remove("isScrolling")},oe=()=>{N.forEach((a,d)=>{var p;((p=a==null?void 0:a.subGroups)==null?void 0:p.count)>0&&(r(11,j[d]=!0,j),ae(a,d))})},ie=()=>{let a=document.createElement("style");a.innerHTML=v,I.appendChild(a)},le=()=>{let a=document.createElement("style"),d=new URL(C);fetch(d.href).then(p=>p.text()).then(p=>{a.innerHTML=p,setTimeout(()=>{I.appendChild(a)},1)})},se=a=>{let d="";return a.id==="LOBBY"?d=b:a.id==="MYGAMES"&&(d=L),a.icon||d};t.onMount(()=>(window.addEventListener("message",x,!1),"ontouchstart"in document.documentElement&&(document.documentElement.className+=" touch-device"),setTimeout(()=>{F.addEventListener("scroll",O)},500),window.postMessage({type:"SliderLoaded",identity:f}),()=>{window.removeEventListener("message",x),H.removeEventListener("scroll",O)}));const ce=()=>B(),ue=(a,d,p,D,M)=>{z(a,d,p,D,"secondary"),M.stopPropagation()},de=(a,d,p)=>{z(a,d,null,null,"main"),p.preventDefault()};function me(a){t.binding_callbacks[a?"unshift":"push"](()=>{H=a,r(5,H)})}function he(a){t.binding_callbacks[a?"unshift":"push"](()=>{F=a,r(12,F)})}const fe=()=>G();function ge(a){t.binding_callbacks[a?"unshift":"push"](()=>{I=a,r(4,I)})}return i.$$set=a=>{"endpoint"in a&&r(17,o=a.endpoint),"datasource"in a&&r(18,l=a.datasource),"onclickeventname"in a&&r(19,s=a.onclickeventname),"actionevent"in a&&r(20,n=a.actionevent),"favoritesnumber"in a&&r(21,c=a.favoritesnumber),"location"in a&&r(0,m=a.location),"clientstyling"in a&&r(22,v=a.clientstyling),"clientstylingurl"in a&&r(23,C=a.clientstylingurl),"identity"in a&&r(24,f=a.identity),"translationurl"in a&&r(25,y=a.translationurl),"isprimarymenu"in a&&r(26,_=a.isprimarymenu),"issecondarymenu"in a&&r(27,k=a.issecondarymenu),"lang"in a&&r(28,g=a.lang),"activeindex"in a&&r(1,u=a.activeindex),"showsubgroups"in a&&r(2,w=a.showsubgroups),"categoriesicon"in a&&r(3,h=a.categoriesicon),"lobbyiconimage"in a&&r(29,b=a.lobbyiconimage),"mygamesiconimage"in a&&r(30,L=a.mygamesiconimage)},i.$$.update=()=>{i.$$.dirty[0]&2,i.$$.dirty[0]&33554432&&y&&R(),i.$$.dirty[0]&4194320&&v&&I&&ie(),i.$$.dirty[0]&8388624&&C&&I&&le(),i.$$.dirty[0]&268435456&&g&&ne()},[m,u,w,h,I,H,A,E,W,N,T,j,F,z,B,G,se,o,l,s,n,c,v,C,f,y,_,k,g,b,L,ce,ue,de,me,he,fe,ge]}class re extends t.SvelteComponent{constructor(e){super(),t.init(this,e,Fe,ke,t.safe_not_equal,{endpoint:17,datasource:18,onclickeventname:19,actionevent:20,favoritesnumber:21,location:0,clientstyling:22,clientstylingurl:23,identity:24,translationurl:25,isprimarymenu:26,issecondarymenu:27,lang:28,activeindex:1,showsubgroups:2,categoriesicon:3,lobbyiconimage:29,mygamesiconimage:30},be,[-1,-1])}get endpoint(){return this.$$.ctx[17]}set endpoint(e){this.$$set({endpoint:e}),t.flush()}get datasource(){return this.$$.ctx[18]}set datasource(e){this.$$set({datasource:e}),t.flush()}get onclickeventname(){return this.$$.ctx[19]}set onclickeventname(e){this.$$set({onclickeventname:e}),t.flush()}get actionevent(){return this.$$.ctx[20]}set actionevent(e){this.$$set({actionevent:e}),t.flush()}get favoritesnumber(){return this.$$.ctx[21]}set favoritesnumber(e){this.$$set({favoritesnumber:e}),t.flush()}get location(){return this.$$.ctx[0]}set location(e){this.$$set({location:e}),t.flush()}get clientstyling(){return this.$$.ctx[22]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[23]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get identity(){return this.$$.ctx[24]}set identity(e){this.$$set({identity:e}),t.flush()}get translationurl(){return this.$$.ctx[25]}set translationurl(e){this.$$set({translationurl:e}),t.flush()}get isprimarymenu(){return this.$$.ctx[26]}set isprimarymenu(e){this.$$set({isprimarymenu:e}),t.flush()}get issecondarymenu(){return this.$$.ctx[27]}set issecondarymenu(e){this.$$set({issecondarymenu:e}),t.flush()}get lang(){return this.$$.ctx[28]}set lang(e){this.$$set({lang:e}),t.flush()}get activeindex(){return this.$$.ctx[1]}set activeindex(e){this.$$set({activeindex:e}),t.flush()}get showsubgroups(){return this.$$.ctx[2]}set showsubgroups(e){this.$$set({showsubgroups:e}),t.flush()}get categoriesicon(){return this.$$.ctx[3]}set categoriesicon(e){this.$$set({categoriesicon:e}),t.flush()}get lobbyiconimage(){return this.$$.ctx[29]}set lobbyiconimage(e){this.$$set({lobbyiconimage:e}),t.flush()}get mygamesiconimage(){return this.$$.ctx[30]}set mygamesiconimage(e){this.$$set({mygamesiconimage:e}),t.flush()}}t.create_custom_element(re,{endpoint:{},datasource:{},onclickeventname:{},actionevent:{},favoritesnumber:{},location:{},clientstyling:{},clientstylingurl:{},identity:{},translationurl:{},isprimarymenu:{type:"Boolean"},issecondarymenu:{type:"Boolean"},lang:{},activeindex:{},showsubgroups:{},categoriesicon:{},lobbyiconimage:{},mygamesiconimage:{}},[],[],!0);exports.default=re;
|