@chromatic-com/playwright 0.6.1 → 0.6.2-0505e86-20240311163909

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -2,23 +2,23 @@
2
2
  'use strict';
3
3
 
4
4
  var child_process = require('child_process');
5
- var ft = require('path');
6
- var xt = require('fs');
5
+ var mt = require('path');
6
+ var qt = require('fs');
7
7
  var promises = require('fs/promises');
8
8
 
9
9
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
10
 
11
- var ft__default = /*#__PURE__*/_interopDefault(ft);
12
- var xt__default = /*#__PURE__*/_interopDefault(xt);
11
+ var mt__default = /*#__PURE__*/_interopDefault(mt);
12
+ var qt__default = /*#__PURE__*/_interopDefault(qt);
13
13
 
14
- var tt=(l=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(l,{get:(c,t)=>(typeof require<"u"?require:c)[t]}):l)(function(l){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+l+'" is not supported')});var Pt=Object.create,St=Object.defineProperty,Ft=Object.getOwnPropertyDescriptor,Nt=Object.getOwnPropertyNames,Dt=Object.getPrototypeOf,Ct=Object.prototype.hasOwnProperty,G=(l=>typeof tt<"u"?tt:typeof Proxy<"u"?new Proxy(l,{get:(c,t)=>(typeof tt<"u"?tt:c)[t]}):l)(function(l){if(typeof tt<"u")return tt.apply(this,arguments);throw new Error('Dynamic require of "'+l+'" is not supported')}),$=(l,c)=>()=>(c||l((c={exports:{}}).exports,c),c.exports),jt=(l,c,t,n)=>{if(c&&typeof c=="object"||typeof c=="function")for(let i of Nt(c))!Ct.call(l,i)&&i!==t&&St(l,i,{get:()=>c[i],enumerable:!(n=Ft(c,i))||n.enumerable});return l},Lt=(l,c,t)=>(t=l!=null?Pt(Dt(l)):{},jt(c||!l||!l.__esModule?St(t,"default",{value:l,enumerable:!0}):t,l)),X=$(l=>{l.fromCallback=function(c){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")c.apply(this,t);else return new Promise((n,i)=>{c.call(this,...t,(y,u)=>y!=null?i(y):n(u));})},"name",{value:c.name})},l.fromPromise=function(c){return Object.defineProperty(function(...t){let n=t[t.length-1];if(typeof n!="function")return c.apply(this,t);c.apply(this,t.slice(0,-1)).then(i=>n(null,i),n);},"name",{value:c.name})};}),Tt=$((l,c)=>{var t=G("constants"),n=process.cwd,i=null,y=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return i||(i=n.call(process)),i};try{process.cwd();}catch{}typeof process.chdir=="function"&&(u=process.chdir,process.chdir=function(r){i=null,u.call(process,r);},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,u));var u;c.exports=a;function a(r){t.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&m(r),r.lutimes||O(r),r.chown=F(r.chown),r.fchown=F(r.fchown),r.lchown=F(r.lchown),r.chmod=h(r.chmod),r.fchmod=h(r.fchmod),r.lchmod=h(r.lchmod),r.chownSync=o(r.chownSync),r.fchownSync=o(r.fchownSync),r.lchownSync=o(r.lchownSync),r.chmodSync=C(r.chmodSync),r.fchmodSync=C(r.fchmodSync),r.lchmodSync=C(r.lchmodSync),r.stat=f(r.stat),r.fstat=f(r.fstat),r.lstat=f(r.lstat),r.statSync=b(r.statSync),r.fstatSync=b(r.fstatSync),r.lstatSync=b(r.lstatSync),r.chmod&&!r.lchmod&&(r.lchmod=function(e,s,p){p&&process.nextTick(p);},r.lchmodSync=function(){}),r.chown&&!r.lchown&&(r.lchown=function(e,s,p,d){d&&process.nextTick(d);},r.lchownSync=function(){}),y==="win32"&&(r.rename=typeof r.rename!="function"?r.rename:function(e){function s(p,d,k){var S=Date.now(),v=0;e(p,d,function g(j){if(j&&(j.code==="EACCES"||j.code==="EPERM"||j.code==="EBUSY")&&Date.now()-S<6e4){setTimeout(function(){r.stat(d,function(L,E){L&&L.code==="ENOENT"?e(p,d,g):k(j);});},v),v<100&&(v+=10);return}k&&k(j);});}return Object.setPrototypeOf&&Object.setPrototypeOf(s,e),s}(r.rename)),r.read=typeof r.read!="function"?r.read:function(e){function s(p,d,k,S,v,g){var j;if(g&&typeof g=="function"){var L=0;j=function(E,D,w){if(E&&E.code==="EAGAIN"&&L<10)return L++,e.call(r,p,d,k,S,v,j);g.apply(this,arguments);};}return e.call(r,p,d,k,S,v,j)}return Object.setPrototypeOf&&Object.setPrototypeOf(s,e),s}(r.read),r.readSync=typeof r.readSync!="function"?r.readSync:function(e){return function(s,p,d,k,S){for(var v=0;;)try{return e.call(r,s,p,d,k,S)}catch(g){if(g.code==="EAGAIN"&&v<10){v++;continue}throw g}}}(r.readSync);function m(e){e.lchmod=function(s,p,d){e.open(s,t.O_WRONLY|t.O_SYMLINK,p,function(k,S){if(k){d&&d(k);return}e.fchmod(S,p,function(v){e.close(S,function(g){d&&d(v||g);});});});},e.lchmodSync=function(s,p){var d=e.openSync(s,t.O_WRONLY|t.O_SYMLINK,p),k=!0,S;try{S=e.fchmodSync(d,p),k=!1;}finally{if(k)try{e.closeSync(d);}catch{}else e.closeSync(d);}return S};}function O(e){t.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(s,p,d,k){e.open(s,t.O_SYMLINK,function(S,v){if(S){k&&k(S);return}e.futimes(v,p,d,function(g){e.close(v,function(j){k&&k(g||j);});});});},e.lutimesSync=function(s,p,d){var k=e.openSync(s,t.O_SYMLINK),S,v=!0;try{S=e.futimesSync(k,p,d),v=!1;}finally{if(v)try{e.closeSync(k);}catch{}else e.closeSync(k);}return S}):e.futimes&&(e.lutimes=function(s,p,d,k){k&&process.nextTick(k);},e.lutimesSync=function(){});}function h(e){return e&&function(s,p,d){return e.call(r,s,p,function(k){P(k)&&(k=null),d&&d.apply(this,arguments);})}}function C(e){return e&&function(s,p){try{return e.call(r,s,p)}catch(d){if(!P(d))throw d}}}function F(e){return e&&function(s,p,d,k){return e.call(r,s,p,d,function(S){P(S)&&(S=null),k&&k.apply(this,arguments);})}}function o(e){return e&&function(s,p,d){try{return e.call(r,s,p,d)}catch(k){if(!P(k))throw k}}}function f(e){return e&&function(s,p,d){typeof p=="function"&&(d=p,p=null);function k(S,v){v&&(v.uid<0&&(v.uid+=4294967296),v.gid<0&&(v.gid+=4294967296)),d&&d.apply(this,arguments);}return p?e.call(r,s,p,k):e.call(r,s,k)}}function b(e){return e&&function(s,p){var d=p?e.call(r,s,p):e.call(r,s);return d&&(d.uid<0&&(d.uid+=4294967296),d.gid<0&&(d.gid+=4294967296)),d}}function P(e){if(!e||e.code==="ENOSYS")return !0;var s=!process.getuid||process.getuid()!==0;return !!(s&&(e.code==="EINVAL"||e.code==="EPERM"))}}}),_t=$((l,c)=>{var t=G("stream").Stream;c.exports=n;function n(i){return {ReadStream:y,WriteStream:u};function y(a,r){if(!(this instanceof y))return new y(a,r);t.call(this);var m=this;this.path=a,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,r=r||{};for(var O=Object.keys(r),h=0,C=O.length;h<C;h++){var F=O[h];this[F]=r[F];}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start;}if(this.fd!==null){process.nextTick(function(){m._read();});return}i.open(this.path,this.flags,this.mode,function(o,f){if(o){m.emit("error",o),m.readable=!1;return}m.fd=f,m.emit("open",f),m._read();});}function u(a,r){if(!(this instanceof u))return new u(a,r);t.call(this),this.path=a,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var m=Object.keys(r),O=0,h=m.length;O<h;O++){var C=m[O];this[C]=r[C];}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start;}this.busy=!1,this._queue=[],this.fd===null&&(this._open=i.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush());}}}),It=$((l,c)=>{c.exports=n;var t=Object.getPrototypeOf||function(i){return i.__proto__};function n(i){if(i===null||typeof i!="object")return i;if(i instanceof Object)var y={__proto__:t(i)};else var y=Object.create(null);return Object.getOwnPropertyNames(i).forEach(function(u){Object.defineProperty(y,u,Object.getOwnPropertyDescriptor(i,u));}),y}}),Q=$((l,c)=>{var t=G("fs"),n=Tt(),i=_t(),y=It(),u=G("util"),a,r;typeof Symbol=="function"&&typeof Symbol.for=="function"?(a=Symbol.for("graceful-fs.queue"),r=Symbol.for("graceful-fs.previous")):(a="___graceful-fs.queue",r="___graceful-fs.previous");function m(){}function O(e,s){Object.defineProperty(e,a,{get:function(){return s}});}var h=m;u.debuglog?h=u.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(h=function(){var e=u.format.apply(u,arguments);e="GFS4: "+e.split(/\n/).join(`
15
- GFS4: `),console.error(e);}),t[a]||(C=global[a]||[],O(t,C),t.close=function(e){function s(p,d){return e.call(t,p,function(k){k||b(),typeof d=="function"&&d.apply(this,arguments);})}return Object.defineProperty(s,r,{value:e}),s}(t.close),t.closeSync=function(e){function s(p){e.apply(t,arguments),b();}return Object.defineProperty(s,r,{value:e}),s}(t.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){h(t[a]),G("assert").equal(t[a].length,0);}));var C;global[a]||O(global,t[a]),c.exports=F(y(t)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!t.__patched&&(c.exports=F(t),t.__patched=!0);function F(e){n(e),e.gracefulify=F,e.createReadStream=st,e.createWriteStream=at;var s=e.readFile;e.readFile=p;function p(T,M,R){return typeof M=="function"&&(R=M,M=null),B(T,M,R);function B(K,U,Y,q){return s(K,U,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?o([B,[K,U,Y],W,q||Date.now(),Date.now()]):typeof Y=="function"&&Y.apply(this,arguments);})}}var d=e.writeFile;e.writeFile=k;function k(T,M,R,B){return typeof R=="function"&&(B=R,R=null),K(T,M,R,B);function K(U,Y,q,W,z){return d(U,Y,q,function(J){J&&(J.code==="EMFILE"||J.code==="ENFILE")?o([K,[U,Y,q,W],J,z||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments);})}}var S=e.appendFile;S&&(e.appendFile=v);function v(T,M,R,B){return typeof R=="function"&&(B=R,R=null),K(T,M,R,B);function K(U,Y,q,W,z){return S(U,Y,q,function(J){J&&(J.code==="EMFILE"||J.code==="ENFILE")?o([K,[U,Y,q,W],J,z||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments);})}}var g=e.copyFile;g&&(e.copyFile=j);function j(T,M,R,B){return typeof R=="function"&&(B=R,R=0),K(T,M,R,B);function K(U,Y,q,W,z){return g(U,Y,q,function(J){J&&(J.code==="EMFILE"||J.code==="ENFILE")?o([K,[U,Y,q,W],J,z||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments);})}}var L=e.readdir;e.readdir=D;var E=/^v[0-5]\./;function D(T,M,R){typeof M=="function"&&(R=M,M=null);var B=E.test(process.version)?function(U,Y,q,W){return L(U,K(U,Y,q,W))}:function(U,Y,q,W){return L(U,Y,K(U,Y,q,W))};return B(T,M,R);function K(U,Y,q,W){return function(z,J){z&&(z.code==="EMFILE"||z.code==="ENFILE")?o([B,[U,Y,q],z,W||Date.now(),Date.now()]):(J&&J.sort&&J.sort(),typeof q=="function"&&q.call(this,z,J));}}}if(process.version.substr(0,4)==="v0.8"){var w=i(e);A=w.ReadStream,H=w.WriteStream;}var N=e.ReadStream;N&&(A.prototype=Object.create(N.prototype),A.prototype.open=V);var x=e.WriteStream;x&&(H.prototype=Object.create(x.prototype),H.prototype.open=rt),Object.defineProperty(e,"ReadStream",{get:function(){return A},set:function(T){A=T;},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return H},set:function(T){H=T;},enumerable:!0,configurable:!0});var _=A;Object.defineProperty(e,"FileReadStream",{get:function(){return _},set:function(T){_=T;},enumerable:!0,configurable:!0});var I=H;Object.defineProperty(e,"FileWriteStream",{get:function(){return I},set:function(T){I=T;},enumerable:!0,configurable:!0});function A(T,M){return this instanceof A?(N.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function V(){var T=this;ut(T.path,T.flags,T.mode,function(M,R){M?(T.autoClose&&T.destroy(),T.emit("error",M)):(T.fd=R,T.emit("open",R),T.read());});}function H(T,M){return this instanceof H?(x.apply(this,arguments),this):H.apply(Object.create(H.prototype),arguments)}function rt(){var T=this;ut(T.path,T.flags,T.mode,function(M,R){M?(T.destroy(),T.emit("error",M)):(T.fd=R,T.emit("open",R));});}function st(T,M){return new e.ReadStream(T,M)}function at(T,M){return new e.WriteStream(T,M)}var ot=e.open;e.open=ut;function ut(T,M,R,B){return typeof R=="function"&&(B=R,R=null),K(T,M,R,B);function K(U,Y,q,W,z){return ot(U,Y,q,function(J,ke){J&&(J.code==="EMFILE"||J.code==="ENFILE")?o([K,[U,Y,q,W],J,z||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments);})}}return e}function o(e){h("ENQUEUE",e[0].name,e[1]),t[a].push(e),P();}var f;function b(){for(var e=Date.now(),s=0;s<t[a].length;++s)t[a][s].length>2&&(t[a][s][3]=e,t[a][s][4]=e);P();}function P(){if(clearTimeout(f),f=void 0,t[a].length!==0){var e=t[a].shift(),s=e[0],p=e[1],d=e[2],k=e[3],S=e[4];if(k===void 0)h("RETRY",s.name,p),s.apply(null,p);else if(Date.now()-k>=6e4){h("TIMEOUT",s.name,p);var v=p.pop();typeof v=="function"&&v.call(null,d);}else {var g=Date.now()-S,j=Math.max(S-k,1),L=Math.min(j*1.2,100);g>=L?(h("RETRY",s.name,p),s.apply(null,p.concat([k]))):t[a].push(e);}f===void 0&&(f=setTimeout(P,0));}}}),nt=$(l=>{var c=X().fromCallback,t=Q(),n=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(i=>typeof t[i]=="function");Object.assign(l,t),n.forEach(i=>{l[i]=c(t[i]);}),l.exists=function(i,y){return typeof y=="function"?t.exists(i,y):new Promise(u=>t.exists(i,u))},l.read=function(i,y,u,a,r,m){return typeof m=="function"?t.read(i,y,u,a,r,m):new Promise((O,h)=>{t.read(i,y,u,a,r,(C,F,o)=>{if(C)return h(C);O({bytesRead:F,buffer:o});});})},l.write=function(i,y,...u){return typeof u[u.length-1]=="function"?t.write(i,y,...u):new Promise((a,r)=>{t.write(i,y,...u,(m,O,h)=>{if(m)return r(m);a({bytesWritten:O,buffer:h});});})},l.readv=function(i,y,...u){return typeof u[u.length-1]=="function"?t.readv(i,y,...u):new Promise((a,r)=>{t.readv(i,y,...u,(m,O,h)=>{if(m)return r(m);a({bytesRead:O,buffers:h});});})},l.writev=function(i,y,...u){return typeof u[u.length-1]=="function"?t.writev(i,y,...u):new Promise((a,r)=>{t.writev(i,y,...u,(m,O,h)=>{if(m)return r(m);a({bytesWritten:O,buffers:h});});})},typeof t.realpath.native=="function"?l.realpath.native=c(t.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003");}),$t=$((l,c)=>{var t=G("path");c.exports.checkPath=function(n){if(process.platform==="win32"&&/[<>:"|?*]/.test(n.replace(t.parse(n).root,""))){let i=new Error(`Path contains invalid characters: ${n}`);throw i.code="EINVAL",i}};}),Rt=$((l,c)=>{var t=nt(),{checkPath:n}=$t(),i=y=>typeof y=="number"?y:{...{mode:511},...y}.mode;c.exports.makeDir=async(y,u)=>(n(y),t.mkdir(y,{mode:i(u),recursive:!0})),c.exports.makeDirSync=(y,u)=>(n(y),t.mkdirSync(y,{mode:i(u),recursive:!0}));}),Z=$((l,c)=>{var t=X().fromPromise,{makeDir:n,makeDirSync:i}=Rt(),y=t(n);c.exports={mkdirs:y,mkdirsSync:i,mkdirp:y,mkdirpSync:i,ensureDir:y,ensureDirSync:i};}),et=$((l,c)=>{var t=X().fromPromise,n=nt();function i(y){return n.access(y).then(()=>!0).catch(()=>!1)}c.exports={pathExists:t(i),pathExistsSync:n.existsSync};}),wt=$((l,c)=>{var t=Q();function n(y,u,a,r){t.open(y,"r+",(m,O)=>{if(m)return r(m);t.futimes(O,u,a,h=>{t.close(O,C=>{r&&r(h||C);});});});}function i(y,u,a){let r=t.openSync(y,"r+");return t.futimesSync(r,u,a),t.closeSync(r)}c.exports={utimesMillis:n,utimesMillisSync:i};}),it=$((l,c)=>{var t=nt(),n=G("path"),i=G("util");function y(o,f,b){let P=b.dereference?e=>t.stat(e,{bigint:!0}):e=>t.lstat(e,{bigint:!0});return Promise.all([P(o),P(f).catch(e=>{if(e.code==="ENOENT")return null;throw e})]).then(([e,s])=>({srcStat:e,destStat:s}))}function u(o,f,b){let P,e=b.dereference?p=>t.statSync(p,{bigint:!0}):p=>t.lstatSync(p,{bigint:!0}),s=e(o);try{P=e(f);}catch(p){if(p.code==="ENOENT")return {srcStat:s,destStat:null};throw p}return {srcStat:s,destStat:P}}function a(o,f,b,P,e){i.callbackify(y)(o,f,P,(s,p)=>{if(s)return e(s);let{srcStat:d,destStat:k}=p;if(k){if(h(d,k)){let S=n.basename(o),v=n.basename(f);return b==="move"&&S!==v&&S.toLowerCase()===v.toLowerCase()?e(null,{srcStat:d,destStat:k,isChangingCase:!0}):e(new Error("Source and destination must not be the same."))}if(d.isDirectory()&&!k.isDirectory())return e(new Error(`Cannot overwrite non-directory '${f}' with directory '${o}'.`));if(!d.isDirectory()&&k.isDirectory())return e(new Error(`Cannot overwrite directory '${f}' with non-directory '${o}'.`))}return d.isDirectory()&&C(o,f)?e(new Error(F(o,f,b))):e(null,{srcStat:d,destStat:k})});}function r(o,f,b,P){let{srcStat:e,destStat:s}=u(o,f,P);if(s){if(h(e,s)){let p=n.basename(o),d=n.basename(f);if(b==="move"&&p!==d&&p.toLowerCase()===d.toLowerCase())return {srcStat:e,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(e.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${f}' with directory '${o}'.`);if(!e.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${f}' with non-directory '${o}'.`)}if(e.isDirectory()&&C(o,f))throw new Error(F(o,f,b));return {srcStat:e,destStat:s}}function m(o,f,b,P,e){let s=n.resolve(n.dirname(o)),p=n.resolve(n.dirname(b));if(p===s||p===n.parse(p).root)return e();t.stat(p,{bigint:!0},(d,k)=>d?d.code==="ENOENT"?e():e(d):h(f,k)?e(new Error(F(o,b,P))):m(o,f,p,P,e));}function O(o,f,b,P){let e=n.resolve(n.dirname(o)),s=n.resolve(n.dirname(b));if(s===e||s===n.parse(s).root)return;let p;try{p=t.statSync(s,{bigint:!0});}catch(d){if(d.code==="ENOENT")return;throw d}if(h(f,p))throw new Error(F(o,b,P));return O(o,f,s,P)}function h(o,f){return f.ino&&f.dev&&f.ino===o.ino&&f.dev===o.dev}function C(o,f){let b=n.resolve(o).split(n.sep).filter(e=>e),P=n.resolve(f).split(n.sep).filter(e=>e);return b.reduce((e,s,p)=>e&&P[p]===s,!0)}function F(o,f,b){return `Cannot ${b} '${o}' to a subdirectory of itself, '${f}'.`}c.exports={checkPaths:a,checkPathsSync:r,checkParentPaths:m,checkParentPathsSync:O,isSrcSubdir:C,areIdentical:h};}),Mt=$((l,c)=>{var t=Q(),n=G("path"),i=Z().mkdirs,y=et().pathExists,u=wt().utimesMillis,a=it();function r(E,D,w,N){typeof w=="function"&&!N?(N=w,w={}):typeof w=="function"&&(w={filter:w}),N=N||function(){},w=w||{},w.clobber="clobber"in w?!!w.clobber:!0,w.overwrite="overwrite"in w?!!w.overwrite:w.clobber,w.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
14
+ var Ut=Object.defineProperty;var i=(p,s)=>Ut(p,"name",{value:s,configurable:!0}),nt=(p=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(p,{get:(s,t)=>(typeof require<"u"?require:s)[t]}):p)(function(p){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+p+'" is not supported')});var Bt=Object.create,dt=Object.defineProperty,Vt=Object.getOwnPropertyDescriptor,Gt=Object.getOwnPropertyNames,Kt=Object.getPrototypeOf,Ht=Object.prototype.hasOwnProperty,c=i((p,s)=>dt(p,"name",{value:s,configurable:!0}),"o"),K=(p=>typeof nt<"u"?nt:typeof Proxy<"u"?new Proxy(p,{get:(s,t)=>(typeof nt<"u"?nt:s)[t]}):p)(function(p){if(typeof nt<"u")return nt.apply(this,arguments);throw Error('Dynamic require of "'+p+'" is not supported')}),A=i((p,s)=>()=>(s||p((s={exports:{}}).exports,s),s.exports),"d"),Yt=i((p,s,t,n)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of Gt(s))!Ht.call(p,o)&&o!==t&&dt(p,o,{get:()=>s[o],enumerable:!(n=Vt(s,o))||n.enumerable});return p},"mn"),zt=i((p,s,t)=>(t=p!=null?Bt(Kt(p)):{},Yt(s||!p||!p.__esModule?dt(t,"default",{value:p,enumerable:!0}):t,p)),"yn"),Z=A(p=>{p.fromCallback=function(s){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")s.apply(this,t);else return new Promise((n,o)=>{s.call(this,...t,(m,f)=>m!=null?o(m):n(f));})},"name",{value:s.name})},p.fromPromise=function(s){return Object.defineProperty(function(...t){let n=t[t.length-1];if(typeof n!="function")return s.apply(this,t);s.apply(this,t.slice(0,-1)).then(o=>n(null,o),n);},"name",{value:s.name})};}),Qt=A((p,s)=>{var t=K("constants"),n=process.cwd,o=null,m=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return o||(o=n.call(process)),o};try{process.cwd();}catch{}typeof process.chdir=="function"&&(f=process.chdir,process.chdir=function(r){o=null,f.call(process,r);},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,f));var f;s.exports=l;function l(r){t.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&h(r),r.lutimes||F(r),r.chown=x(r.chown),r.fchown=x(r.fchown),r.lchown=x(r.lchown),r.chmod=S(r.chmod),r.fchmod=S(r.fchmod),r.lchmod=S(r.lchmod),r.chownSync=a(r.chownSync),r.fchownSync=a(r.fchownSync),r.lchownSync=a(r.lchownSync),r.chmodSync=_(r.chmodSync),r.fchmodSync=_(r.fchmodSync),r.lchmodSync=_(r.lchmodSync),r.stat=y(r.stat),r.fstat=y(r.fstat),r.lstat=y(r.lstat),r.statSync=k(r.statSync),r.fstatSync=k(r.fstatSync),r.lstatSync=k(r.lstatSync),r.chmod&&!r.lchmod&&(r.lchmod=function(e,u,d){d&&process.nextTick(d);},r.lchmodSync=function(){}),r.chown&&!r.lchown&&(r.lchown=function(e,u,d,v){v&&process.nextTick(v);},r.lchownSync=function(){}),m==="win32"&&(r.rename=typeof r.rename!="function"?r.rename:function(e){function u(d,v,E){var b=Date.now(),w=0;e(d,v,c(i(function O(j){if(j&&(j.code==="EACCES"||j.code==="EPERM"||j.code==="EBUSY")&&Date.now()-b<6e4){setTimeout(function(){r.stat(v,function(T,D){T&&T.code==="ENOENT"?e(d,v,O):E(j);});},w),w<100&&(w+=10);return}E&&E(j);},"q"),"CB"));}return i(u,"m"),c(u,"rename"),Object.setPrototypeOf&&Object.setPrototypeOf(u,e),u}(r.rename)),r.read=typeof r.read!="function"?r.read:function(e){function u(d,v,E,b,w,O){var j;if(O&&typeof O=="function"){var T=0;j=c(function(D,L,g){if(D&&D.code==="EAGAIN"&&T<10)return T++,e.call(r,d,v,E,b,w,j);O.apply(this,arguments);},"callback");}return e.call(r,d,v,E,b,w,j)}return i(u,"m"),c(u,"read"),Object.setPrototypeOf&&Object.setPrototypeOf(u,e),u}(r.read),r.readSync=typeof r.readSync!="function"?r.readSync:function(e){return function(u,d,v,E,b){for(var w=0;;)try{return e.call(r,u,d,v,E,b)}catch(O){if(O.code==="EAGAIN"&&w<10){w++;continue}throw O}}}(r.readSync);function h(e){e.lchmod=function(u,d,v){e.open(u,t.O_WRONLY|t.O_SYMLINK,d,function(E,b){if(E){v&&v(E);return}e.fchmod(b,d,function(w){e.close(b,function(O){v&&v(w||O);});});});},e.lchmodSync=function(u,d){var v=e.openSync(u,t.O_WRONLY|t.O_SYMLINK,d),E=!0,b;try{b=e.fchmodSync(v,d),E=!1;}finally{if(E)try{e.closeSync(v);}catch{}else e.closeSync(v);}return b};}i(h,"t"),c(h,"patchLchmod");function F(e){t.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(u,d,v,E){e.open(u,t.O_SYMLINK,function(b,w){if(b){E&&E(b);return}e.futimes(w,d,v,function(O){e.close(w,function(j){E&&E(O||j);});});});},e.lutimesSync=function(u,d,v){var E=e.openSync(u,t.O_SYMLINK),b,w=!0;try{b=e.futimesSync(E,d,v),w=!1;}finally{if(w)try{e.closeSync(E);}catch{}else e.closeSync(E);}return b}):e.futimes&&(e.lutimes=function(u,d,v,E){E&&process.nextTick(E);},e.lutimesSync=function(){});}i(F,"r"),c(F,"patchLutimes");function S(e){return e&&function(u,d,v){return e.call(r,u,d,function(E){P(E)&&(E=null),v&&v.apply(this,arguments);})}}i(S,"n"),c(S,"chmodFix");function _(e){return e&&function(u,d){try{return e.call(r,u,d)}catch(v){if(!P(v))throw v}}}i(_,"i"),c(_,"chmodFixSync");function x(e){return e&&function(u,d,v,E){return e.call(r,u,d,v,function(b){P(b)&&(b=null),E&&E.apply(this,arguments);})}}i(x,"u"),c(x,"chownFix");function a(e){return e&&function(u,d,v){try{return e.call(r,u,d,v)}catch(E){if(!P(E))throw E}}}i(a,"c"),c(a,"chownFixSync");function y(e){return e&&function(u,d,v){typeof d=="function"&&(v=d,d=null);function E(b,w){w&&(w.uid<0&&(w.uid+=4294967296),w.gid<0&&(w.gid+=4294967296)),v&&v.apply(this,arguments);}return i(E,"p"),c(E,"callback"),d?e.call(r,u,d,E):e.call(r,u,E)}}i(y,"a"),c(y,"statFix");function k(e){return e&&function(u,d){var v=d?e.call(r,u,d):e.call(r,u);return v&&(v.uid<0&&(v.uid+=4294967296),v.gid<0&&(v.gid+=4294967296)),v}}i(k,"f"),c(k,"statFixSync");function P(e){if(!e||e.code==="ENOSYS")return !0;var u=!process.getuid||process.getuid()!==0;return !!(u&&(e.code==="EINVAL"||e.code==="EPERM"))}i(P,"S"),c(P,"chownErOk");}i(l,"vn"),c(l,"patch");}),Xt=A((p,s)=>{var t=K("stream").Stream;s.exports=n;function n(o){return {ReadStream:m,WriteStream:f};function m(l,r){if(!(this instanceof m))return new m(l,r);t.call(this);var h=this;this.path=l,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,r=r||{};for(var F=Object.keys(r),S=0,_=F.length;S<_;S++){var x=F[S];this[x]=r[x];}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start;}if(this.fd!==null){process.nextTick(function(){h._read();});return}o.open(this.path,this.flags,this.mode,function(a,y){if(a){h.emit("error",a),h.readable=!1;return}h.fd=y,h.emit("open",y),h._read();});}function f(l,r){if(!(this instanceof f))return new f(l,r);t.call(this),this.path=l,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var h=Object.keys(r),F=0,S=h.length;F<S;F++){var _=h[F];this[_]=r[_];}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start;}this.busy=!1,this._queue=[],this.fd===null&&(this._open=o.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush());}}i(n,"En"),c(n,"legacy");}),Zt=A((p,s)=>{s.exports=n;var t=Object.getPrototypeOf||function(o){return o.__proto__};function n(o){if(o===null||typeof o!="object")return o;if(o instanceof Object)var m={__proto__:t(o)};else var m=Object.create(null);return Object.getOwnPropertyNames(o).forEach(function(f){Object.defineProperty(m,f,Object.getOwnPropertyDescriptor(o,f));}),m}i(n,"kn"),c(n,"clone");}),tt=A((p,s)=>{var t=K("fs"),n=Qt(),o=Xt(),m=Zt(),f=K("util"),l,r;typeof Symbol=="function"&&typeof Symbol.for=="function"?(l=Symbol.for("graceful-fs.queue"),r=Symbol.for("graceful-fs.previous")):(l="___graceful-fs.queue",r="___graceful-fs.previous");function h(){}i(h,"Pn"),c(h,"noop");function F(e,u){Object.defineProperty(e,l,{get:function(){return u}});}i(F,"ct"),c(F,"publishQueue");var S=h;f.debuglog?S=f.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(S=c(function(){var e=f.format.apply(f,arguments);e="GFS4: "+e.split(/\n/).join(`
15
+ GFS4: `),console.error(e);},"debug")),t[l]||(_=global[l]||[],F(t,_),t.close=function(e){function u(d,v){return e.call(t,d,function(E){E||k(),typeof v=="function"&&v.apply(this,arguments);})}return i(u,"t"),c(u,"close"),Object.defineProperty(u,r,{value:e}),u}(t.close),t.closeSync=function(e){function u(d){e.apply(t,arguments),k();}return i(u,"t"),c(u,"closeSync"),Object.defineProperty(u,r,{value:e}),u}(t.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){S(t[l]),K("assert").equal(t[l].length,0);}));var _;global[l]||F(global,t[l]),s.exports=x(m(t)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!t.__patched&&(s.exports=x(t),t.__patched=!0);function x(e){n(e),e.gracefulify=x,e.createReadStream=at,e.createWriteStream=st;var u=e.readFile;e.readFile=d;function d(I,W,M){return typeof W=="function"&&(M=W,W=null),Y(I,W,M);function Y(z,B,V,G){return u(z,B,function(J){J&&(J.code==="EMFILE"||J.code==="ENFILE")?a([Y,[z,B,V],J,G||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments);})}}i(d,"r"),c(d,"readFile");var v=e.writeFile;e.writeFile=E;function E(I,W,M,Y){return typeof M=="function"&&(Y=M,M=null),z(I,W,M,Y);function z(B,V,G,J,X){return v(B,V,G,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?a([z,[B,V,G,J],U,X||Date.now(),Date.now()]):typeof J=="function"&&J.apply(this,arguments);})}}i(E,"i"),c(E,"writeFile");var b=e.appendFile;b&&(e.appendFile=w);function w(I,W,M,Y){return typeof M=="function"&&(Y=M,M=null),z(I,W,M,Y);function z(B,V,G,J,X){return b(B,V,G,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?a([z,[B,V,G,J],U,X||Date.now(),Date.now()]):typeof J=="function"&&J.apply(this,arguments);})}}i(w,"c"),c(w,"appendFile");var O=e.copyFile;O&&(e.copyFile=j);function j(I,W,M,Y){return typeof M=="function"&&(Y=M,M=0),z(I,W,M,Y);function z(B,V,G,J,X){return O(B,V,G,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?a([z,[B,V,G,J],U,X||Date.now(),Date.now()]):typeof J=="function"&&J.apply(this,arguments);})}}i(j,"f"),c(j,"copyFile");var T=e.readdir;e.readdir=L;var D=/^v[0-5]\./;function L(I,W,M){typeof W=="function"&&(M=W,W=null);var Y=D.test(process.version)?c(function(B,V,G,J){return T(B,z(B,V,G,J))},"go$readdir"):c(function(B,V,G,J){return T(B,V,z(B,V,G,J))},"go$readdir");return Y(I,W,M);function z(B,V,G,J){return function(X,U){X&&(X.code==="EMFILE"||X.code==="ENFILE")?a([Y,[B,V,G],X,J||Date.now(),Date.now()]):(U&&U.sort&&U.sort(),typeof G=="function"&&G.call(this,X,U));}}}if(i(L,"m"),c(L,"readdir"),process.version.substr(0,4)==="v0.8"){var g=o(e);q=g.ReadStream,Q=g.WriteStream;}var N=e.ReadStream;N&&(q.prototype=Object.create(N.prototype),q.prototype.open=H);var C=e.WriteStream;C&&(Q.prototype=Object.create(C.prototype),Q.prototype.open=rt),Object.defineProperty(e,"ReadStream",{get:function(){return q},set:function(I){q=I;},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return Q},set:function(I){Q=I;},enumerable:!0,configurable:!0});var $=q;Object.defineProperty(e,"FileReadStream",{get:function(){return $},set:function(I){$=I;},enumerable:!0,configurable:!0});var R=Q;Object.defineProperty(e,"FileWriteStream",{get:function(){return R},set:function(I){R=I;},enumerable:!0,configurable:!0});function q(I,W){return this instanceof q?(N.apply(this,arguments),this):q.apply(Object.create(q.prototype),arguments)}i(q,"q"),c(q,"ReadStream");function H(){var I=this;lt(I.path,I.flags,I.mode,function(W,M){W?(I.autoClose&&I.destroy(),I.emit("error",W)):(I.fd=M,I.emit("open",M),I.read());});}i(H,"W"),c(H,"ReadStream$open");function Q(I,W){return this instanceof Q?(C.apply(this,arguments),this):Q.apply(Object.create(Q.prototype),arguments)}i(Q,"$"),c(Q,"WriteStream");function rt(){var I=this;lt(I.path,I.flags,I.mode,function(W,M){W?(I.destroy(),I.emit("error",W)):(I.fd=M,I.emit("open",M));});}i(rt,"ie"),c(rt,"WriteStream$open");function at(I,W){return new e.ReadStream(I,W)}i(at,"He"),c(at,"createReadStream");function st(I,W){return new e.WriteStream(I,W)}i(st,"Ke"),c(st,"createWriteStream");var ut=e.open;e.open=lt;function lt(I,W,M,Y){return typeof M=="function"&&(Y=M,M=null),z(I,W,M,Y);function z(B,V,G,J,X){return ut(B,V,G,function(U,De){U&&(U.code==="EMFILE"||U.code==="ENFILE")?a([z,[B,V,G,J],U,X||Date.now(),Date.now()]):typeof J=="function"&&J.apply(this,arguments);})}}return i(lt,"Oe"),c(lt,"open"),e}i(x,"_e"),c(x,"patch");function a(e){S("ENQUEUE",e[0].name,e[1]),t[l].push(e),P();}i(a,"ee"),c(a,"enqueue");var y;function k(){for(var e=Date.now(),u=0;u<t[l].length;++u)t[l][u].length>2&&(t[l][u][3]=e,t[l][u][4]=e);P();}i(k,"ut"),c(k,"resetQueue");function P(){if(clearTimeout(y),y=void 0,t[l].length!==0){var e=t[l].shift(),u=e[0],d=e[1],v=e[2],E=e[3],b=e[4];if(E===void 0)S("RETRY",u.name,d),u.apply(null,d);else if(Date.now()-E>=6e4){S("TIMEOUT",u.name,d);var w=d.pop();typeof w=="function"&&w.call(null,v);}else {var O=Date.now()-b,j=Math.max(b-E,1),T=Math.min(j*1.2,100);O>=T?(S("RETRY",u.name,d),u.apply(null,d.concat([E]))):t[l].push(e);}y===void 0&&(y=setTimeout(P,0));}}i(P,"Ie"),c(P,"retry");}),ot=A(p=>{var s=Z().fromCallback,t=tt(),n=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(o=>typeof t[o]=="function");Object.assign(p,t),n.forEach(o=>{p[o]=s(t[o]);}),p.exists=function(o,m){return typeof m=="function"?t.exists(o,m):new Promise(f=>t.exists(o,f))},p.read=function(o,m,f,l,r,h){return typeof h=="function"?t.read(o,m,f,l,r,h):new Promise((F,S)=>{t.read(o,m,f,l,r,(_,x,a)=>{if(_)return S(_);F({bytesRead:x,buffer:a});});})},p.write=function(o,m,...f){return typeof f[f.length-1]=="function"?t.write(o,m,...f):new Promise((l,r)=>{t.write(o,m,...f,(h,F,S)=>{if(h)return r(h);l({bytesWritten:F,buffer:S});});})},p.readv=function(o,m,...f){return typeof f[f.length-1]=="function"?t.readv(o,m,...f):new Promise((l,r)=>{t.readv(o,m,...f,(h,F,S)=>{if(h)return r(h);l({bytesRead:F,buffers:S});});})},p.writev=function(o,m,...f){return typeof f[f.length-1]=="function"?t.writev(o,m,...f):new Promise((l,r)=>{t.writev(o,m,...f,(h,F,S)=>{if(h)return r(h);l({bytesWritten:F,buffers:S});});})},typeof t.realpath.native=="function"?p.realpath.native=s(t.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003");}),te=A((p,s)=>{var t=K("path");s.exports.checkPath=c(function(n){if(process.platform==="win32"&&/[<>:"|?*]/.test(n.replace(t.parse(n).root,""))){let o=new Error(`Path contains invalid characters: ${n}`);throw o.code="EINVAL",o}},"checkPath");}),ee=A((p,s)=>{var t=ot(),{checkPath:n}=te(),o=c(m=>typeof m=="number"?m:{...{mode:511},...m}.mode,"getMode");s.exports.makeDir=async(m,f)=>(n(m),t.mkdir(m,{mode:o(f),recursive:!0})),s.exports.makeDirSync=(m,f)=>(n(m),t.mkdirSync(m,{mode:o(f),recursive:!0}));}),et=A((p,s)=>{var t=Z().fromPromise,{makeDir:n,makeDirSync:o}=ee(),m=t(n);s.exports={mkdirs:m,mkdirsSync:o,mkdirp:m,mkdirpSync:o,ensureDir:m,ensureDirSync:o};}),it=A((p,s)=>{var t=Z().fromPromise,n=ot();function o(m){return n.access(m).then(()=>!0).catch(()=>!1)}i(o,"_n"),c(o,"pathExists"),s.exports={pathExists:t(o),pathExistsSync:n.existsSync};}),Pt=A((p,s)=>{var t=tt();function n(m,f,l,r){t.open(m,"r+",(h,F)=>{if(h)return r(h);t.futimes(F,f,l,S=>{t.close(F,_=>{r&&r(S||_);});});});}i(n,"In"),c(n,"utimesMillis");function o(m,f,l){let r=t.openSync(m,"r+");return t.futimesSync(r,f,l),t.closeSync(r)}i(o,"Ln"),c(o,"utimesMillisSync"),s.exports={utimesMillis:n,utimesMillisSync:o};}),ct=A((p,s)=>{var t=ot(),n=K("path"),o=K("util");function m(a,y,k){let P=k.dereference?e=>t.stat(e,{bigint:!0}):e=>t.lstat(e,{bigint:!0});return Promise.all([P(a),P(y).catch(e=>{if(e.code==="ENOENT")return null;throw e})]).then(([e,u])=>({srcStat:e,destStat:u}))}i(m,"jn"),c(m,"getStats");function f(a,y,k){let P,e=k.dereference?d=>t.statSync(d,{bigint:!0}):d=>t.lstatSync(d,{bigint:!0}),u=e(a);try{P=e(y);}catch(d){if(d.code==="ENOENT")return {srcStat:u,destStat:null};throw d}return {srcStat:u,destStat:P}}i(f,"An"),c(f,"getStatsSync");function l(a,y,k,P,e){o.callbackify(m)(a,y,P,(u,d)=>{if(u)return e(u);let{srcStat:v,destStat:E}=d;if(E){if(S(v,E)){let b=n.basename(a),w=n.basename(y);return k==="move"&&b!==w&&b.toLowerCase()===w.toLowerCase()?e(null,{srcStat:v,destStat:E,isChangingCase:!0}):e(new Error("Source and destination must not be the same."))}if(v.isDirectory()&&!E.isDirectory())return e(new Error(`Cannot overwrite non-directory '${y}' with directory '${a}'.`));if(!v.isDirectory()&&E.isDirectory())return e(new Error(`Cannot overwrite directory '${y}' with non-directory '${a}'.`))}return v.isDirectory()&&_(a,y)?e(new Error(x(a,y,k))):e(null,{srcStat:v,destStat:E})});}i(l,"Rn"),c(l,"checkPaths");function r(a,y,k,P){let{srcStat:e,destStat:u}=f(a,y,P);if(u){if(S(e,u)){let d=n.basename(a),v=n.basename(y);if(k==="move"&&d!==v&&d.toLowerCase()===v.toLowerCase())return {srcStat:e,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(e.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${y}' with directory '${a}'.`);if(!e.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${y}' with non-directory '${a}'.`)}if(e.isDirectory()&&_(a,y))throw new Error(x(a,y,k));return {srcStat:e,destStat:u}}i(r,"Wn"),c(r,"checkPathsSync");function h(a,y,k,P,e){let u=n.resolve(n.dirname(a)),d=n.resolve(n.dirname(k));if(d===u||d===n.parse(d).root)return e();t.stat(d,{bigint:!0},(v,E)=>v?v.code==="ENOENT"?e():e(v):S(y,E)?e(new Error(x(a,k,P))):h(a,y,d,P,e));}i(h,"vt"),c(h,"checkParentPaths");function F(a,y,k,P){let e=n.resolve(n.dirname(a)),u=n.resolve(n.dirname(k));if(u===e||u===n.parse(u).root)return;let d;try{d=t.statSync(u,{bigint:!0});}catch(v){if(v.code==="ENOENT")return;throw v}if(S(y,d))throw new Error(x(a,k,P));return F(a,y,u,P)}i(F,"Et"),c(F,"checkParentPathsSync");function S(a,y){return y.ino&&y.dev&&y.ino===a.ino&&y.dev===a.dev}i(S,"oe"),c(S,"areIdentical");function _(a,y){let k=n.resolve(a).split(n.sep).filter(e=>e),P=n.resolve(y).split(n.sep).filter(e=>e);return k.reduce((e,u,d)=>e&&P[d]===u,!0)}i(_,"We"),c(_,"isSrcSubdir");function x(a,y,k){return `Cannot ${k} '${a}' to a subdirectory of itself, '${y}'.`}i(x,"ve"),c(x,"errMsg"),s.exports={checkPaths:l,checkPathsSync:r,checkParentPaths:h,checkParentPathsSync:F,isSrcSubdir:_,areIdentical:S};}),re=A((p,s)=>{var t=tt(),n=K("path"),o=et().mkdirs,m=it().pathExists,f=Pt().utimesMillis,l=ct();function r(D,L,g,N){typeof g=="function"&&!N?(N=g,g={}):typeof g=="function"&&(g={filter:g}),N=N||function(){},g=g||{},g.clobber="clobber"in g?!!g.clobber:!0,g.overwrite="overwrite"in g?!!g.overwrite:g.clobber,g.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
16
16
 
17
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001"),a.checkPaths(E,D,"copy",w,(x,_)=>{if(x)return N(x);let{srcStat:I,destStat:A}=_;a.checkParentPaths(E,I,D,"copy",V=>{if(V)return N(V);O(E,D,w,(H,rt)=>{if(H)return N(H);if(!rt)return N();m(A,E,D,w,N);});});});}function m(E,D,w,N,x){let _=n.dirname(w);y(_,(I,A)=>{if(I)return x(I);if(A)return h(E,D,w,N,x);i(_,V=>V?x(V):h(E,D,w,N,x));});}function O(E,D,w,N){if(!w.filter)return N(null,!0);Promise.resolve(w.filter(E,D)).then(x=>N(null,x),x=>N(x));}function h(E,D,w,N,x){(N.dereference?t.stat:t.lstat)(D,(_,I)=>_?x(_):I.isDirectory()?d(I,E,D,w,N,x):I.isFile()||I.isCharacterDevice()||I.isBlockDevice()?C(I,E,D,w,N,x):I.isSymbolicLink()?j(E,D,w,N,x):I.isSocket()?x(new Error(`Cannot copy a socket file: ${D}`)):I.isFIFO()?x(new Error(`Cannot copy a FIFO pipe: ${D}`)):x(new Error(`Unknown file: ${D}`)));}function C(E,D,w,N,x,_){return D?F(E,w,N,x,_):o(E,w,N,x,_)}function F(E,D,w,N,x){if(N.overwrite)t.unlink(w,_=>_?x(_):o(E,D,w,N,x));else return N.errorOnExist?x(new Error(`'${w}' already exists`)):x()}function o(E,D,w,N,x){t.copyFile(D,w,_=>_?x(_):N.preserveTimestamps?f(E.mode,D,w,x):s(w,E.mode,x));}function f(E,D,w,N){return b(E)?P(w,E,x=>x?N(x):e(E,D,w,N)):e(E,D,w,N)}function b(E){return (E&128)===0}function P(E,D,w){return s(E,D|128,w)}function e(E,D,w,N){p(D,w,x=>x?N(x):s(w,E,N));}function s(E,D,w){return t.chmod(E,D,w)}function p(E,D,w){t.stat(E,(N,x)=>N?w(N):u(D,x.atime,x.mtime,w));}function d(E,D,w,N,x,_){return D?S(w,N,x,_):k(E.mode,w,N,x,_)}function k(E,D,w,N,x){t.mkdir(w,_=>{if(_)return x(_);S(D,w,N,I=>I?x(I):s(w,E,x));});}function S(E,D,w,N){t.readdir(E,(x,_)=>x?N(x):v(_,E,D,w,N));}function v(E,D,w,N,x){let _=E.pop();return _?g(E,_,D,w,N,x):x()}function g(E,D,w,N,x,_){let I=n.join(w,D),A=n.join(N,D);O(I,A,x,(V,H)=>{if(V)return _(V);if(!H)return v(E,w,N,x,_);a.checkPaths(I,A,"copy",x,(rt,st)=>{if(rt)return _(rt);let{destStat:at}=st;h(at,I,A,x,ot=>ot?_(ot):v(E,w,N,x,_));});});}function j(E,D,w,N,x){t.readlink(D,(_,I)=>{if(_)return x(_);if(N.dereference&&(I=n.resolve(process.cwd(),I)),E)t.readlink(w,(A,V)=>A?A.code==="EINVAL"||A.code==="UNKNOWN"?t.symlink(I,w,x):x(A):(N.dereference&&(V=n.resolve(process.cwd(),V)),a.isSrcSubdir(I,V)?x(new Error(`Cannot copy '${I}' to a subdirectory of itself, '${V}'.`)):a.isSrcSubdir(V,I)?x(new Error(`Cannot overwrite '${V}' with '${I}'.`)):L(I,w,x)));else return t.symlink(I,w,x)});}function L(E,D,w){t.unlink(D,N=>N?w(N):t.symlink(E,D,w));}c.exports=r;}),Wt=$((l,c)=>{var t=Q(),n=G("path"),i=Z().mkdirsSync,y=wt().utimesMillisSync,u=it();function a(S,v,g){typeof g=="function"&&(g={filter:g}),g=g||{},g.clobber="clobber"in g?!!g.clobber:!0,g.overwrite="overwrite"in g?!!g.overwrite:g.clobber,g.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
17
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001"),l.checkPaths(D,L,"copy",g,(C,$)=>{if(C)return N(C);let{srcStat:R,destStat:q}=$;l.checkParentPaths(D,R,L,"copy",H=>{if(H)return N(H);F(D,L,g,(Q,rt)=>{if(Q)return N(Q);if(!rt)return N();h(q,D,L,g,N);});});});}i(r,"Bn"),c(r,"copy");function h(D,L,g,N,C){let $=n.dirname(g);m($,(R,q)=>{if(R)return C(R);if(q)return S(D,L,g,N,C);o($,H=>H?C(H):S(D,L,g,N,C));});}i(h,"Un"),c(h,"checkParentDir");function F(D,L,g,N){if(!g.filter)return N(null,!0);Promise.resolve(g.filter(D,L)).then(C=>N(null,C),C=>N(C));}i(F,"xt"),c(F,"runFilter");function S(D,L,g,N,C){(N.dereference?t.stat:t.lstat)(L,($,R)=>$?C($):R.isDirectory()?v(R,D,L,g,N,C):R.isFile()||R.isCharacterDevice()||R.isBlockDevice()?_(R,D,L,g,N,C):R.isSymbolicLink()?j(D,L,g,N,C):R.isSocket()?C(new Error(`Cannot copy a socket file: ${L}`)):R.isFIFO()?C(new Error(`Cannot copy a FIFO pipe: ${L}`)):C(new Error(`Unknown file: ${L}`)));}i(S,"Me"),c(S,"getStats");function _(D,L,g,N,C,$){return L?x(D,g,N,C,$):a(D,g,N,C,$)}i(_,"Yn"),c(_,"onFile");function x(D,L,g,N,C){if(N.overwrite)t.unlink(g,$=>$?C($):a(D,L,g,N,C));else return N.errorOnExist?C(new Error(`'${g}' already exists`)):C()}i(x,"bn"),c(x,"mayCopyFile");function a(D,L,g,N,C){t.copyFile(L,g,$=>$?C($):N.preserveTimestamps?y(D.mode,L,g,C):u(g,D.mode,C));}i(a,"qt"),c(a,"copyFile");function y(D,L,g,N){return k(D)?P(g,D,C=>C?N(C):e(D,L,g,N)):e(D,L,g,N)}i(y,"Gn"),c(y,"handleTimestampsAndMode");function k(D){return (D&128)===0}i(k,"Hn"),c(k,"fileIsNotWritable");function P(D,L,g){return u(D,L|128,g)}i(P,"Kn"),c(P,"makeFileWritable");function e(D,L,g,N){d(L,g,C=>C?N(C):u(g,D,N));}i(e,"kt"),c(e,"setDestTimestampsAndMode");function u(D,L,g){return t.chmod(D,L,g)}i(u,"Ee"),c(u,"setDestMode");function d(D,L,g){t.stat(D,(N,C)=>N?g(N):f(L,C.atime,C.mtime,g));}i(d,"zn"),c(d,"setDestTimestamps");function v(D,L,g,N,C,$){return L?b(g,N,C,$):E(D.mode,g,N,C,$)}i(v,"Qn"),c(v,"onDir");function E(D,L,g,N,C){t.mkdir(g,$=>{if($)return C($);b(L,g,N,R=>R?C(R):u(g,D,C));});}i(E,"Xn"),c(E,"mkDirAndCopy");function b(D,L,g,N){t.readdir(D,(C,$)=>C?N(C):w($,D,L,g,N));}i(b,"gt"),c(b,"copyDir");function w(D,L,g,N,C){let $=D.pop();return $?O(D,$,L,g,N,C):C()}i(w,"Je"),c(w,"copyDirItems");function O(D,L,g,N,C,$){let R=n.join(g,L),q=n.join(N,L);F(R,q,C,(H,Q)=>{if(H)return $(H);if(!Q)return w(D,g,N,C,$);l.checkPaths(R,q,"copy",C,(rt,at)=>{if(rt)return $(rt);let{destStat:st}=at;S(st,R,q,C,ut=>ut?$(ut):w(D,g,N,C,$));});});}i(O,"Zn"),c(O,"copyDirItem");function j(D,L,g,N,C){t.readlink(L,($,R)=>{if($)return C($);if(N.dereference&&(R=n.resolve(process.cwd(),R)),D)t.readlink(g,(q,H)=>q?q.code==="EINVAL"||q.code==="UNKNOWN"?t.symlink(R,g,C):C(q):(N.dereference&&(H=n.resolve(process.cwd(),H)),l.isSrcSubdir(R,H)?C(new Error(`Cannot copy '${R}' to a subdirectory of itself, '${H}'.`)):l.isSrcSubdir(H,R)?C(new Error(`Cannot overwrite '${H}' with '${R}'.`)):T(R,g,C)));else return t.symlink(R,g,C)});}i(j,"ei"),c(j,"onLink");function T(D,L,g){t.unlink(L,N=>N?g(N):t.symlink(D,L,g));}i(T,"ti"),c(T,"copyLink"),s.exports=r;}),ne=A((p,s)=>{var t=tt(),n=K("path"),o=et().mkdirsSync,m=Pt().utimesMillisSync,f=ct();function l(b,w,O){typeof O=="function"&&(O={filter:O}),O=O||{},O.clobber="clobber"in O?!!O.clobber:!0,O.overwrite="overwrite"in O?!!O.overwrite:O.clobber,O.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
18
18
 
19
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:j,destStat:L}=u.checkPathsSync(S,v,"copy",g);if(u.checkParentPathsSync(S,j,v,"copy"),g.filter&&!g.filter(S,v))return;let E=n.dirname(v);return t.existsSync(E)||i(E),r(L,S,v,g)}function r(S,v,g,j){let L=(j.dereference?t.statSync:t.lstatSync)(v);if(L.isDirectory())return P(L,S,v,g,j);if(L.isFile()||L.isCharacterDevice()||L.isBlockDevice())return m(L,S,v,g,j);if(L.isSymbolicLink())return d(S,v,g,j);throw L.isSocket()?new Error(`Cannot copy a socket file: ${v}`):L.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${v}`):new Error(`Unknown file: ${v}`)}function m(S,v,g,j,L){return v?O(S,g,j,L):h(S,g,j,L)}function O(S,v,g,j){if(j.overwrite)return t.unlinkSync(g),h(S,v,g,j);if(j.errorOnExist)throw new Error(`'${g}' already exists`)}function h(S,v,g,j){return t.copyFileSync(v,g),j.preserveTimestamps&&C(S.mode,v,g),f(g,S.mode)}function C(S,v,g){return F(S)&&o(g,S),b(v,g)}function F(S){return (S&128)===0}function o(S,v){return f(S,v|128)}function f(S,v){return t.chmodSync(S,v)}function b(S,v){let g=t.statSync(S);return y(v,g.atime,g.mtime)}function P(S,v,g,j,L){return v?s(g,j,L):e(S.mode,g,j,L)}function e(S,v,g,j){return t.mkdirSync(g),s(v,g,j),f(g,S)}function s(S,v,g){t.readdirSync(S).forEach(j=>p(j,S,v,g));}function p(S,v,g,j){let L=n.join(v,S),E=n.join(g,S);if(j.filter&&!j.filter(L,E))return;let{destStat:D}=u.checkPathsSync(L,E,"copy",j);return r(D,L,E,j)}function d(S,v,g,j){let L=t.readlinkSync(v);if(j.dereference&&(L=n.resolve(process.cwd(),L)),S){let E;try{E=t.readlinkSync(g);}catch(D){if(D.code==="EINVAL"||D.code==="UNKNOWN")return t.symlinkSync(L,g);throw D}if(j.dereference&&(E=n.resolve(process.cwd(),E)),u.isSrcSubdir(L,E))throw new Error(`Cannot copy '${L}' to a subdirectory of itself, '${E}'.`);if(u.isSrcSubdir(E,L))throw new Error(`Cannot overwrite '${E}' with '${L}'.`);return k(L,g)}else return t.symlinkSync(L,g)}function k(S,v){return t.unlinkSync(v),t.symlinkSync(S,v)}c.exports=a;}),lt=$((l,c)=>{var t=X().fromCallback;c.exports={copy:t(Mt()),copySync:Wt()};}),ct=$((l,c)=>{var t=Q(),n=X().fromCallback;function i(u,a){t.rm(u,{recursive:!0,force:!0},a);}function y(u){t.rmSync(u,{recursive:!0,force:!0});}c.exports={remove:n(i),removeSync:y};}),Jt=$((l,c)=>{var t=X().fromPromise,n=nt(),i=G("path"),y=Z(),u=ct(),a=t(async function(m){let O;try{O=await n.readdir(m);}catch{return y.mkdirs(m)}return Promise.all(O.map(h=>u.remove(i.join(m,h))))});function r(m){let O;try{O=n.readdirSync(m);}catch{return y.mkdirsSync(m)}O.forEach(h=>{h=i.join(m,h),u.removeSync(h);});}c.exports={emptyDirSync:r,emptydirSync:r,emptyDir:a,emptydir:a};}),At=$((l,c)=>{var t=X().fromCallback,n=G("path"),i=Q(),y=Z();function u(r,m){function O(){i.writeFile(r,"",h=>{if(h)return m(h);m();});}i.stat(r,(h,C)=>{if(!h&&C.isFile())return m();let F=n.dirname(r);i.stat(F,(o,f)=>{if(o)return o.code==="ENOENT"?y.mkdirs(F,b=>{if(b)return m(b);O();}):m(o);f.isDirectory()?O():i.readdir(F,b=>{if(b)return m(b)});});});}function a(r){let m;try{m=i.statSync(r);}catch{}if(m&&m.isFile())return;let O=n.dirname(r);try{i.statSync(O).isDirectory()||i.readdirSync(O);}catch(h){if(h&&h.code==="ENOENT")y.mkdirsSync(O);else throw h}i.writeFileSync(r,"");}c.exports={createFile:t(u),createFileSync:a};}),Ut=$((l,c)=>{var t=X().fromCallback,n=G("path"),i=Q(),y=Z(),u=et().pathExists,{areIdentical:a}=it();function r(O,h,C){function F(o,f){i.link(o,f,b=>{if(b)return C(b);C(null);});}i.lstat(h,(o,f)=>{i.lstat(O,(b,P)=>{if(b)return b.message=b.message.replace("lstat","ensureLink"),C(b);if(f&&a(P,f))return C(null);let e=n.dirname(h);u(e,(s,p)=>{if(s)return C(s);if(p)return F(O,h);y.mkdirs(e,d=>{if(d)return C(d);F(O,h);});});});});}function m(O,h){let C;try{C=i.lstatSync(h);}catch{}try{let o=i.lstatSync(O);if(C&&a(o,C))return}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let F=n.dirname(h);return i.existsSync(F)||y.mkdirsSync(F),i.linkSync(O,h)}c.exports={createLink:t(r),createLinkSync:m};}),Yt=$((l,c)=>{var t=G("path"),n=Q(),i=et().pathExists;function y(a,r,m){if(t.isAbsolute(a))return n.lstat(a,O=>O?(O.message=O.message.replace("lstat","ensureSymlink"),m(O)):m(null,{toCwd:a,toDst:a}));{let O=t.dirname(r),h=t.join(O,a);return i(h,(C,F)=>C?m(C):F?m(null,{toCwd:h,toDst:a}):n.lstat(a,o=>o?(o.message=o.message.replace("lstat","ensureSymlink"),m(o)):m(null,{toCwd:a,toDst:t.relative(O,a)})))}}function u(a,r){let m;if(t.isAbsolute(a)){if(m=n.existsSync(a),!m)throw new Error("absolute srcpath does not exist");return {toCwd:a,toDst:a}}else {let O=t.dirname(r),h=t.join(O,a);if(m=n.existsSync(h),m)return {toCwd:h,toDst:a};if(m=n.existsSync(a),!m)throw new Error("relative srcpath does not exist");return {toCwd:a,toDst:t.relative(O,a)}}}c.exports={symlinkPaths:y,symlinkPathsSync:u};}),qt=$((l,c)=>{var t=Q();function n(y,u,a){if(a=typeof u=="function"?u:a,u=typeof u=="function"?!1:u,u)return a(null,u);t.lstat(y,(r,m)=>{if(r)return a(null,"file");u=m&&m.isDirectory()?"dir":"file",a(null,u);});}function i(y,u){let a;if(u)return u;try{a=t.lstatSync(y);}catch{return "file"}return a&&a.isDirectory()?"dir":"file"}c.exports={symlinkType:n,symlinkTypeSync:i};}),Gt=$((l,c)=>{var t=X().fromCallback,n=G("path"),i=nt(),y=Z(),u=y.mkdirs,a=y.mkdirsSync,r=Yt(),m=r.symlinkPaths,O=r.symlinkPathsSync,h=qt(),C=h.symlinkType,F=h.symlinkTypeSync,o=et().pathExists,{areIdentical:f}=it();function b(s,p,d,k){k=typeof d=="function"?d:k,d=typeof d=="function"?!1:d,i.lstat(p,(S,v)=>{!S&&v.isSymbolicLink()?Promise.all([i.stat(s),i.stat(p)]).then(([g,j])=>{if(f(g,j))return k(null);P(s,p,d,k);}):P(s,p,d,k);});}function P(s,p,d,k){m(s,p,(S,v)=>{if(S)return k(S);s=v.toDst,C(v.toCwd,d,(g,j)=>{if(g)return k(g);let L=n.dirname(p);o(L,(E,D)=>{if(E)return k(E);if(D)return i.symlink(s,p,j,k);u(L,w=>{if(w)return k(w);i.symlink(s,p,j,k);});});});});}function e(s,p,d){let k;try{k=i.lstatSync(p);}catch{}if(k&&k.isSymbolicLink()){let g=i.statSync(s),j=i.statSync(p);if(f(g,j))return}let S=O(s,p);s=S.toDst,d=F(S.toCwd,d);let v=n.dirname(p);return i.existsSync(v)||a(v),i.symlinkSync(s,p,d)}c.exports={createSymlink:t(b),createSymlinkSync:e};}),Vt=$((l,c)=>{var{createFile:t,createFileSync:n}=At(),{createLink:i,createLinkSync:y}=Ut(),{createSymlink:u,createSymlinkSync:a}=Gt();c.exports={createFile:t,createFileSync:n,ensureFile:t,ensureFileSync:n,createLink:i,createLinkSync:y,ensureLink:i,ensureLinkSync:y,createSymlink:u,createSymlinkSync:a,ensureSymlink:u,ensureSymlinkSync:a};}),yt=$((l,c)=>{function t(i,{EOL:y=`
20
- `,finalEOL:u=!0,replacer:a=null,spaces:r}={}){let m=u?y:"";return JSON.stringify(i,a,r).replace(/\n/g,y)+m}function n(i){return Buffer.isBuffer(i)&&(i=i.toString("utf8")),i.replace(/^\uFEFF/,"")}c.exports={stringify:t,stripBom:n};}),Bt=$((l,c)=>{var t;try{t=Q();}catch{t=G("fs");}var n=X(),{stringify:i,stripBom:y}=yt();async function u(F,o={}){typeof o=="string"&&(o={encoding:o});let f=o.fs||t,b="throws"in o?o.throws:!0,P=await n.fromCallback(f.readFile)(F,o);P=y(P);let e;try{e=JSON.parse(P,o?o.reviver:null);}catch(s){if(b)throw s.message=`${F}: ${s.message}`,s;return null}return e}var a=n.fromPromise(u);function r(F,o={}){typeof o=="string"&&(o={encoding:o});let f=o.fs||t,b="throws"in o?o.throws:!0;try{let P=f.readFileSync(F,o);return P=y(P),JSON.parse(P,o.reviver)}catch(P){if(b)throw P.message=`${F}: ${P.message}`,P;return null}}async function m(F,o,f={}){let b=f.fs||t,P=i(o,f);await n.fromCallback(b.writeFile)(F,P,f);}var O=n.fromPromise(m);function h(F,o,f={}){let b=f.fs||t,P=i(o,f);return b.writeFileSync(F,P,f)}var C={readFile:a,readFileSync:r,writeFile:O,writeFileSync:h};c.exports=C;}),Kt=$((l,c)=>{var t=Bt();c.exports={readJson:t.readFile,readJsonSync:t.readFileSync,writeJson:t.writeFile,writeJsonSync:t.writeFileSync};}),pt=$((l,c)=>{var t=X().fromCallback,n=Q(),i=G("path"),y=Z(),u=et().pathExists;function a(m,O,h,C){typeof h=="function"&&(C=h,h="utf8");let F=i.dirname(m);u(F,(o,f)=>{if(o)return C(o);if(f)return n.writeFile(m,O,h,C);y.mkdirs(F,b=>{if(b)return C(b);n.writeFile(m,O,h,C);});});}function r(m,...O){let h=i.dirname(m);if(n.existsSync(h))return n.writeFileSync(m,...O);y.mkdirsSync(h),n.writeFileSync(m,...O);}c.exports={outputFile:t(a),outputFileSync:r};}),Ht=$((l,c)=>{var{stringify:t}=yt(),{outputFile:n}=pt();async function i(y,u,a={}){let r=t(u,a);await n(y,r,a);}c.exports=i;}),zt=$((l,c)=>{var{stringify:t}=yt(),{outputFileSync:n}=pt();function i(y,u,a){let r=t(u,a);n(y,r,a);}c.exports=i;}),Xt=$((l,c)=>{var t=X().fromPromise,n=Kt();n.outputJson=t(Ht()),n.outputJsonSync=zt(),n.outputJSON=n.outputJson,n.outputJSONSync=n.outputJsonSync,n.writeJSON=n.writeJson,n.writeJSONSync=n.writeJsonSync,n.readJSON=n.readJson,n.readJSONSync=n.readJsonSync,c.exports=n;}),Qt=$((l,c)=>{var t=Q(),n=G("path"),i=lt().copy,y=ct().remove,u=Z().mkdirp,a=et().pathExists,r=it();function m(o,f,b,P){typeof b=="function"&&(P=b,b={}),b=b||{};let e=b.overwrite||b.clobber||!1;r.checkPaths(o,f,"move",b,(s,p)=>{if(s)return P(s);let{srcStat:d,isChangingCase:k=!1}=p;r.checkParentPaths(o,d,f,"move",S=>{if(S)return P(S);if(O(f))return h(o,f,e,k,P);u(n.dirname(f),v=>v?P(v):h(o,f,e,k,P));});});}function O(o){let f=n.dirname(o);return n.parse(f).root===f}function h(o,f,b,P,e){if(P)return C(o,f,b,e);if(b)return y(f,s=>s?e(s):C(o,f,b,e));a(f,(s,p)=>s?e(s):p?e(new Error("dest already exists.")):C(o,f,b,e));}function C(o,f,b,P){t.rename(o,f,e=>e?e.code!=="EXDEV"?P(e):F(o,f,b,P):P());}function F(o,f,b,P){i(o,f,{overwrite:b,errorOnExist:!0,preserveTimestamps:!0},e=>e?P(e):y(o,P));}c.exports=m;}),Zt=$((l,c)=>{var t=Q(),n=G("path"),i=lt().copySync,y=ct().removeSync,u=Z().mkdirpSync,a=it();function r(F,o,f){f=f||{};let b=f.overwrite||f.clobber||!1,{srcStat:P,isChangingCase:e=!1}=a.checkPathsSync(F,o,"move",f);return a.checkParentPathsSync(F,P,o,"move"),m(o)||u(n.dirname(o)),O(F,o,b,e)}function m(F){let o=n.dirname(F);return n.parse(o).root===o}function O(F,o,f,b){if(b)return h(F,o,f);if(f)return y(o),h(F,o,f);if(t.existsSync(o))throw new Error("dest already exists.");return h(F,o,f)}function h(F,o,f){try{t.renameSync(F,o);}catch(b){if(b.code!=="EXDEV")throw b;return C(F,o,f)}}function C(F,o,f){return i(F,o,{overwrite:f,errorOnExist:!0,preserveTimestamps:!0}),y(F)}c.exports=r;}),te=$((l,c)=>{var t=X().fromCallback;c.exports={move:t(Qt()),moveSync:Zt()};}),ee=$((l,c)=>{c.exports={...nt(),...lt(),...Jt(),...Vt(),...Xt(),...Z(),...te(),...pt(),...et(),...ct()};});function re(){return process.cwd()}function ne(){let{CHROMATIC_ARCHIVE_LOCATION:l}=process.env;return l}function dt(l){let c=ne()||l;return ft__default.default.resolve(re(),c,"chromatic-archives")}function ie(l){return ft__default.default.resolve(dt(l),"archive")}function oe(l){let c=dt(l);if(!xt__default.default.existsSync(c))throw new Error(`Chromatic archives directory cannot be found: ${c}
19
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:j,destStat:T}=f.checkPathsSync(b,w,"copy",O);if(f.checkParentPathsSync(b,j,w,"copy"),O.filter&&!O.filter(b,w))return;let D=n.dirname(w);return t.existsSync(D)||o(D),r(T,b,w,O)}i(l,"ii"),c(l,"copySync");function r(b,w,O,j){let T=(j.dereference?t.statSync:t.lstatSync)(w);if(T.isDirectory())return P(T,b,w,O,j);if(T.isFile()||T.isCharacterDevice()||T.isBlockDevice())return h(T,b,w,O,j);if(T.isSymbolicLink())return v(b,w,O,j);throw T.isSocket()?new Error(`Cannot copy a socket file: ${w}`):T.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${w}`):new Error(`Unknown file: ${w}`)}i(r,"Dt"),c(r,"getStats");function h(b,w,O,j,T){return w?F(b,O,j,T):S(b,O,j,T)}i(h,"oi"),c(h,"onFile");function F(b,w,O,j){if(j.overwrite)return t.unlinkSync(O),S(b,w,O,j);if(j.errorOnExist)throw new Error(`'${O}' already exists`)}i(F,"ui"),c(F,"mayCopyFile");function S(b,w,O,j){return t.copyFileSync(w,O),j.preserveTimestamps&&_(b.mode,w,O),y(O,b.mode)}i(S,"Nt"),c(S,"copyFile");function _(b,w,O){return x(b)&&a(O,b),k(w,O)}i(_,"ci"),c(_,"handleTimestamps");function x(b){return (b&128)===0}i(x,"si"),c(x,"fileIsNotWritable");function a(b,w){return y(b,w|128)}i(a,"ai"),c(a,"makeFileWritable");function y(b,w){return t.chmodSync(b,w)}i(y,"Ve"),c(y,"setDestMode");function k(b,w){let O=t.statSync(b);return m(w,O.atime,O.mtime)}i(k,"fi"),c(k,"setDestTimestamps");function P(b,w,O,j,T){return w?u(O,j,T):e(b.mode,O,j,T)}i(P,"li"),c(P,"onDir");function e(b,w,O,j){return t.mkdirSync(O),u(w,O,j),y(O,b)}i(e,"mi"),c(e,"mkDirAndCopy");function u(b,w,O){t.readdirSync(b).forEach(j=>d(j,b,w,O));}i(u,"Ct"),c(u,"copyDir");function d(b,w,O,j){let T=n.join(w,b),D=n.join(O,b);if(j.filter&&!j.filter(T,D))return;let{destStat:L}=f.checkPathsSync(T,D,"copy",j);return r(L,T,D,j)}i(d,"yi"),c(d,"copyDirItem");function v(b,w,O,j){let T=t.readlinkSync(w);if(j.dereference&&(T=n.resolve(process.cwd(),T)),b){let D;try{D=t.readlinkSync(O);}catch(L){if(L.code==="EINVAL"||L.code==="UNKNOWN")return t.symlinkSync(T,O);throw L}if(j.dereference&&(D=n.resolve(process.cwd(),D)),f.isSrcSubdir(T,D))throw new Error(`Cannot copy '${T}' to a subdirectory of itself, '${D}'.`);if(f.isSrcSubdir(D,T))throw new Error(`Cannot overwrite '${D}' with '${T}'.`);return E(T,O)}else return t.symlinkSync(T,O)}i(v,"hi"),c(v,"onLink");function E(b,w){return t.unlinkSync(w),t.symlinkSync(b,w)}i(E,"pi"),c(E,"copyLink"),s.exports=l;}),ht=A((p,s)=>{var t=Z().fromCallback;s.exports={copy:t(re()),copySync:ne()};}),ft=A((p,s)=>{var t=tt(),n=Z().fromCallback;function o(f,l){t.rm(f,{recursive:!0,force:!0},l);}i(o,"wi"),c(o,"remove");function m(f){t.rmSync(f,{recursive:!0,force:!0});}i(m,"vi"),c(m,"removeSync"),s.exports={remove:n(o),removeSync:m};}),ie=A((p,s)=>{var t=Z().fromPromise,n=ot(),o=K("path"),m=et(),f=ft(),l=t(c(async function(h){let F;try{F=await n.readdir(h);}catch{return m.mkdirs(h)}return Promise.all(F.map(S=>f.remove(o.join(h,S))))},"emptyDir"));function r(h){let F;try{F=n.readdirSync(h);}catch{return m.mkdirsSync(h)}F.forEach(S=>{S=o.join(h,S),f.removeSync(S);});}i(r,"At"),c(r,"emptyDirSync"),s.exports={emptyDirSync:r,emptydirSync:r,emptyDir:l,emptydir:l};}),oe=A((p,s)=>{var t=Z().fromCallback,n=K("path"),o=tt(),m=et();function f(r,h){function F(){o.writeFile(r,"",S=>{if(S)return h(S);h();});}i(F,"r"),c(F,"makeFile"),o.stat(r,(S,_)=>{if(!S&&_.isFile())return h();let x=n.dirname(r);o.stat(x,(a,y)=>{if(a)return a.code==="ENOENT"?m.mkdirs(x,k=>{if(k)return h(k);F();}):h(a);y.isDirectory()?F():o.readdir(x,k=>{if(k)return h(k)});});});}i(f,"ki"),c(f,"createFile");function l(r){let h;try{h=o.statSync(r);}catch{}if(h&&h.isFile())return;let F=n.dirname(r);try{o.statSync(F).isDirectory()||o.readdirSync(F);}catch(S){if(S&&S.code==="ENOENT")m.mkdirsSync(F);else throw S}o.writeFileSync(r,"");}i(l,"xi"),c(l,"createFileSync"),s.exports={createFile:t(f),createFileSync:l};}),ce=A((p,s)=>{var t=Z().fromCallback,n=K("path"),o=tt(),m=et(),f=it().pathExists,{areIdentical:l}=ct();function r(F,S,_){function x(a,y){o.link(a,y,k=>{if(k)return _(k);_(null);});}i(x,"n"),c(x,"makeLink"),o.lstat(S,(a,y)=>{o.lstat(F,(k,P)=>{if(k)return k.message=k.message.replace("lstat","ensureLink"),_(k);if(y&&l(P,y))return _(null);let e=n.dirname(S);f(e,(u,d)=>{if(u)return _(u);if(d)return x(F,S);m.mkdirs(e,v=>{if(v)return _(v);x(F,S);});});});});}i(r,"Pi"),c(r,"createLink");function h(F,S){let _;try{_=o.lstatSync(S);}catch{}try{let a=o.lstatSync(F);if(_&&l(a,_))return}catch(a){throw a.message=a.message.replace("lstat","ensureLink"),a}let x=n.dirname(S);return o.existsSync(x)||m.mkdirsSync(x),o.linkSync(F,S)}i(h,"Oi"),c(h,"createLinkSync"),s.exports={createLink:t(r),createLinkSync:h};}),ae=A((p,s)=>{var t=K("path"),n=tt(),o=it().pathExists;function m(l,r,h){if(t.isAbsolute(l))return n.lstat(l,F=>F?(F.message=F.message.replace("lstat","ensureSymlink"),h(F)):h(null,{toCwd:l,toDst:l}));{let F=t.dirname(r),S=t.join(F,l);return o(S,(_,x)=>_?h(_):x?h(null,{toCwd:S,toDst:l}):n.lstat(l,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),h(a)):h(null,{toCwd:l,toDst:t.relative(F,l)})))}}i(m,"Ni"),c(m,"symlinkPaths");function f(l,r){let h;if(t.isAbsolute(l)){if(h=n.existsSync(l),!h)throw new Error("absolute srcpath does not exist");return {toCwd:l,toDst:l}}else {let F=t.dirname(r),S=t.join(F,l);if(h=n.existsSync(S),h)return {toCwd:S,toDst:l};if(h=n.existsSync(l),!h)throw new Error("relative srcpath does not exist");return {toCwd:l,toDst:t.relative(F,l)}}}i(f,"Ci"),c(f,"symlinkPathsSync"),s.exports={symlinkPaths:m,symlinkPathsSync:f};}),se=A((p,s)=>{var t=tt();function n(m,f,l){if(l=typeof f=="function"?f:l,f=typeof f=="function"?!1:f,f)return l(null,f);t.lstat(m,(r,h)=>{if(r)return l(null,"file");f=h&&h.isDirectory()?"dir":"file",l(null,f);});}i(n,"Ti"),c(n,"symlinkType");function o(m,f){let l;if(f)return f;try{l=t.lstatSync(m);}catch{return "file"}return l&&l.isDirectory()?"dir":"file"}i(o,"_i"),c(o,"symlinkTypeSync"),s.exports={symlinkType:n,symlinkTypeSync:o};}),ue=A((p,s)=>{var t=Z().fromCallback,n=K("path"),o=ot(),m=et(),f=m.mkdirs,l=m.mkdirsSync,r=ae(),h=r.symlinkPaths,F=r.symlinkPathsSync,S=se(),_=S.symlinkType,x=S.symlinkTypeSync,a=it().pathExists,{areIdentical:y}=ct();function k(u,d,v,E){E=typeof v=="function"?v:E,v=typeof v=="function"?!1:v,o.lstat(d,(b,w)=>{!b&&w.isSymbolicLink()?Promise.all([o.stat(u),o.stat(d)]).then(([O,j])=>{if(y(O,j))return E(null);P(u,d,v,E);}):P(u,d,v,E);});}i(k,"Ji"),c(k,"createSymlink");function P(u,d,v,E){h(u,d,(b,w)=>{if(b)return E(b);u=w.toDst,_(w.toCwd,v,(O,j)=>{if(O)return E(O);let T=n.dirname(d);a(T,(D,L)=>{if(D)return E(D);if(L)return o.symlink(u,d,j,E);f(T,g=>{if(g)return E(g);o.symlink(u,d,j,E);});});});});}i(P,"ir"),c(P,"_createSymlink");function e(u,d,v){let E;try{E=o.lstatSync(d);}catch{}if(E&&E.isSymbolicLink()){let O=o.statSync(u),j=o.statSync(d);if(y(O,j))return}let b=F(u,d);u=b.toDst,v=x(b.toCwd,v);let w=n.dirname(d);return o.existsSync(w)||l(w),o.symlinkSync(u,d,v)}i(e,"Vi"),c(e,"createSymlinkSync"),s.exports={createSymlink:t(k),createSymlinkSync:e};}),le=A((p,s)=>{var{createFile:t,createFileSync:n}=oe(),{createLink:o,createLinkSync:m}=ce(),{createSymlink:f,createSymlinkSync:l}=ue();s.exports={createFile:t,createFileSync:n,ensureFile:t,ensureFileSync:n,createLink:o,createLinkSync:m,ensureLink:o,ensureLinkSync:m,createSymlink:f,createSymlinkSync:l,ensureSymlink:f,ensureSymlinkSync:l};}),St=A((p,s)=>{function t(o,{EOL:m=`
20
+ `,finalEOL:f=!0,replacer:l=null,spaces:r}={}){let h=f?m:"";return JSON.stringify(o,l,r).replace(/\n/g,m)+h}i(t,"Bi"),c(t,"stringify");function n(o){return Buffer.isBuffer(o)&&(o=o.toString("utf8")),o.replace(/^\uFEFF/,"")}i(n,"Ui"),c(n,"stripBom"),s.exports={stringify:t,stripBom:n};}),fe=A((p,s)=>{var t;try{t=tt();}catch{t=K("fs");}var n=Z(),{stringify:o,stripBom:m}=St();async function f(x,a={}){typeof a=="string"&&(a={encoding:a});let y=a.fs||t,k="throws"in a?a.throws:!0,P=await n.fromCallback(y.readFile)(x,a);P=m(P);let e;try{e=JSON.parse(P,a?a.reviver:null);}catch(u){if(k)throw u.message=`${x}: ${u.message}`,u;return null}return e}i(f,"Yi"),c(f,"_readFile");var l=n.fromPromise(f);function r(x,a={}){typeof a=="string"&&(a={encoding:a});let y=a.fs||t,k="throws"in a?a.throws:!0;try{let P=y.readFileSync(x,a);return P=m(P),JSON.parse(P,a.reviver)}catch(P){if(k)throw P.message=`${x}: ${P.message}`,P;return null}}i(r,"Gi"),c(r,"readFileSync");async function h(x,a,y={}){let k=y.fs||t,P=o(a,y);await n.fromCallback(k.writeFile)(x,P,y);}i(h,"Hi"),c(h,"_writeFile");var F=n.fromPromise(h);function S(x,a,y={}){let k=y.fs||t,P=o(a,y);return k.writeFileSync(x,P,y)}i(S,"zi"),c(S,"writeFileSync");var _={readFile:l,readFileSync:r,writeFile:F,writeFileSync:S};s.exports=_;}),ye=A((p,s)=>{var t=fe();s.exports={readJson:t.readFile,readJsonSync:t.readFileSync,writeJson:t.writeFile,writeJsonSync:t.writeFileSync};}),vt=A((p,s)=>{var t=Z().fromCallback,n=tt(),o=K("path"),m=et(),f=it().pathExists;function l(h,F,S,_){typeof S=="function"&&(_=S,S="utf8");let x=o.dirname(h);f(x,(a,y)=>{if(a)return _(a);if(y)return n.writeFile(h,F,S,_);m.mkdirs(x,k=>{if(k)return _(k);n.writeFile(h,F,S,_);});});}i(l,"eo"),c(l,"outputFile");function r(h,...F){let S=o.dirname(h);if(n.existsSync(S))return n.writeFileSync(h,...F);m.mkdirsSync(S),n.writeFileSync(h,...F);}i(r,"to"),c(r,"outputFileSync"),s.exports={outputFile:t(l),outputFileSync:r};}),pe=A((p,s)=>{var{stringify:t}=St(),{outputFile:n}=vt();async function o(m,f,l={}){let r=t(f,l);await n(m,r,l);}i(o,"io"),c(o,"outputJson"),s.exports=o;}),me=A((p,s)=>{var{stringify:t}=St(),{outputFileSync:n}=vt();function o(m,f,l){let r=t(f,l);n(m,r,l);}i(o,"co"),c(o,"outputJsonSync"),s.exports=o;}),de=A((p,s)=>{var t=Z().fromPromise,n=ye();n.outputJson=t(pe()),n.outputJsonSync=me(),n.outputJSON=n.outputJson,n.outputJSONSync=n.outputJsonSync,n.writeJSON=n.writeJson,n.writeJSONSync=n.writeJsonSync,n.readJSON=n.readJson,n.readJSONSync=n.readJsonSync,s.exports=n;}),he=A((p,s)=>{var t=tt(),n=K("path"),o=ht().copy,m=ft().remove,f=et().mkdirp,l=it().pathExists,r=ct();function h(a,y,k,P){typeof k=="function"&&(P=k,k={}),k=k||{};let e=k.overwrite||k.clobber||!1;r.checkPaths(a,y,"move",k,(u,d)=>{if(u)return P(u);let{srcStat:v,isChangingCase:E=!1}=d;r.checkParentPaths(a,v,y,"move",b=>{if(b)return P(b);if(F(y))return S(a,y,e,E,P);f(n.dirname(y),w=>w?P(w):S(a,y,e,E,P));});});}i(h,"yo"),c(h,"move");function F(a){let y=n.dirname(a);return n.parse(y).root===y}i(F,"ho"),c(F,"isParentRoot");function S(a,y,k,P,e){if(P)return _(a,y,k,e);if(k)return m(y,u=>u?e(u):_(a,y,k,e));l(y,(u,d)=>u?e(u):d?e(new Error("dest already exists.")):_(a,y,k,e));}i(S,"Ar"),c(S,"doRename");function _(a,y,k,P){t.rename(a,y,e=>e?e.code!=="EXDEV"?P(e):x(a,y,k,P):P());}i(_,"Be"),c(_,"rename");function x(a,y,k,P){o(a,y,{overwrite:k,errorOnExist:!0,preserveTimestamps:!0},e=>e?P(e):m(a,P));}i(x,"po"),c(x,"moveAcrossDevice"),s.exports=h;}),Se=A((p,s)=>{var t=tt(),n=K("path"),o=ht().copySync,m=ft().removeSync,f=et().mkdirpSync,l=ct();function r(x,a,y){y=y||{};let k=y.overwrite||y.clobber||!1,{srcStat:P,isChangingCase:e=!1}=l.checkPathsSync(x,a,"move",y);return l.checkParentPathsSync(x,P,a,"move"),h(a)||f(n.dirname(a)),F(x,a,k,e)}i(r,"vo"),c(r,"moveSync");function h(x){let a=n.dirname(x);return n.parse(a).root===a}i(h,"Eo"),c(h,"isParentRoot");function F(x,a,y,k){if(k)return S(x,a,y);if(y)return m(a),S(x,a,y);if(t.existsSync(a))throw new Error("dest already exists.");return S(x,a,y)}i(F,"Fo"),c(F,"doRename");function S(x,a,y){try{t.renameSync(x,a);}catch(k){if(k.code!=="EXDEV")throw k;return _(x,a,y)}}i(S,"Ye"),c(S,"rename");function _(x,a,y){return o(x,a,{overwrite:y,errorOnExist:!0,preserveTimestamps:!0}),m(x)}i(_,"ko"),c(_,"moveAcrossDevice"),s.exports=r;}),ve=A((p,s)=>{var t=Z().fromCallback;s.exports={move:t(he()),moveSync:Se()};}),we=A((p,s)=>{s.exports={...ot(),...ht(),...ie(),...le(),...de(),...et(),...ve(),...vt(),...it(),...ft()};});function xt(){return process.cwd()}i(xt,"pn");c(xt,"rootDir");function Ct(){let{CHROMATIC_ARCHIVE_LOCATION:p}=process.env;return p}i(Ct,"dn");c(Ct,"outputDirOverride");function yt(p){let s=Ct()||p;return mt__default.default.resolve(xt(),s,"chromatic-archives")}i(yt,"he");c(yt,"archivesDir");function Nt(p){return mt__default.default.resolve(yt(p),"archive")}i(Nt,"Qe");c(Nt,"assetsDir");function wt(p){let s=yt(p);if(!qt__default.default.existsSync(s))throw new Error(`Chromatic archives directory cannot be found: ${s}
21
21
 
22
- Please make sure that you have run your E2E tests, or have set the CHROMATIC_ARCHIVE_LOCATION env var if the output directory for the tests is not in the standard location.`)}var ht=Lt(ee());function mt(l){return `w${l.width}h${l.height}`}function ce(l){let c=l.match(/w(\d+)h(\d+)/);return {width:Number(c[1]),height:Number(c[2])}}var se="snapshot.json";function ae(l){let c=l.split(".");return c.slice(0,c.length-3).join(".")}function ue(l){let c=l.split("."),t=c[c.length-3];return ce(t)}async function fe(l){return (await promises.readdir(l)).filter(c=>c.endsWith(`.${se}`))}var le="stories.json";function ye(l,c){let{stories:t}=l,n=t.map(i=>{let y=i.parameters.server.id,u=c[y];return {...i,parameters:{...i.parameters,chromatic:{...i.parameters.chromatic,modes:de(u)},viewport:{viewports:me(u),defaultViewport:mt(he(u))}}}});return {...l,stories:n}}async function pe(l){return (await promises.readdir(l)).filter(c=>c.endsWith(`.${le}`))}function de(l){return l.reduce((c,t)=>{let n=mt(t);return c[n]={viewport:n},c},{})}function me(l){return l.reduce((c,t)=>{let n=mt(t);return c[n]={name:n,styles:{width:`${t.width}px`,height:`${t.height}px`}},c},{})}function he(l){let c=(t,n)=>t.width<n.width?1:t.width>n.width?-1:0;return l.sort(c)[0]}async function ve(l){let c=ie(l),t=await fe(c),n=Se(t),i=dt(l),y=(await pe(i)).map(u=>ft__default.default.resolve(i,u));await Promise.all(y.map(async u=>{let a=await(0, ht.readJSON)(u),r=ye(a,n);await(0, ht.outputJSON)(u,r);}));}function Se(l){let c={};return l.forEach(t=>{let n=ae(t),i=c[n]||[];i.push(ue(t)),c[n]=i;}),c}function bt(l,c,t){oe(t),ve(t).then(()=>{let n=ft.resolve(ft.dirname(G.resolve("storybook/package.json")),"./index.js");child_process.execFileSync("node",[n,"dev",...l,"-c",c],{stdio:"inherit"});});}var gt="test-results";var be=process.argv.slice(2),ge=ft__default.default.resolve(__dirname,"../storybook-config");bt(be,ge,gt);
22
+ Please make sure that you have run your E2E tests, or have set the CHROMATIC_ARCHIVE_LOCATION env var if the output directory for the tests is not in the standard location.`)}i(wt,"Ne");c(wt,"checkArchivesDirExists");var gt=zt(we());function pt(p){return `w${p.width}h${p.height}`}i(pt,"ye");c(pt,"viewportToString");function Lt(p){let s=p.match(/w(\d+)h(\d+)/);return {width:Number(s[1]),height:Number(s[2])}}i(Lt,"zr");c(Lt,"parseViewport");var be="snapshot.json";function _t(p){let s=p.split(".");return s.slice(0,s.length-3).join(".")}i(_t,"Qr");c(_t,"snapshotIdFromFileName");function jt(p){let s=p.split("."),t=s[s.length-3];return Lt(t)}i(jt,"Xr");c(jt,"viewportFromFileName");async function Tt(p){return (await promises.readdir(p)).filter(s=>s.endsWith(`.${be}`))}i(Tt,"Zr");c(Tt,"listSnapshotFiles");var ke="stories.json";function It(p,s){let{stories:t}=p,n=t.map(o=>{let m=o.parameters.server.id,f=s[m];return {...o,parameters:{...o.parameters,chromatic:{...o.parameters.chromatic,modes:Rt(f)},viewport:{viewports:At(f),defaultViewport:pt(Mt(f))}}}});return {...p,stories:n}}i(It,"en");c(It,"addViewportsToStories");async function $t(p){return (await promises.readdir(p)).filter(s=>s.endsWith(`.${ke}`))}i($t,"tn");c($t,"listStoriesFiles");function Rt(p){return p.reduce((s,t)=>{let n=pt(t);return s[n]={viewport:n},s},{})}i(Rt,"No");c(Rt,"buildStoryModesConfig");function At(p){return p.reduce((s,t)=>{let n=pt(t);return s[n]={name:n,styles:{width:`${t.width}px`,height:`${t.height}px`}},s},{})}i(At,"Co");c(At,"buildStoryViewportsConfig");function Mt(p){let s=c((t,n)=>t.width<n.width?1:t.width>n.width?-1:0,"compareFn");return p.sort(s)[0]}i(Mt,"To");c(Mt,"findDefaultViewport");async function bt(p){let s=Nt(p),t=await Tt(s),n=Wt(t),o=yt(p),m=(await $t(o)).map(f=>mt__default.default.resolve(o,f));await Promise.all(m.map(async f=>{let l=await(0, gt.readJSON)(f),r=It(l,n);await(0, gt.outputJSON)(f,r);}));}i(bt,"Ge");c(bt,"addViewportsToStoriesFiles");function Wt(p){let s={};return p.forEach(t=>{let n=_t(t),o=s[n]||[];o.push(jt(t)),s[n]=o;}),s}i(Wt,"Io");c(Wt,"buildSnapshotViewportsLookup");function kt(p,s,t){wt(t),bt(t).then(()=>{let n=mt.resolve(mt.dirname(K.resolve("storybook/package.json")),"./index.js");child_process.execFileSync("node",[n,"dev",...p,"-c",s],{stdio:"inherit"});});}i(kt,"Sc");c(kt,"archiveStorybook");function ge(p,s,t){wt(t),bt(t).then(()=>{let n=mt.resolve(mt.dirname(K.resolve("storybook/package.json")),"./index.js");child_process.execFileSync("node",[n,"build",...p,"-c",s],{stdio:"inherit"});});}i(ge,"wc");c(ge,"buildArchiveStorybook");var Jt="test-results";var Fe=process.argv.slice(2),Oe=mt__default.default.resolve(__dirname,"../storybook-config");kt(Fe,Oe,Jt);
23
23
  //# sourceMappingURL=out.js.map
24
24
  //# sourceMappingURL=archive-storybook.js.map