@esposter/shared 2.18.2 → 2.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +390 -76
- package/dist/index.js +1026 -942
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
10
|
-
var
|
|
10
|
+
var __exportAll = (all, no_symbols) => {
|
|
11
11
|
let target = {};
|
|
12
12
|
for (var name in all) {
|
|
13
13
|
__defProp(target, name, {
|
|
@@ -15,7 +15,7 @@ var __export = (all, symbols) => {
|
|
|
15
15
|
enumerable: true
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
if (
|
|
18
|
+
if (!no_symbols) {
|
|
19
19
|
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
20
20
|
}
|
|
21
21
|
return target;
|
|
@@ -36,6 +36,55 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
36
36
|
};
|
|
37
37
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
38
|
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/test/constants.ts
|
|
41
|
+
const AllSpecialValues = [
|
|
42
|
+
{
|
|
43
|
+
isPlainObject: true,
|
|
44
|
+
value: {}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
isPlainObject: true,
|
|
48
|
+
value: Object.create(null)
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
isPlainObject: false,
|
|
52
|
+
value: []
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
isPlainObject: false,
|
|
56
|
+
value: /* @__PURE__ */ new Date()
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
isPlainObject: false,
|
|
60
|
+
value: null
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
isPlainObject: false,
|
|
64
|
+
value: void 0
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
isPlainObject: false,
|
|
68
|
+
value: ""
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
isPlainObject: false,
|
|
72
|
+
value: 0
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
isPlainObject: false,
|
|
76
|
+
value: Symbol("")
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
isPlainObject: false,
|
|
80
|
+
value: () => {}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
isPlainObject: false,
|
|
84
|
+
value: /* @__PURE__ */ new RegExp("")
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
|
|
39
88
|
//#endregion
|
|
40
89
|
//#region src/models/error/InvalidOperationError.ts
|
|
41
90
|
var InvalidOperationError = class extends Error {
|
|
@@ -89,6 +138,7 @@ const RoutePath = {
|
|
|
89
138
|
Dungeons: "/dungeons",
|
|
90
139
|
EmailEditor: "/email-editor",
|
|
91
140
|
FlowchartEditor: "/flowchart-editor",
|
|
141
|
+
FluidSimulator: "/fluid-simulator",
|
|
92
142
|
Github: `https://github.com/${SITE_NAME}/${SITE_NAME}`,
|
|
93
143
|
Index: "/",
|
|
94
144
|
Login: "/login",
|
|
@@ -132,28 +182,28 @@ const itemMetadataSchema = z.object({
|
|
|
132
182
|
|
|
133
183
|
//#endregion
|
|
134
184
|
//#region src/models/shared/Operation.ts
|
|
135
|
-
let Operation = /* @__PURE__ */ function(Operation
|
|
136
|
-
Operation
|
|
137
|
-
Operation
|
|
138
|
-
Operation
|
|
139
|
-
Operation
|
|
140
|
-
Operation
|
|
141
|
-
Operation
|
|
142
|
-
return Operation
|
|
185
|
+
let Operation = /* @__PURE__ */ function(Operation) {
|
|
186
|
+
Operation["Create"] = "Create";
|
|
187
|
+
Operation["Delete"] = "Delete";
|
|
188
|
+
Operation["Push"] = "Push";
|
|
189
|
+
Operation["Read"] = "Read";
|
|
190
|
+
Operation["Unshift"] = "Unshift";
|
|
191
|
+
Operation["Update"] = "Update";
|
|
192
|
+
return Operation;
|
|
143
193
|
}({});
|
|
144
194
|
|
|
145
195
|
//#endregion
|
|
146
|
-
//#region ../../node_modules/.pnpm/@vue+shared@3.5.
|
|
196
|
+
//#region ../../node_modules/.pnpm/@vue+shared@3.5.27/node_modules/@vue/shared/dist/shared.esm-bundler.js
|
|
147
197
|
/**
|
|
148
|
-
* @vue/shared v3.5.
|
|
198
|
+
* @vue/shared v3.5.27
|
|
149
199
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
150
200
|
* @license MIT
|
|
151
201
|
**/
|
|
152
202
|
/* @__NO_SIDE_EFFECTS__ */
|
|
153
203
|
function makeMap(str) {
|
|
154
|
-
const map
|
|
155
|
-
for (const key of str.split(",")) map
|
|
156
|
-
return (val) => val in map
|
|
204
|
+
const map = /* @__PURE__ */ Object.create(null);
|
|
205
|
+
for (const key of str.split(",")) map[key] = 1;
|
|
206
|
+
return (val) => val in map;
|
|
157
207
|
}
|
|
158
208
|
const EMPTY_OBJ = Object.freeze({});
|
|
159
209
|
const EMPTY_ARR = Object.freeze([]);
|
|
@@ -218,13 +268,13 @@ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomo
|
|
|
218
268
|
const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
|
|
219
269
|
|
|
220
270
|
//#endregion
|
|
221
|
-
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.
|
|
271
|
+
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.27/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
|
|
222
272
|
/**
|
|
223
|
-
* @vue/reactivity v3.5.
|
|
273
|
+
* @vue/reactivity v3.5.27
|
|
224
274
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
225
275
|
* @license MIT
|
|
226
276
|
**/
|
|
227
|
-
function warn
|
|
277
|
+
function warn(msg, ...args) {
|
|
228
278
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
229
279
|
}
|
|
230
280
|
let activeEffectScope;
|
|
@@ -290,7 +340,7 @@ var ReactiveEffect = class {
|
|
|
290
340
|
try {
|
|
291
341
|
return this.fn();
|
|
292
342
|
} finally {
|
|
293
|
-
if (activeSub !== this) warn
|
|
343
|
+
if (activeSub !== this) warn("Active effect was not restored correctly - this is likely a Vue internal bug.");
|
|
294
344
|
cleanupDeps(this);
|
|
295
345
|
activeSub = prevEffect;
|
|
296
346
|
shouldTrack = prevShouldTrack;
|
|
@@ -397,24 +447,24 @@ function isDirty(sub) {
|
|
|
397
447
|
if (sub._dirty) return true;
|
|
398
448
|
return false;
|
|
399
449
|
}
|
|
400
|
-
function refreshComputed(computed
|
|
401
|
-
if (computed
|
|
402
|
-
computed
|
|
403
|
-
if (computed
|
|
404
|
-
computed
|
|
405
|
-
if (!computed
|
|
406
|
-
computed
|
|
407
|
-
const dep = computed
|
|
450
|
+
function refreshComputed(computed) {
|
|
451
|
+
if (computed.flags & 4 && !(computed.flags & 16)) return;
|
|
452
|
+
computed.flags &= -17;
|
|
453
|
+
if (computed.globalVersion === globalVersion) return;
|
|
454
|
+
computed.globalVersion = globalVersion;
|
|
455
|
+
if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) return;
|
|
456
|
+
computed.flags |= 2;
|
|
457
|
+
const dep = computed.dep;
|
|
408
458
|
const prevSub = activeSub;
|
|
409
459
|
const prevShouldTrack = shouldTrack;
|
|
410
|
-
activeSub = computed
|
|
460
|
+
activeSub = computed;
|
|
411
461
|
shouldTrack = true;
|
|
412
462
|
try {
|
|
413
|
-
prepareDeps(computed
|
|
414
|
-
const value = computed
|
|
415
|
-
if (dep.version === 0 || hasChanged(value, computed
|
|
416
|
-
computed
|
|
417
|
-
computed
|
|
463
|
+
prepareDeps(computed);
|
|
464
|
+
const value = computed.fn(computed._value);
|
|
465
|
+
if (dep.version === 0 || hasChanged(value, computed._value)) {
|
|
466
|
+
computed.flags |= 128;
|
|
467
|
+
computed._value = value;
|
|
418
468
|
dep.version++;
|
|
419
469
|
}
|
|
420
470
|
} catch (err) {
|
|
@@ -423,8 +473,8 @@ function refreshComputed(computed$1) {
|
|
|
423
473
|
} finally {
|
|
424
474
|
activeSub = prevSub;
|
|
425
475
|
shouldTrack = prevShouldTrack;
|
|
426
|
-
cleanupDeps(computed
|
|
427
|
-
computed
|
|
476
|
+
cleanupDeps(computed);
|
|
477
|
+
computed.flags &= -3;
|
|
428
478
|
}
|
|
429
479
|
}
|
|
430
480
|
function removeSub(link, soft = false) {
|
|
@@ -491,8 +541,8 @@ var Link = class {
|
|
|
491
541
|
}
|
|
492
542
|
};
|
|
493
543
|
var Dep = class {
|
|
494
|
-
constructor(computed
|
|
495
|
-
this.computed = computed
|
|
544
|
+
constructor(computed) {
|
|
545
|
+
this.computed = computed;
|
|
496
546
|
this.version = 0;
|
|
497
547
|
/**
|
|
498
548
|
* Link between this dep and the current active effect
|
|
@@ -563,10 +613,10 @@ var Dep = class {
|
|
|
563
613
|
function addSub(link) {
|
|
564
614
|
link.dep.sc++;
|
|
565
615
|
if (link.sub.flags & 4) {
|
|
566
|
-
const computed
|
|
567
|
-
if (computed
|
|
568
|
-
computed
|
|
569
|
-
for (let l = computed
|
|
616
|
+
const computed = link.dep.computed;
|
|
617
|
+
if (computed && !link.dep.subs) {
|
|
618
|
+
computed.flags |= 20;
|
|
619
|
+
for (let l = computed.deps; l; l = l.nextDep) addSub(l);
|
|
570
620
|
}
|
|
571
621
|
const currentTail = link.dep.subs;
|
|
572
622
|
if (currentTail !== link) {
|
|
@@ -578,9 +628,9 @@ function addSub(link) {
|
|
|
578
628
|
}
|
|
579
629
|
}
|
|
580
630
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
581
|
-
const ITERATE_KEY = Symbol("Object iterate");
|
|
582
|
-
const MAP_KEY_ITERATE_KEY = Symbol("Map keys iterate");
|
|
583
|
-
const ARRAY_ITERATE_KEY = Symbol("Array iterate");
|
|
631
|
+
const ITERATE_KEY = /* @__PURE__ */ Symbol("Object iterate");
|
|
632
|
+
const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol("Map keys iterate");
|
|
633
|
+
const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol("Array iterate");
|
|
584
634
|
function track(target, type, key) {
|
|
585
635
|
if (shouldTrack && activeSub) {
|
|
586
636
|
let depsMap = targetMap.get(target);
|
|
@@ -649,17 +699,17 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
649
699
|
endBatch();
|
|
650
700
|
}
|
|
651
701
|
function reactiveReadArray(array) {
|
|
652
|
-
const raw = toRaw(array);
|
|
702
|
+
const raw = /* @__PURE__ */ toRaw(array);
|
|
653
703
|
if (raw === array) return raw;
|
|
654
704
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
655
|
-
return isShallow(array) ? raw : raw.map(toReactive);
|
|
705
|
+
return /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);
|
|
656
706
|
}
|
|
657
707
|
function shallowReadArray(arr) {
|
|
658
|
-
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
708
|
+
track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
659
709
|
return arr;
|
|
660
710
|
}
|
|
661
711
|
function toWrapped(target, item) {
|
|
662
|
-
if (isReadonly(target)) return isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
|
|
712
|
+
if (/* @__PURE__ */ isReadonly(target)) return /* @__PURE__ */ isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
|
|
663
713
|
return toReactive(item);
|
|
664
714
|
}
|
|
665
715
|
const arrayInstrumentations = {
|
|
@@ -749,10 +799,10 @@ const arrayInstrumentations = {
|
|
|
749
799
|
return iterator(this, "values", (item) => toWrapped(this, item));
|
|
750
800
|
}
|
|
751
801
|
};
|
|
752
|
-
function iterator(self
|
|
753
|
-
const arr = shallowReadArray(self
|
|
802
|
+
function iterator(self, method, wrapValue) {
|
|
803
|
+
const arr = shallowReadArray(self);
|
|
754
804
|
const iter = arr[method]();
|
|
755
|
-
if (arr !== self
|
|
805
|
+
if (arr !== self && !/* @__PURE__ */ isShallow(self)) {
|
|
756
806
|
iter._next = iter.next;
|
|
757
807
|
iter.next = () => {
|
|
758
808
|
const result = iter._next();
|
|
@@ -763,53 +813,53 @@ function iterator(self$1, method, wrapValue) {
|
|
|
763
813
|
return iter;
|
|
764
814
|
}
|
|
765
815
|
const arrayProto = Array.prototype;
|
|
766
|
-
function apply(self
|
|
767
|
-
const arr = shallowReadArray(self
|
|
768
|
-
const needsWrap = arr !== self
|
|
816
|
+
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
817
|
+
const arr = shallowReadArray(self);
|
|
818
|
+
const needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);
|
|
769
819
|
const methodFn = arr[method];
|
|
770
820
|
if (methodFn !== arrayProto[method]) {
|
|
771
|
-
const result2 = methodFn.apply(self
|
|
821
|
+
const result2 = methodFn.apply(self, args);
|
|
772
822
|
return needsWrap ? toReactive(result2) : result2;
|
|
773
823
|
}
|
|
774
824
|
let wrappedFn = fn;
|
|
775
|
-
if (arr !== self
|
|
825
|
+
if (arr !== self) {
|
|
776
826
|
if (needsWrap) wrappedFn = function(item, index) {
|
|
777
|
-
return fn.call(this, toWrapped(self
|
|
827
|
+
return fn.call(this, toWrapped(self, item), index, self);
|
|
778
828
|
};
|
|
779
829
|
else if (fn.length > 2) wrappedFn = function(item, index) {
|
|
780
|
-
return fn.call(this, item, index, self
|
|
830
|
+
return fn.call(this, item, index, self);
|
|
781
831
|
};
|
|
782
832
|
}
|
|
783
833
|
const result = methodFn.call(arr, wrappedFn, thisArg);
|
|
784
834
|
return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
|
|
785
835
|
}
|
|
786
|
-
function reduce(self
|
|
787
|
-
const arr = shallowReadArray(self
|
|
836
|
+
function reduce(self, method, fn, args) {
|
|
837
|
+
const arr = shallowReadArray(self);
|
|
788
838
|
let wrappedFn = fn;
|
|
789
|
-
if (arr !== self
|
|
790
|
-
if (
|
|
791
|
-
return fn.call(this, acc, toWrapped(self
|
|
839
|
+
if (arr !== self) {
|
|
840
|
+
if (!/* @__PURE__ */ isShallow(self)) wrappedFn = function(acc, item, index) {
|
|
841
|
+
return fn.call(this, acc, toWrapped(self, item), index, self);
|
|
792
842
|
};
|
|
793
843
|
else if (fn.length > 3) wrappedFn = function(acc, item, index) {
|
|
794
|
-
return fn.call(this, acc, item, index, self
|
|
844
|
+
return fn.call(this, acc, item, index, self);
|
|
795
845
|
};
|
|
796
846
|
}
|
|
797
847
|
return arr[method](wrappedFn, ...args);
|
|
798
848
|
}
|
|
799
|
-
function searchProxy(self
|
|
800
|
-
const arr = toRaw(self
|
|
849
|
+
function searchProxy(self, method, args) {
|
|
850
|
+
const arr = /* @__PURE__ */ toRaw(self);
|
|
801
851
|
track(arr, "iterate", ARRAY_ITERATE_KEY);
|
|
802
852
|
const res = arr[method](...args);
|
|
803
|
-
if ((res === -1 || res === false) && isProxy(args[0])) {
|
|
804
|
-
args[0] = toRaw(args[0]);
|
|
853
|
+
if ((res === -1 || res === false) && /* @__PURE__ */ isProxy(args[0])) {
|
|
854
|
+
args[0] = /* @__PURE__ */ toRaw(args[0]);
|
|
805
855
|
return arr[method](...args);
|
|
806
856
|
}
|
|
807
857
|
return res;
|
|
808
858
|
}
|
|
809
|
-
function noTracking(self
|
|
859
|
+
function noTracking(self, method, args = []) {
|
|
810
860
|
pauseTracking();
|
|
811
861
|
startBatch();
|
|
812
|
-
const res = toRaw(self
|
|
862
|
+
const res = (/* @__PURE__ */ toRaw(self))[method].apply(self, args);
|
|
813
863
|
endBatch();
|
|
814
864
|
resetTracking();
|
|
815
865
|
return res;
|
|
@@ -818,7 +868,7 @@ const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`
|
|
|
818
868
|
const builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
819
869
|
function hasOwnProperty(key) {
|
|
820
870
|
if (!isSymbol(key)) key = String(key);
|
|
821
|
-
const obj = toRaw(this);
|
|
871
|
+
const obj = /* @__PURE__ */ toRaw(this);
|
|
822
872
|
track(obj, "has", key);
|
|
823
873
|
return obj.hasOwnProperty(key);
|
|
824
874
|
}
|
|
@@ -843,15 +893,15 @@ var BaseReactiveHandler = class {
|
|
|
843
893
|
if (targetIsArray && (fn = arrayInstrumentations[key])) return fn;
|
|
844
894
|
if (key === "hasOwnProperty") return hasOwnProperty;
|
|
845
895
|
}
|
|
846
|
-
const res = Reflect.get(target, key, isRef(target) ? target : receiver);
|
|
896
|
+
const res = Reflect.get(target, key, /* @__PURE__ */ isRef(target) ? target : receiver);
|
|
847
897
|
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) return res;
|
|
848
898
|
if (!isReadonly2) track(target, "get", key);
|
|
849
899
|
if (isShallow2) return res;
|
|
850
|
-
if (isRef(res)) {
|
|
900
|
+
if (/* @__PURE__ */ isRef(res)) {
|
|
851
901
|
const value = targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
852
|
-
return isReadonly2 && isObject$1(value) ? readonly(value) : value;
|
|
902
|
+
return isReadonly2 && isObject$1(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
853
903
|
}
|
|
854
|
-
if (isObject$1(res)) return isReadonly2 ? readonly(res) : reactive(res);
|
|
904
|
+
if (isObject$1(res)) return isReadonly2 ? /* @__PURE__ */ readonly(res) : /* @__PURE__ */ reactive(res);
|
|
855
905
|
return res;
|
|
856
906
|
}
|
|
857
907
|
};
|
|
@@ -863,13 +913,13 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
|
|
|
863
913
|
let oldValue = target[key];
|
|
864
914
|
const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
|
|
865
915
|
if (!this._isShallow) {
|
|
866
|
-
const isOldValueReadonly = isReadonly(oldValue);
|
|
867
|
-
if (
|
|
868
|
-
oldValue = toRaw(oldValue);
|
|
869
|
-
value = toRaw(value);
|
|
916
|
+
const isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue);
|
|
917
|
+
if (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
|
|
918
|
+
oldValue = /* @__PURE__ */ toRaw(oldValue);
|
|
919
|
+
value = /* @__PURE__ */ toRaw(value);
|
|
870
920
|
}
|
|
871
|
-
if (!isArrayWithIntegerKey && isRef(oldValue) &&
|
|
872
|
-
warn
|
|
921
|
+
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) if (isOldValueReadonly) {
|
|
922
|
+
warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
|
|
873
923
|
return true;
|
|
874
924
|
} else {
|
|
875
925
|
oldValue.value = value;
|
|
@@ -877,8 +927,8 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
|
|
|
877
927
|
}
|
|
878
928
|
}
|
|
879
929
|
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
880
|
-
const result = Reflect.set(target, key, value, isRef(target) ? target : receiver);
|
|
881
|
-
if (target === toRaw(receiver)) {
|
|
930
|
+
const result = Reflect.set(target, key, value, /* @__PURE__ */ isRef(target) ? target : receiver);
|
|
931
|
+
if (target === /* @__PURE__ */ toRaw(receiver)) {
|
|
882
932
|
if (!hadKey) trigger(target, "add", key, value);
|
|
883
933
|
else if (hasChanged(value, oldValue)) trigger(target, "set", key, value, oldValue);
|
|
884
934
|
}
|
|
@@ -906,11 +956,11 @@ var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
|
|
|
906
956
|
super(true, isShallow2);
|
|
907
957
|
}
|
|
908
958
|
set(target, key) {
|
|
909
|
-
warn
|
|
959
|
+
warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
910
960
|
return true;
|
|
911
961
|
}
|
|
912
962
|
deleteProperty(target, key) {
|
|
913
|
-
warn
|
|
963
|
+
warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
914
964
|
return true;
|
|
915
965
|
}
|
|
916
966
|
};
|
|
@@ -922,65 +972,60 @@ const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
|
922
972
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
923
973
|
return function(...args) {
|
|
924
974
|
const target = this["__v_raw"];
|
|
925
|
-
const rawTarget = toRaw(target);
|
|
975
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
926
976
|
const targetIsMap = isMap(rawTarget);
|
|
927
977
|
const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
|
|
928
978
|
const isKeyOnly = method === "keys" && targetIsMap;
|
|
929
979
|
const innerIterator = target[method](...args);
|
|
930
980
|
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
931
981
|
!isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
|
|
932
|
-
return {
|
|
933
|
-
next()
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
},
|
|
943
|
-
[Symbol.iterator]() {
|
|
944
|
-
return this;
|
|
945
|
-
}
|
|
946
|
-
};
|
|
982
|
+
return extend(Object.create(innerIterator), { next() {
|
|
983
|
+
const { value, done } = innerIterator.next();
|
|
984
|
+
return done ? {
|
|
985
|
+
value,
|
|
986
|
+
done
|
|
987
|
+
} : {
|
|
988
|
+
value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
|
|
989
|
+
done
|
|
990
|
+
};
|
|
991
|
+
} });
|
|
947
992
|
};
|
|
948
993
|
}
|
|
949
994
|
function createReadonlyMethod(type) {
|
|
950
995
|
return function(...args) {
|
|
951
996
|
{
|
|
952
997
|
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
|
953
|
-
warn
|
|
998
|
+
warn(`${capitalize$1(type)} operation ${key}failed: target is readonly.`, /* @__PURE__ */ toRaw(this));
|
|
954
999
|
}
|
|
955
1000
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
956
1001
|
};
|
|
957
1002
|
}
|
|
958
|
-
function createInstrumentations(readonly
|
|
1003
|
+
function createInstrumentations(readonly, shallow) {
|
|
959
1004
|
const instrumentations = {
|
|
960
1005
|
get(key) {
|
|
961
1006
|
const target = this["__v_raw"];
|
|
962
|
-
const rawTarget = toRaw(target);
|
|
963
|
-
const rawKey = toRaw(key);
|
|
964
|
-
if (!readonly
|
|
1007
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1008
|
+
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1009
|
+
if (!readonly) {
|
|
965
1010
|
if (hasChanged(key, rawKey)) track(rawTarget, "get", key);
|
|
966
1011
|
track(rawTarget, "get", rawKey);
|
|
967
1012
|
}
|
|
968
1013
|
const { has } = getProto(rawTarget);
|
|
969
|
-
const wrap = shallow ? toShallow : readonly
|
|
1014
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
970
1015
|
if (has.call(rawTarget, key)) return wrap(target.get(key));
|
|
971
1016
|
else if (has.call(rawTarget, rawKey)) return wrap(target.get(rawKey));
|
|
972
1017
|
else if (target !== rawTarget) target.get(key);
|
|
973
1018
|
},
|
|
974
1019
|
get size() {
|
|
975
1020
|
const target = this["__v_raw"];
|
|
976
|
-
!readonly
|
|
1021
|
+
!readonly && track(/* @__PURE__ */ toRaw(target), "iterate", ITERATE_KEY);
|
|
977
1022
|
return target.size;
|
|
978
1023
|
},
|
|
979
1024
|
has(key) {
|
|
980
1025
|
const target = this["__v_raw"];
|
|
981
|
-
const rawTarget = toRaw(target);
|
|
982
|
-
const rawKey = toRaw(key);
|
|
983
|
-
if (!readonly
|
|
1026
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1027
|
+
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1028
|
+
if (!readonly) {
|
|
984
1029
|
if (hasChanged(key, rawKey)) track(rawTarget, "has", key);
|
|
985
1030
|
track(rawTarget, "has", rawKey);
|
|
986
1031
|
}
|
|
@@ -989,23 +1034,23 @@ function createInstrumentations(readonly$1, shallow) {
|
|
|
989
1034
|
forEach(callback, thisArg) {
|
|
990
1035
|
const observed = this;
|
|
991
1036
|
const target = observed["__v_raw"];
|
|
992
|
-
const rawTarget = toRaw(target);
|
|
993
|
-
const wrap = shallow ? toShallow : readonly
|
|
994
|
-
!readonly
|
|
1037
|
+
const rawTarget = /* @__PURE__ */ toRaw(target);
|
|
1038
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1039
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
995
1040
|
return target.forEach((value, key) => {
|
|
996
1041
|
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
997
1042
|
});
|
|
998
1043
|
}
|
|
999
1044
|
};
|
|
1000
|
-
extend(instrumentations, readonly
|
|
1045
|
+
extend(instrumentations, readonly ? {
|
|
1001
1046
|
add: createReadonlyMethod("add"),
|
|
1002
1047
|
set: createReadonlyMethod("set"),
|
|
1003
1048
|
delete: createReadonlyMethod("delete"),
|
|
1004
1049
|
clear: createReadonlyMethod("clear")
|
|
1005
1050
|
} : {
|
|
1006
1051
|
add(value) {
|
|
1007
|
-
if (!shallow &&
|
|
1008
|
-
const target = toRaw(this);
|
|
1052
|
+
if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);
|
|
1053
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1009
1054
|
if (!getProto(target).has.call(target, value)) {
|
|
1010
1055
|
target.add(value);
|
|
1011
1056
|
trigger(target, "add", value, value);
|
|
@@ -1013,12 +1058,12 @@ function createInstrumentations(readonly$1, shallow) {
|
|
|
1013
1058
|
return this;
|
|
1014
1059
|
},
|
|
1015
1060
|
set(key, value) {
|
|
1016
|
-
if (!shallow &&
|
|
1017
|
-
const target = toRaw(this);
|
|
1061
|
+
if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);
|
|
1062
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1018
1063
|
const { has, get } = getProto(target);
|
|
1019
1064
|
let hadKey = has.call(target, key);
|
|
1020
1065
|
if (!hadKey) {
|
|
1021
|
-
key = toRaw(key);
|
|
1066
|
+
key = /* @__PURE__ */ toRaw(key);
|
|
1022
1067
|
hadKey = has.call(target, key);
|
|
1023
1068
|
} else checkIdentityKeys(target, has, key);
|
|
1024
1069
|
const oldValue = get.call(target, key);
|
|
@@ -1028,11 +1073,11 @@ function createInstrumentations(readonly$1, shallow) {
|
|
|
1028
1073
|
return this;
|
|
1029
1074
|
},
|
|
1030
1075
|
delete(key) {
|
|
1031
|
-
const target = toRaw(this);
|
|
1076
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1032
1077
|
const { has, get } = getProto(target);
|
|
1033
1078
|
let hadKey = has.call(target, key);
|
|
1034
1079
|
if (!hadKey) {
|
|
1035
|
-
key = toRaw(key);
|
|
1080
|
+
key = /* @__PURE__ */ toRaw(key);
|
|
1036
1081
|
hadKey = has.call(target, key);
|
|
1037
1082
|
} else checkIdentityKeys(target, has, key);
|
|
1038
1083
|
const oldValue = get ? get.call(target, key) : void 0;
|
|
@@ -1041,7 +1086,7 @@ function createInstrumentations(readonly$1, shallow) {
|
|
|
1041
1086
|
return result;
|
|
1042
1087
|
},
|
|
1043
1088
|
clear() {
|
|
1044
|
-
const target = toRaw(this);
|
|
1089
|
+
const target = /* @__PURE__ */ toRaw(this);
|
|
1045
1090
|
const hadItems = target.size !== 0;
|
|
1046
1091
|
const oldTarget = isMap(target) ? new Map(target) : new Set(target);
|
|
1047
1092
|
const result = target.clear();
|
|
@@ -1055,7 +1100,7 @@ function createInstrumentations(readonly$1, shallow) {
|
|
|
1055
1100
|
"entries",
|
|
1056
1101
|
Symbol.iterator
|
|
1057
1102
|
].forEach((method) => {
|
|
1058
|
-
instrumentations[method] = createIterableMethod(method, readonly
|
|
1103
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1059
1104
|
});
|
|
1060
1105
|
return instrumentations;
|
|
1061
1106
|
}
|
|
@@ -1072,10 +1117,10 @@ const mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGe
|
|
|
1072
1117
|
const readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) };
|
|
1073
1118
|
const shallowReadonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, true) };
|
|
1074
1119
|
function checkIdentityKeys(target, has, key) {
|
|
1075
|
-
const rawKey = toRaw(key);
|
|
1120
|
+
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1076
1121
|
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1077
1122
|
const type = toRawType(target);
|
|
1078
|
-
warn
|
|
1123
|
+
warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
|
|
1079
1124
|
}
|
|
1080
1125
|
}
|
|
1081
1126
|
const reactiveMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -1096,19 +1141,22 @@ function targetTypeMap(rawType) {
|
|
|
1096
1141
|
function getTargetType(value) {
|
|
1097
1142
|
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1098
1143
|
}
|
|
1144
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1099
1145
|
function reactive(target) {
|
|
1100
|
-
if (isReadonly(target)) return target;
|
|
1146
|
+
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
1101
1147
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
1102
1148
|
}
|
|
1149
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1103
1150
|
function readonly(target) {
|
|
1104
1151
|
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
|
|
1105
1152
|
}
|
|
1153
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1106
1154
|
function shallowReadonly(target) {
|
|
1107
1155
|
return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
|
|
1108
1156
|
}
|
|
1109
1157
|
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
1110
1158
|
if (!isObject$1(target)) {
|
|
1111
|
-
warn
|
|
1159
|
+
warn(`value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(target)}`);
|
|
1112
1160
|
return target;
|
|
1113
1161
|
}
|
|
1114
1162
|
if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) return target;
|
|
@@ -1120,47 +1168,53 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
|
|
|
1120
1168
|
proxyMap.set(target, proxy);
|
|
1121
1169
|
return proxy;
|
|
1122
1170
|
}
|
|
1171
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1123
1172
|
function isReactive(value) {
|
|
1124
|
-
if (isReadonly(value)) return isReactive(value["__v_raw"]);
|
|
1173
|
+
if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1125
1174
|
return !!(value && value["__v_isReactive"]);
|
|
1126
1175
|
}
|
|
1176
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1127
1177
|
function isReadonly(value) {
|
|
1128
1178
|
return !!(value && value["__v_isReadonly"]);
|
|
1129
1179
|
}
|
|
1180
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1130
1181
|
function isShallow(value) {
|
|
1131
1182
|
return !!(value && value["__v_isShallow"]);
|
|
1132
1183
|
}
|
|
1184
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1133
1185
|
function isProxy(value) {
|
|
1134
1186
|
return value ? !!value["__v_raw"] : false;
|
|
1135
1187
|
}
|
|
1188
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1136
1189
|
function toRaw(observed) {
|
|
1137
1190
|
const raw = observed && observed["__v_raw"];
|
|
1138
|
-
return raw ? toRaw(raw) : observed;
|
|
1191
|
+
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
1139
1192
|
}
|
|
1140
1193
|
function markRaw(value) {
|
|
1141
1194
|
if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) def(value, "__v_skip", true);
|
|
1142
1195
|
return value;
|
|
1143
1196
|
}
|
|
1144
|
-
const toReactive = (value) => isObject$1(value) ? reactive(value) : value;
|
|
1145
|
-
const toReadonly = (value) => isObject$1(value) ? readonly(value) : value;
|
|
1197
|
+
const toReactive = (value) => isObject$1(value) ? /* @__PURE__ */ reactive(value) : value;
|
|
1198
|
+
const toReadonly = (value) => isObject$1(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1199
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1146
1200
|
function isRef(r) {
|
|
1147
1201
|
return r ? r["__v_isRef"] === true : false;
|
|
1148
1202
|
}
|
|
1149
1203
|
function unref(ref2) {
|
|
1150
|
-
return isRef(ref2) ? ref2.value : ref2;
|
|
1204
|
+
return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
|
|
1151
1205
|
}
|
|
1152
1206
|
const shallowUnwrapHandlers = {
|
|
1153
1207
|
get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
|
|
1154
1208
|
set: (target, key, value, receiver) => {
|
|
1155
1209
|
const oldValue = target[key];
|
|
1156
|
-
if (isRef(oldValue) &&
|
|
1210
|
+
if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1157
1211
|
oldValue.value = value;
|
|
1158
1212
|
return true;
|
|
1159
1213
|
} else return Reflect.set(target, key, value, receiver);
|
|
1160
1214
|
}
|
|
1161
1215
|
};
|
|
1162
1216
|
function proxyRefs(objectWithRefs) {
|
|
1163
|
-
return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
|
|
1217
|
+
return /* @__PURE__ */ isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
|
|
1164
1218
|
}
|
|
1165
1219
|
const INITIAL_WATCHER_VALUE = {};
|
|
1166
1220
|
const cleanupMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -1170,36 +1224,36 @@ function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher
|
|
|
1170
1224
|
let cleanups = cleanupMap.get(owner);
|
|
1171
1225
|
if (!cleanups) cleanupMap.set(owner, cleanups = []);
|
|
1172
1226
|
cleanups.push(cleanupFn);
|
|
1173
|
-
} else if (!failSilently) warn
|
|
1227
|
+
} else if (!failSilently) warn(`onWatcherCleanup() was called when there was no active watcher to associate with.`);
|
|
1174
1228
|
}
|
|
1175
1229
|
function watch(source, cb, options = EMPTY_OBJ) {
|
|
1176
1230
|
const { immediate, deep, once, scheduler, augmentJob, call } = options;
|
|
1177
1231
|
const warnInvalidSource = (s) => {
|
|
1178
|
-
(options.onWarn || warn
|
|
1232
|
+
(options.onWarn || warn)(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`);
|
|
1179
1233
|
};
|
|
1180
1234
|
const reactiveGetter = (source2) => {
|
|
1181
1235
|
if (deep) return source2;
|
|
1182
|
-
if (isShallow(source2) || deep === false || deep === 0) return traverse(source2, 1);
|
|
1236
|
+
if (/* @__PURE__ */ isShallow(source2) || deep === false || deep === 0) return traverse(source2, 1);
|
|
1183
1237
|
return traverse(source2);
|
|
1184
1238
|
};
|
|
1185
|
-
let effect
|
|
1239
|
+
let effect;
|
|
1186
1240
|
let getter;
|
|
1187
1241
|
let cleanup;
|
|
1188
1242
|
let boundCleanup;
|
|
1189
1243
|
let forceTrigger = false;
|
|
1190
1244
|
let isMultiSource = false;
|
|
1191
|
-
if (isRef(source)) {
|
|
1245
|
+
if (/* @__PURE__ */ isRef(source)) {
|
|
1192
1246
|
getter = () => source.value;
|
|
1193
|
-
forceTrigger = isShallow(source);
|
|
1194
|
-
} else if (isReactive(source)) {
|
|
1247
|
+
forceTrigger = /* @__PURE__ */ isShallow(source);
|
|
1248
|
+
} else if (/* @__PURE__ */ isReactive(source)) {
|
|
1195
1249
|
getter = () => reactiveGetter(source);
|
|
1196
1250
|
forceTrigger = true;
|
|
1197
1251
|
} else if (isArray(source)) {
|
|
1198
1252
|
isMultiSource = true;
|
|
1199
|
-
forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
|
|
1253
|
+
forceTrigger = source.some((s) => /* @__PURE__ */ isReactive(s) || /* @__PURE__ */ isShallow(s));
|
|
1200
1254
|
getter = () => source.map((s) => {
|
|
1201
|
-
if (isRef(s)) return s.value;
|
|
1202
|
-
else if (isReactive(s)) return reactiveGetter(s);
|
|
1255
|
+
if (/* @__PURE__ */ isRef(s)) return s.value;
|
|
1256
|
+
else if (/* @__PURE__ */ isReactive(s)) return reactiveGetter(s);
|
|
1203
1257
|
else if (isFunction(s)) return call ? call(s, 2) : s();
|
|
1204
1258
|
else warnInvalidSource(s);
|
|
1205
1259
|
});
|
|
@@ -1214,7 +1268,7 @@ function watch(source, cb, options = EMPTY_OBJ) {
|
|
|
1214
1268
|
}
|
|
1215
1269
|
}
|
|
1216
1270
|
const currentEffect = activeWatcher;
|
|
1217
|
-
activeWatcher = effect
|
|
1271
|
+
activeWatcher = effect;
|
|
1218
1272
|
try {
|
|
1219
1273
|
return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
|
|
1220
1274
|
} finally {
|
|
@@ -1232,8 +1286,8 @@ function watch(source, cb, options = EMPTY_OBJ) {
|
|
|
1232
1286
|
}
|
|
1233
1287
|
const scope = getCurrentScope();
|
|
1234
1288
|
const watchHandle = () => {
|
|
1235
|
-
effect
|
|
1236
|
-
if (scope && scope.active) remove(scope.effects, effect
|
|
1289
|
+
effect.stop();
|
|
1290
|
+
if (scope && scope.active) remove(scope.effects, effect);
|
|
1237
1291
|
};
|
|
1238
1292
|
if (once && cb) {
|
|
1239
1293
|
const _cb = cb;
|
|
@@ -1244,13 +1298,13 @@ function watch(source, cb, options = EMPTY_OBJ) {
|
|
|
1244
1298
|
}
|
|
1245
1299
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
1246
1300
|
const job = (immediateFirstRun) => {
|
|
1247
|
-
if (!(effect
|
|
1301
|
+
if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) return;
|
|
1248
1302
|
if (cb) {
|
|
1249
|
-
const newValue = effect
|
|
1303
|
+
const newValue = effect.run();
|
|
1250
1304
|
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
1251
1305
|
if (cleanup) cleanup();
|
|
1252
1306
|
const currentWatcher = activeWatcher;
|
|
1253
|
-
activeWatcher = effect
|
|
1307
|
+
activeWatcher = effect;
|
|
1254
1308
|
try {
|
|
1255
1309
|
const args = [
|
|
1256
1310
|
newValue,
|
|
@@ -1263,28 +1317,28 @@ function watch(source, cb, options = EMPTY_OBJ) {
|
|
|
1263
1317
|
activeWatcher = currentWatcher;
|
|
1264
1318
|
}
|
|
1265
1319
|
}
|
|
1266
|
-
} else effect
|
|
1320
|
+
} else effect.run();
|
|
1267
1321
|
};
|
|
1268
1322
|
if (augmentJob) augmentJob(job);
|
|
1269
|
-
effect
|
|
1270
|
-
effect
|
|
1271
|
-
boundCleanup = (fn) => onWatcherCleanup(fn, false, effect
|
|
1272
|
-
cleanup = effect
|
|
1273
|
-
const cleanups = cleanupMap.get(effect
|
|
1323
|
+
effect = new ReactiveEffect(getter);
|
|
1324
|
+
effect.scheduler = scheduler ? () => scheduler(job, false) : job;
|
|
1325
|
+
boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);
|
|
1326
|
+
cleanup = effect.onStop = () => {
|
|
1327
|
+
const cleanups = cleanupMap.get(effect);
|
|
1274
1328
|
if (cleanups) {
|
|
1275
1329
|
if (call) call(cleanups, 4);
|
|
1276
1330
|
else for (const cleanup2 of cleanups) cleanup2();
|
|
1277
|
-
cleanupMap.delete(effect
|
|
1331
|
+
cleanupMap.delete(effect);
|
|
1278
1332
|
}
|
|
1279
1333
|
};
|
|
1280
|
-
effect
|
|
1281
|
-
effect
|
|
1334
|
+
effect.onTrack = options.onTrack;
|
|
1335
|
+
effect.onTrigger = options.onTrigger;
|
|
1282
1336
|
if (cb) if (immediate) job(true);
|
|
1283
|
-
else oldValue = effect
|
|
1337
|
+
else oldValue = effect.run();
|
|
1284
1338
|
else if (scheduler) scheduler(job.bind(null, true), true);
|
|
1285
|
-
else effect
|
|
1286
|
-
watchHandle.pause = effect
|
|
1287
|
-
watchHandle.resume = effect
|
|
1339
|
+
else effect.run();
|
|
1340
|
+
watchHandle.pause = effect.pause.bind(effect);
|
|
1341
|
+
watchHandle.resume = effect.resume.bind(effect);
|
|
1288
1342
|
watchHandle.stop = watchHandle;
|
|
1289
1343
|
return watchHandle;
|
|
1290
1344
|
}
|
|
@@ -1294,7 +1348,7 @@ function traverse(value, depth = Infinity, seen) {
|
|
|
1294
1348
|
if ((seen.get(value) || 0) >= depth) return value;
|
|
1295
1349
|
seen.set(value, depth);
|
|
1296
1350
|
depth--;
|
|
1297
|
-
if (isRef(value)) traverse(value.value, depth, seen);
|
|
1351
|
+
if (/* @__PURE__ */ isRef(value)) traverse(value.value, depth, seen);
|
|
1298
1352
|
else if (isArray(value)) for (let i = 0; i < value.length; i++) traverse(value[i], depth, seen);
|
|
1299
1353
|
else if (isSet(value) || isMap(value)) value.forEach((v) => {
|
|
1300
1354
|
traverse(v, depth, seen);
|
|
@@ -1307,9 +1361,9 @@ function traverse(value, depth = Infinity, seen) {
|
|
|
1307
1361
|
}
|
|
1308
1362
|
|
|
1309
1363
|
//#endregion
|
|
1310
|
-
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.
|
|
1364
|
+
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.27/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
|
|
1311
1365
|
/**
|
|
1312
|
-
* @vue/runtime-core v3.5.
|
|
1366
|
+
* @vue/runtime-core v3.5.27
|
|
1313
1367
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1314
1368
|
* @license MIT
|
|
1315
1369
|
**/
|
|
@@ -1330,8 +1384,8 @@ function warn$1(msg, ...args) {
|
|
|
1330
1384
|
const trace = getComponentTrace();
|
|
1331
1385
|
if (appWarnHandler) callWithErrorHandling(appWarnHandler, instance, 11, [
|
|
1332
1386
|
msg + args.map((a) => {
|
|
1333
|
-
var _a
|
|
1334
|
-
return (_b = (_a
|
|
1387
|
+
var _a, _b;
|
|
1388
|
+
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
1335
1389
|
}).join(""),
|
|
1336
1390
|
instance && instance.proxy,
|
|
1337
1391
|
trace.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`).join("\n"),
|
|
@@ -1692,9 +1746,101 @@ function tryWrap(fn) {
|
|
|
1692
1746
|
};
|
|
1693
1747
|
}
|
|
1694
1748
|
let currentRenderingInstance = null;
|
|
1749
|
+
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
1750
|
+
const instance = getCurrentInstance();
|
|
1751
|
+
if (instance || currentApp) {
|
|
1752
|
+
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
1753
|
+
if (provides && key in provides) return provides[key];
|
|
1754
|
+
else if (arguments.length > 1) return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
1755
|
+
else warn$1(`injection "${String(key)}" not found.`);
|
|
1756
|
+
} else warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
1757
|
+
}
|
|
1758
|
+
const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
|
|
1759
|
+
const useSSRContext = () => {
|
|
1760
|
+
{
|
|
1761
|
+
const ctx = inject(ssrContextKey);
|
|
1762
|
+
if (!ctx) warn$1(`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`);
|
|
1763
|
+
return ctx;
|
|
1764
|
+
}
|
|
1765
|
+
};
|
|
1766
|
+
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
1767
|
+
const { immediate, deep, flush, once } = options;
|
|
1768
|
+
if (!cb) {
|
|
1769
|
+
if (immediate !== void 0) warn$1(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
1770
|
+
if (deep !== void 0) warn$1(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
1771
|
+
if (once !== void 0) warn$1(`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
1772
|
+
}
|
|
1773
|
+
const baseWatchOptions = extend({}, options);
|
|
1774
|
+
baseWatchOptions.onWarn = warn$1;
|
|
1775
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
1776
|
+
let ssrCleanup;
|
|
1777
|
+
if (isInSSRComponentSetup) {
|
|
1778
|
+
if (flush === "sync") {
|
|
1779
|
+
const ctx = useSSRContext();
|
|
1780
|
+
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
1781
|
+
} else if (!runsImmediately) {
|
|
1782
|
+
const watchStopHandle = () => {};
|
|
1783
|
+
watchStopHandle.stop = NOOP;
|
|
1784
|
+
watchStopHandle.resume = NOOP;
|
|
1785
|
+
watchStopHandle.pause = NOOP;
|
|
1786
|
+
return watchStopHandle;
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
const instance = currentInstance;
|
|
1790
|
+
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
1791
|
+
let isPre = false;
|
|
1792
|
+
if (flush === "post") baseWatchOptions.scheduler = (job) => {
|
|
1793
|
+
queuePostRenderEffect(job, instance && instance.suspense);
|
|
1794
|
+
};
|
|
1795
|
+
else if (flush !== "sync") {
|
|
1796
|
+
isPre = true;
|
|
1797
|
+
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
1798
|
+
if (isFirstRun) job();
|
|
1799
|
+
else queueJob(job);
|
|
1800
|
+
};
|
|
1801
|
+
}
|
|
1802
|
+
baseWatchOptions.augmentJob = (job) => {
|
|
1803
|
+
if (cb) job.flags |= 4;
|
|
1804
|
+
if (isPre) {
|
|
1805
|
+
job.flags |= 2;
|
|
1806
|
+
if (instance) {
|
|
1807
|
+
job.id = instance.uid;
|
|
1808
|
+
job.i = instance;
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
};
|
|
1812
|
+
const watchHandle = watch(source, cb, baseWatchOptions);
|
|
1813
|
+
if (isInSSRComponentSetup) {
|
|
1814
|
+
if (ssrCleanup) ssrCleanup.push(watchHandle);
|
|
1815
|
+
else if (runsImmediately) watchHandle();
|
|
1816
|
+
}
|
|
1817
|
+
return watchHandle;
|
|
1818
|
+
}
|
|
1819
|
+
function instanceWatch(source, value, options) {
|
|
1820
|
+
const publicThis = this.proxy;
|
|
1821
|
+
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
1822
|
+
let cb;
|
|
1823
|
+
if (isFunction(value)) cb = value;
|
|
1824
|
+
else {
|
|
1825
|
+
cb = value.handler;
|
|
1826
|
+
options = value;
|
|
1827
|
+
}
|
|
1828
|
+
const reset = setCurrentInstance(this);
|
|
1829
|
+
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
1830
|
+
reset();
|
|
1831
|
+
return res;
|
|
1832
|
+
}
|
|
1833
|
+
function createPathGetter(ctx, path) {
|
|
1834
|
+
const segments = path.split(".");
|
|
1835
|
+
return () => {
|
|
1836
|
+
let cur = ctx;
|
|
1837
|
+
for (let i = 0; i < segments.length && cur; i++) cur = cur[segments[i]];
|
|
1838
|
+
return cur;
|
|
1839
|
+
};
|
|
1840
|
+
}
|
|
1695
1841
|
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
1696
1842
|
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
1697
|
-
function injectHook(type, hook, target = currentInstance, prepend
|
|
1843
|
+
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
1698
1844
|
if (target) {
|
|
1699
1845
|
const hooks = target[type] || (target[type] = []);
|
|
1700
1846
|
const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
|
|
@@ -1705,7 +1851,7 @@ function injectHook(type, hook, target = currentInstance, prepend$1 = false) {
|
|
|
1705
1851
|
resetTracking();
|
|
1706
1852
|
return res;
|
|
1707
1853
|
});
|
|
1708
|
-
if (prepend
|
|
1854
|
+
if (prepend) hooks.unshift(wrappedHook);
|
|
1709
1855
|
else hooks.push(wrappedHook);
|
|
1710
1856
|
return wrappedHook;
|
|
1711
1857
|
} else warn$1(`${toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""))} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`);
|
|
@@ -1722,7 +1868,6 @@ const onUnmounted = createHook("um");
|
|
|
1722
1868
|
const onServerPrefetch = createHook("sp");
|
|
1723
1869
|
const onRenderTriggered = createHook("rtg");
|
|
1724
1870
|
const onRenderTracked = createHook("rtc");
|
|
1725
|
-
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
1726
1871
|
const getPublicInstance = (i) => {
|
|
1727
1872
|
if (!i) return null;
|
|
1728
1873
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
@@ -1950,98 +2095,6 @@ function createAppContext() {
|
|
|
1950
2095
|
};
|
|
1951
2096
|
}
|
|
1952
2097
|
let currentApp = null;
|
|
1953
|
-
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
1954
|
-
const instance = getCurrentInstance();
|
|
1955
|
-
if (instance || currentApp) {
|
|
1956
|
-
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
1957
|
-
if (provides && key in provides) return provides[key];
|
|
1958
|
-
else if (arguments.length > 1) return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
1959
|
-
else warn$1(`injection "${String(key)}" not found.`);
|
|
1960
|
-
} else warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
1961
|
-
}
|
|
1962
|
-
const ssrContextKey = Symbol.for("v-scx");
|
|
1963
|
-
const useSSRContext = () => {
|
|
1964
|
-
{
|
|
1965
|
-
const ctx = inject(ssrContextKey);
|
|
1966
|
-
if (!ctx) warn$1(`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`);
|
|
1967
|
-
return ctx;
|
|
1968
|
-
}
|
|
1969
|
-
};
|
|
1970
|
-
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
1971
|
-
const { immediate, deep, flush, once } = options;
|
|
1972
|
-
if (!cb) {
|
|
1973
|
-
if (immediate !== void 0) warn$1(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
1974
|
-
if (deep !== void 0) warn$1(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
1975
|
-
if (once !== void 0) warn$1(`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`);
|
|
1976
|
-
}
|
|
1977
|
-
const baseWatchOptions = extend({}, options);
|
|
1978
|
-
baseWatchOptions.onWarn = warn$1;
|
|
1979
|
-
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
1980
|
-
let ssrCleanup;
|
|
1981
|
-
if (isInSSRComponentSetup) {
|
|
1982
|
-
if (flush === "sync") {
|
|
1983
|
-
const ctx = useSSRContext();
|
|
1984
|
-
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
1985
|
-
} else if (!runsImmediately) {
|
|
1986
|
-
const watchStopHandle = () => {};
|
|
1987
|
-
watchStopHandle.stop = NOOP;
|
|
1988
|
-
watchStopHandle.resume = NOOP;
|
|
1989
|
-
watchStopHandle.pause = NOOP;
|
|
1990
|
-
return watchStopHandle;
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
const instance = currentInstance;
|
|
1994
|
-
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
1995
|
-
let isPre = false;
|
|
1996
|
-
if (flush === "post") baseWatchOptions.scheduler = (job) => {
|
|
1997
|
-
queuePostRenderEffect(job, instance && instance.suspense);
|
|
1998
|
-
};
|
|
1999
|
-
else if (flush !== "sync") {
|
|
2000
|
-
isPre = true;
|
|
2001
|
-
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
2002
|
-
if (isFirstRun) job();
|
|
2003
|
-
else queueJob(job);
|
|
2004
|
-
};
|
|
2005
|
-
}
|
|
2006
|
-
baseWatchOptions.augmentJob = (job) => {
|
|
2007
|
-
if (cb) job.flags |= 4;
|
|
2008
|
-
if (isPre) {
|
|
2009
|
-
job.flags |= 2;
|
|
2010
|
-
if (instance) {
|
|
2011
|
-
job.id = instance.uid;
|
|
2012
|
-
job.i = instance;
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
};
|
|
2016
|
-
const watchHandle = watch(source, cb, baseWatchOptions);
|
|
2017
|
-
if (isInSSRComponentSetup) {
|
|
2018
|
-
if (ssrCleanup) ssrCleanup.push(watchHandle);
|
|
2019
|
-
else if (runsImmediately) watchHandle();
|
|
2020
|
-
}
|
|
2021
|
-
return watchHandle;
|
|
2022
|
-
}
|
|
2023
|
-
function instanceWatch(source, value, options) {
|
|
2024
|
-
const publicThis = this.proxy;
|
|
2025
|
-
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
2026
|
-
let cb;
|
|
2027
|
-
if (isFunction(value)) cb = value;
|
|
2028
|
-
else {
|
|
2029
|
-
cb = value.handler;
|
|
2030
|
-
options = value;
|
|
2031
|
-
}
|
|
2032
|
-
const reset = setCurrentInstance(this);
|
|
2033
|
-
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
2034
|
-
reset();
|
|
2035
|
-
return res;
|
|
2036
|
-
}
|
|
2037
|
-
function createPathGetter(ctx, path) {
|
|
2038
|
-
const segments = path.split(".");
|
|
2039
|
-
return () => {
|
|
2040
|
-
let cur = ctx;
|
|
2041
|
-
for (let i = 0; i < segments.length && cur; i++) cur = cur[segments[i]];
|
|
2042
|
-
return cur;
|
|
2043
|
-
};
|
|
2044
|
-
}
|
|
2045
2098
|
let accessedAttrs = false;
|
|
2046
2099
|
function markAttrsAccessed() {
|
|
2047
2100
|
accessedAttrs = true;
|
|
@@ -2052,10 +2105,6 @@ function queueEffectWithSuspense(fn, suspense) {
|
|
|
2052
2105
|
else suspense.effects.push(fn);
|
|
2053
2106
|
else queuePostFlushCb(fn);
|
|
2054
2107
|
}
|
|
2055
|
-
const Fragment = Symbol.for("v-fgt");
|
|
2056
|
-
const Text$1 = Symbol.for("v-txt");
|
|
2057
|
-
const Comment$1 = Symbol.for("v-cmt");
|
|
2058
|
-
const Static = Symbol.for("v-stc");
|
|
2059
2108
|
const emptyAppContext = createAppContext();
|
|
2060
2109
|
let currentInstance = null;
|
|
2061
2110
|
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
@@ -2195,8 +2244,8 @@ function initCustomFormatter() {
|
|
|
2195
2244
|
if (instance.type.props && instance.props) blocks.push(createInstanceBlock("props", toRaw(instance.props)));
|
|
2196
2245
|
if (instance.setupState !== EMPTY_OBJ) blocks.push(createInstanceBlock("setup", instance.setupState));
|
|
2197
2246
|
if (instance.data !== EMPTY_OBJ) blocks.push(createInstanceBlock("data", toRaw(instance.data)));
|
|
2198
|
-
const computed
|
|
2199
|
-
if (computed
|
|
2247
|
+
const computed = extractKeys(instance, "computed");
|
|
2248
|
+
if (computed) blocks.push(createInstanceBlock("computed", computed));
|
|
2200
2249
|
const injected = extractKeys(instance, "inject");
|
|
2201
2250
|
if (injected) blocks.push(createInstanceBlock("injected", injected));
|
|
2202
2251
|
blocks.push([
|
|
@@ -2286,9 +2335,9 @@ function initCustomFormatter() {
|
|
|
2286
2335
|
}
|
|
2287
2336
|
|
|
2288
2337
|
//#endregion
|
|
2289
|
-
//#region ../../node_modules/.pnpm/vue@3.5.
|
|
2338
|
+
//#region ../../node_modules/.pnpm/vue@3.5.27_typescript@5.9.3/node_modules/vue/dist/vue.runtime.esm-bundler.js
|
|
2290
2339
|
/**
|
|
2291
|
-
* vue v3.5.
|
|
2340
|
+
* vue v3.5.27
|
|
2292
2341
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
2293
2342
|
* @license MIT
|
|
2294
2343
|
**/
|
|
@@ -2302,7 +2351,7 @@ initDev();
|
|
|
2302
2351
|
const getRawData = (data) => isReactive(data) ? toRaw(data) : data;
|
|
2303
2352
|
|
|
2304
2353
|
//#endregion
|
|
2305
|
-
//#region ../../node_modules/.pnpm/@vueuse+shared@14.
|
|
2354
|
+
//#region ../../node_modules/.pnpm/@vueuse+shared@14.2.0_vue@3.5.27_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js
|
|
2306
2355
|
const isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
2307
2356
|
const toString = Object.prototype.toString;
|
|
2308
2357
|
const isObject = (val) => toString.call(val) === "[object Object]";
|
|
@@ -3883,7 +3932,7 @@ var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3883
3932
|
var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
|
|
3884
3933
|
var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
|
|
3885
3934
|
var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;
|
|
3886
|
-
var decodeMap
|
|
3935
|
+
var decodeMap = {
|
|
3887
3936
|
"aacute": "á",
|
|
3888
3937
|
"Aacute": "Á",
|
|
3889
3938
|
"abreve": "ă",
|
|
@@ -6278,9 +6327,9 @@ var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6278
6327
|
1114111
|
|
6279
6328
|
];
|
|
6280
6329
|
var stringFromCharCode = String.fromCharCode;
|
|
6281
|
-
var hasOwnProperty
|
|
6330
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
6282
6331
|
var has = function(object, propertyName) {
|
|
6283
|
-
return hasOwnProperty
|
|
6332
|
+
return hasOwnProperty.call(object, propertyName);
|
|
6284
6333
|
};
|
|
6285
6334
|
var contains = function(array, value) {
|
|
6286
6335
|
var index = -1;
|
|
@@ -6291,8 +6340,8 @@ var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6291
6340
|
var merge = function(options, defaults) {
|
|
6292
6341
|
if (!options) return defaults;
|
|
6293
6342
|
var result = {};
|
|
6294
|
-
var key
|
|
6295
|
-
for (key
|
|
6343
|
+
var key;
|
|
6344
|
+
for (key in defaults) result[key] = has(options, key) ? options[key] : defaults[key];
|
|
6296
6345
|
return result;
|
|
6297
6346
|
};
|
|
6298
6347
|
var codePointToSymbol = function(codePoint, strict) {
|
|
@@ -6323,8 +6372,8 @@ var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6323
6372
|
var parseError = function(message) {
|
|
6324
6373
|
throw Error("Parse error: " + message);
|
|
6325
6374
|
};
|
|
6326
|
-
var encode
|
|
6327
|
-
options = merge(options, encode
|
|
6375
|
+
var encode = function(string, options) {
|
|
6376
|
+
options = merge(options, encode.options);
|
|
6328
6377
|
if (options.strict && regexInvalidRawCodePoint.test(string)) parseError("forbidden code point");
|
|
6329
6378
|
var encodeEverything = options.encodeEverything;
|
|
6330
6379
|
var useNamedReferences = options.useNamedReferences;
|
|
@@ -6339,16 +6388,16 @@ var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6339
6388
|
return escapeBmpSymbol(symbol);
|
|
6340
6389
|
});
|
|
6341
6390
|
if (useNamedReferences) string = string.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒").replace(/fj/g, "fj");
|
|
6342
|
-
if (useNamedReferences) string = string.replace(regexEncodeNonAscii, function(string
|
|
6343
|
-
return "&" + encodeMap[string
|
|
6391
|
+
if (useNamedReferences) string = string.replace(regexEncodeNonAscii, function(string) {
|
|
6392
|
+
return "&" + encodeMap[string] + ";";
|
|
6344
6393
|
});
|
|
6345
6394
|
} else if (useNamedReferences) {
|
|
6346
|
-
if (!allowUnsafeSymbols) string = string.replace(regexEscape, function(string
|
|
6347
|
-
return "&" + encodeMap[string
|
|
6395
|
+
if (!allowUnsafeSymbols) string = string.replace(regexEscape, function(string) {
|
|
6396
|
+
return "&" + encodeMap[string] + ";";
|
|
6348
6397
|
});
|
|
6349
6398
|
string = string.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒");
|
|
6350
|
-
string = string.replace(regexEncodeNonAscii, function(string
|
|
6351
|
-
return "&" + encodeMap[string
|
|
6399
|
+
string = string.replace(regexEncodeNonAscii, function(string) {
|
|
6400
|
+
return "&" + encodeMap[string] + ";";
|
|
6352
6401
|
});
|
|
6353
6402
|
} else if (!allowUnsafeSymbols) string = string.replace(regexEscape, escapeBmpSymbol);
|
|
6354
6403
|
return string.replace(regexAstralSymbols, function($0) {
|
|
@@ -6357,18 +6406,18 @@ var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6357
6406
|
return escapeCodePoint((high - 55296) * 1024 + low - 56320 + 65536);
|
|
6358
6407
|
}).replace(regexBmpWhitelist, escapeBmpSymbol);
|
|
6359
6408
|
};
|
|
6360
|
-
encode
|
|
6409
|
+
encode.options = {
|
|
6361
6410
|
"allowUnsafeSymbols": false,
|
|
6362
6411
|
"encodeEverything": false,
|
|
6363
6412
|
"strict": false,
|
|
6364
6413
|
"useNamedReferences": false,
|
|
6365
6414
|
"decimal": false
|
|
6366
6415
|
};
|
|
6367
|
-
var decode
|
|
6368
|
-
options = merge(options, decode
|
|
6416
|
+
var decode = function(html, options) {
|
|
6417
|
+
options = merge(options, decode.options);
|
|
6369
6418
|
var strict = options.strict;
|
|
6370
|
-
if (strict && regexInvalidEntity.test(html
|
|
6371
|
-
return html
|
|
6419
|
+
if (strict && regexInvalidEntity.test(html)) parseError("malformed character reference");
|
|
6420
|
+
return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) {
|
|
6372
6421
|
var codePoint;
|
|
6373
6422
|
var semicolon;
|
|
6374
6423
|
var decDigits;
|
|
@@ -6377,7 +6426,7 @@ var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6377
6426
|
var next;
|
|
6378
6427
|
if ($1) {
|
|
6379
6428
|
reference = $1;
|
|
6380
|
-
return decodeMap
|
|
6429
|
+
return decodeMap[reference];
|
|
6381
6430
|
}
|
|
6382
6431
|
if ($2) {
|
|
6383
6432
|
reference = $2;
|
|
@@ -6408,7 +6457,7 @@ var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6408
6457
|
return $0;
|
|
6409
6458
|
});
|
|
6410
6459
|
};
|
|
6411
|
-
decode
|
|
6460
|
+
decode.options = {
|
|
6412
6461
|
"isAttributeValue": false,
|
|
6413
6462
|
"strict": false
|
|
6414
6463
|
};
|
|
@@ -6419,10 +6468,10 @@ var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6419
6468
|
};
|
|
6420
6469
|
var he = {
|
|
6421
6470
|
"version": "1.2.0",
|
|
6422
|
-
"encode": encode
|
|
6423
|
-
"decode": decode
|
|
6471
|
+
"encode": encode,
|
|
6472
|
+
"decode": decode,
|
|
6424
6473
|
"escape": escape,
|
|
6425
|
-
"unescape": decode
|
|
6474
|
+
"unescape": decode
|
|
6426
6475
|
};
|
|
6427
6476
|
if (typeof define == "function" && typeof define.amd == "object" && define.amd) define(function() {
|
|
6428
6477
|
return he;
|
|
@@ -6434,14 +6483,14 @@ var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6434
6483
|
}));
|
|
6435
6484
|
|
|
6436
6485
|
//#endregion
|
|
6437
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
6486
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/nodes/node.js
|
|
6438
6487
|
var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6439
6488
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6440
|
-
const he_1
|
|
6489
|
+
const he_1 = require_he();
|
|
6441
6490
|
/**
|
|
6442
6491
|
* Node Class as base class for TextNode and HTMLElement.
|
|
6443
6492
|
*/
|
|
6444
|
-
var Node
|
|
6493
|
+
var Node = class {
|
|
6445
6494
|
constructor(parentNode = null, range) {
|
|
6446
6495
|
this.parentNode = parentNode;
|
|
6447
6496
|
this.childNodes = [];
|
|
@@ -6469,38 +6518,38 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6469
6518
|
return this.rawText;
|
|
6470
6519
|
}
|
|
6471
6520
|
get textContent() {
|
|
6472
|
-
return (0, he_1
|
|
6521
|
+
return (0, he_1.decode)(this.rawText);
|
|
6473
6522
|
}
|
|
6474
6523
|
set textContent(val) {
|
|
6475
|
-
this.rawText = (0, he_1
|
|
6524
|
+
this.rawText = (0, he_1.encode)(val);
|
|
6476
6525
|
}
|
|
6477
6526
|
};
|
|
6478
|
-
exports.default = Node
|
|
6527
|
+
exports.default = Node;
|
|
6479
6528
|
}));
|
|
6480
6529
|
|
|
6481
6530
|
//#endregion
|
|
6482
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
6531
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/nodes/type.js
|
|
6483
6532
|
var require_type = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6484
6533
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6485
6534
|
var NodeType;
|
|
6486
|
-
(function(NodeType
|
|
6487
|
-
NodeType
|
|
6488
|
-
NodeType
|
|
6489
|
-
NodeType
|
|
6535
|
+
(function(NodeType) {
|
|
6536
|
+
NodeType[NodeType["ELEMENT_NODE"] = 1] = "ELEMENT_NODE";
|
|
6537
|
+
NodeType[NodeType["TEXT_NODE"] = 3] = "TEXT_NODE";
|
|
6538
|
+
NodeType[NodeType["COMMENT_NODE"] = 8] = "COMMENT_NODE";
|
|
6490
6539
|
})(NodeType || (NodeType = {}));
|
|
6491
6540
|
exports.default = NodeType;
|
|
6492
6541
|
}));
|
|
6493
6542
|
|
|
6494
6543
|
//#endregion
|
|
6495
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
6544
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/nodes/comment.js
|
|
6496
6545
|
var require_comment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6497
|
-
var __importDefault
|
|
6546
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
6498
6547
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
6499
6548
|
};
|
|
6500
6549
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6501
|
-
const node_1
|
|
6502
|
-
const type_1
|
|
6503
|
-
var CommentNode = class CommentNode extends node_1
|
|
6550
|
+
const node_1 = __importDefault(require_node$1());
|
|
6551
|
+
const type_1 = __importDefault(require_type());
|
|
6552
|
+
var CommentNode = class CommentNode extends node_1.default {
|
|
6504
6553
|
clone() {
|
|
6505
6554
|
return new CommentNode(this.rawText, null, void 0, this.rawTagName);
|
|
6506
6555
|
}
|
|
@@ -6512,7 +6561,7 @@ var require_comment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6512
6561
|
* Node Type declaration.
|
|
6513
6562
|
* @type {Number}
|
|
6514
6563
|
*/
|
|
6515
|
-
this.nodeType = type_1
|
|
6564
|
+
this.nodeType = type_1.default.COMMENT_NODE;
|
|
6516
6565
|
}
|
|
6517
6566
|
/**
|
|
6518
6567
|
* Get unescaped text value of current node and its children.
|
|
@@ -6534,54 +6583,54 @@ var require_lib$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6534
6583
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6535
6584
|
exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
|
|
6536
6585
|
/** Types of elements found in htmlparser2's DOM */
|
|
6537
|
-
var ElementType
|
|
6538
|
-
(function(ElementType
|
|
6586
|
+
var ElementType;
|
|
6587
|
+
(function(ElementType) {
|
|
6539
6588
|
/** Type for the root element of a document */
|
|
6540
|
-
ElementType
|
|
6589
|
+
ElementType["Root"] = "root";
|
|
6541
6590
|
/** Type for Text */
|
|
6542
|
-
ElementType
|
|
6591
|
+
ElementType["Text"] = "text";
|
|
6543
6592
|
/** Type for <? ... ?> */
|
|
6544
|
-
ElementType
|
|
6593
|
+
ElementType["Directive"] = "directive";
|
|
6545
6594
|
/** Type for <!-- ... --> */
|
|
6546
|
-
ElementType
|
|
6595
|
+
ElementType["Comment"] = "comment";
|
|
6547
6596
|
/** Type for <script> tags */
|
|
6548
|
-
ElementType
|
|
6597
|
+
ElementType["Script"] = "script";
|
|
6549
6598
|
/** Type for <style> tags */
|
|
6550
|
-
ElementType
|
|
6599
|
+
ElementType["Style"] = "style";
|
|
6551
6600
|
/** Type for Any tag */
|
|
6552
|
-
ElementType
|
|
6601
|
+
ElementType["Tag"] = "tag";
|
|
6553
6602
|
/** Type for <![CDATA[ ... ]]> */
|
|
6554
|
-
ElementType
|
|
6603
|
+
ElementType["CDATA"] = "cdata";
|
|
6555
6604
|
/** Type for <!doctype ...> */
|
|
6556
|
-
ElementType
|
|
6557
|
-
})(ElementType
|
|
6605
|
+
ElementType["Doctype"] = "doctype";
|
|
6606
|
+
})(ElementType = exports.ElementType || (exports.ElementType = {}));
|
|
6558
6607
|
/**
|
|
6559
6608
|
* Tests whether an element is a tag or not.
|
|
6560
6609
|
*
|
|
6561
6610
|
* @param elem Element to test
|
|
6562
6611
|
*/
|
|
6563
|
-
function isTag
|
|
6564
|
-
return elem.type === ElementType
|
|
6612
|
+
function isTag(elem) {
|
|
6613
|
+
return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style;
|
|
6565
6614
|
}
|
|
6566
|
-
exports.isTag = isTag
|
|
6615
|
+
exports.isTag = isTag;
|
|
6567
6616
|
/** Type for the root element of a document */
|
|
6568
|
-
exports.Root = ElementType
|
|
6617
|
+
exports.Root = ElementType.Root;
|
|
6569
6618
|
/** Type for Text */
|
|
6570
|
-
exports.Text = ElementType
|
|
6619
|
+
exports.Text = ElementType.Text;
|
|
6571
6620
|
/** Type for <? ... ?> */
|
|
6572
|
-
exports.Directive = ElementType
|
|
6621
|
+
exports.Directive = ElementType.Directive;
|
|
6573
6622
|
/** Type for <!-- ... --> */
|
|
6574
|
-
exports.Comment = ElementType
|
|
6623
|
+
exports.Comment = ElementType.Comment;
|
|
6575
6624
|
/** Type for <script> tags */
|
|
6576
|
-
exports.Script = ElementType
|
|
6625
|
+
exports.Script = ElementType.Script;
|
|
6577
6626
|
/** Type for <style> tags */
|
|
6578
|
-
exports.Style = ElementType
|
|
6627
|
+
exports.Style = ElementType.Style;
|
|
6579
6628
|
/** Type for Any tag */
|
|
6580
|
-
exports.Tag = ElementType
|
|
6629
|
+
exports.Tag = ElementType.Tag;
|
|
6581
6630
|
/** Type for <![CDATA[ ... ]]> */
|
|
6582
|
-
exports.CDATA = ElementType
|
|
6631
|
+
exports.CDATA = ElementType.CDATA;
|
|
6583
6632
|
/** Type for <!doctype ...> */
|
|
6584
|
-
exports.Doctype = ElementType
|
|
6633
|
+
exports.Doctype = ElementType.Doctype;
|
|
6585
6634
|
}));
|
|
6586
6635
|
|
|
6587
6636
|
//#endregion
|
|
@@ -6589,10 +6638,10 @@ var require_lib$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6589
6638
|
var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6590
6639
|
var __extends = exports && exports.__extends || (function() {
|
|
6591
6640
|
var extendStatics = function(d, b) {
|
|
6592
|
-
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d
|
|
6593
|
-
d
|
|
6594
|
-
} || function(d
|
|
6595
|
-
for (var p in b
|
|
6641
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
6642
|
+
d.__proto__ = b;
|
|
6643
|
+
} || function(d, b) {
|
|
6644
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
6596
6645
|
};
|
|
6597
6646
|
return extendStatics(d, b);
|
|
6598
6647
|
};
|
|
@@ -6605,25 +6654,25 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6605
6654
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
6606
6655
|
};
|
|
6607
6656
|
})();
|
|
6608
|
-
var __assign
|
|
6609
|
-
__assign
|
|
6657
|
+
var __assign = exports && exports.__assign || function() {
|
|
6658
|
+
__assign = Object.assign || function(t) {
|
|
6610
6659
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6611
6660
|
s = arguments[i];
|
|
6612
6661
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6613
6662
|
}
|
|
6614
6663
|
return t;
|
|
6615
6664
|
};
|
|
6616
|
-
return __assign
|
|
6665
|
+
return __assign.apply(this, arguments);
|
|
6617
6666
|
};
|
|
6618
6667
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6619
6668
|
exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.CDATA = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;
|
|
6620
|
-
var domelementtype_1
|
|
6669
|
+
var domelementtype_1 = require_lib$6();
|
|
6621
6670
|
/**
|
|
6622
6671
|
* This object will be used as the prototype for Nodes when creating a
|
|
6623
6672
|
* DOM-Level-1-compliant structure.
|
|
6624
6673
|
*/
|
|
6625
6674
|
var Node = function() {
|
|
6626
|
-
function Node
|
|
6675
|
+
function Node() {
|
|
6627
6676
|
/** Parent of the node */
|
|
6628
6677
|
this.parent = null;
|
|
6629
6678
|
/** Previous sibling */
|
|
@@ -6635,7 +6684,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6635
6684
|
/** The end index of the node. Requires `withEndIndices` on the handler to be `true. */
|
|
6636
6685
|
this.endIndex = null;
|
|
6637
6686
|
}
|
|
6638
|
-
Object.defineProperty(Node
|
|
6687
|
+
Object.defineProperty(Node.prototype, "parentNode", {
|
|
6639
6688
|
get: function() {
|
|
6640
6689
|
return this.parent;
|
|
6641
6690
|
},
|
|
@@ -6645,7 +6694,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6645
6694
|
enumerable: false,
|
|
6646
6695
|
configurable: true
|
|
6647
6696
|
});
|
|
6648
|
-
Object.defineProperty(Node
|
|
6697
|
+
Object.defineProperty(Node.prototype, "previousSibling", {
|
|
6649
6698
|
get: function() {
|
|
6650
6699
|
return this.prev;
|
|
6651
6700
|
},
|
|
@@ -6655,7 +6704,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6655
6704
|
enumerable: false,
|
|
6656
6705
|
configurable: true
|
|
6657
6706
|
});
|
|
6658
|
-
Object.defineProperty(Node
|
|
6707
|
+
Object.defineProperty(Node.prototype, "nextSibling", {
|
|
6659
6708
|
get: function() {
|
|
6660
6709
|
return this.next;
|
|
6661
6710
|
},
|
|
@@ -6671,27 +6720,27 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6671
6720
|
* @param recursive Clone child nodes as well.
|
|
6672
6721
|
* @returns A clone of the node.
|
|
6673
6722
|
*/
|
|
6674
|
-
Node
|
|
6723
|
+
Node.prototype.cloneNode = function(recursive) {
|
|
6675
6724
|
if (recursive === void 0) recursive = false;
|
|
6676
6725
|
return cloneNode(this, recursive);
|
|
6677
6726
|
};
|
|
6678
|
-
return Node
|
|
6727
|
+
return Node;
|
|
6679
6728
|
}();
|
|
6680
6729
|
exports.Node = Node;
|
|
6681
6730
|
/**
|
|
6682
6731
|
* A node that contains some data.
|
|
6683
6732
|
*/
|
|
6684
6733
|
var DataNode = function(_super) {
|
|
6685
|
-
__extends(DataNode
|
|
6734
|
+
__extends(DataNode, _super);
|
|
6686
6735
|
/**
|
|
6687
6736
|
* @param data The content of the data node
|
|
6688
6737
|
*/
|
|
6689
|
-
function DataNode
|
|
6738
|
+
function DataNode(data) {
|
|
6690
6739
|
var _this = _super.call(this) || this;
|
|
6691
6740
|
_this.data = data;
|
|
6692
6741
|
return _this;
|
|
6693
6742
|
}
|
|
6694
|
-
Object.defineProperty(DataNode
|
|
6743
|
+
Object.defineProperty(DataNode.prototype, "nodeValue", {
|
|
6695
6744
|
get: function() {
|
|
6696
6745
|
return this.data;
|
|
6697
6746
|
},
|
|
@@ -6701,99 +6750,99 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6701
6750
|
enumerable: false,
|
|
6702
6751
|
configurable: true
|
|
6703
6752
|
});
|
|
6704
|
-
return DataNode
|
|
6753
|
+
return DataNode;
|
|
6705
6754
|
}(Node);
|
|
6706
6755
|
exports.DataNode = DataNode;
|
|
6707
6756
|
/**
|
|
6708
6757
|
* Text within the document.
|
|
6709
6758
|
*/
|
|
6710
6759
|
var Text = function(_super) {
|
|
6711
|
-
__extends(Text
|
|
6712
|
-
function Text
|
|
6760
|
+
__extends(Text, _super);
|
|
6761
|
+
function Text() {
|
|
6713
6762
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
6714
|
-
_this.type = domelementtype_1
|
|
6763
|
+
_this.type = domelementtype_1.ElementType.Text;
|
|
6715
6764
|
return _this;
|
|
6716
6765
|
}
|
|
6717
|
-
Object.defineProperty(Text
|
|
6766
|
+
Object.defineProperty(Text.prototype, "nodeType", {
|
|
6718
6767
|
get: function() {
|
|
6719
6768
|
return 3;
|
|
6720
6769
|
},
|
|
6721
6770
|
enumerable: false,
|
|
6722
6771
|
configurable: true
|
|
6723
6772
|
});
|
|
6724
|
-
return Text
|
|
6773
|
+
return Text;
|
|
6725
6774
|
}(DataNode);
|
|
6726
6775
|
exports.Text = Text;
|
|
6727
6776
|
/**
|
|
6728
6777
|
* Comments within the document.
|
|
6729
6778
|
*/
|
|
6730
6779
|
var Comment = function(_super) {
|
|
6731
|
-
__extends(Comment
|
|
6732
|
-
function Comment
|
|
6780
|
+
__extends(Comment, _super);
|
|
6781
|
+
function Comment() {
|
|
6733
6782
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
6734
|
-
_this.type = domelementtype_1
|
|
6783
|
+
_this.type = domelementtype_1.ElementType.Comment;
|
|
6735
6784
|
return _this;
|
|
6736
6785
|
}
|
|
6737
|
-
Object.defineProperty(Comment
|
|
6786
|
+
Object.defineProperty(Comment.prototype, "nodeType", {
|
|
6738
6787
|
get: function() {
|
|
6739
6788
|
return 8;
|
|
6740
6789
|
},
|
|
6741
6790
|
enumerable: false,
|
|
6742
6791
|
configurable: true
|
|
6743
6792
|
});
|
|
6744
|
-
return Comment
|
|
6793
|
+
return Comment;
|
|
6745
6794
|
}(DataNode);
|
|
6746
6795
|
exports.Comment = Comment;
|
|
6747
6796
|
/**
|
|
6748
6797
|
* Processing instructions, including doc types.
|
|
6749
6798
|
*/
|
|
6750
6799
|
var ProcessingInstruction = function(_super) {
|
|
6751
|
-
__extends(ProcessingInstruction
|
|
6752
|
-
function ProcessingInstruction
|
|
6800
|
+
__extends(ProcessingInstruction, _super);
|
|
6801
|
+
function ProcessingInstruction(name, data) {
|
|
6753
6802
|
var _this = _super.call(this, data) || this;
|
|
6754
6803
|
_this.name = name;
|
|
6755
|
-
_this.type = domelementtype_1
|
|
6804
|
+
_this.type = domelementtype_1.ElementType.Directive;
|
|
6756
6805
|
return _this;
|
|
6757
6806
|
}
|
|
6758
|
-
Object.defineProperty(ProcessingInstruction
|
|
6807
|
+
Object.defineProperty(ProcessingInstruction.prototype, "nodeType", {
|
|
6759
6808
|
get: function() {
|
|
6760
6809
|
return 1;
|
|
6761
6810
|
},
|
|
6762
6811
|
enumerable: false,
|
|
6763
6812
|
configurable: true
|
|
6764
6813
|
});
|
|
6765
|
-
return ProcessingInstruction
|
|
6814
|
+
return ProcessingInstruction;
|
|
6766
6815
|
}(DataNode);
|
|
6767
6816
|
exports.ProcessingInstruction = ProcessingInstruction;
|
|
6768
6817
|
/**
|
|
6769
6818
|
* A `Node` that can have children.
|
|
6770
6819
|
*/
|
|
6771
6820
|
var NodeWithChildren = function(_super) {
|
|
6772
|
-
__extends(NodeWithChildren
|
|
6821
|
+
__extends(NodeWithChildren, _super);
|
|
6773
6822
|
/**
|
|
6774
6823
|
* @param children Children of the node. Only certain node types can have children.
|
|
6775
6824
|
*/
|
|
6776
|
-
function NodeWithChildren
|
|
6825
|
+
function NodeWithChildren(children) {
|
|
6777
6826
|
var _this = _super.call(this) || this;
|
|
6778
6827
|
_this.children = children;
|
|
6779
6828
|
return _this;
|
|
6780
6829
|
}
|
|
6781
|
-
Object.defineProperty(NodeWithChildren
|
|
6830
|
+
Object.defineProperty(NodeWithChildren.prototype, "firstChild", {
|
|
6782
6831
|
get: function() {
|
|
6783
|
-
var _a
|
|
6784
|
-
return (_a
|
|
6832
|
+
var _a;
|
|
6833
|
+
return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
|
|
6785
6834
|
},
|
|
6786
6835
|
enumerable: false,
|
|
6787
6836
|
configurable: true
|
|
6788
6837
|
});
|
|
6789
|
-
Object.defineProperty(NodeWithChildren
|
|
6838
|
+
Object.defineProperty(NodeWithChildren.prototype, "lastChild", {
|
|
6790
6839
|
get: function() {
|
|
6791
6840
|
return this.children.length > 0 ? this.children[this.children.length - 1] : null;
|
|
6792
6841
|
},
|
|
6793
6842
|
enumerable: false,
|
|
6794
6843
|
configurable: true
|
|
6795
6844
|
});
|
|
6796
|
-
Object.defineProperty(NodeWithChildren
|
|
6845
|
+
Object.defineProperty(NodeWithChildren.prototype, "childNodes", {
|
|
6797
6846
|
get: function() {
|
|
6798
6847
|
return this.children;
|
|
6799
6848
|
},
|
|
@@ -6803,73 +6852,73 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6803
6852
|
enumerable: false,
|
|
6804
6853
|
configurable: true
|
|
6805
6854
|
});
|
|
6806
|
-
return NodeWithChildren
|
|
6855
|
+
return NodeWithChildren;
|
|
6807
6856
|
}(Node);
|
|
6808
6857
|
exports.NodeWithChildren = NodeWithChildren;
|
|
6809
6858
|
var CDATA = function(_super) {
|
|
6810
|
-
__extends(CDATA
|
|
6811
|
-
function CDATA
|
|
6859
|
+
__extends(CDATA, _super);
|
|
6860
|
+
function CDATA() {
|
|
6812
6861
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
6813
|
-
_this.type = domelementtype_1
|
|
6862
|
+
_this.type = domelementtype_1.ElementType.CDATA;
|
|
6814
6863
|
return _this;
|
|
6815
6864
|
}
|
|
6816
|
-
Object.defineProperty(CDATA
|
|
6865
|
+
Object.defineProperty(CDATA.prototype, "nodeType", {
|
|
6817
6866
|
get: function() {
|
|
6818
6867
|
return 4;
|
|
6819
6868
|
},
|
|
6820
6869
|
enumerable: false,
|
|
6821
6870
|
configurable: true
|
|
6822
6871
|
});
|
|
6823
|
-
return CDATA
|
|
6872
|
+
return CDATA;
|
|
6824
6873
|
}(NodeWithChildren);
|
|
6825
6874
|
exports.CDATA = CDATA;
|
|
6826
6875
|
/**
|
|
6827
6876
|
* The root node of the document.
|
|
6828
6877
|
*/
|
|
6829
6878
|
var Document = function(_super) {
|
|
6830
|
-
__extends(Document
|
|
6831
|
-
function Document
|
|
6879
|
+
__extends(Document, _super);
|
|
6880
|
+
function Document() {
|
|
6832
6881
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
6833
|
-
_this.type = domelementtype_1
|
|
6882
|
+
_this.type = domelementtype_1.ElementType.Root;
|
|
6834
6883
|
return _this;
|
|
6835
6884
|
}
|
|
6836
|
-
Object.defineProperty(Document
|
|
6885
|
+
Object.defineProperty(Document.prototype, "nodeType", {
|
|
6837
6886
|
get: function() {
|
|
6838
6887
|
return 9;
|
|
6839
6888
|
},
|
|
6840
6889
|
enumerable: false,
|
|
6841
6890
|
configurable: true
|
|
6842
6891
|
});
|
|
6843
|
-
return Document
|
|
6892
|
+
return Document;
|
|
6844
6893
|
}(NodeWithChildren);
|
|
6845
6894
|
exports.Document = Document;
|
|
6846
6895
|
/**
|
|
6847
6896
|
* An element within the DOM.
|
|
6848
6897
|
*/
|
|
6849
|
-
var Element
|
|
6850
|
-
__extends(Element
|
|
6898
|
+
var Element = function(_super) {
|
|
6899
|
+
__extends(Element, _super);
|
|
6851
6900
|
/**
|
|
6852
6901
|
* @param name Name of the tag, eg. `div`, `span`.
|
|
6853
6902
|
* @param attribs Object mapping attribute names to attribute values.
|
|
6854
6903
|
* @param children Children of the node.
|
|
6855
6904
|
*/
|
|
6856
|
-
function Element
|
|
6905
|
+
function Element(name, attribs, children, type) {
|
|
6857
6906
|
if (children === void 0) children = [];
|
|
6858
|
-
if (type === void 0) type = name === "script" ? domelementtype_1
|
|
6907
|
+
if (type === void 0) type = name === "script" ? domelementtype_1.ElementType.Script : name === "style" ? domelementtype_1.ElementType.Style : domelementtype_1.ElementType.Tag;
|
|
6859
6908
|
var _this = _super.call(this, children) || this;
|
|
6860
6909
|
_this.name = name;
|
|
6861
6910
|
_this.attribs = attribs;
|
|
6862
6911
|
_this.type = type;
|
|
6863
6912
|
return _this;
|
|
6864
6913
|
}
|
|
6865
|
-
Object.defineProperty(Element
|
|
6914
|
+
Object.defineProperty(Element.prototype, "nodeType", {
|
|
6866
6915
|
get: function() {
|
|
6867
6916
|
return 1;
|
|
6868
6917
|
},
|
|
6869
6918
|
enumerable: false,
|
|
6870
6919
|
configurable: true
|
|
6871
6920
|
});
|
|
6872
|
-
Object.defineProperty(Element
|
|
6921
|
+
Object.defineProperty(Element.prototype, "tagName", {
|
|
6873
6922
|
get: function() {
|
|
6874
6923
|
return this.name;
|
|
6875
6924
|
},
|
|
@@ -6879,15 +6928,15 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6879
6928
|
enumerable: false,
|
|
6880
6929
|
configurable: true
|
|
6881
6930
|
});
|
|
6882
|
-
Object.defineProperty(Element
|
|
6931
|
+
Object.defineProperty(Element.prototype, "attributes", {
|
|
6883
6932
|
get: function() {
|
|
6884
6933
|
var _this = this;
|
|
6885
6934
|
return Object.keys(this.attribs).map(function(name) {
|
|
6886
|
-
var _a
|
|
6935
|
+
var _a, _b;
|
|
6887
6936
|
return {
|
|
6888
6937
|
name,
|
|
6889
6938
|
value: _this.attribs[name],
|
|
6890
|
-
namespace: (_a
|
|
6939
|
+
namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name],
|
|
6891
6940
|
prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name]
|
|
6892
6941
|
};
|
|
6893
6942
|
});
|
|
@@ -6895,23 +6944,23 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6895
6944
|
enumerable: false,
|
|
6896
6945
|
configurable: true
|
|
6897
6946
|
});
|
|
6898
|
-
return Element
|
|
6947
|
+
return Element;
|
|
6899
6948
|
}(NodeWithChildren);
|
|
6900
|
-
exports.Element = Element
|
|
6949
|
+
exports.Element = Element;
|
|
6901
6950
|
/**
|
|
6902
6951
|
* @param node Node to check.
|
|
6903
6952
|
* @returns `true` if the node is a `Element`, `false` otherwise.
|
|
6904
6953
|
*/
|
|
6905
|
-
function isTag
|
|
6906
|
-
return (0, domelementtype_1
|
|
6954
|
+
function isTag(node) {
|
|
6955
|
+
return (0, domelementtype_1.isTag)(node);
|
|
6907
6956
|
}
|
|
6908
|
-
exports.isTag = isTag
|
|
6957
|
+
exports.isTag = isTag;
|
|
6909
6958
|
/**
|
|
6910
6959
|
* @param node Node to check.
|
|
6911
6960
|
* @returns `true` if the node has the type `CDATA`, `false` otherwise.
|
|
6912
6961
|
*/
|
|
6913
6962
|
function isCDATA(node) {
|
|
6914
|
-
return node.type === domelementtype_1
|
|
6963
|
+
return node.type === domelementtype_1.ElementType.CDATA;
|
|
6915
6964
|
}
|
|
6916
6965
|
exports.isCDATA = isCDATA;
|
|
6917
6966
|
/**
|
|
@@ -6919,7 +6968,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6919
6968
|
* @returns `true` if the node has the type `Text`, `false` otherwise.
|
|
6920
6969
|
*/
|
|
6921
6970
|
function isText(node) {
|
|
6922
|
-
return node.type === domelementtype_1
|
|
6971
|
+
return node.type === domelementtype_1.ElementType.Text;
|
|
6923
6972
|
}
|
|
6924
6973
|
exports.isText = isText;
|
|
6925
6974
|
/**
|
|
@@ -6927,7 +6976,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6927
6976
|
* @returns `true` if the node has the type `Comment`, `false` otherwise.
|
|
6928
6977
|
*/
|
|
6929
6978
|
function isComment(node) {
|
|
6930
|
-
return node.type === domelementtype_1
|
|
6979
|
+
return node.type === domelementtype_1.ElementType.Comment;
|
|
6931
6980
|
}
|
|
6932
6981
|
exports.isComment = isComment;
|
|
6933
6982
|
/**
|
|
@@ -6935,7 +6984,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6935
6984
|
* @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.
|
|
6936
6985
|
*/
|
|
6937
6986
|
function isDirective(node) {
|
|
6938
|
-
return node.type === domelementtype_1
|
|
6987
|
+
return node.type === domelementtype_1.ElementType.Directive;
|
|
6939
6988
|
}
|
|
6940
6989
|
exports.isDirective = isDirective;
|
|
6941
6990
|
/**
|
|
@@ -6943,7 +6992,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6943
6992
|
* @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.
|
|
6944
6993
|
*/
|
|
6945
6994
|
function isDocument(node) {
|
|
6946
|
-
return node.type === domelementtype_1
|
|
6995
|
+
return node.type === domelementtype_1.ElementType.Root;
|
|
6947
6996
|
}
|
|
6948
6997
|
exports.isDocument = isDocument;
|
|
6949
6998
|
/**
|
|
@@ -6965,15 +7014,15 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6965
7014
|
var result;
|
|
6966
7015
|
if (isText(node)) result = new Text(node.data);
|
|
6967
7016
|
else if (isComment(node)) result = new Comment(node.data);
|
|
6968
|
-
else if (isTag
|
|
7017
|
+
else if (isTag(node)) {
|
|
6969
7018
|
var children = recursive ? cloneChildren(node.children) : [];
|
|
6970
|
-
var clone_1 = new Element
|
|
7019
|
+
var clone_1 = new Element(node.name, __assign({}, node.attribs), children);
|
|
6971
7020
|
children.forEach(function(child) {
|
|
6972
7021
|
return child.parent = clone_1;
|
|
6973
7022
|
});
|
|
6974
7023
|
if (node.namespace != null) clone_1.namespace = node.namespace;
|
|
6975
|
-
if (node["x-attribsNamespace"]) clone_1["x-attribsNamespace"] = __assign
|
|
6976
|
-
if (node["x-attribsPrefix"]) clone_1["x-attribsPrefix"] = __assign
|
|
7024
|
+
if (node["x-attribsNamespace"]) clone_1["x-attribsNamespace"] = __assign({}, node["x-attribsNamespace"]);
|
|
7025
|
+
if (node["x-attribsPrefix"]) clone_1["x-attribsPrefix"] = __assign({}, node["x-attribsPrefix"]);
|
|
6977
7026
|
result = clone_1;
|
|
6978
7027
|
} else if (isCDATA(node)) {
|
|
6979
7028
|
var children = recursive ? cloneChildren(node.children) : [];
|
|
@@ -7020,7 +7069,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7020
7069
|
//#endregion
|
|
7021
7070
|
//#region ../../node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/index.js
|
|
7022
7071
|
var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7023
|
-
var __createBinding
|
|
7072
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
7024
7073
|
if (k2 === void 0) k2 = k;
|
|
7025
7074
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7026
7075
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
@@ -7034,14 +7083,14 @@ var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7034
7083
|
if (k2 === void 0) k2 = k;
|
|
7035
7084
|
o[k2] = m[k];
|
|
7036
7085
|
}));
|
|
7037
|
-
var __exportStar
|
|
7038
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$
|
|
7086
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$2) {
|
|
7087
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$2, p)) __createBinding(exports$2, m, p);
|
|
7039
7088
|
};
|
|
7040
7089
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7041
7090
|
exports.DomHandler = void 0;
|
|
7042
|
-
var domelementtype_1
|
|
7091
|
+
var domelementtype_1 = require_lib$6();
|
|
7043
7092
|
var node_js_1 = require_node();
|
|
7044
|
-
__exportStar
|
|
7093
|
+
__exportStar(require_node(), exports);
|
|
7045
7094
|
var defaultOpts = {
|
|
7046
7095
|
withStartIndices: false,
|
|
7047
7096
|
withEndIndices: false,
|
|
@@ -7053,7 +7102,7 @@ var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7053
7102
|
* @param options Settings for the handler.
|
|
7054
7103
|
* @param elementCB Callback whenever a tag is closed.
|
|
7055
7104
|
*/
|
|
7056
|
-
function DomHandler
|
|
7105
|
+
function DomHandler(callback, options, elementCB) {
|
|
7057
7106
|
/** The elements of the DOM */
|
|
7058
7107
|
this.dom = [];
|
|
7059
7108
|
/** The root element for the DOM */
|
|
@@ -7078,10 +7127,10 @@ var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7078
7127
|
this.options = options !== null && options !== void 0 ? options : defaultOpts;
|
|
7079
7128
|
this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;
|
|
7080
7129
|
}
|
|
7081
|
-
DomHandler
|
|
7130
|
+
DomHandler.prototype.onparserinit = function(parser) {
|
|
7082
7131
|
this.parser = parser;
|
|
7083
7132
|
};
|
|
7084
|
-
DomHandler
|
|
7133
|
+
DomHandler.prototype.onreset = function() {
|
|
7085
7134
|
this.dom = [];
|
|
7086
7135
|
this.root = new node_js_1.Document(this.dom);
|
|
7087
7136
|
this.done = false;
|
|
@@ -7089,30 +7138,30 @@ var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7089
7138
|
this.lastNode = null;
|
|
7090
7139
|
this.parser = null;
|
|
7091
7140
|
};
|
|
7092
|
-
DomHandler
|
|
7141
|
+
DomHandler.prototype.onend = function() {
|
|
7093
7142
|
if (this.done) return;
|
|
7094
7143
|
this.done = true;
|
|
7095
7144
|
this.parser = null;
|
|
7096
7145
|
this.handleCallback(null);
|
|
7097
7146
|
};
|
|
7098
|
-
DomHandler
|
|
7147
|
+
DomHandler.prototype.onerror = function(error) {
|
|
7099
7148
|
this.handleCallback(error);
|
|
7100
7149
|
};
|
|
7101
|
-
DomHandler
|
|
7150
|
+
DomHandler.prototype.onclosetag = function() {
|
|
7102
7151
|
this.lastNode = null;
|
|
7103
7152
|
var elem = this.tagStack.pop();
|
|
7104
7153
|
if (this.options.withEndIndices) elem.endIndex = this.parser.endIndex;
|
|
7105
7154
|
if (this.elementCB) this.elementCB(elem);
|
|
7106
7155
|
};
|
|
7107
|
-
DomHandler
|
|
7108
|
-
var type = this.options.xmlMode ? domelementtype_1
|
|
7156
|
+
DomHandler.prototype.onopentag = function(name, attribs) {
|
|
7157
|
+
var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : void 0;
|
|
7109
7158
|
var element = new node_js_1.Element(name, attribs, void 0, type);
|
|
7110
7159
|
this.addNode(element);
|
|
7111
7160
|
this.tagStack.push(element);
|
|
7112
7161
|
};
|
|
7113
|
-
DomHandler
|
|
7162
|
+
DomHandler.prototype.ontext = function(data) {
|
|
7114
7163
|
var lastNode = this.lastNode;
|
|
7115
|
-
if (lastNode && lastNode.type === domelementtype_1
|
|
7164
|
+
if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {
|
|
7116
7165
|
lastNode.data += data;
|
|
7117
7166
|
if (this.options.withEndIndices) lastNode.endIndex = this.parser.endIndex;
|
|
7118
7167
|
} else {
|
|
@@ -7121,8 +7170,8 @@ var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7121
7170
|
this.lastNode = node;
|
|
7122
7171
|
}
|
|
7123
7172
|
};
|
|
7124
|
-
DomHandler
|
|
7125
|
-
if (this.lastNode && this.lastNode.type === domelementtype_1
|
|
7173
|
+
DomHandler.prototype.oncomment = function(data) {
|
|
7174
|
+
if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {
|
|
7126
7175
|
this.lastNode.data += data;
|
|
7127
7176
|
return;
|
|
7128
7177
|
}
|
|
@@ -7130,28 +7179,28 @@ var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7130
7179
|
this.addNode(node);
|
|
7131
7180
|
this.lastNode = node;
|
|
7132
7181
|
};
|
|
7133
|
-
DomHandler
|
|
7182
|
+
DomHandler.prototype.oncommentend = function() {
|
|
7134
7183
|
this.lastNode = null;
|
|
7135
7184
|
};
|
|
7136
|
-
DomHandler
|
|
7185
|
+
DomHandler.prototype.oncdatastart = function() {
|
|
7137
7186
|
var text = new node_js_1.Text("");
|
|
7138
7187
|
var node = new node_js_1.CDATA([text]);
|
|
7139
7188
|
this.addNode(node);
|
|
7140
7189
|
text.parent = node;
|
|
7141
7190
|
this.lastNode = text;
|
|
7142
7191
|
};
|
|
7143
|
-
DomHandler
|
|
7192
|
+
DomHandler.prototype.oncdataend = function() {
|
|
7144
7193
|
this.lastNode = null;
|
|
7145
7194
|
};
|
|
7146
|
-
DomHandler
|
|
7195
|
+
DomHandler.prototype.onprocessinginstruction = function(name, data) {
|
|
7147
7196
|
var node = new node_js_1.ProcessingInstruction(name, data);
|
|
7148
7197
|
this.addNode(node);
|
|
7149
7198
|
};
|
|
7150
|
-
DomHandler
|
|
7199
|
+
DomHandler.prototype.handleCallback = function(error) {
|
|
7151
7200
|
if (typeof this.callback === "function") this.callback(error, this.dom);
|
|
7152
7201
|
else if (error) throw error;
|
|
7153
7202
|
};
|
|
7154
|
-
DomHandler
|
|
7203
|
+
DomHandler.prototype.addNode = function(node) {
|
|
7155
7204
|
var parent = this.tagStack[this.tagStack.length - 1];
|
|
7156
7205
|
var previousSibling = parent.children[parent.children.length - 1];
|
|
7157
7206
|
if (this.options.withStartIndices) node.startIndex = this.parser.startIndex;
|
|
@@ -7164,7 +7213,7 @@ var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7164
7213
|
node.parent = parent;
|
|
7165
7214
|
this.lastNode = null;
|
|
7166
7215
|
};
|
|
7167
|
-
return DomHandler
|
|
7216
|
+
return DomHandler;
|
|
7168
7217
|
}();
|
|
7169
7218
|
exports.DomHandler = DomHandler;
|
|
7170
7219
|
exports.default = DomHandler;
|
|
@@ -7243,9 +7292,9 @@ var require_decode_codepoint = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7243
7292
|
* point unchanged.
|
|
7244
7293
|
*/
|
|
7245
7294
|
function replaceCodePoint(codePoint) {
|
|
7246
|
-
var _a
|
|
7295
|
+
var _a;
|
|
7247
7296
|
if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) return 65533;
|
|
7248
|
-
return (_a
|
|
7297
|
+
return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;
|
|
7249
7298
|
}
|
|
7250
7299
|
exports.replaceCodePoint = replaceCodePoint;
|
|
7251
7300
|
/**
|
|
@@ -7264,7 +7313,7 @@ var require_decode_codepoint = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7264
7313
|
//#endregion
|
|
7265
7314
|
//#region ../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/decode.js
|
|
7266
7315
|
var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7267
|
-
var __createBinding
|
|
7316
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
7268
7317
|
if (k2 === void 0) k2 = k;
|
|
7269
7318
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7270
7319
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
@@ -7278,7 +7327,7 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7278
7327
|
if (k2 === void 0) k2 = k;
|
|
7279
7328
|
o[k2] = m[k];
|
|
7280
7329
|
}));
|
|
7281
|
-
var __setModuleDefault
|
|
7330
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
7282
7331
|
Object.defineProperty(o, "default", {
|
|
7283
7332
|
enumerable: true,
|
|
7284
7333
|
value: v
|
|
@@ -7286,25 +7335,25 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7286
7335
|
}) : function(o, v) {
|
|
7287
7336
|
o["default"] = v;
|
|
7288
7337
|
});
|
|
7289
|
-
var __importStar
|
|
7338
|
+
var __importStar = exports && exports.__importStar || function(mod) {
|
|
7290
7339
|
if (mod && mod.__esModule) return mod;
|
|
7291
7340
|
var result = {};
|
|
7292
7341
|
if (mod != null) {
|
|
7293
|
-
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding
|
|
7342
|
+
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
7294
7343
|
}
|
|
7295
|
-
__setModuleDefault
|
|
7344
|
+
__setModuleDefault(result, mod);
|
|
7296
7345
|
return result;
|
|
7297
7346
|
};
|
|
7298
|
-
var __importDefault
|
|
7347
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
7299
7348
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
7300
7349
|
};
|
|
7301
7350
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7302
7351
|
exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0;
|
|
7303
|
-
var decode_data_html_js_1 = __importDefault
|
|
7352
|
+
var decode_data_html_js_1 = __importDefault(require_decode_data_html());
|
|
7304
7353
|
exports.htmlDecodeTree = decode_data_html_js_1.default;
|
|
7305
|
-
var decode_data_xml_js_1 = __importDefault
|
|
7354
|
+
var decode_data_xml_js_1 = __importDefault(require_decode_data_xml());
|
|
7306
7355
|
exports.xmlDecodeTree = decode_data_xml_js_1.default;
|
|
7307
|
-
var decode_codepoint_js_1 = __importStar
|
|
7356
|
+
var decode_codepoint_js_1 = __importStar(require_decode_codepoint());
|
|
7308
7357
|
exports.decodeCodePoint = decode_codepoint_js_1.default;
|
|
7309
7358
|
var decode_codepoint_js_2 = require_decode_codepoint();
|
|
7310
7359
|
Object.defineProperty(exports, "replaceCodePoint", {
|
|
@@ -7320,27 +7369,27 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7320
7369
|
}
|
|
7321
7370
|
});
|
|
7322
7371
|
var CharCodes;
|
|
7323
|
-
(function(CharCodes
|
|
7324
|
-
CharCodes
|
|
7325
|
-
CharCodes
|
|
7326
|
-
CharCodes
|
|
7327
|
-
CharCodes
|
|
7328
|
-
CharCodes
|
|
7329
|
-
CharCodes
|
|
7330
|
-
CharCodes
|
|
7331
|
-
CharCodes
|
|
7332
|
-
CharCodes
|
|
7333
|
-
CharCodes
|
|
7334
|
-
CharCodes
|
|
7335
|
-
CharCodes
|
|
7372
|
+
(function(CharCodes) {
|
|
7373
|
+
CharCodes[CharCodes["NUM"] = 35] = "NUM";
|
|
7374
|
+
CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
|
|
7375
|
+
CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
|
|
7376
|
+
CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
|
|
7377
|
+
CharCodes[CharCodes["NINE"] = 57] = "NINE";
|
|
7378
|
+
CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
|
|
7379
|
+
CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
|
|
7380
|
+
CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
|
|
7381
|
+
CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
|
|
7382
|
+
CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
|
|
7383
|
+
CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
|
|
7384
|
+
CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
|
|
7336
7385
|
})(CharCodes || (CharCodes = {}));
|
|
7337
7386
|
/** Bit that needs to be set to convert an upper case ASCII character to lower case */
|
|
7338
7387
|
var TO_LOWER_BIT = 32;
|
|
7339
7388
|
var BinTrieFlags;
|
|
7340
|
-
(function(BinTrieFlags
|
|
7341
|
-
BinTrieFlags
|
|
7342
|
-
BinTrieFlags
|
|
7343
|
-
BinTrieFlags
|
|
7389
|
+
(function(BinTrieFlags) {
|
|
7390
|
+
BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
|
|
7391
|
+
BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
|
|
7392
|
+
BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
|
|
7344
7393
|
})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {}));
|
|
7345
7394
|
function isNumber(code) {
|
|
7346
7395
|
return code >= CharCodes.ZERO && code <= CharCodes.NINE;
|
|
@@ -7361,27 +7410,27 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7361
7410
|
return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
|
|
7362
7411
|
}
|
|
7363
7412
|
var EntityDecoderState;
|
|
7364
|
-
(function(EntityDecoderState
|
|
7365
|
-
EntityDecoderState
|
|
7366
|
-
EntityDecoderState
|
|
7367
|
-
EntityDecoderState
|
|
7368
|
-
EntityDecoderState
|
|
7369
|
-
EntityDecoderState
|
|
7413
|
+
(function(EntityDecoderState) {
|
|
7414
|
+
EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
|
|
7415
|
+
EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
|
|
7416
|
+
EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
|
|
7417
|
+
EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
|
|
7418
|
+
EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
|
|
7370
7419
|
})(EntityDecoderState || (EntityDecoderState = {}));
|
|
7371
7420
|
var DecodingMode;
|
|
7372
|
-
(function(DecodingMode
|
|
7421
|
+
(function(DecodingMode) {
|
|
7373
7422
|
/** Entities in text nodes that can end with any character. */
|
|
7374
|
-
DecodingMode
|
|
7423
|
+
DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
|
|
7375
7424
|
/** Only allow entities terminated with a semicolon. */
|
|
7376
|
-
DecodingMode
|
|
7425
|
+
DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
|
|
7377
7426
|
/** Entities in attributes have limitations on ending characters. */
|
|
7378
|
-
DecodingMode
|
|
7427
|
+
DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
|
|
7379
7428
|
})(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {}));
|
|
7380
7429
|
/**
|
|
7381
7430
|
* Token decoder with support of writing partial entities.
|
|
7382
7431
|
*/
|
|
7383
7432
|
var EntityDecoder = function() {
|
|
7384
|
-
function EntityDecoder
|
|
7433
|
+
function EntityDecoder(decodeTree, emitCodePoint, errors) {
|
|
7385
7434
|
this.decodeTree = decodeTree;
|
|
7386
7435
|
this.emitCodePoint = emitCodePoint;
|
|
7387
7436
|
this.errors = errors;
|
|
@@ -7404,7 +7453,7 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7404
7453
|
this.decodeMode = DecodingMode.Strict;
|
|
7405
7454
|
}
|
|
7406
7455
|
/** Resets the instance to make it reusable. */
|
|
7407
|
-
EntityDecoder
|
|
7456
|
+
EntityDecoder.prototype.startEntity = function(decodeMode) {
|
|
7408
7457
|
this.decodeMode = decodeMode;
|
|
7409
7458
|
this.state = EntityDecoderState.EntityStart;
|
|
7410
7459
|
this.result = 0;
|
|
@@ -7423,7 +7472,7 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7423
7472
|
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
|
7424
7473
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
7425
7474
|
*/
|
|
7426
|
-
EntityDecoder
|
|
7475
|
+
EntityDecoder.prototype.write = function(str, offset) {
|
|
7427
7476
|
switch (this.state) {
|
|
7428
7477
|
case EntityDecoderState.EntityStart:
|
|
7429
7478
|
if (str.charCodeAt(offset) === CharCodes.NUM) {
|
|
@@ -7448,7 +7497,7 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7448
7497
|
* @param offset The current offset.
|
|
7449
7498
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
7450
7499
|
*/
|
|
7451
|
-
EntityDecoder
|
|
7500
|
+
EntityDecoder.prototype.stateNumericStart = function(str, offset) {
|
|
7452
7501
|
if (offset >= str.length) return -1;
|
|
7453
7502
|
if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
|
|
7454
7503
|
this.state = EntityDecoderState.NumericHex;
|
|
@@ -7458,7 +7507,7 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7458
7507
|
this.state = EntityDecoderState.NumericDecimal;
|
|
7459
7508
|
return this.stateNumericDecimal(str, offset);
|
|
7460
7509
|
};
|
|
7461
|
-
EntityDecoder
|
|
7510
|
+
EntityDecoder.prototype.addToNumericResult = function(str, start, end, base) {
|
|
7462
7511
|
if (start !== end) {
|
|
7463
7512
|
var digitCount = end - start;
|
|
7464
7513
|
this.result = this.result * Math.pow(base, digitCount) + parseInt(str.substr(start, digitCount), base);
|
|
@@ -7474,7 +7523,7 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7474
7523
|
* @param offset The current offset.
|
|
7475
7524
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
7476
7525
|
*/
|
|
7477
|
-
EntityDecoder
|
|
7526
|
+
EntityDecoder.prototype.stateNumericHex = function(str, offset) {
|
|
7478
7527
|
var startIdx = offset;
|
|
7479
7528
|
while (offset < str.length) {
|
|
7480
7529
|
var char = str.charCodeAt(offset);
|
|
@@ -7496,7 +7545,7 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7496
7545
|
* @param offset The current offset.
|
|
7497
7546
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
7498
7547
|
*/
|
|
7499
|
-
EntityDecoder
|
|
7548
|
+
EntityDecoder.prototype.stateNumericDecimal = function(str, offset) {
|
|
7500
7549
|
var startIdx = offset;
|
|
7501
7550
|
while (offset < str.length) {
|
|
7502
7551
|
var char = str.charCodeAt(offset);
|
|
@@ -7522,10 +7571,10 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7522
7571
|
* was consumed.
|
|
7523
7572
|
* @returns The number of characters that were consumed.
|
|
7524
7573
|
*/
|
|
7525
|
-
EntityDecoder
|
|
7526
|
-
var _a
|
|
7574
|
+
EntityDecoder.prototype.emitNumericEntity = function(lastCp, expectedLength) {
|
|
7575
|
+
var _a;
|
|
7527
7576
|
if (this.consumed <= expectedLength) {
|
|
7528
|
-
(_a
|
|
7577
|
+
(_a = this.errors) === null || _a === void 0 || _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
|
|
7529
7578
|
return 0;
|
|
7530
7579
|
}
|
|
7531
7580
|
if (lastCp === CharCodes.SEMI) this.consumed += 1;
|
|
@@ -7546,7 +7595,7 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7546
7595
|
* @param offset The current offset.
|
|
7547
7596
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
7548
7597
|
*/
|
|
7549
|
-
EntityDecoder
|
|
7598
|
+
EntityDecoder.prototype.stateNamedEntity = function(str, offset) {
|
|
7550
7599
|
var decodeTree = this.decodeTree;
|
|
7551
7600
|
var current = decodeTree[this.treeIndex];
|
|
7552
7601
|
var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
|
|
@@ -7572,12 +7621,12 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7572
7621
|
*
|
|
7573
7622
|
* @returns The number of characters consumed.
|
|
7574
7623
|
*/
|
|
7575
|
-
EntityDecoder
|
|
7576
|
-
var _a
|
|
7624
|
+
EntityDecoder.prototype.emitNotTerminatedNamedEntity = function() {
|
|
7625
|
+
var _a;
|
|
7577
7626
|
var _b = this, result = _b.result;
|
|
7578
7627
|
var valueLength = (_b.decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
|
|
7579
7628
|
this.emitNamedEntityData(result, valueLength, this.consumed);
|
|
7580
|
-
(_a
|
|
7629
|
+
(_a = this.errors) === null || _a === void 0 || _a.missingSemicolonAfterCharacterReference();
|
|
7581
7630
|
return this.consumed;
|
|
7582
7631
|
};
|
|
7583
7632
|
/**
|
|
@@ -7589,7 +7638,7 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7589
7638
|
*
|
|
7590
7639
|
* @returns The number of characters consumed.
|
|
7591
7640
|
*/
|
|
7592
|
-
EntityDecoder
|
|
7641
|
+
EntityDecoder.prototype.emitNamedEntityData = function(result, valueLength, consumed) {
|
|
7593
7642
|
var decodeTree = this.decodeTree;
|
|
7594
7643
|
this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed);
|
|
7595
7644
|
if (valueLength === 3) this.emitCodePoint(decodeTree[result + 2], consumed);
|
|
@@ -7602,19 +7651,19 @@ var require_decode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7602
7651
|
*
|
|
7603
7652
|
* @returns The number of characters consumed.
|
|
7604
7653
|
*/
|
|
7605
|
-
EntityDecoder
|
|
7606
|
-
var _a
|
|
7654
|
+
EntityDecoder.prototype.end = function() {
|
|
7655
|
+
var _a;
|
|
7607
7656
|
switch (this.state) {
|
|
7608
7657
|
case EntityDecoderState.NamedEntity: return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
7609
7658
|
case EntityDecoderState.NumericDecimal: return this.emitNumericEntity(0, 2);
|
|
7610
7659
|
case EntityDecoderState.NumericHex: return this.emitNumericEntity(0, 3);
|
|
7611
7660
|
case EntityDecoderState.NumericStart:
|
|
7612
|
-
(_a
|
|
7661
|
+
(_a = this.errors) === null || _a === void 0 || _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
|
|
7613
7662
|
return 0;
|
|
7614
7663
|
case EntityDecoderState.EntityStart: return 0;
|
|
7615
7664
|
}
|
|
7616
7665
|
};
|
|
7617
|
-
return EntityDecoder
|
|
7666
|
+
return EntityDecoder;
|
|
7618
7667
|
}();
|
|
7619
7668
|
exports.EntityDecoder = EntityDecoder;
|
|
7620
7669
|
/**
|
|
@@ -9497,14 +9546,14 @@ var require_escape = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9497
9546
|
* @returns Function that escapes all characters matched by the given regular
|
|
9498
9547
|
* expression using the given map of characters to escape to their entities.
|
|
9499
9548
|
*/
|
|
9500
|
-
function getEscaper(regex, map
|
|
9549
|
+
function getEscaper(regex, map) {
|
|
9501
9550
|
return function escape(data) {
|
|
9502
9551
|
var match;
|
|
9503
9552
|
var lastIdx = 0;
|
|
9504
9553
|
var result = "";
|
|
9505
9554
|
while (match = regex.exec(data)) {
|
|
9506
9555
|
if (lastIdx !== match.index) result += data.substring(lastIdx, match.index);
|
|
9507
|
-
result += map
|
|
9556
|
+
result += map.get(match[0].charCodeAt(0));
|
|
9508
9557
|
lastIdx = match.index + 1;
|
|
9509
9558
|
}
|
|
9510
9559
|
return result + data.substring(lastIdx);
|
|
@@ -9546,13 +9595,13 @@ var require_escape = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9546
9595
|
//#endregion
|
|
9547
9596
|
//#region ../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/encode.js
|
|
9548
9597
|
var require_encode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9549
|
-
var __importDefault
|
|
9598
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
9550
9599
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
9551
9600
|
};
|
|
9552
9601
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9553
9602
|
exports.encodeNonAsciiHTML = exports.encodeHTML = void 0;
|
|
9554
|
-
var encode_html_js_1 = __importDefault
|
|
9555
|
-
var escape_js_1
|
|
9603
|
+
var encode_html_js_1 = __importDefault(require_encode_html());
|
|
9604
|
+
var escape_js_1 = require_escape();
|
|
9556
9605
|
var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
|
|
9557
9606
|
/**
|
|
9558
9607
|
* Encodes all characters in the input using HTML entities. This includes
|
|
@@ -9578,7 +9627,7 @@ var require_encode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9578
9627
|
* (eg. `ü`) will be used.
|
|
9579
9628
|
*/
|
|
9580
9629
|
function encodeNonAsciiHTML(data) {
|
|
9581
|
-
return encodeHTMLTrieRe(escape_js_1
|
|
9630
|
+
return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data);
|
|
9582
9631
|
}
|
|
9583
9632
|
exports.encodeNonAsciiHTML = encodeNonAsciiHTML;
|
|
9584
9633
|
function encodeHTMLTrieRe(regExp, str) {
|
|
@@ -9606,7 +9655,7 @@ var require_encode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9606
9655
|
ret += next;
|
|
9607
9656
|
lastIdx = i + 1;
|
|
9608
9657
|
} else {
|
|
9609
|
-
var cp = (0, escape_js_1
|
|
9658
|
+
var cp = (0, escape_js_1.getCodePoint)(str, i);
|
|
9610
9659
|
ret += "&#x".concat(cp.toString(16), ";");
|
|
9611
9660
|
lastIdx = regExp.lastIndex += Number(cp !== char);
|
|
9612
9661
|
}
|
|
@@ -9625,40 +9674,40 @@ var require_lib$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9625
9674
|
var escape_js_1 = require_escape();
|
|
9626
9675
|
/** The level of entities to support. */
|
|
9627
9676
|
var EntityLevel;
|
|
9628
|
-
(function(EntityLevel
|
|
9677
|
+
(function(EntityLevel) {
|
|
9629
9678
|
/** Support only XML entities. */
|
|
9630
|
-
EntityLevel
|
|
9679
|
+
EntityLevel[EntityLevel["XML"] = 0] = "XML";
|
|
9631
9680
|
/** Support HTML entities, which are a superset of XML entities. */
|
|
9632
|
-
EntityLevel
|
|
9681
|
+
EntityLevel[EntityLevel["HTML"] = 1] = "HTML";
|
|
9633
9682
|
})(EntityLevel = exports.EntityLevel || (exports.EntityLevel = {}));
|
|
9634
9683
|
var EncodingMode;
|
|
9635
|
-
(function(EncodingMode
|
|
9684
|
+
(function(EncodingMode) {
|
|
9636
9685
|
/**
|
|
9637
9686
|
* The output is UTF-8 encoded. Only characters that need escaping within
|
|
9638
9687
|
* XML will be escaped.
|
|
9639
9688
|
*/
|
|
9640
|
-
EncodingMode
|
|
9689
|
+
EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8";
|
|
9641
9690
|
/**
|
|
9642
9691
|
* The output consists only of ASCII characters. Characters that need
|
|
9643
9692
|
* escaping within HTML, and characters that aren't ASCII characters will
|
|
9644
9693
|
* be escaped.
|
|
9645
9694
|
*/
|
|
9646
|
-
EncodingMode
|
|
9695
|
+
EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII";
|
|
9647
9696
|
/**
|
|
9648
9697
|
* Encode all characters that have an equivalent entity, as well as all
|
|
9649
9698
|
* characters that are not ASCII characters.
|
|
9650
9699
|
*/
|
|
9651
|
-
EncodingMode
|
|
9700
|
+
EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive";
|
|
9652
9701
|
/**
|
|
9653
9702
|
* Encode all characters that have to be escaped in HTML attributes,
|
|
9654
9703
|
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
|
9655
9704
|
*/
|
|
9656
|
-
EncodingMode
|
|
9705
|
+
EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute";
|
|
9657
9706
|
/**
|
|
9658
9707
|
* Encode all characters that have to be escaped in HTML text,
|
|
9659
9708
|
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
|
9660
9709
|
*/
|
|
9661
|
-
EncodingMode
|
|
9710
|
+
EncodingMode[EncodingMode["Text"] = 4] = "Text";
|
|
9662
9711
|
})(EncodingMode = exports.EncodingMode || (exports.EncodingMode = {}));
|
|
9663
9712
|
/**
|
|
9664
9713
|
* Decodes a string with entities.
|
|
@@ -9666,7 +9715,7 @@ var require_lib$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9666
9715
|
* @param data String to decode.
|
|
9667
9716
|
* @param options Decoding options.
|
|
9668
9717
|
*/
|
|
9669
|
-
function decode
|
|
9718
|
+
function decode(data, options) {
|
|
9670
9719
|
if (options === void 0) options = EntityLevel.XML;
|
|
9671
9720
|
if ((typeof options === "number" ? options : options.level) === EntityLevel.HTML) {
|
|
9672
9721
|
var mode = typeof options === "object" ? options.mode : void 0;
|
|
@@ -9674,7 +9723,7 @@ var require_lib$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9674
9723
|
}
|
|
9675
9724
|
return (0, decode_js_1.decodeXML)(data);
|
|
9676
9725
|
}
|
|
9677
|
-
exports.decode = decode
|
|
9726
|
+
exports.decode = decode;
|
|
9678
9727
|
/**
|
|
9679
9728
|
* Decodes a string with entities. Does not allow missing trailing semicolons for entities.
|
|
9680
9729
|
*
|
|
@@ -9683,11 +9732,11 @@ var require_lib$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9683
9732
|
* @deprecated Use `decode` with the `mode` set to `Strict`.
|
|
9684
9733
|
*/
|
|
9685
9734
|
function decodeStrict(data, options) {
|
|
9686
|
-
var _a
|
|
9735
|
+
var _a;
|
|
9687
9736
|
if (options === void 0) options = EntityLevel.XML;
|
|
9688
9737
|
var opts = typeof options === "number" ? { level: options } : options;
|
|
9689
|
-
(_a
|
|
9690
|
-
return decode
|
|
9738
|
+
(_a = opts.mode) !== null && _a !== void 0 || (opts.mode = decode_js_1.DecodingMode.Strict);
|
|
9739
|
+
return decode(data, opts);
|
|
9691
9740
|
}
|
|
9692
9741
|
exports.decodeStrict = decodeStrict;
|
|
9693
9742
|
/**
|
|
@@ -9958,7 +10007,7 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9958
10007
|
};
|
|
9959
10008
|
return __assign.apply(this, arguments);
|
|
9960
10009
|
};
|
|
9961
|
-
var __createBinding
|
|
10010
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
9962
10011
|
if (k2 === void 0) k2 = k;
|
|
9963
10012
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9964
10013
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
@@ -9972,7 +10021,7 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9972
10021
|
if (k2 === void 0) k2 = k;
|
|
9973
10022
|
o[k2] = m[k];
|
|
9974
10023
|
}));
|
|
9975
|
-
var __setModuleDefault
|
|
10024
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
9976
10025
|
Object.defineProperty(o, "default", {
|
|
9977
10026
|
enumerable: true,
|
|
9978
10027
|
value: v
|
|
@@ -9980,18 +10029,18 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9980
10029
|
}) : function(o, v) {
|
|
9981
10030
|
o["default"] = v;
|
|
9982
10031
|
});
|
|
9983
|
-
var __importStar
|
|
10032
|
+
var __importStar = exports && exports.__importStar || function(mod) {
|
|
9984
10033
|
if (mod && mod.__esModule) return mod;
|
|
9985
10034
|
var result = {};
|
|
9986
10035
|
if (mod != null) {
|
|
9987
|
-
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding
|
|
10036
|
+
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
9988
10037
|
}
|
|
9989
|
-
__setModuleDefault
|
|
10038
|
+
__setModuleDefault(result, mod);
|
|
9990
10039
|
return result;
|
|
9991
10040
|
};
|
|
9992
10041
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9993
10042
|
exports.render = void 0;
|
|
9994
|
-
var ElementType = __importStar
|
|
10043
|
+
var ElementType = __importStar(require_lib$6());
|
|
9995
10044
|
var entities_1 = require_lib$4();
|
|
9996
10045
|
/**
|
|
9997
10046
|
* Mixed-case SVG and MathML tags & attributes
|
|
@@ -10016,16 +10065,16 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10016
10065
|
/**
|
|
10017
10066
|
* Format attributes
|
|
10018
10067
|
*/
|
|
10019
|
-
function formatAttributes(attributes
|
|
10020
|
-
var _a
|
|
10021
|
-
if (!attributes
|
|
10022
|
-
var encode
|
|
10023
|
-
return Object.keys(attributes
|
|
10024
|
-
var _a
|
|
10025
|
-
var value = (_a
|
|
10068
|
+
function formatAttributes(attributes, opts) {
|
|
10069
|
+
var _a;
|
|
10070
|
+
if (!attributes) return;
|
|
10071
|
+
var encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false ? replaceQuotes : opts.xmlMode || opts.encodeEntities !== "utf8" ? entities_1.encodeXML : entities_1.escapeAttribute;
|
|
10072
|
+
return Object.keys(attributes).map(function(key) {
|
|
10073
|
+
var _a, _b;
|
|
10074
|
+
var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : "";
|
|
10026
10075
|
if (opts.xmlMode === "foreign") key = (_b = foreignNames_js_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;
|
|
10027
10076
|
if (!opts.emptyAttrs && !opts.xmlMode && value === "") return key;
|
|
10028
|
-
return "".concat(key, "=\"").concat(encode
|
|
10077
|
+
return "".concat(key, "=\"").concat(encode(value), "\"");
|
|
10029
10078
|
}).join(" ");
|
|
10030
10079
|
}
|
|
10031
10080
|
/**
|
|
@@ -10095,9 +10144,9 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10095
10144
|
]);
|
|
10096
10145
|
var foreignElements = new Set(["svg", "math"]);
|
|
10097
10146
|
function renderTag(elem, opts) {
|
|
10098
|
-
var _a
|
|
10147
|
+
var _a;
|
|
10099
10148
|
if (opts.xmlMode === "foreign") {
|
|
10100
|
-
elem.name = (_a
|
|
10149
|
+
elem.name = (_a = foreignNames_js_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;
|
|
10101
10150
|
if (elem.parent && foreignModeIntegrationPoints.has(elem.parent.name)) opts = __assign(__assign({}, opts), { xmlMode: false });
|
|
10102
10151
|
}
|
|
10103
10152
|
if (!opts.xmlMode && foreignElements.has(elem.name)) opts = __assign(__assign({}, opts), { xmlMode: "foreign" });
|
|
@@ -10118,9 +10167,9 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10118
10167
|
return "<".concat(elem.data, ">");
|
|
10119
10168
|
}
|
|
10120
10169
|
function renderText(elem, opts) {
|
|
10121
|
-
var _a
|
|
10170
|
+
var _a;
|
|
10122
10171
|
var data = elem.data || "";
|
|
10123
|
-
if (((_a
|
|
10172
|
+
if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false && !(!opts.xmlMode && elem.parent && unencodedElements.has(elem.parent.name))) data = opts.xmlMode || opts.encodeEntities !== "utf8" ? (0, entities_1.encodeXML)(data) : (0, entities_1.escapeText)(data);
|
|
10124
10173
|
return data;
|
|
10125
10174
|
}
|
|
10126
10175
|
function renderCdata(elem) {
|
|
@@ -10134,17 +10183,17 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10134
10183
|
//#endregion
|
|
10135
10184
|
//#region ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/stringify.js
|
|
10136
10185
|
var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10137
|
-
var __importDefault
|
|
10186
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
10138
10187
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
10139
10188
|
};
|
|
10140
10189
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10141
10190
|
exports.getOuterHTML = getOuterHTML;
|
|
10142
10191
|
exports.getInnerHTML = getInnerHTML;
|
|
10143
|
-
exports.getText = getText
|
|
10192
|
+
exports.getText = getText;
|
|
10144
10193
|
exports.textContent = textContent;
|
|
10145
10194
|
exports.innerText = innerText;
|
|
10146
|
-
var domhandler_1
|
|
10147
|
-
var dom_serializer_1 = __importDefault
|
|
10195
|
+
var domhandler_1 = require_lib$5();
|
|
10196
|
+
var dom_serializer_1 = __importDefault(require_lib$3());
|
|
10148
10197
|
var domelementtype_1 = require_lib$6();
|
|
10149
10198
|
/**
|
|
10150
10199
|
* @category Stringify
|
|
@@ -10164,8 +10213,8 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10164
10213
|
* @returns `node`'s inner HTML.
|
|
10165
10214
|
*/
|
|
10166
10215
|
function getInnerHTML(node, options) {
|
|
10167
|
-
return (0, domhandler_1
|
|
10168
|
-
return getOuterHTML(node
|
|
10216
|
+
return (0, domhandler_1.hasChildren)(node) ? node.children.map(function(node) {
|
|
10217
|
+
return getOuterHTML(node, options);
|
|
10169
10218
|
}).join("") : "";
|
|
10170
10219
|
}
|
|
10171
10220
|
/**
|
|
@@ -10176,11 +10225,11 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10176
10225
|
* @param node Node to get the inner text of.
|
|
10177
10226
|
* @returns `node`'s inner text.
|
|
10178
10227
|
*/
|
|
10179
|
-
function getText
|
|
10180
|
-
if (Array.isArray(node)) return node.map(getText
|
|
10181
|
-
if ((0, domhandler_1
|
|
10182
|
-
if ((0, domhandler_1
|
|
10183
|
-
if ((0, domhandler_1
|
|
10228
|
+
function getText(node) {
|
|
10229
|
+
if (Array.isArray(node)) return node.map(getText).join("");
|
|
10230
|
+
if ((0, domhandler_1.isTag)(node)) return node.name === "br" ? "\n" : getText(node.children);
|
|
10231
|
+
if ((0, domhandler_1.isCDATA)(node)) return getText(node.children);
|
|
10232
|
+
if ((0, domhandler_1.isText)(node)) return node.data;
|
|
10184
10233
|
return "";
|
|
10185
10234
|
}
|
|
10186
10235
|
/**
|
|
@@ -10193,8 +10242,8 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10193
10242
|
*/
|
|
10194
10243
|
function textContent(node) {
|
|
10195
10244
|
if (Array.isArray(node)) return node.map(textContent).join("");
|
|
10196
|
-
if ((0, domhandler_1
|
|
10197
|
-
if ((0, domhandler_1
|
|
10245
|
+
if ((0, domhandler_1.hasChildren)(node) && !(0, domhandler_1.isComment)(node)) return textContent(node.children);
|
|
10246
|
+
if ((0, domhandler_1.isText)(node)) return node.data;
|
|
10198
10247
|
return "";
|
|
10199
10248
|
}
|
|
10200
10249
|
/**
|
|
@@ -10207,8 +10256,8 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10207
10256
|
*/
|
|
10208
10257
|
function innerText(node) {
|
|
10209
10258
|
if (Array.isArray(node)) return node.map(innerText).join("");
|
|
10210
|
-
if ((0, domhandler_1
|
|
10211
|
-
if ((0, domhandler_1
|
|
10259
|
+
if ((0, domhandler_1.hasChildren)(node) && (node.type === domelementtype_1.ElementType.Tag || (0, domhandler_1.isCDATA)(node))) return innerText(node.children);
|
|
10260
|
+
if ((0, domhandler_1.isText)(node)) return node.data;
|
|
10212
10261
|
return "";
|
|
10213
10262
|
}
|
|
10214
10263
|
}));
|
|
@@ -10217,15 +10266,15 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10217
10266
|
//#region ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/traversal.js
|
|
10218
10267
|
var require_traversal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10219
10268
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10220
|
-
exports.getChildren = getChildren
|
|
10221
|
-
exports.getParent = getParent
|
|
10222
|
-
exports.getSiblings = getSiblings
|
|
10223
|
-
exports.getAttributeValue = getAttributeValue
|
|
10224
|
-
exports.hasAttrib = hasAttrib
|
|
10225
|
-
exports.getName = getName
|
|
10269
|
+
exports.getChildren = getChildren;
|
|
10270
|
+
exports.getParent = getParent;
|
|
10271
|
+
exports.getSiblings = getSiblings;
|
|
10272
|
+
exports.getAttributeValue = getAttributeValue;
|
|
10273
|
+
exports.hasAttrib = hasAttrib;
|
|
10274
|
+
exports.getName = getName;
|
|
10226
10275
|
exports.nextElementSibling = nextElementSibling;
|
|
10227
10276
|
exports.prevElementSibling = prevElementSibling;
|
|
10228
|
-
var domhandler_1
|
|
10277
|
+
var domhandler_1 = require_lib$5();
|
|
10229
10278
|
/**
|
|
10230
10279
|
* Get a node's children.
|
|
10231
10280
|
*
|
|
@@ -10233,8 +10282,8 @@ var require_traversal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10233
10282
|
* @param elem Node to get the children of.
|
|
10234
10283
|
* @returns `elem`'s children, or an empty array.
|
|
10235
10284
|
*/
|
|
10236
|
-
function getChildren
|
|
10237
|
-
return (0, domhandler_1
|
|
10285
|
+
function getChildren(elem) {
|
|
10286
|
+
return (0, domhandler_1.hasChildren)(elem) ? elem.children : [];
|
|
10238
10287
|
}
|
|
10239
10288
|
/**
|
|
10240
10289
|
* Get a node's parent.
|
|
@@ -10243,7 +10292,7 @@ var require_traversal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10243
10292
|
* @param elem Node to get the parent of.
|
|
10244
10293
|
* @returns `elem`'s parent node, or `null` if `elem` is a root node.
|
|
10245
10294
|
*/
|
|
10246
|
-
function getParent
|
|
10295
|
+
function getParent(elem) {
|
|
10247
10296
|
return elem.parent || null;
|
|
10248
10297
|
}
|
|
10249
10298
|
/**
|
|
@@ -10257,15 +10306,15 @@ var require_traversal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10257
10306
|
* @param elem Element to get the siblings of.
|
|
10258
10307
|
* @returns `elem`'s siblings, including `elem`.
|
|
10259
10308
|
*/
|
|
10260
|
-
function getSiblings
|
|
10261
|
-
var _a
|
|
10262
|
-
var parent = getParent
|
|
10263
|
-
if (parent != null) return getChildren
|
|
10309
|
+
function getSiblings(elem) {
|
|
10310
|
+
var _a, _b;
|
|
10311
|
+
var parent = getParent(elem);
|
|
10312
|
+
if (parent != null) return getChildren(parent);
|
|
10264
10313
|
var siblings = [elem];
|
|
10265
10314
|
var prev = elem.prev, next = elem.next;
|
|
10266
10315
|
while (prev != null) {
|
|
10267
10316
|
siblings.unshift(prev);
|
|
10268
|
-
_a
|
|
10317
|
+
_a = prev, prev = _a.prev;
|
|
10269
10318
|
}
|
|
10270
10319
|
while (next != null) {
|
|
10271
10320
|
siblings.push(next);
|
|
@@ -10281,9 +10330,9 @@ var require_traversal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10281
10330
|
* @param name Attribute name to retrieve.
|
|
10282
10331
|
* @returns The element's attribute value, or `undefined`.
|
|
10283
10332
|
*/
|
|
10284
|
-
function getAttributeValue
|
|
10285
|
-
var _a
|
|
10286
|
-
return (_a
|
|
10333
|
+
function getAttributeValue(elem, name) {
|
|
10334
|
+
var _a;
|
|
10335
|
+
return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name];
|
|
10287
10336
|
}
|
|
10288
10337
|
/**
|
|
10289
10338
|
* Checks whether an element has an attribute.
|
|
@@ -10293,7 +10342,7 @@ var require_traversal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10293
10342
|
* @param name Attribute name to look for.
|
|
10294
10343
|
* @returns Returns whether `elem` has the attribute `name`.
|
|
10295
10344
|
*/
|
|
10296
|
-
function hasAttrib
|
|
10345
|
+
function hasAttrib(elem, name) {
|
|
10297
10346
|
return elem.attribs != null && Object.prototype.hasOwnProperty.call(elem.attribs, name) && elem.attribs[name] != null;
|
|
10298
10347
|
}
|
|
10299
10348
|
/**
|
|
@@ -10303,7 +10352,7 @@ var require_traversal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10303
10352
|
* @param elem The element to get the name for.
|
|
10304
10353
|
* @returns The tag name of `elem`.
|
|
10305
10354
|
*/
|
|
10306
|
-
function getName
|
|
10355
|
+
function getName(elem) {
|
|
10307
10356
|
return elem.name;
|
|
10308
10357
|
}
|
|
10309
10358
|
/**
|
|
@@ -10315,9 +10364,9 @@ var require_traversal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10315
10364
|
* sibling.
|
|
10316
10365
|
*/
|
|
10317
10366
|
function nextElementSibling(elem) {
|
|
10318
|
-
var _a
|
|
10367
|
+
var _a;
|
|
10319
10368
|
var next = elem.next;
|
|
10320
|
-
while (next !== null && !(0, domhandler_1
|
|
10369
|
+
while (next !== null && !(0, domhandler_1.isTag)(next)) _a = next, next = _a.next;
|
|
10321
10370
|
return next;
|
|
10322
10371
|
}
|
|
10323
10372
|
/**
|
|
@@ -10329,9 +10378,9 @@ var require_traversal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10329
10378
|
* previous sibling.
|
|
10330
10379
|
*/
|
|
10331
10380
|
function prevElementSibling(elem) {
|
|
10332
|
-
var _a
|
|
10381
|
+
var _a;
|
|
10333
10382
|
var prev = elem.prev;
|
|
10334
|
-
while (prev !== null && !(0, domhandler_1
|
|
10383
|
+
while (prev !== null && !(0, domhandler_1.isTag)(prev)) _a = prev, prev = _a.prev;
|
|
10335
10384
|
return prev;
|
|
10336
10385
|
}
|
|
10337
10386
|
}));
|
|
@@ -10469,10 +10518,10 @@ var require_querying = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10469
10518
|
exports.filter = filter;
|
|
10470
10519
|
exports.find = find;
|
|
10471
10520
|
exports.findOneChild = findOneChild;
|
|
10472
|
-
exports.findOne = findOne
|
|
10473
|
-
exports.existsOne = existsOne
|
|
10474
|
-
exports.findAll = findAll
|
|
10475
|
-
var domhandler_1
|
|
10521
|
+
exports.findOne = findOne;
|
|
10522
|
+
exports.existsOne = existsOne;
|
|
10523
|
+
exports.findAll = findAll;
|
|
10524
|
+
var domhandler_1 = require_lib$5();
|
|
10476
10525
|
/**
|
|
10477
10526
|
* Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one.
|
|
10478
10527
|
*
|
|
@@ -10516,7 +10565,7 @@ var require_querying = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10516
10565
|
result.push(elem);
|
|
10517
10566
|
if (--limit <= 0) return result;
|
|
10518
10567
|
}
|
|
10519
|
-
if (recurse && (0, domhandler_1
|
|
10568
|
+
if (recurse && (0, domhandler_1.hasChildren)(elem) && elem.children.length > 0) {
|
|
10520
10569
|
indexStack.unshift(0);
|
|
10521
10570
|
nodeStack.unshift(elem.children);
|
|
10522
10571
|
}
|
|
@@ -10543,14 +10592,14 @@ var require_querying = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10543
10592
|
* @param recurse Also consider child nodes.
|
|
10544
10593
|
* @returns The first node that passes `test`.
|
|
10545
10594
|
*/
|
|
10546
|
-
function findOne
|
|
10595
|
+
function findOne(test, nodes, recurse) {
|
|
10547
10596
|
if (recurse === void 0) recurse = true;
|
|
10548
10597
|
var searchedNodes = Array.isArray(nodes) ? nodes : [nodes];
|
|
10549
10598
|
for (var i = 0; i < searchedNodes.length; i++) {
|
|
10550
10599
|
var node = searchedNodes[i];
|
|
10551
|
-
if ((0, domhandler_1
|
|
10552
|
-
if (recurse && (0, domhandler_1
|
|
10553
|
-
var found = findOne
|
|
10600
|
+
if ((0, domhandler_1.isTag)(node) && test(node)) return node;
|
|
10601
|
+
if (recurse && (0, domhandler_1.hasChildren)(node) && node.children.length > 0) {
|
|
10602
|
+
var found = findOne(test, node.children, true);
|
|
10554
10603
|
if (found) return found;
|
|
10555
10604
|
}
|
|
10556
10605
|
}
|
|
@@ -10564,9 +10613,9 @@ var require_querying = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10564
10613
|
* @param nodes Array of nodes to search.
|
|
10565
10614
|
* @returns Whether a tree of nodes contains at least one node passing the test.
|
|
10566
10615
|
*/
|
|
10567
|
-
function existsOne
|
|
10616
|
+
function existsOne(test, nodes) {
|
|
10568
10617
|
return (Array.isArray(nodes) ? nodes : [nodes]).some(function(node) {
|
|
10569
|
-
return (0, domhandler_1
|
|
10618
|
+
return (0, domhandler_1.isTag)(node) && test(node) || (0, domhandler_1.hasChildren)(node) && existsOne(test, node.children);
|
|
10570
10619
|
});
|
|
10571
10620
|
}
|
|
10572
10621
|
/**
|
|
@@ -10579,7 +10628,7 @@ var require_querying = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10579
10628
|
* @param nodes Array of nodes to search.
|
|
10580
10629
|
* @returns All nodes passing `test`.
|
|
10581
10630
|
*/
|
|
10582
|
-
function findAll
|
|
10631
|
+
function findAll(test, nodes) {
|
|
10583
10632
|
var result = [];
|
|
10584
10633
|
var nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
|
|
10585
10634
|
var indexStack = [0];
|
|
@@ -10591,8 +10640,8 @@ var require_querying = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10591
10640
|
continue;
|
|
10592
10641
|
}
|
|
10593
10642
|
var elem = nodeStack[0][indexStack[0]++];
|
|
10594
|
-
if ((0, domhandler_1
|
|
10595
|
-
if ((0, domhandler_1
|
|
10643
|
+
if ((0, domhandler_1.isTag)(elem) && test(elem)) result.push(elem);
|
|
10644
|
+
if ((0, domhandler_1.hasChildren)(elem) && elem.children.length > 0) {
|
|
10596
10645
|
indexStack.unshift(0);
|
|
10597
10646
|
nodeStack.unshift(elem.children);
|
|
10598
10647
|
}
|
|
@@ -10610,7 +10659,7 @@ var require_legacy = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10610
10659
|
exports.getElementsByTagName = getElementsByTagName;
|
|
10611
10660
|
exports.getElementsByClassName = getElementsByClassName;
|
|
10612
10661
|
exports.getElementsByTagType = getElementsByTagType;
|
|
10613
|
-
var domhandler_1
|
|
10662
|
+
var domhandler_1 = require_lib$5();
|
|
10614
10663
|
var querying_js_1 = require_querying();
|
|
10615
10664
|
/**
|
|
10616
10665
|
* A map of functions to check nodes against.
|
|
@@ -10618,11 +10667,11 @@ var require_legacy = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10618
10667
|
var Checks = {
|
|
10619
10668
|
tag_name: function(name) {
|
|
10620
10669
|
if (typeof name === "function") return function(elem) {
|
|
10621
|
-
return (0, domhandler_1
|
|
10670
|
+
return (0, domhandler_1.isTag)(elem) && name(elem.name);
|
|
10622
10671
|
};
|
|
10623
|
-
else if (name === "*") return domhandler_1
|
|
10672
|
+
else if (name === "*") return domhandler_1.isTag;
|
|
10624
10673
|
return function(elem) {
|
|
10625
|
-
return (0, domhandler_1
|
|
10674
|
+
return (0, domhandler_1.isTag)(elem) && elem.name === name;
|
|
10626
10675
|
};
|
|
10627
10676
|
},
|
|
10628
10677
|
tag_type: function(type) {
|
|
@@ -10635,10 +10684,10 @@ var require_legacy = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10635
10684
|
},
|
|
10636
10685
|
tag_contains: function(data) {
|
|
10637
10686
|
if (typeof data === "function") return function(elem) {
|
|
10638
|
-
return (0, domhandler_1
|
|
10687
|
+
return (0, domhandler_1.isText)(elem) && data(elem.data);
|
|
10639
10688
|
};
|
|
10640
10689
|
return function(elem) {
|
|
10641
|
-
return (0, domhandler_1
|
|
10690
|
+
return (0, domhandler_1.isText)(elem) && elem.data === data;
|
|
10642
10691
|
};
|
|
10643
10692
|
}
|
|
10644
10693
|
};
|
|
@@ -10653,10 +10702,10 @@ var require_legacy = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10653
10702
|
*/
|
|
10654
10703
|
function getAttribCheck(attrib, value) {
|
|
10655
10704
|
if (typeof value === "function") return function(elem) {
|
|
10656
|
-
return (0, domhandler_1
|
|
10705
|
+
return (0, domhandler_1.isTag)(elem) && value(elem.attribs[attrib]);
|
|
10657
10706
|
};
|
|
10658
10707
|
return function(elem) {
|
|
10659
|
-
return (0, domhandler_1
|
|
10708
|
+
return (0, domhandler_1.isTag)(elem) && elem.attribs[attrib] === value;
|
|
10660
10709
|
};
|
|
10661
10710
|
}
|
|
10662
10711
|
/**
|
|
@@ -10781,10 +10830,10 @@ var require_legacy = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10781
10830
|
var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10782
10831
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10783
10832
|
exports.DocumentPosition = void 0;
|
|
10784
|
-
exports.removeSubsets = removeSubsets
|
|
10833
|
+
exports.removeSubsets = removeSubsets;
|
|
10785
10834
|
exports.compareDocumentPosition = compareDocumentPosition;
|
|
10786
10835
|
exports.uniqueSort = uniqueSort;
|
|
10787
|
-
var domhandler_1
|
|
10836
|
+
var domhandler_1 = require_lib$5();
|
|
10788
10837
|
/**
|
|
10789
10838
|
* Given an array of nodes, remove any member that is contained by another
|
|
10790
10839
|
* member.
|
|
@@ -10793,7 +10842,7 @@ var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10793
10842
|
* @param nodes Nodes to filter.
|
|
10794
10843
|
* @returns Remaining nodes that aren't contained by other nodes.
|
|
10795
10844
|
*/
|
|
10796
|
-
function removeSubsets
|
|
10845
|
+
function removeSubsets(nodes) {
|
|
10797
10846
|
var idx = nodes.length;
|
|
10798
10847
|
while (--idx >= 0) {
|
|
10799
10848
|
var node = nodes[idx];
|
|
@@ -10813,12 +10862,12 @@ var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10813
10862
|
* @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition}
|
|
10814
10863
|
*/
|
|
10815
10864
|
var DocumentPosition;
|
|
10816
|
-
(function(DocumentPosition
|
|
10817
|
-
DocumentPosition
|
|
10818
|
-
DocumentPosition
|
|
10819
|
-
DocumentPosition
|
|
10820
|
-
DocumentPosition
|
|
10821
|
-
DocumentPosition
|
|
10865
|
+
(function(DocumentPosition) {
|
|
10866
|
+
DocumentPosition[DocumentPosition["DISCONNECTED"] = 1] = "DISCONNECTED";
|
|
10867
|
+
DocumentPosition[DocumentPosition["PRECEDING"] = 2] = "PRECEDING";
|
|
10868
|
+
DocumentPosition[DocumentPosition["FOLLOWING"] = 4] = "FOLLOWING";
|
|
10869
|
+
DocumentPosition[DocumentPosition["CONTAINS"] = 8] = "CONTAINS";
|
|
10870
|
+
DocumentPosition[DocumentPosition["CONTAINED_BY"] = 16] = "CONTAINED_BY";
|
|
10822
10871
|
})(DocumentPosition || (exports.DocumentPosition = DocumentPosition = {}));
|
|
10823
10872
|
/**
|
|
10824
10873
|
* Compare the position of one node against another node in any other document,
|
|
@@ -10850,12 +10899,12 @@ var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10850
10899
|
var aParents = [];
|
|
10851
10900
|
var bParents = [];
|
|
10852
10901
|
if (nodeA === nodeB) return 0;
|
|
10853
|
-
var current = (0, domhandler_1
|
|
10902
|
+
var current = (0, domhandler_1.hasChildren)(nodeA) ? nodeA : nodeA.parent;
|
|
10854
10903
|
while (current) {
|
|
10855
10904
|
aParents.unshift(current);
|
|
10856
10905
|
current = current.parent;
|
|
10857
10906
|
}
|
|
10858
|
-
current = (0, domhandler_1
|
|
10907
|
+
current = (0, domhandler_1.hasChildren)(nodeB) ? nodeB : nodeB.parent;
|
|
10859
10908
|
while (current) {
|
|
10860
10909
|
bParents.unshift(current);
|
|
10861
10910
|
current = current.parent;
|
|
@@ -10923,18 +10972,18 @@ var require_feeds = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10923
10972
|
* @returns The parsed feed.
|
|
10924
10973
|
*/
|
|
10925
10974
|
function getAtomFeed(feedRoot) {
|
|
10926
|
-
var _a
|
|
10975
|
+
var _a;
|
|
10927
10976
|
var childs = feedRoot.children;
|
|
10928
10977
|
var feed = {
|
|
10929
10978
|
type: "atom",
|
|
10930
10979
|
items: (0, legacy_js_1.getElementsByTagName)("entry", childs).map(function(item) {
|
|
10931
|
-
var _a
|
|
10980
|
+
var _a;
|
|
10932
10981
|
var children = item.children;
|
|
10933
10982
|
var entry = { media: getMediaElements(children) };
|
|
10934
10983
|
addConditionally(entry, "id", "id", children);
|
|
10935
10984
|
addConditionally(entry, "title", "title", children);
|
|
10936
|
-
var href
|
|
10937
|
-
if (href
|
|
10985
|
+
var href = (_a = getOneElement("link", children)) === null || _a === void 0 ? void 0 : _a.attribs["href"];
|
|
10986
|
+
if (href) entry.link = href;
|
|
10938
10987
|
var description = fetch("summary", children) || fetch("content", children);
|
|
10939
10988
|
if (description) entry.description = description;
|
|
10940
10989
|
var pubDate = fetch("updated", children);
|
|
@@ -10944,7 +10993,7 @@ var require_feeds = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10944
10993
|
};
|
|
10945
10994
|
addConditionally(feed, "id", "id", childs);
|
|
10946
10995
|
addConditionally(feed, "title", "title", childs);
|
|
10947
|
-
var href = (_a
|
|
10996
|
+
var href = (_a = getOneElement("link", childs)) === null || _a === void 0 ? void 0 : _a.attribs["href"];
|
|
10948
10997
|
if (href) feed.link = href;
|
|
10949
10998
|
addConditionally(feed, "description", "subtitle", childs);
|
|
10950
10999
|
var updated = fetch("updated", childs);
|
|
@@ -10959,8 +11008,8 @@ var require_feeds = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10959
11008
|
* @returns The parsed feed.
|
|
10960
11009
|
*/
|
|
10961
11010
|
function getRssFeed(feedRoot) {
|
|
10962
|
-
var _a
|
|
10963
|
-
var childs = (_b = (_a
|
|
11011
|
+
var _a, _b;
|
|
11012
|
+
var childs = (_b = (_a = getOneElement("channel", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];
|
|
10964
11013
|
var feed = {
|
|
10965
11014
|
type: feedRoot.name.substr(0, 3),
|
|
10966
11015
|
id: "",
|
|
@@ -11016,8 +11065,8 @@ var require_feeds = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11016
11065
|
var attrib = MEDIA_KEYS_STRING_1[_i];
|
|
11017
11066
|
if (attribs[attrib]) media[attrib] = attribs[attrib];
|
|
11018
11067
|
}
|
|
11019
|
-
for (var _a
|
|
11020
|
-
var attrib = MEDIA_KEYS_INT_1[_a
|
|
11068
|
+
for (var _a = 0, MEDIA_KEYS_INT_1 = MEDIA_KEYS_INT; _a < MEDIA_KEYS_INT_1.length; _a++) {
|
|
11069
|
+
var attrib = MEDIA_KEYS_INT_1[_a];
|
|
11021
11070
|
if (attribs[attrib]) media[attrib] = parseInt(attribs[attrib], 10);
|
|
11022
11071
|
}
|
|
11023
11072
|
if (attribs["expression"]) media.expression = attribs["expression"];
|
|
@@ -11074,7 +11123,7 @@ var require_feeds = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11074
11123
|
//#endregion
|
|
11075
11124
|
//#region ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/index.js
|
|
11076
11125
|
var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11077
|
-
var __createBinding
|
|
11126
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
11078
11127
|
if (k2 === void 0) k2 = k;
|
|
11079
11128
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11080
11129
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
@@ -11089,7 +11138,7 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11089
11138
|
o[k2] = m[k];
|
|
11090
11139
|
}));
|
|
11091
11140
|
var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
|
|
11092
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding
|
|
11141
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
11093
11142
|
};
|
|
11094
11143
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11095
11144
|
exports.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0;
|
|
@@ -11158,18 +11207,18 @@ var require_boolbase = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11158
11207
|
var SelectorType, IgnoreCaseMode, AttributeAction;
|
|
11159
11208
|
var init_types = __esmMin((() => {
|
|
11160
11209
|
;
|
|
11161
|
-
(function(SelectorType
|
|
11162
|
-
SelectorType
|
|
11163
|
-
SelectorType
|
|
11164
|
-
SelectorType
|
|
11165
|
-
SelectorType
|
|
11166
|
-
SelectorType
|
|
11167
|
-
SelectorType
|
|
11168
|
-
SelectorType
|
|
11169
|
-
SelectorType
|
|
11170
|
-
SelectorType
|
|
11171
|
-
SelectorType
|
|
11172
|
-
SelectorType
|
|
11210
|
+
(function(SelectorType) {
|
|
11211
|
+
SelectorType["Attribute"] = "attribute";
|
|
11212
|
+
SelectorType["Pseudo"] = "pseudo";
|
|
11213
|
+
SelectorType["PseudoElement"] = "pseudo-element";
|
|
11214
|
+
SelectorType["Tag"] = "tag";
|
|
11215
|
+
SelectorType["Universal"] = "universal";
|
|
11216
|
+
SelectorType["Adjacent"] = "adjacent";
|
|
11217
|
+
SelectorType["Child"] = "child";
|
|
11218
|
+
SelectorType["Descendant"] = "descendant";
|
|
11219
|
+
SelectorType["Parent"] = "parent";
|
|
11220
|
+
SelectorType["Sibling"] = "sibling";
|
|
11221
|
+
SelectorType["ColumnCombinator"] = "column-combinator";
|
|
11173
11222
|
})(SelectorType || (SelectorType = {}));
|
|
11174
11223
|
IgnoreCaseMode = {
|
|
11175
11224
|
Unknown: null,
|
|
@@ -11178,15 +11227,15 @@ var init_types = __esmMin((() => {
|
|
|
11178
11227
|
CaseSensitive: false
|
|
11179
11228
|
};
|
|
11180
11229
|
;
|
|
11181
|
-
(function(AttributeAction
|
|
11182
|
-
AttributeAction
|
|
11183
|
-
AttributeAction
|
|
11184
|
-
AttributeAction
|
|
11185
|
-
AttributeAction
|
|
11186
|
-
AttributeAction
|
|
11187
|
-
AttributeAction
|
|
11188
|
-
AttributeAction
|
|
11189
|
-
AttributeAction
|
|
11230
|
+
(function(AttributeAction) {
|
|
11231
|
+
AttributeAction["Any"] = "any";
|
|
11232
|
+
AttributeAction["Element"] = "element";
|
|
11233
|
+
AttributeAction["End"] = "end";
|
|
11234
|
+
AttributeAction["Equals"] = "equals";
|
|
11235
|
+
AttributeAction["Exists"] = "exists";
|
|
11236
|
+
AttributeAction["Hyphen"] = "hyphen";
|
|
11237
|
+
AttributeAction["Not"] = "not";
|
|
11238
|
+
AttributeAction["Start"] = "start";
|
|
11190
11239
|
})(AttributeAction || (AttributeAction = {}));
|
|
11191
11240
|
}));
|
|
11192
11241
|
|
|
@@ -11199,7 +11248,7 @@ var init_types = __esmMin((() => {
|
|
|
11199
11248
|
*
|
|
11200
11249
|
* @param selector Selector to check.
|
|
11201
11250
|
*/
|
|
11202
|
-
function isTraversal
|
|
11251
|
+
function isTraversal(selector) {
|
|
11203
11252
|
switch (selector.type) {
|
|
11204
11253
|
case SelectorType.Adjacent:
|
|
11205
11254
|
case SelectorType.Child:
|
|
@@ -11232,7 +11281,7 @@ function isWhitespace(c) {
|
|
|
11232
11281
|
* The first dimension represents selectors separated by commas (eg. `sub1, sub2`),
|
|
11233
11282
|
* the second contains the relevant tokens for that selector.
|
|
11234
11283
|
*/
|
|
11235
|
-
function parse$
|
|
11284
|
+
function parse$1(selector) {
|
|
11236
11285
|
const subselects = [];
|
|
11237
11286
|
const endIndex = parseSelector(subselects, `${selector}`, 0);
|
|
11238
11287
|
if (endIndex < selector.length) throw new Error(`Unmatched selector: ${selector.slice(endIndex)}`);
|
|
@@ -11240,7 +11289,7 @@ function parse$4(selector) {
|
|
|
11240
11289
|
}
|
|
11241
11290
|
function parseSelector(subselects, selector, selectorIndex) {
|
|
11242
11291
|
let tokens = [];
|
|
11243
|
-
function getName
|
|
11292
|
+
function getName(offset) {
|
|
11244
11293
|
const match = selector.slice(selectorIndex + offset).match(reName);
|
|
11245
11294
|
if (!match) throw new Error(`Expected name, found ${selector.slice(selectorIndex)}`);
|
|
11246
11295
|
const [name] = match;
|
|
@@ -11266,7 +11315,7 @@ function parseSelector(subselects, selector, selectorIndex) {
|
|
|
11266
11315
|
return (slashCount & 1) === 1;
|
|
11267
11316
|
}
|
|
11268
11317
|
function ensureNotTraversal() {
|
|
11269
|
-
if (tokens.length > 0 && isTraversal
|
|
11318
|
+
if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) throw new Error("Did not expect successive traversals.");
|
|
11270
11319
|
}
|
|
11271
11320
|
function addTraversal(type) {
|
|
11272
11321
|
if (tokens.length > 0 && tokens[tokens.length - 1].type === SelectorType.Descendant) {
|
|
@@ -11281,7 +11330,7 @@ function parseSelector(subselects, selector, selectorIndex) {
|
|
|
11281
11330
|
type: SelectorType.Attribute,
|
|
11282
11331
|
name,
|
|
11283
11332
|
action,
|
|
11284
|
-
value: getName
|
|
11333
|
+
value: getName(1),
|
|
11285
11334
|
namespace: null,
|
|
11286
11335
|
ignoreCase: "quirks"
|
|
11287
11336
|
});
|
|
@@ -11340,15 +11389,15 @@ function parseSelector(subselects, selector, selectorIndex) {
|
|
|
11340
11389
|
stripWhitespace(1);
|
|
11341
11390
|
let name;
|
|
11342
11391
|
let namespace = null;
|
|
11343
|
-
if (selector.charCodeAt(selectorIndex) === 124) name = getName
|
|
11392
|
+
if (selector.charCodeAt(selectorIndex) === 124) name = getName(1);
|
|
11344
11393
|
else if (selector.startsWith("*|", selectorIndex)) {
|
|
11345
11394
|
namespace = "*";
|
|
11346
|
-
name = getName
|
|
11395
|
+
name = getName(2);
|
|
11347
11396
|
} else {
|
|
11348
|
-
name = getName
|
|
11397
|
+
name = getName(0);
|
|
11349
11398
|
if (selector.charCodeAt(selectorIndex) === 124 && selector.charCodeAt(selectorIndex + 1) !== 61) {
|
|
11350
11399
|
namespace = name;
|
|
11351
|
-
name = getName
|
|
11400
|
+
name = getName(1);
|
|
11352
11401
|
}
|
|
11353
11402
|
}
|
|
11354
11403
|
stripWhitespace(0);
|
|
@@ -11404,12 +11453,12 @@ function parseSelector(subselects, selector, selectorIndex) {
|
|
|
11404
11453
|
if (selector.charCodeAt(selectorIndex + 1) === 58) {
|
|
11405
11454
|
tokens.push({
|
|
11406
11455
|
type: SelectorType.PseudoElement,
|
|
11407
|
-
name: getName
|
|
11456
|
+
name: getName(2).toLowerCase(),
|
|
11408
11457
|
data: selector.charCodeAt(selectorIndex) === 40 ? readValueWithParenthesis() : null
|
|
11409
11458
|
});
|
|
11410
11459
|
continue;
|
|
11411
11460
|
}
|
|
11412
|
-
const name = getName
|
|
11461
|
+
const name = getName(1).toLowerCase();
|
|
11413
11462
|
let data = null;
|
|
11414
11463
|
if (selector.charCodeAt(selectorIndex) === 40) if (unpackPseudos.has(name)) {
|
|
11415
11464
|
if (isQuote(selector.charCodeAt(selectorIndex + 1))) throw new Error(`Pseudo-selector ${name} cannot be quoted`);
|
|
@@ -11457,14 +11506,14 @@ function parseSelector(subselects, selector, selectorIndex) {
|
|
|
11457
11506
|
stripWhitespace(2);
|
|
11458
11507
|
break;
|
|
11459
11508
|
}
|
|
11460
|
-
} else if (reName.test(selector.slice(selectorIndex))) name = getName
|
|
11509
|
+
} else if (reName.test(selector.slice(selectorIndex))) name = getName(0);
|
|
11461
11510
|
else break loop;
|
|
11462
11511
|
if (selector.charCodeAt(selectorIndex) === 124 && selector.charCodeAt(selectorIndex + 1) !== 124) {
|
|
11463
11512
|
namespace = name;
|
|
11464
11513
|
if (selector.charCodeAt(selectorIndex + 1) === 42) {
|
|
11465
11514
|
name = "*";
|
|
11466
11515
|
selectorIndex += 2;
|
|
11467
|
-
} else name = getName
|
|
11516
|
+
} else name = getName(1);
|
|
11468
11517
|
}
|
|
11469
11518
|
tokens.push(name === "*" ? {
|
|
11470
11519
|
type: SelectorType.Universal,
|
|
@@ -11593,12 +11642,12 @@ var init_stringify = __esmMin((() => {
|
|
|
11593
11642
|
|
|
11594
11643
|
//#endregion
|
|
11595
11644
|
//#region ../../node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/index.js
|
|
11596
|
-
var es_exports = /* @__PURE__ */
|
|
11645
|
+
var es_exports = /* @__PURE__ */ __exportAll({
|
|
11597
11646
|
AttributeAction: () => AttributeAction,
|
|
11598
11647
|
IgnoreCaseMode: () => IgnoreCaseMode,
|
|
11599
11648
|
SelectorType: () => SelectorType,
|
|
11600
|
-
isTraversal: () => isTraversal
|
|
11601
|
-
parse: () => parse$
|
|
11649
|
+
isTraversal: () => isTraversal,
|
|
11650
|
+
parse: () => parse$1,
|
|
11602
11651
|
stringify: () => stringify
|
|
11603
11652
|
});
|
|
11604
11653
|
var init_es = __esmMin((() => {
|
|
@@ -11612,24 +11661,24 @@ var init_es = __esmMin((() => {
|
|
|
11612
11661
|
var require_sort = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11613
11662
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11614
11663
|
exports.isTraversal = void 0;
|
|
11615
|
-
var css_what_1
|
|
11664
|
+
var css_what_1 = (init_es(), __toCommonJS(es_exports));
|
|
11616
11665
|
var procedure = new Map([
|
|
11617
|
-
[css_what_1
|
|
11618
|
-
[css_what_1
|
|
11619
|
-
[css_what_1
|
|
11620
|
-
[css_what_1
|
|
11666
|
+
[css_what_1.SelectorType.Universal, 50],
|
|
11667
|
+
[css_what_1.SelectorType.Tag, 30],
|
|
11668
|
+
[css_what_1.SelectorType.Attribute, 1],
|
|
11669
|
+
[css_what_1.SelectorType.Pseudo, 0]
|
|
11621
11670
|
]);
|
|
11622
11671
|
function isTraversal(token) {
|
|
11623
11672
|
return !procedure.has(token.type);
|
|
11624
11673
|
}
|
|
11625
11674
|
exports.isTraversal = isTraversal;
|
|
11626
11675
|
var attributes = new Map([
|
|
11627
|
-
[css_what_1
|
|
11628
|
-
[css_what_1
|
|
11629
|
-
[css_what_1
|
|
11630
|
-
[css_what_1
|
|
11631
|
-
[css_what_1
|
|
11632
|
-
[css_what_1
|
|
11676
|
+
[css_what_1.AttributeAction.Exists, 10],
|
|
11677
|
+
[css_what_1.AttributeAction.Equals, 8],
|
|
11678
|
+
[css_what_1.AttributeAction.Not, 7],
|
|
11679
|
+
[css_what_1.AttributeAction.Start, 6],
|
|
11680
|
+
[css_what_1.AttributeAction.End, 6],
|
|
11681
|
+
[css_what_1.AttributeAction.Any, 5]
|
|
11633
11682
|
]);
|
|
11634
11683
|
/**
|
|
11635
11684
|
* Sort the parts of the passed selector,
|
|
@@ -11654,13 +11703,13 @@ var require_sort = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11654
11703
|
}
|
|
11655
11704
|
exports.default = sortByProcedure;
|
|
11656
11705
|
function getProcedure(token) {
|
|
11657
|
-
var _a
|
|
11658
|
-
var proc = (_a
|
|
11659
|
-
if (token.type === css_what_1
|
|
11706
|
+
var _a, _b;
|
|
11707
|
+
var proc = (_a = procedure.get(token.type)) !== null && _a !== void 0 ? _a : -1;
|
|
11708
|
+
if (token.type === css_what_1.SelectorType.Attribute) {
|
|
11660
11709
|
proc = (_b = attributes.get(token.action)) !== null && _b !== void 0 ? _b : 4;
|
|
11661
|
-
if (token.action === css_what_1
|
|
11710
|
+
if (token.action === css_what_1.AttributeAction.Equals && token.name === "id") proc = 9;
|
|
11662
11711
|
if (token.ignoreCase) proc >>= 1;
|
|
11663
|
-
} else if (token.type === css_what_1
|
|
11712
|
+
} else if (token.type === css_what_1.SelectorType.Pseudo) if (!token.data) proc = 3;
|
|
11664
11713
|
else if (token.name === "has" || token.name === "contains") proc = 0;
|
|
11665
11714
|
else if (Array.isArray(token.data)) {
|
|
11666
11715
|
proc = Math.min.apply(Math, token.data.map(function(d) {
|
|
@@ -11675,12 +11724,12 @@ var require_sort = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11675
11724
|
//#endregion
|
|
11676
11725
|
//#region ../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/attributes.js
|
|
11677
11726
|
var require_attributes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11678
|
-
var __importDefault
|
|
11727
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
11679
11728
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
11680
11729
|
};
|
|
11681
11730
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11682
11731
|
exports.attributeRules = void 0;
|
|
11683
|
-
var boolbase_1
|
|
11732
|
+
var boolbase_1 = __importDefault(require_boolbase());
|
|
11684
11733
|
/**
|
|
11685
11734
|
* All reserved characters in a regex, used for escaping.
|
|
11686
11735
|
*
|
|
@@ -11787,15 +11836,15 @@ var require_attributes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11787
11836
|
element: function(next, data, options) {
|
|
11788
11837
|
var adapter = options.adapter;
|
|
11789
11838
|
var name = data.name, value = data.value;
|
|
11790
|
-
if (/\s/.test(value)) return boolbase_1
|
|
11839
|
+
if (/\s/.test(value)) return boolbase_1.default.falseFunc;
|
|
11791
11840
|
var regex = new RegExp("(?:^|\\s)".concat(escapeRegex(value), "(?:$|\\s)"), shouldIgnoreCase(data, options) ? "i" : "");
|
|
11792
11841
|
return function element(elem) {
|
|
11793
11842
|
var attr = adapter.getAttributeValue(elem, name);
|
|
11794
11843
|
return attr != null && attr.length >= value.length && regex.test(attr) && next(elem);
|
|
11795
11844
|
};
|
|
11796
11845
|
},
|
|
11797
|
-
exists: function(next, _a
|
|
11798
|
-
var name = _a
|
|
11846
|
+
exists: function(next, _a, _b) {
|
|
11847
|
+
var name = _a.name;
|
|
11799
11848
|
var adapter = _b.adapter;
|
|
11800
11849
|
return function(elem) {
|
|
11801
11850
|
return adapter.hasAttrib(elem, name) && next(elem);
|
|
@@ -11806,7 +11855,7 @@ var require_attributes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11806
11855
|
var name = data.name;
|
|
11807
11856
|
var value = data.value;
|
|
11808
11857
|
var len = value.length;
|
|
11809
|
-
if (len === 0) return boolbase_1
|
|
11858
|
+
if (len === 0) return boolbase_1.default.falseFunc;
|
|
11810
11859
|
if (shouldIgnoreCase(data, options)) {
|
|
11811
11860
|
value = value.toLowerCase();
|
|
11812
11861
|
return function(elem) {
|
|
@@ -11815,8 +11864,8 @@ var require_attributes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11815
11864
|
};
|
|
11816
11865
|
}
|
|
11817
11866
|
return function(elem) {
|
|
11818
|
-
var _a
|
|
11819
|
-
return !!((_a
|
|
11867
|
+
var _a;
|
|
11868
|
+
return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.startsWith(value)) && next(elem);
|
|
11820
11869
|
};
|
|
11821
11870
|
},
|
|
11822
11871
|
end: function(next, data, options) {
|
|
@@ -11824,23 +11873,23 @@ var require_attributes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11824
11873
|
var name = data.name;
|
|
11825
11874
|
var value = data.value;
|
|
11826
11875
|
var len = -value.length;
|
|
11827
|
-
if (len === 0) return boolbase_1
|
|
11876
|
+
if (len === 0) return boolbase_1.default.falseFunc;
|
|
11828
11877
|
if (shouldIgnoreCase(data, options)) {
|
|
11829
11878
|
value = value.toLowerCase();
|
|
11830
11879
|
return function(elem) {
|
|
11831
|
-
var _a
|
|
11832
|
-
return ((_a
|
|
11880
|
+
var _a;
|
|
11881
|
+
return ((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.substr(len).toLowerCase()) === value && next(elem);
|
|
11833
11882
|
};
|
|
11834
11883
|
}
|
|
11835
11884
|
return function(elem) {
|
|
11836
|
-
var _a
|
|
11837
|
-
return !!((_a
|
|
11885
|
+
var _a;
|
|
11886
|
+
return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.endsWith(value)) && next(elem);
|
|
11838
11887
|
};
|
|
11839
11888
|
},
|
|
11840
11889
|
any: function(next, data, options) {
|
|
11841
11890
|
var adapter = options.adapter;
|
|
11842
11891
|
var name = data.name, value = data.value;
|
|
11843
|
-
if (value === "") return boolbase_1
|
|
11892
|
+
if (value === "") return boolbase_1.default.falseFunc;
|
|
11844
11893
|
if (shouldIgnoreCase(data, options)) {
|
|
11845
11894
|
var regex_1 = new RegExp(escapeRegex(value), "i");
|
|
11846
11895
|
return function anyIC(elem) {
|
|
@@ -11849,8 +11898,8 @@ var require_attributes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11849
11898
|
};
|
|
11850
11899
|
}
|
|
11851
11900
|
return function(elem) {
|
|
11852
|
-
var _a
|
|
11853
|
-
return !!((_a
|
|
11901
|
+
var _a;
|
|
11902
|
+
return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.includes(value)) && next(elem);
|
|
11854
11903
|
};
|
|
11855
11904
|
},
|
|
11856
11905
|
not: function(next, data, options) {
|
|
@@ -11895,7 +11944,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11895
11944
|
* @returns An array containing the integer step size and the integer offset of the nth rule.
|
|
11896
11945
|
* @example nthCheck.parse("2n+3"); // returns [2, 3]
|
|
11897
11946
|
*/
|
|
11898
|
-
function parse
|
|
11947
|
+
function parse(formula) {
|
|
11899
11948
|
formula = formula.trim().toLowerCase();
|
|
11900
11949
|
if (formula === "even") return [2, 0];
|
|
11901
11950
|
else if (formula === "odd") return [2, 1];
|
|
@@ -11936,18 +11985,18 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11936
11985
|
while (idx < formula.length && whitespace.has(formula.charCodeAt(idx))) idx++;
|
|
11937
11986
|
}
|
|
11938
11987
|
}
|
|
11939
|
-
exports.parse = parse
|
|
11988
|
+
exports.parse = parse;
|
|
11940
11989
|
}));
|
|
11941
11990
|
|
|
11942
11991
|
//#endregion
|
|
11943
11992
|
//#region ../../node_modules/.pnpm/nth-check@2.1.1/node_modules/nth-check/lib/compile.js
|
|
11944
11993
|
var require_compile$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11945
|
-
var __importDefault
|
|
11994
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
11946
11995
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
11947
11996
|
};
|
|
11948
11997
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11949
11998
|
exports.generate = exports.compile = void 0;
|
|
11950
|
-
var boolbase_1
|
|
11999
|
+
var boolbase_1 = __importDefault(require_boolbase());
|
|
11951
12000
|
/**
|
|
11952
12001
|
* Returns a function that checks if an elements index matches the given rule
|
|
11953
12002
|
* highly optimized to return the fastest solution.
|
|
@@ -11968,17 +12017,17 @@ var require_compile$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11968
12017
|
* check(6); // `true`
|
|
11969
12018
|
* ```
|
|
11970
12019
|
*/
|
|
11971
|
-
function compile
|
|
12020
|
+
function compile(parsed) {
|
|
11972
12021
|
var a = parsed[0];
|
|
11973
12022
|
var b = parsed[1] - 1;
|
|
11974
|
-
if (b < 0 && a <= 0) return boolbase_1
|
|
12023
|
+
if (b < 0 && a <= 0) return boolbase_1.default.falseFunc;
|
|
11975
12024
|
if (a === -1) return function(index) {
|
|
11976
12025
|
return index <= b;
|
|
11977
12026
|
};
|
|
11978
12027
|
if (a === 0) return function(index) {
|
|
11979
12028
|
return index === b;
|
|
11980
12029
|
};
|
|
11981
|
-
if (a === 1) return b < 0 ? boolbase_1
|
|
12030
|
+
if (a === 1) return b < 0 ? boolbase_1.default.trueFunc : function(index) {
|
|
11982
12031
|
return index >= b;
|
|
11983
12032
|
};
|
|
11984
12033
|
var absA = Math.abs(a);
|
|
@@ -11989,7 +12038,7 @@ var require_compile$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11989
12038
|
return index <= b && index % absA === bMod;
|
|
11990
12039
|
};
|
|
11991
12040
|
}
|
|
11992
|
-
exports.compile = compile
|
|
12041
|
+
exports.compile = compile;
|
|
11993
12042
|
/**
|
|
11994
12043
|
* Returns a function that produces a monotonously increasing sequence of indices.
|
|
11995
12044
|
*
|
|
@@ -12059,17 +12108,17 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12059
12108
|
return parse_js_1.parse;
|
|
12060
12109
|
}
|
|
12061
12110
|
});
|
|
12062
|
-
var compile_js_1
|
|
12111
|
+
var compile_js_1 = require_compile$1();
|
|
12063
12112
|
Object.defineProperty(exports, "compile", {
|
|
12064
12113
|
enumerable: true,
|
|
12065
12114
|
get: function() {
|
|
12066
|
-
return compile_js_1
|
|
12115
|
+
return compile_js_1.compile;
|
|
12067
12116
|
}
|
|
12068
12117
|
});
|
|
12069
12118
|
Object.defineProperty(exports, "generate", {
|
|
12070
12119
|
enumerable: true,
|
|
12071
12120
|
get: function() {
|
|
12072
|
-
return compile_js_1
|
|
12121
|
+
return compile_js_1.generate;
|
|
12073
12122
|
}
|
|
12074
12123
|
});
|
|
12075
12124
|
/**
|
|
@@ -12096,7 +12145,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12096
12145
|
* check(6); // `true`
|
|
12097
12146
|
*/
|
|
12098
12147
|
function nthCheck(formula) {
|
|
12099
|
-
return (0, compile_js_1
|
|
12148
|
+
return (0, compile_js_1.compile)((0, parse_js_1.parse)(formula));
|
|
12100
12149
|
}
|
|
12101
12150
|
exports.default = nthCheck;
|
|
12102
12151
|
/**
|
|
@@ -12130,7 +12179,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12130
12179
|
* ```
|
|
12131
12180
|
*/
|
|
12132
12181
|
function sequence(formula) {
|
|
12133
|
-
return (0, compile_js_1
|
|
12182
|
+
return (0, compile_js_1.generate)((0, parse_js_1.parse)(formula));
|
|
12134
12183
|
}
|
|
12135
12184
|
exports.sequence = sequence;
|
|
12136
12185
|
}));
|
|
@@ -12138,13 +12187,13 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12138
12187
|
//#endregion
|
|
12139
12188
|
//#region ../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/pseudo-selectors/filters.js
|
|
12140
12189
|
var require_filters = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12141
|
-
var __importDefault
|
|
12190
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
12142
12191
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
12143
12192
|
};
|
|
12144
12193
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12145
12194
|
exports.filters = void 0;
|
|
12146
|
-
var nth_check_1 = __importDefault
|
|
12147
|
-
var boolbase_1
|
|
12195
|
+
var nth_check_1 = __importDefault(require_lib$1());
|
|
12196
|
+
var boolbase_1 = __importDefault(require_boolbase());
|
|
12148
12197
|
function getChildFunc(next, adapter) {
|
|
12149
12198
|
return function(elem) {
|
|
12150
12199
|
var parent = adapter.getParent(elem);
|
|
@@ -12152,24 +12201,24 @@ var require_filters = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12152
12201
|
};
|
|
12153
12202
|
}
|
|
12154
12203
|
exports.filters = {
|
|
12155
|
-
contains: function(next, text, _a
|
|
12156
|
-
var adapter = _a
|
|
12204
|
+
contains: function(next, text, _a) {
|
|
12205
|
+
var adapter = _a.adapter;
|
|
12157
12206
|
return function contains(elem) {
|
|
12158
12207
|
return next(elem) && adapter.getText(elem).includes(text);
|
|
12159
12208
|
};
|
|
12160
12209
|
},
|
|
12161
|
-
icontains: function(next, text, _a
|
|
12162
|
-
var adapter = _a
|
|
12210
|
+
icontains: function(next, text, _a) {
|
|
12211
|
+
var adapter = _a.adapter;
|
|
12163
12212
|
var itext = text.toLowerCase();
|
|
12164
12213
|
return function icontains(elem) {
|
|
12165
12214
|
return next(elem) && adapter.getText(elem).toLowerCase().includes(itext);
|
|
12166
12215
|
};
|
|
12167
12216
|
},
|
|
12168
|
-
"nth-child": function(next, rule, _a
|
|
12169
|
-
var adapter = _a
|
|
12217
|
+
"nth-child": function(next, rule, _a) {
|
|
12218
|
+
var adapter = _a.adapter, equals = _a.equals;
|
|
12170
12219
|
var func = (0, nth_check_1.default)(rule);
|
|
12171
|
-
if (func === boolbase_1
|
|
12172
|
-
if (func === boolbase_1
|
|
12220
|
+
if (func === boolbase_1.default.falseFunc) return boolbase_1.default.falseFunc;
|
|
12221
|
+
if (func === boolbase_1.default.trueFunc) return getChildFunc(next, adapter);
|
|
12173
12222
|
return function nthChild(elem) {
|
|
12174
12223
|
var siblings = adapter.getSiblings(elem);
|
|
12175
12224
|
var pos = 0;
|
|
@@ -12180,11 +12229,11 @@ var require_filters = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12180
12229
|
return func(pos) && next(elem);
|
|
12181
12230
|
};
|
|
12182
12231
|
},
|
|
12183
|
-
"nth-last-child": function(next, rule, _a
|
|
12184
|
-
var adapter = _a
|
|
12232
|
+
"nth-last-child": function(next, rule, _a) {
|
|
12233
|
+
var adapter = _a.adapter, equals = _a.equals;
|
|
12185
12234
|
var func = (0, nth_check_1.default)(rule);
|
|
12186
|
-
if (func === boolbase_1
|
|
12187
|
-
if (func === boolbase_1
|
|
12235
|
+
if (func === boolbase_1.default.falseFunc) return boolbase_1.default.falseFunc;
|
|
12236
|
+
if (func === boolbase_1.default.trueFunc) return getChildFunc(next, adapter);
|
|
12188
12237
|
return function nthLastChild(elem) {
|
|
12189
12238
|
var siblings = adapter.getSiblings(elem);
|
|
12190
12239
|
var pos = 0;
|
|
@@ -12195,11 +12244,11 @@ var require_filters = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12195
12244
|
return func(pos) && next(elem);
|
|
12196
12245
|
};
|
|
12197
12246
|
},
|
|
12198
|
-
"nth-of-type": function(next, rule, _a
|
|
12199
|
-
var adapter = _a
|
|
12247
|
+
"nth-of-type": function(next, rule, _a) {
|
|
12248
|
+
var adapter = _a.adapter, equals = _a.equals;
|
|
12200
12249
|
var func = (0, nth_check_1.default)(rule);
|
|
12201
|
-
if (func === boolbase_1
|
|
12202
|
-
if (func === boolbase_1
|
|
12250
|
+
if (func === boolbase_1.default.falseFunc) return boolbase_1.default.falseFunc;
|
|
12251
|
+
if (func === boolbase_1.default.trueFunc) return getChildFunc(next, adapter);
|
|
12203
12252
|
return function nthOfType(elem) {
|
|
12204
12253
|
var siblings = adapter.getSiblings(elem);
|
|
12205
12254
|
var pos = 0;
|
|
@@ -12211,11 +12260,11 @@ var require_filters = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12211
12260
|
return func(pos) && next(elem);
|
|
12212
12261
|
};
|
|
12213
12262
|
},
|
|
12214
|
-
"nth-last-of-type": function(next, rule, _a
|
|
12215
|
-
var adapter = _a
|
|
12263
|
+
"nth-last-of-type": function(next, rule, _a) {
|
|
12264
|
+
var adapter = _a.adapter, equals = _a.equals;
|
|
12216
12265
|
var func = (0, nth_check_1.default)(rule);
|
|
12217
|
-
if (func === boolbase_1
|
|
12218
|
-
if (func === boolbase_1
|
|
12266
|
+
if (func === boolbase_1.default.falseFunc) return boolbase_1.default.falseFunc;
|
|
12267
|
+
if (func === boolbase_1.default.trueFunc) return getChildFunc(next, adapter);
|
|
12219
12268
|
return function nthLastOfType(elem) {
|
|
12220
12269
|
var siblings = adapter.getSiblings(elem);
|
|
12221
12270
|
var pos = 0;
|
|
@@ -12227,8 +12276,8 @@ var require_filters = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12227
12276
|
return func(pos) && next(elem);
|
|
12228
12277
|
};
|
|
12229
12278
|
},
|
|
12230
|
-
root: function(next, _rule, _a
|
|
12231
|
-
var adapter = _a
|
|
12279
|
+
root: function(next, _rule, _a) {
|
|
12280
|
+
var adapter = _a.adapter;
|
|
12232
12281
|
return function(elem) {
|
|
12233
12282
|
var parent = adapter.getParent(elem);
|
|
12234
12283
|
return (parent == null || !adapter.isTag(parent)) && next(elem);
|
|
@@ -12255,9 +12304,9 @@ var require_filters = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12255
12304
|
* @returns Pseudo for the `filters` object.
|
|
12256
12305
|
*/
|
|
12257
12306
|
function dynamicStatePseudo(name) {
|
|
12258
|
-
return function dynamicPseudo(next, _rule, _a
|
|
12259
|
-
var func = _a
|
|
12260
|
-
if (typeof func !== "function") return boolbase_1
|
|
12307
|
+
return function dynamicPseudo(next, _rule, _a) {
|
|
12308
|
+
var func = _a.adapter[name];
|
|
12309
|
+
if (typeof func !== "function") return boolbase_1.default.falseFunc;
|
|
12261
12310
|
return function active(elem) {
|
|
12262
12311
|
return func(elem) && next(elem);
|
|
12263
12312
|
};
|
|
@@ -12271,22 +12320,22 @@ var require_pseudos = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12271
12320
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12272
12321
|
exports.verifyPseudoArgs = exports.pseudos = void 0;
|
|
12273
12322
|
exports.pseudos = {
|
|
12274
|
-
empty: function(elem, _a
|
|
12275
|
-
var adapter = _a
|
|
12276
|
-
return !adapter.getChildren(elem).some(function(elem
|
|
12277
|
-
return adapter.isTag(elem
|
|
12323
|
+
empty: function(elem, _a) {
|
|
12324
|
+
var adapter = _a.adapter;
|
|
12325
|
+
return !adapter.getChildren(elem).some(function(elem) {
|
|
12326
|
+
return adapter.isTag(elem) || adapter.getText(elem) !== "";
|
|
12278
12327
|
});
|
|
12279
12328
|
},
|
|
12280
|
-
"first-child": function(elem, _a
|
|
12281
|
-
var adapter = _a
|
|
12329
|
+
"first-child": function(elem, _a) {
|
|
12330
|
+
var adapter = _a.adapter, equals = _a.equals;
|
|
12282
12331
|
if (adapter.prevElementSibling) return adapter.prevElementSibling(elem) == null;
|
|
12283
|
-
var firstChild = adapter.getSiblings(elem).find(function(elem
|
|
12284
|
-
return adapter.isTag(elem
|
|
12332
|
+
var firstChild = adapter.getSiblings(elem).find(function(elem) {
|
|
12333
|
+
return adapter.isTag(elem);
|
|
12285
12334
|
});
|
|
12286
12335
|
return firstChild != null && equals(elem, firstChild);
|
|
12287
12336
|
},
|
|
12288
|
-
"last-child": function(elem, _a
|
|
12289
|
-
var adapter = _a
|
|
12337
|
+
"last-child": function(elem, _a) {
|
|
12338
|
+
var adapter = _a.adapter, equals = _a.equals;
|
|
12290
12339
|
var siblings = adapter.getSiblings(elem);
|
|
12291
12340
|
for (var i = siblings.length - 1; i >= 0; i--) {
|
|
12292
12341
|
if (equals(elem, siblings[i])) return true;
|
|
@@ -12294,8 +12343,8 @@ var require_pseudos = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12294
12343
|
}
|
|
12295
12344
|
return false;
|
|
12296
12345
|
},
|
|
12297
|
-
"first-of-type": function(elem, _a
|
|
12298
|
-
var adapter = _a
|
|
12346
|
+
"first-of-type": function(elem, _a) {
|
|
12347
|
+
var adapter = _a.adapter, equals = _a.equals;
|
|
12299
12348
|
var siblings = adapter.getSiblings(elem);
|
|
12300
12349
|
var elemName = adapter.getName(elem);
|
|
12301
12350
|
for (var i = 0; i < siblings.length; i++) {
|
|
@@ -12305,8 +12354,8 @@ var require_pseudos = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12305
12354
|
}
|
|
12306
12355
|
return false;
|
|
12307
12356
|
},
|
|
12308
|
-
"last-of-type": function(elem, _a
|
|
12309
|
-
var adapter = _a
|
|
12357
|
+
"last-of-type": function(elem, _a) {
|
|
12358
|
+
var adapter = _a.adapter, equals = _a.equals;
|
|
12310
12359
|
var siblings = adapter.getSiblings(elem);
|
|
12311
12360
|
var elemName = adapter.getName(elem);
|
|
12312
12361
|
for (var i = siblings.length - 1; i >= 0; i--) {
|
|
@@ -12316,15 +12365,15 @@ var require_pseudos = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12316
12365
|
}
|
|
12317
12366
|
return false;
|
|
12318
12367
|
},
|
|
12319
|
-
"only-of-type": function(elem, _a
|
|
12320
|
-
var adapter = _a
|
|
12368
|
+
"only-of-type": function(elem, _a) {
|
|
12369
|
+
var adapter = _a.adapter, equals = _a.equals;
|
|
12321
12370
|
var elemName = adapter.getName(elem);
|
|
12322
12371
|
return adapter.getSiblings(elem).every(function(sibling) {
|
|
12323
12372
|
return equals(elem, sibling) || !adapter.isTag(sibling) || adapter.getName(sibling) !== elemName;
|
|
12324
12373
|
});
|
|
12325
12374
|
},
|
|
12326
|
-
"only-child": function(elem, _a
|
|
12327
|
-
var adapter = _a
|
|
12375
|
+
"only-child": function(elem, _a) {
|
|
12376
|
+
var adapter = _a.adapter, equals = _a.equals;
|
|
12328
12377
|
return adapter.getSiblings(elem).every(function(sibling) {
|
|
12329
12378
|
return equals(elem, sibling) || !adapter.isTag(sibling);
|
|
12330
12379
|
});
|
|
@@ -12382,17 +12431,17 @@ var require_subselects = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12382
12431
|
}
|
|
12383
12432
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
12384
12433
|
};
|
|
12385
|
-
var __importDefault
|
|
12434
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
12386
12435
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
12387
12436
|
};
|
|
12388
12437
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12389
12438
|
exports.subselects = exports.getNextSiblings = exports.ensureIsTag = exports.PLACEHOLDER_ELEMENT = void 0;
|
|
12390
|
-
var boolbase_1
|
|
12391
|
-
var sort_js_1
|
|
12439
|
+
var boolbase_1 = __importDefault(require_boolbase());
|
|
12440
|
+
var sort_js_1 = require_sort();
|
|
12392
12441
|
/** Used as a placeholder for :has. Will be replaced with the actual element. */
|
|
12393
12442
|
exports.PLACEHOLDER_ELEMENT = {};
|
|
12394
12443
|
function ensureIsTag(next, adapter) {
|
|
12395
|
-
if (next === boolbase_1
|
|
12444
|
+
if (next === boolbase_1.default.falseFunc) return boolbase_1.default.falseFunc;
|
|
12396
12445
|
return function(elem) {
|
|
12397
12446
|
return adapter.isTag(elem) && next(elem);
|
|
12398
12447
|
};
|
|
@@ -12418,34 +12467,34 @@ var require_subselects = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12418
12467
|
equals: options.equals
|
|
12419
12468
|
};
|
|
12420
12469
|
}
|
|
12421
|
-
var is
|
|
12422
|
-
var func = compileToken
|
|
12423
|
-
return func === boolbase_1
|
|
12470
|
+
var is = function(next, token, options, context, compileToken) {
|
|
12471
|
+
var func = compileToken(token, copyOptions(options), context);
|
|
12472
|
+
return func === boolbase_1.default.trueFunc ? next : func === boolbase_1.default.falseFunc ? boolbase_1.default.falseFunc : function(elem) {
|
|
12424
12473
|
return func(elem) && next(elem);
|
|
12425
12474
|
};
|
|
12426
12475
|
};
|
|
12427
12476
|
exports.subselects = {
|
|
12428
|
-
is
|
|
12429
|
-
matches: is
|
|
12430
|
-
where: is
|
|
12431
|
-
not: function(next, token, options, context, compileToken
|
|
12432
|
-
var func = compileToken
|
|
12433
|
-
return func === boolbase_1
|
|
12477
|
+
is,
|
|
12478
|
+
matches: is,
|
|
12479
|
+
where: is,
|
|
12480
|
+
not: function(next, token, options, context, compileToken) {
|
|
12481
|
+
var func = compileToken(token, copyOptions(options), context);
|
|
12482
|
+
return func === boolbase_1.default.falseFunc ? next : func === boolbase_1.default.trueFunc ? boolbase_1.default.falseFunc : function(elem) {
|
|
12434
12483
|
return !func(elem) && next(elem);
|
|
12435
12484
|
};
|
|
12436
12485
|
},
|
|
12437
|
-
has: function(next, subselect, options, _context, compileToken
|
|
12486
|
+
has: function(next, subselect, options, _context, compileToken) {
|
|
12438
12487
|
var adapter = options.adapter;
|
|
12439
12488
|
var opts = copyOptions(options);
|
|
12440
12489
|
opts.relativeSelector = true;
|
|
12441
12490
|
var context = subselect.some(function(s) {
|
|
12442
|
-
return s.some(sort_js_1
|
|
12491
|
+
return s.some(sort_js_1.isTraversal);
|
|
12443
12492
|
}) ? [exports.PLACEHOLDER_ELEMENT] : void 0;
|
|
12444
|
-
var compiled = compileToken
|
|
12445
|
-
if (compiled === boolbase_1
|
|
12493
|
+
var compiled = compileToken(subselect, opts, context);
|
|
12494
|
+
if (compiled === boolbase_1.default.falseFunc) return boolbase_1.default.falseFunc;
|
|
12446
12495
|
var hasElement = ensureIsTag(compiled, adapter);
|
|
12447
|
-
if (context && compiled !== boolbase_1
|
|
12448
|
-
var _a
|
|
12496
|
+
if (context && compiled !== boolbase_1.default.trueFunc) {
|
|
12497
|
+
var _a = compiled.shouldTestNextSiblings, shouldTestNextSiblings_1 = _a === void 0 ? false : _a;
|
|
12449
12498
|
return function(elem) {
|
|
12450
12499
|
if (!next(elem)) return false;
|
|
12451
12500
|
context[0] = elem;
|
|
@@ -12466,7 +12515,7 @@ var require_subselects = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12466
12515
|
var require_pseudo_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12467
12516
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12468
12517
|
exports.compilePseudoSelector = exports.aliases = exports.pseudos = exports.filters = void 0;
|
|
12469
|
-
var css_what_1
|
|
12518
|
+
var css_what_1 = (init_es(), __toCommonJS(es_exports));
|
|
12470
12519
|
var filters_js_1 = require_filters();
|
|
12471
12520
|
Object.defineProperty(exports, "filters", {
|
|
12472
12521
|
enumerable: true,
|
|
@@ -12488,20 +12537,20 @@ var require_pseudo_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12488
12537
|
return aliases_js_1.aliases;
|
|
12489
12538
|
}
|
|
12490
12539
|
});
|
|
12491
|
-
var subselects_js_1
|
|
12492
|
-
function compilePseudoSelector(next, selector, options, context, compileToken
|
|
12493
|
-
var _a
|
|
12540
|
+
var subselects_js_1 = require_subselects();
|
|
12541
|
+
function compilePseudoSelector(next, selector, options, context, compileToken) {
|
|
12542
|
+
var _a;
|
|
12494
12543
|
var name = selector.name, data = selector.data;
|
|
12495
12544
|
if (Array.isArray(data)) {
|
|
12496
|
-
if (!(name in subselects_js_1
|
|
12497
|
-
return subselects_js_1
|
|
12545
|
+
if (!(name in subselects_js_1.subselects)) throw new Error("Unknown pseudo-class :".concat(name, "(").concat(data, ")"));
|
|
12546
|
+
return subselects_js_1.subselects[name](next, data, options, context, compileToken);
|
|
12498
12547
|
}
|
|
12499
|
-
var userPseudo = (_a
|
|
12548
|
+
var userPseudo = (_a = options.pseudos) === null || _a === void 0 ? void 0 : _a[name];
|
|
12500
12549
|
var stringPseudo = typeof userPseudo === "string" ? userPseudo : aliases_js_1.aliases[name];
|
|
12501
12550
|
if (typeof stringPseudo === "string") {
|
|
12502
12551
|
if (data != null) throw new Error("Pseudo ".concat(name, " doesn't have any arguments"));
|
|
12503
|
-
var alias = (0, css_what_1
|
|
12504
|
-
return subselects_js_1
|
|
12552
|
+
var alias = (0, css_what_1.parse)(stringPseudo);
|
|
12553
|
+
return subselects_js_1.subselects["is"](next, alias, options, context, compileToken);
|
|
12505
12554
|
}
|
|
12506
12555
|
if (typeof userPseudo === "function") {
|
|
12507
12556
|
(0, pseudos_js_1.verifyPseudoArgs)(userPseudo, name, data, 1);
|
|
@@ -12528,31 +12577,31 @@ var require_general = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12528
12577
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12529
12578
|
exports.compileGeneralSelector = void 0;
|
|
12530
12579
|
var attributes_js_1 = require_attributes();
|
|
12531
|
-
var index_js_1
|
|
12532
|
-
var css_what_1
|
|
12580
|
+
var index_js_1 = require_pseudo_selectors();
|
|
12581
|
+
var css_what_1 = (init_es(), __toCommonJS(es_exports));
|
|
12533
12582
|
function getElementParent(node, adapter) {
|
|
12534
12583
|
var parent = adapter.getParent(node);
|
|
12535
12584
|
if (parent && adapter.isTag(parent)) return parent;
|
|
12536
12585
|
return null;
|
|
12537
12586
|
}
|
|
12538
|
-
function compileGeneralSelector(next, selector, options, context, compileToken
|
|
12587
|
+
function compileGeneralSelector(next, selector, options, context, compileToken) {
|
|
12539
12588
|
var adapter = options.adapter, equals = options.equals;
|
|
12540
12589
|
switch (selector.type) {
|
|
12541
|
-
case css_what_1
|
|
12542
|
-
case css_what_1
|
|
12543
|
-
case css_what_1
|
|
12590
|
+
case css_what_1.SelectorType.PseudoElement: throw new Error("Pseudo-elements are not supported by css-select");
|
|
12591
|
+
case css_what_1.SelectorType.ColumnCombinator: throw new Error("Column combinators are not yet supported by css-select");
|
|
12592
|
+
case css_what_1.SelectorType.Attribute:
|
|
12544
12593
|
if (selector.namespace != null) throw new Error("Namespaced attributes are not yet supported by css-select");
|
|
12545
12594
|
if (!options.xmlMode || options.lowerCaseAttributeNames) selector.name = selector.name.toLowerCase();
|
|
12546
12595
|
return attributes_js_1.attributeRules[selector.action](next, selector, options);
|
|
12547
|
-
case css_what_1
|
|
12548
|
-
case css_what_1
|
|
12596
|
+
case css_what_1.SelectorType.Pseudo: return (0, index_js_1.compilePseudoSelector)(next, selector, options, context, compileToken);
|
|
12597
|
+
case css_what_1.SelectorType.Tag:
|
|
12549
12598
|
if (selector.namespace != null) throw new Error("Namespaced tag names are not yet supported by css-select");
|
|
12550
12599
|
var name_1 = selector.name;
|
|
12551
12600
|
if (!options.xmlMode || options.lowerCaseTags) name_1 = name_1.toLowerCase();
|
|
12552
12601
|
return function tag(elem) {
|
|
12553
12602
|
return adapter.getName(elem) === name_1 && next(elem);
|
|
12554
12603
|
};
|
|
12555
|
-
case css_what_1
|
|
12604
|
+
case css_what_1.SelectorType.Descendant:
|
|
12556
12605
|
if (options.cacheResults === false || typeof WeakSet === "undefined") return function descendant(elem) {
|
|
12557
12606
|
var current = elem;
|
|
12558
12607
|
while (current = getElementParent(current, adapter)) if (next(current)) return true;
|
|
@@ -12574,16 +12623,16 @@ var require_general = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12574
12623
|
while (current = getElementParent(current, adapter));
|
|
12575
12624
|
return false;
|
|
12576
12625
|
};
|
|
12577
|
-
case css_what_1
|
|
12578
|
-
return adapter.getChildren(elem).some(function(elem
|
|
12579
|
-
return adapter.isTag(elem
|
|
12626
|
+
case css_what_1.SelectorType.Parent: return function parent(elem) {
|
|
12627
|
+
return adapter.getChildren(elem).some(function(elem) {
|
|
12628
|
+
return adapter.isTag(elem) && next(elem);
|
|
12580
12629
|
});
|
|
12581
12630
|
};
|
|
12582
|
-
case css_what_1
|
|
12631
|
+
case css_what_1.SelectorType.Child: return function child(elem) {
|
|
12583
12632
|
var parent = adapter.getParent(elem);
|
|
12584
12633
|
return parent != null && adapter.isTag(parent) && next(parent);
|
|
12585
12634
|
};
|
|
12586
|
-
case css_what_1
|
|
12635
|
+
case css_what_1.SelectorType.Sibling: return function sibling(elem) {
|
|
12587
12636
|
var siblings = adapter.getSiblings(elem);
|
|
12588
12637
|
for (var i = 0; i < siblings.length; i++) {
|
|
12589
12638
|
var currentSibling = siblings[i];
|
|
@@ -12592,7 +12641,7 @@ var require_general = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12592
12641
|
}
|
|
12593
12642
|
return false;
|
|
12594
12643
|
};
|
|
12595
|
-
case css_what_1
|
|
12644
|
+
case css_what_1.SelectorType.Adjacent:
|
|
12596
12645
|
if (adapter.prevElementSibling) return function adjacent(elem) {
|
|
12597
12646
|
var previous = adapter.prevElementSibling(elem);
|
|
12598
12647
|
return previous != null && next(previous);
|
|
@@ -12607,7 +12656,7 @@ var require_general = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12607
12656
|
}
|
|
12608
12657
|
return !!lastElement && next(lastElement);
|
|
12609
12658
|
};
|
|
12610
|
-
case css_what_1
|
|
12659
|
+
case css_what_1.SelectorType.Universal:
|
|
12611
12660
|
if (selector.namespace != null && selector.namespace !== "*") throw new Error("Namespaced universal selectors are not yet supported by css-select");
|
|
12612
12661
|
return next;
|
|
12613
12662
|
}
|
|
@@ -12618,7 +12667,7 @@ var require_general = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12618
12667
|
//#endregion
|
|
12619
12668
|
//#region ../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/compile.js
|
|
12620
12669
|
var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12621
|
-
var __createBinding
|
|
12670
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
12622
12671
|
if (k2 === void 0) k2 = k;
|
|
12623
12672
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12624
12673
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
@@ -12632,7 +12681,7 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12632
12681
|
if (k2 === void 0) k2 = k;
|
|
12633
12682
|
o[k2] = m[k];
|
|
12634
12683
|
}));
|
|
12635
|
-
var __setModuleDefault
|
|
12684
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
12636
12685
|
Object.defineProperty(o, "default", {
|
|
12637
12686
|
enumerable: true,
|
|
12638
12687
|
value: v
|
|
@@ -12640,25 +12689,25 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12640
12689
|
}) : function(o, v) {
|
|
12641
12690
|
o["default"] = v;
|
|
12642
12691
|
});
|
|
12643
|
-
var __importStar
|
|
12692
|
+
var __importStar = exports && exports.__importStar || function(mod) {
|
|
12644
12693
|
if (mod && mod.__esModule) return mod;
|
|
12645
12694
|
var result = {};
|
|
12646
12695
|
if (mod != null) {
|
|
12647
|
-
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding
|
|
12696
|
+
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
12648
12697
|
}
|
|
12649
|
-
__setModuleDefault
|
|
12698
|
+
__setModuleDefault(result, mod);
|
|
12650
12699
|
return result;
|
|
12651
12700
|
};
|
|
12652
|
-
var __importDefault
|
|
12701
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
12653
12702
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
12654
12703
|
};
|
|
12655
12704
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12656
12705
|
exports.compileToken = exports.compileUnsafe = exports.compile = void 0;
|
|
12657
12706
|
var css_what_1 = (init_es(), __toCommonJS(es_exports));
|
|
12658
|
-
var boolbase_1
|
|
12659
|
-
var sort_js_1 = __importStar
|
|
12707
|
+
var boolbase_1 = __importDefault(require_boolbase());
|
|
12708
|
+
var sort_js_1 = __importStar(require_sort());
|
|
12660
12709
|
var general_js_1 = require_general();
|
|
12661
|
-
var subselects_js_1
|
|
12710
|
+
var subselects_js_1 = require_subselects();
|
|
12662
12711
|
/**
|
|
12663
12712
|
* Compiles a selector to an executable function.
|
|
12664
12713
|
*
|
|
@@ -12668,7 +12717,7 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12668
12717
|
*/
|
|
12669
12718
|
function compile(selector, options, context) {
|
|
12670
12719
|
var next = compileUnsafe(selector, options, context);
|
|
12671
|
-
return (0, subselects_js_1
|
|
12720
|
+
return (0, subselects_js_1.ensureIsTag)(next, options.adapter);
|
|
12672
12721
|
}
|
|
12673
12722
|
exports.compile = compile;
|
|
12674
12723
|
function compileUnsafe(selector, options, context) {
|
|
@@ -12687,11 +12736,11 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12687
12736
|
name: "scope",
|
|
12688
12737
|
data: null
|
|
12689
12738
|
};
|
|
12690
|
-
function absolutize(token, _a
|
|
12691
|
-
var adapter = _a
|
|
12739
|
+
function absolutize(token, _a, context) {
|
|
12740
|
+
var adapter = _a.adapter;
|
|
12692
12741
|
var hasContext = !!(context === null || context === void 0 ? void 0 : context.every(function(e) {
|
|
12693
12742
|
var parent = adapter.isTag(e) && adapter.getParent(e);
|
|
12694
|
-
return e === subselects_js_1
|
|
12743
|
+
return e === subselects_js_1.PLACEHOLDER_ELEMENT || parent && adapter.isTag(parent);
|
|
12695
12744
|
}));
|
|
12696
12745
|
for (var _i = 0, token_1 = token; _i < token_1.length; _i++) {
|
|
12697
12746
|
var t = token_1[_i];
|
|
@@ -12701,9 +12750,9 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12701
12750
|
}
|
|
12702
12751
|
}
|
|
12703
12752
|
function compileToken(token, options, context) {
|
|
12704
|
-
var _a
|
|
12753
|
+
var _a;
|
|
12705
12754
|
token.forEach(sort_js_1.default);
|
|
12706
|
-
context = (_a
|
|
12755
|
+
context = (_a = options.context) !== null && _a !== void 0 ? _a : context;
|
|
12707
12756
|
var isArrayContext = Array.isArray(context);
|
|
12708
12757
|
var finalContext = context && (Array.isArray(context) ? context : [context]);
|
|
12709
12758
|
if (options.relativeSelector !== false) absolutize(token, options, finalContext);
|
|
@@ -12718,20 +12767,20 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12718
12767
|
else if (second.type === css_what_1.SelectorType.Adjacent || second.type === css_what_1.SelectorType.Sibling) shouldTestNextSiblings = true;
|
|
12719
12768
|
}
|
|
12720
12769
|
return compileRules(rules, options, finalContext);
|
|
12721
|
-
}).reduce(reduceRules, boolbase_1
|
|
12770
|
+
}).reduce(reduceRules, boolbase_1.default.falseFunc);
|
|
12722
12771
|
query.shouldTestNextSiblings = shouldTestNextSiblings;
|
|
12723
12772
|
return query;
|
|
12724
12773
|
}
|
|
12725
12774
|
exports.compileToken = compileToken;
|
|
12726
12775
|
function compileRules(rules, options, context) {
|
|
12727
|
-
var _a
|
|
12776
|
+
var _a;
|
|
12728
12777
|
return rules.reduce(function(previous, rule) {
|
|
12729
|
-
return previous === boolbase_1
|
|
12730
|
-
}, (_a
|
|
12778
|
+
return previous === boolbase_1.default.falseFunc ? boolbase_1.default.falseFunc : (0, general_js_1.compileGeneralSelector)(previous, rule, options, context, compileToken);
|
|
12779
|
+
}, (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase_1.default.trueFunc);
|
|
12731
12780
|
}
|
|
12732
12781
|
function reduceRules(a, b) {
|
|
12733
|
-
if (b === boolbase_1
|
|
12734
|
-
if (a === boolbase_1
|
|
12782
|
+
if (b === boolbase_1.default.falseFunc || a === boolbase_1.default.trueFunc) return a;
|
|
12783
|
+
if (a === boolbase_1.default.falseFunc || b === boolbase_1.default.trueFunc) return b;
|
|
12735
12784
|
return function combine(elem) {
|
|
12736
12785
|
return a(elem) || b(elem);
|
|
12737
12786
|
};
|
|
@@ -12772,13 +12821,13 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12772
12821
|
__setModuleDefault(result, mod);
|
|
12773
12822
|
return result;
|
|
12774
12823
|
};
|
|
12775
|
-
var __importDefault
|
|
12824
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
12776
12825
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
12777
12826
|
};
|
|
12778
12827
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12779
12828
|
exports.aliases = exports.pseudos = exports.filters = exports.is = exports.selectOne = exports.selectAll = exports.prepareContext = exports._compileToken = exports._compileUnsafe = exports.compile = void 0;
|
|
12780
12829
|
var DomUtils = __importStar(require_lib$2());
|
|
12781
|
-
var boolbase_1 = __importDefault
|
|
12830
|
+
var boolbase_1 = __importDefault(require_boolbase());
|
|
12782
12831
|
var compile_js_1 = require_compile();
|
|
12783
12832
|
var subselects_js_1 = require_subselects();
|
|
12784
12833
|
var defaultEquals = function(a, b) {
|
|
@@ -12789,9 +12838,9 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12789
12838
|
equals: defaultEquals
|
|
12790
12839
|
};
|
|
12791
12840
|
function convertOptionFormats(options) {
|
|
12792
|
-
var _a
|
|
12841
|
+
var _a, _b, _c, _d;
|
|
12793
12842
|
var opts = options !== null && options !== void 0 ? options : defaultOptions;
|
|
12794
|
-
(_a
|
|
12843
|
+
(_a = opts.adapter) !== null && _a !== void 0 || (opts.adapter = DomUtils);
|
|
12795
12844
|
(_b = opts.equals) !== null && _b !== void 0 || (opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals);
|
|
12796
12845
|
return opts;
|
|
12797
12846
|
}
|
|
@@ -12898,7 +12947,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12898
12947
|
}));
|
|
12899
12948
|
|
|
12900
12949
|
//#endregion
|
|
12901
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
12950
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/back.js
|
|
12902
12951
|
var require_back = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12903
12952
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12904
12953
|
function arr_back(arr) {
|
|
@@ -12908,15 +12957,15 @@ var require_back = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12908
12957
|
}));
|
|
12909
12958
|
|
|
12910
12959
|
//#endregion
|
|
12911
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
12960
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/matcher.js
|
|
12912
12961
|
var require_matcher = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12913
|
-
var __importDefault
|
|
12962
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
12914
12963
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
12915
12964
|
};
|
|
12916
12965
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12917
|
-
const type_1
|
|
12966
|
+
const type_1 = __importDefault(require_type());
|
|
12918
12967
|
function isTag(node) {
|
|
12919
|
-
return node && node.nodeType === type_1
|
|
12968
|
+
return node && node.nodeType === type_1.default.ELEMENT_NODE;
|
|
12920
12969
|
}
|
|
12921
12970
|
function getAttributeValue(elem, name) {
|
|
12922
12971
|
return isTag(elem) ? elem.getAttribute(name) : void 0;
|
|
@@ -13005,7 +13054,7 @@ var require_matcher = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13005
13054
|
}));
|
|
13006
13055
|
|
|
13007
13056
|
//#endregion
|
|
13008
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
13057
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/void-tag.js
|
|
13009
13058
|
var require_void_tag = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13010
13059
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13011
13060
|
var VoidTag = class {
|
|
@@ -13047,20 +13096,20 @@ var require_void_tag = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13047
13096
|
}));
|
|
13048
13097
|
|
|
13049
13098
|
//#endregion
|
|
13050
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
13099
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/nodes/text.js
|
|
13051
13100
|
var require_text = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13052
|
-
var __importDefault
|
|
13101
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
13053
13102
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
13054
13103
|
};
|
|
13055
13104
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13056
|
-
const he_1
|
|
13057
|
-
const node_1
|
|
13058
|
-
const type_1
|
|
13105
|
+
const he_1 = require_he();
|
|
13106
|
+
const node_1 = __importDefault(require_node$1());
|
|
13107
|
+
const type_1 = __importDefault(require_type());
|
|
13059
13108
|
/**
|
|
13060
13109
|
* TextNode to contain a text element in DOM tree.
|
|
13061
13110
|
* @param {string} value [description]
|
|
13062
13111
|
*/
|
|
13063
|
-
var TextNode = class TextNode extends node_1
|
|
13112
|
+
var TextNode = class TextNode extends node_1.default {
|
|
13064
13113
|
clone() {
|
|
13065
13114
|
return new TextNode(this._rawText, null);
|
|
13066
13115
|
}
|
|
@@ -13070,7 +13119,7 @@ var require_text = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13070
13119
|
* Node Type declaration.
|
|
13071
13120
|
* @type {Number}
|
|
13072
13121
|
*/
|
|
13073
|
-
this.nodeType = type_1
|
|
13122
|
+
this.nodeType = type_1.default.TEXT_NODE;
|
|
13074
13123
|
this.rawTagName = "";
|
|
13075
13124
|
this._rawText = rawText;
|
|
13076
13125
|
}
|
|
@@ -13106,7 +13155,7 @@ var require_text = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13106
13155
|
* @return {string} text content
|
|
13107
13156
|
*/
|
|
13108
13157
|
get text() {
|
|
13109
|
-
return (0, he_1
|
|
13158
|
+
return (0, he_1.decode)(this.rawText);
|
|
13110
13159
|
}
|
|
13111
13160
|
/**
|
|
13112
13161
|
* Detect if the node contains only white space.
|
|
@@ -13147,22 +13196,22 @@ var require_text = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13147
13196
|
}));
|
|
13148
13197
|
|
|
13149
13198
|
//#endregion
|
|
13150
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
13199
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/nodes/html.js
|
|
13151
13200
|
var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13152
|
-
var __importDefault
|
|
13201
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
13153
13202
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
13154
13203
|
};
|
|
13155
13204
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13156
13205
|
exports.parse = exports.base_parse = void 0;
|
|
13157
13206
|
const css_select_1 = require_lib();
|
|
13158
|
-
const he_1 = __importDefault
|
|
13159
|
-
const back_1 = __importDefault
|
|
13160
|
-
const matcher_1 = __importDefault
|
|
13161
|
-
const void_tag_1 = __importDefault
|
|
13162
|
-
const comment_1
|
|
13163
|
-
const node_1
|
|
13164
|
-
const text_1
|
|
13165
|
-
const type_1
|
|
13207
|
+
const he_1 = __importDefault(require_he());
|
|
13208
|
+
const back_1 = __importDefault(require_back());
|
|
13209
|
+
const matcher_1 = __importDefault(require_matcher());
|
|
13210
|
+
const void_tag_1 = __importDefault(require_void_tag());
|
|
13211
|
+
const comment_1 = __importDefault(require_comment());
|
|
13212
|
+
const node_1 = __importDefault(require_node$1());
|
|
13213
|
+
const text_1 = __importDefault(require_text());
|
|
13214
|
+
const type_1 = __importDefault(require_type());
|
|
13166
13215
|
function decode(val) {
|
|
13167
13216
|
return JSON.parse(JSON.stringify(he_1.default.decode(val)));
|
|
13168
13217
|
}
|
|
@@ -13276,7 +13325,7 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13276
13325
|
* @class HTMLElement
|
|
13277
13326
|
* @extends {Node}
|
|
13278
13327
|
*/
|
|
13279
|
-
var HTMLElement
|
|
13328
|
+
var HTMLElement = class HTMLElement extends node_1.default {
|
|
13280
13329
|
/**
|
|
13281
13330
|
* Quote attribute values
|
|
13282
13331
|
* @param attr attribute value
|
|
@@ -13300,10 +13349,10 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13300
13349
|
/**
|
|
13301
13350
|
* Node Type declaration.
|
|
13302
13351
|
*/
|
|
13303
|
-
this.nodeType = type_1
|
|
13352
|
+
this.nodeType = type_1.default.ELEMENT_NODE;
|
|
13304
13353
|
this.rawTagName = tagName;
|
|
13305
13354
|
this.rawAttrs = rawAttrs || "";
|
|
13306
|
-
this.
|
|
13355
|
+
this._id = keyAttrs.id || "";
|
|
13307
13356
|
this.childNodes = [];
|
|
13308
13357
|
this._parseOptions = _parseOptions;
|
|
13309
13358
|
this.classList = new DOMTokenList(keyAttrs.class ? keyAttrs.class.split(/\s+/) : [], (classList) => this.setAttribute("class", classList.toString()));
|
|
@@ -13352,6 +13401,12 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13352
13401
|
get isVoidElement() {
|
|
13353
13402
|
return this.voidTag.isVoidElement(this.localName);
|
|
13354
13403
|
}
|
|
13404
|
+
get id() {
|
|
13405
|
+
return this._id;
|
|
13406
|
+
}
|
|
13407
|
+
set id(newid) {
|
|
13408
|
+
this.setAttribute("id", newid);
|
|
13409
|
+
}
|
|
13355
13410
|
/**
|
|
13356
13411
|
* Get escpaed (as-it) text value of current node and its children.
|
|
13357
13412
|
* @return {string} text content
|
|
@@ -13366,7 +13421,7 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13366
13421
|
return decode(this.rawText);
|
|
13367
13422
|
}
|
|
13368
13423
|
set textContent(val) {
|
|
13369
|
-
this.childNodes = [new text_1
|
|
13424
|
+
this.childNodes = [new text_1.default(val, this)];
|
|
13370
13425
|
}
|
|
13371
13426
|
/**
|
|
13372
13427
|
* Get unescaped text value of current node and its children.
|
|
@@ -13383,12 +13438,12 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13383
13438
|
let currentBlock = [];
|
|
13384
13439
|
const blocks = [currentBlock];
|
|
13385
13440
|
function dfs(node) {
|
|
13386
|
-
if (node.nodeType === type_1
|
|
13441
|
+
if (node.nodeType === type_1.default.ELEMENT_NODE) if (kBlockElements.has(node.rawTagName)) {
|
|
13387
13442
|
if (currentBlock.length > 0) blocks.push(currentBlock = []);
|
|
13388
13443
|
node.childNodes.forEach(dfs);
|
|
13389
13444
|
if (currentBlock.length > 0) blocks.push(currentBlock = []);
|
|
13390
13445
|
} else node.childNodes.forEach(dfs);
|
|
13391
|
-
else if (node.nodeType === type_1
|
|
13446
|
+
else if (node.nodeType === type_1.default.TEXT_NODE) if (node.isWhitespace) currentBlock.prependWhitespace = true;
|
|
13392
13447
|
else {
|
|
13393
13448
|
let text = node.trimmedText;
|
|
13394
13449
|
if (currentBlock.prependWhitespace) {
|
|
@@ -13417,18 +13472,18 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13417
13472
|
}).join("");
|
|
13418
13473
|
}
|
|
13419
13474
|
set innerHTML(content) {
|
|
13420
|
-
const r = parse
|
|
13421
|
-
const nodes = r.childNodes.length ? r.childNodes : [new text_1
|
|
13475
|
+
const r = parse(content, this._parseOptions);
|
|
13476
|
+
const nodes = r.childNodes.length ? r.childNodes : [new text_1.default(content, this)];
|
|
13422
13477
|
resetParent(nodes, this);
|
|
13423
13478
|
resetParent(this.childNodes, null);
|
|
13424
13479
|
this.childNodes = nodes;
|
|
13425
13480
|
}
|
|
13426
13481
|
set_content(content, options = {}) {
|
|
13427
|
-
if (content instanceof node_1
|
|
13482
|
+
if (content instanceof node_1.default) content = [content];
|
|
13428
13483
|
else if (typeof content == "string") {
|
|
13429
13484
|
options = Object.assign(Object.assign({}, this._parseOptions), options);
|
|
13430
|
-
const r = parse
|
|
13431
|
-
content = r.childNodes.length ? r.childNodes : [new text_1
|
|
13485
|
+
const r = parse(content, options);
|
|
13486
|
+
content = r.childNodes.length ? r.childNodes : [new text_1.default(r.innerHTML, this)];
|
|
13432
13487
|
}
|
|
13433
13488
|
resetParent(this.childNodes, null);
|
|
13434
13489
|
resetParent(content, this);
|
|
@@ -13438,10 +13493,10 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13438
13493
|
replaceWith(...nodes) {
|
|
13439
13494
|
const parent = this.parentNode;
|
|
13440
13495
|
const content = nodes.map((node) => {
|
|
13441
|
-
if (node instanceof node_1
|
|
13496
|
+
if (node instanceof node_1.default) return [node];
|
|
13442
13497
|
else if (typeof node == "string") {
|
|
13443
|
-
const r = parse
|
|
13444
|
-
return r.childNodes.length ? r.childNodes : [new text_1
|
|
13498
|
+
const r = parse(node, this._parseOptions);
|
|
13499
|
+
return r.childNodes.length ? r.childNodes : [new text_1.default(node, this)];
|
|
13445
13500
|
}
|
|
13446
13501
|
return [];
|
|
13447
13502
|
}).flat();
|
|
@@ -13467,7 +13522,7 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13467
13522
|
trimRight(pattern) {
|
|
13468
13523
|
for (let i = 0; i < this.childNodes.length; i++) {
|
|
13469
13524
|
const childNode = this.childNodes[i];
|
|
13470
|
-
if (childNode.nodeType === type_1
|
|
13525
|
+
if (childNode.nodeType === type_1.default.ELEMENT_NODE) childNode.trimRight(pattern);
|
|
13471
13526
|
else {
|
|
13472
13527
|
const index = childNode.rawText.search(pattern);
|
|
13473
13528
|
if (index > -1) {
|
|
@@ -13489,13 +13544,13 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13489
13544
|
res.push(" ".repeat(indention) + str);
|
|
13490
13545
|
}
|
|
13491
13546
|
function dfs(node) {
|
|
13492
|
-
const idStr = node.
|
|
13547
|
+
const idStr = node._id ? `#${node._id}` : "";
|
|
13493
13548
|
const classStr = node.classList.length ? `.${node.classList.value.join(".")}` : "";
|
|
13494
13549
|
write(`${node.rawTagName}${idStr}${classStr}`);
|
|
13495
13550
|
indention++;
|
|
13496
13551
|
node.childNodes.forEach((childNode) => {
|
|
13497
|
-
if (childNode.nodeType === type_1
|
|
13498
|
-
else if (childNode.nodeType === type_1
|
|
13552
|
+
if (childNode.nodeType === type_1.default.ELEMENT_NODE) dfs(childNode);
|
|
13553
|
+
else if (childNode.nodeType === type_1.default.TEXT_NODE) {
|
|
13499
13554
|
if (!childNode.isWhitespace) write("#text");
|
|
13500
13555
|
}
|
|
13501
13556
|
});
|
|
@@ -13511,10 +13566,10 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13511
13566
|
removeWhitespace() {
|
|
13512
13567
|
let o = 0;
|
|
13513
13568
|
this.childNodes.forEach((node) => {
|
|
13514
|
-
if (node.nodeType === type_1
|
|
13569
|
+
if (node.nodeType === type_1.default.TEXT_NODE) {
|
|
13515
13570
|
if (node.isWhitespace) return;
|
|
13516
13571
|
node.rawText = node.trimmedRawText;
|
|
13517
|
-
} else if (node.nodeType === type_1
|
|
13572
|
+
} else if (node.nodeType === type_1.default.ELEMENT_NODE) node.removeWhitespace();
|
|
13518
13573
|
this.childNodes[o++] = node;
|
|
13519
13574
|
});
|
|
13520
13575
|
this.childNodes.length = o;
|
|
@@ -13554,7 +13609,7 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13554
13609
|
getElementsByTagName(tagName) {
|
|
13555
13610
|
const upperCasedTagName = tagName.toUpperCase();
|
|
13556
13611
|
const re = [];
|
|
13557
|
-
const stack
|
|
13612
|
+
const stack = [];
|
|
13558
13613
|
let currentNodeReference = this;
|
|
13559
13614
|
let index = 0;
|
|
13560
13615
|
while (index !== void 0) {
|
|
@@ -13564,13 +13619,13 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13564
13619
|
while (index < currentNodeReference.childNodes.length && child === void 0);
|
|
13565
13620
|
if (child === void 0) {
|
|
13566
13621
|
currentNodeReference = currentNodeReference.parentNode;
|
|
13567
|
-
index = stack
|
|
13622
|
+
index = stack.pop();
|
|
13568
13623
|
continue;
|
|
13569
13624
|
}
|
|
13570
|
-
if (child.nodeType === type_1
|
|
13625
|
+
if (child.nodeType === type_1.default.ELEMENT_NODE) {
|
|
13571
13626
|
if (tagName === "*" || child.tagName === upperCasedTagName) re.push(child);
|
|
13572
13627
|
if (child.childNodes.length > 0) {
|
|
13573
|
-
stack
|
|
13628
|
+
stack.push(index);
|
|
13574
13629
|
currentNodeReference = child;
|
|
13575
13630
|
index = 0;
|
|
13576
13631
|
}
|
|
@@ -13584,7 +13639,7 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13584
13639
|
* @returns {HTMLElement | null} the element with the given id or null if not found
|
|
13585
13640
|
*/
|
|
13586
13641
|
getElementById(id) {
|
|
13587
|
-
const stack
|
|
13642
|
+
const stack = [];
|
|
13588
13643
|
let currentNodeReference = this;
|
|
13589
13644
|
let index = 0;
|
|
13590
13645
|
while (index !== void 0) {
|
|
@@ -13594,13 +13649,13 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13594
13649
|
while (index < currentNodeReference.childNodes.length && child === void 0);
|
|
13595
13650
|
if (child === void 0) {
|
|
13596
13651
|
currentNodeReference = currentNodeReference.parentNode;
|
|
13597
|
-
index = stack
|
|
13652
|
+
index = stack.pop();
|
|
13598
13653
|
continue;
|
|
13599
13654
|
}
|
|
13600
|
-
if (child.nodeType === type_1
|
|
13601
|
-
if (child.
|
|
13655
|
+
if (child.nodeType === type_1.default.ELEMENT_NODE) {
|
|
13656
|
+
if (child._id === id) return child;
|
|
13602
13657
|
if (child.childNodes.length > 0) {
|
|
13603
|
-
stack
|
|
13658
|
+
stack.push(index);
|
|
13604
13659
|
currentNodeReference = child;
|
|
13605
13660
|
index = 0;
|
|
13606
13661
|
}
|
|
@@ -13617,14 +13672,14 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13617
13672
|
const mapChild = /* @__PURE__ */ new Map();
|
|
13618
13673
|
let el = this;
|
|
13619
13674
|
let old = null;
|
|
13620
|
-
function findOne
|
|
13675
|
+
function findOne(test, elems) {
|
|
13621
13676
|
let elem = null;
|
|
13622
13677
|
for (let i = 0, l = elems.length; i < l && !elem; i++) {
|
|
13623
|
-
const el
|
|
13624
|
-
if (test(el
|
|
13678
|
+
const el = elems[i];
|
|
13679
|
+
if (test(el)) elem = el;
|
|
13625
13680
|
else {
|
|
13626
|
-
const child = mapChild.get(el
|
|
13627
|
-
if (child) elem = findOne
|
|
13681
|
+
const child = mapChild.get(el);
|
|
13682
|
+
if (child) elem = findOne(test, [child]);
|
|
13628
13683
|
}
|
|
13629
13684
|
}
|
|
13630
13685
|
return elem;
|
|
@@ -13646,7 +13701,7 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13646
13701
|
getSiblings(node) {
|
|
13647
13702
|
return [node];
|
|
13648
13703
|
},
|
|
13649
|
-
findOne
|
|
13704
|
+
findOne,
|
|
13650
13705
|
findAll() {
|
|
13651
13706
|
return [];
|
|
13652
13707
|
}
|
|
@@ -13716,7 +13771,7 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13716
13771
|
if (val === "null" || val === "\"\"") return name;
|
|
13717
13772
|
return `${name}=${val}`;
|
|
13718
13773
|
}).join(" ");
|
|
13719
|
-
if (key === "id") this.
|
|
13774
|
+
if (key === "id") this._id = "";
|
|
13720
13775
|
return this;
|
|
13721
13776
|
}
|
|
13722
13777
|
hasAttribute(key) {
|
|
@@ -13749,26 +13804,27 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13749
13804
|
if (val === "null" || val === "\"\"") return name;
|
|
13750
13805
|
return `${name}=${val}`;
|
|
13751
13806
|
}).join(" ");
|
|
13752
|
-
if (key === "id") this.
|
|
13807
|
+
if (key === "id") this._id = value;
|
|
13753
13808
|
return this;
|
|
13754
13809
|
}
|
|
13755
13810
|
/**
|
|
13756
13811
|
* Replace all the attributes of the HTMLElement by the provided attributes
|
|
13757
13812
|
* @param {Attributes} attributes the new attribute set
|
|
13758
13813
|
*/
|
|
13759
|
-
setAttributes(attributes
|
|
13814
|
+
setAttributes(attributes) {
|
|
13760
13815
|
if (this._attrs) delete this._attrs;
|
|
13761
13816
|
if (this._rawAttrs) delete this._rawAttrs;
|
|
13762
|
-
this.rawAttrs = Object.keys(attributes
|
|
13763
|
-
const val = attributes
|
|
13817
|
+
this.rawAttrs = Object.keys(attributes).map((name) => {
|
|
13818
|
+
const val = attributes[name];
|
|
13764
13819
|
if (val === "null" || val === "\"\"") return name;
|
|
13765
13820
|
return `${name}=${this.quoteAttribute(String(val))}`;
|
|
13766
13821
|
}).join(" ");
|
|
13822
|
+
if ("id" in attributes) this._id = attributes["id"];
|
|
13767
13823
|
return this;
|
|
13768
13824
|
}
|
|
13769
|
-
insertAdjacentHTML(where, html
|
|
13825
|
+
insertAdjacentHTML(where, html) {
|
|
13770
13826
|
if (arguments.length < 2) throw new Error("2 arguments required");
|
|
13771
|
-
const p = parse
|
|
13827
|
+
const p = parse(html, this._parseOptions);
|
|
13772
13828
|
if (where === "afterend") this.after(...p.childNodes);
|
|
13773
13829
|
else if (where === "afterbegin") this.prepend(...p.childNodes);
|
|
13774
13830
|
else if (where === "beforeend") this.append(...p.childNodes);
|
|
@@ -13817,12 +13873,12 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13817
13873
|
if (this.parentNode) {
|
|
13818
13874
|
const children = this.parentNode.childNodes;
|
|
13819
13875
|
let i = 0;
|
|
13820
|
-
let find
|
|
13876
|
+
let find = false;
|
|
13821
13877
|
while (i < children.length) {
|
|
13822
13878
|
const child = children[i++];
|
|
13823
|
-
if (find
|
|
13824
|
-
if (child instanceof HTMLElement
|
|
13825
|
-
} else if (this === child) find
|
|
13879
|
+
if (find) {
|
|
13880
|
+
if (child instanceof HTMLElement) return child || null;
|
|
13881
|
+
} else if (this === child) find = true;
|
|
13826
13882
|
}
|
|
13827
13883
|
return null;
|
|
13828
13884
|
}
|
|
@@ -13842,12 +13898,12 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13842
13898
|
if (this.parentNode) {
|
|
13843
13899
|
const children = this.parentNode.childNodes;
|
|
13844
13900
|
let i = children.length;
|
|
13845
|
-
let find
|
|
13901
|
+
let find = false;
|
|
13846
13902
|
while (i > 0) {
|
|
13847
13903
|
const child = children[--i];
|
|
13848
|
-
if (find
|
|
13849
|
-
if (child instanceof HTMLElement
|
|
13850
|
-
} else if (this === child) find
|
|
13904
|
+
if (find) {
|
|
13905
|
+
if (child instanceof HTMLElement) return child || null;
|
|
13906
|
+
} else if (this === child) find = true;
|
|
13851
13907
|
}
|
|
13852
13908
|
return null;
|
|
13853
13909
|
}
|
|
@@ -13855,7 +13911,7 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13855
13911
|
/** Get all childNodes of type {@link HTMLElement}. */
|
|
13856
13912
|
get children() {
|
|
13857
13913
|
const children = [];
|
|
13858
|
-
for (const childNode of this.childNodes) if (childNode instanceof HTMLElement
|
|
13914
|
+
for (const childNode of this.childNodes) if (childNode instanceof HTMLElement) children.push(childNode);
|
|
13859
13915
|
return children;
|
|
13860
13916
|
}
|
|
13861
13917
|
/**
|
|
@@ -13894,10 +13950,10 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13894
13950
|
}
|
|
13895
13951
|
/** Clone this Node */
|
|
13896
13952
|
clone() {
|
|
13897
|
-
return parse
|
|
13953
|
+
return parse(this.toString(), this._parseOptions).firstChild;
|
|
13898
13954
|
}
|
|
13899
13955
|
};
|
|
13900
|
-
exports.default = HTMLElement
|
|
13956
|
+
exports.default = HTMLElement;
|
|
13901
13957
|
const kMarkupPattern = /<!--[\s\S]*?-->|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z@\xB7\xC0-\xD6\xD8-\xF6\u00F8-\u03A1\u03A3-\u03D9\u03DB-\u03EF\u03F7-\u03FF\u0400-\u04FF\u0500-\u052F\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E00-\u1E9B\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA78E\uA790-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64-\uAB65\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\x37F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/gu;
|
|
13902
13958
|
const kAttributePattern = /(?:^|\s)(id|class)\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+)/gi;
|
|
13903
13959
|
const kElementsClosedByOpening = {
|
|
@@ -14072,6 +14128,15 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14072
14128
|
TABLE: true
|
|
14073
14129
|
}
|
|
14074
14130
|
};
|
|
14131
|
+
const kElementsClosedByClosingExcept = { p: {
|
|
14132
|
+
a: true,
|
|
14133
|
+
audio: true,
|
|
14134
|
+
del: true,
|
|
14135
|
+
ins: true,
|
|
14136
|
+
map: true,
|
|
14137
|
+
noscript: true,
|
|
14138
|
+
video: true
|
|
14139
|
+
} };
|
|
14075
14140
|
const frameflag = "documentfragmentcontainer";
|
|
14076
14141
|
/**
|
|
14077
14142
|
* Parses HTML and returns a root element
|
|
@@ -14080,8 +14145,8 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14080
14145
|
* @return {HTMLElement} root element
|
|
14081
14146
|
*/
|
|
14082
14147
|
function base_parse(data, options = {}) {
|
|
14083
|
-
var _a
|
|
14084
|
-
const voidTag = new void_tag_1.default((_a
|
|
14148
|
+
var _a, _b;
|
|
14149
|
+
const voidTag = new void_tag_1.default((_a = options === null || options === void 0 ? void 0 : options.voidTag) === null || _a === void 0 ? void 0 : _a.closingSlash, (_b = options === null || options === void 0 ? void 0 : options.voidTag) === null || _b === void 0 ? void 0 : _b.tags);
|
|
14085
14150
|
const elements = options.blockTextElements || {
|
|
14086
14151
|
script: true,
|
|
14087
14152
|
noscript: true,
|
|
@@ -14098,9 +14163,9 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14098
14163
|
return kBlockTextElements.some((it) => it.test(tag));
|
|
14099
14164
|
}
|
|
14100
14165
|
const createRange = (startPos, endPos) => [startPos - frameFlagOffset, endPos - frameFlagOffset];
|
|
14101
|
-
const root = new HTMLElement
|
|
14166
|
+
const root = new HTMLElement(null, {}, "", null, [0, data.length], voidTag, options);
|
|
14102
14167
|
let currentParent = root;
|
|
14103
|
-
const stack
|
|
14168
|
+
const stack = [root];
|
|
14104
14169
|
let lastTextPos = -1;
|
|
14105
14170
|
let noNestedTagIndex = void 0;
|
|
14106
14171
|
let match;
|
|
@@ -14109,14 +14174,14 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14109
14174
|
const dataEndPos = data.length - 27;
|
|
14110
14175
|
const frameFlagOffset = 27;
|
|
14111
14176
|
while (match = kMarkupPattern.exec(data)) {
|
|
14112
|
-
let { 0: matchText, 1: leadingSlash, 2: tagName, 3: attributes
|
|
14177
|
+
let { 0: matchText, 1: leadingSlash, 2: tagName, 3: attributes, 4: closingSlash } = match;
|
|
14113
14178
|
const matchLength = matchText.length;
|
|
14114
14179
|
const tagStartPos = kMarkupPattern.lastIndex - matchLength;
|
|
14115
14180
|
const tagEndPos = kMarkupPattern.lastIndex;
|
|
14116
14181
|
if (lastTextPos > -1) {
|
|
14117
14182
|
if (lastTextPos + matchLength < tagEndPos) {
|
|
14118
14183
|
const text = data.substring(lastTextPos, tagStartPos);
|
|
14119
|
-
currentParent.appendChild(new text_1
|
|
14184
|
+
currentParent.appendChild(new text_1.default(text, currentParent, createRange(lastTextPos, tagStartPos)));
|
|
14120
14185
|
}
|
|
14121
14186
|
}
|
|
14122
14187
|
lastTextPos = kMarkupPattern.lastIndex;
|
|
@@ -14124,14 +14189,14 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14124
14189
|
if (matchText[1] === "!") {
|
|
14125
14190
|
if (options.comment) {
|
|
14126
14191
|
const text = data.substring(tagStartPos + 4, tagEndPos - 3);
|
|
14127
|
-
currentParent.appendChild(new comment_1
|
|
14192
|
+
currentParent.appendChild(new comment_1.default(text, currentParent, createRange(tagStartPos, tagEndPos)));
|
|
14128
14193
|
}
|
|
14129
14194
|
continue;
|
|
14130
14195
|
}
|
|
14131
14196
|
if (lowerCaseTagName) tagName = tagName.toLowerCase();
|
|
14132
14197
|
if (!leadingSlash) {
|
|
14133
14198
|
const attrs = {};
|
|
14134
|
-
for (let attMatch; attMatch = kAttributePattern.exec(attributes
|
|
14199
|
+
for (let attMatch; attMatch = kAttributePattern.exec(attributes);) {
|
|
14135
14200
|
const { 1: key, 2: val } = attMatch;
|
|
14136
14201
|
const isQuoted = val[0] === `'` || val[0] === `"`;
|
|
14137
14202
|
attrs[key.toLowerCase()] = isQuoted ? val.slice(1, val.length - 1) : val;
|
|
@@ -14139,28 +14204,28 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14139
14204
|
const parentTagName = currentParent.rawTagName;
|
|
14140
14205
|
if (!closingSlash && kElementsClosedByOpening[parentTagName]) {
|
|
14141
14206
|
if (kElementsClosedByOpening[parentTagName][tagName]) {
|
|
14142
|
-
stack
|
|
14143
|
-
currentParent = (0, back_1.default)(stack
|
|
14207
|
+
stack.pop();
|
|
14208
|
+
currentParent = (0, back_1.default)(stack);
|
|
14144
14209
|
}
|
|
14145
14210
|
}
|
|
14146
14211
|
if (fixNestedATags && (tagName === "a" || tagName === "A")) {
|
|
14147
14212
|
if (noNestedTagIndex !== void 0) {
|
|
14148
|
-
stack
|
|
14149
|
-
currentParent = (0, back_1.default)(stack
|
|
14213
|
+
stack.splice(noNestedTagIndex);
|
|
14214
|
+
currentParent = (0, back_1.default)(stack);
|
|
14150
14215
|
}
|
|
14151
|
-
noNestedTagIndex = stack
|
|
14216
|
+
noNestedTagIndex = stack.length;
|
|
14152
14217
|
}
|
|
14153
|
-
const tagEndPos
|
|
14154
|
-
const tagStartPos
|
|
14155
|
-
currentParent = currentParent.appendChild(new HTMLElement
|
|
14156
|
-
stack
|
|
14218
|
+
const tagEndPos = kMarkupPattern.lastIndex;
|
|
14219
|
+
const tagStartPos = tagEndPos - matchLength;
|
|
14220
|
+
currentParent = currentParent.appendChild(new HTMLElement(tagName, attrs, attributes.slice(1), null, createRange(tagStartPos, tagEndPos), voidTag, options));
|
|
14221
|
+
stack.push(currentParent);
|
|
14157
14222
|
if (is_block_text_element(tagName)) {
|
|
14158
14223
|
const closeMarkup = `</${tagName}>`;
|
|
14159
14224
|
const closeIndex = lowerCaseTagName ? data.toLocaleLowerCase().indexOf(closeMarkup, kMarkupPattern.lastIndex) : data.indexOf(closeMarkup, kMarkupPattern.lastIndex);
|
|
14160
14225
|
const textEndPos = closeIndex === -1 ? dataEndPos : closeIndex;
|
|
14161
14226
|
if (element_should_be_ignore(tagName)) {
|
|
14162
|
-
const text = data.substring(tagEndPos
|
|
14163
|
-
if (text.length > 0 && /\S/.test(text)) currentParent.appendChild(new text_1
|
|
14227
|
+
const text = data.substring(tagEndPos, textEndPos);
|
|
14228
|
+
if (text.length > 0 && /\S/.test(text)) currentParent.appendChild(new text_1.default(text, currentParent, createRange(tagEndPos, textEndPos)));
|
|
14164
14229
|
}
|
|
14165
14230
|
if (closeIndex === -1) lastTextPos = kMarkupPattern.lastIndex = data.length + 1;
|
|
14166
14231
|
else {
|
|
@@ -14173,35 +14238,48 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14173
14238
|
if (noNestedTagIndex != null && (tagName === "a" || tagName === "A")) noNestedTagIndex = void 0;
|
|
14174
14239
|
if (currentParent.rawTagName === tagName) {
|
|
14175
14240
|
currentParent.range[1] = createRange(-1, Math.max(lastTextPos, tagEndPos))[1];
|
|
14176
|
-
stack
|
|
14177
|
-
currentParent = (0, back_1.default)(stack
|
|
14241
|
+
stack.pop();
|
|
14242
|
+
currentParent = (0, back_1.default)(stack);
|
|
14178
14243
|
break;
|
|
14179
14244
|
} else {
|
|
14180
14245
|
const parentTagName = currentParent.tagName;
|
|
14181
14246
|
if (kElementsClosedByClosing[parentTagName]) {
|
|
14182
14247
|
if (kElementsClosedByClosing[parentTagName][tagName]) {
|
|
14183
|
-
stack
|
|
14184
|
-
currentParent = (0, back_1.default)(stack
|
|
14248
|
+
stack.pop();
|
|
14249
|
+
currentParent = (0, back_1.default)(stack);
|
|
14185
14250
|
continue;
|
|
14186
14251
|
}
|
|
14187
14252
|
}
|
|
14253
|
+
const openTag = currentParent.rawTagName ? currentParent.rawTagName.toLowerCase() : "";
|
|
14254
|
+
if (kElementsClosedByClosingExcept[openTag]) {
|
|
14255
|
+
const closingTag = tagName.toLowerCase();
|
|
14256
|
+
if (stack.length > 1) {
|
|
14257
|
+
const possibleContainer = stack[stack.length - 2];
|
|
14258
|
+
if (possibleContainer && possibleContainer.rawTagName && possibleContainer.rawTagName.toLowerCase() === closingTag && !kElementsClosedByClosingExcept[openTag][closingTag]) {
|
|
14259
|
+
currentParent.range[1] = createRange(-1, Math.max(lastTextPos, tagEndPos))[1];
|
|
14260
|
+
stack.pop();
|
|
14261
|
+
currentParent = (0, back_1.default)(stack);
|
|
14262
|
+
continue;
|
|
14263
|
+
}
|
|
14264
|
+
}
|
|
14265
|
+
}
|
|
14188
14266
|
break;
|
|
14189
14267
|
}
|
|
14190
14268
|
}
|
|
14191
14269
|
}
|
|
14192
|
-
return stack
|
|
14270
|
+
return stack;
|
|
14193
14271
|
}
|
|
14194
14272
|
exports.base_parse = base_parse;
|
|
14195
14273
|
/**
|
|
14196
14274
|
* Parses HTML and returns a root element
|
|
14197
14275
|
* Parse a chuck of HTML source.
|
|
14198
14276
|
*/
|
|
14199
|
-
function parse
|
|
14200
|
-
const stack
|
|
14201
|
-
const [root] = stack
|
|
14202
|
-
while (stack
|
|
14203
|
-
const last = stack
|
|
14204
|
-
const oneBefore = (0, back_1.default)(stack
|
|
14277
|
+
function parse(data, options = {}) {
|
|
14278
|
+
const stack = base_parse(data, options);
|
|
14279
|
+
const [root] = stack;
|
|
14280
|
+
while (stack.length > 1) {
|
|
14281
|
+
const last = stack.pop();
|
|
14282
|
+
const oneBefore = (0, back_1.default)(stack);
|
|
14205
14283
|
if (last.parentNode && last.parentNode.parentNode) {
|
|
14206
14284
|
if (last.parentNode === oneBefore && last.tagName === oneBefore.tagName) {
|
|
14207
14285
|
if (options.parseNoneClosedTags !== true) {
|
|
@@ -14209,7 +14287,7 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14209
14287
|
last.childNodes.forEach((child) => {
|
|
14210
14288
|
oneBefore.parentNode.appendChild(child);
|
|
14211
14289
|
});
|
|
14212
|
-
stack
|
|
14290
|
+
stack.pop();
|
|
14213
14291
|
}
|
|
14214
14292
|
} else if (options.parseNoneClosedTags !== true) {
|
|
14215
14293
|
oneBefore.removeChild(last);
|
|
@@ -14221,14 +14299,14 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14221
14299
|
}
|
|
14222
14300
|
return root;
|
|
14223
14301
|
}
|
|
14224
|
-
exports.parse = parse
|
|
14302
|
+
exports.parse = parse;
|
|
14225
14303
|
/**
|
|
14226
14304
|
* Resolves a list of {@link NodeInsertable} to a list of nodes,
|
|
14227
14305
|
* and removes nodes from any potential parent.
|
|
14228
14306
|
*/
|
|
14229
14307
|
function resolveInsertable(insertable) {
|
|
14230
14308
|
return insertable.map((val) => {
|
|
14231
|
-
if (typeof val === "string") return new text_1
|
|
14309
|
+
if (typeof val === "string") return new text_1.default(val);
|
|
14232
14310
|
val.remove();
|
|
14233
14311
|
return val;
|
|
14234
14312
|
});
|
|
@@ -14242,37 +14320,37 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14242
14320
|
}));
|
|
14243
14321
|
|
|
14244
14322
|
//#endregion
|
|
14245
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
14323
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/parse.js
|
|
14246
14324
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14247
14325
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14248
14326
|
exports.default = void 0;
|
|
14249
|
-
var html_1
|
|
14327
|
+
var html_1 = require_html();
|
|
14250
14328
|
Object.defineProperty(exports, "default", {
|
|
14251
14329
|
enumerable: true,
|
|
14252
14330
|
get: function() {
|
|
14253
|
-
return html_1
|
|
14331
|
+
return html_1.parse;
|
|
14254
14332
|
}
|
|
14255
14333
|
});
|
|
14256
14334
|
}));
|
|
14257
14335
|
|
|
14258
14336
|
//#endregion
|
|
14259
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
14337
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/valid.js
|
|
14260
14338
|
var require_valid = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14261
14339
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14262
|
-
const html_1
|
|
14340
|
+
const html_1 = require_html();
|
|
14263
14341
|
/**
|
|
14264
14342
|
* Parses HTML and returns a root element
|
|
14265
14343
|
* Parse a chuck of HTML source.
|
|
14266
14344
|
*/
|
|
14267
14345
|
function valid(data, options = {}) {
|
|
14268
|
-
const stack
|
|
14269
|
-
return Boolean(stack
|
|
14346
|
+
const stack = (0, html_1.base_parse)(data, options);
|
|
14347
|
+
return Boolean(stack.length === 1);
|
|
14270
14348
|
}
|
|
14271
14349
|
exports.default = valid;
|
|
14272
14350
|
}));
|
|
14273
14351
|
|
|
14274
14352
|
//#endregion
|
|
14275
|
-
//#region ../../node_modules/.pnpm/node-html-parser@7.0.
|
|
14353
|
+
//#region ../../node_modules/.pnpm/node-html-parser@7.0.2/node_modules/node-html-parser/dist/index.js
|
|
14276
14354
|
var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14277
14355
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
14278
14356
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -14292,17 +14370,17 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14292
14370
|
const parse_1 = __importDefault(require_parse());
|
|
14293
14371
|
const valid_1 = __importDefault(require_valid());
|
|
14294
14372
|
exports.valid = valid_1.default;
|
|
14295
|
-
function parse
|
|
14373
|
+
function parse(data, options = {}) {
|
|
14296
14374
|
return (0, parse_1.default)(data, options);
|
|
14297
14375
|
}
|
|
14298
|
-
exports.parse = parse
|
|
14299
|
-
parse
|
|
14300
|
-
parse
|
|
14301
|
-
parse
|
|
14302
|
-
parse
|
|
14303
|
-
parse
|
|
14304
|
-
parse
|
|
14305
|
-
parse
|
|
14376
|
+
exports.parse = parse;
|
|
14377
|
+
parse.parse = parse_1.default;
|
|
14378
|
+
parse.HTMLElement = html_1.default;
|
|
14379
|
+
parse.CommentNode = comment_1.default;
|
|
14380
|
+
parse.valid = valid_1.default;
|
|
14381
|
+
parse.Node = node_1.default;
|
|
14382
|
+
parse.TextNode = text_1.default;
|
|
14383
|
+
parse.NodeType = type_1.default;
|
|
14306
14384
|
}));
|
|
14307
14385
|
|
|
14308
14386
|
//#endregion
|
|
@@ -14326,6 +14404,12 @@ const applyItemMetadataMixin = (Base) => class ItemWithMetadata extends Base {
|
|
|
14326
14404
|
updatedAt = /* @__PURE__ */ new Date();
|
|
14327
14405
|
};
|
|
14328
14406
|
|
|
14407
|
+
//#endregion
|
|
14408
|
+
//#region src/util/array/takeOne.ts
|
|
14409
|
+
const takeOne = (values, index = 0) => {
|
|
14410
|
+
return values[index];
|
|
14411
|
+
};
|
|
14412
|
+
|
|
14329
14413
|
//#endregion
|
|
14330
14414
|
//#region src/util/environment/getIsServer.ts
|
|
14331
14415
|
const getIsServer = () => typeof window === "undefined";
|
|
@@ -14354,8 +14438,8 @@ const jsonDateParse = (text) => JSON.parse(text, (_key, value) => {
|
|
|
14354
14438
|
else {
|
|
14355
14439
|
a = reMsAjax.exec(value);
|
|
14356
14440
|
if (a) {
|
|
14357
|
-
const b = a
|
|
14358
|
-
parsedValue =
|
|
14441
|
+
const b = takeOne(a, 1).split(/[-+,.]/);
|
|
14442
|
+
parsedValue = new Date(b[0] ? Number(b[0]) : 0 - Number(b[1]));
|
|
14359
14443
|
}
|
|
14360
14444
|
}
|
|
14361
14445
|
}
|
|
@@ -14434,4 +14518,4 @@ const UUIDV4_REGEX = /^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-
|
|
|
14434
14518
|
const uuidValidateV4 = (uuid) => UUIDV4_REGEX.test(uuid);
|
|
14435
14519
|
|
|
14436
14520
|
//#endregion
|
|
14437
|
-
export { ID_SEPARATOR, InvalidOperationError, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, MENTION_ID_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, NIL, NotFoundError, NotInitializedError, Operation, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, UUIDV4_REGEX, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getIsServer, getMentions, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4 };
|
|
14521
|
+
export { AllSpecialValues, ID_SEPARATOR, InvalidOperationError, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, MENTION_ID_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, NIL, NotFoundError, NotInitializedError, Operation, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, UUIDV4_REGEX, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getIsServer, getMentions, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, takeOne, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4 };
|