@betorigami/games 2.7.3 → 2.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +13 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7122,6 +7122,7 @@ export type gameContextType = {
|
|
|
7122
7122
|
customWheelCenterPadding: number | null;
|
|
7123
7123
|
customDiamondsBackgroundSvgUrl: string | null;
|
|
7124
7124
|
customBlackjackBackgroundSvgUrl: string | null;
|
|
7125
|
+
customBlitzBackgroundSvgUrl: string | null;
|
|
7125
7126
|
blitzMinPickCount: number | null;
|
|
7126
7127
|
blitzMaxPickCount: number | null;
|
|
7127
7128
|
customCardBackSvgUrl: string | null;
|
|
@@ -7186,6 +7187,7 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
7186
7187
|
customWheelCenterPadding: number | null;
|
|
7187
7188
|
customDiamondsBackgroundSvgUrl: string | null;
|
|
7188
7189
|
customBlackjackBackgroundSvgUrl: string | null;
|
|
7190
|
+
customBlitzBackgroundSvgUrl: string | null;
|
|
7189
7191
|
blitzMinPickCount: number | null;
|
|
7190
7192
|
blitzMaxPickCount: number | null;
|
|
7191
7193
|
customCardBackSvgUrl: string | null;
|
package/dist/index.mjs
CHANGED
|
@@ -36,7 +36,7 @@ var Z6=Object.create;var{getPrototypeOf:O6,defineProperty:Xt,getOwnPropertyNames
|
|
|
36
36
|
\f\r](?:([^\\s"'>=/]+)([
|
|
37
37
|
\f\r]*=[
|
|
38
38
|
\f\r]*(?:[^
|
|
39
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),t4=/'/g,o4=/"/g,h4=/^(?:script|style|textarea|title)$/i,N2=(a)=>(e,...i)=>({_$litType$:a,strings:e,values:i}),x=N2(1),G=N2(2),Uu=N2(3),i1=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),l4=new WeakMap,Ae=qe.createTreeWalker(qe,129);function u4(a,e){if(!X2(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return i4!==void 0?i4.createHTML(e):e}var d4=(a,e)=>{let i=a.length-1,r=[],n,t=e===2?"<svg>":e===3?"<math>":"",o=Ji;for(let l=0;l<i;l++){let s=a[l],d,c,m=-1,u=0;for(;u<s.length&&(o.lastIndex=u,c=o.exec(s),c!==null);)u=o.lastIndex,o===Ji?c[1]==="!--"?o=r4:c[1]!==void 0?o=n4:c[2]!==void 0?(h4.test(c[2])&&(n=RegExp("</"+c[2],"g")),o=Fe):c[3]!==void 0&&(o=Fe):o===Fe?c[0]===">"?(o=n??Ji,m=-1):c[1]===void 0?m=-2:(m=o.lastIndex-c[2].length,d=c[1],o=c[3]===void 0?Fe:c[3]==='"'?o4:t4):o===o4||o===t4?o=Fe:o===r4||o===n4?o=Ji:(o=Fe,n=void 0);let f=o===Fe&&a[l+1].startsWith("/>")?" ":"";t+=o===Ji?s+C6:m>=0?(r.push(d),s.slice(0,m)+"$lit$"+s.slice(m)+ae+f):s+ae+(m===-2?l:f)}return[u4(a,t+(a[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class Wi{constructor({strings:a,_$litType$:e},i){let r;this.parts=[];let n=0,t=0,o=a.length-1,l=this.parts,[s,d]=d4(a,e);if(this.el=Wi.createElement(s,i),Ae.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=Ae.nextNode())!==null&&l.length<o;){if(r.nodeType===1){if(r.hasAttributes())for(let c of r.getAttributeNames())if(c.endsWith("$lit$")){let m=d[t++],u=r.getAttribute(c).split(ae),f=/([.?@])?(.*)/.exec(m);l.push({type:1,index:n,name:f[2],strings:u,ctor:f[1]==="."?U2:f[1]==="?"?_2:f[1]==="@"?a0:ri}),r.removeAttribute(c)}else c.startsWith(ae)&&(l.push({type:6,index:n}),r.removeAttribute(c));if(h4.test(r.tagName)){let c=r.textContent.split(ae),m=c.length-1;if(m>0){r.textContent=Sr?Sr.emptyScript:"";for(let u=0;u<m;u++)r.append(c[u],Vi()),Ae.nextNode(),l.push({type:2,index:++n});r.append(c[m],Vi())}}}else if(r.nodeType===8)if(r.data===Y2)l.push({type:2,index:n});else{let c=-1;for(;(c=r.data.indexOf(ae,c+1))!==-1;)l.push({type:7,index:n}),c+=ae.length-1}n++}}static createElement(a,e){let i=qe.createElement("template");return i.innerHTML=a,i}}function Le(a,e,i=a,r){if(e===i1)return e;let n=r!==void 0?i._$Co?.[r]:i._$Cl,t=Ci(e)?void 0:e._$litDirective$;return n?.constructor!==t&&(n?._$AO?.(!1),t===void 0?n=void 0:(n=new t(a),n._$AT(a,i,r)),r!==void 0?(i._$Co??=[])[r]=n:i._$Cl=n),n!==void 0&&(e=Le(a,n._$AS(a,e.values),n,r)),e}class G2{constructor(a,e){this._$AV=[],this._$AN=void 0,this._$AD=a,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(a){let{el:{content:e},parts:i}=this._$AD,r=(a?.creationScope??qe).importNode(e,!0);Ae.currentNode=r;let n=Ae.nextNode(),t=0,o=0,l=i[0];for(;l!==void 0;){if(t===l.index){let s;l.type===2?s=new ii(n,n.nextSibling,this,a):l.type===1?s=new l.ctor(n,l.name,l.strings,this,a):l.type===6&&(s=new e0(n,this,a)),this._$AV.push(s),l=i[++o]}t!==l?.index&&(n=Ae.nextNode(),t++)}return Ae.currentNode=qe,r}p(a){let e=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(a,i,e),e+=i.strings.length-2):i._$AI(a[e])),e++}}class ii{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(a,e,i,r){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=a,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let a=this._$AA.parentNode,e=this._$AM;return e!==void 0&&a?.nodeType===11&&(a=e.parentNode),a}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(a,e=this){a=Le(this,a,e),Ci(a)?a===V||a==null||a===""?(this._$AH!==V&&this._$AR(),this._$AH=V):a!==this._$AH&&a!==i1&&this._(a):a._$litType$!==void 0?this.$(a):a.nodeType!==void 0?this.T(a):s4(a)?this.k(a):this._(a)}O(a){return this._$AA.parentNode.insertBefore(a,this._$AB)}T(a){this._$AH!==a&&(this._$AR(),this._$AH=this.O(a))}_(a){this._$AH!==V&&Ci(this._$AH)?this._$AA.nextSibling.data=a:this.T(qe.createTextNode(a)),this._$AH=a}$(a){let{values:e,_$litType$:i}=a,r=typeof i=="number"?this._$AC(a):(i.el===void 0&&(i.el=Wi.createElement(u4(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{let n=new G2(r,this),t=n.u(this.options);n.p(e),this.T(t),this._$AH=n}}_$AC(a){let e=l4.get(a.strings);return e===void 0&&l4.set(a.strings,e=new Wi(a)),e}k(a){X2(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,r=0;for(let n of a)r===e.length?e.push(i=new ii(this.O(Vi()),this.O(Vi()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(a=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);a&&a!==this._$AB;){let i=a.nextSibling;a.remove(),a=i}}setConnected(a){this._$AM===void 0&&(this._$Cv=a,this._$AP?.(a))}}class ri{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(a,e,i,r,n){this.type=1,this._$AH=V,this._$AN=void 0,this.element=a,this.name=e,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=V}_$AI(a,e=this,i,r){let n=this.strings,t=!1;if(n===void 0)a=Le(this,a,e,0),t=!Ci(a)||a!==this._$AH&&a!==i1,t&&(this._$AH=a);else{let o=a,l,s;for(a=n[0],l=0;l<n.length-1;l++)s=Le(this,o[i+l],e,l),s===i1&&(s=this._$AH[l]),t||=!Ci(s)||s!==this._$AH[l],s===V?a=V:a!==V&&(a+=(s??"")+n[l+1]),this._$AH[l]=s}t&&!r&&this.j(a)}j(a){a===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,a??"")}}class U2 extends ri{constructor(){super(...arguments),this.type=3}j(a){this.element[this.name]=a===V?void 0:a}}class _2 extends ri{constructor(){super(...arguments),this.type=4}j(a){this.element.toggleAttribute(this.name,!!a&&a!==V)}}class a0 extends ri{constructor(a,e,i,r,n){super(a,e,i,r,n),this.type=5}_$AI(a,e=this){if((a=Le(this,a,e,0)??V)===i1)return;let i=this._$AH,r=a===V&&i!==V||a.capture!==i.capture||a.once!==i.once||a.passive!==i.passive,n=a!==V&&(i===V||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,a),this._$AH=a}handleEvent(a){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,a):this._$AH.handleEvent(a)}}class e0{constructor(a,e,i){this.element=a,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(a){Le(this,a)}}var c4={M:"$lit$",P:ae,A:Y2,C:1,L:d4,R:G2,D:s4,V:Le,I:ii,H:ri,N:_2,U:a0,B:U2,F:e0},W6=Q2.litHtmlPolyfillSupport;W6?.(Wi,ii),(Q2.litHtmlVersions??=[]).push("3.3.0");var Ir=(a,e,i)=>{let r=i?.renderBefore??e,n=r._$litPart$;if(n===void 0){let t=i?.renderBefore??null;r._$litPart$=n=new ii(e.insertBefore(Vi(),t),t,void 0,i??{})}return n._$AI(a),n};var i0=globalThis;class Ta extends pe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let a=super.createRenderRoot();return this.renderOptions.renderBefore??=a.firstChild,a}update(a){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(a),this._$Do=Ir(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i1}}Ta._$litElement$=!0,Ta.finalized=!0,i0.litElementHydrateSupport?.({LitElement:Ta});var P6=i0.litElementPolyfillSupport;P6?.({LitElement:Ta});(i0.litElementVersions??=[]).push("4.2.0");var T=(a)=>(e,i)=>{i!==void 0?i.addInitializer(()=>{customElements.define(a,e)}):customElements.define(a,e)};var $6={attribute:!0,type:String,converter:Ei,reflect:!1,hasChanged:Rr},D6=(a=$6,e,i)=>{let{kind:r,metadata:n}=i,t=globalThis.litPropertyMetadata.get(n);if(t===void 0&&globalThis.litPropertyMetadata.set(n,t=new Map),r==="setter"&&((a=Object.create(a)).wrapped=!0),t.set(i.name,a),r==="accessor"){let{name:o}=i;return{set(l){let s=e.get.call(this);e.set.call(this,l),this.requestUpdate(o,s,a)},init(l){return l!==void 0&&this.C(o,void 0,a,l),l}}}if(r==="setter"){let{name:o}=i;return function(l){let s=this[o];e.call(this,l),this.requestUpdate(o,s,a)}}throw Error("Unsupported decorator location: "+r)};function w(a){return(e,i)=>typeof i=="object"?D6(a,e,i):((r,n,t)=>{let o=n.hasOwnProperty(t);return n.constructor.createProperty(t,r),o?Object.getOwnPropertyDescriptor(n,t):void 0})(a,e,i)}function F(a){return w({...a,state:!0,attribute:!1})}var ge=(a,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(a,e,i),i);function aa(a,e){return(i,r,n)=>{let t=(o)=>o.renderRoot?.querySelector(a)??null;if(e){let{get:o,set:l}=typeof r=="object"?i:n??(()=>{let s=Symbol();return{get(){return this[s]},set(d){this[s]=d}}})();return ge(i,r,{get(){let s=o.call(this);return s===void 0&&(s=t(this),(s!==null||this.hasUpdated)&&l.call(this,s)),s}})}return ge(i,r,{get(){return t(this)}})}}var B6;function Kr(a){return(e,i)=>ge(e,i,{get(){return(this.renderRoot??(B6??=document.createDocumentFragment())).querySelectorAll(a)}})}var f1={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},m1=(a)=>(...e)=>({_$litDirective$:a,values:e});class p1{constructor(a){}get _$AU(){return this._$AM._$AU}_$AT(a,e,i){this._$Ct=a,this._$AM=e,this._$Ci=i}_$AS(a,e){return this.update(a,e)}update(a,e){return this.render(...e)}}var U=m1(class extends p1{constructor(a){if(super(a),a.type!==f1.ATTRIBUTE||a.name!=="class"||a.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(a){return" "+Object.keys(a).filter((e)=>a[e]).join(" ")+" "}update(a,[e]){if(this.st===void 0){this.st=new Set,a.strings!==void 0&&(this.nt=new Set(a.strings.join(" ").split(/\s/).filter((r)=>r!=="")));for(let r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}let i=a.element.classList;for(let r of this.st)r in e||(i.remove(r),this.st.delete(r));for(let r in e){let n=!!e[r];n===this.st.has(r)||this.nt?.has(r)||(n?(i.add(r),this.st.add(r)):(i.remove(r),this.st.delete(r)))}return i1}});var m4={success:{pattern:[{duration:30,intensity:0.5},{delay:60,duration:40,intensity:1}]},warning:{pattern:[{duration:40,intensity:0.8},{delay:100,duration:40,intensity:0.6}]},error:{pattern:[{duration:40,intensity:0.9},{delay:40,duration:40,intensity:0.9},{delay:40,duration:40,intensity:0.9}]},light:{pattern:[{duration:15,intensity:0.4}]},medium:{pattern:[{duration:25,intensity:0.7}]},heavy:{pattern:[{duration:35,intensity:1}]},soft:{pattern:[{duration:40,intensity:0.5}]},rigid:{pattern:[{duration:10,intensity:1}]},selection:{pattern:[{duration:8,intensity:0.3}]},nudge:{pattern:[{duration:80,intensity:0.8},{delay:80,duration:50,intensity:0.3}]},buzz:{pattern:[{duration:1000,intensity:1}]}},Q6=16,Y6=184,f4=1000,Zr=20;function X6(a){if(typeof a=="number")return{vibrations:[{duration:a}]};if(typeof a=="string"){let e=m4[a];return e?{vibrations:e.pattern.map((i)=>({...i}))}:(console.warn(`[web-haptics] Unknown preset: "${a}"`),null)}if(Array.isArray(a)){if(a.length===0)return{vibrations:[]};if(typeof a[0]=="number"){let e=a,i=[];for(let r=0;r<e.length;r+=2){let n=r>0?e[r-1]:0;i.push({...n>0&&{delay:n},duration:e[r]})}return{vibrations:i}}return{vibrations:a.map((e)=>({...e}))}}return{vibrations:a.pattern.map((e)=>({...e}))}}function N6(a,e){if(e>=1)return[a];if(e<=0)return[];let i=Math.max(1,Math.round(Zr*e)),r=Zr-i,n=[],t=a;for(;t>=Zr;)n.push(i),n.push(r),t-=Zr;if(t>0){let o=Math.max(1,Math.round(t*e));n.push(o);let l=t-o;l>0&&n.push(l)}return n}function G6(a,e){let i=[];for(let r=0;r<a.length;r++){let n=a[r],t=Math.max(0,Math.min(1,n.intensity??e)),o=n.delay??0;o>0&&(i.length>0&&i.length%2===0?i[i.length-1]+=o:(i.length===0&&i.push(0),i.push(o)));let l=N6(n.duration,t);if(l.length===0){i.length>0&&i.length%2===0?i[i.length-1]+=n.duration:n.duration>0&&(i.push(0),i.push(n.duration));continue}for(let s of l)i.push(s)}return i}var U6=0,r0=class a{hapticLabel=null;domInitialized=!1;instanceId;debug;showSwitch;rafId=null;patternResolve=null;audioCtx=null;audioFilter=null;audioGain=null;audioBuffer=null;constructor(e){this.instanceId=++U6,this.debug=e?.debug??!1,this.showSwitch=e?.showSwitch??!1}static isSupported=typeof navigator<"u"&&typeof navigator.vibrate=="function";async trigger(e=[{duration:25,intensity:0.7}],i){let r=X6(e);if(!r)return;let{vibrations:n}=r;if(n.length===0)return;let t=Math.max(0,Math.min(1,i?.intensity??0.5));for(let o of n)if(o.duration>f4&&(o.duration=f4),!Number.isFinite(o.duration)||o.duration<0||o.delay!==void 0&&(!Number.isFinite(o.delay)||o.delay<0)){console.warn("[web-haptics] Invalid vibration values. Durations and delays must be finite non-negative numbers.");return}if(a.isSupported&&navigator.vibrate(G6(n,t)),!a.isSupported||this.debug){if(this.ensureDOM(),!this.hapticLabel)return;this.debug&&await this.ensureAudio(),this.stopPattern();let o=(n[0]?.delay??0)===0;if(o&&(this.hapticLabel.click(),this.debug&&this.audioCtx)){let l=Math.max(0,Math.min(1,n[0].intensity??t));this.playClick(l)}await this.runPattern(n,t,o)}}cancel(){this.stopPattern(),a.isSupported&&navigator.vibrate(0)}destroy(){this.stopPattern(),this.hapticLabel&&(this.hapticLabel.remove(),this.hapticLabel=null,this.domInitialized=!1),this.audioCtx&&(this.audioCtx.close(),this.audioCtx=null,this.audioFilter=null,this.audioGain=null,this.audioBuffer=null)}setDebug(e){this.debug=e,!e&&this.audioCtx&&(this.audioCtx.close(),this.audioCtx=null,this.audioFilter=null,this.audioGain=null,this.audioBuffer=null)}setShowSwitch(e){if(this.showSwitch=e,this.hapticLabel){let i=this.hapticLabel.querySelector("input");this.hapticLabel.style.display=e?"":"none",i&&(i.style.display=e?"":"none")}}stopPattern(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.patternResolve?.(),this.patternResolve=null}runPattern(e,i,r){return new Promise((n)=>{this.patternResolve=n;let t=[],o=0;for(let m of e){let u=Math.max(0,Math.min(1,m.intensity??i)),f=m.delay??0;f>0&&(o+=f,t.push({end:o,isOn:!1,intensity:0})),o+=m.duration,t.push({end:o,isOn:!0,intensity:u})}let l=o,s=0,d=-1,c=(m)=>{s===0&&(s=m);let u=m-s;if(u>=l){this.rafId=null,this.patternResolve=null,n();return}let f=t[0];for(let k of t)if(u<k.end){f=k;break}if(f.isOn){let k=Q6+(1-f.intensity)*Y6;d===-1?(d=m,r||(this.hapticLabel?.click(),this.debug&&this.audioCtx&&this.playClick(f.intensity),r=!0)):m-d>=k&&(this.hapticLabel?.click(),this.debug&&this.audioCtx&&this.playClick(f.intensity),d=m)}this.rafId=requestAnimationFrame(c)};this.rafId=requestAnimationFrame(c)})}playClick(e){if(!this.audioCtx||!this.audioFilter||!this.audioGain||!this.audioBuffer)return;let i=this.audioBuffer.getChannelData(0);for(let o=0;o<i.length;o++)i[o]=(Math.random()*2-1)*Math.exp(-o/25);this.audioGain.gain.value=0.5*e;let r=2000+e*2000,n=1+(Math.random()-0.5)*0.3;this.audioFilter.frequency.value=r*n;let t=this.audioCtx.createBufferSource();t.buffer=this.audioBuffer,t.connect(this.audioFilter),t.onended=()=>t.disconnect(),t.start()}async ensureAudio(){if(!this.audioCtx&&typeof AudioContext<"u"){this.audioCtx=new AudioContext,this.audioFilter=this.audioCtx.createBiquadFilter(),this.audioFilter.type="bandpass",this.audioFilter.frequency.value=4000,this.audioFilter.Q.value=8,this.audioGain=this.audioCtx.createGain(),this.audioFilter.connect(this.audioGain),this.audioGain.connect(this.audioCtx.destination);let e=0.004;this.audioBuffer=this.audioCtx.createBuffer(1,this.audioCtx.sampleRate*e,this.audioCtx.sampleRate);let i=this.audioBuffer.getChannelData(0);for(let r=0;r<i.length;r++)i[r]=(Math.random()*2-1)*Math.exp(-r/25)}this.audioCtx?.state==="suspended"&&await this.audioCtx.resume()}ensureDOM(){if(this.domInitialized||typeof document>"u")return;let e=`web-haptics-${this.instanceId}`,i=document.createElement("label");i.setAttribute("for",e),i.textContent="Haptic feedback",i.style.position="fixed",i.style.bottom="10px",i.style.left="10px",i.style.padding="5px 10px",i.style.backgroundColor="rgba(0, 0, 0, 0.7)",i.style.color="white",i.style.fontFamily="sans-serif",i.style.fontSize="14px",i.style.borderRadius="4px",i.style.zIndex="9999",i.style.userSelect="none",this.hapticLabel=i;let r=document.createElement("input");r.type="checkbox",r.setAttribute("switch",""),r.id=e,r.style.all="initial",r.style.appearance="auto",this.showSwitch||(i.style.display="none",r.style.display="none"),i.appendChild(r),document.body.appendChild(i),this.domInitialized=!0}};class n0{destroyed=!1;haptics=this.createHaptics();constructor(a){a.addController(this)}createHaptics(){if(this.destroyed)return;return new r0({debug:!1,showSwitch:!1})}trigger(a){if(this.destroyed)return;let e=this.haptics??(this.haptics=this.createHaptics());if(!e)return;e.trigger(a).catch(()=>{})}destroy(){this.destroyed=!0,this.haptics?.cancel(),this.haptics?.destroy(),this.haptics=void 0}tap(){this.trigger("selection")}gemReveal(a){if(a>=1.26){this.trigger("medium");return}if(a>=1.122){this.trigger("light");return}this.trigger("selection")}minesGemReveal(a){if(a>=1.26){this.trigger("heavy");return}if(a>=1.122){this.trigger("medium");return}this.trigger("light")}bombImpact(){this.trigger("heavy")}winCelebration(){this.trigger("success")}}function p4(a){return a.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0})}class t0 extends EventTarget{host;_historyData=[];_hasData=null;_isInitialized=!1;_hasNextPage=!1;_initialLoadSize=20;_hasLoadedMore=!1;_clientSeed=null;_hasLoadedClientSeed=!1;constructor(a){super();this.host=a,a.addController(this),setTimeout(()=>{this.preloadHistory(),this.loadClientSeed()},100)}get historyData(){return this._historyData}get hasData(){return this._hasData}get isInitialized(){return this._isInitialized}get hasNextPage(){return this._hasNextPage}get clientSeed(){return this._clientSeed}get hasLoadedClientSeed(){return this._hasLoadedClientSeed}notifyDataChanged(){this.dispatchEvent(new CustomEvent("history-data-changed",{detail:{historyData:this._historyData,hasNextPage:this._hasNextPage,hasData:this._hasData}}))}notifyClientSeedChanged(){this.dispatchEvent(new CustomEvent("client-seed-changed",{detail:{clientSeed:this._clientSeed}}))}async preloadHistory(){if(!this.host.gameData?.baseUrl||!this.host.gameData?.authToken)return;try{let{historyData:a,hasNextPage:e}=await this.fetchHistory(void 0,this._initialLoadSize);this._historyData=a,this._hasData=a.length>0,this._hasNextPage=e,this._isInitialized=!0,this._hasLoadedMore=!1,this.notifyDataChanged()}catch(a){console.error("Failed to preload history:",a),this._isInitialized=!0,this._hasData=null}}async fetchHistory(a,e=5){if(!this.host.gameData?.baseUrl||!this.host.gameData?.authToken)return{historyData:[],hasNextPage:!1};let i=new URL(`${this.host.gameData.baseUrl}/bet/my-bets`);if(i.searchParams.append("limit",e.toString()),a)i.searchParams.append("beforeId",a);let r=await fetch(i.toString(),{headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.host.gameData.authToken}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);let n=await r.json();return{historyData:n.results.map((o)=>({id:`${o.id.slice(0,3)}...${o.id.slice(-3)}`,fullId:o.id,timestamp:p4(new Date(o.succeededAt)),currency:o.currency,bet:Number(o.amount),win:Number(o.payout)})),hasNextPage:!!n.nextCursor}}async refreshHistory(a=!1){try{let e=a&&this._hasLoadedMore?this._historyData.length:this._initialLoadSize,{historyData:i,hasNextPage:r}=await this.fetchHistory(void 0,e);if(this._historyData=i,this._hasData=i.length>0,this._hasNextPage=r,!a)this._hasLoadedMore=!1;this.notifyDataChanged()}catch(e){console.error("Failed to refresh history:",e)}}async loadMore(){if(!this._hasNextPage||this._historyData.length===0)return{historyData:[],hasNextPage:!1};let a=this._historyData[this._historyData.length-1],{historyData:e,hasNextPage:i}=await this.fetchHistory(a.fullId,this._initialLoadSize);return this._historyData=[...this._historyData,...e],this._hasNextPage=i,this._hasLoadedMore=!0,this.notifyDataChanged(),this.dispatchEvent(new CustomEvent("history-loaded-more")),{historyData:e,hasNextPage:i}}addNewBet(a){if(this._historyData.some((i)=>i.fullId===a.id))return;let e={id:`${a.id.slice(0,3)}...${a.id.slice(-3)}`,fullId:a.id,timestamp:p4(new Date),currency:a.currency,bet:Number(a.amount),win:Number(a.payout)};if(!this._hasLoadedMore&&this._historyData.length>=this._initialLoadSize)this._historyData=[e,...this._historyData.slice(0,this._initialLoadSize-1)],this._hasNextPage=!0;else this._historyData=[e,...this._historyData];this._hasData=!0,this.notifyDataChanged()}async loadClientSeed(){if(!this.host.gameData?.baseUrl||!this.host.gameData?.authToken||this._hasLoadedClientSeed)return;try{let a=await fetch(`${this.host.gameData.baseUrl}/provably-fair/my-info`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.host.gameData.authToken}`}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let e=await a.json();this._clientSeed=e.clientSeed,this._hasLoadedClientSeed=!0,this.notifyClientSeedChanged()}catch(a){console.error("Failed to load client seed:",a)}}updateClientSeed(a){this._clientSeed=a,this.notifyClientSeedChanged()}}class o0{destroyed=!1;audioCtx;volume=1;constructor(a){a.addController(this)}setVolume(a){this.volume=a}destroy(){let a=this.audioCtx;if(this.destroyed=!0,this.audioCtx=void 0,a&&a.state!=="closed")a.close().catch(()=>{})}play(a){let e=a.gainScale*this.volume;if(!Number.isFinite(e)||e<=0)return;this.renderLayers(a.layers,e)}ensureAudio(){if(this.destroyed)return;if(this.audioCtx){if(this.audioCtx.state==="suspended")this.audioCtx.resume().catch(()=>{});return}if(typeof AudioContext==="undefined")return;try{this.audioCtx=new AudioContext}catch{return}if(this.audioCtx.state==="suspended")this.audioCtx.resume().catch(()=>{})}renderLayers(a,e){this.ensureAudio();let i=this.audioCtx;if(!i)return;let r=i.currentTime;for(let n of a)if(n.kind==="noise")this.renderNoiseLayer(i,r,n,e);else this.renderToneLayer(i,r,n,e)}renderNoiseLayer(a,e,i,r){let n=a.sampleRate,t=a.createBuffer(1,Math.round(n*i.duration),n),o=t.getChannelData(0);for(let c=0;c<o.length;c++)o[c]=(Math.random()*2-1)*Math.exp(-c/i.decay);let l=a.createBiquadFilter();if(l.type=i.filterType,i.filterFreqEnd!==void 0&&i.filterFreqRampTime!==void 0)l.frequency.setValueAtTime(i.filterFreq*(1+(Math.random()-0.5)*i.randomization),e),l.frequency.exponentialRampToValueAtTime(i.filterFreqEnd,e+i.filterFreqRampTime);else l.frequency.value=i.filterFreq*(1+(Math.random()-0.5)*i.randomization);l.Q.value=i.filterQ;let s=a.createGain();s.gain.value=i.gain*r;let d=a.createBufferSource();d.buffer=t,d.connect(l).connect(s).connect(a.destination),d.onended=()=>{d.disconnect(),l.disconnect(),s.disconnect()},d.start(e)}renderToneLayer(a,e,i,r){let n=e+(i.startOffset??0),t=a.createOscillator();if(t.type=i.waveform,i.frequencyEnd!==void 0&&i.frequencyRampTime!==void 0)t.frequency.setValueAtTime(i.frequency,n),t.frequency.exponentialRampToValueAtTime(i.frequencyEnd,n+i.frequencyRampTime);else t.frequency.value=i.frequency;let o=a.createGain(),l=i.gain;if(l.envelope==="peak-decay")o.gain.setValueAtTime(l.peak*r,n),o.gain.exponentialRampToValueAtTime(0.001,n+l.decayTime);else if(l.envelope==="attack-decay")o.gain.setValueAtTime(0.001,n),o.gain.linearRampToValueAtTime(l.peak*r,n+l.attackTime),o.gain.exponentialRampToValueAtTime(0.001,n+l.decayTime);else o.gain.setValueAtTime(0.001,n),o.gain.setValueAtTime(0.001,n+l.holdTime),o.gain.linearRampToValueAtTime(l.peak*r,n+l.attackEndTime),o.gain.exponentialRampToValueAtTime(0.001,n+l.decayTime);t.connect(o).connect(a.destination),t.start(n),t.stop(n+i.duration),t.onended=()=>{t.disconnect(),o.disconnect()}}}var wa="USD";var g4=[1,2,3,4,8];var g1=2,w4=["ROULETTE","BACCARAT"];class P extends Ta{static componentStyles=[];emit(a,e){let i=new CustomEvent(a,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...e});return this.dispatchEvent(i),i}}var ic=_1("language"),W="en";var g7={ar:()=>Promise.resolve().then(() => va(l0(),1)),de:()=>Promise.resolve().then(() => va(s0(),1)),en:()=>Promise.resolve().then(() => va(h0(),1)),"en-soc":()=>Promise.resolve().then(() => va(u0(),1)),es:()=>Promise.resolve().then(() => va(d0(),1)),fi:()=>Promise.resolve().then(() => va(c0(),1)),fr:()=>Promise.resolve().then(() => va(f0(),1)),hi:()=>Promise.resolve().then(() => va(m0(),1)),id:()=>Promise.resolve().then(() => va(p0(),1)),ja:()=>Promise.resolve().then(() => va(g0(),1)),ko:()=>Promise.resolve().then(() => va(w0(),1)),pl:()=>Promise.resolve().then(() => va(k0(),1)),pt:()=>Promise.resolve().then(() => va(v0(),1)),ru:()=>Promise.resolve().then(() => va(b0(),1)),tr:()=>Promise.resolve().then(() => va(z0(),1)),vi:()=>Promise.resolve().then(() => va(y0(),1)),zh:()=>Promise.resolve().then(() => va(x0(),1))};class k4{loadedLanguages=new Set;loadingPromises=new Map;loadedTranslations=new Map;async loadLanguage(a){if(this.loadedLanguages.has(a))return;if(this.loadingPromises.has(a))return this.loadingPromises.get(a);let e=this.loadLanguageModule(a);this.loadingPromises.set(a,e);try{await e,this.loadedLanguages.add(a)}finally{this.loadingPromises.delete(a)}}getTranslationData(a){return this.loadedTranslations.get(a)||null}isLanguageLoaded(a){return this.loadedLanguages.has(a)}getLoadedLanguages(){return Array.from(this.loadedLanguages)}async preloadLanguages(a){let e=a.map((i)=>this.loadLanguage(i).catch(()=>{}));await Promise.all(e)}clearAll(){this.loadedLanguages.clear(),this.loadingPromises.clear(),this.loadedTranslations.clear(),H0()}async loadLanguageModule(a){try{let e=await g7[a]();this.loadedTranslations.set(a,e.default),H0()}catch(e){throw e}}}var Pi=new k4;Pi.loadLanguage(W).catch(()=>{});var b4=va(l0(),1),z4=va(s0(),1),y4=va(h0(),1),x4=va(u0(),1),H4=va(d0(),1),R4=va(c0(),1),S4=va(f0(),1),I4=va(m0(),1),K4=va(p0(),1),Z4=va(g0(),1),O4=va(w0(),1),M4=va(k0(),1),j4=va(v0(),1),F4=va(b0(),1),A4=va(z0(),1),q4=va(y0(),1),L4=va(x0(),1);var R0={ar:b4.default,de:z4.default,en:y4.default,"en-soc":x4.default,es:H4.default,fi:R4.default,fr:S4.default,hi:I4.default,id:K4.default,ja:Z4.default,ko:O4.default,pl:M4.default,pt:j4.default,ru:F4.default,tr:A4.default,vi:q4.default,zh:L4.default};function w7(a){let e=Pi.getTranslationData(a);if(e)return e;return R0[a]||R0[W]}var Zc=_1(Symbol("translation"));class T4{cache=new Map;maxSize=1000;get(a){return this.cache.get(a)}set(a,e){if(this.cache.size>=this.maxSize)this.cache.clear();this.cache.set(a,e)}clear(){this.cache.clear()}size(){return this.cache.size}}var S0=new T4,v4=new Map;function k7(a){let e=v4.get(a);if(!e)e=a.split("."),v4.set(a,e);return e}function E4(a,e,i){let r=w7(e);try{let n=k7(a),t=r;for(let o of n)if(t=t?.[o],t===void 0)break;if(typeof t==="string")return t;if(e!==W)return E4(a,W,i);return i||a}catch{return i||a}}function R(a,e=W,i){let r=i?`${a}:${e}:${i}`:`${a}:${e}`,n=S0.get(r);if(n!==void 0)return n;let t=E4(a,e,i);return S0.set(r,t),t}function H0(){S0.clear()}var ia={betAmount:"0.00",scale:1,updateBetAmount:()=>{},updateBalance:()=>{},currency:wa,currencyDecimals:2,showCurrencyAsText:!1,balance:0,baseUrl:"",authToken:"",publicKey:"",hotkeysOpenEnabled:!1,showMaxBetButton:!1,volume:100,instantBetEnabled:!1,mainWidth:0,updateMainWidth:()=>{},updateHotkeysOpenEnabled:()=>{},updateShowMaxBetButton:()=>{},updateVolume:()=>{},updateInstantBetEnabled:()=>{},language:W,seasonTheme:"DEFAULT",autobetNumberOfBets:0,updateAutobetNumberOfBets:()=>{},soundEffects:void 0,historyController:void 0,haptics:void 0,lobbyUrl:"https://betorigami.com",depositUrl:void 0,hasLoadedBalance:!1,maxPayout:null,minBet:null,maxBet:null,edge:2,footerPosition:"BELOW",logoUrl:null,alwaysEnableMaxBetButton:!1,gcCurrencyIconSvgUrl:null,scCurrencyIconSvgUrl:null,customMinesBackgroundSvgUrl:null,customMinesGemSvgUrl:null,customMinesBombSvgUrl:null,customMinesTileSvgUrl:null,customMinesAutobetSelectedTileSvgUrl:null,customKenoBackgroundSvgUrl:null,customKenoGemSvgUrl:null,customKenoNonMatchTileSvgUrl:null,customKenoTileSvgUrl:null,customKenoSelectedTileSvgUrl:null,customRouletteBackgroundSvgUrl:null,roulettePreventOppositeBets:!1,customDiceBackgroundSvgUrl:null,diceMinMultiplier:null,advancedDiceMinMultiplier:null,customAdvancedDiceBackgroundSvgUrl:null,customPlinkoBackgroundSvgUrl:null,customPlinkoEdgeColor:null,customPlinkoCenterColor:null,customBaccaratBackgroundSvgUrl:null,baccaratPreventOppositeBets:!1,customLimboBackgroundSvgUrl:null,customWheelBackgroundSvgUrl:null,customWheelCenterSvgUrl:null,customWheelCenterPadding:null,customDiamondsBackgroundSvgUrl:null,customBlackjackBackgroundSvgUrl:null,blitzMinPickCount:null,blitzMaxPickCount:null,customCardBackSvgUrl:null,customCardRedColor:null,customCardBlackColor:null,customFooterLobbySvgUrl:null,customFooterVolumeSvgUrl:null,customFooterGameInfoSvgUrl:null,customFooterInstantBetSvgUrl:null,customFooterHotkeysSvgUrl:null,customFooterProvablyFairSvgUrl:null},N=_1(Symbol("game"));var J4=C`
|
|
39
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),t4=/'/g,o4=/"/g,h4=/^(?:script|style|textarea|title)$/i,N2=(a)=>(e,...i)=>({_$litType$:a,strings:e,values:i}),x=N2(1),G=N2(2),Uu=N2(3),i1=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),l4=new WeakMap,Ae=qe.createTreeWalker(qe,129);function u4(a,e){if(!X2(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return i4!==void 0?i4.createHTML(e):e}var d4=(a,e)=>{let i=a.length-1,r=[],n,t=e===2?"<svg>":e===3?"<math>":"",o=Ji;for(let l=0;l<i;l++){let s=a[l],d,c,m=-1,u=0;for(;u<s.length&&(o.lastIndex=u,c=o.exec(s),c!==null);)u=o.lastIndex,o===Ji?c[1]==="!--"?o=r4:c[1]!==void 0?o=n4:c[2]!==void 0?(h4.test(c[2])&&(n=RegExp("</"+c[2],"g")),o=Fe):c[3]!==void 0&&(o=Fe):o===Fe?c[0]===">"?(o=n??Ji,m=-1):c[1]===void 0?m=-2:(m=o.lastIndex-c[2].length,d=c[1],o=c[3]===void 0?Fe:c[3]==='"'?o4:t4):o===o4||o===t4?o=Fe:o===r4||o===n4?o=Ji:(o=Fe,n=void 0);let f=o===Fe&&a[l+1].startsWith("/>")?" ":"";t+=o===Ji?s+C6:m>=0?(r.push(d),s.slice(0,m)+"$lit$"+s.slice(m)+ae+f):s+ae+(m===-2?l:f)}return[u4(a,t+(a[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class Wi{constructor({strings:a,_$litType$:e},i){let r;this.parts=[];let n=0,t=0,o=a.length-1,l=this.parts,[s,d]=d4(a,e);if(this.el=Wi.createElement(s,i),Ae.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=Ae.nextNode())!==null&&l.length<o;){if(r.nodeType===1){if(r.hasAttributes())for(let c of r.getAttributeNames())if(c.endsWith("$lit$")){let m=d[t++],u=r.getAttribute(c).split(ae),f=/([.?@])?(.*)/.exec(m);l.push({type:1,index:n,name:f[2],strings:u,ctor:f[1]==="."?U2:f[1]==="?"?_2:f[1]==="@"?a0:ri}),r.removeAttribute(c)}else c.startsWith(ae)&&(l.push({type:6,index:n}),r.removeAttribute(c));if(h4.test(r.tagName)){let c=r.textContent.split(ae),m=c.length-1;if(m>0){r.textContent=Sr?Sr.emptyScript:"";for(let u=0;u<m;u++)r.append(c[u],Vi()),Ae.nextNode(),l.push({type:2,index:++n});r.append(c[m],Vi())}}}else if(r.nodeType===8)if(r.data===Y2)l.push({type:2,index:n});else{let c=-1;for(;(c=r.data.indexOf(ae,c+1))!==-1;)l.push({type:7,index:n}),c+=ae.length-1}n++}}static createElement(a,e){let i=qe.createElement("template");return i.innerHTML=a,i}}function Le(a,e,i=a,r){if(e===i1)return e;let n=r!==void 0?i._$Co?.[r]:i._$Cl,t=Ci(e)?void 0:e._$litDirective$;return n?.constructor!==t&&(n?._$AO?.(!1),t===void 0?n=void 0:(n=new t(a),n._$AT(a,i,r)),r!==void 0?(i._$Co??=[])[r]=n:i._$Cl=n),n!==void 0&&(e=Le(a,n._$AS(a,e.values),n,r)),e}class G2{constructor(a,e){this._$AV=[],this._$AN=void 0,this._$AD=a,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(a){let{el:{content:e},parts:i}=this._$AD,r=(a?.creationScope??qe).importNode(e,!0);Ae.currentNode=r;let n=Ae.nextNode(),t=0,o=0,l=i[0];for(;l!==void 0;){if(t===l.index){let s;l.type===2?s=new ii(n,n.nextSibling,this,a):l.type===1?s=new l.ctor(n,l.name,l.strings,this,a):l.type===6&&(s=new e0(n,this,a)),this._$AV.push(s),l=i[++o]}t!==l?.index&&(n=Ae.nextNode(),t++)}return Ae.currentNode=qe,r}p(a){let e=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(a,i,e),e+=i.strings.length-2):i._$AI(a[e])),e++}}class ii{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(a,e,i,r){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=a,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let a=this._$AA.parentNode,e=this._$AM;return e!==void 0&&a?.nodeType===11&&(a=e.parentNode),a}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(a,e=this){a=Le(this,a,e),Ci(a)?a===V||a==null||a===""?(this._$AH!==V&&this._$AR(),this._$AH=V):a!==this._$AH&&a!==i1&&this._(a):a._$litType$!==void 0?this.$(a):a.nodeType!==void 0?this.T(a):s4(a)?this.k(a):this._(a)}O(a){return this._$AA.parentNode.insertBefore(a,this._$AB)}T(a){this._$AH!==a&&(this._$AR(),this._$AH=this.O(a))}_(a){this._$AH!==V&&Ci(this._$AH)?this._$AA.nextSibling.data=a:this.T(qe.createTextNode(a)),this._$AH=a}$(a){let{values:e,_$litType$:i}=a,r=typeof i=="number"?this._$AC(a):(i.el===void 0&&(i.el=Wi.createElement(u4(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{let n=new G2(r,this),t=n.u(this.options);n.p(e),this.T(t),this._$AH=n}}_$AC(a){let e=l4.get(a.strings);return e===void 0&&l4.set(a.strings,e=new Wi(a)),e}k(a){X2(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,r=0;for(let n of a)r===e.length?e.push(i=new ii(this.O(Vi()),this.O(Vi()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(a=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);a&&a!==this._$AB;){let i=a.nextSibling;a.remove(),a=i}}setConnected(a){this._$AM===void 0&&(this._$Cv=a,this._$AP?.(a))}}class ri{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(a,e,i,r,n){this.type=1,this._$AH=V,this._$AN=void 0,this.element=a,this.name=e,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=V}_$AI(a,e=this,i,r){let n=this.strings,t=!1;if(n===void 0)a=Le(this,a,e,0),t=!Ci(a)||a!==this._$AH&&a!==i1,t&&(this._$AH=a);else{let o=a,l,s;for(a=n[0],l=0;l<n.length-1;l++)s=Le(this,o[i+l],e,l),s===i1&&(s=this._$AH[l]),t||=!Ci(s)||s!==this._$AH[l],s===V?a=V:a!==V&&(a+=(s??"")+n[l+1]),this._$AH[l]=s}t&&!r&&this.j(a)}j(a){a===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,a??"")}}class U2 extends ri{constructor(){super(...arguments),this.type=3}j(a){this.element[this.name]=a===V?void 0:a}}class _2 extends ri{constructor(){super(...arguments),this.type=4}j(a){this.element.toggleAttribute(this.name,!!a&&a!==V)}}class a0 extends ri{constructor(a,e,i,r,n){super(a,e,i,r,n),this.type=5}_$AI(a,e=this){if((a=Le(this,a,e,0)??V)===i1)return;let i=this._$AH,r=a===V&&i!==V||a.capture!==i.capture||a.once!==i.once||a.passive!==i.passive,n=a!==V&&(i===V||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,a),this._$AH=a}handleEvent(a){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,a):this._$AH.handleEvent(a)}}class e0{constructor(a,e,i){this.element=a,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(a){Le(this,a)}}var c4={M:"$lit$",P:ae,A:Y2,C:1,L:d4,R:G2,D:s4,V:Le,I:ii,H:ri,N:_2,U:a0,B:U2,F:e0},W6=Q2.litHtmlPolyfillSupport;W6?.(Wi,ii),(Q2.litHtmlVersions??=[]).push("3.3.0");var Ir=(a,e,i)=>{let r=i?.renderBefore??e,n=r._$litPart$;if(n===void 0){let t=i?.renderBefore??null;r._$litPart$=n=new ii(e.insertBefore(Vi(),t),t,void 0,i??{})}return n._$AI(a),n};var i0=globalThis;class Ta extends pe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let a=super.createRenderRoot();return this.renderOptions.renderBefore??=a.firstChild,a}update(a){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(a),this._$Do=Ir(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i1}}Ta._$litElement$=!0,Ta.finalized=!0,i0.litElementHydrateSupport?.({LitElement:Ta});var P6=i0.litElementPolyfillSupport;P6?.({LitElement:Ta});(i0.litElementVersions??=[]).push("4.2.0");var T=(a)=>(e,i)=>{i!==void 0?i.addInitializer(()=>{customElements.define(a,e)}):customElements.define(a,e)};var $6={attribute:!0,type:String,converter:Ei,reflect:!1,hasChanged:Rr},D6=(a=$6,e,i)=>{let{kind:r,metadata:n}=i,t=globalThis.litPropertyMetadata.get(n);if(t===void 0&&globalThis.litPropertyMetadata.set(n,t=new Map),r==="setter"&&((a=Object.create(a)).wrapped=!0),t.set(i.name,a),r==="accessor"){let{name:o}=i;return{set(l){let s=e.get.call(this);e.set.call(this,l),this.requestUpdate(o,s,a)},init(l){return l!==void 0&&this.C(o,void 0,a,l),l}}}if(r==="setter"){let{name:o}=i;return function(l){let s=this[o];e.call(this,l),this.requestUpdate(o,s,a)}}throw Error("Unsupported decorator location: "+r)};function w(a){return(e,i)=>typeof i=="object"?D6(a,e,i):((r,n,t)=>{let o=n.hasOwnProperty(t);return n.constructor.createProperty(t,r),o?Object.getOwnPropertyDescriptor(n,t):void 0})(a,e,i)}function F(a){return w({...a,state:!0,attribute:!1})}var ge=(a,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(a,e,i),i);function aa(a,e){return(i,r,n)=>{let t=(o)=>o.renderRoot?.querySelector(a)??null;if(e){let{get:o,set:l}=typeof r=="object"?i:n??(()=>{let s=Symbol();return{get(){return this[s]},set(d){this[s]=d}}})();return ge(i,r,{get(){let s=o.call(this);return s===void 0&&(s=t(this),(s!==null||this.hasUpdated)&&l.call(this,s)),s}})}return ge(i,r,{get(){return t(this)}})}}var B6;function Kr(a){return(e,i)=>ge(e,i,{get(){return(this.renderRoot??(B6??=document.createDocumentFragment())).querySelectorAll(a)}})}var f1={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},m1=(a)=>(...e)=>({_$litDirective$:a,values:e});class p1{constructor(a){}get _$AU(){return this._$AM._$AU}_$AT(a,e,i){this._$Ct=a,this._$AM=e,this._$Ci=i}_$AS(a,e){return this.update(a,e)}update(a,e){return this.render(...e)}}var U=m1(class extends p1{constructor(a){if(super(a),a.type!==f1.ATTRIBUTE||a.name!=="class"||a.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(a){return" "+Object.keys(a).filter((e)=>a[e]).join(" ")+" "}update(a,[e]){if(this.st===void 0){this.st=new Set,a.strings!==void 0&&(this.nt=new Set(a.strings.join(" ").split(/\s/).filter((r)=>r!=="")));for(let r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}let i=a.element.classList;for(let r of this.st)r in e||(i.remove(r),this.st.delete(r));for(let r in e){let n=!!e[r];n===this.st.has(r)||this.nt?.has(r)||(n?(i.add(r),this.st.add(r)):(i.remove(r),this.st.delete(r)))}return i1}});var m4={success:{pattern:[{duration:30,intensity:0.5},{delay:60,duration:40,intensity:1}]},warning:{pattern:[{duration:40,intensity:0.8},{delay:100,duration:40,intensity:0.6}]},error:{pattern:[{duration:40,intensity:0.9},{delay:40,duration:40,intensity:0.9},{delay:40,duration:40,intensity:0.9}]},light:{pattern:[{duration:15,intensity:0.4}]},medium:{pattern:[{duration:25,intensity:0.7}]},heavy:{pattern:[{duration:35,intensity:1}]},soft:{pattern:[{duration:40,intensity:0.5}]},rigid:{pattern:[{duration:10,intensity:1}]},selection:{pattern:[{duration:8,intensity:0.3}]},nudge:{pattern:[{duration:80,intensity:0.8},{delay:80,duration:50,intensity:0.3}]},buzz:{pattern:[{duration:1000,intensity:1}]}},Q6=16,Y6=184,f4=1000,Zr=20;function X6(a){if(typeof a=="number")return{vibrations:[{duration:a}]};if(typeof a=="string"){let e=m4[a];return e?{vibrations:e.pattern.map((i)=>({...i}))}:(console.warn(`[web-haptics] Unknown preset: "${a}"`),null)}if(Array.isArray(a)){if(a.length===0)return{vibrations:[]};if(typeof a[0]=="number"){let e=a,i=[];for(let r=0;r<e.length;r+=2){let n=r>0?e[r-1]:0;i.push({...n>0&&{delay:n},duration:e[r]})}return{vibrations:i}}return{vibrations:a.map((e)=>({...e}))}}return{vibrations:a.pattern.map((e)=>({...e}))}}function N6(a,e){if(e>=1)return[a];if(e<=0)return[];let i=Math.max(1,Math.round(Zr*e)),r=Zr-i,n=[],t=a;for(;t>=Zr;)n.push(i),n.push(r),t-=Zr;if(t>0){let o=Math.max(1,Math.round(t*e));n.push(o);let l=t-o;l>0&&n.push(l)}return n}function G6(a,e){let i=[];for(let r=0;r<a.length;r++){let n=a[r],t=Math.max(0,Math.min(1,n.intensity??e)),o=n.delay??0;o>0&&(i.length>0&&i.length%2===0?i[i.length-1]+=o:(i.length===0&&i.push(0),i.push(o)));let l=N6(n.duration,t);if(l.length===0){i.length>0&&i.length%2===0?i[i.length-1]+=n.duration:n.duration>0&&(i.push(0),i.push(n.duration));continue}for(let s of l)i.push(s)}return i}var U6=0,r0=class a{hapticLabel=null;domInitialized=!1;instanceId;debug;showSwitch;rafId=null;patternResolve=null;audioCtx=null;audioFilter=null;audioGain=null;audioBuffer=null;constructor(e){this.instanceId=++U6,this.debug=e?.debug??!1,this.showSwitch=e?.showSwitch??!1}static isSupported=typeof navigator<"u"&&typeof navigator.vibrate=="function";async trigger(e=[{duration:25,intensity:0.7}],i){let r=X6(e);if(!r)return;let{vibrations:n}=r;if(n.length===0)return;let t=Math.max(0,Math.min(1,i?.intensity??0.5));for(let o of n)if(o.duration>f4&&(o.duration=f4),!Number.isFinite(o.duration)||o.duration<0||o.delay!==void 0&&(!Number.isFinite(o.delay)||o.delay<0)){console.warn("[web-haptics] Invalid vibration values. Durations and delays must be finite non-negative numbers.");return}if(a.isSupported&&navigator.vibrate(G6(n,t)),!a.isSupported||this.debug){if(this.ensureDOM(),!this.hapticLabel)return;this.debug&&await this.ensureAudio(),this.stopPattern();let o=(n[0]?.delay??0)===0;if(o&&(this.hapticLabel.click(),this.debug&&this.audioCtx)){let l=Math.max(0,Math.min(1,n[0].intensity??t));this.playClick(l)}await this.runPattern(n,t,o)}}cancel(){this.stopPattern(),a.isSupported&&navigator.vibrate(0)}destroy(){this.stopPattern(),this.hapticLabel&&(this.hapticLabel.remove(),this.hapticLabel=null,this.domInitialized=!1),this.audioCtx&&(this.audioCtx.close(),this.audioCtx=null,this.audioFilter=null,this.audioGain=null,this.audioBuffer=null)}setDebug(e){this.debug=e,!e&&this.audioCtx&&(this.audioCtx.close(),this.audioCtx=null,this.audioFilter=null,this.audioGain=null,this.audioBuffer=null)}setShowSwitch(e){if(this.showSwitch=e,this.hapticLabel){let i=this.hapticLabel.querySelector("input");this.hapticLabel.style.display=e?"":"none",i&&(i.style.display=e?"":"none")}}stopPattern(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.patternResolve?.(),this.patternResolve=null}runPattern(e,i,r){return new Promise((n)=>{this.patternResolve=n;let t=[],o=0;for(let m of e){let u=Math.max(0,Math.min(1,m.intensity??i)),f=m.delay??0;f>0&&(o+=f,t.push({end:o,isOn:!1,intensity:0})),o+=m.duration,t.push({end:o,isOn:!0,intensity:u})}let l=o,s=0,d=-1,c=(m)=>{s===0&&(s=m);let u=m-s;if(u>=l){this.rafId=null,this.patternResolve=null,n();return}let f=t[0];for(let k of t)if(u<k.end){f=k;break}if(f.isOn){let k=Q6+(1-f.intensity)*Y6;d===-1?(d=m,r||(this.hapticLabel?.click(),this.debug&&this.audioCtx&&this.playClick(f.intensity),r=!0)):m-d>=k&&(this.hapticLabel?.click(),this.debug&&this.audioCtx&&this.playClick(f.intensity),d=m)}this.rafId=requestAnimationFrame(c)};this.rafId=requestAnimationFrame(c)})}playClick(e){if(!this.audioCtx||!this.audioFilter||!this.audioGain||!this.audioBuffer)return;let i=this.audioBuffer.getChannelData(0);for(let o=0;o<i.length;o++)i[o]=(Math.random()*2-1)*Math.exp(-o/25);this.audioGain.gain.value=0.5*e;let r=2000+e*2000,n=1+(Math.random()-0.5)*0.3;this.audioFilter.frequency.value=r*n;let t=this.audioCtx.createBufferSource();t.buffer=this.audioBuffer,t.connect(this.audioFilter),t.onended=()=>t.disconnect(),t.start()}async ensureAudio(){if(!this.audioCtx&&typeof AudioContext<"u"){this.audioCtx=new AudioContext,this.audioFilter=this.audioCtx.createBiquadFilter(),this.audioFilter.type="bandpass",this.audioFilter.frequency.value=4000,this.audioFilter.Q.value=8,this.audioGain=this.audioCtx.createGain(),this.audioFilter.connect(this.audioGain),this.audioGain.connect(this.audioCtx.destination);let e=0.004;this.audioBuffer=this.audioCtx.createBuffer(1,this.audioCtx.sampleRate*e,this.audioCtx.sampleRate);let i=this.audioBuffer.getChannelData(0);for(let r=0;r<i.length;r++)i[r]=(Math.random()*2-1)*Math.exp(-r/25)}this.audioCtx?.state==="suspended"&&await this.audioCtx.resume()}ensureDOM(){if(this.domInitialized||typeof document>"u")return;let e=`web-haptics-${this.instanceId}`,i=document.createElement("label");i.setAttribute("for",e),i.textContent="Haptic feedback",i.style.position="fixed",i.style.bottom="10px",i.style.left="10px",i.style.padding="5px 10px",i.style.backgroundColor="rgba(0, 0, 0, 0.7)",i.style.color="white",i.style.fontFamily="sans-serif",i.style.fontSize="14px",i.style.borderRadius="4px",i.style.zIndex="9999",i.style.userSelect="none",this.hapticLabel=i;let r=document.createElement("input");r.type="checkbox",r.setAttribute("switch",""),r.id=e,r.style.all="initial",r.style.appearance="auto",this.showSwitch||(i.style.display="none",r.style.display="none"),i.appendChild(r),document.body.appendChild(i),this.domInitialized=!0}};class n0{destroyed=!1;haptics=this.createHaptics();constructor(a){a.addController(this)}createHaptics(){if(this.destroyed)return;return new r0({debug:!1,showSwitch:!1})}trigger(a){if(this.destroyed)return;let e=this.haptics??(this.haptics=this.createHaptics());if(!e)return;e.trigger(a).catch(()=>{})}destroy(){this.destroyed=!0,this.haptics?.cancel(),this.haptics?.destroy(),this.haptics=void 0}tap(){this.trigger("selection")}gemReveal(a){if(a>=1.26){this.trigger("medium");return}if(a>=1.122){this.trigger("light");return}this.trigger("selection")}minesGemReveal(a){if(a>=1.26){this.trigger("heavy");return}if(a>=1.122){this.trigger("medium");return}this.trigger("light")}bombImpact(){this.trigger("heavy")}winCelebration(){this.trigger("success")}}function p4(a){return a.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0})}class t0 extends EventTarget{host;_historyData=[];_hasData=null;_isInitialized=!1;_hasNextPage=!1;_initialLoadSize=20;_hasLoadedMore=!1;_clientSeed=null;_hasLoadedClientSeed=!1;constructor(a){super();this.host=a,a.addController(this),setTimeout(()=>{this.preloadHistory(),this.loadClientSeed()},100)}get historyData(){return this._historyData}get hasData(){return this._hasData}get isInitialized(){return this._isInitialized}get hasNextPage(){return this._hasNextPage}get clientSeed(){return this._clientSeed}get hasLoadedClientSeed(){return this._hasLoadedClientSeed}notifyDataChanged(){this.dispatchEvent(new CustomEvent("history-data-changed",{detail:{historyData:this._historyData,hasNextPage:this._hasNextPage,hasData:this._hasData}}))}notifyClientSeedChanged(){this.dispatchEvent(new CustomEvent("client-seed-changed",{detail:{clientSeed:this._clientSeed}}))}async preloadHistory(){if(!this.host.gameData?.baseUrl||!this.host.gameData?.authToken)return;try{let{historyData:a,hasNextPage:e}=await this.fetchHistory(void 0,this._initialLoadSize);this._historyData=a,this._hasData=a.length>0,this._hasNextPage=e,this._isInitialized=!0,this._hasLoadedMore=!1,this.notifyDataChanged()}catch(a){console.error("Failed to preload history:",a),this._isInitialized=!0,this._hasData=null}}async fetchHistory(a,e=5){if(!this.host.gameData?.baseUrl||!this.host.gameData?.authToken)return{historyData:[],hasNextPage:!1};let i=new URL(`${this.host.gameData.baseUrl}/bet/my-bets`);if(i.searchParams.append("limit",e.toString()),a)i.searchParams.append("beforeId",a);let r=await fetch(i.toString(),{headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.host.gameData.authToken}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);let n=await r.json();return{historyData:n.results.map((o)=>({id:`${o.id.slice(0,3)}...${o.id.slice(-3)}`,fullId:o.id,timestamp:p4(new Date(o.succeededAt)),currency:o.currency,bet:Number(o.amount),win:Number(o.payout)})),hasNextPage:!!n.nextCursor}}async refreshHistory(a=!1){try{let e=a&&this._hasLoadedMore?this._historyData.length:this._initialLoadSize,{historyData:i,hasNextPage:r}=await this.fetchHistory(void 0,e);if(this._historyData=i,this._hasData=i.length>0,this._hasNextPage=r,!a)this._hasLoadedMore=!1;this.notifyDataChanged()}catch(e){console.error("Failed to refresh history:",e)}}async loadMore(){if(!this._hasNextPage||this._historyData.length===0)return{historyData:[],hasNextPage:!1};let a=this._historyData[this._historyData.length-1],{historyData:e,hasNextPage:i}=await this.fetchHistory(a.fullId,this._initialLoadSize);return this._historyData=[...this._historyData,...e],this._hasNextPage=i,this._hasLoadedMore=!0,this.notifyDataChanged(),this.dispatchEvent(new CustomEvent("history-loaded-more")),{historyData:e,hasNextPage:i}}addNewBet(a){if(this._historyData.some((i)=>i.fullId===a.id))return;let e={id:`${a.id.slice(0,3)}...${a.id.slice(-3)}`,fullId:a.id,timestamp:p4(new Date),currency:a.currency,bet:Number(a.amount),win:Number(a.payout)};if(!this._hasLoadedMore&&this._historyData.length>=this._initialLoadSize)this._historyData=[e,...this._historyData.slice(0,this._initialLoadSize-1)],this._hasNextPage=!0;else this._historyData=[e,...this._historyData];this._hasData=!0,this.notifyDataChanged()}async loadClientSeed(){if(!this.host.gameData?.baseUrl||!this.host.gameData?.authToken||this._hasLoadedClientSeed)return;try{let a=await fetch(`${this.host.gameData.baseUrl}/provably-fair/my-info`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.host.gameData.authToken}`}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let e=await a.json();this._clientSeed=e.clientSeed,this._hasLoadedClientSeed=!0,this.notifyClientSeedChanged()}catch(a){console.error("Failed to load client seed:",a)}}updateClientSeed(a){this._clientSeed=a,this.notifyClientSeedChanged()}}class o0{destroyed=!1;audioCtx;volume=1;constructor(a){a.addController(this)}setVolume(a){this.volume=a}destroy(){let a=this.audioCtx;if(this.destroyed=!0,this.audioCtx=void 0,a&&a.state!=="closed")a.close().catch(()=>{})}play(a){let e=a.gainScale*this.volume;if(!Number.isFinite(e)||e<=0)return;this.renderLayers(a.layers,e)}ensureAudio(){if(this.destroyed)return;if(this.audioCtx){if(this.audioCtx.state==="suspended")this.audioCtx.resume().catch(()=>{});return}if(typeof AudioContext==="undefined")return;try{this.audioCtx=new AudioContext}catch{return}if(this.audioCtx.state==="suspended")this.audioCtx.resume().catch(()=>{})}renderLayers(a,e){this.ensureAudio();let i=this.audioCtx;if(!i)return;let r=i.currentTime;for(let n of a)if(n.kind==="noise")this.renderNoiseLayer(i,r,n,e);else this.renderToneLayer(i,r,n,e)}renderNoiseLayer(a,e,i,r){let n=a.sampleRate,t=a.createBuffer(1,Math.round(n*i.duration),n),o=t.getChannelData(0);for(let c=0;c<o.length;c++)o[c]=(Math.random()*2-1)*Math.exp(-c/i.decay);let l=a.createBiquadFilter();if(l.type=i.filterType,i.filterFreqEnd!==void 0&&i.filterFreqRampTime!==void 0)l.frequency.setValueAtTime(i.filterFreq*(1+(Math.random()-0.5)*i.randomization),e),l.frequency.exponentialRampToValueAtTime(i.filterFreqEnd,e+i.filterFreqRampTime);else l.frequency.value=i.filterFreq*(1+(Math.random()-0.5)*i.randomization);l.Q.value=i.filterQ;let s=a.createGain();s.gain.value=i.gain*r;let d=a.createBufferSource();d.buffer=t,d.connect(l).connect(s).connect(a.destination),d.onended=()=>{d.disconnect(),l.disconnect(),s.disconnect()},d.start(e)}renderToneLayer(a,e,i,r){let n=e+(i.startOffset??0),t=a.createOscillator();if(t.type=i.waveform,i.frequencyEnd!==void 0&&i.frequencyRampTime!==void 0)t.frequency.setValueAtTime(i.frequency,n),t.frequency.exponentialRampToValueAtTime(i.frequencyEnd,n+i.frequencyRampTime);else t.frequency.value=i.frequency;let o=a.createGain(),l=i.gain;if(l.envelope==="peak-decay")o.gain.setValueAtTime(l.peak*r,n),o.gain.exponentialRampToValueAtTime(0.001,n+l.decayTime);else if(l.envelope==="attack-decay")o.gain.setValueAtTime(0.001,n),o.gain.linearRampToValueAtTime(l.peak*r,n+l.attackTime),o.gain.exponentialRampToValueAtTime(0.001,n+l.decayTime);else o.gain.setValueAtTime(0.001,n),o.gain.setValueAtTime(0.001,n+l.holdTime),o.gain.linearRampToValueAtTime(l.peak*r,n+l.attackEndTime),o.gain.exponentialRampToValueAtTime(0.001,n+l.decayTime);t.connect(o).connect(a.destination),t.start(n),t.stop(n+i.duration),t.onended=()=>{t.disconnect(),o.disconnect()}}}var wa="USD";var g4=[1,2,3,4,8];var g1=2,w4=["ROULETTE","BACCARAT"];class P extends Ta{static componentStyles=[];emit(a,e){let i=new CustomEvent(a,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...e});return this.dispatchEvent(i),i}}var ic=_1("language"),W="en";var g7={ar:()=>Promise.resolve().then(() => va(l0(),1)),de:()=>Promise.resolve().then(() => va(s0(),1)),en:()=>Promise.resolve().then(() => va(h0(),1)),"en-soc":()=>Promise.resolve().then(() => va(u0(),1)),es:()=>Promise.resolve().then(() => va(d0(),1)),fi:()=>Promise.resolve().then(() => va(c0(),1)),fr:()=>Promise.resolve().then(() => va(f0(),1)),hi:()=>Promise.resolve().then(() => va(m0(),1)),id:()=>Promise.resolve().then(() => va(p0(),1)),ja:()=>Promise.resolve().then(() => va(g0(),1)),ko:()=>Promise.resolve().then(() => va(w0(),1)),pl:()=>Promise.resolve().then(() => va(k0(),1)),pt:()=>Promise.resolve().then(() => va(v0(),1)),ru:()=>Promise.resolve().then(() => va(b0(),1)),tr:()=>Promise.resolve().then(() => va(z0(),1)),vi:()=>Promise.resolve().then(() => va(y0(),1)),zh:()=>Promise.resolve().then(() => va(x0(),1))};class k4{loadedLanguages=new Set;loadingPromises=new Map;loadedTranslations=new Map;async loadLanguage(a){if(this.loadedLanguages.has(a))return;if(this.loadingPromises.has(a))return this.loadingPromises.get(a);let e=this.loadLanguageModule(a);this.loadingPromises.set(a,e);try{await e,this.loadedLanguages.add(a)}finally{this.loadingPromises.delete(a)}}getTranslationData(a){return this.loadedTranslations.get(a)||null}isLanguageLoaded(a){return this.loadedLanguages.has(a)}getLoadedLanguages(){return Array.from(this.loadedLanguages)}async preloadLanguages(a){let e=a.map((i)=>this.loadLanguage(i).catch(()=>{}));await Promise.all(e)}clearAll(){this.loadedLanguages.clear(),this.loadingPromises.clear(),this.loadedTranslations.clear(),H0()}async loadLanguageModule(a){try{let e=await g7[a]();this.loadedTranslations.set(a,e.default),H0()}catch(e){throw e}}}var Pi=new k4;Pi.loadLanguage(W).catch(()=>{});var b4=va(l0(),1),z4=va(s0(),1),y4=va(h0(),1),x4=va(u0(),1),H4=va(d0(),1),R4=va(c0(),1),S4=va(f0(),1),I4=va(m0(),1),K4=va(p0(),1),Z4=va(g0(),1),O4=va(w0(),1),M4=va(k0(),1),j4=va(v0(),1),F4=va(b0(),1),A4=va(z0(),1),q4=va(y0(),1),L4=va(x0(),1);var R0={ar:b4.default,de:z4.default,en:y4.default,"en-soc":x4.default,es:H4.default,fi:R4.default,fr:S4.default,hi:I4.default,id:K4.default,ja:Z4.default,ko:O4.default,pl:M4.default,pt:j4.default,ru:F4.default,tr:A4.default,vi:q4.default,zh:L4.default};function w7(a){let e=Pi.getTranslationData(a);if(e)return e;return R0[a]||R0[W]}var Zc=_1(Symbol("translation"));class T4{cache=new Map;maxSize=1000;get(a){return this.cache.get(a)}set(a,e){if(this.cache.size>=this.maxSize)this.cache.clear();this.cache.set(a,e)}clear(){this.cache.clear()}size(){return this.cache.size}}var S0=new T4,v4=new Map;function k7(a){let e=v4.get(a);if(!e)e=a.split("."),v4.set(a,e);return e}function E4(a,e,i){let r=w7(e);try{let n=k7(a),t=r;for(let o of n)if(t=t?.[o],t===void 0)break;if(typeof t==="string")return t;if(e!==W)return E4(a,W,i);return i||a}catch{return i||a}}function R(a,e=W,i){let r=i?`${a}:${e}:${i}`:`${a}:${e}`,n=S0.get(r);if(n!==void 0)return n;let t=E4(a,e,i);return S0.set(r,t),t}function H0(){S0.clear()}var ia={betAmount:"0.00",scale:1,updateBetAmount:()=>{},updateBalance:()=>{},currency:wa,currencyDecimals:2,showCurrencyAsText:!1,balance:0,baseUrl:"",authToken:"",publicKey:"",hotkeysOpenEnabled:!1,showMaxBetButton:!1,volume:100,instantBetEnabled:!1,mainWidth:0,updateMainWidth:()=>{},updateHotkeysOpenEnabled:()=>{},updateShowMaxBetButton:()=>{},updateVolume:()=>{},updateInstantBetEnabled:()=>{},language:W,seasonTheme:"DEFAULT",autobetNumberOfBets:0,updateAutobetNumberOfBets:()=>{},soundEffects:void 0,historyController:void 0,haptics:void 0,lobbyUrl:"https://betorigami.com",depositUrl:void 0,hasLoadedBalance:!1,maxPayout:null,minBet:null,maxBet:null,edge:2,footerPosition:"BELOW",logoUrl:null,alwaysEnableMaxBetButton:!1,gcCurrencyIconSvgUrl:null,scCurrencyIconSvgUrl:null,customMinesBackgroundSvgUrl:null,customMinesGemSvgUrl:null,customMinesBombSvgUrl:null,customMinesTileSvgUrl:null,customMinesAutobetSelectedTileSvgUrl:null,customKenoBackgroundSvgUrl:null,customKenoGemSvgUrl:null,customKenoNonMatchTileSvgUrl:null,customKenoTileSvgUrl:null,customKenoSelectedTileSvgUrl:null,customRouletteBackgroundSvgUrl:null,roulettePreventOppositeBets:!1,customDiceBackgroundSvgUrl:null,diceMinMultiplier:null,advancedDiceMinMultiplier:null,customAdvancedDiceBackgroundSvgUrl:null,customPlinkoBackgroundSvgUrl:null,customPlinkoEdgeColor:null,customPlinkoCenterColor:null,customBaccaratBackgroundSvgUrl:null,baccaratPreventOppositeBets:!1,customLimboBackgroundSvgUrl:null,customWheelBackgroundSvgUrl:null,customWheelCenterSvgUrl:null,customWheelCenterPadding:null,customDiamondsBackgroundSvgUrl:null,customBlackjackBackgroundSvgUrl:null,customBlitzBackgroundSvgUrl:null,blitzMinPickCount:null,blitzMaxPickCount:null,customCardBackSvgUrl:null,customCardRedColor:null,customCardBlackColor:null,customFooterLobbySvgUrl:null,customFooterVolumeSvgUrl:null,customFooterGameInfoSvgUrl:null,customFooterInstantBetSvgUrl:null,customFooterHotkeysSvgUrl:null,customFooterProvablyFairSvgUrl:null},N=_1(Symbol("game"));var J4=C`
|
|
40
40
|
:host {
|
|
41
41
|
display: block;
|
|
42
42
|
height: 100vh;
|
|
@@ -74,7 +74,7 @@ var Z6=Object.create;var{getPrototypeOf:O6,defineProperty:Xt,getOwnPropertyNames
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
`;var v7=20,b7=1,Te=1e6,V4=1e6,z7=-7,y7=21,x7=!1,$i="[big.js] ",Ee=$i+"Invalid ",Or=Ee+"decimal places",H7=Ee+"rounding mode",C4=$i+"Division by zero",Ka={},P1=void 0,R7=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function W4(){function a(e){var i=this;if(!(i instanceof a))return e===P1&&arguments.length===0?W4():new a(e);if(e instanceof a)i.s=e.s,i.e=e.e,i.c=e.c.slice();else{if(typeof e!=="string"){if(a.strict===!0&&typeof e!=="bigint")throw TypeError(Ee+"value");e=e===0&&1/e<0?"-0":String(e)}S7(i,e)}i.constructor=a}return a.prototype=Ka,a.DP=v7,a.RM=b7,a.NE=z7,a.PE=y7,a.strict=x7,a.roundDown=0,a.roundHalfUp=1,a.roundHalfEven=2,a.roundUp=3,a}function S7(a,e){var i,r,n;if(!R7.test(e))throw Error(Ee+"number");if(a.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(i=e.indexOf("."))>-1)e=e.replace(".","");if((r=e.search(/e/i))>0){if(i<0)i=r;i+=+e.slice(r+1),e=e.substring(0,r)}else if(i<0)i=e.length;n=e.length;for(r=0;r<n&&e.charAt(r)=="0";)++r;if(r==n)a.c=[a.e=0];else{for(;n>0&&e.charAt(--n)=="0";);a.e=i-r-1,a.c=[];for(i=0;r<=n;)a.c[i++]=+e.charAt(r++)}return a}function Je(a,e,i,r){var n=a.c;if(i===P1)i=a.constructor.RM;if(i!==0&&i!==1&&i!==2&&i!==3)throw Error(H7);if(e<1)if(r=i===3&&(r||!!n[0])||e===0&&(i===1&&n[0]>=5||i===2&&(n[0]>5||n[0]===5&&(r||n[1]!==P1))),n.length=1,r)a.e=a.e-e+1,n[0]=1;else n[0]=a.e=0;else if(e<n.length){if(r=i===1&&n[e]>=5||i===2&&(n[e]>5||n[e]===5&&(r||n[e+1]!==P1||n[e-1]&1))||i===3&&(r||!!n[0]),n.length=e,r){for(;++n[--e]>9;)if(n[e]=0,e===0){++a.e,n.unshift(1);break}}for(e=n.length;!n[--e];)n.pop()}return a}function Ve(a,e,i){var r=a.e,n=a.c.join(""),t=n.length;if(e)n=n.charAt(0)+(t>1?"."+n.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)n="0"+n;n="0."+n}else if(r>0){if(++r>t)for(r-=t;r--;)n+="0";else if(r<t)n=n.slice(0,r)+"."+n.slice(r)}else if(t>1)n=n.charAt(0)+"."+n.slice(1);return a.s<0&&i?"-"+n:n}Ka.abs=function(){var a=new this.constructor(this);return a.s=1,a};Ka.cmp=function(a){var e,i=this,r=i.c,n=(a=new i.constructor(a)).c,t=i.s,o=a.s,l=i.e,s=a.e;if(!r[0]||!n[0])return!r[0]?!n[0]?0:-o:t;if(t!=o)return t;if(e=t<0,l!=s)return l>s^e?1:-1;o=(l=r.length)<(s=n.length)?l:s;for(t=-1;++t<o;)if(r[t]!=n[t])return r[t]>n[t]^e?1:-1;return l==s?0:l>s^e?1:-1};Ka.div=function(a){var e=this,i=e.constructor,r=e.c,n=(a=new i(a)).c,t=e.s==a.s?1:-1,o=i.DP;if(o!==~~o||o<0||o>Te)throw Error(Or);if(!n[0])throw Error(C4);if(!r[0])return a.s=t,a.c=[a.e=0],a;var l,s,d,c,m,u=n.slice(),f=l=n.length,k=r.length,p=r.slice(0,l),H=p.length,z=a,v=z.c=[],g=0,b=o+(z.e=e.e-a.e)+1;z.s=t,t=b<0?0:b,u.unshift(0);for(;H++<l;)p.push(0);do{for(d=0;d<10;d++){if(l!=(H=p.length))c=l>H?1:-1;else for(m=-1,c=0;++m<l;)if(n[m]!=p[m]){c=n[m]>p[m]?1:-1;break}if(c<0){for(s=H==l?n:u;H;){if(p[--H]<s[H]){m=H;for(;m&&!p[--m];)p[m]=9;--p[m],p[H]+=10}p[H]-=s[H]}for(;!p[0];)p.shift()}else break}if(v[g++]=c?d:++d,p[0]&&c)p[H]=r[f]||0;else p=[r[f]]}while((f++<k||p[0]!==P1)&&t--);if(!v[0]&&g!=1)v.shift(),z.e--,b--;if(g>b)Je(z,b,i.RM,p[0]!==P1);return z};Ka.eq=function(a){return this.cmp(a)===0};Ka.gt=function(a){return this.cmp(a)>0};Ka.gte=function(a){return this.cmp(a)>-1};Ka.lt=function(a){return this.cmp(a)<0};Ka.lte=function(a){return this.cmp(a)<1};Ka.minus=Ka.sub=function(a){var e,i,r,n,t=this,o=t.constructor,l=t.s,s=(a=new o(a)).s;if(l!=s)return a.s=-s,t.plus(a);var d=t.c.slice(),c=t.e,m=a.c,u=a.e;if(!d[0]||!m[0]){if(m[0])a.s=-s;else if(d[0])a=new o(t);else a.s=1;return a}if(l=c-u){if(n=l<0)l=-l,r=d;else u=c,r=m;r.reverse();for(s=l;s--;)r.push(0);r.reverse()}else{i=((n=d.length<m.length)?d:m).length;for(l=s=0;s<i;s++)if(d[s]!=m[s]){n=d[s]<m[s];break}}if(n)r=d,d=m,m=r,a.s=-a.s;if((s=(i=m.length)-(e=d.length))>0)for(;s--;)d[e++]=0;for(s=e;i>l;){if(d[--i]<m[i]){for(e=i;e&&!d[--e];)d[e]=9;--d[e],d[i]+=10}d[i]-=m[i]}for(;d[--s]===0;)d.pop();for(;d[0]===0;)d.shift(),--u;if(!d[0])a.s=1,d=[u=0];return a.c=d,a.e=u,a};Ka.mod=function(a){var e,i=this,r=i.constructor,n=i.s,t=(a=new r(a)).s;if(!a.c[0])throw Error(C4);if(i.s=a.s=1,e=a.cmp(i)==1,i.s=n,a.s=t,e)return new r(i);return n=r.DP,t=r.RM,r.DP=r.RM=0,i=i.div(a),r.DP=n,r.RM=t,this.minus(i.times(a))};Ka.neg=function(){var a=new this.constructor(this);return a.s=-a.s,a};Ka.plus=Ka.add=function(a){var e,i,r,n=this,t=n.constructor;if(a=new t(a),n.s!=a.s)return a.s=-a.s,n.minus(a);var{e:o,c:l}=n,s=a.e,d=a.c;if(!l[0]||!d[0]){if(!d[0])if(l[0])a=new t(n);else a.s=n.s;return a}if(l=l.slice(),e=o-s){if(e>0)s=o,r=d;else e=-e,r=l;r.reverse();for(;e--;)r.push(0);r.reverse()}if(l.length-d.length<0)r=d,d=l,l=r;e=d.length;for(i=0;e;l[e]%=10)i=(l[--e]=l[e]+d[e]+i)/10|0;if(i)l.unshift(i),++s;for(e=l.length;l[--e]===0;)l.pop();return a.c=l,a.e=s,a};Ka.pow=function(a){var e=this,i=new e.constructor("1"),r=i,n=a<0;if(a!==~~a||a<-V4||a>V4)throw Error(Ee+"exponent");if(n)a=-a;for(;;){if(a&1)r=r.times(e);if(a>>=1,!a)break;e=e.times(e)}return n?i.div(r):r};Ka.prec=function(a,e){if(a!==~~a||a<1||a>Te)throw Error(Ee+"precision");return Je(new this.constructor(this),a,e)};Ka.round=function(a,e){if(a===P1)a=0;else if(a!==~~a||a<-Te||a>Te)throw Error(Or);return Je(new this.constructor(this),a+this.e+1,e)};Ka.sqrt=function(){var a,e,i,r=this,n=r.constructor,t=r.s,o=r.e,l=new n("0.5");if(!r.c[0])return new n(r);if(t<0)throw Error($i+"No square root");if(t=Math.sqrt(+Ve(r,!0,!0)),t===0||t===1/0){if(e=r.c.join(""),!(e.length+o&1))e+="0";t=Math.sqrt(e),o=((o+1)/2|0)-(o<0||o&1),a=new n((t==1/0?"5e":(t=t.toExponential()).slice(0,t.indexOf("e")+1))+o)}else a=new n(t+"");o=a.e+(n.DP+=4);do i=a,a=l.times(i.plus(r.div(i)));while(i.c.slice(0,o).join("")!==a.c.slice(0,o).join(""));return Je(a,(n.DP-=4)+a.e+1,n.RM)};Ka.times=Ka.mul=function(a){var e,i=this,r=i.constructor,n=i.c,t=(a=new r(a)).c,o=n.length,l=t.length,s=i.e,d=a.e;if(a.s=i.s==a.s?1:-1,!n[0]||!t[0])return a.c=[a.e=0],a;if(a.e=s+d,o<l)e=n,n=t,t=e,d=o,o=l,l=d;for(e=new Array(d=o+l);d--;)e[d]=0;for(s=l;s--;){l=0;for(d=o+s;d>s;)l=e[d]+t[s]*n[d-s-1]+l,e[d--]=l%10,l=l/10|0;e[d]=l}if(l)++a.e;else e.shift();for(s=e.length;!e[--s];)e.pop();return a.c=e,a};Ka.toExponential=function(a,e){var i=this,r=i.c[0];if(a!==P1){if(a!==~~a||a<0||a>Te)throw Error(Or);i=Je(new i.constructor(i),++a,e);for(;i.c.length<a;)i.c.push(0)}return Ve(i,!0,!!r)};Ka.toFixed=function(a,e){var i=this,r=i.c[0];if(a!==P1){if(a!==~~a||a<0||a>Te)throw Error(Or);i=Je(new i.constructor(i),a+i.e+1,e);for(a=a+i.e+1;i.c.length<a;)i.c.push(0)}return Ve(i,!1,!!r)};Ka.toJSON=Ka.toString=function(){var a=this,e=a.constructor;return Ve(a,a.e<=e.NE||a.e>=e.PE,!!a.c[0])};if(typeof Symbol!=="undefined")Ka[Symbol.for("nodejs.util.inspect.custom")]=Ka.toJSON;Ka.toNumber=function(){var a=+Ve(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(a.toString()))throw Error($i+"Imprecise conversion");return a};Ka.toPrecision=function(a,e){var i=this,r=i.constructor,n=i.c[0];if(a!==P1){if(a!==~~a||a<1||a>Te)throw Error(Ee+"precision");i=Je(new r(i),a,e);for(;i.c.length<a;)i.c.push(0)}return Ve(i,a<=i.e||i.e<=r.NE||i.e>=r.PE,!!n)};Ka.valueOf=function(){var a=this,e=a.constructor;if(e.strict===!0)throw Error($i+"valueOf disallowed");return Ve(a,a.e<=e.NE||a.e>=e.PE,!0)};var ee=W4(),I=ee;class Mr extends P{constructor(){super(...arguments);this.currency=wa;this.balance=ia.balance;this.currencyDecimals=ia.currencyDecimals;this.baseUrl=ia.baseUrl;this.authToken=ia.authToken;this.origamiGame="DICE";this.lobbyUrl=ia.lobbyUrl;this.depositUrl=ia.depositUrl;this.maxPayout=ia.maxPayout;this.minBet=ia.minBet;this.maxBet=ia.maxBet;this.edge=ia.edge;this.showCurrencyAsText=!1;this.footerPosition=ia.footerPosition;this.logoUrl=null;this.seasonTheme="DEFAULT";this.alwaysEnableMaxBetButton=ia.alwaysEnableMaxBetButton;this.gcCurrencyIconSvgUrl=ia.gcCurrencyIconSvgUrl;this.scCurrencyIconSvgUrl=ia.scCurrencyIconSvgUrl;this.customMinesBackgroundSvgUrl=ia.customMinesBackgroundSvgUrl;this.customMinesGemSvgUrl=ia.customMinesGemSvgUrl;this.customMinesBombSvgUrl=ia.customMinesBombSvgUrl;this.customMinesTileSvgUrl=ia.customMinesTileSvgUrl;this.customMinesAutobetSelectedTileSvgUrl=ia.customMinesAutobetSelectedTileSvgUrl;this.customKenoBackgroundSvgUrl=ia.customKenoBackgroundSvgUrl;this.customKenoGemSvgUrl=ia.customKenoGemSvgUrl;this.customKenoNonMatchTileSvgUrl=ia.customKenoNonMatchTileSvgUrl;this.customKenoTileSvgUrl=ia.customKenoTileSvgUrl;this.customKenoSelectedTileSvgUrl=ia.customKenoSelectedTileSvgUrl;this.customRouletteBackgroundSvgUrl=ia.customRouletteBackgroundSvgUrl;this.roulettePreventOppositeBets=ia.roulettePreventOppositeBets;this.rouletteDefaultInstantBet=!1;this.customDiceBackgroundSvgUrl=ia.customDiceBackgroundSvgUrl;this.diceMinMultiplier=ia.diceMinMultiplier;this.advancedDiceMinMultiplier=ia.advancedDiceMinMultiplier;this.customAdvancedDiceBackgroundSvgUrl=ia.customAdvancedDiceBackgroundSvgUrl;this.customPlinkoBackgroundSvgUrl=ia.customPlinkoBackgroundSvgUrl;this.customPlinkoEdgeColor=ia.customPlinkoEdgeColor;this.customPlinkoCenterColor=ia.customPlinkoCenterColor;this.customBaccaratBackgroundSvgUrl=ia.customBaccaratBackgroundSvgUrl;this.baccaratPreventOppositeBets=ia.baccaratPreventOppositeBets;this.customLimboBackgroundSvgUrl=ia.customLimboBackgroundSvgUrl;this.customWheelBackgroundSvgUrl=ia.customWheelBackgroundSvgUrl;this.customWheelCenterSvgUrl=ia.customWheelCenterSvgUrl;this.customWheelCenterPadding=ia.customWheelCenterPadding;this.customDiamondsBackgroundSvgUrl=ia.customDiamondsBackgroundSvgUrl;this.customBlackjackBackgroundSvgUrl=ia.customBlackjackBackgroundSvgUrl;this.blitzMinPickCount=ia.blitzMinPickCount;this.blitzMaxPickCount=ia.blitzMaxPickCount;this.customCardBackSvgUrl=ia.customCardBackSvgUrl;this.customCardRedColor=ia.customCardRedColor;this.customCardBlackColor=ia.customCardBlackColor;this.customFooterLobbySvgUrl=ia.customFooterLobbySvgUrl;this.customFooterVolumeSvgUrl=ia.customFooterVolumeSvgUrl;this.customFooterGameInfoSvgUrl=ia.customFooterGameInfoSvgUrl;this.customFooterInstantBetSvgUrl=ia.customFooterInstantBetSvgUrl;this.customFooterHotkeysSvgUrl=ia.customFooterHotkeysSvgUrl;this.customFooterProvablyFairSvgUrl=ia.customFooterProvablyFairSvgUrl;this.betAmount=ia.betAmount;this.autobetNumberOfBets=ia.autobetNumberOfBets;this.hotkeysOpenEnabled=!1;this.showMaxBetButton=ia.showMaxBetButton;this.volume=ia.volume;this.instantBetEnabled=ia.instantBetEnabled;this.mainWidth=ia.mainWidth;this.publicKey=ia.publicKey;this.scale=1;this.language=ia.language;this.hasLoadedBalance=!1}static styles=[J4];_soundEffects=new o0(this);_historyController=new t0(this);_haptics=new n0(this);_resizeObserver=null;_gameProvider=new je(this,{context:N,initialValue:this.createGameContextValue()});connectedCallback(){if(super.connectedCallback(),this.rouletteDefaultInstantBet&&this.origamiGame==="ROULETTE")this.instantBetEnabled=!0;this.updateProviderValue(),this.fetchBalance(),this.fetchPublicKey(),this.setupResizeObserver(),this.calculateScale(),this.updateMainWidth(document.documentElement.clientWidth)}async firstUpdated(a){if(super.firstUpdated(a),await this.updateComplete,!w4.includes(this.origamiGame))this.updateBetAmount(I(this.minBet??0))}disconnectedCallback(){super.disconnectedCallback(),this.cleanupResizeObserver(),this._soundEffects.destroy(),this._haptics.destroy()}updated(a){if(super.updated(a),a.has("currency")||a.has("balance")||a.has("baseUrl")||a.has("showCurrencyAsText")||a.has("authToken")||a.has("hotkeysOpenEnabled")||a.has("volume")||a.has("instantBetEnabled")||a.has("showMaxBetButton")||a.has("mainWidth")||a.has("footerPosition")||a.has("logoUrl")||a.has("scale")||a.has("seasonTheme")||a.has("customMinesGemSvgUrl")||a.has("customMinesBombSvgUrl")||a.has("customKenoGemSvgUrl")||a.has("edge")||a.has("language")||a.has("maxPayout")||a.has("minBet")||a.has("maxBet")||a.has("depositUrl")||a.has("currencyDecimals")||a.has("lobbyUrl")||a.has("roulettePreventOppositeBets")||a.has("alwaysEnableMaxBetButton")||a.has("gcCurrencyIconSvgUrl")||a.has("scCurrencyIconSvgUrl")||a.has("customMinesBackgroundSvgUrl")||a.has("customMinesTileSvgUrl")||a.has("customMinesAutobetSelectedTileSvgUrl")||a.has("customKenoBackgroundSvgUrl")||a.has("customKenoNonMatchTileSvgUrl")||a.has("customKenoTileSvgUrl")||a.has("customKenoSelectedTileSvgUrl")||a.has("customRouletteBackgroundSvgUrl")||a.has("customDiceBackgroundSvgUrl")||a.has("diceMinMultiplier")||a.has("advancedDiceMinMultiplier")||a.has("customAdvancedDiceBackgroundSvgUrl")||a.has("customPlinkoBackgroundSvgUrl")||a.has("customPlinkoEdgeColor")||a.has("customPlinkoCenterColor")||a.has("customBaccaratBackgroundSvgUrl")||a.has("baccaratPreventOppositeBets")||a.has("customLimboBackgroundSvgUrl")||a.has("customWheelBackgroundSvgUrl")||a.has("customWheelCenterSvgUrl")||a.has("customWheelCenterPadding")||a.has("customDiamondsBackgroundSvgUrl")||a.has("customBlackjackBackgroundSvgUrl")||a.has("blitzMinPickCount")||a.has("blitzMaxPickCount")||a.has("customCardBackSvgUrl")||a.has("customCardRedColor")||a.has("customCardBlackColor")||a.has("customFooterLobbySvgUrl")||a.has("customFooterVolumeSvgUrl")||a.has("customFooterGameInfoSvgUrl")||a.has("customFooterInstantBetSvgUrl")||a.has("customFooterHotkeysSvgUrl")||a.has("customFooterProvablyFairSvgUrl"))this.updateProviderValue()}get gameData(){return this._gameProvider.value}createGameContextValue(){return{betAmount:this.betAmount,updateBetAmount:this.updateBetAmount.bind(this),updateBalance:this.updateBalance.bind(this),currency:this.currency,showCurrencyAsText:this.showCurrencyAsText,currencyDecimals:this.currencyDecimals,lobbyUrl:this.lobbyUrl,depositUrl:this.depositUrl,maxPayout:this.maxPayout,minBet:this.minBet,maxBet:this.maxBet,edge:this.edge,balance:this.balance,hasLoadedBalance:this.hasLoadedBalance,baseUrl:this.baseUrl,authToken:this.authToken,publicKey:this.publicKey,autobetNumberOfBets:this.autobetNumberOfBets,hotkeysOpenEnabled:this.hotkeysOpenEnabled,showMaxBetButton:this.showMaxBetButton,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundEffects:this._soundEffects,historyController:this._historyController,haptics:this._haptics,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateShowMaxBetButton:this.updateShowMaxBetButton.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this),updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this),mainWidth:this.mainWidth,updateMainWidth:this.updateMainWidth.bind(this),language:this.language,footerPosition:this.footerPosition,logoUrl:this.logoUrl,scale:this.scale,seasonTheme:this.seasonTheme,alwaysEnableMaxBetButton:this.alwaysEnableMaxBetButton,gcCurrencyIconSvgUrl:this.gcCurrencyIconSvgUrl,scCurrencyIconSvgUrl:this.scCurrencyIconSvgUrl,customMinesBackgroundSvgUrl:this.customMinesBackgroundSvgUrl,customMinesGemSvgUrl:this.customMinesGemSvgUrl,customMinesBombSvgUrl:this.customMinesBombSvgUrl,customMinesTileSvgUrl:this.customMinesTileSvgUrl,customMinesAutobetSelectedTileSvgUrl:this.customMinesAutobetSelectedTileSvgUrl,customKenoBackgroundSvgUrl:this.customKenoBackgroundSvgUrl,customKenoGemSvgUrl:this.customKenoGemSvgUrl,customKenoNonMatchTileSvgUrl:this.customKenoNonMatchTileSvgUrl,customKenoTileSvgUrl:this.customKenoTileSvgUrl,customKenoSelectedTileSvgUrl:this.customKenoSelectedTileSvgUrl,customRouletteBackgroundSvgUrl:this.customRouletteBackgroundSvgUrl,roulettePreventOppositeBets:this.roulettePreventOppositeBets,customDiceBackgroundSvgUrl:this.customDiceBackgroundSvgUrl,diceMinMultiplier:this.diceMinMultiplier,advancedDiceMinMultiplier:this.advancedDiceMinMultiplier,customAdvancedDiceBackgroundSvgUrl:this.customAdvancedDiceBackgroundSvgUrl,customPlinkoBackgroundSvgUrl:this.customPlinkoBackgroundSvgUrl,customPlinkoEdgeColor:this.customPlinkoEdgeColor,customPlinkoCenterColor:this.customPlinkoCenterColor,customBaccaratBackgroundSvgUrl:this.customBaccaratBackgroundSvgUrl,baccaratPreventOppositeBets:this.baccaratPreventOppositeBets,customLimboBackgroundSvgUrl:this.customLimboBackgroundSvgUrl,customWheelBackgroundSvgUrl:this.customWheelBackgroundSvgUrl,customWheelCenterSvgUrl:this.customWheelCenterSvgUrl,customWheelCenterPadding:this.customWheelCenterPadding,customDiamondsBackgroundSvgUrl:this.customDiamondsBackgroundSvgUrl,customBlackjackBackgroundSvgUrl:this.customBlackjackBackgroundSvgUrl,blitzMaxPickCount:this.blitzMaxPickCount,blitzMinPickCount:this.blitzMinPickCount,customCardBackSvgUrl:this.customCardBackSvgUrl,customCardRedColor:this.customCardRedColor,customCardBlackColor:this.customCardBlackColor,customFooterLobbySvgUrl:this.customFooterLobbySvgUrl,customFooterVolumeSvgUrl:this.customFooterVolumeSvgUrl,customFooterGameInfoSvgUrl:this.customFooterGameInfoSvgUrl,customFooterInstantBetSvgUrl:this.customFooterInstantBetSvgUrl,customFooterHotkeysSvgUrl:this.customFooterHotkeysSvgUrl,customFooterProvablyFairSvgUrl:this.customFooterProvablyFairSvgUrl}}updateProviderValue(){this._gameProvider.setValue(this.createGameContextValue())}fetchBalance=async()=>{if(!this.authToken||!this.baseUrl){this.balance=1000,this.hasLoadedBalance=!0,this.updateProviderValue();return}try{let a=await fetch(`${this.baseUrl}/users/balance?currency=${this.currency}&origamiGame=${this.origamiGame}`,{headers:{Authorization:`Bearer ${this.authToken}`,"Content-Type":"application/json"}});if(!a.ok){console.error("Failed to fetch balance:",a.statusText),this.hasLoadedBalance=!0;return}let e=await a.json();this.balance=I(e.balance).toNumber(),this.hasLoadedBalance=!0,this.updateProviderValue()}catch(a){console.error("Error fetching balance:",a),this.hasLoadedBalance=!0}};fetchPublicKey=async()=>{if(!this.authToken||!this.baseUrl)return;let a=await fetch(`${this.baseUrl}/provably-fair/public-key`);if(!a.ok){console.error("Failed to fetch public key:",a.statusText);return}let e=await a.json();this.publicKey=e.publicKey};updateHotkeysOpenEnabled(a){this.hotkeysOpenEnabled=a,this.updateProviderValue()}updateShowMaxBetButton(a){this.showMaxBetButton=a,this.updateProviderValue()}updateVolume(a){this.volume=a,this._soundEffects.setVolume(a/100),this.updateProviderValue()}updateInstantBetEnabled(a){this.instantBetEnabled=a,this.updateProviderValue()}updateAutobetNumberOfBets(a){this.autobetNumberOfBets=a,this.updateProviderValue()}updateMainWidth(a){this.mainWidth=a,this.updateProviderValue()}updateBetAmount(a){if(a.lt(0)){this.betAmount="0";return}let e=a.toFixed(this.currencyDecimals);this.betAmount=e,this.updateProviderValue()}updateBalance(a){if(a.lt(0)){this.balance=0;return}this.balance=a.toNumber(),this.updateProviderValue()}_boundCalculateScale=this.calculateScale.bind(this);setupResizeObserver(){if(typeof ResizeObserver!=="undefined")this._resizeObserver=new ResizeObserver(()=>{this.calculateScale(),this.gameData.updateMainWidth(document.documentElement.clientWidth)}),this._resizeObserver.observe(document.body);else window.addEventListener("resize",this._boundCalculateScale)}cleanupResizeObserver(){if(this._resizeObserver)this._resizeObserver.disconnect(),this._resizeObserver=null;else window.removeEventListener("resize",this._boundCalculateScale)}calculateScale(){let a=document.documentElement.clientWidth,e=document.documentElement.clientHeight,i=1200,r=675;if(a/e>1.7777777777777777){let t=e/675;this.scale=t}else{let t=a/1200;this.scale=t}this.requestUpdate()}render(){let a=(()=>{switch(this.origamiGame){case"DICE":return x`<origami-dice-game></origami-dice-game>`;case"KENO":return x`<origami-keno-game></origami-keno-game>`;case"MINES":return x`<origami-mines-game></origami-mines-game>`;case"LIMBO":return x`<origami-limbo-game></origami-limbo-game>`;case"ADVANCED_DICE":return x`<origami-advanced-dice-game></origami-advanced-dice-game>`;case"PLINKO":return x`<origami-plinko-game></origami-plinko-game>`;case"DIAMONDS":return x`<origami-diamonds-game></origami-diamonds-game>`;case"WHEEL":return x`<origami-wheel-game></origami-wheel-game>`;case"ROULETTE":return x`<origami-roulette-game></origami-roulette-game>`;case"BACCARAT":return x`<origami-baccarat-game></origami-baccarat-game>`;case"BLACKJACK":return x`<origami-blackjack-game></origami-blackjack-game>`;case"BLITZ":return x`<origami-blitz-game></origami-blitz-game>`;default:this.origamiGame}})(),e=`
|
|
77
|
+
`;var v7=20,b7=1,Te=1e6,V4=1e6,z7=-7,y7=21,x7=!1,$i="[big.js] ",Ee=$i+"Invalid ",Or=Ee+"decimal places",H7=Ee+"rounding mode",C4=$i+"Division by zero",Ka={},P1=void 0,R7=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function W4(){function a(e){var i=this;if(!(i instanceof a))return e===P1&&arguments.length===0?W4():new a(e);if(e instanceof a)i.s=e.s,i.e=e.e,i.c=e.c.slice();else{if(typeof e!=="string"){if(a.strict===!0&&typeof e!=="bigint")throw TypeError(Ee+"value");e=e===0&&1/e<0?"-0":String(e)}S7(i,e)}i.constructor=a}return a.prototype=Ka,a.DP=v7,a.RM=b7,a.NE=z7,a.PE=y7,a.strict=x7,a.roundDown=0,a.roundHalfUp=1,a.roundHalfEven=2,a.roundUp=3,a}function S7(a,e){var i,r,n;if(!R7.test(e))throw Error(Ee+"number");if(a.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(i=e.indexOf("."))>-1)e=e.replace(".","");if((r=e.search(/e/i))>0){if(i<0)i=r;i+=+e.slice(r+1),e=e.substring(0,r)}else if(i<0)i=e.length;n=e.length;for(r=0;r<n&&e.charAt(r)=="0";)++r;if(r==n)a.c=[a.e=0];else{for(;n>0&&e.charAt(--n)=="0";);a.e=i-r-1,a.c=[];for(i=0;r<=n;)a.c[i++]=+e.charAt(r++)}return a}function Je(a,e,i,r){var n=a.c;if(i===P1)i=a.constructor.RM;if(i!==0&&i!==1&&i!==2&&i!==3)throw Error(H7);if(e<1)if(r=i===3&&(r||!!n[0])||e===0&&(i===1&&n[0]>=5||i===2&&(n[0]>5||n[0]===5&&(r||n[1]!==P1))),n.length=1,r)a.e=a.e-e+1,n[0]=1;else n[0]=a.e=0;else if(e<n.length){if(r=i===1&&n[e]>=5||i===2&&(n[e]>5||n[e]===5&&(r||n[e+1]!==P1||n[e-1]&1))||i===3&&(r||!!n[0]),n.length=e,r){for(;++n[--e]>9;)if(n[e]=0,e===0){++a.e,n.unshift(1);break}}for(e=n.length;!n[--e];)n.pop()}return a}function Ve(a,e,i){var r=a.e,n=a.c.join(""),t=n.length;if(e)n=n.charAt(0)+(t>1?"."+n.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)n="0"+n;n="0."+n}else if(r>0){if(++r>t)for(r-=t;r--;)n+="0";else if(r<t)n=n.slice(0,r)+"."+n.slice(r)}else if(t>1)n=n.charAt(0)+"."+n.slice(1);return a.s<0&&i?"-"+n:n}Ka.abs=function(){var a=new this.constructor(this);return a.s=1,a};Ka.cmp=function(a){var e,i=this,r=i.c,n=(a=new i.constructor(a)).c,t=i.s,o=a.s,l=i.e,s=a.e;if(!r[0]||!n[0])return!r[0]?!n[0]?0:-o:t;if(t!=o)return t;if(e=t<0,l!=s)return l>s^e?1:-1;o=(l=r.length)<(s=n.length)?l:s;for(t=-1;++t<o;)if(r[t]!=n[t])return r[t]>n[t]^e?1:-1;return l==s?0:l>s^e?1:-1};Ka.div=function(a){var e=this,i=e.constructor,r=e.c,n=(a=new i(a)).c,t=e.s==a.s?1:-1,o=i.DP;if(o!==~~o||o<0||o>Te)throw Error(Or);if(!n[0])throw Error(C4);if(!r[0])return a.s=t,a.c=[a.e=0],a;var l,s,d,c,m,u=n.slice(),f=l=n.length,k=r.length,p=r.slice(0,l),H=p.length,z=a,v=z.c=[],g=0,b=o+(z.e=e.e-a.e)+1;z.s=t,t=b<0?0:b,u.unshift(0);for(;H++<l;)p.push(0);do{for(d=0;d<10;d++){if(l!=(H=p.length))c=l>H?1:-1;else for(m=-1,c=0;++m<l;)if(n[m]!=p[m]){c=n[m]>p[m]?1:-1;break}if(c<0){for(s=H==l?n:u;H;){if(p[--H]<s[H]){m=H;for(;m&&!p[--m];)p[m]=9;--p[m],p[H]+=10}p[H]-=s[H]}for(;!p[0];)p.shift()}else break}if(v[g++]=c?d:++d,p[0]&&c)p[H]=r[f]||0;else p=[r[f]]}while((f++<k||p[0]!==P1)&&t--);if(!v[0]&&g!=1)v.shift(),z.e--,b--;if(g>b)Je(z,b,i.RM,p[0]!==P1);return z};Ka.eq=function(a){return this.cmp(a)===0};Ka.gt=function(a){return this.cmp(a)>0};Ka.gte=function(a){return this.cmp(a)>-1};Ka.lt=function(a){return this.cmp(a)<0};Ka.lte=function(a){return this.cmp(a)<1};Ka.minus=Ka.sub=function(a){var e,i,r,n,t=this,o=t.constructor,l=t.s,s=(a=new o(a)).s;if(l!=s)return a.s=-s,t.plus(a);var d=t.c.slice(),c=t.e,m=a.c,u=a.e;if(!d[0]||!m[0]){if(m[0])a.s=-s;else if(d[0])a=new o(t);else a.s=1;return a}if(l=c-u){if(n=l<0)l=-l,r=d;else u=c,r=m;r.reverse();for(s=l;s--;)r.push(0);r.reverse()}else{i=((n=d.length<m.length)?d:m).length;for(l=s=0;s<i;s++)if(d[s]!=m[s]){n=d[s]<m[s];break}}if(n)r=d,d=m,m=r,a.s=-a.s;if((s=(i=m.length)-(e=d.length))>0)for(;s--;)d[e++]=0;for(s=e;i>l;){if(d[--i]<m[i]){for(e=i;e&&!d[--e];)d[e]=9;--d[e],d[i]+=10}d[i]-=m[i]}for(;d[--s]===0;)d.pop();for(;d[0]===0;)d.shift(),--u;if(!d[0])a.s=1,d=[u=0];return a.c=d,a.e=u,a};Ka.mod=function(a){var e,i=this,r=i.constructor,n=i.s,t=(a=new r(a)).s;if(!a.c[0])throw Error(C4);if(i.s=a.s=1,e=a.cmp(i)==1,i.s=n,a.s=t,e)return new r(i);return n=r.DP,t=r.RM,r.DP=r.RM=0,i=i.div(a),r.DP=n,r.RM=t,this.minus(i.times(a))};Ka.neg=function(){var a=new this.constructor(this);return a.s=-a.s,a};Ka.plus=Ka.add=function(a){var e,i,r,n=this,t=n.constructor;if(a=new t(a),n.s!=a.s)return a.s=-a.s,n.minus(a);var{e:o,c:l}=n,s=a.e,d=a.c;if(!l[0]||!d[0]){if(!d[0])if(l[0])a=new t(n);else a.s=n.s;return a}if(l=l.slice(),e=o-s){if(e>0)s=o,r=d;else e=-e,r=l;r.reverse();for(;e--;)r.push(0);r.reverse()}if(l.length-d.length<0)r=d,d=l,l=r;e=d.length;for(i=0;e;l[e]%=10)i=(l[--e]=l[e]+d[e]+i)/10|0;if(i)l.unshift(i),++s;for(e=l.length;l[--e]===0;)l.pop();return a.c=l,a.e=s,a};Ka.pow=function(a){var e=this,i=new e.constructor("1"),r=i,n=a<0;if(a!==~~a||a<-V4||a>V4)throw Error(Ee+"exponent");if(n)a=-a;for(;;){if(a&1)r=r.times(e);if(a>>=1,!a)break;e=e.times(e)}return n?i.div(r):r};Ka.prec=function(a,e){if(a!==~~a||a<1||a>Te)throw Error(Ee+"precision");return Je(new this.constructor(this),a,e)};Ka.round=function(a,e){if(a===P1)a=0;else if(a!==~~a||a<-Te||a>Te)throw Error(Or);return Je(new this.constructor(this),a+this.e+1,e)};Ka.sqrt=function(){var a,e,i,r=this,n=r.constructor,t=r.s,o=r.e,l=new n("0.5");if(!r.c[0])return new n(r);if(t<0)throw Error($i+"No square root");if(t=Math.sqrt(+Ve(r,!0,!0)),t===0||t===1/0){if(e=r.c.join(""),!(e.length+o&1))e+="0";t=Math.sqrt(e),o=((o+1)/2|0)-(o<0||o&1),a=new n((t==1/0?"5e":(t=t.toExponential()).slice(0,t.indexOf("e")+1))+o)}else a=new n(t+"");o=a.e+(n.DP+=4);do i=a,a=l.times(i.plus(r.div(i)));while(i.c.slice(0,o).join("")!==a.c.slice(0,o).join(""));return Je(a,(n.DP-=4)+a.e+1,n.RM)};Ka.times=Ka.mul=function(a){var e,i=this,r=i.constructor,n=i.c,t=(a=new r(a)).c,o=n.length,l=t.length,s=i.e,d=a.e;if(a.s=i.s==a.s?1:-1,!n[0]||!t[0])return a.c=[a.e=0],a;if(a.e=s+d,o<l)e=n,n=t,t=e,d=o,o=l,l=d;for(e=new Array(d=o+l);d--;)e[d]=0;for(s=l;s--;){l=0;for(d=o+s;d>s;)l=e[d]+t[s]*n[d-s-1]+l,e[d--]=l%10,l=l/10|0;e[d]=l}if(l)++a.e;else e.shift();for(s=e.length;!e[--s];)e.pop();return a.c=e,a};Ka.toExponential=function(a,e){var i=this,r=i.c[0];if(a!==P1){if(a!==~~a||a<0||a>Te)throw Error(Or);i=Je(new i.constructor(i),++a,e);for(;i.c.length<a;)i.c.push(0)}return Ve(i,!0,!!r)};Ka.toFixed=function(a,e){var i=this,r=i.c[0];if(a!==P1){if(a!==~~a||a<0||a>Te)throw Error(Or);i=Je(new i.constructor(i),a+i.e+1,e);for(a=a+i.e+1;i.c.length<a;)i.c.push(0)}return Ve(i,!1,!!r)};Ka.toJSON=Ka.toString=function(){var a=this,e=a.constructor;return Ve(a,a.e<=e.NE||a.e>=e.PE,!!a.c[0])};if(typeof Symbol!=="undefined")Ka[Symbol.for("nodejs.util.inspect.custom")]=Ka.toJSON;Ka.toNumber=function(){var a=+Ve(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(a.toString()))throw Error($i+"Imprecise conversion");return a};Ka.toPrecision=function(a,e){var i=this,r=i.constructor,n=i.c[0];if(a!==P1){if(a!==~~a||a<1||a>Te)throw Error(Ee+"precision");i=Je(new r(i),a,e);for(;i.c.length<a;)i.c.push(0)}return Ve(i,a<=i.e||i.e<=r.NE||i.e>=r.PE,!!n)};Ka.valueOf=function(){var a=this,e=a.constructor;if(e.strict===!0)throw Error($i+"valueOf disallowed");return Ve(a,a.e<=e.NE||a.e>=e.PE,!0)};var ee=W4(),I=ee;class Mr extends P{constructor(){super(...arguments);this.currency=wa;this.balance=ia.balance;this.currencyDecimals=ia.currencyDecimals;this.baseUrl=ia.baseUrl;this.authToken=ia.authToken;this.origamiGame="DICE";this.lobbyUrl=ia.lobbyUrl;this.depositUrl=ia.depositUrl;this.maxPayout=ia.maxPayout;this.minBet=ia.minBet;this.maxBet=ia.maxBet;this.edge=ia.edge;this.showCurrencyAsText=!1;this.footerPosition=ia.footerPosition;this.logoUrl=null;this.seasonTheme="DEFAULT";this.alwaysEnableMaxBetButton=ia.alwaysEnableMaxBetButton;this.gcCurrencyIconSvgUrl=ia.gcCurrencyIconSvgUrl;this.scCurrencyIconSvgUrl=ia.scCurrencyIconSvgUrl;this.customMinesBackgroundSvgUrl=ia.customMinesBackgroundSvgUrl;this.customMinesGemSvgUrl=ia.customMinesGemSvgUrl;this.customMinesBombSvgUrl=ia.customMinesBombSvgUrl;this.customMinesTileSvgUrl=ia.customMinesTileSvgUrl;this.customMinesAutobetSelectedTileSvgUrl=ia.customMinesAutobetSelectedTileSvgUrl;this.customKenoBackgroundSvgUrl=ia.customKenoBackgroundSvgUrl;this.customKenoGemSvgUrl=ia.customKenoGemSvgUrl;this.customKenoNonMatchTileSvgUrl=ia.customKenoNonMatchTileSvgUrl;this.customKenoTileSvgUrl=ia.customKenoTileSvgUrl;this.customKenoSelectedTileSvgUrl=ia.customKenoSelectedTileSvgUrl;this.customRouletteBackgroundSvgUrl=ia.customRouletteBackgroundSvgUrl;this.roulettePreventOppositeBets=ia.roulettePreventOppositeBets;this.rouletteDefaultInstantBet=!1;this.customDiceBackgroundSvgUrl=ia.customDiceBackgroundSvgUrl;this.diceMinMultiplier=ia.diceMinMultiplier;this.advancedDiceMinMultiplier=ia.advancedDiceMinMultiplier;this.customAdvancedDiceBackgroundSvgUrl=ia.customAdvancedDiceBackgroundSvgUrl;this.customPlinkoBackgroundSvgUrl=ia.customPlinkoBackgroundSvgUrl;this.customPlinkoEdgeColor=ia.customPlinkoEdgeColor;this.customPlinkoCenterColor=ia.customPlinkoCenterColor;this.customBaccaratBackgroundSvgUrl=ia.customBaccaratBackgroundSvgUrl;this.baccaratPreventOppositeBets=ia.baccaratPreventOppositeBets;this.customLimboBackgroundSvgUrl=ia.customLimboBackgroundSvgUrl;this.customWheelBackgroundSvgUrl=ia.customWheelBackgroundSvgUrl;this.customWheelCenterSvgUrl=ia.customWheelCenterSvgUrl;this.customWheelCenterPadding=ia.customWheelCenterPadding;this.customDiamondsBackgroundSvgUrl=ia.customDiamondsBackgroundSvgUrl;this.customBlackjackBackgroundSvgUrl=ia.customBlackjackBackgroundSvgUrl;this.customBlitzBackgroundSvgUrl=ia.customBlitzBackgroundSvgUrl;this.blitzMinPickCount=ia.blitzMinPickCount;this.blitzMaxPickCount=ia.blitzMaxPickCount;this.customCardBackSvgUrl=ia.customCardBackSvgUrl;this.customCardRedColor=ia.customCardRedColor;this.customCardBlackColor=ia.customCardBlackColor;this.customFooterLobbySvgUrl=ia.customFooterLobbySvgUrl;this.customFooterVolumeSvgUrl=ia.customFooterVolumeSvgUrl;this.customFooterGameInfoSvgUrl=ia.customFooterGameInfoSvgUrl;this.customFooterInstantBetSvgUrl=ia.customFooterInstantBetSvgUrl;this.customFooterHotkeysSvgUrl=ia.customFooterHotkeysSvgUrl;this.customFooterProvablyFairSvgUrl=ia.customFooterProvablyFairSvgUrl;this.betAmount=ia.betAmount;this.autobetNumberOfBets=ia.autobetNumberOfBets;this.hotkeysOpenEnabled=!1;this.showMaxBetButton=ia.showMaxBetButton;this.volume=ia.volume;this.instantBetEnabled=ia.instantBetEnabled;this.mainWidth=ia.mainWidth;this.publicKey=ia.publicKey;this.scale=1;this.language=ia.language;this.hasLoadedBalance=!1}static styles=[J4];_soundEffects=new o0(this);_historyController=new t0(this);_haptics=new n0(this);_resizeObserver=null;_gameProvider=new je(this,{context:N,initialValue:this.createGameContextValue()});connectedCallback(){if(super.connectedCallback(),this.rouletteDefaultInstantBet&&this.origamiGame==="ROULETTE")this.instantBetEnabled=!0;this.updateProviderValue(),this.fetchBalance(),this.fetchPublicKey(),this.setupResizeObserver(),this.calculateScale(),this.updateMainWidth(document.documentElement.clientWidth)}async firstUpdated(a){if(super.firstUpdated(a),await this.updateComplete,!w4.includes(this.origamiGame))this.updateBetAmount(I(this.minBet??0))}disconnectedCallback(){super.disconnectedCallback(),this.cleanupResizeObserver(),this._soundEffects.destroy(),this._haptics.destroy()}updated(a){if(super.updated(a),a.has("currency")||a.has("balance")||a.has("baseUrl")||a.has("showCurrencyAsText")||a.has("authToken")||a.has("hotkeysOpenEnabled")||a.has("volume")||a.has("instantBetEnabled")||a.has("showMaxBetButton")||a.has("mainWidth")||a.has("footerPosition")||a.has("logoUrl")||a.has("scale")||a.has("seasonTheme")||a.has("customMinesGemSvgUrl")||a.has("customMinesBombSvgUrl")||a.has("customKenoGemSvgUrl")||a.has("edge")||a.has("language")||a.has("maxPayout")||a.has("minBet")||a.has("maxBet")||a.has("depositUrl")||a.has("currencyDecimals")||a.has("lobbyUrl")||a.has("roulettePreventOppositeBets")||a.has("alwaysEnableMaxBetButton")||a.has("gcCurrencyIconSvgUrl")||a.has("scCurrencyIconSvgUrl")||a.has("customMinesBackgroundSvgUrl")||a.has("customMinesTileSvgUrl")||a.has("customMinesAutobetSelectedTileSvgUrl")||a.has("customKenoBackgroundSvgUrl")||a.has("customKenoNonMatchTileSvgUrl")||a.has("customKenoTileSvgUrl")||a.has("customKenoSelectedTileSvgUrl")||a.has("customRouletteBackgroundSvgUrl")||a.has("customDiceBackgroundSvgUrl")||a.has("diceMinMultiplier")||a.has("advancedDiceMinMultiplier")||a.has("customAdvancedDiceBackgroundSvgUrl")||a.has("customPlinkoBackgroundSvgUrl")||a.has("customPlinkoEdgeColor")||a.has("customPlinkoCenterColor")||a.has("customBaccaratBackgroundSvgUrl")||a.has("baccaratPreventOppositeBets")||a.has("customLimboBackgroundSvgUrl")||a.has("customWheelBackgroundSvgUrl")||a.has("customWheelCenterSvgUrl")||a.has("customWheelCenterPadding")||a.has("customDiamondsBackgroundSvgUrl")||a.has("customBlackjackBackgroundSvgUrl")||a.has("customBlitzBackgroundSvgUrl")||a.has("blitzMinPickCount")||a.has("blitzMaxPickCount")||a.has("customCardBackSvgUrl")||a.has("customCardRedColor")||a.has("customCardBlackColor")||a.has("customFooterLobbySvgUrl")||a.has("customFooterVolumeSvgUrl")||a.has("customFooterGameInfoSvgUrl")||a.has("customFooterInstantBetSvgUrl")||a.has("customFooterHotkeysSvgUrl")||a.has("customFooterProvablyFairSvgUrl"))this.updateProviderValue()}get gameData(){return this._gameProvider.value}createGameContextValue(){return{betAmount:this.betAmount,updateBetAmount:this.updateBetAmount.bind(this),updateBalance:this.updateBalance.bind(this),currency:this.currency,showCurrencyAsText:this.showCurrencyAsText,currencyDecimals:this.currencyDecimals,lobbyUrl:this.lobbyUrl,depositUrl:this.depositUrl,maxPayout:this.maxPayout,minBet:this.minBet,maxBet:this.maxBet,edge:this.edge,balance:this.balance,hasLoadedBalance:this.hasLoadedBalance,baseUrl:this.baseUrl,authToken:this.authToken,publicKey:this.publicKey,autobetNumberOfBets:this.autobetNumberOfBets,hotkeysOpenEnabled:this.hotkeysOpenEnabled,showMaxBetButton:this.showMaxBetButton,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundEffects:this._soundEffects,historyController:this._historyController,haptics:this._haptics,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateShowMaxBetButton:this.updateShowMaxBetButton.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this),updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this),mainWidth:this.mainWidth,updateMainWidth:this.updateMainWidth.bind(this),language:this.language,footerPosition:this.footerPosition,logoUrl:this.logoUrl,scale:this.scale,seasonTheme:this.seasonTheme,alwaysEnableMaxBetButton:this.alwaysEnableMaxBetButton,gcCurrencyIconSvgUrl:this.gcCurrencyIconSvgUrl,scCurrencyIconSvgUrl:this.scCurrencyIconSvgUrl,customMinesBackgroundSvgUrl:this.customMinesBackgroundSvgUrl,customMinesGemSvgUrl:this.customMinesGemSvgUrl,customMinesBombSvgUrl:this.customMinesBombSvgUrl,customMinesTileSvgUrl:this.customMinesTileSvgUrl,customMinesAutobetSelectedTileSvgUrl:this.customMinesAutobetSelectedTileSvgUrl,customKenoBackgroundSvgUrl:this.customKenoBackgroundSvgUrl,customKenoGemSvgUrl:this.customKenoGemSvgUrl,customKenoNonMatchTileSvgUrl:this.customKenoNonMatchTileSvgUrl,customKenoTileSvgUrl:this.customKenoTileSvgUrl,customKenoSelectedTileSvgUrl:this.customKenoSelectedTileSvgUrl,customRouletteBackgroundSvgUrl:this.customRouletteBackgroundSvgUrl,roulettePreventOppositeBets:this.roulettePreventOppositeBets,customDiceBackgroundSvgUrl:this.customDiceBackgroundSvgUrl,diceMinMultiplier:this.diceMinMultiplier,advancedDiceMinMultiplier:this.advancedDiceMinMultiplier,customAdvancedDiceBackgroundSvgUrl:this.customAdvancedDiceBackgroundSvgUrl,customPlinkoBackgroundSvgUrl:this.customPlinkoBackgroundSvgUrl,customPlinkoEdgeColor:this.customPlinkoEdgeColor,customPlinkoCenterColor:this.customPlinkoCenterColor,customBaccaratBackgroundSvgUrl:this.customBaccaratBackgroundSvgUrl,baccaratPreventOppositeBets:this.baccaratPreventOppositeBets,customLimboBackgroundSvgUrl:this.customLimboBackgroundSvgUrl,customWheelBackgroundSvgUrl:this.customWheelBackgroundSvgUrl,customWheelCenterSvgUrl:this.customWheelCenterSvgUrl,customWheelCenterPadding:this.customWheelCenterPadding,customDiamondsBackgroundSvgUrl:this.customDiamondsBackgroundSvgUrl,customBlackjackBackgroundSvgUrl:this.customBlackjackBackgroundSvgUrl,customBlitzBackgroundSvgUrl:this.customBlitzBackgroundSvgUrl,blitzMaxPickCount:this.blitzMaxPickCount,blitzMinPickCount:this.blitzMinPickCount,customCardBackSvgUrl:this.customCardBackSvgUrl,customCardRedColor:this.customCardRedColor,customCardBlackColor:this.customCardBlackColor,customFooterLobbySvgUrl:this.customFooterLobbySvgUrl,customFooterVolumeSvgUrl:this.customFooterVolumeSvgUrl,customFooterGameInfoSvgUrl:this.customFooterGameInfoSvgUrl,customFooterInstantBetSvgUrl:this.customFooterInstantBetSvgUrl,customFooterHotkeysSvgUrl:this.customFooterHotkeysSvgUrl,customFooterProvablyFairSvgUrl:this.customFooterProvablyFairSvgUrl}}updateProviderValue(){this._gameProvider.setValue(this.createGameContextValue())}fetchBalance=async()=>{if(!this.authToken||!this.baseUrl){this.balance=1000,this.hasLoadedBalance=!0,this.updateProviderValue();return}try{let a=await fetch(`${this.baseUrl}/users/balance?currency=${this.currency}&origamiGame=${this.origamiGame}`,{headers:{Authorization:`Bearer ${this.authToken}`,"Content-Type":"application/json"}});if(!a.ok){console.error("Failed to fetch balance:",a.statusText),this.hasLoadedBalance=!0;return}let e=await a.json();this.balance=I(e.balance).toNumber(),this.hasLoadedBalance=!0,this.updateProviderValue()}catch(a){console.error("Error fetching balance:",a),this.hasLoadedBalance=!0}};fetchPublicKey=async()=>{if(!this.authToken||!this.baseUrl)return;let a=await fetch(`${this.baseUrl}/provably-fair/public-key`);if(!a.ok){console.error("Failed to fetch public key:",a.statusText);return}let e=await a.json();this.publicKey=e.publicKey};updateHotkeysOpenEnabled(a){this.hotkeysOpenEnabled=a,this.updateProviderValue()}updateShowMaxBetButton(a){this.showMaxBetButton=a,this.updateProviderValue()}updateVolume(a){this.volume=a,this._soundEffects.setVolume(a/100),this.updateProviderValue()}updateInstantBetEnabled(a){this.instantBetEnabled=a,this.updateProviderValue()}updateAutobetNumberOfBets(a){this.autobetNumberOfBets=a,this.updateProviderValue()}updateMainWidth(a){this.mainWidth=a,this.updateProviderValue()}updateBetAmount(a){if(a.lt(0)){this.betAmount="0";return}let e=a.toFixed(this.currencyDecimals);this.betAmount=e,this.updateProviderValue()}updateBalance(a){if(a.lt(0)){this.balance=0;return}this.balance=a.toNumber(),this.updateProviderValue()}_boundCalculateScale=this.calculateScale.bind(this);setupResizeObserver(){if(typeof ResizeObserver!=="undefined")this._resizeObserver=new ResizeObserver(()=>{this.calculateScale(),this.gameData.updateMainWidth(document.documentElement.clientWidth)}),this._resizeObserver.observe(document.body);else window.addEventListener("resize",this._boundCalculateScale)}cleanupResizeObserver(){if(this._resizeObserver)this._resizeObserver.disconnect(),this._resizeObserver=null;else window.removeEventListener("resize",this._boundCalculateScale)}calculateScale(){let a=document.documentElement.clientWidth,e=document.documentElement.clientHeight,i=1200,r=675;if(a/e>1.7777777777777777){let t=e/675;this.scale=t}else{let t=a/1200;this.scale=t}this.requestUpdate()}render(){let a=(()=>{switch(this.origamiGame){case"DICE":return x`<origami-dice-game></origami-dice-game>`;case"KENO":return x`<origami-keno-game></origami-keno-game>`;case"MINES":return x`<origami-mines-game></origami-mines-game>`;case"LIMBO":return x`<origami-limbo-game></origami-limbo-game>`;case"ADVANCED_DICE":return x`<origami-advanced-dice-game></origami-advanced-dice-game>`;case"PLINKO":return x`<origami-plinko-game></origami-plinko-game>`;case"DIAMONDS":return x`<origami-diamonds-game></origami-diamonds-game>`;case"WHEEL":return x`<origami-wheel-game></origami-wheel-game>`;case"ROULETTE":return x`<origami-roulette-game></origami-roulette-game>`;case"BACCARAT":return x`<origami-baccarat-game></origami-baccarat-game>`;case"BLACKJACK":return x`<origami-blackjack-game></origami-blackjack-game>`;case"BLITZ":return x`<origami-blitz-game></origami-blitz-game>`;default:this.origamiGame}})(),e=`
|
|
78
78
|
position: absolute;
|
|
79
79
|
top: 0%;
|
|
80
80
|
left: 0%;
|
|
@@ -86,7 +86,7 @@ var Z6=Object.create;var{getPrototypeOf:O6,defineProperty:Xt,getOwnPropertyNames
|
|
|
86
86
|
`;return x`
|
|
87
87
|
<div style=${this.gameData.mainWidth>=768?e:""}>${a}</div>
|
|
88
88
|
<div class=${U({"loading-overlay":!0,loaded:this.hasLoadedBalance})}></div>
|
|
89
|
-
`}}h([w({type:String})],Mr.prototype,"currency",void 0),h([w({type:Number})],Mr.prototype,"balance",void 0),h([w({type:Number})],Mr.prototype,"currencyDecimals",void 0),h([w({type:String})],Mr.prototype,"baseUrl",void 0),h([w({type:String})],Mr.prototype,"authToken",void 0),h([w({type:String})],Mr.prototype,"origamiGame",void 0),h([w({type:String})],Mr.prototype,"lobbyUrl",void 0),h([w({type:String})],Mr.prototype,"depositUrl",void 0),h([w({type:Number})],Mr.prototype,"maxPayout",void 0),h([w({type:Number})],Mr.prototype,"minBet",void 0),h([w({type:Number})],Mr.prototype,"maxBet",void 0),h([w({type:Number})],Mr.prototype,"edge",void 0),h([w({type:Boolean})],Mr.prototype,"showCurrencyAsText",void 0),h([w({type:String})],Mr.prototype,"footerPosition",void 0),h([w({type:String})],Mr.prototype,"logoUrl",void 0),h([w({type:String})],Mr.prototype,"seasonTheme",void 0),h([w({type:Boolean})],Mr.prototype,"alwaysEnableMaxBetButton",void 0),h([w({type:String})],Mr.prototype,"gcCurrencyIconSvgUrl",void 0),h([w({type:String})],Mr.prototype,"scCurrencyIconSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customMinesBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customMinesGemSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customMinesBombSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customMinesTileSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customMinesAutobetSelectedTileSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customKenoBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customKenoGemSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customKenoNonMatchTileSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customKenoTileSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customKenoSelectedTileSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customRouletteBackgroundSvgUrl",void 0),h([w({type:Boolean})],Mr.prototype,"roulettePreventOppositeBets",void 0),h([w({type:Boolean})],Mr.prototype,"rouletteDefaultInstantBet",void 0),h([w({type:String})],Mr.prototype,"customDiceBackgroundSvgUrl",void 0),h([w({type:Number})],Mr.prototype,"diceMinMultiplier",void 0),h([w({type:Number})],Mr.prototype,"advancedDiceMinMultiplier",void 0),h([w({type:String})],Mr.prototype,"customAdvancedDiceBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customPlinkoBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customPlinkoEdgeColor",void 0),h([w({type:String})],Mr.prototype,"customPlinkoCenterColor",void 0),h([w({type:String})],Mr.prototype,"customBaccaratBackgroundSvgUrl",void 0),h([w({type:Boolean})],Mr.prototype,"baccaratPreventOppositeBets",void 0),h([w({type:String})],Mr.prototype,"customLimboBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customWheelBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customWheelCenterSvgUrl",void 0),h([w({type:Number})],Mr.prototype,"customWheelCenterPadding",void 0),h([w({type:String})],Mr.prototype,"customDiamondsBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customBlackjackBackgroundSvgUrl",void 0),h([w({type:Number})],Mr.prototype,"blitzMinPickCount",void 0),h([w({type:Number})],Mr.prototype,"blitzMaxPickCount",void 0),h([w({type:String})],Mr.prototype,"customCardBackSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customCardRedColor",void 0),h([w({type:String})],Mr.prototype,"customCardBlackColor",void 0),h([w({type:String})],Mr.prototype,"customFooterLobbySvgUrl",void 0),h([w({type:String})],Mr.prototype,"customFooterVolumeSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customFooterGameInfoSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customFooterInstantBetSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customFooterHotkeysSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customFooterProvablyFairSvgUrl",void 0),h([F()],Mr.prototype,"betAmount",void 0),h([F()],Mr.prototype,"autobetNumberOfBets",void 0),h([F()],Mr.prototype,"hotkeysOpenEnabled",void 0),h([F()],Mr.prototype,"showMaxBetButton",void 0),h([F()],Mr.prototype,"volume",void 0),h([F()],Mr.prototype,"instantBetEnabled",void 0),h([F()],Mr.prototype,"mainWidth",void 0),h([F()],Mr.prototype,"publicKey",void 0),h([F()],Mr.prototype,"scale",void 0),h([w()],Mr.prototype,"language",void 0),h([F()],Mr.prototype,"hasLoadedBalance",void 0),Mr=h([T("origami-game-provider-wrapper")],Mr);var P4=C`
|
|
89
|
+
`}}h([w({type:String})],Mr.prototype,"currency",void 0),h([w({type:Number})],Mr.prototype,"balance",void 0),h([w({type:Number})],Mr.prototype,"currencyDecimals",void 0),h([w({type:String})],Mr.prototype,"baseUrl",void 0),h([w({type:String})],Mr.prototype,"authToken",void 0),h([w({type:String})],Mr.prototype,"origamiGame",void 0),h([w({type:String})],Mr.prototype,"lobbyUrl",void 0),h([w({type:String})],Mr.prototype,"depositUrl",void 0),h([w({type:Number})],Mr.prototype,"maxPayout",void 0),h([w({type:Number})],Mr.prototype,"minBet",void 0),h([w({type:Number})],Mr.prototype,"maxBet",void 0),h([w({type:Number})],Mr.prototype,"edge",void 0),h([w({type:Boolean})],Mr.prototype,"showCurrencyAsText",void 0),h([w({type:String})],Mr.prototype,"footerPosition",void 0),h([w({type:String})],Mr.prototype,"logoUrl",void 0),h([w({type:String})],Mr.prototype,"seasonTheme",void 0),h([w({type:Boolean})],Mr.prototype,"alwaysEnableMaxBetButton",void 0),h([w({type:String})],Mr.prototype,"gcCurrencyIconSvgUrl",void 0),h([w({type:String})],Mr.prototype,"scCurrencyIconSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customMinesBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customMinesGemSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customMinesBombSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customMinesTileSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customMinesAutobetSelectedTileSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customKenoBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customKenoGemSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customKenoNonMatchTileSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customKenoTileSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customKenoSelectedTileSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customRouletteBackgroundSvgUrl",void 0),h([w({type:Boolean})],Mr.prototype,"roulettePreventOppositeBets",void 0),h([w({type:Boolean})],Mr.prototype,"rouletteDefaultInstantBet",void 0),h([w({type:String})],Mr.prototype,"customDiceBackgroundSvgUrl",void 0),h([w({type:Number})],Mr.prototype,"diceMinMultiplier",void 0),h([w({type:Number})],Mr.prototype,"advancedDiceMinMultiplier",void 0),h([w({type:String})],Mr.prototype,"customAdvancedDiceBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customPlinkoBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customPlinkoEdgeColor",void 0),h([w({type:String})],Mr.prototype,"customPlinkoCenterColor",void 0),h([w({type:String})],Mr.prototype,"customBaccaratBackgroundSvgUrl",void 0),h([w({type:Boolean})],Mr.prototype,"baccaratPreventOppositeBets",void 0),h([w({type:String})],Mr.prototype,"customLimboBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customWheelBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customWheelCenterSvgUrl",void 0),h([w({type:Number})],Mr.prototype,"customWheelCenterPadding",void 0),h([w({type:String})],Mr.prototype,"customDiamondsBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customBlackjackBackgroundSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customBlitzBackgroundSvgUrl",void 0),h([w({type:Number})],Mr.prototype,"blitzMinPickCount",void 0),h([w({type:Number})],Mr.prototype,"blitzMaxPickCount",void 0),h([w({type:String})],Mr.prototype,"customCardBackSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customCardRedColor",void 0),h([w({type:String})],Mr.prototype,"customCardBlackColor",void 0),h([w({type:String})],Mr.prototype,"customFooterLobbySvgUrl",void 0),h([w({type:String})],Mr.prototype,"customFooterVolumeSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customFooterGameInfoSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customFooterInstantBetSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customFooterHotkeysSvgUrl",void 0),h([w({type:String})],Mr.prototype,"customFooterProvablyFairSvgUrl",void 0),h([F()],Mr.prototype,"betAmount",void 0),h([F()],Mr.prototype,"autobetNumberOfBets",void 0),h([F()],Mr.prototype,"hotkeysOpenEnabled",void 0),h([F()],Mr.prototype,"showMaxBetButton",void 0),h([F()],Mr.prototype,"volume",void 0),h([F()],Mr.prototype,"instantBetEnabled",void 0),h([F()],Mr.prototype,"mainWidth",void 0),h([F()],Mr.prototype,"publicKey",void 0),h([F()],Mr.prototype,"scale",void 0),h([w()],Mr.prototype,"language",void 0),h([F()],Mr.prototype,"hasLoadedBalance",void 0),Mr=h([T("origami-game-provider-wrapper")],Mr);var P4=C`
|
|
90
90
|
:host {
|
|
91
91
|
display: flex;
|
|
92
92
|
flex-direction: column;
|
|
@@ -7875,6 +7875,13 @@ var Z6=Object.create;var{getPrototypeOf:O6,defineProperty:Xt,getOwnPropertyNames
|
|
|
7875
7875
|
overflow: hidden;
|
|
7876
7876
|
}
|
|
7877
7877
|
|
|
7878
|
+
:host([data-is-desktop='true']) {
|
|
7879
|
+
background-image: var(--custom-game-background-image, none);
|
|
7880
|
+
background-size: cover;
|
|
7881
|
+
background-position: center;
|
|
7882
|
+
background-repeat: no-repeat;
|
|
7883
|
+
}
|
|
7884
|
+
|
|
7878
7885
|
@media (max-width: 767px) {
|
|
7879
7886
|
:host {
|
|
7880
7887
|
height: auto;
|
|
@@ -10009,7 +10016,7 @@ var Z6=Object.create;var{getPrototypeOf:O6,defineProperty:Xt,getOwnPropertyNames
|
|
|
10009
10016
|
></origami-alert>
|
|
10010
10017
|
`)}
|
|
10011
10018
|
</div>
|
|
10012
|
-
`}willUpdate(){this.previousPositions=this.measurePositions()}updated(){this.playFlipAnimations()}measurePositions(){let a=new Map,e=this.renderRoot.querySelector(".alert-manager");if(!e)return a;return e.querySelectorAll("origami-alert[id]").forEach((r)=>{let n=r.getBoundingClientRect();a.set(r.id,n.top)}),a}getAnimationDurationMs(){let a=this.renderRoot.querySelector("origami-alert");if(!a)return this.defaultAnimationMs;let e=getComputedStyle(a).getPropertyValue("--alert-animation-duration");if(!e)return this.defaultAnimationMs;let i=e.trim().match(/([0-9.]+)ms/);if(i)return Number(i[1]);let r=e.trim().match(/([0-9.]+)s/);if(r)return Number(r[1])*1000;return this.defaultAnimationMs}playFlipAnimations(){let a=this.renderRoot.querySelector(".alert-manager");if(!a)return;let e=this.measurePositions(),i=this.getAnimationDurationMs();e.forEach((r,n)=>{let t=this.previousPositions.get(n);if(t===void 0)return;let o=t-r;if(o===0)return;let l=a.querySelector(`origami-alert#${CSS.escape(n)}`);if(!l)return;l.style.willChange="transform",l.style.transform=`translateY(${o}px)`,l.getBoundingClientRect(),l.style.transition=`transform ${i}ms var(--ease-out-cubic)`,l.style.transform="translateY(0)";let s=()=>{l.style.transition="",l.style.transform="",l.style.willChange="",l.removeEventListener("transitionend",d)},d=(c)=>{if(c.propertyName==="transform")s()};l.addEventListener("transitionend",d),window.setTimeout(s,i+50)})}}h([_({context:N,subscribe:!0})],Z3.prototype,"gameData",void 0),h([F()],Z3.prototype,"alerts",void 0),Z3=h([T("origami-alert-manager")],Z3);var fr={publicKey:"",request:"",proof:"",randomness:"",clientSeed:""};class O3 extends P{constructor(){super(...arguments);this.gameType="KENO";this.showFooter=!0;this.modalContent=null;this.modalNavigationStack=[];this.isModalTransitioning=!1;this.historyHasNextPage=!1;this.isLoadingMoreHistory=!1}static styles=[D,is];pendingModalContent=null;modalTransitionTimeout;resizeObserver;modalSessionId=null;isNavigatingHistory=!1;navigateToModal(a){if(this.modalContent&&!this.isNavigatingHistory)this.modalNavigationStack.push(this.modalContent),this.pushModalHistory(a);this.setModalContent(a)}get gameFooterPosition(){return this.gameData?.footerPosition||"BELOW"}get isDemoMode(){return!this.gameData?.authToken||!this.gameData?.baseUrl}getCustomBackgroundUrl(){if(!this.gameData)return null;switch(this.gameType){case"DICE":return this.gameData.customDiceBackgroundSvgUrl;case"MINES":return this.gameData.customMinesBackgroundSvgUrl;case"KENO":return this.gameData.customKenoBackgroundSvgUrl;case"LIMBO":return this.gameData.customLimboBackgroundSvgUrl;case"PLINKO":return this.gameData.customPlinkoBackgroundSvgUrl;case"ROULETTE":return this.gameData.customRouletteBackgroundSvgUrl;case"BACCARAT":return this.gameData.customBaccaratBackgroundSvgUrl;case"ADVANCED_DICE":return this.gameData.customAdvancedDiceBackgroundSvgUrl;case"WHEEL":return this.gameData.customWheelBackgroundSvgUrl;case"DIAMONDS":return this.gameData.customDiamondsBackgroundSvgUrl;case"BLACKJACK":return this.gameData.customBlackjackBackgroundSvgUrl;default:return null}}getGameAreaCustomStyles(){let a={},e=this.getCustomBackgroundUrl();if(e)a["--custom-game-background-image"]=`url("${e}")`;if(this.gameData?.customCardRedColor)a["--card-color-red"]=this.gameData.customCardRedColor;if(this.gameData?.customCardBlackColor)a["--card-color-black"]=this.gameData.customCardBlackColor;return a}previousHistoryController;onHistoryDataChanged=(a)=>{let e=a;this.historyHasNextPage=!!e.detail?.hasNextPage};firstUpdated(){this.setupHistoryController()}connectedCallback(){super.connectedCallback(),this.addEventListener("show-alert",(a)=>{if(this.alertManager)this.alertManager.addAlert({id:crypto.randomUUID(),...a.detail})}),window.addEventListener("popstate",this.handlePopState)}disconnectedCallback(){if(super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.modalTransitionTimeout)clearTimeout(this.modalTransitionTimeout);this.cleanupHistoryController(),window.removeEventListener("popstate",this.handlePopState)}setModalContent(a){if(this.isModalTransitioning){this.pendingModalContent=a;return}if(!a&&this.modalContent){this.isModalTransitioning=!0,this.modalContent=null,this.modalTransitionTimeout=window.setTimeout(()=>{if(this.isModalTransitioning=!1,this.pendingModalContent){let e=this.pendingModalContent;this.pendingModalContent=null,this.setModalContent(e)}},300);return}if(a){let e=!this.modalContent;if(this.modalContent)this.modalContent=a;else this.isModalTransitioning=!0,this.modalContent=a,this.modalTransitionTimeout=window.setTimeout(()=>{if(this.isModalTransitioning=!1,this.pendingModalContent){let i=this.pendingModalContent;this.pendingModalContent=null,this.setModalContent(i)}},300);if(e&&!this.isNavigatingHistory)this.modalSessionId=crypto.randomUUID(),this.pushModalHistory(a)}}willUpdate(a){if(super.willUpdate(a),this.gameData?.historyController!==this.previousHistoryController)this.cleanupHistoryController(),this.setupHistoryController()}setupHistoryController(){let a=this.gameData?.historyController;if(!a)return;a.addEventListener("history-data-changed",this.onHistoryDataChanged),this.previousHistoryController=a,this.historyHasNextPage=!!this.gameData?.historyController?.hasNextPage}cleanupHistoryController(){if(this.previousHistoryController)this.previousHistoryController.removeEventListener("history-data-changed",this.onHistoryDataChanged),this.previousHistoryController=void 0}pushModalHistory(a){history.pushState({sessionId:this.modalSessionId,modal:a,stackLength:this.modalNavigationStack.length},"")}handlePopState=(a)=>{let e=a.state;if(!this.modalSessionId)return;if(this.isNavigatingHistory=!0,e?.sessionId!==this.modalSessionId){this.handleModalClose(),this.isNavigatingHistory=!1;return}let i=e?.stackLength??0,r=this.modalNavigationStack.length;if(i<r){let n=this.modalNavigationStack.pop();if(n)this.setModalContent(n);else this.handleModalClose()}else if(i>r){let n=e?.modal;if(n&&this.modalContent)this.modalNavigationStack.push(this.modalContent),this.setModalContent(n)}this.isNavigatingHistory=!1};async handleLoadMoreHistory(){if(this.isLoadingMoreHistory||!this.gameData?.historyController?.hasNextPage)return;this.isLoadingMoreHistory=!0;try{await this.gameData.historyController.loadMore()}finally{this.isLoadingMoreHistory=!1}}renderModalContent(a){if(!this.modalContent)return V;switch(this.modalContent.type){case"betResult":return x`
|
|
10019
|
+
`}willUpdate(){this.previousPositions=this.measurePositions()}updated(){this.playFlipAnimations()}measurePositions(){let a=new Map,e=this.renderRoot.querySelector(".alert-manager");if(!e)return a;return e.querySelectorAll("origami-alert[id]").forEach((r)=>{let n=r.getBoundingClientRect();a.set(r.id,n.top)}),a}getAnimationDurationMs(){let a=this.renderRoot.querySelector("origami-alert");if(!a)return this.defaultAnimationMs;let e=getComputedStyle(a).getPropertyValue("--alert-animation-duration");if(!e)return this.defaultAnimationMs;let i=e.trim().match(/([0-9.]+)ms/);if(i)return Number(i[1]);let r=e.trim().match(/([0-9.]+)s/);if(r)return Number(r[1])*1000;return this.defaultAnimationMs}playFlipAnimations(){let a=this.renderRoot.querySelector(".alert-manager");if(!a)return;let e=this.measurePositions(),i=this.getAnimationDurationMs();e.forEach((r,n)=>{let t=this.previousPositions.get(n);if(t===void 0)return;let o=t-r;if(o===0)return;let l=a.querySelector(`origami-alert#${CSS.escape(n)}`);if(!l)return;l.style.willChange="transform",l.style.transform=`translateY(${o}px)`,l.getBoundingClientRect(),l.style.transition=`transform ${i}ms var(--ease-out-cubic)`,l.style.transform="translateY(0)";let s=()=>{l.style.transition="",l.style.transform="",l.style.willChange="",l.removeEventListener("transitionend",d)},d=(c)=>{if(c.propertyName==="transform")s()};l.addEventListener("transitionend",d),window.setTimeout(s,i+50)})}}h([_({context:N,subscribe:!0})],Z3.prototype,"gameData",void 0),h([F()],Z3.prototype,"alerts",void 0),Z3=h([T("origami-alert-manager")],Z3);var fr={publicKey:"",request:"",proof:"",randomness:"",clientSeed:""};class O3 extends P{constructor(){super(...arguments);this.gameType="KENO";this.showFooter=!0;this.modalContent=null;this.modalNavigationStack=[];this.isModalTransitioning=!1;this.historyHasNextPage=!1;this.isLoadingMoreHistory=!1}static styles=[D,is];pendingModalContent=null;modalTransitionTimeout;resizeObserver;modalSessionId=null;isNavigatingHistory=!1;navigateToModal(a){if(this.modalContent&&!this.isNavigatingHistory)this.modalNavigationStack.push(this.modalContent),this.pushModalHistory(a);this.setModalContent(a)}get gameFooterPosition(){return this.gameData?.footerPosition||"BELOW"}get isDemoMode(){return!this.gameData?.authToken||!this.gameData?.baseUrl}getCustomBackgroundUrl(){if(!this.gameData)return null;switch(this.gameType){case"DICE":return this.gameData.customDiceBackgroundSvgUrl;case"MINES":return this.gameData.customMinesBackgroundSvgUrl;case"KENO":return this.gameData.customKenoBackgroundSvgUrl;case"LIMBO":return this.gameData.customLimboBackgroundSvgUrl;case"PLINKO":return this.gameData.customPlinkoBackgroundSvgUrl;case"ROULETTE":return this.gameData.customRouletteBackgroundSvgUrl;case"BACCARAT":return this.gameData.customBaccaratBackgroundSvgUrl;case"ADVANCED_DICE":return this.gameData.customAdvancedDiceBackgroundSvgUrl;case"WHEEL":return this.gameData.customWheelBackgroundSvgUrl;case"DIAMONDS":return this.gameData.customDiamondsBackgroundSvgUrl;case"BLACKJACK":return this.gameData.customBlackjackBackgroundSvgUrl;case"BLITZ":return this.gameData.customBlitzBackgroundSvgUrl;default:return null}}getGameAreaCustomStyles(){let a={},e=this.getCustomBackgroundUrl();if(e)a["--custom-game-background-image"]=`url("${e}")`;if(this.gameData?.customCardRedColor)a["--card-color-red"]=this.gameData.customCardRedColor;if(this.gameData?.customCardBlackColor)a["--card-color-black"]=this.gameData.customCardBlackColor;return a}previousHistoryController;onHistoryDataChanged=(a)=>{let e=a;this.historyHasNextPage=!!e.detail?.hasNextPage};firstUpdated(){this.setupHistoryController()}connectedCallback(){super.connectedCallback(),this.addEventListener("show-alert",(a)=>{if(this.alertManager)this.alertManager.addAlert({id:crypto.randomUUID(),...a.detail})}),window.addEventListener("popstate",this.handlePopState)}disconnectedCallback(){if(super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.modalTransitionTimeout)clearTimeout(this.modalTransitionTimeout);this.cleanupHistoryController(),window.removeEventListener("popstate",this.handlePopState)}setModalContent(a){if(this.isModalTransitioning){this.pendingModalContent=a;return}if(!a&&this.modalContent){this.isModalTransitioning=!0,this.modalContent=null,this.modalTransitionTimeout=window.setTimeout(()=>{if(this.isModalTransitioning=!1,this.pendingModalContent){let e=this.pendingModalContent;this.pendingModalContent=null,this.setModalContent(e)}},300);return}if(a){let e=!this.modalContent;if(this.modalContent)this.modalContent=a;else this.isModalTransitioning=!0,this.modalContent=a,this.modalTransitionTimeout=window.setTimeout(()=>{if(this.isModalTransitioning=!1,this.pendingModalContent){let i=this.pendingModalContent;this.pendingModalContent=null,this.setModalContent(i)}},300);if(e&&!this.isNavigatingHistory)this.modalSessionId=crypto.randomUUID(),this.pushModalHistory(a)}}willUpdate(a){if(super.willUpdate(a),this.gameData?.historyController!==this.previousHistoryController)this.cleanupHistoryController(),this.setupHistoryController()}setupHistoryController(){let a=this.gameData?.historyController;if(!a)return;a.addEventListener("history-data-changed",this.onHistoryDataChanged),this.previousHistoryController=a,this.historyHasNextPage=!!this.gameData?.historyController?.hasNextPage}cleanupHistoryController(){if(this.previousHistoryController)this.previousHistoryController.removeEventListener("history-data-changed",this.onHistoryDataChanged),this.previousHistoryController=void 0}pushModalHistory(a){history.pushState({sessionId:this.modalSessionId,modal:a,stackLength:this.modalNavigationStack.length},"")}handlePopState=(a)=>{let e=a.state;if(!this.modalSessionId)return;if(this.isNavigatingHistory=!0,e?.sessionId!==this.modalSessionId){this.handleModalClose(),this.isNavigatingHistory=!1;return}let i=e?.stackLength??0,r=this.modalNavigationStack.length;if(i<r){let n=this.modalNavigationStack.pop();if(n)this.setModalContent(n);else this.handleModalClose()}else if(i>r){let n=e?.modal;if(n&&this.modalContent)this.modalNavigationStack.push(this.modalContent),this.setModalContent(n)}this.isNavigatingHistory=!1};async handleLoadMoreHistory(){if(this.isLoadingMoreHistory||!this.gameData?.historyController?.hasNextPage)return;this.isLoadingMoreHistory=!0;try{await this.gameData.historyController.loadMore()}finally{this.isLoadingMoreHistory=!1}}renderModalContent(a){if(!this.modalContent)return V;switch(this.modalContent.type){case"betResult":return x`
|
|
10013
10020
|
<origami-bet-result-modal
|
|
10014
10021
|
slot=${a}
|
|
10015
10022
|
.betId=${this.modalContent.betId}
|
|
@@ -10891,7 +10898,7 @@ var Z6=Object.create;var{getPrototypeOf:O6,defineProperty:Xt,getOwnPropertyNames
|
|
|
10891
10898
|
gap: 12px;
|
|
10892
10899
|
grid-column: 1 / -1;
|
|
10893
10900
|
}
|
|
10894
|
-
`;var V9=I(256),Rs=I(40),C9=[{tiles:1,payout:{CLASSIC:[0,3.96],LOW_RISK:[0.7,1.85],MEDIUM_RISK:[0.4,2.75],HIGH_RISK:[0,3.96]}},{tiles:2,payout:{CLASSIC:[0,1.9,4.5],LOW_RISK:[0,2,3.8],MEDIUM_RISK:[0,1.8,5.1],HIGH_RISK:[0,0,17.1]}},{tiles:3,payout:{CLASSIC:[0,1,3.1,10.4],LOW_RISK:[0,1.1,1.38,26],MEDIUM_RISK:[0,0,2.8,50],HIGH_RISK:[0,0,0,81.5]}},{tiles:4,payout:{CLASSIC:[0,0.8,1.8,5,22.5],LOW_RISK:[0,0,2.2,7.9,90],MEDIUM_RISK:[0,0,1.7,10,100],HIGH_RISK:[0,0,0,10,259]}},{tiles:5,payout:{CLASSIC:[0,0.25,1.4,4.1,16.5,36],LOW_RISK:[0,0,1.5,4.2,13,300],MEDIUM_RISK:[0,0,1.4,4,14,390],HIGH_RISK:[0,0,0,4.5,48,450]}},{tiles:6,payout:{CLASSIC:[0,0,1,3.68,7,16.5,40],LOW_RISK:[0,0,1.1,2,6.2,100,700],MEDIUM_RISK:[0,0,0,3,9,180,710],HIGH_RISK:[0,0,0,0,11,350,710]}},{tiles:7,payout:{CLASSIC:[0,0,0.47,3,4.5,14,31,60],LOW_RISK:[0,0,1.1,1.6,3.5,15,225,700],MEDIUM_RISK:[0,0,0,2,7,30,400,800],HIGH_RISK:[0,0,0,0,7,90,400,800]}},{tiles:8,payout:{CLASSIC:[0,0,0,2.2,4,13,22,55,70],LOW_RISK:[0,0,1.1,1.5,2,5.5,39,100,800],MEDIUM_RISK:[0,0,0,2,4,11,67,400,900],HIGH_RISK:[0,0,0,0,5,20,270,600,900]}},{tiles:9,payout:{CLASSIC:[0,0,0,1.55,3,8,15,44,60,85],LOW_RISK:[0,0,1.1,1.3,1.7,2.5,7.5,50,250,1000],MEDIUM_RISK:[0,0,0,2,2.5,5,15,100,500,1000],HIGH_RISK:[0,0,0,0,4,11,56,500,800,1000]}},{tiles:10,payout:{CLASSIC:[0,0,0,1.4,2.25,4.5,8,17,50,80,100],LOW_RISK:[0,0,1.1,1.2,1.3,1.8,3.5,13,50,250,1000],MEDIUM_RISK:[0,0,0,1.6,2,4,7,26,100,500,1000],HIGH_RISK:[0,0,0,0,3.5,8,13,63,500,800,1000]}}],W9=[{tiles:1,payout:{CLASSIC:[0,3.92],LOW_RISK:[0.7,1.82],MEDIUM_RISK:[0.4,2.72],HIGH_RISK:[0,3.92]}},{tiles:2,payout:{CLASSIC:[0,1.9,4.32],LOW_RISK:[0,2,3.65],MEDIUM_RISK:[0,1.8,5],HIGH_RISK:[0,0,17]}},{tiles:3,payout:{CLASSIC:[0,1,3,10.7],LOW_RISK:[0,1.1,1.3,26.2],MEDIUM_RISK:[0,0,2.7,50.3],HIGH_RISK:[0,0,0,80.7]}},{tiles:4,payout:{CLASSIC:[0,0.8,1.8,4.75,22.5],LOW_RISK:[0,0,2.2,7.65,90],MEDIUM_RISK:[0,0,1.7,9.8,100],HIGH_RISK:[0,0,0,9.75,259]}},{tiles:5,payout:{CLASSIC:[0,0.2,1.4,4.25,16.4,36],LOW_RISK:[0,0,1.5,4.1,12.9,300],MEDIUM_RISK:[0,0,1.4,3.9,13.9,390],HIGH_RISK:[0,0,0,4.5,47,450]}},{tiles:6,payout:{CLASSIC:[0,0,1,3.6,7,17,40],LOW_RISK:[0,0,1.1,2,5.8,100,700],MEDIUM_RISK:[0,0,0,3,8.6,180,710],HIGH_RISK:[0,0,0,0,10.6,350,710]}},{tiles:7,payout:{CLASSIC:[0,0,0.5,3,4.1,13.7,31,60],LOW_RISK:[0,0,1.1,1.6,3.5,13.5,225,700],MEDIUM_RISK:[0,0,0,2,6.9,29.2,400,800],HIGH_RISK:[0,0,0,0,6.9,89.1,400,800]}},{tiles:8,payout:{CLASSIC:[0,0,0,2.2,4,12.2,22,55,70],LOW_RISK:[0,0,1.1,1.5,2,4.8,38,100,800],MEDIUM_RISK:[0,0,0,2,4,10.4,66,400,900],HIGH_RISK:[0,0,0,0,4.9,19.8,270,600,900]}},{tiles:9,payout:{CLASSIC:[0,0,0,1.5,3,8.1,15,45,60,85],LOW_RISK:[0,0,1.1,1.3,1.7,2.1,7.4,50,250,1000],MEDIUM_RISK:[0,0,0,2,2.5,4.6,15.2,100,500,1000],HIGH_RISK:[0,0,0,0,4,10.7,55.4,500,800,1000]}},{tiles:10,payout:{CLASSIC:[0,0,0,1.4,2.2,4.5,7.6,16,50,80,100],LOW_RISK:[0,0,1.1,1.2,1.3,1.6,3.7,13,50,250,1000],MEDIUM_RISK:[0,0,0,1.6,2,3.8,6.8,26,100,500,1000],HIGH_RISK:[0,0,0,0,3.5,7.8,12.8,63,500,800,1000]}}],P9=[{tiles:1,payout:{CLASSIC:[0,3.88],LOW_RISK:[0.7,1.78],MEDIUM_RISK:[0.4,2.68],HIGH_RISK:[0,3.88]}},{tiles:2,payout:{CLASSIC:[0,1.85,4.48],LOW_RISK:[0,2,3.48],MEDIUM_RISK:[0,1.8,4.8],HIGH_RISK:[0,0,16.8]}},{tiles:3,payout:{CLASSIC:[0,1,3,9.9],LOW_RISK:[0,1.1,1.2,26.5],MEDIUM_RISK:[0,0,2.65,50],HIGH_RISK:[0,0,0,79.9]}},{tiles:4,payout:{CLASSIC:[0,0.8,1.7,5,23],LOW_RISK:[0,0,2.1,7.95,90],MEDIUM_RISK:[0,0,1.7,9.55,100],HIGH_RISK:[0,0,0,9.5,259]}},{tiles:5,payout:{CLASSIC:[0,0.2,1.4,4.1,16.6,36],LOW_RISK:[0,0,1.5,4,12.7,300],MEDIUM_RISK:[0,0,1.4,3.8,13.7,390],HIGH_RISK:[0,0,0,4.4,46.9,450]}},{tiles:6,payout:{CLASSIC:[0,0,1,3.6,6.6,16.5,40],LOW_RISK:[0,0,1.1,1.9,5.9,100,700],MEDIUM_RISK:[0,0,0,2.9,8.7,180,710],HIGH_RISK:[0,0,0,0,10.8,342,710]}},{tiles:7,payout:{CLASSIC:[0,0,0.5,2.9,4.3,13.5,30.4,60],LOW_RISK:[0,0,1.1,1.6,3.1,14.8,225,700],MEDIUM_RISK:[0,0,0,2,6.7,29,400,800],HIGH_RISK:[0,0,0,0,6.8,88.2,400,800]}},{tiles:8,payout:{CLASSIC:[0,0,0,2.2,3.8,12.7,21,54,70],LOW_RISK:[0,0,1.1,1.5,1.8,5.2,38,100,800],MEDIUM_RISK:[0,0,0,2,3.8,10.8,66,400,900],HIGH_RISK:[0,0,0,0,4.9,19.5,265,600,900]}},{tiles:9,payout:{CLASSIC:[0,0,0,1.5,2.9,8.2,15,43,60,85],LOW_RISK:[0,0,1.1,1.3,1.6,2.1,7.7,49,250,1000],MEDIUM_RISK:[0,0,0,2,2.4,4.7,15,98,500,1000],HIGH_RISK:[0,0,0,0,3.9,10.8,55,500,800,1000]}},{tiles:10,payout:{CLASSIC:[0,0,0,1.4,2.2,4.2,8,16.7,50,80,100],LOW_RISK:[0,0,1.1,1.2,1.3,1.5,2.9,12,50,250,1000],MEDIUM_RISK:[0,0,0,1.6,2,3.6,6.6,26,100,500,1000],HIGH_RISK:[0,0,0,0,3.4,7.9,12.9,62,500,800,1000]}}],$9=[{tiles:1,payout:{CLASSIC:[0,3.
|
|
10901
|
+
`;var V9=I(256),Rs=I(40),C9=[{tiles:1,payout:{CLASSIC:[0,3.96],LOW_RISK:[0.7,1.85],MEDIUM_RISK:[0.4,2.75],HIGH_RISK:[0,3.96]}},{tiles:2,payout:{CLASSIC:[0,1.9,4.5],LOW_RISK:[0,2,3.8],MEDIUM_RISK:[0,1.8,5.1],HIGH_RISK:[0,0,17.1]}},{tiles:3,payout:{CLASSIC:[0,1,3.1,10.4],LOW_RISK:[0,1.1,1.38,26],MEDIUM_RISK:[0,0,2.8,50],HIGH_RISK:[0,0,0,81.5]}},{tiles:4,payout:{CLASSIC:[0,0.8,1.8,5,22.5],LOW_RISK:[0,0,2.2,7.9,90],MEDIUM_RISK:[0,0,1.7,10,100],HIGH_RISK:[0,0,0,10,259]}},{tiles:5,payout:{CLASSIC:[0,0.25,1.4,4.1,16.5,36],LOW_RISK:[0,0,1.5,4.2,13,300],MEDIUM_RISK:[0,0,1.4,4,14,390],HIGH_RISK:[0,0,0,4.5,48,450]}},{tiles:6,payout:{CLASSIC:[0,0,1,3.68,7,16.5,40],LOW_RISK:[0,0,1.1,2,6.2,100,700],MEDIUM_RISK:[0,0,0,3,9,180,710],HIGH_RISK:[0,0,0,0,11,350,710]}},{tiles:7,payout:{CLASSIC:[0,0,0.47,3,4.5,14,31,60],LOW_RISK:[0,0,1.1,1.6,3.5,15,225,700],MEDIUM_RISK:[0,0,0,2,7,30,400,800],HIGH_RISK:[0,0,0,0,7,90,400,800]}},{tiles:8,payout:{CLASSIC:[0,0,0,2.2,4,13,22,55,70],LOW_RISK:[0,0,1.1,1.5,2,5.5,39,100,800],MEDIUM_RISK:[0,0,0,2,4,11,67,400,900],HIGH_RISK:[0,0,0,0,5,20,270,600,900]}},{tiles:9,payout:{CLASSIC:[0,0,0,1.55,3,8,15,44,60,85],LOW_RISK:[0,0,1.1,1.3,1.7,2.5,7.5,50,250,1000],MEDIUM_RISK:[0,0,0,2,2.5,5,15,100,500,1000],HIGH_RISK:[0,0,0,0,4,11,56,500,800,1000]}},{tiles:10,payout:{CLASSIC:[0,0,0,1.4,2.25,4.5,8,17,50,80,100],LOW_RISK:[0,0,1.1,1.2,1.3,1.8,3.5,13,50,250,1000],MEDIUM_RISK:[0,0,0,1.6,2,4,7,26,100,500,1000],HIGH_RISK:[0,0,0,0,3.5,8,13,63,500,800,1000]}}],W9=[{tiles:1,payout:{CLASSIC:[0,3.92],LOW_RISK:[0.7,1.82],MEDIUM_RISK:[0.4,2.72],HIGH_RISK:[0,3.92]}},{tiles:2,payout:{CLASSIC:[0,1.9,4.32],LOW_RISK:[0,2,3.65],MEDIUM_RISK:[0,1.8,5],HIGH_RISK:[0,0,17]}},{tiles:3,payout:{CLASSIC:[0,1,3,10.7],LOW_RISK:[0,1.1,1.3,26.2],MEDIUM_RISK:[0,0,2.7,50.3],HIGH_RISK:[0,0,0,80.7]}},{tiles:4,payout:{CLASSIC:[0,0.8,1.8,4.75,22.5],LOW_RISK:[0,0,2.2,7.65,90],MEDIUM_RISK:[0,0,1.7,9.8,100],HIGH_RISK:[0,0,0,9.75,259]}},{tiles:5,payout:{CLASSIC:[0,0.2,1.4,4.25,16.4,36],LOW_RISK:[0,0,1.5,4.1,12.9,300],MEDIUM_RISK:[0,0,1.4,3.9,13.9,390],HIGH_RISK:[0,0,0,4.5,47,450]}},{tiles:6,payout:{CLASSIC:[0,0,1,3.6,7,17,40],LOW_RISK:[0,0,1.1,2,5.8,100,700],MEDIUM_RISK:[0,0,0,3,8.6,180,710],HIGH_RISK:[0,0,0,0,10.6,350,710]}},{tiles:7,payout:{CLASSIC:[0,0,0.5,3,4.1,13.7,31,60],LOW_RISK:[0,0,1.1,1.6,3.5,13.5,225,700],MEDIUM_RISK:[0,0,0,2,6.9,29.2,400,800],HIGH_RISK:[0,0,0,0,6.9,89.1,400,800]}},{tiles:8,payout:{CLASSIC:[0,0,0,2.2,4,12.2,22,55,70],LOW_RISK:[0,0,1.1,1.5,2,4.8,38,100,800],MEDIUM_RISK:[0,0,0,2,4,10.4,66,400,900],HIGH_RISK:[0,0,0,0,4.9,19.8,270,600,900]}},{tiles:9,payout:{CLASSIC:[0,0,0,1.5,3,8.1,15,45,60,85],LOW_RISK:[0,0,1.1,1.3,1.7,2.1,7.4,50,250,1000],MEDIUM_RISK:[0,0,0,2,2.5,4.6,15.2,100,500,1000],HIGH_RISK:[0,0,0,0,4,10.7,55.4,500,800,1000]}},{tiles:10,payout:{CLASSIC:[0,0,0,1.4,2.2,4.5,7.6,16,50,80,100],LOW_RISK:[0,0,1.1,1.2,1.3,1.6,3.7,13,50,250,1000],MEDIUM_RISK:[0,0,0,1.6,2,3.8,6.8,26,100,500,1000],HIGH_RISK:[0,0,0,0,3.5,7.8,12.8,63,500,800,1000]}}],P9=[{tiles:1,payout:{CLASSIC:[0,3.88],LOW_RISK:[0.7,1.78],MEDIUM_RISK:[0.4,2.68],HIGH_RISK:[0,3.88]}},{tiles:2,payout:{CLASSIC:[0,1.85,4.48],LOW_RISK:[0,2,3.48],MEDIUM_RISK:[0,1.8,4.8],HIGH_RISK:[0,0,16.8]}},{tiles:3,payout:{CLASSIC:[0,1,3,9.9],LOW_RISK:[0,1.1,1.2,26.5],MEDIUM_RISK:[0,0,2.65,50],HIGH_RISK:[0,0,0,79.9]}},{tiles:4,payout:{CLASSIC:[0,0.8,1.7,5,23],LOW_RISK:[0,0,2.1,7.95,90],MEDIUM_RISK:[0,0,1.7,9.55,100],HIGH_RISK:[0,0,0,9.5,259]}},{tiles:5,payout:{CLASSIC:[0,0.2,1.4,4.1,16.6,36],LOW_RISK:[0,0,1.5,4,12.7,300],MEDIUM_RISK:[0,0,1.4,3.8,13.7,390],HIGH_RISK:[0,0,0,4.4,46.9,450]}},{tiles:6,payout:{CLASSIC:[0,0,1,3.6,6.6,16.5,40],LOW_RISK:[0,0,1.1,1.9,5.9,100,700],MEDIUM_RISK:[0,0,0,2.9,8.7,180,710],HIGH_RISK:[0,0,0,0,10.8,342,710]}},{tiles:7,payout:{CLASSIC:[0,0,0.5,2.9,4.3,13.5,30.4,60],LOW_RISK:[0,0,1.1,1.6,3.1,14.8,225,700],MEDIUM_RISK:[0,0,0,2,6.7,29,400,800],HIGH_RISK:[0,0,0,0,6.8,88.2,400,800]}},{tiles:8,payout:{CLASSIC:[0,0,0,2.2,3.8,12.7,21,54,70],LOW_RISK:[0,0,1.1,1.5,1.8,5.2,38,100,800],MEDIUM_RISK:[0,0,0,2,3.8,10.8,66,400,900],HIGH_RISK:[0,0,0,0,4.9,19.5,265,600,900]}},{tiles:9,payout:{CLASSIC:[0,0,0,1.5,2.9,8.2,15,43,60,85],LOW_RISK:[0,0,1.1,1.3,1.6,2.1,7.7,49,250,1000],MEDIUM_RISK:[0,0,0,2,2.4,4.7,15,98,500,1000],HIGH_RISK:[0,0,0,0,3.9,10.8,55,500,800,1000]}},{tiles:10,payout:{CLASSIC:[0,0,0,1.4,2.2,4.2,8,16.7,50,80,100],LOW_RISK:[0,0,1.1,1.2,1.3,1.5,2.9,12,50,250,1000],MEDIUM_RISK:[0,0,0,1.6,2,3.6,6.6,26,100,500,1000],HIGH_RISK:[0,0,0,0,3.4,7.9,12.9,62,500,800,1000]}}],$9=[{tiles:1,payout:{CLASSIC:[0,3.84],LOW_RISK:[0.69,1.77],MEDIUM_RISK:[0.38,2.7],HIGH_RISK:[0,3.84]}},{tiles:2,payout:{CLASSIC:[0,1.83,4.44],LOW_RISK:[0,1.98,3.44],MEDIUM_RISK:[0,1.78,4.77],HIGH_RISK:[0,0,16.64]}},{tiles:3,payout:{CLASSIC:[0,0.98,3,9.8],LOW_RISK:[0,1.09,1.19,26.15],MEDIUM_RISK:[0,0,2.6,49.8],HIGH_RISK:[0,0,0,79]}},{tiles:4,payout:{CLASSIC:[0,0.79,1.68,5,22.7],LOW_RISK:[0,0,2.1,7.8,88.3],MEDIUM_RISK:[0,0,1.66,9.5,100],HIGH_RISK:[0,0,0,9.25,259]}},{tiles:5,payout:{CLASSIC:[0,0.19,1.39,4.1,16.3,35.5],LOW_RISK:[0,0,1.47,4,12.5,300],MEDIUM_RISK:[0,0,1.37,3.8,13.5,390],HIGH_RISK:[0,0,0,4.3,46.6,450]}},{tiles:6,payout:{CLASSIC:[0,0,0.98,3.6,6.5,15.9,39.9],LOW_RISK:[0,0,1.08,1.89,5.8,100,700],MEDIUM_RISK:[0,0,0,2.9,8.35,180,710],HIGH_RISK:[0,0,0,0,10.4,342,710]}},{tiles:7,payout:{CLASSIC:[0,0,0.47,2.9,4.3,13.5,30.4,60],LOW_RISK:[0,0,1.08,1.59,3.1,14.6,225,700],MEDIUM_RISK:[0,0,0,1.98,6.6,28.7,400,800],HIGH_RISK:[0,0,0,0,6.7,87.3,400,800]}},{tiles:8,payout:{CLASSIC:[0,0,0,2.2,3.7,12.5,21,54,70],LOW_RISK:[0,0,1.09,1.49,1.77,5.1,37.5,100,800],MEDIUM_RISK:[0,0,0,1.96,3.8,10.7,65.8,400,900],HIGH_RISK:[0,0,0,0,4.9,18.8,265,600,900]}},{tiles:9,payout:{CLASSIC:[0,0,0,1.47,2.9,8.1,14.9,43,60,85],LOW_RISK:[0,0,1.09,1.28,1.59,2.1,7.6,48.4,250,1000],MEDIUM_RISK:[0,0,0,1.97,2.4,4.6,15,97.1,500,1000],HIGH_RISK:[0,0,0,0,3.8,10.8,55,500,800,1000]}},{tiles:10,payout:{CLASSIC:[0,0,0,1.37,2.2,4.2,7.8,16.5,49.2,80,100],LOW_RISK:[0,0,1.08,1.19,1.3,1.47,2.9,12,50,250,1000],MEDIUM_RISK:[0,0,0,1.58,1.98,3.6,6.4,26,100,500,1000],HIGH_RISK:[0,0,0,0,3.4,7.7,12.7,61.9,500,800,1000]}}],D9=[{tiles:1,payout:{CLASSIC:[0,3.68],LOW_RISK:[0.7,1.58],MEDIUM_RISK:[0.4,2.48],HIGH_RISK:[0,3.68]}},{tiles:2,payout:{CLASSIC:[0,1.72,4.48],LOW_RISK:[0,1.9,3.28],MEDIUM_RISK:[0,1.7,4.62],HIGH_RISK:[0,0,15.95]}},{tiles:3,payout:{CLASSIC:[0,0.9,2.95,9.9],LOW_RISK:[0,1,1.2,26],MEDIUM_RISK:[0,0,2.29,50],HIGH_RISK:[0,0,0,75.7]}},{tiles:4,payout:{CLASSIC:[0,0.8,1.6,4.4,21],LOW_RISK:[0,0,2,7.5,86],MEDIUM_RISK:[0,0,1.5,9.5,98],HIGH_RISK:[0,0,0,9,246]}},{tiles:5,payout:{CLASSIC:[0,0.2,1.2,4.2,16.3,37],LOW_RISK:[0,0,1.4,3.8,12,300],MEDIUM_RISK:[0,0,1.3,3.5,14,385],HIGH_RISK:[0,0,0,4,45,450]}},{tiles:6,payout:{CLASSIC:[0,0,1,3.3,6.2,15,40],LOW_RISK:[0,0,1.1,1.7,4.9,99,700],MEDIUM_RISK:[0,0,0,2.6,8.5,177,705],HIGH_RISK:[0,0,0,0,10,327,710]}},{tiles:7,payout:{CLASSIC:[0,0,0.4,2.8,4.2,14.5,30,60],LOW_RISK:[0,0,1.1,1.4,3,14,210,700],MEDIUM_RISK:[0,0,0,1.8,6.4,29,400,800],HIGH_RISK:[0,0,0,0,6.1,85,400,800]}},{tiles:8,payout:{CLASSIC:[0,0,0,2,3.7,13,20,50,70],LOW_RISK:[0,0,1.1,1.4,1.6,4.6,35,90,800],MEDIUM_RISK:[0,0,0,1.9,3.5,10.5,65,400,900],HIGH_RISK:[0,0,0,0,4.5,18,265,600,900]}},{tiles:9,payout:{CLASSIC:[0,0,0,1.4,2.6,9,11.5,40,60,85],LOW_RISK:[0,0,1,1.3,1.5,2,7,45,250,1000],MEDIUM_RISK:[0,0,0,2,2.1,4,15,98,500,1000],HIGH_RISK:[0,0,0,0,3.5,10.5,55,500,800,1000]}},{tiles:10,payout:{CLASSIC:[0,0,0,1.3,2,4.4,8,16.7,50,80,100],LOW_RISK:[0,0,1,1.2,1.25,1.4,2,10,50,250,1000],MEDIUM_RISK:[0,0,0,1.5,1.9,3.5,6.2,26,100,500,1000],HIGH_RISK:[0,0,0,0,3,8,14,57,500,800,1000]}}],B9=[1,2,3,4,8];class A1{static validEdges=B9;static getEdge(a){return A1.validEdges.includes(a)?a:g1}static configs(a){if(a===1)return C9;if(a===2)return W9;if(a===3)return P9;if(a===4)return $9;if(a===8)return D9;throw new Error(`Invalid edge: ${a}`)}static calculateMultiplier(a,e,i,r){let n=i.filter((o)=>e.includes(o)),t=this.configs(r).find((o)=>o.tiles===e.length);if(!t)throw new Error(`No configuration found for ${e.length} tiles`);return I(t.payout[a][n.length]??0)}static getResults(a,e){let i=[],r=Array.from(Array(Rs.toNumber()).keys());return a.map(w2).every((n,t)=>{for(let o=0;o<8;o++){if(i.length>=e)return!1;let l=I(0);for(let s=0;s<4;s++){let d=n[4*o+s];l=l.plus(I(d).div(V9.pow(s+1)))}l=l.mul(Rs.minus(I(8*t+o))).round(0,I.roundDown),i.push(r.splice(l.toNumber(),1)[0]+1)}return!0}),i}static getChance({correctPicks:a,picked:e}){return I(Ue(10,a)).mul(Ue(30,e-a)).div(I(Ue(40,e)))}}class L3 extends P{constructor(){super(...arguments);this.inputsDisabled=!1;this.risk="CLASSIC";this.isPlaying=!1;this.disableBet=!1;this.selectedTilesCount=0;this.betMaxMultiplier=1;this.isBetAmountValid=!0;this._betAboveBalance=!1}static styles=[D,x2];render(){let a=this.gameData?.language||W;return x`
|
|
10895
10902
|
<origami-deposit-button .betAboveBalance=${this._betAboveBalance}></origami-deposit-button>
|
|
10896
10903
|
|
|
10897
10904
|
<div class="controls-section">
|
|
@@ -16805,6 +16812,7 @@ var Z6=Object.create;var{getPrototypeOf:O6,defineProperty:Xt,getOwnPropertyNames
|
|
|
16805
16812
|
|
|
16806
16813
|
<origami-blitz-content
|
|
16807
16814
|
slot="game-area"
|
|
16815
|
+
data-is-desktop=${a}
|
|
16808
16816
|
.cardDetails=${this.cardDetails}
|
|
16809
16817
|
.revealCardIndex=${this.revealCardIndex}
|
|
16810
16818
|
.progressActive=${this.progressActive}
|