substack-feed-api 1.0.14 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/substackFeedApi.js +1134 -1098
- package/dist/substackFeedApi.umd.cjs +9 -9
- package/index.d.ts +20 -1
- package/package.json +1 -1
package/dist/substackFeedApi.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
function
|
|
2
|
-
if (
|
|
3
|
-
var a =
|
|
1
|
+
function hr(n) {
|
|
2
|
+
if (n.__esModule) return n;
|
|
3
|
+
var a = n.default;
|
|
4
4
|
if (typeof a == "function") {
|
|
5
|
-
var
|
|
6
|
-
return this instanceof
|
|
5
|
+
var g = function h() {
|
|
6
|
+
return this instanceof h ? Reflect.construct(a, arguments, this.constructor) : a.apply(this, arguments);
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
} else
|
|
10
|
-
return Object.defineProperty(
|
|
11
|
-
var
|
|
12
|
-
Object.defineProperty(
|
|
8
|
+
g.prototype = a.prototype;
|
|
9
|
+
} else g = {};
|
|
10
|
+
return Object.defineProperty(g, "__esModule", { value: !0 }), Object.keys(n).forEach(function(h) {
|
|
11
|
+
var p = Object.getOwnPropertyDescriptor(n, h);
|
|
12
|
+
Object.defineProperty(g, h, p.get ? p : {
|
|
13
13
|
enumerable: !0,
|
|
14
14
|
get: function() {
|
|
15
|
-
return
|
|
15
|
+
return n[h];
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
}),
|
|
18
|
+
}), g;
|
|
19
19
|
}
|
|
20
|
-
var
|
|
20
|
+
var W = {}, et = {}, fe;
|
|
21
21
|
function Wt() {
|
|
22
|
-
return
|
|
23
|
-
|
|
22
|
+
return fe || (fe = 1, (function() {
|
|
23
|
+
et.defaults = {
|
|
24
24
|
"0.1": {
|
|
25
25
|
explicitCharkey: !1,
|
|
26
26
|
trim: !0,
|
|
@@ -89,32 +89,32 @@ function Wt() {
|
|
|
89
89
|
cdata: !1
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
|
-
}).call(
|
|
92
|
+
}).call(et)), et;
|
|
93
93
|
}
|
|
94
|
-
var
|
|
94
|
+
var rt = {}, Y = {}, K = {}, he;
|
|
95
95
|
function H() {
|
|
96
|
-
return
|
|
97
|
-
var
|
|
98
|
-
|
|
99
|
-
var b, m, y, d,
|
|
100
|
-
if (O = arguments[0],
|
|
96
|
+
return he || (he = 1, (function() {
|
|
97
|
+
var n, a, g, h, p, t, e, o = [].slice, l = {}.hasOwnProperty;
|
|
98
|
+
n = function() {
|
|
99
|
+
var b, m, y, d, w, O;
|
|
100
|
+
if (O = arguments[0], w = 2 <= arguments.length ? o.call(arguments, 1) : [], p(Object.assign))
|
|
101
101
|
Object.assign.apply(null, arguments);
|
|
102
102
|
else
|
|
103
|
-
for (b = 0, y =
|
|
104
|
-
if (d =
|
|
103
|
+
for (b = 0, y = w.length; b < y; b++)
|
|
104
|
+
if (d = w[b], d != null)
|
|
105
105
|
for (m in d)
|
|
106
106
|
l.call(d, m) && (O[m] = d[m]);
|
|
107
107
|
return O;
|
|
108
|
-
},
|
|
108
|
+
}, p = function(b) {
|
|
109
109
|
return !!b && Object.prototype.toString.call(b) === "[object Function]";
|
|
110
110
|
}, t = function(b) {
|
|
111
111
|
var m;
|
|
112
112
|
return !!b && ((m = typeof b) == "function" || m === "object");
|
|
113
|
-
},
|
|
114
|
-
return
|
|
115
|
-
},
|
|
113
|
+
}, g = function(b) {
|
|
114
|
+
return p(Array.isArray) ? Array.isArray(b) : Object.prototype.toString.call(b) === "[object Array]";
|
|
115
|
+
}, h = function(b) {
|
|
116
116
|
var m;
|
|
117
|
-
if (
|
|
117
|
+
if (g(b))
|
|
118
118
|
return !b.length;
|
|
119
119
|
for (m in b)
|
|
120
120
|
if (l.call(b, m))
|
|
@@ -124,67 +124,67 @@ function H() {
|
|
|
124
124
|
var m, y;
|
|
125
125
|
return t(b) && (y = Object.getPrototypeOf(b)) && (m = y.constructor) && typeof m == "function" && m instanceof m && Function.prototype.toString.call(m) === Function.prototype.toString.call(Object);
|
|
126
126
|
}, a = function(b) {
|
|
127
|
-
return
|
|
128
|
-
}, K.assign =
|
|
127
|
+
return p(b.valueOf) ? b.valueOf() : b;
|
|
128
|
+
}, K.assign = n, K.isFunction = p, K.isObject = t, K.isArray = g, K.isEmpty = h, K.isPlainObject = e, K.getValue = a;
|
|
129
129
|
}).call(K)), K;
|
|
130
130
|
}
|
|
131
|
-
var
|
|
131
|
+
var st = { exports: {} }, pr = st.exports, pe;
|
|
132
132
|
function Je() {
|
|
133
133
|
return pe || (pe = 1, (function() {
|
|
134
|
-
|
|
135
|
-
function
|
|
134
|
+
st.exports = function() {
|
|
135
|
+
function n() {
|
|
136
136
|
}
|
|
137
|
-
return
|
|
137
|
+
return n.prototype.hasFeature = function(a, g) {
|
|
138
138
|
return !0;
|
|
139
|
-
},
|
|
139
|
+
}, n.prototype.createDocumentType = function(a, g, h) {
|
|
140
140
|
throw new Error("This DOM method is not implemented.");
|
|
141
|
-
},
|
|
141
|
+
}, n.prototype.createDocument = function(a, g, h) {
|
|
142
142
|
throw new Error("This DOM method is not implemented.");
|
|
143
|
-
},
|
|
143
|
+
}, n.prototype.createHTMLDocument = function(a) {
|
|
144
144
|
throw new Error("This DOM method is not implemented.");
|
|
145
|
-
},
|
|
145
|
+
}, n.prototype.getFeature = function(a, g) {
|
|
146
146
|
throw new Error("This DOM method is not implemented.");
|
|
147
|
-
},
|
|
147
|
+
}, n;
|
|
148
148
|
}();
|
|
149
|
-
}).call(
|
|
149
|
+
}).call(pr)), st.exports;
|
|
150
150
|
}
|
|
151
|
-
var
|
|
152
|
-
function
|
|
153
|
-
return
|
|
154
|
-
|
|
155
|
-
function
|
|
151
|
+
var ut = { exports: {} }, at = { exports: {} }, ct = { exports: {} }, dr = ct.exports, de;
|
|
152
|
+
function yr() {
|
|
153
|
+
return de || (de = 1, (function() {
|
|
154
|
+
ct.exports = function() {
|
|
155
|
+
function n() {
|
|
156
156
|
}
|
|
157
|
-
return
|
|
157
|
+
return n.prototype.handleError = function(a) {
|
|
158
158
|
throw new Error(a);
|
|
159
|
-
},
|
|
159
|
+
}, n;
|
|
160
160
|
}();
|
|
161
|
-
}).call(
|
|
161
|
+
}).call(dr)), ct.exports;
|
|
162
162
|
}
|
|
163
|
-
var
|
|
164
|
-
function
|
|
165
|
-
return
|
|
166
|
-
|
|
167
|
-
function
|
|
163
|
+
var lt = { exports: {} }, mr = lt.exports, ye;
|
|
164
|
+
function gr() {
|
|
165
|
+
return ye || (ye = 1, (function() {
|
|
166
|
+
lt.exports = function() {
|
|
167
|
+
function n(a) {
|
|
168
168
|
this.arr = a || [];
|
|
169
169
|
}
|
|
170
|
-
return Object.defineProperty(
|
|
170
|
+
return Object.defineProperty(n.prototype, "length", {
|
|
171
171
|
get: function() {
|
|
172
172
|
return this.arr.length;
|
|
173
173
|
}
|
|
174
|
-
}),
|
|
174
|
+
}), n.prototype.item = function(a) {
|
|
175
175
|
return this.arr[a] || null;
|
|
176
|
-
},
|
|
176
|
+
}, n.prototype.contains = function(a) {
|
|
177
177
|
return this.arr.indexOf(a) !== -1;
|
|
178
|
-
},
|
|
178
|
+
}, n;
|
|
179
179
|
}();
|
|
180
|
-
}).call(
|
|
180
|
+
}).call(mr)), lt.exports;
|
|
181
181
|
}
|
|
182
|
-
var
|
|
183
|
-
function
|
|
184
|
-
return
|
|
185
|
-
var
|
|
186
|
-
|
|
187
|
-
function
|
|
182
|
+
var wr = at.exports, me;
|
|
183
|
+
function Tr() {
|
|
184
|
+
return me || (me = 1, (function() {
|
|
185
|
+
var n, a;
|
|
186
|
+
n = yr(), a = gr(), at.exports = function() {
|
|
187
|
+
function g() {
|
|
188
188
|
this.defaultParams = {
|
|
189
189
|
"canonical-form": !1,
|
|
190
190
|
"cdata-sections": !1,
|
|
@@ -192,7 +192,7 @@ function gr() {
|
|
|
192
192
|
"datatype-normalization": !1,
|
|
193
193
|
"element-content-whitespace": !0,
|
|
194
194
|
entities: !0,
|
|
195
|
-
"error-handler": new
|
|
195
|
+
"error-handler": new n(),
|
|
196
196
|
infoset: !0,
|
|
197
197
|
"validate-if-schema": !1,
|
|
198
198
|
namespaces: !0,
|
|
@@ -205,23 +205,23 @@ function gr() {
|
|
|
205
205
|
"well-formed": !0
|
|
206
206
|
}, this.params = Object.create(this.defaultParams);
|
|
207
207
|
}
|
|
208
|
-
return Object.defineProperty(
|
|
208
|
+
return Object.defineProperty(g.prototype, "parameterNames", {
|
|
209
209
|
get: function() {
|
|
210
210
|
return new a(Object.keys(this.defaultParams));
|
|
211
211
|
}
|
|
212
|
-
}),
|
|
213
|
-
return this.params.hasOwnProperty(
|
|
214
|
-
},
|
|
212
|
+
}), g.prototype.getParameter = function(h) {
|
|
213
|
+
return this.params.hasOwnProperty(h) ? this.params[h] : null;
|
|
214
|
+
}, g.prototype.canSetParameter = function(h, p) {
|
|
215
215
|
return !0;
|
|
216
|
-
},
|
|
217
|
-
return
|
|
218
|
-
},
|
|
216
|
+
}, g.prototype.setParameter = function(h, p) {
|
|
217
|
+
return p != null ? this.params[h] = p : delete this.params[h];
|
|
218
|
+
}, g;
|
|
219
219
|
}();
|
|
220
|
-
}).call(
|
|
220
|
+
}).call(wr)), at.exports;
|
|
221
221
|
}
|
|
222
|
-
var
|
|
222
|
+
var ft = { exports: {} }, ht = { exports: {} }, pt = { exports: {} }, Dr = pt.exports, ge;
|
|
223
223
|
function B() {
|
|
224
|
-
return
|
|
224
|
+
return ge || (ge = 1, (function() {
|
|
225
225
|
pt.exports = {
|
|
226
226
|
Element: 1,
|
|
227
227
|
Attribute: 2,
|
|
@@ -241,17 +241,17 @@ function B() {
|
|
|
241
241
|
ElementDeclaration: 204,
|
|
242
242
|
Dummy: 205
|
|
243
243
|
};
|
|
244
|
-
}).call(
|
|
244
|
+
}).call(Dr)), pt.exports;
|
|
245
245
|
}
|
|
246
|
-
var
|
|
246
|
+
var dt = { exports: {} }, Er = dt.exports, we;
|
|
247
247
|
function tr() {
|
|
248
|
-
return
|
|
249
|
-
var
|
|
250
|
-
|
|
251
|
-
function a(
|
|
252
|
-
if (this.parent =
|
|
253
|
-
throw new Error("Missing attribute name. " + this.debugInfo(
|
|
254
|
-
this.name = this.stringify.name(
|
|
248
|
+
return we || (we = 1, (function() {
|
|
249
|
+
var n;
|
|
250
|
+
n = B(), G(), dt.exports = function() {
|
|
251
|
+
function a(g, h, p) {
|
|
252
|
+
if (this.parent = g, this.parent && (this.options = this.parent.options, this.stringify = this.parent.stringify), h == null)
|
|
253
|
+
throw new Error("Missing attribute name. " + this.debugInfo(h));
|
|
254
|
+
this.name = this.stringify.name(h), this.value = this.stringify.attValue(p), this.type = n.Attribute, this.isId = !1, this.schemaTypeInfo = null;
|
|
255
255
|
}
|
|
256
256
|
return Object.defineProperty(a.prototype, "nodeType", {
|
|
257
257
|
get: function() {
|
|
@@ -265,8 +265,8 @@ function tr() {
|
|
|
265
265
|
get: function() {
|
|
266
266
|
return this.value;
|
|
267
267
|
},
|
|
268
|
-
set: function(
|
|
269
|
-
return this.value =
|
|
268
|
+
set: function(g) {
|
|
269
|
+
return this.value = g || "";
|
|
270
270
|
}
|
|
271
271
|
}), Object.defineProperty(a.prototype, "namespaceURI", {
|
|
272
272
|
get: function() {
|
|
@@ -286,69 +286,69 @@ function tr() {
|
|
|
286
286
|
}
|
|
287
287
|
}), a.prototype.clone = function() {
|
|
288
288
|
return Object.create(this);
|
|
289
|
-
}, a.prototype.toString = function(
|
|
290
|
-
return this.options.writer.attribute(this, this.options.writer.filterOptions(
|
|
291
|
-
}, a.prototype.debugInfo = function(
|
|
292
|
-
return
|
|
293
|
-
}, a.prototype.isEqualNode = function(
|
|
294
|
-
return !(
|
|
289
|
+
}, a.prototype.toString = function(g) {
|
|
290
|
+
return this.options.writer.attribute(this, this.options.writer.filterOptions(g));
|
|
291
|
+
}, a.prototype.debugInfo = function(g) {
|
|
292
|
+
return g = g || this.name, g == null ? "parent: <" + this.parent.name + ">" : "attribute: {" + g + "}, parent: <" + this.parent.name + ">";
|
|
293
|
+
}, a.prototype.isEqualNode = function(g) {
|
|
294
|
+
return !(g.namespaceURI !== this.namespaceURI || g.prefix !== this.prefix || g.localName !== this.localName || g.value !== this.value);
|
|
295
295
|
}, a;
|
|
296
296
|
}();
|
|
297
|
-
}).call(
|
|
297
|
+
}).call(Er)), dt.exports;
|
|
298
298
|
}
|
|
299
|
-
var
|
|
300
|
-
function
|
|
301
|
-
return
|
|
302
|
-
|
|
303
|
-
function
|
|
299
|
+
var yt = { exports: {} }, br = yt.exports, Te;
|
|
300
|
+
function Yt() {
|
|
301
|
+
return Te || (Te = 1, (function() {
|
|
302
|
+
yt.exports = function() {
|
|
303
|
+
function n(a) {
|
|
304
304
|
this.nodes = a;
|
|
305
305
|
}
|
|
306
|
-
return Object.defineProperty(
|
|
306
|
+
return Object.defineProperty(n.prototype, "length", {
|
|
307
307
|
get: function() {
|
|
308
308
|
return Object.keys(this.nodes).length || 0;
|
|
309
309
|
}
|
|
310
|
-
}),
|
|
310
|
+
}), n.prototype.clone = function() {
|
|
311
311
|
return this.nodes = null;
|
|
312
|
-
},
|
|
312
|
+
}, n.prototype.getNamedItem = function(a) {
|
|
313
313
|
return this.nodes[a];
|
|
314
|
-
},
|
|
315
|
-
var
|
|
316
|
-
return
|
|
317
|
-
},
|
|
318
|
-
var
|
|
319
|
-
return
|
|
320
|
-
},
|
|
314
|
+
}, n.prototype.setNamedItem = function(a) {
|
|
315
|
+
var g;
|
|
316
|
+
return g = this.nodes[a.nodeName], this.nodes[a.nodeName] = a, g || null;
|
|
317
|
+
}, n.prototype.removeNamedItem = function(a) {
|
|
318
|
+
var g;
|
|
319
|
+
return g = this.nodes[a], delete this.nodes[a], g || null;
|
|
320
|
+
}, n.prototype.item = function(a) {
|
|
321
321
|
return this.nodes[Object.keys(this.nodes)[a]] || null;
|
|
322
|
-
},
|
|
322
|
+
}, n.prototype.getNamedItemNS = function(a, g) {
|
|
323
323
|
throw new Error("This DOM method is not implemented.");
|
|
324
|
-
},
|
|
324
|
+
}, n.prototype.setNamedItemNS = function(a) {
|
|
325
325
|
throw new Error("This DOM method is not implemented.");
|
|
326
|
-
},
|
|
326
|
+
}, n.prototype.removeNamedItemNS = function(a, g) {
|
|
327
327
|
throw new Error("This DOM method is not implemented.");
|
|
328
|
-
},
|
|
328
|
+
}, n;
|
|
329
329
|
}();
|
|
330
|
-
}).call(
|
|
330
|
+
}).call(br)), yt.exports;
|
|
331
331
|
}
|
|
332
|
-
var
|
|
333
|
-
function
|
|
334
|
-
return
|
|
335
|
-
var
|
|
332
|
+
var Or = ht.exports, De;
|
|
333
|
+
function Kt() {
|
|
334
|
+
return De || (De = 1, (function() {
|
|
335
|
+
var n, a, g, h, p, t, e, o, l = function(m, y) {
|
|
336
336
|
for (var d in y)
|
|
337
337
|
b.call(y, d) && (m[d] = y[d]);
|
|
338
|
-
function
|
|
338
|
+
function w() {
|
|
339
339
|
this.constructor = m;
|
|
340
340
|
}
|
|
341
|
-
return
|
|
341
|
+
return w.prototype = y.prototype, m.prototype = new w(), m.__super__ = y.prototype, m;
|
|
342
342
|
}, b = {}.hasOwnProperty;
|
|
343
|
-
o = H(), e = o.isObject, t = o.isFunction,
|
|
343
|
+
o = H(), e = o.isObject, t = o.isFunction, p = o.getValue, h = G(), n = B(), a = tr(), g = Yt(), ht.exports = function(m) {
|
|
344
344
|
l(y, m);
|
|
345
|
-
function y(d,
|
|
346
|
-
var I, x,
|
|
347
|
-
if (y.__super__.constructor.call(this, d),
|
|
345
|
+
function y(d, w, O) {
|
|
346
|
+
var I, x, M, E;
|
|
347
|
+
if (y.__super__.constructor.call(this, d), w == null)
|
|
348
348
|
throw new Error("Missing element name. " + this.debugInfo());
|
|
349
|
-
if (this.name = this.stringify.name(
|
|
350
|
-
for (E = d.children, x = 0,
|
|
351
|
-
if (I = E[x], I.type ===
|
|
349
|
+
if (this.name = this.stringify.name(w), this.type = n.Element, this.attribs = {}, this.schemaTypeInfo = null, O != null && this.attribute(O), d.type === n.Document && (this.isRoot = !0, this.documentObject = d, d.rootObject = this, d.children)) {
|
|
350
|
+
for (E = d.children, x = 0, M = E.length; x < M; x++)
|
|
351
|
+
if (I = E[x], I.type === n.DocType) {
|
|
352
352
|
I.name = this.name;
|
|
353
353
|
break;
|
|
354
354
|
}
|
|
@@ -384,44 +384,44 @@ function Yt() {
|
|
|
384
384
|
}
|
|
385
385
|
}), Object.defineProperty(y.prototype, "attributes", {
|
|
386
386
|
get: function() {
|
|
387
|
-
return (!this.attributeMap || !this.attributeMap.nodes) && (this.attributeMap = new
|
|
387
|
+
return (!this.attributeMap || !this.attributeMap.nodes) && (this.attributeMap = new g(this.attribs)), this.attributeMap;
|
|
388
388
|
}
|
|
389
389
|
}), y.prototype.clone = function() {
|
|
390
|
-
var d,
|
|
390
|
+
var d, w, O, I;
|
|
391
391
|
O = Object.create(this), O.isRoot && (O.documentObject = null), O.attribs = {}, I = this.attribs;
|
|
392
|
-
for (
|
|
393
|
-
b.call(I,
|
|
392
|
+
for (w in I)
|
|
393
|
+
b.call(I, w) && (d = I[w], O.attribs[w] = d.clone());
|
|
394
394
|
return O.children = [], this.children.forEach(function(x) {
|
|
395
|
-
var
|
|
396
|
-
return
|
|
395
|
+
var M;
|
|
396
|
+
return M = x.clone(), M.parent = O, O.children.push(M);
|
|
397
397
|
}), O;
|
|
398
|
-
}, y.prototype.attribute = function(d,
|
|
398
|
+
}, y.prototype.attribute = function(d, w) {
|
|
399
399
|
var O, I;
|
|
400
|
-
if (d != null && (d =
|
|
400
|
+
if (d != null && (d = p(d)), e(d))
|
|
401
401
|
for (O in d)
|
|
402
402
|
b.call(d, O) && (I = d[O], this.attribute(O, I));
|
|
403
403
|
else
|
|
404
|
-
t(
|
|
404
|
+
t(w) && (w = w.apply()), this.options.keepNullAttributes && w == null ? this.attribs[d] = new a(this, d, "") : w != null && (this.attribs[d] = new a(this, d, w));
|
|
405
405
|
return this;
|
|
406
406
|
}, y.prototype.removeAttribute = function(d) {
|
|
407
|
-
var
|
|
407
|
+
var w, O, I;
|
|
408
408
|
if (d == null)
|
|
409
409
|
throw new Error("Missing attribute name. " + this.debugInfo());
|
|
410
|
-
if (d =
|
|
410
|
+
if (d = p(d), Array.isArray(d))
|
|
411
411
|
for (O = 0, I = d.length; O < I; O++)
|
|
412
|
-
|
|
412
|
+
w = d[O], delete this.attribs[w];
|
|
413
413
|
else
|
|
414
414
|
delete this.attribs[d];
|
|
415
415
|
return this;
|
|
416
416
|
}, y.prototype.toString = function(d) {
|
|
417
417
|
return this.options.writer.element(this, this.options.writer.filterOptions(d));
|
|
418
|
-
}, y.prototype.att = function(d,
|
|
419
|
-
return this.attribute(d,
|
|
420
|
-
}, y.prototype.a = function(d,
|
|
421
|
-
return this.attribute(d,
|
|
418
|
+
}, y.prototype.att = function(d, w) {
|
|
419
|
+
return this.attribute(d, w);
|
|
420
|
+
}, y.prototype.a = function(d, w) {
|
|
421
|
+
return this.attribute(d, w);
|
|
422
422
|
}, y.prototype.getAttribute = function(d) {
|
|
423
423
|
return this.attribs.hasOwnProperty(d) ? this.attribs[d].value : null;
|
|
424
|
-
}, y.prototype.setAttribute = function(d,
|
|
424
|
+
}, y.prototype.setAttribute = function(d, w) {
|
|
425
425
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
426
426
|
}, y.prototype.getAttributeNode = function(d) {
|
|
427
427
|
return this.attribs.hasOwnProperty(d) ? this.attribs[d] : null;
|
|
@@ -431,115 +431,115 @@ function Yt() {
|
|
|
431
431
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
432
432
|
}, y.prototype.getElementsByTagName = function(d) {
|
|
433
433
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
434
|
-
}, y.prototype.getAttributeNS = function(d,
|
|
434
|
+
}, y.prototype.getAttributeNS = function(d, w) {
|
|
435
435
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
436
|
-
}, y.prototype.setAttributeNS = function(d,
|
|
436
|
+
}, y.prototype.setAttributeNS = function(d, w, O) {
|
|
437
437
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
438
|
-
}, y.prototype.removeAttributeNS = function(d,
|
|
438
|
+
}, y.prototype.removeAttributeNS = function(d, w) {
|
|
439
439
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
440
|
-
}, y.prototype.getAttributeNodeNS = function(d,
|
|
440
|
+
}, y.prototype.getAttributeNodeNS = function(d, w) {
|
|
441
441
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
442
442
|
}, y.prototype.setAttributeNodeNS = function(d) {
|
|
443
443
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
444
|
-
}, y.prototype.getElementsByTagNameNS = function(d,
|
|
444
|
+
}, y.prototype.getElementsByTagNameNS = function(d, w) {
|
|
445
445
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
446
446
|
}, y.prototype.hasAttribute = function(d) {
|
|
447
447
|
return this.attribs.hasOwnProperty(d);
|
|
448
|
-
}, y.prototype.hasAttributeNS = function(d,
|
|
448
|
+
}, y.prototype.hasAttributeNS = function(d, w) {
|
|
449
449
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
450
|
-
}, y.prototype.setIdAttribute = function(d,
|
|
451
|
-
return this.attribs.hasOwnProperty(d) ? this.attribs[d].isId :
|
|
452
|
-
}, y.prototype.setIdAttributeNS = function(d,
|
|
450
|
+
}, y.prototype.setIdAttribute = function(d, w) {
|
|
451
|
+
return this.attribs.hasOwnProperty(d) ? this.attribs[d].isId : w;
|
|
452
|
+
}, y.prototype.setIdAttributeNS = function(d, w, O) {
|
|
453
453
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
454
|
-
}, y.prototype.setIdAttributeNode = function(d,
|
|
454
|
+
}, y.prototype.setIdAttributeNode = function(d, w) {
|
|
455
455
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
456
456
|
}, y.prototype.getElementsByTagName = function(d) {
|
|
457
457
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
458
|
-
}, y.prototype.getElementsByTagNameNS = function(d,
|
|
458
|
+
}, y.prototype.getElementsByTagNameNS = function(d, w) {
|
|
459
459
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
460
460
|
}, y.prototype.getElementsByClassName = function(d) {
|
|
461
461
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
462
462
|
}, y.prototype.isEqualNode = function(d) {
|
|
463
|
-
var
|
|
463
|
+
var w, O, I;
|
|
464
464
|
if (!y.__super__.isEqualNode.apply(this, arguments).isEqualNode(d) || d.namespaceURI !== this.namespaceURI || d.prefix !== this.prefix || d.localName !== this.localName || d.attribs.length !== this.attribs.length)
|
|
465
465
|
return !1;
|
|
466
|
-
for (
|
|
467
|
-
if (!this.attribs[
|
|
466
|
+
for (w = O = 0, I = this.attribs.length - 1; 0 <= I ? O <= I : O >= I; w = 0 <= I ? ++O : --O)
|
|
467
|
+
if (!this.attribs[w].isEqualNode(d.attribs[w]))
|
|
468
468
|
return !1;
|
|
469
469
|
return !0;
|
|
470
470
|
}, y;
|
|
471
|
-
}(
|
|
472
|
-
}).call(
|
|
471
|
+
}(h);
|
|
472
|
+
}).call(Or)), ht.exports;
|
|
473
473
|
}
|
|
474
|
-
var
|
|
475
|
-
function
|
|
476
|
-
return
|
|
477
|
-
var
|
|
478
|
-
for (var t in
|
|
479
|
-
|
|
474
|
+
var mt = { exports: {} }, gt = { exports: {} }, Nr = gt.exports, Ee;
|
|
475
|
+
function jt() {
|
|
476
|
+
return Ee || (Ee = 1, (function() {
|
|
477
|
+
var n, a = function(h, p) {
|
|
478
|
+
for (var t in p)
|
|
479
|
+
g.call(p, t) && (h[t] = p[t]);
|
|
480
480
|
function e() {
|
|
481
|
-
this.constructor =
|
|
481
|
+
this.constructor = h;
|
|
482
482
|
}
|
|
483
|
-
return e.prototype =
|
|
484
|
-
},
|
|
485
|
-
|
|
486
|
-
a(
|
|
487
|
-
function
|
|
488
|
-
|
|
483
|
+
return e.prototype = p.prototype, h.prototype = new e(), h.__super__ = p.prototype, h;
|
|
484
|
+
}, g = {}.hasOwnProperty;
|
|
485
|
+
n = G(), gt.exports = function(h) {
|
|
486
|
+
a(p, h);
|
|
487
|
+
function p(t) {
|
|
488
|
+
p.__super__.constructor.call(this, t), this.value = "";
|
|
489
489
|
}
|
|
490
|
-
return Object.defineProperty(
|
|
490
|
+
return Object.defineProperty(p.prototype, "data", {
|
|
491
491
|
get: function() {
|
|
492
492
|
return this.value;
|
|
493
493
|
},
|
|
494
494
|
set: function(t) {
|
|
495
495
|
return this.value = t || "";
|
|
496
496
|
}
|
|
497
|
-
}), Object.defineProperty(
|
|
497
|
+
}), Object.defineProperty(p.prototype, "length", {
|
|
498
498
|
get: function() {
|
|
499
499
|
return this.value.length;
|
|
500
500
|
}
|
|
501
|
-
}), Object.defineProperty(
|
|
501
|
+
}), Object.defineProperty(p.prototype, "textContent", {
|
|
502
502
|
get: function() {
|
|
503
503
|
return this.value;
|
|
504
504
|
},
|
|
505
505
|
set: function(t) {
|
|
506
506
|
return this.value = t || "";
|
|
507
507
|
}
|
|
508
|
-
}),
|
|
508
|
+
}), p.prototype.clone = function() {
|
|
509
509
|
return Object.create(this);
|
|
510
|
-
},
|
|
510
|
+
}, p.prototype.substringData = function(t, e) {
|
|
511
511
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
512
|
-
},
|
|
512
|
+
}, p.prototype.appendData = function(t) {
|
|
513
513
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
514
|
-
},
|
|
514
|
+
}, p.prototype.insertData = function(t, e) {
|
|
515
515
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
516
|
-
},
|
|
516
|
+
}, p.prototype.deleteData = function(t, e) {
|
|
517
517
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
518
|
-
},
|
|
518
|
+
}, p.prototype.replaceData = function(t, e, o) {
|
|
519
519
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
520
|
-
},
|
|
521
|
-
return !(!
|
|
522
|
-
},
|
|
523
|
-
}(
|
|
524
|
-
}).call(
|
|
520
|
+
}, p.prototype.isEqualNode = function(t) {
|
|
521
|
+
return !(!p.__super__.isEqualNode.apply(this, arguments).isEqualNode(t) || t.data !== this.data);
|
|
522
|
+
}, p;
|
|
523
|
+
}(n);
|
|
524
|
+
}).call(Nr)), gt.exports;
|
|
525
525
|
}
|
|
526
|
-
var
|
|
527
|
-
function
|
|
528
|
-
return
|
|
529
|
-
var
|
|
526
|
+
var vr = mt.exports, be;
|
|
527
|
+
function zt() {
|
|
528
|
+
return be || (be = 1, (function() {
|
|
529
|
+
var n, a, g = function(p, t) {
|
|
530
530
|
for (var e in t)
|
|
531
|
-
|
|
531
|
+
h.call(t, e) && (p[e] = t[e]);
|
|
532
532
|
function o() {
|
|
533
|
-
this.constructor =
|
|
533
|
+
this.constructor = p;
|
|
534
534
|
}
|
|
535
|
-
return o.prototype = t.prototype,
|
|
536
|
-
},
|
|
537
|
-
|
|
538
|
-
|
|
535
|
+
return o.prototype = t.prototype, p.prototype = new o(), p.__super__ = t.prototype, p;
|
|
536
|
+
}, h = {}.hasOwnProperty;
|
|
537
|
+
n = B(), a = jt(), mt.exports = function(p) {
|
|
538
|
+
g(t, p);
|
|
539
539
|
function t(e, o) {
|
|
540
540
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
541
541
|
throw new Error("Missing CDATA text. " + this.debugInfo());
|
|
542
|
-
this.name = "#cdata-section", this.type =
|
|
542
|
+
this.name = "#cdata-section", this.type = n.CData, this.value = this.stringify.cdata(o);
|
|
543
543
|
}
|
|
544
544
|
return t.prototype.clone = function() {
|
|
545
545
|
return Object.create(this);
|
|
@@ -547,25 +547,25 @@ function Kt() {
|
|
|
547
547
|
return this.options.writer.cdata(this, this.options.writer.filterOptions(e));
|
|
548
548
|
}, t;
|
|
549
549
|
}(a);
|
|
550
|
-
}).call(
|
|
550
|
+
}).call(vr)), mt.exports;
|
|
551
551
|
}
|
|
552
|
-
var
|
|
553
|
-
function
|
|
554
|
-
return
|
|
555
|
-
var
|
|
552
|
+
var wt = { exports: {} }, Lr = wt.exports, Oe;
|
|
553
|
+
function Ht() {
|
|
554
|
+
return Oe || (Oe = 1, (function() {
|
|
555
|
+
var n, a, g = function(p, t) {
|
|
556
556
|
for (var e in t)
|
|
557
|
-
|
|
557
|
+
h.call(t, e) && (p[e] = t[e]);
|
|
558
558
|
function o() {
|
|
559
|
-
this.constructor =
|
|
559
|
+
this.constructor = p;
|
|
560
560
|
}
|
|
561
|
-
return o.prototype = t.prototype,
|
|
562
|
-
},
|
|
563
|
-
|
|
564
|
-
|
|
561
|
+
return o.prototype = t.prototype, p.prototype = new o(), p.__super__ = t.prototype, p;
|
|
562
|
+
}, h = {}.hasOwnProperty;
|
|
563
|
+
n = B(), a = jt(), wt.exports = function(p) {
|
|
564
|
+
g(t, p);
|
|
565
565
|
function t(e, o) {
|
|
566
566
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
567
567
|
throw new Error("Missing comment text. " + this.debugInfo());
|
|
568
|
-
this.name = "#comment", this.type =
|
|
568
|
+
this.name = "#comment", this.type = n.Comment, this.value = this.stringify.comment(o);
|
|
569
569
|
}
|
|
570
570
|
return t.prototype.clone = function() {
|
|
571
571
|
return Object.create(this);
|
|
@@ -573,44 +573,44 @@ function zt() {
|
|
|
573
573
|
return this.options.writer.comment(this, this.options.writer.filterOptions(e));
|
|
574
574
|
}, t;
|
|
575
575
|
}(a);
|
|
576
|
-
}).call(
|
|
576
|
+
}).call(Lr)), wt.exports;
|
|
577
577
|
}
|
|
578
|
-
var
|
|
579
|
-
function
|
|
580
|
-
return
|
|
581
|
-
var
|
|
578
|
+
var Tt = { exports: {} }, Ir = Tt.exports, Ne;
|
|
579
|
+
function Qt() {
|
|
580
|
+
return Ne || (Ne = 1, (function() {
|
|
581
|
+
var n, a, g, h = function(t, e) {
|
|
582
582
|
for (var o in e)
|
|
583
|
-
|
|
583
|
+
p.call(e, o) && (t[o] = e[o]);
|
|
584
584
|
function l() {
|
|
585
585
|
this.constructor = t;
|
|
586
586
|
}
|
|
587
587
|
return l.prototype = e.prototype, t.prototype = new l(), t.__super__ = e.prototype, t;
|
|
588
|
-
},
|
|
589
|
-
|
|
590
|
-
|
|
588
|
+
}, p = {}.hasOwnProperty;
|
|
589
|
+
g = H().isObject, a = G(), n = B(), Tt.exports = function(t) {
|
|
590
|
+
h(e, t);
|
|
591
591
|
function e(o, l, b, m) {
|
|
592
592
|
var y;
|
|
593
|
-
e.__super__.constructor.call(this, o),
|
|
593
|
+
e.__super__.constructor.call(this, o), g(l) && (y = l, l = y.version, b = y.encoding, m = y.standalone), l || (l = "1.0"), this.type = n.Declaration, this.version = this.stringify.xmlVersion(l), b != null && (this.encoding = this.stringify.xmlEncoding(b)), m != null && (this.standalone = this.stringify.xmlStandalone(m));
|
|
594
594
|
}
|
|
595
595
|
return e.prototype.toString = function(o) {
|
|
596
596
|
return this.options.writer.declaration(this, this.options.writer.filterOptions(o));
|
|
597
597
|
}, e;
|
|
598
598
|
}(a);
|
|
599
|
-
}).call(
|
|
599
|
+
}).call(Ir)), Tt.exports;
|
|
600
600
|
}
|
|
601
|
-
var
|
|
602
|
-
function
|
|
603
|
-
return
|
|
604
|
-
var
|
|
601
|
+
var Dt = { exports: {} }, Et = { exports: {} }, xr = Et.exports, ve;
|
|
602
|
+
function Zt() {
|
|
603
|
+
return ve || (ve = 1, (function() {
|
|
604
|
+
var n, a, g = function(p, t) {
|
|
605
605
|
for (var e in t)
|
|
606
|
-
|
|
606
|
+
h.call(t, e) && (p[e] = t[e]);
|
|
607
607
|
function o() {
|
|
608
|
-
this.constructor =
|
|
608
|
+
this.constructor = p;
|
|
609
609
|
}
|
|
610
|
-
return o.prototype = t.prototype,
|
|
611
|
-
},
|
|
612
|
-
a =
|
|
613
|
-
|
|
610
|
+
return o.prototype = t.prototype, p.prototype = new o(), p.__super__ = t.prototype, p;
|
|
611
|
+
}, h = {}.hasOwnProperty;
|
|
612
|
+
a = G(), n = B(), Et.exports = function(p) {
|
|
613
|
+
g(t, p);
|
|
614
614
|
function t(e, o, l, b, m, y) {
|
|
615
615
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
616
616
|
throw new Error("Missing DTD element name. " + this.debugInfo());
|
|
@@ -624,33 +624,33 @@ function Qt() {
|
|
|
624
624
|
throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(o));
|
|
625
625
|
if (y && !m.match(/^(#FIXED|#DEFAULT)$/))
|
|
626
626
|
throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(o));
|
|
627
|
-
this.elementName = this.stringify.name(o), this.type =
|
|
627
|
+
this.elementName = this.stringify.name(o), this.type = n.AttributeDeclaration, this.attributeName = this.stringify.name(l), this.attributeType = this.stringify.dtdAttType(b), y && (this.defaultValue = this.stringify.dtdAttDefault(y)), this.defaultValueType = m;
|
|
628
628
|
}
|
|
629
629
|
return t.prototype.toString = function(e) {
|
|
630
630
|
return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(e));
|
|
631
631
|
}, t;
|
|
632
632
|
}(a);
|
|
633
|
-
}).call(
|
|
633
|
+
}).call(xr)), Et.exports;
|
|
634
634
|
}
|
|
635
|
-
var
|
|
636
|
-
function
|
|
637
|
-
return
|
|
638
|
-
var
|
|
635
|
+
var bt = { exports: {} }, Ar = bt.exports, Le;
|
|
636
|
+
function Jt() {
|
|
637
|
+
return Le || (Le = 1, (function() {
|
|
638
|
+
var n, a, g, h = function(t, e) {
|
|
639
639
|
for (var o in e)
|
|
640
|
-
|
|
640
|
+
p.call(e, o) && (t[o] = e[o]);
|
|
641
641
|
function l() {
|
|
642
642
|
this.constructor = t;
|
|
643
643
|
}
|
|
644
644
|
return l.prototype = e.prototype, t.prototype = new l(), t.__super__ = e.prototype, t;
|
|
645
|
-
},
|
|
646
|
-
|
|
647
|
-
|
|
645
|
+
}, p = {}.hasOwnProperty;
|
|
646
|
+
g = H().isObject, a = G(), n = B(), bt.exports = function(t) {
|
|
647
|
+
h(e, t);
|
|
648
648
|
function e(o, l, b, m) {
|
|
649
649
|
if (e.__super__.constructor.call(this, o), b == null)
|
|
650
650
|
throw new Error("Missing DTD entity name. " + this.debugInfo(b));
|
|
651
651
|
if (m == null)
|
|
652
652
|
throw new Error("Missing DTD entity value. " + this.debugInfo(b));
|
|
653
|
-
if (this.pe = !!l, this.name = this.stringify.name(b), this.type =
|
|
653
|
+
if (this.pe = !!l, this.name = this.stringify.name(b), this.type = n.EntityDeclaration, !g(m))
|
|
654
654
|
this.value = this.stringify.dtdEntityValue(m), this.internal = !0;
|
|
655
655
|
else {
|
|
656
656
|
if (!m.pubID && !m.sysID)
|
|
@@ -689,51 +689,51 @@ function Zt() {
|
|
|
689
689
|
return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(o));
|
|
690
690
|
}, e;
|
|
691
691
|
}(a);
|
|
692
|
-
}).call(
|
|
692
|
+
}).call(Ar)), bt.exports;
|
|
693
693
|
}
|
|
694
|
-
var
|
|
695
|
-
function
|
|
696
|
-
return
|
|
697
|
-
var
|
|
694
|
+
var Ot = { exports: {} }, Pr = Ot.exports, Ie;
|
|
695
|
+
function te() {
|
|
696
|
+
return Ie || (Ie = 1, (function() {
|
|
697
|
+
var n, a, g = function(p, t) {
|
|
698
698
|
for (var e in t)
|
|
699
|
-
|
|
699
|
+
h.call(t, e) && (p[e] = t[e]);
|
|
700
700
|
function o() {
|
|
701
|
-
this.constructor =
|
|
701
|
+
this.constructor = p;
|
|
702
702
|
}
|
|
703
|
-
return o.prototype = t.prototype,
|
|
704
|
-
},
|
|
705
|
-
a =
|
|
706
|
-
|
|
703
|
+
return o.prototype = t.prototype, p.prototype = new o(), p.__super__ = t.prototype, p;
|
|
704
|
+
}, h = {}.hasOwnProperty;
|
|
705
|
+
a = G(), n = B(), Ot.exports = function(p) {
|
|
706
|
+
g(t, p);
|
|
707
707
|
function t(e, o, l) {
|
|
708
708
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
709
709
|
throw new Error("Missing DTD element name. " + this.debugInfo());
|
|
710
|
-
l || (l = "(#PCDATA)"), Array.isArray(l) && (l = "(" + l.join(",") + ")"), this.name = this.stringify.name(o), this.type =
|
|
710
|
+
l || (l = "(#PCDATA)"), Array.isArray(l) && (l = "(" + l.join(",") + ")"), this.name = this.stringify.name(o), this.type = n.ElementDeclaration, this.value = this.stringify.dtdElementValue(l);
|
|
711
711
|
}
|
|
712
712
|
return t.prototype.toString = function(e) {
|
|
713
713
|
return this.options.writer.dtdElement(this, this.options.writer.filterOptions(e));
|
|
714
714
|
}, t;
|
|
715
715
|
}(a);
|
|
716
|
-
}).call(
|
|
716
|
+
}).call(Pr)), Ot.exports;
|
|
717
717
|
}
|
|
718
|
-
var
|
|
719
|
-
function
|
|
720
|
-
return
|
|
721
|
-
var
|
|
718
|
+
var Nt = { exports: {} }, Mr = Nt.exports, xe;
|
|
719
|
+
function ee() {
|
|
720
|
+
return xe || (xe = 1, (function() {
|
|
721
|
+
var n, a, g = function(p, t) {
|
|
722
722
|
for (var e in t)
|
|
723
|
-
|
|
723
|
+
h.call(t, e) && (p[e] = t[e]);
|
|
724
724
|
function o() {
|
|
725
|
-
this.constructor =
|
|
725
|
+
this.constructor = p;
|
|
726
726
|
}
|
|
727
|
-
return o.prototype = t.prototype,
|
|
728
|
-
},
|
|
729
|
-
a =
|
|
730
|
-
|
|
727
|
+
return o.prototype = t.prototype, p.prototype = new o(), p.__super__ = t.prototype, p;
|
|
728
|
+
}, h = {}.hasOwnProperty;
|
|
729
|
+
a = G(), n = B(), Nt.exports = function(p) {
|
|
730
|
+
g(t, p);
|
|
731
731
|
function t(e, o, l) {
|
|
732
732
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
733
733
|
throw new Error("Missing DTD notation name. " + this.debugInfo(o));
|
|
734
734
|
if (!l.pubID && !l.sysID)
|
|
735
735
|
throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(o));
|
|
736
|
-
this.name = this.stringify.name(o), this.type =
|
|
736
|
+
this.name = this.stringify.name(o), this.type = n.NotationDeclaration, l.pubID != null && (this.pubID = this.stringify.dtdPubID(l.pubID)), l.sysID != null && (this.sysID = this.stringify.dtdSysID(l.sysID));
|
|
737
737
|
}
|
|
738
738
|
return Object.defineProperty(t.prototype, "publicId", {
|
|
739
739
|
get: function() {
|
|
@@ -747,44 +747,44 @@ function te() {
|
|
|
747
747
|
return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(e));
|
|
748
748
|
}, t;
|
|
749
749
|
}(a);
|
|
750
|
-
}).call(
|
|
750
|
+
}).call(Mr)), Nt.exports;
|
|
751
751
|
}
|
|
752
|
-
var
|
|
753
|
-
function
|
|
754
|
-
return
|
|
755
|
-
var
|
|
752
|
+
var _r = Dt.exports, Ae;
|
|
753
|
+
function re() {
|
|
754
|
+
return Ae || (Ae = 1, (function() {
|
|
755
|
+
var n, a, g, h, p, t, e, o, l = function(m, y) {
|
|
756
756
|
for (var d in y)
|
|
757
757
|
b.call(y, d) && (m[d] = y[d]);
|
|
758
|
-
function
|
|
758
|
+
function w() {
|
|
759
759
|
this.constructor = m;
|
|
760
760
|
}
|
|
761
|
-
return
|
|
761
|
+
return w.prototype = y.prototype, m.prototype = new w(), m.__super__ = y.prototype, m;
|
|
762
762
|
}, b = {}.hasOwnProperty;
|
|
763
|
-
o = H().isObject, e =
|
|
763
|
+
o = H().isObject, e = G(), n = B(), a = Zt(), h = Jt(), g = te(), p = ee(), t = Yt(), Dt.exports = function(m) {
|
|
764
764
|
l(y, m);
|
|
765
|
-
function y(d,
|
|
766
|
-
var I, x,
|
|
767
|
-
if (y.__super__.constructor.call(this, d), this.type =
|
|
768
|
-
for (E = d.children, x = 0,
|
|
769
|
-
if (I = E[x], I.type ===
|
|
765
|
+
function y(d, w, O) {
|
|
766
|
+
var I, x, M, E, s, c;
|
|
767
|
+
if (y.__super__.constructor.call(this, d), this.type = n.DocType, d.children) {
|
|
768
|
+
for (E = d.children, x = 0, M = E.length; x < M; x++)
|
|
769
|
+
if (I = E[x], I.type === n.Element) {
|
|
770
770
|
this.name = I.name;
|
|
771
771
|
break;
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
|
-
this.documentObject = d, o(
|
|
774
|
+
this.documentObject = d, o(w) && (s = w, w = s.pubID, O = s.sysID), O == null && (c = [w, O], O = c[0], w = c[1]), w != null && (this.pubID = this.stringify.dtdPubID(w)), O != null && (this.sysID = this.stringify.dtdSysID(O));
|
|
775
775
|
}
|
|
776
776
|
return Object.defineProperty(y.prototype, "entities", {
|
|
777
777
|
get: function() {
|
|
778
|
-
var d,
|
|
779
|
-
for (I = {}, x = this.children,
|
|
780
|
-
d = x[
|
|
778
|
+
var d, w, O, I, x;
|
|
779
|
+
for (I = {}, x = this.children, w = 0, O = x.length; w < O; w++)
|
|
780
|
+
d = x[w], d.type === n.EntityDeclaration && !d.pe && (I[d.name] = d);
|
|
781
781
|
return new t(I);
|
|
782
782
|
}
|
|
783
783
|
}), Object.defineProperty(y.prototype, "notations", {
|
|
784
784
|
get: function() {
|
|
785
|
-
var d,
|
|
786
|
-
for (I = {}, x = this.children,
|
|
787
|
-
d = x[
|
|
785
|
+
var d, w, O, I, x;
|
|
786
|
+
for (I = {}, x = this.children, w = 0, O = x.length; w < O; w++)
|
|
787
|
+
d = x[w], d.type === n.NotationDeclaration && (I[d.name] = d);
|
|
788
788
|
return new t(I);
|
|
789
789
|
}
|
|
790
790
|
}), Object.defineProperty(y.prototype, "publicId", {
|
|
@@ -799,58 +799,58 @@ function ee() {
|
|
|
799
799
|
get: function() {
|
|
800
800
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
801
801
|
}
|
|
802
|
-
}), y.prototype.element = function(d,
|
|
802
|
+
}), y.prototype.element = function(d, w) {
|
|
803
803
|
var O;
|
|
804
|
-
return O = new
|
|
805
|
-
}, y.prototype.attList = function(d,
|
|
806
|
-
var
|
|
807
|
-
return
|
|
808
|
-
}, y.prototype.entity = function(d,
|
|
804
|
+
return O = new g(this, d, w), this.children.push(O), this;
|
|
805
|
+
}, y.prototype.attList = function(d, w, O, I, x) {
|
|
806
|
+
var M;
|
|
807
|
+
return M = new a(this, d, w, O, I, x), this.children.push(M), this;
|
|
808
|
+
}, y.prototype.entity = function(d, w) {
|
|
809
809
|
var O;
|
|
810
|
-
return O = new
|
|
811
|
-
}, y.prototype.pEntity = function(d,
|
|
810
|
+
return O = new h(this, !1, d, w), this.children.push(O), this;
|
|
811
|
+
}, y.prototype.pEntity = function(d, w) {
|
|
812
812
|
var O;
|
|
813
|
-
return O = new
|
|
814
|
-
}, y.prototype.notation = function(d,
|
|
813
|
+
return O = new h(this, !0, d, w), this.children.push(O), this;
|
|
814
|
+
}, y.prototype.notation = function(d, w) {
|
|
815
815
|
var O;
|
|
816
|
-
return O = new
|
|
816
|
+
return O = new p(this, d, w), this.children.push(O), this;
|
|
817
817
|
}, y.prototype.toString = function(d) {
|
|
818
818
|
return this.options.writer.docType(this, this.options.writer.filterOptions(d));
|
|
819
|
-
}, y.prototype.ele = function(d,
|
|
820
|
-
return this.element(d,
|
|
821
|
-
}, y.prototype.att = function(d,
|
|
822
|
-
return this.attList(d,
|
|
823
|
-
}, y.prototype.ent = function(d,
|
|
824
|
-
return this.entity(d,
|
|
825
|
-
}, y.prototype.pent = function(d,
|
|
826
|
-
return this.pEntity(d,
|
|
827
|
-
}, y.prototype.not = function(d,
|
|
828
|
-
return this.notation(d,
|
|
819
|
+
}, y.prototype.ele = function(d, w) {
|
|
820
|
+
return this.element(d, w);
|
|
821
|
+
}, y.prototype.att = function(d, w, O, I, x) {
|
|
822
|
+
return this.attList(d, w, O, I, x);
|
|
823
|
+
}, y.prototype.ent = function(d, w) {
|
|
824
|
+
return this.entity(d, w);
|
|
825
|
+
}, y.prototype.pent = function(d, w) {
|
|
826
|
+
return this.pEntity(d, w);
|
|
827
|
+
}, y.prototype.not = function(d, w) {
|
|
828
|
+
return this.notation(d, w);
|
|
829
829
|
}, y.prototype.up = function() {
|
|
830
830
|
return this.root() || this.documentObject;
|
|
831
831
|
}, y.prototype.isEqualNode = function(d) {
|
|
832
832
|
return !(!y.__super__.isEqualNode.apply(this, arguments).isEqualNode(d) || d.name !== this.name || d.publicId !== this.publicId || d.systemId !== this.systemId);
|
|
833
833
|
}, y;
|
|
834
834
|
}(e);
|
|
835
|
-
}).call(
|
|
835
|
+
}).call(_r)), Dt.exports;
|
|
836
836
|
}
|
|
837
|
-
var
|
|
838
|
-
function
|
|
839
|
-
return
|
|
840
|
-
var
|
|
837
|
+
var vt = { exports: {} }, Cr = vt.exports, Pe;
|
|
838
|
+
function ne() {
|
|
839
|
+
return Pe || (Pe = 1, (function() {
|
|
840
|
+
var n, a, g = function(p, t) {
|
|
841
841
|
for (var e in t)
|
|
842
|
-
|
|
842
|
+
h.call(t, e) && (p[e] = t[e]);
|
|
843
843
|
function o() {
|
|
844
|
-
this.constructor =
|
|
844
|
+
this.constructor = p;
|
|
845
845
|
}
|
|
846
|
-
return o.prototype = t.prototype,
|
|
847
|
-
},
|
|
848
|
-
|
|
849
|
-
|
|
846
|
+
return o.prototype = t.prototype, p.prototype = new o(), p.__super__ = t.prototype, p;
|
|
847
|
+
}, h = {}.hasOwnProperty;
|
|
848
|
+
n = B(), a = G(), vt.exports = function(p) {
|
|
849
|
+
g(t, p);
|
|
850
850
|
function t(e, o) {
|
|
851
851
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
852
852
|
throw new Error("Missing raw text. " + this.debugInfo());
|
|
853
|
-
this.type =
|
|
853
|
+
this.type = n.Raw, this.value = this.stringify.raw(o);
|
|
854
854
|
}
|
|
855
855
|
return t.prototype.clone = function() {
|
|
856
856
|
return Object.create(this);
|
|
@@ -858,25 +858,25 @@ function re() {
|
|
|
858
858
|
return this.options.writer.raw(this, this.options.writer.filterOptions(e));
|
|
859
859
|
}, t;
|
|
860
860
|
}(a);
|
|
861
|
-
}).call(
|
|
861
|
+
}).call(Cr)), vt.exports;
|
|
862
862
|
}
|
|
863
|
-
var
|
|
864
|
-
function
|
|
863
|
+
var Lt = { exports: {} }, Sr = Lt.exports, Me;
|
|
864
|
+
function ie() {
|
|
865
865
|
return Me || (Me = 1, (function() {
|
|
866
|
-
var
|
|
866
|
+
var n, a, g = function(p, t) {
|
|
867
867
|
for (var e in t)
|
|
868
|
-
|
|
868
|
+
h.call(t, e) && (p[e] = t[e]);
|
|
869
869
|
function o() {
|
|
870
|
-
this.constructor =
|
|
870
|
+
this.constructor = p;
|
|
871
871
|
}
|
|
872
|
-
return o.prototype = t.prototype,
|
|
873
|
-
},
|
|
874
|
-
|
|
875
|
-
|
|
872
|
+
return o.prototype = t.prototype, p.prototype = new o(), p.__super__ = t.prototype, p;
|
|
873
|
+
}, h = {}.hasOwnProperty;
|
|
874
|
+
n = B(), a = jt(), Lt.exports = function(p) {
|
|
875
|
+
g(t, p);
|
|
876
876
|
function t(e, o) {
|
|
877
877
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
878
878
|
throw new Error("Missing element text. " + this.debugInfo());
|
|
879
|
-
this.name = "#text", this.type =
|
|
879
|
+
this.name = "#text", this.type = n.Text, this.value = this.stringify.text(o);
|
|
880
880
|
}
|
|
881
881
|
return Object.defineProperty(t.prototype, "isElementContentWhitespace", {
|
|
882
882
|
get: function() {
|
|
@@ -901,25 +901,25 @@ function ne() {
|
|
|
901
901
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
902
902
|
}, t;
|
|
903
903
|
}(a);
|
|
904
|
-
}).call(
|
|
904
|
+
}).call(Sr)), Lt.exports;
|
|
905
905
|
}
|
|
906
|
-
var
|
|
907
|
-
function
|
|
908
|
-
return
|
|
909
|
-
var
|
|
906
|
+
var It = { exports: {} }, Fr = It.exports, _e;
|
|
907
|
+
function oe() {
|
|
908
|
+
return _e || (_e = 1, (function() {
|
|
909
|
+
var n, a, g = function(p, t) {
|
|
910
910
|
for (var e in t)
|
|
911
|
-
|
|
911
|
+
h.call(t, e) && (p[e] = t[e]);
|
|
912
912
|
function o() {
|
|
913
|
-
this.constructor =
|
|
913
|
+
this.constructor = p;
|
|
914
914
|
}
|
|
915
|
-
return o.prototype = t.prototype,
|
|
916
|
-
},
|
|
917
|
-
|
|
918
|
-
|
|
915
|
+
return o.prototype = t.prototype, p.prototype = new o(), p.__super__ = t.prototype, p;
|
|
916
|
+
}, h = {}.hasOwnProperty;
|
|
917
|
+
n = B(), a = jt(), It.exports = function(p) {
|
|
918
|
+
g(t, p);
|
|
919
919
|
function t(e, o, l) {
|
|
920
920
|
if (t.__super__.constructor.call(this, e), o == null)
|
|
921
921
|
throw new Error("Missing instruction target. " + this.debugInfo());
|
|
922
|
-
this.type =
|
|
922
|
+
this.type = n.ProcessingInstruction, this.target = this.stringify.insTarget(o), this.name = this.target, l && (this.value = this.stringify.insValue(l));
|
|
923
923
|
}
|
|
924
924
|
return t.prototype.clone = function() {
|
|
925
925
|
return Object.create(this);
|
|
@@ -929,23 +929,23 @@ function ie() {
|
|
|
929
929
|
return !(!t.__super__.isEqualNode.apply(this, arguments).isEqualNode(e) || e.target !== this.target);
|
|
930
930
|
}, t;
|
|
931
931
|
}(a);
|
|
932
|
-
}).call(
|
|
932
|
+
}).call(Fr)), It.exports;
|
|
933
933
|
}
|
|
934
|
-
var
|
|
934
|
+
var xt = { exports: {} }, Xr = xt.exports, Ce;
|
|
935
935
|
function er() {
|
|
936
|
-
return
|
|
937
|
-
var
|
|
936
|
+
return Ce || (Ce = 1, (function() {
|
|
937
|
+
var n, a, g = function(p, t) {
|
|
938
938
|
for (var e in t)
|
|
939
|
-
|
|
939
|
+
h.call(t, e) && (p[e] = t[e]);
|
|
940
940
|
function o() {
|
|
941
|
-
this.constructor =
|
|
941
|
+
this.constructor = p;
|
|
942
942
|
}
|
|
943
|
-
return o.prototype = t.prototype,
|
|
944
|
-
},
|
|
945
|
-
a =
|
|
946
|
-
|
|
943
|
+
return o.prototype = t.prototype, p.prototype = new o(), p.__super__ = t.prototype, p;
|
|
944
|
+
}, h = {}.hasOwnProperty;
|
|
945
|
+
a = G(), n = B(), xt.exports = function(p) {
|
|
946
|
+
g(t, p);
|
|
947
947
|
function t(e) {
|
|
948
|
-
t.__super__.constructor.call(this, e), this.type =
|
|
948
|
+
t.__super__.constructor.call(this, e), this.type = n.Dummy;
|
|
949
949
|
}
|
|
950
950
|
return t.prototype.clone = function() {
|
|
951
951
|
return Object.create(this);
|
|
@@ -953,31 +953,31 @@ function er() {
|
|
|
953
953
|
return "";
|
|
954
954
|
}, t;
|
|
955
955
|
}(a);
|
|
956
|
-
}).call(
|
|
956
|
+
}).call(Xr)), xt.exports;
|
|
957
957
|
}
|
|
958
|
-
var
|
|
959
|
-
function
|
|
960
|
-
return
|
|
961
|
-
|
|
962
|
-
function
|
|
958
|
+
var At = { exports: {} }, Rr = At.exports, Se;
|
|
959
|
+
function jr() {
|
|
960
|
+
return Se || (Se = 1, (function() {
|
|
961
|
+
At.exports = function() {
|
|
962
|
+
function n(a) {
|
|
963
963
|
this.nodes = a;
|
|
964
964
|
}
|
|
965
|
-
return Object.defineProperty(
|
|
965
|
+
return Object.defineProperty(n.prototype, "length", {
|
|
966
966
|
get: function() {
|
|
967
967
|
return this.nodes.length || 0;
|
|
968
968
|
}
|
|
969
|
-
}),
|
|
969
|
+
}), n.prototype.clone = function() {
|
|
970
970
|
return this.nodes = null;
|
|
971
|
-
},
|
|
971
|
+
}, n.prototype.item = function(a) {
|
|
972
972
|
return this.nodes[a] || null;
|
|
973
|
-
},
|
|
973
|
+
}, n;
|
|
974
974
|
}();
|
|
975
|
-
}).call(
|
|
975
|
+
}).call(Rr)), At.exports;
|
|
976
976
|
}
|
|
977
|
-
var
|
|
978
|
-
function
|
|
979
|
-
return
|
|
980
|
-
|
|
977
|
+
var Pt = { exports: {} }, Br = Pt.exports, Fe;
|
|
978
|
+
function qr() {
|
|
979
|
+
return Fe || (Fe = 1, (function() {
|
|
980
|
+
Pt.exports = {
|
|
981
981
|
Disconnected: 1,
|
|
982
982
|
Preceding: 2,
|
|
983
983
|
Following: 4,
|
|
@@ -985,15 +985,15 @@ function jr() {
|
|
|
985
985
|
ContainedBy: 16,
|
|
986
986
|
ImplementationSpecific: 32
|
|
987
987
|
};
|
|
988
|
-
}).call(
|
|
988
|
+
}).call(Br)), Pt.exports;
|
|
989
989
|
}
|
|
990
|
-
var
|
|
991
|
-
function
|
|
990
|
+
var Ur = ft.exports, Xe;
|
|
991
|
+
function G() {
|
|
992
992
|
return Xe || (Xe = 1, (function() {
|
|
993
|
-
var
|
|
994
|
-
x = H(), I = x.isObject, O = x.isFunction,
|
|
993
|
+
var n, a, g, h, p, t, e, o, l, b, m, y, d, w, O, I, x, M = {}.hasOwnProperty;
|
|
994
|
+
x = H(), I = x.isObject, O = x.isFunction, w = x.isEmpty, d = x.getValue, o = null, g = null, h = null, p = null, t = null, m = null, y = null, b = null, e = null, a = null, l = null, n = null, ft.exports = function() {
|
|
995
995
|
function E(s) {
|
|
996
|
-
this.parent = s, this.parent && (this.options = this.parent.options, this.stringify = this.parent.stringify), this.value = null, this.children = [], this.baseURI = null, o || (o =
|
|
996
|
+
this.parent = s, this.parent && (this.options = this.parent.options, this.stringify = this.parent.stringify), this.value = null, this.children = [], this.baseURI = null, o || (o = Kt(), g = zt(), h = Ht(), p = Qt(), t = re(), m = ne(), y = ie(), b = oe(), e = er(), a = B(), l = jr(), Yt(), n = qr());
|
|
997
997
|
}
|
|
998
998
|
return Object.defineProperty(E.prototype, "nodeName", {
|
|
999
999
|
get: function() {
|
|
@@ -1039,10 +1039,10 @@ function W() {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
}), Object.defineProperty(E.prototype, "textContent", {
|
|
1041
1041
|
get: function() {
|
|
1042
|
-
var s, c, f,
|
|
1042
|
+
var s, c, f, D, L;
|
|
1043
1043
|
if (this.nodeType === a.Element || this.nodeType === a.DocumentFragment) {
|
|
1044
|
-
for (L = "",
|
|
1045
|
-
s =
|
|
1044
|
+
for (L = "", D = this.children, c = 0, f = D.length; c < f; c++)
|
|
1045
|
+
s = D[c], s.textContent && (L += s.textContent);
|
|
1046
1046
|
return L;
|
|
1047
1047
|
} else
|
|
1048
1048
|
return null;
|
|
@@ -1051,65 +1051,65 @@ function W() {
|
|
|
1051
1051
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1052
1052
|
}
|
|
1053
1053
|
}), E.prototype.setParent = function(s) {
|
|
1054
|
-
var c, f,
|
|
1055
|
-
for (this.parent = s, s && (this.options = s.options, this.stringify = s.stringify), L = this.children, v = [], f = 0,
|
|
1054
|
+
var c, f, D, L, v;
|
|
1055
|
+
for (this.parent = s, s && (this.options = s.options, this.stringify = s.stringify), L = this.children, v = [], f = 0, D = L.length; f < D; f++)
|
|
1056
1056
|
c = L[f], v.push(c.setParent(this));
|
|
1057
1057
|
return v;
|
|
1058
1058
|
}, E.prototype.element = function(s, c, f) {
|
|
1059
|
-
var
|
|
1060
|
-
if (A = null, c === null && f == null && (
|
|
1059
|
+
var D, L, v, r, N, A, _, C, F, j, X;
|
|
1060
|
+
if (A = null, c === null && f == null && (F = [{}, null], c = F[0], f = F[1]), c == null && (c = {}), c = d(c), I(c) || (j = [c, f], f = j[0], c = j[1]), s != null && (s = d(s)), Array.isArray(s))
|
|
1061
1061
|
for (v = 0, _ = s.length; v < _; v++)
|
|
1062
1062
|
L = s[v], A = this.element(L);
|
|
1063
1063
|
else if (O(s))
|
|
1064
1064
|
A = this.element(s.apply());
|
|
1065
1065
|
else if (I(s)) {
|
|
1066
1066
|
for (N in s)
|
|
1067
|
-
if (
|
|
1068
|
-
if (
|
|
1069
|
-
A = this.attribute(N.substr(this.stringify.convertAttKey.length),
|
|
1070
|
-
else if (!this.options.separateArrayItems && Array.isArray(
|
|
1067
|
+
if (M.call(s, N))
|
|
1068
|
+
if (X = s[N], O(X) && (X = X.apply()), !this.options.ignoreDecorators && this.stringify.convertAttKey && N.indexOf(this.stringify.convertAttKey) === 0)
|
|
1069
|
+
A = this.attribute(N.substr(this.stringify.convertAttKey.length), X);
|
|
1070
|
+
else if (!this.options.separateArrayItems && Array.isArray(X) && w(X))
|
|
1071
1071
|
A = this.dummy();
|
|
1072
|
-
else if (I(
|
|
1072
|
+
else if (I(X) && w(X))
|
|
1073
1073
|
A = this.element(N);
|
|
1074
|
-
else if (!this.options.keepNullNodes &&
|
|
1074
|
+
else if (!this.options.keepNullNodes && X == null)
|
|
1075
1075
|
A = this.dummy();
|
|
1076
|
-
else if (!this.options.separateArrayItems && Array.isArray(
|
|
1077
|
-
for (r = 0, C =
|
|
1078
|
-
L =
|
|
1079
|
-
else I(
|
|
1076
|
+
else if (!this.options.separateArrayItems && Array.isArray(X))
|
|
1077
|
+
for (r = 0, C = X.length; r < C; r++)
|
|
1078
|
+
L = X[r], D = {}, D[N] = L, A = this.element(D);
|
|
1079
|
+
else I(X) ? !this.options.ignoreDecorators && this.stringify.convertTextKey && N.indexOf(this.stringify.convertTextKey) === 0 ? A = this.element(X) : (A = this.element(N), A.element(X)) : A = this.element(N, X);
|
|
1080
1080
|
} else !this.options.keepNullNodes && f === null ? A = this.dummy() : !this.options.ignoreDecorators && this.stringify.convertTextKey && s.indexOf(this.stringify.convertTextKey) === 0 ? A = this.text(f) : !this.options.ignoreDecorators && this.stringify.convertCDataKey && s.indexOf(this.stringify.convertCDataKey) === 0 ? A = this.cdata(f) : !this.options.ignoreDecorators && this.stringify.convertCommentKey && s.indexOf(this.stringify.convertCommentKey) === 0 ? A = this.comment(f) : !this.options.ignoreDecorators && this.stringify.convertRawKey && s.indexOf(this.stringify.convertRawKey) === 0 ? A = this.raw(f) : !this.options.ignoreDecorators && this.stringify.convertPIKey && s.indexOf(this.stringify.convertPIKey) === 0 ? A = this.instruction(s.substr(this.stringify.convertPIKey.length), f) : A = this.node(s, c, f);
|
|
1081
1081
|
if (A == null)
|
|
1082
1082
|
throw new Error("Could not create any elements with: " + s + ". " + this.debugInfo());
|
|
1083
1083
|
return A;
|
|
1084
1084
|
}, E.prototype.insertBefore = function(s, c, f) {
|
|
1085
|
-
var
|
|
1085
|
+
var D, L, v, r, N;
|
|
1086
1086
|
if (s != null && s.type)
|
|
1087
1087
|
return v = s, r = c, v.setParent(this), r ? (L = children.indexOf(r), N = children.splice(L), children.push(v), Array.prototype.push.apply(children, N)) : children.push(v), v;
|
|
1088
1088
|
if (this.isRoot)
|
|
1089
1089
|
throw new Error("Cannot insert elements at root level. " + this.debugInfo(s));
|
|
1090
|
-
return L = this.parent.children.indexOf(this), N = this.parent.children.splice(L),
|
|
1090
|
+
return L = this.parent.children.indexOf(this), N = this.parent.children.splice(L), D = this.parent.element(s, c, f), Array.prototype.push.apply(this.parent.children, N), D;
|
|
1091
1091
|
}, E.prototype.insertAfter = function(s, c, f) {
|
|
1092
|
-
var
|
|
1092
|
+
var D, L, v;
|
|
1093
1093
|
if (this.isRoot)
|
|
1094
1094
|
throw new Error("Cannot insert elements at root level. " + this.debugInfo(s));
|
|
1095
|
-
return L = this.parent.children.indexOf(this), v = this.parent.children.splice(L + 1),
|
|
1095
|
+
return L = this.parent.children.indexOf(this), v = this.parent.children.splice(L + 1), D = this.parent.element(s, c, f), Array.prototype.push.apply(this.parent.children, v), D;
|
|
1096
1096
|
}, E.prototype.remove = function() {
|
|
1097
1097
|
var s;
|
|
1098
1098
|
if (this.isRoot)
|
|
1099
1099
|
throw new Error("Cannot remove the root element. " + this.debugInfo());
|
|
1100
1100
|
return s = this.parent.children.indexOf(this), [].splice.apply(this.parent.children, [s, s - s + 1].concat([])), this.parent;
|
|
1101
1101
|
}, E.prototype.node = function(s, c, f) {
|
|
1102
|
-
var
|
|
1103
|
-
return s != null && (s = d(s)), c || (c = {}), c = d(c), I(c) || (L = [c, f], f = L[0], c = L[1]),
|
|
1102
|
+
var D, L;
|
|
1103
|
+
return s != null && (s = d(s)), c || (c = {}), c = d(c), I(c) || (L = [c, f], f = L[0], c = L[1]), D = new o(this, s, c), f != null && D.text(f), this.children.push(D), D;
|
|
1104
1104
|
}, E.prototype.text = function(s) {
|
|
1105
1105
|
var c;
|
|
1106
1106
|
return I(s) && this.element(s), c = new y(this, s), this.children.push(c), this;
|
|
1107
1107
|
}, E.prototype.cdata = function(s) {
|
|
1108
1108
|
var c;
|
|
1109
|
-
return c = new
|
|
1109
|
+
return c = new g(this, s), this.children.push(c), this;
|
|
1110
1110
|
}, E.prototype.comment = function(s) {
|
|
1111
1111
|
var c;
|
|
1112
|
-
return c = new
|
|
1112
|
+
return c = new h(this, s), this.children.push(c), this;
|
|
1113
1113
|
}, E.prototype.commentBefore = function(s) {
|
|
1114
1114
|
var c, f;
|
|
1115
1115
|
return c = this.parent.children.indexOf(this), f = this.parent.children.splice(c), this.parent.comment(s), Array.prototype.push.apply(this.parent.children, f), this;
|
|
@@ -1123,34 +1123,34 @@ function W() {
|
|
|
1123
1123
|
var s;
|
|
1124
1124
|
return s = new e(this), s;
|
|
1125
1125
|
}, E.prototype.instruction = function(s, c) {
|
|
1126
|
-
var f,
|
|
1126
|
+
var f, D, L, v, r;
|
|
1127
1127
|
if (s != null && (s = d(s)), c != null && (c = d(c)), Array.isArray(s))
|
|
1128
1128
|
for (v = 0, r = s.length; v < r; v++)
|
|
1129
1129
|
f = s[v], this.instruction(f);
|
|
1130
1130
|
else if (I(s))
|
|
1131
1131
|
for (f in s)
|
|
1132
|
-
|
|
1132
|
+
M.call(s, f) && (D = s[f], this.instruction(f, D));
|
|
1133
1133
|
else
|
|
1134
1134
|
O(c) && (c = c.apply()), L = new b(this, s, c), this.children.push(L);
|
|
1135
1135
|
return this;
|
|
1136
1136
|
}, E.prototype.instructionBefore = function(s, c) {
|
|
1137
|
-
var f,
|
|
1138
|
-
return f = this.parent.children.indexOf(this),
|
|
1137
|
+
var f, D;
|
|
1138
|
+
return f = this.parent.children.indexOf(this), D = this.parent.children.splice(f), this.parent.instruction(s, c), Array.prototype.push.apply(this.parent.children, D), this;
|
|
1139
1139
|
}, E.prototype.instructionAfter = function(s, c) {
|
|
1140
|
-
var f,
|
|
1141
|
-
return f = this.parent.children.indexOf(this),
|
|
1140
|
+
var f, D;
|
|
1141
|
+
return f = this.parent.children.indexOf(this), D = this.parent.children.splice(f + 1), this.parent.instruction(s, c), Array.prototype.push.apply(this.parent.children, D), this;
|
|
1142
1142
|
}, E.prototype.declaration = function(s, c, f) {
|
|
1143
|
-
var
|
|
1144
|
-
return
|
|
1143
|
+
var D, L;
|
|
1144
|
+
return D = this.document(), L = new p(D, s, c, f), D.children.length === 0 ? D.children.unshift(L) : D.children[0].type === a.Declaration ? D.children[0] = L : D.children.unshift(L), D.root() || D;
|
|
1145
1145
|
}, E.prototype.dtd = function(s, c) {
|
|
1146
|
-
var f,
|
|
1147
|
-
for (
|
|
1146
|
+
var f, D, L, v, r, N, A, _, C, F;
|
|
1147
|
+
for (D = this.document(), L = new t(D, s, c), C = D.children, v = r = 0, A = C.length; r < A; v = ++r)
|
|
1148
1148
|
if (f = C[v], f.type === a.DocType)
|
|
1149
|
-
return
|
|
1150
|
-
for (
|
|
1151
|
-
if (f =
|
|
1152
|
-
return
|
|
1153
|
-
return
|
|
1149
|
+
return D.children[v] = L, L;
|
|
1150
|
+
for (F = D.children, v = N = 0, _ = F.length; N < _; v = ++N)
|
|
1151
|
+
if (f = F[v], f.isRoot)
|
|
1152
|
+
return D.children.splice(v, 0, L), L;
|
|
1153
|
+
return D.children.push(L), L;
|
|
1154
1154
|
}, E.prototype.up = function() {
|
|
1155
1155
|
if (this.isRoot)
|
|
1156
1156
|
throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
|
|
@@ -1241,7 +1241,7 @@ function W() {
|
|
|
1241
1241
|
return this.attribs.length !== 0;
|
|
1242
1242
|
}, E.prototype.compareDocumentPosition = function(s) {
|
|
1243
1243
|
var c, f;
|
|
1244
|
-
return c = this, c === s ? 0 : this.document() !== s.document() ? (f =
|
|
1244
|
+
return c = this, c === s ? 0 : this.document() !== s.document() ? (f = n.Disconnected | n.ImplementationSpecific, Math.random() < 0.5 ? f |= n.Preceding : f |= n.Following, f) : c.isAncestor(s) ? n.Contains | n.Preceding : c.isDescendant(s) ? n.Contains | n.Following : c.isPreceding(s) ? n.Preceding : n.Following;
|
|
1245
1245
|
}, E.prototype.isSameNode = function(s) {
|
|
1246
1246
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1247
1247
|
}, E.prototype.lookupPrefix = function(s) {
|
|
@@ -1251,10 +1251,10 @@ function W() {
|
|
|
1251
1251
|
}, E.prototype.lookupNamespaceURI = function(s) {
|
|
1252
1252
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1253
1253
|
}, E.prototype.isEqualNode = function(s) {
|
|
1254
|
-
var c, f,
|
|
1254
|
+
var c, f, D;
|
|
1255
1255
|
if (s.nodeType !== this.nodeType || s.children.length !== this.children.length)
|
|
1256
1256
|
return !1;
|
|
1257
|
-
for (c = f = 0,
|
|
1257
|
+
for (c = f = 0, D = this.children.length - 1; 0 <= D ? f <= D : f >= D; c = 0 <= D ? ++f : --f)
|
|
1258
1258
|
if (!this.children[c].isEqualNode(s.children[c]))
|
|
1259
1259
|
return !1;
|
|
1260
1260
|
return !0;
|
|
@@ -1267,9 +1267,9 @@ function W() {
|
|
|
1267
1267
|
}, E.prototype.contains = function(s) {
|
|
1268
1268
|
return s ? s === this || this.isDescendant(s) : !1;
|
|
1269
1269
|
}, E.prototype.isDescendant = function(s) {
|
|
1270
|
-
var c, f,
|
|
1271
|
-
for (v = this.children,
|
|
1272
|
-
if (c = v[
|
|
1270
|
+
var c, f, D, L, v;
|
|
1271
|
+
for (v = this.children, D = 0, L = v.length; D < L; D++)
|
|
1272
|
+
if (c = v[D], s === c || (f = c.isDescendant(s), f))
|
|
1273
1273
|
return !0;
|
|
1274
1274
|
return !1;
|
|
1275
1275
|
}, E.prototype.isAncestor = function(s) {
|
|
@@ -1282,163 +1282,163 @@ function W() {
|
|
|
1282
1282
|
return c = this.treePosition(s), f = this.treePosition(this), c === -1 || f === -1 ? !1 : c > f;
|
|
1283
1283
|
}, E.prototype.treePosition = function(s) {
|
|
1284
1284
|
var c, f;
|
|
1285
|
-
return f = 0, c = !1, this.foreachTreeNode(this.document(), function(
|
|
1286
|
-
if (f++, !c &&
|
|
1285
|
+
return f = 0, c = !1, this.foreachTreeNode(this.document(), function(D) {
|
|
1286
|
+
if (f++, !c && D === s)
|
|
1287
1287
|
return c = !0;
|
|
1288
1288
|
}), c ? f : -1;
|
|
1289
1289
|
}, E.prototype.foreachTreeNode = function(s, c) {
|
|
1290
|
-
var f,
|
|
1291
|
-
for (s || (s = this.document()), v = s.children,
|
|
1292
|
-
if (f = v[
|
|
1290
|
+
var f, D, L, v, r;
|
|
1291
|
+
for (s || (s = this.document()), v = s.children, D = 0, L = v.length; D < L; D++) {
|
|
1292
|
+
if (f = v[D], r = c(f))
|
|
1293
1293
|
return r;
|
|
1294
1294
|
if (r = this.foreachTreeNode(f, c), r)
|
|
1295
1295
|
return r;
|
|
1296
1296
|
}
|
|
1297
1297
|
}, E;
|
|
1298
1298
|
}();
|
|
1299
|
-
}).call(
|
|
1299
|
+
}).call(Ur)), ft.exports;
|
|
1300
1300
|
}
|
|
1301
|
-
var Mt = { exports: {} },
|
|
1301
|
+
var Mt = { exports: {} }, Vr = Mt.exports, Re;
|
|
1302
1302
|
function rr() {
|
|
1303
|
-
return
|
|
1304
|
-
var
|
|
1303
|
+
return Re || (Re = 1, (function() {
|
|
1304
|
+
var n = function(g, h) {
|
|
1305
1305
|
return function() {
|
|
1306
|
-
return
|
|
1306
|
+
return g.apply(h, arguments);
|
|
1307
1307
|
};
|
|
1308
1308
|
}, a = {}.hasOwnProperty;
|
|
1309
1309
|
Mt.exports = function() {
|
|
1310
|
-
function
|
|
1311
|
-
this.assertLegalName =
|
|
1312
|
-
var
|
|
1313
|
-
|
|
1314
|
-
for (
|
|
1315
|
-
a.call(t,
|
|
1316
|
-
}
|
|
1317
|
-
return
|
|
1318
|
-
return this.options.noValidation ?
|
|
1319
|
-
},
|
|
1320
|
-
return this.options.noValidation ?
|
|
1321
|
-
},
|
|
1322
|
-
return this.options.noValidation ?
|
|
1323
|
-
},
|
|
1310
|
+
function g(h) {
|
|
1311
|
+
this.assertLegalName = n(this.assertLegalName, this), this.assertLegalChar = n(this.assertLegalChar, this);
|
|
1312
|
+
var p, t, e;
|
|
1313
|
+
h || (h = {}), this.options = h, this.options.version || (this.options.version = "1.0"), t = h.stringify || {};
|
|
1314
|
+
for (p in t)
|
|
1315
|
+
a.call(t, p) && (e = t[p], this[p] = e);
|
|
1316
|
+
}
|
|
1317
|
+
return g.prototype.name = function(h) {
|
|
1318
|
+
return this.options.noValidation ? h : this.assertLegalName("" + h || "");
|
|
1319
|
+
}, g.prototype.text = function(h) {
|
|
1320
|
+
return this.options.noValidation ? h : this.assertLegalChar(this.textEscape("" + h || ""));
|
|
1321
|
+
}, g.prototype.cdata = function(h) {
|
|
1322
|
+
return this.options.noValidation ? h : (h = "" + h || "", h = h.replace("]]>", "]]]]><![CDATA[>"), this.assertLegalChar(h));
|
|
1323
|
+
}, g.prototype.comment = function(h) {
|
|
1324
1324
|
if (this.options.noValidation)
|
|
1325
|
-
return
|
|
1326
|
-
if (
|
|
1327
|
-
throw new Error("Comment text cannot contain double-hypen: " +
|
|
1328
|
-
return this.assertLegalChar(
|
|
1329
|
-
},
|
|
1330
|
-
return this.options.noValidation ?
|
|
1331
|
-
},
|
|
1332
|
-
return this.options.noValidation ?
|
|
1333
|
-
},
|
|
1334
|
-
return this.options.noValidation ?
|
|
1335
|
-
},
|
|
1325
|
+
return h;
|
|
1326
|
+
if (h = "" + h || "", h.match(/--/))
|
|
1327
|
+
throw new Error("Comment text cannot contain double-hypen: " + h);
|
|
1328
|
+
return this.assertLegalChar(h);
|
|
1329
|
+
}, g.prototype.raw = function(h) {
|
|
1330
|
+
return this.options.noValidation ? h : "" + h || "";
|
|
1331
|
+
}, g.prototype.attValue = function(h) {
|
|
1332
|
+
return this.options.noValidation ? h : this.assertLegalChar(this.attEscape(h = "" + h || ""));
|
|
1333
|
+
}, g.prototype.insTarget = function(h) {
|
|
1334
|
+
return this.options.noValidation ? h : this.assertLegalChar("" + h || "");
|
|
1335
|
+
}, g.prototype.insValue = function(h) {
|
|
1336
1336
|
if (this.options.noValidation)
|
|
1337
|
-
return
|
|
1338
|
-
if (
|
|
1339
|
-
throw new Error("Invalid processing instruction value: " +
|
|
1340
|
-
return this.assertLegalChar(
|
|
1341
|
-
},
|
|
1337
|
+
return h;
|
|
1338
|
+
if (h = "" + h || "", h.match(/\?>/))
|
|
1339
|
+
throw new Error("Invalid processing instruction value: " + h);
|
|
1340
|
+
return this.assertLegalChar(h);
|
|
1341
|
+
}, g.prototype.xmlVersion = function(h) {
|
|
1342
1342
|
if (this.options.noValidation)
|
|
1343
|
-
return
|
|
1344
|
-
if (
|
|
1345
|
-
throw new Error("Invalid version number: " +
|
|
1346
|
-
return
|
|
1347
|
-
},
|
|
1343
|
+
return h;
|
|
1344
|
+
if (h = "" + h || "", !h.match(/1\.[0-9]+/))
|
|
1345
|
+
throw new Error("Invalid version number: " + h);
|
|
1346
|
+
return h;
|
|
1347
|
+
}, g.prototype.xmlEncoding = function(h) {
|
|
1348
1348
|
if (this.options.noValidation)
|
|
1349
|
-
return
|
|
1350
|
-
if (
|
|
1351
|
-
throw new Error("Invalid encoding: " +
|
|
1352
|
-
return this.assertLegalChar(
|
|
1353
|
-
},
|
|
1354
|
-
return this.options.noValidation ?
|
|
1355
|
-
},
|
|
1356
|
-
return this.options.noValidation ?
|
|
1357
|
-
},
|
|
1358
|
-
return this.options.noValidation ?
|
|
1359
|
-
},
|
|
1360
|
-
return this.options.noValidation ?
|
|
1361
|
-
},
|
|
1362
|
-
return this.options.noValidation ?
|
|
1363
|
-
},
|
|
1364
|
-
return this.options.noValidation ?
|
|
1365
|
-
},
|
|
1366
|
-
return this.options.noValidation ?
|
|
1367
|
-
},
|
|
1368
|
-
return this.options.noValidation ?
|
|
1369
|
-
},
|
|
1370
|
-
var
|
|
1349
|
+
return h;
|
|
1350
|
+
if (h = "" + h || "", !h.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))
|
|
1351
|
+
throw new Error("Invalid encoding: " + h);
|
|
1352
|
+
return this.assertLegalChar(h);
|
|
1353
|
+
}, g.prototype.xmlStandalone = function(h) {
|
|
1354
|
+
return this.options.noValidation ? h : h ? "yes" : "no";
|
|
1355
|
+
}, g.prototype.dtdPubID = function(h) {
|
|
1356
|
+
return this.options.noValidation ? h : this.assertLegalChar("" + h || "");
|
|
1357
|
+
}, g.prototype.dtdSysID = function(h) {
|
|
1358
|
+
return this.options.noValidation ? h : this.assertLegalChar("" + h || "");
|
|
1359
|
+
}, g.prototype.dtdElementValue = function(h) {
|
|
1360
|
+
return this.options.noValidation ? h : this.assertLegalChar("" + h || "");
|
|
1361
|
+
}, g.prototype.dtdAttType = function(h) {
|
|
1362
|
+
return this.options.noValidation ? h : this.assertLegalChar("" + h || "");
|
|
1363
|
+
}, g.prototype.dtdAttDefault = function(h) {
|
|
1364
|
+
return this.options.noValidation ? h : this.assertLegalChar("" + h || "");
|
|
1365
|
+
}, g.prototype.dtdEntityValue = function(h) {
|
|
1366
|
+
return this.options.noValidation ? h : this.assertLegalChar("" + h || "");
|
|
1367
|
+
}, g.prototype.dtdNData = function(h) {
|
|
1368
|
+
return this.options.noValidation ? h : this.assertLegalChar("" + h || "");
|
|
1369
|
+
}, g.prototype.convertAttKey = "@", g.prototype.convertPIKey = "?", g.prototype.convertTextKey = "#text", g.prototype.convertCDataKey = "#cdata", g.prototype.convertCommentKey = "#comment", g.prototype.convertRawKey = "#raw", g.prototype.assertLegalChar = function(h) {
|
|
1370
|
+
var p, t;
|
|
1371
1371
|
if (this.options.noValidation)
|
|
1372
|
-
return
|
|
1373
|
-
if (
|
|
1374
|
-
if (
|
|
1375
|
-
throw new Error("Invalid character in string: " +
|
|
1376
|
-
} else if (this.options.version === "1.1" && (
|
|
1377
|
-
throw new Error("Invalid character in string: " +
|
|
1378
|
-
return
|
|
1379
|
-
},
|
|
1380
|
-
var
|
|
1372
|
+
return h;
|
|
1373
|
+
if (p = "", this.options.version === "1.0") {
|
|
1374
|
+
if (p = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, t = h.match(p))
|
|
1375
|
+
throw new Error("Invalid character in string: " + h + " at index " + t.index);
|
|
1376
|
+
} else if (this.options.version === "1.1" && (p = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, t = h.match(p)))
|
|
1377
|
+
throw new Error("Invalid character in string: " + h + " at index " + t.index);
|
|
1378
|
+
return h;
|
|
1379
|
+
}, g.prototype.assertLegalName = function(h) {
|
|
1380
|
+
var p;
|
|
1381
1381
|
if (this.options.noValidation)
|
|
1382
|
-
return
|
|
1383
|
-
if (this.assertLegalChar(
|
|
1382
|
+
return h;
|
|
1383
|
+
if (this.assertLegalChar(h), p = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/, !h.match(p))
|
|
1384
1384
|
throw new Error("Invalid character in name");
|
|
1385
|
-
return
|
|
1386
|
-
},
|
|
1387
|
-
var
|
|
1388
|
-
return this.options.noValidation ?
|
|
1389
|
-
},
|
|
1390
|
-
var
|
|
1391
|
-
return this.options.noValidation ?
|
|
1392
|
-
},
|
|
1385
|
+
return h;
|
|
1386
|
+
}, g.prototype.textEscape = function(h) {
|
|
1387
|
+
var p;
|
|
1388
|
+
return this.options.noValidation ? h : (p = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g, h.replace(p, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\r/g, "
"));
|
|
1389
|
+
}, g.prototype.attEscape = function(h) {
|
|
1390
|
+
var p;
|
|
1391
|
+
return this.options.noValidation ? h : (p = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g, h.replace(p, "&").replace(/</g, "<").replace(/"/g, """).replace(/\t/g, "	").replace(/\n/g, "
").replace(/\r/g, "
"));
|
|
1392
|
+
}, g;
|
|
1393
1393
|
}();
|
|
1394
|
-
}).call(
|
|
1394
|
+
}).call(Vr)), Mt.exports;
|
|
1395
1395
|
}
|
|
1396
|
-
var
|
|
1397
|
-
function
|
|
1398
|
-
return
|
|
1399
|
-
|
|
1396
|
+
var _t = { exports: {} }, Ct = { exports: {} }, St = { exports: {} }, kr = St.exports, je;
|
|
1397
|
+
function Bt() {
|
|
1398
|
+
return je || (je = 1, (function() {
|
|
1399
|
+
St.exports = {
|
|
1400
1400
|
None: 0,
|
|
1401
1401
|
OpenTag: 1,
|
|
1402
1402
|
InsideTag: 2,
|
|
1403
1403
|
CloseTag: 3
|
|
1404
1404
|
};
|
|
1405
|
-
}).call(
|
|
1405
|
+
}).call(kr)), St.exports;
|
|
1406
1406
|
}
|
|
1407
|
-
var
|
|
1407
|
+
var $r = Ct.exports, Be;
|
|
1408
1408
|
function nr() {
|
|
1409
|
-
return
|
|
1410
|
-
var
|
|
1411
|
-
|
|
1412
|
-
function
|
|
1409
|
+
return Be || (Be = 1, (function() {
|
|
1410
|
+
var n, a, g, h = {}.hasOwnProperty;
|
|
1411
|
+
g = H().assign, n = B(), Qt(), re(), zt(), Ht(), Kt(), ne(), ie(), oe(), er(), Zt(), te(), Jt(), ee(), a = Bt(), Ct.exports = function() {
|
|
1412
|
+
function p(t) {
|
|
1413
1413
|
var e, o, l;
|
|
1414
1414
|
t || (t = {}), this.options = t, o = t.writer || {};
|
|
1415
1415
|
for (e in o)
|
|
1416
|
-
|
|
1416
|
+
h.call(o, e) && (l = o[e], this["_" + e] = this[e], this[e] = l);
|
|
1417
1417
|
}
|
|
1418
|
-
return
|
|
1419
|
-
var e, o, l, b, m, y, d,
|
|
1420
|
-
return t || (t = {}), t =
|
|
1418
|
+
return p.prototype.filterOptions = function(t) {
|
|
1419
|
+
var e, o, l, b, m, y, d, w;
|
|
1420
|
+
return t || (t = {}), t = g({}, this.options, t), e = {
|
|
1421
1421
|
writer: this
|
|
1422
1422
|
}, e.pretty = t.pretty || !1, e.allowEmpty = t.allowEmpty || !1, e.indent = (o = t.indent) != null ? o : " ", e.newline = (l = t.newline) != null ? l : `
|
|
1423
|
-
`, e.offset = (b = t.offset) != null ? b : 0, e.dontPrettyTextNodes = (m = (y = t.dontPrettyTextNodes) != null ? y : t.dontprettytextnodes) != null ? m : 0, e.spaceBeforeSlash = (d = (
|
|
1424
|
-
},
|
|
1423
|
+
`, e.offset = (b = t.offset) != null ? b : 0, e.dontPrettyTextNodes = (m = (y = t.dontPrettyTextNodes) != null ? y : t.dontprettytextnodes) != null ? m : 0, e.spaceBeforeSlash = (d = (w = t.spaceBeforeSlash) != null ? w : t.spacebeforeslash) != null ? d : "", e.spaceBeforeSlash === !0 && (e.spaceBeforeSlash = " "), e.suppressPrettyCount = 0, e.user = {}, e.state = a.None, e;
|
|
1424
|
+
}, p.prototype.indent = function(t, e, o) {
|
|
1425
1425
|
var l;
|
|
1426
1426
|
return !e.pretty || e.suppressPrettyCount ? "" : e.pretty && (l = (o || 0) + e.offset + 1, l > 0) ? new Array(l).join(e.indent) : "";
|
|
1427
|
-
},
|
|
1427
|
+
}, p.prototype.endline = function(t, e, o) {
|
|
1428
1428
|
return !e.pretty || e.suppressPrettyCount ? "" : e.newline;
|
|
1429
|
-
},
|
|
1429
|
+
}, p.prototype.attribute = function(t, e, o) {
|
|
1430
1430
|
var l;
|
|
1431
1431
|
return this.openAttribute(t, e, o), l = " " + t.name + '="' + t.value + '"', this.closeAttribute(t, e, o), l;
|
|
1432
|
-
},
|
|
1432
|
+
}, p.prototype.cdata = function(t, e, o) {
|
|
1433
1433
|
var l;
|
|
1434
1434
|
return this.openNode(t, e, o), e.state = a.OpenTag, l = this.indent(t, e, o) + "<![CDATA[", e.state = a.InsideTag, l += t.value, e.state = a.CloseTag, l += "]]>" + this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), l;
|
|
1435
|
-
},
|
|
1435
|
+
}, p.prototype.comment = function(t, e, o) {
|
|
1436
1436
|
var l;
|
|
1437
1437
|
return this.openNode(t, e, o), e.state = a.OpenTag, l = this.indent(t, e, o) + "<!-- ", e.state = a.InsideTag, l += t.value, e.state = a.CloseTag, l += " -->" + this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), l;
|
|
1438
|
-
},
|
|
1438
|
+
}, p.prototype.declaration = function(t, e, o) {
|
|
1439
1439
|
var l;
|
|
1440
1440
|
return this.openNode(t, e, o), e.state = a.OpenTag, l = this.indent(t, e, o) + "<?xml", e.state = a.InsideTag, l += ' version="' + t.version + '"', t.encoding != null && (l += ' encoding="' + t.encoding + '"'), t.standalone != null && (l += ' standalone="' + t.standalone + '"'), e.state = a.CloseTag, l += e.spaceBeforeSlash + "?>", l += this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), l;
|
|
1441
|
-
},
|
|
1441
|
+
}, p.prototype.docType = function(t, e, o) {
|
|
1442
1442
|
var l, b, m, y, d;
|
|
1443
1443
|
if (o || (o = 0), this.openNode(t, e, o), e.state = a.OpenTag, y = this.indent(t, e, o), y += "<!DOCTYPE " + t.root().name, t.pubID && t.sysID ? y += ' PUBLIC "' + t.pubID + '" "' + t.sysID + '"' : t.sysID && (y += ' SYSTEM "' + t.sysID + '"'), t.children.length > 0) {
|
|
1444
1444
|
for (y += " [", y += this.endline(t, e, o), e.state = a.InsideTag, d = t.children, b = 0, m = d.length; b < m; b++)
|
|
@@ -1446,119 +1446,119 @@ function nr() {
|
|
|
1446
1446
|
e.state = a.CloseTag, y += "]";
|
|
1447
1447
|
}
|
|
1448
1448
|
return e.state = a.CloseTag, y += e.spaceBeforeSlash + ">", y += this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), y;
|
|
1449
|
-
},
|
|
1450
|
-
var l, b, m, y, d,
|
|
1451
|
-
o || (o = 0),
|
|
1449
|
+
}, p.prototype.element = function(t, e, o) {
|
|
1450
|
+
var l, b, m, y, d, w, O, I, x, M, E, s, c, f;
|
|
1451
|
+
o || (o = 0), M = !1, E = "", this.openNode(t, e, o), e.state = a.OpenTag, E += this.indent(t, e, o) + "<" + t.name, s = t.attribs;
|
|
1452
1452
|
for (x in s)
|
|
1453
|
-
|
|
1454
|
-
if (m = t.children.length, y = m === 0 ? null : t.children[0], m === 0 || t.children.every(function(
|
|
1455
|
-
return (
|
|
1453
|
+
h.call(s, x) && (l = s[x], E += this.attribute(l, e, o));
|
|
1454
|
+
if (m = t.children.length, y = m === 0 ? null : t.children[0], m === 0 || t.children.every(function(D) {
|
|
1455
|
+
return (D.type === n.Text || D.type === n.Raw) && D.value === "";
|
|
1456
1456
|
}))
|
|
1457
1457
|
e.allowEmpty ? (E += ">", e.state = a.CloseTag, E += "</" + t.name + ">" + this.endline(t, e, o)) : (e.state = a.CloseTag, E += e.spaceBeforeSlash + "/>" + this.endline(t, e, o));
|
|
1458
|
-
else if (e.pretty && m === 1 && (y.type ===
|
|
1459
|
-
E += ">", e.state = a.InsideTag, e.suppressPrettyCount++,
|
|
1458
|
+
else if (e.pretty && m === 1 && (y.type === n.Text || y.type === n.Raw) && y.value != null)
|
|
1459
|
+
E += ">", e.state = a.InsideTag, e.suppressPrettyCount++, M = !0, E += this.writeChildNode(y, e, o + 1), e.suppressPrettyCount--, M = !1, e.state = a.CloseTag, E += "</" + t.name + ">" + this.endline(t, e, o);
|
|
1460
1460
|
else {
|
|
1461
1461
|
if (e.dontPrettyTextNodes) {
|
|
1462
1462
|
for (c = t.children, d = 0, O = c.length; d < O; d++)
|
|
1463
|
-
if (b = c[d], (b.type ===
|
|
1464
|
-
e.suppressPrettyCount++,
|
|
1463
|
+
if (b = c[d], (b.type === n.Text || b.type === n.Raw) && b.value != null) {
|
|
1464
|
+
e.suppressPrettyCount++, M = !0;
|
|
1465
1465
|
break;
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
|
-
for (E += ">" + this.endline(t, e, o), e.state = a.InsideTag, f = t.children,
|
|
1469
|
-
b = f[
|
|
1470
|
-
e.state = a.CloseTag, E += this.indent(t, e, o) + "</" + t.name + ">",
|
|
1468
|
+
for (E += ">" + this.endline(t, e, o), e.state = a.InsideTag, f = t.children, w = 0, I = f.length; w < I; w++)
|
|
1469
|
+
b = f[w], E += this.writeChildNode(b, e, o + 1);
|
|
1470
|
+
e.state = a.CloseTag, E += this.indent(t, e, o) + "</" + t.name + ">", M && e.suppressPrettyCount--, E += this.endline(t, e, o), e.state = a.None;
|
|
1471
1471
|
}
|
|
1472
1472
|
return this.closeNode(t, e, o), E;
|
|
1473
|
-
},
|
|
1473
|
+
}, p.prototype.writeChildNode = function(t, e, o) {
|
|
1474
1474
|
switch (t.type) {
|
|
1475
|
-
case
|
|
1475
|
+
case n.CData:
|
|
1476
1476
|
return this.cdata(t, e, o);
|
|
1477
|
-
case
|
|
1477
|
+
case n.Comment:
|
|
1478
1478
|
return this.comment(t, e, o);
|
|
1479
|
-
case
|
|
1479
|
+
case n.Element:
|
|
1480
1480
|
return this.element(t, e, o);
|
|
1481
|
-
case
|
|
1481
|
+
case n.Raw:
|
|
1482
1482
|
return this.raw(t, e, o);
|
|
1483
|
-
case
|
|
1483
|
+
case n.Text:
|
|
1484
1484
|
return this.text(t, e, o);
|
|
1485
|
-
case
|
|
1485
|
+
case n.ProcessingInstruction:
|
|
1486
1486
|
return this.processingInstruction(t, e, o);
|
|
1487
|
-
case
|
|
1487
|
+
case n.Dummy:
|
|
1488
1488
|
return "";
|
|
1489
|
-
case
|
|
1489
|
+
case n.Declaration:
|
|
1490
1490
|
return this.declaration(t, e, o);
|
|
1491
|
-
case
|
|
1491
|
+
case n.DocType:
|
|
1492
1492
|
return this.docType(t, e, o);
|
|
1493
|
-
case
|
|
1493
|
+
case n.AttributeDeclaration:
|
|
1494
1494
|
return this.dtdAttList(t, e, o);
|
|
1495
|
-
case
|
|
1495
|
+
case n.ElementDeclaration:
|
|
1496
1496
|
return this.dtdElement(t, e, o);
|
|
1497
|
-
case
|
|
1497
|
+
case n.EntityDeclaration:
|
|
1498
1498
|
return this.dtdEntity(t, e, o);
|
|
1499
|
-
case
|
|
1499
|
+
case n.NotationDeclaration:
|
|
1500
1500
|
return this.dtdNotation(t, e, o);
|
|
1501
1501
|
default:
|
|
1502
1502
|
throw new Error("Unknown XML node type: " + t.constructor.name);
|
|
1503
1503
|
}
|
|
1504
|
-
},
|
|
1504
|
+
}, p.prototype.processingInstruction = function(t, e, o) {
|
|
1505
1505
|
var l;
|
|
1506
1506
|
return this.openNode(t, e, o), e.state = a.OpenTag, l = this.indent(t, e, o) + "<?", e.state = a.InsideTag, l += t.target, t.value && (l += " " + t.value), e.state = a.CloseTag, l += e.spaceBeforeSlash + "?>", l += this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), l;
|
|
1507
|
-
},
|
|
1507
|
+
}, p.prototype.raw = function(t, e, o) {
|
|
1508
1508
|
var l;
|
|
1509
1509
|
return this.openNode(t, e, o), e.state = a.OpenTag, l = this.indent(t, e, o), e.state = a.InsideTag, l += t.value, e.state = a.CloseTag, l += this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), l;
|
|
1510
|
-
},
|
|
1510
|
+
}, p.prototype.text = function(t, e, o) {
|
|
1511
1511
|
var l;
|
|
1512
1512
|
return this.openNode(t, e, o), e.state = a.OpenTag, l = this.indent(t, e, o), e.state = a.InsideTag, l += t.value, e.state = a.CloseTag, l += this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), l;
|
|
1513
|
-
},
|
|
1513
|
+
}, p.prototype.dtdAttList = function(t, e, o) {
|
|
1514
1514
|
var l;
|
|
1515
1515
|
return this.openNode(t, e, o), e.state = a.OpenTag, l = this.indent(t, e, o) + "<!ATTLIST", e.state = a.InsideTag, l += " " + t.elementName + " " + t.attributeName + " " + t.attributeType, t.defaultValueType !== "#DEFAULT" && (l += " " + t.defaultValueType), t.defaultValue && (l += ' "' + t.defaultValue + '"'), e.state = a.CloseTag, l += e.spaceBeforeSlash + ">" + this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), l;
|
|
1516
|
-
},
|
|
1516
|
+
}, p.prototype.dtdElement = function(t, e, o) {
|
|
1517
1517
|
var l;
|
|
1518
1518
|
return this.openNode(t, e, o), e.state = a.OpenTag, l = this.indent(t, e, o) + "<!ELEMENT", e.state = a.InsideTag, l += " " + t.name + " " + t.value, e.state = a.CloseTag, l += e.spaceBeforeSlash + ">" + this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), l;
|
|
1519
|
-
},
|
|
1519
|
+
}, p.prototype.dtdEntity = function(t, e, o) {
|
|
1520
1520
|
var l;
|
|
1521
1521
|
return this.openNode(t, e, o), e.state = a.OpenTag, l = this.indent(t, e, o) + "<!ENTITY", e.state = a.InsideTag, t.pe && (l += " %"), l += " " + t.name, t.value ? l += ' "' + t.value + '"' : (t.pubID && t.sysID ? l += ' PUBLIC "' + t.pubID + '" "' + t.sysID + '"' : t.sysID && (l += ' SYSTEM "' + t.sysID + '"'), t.nData && (l += " NDATA " + t.nData)), e.state = a.CloseTag, l += e.spaceBeforeSlash + ">" + this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), l;
|
|
1522
|
-
},
|
|
1522
|
+
}, p.prototype.dtdNotation = function(t, e, o) {
|
|
1523
1523
|
var l;
|
|
1524
1524
|
return this.openNode(t, e, o), e.state = a.OpenTag, l = this.indent(t, e, o) + "<!NOTATION", e.state = a.InsideTag, l += " " + t.name, t.pubID && t.sysID ? l += ' PUBLIC "' + t.pubID + '" "' + t.sysID + '"' : t.pubID ? l += ' PUBLIC "' + t.pubID + '"' : t.sysID && (l += ' SYSTEM "' + t.sysID + '"'), e.state = a.CloseTag, l += e.spaceBeforeSlash + ">" + this.endline(t, e, o), e.state = a.None, this.closeNode(t, e, o), l;
|
|
1525
|
-
},
|
|
1526
|
-
},
|
|
1527
|
-
},
|
|
1528
|
-
},
|
|
1529
|
-
},
|
|
1525
|
+
}, p.prototype.openNode = function(t, e, o) {
|
|
1526
|
+
}, p.prototype.closeNode = function(t, e, o) {
|
|
1527
|
+
}, p.prototype.openAttribute = function(t, e, o) {
|
|
1528
|
+
}, p.prototype.closeAttribute = function(t, e, o) {
|
|
1529
|
+
}, p;
|
|
1530
1530
|
}();
|
|
1531
|
-
}).call(
|
|
1531
|
+
}).call($r)), Ct.exports;
|
|
1532
1532
|
}
|
|
1533
|
-
var
|
|
1534
|
-
function
|
|
1535
|
-
return
|
|
1536
|
-
var
|
|
1537
|
-
for (var t in
|
|
1538
|
-
|
|
1533
|
+
var Gr = _t.exports, qe;
|
|
1534
|
+
function se() {
|
|
1535
|
+
return qe || (qe = 1, (function() {
|
|
1536
|
+
var n, a = function(h, p) {
|
|
1537
|
+
for (var t in p)
|
|
1538
|
+
g.call(p, t) && (h[t] = p[t]);
|
|
1539
1539
|
function e() {
|
|
1540
|
-
this.constructor =
|
|
1540
|
+
this.constructor = h;
|
|
1541
1541
|
}
|
|
1542
|
-
return e.prototype =
|
|
1543
|
-
},
|
|
1544
|
-
|
|
1545
|
-
a(
|
|
1546
|
-
function
|
|
1547
|
-
|
|
1542
|
+
return e.prototype = p.prototype, h.prototype = new e(), h.__super__ = p.prototype, h;
|
|
1543
|
+
}, g = {}.hasOwnProperty;
|
|
1544
|
+
n = nr(), _t.exports = function(h) {
|
|
1545
|
+
a(p, h);
|
|
1546
|
+
function p(t) {
|
|
1547
|
+
p.__super__.constructor.call(this, t);
|
|
1548
1548
|
}
|
|
1549
|
-
return
|
|
1549
|
+
return p.prototype.document = function(t, e) {
|
|
1550
1550
|
var o, l, b, m, y;
|
|
1551
1551
|
for (e = this.filterOptions(e), m = "", y = t.children, l = 0, b = y.length; l < b; l++)
|
|
1552
1552
|
o = y[l], m += this.writeChildNode(o, e, 0);
|
|
1553
1553
|
return e.pretty && m.slice(-e.newline.length) === e.newline && (m = m.slice(0, -e.newline.length)), m;
|
|
1554
|
-
},
|
|
1555
|
-
}(
|
|
1556
|
-
}).call(
|
|
1554
|
+
}, p;
|
|
1555
|
+
}(n);
|
|
1556
|
+
}).call(Gr)), _t.exports;
|
|
1557
1557
|
}
|
|
1558
|
-
var
|
|
1558
|
+
var Wr = ut.exports, Ue;
|
|
1559
1559
|
function ir() {
|
|
1560
|
-
return
|
|
1561
|
-
var
|
|
1560
|
+
return Ue || (Ue = 1, (function() {
|
|
1561
|
+
var n, a, g, h, p, t, e, o = function(b, m) {
|
|
1562
1562
|
for (var y in m)
|
|
1563
1563
|
l.call(m, y) && (b[y] = m[y]);
|
|
1564
1564
|
function d() {
|
|
@@ -1566,18 +1566,18 @@ function ir() {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
return d.prototype = m.prototype, b.prototype = new d(), b.__super__ = m.prototype, b;
|
|
1568
1568
|
}, l = {}.hasOwnProperty;
|
|
1569
|
-
e = H().isPlainObject,
|
|
1569
|
+
e = H().isPlainObject, g = Je(), a = Tr(), h = G(), n = B(), t = rr(), p = se(), ut.exports = function(b) {
|
|
1570
1570
|
o(m, b);
|
|
1571
1571
|
function m(y) {
|
|
1572
|
-
m.__super__.constructor.call(this, null), this.name = "#document", this.type =
|
|
1572
|
+
m.__super__.constructor.call(this, null), this.name = "#document", this.type = n.Document, this.documentURI = null, this.domConfig = new a(), y || (y = {}), y.writer || (y.writer = new p()), this.options = y, this.stringify = new t(y);
|
|
1573
1573
|
}
|
|
1574
1574
|
return Object.defineProperty(m.prototype, "implementation", {
|
|
1575
|
-
value: new
|
|
1575
|
+
value: new g()
|
|
1576
1576
|
}), Object.defineProperty(m.prototype, "doctype", {
|
|
1577
1577
|
get: function() {
|
|
1578
|
-
var y, d,
|
|
1579
|
-
for (O = this.children, d = 0,
|
|
1580
|
-
if (y = O[d], y.type ===
|
|
1578
|
+
var y, d, w, O;
|
|
1579
|
+
for (O = this.children, d = 0, w = O.length; d < w; d++)
|
|
1580
|
+
if (y = O[d], y.type === n.DocType)
|
|
1581
1581
|
return y;
|
|
1582
1582
|
return null;
|
|
1583
1583
|
}
|
|
@@ -1595,15 +1595,15 @@ function ir() {
|
|
|
1595
1595
|
}
|
|
1596
1596
|
}), Object.defineProperty(m.prototype, "xmlEncoding", {
|
|
1597
1597
|
get: function() {
|
|
1598
|
-
return this.children.length !== 0 && this.children[0].type ===
|
|
1598
|
+
return this.children.length !== 0 && this.children[0].type === n.Declaration ? this.children[0].encoding : null;
|
|
1599
1599
|
}
|
|
1600
1600
|
}), Object.defineProperty(m.prototype, "xmlStandalone", {
|
|
1601
1601
|
get: function() {
|
|
1602
|
-
return this.children.length !== 0 && this.children[0].type ===
|
|
1602
|
+
return this.children.length !== 0 && this.children[0].type === n.Declaration ? this.children[0].standalone === "yes" : !1;
|
|
1603
1603
|
}
|
|
1604
1604
|
}), Object.defineProperty(m.prototype, "xmlVersion", {
|
|
1605
1605
|
get: function() {
|
|
1606
|
-
return this.children.length !== 0 && this.children[0].type ===
|
|
1606
|
+
return this.children.length !== 0 && this.children[0].type === n.Declaration ? this.children[0].version : "1.0";
|
|
1607
1607
|
}
|
|
1608
1608
|
}), Object.defineProperty(m.prototype, "URL", {
|
|
1609
1609
|
get: function() {
|
|
@@ -1662,7 +1662,7 @@ function ir() {
|
|
|
1662
1662
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1663
1663
|
}, m.prototype.normalizeDocument = function() {
|
|
1664
1664
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1665
|
-
}, m.prototype.renameNode = function(y, d,
|
|
1665
|
+
}, m.prototype.renameNode = function(y, d, w) {
|
|
1666
1666
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1667
1667
|
}, m.prototype.getElementsByClassName = function(y) {
|
|
1668
1668
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
@@ -1670,57 +1670,57 @@ function ir() {
|
|
|
1670
1670
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1671
1671
|
}, m.prototype.createRange = function() {
|
|
1672
1672
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1673
|
-
}, m.prototype.createNodeIterator = function(y, d,
|
|
1673
|
+
}, m.prototype.createNodeIterator = function(y, d, w) {
|
|
1674
1674
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1675
|
-
}, m.prototype.createTreeWalker = function(y, d,
|
|
1675
|
+
}, m.prototype.createTreeWalker = function(y, d, w) {
|
|
1676
1676
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
1677
1677
|
}, m;
|
|
1678
|
-
}(
|
|
1679
|
-
}).call(
|
|
1678
|
+
}(h);
|
|
1679
|
+
}).call(Wr)), ut.exports;
|
|
1680
1680
|
}
|
|
1681
|
-
var
|
|
1682
|
-
function
|
|
1683
|
-
return
|
|
1684
|
-
var
|
|
1685
|
-
|
|
1681
|
+
var Ft = { exports: {} }, Yr = Ft.exports, Ve;
|
|
1682
|
+
function Kr() {
|
|
1683
|
+
return Ve || (Ve = 1, (function() {
|
|
1684
|
+
var n, a, g, h, p, t, e, o, l, b, m, y, d, w, O, I, x, M, E, s, c, f, D, L = {}.hasOwnProperty;
|
|
1685
|
+
D = H(), c = D.isObject, s = D.isFunction, f = D.isPlainObject, E = D.getValue, n = B(), y = ir(), d = Kt(), h = zt(), p = Ht(), O = ne(), M = ie(), w = oe(), b = Qt(), m = re(), t = Zt(), o = Jt(), e = te(), l = ee(), g = tr(), x = rr(), I = se(), a = Bt(), Ft.exports = function() {
|
|
1686
1686
|
function v(r, N, A) {
|
|
1687
1687
|
var _;
|
|
1688
|
-
this.name = "?xml", this.type =
|
|
1688
|
+
this.name = "?xml", this.type = n.Document, r || (r = {}), _ = {}, r.writer ? f(r.writer) && (_ = r.writer, r.writer = new I()) : r.writer = new I(), this.options = r, this.writer = r.writer, this.writerOptions = this.writer.filterOptions(_), this.stringify = new x(r), this.onDataCallback = N || function() {
|
|
1689
1689
|
}, this.onEndCallback = A || function() {
|
|
1690
1690
|
}, this.currentNode = null, this.currentLevel = -1, this.openTags = {}, this.documentStarted = !1, this.documentCompleted = !1, this.root = null;
|
|
1691
1691
|
}
|
|
1692
1692
|
return v.prototype.createChildNode = function(r) {
|
|
1693
|
-
var N, A, _, C,
|
|
1693
|
+
var N, A, _, C, F, j, X, S;
|
|
1694
1694
|
switch (r.type) {
|
|
1695
|
-
case
|
|
1695
|
+
case n.CData:
|
|
1696
1696
|
this.cdata(r.value);
|
|
1697
1697
|
break;
|
|
1698
|
-
case
|
|
1698
|
+
case n.Comment:
|
|
1699
1699
|
this.comment(r.value);
|
|
1700
1700
|
break;
|
|
1701
|
-
case
|
|
1702
|
-
_ = {},
|
|
1703
|
-
for (A in
|
|
1704
|
-
L.call(
|
|
1701
|
+
case n.Element:
|
|
1702
|
+
_ = {}, X = r.attribs;
|
|
1703
|
+
for (A in X)
|
|
1704
|
+
L.call(X, A) && (N = X[A], _[A] = N.value);
|
|
1705
1705
|
this.node(r.name, _);
|
|
1706
1706
|
break;
|
|
1707
|
-
case
|
|
1707
|
+
case n.Dummy:
|
|
1708
1708
|
this.dummy();
|
|
1709
1709
|
break;
|
|
1710
|
-
case
|
|
1710
|
+
case n.Raw:
|
|
1711
1711
|
this.raw(r.value);
|
|
1712
1712
|
break;
|
|
1713
|
-
case
|
|
1713
|
+
case n.Text:
|
|
1714
1714
|
this.text(r.value);
|
|
1715
1715
|
break;
|
|
1716
|
-
case
|
|
1716
|
+
case n.ProcessingInstruction:
|
|
1717
1717
|
this.instruction(r.target, r.value);
|
|
1718
1718
|
break;
|
|
1719
1719
|
default:
|
|
1720
1720
|
throw new Error("This XML node type is not supported in a JS object: " + r.constructor.name);
|
|
1721
1721
|
}
|
|
1722
|
-
for (S = r.children,
|
|
1723
|
-
C = S[
|
|
1722
|
+
for (S = r.children, F = 0, j = S.length; F < j; F++)
|
|
1723
|
+
C = S[F], this.createChildNode(C), C.type === n.Element && this.up();
|
|
1724
1724
|
return this;
|
|
1725
1725
|
}, v.prototype.dummy = function() {
|
|
1726
1726
|
return this;
|
|
@@ -1732,12 +1732,12 @@ function Gr() {
|
|
|
1732
1732
|
throw new Error("Document can only have one root node. " + this.debugInfo(r));
|
|
1733
1733
|
return this.openCurrent(), r = E(r), N == null && (N = {}), N = E(N), c(N) || (_ = [N, A], A = _[0], N = _[1]), this.currentNode = new d(this, r, N), this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, A != null && this.text(A), this;
|
|
1734
1734
|
}, v.prototype.element = function(r, N, A) {
|
|
1735
|
-
var _, C,
|
|
1736
|
-
if (this.currentNode && this.currentNode.type ===
|
|
1735
|
+
var _, C, F, j, X, S;
|
|
1736
|
+
if (this.currentNode && this.currentNode.type === n.DocType)
|
|
1737
1737
|
this.dtdElement.apply(this, arguments);
|
|
1738
1738
|
else if (Array.isArray(r) || c(r) || s(r))
|
|
1739
|
-
for (j = this.options.noValidation, this.options.noValidation = !0, S = new y(this.options).element("TEMP_ROOT"), S.element(r), this.options.noValidation = j,
|
|
1740
|
-
_ =
|
|
1739
|
+
for (j = this.options.noValidation, this.options.noValidation = !0, S = new y(this.options).element("TEMP_ROOT"), S.element(r), this.options.noValidation = j, X = S.children, C = 0, F = X.length; C < F; C++)
|
|
1740
|
+
_ = X[C], this.createChildNode(_), _.type === n.Element && this.up();
|
|
1741
1741
|
else
|
|
1742
1742
|
this.node(r, N, A);
|
|
1743
1743
|
return this;
|
|
@@ -1749,30 +1749,30 @@ function Gr() {
|
|
|
1749
1749
|
for (A in r)
|
|
1750
1750
|
L.call(r, A) && (_ = r[A], this.attribute(A, _));
|
|
1751
1751
|
else
|
|
1752
|
-
s(N) && (N = N.apply()), this.options.keepNullAttributes && N == null ? this.currentNode.attribs[r] = new
|
|
1752
|
+
s(N) && (N = N.apply()), this.options.keepNullAttributes && N == null ? this.currentNode.attribs[r] = new g(this, r, "") : N != null && (this.currentNode.attribs[r] = new g(this, r, N));
|
|
1753
1753
|
return this;
|
|
1754
1754
|
}, v.prototype.text = function(r) {
|
|
1755
1755
|
var N;
|
|
1756
|
-
return this.openCurrent(), N = new
|
|
1756
|
+
return this.openCurrent(), N = new M(this, r), this.onData(this.writer.text(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1757
1757
|
}, v.prototype.cdata = function(r) {
|
|
1758
1758
|
var N;
|
|
1759
|
-
return this.openCurrent(), N = new
|
|
1759
|
+
return this.openCurrent(), N = new h(this, r), this.onData(this.writer.cdata(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1760
1760
|
}, v.prototype.comment = function(r) {
|
|
1761
1761
|
var N;
|
|
1762
|
-
return this.openCurrent(), N = new
|
|
1762
|
+
return this.openCurrent(), N = new p(this, r), this.onData(this.writer.comment(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1763
1763
|
}, v.prototype.raw = function(r) {
|
|
1764
1764
|
var N;
|
|
1765
1765
|
return this.openCurrent(), N = new O(this, r), this.onData(this.writer.raw(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1766
1766
|
}, v.prototype.instruction = function(r, N) {
|
|
1767
|
-
var A, _, C,
|
|
1767
|
+
var A, _, C, F, j;
|
|
1768
1768
|
if (this.openCurrent(), r != null && (r = E(r)), N != null && (N = E(N)), Array.isArray(r))
|
|
1769
|
-
for (A = 0,
|
|
1769
|
+
for (A = 0, F = r.length; A < F; A++)
|
|
1770
1770
|
_ = r[A], this.instruction(_);
|
|
1771
1771
|
else if (c(r))
|
|
1772
1772
|
for (_ in r)
|
|
1773
1773
|
L.call(r, _) && (C = r[_], this.instruction(_, C));
|
|
1774
1774
|
else
|
|
1775
|
-
s(N) && (N = N.apply()), j = new
|
|
1775
|
+
s(N) && (N = N.apply()), j = new w(this, r, N), this.onData(this.writer.processingInstruction(j, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
|
|
1776
1776
|
return this;
|
|
1777
1777
|
}, v.prototype.declaration = function(r, N, A) {
|
|
1778
1778
|
var _;
|
|
@@ -1789,8 +1789,8 @@ function Gr() {
|
|
|
1789
1789
|
var A;
|
|
1790
1790
|
return this.openCurrent(), A = new e(this, r, N), this.onData(this.writer.dtdElement(A, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1791
1791
|
}, v.prototype.attList = function(r, N, A, _, C) {
|
|
1792
|
-
var
|
|
1793
|
-
return this.openCurrent(),
|
|
1792
|
+
var F;
|
|
1793
|
+
return this.openCurrent(), F = new t(this, r, N, A, _, C), this.onData(this.writer.dtdAttList(F, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
1794
1794
|
}, v.prototype.entity = function(r, N) {
|
|
1795
1795
|
var A;
|
|
1796
1796
|
return this.openCurrent(), A = new o(this, !1, r, N), this.onData(this.writer.dtdEntity(A, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
@@ -1814,7 +1814,7 @@ function Gr() {
|
|
|
1814
1814
|
}, v.prototype.openNode = function(r) {
|
|
1815
1815
|
var N, A, _, C;
|
|
1816
1816
|
if (!r.isOpen) {
|
|
1817
|
-
if (!this.root && this.currentLevel === 0 && r.type ===
|
|
1817
|
+
if (!this.root && this.currentLevel === 0 && r.type === n.Element && (this.root = r), A = "", r.type === n.Element) {
|
|
1818
1818
|
this.writerOptions.state = a.OpenTag, A = this.writer.indent(r, this.writerOptions, this.currentLevel) + "<" + r.name, C = r.attribs;
|
|
1819
1819
|
for (_ in C)
|
|
1820
1820
|
L.call(C, _) && (N = C[_], A += this.writer.attribute(N, this.writerOptions, this.currentLevel));
|
|
@@ -1826,7 +1826,7 @@ function Gr() {
|
|
|
1826
1826
|
}, v.prototype.closeNode = function(r) {
|
|
1827
1827
|
var N;
|
|
1828
1828
|
if (!r.isClosed)
|
|
1829
|
-
return N = "", this.writerOptions.state = a.CloseTag, r.type ===
|
|
1829
|
+
return N = "", this.writerOptions.state = a.CloseTag, r.type === n.Element ? N = this.writer.indent(r, this.writerOptions, this.currentLevel) + "</" + r.name + ">" + this.writer.endline(r, this.writerOptions, this.currentLevel) : N = this.writer.indent(r, this.writerOptions, this.currentLevel) + "]>" + this.writer.endline(r, this.writerOptions, this.currentLevel), this.writerOptions.state = a.None, this.onData(N, this.currentLevel), r.isClosed = !0;
|
|
1830
1830
|
}, v.prototype.onData = function(r, N) {
|
|
1831
1831
|
return this.documentStarted = !0, this.onDataCallback(r, N + 1);
|
|
1832
1832
|
}, v.prototype.onEnd = function() {
|
|
@@ -1864,9 +1864,9 @@ function Gr() {
|
|
|
1864
1864
|
}, v.prototype.i = function(r, N) {
|
|
1865
1865
|
return this.instruction(r, N);
|
|
1866
1866
|
}, v.prototype.att = function() {
|
|
1867
|
-
return this.currentNode && this.currentNode.type ===
|
|
1867
|
+
return this.currentNode && this.currentNode.type === n.DocType ? this.attList.apply(this, arguments) : this.attribute.apply(this, arguments);
|
|
1868
1868
|
}, v.prototype.a = function() {
|
|
1869
|
-
return this.currentNode && this.currentNode.type ===
|
|
1869
|
+
return this.currentNode && this.currentNode.type === n.DocType ? this.attList.apply(this, arguments) : this.attribute.apply(this, arguments);
|
|
1870
1870
|
}, v.prototype.ent = function(r, N) {
|
|
1871
1871
|
return this.entity(r, N);
|
|
1872
1872
|
}, v.prototype.pent = function(r, N) {
|
|
@@ -1875,33 +1875,33 @@ function Gr() {
|
|
|
1875
1875
|
return this.notation(r, N);
|
|
1876
1876
|
}, v;
|
|
1877
1877
|
}();
|
|
1878
|
-
}).call(
|
|
1878
|
+
}).call(Yr)), Ft.exports;
|
|
1879
1879
|
}
|
|
1880
|
-
var Xt = { exports: {} },
|
|
1881
|
-
function
|
|
1882
|
-
return
|
|
1883
|
-
var
|
|
1880
|
+
var Xt = { exports: {} }, zr = Xt.exports, ke;
|
|
1881
|
+
function Hr() {
|
|
1882
|
+
return ke || (ke = 1, (function() {
|
|
1883
|
+
var n, a, g, h = function(t, e) {
|
|
1884
1884
|
for (var o in e)
|
|
1885
|
-
|
|
1885
|
+
p.call(e, o) && (t[o] = e[o]);
|
|
1886
1886
|
function l() {
|
|
1887
1887
|
this.constructor = t;
|
|
1888
1888
|
}
|
|
1889
1889
|
return l.prototype = e.prototype, t.prototype = new l(), t.__super__ = e.prototype, t;
|
|
1890
|
-
},
|
|
1891
|
-
|
|
1892
|
-
|
|
1890
|
+
}, p = {}.hasOwnProperty;
|
|
1891
|
+
n = B(), g = nr(), a = Bt(), Xt.exports = function(t) {
|
|
1892
|
+
h(e, t);
|
|
1893
1893
|
function e(o, l) {
|
|
1894
1894
|
this.stream = o, e.__super__.constructor.call(this, l);
|
|
1895
1895
|
}
|
|
1896
1896
|
return e.prototype.endline = function(o, l, b) {
|
|
1897
1897
|
return o.isLastRootNode && l.state === a.CloseTag ? "" : e.__super__.endline.call(this, o, l, b);
|
|
1898
1898
|
}, e.prototype.document = function(o, l) {
|
|
1899
|
-
var b, m, y, d,
|
|
1900
|
-
for (I = o.children, m = y = 0,
|
|
1899
|
+
var b, m, y, d, w, O, I, x, M;
|
|
1900
|
+
for (I = o.children, m = y = 0, w = I.length; y < w; m = ++y)
|
|
1901
1901
|
b = I[m], b.isLastRootNode = m === o.children.length - 1;
|
|
1902
|
-
for (l = this.filterOptions(l), x = o.children,
|
|
1903
|
-
b = x[d],
|
|
1904
|
-
return
|
|
1902
|
+
for (l = this.filterOptions(l), x = o.children, M = [], d = 0, O = x.length; d < O; d++)
|
|
1903
|
+
b = x[d], M.push(this.writeChildNode(b, l, 0));
|
|
1904
|
+
return M;
|
|
1905
1905
|
}, e.prototype.attribute = function(o, l, b) {
|
|
1906
1906
|
return this.stream.write(e.__super__.attribute.call(this, o, l, b));
|
|
1907
1907
|
}, e.prototype.cdata = function(o, l, b) {
|
|
@@ -1911,24 +1911,24 @@ function Kr() {
|
|
|
1911
1911
|
}, e.prototype.declaration = function(o, l, b) {
|
|
1912
1912
|
return this.stream.write(e.__super__.declaration.call(this, o, l, b));
|
|
1913
1913
|
}, e.prototype.docType = function(o, l, b) {
|
|
1914
|
-
var m, y, d,
|
|
1914
|
+
var m, y, d, w;
|
|
1915
1915
|
if (b || (b = 0), this.openNode(o, l, b), l.state = a.OpenTag, this.stream.write(this.indent(o, l, b)), this.stream.write("<!DOCTYPE " + o.root().name), o.pubID && o.sysID ? this.stream.write(' PUBLIC "' + o.pubID + '" "' + o.sysID + '"') : o.sysID && this.stream.write(' SYSTEM "' + o.sysID + '"'), o.children.length > 0) {
|
|
1916
|
-
for (this.stream.write(" ["), this.stream.write(this.endline(o, l, b)), l.state = a.InsideTag,
|
|
1917
|
-
m =
|
|
1916
|
+
for (this.stream.write(" ["), this.stream.write(this.endline(o, l, b)), l.state = a.InsideTag, w = o.children, y = 0, d = w.length; y < d; y++)
|
|
1917
|
+
m = w[y], this.writeChildNode(m, l, b + 1);
|
|
1918
1918
|
l.state = a.CloseTag, this.stream.write("]");
|
|
1919
1919
|
}
|
|
1920
1920
|
return l.state = a.CloseTag, this.stream.write(l.spaceBeforeSlash + ">"), this.stream.write(this.endline(o, l, b)), l.state = a.None, this.closeNode(o, l, b);
|
|
1921
1921
|
}, e.prototype.element = function(o, l, b) {
|
|
1922
|
-
var m, y, d,
|
|
1923
|
-
b || (b = 0), this.openNode(o, l, b), l.state = a.OpenTag, this.stream.write(this.indent(o, l, b) + "<" + o.name),
|
|
1924
|
-
for (x in
|
|
1925
|
-
|
|
1926
|
-
if (d = o.children.length,
|
|
1927
|
-
return (s.type ===
|
|
1922
|
+
var m, y, d, w, O, I, x, M, E;
|
|
1923
|
+
b || (b = 0), this.openNode(o, l, b), l.state = a.OpenTag, this.stream.write(this.indent(o, l, b) + "<" + o.name), M = o.attribs;
|
|
1924
|
+
for (x in M)
|
|
1925
|
+
p.call(M, x) && (m = M[x], this.attribute(m, l, b));
|
|
1926
|
+
if (d = o.children.length, w = d === 0 ? null : o.children[0], d === 0 || o.children.every(function(s) {
|
|
1927
|
+
return (s.type === n.Text || s.type === n.Raw) && s.value === "";
|
|
1928
1928
|
}))
|
|
1929
1929
|
l.allowEmpty ? (this.stream.write(">"), l.state = a.CloseTag, this.stream.write("</" + o.name + ">")) : (l.state = a.CloseTag, this.stream.write(l.spaceBeforeSlash + "/>"));
|
|
1930
|
-
else if (l.pretty && d === 1 && (
|
|
1931
|
-
this.stream.write(">"), l.state = a.InsideTag, l.suppressPrettyCount++, this.writeChildNode(
|
|
1930
|
+
else if (l.pretty && d === 1 && (w.type === n.Text || w.type === n.Raw) && w.value != null)
|
|
1931
|
+
this.stream.write(">"), l.state = a.InsideTag, l.suppressPrettyCount++, this.writeChildNode(w, l, b + 1), l.suppressPrettyCount--, l.state = a.CloseTag, this.stream.write("</" + o.name + ">");
|
|
1932
1932
|
else {
|
|
1933
1933
|
for (this.stream.write(">" + this.endline(o, l, b)), l.state = a.InsideTag, E = o.children, O = 0, I = E.length; O < I; O++)
|
|
1934
1934
|
y = E[O], this.writeChildNode(y, l, b + 1);
|
|
@@ -1950,39 +1950,39 @@ function Kr() {
|
|
|
1950
1950
|
}, e.prototype.dtdNotation = function(o, l, b) {
|
|
1951
1951
|
return this.stream.write(e.__super__.dtdNotation.call(this, o, l, b));
|
|
1952
1952
|
}, e;
|
|
1953
|
-
}(
|
|
1954
|
-
}).call(
|
|
1953
|
+
}(g);
|
|
1954
|
+
}).call(zr)), Xt.exports;
|
|
1955
1955
|
}
|
|
1956
|
-
var
|
|
1957
|
-
function
|
|
1958
|
-
return
|
|
1959
|
-
var
|
|
1960
|
-
b = H(), o = b.assign, l = b.isFunction,
|
|
1956
|
+
var $e;
|
|
1957
|
+
function Qr() {
|
|
1958
|
+
return $e || ($e = 1, (function() {
|
|
1959
|
+
var n, a, g, h, p, t, e, o, l, b;
|
|
1960
|
+
b = H(), o = b.assign, l = b.isFunction, g = Je(), h = ir(), p = Kr(), e = se(), t = Hr(), n = B(), a = Bt(), Y.create = function(m, y, d, w) {
|
|
1961
1961
|
var O, I;
|
|
1962
1962
|
if (m == null)
|
|
1963
1963
|
throw new Error("Root element needs a name.");
|
|
1964
|
-
return
|
|
1964
|
+
return w = o({}, y, d, w), O = new h(w), I = O.element(m), w.headless || (O.declaration(w), (w.pubID != null || w.sysID != null) && O.dtd(w)), I;
|
|
1965
1965
|
}, Y.begin = function(m, y, d) {
|
|
1966
|
-
var
|
|
1967
|
-
return l(m) && (
|
|
1966
|
+
var w;
|
|
1967
|
+
return l(m) && (w = [m, y], y = w[0], d = w[1], m = {}), y ? new p(m, y, d) : new h(m);
|
|
1968
1968
|
}, Y.stringWriter = function(m) {
|
|
1969
1969
|
return new e(m);
|
|
1970
1970
|
}, Y.streamWriter = function(m, y) {
|
|
1971
1971
|
return new t(m, y);
|
|
1972
|
-
}, Y.implementation = new
|
|
1972
|
+
}, Y.implementation = new g(), Y.nodeType = n, Y.writerState = a;
|
|
1973
1973
|
}).call(Y)), Y;
|
|
1974
1974
|
}
|
|
1975
|
-
var
|
|
1976
|
-
function
|
|
1977
|
-
return
|
|
1978
|
-
var
|
|
1979
|
-
|
|
1975
|
+
var Ge;
|
|
1976
|
+
function Zr() {
|
|
1977
|
+
return Ge || (Ge = 1, (function() {
|
|
1978
|
+
var n, a, g, h, p, t = {}.hasOwnProperty;
|
|
1979
|
+
n = Qr(), a = Wt().defaults, h = function(e) {
|
|
1980
1980
|
return typeof e == "string" && (e.indexOf("&") >= 0 || e.indexOf(">") >= 0 || e.indexOf("<") >= 0);
|
|
1981
|
-
},
|
|
1982
|
-
return "<![CDATA[" +
|
|
1983
|
-
},
|
|
1981
|
+
}, p = function(e) {
|
|
1982
|
+
return "<![CDATA[" + g(e) + "]]>";
|
|
1983
|
+
}, g = function(e) {
|
|
1984
1984
|
return e.replace("]]>", "]]]]><![CDATA[>");
|
|
1985
|
-
},
|
|
1985
|
+
}, rt.Builder = function() {
|
|
1986
1986
|
function e(o) {
|
|
1987
1987
|
var l, b, m;
|
|
1988
1988
|
this.options = {}, b = a["0.2"];
|
|
@@ -1993,54 +1993,54 @@ function Hr() {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
return e.prototype.buildObject = function(o) {
|
|
1995
1995
|
var l, b, m, y, d;
|
|
1996
|
-
return l = this.options.attrkey, b = this.options.charkey, Object.keys(o).length === 1 && this.options.rootName === a["0.2"].rootName ? (d = Object.keys(o)[0], o = o[d]) : d = this.options.rootName, m = /* @__PURE__ */ function(
|
|
1996
|
+
return l = this.options.attrkey, b = this.options.charkey, Object.keys(o).length === 1 && this.options.rootName === a["0.2"].rootName ? (d = Object.keys(o)[0], o = o[d]) : d = this.options.rootName, m = /* @__PURE__ */ function(w) {
|
|
1997
1997
|
return function(O, I) {
|
|
1998
|
-
var x,
|
|
1998
|
+
var x, M, E, s, c, f;
|
|
1999
1999
|
if (typeof I != "object")
|
|
2000
|
-
|
|
2000
|
+
w.options.cdata && h(I) ? O.raw(p(I)) : O.txt(I);
|
|
2001
2001
|
else if (Array.isArray(I)) {
|
|
2002
2002
|
for (s in I)
|
|
2003
2003
|
if (t.call(I, s)) {
|
|
2004
|
-
|
|
2005
|
-
for (c in
|
|
2006
|
-
E =
|
|
2004
|
+
M = I[s];
|
|
2005
|
+
for (c in M)
|
|
2006
|
+
E = M[c], O = m(O.ele(c), E).up();
|
|
2007
2007
|
}
|
|
2008
2008
|
} else
|
|
2009
2009
|
for (c in I)
|
|
2010
2010
|
if (t.call(I, c))
|
|
2011
|
-
if (
|
|
2012
|
-
if (typeof
|
|
2013
|
-
for (x in
|
|
2014
|
-
f =
|
|
2011
|
+
if (M = I[c], c === l) {
|
|
2012
|
+
if (typeof M == "object")
|
|
2013
|
+
for (x in M)
|
|
2014
|
+
f = M[x], O = O.att(x, f);
|
|
2015
2015
|
} else if (c === b)
|
|
2016
|
-
|
|
2017
|
-
else if (Array.isArray(
|
|
2018
|
-
for (s in
|
|
2019
|
-
t.call(
|
|
2020
|
-
else typeof
|
|
2016
|
+
w.options.cdata && h(M) ? O = O.raw(p(M)) : O = O.txt(M);
|
|
2017
|
+
else if (Array.isArray(M))
|
|
2018
|
+
for (s in M)
|
|
2019
|
+
t.call(M, s) && (E = M[s], typeof E == "string" ? w.options.cdata && h(E) ? O = O.ele(c).raw(p(E)).up() : O = O.ele(c, E).up() : O = m(O.ele(c), E).up());
|
|
2020
|
+
else typeof M == "object" ? O = m(O.ele(c), M).up() : typeof M == "string" && w.options.cdata && h(M) ? O = O.ele(c).raw(p(M)).up() : (M == null && (M = ""), O = O.ele(c, M.toString()).up());
|
|
2021
2021
|
return O;
|
|
2022
2022
|
};
|
|
2023
|
-
}(this), y =
|
|
2023
|
+
}(this), y = n.create(d, this.options.xmldec, this.options.doctype, {
|
|
2024
2024
|
headless: this.options.headless,
|
|
2025
2025
|
allowSurrogateChars: this.options.allowSurrogateChars
|
|
2026
2026
|
}), m(y, o).end(this.options.renderOpts);
|
|
2027
2027
|
}, e;
|
|
2028
2028
|
}();
|
|
2029
|
-
}).call(
|
|
2029
|
+
}).call(rt)), rt;
|
|
2030
2030
|
}
|
|
2031
|
-
var
|
|
2032
|
-
const
|
|
2031
|
+
var nt = {}, $t = {};
|
|
2032
|
+
const Jr = {}, tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2033
2033
|
__proto__: null,
|
|
2034
|
-
default:
|
|
2035
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2034
|
+
default: Jr
|
|
2035
|
+
}, Symbol.toStringTag, { value: "Module" })), Gt = /* @__PURE__ */ hr(tn);
|
|
2036
2036
|
var We;
|
|
2037
|
-
function
|
|
2038
|
-
return We || (We = 1, function(
|
|
2037
|
+
function en() {
|
|
2038
|
+
return We || (We = 1, function(n) {
|
|
2039
2039
|
(function(a) {
|
|
2040
|
-
a.parser = function(u,
|
|
2041
|
-
return new
|
|
2042
|
-
}, a.SAXParser =
|
|
2043
|
-
var
|
|
2040
|
+
a.parser = function(u, i) {
|
|
2041
|
+
return new h(u, i);
|
|
2042
|
+
}, a.SAXParser = h, a.SAXStream = m, a.createStream = b, a.MAX_BUFFER_LENGTH = 64 * 1024;
|
|
2043
|
+
var g = [
|
|
2044
2044
|
"comment",
|
|
2045
2045
|
"sgmlDecl",
|
|
2046
2046
|
"textNode",
|
|
@@ -2074,28 +2074,28 @@ function Jr() {
|
|
|
2074
2074
|
"opennamespace",
|
|
2075
2075
|
"closenamespace"
|
|
2076
2076
|
];
|
|
2077
|
-
function
|
|
2078
|
-
if (!(this instanceof
|
|
2079
|
-
return new
|
|
2080
|
-
var
|
|
2081
|
-
t(
|
|
2077
|
+
function h(u, i) {
|
|
2078
|
+
if (!(this instanceof h))
|
|
2079
|
+
return new h(u, i);
|
|
2080
|
+
var P = this;
|
|
2081
|
+
t(P), P.q = P.c = "", P.bufferCheckPosition = a.MAX_BUFFER_LENGTH, P.opt = i || {}, P.opt.lowercase = P.opt.lowercase || P.opt.lowercasetags, P.looseCase = P.opt.lowercase ? "toLowerCase" : "toUpperCase", P.tags = [], P.closed = P.closedRoot = P.sawRoot = !1, P.tag = P.error = null, P.strict = !!u, P.noscript = !!(u || P.opt.noscript), P.state = r.BEGIN, P.strictEntities = P.opt.strictEntities, P.ENTITIES = P.strictEntities ? Object.create(a.XML_ENTITIES) : Object.create(a.ENTITIES), P.attribList = [], P.opt.xmlns && (P.ns = Object.create(I)), P.opt.unquotedAttributeValues === void 0 && (P.opt.unquotedAttributeValues = !u), P.trackPosition = P.opt.position !== !1, P.trackPosition && (P.position = P.line = P.column = 0), A(P, "onready");
|
|
2082
2082
|
}
|
|
2083
2083
|
Object.create || (Object.create = function(u) {
|
|
2084
|
-
function
|
|
2084
|
+
function i() {
|
|
2085
2085
|
}
|
|
2086
|
-
|
|
2087
|
-
var
|
|
2088
|
-
return
|
|
2086
|
+
i.prototype = u;
|
|
2087
|
+
var P = new i();
|
|
2088
|
+
return P;
|
|
2089
2089
|
}), Object.keys || (Object.keys = function(u) {
|
|
2090
|
-
var
|
|
2091
|
-
for (var
|
|
2092
|
-
return
|
|
2090
|
+
var i = [];
|
|
2091
|
+
for (var P in u) u.hasOwnProperty(P) && i.push(P);
|
|
2092
|
+
return i;
|
|
2093
2093
|
});
|
|
2094
|
-
function
|
|
2095
|
-
for (var
|
|
2096
|
-
var q = u[
|
|
2097
|
-
if (q >
|
|
2098
|
-
switch (
|
|
2094
|
+
function p(u) {
|
|
2095
|
+
for (var i = Math.max(a.MAX_BUFFER_LENGTH, 10), P = 0, T = 0, R = g.length; T < R; T++) {
|
|
2096
|
+
var q = u[g[T]].length;
|
|
2097
|
+
if (q > i)
|
|
2098
|
+
switch (g[T]) {
|
|
2099
2099
|
case "textNode":
|
|
2100
2100
|
C(u);
|
|
2101
2101
|
break;
|
|
@@ -2106,25 +2106,25 @@ function Jr() {
|
|
|
2106
2106
|
_(u, "onscript", u.script), u.script = "";
|
|
2107
2107
|
break;
|
|
2108
2108
|
default:
|
|
2109
|
-
j(u, "Max buffer length exceeded: " +
|
|
2109
|
+
j(u, "Max buffer length exceeded: " + g[T]);
|
|
2110
2110
|
}
|
|
2111
|
-
|
|
2111
|
+
P = Math.max(P, q);
|
|
2112
2112
|
}
|
|
2113
|
-
var U = a.MAX_BUFFER_LENGTH -
|
|
2113
|
+
var U = a.MAX_BUFFER_LENGTH - P;
|
|
2114
2114
|
u.bufferCheckPosition = U + u.position;
|
|
2115
2115
|
}
|
|
2116
2116
|
function t(u) {
|
|
2117
|
-
for (var
|
|
2118
|
-
u[
|
|
2117
|
+
for (var i = 0, P = g.length; i < P; i++)
|
|
2118
|
+
u[g[i]] = "";
|
|
2119
2119
|
}
|
|
2120
2120
|
function e(u) {
|
|
2121
2121
|
C(u), u.cdata !== "" && (_(u, "oncdata", u.cdata), u.cdata = ""), u.script !== "" && (_(u, "onscript", u.script), u.script = "");
|
|
2122
2122
|
}
|
|
2123
|
-
|
|
2123
|
+
h.prototype = {
|
|
2124
2124
|
end: function() {
|
|
2125
|
-
|
|
2125
|
+
X(this);
|
|
2126
2126
|
},
|
|
2127
|
-
write:
|
|
2127
|
+
write: lr,
|
|
2128
2128
|
resume: function() {
|
|
2129
2129
|
return this.error = null, this;
|
|
2130
2130
|
},
|
|
@@ -2137,7 +2137,7 @@ function Jr() {
|
|
|
2137
2137
|
};
|
|
2138
2138
|
var o;
|
|
2139
2139
|
try {
|
|
2140
|
-
o =
|
|
2140
|
+
o = Gt.Stream;
|
|
2141
2141
|
} catch {
|
|
2142
2142
|
o = function() {
|
|
2143
2143
|
};
|
|
@@ -2147,27 +2147,27 @@ function Jr() {
|
|
|
2147
2147
|
var l = a.EVENTS.filter(function(u) {
|
|
2148
2148
|
return u !== "error" && u !== "end";
|
|
2149
2149
|
});
|
|
2150
|
-
function b(u,
|
|
2151
|
-
return new m(u,
|
|
2150
|
+
function b(u, i) {
|
|
2151
|
+
return new m(u, i);
|
|
2152
2152
|
}
|
|
2153
|
-
function m(u,
|
|
2153
|
+
function m(u, i) {
|
|
2154
2154
|
if (!(this instanceof m))
|
|
2155
|
-
return new m(u,
|
|
2156
|
-
o.apply(this), this._parser = new
|
|
2157
|
-
var
|
|
2155
|
+
return new m(u, i);
|
|
2156
|
+
o.apply(this), this._parser = new h(u, i), this.writable = !0, this.readable = !0;
|
|
2157
|
+
var P = this;
|
|
2158
2158
|
this._parser.onend = function() {
|
|
2159
|
-
|
|
2160
|
-
}, this._parser.onerror = function(
|
|
2161
|
-
|
|
2162
|
-
}, this._decoder = null, l.forEach(function(
|
|
2163
|
-
Object.defineProperty(
|
|
2159
|
+
P.emit("end");
|
|
2160
|
+
}, this._parser.onerror = function(T) {
|
|
2161
|
+
P.emit("error", T), P._parser.error = null;
|
|
2162
|
+
}, this._decoder = null, l.forEach(function(T) {
|
|
2163
|
+
Object.defineProperty(P, "on" + T, {
|
|
2164
2164
|
get: function() {
|
|
2165
|
-
return
|
|
2165
|
+
return P._parser["on" + T];
|
|
2166
2166
|
},
|
|
2167
2167
|
set: function(R) {
|
|
2168
2168
|
if (!R)
|
|
2169
|
-
return
|
|
2170
|
-
|
|
2169
|
+
return P.removeAllListeners(T), P._parser["on" + T] = R, R;
|
|
2170
|
+
P.on(T, R);
|
|
2171
2171
|
},
|
|
2172
2172
|
enumerable: !0,
|
|
2173
2173
|
configurable: !1
|
|
@@ -2181,22 +2181,22 @@ function Jr() {
|
|
|
2181
2181
|
}), m.prototype.write = function(u) {
|
|
2182
2182
|
if (typeof Buffer == "function" && typeof Buffer.isBuffer == "function" && Buffer.isBuffer(u)) {
|
|
2183
2183
|
if (!this._decoder) {
|
|
2184
|
-
var
|
|
2185
|
-
this._decoder = new
|
|
2184
|
+
var i = Gt.StringDecoder;
|
|
2185
|
+
this._decoder = new i("utf8");
|
|
2186
2186
|
}
|
|
2187
2187
|
u = this._decoder.write(u);
|
|
2188
2188
|
}
|
|
2189
2189
|
return this._parser.write(u.toString()), this.emit("data", u), !0;
|
|
2190
2190
|
}, m.prototype.end = function(u) {
|
|
2191
2191
|
return u && u.length && this.write(u), this._parser.end(), !0;
|
|
2192
|
-
}, m.prototype.on = function(u,
|
|
2193
|
-
var
|
|
2194
|
-
return !
|
|
2195
|
-
var
|
|
2196
|
-
|
|
2197
|
-
}), o.prototype.on.call(
|
|
2192
|
+
}, m.prototype.on = function(u, i) {
|
|
2193
|
+
var P = this;
|
|
2194
|
+
return !P._parser["on" + u] && l.indexOf(u) !== -1 && (P._parser["on" + u] = function() {
|
|
2195
|
+
var T = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
|
|
2196
|
+
T.splice(0, 0, u), P.emit.apply(P, T);
|
|
2197
|
+
}), o.prototype.on.call(P, u, i);
|
|
2198
2198
|
};
|
|
2199
|
-
var y = "[CDATA[", d = "DOCTYPE",
|
|
2199
|
+
var y = "[CDATA[", d = "DOCTYPE", w = "http://www.w3.org/XML/1998/namespace", O = "http://www.w3.org/2000/xmlns/", I = { xml: w, xmlns: O }, x = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, M = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/, E = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, s = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
|
|
2200
2200
|
function c(u) {
|
|
2201
2201
|
return u === " " || u === `
|
|
2202
2202
|
` || u === "\r" || u === " ";
|
|
@@ -2204,14 +2204,14 @@ function Jr() {
|
|
|
2204
2204
|
function f(u) {
|
|
2205
2205
|
return u === '"' || u === "'";
|
|
2206
2206
|
}
|
|
2207
|
-
function
|
|
2207
|
+
function D(u) {
|
|
2208
2208
|
return u === ">" || c(u);
|
|
2209
2209
|
}
|
|
2210
|
-
function L(u,
|
|
2211
|
-
return u.test(
|
|
2210
|
+
function L(u, i) {
|
|
2211
|
+
return u.test(i);
|
|
2212
2212
|
}
|
|
2213
|
-
function v(u,
|
|
2214
|
-
return !L(u,
|
|
2213
|
+
function v(u, i) {
|
|
2214
|
+
return !L(u, i);
|
|
2215
2215
|
}
|
|
2216
2216
|
var r = 0;
|
|
2217
2217
|
a.STATE = {
|
|
@@ -2548,62 +2548,62 @@ function Jr() {
|
|
|
2548
2548
|
hearts: 9829,
|
|
2549
2549
|
diams: 9830
|
|
2550
2550
|
}, Object.keys(a.ENTITIES).forEach(function(u) {
|
|
2551
|
-
var
|
|
2552
|
-
a.ENTITIES[u] =
|
|
2551
|
+
var i = a.ENTITIES[u], P = typeof i == "number" ? String.fromCharCode(i) : i;
|
|
2552
|
+
a.ENTITIES[u] = P;
|
|
2553
2553
|
});
|
|
2554
2554
|
for (var N in a.STATE)
|
|
2555
2555
|
a.STATE[a.STATE[N]] = N;
|
|
2556
2556
|
r = a.STATE;
|
|
2557
|
-
function A(u,
|
|
2558
|
-
u[
|
|
2557
|
+
function A(u, i, P) {
|
|
2558
|
+
u[i] && u[i](P);
|
|
2559
2559
|
}
|
|
2560
|
-
function _(u,
|
|
2561
|
-
u.textNode && C(u), A(u,
|
|
2560
|
+
function _(u, i, P) {
|
|
2561
|
+
u.textNode && C(u), A(u, i, P);
|
|
2562
2562
|
}
|
|
2563
2563
|
function C(u) {
|
|
2564
|
-
u.textNode =
|
|
2564
|
+
u.textNode = F(u.opt, u.textNode), u.textNode && A(u, "ontext", u.textNode), u.textNode = "";
|
|
2565
2565
|
}
|
|
2566
|
-
function
|
|
2567
|
-
return u.trim && (
|
|
2566
|
+
function F(u, i) {
|
|
2567
|
+
return u.trim && (i = i.trim()), u.normalize && (i = i.replace(/\s+/g, " ")), i;
|
|
2568
2568
|
}
|
|
2569
|
-
function j(u,
|
|
2570
|
-
return C(u), u.trackPosition && (
|
|
2569
|
+
function j(u, i) {
|
|
2570
|
+
return C(u), u.trackPosition && (i += `
|
|
2571
2571
|
Line: ` + u.line + `
|
|
2572
2572
|
Column: ` + u.column + `
|
|
2573
|
-
Char: ` + u.c),
|
|
2573
|
+
Char: ` + u.c), i = new Error(i), u.error = i, A(u, "onerror", i), u;
|
|
2574
2574
|
}
|
|
2575
|
-
function
|
|
2576
|
-
return u.sawRoot && !u.closedRoot && S(u, "Unclosed root tag"), u.state !== r.BEGIN && u.state !== r.BEGIN_WHITESPACE && u.state !== r.TEXT && j(u, "Unexpected end"), C(u), u.c = "", u.closed = !0, A(u, "onend"),
|
|
2575
|
+
function X(u) {
|
|
2576
|
+
return u.sawRoot && !u.closedRoot && S(u, "Unclosed root tag"), u.state !== r.BEGIN && u.state !== r.BEGIN_WHITESPACE && u.state !== r.TEXT && j(u, "Unexpected end"), C(u), u.c = "", u.closed = !0, A(u, "onend"), h.call(u, u.strict, u.opt), u;
|
|
2577
2577
|
}
|
|
2578
|
-
function S(u,
|
|
2579
|
-
if (typeof u != "object" || !(u instanceof
|
|
2578
|
+
function S(u, i) {
|
|
2579
|
+
if (typeof u != "object" || !(u instanceof h))
|
|
2580
2580
|
throw new Error("bad call to strictFail");
|
|
2581
|
-
u.strict && j(u,
|
|
2581
|
+
u.strict && j(u, i);
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function ar(u) {
|
|
2584
2584
|
u.strict || (u.tagName = u.tagName[u.looseCase]());
|
|
2585
|
-
var
|
|
2586
|
-
u.opt.xmlns && (
|
|
2585
|
+
var i = u.tags[u.tags.length - 1] || u, P = u.tag = { name: u.tagName, attributes: {} };
|
|
2586
|
+
u.opt.xmlns && (P.ns = i.ns), u.attribList.length = 0, _(u, "onopentagstart", P);
|
|
2587
2587
|
}
|
|
2588
|
-
function
|
|
2589
|
-
var
|
|
2590
|
-
return
|
|
2588
|
+
function qt(u, i) {
|
|
2589
|
+
var P = u.indexOf(":"), T = P < 0 ? ["", u] : u.split(":"), R = T[0], q = T[1];
|
|
2590
|
+
return i && u === "xmlns" && (R = "xmlns", q = ""), { prefix: R, local: q };
|
|
2591
2591
|
}
|
|
2592
|
-
function
|
|
2592
|
+
function Ut(u) {
|
|
2593
2593
|
if (u.strict || (u.attribName = u.attribName[u.looseCase]()), u.attribList.indexOf(u.attribName) !== -1 || u.tag.attributes.hasOwnProperty(u.attribName)) {
|
|
2594
2594
|
u.attribName = u.attribValue = "";
|
|
2595
2595
|
return;
|
|
2596
2596
|
}
|
|
2597
2597
|
if (u.opt.xmlns) {
|
|
2598
|
-
var
|
|
2599
|
-
if (
|
|
2600
|
-
if (
|
|
2598
|
+
var i = qt(u.attribName, !0), P = i.prefix, T = i.local;
|
|
2599
|
+
if (P === "xmlns")
|
|
2600
|
+
if (T === "xml" && u.attribValue !== w)
|
|
2601
2601
|
S(
|
|
2602
2602
|
u,
|
|
2603
|
-
"xml: prefix must be bound to " +
|
|
2603
|
+
"xml: prefix must be bound to " + w + `
|
|
2604
2604
|
Actual: ` + u.attribValue
|
|
2605
2605
|
);
|
|
2606
|
-
else if (
|
|
2606
|
+
else if (T === "xmlns" && u.attribValue !== O)
|
|
2607
2607
|
S(
|
|
2608
2608
|
u,
|
|
2609
2609
|
"xmlns: prefix must be bound to " + O + `
|
|
@@ -2611,7 +2611,7 @@ Actual: ` + u.attribValue
|
|
|
2611
2611
|
);
|
|
2612
2612
|
else {
|
|
2613
2613
|
var R = u.tag, q = u.tags[u.tags.length - 1] || u;
|
|
2614
|
-
R.ns === q.ns && (R.ns = Object.create(q.ns)), R.ns[
|
|
2614
|
+
R.ns === q.ns && (R.ns = Object.create(q.ns)), R.ns[T] = u.attribValue;
|
|
2615
2615
|
}
|
|
2616
2616
|
u.attribList.push([u.attribName, u.attribValue]);
|
|
2617
2617
|
} else
|
|
@@ -2621,32 +2621,32 @@ Actual: ` + u.attribValue
|
|
|
2621
2621
|
});
|
|
2622
2622
|
u.attribName = u.attribValue = "";
|
|
2623
2623
|
}
|
|
2624
|
-
function Z(u,
|
|
2624
|
+
function Z(u, i) {
|
|
2625
2625
|
if (u.opt.xmlns) {
|
|
2626
|
-
var
|
|
2627
|
-
|
|
2626
|
+
var P = u.tag, T = qt(u.tagName);
|
|
2627
|
+
P.prefix = T.prefix, P.local = T.local, P.uri = P.ns[T.prefix] || "", P.prefix && !P.uri && (S(u, "Unbound namespace prefix: " + JSON.stringify(u.tagName)), P.uri = T.prefix);
|
|
2628
2628
|
var R = u.tags[u.tags.length - 1] || u;
|
|
2629
|
-
|
|
2629
|
+
P.ns && R.ns !== P.ns && Object.keys(P.ns).forEach(function(le) {
|
|
2630
2630
|
_(u, "onopennamespace", {
|
|
2631
|
-
prefix:
|
|
2632
|
-
uri:
|
|
2631
|
+
prefix: le,
|
|
2632
|
+
uri: P.ns[le]
|
|
2633
2633
|
});
|
|
2634
2634
|
});
|
|
2635
2635
|
for (var q = 0, U = u.attribList.length; q < U; q++) {
|
|
2636
|
-
var k = u.attribList[q], $ = k[0], J = k[1], V =
|
|
2636
|
+
var k = u.attribList[q], $ = k[0], J = k[1], V = qt($, !0), z = V.prefix, fr = V.local, ce = z === "" ? "" : P.ns[z] || "", kt = {
|
|
2637
2637
|
name: $,
|
|
2638
2638
|
value: J,
|
|
2639
2639
|
prefix: z,
|
|
2640
|
-
local:
|
|
2641
|
-
uri:
|
|
2640
|
+
local: fr,
|
|
2641
|
+
uri: ce
|
|
2642
2642
|
};
|
|
2643
|
-
z && z !== "xmlns" && !
|
|
2643
|
+
z && z !== "xmlns" && !ce && (S(u, "Unbound namespace prefix: " + JSON.stringify(z)), kt.uri = z), u.tag.attributes[$] = kt, _(u, "onattribute", kt);
|
|
2644
2644
|
}
|
|
2645
2645
|
u.attribList.length = 0;
|
|
2646
2646
|
}
|
|
2647
|
-
u.tag.isSelfClosing = !!
|
|
2647
|
+
u.tag.isSelfClosing = !!i, u.sawRoot = !0, u.tags.push(u.tag), _(u, "onopentag", u.tag), i || (!u.noscript && u.tagName.toLowerCase() === "script" ? u.state = r.SCRIPT : u.state = r.TEXT, u.tag = null, u.tagName = ""), u.attribName = u.attribValue = "", u.attribList.length = 0;
|
|
2648
2648
|
}
|
|
2649
|
-
function
|
|
2649
|
+
function Vt(u) {
|
|
2650
2650
|
if (!u.tagName) {
|
|
2651
2651
|
S(u, "Weird empty close tag."), u.textNode += "</>", u.state = r.TEXT;
|
|
2652
2652
|
return;
|
|
@@ -2658,21 +2658,21 @@ Actual: ` + u.attribValue
|
|
|
2658
2658
|
}
|
|
2659
2659
|
_(u, "onscript", u.script), u.script = "";
|
|
2660
2660
|
}
|
|
2661
|
-
var
|
|
2662
|
-
u.strict || (
|
|
2663
|
-
for (var
|
|
2664
|
-
var R = u.tags[
|
|
2665
|
-
if (R.name !==
|
|
2661
|
+
var i = u.tags.length, P = u.tagName;
|
|
2662
|
+
u.strict || (P = P[u.looseCase]());
|
|
2663
|
+
for (var T = P; i--; ) {
|
|
2664
|
+
var R = u.tags[i];
|
|
2665
|
+
if (R.name !== T)
|
|
2666
2666
|
S(u, "Unexpected close tag");
|
|
2667
2667
|
else
|
|
2668
2668
|
break;
|
|
2669
2669
|
}
|
|
2670
|
-
if (
|
|
2670
|
+
if (i < 0) {
|
|
2671
2671
|
S(u, "Unmatched closing tag: " + u.tagName), u.textNode += "</" + u.tagName + ">", u.state = r.TEXT;
|
|
2672
2672
|
return;
|
|
2673
2673
|
}
|
|
2674
|
-
u.tagName =
|
|
2675
|
-
for (var q = u.tags.length; q-- >
|
|
2674
|
+
u.tagName = P;
|
|
2675
|
+
for (var q = u.tags.length; q-- > i; ) {
|
|
2676
2676
|
var U = u.tag = u.tags.pop();
|
|
2677
2677
|
u.tagName = u.tag.name, _(u, "onclosetag", u.tagName);
|
|
2678
2678
|
var k = {};
|
|
@@ -2684,198 +2684,198 @@ Actual: ` + u.attribValue
|
|
|
2684
2684
|
_(u, "onclosenamespace", { prefix: V, uri: z });
|
|
2685
2685
|
});
|
|
2686
2686
|
}
|
|
2687
|
-
|
|
2687
|
+
i === 0 && (u.closedRoot = !0), u.tagName = u.attribValue = u.attribName = "", u.attribList.length = 0, u.state = r.TEXT;
|
|
2688
2688
|
}
|
|
2689
|
-
function
|
|
2690
|
-
var
|
|
2691
|
-
return u.ENTITIES[
|
|
2689
|
+
function cr(u) {
|
|
2690
|
+
var i = u.entity, P = i.toLowerCase(), T, R = "";
|
|
2691
|
+
return u.ENTITIES[i] ? u.ENTITIES[i] : u.ENTITIES[P] ? u.ENTITIES[P] : (i = P, i.charAt(0) === "#" && (i.charAt(1) === "x" ? (i = i.slice(2), T = parseInt(i, 16), R = T.toString(16)) : (i = i.slice(1), T = parseInt(i, 10), R = T.toString(10))), i = i.replace(/^0+/, ""), isNaN(T) || R.toLowerCase() !== i ? (S(u, "Invalid character entity"), "&" + u.entity + ";") : String.fromCodePoint(T));
|
|
2692
2692
|
}
|
|
2693
|
-
function
|
|
2694
|
-
|
|
2693
|
+
function ue(u, i) {
|
|
2694
|
+
i === "<" ? (u.state = r.OPEN_WAKA, u.startTagPosition = u.position) : c(i) || (S(u, "Non-whitespace before first tag."), u.textNode = i, u.state = r.TEXT);
|
|
2695
2695
|
}
|
|
2696
|
-
function
|
|
2697
|
-
var
|
|
2698
|
-
return
|
|
2696
|
+
function ae(u, i) {
|
|
2697
|
+
var P = "";
|
|
2698
|
+
return i < u.length && (P = u.charAt(i)), P;
|
|
2699
2699
|
}
|
|
2700
|
-
function
|
|
2701
|
-
var
|
|
2700
|
+
function lr(u) {
|
|
2701
|
+
var i = this;
|
|
2702
2702
|
if (this.error)
|
|
2703
2703
|
throw this.error;
|
|
2704
|
-
if (
|
|
2704
|
+
if (i.closed)
|
|
2705
2705
|
return j(
|
|
2706
|
-
|
|
2706
|
+
i,
|
|
2707
2707
|
"Cannot write after close. Assign an onready handler."
|
|
2708
2708
|
);
|
|
2709
2709
|
if (u === null)
|
|
2710
|
-
return
|
|
2710
|
+
return X(i);
|
|
2711
2711
|
typeof u == "object" && (u = u.toString());
|
|
2712
|
-
for (var
|
|
2713
|
-
switch (
|
|
2714
|
-
` ? (
|
|
2712
|
+
for (var P = 0, T = ""; T = ae(u, P++), i.c = T, !!T; )
|
|
2713
|
+
switch (i.trackPosition && (i.position++, T === `
|
|
2714
|
+
` ? (i.line++, i.column = 0) : i.column++), i.state) {
|
|
2715
2715
|
case r.BEGIN:
|
|
2716
|
-
if (
|
|
2716
|
+
if (i.state = r.BEGIN_WHITESPACE, T === "\uFEFF")
|
|
2717
2717
|
continue;
|
|
2718
|
-
|
|
2718
|
+
ue(i, T);
|
|
2719
2719
|
continue;
|
|
2720
2720
|
case r.BEGIN_WHITESPACE:
|
|
2721
|
-
|
|
2721
|
+
ue(i, T);
|
|
2722
2722
|
continue;
|
|
2723
2723
|
case r.TEXT:
|
|
2724
|
-
if (
|
|
2725
|
-
for (var R =
|
|
2726
|
-
|
|
2727
|
-
` ? (
|
|
2728
|
-
|
|
2724
|
+
if (i.sawRoot && !i.closedRoot) {
|
|
2725
|
+
for (var R = P - 1; T && T !== "<" && T !== "&"; )
|
|
2726
|
+
T = ae(u, P++), T && i.trackPosition && (i.position++, T === `
|
|
2727
|
+
` ? (i.line++, i.column = 0) : i.column++);
|
|
2728
|
+
i.textNode += u.substring(R, P - 1);
|
|
2729
2729
|
}
|
|
2730
|
-
|
|
2730
|
+
T === "<" && !(i.sawRoot && i.closedRoot && !i.strict) ? (i.state = r.OPEN_WAKA, i.startTagPosition = i.position) : (!c(T) && (!i.sawRoot || i.closedRoot) && S(i, "Text data outside of root node."), T === "&" ? i.state = r.TEXT_ENTITY : i.textNode += T);
|
|
2731
2731
|
continue;
|
|
2732
2732
|
case r.SCRIPT:
|
|
2733
|
-
|
|
2733
|
+
T === "<" ? i.state = r.SCRIPT_ENDING : i.script += T;
|
|
2734
2734
|
continue;
|
|
2735
2735
|
case r.SCRIPT_ENDING:
|
|
2736
|
-
|
|
2736
|
+
T === "/" ? i.state = r.CLOSE_TAG : (i.script += "<" + T, i.state = r.SCRIPT);
|
|
2737
2737
|
continue;
|
|
2738
2738
|
case r.OPEN_WAKA:
|
|
2739
|
-
if (
|
|
2740
|
-
|
|
2741
|
-
else if (!c(
|
|
2742
|
-
|
|
2743
|
-
else if (
|
|
2744
|
-
|
|
2745
|
-
else if (
|
|
2746
|
-
|
|
2739
|
+
if (T === "!")
|
|
2740
|
+
i.state = r.SGML_DECL, i.sgmlDecl = "";
|
|
2741
|
+
else if (!c(T)) if (L(x, T))
|
|
2742
|
+
i.state = r.OPEN_TAG, i.tagName = T;
|
|
2743
|
+
else if (T === "/")
|
|
2744
|
+
i.state = r.CLOSE_TAG, i.tagName = "";
|
|
2745
|
+
else if (T === "?")
|
|
2746
|
+
i.state = r.PROC_INST, i.procInstName = i.procInstBody = "";
|
|
2747
2747
|
else {
|
|
2748
|
-
if (S(
|
|
2749
|
-
var q =
|
|
2750
|
-
|
|
2748
|
+
if (S(i, "Unencoded <"), i.startTagPosition + 1 < i.position) {
|
|
2749
|
+
var q = i.position - i.startTagPosition;
|
|
2750
|
+
T = new Array(q).join(" ") + T;
|
|
2751
2751
|
}
|
|
2752
|
-
|
|
2752
|
+
i.textNode += "<" + T, i.state = r.TEXT;
|
|
2753
2753
|
}
|
|
2754
2754
|
continue;
|
|
2755
2755
|
case r.SGML_DECL:
|
|
2756
|
-
if (
|
|
2757
|
-
|
|
2756
|
+
if (i.sgmlDecl + T === "--") {
|
|
2757
|
+
i.state = r.COMMENT, i.comment = "", i.sgmlDecl = "";
|
|
2758
2758
|
continue;
|
|
2759
2759
|
}
|
|
2760
|
-
|
|
2761
|
-
|
|
2760
|
+
i.doctype && i.doctype !== !0 && i.sgmlDecl ? (i.state = r.DOCTYPE_DTD, i.doctype += "<!" + i.sgmlDecl + T, i.sgmlDecl = "") : (i.sgmlDecl + T).toUpperCase() === y ? (_(i, "onopencdata"), i.state = r.CDATA, i.sgmlDecl = "", i.cdata = "") : (i.sgmlDecl + T).toUpperCase() === d ? (i.state = r.DOCTYPE, (i.doctype || i.sawRoot) && S(
|
|
2761
|
+
i,
|
|
2762
2762
|
"Inappropriately located doctype declaration"
|
|
2763
|
-
),
|
|
2763
|
+
), i.doctype = "", i.sgmlDecl = "") : T === ">" ? (_(i, "onsgmldeclaration", i.sgmlDecl), i.sgmlDecl = "", i.state = r.TEXT) : (f(T) && (i.state = r.SGML_DECL_QUOTED), i.sgmlDecl += T);
|
|
2764
2764
|
continue;
|
|
2765
2765
|
case r.SGML_DECL_QUOTED:
|
|
2766
|
-
|
|
2766
|
+
T === i.q && (i.state = r.SGML_DECL, i.q = ""), i.sgmlDecl += T;
|
|
2767
2767
|
continue;
|
|
2768
2768
|
case r.DOCTYPE:
|
|
2769
|
-
|
|
2769
|
+
T === ">" ? (i.state = r.TEXT, _(i, "ondoctype", i.doctype), i.doctype = !0) : (i.doctype += T, T === "[" ? i.state = r.DOCTYPE_DTD : f(T) && (i.state = r.DOCTYPE_QUOTED, i.q = T));
|
|
2770
2770
|
continue;
|
|
2771
2771
|
case r.DOCTYPE_QUOTED:
|
|
2772
|
-
|
|
2772
|
+
i.doctype += T, T === i.q && (i.q = "", i.state = r.DOCTYPE);
|
|
2773
2773
|
continue;
|
|
2774
2774
|
case r.DOCTYPE_DTD:
|
|
2775
|
-
|
|
2775
|
+
T === "]" ? (i.doctype += T, i.state = r.DOCTYPE) : T === "<" ? (i.state = r.OPEN_WAKA, i.startTagPosition = i.position) : f(T) ? (i.doctype += T, i.state = r.DOCTYPE_DTD_QUOTED, i.q = T) : i.doctype += T;
|
|
2776
2776
|
continue;
|
|
2777
2777
|
case r.DOCTYPE_DTD_QUOTED:
|
|
2778
|
-
|
|
2778
|
+
i.doctype += T, T === i.q && (i.state = r.DOCTYPE_DTD, i.q = "");
|
|
2779
2779
|
continue;
|
|
2780
2780
|
case r.COMMENT:
|
|
2781
|
-
|
|
2781
|
+
T === "-" ? i.state = r.COMMENT_ENDING : i.comment += T;
|
|
2782
2782
|
continue;
|
|
2783
2783
|
case r.COMMENT_ENDING:
|
|
2784
|
-
|
|
2784
|
+
T === "-" ? (i.state = r.COMMENT_ENDED, i.comment = F(i.opt, i.comment), i.comment && _(i, "oncomment", i.comment), i.comment = "") : (i.comment += "-" + T, i.state = r.COMMENT);
|
|
2785
2785
|
continue;
|
|
2786
2786
|
case r.COMMENT_ENDED:
|
|
2787
|
-
|
|
2787
|
+
T !== ">" ? (S(i, "Malformed comment"), i.comment += "--" + T, i.state = r.COMMENT) : i.doctype && i.doctype !== !0 ? i.state = r.DOCTYPE_DTD : i.state = r.TEXT;
|
|
2788
2788
|
continue;
|
|
2789
2789
|
case r.CDATA:
|
|
2790
|
-
|
|
2790
|
+
T === "]" ? i.state = r.CDATA_ENDING : i.cdata += T;
|
|
2791
2791
|
continue;
|
|
2792
2792
|
case r.CDATA_ENDING:
|
|
2793
|
-
|
|
2793
|
+
T === "]" ? i.state = r.CDATA_ENDING_2 : (i.cdata += "]" + T, i.state = r.CDATA);
|
|
2794
2794
|
continue;
|
|
2795
2795
|
case r.CDATA_ENDING_2:
|
|
2796
|
-
|
|
2796
|
+
T === ">" ? (i.cdata && _(i, "oncdata", i.cdata), _(i, "onclosecdata"), i.cdata = "", i.state = r.TEXT) : T === "]" ? i.cdata += "]" : (i.cdata += "]]" + T, i.state = r.CDATA);
|
|
2797
2797
|
continue;
|
|
2798
2798
|
case r.PROC_INST:
|
|
2799
|
-
|
|
2799
|
+
T === "?" ? i.state = r.PROC_INST_ENDING : c(T) ? i.state = r.PROC_INST_BODY : i.procInstName += T;
|
|
2800
2800
|
continue;
|
|
2801
2801
|
case r.PROC_INST_BODY:
|
|
2802
|
-
if (!
|
|
2802
|
+
if (!i.procInstBody && c(T))
|
|
2803
2803
|
continue;
|
|
2804
|
-
|
|
2804
|
+
T === "?" ? i.state = r.PROC_INST_ENDING : i.procInstBody += T;
|
|
2805
2805
|
continue;
|
|
2806
2806
|
case r.PROC_INST_ENDING:
|
|
2807
|
-
|
|
2808
|
-
name:
|
|
2809
|
-
body:
|
|
2810
|
-
}),
|
|
2807
|
+
T === ">" ? (_(i, "onprocessinginstruction", {
|
|
2808
|
+
name: i.procInstName,
|
|
2809
|
+
body: i.procInstBody
|
|
2810
|
+
}), i.procInstName = i.procInstBody = "", i.state = r.TEXT) : (i.procInstBody += "?" + T, i.state = r.PROC_INST_BODY);
|
|
2811
2811
|
continue;
|
|
2812
2812
|
case r.OPEN_TAG:
|
|
2813
|
-
L(
|
|
2813
|
+
L(M, T) ? i.tagName += T : (ar(i), T === ">" ? Z(i) : T === "/" ? i.state = r.OPEN_TAG_SLASH : (c(T) || S(i, "Invalid character in tag name"), i.state = r.ATTRIB));
|
|
2814
2814
|
continue;
|
|
2815
2815
|
case r.OPEN_TAG_SLASH:
|
|
2816
|
-
|
|
2816
|
+
T === ">" ? (Z(i, !0), Vt(i)) : (S(i, "Forward-slash in opening tag not followed by >"), i.state = r.ATTRIB);
|
|
2817
2817
|
continue;
|
|
2818
2818
|
case r.ATTRIB:
|
|
2819
|
-
if (c(
|
|
2819
|
+
if (c(T))
|
|
2820
2820
|
continue;
|
|
2821
|
-
|
|
2821
|
+
T === ">" ? Z(i) : T === "/" ? i.state = r.OPEN_TAG_SLASH : L(x, T) ? (i.attribName = T, i.attribValue = "", i.state = r.ATTRIB_NAME) : S(i, "Invalid attribute name");
|
|
2822
2822
|
continue;
|
|
2823
2823
|
case r.ATTRIB_NAME:
|
|
2824
|
-
|
|
2824
|
+
T === "=" ? i.state = r.ATTRIB_VALUE : T === ">" ? (S(i, "Attribute without value"), i.attribValue = i.attribName, Ut(i), Z(i)) : c(T) ? i.state = r.ATTRIB_NAME_SAW_WHITE : L(M, T) ? i.attribName += T : S(i, "Invalid attribute name");
|
|
2825
2825
|
continue;
|
|
2826
2826
|
case r.ATTRIB_NAME_SAW_WHITE:
|
|
2827
|
-
if (
|
|
2828
|
-
|
|
2827
|
+
if (T === "=")
|
|
2828
|
+
i.state = r.ATTRIB_VALUE;
|
|
2829
2829
|
else {
|
|
2830
|
-
if (c(
|
|
2830
|
+
if (c(T))
|
|
2831
2831
|
continue;
|
|
2832
|
-
S(
|
|
2833
|
-
name:
|
|
2832
|
+
S(i, "Attribute without value"), i.tag.attributes[i.attribName] = "", i.attribValue = "", _(i, "onattribute", {
|
|
2833
|
+
name: i.attribName,
|
|
2834
2834
|
value: ""
|
|
2835
|
-
}),
|
|
2835
|
+
}), i.attribName = "", T === ">" ? Z(i) : L(x, T) ? (i.attribName = T, i.state = r.ATTRIB_NAME) : (S(i, "Invalid attribute name"), i.state = r.ATTRIB);
|
|
2836
2836
|
}
|
|
2837
2837
|
continue;
|
|
2838
2838
|
case r.ATTRIB_VALUE:
|
|
2839
|
-
if (c(
|
|
2839
|
+
if (c(T))
|
|
2840
2840
|
continue;
|
|
2841
|
-
f(
|
|
2841
|
+
f(T) ? (i.q = T, i.state = r.ATTRIB_VALUE_QUOTED) : (i.opt.unquotedAttributeValues || j(i, "Unquoted attribute value"), i.state = r.ATTRIB_VALUE_UNQUOTED, i.attribValue = T);
|
|
2842
2842
|
continue;
|
|
2843
2843
|
case r.ATTRIB_VALUE_QUOTED:
|
|
2844
|
-
if (
|
|
2845
|
-
|
|
2844
|
+
if (T !== i.q) {
|
|
2845
|
+
T === "&" ? i.state = r.ATTRIB_VALUE_ENTITY_Q : i.attribValue += T;
|
|
2846
2846
|
continue;
|
|
2847
2847
|
}
|
|
2848
|
-
|
|
2848
|
+
Ut(i), i.q = "", i.state = r.ATTRIB_VALUE_CLOSED;
|
|
2849
2849
|
continue;
|
|
2850
2850
|
case r.ATTRIB_VALUE_CLOSED:
|
|
2851
|
-
c(
|
|
2851
|
+
c(T) ? i.state = r.ATTRIB : T === ">" ? Z(i) : T === "/" ? i.state = r.OPEN_TAG_SLASH : L(x, T) ? (S(i, "No whitespace between attributes"), i.attribName = T, i.attribValue = "", i.state = r.ATTRIB_NAME) : S(i, "Invalid attribute name");
|
|
2852
2852
|
continue;
|
|
2853
2853
|
case r.ATTRIB_VALUE_UNQUOTED:
|
|
2854
|
-
if (!T
|
|
2855
|
-
|
|
2854
|
+
if (!D(T)) {
|
|
2855
|
+
T === "&" ? i.state = r.ATTRIB_VALUE_ENTITY_U : i.attribValue += T;
|
|
2856
2856
|
continue;
|
|
2857
2857
|
}
|
|
2858
|
-
|
|
2858
|
+
Ut(i), T === ">" ? Z(i) : i.state = r.ATTRIB;
|
|
2859
2859
|
continue;
|
|
2860
2860
|
case r.CLOSE_TAG:
|
|
2861
|
-
if (
|
|
2862
|
-
|
|
2861
|
+
if (i.tagName)
|
|
2862
|
+
T === ">" ? Vt(i) : L(M, T) ? i.tagName += T : i.script ? (i.script += "</" + i.tagName, i.tagName = "", i.state = r.SCRIPT) : (c(T) || S(i, "Invalid tagname in closing tag"), i.state = r.CLOSE_TAG_SAW_WHITE);
|
|
2863
2863
|
else {
|
|
2864
|
-
if (c(
|
|
2864
|
+
if (c(T))
|
|
2865
2865
|
continue;
|
|
2866
|
-
v(x,
|
|
2866
|
+
v(x, T) ? i.script ? (i.script += "</" + T, i.state = r.SCRIPT) : S(i, "Invalid tagname in closing tag.") : i.tagName = T;
|
|
2867
2867
|
}
|
|
2868
2868
|
continue;
|
|
2869
2869
|
case r.CLOSE_TAG_SAW_WHITE:
|
|
2870
|
-
if (c(
|
|
2870
|
+
if (c(T))
|
|
2871
2871
|
continue;
|
|
2872
|
-
|
|
2872
|
+
T === ">" ? Vt(i) : S(i, "Invalid characters in closing tag");
|
|
2873
2873
|
continue;
|
|
2874
2874
|
case r.TEXT_ENTITY:
|
|
2875
2875
|
case r.ATTRIB_VALUE_ENTITY_Q:
|
|
2876
2876
|
case r.ATTRIB_VALUE_ENTITY_U:
|
|
2877
2877
|
var U, k;
|
|
2878
|
-
switch (
|
|
2878
|
+
switch (i.state) {
|
|
2879
2879
|
case r.TEXT_ENTITY:
|
|
2880
2880
|
U = r.TEXT, k = "textNode";
|
|
2881
2881
|
break;
|
|
@@ -2886,20 +2886,20 @@ Actual: ` + u.attribValue
|
|
|
2886
2886
|
U = r.ATTRIB_VALUE_UNQUOTED, k = "attribValue";
|
|
2887
2887
|
break;
|
|
2888
2888
|
}
|
|
2889
|
-
if (
|
|
2890
|
-
var $ =
|
|
2891
|
-
|
|
2892
|
-
} else L(
|
|
2889
|
+
if (T === ";") {
|
|
2890
|
+
var $ = cr(i);
|
|
2891
|
+
i.opt.unparsedEntities && !Object.values(a.XML_ENTITIES).includes($) ? (i.entity = "", i.state = U, i.write($)) : (i[k] += $, i.entity = "", i.state = U);
|
|
2892
|
+
} else L(i.entity.length ? s : E, T) ? i.entity += T : (S(i, "Invalid character in entity name"), i[k] += "&" + i.entity + T, i.entity = "", i.state = U);
|
|
2893
2893
|
continue;
|
|
2894
2894
|
default:
|
|
2895
|
-
throw new Error(
|
|
2895
|
+
throw new Error(i, "Unknown state: " + i.state);
|
|
2896
2896
|
}
|
|
2897
|
-
return
|
|
2897
|
+
return i.position >= i.bufferCheckPosition && p(i), i;
|
|
2898
2898
|
}
|
|
2899
2899
|
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
|
|
2900
2900
|
String.fromCodePoint || function() {
|
|
2901
|
-
var u = String.fromCharCode,
|
|
2902
|
-
var
|
|
2901
|
+
var u = String.fromCharCode, i = Math.floor, P = function() {
|
|
2902
|
+
var T = 16384, R = [], q, U, k = -1, $ = arguments.length;
|
|
2903
2903
|
if (!$)
|
|
2904
2904
|
return "";
|
|
2905
2905
|
for (var J = ""; ++k < $; ) {
|
|
@@ -2907,43 +2907,43 @@ Actual: ` + u.attribValue
|
|
|
2907
2907
|
if (!isFinite(V) || // `NaN`, `+Infinity`, or `-Infinity`
|
|
2908
2908
|
V < 0 || // not a valid Unicode code point
|
|
2909
2909
|
V > 1114111 || // not a valid Unicode code point
|
|
2910
|
-
|
|
2910
|
+
i(V) !== V)
|
|
2911
2911
|
throw RangeError("Invalid code point: " + V);
|
|
2912
|
-
V <= 65535 ? R.push(V) : (V -= 65536, q = (V >> 10) + 55296, U = V % 1024 + 56320, R.push(q, U)), (k + 1 === $ || R.length >
|
|
2912
|
+
V <= 65535 ? R.push(V) : (V -= 65536, q = (V >> 10) + 55296, U = V % 1024 + 56320, R.push(q, U)), (k + 1 === $ || R.length > T) && (J += u.apply(null, R), R.length = 0);
|
|
2913
2913
|
}
|
|
2914
2914
|
return J;
|
|
2915
2915
|
};
|
|
2916
2916
|
Object.defineProperty ? Object.defineProperty(String, "fromCodePoint", {
|
|
2917
|
-
value:
|
|
2917
|
+
value: P,
|
|
2918
2918
|
configurable: !0,
|
|
2919
2919
|
writable: !0
|
|
2920
|
-
}) : String.fromCodePoint =
|
|
2920
|
+
}) : String.fromCodePoint = P;
|
|
2921
2921
|
}();
|
|
2922
|
-
})(
|
|
2923
|
-
}(
|
|
2922
|
+
})(n);
|
|
2923
|
+
}($t)), $t;
|
|
2924
2924
|
}
|
|
2925
|
-
var
|
|
2926
|
-
function
|
|
2927
|
-
if (
|
|
2928
|
-
|
|
2929
|
-
var
|
|
2930
|
-
return Function.prototype.apply.call(f,
|
|
2931
|
-
},
|
|
2932
|
-
|
|
2925
|
+
var it = { exports: {} }, Ye;
|
|
2926
|
+
function rn() {
|
|
2927
|
+
if (Ye) return it.exports;
|
|
2928
|
+
Ye = 1;
|
|
2929
|
+
var n = typeof Reflect == "object" ? Reflect : null, a = n && typeof n.apply == "function" ? n.apply : function(f, D, L) {
|
|
2930
|
+
return Function.prototype.apply.call(f, D, L);
|
|
2931
|
+
}, g;
|
|
2932
|
+
n && typeof n.ownKeys == "function" ? g = n.ownKeys : Object.getOwnPropertySymbols ? g = function(f) {
|
|
2933
2933
|
return Object.getOwnPropertyNames(f).concat(Object.getOwnPropertySymbols(f));
|
|
2934
|
-
} :
|
|
2934
|
+
} : g = function(f) {
|
|
2935
2935
|
return Object.getOwnPropertyNames(f);
|
|
2936
2936
|
};
|
|
2937
|
-
function
|
|
2937
|
+
function h(c) {
|
|
2938
2938
|
console && console.warn && console.warn(c);
|
|
2939
2939
|
}
|
|
2940
|
-
var
|
|
2940
|
+
var p = Number.isNaN || function(f) {
|
|
2941
2941
|
return f !== f;
|
|
2942
2942
|
};
|
|
2943
2943
|
function t() {
|
|
2944
2944
|
t.init.call(this);
|
|
2945
2945
|
}
|
|
2946
|
-
|
|
2946
|
+
it.exports = t, it.exports.once = M, t.EventEmitter = t, t.prototype._events = void 0, t.prototype._eventsCount = 0, t.prototype._maxListeners = void 0;
|
|
2947
2947
|
var e = 10;
|
|
2948
2948
|
function o(c) {
|
|
2949
2949
|
if (typeof c != "function")
|
|
@@ -2955,14 +2955,14 @@ function tn() {
|
|
|
2955
2955
|
return e;
|
|
2956
2956
|
},
|
|
2957
2957
|
set: function(c) {
|
|
2958
|
-
if (typeof c != "number" || c < 0 ||
|
|
2958
|
+
if (typeof c != "number" || c < 0 || p(c))
|
|
2959
2959
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + c + ".");
|
|
2960
2960
|
e = c;
|
|
2961
2961
|
}
|
|
2962
2962
|
}), t.init = function() {
|
|
2963
2963
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
2964
2964
|
}, t.prototype.setMaxListeners = function(f) {
|
|
2965
|
-
if (typeof f != "number" || f < 0 ||
|
|
2965
|
+
if (typeof f != "number" || f < 0 || p(f))
|
|
2966
2966
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + f + ".");
|
|
2967
2967
|
return this._maxListeners = f, this;
|
|
2968
2968
|
};
|
|
@@ -2972,7 +2972,7 @@ function tn() {
|
|
|
2972
2972
|
t.prototype.getMaxListeners = function() {
|
|
2973
2973
|
return l(this);
|
|
2974
2974
|
}, t.prototype.emit = function(f) {
|
|
2975
|
-
for (var
|
|
2975
|
+
for (var D = [], L = 1; L < arguments.length; L++) D.push(arguments[L]);
|
|
2976
2976
|
var v = f === "error", r = this._events;
|
|
2977
2977
|
if (r !== void 0)
|
|
2978
2978
|
v = v && r.error === void 0;
|
|
@@ -2980,7 +2980,7 @@ function tn() {
|
|
|
2980
2980
|
return !1;
|
|
2981
2981
|
if (v) {
|
|
2982
2982
|
var N;
|
|
2983
|
-
if (
|
|
2983
|
+
if (D.length > 0 && (N = D[0]), N instanceof Error)
|
|
2984
2984
|
throw N;
|
|
2985
2985
|
var A = new Error("Unhandled error." + (N ? " (" + N.message + ")" : ""));
|
|
2986
2986
|
throw A.context = N, A;
|
|
@@ -2989,65 +2989,65 @@ function tn() {
|
|
|
2989
2989
|
if (_ === void 0)
|
|
2990
2990
|
return !1;
|
|
2991
2991
|
if (typeof _ == "function")
|
|
2992
|
-
a(_, this,
|
|
2992
|
+
a(_, this, D);
|
|
2993
2993
|
else
|
|
2994
|
-
for (var C = _.length,
|
|
2995
|
-
a(
|
|
2994
|
+
for (var C = _.length, F = O(_, C), L = 0; L < C; ++L)
|
|
2995
|
+
a(F[L], this, D);
|
|
2996
2996
|
return !0;
|
|
2997
2997
|
};
|
|
2998
|
-
function b(c, f,
|
|
2998
|
+
function b(c, f, D, L) {
|
|
2999
2999
|
var v, r, N;
|
|
3000
|
-
if (o(
|
|
3000
|
+
if (o(D), r = c._events, r === void 0 ? (r = c._events = /* @__PURE__ */ Object.create(null), c._eventsCount = 0) : (r.newListener !== void 0 && (c.emit(
|
|
3001
3001
|
"newListener",
|
|
3002
3002
|
f,
|
|
3003
|
-
|
|
3003
|
+
D.listener ? D.listener : D
|
|
3004
3004
|
), r = c._events), N = r[f]), N === void 0)
|
|
3005
|
-
N = r[f] =
|
|
3006
|
-
else if (typeof N == "function" ? N = r[f] = L ? [
|
|
3005
|
+
N = r[f] = D, ++c._eventsCount;
|
|
3006
|
+
else if (typeof N == "function" ? N = r[f] = L ? [D, N] : [N, D] : L ? N.unshift(D) : N.push(D), v = l(c), v > 0 && N.length > v && !N.warned) {
|
|
3007
3007
|
N.warned = !0;
|
|
3008
3008
|
var A = new Error("Possible EventEmitter memory leak detected. " + N.length + " " + String(f) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3009
|
-
A.name = "MaxListenersExceededWarning", A.emitter = c, A.type = f, A.count = N.length,
|
|
3009
|
+
A.name = "MaxListenersExceededWarning", A.emitter = c, A.type = f, A.count = N.length, h(A);
|
|
3010
3010
|
}
|
|
3011
3011
|
return c;
|
|
3012
3012
|
}
|
|
3013
|
-
t.prototype.addListener = function(f,
|
|
3014
|
-
return b(this, f,
|
|
3015
|
-
}, t.prototype.on = t.prototype.addListener, t.prototype.prependListener = function(f,
|
|
3016
|
-
return b(this, f,
|
|
3013
|
+
t.prototype.addListener = function(f, D) {
|
|
3014
|
+
return b(this, f, D, !1);
|
|
3015
|
+
}, t.prototype.on = t.prototype.addListener, t.prototype.prependListener = function(f, D) {
|
|
3016
|
+
return b(this, f, D, !0);
|
|
3017
3017
|
};
|
|
3018
3018
|
function m() {
|
|
3019
3019
|
if (!this.fired)
|
|
3020
3020
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
3021
3021
|
}
|
|
3022
|
-
function y(c, f,
|
|
3023
|
-
var L = { fired: !1, wrapFn: void 0, target: c, type: f, listener:
|
|
3024
|
-
return v.listener =
|
|
3022
|
+
function y(c, f, D) {
|
|
3023
|
+
var L = { fired: !1, wrapFn: void 0, target: c, type: f, listener: D }, v = m.bind(L);
|
|
3024
|
+
return v.listener = D, L.wrapFn = v, v;
|
|
3025
3025
|
}
|
|
3026
|
-
t.prototype.once = function(f,
|
|
3027
|
-
return o(
|
|
3028
|
-
}, t.prototype.prependOnceListener = function(f,
|
|
3029
|
-
return o(
|
|
3030
|
-
}, t.prototype.removeListener = function(f,
|
|
3026
|
+
t.prototype.once = function(f, D) {
|
|
3027
|
+
return o(D), this.on(f, y(this, f, D)), this;
|
|
3028
|
+
}, t.prototype.prependOnceListener = function(f, D) {
|
|
3029
|
+
return o(D), this.prependListener(f, y(this, f, D)), this;
|
|
3030
|
+
}, t.prototype.removeListener = function(f, D) {
|
|
3031
3031
|
var L, v, r, N, A;
|
|
3032
|
-
if (o(
|
|
3032
|
+
if (o(D), v = this._events, v === void 0)
|
|
3033
3033
|
return this;
|
|
3034
3034
|
if (L = v[f], L === void 0)
|
|
3035
3035
|
return this;
|
|
3036
|
-
if (L ===
|
|
3037
|
-
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete v[f], v.removeListener && this.emit("removeListener", f, L.listener ||
|
|
3036
|
+
if (L === D || L.listener === D)
|
|
3037
|
+
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete v[f], v.removeListener && this.emit("removeListener", f, L.listener || D));
|
|
3038
3038
|
else if (typeof L != "function") {
|
|
3039
3039
|
for (r = -1, N = L.length - 1; N >= 0; N--)
|
|
3040
|
-
if (L[N] ===
|
|
3040
|
+
if (L[N] === D || L[N].listener === D) {
|
|
3041
3041
|
A = L[N].listener, r = N;
|
|
3042
3042
|
break;
|
|
3043
3043
|
}
|
|
3044
3044
|
if (r < 0)
|
|
3045
3045
|
return this;
|
|
3046
|
-
r === 0 ? L.shift() : I(L, r), L.length === 1 && (v[f] = L[0]), v.removeListener !== void 0 && this.emit("removeListener", f, A ||
|
|
3046
|
+
r === 0 ? L.shift() : I(L, r), L.length === 1 && (v[f] = L[0]), v.removeListener !== void 0 && this.emit("removeListener", f, A || D);
|
|
3047
3047
|
}
|
|
3048
3048
|
return this;
|
|
3049
3049
|
}, t.prototype.off = t.prototype.removeListener, t.prototype.removeAllListeners = function(f) {
|
|
3050
|
-
var
|
|
3050
|
+
var D, L, v;
|
|
3051
3051
|
if (L = this._events, L === void 0)
|
|
3052
3052
|
return this;
|
|
3053
3053
|
if (L.removeListener === void 0)
|
|
@@ -3058,45 +3058,45 @@ function tn() {
|
|
|
3058
3058
|
N = r[v], N !== "removeListener" && this.removeAllListeners(N);
|
|
3059
3059
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
3060
3060
|
}
|
|
3061
|
-
if (
|
|
3062
|
-
this.removeListener(f,
|
|
3063
|
-
else if (
|
|
3064
|
-
for (v =
|
|
3065
|
-
this.removeListener(f,
|
|
3061
|
+
if (D = L[f], typeof D == "function")
|
|
3062
|
+
this.removeListener(f, D);
|
|
3063
|
+
else if (D !== void 0)
|
|
3064
|
+
for (v = D.length - 1; v >= 0; v--)
|
|
3065
|
+
this.removeListener(f, D[v]);
|
|
3066
3066
|
return this;
|
|
3067
3067
|
};
|
|
3068
|
-
function d(c, f,
|
|
3068
|
+
function d(c, f, D) {
|
|
3069
3069
|
var L = c._events;
|
|
3070
3070
|
if (L === void 0)
|
|
3071
3071
|
return [];
|
|
3072
3072
|
var v = L[f];
|
|
3073
|
-
return v === void 0 ? [] : typeof v == "function" ?
|
|
3073
|
+
return v === void 0 ? [] : typeof v == "function" ? D ? [v.listener || v] : [v] : D ? x(v) : O(v, v.length);
|
|
3074
3074
|
}
|
|
3075
3075
|
t.prototype.listeners = function(f) {
|
|
3076
3076
|
return d(this, f, !0);
|
|
3077
3077
|
}, t.prototype.rawListeners = function(f) {
|
|
3078
3078
|
return d(this, f, !1);
|
|
3079
3079
|
}, t.listenerCount = function(c, f) {
|
|
3080
|
-
return typeof c.listenerCount == "function" ? c.listenerCount(f) :
|
|
3081
|
-
}, t.prototype.listenerCount =
|
|
3082
|
-
function
|
|
3080
|
+
return typeof c.listenerCount == "function" ? c.listenerCount(f) : w.call(c, f);
|
|
3081
|
+
}, t.prototype.listenerCount = w;
|
|
3082
|
+
function w(c) {
|
|
3083
3083
|
var f = this._events;
|
|
3084
3084
|
if (f !== void 0) {
|
|
3085
|
-
var
|
|
3086
|
-
if (typeof
|
|
3085
|
+
var D = f[c];
|
|
3086
|
+
if (typeof D == "function")
|
|
3087
3087
|
return 1;
|
|
3088
|
-
if (
|
|
3089
|
-
return
|
|
3088
|
+
if (D !== void 0)
|
|
3089
|
+
return D.length;
|
|
3090
3090
|
}
|
|
3091
3091
|
return 0;
|
|
3092
3092
|
}
|
|
3093
3093
|
t.prototype.eventNames = function() {
|
|
3094
|
-
return this._eventsCount > 0 ?
|
|
3094
|
+
return this._eventsCount > 0 ? g(this._events) : [];
|
|
3095
3095
|
};
|
|
3096
3096
|
function O(c, f) {
|
|
3097
|
-
for (var
|
|
3098
|
-
|
|
3099
|
-
return
|
|
3097
|
+
for (var D = new Array(f), L = 0; L < f; ++L)
|
|
3098
|
+
D[L] = c[L];
|
|
3099
|
+
return D;
|
|
3100
3100
|
}
|
|
3101
3101
|
function I(c, f) {
|
|
3102
3102
|
for (; f + 1 < c.length; f++)
|
|
@@ -3104,54 +3104,54 @@ function tn() {
|
|
|
3104
3104
|
c.pop();
|
|
3105
3105
|
}
|
|
3106
3106
|
function x(c) {
|
|
3107
|
-
for (var f = new Array(c.length),
|
|
3108
|
-
f[
|
|
3107
|
+
for (var f = new Array(c.length), D = 0; D < f.length; ++D)
|
|
3108
|
+
f[D] = c[D].listener || c[D];
|
|
3109
3109
|
return f;
|
|
3110
3110
|
}
|
|
3111
|
-
function
|
|
3112
|
-
return new Promise(function(
|
|
3111
|
+
function M(c, f) {
|
|
3112
|
+
return new Promise(function(D, L) {
|
|
3113
3113
|
function v(N) {
|
|
3114
3114
|
c.removeListener(f, r), L(N);
|
|
3115
3115
|
}
|
|
3116
3116
|
function r() {
|
|
3117
|
-
typeof c.removeListener == "function" && c.removeListener("error", v),
|
|
3117
|
+
typeof c.removeListener == "function" && c.removeListener("error", v), D([].slice.call(arguments));
|
|
3118
3118
|
}
|
|
3119
3119
|
s(c, f, r, { once: !0 }), f !== "error" && E(c, v, { once: !0 });
|
|
3120
3120
|
});
|
|
3121
3121
|
}
|
|
3122
|
-
function E(c, f,
|
|
3123
|
-
typeof c.on == "function" && s(c, "error", f,
|
|
3122
|
+
function E(c, f, D) {
|
|
3123
|
+
typeof c.on == "function" && s(c, "error", f, D);
|
|
3124
3124
|
}
|
|
3125
|
-
function s(c, f,
|
|
3125
|
+
function s(c, f, D, L) {
|
|
3126
3126
|
if (typeof c.on == "function")
|
|
3127
|
-
L.once ? c.once(f,
|
|
3127
|
+
L.once ? c.once(f, D) : c.on(f, D);
|
|
3128
3128
|
else if (typeof c.addEventListener == "function")
|
|
3129
3129
|
c.addEventListener(f, function v(r) {
|
|
3130
|
-
L.once && c.removeEventListener(f, v),
|
|
3130
|
+
L.once && c.removeEventListener(f, v), D(r);
|
|
3131
3131
|
});
|
|
3132
3132
|
else
|
|
3133
3133
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof c);
|
|
3134
3134
|
}
|
|
3135
|
-
return
|
|
3135
|
+
return it.exports;
|
|
3136
3136
|
}
|
|
3137
|
-
var
|
|
3138
|
-
function
|
|
3139
|
-
return
|
|
3140
|
-
|
|
3141
|
-
return
|
|
3137
|
+
var ot = {}, Ke;
|
|
3138
|
+
function nn() {
|
|
3139
|
+
return Ke || (Ke = 1, (function() {
|
|
3140
|
+
ot.stripBOM = function(n) {
|
|
3141
|
+
return n[0] === "\uFEFF" ? n.substring(1) : n;
|
|
3142
3142
|
};
|
|
3143
|
-
}).call(
|
|
3143
|
+
}).call(ot)), ot;
|
|
3144
3144
|
}
|
|
3145
|
-
var Q = {},
|
|
3145
|
+
var Q = {}, ze;
|
|
3146
3146
|
function or() {
|
|
3147
|
-
return
|
|
3148
|
-
var
|
|
3149
|
-
|
|
3147
|
+
return ze || (ze = 1, (function() {
|
|
3148
|
+
var n;
|
|
3149
|
+
n = new RegExp(/(?!xmlns)^.*:/), Q.normalize = function(a) {
|
|
3150
3150
|
return a.toLowerCase();
|
|
3151
3151
|
}, Q.firstCharLowerCase = function(a) {
|
|
3152
3152
|
return a.charAt(0).toLowerCase() + a.slice(1);
|
|
3153
3153
|
}, Q.stripPrefix = function(a) {
|
|
3154
|
-
return a.replace(
|
|
3154
|
+
return a.replace(n, "");
|
|
3155
3155
|
}, Q.parseNumbers = function(a) {
|
|
3156
3156
|
return isNaN(a) || (a = a % 1 === 0 ? parseInt(a, 10) : parseFloat(a)), a;
|
|
3157
3157
|
}, Q.parseBooleans = function(a) {
|
|
@@ -3159,42 +3159,42 @@ function or() {
|
|
|
3159
3159
|
};
|
|
3160
3160
|
}).call(Q)), Q;
|
|
3161
3161
|
}
|
|
3162
|
-
var
|
|
3163
|
-
function
|
|
3164
|
-
return
|
|
3162
|
+
var He;
|
|
3163
|
+
function on() {
|
|
3164
|
+
return He || (He = 1, function(n) {
|
|
3165
3165
|
(function() {
|
|
3166
|
-
var a,
|
|
3166
|
+
var a, g, h, p, t, e, o, l, b, m = function(w, O) {
|
|
3167
3167
|
return function() {
|
|
3168
|
-
return
|
|
3168
|
+
return w.apply(O, arguments);
|
|
3169
3169
|
};
|
|
3170
|
-
}, y = function(
|
|
3170
|
+
}, y = function(w, O) {
|
|
3171
3171
|
for (var I in O)
|
|
3172
|
-
d.call(O, I) && (
|
|
3172
|
+
d.call(O, I) && (w[I] = O[I]);
|
|
3173
3173
|
function x() {
|
|
3174
|
-
this.constructor =
|
|
3174
|
+
this.constructor = w;
|
|
3175
3175
|
}
|
|
3176
|
-
return x.prototype = O.prototype,
|
|
3176
|
+
return x.prototype = O.prototype, w.prototype = new x(), w.__super__ = O.prototype, w;
|
|
3177
3177
|
}, d = {}.hasOwnProperty;
|
|
3178
|
-
l =
|
|
3179
|
-
return typeof
|
|
3180
|
-
}, e = function(
|
|
3181
|
-
var x,
|
|
3182
|
-
for (x = 0,
|
|
3183
|
-
E =
|
|
3178
|
+
l = en(), p = rn(), a = nn(), o = or(), b = Gt.setImmediate, g = Wt().defaults, t = function(w) {
|
|
3179
|
+
return typeof w == "object" && w != null && Object.keys(w).length === 0;
|
|
3180
|
+
}, e = function(w, O, I) {
|
|
3181
|
+
var x, M, E;
|
|
3182
|
+
for (x = 0, M = w.length; x < M; x++)
|
|
3183
|
+
E = w[x], O = E(O, I);
|
|
3184
3184
|
return O;
|
|
3185
|
-
},
|
|
3185
|
+
}, h = function(w, O, I) {
|
|
3186
3186
|
var x;
|
|
3187
|
-
return x = /* @__PURE__ */ Object.create(null), x.value = I, x.writable = !0, x.enumerable = !0, x.configurable = !0, Object.defineProperty(
|
|
3188
|
-
},
|
|
3189
|
-
y(O,
|
|
3187
|
+
return x = /* @__PURE__ */ Object.create(null), x.value = I, x.writable = !0, x.enumerable = !0, x.configurable = !0, Object.defineProperty(w, O, x);
|
|
3188
|
+
}, n.Parser = function(w) {
|
|
3189
|
+
y(O, w);
|
|
3190
3190
|
function O(I) {
|
|
3191
3191
|
this.parseStringPromise = m(this.parseStringPromise, this), this.parseString = m(this.parseString, this), this.reset = m(this.reset, this), this.assignOrPush = m(this.assignOrPush, this), this.processAsync = m(this.processAsync, this);
|
|
3192
|
-
var x,
|
|
3193
|
-
if (!(this instanceof
|
|
3194
|
-
return new
|
|
3195
|
-
this.options = {},
|
|
3196
|
-
for (x in
|
|
3197
|
-
d.call(
|
|
3192
|
+
var x, M, E;
|
|
3193
|
+
if (!(this instanceof n.Parser))
|
|
3194
|
+
return new n.Parser(I);
|
|
3195
|
+
this.options = {}, M = g["0.2"];
|
|
3196
|
+
for (x in M)
|
|
3197
|
+
d.call(M, x) && (E = M[x], this.options[x] = E);
|
|
3198
3198
|
for (x in I)
|
|
3199
3199
|
d.call(I, x) && (E = I[x], this.options[x] = E);
|
|
3200
3200
|
this.options.xmlns && (this.options.xmlnskey = this.options.attrkey + "ns"), this.options.normalizeTags && (this.options.tagNameProcessors || (this.options.tagNameProcessors = []), this.options.tagNameProcessors.unshift(o.normalize)), this.reset();
|
|
@@ -3203,14 +3203,14 @@ function rn() {
|
|
|
3203
3203
|
var I, x;
|
|
3204
3204
|
try {
|
|
3205
3205
|
return this.remaining.length <= this.options.chunkSize ? (I = this.remaining, this.remaining = "", this.saxParser = this.saxParser.write(I), this.saxParser.close()) : (I = this.remaining.substr(0, this.options.chunkSize), this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length), this.saxParser = this.saxParser.write(I), b(this.processAsync));
|
|
3206
|
-
} catch (
|
|
3207
|
-
if (x =
|
|
3206
|
+
} catch (M) {
|
|
3207
|
+
if (x = M, !this.saxParser.errThrown)
|
|
3208
3208
|
return this.saxParser.errThrown = !0, this.emit(x);
|
|
3209
3209
|
}
|
|
3210
|
-
}, O.prototype.assignOrPush = function(I, x,
|
|
3211
|
-
return x in I ? (I[x] instanceof Array ||
|
|
3210
|
+
}, O.prototype.assignOrPush = function(I, x, M) {
|
|
3211
|
+
return x in I ? (I[x] instanceof Array || h(I, x, [I[x]]), I[x].push(M)) : this.options.explicitArray ? h(I, x, [M]) : h(I, x, M);
|
|
3212
3212
|
}, O.prototype.reset = function() {
|
|
3213
|
-
var I, x,
|
|
3213
|
+
var I, x, M, E;
|
|
3214
3214
|
return this.removeAllListeners(), this.saxParser = l.parser(this.options.strict, {
|
|
3215
3215
|
trim: !1,
|
|
3216
3216
|
normalize: !1,
|
|
@@ -3227,11 +3227,11 @@ function rn() {
|
|
|
3227
3227
|
};
|
|
3228
3228
|
}(this), this.saxParser.ended = !1, this.EXPLICIT_CHARKEY = this.options.explicitCharkey, this.resultObject = null, E = [], I = this.options.attrkey, x = this.options.charkey, this.saxParser.onopentag = /* @__PURE__ */ function(s) {
|
|
3229
3229
|
return function(c) {
|
|
3230
|
-
var f,
|
|
3230
|
+
var f, D, L, v, r;
|
|
3231
3231
|
if (L = {}, L[x] = "", !s.options.ignoreAttrs) {
|
|
3232
3232
|
r = c.attributes;
|
|
3233
3233
|
for (f in r)
|
|
3234
|
-
d.call(r, f) && (!(I in L) && !s.options.mergeAttrs && (L[I] = {}),
|
|
3234
|
+
d.call(r, f) && (!(I in L) && !s.options.mergeAttrs && (L[I] = {}), D = s.options.attrValueProcessors ? e(s.options.attrValueProcessors, c.attributes[f], f) : c.attributes[f], v = s.options.attrNameProcessors ? e(s.options.attrNameProcessors, f) : f, s.options.mergeAttrs ? s.assignOrPush(L, v, D) : h(L[I], v, D));
|
|
3235
3235
|
}
|
|
3236
3236
|
return L["#name"] = s.options.tagNameProcessors ? e(s.options.tagNameProcessors, c.name) : c.name, s.options.xmlns && (L[s.options.xmlnskey] = {
|
|
3237
3237
|
uri: c.uri,
|
|
@@ -3240,48 +3240,48 @@ function rn() {
|
|
|
3240
3240
|
};
|
|
3241
3241
|
}(this), this.saxParser.onclosetag = /* @__PURE__ */ function(s) {
|
|
3242
3242
|
return function() {
|
|
3243
|
-
var c, f,
|
|
3243
|
+
var c, f, D, L, v, r, N, A, _, C;
|
|
3244
3244
|
if (r = E.pop(), v = r["#name"], (!s.options.explicitChildren || !s.options.preserveChildrenOrder) && delete r["#name"], r.cdata === !0 && (c = r.cdata, delete r.cdata), _ = E[E.length - 1], r[x].match(/^\s*$/) && !c ? (f = r[x], delete r[x]) : (s.options.trim && (r[x] = r[x].trim()), s.options.normalize && (r[x] = r[x].replace(/\s{2,}/g, " ").trim()), r[x] = s.options.valueProcessors ? e(s.options.valueProcessors, r[x], v) : r[x], Object.keys(r).length === 1 && x in r && !s.EXPLICIT_CHARKEY && (r = r[x])), t(r) && (typeof s.options.emptyTag == "function" ? r = s.options.emptyTag() : r = s.options.emptyTag !== "" ? s.options.emptyTag : f), s.options.validator != null && (C = "/" + function() {
|
|
3245
|
-
var
|
|
3246
|
-
for (
|
|
3247
|
-
L = E[
|
|
3248
|
-
return
|
|
3245
|
+
var F, j, X;
|
|
3246
|
+
for (X = [], F = 0, j = E.length; F < j; F++)
|
|
3247
|
+
L = E[F], X.push(L["#name"]);
|
|
3248
|
+
return X;
|
|
3249
3249
|
}().concat(v).join("/"), function() {
|
|
3250
|
-
var
|
|
3250
|
+
var F;
|
|
3251
3251
|
try {
|
|
3252
3252
|
return r = s.options.validator(C, _ && _[v], r);
|
|
3253
3253
|
} catch (j) {
|
|
3254
|
-
return
|
|
3254
|
+
return F = j, s.emit("error", F);
|
|
3255
3255
|
}
|
|
3256
3256
|
}()), s.options.explicitChildren && !s.options.mergeAttrs && typeof r == "object") {
|
|
3257
3257
|
if (!s.options.preserveChildrenOrder)
|
|
3258
3258
|
L = {}, s.options.attrkey in r && (L[s.options.attrkey] = r[s.options.attrkey], delete r[s.options.attrkey]), !s.options.charsAsChildren && s.options.charkey in r && (L[s.options.charkey] = r[s.options.charkey], delete r[s.options.charkey]), Object.getOwnPropertyNames(r).length > 0 && (L[s.options.childkey] = r), r = L;
|
|
3259
3259
|
else if (_) {
|
|
3260
3260
|
_[s.options.childkey] = _[s.options.childkey] || [], N = {};
|
|
3261
|
-
for (
|
|
3262
|
-
d.call(r,
|
|
3261
|
+
for (D in r)
|
|
3262
|
+
d.call(r, D) && h(N, D, r[D]);
|
|
3263
3263
|
_[s.options.childkey].push(N), delete r["#name"], Object.keys(r).length === 1 && x in r && !s.EXPLICIT_CHARKEY && (r = r[x]);
|
|
3264
3264
|
}
|
|
3265
3265
|
}
|
|
3266
|
-
return E.length > 0 ? s.assignOrPush(_, v, r) : (s.options.explicitRoot && (A = r, r = {},
|
|
3266
|
+
return E.length > 0 ? s.assignOrPush(_, v, r) : (s.options.explicitRoot && (A = r, r = {}, h(r, v, A)), s.resultObject = r, s.saxParser.ended = !0, s.emit("end", s.resultObject));
|
|
3267
3267
|
};
|
|
3268
|
-
}(this),
|
|
3268
|
+
}(this), M = /* @__PURE__ */ function(s) {
|
|
3269
3269
|
return function(c) {
|
|
3270
|
-
var f,
|
|
3271
|
-
if (
|
|
3272
|
-
return
|
|
3270
|
+
var f, D;
|
|
3271
|
+
if (D = E[E.length - 1], D)
|
|
3272
|
+
return D[x] += c, s.options.explicitChildren && s.options.preserveChildrenOrder && s.options.charsAsChildren && (s.options.includeWhiteChars || c.replace(/\\n/g, "").trim() !== "") && (D[s.options.childkey] = D[s.options.childkey] || [], f = {
|
|
3273
3273
|
"#name": "__text__"
|
|
3274
|
-
}, f[x] = c, s.options.normalize && (f[x] = f[x].replace(/\s{2,}/g, " ").trim()),
|
|
3274
|
+
}, f[x] = c, s.options.normalize && (f[x] = f[x].replace(/\s{2,}/g, " ").trim()), D[s.options.childkey].push(f)), D;
|
|
3275
3275
|
};
|
|
3276
|
-
}(this), this.saxParser.ontext =
|
|
3276
|
+
}(this), this.saxParser.ontext = M, this.saxParser.oncdata = /* @__PURE__ */ function(s) {
|
|
3277
3277
|
return function(c) {
|
|
3278
3278
|
var f;
|
|
3279
|
-
if (f =
|
|
3279
|
+
if (f = M(c), f)
|
|
3280
3280
|
return f.cdata = !0;
|
|
3281
3281
|
};
|
|
3282
3282
|
}();
|
|
3283
3283
|
}, O.prototype.parseString = function(I, x) {
|
|
3284
|
-
var
|
|
3284
|
+
var M;
|
|
3285
3285
|
x != null && typeof x == "function" && (this.on("end", function(E) {
|
|
3286
3286
|
return this.reset(), x(null, E);
|
|
3287
3287
|
}), this.on("error", function(E) {
|
|
@@ -3290,34 +3290,34 @@ function rn() {
|
|
|
3290
3290
|
try {
|
|
3291
3291
|
return I = I.toString(), I.trim() === "" ? (this.emit("end", null), !0) : (I = a.stripBOM(I), this.options.async ? (this.remaining = I, b(this.processAsync), this.saxParser) : this.saxParser.write(I).close());
|
|
3292
3292
|
} catch (E) {
|
|
3293
|
-
if (
|
|
3293
|
+
if (M = E, this.saxParser.errThrown || this.saxParser.ended) {
|
|
3294
3294
|
if (this.saxParser.ended)
|
|
3295
|
-
throw
|
|
3296
|
-
} else return this.emit("error",
|
|
3295
|
+
throw M;
|
|
3296
|
+
} else return this.emit("error", M), this.saxParser.errThrown = !0;
|
|
3297
3297
|
}
|
|
3298
3298
|
}, O.prototype.parseStringPromise = function(I) {
|
|
3299
3299
|
return new Promise(/* @__PURE__ */ function(x) {
|
|
3300
|
-
return function(
|
|
3300
|
+
return function(M, E) {
|
|
3301
3301
|
return x.parseString(I, function(s, c) {
|
|
3302
|
-
return s ? E(s) :
|
|
3302
|
+
return s ? E(s) : M(c);
|
|
3303
3303
|
});
|
|
3304
3304
|
};
|
|
3305
3305
|
}(this));
|
|
3306
3306
|
}, O;
|
|
3307
|
-
}(
|
|
3308
|
-
var x,
|
|
3309
|
-
return I != null ? (typeof I == "function" && (x = I), typeof O == "object" && (
|
|
3310
|
-
},
|
|
3307
|
+
}(p), n.parseString = function(w, O, I) {
|
|
3308
|
+
var x, M, E;
|
|
3309
|
+
return I != null ? (typeof I == "function" && (x = I), typeof O == "object" && (M = O)) : (typeof O == "function" && (x = O), M = {}), E = new n.Parser(M), E.parseString(w, x);
|
|
3310
|
+
}, n.parseStringPromise = function(w, O) {
|
|
3311
3311
|
var I, x;
|
|
3312
|
-
return typeof O == "object" && (I = O), x = new
|
|
3312
|
+
return typeof O == "object" && (I = O), x = new n.Parser(I), x.parseStringPromise(w);
|
|
3313
3313
|
};
|
|
3314
|
-
}).call(
|
|
3315
|
-
}(
|
|
3314
|
+
}).call(nt);
|
|
3315
|
+
}(nt)), nt;
|
|
3316
3316
|
}
|
|
3317
|
-
var
|
|
3318
|
-
function
|
|
3319
|
-
return
|
|
3320
|
-
var
|
|
3317
|
+
var Qe;
|
|
3318
|
+
function sn() {
|
|
3319
|
+
return Qe || (Qe = 1, (function() {
|
|
3320
|
+
var n, a, g, h, p = function(e, o) {
|
|
3321
3321
|
for (var l in o)
|
|
3322
3322
|
t.call(o, l) && (e[l] = o[l]);
|
|
3323
3323
|
function b() {
|
|
@@ -3325,49 +3325,85 @@ function nn() {
|
|
|
3325
3325
|
}
|
|
3326
3326
|
return b.prototype = o.prototype, e.prototype = new b(), e.__super__ = o.prototype, e;
|
|
3327
3327
|
}, t = {}.hasOwnProperty;
|
|
3328
|
-
a = Wt(),
|
|
3329
|
-
|
|
3328
|
+
a = Wt(), n = Zr(), g = on(), h = or(), W.defaults = a.defaults, W.processors = h, W.ValidationError = function(e) {
|
|
3329
|
+
p(o, e);
|
|
3330
3330
|
function o(l) {
|
|
3331
3331
|
this.message = l;
|
|
3332
3332
|
}
|
|
3333
3333
|
return o;
|
|
3334
|
-
}(Error),
|
|
3335
|
-
}).call(
|
|
3334
|
+
}(Error), W.Builder = n.Builder, W.Parser = g.Parser, W.parseString = g.parseString, W.parseStringPromise = g.parseStringPromise;
|
|
3335
|
+
}).call(W)), W;
|
|
3336
3336
|
}
|
|
3337
|
-
var
|
|
3338
|
-
const
|
|
3337
|
+
var Ze = sn();
|
|
3338
|
+
const un = (n) => n !== null && typeof n == "object" && n.hasOwnProperty("rss") && typeof n.rss == "object" && n.rss !== null && n.rss.hasOwnProperty("channel") && Array.isArray(n.rss.channel), an = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("title") && Array.isArray(n.title) && n.hasOwnProperty("description") && Array.isArray(n.description) && n.hasOwnProperty("link") && Array.isArray(n.link) && n.hasOwnProperty("image") && Array.isArray(n.image) && n.image.every(cn) && n.hasOwnProperty("generator") && Array.isArray(n.generator) && n.hasOwnProperty("lastBuildDate") && Array.isArray(n.lastBuildDate) && n.hasOwnProperty("atom:link") && Array.isArray(n["atom:link"]) && n["atom:link"].every(ln) && n.hasOwnProperty("copyright") && Array.isArray(n.copyright) && n.hasOwnProperty("language") && Array.isArray(n.language) && n.hasOwnProperty("webMaster") && Array.isArray(n.webMaster) && n.hasOwnProperty("itunes:owner") && Array.isArray(n["itunes:owner"]) && n["itunes:owner"].every(fn) && n.hasOwnProperty("itunes:author") && Array.isArray(n["itunes:author"]) && n.hasOwnProperty("googleplay:owner") && Array.isArray(n["googleplay:owner"]) && n.hasOwnProperty("googleplay:email") && Array.isArray(n["googleplay:email"]) && n.hasOwnProperty("googleplay:author") && Array.isArray(n["googleplay:author"]) && n.hasOwnProperty("item") && Array.isArray(n.item) && n.item.every(hn), cn = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("url") && Array.isArray(n.url) && n.hasOwnProperty("title") && Array.isArray(n.title) && n.hasOwnProperty("link") && Array.isArray(n.link), ln = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("$") && typeof n.$ == "object" && n.$ !== null && n.$.hasOwnProperty("href") && typeof n.$.href == "string" && n.$.hasOwnProperty("rel") && typeof n.$.rel == "string" && n.$.hasOwnProperty("type") && typeof n.$.type == "string", fn = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("itunes:email") && Array.isArray(n["itunes:email"]) && n.hasOwnProperty("itunes:name") && Array.isArray(n["itunes:name"]), hn = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("title") && Array.isArray(n.title) && n.hasOwnProperty("description") && Array.isArray(n.description) && n.hasOwnProperty("link") && Array.isArray(n.link) && n.hasOwnProperty("guid") && Array.isArray(n.guid) && n.guid.every(pn) && n.hasOwnProperty("dc:creator") && Array.isArray(n["dc:creator"]) && n.hasOwnProperty("pubDate") && Array.isArray(n.pubDate) && n.hasOwnProperty("enclosure") && Array.isArray(n.enclosure) && n.enclosure.every(dn) && n.hasOwnProperty("content:encoded") && Array.isArray(n["content:encoded"]), pn = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("_") && typeof n._ == "string" && n.hasOwnProperty("$") && typeof n.$ == "object" && n.$ !== null && n.$.hasOwnProperty("isPermaLink") && typeof n.$.isPermaLink == "string", dn = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("$") && typeof n.$ == "object" && n.$ !== null && n.$.hasOwnProperty("url") && typeof n.$.url == "string" && n.$.hasOwnProperty("length") && typeof n.$.length == "string" && n.$.hasOwnProperty("type") && typeof n.$.type == "string", yn = (n) => n && n.contents && n.status.http_code == 200, mn = (n) => n !== null && typeof n == "object" && n.hasOwnProperty("rss"), gn = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("channel"), wn = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("title") && n.hasOwnProperty("item"), sr = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("title") && n.hasOwnProperty("link") && n.hasOwnProperty("book_image_url") && n.hasOwnProperty("author_name") && n.hasOwnProperty("book_description"), Tn = (n) => typeof n == "object" && n !== null && n.hasOwnProperty("contents") && n.hasOwnProperty("status"), ur = "https://api.allorigins.win/get?url=", tt = typeof document < "u", Dn = async (n) => {
|
|
3339
3339
|
try {
|
|
3340
|
-
const a =
|
|
3341
|
-
if (
|
|
3340
|
+
const a = tt ? `${ur}${encodeURIComponent(n)}` : n, g = await fetch(a);
|
|
3341
|
+
if (g.ok) return tt ? g.json() : g.text();
|
|
3342
3342
|
} catch {
|
|
3343
3343
|
throw new Error("Error occurred fetching Feed from Substack");
|
|
3344
3344
|
}
|
|
3345
|
-
},
|
|
3346
|
-
if (!a) return
|
|
3347
|
-
|
|
3348
|
-
},
|
|
3349
|
-
title:
|
|
3350
|
-
description:
|
|
3351
|
-
link:
|
|
3352
|
-
pubDate:
|
|
3353
|
-
content:
|
|
3354
|
-
}),
|
|
3355
|
-
const
|
|
3356
|
-
if (
|
|
3357
|
-
return
|
|
3358
|
-
if (!
|
|
3345
|
+
}, Rt = async (n = "", a) => {
|
|
3346
|
+
if (!a) return Ze.parseStringPromise(n);
|
|
3347
|
+
Ze.parseString(n, a);
|
|
3348
|
+
}, En = (n) => ({
|
|
3349
|
+
title: n.title[0],
|
|
3350
|
+
description: n.description[0],
|
|
3351
|
+
link: n.link[0],
|
|
3352
|
+
pubDate: n.pubDate[0],
|
|
3353
|
+
content: n["content:encoded"][0]
|
|
3354
|
+
}), Nn = async (n, a) => {
|
|
3355
|
+
const g = await Dn(n);
|
|
3356
|
+
if (!tt)
|
|
3357
|
+
return Rt(g, a);
|
|
3358
|
+
if (!yn(g))
|
|
3359
3359
|
throw new Error("Error occurred fetching Feed from Substack");
|
|
3360
|
-
await
|
|
3361
|
-
},
|
|
3362
|
-
if (!
|
|
3360
|
+
await Rt(g.contents, a);
|
|
3361
|
+
}, vn = (n, a) => {
|
|
3362
|
+
if (!un(n)) throw new Error("Feed is not in the correct format");
|
|
3363
3363
|
try {
|
|
3364
|
-
return
|
|
3364
|
+
return n.rss.channel.filter(an).filter((g) => g.link[0] === a);
|
|
3365
3365
|
} catch {
|
|
3366
3366
|
throw new Error(`Error occurred fetching Feed by Link: ${a}`);
|
|
3367
3367
|
}
|
|
3368
|
-
},
|
|
3368
|
+
}, Ln = (n) => n[0].item.map(En), bn = (n) => {
|
|
3369
|
+
if (!sr(n))
|
|
3370
|
+
throw new Error("Goodreads item is not in the correct format");
|
|
3371
|
+
return {
|
|
3372
|
+
title: n.title[0],
|
|
3373
|
+
link: n.link[0],
|
|
3374
|
+
book_image_url: n.book_image_url[0],
|
|
3375
|
+
author_name: n.author_name[0],
|
|
3376
|
+
book_description: n.book_description[0]
|
|
3377
|
+
};
|
|
3378
|
+
}, On = async (n) => {
|
|
3379
|
+
try {
|
|
3380
|
+
const a = tt ? `${ur}${encodeURIComponent(n)}` : n, g = await fetch(a);
|
|
3381
|
+
if (g.ok) return tt ? g.json() : g.text();
|
|
3382
|
+
} catch {
|
|
3383
|
+
throw new Error("Error occurred fetching Feed from Goodreads");
|
|
3384
|
+
}
|
|
3385
|
+
}, In = async (n, a) => {
|
|
3386
|
+
const g = await On(n);
|
|
3387
|
+
if (!tt)
|
|
3388
|
+
return Rt(g, a);
|
|
3389
|
+
if (!Tn(g))
|
|
3390
|
+
throw new Error("Error occurred fetching Feed from Goodreads");
|
|
3391
|
+
await Rt(g.contents, a);
|
|
3392
|
+
}, xn = (n) => {
|
|
3393
|
+
if (!mn(n))
|
|
3394
|
+
throw new Error("Goodreads feed is not in the correct format");
|
|
3395
|
+
if (!gn(n.rss))
|
|
3396
|
+
throw new Error("Goodreads RSS feed is not in the correct format");
|
|
3397
|
+
const a = n.rss.channel.filter(wn);
|
|
3398
|
+
if (a.length === 0)
|
|
3399
|
+
throw new Error("Goodreads feed does not contain any channels");
|
|
3400
|
+
const g = a[0];
|
|
3401
|
+
return Array.isArray(g.item) ? g.item.filter(sr).map(bn) : [];
|
|
3402
|
+
};
|
|
3369
3403
|
export {
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3404
|
+
vn as getFeedByLink,
|
|
3405
|
+
In as getGoodreadsFeed,
|
|
3406
|
+
xn as getGoodreadsFeedItems,
|
|
3407
|
+
Ln as getPosts,
|
|
3408
|
+
Nn as getSubstackFeed
|
|
3373
3409
|
};
|