@neriros/ralphy 2.8.2 → 2.9.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.
Files changed (2) hide show
  1. package/dist/cli/index.js +1100 -802
  2. package/package.json +4 -3
package/dist/cli/index.js CHANGED
@@ -46835,9 +46835,9 @@ var require_follow_redirects = __commonJS((exports, module) => {
46835
46835
  module.exports.wrap = wrap2;
46836
46836
  });
46837
46837
 
46838
- // node_modules/.bun/axios@1.15.1/node_modules/axios/dist/node/axios.cjs
46838
+ // node_modules/.bun/axios@1.16.0/node_modules/axios/dist/node/axios.cjs
46839
46839
  var require_axios = __commonJS((exports, module) => {
46840
- /*! Axios v1.15.1 Copyright (c) 2026 Matt Zabriskie and contributors */
46840
+ /*! Axios v1.16.0 Copyright (c) 2026 Matt Zabriskie and contributors */
46841
46841
  var FormData$1 = require_form_data();
46842
46842
  var crypto = __require("crypto");
46843
46843
  var url = __require("url");
@@ -46845,6 +46845,7 @@ var require_axios = __commonJS((exports, module) => {
46845
46845
  var https = __require("https");
46846
46846
  var http2 = __require("http2");
46847
46847
  var util3 = __require("util");
46848
+ var path = __require("path");
46848
46849
  var followRedirects = require_follow_redirects();
46849
46850
  var zlib = __require("zlib");
46850
46851
  var stream = __require("stream");
@@ -47002,7 +47003,7 @@ var require_axios = __commonJS((exports, module) => {
47002
47003
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
47003
47004
  })();
47004
47005
  var isContextDefined = (context) => !isUndefined2(context) && context !== _global;
47005
- function merge2() {
47006
+ function merge2(...objs) {
47006
47007
  const {
47007
47008
  caseless,
47008
47009
  skipUndefined
@@ -47013,8 +47014,9 @@ var require_axios = __commonJS((exports, module) => {
47013
47014
  return;
47014
47015
  }
47015
47016
  const targetKey = caseless && findKey2(result2, key) || key;
47016
- if (isPlainObject2(result2[targetKey]) && isPlainObject2(val)) {
47017
- result2[targetKey] = merge2(result2[targetKey], val);
47017
+ const existing = hasOwnProperty(result2, targetKey) ? result2[targetKey] : undefined;
47018
+ if (isPlainObject2(existing) && isPlainObject2(val)) {
47019
+ result2[targetKey] = merge2(existing, val);
47018
47020
  } else if (isPlainObject2(val)) {
47019
47021
  result2[targetKey] = merge2({}, val);
47020
47022
  } else if (isArray2(val)) {
@@ -47023,8 +47025,8 @@ var require_axios = __commonJS((exports, module) => {
47023
47025
  result2[targetKey] = val;
47024
47026
  }
47025
47027
  };
47026
- for (let i = 0, l = arguments.length;i < l; i++) {
47027
- arguments[i] && forEach3(arguments[i], assignValue);
47028
+ for (let i = 0, l = objs.length;i < l; i++) {
47029
+ objs[i] && forEach3(objs[i], assignValue);
47028
47030
  }
47029
47031
  return result2;
47030
47032
  }
@@ -47034,6 +47036,7 @@ var require_axios = __commonJS((exports, module) => {
47034
47036
  forEach3(b, (val, key) => {
47035
47037
  if (thisArg && isFunction$1(val)) {
47036
47038
  Object.defineProperty(a, key, {
47039
+ __proto__: null,
47037
47040
  value: bind2(val, thisArg),
47038
47041
  writable: true,
47039
47042
  enumerable: true,
@@ -47041,6 +47044,7 @@ var require_axios = __commonJS((exports, module) => {
47041
47044
  });
47042
47045
  } else {
47043
47046
  Object.defineProperty(a, key, {
47047
+ __proto__: null,
47044
47048
  value: val,
47045
47049
  writable: true,
47046
47050
  enumerable: true,
@@ -47061,12 +47065,14 @@ var require_axios = __commonJS((exports, module) => {
47061
47065
  var inherits = (constructor, superConstructor, props, descriptors) => {
47062
47066
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
47063
47067
  Object.defineProperty(constructor.prototype, "constructor", {
47068
+ __proto__: null,
47064
47069
  value: constructor,
47065
47070
  writable: true,
47066
47071
  enumerable: false,
47067
47072
  configurable: true
47068
47073
  });
47069
47074
  Object.defineProperty(constructor, "super", {
47075
+ __proto__: null,
47070
47076
  value: superConstructor.prototype
47071
47077
  });
47072
47078
  props && Object.assign(constructor.prototype, props);
@@ -47161,7 +47167,7 @@ var require_axios = __commonJS((exports, module) => {
47161
47167
  };
47162
47168
  var freezeMethods = (obj) => {
47163
47169
  reduceDescriptors(obj, (descriptor, name) => {
47164
- if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
47170
+ if (isFunction$1(obj) && ["arguments", "caller", "callee"].includes(name)) {
47165
47171
  return false;
47166
47172
  }
47167
47173
  const value = obj[name];
@@ -47305,769 +47311,830 @@ var require_axios = __commonJS((exports, module) => {
47305
47311
  asap,
47306
47312
  isIterable
47307
47313
  };
47308
-
47309
- class AxiosError extends Error {
47310
- static from(error, code, config, request, response, customProps) {
47311
- const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
47312
- axiosError.cause = error;
47313
- axiosError.name = error.name;
47314
- if (error.status != null && axiosError.status == null) {
47315
- axiosError.status = error.status;
47314
+ var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
47315
+ var parseHeaders = (rawHeaders) => {
47316
+ const parsed = {};
47317
+ let key;
47318
+ let val;
47319
+ let i;
47320
+ rawHeaders && rawHeaders.split(`
47321
+ `).forEach(function parser(line) {
47322
+ i = line.indexOf(":");
47323
+ key = line.substring(0, i).trim().toLowerCase();
47324
+ val = line.substring(i + 1).trim();
47325
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
47326
+ return;
47316
47327
  }
47317
- customProps && Object.assign(axiosError, customProps);
47318
- return axiosError;
47319
- }
47320
- constructor(message, code, config, request, response) {
47321
- super(message);
47322
- Object.defineProperty(this, "message", {
47323
- value: message,
47324
- enumerable: true,
47325
- writable: true,
47326
- configurable: true
47327
- });
47328
- this.name = "AxiosError";
47329
- this.isAxiosError = true;
47330
- code && (this.code = code);
47331
- config && (this.config = config);
47332
- request && (this.request = request);
47333
- if (response) {
47334
- this.response = response;
47335
- this.status = response.status;
47328
+ if (key === "set-cookie") {
47329
+ if (parsed[key]) {
47330
+ parsed[key].push(val);
47331
+ } else {
47332
+ parsed[key] = [val];
47333
+ }
47334
+ } else {
47335
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
47336
+ }
47337
+ });
47338
+ return parsed;
47339
+ };
47340
+ var $internals = Symbol("internals");
47341
+ var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
47342
+ function trimSPorHTAB(str) {
47343
+ let start = 0;
47344
+ let end = str.length;
47345
+ while (start < end) {
47346
+ const code = str.charCodeAt(start);
47347
+ if (code !== 9 && code !== 32) {
47348
+ break;
47336
47349
  }
47350
+ start += 1;
47337
47351
  }
47338
- toJSON() {
47339
- return {
47340
- message: this.message,
47341
- name: this.name,
47342
- description: this.description,
47343
- number: this.number,
47344
- fileName: this.fileName,
47345
- lineNumber: this.lineNumber,
47346
- columnNumber: this.columnNumber,
47347
- stack: this.stack,
47348
- config: utils$1.toJSONObject(this.config),
47349
- code: this.code,
47350
- status: this.status
47351
- };
47352
+ while (end > start) {
47353
+ const code = str.charCodeAt(end - 1);
47354
+ if (code !== 9 && code !== 32) {
47355
+ break;
47356
+ }
47357
+ end -= 1;
47352
47358
  }
47359
+ return start === 0 && end === str.length ? str : str.slice(start, end);
47353
47360
  }
47354
- AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
47355
- AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
47356
- AxiosError.ECONNABORTED = "ECONNABORTED";
47357
- AxiosError.ETIMEDOUT = "ETIMEDOUT";
47358
- AxiosError.ERR_NETWORK = "ERR_NETWORK";
47359
- AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
47360
- AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
47361
- AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
47362
- AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
47363
- AxiosError.ERR_CANCELED = "ERR_CANCELED";
47364
- AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
47365
- AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
47366
- AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
47367
- function isVisitable(thing) {
47368
- return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
47369
- }
47370
- function removeBrackets(key) {
47371
- return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
47372
- }
47373
- function renderKey(path, key, dots) {
47374
- if (!path)
47375
- return key;
47376
- return path.concat(key).map(function each(token, i) {
47377
- token = removeBrackets(token);
47378
- return !dots && i ? "[" + token + "]" : token;
47379
- }).join(dots ? "." : "");
47361
+ function normalizeHeader(header) {
47362
+ return header && String(header).trim().toLowerCase();
47380
47363
  }
47381
- function isFlatArray(arr) {
47382
- return utils$1.isArray(arr) && !arr.some(isVisitable);
47364
+ function sanitizeHeaderValue(str) {
47365
+ return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
47383
47366
  }
47384
- var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter2(prop) {
47385
- return /^is[A-Z]/.test(prop);
47386
- });
47387
- function toFormData(obj, formData, options) {
47388
- if (!utils$1.isObject(obj)) {
47389
- throw new TypeError("target must be an object");
47367
+ function normalizeValue(value) {
47368
+ if (value === false || value == null) {
47369
+ return value;
47390
47370
  }
47391
- formData = formData || new (FormData$1 || FormData);
47392
- options = utils$1.toFlatObject(options, {
47393
- metaTokens: true,
47394
- dots: false,
47395
- indexes: false
47396
- }, false, function defined(option, source) {
47397
- return !utils$1.isUndefined(source[option]);
47398
- });
47399
- const metaTokens = options.metaTokens;
47400
- const visitor = options.visitor || defaultVisitor;
47401
- const dots = options.dots;
47402
- const indexes = options.indexes;
47403
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
47404
- const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
47405
- const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
47406
- if (!utils$1.isFunction(visitor)) {
47407
- throw new TypeError("visitor must be a function");
47371
+ return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
47372
+ }
47373
+ function parseTokens(str) {
47374
+ const tokens = Object.create(null);
47375
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
47376
+ let match;
47377
+ while (match = tokensRE.exec(str)) {
47378
+ tokens[match[1]] = match[2];
47408
47379
  }
47409
- function convertValue(value) {
47410
- if (value === null)
47411
- return "";
47412
- if (utils$1.isDate(value)) {
47413
- return value.toISOString();
47414
- }
47415
- if (utils$1.isBoolean(value)) {
47416
- return value.toString();
47417
- }
47418
- if (!useBlob && utils$1.isBlob(value)) {
47419
- throw new AxiosError("Blob is not supported. Use a Buffer instead.");
47420
- }
47421
- if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
47422
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
47423
- }
47424
- return value;
47380
+ return tokens;
47381
+ }
47382
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
47383
+ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
47384
+ if (utils$1.isFunction(filter2)) {
47385
+ return filter2.call(this, value, header);
47425
47386
  }
47426
- function defaultVisitor(value, key, path) {
47427
- let arr = value;
47428
- if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
47429
- formData.append(renderKey(path, key, dots), convertValue(value));
47430
- return false;
47431
- }
47432
- if (value && !path && typeof value === "object") {
47433
- if (utils$1.endsWith(key, "{}")) {
47434
- key = metaTokens ? key : key.slice(0, -2);
47435
- value = JSON.stringify(value);
47436
- } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
47437
- key = removeBrackets(key);
47438
- arr.forEach(function each(el, index) {
47439
- !(utils$1.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el));
47440
- });
47441
- return false;
47442
- }
47443
- }
47444
- if (isVisitable(value)) {
47445
- return true;
47446
- }
47447
- formData.append(renderKey(path, key, dots), convertValue(value));
47448
- return false;
47387
+ if (isHeaderNameFilter) {
47388
+ value = header;
47449
47389
  }
47450
- const stack = [];
47451
- const exposedHelpers = Object.assign(predicates, {
47452
- defaultVisitor,
47453
- convertValue,
47454
- isVisitable
47455
- });
47456
- function build(value, path, depth = 0) {
47457
- if (utils$1.isUndefined(value))
47458
- return;
47459
- if (depth > maxDepth) {
47460
- throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
47461
- }
47462
- if (stack.indexOf(value) !== -1) {
47463
- throw Error("Circular reference detected in " + path.join("."));
47464
- }
47465
- stack.push(value);
47466
- utils$1.forEach(value, function each(el, key) {
47467
- const result2 = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
47468
- if (result2 === true) {
47469
- build(el, path ? path.concat(key) : [key], depth + 1);
47470
- }
47471
- });
47472
- stack.pop();
47390
+ if (!utils$1.isString(value))
47391
+ return;
47392
+ if (utils$1.isString(filter2)) {
47393
+ return value.indexOf(filter2) !== -1;
47473
47394
  }
47474
- if (!utils$1.isObject(obj)) {
47475
- throw new TypeError("data must be an object");
47395
+ if (utils$1.isRegExp(filter2)) {
47396
+ return filter2.test(value);
47476
47397
  }
47477
- build(obj);
47478
- return formData;
47479
47398
  }
47480
- function encode$1(str) {
47481
- const charMap = {
47482
- "!": "%21",
47483
- "'": "%27",
47484
- "(": "%28",
47485
- ")": "%29",
47486
- "~": "%7E",
47487
- "%20": "+"
47488
- };
47489
- return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
47490
- return charMap[match];
47399
+ function formatHeader(header) {
47400
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
47401
+ return char.toUpperCase() + str;
47491
47402
  });
47492
47403
  }
47493
- function AxiosURLSearchParams(params, options) {
47494
- this._pairs = [];
47495
- params && toFormData(params, this, options);
47404
+ function buildAccessors(obj, header) {
47405
+ const accessorName = utils$1.toCamelCase(" " + header);
47406
+ ["get", "set", "has"].forEach((methodName) => {
47407
+ Object.defineProperty(obj, methodName + accessorName, {
47408
+ __proto__: null,
47409
+ value: function(arg1, arg2, arg3) {
47410
+ return this[methodName].call(this, header, arg1, arg2, arg3);
47411
+ },
47412
+ configurable: true
47413
+ });
47414
+ });
47496
47415
  }
47497
- var prototype = AxiosURLSearchParams.prototype;
47498
- prototype.append = function append(name, value) {
47499
- this._pairs.push([name, value]);
47500
- };
47501
- prototype.toString = function toString3(encoder) {
47502
- const _encode = encoder ? function(value) {
47503
- return encoder.call(this, value, encode$1);
47504
- } : encode$1;
47505
- return this._pairs.map(function each(pair) {
47506
- return _encode(pair[0]) + "=" + _encode(pair[1]);
47507
- }, "").join("&");
47508
- };
47509
- function encode(val) {
47510
- return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
47511
- }
47512
- function buildURL(url2, params, options) {
47513
- if (!params) {
47514
- return url2;
47515
- }
47516
- const _encode = options && options.encode || encode;
47517
- const _options = utils$1.isFunction(options) ? {
47518
- serialize: options
47519
- } : options;
47520
- const serializeFn = _options && _options.serialize;
47521
- let serializedParams;
47522
- if (serializeFn) {
47523
- serializedParams = serializeFn(params, _options);
47524
- } else {
47525
- serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
47416
+
47417
+ class AxiosHeaders {
47418
+ constructor(headers) {
47419
+ headers && this.set(headers);
47526
47420
  }
47527
- if (serializedParams) {
47528
- const hashmarkIndex = url2.indexOf("#");
47529
- if (hashmarkIndex !== -1) {
47530
- url2 = url2.slice(0, hashmarkIndex);
47421
+ set(header, valueOrRewrite, rewrite) {
47422
+ const self2 = this;
47423
+ function setHeader(_value, _header, _rewrite) {
47424
+ const lHeader = normalizeHeader(_header);
47425
+ if (!lHeader) {
47426
+ throw new Error("header name must be a non-empty string");
47427
+ }
47428
+ const key = utils$1.findKey(self2, lHeader);
47429
+ if (!key || self2[key] === undefined || _rewrite === true || _rewrite === undefined && self2[key] !== false) {
47430
+ self2[key || _header] = normalizeValue(_value);
47431
+ }
47531
47432
  }
47532
- url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
47433
+ const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
47434
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
47435
+ setHeaders(header, valueOrRewrite);
47436
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
47437
+ setHeaders(parseHeaders(header), valueOrRewrite);
47438
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
47439
+ let obj = {}, dest, key;
47440
+ for (const entry of header) {
47441
+ if (!utils$1.isArray(entry)) {
47442
+ throw TypeError("Object iterator must return a key-value pair");
47443
+ }
47444
+ obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
47445
+ }
47446
+ setHeaders(obj, valueOrRewrite);
47447
+ } else {
47448
+ header != null && setHeader(valueOrRewrite, header, rewrite);
47449
+ }
47450
+ return this;
47533
47451
  }
47534
- return url2;
47535
- }
47536
-
47537
- class InterceptorManager {
47538
- constructor() {
47539
- this.handlers = [];
47452
+ get(header, parser) {
47453
+ header = normalizeHeader(header);
47454
+ if (header) {
47455
+ const key = utils$1.findKey(this, header);
47456
+ if (key) {
47457
+ const value = this[key];
47458
+ if (!parser) {
47459
+ return value;
47460
+ }
47461
+ if (parser === true) {
47462
+ return parseTokens(value);
47463
+ }
47464
+ if (utils$1.isFunction(parser)) {
47465
+ return parser.call(this, value, key);
47466
+ }
47467
+ if (utils$1.isRegExp(parser)) {
47468
+ return parser.exec(value);
47469
+ }
47470
+ throw new TypeError("parser must be boolean|regexp|function");
47471
+ }
47472
+ }
47540
47473
  }
47541
- use(fulfilled, rejected, options) {
47542
- this.handlers.push({
47543
- fulfilled,
47544
- rejected,
47545
- synchronous: options ? options.synchronous : false,
47546
- runWhen: options ? options.runWhen : null
47547
- });
47548
- return this.handlers.length - 1;
47474
+ has(header, matcher) {
47475
+ header = normalizeHeader(header);
47476
+ if (header) {
47477
+ const key = utils$1.findKey(this, header);
47478
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
47479
+ }
47480
+ return false;
47549
47481
  }
47550
- eject(id) {
47551
- if (this.handlers[id]) {
47552
- this.handlers[id] = null;
47482
+ delete(header, matcher) {
47483
+ const self2 = this;
47484
+ let deleted = false;
47485
+ function deleteHeader(_header) {
47486
+ _header = normalizeHeader(_header);
47487
+ if (_header) {
47488
+ const key = utils$1.findKey(self2, _header);
47489
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
47490
+ delete self2[key];
47491
+ deleted = true;
47492
+ }
47493
+ }
47494
+ }
47495
+ if (utils$1.isArray(header)) {
47496
+ header.forEach(deleteHeader);
47497
+ } else {
47498
+ deleteHeader(header);
47553
47499
  }
47500
+ return deleted;
47554
47501
  }
47555
- clear() {
47556
- if (this.handlers) {
47557
- this.handlers = [];
47502
+ clear(matcher) {
47503
+ const keys2 = Object.keys(this);
47504
+ let i = keys2.length;
47505
+ let deleted = false;
47506
+ while (i--) {
47507
+ const key = keys2[i];
47508
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
47509
+ delete this[key];
47510
+ deleted = true;
47511
+ }
47558
47512
  }
47513
+ return deleted;
47559
47514
  }
47560
- forEach(fn) {
47561
- utils$1.forEach(this.handlers, function forEachHandler(h) {
47562
- if (h !== null) {
47563
- fn(h);
47515
+ normalize(format2) {
47516
+ const self2 = this;
47517
+ const headers = {};
47518
+ utils$1.forEach(this, (value, header) => {
47519
+ const key = utils$1.findKey(headers, header);
47520
+ if (key) {
47521
+ self2[key] = normalizeValue(value);
47522
+ delete self2[header];
47523
+ return;
47524
+ }
47525
+ const normalized = format2 ? formatHeader(header) : String(header).trim();
47526
+ if (normalized !== header) {
47527
+ delete self2[header];
47564
47528
  }
47529
+ self2[normalized] = normalizeValue(value);
47530
+ headers[normalized] = true;
47565
47531
  });
47532
+ return this;
47566
47533
  }
47567
- }
47568
- var transitionalDefaults = {
47569
- silentJSONParsing: true,
47570
- forcedJSONParsing: true,
47571
- clarifyTimeoutError: false,
47572
- legacyInterceptorReqResOrdering: true
47573
- };
47574
- var URLSearchParams = url.URLSearchParams;
47575
- var ALPHA = "abcdefghijklmnopqrstuvwxyz";
47576
- var DIGIT = "0123456789";
47577
- var ALPHABET = {
47578
- DIGIT,
47579
- ALPHA,
47580
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
47581
- };
47582
- var generateString = (size2 = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
47583
- let str = "";
47584
- const {
47585
- length
47586
- } = alphabet;
47587
- const randomValues = new Uint32Array(size2);
47588
- crypto.randomFillSync(randomValues);
47589
- for (let i = 0;i < size2; i++) {
47590
- str += alphabet[randomValues[i] % length];
47534
+ concat(...targets) {
47535
+ return this.constructor.concat(this, ...targets);
47591
47536
  }
47592
- return str;
47593
- };
47594
- var platform$1 = {
47595
- isNode: true,
47596
- classes: {
47597
- URLSearchParams,
47598
- FormData: FormData$1,
47599
- Blob: typeof Blob !== "undefined" && Blob || null
47600
- },
47601
- ALPHABET,
47602
- generateString,
47603
- protocols: ["http", "https", "file", "data"]
47604
- };
47605
- var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
47606
- var _navigator = typeof navigator === "object" && navigator || undefined;
47607
- var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
47608
- var hasStandardBrowserWebWorkerEnv = (() => {
47609
- return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
47610
- })();
47611
- var origin = hasBrowserEnv && window.location.href || "http://localhost";
47612
- var utils = /* @__PURE__ */ Object.freeze({
47613
- __proto__: null,
47614
- hasBrowserEnv,
47615
- hasStandardBrowserEnv,
47616
- hasStandardBrowserWebWorkerEnv,
47617
- navigator: _navigator,
47618
- origin
47619
- });
47620
- var platform2 = {
47621
- ...utils,
47622
- ...platform$1
47623
- };
47624
- function toURLEncodedForm(data, options) {
47625
- return toFormData(data, new platform2.classes.URLSearchParams, {
47626
- visitor: function(value, key, path, helpers) {
47627
- if (platform2.isNode && utils$1.isBuffer(value)) {
47628
- this.append(key, value.toString("base64"));
47629
- return false;
47537
+ toJSON(asStrings) {
47538
+ const obj = Object.create(null);
47539
+ utils$1.forEach(this, (value, header) => {
47540
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
47541
+ });
47542
+ return obj;
47543
+ }
47544
+ [Symbol.iterator]() {
47545
+ return Object.entries(this.toJSON())[Symbol.iterator]();
47546
+ }
47547
+ toString() {
47548
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join(`
47549
+ `);
47550
+ }
47551
+ getSetCookie() {
47552
+ return this.get("set-cookie") || [];
47553
+ }
47554
+ get [Symbol.toStringTag]() {
47555
+ return "AxiosHeaders";
47556
+ }
47557
+ static from(thing) {
47558
+ return thing instanceof this ? thing : new this(thing);
47559
+ }
47560
+ static concat(first, ...targets) {
47561
+ const computed = new this(first);
47562
+ targets.forEach((target) => computed.set(target));
47563
+ return computed;
47564
+ }
47565
+ static accessor(header) {
47566
+ const internals = this[$internals] = this[$internals] = {
47567
+ accessors: {}
47568
+ };
47569
+ const accessors = internals.accessors;
47570
+ const prototype2 = this.prototype;
47571
+ function defineAccessor(_header) {
47572
+ const lHeader = normalizeHeader(_header);
47573
+ if (!accessors[lHeader]) {
47574
+ buildAccessors(prototype2, _header);
47575
+ accessors[lHeader] = true;
47630
47576
  }
47631
- return helpers.defaultVisitor.apply(this, arguments);
47632
- },
47633
- ...options
47634
- });
47635
- }
47636
- function parsePropPath(name) {
47637
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
47638
- return match[0] === "[]" ? "" : match[1] || match[0];
47639
- });
47640
- }
47641
- function arrayToObject(arr) {
47642
- const obj = {};
47643
- const keys2 = Object.keys(arr);
47644
- let i;
47645
- const len = keys2.length;
47646
- let key;
47647
- for (i = 0;i < len; i++) {
47648
- key = keys2[i];
47649
- obj[key] = arr[key];
47577
+ }
47578
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
47579
+ return this;
47650
47580
  }
47651
- return obj;
47652
47581
  }
47653
- function formDataToJSON(formData) {
47654
- function buildPath(path, value, target, index) {
47655
- let name = path[index++];
47656
- if (name === "__proto__")
47582
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
47583
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
47584
+ value
47585
+ }, key) => {
47586
+ let mapped = key[0].toUpperCase() + key.slice(1);
47587
+ return {
47588
+ get: () => value,
47589
+ set(headerValue) {
47590
+ this[mapped] = headerValue;
47591
+ }
47592
+ };
47593
+ });
47594
+ utils$1.freezeMethods(AxiosHeaders);
47595
+ var REDACTED = "[REDACTED ****]";
47596
+ function hasOwnOrPrototypeToJSON(source) {
47597
+ if (utils$1.hasOwnProp(source, "toJSON")) {
47598
+ return true;
47599
+ }
47600
+ let prototype2 = Object.getPrototypeOf(source);
47601
+ while (prototype2 && prototype2 !== Object.prototype) {
47602
+ if (utils$1.hasOwnProp(prototype2, "toJSON")) {
47657
47603
  return true;
47658
- const isNumericKey = Number.isFinite(+name);
47659
- const isLast = index >= path.length;
47660
- name = !name && utils$1.isArray(target) ? target.length : name;
47661
- if (isLast) {
47662
- if (utils$1.hasOwnProp(target, name)) {
47663
- target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
47664
- } else {
47665
- target[name] = value;
47666
- }
47667
- return !isNumericKey;
47668
47604
  }
47669
- if (!target[name] || !utils$1.isObject(target[name])) {
47670
- target[name] = [];
47605
+ prototype2 = Object.getPrototypeOf(prototype2);
47606
+ }
47607
+ return false;
47608
+ }
47609
+ function redactConfig(config, redactKeys) {
47610
+ const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
47611
+ const seen = [];
47612
+ const visit = (source) => {
47613
+ if (source === null || typeof source !== "object")
47614
+ return source;
47615
+ if (utils$1.isBuffer(source))
47616
+ return source;
47617
+ if (seen.indexOf(source) !== -1)
47618
+ return;
47619
+ if (source instanceof AxiosHeaders) {
47620
+ source = source.toJSON();
47621
+ }
47622
+ seen.push(source);
47623
+ let result2;
47624
+ if (utils$1.isArray(source)) {
47625
+ result2 = [];
47626
+ source.forEach((v, i) => {
47627
+ const reducedValue = visit(v);
47628
+ if (!utils$1.isUndefined(reducedValue)) {
47629
+ result2[i] = reducedValue;
47630
+ }
47631
+ });
47632
+ } else {
47633
+ if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
47634
+ seen.pop();
47635
+ return source;
47636
+ }
47637
+ result2 = Object.create(null);
47638
+ for (const [key, value] of Object.entries(source)) {
47639
+ const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
47640
+ if (!utils$1.isUndefined(reducedValue)) {
47641
+ result2[key] = reducedValue;
47642
+ }
47643
+ }
47671
47644
  }
47672
- const result2 = buildPath(path, value, target[name], index);
47673
- if (result2 && utils$1.isArray(target[name])) {
47674
- target[name] = arrayToObject(target[name]);
47645
+ seen.pop();
47646
+ return result2;
47647
+ };
47648
+ return visit(config);
47649
+ }
47650
+
47651
+ class AxiosError extends Error {
47652
+ static from(error, code, config, request, response, customProps) {
47653
+ const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
47654
+ axiosError.cause = error;
47655
+ axiosError.name = error.name;
47656
+ if (error.status != null && axiosError.status == null) {
47657
+ axiosError.status = error.status;
47675
47658
  }
47676
- return !isNumericKey;
47659
+ customProps && Object.assign(axiosError, customProps);
47660
+ return axiosError;
47677
47661
  }
47678
- if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
47679
- const obj = {};
47680
- utils$1.forEachEntry(formData, (name, value) => {
47681
- buildPath(parsePropPath(name), value, obj, 0);
47662
+ constructor(message, code, config, request, response) {
47663
+ super(message);
47664
+ Object.defineProperty(this, "message", {
47665
+ __proto__: null,
47666
+ value: message,
47667
+ enumerable: true,
47668
+ writable: true,
47669
+ configurable: true
47682
47670
  });
47683
- return obj;
47684
- }
47685
- return null;
47686
- }
47687
- var own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined;
47688
- function stringifySafely(rawValue, parser, encoder) {
47689
- if (utils$1.isString(rawValue)) {
47690
- try {
47691
- (parser || JSON.parse)(rawValue);
47692
- return utils$1.trim(rawValue);
47693
- } catch (e) {
47694
- if (e.name !== "SyntaxError") {
47695
- throw e;
47696
- }
47671
+ this.name = "AxiosError";
47672
+ this.isAxiosError = true;
47673
+ code && (this.code = code);
47674
+ config && (this.config = config);
47675
+ request && (this.request = request);
47676
+ if (response) {
47677
+ this.response = response;
47678
+ this.status = response.status;
47697
47679
  }
47698
47680
  }
47699
- return (encoder || JSON.stringify)(rawValue);
47681
+ toJSON() {
47682
+ const config = this.config;
47683
+ const redactKeys = config && utils$1.hasOwnProp(config, "redact") ? config.redact : undefined;
47684
+ const serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config);
47685
+ return {
47686
+ message: this.message,
47687
+ name: this.name,
47688
+ description: this.description,
47689
+ number: this.number,
47690
+ fileName: this.fileName,
47691
+ lineNumber: this.lineNumber,
47692
+ columnNumber: this.columnNumber,
47693
+ stack: this.stack,
47694
+ config: serializedConfig,
47695
+ code: this.code,
47696
+ status: this.status
47697
+ };
47698
+ }
47699
+ }
47700
+ AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
47701
+ AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
47702
+ AxiosError.ECONNABORTED = "ECONNABORTED";
47703
+ AxiosError.ETIMEDOUT = "ETIMEDOUT";
47704
+ AxiosError.ECONNREFUSED = "ECONNREFUSED";
47705
+ AxiosError.ERR_NETWORK = "ERR_NETWORK";
47706
+ AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
47707
+ AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
47708
+ AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
47709
+ AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
47710
+ AxiosError.ERR_CANCELED = "ERR_CANCELED";
47711
+ AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
47712
+ AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
47713
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
47714
+ function isVisitable(thing) {
47715
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
47716
+ }
47717
+ function removeBrackets(key) {
47718
+ return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
47719
+ }
47720
+ function renderKey(path2, key, dots) {
47721
+ if (!path2)
47722
+ return key;
47723
+ return path2.concat(key).map(function each(token, i) {
47724
+ token = removeBrackets(token);
47725
+ return !dots && i ? "[" + token + "]" : token;
47726
+ }).join(dots ? "." : "");
47727
+ }
47728
+ function isFlatArray(arr) {
47729
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
47700
47730
  }
47701
- var defaults2 = {
47702
- transitional: transitionalDefaults,
47703
- adapter: ["xhr", "http", "fetch"],
47704
- transformRequest: [function transformRequest(data, headers) {
47705
- const contentType = headers.getContentType() || "";
47706
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
47707
- const isObjectPayload = utils$1.isObject(data);
47708
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
47709
- data = new FormData(data);
47710
- }
47711
- const isFormData2 = utils$1.isFormData(data);
47712
- if (isFormData2) {
47713
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
47714
- }
47715
- if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
47716
- return data;
47717
- }
47718
- if (utils$1.isArrayBufferView(data)) {
47719
- return data.buffer;
47731
+ var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter2(prop) {
47732
+ return /^is[A-Z]/.test(prop);
47733
+ });
47734
+ function toFormData(obj, formData, options) {
47735
+ if (!utils$1.isObject(obj)) {
47736
+ throw new TypeError("target must be an object");
47737
+ }
47738
+ formData = formData || new (FormData$1 || FormData);
47739
+ options = utils$1.toFlatObject(options, {
47740
+ metaTokens: true,
47741
+ dots: false,
47742
+ indexes: false
47743
+ }, false, function defined(option, source) {
47744
+ return !utils$1.isUndefined(source[option]);
47745
+ });
47746
+ const metaTokens = options.metaTokens;
47747
+ const visitor = options.visitor || defaultVisitor;
47748
+ const dots = options.dots;
47749
+ const indexes = options.indexes;
47750
+ const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
47751
+ const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
47752
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
47753
+ if (!utils$1.isFunction(visitor)) {
47754
+ throw new TypeError("visitor must be a function");
47755
+ }
47756
+ function convertValue(value) {
47757
+ if (value === null)
47758
+ return "";
47759
+ if (utils$1.isDate(value)) {
47760
+ return value.toISOString();
47720
47761
  }
47721
- if (utils$1.isURLSearchParams(data)) {
47722
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
47723
- return data.toString();
47762
+ if (utils$1.isBoolean(value)) {
47763
+ return value.toString();
47724
47764
  }
47725
- let isFileList2;
47726
- if (isObjectPayload) {
47727
- const formSerializer = own(this, "formSerializer");
47728
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
47729
- return toURLEncodedForm(data, formSerializer).toString();
47730
- }
47731
- if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
47732
- const env3 = own(this, "env");
47733
- const _FormData = env3 && env3.FormData;
47734
- return toFormData(isFileList2 ? {
47735
- "files[]": data
47736
- } : data, _FormData && new _FormData, formSerializer);
47737
- }
47765
+ if (!useBlob && utils$1.isBlob(value)) {
47766
+ throw new AxiosError("Blob is not supported. Use a Buffer instead.");
47738
47767
  }
47739
- if (isObjectPayload || hasJSONContentType) {
47740
- headers.setContentType("application/json", false);
47741
- return stringifySafely(data);
47768
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
47769
+ return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
47742
47770
  }
47743
- return data;
47744
- }],
47745
- transformResponse: [function transformResponse(data) {
47746
- const transitional = own(this, "transitional") || defaults2.transitional;
47747
- const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
47748
- const responseType = own(this, "responseType");
47749
- const JSONRequested = responseType === "json";
47750
- if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
47751
- return data;
47771
+ return value;
47772
+ }
47773
+ function defaultVisitor(value, key, path2) {
47774
+ let arr = value;
47775
+ if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
47776
+ formData.append(renderKey(path2, key, dots), convertValue(value));
47777
+ return false;
47752
47778
  }
47753
- if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
47754
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
47755
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
47756
- try {
47757
- return JSON.parse(data, own(this, "parseReviver"));
47758
- } catch (e) {
47759
- if (strictJSONParsing) {
47760
- if (e.name === "SyntaxError") {
47761
- throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, "response"));
47762
- }
47763
- throw e;
47764
- }
47779
+ if (value && !path2 && typeof value === "object") {
47780
+ if (utils$1.endsWith(key, "{}")) {
47781
+ key = metaTokens ? key : key.slice(0, -2);
47782
+ value = JSON.stringify(value);
47783
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
47784
+ key = removeBrackets(key);
47785
+ arr.forEach(function each(el, index) {
47786
+ !(utils$1.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el));
47787
+ });
47788
+ return false;
47765
47789
  }
47766
47790
  }
47767
- return data;
47768
- }],
47769
- timeout: 0,
47770
- xsrfCookieName: "XSRF-TOKEN",
47771
- xsrfHeaderName: "X-XSRF-TOKEN",
47772
- maxContentLength: -1,
47773
- maxBodyLength: -1,
47774
- env: {
47775
- FormData: platform2.classes.FormData,
47776
- Blob: platform2.classes.Blob
47777
- },
47778
- validateStatus: function validateStatus(status) {
47779
- return status >= 200 && status < 300;
47780
- },
47781
- headers: {
47782
- common: {
47783
- Accept: "application/json, text/plain, */*",
47784
- "Content-Type": undefined
47791
+ if (isVisitable(value)) {
47792
+ return true;
47785
47793
  }
47794
+ formData.append(renderKey(path2, key, dots), convertValue(value));
47795
+ return false;
47786
47796
  }
47787
- };
47788
- utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method2) => {
47789
- defaults2.headers[method2] = {};
47790
- });
47791
- var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
47792
- var parseHeaders = (rawHeaders) => {
47793
- const parsed = {};
47794
- let key;
47795
- let val;
47796
- let i;
47797
- rawHeaders && rawHeaders.split(`
47798
- `).forEach(function parser(line) {
47799
- i = line.indexOf(":");
47800
- key = line.substring(0, i).trim().toLowerCase();
47801
- val = line.substring(i + 1).trim();
47802
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
47797
+ const stack = [];
47798
+ const exposedHelpers = Object.assign(predicates, {
47799
+ defaultVisitor,
47800
+ convertValue,
47801
+ isVisitable
47802
+ });
47803
+ function build(value, path2, depth = 0) {
47804
+ if (utils$1.isUndefined(value))
47803
47805
  return;
47806
+ if (depth > maxDepth) {
47807
+ throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
47804
47808
  }
47805
- if (key === "set-cookie") {
47806
- if (parsed[key]) {
47807
- parsed[key].push(val);
47808
- } else {
47809
- parsed[key] = [val];
47810
- }
47811
- } else {
47812
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
47813
- }
47814
- });
47815
- return parsed;
47816
- };
47817
- var $internals = Symbol("internals");
47818
- var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
47819
- function trimSPorHTAB(str) {
47820
- let start = 0;
47821
- let end = str.length;
47822
- while (start < end) {
47823
- const code = str.charCodeAt(start);
47824
- if (code !== 9 && code !== 32) {
47825
- break;
47809
+ if (stack.indexOf(value) !== -1) {
47810
+ throw Error("Circular reference detected in " + path2.join("."));
47826
47811
  }
47827
- start += 1;
47812
+ stack.push(value);
47813
+ utils$1.forEach(value, function each(el, key) {
47814
+ const result2 = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path2, exposedHelpers);
47815
+ if (result2 === true) {
47816
+ build(el, path2 ? path2.concat(key) : [key], depth + 1);
47817
+ }
47818
+ });
47819
+ stack.pop();
47828
47820
  }
47829
- while (end > start) {
47830
- const code = str.charCodeAt(end - 1);
47831
- if (code !== 9 && code !== 32) {
47832
- break;
47833
- }
47834
- end -= 1;
47821
+ if (!utils$1.isObject(obj)) {
47822
+ throw new TypeError("data must be an object");
47835
47823
  }
47836
- return start === 0 && end === str.length ? str : str.slice(start, end);
47837
- }
47838
- function normalizeHeader(header) {
47839
- return header && String(header).trim().toLowerCase();
47824
+ build(obj);
47825
+ return formData;
47840
47826
  }
47841
- function sanitizeHeaderValue(str) {
47842
- return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
47827
+ function encode$1(str) {
47828
+ const charMap = {
47829
+ "!": "%21",
47830
+ "'": "%27",
47831
+ "(": "%28",
47832
+ ")": "%29",
47833
+ "~": "%7E",
47834
+ "%20": "+"
47835
+ };
47836
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
47837
+ return charMap[match];
47838
+ });
47843
47839
  }
47844
- function normalizeValue(value) {
47845
- if (value === false || value == null) {
47846
- return value;
47847
- }
47848
- return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
47840
+ function AxiosURLSearchParams(params, options) {
47841
+ this._pairs = [];
47842
+ params && toFormData(params, this, options);
47849
47843
  }
47850
- function parseTokens(str) {
47851
- const tokens = Object.create(null);
47852
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
47853
- let match;
47854
- while (match = tokensRE.exec(str)) {
47855
- tokens[match[1]] = match[2];
47856
- }
47857
- return tokens;
47844
+ var prototype = AxiosURLSearchParams.prototype;
47845
+ prototype.append = function append(name, value) {
47846
+ this._pairs.push([name, value]);
47847
+ };
47848
+ prototype.toString = function toString3(encoder) {
47849
+ const _encode = encoder ? function(value) {
47850
+ return encoder.call(this, value, encode$1);
47851
+ } : encode$1;
47852
+ return this._pairs.map(function each(pair) {
47853
+ return _encode(pair[0]) + "=" + _encode(pair[1]);
47854
+ }, "").join("&");
47855
+ };
47856
+ function encode(val) {
47857
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
47858
47858
  }
47859
- var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
47860
- function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
47861
- if (utils$1.isFunction(filter2)) {
47862
- return filter2.call(this, value, header);
47863
- }
47864
- if (isHeaderNameFilter) {
47865
- value = header;
47866
- }
47867
- if (!utils$1.isString(value))
47868
- return;
47869
- if (utils$1.isString(filter2)) {
47870
- return value.indexOf(filter2) !== -1;
47859
+ function buildURL(url2, params, options) {
47860
+ if (!params) {
47861
+ return url2;
47871
47862
  }
47872
- if (utils$1.isRegExp(filter2)) {
47873
- return filter2.test(value);
47863
+ const _encode = options && options.encode || encode;
47864
+ const _options = utils$1.isFunction(options) ? {
47865
+ serialize: options
47866
+ } : options;
47867
+ const serializeFn = _options && _options.serialize;
47868
+ let serializedParams;
47869
+ if (serializeFn) {
47870
+ serializedParams = serializeFn(params, _options);
47871
+ } else {
47872
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
47874
47873
  }
47875
- }
47876
- function formatHeader(header) {
47877
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
47878
- return char.toUpperCase() + str;
47879
- });
47880
- }
47881
- function buildAccessors(obj, header) {
47882
- const accessorName = utils$1.toCamelCase(" " + header);
47883
- ["get", "set", "has"].forEach((methodName) => {
47884
- Object.defineProperty(obj, methodName + accessorName, {
47885
- value: function(arg1, arg2, arg3) {
47886
- return this[methodName].call(this, header, arg1, arg2, arg3);
47887
- },
47888
- configurable: true
47889
- });
47890
- });
47874
+ if (serializedParams) {
47875
+ const hashmarkIndex = url2.indexOf("#");
47876
+ if (hashmarkIndex !== -1) {
47877
+ url2 = url2.slice(0, hashmarkIndex);
47878
+ }
47879
+ url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
47880
+ }
47881
+ return url2;
47891
47882
  }
47892
47883
 
47893
- class AxiosHeaders {
47894
- constructor(headers) {
47895
- headers && this.set(headers);
47884
+ class InterceptorManager {
47885
+ constructor() {
47886
+ this.handlers = [];
47896
47887
  }
47897
- set(header, valueOrRewrite, rewrite) {
47898
- const self2 = this;
47899
- function setHeader(_value, _header, _rewrite) {
47900
- const lHeader = normalizeHeader(_header);
47901
- if (!lHeader) {
47902
- throw new Error("header name must be a non-empty string");
47903
- }
47904
- const key = utils$1.findKey(self2, lHeader);
47905
- if (!key || self2[key] === undefined || _rewrite === true || _rewrite === undefined && self2[key] !== false) {
47906
- self2[key || _header] = normalizeValue(_value);
47907
- }
47908
- }
47909
- const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
47910
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
47911
- setHeaders(header, valueOrRewrite);
47912
- } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
47913
- setHeaders(parseHeaders(header), valueOrRewrite);
47914
- } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
47915
- let obj = {}, dest, key;
47916
- for (const entry of header) {
47917
- if (!utils$1.isArray(entry)) {
47918
- throw TypeError("Object iterator must return a key-value pair");
47919
- }
47920
- obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
47921
- }
47922
- setHeaders(obj, valueOrRewrite);
47923
- } else {
47924
- header != null && setHeader(valueOrRewrite, header, rewrite);
47925
- }
47926
- return this;
47888
+ use(fulfilled, rejected, options) {
47889
+ this.handlers.push({
47890
+ fulfilled,
47891
+ rejected,
47892
+ synchronous: options ? options.synchronous : false,
47893
+ runWhen: options ? options.runWhen : null
47894
+ });
47895
+ return this.handlers.length - 1;
47927
47896
  }
47928
- get(header, parser) {
47929
- header = normalizeHeader(header);
47930
- if (header) {
47931
- const key = utils$1.findKey(this, header);
47932
- if (key) {
47933
- const value = this[key];
47934
- if (!parser) {
47935
- return value;
47936
- }
47937
- if (parser === true) {
47938
- return parseTokens(value);
47939
- }
47940
- if (utils$1.isFunction(parser)) {
47941
- return parser.call(this, value, key);
47942
- }
47943
- if (utils$1.isRegExp(parser)) {
47944
- return parser.exec(value);
47945
- }
47946
- throw new TypeError("parser must be boolean|regexp|function");
47947
- }
47897
+ eject(id) {
47898
+ if (this.handlers[id]) {
47899
+ this.handlers[id] = null;
47948
47900
  }
47949
47901
  }
47950
- has(header, matcher) {
47951
- header = normalizeHeader(header);
47952
- if (header) {
47953
- const key = utils$1.findKey(this, header);
47954
- return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
47902
+ clear() {
47903
+ if (this.handlers) {
47904
+ this.handlers = [];
47955
47905
  }
47956
- return false;
47957
47906
  }
47958
- delete(header, matcher) {
47959
- const self2 = this;
47960
- let deleted = false;
47961
- function deleteHeader(_header) {
47962
- _header = normalizeHeader(_header);
47963
- if (_header) {
47964
- const key = utils$1.findKey(self2, _header);
47965
- if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
47966
- delete self2[key];
47967
- deleted = true;
47968
- }
47907
+ forEach(fn) {
47908
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
47909
+ if (h !== null) {
47910
+ fn(h);
47969
47911
  }
47970
- }
47971
- if (utils$1.isArray(header)) {
47972
- header.forEach(deleteHeader);
47973
- } else {
47974
- deleteHeader(header);
47975
- }
47976
- return deleted;
47912
+ });
47977
47913
  }
47978
- clear(matcher) {
47979
- const keys2 = Object.keys(this);
47980
- let i = keys2.length;
47981
- let deleted = false;
47982
- while (i--) {
47983
- const key = keys2[i];
47984
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
47985
- delete this[key];
47986
- deleted = true;
47987
- }
47988
- }
47989
- return deleted;
47914
+ }
47915
+ var transitionalDefaults = {
47916
+ silentJSONParsing: true,
47917
+ forcedJSONParsing: true,
47918
+ clarifyTimeoutError: false,
47919
+ legacyInterceptorReqResOrdering: true
47920
+ };
47921
+ var URLSearchParams = url.URLSearchParams;
47922
+ var ALPHA = "abcdefghijklmnopqrstuvwxyz";
47923
+ var DIGIT = "0123456789";
47924
+ var ALPHABET = {
47925
+ DIGIT,
47926
+ ALPHA,
47927
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
47928
+ };
47929
+ var generateString = (size2 = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
47930
+ let str = "";
47931
+ const {
47932
+ length
47933
+ } = alphabet;
47934
+ const randomValues = new Uint32Array(size2);
47935
+ crypto.randomFillSync(randomValues);
47936
+ for (let i = 0;i < size2; i++) {
47937
+ str += alphabet[randomValues[i] % length];
47990
47938
  }
47991
- normalize(format2) {
47992
- const self2 = this;
47993
- const headers = {};
47994
- utils$1.forEach(this, (value, header) => {
47995
- const key = utils$1.findKey(headers, header);
47996
- if (key) {
47997
- self2[key] = normalizeValue(value);
47998
- delete self2[header];
47999
- return;
48000
- }
48001
- const normalized = format2 ? formatHeader(header) : String(header).trim();
48002
- if (normalized !== header) {
48003
- delete self2[header];
47939
+ return str;
47940
+ };
47941
+ var platform$1 = {
47942
+ isNode: true,
47943
+ classes: {
47944
+ URLSearchParams,
47945
+ FormData: FormData$1,
47946
+ Blob: typeof Blob !== "undefined" && Blob || null
47947
+ },
47948
+ ALPHABET,
47949
+ generateString,
47950
+ protocols: ["http", "https", "file", "data"]
47951
+ };
47952
+ var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
47953
+ var _navigator = typeof navigator === "object" && navigator || undefined;
47954
+ var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
47955
+ var hasStandardBrowserWebWorkerEnv = (() => {
47956
+ return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
47957
+ })();
47958
+ var origin = hasBrowserEnv && window.location.href || "http://localhost";
47959
+ var utils = /* @__PURE__ */ Object.freeze({
47960
+ __proto__: null,
47961
+ hasBrowserEnv,
47962
+ hasStandardBrowserEnv,
47963
+ hasStandardBrowserWebWorkerEnv,
47964
+ navigator: _navigator,
47965
+ origin
47966
+ });
47967
+ var platform2 = {
47968
+ ...utils,
47969
+ ...platform$1
47970
+ };
47971
+ function toURLEncodedForm(data, options) {
47972
+ return toFormData(data, new platform2.classes.URLSearchParams, {
47973
+ visitor: function(value, key, path2, helpers) {
47974
+ if (platform2.isNode && utils$1.isBuffer(value)) {
47975
+ this.append(key, value.toString("base64"));
47976
+ return false;
48004
47977
  }
48005
- self2[normalized] = normalizeValue(value);
48006
- headers[normalized] = true;
48007
- });
48008
- return this;
47978
+ return helpers.defaultVisitor.apply(this, arguments);
47979
+ },
47980
+ ...options
47981
+ });
47982
+ }
47983
+ function parsePropPath(name) {
47984
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
47985
+ return match[0] === "[]" ? "" : match[1] || match[0];
47986
+ });
47987
+ }
47988
+ function arrayToObject(arr) {
47989
+ const obj = {};
47990
+ const keys2 = Object.keys(arr);
47991
+ let i;
47992
+ const len = keys2.length;
47993
+ let key;
47994
+ for (i = 0;i < len; i++) {
47995
+ key = keys2[i];
47996
+ obj[key] = arr[key];
48009
47997
  }
48010
- concat(...targets) {
48011
- return this.constructor.concat(this, ...targets);
47998
+ return obj;
47999
+ }
48000
+ function formDataToJSON(formData) {
48001
+ function buildPath(path2, value, target, index) {
48002
+ let name = path2[index++];
48003
+ if (name === "__proto__")
48004
+ return true;
48005
+ const isNumericKey = Number.isFinite(+name);
48006
+ const isLast = index >= path2.length;
48007
+ name = !name && utils$1.isArray(target) ? target.length : name;
48008
+ if (isLast) {
48009
+ if (utils$1.hasOwnProp(target, name)) {
48010
+ target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
48011
+ } else {
48012
+ target[name] = value;
48013
+ }
48014
+ return !isNumericKey;
48015
+ }
48016
+ if (!target[name] || !utils$1.isObject(target[name])) {
48017
+ target[name] = [];
48018
+ }
48019
+ const result2 = buildPath(path2, value, target[name], index);
48020
+ if (result2 && utils$1.isArray(target[name])) {
48021
+ target[name] = arrayToObject(target[name]);
48022
+ }
48023
+ return !isNumericKey;
48012
48024
  }
48013
- toJSON(asStrings) {
48014
- const obj = Object.create(null);
48015
- utils$1.forEach(this, (value, header) => {
48016
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
48025
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
48026
+ const obj = {};
48027
+ utils$1.forEachEntry(formData, (name, value) => {
48028
+ buildPath(parsePropPath(name), value, obj, 0);
48017
48029
  });
48018
48030
  return obj;
48019
48031
  }
48020
- [Symbol.iterator]() {
48021
- return Object.entries(this.toJSON())[Symbol.iterator]();
48022
- }
48023
- toString() {
48024
- return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join(`
48025
- `);
48026
- }
48027
- getSetCookie() {
48028
- return this.get("set-cookie") || [];
48029
- }
48030
- get [Symbol.toStringTag]() {
48031
- return "AxiosHeaders";
48032
- }
48033
- static from(thing) {
48034
- return thing instanceof this ? thing : new this(thing);
48035
- }
48036
- static concat(first, ...targets) {
48037
- const computed = new this(first);
48038
- targets.forEach((target) => computed.set(target));
48039
- return computed;
48040
- }
48041
- static accessor(header) {
48042
- const internals = this[$internals] = this[$internals] = {
48043
- accessors: {}
48044
- };
48045
- const accessors = internals.accessors;
48046
- const prototype2 = this.prototype;
48047
- function defineAccessor(_header) {
48048
- const lHeader = normalizeHeader(_header);
48049
- if (!accessors[lHeader]) {
48050
- buildAccessors(prototype2, _header);
48051
- accessors[lHeader] = true;
48032
+ return null;
48033
+ }
48034
+ var own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined;
48035
+ function stringifySafely(rawValue, parser, encoder) {
48036
+ if (utils$1.isString(rawValue)) {
48037
+ try {
48038
+ (parser || JSON.parse)(rawValue);
48039
+ return utils$1.trim(rawValue);
48040
+ } catch (e) {
48041
+ if (e.name !== "SyntaxError") {
48042
+ throw e;
48052
48043
  }
48053
48044
  }
48054
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
48055
- return this;
48056
48045
  }
48046
+ return (encoder || JSON.stringify)(rawValue);
48057
48047
  }
48058
- AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
48059
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
48060
- value
48061
- }, key) => {
48062
- let mapped = key[0].toUpperCase() + key.slice(1);
48063
- return {
48064
- get: () => value,
48065
- set(headerValue) {
48066
- this[mapped] = headerValue;
48048
+ var defaults2 = {
48049
+ transitional: transitionalDefaults,
48050
+ adapter: ["xhr", "http", "fetch"],
48051
+ transformRequest: [function transformRequest(data, headers) {
48052
+ const contentType = headers.getContentType() || "";
48053
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
48054
+ const isObjectPayload = utils$1.isObject(data);
48055
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
48056
+ data = new FormData(data);
48067
48057
  }
48068
- };
48058
+ const isFormData2 = utils$1.isFormData(data);
48059
+ if (isFormData2) {
48060
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
48061
+ }
48062
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
48063
+ return data;
48064
+ }
48065
+ if (utils$1.isArrayBufferView(data)) {
48066
+ return data.buffer;
48067
+ }
48068
+ if (utils$1.isURLSearchParams(data)) {
48069
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
48070
+ return data.toString();
48071
+ }
48072
+ let isFileList2;
48073
+ if (isObjectPayload) {
48074
+ const formSerializer = own(this, "formSerializer");
48075
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
48076
+ return toURLEncodedForm(data, formSerializer).toString();
48077
+ }
48078
+ if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
48079
+ const env3 = own(this, "env");
48080
+ const _FormData = env3 && env3.FormData;
48081
+ return toFormData(isFileList2 ? {
48082
+ "files[]": data
48083
+ } : data, _FormData && new _FormData, formSerializer);
48084
+ }
48085
+ }
48086
+ if (isObjectPayload || hasJSONContentType) {
48087
+ headers.setContentType("application/json", false);
48088
+ return stringifySafely(data);
48089
+ }
48090
+ return data;
48091
+ }],
48092
+ transformResponse: [function transformResponse(data) {
48093
+ const transitional = own(this, "transitional") || defaults2.transitional;
48094
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
48095
+ const responseType = own(this, "responseType");
48096
+ const JSONRequested = responseType === "json";
48097
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
48098
+ return data;
48099
+ }
48100
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
48101
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
48102
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
48103
+ try {
48104
+ return JSON.parse(data, own(this, "parseReviver"));
48105
+ } catch (e) {
48106
+ if (strictJSONParsing) {
48107
+ if (e.name === "SyntaxError") {
48108
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, "response"));
48109
+ }
48110
+ throw e;
48111
+ }
48112
+ }
48113
+ }
48114
+ return data;
48115
+ }],
48116
+ timeout: 0,
48117
+ xsrfCookieName: "XSRF-TOKEN",
48118
+ xsrfHeaderName: "X-XSRF-TOKEN",
48119
+ maxContentLength: -1,
48120
+ maxBodyLength: -1,
48121
+ env: {
48122
+ FormData: platform2.classes.FormData,
48123
+ Blob: platform2.classes.Blob
48124
+ },
48125
+ validateStatus: function validateStatus(status) {
48126
+ return status >= 200 && status < 300;
48127
+ },
48128
+ headers: {
48129
+ common: {
48130
+ Accept: "application/json, text/plain, */*",
48131
+ "Content-Type": undefined
48132
+ }
48133
+ }
48134
+ };
48135
+ utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method2) => {
48136
+ defaults2.headers[method2] = {};
48069
48137
  });
48070
- utils$1.freezeMethods(AxiosHeaders);
48071
48138
  function transformData(fns, response) {
48072
48139
  const config = this || defaults2;
48073
48140
  const context = response || config;
@@ -48095,7 +48162,7 @@ var require_axios = __commonJS((exports, module) => {
48095
48162
  if (!response.status || !validateStatus || validateStatus(response.status)) {
48096
48163
  resolve(response);
48097
48164
  } else {
48098
- reject2(new AxiosError("Request failed with status code " + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
48165
+ reject2(new AxiosError("Request failed with status code " + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response));
48099
48166
  }
48100
48167
  }
48101
48168
  function isAbsoluteURL(url2) {
@@ -48179,9 +48246,9 @@ var require_axios = __commonJS((exports, module) => {
48179
48246
  function getEnv(key) {
48180
48247
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
48181
48248
  }
48182
- var VERSION2 = "1.15.1";
48249
+ var VERSION2 = "1.16.0";
48183
48250
  function parseProtocol(url2) {
48184
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
48251
+ const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
48185
48252
  return match && match[1] || "";
48186
48253
  }
48187
48254
  var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
@@ -48395,7 +48462,7 @@ var require_axios = __commonJS((exports, module) => {
48395
48462
  throw TypeError("FormData instance required");
48396
48463
  }
48397
48464
  if (boundary.length < 1 || boundary.length > 70) {
48398
- throw Error("boundary must be 10-70 characters long");
48465
+ throw Error("boundary must be 1-70 characters long");
48399
48466
  }
48400
48467
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
48401
48468
  const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
@@ -48521,6 +48588,22 @@ var require_axios = __commonJS((exports, module) => {
48521
48588
  }
48522
48589
  return [entryHost, entryPort];
48523
48590
  };
48591
+ var IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
48592
+ var IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
48593
+ var unmapIPv4MappedIPv6 = (host) => {
48594
+ if (typeof host !== "string" || host.indexOf(":") === -1)
48595
+ return host;
48596
+ const dotted = host.match(IPV4_MAPPED_DOTTED_RE);
48597
+ if (dotted)
48598
+ return dotted[1];
48599
+ const hex = host.match(IPV4_MAPPED_HEX_RE);
48600
+ if (hex) {
48601
+ const high = parseInt(hex[1], 16);
48602
+ const low = parseInt(hex[2], 16);
48603
+ return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
48604
+ }
48605
+ return host;
48606
+ };
48524
48607
  var normalizeNoProxyHost = (hostname) => {
48525
48608
  if (!hostname) {
48526
48609
  return hostname;
@@ -48528,7 +48611,7 @@ var require_axios = __commonJS((exports, module) => {
48528
48611
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
48529
48612
  hostname = hostname.slice(1, -1);
48530
48613
  }
48531
- return hostname.replace(/\.+$/, "");
48614
+ return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
48532
48615
  };
48533
48616
  function shouldBypassProxy(location) {
48534
48617
  let parsed;
@@ -48710,10 +48793,32 @@ var require_axios = __commonJS((exports, module) => {
48710
48793
  }
48711
48794
  }
48712
48795
  const groups = Math.floor(effectiveLen / 4);
48713
- const bytes = groups * 3 - (pad2 || 0);
48714
- return bytes > 0 ? bytes : 0;
48796
+ const bytes2 = groups * 3 - (pad2 || 0);
48797
+ return bytes2 > 0 ? bytes2 : 0;
48715
48798
  }
48716
- return Buffer.byteLength(body, "utf8");
48799
+ if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
48800
+ return Buffer.byteLength(body, "utf8");
48801
+ }
48802
+ let bytes = 0;
48803
+ for (let i = 0, len = body.length;i < len; i++) {
48804
+ const c = body.charCodeAt(i);
48805
+ if (c < 128) {
48806
+ bytes += 1;
48807
+ } else if (c < 2048) {
48808
+ bytes += 2;
48809
+ } else if (c >= 55296 && c <= 56319 && i + 1 < len) {
48810
+ const next = body.charCodeAt(i + 1);
48811
+ if (next >= 56320 && next <= 57343) {
48812
+ bytes += 4;
48813
+ i++;
48814
+ } else {
48815
+ bytes += 3;
48816
+ }
48817
+ } else {
48818
+ bytes += 3;
48819
+ }
48820
+ }
48821
+ return bytes;
48717
48822
  }
48718
48823
  var zlibOptions = {
48719
48824
  flush: zlib.constants.Z_SYNC_FLUSH,
@@ -48729,9 +48834,33 @@ var require_axios = __commonJS((exports, module) => {
48729
48834
  https: httpsFollow
48730
48835
  } = followRedirects;
48731
48836
  var isHttps = /https:?/;
48837
+ var FORM_DATA_CONTENT_HEADERS$1 = ["content-type", "content-length"];
48838
+ function setFormDataHeaders$1(headers, formHeaders, policy) {
48839
+ if (policy !== "content-only") {
48840
+ headers.set(formHeaders);
48841
+ return;
48842
+ }
48843
+ Object.entries(formHeaders).forEach(([key, val]) => {
48844
+ if (FORM_DATA_CONTENT_HEADERS$1.includes(key.toLowerCase())) {
48845
+ headers.set(key, val);
48846
+ }
48847
+ });
48848
+ }
48849
+ var kAxiosSocketListener = Symbol("axios.http.socketListener");
48850
+ var kAxiosCurrentReq = Symbol("axios.http.currentReq");
48732
48851
  var supportedProtocols = platform2.protocols.map((protocol) => {
48733
48852
  return protocol + ":";
48734
48853
  });
48854
+ var decodeURIComponentSafe = (value) => {
48855
+ if (!utils$1.isString(value)) {
48856
+ return value;
48857
+ }
48858
+ try {
48859
+ return decodeURIComponent(value);
48860
+ } catch (error) {
48861
+ return value;
48862
+ }
48863
+ };
48735
48864
  var flushOnFinish = (stream2, [throttled, flush]) => {
48736
48865
  stream2.on("end", flush).on("error", flush);
48737
48866
  return throttled;
@@ -48809,15 +48938,15 @@ var require_axios = __commonJS((exports, module) => {
48809
48938
  }
48810
48939
  }
48811
48940
  var http2Sessions = new Http2Sessions;
48812
- function dispatchBeforeRedirect(options, responseDetails) {
48941
+ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
48813
48942
  if (options.beforeRedirects.proxy) {
48814
48943
  options.beforeRedirects.proxy(options);
48815
48944
  }
48816
48945
  if (options.beforeRedirects.config) {
48817
- options.beforeRedirects.config(options, responseDetails);
48946
+ options.beforeRedirects.config(options, responseDetails, requestDetails);
48818
48947
  }
48819
48948
  }
48820
- function setProxy(options, configProxy, location) {
48949
+ function setProxy(options, configProxy, location, isRedirect) {
48821
48950
  let proxy = configProxy;
48822
48951
  if (!proxy && proxy !== false) {
48823
48952
  const proxyUrl = getProxyForUrl(location);
@@ -48827,34 +48956,59 @@ var require_axios = __commonJS((exports, module) => {
48827
48956
  }
48828
48957
  }
48829
48958
  }
48830
- if (proxy) {
48831
- if (proxy.username) {
48832
- proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
48959
+ if (isRedirect && options.headers) {
48960
+ for (const name of Object.keys(options.headers)) {
48961
+ if (name.toLowerCase() === "proxy-authorization") {
48962
+ delete options.headers[name];
48963
+ }
48833
48964
  }
48834
- if (proxy.auth) {
48835
- const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password);
48965
+ }
48966
+ if (proxy) {
48967
+ const isProxyURL = proxy instanceof URL;
48968
+ const readProxyField = (key) => isProxyURL || utils$1.hasOwnProp(proxy, key) ? proxy[key] : undefined;
48969
+ const proxyUsername = readProxyField("username");
48970
+ const proxyPassword = readProxyField("password");
48971
+ let proxyAuth = utils$1.hasOwnProp(proxy, "auth") ? proxy.auth : undefined;
48972
+ if (proxyUsername) {
48973
+ proxyAuth = (proxyUsername || "") + ":" + (proxyPassword || "");
48974
+ }
48975
+ if (proxyAuth) {
48976
+ const authIsObject = typeof proxyAuth === "object";
48977
+ const authUsername = authIsObject && utils$1.hasOwnProp(proxyAuth, "username") ? proxyAuth.username : undefined;
48978
+ const authPassword = authIsObject && utils$1.hasOwnProp(proxyAuth, "password") ? proxyAuth.password : undefined;
48979
+ const validProxyAuth = Boolean(authUsername || authPassword);
48836
48980
  if (validProxyAuth) {
48837
- proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
48838
- } else if (typeof proxy.auth === "object") {
48981
+ proxyAuth = (authUsername || "") + ":" + (authPassword || "");
48982
+ } else if (authIsObject) {
48839
48983
  throw new AxiosError("Invalid proxy authorization", AxiosError.ERR_BAD_OPTION, {
48840
48984
  proxy
48841
48985
  });
48842
48986
  }
48843
- const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
48987
+ const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
48844
48988
  options.headers["Proxy-Authorization"] = "Basic " + base64;
48845
48989
  }
48846
- options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
48847
- const proxyHost = proxy.hostname || proxy.host;
48990
+ let hasUserHostHeader = false;
48991
+ for (const name of Object.keys(options.headers)) {
48992
+ if (name.toLowerCase() === "host") {
48993
+ hasUserHostHeader = true;
48994
+ break;
48995
+ }
48996
+ }
48997
+ if (!hasUserHostHeader) {
48998
+ options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
48999
+ }
49000
+ const proxyHost = readProxyField("hostname") || readProxyField("host");
48848
49001
  options.hostname = proxyHost;
48849
49002
  options.host = proxyHost;
48850
- options.port = proxy.port;
49003
+ options.port = readProxyField("port");
48851
49004
  options.path = location;
48852
- if (proxy.protocol) {
48853
- options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
49005
+ const proxyProtocol = readProxyField("protocol");
49006
+ if (proxyProtocol) {
49007
+ options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
48854
49008
  }
48855
49009
  }
48856
49010
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
48857
- setProxy(redirectOptions, configProxy, redirectOptions.href);
49011
+ setProxy(redirectOptions, configProxy, redirectOptions.href, true);
48858
49012
  };
48859
49013
  }
48860
49014
  var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
@@ -48946,6 +49100,7 @@ var require_axios = __commonJS((exports, module) => {
48946
49100
  let isDone;
48947
49101
  let rejected = false;
48948
49102
  let req;
49103
+ let connectPhaseTimer;
48949
49104
  httpVersion = +httpVersion;
48950
49105
  if (Number.isNaN(httpVersion)) {
48951
49106
  throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
@@ -48974,8 +49129,23 @@ var require_axios = __commonJS((exports, module) => {
48974
49129
  console.warn("emit error", err);
48975
49130
  }
48976
49131
  }
49132
+ function clearConnectPhaseTimer() {
49133
+ if (connectPhaseTimer) {
49134
+ clearTimeout(connectPhaseTimer);
49135
+ connectPhaseTimer = null;
49136
+ }
49137
+ }
49138
+ function createTimeoutError() {
49139
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
49140
+ const transitional = config.transitional || transitionalDefaults;
49141
+ if (config.timeoutErrorMessage) {
49142
+ timeoutErrorMessage = config.timeoutErrorMessage;
49143
+ }
49144
+ return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
49145
+ }
48977
49146
  abortEmitter.once("abort", reject2);
48978
49147
  const onFinished = () => {
49148
+ clearConnectPhaseTimer();
48979
49149
  if (config.cancelToken) {
48980
49150
  config.cancelToken.unsubscribe(abort);
48981
49151
  }
@@ -48992,6 +49162,7 @@ var require_axios = __commonJS((exports, module) => {
48992
49162
  }
48993
49163
  onDone((response, isRejected) => {
48994
49164
  isDone = true;
49165
+ clearConnectPhaseTimer();
48995
49166
  if (isRejected) {
48996
49167
  rejected = true;
48997
49168
  onFinished();
@@ -49073,7 +49244,7 @@ var require_axios = __commonJS((exports, module) => {
49073
49244
  boundary: userBoundary && userBoundary[1] || undefined
49074
49245
  });
49075
49246
  } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
49076
- headers.set(data.getHeaders());
49247
+ setFormDataHeaders$1(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
49077
49248
  if (!headers.hasContentLength()) {
49078
49249
  try {
49079
49250
  const knownLength = await util3.promisify(data.getLength).call(data);
@@ -49118,20 +49289,21 @@ var require_axios = __commonJS((exports, module) => {
49118
49289
  onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
49119
49290
  }
49120
49291
  let auth = undefined;
49121
- if (config.auth) {
49122
- const username = config.auth.username || "";
49123
- const password = config.auth.password || "";
49292
+ const configAuth = own2("auth");
49293
+ if (configAuth) {
49294
+ const username = configAuth.username || "";
49295
+ const password = configAuth.password || "";
49124
49296
  auth = username + ":" + password;
49125
49297
  }
49126
49298
  if (!auth && parsed.username) {
49127
- const urlUsername = parsed.username;
49128
- const urlPassword = parsed.password;
49299
+ const urlUsername = decodeURIComponentSafe(parsed.username);
49300
+ const urlPassword = decodeURIComponentSafe(parsed.password);
49129
49301
  auth = urlUsername + ":" + urlPassword;
49130
49302
  }
49131
49303
  auth && headers.delete("authorization");
49132
- let path;
49304
+ let path$1;
49133
49305
  try {
49134
- path = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
49306
+ path$1 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
49135
49307
  } catch (err) {
49136
49308
  const customErr = new Error(err.message);
49137
49309
  customErr.config = config;
@@ -49140,8 +49312,8 @@ var require_axios = __commonJS((exports, module) => {
49140
49312
  return reject2(customErr);
49141
49313
  }
49142
49314
  headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
49143
- const options = {
49144
- path,
49315
+ const options = Object.assign(Object.create(null), {
49316
+ path: path$1,
49145
49317
  method: method2,
49146
49318
  headers: headers.toJSON(),
49147
49319
  agents: {
@@ -49152,11 +49324,22 @@ var require_axios = __commonJS((exports, module) => {
49152
49324
  protocol,
49153
49325
  family,
49154
49326
  beforeRedirect: dispatchBeforeRedirect,
49155
- beforeRedirects: {},
49327
+ beforeRedirects: Object.create(null),
49156
49328
  http2Options
49157
- };
49329
+ });
49158
49330
  !utils$1.isUndefined(lookup) && (options.lookup = lookup);
49159
49331
  if (config.socketPath) {
49332
+ if (typeof config.socketPath !== "string") {
49333
+ return reject2(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
49334
+ }
49335
+ if (config.allowedSocketPaths != null) {
49336
+ const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
49337
+ const resolvedSocket = path.resolve(config.socketPath);
49338
+ const isAllowed = allowed.some((entry) => typeof entry === "string" && path.resolve(entry) === resolvedSocket);
49339
+ if (!isAllowed) {
49340
+ return reject2(new AxiosError(`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
49341
+ }
49342
+ }
49160
49343
  options.socketPath = config.socketPath;
49161
49344
  } else {
49162
49345
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
@@ -49164,6 +49347,7 @@ var require_axios = __commonJS((exports, module) => {
49164
49347
  setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
49165
49348
  }
49166
49349
  let transport;
49350
+ let isNativeTransport = false;
49167
49351
  const isHttpsRequest = isHttps.test(options.protocol);
49168
49352
  options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
49169
49353
  if (isHttp2) {
@@ -49174,12 +49358,14 @@ var require_axios = __commonJS((exports, module) => {
49174
49358
  transport = configTransport;
49175
49359
  } else if (config.maxRedirects === 0) {
49176
49360
  transport = isHttpsRequest ? https : http;
49361
+ isNativeTransport = true;
49177
49362
  } else {
49178
49363
  if (config.maxRedirects) {
49179
49364
  options.maxRedirects = config.maxRedirects;
49180
49365
  }
49181
- if (config.beforeRedirect) {
49182
- options.beforeRedirects.config = config.beforeRedirect;
49366
+ const configBeforeRedirect = own2("beforeRedirect");
49367
+ if (configBeforeRedirect) {
49368
+ options.beforeRedirects.config = configBeforeRedirect;
49183
49369
  }
49184
49370
  transport = isHttpsRequest ? httpsFollow : httpFollow;
49185
49371
  }
@@ -49189,10 +49375,9 @@ var require_axios = __commonJS((exports, module) => {
49189
49375
  } else {
49190
49376
  options.maxBodyLength = Infinity;
49191
49377
  }
49192
- if (config.insecureHTTPParser) {
49193
- options.insecureHTTPParser = config.insecureHTTPParser;
49194
- }
49378
+ options.insecureHTTPParser = Boolean(own2("insecureHTTPParser"));
49195
49379
  req = transport.request(options, function handleResponse(res) {
49380
+ clearConnectPhaseTimer();
49196
49381
  if (req.destroyed)
49197
49382
  return;
49198
49383
  const streams = [res];
@@ -49274,14 +49459,14 @@ var require_axios = __commonJS((exports, module) => {
49274
49459
  if (rejected) {
49275
49460
  return;
49276
49461
  }
49277
- const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
49462
+ const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest, response);
49278
49463
  responseStream.destroy(err);
49279
49464
  reject2(err);
49280
49465
  });
49281
49466
  responseStream.on("error", function handleStreamError(err) {
49282
- if (req.destroyed)
49467
+ if (rejected)
49283
49468
  return;
49284
- reject2(AxiosError.from(err, null, config, lastRequest));
49469
+ reject2(AxiosError.from(err, null, config, lastRequest, response));
49285
49470
  });
49286
49471
  responseStream.on("end", function handleStreamEnd() {
49287
49472
  try {
@@ -49316,19 +49501,29 @@ var require_axios = __commonJS((exports, module) => {
49316
49501
  req.on("error", function handleRequestError(err) {
49317
49502
  reject2(AxiosError.from(err, null, config, req));
49318
49503
  });
49504
+ const boundSockets = new Set;
49319
49505
  req.on("socket", function handleRequestSocket(socket) {
49320
49506
  socket.setKeepAlive(true, 1000 * 60);
49321
- const removeSocketErrorListener = () => {
49322
- socket.removeListener("error", handleRequestSocketError);
49323
- };
49324
- function handleRequestSocketError(err) {
49325
- removeSocketErrorListener();
49326
- if (!req.destroyed) {
49327
- req.destroy(err);
49507
+ if (!socket[kAxiosSocketListener]) {
49508
+ socket.on("error", function handleSocketError(err) {
49509
+ const current = socket[kAxiosCurrentReq];
49510
+ if (current && !current.destroyed) {
49511
+ current.destroy(err);
49512
+ }
49513
+ });
49514
+ socket[kAxiosSocketListener] = true;
49515
+ }
49516
+ socket[kAxiosCurrentReq] = req;
49517
+ boundSockets.add(socket);
49518
+ });
49519
+ req.once("close", function clearCurrentReq() {
49520
+ clearConnectPhaseTimer();
49521
+ for (const socket of boundSockets) {
49522
+ if (socket[kAxiosCurrentReq] === req) {
49523
+ socket[kAxiosCurrentReq] = null;
49328
49524
  }
49329
49525
  }
49330
- socket.on("error", handleRequestSocketError);
49331
- req.once("close", removeSocketErrorListener);
49526
+ boundSockets.clear();
49332
49527
  });
49333
49528
  if (config.timeout) {
49334
49529
  const timeout = parseInt(config.timeout, 10);
@@ -49336,16 +49531,15 @@ var require_axios = __commonJS((exports, module) => {
49336
49531
  abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
49337
49532
  return;
49338
49533
  }
49339
- req.setTimeout(timeout, function handleRequestTimeout() {
49534
+ const handleTimeout = function handleTimeout2() {
49340
49535
  if (isDone)
49341
49536
  return;
49342
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
49343
- const transitional = config.transitional || transitionalDefaults;
49344
- if (config.timeoutErrorMessage) {
49345
- timeoutErrorMessage = config.timeoutErrorMessage;
49346
- }
49347
- abort(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req));
49348
- });
49537
+ abort(createTimeoutError());
49538
+ };
49539
+ if (isNativeTransport && timeout > 0) {
49540
+ connectPhaseTimer = setTimeout(handleTimeout, timeout);
49541
+ }
49542
+ req.setTimeout(timeout, handleTimeout);
49349
49543
  } else {
49350
49544
  req.setTimeout(0);
49351
49545
  }
@@ -49394,15 +49588,15 @@ var require_axios = __commonJS((exports, module) => {
49394
49588
  return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
49395
49589
  })(new URL(platform2.origin), platform2.navigator && /(msie|trident)/i.test(platform2.navigator.userAgent)) : () => true;
49396
49590
  var cookies = platform2.hasStandardBrowserEnv ? {
49397
- write(name, value, expires, path, domain, secure, sameSite) {
49591
+ write(name, value, expires, path2, domain, secure, sameSite) {
49398
49592
  if (typeof document === "undefined")
49399
49593
  return;
49400
49594
  const cookie = [`${name}=${encodeURIComponent(value)}`];
49401
49595
  if (utils$1.isNumber(expires)) {
49402
49596
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
49403
49597
  }
49404
- if (utils$1.isString(path)) {
49405
- cookie.push(`path=${path}`);
49598
+ if (utils$1.isString(path2)) {
49599
+ cookie.push(`path=${path2}`);
49406
49600
  }
49407
49601
  if (utils$1.isString(domain)) {
49408
49602
  cookie.push(`domain=${domain}`);
@@ -49418,8 +49612,15 @@ var require_axios = __commonJS((exports, module) => {
49418
49612
  read(name) {
49419
49613
  if (typeof document === "undefined")
49420
49614
  return null;
49421
- const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
49422
- return match ? decodeURIComponent(match[1]) : null;
49615
+ const cookies2 = document.cookie.split(";");
49616
+ for (let i = 0;i < cookies2.length; i++) {
49617
+ const cookie = cookies2[i].replace(/^\s+/, "");
49618
+ const eq = cookie.indexOf("=");
49619
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
49620
+ return decodeURIComponent(cookie.slice(eq + 1));
49621
+ }
49622
+ }
49623
+ return null;
49423
49624
  },
49424
49625
  remove(name) {
49425
49626
  this.write(name, "", Date.now() - 86400000, "/");
@@ -49436,7 +49637,14 @@ var require_axios = __commonJS((exports, module) => {
49436
49637
  } : thing;
49437
49638
  function mergeConfig(config1, config2) {
49438
49639
  config2 = config2 || {};
49439
- const config = {};
49640
+ const config = Object.create(null);
49641
+ Object.defineProperty(config, "hasOwnProperty", {
49642
+ __proto__: null,
49643
+ value: Object.prototype.hasOwnProperty,
49644
+ enumerable: false,
49645
+ writable: true,
49646
+ configurable: true
49647
+ });
49440
49648
  function getMergedValue(target, source, prop, caseless) {
49441
49649
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
49442
49650
  return utils$1.merge.call({
@@ -49502,6 +49710,7 @@ var require_axios = __commonJS((exports, module) => {
49502
49710
  httpsAgent: defaultToConfig2,
49503
49711
  cancelToken: defaultToConfig2,
49504
49712
  socketPath: defaultToConfig2,
49713
+ allowedSocketPaths: defaultToConfig2,
49505
49714
  responseEncoding: defaultToConfig2,
49506
49715
  validateStatus: mergeDirectKeys,
49507
49716
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
@@ -49520,32 +49729,41 @@ var require_axios = __commonJS((exports, module) => {
49520
49729
  });
49521
49730
  return config;
49522
49731
  }
49732
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
49733
+ function setFormDataHeaders(headers, formHeaders, policy) {
49734
+ if (policy !== "content-only") {
49735
+ headers.set(formHeaders);
49736
+ return;
49737
+ }
49738
+ Object.entries(formHeaders).forEach(([key, val]) => {
49739
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
49740
+ headers.set(key, val);
49741
+ }
49742
+ });
49743
+ }
49744
+ var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
49523
49745
  var resolveConfig = (config) => {
49524
49746
  const newConfig = mergeConfig({}, config);
49525
- let {
49526
- data,
49527
- withXSRFToken,
49528
- xsrfHeaderName,
49529
- xsrfCookieName,
49530
- headers,
49531
- auth
49532
- } = newConfig;
49747
+ const own2 = (key) => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : undefined;
49748
+ const data = own2("data");
49749
+ let withXSRFToken = own2("withXSRFToken");
49750
+ const xsrfHeaderName = own2("xsrfHeaderName");
49751
+ const xsrfCookieName = own2("xsrfCookieName");
49752
+ let headers = own2("headers");
49753
+ const auth = own2("auth");
49754
+ const baseURL = own2("baseURL");
49755
+ const allowAbsoluteUrls = own2("allowAbsoluteUrls");
49756
+ const url2 = own2("url");
49533
49757
  newConfig.headers = headers = AxiosHeaders.from(headers);
49534
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
49758
+ newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls), config.params, config.paramsSerializer);
49535
49759
  if (auth) {
49536
- headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
49760
+ headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : "")));
49537
49761
  }
49538
49762
  if (utils$1.isFormData(data)) {
49539
49763
  if (platform2.hasStandardBrowserEnv || platform2.hasStandardBrowserWebWorkerEnv) {
49540
49764
  headers.setContentType(undefined);
49541
49765
  } else if (utils$1.isFunction(data.getHeaders)) {
49542
- const formHeaders = data.getHeaders();
49543
- const allowedHeaders = ["content-type", "content-length"];
49544
- Object.entries(formHeaders).forEach(([key, val]) => {
49545
- if (allowedHeaders.includes(key.toLowerCase())) {
49546
- headers.set(key, val);
49547
- }
49548
- });
49766
+ setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
49549
49767
  }
49550
49768
  }
49551
49769
  if (platform2.hasStandardBrowserEnv) {
@@ -49615,7 +49833,7 @@ var require_axios = __commonJS((exports, module) => {
49615
49833
  if (!request || request.readyState !== 4) {
49616
49834
  return;
49617
49835
  }
49618
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
49836
+ if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
49619
49837
  return;
49620
49838
  }
49621
49839
  setTimeout(onloadend);
@@ -49626,6 +49844,7 @@ var require_axios = __commonJS((exports, module) => {
49626
49844
  return;
49627
49845
  }
49628
49846
  reject2(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
49847
+ done();
49629
49848
  request = null;
49630
49849
  };
49631
49850
  request.onerror = function handleError(event) {
@@ -49633,6 +49852,7 @@ var require_axios = __commonJS((exports, module) => {
49633
49852
  const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
49634
49853
  err.event = event || null;
49635
49854
  reject2(err);
49855
+ done();
49636
49856
  request = null;
49637
49857
  };
49638
49858
  request.ontimeout = function handleTimeout() {
@@ -49642,6 +49862,7 @@ var require_axios = __commonJS((exports, module) => {
49642
49862
  timeoutErrorMessage = _config.timeoutErrorMessage;
49643
49863
  }
49644
49864
  reject2(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
49865
+ done();
49645
49866
  request = null;
49646
49867
  };
49647
49868
  requestData === undefined && requestHeaders.setContentType(null);
@@ -49672,6 +49893,7 @@ var require_axios = __commonJS((exports, module) => {
49672
49893
  }
49673
49894
  reject2(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
49674
49895
  request.abort();
49896
+ done();
49675
49897
  request = null;
49676
49898
  };
49677
49899
  _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
@@ -49680,7 +49902,7 @@ var require_axios = __commonJS((exports, module) => {
49680
49902
  }
49681
49903
  }
49682
49904
  const protocol = parseProtocol(_config.url);
49683
- if (protocol && platform2.protocols.indexOf(protocol) === -1) {
49905
+ if (protocol && !platform2.protocols.includes(protocol)) {
49684
49906
  reject2(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
49685
49907
  return;
49686
49908
  }
@@ -49809,17 +50031,6 @@ var require_axios = __commonJS((exports, module) => {
49809
50031
  var {
49810
50032
  isFunction: isFunction2
49811
50033
  } = utils$1;
49812
- var globalFetchAPI = (({
49813
- Request,
49814
- Response: Response2
49815
- }) => ({
49816
- Request,
49817
- Response: Response2
49818
- }))(utils$1.global);
49819
- var {
49820
- ReadableStream: ReadableStream$1,
49821
- TextEncoder: TextEncoder$1
49822
- } = utils$1.global;
49823
50034
  var test = (fn, ...args) => {
49824
50035
  try {
49825
50036
  return !!fn(...args);
@@ -49828,9 +50039,18 @@ var require_axios = __commonJS((exports, module) => {
49828
50039
  }
49829
50040
  };
49830
50041
  var factory = (env3) => {
50042
+ var _utils$global;
50043
+ const globalObject = (_utils$global = utils$1.global) !== null && _utils$global !== undefined ? _utils$global : globalThis;
50044
+ const {
50045
+ ReadableStream: ReadableStream2,
50046
+ TextEncoder: TextEncoder2
50047
+ } = globalObject;
49831
50048
  env3 = utils$1.merge.call({
49832
50049
  skipUndefined: true
49833
- }, globalFetchAPI, env3);
50050
+ }, {
50051
+ Request: globalObject.Request,
50052
+ Response: globalObject.Response
50053
+ }, env3);
49834
50054
  const {
49835
50055
  fetch: envFetch,
49836
50056
  Request,
@@ -49842,12 +50062,12 @@ var require_axios = __commonJS((exports, module) => {
49842
50062
  if (!isFetchSupported) {
49843
50063
  return false;
49844
50064
  }
49845
- const isReadableStreamSupported = isFetchSupported && isFunction2(ReadableStream$1);
49846
- const encodeText = isFetchSupported && (typeof TextEncoder$1 === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
50065
+ const isReadableStreamSupported = isFetchSupported && isFunction2(ReadableStream2);
50066
+ const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder2) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
49847
50067
  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
49848
50068
  let duplexAccessed = false;
49849
50069
  const request = new Request(platform2.origin, {
49850
- body: new ReadableStream$1,
50070
+ body: new ReadableStream2,
49851
50071
  method: "POST",
49852
50072
  get duplex() {
49853
50073
  duplexAccessed = true;
@@ -49916,8 +50136,12 @@ var require_axios = __commonJS((exports, module) => {
49916
50136
  responseType,
49917
50137
  headers,
49918
50138
  withCredentials = "same-origin",
49919
- fetchOptions
50139
+ fetchOptions,
50140
+ maxContentLength,
50141
+ maxBodyLength
49920
50142
  } = resolveConfig(config);
50143
+ const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
50144
+ const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
49921
50145
  let _fetch = envFetch || fetch;
49922
50146
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
49923
50147
  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
@@ -49927,6 +50151,18 @@ var require_axios = __commonJS((exports, module) => {
49927
50151
  });
49928
50152
  let requestContentLength;
49929
50153
  try {
50154
+ if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
50155
+ const estimated = estimateDataURLDecodedBytes(url2);
50156
+ if (estimated > maxContentLength) {
50157
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
50158
+ }
50159
+ }
50160
+ if (hasMaxBodyLength && method2 !== "get" && method2 !== "head") {
50161
+ const outboundLength = await resolveBodyLength(headers, data);
50162
+ if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
50163
+ throw new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
50164
+ }
50165
+ }
49930
50166
  if (onUploadProgress && supportsRequestStream && method2 !== "get" && method2 !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
49931
50167
  let _request = new Request(url2, {
49932
50168
  method: "POST",
@@ -49952,6 +50188,7 @@ var require_axios = __commonJS((exports, module) => {
49952
50188
  headers.delete("content-type");
49953
50189
  }
49954
50190
  }
50191
+ headers.set("User-Agent", "axios/" + VERSION2, false);
49955
50192
  const resolvedOptions = {
49956
50193
  ...fetchOptions,
49957
50194
  signal: composedSignal,
@@ -49963,21 +50200,52 @@ var require_axios = __commonJS((exports, module) => {
49963
50200
  };
49964
50201
  request = isRequestSupported && new Request(url2, resolvedOptions);
49965
50202
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
50203
+ if (hasMaxContentLength) {
50204
+ const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
50205
+ if (declaredLength != null && declaredLength > maxContentLength) {
50206
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
50207
+ }
50208
+ }
49966
50209
  const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
49967
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
50210
+ if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
49968
50211
  const options = {};
49969
50212
  ["status", "statusText", "headers"].forEach((prop) => {
49970
50213
  options[prop] = response[prop];
49971
50214
  });
49972
50215
  const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
49973
50216
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
49974
- response = new Response2(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
50217
+ let bytesRead = 0;
50218
+ const onChunkProgress = (loadedBytes) => {
50219
+ if (hasMaxContentLength) {
50220
+ bytesRead = loadedBytes;
50221
+ if (bytesRead > maxContentLength) {
50222
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
50223
+ }
50224
+ }
50225
+ onProgress && onProgress(loadedBytes);
50226
+ };
50227
+ response = new Response2(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
49975
50228
  flush && flush();
49976
50229
  unsubscribe && unsubscribe();
49977
50230
  }), options);
49978
50231
  }
49979
50232
  responseType = responseType || "text";
49980
50233
  let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
50234
+ if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
50235
+ let materializedSize;
50236
+ if (responseData != null) {
50237
+ if (typeof responseData.byteLength === "number") {
50238
+ materializedSize = responseData.byteLength;
50239
+ } else if (typeof responseData.size === "number") {
50240
+ materializedSize = responseData.size;
50241
+ } else if (typeof responseData === "string") {
50242
+ materializedSize = typeof TextEncoder2 === "function" ? new TextEncoder2().encode(responseData).byteLength : responseData.length;
50243
+ }
50244
+ }
50245
+ if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
50246
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
50247
+ }
50248
+ }
49981
50249
  !isStreamResponse && unsubscribe && unsubscribe();
49982
50250
  return await new Promise((resolve, reject2) => {
49983
50251
  settle(resolve, reject2, {
@@ -49991,6 +50259,13 @@ var require_axios = __commonJS((exports, module) => {
49991
50259
  });
49992
50260
  } catch (err) {
49993
50261
  unsubscribe && unsubscribe();
50262
+ if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {
50263
+ const canceledError = composedSignal.reason;
50264
+ canceledError.config = config;
50265
+ request && (canceledError.request = request);
50266
+ err !== canceledError && (canceledError.cause = err);
50267
+ throw canceledError;
50268
+ }
49994
50269
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
49995
50270
  throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), {
49996
50271
  cause: err.cause || err
@@ -50030,10 +50305,12 @@ var require_axios = __commonJS((exports, module) => {
50030
50305
  if (fn) {
50031
50306
  try {
50032
50307
  Object.defineProperty(fn, "name", {
50308
+ __proto__: null,
50033
50309
  value
50034
50310
  });
50035
50311
  } catch (e) {}
50036
50312
  Object.defineProperty(fn, "adapterName", {
50313
+ __proto__: null,
50037
50314
  value
50038
50315
  });
50039
50316
  }
@@ -50094,14 +50371,24 @@ var require_axios = __commonJS((exports, module) => {
50094
50371
  const adapter = adapters.getAdapter(config.adapter || defaults2.adapter, config);
50095
50372
  return adapter(config).then(function onAdapterResolution(response) {
50096
50373
  throwIfCancellationRequested(config);
50097
- response.data = transformData.call(config, config.transformResponse, response);
50374
+ config.response = response;
50375
+ try {
50376
+ response.data = transformData.call(config, config.transformResponse, response);
50377
+ } finally {
50378
+ delete config.response;
50379
+ }
50098
50380
  response.headers = AxiosHeaders.from(response.headers);
50099
50381
  return response;
50100
50382
  }, function onAdapterRejection(reason) {
50101
50383
  if (!isCancel(reason)) {
50102
50384
  throwIfCancellationRequested(config);
50103
50385
  if (reason && reason.response) {
50104
- reason.response.data = transformData.call(config, config.transformResponse, reason.response);
50386
+ config.response = reason.response;
50387
+ try {
50388
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
50389
+ } finally {
50390
+ delete config.response;
50391
+ }
50105
50392
  reason.response.headers = AxiosHeaders.from(reason.response.headers);
50106
50393
  }
50107
50394
  }
@@ -50144,7 +50431,7 @@ var require_axios = __commonJS((exports, module) => {
50144
50431
  let i = keys2.length;
50145
50432
  while (i-- > 0) {
50146
50433
  const opt = keys2[i];
50147
- const validator2 = schema[opt];
50434
+ const validator2 = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
50148
50435
  if (validator2) {
50149
50436
  const value = options[opt];
50150
50437
  const result2 = value === undefined || validator2(value, opt, options);
@@ -50252,7 +50539,7 @@ var require_axios = __commonJS((exports, module) => {
50252
50539
  }, true);
50253
50540
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
50254
50541
  let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
50255
- headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method2) => {
50542
+ headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method2) => {
50256
50543
  delete headers[method2];
50257
50544
  });
50258
50545
  config.headers = AxiosHeaders.concat(contextHeaders, headers);
@@ -50328,7 +50615,7 @@ var require_axios = __commonJS((exports, module) => {
50328
50615
  }));
50329
50616
  };
50330
50617
  });
50331
- utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method2) {
50618
+ utils$1.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method2) {
50332
50619
  function generateHTTPMethod(isForm) {
50333
50620
  return function httpMethod(url2, data, config) {
50334
50621
  return this.request(mergeConfig(config || {}, {
@@ -50342,7 +50629,9 @@ var require_axios = __commonJS((exports, module) => {
50342
50629
  };
50343
50630
  }
50344
50631
  Axios.prototype[method2] = generateHTTPMethod();
50345
- Axios.prototype[method2 + "Form"] = generateHTTPMethod(true);
50632
+ if (method2 !== "query") {
50633
+ Axios.prototype[method2 + "Form"] = generateHTTPMethod(true);
50634
+ }
50346
50635
  });
50347
50636
 
50348
50637
  class CancelToken {
@@ -56118,7 +56407,7 @@ function log(msg) {
56118
56407
  // package.json
56119
56408
  var package_default = {
56120
56409
  name: "@neriros/ralphy",
56121
- version: "2.8.2",
56410
+ version: "2.9.0",
56122
56411
  description: "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
56123
56412
  keywords: [
56124
56413
  "agent",
@@ -56179,8 +56468,8 @@ var package_default = {
56179
56468
  "@commitlint/config-conventional": "^20.4.3",
56180
56469
  "@fission-ai/openspec": "latest",
56181
56470
  "@modelcontextprotocol/sdk": "^1.12.0",
56182
- "@nx/devkit": "^22.6.5",
56183
- "@nx/js": "^22.5.3",
56471
+ "@nx/devkit": "^22.7.1",
56472
+ "@nx/js": "^22.7.1",
56184
56473
  "@secretlint/secretlint-rule-preset-recommend": "^11.3.1",
56185
56474
  "@swc-node/register": "^1.11.1",
56186
56475
  "@swc/core": "^1.15.18",
@@ -56201,6 +56490,7 @@ var package_default = {
56201
56490
  zod: "^3.24.0"
56202
56491
  },
56203
56492
  overrides: {
56493
+ axios: "^1.15.1",
56204
56494
  minimatch: "^10.2.3"
56205
56495
  },
56206
56496
  engines: {
@@ -69772,7 +70062,7 @@ async function fetchOpenIssues(apiKey, filter2) {
69772
70062
  const query = `query Issues($filter: IssueFilter) {
69773
70063
  issues(filter: $filter, first: 50) {
69774
70064
  nodes {
69775
- id identifier title description url
70065
+ id identifier title description url priority
69776
70066
  state { name type }
69777
70067
  assignee { id email name }
69778
70068
  labels { nodes { name } }
@@ -69790,7 +70080,8 @@ async function fetchOpenIssues(apiKey, filter2) {
69790
70080
  url: n.url,
69791
70081
  state: n.state,
69792
70082
  assignee: n.assignee,
69793
- labels: n.labels.nodes.map((l) => l.name)
70083
+ labels: n.labels.nodes.map((l) => l.name),
70084
+ priority: n.priority
69794
70085
  }));
69795
70086
  }
69796
70087
  async function linearRequest(apiKey, query, variables) {
@@ -70091,6 +70382,13 @@ class AgentCoordinator {
70091
70382
  this.queue.push(issue);
70092
70383
  added += 1;
70093
70384
  }
70385
+ if (added > 0) {
70386
+ this.queue.sort((a, b) => {
70387
+ const pa = a.priority === 0 ? Infinity : a.priority;
70388
+ const pb = b.priority === 0 ? Infinity : b.priority;
70389
+ return pa - pb;
70390
+ });
70391
+ }
70094
70392
  state.lastPollAt = new Date().toISOString();
70095
70393
  await this.deps.saveState(state);
70096
70394
  this.spawnNext();