!function(t,e){"object"==typeofexports&&"object"==typeofmodule?module.exports=e():"function"==typeofdefine&&define.amd?define([],e):"object"==typeofexports?exports.LightningFS=e():t.LightningFS=e()}(self,function(){returnfunction(t){vare={};functioni(n){if(e[n])returne[n].exports;vars=e[n]={i:n,l:!1,exports:{}};returnt[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}returni.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)returnt;if(4&e&&"object"==typeoft&&t&&t.__esModule)returnt;varn=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeoft)for(varsint)i.d(n,s,function(e){returnt[e]}.bind(null,s));returnn},i.n=function(t){vare=t&&t.__esModule?function(){returnt.default}:function(){returnt};returni.d(e,"a",e),e},i.o=function(t,e){returnObject.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=3)}([function(t,e){functioni(t){if(0===t.length)return".";lete=s(t);returne=e.reduce(r,[]),n(...e)}functionn(...t){if(0===t.length)return"";lete=t.join("/");returne=e.replace(/\/{2,}/g,"/")}functions(t){if(0===t.length)return[];if("/"===t)return["/"];lete=t.split("/");return""===e[e.length-1]&&e.pop(),"/"===t[0]?e[0]="/":"."!==e[0]&&e.unshift("."),e}functionr(t,e){if(0===t.length)returnt.push(e),t;if("."===e)returnt;if(".."===e){if(1===t.length){if("/"===t[0])thrownewError("Unable to normalize path - traverses above root directory");if("."===t[0])returnt.push(e),t}return".."===t[t.length-1]?(t.push(".."),t):(t.pop(),t)}returnt.push(e),t}t.exports={join:n,normalize:i,split:s,basename:function(t){if("/"===t)thrownewError(`Cannot get basename of "${t}"`);conste=t.lastIndexOf("/");return-1===e?t:t.slice(e+1)},dirname:function(t){conste=t.lastIndexOf("/");if(-1===e)thrownewError(`Cannot get dirname of "${t}"`);return0===e?"/":t.slice(0,e)},resolve:function(...t){lete="";for(letsoft)e=s.startsWith("/")?s:i(n(e,s));returne}}},function(t,e){functioni(t){returnclassextendsError{constructor(...e){super(...e),this.code=t,this.message?this.message=t+": "+this.message:this.message=t}}}constn=i("EEXIST"),s=i("ENOENT"),r=i("ENOTDIR"),o=i("ENOTEMPTY"),a=i("ETIMEDOUT");t.exports={EEXIST:n,ENOENT:s,ENOTDIR:r,ENOTEMPTY:o,ETIMEDOUT:a}},function(t,e,i){"use strict";i.r(e),i.d(e,"Store",function(){returnn}),i.d(e,"get",function(){returno}),i.d(e,"set",function(){returna}),i.d(e,"update",function(){returnh}),i.d(e,"del",function(){returnc}),i.d(e,"clear",function(){returnl}),i.d(e,"keys",function(){returnu}),i.d(e,"close",function(){returnd});classn{constructor(t="keyval-store",e="keyval"){this.storeName=e,this._dbName=t,this._storeName=e,this._init()}_init(){this._dbp||(this._dbp=newPromise((t,e)=>{consti=indexedDB.open(this._dbName);i.onerror=(()=>e(i.error)),i.onsuccess=(()=>t(i.result)),i.onupgradeneeded=(()=>{i.result.createObjectStore(this._storeName)})}))}_withIDBStore(t,e){returnthis._init(),this._dbp.then(i=>newPromise((n,s)=>{constr=i.transaction(this.storeName,t);r.oncomplete=(()=>n()),r.onabort=r.onerror=(()=>s(r.error)),e(r.objectStore(this.storeName))}))}_close(){returnthis._init(),this._dbp.then(t=>{t.close(),this._dbp=void0})}}lets;functionr(){returns||(s=newn),s}functiono(t,e=r()){leti;returne._withIDBStore("readwrite",e=>{i=e.get(t)}).then(()=>i.result)}functiona(t,e,i=r()){returni._withIDBStore("readwrite",i=>{i.put(e,t)})}functionh(t,e,i=r()){returni._withIDBStore("readwrite",i=>{constn=i.get(t);n.onsuccess=(()=>{i.put(e(n.result),t)})})}functionc(t,e=r()){returne._withIDBStore("readwrite",e=>{e.delete(t)})}functionl(t=r()){returnt._withIDBStore("readwrite",t=>{t.clear()})}functionu(t=r()){conste=[];returnt._withIDBStore("readwrite",t=>{(t.openKeyCursor||t.openCursor).call(t).onsuccess=function(){this.result&&(e.push(this.result.key),this.r