@notix.games/react-bridge 3.0.8 → 3.0.10

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e={216:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(733),t),o(r(757),t),o(r(965),t)},848:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrame=function(e){var t=e.eventHandler,r=e.context,a=e.React,i=e.src,u=e.gameId,c=e.style,l=e.customProps,s=a.createRef(),d=a.createElement("iframe",n({src:i,id:(0,o.createIFrameId)(u),style:c,ref:s},l)),f=function(e){var n;e.source===(null===(n=s.current)||void 0===n?void 0:n.contentWindow)&&(null==t||t(e,r))};return window.addEventListener("message",f,!1),{iframe:d,destructor:function(){window.removeEventListener("message",f,!1),function(){var e;try{(null===(e=null==r?void 0:r.getMetadata())||void 0===e?void 0:e.prevWindowTitle)?window.top.document.title=r.getMetadata().prevWindowTitle:window.localStorage.getItem("prevWindowTitle")?window.top.document.title=window.localStorage.getItem("prevWindowTitle"):window.top.document.title=""}catch(e){console.log("Error trying to set document title (KEEP CALM, for now it`s OK for iFrame-in-iFrame setting due to parent window security settings):",e)}}()},meta:{iframeRef:s}}};var o=r(707)},482:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(848),t)},388:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrame=function(e){var t=e.src,r=e.gameId,o=e.style,a=e.eventHandler,i=e.context,u=e.customProps,c=document.createElement("iframe");for(var l in c.src=t,c.id=(0,n.createIFrameId)(r),o)if(l in c.style){var s=o[l];try{c.style.setProperty(l,"number"==typeof s?"".concat(s,"px"):s)}catch(e){console.error("Error setting style for ".concat(l,": "),e)}}for(var l in Object.keys(Object(u)))c.setAttribute(l,u[l]);var d=function(e){e.source===c.contentWindow&&(null==a||a(e,i))};return window.addEventListener("message",d,!1),{iframe:c,destructor:function(){window.removeEventListener("message",d,!1),function(){var e;try{(null===(e=null==i?void 0:i.getMetadata())||void 0===e?void 0:e.prevWindowTitle)?window.top.document.title=i.getMetadata().prevWindowTitle:window.localStorage.getItem("prevWindowTitle")?window.top.document.title=window.localStorage.getItem("prevWindowTitle"):window.top.document.title=""}catch(e){console.log("Error trying to set document title (KEEP CALM, for now it`s OK for iFrame-in-iFrame setting due to parent window security settings):",e)}}()},meta:{}}};var n=r(707)},278:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(388),t)},668:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NOTIX_BACKEND_BASE_URL_DEV=t.NOTIX_BACKEND_BASE_URL_STAGE=t.NOTIX_BACKEND_BASE_URL=t.IFRAME_GAME_ID_PREFIX=void 0,t.IFRAME_GAME_ID_PREFIX="notix_embedded_",t.NOTIX_BACKEND_BASE_URL="https://game-aggregator.main.notix.games/external/api/v1",t.NOTIX_BACKEND_BASE_URL_STAGE="https://game-aggregator.stage.notix.games/external/api/v1",t.NOTIX_BACKEND_BASE_URL_DEV="https://game-aggregator.main.notix.games/external/api/v1"},29:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.iFrameCreators=void 0,t.initNotixBridge=function(e){var r,l=this,s=!1,p=null,v=e,h="prod",y=function(e){var t=e.token,n=e.partnerId,o=e.clientId,a=e.environment;if(!t||!n||!o)throw new Error("Not all required parameters are provided on Notix Bridge configuration.");r=t,p=n,a&&(h=a),s=!0};return{createIFrame:function(e){return function(e){return o(this,void 0,void 0,(function(){var o,c,l,y,g,b,w,m,_,I,P,O,A,E,M,S,j,T,x,G,R,U,k,W,N,F,B,D,L,C;return a(this,(function(a){switch(a.label){case 0:if(o=e.gameId,c=e.nodeId,l=e.player,y=e.browserSession,g=e.balance,b=e.eventHandler,w=e.customProps,m=e.style,_=l.id,I=l.country,P=y.viewType,O=y.language,A=y.timeZone,E=y.ip,M=g.currency,S=g.amount,!s)throw new Error("Notix Bridge is not configured. Please call the configure method first.");a.label=1;case 1:return a.trys.push([1,3,,4]),j=(0,i.v4)(),console.log("START GAME FROM BRIDGE: incomeParams: ",e,"startGameParams: ",{gameId:o,partnerId:p,nodeId:c,requestId:j,player:{id:_,country:I},browserSession:{language:O,viewType:P,timeZone:A,ip:E},balance:{currency:M,amount:S},partnerToken:r,env:h}),[4,(0,u.startGame)({gameId:o,partnerId:p,nodeId:c,requestId:j,player:{id:_,country:I},browserSession:{language:O,viewType:P,timeZone:A,ip:E},balance:{currency:M,amount:S},partnerToken:r,env:h})];case 2:if(T=a.sent(),x=T.iFrameURI,G=T.token,!x)throw new Error("No iFrame URI provided by the server.");if(!G)throw new Error("No player token provided by the server.");if(R={_playerToken:G,_iframe:null,_metadata:{},updateMetadata:function(e){this._metadata=Object.assign(this._metadata,e)},addPropertyToMetadata:function(e,t){this._metadata[e]=t},getMetadata:function(){return this._metadata},getPlayerToken:function(){return this._playerToken},getIframe:function(){return this._iframe},updatePlayerToken:function(e){this._playerToken=e},updateIframe:function(e){this._iframe=e}},U=(0,d.createEventMiddleware)(f.handleGPWebAppInit,f.handleGPWebAppSetPageLoaded,f.handleGPWebAppSetPageTitle,f.handleGPWebAppShowAuthenticationFailed,f.handleGPWebAppShowGameState)(b),k=null,"react"===v){if(!(W=e.React))throw new Error("React instance is not provided.");N={eventHandler:U,context:R,React:W,customProps:w,src:x,gameId:o,style:m},k=t.iFrameCreators.react(N)}else"vanilla"===v&&(F={eventHandler:U,customProps:w,context:R,src:x,gameId:o,style:m},k=t.iFrameCreators.vanilla(F));if(!k)throw new Error("No iFrame creator result.");return B=k.iframe,D=k.destructor,L=k.meta,R.updateIframe(B),R.updateMetadata(Object.assign(L,{framework:v})),[2,n({iframe:B,destructor:D},L)];case 3:return[2,{error:C=a.sent(),message:C.message}];case 4:return[2]}}))}))}(e)},configure:y,configureAsync:function(e){return o(l,[e],void 0,(function(e){var t=e.token,r=e.partnerId,n=e.clientId;return a(this,(function(e){return[2,new Promise((function(e,o){try{y({token:t,partnerId:r,clientId:n}),e()}catch(e){o(e)}}))]}))}))},getGames:function(){return o(l,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:if(t.trys.push([0,2,,3]),!s)throw new Error("Notix Bridge is not configured. Please call the configure method first.");return[4,(0,c.getGamesList)({partnerId:p,token:r,env:h})];case 1:return[2,t.sent()];case 2:return[2,{error:e=t.sent(),message:e.message}];case 3:return[2]}}))}))},getIFrameURI:function(e){return o(this,void 0,void 0,(function(){var t,n,o,c,l,d,f,v,y,g,b,w,m,_,I,P,O,A,E;return a(this,(function(a){switch(a.label){case 0:if(t=e.gameId,n=e.nodeId,o=e.player,c=e.browserSession,l=e.balance,d=e.sessionId,f=o.id,v=o.country,y=c.viewType,g=c.language,b=c.timeZone,w=c.ip,m=l.currency,_=l.amount,!s)throw new Error("Notix Bridge is not configured. Please call the configure method first.");a.label=1;case 1:return a.trys.push([1,3,,4]),I=(0,i.v4)(),console.log("🚀 ~ getIFrameURI ~ requestId:",I),[4,(0,u.startGame)({gameId:t,partnerId:p,nodeId:n,requestId:I,player:{id:f,country:v},browserSession:{language:g,viewType:y,timeZone:b,ip:w},balance:{currency:m,amount:_},partnerToken:r,env:h,sessionId:d})];case 2:if(P=a.sent(),O=P.iFrameURI,A=P.token,!O)throw new Error("No iFrame URI provided by the server.");if(!A)throw new Error("No player token provided by the server.");return[2,O];case 3:return[2,{error:E=a.sent(),message:E.message}];case 4:return[2]}}))}))}}};var i=r(935),u=r(74),c=r(410),l=r(482),s=r(278),d=r(707),f=r(720);t.iFrameCreators={react:l.createIFrame,vanilla:s.createIFrame}},720:(e,t)=>{function r(e){var t,r=e.getIframe(),n=e.getMetadata();return"react"===n.framework?null===(t=null==n?void 0:n.iframeRef)||void 0===t?void 0:t.current:r}Object.defineProperty(t,"__esModule",{value:!0}),t.handleGPWebAppShowGameState=t.handleGPWebAppShowAuthenticationFailed=t.handleGPWebAppSetPageTitle=t.handleGPWebAppSetPageLoaded=t.handleGPWebAppInit=void 0;t.handleGPWebAppInit=function(e,t,n){var o,a,i;if("GPWebAppInit"===e.data.type){var u=r(t);null===(o=null==u?void 0:u.contentWindow)||void 0===o||o.postMessage({type:"GPWebAppInitResult",data:{result:!0,requestId:null===(i=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.data)||void 0===i?void 0:i.requestId}},"*")}n()};t.handleGPWebAppSetPageLoaded=function(e,t,n){"GPWebAppSetPageLoaded"===e.data.type&&r(t).contentWindow.postMessage({type:"GPWebAppSetPageLoadedResult",data:{result:!0,requestId:e.data.data.requestId}},"*");n()};t.handleGPWebAppSetPageTitle=function(e,t,n){try{var o=r(t);if("GPWebAppSetPageTitle"===e.data.type){var a=window.top.document.title;window.top.document.title=e.data.data.title,t.addPropertyToMetadata("prevWindowTitle",a),window.localStorage.setItem("prevWindowTitle",a),o.contentWindow.postMessage({type:"GPWebAppSetPageTitleResult",data:{result:!0,requestId:e.data.data.requestId}},"*")}}catch(e){console.log("Error trying to read document title (KEEP CALM, for now it`s OK for iFrame-in-iFrame setting due to parent window security settings):",e)}n()};t.handleGPWebAppShowAuthenticationFailed=function(e,t,n){var o=r(t);"GPWebAppShowAuthenticationFailed"===e.data.type&&(console.log("AUTH FAIL",e.data.type,e),o.contentWindow.postMessage({type:"GPWebAppShowAuthenticationFailedResult",data:{result:!0,requestId:e.data.data.requestId,token:"NEW_TOKEN_WILL_BE_HERE"}},"*")),n()};t.handleGPWebAppShowGameState=function(e,t,n){var o=r(t);"GPWebAppShowGameState"===e.data.type&&o.contentWindow.postMessage({type:"GPWebAppShowGameStateResult",data:{result:!0,requestId:e.data.data.requestId}},"*"),n()}},733:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(29),t),o(r(287),t)},410:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getGamesList=void 0;var a=r(865),i=function(e,t,r){return n(void 0,void 0,void 0,(function(){var n,i,u;return o(this,(function(o){switch(o.label){case 0:return n=(0,a.default)(r),i="".concat(n,"/partners/games/list?partnerID=").concat(e),[4,fetch(i,{method:"GET",headers:{Authorization:"Bearer ".concat(t)}})];case 1:if(!(u=o.sent()).ok)throw new Error("Failed to fetch games list: Server responeded with status ".concat(u.status));return[2,u.json()]}}))}))};t.getGamesList=function(e){return n(void 0,[e],void 0,(function(e){var t=e.partnerId,r=e.token,n=e.env;return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i(t,r,n)];case 1:return[2,e.sent()];case 2:throw e.sent();case 3:return[2]}}))}))}},74:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.startGame=void 0;var a=r(865);t.startGame=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,u,c;return o(this,(function(o){switch(o.label){case 0:t=(0,a.default)(e.env),r="".concat(t,"/partners/games/start"),n=function(e){var t=e.gameId,r=e.nodeId,n=e.partnerId,o=e.requestId,a=e.player,i=e.browserSession,u=e.balance,c=e.sessionId;return{partnerId:n,requestId:o,gameId:t,nodeId:r,isTest:!0,player:{id:a.id,country:a.country},browserSession:{language:i.language,viewType:i.viewType,timeZone:i.timeZone,ip:i.ip},balance:{currency:u.currency,amount:u.amount},sessionId:c}}(e),i={method:"POST",headers:{Authorization:"Bearer ".concat(e.partnerToken),"Content-Type":"application/json"},body:JSON.stringify(n)},o.label=1;case 1:return o.trys.push([1,4,,5]),[4,fetch(r,i)];case 2:if(!(u=o.sent()).ok)throw new Error("Failed to start game: Server responded with status ".concat(u.status));return[4,u.json()];case 3:return c=o.sent(),[2,{iFrameURI:decodeURI(null==c?void 0:c.uri),token:null==c?void 0:c.sessionId}];case 4:throw o.sent();case 5:return[2]}}))}))}},287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},355:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createEventMiddleware=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var o=this;return function(a,i){return r(o,void 0,void 0,(function(){var o,u=this;return n(this,(function(c){switch(c.label){case 0:o=function(c){return r(u,void 0,void 0,(function(){var u=this;return n(this,(function(l){switch(l.label){case 0:return c<e.length?[4,e[c](a,i,(function(){return r(u,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,o(c+1)];case 1:return e.sent(),[2]}}))}))}))]:[3,2];case 1:return l.sent(),[3,4];case 2:return[4,t(a)];case 3:l.sent(),l.label=4;case 4:return[2]}}))}))},c.label=1;case 1:return c.trys.push([1,3,,4]),[4,o(0)];case 2:return[2,c.sent()];case 3:throw c.sent();case 4:return[2]}}))}))}}}},865:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("dev"===e)return n.NOTIX_BACKEND_BASE_URL_DEV;if("stage"===e)return n.NOTIX_BACKEND_BASE_URL_STAGE;if("prod"===e)return n.NOTIX_BACKEND_BASE_URL;throw new Error("Incorrect env identifier passed in getBaseURL in Bridge backend request. Could not find matching base url")};var n=r(668)},707:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrameId=function(e){return"".concat(a.IFRAME_GAME_ID_PREFIX).concat(e)};var a=r(668);o(r(355),t)},757:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotixBridge=void 0;var n=(0,r(216).initNotixBridge)("react");t.NotixBridge=n},965:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VanillaNotixBridge=void 0;var n=(0,r(733).initNotixBridge)("vanilla");t.VanillaNotixBridge=n},935:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return c.default}});var n=f(r(766)),o=f(r(532)),a=f(r(521)),i=f(r(10)),u=f(r(688)),c=f(r(687)),l=f(r(893)),s=f(r(750)),d=f(r(512));function f(e){return e&&e.__esModule?e:{default:e}}},391:(e,t)=>{function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function o(e,t,r,o,a,i){return n((u=n(n(t,e),n(o,i)))<<(c=a)|u>>>32-c,r);var u,c}function a(e,t,r,n,a,i,u){return o(t&r|~t&n,e,t,a,i,u)}function i(e,t,r,n,a,i,u){return o(t&n|r&~n,e,t,a,i,u)}function u(e,t,r,n,a,i,u){return o(t^r^n,e,t,a,i,u)}function c(e,t,r,n,a,i,u){return o(r^(t|~n),e,t,a,i,u)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){const t=[],r=32*e.length,n="0123456789abcdef";for(let o=0;o<r;o+=8){const r=e[o>>5]>>>o%32&255,a=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[r(t)-1]=t;let o=1732584193,l=-271733879,s=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const r=o,f=l,p=s,v=d;o=a(o,l,s,d,e[t],7,-680876936),d=a(d,o,l,s,e[t+1],12,-389564586),s=a(s,d,o,l,e[t+2],17,606105819),l=a(l,s,d,o,e[t+3],22,-1044525330),o=a(o,l,s,d,e[t+4],7,-176418897),d=a(d,o,l,s,e[t+5],12,1200080426),s=a(s,d,o,l,e[t+6],17,-1473231341),l=a(l,s,d,o,e[t+7],22,-45705983),o=a(o,l,s,d,e[t+8],7,1770035416),d=a(d,o,l,s,e[t+9],12,-1958414417),s=a(s,d,o,l,e[t+10],17,-42063),l=a(l,s,d,o,e[t+11],22,-1990404162),o=a(o,l,s,d,e[t+12],7,1804603682),d=a(d,o,l,s,e[t+13],12,-40341101),s=a(s,d,o,l,e[t+14],17,-1502002290),l=a(l,s,d,o,e[t+15],22,1236535329),o=i(o,l,s,d,e[t+1],5,-165796510),d=i(d,o,l,s,e[t+6],9,-1069501632),s=i(s,d,o,l,e[t+11],14,643717713),l=i(l,s,d,o,e[t],20,-373897302),o=i(o,l,s,d,e[t+5],5,-701558691),d=i(d,o,l,s,e[t+10],9,38016083),s=i(s,d,o,l,e[t+15],14,-660478335),l=i(l,s,d,o,e[t+4],20,-405537848),o=i(o,l,s,d,e[t+9],5,568446438),d=i(d,o,l,s,e[t+14],9,-1019803690),s=i(s,d,o,l,e[t+3],14,-187363961),l=i(l,s,d,o,e[t+8],20,1163531501),o=i(o,l,s,d,e[t+13],5,-1444681467),d=i(d,o,l,s,e[t+2],9,-51403784),s=i(s,d,o,l,e[t+7],14,1735328473),l=i(l,s,d,o,e[t+12],20,-1926607734),o=u(o,l,s,d,e[t+5],4,-378558),d=u(d,o,l,s,e[t+8],11,-2022574463),s=u(s,d,o,l,e[t+11],16,1839030562),l=u(l,s,d,o,e[t+14],23,-35309556),o=u(o,l,s,d,e[t+1],4,-1530992060),d=u(d,o,l,s,e[t+4],11,1272893353),s=u(s,d,o,l,e[t+7],16,-155497632),l=u(l,s,d,o,e[t+10],23,-1094730640),o=u(o,l,s,d,e[t+13],4,681279174),d=u(d,o,l,s,e[t],11,-358537222),s=u(s,d,o,l,e[t+3],16,-722521979),l=u(l,s,d,o,e[t+6],23,76029189),o=u(o,l,s,d,e[t+9],4,-640364487),d=u(d,o,l,s,e[t+12],11,-421815835),s=u(s,d,o,l,e[t+15],16,530742520),l=u(l,s,d,o,e[t+2],23,-995338651),o=c(o,l,s,d,e[t],6,-198630844),d=c(d,o,l,s,e[t+7],10,1126891415),s=c(s,d,o,l,e[t+14],15,-1416354905),l=c(l,s,d,o,e[t+5],21,-57434055),o=c(o,l,s,d,e[t+12],6,1700485571),d=c(d,o,l,s,e[t+3],10,-1894986606),s=c(s,d,o,l,e[t+10],15,-1051523),l=c(l,s,d,o,e[t+1],21,-2054922799),o=c(o,l,s,d,e[t+8],6,1873313359),d=c(d,o,l,s,e[t+15],10,-30611744),s=c(s,d,o,l,e[t+6],15,-1560198380),l=c(l,s,d,o,e[t+13],21,1309151649),o=c(o,l,s,d,e[t+4],6,-145523070),d=c(d,o,l,s,e[t+11],10,-1120210379),s=c(s,d,o,l,e[t+2],15,718787259),l=c(l,s,d,o,e[t+9],21,-343485551),o=n(o,r),l=n(l,f),s=n(s,p),d=n(d,v)}return[o,l,s,d]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(r(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))};t.default=l},460:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},688:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default="00000000-0000-0000-0000-000000000000"},512:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(893))&&n.__esModule?n:{default:n};var a=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};t.default=a},264:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},722:(e,t)=>{let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};const n=new Uint8Array(16)},210:(e,t)=>{function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const a=e.length/4+2,i=Math.ceil(a/16),u=new Array(i);for(let t=0;t<i;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];u[t]=r}u[i-1][14]=8*(e.length-1)/Math.pow(2,32),u[i-1][14]=Math.floor(u[i-1][14]),u[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const a=new Uint32Array(80);for(let t=0;t<16;++t)a[t]=u[e][t];for(let e=16;e<80;++e)a[e]=n(a[e-3]^a[e-8]^a[e-14]^a[e-16],1);let i=o[0],c=o[1],l=o[2],s=o[3],d=o[4];for(let e=0;e<80;++e){const o=Math.floor(e/20),u=n(i,5)+r(o,c,l,s)+d+t[o]+a[e]>>>0;d=s,s=l,l=n(c,30)>>>0,c=i,i=u}o[0]=o[0]+i>>>0,o[1]=o[1]+c>>>0,o[2]=o[2]+l>>>0,o[3]=o[3]+s>>>0,o[4]=o[4]+d>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]};t.default=o},750:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=i;var n,o=(n=r(893))&&n.__esModule?n:{default:n};const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function i(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}var u=function(e,t=0){const r=i(e,t);if(!(0,o.default)(r))throw TypeError("Stringified UUID is invalid");return r};t.default=u},766:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(722))&&n.__esModule?n:{default:n},a=r(750);let i,u,c=0,l=0;var s=function(e,t,r){let n=t&&r||0;const s=t||new Array(16);let d=(e=e||{}).node||i,f=void 0!==e.clockseq?e.clockseq:u;if(null==d||null==f){const t=e.random||(e.rng||o.default)();null==d&&(d=i=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==f&&(f=u=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),v=void 0!==e.nsecs?e.nsecs:l+1;const h=p-c+(v-l)/1e4;if(h<0&&void 0===e.clockseq&&(f=f+1&16383),(h<0||p>c)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,l=v,u=f,p+=122192928e5;const y=(1e4*(268435455&p)+v)%4294967296;s[n++]=y>>>24&255,s[n++]=y>>>16&255,s[n++]=y>>>8&255,s[n++]=255&y;const g=p/4294967296*1e4&268435455;s[n++]=g>>>8&255,s[n++]=255&g,s[n++]=g>>>24&15|16,s[n++]=g>>>16&255,s[n++]=f>>>8|128,s[n++]=255&f;for(let e=0;e<6;++e)s[n+e]=d[e];return t||(0,a.unsafeStringify)(s)};t.default=s},532:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(449)),o=a(r(391));function a(e){return e&&e.__esModule?e:{default:e}}var i=(0,n.default)("v3",48,o.default);t.default=i},449:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,i,u){var c;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=(0,a.default)(n)),16!==(null===(c=n)||void 0===c?void 0:c.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+e.length);if(l.set(n),l.set(e,n.length),l=r(l),l[6]=15&l[6]|t,l[8]=63&l[8]|128,i){u=u||0;for(let e=0;e<16;++e)i[u+e]=l[e];return i}return(0,o.unsafeStringify)(l)}try{n.name=e}catch(e){}return n.DNS=i,n.URL=u,n};var n,o=r(750),a=(n=r(512))&&n.__esModule?n:{default:n};const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=i;const u="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=u},521:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(460)),o=i(r(722)),a=r(750);function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const i=(e=e||{}).random||(e.rng||o.default)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=i[e];return t}return(0,a.unsafeStringify)(i)};t.default=u},10:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(449)),o=a(r(210));function a(e){return e&&e.__esModule?e:{default:e}}var i=(0,n.default)("v5",80,o.default);t.default=i},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(264))&&n.__esModule?n:{default:n};var a=function(e){return"string"==typeof e&&o.default.test(e)};t.default=a},687:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(893))&&n.__esModule?n:{default:n};var a=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)};t.default=a}},t={};var r=function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}(757);module.exports=r})();
1
+ (()=>{"use strict";var e={216:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(733),t),o(r(757),t),o(r(965),t)},848:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrame=function(e){var t=e.eventHandler,r=e.context,a=e.React,i=e.src,u=e.gameId,c=e.style,s=e.customProps,l=a.createRef(),d=a.createElement("iframe",n({src:i,id:(0,o.createIFrameId)(u),style:c,ref:l},s)),f=function(e){var n;e.source===(null===(n=l.current)||void 0===n?void 0:n.contentWindow)&&(null==t||t(e,r))};return window.addEventListener("message",f,!1),{iframe:d,destructor:function(){window.removeEventListener("message",f,!1),function(){var e;try{(null===(e=null==r?void 0:r.getMetadata())||void 0===e?void 0:e.prevWindowTitle)?window.top.document.title=r.getMetadata().prevWindowTitle:window.localStorage.getItem("prevWindowTitle")?window.top.document.title=window.localStorage.getItem("prevWindowTitle"):window.top.document.title=""}catch(e){console.log("Error trying to set document title (KEEP CALM, for now it`s OK for iFrame-in-iFrame setting due to parent window security settings):",e)}}()},meta:{iframeRef:l}}};var o=r(707)},482:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(848),t)},388:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrame=function(e){var t=e.src,r=e.gameId,o=e.style,a=e.eventHandler,i=e.context,u=e.customProps,c=document.createElement("iframe");for(var s in c.src=t,c.id=(0,n.createIFrameId)(r),o)if(s in c.style){var l=o[s];try{c.style.setProperty(s,"number"==typeof l?"".concat(l,"px"):l)}catch(e){console.error("Error setting style for ".concat(s,": "),e)}}for(var s in Object.keys(Object(u)))c.setAttribute(s,u[s]);var d=function(e){e.source===c.contentWindow&&(null==a||a(e,i))};return window.addEventListener("message",d,!1),{iframe:c,destructor:function(){window.removeEventListener("message",d,!1),function(){var e;try{(null===(e=null==i?void 0:i.getMetadata())||void 0===e?void 0:e.prevWindowTitle)?window.top.document.title=i.getMetadata().prevWindowTitle:window.localStorage.getItem("prevWindowTitle")?window.top.document.title=window.localStorage.getItem("prevWindowTitle"):window.top.document.title=""}catch(e){console.log("Error trying to set document title (KEEP CALM, for now it`s OK for iFrame-in-iFrame setting due to parent window security settings):",e)}}()},meta:{}}};var n=r(707)},278:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(388),t)},668:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NOTIX_BACKEND_BASE_URL_DEV=t.NOTIX_BACKEND_BASE_URL_STAGE=t.NOTIX_BACKEND_BASE_URL=t.IFRAME_GAME_ID_PREFIX=void 0,t.IFRAME_GAME_ID_PREFIX="notix_embedded_",t.NOTIX_BACKEND_BASE_URL="https://game-aggregator.main.notix.games/external/api/v1",t.NOTIX_BACKEND_BASE_URL_STAGE="https://game-aggregator.stage.notix.games/external/api/v1",t.NOTIX_BACKEND_BASE_URL_DEV="https://game-aggregator.main.notix.games/external/api/v1"},29:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.iFrameCreators=void 0,t.initNotixBridge=function(e){var r,s,l=this,p=!1,v=null,h=e,y="prod",b=function(e){var t=e.token,n=e.partnerId,o=e.clientId,a=e.environment,i=e.setting;if(!t||!n)throw new Error("Not all required parameters are provided on Notix Bridge configuration.");r=t,v=n,null!=o||o,null!=a||(y=a),"lobby"===i&&(s=!0),p=!0};return{createIFrame:function(e){return function(e){return o(this,void 0,void 0,(function(){var o,c,l,b,g,w,m,_,I,P,O,A,E,M,j,S,T,x,G,U,R,k,W,N,F,B,L,D,C,q,K;return a(this,(function(a){switch(a.label){case 0:if(o=e.gameId,c=e.nodeId,l=e.player,b=e.browserSession,g=e.balance,w=e.eventHandler,m=e.customProps,_=e.style,I=e.sessionId,P=l.id,O=l.country,A=b.viewType,E=b.language,M=b.timeZone,j=b.ip,S=g.currency,T=g.amount,!p)throw new Error("Notix Bridge is not configured. Please call the configure method first.");a.label=1;case 1:return a.trys.push([1,3,,4]),x=(0,i.v4)(),[4,(0,u.startGame)({gameId:o,partnerId:v,nodeId:c,requestId:x,player:{id:P,country:O},browserSession:{language:E,viewType:A,timeZone:M,ip:j},balance:{currency:S,amount:T},partnerToken:r,env:y,isLobby:s,sessionId:I})];case 2:if(G=a.sent(),U=G.iFrameURI,R=G.token,!U)throw new Error("No iFrame URI provided by the server.");if(!R)throw new Error("No player token provided by the server.");if(k={_playerToken:R,_iframe:null,_metadata:{},updateMetadata:function(e){this._metadata=Object.assign(this._metadata,e)},addPropertyToMetadata:function(e,t){this._metadata[e]=t},getMetadata:function(){return this._metadata},getPlayerToken:function(){return this._playerToken},getIframe:function(){return this._iframe},updatePlayerToken:function(e){this._playerToken=e},updateIframe:function(e){this._iframe=e}},W=(0,d.createEventMiddleware)(f.handleGPWebAppInit,f.handleGPWebAppSetPageLoaded,f.handleGPWebAppSetPageTitle,f.handleGPWebAppShowAuthenticationFailed,f.handleGPWebAppShowGameState)(w),N=null,"react"===h){if(!(F=e.React))throw new Error("React instance is not provided.");B={eventHandler:W,context:k,React:F,customProps:m,src:U,gameId:o,style:_},N=t.iFrameCreators.react(B)}else"vanilla"===h&&(L={eventHandler:W,customProps:m,context:k,src:U,gameId:o,style:_},N=t.iFrameCreators.vanilla(L));if(!N)throw new Error("No iFrame creator result.");return D=N.iframe,C=N.destructor,q=N.meta,k.updateIframe(D),k.updateMetadata(Object.assign(q,{framework:h})),[2,n({iframe:D,destructor:C},q)];case 3:return[2,{error:K=a.sent(),message:K.message}];case 4:return[2]}}))}))}(e)},configure:b,configureAsync:function(e){return o(l,[e],void 0,(function(e){var t=e.token,r=e.partnerId,n=e.clientId,o=e.environment,i=e.setting;return a(this,(function(e){return[2,new Promise((function(e,a){try{b({token:t,partnerId:r,clientId:n,environment:o,setting:i}),e()}catch(e){a(e)}}))]}))}))},getGames:function(){return o(l,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:if(t.trys.push([0,2,,3]),!p)throw new Error("Notix Bridge is not configured. Please call the configure method first.");return[4,(0,c.getGamesList)({partnerId:v,token:r,env:y,isLobby:s})];case 1:return[2,t.sent()];case 2:return[2,{error:e=t.sent(),message:e.message}];case 3:return[2]}}))}))},getIFrameURI:function(e){return o(this,void 0,void 0,(function(){var t,n,o,c,l,d,f,h,b,g,w,m,_,I,P,O,A,E,M;return a(this,(function(a){switch(a.label){case 0:if(t=e.gameId,n=e.nodeId,o=e.player,c=e.browserSession,l=e.balance,d=e.sessionId,f=o.id,h=o.country,b=c.viewType,g=c.language,w=c.timeZone,m=c.ip,_=l.currency,I=l.amount,!p)throw new Error("Notix Bridge is not configured. Please call the configure method first.");a.label=1;case 1:return a.trys.push([1,3,,4]),P=(0,i.v4)(),console.log("🚀 ~ getIFrameURI ~ requestId:",P),[4,(0,u.startGame)({gameId:t,partnerId:v,nodeId:n,requestId:P,player:{id:f,country:h},browserSession:{language:g,viewType:b,timeZone:w,ip:m},balance:{currency:_,amount:I},partnerToken:r,env:y,sessionId:d,isLobby:s})];case 2:if(O=a.sent(),A=O.iFrameURI,E=O.token,!A)throw new Error("No iFrame URI provided by the server.");if(!E)throw new Error("No player token provided by the server.");return[2,A];case 3:return[2,{error:M=a.sent(),message:M.message}];case 4:return[2]}}))}))}}};var i=r(935),u=r(74),c=r(410),s=r(482),l=r(278),d=r(707),f=r(720);t.iFrameCreators={react:s.createIFrame,vanilla:l.createIFrame}},720:(e,t)=>{function r(e){var t,r=e.getIframe(),n=e.getMetadata();return"react"===n.framework?null===(t=null==n?void 0:n.iframeRef)||void 0===t?void 0:t.current:r}Object.defineProperty(t,"__esModule",{value:!0}),t.handleGPWebAppShowGameState=t.handleGPWebAppShowAuthenticationFailed=t.handleGPWebAppSetPageTitle=t.handleGPWebAppSetPageLoaded=t.handleGPWebAppInit=void 0;t.handleGPWebAppInit=function(e,t,n){var o,a,i;if("GPWebAppInit"===e.data.type){var u=r(t);null===(o=null==u?void 0:u.contentWindow)||void 0===o||o.postMessage({type:"GPWebAppInitResult",data:{result:!0,requestId:null===(i=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.data)||void 0===i?void 0:i.requestId}},"*")}n()};t.handleGPWebAppSetPageLoaded=function(e,t,n){"GPWebAppSetPageLoaded"===e.data.type&&r(t).contentWindow.postMessage({type:"GPWebAppSetPageLoadedResult",data:{result:!0,requestId:e.data.data.requestId}},"*");n()};t.handleGPWebAppSetPageTitle=function(e,t,n){try{var o=r(t);if("GPWebAppSetPageTitle"===e.data.type){var a=window.top.document.title;window.top.document.title=e.data.data.title,t.addPropertyToMetadata("prevWindowTitle",a),window.localStorage.setItem("prevWindowTitle",a),o.contentWindow.postMessage({type:"GPWebAppSetPageTitleResult",data:{result:!0,requestId:e.data.data.requestId}},"*")}}catch(e){console.log("Error trying to read document title (KEEP CALM, for now it`s OK for iFrame-in-iFrame setting due to parent window security settings):",e)}n()};t.handleGPWebAppShowAuthenticationFailed=function(e,t,n){var o=r(t);"GPWebAppShowAuthenticationFailed"===e.data.type&&(console.log("AUTH FAIL",e.data.type,e),o.contentWindow.postMessage({type:"GPWebAppShowAuthenticationFailedResult",data:{result:!0,requestId:e.data.data.requestId,token:"NEW_TOKEN_WILL_BE_HERE"}},"*")),n()};t.handleGPWebAppShowGameState=function(e,t,n){var o=r(t);"GPWebAppShowGameState"===e.data.type&&o.contentWindow.postMessage({type:"GPWebAppShowGameStateResult",data:{result:!0,requestId:e.data.data.requestId}},"*"),n()}},733:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(29),t),o(r(287),t)},410:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getGamesList=void 0;var a=r(865),i=function(e,t,r,i){return n(void 0,void 0,void 0,(function(){var n,u,c;return o(this,(function(o){switch(o.label){case 0:return n=(0,a.default)(r),u=i?"".concat(n,"/partners/lobby/games/list"):"".concat(n,"/partners/games/list?partnerID=").concat(e),console.log(u),[4,fetch(u,{method:"GET",headers:{Authorization:"Bearer ".concat(t)}})];case 1:if(!(c=o.sent()).ok)throw new Error("Failed to fetch games list: Server responeded with status ".concat(c.status));return[2,c.json()]}}))}))};t.getGamesList=function(e){return n(void 0,[e],void 0,(function(e){var t=e.partnerId,r=e.token,n=e.env,a=e.isLobby;return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i(t,r,n,a)];case 1:return[2,e.sent()];case 2:throw e.sent();case 3:return[2]}}))}))}},74:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.startGame=void 0;var i=r(865);t.startGame=function(e){return o(void 0,void 0,void 0,(function(){var t,r,o,u,c,s;return a(this,(function(a){switch(a.label){case 0:t=(0,i.default)(e.env),r=e.isLobby?"".concat(t,"/partners/lobby/games/start"):"".concat(t,"/partners/games/start"),o=function(e){var t=e.gameId,r=e.nodeId,o=e.partnerId,a=e.requestId,i=e.player,u=e.browserSession,c=e.balance,s=e.sessionId,l=e.isLobby;return n(n({requestId:a,gameId:t,nodeId:r,isTest:!0,player:{id:i.id,country:i.country}},!l&&{partnerId:o}),{browserSession:{language:u.language,viewType:u.viewType,timeZone:u.timeZone,ip:u.ip},balance:{currency:c.currency,amount:c.amount},sessionId:s})}(e),u={method:"POST",headers:{Authorization:"Bearer ".concat(e.partnerToken),"Content-Type":"application/json"},body:JSON.stringify(o)},a.label=1;case 1:return a.trys.push([1,4,,5]),[4,fetch(r,u)];case 2:if(!(c=a.sent()).ok)throw new Error("Failed to start game: Server responded with status ".concat(c.status));return[4,c.json()];case 3:return s=a.sent(),[2,{iFrameURI:decodeURI(null==s?void 0:s.uri),token:null==s?void 0:s.sessionId}];case 4:throw a.sent();case 5:return[2]}}))}))}},287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},355:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createEventMiddleware=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var o=this;return function(a,i){return r(o,void 0,void 0,(function(){var o,u=this;return n(this,(function(c){switch(c.label){case 0:o=function(c){return r(u,void 0,void 0,(function(){var u=this;return n(this,(function(s){switch(s.label){case 0:return c<e.length?[4,e[c](a,i,(function(){return r(u,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,o(c+1)];case 1:return e.sent(),[2]}}))}))}))]:[3,2];case 1:return s.sent(),[3,4];case 2:return[4,t(a)];case 3:s.sent(),s.label=4;case 4:return[2]}}))}))},c.label=1;case 1:return c.trys.push([1,3,,4]),[4,o(0)];case 2:return[2,c.sent()];case 3:throw c.sent();case 4:return[2]}}))}))}}}},865:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("dev"===e)return n.NOTIX_BACKEND_BASE_URL_DEV;if("stage"===e)return n.NOTIX_BACKEND_BASE_URL_STAGE;if("prod"===e)return n.NOTIX_BACKEND_BASE_URL;throw new Error("Incorrect env identifier passed in getBaseURL in Bridge backend request. Could not find matching base url")};var n=r(668)},707:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrameId=function(e){return"".concat(a.IFRAME_GAME_ID_PREFIX).concat(e)};var a=r(668);o(r(355),t)},757:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotixBridge=void 0;var n=(0,r(216).initNotixBridge)("react");t.NotixBridge=n},965:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VanillaNotixBridge=void 0;var n=(0,r(733).initNotixBridge)("vanilla");t.VanillaNotixBridge=n},935:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return c.default}});var n=f(r(766)),o=f(r(532)),a=f(r(521)),i=f(r(10)),u=f(r(688)),c=f(r(687)),s=f(r(893)),l=f(r(750)),d=f(r(512));function f(e){return e&&e.__esModule?e:{default:e}}},391:(e,t)=>{function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function o(e,t,r,o,a,i){return n((u=n(n(t,e),n(o,i)))<<(c=a)|u>>>32-c,r);var u,c}function a(e,t,r,n,a,i,u){return o(t&r|~t&n,e,t,a,i,u)}function i(e,t,r,n,a,i,u){return o(t&n|r&~n,e,t,a,i,u)}function u(e,t,r,n,a,i,u){return o(t^r^n,e,t,a,i,u)}function c(e,t,r,n,a,i,u){return o(r^(t|~n),e,t,a,i,u)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){const t=[],r=32*e.length,n="0123456789abcdef";for(let o=0;o<r;o+=8){const r=e[o>>5]>>>o%32&255,a=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[r(t)-1]=t;let o=1732584193,s=-271733879,l=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const r=o,f=s,p=l,v=d;o=a(o,s,l,d,e[t],7,-680876936),d=a(d,o,s,l,e[t+1],12,-389564586),l=a(l,d,o,s,e[t+2],17,606105819),s=a(s,l,d,o,e[t+3],22,-1044525330),o=a(o,s,l,d,e[t+4],7,-176418897),d=a(d,o,s,l,e[t+5],12,1200080426),l=a(l,d,o,s,e[t+6],17,-1473231341),s=a(s,l,d,o,e[t+7],22,-45705983),o=a(o,s,l,d,e[t+8],7,1770035416),d=a(d,o,s,l,e[t+9],12,-1958414417),l=a(l,d,o,s,e[t+10],17,-42063),s=a(s,l,d,o,e[t+11],22,-1990404162),o=a(o,s,l,d,e[t+12],7,1804603682),d=a(d,o,s,l,e[t+13],12,-40341101),l=a(l,d,o,s,e[t+14],17,-1502002290),s=a(s,l,d,o,e[t+15],22,1236535329),o=i(o,s,l,d,e[t+1],5,-165796510),d=i(d,o,s,l,e[t+6],9,-1069501632),l=i(l,d,o,s,e[t+11],14,643717713),s=i(s,l,d,o,e[t],20,-373897302),o=i(o,s,l,d,e[t+5],5,-701558691),d=i(d,o,s,l,e[t+10],9,38016083),l=i(l,d,o,s,e[t+15],14,-660478335),s=i(s,l,d,o,e[t+4],20,-405537848),o=i(o,s,l,d,e[t+9],5,568446438),d=i(d,o,s,l,e[t+14],9,-1019803690),l=i(l,d,o,s,e[t+3],14,-187363961),s=i(s,l,d,o,e[t+8],20,1163531501),o=i(o,s,l,d,e[t+13],5,-1444681467),d=i(d,o,s,l,e[t+2],9,-51403784),l=i(l,d,o,s,e[t+7],14,1735328473),s=i(s,l,d,o,e[t+12],20,-1926607734),o=u(o,s,l,d,e[t+5],4,-378558),d=u(d,o,s,l,e[t+8],11,-2022574463),l=u(l,d,o,s,e[t+11],16,1839030562),s=u(s,l,d,o,e[t+14],23,-35309556),o=u(o,s,l,d,e[t+1],4,-1530992060),d=u(d,o,s,l,e[t+4],11,1272893353),l=u(l,d,o,s,e[t+7],16,-155497632),s=u(s,l,d,o,e[t+10],23,-1094730640),o=u(o,s,l,d,e[t+13],4,681279174),d=u(d,o,s,l,e[t],11,-358537222),l=u(l,d,o,s,e[t+3],16,-722521979),s=u(s,l,d,o,e[t+6],23,76029189),o=u(o,s,l,d,e[t+9],4,-640364487),d=u(d,o,s,l,e[t+12],11,-421815835),l=u(l,d,o,s,e[t+15],16,530742520),s=u(s,l,d,o,e[t+2],23,-995338651),o=c(o,s,l,d,e[t],6,-198630844),d=c(d,o,s,l,e[t+7],10,1126891415),l=c(l,d,o,s,e[t+14],15,-1416354905),s=c(s,l,d,o,e[t+5],21,-57434055),o=c(o,s,l,d,e[t+12],6,1700485571),d=c(d,o,s,l,e[t+3],10,-1894986606),l=c(l,d,o,s,e[t+10],15,-1051523),s=c(s,l,d,o,e[t+1],21,-2054922799),o=c(o,s,l,d,e[t+8],6,1873313359),d=c(d,o,s,l,e[t+15],10,-30611744),l=c(l,d,o,s,e[t+6],15,-1560198380),s=c(s,l,d,o,e[t+13],21,1309151649),o=c(o,s,l,d,e[t+4],6,-145523070),d=c(d,o,s,l,e[t+11],10,-1120210379),l=c(l,d,o,s,e[t+2],15,718787259),s=c(s,l,d,o,e[t+9],21,-343485551),o=n(o,r),s=n(s,f),l=n(l,p),d=n(d,v)}return[o,s,l,d]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(r(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))};t.default=s},460:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},688:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default="00000000-0000-0000-0000-000000000000"},512:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(893))&&n.__esModule?n:{default:n};var a=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};t.default=a},264:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},722:(e,t)=>{let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};const n=new Uint8Array(16)},210:(e,t)=>{function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const a=e.length/4+2,i=Math.ceil(a/16),u=new Array(i);for(let t=0;t<i;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];u[t]=r}u[i-1][14]=8*(e.length-1)/Math.pow(2,32),u[i-1][14]=Math.floor(u[i-1][14]),u[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const a=new Uint32Array(80);for(let t=0;t<16;++t)a[t]=u[e][t];for(let e=16;e<80;++e)a[e]=n(a[e-3]^a[e-8]^a[e-14]^a[e-16],1);let i=o[0],c=o[1],s=o[2],l=o[3],d=o[4];for(let e=0;e<80;++e){const o=Math.floor(e/20),u=n(i,5)+r(o,c,s,l)+d+t[o]+a[e]>>>0;d=l,l=s,s=n(c,30)>>>0,c=i,i=u}o[0]=o[0]+i>>>0,o[1]=o[1]+c>>>0,o[2]=o[2]+s>>>0,o[3]=o[3]+l>>>0,o[4]=o[4]+d>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]};t.default=o},750:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=i;var n,o=(n=r(893))&&n.__esModule?n:{default:n};const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function i(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}var u=function(e,t=0){const r=i(e,t);if(!(0,o.default)(r))throw TypeError("Stringified UUID is invalid");return r};t.default=u},766:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(722))&&n.__esModule?n:{default:n},a=r(750);let i,u,c=0,s=0;var l=function(e,t,r){let n=t&&r||0;const l=t||new Array(16);let d=(e=e||{}).node||i,f=void 0!==e.clockseq?e.clockseq:u;if(null==d||null==f){const t=e.random||(e.rng||o.default)();null==d&&(d=i=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==f&&(f=u=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),v=void 0!==e.nsecs?e.nsecs:s+1;const h=p-c+(v-s)/1e4;if(h<0&&void 0===e.clockseq&&(f=f+1&16383),(h<0||p>c)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,s=v,u=f,p+=122192928e5;const y=(1e4*(268435455&p)+v)%4294967296;l[n++]=y>>>24&255,l[n++]=y>>>16&255,l[n++]=y>>>8&255,l[n++]=255&y;const b=p/4294967296*1e4&268435455;l[n++]=b>>>8&255,l[n++]=255&b,l[n++]=b>>>24&15|16,l[n++]=b>>>16&255,l[n++]=f>>>8|128,l[n++]=255&f;for(let e=0;e<6;++e)l[n+e]=d[e];return t||(0,a.unsafeStringify)(l)};t.default=l},532:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(449)),o=a(r(391));function a(e){return e&&e.__esModule?e:{default:e}}var i=(0,n.default)("v3",48,o.default);t.default=i},449:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,i,u){var c;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=(0,a.default)(n)),16!==(null===(c=n)||void 0===c?void 0:c.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+e.length);if(s.set(n),s.set(e,n.length),s=r(s),s[6]=15&s[6]|t,s[8]=63&s[8]|128,i){u=u||0;for(let e=0;e<16;++e)i[u+e]=s[e];return i}return(0,o.unsafeStringify)(s)}try{n.name=e}catch(e){}return n.DNS=i,n.URL=u,n};var n,o=r(750),a=(n=r(512))&&n.__esModule?n:{default:n};const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=i;const u="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=u},521:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(460)),o=i(r(722)),a=r(750);function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const i=(e=e||{}).random||(e.rng||o.default)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=i[e];return t}return(0,a.unsafeStringify)(i)};t.default=u},10:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(449)),o=a(r(210));function a(e){return e&&e.__esModule?e:{default:e}}var i=(0,n.default)("v5",80,o.default);t.default=i},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(264))&&n.__esModule?n:{default:n};var a=function(e){return"string"==typeof e&&o.default.test(e)};t.default=a},687:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(893))&&n.__esModule?n:{default:n};var a=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)};t.default=a}},t={};var r=function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}(757);module.exports=r})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notix.games/react-bridge",
3
- "version": "3.0.8",
3
+ "version": "3.0.10",
4
4
  "description": "Notix Games Bridge Module React Library",
5
5
  "main": "./index.js",
6
6
  "types": "./types/index.d.ts",
@@ -6,8 +6,9 @@ import { CreateIFrameProps as VanillaCreateIFrameProps } from '../adapters/vanil
6
6
  export interface InitNotixBridgeParams {
7
7
  token: string;
8
8
  partnerId: string;
9
- clientId: string;
9
+ clientId?: string;
10
10
  environment?: env;
11
+ setting?: 'lobby' | 'default';
11
12
  }
12
13
  export type Framework = 'react' | 'vanilla';
13
14
  export type iFrameCreatorsProps = ReactCreateIFrameProps | VanillaCreateIFrameProps;
@@ -3,6 +3,7 @@ interface GetGamesListProps {
3
3
  partnerId: PartnerId;
4
4
  token: string;
5
5
  env: env;
6
+ isLobby: boolean;
6
7
  }
7
- export declare const getGamesList: ({ partnerId, token, env }: GetGamesListProps) => Promise<Game[]>;
8
+ export declare const getGamesList: ({ partnerId, token, env, isLobby }: GetGamesListProps) => Promise<Game[]>;
8
9
  export {};
@@ -16,14 +16,15 @@ interface Balance {
16
16
  interface StartGameProps {
17
17
  gameId: GameId;
18
18
  nodeId: NodeId;
19
- partnerId: PartnerId;
20
19
  requestId: RequestId;
21
20
  player: Player;
22
21
  browserSession: BrowserSession;
23
22
  balance: Balance;
24
23
  partnerToken: string;
25
24
  env: env;
25
+ partnerId?: PartnerId;
26
26
  sessionId?: string;
27
+ isLobby?: boolean;
27
28
  }
28
29
  interface StartGameResult {
29
30
  iFrameURI: string;