@prose-reader/enhancer-pdf 1.306.0 → 1.308.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/index.js CHANGED
@@ -1,59 +1,1215 @@
1
- import * as e from "pdfjs-dist";
2
- import { RenderingCancelledException as t, TextLayer as n } from "pdfjs-dist";
3
- import { EMPTY as r, catchError as i, from as a, map as o, mergeMap as s, of as c, switchMap as l, tap as u } from "rxjs";
1
+ import { EMPTY as e, catchError as t, from as n, map as r, mergeMap as i, of as a, switchMap as o, tap as s } from "rxjs";
2
+ import * as c from "pdfjs-dist";
3
+ import { RenderingCancelledException as l, TextLayer as u } from "pdfjs-dist";
4
4
  import { DocumentRenderer as d, injectCSSToFrame as f, setAttributeIfChanged as p, setPropertyIfChanged as m, setStylePropertyIfChanged as h, upsertCSSToFrame as g, waitForFrameLoad as _, waitForFrameReady as v, waitForSwitch as y } from "@prose-reader/core";
5
- //#region src/createArchiveFromPdf.ts
6
- var b = Symbol("pdfjs"), x = (e) => "_symbol" in e && e._symbol === b, S = async (t, n) => {
7
- let r = await e.getDocument(await t.arrayBuffer()).promise, i = Array.from({ length: r.numPages }), a = i.map((e, t) => ({
5
+ //#region \0rolldown/runtime.js
6
+ var b = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), x = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
7
+ if (typeof require < "u") return require.apply(this, arguments);
8
+ throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
9
+ });
10
+ function S(e) {
11
+ let t = [];
12
+ if (e.length === 0) return "";
13
+ if (typeof e[0] != "string") throw TypeError(`Url must be a string. Received ${e[0]}`);
14
+ e[0].match(/^[^/:]+:\/*$/) && e.length > 1 && (e[0] = e.shift() + e[0]), e[0].match(/^file:\/\/\//) ? e[0] = e[0].replace(/^([^/:]+):\/*/, "$1:///") : e[0] = e[0].replace(/^([^/:]+):\/*/, "$1://");
15
+ for (let n = 0; n < e.length; n++) {
16
+ let r = e[n];
17
+ if (typeof r != "string") throw TypeError(`Url must be a string. Received ${r}`);
18
+ r !== "" && (n > 0 && (r = r.replace(/^[/]+/, "")), r = n < e.length - 1 ? r.replace(/[/]+$/, "") : r.replace(/[/]+$/, "/"), t.push(r));
19
+ }
20
+ let n = t.join("/");
21
+ n = n.replace(/\/(\?|&|#[^!])/g, "$1");
22
+ let r = n.split("?");
23
+ return n = r.shift() + (r.length > 0 ? "?" : "") + r.join("&"), n;
24
+ }
25
+ function C(...e) {
26
+ return S(Array.from(Array.isArray(e[0]) ? e[0] : e));
27
+ }
28
+ var w = () => {
29
+ if (!(typeof window > "u")) return window;
30
+ };
31
+ function T() {
32
+ let e = w()?.__PROSE_READER_DEBUG;
33
+ return e === !0 || e === "true";
34
+ }
35
+ var E = (e, t) => typeof e == "boolean" ? {
36
+ enabled: e,
37
+ options: t
38
+ } : {
39
+ enabled: e?.enabled,
40
+ options: e ?? t
41
+ }, D = (e) => e.at(-1)?.color, O = (e) => {
42
+ if (!e.length) return;
43
+ if (!e.some((e) => e.color)) return [e.map((e) => e.label).join(" ")];
44
+ let t = "", n = [];
45
+ for (let r of e) t += `%c${t ? ` ${r.label}` : r.label}`, n.push(r.color ? `color: ${r.color}` : "");
46
+ return [t, ...n];
47
+ }, k = (e = [], t = T()) => {
48
+ let n = t, r = {
49
+ enable: (e) => {
50
+ a(e);
51
+ },
52
+ namespace: (t, r, i) => {
53
+ let a = E(r, i), o = a.options?.color ?? D(e);
54
+ return k([...e, {
55
+ label: `[${t}]`,
56
+ color: o
57
+ }], a.enabled ?? n);
58
+ },
59
+ isEnabled: () => n,
60
+ debug: () => {},
61
+ info: () => {},
62
+ log: () => {},
63
+ groupCollapsed: () => {},
64
+ groupEnd: () => {},
65
+ getGroupArgs: (t) => {
66
+ let n = O(e);
67
+ if (!n) return [t];
68
+ let [r, ...i] = n;
69
+ return [`${r} ${t}`, ...i];
70
+ },
71
+ warn: () => {},
72
+ error: () => {}
73
+ }, i = (t) => {
74
+ if (!t) {
75
+ r.debug = () => {}, r.info = () => {}, r.log = () => {}, r.groupCollapsed = () => {}, r.groupEnd = () => {}, r.warn = () => {}, r.error = () => {};
76
+ return;
77
+ }
78
+ let n = O(e) ?? [];
79
+ r.debug = Function.prototype.bind.call(console.debug, console, ...n), r.info = Function.prototype.bind.call(console.info, console, ...n), r.log = Function.prototype.bind.call(console.log, console, ...n), r.groupCollapsed = Function.prototype.bind.call(console.groupCollapsed, console), r.groupEnd = Function.prototype.bind.call(console.groupEnd, console), r.warn = Function.prototype.bind.call(console.warn, console, ...n), r.error = Function.prototype.bind.call(console.error, console, ...n);
80
+ }, a = (e) => {
81
+ n !== e && (n = e, i(n));
82
+ };
83
+ return i(n), r;
84
+ }, A = k().namespace("@prose-reader/streamer", !1, { color: "#ffae42" }), j = (e) => {
85
+ let t = {};
86
+ for (let n of e) {
87
+ let e = n.split("/"), r = t;
88
+ for (let t = 0; t < e.length; t++) {
89
+ let n = e[t];
90
+ n !== void 0 && (r[n] || (r[n] = {}), r = r[n]);
91
+ }
92
+ }
93
+ let n = (e, t = "") => Object.keys(e).sort().map((r, i, a) => {
94
+ let o = i === a.length - 1, s = t + (o ? "└── " : "├── "), c = t + (o ? " " : "│ "), l = e[r];
95
+ return l && Object.keys(l).length > 0 ? `${s}${r}/\n${n(l, c)}` : `${s}${r}`;
96
+ }).join("\n");
97
+ return n(t);
98
+ }, M = ({ records: e, ...t }) => {
99
+ let n = /* @__PURE__ */ new Map();
100
+ for (let t of e) n.has(t.uri) || n.set(t.uri, t);
101
+ let r = {
102
+ ...t,
103
+ records: e,
104
+ recordsByUri: n
105
+ };
106
+ if (A.log("Generated archive", r), process.env.NODE_ENV === "development" && A.isEnabled()) {
107
+ let t = j(e.map((e) => e.uri));
108
+ A.groupCollapsed(...A.getGroupArgs("Archive folder structure")), A.log(`\n${t}`), A.groupEnd();
109
+ }
110
+ return r;
111
+ }, N = (e) => ({
112
+ blob: e,
113
+ arrayBuffer: () => e().then((e) => e.arrayBuffer())
114
+ }), P = /* @__PURE__ */ b(((e) => {
115
+ (function(e) {
116
+ e.parser = function(e, t) {
117
+ return new n(e, t);
118
+ }, e.SAXParser = n, e.SAXStream = u, e.createStream = c, e.MAX_BUFFER_LENGTH = 64 * 1024;
119
+ var t = [
120
+ "comment",
121
+ "sgmlDecl",
122
+ "textNode",
123
+ "tagName",
124
+ "doctype",
125
+ "procInstName",
126
+ "procInstBody",
127
+ "entity",
128
+ "attribName",
129
+ "attribValue",
130
+ "cdata",
131
+ "script"
132
+ ];
133
+ e.EVENTS = [
134
+ "text",
135
+ "processinginstruction",
136
+ "sgmldeclaration",
137
+ "doctype",
138
+ "comment",
139
+ "opentagstart",
140
+ "attribute",
141
+ "opentag",
142
+ "closetag",
143
+ "opencdata",
144
+ "cdata",
145
+ "closecdata",
146
+ "error",
147
+ "end",
148
+ "ready",
149
+ "script",
150
+ "opennamespace",
151
+ "closenamespace"
152
+ ];
153
+ function n(t, r) {
154
+ if (!(this instanceof n)) return new n(t, r);
155
+ var a = this;
156
+ i(a), a.q = a.c = "", a.bufferCheckPosition = e.MAX_BUFFER_LENGTH, a.encoding = null, a.opt = r || {}, a.opt.lowercase = a.opt.lowercase || a.opt.lowercasetags, a.looseCase = a.opt.lowercase ? "toLowerCase" : "toUpperCase", a.opt.maxEntityCount = a.opt.maxEntityCount || 512, a.opt.maxEntityDepth = a.opt.maxEntityDepth || 4, a.entityCount = a.entityDepth = 0, a.tags = [], a.closed = a.closedRoot = a.sawRoot = !1, a.tag = a.error = null, a.strict = !!t, a.noscript = !!(t || a.opt.noscript), a.state = E.BEGIN, a.strictEntities = a.opt.strictEntities, a.ENTITIES = a.strictEntities ? Object.create(e.XML_ENTITIES) : Object.create(e.ENTITIES), a.attribList = [], a.opt.xmlns && (a.ns = Object.create(h)), a.opt.unquotedAttributeValues === void 0 && (a.opt.unquotedAttributeValues = !t), a.trackPosition = a.opt.position !== !1, a.trackPosition && (a.position = a.line = a.column = 0), O(a, "onready");
157
+ }
158
+ Object.create || (Object.create = function(e) {
159
+ function t() {}
160
+ return t.prototype = e, new t();
161
+ }), Object.keys || (Object.keys = function(e) {
162
+ var t = [];
163
+ for (var n in e) e.hasOwnProperty(n) && t.push(n);
164
+ return t;
165
+ });
166
+ function r(n) {
167
+ for (var r = Math.max(e.MAX_BUFFER_LENGTH, 10), i = 0, a = 0, o = t.length; a < o; a++) {
168
+ var s = n[t[a]].length;
169
+ if (s > r) switch (t[a]) {
170
+ case "textNode":
171
+ P(n);
172
+ break;
173
+ case "cdata":
174
+ N(n, "oncdata", n.cdata), n.cdata = "";
175
+ break;
176
+ case "script":
177
+ N(n, "onscript", n.script), n.script = "";
178
+ break;
179
+ default: I(n, "Max buffer length exceeded: " + t[a]);
180
+ }
181
+ i = Math.max(i, s);
182
+ }
183
+ n.bufferCheckPosition = e.MAX_BUFFER_LENGTH - i + n.position;
184
+ }
185
+ function i(e) {
186
+ for (var n = 0, r = t.length; n < r; n++) e[t[n]] = "";
187
+ }
188
+ function a(e) {
189
+ P(e), e.cdata !== "" && (N(e, "oncdata", e.cdata), e.cdata = ""), e.script !== "" && (N(e, "onscript", e.script), e.script = "");
190
+ }
191
+ n.prototype = {
192
+ end: function() {
193
+ L(this);
194
+ },
195
+ write: q,
196
+ resume: function() {
197
+ return this.error = null, this;
198
+ },
199
+ close: function() {
200
+ return this.write(null);
201
+ },
202
+ flush: function() {
203
+ a(this);
204
+ }
205
+ };
206
+ var o;
207
+ try {
208
+ o = x("node:stream").Stream;
209
+ } catch {
210
+ o = function() {};
211
+ }
212
+ o ||= function() {};
213
+ var s = e.EVENTS.filter(function(e) {
214
+ return e !== "error" && e !== "end";
215
+ });
216
+ function c(e, t) {
217
+ return new u(e, t);
218
+ }
219
+ function l(e, t) {
220
+ if (e.length >= 2) {
221
+ if (e[0] === 255 && e[1] === 254) return "utf-16le";
222
+ if (e[0] === 254 && e[1] === 255) return "utf-16be";
223
+ }
224
+ return e.length >= 3 && e[0] === 239 && e[1] === 187 && e[2] === 191 ? "utf8" : e.length >= 4 ? e[0] === 60 && e[1] === 0 && e[2] === 63 && e[3] === 0 ? "utf-16le" : e[0] === 0 && e[1] === 60 && e[2] === 0 && e[3] === 63 ? "utf-16be" : "utf8" : t ? "utf8" : null;
225
+ }
226
+ function u(e, t) {
227
+ if (!(this instanceof u)) return new u(e, t);
228
+ o.apply(this), this._parser = new n(e, t), this.writable = !0, this.readable = !0;
229
+ var r = this;
230
+ this._parser.onend = function() {
231
+ r.emit("end");
232
+ }, this._parser.onerror = function(e) {
233
+ r.emit("error", e), r._parser.error = null;
234
+ }, this._decoder = null, this._decoderBuffer = null, s.forEach(function(e) {
235
+ Object.defineProperty(r, "on" + e, {
236
+ get: function() {
237
+ return r._parser["on" + e];
238
+ },
239
+ set: function(t) {
240
+ if (!t) return r.removeAllListeners(e), r._parser["on" + e] = t, t;
241
+ r.on(e, t);
242
+ },
243
+ enumerable: !0,
244
+ configurable: !1
245
+ });
246
+ });
247
+ }
248
+ u.prototype = Object.create(o.prototype, { constructor: { value: u } }), u.prototype._decodeBuffer = function(e, t) {
249
+ if (this._decoderBuffer &&= (e = Buffer.concat([this._decoderBuffer, e]), null), !this._decoder) {
250
+ var n = l(e, t);
251
+ if (!n) return this._decoderBuffer = e, "";
252
+ this._parser.encoding = n, this._decoder = new TextDecoder(n);
253
+ }
254
+ return this._decoder.decode(e, { stream: !t });
255
+ }, u.prototype.write = function(e) {
256
+ if (typeof Buffer == "function" && typeof Buffer.isBuffer == "function" && Buffer.isBuffer(e)) e = this._decodeBuffer(e, !1);
257
+ else if (this._decoderBuffer) {
258
+ var t = this._decodeBuffer(Buffer.alloc(0), !0);
259
+ t && (this._parser.write(t), this.emit("data", t));
260
+ }
261
+ return this._parser.write(e.toString()), this.emit("data", e), !0;
262
+ }, u.prototype.end = function(e) {
263
+ if (e && e.length && this.write(e), this._decoderBuffer) {
264
+ var t = this._decodeBuffer(Buffer.alloc(0), !0);
265
+ t && (this._parser.write(t), this.emit("data", t));
266
+ } else if (this._decoder) {
267
+ var n = this._decoder.decode();
268
+ n && (this._parser.write(n), this.emit("data", n));
269
+ }
270
+ return this._parser.end(), !0;
271
+ }, u.prototype.on = function(e, t) {
272
+ var n = this;
273
+ return !n._parser["on" + e] && s.indexOf(e) !== -1 && (n._parser["on" + e] = function() {
274
+ var t = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
275
+ t.splice(0, 0, e), n.emit.apply(n, t);
276
+ }), o.prototype.on.call(n, e, t);
277
+ };
278
+ var d = "[CDATA[", f = "DOCTYPE", p = "http://www.w3.org/XML/1998/namespace", m = "http://www.w3.org/2000/xmlns/", h = {
279
+ xml: p,
280
+ xmlns: m
281
+ }, g = /[:_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]/, _ = /[:_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-]/, v = /[#:_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]/, y = /[#:_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-]/;
282
+ function b(e) {
283
+ return e === " " || e === "\n" || e === "\r" || e === " ";
284
+ }
285
+ function S(e) {
286
+ return e === "\"" || e === "'";
287
+ }
288
+ function C(e) {
289
+ return e === ">" || b(e);
290
+ }
291
+ function w(e, t) {
292
+ return e.test(t);
293
+ }
294
+ function T(e, t) {
295
+ return !w(e, t);
296
+ }
297
+ var E = 0;
298
+ for (var D in e.STATE = {
299
+ BEGIN: E++,
300
+ BEGIN_WHITESPACE: E++,
301
+ TEXT: E++,
302
+ TEXT_ENTITY: E++,
303
+ OPEN_WAKA: E++,
304
+ SGML_DECL: E++,
305
+ SGML_DECL_QUOTED: E++,
306
+ DOCTYPE: E++,
307
+ DOCTYPE_QUOTED: E++,
308
+ DOCTYPE_DTD: E++,
309
+ DOCTYPE_DTD_QUOTED: E++,
310
+ COMMENT_STARTING: E++,
311
+ COMMENT: E++,
312
+ COMMENT_ENDING: E++,
313
+ COMMENT_ENDED: E++,
314
+ CDATA: E++,
315
+ CDATA_ENDING: E++,
316
+ CDATA_ENDING_2: E++,
317
+ PROC_INST: E++,
318
+ PROC_INST_BODY: E++,
319
+ PROC_INST_ENDING: E++,
320
+ OPEN_TAG: E++,
321
+ OPEN_TAG_SLASH: E++,
322
+ ATTRIB: E++,
323
+ ATTRIB_NAME: E++,
324
+ ATTRIB_NAME_SAW_WHITE: E++,
325
+ ATTRIB_VALUE: E++,
326
+ ATTRIB_VALUE_QUOTED: E++,
327
+ ATTRIB_VALUE_CLOSED: E++,
328
+ ATTRIB_VALUE_UNQUOTED: E++,
329
+ ATTRIB_VALUE_ENTITY_Q: E++,
330
+ ATTRIB_VALUE_ENTITY_U: E++,
331
+ CLOSE_TAG: E++,
332
+ CLOSE_TAG_SAW_WHITE: E++,
333
+ SCRIPT: E++,
334
+ SCRIPT_ENDING: E++
335
+ }, e.XML_ENTITIES = {
336
+ amp: "&",
337
+ gt: ">",
338
+ lt: "<",
339
+ quot: "\"",
340
+ apos: "'"
341
+ }, e.ENTITIES = {
342
+ amp: "&",
343
+ gt: ">",
344
+ lt: "<",
345
+ quot: "\"",
346
+ apos: "'",
347
+ AElig: 198,
348
+ Aacute: 193,
349
+ Acirc: 194,
350
+ Agrave: 192,
351
+ Aring: 197,
352
+ Atilde: 195,
353
+ Auml: 196,
354
+ Ccedil: 199,
355
+ ETH: 208,
356
+ Eacute: 201,
357
+ Ecirc: 202,
358
+ Egrave: 200,
359
+ Euml: 203,
360
+ Iacute: 205,
361
+ Icirc: 206,
362
+ Igrave: 204,
363
+ Iuml: 207,
364
+ Ntilde: 209,
365
+ Oacute: 211,
366
+ Ocirc: 212,
367
+ Ograve: 210,
368
+ Oslash: 216,
369
+ Otilde: 213,
370
+ Ouml: 214,
371
+ THORN: 222,
372
+ Uacute: 218,
373
+ Ucirc: 219,
374
+ Ugrave: 217,
375
+ Uuml: 220,
376
+ Yacute: 221,
377
+ aacute: 225,
378
+ acirc: 226,
379
+ aelig: 230,
380
+ agrave: 224,
381
+ aring: 229,
382
+ atilde: 227,
383
+ auml: 228,
384
+ ccedil: 231,
385
+ eacute: 233,
386
+ ecirc: 234,
387
+ egrave: 232,
388
+ eth: 240,
389
+ euml: 235,
390
+ iacute: 237,
391
+ icirc: 238,
392
+ igrave: 236,
393
+ iuml: 239,
394
+ ntilde: 241,
395
+ oacute: 243,
396
+ ocirc: 244,
397
+ ograve: 242,
398
+ oslash: 248,
399
+ otilde: 245,
400
+ ouml: 246,
401
+ szlig: 223,
402
+ thorn: 254,
403
+ uacute: 250,
404
+ ucirc: 251,
405
+ ugrave: 249,
406
+ uuml: 252,
407
+ yacute: 253,
408
+ yuml: 255,
409
+ copy: 169,
410
+ reg: 174,
411
+ nbsp: 160,
412
+ iexcl: 161,
413
+ cent: 162,
414
+ pound: 163,
415
+ curren: 164,
416
+ yen: 165,
417
+ brvbar: 166,
418
+ sect: 167,
419
+ uml: 168,
420
+ ordf: 170,
421
+ laquo: 171,
422
+ not: 172,
423
+ shy: 173,
424
+ macr: 175,
425
+ deg: 176,
426
+ plusmn: 177,
427
+ sup1: 185,
428
+ sup2: 178,
429
+ sup3: 179,
430
+ acute: 180,
431
+ micro: 181,
432
+ para: 182,
433
+ middot: 183,
434
+ cedil: 184,
435
+ ordm: 186,
436
+ raquo: 187,
437
+ frac14: 188,
438
+ frac12: 189,
439
+ frac34: 190,
440
+ iquest: 191,
441
+ times: 215,
442
+ divide: 247,
443
+ OElig: 338,
444
+ oelig: 339,
445
+ Scaron: 352,
446
+ scaron: 353,
447
+ Yuml: 376,
448
+ fnof: 402,
449
+ circ: 710,
450
+ tilde: 732,
451
+ Alpha: 913,
452
+ Beta: 914,
453
+ Gamma: 915,
454
+ Delta: 916,
455
+ Epsilon: 917,
456
+ Zeta: 918,
457
+ Eta: 919,
458
+ Theta: 920,
459
+ Iota: 921,
460
+ Kappa: 922,
461
+ Lambda: 923,
462
+ Mu: 924,
463
+ Nu: 925,
464
+ Xi: 926,
465
+ Omicron: 927,
466
+ Pi: 928,
467
+ Rho: 929,
468
+ Sigma: 931,
469
+ Tau: 932,
470
+ Upsilon: 933,
471
+ Phi: 934,
472
+ Chi: 935,
473
+ Psi: 936,
474
+ Omega: 937,
475
+ alpha: 945,
476
+ beta: 946,
477
+ gamma: 947,
478
+ delta: 948,
479
+ epsilon: 949,
480
+ zeta: 950,
481
+ eta: 951,
482
+ theta: 952,
483
+ iota: 953,
484
+ kappa: 954,
485
+ lambda: 955,
486
+ mu: 956,
487
+ nu: 957,
488
+ xi: 958,
489
+ omicron: 959,
490
+ pi: 960,
491
+ rho: 961,
492
+ sigmaf: 962,
493
+ sigma: 963,
494
+ tau: 964,
495
+ upsilon: 965,
496
+ phi: 966,
497
+ chi: 967,
498
+ psi: 968,
499
+ omega: 969,
500
+ thetasym: 977,
501
+ upsih: 978,
502
+ piv: 982,
503
+ ensp: 8194,
504
+ emsp: 8195,
505
+ thinsp: 8201,
506
+ zwnj: 8204,
507
+ zwj: 8205,
508
+ lrm: 8206,
509
+ rlm: 8207,
510
+ ndash: 8211,
511
+ mdash: 8212,
512
+ lsquo: 8216,
513
+ rsquo: 8217,
514
+ sbquo: 8218,
515
+ ldquo: 8220,
516
+ rdquo: 8221,
517
+ bdquo: 8222,
518
+ dagger: 8224,
519
+ Dagger: 8225,
520
+ bull: 8226,
521
+ hellip: 8230,
522
+ permil: 8240,
523
+ prime: 8242,
524
+ Prime: 8243,
525
+ lsaquo: 8249,
526
+ rsaquo: 8250,
527
+ oline: 8254,
528
+ frasl: 8260,
529
+ euro: 8364,
530
+ image: 8465,
531
+ weierp: 8472,
532
+ real: 8476,
533
+ trade: 8482,
534
+ alefsym: 8501,
535
+ larr: 8592,
536
+ uarr: 8593,
537
+ rarr: 8594,
538
+ darr: 8595,
539
+ harr: 8596,
540
+ crarr: 8629,
541
+ lArr: 8656,
542
+ uArr: 8657,
543
+ rArr: 8658,
544
+ dArr: 8659,
545
+ hArr: 8660,
546
+ forall: 8704,
547
+ part: 8706,
548
+ exist: 8707,
549
+ empty: 8709,
550
+ nabla: 8711,
551
+ isin: 8712,
552
+ notin: 8713,
553
+ ni: 8715,
554
+ prod: 8719,
555
+ sum: 8721,
556
+ minus: 8722,
557
+ lowast: 8727,
558
+ radic: 8730,
559
+ prop: 8733,
560
+ infin: 8734,
561
+ ang: 8736,
562
+ and: 8743,
563
+ or: 8744,
564
+ cap: 8745,
565
+ cup: 8746,
566
+ int: 8747,
567
+ there4: 8756,
568
+ sim: 8764,
569
+ cong: 8773,
570
+ asymp: 8776,
571
+ ne: 8800,
572
+ equiv: 8801,
573
+ le: 8804,
574
+ ge: 8805,
575
+ sub: 8834,
576
+ sup: 8835,
577
+ nsub: 8836,
578
+ sube: 8838,
579
+ supe: 8839,
580
+ oplus: 8853,
581
+ otimes: 8855,
582
+ perp: 8869,
583
+ sdot: 8901,
584
+ lceil: 8968,
585
+ rceil: 8969,
586
+ lfloor: 8970,
587
+ rfloor: 8971,
588
+ lang: 9001,
589
+ rang: 9002,
590
+ loz: 9674,
591
+ spades: 9824,
592
+ clubs: 9827,
593
+ hearts: 9829,
594
+ diams: 9830
595
+ }, Object.keys(e.ENTITIES).forEach(function(t) {
596
+ var n = e.ENTITIES[t], r = typeof n == "number" ? String.fromCharCode(n) : n;
597
+ e.ENTITIES[t] = r;
598
+ }), e.STATE) e.STATE[e.STATE[D]] = D;
599
+ E = e.STATE;
600
+ function O(e, t, n) {
601
+ e[t] && e[t](n);
602
+ }
603
+ function k(e) {
604
+ var t = e && e.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);
605
+ return t ? t[2] : null;
606
+ }
607
+ function A(e) {
608
+ return e ? e.toLowerCase().replace(/[^a-z0-9]/g, "") : null;
609
+ }
610
+ function j(e, t) {
611
+ let n = A(e), r = A(t);
612
+ return !n || !r ? !0 : r === "utf16" ? n === "utf16le" || n === "utf16be" : n === r;
613
+ }
614
+ function M(e, t) {
615
+ if (!(!e.strict || !e.encoding || !t || t.name !== "xml")) {
616
+ var n = k(t.body);
617
+ n && !j(e.encoding, n) && R(e, "XML declaration encoding " + n + " does not match detected stream encoding " + e.encoding.toUpperCase());
618
+ }
619
+ }
620
+ function N(e, t, n) {
621
+ e.textNode && P(e), O(e, t, n);
622
+ }
623
+ function P(e) {
624
+ e.textNode = F(e.opt, e.textNode), e.textNode && O(e, "ontext", e.textNode), e.textNode = "";
625
+ }
626
+ function F(e, t) {
627
+ return e.trim && (t = t.trim()), e.normalize && (t = t.replace(/\s+/g, " ")), t;
628
+ }
629
+ function I(e, t) {
630
+ return P(e), e.trackPosition && (t += "\nLine: " + e.line + "\nColumn: " + e.column + "\nChar: " + e.c), t = Error(t), e.error = t, O(e, "onerror", t), e;
631
+ }
632
+ function L(e) {
633
+ return e.sawRoot && !e.closedRoot && R(e, "Unclosed root tag"), e.state !== E.BEGIN && e.state !== E.BEGIN_WHITESPACE && e.state !== E.TEXT && I(e, "Unexpected end"), P(e), e.c = "", e.closed = !0, O(e, "onend"), n.call(e, e.strict, e.opt), e;
634
+ }
635
+ function R(e, t) {
636
+ if (typeof e != "object" || !(e instanceof n)) throw Error("bad call to strictFail");
637
+ e.strict && I(e, t);
638
+ }
639
+ function z(e) {
640
+ e.strict || (e.tagName = e.tagName[e.looseCase]());
641
+ var t = e.tags[e.tags.length - 1] || e, n = e.tag = {
642
+ name: e.tagName,
643
+ attributes: {}
644
+ };
645
+ e.opt.xmlns && (n.ns = t.ns), e.attribList.length = 0, N(e, "onopentagstart", n);
646
+ }
647
+ function B(e, t) {
648
+ var n = e.indexOf(":") < 0 ? ["", e] : e.split(":"), r = n[0], i = n[1];
649
+ return t && e === "xmlns" && (r = "xmlns", i = ""), {
650
+ prefix: r,
651
+ local: i
652
+ };
653
+ }
654
+ function V(e) {
655
+ if (e.strict || (e.attribName = e.attribName[e.looseCase]()), e.attribList.indexOf(e.attribName) !== -1 || e.tag.attributes.hasOwnProperty(e.attribName)) {
656
+ e.attribName = e.attribValue = "";
657
+ return;
658
+ }
659
+ if (e.opt.xmlns) {
660
+ var t = B(e.attribName, !0), n = t.prefix, r = t.local;
661
+ if (n === "xmlns") if (r === "xml" && e.attribValue !== p) R(e, "xml: prefix must be bound to " + p + "\nActual: " + e.attribValue);
662
+ else if (r === "xmlns" && e.attribValue !== m) R(e, "xmlns: prefix must be bound to " + m + "\nActual: " + e.attribValue);
663
+ else {
664
+ var i = e.tag, a = e.tags[e.tags.length - 1] || e;
665
+ i.ns === a.ns && (i.ns = Object.create(a.ns)), i.ns[r] = e.attribValue;
666
+ }
667
+ e.attribList.push([e.attribName, e.attribValue]);
668
+ } else e.tag.attributes[e.attribName] = e.attribValue, N(e, "onattribute", {
669
+ name: e.attribName,
670
+ value: e.attribValue
671
+ });
672
+ e.attribName = e.attribValue = "";
673
+ }
674
+ function H(e, t) {
675
+ if (e.opt.xmlns) {
676
+ var n = e.tag, r = B(e.tagName);
677
+ n.prefix = r.prefix, n.local = r.local, n.uri = n.ns[r.prefix] || "", n.prefix && !n.uri && (R(e, "Unbound namespace prefix: " + JSON.stringify(e.tagName)), n.uri = r.prefix);
678
+ var i = e.tags[e.tags.length - 1] || e;
679
+ n.ns && i.ns !== n.ns && Object.keys(n.ns).forEach(function(t) {
680
+ N(e, "onopennamespace", {
681
+ prefix: t,
682
+ uri: n.ns[t]
683
+ });
684
+ });
685
+ for (var a = 0, o = e.attribList.length; a < o; a++) {
686
+ var s = e.attribList[a], c = s[0], l = s[1], u = B(c, !0), d = u.prefix, f = u.local, p = d === "" ? "" : n.ns[d] || "", m = {
687
+ name: c,
688
+ value: l,
689
+ prefix: d,
690
+ local: f,
691
+ uri: p
692
+ };
693
+ d && d !== "xmlns" && !p && (R(e, "Unbound namespace prefix: " + JSON.stringify(d)), m.uri = d), e.tag.attributes[c] = m, N(e, "onattribute", m);
694
+ }
695
+ e.attribList.length = 0;
696
+ }
697
+ e.tag.isSelfClosing = !!t, e.sawRoot = !0, e.tags.push(e.tag), N(e, "onopentag", e.tag), t || (!e.noscript && e.tagName.toLowerCase() === "script" ? e.state = E.SCRIPT : e.state = E.TEXT, e.tag = null, e.tagName = ""), e.attribName = e.attribValue = "", e.attribList.length = 0;
698
+ }
699
+ function U(e) {
700
+ if (!e.tagName) {
701
+ R(e, "Weird empty close tag."), e.textNode += "</>", e.state = E.TEXT;
702
+ return;
703
+ }
704
+ if (e.script) {
705
+ if (e.tagName !== "script") {
706
+ e.script += "</" + e.tagName + ">", e.tagName = "", e.state = E.SCRIPT;
707
+ return;
708
+ }
709
+ N(e, "onscript", e.script), e.script = "";
710
+ }
711
+ var t = e.tags.length, n = e.tagName;
712
+ e.strict || (n = n[e.looseCase]());
713
+ for (var r = n; t-- && e.tags[t].name !== r;) R(e, "Unexpected close tag");
714
+ if (t < 0) {
715
+ R(e, "Unmatched closing tag: " + e.tagName), e.textNode += "</" + e.tagName + ">", e.state = E.TEXT;
716
+ return;
717
+ }
718
+ e.tagName = n;
719
+ for (var i = e.tags.length; i-- > t;) {
720
+ var a = e.tag = e.tags.pop();
721
+ e.tagName = e.tag.name, N(e, "onclosetag", e.tagName);
722
+ var o = {};
723
+ for (var s in a.ns) o[s] = a.ns[s];
724
+ var c = e.tags[e.tags.length - 1] || e;
725
+ e.opt.xmlns && a.ns !== c.ns && Object.keys(a.ns).forEach(function(t) {
726
+ var n = a.ns[t];
727
+ N(e, "onclosenamespace", {
728
+ prefix: t,
729
+ uri: n
730
+ });
731
+ });
732
+ }
733
+ t === 0 && (e.closedRoot = !0), e.tagName = e.attribValue = e.attribName = "", e.attribList.length = 0, e.state = E.TEXT;
734
+ }
735
+ function W(e) {
736
+ var t = e.entity, n = t.toLowerCase(), r, i = "";
737
+ return e.ENTITIES[t] ? e.ENTITIES[t] : e.ENTITIES[n] ? e.ENTITIES[n] : (t = n, t.charAt(0) === "#" && (t.charAt(1) === "x" ? (t = t.slice(2), r = parseInt(t, 16), i = r.toString(16)) : (t = t.slice(1), r = parseInt(t, 10), i = r.toString(10))), t = t.replace(/^0+/, ""), isNaN(r) || i.toLowerCase() !== t || r < 0 || r > 1114111 ? (R(e, "Invalid character entity"), "&" + e.entity + ";") : String.fromCodePoint(r));
738
+ }
739
+ function G(e, t) {
740
+ t === "<" ? (e.state = E.OPEN_WAKA, e.startTagPosition = e.position) : b(t) || (R(e, "Non-whitespace before first tag."), e.textNode = t, e.state = E.TEXT);
741
+ }
742
+ function K(e, t) {
743
+ var n = "";
744
+ return t < e.length && (n = e.charAt(t)), n;
745
+ }
746
+ function q(t) {
747
+ var n = this;
748
+ if (this.error) throw this.error;
749
+ if (n.closed) return I(n, "Cannot write after close. Assign an onready handler.");
750
+ if (t === null) return L(n);
751
+ typeof t == "object" && (t = t.toString());
752
+ for (var i = 0, a = ""; a = K(t, i++), n.c = a, a;) switch (n.trackPosition && (n.position++, a === "\n" ? (n.line++, n.column = 0) : n.column++), n.state) {
753
+ case E.BEGIN:
754
+ if (n.state = E.BEGIN_WHITESPACE, a === "") continue;
755
+ G(n, a);
756
+ continue;
757
+ case E.BEGIN_WHITESPACE:
758
+ G(n, a);
759
+ continue;
760
+ case E.TEXT:
761
+ if (n.sawRoot && !n.closedRoot) {
762
+ for (var o = i - 1; a && a !== "<" && a !== "&";) a = K(t, i++), a && n.trackPosition && (n.position++, a === "\n" ? (n.line++, n.column = 0) : n.column++);
763
+ n.textNode += t.substring(o, i - 1);
764
+ }
765
+ a === "<" && !(n.sawRoot && n.closedRoot && !n.strict) ? (n.state = E.OPEN_WAKA, n.startTagPosition = n.position) : (!b(a) && (!n.sawRoot || n.closedRoot) && R(n, "Text data outside of root node."), a === "&" ? n.state = E.TEXT_ENTITY : n.textNode += a);
766
+ continue;
767
+ case E.SCRIPT:
768
+ a === "<" ? n.state = E.SCRIPT_ENDING : n.script += a;
769
+ continue;
770
+ case E.SCRIPT_ENDING:
771
+ a === "/" ? n.state = E.CLOSE_TAG : (n.script += "<" + a, n.state = E.SCRIPT);
772
+ continue;
773
+ case E.OPEN_WAKA:
774
+ if (a === "!") n.state = E.SGML_DECL, n.sgmlDecl = "";
775
+ else if (!b(a)) if (w(g, a)) n.state = E.OPEN_TAG, n.tagName = a;
776
+ else if (a === "/") n.state = E.CLOSE_TAG, n.tagName = "";
777
+ else if (a === "?") n.state = E.PROC_INST, n.procInstName = n.procInstBody = "";
778
+ else {
779
+ if (R(n, "Unencoded <"), n.startTagPosition + 1 < n.position) {
780
+ var s = n.position - n.startTagPosition;
781
+ a = Array(s).join(" ") + a;
782
+ }
783
+ n.textNode += "<" + a, n.state = E.TEXT;
784
+ }
785
+ continue;
786
+ case E.SGML_DECL:
787
+ if (n.sgmlDecl + a === "--") {
788
+ n.state = E.COMMENT, n.comment = "", n.sgmlDecl = "";
789
+ continue;
790
+ }
791
+ n.doctype && n.doctype !== !0 && n.sgmlDecl ? (n.state = E.DOCTYPE_DTD, n.doctype += "<!" + n.sgmlDecl + a, n.sgmlDecl = "") : (n.sgmlDecl + a).toUpperCase() === d ? (N(n, "onopencdata"), n.state = E.CDATA, n.sgmlDecl = "", n.cdata = "") : (n.sgmlDecl + a).toUpperCase() === f ? (n.state = E.DOCTYPE, (n.doctype || n.sawRoot) && R(n, "Inappropriately located doctype declaration"), n.doctype = "", n.sgmlDecl = "") : a === ">" ? (N(n, "onsgmldeclaration", n.sgmlDecl), n.sgmlDecl = "", n.state = E.TEXT) : (S(a) && (n.state = E.SGML_DECL_QUOTED), n.sgmlDecl += a);
792
+ continue;
793
+ case E.SGML_DECL_QUOTED:
794
+ a === n.q && (n.state = E.SGML_DECL, n.q = ""), n.sgmlDecl += a;
795
+ continue;
796
+ case E.DOCTYPE:
797
+ a === ">" ? (n.state = E.TEXT, N(n, "ondoctype", n.doctype), n.doctype = !0) : (n.doctype += a, a === "[" ? n.state = E.DOCTYPE_DTD : S(a) && (n.state = E.DOCTYPE_QUOTED, n.q = a));
798
+ continue;
799
+ case E.DOCTYPE_QUOTED:
800
+ n.doctype += a, a === n.q && (n.q = "", n.state = E.DOCTYPE);
801
+ continue;
802
+ case E.DOCTYPE_DTD:
803
+ a === "]" ? (n.doctype += a, n.state = E.DOCTYPE) : a === "<" ? (n.state = E.OPEN_WAKA, n.startTagPosition = n.position) : S(a) ? (n.doctype += a, n.state = E.DOCTYPE_DTD_QUOTED, n.q = a) : n.doctype += a;
804
+ continue;
805
+ case E.DOCTYPE_DTD_QUOTED:
806
+ n.doctype += a, a === n.q && (n.state = E.DOCTYPE_DTD, n.q = "");
807
+ continue;
808
+ case E.COMMENT:
809
+ a === "-" ? n.state = E.COMMENT_ENDING : n.comment += a;
810
+ continue;
811
+ case E.COMMENT_ENDING:
812
+ a === "-" ? (n.state = E.COMMENT_ENDED, n.comment = F(n.opt, n.comment), n.comment && N(n, "oncomment", n.comment), n.comment = "") : (n.comment += "-" + a, n.state = E.COMMENT);
813
+ continue;
814
+ case E.COMMENT_ENDED:
815
+ a === ">" ? n.doctype && n.doctype !== !0 ? n.state = E.DOCTYPE_DTD : n.state = E.TEXT : (R(n, "Malformed comment"), n.comment += "--" + a, n.state = E.COMMENT);
816
+ continue;
817
+ case E.CDATA:
818
+ for (var o = i - 1; a && a !== "]";) a = K(t, i++), a && n.trackPosition && (n.position++, a === "\n" ? (n.line++, n.column = 0) : n.column++);
819
+ n.cdata += t.substring(o, i - 1), a === "]" && (n.state = E.CDATA_ENDING);
820
+ continue;
821
+ case E.CDATA_ENDING:
822
+ a === "]" ? n.state = E.CDATA_ENDING_2 : (n.cdata += "]" + a, n.state = E.CDATA);
823
+ continue;
824
+ case E.CDATA_ENDING_2:
825
+ a === ">" ? (n.cdata && N(n, "oncdata", n.cdata), N(n, "onclosecdata"), n.cdata = "", n.state = E.TEXT) : a === "]" ? n.cdata += "]" : (n.cdata += "]]" + a, n.state = E.CDATA);
826
+ continue;
827
+ case E.PROC_INST:
828
+ a === "?" ? n.state = E.PROC_INST_ENDING : b(a) ? n.state = E.PROC_INST_BODY : n.procInstName += a;
829
+ continue;
830
+ case E.PROC_INST_BODY:
831
+ if (!n.procInstBody && b(a)) continue;
832
+ a === "?" ? n.state = E.PROC_INST_ENDING : n.procInstBody += a;
833
+ continue;
834
+ case E.PROC_INST_ENDING:
835
+ if (a === ">") {
836
+ let e = {
837
+ name: n.procInstName,
838
+ body: n.procInstBody
839
+ };
840
+ M(n, e), N(n, "onprocessinginstruction", e), n.procInstName = n.procInstBody = "", n.state = E.TEXT;
841
+ } else n.procInstBody += "?" + a, n.state = E.PROC_INST_BODY;
842
+ continue;
843
+ case E.OPEN_TAG:
844
+ w(_, a) ? n.tagName += a : (z(n), a === ">" ? H(n) : a === "/" ? n.state = E.OPEN_TAG_SLASH : (b(a) || R(n, "Invalid character in tag name"), n.state = E.ATTRIB));
845
+ continue;
846
+ case E.OPEN_TAG_SLASH:
847
+ a === ">" ? (H(n, !0), U(n)) : (R(n, "Forward-slash in opening tag not followed by >"), n.state = E.ATTRIB);
848
+ continue;
849
+ case E.ATTRIB:
850
+ if (b(a)) continue;
851
+ a === ">" ? H(n) : a === "/" ? n.state = E.OPEN_TAG_SLASH : w(g, a) ? (n.attribName = a, n.attribValue = "", n.state = E.ATTRIB_NAME) : R(n, "Invalid attribute name");
852
+ continue;
853
+ case E.ATTRIB_NAME:
854
+ a === "=" ? n.state = E.ATTRIB_VALUE : a === ">" ? (R(n, "Attribute without value"), n.attribValue = n.attribName, V(n), H(n)) : b(a) ? n.state = E.ATTRIB_NAME_SAW_WHITE : w(_, a) ? n.attribName += a : R(n, "Invalid attribute name");
855
+ continue;
856
+ case E.ATTRIB_NAME_SAW_WHITE:
857
+ if (a === "=") n.state = E.ATTRIB_VALUE;
858
+ else if (b(a)) continue;
859
+ else R(n, "Attribute without value"), n.tag.attributes[n.attribName] = "", n.attribValue = "", N(n, "onattribute", {
860
+ name: n.attribName,
861
+ value: ""
862
+ }), n.attribName = "", a === ">" ? H(n) : w(g, a) ? (n.attribName = a, n.state = E.ATTRIB_NAME) : (R(n, "Invalid attribute name"), n.state = E.ATTRIB);
863
+ continue;
864
+ case E.ATTRIB_VALUE:
865
+ if (b(a)) continue;
866
+ S(a) ? (n.q = a, n.state = E.ATTRIB_VALUE_QUOTED) : (n.opt.unquotedAttributeValues || I(n, "Unquoted attribute value"), n.state = E.ATTRIB_VALUE_UNQUOTED, n.attribValue = a);
867
+ continue;
868
+ case E.ATTRIB_VALUE_QUOTED:
869
+ if (a !== n.q) {
870
+ a === "&" ? n.state = E.ATTRIB_VALUE_ENTITY_Q : n.attribValue += a;
871
+ continue;
872
+ }
873
+ V(n), n.q = "", n.state = E.ATTRIB_VALUE_CLOSED;
874
+ continue;
875
+ case E.ATTRIB_VALUE_CLOSED:
876
+ b(a) ? n.state = E.ATTRIB : a === ">" ? H(n) : a === "/" ? n.state = E.OPEN_TAG_SLASH : w(g, a) ? (R(n, "No whitespace between attributes"), n.attribName = a, n.attribValue = "", n.state = E.ATTRIB_NAME) : R(n, "Invalid attribute name");
877
+ continue;
878
+ case E.ATTRIB_VALUE_UNQUOTED:
879
+ if (!C(a)) {
880
+ a === "&" ? n.state = E.ATTRIB_VALUE_ENTITY_U : n.attribValue += a;
881
+ continue;
882
+ }
883
+ V(n), a === ">" ? H(n) : n.state = E.ATTRIB;
884
+ continue;
885
+ case E.CLOSE_TAG:
886
+ if (n.tagName) a === ">" ? U(n) : w(_, a) ? n.tagName += a : n.script ? (n.script += "</" + n.tagName + a, n.tagName = "", n.state = E.SCRIPT) : (b(a) || R(n, "Invalid tagname in closing tag"), n.state = E.CLOSE_TAG_SAW_WHITE);
887
+ else {
888
+ if (b(a)) continue;
889
+ T(g, a) ? n.script ? (n.script += "</" + a, n.state = E.SCRIPT) : R(n, "Invalid tagname in closing tag.") : n.tagName = a;
890
+ }
891
+ continue;
892
+ case E.CLOSE_TAG_SAW_WHITE:
893
+ if (b(a)) continue;
894
+ a === ">" ? U(n) : R(n, "Invalid characters in closing tag");
895
+ continue;
896
+ case E.TEXT_ENTITY:
897
+ case E.ATTRIB_VALUE_ENTITY_Q:
898
+ case E.ATTRIB_VALUE_ENTITY_U:
899
+ var c, l;
900
+ switch (n.state) {
901
+ case E.TEXT_ENTITY:
902
+ c = E.TEXT, l = "textNode";
903
+ break;
904
+ case E.ATTRIB_VALUE_ENTITY_Q:
905
+ c = E.ATTRIB_VALUE_QUOTED, l = "attribValue";
906
+ break;
907
+ case E.ATTRIB_VALUE_ENTITY_U:
908
+ c = E.ATTRIB_VALUE_UNQUOTED, l = "attribValue";
909
+ break;
910
+ }
911
+ if (a === ";") {
912
+ var u = W(n);
913
+ n.opt.unparsedEntities && !Object.values(e.XML_ENTITIES).includes(u) ? ((n.entityCount += 1) > n.opt.maxEntityCount && I(n, "Parsed entity count exceeds max entity count"), (n.entityDepth += 1) > n.opt.maxEntityDepth && I(n, "Parsed entity depth exceeds max entity depth"), n.entity = "", n.state = c, n.write(u), --n.entityDepth) : (n[l] += u, n.entity = "", n.state = c);
914
+ } else w(n.entity.length ? y : v, a) ? n.entity += a : (R(n, "Invalid character in entity name"), n[l] += "&" + n.entity + a, n.entity = "", n.state = c);
915
+ continue;
916
+ default: throw Error(n, "Unknown state: " + n.state);
917
+ }
918
+ return n.position >= n.bufferCheckPosition && r(n), n;
919
+ }
920
+ /* istanbul ignore next */
921
+ String.fromCodePoint || (function() {
922
+ var e = String.fromCharCode, t = Math.floor, n = function() {
923
+ var n = 16384, r = [], i, a, o = -1, s = arguments.length;
924
+ if (!s) return "";
925
+ for (var c = ""; ++o < s;) {
926
+ var l = Number(arguments[o]);
927
+ if (!isFinite(l) || l < 0 || l > 1114111 || t(l) !== l) throw RangeError("Invalid code point: " + l);
928
+ l <= 65535 ? r.push(l) : (l -= 65536, i = (l >> 10) + 55296, a = l % 1024 + 56320, r.push(i, a)), (o + 1 === s || r.length > n) && (c += e.apply(null, r), r.length = 0);
929
+ }
930
+ return c;
931
+ };
932
+ /* istanbul ignore next */
933
+ Object.defineProperty ? Object.defineProperty(String, "fromCodePoint", {
934
+ value: n,
935
+ configurable: !0,
936
+ writable: !0
937
+ }) : String.fromCodePoint = n;
938
+ })();
939
+ })(e === void 0 ? e.sax = {} : e);
940
+ })), F = (/* @__PURE__ */ b(((e) => {
941
+ var t = e && e.__importDefault || function(e) {
942
+ return e && e.__esModule ? e : { default: e };
943
+ };
944
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.XmlDocument = e.XmlElement = e.XmlCommentNode = e.XmlCDataNode = e.XmlTextNode = void 0;
945
+ var n = t(P()), r = class {
946
+ constructor(e) {
947
+ this.text = e, this.type = "text";
948
+ }
949
+ toString(e) {
950
+ return u(l(this.text), e);
951
+ }
952
+ toStringWithIndent(e, t) {
953
+ return e + this.toString(t);
954
+ }
955
+ };
956
+ e.XmlTextNode = r;
957
+ var i = class {
958
+ constructor(e) {
959
+ this.cdata = e, this.type = "cdata";
960
+ }
961
+ toString(e) {
962
+ return `<![CDATA[${u(this.cdata, e)}]]>`;
963
+ }
964
+ toStringWithIndent(e, t) {
965
+ return e + this.toString(t);
966
+ }
967
+ };
968
+ e.XmlCDataNode = i;
969
+ var a = class {
970
+ constructor(e) {
971
+ this.comment = e, this.type = "comment";
972
+ }
973
+ toString(e) {
974
+ return `<!--${u(l(this.comment), e)}-->`;
975
+ }
976
+ toStringWithIndent(e, t) {
977
+ return e + this.toString(t);
978
+ }
979
+ };
980
+ e.XmlCommentNode = a;
981
+ var o = class e {
982
+ constructor(e, t) {
983
+ if (this.type = "element", !t && s.length) {
984
+ var n = s[s.length - 1];
985
+ "parser" in n && (t = n.parser);
986
+ }
987
+ this.name = e.name, this.attr = e.attributes, this.val = "", this.children = [], this.firstChild = null, this.lastChild = null, this.line = t ? t.line : null, this.column = t ? t.column : null, this.position = t ? t.position : null, this.startTagPosition = t ? t.startTagPosition : null;
988
+ }
989
+ _addChild(e) {
990
+ this.children.push(e), this.firstChild ||= e, this.lastChild = e;
991
+ }
992
+ _opentag(t) {
993
+ let n = new e(t);
994
+ this._addChild(n), s.unshift(n);
995
+ }
996
+ _closetag() {
997
+ s.shift();
998
+ }
999
+ _text(e) {
1000
+ this.val += e, this._addChild(new r(e));
1001
+ }
1002
+ _cdata(e) {
1003
+ this.val += e, this._addChild(new i(e));
1004
+ }
1005
+ _comment(e) {
1006
+ this._addChild(new a(e));
1007
+ }
1008
+ _error(e) {
1009
+ throw e;
1010
+ }
1011
+ eachChild(e, t) {
1012
+ for (let n = 0, r = this.children.length; n < r; n++) {
1013
+ let r = this.children[n];
1014
+ if (r.type === "element" && e.call(t, r, n, this.children) === !1) return;
1015
+ }
1016
+ }
1017
+ childNamed(e) {
1018
+ for (let t = 0, n = this.children.length; t < n; t++) {
1019
+ let n = this.children[t];
1020
+ if (n.type === "element" && n.name === e) return n;
1021
+ }
1022
+ }
1023
+ childrenNamed(e) {
1024
+ let t = [];
1025
+ for (let n = 0, r = this.children.length; n < r; n++) {
1026
+ let r = this.children[n];
1027
+ r.type === "element" && r.name === e && t.push(r);
1028
+ }
1029
+ return t;
1030
+ }
1031
+ childWithAttribute(e, t) {
1032
+ for (let n = 0, r = this.children.length; n < r; n++) {
1033
+ let r = this.children[n];
1034
+ if (r.type === "element" && (t !== void 0 && r.attr[e] === t || t === void 0 && r.attr[e])) return r;
1035
+ }
1036
+ }
1037
+ descendantsNamed(e) {
1038
+ let t = [];
1039
+ for (let n = 0, r = this.children.length; n < r; n++) {
1040
+ let r = this.children[n];
1041
+ if (r.type === "element") {
1042
+ let n = r;
1043
+ n.name === e && t.push(n), t.push(...n.descendantsNamed(e));
1044
+ }
1045
+ }
1046
+ return t;
1047
+ }
1048
+ descendantWithPath(e) {
1049
+ let t = this, n = e.split(".");
1050
+ for (let e = 0, r = n.length; e < r; e++) if (t && t.type === "element") t = t.childNamed(n[e]);
1051
+ else return;
1052
+ return t;
1053
+ }
1054
+ valueWithPath(e) {
1055
+ let t = e.split("@"), n = this.descendantWithPath(t[0]);
1056
+ if (n) return t.length > 1 ? n.attr[t[1]] : n.val;
1057
+ }
1058
+ toString(e) {
1059
+ return this.toStringWithIndent("", e);
1060
+ }
1061
+ toStringWithIndent(e, t) {
1062
+ let n = `${e}<${this.name}`, r = t?.compressed ? "" : "\n";
1063
+ for (let e in this.attr) Object.prototype.hasOwnProperty.call(this.attr, e) && (n += ` ${e}="${l(this.attr[e])}"`);
1064
+ if (this.children.length === 1 && this.children[0].type !== "element") n += `>${this.children[0].toString(t)}</${this.name}>`;
1065
+ else if (this.children.length) {
1066
+ n += `>${r}`;
1067
+ let i = e + (t?.compressed ? "" : " ");
1068
+ for (let e = 0, a = this.children.length; e < a; e++) n += `${this.children[e].toStringWithIndent(i, t)}${r}`;
1069
+ n += `${e}</${this.name}>`;
1070
+ } else t?.html ? [
1071
+ "area",
1072
+ "base",
1073
+ "br",
1074
+ "col",
1075
+ "embed",
1076
+ "frame",
1077
+ "hr",
1078
+ "img",
1079
+ "input",
1080
+ "keygen",
1081
+ "link",
1082
+ "menuitem",
1083
+ "meta",
1084
+ "param",
1085
+ "source",
1086
+ "track",
1087
+ "wbr"
1088
+ ].includes(this.name) ? n += "/>" : n += `></${this.name}>` : n += "/>";
1089
+ return n;
1090
+ }
1091
+ };
1092
+ e.XmlElement = o, e.XmlDocument = class extends o {
1093
+ constructor(e) {
1094
+ if (super({
1095
+ name: "",
1096
+ attributes: {}
1097
+ }), e = e.toString().trim(), !e) throw Error("No XML to parse!");
1098
+ this.doctype = "", this.parser = n.default.parser(!0), c(this.parser), s = [this];
1099
+ try {
1100
+ this.parser.write(e);
1101
+ } finally {
1102
+ delete this.parser;
1103
+ }
1104
+ }
1105
+ _opentag(e) {
1106
+ this.name === "" ? (this.name = e.name, this.attr = e.attributes) : super._opentag(e);
1107
+ }
1108
+ _doctype(e) {
1109
+ this.doctype += e;
1110
+ }
1111
+ };
1112
+ var s = [];
1113
+ function c(e) {
1114
+ e.onopentag = (e) => s[0]?._opentag(e), e.onclosetag = () => s[0]?._closetag(), e.ontext = (e) => s[0]?._text(e), e.oncdata = (e) => s[0]?._cdata(e), e.oncomment = (e) => s[0]?._comment(e), e.ondoctype = (e) => {
1115
+ let t = s[0];
1116
+ t._doctype && t._doctype(e);
1117
+ }, e.onerror = (e) => s[0]?._error(e);
1118
+ }
1119
+ function l(e) {
1120
+ return e.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, "&apos;").replace(/"/g, "&quot;");
1121
+ }
1122
+ function u(e, t) {
1123
+ let n = e;
1124
+ return t?.trimmed && e.length > 25 && (n = n.substring(0, 25).trim() + "…"), t?.preserveWhitespace || (n = n.trim()), n;
1125
+ }
1126
+ })))(), I = "com.apple.ibooks.display-options.xml", L = "ComicInfo.xml";
1127
+ new Set(["Pages", "ComicInfo"]), new Set([
1128
+ 8,
1129
+ 12,
1130
+ 13,
1131
+ 14
1132
+ ]), L.toLowerCase(), I.toLowerCase(), L.toLowerCase();
1133
+ var R = (e) => e ? e.children.map((e) => e instanceof F.XmlTextNode ? e.text : e instanceof F.XmlElement ? R(e) : "").join("").trim() : "", z = (e, { basePath: t, baseUrl: n }) => {
1134
+ let r = {
1135
+ contents: [],
1136
+ path: "",
1137
+ href: "",
1138
+ title: ""
1139
+ }, i = e.childNamed("span") || e.childNamed("a");
1140
+ r.title = (i?.attr.title || i?.val.trim() || R(i)) ?? "";
1141
+ let a = i?.name;
1142
+ a !== "a" && (i = e.descendantWithPath(`${a}.a`), i && (a = i.name.toLowerCase())), a === "a" && i?.attr.href && (r.path = C(t, i.attr.href), r.href = C(n, t, i.attr.href));
1143
+ let o = e.childNamed("ol");
1144
+ if (o) {
1145
+ let e = o.childrenNamed("li");
1146
+ e && e.length > 0 && (r.contents = e.map((e) => z(e, {
1147
+ basePath: t,
1148
+ baseUrl: n
1149
+ })));
1150
+ }
1151
+ return r;
1152
+ }, B = (e, { opfBasePath: t, baseUrl: n, prefix: r }) => {
1153
+ let i = e?.childNamed(`${r}content`)?.attr.src || "", a = {
1154
+ title: e?.descendantWithPath(`${r}navLabel.${r}text`)?.val || "",
1155
+ path: C(t, i),
1156
+ href: C(n, t, i),
1157
+ contents: []
1158
+ }, o = e.childrenNamed(`${r}navPoint`);
1159
+ return o && o.length > 0 && (a.contents = o.map((e) => B(e, {
1160
+ opfBasePath: t,
1161
+ baseUrl: n,
1162
+ prefix: r
1163
+ }))), a;
1164
+ }, V = Symbol("pdfjs"), H = (e) => "_symbol" in e && e._symbol === V, U = async (e, t) => {
1165
+ let n = await c.getDocument(await e.arrayBuffer()).promise, r = Array.from({ length: n.numPages }), i = r.map((e, t) => ({
8
1166
  id: `page-${t}`,
9
1167
  resourcePath: `${t}.pdf`
10
- })), o = `
1168
+ })), a = `
11
1169
  <?xml version="1.0" encoding="UTF-8"?><package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="bookid">
12
1170
  <metadata>
13
1171
  <meta property="rendition:layout">pre-paginated</meta>
14
1172
  </metadata>
15
1173
  <manifest>
16
- ${a.map(({ id: e, resourcePath: t }) => `<item id="${e}" href="${t}" />`).join("\n")}
1174
+ ${i.map(({ id: e, resourcePath: t }) => `<item id="${e}" href="${t}" />`).join("\n")}
17
1175
  </manifest>
18
1176
  <spine>
19
- ${a.map(({ id: e }) => `<itemref idref="${e}" />`).join("\n")}
1177
+ ${i.map(({ id: e }) => `<itemref idref="${e}" />`).join("\n")}
20
1178
  </spine>
21
1179
  </package>
22
1180
  `;
23
1181
  return {
24
- filename: n,
25
- encodingFormat: "application/pdf",
26
- proxyDocument: r,
27
- _symbol: b,
28
- records: [{
29
- dir: !1,
30
- basename: "content.opf",
31
- uri: "content.opf",
32
- size: 0,
33
- blob: async () => new Blob(),
34
- string: async () => o
35
- }, ...i.map((e, t) => ({
36
- dir: !1,
37
- blob: async () => {
38
- throw Error("Unable to get blob from pdf");
39
- },
40
- basename: `${t}.pdf`,
41
- size: 0,
42
- string: () => {
43
- throw Error("Unable to get blob from pdf");
44
- },
45
- uri: `${t}.pdf`
46
- }))],
47
- close: () => r.cleanup()
1182
+ ...M({
1183
+ filename: t,
1184
+ encodingFormat: "application/pdf",
1185
+ records: [{
1186
+ dir: !1,
1187
+ basename: "content.opf",
1188
+ uri: "content.opf",
1189
+ size: 0,
1190
+ ...N(async () => new Blob([a]))
1191
+ }, ...r.map((e, t) => ({
1192
+ dir: !1,
1193
+ basename: `${t}.pdf`,
1194
+ uri: `${t}.pdf`,
1195
+ size: 0,
1196
+ ...N(async () => {
1197
+ throw Error("Unable to get blob from pdf");
1198
+ })
1199
+ }))],
1200
+ close: () => n.cleanup()
1201
+ }),
1202
+ proxyDocument: n,
1203
+ _symbol: V
48
1204
  };
49
- }, C = "html{touch-action:none}body{width:100%;height:100%;margin:0;padding:0;overflow:hidden}", w = (e, t, n) => {
1205
+ }, W = "html{touch-action:none}body{width:100%;height:100%;margin:0;padding:0;overflow:hidden}", G = (e, t, n) => {
50
1206
  if (!e) return;
51
1207
  let { height: r, width: i } = n.pageSize;
52
1208
  h(e.style, "width", `${i}px`), h(e.style, "height", `${r}px`), t === "right" ? h(e.style, "justify-content", "flex-start") : t === "left" ? h(e.style, "justify-content", "flex-end") : h(e.style, "justify-content", "center");
53
- }, T = (e, t, n) => {
1209
+ }, K = (e, t, n) => {
54
1210
  let r = window.devicePixelRatio || 1, { height: i, width: a } = n.pageSize, { width: o, height: s } = e.getViewport({ scale: 1 }), c = Math.max(a / o, i / s), l = e.getViewport({ scale: c }), u = l.width / l.height, d = a / i, f = u > d ? a : i * u, p = u > d ? a / u : i;
55
1211
  m(t, "width", Math.floor(l.width * r)), m(t, "height", Math.floor(l.height * r)), h(t.style, "width", `${Math.floor(f)}px`), h(t.style, "height", `${Math.floor(p)}px`);
56
- }, E = ":root {\n --scale-factor: 1;\n --user-unit: 1;\n --total-scale-factor: calc(var(--scale-factor) * var(--user-unit));\n --scale-round-x: 1px;\n --scale-round-y: 1px;\n}", D = class extends d {
1212
+ }, q = ":root {\n --scale-factor: 1;\n --user-unit: 1;\n --total-scale-factor: calc(var(--scale-factor) * var(--user-unit));\n --scale-round-x: 1px;\n --scale-round-y: 1px;\n}", J = class extends d {
57
1213
  pdfViewerStyle;
58
1214
  pageProxy;
59
1215
  renderTask;
@@ -70,10 +1226,10 @@ var b = Symbol("pdfjs"), x = (e) => "_symbol" in e && e._symbol === b, S = async
70
1226
  if (e instanceof HTMLIFrameElement) return e;
71
1227
  }
72
1228
  getPageProxy() {
73
- return this.pageProxy ? c(this.pageProxy) : a(this.resourcesHandler.fetchResource()).pipe(l((e) => "custom" in e ? (this.pageProxy = e.data, c(this.pageProxy)) : r));
1229
+ return this.pageProxy ? a(this.pageProxy) : n(this.resourcesHandler.fetchResource()).pipe(o((t) => "custom" in t ? (this.pageProxy = t.data, a(this.pageProxy)) : e));
74
1230
  }
75
1231
  onUnload() {
76
- return this.detach(), this.renderTask && this.renderTask.cancel(), this.textLayer?.cancel(), this.pageProxy?.cleanup(), r;
1232
+ return this.detach(), this.renderTask && this.renderTask.cancel(), this.textLayer?.cancel(), this.pageProxy?.cleanup(), e;
77
1233
  }
78
1234
  onCreateDocument() {
79
1235
  let e = document.createElement("iframe");
@@ -83,33 +1239,33 @@ var b = Symbol("pdfjs"), x = (e) => "_symbol" in e && e._symbol === b, S = async
83
1239
  let n = this.containerElement.ownerDocument.createElement("canvas");
84
1240
  t.appendChild(e);
85
1241
  let r = this.containerElement.ownerDocument.createElement("div");
86
- return r.style.cssText = "\n display: flex;\n align-items: center;\n justify-content: center;\n ", r.appendChild(n), r.appendChild(t), this.setDocumentContainer(r), c(r);
1242
+ return r.style.cssText = "\n display: flex;\n align-items: center;\n justify-content: center;\n ", r.appendChild(n), r.appendChild(t), this.setDocumentContainer(r), a(r);
87
1243
  }
88
1244
  onLoadDocument() {
89
- return this.getPageProxy().pipe(l(() => {
90
- let e = this.getFrameElement(), t = this.pageProxy;
91
- return !e || !t ? r : c(e).pipe(y(this.context.bridgeEvent.viewportFree$), u(() => {
1245
+ return this.getPageProxy().pipe(o(() => {
1246
+ let t = this.getFrameElement(), r = this.pageProxy;
1247
+ return !t || !r ? e : a(t).pipe(y(this.context.bridgeEvent.viewportFree$), s(() => {
92
1248
  this.attach();
93
- }), _, l(() => {
94
- f(e, "pdfjs-viewer-style", this.pdfViewerStyle), f(e, "enhancer-pdf-style", C), g(e, "pdf-scale-scale", E);
95
- let t = e.contentDocument?.body;
96
- return !t || !this.pageProxy ? r : (p(t, "class", "textLayer"), this.textLayer = new n({
97
- container: t,
1249
+ }), _, o(() => {
1250
+ f(t, "pdfjs-viewer-style", this.pdfViewerStyle), f(t, "enhancer-pdf-style", W), g(t, "pdf-scale-scale", q);
1251
+ let r = t.contentDocument?.body;
1252
+ return !r || !this.pageProxy ? e : (p(r, "class", "textLayer"), this.textLayer = new u({
1253
+ container: r,
98
1254
  textContentSource: this.pageProxy.streamTextContent(),
99
1255
  viewport: this.pageProxy.getViewport({ scale: 1 })
100
- }), a(this.textLayer.render()));
1256
+ }), n(this.textLayer.render()));
101
1257
  }), v);
102
1258
  }));
103
1259
  }
104
1260
  onLayout({ spreadPosition: e }) {
105
- let n = this.getFrameElement(), r = this.getCanvas();
106
- if (!n || !r) return c(void 0);
107
- let { height: o, width: s } = this.viewport.pageSize;
108
- w(this.documentContainer, e, this.viewport);
109
- let u = r.getContext("2d"), d = window.devicePixelRatio || 1;
110
- if (!this.pageProxy || !u) return c(void 0);
111
- this.renderTask &&= (this.renderTask.cancel(), void 0), T(this.pageProxy, r, this.viewport);
112
- let { width: f, height: p } = this.pageProxy.getViewport({ scale: 1 }), m = Math.max(s / f, o / p), g = this.pageProxy.getViewport({ scale: m }), _ = d === 1 ? null : [
1261
+ let r = this.getFrameElement(), i = this.getCanvas();
1262
+ if (!r || !i) return a(void 0);
1263
+ let { height: s, width: c } = this.viewport.pageSize;
1264
+ G(this.documentContainer, e, this.viewport);
1265
+ let u = i.getContext("2d"), d = window.devicePixelRatio || 1;
1266
+ if (!this.pageProxy || !u) return a(void 0);
1267
+ this.renderTask &&= (this.renderTask.cancel(), void 0), K(this.pageProxy, i, this.viewport);
1268
+ let { width: f, height: p } = this.pageProxy.getViewport({ scale: 1 }), m = Math.max(c / f, s / p), g = this.pageProxy.getViewport({ scale: m }), _ = d === 1 ? null : [
113
1269
  d,
114
1270
  0,
115
1271
  0,
@@ -121,45 +1277,45 @@ var b = Symbol("pdfjs"), x = (e) => "_symbol" in e && e._symbol === b, S = async
121
1277
  ..._ && { transform: _ },
122
1278
  canvasContext: u,
123
1279
  viewport: g,
124
- canvas: r
125
- }), a(this.renderTask.promise).pipe(l(() => {
1280
+ canvas: i
1281
+ }), n(this.renderTask.promise).pipe(o(() => {
126
1282
  this.renderTask = void 0;
127
- let e = n?.contentDocument, t = this.pageProxy;
128
- if (!e || !n || !t || !this.textLayer) throw Error("Unable to update text layer due to missing elements");
129
- let i = e.body, a = r.clientWidth / f;
130
- return h(i.style, "top", `${r.offsetTop}px`), h(i.style, "left", `${r.offsetLeft}px`), h(i.style, "height", r.style.height), h(i.style, "width", r.style.width), h(e.documentElement.style, "--scale-factor", `${a}`), this.textLayer.update({ viewport: g }), c(void 0);
131
- }), i((e) => (e instanceof t || console.error(e), c(void 0))));
1283
+ let e = r?.contentDocument, t = this.pageProxy;
1284
+ if (!e || !r || !t || !this.textLayer) throw Error("Unable to update text layer due to missing elements");
1285
+ let n = e.body, o = i.clientWidth / f;
1286
+ return h(n.style, "top", `${i.offsetTop}px`), h(n.style, "left", `${i.offsetLeft}px`), h(n.style, "height", i.style.height), h(n.style, "width", i.style.width), h(e.documentElement.style, "--scale-factor", `${o}`), this.textLayer.update({ viewport: g }), a(void 0);
1287
+ }), t((e) => (e instanceof l || console.error(e), a(void 0))));
132
1288
  }
133
1289
  onRenderHeadless() {
134
- return this.getPageProxy().pipe(l((e) => {
135
- let t = document.implementation.createHTMLDocument(), r = t.body;
136
- return a(new n({
137
- container: r,
1290
+ return this.getPageProxy().pipe(o((e) => {
1291
+ let t = document.implementation.createHTMLDocument(), i = t.body;
1292
+ return n(new u({
1293
+ container: i,
138
1294
  textContentSource: e.streamTextContent(),
139
1295
  viewport: e.getViewport({ scale: 1 })
140
- }).render()).pipe(o(() => t));
1296
+ }).render()).pipe(r(() => t));
141
1297
  }));
142
1298
  }
143
1299
  getDocumentFrame() {
144
1300
  return this.getFrameElement();
145
1301
  }
146
- }, O = (e) => (t) => e({
1302
+ }, Y = (e) => (t) => e({
147
1303
  ...t,
148
1304
  getRenderer(e) {
149
1305
  let n = t.getRenderer?.(e);
150
- return !n && e.href.endsWith(".pdf") ? (e) => new D(t.pdf.pdfjsViewerInlineCss, e) : n;
1306
+ return !n && e.href.endsWith(".pdf") ? (e) => new J(t.pdf.pdfjsViewerInlineCss, e) : n;
151
1307
  },
152
- getResource: (e) => t.pdf.getArchiveForItem(e).pipe(s((t) => {
153
- if (!t) return c(void 0);
154
- if (!x(t)) return console.warn("You provided an invalid pdf archive"), c(void 0);
155
- let n = t.records.findIndex((t) => e.href.endsWith(t.uri)) - 1;
156
- return a(t.proxyDocument.getPage(n + 1)).pipe(o((e) => ({
1308
+ getResource: (e) => t.pdf.getArchiveForItem(e).pipe(i((t) => {
1309
+ if (!t) return a(void 0);
1310
+ if (!H(t)) return console.warn("You provided an invalid pdf archive"), a(void 0);
1311
+ let i = t.records.findIndex((t) => e.href.endsWith(t.uri)) - 1;
1312
+ return n(t.proxyDocument.getPage(i + 1)).pipe(r((e) => ({
157
1313
  custom: !0,
158
1314
  data: e
159
1315
  })));
160
1316
  }))
161
1317
  });
162
1318
  //#endregion
163
- export { S as createArchiveFromPdf, x as isPdfJsArchive, O as pdfEnhancer };
1319
+ export { U as createArchiveFromPdf, H as isPdfJsArchive, Y as pdfEnhancer };
164
1320
 
165
1321
  //# sourceMappingURL=index.js.map