function _AmazonWebAppApiTester(){this._init()}
_AmazonWebAppApiTester.prototype={_CLOUD_SYNC_DATA_KEY:"mock-cloud-sync-data",_CLOUD_SYNC_LAST_TOUCH_KEY:"mock-cloud-sync-last-touch",_ENTITLEMENT_KEY:"mock-entitlement",_amazonServices:null,_storage:null,_callbacks:null,_items:null,_IAP:null,_GameCircle:null,_init:function(){this._callbacks={};this._items={};this._determineStorage();this.setMockItems(this._getMockItems())},initialize:function(a){this._amazonServices=a},get IAP(){null==this._IAP&&null!=this._amazonServices&&(this._IAP=new _MockAmazonJavascriptInAppPurchasingBindings(this._amazonServices,
this));return this._IAP},get GameCircle(){null==this._GameCircle&&null!=this._amazonServices&&(this._GameCircle=new _MockAmazonJavascriptGameCircleBindings(this._amazonServices,this));return this._GameCircle},get Cache(){return null},_determineStorage:function(){if("undefined"===typeof localStorage||null==localStorage){var a=this;this._storage={_items:{},setItem:function(c,b){a._storage._items[c]=b},getItem:function(c){return a._storage._items[c]},removeItem:function(c){a._storage._items[c]&&delete a._storage._items[c]}}}else this._storage=
localStorage},_getMockItems:function(){if("undefined"!==typeof window){for(var a=["amazon.sdktester.json","/amazon.sdktester.json","/static/amazon.sdktester.json"],c=new XMLHttpRequest,b=0;b';b.appendChild(d);d=document.createElement("div");d.id="AmazonServicesPurchaseItem-Close";d.style.position="absolute";d.style.top="5px";d.style.right="5px";d.style.color="#bbb";d.style.fontSize="12px";d.style.verticalAlign="middle";var m=document.createElement("a");m.innerHTML='';
m.onclick=function(){document.body.removeChild(k);h.response.receipt={};h.response.purchaseRequestStatus=f._amazonServices.IAP.PurchaseStatus.FAILED;f._amazonServices.IAP._runCallback(h.callbackName,h.response)};d.appendChild(m);b.appendChild(d);d=document.createElement("hr");d.style.height="1px";d.style.borderWidth=0;d.style.backgroundColor="#333";b.appendChild(d);d=document.createElement("img");d.style.cssFloat="left";d.style.paddingRight="15px";d.src=g.smallIconUrl;b.appendChild(d);var d=document.createElement("div"),
n=document.createElement("div");n.id="AmazonServicesPurchaseItem-ThankYou";n.style.display="none";n.innerHTML="Thank You for purchasing "+g.title+"";d.appendChild(n);var p=document.createElement("div");p.id="AmazonServicesPurchaseItem-Pwnd";p.style.display="none";p.innerHTML="You already own "+g.title+"";d.appendChild(p);var j=document.createElement("div");j.id="AmazonServicesPurchaseItem-ItemTitle";j.style.marginTop="15px";j.style.marginBottom="15px";j.style.fontSize="16px";j.style.fontWeight=
"normal";j.innerHTML=g.title;d.appendChild(j);var l=document.createElement("div");l.id="AmazonServicesPurchaseItem-Processing";l.style.display="none";var e=document.createElement("div");e.id="AmazonServicesPurchaseItem-ProcessingMsg";e.style.cssFloat="left";e.style.clear="right";e.style.marginLeft="20px";e.style.paddingLeft="20px";e.style.backgroundImage="url(http://rialto-mas-dev.s3-website-us-east-1.amazonaws.com/images/nodpi/ajax-loader.gif)";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition=
"left center";e.style.backgroundSize="16px 16px";e.style.fontSize="20px";e.innerHTML="Processing
";l.appendChild(e);d.appendChild(l);var i=document.createElement("button");i.id="AmazonServicesPurchaseItem-BuyButton";i.style.cssFloat="left";i.style.clear="right";i.style.height="30px";i.style.width="100px";i.style.borderRadius="4px";i.style.fontSize="18px";i.style.fontWeight="bold";i.style.color="white";i.style.borderTop="0.063rem solid #fed78b";i.style.borderBottom="0.063rem solid #a65f2c";i.style.backgroundImage=
"-webkit-gradient(linear, left bottom, left top, color-stop(0, #ed7723), color-stop(1, #faa719))";i.style.textShadow="0rem -0.063rem 0rem #8b4c16";i.innerHTML="$"+g.price;i.onclick=function(){l.style.display="block";i.style.display="none";setTimeout(function(){var a=h.response.purchaseRequestStatus==f._amazonServices.IAP.PurchaseStatus.ALREADY_ENTITLED;l.style.display="none";j.style.display="none";m.innerHTML="Close";m.onclick=function(){document.body.removeChild(k)};a?p.style.display="block":(n.style.display=
"block",!a&&g.itemType!=f._amazonServices.IAP.ItemType.CONSUMABLE&&f._webAppApiTester.grantEntitlement(c));f._amazonServices.IAP._runCallback(h.callbackName,h.response)},1E3)};d.appendChild(i);e=document.createElement("div");e.id="AmazonServicesPurchaseItem-Description";e.style.cssFloat="left";e.style.width="350px";e.style.marginTop="15px";e.style.marginBottom="15px";e.style.color="#bbb";e.style.fontSize="14px";e.innerHTML=g.description;d.appendChild(e);e=document.createElement("div");e.id="AmazonServicesPurchaseItem-Disclaimer";
e.style.cssFloat="left";e.style.width="350px";e.style.color="#999";e.style.fontSize="10px";e.innerHTML="Sold by Amazon Digital Services, Inc. Additional taxes may apply.";d.appendChild(e);b.appendChild(d);k.appendChild(b);document.body.appendChild(k)}}};function _MockAmazonJavascriptGameCircleBindings(a,c){this._init(a,c)}
_MockAmazonJavascriptGameCircleBindings.prototype={_amazonServices:null,_webAppApiTester:null,_init:function(a,c){this._amazonServices=a;this._webAppApiTester=c},_runDebugModeCallback:function(a,c){var b=this._webAppApiTester.getCallbackForMethod(a);null==b&&(b=this._webAppApiTester.createMockCallback(a,c));this._amazonServices.GameCircle._runCallback(b.callbackName,b.response)},initialize:function(){this._runDebugModeCallback("GameCircle.initialize",[])},synchronize:function(a){this._runDebugModeCallback("GameCircle.synchronize",
[a])},synchronizeProgress:function(a,c,b){this._runDebugModeCallback("GameCircle.synchronizeProgress",[a,c,b])},onNewGameDataReturnValue:function(){}};var amzn_wa_tester=new _AmazonWebAppApiTester;