@visulima/string 3.0.0-alpha.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +298 -0
- package/LICENSE.md +68 -3
- package/README.md +80 -2
- package/dist/align-text.d.ts +35 -0
- package/dist/align-text.js +2 -34
- package/dist/case/camel-case.d.ts +17 -3
- package/dist/case/camel-case.js +1 -55
- package/dist/case/capital-case.d.ts +14 -3
- package/dist/case/capital-case.js +1 -47
- package/dist/case/constant-case.d.ts +14 -3
- package/dist/case/constant-case.js +1 -7
- package/dist/case/dot-case.d.ts +14 -3
- package/dist/case/dot-case.js +1 -7
- package/dist/case/flat-case.d.ts +12 -3
- package/dist/case/flat-case.js +1 -7
- package/dist/case/flip-case.d.ts +16 -3
- package/dist/case/flip-case.js +1 -82
- package/dist/case/identify-case.d.ts +15 -3
- package/dist/case/identify-case.js +1 -66
- package/dist/case/index.d.ts +8 -3
- package/dist/case/index.js +1 -20
- package/dist/case/kebab-case.d.ts +25 -3
- package/dist/case/kebab-case.js +1 -55
- package/dist/case/lower-first.d.ts +13 -3
- package/dist/case/lower-first.js +1 -9
- package/dist/case/no-case.d.ts +14 -3
- package/dist/case/no-case.js +1 -7
- package/dist/case/pascal-case.d.ts +17 -3
- package/dist/case/pascal-case.js +1 -48
- package/dist/case/pascal-snake-case.d.ts +14 -3
- package/dist/case/pascal-snake-case.js +1 -28
- package/dist/case/path-case.d.ts +14 -3
- package/dist/case/path-case.js +1 -7
- package/dist/case/sentence-case.d.ts +14 -3
- package/dist/case/sentence-case.js +1 -54
- package/dist/case/snake-case.d.ts +14 -3
- package/dist/case/snake-case.js +1 -7
- package/dist/case/split-by-case.d.ts +29 -3
- package/dist/case/split-by-case.js +1 -763
- package/dist/case/title-case.d.ts +12 -3
- package/dist/case/title-case.js +1 -40
- package/dist/case/train-case.d.ts +14 -3
- package/dist/case/train-case.js +1 -40
- package/dist/case/upper-first.d.ts +13 -3
- package/dist/case/upper-first.js +1 -9
- package/dist/closest-string.d.ts +32 -0
- package/dist/closest-string.js +1 -22
- package/dist/compare-similarity.d.ts +37 -0
- package/dist/compare-similarity.js +1 -12
- package/dist/count-occurrences.d.ts +9 -0
- package/dist/count-occurrences.js +1 -0
- package/dist/direction.d.ts +7 -0
- package/dist/direction.js +1 -0
- package/dist/east-asian-width.d.ts +52 -0
- package/dist/east-asian-width.js +1 -0
- package/dist/excerpt.d.ts +25 -0
- package/dist/excerpt.js +53 -0
- package/dist/get-string-truncated-width.d.ts +151 -0
- package/dist/get-string-truncated-width.js +1 -332
- package/dist/get-string-width.d.ts +58 -0
- package/dist/get-string-width.js +1 -5
- package/dist/indent.d.ts +87 -0
- package/dist/indent.js +1 -0
- package/dist/index.d.ts +12 -20
- package/dist/index.js +1 -44
- package/dist/is-fullwidth-code-point.d.ts +7 -0
- package/dist/is-fullwidth-code-point.js +1 -0
- package/dist/levenshtein.d.ts +25 -0
- package/dist/levenshtein.js +1 -0
- package/dist/native-string-types.d.ts +239 -0
- package/dist/outdent.d.ts +74 -0
- package/dist/outdent.js +1 -109
- package/dist/packem_shared/_isFullWidth-Dqc3MWgl.js +1 -0
- package/dist/packem_shared/closest-C6YDQs4m.js +1 -0
- package/dist/packem_shared/constants-aPzGW29R.js +1 -0
- package/dist/packem_shared/dedent-CPjAYUXh.js +1 -0
- package/dist/packem_shared/eastAsianWidth-DJV8Kqd-.js +1 -0
- package/dist/packem_shared/generate-cache-key-BqU1Cqwm.js +1 -0
- package/dist/packem_shared/indent-cz8WMI0e.js +1 -0
- package/dist/packem_shared/joinSegments-CaHT-45s.js +1 -0
- package/dist/packem_shared/lru-cache-BtMSrYQJ.js +1 -0
- package/dist/packem_shared/normalize-german-eszett-hNMwtGjd.js +1 -0
- package/dist/packem_shared/redent-ByOoJ6fN.js +1 -0
- package/dist/packem_shared/types.d-CmNvyl4l.d.ts +360 -0
- package/dist/packem_shared/types.d-fhe030jX.d.ts +402 -0
- package/dist/replace-string.d.ts +10 -0
- package/dist/replace-string.js +1 -0
- package/dist/slice.d.ts +42 -0
- package/dist/slice.js +1 -415
- package/dist/slugify.d.ts +10 -1
- package/dist/slugify.js +1 -46
- package/dist/test/utils.d.ts +17 -0
- package/dist/test/utils.js +13 -88
- package/dist/test/vitest.d.ts +3 -0
- package/dist/test/vitest.js +1 -5
- package/dist/transliterate.d.ts +10 -0
- package/dist/transliterate.js +5 -0
- package/dist/truncate.d.ts +43 -0
- package/dist/truncate.js +1 -112
- package/dist/utilities.d.ts +28 -2
- package/dist/utilities.js +1 -52
- package/dist/word-similarity-sort.d.ts +34 -0
- package/dist/word-similarity-sort.js +1 -22
- package/dist/word-wrap.d.ts +44 -0
- package/dist/word-wrap.js +8 -639
- package/package.json +70 -36
- package/dist/packem_shared/LRUCache-3r3SovvR.js +0 -46
- package/dist/packem_shared/closest-IHuSvnSn.js +0 -139
- package/dist/packem_shared/closestN-DUsjgiXb.js +0 -25
- package/dist/packem_shared/constants-BsZS5f0z.js +0 -95
- package/dist/packem_shared/countOccurrences-CS9XprQN.js +0 -22
- package/dist/packem_shared/direction-C9gfWWTK.js +0 -16
- package/dist/packem_shared/eastAsianWidthType-SD3YniiT.js +0 -20
- package/dist/packem_shared/excerpt-COsVNttN.js +0 -1502
- package/dist/packem_shared/generate-cache-key-DdayDfjV.js +0 -6
- package/dist/packem_shared/indent-D3DSCa6s.js +0 -33
- package/dist/packem_shared/isFullwidthCodePoint-IFXZxNjq.js +0 -10
- package/dist/packem_shared/joinSegments-CvxSgKz0.js +0 -44
- package/dist/packem_shared/lookup-BE8lEqy4.js +0 -104
- package/dist/packem_shared/lru-cache.d-BsP6kbVJ.d.ts +0 -13
- package/dist/packem_shared/normalize-german-eszett-4p3yKEzn.js +0 -8
- package/dist/packem_shared/redent-DSb1IJWn.js +0 -8
- package/dist/packem_shared/replaceString-Ce8X2ZQ-.js +0 -192
- package/dist/packem_shared/stripIndent-D_TRjxZ_.js +0 -20
- package/dist/packem_shared/transliterate-CKt9VK7D.js +0 -47756
- package/dist/packem_shared/types.d-BVNv675q.d.ts +0 -61
- package/dist/packem_shared/types.d-DfgbcNKh.d.ts +0 -57
|
@@ -1,1502 +0,0 @@
|
|
|
1
|
-
import { truncate } from '../truncate.js';
|
|
2
|
-
|
|
3
|
-
function getDefaultExportFromCjs(x) {
|
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
var rfdc_1;
|
|
8
|
-
var hasRequiredRfdc;
|
|
9
|
-
|
|
10
|
-
function requireRfdc () {
|
|
11
|
-
if (hasRequiredRfdc) return rfdc_1;
|
|
12
|
-
hasRequiredRfdc = 1;
|
|
13
|
-
rfdc_1 = rfdc;
|
|
14
|
-
function copyBuffer(cur) {
|
|
15
|
-
if (cur instanceof Buffer) {
|
|
16
|
-
return Buffer.from(cur);
|
|
17
|
-
}
|
|
18
|
-
return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
|
|
19
|
-
}
|
|
20
|
-
function rfdc(opts) {
|
|
21
|
-
opts = opts || {};
|
|
22
|
-
if (opts.circles) return rfdcCircles(opts);
|
|
23
|
-
const constructorHandlers = /* @__PURE__ */ new Map();
|
|
24
|
-
constructorHandlers.set(Date, (o) => new Date(o));
|
|
25
|
-
constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
|
|
26
|
-
constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
|
|
27
|
-
if (opts.constructorHandlers) {
|
|
28
|
-
for (const handler2 of opts.constructorHandlers) {
|
|
29
|
-
constructorHandlers.set(handler2[0], handler2[1]);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
let handler = null;
|
|
33
|
-
return opts.proto ? cloneProto : clone;
|
|
34
|
-
function cloneArray(a, fn) {
|
|
35
|
-
const keys = Object.keys(a);
|
|
36
|
-
const a2 = new Array(keys.length);
|
|
37
|
-
for (let i = 0; i < keys.length; i++) {
|
|
38
|
-
const k = keys[i];
|
|
39
|
-
const cur = a[k];
|
|
40
|
-
if (typeof cur !== "object" || cur === null) {
|
|
41
|
-
a2[k] = cur;
|
|
42
|
-
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
|
|
43
|
-
a2[k] = handler(cur, fn);
|
|
44
|
-
} else if (ArrayBuffer.isView(cur)) {
|
|
45
|
-
a2[k] = copyBuffer(cur);
|
|
46
|
-
} else {
|
|
47
|
-
a2[k] = fn(cur);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return a2;
|
|
51
|
-
}
|
|
52
|
-
function clone(o) {
|
|
53
|
-
if (typeof o !== "object" || o === null) return o;
|
|
54
|
-
if (Array.isArray(o)) return cloneArray(o, clone);
|
|
55
|
-
if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
|
|
56
|
-
return handler(o, clone);
|
|
57
|
-
}
|
|
58
|
-
const o2 = {};
|
|
59
|
-
for (const k in o) {
|
|
60
|
-
if (Object.hasOwnProperty.call(o, k) === false) continue;
|
|
61
|
-
const cur = o[k];
|
|
62
|
-
if (typeof cur !== "object" || cur === null) {
|
|
63
|
-
o2[k] = cur;
|
|
64
|
-
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
|
|
65
|
-
o2[k] = handler(cur, clone);
|
|
66
|
-
} else if (ArrayBuffer.isView(cur)) {
|
|
67
|
-
o2[k] = copyBuffer(cur);
|
|
68
|
-
} else {
|
|
69
|
-
o2[k] = clone(cur);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return o2;
|
|
73
|
-
}
|
|
74
|
-
function cloneProto(o) {
|
|
75
|
-
if (typeof o !== "object" || o === null) return o;
|
|
76
|
-
if (Array.isArray(o)) return cloneArray(o, cloneProto);
|
|
77
|
-
if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
|
|
78
|
-
return handler(o, cloneProto);
|
|
79
|
-
}
|
|
80
|
-
const o2 = {};
|
|
81
|
-
for (const k in o) {
|
|
82
|
-
const cur = o[k];
|
|
83
|
-
if (typeof cur !== "object" || cur === null) {
|
|
84
|
-
o2[k] = cur;
|
|
85
|
-
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
|
|
86
|
-
o2[k] = handler(cur, cloneProto);
|
|
87
|
-
} else if (ArrayBuffer.isView(cur)) {
|
|
88
|
-
o2[k] = copyBuffer(cur);
|
|
89
|
-
} else {
|
|
90
|
-
o2[k] = cloneProto(cur);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return o2;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
function rfdcCircles(opts) {
|
|
97
|
-
const refs = [];
|
|
98
|
-
const refsNew = [];
|
|
99
|
-
const constructorHandlers = /* @__PURE__ */ new Map();
|
|
100
|
-
constructorHandlers.set(Date, (o) => new Date(o));
|
|
101
|
-
constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
|
|
102
|
-
constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
|
|
103
|
-
if (opts.constructorHandlers) {
|
|
104
|
-
for (const handler2 of opts.constructorHandlers) {
|
|
105
|
-
constructorHandlers.set(handler2[0], handler2[1]);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
let handler = null;
|
|
109
|
-
return opts.proto ? cloneProto : clone;
|
|
110
|
-
function cloneArray(a, fn) {
|
|
111
|
-
const keys = Object.keys(a);
|
|
112
|
-
const a2 = new Array(keys.length);
|
|
113
|
-
for (let i = 0; i < keys.length; i++) {
|
|
114
|
-
const k = keys[i];
|
|
115
|
-
const cur = a[k];
|
|
116
|
-
if (typeof cur !== "object" || cur === null) {
|
|
117
|
-
a2[k] = cur;
|
|
118
|
-
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
|
|
119
|
-
a2[k] = handler(cur, fn);
|
|
120
|
-
} else if (ArrayBuffer.isView(cur)) {
|
|
121
|
-
a2[k] = copyBuffer(cur);
|
|
122
|
-
} else {
|
|
123
|
-
const index = refs.indexOf(cur);
|
|
124
|
-
if (index !== -1) {
|
|
125
|
-
a2[k] = refsNew[index];
|
|
126
|
-
} else {
|
|
127
|
-
a2[k] = fn(cur);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return a2;
|
|
132
|
-
}
|
|
133
|
-
function clone(o) {
|
|
134
|
-
if (typeof o !== "object" || o === null) return o;
|
|
135
|
-
if (Array.isArray(o)) return cloneArray(o, clone);
|
|
136
|
-
if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
|
|
137
|
-
return handler(o, clone);
|
|
138
|
-
}
|
|
139
|
-
const o2 = {};
|
|
140
|
-
refs.push(o);
|
|
141
|
-
refsNew.push(o2);
|
|
142
|
-
for (const k in o) {
|
|
143
|
-
if (Object.hasOwnProperty.call(o, k) === false) continue;
|
|
144
|
-
const cur = o[k];
|
|
145
|
-
if (typeof cur !== "object" || cur === null) {
|
|
146
|
-
o2[k] = cur;
|
|
147
|
-
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
|
|
148
|
-
o2[k] = handler(cur, clone);
|
|
149
|
-
} else if (ArrayBuffer.isView(cur)) {
|
|
150
|
-
o2[k] = copyBuffer(cur);
|
|
151
|
-
} else {
|
|
152
|
-
const i = refs.indexOf(cur);
|
|
153
|
-
if (i !== -1) {
|
|
154
|
-
o2[k] = refsNew[i];
|
|
155
|
-
} else {
|
|
156
|
-
o2[k] = clone(cur);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
refs.pop();
|
|
161
|
-
refsNew.pop();
|
|
162
|
-
return o2;
|
|
163
|
-
}
|
|
164
|
-
function cloneProto(o) {
|
|
165
|
-
if (typeof o !== "object" || o === null) return o;
|
|
166
|
-
if (Array.isArray(o)) return cloneArray(o, cloneProto);
|
|
167
|
-
if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
|
|
168
|
-
return handler(o, cloneProto);
|
|
169
|
-
}
|
|
170
|
-
const o2 = {};
|
|
171
|
-
refs.push(o);
|
|
172
|
-
refsNew.push(o2);
|
|
173
|
-
for (const k in o) {
|
|
174
|
-
const cur = o[k];
|
|
175
|
-
if (typeof cur !== "object" || cur === null) {
|
|
176
|
-
o2[k] = cur;
|
|
177
|
-
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
|
|
178
|
-
o2[k] = handler(cur, cloneProto);
|
|
179
|
-
} else if (ArrayBuffer.isView(cur)) {
|
|
180
|
-
o2[k] = copyBuffer(cur);
|
|
181
|
-
} else {
|
|
182
|
-
const i = refs.indexOf(cur);
|
|
183
|
-
if (i !== -1) {
|
|
184
|
-
o2[k] = refsNew[i];
|
|
185
|
-
} else {
|
|
186
|
-
o2[k] = cloneProto(cur);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
refs.pop();
|
|
191
|
-
refsNew.pop();
|
|
192
|
-
return o2;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
return rfdc_1;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
var rfdcExports = requireRfdc();
|
|
199
|
-
const I = /*@__PURE__*/getDefaultExportFromCjs(rfdcExports);
|
|
200
|
-
|
|
201
|
-
I();
|
|
202
|
-
function u(t) {
|
|
203
|
-
if (t == null || typeof t != "object") return false;
|
|
204
|
-
let e = Object.getPrototypeOf(t);
|
|
205
|
-
return e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null ? false : !(Symbol.iterator in t) && !(Symbol.toStringTag in t);
|
|
206
|
-
}
|
|
207
|
-
function r(t) {
|
|
208
|
-
return typeof t == "string";
|
|
209
|
-
}
|
|
210
|
-
function W(t) {
|
|
211
|
-
return Number.isFinite(t);
|
|
212
|
-
}
|
|
213
|
-
function q$1(t) {
|
|
214
|
-
return Number.isSafeInteger(t) && t >= 0;
|
|
215
|
-
}
|
|
216
|
-
function G$1(t) {
|
|
217
|
-
return t != null;
|
|
218
|
-
}
|
|
219
|
-
function v(t, e) {
|
|
220
|
-
return u(t) && r(e) && e in t;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
224
|
-
|
|
225
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
226
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
227
|
-
|
|
228
|
-
var Symbol$1 = root.Symbol;
|
|
229
|
-
|
|
230
|
-
var objectProto$4 = Object.prototype;
|
|
231
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
232
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
233
|
-
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
234
|
-
function getRawTag(value) {
|
|
235
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
236
|
-
try {
|
|
237
|
-
value[symToStringTag$1] = void 0;
|
|
238
|
-
var unmasked = true;
|
|
239
|
-
} catch (e) {
|
|
240
|
-
}
|
|
241
|
-
var result = nativeObjectToString$1.call(value);
|
|
242
|
-
if (unmasked) {
|
|
243
|
-
if (isOwn) {
|
|
244
|
-
value[symToStringTag$1] = tag;
|
|
245
|
-
} else {
|
|
246
|
-
delete value[symToStringTag$1];
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return result;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
var objectProto$3 = Object.prototype;
|
|
253
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
254
|
-
function objectToString(value) {
|
|
255
|
-
return nativeObjectToString.call(value);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
var nullTag = "[object Null]";
|
|
259
|
-
var undefinedTag = "[object Undefined]";
|
|
260
|
-
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
261
|
-
function baseGetTag(value) {
|
|
262
|
-
if (value == null) {
|
|
263
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
264
|
-
}
|
|
265
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
function isObjectLike(value) {
|
|
269
|
-
return value != null && typeof value == "object";
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
var symbolTag = "[object Symbol]";
|
|
273
|
-
function isSymbol(value) {
|
|
274
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
function arrayMap(array, iteratee) {
|
|
278
|
-
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
279
|
-
while (++index < length) {
|
|
280
|
-
result[index] = iteratee(array[index], index, array);
|
|
281
|
-
}
|
|
282
|
-
return result;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
var isArray = Array.isArray;
|
|
286
|
-
|
|
287
|
-
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0;
|
|
288
|
-
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
289
|
-
function baseToString(value) {
|
|
290
|
-
if (typeof value == "string") {
|
|
291
|
-
return value;
|
|
292
|
-
}
|
|
293
|
-
if (isArray(value)) {
|
|
294
|
-
return arrayMap(value, baseToString) + "";
|
|
295
|
-
}
|
|
296
|
-
if (isSymbol(value)) {
|
|
297
|
-
return symbolToString ? symbolToString.call(value) : "";
|
|
298
|
-
}
|
|
299
|
-
var result = value + "";
|
|
300
|
-
return result == "0" && 1 / value == -Infinity ? "-0" : result;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
var reWhitespace = /\s/;
|
|
304
|
-
function trimmedEndIndex(string) {
|
|
305
|
-
var index = string.length;
|
|
306
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
307
|
-
}
|
|
308
|
-
return index;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
var reTrimStart = /^\s+/;
|
|
312
|
-
function baseTrim(string) {
|
|
313
|
-
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
function isObject(value) {
|
|
317
|
-
var type = typeof value;
|
|
318
|
-
return value != null && (type == "object" || type == "function");
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
function identity(value) {
|
|
322
|
-
return value;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
var asyncTag = "[object AsyncFunction]";
|
|
326
|
-
var funcTag = "[object Function]";
|
|
327
|
-
var genTag = "[object GeneratorFunction]";
|
|
328
|
-
var proxyTag = "[object Proxy]";
|
|
329
|
-
function isFunction(value) {
|
|
330
|
-
if (!isObject(value)) {
|
|
331
|
-
return false;
|
|
332
|
-
}
|
|
333
|
-
var tag = baseGetTag(value);
|
|
334
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
var coreJsData = root["__core-js_shared__"];
|
|
338
|
-
|
|
339
|
-
var maskSrcKey = (function() {
|
|
340
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
341
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
342
|
-
})();
|
|
343
|
-
function isMasked(func) {
|
|
344
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
var funcProto$1 = Function.prototype;
|
|
348
|
-
var funcToString$1 = funcProto$1.toString;
|
|
349
|
-
function toSource(func) {
|
|
350
|
-
if (func != null) {
|
|
351
|
-
try {
|
|
352
|
-
return funcToString$1.call(func);
|
|
353
|
-
} catch (e) {
|
|
354
|
-
}
|
|
355
|
-
try {
|
|
356
|
-
return func + "";
|
|
357
|
-
} catch (e) {
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
return "";
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
364
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
365
|
-
var funcProto = Function.prototype;
|
|
366
|
-
var objectProto$2 = Object.prototype;
|
|
367
|
-
var funcToString = funcProto.toString;
|
|
368
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
369
|
-
var reIsNative = RegExp(
|
|
370
|
-
"^" + funcToString.call(hasOwnProperty$2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
371
|
-
);
|
|
372
|
-
function baseIsNative(value) {
|
|
373
|
-
if (!isObject(value) || isMasked(value)) {
|
|
374
|
-
return false;
|
|
375
|
-
}
|
|
376
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
377
|
-
return pattern.test(toSource(value));
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
function getValue(object, key) {
|
|
381
|
-
return object == null ? void 0 : object[key];
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
function getNative(object, key) {
|
|
385
|
-
var value = getValue(object, key);
|
|
386
|
-
return baseIsNative(value) ? value : void 0;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
function apply(func, thisArg, args) {
|
|
390
|
-
switch (args.length) {
|
|
391
|
-
case 0:
|
|
392
|
-
return func.call(thisArg);
|
|
393
|
-
case 1:
|
|
394
|
-
return func.call(thisArg, args[0]);
|
|
395
|
-
case 2:
|
|
396
|
-
return func.call(thisArg, args[0], args[1]);
|
|
397
|
-
case 3:
|
|
398
|
-
return func.call(thisArg, args[0], args[1], args[2]);
|
|
399
|
-
}
|
|
400
|
-
return func.apply(thisArg, args);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
var HOT_COUNT = 800;
|
|
404
|
-
var HOT_SPAN = 16;
|
|
405
|
-
var nativeNow = Date.now;
|
|
406
|
-
function shortOut(func) {
|
|
407
|
-
var count = 0, lastCalled = 0;
|
|
408
|
-
return function() {
|
|
409
|
-
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
|
410
|
-
lastCalled = stamp;
|
|
411
|
-
if (remaining > 0) {
|
|
412
|
-
if (++count >= HOT_COUNT) {
|
|
413
|
-
return arguments[0];
|
|
414
|
-
}
|
|
415
|
-
} else {
|
|
416
|
-
count = 0;
|
|
417
|
-
}
|
|
418
|
-
return func.apply(void 0, arguments);
|
|
419
|
-
};
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
function constant(value) {
|
|
423
|
-
return function() {
|
|
424
|
-
return value;
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
var defineProperty = (function() {
|
|
429
|
-
try {
|
|
430
|
-
var func = getNative(Object, "defineProperty");
|
|
431
|
-
func({}, "", {});
|
|
432
|
-
return func;
|
|
433
|
-
} catch (e) {
|
|
434
|
-
}
|
|
435
|
-
})();
|
|
436
|
-
|
|
437
|
-
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
438
|
-
return defineProperty(func, "toString", {
|
|
439
|
-
"configurable": true,
|
|
440
|
-
"enumerable": false,
|
|
441
|
-
"value": constant(string),
|
|
442
|
-
"writable": true
|
|
443
|
-
});
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
var setToString = shortOut(baseSetToString);
|
|
447
|
-
|
|
448
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
449
|
-
var length = array.length, index = fromIndex + (-1);
|
|
450
|
-
while (++index < length) {
|
|
451
|
-
if (predicate(array[index], index, array)) {
|
|
452
|
-
return index;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
return -1;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
function baseIsNaN(value) {
|
|
459
|
-
return value !== value;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
function strictIndexOf(array, value, fromIndex) {
|
|
463
|
-
var index = fromIndex - 1, length = array.length;
|
|
464
|
-
while (++index < length) {
|
|
465
|
-
if (array[index] === value) {
|
|
466
|
-
return index;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
return -1;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
473
|
-
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
function arrayIncludes(array, value) {
|
|
477
|
-
var length = array == null ? 0 : array.length;
|
|
478
|
-
return !!length && baseIndexOf(array, value, 0) > -1;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
function eq(value, other) {
|
|
482
|
-
return value === other || value !== value && other !== other;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
var nativeMax = Math.max;
|
|
486
|
-
function overRest(func, start, transform) {
|
|
487
|
-
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
488
|
-
return function() {
|
|
489
|
-
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
|
|
490
|
-
while (++index < length) {
|
|
491
|
-
array[index] = args[start + index];
|
|
492
|
-
}
|
|
493
|
-
index = -1;
|
|
494
|
-
var otherArgs = Array(start + 1);
|
|
495
|
-
while (++index < start) {
|
|
496
|
-
otherArgs[index] = args[index];
|
|
497
|
-
}
|
|
498
|
-
otherArgs[start] = transform(array);
|
|
499
|
-
return apply(func, this, otherArgs);
|
|
500
|
-
};
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
function baseRest(func, start) {
|
|
504
|
-
return setToString(overRest(func, start, identity), func + "");
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
508
|
-
function isLength(value) {
|
|
509
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
function isArrayLike(value) {
|
|
513
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
var nativeCreate = getNative(Object, "create");
|
|
517
|
-
|
|
518
|
-
function hashClear() {
|
|
519
|
-
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
520
|
-
this.size = 0;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
function hashDelete(key) {
|
|
524
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
525
|
-
this.size -= result ? 1 : 0;
|
|
526
|
-
return result;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
530
|
-
var objectProto$1 = Object.prototype;
|
|
531
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
532
|
-
function hashGet(key) {
|
|
533
|
-
var data = this.__data__;
|
|
534
|
-
if (nativeCreate) {
|
|
535
|
-
var result = data[key];
|
|
536
|
-
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
537
|
-
}
|
|
538
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
var objectProto = Object.prototype;
|
|
542
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
543
|
-
function hashHas(key) {
|
|
544
|
-
var data = this.__data__;
|
|
545
|
-
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
549
|
-
function hashSet(key, value) {
|
|
550
|
-
var data = this.__data__;
|
|
551
|
-
this.size += this.has(key) ? 0 : 1;
|
|
552
|
-
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
|
|
553
|
-
return this;
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
function Hash(entries) {
|
|
557
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
558
|
-
this.clear();
|
|
559
|
-
while (++index < length) {
|
|
560
|
-
var entry = entries[index];
|
|
561
|
-
this.set(entry[0], entry[1]);
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
Hash.prototype.clear = hashClear;
|
|
565
|
-
Hash.prototype["delete"] = hashDelete;
|
|
566
|
-
Hash.prototype.get = hashGet;
|
|
567
|
-
Hash.prototype.has = hashHas;
|
|
568
|
-
Hash.prototype.set = hashSet;
|
|
569
|
-
|
|
570
|
-
function listCacheClear() {
|
|
571
|
-
this.__data__ = [];
|
|
572
|
-
this.size = 0;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
function assocIndexOf(array, key) {
|
|
576
|
-
var length = array.length;
|
|
577
|
-
while (length--) {
|
|
578
|
-
if (eq(array[length][0], key)) {
|
|
579
|
-
return length;
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
return -1;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
var arrayProto = Array.prototype;
|
|
586
|
-
var splice = arrayProto.splice;
|
|
587
|
-
function listCacheDelete(key) {
|
|
588
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
589
|
-
if (index < 0) {
|
|
590
|
-
return false;
|
|
591
|
-
}
|
|
592
|
-
var lastIndex = data.length - 1;
|
|
593
|
-
if (index == lastIndex) {
|
|
594
|
-
data.pop();
|
|
595
|
-
} else {
|
|
596
|
-
splice.call(data, index, 1);
|
|
597
|
-
}
|
|
598
|
-
--this.size;
|
|
599
|
-
return true;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
function listCacheGet(key) {
|
|
603
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
604
|
-
return index < 0 ? void 0 : data[index][1];
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
function listCacheHas(key) {
|
|
608
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
function listCacheSet(key, value) {
|
|
612
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
613
|
-
if (index < 0) {
|
|
614
|
-
++this.size;
|
|
615
|
-
data.push([key, value]);
|
|
616
|
-
} else {
|
|
617
|
-
data[index][1] = value;
|
|
618
|
-
}
|
|
619
|
-
return this;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
function ListCache(entries) {
|
|
623
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
624
|
-
this.clear();
|
|
625
|
-
while (++index < length) {
|
|
626
|
-
var entry = entries[index];
|
|
627
|
-
this.set(entry[0], entry[1]);
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
ListCache.prototype.clear = listCacheClear;
|
|
631
|
-
ListCache.prototype["delete"] = listCacheDelete;
|
|
632
|
-
ListCache.prototype.get = listCacheGet;
|
|
633
|
-
ListCache.prototype.has = listCacheHas;
|
|
634
|
-
ListCache.prototype.set = listCacheSet;
|
|
635
|
-
|
|
636
|
-
var Map$1 = getNative(root, "Map");
|
|
637
|
-
|
|
638
|
-
function mapCacheClear() {
|
|
639
|
-
this.size = 0;
|
|
640
|
-
this.__data__ = {
|
|
641
|
-
"hash": new Hash(),
|
|
642
|
-
"map": new (Map$1 || ListCache)(),
|
|
643
|
-
"string": new Hash()
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
function isKeyable(value) {
|
|
648
|
-
var type = typeof value;
|
|
649
|
-
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
function getMapData(map, key) {
|
|
653
|
-
var data = map.__data__;
|
|
654
|
-
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
function mapCacheDelete(key) {
|
|
658
|
-
var result = getMapData(this, key)["delete"](key);
|
|
659
|
-
this.size -= result ? 1 : 0;
|
|
660
|
-
return result;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
function mapCacheGet(key) {
|
|
664
|
-
return getMapData(this, key).get(key);
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
function mapCacheHas(key) {
|
|
668
|
-
return getMapData(this, key).has(key);
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
function mapCacheSet(key, value) {
|
|
672
|
-
var data = getMapData(this, key), size = data.size;
|
|
673
|
-
data.set(key, value);
|
|
674
|
-
this.size += data.size == size ? 0 : 1;
|
|
675
|
-
return this;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
function MapCache(entries) {
|
|
679
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
680
|
-
this.clear();
|
|
681
|
-
while (++index < length) {
|
|
682
|
-
var entry = entries[index];
|
|
683
|
-
this.set(entry[0], entry[1]);
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
MapCache.prototype.clear = mapCacheClear;
|
|
687
|
-
MapCache.prototype["delete"] = mapCacheDelete;
|
|
688
|
-
MapCache.prototype.get = mapCacheGet;
|
|
689
|
-
MapCache.prototype.has = mapCacheHas;
|
|
690
|
-
MapCache.prototype.set = mapCacheSet;
|
|
691
|
-
|
|
692
|
-
function toString(value) {
|
|
693
|
-
return value == null ? "" : baseToString(value);
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
function baseSlice(array, start, end) {
|
|
697
|
-
var index = -1, length = array.length;
|
|
698
|
-
if (start < 0) {
|
|
699
|
-
start = -start > length ? 0 : length + start;
|
|
700
|
-
}
|
|
701
|
-
end = end > length ? length : end;
|
|
702
|
-
if (end < 0) {
|
|
703
|
-
end += length;
|
|
704
|
-
}
|
|
705
|
-
length = start > end ? 0 : end - start >>> 0;
|
|
706
|
-
start >>>= 0;
|
|
707
|
-
var result = Array(length);
|
|
708
|
-
while (++index < length) {
|
|
709
|
-
result[index] = array[index + start];
|
|
710
|
-
}
|
|
711
|
-
return result;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
function castSlice(array, start, end) {
|
|
715
|
-
var length = array.length;
|
|
716
|
-
end = end === void 0 ? length : end;
|
|
717
|
-
return !start && end >= length ? array : baseSlice(array, start, end);
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
var rsAstralRange$1 = "\\ud800-\\udfff";
|
|
721
|
-
var rsComboMarksRange$1 = "\\u0300-\\u036f";
|
|
722
|
-
var reComboHalfMarksRange$1 = "\\ufe20-\\ufe2f";
|
|
723
|
-
var rsComboSymbolsRange$1 = "\\u20d0-\\u20ff";
|
|
724
|
-
var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
|
|
725
|
-
var rsVarRange$1 = "\\ufe0e\\ufe0f";
|
|
726
|
-
var rsZWJ$1 = "\\u200d";
|
|
727
|
-
var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
|
|
728
|
-
function hasUnicode(string) {
|
|
729
|
-
return reHasUnicode.test(string);
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
function asciiToArray(string) {
|
|
733
|
-
return string.split("");
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
var rsAstralRange = "\\ud800-\\udfff";
|
|
737
|
-
var rsComboMarksRange = "\\u0300-\\u036f";
|
|
738
|
-
var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
|
|
739
|
-
var rsComboSymbolsRange = "\\u20d0-\\u20ff";
|
|
740
|
-
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
|
|
741
|
-
var rsVarRange = "\\ufe0e\\ufe0f";
|
|
742
|
-
var rsAstral = "[" + rsAstralRange + "]";
|
|
743
|
-
var rsCombo = "[" + rsComboRange + "]";
|
|
744
|
-
var rsFitz = "\\ud83c[\\udffb-\\udfff]";
|
|
745
|
-
var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
|
|
746
|
-
var rsNonAstral = "[^" + rsAstralRange + "]";
|
|
747
|
-
var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
748
|
-
var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
749
|
-
var rsZWJ = "\\u200d";
|
|
750
|
-
var reOptMod = rsModifier + "?";
|
|
751
|
-
var rsOptVar = "[" + rsVarRange + "]?";
|
|
752
|
-
var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
|
|
753
|
-
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
|
|
754
|
-
var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
|
|
755
|
-
var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
|
|
756
|
-
function unicodeToArray(string) {
|
|
757
|
-
return string.match(reUnicode) || [];
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
function stringToArray(string) {
|
|
761
|
-
return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
765
|
-
function setCacheAdd(value) {
|
|
766
|
-
this.__data__.set(value, HASH_UNDEFINED);
|
|
767
|
-
return this;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
function setCacheHas(value) {
|
|
771
|
-
return this.__data__.has(value);
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
function SetCache(values) {
|
|
775
|
-
var index = -1, length = values == null ? 0 : values.length;
|
|
776
|
-
this.__data__ = new MapCache();
|
|
777
|
-
while (++index < length) {
|
|
778
|
-
this.add(values[index]);
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
782
|
-
SetCache.prototype.has = setCacheHas;
|
|
783
|
-
|
|
784
|
-
function cacheHas(cache, key) {
|
|
785
|
-
return cache.has(key);
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
function isArrayLikeObject(value) {
|
|
789
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
793
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
794
|
-
var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length;
|
|
795
|
-
if (!length) {
|
|
796
|
-
return result;
|
|
797
|
-
}
|
|
798
|
-
if (values.length >= LARGE_ARRAY_SIZE) {
|
|
799
|
-
includes = cacheHas;
|
|
800
|
-
isCommon = false;
|
|
801
|
-
values = new SetCache(values);
|
|
802
|
-
}
|
|
803
|
-
outer:
|
|
804
|
-
while (++index < length) {
|
|
805
|
-
var value = array[index], computed = value ;
|
|
806
|
-
value = value !== 0 ? value : 0;
|
|
807
|
-
if (isCommon && computed === computed) {
|
|
808
|
-
var valuesIndex = valuesLength;
|
|
809
|
-
while (valuesIndex--) {
|
|
810
|
-
if (values[valuesIndex] === computed) {
|
|
811
|
-
continue outer;
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
result.push(value);
|
|
815
|
-
} else if (!includes(values, computed, comparator)) {
|
|
816
|
-
result.push(value);
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
return result;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
function charsEndIndex(strSymbols, chrSymbols) {
|
|
823
|
-
var index = strSymbols.length;
|
|
824
|
-
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
|
|
825
|
-
}
|
|
826
|
-
return index;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
function charsStartIndex(strSymbols, chrSymbols) {
|
|
830
|
-
var index = -1, length = strSymbols.length;
|
|
831
|
-
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
|
|
832
|
-
}
|
|
833
|
-
return index;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
function trim(string, chars, guard) {
|
|
837
|
-
string = toString(string);
|
|
838
|
-
if (string && (chars === void 0)) {
|
|
839
|
-
return baseTrim(string);
|
|
840
|
-
}
|
|
841
|
-
if (!string || !(chars = baseToString(chars))) {
|
|
842
|
-
return string;
|
|
843
|
-
}
|
|
844
|
-
var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
|
|
845
|
-
return castSlice(strSymbols, start, end).join("");
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
var without = baseRest(function(array, values) {
|
|
849
|
-
return isArrayLikeObject(array) ? baseDifference(array, values) : [];
|
|
850
|
-
});
|
|
851
|
-
|
|
852
|
-
var __assign$1 = function() {
|
|
853
|
-
__assign$1 = Object.assign || function(t) {
|
|
854
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
855
|
-
s = arguments[i];
|
|
856
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
857
|
-
t[p] = s[p];
|
|
858
|
-
}
|
|
859
|
-
return t;
|
|
860
|
-
};
|
|
861
|
-
return __assign$1.apply(this, arguments);
|
|
862
|
-
};
|
|
863
|
-
var pairDivider = "~";
|
|
864
|
-
var blockDivider = "~~";
|
|
865
|
-
function generateNamedReferences(input, prev) {
|
|
866
|
-
var entities = {};
|
|
867
|
-
var characters = {};
|
|
868
|
-
var blocks = input.split(blockDivider);
|
|
869
|
-
var isOptionalBlock = false;
|
|
870
|
-
for (var i = 0; blocks.length > i; i++) {
|
|
871
|
-
var entries = blocks[i].split(pairDivider);
|
|
872
|
-
for (var j = 0; j < entries.length; j += 2) {
|
|
873
|
-
var entity = entries[j];
|
|
874
|
-
var character = entries[j + 1];
|
|
875
|
-
var fullEntity = "&" + entity + ";";
|
|
876
|
-
entities[fullEntity] = character;
|
|
877
|
-
if (isOptionalBlock) {
|
|
878
|
-
entities["&" + entity] = character;
|
|
879
|
-
}
|
|
880
|
-
characters[character] = fullEntity;
|
|
881
|
-
}
|
|
882
|
-
isOptionalBlock = true;
|
|
883
|
-
}
|
|
884
|
-
return prev ? { entities: __assign$1(__assign$1({}, entities), prev.entities), characters: __assign$1(__assign$1({}, characters), prev.characters) } : { entities, characters };
|
|
885
|
-
}
|
|
886
|
-
var bodyRegExps = {
|
|
887
|
-
xml: /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,
|
|
888
|
-
html4: /∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,
|
|
889
|
-
html5: /·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g
|
|
890
|
-
};
|
|
891
|
-
var namedReferences = {};
|
|
892
|
-
namedReferences["xml"] = generateNamedReferences(`lt~<~gt~>~quot~"~apos~'~amp~&`);
|
|
893
|
-
namedReferences["html4"] = generateNamedReferences(`apos~'~OElig~Œ~oelig~œ~Scaron~Š~scaron~š~Yuml~Ÿ~circ~ˆ~tilde~˜~ensp~ ~emsp~ ~thinsp~ ~zwnj~~zwj~~lrm~~rlm~~ndash~–~mdash~—~lsquo~‘~rsquo~’~sbquo~‚~ldquo~“~rdquo~”~bdquo~„~dagger~†~Dagger~‡~permil~‰~lsaquo~‹~rsaquo~›~euro~€~fnof~ƒ~Alpha~Α~Beta~Β~Gamma~Γ~Delta~Δ~Epsilon~Ε~Zeta~Ζ~Eta~Η~Theta~Θ~Iota~Ι~Kappa~Κ~Lambda~Λ~Mu~Μ~Nu~Ν~Xi~Ξ~Omicron~Ο~Pi~Π~Rho~Ρ~Sigma~Σ~Tau~Τ~Upsilon~Υ~Phi~Φ~Chi~Χ~Psi~Ψ~Omega~Ω~alpha~α~beta~β~gamma~γ~delta~δ~epsilon~ε~zeta~ζ~eta~η~theta~θ~iota~ι~kappa~κ~lambda~λ~mu~μ~nu~ν~xi~ξ~omicron~ο~pi~π~rho~ρ~sigmaf~ς~sigma~σ~tau~τ~upsilon~υ~phi~φ~chi~χ~psi~ψ~omega~ω~thetasym~ϑ~upsih~ϒ~piv~ϖ~bull~•~hellip~…~prime~′~Prime~″~oline~‾~frasl~⁄~weierp~℘~image~ℑ~real~ℜ~trade~™~alefsym~ℵ~larr~←~uarr~↑~rarr~→~darr~↓~harr~↔~crarr~↵~lArr~⇐~uArr~⇑~rArr~⇒~dArr~⇓~hArr~⇔~forall~∀~part~∂~exist~∃~empty~∅~nabla~∇~isin~∈~notin~∉~ni~∋~prod~∏~sum~∑~minus~−~lowast~∗~radic~√~prop~∝~infin~∞~ang~∠~and~∧~or~∨~cap~∩~cup~∪~int~∫~there4~∴~sim~∼~cong~≅~asymp~≈~ne~≠~equiv~≡~le~≤~ge~≥~sub~⊂~sup~⊃~nsub~⊄~sube~⊆~supe~⊇~oplus~⊕~otimes~⊗~perp~⊥~sdot~⋅~lceil~⌈~rceil~⌉~lfloor~⌊~rfloor~⌋~lang~〈~rang~〉~loz~◊~spades~♠~clubs~♣~hearts~♥~diams~♦~~nbsp~ ~iexcl~¡~cent~¢~pound~£~curren~¤~yen~¥~brvbar~¦~sect~§~uml~¨~copy~©~ordf~ª~laquo~«~not~¬~shy~~reg~®~macr~¯~deg~°~plusmn~±~sup2~²~sup3~³~acute~´~micro~µ~para~¶~middot~·~cedil~¸~sup1~¹~ordm~º~raquo~»~frac14~¼~frac12~½~frac34~¾~iquest~¿~Agrave~À~Aacute~Á~Acirc~Â~Atilde~Ã~Auml~Ä~Aring~Å~AElig~Æ~Ccedil~Ç~Egrave~È~Eacute~É~Ecirc~Ê~Euml~Ë~Igrave~Ì~Iacute~Í~Icirc~Î~Iuml~Ï~ETH~Ð~Ntilde~Ñ~Ograve~Ò~Oacute~Ó~Ocirc~Ô~Otilde~Õ~Ouml~Ö~times~×~Oslash~Ø~Ugrave~Ù~Uacute~Ú~Ucirc~Û~Uuml~Ü~Yacute~Ý~THORN~Þ~szlig~ß~agrave~à~aacute~á~acirc~â~atilde~ã~auml~ä~aring~å~aelig~æ~ccedil~ç~egrave~è~eacute~é~ecirc~ê~euml~ë~igrave~ì~iacute~í~icirc~î~iuml~ï~eth~ð~ntilde~ñ~ograve~ò~oacute~ó~ocirc~ô~otilde~õ~ouml~ö~divide~÷~oslash~ø~ugrave~ù~uacute~ú~ucirc~û~uuml~ü~yacute~ý~thorn~þ~yuml~ÿ~quot~"~amp~&~lt~<~gt~>`);
|
|
894
|
-
namedReferences["html5"] = generateNamedReferences('Abreve~Ă~Acy~А~Afr~𝔄~Amacr~Ā~And~⩓~Aogon~Ą~Aopf~𝔸~ApplyFunction~~Ascr~𝒜~Assign~≔~Backslash~∖~Barv~⫧~Barwed~⌆~Bcy~Б~Because~∵~Bernoullis~ℬ~Bfr~𝔅~Bopf~𝔹~Breve~˘~Bscr~ℬ~Bumpeq~≎~CHcy~Ч~Cacute~Ć~Cap~⋒~CapitalDifferentialD~ⅅ~Cayleys~ℭ~Ccaron~Č~Ccirc~Ĉ~Cconint~∰~Cdot~Ċ~Cedilla~¸~CenterDot~·~Cfr~ℭ~CircleDot~⊙~CircleMinus~⊖~CirclePlus~⊕~CircleTimes~⊗~ClockwiseContourIntegral~∲~CloseCurlyDoubleQuote~”~CloseCurlyQuote~’~Colon~∷~Colone~⩴~Congruent~≡~Conint~∯~ContourIntegral~∮~Copf~ℂ~Coproduct~∐~CounterClockwiseContourIntegral~∳~Cross~⨯~Cscr~𝒞~Cup~⋓~CupCap~≍~DD~ⅅ~DDotrahd~⤑~DJcy~Ђ~DScy~Ѕ~DZcy~Џ~Darr~↡~Dashv~⫤~Dcaron~Ď~Dcy~Д~Del~∇~Dfr~𝔇~DiacriticalAcute~´~DiacriticalDot~˙~DiacriticalDoubleAcute~˝~DiacriticalGrave~`~DiacriticalTilde~˜~Diamond~⋄~DifferentialD~ⅆ~Dopf~𝔻~Dot~¨~DotDot~⃜~DotEqual~≐~DoubleContourIntegral~∯~DoubleDot~¨~DoubleDownArrow~⇓~DoubleLeftArrow~⇐~DoubleLeftRightArrow~⇔~DoubleLeftTee~⫤~DoubleLongLeftArrow~⟸~DoubleLongLeftRightArrow~⟺~DoubleLongRightArrow~⟹~DoubleRightArrow~⇒~DoubleRightTee~⊨~DoubleUpArrow~⇑~DoubleUpDownArrow~⇕~DoubleVerticalBar~∥~DownArrow~↓~DownArrowBar~⤓~DownArrowUpArrow~⇵~DownBreve~̑~DownLeftRightVector~⥐~DownLeftTeeVector~⥞~DownLeftVector~↽~DownLeftVectorBar~⥖~DownRightTeeVector~⥟~DownRightVector~⇁~DownRightVectorBar~⥗~DownTee~⊤~DownTeeArrow~↧~Downarrow~⇓~Dscr~𝒟~Dstrok~Đ~ENG~Ŋ~Ecaron~Ě~Ecy~Э~Edot~Ė~Efr~𝔈~Element~∈~Emacr~Ē~EmptySmallSquare~◻~EmptyVerySmallSquare~▫~Eogon~Ę~Eopf~𝔼~Equal~⩵~EqualTilde~≂~Equilibrium~⇌~Escr~ℰ~Esim~⩳~Exists~∃~ExponentialE~ⅇ~Fcy~Ф~Ffr~𝔉~FilledSmallSquare~◼~FilledVerySmallSquare~▪~Fopf~𝔽~ForAll~∀~Fouriertrf~ℱ~Fscr~ℱ~GJcy~Ѓ~Gammad~Ϝ~Gbreve~Ğ~Gcedil~Ģ~Gcirc~Ĝ~Gcy~Г~Gdot~Ġ~Gfr~𝔊~Gg~⋙~Gopf~𝔾~GreaterEqual~≥~GreaterEqualLess~⋛~GreaterFullEqual~≧~GreaterGreater~⪢~GreaterLess~≷~GreaterSlantEqual~⩾~GreaterTilde~≳~Gscr~𝒢~Gt~≫~HARDcy~Ъ~Hacek~ˇ~Hat~^~Hcirc~Ĥ~Hfr~ℌ~HilbertSpace~ℋ~Hopf~ℍ~HorizontalLine~─~Hscr~ℋ~Hstrok~Ħ~HumpDownHump~≎~HumpEqual~≏~IEcy~Е~IJlig~IJ~IOcy~Ё~Icy~И~Idot~İ~Ifr~ℑ~Im~ℑ~Imacr~Ī~ImaginaryI~ⅈ~Implies~⇒~Int~∬~Integral~∫~Intersection~⋂~InvisibleComma~~InvisibleTimes~~Iogon~Į~Iopf~𝕀~Iscr~ℐ~Itilde~Ĩ~Iukcy~І~Jcirc~Ĵ~Jcy~Й~Jfr~𝔍~Jopf~𝕁~Jscr~𝒥~Jsercy~Ј~Jukcy~Є~KHcy~Х~KJcy~Ќ~Kcedil~Ķ~Kcy~К~Kfr~𝔎~Kopf~𝕂~Kscr~𝒦~LJcy~Љ~Lacute~Ĺ~Lang~⟪~Laplacetrf~ℒ~Larr~↞~Lcaron~Ľ~Lcedil~Ļ~Lcy~Л~LeftAngleBracket~⟨~LeftArrow~←~LeftArrowBar~⇤~LeftArrowRightArrow~⇆~LeftCeiling~⌈~LeftDoubleBracket~⟦~LeftDownTeeVector~⥡~LeftDownVector~⇃~LeftDownVectorBar~⥙~LeftFloor~⌊~LeftRightArrow~↔~LeftRightVector~⥎~LeftTee~⊣~LeftTeeArrow~↤~LeftTeeVector~⥚~LeftTriangle~⊲~LeftTriangleBar~⧏~LeftTriangleEqual~⊴~LeftUpDownVector~⥑~LeftUpTeeVector~⥠~LeftUpVector~↿~LeftUpVectorBar~⥘~LeftVector~↼~LeftVectorBar~⥒~Leftarrow~⇐~Leftrightarrow~⇔~LessEqualGreater~⋚~LessFullEqual~≦~LessGreater~≶~LessLess~⪡~LessSlantEqual~⩽~LessTilde~≲~Lfr~𝔏~Ll~⋘~Lleftarrow~⇚~Lmidot~Ŀ~LongLeftArrow~⟵~LongLeftRightArrow~⟷~LongRightArrow~⟶~Longleftarrow~⟸~Longleftrightarrow~⟺~Longrightarrow~⟹~Lopf~𝕃~LowerLeftArrow~↙~LowerRightArrow~↘~Lscr~ℒ~Lsh~↰~Lstrok~Ł~Lt~≪~Map~⤅~Mcy~М~MediumSpace~ ~Mellintrf~ℳ~Mfr~𝔐~MinusPlus~∓~Mopf~𝕄~Mscr~ℳ~NJcy~Њ~Nacute~Ń~Ncaron~Ň~Ncedil~Ņ~Ncy~Н~NegativeMediumSpace~~NegativeThickSpace~~NegativeThinSpace~~NegativeVeryThinSpace~~NestedGreaterGreater~≫~NestedLessLess~≪~NewLine~\n~Nfr~𝔑~NoBreak~~NonBreakingSpace~ ~Nopf~ℕ~Not~⫬~NotCongruent~≢~NotCupCap~≭~NotDoubleVerticalBar~∦~NotElement~∉~NotEqual~≠~NotEqualTilde~≂̸~NotExists~∄~NotGreater~≯~NotGreaterEqual~≱~NotGreaterFullEqual~≧̸~NotGreaterGreater~≫̸~NotGreaterLess~≹~NotGreaterSlantEqual~⩾̸~NotGreaterTilde~≵~NotHumpDownHump~≎̸~NotHumpEqual~≏̸~NotLeftTriangle~⋪~NotLeftTriangleBar~⧏̸~NotLeftTriangleEqual~⋬~NotLess~≮~NotLessEqual~≰~NotLessGreater~≸~NotLessLess~≪̸~NotLessSlantEqual~⩽̸~NotLessTilde~≴~NotNestedGreaterGreater~⪢̸~NotNestedLessLess~⪡̸~NotPrecedes~⊀~NotPrecedesEqual~⪯̸~NotPrecedesSlantEqual~⋠~NotReverseElement~∌~NotRightTriangle~⋫~NotRightTriangleBar~⧐̸~NotRightTriangleEqual~⋭~NotSquareSubset~⊏̸~NotSquareSubsetEqual~⋢~NotSquareSuperset~⊐̸~NotSquareSupersetEqual~⋣~NotSubset~⊂⃒~NotSubsetEqual~⊈~NotSucceeds~⊁~NotSucceedsEqual~⪰̸~NotSucceedsSlantEqual~⋡~NotSucceedsTilde~≿̸~NotSuperset~⊃⃒~NotSupersetEqual~⊉~NotTilde~≁~NotTildeEqual~≄~NotTildeFullEqual~≇~NotTildeTilde~≉~NotVerticalBar~∤~Nscr~𝒩~Ocy~О~Odblac~Ő~Ofr~𝔒~Omacr~Ō~Oopf~𝕆~OpenCurlyDoubleQuote~“~OpenCurlyQuote~‘~Or~⩔~Oscr~𝒪~Otimes~⨷~OverBar~‾~OverBrace~⏞~OverBracket~⎴~OverParenthesis~⏜~PartialD~∂~Pcy~П~Pfr~𝔓~PlusMinus~±~Poincareplane~ℌ~Popf~ℙ~Pr~⪻~Precedes~≺~PrecedesEqual~⪯~PrecedesSlantEqual~≼~PrecedesTilde~≾~Product~∏~Proportion~∷~Proportional~∝~Pscr~𝒫~Qfr~𝔔~Qopf~ℚ~Qscr~𝒬~RBarr~⤐~Racute~Ŕ~Rang~⟫~Rarr~↠~Rarrtl~⤖~Rcaron~Ř~Rcedil~Ŗ~Rcy~Р~Re~ℜ~ReverseElement~∋~ReverseEquilibrium~⇋~ReverseUpEquilibrium~⥯~Rfr~ℜ~RightAngleBracket~⟩~RightArrow~→~RightArrowBar~⇥~RightArrowLeftArrow~⇄~RightCeiling~⌉~RightDoubleBracket~⟧~RightDownTeeVector~⥝~RightDownVector~⇂~RightDownVectorBar~⥕~RightFloor~⌋~RightTee~⊢~RightTeeArrow~↦~RightTeeVector~⥛~RightTriangle~⊳~RightTriangleBar~⧐~RightTriangleEqual~⊵~RightUpDownVector~⥏~RightUpTeeVector~⥜~RightUpVector~↾~RightUpVectorBar~⥔~RightVector~⇀~RightVectorBar~⥓~Rightarrow~⇒~Ropf~ℝ~RoundImplies~⥰~Rrightarrow~⇛~Rscr~ℛ~Rsh~↱~RuleDelayed~⧴~SHCHcy~Щ~SHcy~Ш~SOFTcy~Ь~Sacute~Ś~Sc~⪼~Scedil~Ş~Scirc~Ŝ~Scy~С~Sfr~𝔖~ShortDownArrow~↓~ShortLeftArrow~←~ShortRightArrow~→~ShortUpArrow~↑~SmallCircle~∘~Sopf~𝕊~Sqrt~√~Square~□~SquareIntersection~⊓~SquareSubset~⊏~SquareSubsetEqual~⊑~SquareSuperset~⊐~SquareSupersetEqual~⊒~SquareUnion~⊔~Sscr~𝒮~Star~⋆~Sub~⋐~Subset~⋐~SubsetEqual~⊆~Succeeds~≻~SucceedsEqual~⪰~SucceedsSlantEqual~≽~SucceedsTilde~≿~SuchThat~∋~Sum~∑~Sup~⋑~Superset~⊃~SupersetEqual~⊇~Supset~⋑~TRADE~™~TSHcy~Ћ~TScy~Ц~Tab~ ~Tcaron~Ť~Tcedil~Ţ~Tcy~Т~Tfr~𝔗~Therefore~∴~ThickSpace~ ~ThinSpace~ ~Tilde~∼~TildeEqual~≃~TildeFullEqual~≅~TildeTilde~≈~Topf~𝕋~TripleDot~⃛~Tscr~𝒯~Tstrok~Ŧ~Uarr~↟~Uarrocir~⥉~Ubrcy~Ў~Ubreve~Ŭ~Ucy~У~Udblac~Ű~Ufr~𝔘~Umacr~Ū~UnderBar~_~UnderBrace~⏟~UnderBracket~⎵~UnderParenthesis~⏝~Union~⋃~UnionPlus~⊎~Uogon~Ų~Uopf~𝕌~UpArrow~↑~UpArrowBar~⤒~UpArrowDownArrow~⇅~UpDownArrow~↕~UpEquilibrium~⥮~UpTee~⊥~UpTeeArrow~↥~Uparrow~⇑~Updownarrow~⇕~UpperLeftArrow~↖~UpperRightArrow~↗~Upsi~ϒ~Uring~Ů~Uscr~𝒰~Utilde~Ũ~VDash~⊫~Vbar~⫫~Vcy~В~Vdash~⊩~Vdashl~⫦~Vee~⋁~Verbar~‖~Vert~‖~VerticalBar~∣~VerticalLine~|~VerticalSeparator~❘~VerticalTilde~≀~VeryThinSpace~ ~Vfr~𝔙~Vopf~𝕍~Vscr~𝒱~Vvdash~⊪~Wcirc~Ŵ~Wedge~⋀~Wfr~𝔚~Wopf~𝕎~Wscr~𝒲~Xfr~𝔛~Xopf~𝕏~Xscr~𝒳~YAcy~Я~YIcy~Ї~YUcy~Ю~Ycirc~Ŷ~Ycy~Ы~Yfr~𝔜~Yopf~𝕐~Yscr~𝒴~ZHcy~Ж~Zacute~Ź~Zcaron~Ž~Zcy~З~Zdot~Ż~ZeroWidthSpace~~Zfr~ℨ~Zopf~ℤ~Zscr~𝒵~abreve~ă~ac~∾~acE~∾̳~acd~∿~acy~а~af~~afr~𝔞~aleph~ℵ~amacr~ā~amalg~⨿~andand~⩕~andd~⩜~andslope~⩘~andv~⩚~ange~⦤~angle~∠~angmsd~∡~angmsdaa~⦨~angmsdab~⦩~angmsdac~⦪~angmsdad~⦫~angmsdae~⦬~angmsdaf~⦭~angmsdag~⦮~angmsdah~⦯~angrt~∟~angrtvb~⊾~angrtvbd~⦝~angsph~∢~angst~Å~angzarr~⍼~aogon~ą~aopf~𝕒~ap~≈~apE~⩰~apacir~⩯~ape~≊~apid~≋~approx~≈~approxeq~≊~ascr~𝒶~ast~*~asympeq~≍~awconint~∳~awint~⨑~bNot~⫭~backcong~≌~backepsilon~϶~backprime~‵~backsim~∽~backsimeq~⋍~barvee~⊽~barwed~⌅~barwedge~⌅~bbrk~⎵~bbrktbrk~⎶~bcong~≌~bcy~б~becaus~∵~because~∵~bemptyv~⦰~bepsi~϶~bernou~ℬ~beth~ℶ~between~≬~bfr~𝔟~bigcap~⋂~bigcirc~◯~bigcup~⋃~bigodot~⨀~bigoplus~⨁~bigotimes~⨂~bigsqcup~⨆~bigstar~★~bigtriangledown~▽~bigtriangleup~△~biguplus~⨄~bigvee~⋁~bigwedge~⋀~bkarow~⤍~blacklozenge~⧫~blacksquare~▪~blacktriangle~▴~blacktriangledown~▾~blacktriangleleft~◂~blacktriangleright~▸~blank~␣~blk12~▒~blk14~░~blk34~▓~block~█~bne~=⃥~bnequiv~≡⃥~bnot~⌐~bopf~𝕓~bot~⊥~bottom~⊥~bowtie~⋈~boxDL~╗~boxDR~╔~boxDl~╖~boxDr~╓~boxH~═~boxHD~╦~boxHU~╩~boxHd~╤~boxHu~╧~boxUL~╝~boxUR~╚~boxUl~╜~boxUr~╙~boxV~║~boxVH~╬~boxVL~╣~boxVR~╠~boxVh~╫~boxVl~╢~boxVr~╟~boxbox~⧉~boxdL~╕~boxdR~╒~boxdl~┐~boxdr~┌~boxh~─~boxhD~╥~boxhU~╨~boxhd~┬~boxhu~┴~boxminus~⊟~boxplus~⊞~boxtimes~⊠~boxuL~╛~boxuR~╘~boxul~┘~boxur~└~boxv~│~boxvH~╪~boxvL~╡~boxvR~╞~boxvh~┼~boxvl~┤~boxvr~├~bprime~‵~breve~˘~bscr~𝒷~bsemi~⁏~bsim~∽~bsime~⋍~bsol~\\~bsolb~⧅~bsolhsub~⟈~bullet~•~bump~≎~bumpE~⪮~bumpe~≏~bumpeq~≏~cacute~ć~capand~⩄~capbrcup~⩉~capcap~⩋~capcup~⩇~capdot~⩀~caps~∩︀~caret~⁁~caron~ˇ~ccaps~⩍~ccaron~č~ccirc~ĉ~ccups~⩌~ccupssm~⩐~cdot~ċ~cemptyv~⦲~centerdot~·~cfr~𝔠~chcy~ч~check~✓~checkmark~✓~cir~○~cirE~⧃~circeq~≗~circlearrowleft~↺~circlearrowright~↻~circledR~®~circledS~Ⓢ~circledast~⊛~circledcirc~⊚~circleddash~⊝~cire~≗~cirfnint~⨐~cirmid~⫯~cirscir~⧂~clubsuit~♣~colon~:~colone~≔~coloneq~≔~comma~,~commat~@~comp~∁~compfn~∘~complement~∁~complexes~ℂ~congdot~⩭~conint~∮~copf~𝕔~coprod~∐~copysr~℗~cross~✗~cscr~𝒸~csub~⫏~csube~⫑~csup~⫐~csupe~⫒~ctdot~⋯~cudarrl~⤸~cudarrr~⤵~cuepr~⋞~cuesc~⋟~cularr~↶~cularrp~⤽~cupbrcap~⩈~cupcap~⩆~cupcup~⩊~cupdot~⊍~cupor~⩅~cups~∪︀~curarr~↷~curarrm~⤼~curlyeqprec~⋞~curlyeqsucc~⋟~curlyvee~⋎~curlywedge~⋏~curvearrowleft~↶~curvearrowright~↷~cuvee~⋎~cuwed~⋏~cwconint~∲~cwint~∱~cylcty~⌭~dHar~⥥~daleth~ℸ~dash~‐~dashv~⊣~dbkarow~⤏~dblac~˝~dcaron~ď~dcy~д~dd~ⅆ~ddagger~‡~ddarr~⇊~ddotseq~⩷~demptyv~⦱~dfisht~⥿~dfr~𝔡~dharl~⇃~dharr~⇂~diam~⋄~diamond~⋄~diamondsuit~♦~die~¨~digamma~ϝ~disin~⋲~div~÷~divideontimes~⋇~divonx~⋇~djcy~ђ~dlcorn~⌞~dlcrop~⌍~dollar~$~dopf~𝕕~dot~˙~doteq~≐~doteqdot~≑~dotminus~∸~dotplus~∔~dotsquare~⊡~doublebarwedge~⌆~downarrow~↓~downdownarrows~⇊~downharpoonleft~⇃~downharpoonright~⇂~drbkarow~⤐~drcorn~⌟~drcrop~⌌~dscr~𝒹~dscy~ѕ~dsol~⧶~dstrok~đ~dtdot~⋱~dtri~▿~dtrif~▾~duarr~⇵~duhar~⥯~dwangle~⦦~dzcy~џ~dzigrarr~⟿~eDDot~⩷~eDot~≑~easter~⩮~ecaron~ě~ecir~≖~ecolon~≕~ecy~э~edot~ė~ee~ⅇ~efDot~≒~efr~𝔢~eg~⪚~egs~⪖~egsdot~⪘~el~⪙~elinters~⏧~ell~ℓ~els~⪕~elsdot~⪗~emacr~ē~emptyset~∅~emptyv~∅~emsp13~ ~emsp14~ ~eng~ŋ~eogon~ę~eopf~𝕖~epar~⋕~eparsl~⧣~eplus~⩱~epsi~ε~epsiv~ϵ~eqcirc~≖~eqcolon~≕~eqsim~≂~eqslantgtr~⪖~eqslantless~⪕~equals~=~equest~≟~equivDD~⩸~eqvparsl~⧥~erDot~≓~erarr~⥱~escr~ℯ~esdot~≐~esim~≂~excl~!~expectation~ℰ~exponentiale~ⅇ~fallingdotseq~≒~fcy~ф~female~♀~ffilig~ffi~fflig~ff~ffllig~ffl~ffr~𝔣~filig~fi~fjlig~fj~flat~♭~fllig~fl~fltns~▱~fopf~𝕗~fork~⋔~forkv~⫙~fpartint~⨍~frac13~⅓~frac15~⅕~frac16~⅙~frac18~⅛~frac23~⅔~frac25~⅖~frac35~⅗~frac38~⅜~frac45~⅘~frac56~⅚~frac58~⅝~frac78~⅞~frown~⌢~fscr~𝒻~gE~≧~gEl~⪌~gacute~ǵ~gammad~ϝ~gap~⪆~gbreve~ğ~gcirc~ĝ~gcy~г~gdot~ġ~gel~⋛~geq~≥~geqq~≧~geqslant~⩾~ges~⩾~gescc~⪩~gesdot~⪀~gesdoto~⪂~gesdotol~⪄~gesl~⋛︀~gesles~⪔~gfr~𝔤~gg~≫~ggg~⋙~gimel~ℷ~gjcy~ѓ~gl~≷~glE~⪒~gla~⪥~glj~⪤~gnE~≩~gnap~⪊~gnapprox~⪊~gne~⪈~gneq~⪈~gneqq~≩~gnsim~⋧~gopf~𝕘~grave~`~gscr~ℊ~gsim~≳~gsime~⪎~gsiml~⪐~gtcc~⪧~gtcir~⩺~gtdot~⋗~gtlPar~⦕~gtquest~⩼~gtrapprox~⪆~gtrarr~⥸~gtrdot~⋗~gtreqless~⋛~gtreqqless~⪌~gtrless~≷~gtrsim~≳~gvertneqq~≩︀~gvnE~≩︀~hairsp~ ~half~½~hamilt~ℋ~hardcy~ъ~harrcir~⥈~harrw~↭~hbar~ℏ~hcirc~ĥ~heartsuit~♥~hercon~⊹~hfr~𝔥~hksearow~⤥~hkswarow~⤦~hoarr~⇿~homtht~∻~hookleftarrow~↩~hookrightarrow~↪~hopf~𝕙~horbar~―~hscr~𝒽~hslash~ℏ~hstrok~ħ~hybull~⁃~hyphen~‐~ic~~icy~и~iecy~е~iff~⇔~ifr~𝔦~ii~ⅈ~iiiint~⨌~iiint~∭~iinfin~⧜~iiota~℩~ijlig~ij~imacr~ī~imagline~ℐ~imagpart~ℑ~imath~ı~imof~⊷~imped~Ƶ~in~∈~incare~℅~infintie~⧝~inodot~ı~intcal~⊺~integers~ℤ~intercal~⊺~intlarhk~⨗~intprod~⨼~iocy~ё~iogon~į~iopf~𝕚~iprod~⨼~iscr~𝒾~isinE~⋹~isindot~⋵~isins~⋴~isinsv~⋳~isinv~∈~it~~itilde~ĩ~iukcy~і~jcirc~ĵ~jcy~й~jfr~𝔧~jmath~ȷ~jopf~𝕛~jscr~𝒿~jsercy~ј~jukcy~є~kappav~ϰ~kcedil~ķ~kcy~к~kfr~𝔨~kgreen~ĸ~khcy~х~kjcy~ќ~kopf~𝕜~kscr~𝓀~lAarr~⇚~lAtail~⤛~lBarr~⤎~lE~≦~lEg~⪋~lHar~⥢~lacute~ĺ~laemptyv~⦴~lagran~ℒ~langd~⦑~langle~⟨~lap~⪅~larrb~⇤~larrbfs~⤟~larrfs~⤝~larrhk~↩~larrlp~↫~larrpl~⤹~larrsim~⥳~larrtl~↢~lat~⪫~latail~⤙~late~⪭~lates~⪭︀~lbarr~⤌~lbbrk~❲~lbrace~{~lbrack~[~lbrke~⦋~lbrksld~⦏~lbrkslu~⦍~lcaron~ľ~lcedil~ļ~lcub~{~lcy~л~ldca~⤶~ldquor~„~ldrdhar~⥧~ldrushar~⥋~ldsh~↲~leftarrow~←~leftarrowtail~↢~leftharpoondown~↽~leftharpoonup~↼~leftleftarrows~⇇~leftrightarrow~↔~leftrightarrows~⇆~leftrightharpoons~⇋~leftrightsquigarrow~↭~leftthreetimes~⋋~leg~⋚~leq~≤~leqq~≦~leqslant~⩽~les~⩽~lescc~⪨~lesdot~⩿~lesdoto~⪁~lesdotor~⪃~lesg~⋚︀~lesges~⪓~lessapprox~⪅~lessdot~⋖~lesseqgtr~⋚~lesseqqgtr~⪋~lessgtr~≶~lesssim~≲~lfisht~⥼~lfr~𝔩~lg~≶~lgE~⪑~lhard~↽~lharu~↼~lharul~⥪~lhblk~▄~ljcy~љ~ll~≪~llarr~⇇~llcorner~⌞~llhard~⥫~lltri~◺~lmidot~ŀ~lmoust~⎰~lmoustache~⎰~lnE~≨~lnap~⪉~lnapprox~⪉~lne~⪇~lneq~⪇~lneqq~≨~lnsim~⋦~loang~⟬~loarr~⇽~lobrk~⟦~longleftarrow~⟵~longleftrightarrow~⟷~longmapsto~⟼~longrightarrow~⟶~looparrowleft~↫~looparrowright~↬~lopar~⦅~lopf~𝕝~loplus~⨭~lotimes~⨴~lowbar~_~lozenge~◊~lozf~⧫~lpar~(~lparlt~⦓~lrarr~⇆~lrcorner~⌟~lrhar~⇋~lrhard~⥭~lrtri~⊿~lscr~𝓁~lsh~↰~lsim~≲~lsime~⪍~lsimg~⪏~lsqb~[~lsquor~‚~lstrok~ł~ltcc~⪦~ltcir~⩹~ltdot~⋖~lthree~⋋~ltimes~⋉~ltlarr~⥶~ltquest~⩻~ltrPar~⦖~ltri~◃~ltrie~⊴~ltrif~◂~lurdshar~⥊~luruhar~⥦~lvertneqq~≨︀~lvnE~≨︀~mDDot~∺~male~♂~malt~✠~maltese~✠~map~↦~mapsto~↦~mapstodown~↧~mapstoleft~↤~mapstoup~↥~marker~▮~mcomma~⨩~mcy~м~measuredangle~∡~mfr~𝔪~mho~℧~mid~∣~midast~*~midcir~⫰~minusb~⊟~minusd~∸~minusdu~⨪~mlcp~⫛~mldr~…~mnplus~∓~models~⊧~mopf~𝕞~mp~∓~mscr~𝓂~mstpos~∾~multimap~⊸~mumap~⊸~nGg~⋙̸~nGt~≫⃒~nGtv~≫̸~nLeftarrow~⇍~nLeftrightarrow~⇎~nLl~⋘̸~nLt~≪⃒~nLtv~≪̸~nRightarrow~⇏~nVDash~⊯~nVdash~⊮~nacute~ń~nang~∠⃒~nap~≉~napE~⩰̸~napid~≋̸~napos~ʼn~napprox~≉~natur~♮~natural~♮~naturals~ℕ~nbump~≎̸~nbumpe~≏̸~ncap~⩃~ncaron~ň~ncedil~ņ~ncong~≇~ncongdot~⩭̸~ncup~⩂~ncy~н~neArr~⇗~nearhk~⤤~nearr~↗~nearrow~↗~nedot~≐̸~nequiv~≢~nesear~⤨~nesim~≂̸~nexist~∄~nexists~∄~nfr~𝔫~ngE~≧̸~nge~≱~ngeq~≱~ngeqq~≧̸~ngeqslant~⩾̸~nges~⩾̸~ngsim~≵~ngt~≯~ngtr~≯~nhArr~⇎~nharr~↮~nhpar~⫲~nis~⋼~nisd~⋺~niv~∋~njcy~њ~nlArr~⇍~nlE~≦̸~nlarr~↚~nldr~‥~nle~≰~nleftarrow~↚~nleftrightarrow~↮~nleq~≰~nleqq~≦̸~nleqslant~⩽̸~nles~⩽̸~nless~≮~nlsim~≴~nlt~≮~nltri~⋪~nltrie~⋬~nmid~∤~nopf~𝕟~notinE~⋹̸~notindot~⋵̸~notinva~∉~notinvb~⋷~notinvc~⋶~notni~∌~notniva~∌~notnivb~⋾~notnivc~⋽~npar~∦~nparallel~∦~nparsl~⫽⃥~npart~∂̸~npolint~⨔~npr~⊀~nprcue~⋠~npre~⪯̸~nprec~⊀~npreceq~⪯̸~nrArr~⇏~nrarr~↛~nrarrc~⤳̸~nrarrw~↝̸~nrightarrow~↛~nrtri~⋫~nrtrie~⋭~nsc~⊁~nsccue~⋡~nsce~⪰̸~nscr~𝓃~nshortmid~∤~nshortparallel~∦~nsim~≁~nsime~≄~nsimeq~≄~nsmid~∤~nspar~∦~nsqsube~⋢~nsqsupe~⋣~nsubE~⫅̸~nsube~⊈~nsubset~⊂⃒~nsubseteq~⊈~nsubseteqq~⫅̸~nsucc~⊁~nsucceq~⪰̸~nsup~⊅~nsupE~⫆̸~nsupe~⊉~nsupset~⊃⃒~nsupseteq~⊉~nsupseteqq~⫆̸~ntgl~≹~ntlg~≸~ntriangleleft~⋪~ntrianglelefteq~⋬~ntriangleright~⋫~ntrianglerighteq~⋭~num~#~numero~№~numsp~ ~nvDash~⊭~nvHarr~⤄~nvap~≍⃒~nvdash~⊬~nvge~≥⃒~nvgt~>⃒~nvinfin~⧞~nvlArr~⤂~nvle~≤⃒~nvlt~<⃒~nvltrie~⊴⃒~nvrArr~⤃~nvrtrie~⊵⃒~nvsim~∼⃒~nwArr~⇖~nwarhk~⤣~nwarr~↖~nwarrow~↖~nwnear~⤧~oS~Ⓢ~oast~⊛~ocir~⊚~ocy~о~odash~⊝~odblac~ő~odiv~⨸~odot~⊙~odsold~⦼~ofcir~⦿~ofr~𝔬~ogon~˛~ogt~⧁~ohbar~⦵~ohm~Ω~oint~∮~olarr~↺~olcir~⦾~olcross~⦻~olt~⧀~omacr~ō~omid~⦶~ominus~⊖~oopf~𝕠~opar~⦷~operp~⦹~orarr~↻~ord~⩝~order~ℴ~orderof~ℴ~origof~⊶~oror~⩖~orslope~⩗~orv~⩛~oscr~ℴ~osol~⊘~otimesas~⨶~ovbar~⌽~par~∥~parallel~∥~parsim~⫳~parsl~⫽~pcy~п~percnt~%~period~.~pertenk~‱~pfr~𝔭~phiv~ϕ~phmmat~ℳ~phone~☎~pitchfork~⋔~planck~ℏ~planckh~ℎ~plankv~ℏ~plus~+~plusacir~⨣~plusb~⊞~pluscir~⨢~plusdo~∔~plusdu~⨥~pluse~⩲~plussim~⨦~plustwo~⨧~pm~±~pointint~⨕~popf~𝕡~pr~≺~prE~⪳~prap~⪷~prcue~≼~pre~⪯~prec~≺~precapprox~⪷~preccurlyeq~≼~preceq~⪯~precnapprox~⪹~precneqq~⪵~precnsim~⋨~precsim~≾~primes~ℙ~prnE~⪵~prnap~⪹~prnsim~⋨~profalar~⌮~profline~⌒~profsurf~⌓~propto~∝~prsim~≾~prurel~⊰~pscr~𝓅~puncsp~ ~qfr~𝔮~qint~⨌~qopf~𝕢~qprime~⁗~qscr~𝓆~quaternions~ℍ~quatint~⨖~quest~?~questeq~≟~rAarr~⇛~rAtail~⤜~rBarr~⤏~rHar~⥤~race~∽̱~racute~ŕ~raemptyv~⦳~rangd~⦒~range~⦥~rangle~⟩~rarrap~⥵~rarrb~⇥~rarrbfs~⤠~rarrc~⤳~rarrfs~⤞~rarrhk~↪~rarrlp~↬~rarrpl~⥅~rarrsim~⥴~rarrtl~↣~rarrw~↝~ratail~⤚~ratio~∶~rationals~ℚ~rbarr~⤍~rbbrk~❳~rbrace~}~rbrack~]~rbrke~⦌~rbrksld~⦎~rbrkslu~⦐~rcaron~ř~rcedil~ŗ~rcub~}~rcy~р~rdca~⤷~rdldhar~⥩~rdquor~”~rdsh~↳~realine~ℛ~realpart~ℜ~reals~ℝ~rect~▭~rfisht~⥽~rfr~𝔯~rhard~⇁~rharu~⇀~rharul~⥬~rhov~ϱ~rightarrow~→~rightarrowtail~↣~rightharpoondown~⇁~rightharpoonup~⇀~rightleftarrows~⇄~rightleftharpoons~⇌~rightrightarrows~⇉~rightsquigarrow~↝~rightthreetimes~⋌~ring~˚~risingdotseq~≓~rlarr~⇄~rlhar~⇌~rmoust~⎱~rmoustache~⎱~rnmid~⫮~roang~⟭~roarr~⇾~robrk~⟧~ropar~⦆~ropf~𝕣~roplus~⨮~rotimes~⨵~rpar~)~rpargt~⦔~rppolint~⨒~rrarr~⇉~rscr~𝓇~rsh~↱~rsqb~]~rsquor~’~rthree~⋌~rtimes~⋊~rtri~▹~rtrie~⊵~rtrif~▸~rtriltri~⧎~ruluhar~⥨~rx~℞~sacute~ś~sc~≻~scE~⪴~scap~⪸~sccue~≽~sce~⪰~scedil~ş~scirc~ŝ~scnE~⪶~scnap~⪺~scnsim~⋩~scpolint~⨓~scsim~≿~scy~с~sdotb~⊡~sdote~⩦~seArr~⇘~searhk~⤥~searr~↘~searrow~↘~semi~;~seswar~⤩~setminus~∖~setmn~∖~sext~✶~sfr~𝔰~sfrown~⌢~sharp~♯~shchcy~щ~shcy~ш~shortmid~∣~shortparallel~∥~sigmav~ς~simdot~⩪~sime~≃~simeq~≃~simg~⪞~simgE~⪠~siml~⪝~simlE~⪟~simne~≆~simplus~⨤~simrarr~⥲~slarr~←~smallsetminus~∖~smashp~⨳~smeparsl~⧤~smid~∣~smile~⌣~smt~⪪~smte~⪬~smtes~⪬︀~softcy~ь~sol~/~solb~⧄~solbar~⌿~sopf~𝕤~spadesuit~♠~spar~∥~sqcap~⊓~sqcaps~⊓︀~sqcup~⊔~sqcups~⊔︀~sqsub~⊏~sqsube~⊑~sqsubset~⊏~sqsubseteq~⊑~sqsup~⊐~sqsupe~⊒~sqsupset~⊐~sqsupseteq~⊒~squ~□~square~□~squarf~▪~squf~▪~srarr~→~sscr~𝓈~ssetmn~∖~ssmile~⌣~sstarf~⋆~star~☆~starf~★~straightepsilon~ϵ~straightphi~ϕ~strns~¯~subE~⫅~subdot~⪽~subedot~⫃~submult~⫁~subnE~⫋~subne~⊊~subplus~⪿~subrarr~⥹~subset~⊂~subseteq~⊆~subseteqq~⫅~subsetneq~⊊~subsetneqq~⫋~subsim~⫇~subsub~⫕~subsup~⫓~succ~≻~succapprox~⪸~succcurlyeq~≽~succeq~⪰~succnapprox~⪺~succneqq~⪶~succnsim~⋩~succsim~≿~sung~♪~supE~⫆~supdot~⪾~supdsub~⫘~supedot~⫄~suphsol~⟉~suphsub~⫗~suplarr~⥻~supmult~⫂~supnE~⫌~supne~⊋~supplus~⫀~supset~⊃~supseteq~⊇~supseteqq~⫆~supsetneq~⊋~supsetneqq~⫌~supsim~⫈~supsub~⫔~supsup~⫖~swArr~⇙~swarhk~⤦~swarr~↙~swarrow~↙~swnwar~⤪~target~⌖~tbrk~⎴~tcaron~ť~tcedil~ţ~tcy~т~tdot~⃛~telrec~⌕~tfr~𝔱~therefore~∴~thetav~ϑ~thickapprox~≈~thicksim~∼~thkap~≈~thksim~∼~timesb~⊠~timesbar~⨱~timesd~⨰~tint~∭~toea~⤨~top~⊤~topbot~⌶~topcir~⫱~topf~𝕥~topfork~⫚~tosa~⤩~tprime~‴~triangle~▵~triangledown~▿~triangleleft~◃~trianglelefteq~⊴~triangleq~≜~triangleright~▹~trianglerighteq~⊵~tridot~◬~trie~≜~triminus~⨺~triplus~⨹~trisb~⧍~tritime~⨻~trpezium~⏢~tscr~𝓉~tscy~ц~tshcy~ћ~tstrok~ŧ~twixt~≬~twoheadleftarrow~↞~twoheadrightarrow~↠~uHar~⥣~ubrcy~ў~ubreve~ŭ~ucy~у~udarr~⇅~udblac~ű~udhar~⥮~ufisht~⥾~ufr~𝔲~uharl~↿~uharr~↾~uhblk~▀~ulcorn~⌜~ulcorner~⌜~ulcrop~⌏~ultri~◸~umacr~ū~uogon~ų~uopf~𝕦~uparrow~↑~updownarrow~↕~upharpoonleft~↿~upharpoonright~↾~uplus~⊎~upsi~υ~upuparrows~⇈~urcorn~⌝~urcorner~⌝~urcrop~⌎~uring~ů~urtri~◹~uscr~𝓊~utdot~⋰~utilde~ũ~utri~▵~utrif~▴~uuarr~⇈~uwangle~⦧~vArr~⇕~vBar~⫨~vBarv~⫩~vDash~⊨~vangrt~⦜~varepsilon~ϵ~varkappa~ϰ~varnothing~∅~varphi~ϕ~varpi~ϖ~varpropto~∝~varr~↕~varrho~ϱ~varsigma~ς~varsubsetneq~⊊︀~varsubsetneqq~⫋︀~varsupsetneq~⊋︀~varsupsetneqq~⫌︀~vartheta~ϑ~vartriangleleft~⊲~vartriangleright~⊳~vcy~в~vdash~⊢~vee~∨~veebar~⊻~veeeq~≚~vellip~⋮~verbar~|~vert~|~vfr~𝔳~vltri~⊲~vnsub~⊂⃒~vnsup~⊃⃒~vopf~𝕧~vprop~∝~vrtri~⊳~vscr~𝓋~vsubnE~⫋︀~vsubne~⊊︀~vsupnE~⫌︀~vsupne~⊋︀~vzigzag~⦚~wcirc~ŵ~wedbar~⩟~wedge~∧~wedgeq~≙~wfr~𝔴~wopf~𝕨~wp~℘~wr~≀~wreath~≀~wscr~𝓌~xcap~⋂~xcirc~◯~xcup~⋃~xdtri~▽~xfr~𝔵~xhArr~⟺~xharr~⟷~xlArr~⟸~xlarr~⟵~xmap~⟼~xnis~⋻~xodot~⨀~xopf~𝕩~xoplus~⨁~xotime~⨂~xrArr~⟹~xrarr~⟶~xscr~𝓍~xsqcup~⨆~xuplus~⨄~xutri~△~xvee~⋁~xwedge~⋀~yacy~я~ycirc~ŷ~ycy~ы~yfr~𝔶~yicy~ї~yopf~𝕪~yscr~𝓎~yucy~ю~zacute~ź~zcaron~ž~zcy~з~zdot~ż~zeetrf~ℨ~zfr~𝔷~zhcy~ж~zigrarr~⇝~zopf~𝕫~zscr~𝓏~~AMP~&~COPY~©~GT~>~LT~<~QUOT~"~REG~®', namedReferences["html4"]);
|
|
895
|
-
|
|
896
|
-
var numericUnicodeMap = {
|
|
897
|
-
0: 65533,
|
|
898
|
-
128: 8364,
|
|
899
|
-
130: 8218,
|
|
900
|
-
131: 402,
|
|
901
|
-
132: 8222,
|
|
902
|
-
133: 8230,
|
|
903
|
-
134: 8224,
|
|
904
|
-
135: 8225,
|
|
905
|
-
136: 710,
|
|
906
|
-
137: 8240,
|
|
907
|
-
138: 352,
|
|
908
|
-
139: 8249,
|
|
909
|
-
140: 338,
|
|
910
|
-
142: 381,
|
|
911
|
-
145: 8216,
|
|
912
|
-
146: 8217,
|
|
913
|
-
147: 8220,
|
|
914
|
-
148: 8221,
|
|
915
|
-
149: 8226,
|
|
916
|
-
150: 8211,
|
|
917
|
-
151: 8212,
|
|
918
|
-
152: 732,
|
|
919
|
-
153: 8482,
|
|
920
|
-
154: 353,
|
|
921
|
-
155: 8250,
|
|
922
|
-
156: 339,
|
|
923
|
-
158: 382,
|
|
924
|
-
159: 376
|
|
925
|
-
};
|
|
926
|
-
|
|
927
|
-
var fromCodePoint = String.fromCodePoint || function(astralCodePoint) {
|
|
928
|
-
return String.fromCharCode(Math.floor((astralCodePoint - 65536) / 1024) + 55296, (astralCodePoint - 65536) % 1024 + 56320);
|
|
929
|
-
};
|
|
930
|
-
|
|
931
|
-
var __assign = function() {
|
|
932
|
-
__assign = Object.assign || function(t) {
|
|
933
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
934
|
-
s = arguments[i];
|
|
935
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
936
|
-
t[p] = s[p];
|
|
937
|
-
}
|
|
938
|
-
return t;
|
|
939
|
-
};
|
|
940
|
-
return __assign.apply(this, arguments);
|
|
941
|
-
};
|
|
942
|
-
var allNamedReferences = __assign(__assign({}, namedReferences), { all: namedReferences.html5 });
|
|
943
|
-
var defaultDecodeOptions = {
|
|
944
|
-
scope: "body",
|
|
945
|
-
level: "all"
|
|
946
|
-
};
|
|
947
|
-
var strict = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g;
|
|
948
|
-
var attribute = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g;
|
|
949
|
-
var baseDecodeRegExps = {
|
|
950
|
-
xml: {
|
|
951
|
-
strict,
|
|
952
|
-
attribute,
|
|
953
|
-
body: bodyRegExps.xml
|
|
954
|
-
},
|
|
955
|
-
html4: {
|
|
956
|
-
strict,
|
|
957
|
-
attribute,
|
|
958
|
-
body: bodyRegExps.html4
|
|
959
|
-
},
|
|
960
|
-
html5: {
|
|
961
|
-
strict,
|
|
962
|
-
attribute,
|
|
963
|
-
body: bodyRegExps.html5
|
|
964
|
-
}
|
|
965
|
-
};
|
|
966
|
-
var decodeRegExps = __assign(__assign({}, baseDecodeRegExps), { all: baseDecodeRegExps.html5 });
|
|
967
|
-
var fromCharCode = String.fromCharCode;
|
|
968
|
-
var outOfBoundsChar = fromCharCode(65533);
|
|
969
|
-
function getDecodedEntity(entity, references, isAttribute, isStrict) {
|
|
970
|
-
var decodeResult = entity;
|
|
971
|
-
var decodeEntityLastChar = entity[entity.length - 1];
|
|
972
|
-
if (isAttribute && decodeEntityLastChar === "=") {
|
|
973
|
-
decodeResult = entity;
|
|
974
|
-
} else if (isStrict && decodeEntityLastChar !== ";") {
|
|
975
|
-
decodeResult = entity;
|
|
976
|
-
} else {
|
|
977
|
-
var decodeResultByReference = references[entity];
|
|
978
|
-
if (decodeResultByReference) {
|
|
979
|
-
decodeResult = decodeResultByReference;
|
|
980
|
-
} else if (entity[0] === "&" && entity[1] === "#") {
|
|
981
|
-
var decodeSecondChar = entity[2];
|
|
982
|
-
var decodeCode = decodeSecondChar == "x" || decodeSecondChar == "X" ? parseInt(entity.substr(3), 16) : parseInt(entity.substr(2));
|
|
983
|
-
decodeResult = decodeCode >= 1114111 ? outOfBoundsChar : decodeCode > 65535 ? fromCodePoint(decodeCode) : fromCharCode(numericUnicodeMap[decodeCode] || decodeCode);
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
return decodeResult;
|
|
987
|
-
}
|
|
988
|
-
function decode(text, _a) {
|
|
989
|
-
var _b = _a === void 0 ? defaultDecodeOptions : _a, _c = _b.level, level = _c === void 0 ? "all" : _c, _d = _b.scope, scope = _d === void 0 ? level === "xml" ? "strict" : "body" : _d;
|
|
990
|
-
if (!text) {
|
|
991
|
-
return "";
|
|
992
|
-
}
|
|
993
|
-
var decodeRegExp = decodeRegExps[level][scope];
|
|
994
|
-
var references = allNamedReferences[level].entities;
|
|
995
|
-
var isAttribute = scope === "attribute";
|
|
996
|
-
var isStrict = scope === "strict";
|
|
997
|
-
return text.replace(decodeRegExp, function(entity) {
|
|
998
|
-
return getDecodedEntity(entity, references, isAttribute, isStrict);
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
var c$1 = { strictlyTwoElementsInRangeArrays: false, progressFn: null };
|
|
1003
|
-
function g(t, u) {
|
|
1004
|
-
if (!Array.isArray(t) || !t.length) return t;
|
|
1005
|
-
let n = { ...c$1, ...u }, s, o;
|
|
1006
|
-
if (n.strictlyTwoElementsInRangeArrays && !t.every((e, r) => !Array.isArray(e) || e.length !== 2 ? (s = r, o = e.length, false) : true)) throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${s}th range (${JSON.stringify(t[s], null, 4)}) has not two but ${o} elements!`);
|
|
1007
|
-
if (!t.every((e, r) => !Array.isArray(e) || !Number.isInteger(e[0]) || e[0] < 0 || !Number.isInteger(e[1]) || e[1] < 0 ? (s = r, false) : true)) throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${s}th range (${JSON.stringify(t[s], null, 4)}) does not consist of only natural numbers!`);
|
|
1008
|
-
let p = t.length ** 2, i = 0;
|
|
1009
|
-
return Array.from(t).sort((e, r) => (n.progressFn && (i += 1, n.progressFn(Math.floor(i * 100 / p))), e[0] === r[0] ? e[1] < r[1] ? -1 : e[1] > r[1] ? 1 : 0 : e[0] < r[0] ? -1 : 1));
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
var d = { mergeType: 1, progressFn: null, joinRangesThatTouchEdges: true };
|
|
1013
|
-
function b(i, t) {
|
|
1014
|
-
function l(e) {
|
|
1015
|
-
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
1016
|
-
}
|
|
1017
|
-
if (!Array.isArray(i) || !i.length) return null;
|
|
1018
|
-
let s;
|
|
1019
|
-
if (t) if (l(t)) {
|
|
1020
|
-
if (s = { ...d, ...t }, s.progressFn && l(s.progressFn) && !Object.keys(s.progressFn).length) s.progressFn = null;
|
|
1021
|
-
else if (s.progressFn && typeof s.progressFn != "function") throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof s.progressFn}", equal to ${JSON.stringify(s.progressFn, null, 4)}`);
|
|
1022
|
-
if (![1, 2, "1", "2"].includes(s.mergeType)) throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof s.mergeType}", equal to ${JSON.stringify(s.mergeType, null, 4)}`);
|
|
1023
|
-
if (typeof s.joinRangesThatTouchEdges != "boolean") throw new Error(`ranges-merge: [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof s.joinRangesThatTouchEdges}", equal to ${JSON.stringify(s.joinRangesThatTouchEdges, null, 4)}`);
|
|
1024
|
-
} else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
|
|
1025
|
-
${JSON.stringify(t, null, 4)} (type ${typeof t})`);
|
|
1026
|
-
else s = { ...d };
|
|
1027
|
-
let g$1 = i.filter((e) => Array.isArray(e)).map((e) => [...e]).filter((e) => e[2] !== void 0 || e[0] !== e[1]), n, o, r;
|
|
1028
|
-
s.progressFn ? n = g(g$1, { progressFn: (e) => {
|
|
1029
|
-
r = Math.floor(e / 5), r !== o && (o = r, s.progressFn(r));
|
|
1030
|
-
} }) : n = g(g$1);
|
|
1031
|
-
let a = n.length - 1;
|
|
1032
|
-
for (let e = a; e > 0; e--) s.progressFn && (r = Math.floor((1 - e / a) * 78) + 21, r !== o && r > o && (o = r, s.progressFn(r))), (n[e][0] <= n[e - 1][0] || !s.joinRangesThatTouchEdges && n[e][0] < n[e - 1][1] || s.joinRangesThatTouchEdges && n[e][0] <= n[e - 1][1]) && (n[e - 1][0] = Math.min(n[e][0], n[e - 1][0]), n[e - 1][1] = Math.max(n[e][1], n[e - 1][1]), n[e][2] !== void 0 && (n[e - 1][0] >= n[e][0] || n[e - 1][1] <= n[e][1]) && n[e - 1][2] !== null && (n[e][2] === null && n[e - 1][2] !== null ? n[e - 1][2] = null : n[e - 1][2] != null ? +s.mergeType == 2 && n[e - 1][0] === n[e][0] ? n[e - 1][2] = n[e][2] : n[e - 1][2] += n[e][2] : n[e - 1][2] = n[e][2]), n.splice(e, 1), e = n.length);
|
|
1033
|
-
return n.length ? n : null;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
var prefix = "Invariant failed";
|
|
1037
|
-
function invariant(condition, message) {
|
|
1038
|
-
if (condition) {
|
|
1039
|
-
return;
|
|
1040
|
-
}
|
|
1041
|
-
var value = prefix;
|
|
1042
|
-
throw new Error(value);
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
function _(s, n, r) {
|
|
1046
|
-
if (arguments.length === 0) throw new Error("ranges-apply: [THROW_ID_01] inputs missing!");
|
|
1047
|
-
if (typeof s != "string") throw new TypeError(`ranges-apply: [THROW_ID_02] first input argument must be a string! Currently it's: ${typeof s}, equal to: ${JSON.stringify(s, null, 4)}`);
|
|
1048
|
-
if (n && !Array.isArray(n)) throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof n}, equal to: ${JSON.stringify(n, null, 4)}`);
|
|
1049
|
-
if (!n?.filter((e) => e).length) return s;
|
|
1050
|
-
let i;
|
|
1051
|
-
Array.isArray(n) && Number.isInteger(n[0]) && Number.isInteger(n[1]) ? i = [Array.from(n)] : i = Array.from(n);
|
|
1052
|
-
i.filter((e) => e).forEach((e, a) => {
|
|
1053
|
-
if (!Array.isArray(e)) throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${a}th element not an array: ${JSON.stringify(e, null, 4)}, which is ${typeof e}`);
|
|
1054
|
-
if (!Number.isInteger(e[0])) {
|
|
1055
|
-
if (!Number.isInteger(+e[0]) || +e[0] < 0) throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${a}th element, array ${JSON.stringify(e, null, 0)}. Its first element is not an integer, string index, but ${typeof e[0]}, equal to: ${JSON.stringify(e[0], null, 4)}.`);
|
|
1056
|
-
i[a][0] = +i[a][0];
|
|
1057
|
-
}
|
|
1058
|
-
if (!Number.isInteger(e[1])) {
|
|
1059
|
-
if (!Number.isInteger(+e[1]) || +e[1] < 0) throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${a}th element, array ${JSON.stringify(e, null, 0)}. Its second element is not an integer, string index, but ${typeof e[1]}, equal to: ${JSON.stringify(e[1], null, 4)}.`);
|
|
1060
|
-
i[a][1] = +i[a][1];
|
|
1061
|
-
}
|
|
1062
|
-
});
|
|
1063
|
-
let l = b(i, { progressFn: (e) => {
|
|
1064
|
-
} });
|
|
1065
|
-
invariant(l);
|
|
1066
|
-
let u = l.length;
|
|
1067
|
-
if (u > 0) {
|
|
1068
|
-
let e = s.slice(l[u - 1][1]);
|
|
1069
|
-
s = l.reduce((a, $, o, y) => {
|
|
1070
|
-
let f = o === 0 ? 0 : y[o - 1][1], d = y[o][0];
|
|
1071
|
-
return `${a}${s.slice(f, d)}${y[o][2] || ""}`;
|
|
1072
|
-
}, ""), s += e;
|
|
1073
|
-
}
|
|
1074
|
-
return s;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
function D$1(l, u = 1) {
|
|
1078
|
-
let g = " ";
|
|
1079
|
-
function $(e) {
|
|
1080
|
-
return Array.from(e).reverse().join("");
|
|
1081
|
-
}
|
|
1082
|
-
function p(e, r, o) {
|
|
1083
|
-
let t = o ? `
|
|
1084
|
-
` : "\r", i = o ? "\r" : `
|
|
1085
|
-
`;
|
|
1086
|
-
if (!e) return e;
|
|
1087
|
-
let c = 0, s = "";
|
|
1088
|
-
for (let n = 0, f = e.length; n < f; n++) (e[n] === t || e[n] === i && e[n - 1] !== t) && c++, `\r
|
|
1089
|
-
`.includes(e[n]) || e[n] === g ? (e[n] === g ? s += e[n] : e[n] === t ? c <= r && (s += e[n], e[n + 1] === i && (s += e[n + 1], n++)) : e[n] === i && e?.[n - 1] !== t && c <= r && (s += e[n])) : (!e[n + 1] && !c && (s += " "));
|
|
1090
|
-
return s;
|
|
1091
|
-
}
|
|
1092
|
-
if (typeof l == "string" && l.length) {
|
|
1093
|
-
let e = 1;
|
|
1094
|
-
typeof +u == "number" && Number.isInteger(+u) && +u >= 0 && (e = +u);
|
|
1095
|
-
let r = "", o = "";
|
|
1096
|
-
if (!l.trim()) r = l;
|
|
1097
|
-
else if (!l[0].trim()) {
|
|
1098
|
-
for (let t = 0, i = l.length; t < i; t++) if (l[t].trim()) {
|
|
1099
|
-
r = l.slice(0, t);
|
|
1100
|
-
break;
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
if (l.trim() && (l.slice(-1).trim() === "" || l.slice(-1) === g)) {
|
|
1104
|
-
for (let t = l.length; t--; ) if (l[t].trim()) {
|
|
1105
|
-
o = l.slice(t + 1);
|
|
1106
|
-
break;
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
return `${p(r, e, false)}${l.trim()}${$(p($(o), e, true))}`;
|
|
1110
|
-
}
|
|
1111
|
-
return l;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
var y = { mergeType: 1, progressFn: null, joinRangesThatTouchEdges: true };
|
|
1115
|
-
function f(p, t) {
|
|
1116
|
-
function r(e) {
|
|
1117
|
-
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
1118
|
-
}
|
|
1119
|
-
if (!Array.isArray(p) || !p.length) return null;
|
|
1120
|
-
let n;
|
|
1121
|
-
if (t) if (r(t)) {
|
|
1122
|
-
if (n = { ...y, ...t }, n.progressFn && r(n.progressFn) && !Object.keys(n.progressFn).length) n.progressFn = null;
|
|
1123
|
-
else if (n.progressFn && typeof n.progressFn != "function") throw new Error(`ranges-merge: [THROW_ID_01] resolvedOpts.progressFn must be a function! It was given of a type: "${typeof n.progressFn}", equal to ${JSON.stringify(n.progressFn, null, 4)}`);
|
|
1124
|
-
if (![1, 2, "1", "2"].includes(n.mergeType)) throw new Error(`ranges-merge: [THROW_ID_02] resolvedOpts.mergeType was customised to a wrong thing! It was given of a type: "${typeof n.mergeType}", equal to ${JSON.stringify(n.mergeType, null, 4)}`);
|
|
1125
|
-
if (typeof n.joinRangesThatTouchEdges != "boolean") throw new Error(`ranges-merge: [THROW_ID_04] resolvedOpts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof n.joinRangesThatTouchEdges}", equal to ${JSON.stringify(n.joinRangesThatTouchEdges, null, 4)}`);
|
|
1126
|
-
} else throw new Error(`ranges-merge: [THROW_ID_03] the second input argument must be a plain object. It was given as:
|
|
1127
|
-
${JSON.stringify(t, null, 4)} (type ${typeof t})`);
|
|
1128
|
-
else n = { ...y };
|
|
1129
|
-
let i = p.filter((e) => Array.isArray(e)).map((e) => [...e]).filter((e) => e[2] !== void 0 || e[0] !== e[1]), s, o, l;
|
|
1130
|
-
n.progressFn ? s = g(i, { progressFn: (e) => {
|
|
1131
|
-
l = Math.floor(e / 5), l !== o && (o = l, n.progressFn != null && n.progressFn(l));
|
|
1132
|
-
} }) : s = g(i);
|
|
1133
|
-
let d = s.length - 1;
|
|
1134
|
-
for (let e = d; e > 0; e--) n.progressFn && (l = Math.floor((1 - e / d) * 78) + 21, l !== o && l > o && (o = l, n.progressFn(l))), (s[e][0] <= s[e - 1][0] || !n.joinRangesThatTouchEdges && s[e][0] < s[e - 1][1] || n.joinRangesThatTouchEdges && s[e][0] <= s[e - 1][1]) && (s[e - 1][0] = Math.min(s[e][0], s[e - 1][0]), s[e - 1][1] = Math.max(s[e][1], s[e - 1][1]), s[e][2] !== void 0 && (s[e - 1][0] >= s[e][0] || s[e - 1][1] <= s[e][1]) && s[e - 1][2] !== null && (s[e][2] === null && s[e - 1][2] !== null ? s[e - 1][2] = null : s[e - 1][2] != null ? +(n || {})?.mergeType == 2 && s[e - 1][0] === s[e][0] ? s[e - 1][2] = s[e][2] : s[e - 1][2] += s[e][2] : s[e - 1][2] = s[e][2]), s.splice(e, 1), e = s.length);
|
|
1135
|
-
return s.length ? s : null;
|
|
1136
|
-
}
|
|
1137
|
-
var R = { limitToBeAddedWhitespace: false, limitLinebreaksCount: 1, mergeType: 1 };
|
|
1138
|
-
var $ = class {
|
|
1139
|
-
constructor(t) {
|
|
1140
|
-
let r$1 = { ...R, ...t };
|
|
1141
|
-
if (r$1.mergeType && r$1.mergeType !== 1 && r$1.mergeType !== 2) if (r(r$1.mergeType) && r$1.mergeType.trim() === "1") r$1.mergeType = 1;
|
|
1142
|
-
else if (r(r$1.mergeType) && r$1.mergeType.trim() === "2") r$1.mergeType = 2;
|
|
1143
|
-
else throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof r$1.mergeType}", equal to ${JSON.stringify(r$1.mergeType, null, 4)}`);
|
|
1144
|
-
this.opts = r$1, this.ranges = [];
|
|
1145
|
-
}
|
|
1146
|
-
ranges;
|
|
1147
|
-
opts;
|
|
1148
|
-
add(t, r$1, n) {
|
|
1149
|
-
if (t == null && r$1 == null) return;
|
|
1150
|
-
if (G$1(t) && !G$1(r$1)) {
|
|
1151
|
-
if (Array.isArray(t)) {
|
|
1152
|
-
if (t.length) {
|
|
1153
|
-
if (t.some((o) => Array.isArray(o))) {
|
|
1154
|
-
t.forEach((o) => {
|
|
1155
|
-
Array.isArray(o) && this.add(...o);
|
|
1156
|
-
});
|
|
1157
|
-
return;
|
|
1158
|
-
}
|
|
1159
|
-
t.length && q$1(+t[0]) && q$1(+t[1]) && this.add(...t);
|
|
1160
|
-
}
|
|
1161
|
-
return;
|
|
1162
|
-
}
|
|
1163
|
-
throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(t, null, 0)}) but second-one, "to" is not (${JSON.stringify(r$1, null, 0)})`);
|
|
1164
|
-
} else if (!G$1(t) && G$1(r$1)) throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(r$1, null, 0)}) but first-one, "from" is not (${JSON.stringify(t, null, 0)})`);
|
|
1165
|
-
let i = +t, s = +r$1;
|
|
1166
|
-
if (q$1(i) && q$1(s)) {
|
|
1167
|
-
if (G$1(n) && !r(n) && !W(n)) throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof n}, equal to:
|
|
1168
|
-
${JSON.stringify(n, null, 4)}`);
|
|
1169
|
-
if (G$1(this.ranges) && Array.isArray(this.last()) && i === this.last()[1]) {
|
|
1170
|
-
if (this.last()[1] = s, this.last()[2], this.last()[2] !== null && G$1(n)) {
|
|
1171
|
-
let o = this.last()[2] && this.last()[2].length && (!this.opts?.mergeType || this.opts.mergeType === 1) ? `${this.last()[2]}${n}` : n;
|
|
1172
|
-
this.opts.limitToBeAddedWhitespace && (o = D$1(o, this.opts.limitLinebreaksCount)), r(o) && !o.length || (this.last()[2] = o);
|
|
1173
|
-
}
|
|
1174
|
-
} else {
|
|
1175
|
-
this.ranges || (this.ranges = []);
|
|
1176
|
-
let o = n !== void 0 && !(r(n) && !n.length) ? [i, s, n && this.opts.limitToBeAddedWhitespace ? D$1(n, this.opts.limitLinebreaksCount) : n] : [i, s];
|
|
1177
|
-
this.ranges.push(o);
|
|
1178
|
-
}
|
|
1179
|
-
} else throw q$1(i) && i >= 0 ? new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof s}" equal to: ${JSON.stringify(s, null, 4)}`) : new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof i}" equal to: ${JSON.stringify(i, null, 4)}`);
|
|
1180
|
-
}
|
|
1181
|
-
push(t, r, n) {
|
|
1182
|
-
this.add(t, r, n);
|
|
1183
|
-
}
|
|
1184
|
-
current() {
|
|
1185
|
-
return Array.isArray(this.ranges) && this.ranges.length ? (this.ranges = f(this.ranges, { mergeType: this.opts.mergeType }), this.ranges && this.opts.limitToBeAddedWhitespace ? this.ranges.map((t) => G$1(t[2]) ? [t[0], t[1], D$1(t[2], this.opts.limitLinebreaksCount)] : t) : this.ranges) : null;
|
|
1186
|
-
}
|
|
1187
|
-
wipe() {
|
|
1188
|
-
this.ranges = [];
|
|
1189
|
-
}
|
|
1190
|
-
replace(t) {
|
|
1191
|
-
if (Array.isArray(t) && t.length) if (Array.isArray(t[0]) && q$1(t[0][0])) this.ranges = Array.from(t);
|
|
1192
|
-
else throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(t[0], null, 4)} should be an array and its first element should be an integer, a string index.`);
|
|
1193
|
-
else this.ranges = [];
|
|
1194
|
-
}
|
|
1195
|
-
last() {
|
|
1196
|
-
return Array.isArray(this.ranges) && this.ranges.length ? this.ranges[this.ranges.length - 1] : null;
|
|
1197
|
-
}
|
|
1198
|
-
};
|
|
1199
|
-
|
|
1200
|
-
I();
|
|
1201
|
-
var c = " ";
|
|
1202
|
-
function D({ str: n, idx: e = 0, stopAtNewlines: l = false, stopAtRawNbsp: o = false }) {
|
|
1203
|
-
if (typeof n != "string" || !n.length || ((!e || typeof e != "number") && (e = 0), !n[e + 1])) return null;
|
|
1204
|
-
if (n[e + 1] && (n[e + 1].trim() || l && `
|
|
1205
|
-
\r`.includes(n[e + 1]) || o && n[e + 1] === c)) return e + 1;
|
|
1206
|
-
if (n[e + 2] && (n[e + 2].trim() || l && `
|
|
1207
|
-
\r`.includes(n[e + 2]) || o && n[e + 2] === c)) return e + 2;
|
|
1208
|
-
for (let t = e + 1, m = n.length; t < m; t++) if (n[t].trim() || l && `
|
|
1209
|
-
\r`.includes(n[t]) || o && n[t] === c) return t;
|
|
1210
|
-
return null;
|
|
1211
|
-
}
|
|
1212
|
-
function E(n, e = 0) {
|
|
1213
|
-
return D({ str: n, idx: e, stopAtNewlines: false, stopAtRawNbsp: false });
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
function ee(t) {
|
|
1217
|
-
return /[-_A-Za-z0-9]/.test(t);
|
|
1218
|
-
}
|
|
1219
|
-
function G(t, m) {
|
|
1220
|
-
if (!t) return [];
|
|
1221
|
-
if (Array.isArray(t)) return t.filter((T) => typeof T == "string" && T.trim());
|
|
1222
|
-
if (typeof t == "string") return t.trim() ? [t] : [];
|
|
1223
|
-
throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_05] ${m} must be array containing zero or more strings or something falsey. Currently it's equal to: ${t}, that a type of ${typeof t}.`);
|
|
1224
|
-
}
|
|
1225
|
-
function j(t, m, T, c) {
|
|
1226
|
-
for (let f = m, b = t.length; f < b; f++) {
|
|
1227
|
-
if (t.startsWith(T, f)) return true;
|
|
1228
|
-
if (t.startsWith(c, f)) return false;
|
|
1229
|
-
}
|
|
1230
|
-
return false;
|
|
1231
|
-
}
|
|
1232
|
-
function Y(t, m, T) {
|
|
1233
|
-
!!t?.quotes?.value && !j(m, T + 1, t.quotes.value, ">"); !j(m, t?.quotes?.next - 1, t?.quotes?.value, ">");
|
|
1234
|
-
return !t?.quotes || !j(m, T + 1, t.quotes.value, ">") && t?.quotes?.next !== -1 && j(m, t?.quotes?.next - 1, t?.quotes?.value, ">");
|
|
1235
|
-
}
|
|
1236
|
-
function ne(t, m) {
|
|
1237
|
-
return (m.match(new RegExp(t, "g")) || []).length;
|
|
1238
|
-
}
|
|
1239
|
-
var P = /* @__PURE__ */ new Set(["!doctype", "abbr", "address", "area", "article", "aside", "audio", "base", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "doctype", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "math", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "param", "picture", "pre", "progress", "rb", "rp", "rt", "rtc", "ruby", "samp", "script", "section", "select", "slot", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "ul", "var", "video", "wbr", "xml"]);
|
|
1240
|
-
var x = /* @__PURE__ */ new Set(["a", "b", "i", "p", "q", "s", "u"]);
|
|
1241
|
-
var q = /* @__PURE__ */ new Set([".", ",", ";", "!", "?"]);
|
|
1242
|
-
var Q = /* @__PURE__ */ new Set([".", ",", "?", ";", ")", "…", '"', "»"]);
|
|
1243
|
-
var te = /* @__PURE__ */ new Set(["a", "abbr", "acronym", "audio", "b", "bdi", "bdo", "big", "button", "canvas", "cite", "code", "data", "datalist", "del", "dfn", "em", "embed", "i", "iframe", "input", "ins", "kbd", "label", "map", "mark", "meter", "noscript", "object", "output", "picture", "progress", "q", "ruby", "s", "samp", "select", "slot", "small", "span", "strong", "sub", "sup", "svg", "template", "textarea", "time", "u", "tt", "var", "video", "wbr"]);
|
|
1244
|
-
var ae = { ignoreTags: [], ignoreTagsWithTheirContents: [], onlyStripTags: [], stripTogetherWithTheirContents: ["script", "style", "xml"], skipHtmlDecoding: false, trimOnlySpaces: false, stripRecognisedHTMLOnly: false, dumpLinkHrefsNearby: { enabled: false, putOnNewLine: false, wrapHeads: "", wrapTails: "" }, ignoreIndentations: false, cb: null, reportProgressFunc: null, reportProgressFuncFrom: 0, reportProgressFuncTo: 100 };
|
|
1245
|
-
function fe(t, m) {
|
|
1246
|
-
let T = Date.now(), c = [], f = [], b = [], $$1 = [], n = {};
|
|
1247
|
-
function re() {
|
|
1248
|
-
n = { attributes: [] };
|
|
1249
|
-
}
|
|
1250
|
-
re();
|
|
1251
|
-
let D = null, w = null, N = null, J = false, o = {}, d = { tagName: "", hrefValue: "", openingTagEnds: void 0 }, E$1 = "", C = false, B = null, F = true;
|
|
1252
|
-
function v$1(e, s, a) {
|
|
1253
|
-
if (Array.isArray(s.stripTogetherWithTheirContents) && (s.stripTogetherWithTheirContents.includes(n.name) || s.stripTogetherWithTheirContents.includes("*"))) if (n.slashPresent && Array.isArray(c) && c.some((i) => i.name === n.name)) {
|
|
1254
|
-
for (let i = c.length; i--; ) if (c[i].name === n.name) {
|
|
1255
|
-
$$1 = $$1.filter(([u, p]) => (u < c[i].lastOpeningBracketAt || u >= e + 1) && (p <= c[i].lastOpeningBracketAt || p > e + 1));
|
|
1256
|
-
let g = e + 1;
|
|
1257
|
-
n.lastClosingBracketAt && (g = n.lastClosingBracketAt + 1), $$1.push([c[i].lastOpeningBracketAt, g]), Q.has(t[e]) && s.cb ? s.cb({ tag: n, deleteFrom: c[i].lastOpeningBracketAt, deleteTo: e + 1, insert: null, rangesArr: a, proposedReturn: [c[i].lastOpeningBracketAt, e, null] }) : s.cb && s.cb({ tag: n, deleteFrom: c[i].lastOpeningBracketAt, deleteTo: e, insert: "", rangesArr: a, proposedReturn: [c[i].lastOpeningBracketAt, e, ""] }), c.splice(i, 1);
|
|
1258
|
-
break;
|
|
1259
|
-
}
|
|
1260
|
-
} else n.slashPresent || c.push(n);
|
|
1261
|
-
else Array.isArray(s.ignoreTagsWithTheirContents) && M(e, s, n) && (F = false);
|
|
1262
|
-
}
|
|
1263
|
-
function L(e, s, a, i, g, u) {
|
|
1264
|
-
if (Array.isArray(r.current()) && typeof a == "number" && r.current()[0][0] === 0 && r.current()[0][1] >= a) return "";
|
|
1265
|
-
if (t.length === i && u && !l?.dumpLinkHrefsNearby?.enabled) return null;
|
|
1266
|
-
let p = "";
|
|
1267
|
-
if (Number.isInteger(a) && a < g && (p += e.slice(a, g)), Number.isInteger(i) && i > u + 1) {
|
|
1268
|
-
let S = e.slice(u + 1, i);
|
|
1269
|
-
i && !E(t, i - 1) && (S = S.trimEnd()), S.includes(`
|
|
1270
|
-
`) && y(i, e) ? p += " " : p += S;
|
|
1271
|
-
}
|
|
1272
|
-
let W = !Q.has(e[s]), Z = e[i - 1] !== ">" || !e[a].trim(), X = !['"', "("].includes(e[g - 1]), ge = ![";", ".", ":", "!"].includes(e[s]);
|
|
1273
|
-
if ((W || Z && X && ge) && (Z || X) && e[s] !== "!" && (!te.has(n.name) || typeof a == "number" && a < g || typeof i == "number" && i > u + 1)) {
|
|
1274
|
-
let S = p.match(/\n/g);
|
|
1275
|
-
return Array.isArray(S) && S.length ? S.length === 1 ? `
|
|
1276
|
-
` : S.length === 2 ? `
|
|
1277
|
-
|
|
1278
|
-
` : `
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
` : " ";
|
|
1282
|
-
}
|
|
1283
|
-
return "";
|
|
1284
|
-
}
|
|
1285
|
-
function U(e, s) {
|
|
1286
|
-
if (e.dumpLinkHrefsNearby?.enabled && d.tagName && d.tagName === n.name && n.lastOpeningBracketAt && (d.openingTagEnds && n.lastOpeningBracketAt > d.openingTagEnds || !d.openingTagEnds) && (C = true), C) {
|
|
1287
|
-
let a = e.dumpLinkHrefsNearby?.putOnNewLine ? `
|
|
1288
|
-
|
|
1289
|
-
` : "";
|
|
1290
|
-
E$1 = `${a}${d.hrefValue}`, (typeof s != "number" || E(t, s - 1)) && (E$1 += a);
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
function y(e, s) {
|
|
1294
|
-
return s ? s[e] === "<" && s[e + 1] !== "%" : t[e] === "<" && t[e + 1] !== "%";
|
|
1295
|
-
}
|
|
1296
|
-
function V(e) {
|
|
1297
|
-
return t[e] === ">" && t[e - 1] !== "%";
|
|
1298
|
-
}
|
|
1299
|
-
function M(e, s, a) {
|
|
1300
|
-
if (s.ignoreTagsWithTheirContents.includes("*")) return true;
|
|
1301
|
-
let i = t.indexOf(`<${a.name}`, e), g = t.indexOf(`</${a.name}`, e);
|
|
1302
|
-
return !a.slashPresent && g === -1 || a.slashPresent && !f.some((u) => u.name === a.name) || g > -1 && i > -1 && i < g ? false : s.ignoreTagsWithTheirContents.includes(a.name);
|
|
1303
|
-
}
|
|
1304
|
-
if (typeof t != "string") throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_01] Input must be string! Currently it's: ${(typeof t).toLowerCase()}, equal to:
|
|
1305
|
-
${JSON.stringify(t, null, 4)}`);
|
|
1306
|
-
if (m) if (u(m)) {
|
|
1307
|
-
if (m.reportProgressFunc && typeof m.reportProgressFunc != "function") throw new Error(`string-strip-html/stripHtml(): [THROW_ID_03] The Optional Options Object's key reportProgressFunc, callback function, should be a function but it was given as type ${typeof m.reportProgressFunc}, equal to ${JSON.stringify(m.reportProgressFunc, null, 4)}`);
|
|
1308
|
-
if (typeof m.dumpLinkHrefsNearby == "boolean" && m.dumpLinkHrefsNearby != null) throw new Error(`string-strip-html/stripHtml(): [THROW_ID_04] The Optional Options Object's key should be a plain object but it was given as type ${typeof m.dumpLinkHrefsNearby}, equal to ${JSON.stringify(m.dumpLinkHrefsNearby, null, 4)}`);
|
|
1309
|
-
} else throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_02] Optional Options Object must be a plain object! Currently it's: ${(typeof m).toLowerCase()}, equal to:
|
|
1310
|
-
${JSON.stringify(m, null, 4)}`);
|
|
1311
|
-
function _$1() {
|
|
1312
|
-
C && (d = { tagName: "", hrefValue: "", openingTagEnds: void 0 }, C = false);
|
|
1313
|
-
}
|
|
1314
|
-
let l = { ...ae, ...m, dumpLinkHrefsNearby: Object.assign({}, ae.dumpLinkHrefsNearby, m?.dumpLinkHrefsNearby) };
|
|
1315
|
-
if (v(l, "returnRangesOnly")) throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_05] The Optional Options Object's key returnRangesOnly has been removed from the API since v.5 release.");
|
|
1316
|
-
if (l.reportProgressFunc) {
|
|
1317
|
-
if (typeof l.reportProgressFuncFrom != "number") throw new Error(`string-strip-html/stripHtml(): [THROW_ID_06] The Optional Options Object's key reportProgressFuncFrom, callback function's "from" range, should be a number but it was given as type ${typeof l.reportProgressFuncFrom}, equal to ${JSON.stringify(l.reportProgressFuncFrom, null, 4)}`);
|
|
1318
|
-
if (typeof l.reportProgressFuncTo != "number") throw new Error(`string-strip-html/stripHtml(): [THROW_ID_07] The Optional Options Object's key reportProgressFuncTo, callback function's "to" range, should be a number but it was given as type ${typeof l.reportProgressFuncTo}, equal to ${JSON.stringify(l.reportProgressFuncTo, null, 4)}`);
|
|
1319
|
-
}
|
|
1320
|
-
l.ignoreTags = G(l.ignoreTags, "resolvedOpts.ignoreTags"), l.onlyStripTags = G(l.onlyStripTags, "resolvedOpts.onlyStripTags");
|
|
1321
|
-
let z = !!l.onlyStripTags.length;
|
|
1322
|
-
l.onlyStripTags.length && l.ignoreTags.length && (l.onlyStripTags = without(l.onlyStripTags, ...l.ignoreTags)), l.stripTogetherWithTheirContents ? typeof l.stripTogetherWithTheirContents == "string" && l.stripTogetherWithTheirContents.length && (l.stripTogetherWithTheirContents = [l.stripTogetherWithTheirContents]) : l.stripTogetherWithTheirContents = [];
|
|
1323
|
-
let I = {};
|
|
1324
|
-
if (l.stripTogetherWithTheirContents && Array.isArray(l.stripTogetherWithTheirContents) && l.stripTogetherWithTheirContents.length && !l.stripTogetherWithTheirContents.every((e, s) => typeof e != "string" ? (I.el = e, I.i = s, false) : true)) throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_08] Optional Options Object's key stripTogetherWithTheirContents was set to contain not just string elements! For example, element at index ${I.i} has a value ${I.el} which is not string but ${(typeof I.el).toLowerCase()}.`);
|
|
1325
|
-
l.cb || (l.cb = ({ rangesArr: e, proposedReturn: s }) => {
|
|
1326
|
-
s && e.push(...s);
|
|
1327
|
-
});
|
|
1328
|
-
let r = new $({ limitToBeAddedWhitespace: true, limitLinebreaksCount: 2 });
|
|
1329
|
-
if (!l.skipHtmlDecoding) for (; t !== decode(t, { scope: "strict" }); ) t = decode(t, { scope: "strict" });
|
|
1330
|
-
let R = false, A = false, H = 0, K = 0, h = t.length, ue = Math.floor(h / 2);
|
|
1331
|
-
for (let e = 0; e < h; e++) {
|
|
1332
|
-
if (l.reportProgressFunc && (h > 1e3 && h < 2e3 ? e === ue && l.reportProgressFunc(Math.floor((l.reportProgressFuncTo - l.reportProgressFuncFrom) / 2)) : h >= 2e3 && (H = l.reportProgressFuncFrom + Math.floor(e / h * (l.reportProgressFuncTo - l.reportProgressFuncFrom)), H !== K && (K = H, l.reportProgressFunc(H)))), Object.keys(n).length > 1 && n.lastClosingBracketAt && n.lastClosingBracketAt < e && t[e] !== " " && B === null && (B = e), !R && t[e] === "%" && t[e - 1] === "{" && t.includes("%}", e + 1)) {
|
|
1333
|
-
N = null;
|
|
1334
|
-
let s = t.indexOf("%}", e) - 1;
|
|
1335
|
-
if (s > e) {
|
|
1336
|
-
e = s;
|
|
1337
|
-
continue;
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
if (!R && V(e) && (!n || Object.keys(n).length < 2) && e > 1) {
|
|
1341
|
-
for (let s = e; s--; ) if (t[s - 1] === void 0 || V(s)) {
|
|
1342
|
-
let a = t[s - 1] === void 0 ? s : s + 1, i = t.slice(a, e + 1) || "";
|
|
1343
|
-
if ((i.includes("/>") || i.includes("/ >") || i.includes('="') || i.includes("='")) && t !== `<${trim(i.trim(), "/>")}>` && [...P].some((g) => trim(i.trim().split(/\s+/).filter((u) => u.trim()).filter((u, p) => p === 0), "/>").toLowerCase() === g) && fe(`<${i.trim()}>`, l).result === "") {
|
|
1344
|
-
(!b.length || b[b.length - 1][0] !== n.lastOpeningBracketAt) && b.push([a, e + 1]), (!$$1.length || $$1[$$1.length - 1][0] !== n.lastOpeningBracketAt) && $$1.push([a, e + 1]);
|
|
1345
|
-
let g = L(t, e, a, e + 1, a, e + 1), u = e + 1;
|
|
1346
|
-
if (t[u] && !t[u].trim()) {
|
|
1347
|
-
for (let p = u; p < h; p++) if (t[p].trim()) {
|
|
1348
|
-
u = p;
|
|
1349
|
-
break;
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
l.cb({ tag: n, deleteFrom: a, deleteTo: u, insert: g, rangesArr: r, proposedReturn: [a, u, g] });
|
|
1353
|
-
}
|
|
1354
|
-
break;
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
if (!A && t[e] === "/" && !n.quotes?.value && Number.isInteger(n.lastOpeningBracketAt) && !Number.isInteger(n.lastClosingBracketAt) && (n.slashPresent = e), t[e] === '"' || t[e] === "'") if (!A && n.nameStarts && n?.quotes?.value === t[e]) if (o.valueStarts === void 0) o = {}, delete n.quotes;
|
|
1358
|
-
else {
|
|
1359
|
-
o.valueEnds = e, o.value = t.slice(o.valueStarts, e), n.attributes.push(o), o = {}, delete n.quotes;
|
|
1360
|
-
let s;
|
|
1361
|
-
l.dumpLinkHrefsNearby?.enabled && !c.length && n.attributes.some((a) => {
|
|
1362
|
-
if (typeof a.name == "string" && a.name.toLowerCase() === "href") return s = `${l.dumpLinkHrefsNearby?.wrapHeads || ""}${a.value}${l.dumpLinkHrefsNearby?.wrapTails || ""}`, true;
|
|
1363
|
-
}) && (d = { tagName: n.name, hrefValue: s, openingTagEnds: void 0 });
|
|
1364
|
-
}
|
|
1365
|
-
else !A && !n.quotes && n.nameStarts && (n.quotes = {}, n.quotes.value = t[e], n.quotes.start = e, n.quotes.next = t.indexOf(t[e], e + 1), o.nameStarts && o.nameEnds && o.nameEnds < e && o.nameStarts < e && !o.valueStarts && (o.name = t.slice(o.nameStarts, o.nameEnds)));
|
|
1366
|
-
if (n.nameStarts !== void 0 && n.nameEnds === void 0 && (!t[e].trim() || !ee(t[e]))) {
|
|
1367
|
-
if (n.nameEnds = e, n.name = t.slice(n.nameStarts, n.nameEnds + (!V(e) && t[e] !== "/" && t[e + 1] === void 0 ? 1 : 0)), t[n.nameStarts - 1] !== "!" && !n.name.replace(/-/g, "").length || /^\d+$/.test(n.name[0])) {
|
|
1368
|
-
n = {};
|
|
1369
|
-
continue;
|
|
1370
|
-
}
|
|
1371
|
-
if (typeof n.name == "string" && n.name.toLowerCase() === "doctype" && (A = true), y(e)) {
|
|
1372
|
-
U(l);
|
|
1373
|
-
let s = L(t, e, n.leftOuterWhitespace, e, n.lastOpeningBracketAt, e);
|
|
1374
|
-
(l.stripTogetherWithTheirContents.includes(n.name) || l.stripTogetherWithTheirContents.includes("*")) && ($$1 = $$1.filter(([a, i]) => !(a === n.leftOuterWhitespace && i === e))), l.cb({ tag: n, deleteFrom: n.leftOuterWhitespace, deleteTo: e, insert: `${s}${E$1}${s}`, rangesArr: r, proposedReturn: [n.leftOuterWhitespace, e, `${s}${E$1}${s}`] }), _$1(), v$1(e, l, r);
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
if (n.quotes?.start && n.quotes.start < e && !n.quotes.end && o.nameEnds && o.equalsAt && !o.valueStarts && (o.valueStarts = e), !n.quotes && o.nameEnds && t[e] === "=" && !o.valueStarts && !o.equalsAt && (o.equalsAt = e), !n.quotes && o.nameStarts && o.nameEnds && !o.valueStarts && t[e].trim() && t[e] !== "=" && (n.attributes.push(o), o = {}), !n.quotes && o.nameStarts && !o.nameEnds && (A && `'"`.includes(t[o.nameStarts]) ? o.nameStarts < e && t[e] === t[o.nameStarts] && (o.nameEnds = e + 1, o.name = t.slice(o.nameStarts, o.nameEnds)) : t[e].trim() ? t[e] === "=" ? o.equalsAt || (o.nameEnds = e, o.equalsAt = e, o.name = t.slice(o.nameStarts, o.nameEnds)) : t[e] === "/" || V(e) ? (o.nameEnds = e, o.name = t.slice(o.nameStarts, o.nameEnds), n.attributes.push(o), o = {}) : y(e) && (o.nameEnds = e, o.name = t.slice(o.nameStarts, o.nameEnds), n.attributes.push(o), o = {}) : (o.nameEnds = e, o.name = t.slice(o.nameStarts, o.nameEnds))), !n.quotes && n.nameEnds < e && !t[e - 1].trim() && t[e].trim() && !"<>/!".includes(t[e]) && !o.nameStarts && !n.lastClosingBracketAt && (o.nameStarts = e), n.lastOpeningBracketAt !== null && n.lastOpeningBracketAt < e && t[e] === "/" && n.onlyPlausible && (n.onlyPlausible = false), n.lastOpeningBracketAt !== null && n.lastOpeningBracketAt < e && t[e] !== "/" && (n.onlyPlausible === void 0 && ((!t[e].trim() || y(e)) && !n.slashPresent ? n.onlyPlausible = true : n.onlyPlausible = false), t[e].trim() && n.nameStarts === void 0 && !y(e) && t[e] !== "/" && !V(e) && t[e] !== "!" && (n.nameStarts = e, n.nameContainsLetters = false)), n.nameStarts && !n.quotes && typeof t[e] == "string" && t[e].toLowerCase() !== t[e].toUpperCase() && (n.nameContainsLetters = true), V(e) && (Y(n, t, e) || n.quotes.value && typeof n.lastOpeningBracketAt == "number" && ne(n.quotes.value, t.slice(n.lastOpeningBracketAt, e)) % 2 === 1 && !t.slice(n.lastOpeningBracketAt + 1, e).includes("<") && !t.slice(n.lastOpeningBracketAt + 1, e).includes(">")) && n.lastOpeningBracketAt !== void 0 && (n.lastClosingBracketAt = e, B = null, Object.keys(o).length && (n.attributes.push(o), o = {}), l.dumpLinkHrefsNearby?.enabled && d.tagName && !d.openingTagEnds && (d.openingTagEnds = e)), (!A || t[e] === ">") && n.lastOpeningBracketAt !== void 0) {
|
|
1378
|
-
if (n.lastClosingBracketAt === void 0) {
|
|
1379
|
-
if (n.lastOpeningBracketAt < e && !y(e) && (t[e + 1] === void 0 || y(e + 1) && !n?.quotes?.value) && n.nameContainsLetters && typeof n.nameStarts == "number") {
|
|
1380
|
-
if (n.name = t.slice(n.nameStarts, n.nameEnds || e + 1).toLowerCase(), (!b.length || b[b.length - 1][0] !== n.lastOpeningBracketAt) && b.push([n.lastOpeningBracketAt, e + 1]), l.ignoreTags.includes(n.name) || M(e, l, n) || !P.has(n.name) && (n.onlyPlausible || l.stripRecognisedHTMLOnly)) {
|
|
1381
|
-
n = {}, o = {};
|
|
1382
|
-
continue;
|
|
1383
|
-
}
|
|
1384
|
-
if ((P.has(n.name) || x.has(n.name)) && (n.onlyPlausible === false || n.onlyPlausible === true && n.attributes.length) || t[e + 1] === void 0) {
|
|
1385
|
-
U(l);
|
|
1386
|
-
let s = L(t, e, n.leftOuterWhitespace, e + 1, n.lastOpeningBracketAt, n.lastClosingBracketAt);
|
|
1387
|
-
R && n.name === "script" && n.slashPresent && (R = false);
|
|
1388
|
-
let a;
|
|
1389
|
-
s === null || E$1 === null ? a = null : a = `${s}${E$1}${s}`, l.cb({ tag: n, deleteFrom: n.leftOuterWhitespace, deleteTo: e + 1, insert: a, rangesArr: r, proposedReturn: [n.leftOuterWhitespace, e + 1, a] }), _$1(), v$1(e, l, r);
|
|
1390
|
-
}
|
|
1391
|
-
if (!$$1.length || $$1[$$1.length - 1][0] !== n.lastOpeningBracketAt && $$1[$$1.length - 1][1] !== e + 1) if (l.stripTogetherWithTheirContents.includes(n.name) || l.stripTogetherWithTheirContents.includes("*")) {
|
|
1392
|
-
let s;
|
|
1393
|
-
for (let a = c.length; a--; ) c[a].name === n.name && (s = c[a]);
|
|
1394
|
-
s ? ($$1 = $$1.filter(([a]) => a !== s.lastOpeningBracketAt), $$1.push([s.lastOpeningBracketAt, e + 1])) : $$1.push([n.lastOpeningBracketAt, e + 1]);
|
|
1395
|
-
} else $$1.push([n.lastOpeningBracketAt, e + 1]);
|
|
1396
|
-
}
|
|
1397
|
-
} else if (e > n.lastClosingBracketAt && t[e].trim() || t[e + 1] === void 0 || l.ignoreIndentations && `\r
|
|
1398
|
-
`.includes(t[e])) {
|
|
1399
|
-
let s = n.lastClosingBracketAt === e ? e + 1 : e;
|
|
1400
|
-
l.trimOnlySpaces && s === h - 1 && B !== null && B < e && (s = B), (!b.length || b[b.length - 1][0] !== n.lastOpeningBracketAt) && b.push([n.lastOpeningBracketAt, n.lastClosingBracketAt + 1]);
|
|
1401
|
-
let a = l.ignoreTags.includes(n.name), i = M(e, l, n);
|
|
1402
|
-
if (!F || l.stripRecognisedHTMLOnly && typeof n.name == "string" && !P.has(n.name.toLowerCase()) && !x.has(n.name.toLowerCase()) || !z && (a || i) || z && !l.onlyStripTags.includes(n.name) || l.ignoreTagsWithTheirContents.includes(n.name)) {
|
|
1403
|
-
if (i) if (n.slashPresent) {
|
|
1404
|
-
for (let g = f.length; g--; ) if (f[g].name === n.name) {
|
|
1405
|
-
f.splice(g, 1);
|
|
1406
|
-
break;
|
|
1407
|
-
}
|
|
1408
|
-
f.length || (F = true);
|
|
1409
|
-
} else F && (F = false), f.push(n);
|
|
1410
|
-
l.cb({ tag: n, deleteFrom: null, deleteTo: null, insert: null, rangesArr: r, proposedReturn: null }), n = {}, o = {};
|
|
1411
|
-
} else if (!n.onlyPlausible || n.attributes.length === 0 && n.name && (P.has(n.name.toLowerCase()) || x.has(n.name.toLowerCase())) || n.attributes?.some((g) => g.equalsAt)) {
|
|
1412
|
-
(!$$1.length || $$1[$$1.length - 1][0] !== n.lastOpeningBracketAt) && $$1.push([n.lastOpeningBracketAt, n.lastClosingBracketAt + 1]);
|
|
1413
|
-
let g = L(t, e, n.leftOuterWhitespace, s, n.lastOpeningBracketAt, n.lastClosingBracketAt);
|
|
1414
|
-
E$1 = "", C = false, U(l, s);
|
|
1415
|
-
let u;
|
|
1416
|
-
typeof E$1 == "string" && E$1.length ? (u = `${g}${E$1}${g === `
|
|
1417
|
-
|
|
1418
|
-
` ? `
|
|
1419
|
-
` : g}`, s === n.lastClosingBracketAt + 1 && (!t[s] || !q.has(t[s])) && (u += " "), n.leftOuterWhitespace === n.lastOpeningBracketAt && r.last() && r.last()[1] < n.lastOpeningBracketAt && (!l?.dumpLinkHrefsNearby?.putOnNewLine || !q.has(t[s])) && (u = " " + u)) : u = g, u !== null && (n.leftOuterWhitespace === 0 || !E(t, s - 1)) && (!l.dumpLinkHrefsNearby?.enabled || n.name !== "a") && (u = void 0);
|
|
1420
|
-
let p = 0;
|
|
1421
|
-
if (C && q.has(t[s])) {
|
|
1422
|
-
l.dumpLinkHrefsNearby?.putOnNewLine && (u = `${t[s]}${u || ""}`);
|
|
1423
|
-
let W = E(t, s);
|
|
1424
|
-
W && u?.endsWith(`
|
|
1425
|
-
`) ? p += W - e : (!W || W > e) && p++;
|
|
1426
|
-
}
|
|
1427
|
-
l.cb({ tag: n, deleteFrom: n.leftOuterWhitespace, deleteTo: s + p, insert: u, rangesArr: r, proposedReturn: [n.leftOuterWhitespace, s + p, u] }), _$1(), v$1(e, l, r);
|
|
1428
|
-
} else n = {};
|
|
1429
|
-
V(e) || (n = {});
|
|
1430
|
-
}
|
|
1431
|
-
A && (A = false);
|
|
1432
|
-
}
|
|
1433
|
-
if ((!R || t[e] === "<" && E(t, E(t, e)) && t[E(t, e)] === "/" && t.startsWith("script", E(t, E(t, e)))) && y(e) && !y(e - 1) && !`'"`.includes(t[e + 1]) && (!`'"`.includes(t[e + 2]) || /\w/.test(t[e + 1])) && !(t[e + 1] === "c" && t[e + 2] === ":") && !(t[e + 1] === "f" && t[e + 2] === "m" && t[e + 3] === "t" && t[e + 4] === ":") && !(t[e + 1] === "s" && t[e + 2] === "q" && t[e + 3] === "l" && t[e + 4] === ":") && !(t[e + 1] === "x" && t[e + 2] === ":") && !(t[e + 1] === "f" && t[e + 2] === "n" && t[e + 3] === ":") && Y(n, t, e)) {
|
|
1434
|
-
if (V(E(t, e))) continue;
|
|
1435
|
-
if (n.nameEnds && n.nameEnds < e && !n.lastClosingBracketAt && (n.onlyPlausible === true && n.attributes?.length || n.onlyPlausible === false)) {
|
|
1436
|
-
let s = L(t, e, n.leftOuterWhitespace, e, n.lastOpeningBracketAt, e);
|
|
1437
|
-
l.cb({ tag: n, deleteFrom: n.leftOuterWhitespace, deleteTo: e, insert: s, rangesArr: r, proposedReturn: [n.leftOuterWhitespace, e, s] }), v$1(e, l, r), n = {}, o = {};
|
|
1438
|
-
}
|
|
1439
|
-
if (n.lastOpeningBracketAt !== void 0 && n.onlyPlausible && n.name && !n.quotes && (n.lastOpeningBracketAt = void 0, n.name = void 0, n.onlyPlausible = false), (n.lastOpeningBracketAt === void 0 || !n.onlyPlausible) && !n.quotes && (n.lastOpeningBracketAt = e, n.slashPresent = false, n.attributes = [], D === null ? n.leftOuterWhitespace = e : l.trimOnlySpaces && D === 0 ? n.leftOuterWhitespace = w || e : n.leftOuterWhitespace = D, `${t[e + 1]}${t[e + 2]}${t[e + 3]}` == "!--" || `${t[e + 1]}${t[e + 2]}${t[e + 3]}${t[e + 4]}${t[e + 5]}${t[e + 6]}${t[e + 7]}${t[e + 8]}` == "![CDATA[")) {
|
|
1440
|
-
let s = true;
|
|
1441
|
-
t[e + 2] === "-" && (s = false);
|
|
1442
|
-
let a;
|
|
1443
|
-
for (let i = e; i < h; i++) if ((!a && s && `${t[i - 2]}${t[i - 1]}${t[i]}` == "]]>" || !s && `${t[i - 2]}${t[i - 1]}${t[i]}` == "-->") && (a = i), a && (a < i && t[i].trim() || t[i + 1] === void 0)) {
|
|
1444
|
-
let g = i;
|
|
1445
|
-
(t[i + 1] === void 0 && !t[i].trim() || t[i] === ">") && (g += 1), (!b.length || b[b.length - 1][0] !== n.lastOpeningBracketAt) && b.push([n.lastOpeningBracketAt, a + 1]), (!$$1.length || $$1[$$1.length - 1][0] !== n.lastOpeningBracketAt) && $$1.push([n.lastOpeningBracketAt, a + 1]);
|
|
1446
|
-
let u = L(t, i, n.leftOuterWhitespace, g, n.lastOpeningBracketAt, a);
|
|
1447
|
-
l.cb({ tag: n, deleteFrom: n.leftOuterWhitespace, deleteTo: g, insert: u, rangesArr: r, proposedReturn: [n.leftOuterWhitespace, g, u] }), e = i - 1, t[i] === ">" && (e = i), n = {}, o = {};
|
|
1448
|
-
break;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
}
|
|
1452
|
-
!t[e].trim() || t[e].charCodeAt(0) === 847 ? (D === null && (D = e, n.lastOpeningBracketAt !== void 0 && n.lastOpeningBracketAt < e && n.nameStarts && n.nameStarts < n.lastOpeningBracketAt && e === n.lastOpeningBracketAt + 1 && !c.some((s) => s.name === n.name) && (n.onlyPlausible = true, n.name = void 0, n.nameStarts = void 0)), (t[e] === `
|
|
1453
|
-
` || t[e] === "\r") && (N = e, J && (J = false))) : (D !== null && (!n.quotes && o.equalsAt > D - 1 && o.nameEnds && o.equalsAt > o.nameEnds && t[e] !== '"' && t[e] !== "'" && (u(o) && n.attributes.push(o), o = {}, n.equalsSpottedAt = void 0), D = null), J || (J = true, F && !R && typeof N == "number" && e && N < e - 1 && (t.slice(N + 1, e).trim() ? N = null : l.ignoreIndentations || r.push([N + 1, e])))), t[e] === " " ? w === null && (w = e) : w !== null && (w = null), n.name === "script" && (R = !n.slashPresent);
|
|
1454
|
-
}
|
|
1455
|
-
if (t && !l.ignoreIndentations && (l.trimOnlySpaces && t[0] === " " || !l.trimOnlySpaces && !t[0].trim())) for (let e = 0; e < h; e++) if (l.trimOnlySpaces && t[e] !== " " || !l.trimOnlySpaces && t[e].trim()) {
|
|
1456
|
-
r.push([0, e]);
|
|
1457
|
-
break;
|
|
1458
|
-
} else t[e + 1] || r.push([0, e + 1]);
|
|
1459
|
-
if (t && (l.trimOnlySpaces && t[~-t.length] === " " || !l.trimOnlySpaces && !t[~-t.length].trim())) {
|
|
1460
|
-
for (let e = t.length; e--; ) if (l.trimOnlySpaces && t[e] !== " " || !l.trimOnlySpaces && t[e].trim()) {
|
|
1461
|
-
r.push([e + 1, h]);
|
|
1462
|
-
break;
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
let k = r.current();
|
|
1466
|
-
if (!m?.cb && k) {
|
|
1467
|
-
if (k[0] && !k[0][0]) {
|
|
1468
|
-
r.ranges[0] = [r.ranges[0][0], r.ranges[0][1]];
|
|
1469
|
-
}
|
|
1470
|
-
if (k[k.length - 1]?.[1] === t.length) {
|
|
1471
|
-
if (r.ranges) {
|
|
1472
|
-
let s = r.ranges[r.ranges.length - 1][0];
|
|
1473
|
-
t[s - 1] && (l.trimOnlySpaces && t[s - 1] === " " || !l.trimOnlySpaces && !t[s - 1].trim()) && (s -= 1);
|
|
1474
|
-
let a = r.ranges[r.ranges.length - 1][2];
|
|
1475
|
-
r.ranges[r.ranges.length - 1] = [s, r.ranges[r.ranges.length - 1][1]], a?.trim() && r.ranges[r.ranges.length - 1].push(a.trimEnd());
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
return { log: { timeTakenInMilliseconds: Date.now() - T }, result: _(t, r.current()), ranges: r.current(), allTagLocations: b, filteredTagLocations: $$1 };
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
const excerpt = (html, limit, options = {}) => {
|
|
1483
|
-
if (typeof html !== "string") {
|
|
1484
|
-
throw new TypeError(`Expected \`html\` to be a string, got ${typeof html}`);
|
|
1485
|
-
}
|
|
1486
|
-
if (typeof limit !== "number") {
|
|
1487
|
-
throw new TypeError(`Expected \`limit\` to be a number, got ${typeof limit}`);
|
|
1488
|
-
}
|
|
1489
|
-
if (html === "" || limit <= 0) {
|
|
1490
|
-
return "";
|
|
1491
|
-
}
|
|
1492
|
-
const plainText = fe(html).result;
|
|
1493
|
-
if (plainText.length <= limit) {
|
|
1494
|
-
return plainText;
|
|
1495
|
-
}
|
|
1496
|
-
return truncate(plainText, limit, {
|
|
1497
|
-
...options,
|
|
1498
|
-
position: "end"
|
|
1499
|
-
});
|
|
1500
|
-
};
|
|
1501
|
-
|
|
1502
|
-
export { excerpt };
|