@web-site-utilities/feedback 0.0.4 → 0.0.6
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/index.cjs.js +5 -5
- package/dist/index.es.js +70 -70
- package/dist/index.iife.js +4 -4
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -67,7 +67,7 @@ function Ft(e, t, r, n, o, i, s, d) {
|
|
|
67
67
|
function ye(e, t) {
|
|
68
68
|
return ur(Ft("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Fe(e) {
|
|
71
71
|
for (; e.root; )
|
|
72
72
|
e = ye(e.root, { children: [e] });
|
|
73
73
|
lt(e, e.siblings);
|
|
@@ -532,11 +532,11 @@ function Lo(e, t, r, n) {
|
|
|
532
532
|
// :read-(only|write)
|
|
533
533
|
case ":read-only":
|
|
534
534
|
case ":read-write":
|
|
535
|
-
|
|
535
|
+
Fe(ye(e, { props: [g(o, /:(read-\w+)/, ":" + ut + "$1")] })), Fe(ye(e, { props: [o] })), ur(e, { props: Vr(r, n) });
|
|
536
536
|
break;
|
|
537
537
|
// :placeholder
|
|
538
538
|
case "::placeholder":
|
|
539
|
-
|
|
539
|
+
Fe(ye(e, { props: [g(o, /:(plac\w+)/, ":" + C + "input-$1")] })), Fe(ye(e, { props: [g(o, /:(plac\w+)/, ":" + ut + "$1")] })), Fe(ye(e, { props: [g(o, /:(plac\w+)/, k + "input-$1")] })), Fe(ye(e, { props: [o] })), ur(e, { props: Vr(r, n) });
|
|
540
540
|
break;
|
|
541
541
|
}
|
|
542
542
|
return "";
|
|
@@ -608,11 +608,11 @@ function mr(e) {
|
|
|
608
608
|
for (t = Math.abs(e); t > Et; t = t / Et | 0) r = qr(t % Et) + r;
|
|
609
609
|
return (qr(t % Et) + r).replace(Wo, "$1-$2");
|
|
610
610
|
}
|
|
611
|
-
var tr, Rn = 5381,
|
|
611
|
+
var tr, Rn = 5381, ze = function(e, t) {
|
|
612
612
|
for (var r = t.length; r; ) e = 33 * e ^ t.charCodeAt(--r);
|
|
613
613
|
return e;
|
|
614
614
|
}, kn = function(e) {
|
|
615
|
-
return
|
|
615
|
+
return ze(Rn, e);
|
|
616
616
|
};
|
|
617
617
|
function Ho(e) {
|
|
618
618
|
return mr(kn(e) >>> 0);
|
|
@@ -650,7 +650,7 @@ function $n(e, t, r) {
|
|
|
650
650
|
}
|
|
651
651
|
return e;
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function _e(e) {
|
|
654
654
|
return typeof e == "function";
|
|
655
655
|
}
|
|
656
656
|
function Tr(e) {
|
|
@@ -676,7 +676,7 @@ function hr(e, t, r) {
|
|
|
676
676
|
function wr(e, t) {
|
|
677
677
|
Object.defineProperty(e, "toString", { value: t });
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function Ie(e) {
|
|
680
680
|
for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
|
|
681
681
|
return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(t.length > 0 ? " Args: ".concat(t.join(", ")) : ""));
|
|
682
682
|
}
|
|
@@ -689,7 +689,7 @@ var Jo = (function() {
|
|
|
689
689
|
return r;
|
|
690
690
|
}, e.prototype.insertRules = function(t, r) {
|
|
691
691
|
if (t >= this.groupSizes.length) {
|
|
692
|
-
for (var n = this.groupSizes, o = n.length, i = o; t >= i; ) if ((i <<= 1) < 0) throw
|
|
692
|
+
for (var n = this.groupSizes, o = n.length, i = o; t >= i; ) if ((i <<= 1) < 0) throw Ie(16, "".concat(t));
|
|
693
693
|
this.groupSizes = new Uint32Array(i), this.groupSizes.set(n), this.length = i;
|
|
694
694
|
for (var s = o; s < i; s++) this.groupSizes[s] = 0;
|
|
695
695
|
}
|
|
@@ -751,7 +751,7 @@ var Dn = function(e) {
|
|
|
751
751
|
var s = n[o];
|
|
752
752
|
if (s.ownerNode === r) return s;
|
|
753
753
|
}
|
|
754
|
-
throw
|
|
754
|
+
throw Ie(17);
|
|
755
755
|
})(this.element), this.length = 0;
|
|
756
756
|
}
|
|
757
757
|
return e.prototype.insertRule = function(t, r) {
|
|
@@ -870,7 +870,7 @@ function fa(e) {
|
|
|
870
870
|
})))), O;
|
|
871
871
|
};
|
|
872
872
|
return T.hash = u.length ? u.reduce(function(w, v) {
|
|
873
|
-
return v.name ||
|
|
873
|
+
return v.name || Ie(15), ze(w, v.name);
|
|
874
874
|
}, Rn).toString() : "", T;
|
|
875
875
|
}
|
|
876
876
|
var ma = new Ln(), pr = fa(), Fn = l.createContext({ shouldForwardProp: void 0, styleSheet: ma, stylis: pr });
|
|
@@ -887,7 +887,7 @@ var ha = (function() {
|
|
|
887
887
|
var s = n.name + i.hash;
|
|
888
888
|
o.hasNameForId(n.id, s) || o.insertRules(n.id, s, i(n.rules, s, "@keyframes"));
|
|
889
889
|
}, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = r, wr(this, function() {
|
|
890
|
-
throw
|
|
890
|
+
throw Ie(12, String(n.name));
|
|
891
891
|
});
|
|
892
892
|
}
|
|
893
893
|
return e.prototype.getName = function(t) {
|
|
@@ -910,15 +910,15 @@ var zn = function(e) {
|
|
|
910
910
|
var t, r, n = [];
|
|
911
911
|
for (var o in e) {
|
|
912
912
|
var i = e[o];
|
|
913
|
-
e.hasOwnProperty(o) && !zn(i) && (Array.isArray(i) && i.isCss ||
|
|
913
|
+
e.hasOwnProperty(o) && !zn(i) && (Array.isArray(i) && i.isCss || _e(i) ? n.push("".concat(rn(o), ":"), i, ";") : dt(i) ? n.push.apply(n, Ot(Ot(["".concat(o, " {")], Bn(i), !1), ["}"], !1)) : n.push("".concat(rn(o), ": ").concat((t = o, (r = i) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || t in Mo || t.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";")));
|
|
914
914
|
}
|
|
915
915
|
return n;
|
|
916
916
|
};
|
|
917
917
|
function Ae(e, t, r, n) {
|
|
918
918
|
if (zn(e)) return [];
|
|
919
919
|
if (Tr(e)) return [".".concat(e.styledComponentId)];
|
|
920
|
-
if (
|
|
921
|
-
if (!
|
|
920
|
+
if (_e(e)) {
|
|
921
|
+
if (!_e(i = e) || i.prototype && i.prototype.isReactComponent || !t) return [e];
|
|
922
922
|
var o = e(t);
|
|
923
923
|
return Ae(o, t, r, n);
|
|
924
924
|
}
|
|
@@ -930,19 +930,19 @@ function Ae(e, t, r, n) {
|
|
|
930
930
|
function ga(e) {
|
|
931
931
|
for (var t = 0; t < e.length; t += 1) {
|
|
932
932
|
var r = e[t];
|
|
933
|
-
if (
|
|
933
|
+
if (_e(r) && !Tr(r)) return !1;
|
|
934
934
|
}
|
|
935
935
|
return !0;
|
|
936
936
|
}
|
|
937
937
|
var ba = kn(Bt), ya = (function() {
|
|
938
938
|
function e(t, r, n) {
|
|
939
|
-
this.rules = t, this.staticRulesId = "", this.isStatic = (n === void 0 || n.isStatic) && ga(t), this.componentId = r, this.baseHash =
|
|
939
|
+
this.rules = t, this.staticRulesId = "", this.isStatic = (n === void 0 || n.isStatic) && ga(t), this.componentId = r, this.baseHash = ze(ba, r), this.baseStyle = n, Ln.registerId(r);
|
|
940
940
|
}
|
|
941
941
|
return e.prototype.generateAndInjectStyles = function(t, r, n) {
|
|
942
942
|
var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, r, n) : "";
|
|
943
943
|
if (this.isStatic && !n.hash) if (this.staticRulesId && r.hasNameForId(this.componentId, this.staticRulesId)) o = we(o, this.staticRulesId);
|
|
944
944
|
else {
|
|
945
|
-
var i = Qr(Ae(this.rules, t, r, n)), s = mr(
|
|
945
|
+
var i = Qr(Ae(this.rules, t, r, n)), s = mr(ze(this.baseHash, i) >>> 0);
|
|
946
946
|
if (!r.hasNameForId(this.componentId, s)) {
|
|
947
947
|
var d = n(i, ".".concat(s), void 0, this.componentId);
|
|
948
948
|
r.insertRules(this.componentId, s, d);
|
|
@@ -950,12 +950,12 @@ var ba = kn(Bt), ya = (function() {
|
|
|
950
950
|
o = we(o, s), this.staticRulesId = s;
|
|
951
951
|
}
|
|
952
952
|
else {
|
|
953
|
-
for (var u =
|
|
953
|
+
for (var u = ze(this.baseHash, n.hash), m = "", p = 0; p < this.rules.length; p++) {
|
|
954
954
|
var T = this.rules[p];
|
|
955
955
|
if (typeof T == "string") m += T;
|
|
956
956
|
else if (T) {
|
|
957
957
|
var w = Qr(Ae(T, t, r, n));
|
|
958
|
-
u =
|
|
958
|
+
u = ze(u, w + p), m += w;
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
if (m) {
|
|
@@ -970,12 +970,12 @@ Dt.Consumer;
|
|
|
970
970
|
function va(e) {
|
|
971
971
|
var t = l.useContext(Dt), r = se(function() {
|
|
972
972
|
return (function(n, o) {
|
|
973
|
-
if (!n) throw
|
|
974
|
-
if (
|
|
973
|
+
if (!n) throw Ie(14);
|
|
974
|
+
if (_e(n)) {
|
|
975
975
|
var i = n(o);
|
|
976
976
|
return i;
|
|
977
977
|
}
|
|
978
|
-
if (Array.isArray(n) || typeof n != "object") throw
|
|
978
|
+
if (Array.isArray(n) || typeof n != "object") throw Ie(8);
|
|
979
979
|
return o ? V(V({}, o), n) : n;
|
|
980
980
|
})(e.theme, t);
|
|
981
981
|
}, [e.theme, t]);
|
|
@@ -1003,19 +1003,19 @@ function Ea(e, t, r) {
|
|
|
1003
1003
|
var D = new ya(r, w, n ? o.componentStyle : void 0);
|
|
1004
1004
|
function O(b, R) {
|
|
1005
1005
|
return (function(x, y, pe) {
|
|
1006
|
-
var
|
|
1007
|
-
for (var be, re = V(V({}, te), { className: void 0, theme: ge }),
|
|
1008
|
-
var Ee =
|
|
1006
|
+
var Re = x.attrs, Wt = x.componentStyle, U = x.defaultProps, Xe = x.foldedComponentIds, Ze = x.styledComponentId, Qe = x.target, Ht = l.useContext(Dt), Vt = tn(), Je = x.shouldForwardProp || Vt.shouldForwardProp, et = zo(y, Ht, U) || je, J = (function(I, te, ge) {
|
|
1007
|
+
for (var be, re = V(V({}, te), { className: void 0, theme: ge }), Oe = 0; Oe < I.length; Oe += 1) {
|
|
1008
|
+
var Ee = _e(be = I[Oe]) ? be(re) : be;
|
|
1009
1009
|
for (var j in Ee) re[j] = j === "className" ? we(re[j], Ee[j]) : j === "style" ? V(V({}, re[j]), Ee[j]) : Ee[j];
|
|
1010
1010
|
}
|
|
1011
1011
|
return te.className && (re.className = we(re.className, te.className)), re;
|
|
1012
|
-
})(
|
|
1012
|
+
})(Re, y, et), ve = J.as || Qe, P = {};
|
|
1013
1013
|
for (var ee in J) J[ee] === void 0 || ee[0] === "$" || ee === "as" || ee === "theme" && J.theme === et || (ee === "forwardedAs" ? P.as = J.forwardedAs : Je && !Je(ee, ve) || (P[ee] = J[ee]));
|
|
1014
1014
|
var L = (function(I, te) {
|
|
1015
1015
|
var ge = tn(), be = I.generateAndInjectStyles(te, ge.styleSheet, ge.stylis);
|
|
1016
1016
|
return be;
|
|
1017
|
-
})(Wt, J),
|
|
1018
|
-
return L && (
|
|
1017
|
+
})(Wt, J), ke = we(Xe, Ze);
|
|
1018
|
+
return L && (ke += " " + L), J.className && (ke += " " + J.className), P[rr(ve) && !In.has(ve) ? "class" : "className"] = ke, pe && (P.ref = pe), mo(ve, P);
|
|
1019
1019
|
})(_, b, R);
|
|
1020
1020
|
}
|
|
1021
1021
|
O.displayName = T;
|
|
@@ -1025,7 +1025,7 @@ function Ea(e, t, r) {
|
|
|
1025
1025
|
}, set: function(b) {
|
|
1026
1026
|
this._foldedDefaultProps = n ? (function(R) {
|
|
1027
1027
|
for (var x = [], y = 1; y < arguments.length; y++) x[y - 1] = arguments[y];
|
|
1028
|
-
for (var pe = 0,
|
|
1028
|
+
for (var pe = 0, Re = x; pe < Re.length; pe++) hr(R, Re[pe], !0);
|
|
1029
1029
|
return R;
|
|
1030
1030
|
})({}, o.defaultProps, b) : b;
|
|
1031
1031
|
} }), wr(_, function() {
|
|
@@ -1041,12 +1041,12 @@ var on = function(e) {
|
|
|
1041
1041
|
};
|
|
1042
1042
|
function Sa(e) {
|
|
1043
1043
|
for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
|
|
1044
|
-
if (
|
|
1044
|
+
if (_e(e) || dt(e)) return on(Ae(nn(Ut, Ot([e], t, !0))));
|
|
1045
1045
|
var n = e;
|
|
1046
1046
|
return t.length === 0 && n.length === 1 && typeof n[0] == "string" ? Ae(n) : on(Ae(nn(n, t)));
|
|
1047
1047
|
}
|
|
1048
1048
|
function gr(e, t, r) {
|
|
1049
|
-
if (r === void 0 && (r = je), !t) throw
|
|
1049
|
+
if (r === void 0 && (r = je), !t) throw Ie(1, t);
|
|
1050
1050
|
var n = function(o) {
|
|
1051
1051
|
for (var i = [], s = 1; s < arguments.length; s++) i[s - 1] = arguments[s];
|
|
1052
1052
|
return e(t, r, Sa.apply(void 0, Ot([o], i, !1)));
|
|
@@ -1063,7 +1063,7 @@ var Un = function(e) {
|
|
|
1063
1063
|
In.forEach(function(e) {
|
|
1064
1064
|
S[e] = Un(e);
|
|
1065
1065
|
});
|
|
1066
|
-
const
|
|
1066
|
+
const Be = {
|
|
1067
1067
|
// Main colors usually to be modified by the user
|
|
1068
1068
|
primary: "#422ad5",
|
|
1069
1069
|
// Primary brand color, The main color of your brand
|
|
@@ -1122,9 +1122,9 @@ const _e = {
|
|
|
1122
1122
|
}, Ta = {
|
|
1123
1123
|
selectedVariant: "primary",
|
|
1124
1124
|
getDefaultVariantOrSelected: () => "primary",
|
|
1125
|
-
...
|
|
1125
|
+
...Be
|
|
1126
1126
|
}, Wn = l.createContext({
|
|
1127
|
-
...
|
|
1127
|
+
...Be,
|
|
1128
1128
|
...Ta
|
|
1129
1129
|
}), wa = S.div`
|
|
1130
1130
|
font-family:
|
|
@@ -1179,26 +1179,26 @@ const _e = {
|
|
|
1179
1179
|
--all-fields-size: ${(e) => e.$theme.allFieldsSize};
|
|
1180
1180
|
`, xr = (e) => {
|
|
1181
1181
|
const t = e.selectedVariant ?? "primary";
|
|
1182
|
-
return console.log("
|
|
1183
|
-
theme: e.theme ??
|
|
1182
|
+
return console.log("ThemeProvider_theme", e.theme ?? Be), l.createElement(va, {
|
|
1183
|
+
theme: e.theme ?? Be,
|
|
1184
1184
|
children: l.createElement(wa, {
|
|
1185
|
-
$theme: e.theme ??
|
|
1185
|
+
$theme: e.theme ?? Be,
|
|
1186
1186
|
children: l.createElement(Wn.Provider, {
|
|
1187
1187
|
value: {
|
|
1188
1188
|
selectedVariant: t,
|
|
1189
1189
|
getDefaultVariantOrSelected: () => t,
|
|
1190
|
-
...e.theme ??
|
|
1190
|
+
...e.theme ?? Be
|
|
1191
1191
|
},
|
|
1192
1192
|
children: e.children
|
|
1193
1193
|
})
|
|
1194
1194
|
})
|
|
1195
1195
|
});
|
|
1196
1196
|
}, Hn = () => l.useContext(Wn), he = (e) => {
|
|
1197
|
-
const { getDefaultVariantOrSelected: t } = Hn(),
|
|
1198
|
-
return
|
|
1197
|
+
const { getDefaultVariantOrSelected: t, ...r } = Hn(), n = t();
|
|
1198
|
+
return r[e ?? n];
|
|
1199
1199
|
}, Vn = (e) => {
|
|
1200
|
-
const { getDefaultVariantOrSelected: t } = Hn(),
|
|
1201
|
-
return
|
|
1200
|
+
const { getDefaultVariantOrSelected: t, ...r } = Hn(), n = t(), o = e ? `${e}Content` : `${n}Content`;
|
|
1201
|
+
return r[o];
|
|
1202
1202
|
}, xa = () => {
|
|
1203
1203
|
const e = "http://localhost:4000/external", t = async (r) => {
|
|
1204
1204
|
const n = await r;
|
|
@@ -1869,7 +1869,7 @@ function Qn() {
|
|
|
1869
1869
|
implementation: x,
|
|
1870
1870
|
createNodeIterator: y,
|
|
1871
1871
|
createDocumentFragment: pe,
|
|
1872
|
-
getElementsByTagName:
|
|
1872
|
+
getElementsByTagName: Re
|
|
1873
1873
|
} = r, {
|
|
1874
1874
|
importNode: Wt
|
|
1875
1875
|
} = n;
|
|
@@ -1890,7 +1890,7 @@ function Qn() {
|
|
|
1890
1890
|
} = mn, P = null;
|
|
1891
1891
|
const ee = E({}, [...cn, ...ir, ...sr, ...lr, ...un]);
|
|
1892
1892
|
let L = null;
|
|
1893
|
-
const
|
|
1893
|
+
const ke = E({}, [...dn, ...cr, ...fn, ...wt]);
|
|
1894
1894
|
let I = Object.seal(Kn(null, {
|
|
1895
1895
|
tagNameCheck: {
|
|
1896
1896
|
writable: !0,
|
|
@@ -1910,28 +1910,28 @@ function Qn() {
|
|
|
1910
1910
|
enumerable: !0,
|
|
1911
1911
|
value: !1
|
|
1912
1912
|
}
|
|
1913
|
-
})), te = null, ge = null, be = !0, re = !0,
|
|
1913
|
+
})), te = null, ge = null, be = !0, re = !0, Oe = !1, Ee = !0, j = !1, ft = !0, Se = !1, Gt = !1, jt = !1, Pe = !1, mt = !1, ht = !1, Cr = !0, Ar = !1;
|
|
1914
1914
|
const oo = "user-content-";
|
|
1915
|
-
let Yt = !0, tt = !1,
|
|
1915
|
+
let Yt = !0, tt = !1, Ne = {}, $e = null;
|
|
1916
1916
|
const _r = E({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
1917
1917
|
let Ir = null;
|
|
1918
1918
|
const Rr = E({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
1919
1919
|
let qt = null;
|
|
1920
1920
|
const kr = E({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), pt = "http://www.w3.org/1998/Math/MathML", gt = "http://www.w3.org/2000/svg", ce = "http://www.w3.org/1999/xhtml";
|
|
1921
|
-
let
|
|
1921
|
+
let De = ce, Kt = !1, Xt = null;
|
|
1922
1922
|
const ao = E({}, [pt, gt, ce], or);
|
|
1923
1923
|
let bt = E({}, ["mi", "mo", "mn", "ms", "mtext"]), yt = E({}, ["annotation-xml"]);
|
|
1924
1924
|
const io = E({}, ["title", "style", "font", "a", "script"]);
|
|
1925
1925
|
let rt = null;
|
|
1926
1926
|
const so = ["application/xhtml+xml", "text/html"], lo = "text/html";
|
|
1927
|
-
let z = null,
|
|
1927
|
+
let z = null, Le = null;
|
|
1928
1928
|
const co = r.createElement("form"), Or = function(a) {
|
|
1929
1929
|
return a instanceof RegExp || a instanceof Function;
|
|
1930
1930
|
}, Zt = function() {
|
|
1931
1931
|
let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1932
|
-
if (!(
|
|
1932
|
+
if (!(Le && Le === a)) {
|
|
1933
1933
|
if ((!a || typeof a != "object") && (a = {}), a = fe(a), rt = // eslint-disable-next-line unicorn/prefer-includes
|
|
1934
|
-
so.indexOf(a.PARSER_MEDIA_TYPE) === -1 ? lo : a.PARSER_MEDIA_TYPE, z = rt === "application/xhtml+xml" ? or : kt, P = ne(a, "ALLOWED_TAGS") ? E({}, a.ALLOWED_TAGS, z) : ee, L = ne(a, "ALLOWED_ATTR") ? E({}, a.ALLOWED_ATTR, z) :
|
|
1934
|
+
so.indexOf(a.PARSER_MEDIA_TYPE) === -1 ? lo : a.PARSER_MEDIA_TYPE, z = rt === "application/xhtml+xml" ? or : kt, P = ne(a, "ALLOWED_TAGS") ? E({}, a.ALLOWED_TAGS, z) : ee, L = ne(a, "ALLOWED_ATTR") ? E({}, a.ALLOWED_ATTR, z) : ke, Xt = ne(a, "ALLOWED_NAMESPACES") ? E({}, a.ALLOWED_NAMESPACES, or) : ao, qt = ne(a, "ADD_URI_SAFE_ATTR") ? E(fe(kr), a.ADD_URI_SAFE_ATTR, z) : kr, Ir = ne(a, "ADD_DATA_URI_TAGS") ? E(fe(Rr), a.ADD_DATA_URI_TAGS, z) : Rr, $e = ne(a, "FORBID_CONTENTS") ? E({}, a.FORBID_CONTENTS, z) : _r, te = ne(a, "FORBID_TAGS") ? E({}, a.FORBID_TAGS, z) : fe({}), ge = ne(a, "FORBID_ATTR") ? E({}, a.FORBID_ATTR, z) : fe({}), Ne = ne(a, "USE_PROFILES") ? a.USE_PROFILES : !1, be = a.ALLOW_ARIA_ATTR !== !1, re = a.ALLOW_DATA_ATTR !== !1, Oe = a.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = a.ALLOW_SELF_CLOSE_IN_ATTR !== !1, j = a.SAFE_FOR_TEMPLATES || !1, ft = a.SAFE_FOR_XML !== !1, Se = a.WHOLE_DOCUMENT || !1, Pe = a.RETURN_DOM || !1, mt = a.RETURN_DOM_FRAGMENT || !1, ht = a.RETURN_TRUSTED_TYPE || !1, jt = a.FORCE_BODY || !1, Cr = a.SANITIZE_DOM !== !1, Ar = a.SANITIZE_NAMED_PROPS || !1, Yt = a.KEEP_CONTENT !== !1, tt = a.IN_PLACE || !1, ve = a.ALLOWED_URI_REGEXP || Xn, De = a.NAMESPACE || ce, bt = a.MATHML_TEXT_INTEGRATION_POINTS || bt, yt = a.HTML_INTEGRATION_POINTS || yt, I = a.CUSTOM_ELEMENT_HANDLING || {}, a.CUSTOM_ELEMENT_HANDLING && Or(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (I.tagNameCheck = a.CUSTOM_ELEMENT_HANDLING.tagNameCheck), a.CUSTOM_ELEMENT_HANDLING && Or(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (I.attributeNameCheck = a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), a.CUSTOM_ELEMENT_HANDLING && typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (I.allowCustomizedBuiltInElements = a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), j && (re = !1), mt && (Pe = !0), Ne && (P = E({}, un), L = [], Ne.html === !0 && (E(P, cn), E(L, dn)), Ne.svg === !0 && (E(P, ir), E(L, cr), E(L, wt)), Ne.svgFilters === !0 && (E(P, sr), E(L, cr), E(L, wt)), Ne.mathMl === !0 && (E(P, lr), E(L, fn), E(L, wt))), a.ADD_TAGS && (P === ee && (P = fe(P)), E(P, a.ADD_TAGS, z)), a.ADD_ATTR && (L === ke && (L = fe(L)), E(L, a.ADD_ATTR, z)), a.ADD_URI_SAFE_ATTR && E(qt, a.ADD_URI_SAFE_ATTR, z), a.FORBID_CONTENTS && ($e === _r && ($e = fe($e)), E($e, a.FORBID_CONTENTS, z)), Yt && (P["#text"] = !0), Se && E(P, ["html", "head", "body"]), P.table && (E(P, ["tbody"]), delete te.tbody), a.TRUSTED_TYPES_POLICY) {
|
|
1935
1935
|
if (typeof a.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
1936
1936
|
throw at('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
1937
1937
|
if (typeof a.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -1939,12 +1939,12 @@ function Qn() {
|
|
|
1939
1939
|
b = a.TRUSTED_TYPES_POLICY, R = b.createHTML("");
|
|
1940
1940
|
} else
|
|
1941
1941
|
b === void 0 && (b = ti(v, o)), b !== null && typeof R == "string" && (R = b.createHTML(""));
|
|
1942
|
-
q && q(a),
|
|
1942
|
+
q && q(a), Le = a;
|
|
1943
1943
|
}
|
|
1944
1944
|
}, Pr = E({}, [...ir, ...sr, ...Va]), Nr = E({}, [...lr, ...Ga]), uo = function(a) {
|
|
1945
1945
|
let c = _(a);
|
|
1946
1946
|
(!c || !c.tagName) && (c = {
|
|
1947
|
-
namespaceURI:
|
|
1947
|
+
namespaceURI: De,
|
|
1948
1948
|
tagName: "template"
|
|
1949
1949
|
});
|
|
1950
1950
|
const f = kt(a.tagName), N = kt(c.tagName);
|
|
@@ -1971,7 +1971,7 @@ function Qn() {
|
|
|
1971
1971
|
});
|
|
1972
1972
|
}
|
|
1973
1973
|
if (c.removeAttribute(a), a === "is")
|
|
1974
|
-
if (
|
|
1974
|
+
if (Pe || mt)
|
|
1975
1975
|
try {
|
|
1976
1976
|
ae(c);
|
|
1977
1977
|
} catch {
|
|
@@ -1989,22 +1989,22 @@ function Qn() {
|
|
|
1989
1989
|
const M = ar(a, /^[\r\n\t ]+/);
|
|
1990
1990
|
f = M && M[0];
|
|
1991
1991
|
}
|
|
1992
|
-
rt === "application/xhtml+xml" &&
|
|
1992
|
+
rt === "application/xhtml+xml" && De === ce && (a = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + a + "</body></html>");
|
|
1993
1993
|
const N = b ? b.createHTML(a) : a;
|
|
1994
|
-
if (
|
|
1994
|
+
if (De === ce)
|
|
1995
1995
|
try {
|
|
1996
1996
|
c = new w().parseFromString(N, rt);
|
|
1997
1997
|
} catch {
|
|
1998
1998
|
}
|
|
1999
1999
|
if (!c || !c.documentElement) {
|
|
2000
|
-
c = x.createDocument(
|
|
2000
|
+
c = x.createDocument(De, "template", null);
|
|
2001
2001
|
try {
|
|
2002
2002
|
c.documentElement.innerHTML = Kt ? R : N;
|
|
2003
2003
|
} catch {
|
|
2004
2004
|
}
|
|
2005
2005
|
}
|
|
2006
2006
|
const H = c.body || c.documentElement;
|
|
2007
|
-
return a && f && H.insertBefore(r.createTextNode(f), H.childNodes[0] || null),
|
|
2007
|
+
return a && f && H.insertBefore(r.createTextNode(f), H.childNodes[0] || null), De === ce ? Re.call(c, Se ? "html" : "body")[0] : Se ? c.documentElement : H;
|
|
2008
2008
|
}, Dr = function(a) {
|
|
2009
2009
|
return y.call(
|
|
2010
2010
|
a.ownerDocument || a,
|
|
@@ -2020,7 +2020,7 @@ function Qn() {
|
|
|
2020
2020
|
};
|
|
2021
2021
|
function ue(h, a, c) {
|
|
2022
2022
|
Tt(h, (f) => {
|
|
2023
|
-
f.call(t, a, c,
|
|
2023
|
+
f.call(t, a, c, Le);
|
|
2024
2024
|
});
|
|
2025
2025
|
}
|
|
2026
2026
|
const Mr = function(a) {
|
|
@@ -2036,7 +2036,7 @@ function Qn() {
|
|
|
2036
2036
|
if (!P[f] || te[f]) {
|
|
2037
2037
|
if (!te[f] && zr(f) && (I.tagNameCheck instanceof RegExp && Y(I.tagNameCheck, f) || I.tagNameCheck instanceof Function && I.tagNameCheck(f)))
|
|
2038
2038
|
return !1;
|
|
2039
|
-
if (Yt &&
|
|
2039
|
+
if (Yt && !$e[f]) {
|
|
2040
2040
|
const N = _(a) || a.parentNode, H = O(a) || a.childNodes;
|
|
2041
2041
|
if (H && N) {
|
|
2042
2042
|
const M = H.length;
|
|
@@ -2070,7 +2070,7 @@ function Qn() {
|
|
|
2070
2070
|
} else if (!qt[c]) {
|
|
2071
2071
|
if (!Y(ve, ot(f, et, ""))) {
|
|
2072
2072
|
if (!((c === "src" || c === "xlink:href" || c === "href") && a !== "script" && Ba(f, "data:") === 0 && Ir[a])) {
|
|
2073
|
-
if (!(
|
|
2073
|
+
if (!(Oe && !Y(Je, ot(f, et, "")))) {
|
|
2074
2074
|
if (f)
|
|
2075
2075
|
return !1;
|
|
2076
2076
|
}
|
|
@@ -2102,13 +2102,13 @@ function Qn() {
|
|
|
2102
2102
|
name: M,
|
|
2103
2103
|
namespaceURI: X,
|
|
2104
2104
|
value: de
|
|
2105
|
-
} = H,
|
|
2105
|
+
} = H, Me = z(M), Jt = de;
|
|
2106
2106
|
let W = M === "value" ? Jt : Ua(Jt);
|
|
2107
|
-
if (f.attrName =
|
|
2107
|
+
if (f.attrName = Me, f.attrValue = W, f.keepAttr = !0, f.forceKeepAttr = void 0, ue(U.uponSanitizeAttribute, a, f), W = f.attrValue, Ar && (Me === "id" || Me === "name") && (Te(M, a), W = oo + W), ft && Y(/((--!?|])>)|<\/(style|title|textarea)/i, W)) {
|
|
2108
2108
|
Te(M, a);
|
|
2109
2109
|
continue;
|
|
2110
2110
|
}
|
|
2111
|
-
if (
|
|
2111
|
+
if (Me === "attributename" && ar(W, "href")) {
|
|
2112
2112
|
Te(M, a);
|
|
2113
2113
|
continue;
|
|
2114
2114
|
}
|
|
@@ -2126,12 +2126,12 @@ function Qn() {
|
|
|
2126
2126
|
W = ot(W, Wr, " ");
|
|
2127
2127
|
});
|
|
2128
2128
|
const Ur = z(a.nodeName);
|
|
2129
|
-
if (!Fr(Ur,
|
|
2129
|
+
if (!Fr(Ur, Me, W)) {
|
|
2130
2130
|
Te(M, a);
|
|
2131
2131
|
continue;
|
|
2132
2132
|
}
|
|
2133
2133
|
if (b && typeof v == "object" && typeof v.getAttributeType == "function" && !X)
|
|
2134
|
-
switch (v.getAttributeType(Ur,
|
|
2134
|
+
switch (v.getAttributeType(Ur, Me)) {
|
|
2135
2135
|
case "TrustedHTML": {
|
|
2136
2136
|
W = b.createHTML(W);
|
|
2137
2137
|
break;
|
|
@@ -2175,11 +2175,11 @@ function Qn() {
|
|
|
2175
2175
|
} else if (h instanceof d)
|
|
2176
2176
|
c = $r("<!---->"), f = c.ownerDocument.importNode(h, !0), f.nodeType === st.element && f.nodeName === "BODY" || f.nodeName === "HTML" ? c = f : c.appendChild(f);
|
|
2177
2177
|
else {
|
|
2178
|
-
if (!
|
|
2178
|
+
if (!Pe && !j && !Se && // eslint-disable-next-line unicorn/prefer-includes
|
|
2179
2179
|
h.indexOf("<") === -1)
|
|
2180
2180
|
return b && ht ? b.createHTML(h) : h;
|
|
2181
2181
|
if (c = $r(h), !c)
|
|
2182
|
-
return
|
|
2182
|
+
return Pe ? null : ht ? R : "";
|
|
2183
2183
|
}
|
|
2184
2184
|
c && jt && ae(c.firstChild);
|
|
2185
2185
|
const M = Dr(tt ? h : c);
|
|
@@ -2187,7 +2187,7 @@ function Qn() {
|
|
|
2187
2187
|
Mr(N), Br(N), N.content instanceof i && fo(N.content);
|
|
2188
2188
|
if (tt)
|
|
2189
2189
|
return h;
|
|
2190
|
-
if (
|
|
2190
|
+
if (Pe) {
|
|
2191
2191
|
if (mt)
|
|
2192
2192
|
for (H = pe.call(c.ownerDocument); c.firstChild; )
|
|
2193
2193
|
H.appendChild(c.firstChild);
|
|
@@ -2204,9 +2204,9 @@ function Qn() {
|
|
|
2204
2204
|
let h = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2205
2205
|
Zt(h), Gt = !0;
|
|
2206
2206
|
}, t.clearConfig = function() {
|
|
2207
|
-
|
|
2207
|
+
Le = null, Gt = !1;
|
|
2208
2208
|
}, t.isValidAttribute = function(h, a, c) {
|
|
2209
|
-
|
|
2209
|
+
Le || Zt({});
|
|
2210
2210
|
const f = z(h), N = z(a);
|
|
2211
2211
|
return Fr(f, N, c);
|
|
2212
2212
|
}, t.addHook = function(h, a) {
|