@rebilly/instruments 9.66.2 → 9.66.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -6
- package/dist/index.js +753 -1128
- package/dist/index.min.js +10 -12
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3690,7 +3690,7 @@ const toJSONObject = (obj) => {
|
|
|
3690
3690
|
};
|
|
3691
3691
|
const isAsyncFn = kindOfTest("AsyncFunction");
|
|
3692
3692
|
const isThenable = (thing) => thing && (isObject$1(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
3693
|
-
const utils$
|
|
3693
|
+
const utils$2 = {
|
|
3694
3694
|
isArray,
|
|
3695
3695
|
isArrayBuffer,
|
|
3696
3696
|
isBuffer,
|
|
@@ -3762,7 +3762,7 @@ function AxiosError(message, code2, config, request, response) {
|
|
|
3762
3762
|
request && (this.request = request);
|
|
3763
3763
|
response && (this.response = response);
|
|
3764
3764
|
}
|
|
3765
|
-
utils$
|
|
3765
|
+
utils$2.inherits(AxiosError, Error, {
|
|
3766
3766
|
toJSON: function toJSON() {
|
|
3767
3767
|
return {
|
|
3768
3768
|
// Standard
|
|
@@ -3777,7 +3777,7 @@ utils$1.inherits(AxiosError, Error, {
|
|
|
3777
3777
|
columnNumber: this.columnNumber,
|
|
3778
3778
|
stack: this.stack,
|
|
3779
3779
|
// Axios
|
|
3780
|
-
config: utils$
|
|
3780
|
+
config: utils$2.toJSONObject(this.config),
|
|
3781
3781
|
code: this.code,
|
|
3782
3782
|
status: this.response && this.response.status ? this.response.status : null
|
|
3783
3783
|
};
|
|
@@ -3806,7 +3806,7 @@ Object.defineProperties(AxiosError, descriptors);
|
|
|
3806
3806
|
Object.defineProperty(prototype$1, "isAxiosError", { value: true });
|
|
3807
3807
|
AxiosError.from = (error2, code2, config, request, response, customProps) => {
|
|
3808
3808
|
const axiosError = Object.create(prototype$1);
|
|
3809
|
-
utils$
|
|
3809
|
+
utils$2.toFlatObject(error2, axiosError, function filter2(obj) {
|
|
3810
3810
|
return obj !== Error.prototype;
|
|
3811
3811
|
}, (prop) => {
|
|
3812
3812
|
return prop !== "isAxiosError";
|
|
@@ -3819,10 +3819,10 @@ AxiosError.from = (error2, code2, config, request, response, customProps) => {
|
|
|
3819
3819
|
};
|
|
3820
3820
|
const httpAdapter = null;
|
|
3821
3821
|
function isVisitable(thing) {
|
|
3822
|
-
return utils$
|
|
3822
|
+
return utils$2.isPlainObject(thing) || utils$2.isArray(thing);
|
|
3823
3823
|
}
|
|
3824
3824
|
function removeBrackets(key) {
|
|
3825
|
-
return utils$
|
|
3825
|
+
return utils$2.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
3826
3826
|
}
|
|
3827
3827
|
function renderKey(path, key, dots) {
|
|
3828
3828
|
if (!path) return key;
|
|
@@ -3832,41 +3832,41 @@ function renderKey(path, key, dots) {
|
|
|
3832
3832
|
}).join(dots ? "." : "");
|
|
3833
3833
|
}
|
|
3834
3834
|
function isFlatArray(arr) {
|
|
3835
|
-
return utils$
|
|
3835
|
+
return utils$2.isArray(arr) && !arr.some(isVisitable);
|
|
3836
3836
|
}
|
|
3837
|
-
const predicates = utils$
|
|
3837
|
+
const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter(prop) {
|
|
3838
3838
|
return /^is[A-Z]/.test(prop);
|
|
3839
3839
|
});
|
|
3840
3840
|
function toFormData(obj, formData, options) {
|
|
3841
|
-
if (!utils$
|
|
3841
|
+
if (!utils$2.isObject(obj)) {
|
|
3842
3842
|
throw new TypeError("target must be an object");
|
|
3843
3843
|
}
|
|
3844
3844
|
formData = formData || new FormData();
|
|
3845
|
-
options = utils$
|
|
3845
|
+
options = utils$2.toFlatObject(options, {
|
|
3846
3846
|
metaTokens: true,
|
|
3847
3847
|
dots: false,
|
|
3848
3848
|
indexes: false
|
|
3849
3849
|
}, false, function defined(option, source) {
|
|
3850
|
-
return !utils$
|
|
3850
|
+
return !utils$2.isUndefined(source[option]);
|
|
3851
3851
|
});
|
|
3852
3852
|
const metaTokens = options.metaTokens;
|
|
3853
3853
|
const visitor = options.visitor || defaultVisitor;
|
|
3854
3854
|
const dots = options.dots;
|
|
3855
3855
|
const indexes = options.indexes;
|
|
3856
3856
|
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
3857
|
-
const useBlob = _Blob && utils$
|
|
3858
|
-
if (!utils$
|
|
3857
|
+
const useBlob = _Blob && utils$2.isSpecCompliantForm(formData);
|
|
3858
|
+
if (!utils$2.isFunction(visitor)) {
|
|
3859
3859
|
throw new TypeError("visitor must be a function");
|
|
3860
3860
|
}
|
|
3861
3861
|
function convertValue(value) {
|
|
3862
3862
|
if (value === null) return "";
|
|
3863
|
-
if (utils$
|
|
3863
|
+
if (utils$2.isDate(value)) {
|
|
3864
3864
|
return value.toISOString();
|
|
3865
3865
|
}
|
|
3866
|
-
if (!useBlob && utils$
|
|
3866
|
+
if (!useBlob && utils$2.isBlob(value)) {
|
|
3867
3867
|
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
3868
3868
|
}
|
|
3869
|
-
if (utils$
|
|
3869
|
+
if (utils$2.isArrayBuffer(value) || utils$2.isTypedArray(value)) {
|
|
3870
3870
|
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
3871
3871
|
}
|
|
3872
3872
|
return value;
|
|
@@ -3874,13 +3874,13 @@ function toFormData(obj, formData, options) {
|
|
|
3874
3874
|
function defaultVisitor(value, key, path) {
|
|
3875
3875
|
let arr = value;
|
|
3876
3876
|
if (value && !path && typeof value === "object") {
|
|
3877
|
-
if (utils$
|
|
3877
|
+
if (utils$2.endsWith(key, "{}")) {
|
|
3878
3878
|
key = metaTokens ? key : key.slice(0, -2);
|
|
3879
3879
|
value = JSON.stringify(value);
|
|
3880
|
-
} else if (utils$
|
|
3880
|
+
} else if (utils$2.isArray(value) && isFlatArray(value) || (utils$2.isFileList(value) || utils$2.endsWith(key, "[]")) && (arr = utils$2.toArray(value))) {
|
|
3881
3881
|
key = removeBrackets(key);
|
|
3882
3882
|
arr.forEach(function each(el, index2) {
|
|
3883
|
-
!(utils$
|
|
3883
|
+
!(utils$2.isUndefined(el) || el === null) && formData.append(
|
|
3884
3884
|
// eslint-disable-next-line no-nested-ternary
|
|
3885
3885
|
indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + "[]",
|
|
3886
3886
|
convertValue(el)
|
|
@@ -3902,16 +3902,16 @@ function toFormData(obj, formData, options) {
|
|
|
3902
3902
|
isVisitable
|
|
3903
3903
|
});
|
|
3904
3904
|
function build(value, path) {
|
|
3905
|
-
if (utils$
|
|
3905
|
+
if (utils$2.isUndefined(value)) return;
|
|
3906
3906
|
if (stack.indexOf(value) !== -1) {
|
|
3907
3907
|
throw Error("Circular reference detected in " + path.join("."));
|
|
3908
3908
|
}
|
|
3909
3909
|
stack.push(value);
|
|
3910
|
-
utils$
|
|
3911
|
-
const result = !(utils$
|
|
3910
|
+
utils$2.forEach(value, function each(el, key) {
|
|
3911
|
+
const result = !(utils$2.isUndefined(el) || el === null) && visitor.call(
|
|
3912
3912
|
formData,
|
|
3913
3913
|
el,
|
|
3914
|
-
utils$
|
|
3914
|
+
utils$2.isString(key) ? key.trim() : key,
|
|
3915
3915
|
path,
|
|
3916
3916
|
exposedHelpers
|
|
3917
3917
|
);
|
|
@@ -3921,7 +3921,7 @@ function toFormData(obj, formData, options) {
|
|
|
3921
3921
|
});
|
|
3922
3922
|
stack.pop();
|
|
3923
3923
|
}
|
|
3924
|
-
if (!utils$
|
|
3924
|
+
if (!utils$2.isObject(obj)) {
|
|
3925
3925
|
throw new TypeError("data must be an object");
|
|
3926
3926
|
}
|
|
3927
3927
|
build(obj);
|
|
@@ -3970,7 +3970,7 @@ function buildURL(url, params, options) {
|
|
|
3970
3970
|
if (serializeFn) {
|
|
3971
3971
|
serializedParams = serializeFn(params, options);
|
|
3972
3972
|
} else {
|
|
3973
|
-
serializedParams = utils$
|
|
3973
|
+
serializedParams = utils$2.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
|
|
3974
3974
|
}
|
|
3975
3975
|
if (serializedParams) {
|
|
3976
3976
|
const hashmarkIndex = url.indexOf("#");
|
|
@@ -4035,7 +4035,7 @@ class InterceptorManager {
|
|
|
4035
4035
|
* @returns {void}
|
|
4036
4036
|
*/
|
|
4037
4037
|
forEach(fn) {
|
|
4038
|
-
utils$
|
|
4038
|
+
utils$2.forEach(this.handlers, function forEachHandler(h) {
|
|
4039
4039
|
if (h !== null) {
|
|
4040
4040
|
fn(h);
|
|
4041
4041
|
}
|
|
@@ -4068,7 +4068,7 @@ const hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
4068
4068
|
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
4069
4069
|
})();
|
|
4070
4070
|
const origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
4071
|
-
const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4071
|
+
const utils$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4072
4072
|
__proto__: null,
|
|
4073
4073
|
hasBrowserEnv,
|
|
4074
4074
|
hasStandardBrowserEnv,
|
|
@@ -4076,13 +4076,13 @@ const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
4076
4076
|
origin
|
|
4077
4077
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4078
4078
|
const platform = {
|
|
4079
|
-
...utils,
|
|
4079
|
+
...utils$1,
|
|
4080
4080
|
...platform$1
|
|
4081
4081
|
};
|
|
4082
4082
|
function toURLEncodedForm(data, options) {
|
|
4083
4083
|
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
|
4084
4084
|
visitor: function(value, key, path, helpers) {
|
|
4085
|
-
if (platform.isNode && utils$
|
|
4085
|
+
if (platform.isNode && utils$2.isBuffer(value)) {
|
|
4086
4086
|
this.append(key, value.toString("base64"));
|
|
4087
4087
|
return false;
|
|
4088
4088
|
}
|
|
@@ -4091,7 +4091,7 @@ function toURLEncodedForm(data, options) {
|
|
|
4091
4091
|
}, options));
|
|
4092
4092
|
}
|
|
4093
4093
|
function parsePropPath(name) {
|
|
4094
|
-
return utils$
|
|
4094
|
+
return utils$2.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
4095
4095
|
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
4096
4096
|
});
|
|
4097
4097
|
}
|
|
@@ -4113,27 +4113,27 @@ function formDataToJSON(formData) {
|
|
|
4113
4113
|
if (name === "__proto__") return true;
|
|
4114
4114
|
const isNumericKey = Number.isFinite(+name);
|
|
4115
4115
|
const isLast = index2 >= path.length;
|
|
4116
|
-
name = !name && utils$
|
|
4116
|
+
name = !name && utils$2.isArray(target) ? target.length : name;
|
|
4117
4117
|
if (isLast) {
|
|
4118
|
-
if (utils$
|
|
4118
|
+
if (utils$2.hasOwnProp(target, name)) {
|
|
4119
4119
|
target[name] = [target[name], value];
|
|
4120
4120
|
} else {
|
|
4121
4121
|
target[name] = value;
|
|
4122
4122
|
}
|
|
4123
4123
|
return !isNumericKey;
|
|
4124
4124
|
}
|
|
4125
|
-
if (!target[name] || !utils$
|
|
4125
|
+
if (!target[name] || !utils$2.isObject(target[name])) {
|
|
4126
4126
|
target[name] = [];
|
|
4127
4127
|
}
|
|
4128
4128
|
const result = buildPath(path, value, target[name], index2);
|
|
4129
|
-
if (result && utils$
|
|
4129
|
+
if (result && utils$2.isArray(target[name])) {
|
|
4130
4130
|
target[name] = arrayToObject(target[name]);
|
|
4131
4131
|
}
|
|
4132
4132
|
return !isNumericKey;
|
|
4133
4133
|
}
|
|
4134
|
-
if (utils$
|
|
4134
|
+
if (utils$2.isFormData(formData) && utils$2.isFunction(formData.entries)) {
|
|
4135
4135
|
const obj = {};
|
|
4136
|
-
utils$
|
|
4136
|
+
utils$2.forEachEntry(formData, (name, value) => {
|
|
4137
4137
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
4138
4138
|
});
|
|
4139
4139
|
return obj;
|
|
@@ -4141,10 +4141,10 @@ function formDataToJSON(formData) {
|
|
|
4141
4141
|
return null;
|
|
4142
4142
|
}
|
|
4143
4143
|
function stringifySafely(rawValue, parser, encoder) {
|
|
4144
|
-
if (utils$
|
|
4144
|
+
if (utils$2.isString(rawValue)) {
|
|
4145
4145
|
try {
|
|
4146
4146
|
(parser || JSON.parse)(rawValue);
|
|
4147
|
-
return utils$
|
|
4147
|
+
return utils$2.trim(rawValue);
|
|
4148
4148
|
} catch (e2) {
|
|
4149
4149
|
if (e2.name !== "SyntaxError") {
|
|
4150
4150
|
throw e2;
|
|
@@ -4159,21 +4159,21 @@ const defaults$1 = {
|
|
|
4159
4159
|
transformRequest: [function transformRequest(data, headers) {
|
|
4160
4160
|
const contentType = headers.getContentType() || "";
|
|
4161
4161
|
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
4162
|
-
const isObjectPayload = utils$
|
|
4163
|
-
if (isObjectPayload && utils$
|
|
4162
|
+
const isObjectPayload = utils$2.isObject(data);
|
|
4163
|
+
if (isObjectPayload && utils$2.isHTMLForm(data)) {
|
|
4164
4164
|
data = new FormData(data);
|
|
4165
4165
|
}
|
|
4166
|
-
const isFormData2 = utils$
|
|
4166
|
+
const isFormData2 = utils$2.isFormData(data);
|
|
4167
4167
|
if (isFormData2) {
|
|
4168
4168
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
4169
4169
|
}
|
|
4170
|
-
if (utils$
|
|
4170
|
+
if (utils$2.isArrayBuffer(data) || utils$2.isBuffer(data) || utils$2.isStream(data) || utils$2.isFile(data) || utils$2.isBlob(data) || utils$2.isReadableStream(data)) {
|
|
4171
4171
|
return data;
|
|
4172
4172
|
}
|
|
4173
|
-
if (utils$
|
|
4173
|
+
if (utils$2.isArrayBufferView(data)) {
|
|
4174
4174
|
return data.buffer;
|
|
4175
4175
|
}
|
|
4176
|
-
if (utils$
|
|
4176
|
+
if (utils$2.isURLSearchParams(data)) {
|
|
4177
4177
|
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
4178
4178
|
return data.toString();
|
|
4179
4179
|
}
|
|
@@ -4182,7 +4182,7 @@ const defaults$1 = {
|
|
|
4182
4182
|
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
4183
4183
|
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
4184
4184
|
}
|
|
4185
|
-
if ((isFileList2 = utils$
|
|
4185
|
+
if ((isFileList2 = utils$2.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
4186
4186
|
const _FormData = this.env && this.env.FormData;
|
|
4187
4187
|
return toFormData(
|
|
4188
4188
|
isFileList2 ? { "files[]": data } : data,
|
|
@@ -4201,10 +4201,10 @@ const defaults$1 = {
|
|
|
4201
4201
|
const transitional2 = this.transitional || defaults$1.transitional;
|
|
4202
4202
|
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
4203
4203
|
const JSONRequested = this.responseType === "json";
|
|
4204
|
-
if (utils$
|
|
4204
|
+
if (utils$2.isResponse(data) || utils$2.isReadableStream(data)) {
|
|
4205
4205
|
return data;
|
|
4206
4206
|
}
|
|
4207
|
-
if (data && utils$
|
|
4207
|
+
if (data && utils$2.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
4208
4208
|
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
4209
4209
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
4210
4210
|
try {
|
|
@@ -4243,10 +4243,10 @@ const defaults$1 = {
|
|
|
4243
4243
|
}
|
|
4244
4244
|
}
|
|
4245
4245
|
};
|
|
4246
|
-
utils$
|
|
4246
|
+
utils$2.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
4247
4247
|
defaults$1.headers[method] = {};
|
|
4248
4248
|
});
|
|
4249
|
-
const ignoreDuplicateOf = utils$
|
|
4249
|
+
const ignoreDuplicateOf = utils$2.toObjectSet([
|
|
4250
4250
|
"age",
|
|
4251
4251
|
"authorization",
|
|
4252
4252
|
"content-length",
|
|
@@ -4297,7 +4297,7 @@ function normalizeValue(value) {
|
|
|
4297
4297
|
if (value === false || value == null) {
|
|
4298
4298
|
return value;
|
|
4299
4299
|
}
|
|
4300
|
-
return utils$
|
|
4300
|
+
return utils$2.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
4301
4301
|
}
|
|
4302
4302
|
function parseTokens(str) {
|
|
4303
4303
|
const tokens = /* @__PURE__ */ Object.create(null);
|
|
@@ -4310,17 +4310,17 @@ function parseTokens(str) {
|
|
|
4310
4310
|
}
|
|
4311
4311
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
4312
4312
|
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
|
|
4313
|
-
if (utils$
|
|
4313
|
+
if (utils$2.isFunction(filter2)) {
|
|
4314
4314
|
return filter2.call(this, value, header);
|
|
4315
4315
|
}
|
|
4316
4316
|
if (isHeaderNameFilter) {
|
|
4317
4317
|
value = header;
|
|
4318
4318
|
}
|
|
4319
|
-
if (!utils$
|
|
4320
|
-
if (utils$
|
|
4319
|
+
if (!utils$2.isString(value)) return;
|
|
4320
|
+
if (utils$2.isString(filter2)) {
|
|
4321
4321
|
return value.indexOf(filter2) !== -1;
|
|
4322
4322
|
}
|
|
4323
|
-
if (utils$
|
|
4323
|
+
if (utils$2.isRegExp(filter2)) {
|
|
4324
4324
|
return filter2.test(value);
|
|
4325
4325
|
}
|
|
4326
4326
|
}
|
|
@@ -4330,7 +4330,7 @@ function formatHeader(header) {
|
|
|
4330
4330
|
});
|
|
4331
4331
|
}
|
|
4332
4332
|
function buildAccessors(obj, header) {
|
|
4333
|
-
const accessorName = utils$
|
|
4333
|
+
const accessorName = utils$2.toCamelCase(" " + header);
|
|
4334
4334
|
["get", "set", "has"].forEach((methodName) => {
|
|
4335
4335
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
4336
4336
|
value: function(arg1, arg2, arg3) {
|
|
@@ -4351,17 +4351,17 @@ class AxiosHeaders {
|
|
|
4351
4351
|
if (!lHeader) {
|
|
4352
4352
|
throw new Error("header name must be a non-empty string");
|
|
4353
4353
|
}
|
|
4354
|
-
const key = utils$
|
|
4354
|
+
const key = utils$2.findKey(self2, lHeader);
|
|
4355
4355
|
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
4356
4356
|
self2[key || _header] = normalizeValue(_value);
|
|
4357
4357
|
}
|
|
4358
4358
|
}
|
|
4359
|
-
const setHeaders = (headers, _rewrite) => utils$
|
|
4360
|
-
if (utils$
|
|
4359
|
+
const setHeaders = (headers, _rewrite) => utils$2.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
4360
|
+
if (utils$2.isPlainObject(header) || header instanceof this.constructor) {
|
|
4361
4361
|
setHeaders(header, valueOrRewrite);
|
|
4362
|
-
} else if (utils$
|
|
4362
|
+
} else if (utils$2.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
4363
4363
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
4364
|
-
} else if (utils$
|
|
4364
|
+
} else if (utils$2.isHeaders(header)) {
|
|
4365
4365
|
for (const [key, value] of header.entries()) {
|
|
4366
4366
|
setHeader(value, key, rewrite);
|
|
4367
4367
|
}
|
|
@@ -4373,7 +4373,7 @@ class AxiosHeaders {
|
|
|
4373
4373
|
get(header, parser) {
|
|
4374
4374
|
header = normalizeHeader(header);
|
|
4375
4375
|
if (header) {
|
|
4376
|
-
const key = utils$
|
|
4376
|
+
const key = utils$2.findKey(this, header);
|
|
4377
4377
|
if (key) {
|
|
4378
4378
|
const value = this[key];
|
|
4379
4379
|
if (!parser) {
|
|
@@ -4382,10 +4382,10 @@ class AxiosHeaders {
|
|
|
4382
4382
|
if (parser === true) {
|
|
4383
4383
|
return parseTokens(value);
|
|
4384
4384
|
}
|
|
4385
|
-
if (utils$
|
|
4385
|
+
if (utils$2.isFunction(parser)) {
|
|
4386
4386
|
return parser.call(this, value, key);
|
|
4387
4387
|
}
|
|
4388
|
-
if (utils$
|
|
4388
|
+
if (utils$2.isRegExp(parser)) {
|
|
4389
4389
|
return parser.exec(value);
|
|
4390
4390
|
}
|
|
4391
4391
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
@@ -4395,7 +4395,7 @@ class AxiosHeaders {
|
|
|
4395
4395
|
has(header, matcher) {
|
|
4396
4396
|
header = normalizeHeader(header);
|
|
4397
4397
|
if (header) {
|
|
4398
|
-
const key = utils$
|
|
4398
|
+
const key = utils$2.findKey(this, header);
|
|
4399
4399
|
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
4400
4400
|
}
|
|
4401
4401
|
return false;
|
|
@@ -4406,14 +4406,14 @@ class AxiosHeaders {
|
|
|
4406
4406
|
function deleteHeader(_header) {
|
|
4407
4407
|
_header = normalizeHeader(_header);
|
|
4408
4408
|
if (_header) {
|
|
4409
|
-
const key = utils$
|
|
4409
|
+
const key = utils$2.findKey(self2, _header);
|
|
4410
4410
|
if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
|
|
4411
4411
|
delete self2[key];
|
|
4412
4412
|
deleted = true;
|
|
4413
4413
|
}
|
|
4414
4414
|
}
|
|
4415
4415
|
}
|
|
4416
|
-
if (utils$
|
|
4416
|
+
if (utils$2.isArray(header)) {
|
|
4417
4417
|
header.forEach(deleteHeader);
|
|
4418
4418
|
} else {
|
|
4419
4419
|
deleteHeader(header);
|
|
@@ -4436,8 +4436,8 @@ class AxiosHeaders {
|
|
|
4436
4436
|
normalize(format2) {
|
|
4437
4437
|
const self2 = this;
|
|
4438
4438
|
const headers = {};
|
|
4439
|
-
utils$
|
|
4440
|
-
const key = utils$
|
|
4439
|
+
utils$2.forEach(this, (value, header) => {
|
|
4440
|
+
const key = utils$2.findKey(headers, header);
|
|
4441
4441
|
if (key) {
|
|
4442
4442
|
self2[key] = normalizeValue(value);
|
|
4443
4443
|
delete self2[header];
|
|
@@ -4457,8 +4457,8 @@ class AxiosHeaders {
|
|
|
4457
4457
|
}
|
|
4458
4458
|
toJSON(asStrings) {
|
|
4459
4459
|
const obj = /* @__PURE__ */ Object.create(null);
|
|
4460
|
-
utils$
|
|
4461
|
-
value != null && value !== false && (obj[header] = asStrings && utils$
|
|
4460
|
+
utils$2.forEach(this, (value, header) => {
|
|
4461
|
+
value != null && value !== false && (obj[header] = asStrings && utils$2.isArray(value) ? value.join(", ") : value);
|
|
4462
4462
|
});
|
|
4463
4463
|
return obj;
|
|
4464
4464
|
}
|
|
@@ -4492,12 +4492,12 @@ class AxiosHeaders {
|
|
|
4492
4492
|
accessors[lHeader] = true;
|
|
4493
4493
|
}
|
|
4494
4494
|
}
|
|
4495
|
-
utils$
|
|
4495
|
+
utils$2.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
4496
4496
|
return this;
|
|
4497
4497
|
}
|
|
4498
4498
|
}
|
|
4499
4499
|
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
4500
|
-
utils$
|
|
4500
|
+
utils$2.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
4501
4501
|
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
4502
4502
|
return {
|
|
4503
4503
|
get: () => value,
|
|
@@ -4506,13 +4506,13 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
|
4506
4506
|
}
|
|
4507
4507
|
};
|
|
4508
4508
|
});
|
|
4509
|
-
utils$
|
|
4509
|
+
utils$2.freezeMethods(AxiosHeaders);
|
|
4510
4510
|
function transformData(fns, response) {
|
|
4511
4511
|
const config = this || defaults$1;
|
|
4512
4512
|
const context = response || config;
|
|
4513
4513
|
const headers = AxiosHeaders.from(context.headers);
|
|
4514
4514
|
let data = context.data;
|
|
4515
|
-
utils$
|
|
4515
|
+
utils$2.forEach(fns, function transform(fn) {
|
|
4516
4516
|
data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
|
|
4517
4517
|
});
|
|
4518
4518
|
headers.normalize();
|
|
@@ -4525,7 +4525,7 @@ function CanceledError(message, config, request) {
|
|
|
4525
4525
|
AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
|
|
4526
4526
|
this.name = "CanceledError";
|
|
4527
4527
|
}
|
|
4528
|
-
utils$
|
|
4528
|
+
utils$2.inherits(CanceledError, AxiosError, {
|
|
4529
4529
|
__CANCEL__: true
|
|
4530
4530
|
});
|
|
4531
4531
|
function settle(resolve2, reject, response) {
|
|
@@ -4654,7 +4654,7 @@ const isURLSameOrigin = platform.hasStandardBrowserEnv ? (
|
|
|
4654
4654
|
}
|
|
4655
4655
|
originURL = resolveURL(window.location.href);
|
|
4656
4656
|
return function isURLSameOrigin2(requestURL) {
|
|
4657
|
-
const parsed = utils$
|
|
4657
|
+
const parsed = utils$2.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
4658
4658
|
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
4659
4659
|
};
|
|
4660
4660
|
}()
|
|
@@ -4671,9 +4671,9 @@ const cookies = platform.hasStandardBrowserEnv ? (
|
|
|
4671
4671
|
{
|
|
4672
4672
|
write(name, value, expires, path, domain, secure) {
|
|
4673
4673
|
const cookie = [name + "=" + encodeURIComponent(value)];
|
|
4674
|
-
utils$
|
|
4675
|
-
utils$
|
|
4676
|
-
utils$
|
|
4674
|
+
utils$2.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
4675
|
+
utils$2.isString(path) && cookie.push("path=" + path);
|
|
4676
|
+
utils$2.isString(domain) && cookie.push("domain=" + domain);
|
|
4677
4677
|
secure === true && cookie.push("secure");
|
|
4678
4678
|
document.cookie = cookie.join("; ");
|
|
4679
4679
|
},
|
|
@@ -4714,31 +4714,31 @@ function mergeConfig(config1, config2) {
|
|
|
4714
4714
|
config2 = config2 || {};
|
|
4715
4715
|
const config = {};
|
|
4716
4716
|
function getMergedValue(target, source, caseless) {
|
|
4717
|
-
if (utils$
|
|
4718
|
-
return utils$
|
|
4719
|
-
} else if (utils$
|
|
4720
|
-
return utils$
|
|
4721
|
-
} else if (utils$
|
|
4717
|
+
if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
|
|
4718
|
+
return utils$2.merge.call({ caseless }, target, source);
|
|
4719
|
+
} else if (utils$2.isPlainObject(source)) {
|
|
4720
|
+
return utils$2.merge({}, source);
|
|
4721
|
+
} else if (utils$2.isArray(source)) {
|
|
4722
4722
|
return source.slice();
|
|
4723
4723
|
}
|
|
4724
4724
|
return source;
|
|
4725
4725
|
}
|
|
4726
4726
|
function mergeDeepProperties(a, b2, caseless) {
|
|
4727
|
-
if (!utils$
|
|
4727
|
+
if (!utils$2.isUndefined(b2)) {
|
|
4728
4728
|
return getMergedValue(a, b2, caseless);
|
|
4729
|
-
} else if (!utils$
|
|
4729
|
+
} else if (!utils$2.isUndefined(a)) {
|
|
4730
4730
|
return getMergedValue(void 0, a, caseless);
|
|
4731
4731
|
}
|
|
4732
4732
|
}
|
|
4733
4733
|
function valueFromConfig2(a, b2) {
|
|
4734
|
-
if (!utils$
|
|
4734
|
+
if (!utils$2.isUndefined(b2)) {
|
|
4735
4735
|
return getMergedValue(void 0, b2);
|
|
4736
4736
|
}
|
|
4737
4737
|
}
|
|
4738
4738
|
function defaultToConfig2(a, b2) {
|
|
4739
|
-
if (!utils$
|
|
4739
|
+
if (!utils$2.isUndefined(b2)) {
|
|
4740
4740
|
return getMergedValue(void 0, b2);
|
|
4741
|
-
} else if (!utils$
|
|
4741
|
+
} else if (!utils$2.isUndefined(a)) {
|
|
4742
4742
|
return getMergedValue(void 0, a);
|
|
4743
4743
|
}
|
|
4744
4744
|
}
|
|
@@ -4780,10 +4780,10 @@ function mergeConfig(config1, config2) {
|
|
|
4780
4780
|
validateStatus: mergeDirectKeys,
|
|
4781
4781
|
headers: (a, b2) => mergeDeepProperties(headersToObject(a), headersToObject(b2), true)
|
|
4782
4782
|
};
|
|
4783
|
-
utils$
|
|
4783
|
+
utils$2.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
4784
4784
|
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
4785
4785
|
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
4786
|
-
utils$
|
|
4786
|
+
utils$2.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
4787
4787
|
});
|
|
4788
4788
|
return config;
|
|
4789
4789
|
}
|
|
@@ -4799,7 +4799,7 @@ const resolveConfig = (config) => {
|
|
|
4799
4799
|
);
|
|
4800
4800
|
}
|
|
4801
4801
|
let contentType;
|
|
4802
|
-
if (utils$
|
|
4802
|
+
if (utils$2.isFormData(data)) {
|
|
4803
4803
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
4804
4804
|
headers.setContentType(void 0);
|
|
4805
4805
|
} else if ((contentType = headers.getContentType()) !== false) {
|
|
@@ -4808,7 +4808,7 @@ const resolveConfig = (config) => {
|
|
|
4808
4808
|
}
|
|
4809
4809
|
}
|
|
4810
4810
|
if (platform.hasStandardBrowserEnv) {
|
|
4811
|
-
withXSRFToken && utils$
|
|
4811
|
+
withXSRFToken && utils$2.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
4812
4812
|
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
|
|
4813
4813
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
4814
4814
|
if (xsrfValue) {
|
|
@@ -4902,11 +4902,11 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
|
4902
4902
|
};
|
|
4903
4903
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
4904
4904
|
if ("setRequestHeader" in request) {
|
|
4905
|
-
utils$
|
|
4905
|
+
utils$2.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
4906
4906
|
request.setRequestHeader(key, val);
|
|
4907
4907
|
});
|
|
4908
4908
|
}
|
|
4909
|
-
if (!utils$
|
|
4909
|
+
if (!utils$2.isUndefined(_config.withCredentials)) {
|
|
4910
4910
|
request.withCredentials = !!_config.withCredentials;
|
|
4911
4911
|
}
|
|
4912
4912
|
if (responseType && responseType !== "json") {
|
|
@@ -5041,7 +5041,7 @@ const supportsRequestStream = isReadableStreamSupported && (() => {
|
|
|
5041
5041
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
5042
5042
|
const supportsResponseStream = isReadableStreamSupported && !!(() => {
|
|
5043
5043
|
try {
|
|
5044
|
-
return utils$
|
|
5044
|
+
return utils$2.isReadableStream(new Response("").body);
|
|
5045
5045
|
} catch (err) {
|
|
5046
5046
|
}
|
|
5047
5047
|
})();
|
|
@@ -5050,7 +5050,7 @@ const resolvers = {
|
|
|
5050
5050
|
};
|
|
5051
5051
|
isFetchSupported && ((res) => {
|
|
5052
5052
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => {
|
|
5053
|
-
!resolvers[type2] && (resolvers[type2] = utils$
|
|
5053
|
+
!resolvers[type2] && (resolvers[type2] = utils$2.isFunction(res[type2]) ? (res2) => res2[type2]() : (_2, config) => {
|
|
5054
5054
|
throw new AxiosError(`Response type '${type2}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
5055
5055
|
});
|
|
5056
5056
|
});
|
|
@@ -5059,24 +5059,24 @@ const getBodyLength = async (body) => {
|
|
|
5059
5059
|
if (body == null) {
|
|
5060
5060
|
return 0;
|
|
5061
5061
|
}
|
|
5062
|
-
if (utils$
|
|
5062
|
+
if (utils$2.isBlob(body)) {
|
|
5063
5063
|
return body.size;
|
|
5064
5064
|
}
|
|
5065
|
-
if (utils$
|
|
5065
|
+
if (utils$2.isSpecCompliantForm(body)) {
|
|
5066
5066
|
return (await new Request(body).arrayBuffer()).byteLength;
|
|
5067
5067
|
}
|
|
5068
|
-
if (utils$
|
|
5068
|
+
if (utils$2.isArrayBufferView(body)) {
|
|
5069
5069
|
return body.byteLength;
|
|
5070
5070
|
}
|
|
5071
|
-
if (utils$
|
|
5071
|
+
if (utils$2.isURLSearchParams(body)) {
|
|
5072
5072
|
body = body + "";
|
|
5073
5073
|
}
|
|
5074
|
-
if (utils$
|
|
5074
|
+
if (utils$2.isString(body)) {
|
|
5075
5075
|
return (await encodeText(body)).byteLength;
|
|
5076
5076
|
}
|
|
5077
5077
|
};
|
|
5078
5078
|
const resolveBodyLength = async (headers, body) => {
|
|
5079
|
-
const length = utils$
|
|
5079
|
+
const length = utils$2.toFiniteNumber(headers.getContentLength());
|
|
5080
5080
|
return length == null ? getBodyLength(body) : length;
|
|
5081
5081
|
};
|
|
5082
5082
|
const fetchAdapter = isFetchSupported && (async (config) => {
|
|
@@ -5112,7 +5112,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
5112
5112
|
duplex: "half"
|
|
5113
5113
|
});
|
|
5114
5114
|
let contentTypeHeader;
|
|
5115
|
-
if (utils$
|
|
5115
|
+
if (utils$2.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
5116
5116
|
headers.setContentType(contentTypeHeader);
|
|
5117
5117
|
}
|
|
5118
5118
|
if (_request.body) {
|
|
@@ -5122,7 +5122,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
5122
5122
|
), null, encodeText);
|
|
5123
5123
|
}
|
|
5124
5124
|
}
|
|
5125
|
-
if (!utils$
|
|
5125
|
+
if (!utils$2.isString(withCredentials)) {
|
|
5126
5126
|
withCredentials = withCredentials ? "cors" : "omit";
|
|
5127
5127
|
}
|
|
5128
5128
|
request = new Request(url, {
|
|
@@ -5141,7 +5141,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
5141
5141
|
["status", "statusText", "headers"].forEach((prop) => {
|
|
5142
5142
|
options[prop] = response[prop];
|
|
5143
5143
|
});
|
|
5144
|
-
const responseContentLength = utils$
|
|
5144
|
+
const responseContentLength = utils$2.toFiniteNumber(response.headers.get("content-length"));
|
|
5145
5145
|
response = new Response(
|
|
5146
5146
|
trackStream(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator(
|
|
5147
5147
|
responseContentLength,
|
|
@@ -5151,7 +5151,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
5151
5151
|
);
|
|
5152
5152
|
}
|
|
5153
5153
|
responseType = responseType || "text";
|
|
5154
|
-
let responseData = await resolvers[utils$
|
|
5154
|
+
let responseData = await resolvers[utils$2.findKey(resolvers, responseType) || "text"](response, config);
|
|
5155
5155
|
!isStreamResponse && onFinish();
|
|
5156
5156
|
stopTimeout && stopTimeout();
|
|
5157
5157
|
return await new Promise((resolve2, reject) => {
|
|
@@ -5182,7 +5182,7 @@ const knownAdapters = {
|
|
|
5182
5182
|
xhr: xhrAdapter,
|
|
5183
5183
|
fetch: fetchAdapter
|
|
5184
5184
|
};
|
|
5185
|
-
utils$
|
|
5185
|
+
utils$2.forEach(knownAdapters, (fn, value) => {
|
|
5186
5186
|
if (fn) {
|
|
5187
5187
|
try {
|
|
5188
5188
|
Object.defineProperty(fn, "name", { value });
|
|
@@ -5192,10 +5192,10 @@ utils$1.forEach(knownAdapters, (fn, value) => {
|
|
|
5192
5192
|
}
|
|
5193
5193
|
});
|
|
5194
5194
|
const renderReason = (reason) => `- ${reason}`;
|
|
5195
|
-
const isResolvedHandle = (adapter) => utils$
|
|
5195
|
+
const isResolvedHandle = (adapter) => utils$2.isFunction(adapter) || adapter === null || adapter === false;
|
|
5196
5196
|
const adapters = {
|
|
5197
5197
|
getAdapter: (adapters2) => {
|
|
5198
|
-
adapters2 = utils$
|
|
5198
|
+
adapters2 = utils$2.isArray(adapters2) ? adapters2 : [adapters2];
|
|
5199
5199
|
const { length } = adapters2;
|
|
5200
5200
|
let nameOrAdapter;
|
|
5201
5201
|
let adapter;
|
|
@@ -5383,7 +5383,7 @@ class Axios {
|
|
|
5383
5383
|
}, false);
|
|
5384
5384
|
}
|
|
5385
5385
|
if (paramsSerializer != null) {
|
|
5386
|
-
if (utils$
|
|
5386
|
+
if (utils$2.isFunction(paramsSerializer)) {
|
|
5387
5387
|
config.paramsSerializer = {
|
|
5388
5388
|
serialize: paramsSerializer
|
|
5389
5389
|
};
|
|
@@ -5395,11 +5395,11 @@ class Axios {
|
|
|
5395
5395
|
}
|
|
5396
5396
|
}
|
|
5397
5397
|
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
5398
|
-
let contextHeaders = headers && utils$
|
|
5398
|
+
let contextHeaders = headers && utils$2.merge(
|
|
5399
5399
|
headers.common,
|
|
5400
5400
|
headers[config.method]
|
|
5401
5401
|
);
|
|
5402
|
-
headers && utils$
|
|
5402
|
+
headers && utils$2.forEach(
|
|
5403
5403
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
5404
5404
|
(method) => {
|
|
5405
5405
|
delete headers[method];
|
|
@@ -5464,7 +5464,7 @@ class Axios {
|
|
|
5464
5464
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
5465
5465
|
}
|
|
5466
5466
|
}
|
|
5467
|
-
utils$
|
|
5467
|
+
utils$2.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
5468
5468
|
Axios.prototype[method] = function(url, config) {
|
|
5469
5469
|
return this.request(mergeConfig(config || {}, {
|
|
5470
5470
|
method,
|
|
@@ -5473,7 +5473,7 @@ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoDa
|
|
|
5473
5473
|
}));
|
|
5474
5474
|
};
|
|
5475
5475
|
});
|
|
5476
|
-
utils$
|
|
5476
|
+
utils$2.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
5477
5477
|
function generateHTTPMethod(isForm) {
|
|
5478
5478
|
return function httpMethod(url, data, config) {
|
|
5479
5479
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -5581,7 +5581,7 @@ function spread(callback) {
|
|
|
5581
5581
|
};
|
|
5582
5582
|
}
|
|
5583
5583
|
function isAxiosError(payload) {
|
|
5584
|
-
return utils$
|
|
5584
|
+
return utils$2.isObject(payload) && payload.isAxiosError === true;
|
|
5585
5585
|
}
|
|
5586
5586
|
const HttpStatusCode = {
|
|
5587
5587
|
Continue: 100,
|
|
@@ -5654,8 +5654,8 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
|
5654
5654
|
function createInstance(defaultConfig) {
|
|
5655
5655
|
const context = new Axios(defaultConfig);
|
|
5656
5656
|
const instance = bind(Axios.prototype.request, context);
|
|
5657
|
-
utils$
|
|
5658
|
-
utils$
|
|
5657
|
+
utils$2.extend(instance, Axios.prototype, context, { allOwnKeys: true });
|
|
5658
|
+
utils$2.extend(instance, context, null, { allOwnKeys: true });
|
|
5659
5659
|
instance.create = function create(instanceConfig) {
|
|
5660
5660
|
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
5661
5661
|
};
|
|
@@ -5677,7 +5677,7 @@ axios.spread = spread;
|
|
|
5677
5677
|
axios.isAxiosError = isAxiosError;
|
|
5678
5678
|
axios.mergeConfig = mergeConfig;
|
|
5679
5679
|
axios.AxiosHeaders = AxiosHeaders;
|
|
5680
|
-
axios.formToJSON = (thing) => formDataToJSON(utils$
|
|
5680
|
+
axios.formToJSON = (thing) => formDataToJSON(utils$2.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
5681
5681
|
axios.getAdapter = adapters.getAdapter;
|
|
5682
5682
|
axios.HttpStatusCode = HttpStatusCode;
|
|
5683
5683
|
axios.default = axios;
|
|
@@ -9560,7 +9560,7 @@ function bs({ apiHandler: e2 }) {
|
|
|
9560
9560
|
}
|
|
9561
9561
|
};
|
|
9562
9562
|
}
|
|
9563
|
-
function ws({ apiHandler: e2 }) {
|
|
9563
|
+
function ws$1({ apiHandler: e2 }) {
|
|
9564
9564
|
return {
|
|
9565
9565
|
/**
|
|
9566
9566
|
* @param { rebilly.GetWebsiteCollectionRequest } request
|
|
@@ -9612,7 +9612,7 @@ class ks {
|
|
|
9612
9612
|
apiHandler: t2
|
|
9613
9613
|
}), this.subscriptionPauses = as({ apiHandler: t2 }), this.subscriptionReactivations = ms({
|
|
9614
9614
|
apiHandler: t2
|
|
9615
|
-
}), this.subscriptions = fs({ apiHandler: t2 }), this.tags = $s({ apiHandler: t2 }), this.tagsRules = ps({ apiHandler: t2 }), this.tracking = hs({ apiHandler: t2 }), this.transactions = ys({ apiHandler: t2 }), this.usages = As({ apiHandler: t2 }), this.users = Rs({ apiHandler: t2 }), this.webhooks = bs({ apiHandler: t2 }), this.websites = ws({ apiHandler: t2 }), this.addRequestInterceptor = t2.addRequestInterceptor, this.removeRequestInterceptor = t2.removeRequestInterceptor, this.addResponseInterceptor = t2.addResponseInterceptor, this.removeResponseInterceptor = t2.removeResponseInterceptor, this.setTimeout = t2.setTimeout, this.setProxyAgent = t2.setProxyAgent, this.setSessionToken = t2.setSessionToken, this.setPublishableKey = t2.setPublishableKey, this.setEndpoints = t2.setEndpoints, this.getCancellationToken = t2.getCancellationToken, this.generateSignature = t2.generateSignature;
|
|
9615
|
+
}), this.subscriptions = fs({ apiHandler: t2 }), this.tags = $s({ apiHandler: t2 }), this.tagsRules = ps({ apiHandler: t2 }), this.tracking = hs({ apiHandler: t2 }), this.transactions = ys({ apiHandler: t2 }), this.usages = As({ apiHandler: t2 }), this.users = Rs({ apiHandler: t2 }), this.webhooks = bs({ apiHandler: t2 }), this.websites = ws$1({ apiHandler: t2 }), this.addRequestInterceptor = t2.addRequestInterceptor, this.removeRequestInterceptor = t2.removeRequestInterceptor, this.addResponseInterceptor = t2.addResponseInterceptor, this.removeResponseInterceptor = t2.removeResponseInterceptor, this.setTimeout = t2.setTimeout, this.setProxyAgent = t2.setProxyAgent, this.setSessionToken = t2.setSessionToken, this.setPublishableKey = t2.setPublishableKey, this.setEndpoints = t2.setEndpoints, this.getCancellationToken = t2.getCancellationToken, this.generateSignature = t2.generateSignature;
|
|
9616
9616
|
}
|
|
9617
9617
|
}
|
|
9618
9618
|
function vs({ apiHandler: e2 }) {
|
|
@@ -19547,7 +19547,7 @@ function extendSubschemaMode(subschema2, { jtdDiscriminator, jtdMetadata, compos
|
|
|
19547
19547
|
subschema2.jtdMetadata = jtdMetadata;
|
|
19548
19548
|
}
|
|
19549
19549
|
subschema.extendSubschemaMode = extendSubschemaMode;
|
|
19550
|
-
var resolve$
|
|
19550
|
+
var resolve$2 = {};
|
|
19551
19551
|
var fastDeepEqual = function equal(a, b2) {
|
|
19552
19552
|
if (a === b2) return true;
|
|
19553
19553
|
if (a && b2 && typeof a == "object" && typeof b2 == "object") {
|
|
@@ -19659,10 +19659,10 @@ function escapeJsonPtr(str) {
|
|
|
19659
19659
|
return str.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
19660
19660
|
}
|
|
19661
19661
|
var jsonSchemaTraverseExports = jsonSchemaTraverse.exports;
|
|
19662
|
-
Object.defineProperty(resolve$
|
|
19663
|
-
resolve$
|
|
19662
|
+
Object.defineProperty(resolve$2, "__esModule", { value: true });
|
|
19663
|
+
resolve$2.getSchemaRefs = resolve$2.resolveUrl = resolve$2.normalizeId = resolve$2._getFullPath = resolve$2.getFullPath = resolve$2.inlineRef = void 0;
|
|
19664
19664
|
const util_1$q = util;
|
|
19665
|
-
const equal$
|
|
19665
|
+
const equal$3 = fastDeepEqual;
|
|
19666
19666
|
const traverse = jsonSchemaTraverseExports;
|
|
19667
19667
|
const SIMPLE_INLINED = /* @__PURE__ */ new Set([
|
|
19668
19668
|
"type",
|
|
@@ -19691,7 +19691,7 @@ function inlineRef(schema2, limit = true) {
|
|
|
19691
19691
|
return false;
|
|
19692
19692
|
return countKeys(schema2) <= limit;
|
|
19693
19693
|
}
|
|
19694
|
-
resolve$
|
|
19694
|
+
resolve$2.inlineRef = inlineRef;
|
|
19695
19695
|
const REF_KEYWORDS = /* @__PURE__ */ new Set([
|
|
19696
19696
|
"$ref",
|
|
19697
19697
|
"$recursiveRef",
|
|
@@ -19727,28 +19727,28 @@ function countKeys(schema2) {
|
|
|
19727
19727
|
}
|
|
19728
19728
|
return count;
|
|
19729
19729
|
}
|
|
19730
|
-
function getFullPath(resolver, id2 = "",
|
|
19731
|
-
if (
|
|
19730
|
+
function getFullPath(resolver, id2 = "", normalize2) {
|
|
19731
|
+
if (normalize2 !== false)
|
|
19732
19732
|
id2 = normalizeId(id2);
|
|
19733
19733
|
const p2 = resolver.parse(id2);
|
|
19734
19734
|
return _getFullPath(resolver, p2);
|
|
19735
19735
|
}
|
|
19736
|
-
resolve$
|
|
19736
|
+
resolve$2.getFullPath = getFullPath;
|
|
19737
19737
|
function _getFullPath(resolver, p2) {
|
|
19738
19738
|
const serialized = resolver.serialize(p2);
|
|
19739
19739
|
return serialized.split("#")[0] + "#";
|
|
19740
19740
|
}
|
|
19741
|
-
resolve$
|
|
19741
|
+
resolve$2._getFullPath = _getFullPath;
|
|
19742
19742
|
const TRAILING_SLASH_HASH = /#\/?$/;
|
|
19743
19743
|
function normalizeId(id2) {
|
|
19744
19744
|
return id2 ? id2.replace(TRAILING_SLASH_HASH, "") : "";
|
|
19745
19745
|
}
|
|
19746
|
-
resolve$
|
|
19746
|
+
resolve$2.normalizeId = normalizeId;
|
|
19747
19747
|
function resolveUrl(resolver, baseId, id2) {
|
|
19748
19748
|
id2 = normalizeId(id2);
|
|
19749
19749
|
return resolver.resolve(baseId, id2);
|
|
19750
19750
|
}
|
|
19751
|
-
resolve$
|
|
19751
|
+
resolve$2.resolveUrl = resolveUrl;
|
|
19752
19752
|
const ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
|
|
19753
19753
|
function getSchemaRefs(schema2, baseId) {
|
|
19754
19754
|
if (typeof schema2 == "boolean")
|
|
@@ -19800,14 +19800,14 @@ function getSchemaRefs(schema2, baseId) {
|
|
|
19800
19800
|
});
|
|
19801
19801
|
return localRefs;
|
|
19802
19802
|
function checkAmbiguosRef(sch1, sch2, ref2) {
|
|
19803
|
-
if (sch2 !== void 0 && !equal$
|
|
19803
|
+
if (sch2 !== void 0 && !equal$3(sch1, sch2))
|
|
19804
19804
|
throw ambiguos(ref2);
|
|
19805
19805
|
}
|
|
19806
19806
|
function ambiguos(ref2) {
|
|
19807
19807
|
return new Error(`reference "${ref2}" resolves to more than one schema`);
|
|
19808
19808
|
}
|
|
19809
19809
|
}
|
|
19810
|
-
resolve$
|
|
19810
|
+
resolve$2.getSchemaRefs = getSchemaRefs;
|
|
19811
19811
|
Object.defineProperty(validate$1, "__esModule", { value: true });
|
|
19812
19812
|
validate$1.getData = validate$1.KeywordCxt = validate$1.validateFunctionCode = void 0;
|
|
19813
19813
|
const boolSchema_1 = boolSchema;
|
|
@@ -19819,7 +19819,7 @@ const keyword_1 = keyword;
|
|
|
19819
19819
|
const subschema_1 = subschema;
|
|
19820
19820
|
const codegen_1$r = codegen;
|
|
19821
19821
|
const names_1$6 = names$1;
|
|
19822
|
-
const resolve_1$2 = resolve$
|
|
19822
|
+
const resolve_1$2 = resolve$2;
|
|
19823
19823
|
const util_1$p = util;
|
|
19824
19824
|
const errors_1 = errors;
|
|
19825
19825
|
function validateFunctionCode(it2) {
|
|
@@ -20320,7 +20320,7 @@ class ValidationError extends Error {
|
|
|
20320
20320
|
validation_error.default = ValidationError;
|
|
20321
20321
|
var ref_error = {};
|
|
20322
20322
|
Object.defineProperty(ref_error, "__esModule", { value: true });
|
|
20323
|
-
const resolve_1$1 = resolve$
|
|
20323
|
+
const resolve_1$1 = resolve$2;
|
|
20324
20324
|
class MissingRefError extends Error {
|
|
20325
20325
|
constructor(resolver, baseId, ref2, msg) {
|
|
20326
20326
|
super(msg || `can't resolve reference ${ref2} from id ${baseId}`);
|
|
@@ -20335,7 +20335,7 @@ compile.resolveSchema = compile.getCompilingSchema = compile.resolveRef = compil
|
|
|
20335
20335
|
const codegen_1$q = codegen;
|
|
20336
20336
|
const validation_error_1 = validation_error;
|
|
20337
20337
|
const names_1$5 = names$1;
|
|
20338
|
-
const resolve_1 = resolve$
|
|
20338
|
+
const resolve_1 = resolve$2;
|
|
20339
20339
|
const util_1$o = util;
|
|
20340
20340
|
const validate_1$1 = validate$1;
|
|
20341
20341
|
class SchemaEnv {
|
|
@@ -20450,7 +20450,7 @@ function resolveRef(root2, baseId, ref2) {
|
|
|
20450
20450
|
const schOrFunc = root2.refs[ref2];
|
|
20451
20451
|
if (schOrFunc)
|
|
20452
20452
|
return schOrFunc;
|
|
20453
|
-
let _sch = resolve.call(this, root2, ref2);
|
|
20453
|
+
let _sch = resolve$1.call(this, root2, ref2);
|
|
20454
20454
|
if (_sch === void 0) {
|
|
20455
20455
|
const schema2 = (_a = root2.localRefs) === null || _a === void 0 ? void 0 : _a[ref2];
|
|
20456
20456
|
const { schemaId } = this.opts;
|
|
@@ -20477,7 +20477,7 @@ compile.getCompilingSchema = getCompilingSchema;
|
|
|
20477
20477
|
function sameSchemaEnv(s1, s2) {
|
|
20478
20478
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
20479
20479
|
}
|
|
20480
|
-
function resolve(root2, ref2) {
|
|
20480
|
+
function resolve$1(root2, ref2) {
|
|
20481
20481
|
let sch;
|
|
20482
20482
|
while (typeof (sch = this.refs[ref2]) == "string")
|
|
20483
20483
|
ref2 = sch;
|
|
@@ -20576,1030 +20576,655 @@ const require$$9 = {
|
|
|
20576
20576
|
additionalProperties: additionalProperties$1
|
|
20577
20577
|
};
|
|
20578
20578
|
var uri$1 = {};
|
|
20579
|
-
var
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
|
|
20583
|
-
|
|
20584
|
-
|
|
20585
|
-
|
|
20586
|
-
|
|
20587
|
-
|
|
20588
|
-
|
|
20589
|
-
|
|
20590
|
-
|
|
20591
|
-
|
|
20592
|
-
|
|
20593
|
-
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
|
|
20602
|
-
|
|
20603
|
-
|
|
20604
|
-
|
|
20605
|
-
|
|
20606
|
-
|
|
20607
|
-
|
|
20608
|
-
|
|
20609
|
-
|
|
20610
|
-
|
|
20611
|
-
|
|
20612
|
-
|
|
20613
|
-
|
|
20614
|
-
|
|
20615
|
-
|
|
20616
|
-
|
|
20617
|
-
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20625
|
-
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
|
|
20636
|
-
|
|
20637
|
-
|
|
20638
|
-
|
|
20639
|
-
|
|
20640
|
-
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$")
|
|
20646
|
-
//RFC 6874, with relaxed parsing rules
|
|
20647
|
-
};
|
|
20648
|
-
}
|
|
20649
|
-
var URI_PROTOCOL = buildExps(false);
|
|
20650
|
-
var IRI_PROTOCOL = buildExps(true);
|
|
20651
|
-
var slicedToArray = /* @__PURE__ */ function() {
|
|
20652
|
-
function sliceIterator(arr, i) {
|
|
20653
|
-
var _arr = [];
|
|
20654
|
-
var _n = true;
|
|
20655
|
-
var _d = false;
|
|
20656
|
-
var _e2 = void 0;
|
|
20657
|
-
try {
|
|
20658
|
-
for (var _i = arr[Symbol.iterator](), _s2; !(_n = (_s2 = _i.next()).done); _n = true) {
|
|
20659
|
-
_arr.push(_s2.value);
|
|
20660
|
-
if (i && _arr.length === i) break;
|
|
20661
|
-
}
|
|
20662
|
-
} catch (err) {
|
|
20663
|
-
_d = true;
|
|
20664
|
-
_e2 = err;
|
|
20665
|
-
} finally {
|
|
20666
|
-
try {
|
|
20667
|
-
if (!_n && _i["return"]) _i["return"]();
|
|
20668
|
-
} finally {
|
|
20669
|
-
if (_d) throw _e2;
|
|
20670
|
-
}
|
|
20671
|
-
}
|
|
20672
|
-
return _arr;
|
|
20673
|
-
}
|
|
20674
|
-
return function(arr, i) {
|
|
20675
|
-
if (Array.isArray(arr)) {
|
|
20676
|
-
return arr;
|
|
20677
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
20678
|
-
return sliceIterator(arr, i);
|
|
20679
|
-
} else {
|
|
20680
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
20681
|
-
}
|
|
20682
|
-
};
|
|
20683
|
-
}();
|
|
20684
|
-
var toConsumableArray = function(arr) {
|
|
20685
|
-
if (Array.isArray(arr)) {
|
|
20686
|
-
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
|
20687
|
-
return arr2;
|
|
20688
|
-
} else {
|
|
20689
|
-
return Array.from(arr);
|
|
20690
|
-
}
|
|
20691
|
-
};
|
|
20692
|
-
var maxInt = 2147483647;
|
|
20693
|
-
var base = 36;
|
|
20694
|
-
var tMin = 1;
|
|
20695
|
-
var tMax = 26;
|
|
20696
|
-
var skew = 38;
|
|
20697
|
-
var damp = 700;
|
|
20698
|
-
var initialBias = 72;
|
|
20699
|
-
var initialN = 128;
|
|
20700
|
-
var delimiter = "-";
|
|
20701
|
-
var regexPunycode = /^xn--/;
|
|
20702
|
-
var regexNonASCII = /[^\0-\x7E]/;
|
|
20703
|
-
var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
|
|
20704
|
-
var errors2 = {
|
|
20705
|
-
"overflow": "Overflow: input needs wider integers to process",
|
|
20706
|
-
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
20707
|
-
"invalid-input": "Invalid input"
|
|
20708
|
-
};
|
|
20709
|
-
var baseMinusTMin = base - tMin;
|
|
20710
|
-
var floor = Math.floor;
|
|
20711
|
-
var stringFromCharCode = String.fromCharCode;
|
|
20712
|
-
function error$12(type2) {
|
|
20713
|
-
throw new RangeError(errors2[type2]);
|
|
20714
|
-
}
|
|
20715
|
-
function map(array, fn) {
|
|
20716
|
-
var result = [];
|
|
20717
|
-
var length = array.length;
|
|
20718
|
-
while (length--) {
|
|
20719
|
-
result[length] = fn(array[length]);
|
|
20720
|
-
}
|
|
20721
|
-
return result;
|
|
20722
|
-
}
|
|
20723
|
-
function mapDomain(string, fn) {
|
|
20724
|
-
var parts = string.split("@");
|
|
20725
|
-
var result = "";
|
|
20726
|
-
if (parts.length > 1) {
|
|
20727
|
-
result = parts[0] + "@";
|
|
20728
|
-
string = parts[1];
|
|
20729
|
-
}
|
|
20730
|
-
string = string.replace(regexSeparators, ".");
|
|
20731
|
-
var labels = string.split(".");
|
|
20732
|
-
var encoded = map(labels, fn).join(".");
|
|
20733
|
-
return result + encoded;
|
|
20734
|
-
}
|
|
20735
|
-
function ucs2decode(string) {
|
|
20736
|
-
var output = [];
|
|
20737
|
-
var counter = 0;
|
|
20738
|
-
var length = string.length;
|
|
20739
|
-
while (counter < length) {
|
|
20740
|
-
var value = string.charCodeAt(counter++);
|
|
20741
|
-
if (value >= 55296 && value <= 56319 && counter < length) {
|
|
20742
|
-
var extra = string.charCodeAt(counter++);
|
|
20743
|
-
if ((extra & 64512) == 56320) {
|
|
20744
|
-
output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
20745
|
-
} else {
|
|
20746
|
-
output.push(value);
|
|
20747
|
-
counter--;
|
|
20748
|
-
}
|
|
20579
|
+
var fastUri$1 = { exports: {} };
|
|
20580
|
+
const HEX$1 = {
|
|
20581
|
+
0: 0,
|
|
20582
|
+
1: 1,
|
|
20583
|
+
2: 2,
|
|
20584
|
+
3: 3,
|
|
20585
|
+
4: 4,
|
|
20586
|
+
5: 5,
|
|
20587
|
+
6: 6,
|
|
20588
|
+
7: 7,
|
|
20589
|
+
8: 8,
|
|
20590
|
+
9: 9,
|
|
20591
|
+
a: 10,
|
|
20592
|
+
A: 10,
|
|
20593
|
+
b: 11,
|
|
20594
|
+
B: 11,
|
|
20595
|
+
c: 12,
|
|
20596
|
+
C: 12,
|
|
20597
|
+
d: 13,
|
|
20598
|
+
D: 13,
|
|
20599
|
+
e: 14,
|
|
20600
|
+
E: 14,
|
|
20601
|
+
f: 15,
|
|
20602
|
+
F: 15
|
|
20603
|
+
};
|
|
20604
|
+
var scopedChars = {
|
|
20605
|
+
HEX: HEX$1
|
|
20606
|
+
};
|
|
20607
|
+
const { HEX } = scopedChars;
|
|
20608
|
+
function normalizeIPv4$1(host) {
|
|
20609
|
+
if (findToken(host, ".") < 3) {
|
|
20610
|
+
return { host, isIPV4: false };
|
|
20611
|
+
}
|
|
20612
|
+
const matches = host.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u) || [];
|
|
20613
|
+
const [address] = matches;
|
|
20614
|
+
if (address) {
|
|
20615
|
+
return { host: stripLeadingZeros(address, "."), isIPV4: true };
|
|
20616
|
+
} else {
|
|
20617
|
+
return { host, isIPV4: false };
|
|
20618
|
+
}
|
|
20619
|
+
}
|
|
20620
|
+
function stringArrayToHexStripped(input, keepZero = false) {
|
|
20621
|
+
let acc = "";
|
|
20622
|
+
let strip = true;
|
|
20623
|
+
for (const c of input) {
|
|
20624
|
+
if (HEX[c] === void 0) return void 0;
|
|
20625
|
+
if (c !== "0" && strip === true) strip = false;
|
|
20626
|
+
if (!strip) acc += c;
|
|
20627
|
+
}
|
|
20628
|
+
if (keepZero && acc.length === 0) acc = "0";
|
|
20629
|
+
return acc;
|
|
20630
|
+
}
|
|
20631
|
+
function getIPV6(input) {
|
|
20632
|
+
let tokenCount = 0;
|
|
20633
|
+
const output = { error: false, address: "", zone: "" };
|
|
20634
|
+
const address = [];
|
|
20635
|
+
const buffer = [];
|
|
20636
|
+
let isZone = false;
|
|
20637
|
+
let endipv6Encountered = false;
|
|
20638
|
+
let endIpv6 = false;
|
|
20639
|
+
function consume() {
|
|
20640
|
+
if (buffer.length) {
|
|
20641
|
+
if (isZone === false) {
|
|
20642
|
+
const hex = stringArrayToHexStripped(buffer);
|
|
20643
|
+
if (hex !== void 0) {
|
|
20644
|
+
address.push(hex);
|
|
20749
20645
|
} else {
|
|
20750
|
-
output.
|
|
20646
|
+
output.error = true;
|
|
20647
|
+
return false;
|
|
20751
20648
|
}
|
|
20752
20649
|
}
|
|
20753
|
-
|
|
20650
|
+
buffer.length = 0;
|
|
20754
20651
|
}
|
|
20755
|
-
|
|
20756
|
-
|
|
20757
|
-
|
|
20758
|
-
|
|
20759
|
-
|
|
20760
|
-
|
|
20761
|
-
|
|
20762
|
-
|
|
20763
|
-
|
|
20764
|
-
|
|
20765
|
-
if (codePoint - 97 < 26) {
|
|
20766
|
-
return codePoint - 97;
|
|
20652
|
+
return true;
|
|
20653
|
+
}
|
|
20654
|
+
for (let i = 0; i < input.length; i++) {
|
|
20655
|
+
const cursor = input[i];
|
|
20656
|
+
if (cursor === "[" || cursor === "]") {
|
|
20657
|
+
continue;
|
|
20658
|
+
}
|
|
20659
|
+
if (cursor === ":") {
|
|
20660
|
+
if (endipv6Encountered === true) {
|
|
20661
|
+
endIpv6 = true;
|
|
20767
20662
|
}
|
|
20768
|
-
|
|
20769
|
-
|
|
20770
|
-
var digitToBasic = function digitToBasic2(digit, flag) {
|
|
20771
|
-
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
|
20772
|
-
};
|
|
20773
|
-
var adapt = function adapt2(delta, numPoints, firstTime) {
|
|
20774
|
-
var k2 = 0;
|
|
20775
|
-
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
20776
|
-
delta += floor(delta / numPoints);
|
|
20777
|
-
for (
|
|
20778
|
-
;
|
|
20779
|
-
/* no initialization */
|
|
20780
|
-
delta > baseMinusTMin * tMax >> 1;
|
|
20781
|
-
k2 += base
|
|
20782
|
-
) {
|
|
20783
|
-
delta = floor(delta / baseMinusTMin);
|
|
20784
|
-
}
|
|
20785
|
-
return floor(k2 + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
20786
|
-
};
|
|
20787
|
-
var decode = function decode2(input) {
|
|
20788
|
-
var output = [];
|
|
20789
|
-
var inputLength = input.length;
|
|
20790
|
-
var i = 0;
|
|
20791
|
-
var n2 = initialN;
|
|
20792
|
-
var bias = initialBias;
|
|
20793
|
-
var basic = input.lastIndexOf(delimiter);
|
|
20794
|
-
if (basic < 0) {
|
|
20795
|
-
basic = 0;
|
|
20796
|
-
}
|
|
20797
|
-
for (var j2 = 0; j2 < basic; ++j2) {
|
|
20798
|
-
if (input.charCodeAt(j2) >= 128) {
|
|
20799
|
-
error$12("not-basic");
|
|
20800
|
-
}
|
|
20801
|
-
output.push(input.charCodeAt(j2));
|
|
20802
|
-
}
|
|
20803
|
-
for (var index2 = basic > 0 ? basic + 1 : 0; index2 < inputLength; ) {
|
|
20804
|
-
var oldi = i;
|
|
20805
|
-
for (
|
|
20806
|
-
var w2 = 1, k2 = base;
|
|
20807
|
-
;
|
|
20808
|
-
/* no condition */
|
|
20809
|
-
k2 += base
|
|
20810
|
-
) {
|
|
20811
|
-
if (index2 >= inputLength) {
|
|
20812
|
-
error$12("invalid-input");
|
|
20813
|
-
}
|
|
20814
|
-
var digit = basicToDigit(input.charCodeAt(index2++));
|
|
20815
|
-
if (digit >= base || digit > floor((maxInt - i) / w2)) {
|
|
20816
|
-
error$12("overflow");
|
|
20817
|
-
}
|
|
20818
|
-
i += digit * w2;
|
|
20819
|
-
var t2 = k2 <= bias ? tMin : k2 >= bias + tMax ? tMax : k2 - bias;
|
|
20820
|
-
if (digit < t2) {
|
|
20821
|
-
break;
|
|
20822
|
-
}
|
|
20823
|
-
var baseMinusT = base - t2;
|
|
20824
|
-
if (w2 > floor(maxInt / baseMinusT)) {
|
|
20825
|
-
error$12("overflow");
|
|
20826
|
-
}
|
|
20827
|
-
w2 *= baseMinusT;
|
|
20828
|
-
}
|
|
20829
|
-
var out = output.length + 1;
|
|
20830
|
-
bias = adapt(i - oldi, out, oldi == 0);
|
|
20831
|
-
if (floor(i / out) > maxInt - n2) {
|
|
20832
|
-
error$12("overflow");
|
|
20833
|
-
}
|
|
20834
|
-
n2 += floor(i / out);
|
|
20835
|
-
i %= out;
|
|
20836
|
-
output.splice(i++, 0, n2);
|
|
20663
|
+
if (!consume()) {
|
|
20664
|
+
break;
|
|
20837
20665
|
}
|
|
20838
|
-
|
|
20839
|
-
|
|
20840
|
-
|
|
20841
|
-
|
|
20842
|
-
|
|
20843
|
-
var inputLength = input.length;
|
|
20844
|
-
var n2 = initialN;
|
|
20845
|
-
var delta = 0;
|
|
20846
|
-
var bias = initialBias;
|
|
20847
|
-
var _iteratorNormalCompletion = true;
|
|
20848
|
-
var _didIteratorError = false;
|
|
20849
|
-
var _iteratorError = void 0;
|
|
20850
|
-
try {
|
|
20851
|
-
for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
20852
|
-
var _currentValue2 = _step.value;
|
|
20853
|
-
if (_currentValue2 < 128) {
|
|
20854
|
-
output.push(stringFromCharCode(_currentValue2));
|
|
20855
|
-
}
|
|
20856
|
-
}
|
|
20857
|
-
} catch (err) {
|
|
20858
|
-
_didIteratorError = true;
|
|
20859
|
-
_iteratorError = err;
|
|
20860
|
-
} finally {
|
|
20861
|
-
try {
|
|
20862
|
-
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
20863
|
-
_iterator.return();
|
|
20864
|
-
}
|
|
20865
|
-
} finally {
|
|
20866
|
-
if (_didIteratorError) {
|
|
20867
|
-
throw _iteratorError;
|
|
20868
|
-
}
|
|
20869
|
-
}
|
|
20666
|
+
tokenCount++;
|
|
20667
|
+
address.push(":");
|
|
20668
|
+
if (tokenCount > 7) {
|
|
20669
|
+
output.error = true;
|
|
20670
|
+
break;
|
|
20870
20671
|
}
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
if (basicLength) {
|
|
20874
|
-
output.push(delimiter);
|
|
20672
|
+
if (i - 1 >= 0 && input[i - 1] === ":") {
|
|
20673
|
+
endipv6Encountered = true;
|
|
20875
20674
|
}
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
|
|
20879
|
-
|
|
20880
|
-
var _iteratorError2 = void 0;
|
|
20881
|
-
try {
|
|
20882
|
-
for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
20883
|
-
var currentValue = _step2.value;
|
|
20884
|
-
if (currentValue >= n2 && currentValue < m2) {
|
|
20885
|
-
m2 = currentValue;
|
|
20886
|
-
}
|
|
20887
|
-
}
|
|
20888
|
-
} catch (err) {
|
|
20889
|
-
_didIteratorError2 = true;
|
|
20890
|
-
_iteratorError2 = err;
|
|
20891
|
-
} finally {
|
|
20892
|
-
try {
|
|
20893
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
20894
|
-
_iterator2.return();
|
|
20895
|
-
}
|
|
20896
|
-
} finally {
|
|
20897
|
-
if (_didIteratorError2) {
|
|
20898
|
-
throw _iteratorError2;
|
|
20899
|
-
}
|
|
20900
|
-
}
|
|
20901
|
-
}
|
|
20902
|
-
var handledCPCountPlusOne = handledCPCount + 1;
|
|
20903
|
-
if (m2 - n2 > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
|
20904
|
-
error$12("overflow");
|
|
20905
|
-
}
|
|
20906
|
-
delta += (m2 - n2) * handledCPCountPlusOne;
|
|
20907
|
-
n2 = m2;
|
|
20908
|
-
var _iteratorNormalCompletion3 = true;
|
|
20909
|
-
var _didIteratorError3 = false;
|
|
20910
|
-
var _iteratorError3 = void 0;
|
|
20911
|
-
try {
|
|
20912
|
-
for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
20913
|
-
var _currentValue = _step3.value;
|
|
20914
|
-
if (_currentValue < n2 && ++delta > maxInt) {
|
|
20915
|
-
error$12("overflow");
|
|
20916
|
-
}
|
|
20917
|
-
if (_currentValue == n2) {
|
|
20918
|
-
var q2 = delta;
|
|
20919
|
-
for (
|
|
20920
|
-
var k2 = base;
|
|
20921
|
-
;
|
|
20922
|
-
/* no condition */
|
|
20923
|
-
k2 += base
|
|
20924
|
-
) {
|
|
20925
|
-
var t2 = k2 <= bias ? tMin : k2 >= bias + tMax ? tMax : k2 - bias;
|
|
20926
|
-
if (q2 < t2) {
|
|
20927
|
-
break;
|
|
20928
|
-
}
|
|
20929
|
-
var qMinusT = q2 - t2;
|
|
20930
|
-
var baseMinusT = base - t2;
|
|
20931
|
-
output.push(stringFromCharCode(digitToBasic(t2 + qMinusT % baseMinusT, 0)));
|
|
20932
|
-
q2 = floor(qMinusT / baseMinusT);
|
|
20933
|
-
}
|
|
20934
|
-
output.push(stringFromCharCode(digitToBasic(q2, 0)));
|
|
20935
|
-
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
|
20936
|
-
delta = 0;
|
|
20937
|
-
++handledCPCount;
|
|
20938
|
-
}
|
|
20939
|
-
}
|
|
20940
|
-
} catch (err) {
|
|
20941
|
-
_didIteratorError3 = true;
|
|
20942
|
-
_iteratorError3 = err;
|
|
20943
|
-
} finally {
|
|
20944
|
-
try {
|
|
20945
|
-
if (!_iteratorNormalCompletion3 && _iterator3.return) {
|
|
20946
|
-
_iterator3.return();
|
|
20947
|
-
}
|
|
20948
|
-
} finally {
|
|
20949
|
-
if (_didIteratorError3) {
|
|
20950
|
-
throw _iteratorError3;
|
|
20951
|
-
}
|
|
20952
|
-
}
|
|
20953
|
-
}
|
|
20954
|
-
++delta;
|
|
20955
|
-
++n2;
|
|
20675
|
+
continue;
|
|
20676
|
+
} else if (cursor === "%") {
|
|
20677
|
+
if (!consume()) {
|
|
20678
|
+
break;
|
|
20956
20679
|
}
|
|
20957
|
-
|
|
20958
|
-
}
|
|
20959
|
-
|
|
20960
|
-
|
|
20961
|
-
return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
|
|
20962
|
-
});
|
|
20963
|
-
};
|
|
20964
|
-
var toASCII = function toASCII2(input) {
|
|
20965
|
-
return mapDomain(input, function(string) {
|
|
20966
|
-
return regexNonASCII.test(string) ? "xn--" + encode2(string) : string;
|
|
20967
|
-
});
|
|
20968
|
-
};
|
|
20969
|
-
var punycode = {
|
|
20970
|
-
/**
|
|
20971
|
-
* A string representing the current Punycode.js version number.
|
|
20972
|
-
* @memberOf punycode
|
|
20973
|
-
* @type String
|
|
20974
|
-
*/
|
|
20975
|
-
"version": "2.1.0",
|
|
20976
|
-
/**
|
|
20977
|
-
* An object of methods to convert from JavaScript's internal character
|
|
20978
|
-
* representation (UCS-2) to Unicode code points, and back.
|
|
20979
|
-
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
|
20980
|
-
* @memberOf punycode
|
|
20981
|
-
* @type Object
|
|
20982
|
-
*/
|
|
20983
|
-
"ucs2": {
|
|
20984
|
-
"decode": ucs2decode,
|
|
20985
|
-
"encode": ucs2encode
|
|
20986
|
-
},
|
|
20987
|
-
"decode": decode,
|
|
20988
|
-
"encode": encode2,
|
|
20989
|
-
"toASCII": toASCII,
|
|
20990
|
-
"toUnicode": toUnicode
|
|
20991
|
-
};
|
|
20992
|
-
var SCHEMES = {};
|
|
20993
|
-
function pctEncChar(chr) {
|
|
20994
|
-
var c = chr.charCodeAt(0);
|
|
20995
|
-
var e2 = void 0;
|
|
20996
|
-
if (c < 16) e2 = "%0" + c.toString(16).toUpperCase();
|
|
20997
|
-
else if (c < 128) e2 = "%" + c.toString(16).toUpperCase();
|
|
20998
|
-
else if (c < 2048) e2 = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
|
|
20999
|
-
else e2 = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
|
|
21000
|
-
return e2;
|
|
20680
|
+
isZone = true;
|
|
20681
|
+
} else {
|
|
20682
|
+
buffer.push(cursor);
|
|
20683
|
+
continue;
|
|
21001
20684
|
}
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
|
|
21006
|
-
|
|
21007
|
-
|
|
21008
|
-
|
|
21009
|
-
|
|
21010
|
-
|
|
21011
|
-
|
|
21012
|
-
|
|
21013
|
-
|
|
21014
|
-
|
|
21015
|
-
|
|
21016
|
-
|
|
21017
|
-
|
|
21018
|
-
|
|
21019
|
-
|
|
21020
|
-
|
|
21021
|
-
|
|
21022
|
-
|
|
21023
|
-
|
|
21024
|
-
|
|
21025
|
-
|
|
21026
|
-
|
|
21027
|
-
|
|
21028
|
-
|
|
21029
|
-
|
|
21030
|
-
|
|
21031
|
-
|
|
20685
|
+
}
|
|
20686
|
+
if (buffer.length) {
|
|
20687
|
+
if (isZone) {
|
|
20688
|
+
output.zone = buffer.join("");
|
|
20689
|
+
} else if (endIpv6) {
|
|
20690
|
+
address.push(buffer.join(""));
|
|
20691
|
+
} else {
|
|
20692
|
+
address.push(stringArrayToHexStripped(buffer));
|
|
20693
|
+
}
|
|
20694
|
+
}
|
|
20695
|
+
output.address = address.join("");
|
|
20696
|
+
return output;
|
|
20697
|
+
}
|
|
20698
|
+
function normalizeIPv6$1(host, opts = {}) {
|
|
20699
|
+
if (findToken(host, ":") < 2) {
|
|
20700
|
+
return { host, isIPV6: false };
|
|
20701
|
+
}
|
|
20702
|
+
const ipv6 = getIPV6(host);
|
|
20703
|
+
if (!ipv6.error) {
|
|
20704
|
+
let newHost = ipv6.address;
|
|
20705
|
+
let escapedHost = ipv6.address;
|
|
20706
|
+
if (ipv6.zone) {
|
|
20707
|
+
newHost += "%" + ipv6.zone;
|
|
20708
|
+
escapedHost += "%25" + ipv6.zone;
|
|
20709
|
+
}
|
|
20710
|
+
return { host: newHost, escapedHost, isIPV6: true };
|
|
20711
|
+
} else {
|
|
20712
|
+
return { host, isIPV6: false };
|
|
20713
|
+
}
|
|
20714
|
+
}
|
|
20715
|
+
function stripLeadingZeros(str, token) {
|
|
20716
|
+
let out = "";
|
|
20717
|
+
let skip = true;
|
|
20718
|
+
const l = str.length;
|
|
20719
|
+
for (let i = 0; i < l; i++) {
|
|
20720
|
+
const c = str[i];
|
|
20721
|
+
if (c === "0" && skip) {
|
|
20722
|
+
if (i + 1 <= l && str[i + 1] === token || i + 1 === l) {
|
|
20723
|
+
out += c;
|
|
20724
|
+
skip = false;
|
|
21032
20725
|
}
|
|
21033
|
-
|
|
21034
|
-
|
|
21035
|
-
|
|
21036
|
-
function decodeUnreserved2(str) {
|
|
21037
|
-
var decStr = pctDecChars(str);
|
|
21038
|
-
return !decStr.match(protocol.UNRESERVED) ? str : decStr;
|
|
21039
|
-
}
|
|
21040
|
-
if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME, "");
|
|
21041
|
-
if (components.userinfo !== void 0) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
21042
|
-
if (components.host !== void 0) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
21043
|
-
if (components.path !== void 0) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
21044
|
-
if (components.query !== void 0) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
21045
|
-
if (components.fragment !== void 0) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
21046
|
-
return components;
|
|
21047
|
-
}
|
|
21048
|
-
function _stripLeadingZeros(str) {
|
|
21049
|
-
return str.replace(/^0*(.*)/, "$1") || "0";
|
|
21050
|
-
}
|
|
21051
|
-
function _normalizeIPv4(host, protocol) {
|
|
21052
|
-
var matches = host.match(protocol.IPV4ADDRESS) || [];
|
|
21053
|
-
var _matches = slicedToArray(matches, 2), address = _matches[1];
|
|
21054
|
-
if (address) {
|
|
21055
|
-
return address.split(".").map(_stripLeadingZeros).join(".");
|
|
21056
|
-
} else {
|
|
21057
|
-
return host;
|
|
21058
|
-
}
|
|
21059
|
-
}
|
|
21060
|
-
function _normalizeIPv6(host, protocol) {
|
|
21061
|
-
var matches = host.match(protocol.IPV6ADDRESS) || [];
|
|
21062
|
-
var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2];
|
|
21063
|
-
if (address) {
|
|
21064
|
-
var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1];
|
|
21065
|
-
var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
|
|
21066
|
-
var lastFields = last.split(":").map(_stripLeadingZeros);
|
|
21067
|
-
var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
|
|
21068
|
-
var fieldCount = isLastFieldIPv4Address ? 7 : 8;
|
|
21069
|
-
var lastFieldsStart = lastFields.length - fieldCount;
|
|
21070
|
-
var fields = Array(fieldCount);
|
|
21071
|
-
for (var x2 = 0; x2 < fieldCount; ++x2) {
|
|
21072
|
-
fields[x2] = firstFields[x2] || lastFields[lastFieldsStart + x2] || "";
|
|
21073
|
-
}
|
|
21074
|
-
if (isLastFieldIPv4Address) {
|
|
21075
|
-
fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
|
|
21076
|
-
}
|
|
21077
|
-
var allZeroFields = fields.reduce(function(acc, field, index2) {
|
|
21078
|
-
if (!field || field === "0") {
|
|
21079
|
-
var lastLongest = acc[acc.length - 1];
|
|
21080
|
-
if (lastLongest && lastLongest.index + lastLongest.length === index2) {
|
|
21081
|
-
lastLongest.length++;
|
|
21082
|
-
} else {
|
|
21083
|
-
acc.push({ index: index2, length: 1 });
|
|
21084
|
-
}
|
|
21085
|
-
}
|
|
21086
|
-
return acc;
|
|
21087
|
-
}, []);
|
|
21088
|
-
var longestZeroFields = allZeroFields.sort(function(a, b2) {
|
|
21089
|
-
return b2.length - a.length;
|
|
21090
|
-
})[0];
|
|
21091
|
-
var newHost = void 0;
|
|
21092
|
-
if (longestZeroFields && longestZeroFields.length > 1) {
|
|
21093
|
-
var newFirst = fields.slice(0, longestZeroFields.index);
|
|
21094
|
-
var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
|
|
21095
|
-
newHost = newFirst.join(":") + "::" + newLast.join(":");
|
|
21096
|
-
} else {
|
|
21097
|
-
newHost = fields.join(":");
|
|
21098
|
-
}
|
|
21099
|
-
if (zone) {
|
|
21100
|
-
newHost += "%" + zone;
|
|
21101
|
-
}
|
|
21102
|
-
return newHost;
|
|
20726
|
+
} else {
|
|
20727
|
+
if (c === token) {
|
|
20728
|
+
skip = true;
|
|
21103
20729
|
} else {
|
|
21104
|
-
|
|
21105
|
-
}
|
|
21106
|
-
|
|
21107
|
-
|
|
21108
|
-
|
|
21109
|
-
|
|
21110
|
-
|
|
21111
|
-
|
|
21112
|
-
|
|
21113
|
-
|
|
21114
|
-
|
|
21115
|
-
|
|
21116
|
-
|
|
21117
|
-
|
|
21118
|
-
|
|
21119
|
-
|
|
21120
|
-
|
|
21121
|
-
|
|
21122
|
-
|
|
21123
|
-
|
|
21124
|
-
|
|
21125
|
-
|
|
21126
|
-
|
|
21127
|
-
|
|
21128
|
-
|
|
21129
|
-
|
|
21130
|
-
|
|
21131
|
-
|
|
21132
|
-
|
|
21133
|
-
|
|
21134
|
-
|
|
21135
|
-
|
|
21136
|
-
|
|
21137
|
-
|
|
21138
|
-
|
|
21139
|
-
|
|
21140
|
-
components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
|
|
21141
|
-
}
|
|
21142
|
-
if (components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0) {
|
|
21143
|
-
components.reference = "same-document";
|
|
21144
|
-
} else if (components.scheme === void 0) {
|
|
21145
|
-
components.reference = "relative";
|
|
21146
|
-
} else if (components.fragment === void 0) {
|
|
21147
|
-
components.reference = "absolute";
|
|
21148
|
-
} else {
|
|
21149
|
-
components.reference = "uri";
|
|
21150
|
-
}
|
|
21151
|
-
if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
|
|
21152
|
-
components.error = components.error || "URI is not a " + options.reference + " reference.";
|
|
21153
|
-
}
|
|
21154
|
-
var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
|
21155
|
-
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
21156
|
-
if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
|
|
21157
|
-
try {
|
|
21158
|
-
components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
|
|
21159
|
-
} catch (e2) {
|
|
21160
|
-
components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e2;
|
|
21161
|
-
}
|
|
21162
|
-
}
|
|
21163
|
-
_normalizeComponentEncoding(components, URI_PROTOCOL);
|
|
21164
|
-
} else {
|
|
21165
|
-
_normalizeComponentEncoding(components, protocol);
|
|
21166
|
-
}
|
|
21167
|
-
if (schemeHandler && schemeHandler.parse) {
|
|
21168
|
-
schemeHandler.parse(components, options);
|
|
21169
|
-
}
|
|
20730
|
+
skip = false;
|
|
20731
|
+
}
|
|
20732
|
+
out += c;
|
|
20733
|
+
}
|
|
20734
|
+
}
|
|
20735
|
+
return out;
|
|
20736
|
+
}
|
|
20737
|
+
function findToken(str, token) {
|
|
20738
|
+
let ind = 0;
|
|
20739
|
+
for (let i = 0; i < str.length; i++) {
|
|
20740
|
+
if (str[i] === token) ind++;
|
|
20741
|
+
}
|
|
20742
|
+
return ind;
|
|
20743
|
+
}
|
|
20744
|
+
const RDS1 = /^\.\.?\//u;
|
|
20745
|
+
const RDS2 = /^\/\.(?:\/|$)/u;
|
|
20746
|
+
const RDS3 = /^\/\.\.(?:\/|$)/u;
|
|
20747
|
+
const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u;
|
|
20748
|
+
function removeDotSegments$1(input) {
|
|
20749
|
+
const output = [];
|
|
20750
|
+
while (input.length) {
|
|
20751
|
+
if (input.match(RDS1)) {
|
|
20752
|
+
input = input.replace(RDS1, "");
|
|
20753
|
+
} else if (input.match(RDS2)) {
|
|
20754
|
+
input = input.replace(RDS2, "/");
|
|
20755
|
+
} else if (input.match(RDS3)) {
|
|
20756
|
+
input = input.replace(RDS3, "/");
|
|
20757
|
+
output.pop();
|
|
20758
|
+
} else if (input === "." || input === "..") {
|
|
20759
|
+
input = "";
|
|
20760
|
+
} else {
|
|
20761
|
+
const im = input.match(RDS5);
|
|
20762
|
+
if (im) {
|
|
20763
|
+
const s = im[0];
|
|
20764
|
+
input = input.slice(s.length);
|
|
20765
|
+
output.push(s);
|
|
21170
20766
|
} else {
|
|
21171
|
-
|
|
21172
|
-
}
|
|
21173
|
-
return components;
|
|
21174
|
-
}
|
|
21175
|
-
function _recomposeAuthority(components, options) {
|
|
21176
|
-
var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
|
|
21177
|
-
var uriTokens = [];
|
|
21178
|
-
if (components.userinfo !== void 0) {
|
|
21179
|
-
uriTokens.push(components.userinfo);
|
|
21180
|
-
uriTokens.push("@");
|
|
21181
|
-
}
|
|
21182
|
-
if (components.host !== void 0) {
|
|
21183
|
-
uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function(_2, $1, $2) {
|
|
21184
|
-
return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
|
|
21185
|
-
}));
|
|
21186
|
-
}
|
|
21187
|
-
if (typeof components.port === "number" || typeof components.port === "string") {
|
|
21188
|
-
uriTokens.push(":");
|
|
21189
|
-
uriTokens.push(String(components.port));
|
|
21190
|
-
}
|
|
21191
|
-
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
21192
|
-
}
|
|
21193
|
-
var RDS1 = /^\.\.?\//;
|
|
21194
|
-
var RDS2 = /^\/\.(\/|$)/;
|
|
21195
|
-
var RDS3 = /^\/\.\.(\/|$)/;
|
|
21196
|
-
var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
|
|
21197
|
-
function removeDotSegments(input) {
|
|
21198
|
-
var output = [];
|
|
21199
|
-
while (input.length) {
|
|
21200
|
-
if (input.match(RDS1)) {
|
|
21201
|
-
input = input.replace(RDS1, "");
|
|
21202
|
-
} else if (input.match(RDS2)) {
|
|
21203
|
-
input = input.replace(RDS2, "/");
|
|
21204
|
-
} else if (input.match(RDS3)) {
|
|
21205
|
-
input = input.replace(RDS3, "/");
|
|
21206
|
-
output.pop();
|
|
21207
|
-
} else if (input === "." || input === "..") {
|
|
21208
|
-
input = "";
|
|
21209
|
-
} else {
|
|
21210
|
-
var im = input.match(RDS5);
|
|
21211
|
-
if (im) {
|
|
21212
|
-
var s = im[0];
|
|
21213
|
-
input = input.slice(s.length);
|
|
21214
|
-
output.push(s);
|
|
21215
|
-
} else {
|
|
21216
|
-
throw new Error("Unexpected dot segment condition");
|
|
21217
|
-
}
|
|
21218
|
-
}
|
|
20767
|
+
throw new Error("Unexpected dot segment condition");
|
|
21219
20768
|
}
|
|
21220
|
-
|
|
21221
|
-
|
|
21222
|
-
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
|
|
21226
|
-
|
|
21227
|
-
|
|
21228
|
-
|
|
21229
|
-
|
|
21230
|
-
|
|
21231
|
-
|
|
21232
|
-
|
|
21233
|
-
|
|
21234
|
-
|
|
21235
|
-
|
|
21236
|
-
|
|
21237
|
-
|
|
21238
|
-
|
|
21239
|
-
|
|
21240
|
-
|
|
21241
|
-
|
|
21242
|
-
|
|
21243
|
-
|
|
21244
|
-
|
|
21245
|
-
|
|
21246
|
-
|
|
21247
|
-
|
|
21248
|
-
|
|
21249
|
-
|
|
21250
|
-
|
|
21251
|
-
|
|
20769
|
+
}
|
|
20770
|
+
}
|
|
20771
|
+
return output.join("");
|
|
20772
|
+
}
|
|
20773
|
+
function normalizeComponentEncoding$1(components, esc) {
|
|
20774
|
+
const func = esc !== true ? escape : unescape;
|
|
20775
|
+
if (components.scheme !== void 0) {
|
|
20776
|
+
components.scheme = func(components.scheme);
|
|
20777
|
+
}
|
|
20778
|
+
if (components.userinfo !== void 0) {
|
|
20779
|
+
components.userinfo = func(components.userinfo);
|
|
20780
|
+
}
|
|
20781
|
+
if (components.host !== void 0) {
|
|
20782
|
+
components.host = func(components.host);
|
|
20783
|
+
}
|
|
20784
|
+
if (components.path !== void 0) {
|
|
20785
|
+
components.path = func(components.path);
|
|
20786
|
+
}
|
|
20787
|
+
if (components.query !== void 0) {
|
|
20788
|
+
components.query = func(components.query);
|
|
20789
|
+
}
|
|
20790
|
+
if (components.fragment !== void 0) {
|
|
20791
|
+
components.fragment = func(components.fragment);
|
|
20792
|
+
}
|
|
20793
|
+
return components;
|
|
20794
|
+
}
|
|
20795
|
+
function recomposeAuthority$1(components, options) {
|
|
20796
|
+
const uriTokens = [];
|
|
20797
|
+
if (components.userinfo !== void 0) {
|
|
20798
|
+
uriTokens.push(components.userinfo);
|
|
20799
|
+
uriTokens.push("@");
|
|
20800
|
+
}
|
|
20801
|
+
if (components.host !== void 0) {
|
|
20802
|
+
let host = unescape(components.host);
|
|
20803
|
+
const ipV4res = normalizeIPv4$1(host);
|
|
20804
|
+
if (ipV4res.isIPV4) {
|
|
20805
|
+
host = ipV4res.host;
|
|
20806
|
+
} else {
|
|
20807
|
+
const ipV6res = normalizeIPv6$1(ipV4res.host, { isIPV4: false });
|
|
20808
|
+
if (ipV6res.isIPV6 === true) {
|
|
20809
|
+
host = `[${ipV6res.escapedHost}]`;
|
|
20810
|
+
} else {
|
|
20811
|
+
host = components.host;
|
|
21252
20812
|
}
|
|
21253
|
-
|
|
21254
|
-
|
|
21255
|
-
|
|
21256
|
-
|
|
21257
|
-
|
|
21258
|
-
|
|
21259
|
-
|
|
20813
|
+
}
|
|
20814
|
+
uriTokens.push(host);
|
|
20815
|
+
}
|
|
20816
|
+
if (typeof components.port === "number" || typeof components.port === "string") {
|
|
20817
|
+
uriTokens.push(":");
|
|
20818
|
+
uriTokens.push(String(components.port));
|
|
20819
|
+
}
|
|
20820
|
+
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
20821
|
+
}
|
|
20822
|
+
var utils = {
|
|
20823
|
+
recomposeAuthority: recomposeAuthority$1,
|
|
20824
|
+
normalizeComponentEncoding: normalizeComponentEncoding$1,
|
|
20825
|
+
removeDotSegments: removeDotSegments$1,
|
|
20826
|
+
normalizeIPv4: normalizeIPv4$1,
|
|
20827
|
+
normalizeIPv6: normalizeIPv6$1,
|
|
20828
|
+
stringArrayToHexStripped
|
|
20829
|
+
};
|
|
20830
|
+
const UUID_REG = /^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu;
|
|
20831
|
+
const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
20832
|
+
function isSecure(wsComponents) {
|
|
20833
|
+
return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
|
|
20834
|
+
}
|
|
20835
|
+
function httpParse(components) {
|
|
20836
|
+
if (!components.host) {
|
|
20837
|
+
components.error = components.error || "HTTP URIs must have a host.";
|
|
20838
|
+
}
|
|
20839
|
+
return components;
|
|
20840
|
+
}
|
|
20841
|
+
function httpSerialize(components) {
|
|
20842
|
+
const secure = String(components.scheme).toLowerCase() === "https";
|
|
20843
|
+
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
20844
|
+
components.port = void 0;
|
|
20845
|
+
}
|
|
20846
|
+
if (!components.path) {
|
|
20847
|
+
components.path = "/";
|
|
20848
|
+
}
|
|
20849
|
+
return components;
|
|
20850
|
+
}
|
|
20851
|
+
function wsParse(wsComponents) {
|
|
20852
|
+
wsComponents.secure = isSecure(wsComponents);
|
|
20853
|
+
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
20854
|
+
wsComponents.path = void 0;
|
|
20855
|
+
wsComponents.query = void 0;
|
|
20856
|
+
return wsComponents;
|
|
20857
|
+
}
|
|
20858
|
+
function wsSerialize(wsComponents) {
|
|
20859
|
+
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
20860
|
+
wsComponents.port = void 0;
|
|
20861
|
+
}
|
|
20862
|
+
if (typeof wsComponents.secure === "boolean") {
|
|
20863
|
+
wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
|
|
20864
|
+
wsComponents.secure = void 0;
|
|
20865
|
+
}
|
|
20866
|
+
if (wsComponents.resourceName) {
|
|
20867
|
+
const [path, query] = wsComponents.resourceName.split("?");
|
|
20868
|
+
wsComponents.path = path && path !== "/" ? path : void 0;
|
|
20869
|
+
wsComponents.query = query;
|
|
20870
|
+
wsComponents.resourceName = void 0;
|
|
20871
|
+
}
|
|
20872
|
+
wsComponents.fragment = void 0;
|
|
20873
|
+
return wsComponents;
|
|
20874
|
+
}
|
|
20875
|
+
function urnParse(urnComponents, options) {
|
|
20876
|
+
if (!urnComponents.path) {
|
|
20877
|
+
urnComponents.error = "URN can not be parsed";
|
|
20878
|
+
return urnComponents;
|
|
20879
|
+
}
|
|
20880
|
+
const matches = urnComponents.path.match(URN_REG);
|
|
20881
|
+
if (matches) {
|
|
20882
|
+
const scheme = options.scheme || urnComponents.scheme || "urn";
|
|
20883
|
+
urnComponents.nid = matches[1].toLowerCase();
|
|
20884
|
+
urnComponents.nss = matches[2];
|
|
20885
|
+
const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`;
|
|
20886
|
+
const schemeHandler = SCHEMES$1[urnScheme];
|
|
20887
|
+
urnComponents.path = void 0;
|
|
20888
|
+
if (schemeHandler) {
|
|
20889
|
+
urnComponents = schemeHandler.parse(urnComponents, options);
|
|
20890
|
+
}
|
|
20891
|
+
} else {
|
|
20892
|
+
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
|
20893
|
+
}
|
|
20894
|
+
return urnComponents;
|
|
20895
|
+
}
|
|
20896
|
+
function urnSerialize(urnComponents, options) {
|
|
20897
|
+
const scheme = options.scheme || urnComponents.scheme || "urn";
|
|
20898
|
+
const nid = urnComponents.nid.toLowerCase();
|
|
20899
|
+
const urnScheme = `${scheme}:${options.nid || nid}`;
|
|
20900
|
+
const schemeHandler = SCHEMES$1[urnScheme];
|
|
20901
|
+
if (schemeHandler) {
|
|
20902
|
+
urnComponents = schemeHandler.serialize(urnComponents, options);
|
|
20903
|
+
}
|
|
20904
|
+
const uriComponents = urnComponents;
|
|
20905
|
+
const nss = urnComponents.nss;
|
|
20906
|
+
uriComponents.path = `${nid || options.nid}:${nss}`;
|
|
20907
|
+
options.skipEscape = true;
|
|
20908
|
+
return uriComponents;
|
|
20909
|
+
}
|
|
20910
|
+
function urnuuidParse(urnComponents, options) {
|
|
20911
|
+
const uuidComponents = urnComponents;
|
|
20912
|
+
uuidComponents.uuid = uuidComponents.nss;
|
|
20913
|
+
uuidComponents.nss = void 0;
|
|
20914
|
+
if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {
|
|
20915
|
+
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
|
20916
|
+
}
|
|
20917
|
+
return uuidComponents;
|
|
20918
|
+
}
|
|
20919
|
+
function urnuuidSerialize(uuidComponents) {
|
|
20920
|
+
const urnComponents = uuidComponents;
|
|
20921
|
+
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
20922
|
+
return urnComponents;
|
|
20923
|
+
}
|
|
20924
|
+
const http = {
|
|
20925
|
+
scheme: "http",
|
|
20926
|
+
domainHost: true,
|
|
20927
|
+
parse: httpParse,
|
|
20928
|
+
serialize: httpSerialize
|
|
20929
|
+
};
|
|
20930
|
+
const https = {
|
|
20931
|
+
scheme: "https",
|
|
20932
|
+
domainHost: http.domainHost,
|
|
20933
|
+
parse: httpParse,
|
|
20934
|
+
serialize: httpSerialize
|
|
20935
|
+
};
|
|
20936
|
+
const ws = {
|
|
20937
|
+
scheme: "ws",
|
|
20938
|
+
domainHost: true,
|
|
20939
|
+
parse: wsParse,
|
|
20940
|
+
serialize: wsSerialize
|
|
20941
|
+
};
|
|
20942
|
+
const wss = {
|
|
20943
|
+
scheme: "wss",
|
|
20944
|
+
domainHost: ws.domainHost,
|
|
20945
|
+
parse: ws.parse,
|
|
20946
|
+
serialize: ws.serialize
|
|
20947
|
+
};
|
|
20948
|
+
const urn = {
|
|
20949
|
+
scheme: "urn",
|
|
20950
|
+
parse: urnParse,
|
|
20951
|
+
serialize: urnSerialize,
|
|
20952
|
+
skipNormalize: true
|
|
20953
|
+
};
|
|
20954
|
+
const urnuuid = {
|
|
20955
|
+
scheme: "urn:uuid",
|
|
20956
|
+
parse: urnuuidParse,
|
|
20957
|
+
serialize: urnuuidSerialize,
|
|
20958
|
+
skipNormalize: true
|
|
20959
|
+
};
|
|
20960
|
+
const SCHEMES$1 = {
|
|
20961
|
+
http,
|
|
20962
|
+
https,
|
|
20963
|
+
ws,
|
|
20964
|
+
wss,
|
|
20965
|
+
urn,
|
|
20966
|
+
"urn:uuid": urnuuid
|
|
20967
|
+
};
|
|
20968
|
+
var schemes = SCHEMES$1;
|
|
20969
|
+
const { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = utils;
|
|
20970
|
+
const SCHEMES = schemes;
|
|
20971
|
+
function normalize(uri2, options) {
|
|
20972
|
+
if (typeof uri2 === "string") {
|
|
20973
|
+
uri2 = serialize(parse(uri2, options), options);
|
|
20974
|
+
} else if (typeof uri2 === "object") {
|
|
20975
|
+
uri2 = parse(serialize(uri2, options), options);
|
|
20976
|
+
}
|
|
20977
|
+
return uri2;
|
|
20978
|
+
}
|
|
20979
|
+
function resolve(baseURI, relativeURI, options) {
|
|
20980
|
+
const schemelessOptions = Object.assign({ scheme: "null" }, options);
|
|
20981
|
+
const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
20982
|
+
return serialize(resolved, { ...schemelessOptions, skipEscape: true });
|
|
20983
|
+
}
|
|
20984
|
+
function resolveComponents(base, relative, options, skipNormalization) {
|
|
20985
|
+
const target = {};
|
|
20986
|
+
if (!skipNormalization) {
|
|
20987
|
+
base = parse(serialize(base, options), options);
|
|
20988
|
+
relative = parse(serialize(relative, options), options);
|
|
20989
|
+
}
|
|
20990
|
+
options = options || {};
|
|
20991
|
+
if (!options.tolerant && relative.scheme) {
|
|
20992
|
+
target.scheme = relative.scheme;
|
|
20993
|
+
target.userinfo = relative.userinfo;
|
|
20994
|
+
target.host = relative.host;
|
|
20995
|
+
target.port = relative.port;
|
|
20996
|
+
target.path = removeDotSegments(relative.path || "");
|
|
20997
|
+
target.query = relative.query;
|
|
20998
|
+
} else {
|
|
20999
|
+
if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {
|
|
21000
|
+
target.userinfo = relative.userinfo;
|
|
21001
|
+
target.host = relative.host;
|
|
21002
|
+
target.port = relative.port;
|
|
21003
|
+
target.path = removeDotSegments(relative.path || "");
|
|
21004
|
+
target.query = relative.query;
|
|
21005
|
+
} else {
|
|
21006
|
+
if (!relative.path) {
|
|
21007
|
+
target.path = base.path;
|
|
21008
|
+
if (relative.query !== void 0) {
|
|
21009
|
+
target.query = relative.query;
|
|
21010
|
+
} else {
|
|
21011
|
+
target.query = base.query;
|
|
21260
21012
|
}
|
|
21261
|
-
uriTokens.push(s);
|
|
21262
|
-
}
|
|
21263
|
-
if (components.query !== void 0) {
|
|
21264
|
-
uriTokens.push("?");
|
|
21265
|
-
uriTokens.push(components.query);
|
|
21266
|
-
}
|
|
21267
|
-
if (components.fragment !== void 0) {
|
|
21268
|
-
uriTokens.push("#");
|
|
21269
|
-
uriTokens.push(components.fragment);
|
|
21270
|
-
}
|
|
21271
|
-
return uriTokens.join("");
|
|
21272
|
-
}
|
|
21273
|
-
function resolveComponents(base2, relative) {
|
|
21274
|
-
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
21275
|
-
var skipNormalization = arguments[3];
|
|
21276
|
-
var target = {};
|
|
21277
|
-
if (!skipNormalization) {
|
|
21278
|
-
base2 = parse(serialize(base2, options), options);
|
|
21279
|
-
relative = parse(serialize(relative, options), options);
|
|
21280
|
-
}
|
|
21281
|
-
options = options || {};
|
|
21282
|
-
if (!options.tolerant && relative.scheme) {
|
|
21283
|
-
target.scheme = relative.scheme;
|
|
21284
|
-
target.userinfo = relative.userinfo;
|
|
21285
|
-
target.host = relative.host;
|
|
21286
|
-
target.port = relative.port;
|
|
21287
|
-
target.path = removeDotSegments(relative.path || "");
|
|
21288
|
-
target.query = relative.query;
|
|
21289
21013
|
} else {
|
|
21290
|
-
if (relative.
|
|
21291
|
-
target.
|
|
21292
|
-
target.host = relative.host;
|
|
21293
|
-
target.port = relative.port;
|
|
21294
|
-
target.path = removeDotSegments(relative.path || "");
|
|
21295
|
-
target.query = relative.query;
|
|
21014
|
+
if (relative.path.charAt(0) === "/") {
|
|
21015
|
+
target.path = removeDotSegments(relative.path);
|
|
21296
21016
|
} else {
|
|
21297
|
-
if (!
|
|
21298
|
-
target.path =
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
} else {
|
|
21302
|
-
target.query = base2.query;
|
|
21303
|
-
}
|
|
21017
|
+
if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
|
|
21018
|
+
target.path = "/" + relative.path;
|
|
21019
|
+
} else if (!base.path) {
|
|
21020
|
+
target.path = relative.path;
|
|
21304
21021
|
} else {
|
|
21305
|
-
|
|
21306
|
-
target.path = removeDotSegments(relative.path);
|
|
21307
|
-
} else {
|
|
21308
|
-
if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) {
|
|
21309
|
-
target.path = "/" + relative.path;
|
|
21310
|
-
} else if (!base2.path) {
|
|
21311
|
-
target.path = relative.path;
|
|
21312
|
-
} else {
|
|
21313
|
-
target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative.path;
|
|
21314
|
-
}
|
|
21315
|
-
target.path = removeDotSegments(target.path);
|
|
21316
|
-
}
|
|
21317
|
-
target.query = relative.query;
|
|
21022
|
+
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
21318
21023
|
}
|
|
21319
|
-
target.
|
|
21320
|
-
target.host = base2.host;
|
|
21321
|
-
target.port = base2.port;
|
|
21024
|
+
target.path = removeDotSegments(target.path);
|
|
21322
21025
|
}
|
|
21323
|
-
target.
|
|
21026
|
+
target.query = relative.query;
|
|
21324
21027
|
}
|
|
21325
|
-
target.
|
|
21326
|
-
|
|
21028
|
+
target.userinfo = base.userinfo;
|
|
21029
|
+
target.host = base.host;
|
|
21030
|
+
target.port = base.port;
|
|
21031
|
+
}
|
|
21032
|
+
target.scheme = base.scheme;
|
|
21033
|
+
}
|
|
21034
|
+
target.fragment = relative.fragment;
|
|
21035
|
+
return target;
|
|
21036
|
+
}
|
|
21037
|
+
function equal$2(uriA, uriB, options) {
|
|
21038
|
+
if (typeof uriA === "string") {
|
|
21039
|
+
uriA = unescape(uriA);
|
|
21040
|
+
uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true });
|
|
21041
|
+
} else if (typeof uriA === "object") {
|
|
21042
|
+
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
|
|
21043
|
+
}
|
|
21044
|
+
if (typeof uriB === "string") {
|
|
21045
|
+
uriB = unescape(uriB);
|
|
21046
|
+
uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true });
|
|
21047
|
+
} else if (typeof uriB === "object") {
|
|
21048
|
+
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
|
|
21049
|
+
}
|
|
21050
|
+
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
21051
|
+
}
|
|
21052
|
+
function serialize(cmpts, opts) {
|
|
21053
|
+
const components = {
|
|
21054
|
+
host: cmpts.host,
|
|
21055
|
+
scheme: cmpts.scheme,
|
|
21056
|
+
userinfo: cmpts.userinfo,
|
|
21057
|
+
port: cmpts.port,
|
|
21058
|
+
path: cmpts.path,
|
|
21059
|
+
query: cmpts.query,
|
|
21060
|
+
nid: cmpts.nid,
|
|
21061
|
+
nss: cmpts.nss,
|
|
21062
|
+
uuid: cmpts.uuid,
|
|
21063
|
+
fragment: cmpts.fragment,
|
|
21064
|
+
reference: cmpts.reference,
|
|
21065
|
+
resourceName: cmpts.resourceName,
|
|
21066
|
+
secure: cmpts.secure,
|
|
21067
|
+
error: ""
|
|
21068
|
+
};
|
|
21069
|
+
const options = Object.assign({}, opts);
|
|
21070
|
+
const uriTokens = [];
|
|
21071
|
+
const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
|
21072
|
+
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
|
|
21073
|
+
if (components.path !== void 0) {
|
|
21074
|
+
if (!options.skipEscape) {
|
|
21075
|
+
components.path = escape(components.path);
|
|
21076
|
+
if (components.scheme !== void 0) {
|
|
21077
|
+
components.path = components.path.split("%3A").join(":");
|
|
21078
|
+
}
|
|
21079
|
+
} else {
|
|
21080
|
+
components.path = unescape(components.path);
|
|
21327
21081
|
}
|
|
21328
|
-
|
|
21329
|
-
|
|
21330
|
-
|
|
21082
|
+
}
|
|
21083
|
+
if (options.reference !== "suffix" && components.scheme) {
|
|
21084
|
+
uriTokens.push(components.scheme);
|
|
21085
|
+
uriTokens.push(":");
|
|
21086
|
+
}
|
|
21087
|
+
const authority = recomposeAuthority(components, options);
|
|
21088
|
+
if (authority !== void 0) {
|
|
21089
|
+
if (options.reference !== "suffix") {
|
|
21090
|
+
uriTokens.push("//");
|
|
21331
21091
|
}
|
|
21332
|
-
|
|
21333
|
-
|
|
21334
|
-
|
|
21335
|
-
} else if (typeOf(uri2) === "object") {
|
|
21336
|
-
uri2 = parse(serialize(uri2, options), options);
|
|
21337
|
-
}
|
|
21338
|
-
return uri2;
|
|
21092
|
+
uriTokens.push(authority);
|
|
21093
|
+
if (components.path && components.path.charAt(0) !== "/") {
|
|
21094
|
+
uriTokens.push("/");
|
|
21339
21095
|
}
|
|
21340
|
-
|
|
21341
|
-
|
|
21342
|
-
|
|
21343
|
-
|
|
21344
|
-
|
|
21345
|
-
|
|
21346
|
-
|
|
21347
|
-
|
|
21348
|
-
|
|
21349
|
-
|
|
21096
|
+
}
|
|
21097
|
+
if (components.path !== void 0) {
|
|
21098
|
+
let s = components.path;
|
|
21099
|
+
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
21100
|
+
s = removeDotSegments(s);
|
|
21101
|
+
}
|
|
21102
|
+
if (authority === void 0) {
|
|
21103
|
+
s = s.replace(/^\/\//u, "/%2F");
|
|
21104
|
+
}
|
|
21105
|
+
uriTokens.push(s);
|
|
21106
|
+
}
|
|
21107
|
+
if (components.query !== void 0) {
|
|
21108
|
+
uriTokens.push("?");
|
|
21109
|
+
uriTokens.push(components.query);
|
|
21110
|
+
}
|
|
21111
|
+
if (components.fragment !== void 0) {
|
|
21112
|
+
uriTokens.push("#");
|
|
21113
|
+
uriTokens.push(components.fragment);
|
|
21114
|
+
}
|
|
21115
|
+
return uriTokens.join("");
|
|
21116
|
+
}
|
|
21117
|
+
const hexLookUp = Array.from({ length: 127 }, (v2, k2) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k2)));
|
|
21118
|
+
function nonSimpleDomain(value) {
|
|
21119
|
+
let code2 = 0;
|
|
21120
|
+
for (let i = 0, len = value.length; i < len; ++i) {
|
|
21121
|
+
code2 = value.charCodeAt(i);
|
|
21122
|
+
if (code2 > 126 || hexLookUp[code2]) {
|
|
21123
|
+
return true;
|
|
21124
|
+
}
|
|
21125
|
+
}
|
|
21126
|
+
return false;
|
|
21127
|
+
}
|
|
21128
|
+
const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
21129
|
+
function parse(uri2, opts) {
|
|
21130
|
+
const options = Object.assign({}, opts);
|
|
21131
|
+
const parsed = {
|
|
21132
|
+
scheme: void 0,
|
|
21133
|
+
userinfo: void 0,
|
|
21134
|
+
host: "",
|
|
21135
|
+
port: void 0,
|
|
21136
|
+
path: "",
|
|
21137
|
+
query: void 0,
|
|
21138
|
+
fragment: void 0
|
|
21139
|
+
};
|
|
21140
|
+
const gotEncoding = uri2.indexOf("%") !== -1;
|
|
21141
|
+
let isIP = false;
|
|
21142
|
+
if (options.reference === "suffix") uri2 = (options.scheme ? options.scheme + ":" : "") + "//" + uri2;
|
|
21143
|
+
const matches = uri2.match(URI_PARSE);
|
|
21144
|
+
if (matches) {
|
|
21145
|
+
parsed.scheme = matches[1];
|
|
21146
|
+
parsed.userinfo = matches[3];
|
|
21147
|
+
parsed.host = matches[4];
|
|
21148
|
+
parsed.port = parseInt(matches[5], 10);
|
|
21149
|
+
parsed.path = matches[6] || "";
|
|
21150
|
+
parsed.query = matches[7];
|
|
21151
|
+
parsed.fragment = matches[8];
|
|
21152
|
+
if (isNaN(parsed.port)) {
|
|
21153
|
+
parsed.port = matches[5];
|
|
21154
|
+
}
|
|
21155
|
+
if (parsed.host) {
|
|
21156
|
+
const ipv4result = normalizeIPv4(parsed.host);
|
|
21157
|
+
if (ipv4result.isIPV4 === false) {
|
|
21158
|
+
const ipv6result = normalizeIPv6(ipv4result.host, { isIPV4: false });
|
|
21159
|
+
parsed.host = ipv6result.host.toLowerCase();
|
|
21160
|
+
isIP = ipv6result.isIPV6;
|
|
21161
|
+
} else {
|
|
21162
|
+
parsed.host = ipv4result.host;
|
|
21163
|
+
isIP = true;
|
|
21350
21164
|
}
|
|
21351
|
-
return uriA === uriB;
|
|
21352
21165
|
}
|
|
21353
|
-
|
|
21354
|
-
|
|
21166
|
+
if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && !parsed.path && parsed.query === void 0) {
|
|
21167
|
+
parsed.reference = "same-document";
|
|
21168
|
+
} else if (parsed.scheme === void 0) {
|
|
21169
|
+
parsed.reference = "relative";
|
|
21170
|
+
} else if (parsed.fragment === void 0) {
|
|
21171
|
+
parsed.reference = "absolute";
|
|
21172
|
+
} else {
|
|
21173
|
+
parsed.reference = "uri";
|
|
21355
21174
|
}
|
|
21356
|
-
|
|
21357
|
-
|
|
21175
|
+
if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
|
|
21176
|
+
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
21358
21177
|
}
|
|
21359
|
-
|
|
21360
|
-
|
|
21361
|
-
domainHost
|
|
21362
|
-
|
|
21363
|
-
|
|
21364
|
-
|
|
21365
|
-
|
|
21366
|
-
return components;
|
|
21367
|
-
},
|
|
21368
|
-
serialize: function serialize2(components, options) {
|
|
21369
|
-
var secure = String(components.scheme).toLowerCase() === "https";
|
|
21370
|
-
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
21371
|
-
components.port = void 0;
|
|
21372
|
-
}
|
|
21373
|
-
if (!components.path) {
|
|
21374
|
-
components.path = "/";
|
|
21178
|
+
const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()];
|
|
21179
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
21180
|
+
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
21181
|
+
try {
|
|
21182
|
+
parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
|
|
21183
|
+
} catch (e2) {
|
|
21184
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e2;
|
|
21375
21185
|
}
|
|
21376
|
-
return components;
|
|
21377
21186
|
}
|
|
21378
|
-
}
|
|
21379
|
-
|
|
21380
|
-
scheme
|
|
21381
|
-
|
|
21382
|
-
parse: handler.parse,
|
|
21383
|
-
serialize: handler.serialize
|
|
21384
|
-
};
|
|
21385
|
-
function isSecure(wsComponents) {
|
|
21386
|
-
return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
|
|
21387
|
-
}
|
|
21388
|
-
var handler$2 = {
|
|
21389
|
-
scheme: "ws",
|
|
21390
|
-
domainHost: true,
|
|
21391
|
-
parse: function parse2(components, options) {
|
|
21392
|
-
var wsComponents = components;
|
|
21393
|
-
wsComponents.secure = isSecure(wsComponents);
|
|
21394
|
-
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
21395
|
-
wsComponents.path = void 0;
|
|
21396
|
-
wsComponents.query = void 0;
|
|
21397
|
-
return wsComponents;
|
|
21398
|
-
},
|
|
21399
|
-
serialize: function serialize2(wsComponents, options) {
|
|
21400
|
-
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
21401
|
-
wsComponents.port = void 0;
|
|
21402
|
-
}
|
|
21403
|
-
if (typeof wsComponents.secure === "boolean") {
|
|
21404
|
-
wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
|
|
21405
|
-
wsComponents.secure = void 0;
|
|
21406
|
-
}
|
|
21407
|
-
if (wsComponents.resourceName) {
|
|
21408
|
-
var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
|
|
21409
|
-
wsComponents.path = path && path !== "/" ? path : void 0;
|
|
21410
|
-
wsComponents.query = query;
|
|
21411
|
-
wsComponents.resourceName = void 0;
|
|
21412
|
-
}
|
|
21413
|
-
wsComponents.fragment = void 0;
|
|
21414
|
-
return wsComponents;
|
|
21187
|
+
}
|
|
21188
|
+
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
21189
|
+
if (gotEncoding && parsed.scheme !== void 0) {
|
|
21190
|
+
parsed.scheme = unescape(parsed.scheme);
|
|
21415
21191
|
}
|
|
21416
|
-
|
|
21417
|
-
|
|
21418
|
-
scheme: "wss",
|
|
21419
|
-
domainHost: handler$2.domainHost,
|
|
21420
|
-
parse: handler$2.parse,
|
|
21421
|
-
serialize: handler$2.serialize
|
|
21422
|
-
};
|
|
21423
|
-
var O2 = {};
|
|
21424
|
-
var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]";
|
|
21425
|
-
var HEXDIG$$ = "[0-9A-Fa-f]";
|
|
21426
|
-
var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$));
|
|
21427
|
-
var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
|
|
21428
|
-
var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
|
|
21429
|
-
var VCHAR$$ = merge2(QTEXT$$, '[\\"\\\\]');
|
|
21430
|
-
var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
|
|
21431
|
-
var UNRESERVED = new RegExp(UNRESERVED$$, "g");
|
|
21432
|
-
var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
|
|
21433
|
-
var NOT_LOCAL_PART = new RegExp(merge2("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
|
|
21434
|
-
var NOT_HFNAME = new RegExp(merge2("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
|
|
21435
|
-
var NOT_HFVALUE = NOT_HFNAME;
|
|
21436
|
-
function decodeUnreserved(str) {
|
|
21437
|
-
var decStr = pctDecChars(str);
|
|
21438
|
-
return !decStr.match(UNRESERVED) ? str : decStr;
|
|
21439
|
-
}
|
|
21440
|
-
var handler$4 = {
|
|
21441
|
-
scheme: "mailto",
|
|
21442
|
-
parse: function parse$$1(components, options) {
|
|
21443
|
-
var mailtoComponents = components;
|
|
21444
|
-
var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
|
|
21445
|
-
mailtoComponents.path = void 0;
|
|
21446
|
-
if (mailtoComponents.query) {
|
|
21447
|
-
var unknownHeaders = false;
|
|
21448
|
-
var headers = {};
|
|
21449
|
-
var hfields = mailtoComponents.query.split("&");
|
|
21450
|
-
for (var x2 = 0, xl = hfields.length; x2 < xl; ++x2) {
|
|
21451
|
-
var hfield = hfields[x2].split("=");
|
|
21452
|
-
switch (hfield[0]) {
|
|
21453
|
-
case "to":
|
|
21454
|
-
var toAddrs = hfield[1].split(",");
|
|
21455
|
-
for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
|
|
21456
|
-
to.push(toAddrs[_x]);
|
|
21457
|
-
}
|
|
21458
|
-
break;
|
|
21459
|
-
case "subject":
|
|
21460
|
-
mailtoComponents.subject = unescapeComponent(hfield[1], options);
|
|
21461
|
-
break;
|
|
21462
|
-
case "body":
|
|
21463
|
-
mailtoComponents.body = unescapeComponent(hfield[1], options);
|
|
21464
|
-
break;
|
|
21465
|
-
default:
|
|
21466
|
-
unknownHeaders = true;
|
|
21467
|
-
headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
|
|
21468
|
-
break;
|
|
21469
|
-
}
|
|
21470
|
-
}
|
|
21471
|
-
if (unknownHeaders) mailtoComponents.headers = headers;
|
|
21472
|
-
}
|
|
21473
|
-
mailtoComponents.query = void 0;
|
|
21474
|
-
for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
|
|
21475
|
-
var addr = to[_x2].split("@");
|
|
21476
|
-
addr[0] = unescapeComponent(addr[0]);
|
|
21477
|
-
if (!options.unicodeSupport) {
|
|
21478
|
-
try {
|
|
21479
|
-
addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
|
|
21480
|
-
} catch (e2) {
|
|
21481
|
-
mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e2;
|
|
21482
|
-
}
|
|
21483
|
-
} else {
|
|
21484
|
-
addr[1] = unescapeComponent(addr[1], options).toLowerCase();
|
|
21485
|
-
}
|
|
21486
|
-
to[_x2] = addr.join("@");
|
|
21487
|
-
}
|
|
21488
|
-
return mailtoComponents;
|
|
21489
|
-
},
|
|
21490
|
-
serialize: function serialize$$1(mailtoComponents, options) {
|
|
21491
|
-
var components = mailtoComponents;
|
|
21492
|
-
var to = toArray2(mailtoComponents.to);
|
|
21493
|
-
if (to) {
|
|
21494
|
-
for (var x2 = 0, xl = to.length; x2 < xl; ++x2) {
|
|
21495
|
-
var toAddr = String(to[x2]);
|
|
21496
|
-
var atIdx = toAddr.lastIndexOf("@");
|
|
21497
|
-
var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
|
|
21498
|
-
var domain = toAddr.slice(atIdx + 1);
|
|
21499
|
-
try {
|
|
21500
|
-
domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
|
|
21501
|
-
} catch (e2) {
|
|
21502
|
-
components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e2;
|
|
21503
|
-
}
|
|
21504
|
-
to[x2] = localPart + "@" + domain;
|
|
21505
|
-
}
|
|
21506
|
-
components.path = to.join(",");
|
|
21507
|
-
}
|
|
21508
|
-
var headers = mailtoComponents.headers = mailtoComponents.headers || {};
|
|
21509
|
-
if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
|
|
21510
|
-
if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
|
|
21511
|
-
var fields = [];
|
|
21512
|
-
for (var name in headers) {
|
|
21513
|
-
if (headers[name] !== O2[name]) {
|
|
21514
|
-
fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
|
|
21515
|
-
}
|
|
21516
|
-
}
|
|
21517
|
-
if (fields.length) {
|
|
21518
|
-
components.query = fields.join("&");
|
|
21519
|
-
}
|
|
21520
|
-
return components;
|
|
21192
|
+
if (gotEncoding && parsed.userinfo !== void 0) {
|
|
21193
|
+
parsed.userinfo = unescape(parsed.userinfo);
|
|
21521
21194
|
}
|
|
21522
|
-
|
|
21523
|
-
|
|
21524
|
-
var handler$5 = {
|
|
21525
|
-
scheme: "urn",
|
|
21526
|
-
parse: function parse$$1(components, options) {
|
|
21527
|
-
var matches = components.path && components.path.match(URN_PARSE);
|
|
21528
|
-
var urnComponents = components;
|
|
21529
|
-
if (matches) {
|
|
21530
|
-
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
21531
|
-
var nid = matches[1].toLowerCase();
|
|
21532
|
-
var nss = matches[2];
|
|
21533
|
-
var urnScheme = scheme + ":" + (options.nid || nid);
|
|
21534
|
-
var schemeHandler = SCHEMES[urnScheme];
|
|
21535
|
-
urnComponents.nid = nid;
|
|
21536
|
-
urnComponents.nss = nss;
|
|
21537
|
-
urnComponents.path = void 0;
|
|
21538
|
-
if (schemeHandler) {
|
|
21539
|
-
urnComponents = schemeHandler.parse(urnComponents, options);
|
|
21540
|
-
}
|
|
21541
|
-
} else {
|
|
21542
|
-
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
|
21543
|
-
}
|
|
21544
|
-
return urnComponents;
|
|
21545
|
-
},
|
|
21546
|
-
serialize: function serialize$$1(urnComponents, options) {
|
|
21547
|
-
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
21548
|
-
var nid = urnComponents.nid;
|
|
21549
|
-
var urnScheme = scheme + ":" + (options.nid || nid);
|
|
21550
|
-
var schemeHandler = SCHEMES[urnScheme];
|
|
21551
|
-
if (schemeHandler) {
|
|
21552
|
-
urnComponents = schemeHandler.serialize(urnComponents, options);
|
|
21553
|
-
}
|
|
21554
|
-
var uriComponents = urnComponents;
|
|
21555
|
-
var nss = urnComponents.nss;
|
|
21556
|
-
uriComponents.path = (nid || options.nid) + ":" + nss;
|
|
21557
|
-
return uriComponents;
|
|
21195
|
+
if (gotEncoding && parsed.host !== void 0) {
|
|
21196
|
+
parsed.host = unescape(parsed.host);
|
|
21558
21197
|
}
|
|
21559
|
-
|
|
21560
|
-
|
|
21561
|
-
var handler$6 = {
|
|
21562
|
-
scheme: "urn:uuid",
|
|
21563
|
-
parse: function parse2(urnComponents, options) {
|
|
21564
|
-
var uuidComponents = urnComponents;
|
|
21565
|
-
uuidComponents.uuid = uuidComponents.nss;
|
|
21566
|
-
uuidComponents.nss = void 0;
|
|
21567
|
-
if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
|
|
21568
|
-
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
|
21569
|
-
}
|
|
21570
|
-
return uuidComponents;
|
|
21571
|
-
},
|
|
21572
|
-
serialize: function serialize2(uuidComponents, options) {
|
|
21573
|
-
var urnComponents = uuidComponents;
|
|
21574
|
-
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
21575
|
-
return urnComponents;
|
|
21198
|
+
if (parsed.path !== void 0 && parsed.path.length) {
|
|
21199
|
+
parsed.path = escape(unescape(parsed.path));
|
|
21576
21200
|
}
|
|
21577
|
-
|
|
21578
|
-
|
|
21579
|
-
|
|
21580
|
-
|
|
21581
|
-
|
|
21582
|
-
|
|
21583
|
-
|
|
21584
|
-
|
|
21585
|
-
|
|
21586
|
-
|
|
21587
|
-
|
|
21588
|
-
|
|
21589
|
-
|
|
21590
|
-
|
|
21591
|
-
|
|
21592
|
-
|
|
21593
|
-
|
|
21594
|
-
|
|
21595
|
-
|
|
21596
|
-
|
|
21597
|
-
|
|
21598
|
-
|
|
21599
|
-
|
|
21600
|
-
|
|
21201
|
+
if (parsed.fragment !== void 0 && parsed.fragment.length) {
|
|
21202
|
+
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
21203
|
+
}
|
|
21204
|
+
}
|
|
21205
|
+
if (schemeHandler && schemeHandler.parse) {
|
|
21206
|
+
schemeHandler.parse(parsed, options);
|
|
21207
|
+
}
|
|
21208
|
+
} else {
|
|
21209
|
+
parsed.error = parsed.error || "URI can not be parsed.";
|
|
21210
|
+
}
|
|
21211
|
+
return parsed;
|
|
21212
|
+
}
|
|
21213
|
+
const fastUri = {
|
|
21214
|
+
SCHEMES,
|
|
21215
|
+
normalize,
|
|
21216
|
+
resolve,
|
|
21217
|
+
resolveComponents,
|
|
21218
|
+
equal: equal$2,
|
|
21219
|
+
serialize,
|
|
21220
|
+
parse
|
|
21221
|
+
};
|
|
21222
|
+
fastUri$1.exports = fastUri;
|
|
21223
|
+
fastUri$1.exports.default = fastUri;
|
|
21224
|
+
fastUri$1.exports.fastUri = fastUri;
|
|
21225
|
+
var fastUriExports = fastUri$1.exports;
|
|
21601
21226
|
Object.defineProperty(uri$1, "__esModule", { value: true });
|
|
21602
|
-
const uri =
|
|
21227
|
+
const uri = fastUriExports;
|
|
21603
21228
|
uri.code = 'require("ajv/dist/runtime/uri").default';
|
|
21604
21229
|
uri$1.default = uri;
|
|
21605
21230
|
(function(exports) {
|
|
@@ -21633,7 +21258,7 @@ uri$1.default = uri;
|
|
|
21633
21258
|
const rules_12 = rules;
|
|
21634
21259
|
const compile_12 = compile;
|
|
21635
21260
|
const codegen_2 = codegen;
|
|
21636
|
-
const resolve_12 = resolve$
|
|
21261
|
+
const resolve_12 = resolve$2;
|
|
21637
21262
|
const dataType_12 = dataType;
|
|
21638
21263
|
const util_12 = util;
|
|
21639
21264
|
const $dataRefSchema = require$$9;
|