nikcli-remote 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3805 @@
1
+ import {
2
+ __commonJS,
3
+ __require
4
+ } from "./chunk-MCKGQKYU.js";
5
+
6
+ // node_modules/axios/lib/helpers/bind.js
7
+ var require_bind = __commonJS({
8
+ "node_modules/axios/lib/helpers/bind.js"(exports, module) {
9
+ "use strict";
10
+ module.exports = function bind(fn, thisArg) {
11
+ return function wrap() {
12
+ var args = new Array(arguments.length);
13
+ for (var i = 0; i < args.length; i++) {
14
+ args[i] = arguments[i];
15
+ }
16
+ return fn.apply(thisArg, args);
17
+ };
18
+ };
19
+ }
20
+ });
21
+
22
+ // node_modules/axios/lib/utils.js
23
+ var require_utils = __commonJS({
24
+ "node_modules/axios/lib/utils.js"(exports, module) {
25
+ "use strict";
26
+ var bind = require_bind();
27
+ var toString = Object.prototype.toString;
28
+ function isArray(val) {
29
+ return toString.call(val) === "[object Array]";
30
+ }
31
+ function isUndefined(val) {
32
+ return typeof val === "undefined";
33
+ }
34
+ function isBuffer(val) {
35
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === "function" && val.constructor.isBuffer(val);
36
+ }
37
+ function isArrayBuffer(val) {
38
+ return toString.call(val) === "[object ArrayBuffer]";
39
+ }
40
+ function isFormData(val) {
41
+ return typeof FormData !== "undefined" && val instanceof FormData;
42
+ }
43
+ function isArrayBufferView(val) {
44
+ var result;
45
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
46
+ result = ArrayBuffer.isView(val);
47
+ } else {
48
+ result = val && val.buffer && val.buffer instanceof ArrayBuffer;
49
+ }
50
+ return result;
51
+ }
52
+ function isString(val) {
53
+ return typeof val === "string";
54
+ }
55
+ function isNumber(val) {
56
+ return typeof val === "number";
57
+ }
58
+ function isObject(val) {
59
+ return val !== null && typeof val === "object";
60
+ }
61
+ function isPlainObject(val) {
62
+ if (toString.call(val) !== "[object Object]") {
63
+ return false;
64
+ }
65
+ var prototype = Object.getPrototypeOf(val);
66
+ return prototype === null || prototype === Object.prototype;
67
+ }
68
+ function isDate(val) {
69
+ return toString.call(val) === "[object Date]";
70
+ }
71
+ function isFile(val) {
72
+ return toString.call(val) === "[object File]";
73
+ }
74
+ function isBlob(val) {
75
+ return toString.call(val) === "[object Blob]";
76
+ }
77
+ function isFunction(val) {
78
+ return toString.call(val) === "[object Function]";
79
+ }
80
+ function isStream(val) {
81
+ return isObject(val) && isFunction(val.pipe);
82
+ }
83
+ function isURLSearchParams(val) {
84
+ return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
85
+ }
86
+ function trim(str) {
87
+ return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, "");
88
+ }
89
+ function isStandardBrowserEnv() {
90
+ if (typeof navigator !== "undefined" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS")) {
91
+ return false;
92
+ }
93
+ return typeof window !== "undefined" && typeof document !== "undefined";
94
+ }
95
+ function forEach(obj, fn) {
96
+ if (obj === null || typeof obj === "undefined") {
97
+ return;
98
+ }
99
+ if (typeof obj !== "object") {
100
+ obj = [obj];
101
+ }
102
+ if (isArray(obj)) {
103
+ for (var i = 0, l = obj.length; i < l; i++) {
104
+ fn.call(null, obj[i], i, obj);
105
+ }
106
+ } else {
107
+ for (var key in obj) {
108
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
109
+ fn.call(null, obj[key], key, obj);
110
+ }
111
+ }
112
+ }
113
+ }
114
+ function merge() {
115
+ var result = {};
116
+ function assignValue(val, key) {
117
+ if (isPlainObject(result[key]) && isPlainObject(val)) {
118
+ result[key] = merge(result[key], val);
119
+ } else if (isPlainObject(val)) {
120
+ result[key] = merge({}, val);
121
+ } else if (isArray(val)) {
122
+ result[key] = val.slice();
123
+ } else {
124
+ result[key] = val;
125
+ }
126
+ }
127
+ for (var i = 0, l = arguments.length; i < l; i++) {
128
+ forEach(arguments[i], assignValue);
129
+ }
130
+ return result;
131
+ }
132
+ function extend(a, b, thisArg) {
133
+ forEach(b, function assignValue(val, key) {
134
+ if (thisArg && typeof val === "function") {
135
+ a[key] = bind(val, thisArg);
136
+ } else {
137
+ a[key] = val;
138
+ }
139
+ });
140
+ return a;
141
+ }
142
+ function stripBOM(content) {
143
+ if (content.charCodeAt(0) === 65279) {
144
+ content = content.slice(1);
145
+ }
146
+ return content;
147
+ }
148
+ module.exports = {
149
+ isArray,
150
+ isArrayBuffer,
151
+ isBuffer,
152
+ isFormData,
153
+ isArrayBufferView,
154
+ isString,
155
+ isNumber,
156
+ isObject,
157
+ isPlainObject,
158
+ isUndefined,
159
+ isDate,
160
+ isFile,
161
+ isBlob,
162
+ isFunction,
163
+ isStream,
164
+ isURLSearchParams,
165
+ isStandardBrowserEnv,
166
+ forEach,
167
+ merge,
168
+ extend,
169
+ trim,
170
+ stripBOM
171
+ };
172
+ }
173
+ });
174
+
175
+ // node_modules/axios/lib/helpers/buildURL.js
176
+ var require_buildURL = __commonJS({
177
+ "node_modules/axios/lib/helpers/buildURL.js"(exports, module) {
178
+ "use strict";
179
+ var utils = require_utils();
180
+ function encode(val) {
181
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
182
+ }
183
+ module.exports = function buildURL(url, params, paramsSerializer) {
184
+ if (!params) {
185
+ return url;
186
+ }
187
+ var serializedParams;
188
+ if (paramsSerializer) {
189
+ serializedParams = paramsSerializer(params);
190
+ } else if (utils.isURLSearchParams(params)) {
191
+ serializedParams = params.toString();
192
+ } else {
193
+ var parts = [];
194
+ utils.forEach(params, function serialize(val, key) {
195
+ if (val === null || typeof val === "undefined") {
196
+ return;
197
+ }
198
+ if (utils.isArray(val)) {
199
+ key = key + "[]";
200
+ } else {
201
+ val = [val];
202
+ }
203
+ utils.forEach(val, function parseValue(v) {
204
+ if (utils.isDate(v)) {
205
+ v = v.toISOString();
206
+ } else if (utils.isObject(v)) {
207
+ v = JSON.stringify(v);
208
+ }
209
+ parts.push(encode(key) + "=" + encode(v));
210
+ });
211
+ });
212
+ serializedParams = parts.join("&");
213
+ }
214
+ if (serializedParams) {
215
+ var hashmarkIndex = url.indexOf("#");
216
+ if (hashmarkIndex !== -1) {
217
+ url = url.slice(0, hashmarkIndex);
218
+ }
219
+ url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
220
+ }
221
+ return url;
222
+ };
223
+ }
224
+ });
225
+
226
+ // node_modules/axios/lib/core/InterceptorManager.js
227
+ var require_InterceptorManager = __commonJS({
228
+ "node_modules/axios/lib/core/InterceptorManager.js"(exports, module) {
229
+ "use strict";
230
+ var utils = require_utils();
231
+ function InterceptorManager() {
232
+ this.handlers = [];
233
+ }
234
+ InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
235
+ this.handlers.push({
236
+ fulfilled,
237
+ rejected,
238
+ synchronous: options ? options.synchronous : false,
239
+ runWhen: options ? options.runWhen : null
240
+ });
241
+ return this.handlers.length - 1;
242
+ };
243
+ InterceptorManager.prototype.eject = function eject(id) {
244
+ if (this.handlers[id]) {
245
+ this.handlers[id] = null;
246
+ }
247
+ };
248
+ InterceptorManager.prototype.forEach = function forEach(fn) {
249
+ utils.forEach(this.handlers, function forEachHandler(h) {
250
+ if (h !== null) {
251
+ fn(h);
252
+ }
253
+ });
254
+ };
255
+ module.exports = InterceptorManager;
256
+ }
257
+ });
258
+
259
+ // node_modules/axios/lib/helpers/normalizeHeaderName.js
260
+ var require_normalizeHeaderName = __commonJS({
261
+ "node_modules/axios/lib/helpers/normalizeHeaderName.js"(exports, module) {
262
+ "use strict";
263
+ var utils = require_utils();
264
+ module.exports = function normalizeHeaderName(headers, normalizedName) {
265
+ utils.forEach(headers, function processHeader(value, name) {
266
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
267
+ headers[normalizedName] = value;
268
+ delete headers[name];
269
+ }
270
+ });
271
+ };
272
+ }
273
+ });
274
+
275
+ // node_modules/axios/lib/core/enhanceError.js
276
+ var require_enhanceError = __commonJS({
277
+ "node_modules/axios/lib/core/enhanceError.js"(exports, module) {
278
+ "use strict";
279
+ module.exports = function enhanceError(error, config, code, request, response) {
280
+ error.config = config;
281
+ if (code) {
282
+ error.code = code;
283
+ }
284
+ error.request = request;
285
+ error.response = response;
286
+ error.isAxiosError = true;
287
+ error.toJSON = function toJSON() {
288
+ return {
289
+ // Standard
290
+ message: this.message,
291
+ name: this.name,
292
+ // Microsoft
293
+ description: this.description,
294
+ number: this.number,
295
+ // Mozilla
296
+ fileName: this.fileName,
297
+ lineNumber: this.lineNumber,
298
+ columnNumber: this.columnNumber,
299
+ stack: this.stack,
300
+ // Axios
301
+ config: this.config,
302
+ code: this.code
303
+ };
304
+ };
305
+ return error;
306
+ };
307
+ }
308
+ });
309
+
310
+ // node_modules/axios/lib/core/createError.js
311
+ var require_createError = __commonJS({
312
+ "node_modules/axios/lib/core/createError.js"(exports, module) {
313
+ "use strict";
314
+ var enhanceError = require_enhanceError();
315
+ module.exports = function createError(message, config, code, request, response) {
316
+ var error = new Error(message);
317
+ return enhanceError(error, config, code, request, response);
318
+ };
319
+ }
320
+ });
321
+
322
+ // node_modules/axios/lib/core/settle.js
323
+ var require_settle = __commonJS({
324
+ "node_modules/axios/lib/core/settle.js"(exports, module) {
325
+ "use strict";
326
+ var createError = require_createError();
327
+ module.exports = function settle(resolve, reject, response) {
328
+ var validateStatus = response.config.validateStatus;
329
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
330
+ resolve(response);
331
+ } else {
332
+ reject(createError(
333
+ "Request failed with status code " + response.status,
334
+ response.config,
335
+ null,
336
+ response.request,
337
+ response
338
+ ));
339
+ }
340
+ };
341
+ }
342
+ });
343
+
344
+ // node_modules/axios/lib/helpers/cookies.js
345
+ var require_cookies = __commonJS({
346
+ "node_modules/axios/lib/helpers/cookies.js"(exports, module) {
347
+ "use strict";
348
+ var utils = require_utils();
349
+ module.exports = utils.isStandardBrowserEnv() ? (
350
+ // Standard browser envs support document.cookie
351
+ /* @__PURE__ */ (function standardBrowserEnv() {
352
+ return {
353
+ write: function write(name, value, expires, path, domain, secure) {
354
+ var cookie = [];
355
+ cookie.push(name + "=" + encodeURIComponent(value));
356
+ if (utils.isNumber(expires)) {
357
+ cookie.push("expires=" + new Date(expires).toGMTString());
358
+ }
359
+ if (utils.isString(path)) {
360
+ cookie.push("path=" + path);
361
+ }
362
+ if (utils.isString(domain)) {
363
+ cookie.push("domain=" + domain);
364
+ }
365
+ if (secure === true) {
366
+ cookie.push("secure");
367
+ }
368
+ document.cookie = cookie.join("; ");
369
+ },
370
+ read: function read(name) {
371
+ var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
372
+ return match ? decodeURIComponent(match[3]) : null;
373
+ },
374
+ remove: function remove(name) {
375
+ this.write(name, "", Date.now() - 864e5);
376
+ }
377
+ };
378
+ })()
379
+ ) : (
380
+ // Non standard browser env (web workers, react-native) lack needed support.
381
+ /* @__PURE__ */ (function nonStandardBrowserEnv() {
382
+ return {
383
+ write: function write() {
384
+ },
385
+ read: function read() {
386
+ return null;
387
+ },
388
+ remove: function remove() {
389
+ }
390
+ };
391
+ })()
392
+ );
393
+ }
394
+ });
395
+
396
+ // node_modules/axios/lib/helpers/isAbsoluteURL.js
397
+ var require_isAbsoluteURL = __commonJS({
398
+ "node_modules/axios/lib/helpers/isAbsoluteURL.js"(exports, module) {
399
+ "use strict";
400
+ module.exports = function isAbsoluteURL(url) {
401
+ return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
402
+ };
403
+ }
404
+ });
405
+
406
+ // node_modules/axios/lib/helpers/combineURLs.js
407
+ var require_combineURLs = __commonJS({
408
+ "node_modules/axios/lib/helpers/combineURLs.js"(exports, module) {
409
+ "use strict";
410
+ module.exports = function combineURLs(baseURL, relativeURL) {
411
+ return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
412
+ };
413
+ }
414
+ });
415
+
416
+ // node_modules/axios/lib/core/buildFullPath.js
417
+ var require_buildFullPath = __commonJS({
418
+ "node_modules/axios/lib/core/buildFullPath.js"(exports, module) {
419
+ "use strict";
420
+ var isAbsoluteURL = require_isAbsoluteURL();
421
+ var combineURLs = require_combineURLs();
422
+ module.exports = function buildFullPath(baseURL, requestedURL) {
423
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
424
+ return combineURLs(baseURL, requestedURL);
425
+ }
426
+ return requestedURL;
427
+ };
428
+ }
429
+ });
430
+
431
+ // node_modules/axios/lib/helpers/parseHeaders.js
432
+ var require_parseHeaders = __commonJS({
433
+ "node_modules/axios/lib/helpers/parseHeaders.js"(exports, module) {
434
+ "use strict";
435
+ var utils = require_utils();
436
+ var ignoreDuplicateOf = [
437
+ "age",
438
+ "authorization",
439
+ "content-length",
440
+ "content-type",
441
+ "etag",
442
+ "expires",
443
+ "from",
444
+ "host",
445
+ "if-modified-since",
446
+ "if-unmodified-since",
447
+ "last-modified",
448
+ "location",
449
+ "max-forwards",
450
+ "proxy-authorization",
451
+ "referer",
452
+ "retry-after",
453
+ "user-agent"
454
+ ];
455
+ module.exports = function parseHeaders(headers) {
456
+ var parsed = {};
457
+ var key;
458
+ var val;
459
+ var i;
460
+ if (!headers) {
461
+ return parsed;
462
+ }
463
+ utils.forEach(headers.split("\n"), function parser(line) {
464
+ i = line.indexOf(":");
465
+ key = utils.trim(line.substr(0, i)).toLowerCase();
466
+ val = utils.trim(line.substr(i + 1));
467
+ if (key) {
468
+ if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
469
+ return;
470
+ }
471
+ if (key === "set-cookie") {
472
+ parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
473
+ } else {
474
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
475
+ }
476
+ }
477
+ });
478
+ return parsed;
479
+ };
480
+ }
481
+ });
482
+
483
+ // node_modules/axios/lib/helpers/isURLSameOrigin.js
484
+ var require_isURLSameOrigin = __commonJS({
485
+ "node_modules/axios/lib/helpers/isURLSameOrigin.js"(exports, module) {
486
+ "use strict";
487
+ var utils = require_utils();
488
+ module.exports = utils.isStandardBrowserEnv() ? (
489
+ // Standard browser envs have full support of the APIs needed to test
490
+ // whether the request URL is of the same origin as current location.
491
+ (function standardBrowserEnv() {
492
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
493
+ var urlParsingNode = document.createElement("a");
494
+ var originURL;
495
+ function resolveURL(url) {
496
+ var href = url;
497
+ if (msie) {
498
+ urlParsingNode.setAttribute("href", href);
499
+ href = urlParsingNode.href;
500
+ }
501
+ urlParsingNode.setAttribute("href", href);
502
+ return {
503
+ href: urlParsingNode.href,
504
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
505
+ host: urlParsingNode.host,
506
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
507
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
508
+ hostname: urlParsingNode.hostname,
509
+ port: urlParsingNode.port,
510
+ pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
511
+ };
512
+ }
513
+ originURL = resolveURL(window.location.href);
514
+ return function isURLSameOrigin(requestURL) {
515
+ var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
516
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
517
+ };
518
+ })()
519
+ ) : (
520
+ // Non standard browser envs (web workers, react-native) lack needed support.
521
+ /* @__PURE__ */ (function nonStandardBrowserEnv() {
522
+ return function isURLSameOrigin() {
523
+ return true;
524
+ };
525
+ })()
526
+ );
527
+ }
528
+ });
529
+
530
+ // node_modules/axios/lib/adapters/xhr.js
531
+ var require_xhr = __commonJS({
532
+ "node_modules/axios/lib/adapters/xhr.js"(exports, module) {
533
+ "use strict";
534
+ var utils = require_utils();
535
+ var settle = require_settle();
536
+ var cookies = require_cookies();
537
+ var buildURL = require_buildURL();
538
+ var buildFullPath = require_buildFullPath();
539
+ var parseHeaders = require_parseHeaders();
540
+ var isURLSameOrigin = require_isURLSameOrigin();
541
+ var createError = require_createError();
542
+ module.exports = function xhrAdapter(config) {
543
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
544
+ var requestData = config.data;
545
+ var requestHeaders = config.headers;
546
+ var responseType = config.responseType;
547
+ if (utils.isFormData(requestData)) {
548
+ delete requestHeaders["Content-Type"];
549
+ }
550
+ var request = new XMLHttpRequest();
551
+ if (config.auth) {
552
+ var username = config.auth.username || "";
553
+ var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
554
+ requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
555
+ }
556
+ var fullPath = buildFullPath(config.baseURL, config.url);
557
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
558
+ request.timeout = config.timeout;
559
+ function onloadend() {
560
+ if (!request) {
561
+ return;
562
+ }
563
+ var responseHeaders = "getAllResponseHeaders" in request ? parseHeaders(request.getAllResponseHeaders()) : null;
564
+ var responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
565
+ var response = {
566
+ data: responseData,
567
+ status: request.status,
568
+ statusText: request.statusText,
569
+ headers: responseHeaders,
570
+ config,
571
+ request
572
+ };
573
+ settle(resolve, reject, response);
574
+ request = null;
575
+ }
576
+ if ("onloadend" in request) {
577
+ request.onloadend = onloadend;
578
+ } else {
579
+ request.onreadystatechange = function handleLoad() {
580
+ if (!request || request.readyState !== 4) {
581
+ return;
582
+ }
583
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
584
+ return;
585
+ }
586
+ setTimeout(onloadend);
587
+ };
588
+ }
589
+ request.onabort = function handleAbort() {
590
+ if (!request) {
591
+ return;
592
+ }
593
+ reject(createError("Request aborted", config, "ECONNABORTED", request));
594
+ request = null;
595
+ };
596
+ request.onerror = function handleError() {
597
+ reject(createError("Network Error", config, null, request));
598
+ request = null;
599
+ };
600
+ request.ontimeout = function handleTimeout() {
601
+ var timeoutErrorMessage = "timeout of " + config.timeout + "ms exceeded";
602
+ if (config.timeoutErrorMessage) {
603
+ timeoutErrorMessage = config.timeoutErrorMessage;
604
+ }
605
+ reject(createError(
606
+ timeoutErrorMessage,
607
+ config,
608
+ config.transitional && config.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
609
+ request
610
+ ));
611
+ request = null;
612
+ };
613
+ if (utils.isStandardBrowserEnv()) {
614
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : void 0;
615
+ if (xsrfValue) {
616
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
617
+ }
618
+ }
619
+ if ("setRequestHeader" in request) {
620
+ utils.forEach(requestHeaders, function setRequestHeader(val, key) {
621
+ if (typeof requestData === "undefined" && key.toLowerCase() === "content-type") {
622
+ delete requestHeaders[key];
623
+ } else {
624
+ request.setRequestHeader(key, val);
625
+ }
626
+ });
627
+ }
628
+ if (!utils.isUndefined(config.withCredentials)) {
629
+ request.withCredentials = !!config.withCredentials;
630
+ }
631
+ if (responseType && responseType !== "json") {
632
+ request.responseType = config.responseType;
633
+ }
634
+ if (typeof config.onDownloadProgress === "function") {
635
+ request.addEventListener("progress", config.onDownloadProgress);
636
+ }
637
+ if (typeof config.onUploadProgress === "function" && request.upload) {
638
+ request.upload.addEventListener("progress", config.onUploadProgress);
639
+ }
640
+ if (config.cancelToken) {
641
+ config.cancelToken.promise.then(function onCanceled(cancel) {
642
+ if (!request) {
643
+ return;
644
+ }
645
+ request.abort();
646
+ reject(cancel);
647
+ request = null;
648
+ });
649
+ }
650
+ if (!requestData) {
651
+ requestData = null;
652
+ }
653
+ request.send(requestData);
654
+ });
655
+ };
656
+ }
657
+ });
658
+
659
+ // node_modules/ms/index.js
660
+ var require_ms = __commonJS({
661
+ "node_modules/ms/index.js"(exports, module) {
662
+ "use strict";
663
+ var s = 1e3;
664
+ var m = s * 60;
665
+ var h = m * 60;
666
+ var d = h * 24;
667
+ var w = d * 7;
668
+ var y = d * 365.25;
669
+ module.exports = function(val, options) {
670
+ options = options || {};
671
+ var type = typeof val;
672
+ if (type === "string" && val.length > 0) {
673
+ return parse(val);
674
+ } else if (type === "number" && isFinite(val)) {
675
+ return options.long ? fmtLong(val) : fmtShort(val);
676
+ }
677
+ throw new Error(
678
+ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
679
+ );
680
+ };
681
+ function parse(str) {
682
+ str = String(str);
683
+ if (str.length > 100) {
684
+ return;
685
+ }
686
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
687
+ str
688
+ );
689
+ if (!match) {
690
+ return;
691
+ }
692
+ var n = parseFloat(match[1]);
693
+ var type = (match[2] || "ms").toLowerCase();
694
+ switch (type) {
695
+ case "years":
696
+ case "year":
697
+ case "yrs":
698
+ case "yr":
699
+ case "y":
700
+ return n * y;
701
+ case "weeks":
702
+ case "week":
703
+ case "w":
704
+ return n * w;
705
+ case "days":
706
+ case "day":
707
+ case "d":
708
+ return n * d;
709
+ case "hours":
710
+ case "hour":
711
+ case "hrs":
712
+ case "hr":
713
+ case "h":
714
+ return n * h;
715
+ case "minutes":
716
+ case "minute":
717
+ case "mins":
718
+ case "min":
719
+ case "m":
720
+ return n * m;
721
+ case "seconds":
722
+ case "second":
723
+ case "secs":
724
+ case "sec":
725
+ case "s":
726
+ return n * s;
727
+ case "milliseconds":
728
+ case "millisecond":
729
+ case "msecs":
730
+ case "msec":
731
+ case "ms":
732
+ return n;
733
+ default:
734
+ return void 0;
735
+ }
736
+ }
737
+ function fmtShort(ms) {
738
+ var msAbs = Math.abs(ms);
739
+ if (msAbs >= d) {
740
+ return Math.round(ms / d) + "d";
741
+ }
742
+ if (msAbs >= h) {
743
+ return Math.round(ms / h) + "h";
744
+ }
745
+ if (msAbs >= m) {
746
+ return Math.round(ms / m) + "m";
747
+ }
748
+ if (msAbs >= s) {
749
+ return Math.round(ms / s) + "s";
750
+ }
751
+ return ms + "ms";
752
+ }
753
+ function fmtLong(ms) {
754
+ var msAbs = Math.abs(ms);
755
+ if (msAbs >= d) {
756
+ return plural(ms, msAbs, d, "day");
757
+ }
758
+ if (msAbs >= h) {
759
+ return plural(ms, msAbs, h, "hour");
760
+ }
761
+ if (msAbs >= m) {
762
+ return plural(ms, msAbs, m, "minute");
763
+ }
764
+ if (msAbs >= s) {
765
+ return plural(ms, msAbs, s, "second");
766
+ }
767
+ return ms + " ms";
768
+ }
769
+ function plural(ms, msAbs, n, name) {
770
+ var isPlural = msAbs >= n * 1.5;
771
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
772
+ }
773
+ }
774
+ });
775
+
776
+ // node_modules/debug/src/common.js
777
+ var require_common = __commonJS({
778
+ "node_modules/debug/src/common.js"(exports, module) {
779
+ "use strict";
780
+ function setup(env) {
781
+ createDebug.debug = createDebug;
782
+ createDebug.default = createDebug;
783
+ createDebug.coerce = coerce;
784
+ createDebug.disable = disable;
785
+ createDebug.enable = enable;
786
+ createDebug.enabled = enabled;
787
+ createDebug.humanize = require_ms();
788
+ createDebug.destroy = destroy;
789
+ Object.keys(env).forEach((key) => {
790
+ createDebug[key] = env[key];
791
+ });
792
+ createDebug.names = [];
793
+ createDebug.skips = [];
794
+ createDebug.formatters = {};
795
+ function selectColor(namespace) {
796
+ let hash = 0;
797
+ for (let i = 0; i < namespace.length; i++) {
798
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
799
+ hash |= 0;
800
+ }
801
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
802
+ }
803
+ createDebug.selectColor = selectColor;
804
+ function createDebug(namespace) {
805
+ let prevTime;
806
+ let enableOverride = null;
807
+ let namespacesCache;
808
+ let enabledCache;
809
+ function debug(...args) {
810
+ if (!debug.enabled) {
811
+ return;
812
+ }
813
+ const self = debug;
814
+ const curr = Number(/* @__PURE__ */ new Date());
815
+ const ms = curr - (prevTime || curr);
816
+ self.diff = ms;
817
+ self.prev = prevTime;
818
+ self.curr = curr;
819
+ prevTime = curr;
820
+ args[0] = createDebug.coerce(args[0]);
821
+ if (typeof args[0] !== "string") {
822
+ args.unshift("%O");
823
+ }
824
+ let index = 0;
825
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
826
+ if (match === "%%") {
827
+ return "%";
828
+ }
829
+ index++;
830
+ const formatter = createDebug.formatters[format];
831
+ if (typeof formatter === "function") {
832
+ const val = args[index];
833
+ match = formatter.call(self, val);
834
+ args.splice(index, 1);
835
+ index--;
836
+ }
837
+ return match;
838
+ });
839
+ createDebug.formatArgs.call(self, args);
840
+ const logFn = self.log || createDebug.log;
841
+ logFn.apply(self, args);
842
+ }
843
+ debug.namespace = namespace;
844
+ debug.useColors = createDebug.useColors();
845
+ debug.color = createDebug.selectColor(namespace);
846
+ debug.extend = extend;
847
+ debug.destroy = createDebug.destroy;
848
+ Object.defineProperty(debug, "enabled", {
849
+ enumerable: true,
850
+ configurable: false,
851
+ get: () => {
852
+ if (enableOverride !== null) {
853
+ return enableOverride;
854
+ }
855
+ if (namespacesCache !== createDebug.namespaces) {
856
+ namespacesCache = createDebug.namespaces;
857
+ enabledCache = createDebug.enabled(namespace);
858
+ }
859
+ return enabledCache;
860
+ },
861
+ set: (v) => {
862
+ enableOverride = v;
863
+ }
864
+ });
865
+ if (typeof createDebug.init === "function") {
866
+ createDebug.init(debug);
867
+ }
868
+ return debug;
869
+ }
870
+ function extend(namespace, delimiter) {
871
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
872
+ newDebug.log = this.log;
873
+ return newDebug;
874
+ }
875
+ function enable(namespaces) {
876
+ createDebug.save(namespaces);
877
+ createDebug.namespaces = namespaces;
878
+ createDebug.names = [];
879
+ createDebug.skips = [];
880
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
881
+ for (const ns of split) {
882
+ if (ns[0] === "-") {
883
+ createDebug.skips.push(ns.slice(1));
884
+ } else {
885
+ createDebug.names.push(ns);
886
+ }
887
+ }
888
+ }
889
+ function matchesTemplate(search, template) {
890
+ let searchIndex = 0;
891
+ let templateIndex = 0;
892
+ let starIndex = -1;
893
+ let matchIndex = 0;
894
+ while (searchIndex < search.length) {
895
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
896
+ if (template[templateIndex] === "*") {
897
+ starIndex = templateIndex;
898
+ matchIndex = searchIndex;
899
+ templateIndex++;
900
+ } else {
901
+ searchIndex++;
902
+ templateIndex++;
903
+ }
904
+ } else if (starIndex !== -1) {
905
+ templateIndex = starIndex + 1;
906
+ matchIndex++;
907
+ searchIndex = matchIndex;
908
+ } else {
909
+ return false;
910
+ }
911
+ }
912
+ while (templateIndex < template.length && template[templateIndex] === "*") {
913
+ templateIndex++;
914
+ }
915
+ return templateIndex === template.length;
916
+ }
917
+ function disable() {
918
+ const namespaces = [
919
+ ...createDebug.names,
920
+ ...createDebug.skips.map((namespace) => "-" + namespace)
921
+ ].join(",");
922
+ createDebug.enable("");
923
+ return namespaces;
924
+ }
925
+ function enabled(name) {
926
+ for (const skip of createDebug.skips) {
927
+ if (matchesTemplate(name, skip)) {
928
+ return false;
929
+ }
930
+ }
931
+ for (const ns of createDebug.names) {
932
+ if (matchesTemplate(name, ns)) {
933
+ return true;
934
+ }
935
+ }
936
+ return false;
937
+ }
938
+ function coerce(val) {
939
+ if (val instanceof Error) {
940
+ return val.stack || val.message;
941
+ }
942
+ return val;
943
+ }
944
+ function destroy() {
945
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
946
+ }
947
+ createDebug.enable(createDebug.load());
948
+ return createDebug;
949
+ }
950
+ module.exports = setup;
951
+ }
952
+ });
953
+
954
+ // node_modules/debug/src/browser.js
955
+ var require_browser = __commonJS({
956
+ "node_modules/debug/src/browser.js"(exports, module) {
957
+ "use strict";
958
+ exports.formatArgs = formatArgs;
959
+ exports.save = save;
960
+ exports.load = load;
961
+ exports.useColors = useColors;
962
+ exports.storage = localstorage();
963
+ exports.destroy = /* @__PURE__ */ (() => {
964
+ let warned = false;
965
+ return () => {
966
+ if (!warned) {
967
+ warned = true;
968
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
969
+ }
970
+ };
971
+ })();
972
+ exports.colors = [
973
+ "#0000CC",
974
+ "#0000FF",
975
+ "#0033CC",
976
+ "#0033FF",
977
+ "#0066CC",
978
+ "#0066FF",
979
+ "#0099CC",
980
+ "#0099FF",
981
+ "#00CC00",
982
+ "#00CC33",
983
+ "#00CC66",
984
+ "#00CC99",
985
+ "#00CCCC",
986
+ "#00CCFF",
987
+ "#3300CC",
988
+ "#3300FF",
989
+ "#3333CC",
990
+ "#3333FF",
991
+ "#3366CC",
992
+ "#3366FF",
993
+ "#3399CC",
994
+ "#3399FF",
995
+ "#33CC00",
996
+ "#33CC33",
997
+ "#33CC66",
998
+ "#33CC99",
999
+ "#33CCCC",
1000
+ "#33CCFF",
1001
+ "#6600CC",
1002
+ "#6600FF",
1003
+ "#6633CC",
1004
+ "#6633FF",
1005
+ "#66CC00",
1006
+ "#66CC33",
1007
+ "#9900CC",
1008
+ "#9900FF",
1009
+ "#9933CC",
1010
+ "#9933FF",
1011
+ "#99CC00",
1012
+ "#99CC33",
1013
+ "#CC0000",
1014
+ "#CC0033",
1015
+ "#CC0066",
1016
+ "#CC0099",
1017
+ "#CC00CC",
1018
+ "#CC00FF",
1019
+ "#CC3300",
1020
+ "#CC3333",
1021
+ "#CC3366",
1022
+ "#CC3399",
1023
+ "#CC33CC",
1024
+ "#CC33FF",
1025
+ "#CC6600",
1026
+ "#CC6633",
1027
+ "#CC9900",
1028
+ "#CC9933",
1029
+ "#CCCC00",
1030
+ "#CCCC33",
1031
+ "#FF0000",
1032
+ "#FF0033",
1033
+ "#FF0066",
1034
+ "#FF0099",
1035
+ "#FF00CC",
1036
+ "#FF00FF",
1037
+ "#FF3300",
1038
+ "#FF3333",
1039
+ "#FF3366",
1040
+ "#FF3399",
1041
+ "#FF33CC",
1042
+ "#FF33FF",
1043
+ "#FF6600",
1044
+ "#FF6633",
1045
+ "#FF9900",
1046
+ "#FF9933",
1047
+ "#FFCC00",
1048
+ "#FFCC33"
1049
+ ];
1050
+ function useColors() {
1051
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
1052
+ return true;
1053
+ }
1054
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
1055
+ return false;
1056
+ }
1057
+ let m;
1058
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
1059
+ typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
1060
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
1061
+ typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
1062
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
1063
+ }
1064
+ function formatArgs(args) {
1065
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
1066
+ if (!this.useColors) {
1067
+ return;
1068
+ }
1069
+ const c = "color: " + this.color;
1070
+ args.splice(1, 0, c, "color: inherit");
1071
+ let index = 0;
1072
+ let lastC = 0;
1073
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
1074
+ if (match === "%%") {
1075
+ return;
1076
+ }
1077
+ index++;
1078
+ if (match === "%c") {
1079
+ lastC = index;
1080
+ }
1081
+ });
1082
+ args.splice(lastC, 0, c);
1083
+ }
1084
+ exports.log = console.debug || console.log || (() => {
1085
+ });
1086
+ function save(namespaces) {
1087
+ try {
1088
+ if (namespaces) {
1089
+ exports.storage.setItem("debug", namespaces);
1090
+ } else {
1091
+ exports.storage.removeItem("debug");
1092
+ }
1093
+ } catch (error) {
1094
+ }
1095
+ }
1096
+ function load() {
1097
+ let r;
1098
+ try {
1099
+ r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
1100
+ } catch (error) {
1101
+ }
1102
+ if (!r && typeof process !== "undefined" && "env" in process) {
1103
+ r = process.env.DEBUG;
1104
+ }
1105
+ return r;
1106
+ }
1107
+ function localstorage() {
1108
+ try {
1109
+ return localStorage;
1110
+ } catch (error) {
1111
+ }
1112
+ }
1113
+ module.exports = require_common()(exports);
1114
+ var { formatters } = module.exports;
1115
+ formatters.j = function(v) {
1116
+ try {
1117
+ return JSON.stringify(v);
1118
+ } catch (error) {
1119
+ return "[UnexpectedJSONParseError]: " + error.message;
1120
+ }
1121
+ };
1122
+ }
1123
+ });
1124
+
1125
+ // ../../node_modules/has-flag/index.js
1126
+ var require_has_flag = __commonJS({
1127
+ "../../node_modules/has-flag/index.js"(exports, module) {
1128
+ "use strict";
1129
+ module.exports = (flag, argv = process.argv) => {
1130
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
1131
+ const position = argv.indexOf(prefix + flag);
1132
+ const terminatorPosition = argv.indexOf("--");
1133
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1134
+ };
1135
+ }
1136
+ });
1137
+
1138
+ // ../../node_modules/supports-color/index.js
1139
+ var require_supports_color = __commonJS({
1140
+ "../../node_modules/supports-color/index.js"(exports, module) {
1141
+ "use strict";
1142
+ var os = __require("os");
1143
+ var tty = __require("tty");
1144
+ var hasFlag = require_has_flag();
1145
+ var { env } = process;
1146
+ var forceColor;
1147
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
1148
+ forceColor = 0;
1149
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
1150
+ forceColor = 1;
1151
+ }
1152
+ if ("FORCE_COLOR" in env) {
1153
+ if (env.FORCE_COLOR === "true") {
1154
+ forceColor = 1;
1155
+ } else if (env.FORCE_COLOR === "false") {
1156
+ forceColor = 0;
1157
+ } else {
1158
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
1159
+ }
1160
+ }
1161
+ function translateLevel(level) {
1162
+ if (level === 0) {
1163
+ return false;
1164
+ }
1165
+ return {
1166
+ level,
1167
+ hasBasic: true,
1168
+ has256: level >= 2,
1169
+ has16m: level >= 3
1170
+ };
1171
+ }
1172
+ function supportsColor(haveStream, streamIsTTY) {
1173
+ if (forceColor === 0) {
1174
+ return 0;
1175
+ }
1176
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
1177
+ return 3;
1178
+ }
1179
+ if (hasFlag("color=256")) {
1180
+ return 2;
1181
+ }
1182
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
1183
+ return 0;
1184
+ }
1185
+ const min = forceColor || 0;
1186
+ if (env.TERM === "dumb") {
1187
+ return min;
1188
+ }
1189
+ if (process.platform === "win32") {
1190
+ const osRelease = os.release().split(".");
1191
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
1192
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
1193
+ }
1194
+ return 1;
1195
+ }
1196
+ if ("CI" in env) {
1197
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
1198
+ return 1;
1199
+ }
1200
+ return min;
1201
+ }
1202
+ if ("TEAMCITY_VERSION" in env) {
1203
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1204
+ }
1205
+ if (env.COLORTERM === "truecolor") {
1206
+ return 3;
1207
+ }
1208
+ if ("TERM_PROGRAM" in env) {
1209
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1210
+ switch (env.TERM_PROGRAM) {
1211
+ case "iTerm.app":
1212
+ return version >= 3 ? 3 : 2;
1213
+ case "Apple_Terminal":
1214
+ return 2;
1215
+ }
1216
+ }
1217
+ if (/-256(color)?$/i.test(env.TERM)) {
1218
+ return 2;
1219
+ }
1220
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
1221
+ return 1;
1222
+ }
1223
+ if ("COLORTERM" in env) {
1224
+ return 1;
1225
+ }
1226
+ return min;
1227
+ }
1228
+ function getSupportLevel(stream) {
1229
+ const level = supportsColor(stream, stream && stream.isTTY);
1230
+ return translateLevel(level);
1231
+ }
1232
+ module.exports = {
1233
+ supportsColor: getSupportLevel,
1234
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
1235
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
1236
+ };
1237
+ }
1238
+ });
1239
+
1240
+ // node_modules/debug/src/node.js
1241
+ var require_node = __commonJS({
1242
+ "node_modules/debug/src/node.js"(exports, module) {
1243
+ "use strict";
1244
+ var tty = __require("tty");
1245
+ var util = __require("util");
1246
+ exports.init = init;
1247
+ exports.log = log;
1248
+ exports.formatArgs = formatArgs;
1249
+ exports.save = save;
1250
+ exports.load = load;
1251
+ exports.useColors = useColors;
1252
+ exports.destroy = util.deprecate(
1253
+ () => {
1254
+ },
1255
+ "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
1256
+ );
1257
+ exports.colors = [6, 2, 3, 4, 5, 1];
1258
+ try {
1259
+ const supportsColor = require_supports_color();
1260
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
1261
+ exports.colors = [
1262
+ 20,
1263
+ 21,
1264
+ 26,
1265
+ 27,
1266
+ 32,
1267
+ 33,
1268
+ 38,
1269
+ 39,
1270
+ 40,
1271
+ 41,
1272
+ 42,
1273
+ 43,
1274
+ 44,
1275
+ 45,
1276
+ 56,
1277
+ 57,
1278
+ 62,
1279
+ 63,
1280
+ 68,
1281
+ 69,
1282
+ 74,
1283
+ 75,
1284
+ 76,
1285
+ 77,
1286
+ 78,
1287
+ 79,
1288
+ 80,
1289
+ 81,
1290
+ 92,
1291
+ 93,
1292
+ 98,
1293
+ 99,
1294
+ 112,
1295
+ 113,
1296
+ 128,
1297
+ 129,
1298
+ 134,
1299
+ 135,
1300
+ 148,
1301
+ 149,
1302
+ 160,
1303
+ 161,
1304
+ 162,
1305
+ 163,
1306
+ 164,
1307
+ 165,
1308
+ 166,
1309
+ 167,
1310
+ 168,
1311
+ 169,
1312
+ 170,
1313
+ 171,
1314
+ 172,
1315
+ 173,
1316
+ 178,
1317
+ 179,
1318
+ 184,
1319
+ 185,
1320
+ 196,
1321
+ 197,
1322
+ 198,
1323
+ 199,
1324
+ 200,
1325
+ 201,
1326
+ 202,
1327
+ 203,
1328
+ 204,
1329
+ 205,
1330
+ 206,
1331
+ 207,
1332
+ 208,
1333
+ 209,
1334
+ 214,
1335
+ 215,
1336
+ 220,
1337
+ 221
1338
+ ];
1339
+ }
1340
+ } catch (error) {
1341
+ }
1342
+ exports.inspectOpts = Object.keys(process.env).filter((key) => {
1343
+ return /^debug_/i.test(key);
1344
+ }).reduce((obj, key) => {
1345
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
1346
+ return k.toUpperCase();
1347
+ });
1348
+ let val = process.env[key];
1349
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
1350
+ val = true;
1351
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
1352
+ val = false;
1353
+ } else if (val === "null") {
1354
+ val = null;
1355
+ } else {
1356
+ val = Number(val);
1357
+ }
1358
+ obj[prop] = val;
1359
+ return obj;
1360
+ }, {});
1361
+ function useColors() {
1362
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
1363
+ }
1364
+ function formatArgs(args) {
1365
+ const { namespace: name, useColors: useColors2 } = this;
1366
+ if (useColors2) {
1367
+ const c = this.color;
1368
+ const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
1369
+ const prefix = ` ${colorCode};1m${name} \x1B[0m`;
1370
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
1371
+ args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
1372
+ } else {
1373
+ args[0] = getDate() + name + " " + args[0];
1374
+ }
1375
+ }
1376
+ function getDate() {
1377
+ if (exports.inspectOpts.hideDate) {
1378
+ return "";
1379
+ }
1380
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
1381
+ }
1382
+ function log(...args) {
1383
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n");
1384
+ }
1385
+ function save(namespaces) {
1386
+ if (namespaces) {
1387
+ process.env.DEBUG = namespaces;
1388
+ } else {
1389
+ delete process.env.DEBUG;
1390
+ }
1391
+ }
1392
+ function load() {
1393
+ return process.env.DEBUG;
1394
+ }
1395
+ function init(debug) {
1396
+ debug.inspectOpts = {};
1397
+ const keys = Object.keys(exports.inspectOpts);
1398
+ for (let i = 0; i < keys.length; i++) {
1399
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
1400
+ }
1401
+ }
1402
+ module.exports = require_common()(exports);
1403
+ var { formatters } = module.exports;
1404
+ formatters.o = function(v) {
1405
+ this.inspectOpts.colors = this.useColors;
1406
+ return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
1407
+ };
1408
+ formatters.O = function(v) {
1409
+ this.inspectOpts.colors = this.useColors;
1410
+ return util.inspect(v, this.inspectOpts);
1411
+ };
1412
+ }
1413
+ });
1414
+
1415
+ // node_modules/debug/src/index.js
1416
+ var require_src = __commonJS({
1417
+ "node_modules/debug/src/index.js"(exports, module) {
1418
+ "use strict";
1419
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
1420
+ module.exports = require_browser();
1421
+ } else {
1422
+ module.exports = require_node();
1423
+ }
1424
+ }
1425
+ });
1426
+
1427
+ // node_modules/follow-redirects/debug.js
1428
+ var require_debug = __commonJS({
1429
+ "node_modules/follow-redirects/debug.js"(exports, module) {
1430
+ "use strict";
1431
+ var debug;
1432
+ module.exports = function() {
1433
+ if (!debug) {
1434
+ try {
1435
+ debug = require_src()("follow-redirects");
1436
+ } catch (error) {
1437
+ }
1438
+ if (typeof debug !== "function") {
1439
+ debug = function() {
1440
+ };
1441
+ }
1442
+ }
1443
+ debug.apply(null, arguments);
1444
+ };
1445
+ }
1446
+ });
1447
+
1448
+ // node_modules/follow-redirects/index.js
1449
+ var require_follow_redirects = __commonJS({
1450
+ "node_modules/follow-redirects/index.js"(exports, module) {
1451
+ "use strict";
1452
+ var url = __require("url");
1453
+ var URL = url.URL;
1454
+ var http = __require("http");
1455
+ var https = __require("https");
1456
+ var Writable = __require("stream").Writable;
1457
+ var assert = __require("assert");
1458
+ var debug = require_debug();
1459
+ (function detectUnsupportedEnvironment() {
1460
+ var looksLikeNode = typeof process !== "undefined";
1461
+ var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
1462
+ var looksLikeV8 = isFunction(Error.captureStackTrace);
1463
+ if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {
1464
+ console.warn("The follow-redirects package should be excluded from browser builds.");
1465
+ }
1466
+ })();
1467
+ var useNativeURL = false;
1468
+ try {
1469
+ assert(new URL(""));
1470
+ } catch (error) {
1471
+ useNativeURL = error.code === "ERR_INVALID_URL";
1472
+ }
1473
+ var preservedUrlFields = [
1474
+ "auth",
1475
+ "host",
1476
+ "hostname",
1477
+ "href",
1478
+ "path",
1479
+ "pathname",
1480
+ "port",
1481
+ "protocol",
1482
+ "query",
1483
+ "search",
1484
+ "hash"
1485
+ ];
1486
+ var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
1487
+ var eventHandlers = /* @__PURE__ */ Object.create(null);
1488
+ events.forEach(function(event) {
1489
+ eventHandlers[event] = function(arg1, arg2, arg3) {
1490
+ this._redirectable.emit(event, arg1, arg2, arg3);
1491
+ };
1492
+ });
1493
+ var InvalidUrlError = createErrorType(
1494
+ "ERR_INVALID_URL",
1495
+ "Invalid URL",
1496
+ TypeError
1497
+ );
1498
+ var RedirectionError = createErrorType(
1499
+ "ERR_FR_REDIRECTION_FAILURE",
1500
+ "Redirected request failed"
1501
+ );
1502
+ var TooManyRedirectsError = createErrorType(
1503
+ "ERR_FR_TOO_MANY_REDIRECTS",
1504
+ "Maximum number of redirects exceeded",
1505
+ RedirectionError
1506
+ );
1507
+ var MaxBodyLengthExceededError = createErrorType(
1508
+ "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
1509
+ "Request body larger than maxBodyLength limit"
1510
+ );
1511
+ var WriteAfterEndError = createErrorType(
1512
+ "ERR_STREAM_WRITE_AFTER_END",
1513
+ "write after end"
1514
+ );
1515
+ var destroy = Writable.prototype.destroy || noop;
1516
+ function RedirectableRequest(options, responseCallback) {
1517
+ Writable.call(this);
1518
+ this._sanitizeOptions(options);
1519
+ this._options = options;
1520
+ this._ended = false;
1521
+ this._ending = false;
1522
+ this._redirectCount = 0;
1523
+ this._redirects = [];
1524
+ this._requestBodyLength = 0;
1525
+ this._requestBodyBuffers = [];
1526
+ if (responseCallback) {
1527
+ this.on("response", responseCallback);
1528
+ }
1529
+ var self = this;
1530
+ this._onNativeResponse = function(response) {
1531
+ try {
1532
+ self._processResponse(response);
1533
+ } catch (cause) {
1534
+ self.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
1535
+ }
1536
+ };
1537
+ this._performRequest();
1538
+ }
1539
+ RedirectableRequest.prototype = Object.create(Writable.prototype);
1540
+ RedirectableRequest.prototype.abort = function() {
1541
+ destroyRequest(this._currentRequest);
1542
+ this._currentRequest.abort();
1543
+ this.emit("abort");
1544
+ };
1545
+ RedirectableRequest.prototype.destroy = function(error) {
1546
+ destroyRequest(this._currentRequest, error);
1547
+ destroy.call(this, error);
1548
+ return this;
1549
+ };
1550
+ RedirectableRequest.prototype.write = function(data, encoding, callback) {
1551
+ if (this._ending) {
1552
+ throw new WriteAfterEndError();
1553
+ }
1554
+ if (!isString(data) && !isBuffer(data)) {
1555
+ throw new TypeError("data should be a string, Buffer or Uint8Array");
1556
+ }
1557
+ if (isFunction(encoding)) {
1558
+ callback = encoding;
1559
+ encoding = null;
1560
+ }
1561
+ if (data.length === 0) {
1562
+ if (callback) {
1563
+ callback();
1564
+ }
1565
+ return;
1566
+ }
1567
+ if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
1568
+ this._requestBodyLength += data.length;
1569
+ this._requestBodyBuffers.push({ data, encoding });
1570
+ this._currentRequest.write(data, encoding, callback);
1571
+ } else {
1572
+ this.emit("error", new MaxBodyLengthExceededError());
1573
+ this.abort();
1574
+ }
1575
+ };
1576
+ RedirectableRequest.prototype.end = function(data, encoding, callback) {
1577
+ if (isFunction(data)) {
1578
+ callback = data;
1579
+ data = encoding = null;
1580
+ } else if (isFunction(encoding)) {
1581
+ callback = encoding;
1582
+ encoding = null;
1583
+ }
1584
+ if (!data) {
1585
+ this._ended = this._ending = true;
1586
+ this._currentRequest.end(null, null, callback);
1587
+ } else {
1588
+ var self = this;
1589
+ var currentRequest = this._currentRequest;
1590
+ this.write(data, encoding, function() {
1591
+ self._ended = true;
1592
+ currentRequest.end(null, null, callback);
1593
+ });
1594
+ this._ending = true;
1595
+ }
1596
+ };
1597
+ RedirectableRequest.prototype.setHeader = function(name, value) {
1598
+ this._options.headers[name] = value;
1599
+ this._currentRequest.setHeader(name, value);
1600
+ };
1601
+ RedirectableRequest.prototype.removeHeader = function(name) {
1602
+ delete this._options.headers[name];
1603
+ this._currentRequest.removeHeader(name);
1604
+ };
1605
+ RedirectableRequest.prototype.setTimeout = function(msecs, callback) {
1606
+ var self = this;
1607
+ function destroyOnTimeout(socket) {
1608
+ socket.setTimeout(msecs);
1609
+ socket.removeListener("timeout", socket.destroy);
1610
+ socket.addListener("timeout", socket.destroy);
1611
+ }
1612
+ function startTimer(socket) {
1613
+ if (self._timeout) {
1614
+ clearTimeout(self._timeout);
1615
+ }
1616
+ self._timeout = setTimeout(function() {
1617
+ self.emit("timeout");
1618
+ clearTimer();
1619
+ }, msecs);
1620
+ destroyOnTimeout(socket);
1621
+ }
1622
+ function clearTimer() {
1623
+ if (self._timeout) {
1624
+ clearTimeout(self._timeout);
1625
+ self._timeout = null;
1626
+ }
1627
+ self.removeListener("abort", clearTimer);
1628
+ self.removeListener("error", clearTimer);
1629
+ self.removeListener("response", clearTimer);
1630
+ self.removeListener("close", clearTimer);
1631
+ if (callback) {
1632
+ self.removeListener("timeout", callback);
1633
+ }
1634
+ if (!self.socket) {
1635
+ self._currentRequest.removeListener("socket", startTimer);
1636
+ }
1637
+ }
1638
+ if (callback) {
1639
+ this.on("timeout", callback);
1640
+ }
1641
+ if (this.socket) {
1642
+ startTimer(this.socket);
1643
+ } else {
1644
+ this._currentRequest.once("socket", startTimer);
1645
+ }
1646
+ this.on("socket", destroyOnTimeout);
1647
+ this.on("abort", clearTimer);
1648
+ this.on("error", clearTimer);
1649
+ this.on("response", clearTimer);
1650
+ this.on("close", clearTimer);
1651
+ return this;
1652
+ };
1653
+ [
1654
+ "flushHeaders",
1655
+ "getHeader",
1656
+ "setNoDelay",
1657
+ "setSocketKeepAlive"
1658
+ ].forEach(function(method) {
1659
+ RedirectableRequest.prototype[method] = function(a, b) {
1660
+ return this._currentRequest[method](a, b);
1661
+ };
1662
+ });
1663
+ ["aborted", "connection", "socket"].forEach(function(property) {
1664
+ Object.defineProperty(RedirectableRequest.prototype, property, {
1665
+ get: function() {
1666
+ return this._currentRequest[property];
1667
+ }
1668
+ });
1669
+ });
1670
+ RedirectableRequest.prototype._sanitizeOptions = function(options) {
1671
+ if (!options.headers) {
1672
+ options.headers = {};
1673
+ }
1674
+ if (options.host) {
1675
+ if (!options.hostname) {
1676
+ options.hostname = options.host;
1677
+ }
1678
+ delete options.host;
1679
+ }
1680
+ if (!options.pathname && options.path) {
1681
+ var searchPos = options.path.indexOf("?");
1682
+ if (searchPos < 0) {
1683
+ options.pathname = options.path;
1684
+ } else {
1685
+ options.pathname = options.path.substring(0, searchPos);
1686
+ options.search = options.path.substring(searchPos);
1687
+ }
1688
+ }
1689
+ };
1690
+ RedirectableRequest.prototype._performRequest = function() {
1691
+ var protocol = this._options.protocol;
1692
+ var nativeProtocol = this._options.nativeProtocols[protocol];
1693
+ if (!nativeProtocol) {
1694
+ throw new TypeError("Unsupported protocol " + protocol);
1695
+ }
1696
+ if (this._options.agents) {
1697
+ var scheme = protocol.slice(0, -1);
1698
+ this._options.agent = this._options.agents[scheme];
1699
+ }
1700
+ var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
1701
+ request._redirectable = this;
1702
+ for (var event of events) {
1703
+ request.on(event, eventHandlers[event]);
1704
+ }
1705
+ this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : (
1706
+ // When making a request to a proxy, […]
1707
+ // a client MUST send the target URI in absolute-form […].
1708
+ this._options.path
1709
+ );
1710
+ if (this._isRedirect) {
1711
+ var i = 0;
1712
+ var self = this;
1713
+ var buffers = this._requestBodyBuffers;
1714
+ (function writeNext(error) {
1715
+ if (request === self._currentRequest) {
1716
+ if (error) {
1717
+ self.emit("error", error);
1718
+ } else if (i < buffers.length) {
1719
+ var buffer = buffers[i++];
1720
+ if (!request.finished) {
1721
+ request.write(buffer.data, buffer.encoding, writeNext);
1722
+ }
1723
+ } else if (self._ended) {
1724
+ request.end();
1725
+ }
1726
+ }
1727
+ })();
1728
+ }
1729
+ };
1730
+ RedirectableRequest.prototype._processResponse = function(response) {
1731
+ var statusCode = response.statusCode;
1732
+ if (this._options.trackRedirects) {
1733
+ this._redirects.push({
1734
+ url: this._currentUrl,
1735
+ headers: response.headers,
1736
+ statusCode
1737
+ });
1738
+ }
1739
+ var location = response.headers.location;
1740
+ if (!location || this._options.followRedirects === false || statusCode < 300 || statusCode >= 400) {
1741
+ response.responseUrl = this._currentUrl;
1742
+ response.redirects = this._redirects;
1743
+ this.emit("response", response);
1744
+ this._requestBodyBuffers = [];
1745
+ return;
1746
+ }
1747
+ destroyRequest(this._currentRequest);
1748
+ response.destroy();
1749
+ if (++this._redirectCount > this._options.maxRedirects) {
1750
+ throw new TooManyRedirectsError();
1751
+ }
1752
+ var requestHeaders;
1753
+ var beforeRedirect = this._options.beforeRedirect;
1754
+ if (beforeRedirect) {
1755
+ requestHeaders = Object.assign({
1756
+ // The Host header was set by nativeProtocol.request
1757
+ Host: response.req.getHeader("host")
1758
+ }, this._options.headers);
1759
+ }
1760
+ var method = this._options.method;
1761
+ if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || // RFC7231§6.4.4: The 303 (See Other) status code indicates that
1762
+ // the server is redirecting the user agent to a different resource […]
1763
+ // A user agent can perform a retrieval request targeting that URI
1764
+ // (a GET or HEAD request if using HTTP) […]
1765
+ statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) {
1766
+ this._options.method = "GET";
1767
+ this._requestBodyBuffers = [];
1768
+ removeMatchingHeaders(/^content-/i, this._options.headers);
1769
+ }
1770
+ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
1771
+ var currentUrlParts = parseUrl(this._currentUrl);
1772
+ var currentHost = currentHostHeader || currentUrlParts.host;
1773
+ var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost }));
1774
+ var redirectUrl = resolveUrl(location, currentUrl);
1775
+ debug("redirecting to", redirectUrl.href);
1776
+ this._isRedirect = true;
1777
+ spreadUrlObject(redirectUrl, this._options);
1778
+ if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
1779
+ removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
1780
+ }
1781
+ if (isFunction(beforeRedirect)) {
1782
+ var responseDetails = {
1783
+ headers: response.headers,
1784
+ statusCode
1785
+ };
1786
+ var requestDetails = {
1787
+ url: currentUrl,
1788
+ method,
1789
+ headers: requestHeaders
1790
+ };
1791
+ beforeRedirect(this._options, responseDetails, requestDetails);
1792
+ this._sanitizeOptions(this._options);
1793
+ }
1794
+ this._performRequest();
1795
+ };
1796
+ function wrap(protocols) {
1797
+ var exports2 = {
1798
+ maxRedirects: 21,
1799
+ maxBodyLength: 10 * 1024 * 1024
1800
+ };
1801
+ var nativeProtocols = {};
1802
+ Object.keys(protocols).forEach(function(scheme) {
1803
+ var protocol = scheme + ":";
1804
+ var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
1805
+ var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol);
1806
+ function request(input, options, callback) {
1807
+ if (isURL(input)) {
1808
+ input = spreadUrlObject(input);
1809
+ } else if (isString(input)) {
1810
+ input = spreadUrlObject(parseUrl(input));
1811
+ } else {
1812
+ callback = options;
1813
+ options = validateUrl(input);
1814
+ input = { protocol };
1815
+ }
1816
+ if (isFunction(options)) {
1817
+ callback = options;
1818
+ options = null;
1819
+ }
1820
+ options = Object.assign({
1821
+ maxRedirects: exports2.maxRedirects,
1822
+ maxBodyLength: exports2.maxBodyLength
1823
+ }, input, options);
1824
+ options.nativeProtocols = nativeProtocols;
1825
+ if (!isString(options.host) && !isString(options.hostname)) {
1826
+ options.hostname = "::1";
1827
+ }
1828
+ assert.equal(options.protocol, protocol, "protocol mismatch");
1829
+ debug("options", options);
1830
+ return new RedirectableRequest(options, callback);
1831
+ }
1832
+ function get(input, options, callback) {
1833
+ var wrappedRequest = wrappedProtocol.request(input, options, callback);
1834
+ wrappedRequest.end();
1835
+ return wrappedRequest;
1836
+ }
1837
+ Object.defineProperties(wrappedProtocol, {
1838
+ request: { value: request, configurable: true, enumerable: true, writable: true },
1839
+ get: { value: get, configurable: true, enumerable: true, writable: true }
1840
+ });
1841
+ });
1842
+ return exports2;
1843
+ }
1844
+ function noop() {
1845
+ }
1846
+ function parseUrl(input) {
1847
+ var parsed;
1848
+ if (useNativeURL) {
1849
+ parsed = new URL(input);
1850
+ } else {
1851
+ parsed = validateUrl(url.parse(input));
1852
+ if (!isString(parsed.protocol)) {
1853
+ throw new InvalidUrlError({ input });
1854
+ }
1855
+ }
1856
+ return parsed;
1857
+ }
1858
+ function resolveUrl(relative, base) {
1859
+ return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative));
1860
+ }
1861
+ function validateUrl(input) {
1862
+ if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
1863
+ throw new InvalidUrlError({ input: input.href || input });
1864
+ }
1865
+ if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
1866
+ throw new InvalidUrlError({ input: input.href || input });
1867
+ }
1868
+ return input;
1869
+ }
1870
+ function spreadUrlObject(urlObject, target) {
1871
+ var spread = target || {};
1872
+ for (var key of preservedUrlFields) {
1873
+ spread[key] = urlObject[key];
1874
+ }
1875
+ if (spread.hostname.startsWith("[")) {
1876
+ spread.hostname = spread.hostname.slice(1, -1);
1877
+ }
1878
+ if (spread.port !== "") {
1879
+ spread.port = Number(spread.port);
1880
+ }
1881
+ spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
1882
+ return spread;
1883
+ }
1884
+ function removeMatchingHeaders(regex, headers) {
1885
+ var lastValue;
1886
+ for (var header in headers) {
1887
+ if (regex.test(header)) {
1888
+ lastValue = headers[header];
1889
+ delete headers[header];
1890
+ }
1891
+ }
1892
+ return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim();
1893
+ }
1894
+ function createErrorType(code, message, baseClass) {
1895
+ function CustomError(properties) {
1896
+ if (isFunction(Error.captureStackTrace)) {
1897
+ Error.captureStackTrace(this, this.constructor);
1898
+ }
1899
+ Object.assign(this, properties || {});
1900
+ this.code = code;
1901
+ this.message = this.cause ? message + ": " + this.cause.message : message;
1902
+ }
1903
+ CustomError.prototype = new (baseClass || Error)();
1904
+ Object.defineProperties(CustomError.prototype, {
1905
+ constructor: {
1906
+ value: CustomError,
1907
+ enumerable: false
1908
+ },
1909
+ name: {
1910
+ value: "Error [" + code + "]",
1911
+ enumerable: false
1912
+ }
1913
+ });
1914
+ return CustomError;
1915
+ }
1916
+ function destroyRequest(request, error) {
1917
+ for (var event of events) {
1918
+ request.removeListener(event, eventHandlers[event]);
1919
+ }
1920
+ request.on("error", noop);
1921
+ request.destroy(error);
1922
+ }
1923
+ function isSubdomain(subdomain, domain) {
1924
+ assert(isString(subdomain) && isString(domain));
1925
+ var dot = subdomain.length - domain.length - 1;
1926
+ return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
1927
+ }
1928
+ function isString(value) {
1929
+ return typeof value === "string" || value instanceof String;
1930
+ }
1931
+ function isFunction(value) {
1932
+ return typeof value === "function";
1933
+ }
1934
+ function isBuffer(value) {
1935
+ return typeof value === "object" && "length" in value;
1936
+ }
1937
+ function isURL(value) {
1938
+ return URL && value instanceof URL;
1939
+ }
1940
+ module.exports = wrap({ http, https });
1941
+ module.exports.wrap = wrap;
1942
+ }
1943
+ });
1944
+
1945
+ // node_modules/axios/package.json
1946
+ var require_package = __commonJS({
1947
+ "node_modules/axios/package.json"(exports, module) {
1948
+ module.exports = {
1949
+ name: "axios",
1950
+ version: "0.21.4",
1951
+ description: "Promise based HTTP client for the browser and node.js",
1952
+ main: "index.js",
1953
+ scripts: {
1954
+ test: "grunt test",
1955
+ start: "node ./sandbox/server.js",
1956
+ build: "NODE_ENV=production grunt build",
1957
+ preversion: "npm test",
1958
+ version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",
1959
+ postversion: "git push && git push --tags",
1960
+ examples: "node ./examples/server.js",
1961
+ coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
1962
+ fix: "eslint --fix lib/**/*.js"
1963
+ },
1964
+ repository: {
1965
+ type: "git",
1966
+ url: "https://github.com/axios/axios.git"
1967
+ },
1968
+ keywords: [
1969
+ "xhr",
1970
+ "http",
1971
+ "ajax",
1972
+ "promise",
1973
+ "node"
1974
+ ],
1975
+ author: "Matt Zabriskie",
1976
+ license: "MIT",
1977
+ bugs: {
1978
+ url: "https://github.com/axios/axios/issues"
1979
+ },
1980
+ homepage: "https://axios-http.com",
1981
+ devDependencies: {
1982
+ coveralls: "^3.0.0",
1983
+ "es6-promise": "^4.2.4",
1984
+ grunt: "^1.3.0",
1985
+ "grunt-banner": "^0.6.0",
1986
+ "grunt-cli": "^1.2.0",
1987
+ "grunt-contrib-clean": "^1.1.0",
1988
+ "grunt-contrib-watch": "^1.0.0",
1989
+ "grunt-eslint": "^23.0.0",
1990
+ "grunt-karma": "^4.0.0",
1991
+ "grunt-mocha-test": "^0.13.3",
1992
+ "grunt-ts": "^6.0.0-beta.19",
1993
+ "grunt-webpack": "^4.0.2",
1994
+ "istanbul-instrumenter-loader": "^1.0.0",
1995
+ "jasmine-core": "^2.4.1",
1996
+ karma: "^6.3.2",
1997
+ "karma-chrome-launcher": "^3.1.0",
1998
+ "karma-firefox-launcher": "^2.1.0",
1999
+ "karma-jasmine": "^1.1.1",
2000
+ "karma-jasmine-ajax": "^0.1.13",
2001
+ "karma-safari-launcher": "^1.0.0",
2002
+ "karma-sauce-launcher": "^4.3.6",
2003
+ "karma-sinon": "^1.0.5",
2004
+ "karma-sourcemap-loader": "^0.3.8",
2005
+ "karma-webpack": "^4.0.2",
2006
+ "load-grunt-tasks": "^3.5.2",
2007
+ minimist: "^1.2.0",
2008
+ mocha: "^8.2.1",
2009
+ sinon: "^4.5.0",
2010
+ "terser-webpack-plugin": "^4.2.3",
2011
+ typescript: "^4.0.5",
2012
+ "url-search-params": "^0.10.0",
2013
+ webpack: "^4.44.2",
2014
+ "webpack-dev-server": "^3.11.0"
2015
+ },
2016
+ browser: {
2017
+ "./lib/adapters/http.js": "./lib/adapters/xhr.js"
2018
+ },
2019
+ jsdelivr: "dist/axios.min.js",
2020
+ unpkg: "dist/axios.min.js",
2021
+ typings: "./index.d.ts",
2022
+ dependencies: {
2023
+ "follow-redirects": "^1.14.0"
2024
+ },
2025
+ bundlesize: [
2026
+ {
2027
+ path: "./dist/axios.min.js",
2028
+ threshold: "5kB"
2029
+ }
2030
+ ]
2031
+ };
2032
+ }
2033
+ });
2034
+
2035
+ // node_modules/axios/lib/adapters/http.js
2036
+ var require_http = __commonJS({
2037
+ "node_modules/axios/lib/adapters/http.js"(exports, module) {
2038
+ "use strict";
2039
+ var utils = require_utils();
2040
+ var settle = require_settle();
2041
+ var buildFullPath = require_buildFullPath();
2042
+ var buildURL = require_buildURL();
2043
+ var http = __require("http");
2044
+ var https = __require("https");
2045
+ var httpFollow = require_follow_redirects().http;
2046
+ var httpsFollow = require_follow_redirects().https;
2047
+ var url = __require("url");
2048
+ var zlib = __require("zlib");
2049
+ var pkg = require_package();
2050
+ var createError = require_createError();
2051
+ var enhanceError = require_enhanceError();
2052
+ var isHttps = /https:?/;
2053
+ function setProxy(options, proxy, location) {
2054
+ options.hostname = proxy.host;
2055
+ options.host = proxy.host;
2056
+ options.port = proxy.port;
2057
+ options.path = location;
2058
+ if (proxy.auth) {
2059
+ var base64 = Buffer.from(proxy.auth.username + ":" + proxy.auth.password, "utf8").toString("base64");
2060
+ options.headers["Proxy-Authorization"] = "Basic " + base64;
2061
+ }
2062
+ options.beforeRedirect = function beforeRedirect(redirection) {
2063
+ redirection.headers.host = redirection.host;
2064
+ setProxy(redirection, proxy, redirection.href);
2065
+ };
2066
+ }
2067
+ module.exports = function httpAdapter(config) {
2068
+ return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
2069
+ var resolve = function resolve2(value) {
2070
+ resolvePromise(value);
2071
+ };
2072
+ var reject = function reject2(value) {
2073
+ rejectPromise(value);
2074
+ };
2075
+ var data = config.data;
2076
+ var headers = config.headers;
2077
+ if ("User-Agent" in headers || "user-agent" in headers) {
2078
+ if (!headers["User-Agent"] && !headers["user-agent"]) {
2079
+ delete headers["User-Agent"];
2080
+ delete headers["user-agent"];
2081
+ }
2082
+ } else {
2083
+ headers["User-Agent"] = "axios/" + pkg.version;
2084
+ }
2085
+ if (data && !utils.isStream(data)) {
2086
+ if (Buffer.isBuffer(data)) {
2087
+ } else if (utils.isArrayBuffer(data)) {
2088
+ data = Buffer.from(new Uint8Array(data));
2089
+ } else if (utils.isString(data)) {
2090
+ data = Buffer.from(data, "utf-8");
2091
+ } else {
2092
+ return reject(createError(
2093
+ "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
2094
+ config
2095
+ ));
2096
+ }
2097
+ headers["Content-Length"] = data.length;
2098
+ }
2099
+ var auth = void 0;
2100
+ if (config.auth) {
2101
+ var username = config.auth.username || "";
2102
+ var password = config.auth.password || "";
2103
+ auth = username + ":" + password;
2104
+ }
2105
+ var fullPath = buildFullPath(config.baseURL, config.url);
2106
+ var parsed = url.parse(fullPath);
2107
+ var protocol = parsed.protocol || "http:";
2108
+ if (!auth && parsed.auth) {
2109
+ var urlAuth = parsed.auth.split(":");
2110
+ var urlUsername = urlAuth[0] || "";
2111
+ var urlPassword = urlAuth[1] || "";
2112
+ auth = urlUsername + ":" + urlPassword;
2113
+ }
2114
+ if (auth) {
2115
+ delete headers.Authorization;
2116
+ }
2117
+ var isHttpsRequest = isHttps.test(protocol);
2118
+ var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
2119
+ var options = {
2120
+ path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ""),
2121
+ method: config.method.toUpperCase(),
2122
+ headers,
2123
+ agent,
2124
+ agents: { http: config.httpAgent, https: config.httpsAgent },
2125
+ auth
2126
+ };
2127
+ if (config.socketPath) {
2128
+ options.socketPath = config.socketPath;
2129
+ } else {
2130
+ options.hostname = parsed.hostname;
2131
+ options.port = parsed.port;
2132
+ }
2133
+ var proxy = config.proxy;
2134
+ if (!proxy && proxy !== false) {
2135
+ var proxyEnv = protocol.slice(0, -1) + "_proxy";
2136
+ var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
2137
+ if (proxyUrl) {
2138
+ var parsedProxyUrl = url.parse(proxyUrl);
2139
+ var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
2140
+ var shouldProxy = true;
2141
+ if (noProxyEnv) {
2142
+ var noProxy = noProxyEnv.split(",").map(function trim(s) {
2143
+ return s.trim();
2144
+ });
2145
+ shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
2146
+ if (!proxyElement) {
2147
+ return false;
2148
+ }
2149
+ if (proxyElement === "*") {
2150
+ return true;
2151
+ }
2152
+ if (proxyElement[0] === "." && parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
2153
+ return true;
2154
+ }
2155
+ return parsed.hostname === proxyElement;
2156
+ });
2157
+ }
2158
+ if (shouldProxy) {
2159
+ proxy = {
2160
+ host: parsedProxyUrl.hostname,
2161
+ port: parsedProxyUrl.port,
2162
+ protocol: parsedProxyUrl.protocol
2163
+ };
2164
+ if (parsedProxyUrl.auth) {
2165
+ var proxyUrlAuth = parsedProxyUrl.auth.split(":");
2166
+ proxy.auth = {
2167
+ username: proxyUrlAuth[0],
2168
+ password: proxyUrlAuth[1]
2169
+ };
2170
+ }
2171
+ }
2172
+ }
2173
+ }
2174
+ if (proxy) {
2175
+ options.headers.host = parsed.hostname + (parsed.port ? ":" + parsed.port : "");
2176
+ setProxy(options, proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
2177
+ }
2178
+ var transport;
2179
+ var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
2180
+ if (config.transport) {
2181
+ transport = config.transport;
2182
+ } else if (config.maxRedirects === 0) {
2183
+ transport = isHttpsProxy ? https : http;
2184
+ } else {
2185
+ if (config.maxRedirects) {
2186
+ options.maxRedirects = config.maxRedirects;
2187
+ }
2188
+ transport = isHttpsProxy ? httpsFollow : httpFollow;
2189
+ }
2190
+ if (config.maxBodyLength > -1) {
2191
+ options.maxBodyLength = config.maxBodyLength;
2192
+ }
2193
+ var req = transport.request(options, function handleResponse(res) {
2194
+ if (req.aborted) return;
2195
+ var stream = res;
2196
+ var lastRequest = res.req || req;
2197
+ if (res.statusCode !== 204 && lastRequest.method !== "HEAD" && config.decompress !== false) {
2198
+ switch (res.headers["content-encoding"]) {
2199
+ /*eslint default-case:0*/
2200
+ case "gzip":
2201
+ case "compress":
2202
+ case "deflate":
2203
+ stream = stream.pipe(zlib.createUnzip());
2204
+ delete res.headers["content-encoding"];
2205
+ break;
2206
+ }
2207
+ }
2208
+ var response = {
2209
+ status: res.statusCode,
2210
+ statusText: res.statusMessage,
2211
+ headers: res.headers,
2212
+ config,
2213
+ request: lastRequest
2214
+ };
2215
+ if (config.responseType === "stream") {
2216
+ response.data = stream;
2217
+ settle(resolve, reject, response);
2218
+ } else {
2219
+ var responseBuffer = [];
2220
+ var totalResponseBytes = 0;
2221
+ stream.on("data", function handleStreamData(chunk) {
2222
+ responseBuffer.push(chunk);
2223
+ totalResponseBytes += chunk.length;
2224
+ if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
2225
+ stream.destroy();
2226
+ reject(createError(
2227
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
2228
+ config,
2229
+ null,
2230
+ lastRequest
2231
+ ));
2232
+ }
2233
+ });
2234
+ stream.on("error", function handleStreamError(err) {
2235
+ if (req.aborted) return;
2236
+ reject(enhanceError(err, config, null, lastRequest));
2237
+ });
2238
+ stream.on("end", function handleStreamEnd() {
2239
+ var responseData = Buffer.concat(responseBuffer);
2240
+ if (config.responseType !== "arraybuffer") {
2241
+ responseData = responseData.toString(config.responseEncoding);
2242
+ if (!config.responseEncoding || config.responseEncoding === "utf8") {
2243
+ responseData = utils.stripBOM(responseData);
2244
+ }
2245
+ }
2246
+ response.data = responseData;
2247
+ settle(resolve, reject, response);
2248
+ });
2249
+ }
2250
+ });
2251
+ req.on("error", function handleRequestError(err) {
2252
+ if (req.aborted && err.code !== "ERR_FR_TOO_MANY_REDIRECTS") return;
2253
+ reject(enhanceError(err, config, null, req));
2254
+ });
2255
+ if (config.timeout) {
2256
+ var timeout = parseInt(config.timeout, 10);
2257
+ if (isNaN(timeout)) {
2258
+ reject(createError(
2259
+ "error trying to parse `config.timeout` to int",
2260
+ config,
2261
+ "ERR_PARSE_TIMEOUT",
2262
+ req
2263
+ ));
2264
+ return;
2265
+ }
2266
+ req.setTimeout(timeout, function handleRequestTimeout() {
2267
+ req.abort();
2268
+ reject(createError(
2269
+ "timeout of " + timeout + "ms exceeded",
2270
+ config,
2271
+ config.transitional && config.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
2272
+ req
2273
+ ));
2274
+ });
2275
+ }
2276
+ if (config.cancelToken) {
2277
+ config.cancelToken.promise.then(function onCanceled(cancel) {
2278
+ if (req.aborted) return;
2279
+ req.abort();
2280
+ reject(cancel);
2281
+ });
2282
+ }
2283
+ if (utils.isStream(data)) {
2284
+ data.on("error", function handleStreamError(err) {
2285
+ reject(enhanceError(err, config, null, req));
2286
+ }).pipe(req);
2287
+ } else {
2288
+ req.end(data);
2289
+ }
2290
+ });
2291
+ };
2292
+ }
2293
+ });
2294
+
2295
+ // node_modules/axios/lib/defaults.js
2296
+ var require_defaults = __commonJS({
2297
+ "node_modules/axios/lib/defaults.js"(exports, module) {
2298
+ "use strict";
2299
+ var utils = require_utils();
2300
+ var normalizeHeaderName = require_normalizeHeaderName();
2301
+ var enhanceError = require_enhanceError();
2302
+ var DEFAULT_CONTENT_TYPE = {
2303
+ "Content-Type": "application/x-www-form-urlencoded"
2304
+ };
2305
+ function setContentTypeIfUnset(headers, value) {
2306
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers["Content-Type"])) {
2307
+ headers["Content-Type"] = value;
2308
+ }
2309
+ }
2310
+ function getDefaultAdapter() {
2311
+ var adapter;
2312
+ if (typeof XMLHttpRequest !== "undefined") {
2313
+ adapter = require_xhr();
2314
+ } else if (typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]") {
2315
+ adapter = require_http();
2316
+ }
2317
+ return adapter;
2318
+ }
2319
+ function stringifySafely(rawValue, parser, encoder) {
2320
+ if (utils.isString(rawValue)) {
2321
+ try {
2322
+ (parser || JSON.parse)(rawValue);
2323
+ return utils.trim(rawValue);
2324
+ } catch (e) {
2325
+ if (e.name !== "SyntaxError") {
2326
+ throw e;
2327
+ }
2328
+ }
2329
+ }
2330
+ return (encoder || JSON.stringify)(rawValue);
2331
+ }
2332
+ var defaults = {
2333
+ transitional: {
2334
+ silentJSONParsing: true,
2335
+ forcedJSONParsing: true,
2336
+ clarifyTimeoutError: false
2337
+ },
2338
+ adapter: getDefaultAdapter(),
2339
+ transformRequest: [function transformRequest(data, headers) {
2340
+ normalizeHeaderName(headers, "Accept");
2341
+ normalizeHeaderName(headers, "Content-Type");
2342
+ if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
2343
+ return data;
2344
+ }
2345
+ if (utils.isArrayBufferView(data)) {
2346
+ return data.buffer;
2347
+ }
2348
+ if (utils.isURLSearchParams(data)) {
2349
+ setContentTypeIfUnset(headers, "application/x-www-form-urlencoded;charset=utf-8");
2350
+ return data.toString();
2351
+ }
2352
+ if (utils.isObject(data) || headers && headers["Content-Type"] === "application/json") {
2353
+ setContentTypeIfUnset(headers, "application/json");
2354
+ return stringifySafely(data);
2355
+ }
2356
+ return data;
2357
+ }],
2358
+ transformResponse: [function transformResponse(data) {
2359
+ var transitional = this.transitional;
2360
+ var silentJSONParsing = transitional && transitional.silentJSONParsing;
2361
+ var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
2362
+ var strictJSONParsing = !silentJSONParsing && this.responseType === "json";
2363
+ if (strictJSONParsing || forcedJSONParsing && utils.isString(data) && data.length) {
2364
+ try {
2365
+ return JSON.parse(data);
2366
+ } catch (e) {
2367
+ if (strictJSONParsing) {
2368
+ if (e.name === "SyntaxError") {
2369
+ throw enhanceError(e, this, "E_JSON_PARSE");
2370
+ }
2371
+ throw e;
2372
+ }
2373
+ }
2374
+ }
2375
+ return data;
2376
+ }],
2377
+ /**
2378
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
2379
+ * timeout is not created.
2380
+ */
2381
+ timeout: 0,
2382
+ xsrfCookieName: "XSRF-TOKEN",
2383
+ xsrfHeaderName: "X-XSRF-TOKEN",
2384
+ maxContentLength: -1,
2385
+ maxBodyLength: -1,
2386
+ validateStatus: function validateStatus(status) {
2387
+ return status >= 200 && status < 300;
2388
+ }
2389
+ };
2390
+ defaults.headers = {
2391
+ common: {
2392
+ "Accept": "application/json, text/plain, */*"
2393
+ }
2394
+ };
2395
+ utils.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
2396
+ defaults.headers[method] = {};
2397
+ });
2398
+ utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
2399
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
2400
+ });
2401
+ module.exports = defaults;
2402
+ }
2403
+ });
2404
+
2405
+ // node_modules/axios/lib/core/transformData.js
2406
+ var require_transformData = __commonJS({
2407
+ "node_modules/axios/lib/core/transformData.js"(exports, module) {
2408
+ "use strict";
2409
+ var utils = require_utils();
2410
+ var defaults = require_defaults();
2411
+ module.exports = function transformData(data, headers, fns) {
2412
+ var context = this || defaults;
2413
+ utils.forEach(fns, function transform(fn) {
2414
+ data = fn.call(context, data, headers);
2415
+ });
2416
+ return data;
2417
+ };
2418
+ }
2419
+ });
2420
+
2421
+ // node_modules/axios/lib/cancel/isCancel.js
2422
+ var require_isCancel = __commonJS({
2423
+ "node_modules/axios/lib/cancel/isCancel.js"(exports, module) {
2424
+ "use strict";
2425
+ module.exports = function isCancel(value) {
2426
+ return !!(value && value.__CANCEL__);
2427
+ };
2428
+ }
2429
+ });
2430
+
2431
+ // node_modules/axios/lib/core/dispatchRequest.js
2432
+ var require_dispatchRequest = __commonJS({
2433
+ "node_modules/axios/lib/core/dispatchRequest.js"(exports, module) {
2434
+ "use strict";
2435
+ var utils = require_utils();
2436
+ var transformData = require_transformData();
2437
+ var isCancel = require_isCancel();
2438
+ var defaults = require_defaults();
2439
+ function throwIfCancellationRequested(config) {
2440
+ if (config.cancelToken) {
2441
+ config.cancelToken.throwIfRequested();
2442
+ }
2443
+ }
2444
+ module.exports = function dispatchRequest(config) {
2445
+ throwIfCancellationRequested(config);
2446
+ config.headers = config.headers || {};
2447
+ config.data = transformData.call(
2448
+ config,
2449
+ config.data,
2450
+ config.headers,
2451
+ config.transformRequest
2452
+ );
2453
+ config.headers = utils.merge(
2454
+ config.headers.common || {},
2455
+ config.headers[config.method] || {},
2456
+ config.headers
2457
+ );
2458
+ utils.forEach(
2459
+ ["delete", "get", "head", "post", "put", "patch", "common"],
2460
+ function cleanHeaderConfig(method) {
2461
+ delete config.headers[method];
2462
+ }
2463
+ );
2464
+ var adapter = config.adapter || defaults.adapter;
2465
+ return adapter(config).then(function onAdapterResolution(response) {
2466
+ throwIfCancellationRequested(config);
2467
+ response.data = transformData.call(
2468
+ config,
2469
+ response.data,
2470
+ response.headers,
2471
+ config.transformResponse
2472
+ );
2473
+ return response;
2474
+ }, function onAdapterRejection(reason) {
2475
+ if (!isCancel(reason)) {
2476
+ throwIfCancellationRequested(config);
2477
+ if (reason && reason.response) {
2478
+ reason.response.data = transformData.call(
2479
+ config,
2480
+ reason.response.data,
2481
+ reason.response.headers,
2482
+ config.transformResponse
2483
+ );
2484
+ }
2485
+ }
2486
+ return Promise.reject(reason);
2487
+ });
2488
+ };
2489
+ }
2490
+ });
2491
+
2492
+ // node_modules/axios/lib/core/mergeConfig.js
2493
+ var require_mergeConfig = __commonJS({
2494
+ "node_modules/axios/lib/core/mergeConfig.js"(exports, module) {
2495
+ "use strict";
2496
+ var utils = require_utils();
2497
+ module.exports = function mergeConfig(config1, config2) {
2498
+ config2 = config2 || {};
2499
+ var config = {};
2500
+ var valueFromConfig2Keys = ["url", "method", "data"];
2501
+ var mergeDeepPropertiesKeys = ["headers", "auth", "proxy", "params"];
2502
+ var defaultToConfig2Keys = [
2503
+ "baseURL",
2504
+ "transformRequest",
2505
+ "transformResponse",
2506
+ "paramsSerializer",
2507
+ "timeout",
2508
+ "timeoutMessage",
2509
+ "withCredentials",
2510
+ "adapter",
2511
+ "responseType",
2512
+ "xsrfCookieName",
2513
+ "xsrfHeaderName",
2514
+ "onUploadProgress",
2515
+ "onDownloadProgress",
2516
+ "decompress",
2517
+ "maxContentLength",
2518
+ "maxBodyLength",
2519
+ "maxRedirects",
2520
+ "transport",
2521
+ "httpAgent",
2522
+ "httpsAgent",
2523
+ "cancelToken",
2524
+ "socketPath",
2525
+ "responseEncoding"
2526
+ ];
2527
+ var directMergeKeys = ["validateStatus"];
2528
+ function getMergedValue(target, source) {
2529
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
2530
+ return utils.merge(target, source);
2531
+ } else if (utils.isPlainObject(source)) {
2532
+ return utils.merge({}, source);
2533
+ } else if (utils.isArray(source)) {
2534
+ return source.slice();
2535
+ }
2536
+ return source;
2537
+ }
2538
+ function mergeDeepProperties(prop) {
2539
+ if (!utils.isUndefined(config2[prop])) {
2540
+ config[prop] = getMergedValue(config1[prop], config2[prop]);
2541
+ } else if (!utils.isUndefined(config1[prop])) {
2542
+ config[prop] = getMergedValue(void 0, config1[prop]);
2543
+ }
2544
+ }
2545
+ utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
2546
+ if (!utils.isUndefined(config2[prop])) {
2547
+ config[prop] = getMergedValue(void 0, config2[prop]);
2548
+ }
2549
+ });
2550
+ utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
2551
+ utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
2552
+ if (!utils.isUndefined(config2[prop])) {
2553
+ config[prop] = getMergedValue(void 0, config2[prop]);
2554
+ } else if (!utils.isUndefined(config1[prop])) {
2555
+ config[prop] = getMergedValue(void 0, config1[prop]);
2556
+ }
2557
+ });
2558
+ utils.forEach(directMergeKeys, function merge(prop) {
2559
+ if (prop in config2) {
2560
+ config[prop] = getMergedValue(config1[prop], config2[prop]);
2561
+ } else if (prop in config1) {
2562
+ config[prop] = getMergedValue(void 0, config1[prop]);
2563
+ }
2564
+ });
2565
+ var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);
2566
+ var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key) {
2567
+ return axiosKeys.indexOf(key) === -1;
2568
+ });
2569
+ utils.forEach(otherKeys, mergeDeepProperties);
2570
+ return config;
2571
+ };
2572
+ }
2573
+ });
2574
+
2575
+ // node_modules/axios/lib/helpers/validator.js
2576
+ var require_validator = __commonJS({
2577
+ "node_modules/axios/lib/helpers/validator.js"(exports, module) {
2578
+ "use strict";
2579
+ var pkg = require_package();
2580
+ var validators = {};
2581
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i) {
2582
+ validators[type] = function validator(thing) {
2583
+ return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
2584
+ };
2585
+ });
2586
+ var deprecatedWarnings = {};
2587
+ var currentVerArr = pkg.version.split(".");
2588
+ function isOlderVersion(version, thanVersion) {
2589
+ var pkgVersionArr = thanVersion ? thanVersion.split(".") : currentVerArr;
2590
+ var destVer = version.split(".");
2591
+ for (var i = 0; i < 3; i++) {
2592
+ if (pkgVersionArr[i] > destVer[i]) {
2593
+ return true;
2594
+ } else if (pkgVersionArr[i] < destVer[i]) {
2595
+ return false;
2596
+ }
2597
+ }
2598
+ return false;
2599
+ }
2600
+ validators.transitional = function transitional(validator, version, message) {
2601
+ var isDeprecated = version && isOlderVersion(version);
2602
+ function formatMessage(opt, desc) {
2603
+ return "[Axios v" + pkg.version + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
2604
+ }
2605
+ return function(value, opt, opts) {
2606
+ if (validator === false) {
2607
+ throw new Error(formatMessage(opt, " has been removed in " + version));
2608
+ }
2609
+ if (isDeprecated && !deprecatedWarnings[opt]) {
2610
+ deprecatedWarnings[opt] = true;
2611
+ console.warn(
2612
+ formatMessage(
2613
+ opt,
2614
+ " has been deprecated since v" + version + " and will be removed in the near future"
2615
+ )
2616
+ );
2617
+ }
2618
+ return validator ? validator(value, opt, opts) : true;
2619
+ };
2620
+ };
2621
+ function assertOptions(options, schema, allowUnknown) {
2622
+ if (typeof options !== "object") {
2623
+ throw new TypeError("options must be an object");
2624
+ }
2625
+ var keys = Object.keys(options);
2626
+ var i = keys.length;
2627
+ while (i-- > 0) {
2628
+ var opt = keys[i];
2629
+ var validator = schema[opt];
2630
+ if (validator) {
2631
+ var value = options[opt];
2632
+ var result = value === void 0 || validator(value, opt, options);
2633
+ if (result !== true) {
2634
+ throw new TypeError("option " + opt + " must be " + result);
2635
+ }
2636
+ continue;
2637
+ }
2638
+ if (allowUnknown !== true) {
2639
+ throw Error("Unknown option " + opt);
2640
+ }
2641
+ }
2642
+ }
2643
+ module.exports = {
2644
+ isOlderVersion,
2645
+ assertOptions,
2646
+ validators
2647
+ };
2648
+ }
2649
+ });
2650
+
2651
+ // node_modules/axios/lib/core/Axios.js
2652
+ var require_Axios = __commonJS({
2653
+ "node_modules/axios/lib/core/Axios.js"(exports, module) {
2654
+ "use strict";
2655
+ var utils = require_utils();
2656
+ var buildURL = require_buildURL();
2657
+ var InterceptorManager = require_InterceptorManager();
2658
+ var dispatchRequest = require_dispatchRequest();
2659
+ var mergeConfig = require_mergeConfig();
2660
+ var validator = require_validator();
2661
+ var validators = validator.validators;
2662
+ function Axios(instanceConfig) {
2663
+ this.defaults = instanceConfig;
2664
+ this.interceptors = {
2665
+ request: new InterceptorManager(),
2666
+ response: new InterceptorManager()
2667
+ };
2668
+ }
2669
+ Axios.prototype.request = function request(config) {
2670
+ if (typeof config === "string") {
2671
+ config = arguments[1] || {};
2672
+ config.url = arguments[0];
2673
+ } else {
2674
+ config = config || {};
2675
+ }
2676
+ config = mergeConfig(this.defaults, config);
2677
+ if (config.method) {
2678
+ config.method = config.method.toLowerCase();
2679
+ } else if (this.defaults.method) {
2680
+ config.method = this.defaults.method.toLowerCase();
2681
+ } else {
2682
+ config.method = "get";
2683
+ }
2684
+ var transitional = config.transitional;
2685
+ if (transitional !== void 0) {
2686
+ validator.assertOptions(transitional, {
2687
+ silentJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
2688
+ forcedJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
2689
+ clarifyTimeoutError: validators.transitional(validators.boolean, "1.0.0")
2690
+ }, false);
2691
+ }
2692
+ var requestInterceptorChain = [];
2693
+ var synchronousRequestInterceptors = true;
2694
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
2695
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
2696
+ return;
2697
+ }
2698
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
2699
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
2700
+ });
2701
+ var responseInterceptorChain = [];
2702
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
2703
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
2704
+ });
2705
+ var promise;
2706
+ if (!synchronousRequestInterceptors) {
2707
+ var chain = [dispatchRequest, void 0];
2708
+ Array.prototype.unshift.apply(chain, requestInterceptorChain);
2709
+ chain = chain.concat(responseInterceptorChain);
2710
+ promise = Promise.resolve(config);
2711
+ while (chain.length) {
2712
+ promise = promise.then(chain.shift(), chain.shift());
2713
+ }
2714
+ return promise;
2715
+ }
2716
+ var newConfig = config;
2717
+ while (requestInterceptorChain.length) {
2718
+ var onFulfilled = requestInterceptorChain.shift();
2719
+ var onRejected = requestInterceptorChain.shift();
2720
+ try {
2721
+ newConfig = onFulfilled(newConfig);
2722
+ } catch (error) {
2723
+ onRejected(error);
2724
+ break;
2725
+ }
2726
+ }
2727
+ try {
2728
+ promise = dispatchRequest(newConfig);
2729
+ } catch (error) {
2730
+ return Promise.reject(error);
2731
+ }
2732
+ while (responseInterceptorChain.length) {
2733
+ promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
2734
+ }
2735
+ return promise;
2736
+ };
2737
+ Axios.prototype.getUri = function getUri(config) {
2738
+ config = mergeConfig(this.defaults, config);
2739
+ return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, "");
2740
+ };
2741
+ utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
2742
+ Axios.prototype[method] = function(url, config) {
2743
+ return this.request(mergeConfig(config || {}, {
2744
+ method,
2745
+ url,
2746
+ data: (config || {}).data
2747
+ }));
2748
+ };
2749
+ });
2750
+ utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
2751
+ Axios.prototype[method] = function(url, data, config) {
2752
+ return this.request(mergeConfig(config || {}, {
2753
+ method,
2754
+ url,
2755
+ data
2756
+ }));
2757
+ };
2758
+ });
2759
+ module.exports = Axios;
2760
+ }
2761
+ });
2762
+
2763
+ // node_modules/axios/lib/cancel/Cancel.js
2764
+ var require_Cancel = __commonJS({
2765
+ "node_modules/axios/lib/cancel/Cancel.js"(exports, module) {
2766
+ "use strict";
2767
+ function Cancel(message) {
2768
+ this.message = message;
2769
+ }
2770
+ Cancel.prototype.toString = function toString() {
2771
+ return "Cancel" + (this.message ? ": " + this.message : "");
2772
+ };
2773
+ Cancel.prototype.__CANCEL__ = true;
2774
+ module.exports = Cancel;
2775
+ }
2776
+ });
2777
+
2778
+ // node_modules/axios/lib/cancel/CancelToken.js
2779
+ var require_CancelToken = __commonJS({
2780
+ "node_modules/axios/lib/cancel/CancelToken.js"(exports, module) {
2781
+ "use strict";
2782
+ var Cancel = require_Cancel();
2783
+ function CancelToken(executor) {
2784
+ if (typeof executor !== "function") {
2785
+ throw new TypeError("executor must be a function.");
2786
+ }
2787
+ var resolvePromise;
2788
+ this.promise = new Promise(function promiseExecutor(resolve) {
2789
+ resolvePromise = resolve;
2790
+ });
2791
+ var token = this;
2792
+ executor(function cancel(message) {
2793
+ if (token.reason) {
2794
+ return;
2795
+ }
2796
+ token.reason = new Cancel(message);
2797
+ resolvePromise(token.reason);
2798
+ });
2799
+ }
2800
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
2801
+ if (this.reason) {
2802
+ throw this.reason;
2803
+ }
2804
+ };
2805
+ CancelToken.source = function source() {
2806
+ var cancel;
2807
+ var token = new CancelToken(function executor(c) {
2808
+ cancel = c;
2809
+ });
2810
+ return {
2811
+ token,
2812
+ cancel
2813
+ };
2814
+ };
2815
+ module.exports = CancelToken;
2816
+ }
2817
+ });
2818
+
2819
+ // node_modules/axios/lib/helpers/spread.js
2820
+ var require_spread = __commonJS({
2821
+ "node_modules/axios/lib/helpers/spread.js"(exports, module) {
2822
+ "use strict";
2823
+ module.exports = function spread(callback) {
2824
+ return function wrap(arr) {
2825
+ return callback.apply(null, arr);
2826
+ };
2827
+ };
2828
+ }
2829
+ });
2830
+
2831
+ // node_modules/axios/lib/helpers/isAxiosError.js
2832
+ var require_isAxiosError = __commonJS({
2833
+ "node_modules/axios/lib/helpers/isAxiosError.js"(exports, module) {
2834
+ "use strict";
2835
+ module.exports = function isAxiosError(payload) {
2836
+ return typeof payload === "object" && payload.isAxiosError === true;
2837
+ };
2838
+ }
2839
+ });
2840
+
2841
+ // node_modules/axios/lib/axios.js
2842
+ var require_axios = __commonJS({
2843
+ "node_modules/axios/lib/axios.js"(exports, module) {
2844
+ "use strict";
2845
+ var utils = require_utils();
2846
+ var bind = require_bind();
2847
+ var Axios = require_Axios();
2848
+ var mergeConfig = require_mergeConfig();
2849
+ var defaults = require_defaults();
2850
+ function createInstance(defaultConfig) {
2851
+ var context = new Axios(defaultConfig);
2852
+ var instance = bind(Axios.prototype.request, context);
2853
+ utils.extend(instance, Axios.prototype, context);
2854
+ utils.extend(instance, context);
2855
+ return instance;
2856
+ }
2857
+ var axios = createInstance(defaults);
2858
+ axios.Axios = Axios;
2859
+ axios.create = function create(instanceConfig) {
2860
+ return createInstance(mergeConfig(axios.defaults, instanceConfig));
2861
+ };
2862
+ axios.Cancel = require_Cancel();
2863
+ axios.CancelToken = require_CancelToken();
2864
+ axios.isCancel = require_isCancel();
2865
+ axios.all = function all(promises) {
2866
+ return Promise.all(promises);
2867
+ };
2868
+ axios.spread = require_spread();
2869
+ axios.isAxiosError = require_isAxiosError();
2870
+ module.exports = axios;
2871
+ module.exports.default = axios;
2872
+ }
2873
+ });
2874
+
2875
+ // node_modules/axios/index.js
2876
+ var require_axios2 = __commonJS({
2877
+ "node_modules/axios/index.js"(exports, module) {
2878
+ "use strict";
2879
+ module.exports = require_axios();
2880
+ }
2881
+ });
2882
+
2883
+ // node_modules/localtunnel/node_modules/debug/node_modules/ms/index.js
2884
+ var require_ms2 = __commonJS({
2885
+ "node_modules/localtunnel/node_modules/debug/node_modules/ms/index.js"(exports, module) {
2886
+ "use strict";
2887
+ var s = 1e3;
2888
+ var m = s * 60;
2889
+ var h = m * 60;
2890
+ var d = h * 24;
2891
+ var w = d * 7;
2892
+ var y = d * 365.25;
2893
+ module.exports = function(val, options) {
2894
+ options = options || {};
2895
+ var type = typeof val;
2896
+ if (type === "string" && val.length > 0) {
2897
+ return parse(val);
2898
+ } else if (type === "number" && isFinite(val)) {
2899
+ return options.long ? fmtLong(val) : fmtShort(val);
2900
+ }
2901
+ throw new Error(
2902
+ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
2903
+ );
2904
+ };
2905
+ function parse(str) {
2906
+ str = String(str);
2907
+ if (str.length > 100) {
2908
+ return;
2909
+ }
2910
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
2911
+ str
2912
+ );
2913
+ if (!match) {
2914
+ return;
2915
+ }
2916
+ var n = parseFloat(match[1]);
2917
+ var type = (match[2] || "ms").toLowerCase();
2918
+ switch (type) {
2919
+ case "years":
2920
+ case "year":
2921
+ case "yrs":
2922
+ case "yr":
2923
+ case "y":
2924
+ return n * y;
2925
+ case "weeks":
2926
+ case "week":
2927
+ case "w":
2928
+ return n * w;
2929
+ case "days":
2930
+ case "day":
2931
+ case "d":
2932
+ return n * d;
2933
+ case "hours":
2934
+ case "hour":
2935
+ case "hrs":
2936
+ case "hr":
2937
+ case "h":
2938
+ return n * h;
2939
+ case "minutes":
2940
+ case "minute":
2941
+ case "mins":
2942
+ case "min":
2943
+ case "m":
2944
+ return n * m;
2945
+ case "seconds":
2946
+ case "second":
2947
+ case "secs":
2948
+ case "sec":
2949
+ case "s":
2950
+ return n * s;
2951
+ case "milliseconds":
2952
+ case "millisecond":
2953
+ case "msecs":
2954
+ case "msec":
2955
+ case "ms":
2956
+ return n;
2957
+ default:
2958
+ return void 0;
2959
+ }
2960
+ }
2961
+ function fmtShort(ms) {
2962
+ var msAbs = Math.abs(ms);
2963
+ if (msAbs >= d) {
2964
+ return Math.round(ms / d) + "d";
2965
+ }
2966
+ if (msAbs >= h) {
2967
+ return Math.round(ms / h) + "h";
2968
+ }
2969
+ if (msAbs >= m) {
2970
+ return Math.round(ms / m) + "m";
2971
+ }
2972
+ if (msAbs >= s) {
2973
+ return Math.round(ms / s) + "s";
2974
+ }
2975
+ return ms + "ms";
2976
+ }
2977
+ function fmtLong(ms) {
2978
+ var msAbs = Math.abs(ms);
2979
+ if (msAbs >= d) {
2980
+ return plural(ms, msAbs, d, "day");
2981
+ }
2982
+ if (msAbs >= h) {
2983
+ return plural(ms, msAbs, h, "hour");
2984
+ }
2985
+ if (msAbs >= m) {
2986
+ return plural(ms, msAbs, m, "minute");
2987
+ }
2988
+ if (msAbs >= s) {
2989
+ return plural(ms, msAbs, s, "second");
2990
+ }
2991
+ return ms + " ms";
2992
+ }
2993
+ function plural(ms, msAbs, n, name) {
2994
+ var isPlural = msAbs >= n * 1.5;
2995
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
2996
+ }
2997
+ }
2998
+ });
2999
+
3000
+ // node_modules/localtunnel/node_modules/debug/src/common.js
3001
+ var require_common2 = __commonJS({
3002
+ "node_modules/localtunnel/node_modules/debug/src/common.js"(exports, module) {
3003
+ "use strict";
3004
+ function setup(env) {
3005
+ createDebug.debug = createDebug;
3006
+ createDebug.default = createDebug;
3007
+ createDebug.coerce = coerce;
3008
+ createDebug.disable = disable;
3009
+ createDebug.enable = enable;
3010
+ createDebug.enabled = enabled;
3011
+ createDebug.humanize = require_ms2();
3012
+ createDebug.destroy = destroy;
3013
+ Object.keys(env).forEach((key) => {
3014
+ createDebug[key] = env[key];
3015
+ });
3016
+ createDebug.names = [];
3017
+ createDebug.skips = [];
3018
+ createDebug.formatters = {};
3019
+ function selectColor(namespace) {
3020
+ let hash = 0;
3021
+ for (let i = 0; i < namespace.length; i++) {
3022
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
3023
+ hash |= 0;
3024
+ }
3025
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
3026
+ }
3027
+ createDebug.selectColor = selectColor;
3028
+ function createDebug(namespace) {
3029
+ let prevTime;
3030
+ let enableOverride = null;
3031
+ let namespacesCache;
3032
+ let enabledCache;
3033
+ function debug(...args) {
3034
+ if (!debug.enabled) {
3035
+ return;
3036
+ }
3037
+ const self = debug;
3038
+ const curr = Number(/* @__PURE__ */ new Date());
3039
+ const ms = curr - (prevTime || curr);
3040
+ self.diff = ms;
3041
+ self.prev = prevTime;
3042
+ self.curr = curr;
3043
+ prevTime = curr;
3044
+ args[0] = createDebug.coerce(args[0]);
3045
+ if (typeof args[0] !== "string") {
3046
+ args.unshift("%O");
3047
+ }
3048
+ let index = 0;
3049
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
3050
+ if (match === "%%") {
3051
+ return "%";
3052
+ }
3053
+ index++;
3054
+ const formatter = createDebug.formatters[format];
3055
+ if (typeof formatter === "function") {
3056
+ const val = args[index];
3057
+ match = formatter.call(self, val);
3058
+ args.splice(index, 1);
3059
+ index--;
3060
+ }
3061
+ return match;
3062
+ });
3063
+ createDebug.formatArgs.call(self, args);
3064
+ const logFn = self.log || createDebug.log;
3065
+ logFn.apply(self, args);
3066
+ }
3067
+ debug.namespace = namespace;
3068
+ debug.useColors = createDebug.useColors();
3069
+ debug.color = createDebug.selectColor(namespace);
3070
+ debug.extend = extend;
3071
+ debug.destroy = createDebug.destroy;
3072
+ Object.defineProperty(debug, "enabled", {
3073
+ enumerable: true,
3074
+ configurable: false,
3075
+ get: () => {
3076
+ if (enableOverride !== null) {
3077
+ return enableOverride;
3078
+ }
3079
+ if (namespacesCache !== createDebug.namespaces) {
3080
+ namespacesCache = createDebug.namespaces;
3081
+ enabledCache = createDebug.enabled(namespace);
3082
+ }
3083
+ return enabledCache;
3084
+ },
3085
+ set: (v) => {
3086
+ enableOverride = v;
3087
+ }
3088
+ });
3089
+ if (typeof createDebug.init === "function") {
3090
+ createDebug.init(debug);
3091
+ }
3092
+ return debug;
3093
+ }
3094
+ function extend(namespace, delimiter) {
3095
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
3096
+ newDebug.log = this.log;
3097
+ return newDebug;
3098
+ }
3099
+ function enable(namespaces) {
3100
+ createDebug.save(namespaces);
3101
+ createDebug.namespaces = namespaces;
3102
+ createDebug.names = [];
3103
+ createDebug.skips = [];
3104
+ let i;
3105
+ const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
3106
+ const len = split.length;
3107
+ for (i = 0; i < len; i++) {
3108
+ if (!split[i]) {
3109
+ continue;
3110
+ }
3111
+ namespaces = split[i].replace(/\*/g, ".*?");
3112
+ if (namespaces[0] === "-") {
3113
+ createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
3114
+ } else {
3115
+ createDebug.names.push(new RegExp("^" + namespaces + "$"));
3116
+ }
3117
+ }
3118
+ }
3119
+ function disable() {
3120
+ const namespaces = [
3121
+ ...createDebug.names.map(toNamespace),
3122
+ ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
3123
+ ].join(",");
3124
+ createDebug.enable("");
3125
+ return namespaces;
3126
+ }
3127
+ function enabled(name) {
3128
+ if (name[name.length - 1] === "*") {
3129
+ return true;
3130
+ }
3131
+ let i;
3132
+ let len;
3133
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
3134
+ if (createDebug.skips[i].test(name)) {
3135
+ return false;
3136
+ }
3137
+ }
3138
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
3139
+ if (createDebug.names[i].test(name)) {
3140
+ return true;
3141
+ }
3142
+ }
3143
+ return false;
3144
+ }
3145
+ function toNamespace(regexp) {
3146
+ return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
3147
+ }
3148
+ function coerce(val) {
3149
+ if (val instanceof Error) {
3150
+ return val.stack || val.message;
3151
+ }
3152
+ return val;
3153
+ }
3154
+ function destroy() {
3155
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
3156
+ }
3157
+ createDebug.enable(createDebug.load());
3158
+ return createDebug;
3159
+ }
3160
+ module.exports = setup;
3161
+ }
3162
+ });
3163
+
3164
+ // node_modules/localtunnel/node_modules/debug/src/browser.js
3165
+ var require_browser2 = __commonJS({
3166
+ "node_modules/localtunnel/node_modules/debug/src/browser.js"(exports, module) {
3167
+ "use strict";
3168
+ exports.formatArgs = formatArgs;
3169
+ exports.save = save;
3170
+ exports.load = load;
3171
+ exports.useColors = useColors;
3172
+ exports.storage = localstorage();
3173
+ exports.destroy = /* @__PURE__ */ (() => {
3174
+ let warned = false;
3175
+ return () => {
3176
+ if (!warned) {
3177
+ warned = true;
3178
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
3179
+ }
3180
+ };
3181
+ })();
3182
+ exports.colors = [
3183
+ "#0000CC",
3184
+ "#0000FF",
3185
+ "#0033CC",
3186
+ "#0033FF",
3187
+ "#0066CC",
3188
+ "#0066FF",
3189
+ "#0099CC",
3190
+ "#0099FF",
3191
+ "#00CC00",
3192
+ "#00CC33",
3193
+ "#00CC66",
3194
+ "#00CC99",
3195
+ "#00CCCC",
3196
+ "#00CCFF",
3197
+ "#3300CC",
3198
+ "#3300FF",
3199
+ "#3333CC",
3200
+ "#3333FF",
3201
+ "#3366CC",
3202
+ "#3366FF",
3203
+ "#3399CC",
3204
+ "#3399FF",
3205
+ "#33CC00",
3206
+ "#33CC33",
3207
+ "#33CC66",
3208
+ "#33CC99",
3209
+ "#33CCCC",
3210
+ "#33CCFF",
3211
+ "#6600CC",
3212
+ "#6600FF",
3213
+ "#6633CC",
3214
+ "#6633FF",
3215
+ "#66CC00",
3216
+ "#66CC33",
3217
+ "#9900CC",
3218
+ "#9900FF",
3219
+ "#9933CC",
3220
+ "#9933FF",
3221
+ "#99CC00",
3222
+ "#99CC33",
3223
+ "#CC0000",
3224
+ "#CC0033",
3225
+ "#CC0066",
3226
+ "#CC0099",
3227
+ "#CC00CC",
3228
+ "#CC00FF",
3229
+ "#CC3300",
3230
+ "#CC3333",
3231
+ "#CC3366",
3232
+ "#CC3399",
3233
+ "#CC33CC",
3234
+ "#CC33FF",
3235
+ "#CC6600",
3236
+ "#CC6633",
3237
+ "#CC9900",
3238
+ "#CC9933",
3239
+ "#CCCC00",
3240
+ "#CCCC33",
3241
+ "#FF0000",
3242
+ "#FF0033",
3243
+ "#FF0066",
3244
+ "#FF0099",
3245
+ "#FF00CC",
3246
+ "#FF00FF",
3247
+ "#FF3300",
3248
+ "#FF3333",
3249
+ "#FF3366",
3250
+ "#FF3399",
3251
+ "#FF33CC",
3252
+ "#FF33FF",
3253
+ "#FF6600",
3254
+ "#FF6633",
3255
+ "#FF9900",
3256
+ "#FF9933",
3257
+ "#FFCC00",
3258
+ "#FFCC33"
3259
+ ];
3260
+ function useColors() {
3261
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
3262
+ return true;
3263
+ }
3264
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
3265
+ return false;
3266
+ }
3267
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
3268
+ typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
3269
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
3270
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
3271
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
3272
+ }
3273
+ function formatArgs(args) {
3274
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
3275
+ if (!this.useColors) {
3276
+ return;
3277
+ }
3278
+ const c = "color: " + this.color;
3279
+ args.splice(1, 0, c, "color: inherit");
3280
+ let index = 0;
3281
+ let lastC = 0;
3282
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
3283
+ if (match === "%%") {
3284
+ return;
3285
+ }
3286
+ index++;
3287
+ if (match === "%c") {
3288
+ lastC = index;
3289
+ }
3290
+ });
3291
+ args.splice(lastC, 0, c);
3292
+ }
3293
+ exports.log = console.debug || console.log || (() => {
3294
+ });
3295
+ function save(namespaces) {
3296
+ try {
3297
+ if (namespaces) {
3298
+ exports.storage.setItem("debug", namespaces);
3299
+ } else {
3300
+ exports.storage.removeItem("debug");
3301
+ }
3302
+ } catch (error) {
3303
+ }
3304
+ }
3305
+ function load() {
3306
+ let r;
3307
+ try {
3308
+ r = exports.storage.getItem("debug");
3309
+ } catch (error) {
3310
+ }
3311
+ if (!r && typeof process !== "undefined" && "env" in process) {
3312
+ r = process.env.DEBUG;
3313
+ }
3314
+ return r;
3315
+ }
3316
+ function localstorage() {
3317
+ try {
3318
+ return localStorage;
3319
+ } catch (error) {
3320
+ }
3321
+ }
3322
+ module.exports = require_common2()(exports);
3323
+ var { formatters } = module.exports;
3324
+ formatters.j = function(v) {
3325
+ try {
3326
+ return JSON.stringify(v);
3327
+ } catch (error) {
3328
+ return "[UnexpectedJSONParseError]: " + error.message;
3329
+ }
3330
+ };
3331
+ }
3332
+ });
3333
+
3334
+ // node_modules/localtunnel/node_modules/debug/src/node.js
3335
+ var require_node2 = __commonJS({
3336
+ "node_modules/localtunnel/node_modules/debug/src/node.js"(exports, module) {
3337
+ "use strict";
3338
+ var tty = __require("tty");
3339
+ var util = __require("util");
3340
+ exports.init = init;
3341
+ exports.log = log;
3342
+ exports.formatArgs = formatArgs;
3343
+ exports.save = save;
3344
+ exports.load = load;
3345
+ exports.useColors = useColors;
3346
+ exports.destroy = util.deprecate(
3347
+ () => {
3348
+ },
3349
+ "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
3350
+ );
3351
+ exports.colors = [6, 2, 3, 4, 5, 1];
3352
+ try {
3353
+ const supportsColor = require_supports_color();
3354
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
3355
+ exports.colors = [
3356
+ 20,
3357
+ 21,
3358
+ 26,
3359
+ 27,
3360
+ 32,
3361
+ 33,
3362
+ 38,
3363
+ 39,
3364
+ 40,
3365
+ 41,
3366
+ 42,
3367
+ 43,
3368
+ 44,
3369
+ 45,
3370
+ 56,
3371
+ 57,
3372
+ 62,
3373
+ 63,
3374
+ 68,
3375
+ 69,
3376
+ 74,
3377
+ 75,
3378
+ 76,
3379
+ 77,
3380
+ 78,
3381
+ 79,
3382
+ 80,
3383
+ 81,
3384
+ 92,
3385
+ 93,
3386
+ 98,
3387
+ 99,
3388
+ 112,
3389
+ 113,
3390
+ 128,
3391
+ 129,
3392
+ 134,
3393
+ 135,
3394
+ 148,
3395
+ 149,
3396
+ 160,
3397
+ 161,
3398
+ 162,
3399
+ 163,
3400
+ 164,
3401
+ 165,
3402
+ 166,
3403
+ 167,
3404
+ 168,
3405
+ 169,
3406
+ 170,
3407
+ 171,
3408
+ 172,
3409
+ 173,
3410
+ 178,
3411
+ 179,
3412
+ 184,
3413
+ 185,
3414
+ 196,
3415
+ 197,
3416
+ 198,
3417
+ 199,
3418
+ 200,
3419
+ 201,
3420
+ 202,
3421
+ 203,
3422
+ 204,
3423
+ 205,
3424
+ 206,
3425
+ 207,
3426
+ 208,
3427
+ 209,
3428
+ 214,
3429
+ 215,
3430
+ 220,
3431
+ 221
3432
+ ];
3433
+ }
3434
+ } catch (error) {
3435
+ }
3436
+ exports.inspectOpts = Object.keys(process.env).filter((key) => {
3437
+ return /^debug_/i.test(key);
3438
+ }).reduce((obj, key) => {
3439
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
3440
+ return k.toUpperCase();
3441
+ });
3442
+ let val = process.env[key];
3443
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
3444
+ val = true;
3445
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
3446
+ val = false;
3447
+ } else if (val === "null") {
3448
+ val = null;
3449
+ } else {
3450
+ val = Number(val);
3451
+ }
3452
+ obj[prop] = val;
3453
+ return obj;
3454
+ }, {});
3455
+ function useColors() {
3456
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
3457
+ }
3458
+ function formatArgs(args) {
3459
+ const { namespace: name, useColors: useColors2 } = this;
3460
+ if (useColors2) {
3461
+ const c = this.color;
3462
+ const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
3463
+ const prefix = ` ${colorCode};1m${name} \x1B[0m`;
3464
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
3465
+ args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
3466
+ } else {
3467
+ args[0] = getDate() + name + " " + args[0];
3468
+ }
3469
+ }
3470
+ function getDate() {
3471
+ if (exports.inspectOpts.hideDate) {
3472
+ return "";
3473
+ }
3474
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
3475
+ }
3476
+ function log(...args) {
3477
+ return process.stderr.write(util.format(...args) + "\n");
3478
+ }
3479
+ function save(namespaces) {
3480
+ if (namespaces) {
3481
+ process.env.DEBUG = namespaces;
3482
+ } else {
3483
+ delete process.env.DEBUG;
3484
+ }
3485
+ }
3486
+ function load() {
3487
+ return process.env.DEBUG;
3488
+ }
3489
+ function init(debug) {
3490
+ debug.inspectOpts = {};
3491
+ const keys = Object.keys(exports.inspectOpts);
3492
+ for (let i = 0; i < keys.length; i++) {
3493
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
3494
+ }
3495
+ }
3496
+ module.exports = require_common2()(exports);
3497
+ var { formatters } = module.exports;
3498
+ formatters.o = function(v) {
3499
+ this.inspectOpts.colors = this.useColors;
3500
+ return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
3501
+ };
3502
+ formatters.O = function(v) {
3503
+ this.inspectOpts.colors = this.useColors;
3504
+ return util.inspect(v, this.inspectOpts);
3505
+ };
3506
+ }
3507
+ });
3508
+
3509
+ // node_modules/localtunnel/node_modules/debug/src/index.js
3510
+ var require_src2 = __commonJS({
3511
+ "node_modules/localtunnel/node_modules/debug/src/index.js"(exports, module) {
3512
+ "use strict";
3513
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
3514
+ module.exports = require_browser2();
3515
+ } else {
3516
+ module.exports = require_node2();
3517
+ }
3518
+ }
3519
+ });
3520
+
3521
+ // node_modules/localtunnel/lib/HeaderHostTransformer.js
3522
+ var require_HeaderHostTransformer = __commonJS({
3523
+ "node_modules/localtunnel/lib/HeaderHostTransformer.js"(exports, module) {
3524
+ "use strict";
3525
+ var { Transform } = __require("stream");
3526
+ var HeaderHostTransformer = class extends Transform {
3527
+ constructor(opts = {}) {
3528
+ super(opts);
3529
+ this.host = opts.host || "localhost";
3530
+ this.replaced = false;
3531
+ }
3532
+ _transform(data, encoding, callback) {
3533
+ callback(
3534
+ null,
3535
+ this.replaced ? data : data.toString().replace(/(\r\n[Hh]ost: )\S+/, (match, $1) => {
3536
+ this.replaced = true;
3537
+ return $1 + this.host;
3538
+ })
3539
+ );
3540
+ }
3541
+ };
3542
+ module.exports = HeaderHostTransformer;
3543
+ }
3544
+ });
3545
+
3546
+ // node_modules/localtunnel/lib/TunnelCluster.js
3547
+ var require_TunnelCluster = __commonJS({
3548
+ "node_modules/localtunnel/lib/TunnelCluster.js"(exports, module) {
3549
+ "use strict";
3550
+ var { EventEmitter } = __require("events");
3551
+ var debug = require_src2()("localtunnel:client");
3552
+ var fs = __require("fs");
3553
+ var net = __require("net");
3554
+ var tls = __require("tls");
3555
+ var HeaderHostTransformer = require_HeaderHostTransformer();
3556
+ module.exports = class TunnelCluster extends EventEmitter {
3557
+ constructor(opts = {}) {
3558
+ super(opts);
3559
+ this.opts = opts;
3560
+ }
3561
+ open() {
3562
+ const opt = this.opts;
3563
+ const remoteHostOrIp = opt.remote_ip || opt.remote_host;
3564
+ const remotePort = opt.remote_port;
3565
+ const localHost = opt.local_host || "localhost";
3566
+ const localPort = opt.local_port;
3567
+ const localProtocol = opt.local_https ? "https" : "http";
3568
+ const allowInvalidCert = opt.allow_invalid_cert;
3569
+ debug(
3570
+ "establishing tunnel %s://%s:%s <> %s:%s",
3571
+ localProtocol,
3572
+ localHost,
3573
+ localPort,
3574
+ remoteHostOrIp,
3575
+ remotePort
3576
+ );
3577
+ const remote = net.connect({
3578
+ host: remoteHostOrIp,
3579
+ port: remotePort
3580
+ });
3581
+ remote.setKeepAlive(true);
3582
+ remote.on("error", (err) => {
3583
+ debug("got remote connection error", err.message);
3584
+ if (err.code === "ECONNREFUSED") {
3585
+ this.emit(
3586
+ "error",
3587
+ new Error(
3588
+ `connection refused: ${remoteHostOrIp}:${remotePort} (check your firewall settings)`
3589
+ )
3590
+ );
3591
+ }
3592
+ remote.end();
3593
+ });
3594
+ const connLocal = () => {
3595
+ if (remote.destroyed) {
3596
+ debug("remote destroyed");
3597
+ this.emit("dead");
3598
+ return;
3599
+ }
3600
+ debug("connecting locally to %s://%s:%d", localProtocol, localHost, localPort);
3601
+ remote.pause();
3602
+ if (allowInvalidCert) {
3603
+ debug("allowing invalid certificates");
3604
+ }
3605
+ const getLocalCertOpts = () => allowInvalidCert ? { rejectUnauthorized: false } : {
3606
+ cert: fs.readFileSync(opt.local_cert),
3607
+ key: fs.readFileSync(opt.local_key),
3608
+ ca: opt.local_ca ? [fs.readFileSync(opt.local_ca)] : void 0
3609
+ };
3610
+ const local = opt.local_https ? tls.connect({ host: localHost, port: localPort, ...getLocalCertOpts() }) : net.connect({ host: localHost, port: localPort });
3611
+ const remoteClose = () => {
3612
+ debug("remote close");
3613
+ this.emit("dead");
3614
+ local.end();
3615
+ };
3616
+ remote.once("close", remoteClose);
3617
+ local.once("error", (err) => {
3618
+ debug("local error %s", err.message);
3619
+ local.end();
3620
+ remote.removeListener("close", remoteClose);
3621
+ if (err.code !== "ECONNREFUSED") {
3622
+ return remote.end();
3623
+ }
3624
+ setTimeout(connLocal, 1e3);
3625
+ });
3626
+ local.once("connect", () => {
3627
+ debug("connected locally");
3628
+ remote.resume();
3629
+ let stream = remote;
3630
+ if (opt.local_host) {
3631
+ debug("transform Host header to %s", opt.local_host);
3632
+ stream = remote.pipe(new HeaderHostTransformer({ host: opt.local_host }));
3633
+ }
3634
+ stream.pipe(local).pipe(remote);
3635
+ local.once("close", (hadError) => {
3636
+ debug("local connection closed [%s]", hadError);
3637
+ });
3638
+ });
3639
+ };
3640
+ remote.on("data", (data) => {
3641
+ const match = data.toString().match(/^(\w+) (\S+)/);
3642
+ if (match) {
3643
+ this.emit("request", {
3644
+ method: match[1],
3645
+ path: match[2]
3646
+ });
3647
+ }
3648
+ });
3649
+ remote.once("connect", () => {
3650
+ this.emit("open", remote);
3651
+ connLocal();
3652
+ });
3653
+ }
3654
+ };
3655
+ }
3656
+ });
3657
+
3658
+ // node_modules/localtunnel/lib/Tunnel.js
3659
+ var require_Tunnel = __commonJS({
3660
+ "node_modules/localtunnel/lib/Tunnel.js"(exports, module) {
3661
+ "use strict";
3662
+ var { parse } = __require("url");
3663
+ var { EventEmitter } = __require("events");
3664
+ var axios = require_axios2();
3665
+ var debug = require_src2()("localtunnel:client");
3666
+ var TunnelCluster = require_TunnelCluster();
3667
+ module.exports = class Tunnel extends EventEmitter {
3668
+ constructor(opts = {}) {
3669
+ super(opts);
3670
+ this.opts = opts;
3671
+ this.closed = false;
3672
+ if (!this.opts.host) {
3673
+ this.opts.host = "https://localtunnel.me";
3674
+ }
3675
+ }
3676
+ _getInfo(body) {
3677
+ const { id, ip, port, url, cached_url, max_conn_count } = body;
3678
+ const { host, port: local_port, local_host } = this.opts;
3679
+ const { local_https, local_cert, local_key, local_ca, allow_invalid_cert } = this.opts;
3680
+ return {
3681
+ name: id,
3682
+ url,
3683
+ cached_url,
3684
+ max_conn: max_conn_count || 1,
3685
+ remote_host: parse(host).hostname,
3686
+ remote_ip: ip,
3687
+ remote_port: port,
3688
+ local_port,
3689
+ local_host,
3690
+ local_https,
3691
+ local_cert,
3692
+ local_key,
3693
+ local_ca,
3694
+ allow_invalid_cert
3695
+ };
3696
+ }
3697
+ // initialize connection
3698
+ // callback with connection info
3699
+ _init(cb) {
3700
+ const opt = this.opts;
3701
+ const getInfo = this._getInfo.bind(this);
3702
+ const params = {
3703
+ responseType: "json"
3704
+ };
3705
+ const baseUri = `${opt.host}/`;
3706
+ const assignedDomain = opt.subdomain;
3707
+ const uri = baseUri + (assignedDomain || "?new");
3708
+ (function getUrl() {
3709
+ axios.get(uri, params).then((res) => {
3710
+ const body = res.data;
3711
+ debug("got tunnel information", res.data);
3712
+ if (res.status !== 200) {
3713
+ const err = new Error(
3714
+ body && body.message || "localtunnel server returned an error, please try again"
3715
+ );
3716
+ return cb(err);
3717
+ }
3718
+ cb(null, getInfo(body));
3719
+ }).catch((err) => {
3720
+ debug(`tunnel server offline: ${err.message}, retry 1s`);
3721
+ return setTimeout(getUrl, 1e3);
3722
+ });
3723
+ })();
3724
+ }
3725
+ _establish(info) {
3726
+ this.setMaxListeners(info.max_conn + (EventEmitter.defaultMaxListeners || 10));
3727
+ this.tunnelCluster = new TunnelCluster(info);
3728
+ this.tunnelCluster.once("open", () => {
3729
+ this.emit("url", info.url);
3730
+ });
3731
+ this.tunnelCluster.on("error", (err) => {
3732
+ debug("got socket error", err.message);
3733
+ this.emit("error", err);
3734
+ });
3735
+ let tunnelCount = 0;
3736
+ this.tunnelCluster.on("open", (tunnel) => {
3737
+ tunnelCount++;
3738
+ debug("tunnel open [total: %d]", tunnelCount);
3739
+ const closeHandler = () => {
3740
+ tunnel.destroy();
3741
+ };
3742
+ if (this.closed) {
3743
+ return closeHandler();
3744
+ }
3745
+ this.once("close", closeHandler);
3746
+ tunnel.once("close", () => {
3747
+ this.removeListener("close", closeHandler);
3748
+ });
3749
+ });
3750
+ this.tunnelCluster.on("dead", () => {
3751
+ tunnelCount--;
3752
+ debug("tunnel dead [total: %d]", tunnelCount);
3753
+ if (this.closed) {
3754
+ return;
3755
+ }
3756
+ this.tunnelCluster.open();
3757
+ });
3758
+ this.tunnelCluster.on("request", (req) => {
3759
+ this.emit("request", req);
3760
+ });
3761
+ for (let count = 0; count < info.max_conn; ++count) {
3762
+ this.tunnelCluster.open();
3763
+ }
3764
+ }
3765
+ open(cb) {
3766
+ this._init((err, info) => {
3767
+ if (err) {
3768
+ return cb(err);
3769
+ }
3770
+ this.clientId = info.name;
3771
+ this.url = info.url;
3772
+ if (info.cached_url) {
3773
+ this.cachedUrl = info.cached_url;
3774
+ }
3775
+ this._establish(info);
3776
+ cb();
3777
+ });
3778
+ }
3779
+ close() {
3780
+ this.closed = true;
3781
+ this.emit("close");
3782
+ }
3783
+ };
3784
+ }
3785
+ });
3786
+
3787
+ // node_modules/localtunnel/localtunnel.js
3788
+ var require_localtunnel = __commonJS({
3789
+ "node_modules/localtunnel/localtunnel.js"(exports, module) {
3790
+ var Tunnel = require_Tunnel();
3791
+ module.exports = function localtunnel(arg1, arg2, arg3) {
3792
+ const options = typeof arg1 === "object" ? arg1 : { ...arg2, port: arg1 };
3793
+ const callback = typeof arg1 === "object" ? arg2 : arg3;
3794
+ const client = new Tunnel(options);
3795
+ if (callback) {
3796
+ client.open((err) => err ? callback(err) : callback(null, client));
3797
+ return client;
3798
+ }
3799
+ return new Promise(
3800
+ (resolve, reject) => client.open((err) => err ? reject(err) : resolve(client))
3801
+ );
3802
+ };
3803
+ }
3804
+ });
3805
+ export default require_localtunnel();