@dypnb/dev-tools 1.0.8 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/genPage/index.browser.js +10051 -20
- package/dist/genPage/index.cjs +10101 -0
- package/dist/genPage/index.mjs +10098 -0
- package/dist/genSwagger/index.browser.js +9531 -20
- package/dist/genSwagger/index.cjs +9582 -0
- package/dist/genSwagger/index.mjs +9579 -0
- package/dist/publishServer/index.browser.js +78046 -22
- package/dist/publishServer/index.cjs +78106 -0
- package/dist/publishServer/index.mjs +78104 -0
- package/dist/wxServerNotice/index.browser.js +27698 -22
- package/dist/wxServerNotice/index.cjs +27757 -0
- package/dist/wxServerNotice/index.mjs +27755 -0
- package/package.json +5 -4
- package/src/publish-server/index.mjs +130 -0
- package/src/utils/index.js +28 -31
- package/dist/genPage/index.cjs.js +0 -63
- package/dist/genPage/index.esm.js +0 -63
- package/dist/genSwagger/index.cjs.js +0 -63
- package/dist/genSwagger/index.esm.js +0 -63
- package/dist/publishServer/index.cjs.js +0 -67
- package/dist/publishServer/index.esm.js +0 -67
- package/dist/wxServerNotice/index.cjs.js +0 -70
- package/dist/wxServerNotice/index.esm.js +0 -70
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dypnb/dev-tools",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.10",
|
4
4
|
"description": "开发时的提效工具",
|
5
5
|
"main": "lib/bundle.cjs.js",
|
6
6
|
"jsnext:main": "lib/bundle.esm.js",
|
@@ -16,11 +16,12 @@
|
|
16
16
|
"genPage": "node ./dist/genPage/index.esm.js",
|
17
17
|
"docs:dev": "vitepress dev docs --host ",
|
18
18
|
"docs:build": "vitepress build docs",
|
19
|
-
"docs:preview": "vitepress preview docs"
|
20
|
-
"publishD": "dyp-publish"
|
19
|
+
"docs:preview": "vitepress preview docs"
|
21
20
|
},
|
22
21
|
"bin": {
|
23
|
-
"dyp-publish": "
|
22
|
+
"dyp-publish": "dist/publishServer/index.cjs",
|
23
|
+
"dyp-genSwagger": "dist/genSwagger/index.cjs",
|
24
|
+
"dyp-genPage": "dist/genPage/index.cjs"
|
24
25
|
},
|
25
26
|
"dependencies": {
|
26
27
|
"@dypnb/dev-tools": "^1.0.5",
|
@@ -0,0 +1,130 @@
|
|
1
|
+
#! /usr/bin/env node
|
2
|
+
|
3
|
+
// scp2 : https://www.npmjs.com/package/
|
4
|
+
// 引入scp2
|
5
|
+
import client from "scp2";
|
6
|
+
import ora from "ora";
|
7
|
+
import moment from "moment";
|
8
|
+
import { getGlobalConfig, getGitInfo, errorLog, magentaLog, log, warningLog, successLog, cyanLog } from "../utils/index.js";
|
9
|
+
import { wxNotify } from "../wx-server-notice/index.js";
|
10
|
+
import pkg from 'ssh2';
|
11
|
+
const { Client } = pkg;
|
12
|
+
|
13
|
+
moment.locale('zh-cn');
|
14
|
+
|
15
|
+
async function getUploadServeConfig() {
|
16
|
+
return await getGlobalConfig();
|
17
|
+
}
|
18
|
+
|
19
|
+
getUploadServeConfig().then(res => {
|
20
|
+
const uploadServeConfig = res['uploadServeConfig'];
|
21
|
+
const wxServerConfig = res['wxServerConfig'];
|
22
|
+
|
23
|
+
const isProduction = process.env.VUE_APP_PACK_ENV === "pro"; // 是否是生产环境
|
24
|
+
|
25
|
+
const lineVersion = process.env.VUE_APP_LINE_VERSION; //线上环境版本(多个显示环境可使用此字段区分)
|
26
|
+
|
27
|
+
const isNewPro = isProduction && +lineVersion === 2; // 是否是新的线上版本
|
28
|
+
|
29
|
+
const host = !isNewPro ? uploadServeConfig.host[0] : uploadServeConfig.host[1];
|
30
|
+
|
31
|
+
const staticPath = !isProduction ? uploadServeConfig.staticPath.dev : uploadServeConfig.staticPath.pro;
|
32
|
+
|
33
|
+
const onlinePath = `${uploadServeConfig.protocol}://${host}/${staticPath}`
|
34
|
+
|
35
|
+
const gitInfo = getGitInfo();
|
36
|
+
|
37
|
+
const server = {
|
38
|
+
host, // 服务器ip
|
39
|
+
port: "22", // 端口一般默认22
|
40
|
+
locaPath: `${process.env.PWD}${uploadServeConfig.locaPath}`, // 本地打包文件的位置
|
41
|
+
...uploadServeConfig.serverOption,
|
42
|
+
pathNmae: `${uploadServeConfig.serverOption.pathNmae}${staticPath}` // 上传到服务器的位置
|
43
|
+
};
|
44
|
+
|
45
|
+
const packInfo = {
|
46
|
+
...(uploadServeConfig.baseInfo || {}),
|
47
|
+
serverPath: server.pathNmae
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
function wxMsg(status) {
|
52
|
+
return `<div class="gray">${moment().format('lll')}</div><div class="highlight">${uploadServeConfig.projectTitle}${isProduction ? "生产" : "开发"}环境发布${status}</div><div class="normal">commitId:${gitInfo.commitId}</div><div class="normal">commitMsg:${gitInfo.commitMsg}</div><div class="normal">访问地址:${onlinePath}</div>`
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
cyanLog("本次打包信息 =>", packInfo);
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
const spinner = ora(
|
61
|
+
"正在发布到" + (isProduction ? "生产" : "开发") + "服务器..."
|
62
|
+
);
|
63
|
+
|
64
|
+
// 创建shell脚本
|
65
|
+
const conn = new Client();
|
66
|
+
|
67
|
+
magentaLog("正在建立连接");
|
68
|
+
|
69
|
+
conn
|
70
|
+
.on("ready", function() {
|
71
|
+
log("已连接");
|
72
|
+
if (!server.pathNmae) {
|
73
|
+
log("连接已关闭");
|
74
|
+
conn.end();
|
75
|
+
return false;
|
76
|
+
}
|
77
|
+
// 这里我拼接了放置服务器资源目录的位置 ,首选通过rm -rf删除了这个目录下的文件
|
78
|
+
conn.exec("rm -rf " + server.pathNmae + "/*", function(err, stream) {
|
79
|
+
warningLog("已删除服务端文件")
|
80
|
+
stream.on("close", function(code, signal) {
|
81
|
+
log("开始上传");
|
82
|
+
spinner.start();
|
83
|
+
client.scp(
|
84
|
+
server.locaPath,
|
85
|
+
{
|
86
|
+
host: server.host,
|
87
|
+
port: server.port,
|
88
|
+
username: server.username,
|
89
|
+
password: server.password,
|
90
|
+
path: server.pathNmae
|
91
|
+
},
|
92
|
+
err => {
|
93
|
+
spinner.stop();
|
94
|
+
if (!err) {
|
95
|
+
successLog("Success! 成功发布到" + (isProduction ? "生产" : "开发") + "服务器!", `访问地址====>${onlinePath}`)
|
96
|
+
wxNotify({
|
97
|
+
msgtype: "textcard",
|
98
|
+
textcard: {
|
99
|
+
title: "发布成功",
|
100
|
+
description: wxMsg('成功'),
|
101
|
+
url: onlinePath,
|
102
|
+
btntxt: "更多"
|
103
|
+
}
|
104
|
+
}, wxServerConfig);
|
105
|
+
} else {
|
106
|
+
errorLog("发布失败.\n", err);
|
107
|
+
wxNotify({
|
108
|
+
msgtype: "textcard",
|
109
|
+
textcard: {
|
110
|
+
title: "发布失败",
|
111
|
+
description: wxMsg('失败'),
|
112
|
+
url: onlinePath,
|
113
|
+
btntxt: "更多"
|
114
|
+
}
|
115
|
+
}, wxServerConfig);
|
116
|
+
}
|
117
|
+
conn.end(); // 结束命令
|
118
|
+
}
|
119
|
+
);
|
120
|
+
});
|
121
|
+
});
|
122
|
+
})
|
123
|
+
.connect({
|
124
|
+
host: server.host,
|
125
|
+
port: server.port,
|
126
|
+
username: server.username,
|
127
|
+
password: server.password
|
128
|
+
//privateKey: '' //使用 私钥密钥登录 目前测试服务器不需要用到
|
129
|
+
});
|
130
|
+
})
|
package/src/utils/index.js
CHANGED
@@ -3,67 +3,65 @@ import chalk from "chalk";
|
|
3
3
|
import execa from "execa";
|
4
4
|
|
5
5
|
// 最新 node 核心包的导入写法
|
6
|
-
import { fileURLToPath } from
|
7
|
-
import { dirname } from
|
6
|
+
import { fileURLToPath } from "node:url";
|
7
|
+
import { dirname } from "node:path";
|
8
|
+
|
8
9
|
|
9
10
|
export async function getGlobalConfig(type) {
|
10
|
-
const name = findup(
|
11
|
+
const name = findup("dyp.config.js", { cwd: process.env.PWD });
|
11
12
|
const dypConfig = await import(name);
|
12
13
|
if (type) {
|
13
|
-
return dypConfig[
|
14
|
+
return dypConfig["default"][type];
|
14
15
|
}
|
15
|
-
return dypConfig[
|
16
|
+
return dypConfig["default"];
|
16
17
|
}
|
17
18
|
|
18
19
|
// 首字母大写
|
19
|
-
export
|
20
|
-
return str.toLowerCase().replace(/( |^)[a-z]/g, (L) => L.toUpperCase());
|
20
|
+
export function strCase(str) {
|
21
|
+
return str.toLowerCase().replace(/( |^)[a-z]/g, (L) => L.toUpperCase());
|
21
22
|
}
|
22
23
|
|
23
24
|
// 获取文件名
|
24
|
-
export
|
25
|
+
export function getFilename() {
|
25
26
|
return fileURLToPath(import.meta.url);
|
26
27
|
}
|
27
28
|
|
28
29
|
// 获取根路径
|
29
|
-
export
|
30
|
-
return dirname(fileURLToPath(import.meta.url))
|
30
|
+
export function getDirname() {
|
31
|
+
return dirname(fileURLToPath(import.meta.url));
|
31
32
|
}
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
return chalkLog('blue', mainMsg, laterMsg);
|
34
|
+
export function log(mainMsg, laterMsg) {
|
35
|
+
return chalkLog("blue", mainMsg, laterMsg);
|
36
36
|
}
|
37
37
|
|
38
|
-
export function cyanLog(mainMsg, laterMsg =
|
39
|
-
return chalkLog(
|
38
|
+
export function cyanLog(mainMsg, laterMsg = "") {
|
39
|
+
return chalkLog("cyan", mainMsg, laterMsg);
|
40
40
|
}
|
41
41
|
|
42
|
-
export function magentaLog(mainMsg, laterMsg =
|
43
|
-
return chalkLog(
|
42
|
+
export function magentaLog(mainMsg, laterMsg = "") {
|
43
|
+
return chalkLog("magenta", mainMsg, laterMsg);
|
44
44
|
}
|
45
45
|
|
46
|
-
export function successLog(mainMsg, laterMsg =
|
47
|
-
return chalkLog(
|
46
|
+
export function successLog(mainMsg, laterMsg = "") {
|
47
|
+
return chalkLog("green", mainMsg, laterMsg);
|
48
48
|
}
|
49
49
|
|
50
|
-
export function warningLog(mainMsg, laterMsg =
|
51
|
-
return chalkLog(
|
50
|
+
export function warningLog(mainMsg, laterMsg = "") {
|
51
|
+
return chalkLog("yellow", mainMsg, laterMsg);
|
52
52
|
}
|
53
53
|
|
54
|
-
export
|
55
|
-
return chalkLog(
|
54
|
+
export function errorLog(mainMsg, laterMsg = "") {
|
55
|
+
return chalkLog("red", mainMsg, laterMsg);
|
56
56
|
}
|
57
57
|
|
58
|
-
export function chalkLog(chalkType, mainMsg, laterMsg =
|
58
|
+
export function chalkLog(chalkType, mainMsg, laterMsg = "") {
|
59
59
|
if (!laterMsg) {
|
60
60
|
return console.log(chalk[chalkType](`${mainMsg}`));
|
61
61
|
}
|
62
62
|
return console.log(chalk[chalkType](`${mainMsg}`), laterMsg);
|
63
|
-
|
64
63
|
}
|
65
64
|
|
66
|
-
|
67
65
|
/**
|
68
66
|
* 获取最新 commit 提交信息
|
69
67
|
* git 获取提交信息参考:https://www.cnblogs.com/ruiy/p/15904295.html
|
@@ -71,15 +69,14 @@ export function chalkLog(chalkType, mainMsg, laterMsg = '') {
|
|
71
69
|
*/
|
72
70
|
|
73
71
|
export function getGitInfo() {
|
74
|
-
const shortCommid = execa.commandSync(
|
72
|
+
const shortCommid = execa.commandSync("git rev-parse --short HEAD");
|
75
73
|
|
76
|
-
const gitComMsg = `git log --pretty=format:“%s” ${shortCommid.stdout} -1
|
74
|
+
const gitComMsg = `git log --pretty=format:“%s” ${shortCommid.stdout} -1`;
|
77
75
|
|
78
76
|
const { stdout, stderr } = execa.commandSync(gitComMsg);
|
79
77
|
|
80
78
|
return {
|
81
79
|
commitId: shortCommid.stdout,
|
82
|
-
commitMsg: stdout
|
83
|
-
}
|
80
|
+
commitMsg: stdout,
|
81
|
+
};
|
84
82
|
}
|
85
|
-
|
@@ -1,63 +0,0 @@
|
|
1
|
-
"use strict";var e=require("path"),t=require("fs"),n=require("os"),r=require("util"),o=require("tty"),s=require("child_process"),a=require("assert"),i=require("events"),l=require("buffer"),c=require("stream"),u=require("node:url"),p=require("node:path"),f="undefined"!=typeof document?document.currentScript:null,d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}
|
2
|
-
/*!
|
3
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
4
|
-
*
|
5
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
6
|
-
* Licensed under the MIT License.
|
7
|
-
*/var g,m,y,b,v=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1},A={"{":"}","(":")","[":"]"},E=function(e){if("!"===e[0])return!0;for(var t=0,n=-2,r=-2,o=-2,s=-2,a=-2;t<e.length;){if("*"===e[t])return!0;if("?"===e[t+1]&&/[\].+)]/.test(e[t]))return!0;if(-1!==r&&"["===e[t]&&"]"!==e[t+1]&&(r<t&&(r=e.indexOf("]",t)),r>t)){if(-1===a||a>r)return!0;if(-1===(a=e.indexOf("\\",t))||a>r)return!0}if(-1!==o&&"{"===e[t]&&"}"!==e[t+1]&&(o=e.indexOf("}",t))>t&&(-1===(a=e.indexOf("\\",t))||a>o))return!0;if(-1!==s&&"("===e[t]&&"?"===e[t+1]&&/[:!=]/.test(e[t+2])&&")"!==e[t+3]&&(s=e.indexOf(")",t))>t&&(-1===(a=e.indexOf("\\",t))||a>s))return!0;if(-1!==n&&"("===e[t]&&"|"!==e[t+1]&&(n<t&&(n=e.indexOf("|",t)),-1!==n&&")"!==e[n+1]&&(s=e.indexOf(")",n))>n&&(-1===(a=e.indexOf("\\",n))||a>s)))return!0;if("\\"===e[t]){var i=e[t+1];t+=2;var l=A[i];if(l){var c=e.indexOf(l,t);-1!==c&&(t=c+1)}if("!"===e[t])return!0}else t++}return!1},x=function(e){if("!"===e[0])return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if("\\"===e[t]){var n=e[t+1];t+=2;var r=A[n];if(r){var o=e.indexOf(r,t);-1!==o&&(t=o+1)}if("!"===e[t])return!0}else t++}return!1},R={exports:{}};
|
8
|
-
/*!
|
9
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
10
|
-
*
|
11
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
12
|
-
* Released under the MIT License.
|
13
|
-
*/var C=n;void 0!==C.homedir?R.exports=C.homedir:R.exports=function(){if(b)return y;b=1;var e=t,n=function(){if(m)return g;function e(e,t){if(!e||!e.length||"#"===e.charAt(0))return null;var n=e.split(":");return{username:n[0],password:n[1],uid:n[2],gid:n[3],gecos:n[4],homedir:n[5],shell:n[6]}}return m=1,g=function(t){if("string"!=typeof t)throw new Error("expected a string");return t.split("\n").map(e).filter(Boolean)}}();return y=function(){if("win32"===process.platform)return process.env.USERPROFILE?process.env.USERPROFILE:process.env.HOMEDRIVE&&process.env.HOMEPATH?process.env.HOMEDRIVE+process.env.HOMEPATH:process.env.HOME?process.env.HOME:null;if(process.env.HOME)return process.env.HOME;var t=function(t){try{return e.readFileSync(t,"utf8")}catch(e){return""}}("/etc/passwd"),r=function(e,t){for(var n=e.length,r=0;r<n;r++)if(+e[r].uid===t)return e[r].homedir}(n(t),"function"==typeof process.geteuid?process.geteuid():process.getuid());if(r)return r;var o=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return o?"darwin"===process.platform?"/Users/"+o:"/home/"+o:null}}();var S=R.exports,_=S,w=e,T=function(e){var t=_();return 126===e.charCodeAt(0)?43===e.charCodeAt(1)?w.join(process.cwd(),e.slice(2)):t?w.join(t,e.slice(1)):e:e},O={exports:{}},I={exports:{}},$={};
|
14
|
-
/*!
|
15
|
-
* expand-tilde <https://github.com/jonschlinkert/expand-tilde>
|
16
|
-
*
|
17
|
-
* Copyright (c) 2015 Jon Schlinkert.
|
18
|
-
* Licensed under the MIT license.
|
19
|
-
*/$.parse=$.decode=function(e){var t={},n=t,r=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach((function(e,s,a){if(e&&!e.match(/^\s*[;#]/)){var i=e.match(o);if(i){if(void 0!==i[1])return"__proto__"===(r=M(i[1]))?void(n={}):void(n=t[r]=t[r]||{});var l=M(i[2]);if("__proto__"!==l){var c=!i[3]||M(i[4]);switch(c){case"true":case"false":case"null":c=JSON.parse(c)}if(l.length>2&&"[]"===l.slice(-2)){if("__proto__"===(l=l.substring(0,l.length-2)))return;n[l]?Array.isArray(n[l])||(n[l]=[n[l]]):n[l]=[]}Array.isArray(n[l])?n[l].push(c):n[l]=c}}}})),Object.keys(t).filter((function(e,n,r){if(!t[e]||"object"!=typeof t[e]||Array.isArray(t[e]))return!1;var o=L(e),s=t,a=o.pop(),i=a.replace(/\\\./g,".");return o.forEach((function(e,t,n){"__proto__"!==e&&(s[e]&&"object"==typeof s[e]||(s[e]={}),s=s[e])})),(s!==t||i!==a)&&(s[i]=t[e],!0)})).forEach((function(e,n,r){delete t[e]})),t},$.stringify=$.encode=function e(t,n){var r=[],o="";"string"==typeof n?n={section:n,whitespace:!1}:(n=n||{}).whitespace=!0===n.whitespace;var s=n.whitespace?" = ":"=";Object.keys(t).forEach((function(e,n,a){var i=t[e];i&&Array.isArray(i)?i.forEach((function(t){o+=P(e+"[]")+s+P(t)+"\n"})):i&&"object"==typeof i?r.push(e):o+=P(e)+s+P(i)+k})),n.section&&o.length&&(o="["+P(n.section)+"]"+k+o);return r.forEach((function(r,s,a){var i=L(r).join("\\."),l=(n.section?n.section+".":"")+i,c=e(t[r],{section:l,whitespace:n.whitespace});o.length&&c.length&&(o+=k),o+=c})),o},$.safe=P,$.unsafe=M;var k="undefined"!=typeof process&&"win32"===process.platform?"\r\n":"\n";function L(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function H(e){return'"'===e.charAt(0)&&'"'===e.slice(-1)||"'"===e.charAt(0)&&"'"===e.slice(-1)}function P(e){return"string"!=typeof e||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&H(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function M(e,t){if(!H(e=(e||"").trim())){for(var n=!1,r="",o=0,s=e.length;o<s;o++){var a=e.charAt(o);if(n)-1!=="\\;#".indexOf(a)?r+=a:r+="\\"+a,n=!1;else{if(-1!==";#".indexOf(a))break;"\\"===a?n=!0:r+=a}}return n&&(r+="\\"),r.trim()}"'"===e.charAt(0)&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch(e){}return e}var N,B,G={exports:{}};
|
20
|
-
/*!
|
21
|
-
* is-windows <https://github.com/jonschlinkert/is-windows>
|
22
|
-
*
|
23
|
-
* Copyright © 2015-2018, Jon Schlinkert.
|
24
|
-
* Released under the MIT License.
|
25
|
-
*/N=G,B=G.exports,function(e){B?N.exports=e():"undefined"!=typeof window?window.isWindows=e():void 0!==d?d.isWindows=e():"undefined"!=typeof self?self.isWindows=e():this.isWindows=e()}((function(){return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}}));var D,j,U,F,q,K=G.exports;q="win32"===process.platform||d.TESTING_WINDOWS?function(){if(j)return D;j=1,D=r,r.sync=function(t,r){return n(e.statSync(t),t,r)};var e=t;function n(e,t,n){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var n=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!n)return!0;if(-1!==(n=n.split(";")).indexOf(""))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,n)}function r(t,r,o){e.stat(t,(function(e,s){o(e,!e&&n(s,t,r))}))}return D}():function(){if(F)return U;F=1,U=n,n.sync=function(t,n){return r(e.statSync(t),n)};var e=t;function n(t,n,o){e.stat(t,(function(e,t){o(e,!e&&r(t,n))}))}function r(e,t){return e.isFile()&&function(e,t){var n=e.mode,r=e.uid,o=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),a=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),i=parseInt("100",8),l=parseInt("010",8);return n&parseInt("001",8)||n&l&&o===a||n&i&&r===s||n&(i|l)&&0===s}(e,t)}return U}();var W,J,X=Q;function Q(e,t,n){if("function"==typeof t&&(n=t,t={}),!n){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(n,r){Q(e,t||{},(function(e,t){e?r(e):n(t)}))}))}q(e,t||{},(function(e,r){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)}))}Q.sync=function(e,t){try{return q.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}},function(n){var r,o=t,s=e,a=T,i=S,l=$;function c(){if(process.env.PREFIX)r=process.env.PREFIX;else{var t=i();if(t){var n=s.resolve(t,".npmrc");r=u(n)}if(!r){var l=function(){try{return o.realpathSync(function(){if(J)return W;J=1,W=i,i.sync=function(e,t){for(var r=a(e,t=t||{}),i=r.env,l=r.ext,c=r.extExe,u=[],p=0,f=i.length;p<f;p++){var d=i[p];'"'===d.charAt(0)&&'"'===d.slice(-1)&&(d=d.slice(1,-1));var h=n.join(d,e);!d&&/^\.[\\\/]/.test(e)&&(h=e.slice(0,2)+h);for(var g=0,m=l.length;g<m;g++){var y=h+l[g];try{if(o.sync(y,{pathExt:c})){if(!t.all)return y;u.push(y)}}catch(e){}}}if(t.all&&u.length)return u;if(t.nothrow)return null;throw s(e)};var t="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,n=e,r=t?";":":",o=X;function s(e){var t=new Error("not found: "+e);return t.code="ENOENT",t}function a(e,n){var o=n.colon||r,s=n.path||process.env.PATH||"",a=[""];s=s.split(o);var i="";return t&&(s.unshift(process.cwd()),a=(i=n.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM").split(o),-1!==e.indexOf(".")&&""!==a[0]&&a.unshift("")),(e.match(/\//)||t&&e.match(/\\/))&&(s=[""]),{env:s,ext:a,extExe:i}}function i(e,t,r){"function"==typeof t&&(r=t,t={});var i=a(e,t),l=i.env,c=i.ext,u=i.extExe,p=[];!function a(i,f){if(i===f)return t.all&&p.length?r(null,p):r(s(e));var d=l[i];'"'===d.charAt(0)&&'"'===d.slice(-1)&&(d=d.slice(1,-1));var h=n.join(d,e);!d&&/^\.[\\\/]/.test(e)&&(h=e.slice(0,2)+h),function e(n,s){if(n===s)return a(i+1,f);var l=c[n];o(h+l,{pathExt:u},(function(o,a){if(!o&&a){if(!t.all)return r(null,h+l);p.push(h+l)}return e(n+1,s)}))}(0,c.length)}(0,l.length)}return W}
|
26
|
-
/*!
|
27
|
-
* global-prefix <https://github.com/jonschlinkert/global-prefix>
|
28
|
-
*
|
29
|
-
* Copyright (c) 2015-2017 Jon Schlinkert.
|
30
|
-
* Licensed under the MIT license.
|
31
|
-
*/().sync("npm"))}catch(e){}return null}();if(l){var c=s.resolve(l,"..","..","npmrc");if(r=u(c)){var p=s.resolve(r,"etc","npmrc");r=u(p)||r}}r||function(){var e=K;e()?r=process.env.APPDATA?s.join(process.env.APPDATA,"npm"):s.dirname(process.execPath):(r=s.dirname(s.dirname(process.execPath)),process.env.DESTDIR&&(r=s.join(process.env.DESTDIR,r)))}()}}if(r)return a(r)}function u(e){try{var t=o.readFileSync(e,"utf-8"),n=l.parse(t);if(n.prefix)return n.prefix}catch(e){}return null}Object.defineProperty(n,"exports",{enumerable:!0,get:function(){return r||(r=c())}})}(I);var z=I.exports;
|
32
|
-
/*!
|
33
|
-
* global-modules <https://github.com/jonschlinkert/global-modules>
|
34
|
-
*
|
35
|
-
* Copyright (c) 2015-2017 Jon Schlinkert.
|
36
|
-
* Licensed under the MIT license.
|
37
|
-
*/!function(t){var n,r=e,o=z,s=K;Object.defineProperty(t,"exports",{enumerable:!0,get:function(){return n||(n=s()?r.resolve(o,"node_modules"):r.resolve(o,"lib/node_modules"))}})}(O);var V=e,Y=T,Z=O.exports,ee=t,te=e;
|
38
|
-
/*!
|
39
|
-
* resolve-dir <https://github.com/jonschlinkert/resolve-dir>
|
40
|
-
*
|
41
|
-
* Copyright (c) 2015, Jon Schlinkert.
|
42
|
-
* Licensed under the MIT License.
|
43
|
-
*/var ne={};!function(e){e.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find((e=>e.type===t)),e.exceedsLimit=(t,n,r=1,o)=>!1!==o&&(!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=o),e.escapeNode=(e,t=0,n)=>{let r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},e.encloseBrace=e=>"brace"===e.type&&(e.commas>>0+e.ranges>>0==0&&(e.invalid=!0,!0)),e.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges>>0==0||!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0)),e.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),e.reduce=e=>e.reduce(((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e)),[]),e.flatten=(...e)=>{const t=[],n=e=>{for(let r=0;r<e.length;r++){let o=e[r];Array.isArray(o)?n(o):void 0!==o&&t.push(o)}return t};return n(e),t}}(ne);const re=ne;var oe=(e,t={})=>{let n=(e,r={})=>{let o=t.escapeInvalid&&re.isInvalidBrace(r),s=!0===e.invalid&&!0===t.escapeInvalid,a="";if(e.value)return(o||s)&&re.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)a+=n(t);return a};return n(e)};
|
44
|
-
/*!
|
45
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
46
|
-
*
|
47
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
48
|
-
* Released under the MIT License.
|
49
|
-
*/
|
50
|
-
/*!
|
51
|
-
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
52
|
-
*
|
53
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
54
|
-
* Released under the MIT License.
|
55
|
-
*/
|
56
|
-
const se=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))},ae=(e,t,n)=>{if(!1===se(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===se(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let r={relaxZeros:!0,...n};"boolean"==typeof r.strictZeros&&(r.relaxZeros=!1===r.strictZeros);let o=e+":"+t+"="+String(r.relaxZeros)+String(r.shorthand)+String(r.capture)+String(r.wrap);if(ae.cache.hasOwnProperty(o))return ae.cache[o].result;let s=Math.min(e,t),a=Math.max(e,t);if(1===Math.abs(s-a)){let n=e+"|"+t;return r.capture?`(${n})`:!1===r.wrap?n:`(?:${n})`}let i=me(e)||me(t),l={min:e,max:t,a:s,b:a},c=[],u=[];if(i&&(l.isPadded=i,l.maxLen=String(l.max).length),s<0){u=le(a<0?Math.abs(a):1,Math.abs(s),l,r),s=l.a=0}return a>=0&&(c=le(s,a,l,r)),l.negatives=u,l.positives=c,l.result=function(e,t,n){let r=ce(e,t,"-",!1)||[],o=ce(t,e,"",!1)||[],s=ce(e,t,"-?",!0)||[];return r.concat(s).concat(o).join("|")}(u,c),!0===r.capture?l.result=`(${l.result})`:!1!==r.wrap&&c.length+u.length>1&&(l.result=`(?:${l.result})`),ae.cache[o]=l,l.result};function ie(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),o=r.length,s="",a=0;for(let e=0;e<o;e++){let[t,n]=r[e];t===n?s+=t:"0"!==t||"9"!==n?s+=ge(t,n):a++}return a&&(s+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:s,count:[a],digits:o}}function le(e,t,n,r){let o,s=function(e,t){let n=1,r=1,o=fe(e,n),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),n+=1,o=fe(e,n);for(o=de(t+1,r)-1;e<o&&o<=t;)s.add(o),r+=1,o=de(t+1,r)-1;return s=[...s],s.sort(ue),s}(e,t),a=[],i=e;for(let e=0;e<s.length;e++){let t=s[e],l=ie(String(i),String(t),r),c="";n.isPadded||!o||o.pattern!==l.pattern?(n.isPadded&&(c=ye(t,n,r)),l.string=c+l.pattern+he(l.count),a.push(l),i=t+1,o=l):(o.count.length>1&&o.count.pop(),o.count.push(l.count[0]),o.string=o.pattern+he(o.count),i=t+1)}return a}function ce(e,t,n,r,o){let s=[];for(let o of e){let{string:e}=o;r||pe(t,"string",e)||s.push(n+e),r&&pe(t,"string",e)&&s.push(n+e)}return s}function ue(e,t){return e>t?1:t>e?-1:0}function pe(e,t,n){return e.some((e=>e[t]===n))}function fe(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function de(e,t){return e-e%Math.pow(10,t)}function he(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function ge(e,t,n){return`[${e}${t-e==1?"":"-"}${t}]`}function me(e){return/^-?(0+)\d/.test(e)}function ye(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),o=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${r}}`:`0{${r}}`}}ae.cache={},ae.clearCache=()=>ae.cache={};
|
57
|
-
/*!
|
58
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
59
|
-
*
|
60
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
61
|
-
* Licensed under the MIT License.
|
62
|
-
*/
|
63
|
-
const be=r,ve=ae,Ae=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),Ee=e=>"number"==typeof e||"string"==typeof e&&""!==e,xe=e=>Number.isInteger(+e),Re=e=>{let t=`${e}`,n=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++n];);return n>0},Ce=(e,t,n)=>{if(t>0){let n="-"===e[0]?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return!1===n?String(e):e},Se=(e,t)=>{let n="-"===e[0]?"-":"";for(n&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return n?"-"+e:e},_e=(e,t,n,r)=>{if(n)return ve(e,t,{wrap:!1,...r});let o=String.fromCharCode(e);return e===t?o:`[${o}-${String.fromCharCode(t)}]`},we=(e,t,n)=>{if(Array.isArray(e)){let t=!0===n.wrap,r=n.capture?"":"?:";return t?`(${r}${e.join("|")})`:e.join("|")}return ve(e,t,n)},Te=(...e)=>new RangeError("Invalid range arguments: "+be.inspect(...e)),Oe=(e,t,n)=>{if(!0===n.strictRanges)throw Te([e,t]);return[]},Ie=(e,t,n=1,r={})=>{let o=Number(e),s=Number(t);if(!Number.isInteger(o)||!Number.isInteger(s)){if(!0===r.strictRanges)throw Te([e,t]);return[]}0===o&&(o=0),0===s&&(s=0);let a=o>s,i=String(e),l=String(t),c=String(n);n=Math.max(Math.abs(n),1);let u=Re(i)||Re(l)||Re(c),p=u?Math.max(i.length,l.length,c.length):0,f=!1===u&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),d=r.transform||(e=>t=>!0===e?Number(t):String(t))(f);if(r.toRegex&&1===n)return _e(Se(e,p),Se(t,p),!0,r);let h={negatives:[],positives:[]},g=[],m=0;for(;a?o>=s:o<=s;)!0===r.toRegex&&n>1?h[(y=o)<0?"negatives":"positives"].push(Math.abs(y)):g.push(Ce(d(o,m),p,f)),o=a?o-n:o+n,m++;var y;return!0===r.toRegex?n>1?((e,t)=>{e.negatives.sort(((e,t)=>e<t?-1:e>t?1:0)),e.positives.sort(((e,t)=>e<t?-1:e>t?1:0));let n,r=t.capture?"":"?:",o="",s="";return e.positives.length&&(o=e.positives.join("|")),e.negatives.length&&(s=`-(${r}${e.negatives.join("|")})`),n=o&&s?`${o}|${s}`:o||s,t.wrap?`(${r}${n})`:n})(h,r):we(g,null,{wrap:!1,...r}):g},$e=(e,t,n,r={})=>{if(null==t&&Ee(e))return[e];if(!Ee(e)||!Ee(t))return Oe(e,t,r);if("function"==typeof n)return $e(e,t,1,{transform:n});if(Ae(n))return $e(e,t,0,n);let o={...r};return!0===o.capture&&(o.wrap=!0),n=n||o.step||1,xe(n)?xe(e)&&xe(t)?Ie(e,t,n,o):((e,t,n=1,r={})=>{if(!xe(e)&&e.length>1||!xe(t)&&t.length>1)return Oe(e,t,r);let o=r.transform||(e=>String.fromCharCode(e)),s=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),i=s>a,l=Math.min(s,a),c=Math.max(s,a);if(r.toRegex&&1===n)return _e(l,c,!1,r);let u=[],p=0;for(;i?s>=a:s<=a;)u.push(o(s,p)),s=i?s-n:s+n,p++;return!0===r.toRegex?we(u,null,{wrap:!1,options:r}):u})(e,t,Math.max(Math.abs(n),1),o):null==n||Ae(n)?$e(e,t,1,n):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(n,o)};const ke=$e,Le=ne;var He=(e,t={})=>{let n=(e,r={})=>{let o=Le.isInvalidBrace(r),s=!0===e.invalid&&!0===t.escapeInvalid,a=!0===o||!0===s,i=!0===t.escapeInvalid?"\\":"",l="";if(!0===e.isOpen)return i+e.value;if(!0===e.isClose)return i+e.value;if("open"===e.type)return a?i+e.value:"(";if("close"===e.type)return a?i+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":a?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let n=Le.reduce(e.nodes),r=ke(...n,{...t,wrap:!1,toRegex:!0});if(0!==r.length)return n.length>1&&r.length>1?`(${r})`:r}if(e.nodes)for(let t of e.nodes)l+=n(t,e);return l};return n(e)};const Pe=$e,Me=oe,Ne=ne,Be=(e="",t="",n=!1)=>{let r=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return n?Ne.flatten(t).map((e=>`{${e}}`)):t;for(let o of e)if(Array.isArray(o))for(let e of o)r.push(Be(e,t,n));else for(let e of t)!0===n&&"string"==typeof e&&(e=`{${e}}`),r.push(Array.isArray(e)?Be(o,e,n):o+e);return Ne.flatten(r)};var Ge=(e,t={})=>{let n=void 0===t.rangeLimit?1e3:t.rangeLimit,r=(e,o={})=>{e.queue=[];let s=o,a=o.queue;for(;"brace"!==s.type&&"root"!==s.type&&s.parent;)s=s.parent,a=s.queue;if(e.invalid||e.dollar)return void a.push(Be(a.pop(),Me(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void a.push(Be(a.pop(),["{}"]));if(e.nodes&&e.ranges>0){let r=Ne.reduce(e.nodes);if(Ne.exceedsLimit(...r,t.step,n))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let o=Pe(...r,t);return 0===o.length&&(o=Me(e,t)),a.push(Be(a.pop(),o)),void(e.nodes=[])}let i=Ne.encloseBrace(e),l=e.queue,c=e;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,l=c.queue;for(let t=0;t<e.nodes.length;t++){let n=e.nodes[t];"comma"!==n.type||"brace"!==e.type?"close"!==n.type?n.value&&"open"!==n.type?l.push(Be(l.pop(),n.value)):n.nodes&&r(n,e):a.push(Be(a.pop(),l,i)):(1===t&&l.push(""),l.push(""))}return l};return Ne.flatten(r(e))};const De=oe,{MAX_LENGTH:je,CHAR_BACKSLASH:Ue,CHAR_BACKTICK:Fe,CHAR_COMMA:qe,CHAR_DOT:Ke,CHAR_LEFT_PARENTHESES:We,CHAR_RIGHT_PARENTHESES:Je,CHAR_LEFT_CURLY_BRACE:Xe,CHAR_RIGHT_CURLY_BRACE:Qe,CHAR_LEFT_SQUARE_BRACKET:ze,CHAR_RIGHT_SQUARE_BRACKET:Ve,CHAR_DOUBLE_QUOTE:Ye,CHAR_SINGLE_QUOTE:Ze,CHAR_NO_BREAK_SPACE:et,CHAR_ZERO_WIDTH_NOBREAK_SPACE:tt}={MAX_LENGTH:65536,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"};var nt=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let n=t||{},r="number"==typeof n.maxLength?Math.min(je,n.maxLength):je;if(e.length>r)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${r})`);let o,s={type:"root",input:e,nodes:[]},a=[s],i=s,l=s,c=0,u=e.length,p=0,f=0;const d=()=>e[p++],h=e=>{if("text"===e.type&&"dot"===l.type&&(l.type="text"),!l||"text"!==l.type||"text"!==e.type)return i.nodes.push(e),e.parent=i,e.prev=l,l=e,e;l.value+=e.value};for(h({type:"bos"});p<u;)if(i=a[a.length-1],o=d(),o!==tt&&o!==et)if(o!==Ue)if(o!==Ve)if(o!==ze)if(o!==We)if(o!==Je)if(o!==Ye&&o!==Ze&&o!==Fe)if(o!==Xe)if(o!==Qe)if(o===qe&&f>0){if(i.ranges>0){i.ranges=0;let e=i.nodes.shift();i.nodes=[e,{type:"text",value:De(i)}]}h({type:"comma",value:o}),i.commas++}else if(o===Ke&&f>0&&0===i.commas){let e=i.nodes;if(0===f||0===e.length){h({type:"text",value:o});continue}if("dot"===l.type){if(i.range=[],l.value+=o,l.type="range",3!==i.nodes.length&&5!==i.nodes.length){i.invalid=!0,i.ranges=0,l.type="text";continue}i.ranges++,i.args=[];continue}if("range"===l.type){e.pop();let t=e[e.length-1];t.value+=l.value+o,l=t,i.ranges--;continue}h({type:"dot",value:o})}else h({type:"text",value:o});else{if("brace"!==i.type){h({type:"text",value:o});continue}let e="close";i=a.pop(),i.close=!0,h({type:e,value:o}),f--,i=a[a.length-1]}else{f++;let e=l.value&&"$"===l.value.slice(-1)||!0===i.dollar;i=h({type:"brace",open:!0,close:!1,dollar:e,depth:f,commas:0,ranges:0,nodes:[]}),a.push(i),h({type:"open",value:o})}else{let e,n=o;for(!0!==t.keepQuotes&&(o="");p<u&&(e=d());)if(e!==Ue){if(e===n){!0===t.keepQuotes&&(o+=e);break}o+=e}else o+=e+d();h({type:"text",value:o})}else{if("paren"!==i.type){h({type:"text",value:o});continue}i=a.pop(),h({type:"text",value:o}),i=a[a.length-1]}else i=h({type:"paren",nodes:[]}),a.push(i),h({type:"text",value:o});else{let e;for(c++;p<u&&(e=d());)if(o+=e,e!==ze)if(e!==Ue){if(e===Ve&&(c--,0===c))break}else o+=d();else c++;h({type:"text",value:o})}else h({type:"text",value:"\\"+o});else h({type:"text",value:(t.keepEscaping?o:"")+d()});do{if(i=a.pop(),"root"!==i.type){i.nodes.forEach((e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)}));let e=a[a.length-1],t=e.nodes.indexOf(i);e.nodes.splice(t,1,...i.nodes)}}while(a.length>0);return h({type:"eos"}),s};const rt=oe,ot=He,st=Ge,at=nt,it=(e,t={})=>{let n=[];if(Array.isArray(e))for(let r of e){let e=it.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(it.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};it.parse=(e,t={})=>at(e,t),it.stringify=(e,t={})=>rt("string"==typeof e?it.parse(e,t):e,t),it.compile=(e,t={})=>("string"==typeof e&&(e=it.parse(e,t)),ot(e,t)),it.expand=(e,t={})=>{"string"==typeof e&&(e=it.parse(e,t));let n=st(e,t);return!0===t.noempty&&(n=n.filter(Boolean)),!0===t.nodupes&&(n=[...new Set(n)]),n},it.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?it.compile(e,t):it.expand(e,t);var lt=it,ct={};const ut=e,pt="\\\\/",ft=`[^${pt}]`,dt="\\.",ht="\\/",gt="[^/]",mt=`(?:${ht}|$)`,yt=`(?:^|${ht})`,bt=`${dt}{1,2}${mt}`,vt={DOT_LITERAL:dt,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:ht,ONE_CHAR:"(?=.)",QMARK:gt,END_ANCHOR:mt,DOTS_SLASH:bt,NO_DOT:`(?!${dt})`,NO_DOTS:`(?!${yt}${bt})`,NO_DOT_SLASH:`(?!${dt}{0,1}${mt})`,NO_DOTS_SLASH:`(?!${bt})`,QMARK_NO_DOT:`[^.${ht}]`,STAR:`${gt}*?`,START_ANCHOR:yt},At={...vt,SLASH_LITERAL:`[${pt}]`,QMARK:ft,STAR:`${ft}*?`,DOTS_SLASH:`${dt}{1,2}(?:[${pt}]|$)`,NO_DOT:`(?!${dt})`,NO_DOTS:`(?!(?:^|[${pt}])${dt}{1,2}(?:[${pt}]|$))`,NO_DOT_SLASH:`(?!${dt}{0,1}(?:[${pt}]|$))`,NO_DOTS_SLASH:`(?!${dt}{1,2}(?:[${pt}]|$))`,QMARK_NO_DOT:`[^.${pt}]`,START_ANCHOR:`(?:^|[${pt}])`,END_ANCHOR:`(?:[${pt}]|$)`};var Et={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:ut.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?At:vt};!function(t){const n=e,r="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:i}=Et;t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>a.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(i,"\\$1"),t.toPosixSlashes=e=>e.replace(o,"/"),t.removeBackslashes=e=>e.replace(s,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===r||"\\"===n.sep,t.escapeLast=(e,n,r)=>{const o=e.lastIndexOf(n,r);return-1===o?e:"\\"===e[o-1]?t.escapeLast(e,n,o-1):`${e.slice(0,o)}\\${e.slice(o)}`},t.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},t.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(ct);const xt=ct,{CHAR_ASTERISK:Rt,CHAR_AT:Ct,CHAR_BACKWARD_SLASH:St,CHAR_COMMA:_t,CHAR_DOT:wt,CHAR_EXCLAMATION_MARK:Tt,CHAR_FORWARD_SLASH:Ot,CHAR_LEFT_CURLY_BRACE:It,CHAR_LEFT_PARENTHESES:$t,CHAR_LEFT_SQUARE_BRACKET:kt,CHAR_PLUS:Lt,CHAR_QUESTION_MARK:Ht,CHAR_RIGHT_CURLY_BRACE:Pt,CHAR_RIGHT_PARENTHESES:Mt,CHAR_RIGHT_SQUARE_BRACKET:Nt}=Et,Bt=e=>e===Ot||e===St,Gt=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};var Dt=(e,t)=>{const n=t||{},r=e.length-1,o=!0===n.parts||!0===n.scanToEnd,s=[],a=[],i=[];let l,c,u=e,p=-1,f=0,d=0,h=!1,g=!1,m=!1,y=!1,b=!1,v=!1,A=!1,E=!1,x=!1,R=!1,C=0,S={value:"",depth:0,isGlob:!1};const _=()=>p>=r,w=()=>(l=c,u.charCodeAt(++p));for(;p<r;){let e;if(c=w(),c!==St){if(!0===v||c===It){for(C++;!0!==_()&&(c=w());)if(c!==St)if(c!==It){if(!0!==v&&c===wt&&(c=w())===wt){if(h=S.isBrace=!0,m=S.isGlob=!0,R=!0,!0===o)continue;break}if(!0!==v&&c===_t){if(h=S.isBrace=!0,m=S.isGlob=!0,R=!0,!0===o)continue;break}if(c===Pt&&(C--,0===C)){v=!1,h=S.isBrace=!0,R=!0;break}}else C++;else A=S.backslashes=!0,w();if(!0===o)continue;break}if(c!==Ot){if(!0!==n.noext){if(!0===(c===Lt||c===Ct||c===Rt||c===Ht||c===Tt)&&u.charCodeAt(p+1)===$t){if(m=S.isGlob=!0,y=S.isExtglob=!0,R=!0,c===Tt&&p===f&&(x=!0),!0===o){for(;!0!==_()&&(c=w());)if(c!==St){if(c===Mt){m=S.isGlob=!0,R=!0;break}}else A=S.backslashes=!0,c=w();continue}break}}if(c===Rt){if(l===Rt&&(b=S.isGlobstar=!0),m=S.isGlob=!0,R=!0,!0===o)continue;break}if(c===Ht){if(m=S.isGlob=!0,R=!0,!0===o)continue;break}if(c===kt){for(;!0!==_()&&(e=w());)if(e!==St){if(e===Nt){g=S.isBracket=!0,m=S.isGlob=!0,R=!0;break}}else A=S.backslashes=!0,w();if(!0===o)continue;break}if(!0===n.nonegate||c!==Tt||p!==f){if(!0!==n.noparen&&c===$t){if(m=S.isGlob=!0,!0===o){for(;!0!==_()&&(c=w());)if(c!==$t){if(c===Mt){R=!0;break}}else A=S.backslashes=!0,c=w();continue}break}if(!0===m){if(R=!0,!0===o)continue;break}}else E=S.negated=!0,f++}else{if(s.push(p),a.push(S),S={value:"",depth:0,isGlob:!1},!0===R)continue;if(l===wt&&p===f+1){f+=2;continue}d=p+1}}else A=S.backslashes=!0,c=w(),c===It&&(v=!0)}!0===n.noext&&(y=!1,m=!1);let T=u,O="",I="";f>0&&(O=u.slice(0,f),u=u.slice(f),d-=f),T&&!0===m&&d>0?(T=u.slice(0,d),I=u.slice(d)):!0===m?(T="",I=u):T=u,T&&""!==T&&"/"!==T&&T!==u&&Bt(T.charCodeAt(T.length-1))&&(T=T.slice(0,-1)),!0===n.unescape&&(I&&(I=xt.removeBackslashes(I)),T&&!0===A&&(T=xt.removeBackslashes(T)));const $={prefix:O,input:e,start:f,base:T,glob:I,isBrace:h,isBracket:g,isGlob:m,isExtglob:y,isGlobstar:b,negated:E,negatedExtglob:x};if(!0===n.tokens&&($.maxDepth=0,Bt(c)||a.push(S),$.tokens=a),!0===n.parts||!0===n.tokens){let t;for(let r=0;r<s.length;r++){const o=t?t+1:f,l=s[r],c=e.slice(o,l);n.tokens&&(0===r&&0!==f?(a[r].isPrefix=!0,a[r].value=O):a[r].value=c,Gt(a[r]),$.maxDepth+=a[r].depth),0===r&&""===c||i.push(c),t=l}if(t&&t+1<e.length){const r=e.slice(t+1);i.push(r),n.tokens&&(a[a.length-1].value=r,Gt(a[a.length-1]),$.maxDepth+=a[a.length-1].depth)}$.slashes=s,$.parts=i}return $};const jt=Et,Ut=ct,{MAX_LENGTH:Ft,POSIX_REGEX_SOURCE:qt,REGEX_NON_SPECIAL_CHARS:Kt,REGEX_SPECIAL_CHARS_BACKREF:Wt,REPLACEMENTS:Jt}=jt,Xt=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const n=`[${e.join("-")}]`;try{new RegExp(n)}catch(t){return e.map((e=>Ut.escapeRegex(e))).join("..")}return n},Qt=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,zt=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=Jt[e]||e;const n={...t},r="number"==typeof n.maxLength?Math.min(Ft,n.maxLength):Ft;let o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);const s={type:"bos",value:"",output:n.prepend||""},a=[s],i=n.capture?"":"?:",l=Ut.isWindows(t),c=jt.globChars(l),u=jt.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:f,SLASH_LITERAL:d,ONE_CHAR:h,DOTS_SLASH:g,NO_DOT:m,NO_DOT_SLASH:y,NO_DOTS_SLASH:b,QMARK:v,QMARK_NO_DOT:A,STAR:E,START_ANCHOR:x}=c,R=e=>`(${i}(?:(?!${x}${e.dot?g:p}).)*?)`,C=n.dot?"":m,S=n.dot?v:A;let _=!0===n.bash?R(n):E;n.capture&&(_=`(${_})`),"boolean"==typeof n.noext&&(n.noextglob=n.noext);const w={input:e,index:-1,start:0,dot:!0===n.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};e=Ut.removePrefix(e,w),o=e.length;const T=[],O=[],I=[];let $,k=s;const L=()=>w.index===o-1,H=w.peek=(t=1)=>e[w.index+t],P=w.advance=()=>e[++w.index]||"",M=()=>e.slice(w.index+1),N=(e="",t=0)=>{w.consumed+=e,w.index+=t},B=e=>{w.output+=null!=e.output?e.output:e.value,N(e.value)},G=()=>{let e=1;for(;"!"===H()&&("("!==H(2)||"?"===H(3));)P(),w.start++,e++;return e%2!=0&&(w.negated=!0,w.start++,!0)},D=e=>{w[e]++,I.push(e)},j=e=>{w[e]--,I.pop()},U=e=>{if("globstar"===k.type){const t=w.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||T.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(w.output=w.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=_,w.output+=k.output)}if(T.length&&"paren"!==e.type&&(T[T.length-1].inner+=e.value),(e.value||e.output)&&B(e),k&&"text"===k.type&&"text"===e.type)return k.value+=e.value,void(k.output=(k.output||"")+e.value);e.prev=k,a.push(e),k=e},F=(e,t)=>{const r={...u[t],conditions:1,inner:""};r.prev=k,r.parens=w.parens,r.output=w.output;const o=(n.capture?"(":"")+r.open;D("parens"),U({type:e,value:t,output:w.output?"":h}),U({type:"paren",extglob:!0,value:P(),output:o}),T.push(r)},q=e=>{let r,o=e.close+(n.capture?")":"");if("negate"===e.type){let s=_;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(s=R(n)),(s!==_||L()||/^\)+$/.test(M()))&&(o=e.close=`)$))${s}`),e.inner.includes("*")&&(r=M())&&/^\.[^\\/.]+$/.test(r)){const n=zt(r,{...t,fastpaths:!1}).output;o=e.close=`)${n})${s})`}"bos"===e.prev.type&&(w.negatedExtglob=!0)}U({type:"paren",extglob:!0,value:$,output:o}),j("parens")};if(!1!==n.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let r=!1,o=e.replace(Wt,((e,t,n,o,s,a)=>"\\"===o?(r=!0,e):"?"===o?t?t+o+(s?v.repeat(s.length):""):0===a?S+(s?v.repeat(s.length):""):v.repeat(n.length):"."===o?p.repeat(n.length):"*"===o?t?t+o+(s?_:""):_:t?e:`\\${e}`));return!0===r&&(o=!0===n.unescape?o.replace(/\\/g,""):o.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),o===e&&!0===n.contains?(w.output=e,w):(w.output=Ut.wrapOutput(o,w,t),w)}for(;!L();){if($=P(),"\0"===$)continue;if("\\"===$){const e=H();if("/"===e&&!0!==n.bash)continue;if("."===e||";"===e)continue;if(!e){$+="\\",U({type:"text",value:$});continue}const t=/^\\+/.exec(M());let r=0;if(t&&t[0].length>2&&(r=t[0].length,w.index+=r,r%2!=0&&($+="\\")),!0===n.unescape?$=P():$+=P(),0===w.brackets){U({type:"text",value:$});continue}}if(w.brackets>0&&("]"!==$||"["===k.value||"[^"===k.value)){if(!1!==n.posix&&":"===$){const e=k.value.slice(1);if(e.includes("[")&&(k.posix=!0,e.includes(":"))){const e=k.value.lastIndexOf("["),t=k.value.slice(0,e),n=k.value.slice(e+2),r=qt[n];if(r){k.value=t+r,w.backtrack=!0,P(),s.output||1!==a.indexOf(k)||(s.output=h);continue}}}("["===$&&":"!==H()||"-"===$&&"]"===H())&&($=`\\${$}`),"]"!==$||"["!==k.value&&"[^"!==k.value||($=`\\${$}`),!0===n.posix&&"!"===$&&"["===k.value&&($="^"),k.value+=$,B({value:$});continue}if(1===w.quotes&&'"'!==$){$=Ut.escapeRegex($),k.value+=$,B({value:$});continue}if('"'===$){w.quotes=1===w.quotes?0:1,!0===n.keepQuotes&&U({type:"text",value:$});continue}if("("===$){D("parens"),U({type:"paren",value:$});continue}if(")"===$){if(0===w.parens&&!0===n.strictBrackets)throw new SyntaxError(Qt("opening","("));const e=T[T.length-1];if(e&&w.parens===e.parens+1){q(T.pop());continue}U({type:"paren",value:$,output:w.parens?")":"\\)"}),j("parens");continue}if("["===$){if(!0!==n.nobracket&&M().includes("]"))D("brackets");else{if(!0!==n.nobracket&&!0===n.strictBrackets)throw new SyntaxError(Qt("closing","]"));$=`\\${$}`}U({type:"bracket",value:$});continue}if("]"===$){if(!0===n.nobracket||k&&"bracket"===k.type&&1===k.value.length){U({type:"text",value:$,output:`\\${$}`});continue}if(0===w.brackets){if(!0===n.strictBrackets)throw new SyntaxError(Qt("opening","["));U({type:"text",value:$,output:`\\${$}`});continue}j("brackets");const e=k.value.slice(1);if(!0===k.posix||"^"!==e[0]||e.includes("/")||($=`/${$}`),k.value+=$,B({value:$}),!1===n.literalBrackets||Ut.hasRegexChars(e))continue;const t=Ut.escapeRegex(k.value);if(w.output=w.output.slice(0,-k.value.length),!0===n.literalBrackets){w.output+=t,k.value=t;continue}k.value=`(${i}${t}|${k.value})`,w.output+=k.value;continue}if("{"===$&&!0!==n.nobrace){D("braces");const e={type:"brace",value:$,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};O.push(e),U(e);continue}if("}"===$){const e=O[O.length-1];if(!0===n.nobrace||!e){U({type:"text",value:$,output:$});continue}let t=")";if(!0===e.dots){const e=a.slice(),r=[];for(let t=e.length-1;t>=0&&(a.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=Xt(r,n),w.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=w.output.slice(0,e.outputIndex),r=w.tokens.slice(e.tokensIndex);e.value=e.output="\\{",$=t="\\}",w.output=n;for(const e of r)w.output+=e.output||e.value}U({type:"brace",value:$,output:t}),j("braces"),O.pop();continue}if("|"===$){T.length>0&&T[T.length-1].conditions++,U({type:"text",value:$});continue}if(","===$){let e=$;const t=O[O.length-1];t&&"braces"===I[I.length-1]&&(t.comma=!0,e="|"),U({type:"comma",value:$,output:e});continue}if("/"===$){if("dot"===k.type&&w.index===w.start+1){w.start=w.index+1,w.consumed="",w.output="",a.pop(),k=s;continue}U({type:"slash",value:$,output:d});continue}if("."===$){if(w.braces>0&&"dot"===k.type){"."===k.value&&(k.output=p);const e=O[O.length-1];k.type="dots",k.output+=$,k.value+=$,e.dots=!0;continue}if(w.braces+w.parens===0&&"bos"!==k.type&&"slash"!==k.type){U({type:"text",value:$,output:p});continue}U({type:"dot",value:$,output:p});continue}if("?"===$){if(!(k&&"("===k.value)&&!0!==n.noextglob&&"("===H()&&"?"!==H(2)){F("qmark",$);continue}if(k&&"paren"===k.type){const e=H();let t=$;if("<"===e&&!Ut.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===k.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(M()))&&(t=`\\${$}`),U({type:"text",value:$,output:t});continue}if(!0!==n.dot&&("slash"===k.type||"bos"===k.type)){U({type:"qmark",value:$,output:A});continue}U({type:"qmark",value:$,output:v});continue}if("!"===$){if(!0!==n.noextglob&&"("===H()&&("?"!==H(2)||!/[!=<:]/.test(H(3)))){F("negate",$);continue}if(!0!==n.nonegate&&0===w.index){G();continue}}if("+"===$){if(!0!==n.noextglob&&"("===H()&&"?"!==H(2)){F("plus",$);continue}if(k&&"("===k.value||!1===n.regex){U({type:"plus",value:$,output:f});continue}if(k&&("bracket"===k.type||"paren"===k.type||"brace"===k.type)||w.parens>0){U({type:"plus",value:$});continue}U({type:"plus",value:f});continue}if("@"===$){if(!0!==n.noextglob&&"("===H()&&"?"!==H(2)){U({type:"at",extglob:!0,value:$,output:""});continue}U({type:"text",value:$});continue}if("*"!==$){"$"!==$&&"^"!==$||($=`\\${$}`);const e=Kt.exec(M());e&&($+=e[0],w.index+=e[0].length),U({type:"text",value:$});continue}if(k&&("globstar"===k.type||!0===k.star)){k.type="star",k.star=!0,k.value+=$,k.output=_,w.backtrack=!0,w.globstar=!0,N($);continue}let t=M();if(!0!==n.noextglob&&/^\([^?]/.test(t)){F("star",$);continue}if("star"===k.type){if(!0===n.noglobstar){N($);continue}const r=k.prev,o=r.prev,s="slash"===r.type||"bos"===r.type,a=o&&("star"===o.type||"globstar"===o.type);if(!0===n.bash&&(!s||t[0]&&"/"!==t[0])){U({type:"star",value:$,output:""});continue}const i=w.braces>0&&("comma"===r.type||"brace"===r.type),l=T.length&&("pipe"===r.type||"paren"===r.type);if(!s&&"paren"!==r.type&&!i&&!l){U({type:"star",value:$,output:""});continue}for(;"/**"===t.slice(0,3);){const n=e[w.index+4];if(n&&"/"!==n)break;t=t.slice(3),N("/**",3)}if("bos"===r.type&&L()){k.type="globstar",k.value+=$,k.output=R(n),w.output=k.output,w.globstar=!0,N($);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!a&&L()){w.output=w.output.slice(0,-(r.output+k.output).length),r.output=`(?:${r.output}`,k.type="globstar",k.output=R(n)+(n.strictSlashes?")":"|$)"),k.value+=$,w.globstar=!0,w.output+=r.output+k.output,N($);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";w.output=w.output.slice(0,-(r.output+k.output).length),r.output=`(?:${r.output}`,k.type="globstar",k.output=`${R(n)}${d}|${d}${e})`,k.value+=$,w.output+=r.output+k.output,w.globstar=!0,N($+P()),U({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===t[0]){k.type="globstar",k.value+=$,k.output=`(?:^|${d}|${R(n)}${d})`,w.output=k.output,w.globstar=!0,N($+P()),U({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-k.output.length),k.type="globstar",k.output=R(n),k.value+=$,w.output+=k.output,w.globstar=!0,N($);continue}const r={type:"star",value:$,output:_};!0!==n.bash?!k||"bracket"!==k.type&&"paren"!==k.type||!0!==n.regex?(w.index!==w.start&&"slash"!==k.type&&"dot"!==k.type||("dot"===k.type?(w.output+=y,k.output+=y):!0===n.dot?(w.output+=b,k.output+=b):(w.output+=C,k.output+=C),"*"!==H()&&(w.output+=h,k.output+=h)),U(r)):(r.output=$,U(r)):(r.output=".*?","bos"!==k.type&&"slash"!==k.type||(r.output=C+r.output),U(r))}for(;w.brackets>0;){if(!0===n.strictBrackets)throw new SyntaxError(Qt("closing","]"));w.output=Ut.escapeLast(w.output,"["),j("brackets")}for(;w.parens>0;){if(!0===n.strictBrackets)throw new SyntaxError(Qt("closing",")"));w.output=Ut.escapeLast(w.output,"("),j("parens")}for(;w.braces>0;){if(!0===n.strictBrackets)throw new SyntaxError(Qt("closing","}"));w.output=Ut.escapeLast(w.output,"{"),j("braces")}if(!0===n.strictSlashes||"star"!==k.type&&"bracket"!==k.type||U({type:"maybe_slash",value:"",output:`${d}?`}),!0===w.backtrack){w.output="";for(const e of w.tokens)w.output+=null!=e.output?e.output:e.value,e.suffix&&(w.output+=e.suffix)}return w};zt.fastpaths=(e,t)=>{const n={...t},r="number"==typeof n.maxLength?Math.min(Ft,n.maxLength):Ft,o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);e=Jt[e]||e;const s=Ut.isWindows(t),{DOT_LITERAL:a,SLASH_LITERAL:i,ONE_CHAR:l,DOTS_SLASH:c,NO_DOT:u,NO_DOTS:p,NO_DOTS_SLASH:f,STAR:d,START_ANCHOR:h}=jt.globChars(s),g=n.dot?p:u,m=n.dot?f:u,y=n.capture?"":"?:";let b=!0===n.bash?".*?":d;n.capture&&(b=`(${b})`);const v=e=>!0===e.noglobstar?b:`(${y}(?:(?!${h}${e.dot?c:a}).)*?)`,A=e=>{switch(e){case"*":return`${g}${l}${b}`;case".*":return`${a}${l}${b}`;case"*.*":return`${g}${b}${a}${l}${b}`;case"*/*":return`${g}${b}${i}${l}${m}${b}`;case"**":return g+v(n);case"**/*":return`(?:${g}${v(n)}${i})?${m}${l}${b}`;case"**/*.*":return`(?:${g}${v(n)}${i})?${m}${b}${a}${l}${b}`;case"**/.*":return`(?:${g}${v(n)}${i})?${a}${l}${b}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=A(t[1]);if(!n)return;return n+a+t[2]}}},E=Ut.removePrefix(e,{negated:!1,prefix:""});let x=A(E);return x&&!0!==n.strictSlashes&&(x+=`${i}?`),x};const Vt=e,Yt=Dt,Zt=zt,en=ct,tn=Et,nn=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map((e=>nn(e,t,n))),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const r=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const s=t||{},a=en.isWindows(t),i=r?nn.compileRe(e,t):nn.makeRe(e,t,!1,!0),l=i.state;delete i.state;let c=()=>!1;if(s.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};c=nn(s.ignore,e,n)}const u=(n,r=!1)=>{const{isMatch:o,match:u,output:p}=nn.test(n,i,t,{glob:e,posix:a}),f={glob:e,state:l,regex:i,posix:a,input:n,output:p,match:u,isMatch:o};return"function"==typeof s.onResult&&s.onResult(f),!1===o?(f.isMatch=!1,!!r&&f):c(n)?("function"==typeof s.onIgnore&&s.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof s.onMatch&&s.onMatch(f),!r||f)};return n&&(u.state=l),u};nn.test=(e,t,n,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const s=n||{},a=s.format||(o?en.toPosixSlashes:null);let i=e===r,l=i&&a?a(e):e;return!1===i&&(l=a?a(e):e,i=l===r),!1!==i&&!0!==s.capture||(i=!0===s.matchBase||!0===s.basename?nn.matchBase(e,t,n,o):t.exec(l)),{isMatch:Boolean(i),match:i,output:l}},nn.matchBase=(e,t,n,r=en.isWindows(n))=>(t instanceof RegExp?t:nn.makeRe(t,n)).test(Vt.basename(e)),nn.isMatch=(e,t,n)=>nn(t,n)(e),nn.parse=(e,t)=>Array.isArray(e)?e.map((e=>nn.parse(e,t))):Zt(e,{...t,fastpaths:!1}),nn.scan=(e,t)=>Yt(e,t),nn.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const o=t||{},s=o.contains?"":"^",a=o.contains?"":"$";let i=`${s}(?:${e.output})${a}`;e&&!0===e.negated&&(i=`^(?!${i}).*$`);const l=nn.toRegex(i,t);return!0===r&&(l.state=e),l},nn.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=Zt.fastpaths(e,t)),o.output||(o=Zt(e,t)),nn.compileRe(o,t,n,r)},nn.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},nn.constants=tn;const rn=r,on=lt,sn=nn,an=ct,ln=e=>""===e||"./"===e,cn=(e,t,n)=>{t=[].concat(t),e=[].concat(e);let r=new Set,o=new Set,s=new Set,a=0,i=e=>{s.add(e.output),n&&n.onResult&&n.onResult(e)};for(let s=0;s<t.length;s++){let l=sn(String(t[s]),{...n,onResult:i},!0),c=l.state.negated||l.state.negatedExtglob;c&&a++;for(let t of e){let e=l(t,!0);(c?!e.isMatch:e.isMatch)&&(c?r.add(e.output):(r.delete(e.output),o.add(e.output)))}}let l=(a===t.length?[...s]:[...o]).filter((e=>!r.has(e)));if(n&&0===l.length){if(!0===n.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===n.nonull||!0===n.nullglob)return n.unescape?t.map((e=>e.replace(/\\/g,""))):t}return l};cn.match=cn,cn.matcher=(e,t)=>sn(e,t),cn.any=cn.isMatch=(e,t,n)=>sn(t,n)(e),cn.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,o=[],s=new Set(cn(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),o.push(e.output)}}));for(let e of o)s.has(e)||r.add(e);return[...r]},cn.contains=(e,t,n)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${rn.inspect(e)}"`);if(Array.isArray(t))return t.some((t=>cn.contains(e,t,n)));if("string"==typeof t){if(ln(e)||ln(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return cn.isMatch(e,t,{...n,contains:!0})},cn.matchKeys=(e,t,n)=>{if(!an.isObject(e))throw new TypeError("Expected the first argument to be an object");let r=cn(Object.keys(e),t,n),o={};for(let t of r)o[t]=e[t];return o},cn.some=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=sn(String(e),n);if(r.some((e=>t(e))))return!0}return!1},cn.every=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=sn(String(e),n);if(!r.every((e=>t(e))))return!1}return!0},cn.all=(e,t,n)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${rn.inspect(e)}"`);return[].concat(t).every((t=>sn(t,n)(e)))},cn.capture=(e,t,n)=>{let r=an.isWindows(n),o=sn.makeRe(String(e),{...n,capture:!0}).exec(r?an.toPosixSlashes(t):t);if(o)return o.slice(1).map((e=>void 0===e?"":e))},cn.makeRe=(...e)=>sn.makeRe(...e),cn.scan=(...e)=>sn.scan(...e),cn.parse=(e,t)=>{let n=[];for(let r of[].concat(e||[]))for(let e of on(String(r),t))n.push(sn.parse(e,t));return n},cn.braces=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return t&&!0===t.nobrace||!/\{.*\}/.test(e)?[e]:on(e,t)},cn.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return cn.braces(e,{...t,expand:!0})};var un=t,pn=e,fn=function(e,t){if("string"!=typeof e||""===e)return!1;if(v(e))return!0;var n=E;return t&&!1===t.strict&&(n=x),n(e)},dn=function(e){return"~"===e.charAt(0)&&(e=Y(e)),"@"===e.charAt(0)&&(e=V.join(Z,e.slice(1))),e},hn=function(e,t){return e&&"string"==typeof e?ee.existsSync(e)?te.resolve(e):!0===(t=t||{}).nocase?function(e){e=te.resolve(e);var t=function(e){var t={path:e,files:[]};try{return t.files=ee.readdirSync(e),t}catch(e){}try{return t.path=te.dirname(e),t.files=ee.readdirSync(t.path),t}catch(e){}return null}(e);if(null===t)return null;if(t.path===e)return t.path;var n=e.toUpperCase(),r=t.files.length,o=-1;for(;++o<r;){var s=te.resolve(t.path,t.files[o]);if(e===s||n===s)return s;var a=s.toUpperCase();if(e===a||n===a)return s}return null}(e):null:null},gn=cn;function mn(e,t,n){for(var r,o=t.length,s=-1;++s<o;)if(r=fn(t[s])?yn(e,t[s],n):bn(e,t[s],n))return r;var a=pn.dirname(e);return a===e?null:mn(a,t,n)}function yn(e,t,n){for(var r=gn.matcher(t,n),o=function(e){try{return un.readdirSync(e)}catch(e){}return[]}(e),s=o.length,a=-1;++a<s;){var i=o[a],l=pn.join(e,i);if(r(i)||r(l))return l}return null}function bn(e,t,n){var r=pn.resolve(e,t);return hn(r,n)}var vn,An,En,xn,Rn,Cn,Sn,_n,wn=h((function(e,t){t=t||{};var n=pn.resolve(dn(t.cwd||""));if("string"==typeof e)return mn(n,[e],t);if(!Array.isArray(e))throw new TypeError("findup-sync expects a string or array as the first argument.");return mn(n,e,t)})),Tn={exports:{}};function On(){if(xn)return En;xn=1;const e=An?vn:(An=1,vn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};En=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),s=Math.max(t,n,r),a=s-o;let i,l;s===o?i=0:t===s?i=(n-r)/a:n===s?i=2+(r-t)/a:r===s&&(i=4+(t-n)/a),i=Math.min(60*i,360),i<0&&(i+=360);const c=(o+s)/2;return l=s===o?0:c<=.5?a/(s+o):a/(2-s-o),[i,100*l,100*c]},n.rgb.hsv=function(e){let t,n,r,o,s;const a=e[0]/255,i=e[1]/255,l=e[2]/255,c=Math.max(a,i,l),u=c-Math.min(a,i,l),p=function(e){return(c-e)/6/u+.5};return 0===u?(o=0,s=0):(s=u/c,t=p(a),n=p(i),r=p(l),a===c?o=r-n:i===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*s,100*c]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const s=n.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[s,100*a,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const r=t[n];if(r)return r;let o,s=1/0;for(const t of Object.keys(e)){const r=e[t],l=(i=r,((a=n)[0]-i[0])**2+(a[1]-i[1])**2+(a[2]-i[2])**2);l<s&&(s=l,o=t)}var a,i;return o},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],s=t[2];r/=95.047,o/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*o-16,500*(r-o),200*(o-s)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,s,a;if(0===n)return a=255*r,[a,a,a];o=r<.5?r*(1+n):r+n-r*n;const i=2*r-o,l=[0,0,0];for(let e=0;e<3;e++)s=t+1/3*-(e-1),s<0&&s++,s>1&&s--,a=6*s<1?i+6*(o-i)*s:2*s<1?o:3*s<2?i+(o-i)*(2/3-s)*6:i,l[e]=255*a;return l},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=s<=1?s:2-s;return[t,100*(0===r?2*o/(s+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,s=t-Math.floor(t),a=255*r*(1-n),i=255*r*(1-n*s),l=255*r*(1-n*(1-s));switch(r*=255,o){case 0:return[r,l,a];case 1:return[i,r,a];case 2:return[a,r,l];case 3:return[a,i,r];case 4:return[l,a,r];case 5:return[r,a,i]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let s,a;a=(2-n)*r;const i=(2-n)*o;return s=n*o,s/=i<=1?i:2-i,s=s||0,a/=2,[t,100*s,100*a]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let s;o>1&&(n/=o,r/=o);const a=Math.floor(6*t),i=1-r;s=6*t-a,0!=(1&a)&&(s=1-s);const l=n+s*(i-n);let c,u,p;switch(a){default:case 6:case 0:c=i,u=l,p=n;break;case 1:c=l,u=i,p=n;break;case 2:c=n,u=i,p=l;break;case 3:c=n,u=l,p=i;break;case 4:c=l,u=n,p=i;break;case 5:c=i,u=n,p=l}return[255*c,255*u,255*p]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,s,a;return o=3.2406*t+-1.5372*n+-.4986*r,s=-.9689*t+1.8758*n+.0415*r,a=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[255*o,255*s,255*a]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,s=t**3,a=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,s]=e;let a=null===t?n.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let i=30+(Math.round(s/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(i+=60),i},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),s=Math.min(Math.min(t,n),r),a=o-s;let i,l;return i=a<1?s/(1-a):0,l=a<=0?0:o===t?(n-r)/a%6:o===n?2+(r-t)/a:4+(t-n)/a,l/=6,l%=1,[360*l,100*a,100*i]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],s=t%1*6,a=s%1,i=1-a;let l=0;switch(Math.floor(s)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=i,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=i,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=i}return l=(1-n)*r,[255*(n*o[0]+l),255*(n*o[1]+l),255*(n*o[2]+l)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},En}function In(){if(Cn)return Rn;Cn=1;const e=On();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,s=0;s<e;s++){const e=o[s],a=n[e];-1===a.distance&&(a.distance=n[t].distance+1,a.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let s=e[r[t].parent][t],a=r[t].parent;for(;r[a].parent;)o.unshift(r[a].parent),s=n(e[r[a].parent][a],s),a=r[a].parent;return s.conversion=o,s}return Rn=function(e){const n=t(e),o={},s=Object.keys(n);for(let e=s.length,t=0;t<e;t++){const e=s[t];null!==n[e].parent&&(o[e]=r(e,n))}return o}}function $n(){if(_n)return Sn;_n=1;const e=On(),t=In(),n={};return Object.keys(e).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach((e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),Sn=n}!function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},o=e=>e,s=(e,t,n)=>[e,t,n],a=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let i;const l=(e,t,n,r)=>{void 0===i&&(i=$n());const o=r?10:0,s={};for(const[r,a]of Object.entries(i)){const i="ansi16"===r?"ansi":r;r===t?s[i]=e(n,o):"object"==typeof a&&(s[i]=e(a[t],o))}return s};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.gray=i.color.blackBright,i.bgColor.bgGray=i.bgColor.bgBlackBright,i.color.grey=i.color.blackBright,i.bgColor.bgGrey=i.bgColor.bgBlackBright;for(const[t,n]of Object.entries(i)){for(const[t,r]of Object.entries(n))i[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=i[t],e.set(r[0],r[1]);Object.defineProperty(i,t,{value:n,enumerable:!1})}return Object.defineProperty(i,"codes",{value:e,enumerable:!1}),i.color.close="[39m",i.bgColor.close="[49m",a(i.color,"ansi",(()=>l(t,"ansi16",o,!1))),a(i.color,"ansi256",(()=>l(n,"ansi256",o,!1))),a(i.color,"ansi16m",(()=>l(r,"rgb",s,!1))),a(i.bgColor,"ansi",(()=>l(t,"ansi16",o,!0))),a(i.bgColor,"ansi256",(()=>l(n,"ansi256",o,!0))),a(i.bgColor,"ansi16m",(()=>l(r,"rgb",s,!0))),i}})}(Tn);var kn=Tn.exports;const Ln=n,Hn=o,Pn=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return-1!==r&&(-1===o||r<o)},{env:Mn}=process;let Nn;function Bn(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Gn(e,t){if(0===Nn)return 0;if(Pn("color=16m")||Pn("color=full")||Pn("color=truecolor"))return 3;if(Pn("color=256"))return 2;if(e&&!t&&void 0===Nn)return 0;const n=Nn||0;if("dumb"===Mn.TERM)return n;if("win32"===process.platform){const e=Ln.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Mn)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in Mn))||"codeship"===Mn.CI_NAME?1:n;if("TEAMCITY_VERSION"in Mn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Mn.TEAMCITY_VERSION)?1:0;if("truecolor"===Mn.COLORTERM)return 3;if("TERM_PROGRAM"in Mn){const e=parseInt((Mn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Mn.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Mn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Mn.TERM)||"COLORTERM"in Mn?1:n}Pn("no-color")||Pn("no-colors")||Pn("color=false")||Pn("color=never")?Nn=0:(Pn("color")||Pn("colors")||Pn("color=true")||Pn("color=always"))&&(Nn=1),"FORCE_COLOR"in Mn&&(Nn="true"===Mn.FORCE_COLOR?1:"false"===Mn.FORCE_COLOR?0:0===Mn.FORCE_COLOR.length?1:Math.min(parseInt(Mn.FORCE_COLOR,10),3));var Dn={supportsColor:function(e){return Bn(Gn(e,e&&e.isTTY))},stdout:Bn(Gn(!0,Hn.isatty(1))),stderr:Bn(Gn(!0,Hn.isatty(2)))};var jn,Un,Fn={stringReplaceAll:(e,t,n)=>{let r=e.indexOf(t);if(-1===r)return e;const o=t.length;let s=0,a="";do{a+=e.substr(s,r-s)+t+n,s=r+o,r=e.indexOf(t,s)}while(-1!==r);return a+=e.substr(s),a},stringEncaseCRLFWithFirstIndex:(e,t,n,r)=>{let o=0,s="";do{const a="\r"===e[r-1];s+=e.substr(o,(a?r-1:r)-o)+t+(a?"\r\n":"\n")+n,o=r+1,r=e.indexOf("\n",o)}while(-1!==r);return s+=e.substr(o),s}};const qn=kn,{stdout:Kn,stderr:Wn}=Dn,{stringReplaceAll:Jn,stringEncaseCRLFWithFirstIndex:Xn}=Fn,{isArray:Qn}=Array,zn=["ansi","ansi","ansi256","ansi16m"],Vn=Object.create(null);class Yn{constructor(e){return Zn(e)}}const Zn=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=Kn?Kn.level:0;e.level=void 0===t.level?n:t.level})(t,e),t.template=(...e)=>ir(t.template,...e),Object.setPrototypeOf(t,er.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Yn,t.template};function er(e){return Zn(e)}for(const[e,t]of Object.entries(qn))Vn[e]={get(){const n=or(this,rr(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:n}),n}};Vn.visible={get(){const e=or(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const tr=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of tr)Vn[e]={get(){const{level:t}=this;return function(...n){const r=rr(qn.color[zn[t]][e](...n),qn.color.close,this._styler);return or(this,r,this._isEmpty)}}};for(const e of tr){Vn["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=rr(qn.bgColor[zn[t]][e](...n),qn.bgColor.close,this._styler);return or(this,r,this._isEmpty)}}}}const nr=Object.defineProperties((()=>{}),{...Vn,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),rr=(e,t,n)=>{let r,o;return void 0===n?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},or=(e,t,n)=>{const r=(...e)=>Qn(e[0])&&Qn(e[0].raw)?sr(r,ir(r,...e)):sr(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,nr),r._generator=e,r._styler=t,r._isEmpty=n,r},sr=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(void 0===n)return t;const{openAll:r,closeAll:o}=n;if(-1!==t.indexOf(""))for(;void 0!==n;)t=Jn(t,n.close,n.open),n=n.parent;const s=t.indexOf("\n");return-1!==s&&(t=Xn(t,o,r,s)),r+t+o};let ar;const ir=(e,...t)=>{const[n]=t;if(!Qn(n)||!Qn(n.raw))return t.join(" ");const r=t.slice(1),o=[n.raw[0]];for(let e=1;e<n.length;e++)o.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]));return void 0===ar&&(ar=function(){if(Un)return jn;Un=1;const e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,t=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,r=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function s(e){const t="u"===e[0],n="{"===e[1];return t&&!n&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function a(e,t){const o=[],a=t.trim().split(/\s*,\s*/g);let i;for(const t of a){const a=Number(t);if(Number.isNaN(a)){if(!(i=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);o.push(i[2].replace(r,((e,t,n)=>t?s(t):n)))}else o.push(a)}return o}function i(e){t.lastIndex=0;const n=[];let r;for(;null!==(r=t.exec(e));){const e=r[1];if(r[2]){const t=a(e,r[2]);n.push([e].concat(t))}else n.push([e])}return n}function l(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const[e,t]of Object.entries(n))if(Array.isArray(t)){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=t.length>0?r[e](...t):r[e]}return r}return jn=(t,n)=>{const r=[],o=[];let a=[];if(n.replace(e,((e,n,c,u,p,f)=>{if(n)a.push(s(n));else if(u){const e=a.join("");a=[],o.push(0===r.length?e:l(t,r)(e)),r.push({inverse:c,styles:i(u)})}else if(p){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");o.push(l(t,r)(a.join(""))),a=[],r.pop()}else a.push(f)})),o.push(a.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return o.join("")},jn}()),ar(e,o.join(""))};Object.defineProperties(er.prototype,Vn);const lr=er();lr.supportsColor=Kn,lr.stderr=er({level:Wn?Wn.level:0}),lr.stderr.supportsColor=Wn;var cr=h(lr),ur={exports:{}},pr={exports:{}};const fr="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,dr=e,hr=fr?";":":",gr=X,mr=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),yr=(e,t)=>{const n=t.colon||hr,r=e.match(/\//)||fr&&e.match(/\\/)?[""]:[...fr?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=fr?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=fr?o.split(n):[""];return fr&&-1!==e.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:o}},br=(e,t,n)=>{"function"==typeof t&&(n=t,t={}),t||(t={});const{pathEnv:r,pathExt:o,pathExtExe:s}=yr(e,t),a=[],i=n=>new Promise(((o,s)=>{if(n===r.length)return t.all&&a.length?o(a):s(mr(e));const i=r[n],c=/^".*"$/.test(i)?i.slice(1,-1):i,u=dr.join(c,e),p=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;o(l(p,n,0))})),l=(e,n,r)=>new Promise(((c,u)=>{if(r===o.length)return c(i(n+1));const p=o[r];gr(e+p,{pathExt:s},((o,s)=>{if(!o&&s){if(!t.all)return c(e+p);a.push(e+p)}return c(l(e,n,r+1))}))}));return n?i(0).then((e=>n(null,e)),n):i(0)};var vr=br;br.sync=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:o}=yr(e,t),s=[];for(let a=0;a<n.length;a++){const i=n[a],l=/^".*"$/.test(i)?i.slice(1,-1):i,c=dr.join(l,e),u=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let e=0;e<r.length;e++){const n=u+r[e];try{if(gr.sync(n,{pathExt:o})){if(!t.all)return n;s.push(n)}}catch(e){}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw mr(e)};var Ar={exports:{}};const Er=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};Ar.exports=Er,Ar.exports.default=Er;var xr=Ar.exports;const Rr=e,Cr=vr,Sr=xr;function _r(e,t){const n=e.options.env||process.env,r=process.cwd(),o=null!=e.options.cwd,s=o&&void 0!==process.chdir&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch(e){}let a;try{a=Cr.sync(e.command,{path:n[Sr({env:n})],pathExt:t?Rr.delimiter:void 0})}catch(e){}finally{s&&process.chdir(r)}return a&&(a=Rr.resolve(o?e.options.cwd:"",a)),a}var wr=function(e){return _r(e)||_r(e,!0)},Tr={};const Or=/([()\][%!^"`<>&|;, *?])/g;Tr.command=function(e){return e=e.replace(Or,"^$1")},Tr.argument=function(e,t){return e=(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(Or,"^$1"),t&&(e=e.replace(Or,"^$1")),e};const Ir=/^#!(.*)/;const $r=t,kr=(e="")=>{const t=e.match(Ir);if(!t)return null;const[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return"env"===o?r:r?`${o} ${r}`:o};var Lr=function(e){const t=Buffer.alloc(150);let n;try{n=$r.openSync(e,"r"),$r.readSync(n,t,0,150,0),$r.closeSync(n)}catch(e){}return kr(t.toString())};const Hr=e,Pr=wr,Mr=Tr,Nr=Lr,Br="win32"===process.platform,Gr=/\.(?:com|exe)$/i,Dr=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function jr(e){if(!Br)return e;const t=function(e){e.file=Pr(e);const t=e.file&&Nr(e.file);return t?(e.args.unshift(e.file),e.command=t,Pr(e)):e.file}(e),n=!Gr.test(t);if(e.options.forceShell||n){const n=Dr.test(t);e.command=Hr.normalize(e.command),e.command=Mr.command(e.command),e.args=e.args.map((e=>Mr.argument(e,n)));const r=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${r}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}var Ur=function(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null);const r={command:e,args:t=t?t.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:e,args:t}};return n.shell?r:jr(r)};const Fr="win32"===process.platform;function qr(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Kr(e,t){return Fr&&1===e&&!t.file?qr(t.original,"spawn"):null}var Wr={hookChildProcess:function(e,t){if(!Fr)return;const n=e.emit;e.emit=function(r,o){if("exit"===r){const r=Kr(o,t);if(r)return n.call(e,"error",r)}return n.apply(e,arguments)}},verifyENOENT:Kr,verifyENOENTSync:function(e,t){return Fr&&1===e&&!t.file?qr(t.original,"spawnSync"):null},notFoundError:qr};const Jr=s,Xr=Ur,Qr=Wr;function zr(e,t,n){const r=Xr(e,t,n),o=Jr.spawn(r.command,r.args,r.options);return Qr.hookChildProcess(o,r),o}pr.exports=zr,pr.exports.spawn=zr,pr.exports.sync=function(e,t,n){const r=Xr(e,t,n),o=Jr.spawnSync(r.command,r.args,r.options);return o.error=o.error||Qr.verifyENOENTSync(o.status,r),o},pr.exports._parse=Xr,pr.exports._enoent=Qr;var Vr=pr.exports,Yr={exports:{}};!function(t){const n=e,r=xr,o=e=>{let t;e={cwd:process.cwd(),path:process.env[r()],execPath:process.execPath,...e};let o=n.resolve(e.cwd);const s=[];for(;t!==o;)s.push(n.join(o,"node_modules/.bin")),t=o,o=n.resolve(o,"..");const a=n.resolve(e.cwd,e.execPath,"..");return s.push(a),s.concat(e.path).join(n.delimiter)};t.exports=o,t.exports.default=o,t.exports.env=e=>{const n={...(e={env:process.env,...e}).env},o=r({env:n});return e.path=n[o],n[o]=t.exports(e),n}}(Yr);var Zr=Yr.exports,eo={exports:{}},to={exports:{}};const no=(e,t)=>{for(const n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};to.exports=no,to.exports.default=no;const ro=to.exports,oo=new WeakMap,so=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,r=0;const o=e.displayName||e.name||"<anonymous>",s=function(...a){if(oo.set(s,++r),1===r)n=e.apply(this,a),e=null;else if(!0===t.throw)throw new Error(`Function \`${o}\` can only be called once`);return n};return ro(s,e),oo.set(s,r),s};eo.exports=so,eo.exports.default=so,eo.exports.callCount=e=>{if(!oo.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return oo.get(e)};var ao=eo.exports,io={},lo={},co={};Object.defineProperty(co,"__esModule",{value:!0}),co.SIGNALS=void 0;co.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.SIGRTMAX=uo.getRealtimeSignals=void 0;uo.getRealtimeSignals=function(){const e=ho-fo+1;return Array.from({length:e},po)};const po=function(e,t){return{name:`SIGRT${t+1}`,number:fo+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},fo=34,ho=64;uo.SIGRTMAX=ho,Object.defineProperty(lo,"__esModule",{value:!0}),lo.getSignals=void 0;var go=n,mo=co,yo=uo;lo.getSignals=function(){const e=(0,yo.getRealtimeSignals)();return[...mo.SIGNALS,...e].map(bo)};const bo=function({name:e,number:t,description:n,action:r,forced:o=!1,standard:s}){const{signals:{[e]:a}}=go.constants,i=void 0!==a;return{name:e,number:i?a:t,description:n,supported:i,action:r,forced:o,standard:s}};Object.defineProperty(io,"__esModule",{value:!0}),io.signalsByNumber=io.signalsByName=void 0;var vo=n,Ao=lo,Eo=uo;const xo=function(e,{name:t,number:n,description:r,supported:o,action:s,forced:a,standard:i}){return{...e,[t]:{name:t,number:n,description:r,supported:o,action:s,forced:a,standard:i}}},Ro=(0,Ao.getSignals)().reduce(xo,{});io.signalsByName=Ro;const Co=function(e,t){const n=So(e,t);if(void 0===n)return{};const{name:r,description:o,supported:s,action:a,forced:i,standard:l}=n;return{[e]:{name:r,number:e,description:o,supported:s,action:a,forced:i,standard:l}}},So=function(e,t){const n=t.find((({name:t})=>vo.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))},_o=function(){const e=(0,Ao.getSignals)(),t=Eo.SIGRTMAX+1,n=Array.from({length:t},((t,n)=>Co(n,e)));return Object.assign({},...n)}();io.signalsByNumber=_o;const{signalsByName:wo}=io;var To=({stdout:e,stderr:t,all:n,error:r,signal:o,exitCode:s,command:a,escapedCommand:i,timedOut:l,isCanceled:c,killed:u,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(o=null===o?void 0:o)?void 0:wo[o].description,d=(({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:s,isCanceled:a})=>e?`timed out after ${t} milliseconds`:a?"was canceled":void 0!==n?`failed with ${n}`:void 0!==r?`was killed with ${r} (${o})`:void 0!==s?`failed with exit code ${s}`:"failed")({timedOut:l,timeout:p,errorCode:r&&r.code,signal:o,signalDescription:f,exitCode:s,isCanceled:c}),h=`Command ${d}: ${a}`,g="[object Error]"===Object.prototype.toString.call(r),m=g?`${h}\n${r.message}`:h,y=[m,t,e].filter(Boolean).join("\n");return g?(r.originalMessage=r.message,r.message=y):r=new Error(y),r.shortMessage=m,r.command=a,r.escapedCommand=i,r.exitCode=s,r.signal=o,r.signalDescription=f,r.stdout=e,r.stderr=t,void 0!==n&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=Boolean(l),r.isCanceled=c,r.killed=u&&!l,r},Oo={exports:{}};const Io=["stdin","stdout","stderr"],$o=e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return Io.map((t=>e[t]));if((e=>Io.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Io.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);const n=Math.max(t.length,Io.length);return Array.from({length:n},((e,n)=>t[n]))};Oo.exports=$o,Oo.exports.node=e=>{const t=$o(e);return"ipc"===t?"ipc":void 0===t||"string"==typeof t?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]};var ko,Lo=Oo.exports,Ho={exports:{}},Po={exports:{}};var Mo=d.process;const No=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(No(Mo)){var Bo,Go=a,Do=(ko||(ko=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(Po)),Po.exports),jo=/^win/i.test(Mo.platform),Uo=i;"function"!=typeof Uo&&(Uo=Uo.EventEmitter),Mo.__signal_exit_emitter__?Bo=Mo.__signal_exit_emitter__:((Bo=Mo.__signal_exit_emitter__=new Uo).count=0,Bo.emitted={}),Bo.infinite||(Bo.setMaxListeners(1/0),Bo.infinite=!0),Ho.exports=function(e,t){if(!No(d.process))return function(){};Go.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Wo&&Jo();var n="exit";t&&t.alwaysLast&&(n="afterexit");return Bo.on(n,e),function(){Bo.removeListener(n,e),0===Bo.listeners("exit").length&&0===Bo.listeners("afterexit").length&&Fo()}};var Fo=function(){Wo&&No(d.process)&&(Wo=!1,Do.forEach((function(e){try{Mo.removeListener(e,Ko[e])}catch(e){}})),Mo.emit=zo,Mo.reallyExit=Xo,Bo.count-=1)};Ho.exports.unload=Fo;var qo=function(e,t,n){Bo.emitted[e]||(Bo.emitted[e]=!0,Bo.emit(e,t,n))},Ko={};Do.forEach((function(e){Ko[e]=function(){No(d.process)&&(Mo.listeners(e).length===Bo.count&&(Fo(),qo("exit",null,e),qo("afterexit",null,e),jo&&"SIGHUP"===e&&(e="SIGINT"),Mo.kill(Mo.pid,e)))}})),Ho.exports.signals=function(){return Do};var Wo=!1,Jo=function(){!Wo&&No(d.process)&&(Wo=!0,Bo.count+=1,Do=Do.filter((function(e){try{return Mo.on(e,Ko[e]),!0}catch(e){return!1}})),Mo.emit=Vo,Mo.reallyExit=Qo)};Ho.exports.load=Jo;var Xo=Mo.reallyExit,Qo=function(e){No(d.process)&&(Mo.exitCode=e||0,qo("exit",Mo.exitCode,null),qo("afterexit",Mo.exitCode,null),Xo.call(Mo,Mo.exitCode))},zo=Mo.emit,Vo=function(e,t){if("exit"===e&&No(d.process)){void 0!==t&&(Mo.exitCode=t);var n=zo.apply(this,arguments);return qo("exit",Mo.exitCode,null),qo("afterexit",Mo.exitCode,null),n}return zo.apply(this,arguments)}}else Ho.exports=function(){return function(){}};var Yo=Ho.exports;const Zo=n,es=Yo,ts=(e,t,n,r)=>{if(!ns(t,n,r))return;const o=os(n),s=setTimeout((()=>{e("SIGKILL")}),o);s.unref&&s.unref()},ns=(e,{forceKillAfterTimeout:t},n)=>rs(e)&&!1!==t&&n,rs=e=>e===Zo.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),os=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};var ss={spawnedKill:(e,t="SIGTERM",n={})=>{const r=e(t);return ts(e,t,n,r),r},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(0===t||void 0===t)return r;let o;const s=new Promise(((r,s)=>{o=setTimeout((()=>{((e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,n,s)}),t)})),a=r.finally((()=>{clearTimeout(o)}));return Promise.race([s,a])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;const o=es((()=>{e.kill()}));return r.finally((()=>{o()}))}};const as=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;as.writable=e=>as(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,as.readable=e=>as(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,as.duplex=e=>as.writable(e)&&as.readable(e),as.transform=e=>as.duplex(e)&&"function"==typeof e._transform;var is=as,ls={exports:{}};const{PassThrough:cs}=c;const{constants:us}=l,ps=c,{promisify:fs}=r,ds=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const r="buffer"===n;let o=!1;t?o=!(n||r):n=n||"utf8",r&&(n=null);const s=new cs({objectMode:o});n&&s.setEncoding(n);let a=0;const i=[];return s.on("data",(e=>{i.push(e),o?a=i.length:a+=e.length})),s.getBufferedValue=()=>t?i:r?Buffer.concat(i,a):i.join(""),s.getBufferedLength=()=>a,s},hs=fs(ps.pipeline);class gs extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function ms(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:n}=t,r=ds(t);return await new Promise(((t,o)=>{const s=e=>{e&&r.getBufferedLength()<=us.MAX_LENGTH&&(e.bufferedData=r.getBufferedValue()),o(e)};(async()=>{try{await hs(e,r),t()}catch(e){s(e)}})(),r.on("data",(()=>{r.getBufferedLength()>n&&s(new gs)}))})),r.getBufferedValue()}ls.exports=ms,ls.exports.buffer=(e,t)=>ms(e,{...t,encoding:"buffer"}),ls.exports.array=(e,t)=>ms(e,{...t,array:!0}),ls.exports.MaxBufferError=gs;var ys=ls.exports;const{PassThrough:bs}=c;const vs=is,As=ys,Es=function(){var e=[],t=new bs({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=function(){return 0==e.length},t.on("unpipe",r),Array.prototype.slice.call(arguments).forEach(n),t;function n(o){return Array.isArray(o)?(o.forEach(n),this):(e.push(o),o.once("end",r.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}function r(n){!(e=e.filter((function(e){return e!==n}))).length&&t.readable&&t.end()}},xs=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},Rs=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t?As(e,{encoding:t,maxBuffer:r}):As.buffer(e,{maxBuffer:r})};var Cs={handleInput:(e,t)=>{void 0!==t&&void 0!==e.stdin&&(vs(t)?t.pipe(e.stdin):e.stdin.end(t))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=Es();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:n},{encoding:r,buffer:o,maxBuffer:s},a)=>{const i=Rs(e,{encoding:r,buffer:o,maxBuffer:s}),l=Rs(t,{encoding:r,buffer:o,maxBuffer:s}),c=Rs(n,{encoding:r,buffer:o,maxBuffer:2*s});try{return await Promise.all([a,i,l,c])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},xs(e,i),xs(t,l),xs(n,c)])}},validateInputSync:({input:e})=>{if(vs(e))throw new TypeError("The `input` option cannot be a stream in sync mode")}};const Ss=(async()=>{})().constructor.prototype,_s=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Ss,e)]));var ws={mergePromise:(e,t)=>{for(const[n,r]of _s){const o="function"==typeof t?(...e)=>Reflect.apply(r.value,t(),e):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}return e},getSpawnedPromise:e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})})),e.on("error",(e=>{n(e)})),e.stdin&&e.stdin.on("error",(e=>{n(e)}))}))};const Ts=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Os=/^[\w.-]+$/,Is=/"/g,$s=/ +/g;var ks={joinCommand:(e,t)=>Ts(e,t).join(" "),getEscapedCommand:(e,t)=>Ts(e,t).map((e=>(e=>"string"!=typeof e||Os.test(e)?e:`"${e.replace(Is,'\\"')}"`)(e))).join(" "),parseCommand:e=>{const t=[];for(const n of e.trim().split($s)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${n}`:t.push(n)}return t}};const Ls=e,Hs=s,Ps=Vr,Ms=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),n="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e},Ns=Zr,Bs=ao,Gs=To,Ds=Lo,{spawnedKill:js,spawnedCancel:Us,setupTimeout:Fs,validateTimeout:qs,setExitHandler:Ks}=ss,{handleInput:Ws,getSpawnedResult:Js,makeAllStream:Xs,validateInputSync:Qs}=Cs,{mergePromise:zs,getSpawnedPromise:Vs}=ws,{joinCommand:Ys,parseCommand:Zs,getEscapedCommand:ea}=ks,ta=(e,t,n={})=>{const r=Ps._parse(e,t,n);return e=r.command,t=r.args,(n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(n=r.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n}).env=(({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{const s=t?{...process.env,...e}:e;return n?Ns.env({env:s,cwd:r,execPath:o}):s})(n),n.stdio=Ds(n),"win32"===process.platform&&"cmd"===Ls.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},na=(e,t,n)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?Ms(t):t:void 0===n?void 0:"",ra=(e,t,n)=>{const r=ta(e,t,n),o=Ys(e,t),s=ea(e,t);let a;qs(r.options);try{a=Hs.spawn(r.file,r.args,r.options)}catch(e){const t=new Hs.ChildProcess,n=Promise.reject(Gs({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return zs(t,n)}const i=Vs(a),l=Fs(a,r.options,i),c=Ks(a,r.options,l),u={isCanceled:!1};a.kill=js.bind(null,a.kill.bind(a)),a.cancel=Us.bind(null,a,u);const p=Bs((async()=>{const[{error:e,exitCode:t,signal:n,timedOut:i},l,p,f]=await Js(a,r.options,c),d=na(r.options,l),h=na(r.options,p),g=na(r.options,f);if(e||0!==t||null!==n){const l=Gs({error:e,exitCode:t,signal:n,stdout:d,stderr:h,all:g,command:o,escapedCommand:s,parsed:r,timedOut:i,isCanceled:u.isCanceled,killed:a.killed});if(!r.options.reject)return l;throw l}return{command:o,escapedCommand:s,exitCode:0,stdout:d,stderr:h,all:g,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return Ws(a,r.options.input),a.all=Xs(a,r.options),zs(a,p)};function oa(e,t){return aa("blue",e,t)}function sa(e,t=""){return aa("red",e,t)}function aa(e,t,n=""){return n?console.log(cr[e](`${t}`),n):console.log(cr[e](`${t}`))}ur.exports=ra,ur.exports.sync=(e,t,n)=>{const r=ta(e,t,n),o=Ys(e,t),s=ea(e,t);let a;Qs(r.options);try{a=Hs.spawnSync(r.file,r.args,r.options)}catch(e){throw Gs({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}const i=na(r.options,a.stdout,a.error),l=na(r.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=Gs({stdout:i,stderr:l,error:a.error,signal:a.signal,exitCode:a.status,command:o,escapedCommand:s,parsed:r,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!r.options.reject)return e;throw e}return{command:o,escapedCommand:s,exitCode:0,stdout:i,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ur.exports.command=(e,t)=>{const[n,...r]=Zs(e);return ra(n,r,t)},ur.exports.commandSync=(e,t)=>{const[n,...r]=Zs(e);return ra.sync(n,r,t)},ur.exports.node=(e,t,n={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(n=t,t=[]);const r=Ds.node(n),o=process.execArgv.filter((e=>!e.startsWith("--inspect"))),{nodePath:s=process.execPath,nodeOptions:a=o}=n;return ra(s,[...a,e,...Array.isArray(t)?t:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})};var ia=(e={})=>{const{name:t}=e;return`<template>\n <div class="app-container">\n <CoustomTable\n :queryFormJson="queryFormJson"\n :pageButtonsJson="pageButtonsJson"\n :tableJson="tableJson"\n :tableData="tableData"\n @onPageButton="handlerPageButton"\n @onButton="handlerButton"\n @onSearch="handlerSearch"\n @onTableRowClick="handlerTableRowClick"\n >\n </CoustomTable>\n\n <CoustomFormDialog\n ref="formDialog"\n :visible.sync="dialogVisible"\n :dialogJson="dialogJson"\n :initData="initFormData"\n @onSubmit="handlerSubmit"\n ></CoustomFormDialog>\n </div>\n</template>\n<script>\nimport CoustomTable from "@/components/CoustomTable";\nimport CoustomFormDialog from "@/components/CoustomFormDialog";\nimport { TableJson, QueryFormJson, PageButtonsJson, DialogJson } from "./constants";\nimport { \n getDevApiIotClassesList, \n postDevApiIotClasses, \n getDevApiIotClassesClassId, \n deleteDevApiIotClassesClassId,\n putDevApiIotClasses\n } from "@/api/iot/classes-controller.js";\n import {\n getDevApiIotPackagesList,\n} from "@/api/iot/packages-controller.js";\nexport default {\n name: '${t.toLowerCase().replace(/( |^)[a-z]/g,(e=>e.toUpperCase()))}',\n components: {\n CoustomTable,\n CoustomFormDialog\n },\n data() {\n return {\n queryFormJson: QueryFormJson,\n pageButtonsJson: PageButtonsJson,\n tableJson: TableJson,\n dialogJson: DialogJson,\n tableData: [],\n // 总条数\n total: 0,\n // 查询参数\n queryParams: {\n pageNum: 1,\n pageSize: 10,\n },\n dialogVisible: false,\n initFormData: {},\n }\n },\n created() {\n },\n mounted() {\n this.getList();\n },\n computed: {\n packageName() {\n const { query } = this.$route;\n return query.packageName\n }\n },\n methods: {\n async getPackageData() {\n try {\n const { rows = [] } = await getDevApiIotPackagesList();\n return rows.map(item => {\n return {\n value: item.packageCode,\n label: item.packageDispname,\n }\n })\n } catch (error) {\n return []\n }\n },\n\n async handlerSubmit(formData) {\n let params = {\n ...formData,\n packageName: this.packageName\n };\n let msgText = '新增';\n let func = postDevApiIotClasses;\n if (this.dialogJson.type === 'Edit') {\n params.classId = this.initFormData.classId;\n msgText = '编辑';\n func = putDevApiIotClasses;\n }\n try {\n const { code } = await func(params);\n if (code === 200) {\n this.dialogVisible = false;\n this.getList();\n this.$modal.msgSuccess(msgText + "成功");\n }\n this.$refs.formDialog.resetLoading();\n } catch (error) {\n // 接口调用失败重置 loading\n this.$refs.formDialog.resetLoading();\n }\n },\n\n /** 查询表集合 */\n getList(queryParams = {}) {\n this.loading = true;\n let queryData = {\n ...queryParams,\n ...this.queryParams,\n packageName: this.packageName\n }\n getDevApiIotClassesList(queryData).then(response => {\n this.tableData = response.rows;\n this.total = response.total;\n this.loading = false;\n });\n },\n\n handlerTableRowClick(item) {\n console.log('object :>>item ', item);\n this.$router.push({\n path: '/iot/packages/classes/detail',\n query: {\n classId: item.classId\n }\n })\n },\n\n // 搜索事件\n handlerSearch(searchParams) {\n this.queryParams = {\n pageNum: 1,\n pageSize: 10,\n },\n this.getList(searchParams);\n },\n\n //新增按钮事件\n async handlerPageButton(item) {\n const { type } = item;\n if (type === 'Add') {\n this.initFormData = {};\n this.dialogJson.type = 'Add';\n const packageData = await this.getPackageData()\n this.$set(this.dialogJson.formJson.formItemJson[0], 'option',packageData )\n console.log('object :>> ', this.dialogJson);\n this.dialogVisible = true;\n }\n\n if (type === 'Delete') {\n const tableIds = row.tableId || this.ids;\n this.$modal.confirm('是否确认删除表编号为"' + tableIds + '"的数据项?').then(function () {\n return delTable(tableIds);\n }).then(() => {\n this.getList();\n this.$modal.msgSuccess("删除成功");\n }).catch(() => { });\n }\n },\n\n async getInfo(id) {\n const { code, data } = await getDevApiIotClassesClassId(id);\n if (code === 200) {\n\n this.initFormData = data;\n this.dialogJson.type = 'Edit';\n this.dialogVisible = true;\n }\n },\n\n deleteItem(id) {\n this.$modal.confirm('是否确认删除该数据项?').then(function () {\n return deleteDevApiIotClassesClassId(id);\n }).then(() => {\n this.getList();\n this.$modal.msgSuccess("删除成功");\n }).catch(() => { });\n },\n\n handlerButton(btnItem) {\n const { row, item } = btnItem;\n const { type } = item;\n if (type === 'Edit') {\n this.getInfo(row.classId);\n }\n\n if (type === 'Delete') {\n this.deleteItem(row.classId);\n }\n },\n },\n}\n<\/script>\n<style scoped lang='scss'></style>`},la=()=>'export const QueryFormJson = {\n formOption: {\n inline: true,\n labelWidth: "100px",\n size: \'small\',\n },\n formItemJson: [\n {\n label: "类中文名称",\n prop: "classDispname",\n type: "Input",\n isEnter: true,\n options: {\n clearable: true,\n placeholder: \'请输入类名称\',\n }\n }\n ],\n buttonJson: {\n type: \'Search\',\n list: [\n {\n label: "搜索",\n type: \'Query\',\n options: {\n icon: "el-icon-search",\n size: "mini",\n type: "primary"\n }\n },\n {\n label: "重置",\n type: \'Reset\',\n options: {\n icon: "el-icon-refresh",\n size: "mini",\n }\n },\n ]\n\n }\n}\n\nexport const PageButtonsJson = {\n rowJson: {\n gutter: 10,\n },\n buttonList: [\n {\n span: 1.5,\n label: \'新增\',\n permi: \'\',\n type: \'Add\',\n options: [\n {\n icon: "el-icon-plus",\n plain: true,\n size: "mini",\n type: "primary",\n },\n \n ]\n }\n ]\n}\n\nexport const TableJson = {\n columnJson: {\n showSelect: false,\n showIndex: true,\n data: [\n {\n type: "index",\n width: "55",\n align: "left",\n headerAlign: "left",\n label: "序号" \n },\n {\n align: "left",\n headerAlign: "left",\n label: "类中文名称",\n prop: "classDispname",\n showOverflowTooltip: true,\n isLink: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "类英文名称",\n prop: "classCode",\n showOverflowTooltip: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "类类型",\n prop: "classesType",\n showOverflowTooltip: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "访问类型",\n prop: "accessType",\n showOverflowTooltip: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "实例存储表名称",\n prop: "delFlag",\n showOverflowTooltip: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "备注",\n prop: "remark",\n showOverflowTooltip: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "创建时间",\n prop: "createTime",\n showOverflowTooltip: true,\n },\n {\n align: "center",\n headerAlign: "center",\n label: "操作",\n type: "func",\n buttonList: [\n {\n label: "编辑",\n type: \'Edit\',\n permi: \'\',\n options: {\n icon: "el-icon-edit",\n size: "mini",\n type: "text",\n }\n },\n {\n label: "删除",\n type: \'Delete\',\n permi: \'\',\n options: {\n icon: "el-icon-delete",\n size: "mini",\n type: "text",\n }\n },\n ],\n },\n ],\n },\n};\n\nexport const DialogJson = {\n type: \'Add\',\n title: "类",\n options: {\n width: "600px",\n appendToBody: true,\n destroyOnClose: true,\n closeOnClickModal: false,\n },\n buttonList: [\n {\n label: "确定",\n type: \'Ok\',\n permi: \'\',\n options: {\n type: "primary",\n }\n },\n {\n label: "取消",\n type: \'Cancel\',\n permi: \'\',\n options: {\n type: "",\n }\n },\n ],\n formJson: {\n // 表单设置\n formOption: {\n inline: false,\n labelWidth: "120px",\n size: \'small\',\n },\n // 表单项\n formItemJson: [\n // {\n // label: "包编码",\n // prop: "packageCode",\n // type: "Select",\n // rules: [{ required: true, message: "请选择包编码", trigger: "change" }],\n // options: {\n // clearable: true,\n // placeholder: "请选择包编码",\n // },\n // option: [],\n // },\n {\n label: "类中文名称",\n prop: "classDispname",\n type: "Input",\n rules: [\n { required: true, message: \'请输入类中文名称\', trigger: \'blur\' },\n ],\n options: {\n clearable: true,\n placeholder: \'请输入类中文名称\',\n }\n },\n {\n label: "类英文名称",\n prop: "className",\n type: "Input",\n rules: [\n { required: true, message: \'请输入类英文名称\', trigger: \'blur\' },\n {\n required: true,\n validator: (rule, value, callback) => {\n const reg = /^[a-zA-Z]{1}w*$/;\n if (!reg.test(value)) {\n callback(\n new Error(\n "请输入以字母(不区分大小写)、数字、下划线(_)随意组合的字符串"\n )\n );\n }\n callback();\n },\n trigger: ["blur"],\n },\n ],\n options: {\n clearable: true,\n placeholder: \'请输入类英文名称\',\n }\n },\n {\n label: "类类型",\n prop: "classesType",\n type: "Select",\n rules: [{ required: true, message: "请选择类类型", trigger: "change" }],\n options: {\n clearable: true,\n placeholder: "请选择类型",\n },\n option: [\n {\n value: \'继承\',\n label: \'继承\',\n },\n {\n value: \'虚类\',\n label: \'虚类\',\n },\n {\n value: \'实体类\',\n label: \'实体类\',\n },\n ],\n },\n {\n label: "继承父类code",\n prop: "classesExtends",\n type: "Input",\n rules: [\n { required: true, message: \'请输入继承父类code\', trigger: \'blur\' },\n ],\n options: {\n clearable: true,\n placeholder: \'请输入继承父类code\',\n }\n },\n {\n label: "访问类型",\n prop: "accessType",\n type: "Select",\n rules: [{ required: true, message: "请选择访问类型", trigger: "change" }],\n options: {\n clearable: true,\n placeholder: "请选择访问类型",\n },\n option: [\n {\n value: \'default\',\n label: \'default\',\n },\n {\n value: \'public\',\n label: \'public\',\n },\n {\n value: \'protected\',\n label: \'protected\',\n },\n {\n value: \'private\',\n label: \'private\',\n },\n ],\n },\n {\n label: "实例存储表名称",\n prop: "objTableName",\n type: "Input",\n rules: [\n { required: true, message: \'请输入实例存储表名称\', trigger: \'blur\' },\n ],\n options: {\n clearable: true,\n placeholder: \'请输入实例存储表名称\',\n }\n },\n {\n label: "视图样式",\n prop: "viewStyle",\n type: "Input",\n rules: [\n { required: false, message: \'请输入视图样式\', trigger: \'blur\' },\n ],\n options: {\n clearable: true,\n placeholder: \'请输入视图样式\',\n }\n },\n {\n label: "备注",\n prop: "remark",\n type: "Input",\n rules: [],\n options: {\n clearable: true,\n placeholder: \'请输入备注\',\n type: \'textarea\',\n row: 4\n }\n },\n ],\n }\n\n}',ca={isEnter:!0,name:"genPageTable",path:"dome",child:[{name:"index.vue",template:(e={})=>ia({title:"pageTable",...e}),templateConfig:{}},{name:"constants.js",template:(e={})=>la({title:"pageTable",...e}),templateConfig:{title:""}}]};const ua=p.dirname(u.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&f.src||new URL("index.cjs.js",document.baseURI).href)),pa=(...t)=>e.resolve(ua,...t);(async function(){return await async function(e){const t=wn("dyp.config.js",{cwd:process.env.PWD}),n=await import(t);return e?n.default[e]:n.default}("genPageConfig")})().then((e=>{const t=e||ca;var n;t||sa("全局模板未配置,使用默认配置"),(n=t).isEnter?(oa("请输入要生成的页面组件名称、会生成在 views/目录下"),process.stdin.on("data",(async e=>{const t=String(e).trim().toString();ga(n,t),process.stdin.emit("end")})),process.stdin.on("end",(()=>{oa("exit"),process.exit()}))):ga(n)}));const fa=(e,n)=>{t.existsSync(e)?sa(`${e}文件已存在`):t.writeFileSync(e,n,"utf8",(e=>{e?(sa(e.message),reject(e)):pa(!0)}))};function da(e){return new Promise((t=>{ha(e,(function(){t(!0)}))}))}function ha(n,r){t.existsSync(n)?r():ha(e.dirname(n),(function(){t.mkdirSync(n),r()}))}async function ga(e,n){const r=n||e.name,o=e.path?`${process.env.PWD}/src/views/${e.path}`:`${process.env.PWD}/src/views`,s=pa(o,r);if(t.existsSync(s))return sa(`${r}页面已存在`),void(r&&process.stdin.emit("end"));oa(`正在生成${r}目录 ${s}`),await da(s);try{e.child.forEach((e=>{const t=pa(s,e.name);oa(`正在生成子文件${e.name} ${t}`),fa(t,e.template({name:r}))})),function(e,t=""){aa("green",e,t)}("生成成功")}catch(e){sa(e.message)}}
|