@nsshunt/stsuxvue 1.0.126 → 1.0.131
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/dist/stsuxvue.cjs +1362 -448
- package/dist/stsuxvue.cjs.map +1 -1
- package/dist/stsuxvue.css +55 -55
- package/dist/stsuxvue.mjs +1362 -448
- package/dist/stsuxvue.mjs.map +1 -1
- package/package.json +20 -19
- package/types/Views/AppView.vue.d.ts.map +1 -1
- package/types/Views/LandingView.vue.d.ts.map +1 -1
- package/types/Views/UXModelNavigatorView.vue.d.ts.map +1 -1
- package/types/Views/UXModelNavigatorViewSingle.vue.d.ts.map +1 -1
- package/types/commonTypes.d.ts.map +1 -1
- package/types/components/UXBarChart.vue.d.ts.map +1 -1
- package/types/components/UXLineChart.vue.d.ts.map +1 -1
- package/types/components/UXModelInstrumentAgentCommon.vue.d.ts.map +1 -1
- package/types/components/UXModelInstrumentServiceCommon.vue.d.ts.map +1 -1
- package/types/components/UXModelInstrumentServiceSmall.vue.d.ts.map +1 -1
- package/types/components/UXModelNavigator.vue.d.ts +1 -1
- package/types/components/UXModelNavigator.vue.d.ts.map +1 -1
- package/types/components/UXModelNode.vue.d.ts.map +1 -1
- package/types/components/UXMultiBarChart.vue.d.ts +1 -1
- package/types/components/UXMultiBarChart.vue.d.ts.map +1 -1
- package/types/components/UXRadialChart.vue.d.ts.map +1 -1
- package/types/components/UXTestForm.vue.d.ts +1 -1
- package/types/components/UXTestForm.vue.d.ts.map +1 -1
- package/types/index.d.ts +13 -13
- package/types/index.d.ts.map +1 -1
- package/types/plugins/vuetify.d.ts +4 -4
- package/types/plugins/vuetify.d.ts.map +1 -1
- package/types/plugins/webfontloader.d.ts.map +1 -1
- package/types/stores/modelStore.d.ts +2 -2
- package/types/stores/modelStore.d.ts.map +1 -1
package/dist/stsuxvue.cjs
CHANGED
|
@@ -6,7 +6,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __esmMin = (fn, res) => () =>
|
|
9
|
+
var __esmMin = (fn, res, err) => () => {
|
|
10
|
+
if (err) throw err[0];
|
|
11
|
+
try {
|
|
12
|
+
return fn && (res = fn(fn = 0)), res;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
throw err = [e], e;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
10
17
|
var __commonJSMin$1 = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
11
18
|
var __exportAll = (all, no_symbols) => {
|
|
12
19
|
let target = {};
|
|
@@ -27,7 +34,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
27
34
|
}
|
|
28
35
|
return to;
|
|
29
36
|
};
|
|
30
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
31
38
|
value: mod,
|
|
32
39
|
enumerable: true
|
|
33
40
|
}) : target, mod));
|
|
@@ -407,7 +414,7 @@ var UXRadialChart_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
407
414
|
}
|
|
408
415
|
});
|
|
409
416
|
//#endregion
|
|
410
|
-
//#region node_modules/
|
|
417
|
+
//#region node_modules/entities/lib/maps/entities.json
|
|
411
418
|
var entities_exports = /* @__PURE__ */ __exportAll({
|
|
412
419
|
AElig: () => "Æ",
|
|
413
420
|
AMP: () => "&",
|
|
@@ -4890,7 +4897,7 @@ var init_entities = __esmMin((() => {
|
|
|
4890
4897
|
};
|
|
4891
4898
|
}));
|
|
4892
4899
|
//#endregion
|
|
4893
|
-
//#region node_modules/
|
|
4900
|
+
//#region node_modules/entities/lib/maps/legacy.json
|
|
4894
4901
|
var legacy_exports = /* @__PURE__ */ __exportAll({
|
|
4895
4902
|
AElig: () => "Æ",
|
|
4896
4903
|
AMP: () => "&",
|
|
@@ -5111,7 +5118,7 @@ var init_legacy = __esmMin((() => {
|
|
|
5111
5118
|
};
|
|
5112
5119
|
}));
|
|
5113
5120
|
//#endregion
|
|
5114
|
-
//#region node_modules/
|
|
5121
|
+
//#region node_modules/entities/lib/maps/xml.json
|
|
5115
5122
|
var xml_exports = /* @__PURE__ */ __exportAll({
|
|
5116
5123
|
amp: () => "&",
|
|
5117
5124
|
apos: () => "'",
|
|
@@ -5130,7 +5137,7 @@ var init_xml = __esmMin((() => {
|
|
|
5130
5137
|
};
|
|
5131
5138
|
}));
|
|
5132
5139
|
//#endregion
|
|
5133
|
-
//#region node_modules/
|
|
5140
|
+
//#region node_modules/entities/lib/maps/decode.json
|
|
5134
5141
|
var decode_exports = /* @__PURE__ */ __exportAll({ default: () => decode_default });
|
|
5135
5142
|
var decode_default;
|
|
5136
5143
|
var init_decode = __esmMin((() => {
|
|
@@ -5166,7 +5173,7 @@ var init_decode = __esmMin((() => {
|
|
|
5166
5173
|
};
|
|
5167
5174
|
}));
|
|
5168
5175
|
//#endregion
|
|
5169
|
-
//#region node_modules/
|
|
5176
|
+
//#region node_modules/entities/lib/decode_codepoint.js
|
|
5170
5177
|
var require_decode_codepoint = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
5171
5178
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
5172
5179
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -5191,7 +5198,7 @@ var require_decode_codepoint = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
5191
5198
|
exports.default = decodeCodePoint;
|
|
5192
5199
|
}));
|
|
5193
5200
|
//#endregion
|
|
5194
|
-
//#region node_modules/
|
|
5201
|
+
//#region node_modules/entities/lib/decode.js
|
|
5195
5202
|
var require_decode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
5196
5203
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
5197
5204
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -5243,7 +5250,7 @@ var require_decode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
5243
5250
|
}
|
|
5244
5251
|
}));
|
|
5245
5252
|
//#endregion
|
|
5246
|
-
//#region node_modules/
|
|
5253
|
+
//#region node_modules/entities/lib/encode.js
|
|
5247
5254
|
var require_encode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
5248
5255
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
5249
5256
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -5356,7 +5363,7 @@ var require_encode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
5356
5363
|
}
|
|
5357
5364
|
}));
|
|
5358
5365
|
//#endregion
|
|
5359
|
-
//#region node_modules/
|
|
5366
|
+
//#region node_modules/entities/lib/index.js
|
|
5360
5367
|
var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
5361
5368
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5362
5369
|
exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;
|
|
@@ -6036,7 +6043,7 @@ var import_ansi_to_html = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin
|
|
|
6036
6043
|
return Filter;
|
|
6037
6044
|
}();
|
|
6038
6045
|
})))(), 1);
|
|
6039
|
-
/*! @license DOMPurify 3.4.
|
|
6046
|
+
/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */
|
|
6040
6047
|
function _arrayLikeToArray(r, a) {
|
|
6041
6048
|
(null == a || a > r.length) && (a = r.length);
|
|
6042
6049
|
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
@@ -6077,9 +6084,17 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
6077
6084
|
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
6078
6085
|
}
|
|
6079
6086
|
}
|
|
6080
|
-
var entries = Object.entries
|
|
6081
|
-
var
|
|
6082
|
-
var
|
|
6087
|
+
var entries = Object.entries;
|
|
6088
|
+
var setPrototypeOf = Object.setPrototypeOf;
|
|
6089
|
+
var isFrozen = Object.isFrozen;
|
|
6090
|
+
var getPrototypeOf$1 = Object.getPrototypeOf;
|
|
6091
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
6092
|
+
var freeze = Object.freeze;
|
|
6093
|
+
var seal = Object.seal;
|
|
6094
|
+
var create = Object.create;
|
|
6095
|
+
var _ref = typeof Reflect !== "undefined" && Reflect;
|
|
6096
|
+
var apply = _ref.apply;
|
|
6097
|
+
var construct = _ref.construct;
|
|
6083
6098
|
if (!freeze) freeze = function freeze(x) {
|
|
6084
6099
|
return x;
|
|
6085
6100
|
};
|
|
@@ -6187,9 +6202,11 @@ function clone(object) {
|
|
|
6187
6202
|
var _ref3 = _slicedToArray(_ref2, 2);
|
|
6188
6203
|
const property = _ref3[0];
|
|
6189
6204
|
const value = _ref3[1];
|
|
6190
|
-
if (objectHasOwnProperty(object, property))
|
|
6191
|
-
|
|
6192
|
-
|
|
6205
|
+
if (objectHasOwnProperty(object, property)) {
|
|
6206
|
+
if (arrayIsArray(value)) newObject[property] = cleanArray(value);
|
|
6207
|
+
else if (value && typeof value === "object" && value.constructor === Object) newObject[property] = clone(value);
|
|
6208
|
+
else newObject[property] = value;
|
|
6209
|
+
}
|
|
6193
6210
|
}
|
|
6194
6211
|
return newObject;
|
|
6195
6212
|
}
|
|
@@ -6675,6 +6692,7 @@ var svg = freeze([
|
|
|
6675
6692
|
"direction",
|
|
6676
6693
|
"display",
|
|
6677
6694
|
"divisor",
|
|
6695
|
+
"dominant-baseline",
|
|
6678
6696
|
"dur",
|
|
6679
6697
|
"edgemode",
|
|
6680
6698
|
"elevation",
|
|
@@ -6756,6 +6774,7 @@ var svg = freeze([
|
|
|
6756
6774
|
"patterncontentunits",
|
|
6757
6775
|
"patterntransform",
|
|
6758
6776
|
"patternunits",
|
|
6777
|
+
"pointer-events",
|
|
6759
6778
|
"points",
|
|
6760
6779
|
"preservealpha",
|
|
6761
6780
|
"preserveaspectratio",
|
|
@@ -6802,6 +6821,7 @@ var svg = freeze([
|
|
|
6802
6821
|
"transform-origin",
|
|
6803
6822
|
"text-anchor",
|
|
6804
6823
|
"text-decoration",
|
|
6824
|
+
"text-orientation",
|
|
6805
6825
|
"text-rendering",
|
|
6806
6826
|
"textlength",
|
|
6807
6827
|
"type",
|
|
@@ -6809,6 +6829,7 @@ var svg = freeze([
|
|
|
6809
6829
|
"u2",
|
|
6810
6830
|
"unicode",
|
|
6811
6831
|
"values",
|
|
6832
|
+
"vector-effect",
|
|
6812
6833
|
"viewbox",
|
|
6813
6834
|
"visibility",
|
|
6814
6835
|
"version",
|
|
@@ -6904,6 +6925,10 @@ var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
|
|
6904
6925
|
var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);
|
|
6905
6926
|
var DOCTYPE_NAME = seal(/^html$/i);
|
|
6906
6927
|
var CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
6928
|
+
var ELEMENT_MARKUP_PROBE = seal(/<[/\w!]/g);
|
|
6929
|
+
var COMMENT_MARKUP_PROBE = seal(/<[/\w]/g);
|
|
6930
|
+
var FALLBACK_TAG_CLOSE = seal(/<\/no(script|embed|frames)/i);
|
|
6931
|
+
var SELF_CLOSING_TAG = seal(/\/>/i);
|
|
6907
6932
|
var NODE_TYPE = {
|
|
6908
6933
|
element: 1,
|
|
6909
6934
|
attribute: 2,
|
|
@@ -6911,13 +6936,31 @@ var NODE_TYPE = {
|
|
|
6911
6936
|
cdataSection: 4,
|
|
6912
6937
|
entityReference: 5,
|
|
6913
6938
|
entityNode: 6,
|
|
6914
|
-
|
|
6939
|
+
processingInstruction: 7,
|
|
6915
6940
|
comment: 8,
|
|
6916
6941
|
document: 9,
|
|
6917
6942
|
documentType: 10,
|
|
6918
6943
|
documentFragment: 11,
|
|
6919
6944
|
notation: 12
|
|
6920
6945
|
};
|
|
6946
|
+
var LITERAL_TEXT_ELEMENT_NAMES = [
|
|
6947
|
+
"style",
|
|
6948
|
+
"script",
|
|
6949
|
+
"xmp",
|
|
6950
|
+
"iframe",
|
|
6951
|
+
"noembed",
|
|
6952
|
+
"noframes",
|
|
6953
|
+
"plaintext",
|
|
6954
|
+
"noscript"
|
|
6955
|
+
];
|
|
6956
|
+
var LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));
|
|
6957
|
+
var LITERAL_TEXT_CLOSE = function() {
|
|
6958
|
+
const map = {};
|
|
6959
|
+
arrayForEach(LITERAL_TEXT_ELEMENT_NAMES, (name) => {
|
|
6960
|
+
map[name] = seal(new RegExp("</" + name + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
6961
|
+
});
|
|
6962
|
+
return freeze(map);
|
|
6963
|
+
}();
|
|
6921
6964
|
var getGlobal$1 = function getGlobal() {
|
|
6922
6965
|
return typeof window === "undefined" ? null : window;
|
|
6923
6966
|
};
|
|
@@ -6962,10 +7005,40 @@ var _createHooksMap = function _createHooksMap() {
|
|
|
6962
7005
|
uponSanitizeShadowNode: []
|
|
6963
7006
|
};
|
|
6964
7007
|
};
|
|
7008
|
+
/**
|
|
7009
|
+
* Resolve a set-valued configuration option: a fresh set built from
|
|
7010
|
+
* cfg[key] when it is an own array property (seeded with a clone of
|
|
7011
|
+
* options.base when given, case-normalized via options.transform),
|
|
7012
|
+
* the fallback set otherwise.
|
|
7013
|
+
*
|
|
7014
|
+
* @param cfg the cloned, prototype-free configuration object
|
|
7015
|
+
* @param key the configuration property to read
|
|
7016
|
+
* @param fallback the set to use when the option is absent or not an array
|
|
7017
|
+
* @param options transform and optional base set to merge into
|
|
7018
|
+
* @returns the resolved set
|
|
7019
|
+
*/
|
|
7020
|
+
var _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {
|
|
7021
|
+
return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;
|
|
7022
|
+
};
|
|
7023
|
+
/**
|
|
7024
|
+
* Resolve an object-valued configuration option: a prototype-free clone
|
|
7025
|
+
* of cfg[key] when it is an own, truthy object property, else a fresh
|
|
7026
|
+
* fallback built by makeFallback (fresh on every parse, so a previous
|
|
7027
|
+
* parse can never leak state into the next one).
|
|
7028
|
+
*
|
|
7029
|
+
* @param cfg the cloned, prototype-free configuration object
|
|
7030
|
+
* @param key the configuration property to read
|
|
7031
|
+
* @param makeFallback builds the fallback value when the option is absent
|
|
7032
|
+
* @returns the resolved object
|
|
7033
|
+
*/
|
|
7034
|
+
var _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback) {
|
|
7035
|
+
const value = objectHasOwnProperty(cfg, key) ? cfg[key] : void 0;
|
|
7036
|
+
return value && typeof value === "object" ? clone(value) : makeFallback();
|
|
7037
|
+
};
|
|
6965
7038
|
function createDOMPurify() {
|
|
6966
7039
|
let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal$1();
|
|
6967
7040
|
const DOMPurify = (root) => createDOMPurify(root);
|
|
6968
|
-
DOMPurify.version = "3.4.
|
|
7041
|
+
DOMPurify.version = "3.4.14";
|
|
6969
7042
|
DOMPurify.removed = [];
|
|
6970
7043
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
6971
7044
|
DOMPurify.isSupported = false;
|
|
@@ -6989,6 +7062,13 @@ function createDOMPurify() {
|
|
|
6989
7062
|
const getAttributes = lookupGetter(ElementPrototype, "attributes");
|
|
6990
7063
|
const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
|
|
6991
7064
|
const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeName") : null;
|
|
7065
|
+
const getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, "ownerDocument") : null;
|
|
7066
|
+
const _readNodeType = function _readNodeType(node) {
|
|
7067
|
+
return getNodeType ? getNodeType(node) : node.nodeType;
|
|
7068
|
+
};
|
|
7069
|
+
const _readNodeName = function _readNodeName(node) {
|
|
7070
|
+
return getNodeName ? getNodeName(node) : node.nodeName;
|
|
7071
|
+
};
|
|
6992
7072
|
if (typeof HTMLTemplateElement === "function") {
|
|
6993
7073
|
const template = document.createElement("template");
|
|
6994
7074
|
if (template.content && template.content.ownerDocument) document = template.content.ownerDocument;
|
|
@@ -7098,6 +7178,8 @@ function createDOMPurify() {
|
|
|
7098
7178
|
let SAFE_FOR_XML = true;
|
|
7099
7179
|
let WHOLE_DOCUMENT = false;
|
|
7100
7180
|
let SET_CONFIG = false;
|
|
7181
|
+
let SET_CONFIG_ALLOWED_TAGS = null;
|
|
7182
|
+
let SET_CONFIG_ALLOWED_ATTR = null;
|
|
7101
7183
|
let FORCE_BODY = false;
|
|
7102
7184
|
let RETURN_DOM = false;
|
|
7103
7185
|
let RETURN_DOM_FRAGMENT = false;
|
|
@@ -7174,14 +7256,16 @@ function createDOMPurify() {
|
|
|
7174
7256
|
SVG_NAMESPACE,
|
|
7175
7257
|
HTML_NAMESPACE
|
|
7176
7258
|
], stringToString);
|
|
7177
|
-
|
|
7259
|
+
const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze([
|
|
7178
7260
|
"mi",
|
|
7179
7261
|
"mo",
|
|
7180
7262
|
"mn",
|
|
7181
7263
|
"ms",
|
|
7182
7264
|
"mtext"
|
|
7183
7265
|
]);
|
|
7184
|
-
let
|
|
7266
|
+
let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);
|
|
7267
|
+
const DEFAULT_HTML_INTEGRATION_POINTS = freeze(["annotation-xml"]);
|
|
7268
|
+
let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);
|
|
7185
7269
|
const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [
|
|
7186
7270
|
"title",
|
|
7187
7271
|
"style",
|
|
@@ -7210,14 +7294,20 @@ function createDOMPurify() {
|
|
|
7210
7294
|
cfg = clone(cfg);
|
|
7211
7295
|
PARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
|
|
7212
7296
|
transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
|
|
7213
|
-
ALLOWED_TAGS =
|
|
7214
|
-
ALLOWED_ATTR =
|
|
7215
|
-
ALLOWED_NAMESPACES =
|
|
7216
|
-
URI_SAFE_ATTRIBUTES =
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7297
|
+
ALLOWED_TAGS = _resolveSetOption(cfg, "ALLOWED_TAGS", DEFAULT_ALLOWED_TAGS, { transform: transformCaseFunc });
|
|
7298
|
+
ALLOWED_ATTR = _resolveSetOption(cfg, "ALLOWED_ATTR", DEFAULT_ALLOWED_ATTR, { transform: transformCaseFunc });
|
|
7299
|
+
ALLOWED_NAMESPACES = _resolveSetOption(cfg, "ALLOWED_NAMESPACES", DEFAULT_ALLOWED_NAMESPACES, { transform: stringToString });
|
|
7300
|
+
URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, "ADD_URI_SAFE_ATTR", DEFAULT_URI_SAFE_ATTRIBUTES, {
|
|
7301
|
+
transform: transformCaseFunc,
|
|
7302
|
+
base: DEFAULT_URI_SAFE_ATTRIBUTES
|
|
7303
|
+
});
|
|
7304
|
+
DATA_URI_TAGS = _resolveSetOption(cfg, "ADD_DATA_URI_TAGS", DEFAULT_DATA_URI_TAGS, {
|
|
7305
|
+
transform: transformCaseFunc,
|
|
7306
|
+
base: DEFAULT_DATA_URI_TAGS
|
|
7307
|
+
});
|
|
7308
|
+
FORBID_CONTENTS = _resolveSetOption(cfg, "FORBID_CONTENTS", DEFAULT_FORBID_CONTENTS, { transform: transformCaseFunc });
|
|
7309
|
+
FORBID_TAGS = _resolveSetOption(cfg, "FORBID_TAGS", clone({}), { transform: transformCaseFunc });
|
|
7310
|
+
FORBID_ATTR = _resolveSetOption(cfg, "FORBID_ATTR", clone({}), { transform: transformCaseFunc });
|
|
7221
7311
|
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
|
|
7222
7312
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
|
|
7223
7313
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
|
|
@@ -7236,19 +7326,14 @@ function createDOMPurify() {
|
|
|
7236
7326
|
IN_PLACE = cfg.IN_PLACE || false;
|
|
7237
7327
|
IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
|
|
7238
7328
|
NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
|
|
7239
|
-
MATHML_TEXT_INTEGRATION_POINTS =
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
"mn",
|
|
7243
|
-
"ms",
|
|
7244
|
-
"mtext"
|
|
7245
|
-
]);
|
|
7246
|
-
HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ["annotation-xml"]);
|
|
7247
|
-
const customElementHandling = objectHasOwnProperty(cfg, "CUSTOM_ELEMENT_HANDLING") && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === "object" ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
|
|
7329
|
+
MATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, "MATHML_TEXT_INTEGRATION_POINTS", () => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS));
|
|
7330
|
+
HTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, "HTML_INTEGRATION_POINTS", () => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS));
|
|
7331
|
+
const customElementHandling = _resolveObjectOption(cfg, "CUSTOM_ELEMENT_HANDLING", () => create(null));
|
|
7248
7332
|
CUSTOM_ELEMENT_HANDLING = create(null);
|
|
7249
7333
|
if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
|
|
7250
7334
|
if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
|
|
7251
7335
|
if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
|
|
7336
|
+
seal(CUSTOM_ELEMENT_HANDLING);
|
|
7252
7337
|
if (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;
|
|
7253
7338
|
if (RETURN_DOM_FRAGMENT) RETURN_DOM = true;
|
|
7254
7339
|
if (USE_PROFILES) {
|
|
@@ -7290,11 +7375,6 @@ function createDOMPurify() {
|
|
|
7290
7375
|
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
7291
7376
|
}
|
|
7292
7377
|
}
|
|
7293
|
-
if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
7294
|
-
if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
|
|
7295
|
-
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
7296
|
-
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
7297
|
-
}
|
|
7298
7378
|
if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
|
|
7299
7379
|
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
7300
7380
|
addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
|
|
@@ -7327,8 +7407,6 @@ function createDOMPurify() {
|
|
|
7327
7407
|
if (trustedTypesPolicy === void 0) trustedTypesPolicy = _getDefaultTrustedTypesPolicy();
|
|
7328
7408
|
if (trustedTypesPolicy && typeof emptyHTML === "string") emptyHTML = _createTrustedHTML("");
|
|
7329
7409
|
}
|
|
7330
|
-
if ((hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) && ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
7331
|
-
if (hooks.uponSanitizeAttribute.length > 0 && ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
7332
7410
|
if (freeze) freeze(cfg);
|
|
7333
7411
|
CONFIG = cfg;
|
|
7334
7412
|
};
|
|
@@ -7339,6 +7417,45 @@ function createDOMPurify() {
|
|
|
7339
7417
|
]);
|
|
7340
7418
|
const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
|
|
7341
7419
|
/**
|
|
7420
|
+
* Namespace rules for an element in the SVG namespace.
|
|
7421
|
+
*
|
|
7422
|
+
* @param tagName the element's lowercase tag name
|
|
7423
|
+
* @param parent the (possibly simulated) parent node
|
|
7424
|
+
* @param parentTagName the parent's lowercase tag name
|
|
7425
|
+
* @returns true if a spec-compliant parser could produce this element
|
|
7426
|
+
*/
|
|
7427
|
+
const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {
|
|
7428
|
+
if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "svg";
|
|
7429
|
+
if (parent.namespaceURI === MATHML_NAMESPACE) return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
|
7430
|
+
return Boolean(ALL_SVG_TAGS[tagName]);
|
|
7431
|
+
};
|
|
7432
|
+
/**
|
|
7433
|
+
* Namespace rules for an element in the MathML namespace.
|
|
7434
|
+
*
|
|
7435
|
+
* @param tagName the element's lowercase tag name
|
|
7436
|
+
* @param parent the (possibly simulated) parent node
|
|
7437
|
+
* @param parentTagName the parent's lowercase tag name
|
|
7438
|
+
* @returns true if a spec-compliant parser could produce this element
|
|
7439
|
+
*/
|
|
7440
|
+
const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {
|
|
7441
|
+
if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "math";
|
|
7442
|
+
if (parent.namespaceURI === SVG_NAMESPACE) return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
|
|
7443
|
+
return Boolean(ALL_MATHML_TAGS[tagName]);
|
|
7444
|
+
};
|
|
7445
|
+
/**
|
|
7446
|
+
* Namespace rules for an element in the HTML namespace.
|
|
7447
|
+
*
|
|
7448
|
+
* @param tagName the element's lowercase tag name
|
|
7449
|
+
* @param parent the (possibly simulated) parent node
|
|
7450
|
+
* @param parentTagName the parent's lowercase tag name
|
|
7451
|
+
* @returns true if a spec-compliant parser could produce this element
|
|
7452
|
+
*/
|
|
7453
|
+
const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {
|
|
7454
|
+
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;
|
|
7455
|
+
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;
|
|
7456
|
+
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
|
7457
|
+
};
|
|
7458
|
+
/**
|
|
7342
7459
|
* @param element a DOM element whose namespace is being checked
|
|
7343
7460
|
* @returns Return false if the element has a
|
|
7344
7461
|
* namespace that a spec-compliant parser would never
|
|
@@ -7353,21 +7470,9 @@ function createDOMPurify() {
|
|
|
7353
7470
|
const tagName = stringToLowerCase(element.tagName);
|
|
7354
7471
|
const parentTagName = stringToLowerCase(parent.tagName);
|
|
7355
7472
|
if (!ALLOWED_NAMESPACES[element.namespaceURI]) return false;
|
|
7356
|
-
if (element.namespaceURI === SVG_NAMESPACE)
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
return Boolean(ALL_SVG_TAGS[tagName]);
|
|
7360
|
-
}
|
|
7361
|
-
if (element.namespaceURI === MATHML_NAMESPACE) {
|
|
7362
|
-
if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "math";
|
|
7363
|
-
if (parent.namespaceURI === SVG_NAMESPACE) return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
|
|
7364
|
-
return Boolean(ALL_MATHML_TAGS[tagName]);
|
|
7365
|
-
}
|
|
7366
|
-
if (element.namespaceURI === HTML_NAMESPACE) {
|
|
7367
|
-
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;
|
|
7368
|
-
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;
|
|
7369
|
-
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
|
7370
|
-
}
|
|
7473
|
+
if (element.namespaceURI === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);
|
|
7474
|
+
if (element.namespaceURI === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);
|
|
7475
|
+
if (element.namespaceURI === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);
|
|
7371
7476
|
if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) return true;
|
|
7372
7477
|
return false;
|
|
7373
7478
|
};
|
|
@@ -7386,6 +7491,32 @@ function createDOMPurify() {
|
|
|
7386
7491
|
}
|
|
7387
7492
|
};
|
|
7388
7493
|
/**
|
|
7494
|
+
* _stripAttributeNode
|
|
7495
|
+
*
|
|
7496
|
+
* Remove a single Attr node case/namespace-exactly on an attribute-teardown
|
|
7497
|
+
* path. Name-based removeAttribute() ASCII-lowercases its lookup key for an
|
|
7498
|
+
* HTML element in an HTML document and so silently misses a case-preserved
|
|
7499
|
+
* handler (e.g. `ONERROR` off an XML/XHTML import) - the same defect
|
|
7500
|
+
* _removeAttribute() was fixed for, which a name-based call would reintroduce
|
|
7501
|
+
* on these IN_PLACE teardown paths. Unlike _removeAttribute this does not
|
|
7502
|
+
* record into DOMPurify.removed: the neutralize passes intentionally do not
|
|
7503
|
+
* book-keep. A clobbered/detached node falls back to best-effort name-based
|
|
7504
|
+
* removal.
|
|
7505
|
+
*
|
|
7506
|
+
* @param element the element to strip the attribute from
|
|
7507
|
+
* @param attribute the Attr node to remove
|
|
7508
|
+
* @param name the attribute's name, for the fallback path
|
|
7509
|
+
*/
|
|
7510
|
+
const _stripAttributeNode = function _stripAttributeNode(element, attribute, name) {
|
|
7511
|
+
try {
|
|
7512
|
+
element.removeAttributeNode(attribute);
|
|
7513
|
+
} catch (_) {
|
|
7514
|
+
try {
|
|
7515
|
+
element.removeAttribute(name);
|
|
7516
|
+
} catch (_) {}
|
|
7517
|
+
}
|
|
7518
|
+
};
|
|
7519
|
+
/**
|
|
7389
7520
|
* _neutralizeRoot
|
|
7390
7521
|
*
|
|
7391
7522
|
* Fail-closed teardown of an in-place root after the sanitize walk aborts
|
|
@@ -7402,7 +7533,8 @@ function createDOMPurify() {
|
|
|
7402
7533
|
* @param root the in-place root to empty
|
|
7403
7534
|
*/
|
|
7404
7535
|
const _neutralizeRoot = function _neutralizeRoot(root) {
|
|
7405
|
-
|
|
7536
|
+
_neutralizeSubtree(root);
|
|
7537
|
+
const childNodes = getChildNodes(root);
|
|
7406
7538
|
if (childNodes) {
|
|
7407
7539
|
const snapshot = [];
|
|
7408
7540
|
arrayForEach(childNodes, (child) => {
|
|
@@ -7414,40 +7546,57 @@ function createDOMPurify() {
|
|
|
7414
7546
|
} catch (_) {}
|
|
7415
7547
|
});
|
|
7416
7548
|
}
|
|
7417
|
-
const attributes = getAttributes
|
|
7549
|
+
const attributes = getAttributes(root);
|
|
7418
7550
|
if (attributes) for (let i = attributes.length - 1; i >= 0; --i) {
|
|
7419
7551
|
const attribute = attributes[i];
|
|
7420
7552
|
const name = attribute && attribute.name;
|
|
7421
|
-
if (typeof name === "string")
|
|
7422
|
-
root.removeAttribute(name);
|
|
7423
|
-
} catch (_) {}
|
|
7553
|
+
if (typeof name === "string") _stripAttributeNode(root, attribute, name);
|
|
7424
7554
|
}
|
|
7425
7555
|
};
|
|
7426
7556
|
/**
|
|
7427
7557
|
* _removeAttribute
|
|
7428
7558
|
*
|
|
7559
|
+
* Name-based getAttributeNode()/removeAttribute() ASCII-lowercase their
|
|
7560
|
+
* lookup key for HTML elements in an HTML document, so they silently miss an
|
|
7561
|
+
* attribute whose stored qualified name still contains uppercase ASCII
|
|
7562
|
+
* letters. That happens when the node came from a case-preserving source
|
|
7563
|
+
* (an XML/XHTML document imported via importNode(), or createAttributeNS()),
|
|
7564
|
+
* where e.g. `ONERROR` survives the walk: the policy check lowercases to
|
|
7565
|
+
* `onerror` and rejects it, but `removeAttribute('ONERROR')` looks up
|
|
7566
|
+
* `onerror` and finds nothing. Remove the exact Attr node instead, which is
|
|
7567
|
+
* case- and namespace-exact, and fall back to name-based removal only when
|
|
7568
|
+
* the caller could not supply the node.
|
|
7569
|
+
*
|
|
7429
7570
|
* @param name an Attribute name
|
|
7430
7571
|
* @param element a DOM node
|
|
7572
|
+
* @param attr the exact Attr node to remove, when the caller has it
|
|
7431
7573
|
*/
|
|
7432
|
-
const _removeAttribute = function _removeAttribute(name, element) {
|
|
7574
|
+
const _removeAttribute = function _removeAttribute(name, element, attr) {
|
|
7575
|
+
if (!attr) try {
|
|
7576
|
+
attr = element.getAttributeNode(name);
|
|
7577
|
+
} catch (_) {
|
|
7578
|
+
attr = null;
|
|
7579
|
+
}
|
|
7580
|
+
arrayPush(DOMPurify.removed, {
|
|
7581
|
+
attribute: attr || null,
|
|
7582
|
+
from: element
|
|
7583
|
+
});
|
|
7433
7584
|
try {
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
from: element
|
|
7437
|
-
});
|
|
7585
|
+
if (attr) element.removeAttributeNode(attr);
|
|
7586
|
+
else element.removeAttribute(name);
|
|
7438
7587
|
} catch (_) {
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7588
|
+
try {
|
|
7589
|
+
element.removeAttribute(name);
|
|
7590
|
+
} catch (_) {}
|
|
7591
|
+
}
|
|
7592
|
+
if (name === "is") {
|
|
7593
|
+
if (RETURN_DOM || RETURN_DOM_FRAGMENT) try {
|
|
7594
|
+
_forceRemove(element);
|
|
7595
|
+
} catch (_) {}
|
|
7596
|
+
else try {
|
|
7597
|
+
element.setAttribute(name, "");
|
|
7598
|
+
} catch (_) {}
|
|
7443
7599
|
}
|
|
7444
|
-
element.removeAttribute(name);
|
|
7445
|
-
if (name === "is") if (RETURN_DOM || RETURN_DOM_FRAGMENT) try {
|
|
7446
|
-
_forceRemove(element);
|
|
7447
|
-
} catch (_) {}
|
|
7448
|
-
else try {
|
|
7449
|
-
element.setAttribute(name, "");
|
|
7450
|
-
} catch (_) {}
|
|
7451
7600
|
};
|
|
7452
7601
|
/**
|
|
7453
7602
|
* _stripDisallowedAttributes
|
|
@@ -7460,15 +7609,13 @@ function createDOMPurify() {
|
|
|
7460
7609
|
* @param element the element to strip
|
|
7461
7610
|
*/
|
|
7462
7611
|
const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {
|
|
7463
|
-
const attributes = getAttributes
|
|
7612
|
+
const attributes = getAttributes(element);
|
|
7464
7613
|
if (!attributes) return;
|
|
7465
7614
|
for (let i = attributes.length - 1; i >= 0; --i) {
|
|
7466
7615
|
const attribute = attributes[i];
|
|
7467
7616
|
const name = attribute && attribute.name;
|
|
7468
7617
|
if (typeof name !== "string" || ALLOWED_ATTR[transformCaseFunc(name)]) continue;
|
|
7469
|
-
|
|
7470
|
-
element.removeAttribute(name);
|
|
7471
|
-
} catch (_) {}
|
|
7618
|
+
_stripAttributeNode(element, attribute, name);
|
|
7472
7619
|
}
|
|
7473
7620
|
};
|
|
7474
7621
|
/**
|
|
@@ -7497,8 +7644,83 @@ function createDOMPurify() {
|
|
|
7497
7644
|
const stack = [root];
|
|
7498
7645
|
while (stack.length > 0) {
|
|
7499
7646
|
const node = stack.pop();
|
|
7500
|
-
if ((
|
|
7501
|
-
const childNodes = getChildNodes
|
|
7647
|
+
if (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);
|
|
7648
|
+
const childNodes = getChildNodes(node);
|
|
7649
|
+
if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
|
|
7650
|
+
}
|
|
7651
|
+
};
|
|
7652
|
+
/**
|
|
7653
|
+
* _neutralizePatchLinkage
|
|
7654
|
+
*
|
|
7655
|
+
* IN_PLACE entry pre-pass (declarative-partial-updates / streaming
|
|
7656
|
+
* hardening, https://github.com/WICG/declarative-partial-updates).
|
|
7657
|
+
*
|
|
7658
|
+
* The main walk strips patch linkage (`for`/`patchsrc`) and removes range
|
|
7659
|
+
* markers (PIs / markup comments) node-by-node, in document order, AS it
|
|
7660
|
+
* reaches each node. On a live in-place root that leaves a window: from the
|
|
7661
|
+
* moment the root is connected until the walk arrives at a given node, that
|
|
7662
|
+
* node's linkage is live. A patch applied on connection/stream can fire as
|
|
7663
|
+
* a microtask during the walk and inject or teleport an unsanitized DOM
|
|
7664
|
+
* range into a region the iterator has already passed and will not revisit,
|
|
7665
|
+
* so the post-return "tree is sanitized" contract is violated. Sweep the
|
|
7666
|
+
* whole tree once up front and sever every linkage before the walk begins,
|
|
7667
|
+
* closing that window.
|
|
7668
|
+
*
|
|
7669
|
+
* This CANNOT undo a patch that already fired before sanitize ran — that is
|
|
7670
|
+
* the irreducible "do not IN_PLACE a live-connected attacker tree" caveat —
|
|
7671
|
+
* but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML
|
|
7672
|
+
* to group with the rest of the declarative-partial-updates handling and
|
|
7673
|
+
* stay overridable, consistent with the codebase.
|
|
7674
|
+
*
|
|
7675
|
+
* Clobber-safe traversal (cached childNodes getter); per-node try/catch so a
|
|
7676
|
+
* clobbered root cannot defeat the sweep of its non-clobbered descendants.
|
|
7677
|
+
*
|
|
7678
|
+
* NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe
|
|
7679
|
+
* .html Q1): this mirrors the existing policy of keeping `for` on
|
|
7680
|
+
* <label>/<output>. If the shipping feature can drive a patch through a
|
|
7681
|
+
* surviving `for`-on-label/output + `id` pair, this pre-pass and the
|
|
7682
|
+
* attribute check at _isBasicCustomElement's caller must additionally drop
|
|
7683
|
+
* that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.
|
|
7684
|
+
*
|
|
7685
|
+
* @param root the in-place root to sweep
|
|
7686
|
+
*/
|
|
7687
|
+
/**
|
|
7688
|
+
* Central policy for declarative-partial-updates patch-linkage attributes,
|
|
7689
|
+
* shared by the _neutralizePatchLinkage pre-pass and _isValidAttribute so
|
|
7690
|
+
* the two sites cannot drift: `patchsrc` always links, `for` links
|
|
7691
|
+
* everywhere except on <label>/<output>, and the whole policy is gated on
|
|
7692
|
+
* SAFE_FOR_XML (see the rationale block in _isValidAttribute).
|
|
7693
|
+
*
|
|
7694
|
+
* @param lcName the transformCaseFunc'd attribute name
|
|
7695
|
+
* @param lcTag the transformCaseFunc'd tag name of the carrying element
|
|
7696
|
+
* @return true if the attribute is patch linkage and must be dropped
|
|
7697
|
+
*/
|
|
7698
|
+
const _isPatchLinkageAttribute = function _isPatchLinkageAttribute(lcName, lcTag) {
|
|
7699
|
+
if (!SAFE_FOR_XML) return false;
|
|
7700
|
+
if (lcName === "patchsrc") return true;
|
|
7701
|
+
return lcName === "for" && lcTag !== "label" && lcTag !== "output";
|
|
7702
|
+
};
|
|
7703
|
+
const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
|
|
7704
|
+
if (!SAFE_FOR_XML) return;
|
|
7705
|
+
const stack = [root];
|
|
7706
|
+
while (stack.length > 0) {
|
|
7707
|
+
const node = stack.pop();
|
|
7708
|
+
const nodeType = _readNodeType(node);
|
|
7709
|
+
if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
|
|
7710
|
+
try {
|
|
7711
|
+
remove(node);
|
|
7712
|
+
} catch (_) {}
|
|
7713
|
+
continue;
|
|
7714
|
+
}
|
|
7715
|
+
if (nodeType === NODE_TYPE.element) {
|
|
7716
|
+
const element = node;
|
|
7717
|
+
const lcTag = transformCaseFunc(_readNodeName(node));
|
|
7718
|
+
try {
|
|
7719
|
+
if (element.hasAttribute && element.hasAttribute("patchsrc")) element.removeAttribute("patchsrc");
|
|
7720
|
+
if (element.hasAttribute && element.hasAttribute("for") && _isPatchLinkageAttribute("for", lcTag)) element.removeAttribute("for");
|
|
7721
|
+
} catch (_) {}
|
|
7722
|
+
}
|
|
7723
|
+
const childNodes = getChildNodes(node);
|
|
7502
7724
|
if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
|
|
7503
7725
|
}
|
|
7504
7726
|
};
|
|
@@ -7539,7 +7761,22 @@ function createDOMPurify() {
|
|
|
7539
7761
|
* @return The created NodeIterator
|
|
7540
7762
|
*/
|
|
7541
7763
|
const _createNodeIterator = function _createNodeIterator(root) {
|
|
7542
|
-
|
|
7764
|
+
const doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;
|
|
7765
|
+
return createNodeIterator.call(doc || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
|
|
7766
|
+
};
|
|
7767
|
+
/**
|
|
7768
|
+
* Replace template expression syntax (mustache, ERB, template
|
|
7769
|
+
* literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub
|
|
7770
|
+
* sites. Order matters: mustache, then ERB, then template literal.
|
|
7771
|
+
*
|
|
7772
|
+
* @param value the string to scrub
|
|
7773
|
+
* @returns the scrubbed string
|
|
7774
|
+
*/
|
|
7775
|
+
const _stripTemplateExpressions = function _stripTemplateExpressions(value) {
|
|
7776
|
+
value = stringReplace(value, MUSTACHE_EXPR$1, " ");
|
|
7777
|
+
value = stringReplace(value, ERB_EXPR$1, " ");
|
|
7778
|
+
value = stringReplace(value, TMPLIT_EXPR$1, " ");
|
|
7779
|
+
return value;
|
|
7543
7780
|
};
|
|
7544
7781
|
/**
|
|
7545
7782
|
* Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the
|
|
@@ -7561,24 +7798,17 @@ function createDOMPurify() {
|
|
|
7561
7798
|
* @param node The root element whose character data should be scrubbed.
|
|
7562
7799
|
*/
|
|
7563
7800
|
const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {
|
|
7564
|
-
var _node$querySelectorAl
|
|
7801
|
+
var _node$querySelectorAl;
|
|
7565
7802
|
node.normalize();
|
|
7566
|
-
const
|
|
7803
|
+
const doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;
|
|
7804
|
+
const walker = createNodeIterator.call(doc || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
|
|
7567
7805
|
let currentNode = walker.nextNode();
|
|
7568
7806
|
while (currentNode) {
|
|
7569
|
-
|
|
7570
|
-
arrayForEach([
|
|
7571
|
-
MUSTACHE_EXPR$1,
|
|
7572
|
-
ERB_EXPR$1,
|
|
7573
|
-
TMPLIT_EXPR$1
|
|
7574
|
-
], (expr) => {
|
|
7575
|
-
data = stringReplace(data, expr, " ");
|
|
7576
|
-
});
|
|
7577
|
-
currentNode.data = data;
|
|
7807
|
+
currentNode.data = _stripTemplateExpressions(currentNode.data);
|
|
7578
7808
|
currentNode = walker.nextNode();
|
|
7579
7809
|
}
|
|
7580
|
-
const templates = (_node$querySelectorAl =
|
|
7581
|
-
arrayForEach(
|
|
7810
|
+
const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, "template");
|
|
7811
|
+
if (templates) arrayForEach(templates, (tmpl) => {
|
|
7582
7812
|
if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
|
|
7583
7813
|
});
|
|
7584
7814
|
};
|
|
@@ -7639,11 +7869,136 @@ function createDOMPurify() {
|
|
|
7639
7869
|
}
|
|
7640
7870
|
};
|
|
7641
7871
|
function _executeHooks(hooks, currentNode, data) {
|
|
7872
|
+
if (hooks.length === 0) return;
|
|
7642
7873
|
arrayForEach(hooks, (hook) => {
|
|
7643
7874
|
hook.call(DOMPurify, currentNode, data, CONFIG);
|
|
7644
7875
|
});
|
|
7645
7876
|
}
|
|
7646
7877
|
/**
|
|
7878
|
+
* Structural-threat checks that condemn a node regardless of the
|
|
7879
|
+
* allowlists: mXSS via namespace confusion, risky CSS construction,
|
|
7880
|
+
* processing instructions, markup-bearing comments. Pure predicate;
|
|
7881
|
+
* the caller removes. Check order is load-bearing.
|
|
7882
|
+
*
|
|
7883
|
+
* @param currentNode the node to inspect
|
|
7884
|
+
* @param tagName the node's transformCaseFunc'd tag name
|
|
7885
|
+
* @return true if the node must be removed
|
|
7886
|
+
*/
|
|
7887
|
+
const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {
|
|
7888
|
+
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;
|
|
7889
|
+
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && LITERAL_TEXT_ELEMENTS[tagName] && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === "string" && regExpTest(LITERAL_TEXT_CLOSE[tagName], currentNode.textContent))) return true;
|
|
7890
|
+
if (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;
|
|
7891
|
+
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;
|
|
7892
|
+
return false;
|
|
7893
|
+
};
|
|
7894
|
+
/**
|
|
7895
|
+
* Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate
|
|
7896
|
+
* function, per the validation in _parseConfig) against a name.
|
|
7897
|
+
* Additional arguments are forwarded to predicate functions - the
|
|
7898
|
+
* attributeNameCheck predicate receives the tag name as its second
|
|
7899
|
+
* argument. A null/absent check never matches.
|
|
7900
|
+
*
|
|
7901
|
+
* @param check the configured tagNameCheck / attributeNameCheck value
|
|
7902
|
+
* @param name the name to test
|
|
7903
|
+
* @param args extra arguments forwarded to a predicate function
|
|
7904
|
+
* @return true if the check matches the name
|
|
7905
|
+
*/
|
|
7906
|
+
const _matchesNameCheck = function _matchesNameCheck(check, name) {
|
|
7907
|
+
if (check instanceof RegExp) return regExpTest(check, name);
|
|
7908
|
+
if (check instanceof Function) {
|
|
7909
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
|
|
7910
|
+
return Boolean(check(name, ...args));
|
|
7911
|
+
}
|
|
7912
|
+
return false;
|
|
7913
|
+
};
|
|
7914
|
+
/**
|
|
7915
|
+
* Handle a node whose tag is forbidden or not allowlisted: keep
|
|
7916
|
+
* allowed custom elements (false return exits _sanitizeElements
|
|
7917
|
+
* early - the namespace and fallback-tag removal checks are
|
|
7918
|
+
* intentionally skipped for kept custom elements), else hoist
|
|
7919
|
+
* content per KEEP_CONTENT and remove.
|
|
7920
|
+
*
|
|
7921
|
+
* A kept custom element is the ONLY case in which this function
|
|
7922
|
+
* returns false, so the caller uses that return value to run the
|
|
7923
|
+
* afterSanitizeElements hook on the kept element and keep the
|
|
7924
|
+
* element-hook lifecycle consistent with normal allowlisted
|
|
7925
|
+
* elements (GHSA-c2j3-45gr-mqc4).
|
|
7926
|
+
*
|
|
7927
|
+
* @param currentNode the disallowed node
|
|
7928
|
+
* @param tagName the node's transformCaseFunc'd tag name
|
|
7929
|
+
* @return true if the node was removed, false if kept
|
|
7930
|
+
*/
|
|
7931
|
+
const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {
|
|
7932
|
+
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
|
|
7933
|
+
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
7934
|
+
const parentNode = getParentNode(currentNode);
|
|
7935
|
+
const childNodes = getChildNodes(currentNode);
|
|
7936
|
+
if (childNodes && parentNode) {
|
|
7937
|
+
const childCount = childNodes.length;
|
|
7938
|
+
for (let i = childCount - 1; i >= 0; --i) {
|
|
7939
|
+
const hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];
|
|
7940
|
+
parentNode.insertBefore(hoisted, getNextSibling(currentNode));
|
|
7941
|
+
}
|
|
7942
|
+
}
|
|
7943
|
+
}
|
|
7944
|
+
_forceRemove(currentNode);
|
|
7945
|
+
return true;
|
|
7946
|
+
};
|
|
7947
|
+
/**
|
|
7948
|
+
* Fork a hook-mutable allowlist off its shared binding the first time a
|
|
7949
|
+
* (possibly lazily-installed) uponSanitize* hook is about to see it, so the
|
|
7950
|
+
* hook cannot widen the per-instance default or the setConfig binding by
|
|
7951
|
+
* reference and leak past the call. Returns the set unchanged once it is
|
|
7952
|
+
* already call-local, so repeated calls across elements are idempotent.
|
|
7953
|
+
*
|
|
7954
|
+
* @param hookList the uponSanitize* hook array for this event
|
|
7955
|
+
* @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding
|
|
7956
|
+
* @param defaultSet the per-instance DEFAULT_ALLOWED_* constant
|
|
7957
|
+
* @param setConfigSet the captured setConfig() binding, or null
|
|
7958
|
+
* @return a call-local clone if a hook is present and set is still shared,
|
|
7959
|
+
* else set unchanged
|
|
7960
|
+
*/
|
|
7961
|
+
const _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {
|
|
7962
|
+
if (hookList.length === 0) return set;
|
|
7963
|
+
return set === defaultSet || set === setConfigSet ? clone(set) : set;
|
|
7964
|
+
};
|
|
7965
|
+
/**
|
|
7966
|
+
* Shared guard for a node that a hook has detached from the walk tree,
|
|
7967
|
+
* used after each element-hook site in _sanitizeElements. Detaching is a
|
|
7968
|
+
* long-standing user pattern (issue #469; draw.io-style foreignObject
|
|
7969
|
+
* filtering). Per the cached, unclobberable parentNode getter the node is
|
|
7970
|
+
* genuinely out of the tree, so it can reach neither the serialized
|
|
7971
|
+
* output nor an IN_PLACE live tree; treat it as removed and stop
|
|
7972
|
+
* processing it. Without this guard, the unsafe-node / namespace checks
|
|
7973
|
+
* would call _forceRemove on a parentless node and hit the REPORT-3
|
|
7974
|
+
* fail-closed throw — which exists for nodes DOMPurify wants gone but
|
|
7975
|
+
* *cannot* detach (clobbered / parentless roots), the opposite of a node
|
|
7976
|
+
* that is already safely gone. The walk root is exempt: a detached
|
|
7977
|
+
* IN_PLACE root is legitimate input and must still be fully sanitized,
|
|
7978
|
+
* and a kill-decision on it must keep hitting the REPORT-3 throw.
|
|
7979
|
+
*
|
|
7980
|
+
* Nodes detached by hooks stay the hook's responsibility for placement:
|
|
7981
|
+
* they are not recorded in DOMPurify.removed, so the post-walk IN_PLACE
|
|
7982
|
+
* pass (which iterates DOMPurify.removed) does not reach them. But a
|
|
7983
|
+
* hook-detached subtree can still hold a queued resource-event handler -
|
|
7984
|
+
* e.g. an <img onload> that began loading when the caller built the live
|
|
7985
|
+
* tree - which fires in page scope after sanitize returns even though the
|
|
7986
|
+
* handler never reached the returned tree. That is the audit-5 F1 hazard,
|
|
7987
|
+
* and the documented node.remove() hook pattern walks straight into it.
|
|
7988
|
+
* So on the IN_PLACE path we neutralize the detached subtree inline,
|
|
7989
|
+
* stripping its non-allow-listed attributes before returning, exactly as
|
|
7990
|
+
* the post-walk pass does for _forceRemove'd subtrees.
|
|
7991
|
+
*
|
|
7992
|
+
* @param currentNode the node a hook may have detached
|
|
7993
|
+
* @param root the current walk root
|
|
7994
|
+
* @return true if the node is detached and now handled, false otherwise
|
|
7995
|
+
*/
|
|
7996
|
+
const _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {
|
|
7997
|
+
if (currentNode === root || getParentNode(currentNode) !== null) return false;
|
|
7998
|
+
if (IN_PLACE) _neutralizeSubtree(currentNode);
|
|
7999
|
+
return true;
|
|
8000
|
+
};
|
|
8001
|
+
/**
|
|
7647
8002
|
* _sanitizeElements
|
|
7648
8003
|
*
|
|
7649
8004
|
* @protect nodeName
|
|
@@ -7652,70 +8007,39 @@ function createDOMPurify() {
|
|
|
7652
8007
|
* @param currentNode to check for permission to exist
|
|
7653
8008
|
* @return true if node was killed, false if left alive
|
|
7654
8009
|
*/
|
|
7655
|
-
const _sanitizeElements = function _sanitizeElements(currentNode) {
|
|
7656
|
-
let content = null;
|
|
8010
|
+
const _sanitizeElements = function _sanitizeElements(currentNode, root) {
|
|
7657
8011
|
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
|
8012
|
+
if (_handleHookDetachedNode(currentNode, root)) return true;
|
|
7658
8013
|
if (_isClobbered(currentNode)) {
|
|
7659
8014
|
_forceRemove(currentNode);
|
|
7660
8015
|
return true;
|
|
7661
8016
|
}
|
|
7662
|
-
const tagName = transformCaseFunc(
|
|
8017
|
+
const tagName = transformCaseFunc(_readNodeName(currentNode));
|
|
8018
|
+
ALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);
|
|
7663
8019
|
_executeHooks(hooks.uponSanitizeElement, currentNode, {
|
|
7664
8020
|
tagName,
|
|
7665
8021
|
allowedTags: ALLOWED_TAGS
|
|
7666
8022
|
});
|
|
7667
|
-
if (
|
|
7668
|
-
|
|
7669
|
-
return true;
|
|
7670
|
-
}
|
|
7671
|
-
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
|
|
7672
|
-
_forceRemove(currentNode);
|
|
7673
|
-
return true;
|
|
7674
|
-
}
|
|
7675
|
-
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
7676
|
-
_forceRemove(currentNode);
|
|
7677
|
-
return true;
|
|
7678
|
-
}
|
|
7679
|
-
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
|
|
8023
|
+
if (_handleHookDetachedNode(currentNode, root)) return true;
|
|
8024
|
+
if (_isUnsafeNode(currentNode, tagName)) {
|
|
7680
8025
|
_forceRemove(currentNode);
|
|
7681
8026
|
return true;
|
|
7682
8027
|
}
|
|
7683
8028
|
if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
}
|
|
7688
|
-
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
7689
|
-
const parentNode = getParentNode(currentNode);
|
|
7690
|
-
const childNodes = getChildNodes(currentNode);
|
|
7691
|
-
if (childNodes && parentNode) {
|
|
7692
|
-
const childCount = childNodes.length;
|
|
7693
|
-
for (let i = childCount - 1; i >= 0; --i) {
|
|
7694
|
-
const hoisted = IN_PLACE ? childNodes[i] : cloneNode(childNodes[i], true);
|
|
7695
|
-
parentNode.insertBefore(hoisted, getNextSibling(currentNode));
|
|
7696
|
-
}
|
|
7697
|
-
}
|
|
7698
|
-
}
|
|
7699
|
-
_forceRemove(currentNode);
|
|
7700
|
-
return true;
|
|
8029
|
+
const removed = _sanitizeDisallowedNode(currentNode, tagName, root);
|
|
8030
|
+
if (removed === false) _executeHooks(hooks.afterSanitizeElements, currentNode, null);
|
|
8031
|
+
return removed;
|
|
7701
8032
|
}
|
|
7702
|
-
if ((
|
|
8033
|
+
if (_readNodeType(currentNode) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
|
|
7703
8034
|
_forceRemove(currentNode);
|
|
7704
8035
|
return true;
|
|
7705
8036
|
}
|
|
7706
|
-
if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(
|
|
8037
|
+
if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {
|
|
7707
8038
|
_forceRemove(currentNode);
|
|
7708
8039
|
return true;
|
|
7709
8040
|
}
|
|
7710
8041
|
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
|
7711
|
-
content = currentNode.textContent;
|
|
7712
|
-
arrayForEach([
|
|
7713
|
-
MUSTACHE_EXPR$1,
|
|
7714
|
-
ERB_EXPR$1,
|
|
7715
|
-
TMPLIT_EXPR$1
|
|
7716
|
-
], (expr) => {
|
|
7717
|
-
content = stringReplace(content, expr, " ");
|
|
7718
|
-
});
|
|
8042
|
+
const content = _stripTemplateExpressions(currentNode.textContent);
|
|
7719
8043
|
if (currentNode.textContent !== content) {
|
|
7720
8044
|
arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });
|
|
7721
8045
|
currentNode.textContent = content;
|
|
@@ -7734,18 +8058,17 @@ function createDOMPurify() {
|
|
|
7734
8058
|
*/
|
|
7735
8059
|
const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
|
7736
8060
|
if (FORBID_ATTR[lcName]) return false;
|
|
8061
|
+
if (_isPatchLinkageAttribute(lcName, lcTag)) return false;
|
|
7737
8062
|
if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document || value in formElement)) return false;
|
|
7738
8063
|
const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
|
|
7739
|
-
if (ALLOW_DATA_ATTR &&
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
else if (value) return false;
|
|
7748
|
-
return true;
|
|
8064
|
+
if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) return true;
|
|
8065
|
+
if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) return true;
|
|
8066
|
+
if (!nameIsPermitted) return _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) || lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value);
|
|
8067
|
+
if (URI_SAFE_ATTRIBUTES[lcName]) return true;
|
|
8068
|
+
if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) return true;
|
|
8069
|
+
if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) return true;
|
|
8070
|
+
if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) return true;
|
|
8071
|
+
return !value;
|
|
7749
8072
|
};
|
|
7750
8073
|
const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, [
|
|
7751
8074
|
"annotation-xml",
|
|
@@ -7769,6 +8092,48 @@ function createDOMPurify() {
|
|
|
7769
8092
|
return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
|
|
7770
8093
|
};
|
|
7771
8094
|
/**
|
|
8095
|
+
* Wrap an attribute value in the matching Trusted Types object when
|
|
8096
|
+
* the active policy requires it. Namespaced attributes pass through
|
|
8097
|
+
* unchanged (no TT support yet, see
|
|
8098
|
+
* https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).
|
|
8099
|
+
*
|
|
8100
|
+
* @param lcTag lowercase tag name of the containing element
|
|
8101
|
+
* @param lcName lowercase attribute name
|
|
8102
|
+
* @param namespaceURI the attribute's namespace, if any
|
|
8103
|
+
* @param value the attribute value to wrap
|
|
8104
|
+
* @return the value, wrapped when Trusted Types demand it
|
|
8105
|
+
*/
|
|
8106
|
+
const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {
|
|
8107
|
+
if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function" && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
|
8108
|
+
case "TrustedHTML": return _createTrustedHTML(value);
|
|
8109
|
+
case "TrustedScriptURL": return _createTrustedScriptURL(value);
|
|
8110
|
+
}
|
|
8111
|
+
return value;
|
|
8112
|
+
};
|
|
8113
|
+
/**
|
|
8114
|
+
* Write a modified attribute value back onto the element. On
|
|
8115
|
+
* success, re-probe for clobbering introduced by the new value and
|
|
8116
|
+
* remove the element when found; otherwise pop the removal entry
|
|
8117
|
+
* recorded by the earlier _removeAttribute (long-standing pairing
|
|
8118
|
+
* with the SANITIZE_NAMED_PROPS path - do not "fix" casually). On
|
|
8119
|
+
* failure, remove the attribute instead.
|
|
8120
|
+
*
|
|
8121
|
+
* @param currentNode the element carrying the attribute
|
|
8122
|
+
* @param name the attribute name as present on the element
|
|
8123
|
+
* @param namespaceURI the attribute's namespace, if any
|
|
8124
|
+
* @param value the new attribute value
|
|
8125
|
+
*/
|
|
8126
|
+
const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {
|
|
8127
|
+
try {
|
|
8128
|
+
if (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);
|
|
8129
|
+
else currentNode.setAttribute(name, value);
|
|
8130
|
+
if (_isClobbered(currentNode)) _forceRemove(currentNode);
|
|
8131
|
+
else arrayPop(DOMPurify.removed);
|
|
8132
|
+
} catch (_) {
|
|
8133
|
+
_removeAttribute(name, currentNode);
|
|
8134
|
+
}
|
|
8135
|
+
};
|
|
8136
|
+
/**
|
|
7772
8137
|
* _sanitizeAttributes
|
|
7773
8138
|
*
|
|
7774
8139
|
* @protect attributes
|
|
@@ -7782,6 +8147,7 @@ function createDOMPurify() {
|
|
|
7782
8147
|
_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
|
|
7783
8148
|
const attributes = currentNode.attributes;
|
|
7784
8149
|
if (!attributes || _isClobbered(currentNode)) return;
|
|
8150
|
+
ALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);
|
|
7785
8151
|
const hookEvent = {
|
|
7786
8152
|
attrName: "",
|
|
7787
8153
|
attrValue: "",
|
|
@@ -7790,6 +8156,7 @@ function createDOMPurify() {
|
|
|
7790
8156
|
forceKeepAttr: void 0
|
|
7791
8157
|
};
|
|
7792
8158
|
let l = attributes.length;
|
|
8159
|
+
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
7793
8160
|
while (l--) {
|
|
7794
8161
|
const attr = attributes[l];
|
|
7795
8162
|
const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
|
|
@@ -7803,55 +8170,33 @@ function createDOMPurify() {
|
|
|
7803
8170
|
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
|
7804
8171
|
value = hookEvent.attrValue;
|
|
7805
8172
|
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
|
|
7806
|
-
_removeAttribute(name, currentNode);
|
|
8173
|
+
_removeAttribute(name, currentNode, attr);
|
|
7807
8174
|
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
7808
8175
|
}
|
|
7809
8176
|
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
|
|
7810
|
-
_removeAttribute(name, currentNode);
|
|
8177
|
+
_removeAttribute(name, currentNode, attr);
|
|
7811
8178
|
continue;
|
|
7812
8179
|
}
|
|
7813
8180
|
if (lcName === "attributename" && stringMatch(value, "href")) {
|
|
7814
|
-
_removeAttribute(name, currentNode);
|
|
8181
|
+
_removeAttribute(name, currentNode, attr);
|
|
7815
8182
|
continue;
|
|
7816
8183
|
}
|
|
7817
8184
|
if (hookEvent.forceKeepAttr) continue;
|
|
7818
8185
|
if (!hookEvent.keepAttr) {
|
|
7819
|
-
_removeAttribute(name, currentNode);
|
|
8186
|
+
_removeAttribute(name, currentNode, attr);
|
|
7820
8187
|
continue;
|
|
7821
8188
|
}
|
|
7822
|
-
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(
|
|
7823
|
-
_removeAttribute(name, currentNode);
|
|
8189
|
+
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {
|
|
8190
|
+
_removeAttribute(name, currentNode, attr);
|
|
7824
8191
|
continue;
|
|
7825
8192
|
}
|
|
7826
|
-
if (SAFE_FOR_TEMPLATES)
|
|
7827
|
-
MUSTACHE_EXPR$1,
|
|
7828
|
-
ERB_EXPR$1,
|
|
7829
|
-
TMPLIT_EXPR$1
|
|
7830
|
-
], (expr) => {
|
|
7831
|
-
value = stringReplace(value, expr, " ");
|
|
7832
|
-
});
|
|
7833
|
-
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
8193
|
+
if (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);
|
|
7834
8194
|
if (!_isValidAttribute(lcTag, lcName, value)) {
|
|
7835
|
-
_removeAttribute(name, currentNode);
|
|
8195
|
+
_removeAttribute(name, currentNode, attr);
|
|
7836
8196
|
continue;
|
|
7837
8197
|
}
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
case "TrustedHTML":
|
|
7841
|
-
value = _createTrustedHTML(value);
|
|
7842
|
-
break;
|
|
7843
|
-
case "TrustedScriptURL":
|
|
7844
|
-
value = _createTrustedScriptURL(value);
|
|
7845
|
-
break;
|
|
7846
|
-
}
|
|
7847
|
-
if (value !== initValue) try {
|
|
7848
|
-
if (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);
|
|
7849
|
-
else currentNode.setAttribute(name, value);
|
|
7850
|
-
if (_isClobbered(currentNode)) _forceRemove(currentNode);
|
|
7851
|
-
else arrayPop(DOMPurify.removed);
|
|
7852
|
-
} catch (_) {
|
|
7853
|
-
_removeAttribute(name, currentNode);
|
|
7854
|
-
}
|
|
8198
|
+
value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
|
|
8199
|
+
if (value !== initValue) _setAttributeValue(currentNode, name, namespaceURI, value);
|
|
7855
8200
|
}
|
|
7856
8201
|
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
|
7857
8202
|
};
|
|
@@ -7866,11 +8211,11 @@ function createDOMPurify() {
|
|
|
7866
8211
|
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
|
7867
8212
|
while (shadowNode = shadowIterator.nextNode()) {
|
|
7868
8213
|
_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
|
|
7869
|
-
_sanitizeElements(shadowNode);
|
|
8214
|
+
_sanitizeElements(shadowNode, fragment);
|
|
7870
8215
|
_sanitizeAttributes(shadowNode);
|
|
7871
8216
|
if (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);
|
|
7872
|
-
if ((
|
|
7873
|
-
const innerSr = getShadowRoot
|
|
8217
|
+
if (_readNodeType(shadowNode) === NODE_TYPE.element) {
|
|
8218
|
+
const innerSr = getShadowRoot(shadowNode);
|
|
7874
8219
|
if (_isDocumentFragment(innerSr)) {
|
|
7875
8220
|
_sanitizeAttachedShadowRoots(innerSr);
|
|
7876
8221
|
_sanitizeShadowDOM2(innerSr);
|
|
@@ -7910,8 +8255,8 @@ function createDOMPurify() {
|
|
|
7910
8255
|
continue;
|
|
7911
8256
|
}
|
|
7912
8257
|
const node = item.node;
|
|
7913
|
-
const isElement = (
|
|
7914
|
-
const childNodes = getChildNodes
|
|
8258
|
+
const isElement = _readNodeType(node) === NODE_TYPE.element;
|
|
8259
|
+
const childNodes = getChildNodes(node);
|
|
7915
8260
|
if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push({
|
|
7916
8261
|
node: childNodes[i],
|
|
7917
8262
|
shadow: null
|
|
@@ -7927,7 +8272,7 @@ function createDOMPurify() {
|
|
|
7927
8272
|
}
|
|
7928
8273
|
}
|
|
7929
8274
|
if (isElement) {
|
|
7930
|
-
const sr = getShadowRoot
|
|
8275
|
+
const sr = getShadowRoot(node);
|
|
7931
8276
|
if (_isDocumentFragment(sr)) stack.push({
|
|
7932
8277
|
node: null,
|
|
7933
8278
|
shadow: sr
|
|
@@ -7951,16 +8296,28 @@ function createDOMPurify() {
|
|
|
7951
8296
|
if (typeof dirty !== "string") throw typeErrorCreate("dirty is not a string, aborting");
|
|
7952
8297
|
}
|
|
7953
8298
|
if (!DOMPurify.isSupported) return dirty;
|
|
7954
|
-
if (
|
|
8299
|
+
if (SET_CONFIG) {
|
|
8300
|
+
ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;
|
|
8301
|
+
ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;
|
|
8302
|
+
} else _parseConfig(cfg);
|
|
8303
|
+
if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
8304
|
+
if (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
7955
8305
|
DOMPurify.removed = [];
|
|
7956
8306
|
const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
|
|
7957
8307
|
if (inPlace) {
|
|
7958
|
-
|
|
8308
|
+
_neutralizePatchLinkage(dirty);
|
|
8309
|
+
const nn = _readNodeName(dirty);
|
|
7959
8310
|
if (typeof nn === "string") {
|
|
7960
8311
|
const tagName = transformCaseFunc(nn);
|
|
7961
|
-
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])
|
|
8312
|
+
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
8313
|
+
_neutralizeRoot(dirty);
|
|
8314
|
+
throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
8315
|
+
}
|
|
8316
|
+
}
|
|
8317
|
+
if (_isClobbered(dirty)) {
|
|
8318
|
+
_neutralizeRoot(dirty);
|
|
8319
|
+
throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
|
|
7962
8320
|
}
|
|
7963
|
-
if (_isClobbered(dirty)) throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
|
|
7964
8321
|
try {
|
|
7965
8322
|
_sanitizeAttachedShadowRoots(dirty);
|
|
7966
8323
|
} catch (error) {
|
|
@@ -7980,15 +8337,21 @@ function createDOMPurify() {
|
|
|
7980
8337
|
if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
|
|
7981
8338
|
}
|
|
7982
8339
|
if (body && FORCE_BODY) _forceRemove(body.firstChild);
|
|
7983
|
-
const
|
|
8340
|
+
const walkRoot = inPlace ? dirty : body;
|
|
7984
8341
|
try {
|
|
8342
|
+
const nodeIterator = _createNodeIterator(walkRoot);
|
|
7985
8343
|
while (currentNode = nodeIterator.nextNode()) {
|
|
7986
|
-
_sanitizeElements(currentNode);
|
|
8344
|
+
_sanitizeElements(currentNode, walkRoot);
|
|
7987
8345
|
_sanitizeAttributes(currentNode);
|
|
7988
8346
|
if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
|
|
7989
8347
|
}
|
|
7990
8348
|
} catch (error) {
|
|
7991
|
-
if (inPlace)
|
|
8349
|
+
if (inPlace) {
|
|
8350
|
+
_neutralizeRoot(dirty);
|
|
8351
|
+
arrayForEach(DOMPurify.removed, (entry) => {
|
|
8352
|
+
if (entry.element) _neutralizeSubtree(entry.element);
|
|
8353
|
+
});
|
|
8354
|
+
}
|
|
7992
8355
|
throw error;
|
|
7993
8356
|
}
|
|
7994
8357
|
if (inPlace) {
|
|
@@ -8009,34 +8372,37 @@ function createDOMPurify() {
|
|
|
8009
8372
|
}
|
|
8010
8373
|
let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
|
|
8011
8374
|
if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
|
|
8012
|
-
if (SAFE_FOR_TEMPLATES)
|
|
8013
|
-
MUSTACHE_EXPR$1,
|
|
8014
|
-
ERB_EXPR$1,
|
|
8015
|
-
TMPLIT_EXPR$1
|
|
8016
|
-
], (expr) => {
|
|
8017
|
-
serializedHTML = stringReplace(serializedHTML, expr, " ");
|
|
8018
|
-
});
|
|
8375
|
+
if (SAFE_FOR_TEMPLATES) serializedHTML = _stripTemplateExpressions(serializedHTML);
|
|
8019
8376
|
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;
|
|
8020
8377
|
};
|
|
8021
8378
|
DOMPurify.setConfig = function() {
|
|
8022
|
-
|
|
8379
|
+
let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
8380
|
+
_parseConfig(cfg);
|
|
8023
8381
|
SET_CONFIG = true;
|
|
8382
|
+
SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;
|
|
8383
|
+
SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;
|
|
8024
8384
|
};
|
|
8025
8385
|
DOMPurify.clearConfig = function() {
|
|
8026
8386
|
CONFIG = null;
|
|
8027
8387
|
SET_CONFIG = false;
|
|
8388
|
+
SET_CONFIG_ALLOWED_TAGS = null;
|
|
8389
|
+
SET_CONFIG_ALLOWED_ATTR = null;
|
|
8028
8390
|
trustedTypesPolicy = defaultTrustedTypesPolicy;
|
|
8029
8391
|
emptyHTML = "";
|
|
8030
8392
|
};
|
|
8031
8393
|
DOMPurify.isValidAttribute = function(tag, attr, value) {
|
|
8032
8394
|
if (!CONFIG) _parseConfig({});
|
|
8033
|
-
|
|
8395
|
+
const lcTag = transformCaseFunc(tag);
|
|
8396
|
+
const lcName = transformCaseFunc(attr);
|
|
8397
|
+
return _isValidAttribute(lcTag, lcName, value);
|
|
8034
8398
|
};
|
|
8035
8399
|
DOMPurify.addHook = function(entryPoint, hookFunction) {
|
|
8036
8400
|
if (typeof hookFunction !== "function") return;
|
|
8401
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) return;
|
|
8037
8402
|
arrayPush(hooks[entryPoint], hookFunction);
|
|
8038
8403
|
};
|
|
8039
8404
|
DOMPurify.removeHook = function(entryPoint, hookFunction) {
|
|
8405
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) return;
|
|
8040
8406
|
if (hookFunction !== void 0) {
|
|
8041
8407
|
const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
|
|
8042
8408
|
return index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];
|
|
@@ -8044,6 +8410,7 @@ function createDOMPurify() {
|
|
|
8044
8410
|
return arrayPop(hooks[entryPoint]);
|
|
8045
8411
|
};
|
|
8046
8412
|
DOMPurify.removeHooks = function(entryPoint) {
|
|
8413
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) return;
|
|
8047
8414
|
hooks[entryPoint] = [];
|
|
8048
8415
|
};
|
|
8049
8416
|
DOMPurify.removeAllHooks = function() {
|
|
@@ -8108,6 +8475,7 @@ var UXModelInstrumentAgentCommon_vue_vue_type_script_setup_true_lang_default = /
|
|
|
8108
8475
|
emits: ["myclick"],
|
|
8109
8476
|
setup(__props, { emit: __emit }) {
|
|
8110
8477
|
const convert = new import_ansi_to_html.default();
|
|
8478
|
+
console.debug(`UXModelInstrumentAgentCommon(): ModelStore`);
|
|
8111
8479
|
const store = ModelStore();
|
|
8112
8480
|
const props = __props;
|
|
8113
8481
|
const LogData = (0, vue.computed)(() => {
|
|
@@ -8151,13 +8519,6 @@ var UXModelInstrumentAgentCommon_vue_vue_type_script_setup_true_lang_default = /
|
|
|
8151
8519
|
} catch (error) {
|
|
8152
8520
|
return "";
|
|
8153
8521
|
}
|
|
8154
|
-
let numArray = value.map((value) => (Math.round(value[1] * 100) / 100).toFixed(2));
|
|
8155
|
-
let sep = "";
|
|
8156
|
-
return "[" + numArray.reduce((prev, current) => {
|
|
8157
|
-
const retVal = prev += sep + current;
|
|
8158
|
-
sep = ", ";
|
|
8159
|
-
return retVal;
|
|
8160
|
-
}, "") + "]";
|
|
8161
8522
|
};
|
|
8162
8523
|
const convertMS = function(ms) {
|
|
8163
8524
|
let s = Math.floor(ms / 1e3);
|
|
@@ -8183,8 +8544,10 @@ var UXModelInstrumentAgentCommon_vue_vue_type_script_setup_true_lang_default = /
|
|
|
8183
8544
|
return false;
|
|
8184
8545
|
},
|
|
8185
8546
|
set: (val) => {
|
|
8186
|
-
if (store._models[props.modelId])
|
|
8187
|
-
|
|
8547
|
+
if (store._models[props.modelId]) {
|
|
8548
|
+
if (store._models[props.modelId].modelMeta[props.nodeid]) store._models[props.modelId].modelMeta[props.nodeid].detailView = val;
|
|
8549
|
+
else store._models[props.modelId].modelMeta[props.nodeid] = { detailView: val };
|
|
8550
|
+
}
|
|
8188
8551
|
}
|
|
8189
8552
|
});
|
|
8190
8553
|
const barChartEx = (0, vue.ref)();
|
|
@@ -8382,7 +8745,7 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
8382
8745
|
};
|
|
8383
8746
|
//#endregion
|
|
8384
8747
|
//#region src/components/UXModelInstrumentAgentCommon.vue
|
|
8385
|
-
var UXModelInstrumentAgentCommon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(UXModelInstrumentAgentCommon_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
8748
|
+
var UXModelInstrumentAgentCommon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(UXModelInstrumentAgentCommon_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-74180ab3"]]);
|
|
8386
8749
|
//#endregion
|
|
8387
8750
|
//#region node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
8388
8751
|
var ANSI_BACKGROUND_OFFSET$1 = 10;
|
|
@@ -8795,6 +9158,7 @@ var UXModelInstrumentServiceCommon_default = /*#__PURE__*/ _plugin_vue_export_he
|
|
|
8795
9158
|
else return id;
|
|
8796
9159
|
};
|
|
8797
9160
|
const convert = new import_ansi_to_html.default();
|
|
9161
|
+
console.debug(`UXModelInstrumentServiceCommon(): ModelStore`);
|
|
8798
9162
|
const store = ModelStore();
|
|
8799
9163
|
const emit = __emit;
|
|
8800
9164
|
const clicked = function(id) {
|
|
@@ -8872,8 +9236,10 @@ var UXModelInstrumentServiceCommon_default = /*#__PURE__*/ _plugin_vue_export_he
|
|
|
8872
9236
|
return false;
|
|
8873
9237
|
},
|
|
8874
9238
|
set: (val) => {
|
|
8875
|
-
if (store._models[props.modelId])
|
|
8876
|
-
|
|
9239
|
+
if (store._models[props.modelId]) {
|
|
9240
|
+
if (store._models[props.modelId].modelMeta[props.nodeid]) store._models[props.modelId].modelMeta[props.nodeid].detailView = val;
|
|
9241
|
+
else store._models[props.modelId].modelMeta[props.nodeid] = { detailView: val };
|
|
9242
|
+
}
|
|
8877
9243
|
}
|
|
8878
9244
|
});
|
|
8879
9245
|
const lineChartEx = (0, vue.ref)();
|
|
@@ -9186,7 +9552,7 @@ var UXModelInstrumentServiceCommon_default = /*#__PURE__*/ _plugin_vue_export_he
|
|
|
9186
9552
|
});
|
|
9187
9553
|
};
|
|
9188
9554
|
}
|
|
9189
|
-
}), [["__scopeId", "data-v-
|
|
9555
|
+
}), [["__scopeId", "data-v-cf987598"]]);
|
|
9190
9556
|
//#endregion
|
|
9191
9557
|
//#region src/components/UXModelInstrumentServiceSmall.vue?vue&type=script&setup=true&lang.ts
|
|
9192
9558
|
var _hoisted_1$3 = { class: "ststitle" };
|
|
@@ -9276,6 +9642,7 @@ var UXModelInstrumentServiceSmall_default = /*#__PURE__*/ _plugin_vue_export_hel
|
|
|
9276
9642
|
emits: ["myclick"],
|
|
9277
9643
|
setup(__props, { emit: __emit }) {
|
|
9278
9644
|
chalk$1.level = 3;
|
|
9645
|
+
console.debug(`UXModelInstrumentServiceSmall(): ModelStore`);
|
|
9279
9646
|
const store = ModelStore();
|
|
9280
9647
|
const emit = __emit;
|
|
9281
9648
|
const clicked = function(id) {
|
|
@@ -9563,7 +9930,7 @@ var UXModelInstrumentServiceSmall_default = /*#__PURE__*/ _plugin_vue_export_hel
|
|
|
9563
9930
|
class: "mb-3"
|
|
9564
9931
|
}, {
|
|
9565
9932
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(_component_v_col, { cols: "6" }, {
|
|
9566
|
-
default: (0, vue.withCtx)(() => [_cache[1] || (_cache[1] = (0, vue.createElementVNode)("div", { class: "stsbiginfolabel" }, "
|
|
9933
|
+
default: (0, vue.withCtx)(() => [_cache[1] || (_cache[1] = (0, vue.createElementVNode)("div", { class: "stsbiginfolabel" }, "CPU", -1)), (0, vue.createElementVNode)("div", _hoisted_3, [(0, vue.createTextVNode)((0, vue.toDisplayString)(round2Places(CPU.value)) + "% ", 1), (0, vue.createVNode)(_component_v_progress_circular, {
|
|
9567
9934
|
class: "mb-1",
|
|
9568
9935
|
rotate: 360,
|
|
9569
9936
|
size: 20,
|
|
@@ -9577,7 +9944,7 @@ var UXModelInstrumentServiceSmall_default = /*#__PURE__*/ _plugin_vue_export_hel
|
|
|
9577
9944
|
])])]),
|
|
9578
9945
|
_: 1
|
|
9579
9946
|
}), (0, vue.createVNode)(_component_v_col, { cols: "6" }, {
|
|
9580
|
-
default: (0, vue.withCtx)(() => [_cache[2] || (_cache[2] = (0, vue.createElementVNode)("div", { class: "stsbiginfolabel" }, "
|
|
9947
|
+
default: (0, vue.withCtx)(() => [_cache[2] || (_cache[2] = (0, vue.createElementVNode)("div", { class: "stsbiginfolabel" }, "Velocity", -1)), (0, vue.createElementVNode)("div", _hoisted_4, [(0, vue.createTextVNode)((0, vue.toDisplayString)(velocityFormat(Velocity.value)) + " ", 1), (0, vue.createVNode)(_component_v_progress_circular, {
|
|
9581
9948
|
class: "mb-1",
|
|
9582
9949
|
rotate: 360,
|
|
9583
9950
|
size: 18,
|
|
@@ -9598,7 +9965,7 @@ var UXModelInstrumentServiceSmall_default = /*#__PURE__*/ _plugin_vue_export_hel
|
|
|
9598
9965
|
class: "mb-3"
|
|
9599
9966
|
}, {
|
|
9600
9967
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(_component_v_col, { cols: "6" }, {
|
|
9601
|
-
default: (0, vue.withCtx)(() => [_cache[3] || (_cache[3] = (0, vue.createElementVNode)("div", { class: "stsbiginfolabel" }, "
|
|
9968
|
+
default: (0, vue.withCtx)(() => [_cache[3] || (_cache[3] = (0, vue.createElementVNode)("div", { class: "stsbiginfolabel" }, "Active Rx Count", -1)), (0, vue.createElementVNode)("div", _hoisted_5, [(0, vue.createTextVNode)((0, vue.toDisplayString)(ActiveRequestCount.value) + " ", 1), (0, vue.createVNode)(_component_v_progress_circular, {
|
|
9602
9969
|
rotate: 360,
|
|
9603
9970
|
size: 18,
|
|
9604
9971
|
width: ActiveRequestWidth.value,
|
|
@@ -9611,7 +9978,7 @@ var UXModelInstrumentServiceSmall_default = /*#__PURE__*/ _plugin_vue_export_hel
|
|
|
9611
9978
|
])])]),
|
|
9612
9979
|
_: 1
|
|
9613
9980
|
}), (0, vue.createVNode)(_component_v_col, { cols: "6" }, {
|
|
9614
|
-
default: (0, vue.withCtx)(() => [_cache[4] || (_cache[4] = (0, vue.createElementVNode)("div", { class: "stsbiginfolabel" }, "
|
|
9981
|
+
default: (0, vue.withCtx)(() => [_cache[4] || (_cache[4] = (0, vue.createElementVNode)("div", { class: "stsbiginfolabel" }, "Connections", -1)), (0, vue.createElementVNode)("div", _hoisted_6, [(0, vue.createTextVNode)((0, vue.toDisplayString)(ConnectionCount.value) + " ", 1), (0, vue.createVNode)(_component_v_progress_circular, {
|
|
9615
9982
|
rotate: 360,
|
|
9616
9983
|
size: 18,
|
|
9617
9984
|
width: ConnectionCountWidth.value,
|
|
@@ -9647,7 +10014,7 @@ var UXModelInstrumentServiceSmall_default = /*#__PURE__*/ _plugin_vue_export_hel
|
|
|
9647
10014
|
default: (0, vue.withCtx)(() => [..._cache[6] || (_cache[6] = [(0, vue.createElementVNode)("div", { style: {
|
|
9648
10015
|
"white-space": "nowrap",
|
|
9649
10016
|
"text-align": "right"
|
|
9650
|
-
} }, "
|
|
10017
|
+
} }, "Timer:", -1)])]),
|
|
9651
10018
|
_: 1
|
|
9652
10019
|
}), (0, vue.createVNode)(_component_v_col, { cols: "6" }, {
|
|
9653
10020
|
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_8, (0, vue.toDisplayString)(Timer.value), 1)]),
|
|
@@ -9725,7 +10092,7 @@ var UXModelInstrumentServiceSmall_default = /*#__PURE__*/ _plugin_vue_export_hel
|
|
|
9725
10092
|
default: (0, vue.withCtx)(() => [..._cache[12] || (_cache[12] = [(0, vue.createElementVNode)("div", { style: {
|
|
9726
10093
|
"white-space": "nowrap",
|
|
9727
10094
|
"text-align": "right"
|
|
9728
|
-
} }, "
|
|
10095
|
+
} }, "vCPU:", -1)])]),
|
|
9729
10096
|
_: 1
|
|
9730
10097
|
}), (0, vue.createVNode)(_component_v_col, { cols: "6" }, {
|
|
9731
10098
|
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_14, (0, vue.toDisplayString)(CoreCount.value), 1)]),
|
|
@@ -9751,7 +10118,7 @@ var UXModelInstrumentServiceSmall_default = /*#__PURE__*/ _plugin_vue_export_hel
|
|
|
9751
10118
|
});
|
|
9752
10119
|
};
|
|
9753
10120
|
}
|
|
9754
|
-
}), [["__scopeId", "data-v-
|
|
10121
|
+
}), [["__scopeId", "data-v-113819e0"]]);
|
|
9755
10122
|
//#endregion
|
|
9756
10123
|
//#region src/components/UXModelNode.vue?vue&type=script&setup=true&lang.ts
|
|
9757
10124
|
var _hoisted_1$2 = ["value"];
|
|
@@ -9768,6 +10135,7 @@ var UXModelNode_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9768
10135
|
emits: ["myclick"],
|
|
9769
10136
|
setup(__props, { emit: __emit }) {
|
|
9770
10137
|
chalk$1.level = 3;
|
|
10138
|
+
console.debug(`UXModelNode(): ModelStore`);
|
|
9771
10139
|
const store = ModelStore();
|
|
9772
10140
|
const props = __props;
|
|
9773
10141
|
const emit = __emit;
|
|
@@ -9877,6 +10245,117 @@ function bind(fn, thisArg) {
|
|
|
9877
10245
|
var { toString } = Object.prototype;
|
|
9878
10246
|
var { getPrototypeOf } = Object;
|
|
9879
10247
|
var { iterator, toStringTag } = Symbol;
|
|
10248
|
+
var hasOwnProperty = (({ hasOwnProperty }) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
|
|
10249
|
+
var isUnsafeObjectKey = (prop) => typeof prop === "string" && (prop === "__proto__" || prop === "constructor" || prop === "prototype");
|
|
10250
|
+
/**
|
|
10251
|
+
* Determine whether an inherited object must be treated as a shared-prototype
|
|
10252
|
+
* boundary. Cross-realm Object.prototype objects cannot be distinguished
|
|
10253
|
+
* reliably from application-created null-prototype objects because their
|
|
10254
|
+
* properties are mutable, so all inherited terminal prototypes are excluded
|
|
10255
|
+
* as a fail-closed boundary. A null-prototype source still keeps its own
|
|
10256
|
+
* properties, as produced by mergeConfig and other safe materialization paths.
|
|
10257
|
+
*
|
|
10258
|
+
* @param {*} obj The object to inspect
|
|
10259
|
+
* @param {*} prototype The object's prototype
|
|
10260
|
+
* @param {boolean} source Whether obj is the original traversal source
|
|
10261
|
+
*
|
|
10262
|
+
* @returns {boolean} True when obj is a safe prototype traversal boundary
|
|
10263
|
+
*/
|
|
10264
|
+
var isPrototypeBoundary = (obj, prototype, source) => obj === Object.prototype || !source && prototype === null;
|
|
10265
|
+
/**
|
|
10266
|
+
* Determine whether an object can retain its identity through code paths that
|
|
10267
|
+
* add, replace, and remove config properties without bypassing unsafe-key
|
|
10268
|
+
* filtering. Immutable objects, unsafe-key-bearing objects, and objects with
|
|
10269
|
+
* accessor or restricted data properties must be materialized instead.
|
|
10270
|
+
*
|
|
10271
|
+
* @param {*} obj The object to inspect
|
|
10272
|
+
*
|
|
10273
|
+
* @returns {boolean} True when every own property is safe and fully mutable
|
|
10274
|
+
*/
|
|
10275
|
+
var isSafeAndFullyMutable = (obj) => {
|
|
10276
|
+
if (!Object.isExtensible(obj)) return false;
|
|
10277
|
+
const props = Object.getOwnPropertyNames(obj);
|
|
10278
|
+
if (Object.getOwnPropertySymbols) props.push(...Object.getOwnPropertySymbols(obj));
|
|
10279
|
+
return props.every((prop) => {
|
|
10280
|
+
if (isUnsafeObjectKey(prop)) return false;
|
|
10281
|
+
const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
|
|
10282
|
+
return !!descriptor && descriptor.configurable && descriptor.writable === true;
|
|
10283
|
+
});
|
|
10284
|
+
};
|
|
10285
|
+
/**
|
|
10286
|
+
* Walk the prototype chain (excluding the source realm's Object.prototype)
|
|
10287
|
+
* looking for an own `prop`. This distinguishes genuine own/inherited members
|
|
10288
|
+
* — including class accessors and template prototypes — from members injected
|
|
10289
|
+
* via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),
|
|
10290
|
+
* which live on Object.prototype itself and are therefore never matched.
|
|
10291
|
+
*
|
|
10292
|
+
* @param {*} thing The value whose chain to inspect
|
|
10293
|
+
* @param {string|symbol} prop The property key to look for
|
|
10294
|
+
*
|
|
10295
|
+
* @returns {boolean} True when `prop` is owned below Object.prototype
|
|
10296
|
+
*/
|
|
10297
|
+
var hasOwnInPrototypeChain = (thing, prop) => {
|
|
10298
|
+
let obj = thing;
|
|
10299
|
+
const seen = [];
|
|
10300
|
+
while (obj != null) {
|
|
10301
|
+
if (seen.indexOf(obj) !== -1) return false;
|
|
10302
|
+
seen.push(obj);
|
|
10303
|
+
const prototype = getPrototypeOf(obj);
|
|
10304
|
+
if (isPrototypeBoundary(obj, prototype, obj === thing)) return false;
|
|
10305
|
+
if (hasOwnProperty(obj, prop)) return true;
|
|
10306
|
+
obj = prototype;
|
|
10307
|
+
}
|
|
10308
|
+
return false;
|
|
10309
|
+
};
|
|
10310
|
+
/**
|
|
10311
|
+
* Read `obj[prop]` only when it is safe from Object.prototype pollution. Own
|
|
10312
|
+
* properties and members inherited from a non-Object.prototype source (a class
|
|
10313
|
+
* instance or template object) are honored; a value reachable only through a
|
|
10314
|
+
* polluted Object.prototype is ignored and `undefined` is returned.
|
|
10315
|
+
*
|
|
10316
|
+
* @param {*} obj The source object
|
|
10317
|
+
* @param {string|symbol} prop The property key to read
|
|
10318
|
+
*
|
|
10319
|
+
* @returns {*} The resolved value, or undefined when unsafe/absent
|
|
10320
|
+
*/
|
|
10321
|
+
var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
|
|
10322
|
+
/**
|
|
10323
|
+
* Flatten an object and its application-defined prototype chain into a
|
|
10324
|
+
* null-prototype object. Members inherited only from the source realm's
|
|
10325
|
+
* Object.prototype are deliberately excluded, while class/template members
|
|
10326
|
+
* below that boundary are preserved.
|
|
10327
|
+
*
|
|
10328
|
+
* @param {*} thing The value to flatten
|
|
10329
|
+
*
|
|
10330
|
+
* @returns {*} A null-prototype copy, or the original value when it is already
|
|
10331
|
+
* structurally safe or is not an object
|
|
10332
|
+
*/
|
|
10333
|
+
var toSafeFlatObject = (thing) => {
|
|
10334
|
+
if (thing == null || typeof thing !== "object" && typeof thing !== "function") return thing;
|
|
10335
|
+
const sourcePrototype = getPrototypeOf(thing);
|
|
10336
|
+
if (sourcePrototype === null && isSafeAndFullyMutable(thing)) return thing;
|
|
10337
|
+
const result = Object.create(null);
|
|
10338
|
+
const merged = Object.create(null);
|
|
10339
|
+
const seen = [];
|
|
10340
|
+
let current = thing;
|
|
10341
|
+
while (current != null) {
|
|
10342
|
+
if (seen.indexOf(current) !== -1) break;
|
|
10343
|
+
seen.push(current);
|
|
10344
|
+
const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);
|
|
10345
|
+
if (isPrototypeBoundary(current, prototype, current === thing)) break;
|
|
10346
|
+
const props = Object.getOwnPropertyNames(current);
|
|
10347
|
+
if (Object.getOwnPropertySymbols) props.push(...Object.getOwnPropertySymbols(current));
|
|
10348
|
+
for (const prop of props) {
|
|
10349
|
+
if (isUnsafeObjectKey(prop)) continue;
|
|
10350
|
+
if (!hasOwnProperty(merged, prop)) {
|
|
10351
|
+
result[prop] = thing[prop];
|
|
10352
|
+
merged[prop] = true;
|
|
10353
|
+
}
|
|
10354
|
+
}
|
|
10355
|
+
current = prototype;
|
|
10356
|
+
}
|
|
10357
|
+
return result;
|
|
10358
|
+
};
|
|
9880
10359
|
var kindOf = ((cache) => (thing) => {
|
|
9881
10360
|
const str = toString.call(thing);
|
|
9882
10361
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -9979,9 +10458,9 @@ var isBoolean = (thing) => thing === true || thing === false;
|
|
|
9979
10458
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
9980
10459
|
*/
|
|
9981
10460
|
var isPlainObject = (val) => {
|
|
9982
|
-
if (
|
|
10461
|
+
if (!isObject(val)) return false;
|
|
9983
10462
|
const prototype = getPrototypeOf(val);
|
|
9984
|
-
return (prototype === null || prototype === Object.prototype ||
|
|
10463
|
+
return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
|
|
9985
10464
|
};
|
|
9986
10465
|
/**
|
|
9987
10466
|
* Determine if a value is an empty object (safely handles Buffers)
|
|
@@ -10053,6 +10532,7 @@ var isBlob = kindOfTest("Blob");
|
|
|
10053
10532
|
* @returns {boolean} True if value is a FileList, otherwise false
|
|
10054
10533
|
*/
|
|
10055
10534
|
var isFileList = kindOfTest("FileList");
|
|
10535
|
+
var isSet = kindOfTest("Set");
|
|
10056
10536
|
/**
|
|
10057
10537
|
* Determine if a value is a Stream
|
|
10058
10538
|
*
|
|
@@ -10387,7 +10867,6 @@ var toCamelCase = (str) => {
|
|
|
10387
10867
|
return p1.toUpperCase() + p2;
|
|
10388
10868
|
});
|
|
10389
10869
|
};
|
|
10390
|
-
var hasOwnProperty = (({ hasOwnProperty }) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
|
|
10391
10870
|
var { propertyIsEnumerable } = Object.prototype;
|
|
10392
10871
|
/**
|
|
10393
10872
|
* Determine if a value is a RegExp object
|
|
@@ -10475,11 +10954,20 @@ var toJSONObject = (obj) => {
|
|
|
10475
10954
|
if (isBuffer(source)) return source;
|
|
10476
10955
|
if (!("toJSON" in source)) {
|
|
10477
10956
|
visited.add(source);
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10957
|
+
let target;
|
|
10958
|
+
if (isSet(source)) {
|
|
10959
|
+
target = [];
|
|
10960
|
+
for (const value of source) {
|
|
10961
|
+
const reducedValue = visit(value);
|
|
10962
|
+
!isUndefined(reducedValue) && target.push(reducedValue);
|
|
10963
|
+
}
|
|
10964
|
+
} else {
|
|
10965
|
+
target = isArray(source) ? [] : {};
|
|
10966
|
+
forEach(source, (value, key) => {
|
|
10967
|
+
const reducedValue = visit(value);
|
|
10968
|
+
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
10969
|
+
});
|
|
10970
|
+
}
|
|
10483
10971
|
visited.delete(source);
|
|
10484
10972
|
return target;
|
|
10485
10973
|
}
|
|
@@ -10530,6 +11018,18 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
10530
11018
|
*/
|
|
10531
11019
|
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
10532
11020
|
var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
11021
|
+
/**
|
|
11022
|
+
* Determine if a value is iterable via an iterator that is NOT sourced solely
|
|
11023
|
+
* from a polluted Object.prototype. Use this instead of `isIterable` whenever
|
|
11024
|
+
* the iterable comes from untrusted input (e.g. user-supplied header sources),
|
|
11025
|
+
* so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object
|
|
11026
|
+
* into an attacker-controlled entries iterator.
|
|
11027
|
+
*
|
|
11028
|
+
* @param {*} thing The value to test
|
|
11029
|
+
*
|
|
11030
|
+
* @returns {boolean} True if value has a non-polluted iterator
|
|
11031
|
+
*/
|
|
11032
|
+
var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
|
|
10533
11033
|
var utils_default = {
|
|
10534
11034
|
isArray,
|
|
10535
11035
|
isArrayBuffer,
|
|
@@ -10574,6 +11074,9 @@ var utils_default = {
|
|
|
10574
11074
|
isHTMLForm,
|
|
10575
11075
|
hasOwnProperty,
|
|
10576
11076
|
hasOwnProp: hasOwnProperty,
|
|
11077
|
+
hasOwnInPrototypeChain,
|
|
11078
|
+
getSafeProp,
|
|
11079
|
+
toSafeFlatObject,
|
|
10577
11080
|
reduceDescriptors,
|
|
10578
11081
|
freezeMethods,
|
|
10579
11082
|
toObjectSet,
|
|
@@ -10589,7 +11092,8 @@ var utils_default = {
|
|
|
10589
11092
|
isThenable,
|
|
10590
11093
|
setImmediate: _setImmediate,
|
|
10591
11094
|
asap,
|
|
10592
|
-
isIterable
|
|
11095
|
+
isIterable,
|
|
11096
|
+
isSafeIterable
|
|
10593
11097
|
};
|
|
10594
11098
|
//#endregion
|
|
10595
11099
|
//#region node_modules/axios/lib/helpers/parseHeaders.js
|
|
@@ -10635,10 +11139,12 @@ var parseHeaders_default = (rawHeaders) => {
|
|
|
10635
11139
|
i = line.indexOf(":");
|
|
10636
11140
|
key = line.substring(0, i).trim().toLowerCase();
|
|
10637
11141
|
val = line.substring(i + 1).trim();
|
|
10638
|
-
|
|
10639
|
-
if (key
|
|
10640
|
-
|
|
10641
|
-
|
|
11142
|
+
const hasKey = utils_default.hasOwnProp(parsed, key);
|
|
11143
|
+
if (!key || hasKey && utils_default.hasOwnProp(ignoreDuplicateOf, key)) return;
|
|
11144
|
+
if (key === "set-cookie") {
|
|
11145
|
+
if (hasKey) parsed[key].push(val);
|
|
11146
|
+
else parsed[key] = [val];
|
|
11147
|
+
} else parsed[key] = hasKey ? parsed[key] + ", " + val : val;
|
|
10642
11148
|
});
|
|
10643
11149
|
return parsed;
|
|
10644
11150
|
};
|
|
@@ -10676,7 +11182,7 @@ function toByteStringHeaderObject(headers) {
|
|
|
10676
11182
|
}
|
|
10677
11183
|
//#endregion
|
|
10678
11184
|
//#region node_modules/axios/lib/core/AxiosHeaders.js
|
|
10679
|
-
var $internals = Symbol("internals");
|
|
11185
|
+
var $internals$1 = Symbol("internals");
|
|
10680
11186
|
function normalizeHeader(header) {
|
|
10681
11187
|
return header && String(header).trim().toLowerCase();
|
|
10682
11188
|
}
|
|
@@ -10691,6 +11197,69 @@ function parseTokens(str) {
|
|
|
10691
11197
|
while (match = tokensRE.exec(str)) tokens[match[1]] = match[2];
|
|
10692
11198
|
return tokens;
|
|
10693
11199
|
}
|
|
11200
|
+
var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
11201
|
+
function trimOWS(value) {
|
|
11202
|
+
let start = 0;
|
|
11203
|
+
let end = value.length;
|
|
11204
|
+
while (start < end) {
|
|
11205
|
+
const code = value.charCodeAt(start);
|
|
11206
|
+
if (code !== 9 && code !== 32) break;
|
|
11207
|
+
start += 1;
|
|
11208
|
+
}
|
|
11209
|
+
while (end > start) {
|
|
11210
|
+
const code = value.charCodeAt(end - 1);
|
|
11211
|
+
if (code !== 9 && code !== 32) break;
|
|
11212
|
+
end -= 1;
|
|
11213
|
+
}
|
|
11214
|
+
return start === 0 && end === value.length ? value : value.slice(start, end);
|
|
11215
|
+
}
|
|
11216
|
+
function decodeQuotedString(value) {
|
|
11217
|
+
const last = value.length - 1;
|
|
11218
|
+
if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) return value;
|
|
11219
|
+
let decoded = "";
|
|
11220
|
+
for (let i = 1; i < last; i++) {
|
|
11221
|
+
const code = value.charCodeAt(i);
|
|
11222
|
+
if (code === 34) return value;
|
|
11223
|
+
if (code === 92) {
|
|
11224
|
+
i += 1;
|
|
11225
|
+
if (i >= last) return value;
|
|
11226
|
+
}
|
|
11227
|
+
decoded += value[i];
|
|
11228
|
+
}
|
|
11229
|
+
return decoded;
|
|
11230
|
+
}
|
|
11231
|
+
function parseParameters(value) {
|
|
11232
|
+
const parameters = Object.create(null);
|
|
11233
|
+
const str = String(value);
|
|
11234
|
+
let start = 0;
|
|
11235
|
+
let quoted = false;
|
|
11236
|
+
let escaped = false;
|
|
11237
|
+
function parseParameter(end) {
|
|
11238
|
+
const part = trimOWS(str.slice(start, end));
|
|
11239
|
+
const equals = part.indexOf("=");
|
|
11240
|
+
if (equals < 1) return;
|
|
11241
|
+
const name = trimOWS(part.slice(0, equals));
|
|
11242
|
+
if (!parameterNameRE.test(name)) return;
|
|
11243
|
+
const normalizedName = name.toLowerCase();
|
|
11244
|
+
if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") return;
|
|
11245
|
+
const parameterValue = trimOWS(part.slice(equals + 1));
|
|
11246
|
+
parameters[normalizedName] = decodeQuotedString(parameterValue);
|
|
11247
|
+
}
|
|
11248
|
+
for (let i = 0; i < str.length; i++) {
|
|
11249
|
+
const code = str.charCodeAt(i);
|
|
11250
|
+
if (quoted) {
|
|
11251
|
+
if (escaped) escaped = false;
|
|
11252
|
+
else if (code === 92) escaped = true;
|
|
11253
|
+
else if (code === 34) quoted = false;
|
|
11254
|
+
} else if (code === 34) quoted = true;
|
|
11255
|
+
else if (code === 44 || code === 59) {
|
|
11256
|
+
parseParameter(i);
|
|
11257
|
+
start = i + 1;
|
|
11258
|
+
}
|
|
11259
|
+
}
|
|
11260
|
+
parseParameter(str.length);
|
|
11261
|
+
return parameters;
|
|
11262
|
+
}
|
|
10694
11263
|
var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
10695
11264
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
10696
11265
|
if (utils_default.isFunction(filter)) return filter.call(this, value, header);
|
|
@@ -10735,11 +11304,15 @@ var AxiosHeaders = class {
|
|
|
10735
11304
|
const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
10736
11305
|
if (utils_default.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite);
|
|
10737
11306
|
else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) setHeaders(parseHeaders_default(header), valueOrRewrite);
|
|
10738
|
-
else if (utils_default.isObject(header) && utils_default.
|
|
10739
|
-
let obj =
|
|
11307
|
+
else if (utils_default.isObject(header) && utils_default.isSafeIterable(header)) {
|
|
11308
|
+
let obj = Object.create(null), dest, key;
|
|
10740
11309
|
for (const entry of header) {
|
|
10741
11310
|
if (!utils_default.isArray(entry)) throw new TypeError("Object iterator must return a key-value pair");
|
|
10742
|
-
|
|
11311
|
+
key = entry[0];
|
|
11312
|
+
if (utils_default.hasOwnProp(obj, key)) {
|
|
11313
|
+
dest = obj[key];
|
|
11314
|
+
obj[key] = utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
|
|
11315
|
+
} else obj[key] = entry[1];
|
|
10743
11316
|
}
|
|
10744
11317
|
setHeaders(obj, valueOrRewrite);
|
|
10745
11318
|
} else header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
@@ -10831,7 +11404,8 @@ var AxiosHeaders = class {
|
|
|
10831
11404
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
10832
11405
|
}
|
|
10833
11406
|
getSetCookie() {
|
|
10834
|
-
|
|
11407
|
+
const value = this.get("set-cookie");
|
|
11408
|
+
return utils_default.isArray(value) ? value : value == null || value === false ? [] : [value];
|
|
10835
11409
|
}
|
|
10836
11410
|
get [Symbol.toStringTag]() {
|
|
10837
11411
|
return "AxiosHeaders";
|
|
@@ -10839,13 +11413,16 @@ var AxiosHeaders = class {
|
|
|
10839
11413
|
static from(thing) {
|
|
10840
11414
|
return thing instanceof this ? thing : new this(thing);
|
|
10841
11415
|
}
|
|
11416
|
+
static parseParameters(value) {
|
|
11417
|
+
return parseParameters(value);
|
|
11418
|
+
}
|
|
10842
11419
|
static concat(first, ...targets) {
|
|
10843
11420
|
const computed = new this(first);
|
|
10844
11421
|
targets.forEach((target) => computed.set(target));
|
|
10845
11422
|
return computed;
|
|
10846
11423
|
}
|
|
10847
11424
|
static accessor(header) {
|
|
10848
|
-
const accessors = (this[$internals] = this[$internals] = { accessors: {} }).accessors;
|
|
11425
|
+
const accessors = (this[$internals$1] = this[$internals$1] = { accessors: {} }).accessors;
|
|
10849
11426
|
const prototype = this.prototype;
|
|
10850
11427
|
function defineAccessor(_header) {
|
|
10851
11428
|
const lHeader = normalizeHeader(_header);
|
|
@@ -10920,10 +11497,34 @@ function redactConfig(config, redactKeys) {
|
|
|
10920
11497
|
};
|
|
10921
11498
|
return visit(config);
|
|
10922
11499
|
}
|
|
11500
|
+
function stringifySafely$1(value) {
|
|
11501
|
+
try {
|
|
11502
|
+
return String(value);
|
|
11503
|
+
} catch (err) {
|
|
11504
|
+
return "";
|
|
11505
|
+
}
|
|
11506
|
+
}
|
|
11507
|
+
function aggregateErrorMessage(error) {
|
|
11508
|
+
return error.errors.map((entry) => {
|
|
11509
|
+
try {
|
|
11510
|
+
return entry && entry.message ? stringifySafely$1(entry.message) : stringifySafely$1(entry);
|
|
11511
|
+
} catch (err) {
|
|
11512
|
+
return "";
|
|
11513
|
+
}
|
|
11514
|
+
}).filter(Boolean).join("; ") || error.name || "AggregateError";
|
|
11515
|
+
}
|
|
10923
11516
|
var AxiosError = class AxiosError extends Error {
|
|
10924
11517
|
static from(error, code, config, request, response, customProps) {
|
|
10925
|
-
|
|
10926
|
-
|
|
11518
|
+
let message = error.message;
|
|
11519
|
+
if (!message && utils_default.isArray(error.errors) && error.errors.length) message = aggregateErrorMessage(error);
|
|
11520
|
+
const axiosError = new AxiosError(message, code || error.code, config, request, response);
|
|
11521
|
+
Object.defineProperty(axiosError, "cause", {
|
|
11522
|
+
__proto__: null,
|
|
11523
|
+
value: error,
|
|
11524
|
+
writable: true,
|
|
11525
|
+
enumerable: false,
|
|
11526
|
+
configurable: true
|
|
11527
|
+
});
|
|
10927
11528
|
axiosError.name = error.name;
|
|
10928
11529
|
if (error.status != null && axiosError.status == null) axiosError.status = error.status;
|
|
10929
11530
|
customProps && Object.assign(axiosError, customProps);
|
|
@@ -10992,8 +11593,6 @@ AxiosError.ERR_CANCELED = "ERR_CANCELED";
|
|
|
10992
11593
|
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
10993
11594
|
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
10994
11595
|
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
10995
|
-
//#endregion
|
|
10996
|
-
//#region node_modules/axios/lib/helpers/toFormData.js
|
|
10997
11596
|
/**
|
|
10998
11597
|
* Determines if the given thing is a array or js object.
|
|
10999
11598
|
*
|
|
@@ -11068,29 +11667,44 @@ var predicates = utils_default.toFlatObject(utils_default, {}, null, function fi
|
|
|
11068
11667
|
function toFormData(obj, formData, options) {
|
|
11069
11668
|
if (!utils_default.isObject(obj)) throw new TypeError("target must be an object");
|
|
11070
11669
|
formData = formData || new FormData();
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
const
|
|
11079
|
-
const
|
|
11080
|
-
const
|
|
11081
|
-
const indexes = options.indexes;
|
|
11082
|
-
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
11083
|
-
const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
|
|
11670
|
+
const option = (name, fallback) => {
|
|
11671
|
+
const value = utils_default.getSafeProp(options, name);
|
|
11672
|
+
return utils_default.isUndefined(value) ? fallback : value;
|
|
11673
|
+
};
|
|
11674
|
+
const metaTokens = option("metaTokens", true);
|
|
11675
|
+
const visitor = option("visitor") || defaultVisitor;
|
|
11676
|
+
const dots = option("dots", false);
|
|
11677
|
+
const indexes = option("indexes", false);
|
|
11678
|
+
const _Blob = option("Blob") || typeof Blob !== "undefined" && Blob;
|
|
11679
|
+
const maxDepth = option("maxDepth", 100);
|
|
11084
11680
|
const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
|
|
11681
|
+
const stack = [];
|
|
11085
11682
|
if (!utils_default.isFunction(visitor)) throw new TypeError("visitor must be a function");
|
|
11086
11683
|
function convertValue(value) {
|
|
11087
11684
|
if (value === null) return "";
|
|
11088
11685
|
if (utils_default.isDate(value)) return value.toISOString();
|
|
11089
11686
|
if (utils_default.isBoolean(value)) return value.toString();
|
|
11090
11687
|
if (!useBlob && utils_default.isBlob(value)) throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
11091
|
-
if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value))
|
|
11688
|
+
if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
|
|
11689
|
+
if (useBlob && typeof _Blob === "function") return new _Blob([value]);
|
|
11690
|
+
throw new AxiosError("Blob is not supported. Use a Buffer instead.", AxiosError.ERR_NOT_SUPPORT);
|
|
11691
|
+
}
|
|
11092
11692
|
return value;
|
|
11093
11693
|
}
|
|
11694
|
+
function throwIfMaxDepthExceeded(depth) {
|
|
11695
|
+
if (depth > maxDepth) throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
11696
|
+
}
|
|
11697
|
+
function stringifyWithDepthLimit(value, depth) {
|
|
11698
|
+
if (maxDepth === Infinity) return JSON.stringify(value);
|
|
11699
|
+
const ancestors = [];
|
|
11700
|
+
return JSON.stringify(value, function limitDepth(_key, currentValue) {
|
|
11701
|
+
if (!utils_default.isObject(currentValue)) return currentValue;
|
|
11702
|
+
while (ancestors.length && ancestors[ancestors.length - 1] !== this) ancestors.pop();
|
|
11703
|
+
ancestors.push(currentValue);
|
|
11704
|
+
throwIfMaxDepthExceeded(depth + ancestors.length - 1);
|
|
11705
|
+
return currentValue;
|
|
11706
|
+
});
|
|
11707
|
+
}
|
|
11094
11708
|
/**
|
|
11095
11709
|
* Default visitor.
|
|
11096
11710
|
*
|
|
@@ -11110,7 +11724,7 @@ function toFormData(obj, formData, options) {
|
|
|
11110
11724
|
if (value && !path && typeof value === "object") {
|
|
11111
11725
|
if (utils_default.endsWith(key, "{}")) {
|
|
11112
11726
|
key = metaTokens ? key : key.slice(0, -2);
|
|
11113
|
-
value =
|
|
11727
|
+
value = stringifyWithDepthLimit(value, 1);
|
|
11114
11728
|
} else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
|
|
11115
11729
|
key = removeBrackets(key);
|
|
11116
11730
|
arr.forEach(function each(el, index) {
|
|
@@ -11123,7 +11737,6 @@ function toFormData(obj, formData, options) {
|
|
|
11123
11737
|
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
11124
11738
|
return false;
|
|
11125
11739
|
}
|
|
11126
|
-
const stack = [];
|
|
11127
11740
|
const exposedHelpers = Object.assign(predicates, {
|
|
11128
11741
|
defaultVisitor,
|
|
11129
11742
|
convertValue,
|
|
@@ -11131,7 +11744,7 @@ function toFormData(obj, formData, options) {
|
|
|
11131
11744
|
});
|
|
11132
11745
|
function build(value, path, depth = 0) {
|
|
11133
11746
|
if (utils_default.isUndefined(value)) return;
|
|
11134
|
-
|
|
11747
|
+
throwIfMaxDepthExceeded(depth);
|
|
11135
11748
|
if (stack.indexOf(value) !== -1) throw new Error("Circular reference detected in " + path.join("."));
|
|
11136
11749
|
stack.push(value);
|
|
11137
11750
|
utils_default.forEach(value, function each(el, key) {
|
|
@@ -11183,9 +11796,7 @@ prototype.append = function append(name, value) {
|
|
|
11183
11796
|
this._pairs.push([name, value]);
|
|
11184
11797
|
};
|
|
11185
11798
|
prototype.toString = function toString(encoder) {
|
|
11186
|
-
const _encode = encoder ?
|
|
11187
|
-
return encoder.call(this, value, encode$1);
|
|
11188
|
-
} : encode$1;
|
|
11799
|
+
const _encode = encoder ? (value) => encoder.call(this, value, encode$1) : encode$1;
|
|
11189
11800
|
return this._pairs.map(function each(pair) {
|
|
11190
11801
|
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
11191
11802
|
}, "").join("&");
|
|
@@ -11214,9 +11825,10 @@ function encode(val) {
|
|
|
11214
11825
|
*/
|
|
11215
11826
|
function buildURL(url, params, options) {
|
|
11216
11827
|
if (!params) return url;
|
|
11217
|
-
|
|
11828
|
+
url = url || "";
|
|
11218
11829
|
const _options = utils_default.isFunction(options) ? { serialize: options } : options;
|
|
11219
|
-
const
|
|
11830
|
+
const _encode = utils_default.getSafeProp(_options, "encode") || encode;
|
|
11831
|
+
const serializeFn = utils_default.getSafeProp(_options, "serialize");
|
|
11220
11832
|
let serializedParams;
|
|
11221
11833
|
if (serializeFn) serializedParams = serializeFn(params, _options);
|
|
11222
11834
|
else serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
@@ -11229,9 +11841,38 @@ function buildURL(url, params, options) {
|
|
|
11229
11841
|
}
|
|
11230
11842
|
//#endregion
|
|
11231
11843
|
//#region node_modules/axios/lib/core/InterceptorManager.js
|
|
11844
|
+
var $internals = Symbol("internals");
|
|
11845
|
+
function countHandlers(handlers) {
|
|
11846
|
+
return handlers ? handlers.length : 0;
|
|
11847
|
+
}
|
|
11848
|
+
function trimHandlers(handlers) {
|
|
11849
|
+
if (!handlers) return;
|
|
11850
|
+
while (handlers.length && handlers[handlers.length - 1] === null) handlers.pop();
|
|
11851
|
+
}
|
|
11852
|
+
function syncHandlerEntries(manager, internals) {
|
|
11853
|
+
const handlers = manager.handlers;
|
|
11854
|
+
const length = countHandlers(handlers);
|
|
11855
|
+
if (handlers !== internals.handlersRef) {
|
|
11856
|
+
internals.handlersRef = handlers;
|
|
11857
|
+
internals.handlerEntries.clear();
|
|
11858
|
+
} else if (length !== internals.handlersLength) {
|
|
11859
|
+
if (!length) internals.handlerEntries.clear();
|
|
11860
|
+
else internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
|
|
11861
|
+
if (handlers[entry.index] !== entry.handler) internals.handlerEntries.delete(id);
|
|
11862
|
+
});
|
|
11863
|
+
}
|
|
11864
|
+
internals.handlersLength = length;
|
|
11865
|
+
}
|
|
11232
11866
|
var InterceptorManager = class {
|
|
11233
11867
|
constructor() {
|
|
11234
11868
|
this.handlers = [];
|
|
11869
|
+
this[$internals] = {
|
|
11870
|
+
handlersRef: this.handlers,
|
|
11871
|
+
handlersLength: this.handlers.length,
|
|
11872
|
+
handlerEntries: /* @__PURE__ */ new Map(),
|
|
11873
|
+
iterationDepth: 0,
|
|
11874
|
+
nextId: 0
|
|
11875
|
+
};
|
|
11235
11876
|
}
|
|
11236
11877
|
/**
|
|
11237
11878
|
* Add a new interceptor to the stack
|
|
@@ -11243,13 +11884,23 @@ var InterceptorManager = class {
|
|
|
11243
11884
|
* @return {Number} An ID used to remove interceptor later
|
|
11244
11885
|
*/
|
|
11245
11886
|
use(fulfilled, rejected, options) {
|
|
11246
|
-
|
|
11887
|
+
const handler = {
|
|
11247
11888
|
fulfilled,
|
|
11248
11889
|
rejected,
|
|
11249
11890
|
synchronous: options ? options.synchronous : false,
|
|
11250
11891
|
runWhen: options ? options.runWhen : null
|
|
11892
|
+
};
|
|
11893
|
+
const internals = this[$internals];
|
|
11894
|
+
if (this.handlers == null) this.handlers = [];
|
|
11895
|
+
syncHandlerEntries(this, internals);
|
|
11896
|
+
const id = internals.nextId++;
|
|
11897
|
+
this.handlers.push(handler);
|
|
11898
|
+
internals.handlerEntries.set(id, {
|
|
11899
|
+
handler,
|
|
11900
|
+
index: this.handlers.length - 1
|
|
11251
11901
|
});
|
|
11252
|
-
|
|
11902
|
+
internals.handlersLength = this.handlers.length;
|
|
11903
|
+
return id;
|
|
11253
11904
|
}
|
|
11254
11905
|
/**
|
|
11255
11906
|
* Remove an interceptor from the stack
|
|
@@ -11259,7 +11910,18 @@ var InterceptorManager = class {
|
|
|
11259
11910
|
* @returns {void}
|
|
11260
11911
|
*/
|
|
11261
11912
|
eject(id) {
|
|
11262
|
-
|
|
11913
|
+
const internals = this[$internals];
|
|
11914
|
+
syncHandlerEntries(this, internals);
|
|
11915
|
+
const entry = internals.handlerEntries.get(id);
|
|
11916
|
+
if (entry) {
|
|
11917
|
+
internals.handlerEntries.delete(id);
|
|
11918
|
+
if (this.handlers[entry.index] !== entry.handler) return;
|
|
11919
|
+
this.handlers[entry.index] = null;
|
|
11920
|
+
if (!internals.iterationDepth) {
|
|
11921
|
+
trimHandlers(this.handlers);
|
|
11922
|
+
internals.handlersLength = this.handlers.length;
|
|
11923
|
+
}
|
|
11924
|
+
}
|
|
11263
11925
|
}
|
|
11264
11926
|
/**
|
|
11265
11927
|
* Clear all interceptors from the stack
|
|
@@ -11267,7 +11929,10 @@ var InterceptorManager = class {
|
|
|
11267
11929
|
* @returns {void}
|
|
11268
11930
|
*/
|
|
11269
11931
|
clear() {
|
|
11270
|
-
if (this.handlers)
|
|
11932
|
+
if (this.handlers) {
|
|
11933
|
+
this.handlers = [];
|
|
11934
|
+
syncHandlerEntries(this, this[$internals]);
|
|
11935
|
+
}
|
|
11271
11936
|
}
|
|
11272
11937
|
/**
|
|
11273
11938
|
* Iterate over all the registered interceptors
|
|
@@ -11280,9 +11945,20 @@ var InterceptorManager = class {
|
|
|
11280
11945
|
* @returns {void}
|
|
11281
11946
|
*/
|
|
11282
11947
|
forEach(fn) {
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11948
|
+
const internals = this[$internals];
|
|
11949
|
+
syncHandlerEntries(this, internals);
|
|
11950
|
+
internals.iterationDepth++;
|
|
11951
|
+
try {
|
|
11952
|
+
utils_default.forEach(this.handlers, function forEachHandler(h) {
|
|
11953
|
+
if (h !== null) fn(h);
|
|
11954
|
+
});
|
|
11955
|
+
} finally {
|
|
11956
|
+
if (!--internals.iterationDepth) {
|
|
11957
|
+
syncHandlerEntries(this, internals);
|
|
11958
|
+
trimHandlers(this.handlers);
|
|
11959
|
+
internals.handlersLength = countHandlers(this.handlers);
|
|
11960
|
+
}
|
|
11961
|
+
}
|
|
11286
11962
|
}
|
|
11287
11963
|
};
|
|
11288
11964
|
//#endregion
|
|
@@ -11292,7 +11968,8 @@ var transitional_default = {
|
|
|
11292
11968
|
forcedJSONParsing: true,
|
|
11293
11969
|
clarifyTimeoutError: false,
|
|
11294
11970
|
legacyInterceptorReqResOrdering: true,
|
|
11295
|
-
advertiseZstdAcceptEncoding: false
|
|
11971
|
+
advertiseZstdAcceptEncoding: false,
|
|
11972
|
+
validateStatusUndefinedResolves: true
|
|
11296
11973
|
};
|
|
11297
11974
|
//#endregion
|
|
11298
11975
|
//#region node_modules/axios/lib/platform/browser/index.js
|
|
@@ -11380,6 +12057,10 @@ function toURLEncodedForm(data, options) {
|
|
|
11380
12057
|
}
|
|
11381
12058
|
//#endregion
|
|
11382
12059
|
//#region node_modules/axios/lib/helpers/formDataToJSON.js
|
|
12060
|
+
var MAX_DEPTH = 100;
|
|
12061
|
+
function throwIfDepthExceeded(index) {
|
|
12062
|
+
if (index > MAX_DEPTH) throw new AxiosError("FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
12063
|
+
}
|
|
11383
12064
|
/**
|
|
11384
12065
|
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
11385
12066
|
*
|
|
@@ -11388,9 +12069,14 @@ function toURLEncodedForm(data, options) {
|
|
|
11388
12069
|
* @returns An array of strings.
|
|
11389
12070
|
*/
|
|
11390
12071
|
function parsePropPath(name) {
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
12072
|
+
const path = [];
|
|
12073
|
+
const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
|
|
12074
|
+
let match;
|
|
12075
|
+
while ((match = pattern.exec(name)) !== null) {
|
|
12076
|
+
throwIfDepthExceeded(path.length);
|
|
12077
|
+
path.push(match[0] === "[]" ? "" : match[1] || match[0]);
|
|
12078
|
+
}
|
|
12079
|
+
return path;
|
|
11394
12080
|
}
|
|
11395
12081
|
/**
|
|
11396
12082
|
* Convert an array to an object.
|
|
@@ -11420,6 +12106,7 @@ function arrayToObject(arr) {
|
|
|
11420
12106
|
*/
|
|
11421
12107
|
function formDataToJSON(formData) {
|
|
11422
12108
|
function buildPath(path, value, target, index) {
|
|
12109
|
+
throwIfDepthExceeded(index);
|
|
11423
12110
|
let name = path[index++];
|
|
11424
12111
|
if (name === "__proto__") return true;
|
|
11425
12112
|
const isNumericKey = Number.isFinite(+name);
|
|
@@ -11444,6 +12131,21 @@ function formDataToJSON(formData) {
|
|
|
11444
12131
|
return null;
|
|
11445
12132
|
}
|
|
11446
12133
|
//#endregion
|
|
12134
|
+
//#region node_modules/axios/lib/core/methodList.js
|
|
12135
|
+
var methodList = Object.freeze([
|
|
12136
|
+
"get",
|
|
12137
|
+
"delete",
|
|
12138
|
+
"head",
|
|
12139
|
+
"options",
|
|
12140
|
+
"post",
|
|
12141
|
+
"put",
|
|
12142
|
+
"patch",
|
|
12143
|
+
"purge",
|
|
12144
|
+
"link",
|
|
12145
|
+
"unlink",
|
|
12146
|
+
"query"
|
|
12147
|
+
]);
|
|
12148
|
+
//#endregion
|
|
11447
12149
|
//#region node_modules/axios/lib/defaults/index.js
|
|
11448
12150
|
var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
|
|
11449
12151
|
/**
|
|
@@ -11540,15 +12242,7 @@ var defaults = {
|
|
|
11540
12242
|
"Content-Type": void 0
|
|
11541
12243
|
} }
|
|
11542
12244
|
};
|
|
11543
|
-
utils_default.forEach(
|
|
11544
|
-
"delete",
|
|
11545
|
-
"get",
|
|
11546
|
-
"head",
|
|
11547
|
-
"post",
|
|
11548
|
-
"put",
|
|
11549
|
-
"patch",
|
|
11550
|
-
"query"
|
|
11551
|
-
], (method) => {
|
|
12245
|
+
utils_default.forEach(methodList, (method) => {
|
|
11552
12246
|
defaults.headers[method] = {};
|
|
11553
12247
|
});
|
|
11554
12248
|
//#endregion
|
|
@@ -11612,6 +12306,22 @@ function settle(resolve, reject, response) {
|
|
|
11612
12306
|
else reject(new AxiosError("Request failed with status code " + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response));
|
|
11613
12307
|
}
|
|
11614
12308
|
//#endregion
|
|
12309
|
+
//#region node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js
|
|
12310
|
+
var urlParserControlCharacters = /[\t\n\r]/g;
|
|
12311
|
+
/**
|
|
12312
|
+
* Match WHATWG URL preprocessing before checking a URL's protocol.
|
|
12313
|
+
*
|
|
12314
|
+
* @param {string} url
|
|
12315
|
+
*
|
|
12316
|
+
* @returns {string}
|
|
12317
|
+
*/
|
|
12318
|
+
function normalizeURLForProtocolCheck(url) {
|
|
12319
|
+
if (typeof url !== "string") return url;
|
|
12320
|
+
let start = 0;
|
|
12321
|
+
while (start < url.length && url.charCodeAt(start) <= 32) start++;
|
|
12322
|
+
return url.slice(start).replace(urlParserControlCharacters, "");
|
|
12323
|
+
}
|
|
12324
|
+
//#endregion
|
|
11615
12325
|
//#region node_modules/axios/lib/helpers/parseProtocol.js
|
|
11616
12326
|
function parseProtocol(url) {
|
|
11617
12327
|
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
|
|
@@ -11658,7 +12368,7 @@ function speedometer(samplesCount, min) {
|
|
|
11658
12368
|
* Throttle decorator
|
|
11659
12369
|
* @param {Function} fn
|
|
11660
12370
|
* @param {Number} freq
|
|
11661
|
-
* @return {Function}
|
|
12371
|
+
* @return {Array<Function>}
|
|
11662
12372
|
*/
|
|
11663
12373
|
function throttle(fn, freq) {
|
|
11664
12374
|
let timestamp = 0;
|
|
@@ -11687,7 +12397,12 @@ function throttle(fn, freq) {
|
|
|
11687
12397
|
}
|
|
11688
12398
|
};
|
|
11689
12399
|
const flush = () => lastArgs && invoke(lastArgs);
|
|
11690
|
-
|
|
12400
|
+
const flushWith = (...args) => invoke(args);
|
|
12401
|
+
return [
|
|
12402
|
+
throttled,
|
|
12403
|
+
flush,
|
|
12404
|
+
flushWith
|
|
12405
|
+
];
|
|
11691
12406
|
}
|
|
11692
12407
|
//#endregion
|
|
11693
12408
|
//#region node_modules/axios/lib/helpers/progressEventReducer.js
|
|
@@ -11695,10 +12410,10 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
11695
12410
|
let bytesNotified = 0;
|
|
11696
12411
|
const _speedometer = speedometer(50, 250);
|
|
11697
12412
|
return throttle((e) => {
|
|
11698
|
-
if (!e ||
|
|
12413
|
+
if (!e || !utils_default.isNumber(e.loaded)) return;
|
|
11699
12414
|
const rawLoaded = e.loaded;
|
|
11700
12415
|
const total = e.lengthComputable ? e.total : void 0;
|
|
11701
|
-
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
12416
|
+
const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
|
|
11702
12417
|
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
11703
12418
|
const rate = _speedometer(progressBytes);
|
|
11704
12419
|
bytesNotified = Math.max(bytesNotified, loaded);
|
|
@@ -11723,7 +12438,7 @@ var progressEventDecorator = (total, throttled) => {
|
|
|
11723
12438
|
loaded
|
|
11724
12439
|
}), throttled[1]];
|
|
11725
12440
|
};
|
|
11726
|
-
var asyncDecorator = (fn) => (...args) =>
|
|
12441
|
+
var asyncDecorator = (fn, scheduler = utils_default.asap) => (...args) => scheduler(() => fn(...args));
|
|
11727
12442
|
//#endregion
|
|
11728
12443
|
//#region node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
11729
12444
|
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
|
|
@@ -11749,7 +12464,11 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? {
|
|
|
11749
12464
|
for (let i = 0; i < cookies.length; i++) {
|
|
11750
12465
|
const cookie = cookies[i].replace(/^\s+/, "");
|
|
11751
12466
|
const eq = cookie.indexOf("=");
|
|
11752
|
-
if (eq !== -1 && cookie.slice(0, eq) === name)
|
|
12467
|
+
if (eq !== -1 && cookie.slice(0, eq) === name) try {
|
|
12468
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
12469
|
+
} catch (e) {
|
|
12470
|
+
return cookie.slice(eq + 1);
|
|
12471
|
+
}
|
|
11753
12472
|
}
|
|
11754
12473
|
return null;
|
|
11755
12474
|
},
|
|
@@ -11787,10 +12506,33 @@ function isAbsoluteURL(url) {
|
|
|
11787
12506
|
* @returns {string} The combined URL
|
|
11788
12507
|
*/
|
|
11789
12508
|
function combineURLs(baseURL, relativeURL) {
|
|
11790
|
-
|
|
12509
|
+
if (!relativeURL) return baseURL;
|
|
12510
|
+
let end = baseURL.length;
|
|
12511
|
+
while (end > 0 && baseURL.charCodeAt(end - 1) === 47) end--;
|
|
12512
|
+
return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
|
|
11791
12513
|
}
|
|
11792
12514
|
//#endregion
|
|
11793
12515
|
//#region node_modules/axios/lib/core/buildFullPath.js
|
|
12516
|
+
var malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
12517
|
+
function redactFragment(fragment) {
|
|
12518
|
+
if (!fragment) return fragment;
|
|
12519
|
+
return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = "") => {
|
|
12520
|
+
return `${separator}${parameterName}${REDACTED}`;
|
|
12521
|
+
});
|
|
12522
|
+
}
|
|
12523
|
+
function redactSensitiveURLParts(url) {
|
|
12524
|
+
const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
|
|
12525
|
+
const fragmentIndex = redactedURL.indexOf("#");
|
|
12526
|
+
const redactedURLWithoutFragment = (fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex)).replace(/([?&][^=&#]*=)[^&#]*/g, `$1${REDACTED}`);
|
|
12527
|
+
if (fragmentIndex === -1) return redactedURLWithoutFragment;
|
|
12528
|
+
return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
|
|
12529
|
+
}
|
|
12530
|
+
function assertValidHttpProtocolURL(url, config) {
|
|
12531
|
+
if (typeof url === "string") {
|
|
12532
|
+
const normalizedURL = normalizeURLForProtocolCheck(url);
|
|
12533
|
+
if (malformedHttpProtocol.test(normalizedURL)) throw new AxiosError(`Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, AxiosError.ERR_INVALID_URL, config);
|
|
12534
|
+
}
|
|
12535
|
+
}
|
|
11794
12536
|
/**
|
|
11795
12537
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
11796
12538
|
* only when the requestedURL is not already an absolute URL.
|
|
@@ -11801,14 +12543,22 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
11801
12543
|
*
|
|
11802
12544
|
* @returns {string} The combined full path
|
|
11803
12545
|
*/
|
|
11804
|
-
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
12546
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
12547
|
+
assertValidHttpProtocolURL(requestedURL, config);
|
|
11805
12548
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
11806
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false))
|
|
12549
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
12550
|
+
assertValidHttpProtocolURL(baseURL, config);
|
|
12551
|
+
return combineURLs(baseURL, requestedURL);
|
|
12552
|
+
}
|
|
11807
12553
|
return requestedURL;
|
|
11808
12554
|
}
|
|
11809
12555
|
//#endregion
|
|
11810
12556
|
//#region node_modules/axios/lib/core/mergeConfig.js
|
|
11811
12557
|
var headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
|
|
12558
|
+
var ownEnumerableKeys = (thing) => {
|
|
12559
|
+
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) return Object.keys(thing).concat(Object.getOwnPropertySymbols(thing).filter((symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable));
|
|
12560
|
+
return Object.keys(thing);
|
|
12561
|
+
};
|
|
11812
12562
|
/**
|
|
11813
12563
|
* Config-specific merge-function which creates a new config-object
|
|
11814
12564
|
* by merging two configuration objects together.
|
|
@@ -11819,6 +12569,7 @@ var headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } :
|
|
|
11819
12569
|
* @returns {Object} New object resulting from merging config2 to config1
|
|
11820
12570
|
*/
|
|
11821
12571
|
function mergeConfig(config1, config2) {
|
|
12572
|
+
config1 = config1 || {};
|
|
11822
12573
|
config2 = config2 || {};
|
|
11823
12574
|
const config = Object.create(null);
|
|
11824
12575
|
Object.defineProperty(config, "hasOwnProperty", {
|
|
@@ -11845,6 +12596,16 @@ function mergeConfig(config1, config2) {
|
|
|
11845
12596
|
if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
|
|
11846
12597
|
else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a);
|
|
11847
12598
|
}
|
|
12599
|
+
function getMergedTransitionalOption(prop) {
|
|
12600
|
+
const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
|
|
12601
|
+
if (!utils_default.isUndefined(transitional2)) {
|
|
12602
|
+
if (utils_default.isPlainObject(transitional2)) {
|
|
12603
|
+
if (utils_default.hasOwnProp(transitional2, prop)) return transitional2[prop];
|
|
12604
|
+
} else return;
|
|
12605
|
+
}
|
|
12606
|
+
const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
|
|
12607
|
+
if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) return transitional1[prop];
|
|
12608
|
+
}
|
|
11848
12609
|
function mergeDirectKeys(a, b, prop) {
|
|
11849
12610
|
if (utils_default.hasOwnProp(config2, prop)) return getMergedValue(a, b);
|
|
11850
12611
|
else if (utils_default.hasOwnProp(config1, prop)) return getMergedValue(void 0, a);
|
|
@@ -11858,7 +12619,7 @@ function mergeConfig(config1, config2) {
|
|
|
11858
12619
|
transformResponse: defaultToConfig2,
|
|
11859
12620
|
paramsSerializer: defaultToConfig2,
|
|
11860
12621
|
timeout: defaultToConfig2,
|
|
11861
|
-
|
|
12622
|
+
timeoutErrorMessage: defaultToConfig2,
|
|
11862
12623
|
withCredentials: defaultToConfig2,
|
|
11863
12624
|
withXSRFToken: defaultToConfig2,
|
|
11864
12625
|
adapter: defaultToConfig2,
|
|
@@ -11881,7 +12642,7 @@ function mergeConfig(config1, config2) {
|
|
|
11881
12642
|
validateStatus: mergeDirectKeys,
|
|
11882
12643
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
11883
12644
|
};
|
|
11884
|
-
utils_default.forEach(
|
|
12645
|
+
utils_default.forEach(ownEnumerableKeys({
|
|
11885
12646
|
...config1,
|
|
11886
12647
|
...config2
|
|
11887
12648
|
}), function computeConfigValue(prop) {
|
|
@@ -11890,20 +12651,37 @@ function mergeConfig(config1, config2) {
|
|
|
11890
12651
|
const configValue = merge(utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0, utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0, prop);
|
|
11891
12652
|
utils_default.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
11892
12653
|
});
|
|
12654
|
+
if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
|
|
12655
|
+
if (utils_default.hasOwnProp(config1, "validateStatus")) config.validateStatus = getMergedValue(void 0, config1.validateStatus);
|
|
12656
|
+
else delete config.validateStatus;
|
|
12657
|
+
}
|
|
11893
12658
|
return config;
|
|
11894
12659
|
}
|
|
11895
12660
|
//#endregion
|
|
11896
|
-
//#region node_modules/axios/lib/
|
|
12661
|
+
//#region node_modules/axios/lib/core/setFormDataHeaders.js
|
|
11897
12662
|
var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
12663
|
+
/**
|
|
12664
|
+
* Apply the headers generated by a FormData implementation to the request headers,
|
|
12665
|
+
* honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the
|
|
12666
|
+
* content-* headers; otherwise merge all of them.
|
|
12667
|
+
*
|
|
12668
|
+
* @param {AxiosHeaders} headers - the request headers to mutate
|
|
12669
|
+
* @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation
|
|
12670
|
+
* @param {String} [policy] - the resolved `formDataHeaderPolicy` config value
|
|
12671
|
+
*
|
|
12672
|
+
* @returns {void}
|
|
12673
|
+
*/
|
|
11898
12674
|
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
11899
12675
|
if (policy !== "content-only") {
|
|
11900
12676
|
headers.set(formHeaders);
|
|
11901
12677
|
return;
|
|
11902
12678
|
}
|
|
11903
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
12679
|
+
Object.entries(formHeaders || {}).forEach(([key, val]) => {
|
|
11904
12680
|
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) headers.set(key, val);
|
|
11905
12681
|
});
|
|
11906
12682
|
}
|
|
12683
|
+
//#endregion
|
|
12684
|
+
//#region node_modules/axios/lib/helpers/resolveConfig.js
|
|
11907
12685
|
/**
|
|
11908
12686
|
* Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
|
|
11909
12687
|
* This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
|
|
@@ -11926,11 +12704,20 @@ function resolveConfig(config) {
|
|
|
11926
12704
|
const allowAbsoluteUrls = own("allowAbsoluteUrls");
|
|
11927
12705
|
const url = own("url");
|
|
11928
12706
|
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
11929
|
-
newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls), own("params"), own("paramsSerializer"));
|
|
11930
|
-
if (auth)
|
|
12707
|
+
newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), own("params"), own("paramsSerializer"));
|
|
12708
|
+
if (auth) {
|
|
12709
|
+
const username = utils_default.getSafeProp(auth, "username") || "";
|
|
12710
|
+
const password = utils_default.getSafeProp(auth, "password") || "";
|
|
12711
|
+
try {
|
|
12712
|
+
headers.set("Authorization", "Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : "")));
|
|
12713
|
+
} catch (e) {
|
|
12714
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);
|
|
12715
|
+
}
|
|
12716
|
+
}
|
|
11931
12717
|
if (utils_default.isFormData(data)) {
|
|
12718
|
+
const getHeaders = utils_default.getSafeProp(data, "getHeaders");
|
|
11932
12719
|
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) headers.setContentType(void 0);
|
|
11933
|
-
else if (utils_default.isFunction(
|
|
12720
|
+
else if (utils_default.isFunction(getHeaders)) setFormDataHeaders(headers, getHeaders.call(data), own("formDataHeaderPolicy"));
|
|
11934
12721
|
}
|
|
11935
12722
|
if (platform_default.hasStandardBrowserEnv) {
|
|
11936
12723
|
if (utils_default.isFunction(withXSRFToken)) withXSRFToken = withXSRFToken(newConfig);
|
|
@@ -11949,7 +12736,7 @@ var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) {
|
|
|
11949
12736
|
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
11950
12737
|
let onCanceled;
|
|
11951
12738
|
let uploadThrottled, downloadThrottled;
|
|
11952
|
-
let flushUpload, flushDownload;
|
|
12739
|
+
let flushUpload, flushDownload, flushDownloadWithEvent;
|
|
11953
12740
|
function done() {
|
|
11954
12741
|
flushUpload && flushUpload();
|
|
11955
12742
|
flushDownload && flushDownload();
|
|
@@ -11959,7 +12746,22 @@ var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) {
|
|
|
11959
12746
|
let request = new XMLHttpRequest();
|
|
11960
12747
|
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
11961
12748
|
request.timeout = _config.timeout;
|
|
11962
|
-
function onloadend() {
|
|
12749
|
+
function onloadend(event) {
|
|
12750
|
+
if (!request) return;
|
|
12751
|
+
if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform_default.origin)) !== "file" && !(request.responseURL && request.responseURL.startsWith("file:"))) {
|
|
12752
|
+
reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
|
|
12753
|
+
done();
|
|
12754
|
+
request = null;
|
|
12755
|
+
return;
|
|
12756
|
+
}
|
|
12757
|
+
try {
|
|
12758
|
+
if (event) flushDownloadWithEvent && flushDownloadWithEvent(event);
|
|
12759
|
+
else flushDownload && flushDownload();
|
|
12760
|
+
} catch (err) {
|
|
12761
|
+
setTimeout(() => {
|
|
12762
|
+
throw err;
|
|
12763
|
+
});
|
|
12764
|
+
}
|
|
11963
12765
|
if (!request) return;
|
|
11964
12766
|
const responseHeaders = AxiosHeaders.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
|
|
11965
12767
|
settle(function _resolve(value) {
|
|
@@ -12012,7 +12814,7 @@ var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) {
|
|
|
12012
12814
|
if (!utils_default.isUndefined(_config.withCredentials)) request.withCredentials = !!_config.withCredentials;
|
|
12013
12815
|
if (responseType && responseType !== "json") request.responseType = _config.responseType;
|
|
12014
12816
|
if (onDownloadProgress) {
|
|
12015
|
-
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
12817
|
+
[downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(onDownloadProgress, true);
|
|
12016
12818
|
request.addEventListener("progress", downloadThrottled);
|
|
12017
12819
|
}
|
|
12018
12820
|
if (onUploadProgress && request.upload) {
|
|
@@ -12034,6 +12836,7 @@ var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) {
|
|
|
12034
12836
|
const protocol = parseProtocol(_config.url);
|
|
12035
12837
|
if (protocol && !platform_default.protocols.includes(protocol)) {
|
|
12036
12838
|
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
12839
|
+
done();
|
|
12037
12840
|
return;
|
|
12038
12841
|
}
|
|
12039
12842
|
request.send(requestData || null);
|
|
@@ -12067,7 +12870,14 @@ var composeSignals = (signals, timeout) => {
|
|
|
12067
12870
|
});
|
|
12068
12871
|
signals = null;
|
|
12069
12872
|
};
|
|
12070
|
-
signals.forEach((signal) =>
|
|
12873
|
+
signals.forEach((signal) => {
|
|
12874
|
+
if (aborted) return;
|
|
12875
|
+
if (signal.aborted) {
|
|
12876
|
+
onabort.call(signal);
|
|
12877
|
+
return;
|
|
12878
|
+
}
|
|
12879
|
+
signal.addEventListener("abort", onabort, { once: true });
|
|
12880
|
+
});
|
|
12071
12881
|
const { signal } = controller;
|
|
12072
12882
|
signal.unsubscribe = () => utils_default.asap(unsubscribe);
|
|
12073
12883
|
return signal;
|
|
@@ -12143,56 +12953,71 @@ var trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
12143
12953
|
//#endregion
|
|
12144
12954
|
//#region node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
|
|
12145
12955
|
/**
|
|
12146
|
-
* Estimate
|
|
12147
|
-
* -
|
|
12148
|
-
*
|
|
12149
|
-
*
|
|
12150
|
-
*
|
|
12151
|
-
* @param {string} url
|
|
12152
|
-
* @returns {number}
|
|
12956
|
+
* Estimate data: URL byte lengths *without* allocating large buffers.
|
|
12957
|
+
* - Fetch percent-decodes a base64 body before decoding it.
|
|
12958
|
+
* - Node's Buffer.from(body, 'base64') sizes its backing allocation from the
|
|
12959
|
+
* raw body, including ignored characters and content after padding.
|
|
12960
|
+
* - Non-base64 data is percent-decoded and then encoded as UTF-8.
|
|
12153
12961
|
*/
|
|
12154
|
-
|
|
12962
|
+
var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
|
|
12963
|
+
var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
|
|
12964
|
+
var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
|
|
12965
|
+
var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || charCode >= 97 && charCode <= 122 || charCode >= 48 && charCode <= 57 || charCode === 43 || charCode === 47 || charCode === 45 || charCode === 95;
|
|
12966
|
+
var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
|
|
12967
|
+
var base64Bytes = (significant) => {
|
|
12968
|
+
const groups = Math.floor(significant / 4);
|
|
12969
|
+
const remainder = significant % 4;
|
|
12970
|
+
return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
|
|
12971
|
+
};
|
|
12972
|
+
var estimateBase64BufferAllocation = (body) => {
|
|
12973
|
+
const len = body.length;
|
|
12974
|
+
let padding = 0;
|
|
12975
|
+
if (len > 0 && body.charCodeAt(len - 1) === 61) {
|
|
12976
|
+
padding++;
|
|
12977
|
+
if (len > 1 && body.charCodeAt(len - 2) === 61) padding++;
|
|
12978
|
+
}
|
|
12979
|
+
return Math.floor((len - padding) * 3 / 4);
|
|
12980
|
+
};
|
|
12981
|
+
var estimatePercentDecodedBase64Bytes = (body) => {
|
|
12982
|
+
const len = body.length;
|
|
12983
|
+
let significant = 0;
|
|
12984
|
+
let padding = 0;
|
|
12985
|
+
let invalid = false;
|
|
12986
|
+
for (let i = 0; i < len; i++) {
|
|
12987
|
+
let code = body.charCodeAt(i);
|
|
12988
|
+
if (code === 37 && isPercentEncodedByte(body, i, len)) {
|
|
12989
|
+
code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
|
|
12990
|
+
i += 2;
|
|
12991
|
+
}
|
|
12992
|
+
if (isBase64Whitespace(code)) continue;
|
|
12993
|
+
if (code === 61) {
|
|
12994
|
+
padding++;
|
|
12995
|
+
continue;
|
|
12996
|
+
}
|
|
12997
|
+
if (!isBase64Char(code) || padding > 0) {
|
|
12998
|
+
invalid = true;
|
|
12999
|
+
continue;
|
|
13000
|
+
}
|
|
13001
|
+
significant++;
|
|
13002
|
+
}
|
|
13003
|
+
if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) return estimateBase64BufferAllocation(body);
|
|
13004
|
+
return base64Bytes(significant);
|
|
13005
|
+
};
|
|
13006
|
+
var estimateDataURLBytes = (url, estimateBase64) => {
|
|
12155
13007
|
if (!url || typeof url !== "string") return 0;
|
|
12156
13008
|
if (!url.startsWith("data:")) return 0;
|
|
12157
13009
|
const comma = url.indexOf(",");
|
|
12158
13010
|
if (comma < 0) return 0;
|
|
12159
13011
|
const meta = url.slice(5, comma);
|
|
12160
13012
|
const body = url.slice(comma + 1);
|
|
12161
|
-
if (/;base64/i.test(meta))
|
|
12162
|
-
let effectiveLen = body.length;
|
|
12163
|
-
const len = body.length;
|
|
12164
|
-
for (let i = 0; i < len; i++) if (body.charCodeAt(i) === 37 && i + 2 < len) {
|
|
12165
|
-
const a = body.charCodeAt(i + 1);
|
|
12166
|
-
const b = body.charCodeAt(i + 2);
|
|
12167
|
-
if ((a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102)) {
|
|
12168
|
-
effectiveLen -= 2;
|
|
12169
|
-
i += 2;
|
|
12170
|
-
}
|
|
12171
|
-
}
|
|
12172
|
-
let pad = 0;
|
|
12173
|
-
let idx = len - 1;
|
|
12174
|
-
const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && body.charCodeAt(j - 1) === 51 && (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
|
|
12175
|
-
if (idx >= 0) {
|
|
12176
|
-
if (body.charCodeAt(idx) === 61) {
|
|
12177
|
-
pad++;
|
|
12178
|
-
idx--;
|
|
12179
|
-
} else if (tailIsPct3D(idx)) {
|
|
12180
|
-
pad++;
|
|
12181
|
-
idx -= 3;
|
|
12182
|
-
}
|
|
12183
|
-
}
|
|
12184
|
-
if (pad === 1 && idx >= 0) {
|
|
12185
|
-
if (body.charCodeAt(idx) === 61) pad++;
|
|
12186
|
-
else if (tailIsPct3D(idx)) pad++;
|
|
12187
|
-
}
|
|
12188
|
-
const bytes = Math.floor(effectiveLen / 4) * 3 - (pad || 0);
|
|
12189
|
-
return bytes > 0 ? bytes : 0;
|
|
12190
|
-
}
|
|
12191
|
-
if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") return Buffer.byteLength(body, "utf8");
|
|
13013
|
+
if (/;base64/i.test(meta)) return estimateBase64(body);
|
|
12192
13014
|
let bytes = 0;
|
|
12193
13015
|
for (let i = 0, len = body.length; i < len; i++) {
|
|
12194
13016
|
const c = body.charCodeAt(i);
|
|
12195
|
-
if (c
|
|
13017
|
+
if (c === 37 && isPercentEncodedByte(body, i, len)) {
|
|
13018
|
+
bytes += 1;
|
|
13019
|
+
i += 2;
|
|
13020
|
+
} else if (c < 128) bytes += 1;
|
|
12196
13021
|
else if (c < 2048) bytes += 2;
|
|
12197
13022
|
else if (c >= 55296 && c <= 56319 && i + 1 < len) {
|
|
12198
13023
|
const next = body.charCodeAt(i + 1);
|
|
@@ -12203,13 +13028,34 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
12203
13028
|
} else bytes += 3;
|
|
12204
13029
|
}
|
|
12205
13030
|
return bytes;
|
|
13031
|
+
};
|
|
13032
|
+
/**
|
|
13033
|
+
* Estimate the percent-decoded payload size used by Fetch data: URLs.
|
|
13034
|
+
*
|
|
13035
|
+
* @param {string} url
|
|
13036
|
+
* @returns {number}
|
|
13037
|
+
*/
|
|
13038
|
+
function estimateDataURLDecodedBytes(url) {
|
|
13039
|
+
const fragmentIndex = typeof url === "string" ? url.indexOf("#") : -1;
|
|
13040
|
+
return estimateDataURLBytes(fragmentIndex === -1 ? url : url.slice(0, fragmentIndex), estimatePercentDecodedBase64Bytes);
|
|
12206
13041
|
}
|
|
12207
13042
|
//#endregion
|
|
12208
13043
|
//#region node_modules/axios/lib/env/data.js
|
|
12209
|
-
var VERSION = "1.
|
|
13044
|
+
var VERSION = "1.20.0";
|
|
12210
13045
|
//#endregion
|
|
12211
13046
|
//#region node_modules/axios/lib/adapters/fetch.js
|
|
12212
|
-
var DEFAULT_CHUNK_SIZE =
|
|
13047
|
+
var DEFAULT_CHUNK_SIZE = 65536;
|
|
13048
|
+
var DEFAULT_REQUEST_OPTIONS = {
|
|
13049
|
+
cache: "default",
|
|
13050
|
+
redirect: "follow",
|
|
13051
|
+
referrer: "about:client",
|
|
13052
|
+
referrerPolicy: "",
|
|
13053
|
+
mode: "cors",
|
|
13054
|
+
integrity: "",
|
|
13055
|
+
keepalive: false,
|
|
13056
|
+
priority: "auto",
|
|
13057
|
+
window: null
|
|
13058
|
+
};
|
|
12213
13059
|
var { isFunction } = utils_default;
|
|
12214
13060
|
/**
|
|
12215
13061
|
* Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
|
|
@@ -12302,7 +13148,7 @@ var factory = (env) => {
|
|
|
12302
13148
|
return length == null ? getBodyLength(body) : length;
|
|
12303
13149
|
};
|
|
12304
13150
|
return async (config) => {
|
|
12305
|
-
let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions, maxContentLength, maxBodyLength } = resolveConfig(config);
|
|
13151
|
+
let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions, maxContentLength, maxBodyLength, maxRedirects } = resolveConfig(config);
|
|
12306
13152
|
const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
|
|
12307
13153
|
const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
12308
13154
|
const own = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
|
|
@@ -12314,12 +13160,14 @@ var factory = (env) => {
|
|
|
12314
13160
|
composedSignal.unsubscribe();
|
|
12315
13161
|
});
|
|
12316
13162
|
let requestContentLength;
|
|
13163
|
+
let pendingBodyError = null;
|
|
13164
|
+
const maxBodyLengthError = () => new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
|
|
12317
13165
|
try {
|
|
12318
13166
|
let auth = void 0;
|
|
12319
13167
|
const configAuth = own("auth");
|
|
12320
13168
|
if (configAuth) auth = {
|
|
12321
|
-
username: configAuth
|
|
12322
|
-
password: configAuth
|
|
13169
|
+
username: utils_default.getSafeProp(configAuth, "username") || "",
|
|
13170
|
+
password: utils_default.getSafeProp(configAuth, "password") || ""
|
|
12323
13171
|
};
|
|
12324
13172
|
if (maybeWithAuthCredentials(url)) {
|
|
12325
13173
|
const parsedURL = new URL(url, platform_default.origin);
|
|
@@ -12341,22 +13189,34 @@ var factory = (env) => {
|
|
|
12341
13189
|
if (estimateDataURLDecodedBytes(url) > maxContentLength) throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
12342
13190
|
}
|
|
12343
13191
|
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
12344
|
-
const outboundLength = await
|
|
12345
|
-
if (typeof outboundLength === "number" && isFinite(outboundLength)
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
let _request = new Request(url, {
|
|
12349
|
-
method: "POST",
|
|
12350
|
-
body: data,
|
|
12351
|
-
duplex: "half"
|
|
12352
|
-
});
|
|
12353
|
-
let contentTypeHeader;
|
|
12354
|
-
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader);
|
|
12355
|
-
if (_request.body) {
|
|
12356
|
-
const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
|
|
12357
|
-
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
13192
|
+
const outboundLength = await getBodyLength(data);
|
|
13193
|
+
if (typeof outboundLength === "number" && isFinite(outboundLength)) {
|
|
13194
|
+
requestContentLength = outboundLength;
|
|
13195
|
+
if (outboundLength > maxBodyLength) throw maxBodyLengthError();
|
|
12358
13196
|
}
|
|
12359
13197
|
}
|
|
13198
|
+
const mustEnforceStreamBody = hasMaxBodyLength && (utils_default.isReadableStream(data) || utils_default.isStream(data));
|
|
13199
|
+
const trackRequestStream = (stream, onProgress, flush) => trackStream(stream, DEFAULT_CHUNK_SIZE, (loadedBytes) => {
|
|
13200
|
+
if (hasMaxBodyLength && loadedBytes > maxBodyLength) throw pendingBodyError = maxBodyLengthError();
|
|
13201
|
+
onProgress && onProgress(loadedBytes);
|
|
13202
|
+
}, flush);
|
|
13203
|
+
if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
|
|
13204
|
+
requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
|
|
13205
|
+
if (requestContentLength !== 0 || mustEnforceStreamBody) {
|
|
13206
|
+
let _request = new Request(url, {
|
|
13207
|
+
method: "POST",
|
|
13208
|
+
body: data,
|
|
13209
|
+
duplex: "half"
|
|
13210
|
+
});
|
|
13211
|
+
let contentTypeHeader;
|
|
13212
|
+
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader);
|
|
13213
|
+
if (_request.body) {
|
|
13214
|
+
const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [];
|
|
13215
|
+
data = trackRequestStream(_request.body, onProgress, flush);
|
|
13216
|
+
}
|
|
13217
|
+
}
|
|
13218
|
+
} else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") data = trackRequestStream(data);
|
|
13219
|
+
else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") throw new AxiosError("Stream request bodies are not supported by the current fetch implementation", AxiosError.ERR_NOT_SUPPORT, config, request);
|
|
12360
13220
|
if (!utils_default.isString(withCredentials)) withCredentials = withCredentials ? "include" : "omit";
|
|
12361
13221
|
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
12362
13222
|
if (utils_default.isFormData(data)) {
|
|
@@ -12364,19 +13224,39 @@ var factory = (env) => {
|
|
|
12364
13224
|
if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) headers.delete("content-type");
|
|
12365
13225
|
}
|
|
12366
13226
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
12367
|
-
const
|
|
12368
|
-
|
|
13227
|
+
const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);
|
|
13228
|
+
if (safeFetchOptions) {
|
|
13229
|
+
delete safeFetchOptions.body;
|
|
13230
|
+
delete safeFetchOptions.headers;
|
|
13231
|
+
delete safeFetchOptions.method;
|
|
13232
|
+
delete safeFetchOptions.signal;
|
|
13233
|
+
delete safeFetchOptions.duplex;
|
|
13234
|
+
delete safeFetchOptions.credentials;
|
|
13235
|
+
}
|
|
13236
|
+
const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {
|
|
12369
13237
|
signal: composedSignal,
|
|
12370
13238
|
method: method.toUpperCase(),
|
|
12371
13239
|
headers: toByteStringHeaderObject(headers.normalize()),
|
|
12372
13240
|
body: data,
|
|
12373
13241
|
duplex: "half",
|
|
12374
13242
|
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
12375
|
-
};
|
|
13243
|
+
});
|
|
13244
|
+
if (isRequestSupported) {
|
|
13245
|
+
utils_default.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
|
|
13246
|
+
if (resolvedOptions[key] === void 0) resolvedOptions[key] = value;
|
|
13247
|
+
});
|
|
13248
|
+
if (resolvedOptions.signal === void 0) resolvedOptions.signal = null;
|
|
13249
|
+
if (resolvedOptions.body === void 0) resolvedOptions.body = null;
|
|
13250
|
+
}
|
|
13251
|
+
if (maxRedirects === 0) {
|
|
13252
|
+
resolvedOptions.redirect = "manual";
|
|
13253
|
+
if (safeFetchOptions) safeFetchOptions.redirect = "manual";
|
|
13254
|
+
}
|
|
12376
13255
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
12377
|
-
let response = await (isRequestSupported ? _fetch(request,
|
|
13256
|
+
let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url, resolvedOptions));
|
|
13257
|
+
const responseHeaders = AxiosHeaders.from(response.headers);
|
|
12378
13258
|
if (hasMaxContentLength) {
|
|
12379
|
-
const declaredLength = utils_default.toFiniteNumber(
|
|
13259
|
+
const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
|
|
12380
13260
|
if (declaredLength != null && declaredLength > maxContentLength) throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
12381
13261
|
}
|
|
12382
13262
|
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
@@ -12389,7 +13269,7 @@ var factory = (env) => {
|
|
|
12389
13269
|
].forEach((prop) => {
|
|
12390
13270
|
options[prop] = response[prop];
|
|
12391
13271
|
});
|
|
12392
|
-
const responseContentLength = utils_default.toFiniteNumber(
|
|
13272
|
+
const responseContentLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
|
|
12393
13273
|
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
12394
13274
|
let bytesRead = 0;
|
|
12395
13275
|
const onChunkProgress = (loadedBytes) => {
|
|
@@ -12432,10 +13312,34 @@ var factory = (env) => {
|
|
|
12432
13312
|
const canceledError = composedSignal.reason;
|
|
12433
13313
|
canceledError.config = config;
|
|
12434
13314
|
request && (canceledError.request = request);
|
|
12435
|
-
err !== canceledError
|
|
13315
|
+
if (err !== canceledError) Object.defineProperty(canceledError, "cause", {
|
|
13316
|
+
__proto__: null,
|
|
13317
|
+
value: err,
|
|
13318
|
+
writable: true,
|
|
13319
|
+
enumerable: false,
|
|
13320
|
+
configurable: true
|
|
13321
|
+
});
|
|
12436
13322
|
throw canceledError;
|
|
12437
13323
|
}
|
|
12438
|
-
if (
|
|
13324
|
+
if (pendingBodyError) {
|
|
13325
|
+
request && !pendingBodyError.request && (pendingBodyError.request = request);
|
|
13326
|
+
throw pendingBodyError;
|
|
13327
|
+
}
|
|
13328
|
+
if (err instanceof AxiosError) {
|
|
13329
|
+
request && !err.request && (err.request = request);
|
|
13330
|
+
throw err;
|
|
13331
|
+
}
|
|
13332
|
+
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
13333
|
+
const networkError = new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response);
|
|
13334
|
+
Object.defineProperty(networkError, "cause", {
|
|
13335
|
+
__proto__: null,
|
|
13336
|
+
value: err.cause || err,
|
|
13337
|
+
writable: true,
|
|
13338
|
+
enumerable: false,
|
|
13339
|
+
configurable: true
|
|
13340
|
+
});
|
|
13341
|
+
throw networkError;
|
|
13342
|
+
}
|
|
12439
13343
|
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
12440
13344
|
}
|
|
12441
13345
|
};
|
|
@@ -12532,7 +13436,7 @@ function getAdapter(adapters, config) {
|
|
|
12532
13436
|
}
|
|
12533
13437
|
if (!adapter) {
|
|
12534
13438
|
const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
|
|
12535
|
-
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"),
|
|
13439
|
+
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"), AxiosError.ERR_NOT_SUPPORT);
|
|
12536
13440
|
}
|
|
12537
13441
|
return adapter;
|
|
12538
13442
|
}
|
|
@@ -12571,9 +13475,10 @@ function throwIfCancellationRequested(config) {
|
|
|
12571
13475
|
*
|
|
12572
13476
|
* @returns {Promise} The Promise to be fulfilled
|
|
12573
13477
|
*/
|
|
12574
|
-
function dispatchRequest(
|
|
13478
|
+
function dispatchRequest(_config) {
|
|
13479
|
+
const config = utils_default.toSafeFlatObject(_config);
|
|
12575
13480
|
throwIfCancellationRequested(config);
|
|
12576
|
-
config.headers = AxiosHeaders.from(config
|
|
13481
|
+
config.headers = AxiosHeaders.from(utils_default.getSafeProp(config, "headers"));
|
|
12577
13482
|
config.data = transformData.call(config, config.transformRequest);
|
|
12578
13483
|
if ([
|
|
12579
13484
|
"post",
|
|
@@ -12660,7 +13565,7 @@ validators$1.spelling = function spelling(correctSpelling) {
|
|
|
12660
13565
|
* @returns {object}
|
|
12661
13566
|
*/
|
|
12662
13567
|
function assertOptions(options, schema, allowUnknown) {
|
|
12663
|
-
if (typeof options !== "object") throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
13568
|
+
if (typeof options !== "object" || options === null) throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
12664
13569
|
const keys = Object.keys(options);
|
|
12665
13570
|
let i = keys.length;
|
|
12666
13571
|
while (i-- > 0) {
|
|
@@ -12709,24 +13614,23 @@ var Axios = class {
|
|
|
12709
13614
|
try {
|
|
12710
13615
|
return await this._request(configOrUrl, config);
|
|
12711
13616
|
} catch (err) {
|
|
12712
|
-
if (err instanceof Error) {
|
|
13617
|
+
if (err instanceof Error) try {
|
|
12713
13618
|
let dummy = {};
|
|
12714
13619
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = /* @__PURE__ */ new Error();
|
|
12715
|
-
const
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
}
|
|
13620
|
+
const dummyStack = dummy.stack;
|
|
13621
|
+
let stack = "";
|
|
13622
|
+
if (typeof dummyStack === "string") {
|
|
13623
|
+
const firstNewlineIndex = dummyStack.indexOf("\n");
|
|
13624
|
+
stack = firstNewlineIndex === -1 ? "" : dummyStack.slice(firstNewlineIndex + 1);
|
|
13625
|
+
}
|
|
13626
|
+
if (!err.stack) err.stack = stack;
|
|
13627
|
+
else if (stack) {
|
|
13628
|
+
const firstNewlineIndex = stack.indexOf("\n");
|
|
13629
|
+
const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
|
|
13630
|
+
const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
|
|
13631
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) err.stack += "\n" + stack;
|
|
13632
|
+
}
|
|
13633
|
+
} catch (e) {}
|
|
12730
13634
|
throw err;
|
|
12731
13635
|
}
|
|
12732
13636
|
}
|
|
@@ -12742,31 +13646,25 @@ var Axios = class {
|
|
|
12742
13646
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
12743
13647
|
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
12744
13648
|
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
12745
|
-
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
|
|
13649
|
+
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
|
|
13650
|
+
validateStatusUndefinedResolves: validators.transitional(validators.boolean)
|
|
12746
13651
|
}, false);
|
|
12747
|
-
if (paramsSerializer != null)
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
|
|
13652
|
+
if (paramsSerializer != null) {
|
|
13653
|
+
if (utils_default.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer };
|
|
13654
|
+
else validator_default.assertOptions(paramsSerializer, {
|
|
13655
|
+
encode: validators.function,
|
|
13656
|
+
serialize: validators.function
|
|
13657
|
+
}, true);
|
|
13658
|
+
}
|
|
12752
13659
|
if (config.allowAbsoluteUrls !== void 0) {} else if (this.defaults.allowAbsoluteUrls !== void 0) config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
12753
13660
|
else config.allowAbsoluteUrls = true;
|
|
12754
13661
|
validator_default.assertOptions(config, {
|
|
12755
13662
|
baseUrl: validators.spelling("baseURL"),
|
|
12756
13663
|
withXsrfToken: validators.spelling("withXSRFToken")
|
|
12757
13664
|
}, true);
|
|
12758
|
-
config.method = (config
|
|
13665
|
+
config.method = (utils_default.getSafeProp(config, "method") || utils_default.getSafeProp(this.defaults, "method") || "get").toLowerCase();
|
|
12759
13666
|
let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
|
|
12760
|
-
headers && utils_default.forEach(
|
|
12761
|
-
"delete",
|
|
12762
|
-
"get",
|
|
12763
|
-
"head",
|
|
12764
|
-
"post",
|
|
12765
|
-
"put",
|
|
12766
|
-
"patch",
|
|
12767
|
-
"query",
|
|
12768
|
-
"common"
|
|
12769
|
-
], (method) => {
|
|
13667
|
+
headers && utils_default.forEach(methodList.concat("common"), (method) => {
|
|
12770
13668
|
delete headers[method];
|
|
12771
13669
|
});
|
|
12772
13670
|
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
@@ -12801,16 +13699,25 @@ var Axios = class {
|
|
|
12801
13699
|
const onFulfilled = requestInterceptorChain[i++];
|
|
12802
13700
|
const onRejected = requestInterceptorChain[i++];
|
|
12803
13701
|
try {
|
|
12804
|
-
newConfig = onFulfilled(newConfig);
|
|
13702
|
+
newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
|
|
12805
13703
|
} catch (error) {
|
|
12806
|
-
onRejected
|
|
13704
|
+
if (!onRejected) {
|
|
13705
|
+
promise = Promise.reject(error);
|
|
13706
|
+
break;
|
|
13707
|
+
}
|
|
13708
|
+
try {
|
|
13709
|
+
const rejectedResult = onRejected.call(this, error);
|
|
13710
|
+
if (utils_default.isThenable(rejectedResult)) promise = Promise.resolve(rejectedResult).then(() => dispatchRequest.call(this, newConfig));
|
|
13711
|
+
} catch (rejectedError) {
|
|
13712
|
+
promise = Promise.reject(rejectedError);
|
|
13713
|
+
}
|
|
12807
13714
|
break;
|
|
12808
13715
|
}
|
|
12809
13716
|
}
|
|
12810
|
-
try {
|
|
13717
|
+
if (!promise) try {
|
|
12811
13718
|
promise = dispatchRequest.call(this, newConfig);
|
|
12812
13719
|
} catch (error) {
|
|
12813
|
-
|
|
13720
|
+
promise = Promise.reject(error);
|
|
12814
13721
|
}
|
|
12815
13722
|
i = 0;
|
|
12816
13723
|
len = responseInterceptorChain.length;
|
|
@@ -12819,7 +13726,7 @@ var Axios = class {
|
|
|
12819
13726
|
}
|
|
12820
13727
|
getUri(config) {
|
|
12821
13728
|
config = mergeConfig(this.defaults, config);
|
|
12822
|
-
return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
13729
|
+
return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config), config.params, config.paramsSerializer);
|
|
12823
13730
|
}
|
|
12824
13731
|
};
|
|
12825
13732
|
utils_default.forEach([
|
|
@@ -12832,7 +13739,7 @@ utils_default.forEach([
|
|
|
12832
13739
|
return this.request(mergeConfig(config || {}, {
|
|
12833
13740
|
method,
|
|
12834
13741
|
url,
|
|
12835
|
-
data: (config
|
|
13742
|
+
data: config && utils_default.hasOwnProp(config, "data") ? config.data : void 0
|
|
12836
13743
|
}));
|
|
12837
13744
|
};
|
|
12838
13745
|
});
|
|
@@ -13022,14 +13929,22 @@ var HttpStatusCode = {
|
|
|
13022
13929
|
Gone: 410,
|
|
13023
13930
|
LengthRequired: 411,
|
|
13024
13931
|
PreconditionFailed: 412,
|
|
13932
|
+
/**
|
|
13933
|
+
* @deprecated Use `ContentTooLarge` instead.
|
|
13934
|
+
*/
|
|
13025
13935
|
PayloadTooLarge: 413,
|
|
13936
|
+
ContentTooLarge: 413,
|
|
13026
13937
|
UriTooLong: 414,
|
|
13027
13938
|
UnsupportedMediaType: 415,
|
|
13028
13939
|
RangeNotSatisfiable: 416,
|
|
13029
13940
|
ExpectationFailed: 417,
|
|
13030
13941
|
ImATeapot: 418,
|
|
13031
13942
|
MisdirectedRequest: 421,
|
|
13943
|
+
/**
|
|
13944
|
+
* @deprecated Use `UnprocessableContent` instead.
|
|
13945
|
+
*/
|
|
13032
13946
|
UnprocessableEntity: 422,
|
|
13947
|
+
UnprocessableContent: 422,
|
|
13033
13948
|
Locked: 423,
|
|
13034
13949
|
FailedDependency: 424,
|
|
13035
13950
|
TooEarly: 425,
|
|
@@ -13049,6 +13964,7 @@ var HttpStatusCode = {
|
|
|
13049
13964
|
LoopDetected: 508,
|
|
13050
13965
|
NotExtended: 510,
|
|
13051
13966
|
NetworkAuthenticationRequired: 511,
|
|
13967
|
+
WebServerReturnsAnUnknownError: 520,
|
|
13052
13968
|
WebServerIsDown: 521,
|
|
13053
13969
|
ConnectionTimedOut: 522,
|
|
13054
13970
|
OriginIsUnreachable: 523,
|
|
@@ -13057,7 +13973,7 @@ var HttpStatusCode = {
|
|
|
13057
13973
|
InvalidSslCertificate: 526
|
|
13058
13974
|
};
|
|
13059
13975
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
13060
|
-
HttpStatusCode[value] = key;
|
|
13976
|
+
if (HttpStatusCode[value] === void 0) HttpStatusCode[value] = key;
|
|
13061
13977
|
});
|
|
13062
13978
|
//#endregion
|
|
13063
13979
|
//#region node_modules/axios/lib/axios.js
|
|
@@ -13313,7 +14229,6 @@ var SocketIoClient = class extends import_tiny_emitter$1.TinyEmitter {
|
|
|
13313
14229
|
this.ResetSocket();
|
|
13314
14230
|
if (_nsshunt_stsutils.isNode) this.#reconnectTimeoutVal = setTimeout(() => this.#EstablishSocketConnect(), this.#reconnectTimeout).unref();
|
|
13315
14231
|
else this.#reconnectTimeoutVal = setTimeout(() => this.#EstablishSocketConnect(), this.#reconnectTimeout);
|
|
13316
|
-
break;
|
|
13317
14232
|
}
|
|
13318
14233
|
});
|
|
13319
14234
|
}
|
|
@@ -13723,21 +14638,22 @@ function getInt64(view, offset) {
|
|
|
13723
14638
|
var TIMESTAMP32_MAX_SEC = 4294967295;
|
|
13724
14639
|
var TIMESTAMP64_MAX_SEC = 17179869183;
|
|
13725
14640
|
function encodeTimeSpecToTimestamp({ sec, nsec }) {
|
|
13726
|
-
if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC)
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
14641
|
+
if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) {
|
|
14642
|
+
if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) {
|
|
14643
|
+
const rv = /* @__PURE__ */ new Uint8Array(4);
|
|
14644
|
+
new DataView(rv.buffer).setUint32(0, sec);
|
|
14645
|
+
return rv;
|
|
14646
|
+
} else {
|
|
14647
|
+
const secHigh = sec / 4294967296;
|
|
14648
|
+
const secLow = sec & 4294967295;
|
|
14649
|
+
const rv = /* @__PURE__ */ new Uint8Array(8);
|
|
14650
|
+
const view = new DataView(rv.buffer);
|
|
14651
|
+
view.setUint32(0, nsec << 2 | secHigh & 3);
|
|
14652
|
+
view.setUint32(4, secLow);
|
|
14653
|
+
return rv;
|
|
14654
|
+
}
|
|
13730
14655
|
} else {
|
|
13731
|
-
const
|
|
13732
|
-
const secLow = sec & 4294967295;
|
|
13733
|
-
const rv = new Uint8Array(8);
|
|
13734
|
-
const view = new DataView(rv.buffer);
|
|
13735
|
-
view.setUint32(0, nsec << 2 | secHigh & 3);
|
|
13736
|
-
view.setUint32(4, secLow);
|
|
13737
|
-
return rv;
|
|
13738
|
-
}
|
|
13739
|
-
else {
|
|
13740
|
-
const rv = new Uint8Array(12);
|
|
14656
|
+
const rv = /* @__PURE__ */ new Uint8Array(12);
|
|
13741
14657
|
const view = new DataView(rv.buffer);
|
|
13742
14658
|
view.setUint32(0, nsec);
|
|
13743
14659
|
setInt64(view, 4, sec);
|
|
@@ -14549,9 +15465,7 @@ var ObservabilityPayloadTransformer = class {
|
|
|
14549
15465
|
case SubscriptionTopic.AgentWorkers:
|
|
14550
15466
|
this.CreateModelAgentWorkers(subscriptionPayload);
|
|
14551
15467
|
break;
|
|
14552
|
-
case SubscriptionTopic.AgentWorker:
|
|
14553
|
-
this.CreateModelAgentWorker(subscriptionPayload);
|
|
14554
|
-
break;
|
|
15468
|
+
case SubscriptionTopic.AgentWorker: this.CreateModelAgentWorker(subscriptionPayload);
|
|
14555
15469
|
}
|
|
14556
15470
|
}
|
|
14557
15471
|
CreateModelAllServicesCombined(subscriptionPayload) {
|
|
@@ -14802,8 +15716,9 @@ var RESTClientSubscriber = class {
|
|
|
14802
15716
|
this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): axios call: endPointUrl: [${endPointUrl}]`));
|
|
14803
15717
|
if (_nsshunt_stsutils.isNode && this.#options.agentManager) retVal = await axios(new _nsshunt_stsutils.STSAxiosConfig(endPointUrl, "get").withDefaultHeaders().withAgentManager(this.#options.agentManager).config);
|
|
14804
15718
|
else retVal = await axios(new _nsshunt_stsutils.STSAxiosConfig(endPointUrl, "get").withDefaultHeaders().config);
|
|
14805
|
-
if (retVal)
|
|
14806
|
-
|
|
15719
|
+
if (retVal) {
|
|
15720
|
+
if (retVal.data) {} else this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): no retVal.data`));
|
|
15721
|
+
} else this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): no retVal`));
|
|
14807
15722
|
performance.now() - start;
|
|
14808
15723
|
if (subscriptionKey.topic.localeCompare(SubscriptionTopic.AllServicesCombined) === 0) return retVal.data["services"];
|
|
14809
15724
|
if (subscriptionKey.topic.localeCompare(SubscriptionTopic.AllAgentsCombined) === 0) return retVal.data["agents"];
|
|
@@ -14969,6 +15884,7 @@ var UXModelNavigator_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14969
15884
|
chalk$1.level = 3;
|
|
14970
15885
|
let subscriptionOptions;
|
|
14971
15886
|
const props = __props;
|
|
15887
|
+
console.debug(`UXModelNavigator(): ModelStore`);
|
|
14972
15888
|
const store = ModelStore();
|
|
14973
15889
|
let observabilityPayloadTransformer = new ObservabilityPayloadTransformer({
|
|
14974
15890
|
logger: _nsshunt_stsutils.defaultLogger,
|
|
@@ -15091,9 +16007,7 @@ var UXModelNavigator_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15091
16007
|
case SubscriptionTopic.Services:
|
|
15092
16008
|
navigate(GetServiceInstancesSubscriptions(id));
|
|
15093
16009
|
break;
|
|
15094
|
-
case SubscriptionTopic.ServiceInstances:
|
|
15095
|
-
navigate(GetServiceInstanceSubscriptions(store._models[props.modelId].serviceModelSubscriptionKey?.key, id));
|
|
15096
|
-
break;
|
|
16010
|
+
case SubscriptionTopic.ServiceInstances: navigate(GetServiceInstanceSubscriptions(store._models[props.modelId].serviceModelSubscriptionKey?.key, id));
|
|
15097
16011
|
}
|
|
15098
16012
|
}
|
|
15099
16013
|
};
|
|
@@ -15340,7 +16254,7 @@ var UXTestForm_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
15340
16254
|
return (0, vue.openBlock)(), (0, vue.createBlock)(_component_v_container, { class: "yellowgreen" }, {
|
|
15341
16255
|
default: (0, vue.withCtx)(() => [
|
|
15342
16256
|
(0, vue.createVNode)(_component_v_row, null, {
|
|
15343
|
-
default: (0, vue.withCtx)(() => [_cache[0] || (_cache[0] = (0, vue.createElementVNode)("div", null, "
|
|
16257
|
+
default: (0, vue.withCtx)(() => [_cache[0] || (_cache[0] = (0, vue.createElementVNode)("div", null, "UXTestForm", -1)), (0, vue.createVNode)(_component_v_divider)]),
|
|
15344
16258
|
_: 1
|
|
15345
16259
|
}),
|
|
15346
16260
|
__props.showFormValues ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_v_row, { key: 0 }, {
|