"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.promisify=e;varr="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__";functione(n){if("function"!=typeofn)thrownewTypeError("Argument to promisify must be a function");varo=n[r],t=e.Promise||Promise;if("function"!=typeoft)thrownewError("No Promise implementation found; do you need a polyfill?");returnfunction(){for(varr=this,e=arguments.length,i=newArray(e),f=0;f<e;f++)i[f]=arguments[f];returnnewt(function(e,t){i.push(function(r){if(r)returnt(r);for(varn=arguments.length,i=newArray(n>1?n-1:0),f=1;f<n;f++)i[f-1]=arguments[f];if(1===i.length||!o)returne(i[0]);varu={};i.forEach(function(r,e){varn=o[e];n&&(u[n]=r)}),e(u)}),n.apply(r,i)})}}e.argumentNames=r,e.Promise=void0;
vart,e,n=module.exports={};functionr(){thrownewError("setTimeout has not been defined")}functiono(){thrownewError("clearTimeout has not been defined")}functioni(e){if(t===setTimeout)returnsetTimeout(e,0);if((t===r||!t)&&setTimeout)returnt=setTimeout,setTimeout(e,0);try{returnt(e,0)}catch(n){try{returnt.call(null,e,0)}catch(n){returnt.call(this,e,0)}}}functionu(t){if(e===clearTimeout)returnclearTimeout(t);if((e===o||!e)&&clearTimeout)returne=clearTimeout,clearTimeout(t);try{returne(t)}catch(n){try{returne.call(null,t)}catch(n){returne.call(this,t)}}}!function(){try{t="function"==typeofsetTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeofclearTimeout?clearTimeout:o}catch(n){e=o}}();varc,s=[],l=!1,a=-1;functionf(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}functionh(){if(!l){vart=i(f);l=!0;for(vare=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}functionm(t,e){this.fun=t,this.array=e}functionp(){}n.nextTick=function(t){vare=newArray(arguments.length-1);if(arguments.length>1)for(varn=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(newm(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){thrownewError("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){thrownewError("process.chdir is not supported")},n.umask=function(){return0};
varr=require("process");functiont(r,t){for(vare=0,n=r.length-1;n>=0;n--){varo=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e--;e)r.unshift("..");returnr}functione(r){"string"!=typeofr&&(r+="");vart,e=0,n=-1,o=!0;for(t=r.length-1;t>=0;--t)if(47===r.charCodeAt(t)){if(!o){e=t+1;break}}else-1===n&&(o=!1,n=t+1);return-1===n?"":r.slice(e,n)}functionn(r,t){if(r.filter)returnr.filter(t);for(vare=[],n=0;n<r.length;n++)t(r[n],n,r)&&e.push(r[n]);returne}exports.resolve=function(){for(vare="",o=!1,s=arguments.length-1;s>=-1&&!o;s--){vari=s>=0?arguments[s]:r.cwd();if("string"!=typeofi)thrownewTypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,o="/"===i.charAt(0))}return(o?"/":"")+(e=t(n(e.split("/"),function(r){return!!r}),!o).join("/"))||"."},exports.normalize=function(r){vare=exports.isAbsolute(r),s="/"===o(r,-1);return(r=t(n(r.split("/"),function(r){return!!r}),!e).join("/"))||e||(r="."),r&&s&&(r+="/"),(e?"/":"")+r},exports.isAbsolute=function(r){return"/"===r.charAt(0)},exports.join=function(){varr=Array.prototype.slice.call(arguments,0);returnexports.normalize(n(r,function(r,t){if("string"!=typeofr)thrownewTypeError("Arguments to path.join must be strings");returnr}).join("/"))},exports.relative=function(r,t){functione(r){for(vart=0;t<r.length&&""===r[t];t++);for(vare=r.length-1;e>=0&&""===r[e];e--);returnt>e?[]:r.slice(t,e-t+1)}r=exports.resolve(r).substr(1),t=exports.resolve(t).substr(1);for(varn=e(r.split("/")),o=e(t.split("/")),s=Math.min(n.length,o.length),i=s,u=0;u<s;u++)if(n[u]!==o[u]){i=u;break}varf=[];for(u=i;u<n.length;u++)f.push("..");return(f=f.concat(o.slice(i))).join("/")},exports.sep="/",exports.delimiter=":",exports.dirname=function(r){if("string"!=typeofr&&(r+=""),0===r.length)return".";for(vart=r.charCodeAt(0),e=47===t,n=-1,o=!0,s=r.length-1;s>=1;--s)if(47===(t=r.charCodeAt(s))){if(!o){n=s;break}}elseo=!1;return-1===n?e?"/":".":e&&1===n?"/":r.slice(0,n)},exports.basename=function(r,t){varn=e(r);returnt&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},exports.extname=function(r){"string"!=typeofr&&(r+="");for(vart=-1,e=0,n=-1,o=!0,s=0,i=r.length-1;i>=0;--i){varu=r.charCodeAt(i);if(47!==u)-1===n&&(o=!1,n=i+1),46===u?-1===t?t=i:1!==s&&(s=1):-1!==t&&(s=-1);elseif(!o){e=i+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===e+1?"":r.slice(t,n)};varo="b"==="ab".substr(-1)?function(r,t,e){returnr.substr(t,e)}:function(r,t,e){returnt<0&&(t=r.length+t),r.substr(t,e)};
"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(varr=[],t=[],e="undefined"!=typeofUint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;functionh(r){vart=r.length;if(t%4>0)thrownewError("Invalid string. Length must be a multiple of 4");vare=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}functionu(r){vart=h(r),e=t[0],n=t[1];return3*(e+n)/4-n}functionc(r,t,e){return3*(t+e)/4-e}functioni(r){varn,o,a=h(r),u=a[0],i=a[1],f=newe(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>16&255,f[A++]=n>>8&255,f[A++]=255&n;return2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}functionf(t){returnr[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}functionA(r,t,e){for(varn,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));returno.join("")}functiond(t){for(vare,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;
vart=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");functioni(){try{vart=newUint8Array(1);returnt.__proto__={__proto__:Uint8Array.prototype,foo:function(){return42}},42===t.foo()&&"function"==typeoft.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}functiono(){returnf.TYPED_ARRAY_SUPPORT?2147483647:1073741823}functionu(t,r){if(o()<r)thrownewRangeError("Invalid typed array length");returnf.TYPED_ARRAY_SUPPORT?(t=newUint8Array(r)).__proto__=f.prototype:(null===t&&(t=newf(r)),t.length=r),t}functionf(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||thisinstanceoff))returnnewf(t,r,e);if("number"==typeoft){if("string"==typeofr)thrownewError("If encoding is specified then the first argument must be a string");returnc(this,t)}returns(this,t,r,e)}functions(t,r,e,n){if("number"==typeofr)thrownewTypeError('"value" argument must not be a number');return"undefined"!=typeofArrayBuffer&&rinstanceofArrayBuffer?g(t,r,e,n):"string"==typeofr?l(t,r,e):y(t,r)}functionh(t){if("number"!=typeoft)thrownewTypeError('"size" argument must be a number');if(t<0)thrownewRangeError('"size" argument must not be negative')}functiona(t,r,e,n){returnh(r),r<=0?u(t,r):void0!==e?"string"==typeofn?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}functionc(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(vare=0;e<r;++e)t[e]=0;returnt}functionl(t,r,e){if("string"==typeofe&&""!==e||(e="utf8"),!f.isEncoding(e))thrownewTypeError('"encoding" must be a valid string encoding');varn=0|v(r,e),i=(t=u(t,n)).write(r,e);returni!==n&&(t=t.slice(0,i)),t}functionp(t,r){vare=r.length<0?0:0|w(r.length);t=u(t,e);for(varn=0;n<e;n+=1)t[n]=255&r[n];returnt}functiong(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)thrownewRangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))thrownewRangeError("'length' is out of bounds");returnr=void0===e&&void0===n?newUint8Array(r):void0===n?newUint8Array(r,e):newUint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}functiony(t,r){if(f.isBuffer(r)){vare=0|w(r.length);return0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeofArrayBuffer&&r.bufferinstanceofArrayBuffer||"length"inr)return"number"!=typeofr.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))returnp(t,r.data)}thrownewTypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}functionw(t){if(t>=o())thrownewRangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return0|t}functiond(t){return+t!=t&&(t=0),f.alloc(+t)}functionv(t,r){if(f.isBuffer(t))returnt.length;if("undefined"!=typeofArrayBuffer&&"function"==typeofArrayBuffer.isView&&(ArrayBuffer.isView(t)||tinstanceofArrayBuffer))returnt.byteLength;"string"!=typeoft&&(t=""+t);vare=t.length;if(0===e)return0;for(varn=!1;;)switch(r){case"ascii":case"latin1":case"binary":returne;case"utf8":case"utf-8":casevoid0:return$(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return2*e;case"hex":returne>>>1;case"base64":returnK(t).length;default:if(n)return$(t).length;r=(""+r).toLowerCase(),n=!0}}functionE(t,r,e){varn=!1;if((void0===r||r<0)&&(r=0),r>this.length)return"";if((void0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":returnx(this,r,e);case"utf8":case"utf-8":returnY(this,r,e);case"ascii":returnL(this,r,e);case"latin1":case"binary":returnD(this,r,e);case"base64":returnS(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnC(this,r,e);default:if(n)thrownewTypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}functionb(t,r,e){varn=t[r];t[r]=t[e],t[e]=n}functionR(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeofe?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}elseif(e<0){if(!i)return-1;e=0}if("string"==typeofr&&(r=f.from(r,n)),f.
vart=require("../constants.js").FILE_SYSTEM_NAME,e=require("../../lib/async.js").setImmediate,o=function(){vart={};returnfunction(e){returnObject.prototype.hasOwnProperty.call(t,e)||(t[e]={}),t[e]}}();functionn(t,e){this.readOnly=e,this.objectStore=t}functionr(e){this.name=e||t}n.prototype.clear=function(t){if(this.readOnly)e(function(){t("[MemoryContext] Error: write operation on read only context")});else{varo=this.objectStore;Object.keys(o).forEach(function(t){deleteo[t]}),e(t)}},n.prototype.getObject=n.prototype.getBuffer=function(t,o){varn=this;e(function(){o(null,n.objectStore[t])})},n.prototype.putObject=n.prototype.putBuffer=function(t,o,n){this.readOnly?e(function(){n("[MemoryContext] Error: write operation on read only context")}):(this.objectStore[t]=o,e(n))},n.prototype.delete=function(t,o){this.readOnly?e(function(){o("[MemoryContext] Error: write operation on read only context")}):(deletethis.objectStore[t],e(o))},r.isSupported=function(){return!0},r.prototype.open=function(t){this.db=o(this.name),e(t)},r.prototype.getReadOnlyContext=function(){returnnewn(this.db,!0)},r.prototype.getReadWriteContext=function(){returnnewn(this.db,!1)},module.exports=r;
vart={};["3:EACCES:permission denied","9:EBADF:bad file descriptor","10:EBUSY:resource busy or locked","18:EINVAL:invalid argument","27:ENOTDIR:not a directory","28:EISDIR:illegal operation on a directory","34:ENOENT:no such file or directory","47:EEXIST:file already exists","50:EPERM:operation not permitted","51:ELOOP:too many symbolic links encountered","53:ENOTEMPTY:directory not empty","55:EIO:i/o error","1000:ENOTMOUNTED:not mounted","1001:EFILESYSTEMERROR:missing super node, use 'FORMAT' flag to format filesystem.","1002:ENOATTR:attribute does not exist"].forEach(function(e){varo=+(e=e.split(":"))[0],r=e[1],i=e[2];functions(t,e){Error.call(this),this.name=r,this.code=r,this.errno=o,this.message=t||i,e&&(this.path=e),this.stack=newError(this.message).stack}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.prototype.toString=function(){vart=this.path?", '"+this.path+"'":"";returnthis.name+": "+this.message+t},t[r]=t[o]=s}),module.exports=t;
vare=require("../lib/eventemitter.js"),t=require("./path.js"),n=require("../lib/intercom.js");functionr(){e.call(this);varr,i,o=this,s=!1;functionc(e){(i===e||s&&0===e.indexOf(r))&&o.trigger("change","change",e)}o.start=function(e,o,a){if(!i){if(t.isNull(e))thrownewError("Path must be a string without null bytes.");i=t.normalize(e),(s=!0===a)&&(r="/"===i?"/":i+"/"),n.getInstance().on("change",c)}},o.close=function(){n.getInstance().off("change",c),o.removeAllListeners("change")}}r.prototype=newe,r.prototype.constructor=r,module.exports=r;
functiont(t,i){if(!(tinstanceofi))thrownewTypeError("Cannot call a class as a function")}functioni(t,i){for(vars=0;s<i.length;s++){vare=i[s];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"ine&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}functions(t,s,e){returns&&i(t.prototype,s),e&&i(t,e),t}vare=require("./constants"),n=e.NODE_TYPE_FILE,r=e.NODE_TYPE_DIRECTORY,a=e.NODE_TYPE_SYMBOLIC_LINK,o=e.DEFAULT_FILE_PERMISSIONS,u=e.DEFAULT_DIR_PERMISSIONS,h=require("./constants").fsConstants,c=h.S_IFREG,f=h.S_IFDIR,m=h.S_IFLNK;functiond(t,i,s){if(t[i])returns();t.guid(function(e,n){if(e)returns(e);t[i]=n,s()})}functionl(t,i){switch(t){caser:return(i||u)|f;casea:return(i||o)|m;casen:default:return(i||o)|c}}varp=function(){functioni(s){t(this,i);vare=Date.now();this.id=s.id,this.data=s.data,this.size=s.size||0,this.atime=s.atime||e,this.ctime=s.ctime||e,this.mtime=s.mtime||e,this.flags=s.flags||[],this.xattrs=s.xattrs||{},this.nlinks=s.nlinks||0,"string"==typeofs.type?this.type=s.type:"string"==typeofs.mode?this.type=s.mode:this.type=n,this.permissions=s.permissions||l(this.type),this.uid=s.uid||0,this.gid=s.gid||0}returns(i,[{key:"toJSON",value:function(){return{id:this.id,data:this.data,size:this.size,atime:this.atime,ctime:this.ctime,mtime:this.ctime,flags:this.flags,xattrs:this.xattrs,nlinks:this.nlinks,mode:this.type,permissions:this.permissions,uid:this.uid,gid:this.gid}}},{key:"mode",get:function(){returnl(this.type,this.permissions)},set:function(t){this.permissions=t}}]),i}();module.exports.create=function(t,i){d(t,"id",function(s){if(s)returni(s);d(t,"data",function(s){if(s)returni(s);i(null,newp(t))})})};
vare=require("buffer").Buffer;functionn(e){return(n="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(e)}vart=require("../path.js"),i=t.normalize,o=t.dirname,r=t.basename,u=t.isAbsolute,a=require("../shared.js"),c=require("../../lib/async.js"),f=require("../constants.js"),l=f.NODE_TYPE_FILE,s=f.NODE_TYPE_DIRECTORY,p=f.NODE_TYPE_SYMBOLIC_LINK,d=f.NODE_TYPE_META,m=f.FULL_READ_WRITE_EXEC_PERMISSIONS,E=f.ROOT_DIRECTORY_NAME,g=f.SUPER_NODE_ID,w=f.SYMLOOP_MAX,O=f.O_READ,b=f.O_WRITE,y=f.O_CREATE,v=f.O_EXCLUSIVE,N=f.O_APPEND,h=f.O_FLAGS,I=f.XATTR_CREATE,j=f.XATTR_REPLACE,A=f.FS_NOMTIME,D=f.FS_NOCTIME,T=require("../errors.js"),L=require("../directory-entry.js"),R=require("../open-files.js"),_=require("../open-file-description.js"),F=require("../super-node.js"),S=require("../node.js"),V=require("../dirent.js"),B=require("../stats.js");functionP(e,n,t,i,o){varr=e.flags;r.includes(D)&&deletei.ctime,r.includes(A)&&deletei.mtime;varu=!1;functiona(t){e.changes.push({event:"change",path:n}),o(t)}i.ctime&&(t.ctime=i.ctime,t.atime=i.ctime,u=!0),i.atime&&(t.atime=i.atime,u=!0),i.mtime&&(t.mtime=i.mtime,u=!0),u?e.putObject(t.id,t,a):a()}functionx(e,n,t,u){if(t!==s&&t!==l)returnu(newT.EINVAL("type must be a directory or file",n));n=i(n);vara,c,f,p=r(n),d=o(n);functionm(t,i){!t&&i?u(newT.EEXIST("path name already exists",n)):!t||tinstanceofT.ENOENT?e.getObject(a.data,E):u(t)}functionE(n,i){n?u(n):(c=i,S.create({guid:e.guid,type:t},function(n,t){n?u(n):((f=t).nlinks+=1,e.putObject(f.id,f,w))}))}functiong(n){if(n)u(n);else{vart=Date.now();P(e,d,f,{mtime:t,ctime:t},u)}}functionw(n){n?u(n):(c[p]=newL(f.id,t),e.putObject(a.data,c,g))}k(e,d,function(t,i){t?u(t):i.type!==s?u(newT.ENOTDIR("a component of the path prefix is not a directory",n)):(a=i,k(e,n,m))})}functionk(e,n,t){if(!(n=i(n)))returnt(newT.ENOENT("path is an empty string"));varu=r(n),a=o(n),c=0;functionf(n,i){if(n)returnt(n);varo=newF(i);o&&o.type===d&&o.rnode?e.getObject(o.rnode,l):t(newT.EFILESYSTEMERROR)}functionl(e,n){e?t(e):n?S.create(n,t):t(newT.ENOENT)}functionm(i,o){i?t(i):o.type===s&&o.data?e.getObject(o.data,O):t(newT.ENOTDIR("a component of the path prefix is not a directory",n))}functionO(i,o){if(i)t(i);elseif(Object.prototype.hasOwnProperty.call(o,u)){varr=o[u].id;e.getObject(r,b)}elset(newT.ENOENT(null,n))}functionb(e,n){if(e)returnt(e);S.create(n,y)}functiony(l,s){vard;l?t(l):s.type===p?++c>w?t(newT.ELOOP(null,n)):(d=s.data,d=i(d),a=o(d),u=r(d),E===u?e.getObject(g,f):k(e,a,m)):t(null,s)}E===u?e.getObject(g,f):k(e,a,m)}functionC(e,n,t,i,o,r,u){vara=t.xattrs;r===I&&Object.prototype.hasOwnProperty.call(a,i)?u(newT.EEXIST("attribute already exists",n)):r!==j||Object.prototype.hasOwnProperty.call(a,i)?(a[i]=o,e.putObject(t.id,t,function(i){i?u(i):P(e,n,t,{ctime:Date.now()},u)})):u(newT.ENOATTR(null,n))}functionX(e,n){vart,i,o;functionr(o){o?n(o):S.create({guid:e.guid,id:t.rnode,type:s},function(t,o){t?n(t):((i=o).nlinks+=1,e.putObject(i.id,i,u))})}functionu(t){t?n(t):(o={},e.putObject(i.data,o,n))}e.getObject(g,function(i,o){!i&&o?n():!i||iinstanceofT.ENOENT?F.create({guid:e.guid},function(i,o){i?n(i):(t=o,e.putObject(t.id,t,r))}):n(i)})}functionq(e,n,t){n=i(n);varu,a,c,f,l=r(n),p=o(n);functiond(n,i){n?t(n):(c=i,e.getObject(c.data,m))}functionm(n,i){n?t(n):(f=i,S.create({guid:e.guid,type:s},function(n,i){n?t(n):((u=i).nlinks+=1,e.putObject(u.id,u,E))}))}functionE(n){n?t(n):(a={},e.putObject(u.data,a,w))}functiong(n){if(n)t(n);else{vari=Date.now();P(e,p,c,{mtime:i,ctime:i},t)}}functionw(n){n?t(n):(f[l]=newL(u.id,s),e.putObject(c.data,f,g))}k(e,n,function(i,o){!i&&o?t(newT.EEXIST(null,n)):!i||iinstanceofT.ENOENT?k(e,p,d):t(i)})}functionM(e,n,t,o){varr=f.fsConstants,u=r.F_OK,a=r.R_OK,c=r.W_OK,l=r.X_OK,s=r.S_IXUSR,p=r.S_IXGRP,d=r.S_IXOTH;k(e,n=i(n),function(e,i){if(e)returno(e);if(t===u)returno(null);varr=xe(i.mode,o);returnr?t&(a|c)?o(null):t&l&&r&(s|p|d)?o
vare=require("buffer").Buffer,r=require("es6-promisify"),t=r.promisify,n=require("../path.js"),a=require("../providers/index.js"),s=require("../shell/shell.js"),o=require("../../lib/intercom.js"),i=require("../fs-watcher.js"),u=require("../errors.js"),m=require("../shared.js"),c=m.nop,f=m.guid,l=require("../constants.js"),h=l.fsConstants,p=l.FILE_SYSTEM_NAME,d=l.FS_FORMAT,g=l.FS_READY,b=l.FS_PENDING,A=l.FS_ERROR,P=l.FS_NODUPEIDCHECK,v=l.STDIN,y=l.STDOUT,E=l.STDERR,R=require("./implementation.js");functionw(e){return"function"==typeofe?e:function(e){if(e)throwe}}functionS(e){e&&console.error("Filer error: ",e)}functionO(e){if(!(e&&e.protocol&&e.pathname))returne;if("file:"!==e.protocol)thrownewu.EINVAL("only file: URLs are supported for paths",e);for(varr=e.pathname,t=0;t<r.length;t++)if("%"===r[t]){varn=32|r.codePointAt(t+2);if("2"===r[t+1]&&102===n)thrownewu.EINVAL("file: URLs must not include encoded / characters",e)}returndecodeURIComponent(r)}functionx(r){returne.isBuffer(r)?r.toString():r}functionF(e,r){returne?n.isNull(e)?newu.EINVAL("Path must be a string without null bytes.",e):r||n.isAbsolute(e)?void0:newu.EINVAL("Path must be absolute.",e):newu.EINVAL("Path must be a string",e)}function_(e,r,t){varn=e[r],a=F(n=x(n=O(n)),t);if(a)throwa;e[r]=n}functionq(e,r){r=r||S;varm=(e=e||{}).flags||[],l=e.guid?e.guid:f,O=e.provider||newa.Default(e.name||p),x=e.name||O.name,F=m.includes(d),I=this;I.readyState=b,I.name=x,I.error=null,I.stdin=v,I.stdout=y,I.stderr=E,I.constants=h,I.F_OK=h.F_OK,I.R_OK=h.R_OK,I.W_OK=h.W_OK,I.X_OK=h.X_OK,this.Shell=s.bind(void0,this);varN=[];functionj(e){returnfunction(r){m.includes(P)?r(null,l()):functionr(t){varn=l();e.getObject(n,function(e,a){e?t(e):a?r(t):t(null,n)})}(r)}}this.queueOrRun=function(e){varr;returng===I.readyState?e.call(I):A===I.readyState?r=newu.EFILESYSTEMERROR("unknown error"):N.push(e),r},this.watch=function(e,r,t){if(n.isNull(e))thrownewError("Path must be a string without null bytes.");"function"==typeofr&&(t=r,r={}),r=r||{},t=t||c;vara=newi;returna.start(e,!1,r.recursive),a.on("change",t),a},O.open(function(e){functiont(e){functiont(e){varr=O[e]();returnr.name=x,r.flags=m,r.changes=[],r.guid=j(r),r.close=function(){vare=r.changes;!function(e){if(e.length){varr=o.getInstance();e.forEach(function(e){r.emit(e.event,e.path)})}}(e),e.length=0},r}I.provider={openReadWriteContext:function(){returnt("getReadWriteContext")},openReadOnlyContext:function(){returnt("getReadOnlyContext")}},I.readyState=e?A:g,N.forEach(function(e){e.call(this)}.bind(I)),N=null,r(e,I)}if(e)returnt(e);varn=O.getReadWriteContext();n.guid=j(n),F?n.clear(function(e){if(e)returnt(e);R.ensureRootDirectory(n,t)}):R.ensureRootDirectory(n,t)}),q.prototype.promises={},[{name:"appendFile",promises:!0,absPathArgs:[0]},{name:"access",promises:!0,absPathArgs:[0]},{name:"chown",promises:!0,absPathArgs:[0]},{name:"chmod",promises:!0,absPathArgs:[0]},{name:"close"},{name:"exists",absPathArgs:[0]},{name:"fchown"},{name:"fchmod"},{name:"fgetxattr"},{name:"fremovexattr"},{name:"fsetxattr"},{name:"fstat"},{name:"fsync"},{name:"ftruncate"},{name:"futimes"},{name:"getxattr",promises:!0,absPathArgs:[0]},{name:"link",promises:!0,absPathArgs:[0,1]},{name:"lseek"},{name:"lstat",promises:!0},{name:"mkdir",promises:!0,absPathArgs:[0]},{name:"mkdtemp",promises:!0},{name:"mknod",promises:!0,absPathArgs:[0]},{name:"open",promises:!0,absPathArgs:[0]},{name:"readdir",promises:!0,absPathArgs:[0]},{name:"read"},{name:"readFile",promises:!0,absPathArgs:[0]},{name:"readlink",promises:!0,absPathArgs:[0]},{name:"removexattr",promises:!0,absPathArgs:[0]},{name:"rename",promises:!0,absPathArgs:[0,1]},{name:"rmdir",promises:!0,absPathArgs:[0]},{name:"setxattr",promises:!0,absPathArgs:[0]},{name:"stat",promises:!0,absPathArgs:[0]},{name:"symlink",promises:!0,relPathArgs:[0],absPathArgs:[1]},{name:"truncate",promises:!0,absPathArgs:[0]},{name:"unlink",promises:!0,absPathArgs:[0]},{name:"utimes",promises:!0,absPathArgs:[0]},{name:"writeFile",promises:!0,absPathArgs:[0]},{name:"write"}].forEach(
"use strict";functione(e,t,r){return{dataPath:void0,schemaPath:void0,keyword:"absolutePath",params:{absolutePath:r},message:e,parentSchema:t}}functiont(t,r,a){returne(t?"The provided value ".concat(JSON.stringify(a)," is not an absolute path!"):"A relative path is expected. However, the provided value ".concat(JSON.stringify(a)," is an absolute path!"),r,a)}functionr(r){returnr.addKeyword("absolutePath",{errors:!0,type:"string",compile:function(r,a){varo=functiono(s){varn=!0;returns.includes("!")&&(o.errors=[e("The provided value ".concat(JSON.stringify(s)," contains exclamation mark (!) which is not allowed because it's reserved for loader syntax."),a,s)],n=!1),r===/^(?:[A-Za-z]:(\\|\/)|\\\\|\/)/.test(s)||(o.errors=[t(r,a,s)],n=!1),n};returno.errors=[],o}}),r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void0;vara=r;exports.default=a;
},{}],"GNtl":[function(require,module,exports){
"use strict";functiont(t,n){returna(t)||o(t,n)||r(t,n)||e()}functione(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functionr(t,e){if(t){if("string"==typeoft)returnn(t,e);varr=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void0}}functionn(t,e){(null==e||e>t.length)&&(e=t.length);for(varr=0,n=newArray(e);r<e;r++)n[r]=t[r];returnn}functiono(t,e){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(t)){varr=[],n=!0,o=!1,a=void0;try{for(vari,u=t[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(f){o=!0,a=f}finally{try{n||null==u.return||u.return()}finally{if(o)throwa}}returnr}}functiona(t){if(Array.isArray(t))returnt}functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionu(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}functionf(t,e,r){returne&&u(t.prototype,e),r&&u(t,r),t}varc=function(){functione(){i(this,e),this._left=[],this._right=[]}returnf(e,null,[{key:"getOperator",value:function(t,e){return"left"===t?e?">":">=":e?"<":"<="}},{key:"formatRight",value:function(t,r,n){return!1===r?e.formatLeft(t,!r,!n):"should be ".concat(e.getOperator("right",n)," ").concat(t)}},{key:"formatLeft",value:function(t,r,n){return!1===r?e.formatRight(t,!r,!n):"should be ".concat(e.getOperator("left",n)," ").concat(t)}},{key:"formatRange",value:function(t,r,n,o,a){vari="should be";returni+=" ".concat(e.getOperator(a?"left":"right",a?n:!n)," ").concat(t," "),i+=a?"and":"or",i+=" ".concat(e.getOperator(a?"right":"left",a?o:!o)," ").concat(r)}},{key:"getRangeValue",value:function(e,r){for(varn=r?1/0:-1/0,o=-1,a=r?function(e){returnt(e,1)[0]<=n}:function(e){returnt(e,1)[0]>=n},i=0;i<e.length;i++)if(a(e[i])){varu=t(e[i],1);n=u[0],o=i}returno>-1?e[o]:[1/0,!0]}}]),f(e,[{key:"left",value:function(t){vare=arguments.length>1&&void0!==arguments[1]&&arguments[1];this._left.push([t,e])}},{key:"right",value:function(t){vare=arguments.length>1&&void0!==arguments[1]&&arguments[1];this._right.push([t,e])}},{key:"format",value:function(){varr=!(arguments.length>0&&void0!==arguments[0])||arguments[0],n=t(e.getRangeValue(this._left,r),2),o=n[0],a=n[1],i=t(e.getRangeValue(this._right,!r),2),u=i[0],f=i[1];if(!Number.isFinite(o)&&!Number.isFinite(u))return"";varc=a?o+1:o;returnc===(f?u-1:u)?"should be ".concat(r?"":"!","= ").concat(c):Number.isFinite(o)&&!Number.isFinite(u)?e.formatLeft(o,r,a):!Number.isFinite(o)&&Number.isFinite(u)?e.formatRight(u,r,f):e.formatRange(o,u,a,f,r)}}]),e}();module.exports=c;
},{}],"SqDh":[function(require,module,exports){
"use strict";functiont(t,e){varn=Object.keys(t);if(Object.getOwnPropertySymbols){varr=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){returnObject.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}returnn}functione(e){for(varr=1;r<arguments.length;r++){varm=null!=arguments[r]?arguments[r]:{};r%2?t(Object(m),!0).forEach(function(t){n(e,t,m[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(m)):t(Object(m)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(m,t))})}returne}functionn(t,e,n){returneint?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}varr=require("./Range");module.exports.stringHints=function(t,n){varr=[],m="string",i=e({},t);if(!n){varo=i.minLength,u=i.formatMinimum,a=i.formatExclusiveMaximum;i.minLength=i.maxLength,i.maxLength=o,i.formatMinimum=i.formatMaximum,i.formatMaximum=u,i.formatExclusiveMaximum=!i.formatExclusiveMinimum,i.formatExclusiveMinimum=!a}if("number"==typeofi.minLength)if(1===i.minLength)m="non-empty string";else{varc=Math.max(i.minLength-1,0);r.push("should be longer than ".concat(c," character").concat(c>1?"s":""))}if("number"==typeofi.maxLength)if(0===i.maxLength)m="empty string";else{varf=i.maxLength+1;r.push("should be shorter than ".concat(f," character").concat(f>1?"s":""))}returni.pattern&&r.push("should".concat(n?"":" not"," match pattern ").concat(JSON.stringify(i.pattern))),i.format&&r.push("should".concat(n?"":" not"," match format ").concat(JSON.stringify(i.format))),i.formatMinimum&&r.push("should be ".concat(i.formatExclusiveMinimum?">":">="," ").concat(JSON.stringify(i.formatMinimum))),i.formatMaximum&&r.push("should be ".concat(i.formatExclusiveMaximum?"<":"<="," ").concat(JSON.stringify(i.formatMaximum))),[m].concat(r)},module.exports.numberHints=function(t,e){varn=["integer"===t.type?"integer":"number"],m=newr;"number"==typeoft.minimum&&m.left(t.minimum),"number"==typeoft.exclusiveMinimum&&m.left(t.exclusiveMinimum,!0),"number"==typeoft.maximum&&m.right(t.maximum),"number"==typeoft.exclusiveMaximum&&m.right(t.exclusiveMaximum,!0);vari=m.format(e);returni&&n.push(i),"number"==typeoft.multipleOf&&n.push("should".concat(e?"":" not"," be multiple of ").concat(t.multipleOf)),n};
"use strict";functiont(t){returnn(t)||r(t)||i(t)||e()}functione(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functionn(t){if(Array.isArray(t))returns(t)}functiona(t){returnm(t)||r(t)||i(t)||c()}functionr(t){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(t))returnArray.from(t)}functiono(t,e){returnm(t)||u(t,e)||i(t,e)||c()}functionc(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functioni(t,e){if(t){if("string"==typeoft)returns(t,e);varn=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void0}}functions(t,e){(null==e||e>t.length)&&(e=t.length);for(varn=0,a=newArray(e);n<e;n++)a[n]=t[n];returna}functionu(t,e){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(t)){varn=[],a=!0,r=!1,o=void0;try{for(varc,i=t[Symbol.iterator]();!(a=(c=i.next()).done)&&(n.push(c.value),!e||n.length!==e);a=!0);}catch(s){r=!0,o=s}finally{try{a||null==i.return||i.return()}finally{if(r)throwo}}returnn}}functionm(t){if(Array.isArray(t))returnt}functionh(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionp(t,e){for(varn=0;n<e.length;n++){vara=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"ina&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}functionl(t,e,n){returne&&p(t.prototype,e),n&&p(t,n),t}functionf(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&x(t,e)}functiond(t){returnfunction(){vare,n=O(t);if(S()){vara=O(this).constructor;e=Reflect.construct(n,arguments,a)}elsee=n.apply(this,arguments);returny(this,e)}}functiony(t,e){return!e||"object"!==j(e)&&"function"!=typeofe?v(t):e}functionv(t){if(void0===t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returnt}functiong(t){vare="function"==typeofMap?newMap:void0;return(g=function(t){if(null===t||!P(t))returnt;if("function"!=typeoft)thrownewTypeError("Super expression must either be null or a function");if(void0!==e){if(e.has(t))returne.get(t);e.set(t,n)}functionn(){returnb(t,arguments,O(this).constructor)}returnn.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),x(n,t)})(t)}functionb(t,e,n){return(b=S()?Reflect.construct:function(t,e,n){vara=[null];a.push.apply(a,e);varr=new(Function.bind.apply(t,a));returnn&&x(r,n.prototype),r}).apply(null,arguments)}functionS(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnDate.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}functionP(t){return-1!==Function.toString.call(t).indexOf("[native code]")}functionx(t,e){return(x=Object.setPrototypeOf||function(t,e){returnt.__proto__=e,t})(t,e)}functionO(t){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(t){returnt.__proto__||Object.getPrototypeOf(t)})(t)}functionj(t){return(j="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft})(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void0;varw=require("./util/hints"),D=w.stringHints,I=w.numberHints,T={type:1,not:1,oneOf:1,anyOf:1,if:1,enum:1,const:1,instanceof:1,required:2,pattern:2,patternRequired:2,format:2,formatMinimum:2,formatMaximum:2,minimum:2,exclusiveMinimum:2,maximum:2,exclusiveMaximum:2,multipleOf:2,uniqueItems:2,contains:2,minLength:2,maxLength:2,minItems:2,maxItems:2,mi
"use strict";vare=require("uri-js"),r=require("fast-deep-equal"),t=require("./util"),i=require("./schema_obj"),s=require("json-schema-traverse");functiona(e,r,t){vars=this._refs[t];if("string"==typeofs){if(!this._refs[s])returna.call(this,e,r,s);s=this._refs[s]}if((s=s||this._schemas[t])instanceofi)returnu(s.schema,this._opts.inlineRefs)?s.schema:s.validate||this._compile(s);varo,f,c,h=n.call(this,r,t);returnh&&(o=h.schema,r=h.root,c=h.baseId),oinstanceofi?f=o.validate||e.call(this,o.schema,r,void0,c):void0!==o&&(f=u(o,this._opts.inlineRefs)?o:e.call(this,o,r,void0,c)),f}functionn(r,t){vars=e.parse(t),a=d(s),n=v(this._getId(r.schema));if(0===Object.keys(r.schema).length||a!==n){varf=g(a),h=this._refs[f];if("string"==typeofh)returno.call(this,r,h,s);if(hinstanceofi)h.validate||this._compile(h),r=h;else{if(!((h=this._schemas[f])instanceofi))return;if(h.validate||this._compile(h),f==g(t))return{schema:h,root:r,baseId:n};r=h}if(!r.schema)return;n=v(this._getId(r.schema))}returnc.call(this,s,n,r.schema,r)}functiono(e,r,t){vari=n.call(this,e,r);if(i){vars=i.schema,a=i.baseId;e=i.root;varo=this._getId(s);returno&&(a=_(a,o)),c.call(this,t,a,s,e)}}module.exports=a,a.normalizeId=g,a.fullPath=v,a.url=_,a.ids=y,a.inlineRef=u,a.schema=n;varf=t.toHash(["properties","patternProperties","enum","dependencies","definitions"]);functionc(e,r,i,s){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(vara=e.fragment.split("/"),o=1;o<a.length;o++){varc=a[o];if(c){if(void0===(i=i[c=t.unescapeFragment(c)]))break;varh;if(!f[c]&&((h=this._getId(i))&&(r=_(r,h)),i.$ref)){varu=_(r,i.$ref),l=n.call(this,s,u);l&&(i=l.schema,s=l.root,r=l.baseId)}}}returnvoid0!==i&&i!==s.schema?{schema:i,root:s,baseId:r}:void0}}varh=t.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);functionu(e,r){return!1!==r&&(void0===r||!0===r?l(e):r?m(e)<=r:void0)}functionl(e){varr;if(Array.isArray(e)){for(vart=0;t<e.length;t++)if("object"==typeof(r=e[t])&&!l(r))return!1}elsefor(variine){if("$ref"==i)return!1;if("object"==typeof(r=e[i])&&!l(r))return!1}return!0}functionm(e){varr,t=0;if(Array.isArray(e)){for(vari=0;i<e.length;i++)if("object"==typeof(r=e[i])&&(t+=m(r)),t==1/0)return1/0}elsefor(varsine){if("$ref"==s)return1/0;if(h[s])t++;elseif("object"==typeof(r=e[s])&&(t+=m(r)+1),t==1/0)return1/0}returnt}functionv(r,t){return!1!==t&&(r=g(r)),d(e.parse(r))}functiond(r){returne.serialize(r).split("#")[0]+"#"}varp=/#\/?$/;functiong(e){returne?e.replace(p,""):""}function_(r,t){returnt=g(t),e.resolve(r,t)}functiony(i){vara=g(this._getId(i)),n={"":a},o={"":v(a,!1)},f={},c=this;returns(i,{allKeys:!0},function(i,s,a,h,u,l,m){if(""!==s){varv=c._getId(i),d=n[h],p=o[h]+"/"+u;if(void0!==m&&(p+="/"+("number"==typeofm?m:t.escapeFragment(m))),"string"==typeofv){v=d=g(d?e.resolve(d,v):v);var_=c._refs[v];if("string"==typeof_&&(_=c._refs[_]),_&&_.schema){if(!r(i,_.schema))thrownewError('id "'+v+'" resolves to more than one schema')}elseif(v!=g(p))if("#"==v[0]){if(f[v]&&!r(i,f[v]))thrownewError('id "'+v+'" resolves to more than one schema');f[v]=i}elsec._refs[v]=p}n[s]=d,o[s]=p}}),f}
"use strict";vare=require("./resolve");functiont(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}functioni(t,s,r){this.message=r||i.message(t,s),this.missingRef=e.url(t,s),this.missingSchema=e.normalizeId(e.fullPath(this.missingRef))}functions(e){returne.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}module.exports={Validation:s(t),MissingRef:s(i)},i.message=function(e,t){return"can't resolve reference "+t+" from id "+e};
"use strict";module.exports=function(r,t){t||(t={}),"function"==typeoft&&(t={cmp:t});vare,n="boolean"==typeoft.cycles&&t.cycles,i=t.cmp&&(e=t.cmp,function(r){returnfunction(t,n){vari={key:t,value:r[t]},u={key:n,value:r[n]};returne(i,u)}}),u=[];returnfunctionr(t){if(t&&t.toJSON&&"function"==typeoft.toJSON&&(t=t.toJSON()),void0!==t){if("number"==typeoft)returnisFinite(t)?""+t:"null";if("object"!=typeoft)returnJSON.stringify(t);vare,o;if(Array.isArray(t)){for(o="[",e=0;e<t.length;e++)e&&(o+=","),o+=r(t[e])||"null";returno+"]"}if(null===t)return"null";if(-1!==u.indexOf(t)){if(n)returnJSON.stringify("__cycle__");thrownewTypeError("Converting circular structure to JSON")}varf=u.push(t)-1,c=Object.keys(t).sort(i&&i(t));for(o="",e=0;e<c.length;e++){varl=c[e],y=r(t[l]);y&&(o&&(o+=","),o+=JSON.stringify(l)+":"+y)}returnu.splice(f,1),"{"+o+"}"}}(r)};
},{}],"yhC1":[function(require,module,exports){
"use strict";module.exports=function(e,r,a){vart="",s=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),l=e.self._getId(e.schema);if(e.opts.strictKeywords){vari=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(i){varn="unknown keyword: "+i;if("log"!==e.opts.strictKeywords)thrownewError(n);e.logger.warn(n)}}if(e.isTop&&(t+=" var validate = ",s&&(e.async=!0,t+="async "),t+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",l&&(e.opts.sourceCode||e.opts.processCode)&&(t+=" /*# sourceURL="+l+" */ ")),"boolean"==typeofe.schema||!o&&!e.schema.$ref){varc=e.level,f=e.dataLevel,h=e.schema["false schema"],u=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",d=!e.opts.allErrors,m="data"+(f||""),v="valid"+c;if(!1===e.schema){e.isTop?d=!0:t+=" var "+v+" = false; ",(W=W||[]).push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'boolean schema is false' "),e.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),t+=" } "):t+=" {} ";vary=t;t=W.pop(),!e.compositeRule&&d?e.async?t+=" throw new ValidationError(["+y+"]); ":t+=" validate.errors = ["+y+"]; return false; ":t+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}elsee.isTop?t+=s?" return data; ":" validate.errors = null; return true; ":t+=" var "+v+" = true; ";returne.isTop&&(t+=" }; return validate; "),t}if(e.isTop){varg=e.isTop;c=e.level=0,f=e.dataLevel=0,m="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,deletee.isTop,e.dataPathArr=[""],void0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){varw="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)thrownewError(w);e.logger.warn(w)}t+=" var vErrors = null; ",t+=" var errors = 0; ",t+=" if (rootData === undefined) rootData = data; "}else{c=e.level,m="data"+((f=e.dataLevel)||"");if(l&&(e.baseId=e.resolve.url(e.baseId,l)),s&&!e.async)thrownewError("async schema in sync schema");t+=" var errs_"+c+" = errors;"}v="valid"+c,d=!e.opts.allErrors;varE="",P="",b=e.schema.type,D=Array.isArray(b);if(b&&e.opts.nullable&&!0===e.schema.nullable&&(D?-1==b.indexOf("null")&&(b=b.concat("null")):"null"!=b&&(b=[b,"null"],D=!0)),D&&1==b.length&&(b=b[0],D=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)thrownewError('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(t+=" "+e.RULES.all.$comment.code(e,"$comment")),b){if(e.opts.coerceTypes)varS=e.util.coerceToTypes(e.opts.coerceTypes,b);varR=e.RULES.types[b];if(S||D||!0===R||R&&!X(R)){u=e.schemaPath+".type",p=e.errSchemaPath+"/type",u=e.schemaPath+".type",p=e.errSchemaPath+"/type";varT=D?"checkDataTypes":"checkDataType";if(t+=" if ("+e.util[T](b,m,e.opts.strictNumbers,!0)+") { ",S){vark="dataType"+c,$="coerced"+c;t+=" var "+k+" = typeof "+m+"; var "+$+" = undefined; ","array"==e.opts.coerceTypes&&(t+=" if ("+k+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+k+" = typeof "+m+"; if ("+e.util.checkDataType(e.schema.type,m,e.opts.strictNumbers)+") "+$+" = "+m+"; } "),t+=" if ("+$+" !== undefined) ; ";varL=S;if(L)for(varj,A=-1,I=L.length-1;A<I;)"string"==(j=L[A+=1])?t+=" else if ("+k+" == 'number' || "+k+" == 'boolean') "+$+" = '' + "+m+"; else if ("+m+" === null) "+$+" = ''; ":"number"==j||"integer"==j?(t+=" else if ("+k+" == 'boolean' || "+m+" === null || ("+k+" == 'string' && "+m+" && "+m+" == +"+m+" ","integer"==j&&(t+=" && !("+m+" % 1)"),t+=")) "+$+" = +"+m+"; "):"boolean"==j?t+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+$+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+$+" = true; ":"null"
},{}],"qdYs":[function(require,module,exports){
"use strict";vare=require("./resolve"),r=require("./util"),t=require("./error_classes"),i=require("fast-json-stable-stringify"),o=require("../dotjs/validate"),a=r.ucs2length,n=require("fast-deep-equal"),s=t.Validation;functionl(f,g,y,w){varR=this,V=this._opts,S=[void0],_={},b=[],E={},q=[],j={},x=[];g=g||{schema:f,refVal:S,refs:_};var$=c.call(this,f,g,w),k=this._compilations[$.index];if($.compiling)returnk.callValidate=functione(){varr=k.validate;vart=r.apply(this,arguments);e.errors=r.errors;returnt};varC=this._formats,P=this.RULES;try{varI=U(f,g,y,w);k.validate=I;varL=k.callValidate;returnL&&(L.schema=I.schema,L.errors=null,L.refs=I.refs,L.refVal=I.refVal,L.root=I.root,L.$async=I.$async,V.sourceCode&&(L.source=I.source)),I}finally{u.call(this,f,g,w)}functionU(i,c,u,f){vary=!c||c&&c.schema==i;if(c.schema!=g.schema)returnl.call(R,i,c,u,f);varw,E=!0===i.$async,j=o({isTop:!0,schema:i,isRoot:y,baseId:f,root:c,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:t.MissingRef,RULES:P,validate:o,util:r,resolve:e,resolveRef:M,usePattern:T,useDefault:D,useCustomRule:F,opts:V,formats:C,logger:R.logger,self:R});j=p(S,h)+p(b,d)+p(q,v)+p(x,m)+j,V.processCode&&(j=V.processCode(j,i));try{w=newFunction("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",j)(R,P,C,g,S,q,x,n,a,s),S[0]=w}catch($){throwR.logger.error("Error compiling schema, function code:",j),$}returnw.schema=i,w.errors=null,w.refs=_,w.refVal=S,w.root=y?w:c,E&&(w.$async=!0),!0===V.sourceCode&&(w.source={code:j,patterns:b,defaults:q}),w}functionM(r,t,i){t=e.url(r,t);varo,a,n=_[t];if(void0!==n)returnQ(o=S[n],a="refVal["+n+"]");if(!i&&g.refs){vars=g.refs[t];if(void0!==s)returnQ(o=g.refVal[s],a=O(t,o))}a=O(t);varc=e.call(R,U,g,t);if(void0===c){varu=y&&y[t];u&&(c=e.inlineRef(u,V.inlineRefs)?u:l.call(R,u,g,y,r))}if(void0!==c)returnfunction(e,r){vart=_[e];S[t]=r}(t,c),Q(c,a);!function(e){delete_[e]}(t)}functionO(e,r){vart=S.length;returnS[t]=r,_[e]=t,"refVal"+t}functionQ(e,r){return"object"==typeofe||"boolean"==typeofe?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}functionT(e){varr=E[e];returnvoid0===r&&(r=E[e]=b.length,b[r]=e),"pattern"+r}functionD(e){switch(typeofe){case"boolean":case"number":return""+e;case"string":returnr.toQuotedString(e);case"object":if(null===e)return"null";vart=i(e),o=j[t];returnvoid0===o&&(o=j[t]=q.length,q[o]=e),"default"+o}}functionF(e,r,t,i){if(!1!==R._opts.validateSchema){varo=e.definition.dependencies;if(o&&!o.every(function(e){returnObject.prototype.hasOwnProperty.call(t,e)}))thrownewError("parent schema must have all required keywords: "+o.join(","));vara=e.definition.validateSchema;if(a)if(!a(r)){varn="keyword schema is invalid: "+R.errorsText(a.errors);if("log"!=R._opts.validateSchema)thrownewError(n);R.logger.error(n)}}vars,l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;if(l)s=l.call(R,r,t,i);elseif(u)s=u.call(R,r,t,i),!1!==V.validateSchema&&R.validateSchema(s,!0);elseif(c)s=c.call(R,i,e.keyword,r,t);elseif(!(s=e.definition.validate))return;if(void0===s)thrownewError('custom keyword "'+e.keyword+'"failed to compile');varf=x.length;returnx[f]=s,{code:"customRule"+f,validate:s}}}functionc(e,r,t){vari=f.call(this,e,r,t);returni>=0?{index:i,compiling:!0}:(i=this._compilations.length,this._compilations[i]={schema:e,root:r,baseId:t},{index:i,compiling:!1})}functionu(e,r,t){vari=f.call(this,e,r,t);i>=0&&this._compilations.splice(i,1)}functionf(e,r,t){for(vari=0;i<this._compilations.length;i++){varo=this._compilations[i];if(o.schema==e&&o.root==r&&o.baseId==t)returni}return-1}functiond(e,t){return"var pattern"+e+" = new RegExp("+r.toQuotedString(t[e])+");"}functionv(e){return"var default"+e+" = defaults["+e+"];"}functionh(e,r){returnvoid0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}functionm(e){return"var customRule"+e+" = customRules["+e+"];"}functionp(e,r){if(!e.length)return"";for(vart="",i=0;i<e.length;i++)t+=r(i,e);returnt}module.exports=l;
"use strict";varn=require("./error_classes").MissingRef;functione(t,r,o){vari=this;if("function"!=typeofthis._opts.loadSchema)thrownewError("options.loadSchema should be a function");"function"==typeofr&&(o=r,r=void0);vara=c(t).then(function(){vare=i._addSchema(t,void0,r);returne.validate||functione(t){try{returni._compile(t)}catch(a){if(ainstanceofn)returnfunctiono(e){varo=e.missingSchema;if(h(o))thrownewError("Schema "+o+" is loaded but "+e.missingRef+" cannot be resolved");vara=i._loadingSchemas[o];a||(a=i._loadingSchemas[o]=i._opts.loadSchema(o)).then(s,s);returna.then(function(n){if(!h(o))returnc(n).then(function(){h(o)||i.addSchema(n,o,void0,r)})}).then(function(){returnfunctiont(o){try{returni._compile(o)}catch(e){if(einstanceofn)returna(e);throwe}functiona(n){vare=n.missingSchema;if(h(e))thrownewError("Schema "+e+" is loaded but "+n.missingRef+" cannot be resolved");vara=i._loadingSchemas[e];returna||(a=i._loadingSchemas[e]=i._opts.loadSchema(e)).then(s,s),a.then(function(n){if(!h(e))returnc(n).then(function(){h(e)||i.addSchema(n,e,void0,r)})}).then(function(){returnt(o)});functions(){deletei._loadingSchemas[e]}functionh(n){returni._refs[n]||i._schemas[n]}}}(t)});functions(){deletei._loadingSchemas[o]}functionh(n){returni._refs[n]||i._schemas[n]}}(a);throwa}functiono(n){varo=n.missingSchema;if(h(o))thrownewError("Schema "+o+" is loaded but "+n.missingRef+" cannot be resolved");vara=i._loadingSchemas[o];returna||(a=i._loadingSchemas[o]=i._opts.loadSchema(o)).then(s,s),a.then(function(n){if(!h(o))returnc(n).then(function(){h(o)||i.addSchema(n,o,void0,r)})}).then(function(){returne(t)});functions(){deletei._loadingSchemas[o]}functionh(n){returni._refs[n]||i._schemas[n]}}}(e)});returno&&a.then(function(n){o(null,n)},o),a;functionc(n){vart=n.$schema;returnt&&!i.getSchema(t)?e.call(i,{$ref:t},!0):Promise.resolve()}}module.exports=e;
"use strict";vare=/^[a-z_$][a-z0-9_$-]*$/i,r=require("./dotjs/custom"),t=require("./definition_schema");functioni(t,i){varo=this.RULES;if(o.keywords[t])thrownewError("Keyword "+t+" is already defined");if(!e.test(t))thrownewError("Keyword "+t+" is not a valid identifier");if(i){this.validateKeyword(i,!0);vara=i.type;if(Array.isArray(a))for(vars=0;s<a.length;s++)d(t,a[s],i);elsed(t,a,i);varn=i.metaSchema;n&&(i.$data&&this._opts.$data&&(n={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),i.validateSchema=this.compile(n,!0))}functiond(e,t,i){for(vara,s=0;s<o.length;s++){varn=o[s];if(n.type==t){a=n;break}}a||(a={type:t,rules:[]},o.push(a));vard={keyword:e,definition:i,custom:!0,code:r,implements:i.implements};a.rules.push(d),o.custom[e]=d}returno.keywords[t]=o.all[t]=!0,this}functiono(e){varr=this.RULES.custom[e];returnr?r.definition:this.RULES.keywords[e]||!1}functiona(e){varr=this.RULES;deleter.keywords[e],deleter.all[e],deleter.custom[e];for(vart=0;t<r.length;t++)for(vari=r[t].rules,o=0;o<i.length;o++)if(i[o].keyword==e){i.splice(o,1);break}returnthis}functions(e,r){s.errors=null;vari=this._validateKeyword=this._validateKeyword||this.compile(t,!0);if(i(e))return!0;if(s.errors=i.errors,r)thrownewError("custom keyword definition is invalid: "+this.errorsText(i.errors));return!1}module.exports={add:i,get:o,remove:a,validate:s};
module.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};
},{}],"hi5j":[function(require,module,exports){
"use strict";vare=require("./compile"),t=require("./compile/resolve"),r=require("./cache"),a=require("./compile/schema_obj"),i=require("fast-json-stable-stringify"),s=require("./compile/formats"),o=require("./compile/rules"),h=require("./data"),n=require("./compile/util");module.exports=p,p.prototype.validate=u,p.prototype.compile=v,p.prototype.addSchema=_,p.prototype.addMetaSchema=g,p.prototype.validateSchema=y,p.prototype.getSchema=S,p.prototype.removeSchema=q,p.prototype.addFormat=x,p.prototype.errorsText=k,p.prototype._addSchema=E,p.prototype._compile=I,p.prototype.compileAsync=require("./compile/async");varc=require("./keyword");p.prototype.addKeyword=c.add,p.prototype.getKeyword=c.get,p.prototype.removeKeyword=c.remove,p.prototype.validateKeyword=c.validate;vard=require("./compile/error_classes");p.ValidationError=d.Validation,p.MissingRefError=d.MissingRef,p.$dataMetaSchema=h;varl="http://json-schema.org/draft-07/schema",m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],f=["/properties"];functionp(e){if(!(thisinstanceofp))returnnewp(e);e=this._opts=n.copy(e)||{},O(this),this._schemas={},this._refs={},this._fragments={},this._formats=s(e.format),this._cache=e.cache||newr,this._loadingSchemas={},this._compilations=[],this.RULES=o(),this._getId=M(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void0===e.serialize&&(e.serialize=i),this._metaOpts=F(this),e.formats&&D(this),e.keywords&&P(this),A(this),"object"==typeofe.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),V(this)}functionu(e,t){varr;if("string"==typeofe){if(!(r=this.getSchema(e)))thrownewError('no schema with key or ref "'+e+'"')}else{vara=this._addSchema(e);r=a.validate||this._compile(a)}vari=r(t);return!0!==r.$async&&(this.errors=r.errors),i}functionv(e,t){varr=this._addSchema(e,void0,t);returnr.validate||this._compile(r)}function_(e,r,a,i){if(Array.isArray(e)){for(vars=0;s<e.length;s++)this.addSchema(e[s],void0,a,i);returnthis}varo=this._getId(e);if(void0!==o&&"string"!=typeofo)thrownewError("schema id must be string");returnT(this,r=t.normalizeId(r||o)),this._schemas[r]=this._addSchema(e,a,i,!0),this}functiong(e,t,r){returnthis.addSchema(e,t,r,!0),this}functiony(e,t){varr=e.$schema;if(void0!==r&&"string"!=typeofr)thrownewError("$schema must be a string");if(!(r=r||this._opts.defaultMeta||w(this)))returnthis.logger.warn("meta-schema not available"),this.errors=null,!0;vara=this.validate(r,e);if(!a&&t){vari="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)thrownewError(i);this.logger.error(i)}returna}functionw(e){vart=e._opts.meta;returne._opts.defaultMeta="object"==typeoft?e._getId(t)||t:e.getSchema(l)?l:void0,e._opts.defaultMeta}functionS(e){vart=$(this,e);switch(typeoft){case"object":returnt.validate||this._compile(t);case"string":returnthis.getSchema(t);case"undefined":returnb(this,e)}}functionb(r,i){vars=t.schema.call(r,{schema:{}},i);if(s){varo=s.schema,h=s.root,n=s.baseId,c=e.call(r,o,h,void0,n);returnr._fragments[i]=newa({ref:i,fragment:!0,schema:o,root:h,baseId:n,validate:c}),c}}function$(e,r){returnr=t.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}functionq(e){if(einstanceofRegExp)returnj(this,this._schemas,e),j(this,this._refs,e),this;switch(typeofe){case"undefined":returnj(this,this._schemas),j(this,this._refs),this._cache.clear(),this;case"string":varr=$(this,e);returnr&&this._cache.del(r.cacheKey),deletethis._schemas[e],deletethis._refs[e],this;case"object":vara=this._opts.serialize,i=a?a(e):e;this._cache.del(i);vars=this._getId(e);s&&(s=t.normalizeId(s),deletethis._schemas[s],deletethis._refs[s])}returnthis}functionj(e,t,r){for(varaint){vari=t[a];i.meta||r&&!r.test(a)||(e._cache.del(i.cacheKey),deletet[a])}}functionE(e,r,i,s){if("object"!=typeofe&&"boolean"!=typeofe)thrownewError("schema should be object or boolean");varo=this._opts.serialize,h=o?o(e):e,n=this._cache.get(h);if(n)returnn;s=s|
varr=require("buffer").Buffer,e={Object:Object,Array:Array,Function:Function,Number:Number,String:String,Date:Date,RegExp:RegExp};module.exports=functionn(t){returnvoid0!==r&&(e.Buffer=r),"undefined"!=typeofPromise&&(e.Promise=Promise),n.definition={compile:function(r){if("string"==typeofr){vare=i(r);returnfunction(r){returnrinstanceofe}}varn=r.map(i);returnfunction(r){for(vare=0;e<n.length;e++)if(rinstanceofn[e])return!0;return!1}},CONSTRUCTORS:e,metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},t.addKeyword("instanceof",n.definition),t;functioni(r){varn=e[r];if(n)returnn;thrownewError('invalid "instanceof" keyword value '+r)}};
"use strict";module.exports=functione(n){returne.definition={type:"number",macro:function(e,n){varr=e[0],i=e[1],o=n.exclusiveRange;returnfunction(e,n,r){if(void0!==r&&"boolean"!=typeofr)thrownewError("Invalid schema for exclusiveRange keyword, should be boolean");if(e>n||r&&e==n)thrownewError("There are no numbers in range")}(r,i,o),!0===o?{exclusiveMinimum:r,exclusiveMaximum:i}:{minimum:r,maximum:i}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}},n.addKeyword("range",e.definition),n.addKeyword("exclusiveRange"),n};
},{}],"AtCq":[function(require,module,exports){
"use strict";module.exports=functione(t){returne.definition={type:"string",inline:function(e,t,r){returnfunction(){try{if("object"==typeofr)returnnewRegExp(r.pattern,r.flags);vare=r.match(/^\/(.*)\/([gimuy]*)$/);if(e)returnnewRegExp(e[1],e[2]);thrownewError("cannot parse string into RegExp")}catch(t){throwconsole.error("regular expression",r,"is invalid"),t}}()+".test(data"+(e.dataLevel||"")+")"},metaSchema:{type:["string","object"],properties:{pattern:{type:"string"},flags:{type:"string"}},required:["pattern"],additionalProperties:!1}},t.addKeyword("regexp",e.definition),t};
"use strict";module.exports={metaSchemaRef:t};vare="http://json-schema.org/draft-07/schema";functiont(t){vara=t._opts.defaultMeta;return"string"==typeofa?{$ref:a}:t.getSchema(e)?{$ref:e}:(console.warn("meta schema not defined"),{})}
"use strict";module.exports=functione(r){varn={trimLeft:function(e){returne.replace(/^[\s]+/,"")},trimRight:function(e){returne.replace(/[\s]+$/,"")},trim:function(e){returne.trim()},toLowerCase:function(e){returne.toLowerCase()},toUpperCase:function(e){returne.toUpperCase()},toEnumCase:function(e,r){returnr.hash[t(e)]||e}};returne.definition={type:"string",errors:!1,modifying:!0,valid:!0,compile:function(e,r){vari;if(-1!==e.indexOf("toEnumCase")){if(i={hash:{}},!r.enum)thrownewError('Missing enum. To use `transform:["toEnumCase"]`, `enum:[...]` is required.');for(varo=r.enum.length;o--;o){varu=r.enum[o];if("string"==typeofu){vars=t(u);if(i.hash[s])thrownewError('Invalid enum uniqueness. To use `transform:["toEnumCase"]`, all values must be unique when case insensitive.');i.hash[s]=u}}}returnfunction(r,t,o,u){if(o){for(vars=0,a=e.length;s<a;s++)r=n[e[s]](r,i);o[u]=r}}},metaSchema:{type:"array",items:{type:"string",enum:["trimLeft","trimRight","trim","toLowerCase","toUpperCase","toEnumCase"]}}},r.addKeyword("transform",e.definition),r;functiont(e){returne.toLowerCase()}};
"use strict";functionr(r){if("undefined"==typeofSymbol||null==r[Symbol.iterator]){if(Array.isArray(r)||(r=n(r))){vart=0,e=function(){};return{s:e,n:function(){returnt>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(r){throwr},f:e}}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}varo,a,i=!0,u=!1;return{s:function(){o=r[Symbol.iterator]()},n:function(){varr=o.next();returni=r.done,r},e:function(r){u=!0,a=r},f:function(){try{i||null==o.return||o.return()}finally{if(u)throwa}}}}functiont(r){returna(r)||o(r)||n(r)||e()}functione(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functionn(r,t){if(r){if("string"==typeofr)returni(r,t);vare=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(e):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(r,t):void0}}functiono(r){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(r))returnArray.from(r)}functiona(r){if(Array.isArray(r))returni(r)}functioni(r,t){(null==t||t>r.length)&&(t=r.length);for(vare=0,n=newArray(t);e<t;e++)n[e]=r[e];returnn}Object.defineProperty(exports,"__esModule",{value:!0}),exports.validate=y,Object.defineProperty(exports,"ValidationError",{enumerable:!0,get:function(){returnc.default}});varu=f(require("./keywords/absolutePath")),c=f(require("./ValidationError"));functionf(r){returnr&&r.__esModule?r:{default:r}}varl=require("ajv"),d=require("ajv-keywords"),s=newl({allErrors:!0,verbose:!0,$data:!0});functiony(r,e,n){varo=[];if(Array.isArray(e)?((o=Array.from(e,function(t){returnh(r,t)})).forEach(function(r,t){r.forEach(functionr(e){e.dataPath="[".concat(t,"]").concat(e.dataPath),e.children&&e.children.forEach(r)})}),o=o.reduce(function(r,e){returnr.push.apply(r,t(e)),r},[])):o=h(r,e),o.length>0)thrownewc.default(o,r,n)}functionh(r,t){vare=s.compile(r);returne(t)?[]:e.errors?m(e.errors):[]}functionm(t){vare,n=[],o=r(t);try{vara=function(){varr=e.value,t=r.dataPath,o=[];n=n.filter(function(r){return!r.dataPath.includes(t)||(r.children&&(o=o.concat(r.children.slice(0))),r.children=void0,o.push(r),!1)}),o.length&&(r.children=o),n.push(r)};for(o.s();!(e=o.n()).done;)a()}catch(i){o.e(i)}finally{o.f()}returnn}d(s,["instanceof","formatMinimum","formatMaximum","patternRequired"]),(0,u.default)(s);
functionr(r,n){returni(r)||o(r,n)||e(r,n)||t()}functiont(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functione(r,t){if(r){if("string"==typeofr)returnn(r,t);vare=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(e):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?n(r,t):void0}}functionn(r,t){(null==t||t>r.length)&&(t=r.length);for(vare=0,n=newArray(t);e<t;e++)n[e]=r[e];returnn}functiono(r,t){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(r)){vare=[],n=!0,o=!1,i=void0;try{for(vara,u=r[Symbol.iterator]();!(n=(a=u.next()).done)&&(e.push(a.value),!t||e.length!==t);n=!0);}catch(l){o=!0,i=l}finally{try{n||null==u.return||u.return()}finally{if(o)throwi}}returne}}functioni(r){if(Array.isArray(r))returnr}vara=require("schema-utils"),u=a.validate;functionl(r,t){u(t,r)}functionc(t,e){for(varn={},o=0,i=Object.entries(e);o<i.length;o++){vara=r(i[o],2),u=a[0],l=a[1];n[u]=t[u],void0===n[u]&&(n[u]=l.default),l.process&&(n[u]=l.process(n[u]))}returnn}module.exports={validateOptions:l,processOptions:c};
functione(e,r){if(!(einstanceofr))thrownewTypeError("Cannot call a class as a function")}functionr(e,r){for(vari=0;i<r.length;i++){varo=r[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}functioni(e,i,o){returni&&r(e.prototype,i),o&&r(e,o),e}varo=require("path"),s=require("./utils"),t="filer-webpack-plugin",n=require("./schema"),a=require("./processors");module.exports=function(){functionr(){vari=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};e(this,r),s.validateOptions(i,n),this.options=s.processOptions(i,a)}returni(r,[{key:"apply",value:function(e){varr=this;e.hooks.normalModuleFactory.tap(t,function(e){e.hooks.resolve.tap(t,function(e){if("fsProvider"===e.request&&e.context===r.options.shimsDir)returnr.resolveFsProvider(e);if(!e.context.startsWith(r.options.filerDir))switch(e.request){case"fs":if(!r.options.shimFs)return;returnr.applyFsShim(e);case"path":if(!r.options.shimPath)return;returnr.applyPathShim(e);default:return}})})}},{key:"resolveFsProvider",value:function(e){switch(this.options.fsProvider){case"default":e.request=o.join(this.options.fsProviderDir,"default.js");break;case"indexeddb":e.request=o.join(this.options.fsProviderDir,"indexeddb.js");break;case"memory":e.request=o.join(this.options.fsProviderDir,"memory.js");break;case"custom":e.request=o.join(this.options.fsProviderDir,"custom.js");break;default:thrownewError(["Invalid option for fsProvider.","fsProvider must be one of 'default', 'indexeddb', 'memory' or 'custom'.","If using a custom fsProvider, you must also provide the fsProviderDir option."].join(" "))}}},{key:"applyFsShim",value:function(e){e.request=o.join(this.options.shimsDir,"fs.js")}},{key:"applyPathShim",value:function(e){e.request=o.join(this.options.shimsDir,"path.js")}}]),r}();