@chromatic-com/playwright 0.5.0

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.
package/.babelrc.js ADDED
@@ -0,0 +1,23 @@
1
+ const ignore = process.env.IGNORE_FILES ? ['**/*.test.ts', '**/*.d.ts'] : [];
2
+
3
+ module.exports = {
4
+ presets: [
5
+ ['@babel/preset-env', { targets: { node: 'current' } }],
6
+ '@babel/preset-typescript',
7
+ '@babel/preset-react',
8
+ ],
9
+ env: {
10
+ esm: {
11
+ presets: [
12
+ [
13
+ '@babel/preset-env',
14
+ {
15
+ modules: false,
16
+ targets: { node: 'current' },
17
+ },
18
+ ],
19
+ ],
20
+ },
21
+ },
22
+ ignore,
23
+ };
package/.eslintrc.js ADDED
@@ -0,0 +1,25 @@
1
+ module.exports = {
2
+ extends: ['@storybook/eslint-config-storybook'],
3
+ overrides: [
4
+ {
5
+ files: ['**/*.ts'],
6
+ rules: {
7
+ 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
8
+ 'import/no-unresolved': ['warn'],
9
+ },
10
+ },
11
+ {
12
+ files: ['**/*.test.ts', '**/*.spec.ts'],
13
+ rules: {
14
+ 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
15
+ 'no-restricted-syntax': 'off',
16
+ },
17
+ parserOptions: {
18
+ project: ['tsconfig.json'],
19
+ },
20
+ },
21
+ ],
22
+ parserOptions: {
23
+ project: ['tsconfig.json'],
24
+ },
25
+ };
package/CHANGELOG.md ADDED
@@ -0,0 +1,33 @@
1
+ # chromatic-playwright
2
+
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 59c48db: fix asset mapping of link tags
8
+
9
+ ## 0.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 0f7e98f: add exports for the archive storybook scripts so that they can be invoked from the CLI
14
+
15
+ ## 0.3.1
16
+
17
+ ### Patch Changes
18
+
19
+ - 59d2b20: remove the iframe currently used to render the snapshot
20
+
21
+ ## 0.3.0
22
+
23
+ ### Minor Changes
24
+
25
+ - 21b691d: depend on storybook instead of @storybook/cli
26
+
27
+ ## 0.2.0
28
+
29
+ ### Minor Changes
30
+
31
+ - df06cbe: - introduce `chromatic-playwright` package
32
+ - update function and parameter names: https://github.com/chromaui/chromatic-e2e/pull/58
33
+ - use fullscreen layout for Storybook: https://github.com/chromaui/chromatic-e2e/pull/64
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ ## @chromatic-com/playwright
2
+
3
+ Chromatic E2E Visual Tests for Playwright
4
+
5
+ ## Getting Started
6
+
7
+ See the [documentation](https://www.chromatic.com/docs/playwright/).
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ var child_process = require('child_process');
5
+ var d = require('path');
6
+ var l = require('fs');
7
+
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
+
10
+ var d__default = /*#__PURE__*/_interopDefault(d);
11
+ var l__default = /*#__PURE__*/_interopDefault(l);
12
+
13
+ var y=Object.defineProperty;var t=(e,r)=>y(e,"name",{value:r,configurable:!0}),i=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var m=Object.defineProperty,n=t((e,r)=>m(e,"name",{value:r,configurable:!0}),"e"),f=(e=>typeof i<"u"?i:typeof Proxy<"u"?new Proxy(e,{get:(r,o)=>(typeof i<"u"?i:r)[o]}):e)(function(e){if(typeof i<"u")return i.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),{CHROMATIC_ARCHIVE_LOCATION:b="test-results"}=process.env;function h(){return process.cwd()}t(h,"f");n(h,"rootDir");function p(){return d__default.default.resolve(h(),b,"chromatic-archives")}t(p,"p");n(p,"archivesDir");function s(){let e=p();if(!l__default.default.existsSync(e))throw new Error(`Chromatic archives directory cannot be found: ${e}
14
+
15
+ 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.`)}t(s,"s");n(s,"checkArchivesDirExists");function c(e,r){s();let o=d.resolve(d.dirname(f.resolve("storybook/package.json")),"./index.js");child_process.execFileSync("node",[o,"dev",...e,"-c",r],{stdio:"inherit"});}t(c,"E");n(c,"archiveStorybook");function k(e,r){s();let o=d.resolve(d.dirname(f.resolve("storybook/package.json")),"./index.js");child_process.execFileSync("node",[o,"build",...e,"-c",r],{stdio:"inherit"});}t(k,"I");n(k,"buildArchiveStorybook");var A=process.argv.slice(2),C=d__default.default.resolve(__dirname,"../storybook-config");c(A,C);
16
+ //# sourceMappingURL=out.js.map
17
+ //# sourceMappingURL=archive-storybook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/bin/archive-storybook.ts"],"names":["path","args","process","argv","slice","configDir","resolve","__dirname","archiveStorybook"],"mappings":";;;qiBAGA,OAAOA,MAAU,OAGjB,IAAMC,EAAOC,QAAQC,KAAKC,MAAM,CAAA,EAC1BC,EAAYL,EAAKM,QAAQC,UAAW,qBAAA,EAE1CC,EAAiBP,EAAMI,CAAAA","sourcesContent":["#!/usr/bin/env node\n\nimport { archiveStorybook } from '@chromatic-com/shared-e2e/archive-storybook';\nimport path from 'path';\n\n// Discard first two entries (exec path and file path)\nconst args = process.argv.slice(2);\nconst configDir = path.resolve(__dirname, '../storybook-config');\n\narchiveStorybook(args, configDir);\n"]}
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ var child_process = require('child_process');
5
+ var y = require('path');
6
+ var l = require('fs');
7
+
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
+
10
+ var y__default = /*#__PURE__*/_interopDefault(y);
11
+ var l__default = /*#__PURE__*/_interopDefault(l);
12
+
13
+ var p=Object.defineProperty;var t=(e,r)=>p(e,"name",{value:r,configurable:!0}),i=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var m=Object.defineProperty,n=t((e,r)=>m(e,"name",{value:r,configurable:!0}),"e"),f=(e=>typeof i<"u"?i:typeof Proxy<"u"?new Proxy(e,{get:(r,o)=>(typeof i<"u"?i:r)[o]}):e)(function(e){if(typeof i<"u")return i.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),{CHROMATIC_ARCHIVE_LOCATION:b="test-results"}=process.env;function h(){return process.cwd()}t(h,"f");n(h,"rootDir");function d(){return y__default.default.resolve(h(),b,"chromatic-archives")}t(d,"p");n(d,"archivesDir");function s(){let e=d();if(!l__default.default.existsSync(e))throw new Error(`Chromatic archives directory cannot be found: ${e}
14
+
15
+ 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.`)}t(s,"s");n(s,"checkArchivesDirExists");function k(e,r){s();let o=y.resolve(y.dirname(f.resolve("storybook/package.json")),"./index.js");child_process.execFileSync("node",[o,"dev",...e,"-c",r],{stdio:"inherit"});}t(k,"E");n(k,"archiveStorybook");function c(e,r){s();let o=y.resolve(y.dirname(f.resolve("storybook/package.json")),"./index.js");child_process.execFileSync("node",[o,"build",...e,"-c",r],{stdio:"inherit"});}t(c,"I");n(c,"buildArchiveStorybook");var g=process.argv.slice(2),C=y__default.default.resolve(__dirname,"../storybook-config");c(g,C);
16
+ //# sourceMappingURL=out.js.map
17
+ //# sourceMappingURL=build-archive-storybook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/bin/build-archive-storybook.ts"],"names":["path","args","process","argv","slice","configDir","resolve","__dirname","buildArchiveStorybook"],"mappings":";;;qiBAGA,OAAOA,MAAU,OAGjB,IAAMC,EAAOC,QAAQC,KAAKC,MAAM,CAAA,EAC1BC,EAAYL,EAAKM,QAAQC,UAAW,qBAAA,EAE1CC,EAAsBP,EAAMI,CAAAA","sourcesContent":["#!/usr/bin/env node\n\nimport { buildArchiveStorybook } from '@chromatic-com/shared-e2e/archive-storybook';\nimport path from 'path';\n\n// Discard first two entries (exec path and file path)\nconst args = process.argv.slice(2);\nconst configDir = path.resolve(__dirname, '../storybook-config');\n\nbuildArchiveStorybook(args, configDir);\n"]}
@@ -0,0 +1,24 @@
1
+ import * as _playwright_test from '@playwright/test';
2
+ import { Page, TestInfo } from '@playwright/test';
3
+ export { expect } from '@playwright/test';
4
+
5
+ interface ChromaticConfig {
6
+ delay?: number;
7
+ diffIncludeAntiAliasing?: boolean;
8
+ diffThreshold?: number;
9
+ disableAutoSnapshot?: boolean;
10
+ forcedColors?: string;
11
+ pauseAnimationAtEnd?: boolean;
12
+ prefersReducedMotion?: string;
13
+ resourceArchiveTimeout?: number;
14
+ assetDomains?: string[];
15
+ }
16
+
17
+ declare function takeSnapshot(page: Page, testInfo: TestInfo): Promise<void>;
18
+ declare function takeSnapshot(page: Page, name: string, testInfo: TestInfo): Promise<void>;
19
+
20
+ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & ChromaticConfig & {
21
+ save: void;
22
+ }, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions>;
23
+
24
+ export { ChromaticConfig, takeSnapshot, test };
package/dist/index.js ADDED
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ var test = require('@playwright/test');
4
+ var wt = require('path');
5
+ var crypto = require('crypto');
6
+ var rrwebSnapshot = require('rrweb-snapshot');
7
+ var analyticsNode = require('@segment/analytics-node');
8
+ var Bt = require('fs');
9
+ var qe = require('ts-dedent');
10
+
11
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
+
13
+ var wt__default = /*#__PURE__*/_interopDefault(wt);
14
+ var Bt__default = /*#__PURE__*/_interopDefault(Bt);
15
+ var qe__default = /*#__PURE__*/_interopDefault(qe);
16
+
17
+ var Mt=Object.defineProperty;var s=(e,o)=>Mt(e,"name",{value:o,configurable:!0}),at=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(o,t)=>(typeof require<"u"?require:o)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Gt=Object.create,ht=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertyNames,Vt=Object.getPrototypeOf,Ht=Object.prototype.hasOwnProperty,Qt=s((e,o,t)=>o in e?ht(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,"qn"),l=s((e,o)=>ht(e,"name",{value:o,configurable:!0}),"r"),Y=(e=>typeof at<"u"?at:typeof Proxy<"u"?new Proxy(e,{get:(o,t)=>(typeof at<"u"?at:o)[t]}):e)(function(e){if(typeof at<"u")return at.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),$=s((e,o)=>()=>(o||e((o={exports:{}}).exports,o),o.exports),"h"),Xt=s((e,o,t,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of Kt(o))!Ht.call(e,r)&&r!==t&&ht(e,r,{get:()=>o[r],enumerable:!(a=Yt(o,r))||a.enumerable});return e},"Fn"),bt=s((e,o,t)=>(t=e!=null?Gt(Vt(e)):{},Xt(o||!e||!e.__esModule?ht(t,"default",{value:e,enumerable:!0}):t,e)),"Ti"),nt=s((e,o,t)=>(Qt(e,typeof o!="symbol"?o+"":o,t),t),"J"),Z=$(e=>{e.fromCallback=function(o){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")o.apply(this,t);else return new Promise((a,r)=>{o.call(this,...t,(m,u)=>m!=null?r(m):a(u));})},"name",{value:o.name})},e.fromPromise=function(o){return Object.defineProperty(function(...t){let a=t[t.length-1];if(typeof a!="function")return o.apply(this,t);o.apply(this,t.slice(0,-1)).then(r=>a(null,r),a);},"name",{value:o.name})};}),Zt=$((e,o)=>{var t=Y("constants"),a=process.cwd,r=null,m=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return r||(r=a.call(process)),r};try{process.cwd();}catch{}typeof process.chdir=="function"&&(u=process.chdir,process.chdir=function(i){r=null,u.call(process,i);},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,u));var u;o.exports=p;function p(i){t.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&v(i),i.lutimes||y(i),i.chown=b(i.chown),i.fchown=b(i.fchown),i.lchown=b(i.lchown),i.chmod=x(i.chmod),i.fchmod=x(i.fchmod),i.lchmod=x(i.lchmod),i.chownSync=c(i.chownSync),i.fchownSync=c(i.fchownSync),i.lchownSync=c(i.lchownSync),i.chmodSync=O(i.chmodSync),i.fchmodSync=O(i.fchmodSync),i.lchmodSync=O(i.lchmodSync),i.stat=d(i.stat),i.fstat=d(i.fstat),i.lstat=d(i.lstat),i.statSync=g(i.statSync),i.fstatSync=g(i.fstatSync),i.lstatSync=g(i.lstatSync),i.chmod&&!i.lchmod&&(i.lchmod=function(n,f,h){h&&process.nextTick(h);},i.lchmodSync=function(){}),i.chown&&!i.lchown&&(i.lchown=function(n,f,h,w){w&&process.nextTick(w);},i.lchownSync=function(){}),m==="win32"&&(i.rename=typeof i.rename!="function"?i.rename:function(n){function f(h,w,E){var S=Date.now(),k=0;n(h,w,l(s(function F(T){if(T&&(T.code==="EACCES"||T.code==="EPERM"||T.code==="EBUSY")&&Date.now()-S<6e4){setTimeout(function(){i.stat(w,function(L,z){L&&L.code==="ENOENT"?n(h,w,F):E(T);});},k),k<100&&(k+=10);return}E&&E(T);},"j"),"CB"));}return s(f,"d"),l(f,"rename"),Object.setPrototypeOf&&Object.setPrototypeOf(f,n),f}(i.rename)),i.read=typeof i.read!="function"?i.read:function(n){function f(h,w,E,S,k,F){var T;if(F&&typeof F=="function"){var L=0;T=l(function(z,N,j){if(z&&z.code==="EAGAIN"&&L<10)return L++,n.call(i,h,w,E,S,k,T);F.apply(this,arguments);},"callback");}return n.call(i,h,w,E,S,k,T)}return s(f,"d"),l(f,"read"),Object.setPrototypeOf&&Object.setPrototypeOf(f,n),f}(i.read),i.readSync=typeof i.readSync!="function"?i.readSync:function(n){return function(f,h,w,E,S){for(var k=0;;)try{return n.call(i,f,h,w,E,S)}catch(F){if(F.code==="EAGAIN"&&k<10){k++;continue}throw F}}}(i.readSync);function v(n){n.lchmod=function(f,h,w){n.open(f,t.O_WRONLY|t.O_SYMLINK,h,function(E,S){if(E){w&&w(E);return}n.fchmod(S,h,function(k){n.close(S,function(F){w&&w(k||F);});});});},n.lchmodSync=function(f,h){var w=n.openSync(f,t.O_WRONLY|t.O_SYMLINK,h),E=!0,S;try{S=n.fchmodSync(w,h),E=!1;}finally{if(E)try{n.closeSync(w);}catch{}else n.closeSync(w);}return S};}s(v,"t"),l(v,"patchLchmod");function y(n){t.hasOwnProperty("O_SYMLINK")&&n.futimes?(n.lutimes=function(f,h,w,E){n.open(f,t.O_SYMLINK,function(S,k){if(S){E&&E(S);return}n.futimes(k,h,w,function(F){n.close(k,function(T){E&&E(F||T);});});});},n.lutimesSync=function(f,h,w){var E=n.openSync(f,t.O_SYMLINK),S,k=!0;try{S=n.futimesSync(E,h,w),k=!1;}finally{if(k)try{n.closeSync(E);}catch{}else n.closeSync(E);}return S}):n.futimes&&(n.lutimes=function(f,h,w,E){E&&process.nextTick(E);},n.lutimesSync=function(){});}s(y,"e"),l(y,"patchLutimes");function x(n){return n&&function(f,h,w){return n.call(i,f,h,function(E){D(E)&&(E=null),w&&w.apply(this,arguments);})}}s(x,"n"),l(x,"chmodFix");function O(n){return n&&function(f,h){try{return n.call(i,f,h)}catch(w){if(!D(w))throw w}}}s(O,"a"),l(O,"chmodFixSync");function b(n){return n&&function(f,h,w,E){return n.call(i,f,h,w,function(S){D(S)&&(S=null),E&&E.apply(this,arguments);})}}s(b,"o"),l(b,"chownFix");function c(n){return n&&function(f,h,w){try{return n.call(i,f,h,w)}catch(E){if(!D(E))throw E}}}s(c,"p"),l(c,"chownFixSync");function d(n){return n&&function(f,h,w){typeof h=="function"&&(w=h,h=null);function E(S,k){k&&(k.uid<0&&(k.uid+=4294967296),k.gid<0&&(k.gid+=4294967296)),w&&w.apply(this,arguments);}return s(E,"f"),l(E,"callback"),h?n.call(i,f,h,E):n.call(i,f,E)}}s(d,"c"),l(d,"statFix");function g(n){return n&&function(f,h){var w=h?n.call(i,f,h):n.call(i,f);return w&&(w.uid<0&&(w.uid+=4294967296),w.gid<0&&(w.gid+=4294967296)),w}}s(g,"l"),l(g,"statFixSync");function D(n){if(!n||n.code==="ENOSYS")return !0;var f=!process.getuid||process.getuid()!==0;return !!(f&&(n.code==="EINVAL"||n.code==="EPERM"))}s(D,"v"),l(D,"chownErOk");}s(p,"Pn"),l(p,"patch");}),te=$((e,o)=>{var t=Y("stream").Stream;o.exports=a;function a(r){return {ReadStream:m,WriteStream:u};function m(p,i){if(!(this instanceof m))return new m(p,i);t.call(this);var v=this;this.path=p,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var y=Object.keys(i),x=0,O=y.length;x<O;x++){var b=y[x];this[b]=i[b];}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(){v._read();});return}r.open(this.path,this.flags,this.mode,function(c,d){if(c){v.emit("error",c),v.readable=!1;return}v.fd=d,v.emit("open",d),v._read();});}function u(p,i){if(!(this instanceof u))return new u(p,i);t.call(this),this.path=p,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var v=Object.keys(i),y=0,x=v.length;y<x;y++){var O=v[y];this[O]=i[O];}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=r.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush());}}s(a,"Cn"),l(a,"legacy");}),ee=$((e,o)=>{o.exports=a;var t=Object.getPrototypeOf||function(r){return r.__proto__};function a(r){if(r===null||typeof r!="object")return r;if(r instanceof Object)var m={__proto__:t(r)};else var m=Object.create(null);return Object.getOwnPropertyNames(r).forEach(function(u){Object.defineProperty(m,u,Object.getOwnPropertyDescriptor(r,u));}),m}s(a,"Nn"),l(a,"clone");}),tt=$((e,o)=>{var t=Y("fs"),a=Zt(),r=te(),m=ee(),u=Y("util"),p,i;typeof Symbol=="function"&&typeof Symbol.for=="function"?(p=Symbol.for("graceful-fs.queue"),i=Symbol.for("graceful-fs.previous")):(p="___graceful-fs.queue",i="___graceful-fs.previous");function v(){}s(v,"Ln"),l(v,"noop");function y(n,f){Object.defineProperty(n,p,{get:function(){return f}});}s(y,"mt"),l(y,"publishQueue");var x=v;u.debuglog?x=u.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(x=l(function(){var n=u.format.apply(u,arguments);n="GFS4: "+n.split(/\n/).join(`
18
+ GFS4: `),console.error(n);},"debug")),t[p]||(O=global[p]||[],y(t,O),t.close=function(n){function f(h,w){return n.call(t,h,function(E){E||g(),typeof w=="function"&&w.apply(this,arguments);})}return s(f,"t"),l(f,"close"),Object.defineProperty(f,i,{value:n}),f}(t.close),t.closeSync=function(n){function f(h){n.apply(t,arguments),g();}return s(f,"t"),l(f,"closeSync"),Object.defineProperty(f,i,{value:n}),f}(t.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){x(t[p]),Y("assert").equal(t[p].length,0);}));var O;global[p]||y(global,t[p]),o.exports=b(m(t)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!t.__patched&&(o.exports=b(t),t.__patched=!0);function b(n){a(n),n.gracefulify=b,n.createReadStream=ut,n.createWriteStream=ft;var f=n.readFile;n.readFile=h;function h(q,A,I){return typeof A=="function"&&(I=A,A=null),V(q,A,I);function V(H,J,B,G){return f(H,J,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?c([V,[H,J,B],U,G||Date.now(),Date.now()]):typeof B=="function"&&B.apply(this,arguments);})}}s(h,"e"),l(h,"readFile");var w=n.writeFile;n.writeFile=E;function E(q,A,I,V){return typeof I=="function"&&(V=I,I=null),H(q,A,I,V);function H(J,B,G,U,X){return w(J,B,G,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?c([H,[J,B,G,U],M,X||Date.now(),Date.now()]):typeof U=="function"&&U.apply(this,arguments);})}}s(E,"a"),l(E,"writeFile");var S=n.appendFile;S&&(n.appendFile=k);function k(q,A,I,V){return typeof I=="function"&&(V=I,I=null),H(q,A,I,V);function H(J,B,G,U,X){return S(J,B,G,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?c([H,[J,B,G,U],M,X||Date.now(),Date.now()]):typeof U=="function"&&U.apply(this,arguments);})}}s(k,"p"),l(k,"appendFile");var F=n.copyFile;F&&(n.copyFile=T);function T(q,A,I,V){return typeof I=="function"&&(V=I,I=0),H(q,A,I,V);function H(J,B,G,U,X){return F(J,B,G,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?c([H,[J,B,G,U],M,X||Date.now(),Date.now()]):typeof U=="function"&&U.apply(this,arguments);})}}s(T,"l"),l(T,"copyFile");var L=n.readdir;n.readdir=N;var z=/^v[0-5]\./;function N(q,A,I){typeof A=="function"&&(I=A,A=null);var V=z.test(process.version)?l(function(J,B,G,U){return L(J,H(J,B,G,U))},"go$readdir"):l(function(J,B,G,U){return L(J,B,H(J,B,G,U))},"go$readdir");return V(q,A,I);function H(J,B,G,U){return function(X,M){X&&(X.code==="EMFILE"||X.code==="ENFILE")?c([V,[J,B,G],X,U||Date.now(),Date.now()]):(M&&M.sort&&M.sort(),typeof G=="function"&&G.call(this,X,M));}}}if(s(N,"d"),l(N,"readdir"),process.version.substr(0,4)==="v0.8"){var j=r(n);W=j.ReadStream,Q=j.WriteStream;}var C=n.ReadStream;C&&(W.prototype=Object.create(C.prototype),W.prototype.open=K);var P=n.WriteStream;P&&(Q.prototype=Object.create(P.prototype),Q.prototype.open=ot),Object.defineProperty(n,"ReadStream",{get:function(){return W},set:function(q){W=q;},enumerable:!0,configurable:!0}),Object.defineProperty(n,"WriteStream",{get:function(){return Q},set:function(q){Q=q;},enumerable:!0,configurable:!0});var _=W;Object.defineProperty(n,"FileReadStream",{get:function(){return _},set:function(q){_=q;},enumerable:!0,configurable:!0});var R=Q;Object.defineProperty(n,"FileWriteStream",{get:function(){return R},set:function(q){R=q;},enumerable:!0,configurable:!0});function W(q,A){return this instanceof W?(C.apply(this,arguments),this):W.apply(Object.create(W.prototype),arguments)}s(W,"j"),l(W,"ReadStream");function K(){var q=this;xt(q.path,q.flags,q.mode,function(A,I){A?(q.autoClose&&q.destroy(),q.emit("error",A)):(q.fd=I,q.emit("open",I),q.read());});}s(K,"I"),l(K,"ReadStream$open");function Q(q,A){return this instanceof Q?(P.apply(this,arguments),this):Q.apply(Object.create(Q.prototype),arguments)}s(Q,"_"),l(Q,"WriteStream");function ot(){var q=this;xt(q.path,q.flags,q.mode,function(A,I){A?(q.destroy(),q.emit("error",A)):(q.fd=I,q.emit("open",I));});}s(ot,"ci"),l(ot,"WriteStream$open");function ut(q,A){return new n.ReadStream(q,A)}s(ut,"it"),l(ut,"createReadStream");function ft(q,A){return new n.WriteStream(q,A)}s(ft,"tt"),l(ft,"createWriteStream");var vt=n.open;n.open=xt;function xt(q,A,I,V){return typeof I=="function"&&(V=I,I=null),H(q,A,I,V);function H(J,B,G,U,X){return vt(J,B,G,function(M,Ie){M&&(M.code==="EMFILE"||M.code==="ENFILE")?c([H,[J,B,G,U],M,X||Date.now(),Date.now()]):typeof U=="function"&&U.apply(this,arguments);})}}return s(xt,"Ni"),l(xt,"open"),n}s(b,"Ri"),l(b,"patch");function c(n){x("ENQUEUE",n[0].name,n[1]),t[p].push(n),D();}s(c,"ni"),l(c,"enqueue");var d;function g(){for(var n=Date.now(),f=0;f<t[p].length;++f)t[p][f].length>2&&(t[p][f][3]=n,t[p][f][4]=n);D();}s(g,"lt"),l(g,"resetQueue");function D(){if(clearTimeout(d),d=void 0,t[p].length!==0){var n=t[p].shift(),f=n[0],h=n[1],w=n[2],E=n[3],S=n[4];if(E===void 0)x("RETRY",f.name,h),f.apply(null,h);else if(Date.now()-E>=6e4){x("TIMEOUT",f.name,h);var k=h.pop();typeof k=="function"&&k.call(null,w);}else {var F=Date.now()-S,T=Math.max(S-E,1),L=Math.min(T*1.2,100);F>=L?(x("RETRY",f.name,h),f.apply(null,h.concat([E]))):t[p].push(n);}d===void 0&&(d=setTimeout(D,0));}}s(D,"Ii"),l(D,"retry");}),ct=$(e=>{var o=Z().fromCallback,t=tt(),a=["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(r=>typeof t[r]=="function");Object.assign(e,t),a.forEach(r=>{e[r]=o(t[r]);}),e.exists=function(r,m){return typeof m=="function"?t.exists(r,m):new Promise(u=>t.exists(r,u))},e.read=function(r,m,u,p,i,v){return typeof v=="function"?t.read(r,m,u,p,i,v):new Promise((y,x)=>{t.read(r,m,u,p,i,(O,b,c)=>{if(O)return x(O);y({bytesRead:b,buffer:c});});})},e.write=function(r,m,...u){return typeof u[u.length-1]=="function"?t.write(r,m,...u):new Promise((p,i)=>{t.write(r,m,...u,(v,y,x)=>{if(v)return i(v);p({bytesWritten:y,buffer:x});});})},e.readv=function(r,m,...u){return typeof u[u.length-1]=="function"?t.readv(r,m,...u):new Promise((p,i)=>{t.readv(r,m,...u,(v,y,x)=>{if(v)return i(v);p({bytesRead:y,buffers:x});});})},e.writev=function(r,m,...u){return typeof u[u.length-1]=="function"?t.writev(r,m,...u):new Promise((p,i)=>{t.writev(r,m,...u,(v,y,x)=>{if(v)return i(v);p({bytesWritten:y,buffers:x});});})},typeof t.realpath.native=="function"?e.realpath.native=o(t.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003");}),ie=$((e,o)=>{var t=Y("path");o.exports.checkPath=l(function(a){if(process.platform==="win32"&&/[<>:"|?*]/.test(a.replace(t.parse(a).root,""))){let r=new Error(`Path contains invalid characters: ${a}`);throw r.code="EINVAL",r}},"checkPath");}),ae=$((e,o)=>{var t=ct(),{checkPath:a}=ie(),r=l(m=>typeof m=="number"?m:{...{mode:511},...m}.mode,"getMode");o.exports.makeDir=async(m,u)=>(a(m),t.mkdir(m,{mode:r(u),recursive:!0})),o.exports.makeDirSync=(m,u)=>(a(m),t.mkdirSync(m,{mode:r(u),recursive:!0}));}),it=$((e,o)=>{var t=Z().fromPromise,{makeDir:a,makeDirSync:r}=ae(),m=t(a);o.exports={mkdirs:m,mkdirsSync:r,mkdirp:m,mkdirpSync:r,ensureDir:m,ensureDirSync:r};}),rt=$((e,o)=>{var t=Z().fromPromise,a=ct();function r(m){return a.access(m).then(()=>!0).catch(()=>!1)}s(r,"Jn"),l(r,"pathExists"),o.exports={pathExists:t(r),pathExistsSync:a.existsSync};}),Lt=$((e,o)=>{var t=tt();function a(m,u,p,i){t.open(m,"r+",(v,y)=>{if(v)return i(v);t.futimes(y,u,p,x=>{t.close(y,O=>{i&&i(x||O);});});});}s(a,"Mn"),l(a,"utimesMillis");function r(m,u,p){let i=t.openSync(m,"r+");return t.futimesSync(i,u,p),t.closeSync(i)}s(r,"Bn"),l(r,"utimesMillisSync"),o.exports={utimesMillis:a,utimesMillisSync:r};}),st=$((e,o)=>{var t=ct(),a=Y("path"),r=Y("util");function m(c,d,g){let D=g.dereference?n=>t.stat(n,{bigint:!0}):n=>t.lstat(n,{bigint:!0});return Promise.all([D(c),D(d).catch(n=>{if(n.code==="ENOENT")return null;throw n})]).then(([n,f])=>({srcStat:n,destStat:f}))}s(m,"Hn"),l(m,"getStats");function u(c,d,g){let D,n=g.dereference?h=>t.statSync(h,{bigint:!0}):h=>t.lstatSync(h,{bigint:!0}),f=n(c);try{D=n(d);}catch(h){if(h.code==="ENOENT")return {srcStat:f,destStat:null};throw h}return {srcStat:f,destStat:D}}s(u,"Kn"),l(u,"getStatsSync");function p(c,d,g,D,n){r.callbackify(m)(c,d,D,(f,h)=>{if(f)return n(f);let{srcStat:w,destStat:E}=h;if(E){if(x(w,E)){let S=a.basename(c),k=a.basename(d);return g==="move"&&S!==k&&S.toLowerCase()===k.toLowerCase()?n(null,{srcStat:w,destStat:E,isChangingCase:!0}):n(new Error("Source and destination must not be the same."))}if(w.isDirectory()&&!E.isDirectory())return n(new Error(`Cannot overwrite non-directory '${d}' with directory '${c}'.`));if(!w.isDirectory()&&E.isDirectory())return n(new Error(`Cannot overwrite directory '${d}' with non-directory '${c}'.`))}return w.isDirectory()&&O(c,d)?n(new Error(b(c,d,g))):n(null,{srcStat:w,destStat:E})});}s(p,"Vn"),l(p,"checkPaths");function i(c,d,g,D){let{srcStat:n,destStat:f}=u(c,d,D);if(f){if(x(n,f)){let h=a.basename(c),w=a.basename(d);if(g==="move"&&h!==w&&h.toLowerCase()===w.toLowerCase())return {srcStat:n,destStat:f,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(n.isDirectory()&&!f.isDirectory())throw new Error(`Cannot overwrite non-directory '${d}' with directory '${c}'.`);if(!n.isDirectory()&&f.isDirectory())throw new Error(`Cannot overwrite directory '${d}' with non-directory '${c}'.`)}if(n.isDirectory()&&O(c,d))throw new Error(b(c,d,g));return {srcStat:n,destStat:f}}s(i,"Yn"),l(i,"checkPathsSync");function v(c,d,g,D,n){let f=a.resolve(a.dirname(c)),h=a.resolve(a.dirname(g));if(h===f||h===a.parse(h).root)return n();t.stat(h,{bigint:!0},(w,E)=>w?w.code==="ENOENT"?n():n(w):x(d,E)?n(new Error(b(c,g,D))):v(c,d,h,D,n));}s(v,"St"),l(v,"checkParentPaths");function y(c,d,g,D){let n=a.resolve(a.dirname(c)),f=a.resolve(a.dirname(g));if(f===n||f===a.parse(f).root)return;let h;try{h=t.statSync(f,{bigint:!0});}catch(w){if(w.code==="ENOENT")return;throw w}if(x(d,h))throw new Error(b(c,g,D));return y(c,d,f,D)}s(y,"jt"),l(y,"checkParentPathsSync");function x(c,d){return d.ino&&d.dev&&d.ino===c.ino&&d.dev===c.dev}s(x,"si"),l(x,"areIdentical");function O(c,d){let g=a.resolve(c).split(a.sep).filter(n=>n),D=a.resolve(d).split(a.sep).filter(n=>n);return g.reduce((n,f,h)=>n&&D[h]===f,!0)}s(O,"Bi"),l(O,"isSrcSubdir");function b(c,d,g){return `Cannot ${g} '${c}' to a subdirectory of itself, '${d}'.`}s(b,"Ei"),l(b,"errMsg"),o.exports={checkPaths:p,checkPathsSync:i,checkParentPaths:v,checkParentPathsSync:y,isSrcSubdir:O,areIdentical:x};}),ne=$((e,o)=>{var t=tt(),a=Y("path"),r=it().mkdirs,m=rt().pathExists,u=Lt().utimesMillis,p=st();function i(z,N,j,C){typeof j=="function"&&!C?(C=j,j={}):typeof j=="function"&&(j={filter:j}),C=C||function(){},j=j||{},j.clobber="clobber"in j?!!j.clobber:!0,j.overwrite="overwrite"in j?!!j.overwrite:j.clobber,j.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
19
+
20
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001"),p.checkPaths(z,N,"copy",j,(P,_)=>{if(P)return C(P);let{srcStat:R,destStat:W}=_;p.checkParentPaths(z,R,N,"copy",K=>{if(K)return C(K);y(z,N,j,(Q,ot)=>{if(Q)return C(Q);if(!ot)return C();v(W,z,N,j,C);});});});}s(i,"ia"),l(i,"copy");function v(z,N,j,C,P){let _=a.dirname(j);m(_,(R,W)=>{if(R)return P(R);if(W)return x(z,N,j,C,P);r(_,K=>K?P(K):x(z,N,j,C,P));});}s(v,"ta"),l(v,"checkParentDir");function y(z,N,j,C){if(!j.filter)return C(null,!0);Promise.resolve(j.filter(z,N)).then(P=>C(null,P),P=>C(P));}s(y,"Ft"),l(y,"runFilter");function x(z,N,j,C,P){(C.dereference?t.stat:t.lstat)(N,(_,R)=>_?P(_):R.isDirectory()?w(R,z,N,j,C,P):R.isFile()||R.isCharacterDevice()||R.isBlockDevice()?O(R,z,N,j,C,P):R.isSymbolicLink()?T(z,N,j,C,P):R.isSocket()?P(new Error(`Cannot copy a socket file: ${N}`)):R.isFIFO()?P(new Error(`Cannot copy a FIFO pipe: ${N}`)):P(new Error(`Unknown file: ${N}`)));}s(x,"Gi"),l(x,"getStats");function O(z,N,j,C,P,_){return N?b(z,j,C,P,_):c(z,j,C,P,_)}s(O,"ea"),l(O,"onFile");function b(z,N,j,C,P){if(C.overwrite)t.unlink(j,_=>_?P(_):c(z,N,j,C,P));else return C.errorOnExist?P(new Error(`'${j}' already exists`)):P()}s(b,"na"),l(b,"mayCopyFile");function c(z,N,j,C,P){t.copyFile(N,j,_=>_?P(_):C.preserveTimestamps?d(z.mode,N,j,P):f(j,z.mode,P));}s(c,"zt"),l(c,"copyFile");function d(z,N,j,C){return g(z)?D(j,z,P=>P?C(P):n(z,N,j,C)):n(z,N,j,C)}s(d,"aa"),l(d,"handleTimestampsAndMode");function g(z){return (z&128)===0}s(g,"oa"),l(g,"fileIsNotWritable");function D(z,N,j){return f(z,N|128,j)}s(D,"ra"),l(D,"makeFileWritable");function n(z,N,j,C){h(N,j,P=>P?C(P):f(j,z,C));}s(n,"qt"),l(n,"setDestTimestampsAndMode");function f(z,N,j){return t.chmod(z,N,j)}s(f,"qi"),l(f,"setDestMode");function h(z,N,j){t.stat(z,(C,P)=>C?j(C):u(N,P.atime,P.mtime,j));}s(h,"pa"),l(h,"setDestTimestamps");function w(z,N,j,C,P,_){return N?S(j,C,P,_):E(z.mode,j,C,P,_)}s(w,"ca"),l(w,"onDir");function E(z,N,j,C,P){t.mkdir(j,_=>{if(_)return P(_);S(N,j,C,R=>R?P(R):f(j,z,P));});}s(E,"sa"),l(E,"mkDirAndCopy");function S(z,N,j,C){t.readdir(z,(P,_)=>P?C(P):k(_,z,N,j,C));}s(S,"Ot"),l(S,"copyDir");function k(z,N,j,C,P){let _=z.pop();return _?F(z,_,N,j,C,P):P()}s(k,"Hi"),l(k,"copyDirItems");function F(z,N,j,C,P,_){let R=a.join(j,N),W=a.join(C,N);y(R,W,P,(K,Q)=>{if(K)return _(K);if(!Q)return k(z,j,C,P,_);p.checkPaths(R,W,"copy",P,(ot,ut)=>{if(ot)return _(ot);let{destStat:ft}=ut;x(ft,R,W,P,vt=>vt?_(vt):k(z,j,C,P,_));});});}s(F,"la"),l(F,"copyDirItem");function T(z,N,j,C,P){t.readlink(N,(_,R)=>{if(_)return P(_);if(C.dereference&&(R=a.resolve(process.cwd(),R)),z)t.readlink(j,(W,K)=>W?W.code==="EINVAL"||W.code==="UNKNOWN"?t.symlink(R,j,P):P(W):(C.dereference&&(K=a.resolve(process.cwd(),K)),p.isSrcSubdir(R,K)?P(new Error(`Cannot copy '${R}' to a subdirectory of itself, '${K}'.`)):p.isSrcSubdir(K,R)?P(new Error(`Cannot overwrite '${K}' with '${R}'.`)):L(R,j,P)));else return t.symlink(R,j,P)});}s(T,"ma"),l(T,"onLink");function L(z,N,j){t.unlink(N,C=>C?j(C):t.symlink(z,N,j));}s(L,"da"),l(L,"copyLink"),o.exports=i;}),oe=$((e,o)=>{var t=tt(),a=Y("path"),r=it().mkdirsSync,m=Lt().utimesMillisSync,u=st();function p(S,k,F){typeof F=="function"&&(F={filter:F}),F=F||{},F.clobber="clobber"in F?!!F.clobber:!0,F.overwrite="overwrite"in F?!!F.overwrite:F.clobber,F.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
21
+
22
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:T,destStat:L}=u.checkPathsSync(S,k,"copy",F);if(u.checkParentPathsSync(S,T,k,"copy"),F.filter&&!F.filter(S,k))return;let z=a.dirname(k);return t.existsSync(z)||r(z),i(L,S,k,F)}s(p,"va"),l(p,"copySync");function i(S,k,F,T){let L=(T.dereference?t.statSync:t.lstatSync)(k);if(L.isDirectory())return D(L,S,k,F,T);if(L.isFile()||L.isCharacterDevice()||L.isBlockDevice())return v(L,S,k,F,T);if(L.isSymbolicLink())return w(S,k,F,T);throw L.isSocket()?new Error(`Cannot copy a socket file: ${k}`):L.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${k}`):new Error(`Unknown file: ${k}`)}s(i,"Dt"),l(i,"getStats");function v(S,k,F,T,L){return k?y(S,F,T,L):x(S,F,T,L)}s(v,"xa"),l(v,"onFile");function y(S,k,F,T){if(T.overwrite)return t.unlinkSync(F),x(S,k,F,T);if(T.errorOnExist)throw new Error(`'${F}' already exists`)}s(y,"ha"),l(y,"mayCopyFile");function x(S,k,F,T){return t.copyFileSync(k,F),T.preserveTimestamps&&O(S.mode,k,F),d(F,S.mode)}s(x,"Nt"),l(x,"copyFile");function O(S,k,F){return b(S)&&c(F,S),g(k,F)}s(O,"ga"),l(O,"handleTimestamps");function b(S){return (S&128)===0}s(b,"ya"),l(b,"fileIsNotWritable");function c(S,k){return d(S,k|128)}s(c,"wa"),l(c,"makeFileWritable");function d(S,k){return t.chmodSync(S,k)}s(d,"Ki"),l(d,"setDestMode");function g(S,k){let F=t.statSync(S);return m(k,F.atime,F.mtime)}s(g,"ka"),l(g,"setDestTimestamps");function D(S,k,F,T,L){return k?f(F,T,L):n(S.mode,F,T,L)}s(D,"ba"),l(D,"onDir");function n(S,k,F,T){return t.mkdirSync(F),f(k,F,T),d(F,S)}s(n,"Sa"),l(n,"mkDirAndCopy");function f(S,k,F){t.readdirSync(S).forEach(T=>h(T,S,k,F));}s(f,"Tt"),l(f,"copyDir");function h(S,k,F,T){let L=a.join(k,S),z=a.join(F,S);if(T.filter&&!T.filter(L,z))return;let{destStat:N}=u.checkPathsSync(L,z,"copy",T);return i(N,L,z,T)}s(h,"ja"),l(h,"copyDirItem");function w(S,k,F,T){let L=t.readlinkSync(k);if(T.dereference&&(L=a.resolve(process.cwd(),L)),S){let z;try{z=t.readlinkSync(F);}catch(N){if(N.code==="EINVAL"||N.code==="UNKNOWN")return t.symlinkSync(L,F);throw N}if(T.dereference&&(z=a.resolve(process.cwd(),z)),u.isSrcSubdir(L,z))throw new Error(`Cannot copy '${L}' to a subdirectory of itself, '${z}'.`);if(u.isSrcSubdir(z,L))throw new Error(`Cannot overwrite '${z}' with '${L}'.`);return E(L,F)}else return t.symlinkSync(L,F)}s(w,"Ea"),l(w,"onLink");function E(S,k){return t.unlinkSync(k),t.symlinkSync(S,k)}s(E,"qa"),l(E,"copyLink"),o.exports=p;}),kt=$((e,o)=>{var t=Z().fromCallback;o.exports={copy:t(ne()),copySync:oe()};}),yt=$((e,o)=>{var t=tt(),a=Z().fromCallback;function r(u,p){t.rm(u,{recursive:!0,force:!0},p);}s(r,"Oa"),l(r,"remove");function m(u){t.rmSync(u,{recursive:!0,force:!0});}s(m,"Pa"),l(m,"removeSync"),o.exports={remove:a(r),removeSync:m};}),re=$((e,o)=>{var t=Z().fromPromise,a=ct(),r=Y("path"),m=it(),u=yt(),p=t(l(async function(v){let y;try{y=await a.readdir(v);}catch{return m.mkdirs(v)}return Promise.all(y.map(x=>u.remove(r.join(v,x))))},"emptyDir"));function i(v){let y;try{y=a.readdirSync(v);}catch{return m.mkdirsSync(v)}y.forEach(x=>{x=r.join(v,x),u.removeSync(x);});}s(i,"Wt"),l(i,"emptyDirSync"),o.exports={emptyDirSync:i,emptydirSync:i,emptyDir:p,emptydir:p};}),pe=$((e,o)=>{var t=Z().fromCallback,a=Y("path"),r=tt(),m=it();function u(i,v){function y(){r.writeFile(i,"",x=>{if(x)return v(x);v();});}s(y,"e"),l(y,"makeFile"),r.stat(i,(x,O)=>{if(!x&&O.isFile())return v();let b=a.dirname(i);r.stat(b,(c,d)=>{if(c)return c.code==="ENOENT"?m.mkdirs(b,g=>{if(g)return v(g);y();}):v(c);d.isDirectory()?y():r.readdir(b,g=>{if(g)return v(g)});});});}s(u,"Na"),l(u,"createFile");function p(i){let v;try{v=r.statSync(i);}catch{}if(v&&v.isFile())return;let y=a.dirname(i);try{r.statSync(y).isDirectory()||r.readdirSync(y);}catch(x){if(x&&x.code==="ENOENT")m.mkdirsSync(y);else throw x}r.writeFileSync(i,"");}s(p,"Ta"),l(p,"createFileSync"),o.exports={createFile:t(u),createFileSync:p};}),ce=$((e,o)=>{var t=Z().fromCallback,a=Y("path"),r=tt(),m=it(),u=rt().pathExists,{areIdentical:p}=st();function i(y,x,O){function b(c,d){r.link(c,d,g=>{if(g)return O(g);O(null);});}s(b,"n"),l(b,"makeLink"),r.lstat(x,(c,d)=>{r.lstat(y,(g,D)=>{if(g)return g.message=g.message.replace("lstat","ensureLink"),O(g);if(d&&p(D,d))return O(null);let n=a.dirname(x);u(n,(f,h)=>{if(f)return O(f);if(h)return b(y,x);m.mkdirs(n,w=>{if(w)return O(w);b(y,x);});});});});}s(i,"La"),l(i,"createLink");function v(y,x){let O;try{O=r.lstatSync(x);}catch{}try{let c=r.lstatSync(y);if(O&&p(c,O))return}catch(c){throw c.message=c.message.replace("lstat","ensureLink"),c}let b=a.dirname(x);return r.existsSync(b)||m.mkdirsSync(b),r.linkSync(y,x)}s(v,"Ra"),l(v,"createLinkSync"),o.exports={createLink:t(i),createLinkSync:v};}),se=$((e,o)=>{var t=Y("path"),a=tt(),r=rt().pathExists;function m(p,i,v){if(t.isAbsolute(p))return a.lstat(p,y=>y?(y.message=y.message.replace("lstat","ensureSymlink"),v(y)):v(null,{toCwd:p,toDst:p}));{let y=t.dirname(i),x=t.join(y,p);return r(x,(O,b)=>O?v(O):b?v(null,{toCwd:x,toDst:p}):a.lstat(p,c=>c?(c.message=c.message.replace("lstat","ensureSymlink"),v(c)):v(null,{toCwd:p,toDst:t.relative(y,p)})))}}s(m,"Aa"),l(m,"symlinkPaths");function u(p,i){let v;if(t.isAbsolute(p)){if(v=a.existsSync(p),!v)throw new Error("absolute srcpath does not exist");return {toCwd:p,toDst:p}}else {let y=t.dirname(i),x=t.join(y,p);if(v=a.existsSync(x),v)return {toCwd:x,toDst:p};if(v=a.existsSync(p),!v)throw new Error("relative srcpath does not exist");return {toCwd:p,toDst:t.relative(y,p)}}}s(u,"Wa"),l(u,"symlinkPathsSync"),o.exports={symlinkPaths:m,symlinkPathsSync:u};}),le=$((e,o)=>{var t=tt();function a(m,u,p){if(p=typeof u=="function"?u:p,u=typeof u=="function"?!1:u,u)return p(null,u);t.lstat(m,(i,v)=>{if(i)return p(null,"file");u=v&&v.isDirectory()?"dir":"file",p(null,u);});}s(a,"Ua"),l(a,"symlinkType");function r(m,u){let p;if(u)return u;try{p=t.lstatSync(m);}catch{return "file"}return p&&p.isDirectory()?"dir":"file"}s(r,"Ja"),l(r,"symlinkTypeSync"),o.exports={symlinkType:a,symlinkTypeSync:r};}),de=$((e,o)=>{var t=Z().fromCallback,a=Y("path"),r=ct(),m=it(),u=m.mkdirs,p=m.mkdirsSync,i=se(),v=i.symlinkPaths,y=i.symlinkPathsSync,x=le(),O=x.symlinkType,b=x.symlinkTypeSync,c=rt().pathExists,{areIdentical:d}=st();function g(f,h,w,E){E=typeof w=="function"?w:E,w=typeof w=="function"?!1:w,r.lstat(h,(S,k)=>{!S&&k.isSymbolicLink()?Promise.all([r.stat(f),r.stat(h)]).then(([F,T])=>{if(d(F,T))return E(null);D(f,h,w,E);}):D(f,h,w,E);});}s(g,"Xa"),l(g,"createSymlink");function D(f,h,w,E){v(f,h,(S,k)=>{if(S)return E(S);f=k.toDst,O(k.toCwd,w,(F,T)=>{if(F)return E(F);let L=a.dirname(h);c(L,(z,N)=>{if(z)return E(z);if(N)return r.symlink(f,h,T,E);u(L,j=>{if(j)return E(j);r.symlink(f,h,T,E);});});});});}s(D,"ce"),l(D,"_createSymlink");function n(f,h,w){let E;try{E=r.lstatSync(h);}catch{}if(E&&E.isSymbolicLink()){let F=r.statSync(f),T=r.statSync(h);if(d(F,T))return}let S=y(f,h);f=S.toDst,w=b(S.toCwd,w);let k=a.dirname(h);return r.existsSync(k)||p(k),r.symlinkSync(f,h,w)}s(n,"Za"),l(n,"createSymlinkSync"),o.exports={createSymlink:t(g),createSymlinkSync:n};}),me=$((e,o)=>{var{createFile:t,createFileSync:a}=pe(),{createLink:r,createLinkSync:m}=ce(),{createSymlink:u,createSymlinkSync:p}=de();o.exports={createFile:t,createFileSync:a,ensureFile:t,ensureFileSync:a,createLink:r,createLinkSync:m,ensureLink:r,ensureLinkSync:m,createSymlink:u,createSymlinkSync:p,ensureSymlink:u,ensureSymlinkSync:p};}),St=$((e,o)=>{function t(r,{EOL:m=`
23
+ `,finalEOL:u=!0,replacer:p=null,spaces:i}={}){let v=u?m:"";return JSON.stringify(r,p,i).replace(/\n/g,m)+v}s(t,"io"),l(t,"stringify");function a(r){return Buffer.isBuffer(r)&&(r=r.toString("utf8")),r.replace(/^\uFEFF/,"")}s(a,"to"),l(a,"stripBom"),o.exports={stringify:t,stripBom:a};}),ue=$((e,o)=>{var t;try{t=tt();}catch{t=Y("fs");}var a=Z(),{stringify:r,stripBom:m}=St();async function u(b,c={}){typeof c=="string"&&(c={encoding:c});let d=c.fs||t,g="throws"in c?c.throws:!0,D=await a.fromCallback(d.readFile)(b,c);D=m(D);let n;try{n=JSON.parse(D,c?c.reviver:null);}catch(f){if(g)throw f.message=`${b}: ${f.message}`,f;return null}return n}s(u,"eo"),l(u,"_readFile");var p=a.fromPromise(u);function i(b,c={}){typeof c=="string"&&(c={encoding:c});let d=c.fs||t,g="throws"in c?c.throws:!0;try{let D=d.readFileSync(b,c);return D=m(D),JSON.parse(D,c.reviver)}catch(D){if(g)throw D.message=`${b}: ${D.message}`,D;return null}}s(i,"ao"),l(i,"readFileSync");async function v(b,c,d={}){let g=d.fs||t,D=r(c,d);await a.fromCallback(g.writeFile)(b,D,d);}s(v,"oo"),l(v,"_writeFile");var y=a.fromPromise(v);function x(b,c,d={}){let g=d.fs||t,D=r(c,d);return g.writeFileSync(b,D,d)}s(x,"po"),l(x,"writeFileSync");var O={readFile:p,readFileSync:i,writeFile:y,writeFileSync:x};o.exports=O;}),fe=$((e,o)=>{var t=ue();o.exports={readJson:t.readFile,readJsonSync:t.readFileSync,writeJson:t.writeFile,writeJsonSync:t.writeFileSync};}),jt=$((e,o)=>{var t=Z().fromCallback,a=tt(),r=Y("path"),m=it(),u=rt().pathExists;function p(v,y,x,O){typeof x=="function"&&(O=x,x="utf8");let b=r.dirname(v);u(b,(c,d)=>{if(c)return O(c);if(d)return a.writeFile(v,y,x,O);m.mkdirs(b,g=>{if(g)return O(g);a.writeFile(v,y,x,O);});});}s(p,"mo"),l(p,"outputFile");function i(v,...y){let x=r.dirname(v);if(a.existsSync(x))return a.writeFileSync(v,...y);m.mkdirsSync(x),a.writeFileSync(v,...y);}s(i,"uo"),l(i,"outputFileSync"),o.exports={outputFile:t(p),outputFileSync:i};}),ve=$((e,o)=>{var{stringify:t}=St(),{outputFile:a}=jt();async function r(m,u,p={}){let i=t(u,p);await a(m,i,p);}s(r,"xo"),l(r,"outputJson"),o.exports=r;}),xe=$((e,o)=>{var{stringify:t}=St(),{outputFileSync:a}=jt();function r(m,u,p){let i=t(u,p);a(m,i,p);}s(r,"yo"),l(r,"outputJsonSync"),o.exports=r;}),he=$((e,o)=>{var t=Z().fromPromise,a=fe();a.outputJson=t(ve()),a.outputJsonSync=xe(),a.outputJSON=a.outputJson,a.outputJSONSync=a.outputJsonSync,a.writeJSON=a.writeJson,a.writeJSONSync=a.writeJsonSync,a.readJSON=a.readJson,a.readJSONSync=a.readJsonSync,o.exports=a;}),ye=$((e,o)=>{var t=tt(),a=Y("path"),r=kt().copy,m=yt().remove,u=it().mkdirp,p=rt().pathExists,i=st();function v(c,d,g,D){typeof g=="function"&&(D=g,g={}),g=g||{};let n=g.overwrite||g.clobber||!1;i.checkPaths(c,d,"move",g,(f,h)=>{if(f)return D(f);let{srcStat:w,isChangingCase:E=!1}=h;i.checkParentPaths(c,w,d,"move",S=>{if(S)return D(S);if(y(d))return x(c,d,n,E,D);u(a.dirname(d),k=>k?D(k):x(c,d,n,E,D));});});}s(v,"Eo"),l(v,"move");function y(c){let d=a.dirname(c);return a.parse(d).root===d}s(y,"qo"),l(y,"isParentRoot");function x(c,d,g,D,n){if(D)return O(c,d,g,n);if(g)return m(d,f=>f?n(f):O(c,d,g,n));p(d,(f,h)=>f?n(f):h?n(new Error("dest already exists.")):O(c,d,g,n));}s(x,"We"),l(x,"doRename");function O(c,d,g,D){t.rename(c,d,n=>n?n.code!=="EXDEV"?D(n):b(c,d,g,D):D());}s(O,"Vi"),l(O,"rename");function b(c,d,g,D){r(c,d,{overwrite:g,errorOnExist:!0,preserveTimestamps:!0},n=>n?D(n):m(c,D));}s(b,"Fo"),l(b,"moveAcrossDevice"),o.exports=v;}),ge=$((e,o)=>{var t=tt(),a=Y("path"),r=kt().copySync,m=yt().removeSync,u=it().mkdirpSync,p=st();function i(b,c,d){d=d||{};let g=d.overwrite||d.clobber||!1,{srcStat:D,isChangingCase:n=!1}=p.checkPathsSync(b,c,"move",d);return p.checkParentPathsSync(b,D,c,"move"),v(c)||u(a.dirname(c)),y(b,c,g,n)}s(i,"Po"),l(i,"moveSync");function v(b){let c=a.dirname(b);return a.parse(c).root===c}s(v,"Co"),l(v,"isParentRoot");function y(b,c,d,g){if(g)return x(b,c,d);if(d)return m(c),x(b,c,d);if(t.existsSync(c))throw new Error("dest already exists.");return x(b,c,d)}s(y,"Do"),l(y,"doRename");function x(b,c,d){try{t.renameSync(b,c);}catch(g){if(g.code!=="EXDEV")throw g;return O(b,c,d)}}s(x,"Qi"),l(x,"rename");function O(b,c,d){return r(b,c,{overwrite:d,errorOnExist:!0,preserveTimestamps:!0}),m(b)}s(O,"No"),l(O,"moveAcrossDevice"),o.exports=i;}),we=$((e,o)=>{var t=Z().fromCallback;o.exports={move:t(ye()),moveSync:ge()};}),be=$((e,o)=>{o.exports={...ct(),...kt(),...re(),...me(),...he(),...it(),...we(),...jt(),...rt(),...yt()};}),ke=$((e,o)=>{function t(){this._types=Object.create(null),this._extensions=Object.create(null);for(let a=0;a<arguments.length;a++)this.define(arguments[a]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this);}s(t,"Di"),l(t,"Mime"),t.prototype.define=function(a,r){for(let m in a){let u=a[m].map(function(p){return p.toLowerCase()});m=m.toLowerCase();for(let p=0;p<u.length;p++){let i=u[p];if(i[0]!=="*"){if(!r&&i in this._types)throw new Error('Attempt to change mapping for "'+i+'" extension from "'+this._types[i]+'" to "'+m+'". Pass `force=true` to allow this, otherwise remove "'+i+'" from the list of extensions for "'+m+'".');this._types[i]=m;}}if(r||!this._extensions[m]){let p=u[0];this._extensions[m]=p[0]!=="*"?p:p.substr(1);}}},t.prototype.getType=function(a){a=String(a);let r=a.replace(/^.*[/\\]/,"").toLowerCase(),m=r.replace(/^.*\./,"").toLowerCase(),u=r.length<a.length;return (m.length<r.length-1||!u)&&this._types[m]||null},t.prototype.getExtension=function(a){return a=/^\s*([^;\s]*)/.test(a)&&RegExp.$1,a&&this._extensions[a.toLowerCase()]||null},o.exports=t;}),Se=$((e,o)=>{o.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};}),je=$((e,o)=>{o.exports={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};}),Ee=$((e,o)=>{var t=ke();o.exports=new t(Se(),je());}),Fe=$(e=>{var o=/\s*([^,]\S*[^,](?:\s+[^,]+)?)\s*(?:,|$)/,t=l((p,i,v)=>{if(p[v]=p[v]||{},p[v][i])throw new Error(`No more than one image candidate is allowed for a given descriptor: ${i}${v}`);p[v][i]=!0;},"duplicateDescriptorCheck"),a=l(p=>{if(p.fallback)throw new Error("Only one fallback image candidate is allowed");if(p.x[1])throw new Error("A fallback image is equivalent to a 1x descriptor, providing both is invalid.");p.fallback=!0;},"fallbackDescriptorDuplicateCheck"),r=l((p,i)=>{if(i.length===0)a(p);else if(i.length>1)throw new Error(`Image candidate may have no more than one descriptor, found ${i.length}: ${i.join(" ")}`)},"descriptorCountCheck"),m=l((p,i,v)=>{if(Number.isNaN(p))throw new TypeError(`${v||p} is not a valid number`);switch(i){case"w":{if(p<=0)throw new Error("Width descriptor must be greater than zero");if(!Number.isInteger(p))throw new TypeError("Width descriptor must be an integer");break}case"x":{if(p<=0)throw new Error("Pixel density descriptor must be greater than zero");break}case"h":throw new Error("Height descriptor is no longer allowed");default:throw new Error(`Invalid srcset descriptor: ${v}`)}},"validDescriptorCheck");e.parse=(p,{strict:i=!1}={})=>{let v=i?{}:void 0;return p.split(o).filter((y,x)=>x%2===1).map(y=>{let[x,...O]=y.trim().split(/\s+/),b={url:x};i&&r(v,O);for(let c of O){let d=c[c.length-1],g=Number.parseFloat(c.slice(0,-1));switch(i&&(m(g,d,c),t(v,g,d)),d){case"w":{b.width=g;break}case"h":{b.height=g;break}case"x":{b.density=g;break}}}return b})};var u=new Set(["width","height","density"]);e.stringify=(p,{strict:i=!1}={})=>{let v=i?{}:null;return p.map(y=>{if(!y.url){if(i)throw new Error("URL is required");return ""}let x=Object.keys(y).filter(b=>u.has(b));i&&r(v,x);let O=[y.url];for(let b of x){let c=y[b],d;switch(b){case"width":{d="w";break}case"height":{d="h";break}case"density":{d="x";break}}let g=`${c}${d}`;i&&(m(c,d),t(v,c,d)),O.push(g);}return O.join(" ")}).join(", ")};}),et=process.env.LOG?console:{log:(...e)=>{},warn:(...e)=>{}},Et=s(class{constructor(e,o){nt(this,"archive",{}),nt(this,"client"),nt(this,"assetDomains"),nt(this,"firstUrl"),this.client=e,this.assetDomains=(o||[]).map(t=>`https://${t}`);}async watch(){this.client.on("Fetch.requestPaused",this.requestPaused.bind(this)),await this.client.send("Fetch.enable");}async clientSend(e,o,t){try{return await this.client.send(o,t)}catch(a){return et.log("Client error",e.url,a),this.archive[e.url]={error:a},null}}async requestPaused({requestId:e,request:o,responseStatusCode:t,responseStatusText:a,responseErrorReason:r,responseHeaders:m}){if(!o.method.match(/get/i)){await this.clientSend(o,"Fetch.continueRequest",{requestId:e});return}if(t===304){await this.clientSend(o,"Fetch.continueRequest",{requestId:e});return}let u=new URL(o.url);this.firstUrl??(this.firstUrl=u);let p=u.origin===this.firstUrl.origin||this.assetDomains.includes(u.origin);if(et.log("requestPaused",u.toString(),t||r?"response":"request",this.firstUrl.toString(),p),r){et.log(`Got response error: ${r}`),await this.clientSend(o,"Fetch.continueRequest",{requestId:e});return}if(t){if([301,302,307,308].includes(t)){await this.clientSend(o,"Fetch.continueRequest",{requestId:e,interceptResponse:!0});return}let i=await this.clientSend(o,"Fetch.getResponseBody",{requestId:e});if(i===null)return;let{body:v,base64Encoded:y}=i,x=m.find(({name:b})=>b.toLowerCase()==="content-type"),O=u.toString()===this.firstUrl.toString();p&&!O&&(this.archive[o.url]={statusCode:t,statusText:a,body:Buffer.from(v,y?"base64":"utf8"),contentType:x?.value}),await this.clientSend(o,"Fetch.continueRequest",{requestId:e});return}await this.clientSend(o,"Fetch.continueRequest",{requestId:e,interceptResponse:!0});}},"_i");l(Et,"Watcher");var lt=bt(be()),Oe=bt(Ee()),qt=s(class{constructor(e,o,t){nt(this,"url"),nt(this,"response"),nt(this,"shortenedFileNameLength"),nt(this,"pageUrl"),this.url=new URL(e),this.response=o,this.shortenedFileNameLength=250,this.pageUrl=new URL(t);}originalSrc(){return this.url.toString()}toFileSystemPath(){let e=this.url.pathname;return e=this.preserveExternalDomain(this.url),e=this.ensureNonDirectory(e),e=this.encodeQueryString(e),e=this.truncateFileName(e),e=this.removeSpecialChars(e),e=this.addExtension(e),e}ensureNonDirectory(e){return e.endsWith("/")?`${e}index.html`:e}encodeQueryString(e){let o=this.url.search;if(!o)return e;let t=this.hash(o);return `${e}-${t}`}truncateFileName(e){let o=e.split("/"),t=[];return o.forEach((a,r)=>{let m=a;a.length>this.shortenedFileNameLength&&(m=a.substring(0,this.shortenedFileNameLength),et.log(`Chunk of filename '${a}' is too long. Shortening to '${m}'`)),t.push(m);}),`${e.startsWith("/")?"/":""}${wt__default.default.join(...t)}`}removeSpecialChars(e){return e.replace(/[%]/g,"")}addExtension(e){if("error"in this.response||!this.response.contentType)return e;let o=e;if(!wt__default.default.extname(o)){let t=Oe.default.getExtension(this.response.contentType);t&&(o=`${e}.${t}`);}return o}preserveExternalDomain(e){return e.origin===this.pageUrl.origin?e.pathname:`/${encodeURIComponent(e.host)}/${e.pathname}`}hash(e){return crypto.createHash("md5").update(e).digest("hex")}},"hi");l(qt,"ArchiveFile");var De=bt(Fe()),ze=/url\((?!['"]?(?:data):)['"]?([^'")]*)['"]?\)/gi,_t=s(class{constructor(e){if(nt(this,"snapshot"),Buffer.isBuffer(e)){let o=e.toString("utf-8");this.snapshot=JSON.parse(o);}else this.snapshot=JSON.parse(e);}async mapAssetPaths(e){let o=await this.mapNode(this.snapshot,e);return JSON.stringify(o)}async mapNode(e,o){return e=this.mapNodeAttributes(e,o),e=this.mapTextElement(e,o),"childNodes"in e&&(e.childNodes=await Promise.all(e.childNodes.map(async t=>this.mapNode(t,o)))),e}mapNodeAttributes(e,o){if(e.type===rrwebSnapshot.NodeType.Element){if(e.attributes.src){let t=e.attributes.src;o.has(t)&&(e.attributes.src=o.get(t));}if(e.attributes.style){let t=e.attributes.style,a=this.mapCssUrls(t,o);e.attributes.style=a;}if(e.attributes._cssText){let t=e.attributes._cssText,a=this.mapCssUrls(t,o);e.attributes._cssText=a;}if(e.tagName==="link"&&e.attributes.href){let t=e.attributes.href;o.has(t)&&(e.attributes.href=o.get(t));}if(e.tagName==="img"&&e.attributes.srcset){let t=e.attributes.srcset,a=this.mapSrcsetUrls(t,o);a&&(e.attributes.src=a,delete e.attributes.srcset,delete e.attributes.sizes);}}return e}mapTextElement(e,o){if(e.type===rrwebSnapshot.NodeType.Text&&e.isStyle&&e.textContent){let t=this.mapCssUrls(e.textContent,o);e.textContent=t;}return e}mapCssUrls(e,o){return e.replace(ze,(t,a)=>{let r=t;return o.has(a)&&(r=t.replace(a,o.get(a))),r})}mapSrcsetUrls(e,o){let t=De.default.parse(e),a;return t.forEach(r=>{o.has(r.url)&&(a=o.get(r.url));}),a}},"gi");l(_t,"DOMSnapshot");var dt=l(e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),"sanitize");async function Ft(e,o,t,a){let{title:r,outputDir:m,pageUrl:u}=e,p=wt.join(m,"..","chromatic-archives"),i=wt.join(p,"archive");await(0, lt.ensureDir)(p),et.log(`Writing test results for "${r}"`);let v=new Map;await Promise.all(Object.entries(t).map(async([x,O])=>{if("error"in O)return;let b=new qt(x,O,u),c=b.originalSrc(),d=b.toFileSystemPath();c!==d&&v.set(c,d),await(0, lt.outputFile)(wt.join(i,d),O.body);})),await Promise.all(await Object.entries(o).map(async([x,O])=>{let b=await new _t(O).mapAssetPaths(v);await(0, lt.outputFile)(wt.join(i,`${dt(r)}-${dt(x)}.snapshot.json`),b);})),await $t(wt.join(p,`${dt(r)}.stories.json`),r,o,a);let y=Object.entries(t).filter(([,x])=>"error"in x);y.length>0&&(et.log(`Encountered ${y.length} errors archiving resources, writing to 'errors.json'`),await(0, lt.outputJson)(wt.join(i,"errors.json"),{errors:Object.fromEntries(y)}));}s(Ft,"qp");l(Ft,"writeTestResult");async function $t(e,o,t,a){et.log(`Writing ${e}`),await(0, lt.outputJson)(e,{title:o,stories:Object.keys(t).map(r=>({name:r,parameters:{server:{id:`${dt(o)}-${dt(r)}.snapshot.json`},chromatic:{...a}}}))});}s($t,"Wo");l($t,"writeStoriesFile");var Pe=new analyticsNode.Analytics({writeKey:process.env.SEGMENT_WRITE_KEY||"cwWhBWso2gwzyenW29CnCp30Kjz4DogE"}),Ce="@chromaui/test-archiver run";function Ot(e,o){Pe.track({userId:Ce,event:e,properties:o});}s(Ot,"yn");l(Ot,"track");var Nt=!1;function Dt(e={}){Nt||(Ot("run",e),Nt=!0);}s(Dt,"Pp");l(Dt,"trackRun");var Tt=!1;function zt(e={}){Tt||(Ot("complete",e),Tt=!0);}s(zt,"Cp");l(zt,"trackComplete");var mt=1e4,{CHROMATIC_ARCHIVE_LOCATION:Ne="test-results"}=process.env;function Rt(){return process.cwd()}s(Rt,"Ko");l(Rt,"rootDir");function It(){return wt__default.default.resolve(Rt(),Ne,"chromatic-archives")}s(It,"Vo");l(It,"archivesDir");function Te(){let e=It();if(!Bt__default.default.existsSync(e))throw new Error(`Chromatic archives directory cannot be found: ${e}
24
+
25
+ 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.`)}s(Te,"Rp");l(Te,"checkArchivesDirExists");var _e=Bt.readFileSync(at.resolve("rrweb-snapshot/dist/rrweb-snapshot.js"),"utf8"),gt="application/rrweb.snapshot+json";async function Pt(e,o,t){let a,r;if(typeof o=="string"){if(!t)throw new Error("Incorrect usage");r=t,a=o;}else r=o,a=`Snapshot #${r.attachments.filter(p=>p.contentType===gt).length+1}`;e.on("console",u=>{et.log(`CONSOLE: "${u.text()}"`);});let m=await e.evaluate(qe__default.default`
26
+ ${_e};
27
+ rrwebSnapshot.snapshot(document);
28
+ `);r.attach(a,{contentType:gt,body:JSON.stringify(m)});}s(Pt,"takeSnapshot");var $e=s(async(e,o=mt)=>{let t=null,a=null,r=new Promise(u=>{a=u,t=setTimeout(()=>{et.warn(`Global timeout of ${o}ms reached`),a();},o);}),m=e.waitForLoadState("networkidle").finally(()=>{clearTimeout(t);});await Promise.race([r,m]);},"idle"),At=s(async({page:e,networkTimeout:o,assetDomains:t})=>{let a=await e.context().newCDPSession(e),r=new Et(a,t);return await r.watch(),async()=>(await $e(e,o??mt),r.archive)},"createResourceArchive");var Ut=s(e=>e.extend({delay:[void 0,{option:!0}],diffIncludeAntiAliasing:[void 0,{option:!0}],diffThreshold:[void 0,{option:!0}],disableAutoSnapshot:[!1,{option:!0}],forcedColors:[void 0,{option:!0}],pauseAnimationAtEnd:[void 0,{option:!0}],prefersReducedMotion:[void 0,{option:!0}],resourceArchiveTimeout:[mt,{option:!0}],assetDomains:[[],{option:!0}],save:[async({page:o,delay:t,diffIncludeAntiAliasing:a,diffThreshold:r,disableAutoSnapshot:m,forcedColors:u,pauseAnimationAtEnd:p,prefersReducedMotion:i,resourceArchiveTimeout:v,assetDomains:y},x,O)=>{if(Dt(),o.context().browser().browserType().name()!=="chromium"){await x();return}let b=await At({page:o,networkTimeout:v,assetDomains:y});await x(),m||await Pt(o,O);let c=await b(),d=Object.fromEntries(O.attachments.filter(D=>D.contentType===gt&&!!D.body).map(({name:D,body:n})=>[D,n])),g={...t&&{delay:t},...a&&{diffIncludeAntiAliasing:a},...r&&{diffThreshold:r},...u&&{forcedColors:u},...p&&{pauseAnimationAtEnd:p},...i&&{prefersReducedMotion:i},viewports:[o.viewportSize().width]};await Ft({...O,pageUrl:o.url()},d,c,g),zt();},{auto:!0}]}),"makeTest");var ui=Ut(test.test);
29
+
30
+ Object.defineProperty(exports, 'expect', {
31
+ enumerable: true,
32
+ get: function () { return test.expect; }
33
+ });
34
+ exports.takeSnapshot = Pt;
35
+ exports.test = ui;
36
+ //# sourceMappingURL=out.js.map
37
+ //# sourceMappingURL=index.js.map