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,e){this.readOnly=e,this.objectStore=t}functionn(t){this.name=t||r,this.db={}}varr=t("src/constants").FILE_SYSTEM_NAME;returne.prototype.clear=function(t){if(this.readOnly)returnt("[MemoryContext] Error: write operation on read only context");vare=this.objectStore;Object.keys(e).forEach(function(t){deletee[t]}),t(null)},e.prototype.get=function(t,e){e(null,this.objectStore[t])},e.prototype.put=function(t,e,n){returnthis.readOnly?n("[MemoryContext] Error: write operation on read only context"):(this.objectStore[t]=e,n(null),void0)},e.prototype.delete=function(t,e){returnthis.readOnly?e("[MemoryContext] Error: write operation on read only context"):(deletethis.objectStore[t],e(null),void0)},n.isSupported=function(){return!0},n.prototype.open=function(t){t(null,!0)},n.prototype.getReadOnlyContext=function(){returnnewe(this.db,!0)},n.prototype.getReadWriteContext=function(){returnnewe(this.db,!1)},n}),n("src/providers/providers",["require","src/providers/indexeddb","src/providers/websql","src/provider
},e("Zlib.Inflate",v),e("Zlib.Inflate.prototype.decompress",v.prototype.p),_("Zlib.Inflate.BufferType",{ADAPTIVE:U.C,BLOCK:U.D}),e("Zlib.Deflate",m),e("Zlib.Deflate.compress",function(t,e){returnnewm(t,e).j()}),e("Zlib.Deflate.prototype.compress",m.prototype.j),_("Zlib.Deflate.CompressionType",{NONE:ie.NONE,FIXED:ie.r,DYNAMIC:ie.k})}.call(this),n("zlib",function(){}),n("src/adapters/zlib",["require","zlib"],function(t){functione(t){returnnewo(t).decompress()}functionn(t){returnnews(t).compress()}functionr(t){this.context=t}functioni(t){this.provider=t}t("zlib");varo=Zlib.Inflate,s=Zlib.Deflate;returnr.prototype.clear=function(t){this.context.clear(t)},r.prototype.get=function(t,n){this.context.get(t,function(t,r){returnt?(n(t),void0):(r&&(r=e(r)),n(null,r),void0)})},r.prototype.put=function(t,e,r){e=n(e),this.context.put(t,e,r)},r.prototype.delete=function(t,e){this.context.delete(t,e)},i.isSupported=function(){return!0},i.prototype.open=function(t){this.provider.open(t)},i.prototype.getReadOnlyContext=function(){returnnewr(this.provider.getReadOnlyContext())},i.prototype.getReadWriteContext=function(){returnnewr(this.provider.getReadWriteContext())},i}),n("src/adapters/adapters",["require","src/adapters/crypto","src/adapters/zlib"],function(t){vare=t("src/adapters/crypto"),n=t("src/adapters/zlib");return{AES:e.AES,TripleDES:e.TripleDES,Rabbit:e.Rabbit,Zlib:n,Compression:n,Encryption:e.AES}}),n("src/fs",["require","nodash","encoding","src/path","src/path","src/path","src/shared","src/shared","src/shared","src/error","src/error","src/error","src/error","src/error","src/error","src/error","src/error","src/error","src/error","src/error","src/error","src/error","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/providers/providers","src/adapters/adapters"],function(t){functione(t,e){this.id=t,this.type=e||he}functionn(t,e,n){this.id=t,this.flags=e,this.position=n}functionr(t,e,n){varr=Date.now();this.id=ve,this.mode=ge,this.atime=t||r,this.ctime=e||r,this.mtime=n||r,this.rnode=V()}functioni(t,e,n,r,i,o,s,a,c,u){varf=Date.now();this.id=t||V(),this.mode=e||he,this.size=n||0,this.atime=r||f,this.ctime=i||f,this.mtime=o||f,this.flags=s||[],this.xattrs=a||{},this.nlinks=c||0,this.version=u||0,this.blksize=void0,this.nblocks=1,this.data=V()}functiono(t,e){this.node=t.id,this.dev=e,this.size=t.size,this.nlinks=t.nlinks,this.atime=t.atime,this.mtime=t.mtime,this.ctime=t.ctime,this.type=t.mode}functions(t,e,n){functionr(e,r){e?n(e):r&&r.mode===ge&&r.rnode?t.get(r.rnode,i):n(newue("missing super node"))}functioni(t,e){t?n(t):e?n(null,e):n(newee("path does not exist"))}functiono(e,r){e?n(e):r.mode===de&&r.data?t.get(r.data,a):n(newie("a component of the path prefix is not a directory"))}functiona(e,r){if(e)n(e);elseif(Y(r).has(f)){vari=r[f].id;t.get(i,c)}elsen(newee("path does not exist"))}functionc(t,e){t?n(t):e.mode==pe?(h++,h>me?n(newce("too many symbolic links were encountered")):u(e.data)):n(null,e)}functionu(e){e=Z(e),l=$(e),f=Q(e),ye==f?t.get(ve,r):s(t,l,o)}if(e=Z(e),!e)returnn(newee("path is an empty string"));varf=Q(e),l=$(e),h=0;ye==f?t.get(ve,r):s(t,l,o)}functiona(t,e){functionn(n,i){!n&&i?e(newJ):n&&!ninstanceofee?e(n):(a=newr,t.put(a.id,a,o))}functiono(n){n?e(n):(c=newi(a.rnode,de),c.nlinks+=1,t.put(c.id,c,s))}functions(n){n?e(n):(u={},t.put(c.data,u,e))}vara,c,u;t.get(ve,n)}functionc(t,n,r){functiono(e,n){!e&&n?r(newJ):e&&!einstanceofee?r(e):s(t,y,a)}functiona(e,n){e?r(e):(d=n,t.get(d.data,c))}functionc(e,n){e?r(e):(p=n,l=newi(void0,de),l.nlinks+=1,t.put(l.id,l,u))}functionu(e){e?r(e):(h={},t.put(l.data,h,f))}functionf(n){n?r(n):(p[g]=newe(l.id,de),t.put(d.data,p,r))}n=Z(n);varl,h,d,p,g=Q(n),y=$(n);s(t,n,o)}functionu(t,e,n){functionr(e,r){e?n(e):(d=r,t.get(d.data,i))}functioni(e,r){e?n(e):ye==g?n(