returne.prototype.clear=function(t){try{vare=this.objectStore.clear();e.onsuccess=function(){t()},e.onerror=function(e){t(e)}}catch(n){t(n)}},e.prototype.get=function(t,e){try{varn=this.objectStore.get(t);n.onsuccess=function(t){varn=t.target.result;e(null,n)},n.onerror=function(t){e(t)}}catch(r){e(r)}},e.prototype.put=function(t,e,n){try{varr=this.objectStore.put(e,t);r.onsuccess=function(t){vare=t.target.result;n(null,e)},r.onerror=function(t){n(t)}}catch(i){n(i)}},e.prototype.delete=function(t,e){try{varn=this.objectStore.delete(t);n.onsuccess=function(t){varn=t.target.result;e(null,n)},n.onerror=function(t){e(t)}}catch(r){e(r)}},n.isSupported=function(){return!!o},n.prototype.open=function(t){vare=this;if(e.db)returnt(null,!1),void0;varn=!1,r=o.open(e.name);r.onupgradeneeded=function(t){vare=t.target.result;e.objectStoreNames.contains(i)&&e.deleteObjectStore(i),e.createObjectStore(i),n=!0},r.onsuccess=function(r){e.db=r.target.result,t(null,n)},r.onerror=function(e){t(e)}},n.prototype.getReadOnlyContext=function(){returnnewe(this.db,a)},n.prototype.getReadWriteContext=function(){returnnewe(this.db,s)},n}),n("src/providers/websql",["require","src/constants","src/constants","src/constants","src/constants","src/constants"],function(t){functione(t,e){varn=this;this.getTransaction=function(r){returnn.transaction?(r(n.transaction),void0):(t[e?"readTransaction":"transaction"](function(t){n.transaction=t,r(t)}),void0)}}functionn(t){this.name=t||r,this.db=null}varr=t("src/constants").FILE_SYSTEM_NAME,i=t("src/constants").FILE_STORE_NAME,o=t("src/constants").WSQL_VERSION,s=t("src/constants").WSQL_SIZE,a=t("src/constants").WSQL_DESC;returne.prototype.clear=function(t){functione(e,n){t(n)}functionn(){t(null)}this.getTransaction(function(t){t.executeSql("DELETE FROM "+i,[],n,e)})},e.prototype.get=function(t,e){functionn(t,n){varr=0===n.rows.length?null:n.rows.item(0).data;e(null,r)}functionr(t,n){e(n)}this.getTransaction(function(e){e.executeSql("SELECT data FROM "+i+" WHERE id = ?",[t],n,r)})},e.prototype.put=function(t,e,n){functionr(){n(null)}functiono(t,e){n(e)}this.getTransaction(function(n){n.executeSql("INSERT OR REPLACE INTO "+i+" (id, data) VALUES (?, ?)",[t,e],r,o)})},e.prototype.delete=function(t,e){functionn(){e(null)}functionr(t,n){e(n)}this.getTransaction(function(e){e.executeSql("DELETE FROM "+i+" WHERE id = ?",[t],n,r)})},n.isSupported=function(){return!!window.openDatabase},n.prototype.open=function(t){functione(e,n){t(n)}functionn(e){functionn(e,n){varr=0===n.rows.item(0).count;t(null,r)}functiono(e,n){t(n)}r.db=c,e.executeSql("SELECT COUNT(id) AS count FROM "+i+";",[],n,o)}varr=this;if(r.db)returnt(null,!1),void0;varc=window.openDatabase(r.name,o,a,s);returnc?(c.transaction(function(t){t.executeSql("CREATE TABLE IF NOT EXISTS "+i+" (id unique, data)",[],n,e)}),void0):(t("[WebSQL] Unable to open database."),void0)},n.prototype.getReadOnlyContext=function(){returnnewe(this.db,!0)},n.prototype.getReadWriteContext=function(){returnnewe(this.db,!1)},n}),n("src/providers/memory",["require","src/constants"],function(t){functione(t){o(t)}functionn(t,e){this.readOnly=e,this.objectStore=t}functionr(t){this.name=t||i,this.db={}}vari=t("src/constants").FILE_SYSTEM_NAME,o=function(){return"undefined"!=typeofprocess&&process.nextTick?process.nextTick:"function"==typeofsetImmediate?function(t){setImmediate(t)}:function(t){setTimeout(t,0)}}();returnn.prototype.clear=function(t){if(this.readOnly)returne(function(){t("[MemoryContext] Error: write operation on read only context")}),void0;varn=this.objectStore;Object.keys(n).forEach(function(t){deleten[t]}),e(t)},n.prototype.get=function(t,n){varr=this;e(function(){n(null,r.objectStore[t])})},n.prototype.put=function(t,n,r){returnthis.readOnly?(e(function(){r("[MemoryContext] Error: write operation on read only context")}),void0):(this.objectStore[t]=n,e(r),void0)},n.prototype.delete=function(t,n){returnthis.readOnly?(e(function(){n("[MemoryContext] Error: write operation on read only context")}),void0):(deleteth