@betorigami/games 0.7.6 → 0.7.7

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
21
21
  https://github.com/lit/lit/issues/new?template=bug_report.md
22
22
  and include information about your build tooling, if any.
23
23
  `.trim().replace(/\n */g,`
24
- `),new Error(h)}return I3!==void 0?I3.createHTML(o):o}var T3=(d,o)=>{let h=d.length-1,f=[],w=o===g2?"<svg>":o===z2?"<math>":"",x,b=p1;for(let i=0;i<h;i++){let $=d[i],X=-1,j,Q=0,G;while(Q<$.length){if(b.lastIndex=Q,G=b.exec($),G===null)break;if(Q=b.lastIndex,b===p1){if(G[V3]==="!--")b=L3;else if(G[V3]!==void 0)b=c3;else if(G[y2]!==void 0){if(S3.test(G[y2]))x=new RegExp(`</${G[y2]}`,"g");b=X1}else if(G[M4]!==void 0)throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else if(b===X1)if(G[l4]===">")b=x??p1,X=-1;else if(G[R3]===void 0)X=-2;else X=b.lastIndex-G[p4].length,j=G[R3],b=G[B3]===void 0?X1:G[B3]==='"'?r2:E2;else if(b===r2||b===E2)b=X1;else if(b===L3||b===c3)b=p1;else b=X1,x=void 0}console.assert(X===-1||b===X1||b===E2||b===r2,"unexpected parse state B");let _=b===X1&&d[i+1].startsWith("/>")?" ":"";w+=b===p1?$+T4:X>=0?(f.push(j),$.slice(0,X)+s2+$.slice(X))+a0+_:$+a0+(X===-2?i:_)}let g=w+(d[h]||"<?>")+(o===g2?"</svg>":o===z2?"</math>":"");return[D3(d,g),f]};class r1{constructor({strings:d,["_$litType$"]:o},h){this.parts=[];let f,w=0,x=0,b=d.length-1,g=this.parts,[i,$]=T3(d,o);if(this.el=r1.createElement(i,h),K1.currentNode=this.el.content,o===g2||o===z2){let X=this.el.content.firstChild;X.replaceWith(...X.childNodes)}while((f=K1.nextNode())!==null&&g.length<b){if(f.nodeType===1){{let X=f.localName;if(/^(?:textarea|template)$/i.test(X)&&f.innerHTML.includes(a0)){let j=`Expressions are not supported inside \`${X}\` elements. See https://lit.dev/msg/expression-in-${X} for more information.`;if(X==="template")throw new Error(j);else P1("",j)}}if(f.hasAttributes()){for(let X of f.getAttributeNames())if(X.endsWith(s2)){let j=$[x++],G=f.getAttribute(X).split(a0),_=/([.?@])?(.*)/.exec(j);g.push({type:m2,index:w,name:_[2],strings:G,ctor:_[1]==="."?o5:_[1]==="?"?h5:_[1]==="@"?f5:T1}),f.removeAttribute(X)}else if(X.startsWith(a0))g.push({type:t2,index:w}),f.removeAttribute(X)}if(S3.test(f.tagName)){let X=f.textContent.split(a0),j=X.length-1;if(j>0){f.textContent=i2?i2.emptyScript:"";for(let Q=0;Q<j;Q++)f.append(X[Q],y1()),K1.nextNode(),g.push({type:Z2,index:++w});f.append(X[j],y1())}}}else if(f.nodeType===8)if(f.data===a2)g.push({type:Z2,index:w});else{let j=-1;while((j=f.data.indexOf(a0,j+1))!==-1)g.push({type:r4,index:w}),j+=a0.length-1}w++}if($.length!==x)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+d.join("${...}")+"`");z0&&z0({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:d})}static createElement(d,o){let h=j1.createElement("template");return h.innerHTML=d,h}}function I1(d,o,h=d,f){if(o===F0)return o;let w=f!==void 0?h.__directives?.[f]:h.__directive,x=E1(o)?void 0:o._$litDirective$;if(w?.constructor!==x){if(w?._$notifyDirectiveConnectionChanged?.(!1),x===void 0)w=void 0;else w=new x(d),w._$initialize(d,h,f);if(f!==void 0)(h.__directives??=[])[f]=w;else h.__directive=w}if(w!==void 0)o=I1(d,w._$resolve(d,o.values),w,f);return o}class d5{constructor(d,o){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=d,this._$parent=o}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(d){let{el:{content:o},parts:h}=this._$template,f=(d?.creationScope??j1).importNode(o,!0);K1.currentNode=f;let w=K1.nextNode(),x=0,b=0,g=h[0];while(g!==void 0){if(x===g.index){let i;if(g.type===Z2)i=new D1(w,w.nextSibling,this,d);else if(g.type===m2)i=new g.ctor(w,g.name,g.strings,this,d);else if(g.type===t2)i=new w5(w,this,d);this._$parts.push(i),g=h[++b]}if(x!==g?.index)w=K1.nextNode(),x++}return K1.currentNode=j1,f}_update(d){let o=0;for(let h of this._$parts){if(h!==void 0)if(z0&&z0({kind:"set part",part:h,value:d[o],valueIndex:o,values:d,templateInstance:this}),h.strings!==void 0)h._$setValue(d,h,o),o+=h.strings.length-2;else h._$setValue(d[o]);o++}}}class D1{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(d,o,h,f){this.type=Z2,this._$committedValue=u,this._$disconnectableChildren=void 0,this._$startNode=d,this._$endNode=o,this._$parent=h,this.options=f,this.__isConnected=f?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let d=y0(this._$startNode).parentNode,o=this._$parent;if(o!==void 0&&d?.nodeType===11)d=o.parentNode;return d}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(d,o=this){if(this.parentNode===null)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(d=I1(this,d,o),E1(d)){if(d===u||d==null||d===""){if(this._$committedValue!==u)z0&&z0({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=u}else if(d!==this._$committedValue&&d!==F0)this._commitText(d)}else if(d._$litType$!==void 0)this._commitTemplateResult(d);else if(d.nodeType!==void 0){if(this.options?.host===d){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",d,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(d)}else if(v3(d))this._commitIterable(d);else this._commitText(d)}_insert(d){return y0(y0(this._$startNode).parentNode).insertBefore(d,this._$endNode)}_commitNode(d){if(this._$committedValue!==d){if(this._$clear(),F1!==$2){let o=this._$startNode.parentNode?.nodeName;if(o==="STYLE"||o==="SCRIPT"){let h="Forbidden";if(o==="STYLE")h="Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.";else h="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw new Error(h)}}z0&&z0({kind:"commit node",start:this._$startNode,parent:this._$parent,value:d,options:this.options}),this._$committedValue=this._insert(d)}}_commitText(d){if(this._$committedValue!==u&&E1(this._$committedValue)){let o=y0(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=u2(o,"data","property");d=this._textSanitizer(d),z0&&z0({kind:"commit text",node:o,value:d,options:this.options}),o.data=d}else{let o=j1.createTextNode("");if(this._commitNode(o),this._textSanitizer===void 0)this._textSanitizer=u2(o,"data","property");d=this._textSanitizer(d),z0&&z0({kind:"commit text",node:o,value:d,options:this.options}),o.data=d}this._$committedValue=d}_commitTemplateResult(d){let{values:o,["_$litType$"]:h}=d,f=typeof h==="number"?this._$getTemplate(d):(h.el===void 0&&(h.el=r1.createElement(D3(h.h,h.h[0]),this.options)),h);if(this._$committedValue?._$template===f)z0&&z0({kind:"template updating",template:f,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:o}),this._$committedValue._update(o);else{let w=new d5(f,this),x=w._clone(this.options);z0&&z0({kind:"template instantiated",template:f,instance:w,parts:w._$parts,options:this.options,fragment:x,values:o}),w._update(o),z0&&z0({kind:"template instantiated and updated",template:f,instance:w,parts:w._$parts,options:this.options,fragment:x,values:o}),this._commitNode(x),this._$committedValue=w}}_$getTemplate(d){let o=C3.get(d.strings);if(o===void 0)C3.set(d.strings,o=new r1(d));return o}_commitIterable(d){if(!n2(this._$committedValue))this._$committedValue=[],this._$clear();let o=this._$committedValue,h=0,f;for(let w of d){if(h===o.length)o.push(f=new D1(this._insert(y1()),this._insert(y1()),this,this.options));else f=o[h];f._$setValue(w),h++}if(h<o.length)this._$clear(f&&y0(f._$endNode).nextSibling,h),o.length=h}_$clear(d=y0(this._$startNode).nextSibling,o){this._$notifyConnectionChanged?.(!1,!0,o);while(d&&d!==this._$endNode){let h=y0(d).nextSibling;y0(d).remove(),d=h}}setConnected(d){if(this._$parent===void 0)this.__isConnected=d,this._$notifyConnectionChanged?.(d);else throw new Error("part.setConnected() may only be called on a RootPart returned from render().")}}class T1{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(d,o,h,f,w){if(this.type=m2,this._$committedValue=u,this._$disconnectableChildren=void 0,this.element=d,this.name=o,this._$parent=f,this.options=w,h.length>2||h[0]!==""||h[1]!=="")this._$committedValue=new Array(h.length-1).fill(new String),this.strings=h;else this._$committedValue=u;this._sanitizer=void 0}_$setValue(d,o=this,h,f){let w=this.strings,x=!1;if(w===void 0){if(d=I1(this,d,o,0),x=!E1(d)||d!==this._$committedValue&&d!==F0,x)this._$committedValue=d}else{let b=d;d=w[0];let g,i;for(g=0;g<w.length-1;g++){if(i=I1(this,b[h+g],o,g),i===F0)i=this._$committedValue[g];if(x||=!E1(i)||i!==this._$committedValue[g],i===u)d=u;else if(d!==u)d+=(i??"")+w[g+1];this._$committedValue[g]=i}}if(x&&!f)this._commitValue(d)}_commitValue(d){if(d===u)y0(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=F1(this.element,this.name,"attribute");d=this._sanitizer(d??""),z0&&z0({kind:"commit attribute",element:this.element,name:this.name,value:d,options:this.options}),y0(this.element).setAttribute(this.name,d??"")}}}class o5 extends T1{constructor(){super(...arguments);this.type=P4}_commitValue(d){if(this._sanitizer===void 0)this._sanitizer=F1(this.element,this.name,"property");d=this._sanitizer(d),z0&&z0({kind:"commit property",element:this.element,name:this.name,value:d,options:this.options}),this.element[this.name]=d===u?void 0:d}}class h5 extends T1{constructor(){super(...arguments);this.type=y4}_commitValue(d){z0&&z0({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(d&&d!==u),options:this.options}),y0(this.element).toggleAttribute(this.name,!!d&&d!==u)}}class f5 extends T1{constructor(d,o,h,f,w){super(d,o,h,f,w);if(this.type=E4,this.strings!==void 0)throw new Error(`A \`<${d.localName}>\` has a \`@${o}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(d,o=this){if(d=I1(this,d,o,0)??u,d===F0)return;let h=this._$committedValue,f=d===u&&h!==u||d.capture!==h.capture||d.once!==h.once||d.passive!==h.passive,w=d!==u&&(h===u||f);if(z0&&z0({kind:"commit event listener",element:this.element,name:this.name,value:d,options:this.options,removeListener:f,addListener:w,oldListener:h}),f)this.element.removeEventListener(this.name,this,h);if(w)this.element.addEventListener(this.name,this,d);this._$committedValue=d}handleEvent(d){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,d);else this._$committedValue.handleEvent(d)}}class w5{constructor(d,o,h){this.element=d,this.type=t2,this._$disconnectableChildren=void 0,this._$parent=o,this.options=h}get _$isConnected(){return this._$parent._$isConnected}_$setValue(d){z0&&z0({kind:"commit to element binding",element:this.element,value:d,options:this.options}),I1(this,d)}}var O3={_boundAttributeSuffix:s2,_marker:a0,_markerMatch:a2,_HTML_RESULT:N3,_getTemplateHtml:T3,_TemplateInstance:d5,_isIterable:v3,_resolveDirective:I1,_ChildPart:D1,_AttributePart:T1,_BooleanAttributePart:h5,_EventPart:f5,_PropertyPart:o5,_ElementPart:w5},u4=S0.litHtmlPolyfillSupportDevMode;u4?.(r1,D1);(S0.litHtmlVersions??=[]).push("3.3.0");if(S0.litHtmlVersions.length>1)queueMicrotask(()=>{P1("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var G1=(d,o,h)=>{if(o==null)throw new TypeError(`The container to render into may not be ${o}`);let f=v4++,w=h?.renderBefore??o,x=w._$litPart$;if(z0&&z0({kind:"begin render",id:f,value:d,container:o,options:h,part:x}),x===void 0){let b=h?.renderBefore??null;w._$litPart$=x=new D1(o.insertBefore(y1(),b),b,void 0,h??{})}return x._$setValue(d),z0&&z0({kind:"end render",id:f,value:d,container:o,options:h,part:x}),x};G1.setSanitizer=N4,G1.createSanitizer=u2,G1._testOnlyClearSanitizerFactoryDoNotCallOrElse=D4;var s4=(d,o)=>d,x5=!0,f1=globalThis,A3;if(x5)f1.litIssuedWarnings??=new Set,A3=(d,o)=>{if(o+=` See https://lit.dev/msg/${d} for more information.`,!f1.litIssuedWarnings.has(o)&&!f1.litIssuedWarnings.has(d))console.warn(o),f1.litIssuedWarnings.add(o)};class _0 extends v0{constructor(){super(...arguments);this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){let d=super.createRenderRoot();return this.renderOptions.renderBefore??=d.firstChild,d}update(d){let o=this.render();if(!this.hasUpdated)this.renderOptions.isConnected=this.isConnected;super.update(d),this.__childPart=G1(o,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return F0}}_0._$litElement$=!0;_0[s4("finalized",_0)]=!0;f1.litElementHydrateSupport?.({LitElement:_0});var a4=x5?f1.litElementPolyfillSupportDevMode:f1.litElementPolyfillSupport;a4?.({LitElement:_0});(f1.litElementVersions??=[]).push("4.2.0");if(x5&&f1.litElementVersions.length>1)queueMicrotask(()=>{A3("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var P=(d)=>(o,h)=>{if(h!==void 0)h.addInitializer(()=>{customElements.define(d,o)});else customElements.define(d,o)};var M3=!0,l3;if(M3)globalThis.litIssuedWarnings??=new Set,l3=(d,o)=>{if(o+=` See https://lit.dev/msg/${d} for more information.`,!globalThis.litIssuedWarnings.has(o)&&!globalThis.litIssuedWarnings.has(d))console.warn(o),globalThis.litIssuedWarnings.add(o)};var n4=(d,o,h)=>{let f=o.hasOwnProperty(h);return o.constructor.createProperty(h,d),f?Object.getOwnPropertyDescriptor(o,h):void 0},m4={attribute:!0,type:String,converter:l1,reflect:!1,hasChanged:b2},t4=(d=m4,o,h)=>{let{kind:f,metadata:w}=h;if(M3&&w==null)l3("missing-class-metadata",`The class ${o} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);let x=globalThis.litPropertyMetadata.get(w);if(x===void 0)globalThis.litPropertyMetadata.set(w,x=new Map);if(f==="setter")d=Object.create(d),d.wrapped=!0;if(x.set(h.name,d),f==="accessor"){let{name:b}=h;return{set(g){let i=o.get.call(this);o.set.call(this,g),this.requestUpdate(b,i,d)},init(g){if(g!==void 0)this._$changeProperty(b,void 0,d,g);return g}}}else if(f==="setter"){let{name:b}=h;return function(g){let i=this[b];o.call(this,g),this.requestUpdate(b,i,d)}}throw new Error(`Unsupported decorator location: ${f}`)};function V(d){return(o,h)=>{return typeof h==="object"?t4(d,o,h):n4(d,o,h)}}function p(d){return V({...d,state:!0,attribute:!1})}var V1=(d,o,h)=>{if(h.configurable=!0,h.enumerable=!0,Reflect.decorate&&typeof o!=="object")Object.defineProperty(d,o,h);return h};var b5=!0,p3;if(b5)globalThis.litIssuedWarnings??=new Set,p3=(d,o)=>{if(o+=d?` See https://lit.dev/msg/${d} for more information.`:"",!globalThis.litIssuedWarnings.has(o)&&!globalThis.litIssuedWarnings.has(d))console.warn(o),globalThis.litIssuedWarnings.add(o)};function $0(d,o){return(h,f,w)=>{let x=(b)=>{let g=b.renderRoot?.querySelector(d)??null;if(b5&&g===null&&o&&!b.hasUpdated){let i=typeof f==="object"?f.name:f;p3("",`@query'd field ${JSON.stringify(String(i))} with the 'cache' flag set for selector '${d}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return g};if(o){let{get:b,set:g}=typeof f==="object"?h:w??(()=>{let i=b5?Symbol(`${String(f)} (@query() cache)`):Symbol();return{get(){return this[i]},set($){this[i]=$}}})();return V1(h,f,{get(){let i=b.call(this);if(i===void 0){if(i=x(this),i!==null||this.hasUpdated)g.call(this,i)}return i}})}else return V1(h,f,{get(){return x(this)}})}}class i5{host;muted=!1;audioCache=new Map;constructor(d){this.host=d,d.addController(this)}preload(d){if(this.audioCache.has(d))return;let o=new Audio(d);o.preload="auto",o.load(),this.audioCache.set(d,o)}async play(d){try{if(!this.audioCache.has(d))this.preload(d);let o=this.audioCache.get(d),h=this.host.gameData?.volume??100;o.volume=this.muted?0:h/100,o.currentTime=0,await o.play()}catch(o){if(o instanceof DOMException&&o.name==="AbortError")return;throw console.error("Failed to play sound:",o),o}}stop(){this.audioCache.forEach((d)=>{d.pause(),d.currentTime=0})}pause(){this.audioCache.forEach((d)=>{d.pause()})}}var n0=8,u1=2,P3=100;class E extends _0{static componentStyles=[];emit(d,o){let h=new CustomEvent(d,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...o});return this.dispatchEvent(h),h}}var w0=S1(Symbol("game"));class J2 extends E{constructor(){super(...arguments);this.currency="USDC";this.isTheatreMode=!1;this.showFavorites=!1;this.balance=1000;this.baseUrl="https://us-api.dev.betorigami.com/provider/v1/games";this.authToken="";this.isCryptoMode=!0;this.gameStatsOpen=!1;this.betAmount="0.00";this.autobetNumberOfBets=0;this.hotkeysOpenEnabled=!1;this.volume=100;this.instantBetEnabled=!1}_soundController=new i5(this);firstUpdated(){this._soundController.preload("https://assets.betorigami.com/sounds/shared/bet.mp3"),this._soundController.preload("https://assets.betorigami.com/sounds/shared/click.mp3"),this._soundController.preload("https://assets.betorigami.com/sounds/shared/tick.mp3"),this._soundController.preload("https://assets.betorigami.com/sounds/shared/half-double.mp3"),this._soundController.preload("https://assets.betorigami.com/sounds/toggle.mp3")}_gameProvider=new Y1(this,{context:w0,initialValue:{amount:this.betAmount,updateBalance:this.updateBalance.bind(this),currency:this.currency,isCryptoMode:this.isCryptoMode,isTheatreMode:this.isTheatreMode,showFavorites:this.showFavorites,balance:this.balance,baseUrl:this.baseUrl,authToken:this.authToken,gameStatsOpen:this.gameStatsOpen,autobetNumberOfBets:this.autobetNumberOfBets,hotkeysOpenEnabled:this.hotkeysOpenEnabled,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundController:this._soundController,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this),updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this)}});connectedCallback(){super.connectedCallback(),this.updateProviderValue()}updated(d){if(super.updated(d),d.has("currency")||d.has("isTheatreMode")||d.has("showFavorites")||d.has("balance")||d.has("baseUrl")||d.has("isCryptoMode")||d.has("authToken")||d.has("gameStatsOpen")||d.has("hotkeysOpenEnabled")||d.has("volume")||d.has("instantBetEnabled"))this.updateProviderValue()}get gameData(){return this._gameProvider.value}updateProviderValue(){this._gameProvider.setValue({amount:this.betAmount,currency:this.currency,updateBalance:this.updateBalance.bind(this),isCryptoMode:this.isCryptoMode,isTheatreMode:this.isTheatreMode,showFavorites:this.showFavorites,balance:this.balance,baseUrl:this.baseUrl,authToken:this.authToken,gameStatsOpen:this.gameStatsOpen,autobetNumberOfBets:this.autobetNumberOfBets,updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this),hotkeysOpenEnabled:this.hotkeysOpenEnabled,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundController:this._soundController,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this)})}updateHotkeysOpenEnabled(d){this.hotkeysOpenEnabled=d,this.updateProviderValue()}updateVolume(d){this.volume=d,this.updateProviderValue()}updateInstantBetEnabled(d){this.instantBetEnabled=d,this.updateProviderValue()}updateAutobetNumberOfBets(d){this.autobetNumberOfBets=d,this.updateProviderValue()}updateBalance(d){if(d.isNaN())return;if(d.isLessThan(0)){this.betAmount="0";return}let o=d.toFixed(n0);this.betAmount=o,this.updateProviderValue()}render(){return M`<slot></slot>`}}Z([V({type:String})],J2.prototype,"currency",void 0),Z([V({type:Boolean})],J2.prototype,"isTheatreMode",void 0),Z([V({type:Boolean})],J2.prototype,"showFavorites",void 0),Z([V({type:Number})],J2.prototype,"balance",void 0),Z([V({type:String})],J2.prototype,"baseUrl",void 0),Z([V({type:String})],J2.prototype,"authToken",void 0),Z([V({type:Boolean})],J2.prototype,"isCryptoMode",void 0),Z([V({type:Boolean})],J2.prototype,"gameStatsOpen",void 0),Z([p()],J2.prototype,"betAmount",void 0),Z([p()],J2.prototype,"autobetNumberOfBets",void 0),Z([p()],J2.prototype,"hotkeysOpenEnabled",void 0),Z([p()],J2.prototype,"volume",void 0),Z([p()],J2.prototype,"instantBetEnabled",void 0),J2=Z([P("origami-game-provider-wrapper")],J2);var N0={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},m0=(d)=>(...o)=>({["_$litDirective$"]:d,values:o});class E0{constructor(d){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(d,o,h){this.__part=d,this._$parent=o,this.__attributeIndex=h}_$resolve(d,o){return this.update(d,o)}update(d,o){return this.render(...o)}}class y3 extends E0{constructor(d){super(d);if(d.type!==N0.ATTRIBUTE||d.name!=="class"||d.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(d){return" "+Object.keys(d).filter((o)=>d[o]).join(" ")+" "}update(d,[o]){if(this._previousClasses===void 0){if(this._previousClasses=new Set,d.strings!==void 0)this._staticClasses=new Set(d.strings.join(" ").split(/\s/).filter((f)=>f!==""));for(let f in o)if(o[f]&&!this._staticClasses?.has(f))this._previousClasses.add(f);return this.render(o)}let h=d.element.classList;for(let f of this._previousClasses)if(!(f in o))h.remove(f),this._previousClasses.delete(f);for(let f in o){let w=!!o[f];if(w!==this._previousClasses.has(f)&&!this._staticClasses?.has(f))if(w)h.add(f),this._previousClasses.add(f);else h.remove(f),this._previousClasses.delete(f)}return F0}}var d0=m0(y3);var Y0=(d)=>d??u;var r=s`
24
+ `),new Error(h)}return I3!==void 0?I3.createHTML(o):o}var T3=(d,o)=>{let h=d.length-1,f=[],w=o===g2?"<svg>":o===z2?"<math>":"",x,b=p1;for(let i=0;i<h;i++){let $=d[i],X=-1,j,Q=0,G;while(Q<$.length){if(b.lastIndex=Q,G=b.exec($),G===null)break;if(Q=b.lastIndex,b===p1){if(G[V3]==="!--")b=L3;else if(G[V3]!==void 0)b=c3;else if(G[y2]!==void 0){if(S3.test(G[y2]))x=new RegExp(`</${G[y2]}`,"g");b=X1}else if(G[M4]!==void 0)throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else if(b===X1)if(G[l4]===">")b=x??p1,X=-1;else if(G[R3]===void 0)X=-2;else X=b.lastIndex-G[p4].length,j=G[R3],b=G[B3]===void 0?X1:G[B3]==='"'?r2:E2;else if(b===r2||b===E2)b=X1;else if(b===L3||b===c3)b=p1;else b=X1,x=void 0}console.assert(X===-1||b===X1||b===E2||b===r2,"unexpected parse state B");let _=b===X1&&d[i+1].startsWith("/>")?" ":"";w+=b===p1?$+T4:X>=0?(f.push(j),$.slice(0,X)+s2+$.slice(X))+a0+_:$+a0+(X===-2?i:_)}let g=w+(d[h]||"<?>")+(o===g2?"</svg>":o===z2?"</math>":"");return[D3(d,g),f]};class r1{constructor({strings:d,["_$litType$"]:o},h){this.parts=[];let f,w=0,x=0,b=d.length-1,g=this.parts,[i,$]=T3(d,o);if(this.el=r1.createElement(i,h),K1.currentNode=this.el.content,o===g2||o===z2){let X=this.el.content.firstChild;X.replaceWith(...X.childNodes)}while((f=K1.nextNode())!==null&&g.length<b){if(f.nodeType===1){{let X=f.localName;if(/^(?:textarea|template)$/i.test(X)&&f.innerHTML.includes(a0)){let j=`Expressions are not supported inside \`${X}\` elements. See https://lit.dev/msg/expression-in-${X} for more information.`;if(X==="template")throw new Error(j);else P1("",j)}}if(f.hasAttributes()){for(let X of f.getAttributeNames())if(X.endsWith(s2)){let j=$[x++],G=f.getAttribute(X).split(a0),_=/([.?@])?(.*)/.exec(j);g.push({type:m2,index:w,name:_[2],strings:G,ctor:_[1]==="."?o5:_[1]==="?"?h5:_[1]==="@"?f5:T1}),f.removeAttribute(X)}else if(X.startsWith(a0))g.push({type:t2,index:w}),f.removeAttribute(X)}if(S3.test(f.tagName)){let X=f.textContent.split(a0),j=X.length-1;if(j>0){f.textContent=i2?i2.emptyScript:"";for(let Q=0;Q<j;Q++)f.append(X[Q],y1()),K1.nextNode(),g.push({type:Z2,index:++w});f.append(X[j],y1())}}}else if(f.nodeType===8)if(f.data===a2)g.push({type:Z2,index:w});else{let j=-1;while((j=f.data.indexOf(a0,j+1))!==-1)g.push({type:r4,index:w}),j+=a0.length-1}w++}if($.length!==x)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+d.join("${...}")+"`");z0&&z0({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:d})}static createElement(d,o){let h=j1.createElement("template");return h.innerHTML=d,h}}function I1(d,o,h=d,f){if(o===F0)return o;let w=f!==void 0?h.__directives?.[f]:h.__directive,x=E1(o)?void 0:o._$litDirective$;if(w?.constructor!==x){if(w?._$notifyDirectiveConnectionChanged?.(!1),x===void 0)w=void 0;else w=new x(d),w._$initialize(d,h,f);if(f!==void 0)(h.__directives??=[])[f]=w;else h.__directive=w}if(w!==void 0)o=I1(d,w._$resolve(d,o.values),w,f);return o}class d5{constructor(d,o){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=d,this._$parent=o}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(d){let{el:{content:o},parts:h}=this._$template,f=(d?.creationScope??j1).importNode(o,!0);K1.currentNode=f;let w=K1.nextNode(),x=0,b=0,g=h[0];while(g!==void 0){if(x===g.index){let i;if(g.type===Z2)i=new D1(w,w.nextSibling,this,d);else if(g.type===m2)i=new g.ctor(w,g.name,g.strings,this,d);else if(g.type===t2)i=new w5(w,this,d);this._$parts.push(i),g=h[++b]}if(x!==g?.index)w=K1.nextNode(),x++}return K1.currentNode=j1,f}_update(d){let o=0;for(let h of this._$parts){if(h!==void 0)if(z0&&z0({kind:"set part",part:h,value:d[o],valueIndex:o,values:d,templateInstance:this}),h.strings!==void 0)h._$setValue(d,h,o),o+=h.strings.length-2;else h._$setValue(d[o]);o++}}}class D1{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(d,o,h,f){this.type=Z2,this._$committedValue=u,this._$disconnectableChildren=void 0,this._$startNode=d,this._$endNode=o,this._$parent=h,this.options=f,this.__isConnected=f?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let d=y0(this._$startNode).parentNode,o=this._$parent;if(o!==void 0&&d?.nodeType===11)d=o.parentNode;return d}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(d,o=this){if(this.parentNode===null)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(d=I1(this,d,o),E1(d)){if(d===u||d==null||d===""){if(this._$committedValue!==u)z0&&z0({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=u}else if(d!==this._$committedValue&&d!==F0)this._commitText(d)}else if(d._$litType$!==void 0)this._commitTemplateResult(d);else if(d.nodeType!==void 0){if(this.options?.host===d){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",d,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(d)}else if(v3(d))this._commitIterable(d);else this._commitText(d)}_insert(d){return y0(y0(this._$startNode).parentNode).insertBefore(d,this._$endNode)}_commitNode(d){if(this._$committedValue!==d){if(this._$clear(),F1!==$2){let o=this._$startNode.parentNode?.nodeName;if(o==="STYLE"||o==="SCRIPT"){let h="Forbidden";if(o==="STYLE")h="Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.";else h="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw new Error(h)}}z0&&z0({kind:"commit node",start:this._$startNode,parent:this._$parent,value:d,options:this.options}),this._$committedValue=this._insert(d)}}_commitText(d){if(this._$committedValue!==u&&E1(this._$committedValue)){let o=y0(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=u2(o,"data","property");d=this._textSanitizer(d),z0&&z0({kind:"commit text",node:o,value:d,options:this.options}),o.data=d}else{let o=j1.createTextNode("");if(this._commitNode(o),this._textSanitizer===void 0)this._textSanitizer=u2(o,"data","property");d=this._textSanitizer(d),z0&&z0({kind:"commit text",node:o,value:d,options:this.options}),o.data=d}this._$committedValue=d}_commitTemplateResult(d){let{values:o,["_$litType$"]:h}=d,f=typeof h==="number"?this._$getTemplate(d):(h.el===void 0&&(h.el=r1.createElement(D3(h.h,h.h[0]),this.options)),h);if(this._$committedValue?._$template===f)z0&&z0({kind:"template updating",template:f,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:o}),this._$committedValue._update(o);else{let w=new d5(f,this),x=w._clone(this.options);z0&&z0({kind:"template instantiated",template:f,instance:w,parts:w._$parts,options:this.options,fragment:x,values:o}),w._update(o),z0&&z0({kind:"template instantiated and updated",template:f,instance:w,parts:w._$parts,options:this.options,fragment:x,values:o}),this._commitNode(x),this._$committedValue=w}}_$getTemplate(d){let o=C3.get(d.strings);if(o===void 0)C3.set(d.strings,o=new r1(d));return o}_commitIterable(d){if(!n2(this._$committedValue))this._$committedValue=[],this._$clear();let o=this._$committedValue,h=0,f;for(let w of d){if(h===o.length)o.push(f=new D1(this._insert(y1()),this._insert(y1()),this,this.options));else f=o[h];f._$setValue(w),h++}if(h<o.length)this._$clear(f&&y0(f._$endNode).nextSibling,h),o.length=h}_$clear(d=y0(this._$startNode).nextSibling,o){this._$notifyConnectionChanged?.(!1,!0,o);while(d&&d!==this._$endNode){let h=y0(d).nextSibling;y0(d).remove(),d=h}}setConnected(d){if(this._$parent===void 0)this.__isConnected=d,this._$notifyConnectionChanged?.(d);else throw new Error("part.setConnected() may only be called on a RootPart returned from render().")}}class T1{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(d,o,h,f,w){if(this.type=m2,this._$committedValue=u,this._$disconnectableChildren=void 0,this.element=d,this.name=o,this._$parent=f,this.options=w,h.length>2||h[0]!==""||h[1]!=="")this._$committedValue=new Array(h.length-1).fill(new String),this.strings=h;else this._$committedValue=u;this._sanitizer=void 0}_$setValue(d,o=this,h,f){let w=this.strings,x=!1;if(w===void 0){if(d=I1(this,d,o,0),x=!E1(d)||d!==this._$committedValue&&d!==F0,x)this._$committedValue=d}else{let b=d;d=w[0];let g,i;for(g=0;g<w.length-1;g++){if(i=I1(this,b[h+g],o,g),i===F0)i=this._$committedValue[g];if(x||=!E1(i)||i!==this._$committedValue[g],i===u)d=u;else if(d!==u)d+=(i??"")+w[g+1];this._$committedValue[g]=i}}if(x&&!f)this._commitValue(d)}_commitValue(d){if(d===u)y0(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=F1(this.element,this.name,"attribute");d=this._sanitizer(d??""),z0&&z0({kind:"commit attribute",element:this.element,name:this.name,value:d,options:this.options}),y0(this.element).setAttribute(this.name,d??"")}}}class o5 extends T1{constructor(){super(...arguments);this.type=P4}_commitValue(d){if(this._sanitizer===void 0)this._sanitizer=F1(this.element,this.name,"property");d=this._sanitizer(d),z0&&z0({kind:"commit property",element:this.element,name:this.name,value:d,options:this.options}),this.element[this.name]=d===u?void 0:d}}class h5 extends T1{constructor(){super(...arguments);this.type=y4}_commitValue(d){z0&&z0({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(d&&d!==u),options:this.options}),y0(this.element).toggleAttribute(this.name,!!d&&d!==u)}}class f5 extends T1{constructor(d,o,h,f,w){super(d,o,h,f,w);if(this.type=E4,this.strings!==void 0)throw new Error(`A \`<${d.localName}>\` has a \`@${o}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(d,o=this){if(d=I1(this,d,o,0)??u,d===F0)return;let h=this._$committedValue,f=d===u&&h!==u||d.capture!==h.capture||d.once!==h.once||d.passive!==h.passive,w=d!==u&&(h===u||f);if(z0&&z0({kind:"commit event listener",element:this.element,name:this.name,value:d,options:this.options,removeListener:f,addListener:w,oldListener:h}),f)this.element.removeEventListener(this.name,this,h);if(w)this.element.addEventListener(this.name,this,d);this._$committedValue=d}handleEvent(d){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,d);else this._$committedValue.handleEvent(d)}}class w5{constructor(d,o,h){this.element=d,this.type=t2,this._$disconnectableChildren=void 0,this._$parent=o,this.options=h}get _$isConnected(){return this._$parent._$isConnected}_$setValue(d){z0&&z0({kind:"commit to element binding",element:this.element,value:d,options:this.options}),I1(this,d)}}var O3={_boundAttributeSuffix:s2,_marker:a0,_markerMatch:a2,_HTML_RESULT:N3,_getTemplateHtml:T3,_TemplateInstance:d5,_isIterable:v3,_resolveDirective:I1,_ChildPart:D1,_AttributePart:T1,_BooleanAttributePart:h5,_EventPart:f5,_PropertyPart:o5,_ElementPart:w5},u4=S0.litHtmlPolyfillSupportDevMode;u4?.(r1,D1);(S0.litHtmlVersions??=[]).push("3.3.0");if(S0.litHtmlVersions.length>1)queueMicrotask(()=>{P1("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var G1=(d,o,h)=>{if(o==null)throw new TypeError(`The container to render into may not be ${o}`);let f=v4++,w=h?.renderBefore??o,x=w._$litPart$;if(z0&&z0({kind:"begin render",id:f,value:d,container:o,options:h,part:x}),x===void 0){let b=h?.renderBefore??null;w._$litPart$=x=new D1(o.insertBefore(y1(),b),b,void 0,h??{})}return x._$setValue(d),z0&&z0({kind:"end render",id:f,value:d,container:o,options:h,part:x}),x};G1.setSanitizer=N4,G1.createSanitizer=u2,G1._testOnlyClearSanitizerFactoryDoNotCallOrElse=D4;var s4=(d,o)=>d,x5=!0,f1=globalThis,A3;if(x5)f1.litIssuedWarnings??=new Set,A3=(d,o)=>{if(o+=` See https://lit.dev/msg/${d} for more information.`,!f1.litIssuedWarnings.has(o)&&!f1.litIssuedWarnings.has(d))console.warn(o),f1.litIssuedWarnings.add(o)};class _0 extends v0{constructor(){super(...arguments);this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){let d=super.createRenderRoot();return this.renderOptions.renderBefore??=d.firstChild,d}update(d){let o=this.render();if(!this.hasUpdated)this.renderOptions.isConnected=this.isConnected;super.update(d),this.__childPart=G1(o,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return F0}}_0._$litElement$=!0;_0[s4("finalized",_0)]=!0;f1.litElementHydrateSupport?.({LitElement:_0});var a4=x5?f1.litElementPolyfillSupportDevMode:f1.litElementPolyfillSupport;a4?.({LitElement:_0});(f1.litElementVersions??=[]).push("4.2.0");if(x5&&f1.litElementVersions.length>1)queueMicrotask(()=>{A3("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var P=(d)=>(o,h)=>{if(h!==void 0)h.addInitializer(()=>{customElements.define(d,o)});else customElements.define(d,o)};var M3=!0,l3;if(M3)globalThis.litIssuedWarnings??=new Set,l3=(d,o)=>{if(o+=` See https://lit.dev/msg/${d} for more information.`,!globalThis.litIssuedWarnings.has(o)&&!globalThis.litIssuedWarnings.has(d))console.warn(o),globalThis.litIssuedWarnings.add(o)};var n4=(d,o,h)=>{let f=o.hasOwnProperty(h);return o.constructor.createProperty(h,d),f?Object.getOwnPropertyDescriptor(o,h):void 0},m4={attribute:!0,type:String,converter:l1,reflect:!1,hasChanged:b2},t4=(d=m4,o,h)=>{let{kind:f,metadata:w}=h;if(M3&&w==null)l3("missing-class-metadata",`The class ${o} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);let x=globalThis.litPropertyMetadata.get(w);if(x===void 0)globalThis.litPropertyMetadata.set(w,x=new Map);if(f==="setter")d=Object.create(d),d.wrapped=!0;if(x.set(h.name,d),f==="accessor"){let{name:b}=h;return{set(g){let i=o.get.call(this);o.set.call(this,g),this.requestUpdate(b,i,d)},init(g){if(g!==void 0)this._$changeProperty(b,void 0,d,g);return g}}}else if(f==="setter"){let{name:b}=h;return function(g){let i=this[b];o.call(this,g),this.requestUpdate(b,i,d)}}throw new Error(`Unsupported decorator location: ${f}`)};function V(d){return(o,h)=>{return typeof h==="object"?t4(d,o,h):n4(d,o,h)}}function p(d){return V({...d,state:!0,attribute:!1})}var V1=(d,o,h)=>{if(h.configurable=!0,h.enumerable=!0,Reflect.decorate&&typeof o!=="object")Object.defineProperty(d,o,h);return h};var b5=!0,p3;if(b5)globalThis.litIssuedWarnings??=new Set,p3=(d,o)=>{if(o+=d?` See https://lit.dev/msg/${d} for more information.`:"",!globalThis.litIssuedWarnings.has(o)&&!globalThis.litIssuedWarnings.has(d))console.warn(o),globalThis.litIssuedWarnings.add(o)};function $0(d,o){return(h,f,w)=>{let x=(b)=>{let g=b.renderRoot?.querySelector(d)??null;if(b5&&g===null&&o&&!b.hasUpdated){let i=typeof f==="object"?f.name:f;p3("",`@query'd field ${JSON.stringify(String(i))} with the 'cache' flag set for selector '${d}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return g};if(o){let{get:b,set:g}=typeof f==="object"?h:w??(()=>{let i=b5?Symbol(`${String(f)} (@query() cache)`):Symbol();return{get(){return this[i]},set($){this[i]=$}}})();return V1(h,f,{get(){let i=b.call(this);if(i===void 0){if(i=x(this),i!==null||this.hasUpdated)g.call(this,i)}return i}})}else return V1(h,f,{get(){return x(this)}})}}class i5{host;muted=!1;audioCache=new Map;constructor(d){this.host=d,d.addController(this)}preload(d){if(this.audioCache.has(d))return;let o=new Audio(d);o.preload="auto",o.load(),this.audioCache.set(d,o)}async play(d){try{if(!this.audioCache.has(d))this.preload(d);let o=this.audioCache.get(d),h=this.host.gameData?.volume??100;o.volume=this.muted?0:h/100,o.currentTime=0,await o.play()}catch(o){if(o instanceof DOMException&&o.name==="AbortError")return;throw console.error("Failed to play sound:",o),o}}stop(){this.audioCache.forEach((d)=>{d.pause(),d.currentTime=0})}pause(){this.audioCache.forEach((d)=>{d.pause()})}}var n0=8,u1=2,P3=100;class E extends _0{static componentStyles=[];emit(d,o){let h=new CustomEvent(d,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...o});return this.dispatchEvent(h),h}}var w0=S1(Symbol("game"));class J2 extends E{constructor(){super(...arguments);this.currency="USDC";this.isTheatreMode=!1;this.showFavorites=!1;this.balance=1000;this.baseUrl="https://us-api.dev.betorigami.com/provider/v1/games";this.authToken="";this.isCryptoMode=!0;this.gameStatsOpen=!1;this.betAmount="0.00";this.autobetNumberOfBets=0;this.hotkeysOpenEnabled=!1;this.volume=100;this.instantBetEnabled=!1}_soundController=new i5(this);firstUpdated(){this._soundController.preload("https://assets.betorigami.com/sounds/shared/bet.mp3"),this._soundController.preload("https://assets.betorigami.com/sounds/shared/click.mp3"),this._soundController.preload("https://assets.betorigami.com/sounds/shared/half-double.mp3"),this._soundController.preload("https://assets.betorigami.com/sounds/shared/secondary.mp3"),this._soundController.preload("https://assets.betorigami.com/sounds/shared/toggle.mp3"),this._soundController.preload("https://assets.betorigami.com/sounds/shared/win.mp3")}_gameProvider=new Y1(this,{context:w0,initialValue:{amount:this.betAmount,updateBalance:this.updateBalance.bind(this),currency:this.currency,isCryptoMode:this.isCryptoMode,isTheatreMode:this.isTheatreMode,showFavorites:this.showFavorites,balance:this.balance,baseUrl:this.baseUrl,authToken:this.authToken,gameStatsOpen:this.gameStatsOpen,autobetNumberOfBets:this.autobetNumberOfBets,hotkeysOpenEnabled:this.hotkeysOpenEnabled,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundController:this._soundController,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this),updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this)}});connectedCallback(){super.connectedCallback(),this.updateProviderValue()}updated(d){if(super.updated(d),d.has("currency")||d.has("isTheatreMode")||d.has("showFavorites")||d.has("balance")||d.has("baseUrl")||d.has("isCryptoMode")||d.has("authToken")||d.has("gameStatsOpen")||d.has("hotkeysOpenEnabled")||d.has("volume")||d.has("instantBetEnabled"))this.updateProviderValue()}get gameData(){return this._gameProvider.value}updateProviderValue(){this._gameProvider.setValue({amount:this.betAmount,currency:this.currency,updateBalance:this.updateBalance.bind(this),isCryptoMode:this.isCryptoMode,isTheatreMode:this.isTheatreMode,showFavorites:this.showFavorites,balance:this.balance,baseUrl:this.baseUrl,authToken:this.authToken,gameStatsOpen:this.gameStatsOpen,autobetNumberOfBets:this.autobetNumberOfBets,updateAutobetNumberOfBets:this.updateAutobetNumberOfBets.bind(this),hotkeysOpenEnabled:this.hotkeysOpenEnabled,volume:this.volume,instantBetEnabled:this.instantBetEnabled,soundController:this._soundController,updateHotkeysOpenEnabled:this.updateHotkeysOpenEnabled.bind(this),updateVolume:this.updateVolume.bind(this),updateInstantBetEnabled:this.updateInstantBetEnabled.bind(this)})}updateHotkeysOpenEnabled(d){this.hotkeysOpenEnabled=d,this.updateProviderValue()}updateVolume(d){this.volume=d,this.updateProviderValue()}updateInstantBetEnabled(d){this.instantBetEnabled=d,this.updateProviderValue()}updateAutobetNumberOfBets(d){this.autobetNumberOfBets=d,this.updateProviderValue()}updateBalance(d){if(d.isNaN())return;if(d.isLessThan(0)){this.betAmount="0";return}let o=d.toFixed(n0);this.betAmount=o,this.updateProviderValue()}render(){return M`<slot></slot>`}}Z([V({type:String})],J2.prototype,"currency",void 0),Z([V({type:Boolean})],J2.prototype,"isTheatreMode",void 0),Z([V({type:Boolean})],J2.prototype,"showFavorites",void 0),Z([V({type:Number})],J2.prototype,"balance",void 0),Z([V({type:String})],J2.prototype,"baseUrl",void 0),Z([V({type:String})],J2.prototype,"authToken",void 0),Z([V({type:Boolean})],J2.prototype,"isCryptoMode",void 0),Z([V({type:Boolean})],J2.prototype,"gameStatsOpen",void 0),Z([p()],J2.prototype,"betAmount",void 0),Z([p()],J2.prototype,"autobetNumberOfBets",void 0),Z([p()],J2.prototype,"hotkeysOpenEnabled",void 0),Z([p()],J2.prototype,"volume",void 0),Z([p()],J2.prototype,"instantBetEnabled",void 0),J2=Z([P("origami-game-provider-wrapper")],J2);var N0={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},m0=(d)=>(...o)=>({["_$litDirective$"]:d,values:o});class E0{constructor(d){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(d,o,h){this.__part=d,this._$parent=o,this.__attributeIndex=h}_$resolve(d,o){return this.update(d,o)}update(d,o){return this.render(...o)}}class y3 extends E0{constructor(d){super(d);if(d.type!==N0.ATTRIBUTE||d.name!=="class"||d.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(d){return" "+Object.keys(d).filter((o)=>d[o]).join(" ")+" "}update(d,[o]){if(this._previousClasses===void 0){if(this._previousClasses=new Set,d.strings!==void 0)this._staticClasses=new Set(d.strings.join(" ").split(/\s/).filter((f)=>f!==""));for(let f in o)if(o[f]&&!this._staticClasses?.has(f))this._previousClasses.add(f);return this.render(o)}let h=d.element.classList;for(let f of this._previousClasses)if(!(f in o))h.remove(f),this._previousClasses.delete(f);for(let f in o){let w=!!o[f];if(w!==this._previousClasses.has(f)&&!this._staticClasses?.has(f))if(w)h.add(f),this._previousClasses.add(f);else h.remove(f),this._previousClasses.delete(f)}return F0}}var d0=m0(y3);var Y0=(d)=>d??u;var r=s`
25
25
  :host {
26
26
  all: initial;
27
27
  display: block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betorigami/games",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",