chrome-webstore-upload-keys 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1532 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";
3
- /******/ var __webpack_modules__ = ({
4
-
5
- /***/ 336:
6
- /***/ ((module) => {
7
-
8
- let p = process || {}, argv = p.argv || [], env = p.env || {}
9
- let isColorSupported =
10
- !(!!env.NO_COLOR || argv.includes("--no-color")) &&
11
- (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI)
12
-
13
- let formatter = (open, close, replace = open) =>
14
- input => {
15
- let string = "" + input, index = string.indexOf(close, open.length)
16
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close
17
- }
18
-
19
- let replaceClose = (string, close, replace, index) => {
20
- let result = "", cursor = 0
21
- do {
22
- result += string.substring(cursor, index) + replace
23
- cursor = index + close.length
24
- index = string.indexOf(close, cursor)
25
- } while (~index)
26
- return result + string.substring(cursor)
27
- }
28
-
29
- let createColors = (enabled = isColorSupported) => {
30
- let f = enabled ? formatter : () => String
31
- return {
32
- isColorSupported: enabled,
33
- reset: f("\x1b[0m", "\x1b[0m"),
34
- bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
35
- dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
36
- italic: f("\x1b[3m", "\x1b[23m"),
37
- underline: f("\x1b[4m", "\x1b[24m"),
38
- inverse: f("\x1b[7m", "\x1b[27m"),
39
- hidden: f("\x1b[8m", "\x1b[28m"),
40
- strikethrough: f("\x1b[9m", "\x1b[29m"),
41
-
42
- black: f("\x1b[30m", "\x1b[39m"),
43
- red: f("\x1b[31m", "\x1b[39m"),
44
- green: f("\x1b[32m", "\x1b[39m"),
45
- yellow: f("\x1b[33m", "\x1b[39m"),
46
- blue: f("\x1b[34m", "\x1b[39m"),
47
- magenta: f("\x1b[35m", "\x1b[39m"),
48
- cyan: f("\x1b[36m", "\x1b[39m"),
49
- white: f("\x1b[37m", "\x1b[39m"),
50
- gray: f("\x1b[90m", "\x1b[39m"),
51
-
52
- bgBlack: f("\x1b[40m", "\x1b[49m"),
53
- bgRed: f("\x1b[41m", "\x1b[49m"),
54
- bgGreen: f("\x1b[42m", "\x1b[49m"),
55
- bgYellow: f("\x1b[43m", "\x1b[49m"),
56
- bgBlue: f("\x1b[44m", "\x1b[49m"),
57
- bgMagenta: f("\x1b[45m", "\x1b[49m"),
58
- bgCyan: f("\x1b[46m", "\x1b[49m"),
59
- bgWhite: f("\x1b[47m", "\x1b[49m"),
60
-
61
- blackBright: f("\x1b[90m", "\x1b[39m"),
62
- redBright: f("\x1b[91m", "\x1b[39m"),
63
- greenBright: f("\x1b[92m", "\x1b[39m"),
64
- yellowBright: f("\x1b[93m", "\x1b[39m"),
65
- blueBright: f("\x1b[94m", "\x1b[39m"),
66
- magentaBright: f("\x1b[95m", "\x1b[39m"),
67
- cyanBright: f("\x1b[96m", "\x1b[39m"),
68
- whiteBright: f("\x1b[97m", "\x1b[39m"),
69
-
70
- bgBlackBright: f("\x1b[100m", "\x1b[49m"),
71
- bgRedBright: f("\x1b[101m", "\x1b[49m"),
72
- bgGreenBright: f("\x1b[102m", "\x1b[49m"),
73
- bgYellowBright: f("\x1b[103m", "\x1b[49m"),
74
- bgBlueBright: f("\x1b[104m", "\x1b[49m"),
75
- bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
76
- bgCyanBright: f("\x1b[106m", "\x1b[49m"),
77
- bgWhiteBright: f("\x1b[107m", "\x1b[49m"),
78
- }
79
- }
80
-
81
- module.exports = createColors()
82
- module.exports.createColors = createColors
83
-
84
-
85
- /***/ }),
86
-
87
- /***/ 858:
88
- /***/ ((module) => {
89
-
90
-
91
-
92
- const ESC = '\x1B';
93
- const CSI = `${ESC}[`;
94
- const beep = '\u0007';
95
-
96
- const cursor = {
97
- to(x, y) {
98
- if (!y) return `${CSI}${x + 1}G`;
99
- return `${CSI}${y + 1};${x + 1}H`;
100
- },
101
- move(x, y) {
102
- let ret = '';
103
-
104
- if (x < 0) ret += `${CSI}${-x}D`;
105
- else if (x > 0) ret += `${CSI}${x}C`;
106
-
107
- if (y < 0) ret += `${CSI}${-y}A`;
108
- else if (y > 0) ret += `${CSI}${y}B`;
109
-
110
- return ret;
111
- },
112
- up: (count = 1) => `${CSI}${count}A`,
113
- down: (count = 1) => `${CSI}${count}B`,
114
- forward: (count = 1) => `${CSI}${count}C`,
115
- backward: (count = 1) => `${CSI}${count}D`,
116
- nextLine: (count = 1) => `${CSI}E`.repeat(count),
117
- prevLine: (count = 1) => `${CSI}F`.repeat(count),
118
- left: `${CSI}G`,
119
- hide: `${CSI}?25l`,
120
- show: `${CSI}?25h`,
121
- save: `${ESC}7`,
122
- restore: `${ESC}8`
123
- }
124
-
125
- const scroll = {
126
- up: (count = 1) => `${CSI}S`.repeat(count),
127
- down: (count = 1) => `${CSI}T`.repeat(count)
128
- }
129
-
130
- const erase = {
131
- screen: `${CSI}2J`,
132
- up: (count = 1) => `${CSI}1J`.repeat(count),
133
- down: (count = 1) => `${CSI}J`.repeat(count),
134
- line: `${CSI}2K`,
135
- lineEnd: `${CSI}K`,
136
- lineStart: `${CSI}1K`,
137
- lines(count) {
138
- let clear = '';
139
- for (let i = 0; i < count; i++)
140
- clear += this.line + (i < count - 1 ? cursor.up() : '');
141
- if (count)
142
- clear += cursor.left;
143
- return clear;
144
- }
145
- }
146
-
147
- module.exports = { cursor, scroll, erase, beep };
148
-
149
-
150
- /***/ }),
151
-
152
- /***/ 67:
153
- /***/ ((module) => {
154
-
155
- module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http");
156
-
157
- /***/ }),
158
-
159
- /***/ 161:
160
- /***/ ((module) => {
161
-
162
- module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:os");
163
-
164
- /***/ }),
165
-
166
- /***/ 708:
167
- /***/ ((module) => {
168
-
169
- module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:process");
170
-
171
- /***/ }),
172
-
173
- /***/ 805:
174
- /***/ ((__webpack_module__, __unused_webpack___webpack_exports__, __nccwpck_require__) => {
175
-
176
- __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
177
- /* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(708);
178
- /* harmony import */ var node_http__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(67);
179
- /* harmony import */ var _clack_prompts__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(241);
180
- /* harmony import */ var open__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(908);
181
- /* harmony import */ var get_port__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(16);
182
- /* harmony import */ var p_defer__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(472);
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
- if (typeof fetch !== 'function') {
191
- throw new TypeError('This script requires Node.js 18.0 or newer because it relies on the global `fetch` function.');
192
- }
193
-
194
- const approvalCode = (0,p_defer__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)();
195
- const port = await (0,get_port__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Ay)();
196
- const localhost = '127.0.0.1';
197
-
198
- // TODO: Remove after https://github.com/natemoo-re/clack/issues/181
199
- const tasks = async tasks => {
200
- for (const task of tasks) {
201
- if (task.enabled === false) {
202
- continue;
203
- }
204
-
205
- const s = _clack_prompts__WEBPACK_IMPORTED_MODULE_2__/* .spinner */ .u1();
206
- s.start(task.title);
207
- // eslint-disable-next-line no-await-in-loop -- Sequential
208
- const result = await task.task(s.message);
209
- s.stop(result || task.title);
210
- }
211
- };
212
-
213
- const server = (0,node_http__WEBPACK_IMPORTED_MODULE_1__.createServer)((request, response) => {
214
- const {searchParams} = new URL(request.url, serverUrl);
215
- if (searchParams.has('code')) {
216
- approvalCode.resolve(searchParams.get('code'));
217
- // Html header
218
- response.writeHead(200, {'Content-Type': 'text/html'});
219
- response.end('You can close this tab now. <script>window.close()</script>');
220
- server.close();
221
- return;
222
- }
223
-
224
- response.writeHead(400, {'Content-Type': 'text/plain'});
225
- response.end('No `code` found in the URL. WHO R U?');
226
- });
227
-
228
- // Start the server on port 3000
229
- server.listen(port, localhost);
230
-
231
- const serverUrl = `http://${localhost}:${port}`;
232
-
233
- function required(input) {
234
- if (input.trim() === '') {
235
- return 'Required';
236
- }
237
- }
238
-
239
- async function getRefreshToken() {
240
- const request = await fetch('https://accounts.google.com/o/oauth2/token', {
241
- method: 'POST',
242
- body: new URLSearchParams([
243
- ['client_id', group.clientId.trim()],
244
- ['client_secret', group.clientSecret.trim()],
245
- ['code', code],
246
- ['grant_type', 'authorization_code'],
247
- ['redirect_uri', serverUrl], // Unused but required
248
- ]),
249
- headers: {
250
- 'Content-Type': 'application/x-www-form-urlencoded',
251
- },
252
- });
253
-
254
- if (!request.ok) {
255
- throw new Error('Error while getting the refresh token: ' + request.statusText);
256
- }
257
-
258
- const response = await request.json();
259
-
260
- if (response.error) {
261
- throw new Error('Error while getting the refresh token: ' + response.error);
262
- }
263
-
264
- return response.refresh_token;
265
- }
266
-
267
- function getLoginUrl(clientId) {
268
- const url = new URL('https://accounts.google.com/o/oauth2/auth');
269
- url.searchParams.set('response_type', 'code');
270
- url.searchParams.set('access_type', 'offline');
271
- url.searchParams.set('client_id', clientId.trim());
272
- url.searchParams.set('scope', 'https://www.googleapis.com/auth/chromewebstore');
273
- url.searchParams.set('redirect_uri', serverUrl);
274
- return url.href;
275
- }
276
-
277
- _clack_prompts__WEBPACK_IMPORTED_MODULE_2__/* .intro */ .Lv('Follow the steps at this URL to generate the API keys, then enter them below to generate the refresh token.\n https://github.com/fregante/chrome-webstore-upload-keys');
278
- const group = await _clack_prompts__WEBPACK_IMPORTED_MODULE_2__/* .group */ .Os(
279
- {
280
- clientId: () => _clack_prompts__WEBPACK_IMPORTED_MODULE_2__/* .text */ .Qq({
281
- message: 'Client ID:',
282
- placeholder: 'e.g. 960453266371-2qcq5fppm3d5e.apps.googleusercontent.com',
283
- validate: required,
284
- }),
285
- clientSecret: () => _clack_prompts__WEBPACK_IMPORTED_MODULE_2__/* .text */ .Qq({
286
- message: 'Client secret:',
287
- placeholder: 'e.g. GOCSPX-O9uS1FLnCqXDvru7Y_',
288
- validate: required,
289
- }),
290
- open: () => _clack_prompts__WEBPACK_IMPORTED_MODULE_2__/* .confirm */ .lJ({
291
- message: 'Open the authentication page in the default browser?',
292
- }),
293
- },
294
- {
295
- onCancel() {
296
- _clack_prompts__WEBPACK_IMPORTED_MODULE_2__/* .cancel */ .ZT('Operation cancelled.');
297
- node_process__WEBPACK_IMPORTED_MODULE_0__.exit(0); // `onCancel` continues to the next question
298
- },
299
- },
300
- );
301
-
302
- let code;
303
- let refreshToken;
304
- await tasks([
305
- {
306
- title: 'Opening the login page in the browser',
307
- async task() {
308
- const instructions = 'Complete the process in the browser. Follow its steps and warnings (this is your own personal app)';
309
- if (group.open) {
310
- await (0,open__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Ay)(getLoginUrl(group.clientId));
311
- return instructions;
312
- }
313
-
314
- return instructions + '\n\n ' + getLoginUrl(group.clientId);
315
- },
316
- },
317
- {
318
- title: 'Waiting for you in the browser',
319
- async task() {
320
- code = await approvalCode.promise;
321
- return 'Approval code received from Google';
322
- },
323
- },
324
- {
325
- title: 'Asking Google for the refresh token',
326
- async task() {
327
- refreshToken = await getRefreshToken();
328
- return `Done:
329
-
330
- CLIENT_ID=${group.clientId}
331
- CLIENT_SECRET=${group.clientSecret}
332
- REFRESH_TOKEN=${refreshToken}
333
- `;
334
- },
335
- },
336
- ]);
337
-
338
- __webpack_async_result__();
339
- } catch(e) { __webpack_async_result__(e); } }, 1);
340
-
341
- /***/ }),
342
-
343
- /***/ 241:
344
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
345
-
346
-
347
- // EXPORTS
348
- __nccwpck_require__.d(__webpack_exports__, {
349
- ZT: () => (/* binding */ ue),
350
- lJ: () => (/* binding */ se),
351
- Os: () => (/* binding */ he),
352
- Lv: () => (/* binding */ oe),
353
- u1: () => (/* binding */ de),
354
- Qq: () => (/* binding */ te)
355
- });
356
-
357
- // UNUSED EXPORTS: groupMultiselect, isCancel, log, multiselect, note, outro, password, select, selectKey
358
-
359
- // EXTERNAL MODULE: ./node_modules/sisteransi/src/index.js
360
- var src = __nccwpck_require__(858);
361
- // EXTERNAL MODULE: external "node:process"
362
- var external_node_process_ = __nccwpck_require__(708);
363
- ;// CONCATENATED MODULE: external "node:readline"
364
- const external_node_readline_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:readline");
365
- ;// CONCATENATED MODULE: external "node:tty"
366
- const external_node_tty_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:tty");
367
- // EXTERNAL MODULE: ./node_modules/picocolors/picocolors.js
368
- var picocolors = __nccwpck_require__(336);
369
- ;// CONCATENATED MODULE: ./node_modules/@clack/core/dist/index.mjs
370
- function q({onlyFirst:e=!1}={}){const F=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(F,e?void 0:"g")}const J=q();function S(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(J,"")}function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dist_j={exports:{}};(function(e){var u={};e.exports=u,u.eastAsianWidth=function(t){var s=t.charCodeAt(0),C=t.length==2?t.charCodeAt(1):0,D=s;return 55296<=s&&s<=56319&&56320<=C&&C<=57343&&(s&=1023,C&=1023,D=s<<10|C,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},u.characterLength=function(t){var s=this.eastAsianWidth(t);return s=="F"||s=="W"||s=="A"?2:1};function F(t){return t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(t){for(var s=F(t),C=0,D=0;D<s.length;D++)C=C+this.characterLength(s[D]);return C},u.slice=function(t,s,C){textLen=u.length(t),s=s||0,C=C||1,s<0&&(s=textLen+s),C<0&&(C=textLen+C);for(var D="",i=0,n=F(t),E=0;E<n.length;E++){var h=n[E],o=u.length(h);if(i>=s-(o==2?1:0))if(i+o<=C)D+=h;else break;i+=o}return D}})(dist_j);var Q=dist_j.exports;const X=T(Q);var DD=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const uD=T(DD);function A(e,u={}){if(typeof e!="string"||e.length===0||(u={ambiguousIsNarrow:!0,...u},e=S(e),e.length===0))return 0;e=e.replace(uD()," ");const F=u.ambiguousIsNarrow?1:2;let t=0;for(const s of e){const C=s.codePointAt(0);if(C<=31||C>=127&&C<=159||C>=768&&C<=879)continue;switch(X.eastAsianWidth(s)){case"F":case"W":t+=2;break;case"A":t+=F;break;default:t+=1}}return t}const d=10,M=(e=0)=>u=>`\x1B[${u+e}m`,P=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,dist_W=(e=0)=>(u,F,t)=>`\x1B[${38+e};2;${u};${F};${t}m`,r={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(r.modifier);const FD=Object.keys(r.color),eD=Object.keys(r.bgColor);[...FD,...eD];function tD(){const e=new Map;for(const[u,F]of Object.entries(r)){for(const[t,s]of Object.entries(F))r[t]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},F[t]=r[t],e.set(s[0],s[1]);Object.defineProperty(r,u,{value:F,enumerable:!1})}return Object.defineProperty(r,"codes",{value:e,enumerable:!1}),r.color.close="\x1B[39m",r.bgColor.close="\x1B[49m",r.color.ansi=M(),r.color.ansi256=P(),r.color.ansi16m=dist_W(),r.bgColor.ansi=M(d),r.bgColor.ansi256=P(d),r.bgColor.ansi16m=dist_W(d),Object.defineProperties(r,{rgbToAnsi256:{value:(u,F,t)=>u===F&&F===t?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(t/255*5),enumerable:!1},hexToRgb:{value:u=>{const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[t]=F;t.length===3&&(t=[...t].map(C=>C+C).join(""));const s=Number.parseInt(t,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:u=>r.rgbToAnsi256(...r.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,t,s;if(u>=232)F=((u-232)*10+8)/255,t=F,s=F;else{u-=16;const i=u%36;F=Math.floor(u/36)/5,t=Math.floor(i/6)/5,s=i%6/5}const C=Math.max(F,t,s)*2;if(C===0)return 30;let D=30+(Math.round(s)<<2|Math.round(t)<<1|Math.round(F));return C===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,F,t)=>r.ansi256ToAnsi(r.rgbToAnsi256(u,F,t)),enumerable:!1},hexToAnsi:{value:u=>r.ansi256ToAnsi(r.hexToAnsi256(u)),enumerable:!1}}),r}const sD=tD(),g=new Set(["\x1B","\x9B"]),CD=39,b="\x07",O="[",iD="]",I="m",w=`${iD}8;;`,N=e=>`${g.values().next().value}${O}${e}${I}`,dist_L=e=>`${g.values().next().value}${w}${e}${b}`,rD=e=>e.split(" ").map(u=>A(u)),y=(e,u,F)=>{const t=[...u];let s=!1,C=!1,D=A(S(e[e.length-1]));for(const[i,n]of t.entries()){const E=A(n);if(D+E<=F?e[e.length-1]+=n:(e.push(n),D=0),g.has(n)&&(s=!0,C=t.slice(i+1).join("").startsWith(w)),s){C?n===b&&(s=!1,C=!1):n===I&&(s=!1);continue}D+=E,D===F&&i<t.length-1&&(e.push(""),D=0)}!D&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},ED=e=>{const u=e.split(" ");let F=u.length;for(;F>0&&!(A(u[F-1])>0);)F--;return F===u.length?e:u.slice(0,F).join(" ")+u.slice(F).join("")},oD=(e,u,F={})=>{if(F.trim!==!1&&e.trim()==="")return"";let t="",s,C;const D=rD(e);let i=[""];for(const[E,h]of e.split(" ").entries()){F.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let o=A(i[i.length-1]);if(E!==0&&(o>=u&&(F.wordWrap===!1||F.trim===!1)&&(i.push(""),o=0),(o>0||F.trim===!1)&&(i[i.length-1]+=" ",o++)),F.hard&&D[E]>u){const B=u-o,p=1+Math.floor((D[E]-B-1)/u);Math.floor((D[E]-1)/u)<p&&i.push(""),y(i,h,u);continue}if(o+D[E]>u&&o>0&&D[E]>0){if(F.wordWrap===!1&&o<u){y(i,h,u);continue}i.push("")}if(o+D[E]>u&&F.wordWrap===!1){y(i,h,u);continue}i[i.length-1]+=h}F.trim!==!1&&(i=i.map(E=>ED(E)));const n=[...i.join(`
371
- `)];for(const[E,h]of n.entries()){if(t+=h,g.has(h)){const{groups:B}=new RegExp(`(?:\\${O}(?<code>\\d+)m|\\${w}(?<uri>.*)${b})`).exec(n.slice(E).join(""))||{groups:{}};if(B.code!==void 0){const p=Number.parseFloat(B.code);s=p===CD?void 0:p}else B.uri!==void 0&&(C=B.uri.length===0?void 0:B.uri)}const o=sD.codes.get(Number(s));n[E+1]===`
372
- `?(C&&(t+=dist_L("")),s&&o&&(t+=N(o))):h===`
373
- `&&(s&&o&&(t+=N(s)),C&&(t+=dist_L(C)))}return t};function R(e,u,F){return String(e).normalize().replace(/\r\n/g,`
374
- `).split(`
375
- `).map(t=>oD(t,u,F)).join(`
376
- `)}var nD=Object.defineProperty,aD=(e,u,F)=>u in e?nD(e,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):e[u]=F,a=(e,u,F)=>(aD(e,typeof u!="symbol"?u+"":u,F),F);function hD(e,u){if(e===u)return;const F=e.split(`
377
- `),t=u.split(`
378
- `),s=[];for(let C=0;C<Math.max(F.length,t.length);C++)F[C]!==t[C]&&s.push(C);return s}const V=Symbol("clack:cancel");function lD(e){return e===V}function v(e,u){e.isTTY&&e.setRawMode(u)}const z=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),xD=new Set(["up","down","left","right","space","enter"]);class x{constructor({render:u,input:F=external_node_process_.stdin,output:t=external_node_process_.stdout,...s},C=!0){a(this,"input"),a(this,"output"),a(this,"rl"),a(this,"opts"),a(this,"_track",!1),a(this,"_render"),a(this,"_cursor",0),a(this,"state","initial"),a(this,"value"),a(this,"error",""),a(this,"subscribers",new Map),a(this,"_prevFrame",""),this.opts=s,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=u.bind(this),this._track=C,this.input=F,this.output=t}prompt(){const u=new external_node_tty_namespaceObject.WriteStream(0);return u._write=(F,t,s)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),s()},this.input.pipe(u),this.rl=external_node_readline_namespaceObject.createInterface({input:this.input,output:u,tabSize:2,prompt:"",escapeCodeTimeout:50}),external_node_readline_namespaceObject.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),v(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((F,t)=>{this.once("submit",()=>{this.output.write(src.cursor.show),this.output.off("resize",this.render),v(this.input,!1),F(this.value)}),this.once("cancel",()=>{this.output.write(src.cursor.show),this.output.off("resize",this.render),v(this.input,!1),F(V)})})}on(u,F){const t=this.subscribers.get(u)??[];t.push({cb:F}),this.subscribers.set(u,t)}once(u,F){const t=this.subscribers.get(u)??[];t.push({cb:F,once:!0}),this.subscribers.set(u,t)}emit(u,...F){const t=this.subscribers.get(u)??[],s=[];for(const C of t)C.cb(...F),C.once&&s.push(()=>t.splice(t.indexOf(C),1));for(const C of s)C()}unsubscribe(){this.subscribers.clear()}onKeypress(u,F){if(this.state==="error"&&(this.state="active"),F?.name&&!this._track&&z.has(F.name)&&this.emit("cursor",z.get(F.name)),F?.name&&xD.has(F.name)&&this.emit("cursor",F.name),u&&(u.toLowerCase()==="y"||u.toLowerCase()==="n")&&this.emit("confirm",u.toLowerCase()==="y"),u===" "&&this.opts.placeholder&&(this.value||(this.rl.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),u&&this.emit("key",u.toLowerCase()),F?.name==="return"){if(this.opts.validate){const t=this.opts.validate(this.value);t&&(this.error=t,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}u===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
379
- `),v(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const u=R(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
380
- `).length-1;this.output.write(src.cursor.move(-999,u*-1))}render(){const u=R(this._render(this)??"",process.stdout.columns,{hard:!0});if(u!==this._prevFrame){if(this.state==="initial")this.output.write(src.cursor.hide);else{const F=hD(this._prevFrame,u);if(this.restoreCursor(),F&&F?.length===1){const t=F[0];this.output.write(src.cursor.move(0,t)),this.output.write(src.erase.lines(1));const s=u.split(`
381
- `);this.output.write(s[t]),this._prevFrame=u,this.output.write(src.cursor.move(0,s.length-t-1));return}else if(F&&F?.length>1){const t=F[0];this.output.write(src.cursor.move(0,t)),this.output.write(src.erase.down());const s=u.split(`
382
- `).slice(t);this.output.write(s.join(`
383
- `)),this._prevFrame=u;return}this.output.write(src.erase.down())}this.output.write(u),this.state==="initial"&&(this.state="active"),this._prevFrame=u}}}class BD extends x{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(u){super(u,!1),this.value=!!u.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",F=>{this.output.write(src.cursor.move(0,-1)),this.value=F,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var cD=Object.defineProperty,AD=(e,u,F)=>u in e?cD(e,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):e[u]=F,G=(e,u,F)=>(AD(e,typeof u!="symbol"?u+"":u,F),F);class pD extends x{constructor(u){super(u,!1),G(this,"options"),G(this,"cursor",0);const{options:F}=u;this.options=Object.entries(F).flatMap(([t,s])=>[{value:t,group:!0,label:t},...s.map(C=>({...C,group:t}))]),this.value=[...u.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===u.cursorAt),0),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}getGroupItems(u){return this.options.filter(F=>F.group===u)}isGroupSelected(u){return this.getGroupItems(u).every(F=>this.value.includes(F.value))}toggleValue(){const u=this.options[this.cursor];if(u.group===!0){const F=u.value,t=this.getGroupItems(F);this.isGroupSelected(F)?this.value=this.value.filter(s=>t.findIndex(C=>C.value===s)===-1):this.value=[...this.value,...t.map(s=>s.value)],this.value=Array.from(new Set(this.value))}else{const F=this.value.includes(u.value);this.value=F?this.value.filter(t=>t!==u.value):[...this.value,u.value]}}}var fD=Object.defineProperty,gD=(e,u,F)=>u in e?fD(e,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):e[u]=F,K=(e,u,F)=>(gD(e,typeof u!="symbol"?u+"":u,F),F);let vD=class extends x{constructor(u){super(u,!1),K(this,"options"),K(this,"cursor",0),this.options=u.options,this.value=[...u.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:F})=>F===u.cursorAt),0),this.on("key",F=>{F==="a"&&this.toggleAll()}),this.on("cursor",F=>{switch(F){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){const u=this.value.length===this.options.length;this.value=u?[]:this.options.map(F=>F.value)}toggleValue(){const u=this.value.includes(this._value);this.value=u?this.value.filter(F=>F!==this._value):[...this.value,this._value]}};var mD=Object.defineProperty,dD=(e,u,F)=>u in e?mD(e,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):e[u]=F,Y=(e,u,F)=>(dD(e,typeof u!="symbol"?u+"":u,F),F);class bD extends x{constructor({mask:u,...F}){super(F),Y(this,"valueWithCursor",""),Y(this,"_mask","\u2022"),this._mask=u??"\u2022",this.on("finalize",()=>{this.valueWithCursor=this.masked}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.masked}${picocolors.inverse(picocolors.hidden("_"))}`;else{const t=this.masked.slice(0,this.cursor),s=this.masked.slice(this.cursor);this.valueWithCursor=`${t}${picocolors.inverse(s[0])}${s.slice(1)}`}})}get cursor(){return this._cursor}get masked(){return this.value.replaceAll(/./g,this._mask)}}var wD=Object.defineProperty,yD=(e,u,F)=>u in e?wD(e,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):e[u]=F,Z=(e,u,F)=>(yD(e,typeof u!="symbol"?u+"":u,F),F);let $D=class extends x{constructor(u){super(u,!1),Z(this,"options"),Z(this,"cursor",0),this.options=u.options,this.cursor=this.options.findIndex(({value:F})=>F===u.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",F=>{switch(F){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};var kD=Object.defineProperty,_D=(e,u,F)=>u in e?kD(e,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):e[u]=F,H=(e,u,F)=>(_D(e,typeof u!="symbol"?u+"":u,F),F);class SD extends x{constructor(u){super(u,!1),H(this,"options"),H(this,"cursor",0),this.options=u.options;const F=this.options.map(({value:[t]})=>t?.toLowerCase());this.cursor=Math.max(F.indexOf(u.initialValue),0),this.on("key",t=>{if(!F.includes(t))return;const s=this.options.find(({value:[C]})=>C?.toLowerCase()===t);s&&(this.value=s.value,this.state="submit",this.emit("submit"))})}}var TD=Object.defineProperty,jD=(e,u,F)=>u in e?TD(e,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):e[u]=F,MD=(e,u,F)=>(jD(e,typeof u!="symbol"?u+"":u,F),F);class PD extends x{constructor(u){super(u),MD(this,"valueWithCursor",""),this.on("finalize",()=>{this.value||(this.value=u.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${picocolors.inverse(picocolors.hidden("_"))}`;else{const F=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor);this.valueWithCursor=`${F}${picocolors.inverse(t[0])}${t.slice(1)}`}})}get cursor(){return this._cursor}}const WD=globalThis.process.platform.startsWith("win");function OD({input:e=external_node_process_.stdin,output:u=external_node_process_.stdout,overwrite:F=!0,hideCursor:t=!0}={}){const s=external_node_readline_namespaceObject.createInterface({input:e,output:u,prompt:"",tabSize:1});external_node_readline_namespaceObject.emitKeypressEvents(e,s),e.isTTY&&e.setRawMode(!0);const C=(D,{name:i})=>{if(String(D)===""){t&&u.write(src.cursor.show),process.exit(0);return}if(!F)return;let n=i==="return"?0:-1,E=i==="return"?-1:0;external_node_readline_namespaceObject.moveCursor(u,n,E,()=>{external_node_readline_namespaceObject.clearLine(u,1,()=>{e.once("keypress",C)})})};return t&&u.write(src.cursor.hide),e.once("keypress",C),()=>{e.off("keypress",C),t&&u.write(src.cursor.show),e.isTTY&&!WD&&e.setRawMode(!1),s.terminal=!1,s.close()}}
384
- //# sourceMappingURL=index.mjs.map
385
-
386
- ;// CONCATENATED MODULE: ./node_modules/@clack/prompts/dist/index.mjs
387
- function dist_q(){return external_node_process_.platform!=="win32"?external_node_process_.env.TERM!=="linux":Boolean(external_node_process_.env.CI)||Boolean(external_node_process_.env.WT_SESSION)||Boolean(external_node_process_.env.TERMINUS_SUBLIME)||external_node_process_.env.ConEmuTask==="{cmd::Cmder}"||external_node_process_.env.TERM_PROGRAM==="Terminus-Sublime"||external_node_process_.env.TERM_PROGRAM==="vscode"||external_node_process_.env.TERM==="xterm-256color"||external_node_process_.env.TERM==="alacritty"||external_node_process_.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const _=dist_q(),o=(r,n)=>_?r:n,dist_H=o("\u25C6","*"),dist_I=o("\u25A0","x"),dist_x=o("\u25B2","x"),dist_S=o("\u25C7","o"),dist_K=o("\u250C","T"),dist_a=o("\u2502","|"),dist_d=o("\u2514","\u2014"),dist_b=o("\u25CF",">"),E=o("\u25CB"," "),C=o("\u25FB","[\u2022]"),dist_w=o("\u25FC","[+]"),dist_M=o("\u25FB","[ ]"),U=o("\u25AA","\u2022"),B=o("\u2500","-"),dist_Z=o("\u256E","+"),dist_z=o("\u251C","+"),dist_X=o("\u256F","+"),dist_J=o("\u25CF","\u2022"),dist_Y=o("\u25C6","*"),dist_Q=o("\u25B2","!"),ee=o("\u25A0","x"),dist_y=r=>{switch(r){case"initial":case"active":return picocolors.cyan(dist_H);case"cancel":return picocolors.red(dist_I);case"error":return picocolors.yellow(dist_x);case"submit":return picocolors.green(dist_S)}},te=r=>new PD({validate:r.validate,placeholder:r.placeholder,defaultValue:r.defaultValue,initialValue:r.initialValue,render(){const n=`${picocolors.gray(dist_a)}
388
- ${dist_y(this.state)} ${r.message}
389
- `,i=r.placeholder?picocolors.inverse(r.placeholder[0])+picocolors.dim(r.placeholder.slice(1)):picocolors.inverse(picocolors.hidden("_")),t=this.value?this.valueWithCursor:i;switch(this.state){case"error":return`${n.trim()}
390
- ${picocolors.yellow(dist_a)} ${t}
391
- ${picocolors.yellow(dist_d)} ${picocolors.yellow(this.error)}
392
- `;case"submit":return`${n}${picocolors.gray(dist_a)} ${picocolors.dim(this.value||r.placeholder)}`;case"cancel":return`${n}${picocolors.gray(dist_a)} ${picocolors.strikethrough(picocolors.dim(this.value??""))}${this.value?.trim()?`
393
- `+picocolors.gray(dist_a):""}`;default:return`${n}${picocolors.cyan(dist_a)} ${t}
394
- ${picocolors.cyan(dist_d)}
395
- `}}}).prompt(),re=r=>new j({validate:r.validate,mask:r.mask??U,render(){const n=`${e.gray(dist_a)}
396
- ${dist_y(this.state)} ${r.message}
397
- `,i=this.valueWithCursor,t=this.masked;switch(this.state){case"error":return`${n.trim()}
398
- ${e.yellow(dist_a)} ${t}
399
- ${e.yellow(dist_d)} ${e.yellow(this.error)}
400
- `;case"submit":return`${n}${e.gray(dist_a)} ${e.dim(t)}`;case"cancel":return`${n}${e.gray(dist_a)} ${e.strikethrough(e.dim(t??""))}${t?`
401
- `+e.gray(dist_a):""}`;default:return`${n}${e.cyan(dist_a)} ${i}
402
- ${e.cyan(dist_d)}
403
- `}}}).prompt(),se=r=>{const n=r.active??"Yes",i=r.inactive??"No";return new BD({active:n,inactive:i,initialValue:r.initialValue??!0,render(){const t=`${picocolors.gray(dist_a)}
404
- ${dist_y(this.state)} ${r.message}
405
- `,s=this.value?n:i;switch(this.state){case"submit":return`${t}${picocolors.gray(dist_a)} ${picocolors.dim(s)}`;case"cancel":return`${t}${picocolors.gray(dist_a)} ${picocolors.strikethrough(picocolors.dim(s))}
406
- ${picocolors.gray(dist_a)}`;default:return`${t}${picocolors.cyan(dist_a)} ${this.value?`${picocolors.green(dist_b)} ${n}`:`${picocolors.dim(E)} ${picocolors.dim(n)}`} ${picocolors.dim("/")} ${this.value?`${picocolors.dim(E)} ${picocolors.dim(i)}`:`${picocolors.green(dist_b)} ${i}`}
407
- ${picocolors.cyan(dist_d)}
408
- `}}}).prompt()},ie=r=>{const n=(t,s)=>{const c=t.label??String(t.value);return s==="active"?`${e.green(dist_b)} ${c} ${t.hint?e.dim(`(${t.hint})`):""}`:s==="selected"?`${e.dim(c)}`:s==="cancelled"?`${e.strikethrough(e.dim(c))}`:`${e.dim(E)} ${e.dim(c)}`};let i=0;return new k({options:r.options,initialValue:r.initialValue,render(){const t=`${e.gray(dist_a)}
409
- ${dist_y(this.state)} ${r.message}
410
- `;switch(this.state){case"submit":return`${t}${e.gray(dist_a)} ${n(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${e.gray(dist_a)} ${n(this.options[this.cursor],"cancelled")}
411
- ${e.gray(dist_a)}`;default:{const s=r.maxItems===void 0?1/0:Math.max(r.maxItems,5);this.cursor>=i+s-3?i=Math.max(Math.min(this.cursor-s+3,this.options.length-s),0):this.cursor<i+2&&(i=Math.max(this.cursor-2,0));const c=s<this.options.length&&i>0,l=s<this.options.length&&i+s<this.options.length;return`${t}${e.cyan(dist_a)} ${this.options.slice(i,i+s).map((u,m,$)=>m===0&&c?e.dim("..."):m===$.length-1&&l?e.dim("..."):n(u,m+i===this.cursor?"active":"inactive")).join(`
412
- ${e.cyan(dist_a)} `)}
413
- ${e.cyan(dist_d)}
414
- `}}}}).prompt()},ne=r=>{const n=(i,t="inactive")=>{const s=i.label??String(i.value);return t==="selected"?`${e.dim(s)}`:t==="cancelled"?`${e.strikethrough(e.dim(s))}`:t==="active"?`${e.bgCyan(e.gray(` ${i.value} `))} ${s} ${i.hint?e.dim(`(${i.hint})`):""}`:`${e.gray(e.bgWhite(e.inverse(` ${i.value} `)))} ${s} ${i.hint?e.dim(`(${i.hint})`):""}`};return new W({options:r.options,initialValue:r.initialValue,render(){const i=`${e.gray(dist_a)}
415
- ${dist_y(this.state)} ${r.message}
416
- `;switch(this.state){case"submit":return`${i}${e.gray(dist_a)} ${n(this.options.find(t=>t.value===this.value),"selected")}`;case"cancel":return`${i}${e.gray(dist_a)} ${n(this.options[0],"cancelled")}
417
- ${e.gray(dist_a)}`;default:return`${i}${e.cyan(dist_a)} ${this.options.map((t,s)=>n(t,s===this.cursor?"active":"inactive")).join(`
418
- ${e.cyan(dist_a)} `)}
419
- ${e.cyan(dist_d)}
420
- `}}}).prompt()},ae=r=>{const n=(i,t)=>{const s=i.label??String(i.value);return t==="active"?`${e.cyan(C)} ${s} ${i.hint?e.dim(`(${i.hint})`):""}`:t==="selected"?`${e.green(dist_w)} ${e.dim(s)}`:t==="cancelled"?`${e.strikethrough(e.dim(s))}`:t==="active-selected"?`${e.green(dist_w)} ${s} ${i.hint?e.dim(`(${i.hint})`):""}`:t==="submitted"?`${e.dim(s)}`:`${e.dim(dist_M)} ${e.dim(s)}`};return new D({options:r.options,initialValues:r.initialValues,required:r.required??!0,cursorAt:r.cursorAt,validate(i){if(this.required&&i.length===0)return`Please select at least one option.
421
- ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`},render(){let i=`${e.gray(dist_a)}
422
- ${dist_y(this.state)} ${r.message}
423
- `;switch(this.state){case"submit":return`${i}${e.gray(dist_a)} ${this.options.filter(({value:t})=>this.value.includes(t)).map(t=>n(t,"submitted")).join(e.dim(", "))||e.dim("none")}`;case"cancel":{const t=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>n(s,"cancelled")).join(e.dim(", "));return`${i}${e.gray(dist_a)} ${t.trim()?`${t}
424
- ${e.gray(dist_a)}`:""}`}case"error":{const t=this.error.split(`
425
- `).map((s,c)=>c===0?`${e.yellow(dist_d)} ${e.yellow(s)}`:` ${s}`).join(`
426
- `);return i+e.yellow(dist_a)+" "+this.options.map((s,c)=>{const l=this.value.includes(s.value),u=c===this.cursor;return u&&l?n(s,"active-selected"):l?n(s,"selected"):n(s,u?"active":"inactive")}).join(`
427
- ${e.yellow(dist_a)} `)+`
428
- `+t+`
429
- `}default:return`${i}${e.cyan(dist_a)} ${this.options.map((t,s)=>{const c=this.value.includes(t.value),l=s===this.cursor;return l&&c?n(t,"active-selected"):c?n(t,"selected"):n(t,l?"active":"inactive")}).join(`
430
- ${e.cyan(dist_a)} `)}
431
- ${e.cyan(dist_d)}
432
- `}}}).prompt()},ce=r=>{const n=(i,t,s=[])=>{const c=i.label??String(i.value),l=typeof i.group=="string",u=l&&(s[s.indexOf(i)+1]??{group:!0}),m=l&&u.group===!0,$=l?`${m?dist_d:dist_a} `:"";return t==="active"?`${e.dim($)}${e.cyan(C)} ${c} ${i.hint?e.dim(`(${i.hint})`):""}`:t==="group-active"?`${$}${e.cyan(C)} ${e.dim(c)}`:t==="group-active-selected"?`${$}${e.green(dist_w)} ${e.dim(c)}`:t==="selected"?`${e.dim($)}${e.green(dist_w)} ${e.dim(c)}`:t==="cancelled"?`${e.strikethrough(e.dim(c))}`:t==="active-selected"?`${e.dim($)}${e.green(dist_w)} ${c} ${i.hint?e.dim(`(${i.hint})`):""}`:t==="submitted"?`${e.dim(c)}`:`${e.dim($)}${e.dim(dist_M)} ${e.dim(c)}`};return new L({options:r.options,initialValues:r.initialValues,required:r.required??!0,cursorAt:r.cursorAt,validate(i){if(this.required&&i.length===0)return`Please select at least one option.
433
- ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`},render(){let i=`${e.gray(dist_a)}
434
- ${dist_y(this.state)} ${r.message}
435
- `;switch(this.state){case"submit":return`${i}${e.gray(dist_a)} ${this.options.filter(({value:t})=>this.value.includes(t)).map(t=>n(t,"submitted")).join(e.dim(", "))}`;case"cancel":{const t=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>n(s,"cancelled")).join(e.dim(", "));return`${i}${e.gray(dist_a)} ${t.trim()?`${t}
436
- ${e.gray(dist_a)}`:""}`}case"error":{const t=this.error.split(`
437
- `).map((s,c)=>c===0?`${e.yellow(dist_d)} ${e.yellow(s)}`:` ${s}`).join(`
438
- `);return`${i}${e.yellow(dist_a)} ${this.options.map((s,c,l)=>{const u=this.value.includes(s.value)||s.group===!0&&this.isGroupSelected(`${s.value}`),m=c===this.cursor;return!m&&typeof s.group=="string"&&this.options[this.cursor].value===s.group?n(s,u?"group-active-selected":"group-active",l):m&&u?n(s,"active-selected",l):u?n(s,"selected",l):n(s,m?"active":"inactive",l)}).join(`
439
- ${e.yellow(dist_a)} `)}
440
- ${t}
441
- `}default:return`${i}${e.cyan(dist_a)} ${this.options.map((t,s,c)=>{const l=this.value.includes(t.value)||t.group===!0&&this.isGroupSelected(`${t.value}`),u=s===this.cursor;return!u&&typeof t.group=="string"&&this.options[this.cursor].value===t.group?n(t,l?"group-active-selected":"group-active",c):u&&l?n(t,"active-selected",c):l?n(t,"selected",c):n(t,u?"active":"inactive",c)}).join(`
442
- ${e.cyan(dist_a)} `)}
443
- ${e.cyan(dist_d)}
444
- `}}}).prompt()},dist_R=r=>r.replace(me(),""),le=(r="",n="")=>{const i=`
445
- ${r}
446
- `.split(`
447
- `),t=dist_R(n).length,s=Math.max(i.reduce((l,u)=>(u=dist_R(u),u.length>l?u.length:l),0),t)+2,c=i.map(l=>`${e.gray(dist_a)} ${e.dim(l)}${" ".repeat(s-dist_R(l).length)}${e.gray(dist_a)}`).join(`
448
- `);process.stdout.write(`${e.gray(dist_a)}
449
- ${e.green(dist_S)} ${e.reset(n)} ${e.gray(B.repeat(Math.max(s-t-1,1))+dist_Z)}
450
- ${c}
451
- ${e.gray(dist_z+B.repeat(s+2)+dist_X)}
452
- `)},ue=(r="")=>{process.stdout.write(`${picocolors.gray(dist_d)} ${picocolors.red(r)}
453
-
454
- `)},oe=(r="")=>{process.stdout.write(`${picocolors.gray(dist_K)} ${r}
455
- `)},$e=(r="")=>{process.stdout.write(`${e.gray(dist_a)}
456
- ${e.gray(dist_d)} ${r}
457
-
458
- `)},f={message:(r="",{symbol:n=picocolors.gray(dist_a)}={})=>{const i=[`${picocolors.gray(dist_a)}`];if(r){const[t,...s]=r.split(`
459
- `);i.push(`${n} ${t}`,...s.map(c=>`${picocolors.gray(dist_a)} ${c}`))}process.stdout.write(`${i.join(`
460
- `)}
461
- `)},info:r=>{f.message(r,{symbol:picocolors.blue(dist_J)})},success:r=>{f.message(r,{symbol:picocolors.green(dist_Y)})},step:r=>{f.message(r,{symbol:picocolors.green(dist_S)})},warn:r=>{f.message(r,{symbol:picocolors.yellow(dist_Q)})},warning:r=>{f.warn(r)},error:r=>{f.message(r,{symbol:picocolors.red(ee)})}},de=()=>{const r=_?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],n=_?80:120;let i,t,s=!1,c="";const l=(v="")=>{s=!0,i=OD(),c=v.replace(/\.+$/,""),process.stdout.write(`${picocolors.gray(dist_a)}
462
- `);let g=0,p=0;t=setInterval(()=>{const O=picocolors.magenta(r[g]),P=".".repeat(Math.floor(p)).slice(0,3);process.stdout.write(src.cursor.move(-999,0)),process.stdout.write(src.erase.down(1)),process.stdout.write(`${O} ${c}${P}`),g=g+1<r.length?g+1:0,p=p<r.length?p+.125:0},n)},u=(v="",g=0)=>{c=v??c,s=!1,clearInterval(t);const p=g===0?picocolors.green(dist_S):g===1?picocolors.red(dist_I):picocolors.red(dist_x);process.stdout.write(src.cursor.move(-999,0)),process.stdout.write(src.erase.down(1)),process.stdout.write(`${p} ${c}
463
- `),i()},m=(v="")=>{c=v??c},$=v=>{const g=v>1?"Something went wrong":"Canceled";s&&u(g,v)};return process.on("uncaughtExceptionMonitor",()=>$(2)),process.on("unhandledRejection",()=>$(2)),process.on("SIGINT",()=>$(1)),process.on("SIGTERM",()=>$(1)),process.on("exit",$),{start:l,stop:u,message:m}};function me(){const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,"g")}const he=async(r,n)=>{const i={},t=Object.keys(r);for(const s of t){const c=r[s],l=await c({results:i})?.catch(u=>{throw u});if(typeof n?.onCancel=="function"&&lD(l)){i[s]="canceled",n.onCancel({results:i});continue}i[s]=l}return i};
464
-
465
-
466
- /***/ }),
467
-
468
- /***/ 16:
469
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
470
-
471
-
472
- // EXPORTS
473
- __nccwpck_require__.d(__webpack_exports__, {
474
- Ay: () => (/* binding */ getPorts)
475
- });
476
-
477
- // UNUSED EXPORTS: clearLockedPorts, portNumbers
478
-
479
- ;// CONCATENATED MODULE: external "node:net"
480
- const external_node_net_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net");
481
- // EXTERNAL MODULE: external "node:os"
482
- var external_node_os_ = __nccwpck_require__(161);
483
- ;// CONCATENATED MODULE: ./node_modules/get-port/index.js
484
-
485
-
486
-
487
- class Locked extends Error {
488
- constructor(port) {
489
- super(`${port} is locked`);
490
- }
491
- }
492
-
493
- const lockedPorts = {
494
- old: new Set(),
495
- young: new Set(),
496
- };
497
-
498
- // On this interval, the old locked ports are discarded,
499
- // the young locked ports are moved to old locked ports,
500
- // and a new young set for locked ports are created.
501
- const releaseOldLockedPortsIntervalMs = 1000 * 15;
502
-
503
- const minPort = 1024;
504
- const maxPort = 65_535;
505
-
506
- // Lazily create timeout on first use
507
- let timeout;
508
-
509
- const getLocalHosts = () => {
510
- const interfaces = external_node_os_.networkInterfaces();
511
-
512
- // Add undefined value for createServer function to use default host,
513
- // and default IPv4 host in case createServer defaults to IPv6.
514
- const results = new Set([undefined, '0.0.0.0']);
515
-
516
- for (const _interface of Object.values(interfaces)) {
517
- for (const config of _interface) {
518
- results.add(config.address);
519
- }
520
- }
521
-
522
- return results;
523
- };
524
-
525
- const checkAvailablePort = options =>
526
- new Promise((resolve, reject) => {
527
- const server = external_node_net_namespaceObject.createServer();
528
- server.unref();
529
- server.on('error', reject);
530
-
531
- server.listen(options, () => {
532
- const {port} = server.address();
533
- server.close(() => {
534
- resolve(port);
535
- });
536
- });
537
- });
538
-
539
- const getAvailablePort = async (options, hosts) => {
540
- if (options.host || options.port === 0) {
541
- return checkAvailablePort(options);
542
- }
543
-
544
- for (const host of hosts) {
545
- try {
546
- await checkAvailablePort({port: options.port, host}); // eslint-disable-line no-await-in-loop
547
- } catch (error) {
548
- if (!['EADDRNOTAVAIL', 'EINVAL'].includes(error.code)) {
549
- throw error;
550
- }
551
- }
552
- }
553
-
554
- return options.port;
555
- };
556
-
557
- const portCheckSequence = function * (ports) {
558
- if (ports) {
559
- yield * ports;
560
- }
561
-
562
- yield 0; // Fall back to 0 if anything else failed
563
- };
564
-
565
- async function getPorts(options) {
566
- let ports;
567
- let exclude = new Set();
568
-
569
- if (options) {
570
- if (options.port) {
571
- ports = typeof options.port === 'number' ? [options.port] : options.port;
572
- }
573
-
574
- if (options.exclude) {
575
- const excludeIterable = options.exclude;
576
-
577
- if (typeof excludeIterable[Symbol.iterator] !== 'function') {
578
- throw new TypeError('The `exclude` option must be an iterable.');
579
- }
580
-
581
- for (const element of excludeIterable) {
582
- if (typeof element !== 'number') {
583
- throw new TypeError('Each item in the `exclude` option must be a number corresponding to the port you want excluded.');
584
- }
585
-
586
- if (!Number.isSafeInteger(element)) {
587
- throw new TypeError(`Number ${element} in the exclude option is not a safe integer and can't be used`);
588
- }
589
- }
590
-
591
- exclude = new Set(excludeIterable);
592
- }
593
- }
594
-
595
- if (timeout === undefined) {
596
- timeout = setTimeout(() => {
597
- timeout = undefined;
598
-
599
- lockedPorts.old = lockedPorts.young;
600
- lockedPorts.young = new Set();
601
- }, releaseOldLockedPortsIntervalMs);
602
-
603
- // Does not exist in some environments (Electron, Jest jsdom env, browser, etc).
604
- if (timeout.unref) {
605
- timeout.unref();
606
- }
607
- }
608
-
609
- const hosts = getLocalHosts();
610
-
611
- for (const port of portCheckSequence(ports)) {
612
- try {
613
- if (exclude.has(port)) {
614
- continue;
615
- }
616
-
617
- let availablePort = await getAvailablePort({...options, port}, hosts); // eslint-disable-line no-await-in-loop
618
- while (lockedPorts.old.has(availablePort) || lockedPorts.young.has(availablePort)) {
619
- if (port !== 0) {
620
- throw new Locked(port);
621
- }
622
-
623
- availablePort = await getAvailablePort({...options, port}, hosts); // eslint-disable-line no-await-in-loop
624
- }
625
-
626
- lockedPorts.young.add(availablePort);
627
-
628
- return availablePort;
629
- } catch (error) {
630
- if (!['EADDRINUSE', 'EACCES'].includes(error.code) && !(error instanceof Locked)) {
631
- throw error;
632
- }
633
- }
634
- }
635
-
636
- throw new Error('No available ports found');
637
- }
638
-
639
- function portNumbers(from, to) {
640
- if (!Number.isInteger(from) || !Number.isInteger(to)) {
641
- throw new TypeError('`from` and `to` must be integer numbers');
642
- }
643
-
644
- if (from < minPort || from > maxPort) {
645
- throw new RangeError(`'from' must be between ${minPort} and ${maxPort}`);
646
- }
647
-
648
- if (to < minPort || to > maxPort) {
649
- throw new RangeError(`'to' must be between ${minPort} and ${maxPort}`);
650
- }
651
-
652
- if (from > to) {
653
- throw new RangeError('`to` must be greater than or equal to `from`');
654
- }
655
-
656
- const generator = function * (from, to) {
657
- for (let port = from; port <= to; port++) {
658
- yield port;
659
- }
660
- };
661
-
662
- return generator(from, to);
663
- }
664
-
665
- function clearLockedPorts() {
666
- lockedPorts.old.clear();
667
- lockedPorts.young.clear();
668
- }
669
-
670
-
671
- /***/ }),
672
-
673
- /***/ 908:
674
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
675
-
676
-
677
- // EXPORTS
678
- __nccwpck_require__.d(__webpack_exports__, {
679
- Ay: () => (/* binding */ node_modules_open)
680
- });
681
-
682
- // UNUSED EXPORTS: apps, openApp
683
-
684
- // EXTERNAL MODULE: external "node:process"
685
- var external_node_process_ = __nccwpck_require__(708);
686
- ;// CONCATENATED MODULE: external "node:buffer"
687
- const external_node_buffer_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:buffer");
688
- ;// CONCATENATED MODULE: external "node:path"
689
- const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path");
690
- ;// CONCATENATED MODULE: external "node:url"
691
- const external_node_url_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url");
692
- ;// CONCATENATED MODULE: external "node:util"
693
- const external_node_util_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util");
694
- ;// CONCATENATED MODULE: external "node:child_process"
695
- const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process");
696
- ;// CONCATENATED MODULE: external "node:fs/promises"
697
- const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises");
698
- // EXTERNAL MODULE: external "node:os"
699
- var external_node_os_ = __nccwpck_require__(161);
700
- ;// CONCATENATED MODULE: external "node:fs"
701
- const external_node_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs");
702
- ;// CONCATENATED MODULE: ./node_modules/is-docker/index.js
703
-
704
-
705
- let isDockerCached;
706
-
707
- function hasDockerEnv() {
708
- try {
709
- external_node_fs_namespaceObject.statSync('/.dockerenv');
710
- return true;
711
- } catch {
712
- return false;
713
- }
714
- }
715
-
716
- function hasDockerCGroup() {
717
- try {
718
- return external_node_fs_namespaceObject.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');
719
- } catch {
720
- return false;
721
- }
722
- }
723
-
724
- function isDocker() {
725
- // TODO: Use `??=` when targeting Node.js 16.
726
- if (isDockerCached === undefined) {
727
- isDockerCached = hasDockerEnv() || hasDockerCGroup();
728
- }
729
-
730
- return isDockerCached;
731
- }
732
-
733
- ;// CONCATENATED MODULE: ./node_modules/is-inside-container/index.js
734
-
735
-
736
-
737
- let cachedResult;
738
-
739
- // Podman detection
740
- const hasContainerEnv = () => {
741
- try {
742
- external_node_fs_namespaceObject.statSync('/run/.containerenv');
743
- return true;
744
- } catch {
745
- return false;
746
- }
747
- };
748
-
749
- function isInsideContainer() {
750
- // TODO: Use `??=` when targeting Node.js 16.
751
- if (cachedResult === undefined) {
752
- cachedResult = hasContainerEnv() || isDocker();
753
- }
754
-
755
- return cachedResult;
756
- }
757
-
758
- ;// CONCATENATED MODULE: ./node_modules/is-wsl/index.js
759
-
760
-
761
-
762
-
763
-
764
- const isWsl = () => {
765
- if (external_node_process_.platform !== 'linux') {
766
- return false;
767
- }
768
-
769
- if (external_node_os_.release().toLowerCase().includes('microsoft')) {
770
- if (isInsideContainer()) {
771
- return false;
772
- }
773
-
774
- return true;
775
- }
776
-
777
- try {
778
- return external_node_fs_namespaceObject.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')
779
- ? !isInsideContainer() : false;
780
- } catch {
781
- return false;
782
- }
783
- };
784
-
785
- /* harmony default export */ const is_wsl = (external_node_process_.env.__IS_WSL_TEST__ ? isWsl : isWsl());
786
-
787
- ;// CONCATENATED MODULE: ./node_modules/wsl-utils/index.js
788
-
789
-
790
-
791
-
792
- const wslDrivesMountPoint = (() => {
793
- // Default value for "root" param
794
- // according to https://docs.microsoft.com/en-us/windows/wsl/wsl-config
795
- const defaultMountPoint = '/mnt/';
796
-
797
- let mountPoint;
798
-
799
- return async function () {
800
- if (mountPoint) {
801
- // Return memoized mount point value
802
- return mountPoint;
803
- }
804
-
805
- const configFilePath = '/etc/wsl.conf';
806
-
807
- let isConfigFileExists = false;
808
- try {
809
- await promises_namespaceObject.access(configFilePath, promises_namespaceObject.constants.F_OK);
810
- isConfigFileExists = true;
811
- } catch {}
812
-
813
- if (!isConfigFileExists) {
814
- return defaultMountPoint;
815
- }
816
-
817
- const configContent = await promises_namespaceObject.readFile(configFilePath, {encoding: 'utf8'});
818
- const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
819
-
820
- if (!configMountPoint) {
821
- return defaultMountPoint;
822
- }
823
-
824
- mountPoint = configMountPoint.groups.mountPoint.trim();
825
- mountPoint = mountPoint.endsWith('/') ? mountPoint : `${mountPoint}/`;
826
-
827
- return mountPoint;
828
- };
829
- })();
830
-
831
- const powerShellPathFromWsl = async () => {
832
- const mountPoint = await wslDrivesMountPoint();
833
- return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
834
- };
835
-
836
- const powerShellPath = async () => {
837
- if (is_wsl) {
838
- return powerShellPathFromWsl();
839
- }
840
-
841
- return `${external_node_process_.env.SYSTEMROOT || external_node_process_.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
842
- };
843
-
844
-
845
-
846
- ;// CONCATENATED MODULE: ./node_modules/define-lazy-prop/index.js
847
- function defineLazyProperty(object, propertyName, valueGetter) {
848
- const define = value => Object.defineProperty(object, propertyName, {value, enumerable: true, writable: true});
849
-
850
- Object.defineProperty(object, propertyName, {
851
- configurable: true,
852
- enumerable: true,
853
- get() {
854
- const result = valueGetter();
855
- define(result);
856
- return result;
857
- },
858
- set(value) {
859
- define(value);
860
- }
861
- });
862
-
863
- return object;
864
- }
865
-
866
- ;// CONCATENATED MODULE: ./node_modules/default-browser-id/index.js
867
-
868
-
869
-
870
-
871
- const execFileAsync = (0,external_node_util_namespaceObject.promisify)(external_node_child_process_namespaceObject.execFile);
872
-
873
- async function defaultBrowserId() {
874
- if (external_node_process_.platform !== 'darwin') {
875
- throw new Error('macOS only');
876
- }
877
-
878
- const {stdout} = await execFileAsync('defaults', ['read', 'com.apple.LaunchServices/com.apple.launchservices.secure', 'LSHandlers']);
879
-
880
- // `(?!-)` is to prevent matching `LSHandlerRoleAll = "-";`.
881
- const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
882
-
883
- return match?.groups.id ?? 'com.apple.Safari';
884
- }
885
-
886
- ;// CONCATENATED MODULE: ./node_modules/run-applescript/index.js
887
-
888
-
889
-
890
-
891
- const run_applescript_execFileAsync = (0,external_node_util_namespaceObject.promisify)(external_node_child_process_namespaceObject.execFile);
892
-
893
- async function runAppleScript(script, {humanReadableOutput = true, signal} = {}) {
894
- if (external_node_process_.platform !== 'darwin') {
895
- throw new Error('macOS only');
896
- }
897
-
898
- const outputArguments = humanReadableOutput ? [] : ['-ss'];
899
-
900
- const execOptions = {};
901
- if (signal) {
902
- execOptions.signal = signal;
903
- }
904
-
905
- const {stdout} = await run_applescript_execFileAsync('osascript', ['-e', script, outputArguments], execOptions);
906
- return stdout.trim();
907
- }
908
-
909
- function runAppleScriptSync(script, {humanReadableOutput = true} = {}) {
910
- if (process.platform !== 'darwin') {
911
- throw new Error('macOS only');
912
- }
913
-
914
- const outputArguments = humanReadableOutput ? [] : ['-ss'];
915
-
916
- const stdout = execFileSync('osascript', ['-e', script, ...outputArguments], {
917
- encoding: 'utf8',
918
- stdio: ['ignore', 'pipe', 'ignore'],
919
- timeout: 500,
920
- });
921
-
922
- return stdout.trim();
923
- }
924
-
925
- ;// CONCATENATED MODULE: ./node_modules/bundle-name/index.js
926
-
927
-
928
- async function bundleName(bundleId) {
929
- return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
930
- }
931
-
932
- ;// CONCATENATED MODULE: ./node_modules/default-browser/windows.js
933
-
934
-
935
-
936
- const windows_execFileAsync = (0,external_node_util_namespaceObject.promisify)(external_node_child_process_namespaceObject.execFile);
937
-
938
- // Windows doesn't have browser IDs in the same way macOS/Linux does so we give fake
939
- // ones that look real and match the macOS/Linux versions for cross-platform apps.
940
- const windowsBrowserProgIds = {
941
- AppXq0fevzme2pys62n3e0fbqa7peapykr8v: {name: 'Edge', id: 'com.microsoft.edge.old'},
942
- MSEdgeDHTML: {name: 'Edge', id: 'com.microsoft.edge'}, // On macOS, it's "com.microsoft.edgemac"
943
- MSEdgeHTM: {name: 'Edge', id: 'com.microsoft.edge'}, // Newer Edge/Win10 releases
944
- 'IE.HTTP': {name: 'Internet Explorer', id: 'com.microsoft.ie'},
945
- FirefoxURL: {name: 'Firefox', id: 'org.mozilla.firefox'},
946
- ChromeHTML: {name: 'Chrome', id: 'com.google.chrome'},
947
- BraveHTML: {name: 'Brave', id: 'com.brave.Browser'},
948
- BraveBHTML: {name: 'Brave Beta', id: 'com.brave.Browser.beta'},
949
- BraveSSHTM: {name: 'Brave Nightly', id: 'com.brave.Browser.nightly'},
950
- };
951
-
952
- class UnknownBrowserError extends Error {}
953
-
954
- async function defaultBrowser(_execFileAsync = windows_execFileAsync) {
955
- const {stdout} = await _execFileAsync('reg', [
956
- 'QUERY',
957
- ' HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice',
958
- '/v',
959
- 'ProgId',
960
- ]);
961
-
962
- const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
963
- if (!match) {
964
- throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
965
- }
966
-
967
- const {id} = match.groups;
968
-
969
- const browser = windowsBrowserProgIds[id];
970
- if (!browser) {
971
- throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
972
- }
973
-
974
- return browser;
975
- }
976
-
977
- ;// CONCATENATED MODULE: ./node_modules/default-browser/index.js
978
-
979
-
980
-
981
-
982
-
983
-
984
-
985
- const default_browser_execFileAsync = (0,external_node_util_namespaceObject.promisify)(external_node_child_process_namespaceObject.execFile);
986
-
987
- // Inlined: https://github.com/sindresorhus/titleize/blob/main/index.js
988
- const titleize = string => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, x => x.toUpperCase());
989
-
990
- async function default_browser_defaultBrowser() {
991
- if (external_node_process_.platform === 'darwin') {
992
- const id = await defaultBrowserId();
993
- const name = await bundleName(id);
994
- return {name, id};
995
- }
996
-
997
- if (external_node_process_.platform === 'linux') {
998
- const {stdout} = await default_browser_execFileAsync('xdg-mime', ['query', 'default', 'x-scheme-handler/http']);
999
- const id = stdout.trim();
1000
- const name = titleize(id.replace(/.desktop$/, '').replace('-', ' '));
1001
- return {name, id};
1002
- }
1003
-
1004
- if (external_node_process_.platform === 'win32') {
1005
- return defaultBrowser();
1006
- }
1007
-
1008
- throw new Error('Only macOS, Linux, and Windows are supported');
1009
- }
1010
-
1011
- ;// CONCATENATED MODULE: ./node_modules/open/index.js
1012
-
1013
-
1014
-
1015
-
1016
-
1017
-
1018
-
1019
-
1020
-
1021
-
1022
-
1023
-
1024
- const execFile = (0,external_node_util_namespaceObject.promisify)(external_node_child_process_namespaceObject.execFile);
1025
-
1026
- // Path to included `xdg-open`.
1027
- const open_dirname = external_node_path_namespaceObject.dirname((0,external_node_url_namespaceObject.fileURLToPath)(import.meta.url));
1028
- const localXdgOpenPath = external_node_path_namespaceObject.join(open_dirname, 'xdg-open');
1029
-
1030
- const {platform, arch} = external_node_process_;
1031
-
1032
- /**
1033
- Get the default browser name in Windows from WSL.
1034
-
1035
- @returns {Promise<string>} Browser name.
1036
- */
1037
- async function getWindowsDefaultBrowserFromWsl() {
1038
- const powershellPath = await powerShellPath();
1039
- const rawCommand = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
1040
- const encodedCommand = external_node_buffer_namespaceObject.Buffer.from(rawCommand, 'utf16le').toString('base64');
1041
-
1042
- const {stdout} = await execFile(
1043
- powershellPath,
1044
- [
1045
- '-NoProfile',
1046
- '-NonInteractive',
1047
- '-ExecutionPolicy',
1048
- 'Bypass',
1049
- '-EncodedCommand',
1050
- encodedCommand,
1051
- ],
1052
- {encoding: 'utf8'},
1053
- );
1054
-
1055
- const progId = stdout.trim();
1056
-
1057
- // Map ProgId to browser IDs
1058
- const browserMap = {
1059
- ChromeHTML: 'com.google.chrome',
1060
- BraveHTML: 'com.brave.Browser',
1061
- MSEdgeHTM: 'com.microsoft.edge',
1062
- FirefoxURL: 'org.mozilla.firefox',
1063
- };
1064
-
1065
- return browserMap[progId] ? {id: browserMap[progId]} : {};
1066
- }
1067
-
1068
- const pTryEach = async (array, mapper) => {
1069
- let latestError;
1070
-
1071
- for (const item of array) {
1072
- try {
1073
- return await mapper(item); // eslint-disable-line no-await-in-loop
1074
- } catch (error) {
1075
- latestError = error;
1076
- }
1077
- }
1078
-
1079
- throw latestError;
1080
- };
1081
-
1082
- // eslint-disable-next-line complexity
1083
- const baseOpen = async options => {
1084
- options = {
1085
- wait: false,
1086
- background: false,
1087
- newInstance: false,
1088
- allowNonzeroExitCode: false,
1089
- ...options,
1090
- };
1091
-
1092
- if (Array.isArray(options.app)) {
1093
- return pTryEach(options.app, singleApp => baseOpen({
1094
- ...options,
1095
- app: singleApp,
1096
- }));
1097
- }
1098
-
1099
- let {name: app, arguments: appArguments = []} = options.app ?? {};
1100
- appArguments = [...appArguments];
1101
-
1102
- if (Array.isArray(app)) {
1103
- return pTryEach(app, appName => baseOpen({
1104
- ...options,
1105
- app: {
1106
- name: appName,
1107
- arguments: appArguments,
1108
- },
1109
- }));
1110
- }
1111
-
1112
- if (app === 'browser' || app === 'browserPrivate') {
1113
- // IDs from default-browser for macOS and windows are the same
1114
- const ids = {
1115
- 'com.google.chrome': 'chrome',
1116
- 'google-chrome.desktop': 'chrome',
1117
- 'com.brave.Browser': 'brave',
1118
- 'org.mozilla.firefox': 'firefox',
1119
- 'firefox.desktop': 'firefox',
1120
- 'com.microsoft.msedge': 'edge',
1121
- 'com.microsoft.edge': 'edge',
1122
- 'com.microsoft.edgemac': 'edge',
1123
- 'microsoft-edge.desktop': 'edge',
1124
- };
1125
-
1126
- // Incognito flags for each browser in `apps`.
1127
- const flags = {
1128
- chrome: '--incognito',
1129
- brave: '--incognito',
1130
- firefox: '--private-window',
1131
- edge: '--inPrivate',
1132
- };
1133
-
1134
- const browser = is_wsl ? await getWindowsDefaultBrowserFromWsl() : await default_browser_defaultBrowser();
1135
- if (browser.id in ids) {
1136
- const browserName = ids[browser.id];
1137
-
1138
- if (app === 'browserPrivate') {
1139
- appArguments.push(flags[browserName]);
1140
- }
1141
-
1142
- return baseOpen({
1143
- ...options,
1144
- app: {
1145
- name: apps[browserName],
1146
- arguments: appArguments,
1147
- },
1148
- });
1149
- }
1150
-
1151
- throw new Error(`${browser.name} is not supported as a default browser`);
1152
- }
1153
-
1154
- let command;
1155
- const cliArguments = [];
1156
- const childProcessOptions = {};
1157
-
1158
- if (platform === 'darwin') {
1159
- command = 'open';
1160
-
1161
- if (options.wait) {
1162
- cliArguments.push('--wait-apps');
1163
- }
1164
-
1165
- if (options.background) {
1166
- cliArguments.push('--background');
1167
- }
1168
-
1169
- if (options.newInstance) {
1170
- cliArguments.push('--new');
1171
- }
1172
-
1173
- if (app) {
1174
- cliArguments.push('-a', app);
1175
- }
1176
- } else if (platform === 'win32' || (is_wsl && !isInsideContainer() && !app)) {
1177
- command = await powerShellPath();
1178
-
1179
- cliArguments.push(
1180
- '-NoProfile',
1181
- '-NonInteractive',
1182
- '-ExecutionPolicy',
1183
- 'Bypass',
1184
- '-EncodedCommand',
1185
- );
1186
-
1187
- if (!is_wsl) {
1188
- childProcessOptions.windowsVerbatimArguments = true;
1189
- }
1190
-
1191
- const encodedArguments = ['Start'];
1192
-
1193
- if (options.wait) {
1194
- encodedArguments.push('-Wait');
1195
- }
1196
-
1197
- if (app) {
1198
- // Double quote with double quotes to ensure the inner quotes are passed through.
1199
- // Inner quotes are delimited for PowerShell interpretation with backticks.
1200
- encodedArguments.push(`"\`"${app}\`""`);
1201
- if (options.target) {
1202
- appArguments.push(options.target);
1203
- }
1204
- } else if (options.target) {
1205
- encodedArguments.push(`"${options.target}"`);
1206
- }
1207
-
1208
- if (appArguments.length > 0) {
1209
- appArguments = appArguments.map(argument => `"\`"${argument}\`""`);
1210
- encodedArguments.push('-ArgumentList', appArguments.join(','));
1211
- }
1212
-
1213
- // Using Base64-encoded command, accepted by PowerShell, to allow special characters.
1214
- options.target = external_node_buffer_namespaceObject.Buffer.from(encodedArguments.join(' '), 'utf16le').toString('base64');
1215
- } else {
1216
- if (app) {
1217
- command = app;
1218
- } else {
1219
- // When bundled by Webpack, there's no actual package file path and no local `xdg-open`.
1220
- const isBundled = !open_dirname || open_dirname === '/';
1221
-
1222
- // Check if local `xdg-open` exists and is executable.
1223
- let exeLocalXdgOpen = false;
1224
- try {
1225
- await promises_namespaceObject.access(localXdgOpenPath, promises_namespaceObject.constants.X_OK);
1226
- exeLocalXdgOpen = true;
1227
- } catch {}
1228
-
1229
- const useSystemXdgOpen = external_node_process_.versions.electron
1230
- ?? (platform === 'android' || isBundled || !exeLocalXdgOpen);
1231
- command = useSystemXdgOpen ? 'xdg-open' : localXdgOpenPath;
1232
- }
1233
-
1234
- if (appArguments.length > 0) {
1235
- cliArguments.push(...appArguments);
1236
- }
1237
-
1238
- if (!options.wait) {
1239
- // `xdg-open` will block the process unless stdio is ignored
1240
- // and it's detached from the parent even if it's unref'd.
1241
- childProcessOptions.stdio = 'ignore';
1242
- childProcessOptions.detached = true;
1243
- }
1244
- }
1245
-
1246
- if (platform === 'darwin' && appArguments.length > 0) {
1247
- cliArguments.push('--args', ...appArguments);
1248
- }
1249
-
1250
- // This has to come after `--args`.
1251
- if (options.target) {
1252
- cliArguments.push(options.target);
1253
- }
1254
-
1255
- const subprocess = external_node_child_process_namespaceObject.spawn(command, cliArguments, childProcessOptions);
1256
-
1257
- if (options.wait) {
1258
- return new Promise((resolve, reject) => {
1259
- subprocess.once('error', reject);
1260
-
1261
- subprocess.once('close', exitCode => {
1262
- if (!options.allowNonzeroExitCode && exitCode > 0) {
1263
- reject(new Error(`Exited with code ${exitCode}`));
1264
- return;
1265
- }
1266
-
1267
- resolve(subprocess);
1268
- });
1269
- });
1270
- }
1271
-
1272
- subprocess.unref();
1273
-
1274
- return subprocess;
1275
- };
1276
-
1277
- const open_open = (target, options) => {
1278
- if (typeof target !== 'string') {
1279
- throw new TypeError('Expected a `target`');
1280
- }
1281
-
1282
- return baseOpen({
1283
- ...options,
1284
- target,
1285
- });
1286
- };
1287
-
1288
- const openApp = (name, options) => {
1289
- if (typeof name !== 'string' && !Array.isArray(name)) {
1290
- throw new TypeError('Expected a valid `name`');
1291
- }
1292
-
1293
- const {arguments: appArguments = []} = options ?? {};
1294
- if (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {
1295
- throw new TypeError('Expected `appArguments` as Array type');
1296
- }
1297
-
1298
- return baseOpen({
1299
- ...options,
1300
- app: {
1301
- name,
1302
- arguments: appArguments,
1303
- },
1304
- });
1305
- };
1306
-
1307
- function detectArchBinary(binary) {
1308
- if (typeof binary === 'string' || Array.isArray(binary)) {
1309
- return binary;
1310
- }
1311
-
1312
- const {[arch]: archBinary} = binary;
1313
-
1314
- if (!archBinary) {
1315
- throw new Error(`${arch} is not supported`);
1316
- }
1317
-
1318
- return archBinary;
1319
- }
1320
-
1321
- function detectPlatformBinary({[platform]: platformBinary}, {wsl}) {
1322
- if (wsl && is_wsl) {
1323
- return detectArchBinary(wsl);
1324
- }
1325
-
1326
- if (!platformBinary) {
1327
- throw new Error(`${platform} is not supported`);
1328
- }
1329
-
1330
- return detectArchBinary(platformBinary);
1331
- }
1332
-
1333
- const apps = {};
1334
-
1335
- defineLazyProperty(apps, 'chrome', () => detectPlatformBinary({
1336
- darwin: 'google chrome',
1337
- win32: 'chrome',
1338
- linux: ['google-chrome', 'google-chrome-stable', 'chromium'],
1339
- }, {
1340
- wsl: {
1341
- ia32: '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe',
1342
- x64: ['/mnt/c/Program Files/Google/Chrome/Application/chrome.exe', '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'],
1343
- },
1344
- }));
1345
-
1346
- defineLazyProperty(apps, 'brave', () => detectPlatformBinary({
1347
- darwin: 'brave browser',
1348
- win32: 'brave',
1349
- linux: ['brave-browser', 'brave'],
1350
- }, {
1351
- wsl: {
1352
- ia32: '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe',
1353
- x64: ['/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe', '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe'],
1354
- },
1355
- }));
1356
-
1357
- defineLazyProperty(apps, 'firefox', () => detectPlatformBinary({
1358
- darwin: 'firefox',
1359
- win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
1360
- linux: 'firefox',
1361
- }, {
1362
- wsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe',
1363
- }));
1364
-
1365
- defineLazyProperty(apps, 'edge', () => detectPlatformBinary({
1366
- darwin: 'microsoft edge',
1367
- win32: 'msedge',
1368
- linux: ['microsoft-edge', 'microsoft-edge-dev'],
1369
- }, {
1370
- wsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe',
1371
- }));
1372
-
1373
- defineLazyProperty(apps, 'browser', () => 'browser');
1374
-
1375
- defineLazyProperty(apps, 'browserPrivate', () => 'browserPrivate');
1376
-
1377
- /* harmony default export */ const node_modules_open = (open_open);
1378
-
1379
-
1380
- /***/ }),
1381
-
1382
- /***/ 472:
1383
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
1384
-
1385
- /* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
1386
- /* harmony export */ A: () => (/* binding */ pDefer)
1387
- /* harmony export */ });
1388
- function pDefer() {
1389
- const deferred = {};
1390
-
1391
- deferred.promise = new Promise((resolve, reject) => {
1392
- deferred.resolve = resolve;
1393
- deferred.reject = reject;
1394
- });
1395
-
1396
- return deferred;
1397
- }
1398
-
1399
-
1400
- /***/ })
1401
-
1402
- /******/ });
1403
- /************************************************************************/
1404
- /******/ // The module cache
1405
- /******/ var __webpack_module_cache__ = {};
1406
- /******/
1407
- /******/ // The require function
1408
- /******/ function __nccwpck_require__(moduleId) {
1409
- /******/ // Check if module is in cache
1410
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
1411
- /******/ if (cachedModule !== undefined) {
1412
- /******/ return cachedModule.exports;
1413
- /******/ }
1414
- /******/ // Create a new module (and put it into the cache)
1415
- /******/ var module = __webpack_module_cache__[moduleId] = {
1416
- /******/ // no module.id needed
1417
- /******/ // no module.loaded needed
1418
- /******/ exports: {}
1419
- /******/ };
1420
- /******/
1421
- /******/ // Execute the module function
1422
- /******/ var threw = true;
1423
- /******/ try {
1424
- /******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
1425
- /******/ threw = false;
1426
- /******/ } finally {
1427
- /******/ if(threw) delete __webpack_module_cache__[moduleId];
1428
- /******/ }
1429
- /******/
1430
- /******/ // Return the exports of the module
1431
- /******/ return module.exports;
1432
- /******/ }
1433
- /******/
1434
- /************************************************************************/
1435
- /******/ /* webpack/runtime/async module */
1436
- /******/ (() => {
1437
- /******/ var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__";
1438
- /******/ var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__";
1439
- /******/ var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__";
1440
- /******/ var resolveQueue = (queue) => {
1441
- /******/ if(queue && queue.d < 1) {
1442
- /******/ queue.d = 1;
1443
- /******/ queue.forEach((fn) => (fn.r--));
1444
- /******/ queue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));
1445
- /******/ }
1446
- /******/ }
1447
- /******/ var wrapDeps = (deps) => (deps.map((dep) => {
1448
- /******/ if(dep !== null && typeof dep === "object") {
1449
- /******/ if(dep[webpackQueues]) return dep;
1450
- /******/ if(dep.then) {
1451
- /******/ var queue = [];
1452
- /******/ queue.d = 0;
1453
- /******/ dep.then((r) => {
1454
- /******/ obj[webpackExports] = r;
1455
- /******/ resolveQueue(queue);
1456
- /******/ }, (e) => {
1457
- /******/ obj[webpackError] = e;
1458
- /******/ resolveQueue(queue);
1459
- /******/ });
1460
- /******/ var obj = {};
1461
- /******/ obj[webpackQueues] = (fn) => (fn(queue));
1462
- /******/ return obj;
1463
- /******/ }
1464
- /******/ }
1465
- /******/ var ret = {};
1466
- /******/ ret[webpackQueues] = x => {};
1467
- /******/ ret[webpackExports] = dep;
1468
- /******/ return ret;
1469
- /******/ }));
1470
- /******/ __nccwpck_require__.a = (module, body, hasAwait) => {
1471
- /******/ var queue;
1472
- /******/ hasAwait && ((queue = []).d = -1);
1473
- /******/ var depQueues = new Set();
1474
- /******/ var exports = module.exports;
1475
- /******/ var currentDeps;
1476
- /******/ var outerResolve;
1477
- /******/ var reject;
1478
- /******/ var promise = new Promise((resolve, rej) => {
1479
- /******/ reject = rej;
1480
- /******/ outerResolve = resolve;
1481
- /******/ });
1482
- /******/ promise[webpackExports] = exports;
1483
- /******/ promise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise["catch"](x => {}));
1484
- /******/ module.exports = promise;
1485
- /******/ body((deps) => {
1486
- /******/ currentDeps = wrapDeps(deps);
1487
- /******/ var fn;
1488
- /******/ var getResult = () => (currentDeps.map((d) => {
1489
- /******/ if(d[webpackError]) throw d[webpackError];
1490
- /******/ return d[webpackExports];
1491
- /******/ }))
1492
- /******/ var promise = new Promise((resolve) => {
1493
- /******/ fn = () => (resolve(getResult));
1494
- /******/ fn.r = 0;
1495
- /******/ var fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));
1496
- /******/ currentDeps.map((dep) => (dep[webpackQueues](fnQueue)));
1497
- /******/ });
1498
- /******/ return fn.r ? promise : getResult();
1499
- /******/ }, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));
1500
- /******/ queue && queue.d < 0 && (queue.d = 0);
1501
- /******/ };
1502
- /******/ })();
1503
- /******/
1504
- /******/ /* webpack/runtime/define property getters */
1505
- /******/ (() => {
1506
- /******/ // define getter functions for harmony exports
1507
- /******/ __nccwpck_require__.d = (exports, definition) => {
1508
- /******/ for(var key in definition) {
1509
- /******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) {
1510
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1511
- /******/ }
1512
- /******/ }
1513
- /******/ };
1514
- /******/ })();
1515
- /******/
1516
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1517
- /******/ (() => {
1518
- /******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1519
- /******/ })();
1520
- /******/
1521
- /******/ /* webpack/runtime/compat */
1522
- /******/
1523
- /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
1524
- /******/
1525
- /************************************************************************/
1526
- /******/
1527
- /******/ // startup
1528
- /******/ // Load entry module and return exports
1529
- /******/ // This entry module used 'module' so it can't be inlined
1530
- /******/ var __webpack_exports__ = __nccwpck_require__(805);
1531
- /******/ __webpack_exports__ = await __webpack_exports__;
1532
- /******/