@notix.games/react-bridge 3.0.11 → 3.1.1

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,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.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,_=e.customProps,m=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:_,src:U,gameId:o,style:m},N=t.iFrameCreators.react(B)}else"vanilla"===h&&(L={eventHandler:W,customProps:_,context:k,src:U,gameId:o,style:m},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,_=c.ip,m=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:_},balance:{currency:m,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})();
1
+ (()=>{"use strict";var e={781: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(632),t),o(r(448),t),o(r(732),t)},473: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(598)},105: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(473),t)},953:(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(598)},441: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(953),t)},981:(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.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"},874: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,p=this,v=!1,h=null,y=e,b="prod",g=function(e){var t=e.token,n=e.partnerId,o=e.environment,a=e.setting,i=e.url;if(!t||!n)throw new Error("Not all required parameters are provided on Notix Bridge configuration.");r=t,h=n,o&&(b=o),"lobby"===a&&(s=!0),i&&(l=i),v=!0};return{createIFrame:function(e){return function(e){return o(this,void 0,void 0,(function(){var o,c,p,g,w,_,m,I,P,O,A,E,M,j,S,T,x,U,R,G,k,W,L,N,F,B,D,C,q,K,X;return a(this,(function(a){switch(a.label){case 0:if(o=e.gameId,c=e.nodeId,p=e.player,g=e.browserSession,w=e.balance,_=e.eventHandler,m=e.customProps,I=e.style,P=e.sessionId,O=p.id,A=p.country,E=g.viewType,M=g.language,j=g.timeZone,S=g.ip,T=w.currency,x=w.amount,!v)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]),U=(0,i.v4)(),[4,(0,u.startGame)({gameId:o,partnerId:h,nodeId:c,requestId:U,player:{id:O,country:A},browserSession:{language:M,viewType:E,timeZone:j,ip:S},balance:{currency:T,amount:x},partnerToken:r,env:b,isLobby:s,sessionId:P,providedURL:l})];case 2:if(R=a.sent(),G=R.iFrameURI,k=R.token,!G)throw new Error("No iFrame URI provided by the server.");if(!k)throw new Error("No player token provided by the server.");if(W={_playerToken:k,_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}},L=(0,d.createEventMiddleware)(f.handleGPWebAppInit,f.handleGPWebAppSetPageLoaded,f.handleGPWebAppSetPageTitle,f.handleGPWebAppShowAuthenticationFailed,f.handleGPWebAppShowGameState)(_),N=null,"react"===y){if(!(F=e.React))throw new Error("React instance is not provided.");B={eventHandler:L,context:W,React:F,customProps:m,src:G,gameId:o,style:I},N=t.iFrameCreators.react(B)}else"vanilla"===y&&(D={eventHandler:L,customProps:m,context:W,src:G,gameId:o,style:I},N=t.iFrameCreators.vanilla(D));if(!N)throw new Error("No iFrame creator result.");return C=N.iframe,q=N.destructor,K=N.meta,W.updateIframe(C),W.updateMetadata(Object.assign(K,{framework:y})),[2,n({iframe:C,destructor:q},K)];case 3:return[2,{error:X=a.sent(),message:X.message}];case 4:return[2]}}))}))}(e)},configure:g,configureAsync:function(e){return o(p,[e],void 0,(function(e){var t=e.token,r=e.partnerId,n=e.environment,o=e.setting,i=e.url;return a(this,(function(e){return[2,new Promise((function(e,a){try{g({token:t,partnerId:r,environment:n,setting:o,url:i}),e()}catch(e){a(e)}}))]}))}))},getGames:function(){return o(p,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:if(t.trys.push([0,2,,3]),!v)throw new Error("Notix Bridge is not configured. Please call the configure method first.");return[4,(0,c.getGamesList)({partnerId:h,token:r,env:b,isLobby:s,providedURL:l})];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,d,f,p,y,g,w,_,m,I,P,O,A,E,M,j;return a(this,(function(a){switch(a.label){case 0:if(t=e.gameId,n=e.nodeId,o=e.player,c=e.browserSession,d=e.balance,f=e.sessionId,p=o.id,y=o.country,g=c.viewType,w=c.language,_=c.timeZone,m=c.ip,I=d.currency,P=d.amount,!v)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]),O=(0,i.v4)(),console.log("🚀 ~ getIFrameURI ~ requestId:",O),[4,(0,u.startGame)({gameId:t,partnerId:h,nodeId:n,requestId:O,player:{id:p,country:y},browserSession:{language:w,viewType:g,timeZone:_,ip:m},balance:{currency:I,amount:P},partnerToken:r,env:b,sessionId:f,isLobby:s,providedURL:l})];case 2:if(A=a.sent(),E=A.iFrameURI,M=A.token,!E)throw new Error("No iFrame URI provided by the server.");if(!M)throw new Error("No player token provided by the server.");return[2,E];case 3:return[2,{error:j=a.sent(),message:j.message}];case 4:return[2]}}))}))}}};var i=r(935),u=r(597),c=r(148),s=r(105),l=r(441),d=r(598),f=r(155);t.iFrameCreators={react:s.createIFrame,vanilla:l.createIFrame}},155:(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()}},632: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(874),t),o(r(850),t)},148: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(710),i=function(e,t,r,i,u){return n(void 0,void 0,void 0,(function(){var n,c,s;return o(this,(function(o){switch(o.label){case 0:return n=u||(0,a.default)(r),c=i?"".concat(n,"/partners/lobby/games/list"):"".concat(n,"/partners/games/list?partnerID=").concat(e),[4,fetch(c,{method:"GET",headers:{Authorization:"Bearer ".concat(t)}})];case 1:if(!(s=o.sent()).ok)throw new Error("Failed to fetch games list: Server responeded with status ".concat(s.status));return[2,s.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,u=e.providedURL;return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i(t,r,n,a,u)];case 1:return[2,e.sent()];case 2:throw e.sent();case 3:return[2]}}))}))}},597: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(710);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=e.providedURL||(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]}}))}))}},850:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},568: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]}}))}))}}}},710:(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(981)},598: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(981);o(r(568),t)},448:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotixBridge=void 0;var n=(0,r(781).initNotixBridge)("react");t.NotixBridge=n},732:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VanillaNotixBridge=void 0;var n=(0,r(632).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}(448);module.exports=r})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notix.games/react-bridge",
3
- "version": "3.0.11",
3
+ "version": "3.1.1",
4
4
  "description": "Notix Games Bridge Module React Library",
5
5
  "main": "./index.js",
6
6
  "types": "./types/index.d.ts",
@@ -6,9 +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;
10
9
  environment?: env;
11
10
  setting?: 'lobby' | 'default';
11
+ url?: string;
12
12
  }
13
13
  export type Framework = 'react' | 'vanilla';
14
14
  export type iFrameCreatorsProps = ReactCreateIFrameProps | VanillaCreateIFrameProps;
@@ -4,6 +4,7 @@ interface GetGamesListProps {
4
4
  token: string;
5
5
  env: env;
6
6
  isLobby: boolean;
7
+ providedURL?: string;
7
8
  }
8
- export declare const getGamesList: ({ partnerId, token, env, isLobby }: GetGamesListProps) => Promise<Game[]>;
9
+ export declare const getGamesList: ({ partnerId, token, env, isLobby, providedURL }: GetGamesListProps) => Promise<Game[]>;
9
10
  export {};
@@ -25,6 +25,7 @@ interface StartGameProps {
25
25
  partnerId?: PartnerId;
26
26
  sessionId?: string;
27
27
  isLobby?: boolean;
28
+ providedURL?: string;
28
29
  }
29
30
  interface StartGameResult {
30
31
  iFrameURI: string;
@@ -13,6 +13,7 @@ export interface Game {
13
13
  title: string;
14
14
  type: string;
15
15
  description: string;
16
+ priority: number;
16
17
  }
17
18
  export type CSSStyleProperties = Record<string, string | number>;
18
19
  export interface MiddlewareContext {