@betorigami/games 1.22.4 → 1.22.6
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 +26 -22
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6064,6 +6064,7 @@ export type gameContextType = {
|
|
|
6064
6064
|
customMinesGemSvgUrl: string | null;
|
|
6065
6065
|
customMinesBombSvgUrl: string | null;
|
|
6066
6066
|
customMinesTileSvgUrl: string | null;
|
|
6067
|
+
customMinesAutobetSelectedTileSvgUrl: string | null;
|
|
6067
6068
|
customKenoBackgroundSvgUrl: string | null;
|
|
6068
6069
|
customKenoGemSvgUrl: string | null;
|
|
6069
6070
|
customKenoNonMatchTileSvgUrl: string | null;
|
|
@@ -6123,6 +6124,7 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
6123
6124
|
customMinesGemSvgUrl: string | null;
|
|
6124
6125
|
customMinesBombSvgUrl: string | null;
|
|
6125
6126
|
customMinesTileSvgUrl: string | null;
|
|
6127
|
+
customMinesAutobetSelectedTileSvgUrl: string | null;
|
|
6126
6128
|
customKenoBackgroundSvgUrl: string | null;
|
|
6127
6129
|
customKenoGemSvgUrl: string | null;
|
|
6128
6130
|
customKenoNonMatchTileSvgUrl: string | null;
|
package/dist/index.mjs
CHANGED
|
@@ -36,10 +36,20 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
36
36
|
\f\r](?:([^\\s"'>=/]+)([
|
|
37
37
|
\f\r]*=[
|
|
38
38
|
\f\r]*(?:[^
|
|
39
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),r7=/'/g,n7=/"/g,o7=/^(?:script|style|textarea|title)$/i,T3=(a)=>(e,...i)=>({_$litType$:a,strings:e,values:i}),Z=T3(1),a1=T3(2),mt=T3(3),Y1=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),l7=new WeakMap,_2=a0.createTreeWalker(a0,129);function s7(a,e){if(!V3(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return a7!==void 0?a7.createHTML(e):e}var h7=(a,e)=>{let i=a.length-1,r=[],n,l=e===2?"<svg>":e===3?"<math>":"",t=G0;for(let s=0;s<i;s++){let o=a[s],d,u,m=-1,h=0;for(;h<o.length&&(t.lastIndex=h,u=t.exec(o),u!==null);)h=t.lastIndex,t===G0?u[1]==="!--"?t=e7:u[1]!==void 0?t=i7:u[2]!==void 0?(o7.test(u[2])&&(n=RegExp("</"+u[2],"g")),t=B2):u[3]!==void 0&&(t=B2):t===B2?u[0]===">"?(t=n??G0,m=-1):u[1]===void 0?m=-2:(m=t.lastIndex-u[2].length,d=u[1],t=u[3]===void 0?B2:u[3]==='"'?n7:r7):t===n7||t===r7?t=B2:t===e7||t===i7?t=G0:(t=B2,n=void 0);let f=t===B2&&a[s+1].startsWith("/>")?" ":"";l+=t===G0?o+zr:m>=0?(r.push(d),o.slice(0,m)+"$lit$"+o.slice(m)+S2+f):o+S2+(m===-2?s:f)}return[s7(a,l+(a[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class B0{constructor({strings:a,_$litType$:e},i){let r;this.parts=[];let n=0,l=0,t=a.length-1,s=this.parts,[o,d]=h7(a,e);if(this.el=B0.createElement(o,i),_2.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(r=_2.nextNode())!==null&&s.length<t;){if(r.nodeType===1){if(r.hasAttributes())for(let u of r.getAttributeNames())if(u.endsWith("$lit$")){let m=d[l++],h=r.getAttribute(u).split(S2),f=/([.?@])?(.*)/.exec(m);s.push({type:1,index:n,name:f[2],strings:h,ctor:f[1]==="."?A3:f[1]==="?"?$3:f[1]==="@"?D3:z0}),r.removeAttribute(u)}else u.startsWith(S2)&&(s.push({type:6,index:n}),r.removeAttribute(u));if(o7.test(r.tagName)){let u=r.textContent.split(S2),m=u.length-1;if(m>0){r.textContent=Fa?Fa.emptyScript:"";for(let h=0;h<m;h++)r.append(u[h],P0()),_2.nextNode(),s.push({type:2,index:++n});r.append(u[m],P0())}}}else if(r.nodeType===8)if(r.data===J3)s.push({type:2,index:n});else{let u=-1;for(;(u=r.data.indexOf(S2,u+1))!==-1;)s.push({type:7,index:n}),u+=S2.length-1}n++}}static createElement(a,e){let i=a0.createElement("template");return i.innerHTML=a,i}}function e0(a,e,i=a,r){if(e===Y1)return e;let n=r!==void 0?i._$Co?.[r]:i._$Cl,l=U0(e)?void 0:e._$litDirective$;return n?.constructor!==l&&(n?._$AO?.(!1),l===void 0?n=void 0:(n=new l(a),n._$AT(a,i,r)),r!==void 0?(i._$Co??=[])[r]=n:i._$Cl=n),n!==void 0&&(e=e0(a,n._$AS(a,e.values),n,r)),e}class W3{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??a0).importNode(e,!0);_2.currentNode=r;let n=_2.nextNode(),l=0,t=0,s=i[0];for(;s!==void 0;){if(l===s.index){let o;s.type===2?o=new b0(n,n.nextSibling,this,a):s.type===1?o=new s.ctor(n,s.name,s.strings,this,a):s.type===6&&(o=new Q3(n,this,a)),this._$AV.push(o),s=i[++t]}l!==s?.index&&(n=_2.nextNode(),l++)}return _2.currentNode=a0,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 b0{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(a,e,i,r){this.type=2,this._$AH=Q,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=e0(this,a,e),U0(a)?a===Q||a==null||a===""?(this._$AH!==Q&&this._$AR(),this._$AH=Q):a!==this._$AH&&a!==Y1&&this._(a):a._$litType$!==void 0?this.$(a):a.nodeType!==void 0?this.T(a):t7(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!==Q&&U0(this._$AH)?this._$AA.nextSibling.data=a:this.T(a0.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=B0.createElement(s7(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{let n=new W3(r,this),l=n.u(this.options);n.p(e),this.T(l),this._$AH=n}}_$AC(a){let e=l7.get(a.strings);return e===void 0&&l7.set(a.strings,e=new B0(a)),e}k(a){V3(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 b0(this.O(P0()),this.O(P0()),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 z0{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(a,e,i,r,n){this.type=1,this._$AH=Q,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=Q}_$AI(a,e=this,i,r){let n=this.strings,l=!1;if(n===void 0)a=e0(this,a,e,0),l=!U0(a)||a!==this._$AH&&a!==Y1,l&&(this._$AH=a);else{let t=a,s,o;for(a=n[0],s=0;s<n.length-1;s++)o=e0(this,t[i+s],e,s),o===Y1&&(o=this._$AH[s]),l||=!U0(o)||o!==this._$AH[s],o===Q?a=Q:a!==Q&&(a+=(o??"")+n[s+1]),this._$AH[s]=o}l&&!r&&this.j(a)}j(a){a===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,a??"")}}class A3 extends z0{constructor(){super(...arguments),this.type=3}j(a){this.element[this.name]=a===Q?void 0:a}}class $3 extends z0{constructor(){super(...arguments),this.type=4}j(a){this.element.toggleAttribute(this.name,!!a&&a!==Q)}}class D3 extends z0{constructor(a,e,i,r,n){super(a,e,i,r,n),this.type=5}_$AI(a,e=this){if((a=e0(this,a,e,0)??Q)===Y1)return;let i=this._$AH,r=a===Q&&i!==Q||a.capture!==i.capture||a.once!==i.once||a.passive!==i.passive,n=a!==Q&&(i===Q||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 Q3{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){e0(this,a)}}var c7={M:"$lit$",P:S2,A:J3,C:1,L:h7,R:W3,D:t7,V:e0,I:b0,H:z0,N:$3,U:D3,B:A3,F:Q3},yr=E3.litHtmlPolyfillSupport;yr?.(B0,b0),(E3.litHtmlVersions??=[]).push("3.3.0");var u7=(a,e,i)=>{let r=i?.renderBefore??e,n=r._$litPart$;if(n===void 0){let l=i?.renderBefore??null;r._$litPart$=n=new b0(e.insertBefore(P0(),l),l,void 0,i??{})}return n._$AI(a),n};var Y3=globalThis;class H1 extends J2{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=u7(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Y1}}H1._$litElement$=!0,H1.finalized=!0,Y3.litElementHydrateSupport?.({LitElement:H1});var xr=Y3.litElementPolyfillSupport;xr?.({LitElement:H1});(Y3.litElementVersions??=[]).push("4.2.0");var T=(a)=>(e,i)=>{i!==void 0?i.addInitializer(()=>{customElements.define(a,e)}):customElements.define(a,e)};var Zr={attribute:!0,type:String,converter:N0,reflect:!1,hasChanged:Ha},Ir=(a=Zr,e,i)=>{let{kind:r,metadata:n}=i,l=globalThis.litPropertyMetadata.get(n);if(l===void 0&&globalThis.litPropertyMetadata.set(n,l=new Map),r==="setter"&&((a=Object.create(a)).wrapped=!0),l.set(i.name,a),r==="accessor"){let{name:t}=i;return{set(s){let o=e.get.call(this);e.set.call(this,s),this.requestUpdate(t,o,a)},init(s){return s!==void 0&&this.C(t,void 0,a,s),s}}}if(r==="setter"){let{name:t}=i;return function(s){let o=this[t];e.call(this,s),this.requestUpdate(t,o,a)}}throw Error("Unsupported decorator location: "+r)};function b(a){return(e,i)=>typeof i=="object"?Ir(a,e,i):((r,n,l)=>{let t=n.hasOwnProperty(l);return n.constructor.createProperty(l,r),t?Object.getOwnPropertyDescriptor(n,l):void 0})(a,e,i)}function q(a){return b({...a,state:!0,attribute:!1})}var V2=(a,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(a,e,i),i);function i1(a,e){return(i,r,n)=>{let l=(t)=>t.renderRoot?.querySelector(a)??null;if(e){let{get:t,set:s}=typeof r=="object"?i:n??(()=>{let o=Symbol();return{get(){return this[o]},set(d){this[o]=d}}})();return V2(i,r,{get(){let o=t.call(this);return o===void 0&&(o=l(this),(o!==null||this.hasUpdated)&&s.call(this,o)),o}})}return V2(i,r,{get(){return l(this)}})}}var Rr;function d7(a){return(e,i)=>V2(e,i,{get(){return(this.renderRoot??(Rr??=document.createDocumentFragment())).querySelectorAll(a)}})}var r2={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},p2=(a)=>(...e)=>({_$litDirective$:a,values:e});class b2{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 B=p2(class extends b2{constructor(a){if(super(a),a.type!==r2.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 Y1}});class C3{canVibrate;constructor(a){a.addController(this),this.canVibrate="vibrate"in navigator}trigger(a=10){if(!this.canVibrate)return;try{navigator.vibrate(a)}catch{}}click(){this.trigger(50)}lightClick(){this.trigger(35)}}function f7(a){let e=a.replace(/-/g,"").substring(0,12),i=parseInt(e,16);return new Date(i)}function m7(a){return a.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0})}class X3 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((t)=>({id:`${t.id.slice(0,3)}...${t.id.slice(-3)}`,fullId:t.id,timestamp:m7(f7(t.id)),currency:t.currency,bet:Number(t.amount),win:Number(t.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:m7(f7(a.id)),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()}}var v7="v4";class N3{host;muted=!1;audioCtx;buffer;spriteMap=null;constructor(a){this.host=a,a.addController(this);let e=window.AudioContext||window.webkitAudioContext;this.audioCtx=new e,fetch(`https://assets.betorigami.com/sounds/${v7}/sounds.mp3`).then((i)=>{return i.arrayBuffer().then((r)=>{this.audioCtx.decodeAudioData(r,(n)=>{this.buffer=n})}).catch((r)=>{})}).catch(),fetch(`https://assets.betorigami.com/sounds/${v7}/sounds.json`).then((i)=>i.json()).catch().then((i)=>{this.spriteMap=i.spritemap}).catch(),window.onclick=()=>{this.play("bet",!0),window.onclick=null}}async play(a,e,i=1,r,n=()=>{},l=!1){if(!this.buffer||!this.spriteMap)return;let t=this.audioCtx.createBufferSource();t.buffer=this.buffer;let s=this.spriteMap[a];try{if(this.audioCtx&&t){let o=this.audioCtx.createGain(),d=r??(this.host.gameData?.volume??100)/100,u=e??this.muted;if(o.gain.value=u?0:Math.min(d,1),o.connect(this.audioCtx.destination),t.connect(o),t.playbackRate.value=i,l)t.loop=!0,t.loopStart=s.start,t.loopEnd=s.end,t.start(0,s.start);else t.start(0,s.start),setTimeout(()=>{t?.stop(),n()},1000*(s.end-s.start));return t}}catch(o){console.error("Error playing sound",o)}}}var c1="USD";var w7=[1,2,3,4,8];var C1=2,k7=["ROULETTE","BACCARAT"];class Y extends H1{static componentStyles=[];emit(a,e){let i=new CustomEvent(a,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...e});return this.dispatchEvent(i),i}}var vo=R2("language"),W="en";var Qr={ar:()=>Promise.resolve().then(() => v1(G3(),1)),de:()=>Promise.resolve().then(() => v1(P3(),1)),en:()=>Promise.resolve().then(() => v1(U3(),1)),"en-soc":()=>Promise.resolve().then(() => v1(B3(),1)),es:()=>Promise.resolve().then(() => v1(_3(),1)),fi:()=>Promise.resolve().then(() => v1(a4(),1)),fr:()=>Promise.resolve().then(() => v1(e4(),1)),hi:()=>Promise.resolve().then(() => v1(i4(),1)),id:()=>Promise.resolve().then(() => v1(r4(),1)),ja:()=>Promise.resolve().then(() => v1(n4(),1)),ko:()=>Promise.resolve().then(() => v1(l4(),1)),pl:()=>Promise.resolve().then(() => v1(t4(),1)),pt:()=>Promise.resolve().then(() => v1(o4(),1)),ru:()=>Promise.resolve().then(() => v1(s4(),1)),tr:()=>Promise.resolve().then(() => v1(h4(),1)),vi:()=>Promise.resolve().then(() => v1(c4(),1)),zh:()=>Promise.resolve().then(() => v1(u4(),1))};class g7{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(),d4()}async loadLanguageModule(a){try{let e=await Qr[a]();this.loadedTranslations.set(a,e.default),d4()}catch(e){throw e}}}var _0=new g7;_0.loadLanguage(W).catch(()=>{});var b7=v1(G3(),1),z7=v1(P3(),1),y7=v1(U3(),1),x7=v1(B3(),1),Z7=v1(_3(),1),I7=v1(a4(),1),R7=v1(e4(),1),S7=v1(i4(),1),H7=v1(r4(),1),F7=v1(n4(),1),K7=v1(l4(),1),O7=v1(t4(),1),M7=v1(o4(),1),j7=v1(s4(),1),q7=v1(h4(),1),L7=v1(c4(),1),E7=v1(u4(),1);var f4={ar:b7.default,de:z7.default,en:y7.default,"en-soc":x7.default,es:Z7.default,fi:I7.default,fr:R7.default,hi:S7.default,id:H7.default,ja:F7.default,ko:K7.default,pl:O7.default,pt:M7.default,ru:j7.default,tr:q7.default,vi:L7.default,zh:E7.default};function Yr(a){let e=_0.getTranslationData(a);if(e)return e;return f4[a]||f4[W]}var $o=R2(Symbol("translation"));class J7{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 m4=new J7,p7=new Map;function Cr(a){let e=p7.get(a);if(!e)e=a.split("."),p7.set(a,e);return e}function V7(a,e,i){let r=Yr(e);try{let n=Cr(a),l=r;for(let t of n)if(l=l?.[t],l===void 0)break;if(typeof l==="string")return l;if(e!==W)return V7(a,W,i);return i||a}catch{return i||a}}function S(a,e=W,i){let r=i?`${a}:${e}:${i}`:`${a}:${e}`,n=m4.get(r);if(n!==void 0)return n;let l=V7(a,e,i);return m4.set(r,l),l}function d4(){m4.clear()}var t1={betAmount:"0.00",scale:1,updateBetAmount:()=>{},updateBalance:()=>{},currency:c1,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:()=>{},soundController:void 0,historyController:void 0,hapticController: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,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,customBaccaratCardBackSvgUrl:null,baccaratPreventOppositeBets:!1,customLimboBackgroundSvgUrl:null,customWheelBackgroundSvgUrl:null,customWheelCenterSvgUrl:null,customWheelCenterPadding:null,customDiamondsBackgroundSvgUrl:null,customBlackjackBackgroundSvgUrl:null,customCardBackSvgUrl:null,customFooterLobbySvgUrl:null,customFooterVolumeSvgUrl:null,customFooterGameInfoSvgUrl:null,customFooterInstantBetSvgUrl:null,customFooterHotkeysSvgUrl:null,customFooterProvablyFairSvgUrl:null},P=R2(Symbol("game"));var T7=D`
|
|
39
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),r7=/'/g,n7=/"/g,o7=/^(?:script|style|textarea|title)$/i,T3=(a)=>(e,...i)=>({_$litType$:a,strings:e,values:i}),Z=T3(1),a1=T3(2),mt=T3(3),Y1=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),l7=new WeakMap,_2=a0.createTreeWalker(a0,129);function s7(a,e){if(!V3(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return a7!==void 0?a7.createHTML(e):e}var h7=(a,e)=>{let i=a.length-1,r=[],n,l=e===2?"<svg>":e===3?"<math>":"",t=G0;for(let s=0;s<i;s++){let o=a[s],d,u,m=-1,h=0;for(;h<o.length&&(t.lastIndex=h,u=t.exec(o),u!==null);)h=t.lastIndex,t===G0?u[1]==="!--"?t=e7:u[1]!==void 0?t=i7:u[2]!==void 0?(o7.test(u[2])&&(n=RegExp("</"+u[2],"g")),t=B2):u[3]!==void 0&&(t=B2):t===B2?u[0]===">"?(t=n??G0,m=-1):u[1]===void 0?m=-2:(m=t.lastIndex-u[2].length,d=u[1],t=u[3]===void 0?B2:u[3]==='"'?n7:r7):t===n7||t===r7?t=B2:t===e7||t===i7?t=G0:(t=B2,n=void 0);let f=t===B2&&a[s+1].startsWith("/>")?" ":"";l+=t===G0?o+zr:m>=0?(r.push(d),o.slice(0,m)+"$lit$"+o.slice(m)+S2+f):o+S2+(m===-2?s:f)}return[s7(a,l+(a[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class B0{constructor({strings:a,_$litType$:e},i){let r;this.parts=[];let n=0,l=0,t=a.length-1,s=this.parts,[o,d]=h7(a,e);if(this.el=B0.createElement(o,i),_2.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(r=_2.nextNode())!==null&&s.length<t;){if(r.nodeType===1){if(r.hasAttributes())for(let u of r.getAttributeNames())if(u.endsWith("$lit$")){let m=d[l++],h=r.getAttribute(u).split(S2),f=/([.?@])?(.*)/.exec(m);s.push({type:1,index:n,name:f[2],strings:h,ctor:f[1]==="."?A3:f[1]==="?"?$3:f[1]==="@"?D3:z0}),r.removeAttribute(u)}else u.startsWith(S2)&&(s.push({type:6,index:n}),r.removeAttribute(u));if(o7.test(r.tagName)){let u=r.textContent.split(S2),m=u.length-1;if(m>0){r.textContent=Fa?Fa.emptyScript:"";for(let h=0;h<m;h++)r.append(u[h],P0()),_2.nextNode(),s.push({type:2,index:++n});r.append(u[m],P0())}}}else if(r.nodeType===8)if(r.data===J3)s.push({type:2,index:n});else{let u=-1;for(;(u=r.data.indexOf(S2,u+1))!==-1;)s.push({type:7,index:n}),u+=S2.length-1}n++}}static createElement(a,e){let i=a0.createElement("template");return i.innerHTML=a,i}}function e0(a,e,i=a,r){if(e===Y1)return e;let n=r!==void 0?i._$Co?.[r]:i._$Cl,l=U0(e)?void 0:e._$litDirective$;return n?.constructor!==l&&(n?._$AO?.(!1),l===void 0?n=void 0:(n=new l(a),n._$AT(a,i,r)),r!==void 0?(i._$Co??=[])[r]=n:i._$Cl=n),n!==void 0&&(e=e0(a,n._$AS(a,e.values),n,r)),e}class W3{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??a0).importNode(e,!0);_2.currentNode=r;let n=_2.nextNode(),l=0,t=0,s=i[0];for(;s!==void 0;){if(l===s.index){let o;s.type===2?o=new b0(n,n.nextSibling,this,a):s.type===1?o=new s.ctor(n,s.name,s.strings,this,a):s.type===6&&(o=new Q3(n,this,a)),this._$AV.push(o),s=i[++t]}l!==s?.index&&(n=_2.nextNode(),l++)}return _2.currentNode=a0,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 b0{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(a,e,i,r){this.type=2,this._$AH=Q,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=e0(this,a,e),U0(a)?a===Q||a==null||a===""?(this._$AH!==Q&&this._$AR(),this._$AH=Q):a!==this._$AH&&a!==Y1&&this._(a):a._$litType$!==void 0?this.$(a):a.nodeType!==void 0?this.T(a):t7(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!==Q&&U0(this._$AH)?this._$AA.nextSibling.data=a:this.T(a0.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=B0.createElement(s7(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{let n=new W3(r,this),l=n.u(this.options);n.p(e),this.T(l),this._$AH=n}}_$AC(a){let e=l7.get(a.strings);return e===void 0&&l7.set(a.strings,e=new B0(a)),e}k(a){V3(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 b0(this.O(P0()),this.O(P0()),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 z0{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(a,e,i,r,n){this.type=1,this._$AH=Q,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=Q}_$AI(a,e=this,i,r){let n=this.strings,l=!1;if(n===void 0)a=e0(this,a,e,0),l=!U0(a)||a!==this._$AH&&a!==Y1,l&&(this._$AH=a);else{let t=a,s,o;for(a=n[0],s=0;s<n.length-1;s++)o=e0(this,t[i+s],e,s),o===Y1&&(o=this._$AH[s]),l||=!U0(o)||o!==this._$AH[s],o===Q?a=Q:a!==Q&&(a+=(o??"")+n[s+1]),this._$AH[s]=o}l&&!r&&this.j(a)}j(a){a===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,a??"")}}class A3 extends z0{constructor(){super(...arguments),this.type=3}j(a){this.element[this.name]=a===Q?void 0:a}}class $3 extends z0{constructor(){super(...arguments),this.type=4}j(a){this.element.toggleAttribute(this.name,!!a&&a!==Q)}}class D3 extends z0{constructor(a,e,i,r,n){super(a,e,i,r,n),this.type=5}_$AI(a,e=this){if((a=e0(this,a,e,0)??Q)===Y1)return;let i=this._$AH,r=a===Q&&i!==Q||a.capture!==i.capture||a.once!==i.once||a.passive!==i.passive,n=a!==Q&&(i===Q||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 Q3{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){e0(this,a)}}var c7={M:"$lit$",P:S2,A:J3,C:1,L:h7,R:W3,D:t7,V:e0,I:b0,H:z0,N:$3,U:D3,B:A3,F:Q3},yr=E3.litHtmlPolyfillSupport;yr?.(B0,b0),(E3.litHtmlVersions??=[]).push("3.3.0");var u7=(a,e,i)=>{let r=i?.renderBefore??e,n=r._$litPart$;if(n===void 0){let l=i?.renderBefore??null;r._$litPart$=n=new b0(e.insertBefore(P0(),l),l,void 0,i??{})}return n._$AI(a),n};var Y3=globalThis;class H1 extends J2{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=u7(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Y1}}H1._$litElement$=!0,H1.finalized=!0,Y3.litElementHydrateSupport?.({LitElement:H1});var xr=Y3.litElementPolyfillSupport;xr?.({LitElement:H1});(Y3.litElementVersions??=[]).push("4.2.0");var T=(a)=>(e,i)=>{i!==void 0?i.addInitializer(()=>{customElements.define(a,e)}):customElements.define(a,e)};var Zr={attribute:!0,type:String,converter:N0,reflect:!1,hasChanged:Ha},Ir=(a=Zr,e,i)=>{let{kind:r,metadata:n}=i,l=globalThis.litPropertyMetadata.get(n);if(l===void 0&&globalThis.litPropertyMetadata.set(n,l=new Map),r==="setter"&&((a=Object.create(a)).wrapped=!0),l.set(i.name,a),r==="accessor"){let{name:t}=i;return{set(s){let o=e.get.call(this);e.set.call(this,s),this.requestUpdate(t,o,a)},init(s){return s!==void 0&&this.C(t,void 0,a,s),s}}}if(r==="setter"){let{name:t}=i;return function(s){let o=this[t];e.call(this,s),this.requestUpdate(t,o,a)}}throw Error("Unsupported decorator location: "+r)};function b(a){return(e,i)=>typeof i=="object"?Ir(a,e,i):((r,n,l)=>{let t=n.hasOwnProperty(l);return n.constructor.createProperty(l,r),t?Object.getOwnPropertyDescriptor(n,l):void 0})(a,e,i)}function q(a){return b({...a,state:!0,attribute:!1})}var V2=(a,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(a,e,i),i);function i1(a,e){return(i,r,n)=>{let l=(t)=>t.renderRoot?.querySelector(a)??null;if(e){let{get:t,set:s}=typeof r=="object"?i:n??(()=>{let o=Symbol();return{get(){return this[o]},set(d){this[o]=d}}})();return V2(i,r,{get(){let o=t.call(this);return o===void 0&&(o=l(this),(o!==null||this.hasUpdated)&&s.call(this,o)),o}})}return V2(i,r,{get(){return l(this)}})}}var Rr;function d7(a){return(e,i)=>V2(e,i,{get(){return(this.renderRoot??(Rr??=document.createDocumentFragment())).querySelectorAll(a)}})}var r2={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},p2=(a)=>(...e)=>({_$litDirective$:a,values:e});class b2{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 B=p2(class extends b2{constructor(a){if(super(a),a.type!==r2.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 Y1}});class C3{canVibrate;constructor(a){a.addController(this),this.canVibrate="vibrate"in navigator}trigger(a=10){if(!this.canVibrate)return;try{navigator.vibrate(a)}catch{}}click(){this.trigger(50)}lightClick(){this.trigger(35)}}function f7(a){let e=a.replace(/-/g,"").substring(0,12),i=parseInt(e,16);return new Date(i)}function m7(a){return a.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0})}class X3 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((t)=>({id:`${t.id.slice(0,3)}...${t.id.slice(-3)}`,fullId:t.id,timestamp:m7(f7(t.id)),currency:t.currency,bet:Number(t.amount),win:Number(t.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:m7(f7(a.id)),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()}}var v7="v4";class N3{host;muted=!1;audioCtx;buffer;spriteMap=null;constructor(a){this.host=a,a.addController(this);let e=window.AudioContext||window.webkitAudioContext;this.audioCtx=new e,fetch(`https://assets.betorigami.com/sounds/${v7}/sounds.mp3`).then((i)=>{return i.arrayBuffer().then((r)=>{this.audioCtx.decodeAudioData(r,(n)=>{this.buffer=n})}).catch((r)=>{})}).catch(),fetch(`https://assets.betorigami.com/sounds/${v7}/sounds.json`).then((i)=>i.json()).catch().then((i)=>{this.spriteMap=i.spritemap}).catch(),window.onclick=()=>{this.play("bet",!0),window.onclick=null}}async play(a,e,i=1,r,n=()=>{},l=!1){if(!this.buffer||!this.spriteMap)return;let t=this.audioCtx.createBufferSource();t.buffer=this.buffer;let s=this.spriteMap[a];try{if(this.audioCtx&&t){let o=this.audioCtx.createGain(),d=r??(this.host.gameData?.volume??100)/100,u=e??this.muted;if(o.gain.value=u?0:Math.min(d,1),o.connect(this.audioCtx.destination),t.connect(o),t.playbackRate.value=i,l)t.loop=!0,t.loopStart=s.start,t.loopEnd=s.end,t.start(0,s.start);else t.start(0,s.start),setTimeout(()=>{t?.stop(),n()},1000*(s.end-s.start));return t}}catch(o){console.error("Error playing sound",o)}}}var c1="USD";var w7=[1,2,3,4,8];var C1=2,k7=["ROULETTE","BACCARAT"];class Y extends H1{static componentStyles=[];emit(a,e){let i=new CustomEvent(a,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...e});return this.dispatchEvent(i),i}}var vo=R2("language"),W="en";var Qr={ar:()=>Promise.resolve().then(() => v1(G3(),1)),de:()=>Promise.resolve().then(() => v1(P3(),1)),en:()=>Promise.resolve().then(() => v1(U3(),1)),"en-soc":()=>Promise.resolve().then(() => v1(B3(),1)),es:()=>Promise.resolve().then(() => v1(_3(),1)),fi:()=>Promise.resolve().then(() => v1(a4(),1)),fr:()=>Promise.resolve().then(() => v1(e4(),1)),hi:()=>Promise.resolve().then(() => v1(i4(),1)),id:()=>Promise.resolve().then(() => v1(r4(),1)),ja:()=>Promise.resolve().then(() => v1(n4(),1)),ko:()=>Promise.resolve().then(() => v1(l4(),1)),pl:()=>Promise.resolve().then(() => v1(t4(),1)),pt:()=>Promise.resolve().then(() => v1(o4(),1)),ru:()=>Promise.resolve().then(() => v1(s4(),1)),tr:()=>Promise.resolve().then(() => v1(h4(),1)),vi:()=>Promise.resolve().then(() => v1(c4(),1)),zh:()=>Promise.resolve().then(() => v1(u4(),1))};class g7{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(),d4()}async loadLanguageModule(a){try{let e=await Qr[a]();this.loadedTranslations.set(a,e.default),d4()}catch(e){throw e}}}var _0=new g7;_0.loadLanguage(W).catch(()=>{});var b7=v1(G3(),1),z7=v1(P3(),1),y7=v1(U3(),1),x7=v1(B3(),1),Z7=v1(_3(),1),I7=v1(a4(),1),R7=v1(e4(),1),S7=v1(i4(),1),H7=v1(r4(),1),F7=v1(n4(),1),K7=v1(l4(),1),O7=v1(t4(),1),M7=v1(o4(),1),j7=v1(s4(),1),q7=v1(h4(),1),L7=v1(c4(),1),E7=v1(u4(),1);var f4={ar:b7.default,de:z7.default,en:y7.default,"en-soc":x7.default,es:Z7.default,fi:I7.default,fr:R7.default,hi:S7.default,id:H7.default,ja:F7.default,ko:K7.default,pl:O7.default,pt:M7.default,ru:j7.default,tr:q7.default,vi:L7.default,zh:E7.default};function Yr(a){let e=_0.getTranslationData(a);if(e)return e;return f4[a]||f4[W]}var $o=R2(Symbol("translation"));class J7{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 m4=new J7,p7=new Map;function Cr(a){let e=p7.get(a);if(!e)e=a.split("."),p7.set(a,e);return e}function V7(a,e,i){let r=Yr(e);try{let n=Cr(a),l=r;for(let t of n)if(l=l?.[t],l===void 0)break;if(typeof l==="string")return l;if(e!==W)return V7(a,W,i);return i||a}catch{return i||a}}function S(a,e=W,i){let r=i?`${a}:${e}:${i}`:`${a}:${e}`,n=m4.get(r);if(n!==void 0)return n;let l=V7(a,e,i);return m4.set(r,l),l}function d4(){m4.clear()}var t1={betAmount:"0.00",scale:1,updateBetAmount:()=>{},updateBalance:()=>{},currency:c1,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:()=>{},soundController:void 0,historyController:void 0,hapticController: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,customBaccaratCardBackSvgUrl:null,baccaratPreventOppositeBets:!1,customLimboBackgroundSvgUrl:null,customWheelBackgroundSvgUrl:null,customWheelCenterSvgUrl:null,customWheelCenterPadding:null,customDiamondsBackgroundSvgUrl:null,customBlackjackBackgroundSvgUrl:null,customCardBackSvgUrl:null,customFooterLobbySvgUrl:null,customFooterVolumeSvgUrl:null,customFooterGameInfoSvgUrl:null,customFooterInstantBetSvgUrl:null,customFooterHotkeysSvgUrl:null,customFooterProvablyFairSvgUrl:null},P=R2(Symbol("game"));var T7=D`
|
|
40
40
|
:host {
|
|
41
|
+
display: block;
|
|
42
|
+
height: 100%;
|
|
41
43
|
position: relative;
|
|
42
|
-
overflow: hidden;
|
|
44
|
+
overflow-x: hidden;
|
|
45
|
+
overflow-y: auto;
|
|
46
|
+
overscroll-behavior: none;
|
|
47
|
+
-webkit-overflow-scrolling: touch;
|
|
48
|
+
scrollbar-width: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host::-webkit-scrollbar {
|
|
52
|
+
display: none;
|
|
43
53
|
}
|
|
44
54
|
|
|
45
55
|
.loading-overlay {
|
|
@@ -78,7 +88,7 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
78
88
|
color: var(--loading-text-color, var(--primary-text-color, #FFFFFF));
|
|
79
89
|
font-size: var(--loading-text-font-size, 16px);
|
|
80
90
|
}
|
|
81
|
-
`;var Xr=20,Nr=1,i0=1e6,W7=1e6,Gr=-7,Pr=21,Ur=!1,aa="[big.js] ",r0=aa+"Invalid ",Ka=r0+"decimal places",Br=r0+"rounding mode",A7=aa+"Division by zero",Z1={},y2=void 0,_r=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function $7(){function a(e){var i=this;if(!(i instanceof a))return e===y2&&arguments.length===0?$7():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(r0+"value");e=e===0&&1/e<0?"-0":String(e)}a9(i,e)}i.constructor=a}return a.prototype=Z1,a.DP=Xr,a.RM=Nr,a.NE=Gr,a.PE=Pr,a.strict=Ur,a.roundDown=0,a.roundHalfUp=1,a.roundHalfEven=2,a.roundUp=3,a}function a9(a,e){var i,r,n;if(!_r.test(e))throw Error(r0+"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 n0(a,e,i,r){var n=a.c;if(i===y2)i=a.constructor.RM;if(i!==0&&i!==1&&i!==2&&i!==3)throw Error(Br);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]!==y2))),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]!==y2||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 l0(a,e,i){var r=a.e,n=a.c.join(""),l=n.length;if(e)n=n.charAt(0)+(l>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>l)for(r-=l;r--;)n+="0";else if(r<l)n=n.slice(0,r)+"."+n.slice(r)}else if(l>1)n=n.charAt(0)+"."+n.slice(1);return a.s<0&&i?"-"+n:n}Z1.abs=function(){var a=new this.constructor(this);return a.s=1,a};Z1.cmp=function(a){var e,i=this,r=i.c,n=(a=new i.constructor(a)).c,l=i.s,t=a.s,s=i.e,o=a.e;if(!r[0]||!n[0])return!r[0]?!n[0]?0:-t:l;if(l!=t)return l;if(e=l<0,s!=o)return s>o^e?1:-1;t=(s=r.length)<(o=n.length)?s:o;for(l=-1;++l<t;)if(r[l]!=n[l])return r[l]>n[l]^e?1:-1;return s==o?0:s>o^e?1:-1};Z1.div=function(a){var e=this,i=e.constructor,r=e.c,n=(a=new i(a)).c,l=e.s==a.s?1:-1,t=i.DP;if(t!==~~t||t<0||t>i0)throw Error(Ka);if(!n[0])throw Error(A7);if(!r[0])return a.s=l,a.c=[a.e=0],a;var s,o,d,u,m,h=n.slice(),f=s=n.length,g=r.length,v=r.slice(0,s),x=v.length,z=a,k=z.c=[],w=0,p=t+(z.e=e.e-a.e)+1;z.s=l,l=p<0?0:p,h.unshift(0);for(;x++<s;)v.push(0);do{for(d=0;d<10;d++){if(s!=(x=v.length))u=s>x?1:-1;else for(m=-1,u=0;++m<s;)if(n[m]!=v[m]){u=n[m]>v[m]?1:-1;break}if(u<0){for(o=x==s?n:h;x;){if(v[--x]<o[x]){m=x;for(;m&&!v[--m];)v[m]=9;--v[m],v[x]+=10}v[x]-=o[x]}for(;!v[0];)v.shift()}else break}if(k[w++]=u?d:++d,v[0]&&u)v[x]=r[f]||0;else v=[r[f]]}while((f++<g||v[0]!==y2)&&l--);if(!k[0]&&w!=1)k.shift(),z.e--,p--;if(w>p)n0(z,p,i.RM,v[0]!==y2);return z};Z1.eq=function(a){return this.cmp(a)===0};Z1.gt=function(a){return this.cmp(a)>0};Z1.gte=function(a){return this.cmp(a)>-1};Z1.lt=function(a){return this.cmp(a)<0};Z1.lte=function(a){return this.cmp(a)<1};Z1.minus=Z1.sub=function(a){var e,i,r,n,l=this,t=l.constructor,s=l.s,o=(a=new t(a)).s;if(s!=o)return a.s=-o,l.plus(a);var d=l.c.slice(),u=l.e,m=a.c,h=a.e;if(!d[0]||!m[0]){if(m[0])a.s=-o;else if(d[0])a=new t(l);else a.s=1;return a}if(s=u-h){if(n=s<0)s=-s,r=d;else h=u,r=m;r.reverse();for(o=s;o--;)r.push(0);r.reverse()}else{i=((n=d.length<m.length)?d:m).length;for(s=o=0;o<i;o++)if(d[o]!=m[o]){n=d[o]<m[o];break}}if(n)r=d,d=m,m=r,a.s=-a.s;if((o=(i=m.length)-(e=d.length))>0)for(;o--;)d[e++]=0;for(o=e;i>s;){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[--o]===0;)d.pop();for(;d[0]===0;)d.shift(),--h;if(!d[0])a.s=1,d=[h=0];return a.c=d,a.e=h,a};Z1.mod=function(a){var e,i=this,r=i.constructor,n=i.s,l=(a=new r(a)).s;if(!a.c[0])throw Error(A7);if(i.s=a.s=1,e=a.cmp(i)==1,i.s=n,a.s=l,e)return new r(i);return n=r.DP,l=r.RM,r.DP=r.RM=0,i=i.div(a),r.DP=n,r.RM=l,this.minus(i.times(a))};Z1.neg=function(){var a=new this.constructor(this);return a.s=-a.s,a};Z1.plus=Z1.add=function(a){var e,i,r,n=this,l=n.constructor;if(a=new l(a),n.s!=a.s)return a.s=-a.s,n.minus(a);var{e:t,c:s}=n,o=a.e,d=a.c;if(!s[0]||!d[0]){if(!d[0])if(s[0])a=new l(n);else a.s=n.s;return a}if(s=s.slice(),e=t-o){if(e>0)o=t,r=d;else e=-e,r=s;r.reverse();for(;e--;)r.push(0);r.reverse()}if(s.length-d.length<0)r=d,d=s,s=r;e=d.length;for(i=0;e;s[e]%=10)i=(s[--e]=s[e]+d[e]+i)/10|0;if(i)s.unshift(i),++o;for(e=s.length;s[--e]===0;)s.pop();return a.c=s,a.e=o,a};Z1.pow=function(a){var e=this,i=new e.constructor("1"),r=i,n=a<0;if(a!==~~a||a<-W7||a>W7)throw Error(r0+"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};Z1.prec=function(a,e){if(a!==~~a||a<1||a>i0)throw Error(r0+"precision");return n0(new this.constructor(this),a,e)};Z1.round=function(a,e){if(a===y2)a=0;else if(a!==~~a||a<-i0||a>i0)throw Error(Ka);return n0(new this.constructor(this),a+this.e+1,e)};Z1.sqrt=function(){var a,e,i,r=this,n=r.constructor,l=r.s,t=r.e,s=new n("0.5");if(!r.c[0])return new n(r);if(l<0)throw Error(aa+"No square root");if(l=Math.sqrt(+l0(r,!0,!0)),l===0||l===1/0){if(e=r.c.join(""),!(e.length+t&1))e+="0";l=Math.sqrt(e),t=((t+1)/2|0)-(t<0||t&1),a=new n((l==1/0?"5e":(l=l.toExponential()).slice(0,l.indexOf("e")+1))+t)}else a=new n(l+"");t=a.e+(n.DP+=4);do i=a,a=s.times(i.plus(r.div(i)));while(i.c.slice(0,t).join("")!==a.c.slice(0,t).join(""));return n0(a,(n.DP-=4)+a.e+1,n.RM)};Z1.times=Z1.mul=function(a){var e,i=this,r=i.constructor,n=i.c,l=(a=new r(a)).c,t=n.length,s=l.length,o=i.e,d=a.e;if(a.s=i.s==a.s?1:-1,!n[0]||!l[0])return a.c=[a.e=0],a;if(a.e=o+d,t<s)e=n,n=l,l=e,d=t,t=s,s=d;for(e=new Array(d=t+s);d--;)e[d]=0;for(o=s;o--;){s=0;for(d=t+o;d>o;)s=e[d]+l[o]*n[d-o-1]+s,e[d--]=s%10,s=s/10|0;e[d]=s}if(s)++a.e;else e.shift();for(o=e.length;!e[--o];)e.pop();return a.c=e,a};Z1.toExponential=function(a,e){var i=this,r=i.c[0];if(a!==y2){if(a!==~~a||a<0||a>i0)throw Error(Ka);i=n0(new i.constructor(i),++a,e);for(;i.c.length<a;)i.c.push(0)}return l0(i,!0,!!r)};Z1.toFixed=function(a,e){var i=this,r=i.c[0];if(a!==y2){if(a!==~~a||a<0||a>i0)throw Error(Ka);i=n0(new i.constructor(i),a+i.e+1,e);for(a=a+i.e+1;i.c.length<a;)i.c.push(0)}return l0(i,!1,!!r)};Z1.toJSON=Z1.toString=function(){var a=this,e=a.constructor;return l0(a,a.e<=e.NE||a.e>=e.PE,!!a.c[0])};if(typeof Symbol!=="undefined")Z1[Symbol.for("nodejs.util.inspect.custom")]=Z1.toJSON;Z1.toNumber=function(){var a=+l0(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(a.toString()))throw Error(aa+"Imprecise conversion");return a};Z1.toPrecision=function(a,e){var i=this,r=i.constructor,n=i.c[0];if(a!==y2){if(a!==~~a||a<1||a>i0)throw Error(r0+"precision");i=n0(new r(i),a,e);for(;i.c.length<a;)i.c.push(0)}return l0(i,a<=i.e||i.e<=r.NE||i.e>=r.PE,!!n)};Z1.valueOf=function(){var a=this,e=a.constructor;if(e.strict===!0)throw Error(aa+"valueOf disallowed");return l0(a,a.e<=e.NE||a.e>=e.PE,!0)};var H2=$7(),K=H2;class Oa extends Y{constructor(){super(...arguments);this.currency=c1;this.balance=t1.balance;this.currencyDecimals=t1.currencyDecimals;this.baseUrl=t1.baseUrl;this.authToken=t1.authToken;this.origamiGame="DICE";this.lobbyUrl=t1.lobbyUrl;this.depositUrl=t1.depositUrl;this.maxPayout=t1.maxPayout;this.minBet=t1.minBet;this.maxBet=t1.maxBet;this.edge=t1.edge;this.showCurrencyAsText=!1;this.footerPosition=t1.footerPosition;this.logoUrl=null;this.seasonTheme="DEFAULT";this.alwaysEnableMaxBetButton=t1.alwaysEnableMaxBetButton;this.gcCurrencyIconSvgUrl=t1.gcCurrencyIconSvgUrl;this.scCurrencyIconSvgUrl=t1.scCurrencyIconSvgUrl;this.customMinesBackgroundSvgUrl=t1.customMinesBackgroundSvgUrl;this.customMinesGemSvgUrl=t1.customMinesGemSvgUrl;this.customMinesBombSvgUrl=t1.customMinesBombSvgUrl;this.customMinesTileSvgUrl=t1.customMinesTileSvgUrl;this.customKenoBackgroundSvgUrl=t1.customKenoBackgroundSvgUrl;this.customKenoGemSvgUrl=t1.customKenoGemSvgUrl;this.customKenoNonMatchTileSvgUrl=t1.customKenoNonMatchTileSvgUrl;this.customKenoTileSvgUrl=t1.customKenoTileSvgUrl;this.customKenoSelectedTileSvgUrl=t1.customKenoSelectedTileSvgUrl;this.customRouletteBackgroundSvgUrl=t1.customRouletteBackgroundSvgUrl;this.roulettePreventOppositeBets=t1.roulettePreventOppositeBets;this.rouletteDefaultInstantBet=!1;this.customDiceBackgroundSvgUrl=t1.customDiceBackgroundSvgUrl;this.diceMinMultiplier=t1.diceMinMultiplier;this.advancedDiceMinMultiplier=t1.advancedDiceMinMultiplier;this.customAdvancedDiceBackgroundSvgUrl=t1.customAdvancedDiceBackgroundSvgUrl;this.customPlinkoBackgroundSvgUrl=t1.customPlinkoBackgroundSvgUrl;this.customPlinkoEdgeColor=t1.customPlinkoEdgeColor;this.customPlinkoCenterColor=t1.customPlinkoCenterColor;this.customBaccaratBackgroundSvgUrl=t1.customBaccaratBackgroundSvgUrl;this.customBaccaratCardBackSvgUrl=t1.customBaccaratCardBackSvgUrl;this.baccaratPreventOppositeBets=t1.baccaratPreventOppositeBets;this.customLimboBackgroundSvgUrl=t1.customLimboBackgroundSvgUrl;this.customWheelBackgroundSvgUrl=t1.customWheelBackgroundSvgUrl;this.customWheelCenterSvgUrl=t1.customWheelCenterSvgUrl;this.customWheelCenterPadding=t1.customWheelCenterPadding;this.customDiamondsBackgroundSvgUrl=t1.customDiamondsBackgroundSvgUrl;this.customBlackjackBackgroundSvgUrl=t1.customBlackjackBackgroundSvgUrl;this.customCardBackSvgUrl=t1.customCardBackSvgUrl;this.customFooterLobbySvgUrl=t1.customFooterLobbySvgUrl;this.customFooterVolumeSvgUrl=t1.customFooterVolumeSvgUrl;this.customFooterGameInfoSvgUrl=t1.customFooterGameInfoSvgUrl;this.customFooterInstantBetSvgUrl=t1.customFooterInstantBetSvgUrl;this.customFooterHotkeysSvgUrl=t1.customFooterHotkeysSvgUrl;this.customFooterProvablyFairSvgUrl=t1.customFooterProvablyFairSvgUrl;this.betAmount=t1.betAmount;this.autobetNumberOfBets=t1.autobetNumberOfBets;this.hotkeysOpenEnabled=!1;this.showMaxBetButton=t1.showMaxBetButton;this.volume=t1.volume;this.instantBetEnabled=t1.instantBetEnabled;this.mainWidth=t1.mainWidth;this.publicKey=t1.publicKey;this.scale=1;this.language=t1.language;this.hasLoadedBalance=!1}static styles=[T7];_soundController=new N3(this);_historyController=new X3(this);_hapticController=new C3(this);_resizeObserver=null;_gameProvider=new U2(this,{context:P,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,!k7.includes(this.origamiGame))this.updateBetAmount(K(this.minBet??0))}disconnectedCallback(){super.disconnectedCallback(),this.cleanupResizeObserver()}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("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("customBaccaratCardBackSvgUrl")||a.has("baccaratPreventOppositeBets")||a.has("customLimboBackgroundSvgUrl")||a.has("customWheelBackgroundSvgUrl")||a.has("customWheelCenterSvgUrl")||a.has("customWheelCenterPadding")||a.has("customDiamondsBackgroundSvgUrl")||a.has("customBlackjackBackgroundSvgUrl")||a.has("customCardBackSvgUrl")||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,soundController:this._soundController,historyController:this._historyController,hapticController:this._hapticController,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,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,customBaccaratCardBackSvgUrl:this.customBaccaratCardBackSvgUrl,baccaratPreventOppositeBets:this.baccaratPreventOppositeBets,customLimboBackgroundSvgUrl:this.customLimboBackgroundSvgUrl,customWheelBackgroundSvgUrl:this.customWheelBackgroundSvgUrl,customWheelCenterSvgUrl:this.customWheelCenterSvgUrl,customWheelCenterPadding:this.customWheelCenterPadding,customDiamondsBackgroundSvgUrl:this.customDiamondsBackgroundSvgUrl,customBlackjackBackgroundSvgUrl:this.customBlackjackBackgroundSvgUrl,customCardBackSvgUrl:this.customCardBackSvgUrl,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=K(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.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 l=e/675;this.scale=l}else{let l=a/1200;this.scale=l}this.requestUpdate()}render(){let a=(()=>{switch(this.origamiGame){case"DICE":return Z`<origami-dice-game></origami-dice-game>`;case"KENO":return Z`<origami-keno-game></origami-keno-game>`;case"MINES":return Z`<origami-mines-game></origami-mines-game>`;case"LIMBO":return Z`<origami-limbo-game></origami-limbo-game>`;case"ADVANCED_DICE":return Z`<origami-advanced-dice-game></origami-advanced-dice-game>`;case"PLINKO":return Z`<origami-plinko-game></origami-plinko-game>`;case"DIAMONDS":return Z`<origami-diamonds-game></origami-diamonds-game>`;case"WHEEL":return Z`<origami-wheel-game></origami-wheel-game>`;case"ROULETTE":return Z`<origami-roulette-game></origami-roulette-game>`;case"BACCARAT":return Z`<origami-baccarat-game></origami-baccarat-game>`;default:this.origamiGame}})(),e=`
|
|
91
|
+
`;var Xr=20,Nr=1,i0=1e6,W7=1e6,Gr=-7,Pr=21,Ur=!1,aa="[big.js] ",r0=aa+"Invalid ",Ka=r0+"decimal places",Br=r0+"rounding mode",A7=aa+"Division by zero",Z1={},y2=void 0,_r=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function $7(){function a(e){var i=this;if(!(i instanceof a))return e===y2&&arguments.length===0?$7():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(r0+"value");e=e===0&&1/e<0?"-0":String(e)}a9(i,e)}i.constructor=a}return a.prototype=Z1,a.DP=Xr,a.RM=Nr,a.NE=Gr,a.PE=Pr,a.strict=Ur,a.roundDown=0,a.roundHalfUp=1,a.roundHalfEven=2,a.roundUp=3,a}function a9(a,e){var i,r,n;if(!_r.test(e))throw Error(r0+"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 n0(a,e,i,r){var n=a.c;if(i===y2)i=a.constructor.RM;if(i!==0&&i!==1&&i!==2&&i!==3)throw Error(Br);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]!==y2))),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]!==y2||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 l0(a,e,i){var r=a.e,n=a.c.join(""),l=n.length;if(e)n=n.charAt(0)+(l>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>l)for(r-=l;r--;)n+="0";else if(r<l)n=n.slice(0,r)+"."+n.slice(r)}else if(l>1)n=n.charAt(0)+"."+n.slice(1);return a.s<0&&i?"-"+n:n}Z1.abs=function(){var a=new this.constructor(this);return a.s=1,a};Z1.cmp=function(a){var e,i=this,r=i.c,n=(a=new i.constructor(a)).c,l=i.s,t=a.s,s=i.e,o=a.e;if(!r[0]||!n[0])return!r[0]?!n[0]?0:-t:l;if(l!=t)return l;if(e=l<0,s!=o)return s>o^e?1:-1;t=(s=r.length)<(o=n.length)?s:o;for(l=-1;++l<t;)if(r[l]!=n[l])return r[l]>n[l]^e?1:-1;return s==o?0:s>o^e?1:-1};Z1.div=function(a){var e=this,i=e.constructor,r=e.c,n=(a=new i(a)).c,l=e.s==a.s?1:-1,t=i.DP;if(t!==~~t||t<0||t>i0)throw Error(Ka);if(!n[0])throw Error(A7);if(!r[0])return a.s=l,a.c=[a.e=0],a;var s,o,d,u,m,h=n.slice(),f=s=n.length,g=r.length,v=r.slice(0,s),x=v.length,z=a,k=z.c=[],w=0,p=t+(z.e=e.e-a.e)+1;z.s=l,l=p<0?0:p,h.unshift(0);for(;x++<s;)v.push(0);do{for(d=0;d<10;d++){if(s!=(x=v.length))u=s>x?1:-1;else for(m=-1,u=0;++m<s;)if(n[m]!=v[m]){u=n[m]>v[m]?1:-1;break}if(u<0){for(o=x==s?n:h;x;){if(v[--x]<o[x]){m=x;for(;m&&!v[--m];)v[m]=9;--v[m],v[x]+=10}v[x]-=o[x]}for(;!v[0];)v.shift()}else break}if(k[w++]=u?d:++d,v[0]&&u)v[x]=r[f]||0;else v=[r[f]]}while((f++<g||v[0]!==y2)&&l--);if(!k[0]&&w!=1)k.shift(),z.e--,p--;if(w>p)n0(z,p,i.RM,v[0]!==y2);return z};Z1.eq=function(a){return this.cmp(a)===0};Z1.gt=function(a){return this.cmp(a)>0};Z1.gte=function(a){return this.cmp(a)>-1};Z1.lt=function(a){return this.cmp(a)<0};Z1.lte=function(a){return this.cmp(a)<1};Z1.minus=Z1.sub=function(a){var e,i,r,n,l=this,t=l.constructor,s=l.s,o=(a=new t(a)).s;if(s!=o)return a.s=-o,l.plus(a);var d=l.c.slice(),u=l.e,m=a.c,h=a.e;if(!d[0]||!m[0]){if(m[0])a.s=-o;else if(d[0])a=new t(l);else a.s=1;return a}if(s=u-h){if(n=s<0)s=-s,r=d;else h=u,r=m;r.reverse();for(o=s;o--;)r.push(0);r.reverse()}else{i=((n=d.length<m.length)?d:m).length;for(s=o=0;o<i;o++)if(d[o]!=m[o]){n=d[o]<m[o];break}}if(n)r=d,d=m,m=r,a.s=-a.s;if((o=(i=m.length)-(e=d.length))>0)for(;o--;)d[e++]=0;for(o=e;i>s;){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[--o]===0;)d.pop();for(;d[0]===0;)d.shift(),--h;if(!d[0])a.s=1,d=[h=0];return a.c=d,a.e=h,a};Z1.mod=function(a){var e,i=this,r=i.constructor,n=i.s,l=(a=new r(a)).s;if(!a.c[0])throw Error(A7);if(i.s=a.s=1,e=a.cmp(i)==1,i.s=n,a.s=l,e)return new r(i);return n=r.DP,l=r.RM,r.DP=r.RM=0,i=i.div(a),r.DP=n,r.RM=l,this.minus(i.times(a))};Z1.neg=function(){var a=new this.constructor(this);return a.s=-a.s,a};Z1.plus=Z1.add=function(a){var e,i,r,n=this,l=n.constructor;if(a=new l(a),n.s!=a.s)return a.s=-a.s,n.minus(a);var{e:t,c:s}=n,o=a.e,d=a.c;if(!s[0]||!d[0]){if(!d[0])if(s[0])a=new l(n);else a.s=n.s;return a}if(s=s.slice(),e=t-o){if(e>0)o=t,r=d;else e=-e,r=s;r.reverse();for(;e--;)r.push(0);r.reverse()}if(s.length-d.length<0)r=d,d=s,s=r;e=d.length;for(i=0;e;s[e]%=10)i=(s[--e]=s[e]+d[e]+i)/10|0;if(i)s.unshift(i),++o;for(e=s.length;s[--e]===0;)s.pop();return a.c=s,a.e=o,a};Z1.pow=function(a){var e=this,i=new e.constructor("1"),r=i,n=a<0;if(a!==~~a||a<-W7||a>W7)throw Error(r0+"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};Z1.prec=function(a,e){if(a!==~~a||a<1||a>i0)throw Error(r0+"precision");return n0(new this.constructor(this),a,e)};Z1.round=function(a,e){if(a===y2)a=0;else if(a!==~~a||a<-i0||a>i0)throw Error(Ka);return n0(new this.constructor(this),a+this.e+1,e)};Z1.sqrt=function(){var a,e,i,r=this,n=r.constructor,l=r.s,t=r.e,s=new n("0.5");if(!r.c[0])return new n(r);if(l<0)throw Error(aa+"No square root");if(l=Math.sqrt(+l0(r,!0,!0)),l===0||l===1/0){if(e=r.c.join(""),!(e.length+t&1))e+="0";l=Math.sqrt(e),t=((t+1)/2|0)-(t<0||t&1),a=new n((l==1/0?"5e":(l=l.toExponential()).slice(0,l.indexOf("e")+1))+t)}else a=new n(l+"");t=a.e+(n.DP+=4);do i=a,a=s.times(i.plus(r.div(i)));while(i.c.slice(0,t).join("")!==a.c.slice(0,t).join(""));return n0(a,(n.DP-=4)+a.e+1,n.RM)};Z1.times=Z1.mul=function(a){var e,i=this,r=i.constructor,n=i.c,l=(a=new r(a)).c,t=n.length,s=l.length,o=i.e,d=a.e;if(a.s=i.s==a.s?1:-1,!n[0]||!l[0])return a.c=[a.e=0],a;if(a.e=o+d,t<s)e=n,n=l,l=e,d=t,t=s,s=d;for(e=new Array(d=t+s);d--;)e[d]=0;for(o=s;o--;){s=0;for(d=t+o;d>o;)s=e[d]+l[o]*n[d-o-1]+s,e[d--]=s%10,s=s/10|0;e[d]=s}if(s)++a.e;else e.shift();for(o=e.length;!e[--o];)e.pop();return a.c=e,a};Z1.toExponential=function(a,e){var i=this,r=i.c[0];if(a!==y2){if(a!==~~a||a<0||a>i0)throw Error(Ka);i=n0(new i.constructor(i),++a,e);for(;i.c.length<a;)i.c.push(0)}return l0(i,!0,!!r)};Z1.toFixed=function(a,e){var i=this,r=i.c[0];if(a!==y2){if(a!==~~a||a<0||a>i0)throw Error(Ka);i=n0(new i.constructor(i),a+i.e+1,e);for(a=a+i.e+1;i.c.length<a;)i.c.push(0)}return l0(i,!1,!!r)};Z1.toJSON=Z1.toString=function(){var a=this,e=a.constructor;return l0(a,a.e<=e.NE||a.e>=e.PE,!!a.c[0])};if(typeof Symbol!=="undefined")Z1[Symbol.for("nodejs.util.inspect.custom")]=Z1.toJSON;Z1.toNumber=function(){var a=+l0(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(a.toString()))throw Error(aa+"Imprecise conversion");return a};Z1.toPrecision=function(a,e){var i=this,r=i.constructor,n=i.c[0];if(a!==y2){if(a!==~~a||a<1||a>i0)throw Error(r0+"precision");i=n0(new r(i),a,e);for(;i.c.length<a;)i.c.push(0)}return l0(i,a<=i.e||i.e<=r.NE||i.e>=r.PE,!!n)};Z1.valueOf=function(){var a=this,e=a.constructor;if(e.strict===!0)throw Error(aa+"valueOf disallowed");return l0(a,a.e<=e.NE||a.e>=e.PE,!0)};var H2=$7(),K=H2;class Oa extends Y{constructor(){super(...arguments);this.currency=c1;this.balance=t1.balance;this.currencyDecimals=t1.currencyDecimals;this.baseUrl=t1.baseUrl;this.authToken=t1.authToken;this.origamiGame="DICE";this.lobbyUrl=t1.lobbyUrl;this.depositUrl=t1.depositUrl;this.maxPayout=t1.maxPayout;this.minBet=t1.minBet;this.maxBet=t1.maxBet;this.edge=t1.edge;this.showCurrencyAsText=!1;this.footerPosition=t1.footerPosition;this.logoUrl=null;this.seasonTheme="DEFAULT";this.alwaysEnableMaxBetButton=t1.alwaysEnableMaxBetButton;this.gcCurrencyIconSvgUrl=t1.gcCurrencyIconSvgUrl;this.scCurrencyIconSvgUrl=t1.scCurrencyIconSvgUrl;this.customMinesBackgroundSvgUrl=t1.customMinesBackgroundSvgUrl;this.customMinesGemSvgUrl=t1.customMinesGemSvgUrl;this.customMinesBombSvgUrl=t1.customMinesBombSvgUrl;this.customMinesTileSvgUrl=t1.customMinesTileSvgUrl;this.customMinesAutobetSelectedTileSvgUrl=t1.customMinesAutobetSelectedTileSvgUrl;this.customKenoBackgroundSvgUrl=t1.customKenoBackgroundSvgUrl;this.customKenoGemSvgUrl=t1.customKenoGemSvgUrl;this.customKenoNonMatchTileSvgUrl=t1.customKenoNonMatchTileSvgUrl;this.customKenoTileSvgUrl=t1.customKenoTileSvgUrl;this.customKenoSelectedTileSvgUrl=t1.customKenoSelectedTileSvgUrl;this.customRouletteBackgroundSvgUrl=t1.customRouletteBackgroundSvgUrl;this.roulettePreventOppositeBets=t1.roulettePreventOppositeBets;this.rouletteDefaultInstantBet=!1;this.customDiceBackgroundSvgUrl=t1.customDiceBackgroundSvgUrl;this.diceMinMultiplier=t1.diceMinMultiplier;this.advancedDiceMinMultiplier=t1.advancedDiceMinMultiplier;this.customAdvancedDiceBackgroundSvgUrl=t1.customAdvancedDiceBackgroundSvgUrl;this.customPlinkoBackgroundSvgUrl=t1.customPlinkoBackgroundSvgUrl;this.customPlinkoEdgeColor=t1.customPlinkoEdgeColor;this.customPlinkoCenterColor=t1.customPlinkoCenterColor;this.customBaccaratBackgroundSvgUrl=t1.customBaccaratBackgroundSvgUrl;this.customBaccaratCardBackSvgUrl=t1.customBaccaratCardBackSvgUrl;this.baccaratPreventOppositeBets=t1.baccaratPreventOppositeBets;this.customLimboBackgroundSvgUrl=t1.customLimboBackgroundSvgUrl;this.customWheelBackgroundSvgUrl=t1.customWheelBackgroundSvgUrl;this.customWheelCenterSvgUrl=t1.customWheelCenterSvgUrl;this.customWheelCenterPadding=t1.customWheelCenterPadding;this.customDiamondsBackgroundSvgUrl=t1.customDiamondsBackgroundSvgUrl;this.customBlackjackBackgroundSvgUrl=t1.customBlackjackBackgroundSvgUrl;this.customCardBackSvgUrl=t1.customCardBackSvgUrl;this.customFooterLobbySvgUrl=t1.customFooterLobbySvgUrl;this.customFooterVolumeSvgUrl=t1.customFooterVolumeSvgUrl;this.customFooterGameInfoSvgUrl=t1.customFooterGameInfoSvgUrl;this.customFooterInstantBetSvgUrl=t1.customFooterInstantBetSvgUrl;this.customFooterHotkeysSvgUrl=t1.customFooterHotkeysSvgUrl;this.customFooterProvablyFairSvgUrl=t1.customFooterProvablyFairSvgUrl;this.betAmount=t1.betAmount;this.autobetNumberOfBets=t1.autobetNumberOfBets;this.hotkeysOpenEnabled=!1;this.showMaxBetButton=t1.showMaxBetButton;this.volume=t1.volume;this.instantBetEnabled=t1.instantBetEnabled;this.mainWidth=t1.mainWidth;this.publicKey=t1.publicKey;this.scale=1;this.language=t1.language;this.hasLoadedBalance=!1}static styles=[T7];_soundController=new N3(this);_historyController=new X3(this);_hapticController=new C3(this);_resizeObserver=null;_gameProvider=new U2(this,{context:P,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,!k7.includes(this.origamiGame))this.updateBetAmount(K(this.minBet??0))}disconnectedCallback(){super.disconnectedCallback(),this.cleanupResizeObserver()}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("customBaccaratCardBackSvgUrl")||a.has("baccaratPreventOppositeBets")||a.has("customLimboBackgroundSvgUrl")||a.has("customWheelBackgroundSvgUrl")||a.has("customWheelCenterSvgUrl")||a.has("customWheelCenterPadding")||a.has("customDiamondsBackgroundSvgUrl")||a.has("customBlackjackBackgroundSvgUrl")||a.has("customCardBackSvgUrl")||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,soundController:this._soundController,historyController:this._historyController,hapticController:this._hapticController,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,customBaccaratCardBackSvgUrl:this.customBaccaratCardBackSvgUrl,baccaratPreventOppositeBets:this.baccaratPreventOppositeBets,customLimboBackgroundSvgUrl:this.customLimboBackgroundSvgUrl,customWheelBackgroundSvgUrl:this.customWheelBackgroundSvgUrl,customWheelCenterSvgUrl:this.customWheelCenterSvgUrl,customWheelCenterPadding:this.customWheelCenterPadding,customDiamondsBackgroundSvgUrl:this.customDiamondsBackgroundSvgUrl,customBlackjackBackgroundSvgUrl:this.customBlackjackBackgroundSvgUrl,customCardBackSvgUrl:this.customCardBackSvgUrl,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=K(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.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 l=e/675;this.scale=l}else{let l=a/1200;this.scale=l}this.requestUpdate()}render(){let a=(()=>{switch(this.origamiGame){case"DICE":return Z`<origami-dice-game></origami-dice-game>`;case"KENO":return Z`<origami-keno-game></origami-keno-game>`;case"MINES":return Z`<origami-mines-game></origami-mines-game>`;case"LIMBO":return Z`<origami-limbo-game></origami-limbo-game>`;case"ADVANCED_DICE":return Z`<origami-advanced-dice-game></origami-advanced-dice-game>`;case"PLINKO":return Z`<origami-plinko-game></origami-plinko-game>`;case"DIAMONDS":return Z`<origami-diamonds-game></origami-diamonds-game>`;case"WHEEL":return Z`<origami-wheel-game></origami-wheel-game>`;case"ROULETTE":return Z`<origami-roulette-game></origami-roulette-game>`;case"BACCARAT":return Z`<origami-baccarat-game></origami-baccarat-game>`;default:this.origamiGame}})(),e=`
|
|
82
92
|
position: absolute;
|
|
83
93
|
top: 0%;
|
|
84
94
|
left: 0%;
|
|
@@ -92,7 +102,7 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
92
102
|
<div class=${B({"loading-overlay":!0,loaded:this.hasLoadedBalance})}>
|
|
93
103
|
<div class="loading-logo"></div>
|
|
94
104
|
</div>
|
|
95
|
-
`}}c([b({type:String})],Oa.prototype,"currency",void 0),c([b({type:Number})],Oa.prototype,"balance",void 0),c([b({type:Number})],Oa.prototype,"currencyDecimals",void 0),c([b({type:String})],Oa.prototype,"baseUrl",void 0),c([b({type:String})],Oa.prototype,"authToken",void 0),c([b({type:String})],Oa.prototype,"origamiGame",void 0),c([b({type:String})],Oa.prototype,"lobbyUrl",void 0),c([b({type:String})],Oa.prototype,"depositUrl",void 0),c([b({type:Number})],Oa.prototype,"maxPayout",void 0),c([b({type:Number})],Oa.prototype,"minBet",void 0),c([b({type:Number})],Oa.prototype,"maxBet",void 0),c([b({type:Number})],Oa.prototype,"edge",void 0),c([b({type:Boolean})],Oa.prototype,"showCurrencyAsText",void 0),c([b({type:String})],Oa.prototype,"footerPosition",void 0),c([b({type:String})],Oa.prototype,"logoUrl",void 0),c([b({type:String})],Oa.prototype,"seasonTheme",void 0),c([b({type:Boolean})],Oa.prototype,"alwaysEnableMaxBetButton",void 0),c([b({type:String})],Oa.prototype,"gcCurrencyIconSvgUrl",void 0),c([b({type:String})],Oa.prototype,"scCurrencyIconSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customMinesBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customMinesGemSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customMinesBombSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customMinesTileSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customKenoBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customKenoGemSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customKenoNonMatchTileSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customKenoTileSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customKenoSelectedTileSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customRouletteBackgroundSvgUrl",void 0),c([b({type:Boolean})],Oa.prototype,"roulettePreventOppositeBets",void 0),c([b({type:Boolean})],Oa.prototype,"rouletteDefaultInstantBet",void 0),c([b({type:String})],Oa.prototype,"customDiceBackgroundSvgUrl",void 0),c([b({type:Number})],Oa.prototype,"diceMinMultiplier",void 0),c([b({type:Number})],Oa.prototype,"advancedDiceMinMultiplier",void 0),c([b({type:String})],Oa.prototype,"customAdvancedDiceBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customPlinkoBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customPlinkoEdgeColor",void 0),c([b({type:String})],Oa.prototype,"customPlinkoCenterColor",void 0),c([b({type:String})],Oa.prototype,"customBaccaratBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customBaccaratCardBackSvgUrl",void 0),c([b({type:Boolean})],Oa.prototype,"baccaratPreventOppositeBets",void 0),c([b({type:String})],Oa.prototype,"customLimboBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customWheelBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customWheelCenterSvgUrl",void 0),c([b({type:Number})],Oa.prototype,"customWheelCenterPadding",void 0),c([b({type:String})],Oa.prototype,"customDiamondsBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customBlackjackBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customCardBackSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterLobbySvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterVolumeSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterGameInfoSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterInstantBetSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterHotkeysSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterProvablyFairSvgUrl",void 0),c([q()],Oa.prototype,"betAmount",void 0),c([q()],Oa.prototype,"autobetNumberOfBets",void 0),c([q()],Oa.prototype,"hotkeysOpenEnabled",void 0),c([q()],Oa.prototype,"showMaxBetButton",void 0),c([q()],Oa.prototype,"volume",void 0),c([q()],Oa.prototype,"instantBetEnabled",void 0),c([q()],Oa.prototype,"mainWidth",void 0),c([q()],Oa.prototype,"publicKey",void 0),c([q()],Oa.prototype,"scale",void 0),c([b()],Oa.prototype,"language",void 0),c([q()],Oa.prototype,"hasLoadedBalance",void 0),Oa=c([T("origami-game-provider-wrapper")],Oa);var D7=D`
|
|
105
|
+
`}}c([b({type:String})],Oa.prototype,"currency",void 0),c([b({type:Number})],Oa.prototype,"balance",void 0),c([b({type:Number})],Oa.prototype,"currencyDecimals",void 0),c([b({type:String})],Oa.prototype,"baseUrl",void 0),c([b({type:String})],Oa.prototype,"authToken",void 0),c([b({type:String})],Oa.prototype,"origamiGame",void 0),c([b({type:String})],Oa.prototype,"lobbyUrl",void 0),c([b({type:String})],Oa.prototype,"depositUrl",void 0),c([b({type:Number})],Oa.prototype,"maxPayout",void 0),c([b({type:Number})],Oa.prototype,"minBet",void 0),c([b({type:Number})],Oa.prototype,"maxBet",void 0),c([b({type:Number})],Oa.prototype,"edge",void 0),c([b({type:Boolean})],Oa.prototype,"showCurrencyAsText",void 0),c([b({type:String})],Oa.prototype,"footerPosition",void 0),c([b({type:String})],Oa.prototype,"logoUrl",void 0),c([b({type:String})],Oa.prototype,"seasonTheme",void 0),c([b({type:Boolean})],Oa.prototype,"alwaysEnableMaxBetButton",void 0),c([b({type:String})],Oa.prototype,"gcCurrencyIconSvgUrl",void 0),c([b({type:String})],Oa.prototype,"scCurrencyIconSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customMinesBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customMinesGemSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customMinesBombSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customMinesTileSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customMinesAutobetSelectedTileSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customKenoBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customKenoGemSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customKenoNonMatchTileSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customKenoTileSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customKenoSelectedTileSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customRouletteBackgroundSvgUrl",void 0),c([b({type:Boolean})],Oa.prototype,"roulettePreventOppositeBets",void 0),c([b({type:Boolean})],Oa.prototype,"rouletteDefaultInstantBet",void 0),c([b({type:String})],Oa.prototype,"customDiceBackgroundSvgUrl",void 0),c([b({type:Number})],Oa.prototype,"diceMinMultiplier",void 0),c([b({type:Number})],Oa.prototype,"advancedDiceMinMultiplier",void 0),c([b({type:String})],Oa.prototype,"customAdvancedDiceBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customPlinkoBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customPlinkoEdgeColor",void 0),c([b({type:String})],Oa.prototype,"customPlinkoCenterColor",void 0),c([b({type:String})],Oa.prototype,"customBaccaratBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customBaccaratCardBackSvgUrl",void 0),c([b({type:Boolean})],Oa.prototype,"baccaratPreventOppositeBets",void 0),c([b({type:String})],Oa.prototype,"customLimboBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customWheelBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customWheelCenterSvgUrl",void 0),c([b({type:Number})],Oa.prototype,"customWheelCenterPadding",void 0),c([b({type:String})],Oa.prototype,"customDiamondsBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customBlackjackBackgroundSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customCardBackSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterLobbySvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterVolumeSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterGameInfoSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterInstantBetSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterHotkeysSvgUrl",void 0),c([b({type:String})],Oa.prototype,"customFooterProvablyFairSvgUrl",void 0),c([q()],Oa.prototype,"betAmount",void 0),c([q()],Oa.prototype,"autobetNumberOfBets",void 0),c([q()],Oa.prototype,"hotkeysOpenEnabled",void 0),c([q()],Oa.prototype,"showMaxBetButton",void 0),c([q()],Oa.prototype,"volume",void 0),c([q()],Oa.prototype,"instantBetEnabled",void 0),c([q()],Oa.prototype,"mainWidth",void 0),c([q()],Oa.prototype,"publicKey",void 0),c([q()],Oa.prototype,"scale",void 0),c([b()],Oa.prototype,"language",void 0),c([q()],Oa.prototype,"hasLoadedBalance",void 0),Oa=c([T("origami-game-provider-wrapper")],Oa);var D7=D`
|
|
96
106
|
:host {
|
|
97
107
|
display: flex;
|
|
98
108
|
flex-direction: column;
|
|
@@ -4623,25 +4633,25 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
4623
4633
|
scaleUpTransform 0.2s cubic-bezier(0.08, 0.96, 0.59, 1.18) 0.1s forwards,
|
|
4624
4634
|
fadeIn 0.2s linear 0.1s forwards;
|
|
4625
4635
|
}
|
|
4626
|
-
`;class D4 extends Y{constructor(){super(...arguments);this.tileId=0;this.delayReveal=!1;this.autobetInProgress=!1;this.isAutoMode=!1;this.state="NORMAL";this.ariaLabel="";this.isLoading=!1;this.disabled=!1;this.bombGifVersion=0;this.bombGifActive=!1}static styles=[C,Pe];bombGifTimeout;updated(a){if(super.updated(a),a.has("state")){let e=a.get("state");if(e!==void 0&&!this._wasGemState(e)&&this._isGem)this.gameData?.hapticController?.click()}}willUpdate(a){if(a.has("state")){let e=a.get("state"),i=e!==void 0&&this._isSelectedBombState(e),r=this._isSelectedBombState(this.state);if(!i&&r)this.bombGifVersion=Date.now(),this._activateBombGif()}}_wasGemState(a){return["SELECTED_GEM","UNSELECTED_GEM","AUTOBET_SELECTED_GEM"].includes(a)}get _isRevealed(){return!["NORMAL","AUTOBET_SELECTED"].includes(this.state)}get _isMine(){return["SELECTED_BOMB","UNSELECTED_BOMB","AUTOBET_SELECTED_BOMB"].includes(this.state)}get _isGem(){return["SELECTED_GEM","UNSELECTED_GEM","AUTOBET_SELECTED_GEM"].includes(this.state)}get _isDisabled(){return this._isRevealed||this.disabled||this.isLoading}get _shouldShowBombFg(){return this.bombGifActive&&["SELECTED_BOMB","AUTOBET_SELECTED_BOMB"].includes(this.state)}get _shouldShowBombBg(){return["SELECTED_BOMB","AUTOBET_SELECTED_BOMB"].includes(this.state)}_isSelectedBombState(a){return["SELECTED_BOMB","AUTOBET_SELECTED_BOMB"].includes(a)}_activateBombGif(){if(this.bombGifTimeout!==void 0)clearTimeout(this.bombGifTimeout),this.bombGifTimeout=void 0;this.bombGifActive=!0,this.bombGifTimeout=window.setTimeout(()=>{this.bombGifActive=!1},1400)}disconnectedCallback(){if(super.disconnectedCallback(),this.bombGifTimeout!==void 0)clearTimeout(this.bombGifTimeout),this.bombGifTimeout=void 0}_handleClick(){this.gameData?.hapticController?.lightClick(),this.emit("mines-tile-selected",{detail:{tile:this.tileId}})}render(){let a={"mines-tile":!0,[this.state.toLowerCase().replace(/_/g,"-")]:!0,"delay-reveal":this.delayReveal,"is-loading":this.isLoading,"auto-mode":this.isAutoMode},
|
|
4636
|
+
`;class D4 extends Y{constructor(){super(...arguments);this.tileId=0;this.delayReveal=!1;this.autobetInProgress=!1;this.isAutoMode=!1;this.state="NORMAL";this.ariaLabel="";this.isLoading=!1;this.disabled=!1;this.bombGifVersion=0;this.bombGifActive=!1}static styles=[C,Pe];bombGifTimeout;updated(a){if(super.updated(a),a.has("state")){let e=a.get("state");if(e!==void 0&&!this._wasGemState(e)&&this._isGem)this.gameData?.hapticController?.click()}}willUpdate(a){if(a.has("state")){let e=a.get("state"),i=e!==void 0&&this._isSelectedBombState(e),r=this._isSelectedBombState(this.state);if(!i&&r)this.bombGifVersion=Date.now(),this._activateBombGif()}}_wasGemState(a){return["SELECTED_GEM","UNSELECTED_GEM","AUTOBET_SELECTED_GEM"].includes(a)}get _isRevealed(){return!["NORMAL","AUTOBET_SELECTED"].includes(this.state)}get _isMine(){return["SELECTED_BOMB","UNSELECTED_BOMB","AUTOBET_SELECTED_BOMB"].includes(this.state)}get _isGem(){return["SELECTED_GEM","UNSELECTED_GEM","AUTOBET_SELECTED_GEM"].includes(this.state)}get _isDisabled(){return this._isRevealed||this.disabled||this.isLoading}get _shouldShowBombFg(){return this.bombGifActive&&["SELECTED_BOMB","AUTOBET_SELECTED_BOMB"].includes(this.state)}get _shouldShowBombBg(){return["SELECTED_BOMB","AUTOBET_SELECTED_BOMB"].includes(this.state)}_isSelectedBombState(a){return["SELECTED_BOMB","AUTOBET_SELECTED_BOMB"].includes(a)}_activateBombGif(){if(this.bombGifTimeout!==void 0)clearTimeout(this.bombGifTimeout),this.bombGifTimeout=void 0;this.bombGifActive=!0,this.bombGifTimeout=window.setTimeout(()=>{this.bombGifActive=!1},1400)}disconnectedCallback(){if(super.disconnectedCallback(),this.bombGifTimeout!==void 0)clearTimeout(this.bombGifTimeout),this.bombGifTimeout=void 0}_handleClick(){this.gameData?.hapticController?.lightClick(),this.emit("mines-tile-selected",{detail:{tile:this.tileId}})}render(){let a=this.state==="AUTOBET_SELECTED"?this.gameData?.customMinesAutobetSelectedTileSvgUrl??this.gameData?.customMinesTileSvgUrl:this.gameData?.customMinesTileSvgUrl,e={"mines-tile":!0,[this.state.toLowerCase().replace(/_/g,"-")]:!0,"delay-reveal":this.delayReveal,"is-loading":this.isLoading,"auto-mode":this.isAutoMode},i=this.gameData?.language||W,r=this._isRevealed?this._isMine?`, ${S("games.mines.mine",i)}`:`, ${S("games.mines.gem",i)}`:`, ${S("games.mines.unrevealed",i)}`,n=this.ariaLabel||`${S("games.mines.tile",i)} ${this.tileId+1}${r}`,l=this.gameData?.customMinesGemSvgUrl?Z`<img class="custom-gem" src=${this.gameData.customMinesGemSvgUrl} alt="" aria-hidden="true" />`:Ge,t=this.gameData?.customMinesBombSvgUrl?Z`<img class="custom-bomb" src=${this.gameData.customMinesBombSvgUrl} alt="" aria-hidden="true" />`:Ne,s=a?Z`<img class="custom-tile" src=${a} alt="" aria-hidden="true" />`:Q;return Z`
|
|
4627
4637
|
<button
|
|
4628
4638
|
part="tile-button"
|
|
4629
4639
|
role="gridcell"
|
|
4630
4640
|
@click=${this._handleClick}
|
|
4631
|
-
class=${B(
|
|
4641
|
+
class=${B(e)}
|
|
4632
4642
|
?disabled=${this._isDisabled}
|
|
4633
|
-
aria-label=${
|
|
4643
|
+
aria-label=${n}
|
|
4634
4644
|
aria-pressed=${this._isRevealed}
|
|
4635
4645
|
data-is-mine=${this._isMine}
|
|
4636
|
-
>${
|
|
4646
|
+
>${s}</button>
|
|
4637
4647
|
<button class="rear-tile" ?disabled=${this._isDisabled} @click=${this._handleClick}>
|
|
4638
4648
|
${this._isRevealed?Z`
|
|
4639
4649
|
<div class="icon-container">
|
|
4640
4650
|
${this._isMine?Z`
|
|
4641
4651
|
${this._shouldShowBombBg?Z`<img class="bomb-bg" src=${`https://assets.betorigami.com/games/mines/explosion-bg.gif?v=${this.bombGifVersion}`} alt="" aria-hidden="true" />`:Q}
|
|
4642
|
-
${
|
|
4652
|
+
${t}
|
|
4643
4653
|
${this._shouldShowBombFg?Z`<img class="bomb-fg" src=${`https://assets.betorigami.com/games/mines/explosion-fg.gif?v=${this.bombGifVersion}`} alt="" aria-hidden="true" />`:Q}
|
|
4644
|
-
`:this._isGem?
|
|
4654
|
+
`:this._isGem?l:Q}
|
|
4645
4655
|
</div>
|
|
4646
4656
|
`:Q}
|
|
4647
4657
|
</button>
|
|
@@ -4746,7 +4756,7 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
4746
4756
|
${this.tiles.map((r,n)=>{let l=this.calculateTileState(r.id),t=!this._hasAnimatedInitialLoad&&this.minesState===null;return Z`
|
|
4747
4757
|
<origami-mines-tile
|
|
4748
4758
|
data-is-desktop=${this.isDesktop}
|
|
4749
|
-
class=${B({"is-revealed-gem":r.isRevealed&&!r.isMine&&this.minesState?.selectedTiles?.includes(r.id)===!0,"animate-in":t,"full-icon":!!this.gameData?.customMinesTileSvgUrl})}
|
|
4759
|
+
class=${B({"is-revealed-gem":r.isRevealed&&!r.isMine&&this.minesState?.selectedTiles?.includes(r.id)===!0,"animate-in":t,"full-icon":!!this.gameData?.customMinesTileSvgUrl||l==="AUTOBET_SELECTED"&&!!this.gameData?.customMinesAutobetSelectedTileSvgUrl})}
|
|
4750
4760
|
style=${t?w1({["--tile-animation-delay"]:`${n*20}ms`}):Q}
|
|
4751
4761
|
?disabled=${e||this.autobetInProgress}
|
|
4752
4762
|
?autobetInProgress=${this.autobetInProgress}
|
|
@@ -8481,7 +8491,6 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
8481
8491
|
display: block;
|
|
8482
8492
|
width: 100%;
|
|
8483
8493
|
height: 100%;
|
|
8484
|
-
-webkit-overflow-scrolling: touch;
|
|
8485
8494
|
touch-action: pan-y;
|
|
8486
8495
|
}
|
|
8487
8496
|
|
|
@@ -8506,10 +8515,6 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
8506
8515
|
position: relative;
|
|
8507
8516
|
container-type: inline-size;
|
|
8508
8517
|
height: 100%;
|
|
8509
|
-
-webkit-overflow-scrolling: touch;
|
|
8510
|
-
overflow-y: auto;
|
|
8511
|
-
overflow-x: hidden;
|
|
8512
|
-
overscroll-behavior: none;
|
|
8513
8518
|
}
|
|
8514
8519
|
|
|
8515
8520
|
@media (max-width: 768px) {
|
|
@@ -8527,8 +8532,7 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
8527
8532
|
background-color:var(--background-tertiary, #2F2F2F);
|
|
8528
8533
|
color: var(--primary-text-color, #FFFFFF);
|
|
8529
8534
|
flex: 1;
|
|
8530
|
-
|
|
8531
|
-
-webkit-overflow-scrolling: touch;
|
|
8535
|
+
min-height: 0;
|
|
8532
8536
|
width: 100%;
|
|
8533
8537
|
min-width: 300px;
|
|
8534
8538
|
border-bottom-left-radius: 0;
|
|
@@ -8548,18 +8552,17 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
8548
8552
|
|
|
8549
8553
|
.game-layout-game-area {
|
|
8550
8554
|
width: 100%;
|
|
8555
|
+
min-width: 0;
|
|
8551
8556
|
display: flex;
|
|
8552
8557
|
flex-direction: column;
|
|
8553
8558
|
justify-content: center;
|
|
8554
8559
|
align-items: center;
|
|
8555
8560
|
user-select: none;
|
|
8556
8561
|
position: relative;
|
|
8557
|
-
overflow: auto;
|
|
8558
|
-
-webkit-overflow-scrolling: touch;
|
|
8559
8562
|
margin: 0 auto;
|
|
8560
8563
|
order: 1;
|
|
8561
8564
|
transition: min-height var(--anim-duration-fast) var(--ease-out-cubic);
|
|
8562
|
-
min-height:
|
|
8565
|
+
min-height: 0;
|
|
8563
8566
|
padding: 12px;
|
|
8564
8567
|
background: var(--background-tertiary, #2F2F2F);
|
|
8565
8568
|
}
|
|
@@ -8604,6 +8607,7 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
8604
8607
|
|
|
8605
8608
|
::slotted([slot="game-area"]) {
|
|
8606
8609
|
width: 100%;
|
|
8610
|
+
height: 100%;
|
|
8607
8611
|
}
|
|
8608
8612
|
|
|
8609
8613
|
::slotted([slot="game-overlay"]) {
|
|
@@ -8651,7 +8655,6 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
8651
8655
|
}
|
|
8652
8656
|
|
|
8653
8657
|
.game-layout-game-area {
|
|
8654
|
-
min-height: auto;
|
|
8655
8658
|
height: 100%;
|
|
8656
8659
|
order: 2;
|
|
8657
8660
|
padding: 0;
|
|
@@ -8663,6 +8666,7 @@ var hr=Object.create;var{getPrototypeOf:cr,defineProperty:X6,getOwnPropertyNames
|
|
|
8663
8666
|
min-width: 300px;
|
|
8664
8667
|
border-right: 1px solid var(--layout-divider, var(--background-base, #1A1A1A));
|
|
8665
8668
|
order: 1;
|
|
8669
|
+
overflow-y: auto;
|
|
8666
8670
|
}
|
|
8667
8671
|
}
|
|
8668
8672
|
|