define(["exports"],function(_exports){function updateCache(instance){instance.cache.put("data",new Response(JSON.stringify(instance.localData)))}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var MyStore=function(){function MyStore(){babelHelpers.classCallCheck(this,MyStore)}return babelHelpers.createClass(MyStore,[{key:"init",value:function(){var instance=this;return caches.open("embydata").then(function(result){instance.cache=result,instance.localData={}})}},{key:"setItem",value:function(name,value){this.localData&&this.localData[name]!==value&&(this.localData[name]=value,updateCache(this))}},{key:"getItem",value:function(name){if(this.localData)return this.localData[name]}},{key:"removeItem",value:function(name){this.localData&&(this.localData[name]=null,delete this.localData[name],updateCache(this))}}]),MyStore}();_exports.default=MyStore});