",window.addEventListener("keypress",d,!0))}))};return u.addEventListener("click",(function(e){e.preventDefault(),p(e)}),!0),window.addEventListener("keypress",d,!0),new Promise((function(e,t){e({})}))},cleanStage:function(){r.clearAllBodyScrollLocks(),document.body.classList.remove("swag-dialog-open");var e=l.wrapper.getElementsByClassName("swag-dialog-wrapper");Array.prototype.forEach.call(e,(function(e){e.parentNode.removeChild(e)}))},populateLevelSelect:function(e){return s.getScoreCategories().then((function(t){var n=document.getElementById(e);n&&t.map((function(e){var t=document.createElement("option");t.value=e.level_key,t.innerHTML=e.name,n.appendChild(t)}))}))},populateDaySelect:function(e,t){return s.getDays(t).then((function(t){var n=document.getElementById(e);n&&t.map((function(e){var t=document.createElement("option");t.value=e,t.innerHTML=e,n.appendChild(t)}))}))},resize:function(){o.debug("resize"),o.applyBreakpointClass()},populateAchievementSelect:function(e){return s.getAchievementCategories().then((function(t){var n=document.getElementById(e);t.map((function(e){var t=document.createElement("option");t.value=e.achievement_key,t.innerHTML=e.name,n.appendChild(t)}))}))},startGame:function(){return new Promise((function(e,t){console.log("::: start game method invoked :::"),e({})}))},endGame:function(){return new Promise((function(e,t){console.log("::: end game method invoked :::"),e({})}))},showAd:function(){return new Promise((function(e,t){e({})}))},getBrandingLogo:function(){return new Promise((function(e,t){var n=new Image;n.onload=function(){e(n)},n.src=a.resourceRoot+"shockwave-logo.svg"}))},getBrandingLogoUrl:function(){return new Promise((function(e,t){e(a.resourceRoot+"shockwave-logo.svg")}))},showBrandingAnimation:function(e,t){var n=this,a=document.getElementById(e);return new Promise((function(e,r){var o=n.templates.brandingAnimation();a.insertAdjacentHTML("afterbegin",o),a.classList.add("swag-branding-active");var i=document.getElementById("swag-branding-animation-wrapper");document.getElementById("swag-branding-animation").onload=function(){window.setTimeout((function(){i.parentNode.removeChild(i),a.classList.remove("swag-branding-active"),t&&t(),e()}),4500)}}))},leaderboardComponent:function(e,t,n){return new Promise((function(e,t){e()}))},onCloseDialog:function(e){e.preventDefault(),this.cleanStage(),this.emit(this.events.UI_EVENT,a.events.DIALOG_CLOSED)}};e.exports=Object.assign(i,u)},
/*!*************************************************************!*\
!*** ./node_modules/handlebars/dist/cjs/handlebars/base.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.HandlebarsEnvironment=u;var r=n(/*! ./utils */1),o=a(n(/*! ./exception */5)),i=n(/*! ./helpers */18),s=n(/*! ./decorators */26),l=a(n(/*! ./logger */28));function u(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},i.registerDefaultHelpers(this),s.registerDefaultDecorators(this)}t.VERSION="4.1.0",t.COMPILER_REVISION=7,t.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"},u.prototype={constructor:u,logger:l.default,log:l.default.log,registerHelper:function(e,t){if("[object Object]"===r.toString.call(e)){if(t)throw new o.default("Arg not supported with multiple helpers");r.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if("[object Object]"===r.toString.call(e))r.extend(this.partials,e);else{if(void 0===t)throw new o.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if("[object Object]"===r.toString.call(e)){if(t)throw new o.default("Arg not supported with multiple decorators");r.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]}};var c=l.default.log;t.log=c,t.createFrame=r.createFrame,t.logger=l.default},
/*!***************************************************!*\
!*** multi ./styles/main.scss ./src/api/index.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ./styles/main.scss */12),e.exports=n(/*! ./src/api/index.js */13)
/*!**************************!*\
!*** ./styles/main.scss ***!
\**************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */},function(e,t,n){},
/*!**************************!*\
!*** ./src/api/index.js ***!
\**************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var a=n(/*! ../config.js */2),r=n(/*! ./ui */9),o=n(/*! ./api */47);console.log("SWAG API "+a.version),e.exports={getInstance:function(e){return console.log(e),new o(e)},showBrandingAnimation:function(e,t){return r.showBrandingAnimation(e,t)},showLeaderboard:function(e,t,n){return r.leaderboardComponent(e,t,n)}}},
/*!*****************************************************************!*\
!*** ./node_modules/body-scroll-lock/lib/bodyScrollLock.esm.js ***!
\*****************************************************************/
/*! exports provided: disableBodyScroll, clearAllBodyScrollLocks, enableBodyScroll */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/api/ui.js (referenced with cjs require) */function(e,t,n){"use strict";n.r(t),n.d(t,"disableBodyScroll",(function(){return v})),n.d(t,"clearAllBodyScrollLocks",(function(){return m})),n.d(t,"enableBodyScroll",(function(){return g}));var a=!1;if("undefined"!=typeof window){var r={get passive(){a=!0}};window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}var o="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),i=[],s=!1,l=-1,u=void 0,c=void 0,d=function(e){return i.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},p=function(e){var t=e||window.event;return!!d(t.target)||t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1)},f=function(){void 0!==c&&(document.body.style.paddingRight=c,c=void 0),void 0!==u&&(document.body.style.overflow=u,u=void 0)},v=function(e,t){if(e){if(!i.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};i=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?p(e):e.stopPropagation())}(t,e)},s||(document.addEventListener("touchmove",p,a?{passive:!1}:void 0),s=!0)):function(e){if(void 0===c){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(c=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===u&&(u=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},m=function(){o?(i.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),s&&(document.removeEventListener("touchmove",p,a?{passive:!1}:void 0),s=!1),l=-1):f(),i=[]},g=function(e){e?(i=i.filter((function(t){return t.targetElement!==e})),o?(e.ontouchstart=null,e.ontouchmove=null,s&&0===i.length&&(document.removeEventListener("touchmove",p,a?{passive:!1}:void 0),s=!1)):i.length||f()):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")}},
/*!*******************!*\
!*** ./src/ui.js ***!
\*******************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var a=n(/*! component-emitter */6);n(/*! config */2),n(/*! element-resize-event */7),n(/*! utils */4),n(/*! data */8),n(/*! session */3),e.exports=a({})},
/*!*********************************************!*\
!*** ./src/templates/api/dialog.handlebars ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({compiler:[7,">= 4.0.0"],main:function(e,t,a,r,o){var i;return'
\n"},useData:!0})},
/*!****************************************************!*\
!*** ./src/templates/api/dialog-scores.handlebars ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({1:function(e,t,n,a,r){var o,i=null!=t?t:e.nullContext||{},s=n.helperMissing,l=e.escapeExpression;return' \n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){var o;return'
\n
\n
\n
\n \n \n
\n
\n\n'},useData:!0})},
/*!**********************************************************!*\
!*** ./src/templates/api/dialog-daily-scores.handlebars ***!
\**********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({1:function(e,t,n,a,r){var o=e.lambda,i=e.escapeExpression;return' \n"},3:function(e,t,n,a,r){var o,i=null!=t?t:e.nullContext||{},s=n.helperMissing,l=e.escapeExpression;return' \n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){var o,i=null!=t?t:e.nullContext||{};return'
\n
\n
\n
\n \n \n
\n
\n\n'},useData:!0})},
/*!****************************************************************!*\
!*** ./src/templates/api/dialog-score-confirmation.handlebars ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){var o;return'
Your score of '+e.escapeExpression("function"==typeof(o=null!=(o=n.value||(null!=t?t.value:t))?o:n.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"value",hash:{},data:r}):o)+' has been submitted!
\n
Ok
\n'},useData:!0})},
/*!**************************************************!*\
!*** ./src/templates/api/data-scores.handlebars ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({1:function(e,t,n,a,r){return"col5"},3:function(e,t,n,a,r){var o;return'
\n"},useData:!0,useDepths:!0})},
/*!*********************************************************!*\
!*** ./src/templates/api/data-score-context.handlebars ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({1:function(e,t,n,a,r){var o;return"
Today's best score: "+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.context:t)?o.dailyBest:o)?o.value:o,t))+"
You placed #"+s(i(null!=(o=null!=(o=null!=t?t.context:t)?o.scorePosition:o)?o.value:o,t))+" out of "+s(i(null!=(o=null!=(o=null!=t?t.context:t)?o.totalScores:o)?o.value:o,t))+" scores today
\n"},4:function(e,t,n,a,r){return"
Not yet placed
\n"},6:function(e,t,n,a,r){return"
No scores yet today
\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){var o;return null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=(o=null!=t?t.context:t)?o.totalScores:o)?o.value:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(6,r,0),data:r}))?o:""},useData:!0})},
/*!****************************************************************!*\
!*** ./src/templates/api/data-daily-scores-context.handlebars ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({1:function(e,t,n,a,r){var o;return"
Your best best score for this day: "+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.context:t)?o.dailyBest:o)?o.value:o,t))+"
You placed #"+s(i(null!=(o=null!=(o=null!=t?t.context:t)?o.scorePosition:o)?o.value:o,t))+" out of "+s(i(null!=(o=null!=(o=null!=t?t.context:t)?o.totalScores:o)?o.value:o,t))+" scores for this day
\n"},4:function(e,t,n,a,r){return"
Not yet placed
\n"},6:function(e,t,n,a,r){return"
No scores yet for this day
\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){var o;return null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=(o=null!=t?t.context:t)?o.totalScores:o)?o.value:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(6,r,0),data:r}))?o:""},useData:!0})},
/*!**********************************************************!*\
!*** ./src/templates/api/dialog-achievements.handlebars ***!
\**********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){var o;return'
\n'},useData:!0})},
/*!********************************************************!*\
!*** ./src/templates/api/data-achievements.handlebars ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({1:function(e,t,n,a,r){var o,i,s=null!=t?t:e.nullContext||{},l=n.helperMissing,u=e.escapeExpression;return'
\n"},2:function(e,t,n,a,r){return"achieved"},compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){var o;return null!=(o=n.each.call(null!=t?t:e.nullContext||{},null!=t?t.achievements:t,{name:"each",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:""},useData:!0})},
/*!**********************************************************!*\
!*** ./src/templates/api/dialog-weeklyscores.handlebars ***!
\**********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({1:function(e,t,n,a,r){var o,i=null!=t?t:e.nullContext||{},s=n.helperMissing,l=e.escapeExpression;return' \n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){var o;return'
\n \n
\n
\n
\n
Day
\n
Score
\n
\n \n
\n'},useData:!0})},
/*!********************************************************!*\
!*** ./src/templates/api/data-weeklyscores.handlebars ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({1:function(e,t,n,a,r){var o,i,s=null!=t?t:e.nullContext||{};return'
\n"},2:function(e,t,n,a,r){var o;return e.escapeExpression("function"==typeof(o=null!=(o=n.value||(null!=t?t.value:t))?o:n.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"value",hash:{},data:r}):o)},4:function(e,t,n,a,r){return"-"},compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){var o;return null!=(o=n.each.call(null!=t?t:e.nullContext||{},null!=t?t.weeklyscores:t,{name:"each",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:""},useData:!0})},
/*!*********************************************************!*\
!*** ./src/templates/api/branding-animation.handlebars ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){return'
\n \n
\n'},useData:!0})},
/*!********************************************************!*\
!*** ./src/templates/api/dialog-user-login.handlebars ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){return'
\n
\n \n \n \n \n
\n
\n
Not a member yet?
\n \n
\n
\n'},useData:!0})},
/*!*********************************************************!*\
!*** ./src/templates/api/dialog-user-create.handlebars ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var a=n(/*! ../../../node_modules/handlebars/runtime.js */0);e.exports=(a.default||a).template({compiler:[7,">= 4.0.0"],main:function(e,t,n,a,r){return'
\n
\n \n \n \n \n \n
\n
\n'},useData:!0})},
/*!************************!*\
!*** ./src/api/api.js ***!
\************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var a=n(/*! component-emitter */6),r=n(/*! ../config */2),o=n(/*! element-resize-event */7),i=n(/*! ../session */3),s=n(/*! ./data */48),l=n(/*! ./ui */9),u=n(/*! ../utils */4);function c(e){var t=this,n=e.wrapper,r=e.api_key;this._options={wrapper:n,api_key:r},this._init(),a(this),l.on("UI_EVENT",(function(e){t.emit(e,{type:e})})),l.on("UI_ERROR",(function(e){t._emitError(e)})),l.on("DATA_ERROR",(function(e){t._emitError(e)})),s.on("DATA_EVENT",(function(e){t.emit("DATA_EVENT",{type:e})})),s.on("DATA_ERROR",(function(e){t._emitError(e)}))}var d={startSession:function(){var e=this;return u.debug("start session"),s.getEntity().then((function(){u.debug("session ready"),e.emit(r.events.SESSION_READY,{session_ready:!0})}))},getScoreCategories:function(){return s.getScoreCategories()},getDays:function(e){return s.getDays(e)},getScores:function(e){return s.getScores(e)},postScore:function(e,t,n){return s.postScore(e,t,n).then((function(){n&&!0===n.confirmation&&l.renderDialog("scoreconfirmation",{value:t})}))},postDailyScore:function(e,t,n){return s.postDailyScore(e,t,n)},getAchievementCategories:function(){return s.getAchievementCategories()},postAchievement:function(e){return s.postAchievement(e)},getUserAchievements:function(){return s.getUserAchievements()},postDatastore:function(e,t){return s.postDatastore(e,t)},getUserDatastore:function(){return s.getUserDatastore()},populateLevelSelect:function(e){return l.populateLevelSelect(e)},populateDaySelect:function(e,t){return l.populateDaySelect(e,t)},populateAchievementSelect:function(e){return l.populateAchievementSelect(e)},getCurrentEntity:function(){return i.entity},showDialog:function(e,t){return l.renderDialog(e,t)},isSubscriber:function(){return s.isSubscriber()},hasDailyScore:function(e){return s.hasDailyScore(e)},getCurrentDay:function(){return s.getCurrentDay()},getBrandingLogo:function(){return l.getBrandingLogo()},getBrandingLogoUrl:function(){return l.getBrandingLogoUrl()},startGame:function(){return l.startGame()},endGame:function(){return l.endGame()},showAd:function(){return l.showAd()},postExternalMessage:function(e){return s.postExternalMessage(e)},getCurrentUser:function(){return s.getCurrentUser()},userLogout:function(){return s.userLogout()},_init:function(){var e=this._getSiteMode();i.api_key=this._options.api_key,i.wrapper=this._options.wrapper,i.wrapper.classList.add("swag-wrapper"),i.theme=e,i.provider=e,i.apiRoot=r.themes[e].apiRoot,o(i.wrapper,(function(){setTimeout((function(){l.resize()}),400)}))},_getSiteMode:function(){var e=window.SWAGTHEME;return r.themes[e]?e:"shockwave"},_emitError:function(e){this.emit(this.ERROR,{type:e})},_parseUrlOptions:function(e){var t={};return-1===window.location.href.indexOf("?")?t:(decodeURIComponent(window.location.href.slice(window.location.href.indexOf("?")+1)).split("&").forEach((function(e,n){var a=e.split("=",2);t[a[0]]=a[1]})),e&&e in t?t[e]:t)}};Object.assign(c.prototype,d),e.exports=c},
/*!*************************!*\
!*** ./src/api/data.js ***!
\*************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var a=n(/*! ../config */2),r=(n(/*! ../utils */4),n(/*! ../session */3)),o=n(/*! ../data */8),i={apiMethods:Object.assign(o.apiMethods,{postScore:"/v1/score",postDailyScore:"/v1/dailyscore",postAchievement:"/v1/achievement",postDatastore:"/v1/datastore"}),postScore:function(e,t,n){var a={game:r.api_key,level_key:e,value:t};n&&n.meta&&(a.meta=n.meta);var o=this.buildUrlParamString(a);return this.postAPIData({method:this.apiMethods.postScore,body:a,params:o})},postDailyScore:function(e,t,n,a){var o={game:r.api_key,day:e,level_key:t,value:n},i=this.buildUrlParamString(o);return this.postAPIData({method:this.apiMethods.postDailyScore,body:o,params:i})},postAchievement:function(e){var t={game:r.api_key,achievement_key:e},n=this.buildUrlParamString(t);return this.postAPIData({method:this.apiMethods.postAchievement,body:t,params:n})},postDatastore:function(e,t){var n={game:r.api_key,key:e,value:t},a=this.buildUrlParamString(n);return this.postAPIData({method:this.apiMethods.postDatastore,body:n,params:a})},postExternalMessage:function(e){if(e&&e.type){if(window&&window.top){var t,n=(t=e,type=t.type,o=t.data,t);window.top.postMessage(n,"*")}}else self.emit(events.DATA_ERROR,a.events.INVALID_MESSAGE)}};e.exports=Object.assign(o,i)}])}));