react-native-simple-epub-reader 0.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/LICENSE +20 -0
- package/README.md +37 -0
- package/lib/module/components/GestureHandler/index.js +39 -0
- package/lib/module/components/GestureHandler/index.js.map +1 -0
- package/lib/module/components/Reader.js +207 -0
- package/lib/module/components/Reader.js.map +1 -0
- package/lib/module/constants/template.js +402 -0
- package/lib/module/constants/template.js.map +1 -0
- package/lib/module/constants/theme.js +43 -0
- package/lib/module/constants/theme.js.map +1 -0
- package/lib/module/context/ReaderContext.js +213 -0
- package/lib/module/context/ReaderContext.js.map +1 -0
- package/lib/module/context/types.js +4 -0
- package/lib/module/context/types.js.map +1 -0
- package/lib/module/helpers/downloadEpub.js +17 -0
- package/lib/module/helpers/downloadEpub.js.map +1 -0
- package/lib/module/helpers/loadScripts.js +21 -0
- package/lib/module/helpers/loadScripts.js.map +1 -0
- package/lib/module/helpers/saveTemplateToFile.js +21 -0
- package/lib/module/helpers/saveTemplateToFile.js.map +1 -0
- package/lib/module/helpers/webViewInjectFunctions.js +14 -0
- package/lib/module/helpers/webViewInjectFunctions.js.map +1 -0
- package/lib/module/hooks/useInjectWebviewVariables.js +20 -0
- package/lib/module/hooks/useInjectWebviewVariables.js.map +1 -0
- package/lib/module/hooks/useReaderState.js +117 -0
- package/lib/module/hooks/useReaderState.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/scripts/epub.js +14326 -0
- package/lib/module/scripts/epub.js.map +1 -0
- package/lib/module/scripts/jszip.js +6646 -0
- package/lib/module/scripts/jszip.js.map +1 -0
- package/lib/module/types/index.js +14 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/state.types.js +23 -0
- package/lib/module/types/state.types.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/GestureHandler/index.d.ts +5 -0
- package/lib/typescript/src/components/GestureHandler/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reader.d.ts +4 -0
- package/lib/typescript/src/components/Reader.d.ts.map +1 -0
- package/lib/typescript/src/constants/template.d.ts +3 -0
- package/lib/typescript/src/constants/template.d.ts.map +1 -0
- package/lib/typescript/src/constants/theme.d.ts +3 -0
- package/lib/typescript/src/constants/theme.d.ts.map +1 -0
- package/lib/typescript/src/context/ReaderContext.d.ts +7 -0
- package/lib/typescript/src/context/ReaderContext.d.ts.map +1 -0
- package/lib/typescript/src/context/types.d.ts +60 -0
- package/lib/typescript/src/context/types.d.ts.map +1 -0
- package/lib/typescript/src/helpers/downloadEpub.d.ts +2 -0
- package/lib/typescript/src/helpers/downloadEpub.d.ts.map +1 -0
- package/lib/typescript/src/helpers/loadScripts.d.ts +2 -0
- package/lib/typescript/src/helpers/loadScripts.d.ts.map +1 -0
- package/lib/typescript/src/helpers/saveTemplateToFile.d.ts +3 -0
- package/lib/typescript/src/helpers/saveTemplateToFile.d.ts.map +1 -0
- package/lib/typescript/src/helpers/webViewInjectFunctions.d.ts +4 -0
- package/lib/typescript/src/helpers/webViewInjectFunctions.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useInjectWebviewVariables.d.ts +12 -0
- package/lib/typescript/src/hooks/useInjectWebviewVariables.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useReaderState.d.ts +6 -0
- package/lib/typescript/src/hooks/useReaderState.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/scripts/epub.d.ts +3 -0
- package/lib/typescript/src/scripts/epub.d.ts.map +1 -0
- package/lib/typescript/src/scripts/jszip.d.ts +3 -0
- package/lib/typescript/src/scripts/jszip.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +72 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/lib/typescript/src/types/state.types.d.ts +83 -0
- package/lib/typescript/src/types/state.types.d.ts.map +1 -0
- package/package.json +171 -0
- package/src/components/GestureHandler/index.tsx +63 -0
- package/src/components/Reader.tsx +262 -0
- package/src/constants/template.ts +399 -0
- package/src/constants/theme.ts +42 -0
- package/src/context/ReaderContext.tsx +265 -0
- package/src/context/types.ts +62 -0
- package/src/helpers/downloadEpub.ts +21 -0
- package/src/helpers/loadScripts.ts +22 -0
- package/src/helpers/saveTemplateToFile.ts +20 -0
- package/src/helpers/webViewInjectFunctions.ts +18 -0
- package/src/hooks/useInjectWebviewVariables.ts +51 -0
- package/src/hooks/useReaderState.ts +118 -0
- package/src/index.tsx +3 -0
- package/src/scripts/epub.ts +14323 -0
- package/src/scripts/jszip.ts +6643 -0
- package/src/types/index.ts +83 -0
- package/src/types/state.types.ts +86 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "\n!(function (t, e) {\n \"object\" == typeof exports && \"object\" == typeof module\n ? (module.exports = e(require(\"JSZip\")))\n : \"function\" == typeof define && define.amd\n ? define([\"JSZip\"], e)\n : \"object\" == typeof exports\n ? (exports.ePub = e(require(\"JSZip\")))\n : (t.ePub = e(t.JSZip));\n})(window, function (t) {\n return (function (t) {\n var e = {};\n function i(n) {\n if (e[n]) return e[n].exports;\n var r = (e[n] = { i: n, l: !1, exports: {} });\n return t[n].call(r.exports, r, r.exports, i), (r.l = !0), r.exports;\n }\n return (\n (i.m = t),\n (i.c = e),\n (i.d = function (t, e, n) {\n i.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: n });\n }),\n (i.r = function (t) {\n \"undefined\" != typeof Symbol &&\n Symbol.toStringTag &&\n Object.defineProperty(t, Symbol.toStringTag, { value: \"Module\" }),\n Object.defineProperty(t, \"__esModule\", { value: !0 });\n }),\n (i.t = function (t, e) {\n if ((1 & e && (t = i(t)), 8 & e)) return t;\n if (4 & e && \"object\" == typeof t && t && t.__esModule) return t;\n var n = Object.create(null);\n if (\n (i.r(n),\n Object.defineProperty(n, \"default\", { enumerable: !0, value: t }),\n 2 & e && \"string\" != typeof t)\n )\n for (var r in t)\n i.d(\n n,\n r,\n function (e) {\n return t[e];\n }.bind(null, r),\n );\n return n;\n }),\n (i.n = function (t) {\n var e =\n t && t.__esModule\n ? function () {\n return t.default;\n }\n : function () {\n return t;\n };\n return i.d(e, \"a\", e), e;\n }),\n (i.o = function (t, e) {\n return Object.prototype.hasOwnProperty.call(t, e);\n }),\n (i.p = \"/dist/\"),\n i((i.s = 77))\n );\n })([\n function (t, e, i) {\n \"use strict\";\n i.r(e),\n i.d(e, \"requestAnimationFrame\", function () {\n return r;\n }),\n i.d(e, \"uuid\", function () {\n return o;\n }),\n i.d(e, \"documentHeight\", function () {\n return a;\n }),\n i.d(e, \"isElement\", function () {\n return h;\n }),\n i.d(e, \"isNumber\", function () {\n return l;\n }),\n i.d(e, \"isFloat\", function () {\n return c;\n }),\n i.d(e, \"prefixed\", function () {\n return u;\n }),\n i.d(e, \"defaults\", function () {\n return d;\n }),\n i.d(e, \"extend\", function () {\n return f;\n }),\n i.d(e, \"insert\", function () {\n return p;\n }),\n i.d(e, \"locationOf\", function () {\n return g;\n }),\n i.d(e, \"indexOfSorted\", function () {\n return m;\n }),\n i.d(e, \"bounds\", function () {\n return v;\n }),\n i.d(e, \"borders\", function () {\n return y;\n }),\n i.d(e, \"nodeBounds\", function () {\n return b;\n }),\n i.d(e, \"windowBounds\", function () {\n return w;\n }),\n i.d(e, \"indexOfNode\", function () {\n return x;\n }),\n i.d(e, \"indexOfTextNode\", function () {\n return E;\n }),\n i.d(e, \"indexOfElementNode\", function () {\n return S;\n }),\n i.d(e, \"isXml\", function () {\n return N;\n }),\n i.d(e, \"createBlob\", function () {\n return _;\n }),\n i.d(e, \"createBlobUrl\", function () {\n return O;\n }),\n i.d(e, \"revokeBlobUrl\", function () {\n return T;\n }),\n i.d(e, \"createBase64Url\", function () {\n return C;\n }),\n i.d(e, \"type\", function () {\n return I;\n }),\n i.d(e, \"parse\", function () {\n return k;\n }),\n i.d(e, \"qs\", function () {\n return R;\n }),\n i.d(e, \"qsa\", function () {\n return A;\n }),\n i.d(e, \"qsp\", function () {\n return L;\n }),\n i.d(e, \"sprint\", function () {\n return j;\n }),\n i.d(e, \"treeWalker\", function () {\n return D;\n }),\n i.d(e, \"walk\", function () {\n return P;\n }),\n i.d(e, \"blob2base64\", function () {\n return M;\n }),\n i.d(e, \"defer\", function () {\n return z;\n }),\n i.d(e, \"querySelectorByType\", function () {\n return B;\n }),\n i.d(e, \"findChildren\", function () {\n return q;\n }),\n i.d(e, \"parents\", function () {\n return F;\n }),\n i.d(e, \"filterChildren\", function () {\n return U;\n }),\n i.d(e, \"getParentByTagName\", function () {\n return W;\n }),\n i.d(e, \"RangeObject\", function () {\n return H;\n });\n var n = i(28);\n const r =\n \"undefined\" != typeof window &&\n (window.requestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.msRequestAnimationFrame),\n s =\n \"undefined\" != typeof URL\n ? URL\n : \"undefined\" != typeof window\n ? window.URL || window.webkitURL || window.mozURL\n : void 0;\n function o() {\n var t = new Date().getTime();\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(\n /[xy]/g,\n function (e) {\n var i = (t + 16 * Math.random()) % 16 | 0;\n return (\n (t = Math.floor(t / 16)),\n (\"x\" == e ? i : (7 & i) | 8).toString(16)\n );\n },\n );\n }\n function a() {\n return Math.max(\n document.documentElement.clientHeight,\n document.body.scrollHeight,\n document.documentElement.scrollHeight,\n document.body.offsetHeight,\n document.documentElement.offsetHeight,\n );\n }\n function h(t) {\n return !(!t || 1 != t.nodeType);\n }\n function l(t) {\n return !isNaN(parseFloat(t)) && isFinite(t);\n }\n function c(t) {\n let e = parseFloat(t);\n return (\n !1 !== l(t) &&\n ((\"string\" == typeof t && t.indexOf(\".\") > -1) || Math.floor(e) !== e)\n );\n }\n function u(t) {\n var e = [\"-webkit-\", \"-webkit-\", \"-moz-\", \"-o-\", \"-ms-\"],\n i = t.toLowerCase(),\n n = [\"Webkit\", \"webkit\", \"Moz\", \"O\", \"ms\"].length;\n if (\"undefined\" == typeof document || void 0 !== document.body.style[i])\n return t;\n for (var r = 0; r < n; r++)\n if (void 0 !== document.body.style[e[r] + i]) return e[r] + i;\n return t;\n }\n function d(t) {\n for (var e = 1, i = arguments.length; e < i; e++) {\n var n = arguments[e];\n for (var r in n) void 0 === t[r] && (t[r] = n[r]);\n }\n return t;\n }\n function f(t) {\n var e = [].slice.call(arguments, 1);\n return (\n e.forEach(function (e) {\n e &&\n Object.getOwnPropertyNames(e).forEach(function (i) {\n Object.defineProperty(\n t,\n i,\n Object.getOwnPropertyDescriptor(e, i),\n );\n });\n }),\n t\n );\n }\n function p(t, e, i) {\n var n = g(t, e, i);\n return e.splice(n, 0, t), n;\n }\n function g(t, e, i, n, r) {\n var s,\n o = n || 0,\n a = r || e.length,\n h = parseInt(o + (a - o) / 2);\n return (\n i ||\n (i = function (t, e) {\n return t > e ? 1 : t < e ? -1 : t == e ? 0 : void 0;\n }),\n a - o <= 0\n ? h\n : ((s = i(e[h], t)),\n a - o == 1\n ? s >= 0\n ? h\n : h + 1\n : 0 === s\n ? h\n : -1 === s\n ? g(t, e, i, h, a)\n : g(t, e, i, o, h))\n );\n }\n function m(t, e, i, n, r) {\n var s,\n o = n || 0,\n a = r || e.length,\n h = parseInt(o + (a - o) / 2);\n return (\n i ||\n (i = function (t, e) {\n return t > e ? 1 : t < e ? -1 : t == e ? 0 : void 0;\n }),\n a - o <= 0\n ? -1\n : ((s = i(e[h], t)),\n a - o == 1\n ? 0 === s\n ? h\n : -1\n : 0 === s\n ? h\n : -1 === s\n ? m(t, e, i, h, a)\n : m(t, e, i, o, h))\n );\n }\n function v(t) {\n var e = window.getComputedStyle(t),\n i = 0,\n n = 0;\n return (\n [\n \"width\",\n \"paddingRight\",\n \"paddingLeft\",\n \"marginRight\",\n \"marginLeft\",\n \"borderRightWidth\",\n \"borderLeftWidth\",\n ].forEach(function (t) {\n i += parseFloat(e[t]) || 0;\n }),\n [\n \"height\",\n \"paddingTop\",\n \"paddingBottom\",\n \"marginTop\",\n \"marginBottom\",\n \"borderTopWidth\",\n \"borderBottomWidth\",\n ].forEach(function (t) {\n n += parseFloat(e[t]) || 0;\n }),\n { height: n, width: i }\n );\n }\n function y(t) {\n var e = window.getComputedStyle(t),\n i = 0,\n n = 0;\n return (\n [\n \"paddingRight\",\n \"paddingLeft\",\n \"marginRight\",\n \"marginLeft\",\n \"borderRightWidth\",\n \"borderLeftWidth\",\n ].forEach(function (t) {\n i += parseFloat(e[t]) || 0;\n }),\n [\n \"paddingTop\",\n \"paddingBottom\",\n \"marginTop\",\n \"marginBottom\",\n \"borderTopWidth\",\n \"borderBottomWidth\",\n ].forEach(function (t) {\n n += parseFloat(e[t]) || 0;\n }),\n { height: n, width: i }\n );\n }\n function b(t) {\n let e,\n i = t.ownerDocument;\n if (t.nodeType == Node.TEXT_NODE) {\n let n = i.createRange();\n n.selectNodeContents(t), (e = n.getBoundingClientRect());\n } else e = t.getBoundingClientRect();\n return e;\n }\n function w() {\n var t = window.innerWidth,\n e = window.innerHeight;\n return { top: 0, left: 0, right: t, bottom: e, width: t, height: e };\n }\n function x(t, e) {\n for (\n var i, n = t.parentNode.childNodes, r = -1, s = 0;\n s < n.length && ((i = n[s]).nodeType === e && r++, i != t);\n s++\n );\n return r;\n }\n function E(t) {\n return x(t, 3);\n }\n function S(t) {\n return x(t, 1);\n }\n function N(t) {\n return [\"xml\", \"opf\", \"ncx\"].indexOf(t) > -1;\n }\n function _(t, e) {\n return new Blob([t], { type: e });\n }\n function O(t, e) {\n var i = _(t, e);\n return s.createObjectURL(i);\n }\n function T(t) {\n return s.revokeObjectURL(t);\n }\n function C(t, e) {\n if (\"string\" == typeof t) return \"data:\" + e + \";base64,\" + btoa(t);\n }\n function I(t) {\n return Object.prototype.toString.call(t).slice(8, -1);\n }\n function k(t, e, i) {\n var r;\n return (\n (r = \"undefined\" == typeof DOMParser || i ? n.DOMParser : DOMParser),\n 65279 === t.charCodeAt(0) && (t = t.slice(1)),\n new r().parseFromString(t, e)\n );\n }\n function R(t, e) {\n var i;\n if (!t) throw new Error(\"No Element Provided\");\n return void 0 !== t.querySelector\n ? t.querySelector(e)\n : (i = t.getElementsByTagName(e)).length\n ? i[0]\n : void 0;\n }\n function A(t, e) {\n return void 0 !== t.querySelector\n ? t.querySelectorAll(e)\n : t.getElementsByTagName(e);\n }\n function L(t, e, i) {\n var n, r;\n if (void 0 !== t.querySelector) {\n for (var s in ((e += \"[\"), i)) e += s + \"~='\" + i[s] + \"'\";\n return (e += \"]\"), t.querySelector(e);\n }\n if (\n ((n = t.getElementsByTagName(e)),\n (r = Array.prototype.slice.call(n, 0).filter(function (t) {\n for (var e in i) if (t.getAttribute(e) === i[e]) return !0;\n return !1;\n })))\n )\n return r[0];\n }\n function j(t, e) {\n void 0 !== (t.ownerDocument || t).createTreeWalker\n ? D(t, e, NodeFilter.SHOW_TEXT)\n : P(t, function (t) {\n t && 3 === t.nodeType && e(t);\n });\n }\n function D(t, e, i) {\n var n = document.createTreeWalker(t, i, null, !1);\n let r;\n for (; (r = n.nextNode()); ) e(r);\n }\n function P(t, e) {\n if (e(t)) return !0;\n if ((t = t.firstChild))\n do {\n if (P(t, e)) return !0;\n t = t.nextSibling;\n } while (t);\n }\n function M(t) {\n return new Promise(function (e, i) {\n var n = new FileReader();\n n.readAsDataURL(t),\n (n.onloadend = function () {\n e(n.result);\n });\n });\n }\n function z() {\n (this.resolve = null),\n (this.reject = null),\n (this.id = o()),\n (this.promise = new Promise((t, e) => {\n (this.resolve = t), (this.reject = e);\n })),\n Object.freeze(this);\n }\n function B(t, e, i) {\n var n;\n if (\n (void 0 !== t.querySelector &&\n (n = t.querySelector(`${e}[*|type=\"${i}\"]`)),\n n && 0 !== n.length)\n )\n return n;\n n = A(t, e);\n for (var r = 0; r < n.length; r++)\n if (\n n[r].getAttributeNS(\"http://www.idpf.org/2007/ops\", \"type\") === i ||\n n[r].getAttribute(\"epub:type\") === i\n )\n return n[r];\n }\n function q(t) {\n for (var e = [], i = t.childNodes, n = 0; n < i.length; n++) {\n let t = i[n];\n 1 === t.nodeType && e.push(t);\n }\n return e;\n }\n function F(t) {\n for (var e = [t]; t; t = t.parentNode) e.unshift(t);\n return e;\n }\n function U(t, e, i) {\n for (var n = [], r = t.childNodes, s = 0; s < r.length; s++) {\n let t = r[s];\n if (1 === t.nodeType && t.nodeName.toLowerCase() === e) {\n if (i) return t;\n n.push(t);\n }\n }\n if (!i) return n;\n }\n function W(t, e) {\n let i;\n if (null !== t && \"\" !== e)\n for (i = t.parentNode; 1 === i.nodeType; ) {\n if (i.tagName.toLowerCase() === e) return i;\n i = i.parentNode;\n }\n }\n class H {\n constructor() {\n (this.collapsed = !1),\n (this.commonAncestorContainer = void 0),\n (this.endContainer = void 0),\n (this.endOffset = void 0),\n (this.startContainer = void 0),\n (this.startOffset = void 0);\n }\n setStart(t, e) {\n (this.startContainer = t),\n (this.startOffset = e),\n this.endContainer\n ? (this.commonAncestorContainer = this._commonAncestorContainer())\n : this.collapse(!0),\n this._checkCollapsed();\n }\n setEnd(t, e) {\n (this.endContainer = t),\n (this.endOffset = e),\n this.startContainer\n ? ((this.collapsed = !1),\n (this.commonAncestorContainer =\n this._commonAncestorContainer()))\n : this.collapse(!1),\n this._checkCollapsed();\n }\n collapse(t) {\n (this.collapsed = !0),\n t\n ? ((this.endContainer = this.startContainer),\n (this.endOffset = this.startOffset),\n (this.commonAncestorContainer = this.startContainer.parentNode))\n : ((this.startContainer = this.endContainer),\n (this.startOffset = this.endOffset),\n (this.commonAncestorContainer = this.endOffset.parentNode));\n }\n selectNode(t) {\n let e = t.parentNode,\n i = Array.prototype.indexOf.call(e.childNodes, t);\n this.setStart(e, i), this.setEnd(e, i + 1);\n }\n selectNodeContents(t) {\n t.childNodes[t.childNodes - 1];\n let e =\n 3 === t.nodeType ? t.textContent.length : parent.childNodes.length;\n this.setStart(t, 0), this.setEnd(t, e);\n }\n _commonAncestorContainer(t, e) {\n var i = F(t || this.startContainer),\n n = F(e || this.endContainer);\n if (i[0] == n[0])\n for (var r = 0; r < i.length; r++)\n if (i[r] != n[r]) return i[r - 1];\n }\n _checkCollapsed() {\n this.startContainer === this.endContainer &&\n this.startOffset === this.endOffset\n ? (this.collapsed = !0)\n : (this.collapsed = !1);\n }\n toString() {}\n }\n },\n function (t, e, i) {\n \"use strict\";\n i.d(e, \"b\", function () {\n return n;\n }),\n i.d(e, \"a\", function () {\n return r;\n }),\n i.d(e, \"c\", function () {\n return s;\n });\n const n = \"0.3\",\n r = [\n \"keydown\",\n \"keyup\",\n \"keypressed\",\n \"mouseup\",\n \"mousedown\",\n \"mousemove\",\n \"click\",\n \"touchend\",\n \"touchstart\",\n \"touchmove\",\n ],\n s = {\n BOOK: { OPEN_FAILED: \"openFailed\" },\n CONTENTS: {\n EXPAND: \"expand\",\n RESIZE: \"resize\",\n SELECTED: \"selected\",\n SELECTED_RANGE: \"selectedRange\",\n LINK_CLICKED: \"linkClicked\",\n },\n LOCATIONS: { CHANGED: \"changed\" },\n MANAGERS: {\n RESIZE: \"resize\",\n RESIZED: \"resized\",\n ORIENTATION_CHANGE: \"orientationchange\",\n ADDED: \"added\",\n SCROLL: \"scroll\",\n SCROLLED: \"scrolled\",\n REMOVED: \"removed\",\n },\n VIEWS: {\n AXIS: \"axis\",\n WRITING_MODE: \"writingMode\",\n LOAD_ERROR: \"loaderror\",\n RENDERED: \"rendered\",\n RESIZED: \"resized\",\n DISPLAYED: \"displayed\",\n SHOWN: \"shown\",\n HIDDEN: \"hidden\",\n MARK_CLICKED: \"markClicked\",\n },\n RENDITION: {\n STARTED: \"started\",\n ATTACHED: \"attached\",\n DISPLAYED: \"displayed\",\n DISPLAY_ERROR: \"displayerror\",\n RENDERED: \"rendered\",\n REMOVED: \"removed\",\n RESIZED: \"resized\",\n ORIENTATION_CHANGE: \"orientationchange\",\n LOCATION_CHANGED: \"locationChanged\",\n RELOCATED: \"relocated\",\n MARK_CLICKED: \"markClicked\",\n SELECTED: \"selected\",\n LAYOUT: \"layout\",\n },\n LAYOUT: { UPDATED: \"updated\" },\n ANNOTATION: { ATTACH: \"attach\", DETACH: \"detach\" },\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(0);\n class r {\n constructor(t, e, i) {\n var s;\n if (\n ((this.str = \"\"),\n (this.base = {}),\n (this.spinePos = 0),\n (this.range = !1),\n (this.path = {}),\n (this.start = null),\n (this.end = null),\n !(this instanceof r))\n )\n return new r(t, e, i);\n if (\n (\"string\" == typeof e\n ? (this.base = this.parseComponent(e))\n : \"object\" == typeof e && e.steps && (this.base = e),\n \"string\" === (s = this.checkType(t)))\n )\n return (this.str = t), Object(n.extend)(this, this.parse(t));\n if (\"range\" === s)\n return Object(n.extend)(this, this.fromRange(t, this.base, i));\n if (\"node\" === s)\n return Object(n.extend)(this, this.fromNode(t, this.base, i));\n if (\"EpubCFI\" === s && t.path) return t;\n if (t) throw new TypeError(\"not a valid argument for EpubCFI\");\n return this;\n }\n checkType(t) {\n return this.isCfiString(t)\n ? \"string\"\n : !t ||\n \"object\" != typeof t ||\n (\"Range\" !== Object(n.type)(t) && void 0 === t.startContainer)\n ? t && \"object\" == typeof t && void 0 !== t.nodeType\n ? \"node\"\n : !!(t && \"object\" == typeof t && t instanceof r) && \"EpubCFI\"\n : \"range\";\n }\n parse(t) {\n var e,\n i,\n n,\n r = {\n spinePos: -1,\n range: !1,\n base: {},\n path: {},\n start: null,\n end: null,\n };\n return \"string\" != typeof t\n ? { spinePos: -1 }\n : (0 === t.indexOf(\"epubcfi(\") &&\n \")\" === t[t.length - 1] &&\n (t = t.slice(8, t.length - 1)),\n (e = this.getChapterComponent(t))\n ? ((r.base = this.parseComponent(e)),\n (i = this.getPathComponent(t)),\n (r.path = this.parseComponent(i)),\n (n = this.getRange(t)) &&\n ((r.range = !0),\n (r.start = this.parseComponent(n[0])),\n (r.end = this.parseComponent(n[1]))),\n (r.spinePos = r.base.steps[1].index),\n r)\n : { spinePos: -1 });\n }\n parseComponent(t) {\n var e,\n i = { steps: [], terminal: { offset: null, assertion: null } },\n n = t.split(\":\"),\n r = n[0].split(\"/\");\n return (\n n.length > 1 && ((e = n[1]), (i.terminal = this.parseTerminal(e))),\n \"\" === r[0] && r.shift(),\n (i.steps = r.map(\n function (t) {\n return this.parseStep(t);\n }.bind(this),\n )),\n i\n );\n }\n parseStep(t) {\n var e, i, n, r, s;\n if (\n ((r = t.match(/\\[(.*)\\]/)) && r[1] && (s = r[1]),\n (i = parseInt(t)),\n !isNaN(i))\n )\n return (\n i % 2 == 0\n ? ((e = \"element\"), (n = i / 2 - 1))\n : ((e = \"text\"), (n = (i - 1) / 2)),\n { type: e, index: n, id: s || null }\n );\n }\n parseTerminal(t) {\n var e,\n i,\n r = t.match(/\\[(.*)\\]/);\n return (\n r && r[1]\n ? ((e = parseInt(t.split(\"[\")[0])), (i = r[1]))\n : (e = parseInt(t)),\n Object(n.isNumber)(e) || (e = null),\n { offset: e, assertion: i }\n );\n }\n getChapterComponent(t) {\n return t.split(\"!\")[0];\n }\n getPathComponent(t) {\n var e = t.split(\"!\");\n if (e[1]) {\n return e[1].split(\",\")[0];\n }\n }\n getRange(t) {\n var e = t.split(\",\");\n return 3 === e.length && [e[1], e[2]];\n }\n getCharecterOffsetComponent(t) {\n return t.split(\":\")[1] || \"\";\n }\n joinSteps(t) {\n return t\n ? t\n .map(function (t) {\n var e = \"\";\n return (\n \"element\" === t.type && (e += 2 * (t.index + 1)),\n \"text\" === t.type && (e += 1 + 2 * t.index),\n t.id && (e += \"[\" + t.id + \"]\"),\n e\n );\n })\n .join(\"/\")\n : \"\";\n }\n segmentString(t) {\n var e = \"/\";\n return (\n (e += this.joinSteps(t.steps)),\n t.terminal &&\n null != t.terminal.offset &&\n (e += \":\" + t.terminal.offset),\n t.terminal &&\n null != t.terminal.assertion &&\n (e += \"[\" + t.terminal.assertion + \"]\"),\n e\n );\n }\n toString() {\n var t = \"epubcfi(\";\n return (\n (t += this.segmentString(this.base)),\n (t += \"!\"),\n (t += this.segmentString(this.path)),\n this.range &&\n this.start &&\n ((t += \",\"), (t += this.segmentString(this.start))),\n this.range &&\n this.end &&\n ((t += \",\"), (t += this.segmentString(this.end))),\n (t += \")\")\n );\n }\n compare(t, e) {\n var i, n, s, o;\n if (\n (\"string\" == typeof t && (t = new r(t)),\n \"string\" == typeof e && (e = new r(e)),\n t.spinePos > e.spinePos)\n )\n return 1;\n if (t.spinePos < e.spinePos) return -1;\n t.range\n ? ((i = t.path.steps.concat(t.start.steps)), (s = t.start.terminal))\n : ((i = t.path.steps), (s = t.path.terminal)),\n e.range\n ? ((n = e.path.steps.concat(e.start.steps)),\n (o = e.start.terminal))\n : ((n = e.path.steps), (o = e.path.terminal));\n for (var a = 0; a < i.length; a++) {\n if (!i[a]) return -1;\n if (!n[a]) return 1;\n if (i[a].index > n[a].index) return 1;\n if (i[a].index < n[a].index) return -1;\n }\n return i.length < n.length\n ? -1\n : s.offset > o.offset\n ? 1\n : s.offset < o.offset\n ? -1\n : 0;\n }\n step(t) {\n var e = 3 === t.nodeType ? \"text\" : \"element\";\n return {\n id: t.id,\n tagName: t.tagName,\n type: e,\n index: this.position(t),\n };\n }\n filteredStep(t, e) {\n var i,\n n = this.filter(t, e);\n if (n)\n return (\n (i = 3 === n.nodeType ? \"text\" : \"element\"),\n {\n id: n.id,\n tagName: n.tagName,\n type: i,\n index: this.filteredPosition(n, e),\n }\n );\n }\n pathTo(t, e, i) {\n for (\n var n,\n r = { steps: [], terminal: { offset: null, assertion: null } },\n s = t;\n s && s.parentNode && 9 != s.parentNode.nodeType;\n\n )\n (n = i ? this.filteredStep(s, i) : this.step(s)) &&\n r.steps.unshift(n),\n (s = s.parentNode);\n return (\n null != e &&\n e >= 0 &&\n ((r.terminal.offset = e),\n \"text\" != r.steps[r.steps.length - 1].type &&\n r.steps.push({ type: \"text\", index: 0 })),\n r\n );\n }\n equalStep(t, e) {\n return (\n !(!t || !e) &&\n t.index === e.index &&\n t.id === e.id &&\n t.type === e.type\n );\n }\n fromRange(t, e, i) {\n var n = { range: !1, base: {}, path: {}, start: null, end: null },\n r = t.startContainer,\n s = t.endContainer,\n o = t.startOffset,\n a = t.endOffset,\n h = !1;\n if (\n (i && (h = null != r.ownerDocument.querySelector(\".\" + i)),\n \"string\" == typeof e\n ? ((n.base = this.parseComponent(e)),\n (n.spinePos = n.base.steps[1].index))\n : \"object\" == typeof e && (n.base = e),\n t.collapsed)\n )\n h && (o = this.patchOffset(r, o, i)),\n (n.path = this.pathTo(r, o, i));\n else {\n (n.range = !0),\n h && (o = this.patchOffset(r, o, i)),\n (n.start = this.pathTo(r, o, i)),\n h && (a = this.patchOffset(s, a, i)),\n (n.end = this.pathTo(s, a, i)),\n (n.path = { steps: [], terminal: null });\n var l,\n c = n.start.steps.length;\n for (\n l = 0;\n l < c && this.equalStep(n.start.steps[l], n.end.steps[l]);\n l++\n )\n l === c - 1\n ? n.start.terminal === n.end.terminal &&\n (n.path.steps.push(n.start.steps[l]), (n.range = !1))\n : n.path.steps.push(n.start.steps[l]);\n (n.start.steps = n.start.steps.slice(n.path.steps.length)),\n (n.end.steps = n.end.steps.slice(n.path.steps.length));\n }\n return n;\n }\n fromNode(t, e, i) {\n var n = { range: !1, base: {}, path: {}, start: null, end: null };\n return (\n \"string\" == typeof e\n ? ((n.base = this.parseComponent(e)),\n (n.spinePos = n.base.steps[1].index))\n : \"object\" == typeof e && (n.base = e),\n (n.path = this.pathTo(t, null, i)),\n n\n );\n }\n filter(t, e) {\n var i,\n n,\n r,\n s,\n o,\n a = !1;\n return (\n 3 === t.nodeType\n ? ((a = !0),\n (r = t.parentNode),\n (i = t.parentNode.classList.contains(e)))\n : ((a = !1), (i = t.classList.contains(e))),\n i && a\n ? ((s = r.previousSibling),\n (o = r.nextSibling),\n s && 3 === s.nodeType\n ? (n = s)\n : o && 3 === o.nodeType && (n = o),\n n || t)\n : !(i && !a) && t\n );\n }\n patchOffset(t, e, i) {\n if (3 != t.nodeType) throw new Error(\"Anchor must be a text node\");\n var n = t,\n r = e;\n for (\n t.parentNode.classList.contains(i) && (n = t.parentNode);\n n.previousSibling;\n\n ) {\n if (1 === n.previousSibling.nodeType) {\n if (!n.previousSibling.classList.contains(i)) break;\n r += n.previousSibling.textContent.length;\n } else r += n.previousSibling.textContent.length;\n n = n.previousSibling;\n }\n return r;\n }\n normalizedMap(t, e, i) {\n var n,\n r,\n s,\n o = {},\n a = -1,\n h = t.length;\n for (n = 0; n < h; n++)\n 1 === (r = t[n].nodeType) && t[n].classList.contains(i) && (r = 3),\n n > 0 && 3 === r && 3 === s\n ? (o[n] = a)\n : e === r && ((a += 1), (o[n] = a)),\n (s = r);\n return o;\n }\n position(t) {\n var e, i;\n return (\n 1 === t.nodeType\n ? ((e = t.parentNode.children) ||\n (e = Object(n.findChildren)(t.parentNode)),\n (i = Array.prototype.indexOf.call(e, t)))\n : (i = (e = this.textNodes(t.parentNode)).indexOf(t)),\n i\n );\n }\n filteredPosition(t, e) {\n var i, n;\n return (\n 1 === t.nodeType\n ? ((i = t.parentNode.children), (n = this.normalizedMap(i, 1, e)))\n : ((i = t.parentNode.childNodes),\n t.parentNode.classList.contains(e) &&\n (i = (t = t.parentNode).parentNode.childNodes),\n (n = this.normalizedMap(i, 3, e))),\n n[Array.prototype.indexOf.call(i, t)]\n );\n }\n stepsToXpath(t) {\n var e = [\".\", \"*\"];\n return (\n t.forEach(function (t) {\n var i = t.index + 1;\n t.id\n ? e.push(\"*[position()=\" + i + \" and @id='\" + t.id + \"']\")\n : \"text\" === t.type\n ? e.push(\"text()[\" + i + \"]\")\n : e.push(\"*[\" + i + \"]\");\n }),\n e.join(\"/\")\n );\n }\n stepsToQuerySelector(t) {\n var e = [\"html\"];\n return (\n t.forEach(function (t) {\n var i = t.index + 1;\n t.id\n ? e.push(\"#\" + t.id)\n : \"text\" === t.type || e.push(\"*:nth-child(\" + i + \")\");\n }),\n e.join(\">\")\n );\n }\n textNodes(t, e) {\n return Array.prototype.slice.call(t.childNodes).filter(function (t) {\n return 3 === t.nodeType || !(!e || !t.classList.contains(e));\n });\n }\n walkToNode(t, e, i) {\n var r,\n s,\n o = e || document,\n a = o.documentElement,\n h = t.length;\n for (\n s = 0;\n s < h &&\n (\"element\" === (r = t[s]).type\n ? (a = r.id\n ? o.getElementById(r.id)\n : (a.children || Object(n.findChildren)(a))[r.index])\n : \"text\" === r.type && (a = this.textNodes(a, i)[r.index]),\n a);\n s++\n );\n return a;\n }\n findNode(t, e, i) {\n var n,\n r,\n s = e || document;\n return (\n i || void 0 === s.evaluate\n ? (n = i ? this.walkToNode(t, s, i) : this.walkToNode(t, s))\n : ((r = this.stepsToXpath(t)),\n (n = s.evaluate(\n r,\n s,\n null,\n XPathResult.FIRST_ORDERED_NODE_TYPE,\n null,\n ).singleNodeValue)),\n n\n );\n }\n fixMiss(t, e, i, n) {\n var r,\n s,\n o = this.findNode(t.slice(0, -1), i, n),\n a = o.childNodes,\n h = this.normalizedMap(a, 3, n),\n l = t[t.length - 1].index;\n for (let t in h) {\n if (!h.hasOwnProperty(t)) return;\n if (h[t] === l) {\n if (!(e > (s = (r = a[t]).textContent.length))) {\n o = 1 === r.nodeType ? r.childNodes[0] : r;\n break;\n }\n e -= s;\n }\n }\n return { container: o, offset: e };\n }\n toRange(t, e) {\n var i,\n r,\n s,\n o,\n a,\n h,\n l,\n c,\n u = t || document,\n d = !!e && null != u.querySelector(\".\" + e);\n if (\n ((i =\n void 0 !== u.createRange ? u.createRange() : new n.RangeObject()),\n this.range\n ? ((r = this.start),\n (h = this.path.steps.concat(r.steps)),\n (o = this.findNode(h, u, d ? e : null)),\n (s = this.end),\n (l = this.path.steps.concat(s.steps)),\n (a = this.findNode(l, u, d ? e : null)))\n : ((r = this.path),\n (h = this.path.steps),\n (o = this.findNode(this.path.steps, u, d ? e : null))),\n !o)\n )\n return null;\n try {\n null != r.terminal.offset\n ? i.setStart(o, r.terminal.offset)\n : i.setStart(o, 0);\n } catch (t) {\n (c = this.fixMiss(h, r.terminal.offset, u, d ? e : null)),\n i.setStart(c.container, c.offset);\n }\n if (a)\n try {\n null != s.terminal.offset\n ? i.setEnd(a, s.terminal.offset)\n : i.setEnd(a, 0);\n } catch (t) {\n (c = this.fixMiss(l, this.end.terminal.offset, u, d ? e : null)),\n i.setEnd(c.container, c.offset);\n }\n return i;\n }\n isCfiString(t) {\n return (\n \"string\" == typeof t &&\n 0 === t.indexOf(\"epubcfi(\") &&\n \")\" === t[t.length - 1]\n );\n }\n generateChapterComponent(t, e, i) {\n var n = \"/\" + 2 * (t + 1) + \"/\";\n return (n += 2 * (parseInt(e) + 1)), i && (n += \"[\" + i + \"]\"), n;\n }\n collapse(t) {\n this.range &&\n ((this.range = !1),\n t\n ? ((this.path.steps = this.path.steps.concat(this.start.steps)),\n (this.path.terminal = this.start.terminal))\n : ((this.path.steps = this.path.steps.concat(this.end.steps)),\n (this.path.terminal = this.end.terminal)));\n }\n }\n e.a = r;\n },\n function (t, e, i) {\n \"use strict\";\n var n,\n r,\n s,\n o,\n a,\n h,\n l,\n c = i(78),\n u = i(92),\n d = Function.prototype.apply,\n f = Function.prototype.call,\n p = Object.create,\n g = Object.defineProperty,\n m = Object.defineProperties,\n v = Object.prototype.hasOwnProperty,\n y = { configurable: !0, enumerable: !1, writable: !0 };\n (r = function (t, e) {\n var i, r;\n return (\n u(e),\n (r = this),\n n.call(\n this,\n t,\n (i = function () {\n s.call(r, t, i), d.call(e, this, arguments);\n }),\n ),\n (i.__eeOnceListener__ = e),\n this\n );\n }),\n (a = {\n on: (n = function (t, e) {\n var i;\n return (\n u(e),\n v.call(this, \"__ee__\")\n ? (i = this.__ee__)\n : ((i = y.value = p(null)),\n g(this, \"__ee__\", y),\n (y.value = null)),\n i[t]\n ? \"object\" == typeof i[t]\n ? i[t].push(e)\n : (i[t] = [i[t], e])\n : (i[t] = e),\n this\n );\n }),\n once: r,\n off: (s = function (t, e) {\n var i, n, r, s;\n if ((u(e), !v.call(this, \"__ee__\"))) return this;\n if (!(i = this.__ee__)[t]) return this;\n if (\"object\" == typeof (n = i[t]))\n for (s = 0; (r = n[s]); ++s)\n (r !== e && r.__eeOnceListener__ !== e) ||\n (2 === n.length ? (i[t] = n[s ? 0 : 1]) : n.splice(s, 1));\n else (n !== e && n.__eeOnceListener__ !== e) || delete i[t];\n return this;\n }),\n emit: (o = function (t) {\n var e, i, n, r, s;\n if (v.call(this, \"__ee__\") && (r = this.__ee__[t]))\n if (\"object\" == typeof r) {\n for (\n i = arguments.length, s = new Array(i - 1), e = 1;\n e < i;\n ++e\n )\n s[e - 1] = arguments[e];\n for (r = r.slice(), e = 0; (n = r[e]); ++e) d.call(n, this, s);\n } else\n switch (arguments.length) {\n case 1:\n f.call(r, this);\n break;\n case 2:\n f.call(r, this, arguments[1]);\n break;\n case 3:\n f.call(r, this, arguments[1], arguments[2]);\n break;\n default:\n for (\n i = arguments.length, s = new Array(i - 1), e = 1;\n e < i;\n ++e\n )\n s[e - 1] = arguments[e];\n d.call(r, this, s);\n }\n }),\n }),\n (h = { on: c(n), once: c(r), off: c(s), emit: c(o) }),\n (l = m({}, h)),\n (t.exports = e =\n function (t) {\n return null == t ? p(l) : m(Object(t), h);\n }),\n (e.methods = a);\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(8),\n r = i.n(n);\n e.a = class {\n constructor(t) {\n var e;\n t.indexOf(\"://\") > -1 && (t = new URL(t).pathname),\n (e = this.parse(t)),\n (this.path = t),\n this.isDirectory(t)\n ? (this.directory = t)\n : (this.directory = e.dir + \"/\"),\n (this.filename = e.base),\n (this.extension = e.ext.slice(1));\n }\n parse(t) {\n return r.a.parse(t);\n }\n isAbsolute(t) {\n return r.a.isAbsolute(t || this.path);\n }\n isDirectory(t) {\n return \"/\" === t.charAt(t.length - 1);\n }\n join(t) {\n return r.a.join(this.directory, t);\n }\n resolve(t) {\n return r.a.resolve(this.directory, t);\n }\n relative(t) {\n return t && t.indexOf(\"://\") > -1\n ? t\n : r.a.relative(this.directory, t);\n }\n splitPath(t) {\n return this.splitPathRe.exec(t).slice(1);\n }\n toString() {\n return this.path;\n }\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(4),\n r = i(8),\n s = i.n(r);\n e.a = class {\n constructor(t, e) {\n var i = t.indexOf(\"://\") > -1,\n r = t;\n if (\n ((this.Url = void 0),\n (this.href = t),\n (this.protocol = \"\"),\n (this.origin = \"\"),\n (this.hash = \"\"),\n (this.hash = \"\"),\n (this.search = \"\"),\n (this.base = e),\n !i &&\n !1 !== e &&\n \"string\" != typeof e &&\n window &&\n window.location &&\n (this.base = window.location.href),\n i || this.base)\n )\n try {\n this.base\n ? (this.Url = new URL(t, this.base))\n : (this.Url = new URL(t)),\n (this.href = this.Url.href),\n (this.protocol = this.Url.protocol),\n (this.origin = this.Url.origin),\n (this.hash = this.Url.hash),\n (this.search = this.Url.search),\n (r =\n this.Url.pathname + (this.Url.search ? this.Url.search : \"\"));\n } catch (t) {\n (this.Url = void 0),\n this.base && (r = new n.a(this.base).resolve(r));\n }\n (this.Path = new n.a(r)),\n (this.directory = this.Path.directory),\n (this.filename = this.Path.filename),\n (this.extension = this.Path.extension);\n }\n path() {\n return this.Path;\n }\n resolve(t) {\n var e;\n return t.indexOf(\"://\") > -1\n ? t\n : ((e = s.a.resolve(this.directory, t)), this.origin + e);\n }\n relative(t) {\n return s.a.relative(t, this.directory);\n }\n toString() {\n return this.href;\n }\n };\n },\n function (t, e, i) {\n \"use strict\";\n e.a = class {\n constructor(t) {\n (this.context = t || this), (this.hooks = []);\n }\n register() {\n for (var t = 0; t < arguments.length; ++t)\n if (\"function\" == typeof arguments[t])\n this.hooks.push(arguments[t]);\n else\n for (var e = 0; e < arguments[t].length; ++e)\n this.hooks.push(arguments[t][e]);\n }\n deregister(t) {\n let e;\n for (let i = 0; i < this.hooks.length; i++)\n if (((e = this.hooks[i]), e === t)) {\n this.hooks.splice(i, 1);\n break;\n }\n }\n trigger() {\n var t = arguments,\n e = this.context,\n i = [];\n return (\n this.hooks.forEach(function (n) {\n try {\n var r = n.apply(e, t);\n } catch (t) {\n }\n r && \"function\" == typeof r.then && i.push(r);\n }),\n Promise.all(i)\n );\n }\n list() {\n return this.hooks;\n }\n clear() {\n return (this.hooks = []);\n }\n };\n },\n function (t, e) {\n t.exports = function (t) {\n return \"function\" == typeof t;\n };\n },\n function (t, e, i) {\n \"use strict\";\n if (!n)\n var n = {\n cwd: function () {\n return \"/\";\n },\n };\n function r(t) {\n if (\"string\" != typeof t)\n throw new TypeError(\"Path must be a string. Received \" + t);\n }\n function s(t, e) {\n for (var i, n = \"\", r = -1, s = 0, o = 0; o <= t.length; ++o) {\n if (o < t.length) i = t.charCodeAt(o);\n else {\n if (47 === i) break;\n i = 47;\n }\n if (47 === i) {\n if (r === o - 1 || 1 === s);\n else if (r !== o - 1 && 2 === s) {\n if (\n n.length < 2 ||\n 46 !== n.charCodeAt(n.length - 1) ||\n 46 !== n.charCodeAt(n.length - 2)\n )\n if (n.length > 2) {\n for (\n var a = n.length - 1, h = a;\n h >= 0 && 47 !== n.charCodeAt(h);\n --h\n );\n if (h !== a) {\n (n = -1 === h ? \"\" : n.slice(0, h)), (r = o), (s = 0);\n continue;\n }\n } else if (2 === n.length || 1 === n.length) {\n (n = \"\"), (r = o), (s = 0);\n continue;\n }\n e && (n.length > 0 ? (n += \"/..\") : (n = \"..\"));\n } else\n n.length > 0\n ? (n += \"/\" + t.slice(r + 1, o))\n : (n = t.slice(r + 1, o));\n (r = o), (s = 0);\n } else 46 === i && -1 !== s ? ++s : (s = -1);\n }\n return n;\n }\n var o = {\n resolve: function () {\n for (\n var t, e = \"\", i = !1, o = arguments.length - 1;\n o >= -1 && !i;\n o--\n ) {\n var a;\n o >= 0\n ? (a = arguments[o])\n : (void 0 === t && (t = n.cwd()), (a = t)),\n r(a),\n 0 !== a.length &&\n ((e = a + \"/\" + e), (i = 47 === a.charCodeAt(0)));\n }\n return (\n (e = s(e, !i)),\n i ? (e.length > 0 ? \"/\" + e : \"/\") : e.length > 0 ? e : \".\"\n );\n },\n normalize: function (t) {\n if ((r(t), 0 === t.length)) return \".\";\n var e = 47 === t.charCodeAt(0),\n i = 47 === t.charCodeAt(t.length - 1);\n return (\n 0 !== (t = s(t, !e)).length || e || (t = \".\"),\n t.length > 0 && i && (t += \"/\"),\n e ? \"/\" + t : t\n );\n },\n isAbsolute: function (t) {\n return r(t), t.length > 0 && 47 === t.charCodeAt(0);\n },\n join: function () {\n if (0 === arguments.length) return \".\";\n for (var t, e = 0; e < arguments.length; ++e) {\n var i = arguments[e];\n r(i), i.length > 0 && (void 0 === t ? (t = i) : (t += \"/\" + i));\n }\n return void 0 === t ? \".\" : o.normalize(t);\n },\n relative: function (t, e) {\n if ((r(t), r(e), t === e)) return \"\";\n if ((t = o.resolve(t)) === (e = o.resolve(e))) return \"\";\n for (var i = 1; i < t.length && 47 === t.charCodeAt(i); ++i);\n for (\n var n = t.length, s = n - i, a = 1;\n a < e.length && 47 === e.charCodeAt(a);\n ++a\n );\n for (\n var h = e.length - a, l = s < h ? s : h, c = -1, u = 0;\n u <= l;\n ++u\n ) {\n if (u === l) {\n if (h > l) {\n if (47 === e.charCodeAt(a + u)) return e.slice(a + u + 1);\n if (0 === u) return e.slice(a + u);\n } else\n s > l &&\n (47 === t.charCodeAt(i + u) ? (c = u) : 0 === u && (c = 0));\n break;\n }\n var d = t.charCodeAt(i + u);\n if (d !== e.charCodeAt(a + u)) break;\n 47 === d && (c = u);\n }\n var f = \"\";\n for (u = i + c + 1; u <= n; ++u)\n (u !== n && 47 !== t.charCodeAt(u)) ||\n (0 === f.length ? (f += \"..\") : (f += \"/..\"));\n return f.length > 0\n ? f + e.slice(a + c)\n : ((a += c), 47 === e.charCodeAt(a) && ++a, e.slice(a));\n },\n _makeLong: function (t) {\n return t;\n },\n dirname: function (t) {\n if ((r(t), 0 === t.length)) return \".\";\n for (\n var e = t.charCodeAt(0),\n i = 47 === e,\n n = -1,\n s = !0,\n o = t.length - 1;\n o >= 1;\n --o\n )\n if (47 === (e = t.charCodeAt(o))) {\n if (!s) {\n n = o;\n break;\n }\n } else s = !1;\n return -1 === n\n ? i\n ? \"/\"\n : \".\"\n : i && 1 === n\n ? \"//\"\n : t.slice(0, n);\n },\n basename: function (t, e) {\n if (void 0 !== e && \"string\" != typeof e)\n throw new TypeError('\"ext\" argument must be a string');\n r(t);\n var i,\n n = 0,\n s = -1,\n o = !0;\n if (void 0 !== e && e.length > 0 && e.length <= t.length) {\n if (e.length === t.length && e === t) return \"\";\n var a = e.length - 1,\n h = -1;\n for (i = t.length - 1; i >= 0; --i) {\n var l = t.charCodeAt(i);\n if (47 === l) {\n if (!o) {\n n = i + 1;\n break;\n }\n } else\n -1 === h && ((o = !1), (h = i + 1)),\n a >= 0 &&\n (l === e.charCodeAt(a)\n ? -1 == --a && (s = i)\n : ((a = -1), (s = h)));\n }\n return (\n n === s ? (s = h) : -1 === s && (s = t.length), t.slice(n, s)\n );\n }\n for (i = t.length - 1; i >= 0; --i)\n if (47 === t.charCodeAt(i)) {\n if (!o) {\n n = i + 1;\n break;\n }\n } else -1 === s && ((o = !1), (s = i + 1));\n return -1 === s ? \"\" : t.slice(n, s);\n },\n extname: function (t) {\n r(t);\n for (\n var e = -1, i = 0, n = -1, s = !0, o = 0, a = t.length - 1;\n a >= 0;\n --a\n ) {\n var h = t.charCodeAt(a);\n if (47 !== h)\n -1 === n && ((s = !1), (n = a + 1)),\n 46 === h\n ? -1 === e\n ? (e = a)\n : 1 !== o && (o = 1)\n : -1 !== e && (o = -1);\n else if (!s) {\n i = a + 1;\n break;\n }\n }\n return -1 === e ||\n -1 === n ||\n 0 === o ||\n (1 === o && e === n - 1 && e === i + 1)\n ? \"\"\n : t.slice(e, n);\n },\n format: function (t) {\n if (null === t || \"object\" != typeof t)\n throw new TypeError(\n 'Parameter \"pathObject\" must be an object, not ' + typeof t,\n );\n return (function (t, e) {\n var i = e.dir || e.root,\n n = e.base || (e.name || \"\") + (e.ext || \"\");\n return i ? (i === e.root ? i + n : i + t + n) : n;\n })(\"/\", t);\n },\n parse: function (t) {\n r(t);\n var e = { root: \"\", dir: \"\", base: \"\", ext: \"\", name: \"\" };\n if (0 === t.length) return e;\n var i,\n n = t.charCodeAt(0),\n s = 47 === n;\n s ? ((e.root = \"/\"), (i = 1)) : (i = 0);\n for (\n var o = -1, a = 0, h = -1, l = !0, c = t.length - 1, u = 0;\n c >= i;\n --c\n )\n if (47 !== (n = t.charCodeAt(c)))\n -1 === h && ((l = !1), (h = c + 1)),\n 46 === n\n ? -1 === o\n ? (o = c)\n : 1 !== u && (u = 1)\n : -1 !== o && (u = -1);\n else if (!l) {\n a = c + 1;\n break;\n }\n return (\n -1 === o ||\n -1 === h ||\n 0 === u ||\n (1 === u && o === h - 1 && o === a + 1)\n ? -1 !== h &&\n (e.base = e.name = 0 === a && s ? t.slice(1, h) : t.slice(a, h))\n : (0 === a && s\n ? ((e.name = t.slice(1, o)), (e.base = t.slice(1, h)))\n : ((e.name = t.slice(a, o)), (e.base = t.slice(a, h))),\n (e.ext = t.slice(o, h))),\n a > 0 ? (e.dir = t.slice(0, a - 1)) : s && (e.dir = \"/\"),\n e\n );\n },\n sep: \"/\",\n delimiter: \":\",\n posix: null,\n };\n t.exports = o;\n },\n function (t, e, i) {\n (function (e) {\n var i = function (t) {\n return t && t.Math == Math && t;\n };\n t.exports =\n i(\"object\" == typeof globalThis && globalThis) ||\n i(\"object\" == typeof window && window) ||\n i(\"object\" == typeof self && self) ||\n i(\"object\" == typeof e && e) ||\n (function () {\n return this;\n })() ||\n Function(\"return this\")();\n }).call(this, i(25));\n },\n function (t, e, i) {\n \"use strict\";\n i.d(e, \"a\", function () {\n return s;\n }),\n i.d(e, \"b\", function () {\n return o;\n }),\n i.d(e, \"d\", function () {\n return a;\n }),\n i.d(e, \"c\", function () {\n return h;\n }),\n i.d(e, \"e\", function () {\n return l;\n });\n var n = i(0),\n r = i(5);\n i(4);\n function s(t, e) {\n var i,\n r,\n s = e.url,\n o = s.indexOf(\"://\") > -1;\n t &&\n ((r = Object(n.qs)(t, \"head\")),\n (i = Object(n.qs)(r, \"base\")) ||\n ((i = t.createElement(\"base\")), r.insertBefore(i, r.firstChild)),\n !o && window && window.location && (s = window.location.origin + s),\n i.setAttribute(\"href\", s));\n }\n function o(t, e) {\n var i,\n r,\n s = e.canonical;\n t &&\n ((i = Object(n.qs)(t, \"head\")),\n (r = Object(n.qs)(i, \"link[rel='canonical']\"))\n ? r.setAttribute(\"href\", s)\n : ((r = t.createElement(\"link\")).setAttribute(\"rel\", \"canonical\"),\n r.setAttribute(\"href\", s),\n i.appendChild(r)));\n }\n function a(t, e) {\n var i,\n r,\n s = e.idref;\n t &&\n ((i = Object(n.qs)(t, \"head\")),\n (r = Object(n.qs)(i, \"link[property='dc.identifier']\"))\n ? r.setAttribute(\"content\", s)\n : ((r = t.createElement(\"meta\")).setAttribute(\n \"name\",\n \"dc.identifier\",\n ),\n r.setAttribute(\"content\", s),\n i.appendChild(r)));\n }\n function h(t, e) {\n var i = t.querySelectorAll(\"a[href]\");\n if (i.length)\n for (\n var s = Object(n.qs)(t.ownerDocument, \"base\"),\n o = s ? s.getAttribute(\"href\") : void 0,\n a = function (t) {\n var i = t.getAttribute(\"href\");\n if (0 !== i.indexOf(\"mailto:\"))\n if (i.indexOf(\"://\") > -1) t.setAttribute(\"target\", \"_blank\");\n else {\n var n;\n try {\n n = new r.a(i, o);\n } catch (t) {}\n t.onclick = function () {\n return (\n n && n.hash\n ? e(n.Path.path + n.hash)\n : e(n ? n.Path.path : i),\n !1\n );\n };\n }\n }.bind(this),\n h = 0;\n h < i.length;\n h++\n )\n a(i[h]);\n }\n function l(t, e, i) {\n return (\n e.forEach(function (e, n) {\n e &&\n i[n] &&\n ((e = e.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, \"\\\\$&\")),\n (t = t.replace(new RegExp(e, \"g\"), i[n])));\n }),\n t\n );\n }\n },\n function (t, e) {\n t.exports = function (t) {\n try {\n return !!t();\n } catch (t) {\n return !0;\n }\n };\n },\n function (t, e, i) {\n var n = i(36),\n r = {}.hasOwnProperty;\n t.exports =\n Object.hasOwn ||\n function (t, e) {\n return r.call(n(t), e);\n };\n },\n function (t, e, i) {\n var n = i(11);\n t.exports = !n(function () {\n return (\n 7 !=\n Object.defineProperty({}, 1, {\n get: function () {\n return 7;\n },\n })[1]\n );\n });\n },\n function (t, e, i) {\n var n = i(9),\n r = i(59),\n s = i(12),\n o = i(60),\n a = i(58),\n h = i(57),\n l = r(\"wks\"),\n c = n.Symbol,\n u = h ? c : (c && c.withoutSetter) || o;\n t.exports = function (t) {\n return (\n (s(l, t) && (a || \"string\" == typeof l[t])) ||\n (a && s(c, t) ? (l[t] = c[t]) : (l[t] = u(\"Symbol.\" + t))),\n l[t]\n );\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(0);\n e.a = class {\n constructor(t) {\n (this._q = []),\n (this.context = t),\n (this.tick = n.requestAnimationFrame),\n (this.running = !1),\n (this.paused = !1);\n }\n enqueue() {\n var t,\n e,\n i = [].shift.call(arguments),\n r = arguments;\n if (!i) throw new Error(\"No Task Provided\");\n return (\n (e =\n \"function\" == typeof i\n ? {\n task: i,\n args: r,\n deferred: (t = new n.defer()),\n promise: t.promise,\n }\n : { promise: i }),\n this._q.push(e),\n 0 != this.paused || this.running || this.run(),\n e.promise\n );\n }\n dequeue() {\n var t, e, i;\n return !this._q.length || this.paused\n ? ((t = new n.defer()).deferred.resolve(), t.promise)\n : (e = (t = this._q.shift()).task)\n ? (i = e.apply(this.context, t.args)) &&\n \"function\" == typeof i.then\n ? i.then(\n function () {\n t.deferred.resolve.apply(this.context, arguments);\n }.bind(this),\n function () {\n t.deferred.reject.apply(this.context, arguments);\n }.bind(this),\n )\n : (t.deferred.resolve.apply(this.context, i), t.promise)\n : t.promise\n ? t.promise\n : void 0;\n }\n dump() {\n for (; this._q.length; ) this.dequeue();\n }\n run() {\n return (\n this.running ||\n ((this.running = !0), (this.defered = new n.defer())),\n this.tick.call(window, () => {\n this._q.length\n ? this.dequeue().then(\n function () {\n this.run();\n }.bind(this),\n )\n : (this.defered.resolve(), (this.running = void 0));\n }),\n 1 == this.paused && (this.paused = !1),\n this.defered.promise\n );\n }\n flush() {\n return this.running\n ? this.running\n : this._q.length\n ? ((this.running = this.dequeue().then(\n function () {\n return (this.running = void 0), this.flush();\n }.bind(this),\n )),\n this.running)\n : void 0;\n }\n clear() {\n this._q = [];\n }\n length() {\n return this._q.length;\n }\n pause() {\n this.paused = !0;\n }\n stop() {\n (this._q = []), (this.running = !1), (this.paused = !0);\n }\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(3),\n r = i.n(n),\n s = i(0);\n function o() {\n var t = \"reverse\",\n e = (function () {\n var t = document.createElement(\"div\");\n (t.dir = \"rtl\"),\n (t.style.position = \"fixed\"),\n (t.style.width = \"1px\"),\n (t.style.height = \"1px\"),\n (t.style.top = \"0px\"),\n (t.style.left = \"0px\"),\n (t.style.overflow = \"hidden\");\n var e = document.createElement(\"div\");\n e.style.width = \"2px\";\n var i = document.createElement(\"span\");\n (i.style.width = \"1px\"), (i.style.display = \"inline-block\");\n var n = document.createElement(\"span\");\n return (\n (n.style.width = \"1px\"),\n (n.style.display = \"inline-block\"),\n e.appendChild(i),\n e.appendChild(n),\n t.appendChild(e),\n t\n );\n })();\n return (\n document.body.appendChild(e),\n e.scrollLeft > 0\n ? (t = \"default\")\n : \"undefined\" != typeof Element && Element.prototype.scrollIntoView\n ? (e.children[0].children[1].scrollIntoView(),\n e.scrollLeft < 0 && (t = \"negative\"))\n : ((e.scrollLeft = 1), 0 === e.scrollLeft && (t = \"negative\")),\n document.body.removeChild(e),\n t\n );\n }\n var a = i(17),\n h = i(15),\n l = i(75),\n c = i.n(l);\n var u = class {\n constructor(t) {\n (this.settings = t || {}),\n (this.id = \"epubjs-container-\" + Object(s.uuid)()),\n (this.container = this.create(this.settings)),\n this.settings.hidden && (this.wrapper = this.wrap(this.container));\n }\n create(t) {\n let e = t.height,\n i = t.width,\n n = t.overflow || !1,\n r = t.axis || \"vertical\",\n o = t.direction;\n Object(s.extend)(this.settings, t),\n t.height && Object(s.isNumber)(t.height) && (e = t.height + \"px\"),\n t.width && Object(s.isNumber)(t.width) && (i = t.width + \"px\");\n let a = document.createElement(\"div\");\n return (\n (a.id = this.id),\n a.classList.add(\"epub-container\"),\n (a.style.wordSpacing = \"0\"),\n (a.style.lineHeight = \"0\"),\n (a.style.verticalAlign = \"top\"),\n (a.style.position = \"relative\"),\n \"horizontal\" === r &&\n ((a.style.display = \"flex\"),\n (a.style.flexDirection = \"row\"),\n (a.style.flexWrap = \"nowrap\")),\n i && (a.style.width = i),\n e && (a.style.height = e),\n n &&\n (\"scroll\" === n && \"vertical\" === r\n ? ((a.style[\"overflow-y\"] = n),\n (a.style[\"overflow-x\"] = \"hidden\"))\n : \"scroll\" === n && \"horizontal\" === r\n ? ((a.style[\"overflow-y\"] = \"hidden\"),\n (a.style[\"overflow-x\"] = n))\n : (a.style.overflow = n)),\n o && ((a.dir = o), (a.style.direction = o)),\n o && this.settings.fullsize && (document.body.style.direction = o),\n a\n );\n }\n wrap(t) {\n var e = document.createElement(\"div\");\n return (\n (e.style.visibility = \"hidden\"),\n (e.style.overflow = \"hidden\"),\n (e.style.width = \"0\"),\n (e.style.height = \"0\"),\n e.appendChild(t),\n e\n );\n }\n getElement(t) {\n var e;\n if (\n (Object(s.isElement)(t)\n ? (e = t)\n : \"string\" == typeof t && (e = document.getElementById(t)),\n !e)\n )\n throw new Error(\"Not an Element\");\n return e;\n }\n attachTo(t) {\n var e,\n i = this.getElement(t);\n if (i)\n return (\n (e = this.settings.hidden ? this.wrapper : this.container),\n i.appendChild(e),\n (this.element = i),\n i\n );\n }\n getContainer() {\n return this.container;\n }\n onResize(t) {\n (Object(s.isNumber)(this.settings.width) &&\n Object(s.isNumber)(this.settings.height)) ||\n ((this.resizeFunc = c()(t, 50)),\n window.addEventListener(\"resize\", this.resizeFunc, !1));\n }\n onOrientationChange(t) {\n (this.orientationChangeFunc = t),\n window.addEventListener(\n \"orientationchange\",\n this.orientationChangeFunc,\n !1,\n );\n }\n size(t, e) {\n var i;\n let n = t || this.settings.width,\n r = e || this.settings.height;\n null === t\n ? (i = this.element.getBoundingClientRect()).width &&\n ((t = Math.floor(i.width)),\n (this.container.style.width = t + \"px\"))\n : Object(s.isNumber)(t)\n ? (this.container.style.width = t + \"px\")\n : (this.container.style.width = t),\n null === e\n ? (i = i || this.element.getBoundingClientRect()).height &&\n ((e = i.height), (this.container.style.height = e + \"px\"))\n : Object(s.isNumber)(e)\n ? (this.container.style.height = e + \"px\")\n : (this.container.style.height = e),\n Object(s.isNumber)(t) || (t = this.container.clientWidth),\n Object(s.isNumber)(e) || (e = this.container.clientHeight),\n (this.containerStyles = window.getComputedStyle(this.container)),\n (this.containerPadding = {\n left: parseFloat(this.containerStyles[\"padding-left\"]) || 0,\n right: parseFloat(this.containerStyles[\"padding-right\"]) || 0,\n top: parseFloat(this.containerStyles[\"padding-top\"]) || 0,\n bottom: parseFloat(this.containerStyles[\"padding-bottom\"]) || 0,\n });\n let o = Object(s.windowBounds)(),\n a = window.getComputedStyle(document.body),\n h = parseFloat(a[\"padding-left\"]) || 0,\n l = parseFloat(a[\"padding-right\"]) || 0,\n c = parseFloat(a[\"padding-top\"]) || 0,\n u = parseFloat(a[\"padding-bottom\"]) || 0;\n return (\n n || (t = o.width - h - l),\n ((this.settings.fullsize && !r) || !r) && (e = o.height - c - u),\n {\n width:\n t - this.containerPadding.left - this.containerPadding.right,\n height:\n e - this.containerPadding.top - this.containerPadding.bottom,\n }\n );\n }\n bounds() {\n let t;\n return (\n \"visible\" !== this.container.style.overflow &&\n (t = this.container && this.container.getBoundingClientRect()),\n t && t.width && t.height ? t : Object(s.windowBounds)()\n );\n }\n getSheet() {\n var t = document.createElement(\"style\");\n return (\n t.appendChild(document.createTextNode(\"\")),\n document.head.appendChild(t),\n t.sheet\n );\n }\n addStyleRules(t, e) {\n var i = \"#\" + this.id + \" \",\n n = \"\";\n this.sheet || (this.sheet = this.getSheet()),\n e.forEach(function (t) {\n for (var e in t)\n t.hasOwnProperty(e) && (n += e + \":\" + t[e] + \";\");\n }),\n this.sheet.insertRule(i + t + \" {\" + n + \"}\", 0);\n }\n axis(t) {\n \"horizontal\" === t\n ? ((this.container.style.display = \"flex\"),\n (this.container.style.flexDirection = \"row\"),\n (this.container.style.flexWrap = \"nowrap\"))\n : (this.container.style.display = \"block\"),\n (this.settings.axis = t);\n }\n direction(t) {\n this.container &&\n ((this.container.dir = t), (this.container.style.direction = t)),\n this.settings.fullsize && (document.body.style.direction = t),\n (this.settings.dir = t);\n }\n overflow(t) {\n this.container &&\n (\"scroll\" === t && \"vertical\" === this.settings.axis\n ? ((this.container.style[\"overflow-y\"] = t),\n (this.container.style[\"overflow-x\"] = \"hidden\"))\n : \"scroll\" === t && \"horizontal\" === this.settings.axis\n ? ((this.container.style[\"overflow-y\"] = \"hidden\"),\n (this.container.style[\"overflow-x\"] = t))\n : (this.container.style.overflow = t)),\n (this.settings.overflow = t);\n }\n destroy() {\n this.element &&\n (this.settings.hidden ? this.wrapper : this.container,\n this.element.contains(this.container) &&\n this.element.removeChild(this.container),\n window.removeEventListener(\"resize\", this.resizeFunc),\n window.removeEventListener(\n \"orientationChange\",\n this.orientationChangeFunc,\n ));\n }\n };\n var d = class {\n constructor(t) {\n (this.container = t),\n (this._views = []),\n (this.length = 0),\n (this.hidden = !1);\n }\n all() {\n return this._views;\n }\n first() {\n return this._views[0];\n }\n last() {\n return this._views[this._views.length - 1];\n }\n indexOf(t) {\n return this._views.indexOf(t);\n }\n slice() {\n return this._views.slice.apply(this._views, arguments);\n }\n get(t) {\n return this._views[t];\n }\n append(t) {\n return (\n this._views.push(t),\n this.container && this.container.appendChild(t.element),\n this.length++,\n t\n );\n }\n prepend(t) {\n return (\n this._views.unshift(t),\n this.container &&\n this.container.insertBefore(\n t.element,\n this.container.firstChild,\n ),\n this.length++,\n t\n );\n }\n insert(t, e) {\n return (\n this._views.splice(e, 0, t),\n this.container &&\n (e < this.container.children.length\n ? this.container.insertBefore(\n t.element,\n this.container.children[e],\n )\n : this.container.appendChild(t.element)),\n this.length++,\n t\n );\n }\n remove(t) {\n var e = this._views.indexOf(t);\n e > -1 && this._views.splice(e, 1), this.destroy(t), this.length--;\n }\n destroy(t) {\n t.displayed && t.destroy(),\n this.container && this.container.removeChild(t.element),\n (t = null);\n }\n forEach() {\n return this._views.forEach.apply(this._views, arguments);\n }\n clear() {\n var t,\n e = this.length;\n if (this.length) {\n for (var i = 0; i < e; i++) (t = this._views[i]), this.destroy(t);\n (this._views = []), (this.length = 0);\n }\n }\n find(t) {\n for (var e, i = this.length, n = 0; n < i; n++)\n if ((e = this._views[n]).displayed && e.section.index == t.index)\n return e;\n }\n displayed() {\n for (var t, e = [], i = this.length, n = 0; n < i; n++)\n (t = this._views[n]).displayed && e.push(t);\n return e;\n }\n show() {\n for (var t, e = this.length, i = 0; i < e; i++)\n (t = this._views[i]).displayed && t.show();\n this.hidden = !1;\n }\n hide() {\n for (var t, e = this.length, i = 0; i < e; i++)\n (t = this._views[i]).displayed && t.hide();\n this.hidden = !0;\n }\n },\n f = i(1);\n class p {\n constructor(t) {\n (this.name = \"default\"),\n (this.optsSettings = t.settings),\n (this.View = t.view),\n (this.request = t.request),\n (this.renditionQueue = t.queue),\n (this.q = new h.a(this)),\n (this.settings = Object(s.extend)(this.settings || {}, {\n infinite: !0,\n hidden: !1,\n width: void 0,\n height: void 0,\n axis: void 0,\n writingMode: void 0,\n flow: \"scrolled\",\n ignoreClass: \"\",\n fullsize: void 0,\n allowScriptedContent: !1,\n allowPopups: !1,\n })),\n Object(s.extend)(this.settings, t.settings || {}),\n (this.viewSettings = {\n ignoreClass: this.settings.ignoreClass,\n axis: this.settings.axis,\n flow: this.settings.flow,\n layout: this.layout,\n method: this.settings.method,\n width: 0,\n height: 0,\n forceEvenPages: !0,\n allowScriptedContent: this.settings.allowScriptedContent,\n allowPopups: this.settings.allowPopups,\n }),\n (this.rendered = !1);\n }\n render(t, e) {\n let i = t.tagName;\n void 0 !== this.settings.fullsize ||\n !i ||\n (\"body\" != i.toLowerCase() && \"html\" != i.toLowerCase()) ||\n (this.settings.fullsize = !0),\n this.settings.fullsize &&\n ((this.settings.overflow = \"visible\"),\n (this.overflow = this.settings.overflow)),\n (this.settings.size = e),\n (this.settings.rtlScrollType = o()),\n (this.stage = new u({\n width: e.width,\n height: e.height,\n overflow: this.overflow,\n hidden: this.settings.hidden,\n axis: this.settings.axis,\n fullsize: this.settings.fullsize,\n direction: this.settings.direction,\n })),\n this.stage.attachTo(t),\n (this.container = this.stage.getContainer()),\n (this.views = new d(this.container)),\n (this._bounds = this.bounds()),\n (this._stageSize = this.stage.size()),\n (this.viewSettings.width = this._stageSize.width),\n (this.viewSettings.height = this._stageSize.height),\n this.stage.onResize(this.onResized.bind(this)),\n this.stage.onOrientationChange(this.onOrientationChange.bind(this)),\n this.addEventListeners(),\n this.layout && this.updateLayout(),\n (this.rendered = !0);\n }\n addEventListeners() {\n var t;\n window.addEventListener(\n \"unload\",\n function (t) {\n this.destroy();\n }.bind(this),\n ),\n (t = this.settings.fullsize ? window : this.container),\n (this._onScroll = this.onScroll.bind(this)),\n t.addEventListener(\"scroll\", this._onScroll);\n }\n removeEventListeners() {\n (this.settings.fullsize\n ? window\n : this.container\n ).removeEventListener(\"scroll\", this._onScroll),\n (this._onScroll = void 0);\n }\n destroy() {\n clearTimeout(this.orientationTimeout),\n clearTimeout(this.resizeTimeout),\n clearTimeout(this.afterScrolled),\n this.clear(),\n this.removeEventListeners(),\n this.stage.destroy(),\n (this.rendered = !1);\n }\n onOrientationChange(t) {\n let { orientation: e } = window;\n this.optsSettings.resizeOnOrientationChange && this.resize(),\n clearTimeout(this.orientationTimeout),\n (this.orientationTimeout = setTimeout(\n function () {\n (this.orientationTimeout = void 0),\n this.optsSettings.resizeOnOrientationChange && this.resize(),\n this.emit(f.c.MANAGERS.ORIENTATION_CHANGE, e);\n }.bind(this),\n 500,\n ));\n }\n onResized(t) {\n this.resize();\n }\n resize(t, e, i) {\n let n = this.stage.size(t, e);\n (this.winBounds = Object(s.windowBounds)()),\n this.orientationTimeout &&\n this.winBounds.width === this.winBounds.height\n ? (this._stageSize = void 0)\n : (this._stageSize &&\n this._stageSize.width === n.width &&\n this._stageSize.height === n.height) ||\n ((this._stageSize = n),\n (this._bounds = this.bounds()),\n this.clear(),\n (this.viewSettings.width = this._stageSize.width),\n (this.viewSettings.height = this._stageSize.height),\n this.updateLayout(),\n this.emit(\n f.c.MANAGERS.RESIZED,\n {\n width: this._stageSize.width,\n height: this._stageSize.height,\n },\n i,\n ));\n }\n createView(t, e) {\n return new this.View(\n t,\n Object(s.extend)(this.viewSettings, { forceRight: e }),\n );\n }\n handleNextPrePaginated(t, e, i) {\n let n;\n if (\"pre-paginated\" === this.layout.name && this.layout.divisor > 1) {\n if (t || 0 === e.index) return;\n if (\n ((n = e.next()), n && !n.properties.includes(\"page-spread-left\"))\n )\n return i.call(this, n);\n }\n }\n display(t, e) {\n var i = new s.defer(),\n n = i.promise;\n (e === t.href || Object(s.isNumber)(e)) && (e = void 0);\n var r = this.views.find(t);\n if (r && t && \"pre-paginated\" !== this.layout.name) {\n let t = r.offset();\n if (\"ltr\" === this.settings.direction)\n this.scrollTo(t.left, t.top, !0);\n else {\n let e = r.width();\n this.scrollTo(t.left + e, t.top, !0);\n }\n if (e) {\n let t = r.locationOf(e),\n i = r.width();\n this.moveTo(t, i);\n }\n return i.resolve(), n;\n }\n this.clear();\n let o = !1;\n return (\n \"pre-paginated\" === this.layout.name &&\n 2 === this.layout.divisor &&\n t.properties.includes(\"page-spread-right\") &&\n (o = !0),\n this.add(t, o)\n .then(\n function (t) {\n if (e) {\n let i = t.locationOf(e),\n n = t.width();\n this.moveTo(i, n);\n }\n }.bind(this),\n (t) => {\n i.reject(t);\n },\n )\n .then(\n function () {\n return this.handleNextPrePaginated(o, t, this.add);\n }.bind(this),\n )\n .then(\n function () {\n this.views.show(), i.resolve();\n }.bind(this),\n ),\n n\n );\n }\n afterDisplayed(t) {\n this.emit(f.c.MANAGERS.ADDED, t);\n }\n afterResized(t) {\n this.emit(f.c.MANAGERS.RESIZE, t.section);\n }\n moveTo(t, e) {\n var i = 0,\n n = 0;\n this.isPaginated\n ? ((i =\n Math.floor(t.left / this.layout.delta) * this.layout.delta) +\n this.layout.delta >\n this.container.scrollWidth &&\n (i = this.container.scrollWidth - this.layout.delta),\n (n = Math.floor(t.top / this.layout.delta) * this.layout.delta) +\n this.layout.delta >\n this.container.scrollHeight &&\n (n = this.container.scrollHeight - this.layout.delta))\n : (n = t.top),\n \"rtl\" === this.settings.direction &&\n ((i += this.layout.delta), (i -= e)),\n this.scrollTo(i, n, !0);\n }\n add(t, e) {\n var i = this.createView(t, e);\n return (\n this.views.append(i),\n (i.onDisplayed = this.afterDisplayed.bind(this)),\n (i.onResize = this.afterResized.bind(this)),\n i.on(f.c.VIEWS.AXIS, (t) => {\n this.updateAxis(t);\n }),\n i.on(f.c.VIEWS.WRITING_MODE, (t) => {\n this.updateWritingMode(t);\n }),\n i.display(this.request)\n );\n }\n append(t, e) {\n var i = this.createView(t, e);\n return (\n this.views.append(i),\n (i.onDisplayed = this.afterDisplayed.bind(this)),\n (i.onResize = this.afterResized.bind(this)),\n i.on(f.c.VIEWS.AXIS, (t) => {\n this.updateAxis(t);\n }),\n i.on(f.c.VIEWS.WRITING_MODE, (t) => {\n this.updateWritingMode(t);\n }),\n i.display(this.request)\n );\n }\n prepend(t, e) {\n var i = this.createView(t, e);\n return (\n i.on(f.c.VIEWS.RESIZED, (t) => {\n this.counter(t);\n }),\n this.views.prepend(i),\n (i.onDisplayed = this.afterDisplayed.bind(this)),\n (i.onResize = this.afterResized.bind(this)),\n i.on(f.c.VIEWS.AXIS, (t) => {\n this.updateAxis(t);\n }),\n i.on(f.c.VIEWS.WRITING_MODE, (t) => {\n this.updateWritingMode(t);\n }),\n i.display(this.request)\n );\n }\n counter(t) {\n \"vertical\" === this.settings.axis\n ? this.scrollBy(0, t.heightDelta, !0)\n : this.scrollBy(t.widthDelta, 0, !0);\n }\n next() {\n var t;\n let e = this.settings.direction;\n if (this.views.length) {\n if (\n !this.isPaginated ||\n \"horizontal\" !== this.settings.axis ||\n (e && \"ltr\" !== e)\n )\n if (\n this.isPaginated &&\n \"horizontal\" === this.settings.axis &&\n \"rtl\" === e\n )\n (this.scrollLeft = this.container.scrollLeft),\n \"default\" === this.settings.rtlScrollType\n ? this.container.scrollLeft > 0\n ? this.scrollBy(this.layout.delta, 0, !0)\n : (t = this.views.last().section.next())\n : this.container.scrollLeft + -1 * this.layout.delta >\n -1 * this.container.scrollWidth\n ? this.scrollBy(this.layout.delta, 0, !0)\n : (t = this.views.last().section.next());\n else if (this.isPaginated && \"vertical\" === this.settings.axis) {\n (this.scrollTop = this.container.scrollTop),\n this.container.scrollTop + this.container.offsetHeight <\n this.container.scrollHeight\n ? this.scrollBy(0, this.layout.height, !0)\n : (t = this.views.last().section.next());\n } else t = this.views.last().section.next();\n else\n (this.scrollLeft = this.container.scrollLeft),\n this.container.scrollLeft +\n this.container.offsetWidth +\n this.layout.delta <=\n this.container.scrollWidth\n ? this.scrollBy(this.layout.delta, 0, !0)\n : (t = this.views.last().section.next());\n if (t) {\n this.clear(), this.updateLayout();\n let e = !1;\n return (\n \"pre-paginated\" === this.layout.name &&\n 2 === this.layout.divisor &&\n t.properties.includes(\"page-spread-right\") &&\n (e = !0),\n this.append(t, e)\n .then(\n function () {\n return this.handleNextPrePaginated(e, t, this.append);\n }.bind(this),\n (t) => t,\n )\n .then(\n function () {\n this.isPaginated ||\n \"horizontal\" !== this.settings.axis ||\n \"rtl\" !== this.settings.direction ||\n \"default\" !== this.settings.rtlScrollType ||\n this.scrollTo(this.container.scrollWidth, 0, !0),\n this.views.show();\n }.bind(this),\n )\n );\n }\n }\n }\n prev() {\n var t;\n let e = this.settings.direction;\n if (this.views.length) {\n if (\n !this.isPaginated ||\n \"horizontal\" !== this.settings.axis ||\n (e && \"ltr\" !== e)\n )\n if (\n this.isPaginated &&\n \"horizontal\" === this.settings.axis &&\n \"rtl\" === e\n )\n (this.scrollLeft = this.container.scrollLeft),\n \"default\" === this.settings.rtlScrollType\n ? this.container.scrollLeft + this.container.offsetWidth <\n this.container.scrollWidth\n ? this.scrollBy(-this.layout.delta, 0, !0)\n : (t = this.views.first().section.prev())\n : this.container.scrollLeft < 0\n ? this.scrollBy(-this.layout.delta, 0, !0)\n : (t = this.views.first().section.prev());\n else if (this.isPaginated && \"vertical\" === this.settings.axis) {\n (this.scrollTop = this.container.scrollTop),\n this.container.scrollTop > 0\n ? this.scrollBy(0, -this.layout.height, !0)\n : (t = this.views.first().section.prev());\n } else t = this.views.first().section.prev();\n else\n (this.scrollLeft = this.container.scrollLeft),\n this.container.scrollLeft > 0\n ? this.scrollBy(-this.layout.delta, 0, !0)\n : (t = this.views.first().section.prev());\n if (t) {\n this.clear(), this.updateLayout();\n let e = !1;\n return (\n \"pre-paginated\" === this.layout.name &&\n 2 === this.layout.divisor &&\n \"object\" != typeof t.prev() &&\n (e = !0),\n this.prepend(t, e)\n .then(\n function () {\n var e;\n if (\n \"pre-paginated\" === this.layout.name &&\n this.layout.divisor > 1 &&\n (e = t.prev())\n )\n return this.prepend(e);\n }.bind(this),\n (t) => t,\n )\n .then(\n function () {\n this.isPaginated &&\n \"horizontal\" === this.settings.axis &&\n (\"rtl\" === this.settings.direction\n ? \"default\" === this.settings.rtlScrollType\n ? this.scrollTo(0, 0, !0)\n : this.scrollTo(\n -1 * this.container.scrollWidth +\n this.layout.delta,\n 0,\n !0,\n )\n : this.scrollTo(\n this.container.scrollWidth - this.layout.delta,\n 0,\n !0,\n )),\n this.views.show();\n }.bind(this),\n )\n );\n }\n }\n }\n current() {\n var t = this.visible();\n return t.length ? t[t.length - 1] : null;\n }\n clear() {\n this.views &&\n (this.views.hide(), this.scrollTo(0, 0, !0), this.views.clear());\n }\n currentLocation() {\n return (\n this.updateLayout(),\n this.isPaginated && \"horizontal\" === this.settings.axis\n ? (this.location = this.paginatedLocation())\n : (this.location = this.scrolledLocation()),\n this.location\n );\n }\n scrolledLocation() {\n let t = this.visible(),\n e = this.container.getBoundingClientRect(),\n i = e.height < window.innerHeight ? e.height : window.innerHeight,\n n = e.width < window.innerWidth ? e.width : window.innerWidth,\n r = \"vertical\" === this.settings.axis,\n s = (this.settings.direction, 0);\n return (\n this.settings.fullsize && (s = r ? window.scrollY : window.scrollX),\n t.map((t) => {\n let o,\n a,\n h,\n l,\n { index: c, href: u } = t.section,\n d = t.position(),\n f = t.width(),\n p = t.height();\n r\n ? ((o = s + e.top - d.top + 0),\n (a = o + i - 0),\n (l = this.layout.count(p, i).pages),\n (h = i))\n : ((o = s + e.left - d.left + 0),\n (a = o + n - 0),\n (l = this.layout.count(f, n).pages),\n (h = n));\n let g = Math.ceil(o / h),\n m = [],\n v = Math.ceil(a / h);\n if (\"rtl\" === this.settings.direction && !r) {\n let t = g;\n (g = l - v), (v = l - t);\n }\n m = [];\n for (var y = g; y <= v; y++) {\n let t = y + 1;\n m.push(t);\n }\n return {\n index: c,\n href: u,\n pages: m,\n totalPages: l,\n mapping: this.mapping.page(t.contents, t.section.cfiBase, o, a),\n };\n })\n );\n }\n paginatedLocation() {\n let t = this.visible(),\n e = this.container.getBoundingClientRect(),\n i = 0,\n n = 0;\n return (\n this.settings.fullsize && (i = window.scrollX),\n t.map((t) => {\n let r,\n s,\n o,\n a,\n { index: h, href: l } = t.section,\n c = t.position(),\n u = t.width();\n \"rtl\" === this.settings.direction\n ? ((r = e.right - i),\n (a = Math.min(Math.abs(r - c.left), this.layout.width) - n),\n (o = c.width - (c.right - r) - n),\n (s = o - a))\n : ((r = e.left + i),\n (a = Math.min(c.right - r, this.layout.width) - n),\n (s = r - c.left + n),\n (o = s + a)),\n (n += a);\n let d = this.mapping.page(t.contents, t.section.cfiBase, s, o),\n f = this.layout.count(u).pages,\n p = Math.floor(s / this.layout.pageWidth),\n g = [],\n m = Math.floor(o / this.layout.pageWidth);\n if (\n (p < 0 && ((p = 0), (m += 1)),\n \"rtl\" === this.settings.direction)\n ) {\n let t = p;\n (p = f - m), (m = f - t);\n }\n for (var v = p + 1; v <= m; v++) {\n let t = v;\n g.push(t);\n }\n return { index: h, href: l, pages: g, totalPages: f, mapping: d };\n })\n );\n }\n isVisible(t, e, i, n) {\n var r = t.position(),\n s = n || this.bounds();\n return (\n (\"horizontal\" === this.settings.axis &&\n r.right > s.left - e &&\n r.left < s.right + i) ||\n (\"vertical\" === this.settings.axis &&\n r.bottom > s.top - e &&\n r.top < s.bottom + i)\n );\n }\n visible() {\n for (\n var t,\n e = this.bounds(),\n i = this.views.displayed(),\n n = i.length,\n r = [],\n s = 0;\n s < n;\n s++\n )\n (t = i[s]), !0 === this.isVisible(t, 0, 0, e) && r.push(t);\n return r;\n }\n scrollBy(t, e, i) {\n let n = \"rtl\" === this.settings.direction ? -1 : 1;\n i && (this.ignore = !0),\n this.settings.fullsize\n ? window.scrollBy(t * n, e * n)\n : (t && (this.container.scrollLeft += t * n),\n e && (this.container.scrollTop += e)),\n (this.scrolled = !0);\n }\n scrollTo(t, e, i) {\n i && (this.ignore = !0),\n this.settings.fullsize\n ? window.scrollTo(t, e)\n : ((this.container.scrollLeft = t),\n (this.container.scrollTop = e)),\n (this.scrolled = !0);\n }\n onScroll() {\n let t, e;\n this.settings.fullsize\n ? ((t = window.scrollY), (e = window.scrollX))\n : ((t = this.container.scrollTop), (e = this.container.scrollLeft)),\n (this.scrollTop = t),\n (this.scrollLeft = e),\n this.ignore\n ? (this.ignore = !1)\n : (this.emit(f.c.MANAGERS.SCROLL, { top: t, left: e }),\n clearTimeout(this.afterScrolled),\n (this.afterScrolled = setTimeout(\n function () {\n this.emit(f.c.MANAGERS.SCROLLED, {\n top: this.scrollTop,\n left: this.scrollLeft,\n });\n }.bind(this),\n 20,\n )));\n }\n bounds() {\n return this.stage.bounds();\n }\n applyLayout(t) {\n (this.layout = t),\n this.updateLayout(),\n this.views &&\n this.views.length > 0 &&\n \"pre-paginated\" === this.layout.name &&\n this.display(this.views.first().section);\n }\n updateLayout() {\n this.stage &&\n ((this._stageSize = this.stage.size()),\n this.isPaginated\n ? (this.layout.calculate(\n this._stageSize.width,\n this._stageSize.height,\n this.settings.gap,\n ),\n (this.settings.offset =\n this.layout.delta / this.layout.divisor))\n : this.layout.calculate(\n this._stageSize.width,\n this._stageSize.height,\n ),\n (this.viewSettings.width = this.layout.width),\n (this.viewSettings.height = this.layout.height),\n this.setLayout(this.layout));\n }\n setLayout(t) {\n (this.viewSettings.layout = t),\n (this.mapping = new a.a(\n t.props,\n this.settings.direction,\n this.settings.axis,\n )),\n this.views &&\n this.views.forEach(function (e) {\n e && e.setLayout(t);\n });\n }\n updateWritingMode(t) {\n this.writingMode = t;\n }\n updateAxis(t, e) {\n (e || t !== this.settings.axis) &&\n ((this.settings.axis = t),\n this.stage && this.stage.axis(t),\n (this.viewSettings.axis = t),\n this.mapping &&\n (this.mapping = new a.a(\n this.layout.props,\n this.settings.direction,\n this.settings.axis,\n )),\n this.layout &&\n (\"vertical\" === t\n ? this.layout.spread(\"none\")\n : this.layout.spread(this.layout.settings.spread)));\n }\n updateFlow(t, e = \"auto\") {\n let i = \"paginated\" === t || \"auto\" === t;\n (this.isPaginated = i),\n \"scrolled-doc\" === t ||\n \"scrolled-continuous\" === t ||\n \"scrolled\" === t\n ? this.updateAxis(\"vertical\")\n : this.updateAxis(\"horizontal\"),\n (this.viewSettings.flow = t),\n this.settings.overflow\n ? (this.overflow = this.settings.overflow)\n : (this.overflow = i ? \"hidden\" : e),\n this.stage && this.stage.overflow(this.overflow),\n this.updateLayout();\n }\n getContents() {\n var t = [];\n return this.views\n ? (this.views.forEach(function (e) {\n const i = e && e.contents;\n i && t.push(i);\n }),\n t)\n : t;\n }\n direction(t = \"ltr\") {\n (this.settings.direction = t),\n this.stage && this.stage.direction(t),\n (this.viewSettings.direction = t),\n this.updateLayout();\n }\n isRendered() {\n return this.rendered;\n }\n }\n r()(p.prototype);\n e.a = p;\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(2),\n r = i(0);\n e.a = class {\n constructor(t, e, i, n = !1) {\n (this.layout = t),\n (this.horizontal = \"horizontal\" === i),\n (this.direction = e || \"ltr\"),\n (this._dev = n);\n }\n section(t) {\n var e = this.findRanges(t);\n return this.rangeListToCfiList(t.section.cfiBase, e);\n }\n page(t, e, i, r) {\n var s,\n o = !(!t || !t.document) && t.document.body;\n if (o) {\n if (\n ((s = this.rangePairToCfiPair(e, {\n start: this.findStart(o, i, r),\n end: this.findEnd(o, i, r),\n })),\n !0 === this._dev)\n ) {\n let e = t.document,\n i = new n.a(s.start).toRange(e),\n r = new n.a(s.end).toRange(e),\n o = e.defaultView.getSelection(),\n a = e.createRange();\n o.removeAllRanges(),\n a.setStart(i.startContainer, i.startOffset),\n a.setEnd(r.endContainer, r.endOffset),\n o.addRange(a);\n }\n return s;\n }\n }\n walk(t, e) {\n if (!t || t.nodeType !== Node.TEXT_NODE) {\n var i = function (t) {\n return t.data.trim().length > 0\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT;\n },\n n = i;\n n.acceptNode = i;\n for (\n var r,\n s,\n o = document.createTreeWalker(t, NodeFilter.SHOW_TEXT, n, !1);\n (r = o.nextNode()) && !(s = e(r));\n\n );\n return s;\n }\n }\n findRanges(t) {\n for (\n var e,\n i,\n n = [],\n r = t.contents.scrollWidth(),\n s = Math.ceil(r / this.layout.spreadWidth) * this.layout.divisor,\n o = this.layout.columnWidth,\n a = this.layout.gap,\n h = 0;\n h < s.pages;\n h++\n )\n (e = (o + a) * h),\n (i = o * (h + 1) + a * h),\n n.push({\n start: this.findStart(t.document.body, e, i),\n end: this.findEnd(t.document.body, e, i),\n });\n return n;\n }\n findStart(t, e, i) {\n for (var n, s, o = [t], a = t; o.length; )\n if (\n ((n = o.shift()),\n (s = this.walk(n, (t) => {\n var n, s, h, l, c;\n if (\n ((c = Object(r.nodeBounds)(t)),\n this.horizontal && \"ltr\" === this.direction)\n ) {\n if (\n ((n = this.horizontal ? c.left : c.top),\n (s = this.horizontal ? c.right : c.bottom),\n n >= e && n <= i)\n )\n return t;\n if (s > e) return t;\n (a = t), o.push(t);\n } else if (this.horizontal && \"rtl\" === this.direction) {\n if (((n = c.left), (s = c.right) <= i && s >= e)) return t;\n if (n < i) return t;\n (a = t), o.push(t);\n } else {\n if (((h = c.top), (l = c.bottom), h >= e && h <= i)) return t;\n if (l > e) return t;\n (a = t), o.push(t);\n }\n })))\n )\n return this.findTextStartRange(s, e, i);\n return this.findTextStartRange(a, e, i);\n }\n findEnd(t, e, i) {\n for (var n, s, o = [t], a = t; o.length; )\n if (\n ((n = o.shift()),\n (s = this.walk(n, (t) => {\n var n, s, h, l, c;\n if (\n ((c = Object(r.nodeBounds)(t)),\n this.horizontal && \"ltr\" === this.direction)\n ) {\n if (\n ((n = Math.round(c.left)),\n (s = Math.round(c.right)),\n n > i && a)\n )\n return a;\n if (s > i) return t;\n (a = t), o.push(t);\n } else if (this.horizontal && \"rtl\" === this.direction) {\n if (\n ((n = Math.round(this.horizontal ? c.left : c.top)),\n (s = Math.round(this.horizontal ? c.right : c.bottom)) <\n e && a)\n )\n return a;\n if (n < e) return t;\n (a = t), o.push(t);\n } else {\n if (\n ((h = Math.round(c.top)),\n (l = Math.round(c.bottom)),\n h > i && a)\n )\n return a;\n if (l > i) return t;\n (a = t), o.push(t);\n }\n })))\n )\n return this.findTextEndRange(s, e, i);\n return this.findTextEndRange(a, e, i);\n }\n findTextStartRange(t, e, i) {\n for (\n var n, r, s = this.splitTextNodeIntoRanges(t), o = 0;\n o < s.length;\n o++\n )\n if (\n ((r = (n = s[o]).getBoundingClientRect()),\n this.horizontal && \"ltr\" === this.direction)\n ) {\n if (r.left >= e) return n;\n } else if (this.horizontal && \"rtl\" === this.direction) {\n if (r.right <= i) return n;\n } else if (r.top >= e) return n;\n return s[0];\n }\n findTextEndRange(t, e, i) {\n for (\n var n, r, s, o, a, h, l, c = this.splitTextNodeIntoRanges(t), u = 0;\n u < c.length;\n u++\n ) {\n if (\n ((s = (r = c[u]).getBoundingClientRect()),\n this.horizontal && \"ltr\" === this.direction)\n ) {\n if (((o = s.left), (a = s.right), o > i && n)) return n;\n if (a > i) return r;\n } else if (this.horizontal && \"rtl\" === this.direction) {\n if (((o = s.left), (a = s.right) < e && n)) return n;\n if (o < e) return r;\n } else {\n if (((h = s.top), (l = s.bottom), h > i && n)) return n;\n if (l > i) return r;\n }\n n = r;\n }\n return c[c.length - 1];\n }\n splitTextNodeIntoRanges(t, e) {\n var i,\n n = [],\n r = (t.textContent || \"\").trim(),\n s = t.ownerDocument,\n o = e || \" \",\n a = r.indexOf(o);\n if (-1 === a || t.nodeType != Node.TEXT_NODE)\n return (i = s.createRange()).selectNodeContents(t), [i];\n for (\n (i = s.createRange()).setStart(t, 0),\n i.setEnd(t, a),\n n.push(i),\n i = !1;\n -1 != a;\n\n )\n (a = r.indexOf(o, a + 1)) > 0 &&\n (i && (i.setEnd(t, a), n.push(i)),\n (i = s.createRange()).setStart(t, a + 1));\n return i && (i.setEnd(t, r.length), n.push(i)), n;\n }\n rangePairToCfiPair(t, e) {\n var i = e.start,\n r = e.end;\n return (\n i.collapse(!0),\n r.collapse(!1),\n { start: new n.a(i, t).toString(), end: new n.a(r, t).toString() }\n );\n }\n rangeListToCfiList(t, e) {\n for (var i, n = [], r = 0; r < e.length; r++)\n (i = this.rangePairToCfiPair(t, e[r])), n.push(i);\n return n;\n }\n axis(t) {\n return t && (this.horizontal = \"horizontal\" === t), this.horizontal;\n }\n };\n },\n function (t, e, i) {\n var n = i(7);\n t.exports = function (t) {\n return \"object\" == typeof t ? null !== t : n(t);\n };\n },\n function (t, e, i) {\n var n = i(9),\n r = i(7),\n s = function (t) {\n return r(t) ? t : void 0;\n };\n t.exports = function (t, e) {\n return arguments.length < 2 ? s(n[t]) : n[t] && n[t][e];\n };\n },\n function (t, e, i) {\n var n = i(13),\n r = i(21),\n s = i(32);\n t.exports = n\n ? function (t, e, i) {\n return r.f(t, e, s(1, i));\n }\n : function (t, e, i) {\n return (t[e] = i), t;\n };\n },\n function (t, e, i) {\n var n = i(13),\n r = i(61),\n s = i(22),\n o = i(55),\n a = Object.defineProperty;\n e.f = n\n ? a\n : function (t, e, i) {\n if ((s(t), (e = o(e)), s(i), r))\n try {\n return a(t, e, i);\n } catch (t) {}\n if (\"get\" in i || \"set\" in i)\n throw TypeError(\"Accessors not supported\");\n return \"value\" in i && (t[e] = i.value), t;\n };\n },\n function (t, e, i) {\n var n = i(18);\n t.exports = function (t) {\n if (n(t)) return t;\n throw TypeError(String(t) + \" is not an object\");\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(3),\n r = i.n(n),\n s = i(0),\n o = i(2),\n a = i(17),\n h = i(10),\n l = i(1);\n const c = \"undefined\" != typeof navigator,\n u = c && /Chrome/.test(navigator.userAgent),\n d = c && !u && /AppleWebKit/.test(navigator.userAgent);\n class f {\n constructor(t, e, i, n) {\n (this.epubcfi = new o.a()),\n (this.document = t),\n (this.documentElement = this.document.documentElement),\n (this.content = e || this.document.body),\n (this.window = this.document.defaultView),\n (this._size = { width: 0, height: 0 }),\n (this.sectionIndex = n || 0),\n (this.cfiBase = i || \"\"),\n this.epubReadingSystem(\"epub.js\", l.b),\n (this.called = 0),\n (this.active = !0),\n this.listeners();\n }\n static get listenedEvents() {\n return l.a;\n }\n width(t) {\n var e = this.content;\n return (\n t && Object(s.isNumber)(t) && (t += \"px\"),\n t && (e.style.width = t),\n parseInt(this.window.getComputedStyle(e).width)\n );\n }\n height(t) {\n var e = this.content;\n return (\n t && Object(s.isNumber)(t) && (t += \"px\"),\n t && (e.style.height = t),\n parseInt(this.window.getComputedStyle(e).height)\n );\n }\n contentWidth(t) {\n var e = this.content || this.document.body;\n return (\n t && Object(s.isNumber)(t) && (t += \"px\"),\n t && (e.style.width = t),\n parseInt(this.window.getComputedStyle(e).width)\n );\n }\n contentHeight(t) {\n var e = this.content || this.document.body;\n return (\n t && Object(s.isNumber)(t) && (t += \"px\"),\n t && (e.style.height = t),\n parseInt(this.window.getComputedStyle(e).height)\n );\n }\n textWidth() {\n let t,\n e,\n i = this.document.createRange(),\n n = this.content || this.document.body,\n r = Object(s.borders)(n);\n return (\n i.selectNodeContents(n),\n (t = i.getBoundingClientRect()),\n (e = t.width),\n r && r.width && (e += r.width),\n Math.round(e)\n );\n }\n textHeight() {\n let t,\n e,\n i = this.document.createRange(),\n n = this.content || this.document.body;\n return (\n i.selectNodeContents(n),\n (t = i.getBoundingClientRect()),\n (e = t.bottom),\n Math.round(e)\n );\n }\n scrollWidth() {\n return this.documentElement.scrollWidth;\n }\n scrollHeight() {\n return this.documentElement.scrollHeight;\n }\n overflow(t) {\n return (\n t && (this.documentElement.style.overflow = t),\n this.window.getComputedStyle(this.documentElement).overflow\n );\n }\n overflowX(t) {\n return (\n t && (this.documentElement.style.overflowX = t),\n this.window.getComputedStyle(this.documentElement).overflowX\n );\n }\n overflowY(t) {\n return (\n t && (this.documentElement.style.overflowY = t),\n this.window.getComputedStyle(this.documentElement).overflowY\n );\n }\n css(t, e, i) {\n var n = this.content || this.document.body;\n return (\n e\n ? n.style.setProperty(t, e, i ? \"important\" : \"\")\n : n.style.removeProperty(t),\n this.window.getComputedStyle(n)[t]\n );\n }\n viewport(t) {\n var e,\n i = this.document.querySelector(\"meta[name='viewport']\"),\n n = {\n width: void 0,\n height: void 0,\n scale: void 0,\n minimum: void 0,\n maximum: void 0,\n scalable: void 0,\n },\n r = [];\n if (i && i.hasAttribute(\"content\")) {\n let t = i.getAttribute(\"content\"),\n e = t.match(/width\\s*=\\s*([^,]*)/),\n r = t.match(/height\\s*=\\s*([^,]*)/),\n s = t.match(/initial-scale\\s*=\\s*([^,]*)/),\n o = t.match(/minimum-scale\\s*=\\s*([^,]*)/),\n a = t.match(/maximum-scale\\s*=\\s*([^,]*)/),\n h = t.match(/user-scalable\\s*=\\s*([^,]*)/);\n e && e.length && void 0 !== e[1] && (n.width = e[1]),\n r && r.length && void 0 !== r[1] && (n.height = r[1]),\n s && s.length && void 0 !== s[1] && (n.scale = s[1]),\n o && o.length && void 0 !== o[1] && (n.minimum = o[1]),\n a && a.length && void 0 !== a[1] && (n.maximum = a[1]),\n h && h.length && void 0 !== h[1] && (n.scalable = h[1]);\n }\n return (\n (e = Object(s.defaults)(t || {}, n)),\n t &&\n (e.width && r.push(\"width=\" + e.width),\n e.height && r.push(\"height=\" + e.height),\n e.scale && r.push(\"initial-scale=\" + e.scale),\n \"no\" === e.scalable\n ? (r.push(\"minimum-scale=\" + e.scale),\n r.push(\"maximum-scale=\" + e.scale),\n r.push(\"user-scalable=\" + e.scalable))\n : (e.scalable && r.push(\"user-scalable=\" + e.scalable),\n e.minimum && r.push(\"minimum-scale=\" + e.minimum),\n e.maximum && r.push(\"minimum-scale=\" + e.maximum)),\n i ||\n ((i = this.document.createElement(\"meta\")).setAttribute(\n \"name\",\n \"viewport\",\n ),\n this.document.querySelector(\"head\").appendChild(i)),\n i.setAttribute(\"content\", r.join(\", \")),\n this.window.scrollTo(0, 0)),\n e\n );\n }\n expand() {\n this.emit(l.c.CONTENTS.EXPAND);\n }\n listeners() {\n this.imageLoadListeners(),\n this.mediaQueryListeners(),\n this.addEventListeners(),\n this.addSelectionListeners(),\n \"undefined\" == typeof ResizeObserver\n ? (this.resizeListeners(), this.visibilityListeners())\n : this.resizeObservers(),\n this.linksHandler();\n }\n removeListeners() {\n this.removeEventListeners(),\n this.removeSelectionListeners(),\n this.observer && this.observer.disconnect(),\n clearTimeout(this.expanding);\n }\n resizeCheck() {\n let t = this.textWidth(),\n e = this.textHeight();\n (t == this._size.width && e == this._size.height) ||\n ((this._size = { width: t, height: e }),\n this.onResize && this.onResize(this._size),\n this.emit(l.c.CONTENTS.RESIZE, this._size));\n }\n resizeListeners() {\n clearTimeout(this.expanding),\n requestAnimationFrame(this.resizeCheck.bind(this)),\n (this.expanding = setTimeout(this.resizeListeners.bind(this), 350));\n }\n visibilityListeners() {\n document.addEventListener(\"visibilitychange\", () => {\n \"visible\" === document.visibilityState && !1 === this.active\n ? ((this.active = !0), this.resizeListeners())\n : ((this.active = !1), clearTimeout(this.expanding));\n });\n }\n transitionListeners() {\n let t = this.content;\n (t.style.transitionProperty =\n \"font, font-size, font-size-adjust, font-stretch, font-variation-settings, font-weight, width, height\"),\n (t.style.transitionDuration = \"0.001ms\"),\n (t.style.transitionTimingFunction = \"linear\"),\n (t.style.transitionDelay = \"0\"),\n (this._resizeCheck = this.resizeCheck.bind(this)),\n this.document.addEventListener(\"transitionend\", this._resizeCheck);\n }\n mediaQueryListeners() {\n for (\n var t = this.document.styleSheets,\n e = function (t) {\n t.matches &&\n !this._expanding &&\n setTimeout(this.expand.bind(this), 1);\n }.bind(this),\n i = 0;\n i < t.length;\n i += 1\n ) {\n var n;\n try {\n n = t[i].cssRules;\n } catch (t) {\n return;\n }\n if (!n) return;\n for (var r = 0; r < n.length; r += 1) {\n if (n[r].media)\n this.window.matchMedia(n[r].media.mediaText).addListener(e);\n }\n }\n }\n resizeObservers() {\n (this.observer = new ResizeObserver((t) => {\n requestAnimationFrame(this.resizeCheck.bind(this));\n })),\n this.observer.observe(this.document.documentElement);\n }\n mutationObservers() {\n this.observer = new MutationObserver((t) => {\n this.resizeCheck();\n });\n this.observer.observe(this.document, {\n attributes: !0,\n childList: !0,\n characterData: !0,\n subtree: !0,\n });\n }\n imageLoadListeners() {\n for (\n var t, e = this.document.querySelectorAll(\"img\"), i = 0;\n i < e.length;\n i++\n )\n void 0 !== (t = e[i]).naturalWidth &&\n 0 === t.naturalWidth &&\n (t.onload = this.expand.bind(this));\n }\n fontLoadListeners() {\n this.document &&\n this.document.fonts &&\n this.document.fonts.ready.then(\n function () {\n this.resizeCheck();\n }.bind(this),\n );\n }\n root() {\n return this.document ? this.document.documentElement : null;\n }\n locationOf(t, e) {\n var i,\n n = { left: 0, top: 0 };\n if (!this.document) return n;\n if (this.epubcfi.isCfiString(t)) {\n let r = new o.a(t).toRange(this.document, e);\n if (r) {\n try {\n if (\n !r.endContainer ||\n (r.startContainer == r.endContainer &&\n r.startOffset == r.endOffset)\n ) {\n let t = r.startContainer.textContent.indexOf(\n \" \",\n r.startOffset,\n );\n -1 == t && (t = r.startContainer.textContent.length),\n r.setEnd(r.startContainer, t);\n }\n } catch (t) {\n console.error(\n \"setting end offset to start container length failed\",\n t,\n );\n }\n if (r.startContainer.nodeType === Node.ELEMENT_NODE)\n (i = r.startContainer.getBoundingClientRect()),\n (n.left = i.left),\n (n.top = i.top);\n else if (d) {\n let t = r.startContainer,\n e = new Range();\n try {\n 1 === t.nodeType\n ? (i = t.getBoundingClientRect())\n : r.startOffset + 2 < t.length\n ? (e.setStart(t, r.startOffset),\n e.setEnd(t, r.startOffset + 2),\n (i = e.getBoundingClientRect()))\n : r.startOffset - 2 > 0\n ? (e.setStart(t, r.startOffset - 2),\n e.setEnd(t, r.startOffset),\n (i = e.getBoundingClientRect()))\n : (i = t.parentNode.getBoundingClientRect());\n } catch (t) {\n console.error(t, t.stack);\n }\n } else i = r.getBoundingClientRect();\n }\n } else if (\"string\" == typeof t && t.indexOf(\"#\") > -1) {\n let e = t.substring(t.indexOf(\"#\") + 1),\n n = this.document.getElementById(e);\n if (n)\n if (d) {\n let t = new Range();\n t.selectNode(n), (i = t.getBoundingClientRect());\n } else i = n.getBoundingClientRect();\n }\n return i && ((n.left = i.left), (n.top = i.top)), n;\n }\n addStylesheet(t) {\n return new Promise(\n function (e, i) {\n var n,\n r = !1;\n this.document\n ? (n = this.document.querySelector(\"link[href='\" + t + \"']\"))\n ? e(!0)\n : (((n = this.document.createElement(\"link\")).type =\n \"text/css\"),\n (n.rel = \"stylesheet\"),\n (n.href = t),\n (n.onload = n.onreadystatechange =\n function () {\n r ||\n (this.readyState && \"complete\" != this.readyState) ||\n ((r = !0),\n setTimeout(() => {\n e(!0);\n }, 1));\n }),\n this.document.head.appendChild(n))\n : e(!1);\n }.bind(this),\n );\n }\n _getStylesheetNode(t) {\n var e;\n return (\n (t = \"epubjs-inserted-css-\" + (t || \"\")),\n !!this.document &&\n ((e = this.document.getElementById(t)) ||\n (((e = this.document.createElement(\"style\")).id = t),\n this.document.head.appendChild(e)),\n e)\n );\n }\n addStylesheetCss(t, e) {\n return (\n !(!this.document || !t) &&\n ((this._getStylesheetNode(e).innerHTML = t), !0)\n );\n }\n addStylesheetRules(t, e) {\n var i;\n if (this.document && t && 0 !== t.length)\n if (\n ((i = this._getStylesheetNode(e).sheet),\n \"[object Array]\" === Object.prototype.toString.call(t))\n )\n for (var n = 0, r = t.length; n < r; n++) {\n var s = 1,\n o = t[n],\n a = t[n][0],\n h = \"\";\n \"[object Array]\" === Object.prototype.toString.call(o[1][0]) &&\n ((o = o[1]), (s = 0));\n for (var l = o.length; s < l; s++) {\n var c = o[s];\n h += c[0] + \":\" + c[1] + (c[2] ? \" !important\" : \"\") + \";\\n\";\n }\n i.insertRule(a + \"{\" + h + \"}\", i.cssRules.length);\n }\n else {\n Object.keys(t).forEach((e) => {\n const n = t[e];\n if (Array.isArray(n))\n n.forEach((t) => {\n const n = Object.keys(t)\n .map((e) => `${e}:${t[e]}`)\n .join(\";\");\n i.insertRule(`${e}{${n}}`, i.cssRules.length);\n });\n else {\n const t = Object.keys(n)\n .map((t) => `${t}:${n[t]}`)\n .join(\";\");\n i.insertRule(`${e}{${t}}`, i.cssRules.length);\n }\n });\n }\n }\n addScript(t) {\n return new Promise(\n function (e, i) {\n var n,\n r = !1;\n this.document\n ? (((n = this.document.createElement(\"script\")).type =\n \"text/javascript\"),\n (n.async = !0),\n (n.src = t),\n (n.onload = n.onreadystatechange =\n function () {\n r ||\n (this.readyState && \"complete\" != this.readyState) ||\n ((r = !0),\n setTimeout(function () {\n e(!0);\n }, 1));\n }),\n this.document.head.appendChild(n))\n : e(!1);\n }.bind(this),\n );\n }\n addClass(t) {\n var e;\n this.document &&\n (e = this.content || this.document.body) &&\n e.classList.add(t);\n }\n removeClass(t) {\n var e;\n this.document &&\n (e = this.content || this.document.body) &&\n e.classList.remove(t);\n }\n addEventListeners() {\n this.document &&\n ((this._triggerEvent = this.triggerEvent.bind(this)),\n l.a.forEach(function (t) {\n this.document.addEventListener(t, this._triggerEvent, {\n passive: !0,\n });\n }, this));\n }\n removeEventListeners() {\n this.document &&\n (l.a.forEach(function (t) {\n this.document.removeEventListener(t, this._triggerEvent, {\n passive: !0,\n });\n }, this),\n (this._triggerEvent = void 0));\n }\n triggerEvent(t) {\n this.emit(t.type, t);\n }\n addSelectionListeners() {\n this.document &&\n ((this._onSelectionChange = this.onSelectionChange.bind(this)),\n this.document.addEventListener(\n \"selectionchange\",\n this._onSelectionChange,\n { passive: !0 },\n ));\n }\n removeSelectionListeners() {\n this.document &&\n (this.document.removeEventListener(\n \"selectionchange\",\n this._onSelectionChange,\n { passive: !0 },\n ),\n (this._onSelectionChange = void 0));\n }\n onSelectionChange(t) {\n this.selectionEndTimeout && clearTimeout(this.selectionEndTimeout),\n (this.selectionEndTimeout = setTimeout(\n function () {\n var t = this.window.getSelection();\n this.triggerSelectedEvent(t);\n }.bind(this),\n 250,\n ));\n }\n triggerSelectedEvent(t) {\n var e, i;\n t &&\n t.rangeCount > 0 &&\n ((e = t.getRangeAt(0)).collapsed ||\n ((i = new o.a(e, this.cfiBase).toString()),\n this.emit(l.c.CONTENTS.SELECTED, i),\n this.emit(l.c.CONTENTS.SELECTED_RANGE, e)));\n }\n range(t, e) {\n return new o.a(t).toRange(this.document, e);\n }\n cfiFromRange(t, e) {\n return new o.a(t, this.cfiBase, e).toString();\n }\n cfiFromNode(t, e) {\n return new o.a(t, this.cfiBase, e).toString();\n }\n map(t) {\n return new a.a(t).section();\n }\n size(t, e) {\n var i = { scale: 1, scalable: \"no\" };\n this.layoutStyle(\"scrolling\"),\n t >= 0 &&\n (this.width(t),\n (i.width = t),\n this.css(\"padding\", \"0 \" + t / 12 + \"px\")),\n e >= 0 && (this.height(e), (i.height = e)),\n this.css(\"margin\", \"0\"),\n this.css(\"box-sizing\", \"border-box\"),\n this.viewport(i);\n }\n columns(t, e, i, n, r) {\n let o = Object(s.prefixed)(\"column-axis\"),\n a = Object(s.prefixed)(\"column-gap\"),\n h = Object(s.prefixed)(\"column-width\"),\n l = Object(s.prefixed)(\"column-fill\"),\n c =\n 0 === this.writingMode().indexOf(\"vertical\")\n ? \"vertical\"\n : \"horizontal\";\n this.layoutStyle(\"paginated\"),\n \"rtl\" === r && \"horizontal\" === c && this.direction(r),\n this.width(t),\n this.height(e),\n this.viewport({ width: t, height: e, scale: 1, scalable: \"no\" }),\n this.css(\"overflow-y\", \"hidden\"),\n this.css(\"margin\", \"0\", !0),\n \"vertical\" === c\n ? (this.css(\"padding-top\", n / 2 + \"px\", !0),\n this.css(\"padding-bottom\", n / 2 + \"px\", !0),\n this.css(\"padding-left\", \"20px\"),\n this.css(\"padding-right\", \"20px\"),\n this.css(o, \"vertical\"))\n : (this.css(\"padding-top\", \"20px\"),\n this.css(\"padding-bottom\", \"20px\"),\n this.css(\"padding-left\", n / 2 + \"px\", !0),\n this.css(\"padding-right\", n / 2 + \"px\", !0),\n this.css(o, \"horizontal\")),\n this.css(\"box-sizing\", \"border-box\"),\n this.css(\"max-width\", \"inherit\"),\n this.css(l, \"auto\"),\n this.css(a, n + \"px\"),\n this.css(h, i + \"px\"),\n this.css(\"-webkit-line-box-contain\", \"block glyphs replaced\");\n }\n scaler(t, e, i) {\n var n = \"scale(\" + t + \")\",\n r = \"\";\n this.css(\"transform-origin\", \"top left\"),\n (e >= 0 || i >= 0) &&\n (r = \" translate(\" + (e || 0) + \"px, \" + (i || 0) + \"px )\"),\n this.css(\"transform\", n + r);\n }\n fit(t, e, i) {\n var n = this.viewport(),\n r = parseInt(n.width),\n s = parseInt(n.height),\n o = t / r,\n a = e / s,\n h = o < a ? o : a;\n if (\n (this.layoutStyle(\"paginated\"),\n this.width(r),\n this.height(s),\n this.overflow(\"hidden\"),\n this.scaler(h, 0, 0),\n this.css(\"background-size\", r * h + \"px \" + s * h + \"px\"),\n this.css(\"background-color\", \"transparent\"),\n i && i.properties.includes(\"page-spread-left\"))\n ) {\n var l = t - r * h;\n this.css(\"margin-left\", l + \"px\");\n }\n }\n direction(t) {\n this.documentElement && (this.documentElement.style.direction = t);\n }\n mapPage(t, e, i, n, r) {\n return new a.a(e, r).page(this, t, i, n);\n }\n linksHandler() {\n Object(h.c)(this.content, (t) => {\n this.emit(l.c.CONTENTS.LINK_CLICKED, t);\n });\n }\n writingMode(t) {\n let e = Object(s.prefixed)(\"writing-mode\");\n return (\n t && this.documentElement && (this.documentElement.style[e] = t),\n this.window.getComputedStyle(this.documentElement)[e] || \"\"\n );\n }\n layoutStyle(t) {\n return (\n t &&\n ((this._layoutStyle = t),\n (navigator.epubReadingSystem.layoutStyle = this._layoutStyle)),\n this._layoutStyle || \"paginated\"\n );\n }\n epubReadingSystem(t, e) {\n return (\n (navigator.epubReadingSystem = {\n name: t,\n version: e,\n layoutStyle: this.layoutStyle(),\n hasFeature: function (t) {\n switch (t) {\n case \"dom-manipulation\":\n case \"layout-changes\":\n case \"touch-events\":\n case \"mouse-events\":\n case \"keyboard-events\":\n return !0;\n case \"spine-scripting\":\n default:\n return !1;\n }\n },\n }),\n navigator.epubReadingSystem\n );\n }\n destroy() {\n this.removeListeners();\n }\n }\n r()(f.prototype), (e.a = f);\n },\n function (t, e, i) {\n \"use strict\";\n Object.defineProperty(e, \"__esModule\", { value: !0 }),\n (e.Underline = e.Pane = e.Mark = e.Highlight = void 0),\n i(96),\n i(68);\n var n = s(i(125)),\n r = s(i(126));\n function s(t) {\n return t && t.__esModule ? t : { default: t };\n }\n e.Pane = class {\n constructor(t) {\n let e =\n arguments.length > 1 && void 0 !== arguments[1]\n ? arguments[1]\n : document.body;\n (this.target = t),\n (this.element = n.default.createElement(\"svg\")),\n (this.marks = []),\n (this.element.style.position = \"absolute\"),\n this.element.setAttribute(\"pointer-events\", \"none\"),\n r.default.proxyMouse(this.target, this.marks),\n (this.container = e),\n this.container.appendChild(this.element),\n this.render();\n }\n addMark(t) {\n var e = n.default.createElement(\"g\");\n return (\n this.element.appendChild(e),\n t.bind(e, this.container),\n this.marks.push(t),\n t.render(),\n t\n );\n }\n removeMark(t) {\n var e = this.marks.indexOf(t);\n if (-1 !== e) {\n var i = t.unbind();\n this.element.removeChild(i), this.marks.splice(e, 1);\n }\n }\n render() {\n var t, e, i, n;\n for (var r of ((function (t, e) {\n t.style.setProperty(\"top\", \"\".concat(e.top, \"px\"), \"important\"),\n t.style.setProperty(\"left\", \"\".concat(e.left, \"px\"), \"important\"),\n t.style.setProperty(\n \"height\",\n \"\".concat(e.height, \"px\"),\n \"important\",\n ),\n t.style.setProperty(\n \"width\",\n \"\".concat(e.width, \"px\"),\n \"important\",\n );\n })(\n this.element,\n ((t = this.target),\n (e = this.container),\n (i = e.getBoundingClientRect()),\n {\n top: (n = t.getBoundingClientRect()).top - i.top,\n left: n.left - i.left,\n height: t.scrollHeight,\n width: t.scrollWidth,\n }),\n ),\n this.marks))\n r.render();\n }\n };\n class o {\n constructor() {\n this.element = null;\n }\n bind(t, e) {\n (this.element = t), (this.container = e);\n }\n unbind() {\n var t = this.element;\n return (this.element = null), t;\n }\n render() {}\n dispatchEvent(t) {\n this.element && this.element.dispatchEvent(t);\n }\n getBoundingClientRect() {\n return this.element.getBoundingClientRect();\n }\n getClientRects() {\n for (var t = [], e = this.element.firstChild; e; )\n t.push(e.getBoundingClientRect()), (e = e.nextSibling);\n return t;\n }\n filteredRanges() {\n if (!this.range) return [];\n const t = Array.from(this.range.getClientRects()).map((t) =>\n JSON.stringify(t),\n ),\n e = new Set(t);\n return Array.from(e).map((t) => JSON.parse(t));\n }\n }\n e.Mark = o;\n class a extends o {\n constructor(t, e, i, n) {\n super(),\n (this.range = t),\n (this.className = e),\n (this.data = i || {}),\n (this.attributes = n || {});\n }\n bind(t, e) {\n for (var i in (super.bind(t, e), this.data))\n this.data.hasOwnProperty(i) &&\n (this.element.dataset[i] = this.data[i]);\n for (var i in this.attributes)\n this.attributes.hasOwnProperty(i) &&\n this.element.setAttribute(i, this.attributes[i]);\n this.className && this.element.classList.add(this.className);\n }\n render() {\n for (; this.element.firstChild; )\n this.element.removeChild(this.element.firstChild);\n for (\n var t = this.element.ownerDocument.createDocumentFragment(),\n e = this.filteredRanges(),\n i = this.element.getBoundingClientRect(),\n r = this.container.getBoundingClientRect(),\n s = 0,\n o = e.length;\n s < o;\n s++\n ) {\n var a = e[s],\n h = n.default.createElement(\"rect\");\n h.setAttribute(\"x\", a.left - i.left + r.left),\n h.setAttribute(\"y\", a.top - i.top + r.top),\n h.setAttribute(\"height\", a.height),\n h.setAttribute(\"width\", a.width),\n h.setAttribute(\"fill\", this.attributes.fill),\n h.setAttribute(\"fill-opacity\", this.attributes[\"fill-opacity\"]),\n t.appendChild(h);\n }\n this.element.appendChild(t);\n }\n }\n e.Highlight = a;\n e.Underline = class extends a {\n constructor(t, e, i, n) {\n super(t, e, i, n);\n }\n render() {\n for (; this.element.firstChild; )\n this.element.removeChild(this.element.firstChild);\n for (\n var t = this.element.ownerDocument.createDocumentFragment(),\n e = this.filteredRanges(),\n i = this.element.getBoundingClientRect(),\n r = this.container.getBoundingClientRect(),\n s = 0,\n o = e.length;\n s < o;\n s++\n ) {\n var a,\n h,\n l,\n c = e[s],\n u = n.default.createElement(\"rect\");\n u.setAttribute(\"x\", c.left - i.left + r.left),\n u.setAttribute(\"y\", c.top - i.top + r.top),\n u.setAttribute(\"height\", c.height),\n u.setAttribute(\"width\", c.width),\n u.setAttribute(\"fill\", \"none\"),\n u.setAttribute(\"stroke\", \"transparent\");\n var d = n.default.createElement(\"line\");\n d.setAttribute(\"x1\", c.left - i.left + r.left),\n d.setAttribute(\"x2\", c.left - i.left + r.left + c.width),\n d.setAttribute(\"y1\", c.top - i.top + r.top + c.height - 1),\n d.setAttribute(\"y2\", c.top - i.top + r.top + c.height - 1),\n d.setAttribute(\n \"stroke-width\",\n (null === (a = this.attributes) || void 0 === a\n ? void 0\n : a[\"stroke-width\"]) || 1,\n ),\n d.setAttribute(\n \"stroke-opacity\",\n (null === (h = this.attributes) || void 0 === h\n ? void 0\n : h[\"stroke-opacity\"]) || 0.3,\n ),\n d.setAttribute(\n \"stroke\",\n (null === (l = this.attributes) || void 0 === l\n ? void 0\n : l.stroke) || \"black\",\n ),\n d.setAttribute(\"stroke-linecap\", \"square\"),\n t.appendChild(u),\n t.appendChild(d);\n }\n this.element.appendChild(t);\n }\n };\n },\n function (t, e) {\n var i;\n i = (function () {\n return this;\n })();\n try {\n i = i || new Function(\"return this\")();\n } catch (t) {\n \"object\" == typeof window && (i = window);\n }\n t.exports = i;\n },\n function (t, e, i) {\n \"use strict\";\n function n(t, e) {\n return (\n void 0 === e && (e = Object),\n e && \"function\" == typeof e.freeze ? e.freeze(t) : t\n );\n }\n var r = n({\n HTML: \"text/html\",\n isHTML: function (t) {\n return t === r.HTML;\n },\n XML_APPLICATION: \"application/xml\",\n XML_TEXT: \"text/xml\",\n XML_XHTML_APPLICATION: \"application/xhtml+xml\",\n XML_SVG_IMAGE: \"image/svg+xml\",\n }),\n s = n({\n HTML: \"http://www.w3.org/1999/xhtml\",\n isHTML: function (t) {\n return t === s.HTML;\n },\n SVG: \"http://www.w3.org/2000/svg\",\n XML: \"http://www.w3.org/XML/1998/namespace\",\n XMLNS: \"http://www.w3.org/2000/xmlns/\",\n });\n (e.freeze = n), (e.MIME_TYPE = r), (e.NAMESPACE = s);\n },\n function (t, e, i) {\n var n = i(53),\n r = i(54);\n t.exports = function (t) {\n return n(r(t));\n };\n },\n function (t, e, i) {\n var n = i(50);\n (e.DOMImplementation = n.DOMImplementation),\n (e.XMLSerializer = n.XMLSerializer),\n (e.DOMParser = i(93).DOMParser);\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(3),\n r = i.n(n),\n s = i(0),\n o = i(6),\n a = i(2),\n h = i(15),\n l = i(1);\n class c {\n constructor(t) {\n (this.settings = t),\n (this.name = t.layout || \"reflowable\"),\n (this._spread = \"none\" !== t.spread),\n (this._minSpreadWidth = t.minSpreadWidth || 800),\n (this._evenSpreads = t.evenSpreads || !1),\n \"scrolled\" === t.flow ||\n \"scrolled-continuous\" === t.flow ||\n \"scrolled-doc\" === t.flow\n ? (this._flow = \"scrolled\")\n : (this._flow = \"paginated\"),\n (this.width = 0),\n (this.height = 0),\n (this.spreadWidth = 0),\n (this.delta = 0),\n (this.columnWidth = 0),\n (this.gap = 0),\n (this.divisor = 1),\n (this.props = {\n name: this.name,\n spread: this._spread,\n flow: this._flow,\n width: 0,\n height: 0,\n spreadWidth: 0,\n delta: 0,\n columnWidth: 0,\n gap: 0,\n divisor: 1,\n });\n }\n flow(t) {\n return (\n void 0 !== t &&\n ((this._flow =\n \"scrolled\" === t ||\n \"scrolled-continuous\" === t ||\n \"scrolled-doc\" === t\n ? \"scrolled\"\n : \"paginated\"),\n this.update({ flow: this._flow })),\n this._flow\n );\n }\n spread(t, e) {\n return (\n t &&\n ((this._spread = \"none\" !== t),\n this.update({ spread: this._spread })),\n e >= 0 && (this._minSpreadWidth = e),\n this._spread\n );\n }\n calculate(t, e, i) {\n var n,\n r,\n s,\n o,\n a = 1,\n h = i || 0,\n l = t,\n c = e,\n u = Math.floor(l / 12);\n (a = this._spread && l >= this._minSpreadWidth ? 2 : 1),\n \"reflowable\" !== this.name ||\n \"paginated\" !== this._flow ||\n i >= 0 ||\n (h = u % 2 == 0 ? u : u - 1),\n \"pre-paginated\" === this.name && (h = 0),\n a > 1 ? (s = (n = l / a - h) + h) : ((n = l), (s = l)),\n \"pre-paginated\" === this.name && a > 1 && (l = n),\n (r = n * a + h),\n (o = l),\n (this.width = l),\n (this.height = c),\n (this.spreadWidth = r),\n (this.pageWidth = s),\n (this.delta = o),\n (this.columnWidth = n),\n (this.gap = h),\n (this.divisor = a),\n this.update({\n width: l,\n height: c,\n spreadWidth: r,\n pageWidth: s,\n delta: o,\n columnWidth: n,\n gap: h,\n divisor: a,\n });\n }\n format(t, e, i) {\n return \"pre-paginated\" === this.name\n ? t.fit(this.columnWidth, this.height, e)\n : \"paginated\" === this._flow\n ? t.columns(\n this.width,\n this.height,\n this.columnWidth,\n this.gap,\n this.settings.direction,\n )\n : i && \"horizontal\" === i\n ? t.size(null, this.height)\n : t.size(this.width, null);\n }\n count(t, e) {\n let i, n;\n return (\n \"pre-paginated\" === this.name\n ? ((i = 1), (n = 1))\n : \"paginated\" === this._flow\n ? ((e = e || this.delta),\n (i = Math.ceil(t / e)),\n (n = i * this.divisor))\n : ((e = e || this.height), (i = Math.ceil(t / e)), (n = i)),\n { spreads: i, pages: n }\n );\n }\n update(t) {\n if (\n (Object.keys(t).forEach((e) => {\n this.props[e] === t[e] && delete t[e];\n }),\n Object.keys(t).length > 0)\n ) {\n let e = Object(s.extend)(this.props, t);\n this.emit(l.c.LAYOUT.UPDATED, e, t);\n }\n }\n }\n r()(c.prototype);\n var u = c,\n d = i(5);\n var f = class {\n constructor(t) {\n (this.rendition = t),\n (this._themes = {\n default: { rules: {}, url: \"\", serialized: \"\" },\n }),\n (this._overrides = {}),\n (this._current = \"default\"),\n (this._injected = []),\n this.rendition.hooks.content.register(this.inject.bind(this)),\n this.rendition.hooks.content.register(this.overrides.bind(this));\n }\n register() {\n if (0 !== arguments.length)\n return 1 === arguments.length && \"object\" == typeof arguments[0]\n ? this.registerThemes(arguments[0])\n : 1 === arguments.length && \"string\" == typeof arguments[0]\n ? this.default(arguments[0])\n : 2 === arguments.length && \"string\" == typeof arguments[1]\n ? this.registerUrl(arguments[0], arguments[1])\n : 2 === arguments.length && \"object\" == typeof arguments[1]\n ? this.registerRules(arguments[0], arguments[1])\n : void 0;\n }\n default(t) {\n if (t)\n return \"string\" == typeof t\n ? this.registerUrl(\"default\", t)\n : \"object\" == typeof t\n ? this.registerRules(\"default\", t)\n : void 0;\n }\n registerThemes(t) {\n for (var e in t)\n t.hasOwnProperty(e) &&\n (\"string\" == typeof t[e]\n ? this.registerUrl(e, t[e])\n : this.registerRules(e, t[e]));\n }\n registerCss(t, e) {\n (this._themes[t] = { serialized: e }),\n (this._injected[t] || \"default\" == t) && this.update(t);\n }\n registerUrl(t, e) {\n var i = new d.a(e);\n (this._themes[t] = { url: i.toString() }),\n (this._injected[t] || \"default\" == t) && this.update(t);\n }\n registerRules(t, e) {\n (this._themes[t] = { rules: e }),\n (this._injected[t] || \"default\" == t) && this.update(t);\n }\n select(t) {\n var e = this._current;\n (this._current = t),\n this.update(t),\n this.rendition.getContents().forEach((i) => {\n i.removeClass(e), i.addClass(t);\n });\n }\n update(t) {\n this.rendition.getContents().forEach((e) => {\n this.add(t, e);\n });\n }\n inject(t) {\n var e,\n i = [],\n n = this._themes;\n for (var r in n)\n !n.hasOwnProperty(r) ||\n (r !== this._current && \"default\" !== r) ||\n ((((e = n[r]).rules && Object.keys(e.rules).length > 0) ||\n (e.url && -1 === i.indexOf(e.url))) &&\n this.add(r, t),\n this._injected.push(r));\n \"default\" != this._current && t.addClass(this._current);\n }\n add(t, e) {\n var i = this._themes[t];\n i &&\n e &&\n (i.url\n ? e.addStylesheet(i.url)\n : i.serialized\n ? (e.addStylesheetCss(i.serialized, t), (i.injected = !0))\n : i.rules &&\n (e.addStylesheetRules(i.rules, t), (i.injected = !0)));\n }\n override(t, e, i) {\n var n = this.rendition.getContents();\n (this._overrides[t] = { value: e, priority: !0 === i }),\n n.forEach((e) => {\n e.css(t, this._overrides[t].value, this._overrides[t].priority);\n });\n }\n removeOverride(t) {\n var e = this.rendition.getContents();\n delete this._overrides[t],\n e.forEach((e) => {\n e.css(t);\n });\n }\n overrides(t) {\n var e = this._overrides;\n for (var i in e)\n e.hasOwnProperty(i) && t.css(i, e[i].value, e[i].priority);\n }\n fontSize(t) {\n this.override(\"font-size\", t);\n }\n font(t) {\n this.override(\"font-family\", t, !0);\n }\n destroy() {\n (this.rendition = void 0),\n (this._themes = void 0),\n (this._overrides = void 0),\n (this._current = void 0),\n (this._injected = void 0);\n }\n };\n i(23);\n class p {\n constructor({\n type: t,\n cfiRange: e,\n data: i,\n sectionIndex: n,\n cb: r,\n className: s,\n styles: o,\n cfiRangeText: a,\n }) {\n (this.type = t),\n (this.cfiRange = e),\n (this.cfiRangeText = a),\n (this.data = i),\n (this.sectionIndex = n),\n (this.mark = void 0),\n (this.cb = r),\n (this.className = s),\n (this.styles = o);\n }\n update(t = {}, e = {}) {\n var i, n, r, s, o, a, h, l, c, u;\n (this.data && (this.data = t),\n this.styles || (this.styles = {}),\n null != e && e.stroke) &&\n (null !== (i = this.mark) &&\n void 0 !== i &&\n null !== (n = i.attributes) &&\n void 0 !== n &&\n n.stroke &&\n (this.mark.attributes.stroke = e.stroke),\n (this.styles.stroke = e.stroke));\n null != e &&\n e[\"stroke-opacity\"] &&\n (null !== (r = this.mark) &&\n void 0 !== r &&\n null !== (s = r.attributes) &&\n void 0 !== s &&\n s[\"stroke-opacity\"] &&\n (this.mark.attributes[\"stroke-opacity\"] = e[\"stroke-opacity\"]),\n (this.styles[\"stroke-opacity\"] = e[\"stroke-opacity\"]));\n null != e &&\n e[\"stroke-width\"] &&\n (null !== (o = this.mark) &&\n void 0 !== o &&\n null !== (a = o.attributes) &&\n void 0 !== a &&\n a[\"stroke-width\"] &&\n (this.mark.attributes[\"stroke-width\"] = e[\"stroke-width\"]),\n (this.styles[\"stroke-width\"] = e[\"stroke-width\"]));\n null != e &&\n e.fill &&\n (null !== (h = this.mark) &&\n void 0 !== h &&\n null !== (l = h.attributes) &&\n void 0 !== l &&\n l.fill &&\n (this.mark.attributes.fill = e.fill),\n (this.styles.fill = e.fill));\n null != e &&\n e[\"fill-opacity\"] &&\n (null !== (c = this.mark) &&\n void 0 !== c &&\n null !== (u = c.attributes) &&\n void 0 !== u &&\n u[\"fill-opacity\"] &&\n (this.mark.attributes[\"fill-opacity\"] = e[\"fill-opacity\"]),\n (this.styles[\"fill-opacity\"] = e[\"fill-opacity\"]));\n }\n attach(t) {\n let e,\n {\n cfiRange: i,\n cfiRangeText: n,\n data: r,\n type: s,\n mark: o,\n cb: a,\n className: h,\n styles: c,\n } = this;\n return (\n \"highlight\" === s\n ? (e = t.highlight(i, r, a, h, c, n))\n : \"underline\" === s\n ? (e = t.underline(i, r, a, h, c, n))\n : \"mark\" === s && (e = t.mark(i, r, a, h, c, n)),\n (this.mark = e),\n this.emit(l.c.ANNOTATION.ATTACH, e),\n e\n );\n }\n detach(t) {\n let e,\n { cfiRange: i, type: n } = this;\n return (\n t &&\n (\"highlight\" === n\n ? (e = t.unhighlight(i))\n : \"underline\" === n\n ? (e = t.ununderline(i))\n : \"mark\" === n && (e = t.unmark(i))),\n (this.mark = void 0),\n this.emit(l.c.ANNOTATION.DETACH, e),\n e\n );\n }\n text() {}\n }\n r()(p.prototype);\n var g = class {\n constructor(t) {\n (this.rendition = t),\n (this.highlights = []),\n (this.underlines = []),\n (this.marks = []),\n (this._annotations = {}),\n (this._annotationsBySectionIndex = {}),\n this.rendition.hooks.render.register(this.inject.bind(this)),\n this.rendition.hooks.unloaded.register(this.clear.bind(this));\n }\n add(t, e, i, n, r, s, o) {\n let h = encodeURI(e + t),\n l = new a.a(e).spinePos,\n c = new p({\n type: t,\n cfiRange: e,\n data: i,\n sectionIndex: l,\n cb: n,\n className: r,\n styles: s,\n cfiRangeText: o,\n });\n return (\n (this._annotations[h] = c),\n \"highlight\" === t && this.highlights.push(c),\n \"underline\" === t && this.underlines.push(c),\n \"mark\" === t && this.marks.push(c),\n l in this._annotationsBySectionIndex\n ? this._annotationsBySectionIndex[l].push(h)\n : (this._annotationsBySectionIndex[l] = [h]),\n this.rendition.views().forEach((t) => {\n c.sectionIndex === t.index && c.attach(t);\n }),\n c\n );\n }\n remove(t, e) {\n let i = encodeURI(t + e);\n if (i in this._annotations) {\n let n = this._annotations[i];\n if (e && n.type !== e) return;\n this.rendition.views().forEach((t) => {\n this._removeFromAnnotationBySectionIndex(n.sectionIndex, i),\n n.sectionIndex === t.index && n.detach(t);\n }),\n (this.highlights = this.highlights.filter(\n (i) => i.type !== e && i.cfiRange !== t,\n )),\n (this.underlines = this.underlines.filter(\n (i) => i.type !== e && i.cfiRange !== t,\n )),\n (this.marks = this.marks.filter(\n (i) => i.type !== e && i.cfiRange !== t,\n )),\n delete this._annotations[i];\n }\n }\n _removeFromAnnotationBySectionIndex(t, e) {\n this._annotationsBySectionIndex[t] = this._annotationsAt(t).filter(\n (t) => t !== e,\n );\n }\n _annotationsAt(t) {\n return this._annotationsBySectionIndex[t];\n }\n highlight(t, e, i, n, r, s) {\n return this.add(\"highlight\", t, e, i, n, r, s);\n }\n underline(t, e, i, n, r, s) {\n return this.add(\"underline\", t, i, n, r, s, e);\n }\n mark(t, e, i, n) {\n return this.add(\"mark\", t, e, i, n);\n }\n each() {\n return [...this.highlights, ...this.underlines, ...this.marks];\n }\n inject(t) {\n let e = t.index;\n if (e in this._annotationsBySectionIndex) {\n this._annotationsBySectionIndex[e].forEach((e) => {\n this._annotations[e].attach(t);\n });\n }\n }\n clear(t) {\n let e = t.index;\n if (e in this._annotationsBySectionIndex) {\n this._annotationsBySectionIndex[e].forEach((e) => {\n this._annotations[e].detach(t);\n });\n }\n }\n show() {}\n hide() {}\n },\n m = i(45),\n v = i(16),\n y = i(47);\n class b {\n constructor(t, e) {\n (this.settings = Object(s.extend)(this.settings || {}, {\n width: null,\n height: null,\n ignoreClass: \"\",\n manager: \"default\",\n view: \"iframe\",\n flow: null,\n layout: null,\n spread: null,\n minSpreadWidth: 800,\n stylesheet: null,\n resizeOnOrientationChange: !0,\n script: null,\n snap: !1,\n defaultDirection: \"ltr\",\n allowScriptedContent: !1,\n allowPopups: !1,\n })),\n Object(s.extend)(this.settings, e),\n \"object\" == typeof this.settings.manager &&\n (this.manager = this.settings.manager),\n (this.book = t),\n (this.hooks = {}),\n (this.hooks.display = new o.a(this)),\n (this.hooks.serialize = new o.a(this)),\n (this.hooks.content = new o.a(this)),\n (this.hooks.unloaded = new o.a(this)),\n (this.hooks.layout = new o.a(this)),\n (this.hooks.render = new o.a(this)),\n (this.hooks.show = new o.a(this)),\n this.hooks.content.register(this.handleLinks.bind(this)),\n this.hooks.content.register(this.passEvents.bind(this)),\n this.hooks.content.register(this.adjustImages.bind(this)),\n this.book.spine.hooks.content.register(\n this.injectIdentifier.bind(this),\n ),\n this.settings.stylesheet &&\n this.book.spine.hooks.content.register(\n this.injectStylesheet.bind(this),\n ),\n this.settings.script &&\n this.book.spine.hooks.content.register(\n this.injectScript.bind(this),\n ),\n (this.themes = new f(this)),\n (this.annotations = new g(this)),\n (this.epubcfi = new a.a()),\n (this.q = new h.a(this)),\n (this.location = void 0),\n this.q.enqueue(this.book.opened),\n (this.starting = new s.defer()),\n (this.started = this.starting.promise),\n this.q.enqueue(this.start);\n }\n setManager(t) {\n this.manager = t;\n }\n requireManager(t) {\n return \"string\" == typeof t && \"default\" === t\n ? v.a\n : \"string\" == typeof t && \"continuous\" === t\n ? y.a\n : t;\n }\n requireView(t) {\n return \"string\" == typeof t && \"iframe\" === t ? m.a : t;\n }\n start() {\n switch (\n (this.settings.layout ||\n (\"pre-paginated\" !== this.book.package.metadata.layout &&\n \"true\" !== this.book.displayOptions.fixedLayout) ||\n (this.settings.layout = \"pre-paginated\"),\n this.book.package.metadata.spread)\n ) {\n case \"none\":\n this.settings.spread = \"none\";\n break;\n case \"both\":\n this.settings.spread = !0;\n }\n this.manager ||\n ((this.ViewManager = this.requireManager(this.settings.manager)),\n (this.View = this.requireView(this.settings.view)),\n (this.manager = new this.ViewManager({\n view: this.View,\n queue: this.q,\n request: this.book.load.bind(this.book),\n settings: this.settings,\n }))),\n this.direction(\n this.book.package.metadata.direction ||\n this.settings.defaultDirection,\n ),\n (this.settings.globalLayoutProperties =\n this.determineLayoutProperties(this.book.package.metadata)),\n this.flow(this.settings.globalLayoutProperties.flow),\n this.layout(this.settings.globalLayoutProperties),\n this.manager.on(l.c.MANAGERS.ADDED, this.afterDisplayed.bind(this)),\n this.manager.on(l.c.MANAGERS.REMOVED, this.afterRemoved.bind(this)),\n this.manager.on(l.c.MANAGERS.RESIZED, this.onResized.bind(this)),\n this.manager.on(\n l.c.MANAGERS.ORIENTATION_CHANGE,\n this.onOrientationChange.bind(this),\n ),\n this.manager.on(\n l.c.MANAGERS.SCROLLED,\n this.reportLocation.bind(this),\n ),\n this.emit(l.c.RENDITION.STARTED),\n this.starting.resolve();\n }\n attachTo(t) {\n return this.q.enqueue(\n function () {\n this.manager.render(t, {\n width: this.settings.width,\n height: this.settings.height,\n }),\n this.emit(l.c.RENDITION.ATTACHED);\n }.bind(this),\n );\n }\n display(t) {\n return (\n this.displaying && this.displaying.resolve(),\n this.q.enqueue(this._display, t)\n );\n }\n _display(t) {\n if (this.book) {\n this.epubcfi.isCfiString(t);\n var e,\n i = new s.defer(),\n n = i.promise;\n return (\n (this.displaying = i),\n this.book.locations.length() &&\n Object(s.isFloat)(t) &&\n (t = this.book.locations.cfiFromPercentage(parseFloat(t))),\n (e = this.book.spine.get(t))\n ? (this.manager.display(e, t).then(\n () => {\n i.resolve(e),\n (this.displaying = void 0),\n this.emit(l.c.RENDITION.DISPLAYED, e),\n this.reportLocation();\n },\n (t) => {\n this.emit(l.c.RENDITION.DISPLAY_ERROR, t);\n },\n ),\n n)\n : (i.reject(new Error(\"No Section Found\")), n)\n );\n }\n }\n afterDisplayed(t) {\n t.on(l.c.VIEWS.MARK_CLICKED, (e, i) =>\n this.triggerMarkEvent(e, i, t.contents),\n ),\n this.hooks.render.trigger(t, this).then(() => {\n t.contents\n ? this.hooks.content.trigger(t.contents, this).then(() => {\n this.emit(l.c.RENDITION.RENDERED, t.section, t);\n })\n : this.emit(l.c.RENDITION.RENDERED, t.section, t);\n });\n }\n afterRemoved(t) {\n this.hooks.unloaded.trigger(t, this).then(() => {\n this.emit(l.c.RENDITION.REMOVED, t.section, t);\n });\n }\n onResized(t, e) {\n this.emit(\n l.c.RENDITION.RESIZED,\n { width: t.width, height: t.height },\n e,\n ),\n this.location &&\n this.location.start &&\n this.display(e || this.location.start.cfi);\n }\n onOrientationChange(t) {\n this.emit(l.c.RENDITION.ORIENTATION_CHANGE, t);\n }\n moveTo(t) {\n this.manager.moveTo(t);\n }\n resize(t, e, i) {\n t && (this.settings.width = t),\n e && (this.settings.height = e),\n this.manager.resize(t, e, i);\n }\n clear() {\n this.manager.clear();\n }\n next() {\n return this.q\n .enqueue(this.manager.next.bind(this.manager))\n .then(this.reportLocation.bind(this));\n }\n prev() {\n return this.q\n .enqueue(this.manager.prev.bind(this.manager))\n .then(this.reportLocation.bind(this));\n }\n determineLayoutProperties(t) {\n var e = this.settings.layout || t.layout || \"reflowable\",\n i = this.settings.spread || t.spread || \"auto\",\n n = this.settings.orientation || t.orientation || \"auto\",\n r = this.settings.flow || t.flow || \"auto\",\n s = t.viewport || \"\",\n o = this.settings.minSpreadWidth || t.minSpreadWidth || 800,\n a = this.settings.direction || t.direction || \"ltr\";\n return (\n (0 === this.settings.width || this.settings.width > 0) &&\n (0 === this.settings.height || this.settings.height),\n {\n layout: e,\n spread: i,\n orientation: n,\n flow: r,\n viewport: s,\n minSpreadWidth: o,\n direction: a,\n }\n );\n }\n flow(t) {\n var e = t;\n (\"scrolled\" !== t &&\n \"scrolled-doc\" !== t &&\n \"scrolled-continuous\" !== t) ||\n (e = \"scrolled\"),\n (\"auto\" !== t && \"paginated\" !== t) || (e = \"paginated\"),\n (this.settings.flow = t),\n this._layout && this._layout.flow(e),\n this.manager &&\n this._layout &&\n this.manager.applyLayout(this._layout),\n this.manager && this.manager.updateFlow(e),\n this.manager &&\n this.manager.isRendered() &&\n this.location &&\n (this.manager.clear(), this.display(this.location.start.cfi));\n }\n layout(t) {\n return (\n t &&\n ((this._layout = new u(t)),\n this._layout.spread(t.spread, this.settings.minSpreadWidth),\n this._layout.on(l.c.LAYOUT.UPDATED, (t, e) => {\n this.emit(l.c.RENDITION.LAYOUT, t, e);\n })),\n this.manager &&\n this._layout &&\n this.manager.applyLayout(this._layout),\n this._layout\n );\n }\n spread(t, e) {\n (this.settings.spread = t),\n e && (this.settings.minSpreadWidth = e),\n this._layout && this._layout.spread(t, e),\n this.manager &&\n this.manager.isRendered() &&\n this.manager.updateLayout();\n }\n direction(t) {\n (this.settings.direction = t || \"ltr\"),\n this.manager && this.manager.direction(this.settings.direction),\n this.manager &&\n this.manager.isRendered() &&\n this.location &&\n (this.manager.clear(), this.display(this.location.start.cfi));\n }\n reportLocation() {\n return this.q.enqueue(\n function () {\n requestAnimationFrame(\n function () {\n var t = this.manager.currentLocation();\n if (t && t.then && \"function\" == typeof t.then)\n t.then(\n function (t) {\n let e = this.located(t);\n e &&\n e.start &&\n e.end &&\n ((this.location = e),\n this.emit(l.c.RENDITION.LOCATION_CHANGED, {\n index: this.location.start.index,\n href: this.location.start.href,\n start: this.location.start.cfi,\n end: this.location.end.cfi,\n percentage: this.location.start.percentage,\n }),\n this.emit(l.c.RENDITION.RELOCATED, this.location));\n }.bind(this),\n );\n else if (t) {\n let e = this.located(t);\n if (!e || !e.start || !e.end) return;\n (this.location = e),\n this.emit(l.c.RENDITION.LOCATION_CHANGED, {\n index: this.location.start.index,\n href: this.location.start.href,\n start: this.location.start.cfi,\n end: this.location.end.cfi,\n percentage: this.location.start.percentage,\n }),\n this.emit(l.c.RENDITION.RELOCATED, this.location);\n }\n }.bind(this),\n );\n }.bind(this),\n );\n }\n currentLocation() {\n var t = this.manager.currentLocation();\n if (t && t.then && \"function\" == typeof t.then)\n t.then(\n function (t) {\n return this.located(t);\n }.bind(this),\n );\n else if (t) {\n return this.located(t);\n }\n }\n located(t) {\n if (!t.length) return {};\n let e = t[0],\n i = t[t.length - 1],\n n = {\n start: {\n index: e.index,\n href: e.href,\n cfi: e.mapping.start,\n displayed: { page: e.pages[0] || 1, total: e.totalPages },\n },\n end: {\n index: i.index,\n href: i.href,\n cfi: i.mapping.end,\n displayed: {\n page: i.pages[i.pages.length - 1] || 1,\n total: i.totalPages,\n },\n },\n },\n r = this.book.locations.locationFromCfi(e.mapping.start),\n s = this.book.locations.locationFromCfi(i.mapping.end);\n null != r &&\n ((n.start.location = r),\n (n.start.percentage =\n this.book.locations.percentageFromLocation(r))),\n null != s &&\n ((n.end.location = s),\n (n.end.percentage =\n this.book.locations.percentageFromLocation(s)));\n let o = this.book.pageList.pageFromCfi(e.mapping.start),\n a = this.book.pageList.pageFromCfi(i.mapping.end);\n return (\n -1 != o && (n.start.page = o),\n -1 != a && (n.end.page = a),\n i.index === this.book.spine.last().index &&\n n.end.displayed.page >= n.end.displayed.total &&\n (n.atEnd = !0),\n e.index === this.book.spine.first().index &&\n 1 === n.start.displayed.page &&\n (n.atStart = !0),\n n\n );\n }\n destroy() {\n this.manager && this.manager.destroy(), (this.book = void 0);\n }\n passEvents(t) {\n l.a.forEach((e) => {\n t.on(e, (e) => this.triggerViewEvent(e, t));\n }),\n t.on(l.c.CONTENTS.SELECTED, (e) => this.triggerSelectedEvent(e, t));\n }\n triggerViewEvent(t, e) {\n this.emit(t.type, t, e);\n }\n triggerSelectedEvent(t, e) {\n this.emit(l.c.RENDITION.SELECTED, t, e);\n }\n triggerMarkEvent(t, e, i) {\n this.emit(l.c.RENDITION.MARK_CLICKED, t, e, i);\n }\n getRange(t, e) {\n var i = new a.a(t),\n n = this.manager.visible().filter(function (t) {\n if (i.spinePos === t.index) return !0;\n });\n if (n.length) return n[0].contents.range(i, e);\n }\n adjustImages(t) {\n if (\"pre-paginated\" === this._layout.name)\n return new Promise(function (t) {\n t();\n });\n let e = t.window.getComputedStyle(t.content, null),\n i =\n 0.95 *\n (t.content.offsetHeight -\n (parseFloat(e.paddingTop) + parseFloat(e.paddingBottom))),\n n = parseFloat(e.paddingLeft) + parseFloat(e.paddingRight);\n return (\n t.addStylesheetRules({\n img: {\n \"max-width\":\n (this._layout.columnWidth\n ? this._layout.columnWidth - n + \"px\"\n : \"100%\") + \"!important\",\n \"max-height\": i + \"px!important\",\n \"object-fit\": \"contain\",\n \"page-break-inside\": \"avoid\",\n \"break-inside\": \"avoid\",\n \"box-sizing\": \"border-box\",\n },\n svg: {\n \"max-width\":\n (this._layout.columnWidth\n ? this._layout.columnWidth - n + \"px\"\n : \"100%\") + \"!important\",\n \"max-height\": i + \"px!important\",\n \"page-break-inside\": \"avoid\",\n \"break-inside\": \"avoid\",\n },\n }),\n new Promise(function (t, e) {\n setTimeout(function () {\n t();\n }, 1);\n })\n );\n }\n getContents() {\n return this.manager ? this.manager.getContents() : [];\n }\n views() {\n return (this.manager ? this.manager.views : void 0) || [];\n }\n handleLinks(t) {\n t &&\n t.on(l.c.CONTENTS.LINK_CLICKED, (t) => {\n let e = this.book.path.relative(t);\n this.display(e);\n });\n }\n injectStylesheet(t, e) {\n let i = t.createElement(\"link\");\n i.setAttribute(\"type\", \"text/css\"),\n i.setAttribute(\"rel\", \"stylesheet\"),\n i.setAttribute(\"href\", this.settings.stylesheet),\n t.getElementsByTagName(\"head\")[0].appendChild(i);\n }\n injectScript(t, e) {\n let i = t.createElement(\"script\");\n i.setAttribute(\"type\", \"text/javascript\"),\n i.setAttribute(\"src\", this.settings.script),\n (i.textContent = \" \"),\n t.getElementsByTagName(\"head\")[0].appendChild(i);\n }\n injectIdentifier(t, e) {\n let i = this.book.packaging.metadata.identifier,\n n = t.createElement(\"meta\");\n n.setAttribute(\"name\", \"dc.relation.ispartof\"),\n i && n.setAttribute(\"content\", i),\n t.getElementsByTagName(\"head\")[0].appendChild(n);\n }\n }\n r()(b.prototype);\n e.a = b;\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(85)();\n t.exports = function (t) {\n return t !== n && null !== t;\n };\n },\n function (t, e, i) {\n var n = i(9),\n r = i(51).f,\n s = i(20),\n o = i(38),\n a = i(35),\n h = i(106),\n l = i(113);\n t.exports = function (t, e) {\n var i,\n c,\n u,\n d,\n f,\n p = t.target,\n g = t.global,\n m = t.stat;\n if ((i = g ? n : m ? n[p] || a(p, {}) : (n[p] || {}).prototype))\n for (c in e) {\n if (\n ((d = e[c]),\n (u = t.noTargetGet ? (f = r(i, c)) && f.value : i[c]),\n !l(g ? c : p + (m ? \".\" : \"#\") + c, t.forced) && void 0 !== u)\n ) {\n if (typeof d == typeof u) continue;\n h(d, u);\n }\n (t.sham || (u && u.sham)) && s(d, \"sham\", !0), o(i, c, d, t);\n }\n };\n },\n function (t, e) {\n t.exports = function (t, e) {\n return {\n enumerable: !(1 & t),\n configurable: !(2 & t),\n writable: !(4 & t),\n value: e,\n };\n };\n },\n function (t, e) {\n t.exports = !1;\n },\n function (t, e, i) {\n var n = i(9),\n r = i(35),\n s = n[\"__core-js_shared__\"] || r(\"__core-js_shared__\", {});\n t.exports = s;\n },\n function (t, e, i) {\n var n = i(9);\n t.exports = function (t, e) {\n try {\n Object.defineProperty(n, t, {\n value: e,\n configurable: !0,\n writable: !0,\n });\n } catch (i) {\n n[t] = e;\n }\n return e;\n };\n },\n function (t, e, i) {\n var n = i(54);\n t.exports = function (t) {\n return Object(n(t));\n };\n },\n function (t, e, i) {\n var n = i(9),\n r = i(18),\n s = n.document,\n o = r(s) && r(s.createElement);\n t.exports = function (t) {\n return o ? s.createElement(t) : {};\n };\n },\n function (t, e, i) {\n var n = i(9),\n r = i(7),\n s = i(12),\n o = i(20),\n a = i(35),\n h = i(62),\n l = i(63),\n c = i(64).CONFIGURABLE,\n u = l.get,\n d = l.enforce,\n f = String(String).split(\"String\");\n (t.exports = function (t, e, i, h) {\n var l,\n u = !!h && !!h.unsafe,\n p = !!h && !!h.enumerable,\n g = !!h && !!h.noTargetGet,\n m = h && void 0 !== h.name ? h.name : e;\n r(i) &&\n (\"Symbol(\" === String(m).slice(0, 7) &&\n (m = \"[\" + String(m).replace(/^Symbol\\(([^)]*)\\)/, \"$1\") + \"]\"),\n (!s(i, \"name\") || (c && i.name !== m)) && o(i, \"name\", m),\n (l = d(i)).source ||\n (l.source = f.join(\"string\" == typeof m ? m : \"\"))),\n t !== n\n ? (u ? !g && t[e] && (p = !0) : delete t[e],\n p ? (t[e] = i) : o(t, e, i))\n : p\n ? (t[e] = i)\n : a(e, i);\n })(Function.prototype, \"toString\", function () {\n return (r(this) && u(this).source) || h(this);\n });\n },\n function (t, e, i) {\n var n = i(59),\n r = i(60),\n s = n(\"keys\");\n t.exports = function (t) {\n return s[t] || (s[t] = r(t));\n };\n },\n function (t, e) {\n t.exports = {};\n },\n function (t, e) {\n t.exports = [\n \"constructor\",\n \"hasOwnProperty\",\n \"isPrototypeOf\",\n \"propertyIsEnumerable\",\n \"toLocaleString\",\n \"toString\",\n \"valueOf\",\n ];\n },\n function (t, e, i) {\n var n,\n r = i(22),\n s = i(118),\n o = i(41),\n a = i(40),\n h = i(119),\n l = i(37),\n c = i(39),\n u = c(\"IE_PROTO\"),\n d = function () {},\n f = function (t) {\n return \"<script>\" + t + \"</script>\";\n },\n p = function (t) {\n t.write(f(\"\")), t.close();\n var e = t.parentWindow.Object;\n return (t = null), e;\n },\n g = function () {\n try {\n n = new ActiveXObject(\"htmlfile\");\n } catch (t) {}\n var t, e;\n g =\n \"undefined\" != typeof document\n ? document.domain && n\n ? p(n)\n : (((e = l(\"iframe\")).style.display = \"none\"),\n h.appendChild(e),\n (e.src = String(\"javascript:\")),\n (t = e.contentWindow.document).open(),\n t.write(f(\"document.F=Object\")),\n t.close(),\n t.F)\n : p(n);\n for (var i = o.length; i--; ) delete g.prototype[o[i]];\n return g();\n };\n (a[u] = !0),\n (t.exports =\n Object.create ||\n function (t, e) {\n var i;\n return (\n null !== t\n ? ((d.prototype = r(t)),\n (i = new d()),\n (d.prototype = null),\n (i[u] = t))\n : (i = g()),\n void 0 === e ? i : s(i, e)\n );\n });\n },\n function (t, e) {\n t.exports = {};\n },\n function (t, e) {\n t.exports = function (t) {\n var e = typeof t;\n return null != t && (\"object\" == e || \"function\" == e);\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(3),\n r = i.n(n),\n s = i(0),\n o = i(2),\n a = i(23),\n h = i(1),\n l = i(24);\n class c {\n constructor(t, e) {\n (this.settings = Object(s.extend)(\n {\n ignoreClass: \"\",\n axis: void 0,\n direction: void 0,\n width: 0,\n height: 0,\n layout: void 0,\n globalLayoutProperties: {},\n method: void 0,\n forceRight: !1,\n allowScriptedContent: !1,\n allowPopups: !1,\n },\n e || {},\n )),\n (this.id = \"epubjs-view-\" + Object(s.uuid)()),\n (this.section = t),\n (this.index = t.index),\n (this.element = this.container(this.settings.axis)),\n (this.added = !1),\n (this.displayed = !1),\n (this.rendered = !1),\n (this.fixedWidth = 0),\n (this.fixedHeight = 0),\n (this.epubcfi = new o.a()),\n (this.layout = this.settings.layout),\n (this.pane = void 0),\n (this.highlights = {}),\n (this.underlines = {}),\n (this.marks = {});\n }\n container(t) {\n var e = document.createElement(\"div\");\n return (\n e.classList.add(\"epub-view\"),\n (e.style.height = \"0px\"),\n (e.style.width = \"0px\"),\n (e.style.overflow = \"hidden\"),\n (e.style.position = \"relative\"),\n (e.style.display = \"block\"),\n (e.style.flex = t && \"horizontal\" == t ? \"none\" : \"initial\"),\n e\n );\n }\n create() {\n return (\n this.iframe ||\n (this.element || (this.element = this.createContainer()),\n (this.iframe = document.createElement(\"iframe\")),\n (this.iframe.id = this.id),\n (this.iframe.scrolling = \"no\"),\n (this.iframe.style.overflow = \"hidden\"),\n (this.iframe.seamless = \"seamless\"),\n (this.iframe.style.border = \"none\"),\n (this.iframe.sandbox = \"allow-same-origin\"),\n this.settings.allowScriptedContent &&\n (this.iframe.sandbox += \" allow-scripts\"),\n this.settings.allowPopups &&\n (this.iframe.sandbox += \" allow-popups\"),\n this.iframe.setAttribute(\"enable-annotation\", \"true\"),\n (this.resizing = !0),\n (this.element.style.visibility = \"hidden\"),\n (this.iframe.style.visibility = \"hidden\"),\n (this.iframe.style.width = \"0\"),\n (this.iframe.style.height = \"0\"),\n (this._width = 0),\n (this._height = 0),\n this.element.setAttribute(\"ref\", this.index),\n (this.added = !0),\n (this.elementBounds = Object(s.bounds)(this.element)),\n \"srcdoc\" in this.iframe\n ? (this.supportsSrcdoc = !0)\n : (this.supportsSrcdoc = !1),\n this.settings.method ||\n (this.settings.method = this.supportsSrcdoc\n ? \"srcdoc\"\n : \"write\")),\n this.iframe\n );\n }\n render(t, e) {\n return (\n this.create(),\n this.size(),\n this.sectionRender || (this.sectionRender = this.section.render(t)),\n this.sectionRender\n .then(\n function (t) {\n return this.load(t);\n }.bind(this),\n )\n .then(\n function () {\n let t,\n e = this.contents.writingMode();\n return (\n (t =\n \"scrolled\" === this.settings.flow\n ? 0 === e.indexOf(\"vertical\")\n ? \"horizontal\"\n : \"vertical\"\n : 0 === e.indexOf(\"vertical\")\n ? \"vertical\"\n : \"horizontal\"),\n 0 === e.indexOf(\"vertical\") &&\n \"paginated\" === this.settings.flow &&\n (this.layout.delta = this.layout.height),\n this.setAxis(t),\n this.emit(h.c.VIEWS.AXIS, t),\n this.setWritingMode(e),\n this.emit(h.c.VIEWS.WRITING_MODE, e),\n this.layout.format(this.contents, this.section, this.axis),\n this.addListeners(),\n new Promise((t, e) => {\n this.expand(),\n this.settings.forceRight &&\n (this.element.style.marginLeft = this.width() + \"px\"),\n t();\n })\n );\n }.bind(this),\n function (t) {\n return (\n this.emit(h.c.VIEWS.LOAD_ERROR, t),\n new Promise((e, i) => {\n i(t);\n })\n );\n }.bind(this),\n )\n .then(\n function () {\n this.emit(h.c.VIEWS.RENDERED, this.section);\n }.bind(this),\n )\n );\n }\n reset() {\n this.iframe &&\n ((this.iframe.style.width = \"0\"),\n (this.iframe.style.height = \"0\"),\n (this._width = 0),\n (this._height = 0),\n (this._textWidth = void 0),\n (this._contentWidth = void 0),\n (this._textHeight = void 0),\n (this._contentHeight = void 0)),\n (this._needsReframe = !0);\n }\n size(t, e) {\n var i = t || this.settings.width,\n n = e || this.settings.height;\n \"pre-paginated\" === this.layout.name\n ? this.lock(\"both\", i, n)\n : \"horizontal\" === this.settings.axis\n ? this.lock(\"height\", i, n)\n : this.lock(\"width\", i, n),\n (this.settings.width = i),\n (this.settings.height = n);\n }\n lock(t, e, i) {\n var n,\n r = Object(s.borders)(this.element);\n (n = this.iframe\n ? Object(s.borders)(this.iframe)\n : { width: 0, height: 0 }),\n \"width\" == t &&\n Object(s.isNumber)(e) &&\n (this.lockedWidth = e - r.width - n.width),\n \"height\" == t &&\n Object(s.isNumber)(i) &&\n (this.lockedHeight = i - r.height - n.height),\n \"both\" === t &&\n Object(s.isNumber)(e) &&\n Object(s.isNumber)(i) &&\n ((this.lockedWidth = e - r.width - n.width),\n (this.lockedHeight = i - r.height - n.height)),\n this.displayed && this.iframe && this.expand();\n }\n expand(t) {\n var e,\n i = this.lockedWidth,\n n = this.lockedHeight;\n this.iframe &&\n !this._expanding &&\n ((this._expanding = !0),\n \"pre-paginated\" === this.layout.name\n ? ((i = this.layout.columnWidth), (n = this.layout.height))\n : \"horizontal\" === this.settings.axis\n ? ((i = this.contents.textWidth()) % this.layout.pageWidth >\n 0 &&\n (i =\n Math.ceil(i / this.layout.pageWidth) *\n this.layout.pageWidth),\n this.settings.forceEvenPages &&\n ((e = i / this.layout.pageWidth),\n this.layout.divisor > 1 &&\n \"reflowable\" === this.layout.name &&\n e % 2 > 0 &&\n (i += this.layout.pageWidth)))\n : \"vertical\" === this.settings.axis &&\n ((n = this.contents.textHeight()),\n \"paginated\" === this.settings.flow &&\n n % this.layout.height > 0 &&\n (n =\n Math.ceil(n / this.layout.height) * this.layout.height)),\n (this._needsReframe || i != this._width || n != this._height) &&\n this.reframe(i, n),\n (this._expanding = !1));\n }\n reframe(t, e) {\n var i;\n Object(s.isNumber)(t) &&\n ((this.element.style.width = t + \"px\"),\n (this.iframe.style.width = t + \"px\"),\n (this._width = t)),\n Object(s.isNumber)(e) &&\n ((this.element.style.height = e + \"px\"),\n (this.iframe.style.height = e + \"px\"),\n (this._height = e)),\n (i = {\n width: t,\n height: e,\n widthDelta: this.prevBounds ? t - this.prevBounds.width : t,\n heightDelta: this.prevBounds ? e - this.prevBounds.height : e,\n }),\n this.pane && this.pane.render(),\n requestAnimationFrame(() => {\n let t;\n for (let e in this.marks)\n this.marks.hasOwnProperty(e) &&\n ((t = this.marks[e]), this.placeMark(t.element, t.range));\n }),\n this.onResize(this, i),\n this.emit(h.c.VIEWS.RESIZED, i),\n (this.prevBounds = i),\n (this.elementBounds = Object(s.bounds)(this.element));\n }\n load(t) {\n var e = new s.defer(),\n i = e.promise;\n if (!this.iframe)\n return e.reject(new Error(\"No Iframe Available\")), i;\n if (\n ((this.iframe.onload = function (t) {\n this.onLoad(t, e);\n }.bind(this)),\n \"blobUrl\" === this.settings.method)\n )\n (this.blobUrl = Object(s.createBlobUrl)(\n t,\n \"application/xhtml+xml\",\n )),\n (this.iframe.src = this.blobUrl),\n this.element.appendChild(this.iframe);\n else if (\"srcdoc\" === this.settings.method)\n (this.iframe.srcdoc = t), this.element.appendChild(this.iframe);\n else {\n if (\n (this.element.appendChild(this.iframe),\n (this.document = this.iframe.contentDocument),\n !this.document)\n )\n return e.reject(new Error(\"No Document Available\")), i;\n if (\n (this.iframe.contentDocument.open(),\n window.MSApp && MSApp.execUnsafeLocalFunction)\n ) {\n var n = this;\n MSApp.execUnsafeLocalFunction(function () {\n n.iframe.contentDocument.write(t);\n });\n } else this.iframe.contentDocument.write(t);\n this.iframe.contentDocument.close();\n }\n return i;\n }\n onLoad(t, e) {\n (this.window = this.iframe.contentWindow),\n (this.document = this.iframe.contentDocument),\n (this.contents = new a.a(\n this.document,\n this.document.body,\n this.section.cfiBase,\n this.section.index,\n )),\n (this.rendering = !1);\n var i = this.document.querySelector(\"link[rel='canonical']\");\n i\n ? i.setAttribute(\"href\", this.section.canonical)\n : ((i = this.document.createElement(\"link\")).setAttribute(\n \"rel\",\n \"canonical\",\n ),\n i.setAttribute(\"href\", this.section.canonical),\n this.document.querySelector(\"head\").appendChild(i)),\n this.contents.on(h.c.CONTENTS.EXPAND, () => {\n this.displayed &&\n this.iframe &&\n (this.expand(),\n this.contents && this.layout.format(this.contents));\n }),\n this.contents.on(h.c.CONTENTS.RESIZE, (t) => {\n this.displayed &&\n this.iframe &&\n (this.expand(),\n this.contents && this.layout.format(this.contents));\n }),\n e.resolve(this.contents);\n }\n setLayout(t) {\n (this.layout = t),\n this.contents && (this.layout.format(this.contents), this.expand());\n }\n setAxis(t) {\n (this.settings.axis = t),\n (this.element.style.flex = \"horizontal\" == t ? \"none\" : \"initial\"),\n this.size();\n }\n setWritingMode(t) {\n this.writingMode = t;\n }\n addListeners() {}\n removeListeners(t) {}\n display(t) {\n var e = new s.defer();\n return (\n this.displayed\n ? e.resolve(this)\n : this.render(t).then(\n function () {\n this.emit(h.c.VIEWS.DISPLAYED, this),\n this.onDisplayed(this),\n (this.displayed = !0),\n e.resolve(this);\n }.bind(this),\n function (t) {\n e.reject(t, this);\n },\n ),\n e.promise\n );\n }\n show() {\n (this.element.style.visibility = \"visible\"),\n this.iframe &&\n ((this.iframe.style.visibility = \"visible\"),\n (this.iframe.style.transform = \"translateZ(0)\"),\n this.iframe.offsetWidth,\n (this.iframe.style.transform = null)),\n this.emit(h.c.VIEWS.SHOWN, this);\n }\n hide() {\n (this.element.style.visibility = \"hidden\"),\n (this.iframe.style.visibility = \"hidden\"),\n (this.stopExpanding = !0),\n this.emit(h.c.VIEWS.HIDDEN, this);\n }\n offset() {\n return { top: this.element.offsetTop, left: this.element.offsetLeft };\n }\n width() {\n return this._width;\n }\n height() {\n return this._height;\n }\n position() {\n return this.element.getBoundingClientRect();\n }\n locationOf(t) {\n this.iframe.getBoundingClientRect();\n var e = this.contents.locationOf(t, this.settings.ignoreClass);\n return { left: e.left, top: e.top };\n }\n onDisplayed(t) {}\n onResize(t, e) {}\n bounds(t) {\n return (\n (!t && this.elementBounds) ||\n (this.elementBounds = Object(s.bounds)(this.element)),\n this.elementBounds\n );\n }\n highlight(t, e = {}, i, n = \"epubjs-hl\", r = {}, s = \"\") {\n if (!this.contents) return;\n const o = Object.assign(\n {\n fill: \"yellow\",\n \"fill-opacity\": \"0.3\",\n \"mix-blend-mode\": \"multiply\",\n },\n r,\n );\n let a = this.contents.range(t),\n c = () => {\n this.emit(h.c.VIEWS.MARK_CLICKED, t, e);\n };\n (e.epubcfi = t),\n this.pane || (this.pane = new l.Pane(this.iframe, this.element));\n let u = new l.Highlight(a, n, e, o),\n d = this.pane.addMark(u);\n return (\n (this.highlights[t] = {\n mark: d,\n element: d.element,\n listeners: [c, i],\n cfiRangeText: s,\n }),\n d.element.setAttribute(\"ref\", n),\n d.element.addEventListener(\"click\", c),\n i && d.element.addEventListener(\"click\", i),\n d\n );\n }\n underline(t, e = {}, i, n = \"epubjs-ul\", r = {}, s = \"\") {\n if (!this.contents) return;\n const o = Object.assign(\n {\n stroke: \"black\",\n \"stroke-opacity\": \"0.3\",\n \"mix-blend-mode\": \"multiply\",\n },\n r,\n );\n let a = this.contents.range(t),\n c = () => {\n this.emit(h.c.VIEWS.MARK_CLICKED, t, e);\n };\n (e.epubcfi = t),\n this.pane || (this.pane = new l.Pane(this.iframe, this.element));\n let u = new l.Underline(a, n, e, o),\n d = this.pane.addMark(u);\n return (\n (this.underlines[t] = {\n mark: d,\n element: d.element,\n listeners: [c, i],\n cfiRangeText: s,\n }),\n d.element.setAttribute(\"ref\", n),\n d.element.addEventListener(\"click\", c),\n i && d.element.addEventListener(\"click\", i),\n d\n );\n }\n mark(t, e = {}, i, n = \"epubjs-mk\", r = {}, s = \"\") {\n if (!this.contents) return;\n if (t in this.marks) {\n return this.marks[t];\n }\n let o = this.contents.range(t);\n if (!o) return;\n let a = o.commonAncestorContainer,\n l = 1 === a.nodeType ? a : a.parentNode,\n c = (i) => {\n this.emit(h.c.VIEWS.MARK_CLICKED, t, e);\n };\n o.collapsed && 1 === a.nodeType\n ? ((o = new Range()), o.selectNodeContents(a))\n : o.collapsed && ((o = new Range()), o.selectNodeContents(l));\n let u = this.document.createElement(\"a\");\n return (\n u.setAttribute(\"ref\", n),\n (u.style = r),\n (u.style.position = \"absolute\"),\n (u.dataset.epubcfi = t),\n e &&\n Object.keys(e).forEach((t) => {\n u.dataset[t] = e[t];\n }),\n i && u.addEventListener(\"click\", i),\n u.addEventListener(\"click\", c),\n this.placeMark(u, o),\n this.element.appendChild(u),\n (this.marks[t] = {\n element: u,\n range: o,\n listeners: [c, i],\n cfiRangeText: s,\n }),\n l\n );\n }\n placeMark(t, e) {\n let i, n, r;\n if (\n \"pre-paginated\" === this.layout.name ||\n \"horizontal\" !== this.settings.axis\n ) {\n let t = e.getBoundingClientRect();\n (i = t.top), (n = t.right);\n } else {\n let t,\n o = e.getClientRects();\n for (var s = 0; s != o.length; s++)\n (t = o[s]),\n (!r || t.left < r) &&\n ((r = t.left),\n (n =\n Math.ceil(r / this.layout.props.pageWidth) *\n this.layout.props.pageWidth -\n this.layout.gap / 2),\n (i = t.top));\n }\n (t.style.top = i + \"px\"), (t.style.left = n + \"px\");\n }\n unhighlight(t) {\n let e;\n t in this.highlights &&\n ((e = this.highlights[t]),\n this.pane.removeMark(e.mark),\n e.listeners.forEach((t) => {\n t &&\n (e.element.removeEventListener(\"click\", t),\n e.element.removeEventListener(\"touchstart\", t));\n }),\n delete this.highlights[t]);\n }\n ununderline(t) {\n let e;\n t in this.underlines &&\n ((e = this.underlines[t]),\n this.pane.removeMark(e.mark),\n e.listeners.forEach((t) => {\n t &&\n (e.element.removeEventListener(\"click\", t),\n e.element.removeEventListener(\"touchstart\", t));\n }),\n delete this.underlines[t]);\n }\n unmark(t) {\n let e;\n t in this.marks &&\n ((e = this.marks[t]),\n this.element.removeChild(e.element),\n e.listeners.forEach((t) => {\n t &&\n (e.element.removeEventListener(\"click\", t),\n e.element.removeEventListener(\"touchstart\", t));\n }),\n delete this.marks[t]);\n }\n destroy() {\n for (let t in this.highlights) this.unhighlight(t);\n for (let t in this.underlines) this.ununderline(t);\n for (let t in this.marks) this.unmark(t);\n this.blobUrl && Object(s.revokeBlobUrl)(this.blobUrl),\n this.displayed &&\n ((this.displayed = !1),\n this.removeListeners(),\n this.contents.destroy(),\n (this.stopExpanding = !0),\n this.element.removeChild(this.iframe),\n this.pane && (this.pane.element.remove(), (this.pane = void 0)),\n (this.iframe = void 0),\n (this.contents = void 0),\n (this._textWidth = null),\n (this._textHeight = null),\n (this._width = null),\n (this._height = null));\n }\n }\n r()(c.prototype), (e.a = c);\n },\n function (t, e, i) {\n var n = i(44),\n r = i(129),\n s = i(131),\n o = Math.max,\n a = Math.min;\n t.exports = function (t, e, i) {\n var h,\n l,\n c,\n u,\n d,\n f,\n p = 0,\n g = !1,\n m = !1,\n v = !0;\n if (\"function\" != typeof t) throw new TypeError(\"Expected a function\");\n function y(e) {\n var i = h,\n n = l;\n return (h = l = void 0), (p = e), (u = t.apply(n, i));\n }\n function b(t) {\n return (p = t), (d = setTimeout(x, e)), g ? y(t) : u;\n }\n function w(t) {\n var i = t - f;\n return void 0 === f || i >= e || i < 0 || (m && t - p >= c);\n }\n function x() {\n var t = r();\n if (w(t)) return E(t);\n d = setTimeout(\n x,\n (function (t) {\n var i = e - (t - f);\n return m ? a(i, c - (t - p)) : i;\n })(t),\n );\n }\n function E(t) {\n return (d = void 0), v && h ? y(t) : ((h = l = void 0), u);\n }\n function S() {\n var t = r(),\n i = w(t);\n if (((h = arguments), (l = this), (f = t), i)) {\n if (void 0 === d) return b(f);\n if (m) return clearTimeout(d), (d = setTimeout(x, e)), y(f);\n }\n return void 0 === d && (d = setTimeout(x, e)), u;\n }\n return (\n (e = s(e) || 0),\n n(i) &&\n ((g = !!i.leading),\n (c = (m = \"maxWait\" in i) ? o(s(i.maxWait) || 0, e) : c),\n (v = \"trailing\" in i ? !!i.trailing : v)),\n (S.cancel = function () {\n void 0 !== d && clearTimeout(d), (p = 0), (h = f = l = d = void 0);\n }),\n (S.flush = function () {\n return void 0 === d ? u : E(r());\n }),\n S\n );\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(0),\n r = i(16),\n s = i(1),\n o = i(3),\n a = i.n(o);\n const h = Math.PI / 2,\n l = {\n easeOutSine: function (t) {\n return Math.sin(t * h);\n },\n easeInOutSine: function (t) {\n return -0.5 * (Math.cos(Math.PI * t) - 1);\n },\n easeInOutQuint: function (t) {\n return (t /= 0.5) < 1\n ? 0.5 * Math.pow(t, 5)\n : 0.5 * (Math.pow(t - 2, 5) + 2);\n },\n easeInCubic: function (t) {\n return Math.pow(t, 3);\n },\n };\n class c {\n constructor(t, e) {\n (this.settings = Object(n.extend)(\n {\n duration: 80,\n minVelocity: 0.2,\n minDistance: 10,\n easing: l.easeInCubic,\n },\n e || {},\n )),\n (this.supportsTouch = this.supportsTouch()),\n this.supportsTouch && this.setup(t);\n }\n setup(t) {\n (this.manager = t),\n (this.layout = this.manager.layout),\n (this.fullsize = this.manager.settings.fullsize),\n this.fullsize\n ? ((this.element = this.manager.stage.element),\n (this.scroller = window),\n this.disableScroll())\n : ((this.element = this.manager.stage.container),\n (this.scroller = this.element),\n (this.element.style.WebkitOverflowScrolling = \"touch\")),\n (this.manager.settings.offset = this.layout.width),\n (this.manager.settings.afterScrolledTimeout =\n 2 * this.settings.duration),\n (this.isVertical = \"vertical\" === this.manager.settings.axis),\n this.manager.isPaginated &&\n !this.isVertical &&\n ((this.touchCanceler = !1),\n (this.resizeCanceler = !1),\n (this.snapping = !1),\n this.scrollLeft,\n this.scrollTop,\n (this.startTouchX = void 0),\n (this.startTouchY = void 0),\n (this.startTime = void 0),\n (this.endTouchX = void 0),\n (this.endTouchY = void 0),\n (this.endTime = void 0),\n this.addListeners());\n }\n supportsTouch() {\n return !!(\n \"ontouchstart\" in window ||\n (window.DocumentTouch && document instanceof DocumentTouch)\n );\n }\n disableScroll() {\n this.element.style.overflow = \"hidden\";\n }\n enableScroll() {\n this.element.style.overflow = \"\";\n }\n addListeners() {\n (this._onResize = this.onResize.bind(this)),\n window.addEventListener(\"resize\", this._onResize),\n (this._onScroll = this.onScroll.bind(this)),\n this.scroller.addEventListener(\"scroll\", this._onScroll),\n (this._onTouchStart = this.onTouchStart.bind(this)),\n this.scroller.addEventListener(\"touchstart\", this._onTouchStart, {\n passive: !0,\n }),\n this.on(\"touchstart\", this._onTouchStart),\n (this._onTouchMove = this.onTouchMove.bind(this)),\n this.scroller.addEventListener(\"touchmove\", this._onTouchMove, {\n passive: !0,\n }),\n this.on(\"touchmove\", this._onTouchMove),\n (this._onTouchEnd = this.onTouchEnd.bind(this)),\n this.scroller.addEventListener(\"touchend\", this._onTouchEnd, {\n passive: !0,\n }),\n this.on(\"touchend\", this._onTouchEnd),\n (this._afterDisplayed = this.afterDisplayed.bind(this)),\n this.manager.on(s.c.MANAGERS.ADDED, this._afterDisplayed);\n }\n removeListeners() {\n window.removeEventListener(\"resize\", this._onResize),\n (this._onResize = void 0),\n this.scroller.removeEventListener(\"scroll\", this._onScroll),\n (this._onScroll = void 0),\n this.scroller.removeEventListener(\n \"touchstart\",\n this._onTouchStart,\n { passive: !0 },\n ),\n this.off(\"touchstart\", this._onTouchStart),\n (this._onTouchStart = void 0),\n this.scroller.removeEventListener(\"touchmove\", this._onTouchMove, {\n passive: !0,\n }),\n this.off(\"touchmove\", this._onTouchMove),\n (this._onTouchMove = void 0),\n this.scroller.removeEventListener(\"touchend\", this._onTouchEnd, {\n passive: !0,\n }),\n this.off(\"touchend\", this._onTouchEnd),\n (this._onTouchEnd = void 0),\n this.manager.off(s.c.MANAGERS.ADDED, this._afterDisplayed),\n (this._afterDisplayed = void 0);\n }\n afterDisplayed(t) {\n let e = t.contents;\n [\"touchstart\", \"touchmove\", \"touchend\"].forEach((t) => {\n e.on(t, (t) => this.triggerViewEvent(t, e));\n });\n }\n triggerViewEvent(t, e) {\n this.emit(t.type, t, e);\n }\n onScroll(t) {\n (this.scrollLeft = this.fullsize\n ? window.scrollX\n : this.scroller.scrollLeft),\n (this.scrollTop = this.fullsize\n ? window.scrollY\n : this.scroller.scrollTop);\n }\n onResize(t) {\n this.resizeCanceler = !0;\n }\n onTouchStart(t) {\n let { screenX: e, screenY: i } = t.touches[0];\n this.fullsize && this.enableScroll(),\n (this.touchCanceler = !0),\n this.startTouchX ||\n ((this.startTouchX = e),\n (this.startTouchY = i),\n (this.startTime = this.now())),\n (this.endTouchX = e),\n (this.endTouchY = i),\n (this.endTime = this.now());\n }\n onTouchMove(t) {\n let { screenX: e, screenY: i } = t.touches[0],\n n = Math.abs(i - this.endTouchY);\n (this.touchCanceler = !0),\n !this.fullsize &&\n n < 10 &&\n (this.element.scrollLeft -= e - this.endTouchX),\n (this.endTouchX = e),\n (this.endTouchY = i),\n (this.endTime = this.now());\n }\n onTouchEnd(t) {\n this.fullsize && this.disableScroll(), (this.touchCanceler = !1);\n let e = this.wasSwiped();\n 0 !== e ? this.snap(e) : this.snap(),\n (this.startTouchX = void 0),\n (this.startTouchY = void 0),\n (this.startTime = void 0),\n (this.endTouchX = void 0),\n (this.endTouchY = void 0),\n (this.endTime = void 0);\n }\n wasSwiped() {\n let t = this.layout.pageWidth * this.layout.divisor,\n e = this.endTouchX - this.startTouchX,\n i = Math.abs(e),\n n = e / (this.endTime - this.startTime),\n r = this.settings.minVelocity;\n return i <= this.settings.minDistance || i >= t\n ? 0\n : n > r\n ? -1\n : n < -r\n ? 1\n : void 0;\n }\n needsSnap() {\n return (\n this.scrollLeft % (this.layout.pageWidth * this.layout.divisor) != 0\n );\n }\n snap(t = 0) {\n let e = this.scrollLeft,\n i = this.layout.pageWidth * this.layout.divisor,\n n = Math.round(e / i) * i;\n return t && (n += t * i), this.smoothScrollTo(n);\n }\n smoothScrollTo(t) {\n const e = new n.defer(),\n i = this.scrollLeft,\n r = this.now(),\n s = this.settings.duration,\n o = this.settings.easing;\n return (\n (this.snapping = !0),\n function n() {\n const a = this.now(),\n h = Math.min(1, (a - r) / s);\n if ((o(h), this.touchCanceler || this.resizeCanceler))\n return (\n (this.resizeCanceler = !1),\n (this.snapping = !1),\n void e.resolve()\n );\n h < 1\n ? (window.requestAnimationFrame(n.bind(this)),\n this.scrollTo(i + (t - i) * h, 0))\n : (this.scrollTo(t, 0), (this.snapping = !1), e.resolve());\n }.call(this),\n e.promise\n );\n }\n scrollTo(t = 0, e = 0) {\n this.fullsize\n ? window.scroll(t, e)\n : ((this.scroller.scrollLeft = t), (this.scroller.scrollTop = e));\n }\n now() {\n return \"now\" in window.performance\n ? performance.now()\n : new Date().getTime();\n }\n destroy() {\n this.scroller &&\n (this.fullsize && this.enableScroll(),\n this.removeListeners(),\n (this.scroller = void 0));\n }\n }\n a()(c.prototype);\n var u = c,\n d = i(46),\n f = i.n(d);\n class p extends r.a {\n constructor(t) {\n super(t),\n (this.name = \"continuous\"),\n (this.settings = Object(n.extend)(this.settings || {}, {\n infinite: !0,\n overflow: void 0,\n axis: void 0,\n writingMode: void 0,\n flow: \"scrolled\",\n offset: 500,\n offsetDelta: 250,\n width: void 0,\n height: void 0,\n snap: !1,\n afterScrolledTimeout: 10,\n allowScriptedContent: !1,\n allowPopups: !1,\n })),\n Object(n.extend)(this.settings, t.settings || {}),\n \"undefined\" != t.settings.gap &&\n 0 === t.settings.gap &&\n (this.settings.gap = t.settings.gap),\n (this.viewSettings = {\n ignoreClass: this.settings.ignoreClass,\n axis: this.settings.axis,\n flow: this.settings.flow,\n layout: this.layout,\n width: 0,\n height: 0,\n forceEvenPages: !1,\n allowScriptedContent: this.settings.allowScriptedContent,\n allowPopups: this.settings.allowPopups,\n }),\n (this.scrollTop = 0),\n (this.scrollLeft = 0);\n }\n display(t, e) {\n return r.a.prototype.display.call(this, t, e).then(\n function () {\n return this.fill();\n }.bind(this),\n );\n }\n fill(t) {\n var e = t || new n.defer();\n return (\n this.q\n .enqueue(() => this.check())\n .then((t) => {\n t ? this.fill(e) : e.resolve();\n }),\n e.promise\n );\n }\n moveTo(t) {\n var e = 0,\n i = 0;\n this.isPaginated\n ? ((e = Math.floor(t.left / this.layout.delta) * this.layout.delta),\n this.settings.offsetDelta)\n : ((i = t.top), t.top, this.settings.offsetDelta),\n (e > 0 || i > 0) && this.scrollBy(e, i, !0);\n }\n afterResized(t) {\n this.emit(s.c.MANAGERS.RESIZE, t.section);\n }\n removeShownListeners(t) {\n t.onDisplayed = function () {};\n }\n add(t) {\n var e = this.createView(t);\n return (\n this.views.append(e),\n e.on(s.c.VIEWS.RESIZED, (t) => {\n e.expanded = !0;\n }),\n e.on(s.c.VIEWS.AXIS, (t) => {\n this.updateAxis(t);\n }),\n e.on(s.c.VIEWS.WRITING_MODE, (t) => {\n this.updateWritingMode(t);\n }),\n (e.onDisplayed = this.afterDisplayed.bind(this)),\n (e.onResize = this.afterResized.bind(this)),\n e.display(this.request)\n );\n }\n append(t) {\n var e = this.createView(t);\n return (\n e.on(s.c.VIEWS.RESIZED, (t) => {\n e.expanded = !0;\n }),\n e.on(s.c.VIEWS.AXIS, (t) => {\n this.updateAxis(t);\n }),\n e.on(s.c.VIEWS.WRITING_MODE, (t) => {\n this.updateWritingMode(t);\n }),\n this.views.append(e),\n (e.onDisplayed = this.afterDisplayed.bind(this)),\n e\n );\n }\n prepend(t) {\n var e = this.createView(t);\n return (\n e.on(s.c.VIEWS.RESIZED, (t) => {\n this.counter(t), (e.expanded = !0);\n }),\n e.on(s.c.VIEWS.AXIS, (t) => {\n this.updateAxis(t);\n }),\n e.on(s.c.VIEWS.WRITING_MODE, (t) => {\n this.updateWritingMode(t);\n }),\n this.views.prepend(e),\n (e.onDisplayed = this.afterDisplayed.bind(this)),\n e\n );\n }\n counter(t) {\n \"vertical\" === this.settings.axis\n ? this.scrollBy(0, t.heightDelta, !0)\n : this.scrollBy(t.widthDelta, 0, !0);\n }\n update(t) {\n for (\n var e,\n i = this.bounds(),\n r = this.views.all(),\n s = r.length,\n o = [],\n a = void 0 !== t ? t : this.settings.offset || 0,\n h = new n.defer(),\n l = [],\n c = 0;\n c < s;\n c++\n )\n if (((e = r[c]), !0 === this.isVisible(e, a, a, i))) {\n if (e.displayed) e.show();\n else {\n let t = e.display(this.request).then(\n function (t) {\n t.show();\n },\n (t) => {\n e.hide();\n },\n );\n l.push(t);\n }\n o.push(e);\n } else\n this.q.enqueue(e.destroy.bind(e)),\n clearTimeout(this.trimTimeout),\n (this.trimTimeout = setTimeout(\n function () {\n this.q.enqueue(this.trim.bind(this));\n }.bind(this),\n 250,\n ));\n return l.length\n ? Promise.all(l).catch((t) => {\n h.reject(t);\n })\n : (h.resolve(), h.promise);\n }\n check(t, e) {\n var i = new n.defer(),\n r = [],\n s = \"horizontal\" === this.settings.axis,\n o = this.settings.offset || 0;\n t && s && (o = t), e && !s && (o = e);\n var a = this._bounds;\n let h = s ? this.scrollLeft : this.scrollTop,\n l = s ? Math.floor(a.width) : a.height,\n c = s ? this.container.scrollWidth : this.container.scrollHeight,\n u =\n this.writingMode && 0 === this.writingMode.indexOf(\"vertical\")\n ? \"vertical\"\n : \"horizontal\",\n d = this.settings.rtlScrollType,\n f = \"rtl\" === this.settings.direction;\n this.settings.fullsize\n ? ((s && f && \"negative\" === d) || (!s && f && \"default\" === d)) &&\n (h *= -1)\n : (f && \"default\" === d && \"horizontal\" === u && (h = c - l - h),\n f && \"negative\" === d && \"horizontal\" === u && (h *= -1));\n let p = () => {\n let t = this.views.first(),\n e = t && t.section.prev();\n e && r.push(this.prepend(e));\n },\n g = h - o;\n h + l + o >= c &&\n (() => {\n let t = this.views.last(),\n e = t && t.section.next();\n e && r.push(this.append(e));\n })(),\n g < 0 && p();\n let m = r.map((t) => t.display(this.request));\n return r.length\n ? Promise.all(m)\n .then(() => this.check())\n .then(\n () => this.update(o),\n (t) => t,\n )\n : (this.q.enqueue(\n function () {\n this.update();\n }.bind(this),\n ),\n i.resolve(!1),\n i.promise);\n }\n trim() {\n for (\n var t = new n.defer(),\n e = this.views.displayed(),\n i = e[0],\n r = e[e.length - 1],\n s = this.views.indexOf(i),\n o = this.views.indexOf(r),\n a = this.views.slice(0, s),\n h = this.views.slice(o + 1),\n l = 0;\n l < a.length - 1;\n l++\n )\n this.erase(a[l], a);\n for (var c = 1; c < h.length; c++) this.erase(h[c]);\n return t.resolve(), t.promise;\n }\n erase(t, e) {\n var i, n;\n this.settings.fullsize\n ? ((i = window.scrollY), (n = window.scrollX))\n : ((i = this.container.scrollTop), (n = this.container.scrollLeft));\n var r = t.bounds();\n this.views.remove(t),\n e &&\n (\"vertical\" === this.settings.axis\n ? this.scrollTo(0, i - r.height, !0)\n : \"rtl\" === this.settings.direction\n ? this.settings.fullsize\n ? this.scrollTo(n + Math.floor(r.width), 0, !0)\n : this.scrollTo(n, 0, !0)\n : this.scrollTo(n - Math.floor(r.width), 0, !0));\n }\n addEventListeners(t) {\n window.addEventListener(\n \"unload\",\n function (t) {\n (this.ignore = !0), this.destroy();\n }.bind(this),\n ),\n this.addScrollListeners(),\n this.isPaginated &&\n this.settings.snap &&\n (this.snapper = new u(\n this,\n this.settings.snap &&\n \"object\" == typeof this.settings.snap &&\n this.settings.snap,\n ));\n }\n addScrollListeners() {\n var t;\n this.tick = n.requestAnimationFrame;\n let e =\n \"rtl\" === this.settings.direction &&\n \"default\" === this.settings.rtlScrollType\n ? -1\n : 1;\n (this.scrollDeltaVert = 0),\n (this.scrollDeltaHorz = 0),\n this.settings.fullsize\n ? ((t = window),\n (this.scrollTop = window.scrollY * e),\n (this.scrollLeft = window.scrollX * e))\n : ((t = this.container),\n (this.scrollTop = this.container.scrollTop),\n (this.scrollLeft = this.container.scrollLeft)),\n (this._onScroll = this.onScroll.bind(this)),\n t.addEventListener(\"scroll\", this._onScroll),\n (this._scrolled = f()(this.scrolled.bind(this), 30)),\n (this.didScroll = !1);\n }\n removeEventListeners() {\n (this.settings.fullsize\n ? window\n : this.container\n ).removeEventListener(\"scroll\", this._onScroll),\n (this._onScroll = void 0);\n }\n onScroll() {\n let t,\n e,\n i =\n \"rtl\" === this.settings.direction &&\n \"default\" === this.settings.rtlScrollType\n ? -1\n : 1;\n this.settings.fullsize\n ? ((t = window.scrollY * i), (e = window.scrollX * i))\n : ((t = this.container.scrollTop), (e = this.container.scrollLeft)),\n (this.scrollTop = t),\n (this.scrollLeft = e),\n this.ignore ? (this.ignore = !1) : this._scrolled(),\n (this.scrollDeltaVert += Math.abs(t - this.prevScrollTop)),\n (this.scrollDeltaHorz += Math.abs(e - this.prevScrollLeft)),\n (this.prevScrollTop = t),\n (this.prevScrollLeft = e),\n clearTimeout(this.scrollTimeout),\n (this.scrollTimeout = setTimeout(\n function () {\n (this.scrollDeltaVert = 0), (this.scrollDeltaHorz = 0);\n }.bind(this),\n 150,\n )),\n clearTimeout(this.afterScrolled),\n (this.didScroll = !1);\n }\n scrolled() {\n this.q.enqueue(\n function () {\n return this.check();\n }.bind(this),\n ),\n this.emit(s.c.MANAGERS.SCROLL, {\n top: this.scrollTop,\n left: this.scrollLeft,\n }),\n clearTimeout(this.afterScrolled),\n (this.afterScrolled = setTimeout(\n function () {\n (this.snapper &&\n this.snapper.supportsTouch &&\n this.snapper.needsSnap()) ||\n this.emit(s.c.MANAGERS.SCROLLED, {\n top: this.scrollTop,\n left: this.scrollLeft,\n });\n }.bind(this),\n this.settings.afterScrolledTimeout,\n ));\n }\n next() {\n let t =\n \"pre-paginated\" === this.layout.props.name &&\n this.layout.props.spread\n ? 2 * this.layout.props.delta\n : this.layout.props.delta;\n this.views.length &&\n (this.isPaginated && \"horizontal\" === this.settings.axis\n ? this.scrollBy(t, 0, !0)\n : this.scrollBy(0, this.layout.height, !0),\n this.q.enqueue(\n function () {\n return this.check();\n }.bind(this),\n ));\n }\n prev() {\n let t =\n \"pre-paginated\" === this.layout.props.name &&\n this.layout.props.spread\n ? 2 * this.layout.props.delta\n : this.layout.props.delta;\n this.views.length &&\n (this.isPaginated && \"horizontal\" === this.settings.axis\n ? this.scrollBy(-t, 0, !0)\n : this.scrollBy(0, -this.layout.height, !0),\n this.q.enqueue(\n function () {\n return this.check();\n }.bind(this),\n ));\n }\n updateFlow(t) {\n this.rendered &&\n this.snapper &&\n (this.snapper.destroy(), (this.snapper = void 0)),\n super.updateFlow(t, \"scroll\"),\n this.rendered &&\n this.isPaginated &&\n this.settings.snap &&\n (this.snapper = new u(\n this,\n this.settings.snap &&\n \"object\" == typeof this.settings.snap &&\n this.settings.snap,\n ));\n }\n destroy() {\n super.destroy(), this.snapper && this.snapper.destroy();\n }\n }\n e.a = p;\n },\n function (t, e, i) {\n (function (e) {\n t.exports = (function t(e, i, n) {\n function r(o, a) {\n if (!i[o]) {\n if (!e[o]) {\n if (s) return s(o, !0);\n var h = new Error(\"Cannot find module '\" + o + \"'\");\n throw ((h.code = \"MODULE_NOT_FOUND\"), h);\n }\n var l = (i[o] = { exports: {} });\n e[o][0].call(\n l.exports,\n function (t) {\n var i = e[o][1][t];\n return r(i || t);\n },\n l,\n l.exports,\n t,\n e,\n i,\n n,\n );\n }\n return i[o].exports;\n }\n for (var s = !1, o = 0; o < n.length; o++) r(n[o]);\n return r;\n })(\n {\n 1: [\n function (t, i, n) {\n (function (t) {\n \"use strict\";\n var e,\n n,\n r = t.MutationObserver || t.WebKitMutationObserver;\n if (r) {\n var s = 0,\n o = new r(c),\n a = t.document.createTextNode(\"\");\n o.observe(a, { characterData: !0 }),\n (e = function () {\n a.data = s = ++s % 2;\n });\n } else if (t.setImmediate || void 0 === t.MessageChannel)\n e =\n \"document\" in t &&\n \"onreadystatechange\" in t.document.createElement(\"script\")\n ? function () {\n var e = t.document.createElement(\"script\");\n (e.onreadystatechange = function () {\n c(),\n (e.onreadystatechange = null),\n e.parentNode.removeChild(e),\n (e = null);\n }),\n t.document.documentElement.appendChild(e);\n }\n : function () {\n setTimeout(c, 0);\n };\n else {\n var h = new t.MessageChannel();\n (h.port1.onmessage = c),\n (e = function () {\n h.port2.postMessage(0);\n });\n }\n var l = [];\n function c() {\n var t, e;\n n = !0;\n for (var i = l.length; i; ) {\n for (e = l, l = [], t = -1; ++t < i; ) e[t]();\n i = l.length;\n }\n n = !1;\n }\n i.exports = function (t) {\n 1 !== l.push(t) || n || e();\n };\n }).call(\n this,\n void 0 !== e\n ? e\n : \"undefined\" != typeof self\n ? self\n : \"undefined\" != typeof window\n ? window\n : {},\n );\n },\n {},\n ],\n 2: [\n function (t, e, i) {\n \"use strict\";\n var n = t(1);\n function r() {}\n var s = {},\n o = [\"REJECTED\"],\n a = [\"FULFILLED\"],\n h = [\"PENDING\"];\n function l(t) {\n if (\"function\" != typeof t)\n throw new TypeError(\"resolver must be a function\");\n (this.state = h),\n (this.queue = []),\n (this.outcome = void 0),\n t !== r && f(this, t);\n }\n function c(t, e, i) {\n (this.promise = t),\n \"function\" == typeof e &&\n ((this.onFulfilled = e),\n (this.callFulfilled = this.otherCallFulfilled)),\n \"function\" == typeof i &&\n ((this.onRejected = i),\n (this.callRejected = this.otherCallRejected));\n }\n function u(t, e, i) {\n n(function () {\n var n;\n try {\n n = e(i);\n } catch (e) {\n return s.reject(t, e);\n }\n n === t\n ? s.reject(\n t,\n new TypeError(\"Cannot resolve promise with itself\"),\n )\n : s.resolve(t, n);\n });\n }\n function d(t) {\n var e = t && t.then;\n if (\n t &&\n (\"object\" == typeof t || \"function\" == typeof t) &&\n \"function\" == typeof e\n )\n return function () {\n e.apply(t, arguments);\n };\n }\n function f(t, e) {\n var i = !1;\n function n(e) {\n i || ((i = !0), s.reject(t, e));\n }\n function r(e) {\n i || ((i = !0), s.resolve(t, e));\n }\n var o = p(function () {\n e(r, n);\n });\n \"error\" === o.status && n(o.value);\n }\n function p(t, e) {\n var i = {};\n try {\n (i.value = t(e)), (i.status = \"success\");\n } catch (t) {\n (i.status = \"error\"), (i.value = t);\n }\n return i;\n }\n (e.exports = l),\n (l.prototype.catch = function (t) {\n return this.then(null, t);\n }),\n (l.prototype.then = function (t, e) {\n if (\n (\"function\" != typeof t && this.state === a) ||\n (\"function\" != typeof e && this.state === o)\n )\n return this;\n var i = new this.constructor(r);\n return (\n this.state !== h\n ? u(i, this.state === a ? t : e, this.outcome)\n : this.queue.push(new c(i, t, e)),\n i\n );\n }),\n (c.prototype.callFulfilled = function (t) {\n s.resolve(this.promise, t);\n }),\n (c.prototype.otherCallFulfilled = function (t) {\n u(this.promise, this.onFulfilled, t);\n }),\n (c.prototype.callRejected = function (t) {\n s.reject(this.promise, t);\n }),\n (c.prototype.otherCallRejected = function (t) {\n u(this.promise, this.onRejected, t);\n }),\n (s.resolve = function (t, e) {\n var i = p(d, e);\n if (\"error\" === i.status) return s.reject(t, i.value);\n var n = i.value;\n if (n) f(t, n);\n else {\n (t.state = a), (t.outcome = e);\n for (var r = -1, o = t.queue.length; ++r < o; )\n t.queue[r].callFulfilled(e);\n }\n return t;\n }),\n (s.reject = function (t, e) {\n (t.state = o), (t.outcome = e);\n for (var i = -1, n = t.queue.length; ++i < n; )\n t.queue[i].callRejected(e);\n return t;\n }),\n (l.resolve = function (t) {\n return t instanceof this ? t : s.resolve(new this(r), t);\n }),\n (l.reject = function (t) {\n var e = new this(r);\n return s.reject(e, t);\n }),\n (l.all = function (t) {\n var e = this;\n if (\"[object Array]\" !== Object.prototype.toString.call(t))\n return this.reject(new TypeError(\"must be an array\"));\n var i = t.length,\n n = !1;\n if (!i) return this.resolve([]);\n for (\n var o = new Array(i), a = 0, h = -1, l = new this(r);\n ++h < i;\n\n )\n c(t[h], h);\n return l;\n function c(t, r) {\n e.resolve(t).then(\n function (t) {\n (o[r] = t),\n ++a !== i || n || ((n = !0), s.resolve(l, o));\n },\n function (t) {\n n || ((n = !0), s.reject(l, t));\n },\n );\n }\n }),\n (l.race = function (t) {\n var e = this;\n if (\"[object Array]\" !== Object.prototype.toString.call(t))\n return this.reject(new TypeError(\"must be an array\"));\n var i = t.length,\n n = !1;\n if (!i) return this.resolve([]);\n for (var o, a = -1, h = new this(r); ++a < i; )\n (o = t[a]),\n e.resolve(o).then(\n function (t) {\n n || ((n = !0), s.resolve(h, t));\n },\n function (t) {\n n || ((n = !0), s.reject(h, t));\n },\n );\n return h;\n });\n },\n { 1: 1 },\n ],\n 3: [\n function (t, i, n) {\n (function (e) {\n \"use strict\";\n \"function\" != typeof e.Promise && (e.Promise = t(2));\n }).call(\n this,\n void 0 !== e\n ? e\n : \"undefined\" != typeof self\n ? self\n : \"undefined\" != typeof window\n ? window\n : {},\n );\n },\n { 2: 2 },\n ],\n 4: [\n function (t, e, i) {\n \"use strict\";\n var n =\n \"function\" == typeof Symbol &&\n \"symbol\" == typeof Symbol.iterator\n ? function (t) {\n return typeof t;\n }\n : function (t) {\n return t &&\n \"function\" == typeof Symbol &&\n t.constructor === Symbol &&\n t !== Symbol.prototype\n ? \"symbol\"\n : typeof t;\n },\n r = (function () {\n try {\n if (\"undefined\" != typeof indexedDB) return indexedDB;\n if (\"undefined\" != typeof webkitIndexedDB)\n return webkitIndexedDB;\n if (\"undefined\" != typeof mozIndexedDB)\n return mozIndexedDB;\n if (\"undefined\" != typeof OIndexedDB) return OIndexedDB;\n if (\"undefined\" != typeof msIndexedDB) return msIndexedDB;\n } catch (t) {\n return;\n }\n })();\n function s(t, e) {\n (t = t || []), (e = e || {});\n try {\n return new Blob(t, e);\n } catch (r) {\n if (\"TypeError\" !== r.name) throw r;\n for (\n var i = new (\n \"undefined\" != typeof BlobBuilder\n ? BlobBuilder\n : \"undefined\" != typeof MSBlobBuilder\n ? MSBlobBuilder\n : \"undefined\" != typeof MozBlobBuilder\n ? MozBlobBuilder\n : WebKitBlobBuilder\n )(),\n n = 0;\n n < t.length;\n n += 1\n )\n i.append(t[n]);\n return i.getBlob(e.type);\n }\n }\n \"undefined\" == typeof Promise && t(3);\n var o = Promise;\n function a(t, e) {\n e &&\n t.then(\n function (t) {\n e(null, t);\n },\n function (t) {\n e(t);\n },\n );\n }\n function h(t, e, i) {\n \"function\" == typeof e && t.then(e),\n \"function\" == typeof i && t.catch(i);\n }\n function l(t) {\n return (\n \"string\" != typeof t &&\n (console.warn(\n t + \" used as a key, but it is not a string.\",\n ),\n (t = String(t))),\n t\n );\n }\n function c() {\n if (\n arguments.length &&\n \"function\" == typeof arguments[arguments.length - 1]\n )\n return arguments[arguments.length - 1];\n }\n var u = void 0,\n d = {},\n f = Object.prototype.toString;\n function p(t) {\n return \"boolean\" == typeof u\n ? o.resolve(u)\n : (function (t) {\n return new o(function (e) {\n var i = t.transaction(\n \"local-forage-detect-blob-support\",\n \"readwrite\",\n ),\n n = s([\"\"]);\n i\n .objectStore(\"local-forage-detect-blob-support\")\n .put(n, \"key\"),\n (i.onabort = function (t) {\n t.preventDefault(), t.stopPropagation(), e(!1);\n }),\n (i.oncomplete = function () {\n var t =\n navigator.userAgent.match(/Chrome\\/(\\d+)/),\n i = navigator.userAgent.match(/Edge\\//);\n e(i || !t || parseInt(t[1], 10) >= 43);\n });\n }).catch(function () {\n return !1;\n });\n })(t).then(function (t) {\n return (u = t);\n });\n }\n function g(t) {\n var e = d[t.name],\n i = {};\n (i.promise = new o(function (t, e) {\n (i.resolve = t), (i.reject = e);\n })),\n e.deferredOperations.push(i),\n e.dbReady\n ? (e.dbReady = e.dbReady.then(function () {\n return i.promise;\n }))\n : (e.dbReady = i.promise);\n }\n function m(t) {\n var e = d[t.name].deferredOperations.pop();\n if (e) return e.resolve(), e.promise;\n }\n function v(t, e) {\n var i = d[t.name].deferredOperations.pop();\n if (i) return i.reject(e), i.promise;\n }\n function y(t, e) {\n return new o(function (i, n) {\n if (\n ((d[t.name] = d[t.name] || {\n forages: [],\n db: null,\n dbReady: null,\n deferredOperations: [],\n }),\n t.db)\n ) {\n if (!e) return i(t.db);\n g(t), t.db.close();\n }\n var s = [t.name];\n e && s.push(t.version);\n var o = r.open.apply(r, s);\n e &&\n (o.onupgradeneeded = function (e) {\n var i = o.result;\n try {\n i.createObjectStore(t.storeName),\n e.oldVersion <= 1 &&\n i.createObjectStore(\n \"local-forage-detect-blob-support\",\n );\n } catch (i) {\n if (\"ConstraintError\" !== i.name) throw i;\n console.warn(\n 'The database \"' +\n t.name +\n '\" has been upgraded from version ' +\n e.oldVersion +\n \" to version \" +\n e.newVersion +\n ', but the storage \"' +\n t.storeName +\n '\" already exists.',\n );\n }\n }),\n (o.onerror = function (t) {\n t.preventDefault(), n(o.error);\n }),\n (o.onsuccess = function () {\n var e = o.result;\n (e.onversionchange = function (t) {\n t.target.close();\n }),\n i(e),\n m(t);\n });\n });\n }\n function b(t) {\n return y(t, !1);\n }\n function w(t) {\n return y(t, !0);\n }\n function x(t, e) {\n if (!t.db) return !0;\n var i = !t.db.objectStoreNames.contains(t.storeName),\n n = t.version < t.db.version,\n r = t.version > t.db.version;\n if (\n (n &&\n (t.version !== e &&\n console.warn(\n 'The database \"' +\n t.name +\n \"\\\" can't be downgraded from version \" +\n t.db.version +\n \" to version \" +\n t.version +\n \".\",\n ),\n (t.version = t.db.version)),\n r || i)\n ) {\n if (i) {\n var s = t.db.version + 1;\n s > t.version && (t.version = s);\n }\n return !0;\n }\n return !1;\n }\n function E(t) {\n return s(\n [\n (function (t) {\n for (\n var e = t.length,\n i = new ArrayBuffer(e),\n n = new Uint8Array(i),\n r = 0;\n r < e;\n r++\n )\n n[r] = t.charCodeAt(r);\n return i;\n })(atob(t.data)),\n ],\n { type: t.type },\n );\n }\n function S(t) {\n return t && t.__local_forage_encoded_blob;\n }\n function N(t) {\n var e = this,\n i = e._initReady().then(function () {\n var t = d[e._dbInfo.name];\n if (t && t.dbReady) return t.dbReady;\n });\n return h(i, t, t), i;\n }\n function _(t, e, i, n) {\n void 0 === n && (n = 1);\n try {\n var r = t.db.transaction(t.storeName, e);\n i(null, r);\n } catch (r) {\n if (\n n > 0 &&\n (!t.db ||\n \"InvalidStateError\" === r.name ||\n \"NotFoundError\" === r.name)\n )\n return o\n .resolve()\n .then(function () {\n if (\n !t.db ||\n (\"NotFoundError\" === r.name &&\n !t.db.objectStoreNames.contains(t.storeName) &&\n t.version <= t.db.version)\n )\n return t.db && (t.version = t.db.version + 1), w(t);\n })\n .then(function () {\n return (function (t) {\n g(t);\n for (\n var e = d[t.name], i = e.forages, n = 0;\n n < i.length;\n n++\n ) {\n var r = i[n];\n r._dbInfo.db &&\n (r._dbInfo.db.close(), (r._dbInfo.db = null));\n }\n return (\n (t.db = null),\n b(t)\n .then(function (e) {\n return (t.db = e), x(t) ? w(t) : e;\n })\n .then(function (n) {\n t.db = e.db = n;\n for (var r = 0; r < i.length; r++)\n i[r]._dbInfo.db = n;\n })\n .catch(function (e) {\n throw (v(t, e), e);\n })\n );\n })(t).then(function () {\n _(t, e, i, n - 1);\n });\n })\n .catch(i);\n i(r);\n }\n }\n var O = {\n _driver: \"asyncStorage\",\n _initStorage: function (t) {\n var e = this,\n i = { db: null };\n if (t) for (var n in t) i[n] = t[n];\n var r = d[i.name];\n r ||\n ((r = {\n forages: [],\n db: null,\n dbReady: null,\n deferredOperations: [],\n }),\n (d[i.name] = r)),\n r.forages.push(e),\n e._initReady ||\n ((e._initReady = e.ready), (e.ready = N));\n var s = [];\n function a() {\n return o.resolve();\n }\n for (var h = 0; h < r.forages.length; h++) {\n var l = r.forages[h];\n l !== e && s.push(l._initReady().catch(a));\n }\n var c = r.forages.slice(0);\n return o\n .all(s)\n .then(function () {\n return (i.db = r.db), b(i);\n })\n .then(function (t) {\n return (\n (i.db = t),\n x(i, e._defaultConfig.version) ? w(i) : t\n );\n })\n .then(function (t) {\n (i.db = r.db = t), (e._dbInfo = i);\n for (var n = 0; n < c.length; n++) {\n var s = c[n];\n s !== e &&\n ((s._dbInfo.db = i.db),\n (s._dbInfo.version = i.version));\n }\n });\n },\n _support: (function () {\n try {\n if (!r || !r.open) return !1;\n var t =\n \"undefined\" != typeof openDatabase &&\n /(Safari|iPhone|iPad|iPod)/.test(\n navigator.userAgent,\n ) &&\n !/Chrome/.test(navigator.userAgent) &&\n !/BlackBerry/.test(navigator.platform),\n e =\n \"function\" == typeof fetch &&\n -1 !== fetch.toString().indexOf(\"[native code\");\n return (\n (!t || e) &&\n \"undefined\" != typeof indexedDB &&\n \"undefined\" != typeof IDBKeyRange\n );\n } catch (t) {\n return !1;\n }\n })(),\n iterate: function (t, e) {\n var i = this,\n n = new o(function (e, n) {\n i.ready()\n .then(function () {\n _(i._dbInfo, \"readonly\", function (r, s) {\n if (r) return n(r);\n try {\n var o = s\n .objectStore(i._dbInfo.storeName)\n .openCursor(),\n a = 1;\n (o.onsuccess = function () {\n var i = o.result;\n if (i) {\n var n = i.value;\n S(n) && (n = E(n));\n var r = t(n, i.key, a++);\n void 0 !== r ? e(r) : i.continue();\n } else e();\n }),\n (o.onerror = function () {\n n(o.error);\n });\n } catch (t) {\n n(t);\n }\n });\n })\n .catch(n);\n });\n return a(n, e), n;\n },\n getItem: function (t, e) {\n var i = this;\n t = l(t);\n var n = new o(function (e, n) {\n i.ready()\n .then(function () {\n _(i._dbInfo, \"readonly\", function (r, s) {\n if (r) return n(r);\n try {\n var o = s\n .objectStore(i._dbInfo.storeName)\n .get(t);\n (o.onsuccess = function () {\n var t = o.result;\n void 0 === t && (t = null),\n S(t) && (t = E(t)),\n e(t);\n }),\n (o.onerror = function () {\n n(o.error);\n });\n } catch (t) {\n n(t);\n }\n });\n })\n .catch(n);\n });\n return a(n, e), n;\n },\n setItem: function (t, e, i) {\n var n = this;\n t = l(t);\n var r = new o(function (i, r) {\n var s;\n n.ready()\n .then(function () {\n return (\n (s = n._dbInfo),\n \"[object Blob]\" === f.call(e)\n ? p(s.db).then(function (t) {\n return t\n ? e\n : ((i = e),\n new o(function (t, e) {\n var n = new FileReader();\n (n.onerror = e),\n (n.onloadend = function (e) {\n var n = btoa(\n e.target.result || \"\",\n );\n t({\n __local_forage_encoded_blob: !0,\n data: n,\n type: i.type,\n });\n }),\n n.readAsBinaryString(i);\n }));\n var i;\n })\n : e\n );\n })\n .then(function (e) {\n _(n._dbInfo, \"readwrite\", function (s, o) {\n if (s) return r(s);\n try {\n var a = o.objectStore(n._dbInfo.storeName);\n null === e && (e = void 0);\n var h = a.put(e, t);\n (o.oncomplete = function () {\n void 0 === e && (e = null), i(e);\n }),\n (o.onabort = o.onerror =\n function () {\n var t = h.error\n ? h.error\n : h.transaction.error;\n r(t);\n });\n } catch (t) {\n r(t);\n }\n });\n })\n .catch(r);\n });\n return a(r, i), r;\n },\n removeItem: function (t, e) {\n var i = this;\n t = l(t);\n var n = new o(function (e, n) {\n i.ready()\n .then(function () {\n _(i._dbInfo, \"readwrite\", function (r, s) {\n if (r) return n(r);\n try {\n var o = s\n .objectStore(i._dbInfo.storeName)\n .delete(t);\n (s.oncomplete = function () {\n e();\n }),\n (s.onerror = function () {\n n(o.error);\n }),\n (s.onabort = function () {\n var t = o.error\n ? o.error\n : o.transaction.error;\n n(t);\n });\n } catch (t) {\n n(t);\n }\n });\n })\n .catch(n);\n });\n return a(n, e), n;\n },\n clear: function (t) {\n var e = this,\n i = new o(function (t, i) {\n e.ready()\n .then(function () {\n _(e._dbInfo, \"readwrite\", function (n, r) {\n if (n) return i(n);\n try {\n var s = r\n .objectStore(e._dbInfo.storeName)\n .clear();\n (r.oncomplete = function () {\n t();\n }),\n (r.onabort = r.onerror =\n function () {\n var t = s.error\n ? s.error\n : s.transaction.error;\n i(t);\n });\n } catch (t) {\n i(t);\n }\n });\n })\n .catch(i);\n });\n return a(i, t), i;\n },\n length: function (t) {\n var e = this,\n i = new o(function (t, i) {\n e.ready()\n .then(function () {\n _(e._dbInfo, \"readonly\", function (n, r) {\n if (n) return i(n);\n try {\n var s = r\n .objectStore(e._dbInfo.storeName)\n .count();\n (s.onsuccess = function () {\n t(s.result);\n }),\n (s.onerror = function () {\n i(s.error);\n });\n } catch (t) {\n i(t);\n }\n });\n })\n .catch(i);\n });\n return a(i, t), i;\n },\n key: function (t, e) {\n var i = this,\n n = new o(function (e, n) {\n t < 0\n ? e(null)\n : i\n .ready()\n .then(function () {\n _(i._dbInfo, \"readonly\", function (r, s) {\n if (r) return n(r);\n try {\n var o = s.objectStore(\n i._dbInfo.storeName,\n ),\n a = !1,\n h = o.openKeyCursor();\n (h.onsuccess = function () {\n var i = h.result;\n i\n ? 0 === t || a\n ? e(i.key)\n : ((a = !0), i.advance(t))\n : e(null);\n }),\n (h.onerror = function () {\n n(h.error);\n });\n } catch (t) {\n n(t);\n }\n });\n })\n .catch(n);\n });\n return a(n, e), n;\n },\n keys: function (t) {\n var e = this,\n i = new o(function (t, i) {\n e.ready()\n .then(function () {\n _(e._dbInfo, \"readonly\", function (n, r) {\n if (n) return i(n);\n try {\n var s = r\n .objectStore(e._dbInfo.storeName)\n .openKeyCursor(),\n o = [];\n (s.onsuccess = function () {\n var e = s.result;\n e ? (o.push(e.key), e.continue()) : t(o);\n }),\n (s.onerror = function () {\n i(s.error);\n });\n } catch (t) {\n i(t);\n }\n });\n })\n .catch(i);\n });\n return a(i, t), i;\n },\n dropInstance: function (t, e) {\n e = c.apply(this, arguments);\n var i = this.config();\n (t = (\"function\" != typeof t && t) || {}).name ||\n ((t.name = t.name || i.name),\n (t.storeName = t.storeName || i.storeName));\n var n,\n s = this;\n if (t.name) {\n var h = t.name === i.name && s._dbInfo.db,\n l = h\n ? o.resolve(s._dbInfo.db)\n : b(t).then(function (e) {\n var i = d[t.name],\n n = i.forages;\n i.db = e;\n for (var r = 0; r < n.length; r++)\n n[r]._dbInfo.db = e;\n return e;\n });\n n = t.storeName\n ? l.then(function (e) {\n if (e.objectStoreNames.contains(t.storeName)) {\n var i = e.version + 1;\n g(t);\n var n = d[t.name],\n s = n.forages;\n e.close();\n for (var a = 0; a < s.length; a++) {\n var h = s[a];\n (h._dbInfo.db = null),\n (h._dbInfo.version = i);\n }\n return new o(function (e, n) {\n var s = r.open(t.name, i);\n (s.onerror = function (t) {\n s.result.close(), n(t);\n }),\n (s.onupgradeneeded = function () {\n s.result.deleteObjectStore(t.storeName);\n }),\n (s.onsuccess = function () {\n var t = s.result;\n t.close(), e(t);\n });\n })\n .then(function (t) {\n n.db = t;\n for (var e = 0; e < s.length; e++) {\n var i = s[e];\n (i._dbInfo.db = t), m(i._dbInfo);\n }\n })\n .catch(function (e) {\n throw (\n ((v(t, e) || o.resolve()).catch(\n function () {},\n ),\n e)\n );\n });\n }\n })\n : l.then(function (e) {\n g(t);\n var i = d[t.name],\n n = i.forages;\n e.close();\n for (var s = 0; s < n.length; s++)\n n[s]._dbInfo.db = null;\n return new o(function (e, i) {\n var n = r.deleteDatabase(t.name);\n (n.onerror = function () {\n var t = n.result;\n t && t.close(), i(n.error);\n }),\n (n.onblocked = function () {\n console.warn(\n 'dropInstance blocked for database \"' +\n t.name +\n '\" until all open connections are closed',\n );\n }),\n (n.onsuccess = function () {\n var t = n.result;\n t && t.close(), e(t);\n });\n })\n .then(function (t) {\n i.db = t;\n for (var e = 0; e < n.length; e++)\n m(n[e]._dbInfo);\n })\n .catch(function (e) {\n throw (\n ((v(t, e) || o.resolve()).catch(\n function () {},\n ),\n e)\n );\n });\n });\n } else n = o.reject(\"Invalid arguments\");\n return a(n, e), n;\n },\n },\n T =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",\n C = /^~~local_forage_type~([^~]+)~/,\n I = \"__lfsc__:\".length,\n k = I + \"arbf\".length,\n R = Object.prototype.toString;\n function A(t) {\n var e,\n i,\n n,\n r,\n s,\n o = 0.75 * t.length,\n a = t.length,\n h = 0;\n \"=\" === t[t.length - 1] &&\n (o--, \"=\" === t[t.length - 2] && o--);\n var l = new ArrayBuffer(o),\n c = new Uint8Array(l);\n for (e = 0; e < a; e += 4)\n (i = T.indexOf(t[e])),\n (n = T.indexOf(t[e + 1])),\n (r = T.indexOf(t[e + 2])),\n (s = T.indexOf(t[e + 3])),\n (c[h++] = (i << 2) | (n >> 4)),\n (c[h++] = ((15 & n) << 4) | (r >> 2)),\n (c[h++] = ((3 & r) << 6) | (63 & s));\n return l;\n }\n function L(t) {\n var e,\n i = new Uint8Array(t),\n n = \"\";\n for (e = 0; e < i.length; e += 3)\n (n += T[i[e] >> 2]),\n (n += T[((3 & i[e]) << 4) | (i[e + 1] >> 4)]),\n (n += T[((15 & i[e + 1]) << 2) | (i[e + 2] >> 6)]),\n (n += T[63 & i[e + 2]]);\n return (\n i.length % 3 == 2\n ? (n = n.substring(0, n.length - 1) + \"=\")\n : i.length % 3 == 1 &&\n (n = n.substring(0, n.length - 2) + \"==\"),\n n\n );\n }\n var j = {\n serialize: function (t, e) {\n var i = \"\";\n if (\n (t && (i = R.call(t)),\n t &&\n (\"[object ArrayBuffer]\" === i ||\n (t.buffer &&\n \"[object ArrayBuffer]\" === R.call(t.buffer))))\n ) {\n var n,\n r = \"__lfsc__:\";\n t instanceof ArrayBuffer\n ? ((n = t), (r += \"arbf\"))\n : ((n = t.buffer),\n \"[object Int8Array]\" === i\n ? (r += \"si08\")\n : \"[object Uint8Array]\" === i\n ? (r += \"ui08\")\n : \"[object Uint8ClampedArray]\" === i\n ? (r += \"uic8\")\n : \"[object Int16Array]\" === i\n ? (r += \"si16\")\n : \"[object Uint16Array]\" === i\n ? (r += \"ur16\")\n : \"[object Int32Array]\" === i\n ? (r += \"si32\")\n : \"[object Uint32Array]\" === i\n ? (r += \"ui32\")\n : \"[object Float32Array]\" === i\n ? (r += \"fl32\")\n : \"[object Float64Array]\" === i\n ? (r += \"fl64\")\n : e(\n new Error(\n \"Failed to get type for BinaryArray\",\n ),\n )),\n e(r + L(n));\n } else if (\"[object Blob]\" === i) {\n var s = new FileReader();\n (s.onload = function () {\n var i =\n \"~~local_forage_type~\" +\n t.type +\n \"~\" +\n L(this.result);\n e(\"__lfsc__:blob\" + i);\n }),\n s.readAsArrayBuffer(t);\n } else\n try {\n e(JSON.stringify(t));\n } catch (i) {\n console.error(\n \"Couldn't convert value into a JSON string: \",\n t,\n ),\n e(null, i);\n }\n },\n deserialize: function (t) {\n if (\"__lfsc__:\" !== t.substring(0, I)) return JSON.parse(t);\n var e,\n i = t.substring(k),\n n = t.substring(I, k);\n if (\"blob\" === n && C.test(i)) {\n var r = i.match(C);\n (e = r[1]), (i = i.substring(r[0].length));\n }\n var o = A(i);\n switch (n) {\n case \"arbf\":\n return o;\n case \"blob\":\n return s([o], { type: e });\n case \"si08\":\n return new Int8Array(o);\n case \"ui08\":\n return new Uint8Array(o);\n case \"uic8\":\n return new Uint8ClampedArray(o);\n case \"si16\":\n return new Int16Array(o);\n case \"ur16\":\n return new Uint16Array(o);\n case \"si32\":\n return new Int32Array(o);\n case \"ui32\":\n return new Uint32Array(o);\n case \"fl32\":\n return new Float32Array(o);\n case \"fl64\":\n return new Float64Array(o);\n default:\n throw new Error(\"Unkown type: \" + n);\n }\n },\n stringToBuffer: A,\n bufferToString: L,\n };\n function D(t, e, i, n) {\n t.executeSql(\n \"CREATE TABLE IF NOT EXISTS \" +\n e.storeName +\n \" (id INTEGER PRIMARY KEY, key unique, value)\",\n [],\n i,\n n,\n );\n }\n function P(t, e, i, n, r, s) {\n t.executeSql(\n i,\n n,\n r,\n function (t, o) {\n o.code === o.SYNTAX_ERR\n ? t.executeSql(\n \"SELECT name FROM sqlite_master WHERE type='table' AND name = ?\",\n [e.storeName],\n function (t, a) {\n a.rows.length\n ? s(t, o)\n : D(\n t,\n e,\n function () {\n t.executeSql(i, n, r, s);\n },\n s,\n );\n },\n s,\n )\n : s(t, o);\n },\n s,\n );\n }\n function M(t, e, i, n) {\n var r = this;\n t = l(t);\n var s = new o(function (s, o) {\n r.ready()\n .then(function () {\n void 0 === e && (e = null);\n var a = e,\n h = r._dbInfo;\n h.serializer.serialize(e, function (e, l) {\n l\n ? o(l)\n : h.db.transaction(\n function (i) {\n P(\n i,\n h,\n \"INSERT OR REPLACE INTO \" +\n h.storeName +\n \" (key, value) VALUES (?, ?)\",\n [t, e],\n function () {\n s(a);\n },\n function (t, e) {\n o(e);\n },\n );\n },\n function (e) {\n if (e.code === e.QUOTA_ERR) {\n if (n > 0)\n return void s(\n M.apply(r, [t, a, i, n - 1]),\n );\n o(e);\n }\n },\n );\n });\n })\n .catch(o);\n });\n return a(s, i), s;\n }\n function z(t) {\n return new o(function (e, i) {\n t.transaction(\n function (n) {\n n.executeSql(\n \"SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\",\n [],\n function (i, n) {\n for (var r = [], s = 0; s < n.rows.length; s++)\n r.push(n.rows.item(s).name);\n e({ db: t, storeNames: r });\n },\n function (t, e) {\n i(e);\n },\n );\n },\n function (t) {\n i(t);\n },\n );\n });\n }\n var B = {\n _driver: \"webSQLStorage\",\n _initStorage: function (t) {\n var e = this,\n i = { db: null };\n if (t)\n for (var n in t)\n i[n] = \"string\" != typeof t[n] ? t[n].toString() : t[n];\n var r = new o(function (t, n) {\n try {\n i.db = openDatabase(\n i.name,\n String(i.version),\n i.description,\n i.size,\n );\n } catch (t) {\n return n(t);\n }\n i.db.transaction(function (r) {\n D(\n r,\n i,\n function () {\n (e._dbInfo = i), t();\n },\n function (t, e) {\n n(e);\n },\n );\n }, n);\n });\n return (i.serializer = j), r;\n },\n _support: \"function\" == typeof openDatabase,\n iterate: function (t, e) {\n var i = this,\n n = new o(function (e, n) {\n i.ready()\n .then(function () {\n var r = i._dbInfo;\n r.db.transaction(function (i) {\n P(\n i,\n r,\n \"SELECT * FROM \" + r.storeName,\n [],\n function (i, n) {\n for (\n var s = n.rows, o = s.length, a = 0;\n a < o;\n a++\n ) {\n var h = s.item(a),\n l = h.value;\n if (\n (l && (l = r.serializer.deserialize(l)),\n void 0 !== (l = t(l, h.key, a + 1)))\n )\n return void e(l);\n }\n e();\n },\n function (t, e) {\n n(e);\n },\n );\n });\n })\n .catch(n);\n });\n return a(n, e), n;\n },\n getItem: function (t, e) {\n var i = this;\n t = l(t);\n var n = new o(function (e, n) {\n i.ready()\n .then(function () {\n var r = i._dbInfo;\n r.db.transaction(function (i) {\n P(\n i,\n r,\n \"SELECT * FROM \" +\n r.storeName +\n \" WHERE key = ? LIMIT 1\",\n [t],\n function (t, i) {\n var n = i.rows.length\n ? i.rows.item(0).value\n : null;\n n && (n = r.serializer.deserialize(n)), e(n);\n },\n function (t, e) {\n n(e);\n },\n );\n });\n })\n .catch(n);\n });\n return a(n, e), n;\n },\n setItem: function (t, e, i) {\n return M.apply(this, [t, e, i, 1]);\n },\n removeItem: function (t, e) {\n var i = this;\n t = l(t);\n var n = new o(function (e, n) {\n i.ready()\n .then(function () {\n var r = i._dbInfo;\n r.db.transaction(function (i) {\n P(\n i,\n r,\n \"DELETE FROM \" + r.storeName + \" WHERE key = ?\",\n [t],\n function () {\n e();\n },\n function (t, e) {\n n(e);\n },\n );\n });\n })\n .catch(n);\n });\n return a(n, e), n;\n },\n clear: function (t) {\n var e = this,\n i = new o(function (t, i) {\n e.ready()\n .then(function () {\n var n = e._dbInfo;\n n.db.transaction(function (e) {\n P(\n e,\n n,\n \"DELETE FROM \" + n.storeName,\n [],\n function () {\n t();\n },\n function (t, e) {\n i(e);\n },\n );\n });\n })\n .catch(i);\n });\n return a(i, t), i;\n },\n length: function (t) {\n var e = this,\n i = new o(function (t, i) {\n e.ready()\n .then(function () {\n var n = e._dbInfo;\n n.db.transaction(function (e) {\n P(\n e,\n n,\n \"SELECT COUNT(key) as c FROM \" + n.storeName,\n [],\n function (e, i) {\n var n = i.rows.item(0).c;\n t(n);\n },\n function (t, e) {\n i(e);\n },\n );\n });\n })\n .catch(i);\n });\n return a(i, t), i;\n },\n key: function (t, e) {\n var i = this,\n n = new o(function (e, n) {\n i.ready()\n .then(function () {\n var r = i._dbInfo;\n r.db.transaction(function (i) {\n P(\n i,\n r,\n \"SELECT key FROM \" +\n r.storeName +\n \" WHERE id = ? LIMIT 1\",\n [t + 1],\n function (t, i) {\n var n = i.rows.length\n ? i.rows.item(0).key\n : null;\n e(n);\n },\n function (t, e) {\n n(e);\n },\n );\n });\n })\n .catch(n);\n });\n return a(n, e), n;\n },\n keys: function (t) {\n var e = this,\n i = new o(function (t, i) {\n e.ready()\n .then(function () {\n var n = e._dbInfo;\n n.db.transaction(function (e) {\n P(\n e,\n n,\n \"SELECT key FROM \" + n.storeName,\n [],\n function (e, i) {\n for (\n var n = [], r = 0;\n r < i.rows.length;\n r++\n )\n n.push(i.rows.item(r).key);\n t(n);\n },\n function (t, e) {\n i(e);\n },\n );\n });\n })\n .catch(i);\n });\n return a(i, t), i;\n },\n dropInstance: function (t, e) {\n e = c.apply(this, arguments);\n var i = this.config();\n (t = (\"function\" != typeof t && t) || {}).name ||\n ((t.name = t.name || i.name),\n (t.storeName = t.storeName || i.storeName));\n var n,\n r = this;\n return (\n a(\n (n = t.name\n ? new o(function (e) {\n var n;\n (n =\n t.name === i.name\n ? r._dbInfo.db\n : openDatabase(t.name, \"\", \"\", 0)),\n t.storeName\n ? e({ db: n, storeNames: [t.storeName] })\n : e(z(n));\n }).then(function (t) {\n return new o(function (e, i) {\n t.db.transaction(\n function (n) {\n function r(t) {\n return new o(function (e, i) {\n n.executeSql(\n \"DROP TABLE IF EXISTS \" + t,\n [],\n function () {\n e();\n },\n function (t, e) {\n i(e);\n },\n );\n });\n }\n for (\n var s = [],\n a = 0,\n h = t.storeNames.length;\n a < h;\n a++\n )\n s.push(r(t.storeNames[a]));\n o.all(s)\n .then(function () {\n e();\n })\n .catch(function (t) {\n i(t);\n });\n },\n function (t) {\n i(t);\n },\n );\n });\n })\n : o.reject(\"Invalid arguments\")),\n e,\n ),\n n\n );\n },\n };\n function q(t, e) {\n var i = t.name + \"/\";\n return (\n t.storeName !== e.storeName && (i += t.storeName + \"/\"), i\n );\n }\n function F() {\n return (\n !(function () {\n try {\n return (\n localStorage.setItem(\"_localforage_support_test\", !0),\n localStorage.removeItem(\"_localforage_support_test\"),\n !1\n );\n } catch (t) {\n return !0;\n }\n })() || localStorage.length > 0\n );\n }\n var U = {\n _driver: \"localStorageWrapper\",\n _initStorage: function (t) {\n var e = {};\n if (t) for (var i in t) e[i] = t[i];\n return (\n (e.keyPrefix = q(t, this._defaultConfig)),\n F()\n ? ((this._dbInfo = e),\n (e.serializer = j),\n o.resolve())\n : o.reject()\n );\n },\n _support: (function () {\n try {\n return (\n \"undefined\" != typeof localStorage &&\n \"setItem\" in localStorage &&\n !!localStorage.setItem\n );\n } catch (t) {\n return !1;\n }\n })(),\n iterate: function (t, e) {\n var i = this,\n n = i.ready().then(function () {\n for (\n var e = i._dbInfo,\n n = e.keyPrefix,\n r = n.length,\n s = localStorage.length,\n o = 1,\n a = 0;\n a < s;\n a++\n ) {\n var h = localStorage.key(a);\n if (0 === h.indexOf(n)) {\n var l = localStorage.getItem(h);\n if (\n (l && (l = e.serializer.deserialize(l)),\n void 0 !== (l = t(l, h.substring(r), o++)))\n )\n return l;\n }\n }\n });\n return a(n, e), n;\n },\n getItem: function (t, e) {\n var i = this;\n t = l(t);\n var n = i.ready().then(function () {\n var e = i._dbInfo,\n n = localStorage.getItem(e.keyPrefix + t);\n return n && (n = e.serializer.deserialize(n)), n;\n });\n return a(n, e), n;\n },\n setItem: function (t, e, i) {\n var n = this;\n t = l(t);\n var r = n.ready().then(function () {\n void 0 === e && (e = null);\n var i = e;\n return new o(function (r, s) {\n var o = n._dbInfo;\n o.serializer.serialize(e, function (e, n) {\n if (n) s(n);\n else\n try {\n localStorage.setItem(o.keyPrefix + t, e), r(i);\n } catch (t) {\n (\"QuotaExceededError\" !== t.name &&\n \"NS_ERROR_DOM_QUOTA_REACHED\" !== t.name) ||\n s(t),\n s(t);\n }\n });\n });\n });\n return a(r, i), r;\n },\n removeItem: function (t, e) {\n var i = this;\n t = l(t);\n var n = i.ready().then(function () {\n var e = i._dbInfo;\n localStorage.removeItem(e.keyPrefix + t);\n });\n return a(n, e), n;\n },\n clear: function (t) {\n var e = this,\n i = e.ready().then(function () {\n for (\n var t = e._dbInfo.keyPrefix,\n i = localStorage.length - 1;\n i >= 0;\n i--\n ) {\n var n = localStorage.key(i);\n 0 === n.indexOf(t) && localStorage.removeItem(n);\n }\n });\n return a(i, t), i;\n },\n length: function (t) {\n var e = this.keys().then(function (t) {\n return t.length;\n });\n return a(e, t), e;\n },\n key: function (t, e) {\n var i = this,\n n = i.ready().then(function () {\n var e,\n n = i._dbInfo;\n try {\n e = localStorage.key(t);\n } catch (t) {\n e = null;\n }\n return e && (e = e.substring(n.keyPrefix.length)), e;\n });\n return a(n, e), n;\n },\n keys: function (t) {\n var e = this,\n i = e.ready().then(function () {\n for (\n var t = e._dbInfo,\n i = localStorage.length,\n n = [],\n r = 0;\n r < i;\n r++\n ) {\n var s = localStorage.key(r);\n 0 === s.indexOf(t.keyPrefix) &&\n n.push(s.substring(t.keyPrefix.length));\n }\n return n;\n });\n return a(i, t), i;\n },\n dropInstance: function (t, e) {\n if (\n ((e = c.apply(this, arguments)),\n !(t = (\"function\" != typeof t && t) || {}).name)\n ) {\n var i = this.config();\n (t.name = t.name || i.name),\n (t.storeName = t.storeName || i.storeName);\n }\n var n,\n r = this;\n return (\n a(\n (n = t.name\n ? new o(function (e) {\n t.storeName\n ? e(q(t, r._defaultConfig))\n : e(t.name + \"/\");\n }).then(function (t) {\n for (\n var e = localStorage.length - 1;\n e >= 0;\n e--\n ) {\n var i = localStorage.key(e);\n 0 === i.indexOf(t) &&\n localStorage.removeItem(i);\n }\n })\n : o.reject(\"Invalid arguments\")),\n e,\n ),\n n\n );\n },\n },\n W = function (t, e) {\n for (var i, n, r = t.length, s = 0; s < r; ) {\n if (\n (i = t[s]) === (n = e) ||\n (\"number\" == typeof i &&\n \"number\" == typeof n &&\n isNaN(i) &&\n isNaN(n))\n )\n return !0;\n s++;\n }\n return !1;\n },\n H =\n Array.isArray ||\n function (t) {\n return (\n \"[object Array]\" === Object.prototype.toString.call(t)\n );\n },\n V = {},\n X = {},\n G = { INDEXEDDB: O, WEBSQL: B, LOCALSTORAGE: U },\n Y = [\n G.INDEXEDDB._driver,\n G.WEBSQL._driver,\n G.LOCALSTORAGE._driver,\n ],\n $ = [\"dropInstance\"],\n K = [\n \"clear\",\n \"getItem\",\n \"iterate\",\n \"key\",\n \"keys\",\n \"length\",\n \"removeItem\",\n \"setItem\",\n ].concat($),\n Z = {\n description: \"\",\n driver: Y.slice(),\n name: \"localforage\",\n size: 4980736,\n storeName: \"keyvaluepairs\",\n version: 1,\n };\n function J(t, e) {\n t[e] = function () {\n var i = arguments;\n return t.ready().then(function () {\n return t[e].apply(t, i);\n });\n };\n }\n function Q() {\n for (var t = 1; t < arguments.length; t++) {\n var e = arguments[t];\n if (e)\n for (var i in e)\n e.hasOwnProperty(i) &&\n (H(e[i])\n ? (arguments[0][i] = e[i].slice())\n : (arguments[0][i] = e[i]));\n }\n return arguments[0];\n }\n var tt = new ((function () {\n function t(e) {\n for (var i in ((function (t, e) {\n if (!(t instanceof e))\n throw new TypeError(\n \"Cannot call a class as a function\",\n );\n })(this, t),\n G))\n if (G.hasOwnProperty(i)) {\n var n = G[i],\n r = n._driver;\n (this[i] = r), V[r] || this.defineDriver(n);\n }\n (this._defaultConfig = Q({}, Z)),\n (this._config = Q({}, this._defaultConfig, e)),\n (this._driverSet = null),\n (this._initDriver = null),\n (this._ready = !1),\n (this._dbInfo = null),\n this._wrapLibraryMethodsWithReady(),\n this.setDriver(this._config.driver).catch(function () {});\n }\n return (\n (t.prototype.config = function (t) {\n if (\"object\" === (void 0 === t ? \"undefined\" : n(t))) {\n if (this._ready)\n return new Error(\n \"Can't call config() after localforage has been used.\",\n );\n for (var e in t) {\n if (\n (\"storeName\" === e &&\n (t[e] = t[e].replace(/\\W/g, \"_\")),\n \"version\" === e && \"number\" != typeof t[e])\n )\n return new Error(\n \"Database version must be a number.\",\n );\n this._config[e] = t[e];\n }\n return (\n !(\"driver\" in t) ||\n !t.driver ||\n this.setDriver(this._config.driver)\n );\n }\n return \"string\" == typeof t\n ? this._config[t]\n : this._config;\n }),\n (t.prototype.defineDriver = function (t, e, i) {\n var n = new o(function (e, i) {\n try {\n var n = t._driver,\n r = new Error(\n \"Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver\",\n );\n if (!t._driver) return void i(r);\n for (\n var s = K.concat(\"_initStorage\"),\n h = 0,\n l = s.length;\n h < l;\n h++\n ) {\n var c = s[h];\n if ((!W($, c) || t[c]) && \"function\" != typeof t[c])\n return void i(r);\n }\n !(function () {\n for (\n var e = function (t) {\n return function () {\n var e = new Error(\n \"Method \" +\n t +\n \" is not implemented by the current driver\",\n ),\n i = o.reject(e);\n return (\n a(i, arguments[arguments.length - 1]), i\n );\n };\n },\n i = 0,\n n = $.length;\n i < n;\n i++\n ) {\n var r = $[i];\n t[r] || (t[r] = e(r));\n }\n })();\n var u = function (i) {\n V[n] &&\n console.info(\n \"Redefining LocalForage driver: \" + n,\n ),\n (V[n] = t),\n (X[n] = i),\n e();\n };\n \"_support\" in t\n ? t._support && \"function\" == typeof t._support\n ? t._support().then(u, i)\n : u(!!t._support)\n : u(!0);\n } catch (t) {\n i(t);\n }\n });\n return h(n, e, i), n;\n }),\n (t.prototype.driver = function () {\n return this._driver || null;\n }),\n (t.prototype.getDriver = function (t, e, i) {\n var n = V[t]\n ? o.resolve(V[t])\n : o.reject(new Error(\"Driver not found.\"));\n return h(n, e, i), n;\n }),\n (t.prototype.getSerializer = function (t) {\n var e = o.resolve(j);\n return h(e, t), e;\n }),\n (t.prototype.ready = function (t) {\n var e = this,\n i = e._driverSet.then(function () {\n return (\n null === e._ready && (e._ready = e._initDriver()),\n e._ready\n );\n });\n return h(i, t, t), i;\n }),\n (t.prototype.setDriver = function (t, e, i) {\n var n = this;\n H(t) || (t = [t]);\n var r = this._getSupportedDrivers(t);\n function s() {\n n._config.driver = n.driver();\n }\n function a(t) {\n return (\n n._extend(t),\n s(),\n (n._ready = n._initStorage(n._config)),\n n._ready\n );\n }\n var l =\n null !== this._driverSet\n ? this._driverSet.catch(function () {\n return o.resolve();\n })\n : o.resolve();\n return (\n (this._driverSet = l\n .then(function () {\n var t = r[0];\n return (\n (n._dbInfo = null),\n (n._ready = null),\n n.getDriver(t).then(function (t) {\n (n._driver = t._driver),\n s(),\n n._wrapLibraryMethodsWithReady(),\n (n._initDriver = (function (t) {\n return function () {\n var e = 0;\n return (function i() {\n for (; e < t.length; ) {\n var r = t[e];\n return (\n e++,\n (n._dbInfo = null),\n (n._ready = null),\n n.getDriver(r).then(a).catch(i)\n );\n }\n s();\n var h = new Error(\n \"No available storage method found.\",\n );\n return (\n (n._driverSet = o.reject(h)),\n n._driverSet\n );\n })();\n };\n })(r));\n })\n );\n })\n .catch(function () {\n s();\n var t = new Error(\n \"No available storage method found.\",\n );\n return (n._driverSet = o.reject(t)), n._driverSet;\n })),\n h(this._driverSet, e, i),\n this._driverSet\n );\n }),\n (t.prototype.supports = function (t) {\n return !!X[t];\n }),\n (t.prototype._extend = function (t) {\n Q(this, t);\n }),\n (t.prototype._getSupportedDrivers = function (t) {\n for (var e = [], i = 0, n = t.length; i < n; i++) {\n var r = t[i];\n this.supports(r) && e.push(r);\n }\n return e;\n }),\n (t.prototype._wrapLibraryMethodsWithReady = function () {\n for (var t = 0, e = K.length; t < e; t++) J(this, K[t]);\n }),\n (t.prototype.createInstance = function (e) {\n return new t(e);\n }),\n t\n );\n })())();\n e.exports = tt;\n },\n { 3: 3 },\n ],\n },\n {},\n [4],\n )(4);\n }).call(this, i(25));\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(3),\n r = i.n(n),\n s = i(0),\n o = i(5),\n a = i(4),\n h = i(2),\n l = i(6),\n c = i(10);\n var u = function (t, e, i, n) {\n var r,\n o = \"undefined\" != typeof window && window.URL,\n h = o ? \"blob\" : \"arraybuffer\",\n l = new s.defer(),\n c = new XMLHttpRequest(),\n u = XMLHttpRequest.prototype;\n for (r in (\"overrideMimeType\" in u ||\n Object.defineProperty(u, \"overrideMimeType\", {\n value: function () {},\n }),\n i && (c.withCredentials = !0),\n (c.onreadystatechange = function () {\n if (this.readyState === XMLHttpRequest.DONE) {\n var t = !1;\n if (\n ((\"\" !== this.responseType &&\n \"document\" !== this.responseType) ||\n (t = this.responseXML),\n 200 === this.status || 0 === this.status || t)\n ) {\n var i;\n if (!this.response && !t)\n return (\n l.reject({\n status: this.status,\n message: \"Empty Response\",\n stack: new Error().stack,\n }),\n l.promise\n );\n if (403 === this.status)\n return (\n l.reject({\n status: this.status,\n response: this.response,\n message: \"Forbidden\",\n stack: new Error().stack,\n }),\n l.promise\n );\n (i = t\n ? this.responseXML\n : Object(s.isXml)(e)\n ? Object(s.parse)(this.response, \"text/xml\")\n : \"xhtml\" == e\n ? Object(s.parse)(this.response, \"application/xhtml+xml\")\n : \"html\" == e || \"htm\" == e\n ? Object(s.parse)(this.response, \"text/html\")\n : \"json\" == e\n ? JSON.parse(this.response)\n : \"blob\" == e\n ? o\n ? this.response\n : new Blob([this.response])\n : this.response),\n l.resolve(i);\n } else\n l.reject({\n status: this.status,\n message: this.response,\n stack: new Error().stack,\n });\n }\n }),\n (c.onerror = function (t) {\n l.reject(t);\n }),\n c.open(\"GET\", t, !0),\n n))\n c.setRequestHeader(r, n[r]);\n return (\n \"json\" == e && c.setRequestHeader(\"Accept\", \"application/json\"),\n e || (e = new a.a(t).extension),\n \"blob\" == e && (c.responseType = h),\n Object(s.isXml)(e) && c.overrideMimeType(\"text/xml\"),\n \"binary\" == e && (c.responseType = \"arraybuffer\"),\n c.send(),\n l.promise\n );\n },\n d = i(28);\n var f = class {\n constructor(t, e) {\n (this.idref = t.idref),\n (this.linear = \"yes\" === t.linear),\n (this.properties = t.properties),\n (this.index = t.index),\n (this.href = t.href),\n (this.url = t.url),\n (this.canonical = t.canonical),\n (this.next = t.next),\n (this.prev = t.prev),\n (this.cfiBase = t.cfiBase),\n e\n ? (this.hooks = e)\n : ((this.hooks = {}),\n (this.hooks.serialize = new l.a(this)),\n (this.hooks.content = new l.a(this))),\n (this.document = void 0),\n (this.contents = void 0),\n (this.output = void 0);\n }\n load(t) {\n var e = t || this.request || u,\n i = new s.defer(),\n n = i.promise;\n return (\n this.contents\n ? i.resolve(this.contents)\n : e(this.url)\n .then(\n function (t) {\n return (\n (this.document = t),\n (this.contents = t.documentElement),\n this.hooks.content.trigger(this.document, this)\n );\n }.bind(this),\n )\n .then(\n function () {\n i.resolve(this.contents);\n }.bind(this),\n )\n .catch(function (t) {\n i.reject(t);\n }),\n n\n );\n }\n base() {\n return Object(c.a)(this.document, this);\n }\n render(t) {\n var e = new s.defer(),\n i = e.promise;\n return (\n this.output,\n this.load(t)\n .then(\n function (t) {\n var e =\n (\n (\"undefined\" != typeof navigator &&\n navigator.userAgent) ||\n \"\"\n ).indexOf(\"Trident\") >= 0,\n i = new (\n \"undefined\" == typeof XMLSerializer || e\n ? d.DOMParser\n : XMLSerializer\n )();\n return (this.output = i.serializeToString(t)), this.output;\n }.bind(this),\n )\n .then(\n function () {\n return this.hooks.serialize.trigger(this.output, this);\n }.bind(this),\n )\n .then(\n function () {\n e.resolve(this.output);\n }.bind(this),\n )\n .catch(function (t) {\n e.reject(t);\n }),\n i\n );\n }\n find(t) {\n var e = this,\n i = [],\n n = t.toLowerCase();\n return (\n Object(s.sprint)(e.document, function (t) {\n !(function (t) {\n for (\n var r,\n s,\n o,\n a = t.textContent.toLowerCase(),\n h = e.document.createRange(),\n l = -1;\n -1 != s;\n\n )\n -1 != (s = a.indexOf(n, l + 1)) &&\n ((h = e.document.createRange()).setStart(t, s),\n h.setEnd(t, s + n.length),\n (r = e.cfiFromRange(h)),\n (o =\n t.textContent.length < 150\n ? t.textContent\n : \"...\" +\n (o = t.textContent.substring(s - 75, s + 75)) +\n \"...\"),\n i.push({ cfi: r, excerpt: o })),\n (l = s);\n })(t);\n }),\n i\n );\n }\n search(t, e = 5) {\n if (void 0 === document.createTreeWalker) return this.find(t);\n let i = [];\n const n = this,\n r = t.toLowerCase(),\n s = function (t) {\n const e = t\n .reduce((t, e) => t + e.textContent, \"\")\n .toLowerCase()\n .indexOf(r);\n if (-1 != e) {\n const s = 0,\n o = e + r.length;\n let a = 0,\n h = 0;\n if (e < t[s].length) {\n let r;\n for (; a < t.length - 1 && ((h += t[a].length), !(o <= h)); )\n a += 1;\n let l = t[s],\n c = t[a],\n u = n.document.createRange();\n u.setStart(l, e);\n let d = t\n .slice(0, a)\n .reduce((t, e) => t + e.textContent.length, 0);\n u.setEnd(c, d > o ? o : o - d), (r = n.cfiFromRange(u));\n let f = t\n .slice(0, a + 1)\n .reduce((t, e) => t + e.textContent, \"\");\n f.length > 150 &&\n ((f = f.substring(e - 75, e + 75)),\n (f = \"...\" + f + \"...\")),\n i.push({ cfi: r, excerpt: f });\n }\n }\n },\n o = document.createTreeWalker(\n n.document,\n NodeFilter.SHOW_TEXT,\n null,\n !1,\n );\n let a,\n h = [];\n for (; (a = o.nextNode()); )\n h.push(a), h.length == e && (s(h.slice(0, e)), (h = h.slice(1, e)));\n return h.length > 0 && s(h), i;\n }\n reconcileLayoutSettings(t) {\n var e = {\n layout: t.layout,\n spread: t.spread,\n orientation: t.orientation,\n };\n return (\n this.properties.forEach(function (t) {\n var i,\n n,\n r = t.replace(\"rendition:\", \"\"),\n s = r.indexOf(\"-\");\n -1 != s &&\n ((i = r.slice(0, s)), (n = r.slice(s + 1)), (e[i] = n));\n }),\n e\n );\n }\n cfiFromRange(t) {\n return new h.a(t, this.cfiBase).toString();\n }\n cfiFromElement(t) {\n return new h.a(t, this.cfiBase).toString();\n }\n unload() {\n (this.document = void 0),\n (this.contents = void 0),\n (this.output = void 0);\n }\n destroy() {\n this.unload(),\n this.hooks.serialize.clear(),\n this.hooks.content.clear(),\n (this.hooks = void 0),\n (this.idref = void 0),\n (this.linear = void 0),\n (this.properties = void 0),\n (this.index = void 0),\n (this.href = void 0),\n (this.url = void 0),\n (this.next = void 0),\n (this.prev = void 0),\n (this.cfiBase = void 0);\n }\n };\n var p = class {\n constructor() {\n (this.spineItems = []),\n (this.spineByHref = {}),\n (this.spineById = {}),\n (this.hooks = {}),\n (this.hooks.serialize = new l.a()),\n (this.hooks.content = new l.a()),\n this.hooks.content.register(c.a),\n this.hooks.content.register(c.b),\n this.hooks.content.register(c.d),\n (this.epubcfi = new h.a()),\n (this.loaded = !1),\n (this.items = void 0),\n (this.manifest = void 0),\n (this.spineNodeIndex = void 0),\n (this.baseUrl = void 0),\n (this.length = void 0);\n }\n unpack(t, e, i) {\n (this.items = t.spine),\n (this.manifest = t.manifest),\n (this.spineNodeIndex = t.spineNodeIndex),\n (this.baseUrl = t.baseUrl || t.basePath || \"\"),\n (this.length = this.items.length),\n this.items.forEach((t, n) => {\n var r,\n s = this.manifest[t.idref];\n (t.index = n),\n (t.cfiBase = this.epubcfi.generateChapterComponent(\n this.spineNodeIndex,\n t.index,\n t.id,\n )),\n t.href &&\n ((t.url = e(t.href, !0)), (t.canonical = i(t.href))),\n s &&\n ((t.href = s.href),\n (t.url = e(t.href, !0)),\n (t.canonical = i(t.href)),\n s.properties.length &&\n t.properties.push.apply(t.properties, s.properties)),\n \"yes\" === t.linear\n ? ((t.prev = function () {\n let e = t.index;\n for (; e > 0; ) {\n let t = this.get(e - 1);\n if (t && t.linear) return t;\n e -= 1;\n }\n }.bind(this)),\n (t.next = function () {\n let e = t.index;\n for (; e < this.spineItems.length - 1; ) {\n let t = this.get(e + 1);\n if (t && t.linear) return t;\n e += 1;\n }\n }.bind(this)))\n : ((t.prev = function () {}), (t.next = function () {})),\n (r = new f(t, this.hooks)),\n this.append(r);\n }),\n (this.loaded = !0);\n }\n get(t) {\n var e = 0;\n if (void 0 === t)\n for (; e < this.spineItems.length; ) {\n let t = this.spineItems[e];\n if (t && t.linear) break;\n e += 1;\n }\n else if (this.epubcfi.isCfiString(t)) {\n e = new h.a(t).spinePos;\n } else\n \"number\" == typeof t || !1 === isNaN(t)\n ? (e = t)\n : \"string\" == typeof t && 0 === t.indexOf(\"#\")\n ? (e = this.spineById[t.substring(1)])\n : \"string\" == typeof t &&\n ((t = t.split(\"#\")[0]),\n (e =\n this.spineByHref[t] || this.spineByHref[encodeURI(t)]));\n return this.spineItems[e] || null;\n }\n append(t) {\n var e = this.spineItems.length;\n return (\n (t.index = e),\n this.spineItems.push(t),\n (this.spineByHref[decodeURI(t.href)] = e),\n (this.spineByHref[encodeURI(t.href)] = e),\n (this.spineByHref[t.href] = e),\n (this.spineById[t.idref] = e),\n e\n );\n }\n prepend(t) {\n return (\n (this.spineByHref[t.href] = 0),\n (this.spineById[t.idref] = 0),\n this.spineItems.forEach(function (t, e) {\n t.index = e;\n }),\n 0\n );\n }\n remove(t) {\n var e = this.spineItems.indexOf(t);\n if (e > -1)\n return (\n delete this.spineByHref[t.href],\n delete this.spineById[t.idref],\n this.spineItems.splice(e, 1)\n );\n }\n each() {\n return this.spineItems.forEach.apply(this.spineItems, arguments);\n }\n first() {\n let t = 0;\n do {\n let e = this.get(t);\n if (e && e.linear) return e;\n t += 1;\n } while (t < this.spineItems.length);\n }\n last() {\n let t = this.spineItems.length - 1;\n do {\n let e = this.get(t);\n if (e && e.linear) return e;\n t -= 1;\n } while (t >= 0);\n }\n destroy() {\n this.each((t) => t.destroy()),\n (this.spineItems = void 0),\n (this.spineByHref = void 0),\n (this.spineById = void 0),\n this.hooks.serialize.clear(),\n this.hooks.content.clear(),\n (this.hooks = void 0),\n (this.epubcfi = void 0),\n (this.loaded = !1),\n (this.items = void 0),\n (this.manifest = void 0),\n (this.spineNodeIndex = void 0),\n (this.baseUrl = void 0),\n (this.length = void 0);\n }\n },\n g = i(15),\n m = i(1);\n class v {\n constructor(t, e, i) {\n (this.spine = t),\n (this.request = e),\n (this.pause = i || 100),\n (this.q = new g.a(this)),\n (this.epubcfi = new h.a()),\n (this._locations = []),\n (this._locationsWords = []),\n (this.total = 0),\n (this.break = 150),\n (this._current = 0),\n (this._wordCounter = 0),\n (this.currentLocation = \"\"),\n (this._currentCfi = \"\"),\n (this.processingTimeout = void 0);\n }\n generate(t) {\n return (\n t && (this.break = t),\n this.q.pause(),\n this.spine.each(\n function (t) {\n t.linear && this.q.enqueue(this.process.bind(this), t);\n }.bind(this),\n ),\n this.q.run().then(\n function () {\n return (\n (this.total = this._locations.length - 1),\n this._currentCfi && (this.currentLocation = this._currentCfi),\n this._locations\n );\n }.bind(this),\n )\n );\n }\n createRange() {\n return {\n startContainer: void 0,\n startOffset: void 0,\n endContainer: void 0,\n endOffset: void 0,\n };\n }\n process(t) {\n return t.load(this.request).then(\n function (e) {\n var i = new s.defer(),\n n = this.parse(e, t.cfiBase);\n return (\n (this._locations = this._locations.concat(n)),\n t.unload(),\n (this.processingTimeout = setTimeout(\n () => i.resolve(n),\n this.pause,\n )),\n i.promise\n );\n }.bind(this),\n );\n }\n parse(t, e, i) {\n var n,\n r,\n o = [],\n a = t.ownerDocument,\n l = Object(s.qs)(a, \"body\"),\n c = 0,\n u = i || this.break;\n if (\n (Object(s.sprint)(\n l,\n function (t) {\n var i,\n s = t.length,\n a = 0;\n if (0 === t.textContent.trim().length) return !1;\n for (\n 0 == c &&\n (((n = this.createRange()).startContainer = t),\n (n.startOffset = 0)),\n (i = u - c) > s && ((c += s), (a = s));\n a < s;\n\n )\n if (\n ((i = u - c),\n 0 === c &&\n ((a += 1),\n ((n = this.createRange()).startContainer = t),\n (n.startOffset = a)),\n a + i >= s)\n )\n (c += s - a), (a = s);\n else {\n (a += i), (n.endContainer = t), (n.endOffset = a);\n let r = new h.a(n, e).toString();\n o.push(r), (c = 0);\n }\n r = t;\n }.bind(this),\n ),\n n && n.startContainer && r)\n ) {\n (n.endContainer = r), (n.endOffset = r.length);\n let t = new h.a(n, e).toString();\n o.push(t), (c = 0);\n }\n return o;\n }\n generateFromWords(t, e, i) {\n var n = t ? new h.a(t) : void 0;\n return (\n this.q.pause(),\n (this._locationsWords = []),\n (this._wordCounter = 0),\n this.spine.each(\n function (t) {\n t.linear &&\n (n\n ? t.index >= n.spinePos &&\n this.q.enqueue(this.processWords.bind(this), t, e, n, i)\n : this.q.enqueue(this.processWords.bind(this), t, e, n, i));\n }.bind(this),\n ),\n this.q.run().then(\n function () {\n return (\n this._currentCfi && (this.currentLocation = this._currentCfi),\n this._locationsWords\n );\n }.bind(this),\n )\n );\n }\n processWords(t, e, i, n) {\n return n && this._locationsWords.length >= n\n ? Promise.resolve()\n : t.load(this.request).then(\n function (r) {\n var o = new s.defer(),\n a = this.parseWords(r, t, e, i),\n h = n - this._locationsWords.length;\n return (\n (this._locationsWords = this._locationsWords.concat(\n a.length >= n ? a.slice(0, h) : a,\n )),\n t.unload(),\n (this.processingTimeout = setTimeout(\n () => o.resolve(a),\n this.pause,\n )),\n o.promise\n );\n }.bind(this),\n );\n }\n countWords(t) {\n return (t = (t = (t = t.replace(/(^\\s*)|(\\s*$)/gi, \"\")).replace(\n /[ ]{2,}/gi,\n \" \",\n )).replace(/\\n /, \"\\n\")).split(\" \").length;\n }\n parseWords(t, e, i, n) {\n var r,\n o = e.cfiBase,\n a = [],\n l = t.ownerDocument,\n c = Object(s.qs)(l, \"body\"),\n u = i,\n d = !n || n.spinePos !== e.index;\n n &&\n e.index === n.spinePos &&\n (r = n.findNode(\n n.range ? n.path.steps.concat(n.start.steps) : n.path.steps,\n t.ownerDocument,\n ));\n return (\n Object(s.sprint)(\n c,\n function (t) {\n if (!d) {\n if (t !== r) return !1;\n d = !0;\n }\n if (\n t.textContent.length < 10 &&\n 0 === t.textContent.trim().length\n )\n return !1;\n var e,\n i = this.countWords(t.textContent),\n n = 0;\n if (0 === i) return !1;\n for (\n (e = u - this._wordCounter) > i &&\n ((this._wordCounter += i), (n = i));\n n < i;\n\n )\n if (n + (e = u - this._wordCounter) >= i)\n (this._wordCounter += i - n), (n = i);\n else {\n n += e;\n let i = new h.a(t, o);\n a.push({ cfi: i.toString(), wordCount: this._wordCounter }),\n (this._wordCounter = 0);\n }\n t;\n }.bind(this),\n ),\n a\n );\n }\n locationFromCfi(t) {\n let e;\n return (\n h.a.prototype.isCfiString(t) && (t = new h.a(t)),\n 0 === this._locations.length\n ? -1\n : ((e = Object(s.locationOf)(\n t,\n this._locations,\n this.epubcfi.compare,\n )),\n e > this.total ? this.total : e)\n );\n }\n percentageFromCfi(t) {\n if (0 === this._locations.length) return null;\n var e = this.locationFromCfi(t);\n return this.percentageFromLocation(e);\n }\n percentageFromLocation(t) {\n return t && this.total ? t / this.total : 0;\n }\n cfiFromLocation(t) {\n var e = -1;\n return (\n \"number\" != typeof t && (t = parseInt(t)),\n t >= 0 && t < this._locations.length && (e = this._locations[t]),\n e\n );\n }\n cfiFromPercentage(t) {\n let e;\n if (\n (t > 1 &&\n console.warn(\n \"Normalize cfiFromPercentage value to between 0 - 1\",\n ),\n t >= 1)\n ) {\n let t = new h.a(this._locations[this.total]);\n return t.collapse(), t.toString();\n }\n return (e = Math.ceil(this.total * t)), this.cfiFromLocation(e);\n }\n load(t) {\n return (\n (this._locations = \"string\" == typeof t ? JSON.parse(t) : t),\n (this.total = this._locations.length - 1),\n this._locations\n );\n }\n save() {\n return JSON.stringify(this._locations);\n }\n getCurrent() {\n return this._current;\n }\n setCurrent(t) {\n var e;\n if (\"string\" == typeof t) this._currentCfi = t;\n else {\n if (\"number\" != typeof t) return;\n this._current = t;\n }\n 0 !== this._locations.length &&\n (\"string\" == typeof t\n ? ((e = this.locationFromCfi(t)), (this._current = e))\n : (e = t),\n this.emit(m.c.LOCATIONS.CHANGED, {\n percentage: this.percentageFromLocation(e),\n }));\n }\n get currentLocation() {\n return this._current;\n }\n set currentLocation(t) {\n this.setCurrent(t);\n }\n length() {\n return this._locations.length;\n }\n destroy() {\n (this.spine = void 0),\n (this.request = void 0),\n (this.pause = void 0),\n this.q.stop(),\n (this.q = void 0),\n (this.epubcfi = void 0),\n (this._locations = void 0),\n (this.total = void 0),\n (this.break = void 0),\n (this._current = void 0),\n (this.currentLocation = void 0),\n (this._currentCfi = void 0),\n clearTimeout(this.processingTimeout);\n }\n }\n r()(v.prototype);\n var y = v,\n b = i(8),\n w = i.n(b);\n var x = class {\n constructor(t) {\n (this.packagePath = \"\"),\n (this.directory = \"\"),\n (this.encoding = \"\"),\n t && this.parse(t);\n }\n parse(t) {\n var e;\n if (!t) throw new Error(\"Container File Not Found\");\n if (!(e = Object(s.qs)(t, \"rootfile\")))\n throw new Error(\"No RootFile Found\");\n (this.packagePath = e.getAttribute(\"full-path\")),\n (this.directory = w.a.dirname(this.packagePath)),\n (this.encoding = t.xmlEncoding);\n }\n destroy() {\n (this.packagePath = void 0),\n (this.directory = void 0),\n (this.encoding = void 0);\n }\n };\n var E = class {\n constructor(t) {\n (this.manifest = {}),\n (this.navPath = \"\"),\n (this.ncxPath = \"\"),\n (this.coverPath = \"\"),\n (this.spineNodeIndex = 0),\n (this.spine = []),\n (this.metadata = {}),\n t && this.parse(t);\n }\n parse(t) {\n var e, i, n;\n if (!t) throw new Error(\"Package File Not Found\");\n if (!(e = Object(s.qs)(t, \"metadata\")))\n throw new Error(\"No Metadata Found\");\n if (!(i = Object(s.qs)(t, \"manifest\")))\n throw new Error(\"No Manifest Found\");\n if (!(n = Object(s.qs)(t, \"spine\")))\n throw new Error(\"No Spine Found\");\n return (\n (this.manifest = this.parseManifest(i)),\n (this.navPath = this.findNavPath(i)),\n (this.ncxPath = this.findNcxPath(i, n)),\n (this.coverPath = this.findCoverPath(t)),\n (this.spineNodeIndex = Object(s.indexOfElementNode)(n)),\n (this.spine = this.parseSpine(n, this.manifest)),\n (this.uniqueIdentifier = this.findUniqueIdentifier(t)),\n (this.metadata = this.parseMetadata(e)),\n (this.metadata.direction = n.getAttribute(\n \"page-progression-direction\",\n )),\n {\n metadata: this.metadata,\n spine: this.spine,\n manifest: this.manifest,\n navPath: this.navPath,\n ncxPath: this.ncxPath,\n coverPath: this.coverPath,\n spineNodeIndex: this.spineNodeIndex,\n }\n );\n }\n parseMetadata(t) {\n var e = {};\n return (\n (e.title = this.getElementText(t, \"title\")),\n (e.creator = this.getElementText(t, \"creator\")),\n (e.description = this.getElementText(t, \"description\")),\n (e.pubdate = this.getElementText(t, \"date\")),\n (e.publisher = this.getElementText(t, \"publisher\")),\n (e.identifier = this.getElementText(t, \"identifier\")),\n (e.language = this.getElementText(t, \"language\")),\n (e.rights = this.getElementText(t, \"rights\")),\n (e.modified_date = this.getPropertyText(t, \"dcterms:modified\")),\n (e.layout = this.getPropertyText(t, \"rendition:layout\")),\n (e.orientation = this.getPropertyText(t, \"rendition:orientation\")),\n (e.flow = this.getPropertyText(t, \"rendition:flow\")),\n (e.viewport = this.getPropertyText(t, \"rendition:viewport\")),\n (e.media_active_class = this.getPropertyText(\n t,\n \"media:active-class\",\n )),\n (e.spread = this.getPropertyText(t, \"rendition:spread\")),\n e\n );\n }\n parseManifest(t) {\n var e = {},\n i = Object(s.qsa)(t, \"item\");\n return (\n Array.prototype.slice.call(i).forEach(function (t) {\n var i = t.getAttribute(\"id\"),\n n = t.getAttribute(\"href\") || \"\",\n r = t.getAttribute(\"media-type\") || \"\",\n s = t.getAttribute(\"media-overlay\") || \"\",\n o = t.getAttribute(\"properties\") || \"\";\n e[i] = {\n href: n,\n type: r,\n overlay: s,\n properties: o.length ? o.split(\" \") : [],\n };\n }),\n e\n );\n }\n parseSpine(t, e) {\n var i = [],\n n = Object(s.qsa)(t, \"itemref\");\n return (\n Array.prototype.slice.call(n).forEach(function (t, e) {\n var n = t.getAttribute(\"idref\"),\n r = t.getAttribute(\"properties\") || \"\",\n s = r.length ? r.split(\" \") : [],\n o = {\n id: t.getAttribute(\"id\"),\n idref: n,\n linear: t.getAttribute(\"linear\") || \"yes\",\n properties: s,\n index: e,\n };\n i.push(o);\n }),\n i\n );\n }\n findUniqueIdentifier(t) {\n var e = t.documentElement.getAttribute(\"unique-identifier\");\n if (!e) return \"\";\n var i = t.getElementById(e);\n return i &&\n \"identifier\" === i.localName &&\n \"http://purl.org/dc/elements/1.1/\" === i.namespaceURI &&\n i.childNodes.length > 0\n ? i.childNodes[0].nodeValue.trim()\n : \"\";\n }\n findNavPath(t) {\n var e = Object(s.qsp)(t, \"item\", { properties: \"nav\" });\n return !!e && e.getAttribute(\"href\");\n }\n findNcxPath(t, e) {\n var i,\n n = Object(s.qsp)(t, \"item\", {\n \"media-type\": \"application/x-dtbncx+xml\",\n });\n return (\n n ||\n ((i = e.getAttribute(\"toc\")) && (n = t.querySelector(\"#\" + i))),\n !!n && n.getAttribute(\"href\")\n );\n }\n findCoverPath(t) {\n Object(s.qs)(t, \"package\").getAttribute(\"version\");\n var e = Object(s.qsp)(t, \"item\", { properties: \"cover-image\" });\n if (e) return e.getAttribute(\"href\");\n var i = Object(s.qsp)(t, \"meta\", { name: \"cover\" });\n if (i) {\n var n = i.getAttribute(\"content\"),\n r = t.getElementById(n);\n return r ? r.getAttribute(\"href\") : \"\";\n }\n return !1;\n }\n getElementText(t, e) {\n var i,\n n = t.getElementsByTagNameNS(\"http://purl.org/dc/elements/1.1/\", e);\n return n && 0 !== n.length && (i = n[0]).childNodes.length\n ? i.childNodes[0].nodeValue\n : \"\";\n }\n getPropertyText(t, e) {\n var i = Object(s.qsp)(t, \"meta\", { property: e });\n return i && i.childNodes.length ? i.childNodes[0].nodeValue : \"\";\n }\n load(t) {\n this.metadata = t.metadata;\n let e = t.readingOrder || t.spine;\n return (\n (this.spine = e.map(\n (t, e) => ((t.index = e), (t.linear = t.linear || \"yes\"), t),\n )),\n t.resources.forEach((t, e) => {\n (this.manifest[e] = t),\n t.rel && \"cover\" === t.rel[0] && (this.coverPath = t.href);\n }),\n (this.spineNodeIndex = 0),\n (this.toc = t.toc.map((t, e) => ((t.label = t.title), t))),\n {\n metadata: this.metadata,\n spine: this.spine,\n manifest: this.manifest,\n navPath: this.navPath,\n ncxPath: this.ncxPath,\n coverPath: this.coverPath,\n spineNodeIndex: this.spineNodeIndex,\n toc: this.toc,\n }\n );\n }\n destroy() {\n (this.manifest = void 0),\n (this.navPath = void 0),\n (this.ncxPath = void 0),\n (this.coverPath = void 0),\n (this.spineNodeIndex = void 0),\n (this.spine = void 0),\n (this.metadata = void 0);\n }\n };\n var S = class {\n constructor(t, e = \"\") {\n (this.toc = []),\n (this.tocByHref = {}),\n (this.tocById = {}),\n (this.landmarks = []),\n (this.landmarksByType = {}),\n (this.length = 0),\n e && (this.tocPath = new a.a(e)),\n t && this.parse(t);\n }\n parse(t) {\n let e,\n i,\n n = t.nodeType;\n n && ((e = Object(s.qs)(t, \"html\")), (i = Object(s.qs)(t, \"ncx\"))),\n n\n ? e\n ? ((this.toc = this.parseNav(t)),\n (this.landmarks = this.parseLandmarks(t)))\n : i && (this.toc = this.parseNcx(t))\n : (this.toc = this.load(t)),\n (this.length = 0),\n this.unpack(this.toc);\n }\n unpack(t) {\n for (var e, i = 0; i < t.length; i++)\n (e = t[i]).href && (this.tocByHref[e.href] = i),\n e.id && (this.tocById[e.id] = i),\n this.length++,\n e.subitems.length && this.unpack(e.subitems);\n }\n get(t) {\n var e;\n return t\n ? (0 === t.indexOf(\"#\")\n ? (e = this.tocById[t.substring(1)])\n : t in this.tocByHref && (e = this.tocByHref[t]),\n this.getByIndex(t, e, this.toc))\n : this.toc;\n }\n getByIndex(t, e, i) {\n if (0 === i.length) return;\n const n = i[e];\n if (!n || (t !== n.id && t !== n.href)) {\n let n;\n for (\n let r = 0;\n r < i.length &&\n ((n = this.getByIndex(t, e, i[r].subitems)), !n);\n ++r\n );\n return n;\n }\n return n;\n }\n landmark(t) {\n var e;\n return t\n ? ((e = this.landmarksByType[t]), this.landmarks[e])\n : this.landmarks;\n }\n parseNav(t) {\n var e = Object(s.querySelectorByType)(t, \"nav\", \"toc\"),\n i = [];\n if (!e) return i;\n let n = Object(s.filterChildren)(e, \"ol\", !0);\n return n ? (i = this.parseNavList(n)) : i;\n }\n parseNavList(t, e) {\n const i = [];\n if (!t) return i;\n if (!t.children) return i;\n for (let n = 0; n < t.children.length; n++) {\n const r = this.navItem(t.children[n], e);\n r && i.push(r);\n }\n return i;\n }\n navItem(t, e) {\n let i = t.getAttribute(\"id\") || void 0,\n n =\n Object(s.filterChildren)(t, \"a\", !0) ||\n Object(s.filterChildren)(t, \"span\", !0);\n if (!n) return;\n const r = n.getAttribute(\"href\") || \"\";\n let o = this.tocPath.join(r);\n i || (i = o);\n let a = n.textContent || \"\",\n h = [],\n l = Object(s.filterChildren)(t, \"ol\", !0);\n return (\n l && (h = this.parseNavList(l, i)),\n { id: i, href: o, label: a, subitems: h, parent: e }\n );\n }\n parseLandmarks(t) {\n var e,\n i,\n n = Object(s.querySelectorByType)(t, \"nav\", \"landmarks\"),\n r = n ? Object(s.qsa)(n, \"li\") : [],\n o = r.length,\n a = [];\n if (!r || 0 === o) return a;\n for (e = 0; e < o; ++e)\n (i = this.landmarkItem(r[e])) &&\n (a.push(i), (this.landmarksByType[i.type] = e));\n return a;\n }\n landmarkItem(t) {\n let e = Object(s.filterChildren)(t, \"a\", !0);\n if (!e) return;\n let i =\n e.getAttributeNS(\"http://www.idpf.org/2007/ops\", \"type\") ||\n void 0;\n return {\n href: e.getAttribute(\"href\") || \"\",\n label: e.textContent || \"\",\n type: i,\n };\n }\n parseNcx(t) {\n var e,\n i,\n n = Object(s.qsa)(t, \"navPoint\"),\n r = n.length,\n o = {},\n a = [];\n if (!n || 0 === r) return a;\n for (e = 0; e < r; ++e)\n (o[(i = this.ncxItem(n[e])).id] = i),\n i.parent ? o[i.parent].subitems.push(i) : a.push(i);\n return a;\n }\n ncxItem(t) {\n var e,\n i = t.getAttribute(\"id\") || !1,\n n = Object(s.qs)(t, \"content\").getAttribute(\"src\"),\n r = Object(s.qs)(t, \"navLabel\"),\n o = r.textContent ? r.textContent : \"\",\n a = t.parentNode;\n return (\n !a ||\n (\"navPoint\" !== a.nodeName &&\n \"navPoint\" !== a.nodeName.split(\":\").slice(-1)[0]) ||\n (e = a.getAttribute(\"id\")),\n { id: i, href: n, label: o, subitems: [], parent: e }\n );\n }\n load(t) {\n return t.map(\n (t) => (\n (t.label = t.title),\n (t.subitems = t.children ? this.load(t.children) : []),\n t\n ),\n );\n }\n forEach(t) {\n return this.toc.forEach(t);\n }\n },\n N = {\n application: {\n ecmascript: [\"es\", \"ecma\"],\n javascript: \"js\",\n ogg: \"ogx\",\n pdf: \"pdf\",\n postscript: [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n \"rdf+xml\": \"rdf\",\n smil: [\"smi\", \"smil\"],\n \"xhtml+xml\": [\"xhtml\", \"xht\"],\n xml: [\"xml\", \"xsl\", \"xsd\", \"opf\", \"ncx\"],\n zip: \"zip\",\n \"x-httpd-eruby\": \"rhtml\",\n \"x-latex\": \"latex\",\n \"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n \"x-object\": \"o\",\n \"x-shockwave-flash\": [\"swf\", \"swfl\"],\n \"x-silverlight\": \"scr\",\n \"epub+zip\": \"epub\",\n \"font-tdpfr\": \"pfr\",\n \"inkml+xml\": [\"ink\", \"inkml\"],\n json: \"json\",\n \"jsonml+json\": \"jsonml\",\n \"mathml+xml\": \"mathml\",\n \"metalink+xml\": \"metalink\",\n mp4: \"mp4s\",\n \"omdoc+xml\": \"omdoc\",\n oxps: \"oxps\",\n \"vnd.amazon.ebook\": \"azw\",\n widget: \"wgt\",\n \"x-dtbook+xml\": \"dtb\",\n \"x-dtbresource+xml\": \"res\",\n \"x-font-bdf\": \"bdf\",\n \"x-font-ghostscript\": \"gsf\",\n \"x-font-linux-psf\": \"psf\",\n \"x-font-otf\": \"otf\",\n \"x-font-pcf\": \"pcf\",\n \"x-font-snf\": \"snf\",\n \"x-font-ttf\": [\"ttf\", \"ttc\"],\n \"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n \"x-font-woff\": \"woff\",\n \"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n \"x-mspublisher\": \"pub\",\n \"x-nzb\": \"nzb\",\n \"x-tgif\": \"obj\",\n \"xaml+xml\": \"xaml\",\n \"xml-dtd\": \"dtd\",\n \"xproc+xml\": \"xpl\",\n \"xslt+xml\": \"xslt\",\n \"internet-property-stream\": \"acx\",\n \"x-compress\": \"z\",\n \"x-compressed\": \"tgz\",\n \"x-gzip\": \"gz\",\n },\n audio: {\n flac: \"flac\",\n midi: [\"mid\", \"midi\", \"kar\", \"rmi\"],\n mpeg: [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n mpegurl: \"m3u\",\n ogg: [\"oga\", \"ogg\", \"spx\"],\n \"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n \"x-ms-wma\": \"wma\",\n \"x-wav\": \"wav\",\n adpcm: \"adp\",\n mp4: \"mp4a\",\n webm: \"weba\",\n \"x-aac\": \"aac\",\n \"x-caf\": \"caf\",\n \"x-matroska\": \"mka\",\n \"x-pn-realaudio-plugin\": \"rmp\",\n xm: \"xm\",\n mid: [\"mid\", \"rmi\"],\n },\n image: {\n gif: \"gif\",\n ief: \"ief\",\n jpeg: [\"jpeg\", \"jpg\", \"jpe\"],\n pcx: \"pcx\",\n png: \"png\",\n \"svg+xml\": [\"svg\", \"svgz\"],\n tiff: [\"tiff\", \"tif\"],\n \"x-icon\": \"ico\",\n bmp: \"bmp\",\n webp: \"webp\",\n \"x-pict\": [\"pic\", \"pct\"],\n \"x-tga\": \"tga\",\n \"cis-cod\": \"cod\",\n },\n text: {\n \"cache-manifest\": [\"manifest\", \"appcache\"],\n css: \"css\",\n csv: \"csv\",\n html: [\"html\", \"htm\", \"shtml\", \"stm\"],\n mathml: \"mml\",\n plain: [\n \"txt\",\n \"text\",\n \"brf\",\n \"conf\",\n \"def\",\n \"list\",\n \"log\",\n \"in\",\n \"bas\",\n ],\n richtext: \"rtx\",\n \"tab-separated-values\": \"tsv\",\n \"x-bibtex\": \"bib\",\n },\n video: {\n mpeg: [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n mp4: [\"mp4\", \"mp4v\", \"mpg4\"],\n quicktime: [\"qt\", \"mov\"],\n ogg: \"ogv\",\n \"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n \"x-flv\": \"flv\",\n \"x-la-asf\": [\"lsf\", \"lsx\"],\n \"x-mng\": \"mng\",\n \"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n \"x-ms-wm\": \"wm\",\n \"x-ms-wmv\": \"wmv\",\n \"x-ms-wmx\": \"wmx\",\n \"x-ms-wvx\": \"wvx\",\n \"x-msvideo\": \"avi\",\n \"x-sgi-movie\": \"movie\",\n \"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n \"3gpp2\": \"3g2\",\n h261: \"h261\",\n h263: \"h263\",\n h264: \"h264\",\n jpeg: \"jpgv\",\n jpm: [\"jpm\", \"jpgm\"],\n mj2: [\"mj2\", \"mjp2\"],\n \"vnd.ms-playready.media.pyv\": \"pyv\",\n \"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n \"vnd.vivo\": \"viv\",\n webm: \"webm\",\n \"x-f4v\": \"f4v\",\n \"x-m4v\": \"m4v\",\n \"x-ms-vob\": \"vob\",\n \"x-smv\": \"smv\",\n },\n },\n _ = (function () {\n var t,\n e,\n i,\n n,\n r = {};\n for (t in N)\n if (N.hasOwnProperty(t))\n for (e in N[t])\n if (N[t].hasOwnProperty(e))\n if (\"string\" == typeof (i = N[t][e])) r[i] = t + \"/\" + e;\n else for (n = 0; n < i.length; n++) r[i[n]] = t + \"/\" + e;\n return r;\n })();\n var O = {\n lookup: function (t) {\n return (t && _[t.split(\".\").pop().toLowerCase()]) || \"text/plain\";\n },\n };\n var T = class {\n constructor(t, e) {\n (this.settings = {\n replacements: (e && e.replacements) || \"base64\",\n archive: e && e.archive,\n resolver: e && e.resolver,\n request: e && e.request,\n }),\n this.process(t);\n }\n process(t) {\n (this.manifest = t),\n (this.resources = Object.keys(t).map(function (e) {\n return t[e];\n })),\n (this.replacementUrls = []),\n (this.html = []),\n (this.assets = []),\n (this.css = []),\n (this.urls = []),\n (this.cssUrls = []),\n this.split(),\n this.splitUrls();\n }\n split() {\n (this.html = this.resources.filter(function (t) {\n if (\"application/xhtml+xml\" === t.type || \"text/html\" === t.type)\n return !0;\n })),\n (this.assets = this.resources.filter(function (t) {\n if (\"application/xhtml+xml\" !== t.type && \"text/html\" !== t.type)\n return !0;\n })),\n (this.css = this.resources.filter(function (t) {\n if (\"text/css\" === t.type) return !0;\n }));\n }\n splitUrls() {\n (this.urls = this.assets.map(\n function (t) {\n return t.href;\n }.bind(this),\n )),\n (this.cssUrls = this.css.map(function (t) {\n return t.href;\n }));\n }\n createUrl(t) {\n var e = new o.a(t),\n i = O.lookup(e.filename);\n return this.settings.archive\n ? this.settings.archive.createUrl(t, {\n base64: \"base64\" === this.settings.replacements,\n })\n : \"base64\" === this.settings.replacements\n ? this.settings\n .request(t, \"blob\")\n .then((t) => Object(s.blob2base64)(t))\n .then((t) => Object(s.createBase64Url)(t, i))\n : this.settings\n .request(t, \"blob\")\n .then((t) => Object(s.createBlobUrl)(t, i));\n }\n replacements() {\n if (\"none\" === this.settings.replacements)\n return new Promise(\n function (t) {\n t(this.urls);\n }.bind(this),\n );\n var t = this.urls.map((t) => {\n var e = this.settings.resolver(t);\n return this.createUrl(e).catch((t) => (console.error(t), null));\n });\n return Promise.all(t).then(\n (t) => (\n (this.replacementUrls = t.filter((t) => \"string\" == typeof t)), t\n ),\n );\n }\n replaceCss(t, e) {\n var i = [];\n return (\n (t = t || this.settings.archive),\n (e = e || this.settings.resolver),\n this.cssUrls.forEach(\n function (n) {\n var r = this.createCssFile(n, t, e).then(\n function (t) {\n var e = this.urls.indexOf(n);\n e > -1 && (this.replacementUrls[e] = t);\n }.bind(this),\n );\n i.push(r);\n }.bind(this),\n ),\n Promise.all(i)\n );\n }\n createCssFile(t) {\n if (w.a.isAbsolute(t))\n return new Promise(function (t) {\n t();\n });\n var e,\n i = this.settings.resolver(t);\n e = this.settings.archive\n ? this.settings.archive.getText(i)\n : this.settings.request(i, \"text\");\n var n = this.urls.map((t) => {\n var e = this.settings.resolver(t);\n return new a.a(i).relative(e);\n });\n return e\n ? e.then(\n (t) => (\n (t = Object(c.e)(t, n, this.replacementUrls)),\n \"base64\" === this.settings.replacements\n ? Object(s.createBase64Url)(t, \"text/css\")\n : Object(s.createBlobUrl)(t, \"text/css\")\n ),\n (t) =>\n new Promise(function (t) {\n t();\n }),\n )\n : new Promise(function (t) {\n t();\n });\n }\n relativeTo(t, e) {\n return (\n (e = e || this.settings.resolver),\n this.urls.map(\n function (i) {\n var n = e(i);\n return new a.a(t).relative(n);\n }.bind(this),\n )\n );\n }\n get(t) {\n var e = this.urls.indexOf(t);\n if (-1 !== e)\n return this.replacementUrls.length\n ? new Promise(\n function (t, i) {\n t(this.replacementUrls[e]);\n }.bind(this),\n )\n : this.createUrl(t);\n }\n substitute(t, e) {\n var i;\n return (\n (i = e ? this.relativeTo(e) : this.urls),\n Object(c.e)(t, i, this.replacementUrls)\n );\n }\n destroy() {\n (this.settings = void 0),\n (this.manifest = void 0),\n (this.resources = void 0),\n (this.replacementUrls = void 0),\n (this.html = void 0),\n (this.assets = void 0),\n (this.css = void 0),\n (this.urls = void 0),\n (this.cssUrls = void 0);\n }\n };\n var C = class {\n constructor(t) {\n (this.pages = []),\n (this.locations = []),\n (this.epubcfi = new h.a()),\n (this.firstPage = 0),\n (this.lastPage = 0),\n (this.totalPages = 0),\n (this.toc = void 0),\n (this.ncx = void 0),\n t && (this.pageList = this.parse(t)),\n this.pageList &&\n this.pageList.length &&\n this.process(this.pageList);\n }\n parse(t) {\n var e = Object(s.qs)(t, \"html\"),\n i = Object(s.qs)(t, \"ncx\");\n return e ? this.parseNav(t) : i ? this.parseNcx(t) : void 0;\n }\n parseNav(t) {\n var e,\n i,\n n = Object(s.querySelectorByType)(t, \"nav\", \"page-list\"),\n r = n ? Object(s.qsa)(n, \"li\") : [],\n o = r.length,\n a = [];\n if (!r || 0 === o) return a;\n for (e = 0; e < o; ++e) (i = this.item(r[e])), a.push(i);\n return a;\n }\n parseNcx(t) {\n var e,\n i,\n n,\n r,\n o = [],\n a = 0;\n if (!(i = Object(s.qs)(t, \"pageList\"))) return o;\n if (\n ((r = (n = Object(s.qsa)(i, \"pageTarget\")).length),\n !n || 0 === n.length)\n )\n return o;\n for (a = 0; a < r; ++a) (e = this.ncxItem(n[a])), o.push(e);\n return o;\n }\n ncxItem(t) {\n var e = Object(s.qs)(t, \"navLabel\"),\n i = Object(s.qs)(e, \"text\").textContent;\n return {\n href: Object(s.qs)(t, \"content\").getAttribute(\"src\"),\n page: parseInt(i, 10),\n };\n }\n item(t) {\n var e,\n i,\n n = Object(s.qs)(t, \"a\"),\n r = n.getAttribute(\"href\") || \"\",\n o = n.textContent || \"\",\n a = parseInt(o);\n return -1 != r.indexOf(\"epubcfi\")\n ? ((i = (e = r.split(\"#\"))[0]),\n { cfi: e.length > 1 && e[1], href: r, packageUrl: i, page: a })\n : { href: r, page: a };\n }\n process(t) {\n t.forEach(function (t) {\n this.pages.push(t.page), t.cfi && this.locations.push(t.cfi);\n }, this),\n (this.firstPage = parseInt(this.pages[0])),\n (this.lastPage = parseInt(this.pages[this.pages.length - 1])),\n (this.totalPages = this.lastPage - this.firstPage);\n }\n pageFromCfi(t) {\n var e = -1;\n if (0 === this.locations.length) return -1;\n var i = Object(s.indexOfSorted)(\n t,\n this.locations,\n this.epubcfi.compare,\n );\n return (\n -1 != i\n ? (e = this.pages[i])\n : void 0 !==\n (e =\n (i = Object(s.locationOf)(\n t,\n this.locations,\n this.epubcfi.compare,\n )) -\n 1 >=\n 0\n ? this.pages[i - 1]\n : this.pages[0]) || (e = -1),\n e\n );\n }\n cfiFromPage(t) {\n var e = -1;\n \"number\" != typeof t && (t = parseInt(t));\n var i = this.pages.indexOf(t);\n return -1 != i && (e = this.locations[i]), e;\n }\n pageFromPercentage(t) {\n return Math.round(this.totalPages * t);\n }\n percentageFromPage(t) {\n var e = (t - this.firstPage) / this.totalPages;\n return Math.round(1e3 * e) / 1e3;\n }\n percentageFromCfi(t) {\n var e = this.pageFromCfi(t);\n return this.percentageFromPage(e);\n }\n destroy() {\n (this.pages = void 0),\n (this.locations = void 0),\n (this.epubcfi = void 0),\n (this.pageList = void 0),\n (this.toc = void 0),\n (this.ncx = void 0);\n }\n },\n I = i(29),\n k = i(76),\n R = i.n(k);\n var A = class {\n constructor() {\n (this.zip = void 0), (this.urlCache = {}), this.checkRequirements();\n }\n checkRequirements() {\n try {\n this.zip = new R.a();\n } catch (t) {\n throw new Error(\"JSZip lib not loaded\");\n }\n }\n open(t, e) {\n return this.zip.loadAsync(t, { base64: e });\n }\n openUrl(t, e) {\n return u(t, \"binary\").then(\n function (t) {\n return this.zip.loadAsync(t, { base64: e });\n }.bind(this),\n );\n }\n request(t, e) {\n var i,\n n = new s.defer(),\n r = new a.a(t);\n return (\n e || (e = r.extension),\n (i = \"blob\" == e ? this.getBlob(t) : this.getText(t))\n ? i.then(\n function (t) {\n let i = this.handleResponse(t, e);\n n.resolve(i);\n }.bind(this),\n )\n : n.reject({\n message: \"File not found in the epub: \" + t,\n stack: new Error().stack,\n }),\n n.promise\n );\n }\n handleResponse(t, e) {\n return \"json\" == e\n ? JSON.parse(t)\n : Object(s.isXml)(e)\n ? Object(s.parse)(t, \"text/xml\")\n : \"xhtml\" == e\n ? Object(s.parse)(t, \"application/xhtml+xml\")\n : \"html\" == e || \"htm\" == e\n ? Object(s.parse)(t, \"text/html\")\n : t;\n }\n getBlob(t, e) {\n var i = window.decodeURIComponent(t.substr(1)),\n n = this.zip.file(i);\n if (n)\n return (\n (e = e || O.lookup(n.name)),\n n.async(\"uint8array\").then(function (t) {\n return new Blob([t], { type: e });\n })\n );\n }\n getText(t, e) {\n var i = window.decodeURIComponent(t.substr(1)),\n n = this.zip.file(i);\n if (n)\n return n.async(\"string\").then(function (t) {\n return t;\n });\n }\n getBase64(t, e) {\n var i = window.decodeURIComponent(t.substr(1)),\n n = this.zip.file(i);\n if (n)\n return (\n (e = e || O.lookup(n.name)),\n n.async(\"base64\").then(function (t) {\n return \"data:\" + e + \";base64,\" + t;\n })\n );\n }\n createUrl(t, e) {\n var i,\n n,\n r = new s.defer(),\n o = window.URL || window.webkitURL || window.mozURL,\n a = e && e.base64;\n return t in this.urlCache\n ? (r.resolve(this.urlCache[t]), r.promise)\n : (a\n ? (n = this.getBase64(t)) &&\n n.then(\n function (e) {\n (this.urlCache[t] = e), r.resolve(e);\n }.bind(this),\n )\n : (n = this.getBlob(t)) &&\n n.then(\n function (e) {\n (i = o.createObjectURL(e)),\n (this.urlCache[t] = i),\n r.resolve(i);\n }.bind(this),\n ),\n n ||\n r.reject({\n message: \"File not found in the epub: \" + t,\n stack: new Error().stack,\n }),\n r.promise);\n }\n revokeUrl(t) {\n var e = window.URL || window.webkitURL || window.mozURL,\n i = this.urlCache[t];\n i && e.revokeObjectURL(i);\n }\n destroy() {\n var t = window.URL || window.webkitURL || window.mozURL;\n for (let e in this.urlCache) t.revokeObjectURL(e);\n (this.zip = void 0), (this.urlCache = {});\n }\n },\n L = i(48),\n j = i.n(L);\n class D {\n constructor(t, e, i) {\n (this.urlCache = {}),\n (this.storage = void 0),\n (this.name = t),\n (this.requester = e || u),\n (this.resolver = i),\n (this.online = !0),\n this.checkRequirements(),\n this.addListeners();\n }\n checkRequirements() {\n try {\n let t;\n void 0 === j.a && (t = j.a),\n (this.storage = t.createInstance({ name: this.name }));\n } catch (t) {\n throw new Error(\"localForage lib not loaded\");\n }\n }\n addListeners() {\n (this._status = this.status.bind(this)),\n window.addEventListener(\"online\", this._status),\n window.addEventListener(\"offline\", this._status);\n }\n removeListeners() {\n window.removeEventListener(\"online\", this._status),\n window.removeEventListener(\"offline\", this._status),\n (this._status = void 0);\n }\n status(t) {\n let e = navigator.onLine;\n (this.online = e),\n e ? this.emit(\"online\", this) : this.emit(\"offline\", this);\n }\n add(t, e) {\n let i = t.resources.map((t) => {\n let { href: i } = t,\n n = this.resolver(i),\n r = window.encodeURIComponent(n);\n return this.storage\n .getItem(r)\n .then((t) =>\n !t || e\n ? this.requester(n, \"binary\").then((t) =>\n this.storage.setItem(r, t),\n )\n : t,\n );\n });\n return Promise.all(i);\n }\n put(t, e, i) {\n let n = window.encodeURIComponent(t);\n return this.storage\n .getItem(n)\n .then(\n (r) =>\n r ||\n this.requester(t, \"binary\", e, i).then((t) =>\n this.storage.setItem(n, t),\n ),\n );\n }\n request(t, e, i, n) {\n return this.online\n ? this.requester(t, e, i, n).then((e) => (this.put(t), e))\n : this.retrieve(t, e);\n }\n retrieve(t, e) {\n new s.defer();\n var i = new a.a(t);\n return (\n e || (e = i.extension),\n (\"blob\" == e ? this.getBlob(t) : this.getText(t)).then((i) => {\n var n,\n r = new s.defer();\n return (\n i\n ? ((n = this.handleResponse(i, e)), r.resolve(n))\n : r.reject({\n message: \"File not found in storage: \" + t,\n stack: new Error().stack,\n }),\n r.promise\n );\n })\n );\n }\n handleResponse(t, e) {\n return \"json\" == e\n ? JSON.parse(t)\n : Object(s.isXml)(e)\n ? Object(s.parse)(t, \"text/xml\")\n : \"xhtml\" == e\n ? Object(s.parse)(t, \"application/xhtml+xml\")\n : \"html\" == e || \"htm\" == e\n ? Object(s.parse)(t, \"text/html\")\n : t;\n }\n getBlob(t, e) {\n let i = window.encodeURIComponent(t);\n return this.storage.getItem(i).then(function (i) {\n if (i) return (e = e || O.lookup(t)), new Blob([i], { type: e });\n });\n }\n getText(t, e) {\n let i = window.encodeURIComponent(t);\n return (\n (e = e || O.lookup(t)),\n this.storage.getItem(i).then(function (t) {\n var i,\n n = new s.defer(),\n r = new FileReader();\n if (t)\n return (\n (i = new Blob([t], { type: e })),\n r.addEventListener(\"loadend\", () => {\n n.resolve(r.result);\n }),\n r.readAsText(i, e),\n n.promise\n );\n })\n );\n }\n getBase64(t, e) {\n let i = window.encodeURIComponent(t);\n return (\n (e = e || O.lookup(t)),\n this.storage.getItem(i).then((t) => {\n var i,\n n = new s.defer(),\n r = new FileReader();\n if (t)\n return (\n (i = new Blob([t], { type: e })),\n r.addEventListener(\"loadend\", () => {\n n.resolve(r.result);\n }),\n r.readAsDataURL(i, e),\n n.promise\n );\n })\n );\n }\n createUrl(t, e) {\n var i,\n n,\n r = new s.defer(),\n o = window.URL || window.webkitURL || window.mozURL,\n a = e && e.base64;\n return t in this.urlCache\n ? (r.resolve(this.urlCache[t]), r.promise)\n : (a\n ? (n = this.getBase64(t)) &&\n n.then(\n function (e) {\n (this.urlCache[t] = e), r.resolve(e);\n }.bind(this),\n )\n : (n = this.getBlob(t)) &&\n n.then(\n function (e) {\n (i = o.createObjectURL(e)),\n (this.urlCache[t] = i),\n r.resolve(i);\n }.bind(this),\n ),\n n ||\n r.reject({\n message: \"File not found in storage: \" + t,\n stack: new Error().stack,\n }),\n r.promise);\n }\n revokeUrl(t) {\n var e = window.URL || window.webkitURL || window.mozURL,\n i = this.urlCache[t];\n i && e.revokeObjectURL(i);\n }\n destroy() {\n var t = window.URL || window.webkitURL || window.mozURL;\n for (let e in this.urlCache) t.revokeObjectURL(e);\n (this.urlCache = {}), this.removeListeners();\n }\n }\n r()(D.prototype);\n var P = D;\n var M = class {\n constructor(t) {\n (this.interactive = \"\"),\n (this.fixedLayout = \"\"),\n (this.openToSpread = \"\"),\n (this.orientationLock = \"\"),\n t && this.parse(t);\n }\n parse(t) {\n if (!t) return this;\n const e = Object(s.qs)(t, \"display_options\");\n if (!e) return this;\n return (\n Object(s.qsa)(e, \"option\").forEach((t) => {\n let e = \"\";\n switch (\n (t.childNodes.length && (e = t.childNodes[0].nodeValue),\n t.attributes.name.value)\n ) {\n case \"interactive\":\n this.interactive = e;\n break;\n case \"fixed-layout\":\n this.fixedLayout = e;\n break;\n case \"open-to-spread\":\n this.openToSpread = e;\n break;\n case \"orientation-lock\":\n this.orientationLock = e;\n }\n }),\n this\n );\n }\n destroy() {\n (this.interactive = void 0),\n (this.fixedLayout = void 0),\n (this.openToSpread = void 0),\n (this.orientationLock = void 0);\n }\n };\n const z = \"binary\",\n B = \"base64\",\n q = \"epub\",\n F = \"opf\",\n U = \"json\",\n W = \"directory\";\n class H {\n constructor(t, e) {\n void 0 === e &&\n \"string\" != typeof t &&\n t instanceof Blob == !1 &&\n t instanceof ArrayBuffer == !1 &&\n ((e = t), (t = void 0)),\n (this.settings = Object(s.extend)(this.settings || {}, {\n requestMethod: void 0,\n requestCredentials: void 0,\n requestHeaders: void 0,\n encoding: void 0,\n replacements: void 0,\n canonical: void 0,\n openAs: void 0,\n store: void 0,\n })),\n Object(s.extend)(this.settings, e),\n (this.opening = new s.defer()),\n (this.opened = this.opening.promise),\n (this.isOpen = !1),\n (this.loading = {\n manifest: new s.defer(),\n spine: new s.defer(),\n metadata: new s.defer(),\n cover: new s.defer(),\n navigation: new s.defer(),\n pageList: new s.defer(),\n resources: new s.defer(),\n displayOptions: new s.defer(),\n }),\n (this.loaded = {\n manifest: this.loading.manifest.promise,\n spine: this.loading.spine.promise,\n metadata: this.loading.metadata.promise,\n cover: this.loading.cover.promise,\n navigation: this.loading.navigation.promise,\n pageList: this.loading.pageList.promise,\n resources: this.loading.resources.promise,\n displayOptions: this.loading.displayOptions.promise,\n }),\n (this.ready = Promise.all([\n this.loaded.manifest,\n this.loaded.spine,\n this.loaded.metadata,\n this.loaded.cover,\n this.loaded.navigation,\n this.loaded.resources,\n this.loaded.displayOptions,\n ])),\n (this.isRendered = !1),\n (this.request = this.settings.requestMethod || u),\n (this.spine = new p()),\n (this.locations = new y(this.spine, this.load.bind(this))),\n (this.navigation = void 0),\n (this.pageList = void 0),\n (this.url = void 0),\n (this.path = void 0),\n (this.archived = !1),\n (this.archive = void 0),\n (this.storage = void 0),\n (this.resources = void 0),\n (this.rendition = void 0),\n (this.container = void 0),\n (this.packaging = void 0),\n (this.displayOptions = void 0),\n this.settings.store && this.store(this.settings.store),\n t &&\n this.open(t, this.settings.openAs).catch((e) => {\n var i = new Error(\"Cannot load book at \" + t);\n this.emit(m.c.BOOK.OPEN_FAILED, i);\n });\n }\n open(t, e) {\n var i,\n n = e || this.determineType(t);\n return (\n n === z\n ? ((this.archived = !0),\n (this.url = new o.a(\"/\", \"\")),\n (i = this.openEpub(t)))\n : n === B\n ? ((this.archived = !0),\n (this.url = new o.a(\"/\", \"\")),\n (i = this.openEpub(t, n)))\n : n === q\n ? ((this.archived = !0),\n (this.url = new o.a(\"/\", \"\")),\n (i = this.request(\n t,\n \"binary\",\n this.settings.requestCredentials,\n this.settings.requestHeaders,\n ).then(this.openEpub.bind(this))))\n : n == F\n ? ((this.url = new o.a(t)),\n (i = this.openPackaging(this.url.Path.toString())))\n : n == U\n ? ((this.url = new o.a(t)),\n (i = this.openManifest(this.url.Path.toString())))\n : ((this.url = new o.a(t)),\n (i = this.openContainer(\"META-INF/container.xml\").then(\n this.openPackaging.bind(this),\n ))),\n i\n );\n }\n openEpub(t, e) {\n return this.unarchive(t, e || this.settings.encoding)\n .then(() => this.openContainer(\"META-INF/container.xml\"))\n .then((t) => this.openPackaging(t));\n }\n openContainer(t) {\n return this.load(t).then(\n (t) => (\n (this.container = new x(t)),\n this.resolve(this.container.packagePath)\n ),\n );\n }\n openPackaging(t) {\n return (\n (this.path = new a.a(t)),\n this.load(t).then(\n (t) => ((this.packaging = new E(t)), this.unpack(this.packaging)),\n )\n );\n }\n openManifest(t) {\n return (\n (this.path = new a.a(t)),\n this.load(t).then(\n (t) => (\n (this.packaging = new E()),\n this.packaging.load(t),\n this.unpack(this.packaging)\n ),\n )\n );\n }\n load(t) {\n var e = this.resolve(t);\n return this.archived\n ? this.archive.request(e)\n : this.request(\n e,\n null,\n this.settings.requestCredentials,\n this.settings.requestHeaders,\n );\n }\n resolve(t, e) {\n if (t) {\n var i = t;\n return t.indexOf(\"://\") > -1\n ? t\n : (this.path && (i = this.path.resolve(t)),\n 0 != e && this.url && (i = this.url.resolve(i)),\n i);\n }\n }\n canonical(t) {\n return t\n ? this.settings.canonical\n ? this.settings.canonical(t)\n : this.resolve(t, !0)\n : \"\";\n }\n determineType(t) {\n var e;\n return \"base64\" === this.settings.encoding\n ? B\n : \"string\" != typeof t\n ? z\n : ((e = new o.a(t).path().extension) &&\n (e = e.replace(/\\?.*$/, \"\")),\n e\n ? \"epub\" === e\n ? q\n : \"opf\" === e\n ? F\n : \"json\" === e\n ? U\n : void 0\n : W);\n }\n unpack(t) {\n (this.package = t),\n \"\" === this.packaging.metadata.layout\n ? this.load(\n this.url.resolve(\n \"META-INF/com.apple.ibooks.display-options.xml\",\n ),\n )\n .then((t) => {\n (this.displayOptions = new M(t)),\n this.loading.displayOptions.resolve(this.displayOptions);\n })\n .catch((t) => {\n (this.displayOptions = new M()),\n this.loading.displayOptions.resolve(this.displayOptions);\n })\n : ((this.displayOptions = new M()),\n this.loading.displayOptions.resolve(this.displayOptions)),\n this.spine.unpack(\n this.packaging,\n this.resolve.bind(this),\n this.canonical.bind(this),\n ),\n (this.resources = new T(this.packaging.manifest, {\n archive: this.archive,\n resolver: this.resolve.bind(this),\n request: this.request.bind(this),\n replacements:\n this.settings.replacements ||\n (this.archived ? \"blobUrl\" : \"base64\"),\n })),\n this.loadNavigation(this.packaging).then(() => {\n this.loading.navigation.resolve(this.navigation);\n }),\n this.packaging.coverPath &&\n (this.cover = this.resolve(this.packaging.coverPath)),\n this.loading.manifest.resolve(this.packaging.manifest),\n this.loading.metadata.resolve(this.packaging.metadata),\n this.loading.spine.resolve(this.spine),\n this.loading.cover.resolve(this.cover),\n this.loading.resources.resolve(this.resources),\n this.loading.pageList.resolve(this.pageList),\n (this.isOpen = !0),\n this.archived ||\n (this.settings.replacements && \"none\" != this.settings.replacements)\n ? this.replacements()\n .then(() => {\n this.loaded.displayOptions.then(() => {\n this.opening.resolve(this);\n });\n })\n .catch((t) => {\n console.error(t);\n })\n : this.loaded.displayOptions.then(() => {\n this.opening.resolve(this);\n });\n }\n loadNavigation(t) {\n let e = t.navPath || t.ncxPath,\n i = t.toc;\n return i\n ? new Promise((e, n) => {\n (this.navigation = new S(i)),\n t.pageList && (this.pageList = new C(t.pageList)),\n e(this.navigation);\n })\n : e\n ? this.load(e, \"xml\").then(\n (t) => (\n (this.navigation = new S(t, e)),\n (this.pageList = new C(t)),\n this.navigation\n ),\n )\n : new Promise((t, e) => {\n (this.navigation = new S()),\n (this.pageList = new C()),\n t(this.navigation);\n });\n }\n section(t) {\n return this.spine.get(t);\n }\n renderTo(t, e) {\n return (\n (this.rendition = new I.a(this, e)),\n this.rendition.attachTo(t),\n this.rendition\n );\n }\n setRequestCredentials(t) {\n this.settings.requestCredentials = t;\n }\n setRequestHeaders(t) {\n this.settings.requestHeaders = t;\n }\n unarchive(t, e) {\n return (this.archive = new A()), this.archive.open(t, e);\n }\n store(t) {\n let e =\n this.settings.replacements &&\n \"none\" !== this.settings.replacements,\n i = this.url,\n n = this.settings.requestMethod || u.bind(this);\n return (\n (this.storage = new P(t, n, this.resolve.bind(this))),\n (this.request = this.storage.request.bind(this.storage)),\n this.opened.then(() => {\n this.archived &&\n (this.storage.requester = this.archive.request.bind(\n this.archive,\n ));\n let t = (t, e) => {\n e.output = this.resources.substitute(t, e.url);\n };\n (this.resources.settings.replacements = e || \"blobUrl\"),\n this.resources\n .replacements()\n .then(() => this.resources.replaceCss()),\n this.storage.on(\"offline\", () => {\n (this.url = new o.a(\"/\", \"\")),\n this.spine.hooks.serialize.register(t);\n }),\n this.storage.on(\"online\", () => {\n (this.url = i), this.spine.hooks.serialize.deregister(t);\n });\n }),\n this.storage\n );\n }\n coverUrl() {\n return this.loaded.cover.then(() =>\n this.cover\n ? this.archived\n ? this.archive.createUrl(this.cover)\n : this.cover\n : null,\n );\n }\n replacements() {\n return (\n this.spine.hooks.serialize.register((t, e) => {\n e.output = this.resources.substitute(t, e.url);\n }),\n this.resources\n .replacements()\n .then(() => this.resources.replaceCss())\n );\n }\n getRange(t) {\n var e = new h.a(t),\n i = this.spine.get(e.spinePos),\n n = this.load.bind(this);\n return i\n ? i.load(n).then(function (t) {\n return e.toRange(i.document);\n })\n : new Promise((t, e) => {\n e(\"CFI could not be found\");\n });\n }\n key(t) {\n var e = t || this.packaging.metadata.identifier || this.url.filename;\n return `epubjs:${m.b}:${e}`;\n }\n destroy() {\n (this.opened = void 0),\n (this.loading = void 0),\n (this.loaded = void 0),\n (this.ready = void 0),\n (this.isOpen = !1),\n (this.isRendered = !1),\n this.spine && this.spine.destroy(),\n this.locations && this.locations.destroy(),\n this.pageList && this.pageList.destroy(),\n this.archive && this.archive.destroy(),\n this.resources && this.resources.destroy(),\n this.container && this.container.destroy(),\n this.packaging && this.packaging.destroy(),\n this.rendition && this.rendition.destroy(),\n this.displayOptions && this.displayOptions.destroy(),\n (this.spine = void 0),\n (this.locations = void 0),\n (this.pageList = void 0),\n (this.archive = void 0),\n (this.resources = void 0),\n (this.container = void 0),\n (this.packaging = void 0),\n (this.rendition = void 0),\n (this.navigation = void 0),\n (this.url = void 0),\n (this.path = void 0),\n (this.archived = !1);\n }\n }\n r()(H.prototype);\n e.a = H;\n },\n function (t, e, i) {\n var n = i(26).NAMESPACE;\n function r(t) {\n return \"\" !== t;\n }\n function s(t, e) {\n return t.hasOwnProperty(e) || (t[e] = !0), t;\n }\n function o(t) {\n if (!t) return [];\n var e = (function (t) {\n return t ? t.split(/[\\t\\n\\f\\r ]+/).filter(r) : [];\n })(t);\n return Object.keys(e.reduce(s, {}));\n }\n function a(t, e) {\n for (var i in t) e[i] = t[i];\n }\n function h(t, e) {\n var i = t.prototype;\n if (!(i instanceof e)) {\n function n() {}\n (n.prototype = e.prototype),\n a(i, (n = new n())),\n (t.prototype = i = n);\n }\n i.constructor != t &&\n (\"function\" != typeof t && console.error(\"unknown Class:\" + t),\n (i.constructor = t));\n }\n var l = {},\n c = (l.ELEMENT_NODE = 1),\n u = (l.ATTRIBUTE_NODE = 2),\n d = (l.TEXT_NODE = 3),\n f = (l.CDATA_SECTION_NODE = 4),\n p = (l.ENTITY_REFERENCE_NODE = 5),\n g = (l.ENTITY_NODE = 6),\n m = (l.PROCESSING_INSTRUCTION_NODE = 7),\n v = (l.COMMENT_NODE = 8),\n y = (l.DOCUMENT_NODE = 9),\n b = (l.DOCUMENT_TYPE_NODE = 10),\n w = (l.DOCUMENT_FRAGMENT_NODE = 11),\n x = (l.NOTATION_NODE = 12),\n E = {},\n S = {},\n N =\n ((E.INDEX_SIZE_ERR = ((S[1] = \"Index size error\"), 1)),\n (E.DOMSTRING_SIZE_ERR = ((S[2] = \"DOMString size error\"), 2)),\n (E.HIERARCHY_REQUEST_ERR = ((S[3] = \"Hierarchy request error\"), 3))),\n _ =\n ((E.WRONG_DOCUMENT_ERR = ((S[4] = \"Wrong document\"), 4)),\n (E.INVALID_CHARACTER_ERR = ((S[5] = \"Invalid character\"), 5)),\n (E.NO_DATA_ALLOWED_ERR = ((S[6] = \"No data allowed\"), 6)),\n (E.NO_MODIFICATION_ALLOWED_ERR =\n ((S[7] = \"No modification allowed\"), 7)),\n (E.NOT_FOUND_ERR = ((S[8] = \"Not found\"), 8))),\n O =\n ((E.NOT_SUPPORTED_ERR = ((S[9] = \"Not supported\"), 9)),\n (E.INUSE_ATTRIBUTE_ERR = ((S[10] = \"Attribute in use\"), 10)));\n (E.INVALID_STATE_ERR = ((S[11] = \"Invalid state\"), 11)),\n (E.SYNTAX_ERR = ((S[12] = \"Syntax error\"), 12)),\n (E.INVALID_MODIFICATION_ERR = ((S[13] = \"Invalid modification\"), 13)),\n (E.NAMESPACE_ERR = ((S[14] = \"Invalid namespace\"), 14)),\n (E.INVALID_ACCESS_ERR = ((S[15] = \"Invalid access\"), 15));\n function T(t, e) {\n if (e instanceof Error) var i = e;\n else\n (i = this),\n Error.call(this, S[t]),\n (this.message = S[t]),\n Error.captureStackTrace && Error.captureStackTrace(this, T);\n return (i.code = t), e && (this.message = this.message + \": \" + e), i;\n }\n function C() {}\n function I(t, e) {\n (this._node = t), (this._refresh = e), k(this);\n }\n function k(t) {\n var e = t._node._inc || t._node.ownerDocument._inc;\n if (t._inc != e) {\n var i = t._refresh(t._node);\n at(t, \"length\", i.length), a(i, t), (t._inc = e);\n }\n }\n function R() {}\n function A(t, e) {\n for (var i = t.length; i--; ) if (t[i] === e) return i;\n }\n function L(t, e, i, r) {\n if ((r ? (e[A(e, r)] = i) : (e[e.length++] = i), t)) {\n i.ownerElement = t;\n var s = t.ownerDocument;\n s &&\n (r && q(s, t, r),\n (function (t, e, i) {\n t && t._inc++,\n i.namespaceURI === n.XMLNS &&\n (e._nsMap[i.prefix ? i.localName : \"\"] = i.value);\n })(s, t, i));\n }\n }\n function j(t, e, i) {\n var n = A(e, i);\n if (!(n >= 0)) throw T(_, new Error(t.tagName + \"@\" + i));\n for (var r = e.length - 1; n < r; ) e[n] = e[++n];\n if (((e.length = r), t)) {\n var s = t.ownerDocument;\n s && (q(s, t, i), (i.ownerElement = null));\n }\n }\n function D() {}\n function P() {}\n function M(t) {\n return (\n (\"<\" == t ? \"<\" : \">\" == t && \">\") ||\n (\"&\" == t && \"&\") ||\n ('\"' == t && \""\") ||\n \"&#\" + t.charCodeAt() + \";\"\n );\n }\n function z(t, e) {\n if (e(t)) return !0;\n if ((t = t.firstChild))\n do {\n if (z(t, e)) return !0;\n } while ((t = t.nextSibling));\n }\n function B() {}\n function q(t, e, i, r) {\n t && t._inc++,\n i.namespaceURI === n.XMLNS &&\n delete e._nsMap[i.prefix ? i.localName : \"\"];\n }\n function F(t, e, i) {\n if (t && t._inc) {\n t._inc++;\n var n = e.childNodes;\n if (i) n[n.length++] = i;\n else {\n for (var r = e.firstChild, s = 0; r; )\n (n[s++] = r), (r = r.nextSibling);\n n.length = s;\n }\n }\n }\n function U(t, e) {\n var i = e.previousSibling,\n n = e.nextSibling;\n return (\n i ? (i.nextSibling = n) : (t.firstChild = n),\n n ? (n.previousSibling = i) : (t.lastChild = i),\n F(t.ownerDocument, t),\n e\n );\n }\n function W(t, e, i) {\n var n = e.parentNode;\n if ((n && n.removeChild(e), e.nodeType === w)) {\n var r = e.firstChild;\n if (null == r) return e;\n var s = e.lastChild;\n } else r = s = e;\n var o = i ? i.previousSibling : t.lastChild;\n (r.previousSibling = o),\n (s.nextSibling = i),\n o ? (o.nextSibling = r) : (t.firstChild = r),\n null == i ? (t.lastChild = s) : (i.previousSibling = s);\n do {\n r.parentNode = t;\n } while (r !== s && (r = r.nextSibling));\n return (\n F(t.ownerDocument || t, t),\n e.nodeType == w && (e.firstChild = e.lastChild = null),\n e\n );\n }\n function H() {\n this._nsMap = {};\n }\n function V() {}\n function X() {}\n function G() {}\n function Y() {}\n function $() {}\n function K() {}\n function Z() {}\n function J() {}\n function Q() {}\n function tt() {}\n function et() {}\n function it() {}\n function nt(t, e) {\n var i = [],\n n = (9 == this.nodeType && this.documentElement) || this,\n r = n.prefix,\n s = n.namespaceURI;\n if (s && null == r && null == (r = n.lookupPrefix(s)))\n var o = [{ namespace: s, prefix: null }];\n return ot(this, i, t, e, o), i.join(\"\");\n }\n function rt(t, e, i) {\n var r = t.prefix || \"\",\n s = t.namespaceURI;\n if (!s) return !1;\n if ((\"xml\" === r && s === n.XML) || s === n.XMLNS) return !1;\n for (var o = i.length; o--; ) {\n var a = i[o];\n if (a.prefix === r) return a.namespace !== s;\n }\n return !0;\n }\n function st(t, e, i) {\n t.push(\" \", e, '=\"', i.replace(/[<&\"]/g, M), '\"');\n }\n function ot(t, e, i, r, s) {\n if ((s || (s = []), r)) {\n if (!(t = r(t))) return;\n if (\"string\" == typeof t) return void e.push(t);\n }\n switch (t.nodeType) {\n case c:\n var o = t.attributes,\n a = o.length,\n h = t.firstChild,\n l = t.tagName,\n g = l;\n if (\n !(i = n.isHTML(t.namespaceURI) || i) &&\n !t.prefix &&\n t.namespaceURI\n ) {\n for (var x, E = 0; E < o.length; E++)\n if (\"xmlns\" === o.item(E).name) {\n x = o.item(E).value;\n break;\n }\n if (!x)\n for (var S = s.length - 1; S >= 0; S--) {\n if (\n \"\" === (N = s[S]).prefix &&\n N.namespace === t.namespaceURI\n ) {\n x = N.namespace;\n break;\n }\n }\n if (x !== t.namespaceURI)\n for (S = s.length - 1; S >= 0; S--) {\n var N;\n if ((N = s[S]).namespace === t.namespaceURI) {\n N.prefix && (g = N.prefix + \":\" + l);\n break;\n }\n }\n }\n e.push(\"<\", g);\n for (var _ = 0; _ < a; _++) {\n \"xmlns\" == (O = o.item(_)).prefix\n ? s.push({ prefix: O.localName, namespace: O.value })\n : \"xmlns\" == O.nodeName &&\n s.push({ prefix: \"\", namespace: O.value });\n }\n for (_ = 0; _ < a; _++) {\n var O, T, C;\n if (rt((O = o.item(_)), 0, s))\n st(\n e,\n (T = O.prefix || \"\") ? \"xmlns:\" + T : \"xmlns\",\n (C = O.namespaceURI),\n ),\n s.push({ prefix: T, namespace: C });\n ot(O, e, i, r, s);\n }\n if (l === g && rt(t, 0, s))\n st(\n e,\n (T = t.prefix || \"\") ? \"xmlns:\" + T : \"xmlns\",\n (C = t.namespaceURI),\n ),\n s.push({ prefix: T, namespace: C });\n if (h || (i && !/^(?:meta|link|img|br|hr|input)$/i.test(l))) {\n if ((e.push(\">\"), i && /^script$/i.test(l)))\n for (; h; )\n h.data ? e.push(h.data) : ot(h, e, i, r, s.slice()),\n (h = h.nextSibling);\n else for (; h; ) ot(h, e, i, r, s.slice()), (h = h.nextSibling);\n e.push(\"</\", g, \">\");\n } else e.push(\"/>\");\n return;\n case y:\n case w:\n for (h = t.firstChild; h; )\n ot(h, e, i, r, s.slice()), (h = h.nextSibling);\n return;\n case u:\n return st(e, t.name, t.value);\n case d:\n return e.push(t.data.replace(/[<&]/g, M).replace(/]]>/g, \"]]>\"));\n case f:\n return e.push(\"<![CDATA[\", t.data, \"]]>\");\n case v:\n return e.push(\"\\x3c!--\", t.data, \"--\\x3e\");\n case b:\n var I = t.publicId,\n k = t.systemId;\n if ((e.push(\"<!DOCTYPE \", t.name), I))\n e.push(\" PUBLIC \", I),\n k && \".\" != k && e.push(\" \", k),\n e.push(\">\");\n else if (k && \".\" != k) e.push(\" SYSTEM \", k, \">\");\n else {\n var R = t.internalSubset;\n R && e.push(\" [\", R, \"]\"), e.push(\">\");\n }\n return;\n case m:\n return e.push(\"<?\", t.target, \" \", t.data, \"?>\");\n case p:\n return e.push(\"&\", t.nodeName, \";\");\n default:\n e.push(\"??\", t.nodeName);\n }\n }\n function at(t, e, i) {\n t[e] = i;\n }\n (T.prototype = Error.prototype),\n a(E, T),\n (C.prototype = {\n length: 0,\n item: function (t) {\n return this[t] || null;\n },\n toString: function (t, e) {\n for (var i = [], n = 0; n < this.length; n++) ot(this[n], i, t, e);\n return i.join(\"\");\n },\n }),\n (I.prototype.item = function (t) {\n return k(this), this[t];\n }),\n h(I, C),\n (R.prototype = {\n length: 0,\n item: C.prototype.item,\n getNamedItem: function (t) {\n for (var e = this.length; e--; ) {\n var i = this[e];\n if (i.nodeName == t) return i;\n }\n },\n setNamedItem: function (t) {\n var e = t.ownerElement;\n if (e && e != this._ownerElement) throw new T(O);\n var i = this.getNamedItem(t.nodeName);\n return L(this._ownerElement, this, t, i), i;\n },\n setNamedItemNS: function (t) {\n var e,\n i = t.ownerElement;\n if (i && i != this._ownerElement) throw new T(O);\n return (\n (e = this.getNamedItemNS(t.namespaceURI, t.localName)),\n L(this._ownerElement, this, t, e),\n e\n );\n },\n removeNamedItem: function (t) {\n var e = this.getNamedItem(t);\n return j(this._ownerElement, this, e), e;\n },\n removeNamedItemNS: function (t, e) {\n var i = this.getNamedItemNS(t, e);\n return j(this._ownerElement, this, i), i;\n },\n getNamedItemNS: function (t, e) {\n for (var i = this.length; i--; ) {\n var n = this[i];\n if (n.localName == e && n.namespaceURI == t) return n;\n }\n return null;\n },\n }),\n (D.prototype = {\n hasFeature: function (t, e) {\n return !0;\n },\n createDocument: function (t, e, i) {\n var n = new B();\n if (\n ((n.implementation = this),\n (n.childNodes = new C()),\n (n.doctype = i || null),\n i && n.appendChild(i),\n e)\n ) {\n var r = n.createElementNS(t, e);\n n.appendChild(r);\n }\n return n;\n },\n createDocumentType: function (t, e, i) {\n var n = new K();\n return (\n (n.name = t),\n (n.nodeName = t),\n (n.publicId = e || \"\"),\n (n.systemId = i || \"\"),\n n\n );\n },\n }),\n (P.prototype = {\n firstChild: null,\n lastChild: null,\n previousSibling: null,\n nextSibling: null,\n attributes: null,\n parentNode: null,\n childNodes: null,\n ownerDocument: null,\n nodeValue: null,\n namespaceURI: null,\n prefix: null,\n localName: null,\n insertBefore: function (t, e) {\n return W(this, t, e);\n },\n replaceChild: function (t, e) {\n this.insertBefore(t, e), e && this.removeChild(e);\n },\n removeChild: function (t) {\n return U(this, t);\n },\n appendChild: function (t) {\n return this.insertBefore(t, null);\n },\n hasChildNodes: function () {\n return null != this.firstChild;\n },\n cloneNode: function (t) {\n return (function t(e, i, n) {\n var r = new i.constructor();\n for (var s in i) {\n var o = i[s];\n \"object\" != typeof o && o != r[s] && (r[s] = o);\n }\n i.childNodes && (r.childNodes = new C());\n switch (((r.ownerDocument = e), r.nodeType)) {\n case c:\n var a = i.attributes,\n h = (r.attributes = new R()),\n l = a.length;\n h._ownerElement = r;\n for (var d = 0; d < l; d++)\n r.setAttributeNode(t(e, a.item(d), !0));\n break;\n case u:\n n = !0;\n }\n if (n)\n for (var f = i.firstChild; f; )\n r.appendChild(t(e, f, n)), (f = f.nextSibling);\n return r;\n })(this.ownerDocument || this, this, t);\n },\n normalize: function () {\n for (var t = this.firstChild; t; ) {\n var e = t.nextSibling;\n e && e.nodeType == d && t.nodeType == d\n ? (this.removeChild(e), t.appendData(e.data))\n : (t.normalize(), (t = e));\n }\n },\n isSupported: function (t, e) {\n return this.ownerDocument.implementation.hasFeature(t, e);\n },\n hasAttributes: function () {\n return this.attributes.length > 0;\n },\n lookupPrefix: function (t) {\n for (var e = this; e; ) {\n var i = e._nsMap;\n if (i) for (var n in i) if (i[n] == t) return n;\n e = e.nodeType == u ? e.ownerDocument : e.parentNode;\n }\n return null;\n },\n lookupNamespaceURI: function (t) {\n for (var e = this; e; ) {\n var i = e._nsMap;\n if (i && t in i) return i[t];\n e = e.nodeType == u ? e.ownerDocument : e.parentNode;\n }\n return null;\n },\n isDefaultNamespace: function (t) {\n return null == this.lookupPrefix(t);\n },\n }),\n a(l, P),\n a(l, P.prototype),\n (B.prototype = {\n nodeName: \"#document\",\n nodeType: y,\n doctype: null,\n documentElement: null,\n _inc: 1,\n insertBefore: function (t, e) {\n if (t.nodeType == w) {\n for (var i = t.firstChild; i; ) {\n var n = i.nextSibling;\n this.insertBefore(i, e), (i = n);\n }\n return t;\n }\n return (\n null == this.documentElement &&\n t.nodeType == c &&\n (this.documentElement = t),\n W(this, t, e),\n (t.ownerDocument = this),\n t\n );\n },\n removeChild: function (t) {\n return (\n this.documentElement == t && (this.documentElement = null),\n U(this, t)\n );\n },\n importNode: function (t, e) {\n return (function t(e, i, n) {\n var r;\n switch (i.nodeType) {\n case c:\n (r = i.cloneNode(!1)).ownerDocument = e;\n case w:\n break;\n case u:\n n = !0;\n }\n r || (r = i.cloneNode(!1));\n if (((r.ownerDocument = e), (r.parentNode = null), n))\n for (var s = i.firstChild; s; )\n r.appendChild(t(e, s, n)), (s = s.nextSibling);\n return r;\n })(this, t, e);\n },\n getElementById: function (t) {\n var e = null;\n return (\n z(this.documentElement, function (i) {\n if (i.nodeType == c && i.getAttribute(\"id\") == t)\n return (e = i), !0;\n }),\n e\n );\n },\n getElementsByClassName: function (t) {\n var e = o(t);\n return new I(this, function (i) {\n var n = [];\n return (\n e.length > 0 &&\n z(i.documentElement, function (r) {\n if (r !== i && r.nodeType === c) {\n var s = r.getAttribute(\"class\");\n if (s) {\n var a = t === s;\n if (!a) {\n var h = o(s);\n a = e.every(\n ((l = h),\n function (t) {\n return l && -1 !== l.indexOf(t);\n }),\n );\n }\n a && n.push(r);\n }\n }\n var l;\n }),\n n\n );\n });\n },\n createElement: function (t) {\n var e = new H();\n return (\n (e.ownerDocument = this),\n (e.nodeName = t),\n (e.tagName = t),\n (e.localName = t),\n (e.childNodes = new C()),\n ((e.attributes = new R())._ownerElement = e),\n e\n );\n },\n createDocumentFragment: function () {\n var t = new tt();\n return (t.ownerDocument = this), (t.childNodes = new C()), t;\n },\n createTextNode: function (t) {\n var e = new G();\n return (e.ownerDocument = this), e.appendData(t), e;\n },\n createComment: function (t) {\n var e = new Y();\n return (e.ownerDocument = this), e.appendData(t), e;\n },\n createCDATASection: function (t) {\n var e = new $();\n return (e.ownerDocument = this), e.appendData(t), e;\n },\n createProcessingInstruction: function (t, e) {\n var i = new et();\n return (\n (i.ownerDocument = this),\n (i.tagName = i.target = t),\n (i.nodeValue = i.data = e),\n i\n );\n },\n createAttribute: function (t) {\n var e = new V();\n return (\n (e.ownerDocument = this),\n (e.name = t),\n (e.nodeName = t),\n (e.localName = t),\n (e.specified = !0),\n e\n );\n },\n createEntityReference: function (t) {\n var e = new Q();\n return (e.ownerDocument = this), (e.nodeName = t), e;\n },\n createElementNS: function (t, e) {\n var i = new H(),\n n = e.split(\":\"),\n r = (i.attributes = new R());\n return (\n (i.childNodes = new C()),\n (i.ownerDocument = this),\n (i.nodeName = e),\n (i.tagName = e),\n (i.namespaceURI = t),\n 2 == n.length\n ? ((i.prefix = n[0]), (i.localName = n[1]))\n : (i.localName = e),\n (r._ownerElement = i),\n i\n );\n },\n createAttributeNS: function (t, e) {\n var i = new V(),\n n = e.split(\":\");\n return (\n (i.ownerDocument = this),\n (i.nodeName = e),\n (i.name = e),\n (i.namespaceURI = t),\n (i.specified = !0),\n 2 == n.length\n ? ((i.prefix = n[0]), (i.localName = n[1]))\n : (i.localName = e),\n i\n );\n },\n }),\n h(B, P),\n (H.prototype = {\n nodeType: c,\n hasAttribute: function (t) {\n return null != this.getAttributeNode(t);\n },\n getAttribute: function (t) {\n var e = this.getAttributeNode(t);\n return (e && e.value) || \"\";\n },\n getAttributeNode: function (t) {\n return this.attributes.getNamedItem(t);\n },\n setAttribute: function (t, e) {\n var i = this.ownerDocument.createAttribute(t);\n (i.value = i.nodeValue = \"\" + e), this.setAttributeNode(i);\n },\n removeAttribute: function (t) {\n var e = this.getAttributeNode(t);\n e && this.removeAttributeNode(e);\n },\n appendChild: function (t) {\n return t.nodeType === w\n ? this.insertBefore(t, null)\n : (function (t, e) {\n var i = e.parentNode;\n if (i) {\n var n = t.lastChild;\n i.removeChild(e);\n n = t.lastChild;\n }\n return (\n (n = t.lastChild),\n (e.parentNode = t),\n (e.previousSibling = n),\n (e.nextSibling = null),\n n ? (n.nextSibling = e) : (t.firstChild = e),\n (t.lastChild = e),\n F(t.ownerDocument, t, e),\n e\n );\n })(this, t);\n },\n setAttributeNode: function (t) {\n return this.attributes.setNamedItem(t);\n },\n setAttributeNodeNS: function (t) {\n return this.attributes.setNamedItemNS(t);\n },\n removeAttributeNode: function (t) {\n return this.attributes.removeNamedItem(t.nodeName);\n },\n removeAttributeNS: function (t, e) {\n var i = this.getAttributeNodeNS(t, e);\n i && this.removeAttributeNode(i);\n },\n hasAttributeNS: function (t, e) {\n return null != this.getAttributeNodeNS(t, e);\n },\n getAttributeNS: function (t, e) {\n var i = this.getAttributeNodeNS(t, e);\n return (i && i.value) || \"\";\n },\n setAttributeNS: function (t, e, i) {\n var n = this.ownerDocument.createAttributeNS(t, e);\n (n.value = n.nodeValue = \"\" + i), this.setAttributeNode(n);\n },\n getAttributeNodeNS: function (t, e) {\n return this.attributes.getNamedItemNS(t, e);\n },\n getElementsByTagName: function (t) {\n return new I(this, function (e) {\n var i = [];\n return (\n z(e, function (n) {\n n === e ||\n n.nodeType != c ||\n (\"*\" !== t && n.tagName != t) ||\n i.push(n);\n }),\n i\n );\n });\n },\n getElementsByTagNameNS: function (t, e) {\n return new I(this, function (i) {\n var n = [];\n return (\n z(i, function (r) {\n r === i ||\n r.nodeType !== c ||\n (\"*\" !== t && r.namespaceURI !== t) ||\n (\"*\" !== e && r.localName != e) ||\n n.push(r);\n }),\n n\n );\n });\n },\n }),\n (B.prototype.getElementsByTagName = H.prototype.getElementsByTagName),\n (B.prototype.getElementsByTagNameNS =\n H.prototype.getElementsByTagNameNS),\n h(H, P),\n (V.prototype.nodeType = u),\n h(V, P),\n (X.prototype = {\n data: \"\",\n substringData: function (t, e) {\n return this.data.substring(t, t + e);\n },\n appendData: function (t) {\n (t = this.data + t),\n (this.nodeValue = this.data = t),\n (this.length = t.length);\n },\n insertData: function (t, e) {\n this.replaceData(t, 0, e);\n },\n appendChild: function (t) {\n throw new Error(S[N]);\n },\n deleteData: function (t, e) {\n this.replaceData(t, e, \"\");\n },\n replaceData: function (t, e, i) {\n (i = this.data.substring(0, t) + i + this.data.substring(t + e)),\n (this.nodeValue = this.data = i),\n (this.length = i.length);\n },\n }),\n h(X, P),\n (G.prototype = {\n nodeName: \"#text\",\n nodeType: d,\n splitText: function (t) {\n var e = this.data,\n i = e.substring(t);\n (e = e.substring(0, t)),\n (this.data = this.nodeValue = e),\n (this.length = e.length);\n var n = this.ownerDocument.createTextNode(i);\n return (\n this.parentNode &&\n this.parentNode.insertBefore(n, this.nextSibling),\n n\n );\n },\n }),\n h(G, X),\n (Y.prototype = { nodeName: \"#comment\", nodeType: v }),\n h(Y, X),\n ($.prototype = { nodeName: \"#cdata-section\", nodeType: f }),\n h($, X),\n (K.prototype.nodeType = b),\n h(K, P),\n (Z.prototype.nodeType = x),\n h(Z, P),\n (J.prototype.nodeType = g),\n h(J, P),\n (Q.prototype.nodeType = p),\n h(Q, P),\n (tt.prototype.nodeName = \"#document-fragment\"),\n (tt.prototype.nodeType = w),\n h(tt, P),\n (et.prototype.nodeType = m),\n h(et, P),\n (it.prototype.serializeToString = function (t, e, i) {\n return nt.call(t, e, i);\n }),\n (P.prototype.toString = nt);\n try {\n if (Object.defineProperty) {\n Object.defineProperty(I.prototype, \"length\", {\n get: function () {\n return k(this), this.$$length;\n },\n }),\n Object.defineProperty(P.prototype, \"textContent\", {\n get: function () {\n return (function t(e) {\n switch (e.nodeType) {\n case c:\n case w:\n var i = [];\n for (e = e.firstChild; e; )\n 7 !== e.nodeType && 8 !== e.nodeType && i.push(t(e)),\n (e = e.nextSibling);\n return i.join(\"\");\n default:\n return e.nodeValue;\n }\n })(this);\n },\n set: function (t) {\n switch (this.nodeType) {\n case c:\n case w:\n for (; this.firstChild; ) this.removeChild(this.firstChild);\n (t || String(t)) &&\n this.appendChild(this.ownerDocument.createTextNode(t));\n break;\n default:\n (this.data = t), (this.value = t), (this.nodeValue = t);\n }\n },\n }),\n (at = function (t, e, i) {\n t[\"$$\" + e] = i;\n });\n }\n } catch (t) {}\n (e.DocumentType = K),\n (e.DOMException = T),\n (e.DOMImplementation = D),\n (e.Element = H),\n (e.Node = P),\n (e.NodeList = C),\n (e.XMLSerializer = it);\n },\n function (t, e, i) {\n var n = i(13),\n r = i(52),\n s = i(32),\n o = i(27),\n a = i(55),\n h = i(12),\n l = i(61),\n c = Object.getOwnPropertyDescriptor;\n e.f = n\n ? c\n : function (t, e) {\n if (((t = o(t)), (e = a(e)), l))\n try {\n return c(t, e);\n } catch (t) {}\n if (h(t, e)) return s(!r.f.call(t, e), t[e]);\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = {}.propertyIsEnumerable,\n r = Object.getOwnPropertyDescriptor,\n s = r && !n.call({ 1: 2 }, 1);\n e.f = s\n ? function (t) {\n var e = r(this, t);\n return !!e && e.enumerable;\n }\n : n;\n },\n function (t, e, i) {\n var n = i(11),\n r = i(97),\n s = \"\".split;\n t.exports = n(function () {\n return !Object(\"z\").propertyIsEnumerable(0);\n })\n ? function (t) {\n return \"String\" == r(t) ? s.call(t, \"\") : Object(t);\n }\n : Object;\n },\n function (t, e) {\n t.exports = function (t) {\n if (null == t) throw TypeError(\"Can't call method on \" + t);\n return t;\n };\n },\n function (t, e, i) {\n var n = i(98),\n r = i(56);\n t.exports = function (t) {\n var e = n(t, \"string\");\n return r(e) ? e : String(e);\n };\n },\n function (t, e, i) {\n var n = i(7),\n r = i(19),\n s = i(57);\n t.exports = s\n ? function (t) {\n return \"symbol\" == typeof t;\n }\n : function (t) {\n var e = r(\"Symbol\");\n return n(e) && Object(t) instanceof e;\n };\n },\n function (t, e, i) {\n var n = i(58);\n t.exports = n && !Symbol.sham && \"symbol\" == typeof Symbol.iterator;\n },\n function (t, e, i) {\n var n = i(99),\n r = i(11);\n t.exports =\n !!Object.getOwnPropertySymbols &&\n !r(function () {\n var t = Symbol();\n return (\n !String(t) ||\n !(Object(t) instanceof Symbol) ||\n (!Symbol.sham && n && n < 41)\n );\n });\n },\n function (t, e, i) {\n var n = i(33),\n r = i(34);\n (t.exports = function (t, e) {\n return r[t] || (r[t] = void 0 !== e ? e : {});\n })(\"versions\", []).push({\n version: \"3.18.3\",\n mode: n ? \"pure\" : \"global\",\n copyright: \"\u00A9 2021 Denis Pushkarev (zloirock.ru)\",\n });\n },\n function (t, e) {\n var i = 0,\n n = Math.random();\n t.exports = function (t) {\n return (\n \"Symbol(\" +\n String(void 0 === t ? \"\" : t) +\n \")_\" +\n (++i + n).toString(36)\n );\n };\n },\n function (t, e, i) {\n var n = i(13),\n r = i(11),\n s = i(37);\n t.exports =\n !n &&\n !r(function () {\n return (\n 7 !=\n Object.defineProperty(s(\"div\"), \"a\", {\n get: function () {\n return 7;\n },\n }).a\n );\n });\n },\n function (t, e, i) {\n var n = i(7),\n r = i(34),\n s = Function.toString;\n n(r.inspectSource) ||\n (r.inspectSource = function (t) {\n return s.call(t);\n }),\n (t.exports = r.inspectSource);\n },\n function (t, e, i) {\n var n,\n r,\n s,\n o = i(105),\n a = i(9),\n h = i(18),\n l = i(20),\n c = i(12),\n u = i(34),\n d = i(39),\n f = i(40),\n p = a.WeakMap;\n if (o || u.state) {\n var g = u.state || (u.state = new p()),\n m = g.get,\n v = g.has,\n y = g.set;\n (n = function (t, e) {\n if (v.call(g, t)) throw new TypeError(\"Object already initialized\");\n return (e.facade = t), y.call(g, t, e), e;\n }),\n (r = function (t) {\n return m.call(g, t) || {};\n }),\n (s = function (t) {\n return v.call(g, t);\n });\n } else {\n var b = d(\"state\");\n (f[b] = !0),\n (n = function (t, e) {\n if (c(t, b)) throw new TypeError(\"Object already initialized\");\n return (e.facade = t), l(t, b, e), e;\n }),\n (r = function (t) {\n return c(t, b) ? t[b] : {};\n }),\n (s = function (t) {\n return c(t, b);\n });\n }\n t.exports = {\n set: n,\n get: r,\n has: s,\n enforce: function (t) {\n return s(t) ? r(t) : n(t, {});\n },\n getterFor: function (t) {\n return function (e) {\n var i;\n if (!h(e) || (i = r(e)).type !== t)\n throw TypeError(\"Incompatible receiver, \" + t + \" required\");\n return i;\n };\n },\n };\n },\n function (t, e, i) {\n var n = i(13),\n r = i(12),\n s = Function.prototype,\n o = n && Object.getOwnPropertyDescriptor,\n a = r(s, \"name\"),\n h = a && \"something\" === function () {}.name,\n l = a && (!n || (n && o(s, \"name\").configurable));\n t.exports = { EXISTS: a, PROPER: h, CONFIGURABLE: l };\n },\n function (t, e, i) {\n var n = i(12),\n r = i(27),\n s = i(109).indexOf,\n o = i(40);\n t.exports = function (t, e) {\n var i,\n a = r(t),\n h = 0,\n l = [];\n for (i in a) !n(o, i) && n(a, i) && l.push(i);\n for (; e.length > h; ) n(a, (i = e[h++])) && (~s(l, i) || l.push(i));\n return l;\n };\n },\n function (t, e) {\n var i = Math.ceil,\n n = Math.floor;\n t.exports = function (t) {\n var e = +t;\n return e != e || 0 === e ? 0 : (e > 0 ? n : i)(e);\n };\n },\n function (t, e) {\n e.f = Object.getOwnPropertySymbols;\n },\n function (t, e, i) {\n var n = i(9),\n r = i(114),\n s = i(115),\n o = i(116),\n a = i(20),\n h = i(14),\n l = h(\"iterator\"),\n c = h(\"toStringTag\"),\n u = o.values,\n d = function (t, e) {\n if (t) {\n if (t[l] !== u)\n try {\n a(t, l, u);\n } catch (e) {\n t[l] = u;\n }\n if ((t[c] || a(t, c, e), r[e]))\n for (var i in o)\n if (t[i] !== o[i])\n try {\n a(t, i, o[i]);\n } catch (e) {\n t[i] = o[i];\n }\n }\n };\n for (var f in r) d(n[f] && n[f].prototype, f);\n d(s, \"DOMTokenList\");\n },\n function (t, e, i) {\n var n = i(65),\n r = i(41);\n t.exports =\n Object.keys ||\n function (t) {\n return n(t, r);\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n,\n r,\n s,\n o = i(11),\n a = i(7),\n h = i(42),\n l = i(71),\n c = i(38),\n u = i(14),\n d = i(33),\n f = u(\"iterator\"),\n p = !1;\n [].keys &&\n (\"next\" in (s = [].keys())\n ? (r = l(l(s))) !== Object.prototype && (n = r)\n : (p = !0)),\n null == n ||\n o(function () {\n var t = {};\n return n[f].call(t) !== t;\n })\n ? (n = {})\n : d && (n = h(n)),\n a(n[f]) ||\n c(n, f, function () {\n return this;\n }),\n (t.exports = { IteratorPrototype: n, BUGGY_SAFARI_ITERATORS: p });\n },\n function (t, e, i) {\n var n = i(12),\n r = i(7),\n s = i(36),\n o = i(39),\n a = i(122),\n h = o(\"IE_PROTO\"),\n l = Object.prototype;\n t.exports = a\n ? Object.getPrototypeOf\n : function (t) {\n var e = s(t);\n if (n(e, h)) return e[h];\n var i = e.constructor;\n return r(i) && e instanceof i\n ? i.prototype\n : e instanceof Object\n ? l\n : null;\n };\n },\n function (t, e, i) {\n var n = i(21).f,\n r = i(12),\n s = i(14)(\"toStringTag\");\n t.exports = function (t, e, i) {\n t &&\n !r((t = i ? t : t.prototype), s) &&\n n(t, s, { configurable: !0, value: e });\n };\n },\n function (t, e, i) {\n var n = i(130),\n r = \"object\" == typeof self && self && self.Object === Object && self,\n s = n || r || Function(\"return this\")();\n t.exports = s;\n },\n function (t, e, i) {\n var n = i(73).Symbol;\n t.exports = n;\n },\n function (t, e, i) {\n var n = i(46),\n r = i(44);\n t.exports = function (t, e, i) {\n var s = !0,\n o = !0;\n if (\"function\" != typeof t) throw new TypeError(\"Expected a function\");\n return (\n r(i) &&\n ((s = \"leading\" in i ? !!i.leading : s),\n (o = \"trailing\" in i ? !!i.trailing : o)),\n n(t, e, { leading: s, maxWait: e, trailing: o })\n );\n };\n },\n function (e, i) {\n e.exports = t;\n },\n function (t, e, i) {\n \"use strict\";\n i.r(e),\n function (t) {\n var n = i(49),\n r = i(29),\n s = i(2),\n o = i(23),\n a = i(0),\n h = i(1);\n i(45), i(16), i(47);\n function l(t, e) {\n return new n.a(t, e);\n }\n (l.VERSION = h.b),\n void 0 !== t && (t.EPUBJS_VERSION = h.b),\n (l.Book = n.a),\n (l.Rendition = r.a),\n (l.Contents = o.a),\n (l.CFI = s.a),\n (l.utils = a),\n (e.default = l);\n }.call(this, i(25));\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(79),\n r = i(87),\n s = i(88),\n o = i(89);\n (t.exports = function (t, e) {\n var i, s, a, h, l;\n return (\n arguments.length < 2 || \"string\" != typeof t\n ? ((h = e), (e = t), (t = null))\n : (h = arguments[2]),\n null == t\n ? ((i = a = !0), (s = !1))\n : ((i = o.call(t, \"c\")),\n (s = o.call(t, \"e\")),\n (a = o.call(t, \"w\"))),\n (l = { value: e, configurable: i, enumerable: s, writable: a }),\n h ? n(r(h), l) : l\n );\n }).gs = function (t, e, i) {\n var a, h, l, c;\n return (\n \"string\" != typeof t\n ? ((l = i), (i = e), (e = t), (t = null))\n : (l = arguments[3]),\n null == e\n ? (e = void 0)\n : s(e)\n ? null == i\n ? (i = void 0)\n : s(i) || ((l = i), (i = void 0))\n : ((l = e), (e = i = void 0)),\n null == t\n ? ((a = !0), (h = !1))\n : ((a = o.call(t, \"c\")), (h = o.call(t, \"e\"))),\n (c = { get: e, set: i, configurable: a, enumerable: h }),\n l ? n(r(l), c) : c\n );\n };\n },\n function (t, e, i) {\n \"use strict\";\n t.exports = i(80)() ? Object.assign : i(81);\n },\n function (t, e, i) {\n \"use strict\";\n t.exports = function () {\n var t,\n e = Object.assign;\n return (\n \"function\" == typeof e &&\n (e((t = { foo: \"raz\" }), { bar: \"dwa\" }, { trzy: \"trzy\" }),\n t.foo + t.bar + t.trzy === \"razdwatrzy\")\n );\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(82),\n r = i(86),\n s = Math.max;\n t.exports = function (t, e) {\n var i,\n o,\n a,\n h = s(arguments.length, 2);\n for (\n t = Object(r(t)),\n a = function (n) {\n try {\n t[n] = e[n];\n } catch (t) {\n i || (i = t);\n }\n },\n o = 1;\n o < h;\n ++o\n )\n n((e = arguments[o])).forEach(a);\n if (void 0 !== i) throw i;\n return t;\n };\n },\n function (t, e, i) {\n \"use strict\";\n t.exports = i(83)() ? Object.keys : i(84);\n },\n function (t, e, i) {\n \"use strict\";\n t.exports = function () {\n try {\n return Object.keys(\"primitive\"), !0;\n } catch (t) {\n return !1;\n }\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(30),\n r = Object.keys;\n t.exports = function (t) {\n return r(n(t) ? Object(t) : t);\n };\n },\n function (t, e, i) {\n \"use strict\";\n t.exports = function () {};\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(30);\n t.exports = function (t) {\n if (!n(t)) throw new TypeError(\"Cannot use null or undefined\");\n return t;\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(30),\n r = Array.prototype.forEach,\n s = Object.create,\n o = function (t, e) {\n var i;\n for (i in t) e[i] = t[i];\n };\n t.exports = function (t) {\n var e = s(null);\n return (\n r.call(arguments, function (t) {\n n(t) && o(Object(t), e);\n }),\n e\n );\n };\n },\n function (t, e, i) {\n \"use strict\";\n t.exports = function (t) {\n return \"function\" == typeof t;\n };\n },\n function (t, e, i) {\n \"use strict\";\n t.exports = i(90)() ? String.prototype.contains : i(91);\n },\n function (t, e, i) {\n \"use strict\";\n var n = \"razdwatrzy\";\n t.exports = function () {\n return (\n \"function\" == typeof n.contains &&\n !0 === n.contains(\"dwa\") &&\n !1 === n.contains(\"foo\")\n );\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = String.prototype.indexOf;\n t.exports = function (t) {\n return n.call(this, t, arguments[1]) > -1;\n };\n },\n function (t, e, i) {\n \"use strict\";\n t.exports = function (t) {\n if (\"function\" != typeof t)\n throw new TypeError(t + \" is not a function\");\n return t;\n };\n },\n function (t, e, i) {\n var n = i(26),\n r = i(50),\n s = i(94),\n o = i(95),\n a = r.DOMImplementation,\n h = n.NAMESPACE,\n l = o.ParseError,\n c = o.XMLReader;\n function u(t) {\n this.options = t || { locator: {} };\n }\n function d() {\n this.cdata = !1;\n }\n function f(t, e) {\n (e.lineNumber = t.lineNumber), (e.columnNumber = t.columnNumber);\n }\n function p(t) {\n if (t)\n return (\n \"\\n@\" +\n (t.systemId || \"\") +\n \"#[line:\" +\n t.lineNumber +\n \",col:\" +\n t.columnNumber +\n \"]\"\n );\n }\n function g(t, e, i) {\n return \"string\" == typeof t\n ? t.substr(e, i)\n : t.length >= e + i || e\n ? new java.lang.String(t, e, i) + \"\"\n : t;\n }\n function m(t, e) {\n t.currentElement\n ? t.currentElement.appendChild(e)\n : t.doc.appendChild(e);\n }\n (u.prototype.parseFromString = function (t, e) {\n var i = this.options,\n n = new c(),\n r = i.domBuilder || new d(),\n o = i.errorHandler,\n a = i.locator,\n l = i.xmlns || {},\n u = /\\/x?html?$/.test(e),\n f = u ? s.HTML_ENTITIES : s.XML_ENTITIES;\n return (\n a && r.setDocumentLocator(a),\n (n.errorHandler = (function (t, e, i) {\n if (!t) {\n if (e instanceof d) return e;\n t = e;\n }\n var n = {},\n r = t instanceof Function;\n function s(e) {\n var s = t[e];\n !s &&\n r &&\n (s =\n 2 == t.length\n ? function (i) {\n t(e, i);\n }\n : t),\n (n[e] =\n (s &&\n function (t) {\n s(\"[xmldom \" + e + \"]\\t\" + t + p(i));\n }) ||\n function () {});\n }\n return (i = i || {}), s(\"warning\"), s(\"error\"), s(\"fatalError\"), n;\n })(o, r, a)),\n (n.domBuilder = i.domBuilder || r),\n u && (l[\"\"] = h.HTML),\n (l.xml = l.xml || h.XML),\n t && \"string\" == typeof t\n ? n.parse(t, l, f)\n : n.errorHandler.error(\"invalid doc source\"),\n r.doc\n );\n }),\n (d.prototype = {\n startDocument: function () {\n (this.doc = new a().createDocument(null, null, null)),\n this.locator && (this.doc.documentURI = this.locator.systemId);\n },\n startElement: function (t, e, i, n) {\n var r = this.doc,\n s = r.createElementNS(t, i || e),\n o = n.length;\n m(this, s),\n (this.currentElement = s),\n this.locator && f(this.locator, s);\n for (var a = 0; a < o; a++) {\n t = n.getURI(a);\n var h = n.getValue(a),\n l = ((i = n.getQName(a)), r.createAttributeNS(t, i));\n this.locator && f(n.getLocator(a), l),\n (l.value = l.nodeValue = h),\n s.setAttributeNode(l);\n }\n },\n endElement: function (t, e, i) {\n var n = this.currentElement;\n n.tagName;\n this.currentElement = n.parentNode;\n },\n startPrefixMapping: function (t, e) {},\n endPrefixMapping: function (t) {},\n processingInstruction: function (t, e) {\n var i = this.doc.createProcessingInstruction(t, e);\n this.locator && f(this.locator, i), m(this, i);\n },\n ignorableWhitespace: function (t, e, i) {},\n characters: function (t, e, i) {\n if ((t = g.apply(this, arguments))) {\n if (this.cdata) var n = this.doc.createCDATASection(t);\n else n = this.doc.createTextNode(t);\n this.currentElement\n ? this.currentElement.appendChild(n)\n : /^\\s*$/.test(t) && this.doc.appendChild(n),\n this.locator && f(this.locator, n);\n }\n },\n skippedEntity: function (t) {},\n endDocument: function () {\n this.doc.normalize();\n },\n setDocumentLocator: function (t) {\n (this.locator = t) && (t.lineNumber = 0);\n },\n comment: function (t, e, i) {\n t = g.apply(this, arguments);\n var n = this.doc.createComment(t);\n this.locator && f(this.locator, n), m(this, n);\n },\n startCDATA: function () {\n this.cdata = !0;\n },\n endCDATA: function () {\n this.cdata = !1;\n },\n startDTD: function (t, e, i) {\n var n = this.doc.implementation;\n if (n && n.createDocumentType) {\n var r = n.createDocumentType(t, e, i);\n this.locator && f(this.locator, r),\n m(this, r),\n (this.doc.doctype = r);\n }\n },\n warning: function (t) {\n console.warn(\"[xmldom warning]\\t\" + t, p(this.locator));\n },\n error: function (t) {\n console.error(\"[xmldom error]\\t\" + t, p(this.locator));\n },\n fatalError: function (t) {\n throw new l(t, this.locator);\n },\n }),\n \"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(\n /\\w+/g,\n function (t) {\n d.prototype[t] = function () {\n return null;\n };\n },\n ),\n (e.__DOMHandler = d),\n (e.DOMParser = u),\n (e.DOMImplementation = r.DOMImplementation),\n (e.XMLSerializer = r.XMLSerializer);\n },\n function (t, e, i) {\n var n = i(26).freeze;\n (e.XML_ENTITIES = n({\n amp: \"&\",\n apos: \"'\",\n gt: \">\",\n lt: \"<\",\n quot: '\"',\n })),\n (e.HTML_ENTITIES = n({\n lt: \"<\",\n gt: \">\",\n amp: \"&\",\n quot: '\"',\n apos: \"'\",\n Agrave: \"\u00C0\",\n Aacute: \"\u00C1\",\n Acirc: \"\u00C2\",\n Atilde: \"\u00C3\",\n Auml: \"\u00C4\",\n Aring: \"\u00C5\",\n AElig: \"\u00C6\",\n Ccedil: \"\u00C7\",\n Egrave: \"\u00C8\",\n Eacute: \"\u00C9\",\n Ecirc: \"\u00CA\",\n Euml: \"\u00CB\",\n Igrave: \"\u00CC\",\n Iacute: \"\u00CD\",\n Icirc: \"\u00CE\",\n Iuml: \"\u00CF\",\n ETH: \"\u00D0\",\n Ntilde: \"\u00D1\",\n Ograve: \"\u00D2\",\n Oacute: \"\u00D3\",\n Ocirc: \"\u00D4\",\n Otilde: \"\u00D5\",\n Ouml: \"\u00D6\",\n Oslash: \"\u00D8\",\n Ugrave: \"\u00D9\",\n Uacute: \"\u00DA\",\n Ucirc: \"\u00DB\",\n Uuml: \"\u00DC\",\n Yacute: \"\u00DD\",\n THORN: \"\u00DE\",\n szlig: \"\u00DF\",\n agrave: \"\u00E0\",\n aacute: \"\u00E1\",\n acirc: \"\u00E2\",\n atilde: \"\u00E3\",\n auml: \"\u00E4\",\n aring: \"\u00E5\",\n aelig: \"\u00E6\",\n ccedil: \"\u00E7\",\n egrave: \"\u00E8\",\n eacute: \"\u00E9\",\n ecirc: \"\u00EA\",\n euml: \"\u00EB\",\n igrave: \"\u00EC\",\n iacute: \"\u00ED\",\n icirc: \"\u00EE\",\n iuml: \"\u00EF\",\n eth: \"\u00F0\",\n ntilde: \"\u00F1\",\n ograve: \"\u00F2\",\n oacute: \"\u00F3\",\n ocirc: \"\u00F4\",\n otilde: \"\u00F5\",\n ouml: \"\u00F6\",\n oslash: \"\u00F8\",\n ugrave: \"\u00F9\",\n uacute: \"\u00FA\",\n ucirc: \"\u00FB\",\n uuml: \"\u00FC\",\n yacute: \"\u00FD\",\n thorn: \"\u00FE\",\n yuml: \"\u00FF\",\n nbsp: \"\u00A0\",\n iexcl: \"\u00A1\",\n cent: \"\u00A2\",\n pound: \"\u00A3\",\n curren: \"\u00A4\",\n yen: \"\u00A5\",\n brvbar: \"\u00A6\",\n sect: \"\u00A7\",\n uml: \"\u00A8\",\n copy: \"\u00A9\",\n ordf: \"\u00AA\",\n laquo: \"\u00AB\",\n not: \"\u00AC\",\n shy: \"\u00AD\u00AD\",\n reg: \"\u00AE\",\n macr: \"\u00AF\",\n deg: \"\u00B0\",\n plusmn: \"\u00B1\",\n sup2: \"\u00B2\",\n sup3: \"\u00B3\",\n acute: \"\u00B4\",\n micro: \"\u00B5\",\n para: \"\u00B6\",\n middot: \"\u00B7\",\n cedil: \"\u00B8\",\n sup1: \"\u00B9\",\n ordm: \"\u00BA\",\n raquo: \"\u00BB\",\n frac14: \"\u00BC\",\n frac12: \"\u00BD\",\n frac34: \"\u00BE\",\n iquest: \"\u00BF\",\n times: \"\u00D7\",\n divide: \"\u00F7\",\n forall: \"\u2200\",\n part: \"\u2202\",\n exist: \"\u2203\",\n empty: \"\u2205\",\n nabla: \"\u2207\",\n isin: \"\u2208\",\n notin: \"\u2209\",\n ni: \"\u220B\",\n prod: \"\u220F\",\n sum: \"\u2211\",\n minus: \"\u2212\",\n lowast: \"\u2217\",\n radic: \"\u221A\",\n prop: \"\u221D\",\n infin: \"\u221E\",\n ang: \"\u2220\",\n and: \"\u2227\",\n or: \"\u2228\",\n cap: \"\u2229\",\n cup: \"\u222A\",\n int: \"\u222B\",\n there4: \"\u2234\",\n sim: \"\u223C\",\n cong: \"\u2245\",\n asymp: \"\u2248\",\n ne: \"\u2260\",\n equiv: \"\u2261\",\n le: \"\u2264\",\n ge: \"\u2265\",\n sub: \"\u2282\",\n sup: \"\u2283\",\n nsub: \"\u2284\",\n sube: \"\u2286\",\n supe: \"\u2287\",\n oplus: \"\u2295\",\n otimes: \"\u2297\",\n perp: \"\u22A5\",\n sdot: \"\u22C5\",\n Alpha: \"\u0391\",\n Beta: \"\u0392\",\n Gamma: \"\u0393\",\n Delta: \"\u0394\",\n Epsilon: \"\u0395\",\n Zeta: \"\u0396\",\n Eta: \"\u0397\",\n Theta: \"\u0398\",\n Iota: \"\u0399\",\n Kappa: \"\u039A\",\n Lambda: \"\u039B\",\n Mu: \"\u039C\",\n Nu: \"\u039D\",\n Xi: \"\u039E\",\n Omicron: \"\u039F\",\n Pi: \"\u03A0\",\n Rho: \"\u03A1\",\n Sigma: \"\u03A3\",\n Tau: \"\u03A4\",\n Upsilon: \"\u03A5\",\n Phi: \"\u03A6\",\n Chi: \"\u03A7\",\n Psi: \"\u03A8\",\n Omega: \"\u03A9\",\n alpha: \"\u03B1\",\n beta: \"\u03B2\",\n gamma: \"\u03B3\",\n delta: \"\u03B4\",\n epsilon: \"\u03B5\",\n zeta: \"\u03B6\",\n eta: \"\u03B7\",\n theta: \"\u03B8\",\n iota: \"\u03B9\",\n kappa: \"\u03BA\",\n lambda: \"\u03BB\",\n mu: \"\u03BC\",\n nu: \"\u03BD\",\n xi: \"\u03BE\",\n omicron: \"\u03BF\",\n pi: \"\u03C0\",\n rho: \"\u03C1\",\n sigmaf: \"\u03C2\",\n sigma: \"\u03C3\",\n tau: \"\u03C4\",\n upsilon: \"\u03C5\",\n phi: \"\u03C6\",\n chi: \"\u03C7\",\n psi: \"\u03C8\",\n omega: \"\u03C9\",\n thetasym: \"\u03D1\",\n upsih: \"\u03D2\",\n piv: \"\u03D6\",\n OElig: \"\u0152\",\n oelig: \"\u0153\",\n Scaron: \"\u0160\",\n scaron: \"\u0161\",\n Yuml: \"\u0178\",\n fnof: \"\u0192\",\n circ: \"\u02C6\",\n tilde: \"\u02DC\",\n ensp: \"\u2002\",\n emsp: \"\u2003\",\n thinsp: \"\u2009\",\n zwnj: \"\u200C\",\n zwj: \"\u200D\",\n lrm: \"\u200E\",\n rlm: \"\u200F\",\n ndash: \"\u2013\",\n mdash: \"\u2014\",\n lsquo: \"\u2018\",\n rsquo: \"\u2019\",\n sbquo: \"\u201A\",\n ldquo: \"\u201C\",\n rdquo: \"\u201D\",\n bdquo: \"\u201E\",\n dagger: \"\u2020\",\n Dagger: \"\u2021\",\n bull: \"\u2022\",\n hellip: \"\u2026\",\n permil: \"\u2030\",\n prime: \"\u2032\",\n Prime: \"\u2033\",\n lsaquo: \"\u2039\",\n rsaquo: \"\u203A\",\n oline: \"\u203E\",\n euro: \"\u20AC\",\n trade: \"\u2122\",\n larr: \"\u2190\",\n uarr: \"\u2191\",\n rarr: \"\u2192\",\n darr: \"\u2193\",\n harr: \"\u2194\",\n crarr: \"\u21B5\",\n lceil: \"\u2308\",\n rceil: \"\u2309\",\n lfloor: \"\u230A\",\n rfloor: \"\u230B\",\n loz: \"\u25CA\",\n spades: \"\u2660\",\n clubs: \"\u2663\",\n hearts: \"\u2665\",\n diams: \"\u2666\",\n })),\n (e.entityMap = e.HTML_ENTITIES);\n },\n function (t, e, i) {\n var n = i(26).NAMESPACE,\n r =\n /[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/,\n s = new RegExp(\n \"[\\\\-\\\\.0-9\" +\n r.source.slice(1, -1) +\n \"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\",\n ),\n o = new RegExp(\n \"^\" + r.source + s.source + \"*(?::\" + r.source + s.source + \"*)?$\",\n );\n function a(t, e) {\n (this.message = t),\n (this.locator = e),\n Error.captureStackTrace && Error.captureStackTrace(this, a);\n }\n function h() {}\n function l(t, e) {\n return (\n (e.lineNumber = t.lineNumber), (e.columnNumber = t.columnNumber), e\n );\n }\n function c(t, e, i, r, s, o) {\n function a(t, e, n) {\n i.attributeNames.hasOwnProperty(t) &&\n o.fatalError(\"Attribute \" + t + \" redefined\"),\n i.addValue(t, e, n);\n }\n for (var h, l = ++e, c = 0; ; ) {\n var u = t.charAt(l);\n switch (u) {\n case \"=\":\n if (1 === c) (h = t.slice(e, l)), (c = 3);\n else {\n if (2 !== c)\n throw new Error(\"attribute equal must after attrName\");\n c = 3;\n }\n break;\n case \"'\":\n case '\"':\n if (3 === c || 1 === c) {\n if (\n (1 === c &&\n (o.warning('attribute value must after \"=\"'),\n (h = t.slice(e, l))),\n (e = l + 1),\n !((l = t.indexOf(u, e)) > 0))\n )\n throw new Error(\"attribute value no end '\" + u + \"' match\");\n a(h, (d = t.slice(e, l).replace(/&#?\\w+;/g, s)), e - 1),\n (c = 5);\n } else {\n if (4 != c) throw new Error('attribute value must after \"=\"');\n a(h, (d = t.slice(e, l).replace(/&#?\\w+;/g, s)), e),\n o.warning(\n 'attribute \"' + h + '\" missed start quot(' + u + \")!!\",\n ),\n (e = l + 1),\n (c = 5);\n }\n break;\n case \"/\":\n switch (c) {\n case 0:\n i.setTagName(t.slice(e, l));\n case 5:\n case 6:\n case 7:\n (c = 7), (i.closed = !0);\n case 4:\n case 1:\n case 2:\n break;\n default:\n throw new Error(\"attribute invalid close char('/')\");\n }\n break;\n case \"\":\n return (\n o.error(\"unexpected end of input\"),\n 0 == c && i.setTagName(t.slice(e, l)),\n l\n );\n case \">\":\n switch (c) {\n case 0:\n i.setTagName(t.slice(e, l));\n case 5:\n case 6:\n case 7:\n break;\n case 4:\n case 1:\n \"/\" === (d = t.slice(e, l)).slice(-1) &&\n ((i.closed = !0), (d = d.slice(0, -1)));\n case 2:\n 2 === c && (d = h),\n 4 == c\n ? (o.warning('attribute \"' + d + '\" missed quot(\")!'),\n a(h, d.replace(/&#?\\w+;/g, s), e))\n : ((n.isHTML(r[\"\"]) &&\n d.match(/^(?:disabled|checked|selected)$/i)) ||\n o.warning(\n 'attribute \"' +\n d +\n '\" missed value!! \"' +\n d +\n '\" instead!!',\n ),\n a(d, d, e));\n break;\n case 3:\n throw new Error(\"attribute value missed!!\");\n }\n return l;\n case \"\u0080\":\n u = \" \";\n default:\n if (u <= \" \")\n switch (c) {\n case 0:\n i.setTagName(t.slice(e, l)), (c = 6);\n break;\n case 1:\n (h = t.slice(e, l)), (c = 2);\n break;\n case 4:\n var d = t.slice(e, l).replace(/&#?\\w+;/g, s);\n o.warning('attribute \"' + d + '\" missed quot(\")!!'),\n a(h, d, e);\n case 5:\n c = 6;\n }\n else\n switch (c) {\n case 2:\n i.tagName;\n (n.isHTML(r[\"\"]) &&\n h.match(/^(?:disabled|checked|selected)$/i)) ||\n o.warning(\n 'attribute \"' +\n h +\n '\" missed value!! \"' +\n h +\n '\" instead2!!',\n ),\n a(h, h, e),\n (e = l),\n (c = 1);\n break;\n case 5:\n o.warning('attribute space is required\"' + h + '\"!!');\n case 6:\n (c = 1), (e = l);\n break;\n case 3:\n (c = 4), (e = l);\n break;\n case 7:\n throw new Error(\n \"elements closed character '/' and '>' must be connected to\",\n );\n }\n }\n l++;\n }\n }\n function u(t, e, i) {\n for (var r = t.tagName, s = null, o = t.length; o--; ) {\n var a = t[o],\n h = a.qName,\n l = a.value;\n if ((f = h.indexOf(\":\")) > 0)\n var c = (a.prefix = h.slice(0, f)),\n u = h.slice(f + 1),\n d = \"xmlns\" === c && u;\n else (u = h), (c = null), (d = \"xmlns\" === h && \"\");\n (a.localName = u),\n !1 !== d &&\n (null == s && ((s = {}), p(i, (i = {}))),\n (i[d] = s[d] = l),\n (a.uri = n.XMLNS),\n e.startPrefixMapping(d, l));\n }\n for (o = t.length; o--; ) {\n (c = (a = t[o]).prefix) &&\n (\"xml\" === c && (a.uri = n.XML),\n \"xmlns\" !== c && (a.uri = i[c || \"\"]));\n }\n var f;\n (f = r.indexOf(\":\")) > 0\n ? ((c = t.prefix = r.slice(0, f)), (u = t.localName = r.slice(f + 1)))\n : ((c = null), (u = t.localName = r));\n var g = (t.uri = i[c || \"\"]);\n if ((e.startElement(g, u, r, t), !t.closed))\n return (t.currentNSMap = i), (t.localNSMap = s), !0;\n if ((e.endElement(g, u, r), s)) for (c in s) e.endPrefixMapping(c);\n }\n function d(t, e, i, n, r) {\n if (/^(?:script|textarea)$/i.test(i)) {\n var s = t.indexOf(\"</\" + i + \">\", e),\n o = t.substring(e + 1, s);\n if (/[&<]/.test(o))\n return /^script$/i.test(i)\n ? (r.characters(o, 0, o.length), s)\n : ((o = o.replace(/&#?\\w+;/g, n)),\n r.characters(o, 0, o.length),\n s);\n }\n return e + 1;\n }\n function f(t, e, i, n) {\n var r = n[i];\n return (\n null == r &&\n ((r = t.lastIndexOf(\"</\" + i + \">\")) < e &&\n (r = t.lastIndexOf(\"</\" + i)),\n (n[i] = r)),\n r < e\n );\n }\n function p(t, e) {\n for (var i in t) e[i] = t[i];\n }\n function g(t, e, i, n) {\n switch (t.charAt(e + 2)) {\n case \"-\":\n return \"-\" === t.charAt(e + 3)\n ? (r = t.indexOf(\"--\\x3e\", e + 4)) > e\n ? (i.comment(t, e + 4, r - e - 4), r + 3)\n : (n.error(\"Unclosed comment\"), -1)\n : -1;\n default:\n if (\"CDATA[\" == t.substr(e + 3, 6)) {\n var r = t.indexOf(\"]]>\", e + 9);\n return (\n i.startCDATA(),\n i.characters(t, e + 9, r - e - 9),\n i.endCDATA(),\n r + 3\n );\n }\n var s = (function (t, e) {\n var i,\n n = [],\n r = /'[^']+'|\"[^\"]+\"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;\n (r.lastIndex = e), r.exec(t);\n for (; (i = r.exec(t)); ) if ((n.push(i), i[1])) return n;\n })(t, e),\n o = s.length;\n if (o > 1 && /!doctype/i.test(s[0][0])) {\n var a = s[1][0],\n h = !1,\n l = !1;\n o > 3 &&\n (/^public$/i.test(s[2][0])\n ? ((h = s[3][0]), (l = o > 4 && s[4][0]))\n : /^system$/i.test(s[2][0]) && (l = s[3][0]));\n var c = s[o - 1];\n return i.startDTD(a, h, l), i.endDTD(), c.index + c[0].length;\n }\n }\n return -1;\n }\n function m(t, e, i) {\n var n = t.indexOf(\"?>\", e);\n if (n) {\n var r = t.substring(e, n).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);\n if (r) {\n r[0].length;\n return i.processingInstruction(r[1], r[2]), n + 2;\n }\n return -1;\n }\n return -1;\n }\n function v() {\n this.attributeNames = {};\n }\n (a.prototype = new Error()),\n (a.prototype.name = a.name),\n (h.prototype = {\n parse: function (t, e, i) {\n var r = this.domBuilder;\n r.startDocument(),\n p(e, (e = {})),\n (function (t, e, i, r, s) {\n function o(t) {\n var e = t.slice(1, -1);\n return e in i\n ? i[e]\n : \"#\" === e.charAt(0)\n ? (function (t) {\n if (t > 65535) {\n var e = 55296 + ((t -= 65536) >> 10),\n i = 56320 + (1023 & t);\n return String.fromCharCode(e, i);\n }\n return String.fromCharCode(t);\n })(parseInt(e.substr(1).replace(\"x\", \"0x\")))\n : (s.error(\"entity not found:\" + t), t);\n }\n function h(e) {\n if (e > N) {\n var i = t.substring(N, e).replace(/&#?\\w+;/g, o);\n x && p(N), r.characters(i, 0, e - N), (N = e);\n }\n }\n function p(e, i) {\n for (; e >= b && (i = w.exec(t)); )\n (y = i.index), (b = y + i[0].length), x.lineNumber++;\n x.columnNumber = e - y + 1;\n }\n var y = 0,\n b = 0,\n w = /.*(?:\\r\\n?|\\n)|.*$/g,\n x = r.locator,\n E = [{ currentNSMap: e }],\n S = {},\n N = 0;\n for (;;) {\n try {\n var _ = t.indexOf(\"<\", N);\n if (_ < 0) {\n if (!t.substr(N).match(/^\\s*$/)) {\n var O = r.doc,\n T = O.createTextNode(t.substr(N));\n O.appendChild(T), (r.currentElement = T);\n }\n return;\n }\n switch ((_ > N && h(_), t.charAt(_ + 1))) {\n case \"/\":\n var C = t.indexOf(\">\", _ + 3),\n I = t.substring(_ + 2, C).replace(/[ \\t\\n\\r]+$/g, \"\"),\n k = E.pop();\n C < 0\n ? ((I = t.substring(_ + 2).replace(/[\\s<].*/, \"\")),\n s.error(\n \"end tag name: \" +\n I +\n \" is not complete:\" +\n k.tagName,\n ),\n (C = _ + 1 + I.length))\n : I.match(/\\s</) &&\n ((I = I.replace(/[\\s<].*/, \"\")),\n s.error(\n \"end tag name: \" + I + \" maybe not complete\",\n ),\n (C = _ + 1 + I.length));\n var R = k.localNSMap,\n A = k.tagName == I;\n if (\n A ||\n (k.tagName &&\n k.tagName.toLowerCase() == I.toLowerCase())\n ) {\n if ((r.endElement(k.uri, k.localName, I), R))\n for (var L in R) r.endPrefixMapping(L);\n A ||\n s.fatalError(\n \"end tag name: \" +\n I +\n \" is not match the current start tagName:\" +\n k.tagName,\n );\n } else E.push(k);\n C++;\n break;\n case \"?\":\n x && p(_), (C = m(t, _, r));\n break;\n case \"!\":\n x && p(_), (C = g(t, _, r, s));\n break;\n default:\n x && p(_);\n var j = new v(),\n D = E[E.length - 1].currentNSMap,\n P = ((C = c(t, _, j, D, o, s)), j.length);\n if (\n (!j.closed &&\n f(t, C, j.tagName, S) &&\n ((j.closed = !0),\n i.nbsp || s.warning(\"unclosed xml attribute\")),\n x && P)\n ) {\n for (var M = l(x, {}), z = 0; z < P; z++) {\n var B = j[z];\n p(B.offset), (B.locator = l(x, {}));\n }\n (r.locator = M),\n u(j, r, D) && E.push(j),\n (r.locator = x);\n } else u(j, r, D) && E.push(j);\n n.isHTML(j.uri) && !j.closed\n ? (C = d(t, C, j.tagName, o, r))\n : C++;\n }\n } catch (t) {\n if (t instanceof a) throw t;\n s.error(\"element parse error: \" + t), (C = -1);\n }\n C > N ? (N = C) : h(Math.max(_, N) + 1);\n }\n })(t, e, i, r, this.errorHandler),\n r.endDocument();\n },\n }),\n (v.prototype = {\n setTagName: function (t) {\n if (!o.test(t)) throw new Error(\"invalid tagName:\" + t);\n this.tagName = t;\n },\n addValue: function (t, e, i) {\n if (!o.test(t)) throw new Error(\"invalid attribute:\" + t);\n (this.attributeNames[t] = this.length),\n (this[this.length++] = { qName: t, value: e, offset: i });\n },\n length: 0,\n getLocalName: function (t) {\n return this[t].localName;\n },\n getLocator: function (t) {\n return this[t].locator;\n },\n getQName: function (t) {\n return this[t].qName;\n },\n getURI: function (t) {\n return this[t].uri;\n },\n getValue: function (t) {\n return this[t].value;\n },\n }),\n (e.XMLReader = h),\n (e.ParseError = a);\n },\n function (t, e, i) {\n var n = i(31),\n r = i(19),\n s = i(11),\n o = r(\"JSON\", \"stringify\"),\n a = /[\\uD800-\\uDFFF]/g,\n h = /^[\\uD800-\\uDBFF]$/,\n l = /^[\\uDC00-\\uDFFF]$/,\n c = function (t, e, i) {\n var n = i.charAt(e - 1),\n r = i.charAt(e + 1);\n return (h.test(t) && !l.test(r)) || (l.test(t) && !h.test(n))\n ? \"\\\\u\" + t.charCodeAt(0).toString(16)\n : t;\n },\n u = s(function () {\n return (\n '\"\\\\udf06\\\\ud834\"' !== o(\"\\udf06\\ud834\") ||\n '\"\\\\udead\"' !== o(\"\\udead\")\n );\n });\n o &&\n n(\n { target: \"JSON\", stat: !0, forced: u },\n {\n stringify: function (t, e, i) {\n var n = o.apply(null, arguments);\n return \"string\" == typeof n ? n.replace(a, c) : n;\n },\n },\n );\n },\n function (t, e) {\n var i = {}.toString;\n t.exports = function (t) {\n return i.call(t).slice(8, -1);\n };\n },\n function (t, e, i) {\n var n = i(18),\n r = i(56),\n s = i(101),\n o = i(104),\n a = i(14)(\"toPrimitive\");\n t.exports = function (t, e) {\n if (!n(t) || r(t)) return t;\n var i,\n h = s(t, a);\n if (h) {\n if (\n (void 0 === e && (e = \"default\"), (i = h.call(t, e)), !n(i) || r(i))\n )\n return i;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n return void 0 === e && (e = \"number\"), o(t, e);\n };\n },\n function (t, e, i) {\n var n,\n r,\n s = i(9),\n o = i(100),\n a = s.process,\n h = s.Deno,\n l = (a && a.versions) || (h && h.version),\n c = l && l.v8;\n c\n ? (r = (n = c.split(\".\"))[0] < 4 ? 1 : n[0] + n[1])\n : o &&\n (!(n = o.match(/Edge\\/(\\d+)/)) || n[1] >= 74) &&\n (n = o.match(/Chrome\\/(\\d+)/)) &&\n (r = n[1]),\n (t.exports = r && +r);\n },\n function (t, e, i) {\n var n = i(19);\n t.exports = n(\"navigator\", \"userAgent\") || \"\";\n },\n function (t, e, i) {\n var n = i(102);\n t.exports = function (t, e) {\n var i = t[e];\n return null == i ? void 0 : n(i);\n };\n },\n function (t, e, i) {\n var n = i(7),\n r = i(103);\n t.exports = function (t) {\n if (n(t)) return t;\n throw TypeError(r(t) + \" is not a function\");\n };\n },\n function (t, e) {\n t.exports = function (t) {\n try {\n return String(t);\n } catch (t) {\n return \"Object\";\n }\n };\n },\n function (t, e, i) {\n var n = i(7),\n r = i(18);\n t.exports = function (t, e) {\n var i, s;\n if (\"string\" === e && n((i = t.toString)) && !r((s = i.call(t))))\n return s;\n if (n((i = t.valueOf)) && !r((s = i.call(t)))) return s;\n if (\"string\" !== e && n((i = t.toString)) && !r((s = i.call(t))))\n return s;\n throw TypeError(\"Can't convert object to primitive value\");\n };\n },\n function (t, e, i) {\n var n = i(9),\n r = i(7),\n s = i(62),\n o = n.WeakMap;\n t.exports = r(o) && /native code/.test(s(o));\n },\n function (t, e, i) {\n var n = i(12),\n r = i(107),\n s = i(51),\n o = i(21);\n t.exports = function (t, e) {\n for (var i = r(e), a = o.f, h = s.f, l = 0; l < i.length; l++) {\n var c = i[l];\n n(t, c) || a(t, c, h(e, c));\n }\n };\n },\n function (t, e, i) {\n var n = i(19),\n r = i(108),\n s = i(67),\n o = i(22);\n t.exports =\n n(\"Reflect\", \"ownKeys\") ||\n function (t) {\n var e = r.f(o(t)),\n i = s.f;\n return i ? e.concat(i(t)) : e;\n };\n },\n function (t, e, i) {\n var n = i(65),\n r = i(41).concat(\"length\", \"prototype\");\n e.f =\n Object.getOwnPropertyNames ||\n function (t) {\n return n(t, r);\n };\n },\n function (t, e, i) {\n var n = i(27),\n r = i(110),\n s = i(111),\n o = function (t) {\n return function (e, i, o) {\n var a,\n h = n(e),\n l = s(h),\n c = r(o, l);\n if (t && i != i) {\n for (; l > c; ) if ((a = h[c++]) != a) return !0;\n } else\n for (; l > c; c++)\n if ((t || c in h) && h[c] === i) return t || c || 0;\n return !t && -1;\n };\n };\n t.exports = { includes: o(!0), indexOf: o(!1) };\n },\n function (t, e, i) {\n var n = i(66),\n r = Math.max,\n s = Math.min;\n t.exports = function (t, e) {\n var i = n(t);\n return i < 0 ? r(i + e, 0) : s(i, e);\n };\n },\n function (t, e, i) {\n var n = i(112);\n t.exports = function (t) {\n return n(t.length);\n };\n },\n function (t, e, i) {\n var n = i(66),\n r = Math.min;\n t.exports = function (t) {\n return t > 0 ? r(n(t), 9007199254740991) : 0;\n };\n },\n function (t, e, i) {\n var n = i(11),\n r = i(7),\n s = /#|\\.prototype\\./,\n o = function (t, e) {\n var i = h[a(t)];\n return i == c || (i != l && (r(e) ? n(e) : !!e));\n },\n a = (o.normalize = function (t) {\n return String(t).replace(s, \".\").toLowerCase();\n }),\n h = (o.data = {}),\n l = (o.NATIVE = \"N\"),\n c = (o.POLYFILL = \"P\");\n t.exports = o;\n },\n function (t, e) {\n t.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0,\n };\n },\n function (t, e, i) {\n var n = i(37)(\"span\").classList,\n r = n && n.constructor && n.constructor.prototype;\n t.exports = r === Object.prototype ? void 0 : r;\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(27),\n r = i(117),\n s = i(43),\n o = i(63),\n a = i(120),\n h = o.set,\n l = o.getterFor(\"Array Iterator\");\n (t.exports = a(\n Array,\n \"Array\",\n function (t, e) {\n h(this, { type: \"Array Iterator\", target: n(t), index: 0, kind: e });\n },\n function () {\n var t = l(this),\n e = t.target,\n i = t.kind,\n n = t.index++;\n return !e || n >= e.length\n ? ((t.target = void 0), { value: void 0, done: !0 })\n : \"keys\" == i\n ? { value: n, done: !1 }\n : \"values\" == i\n ? { value: e[n], done: !1 }\n : { value: [n, e[n]], done: !1 };\n },\n \"values\",\n )),\n (s.Arguments = s.Array),\n r(\"keys\"),\n r(\"values\"),\n r(\"entries\");\n },\n function (t, e, i) {\n var n = i(14),\n r = i(42),\n s = i(21),\n o = n(\"unscopables\"),\n a = Array.prototype;\n null == a[o] && s.f(a, o, { configurable: !0, value: r(null) }),\n (t.exports = function (t) {\n a[o][t] = !0;\n });\n },\n function (t, e, i) {\n var n = i(13),\n r = i(21),\n s = i(22),\n o = i(69);\n t.exports = n\n ? Object.defineProperties\n : function (t, e) {\n s(t);\n for (var i, n = o(e), a = n.length, h = 0; a > h; )\n r.f(t, (i = n[h++]), e[i]);\n return t;\n };\n },\n function (t, e, i) {\n var n = i(19);\n t.exports = n(\"document\", \"documentElement\");\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(31),\n r = i(33),\n s = i(64),\n o = i(7),\n a = i(121),\n h = i(71),\n l = i(123),\n c = i(72),\n u = i(20),\n d = i(38),\n f = i(14),\n p = i(43),\n g = i(70),\n m = s.PROPER,\n v = s.CONFIGURABLE,\n y = g.IteratorPrototype,\n b = g.BUGGY_SAFARI_ITERATORS,\n w = f(\"iterator\"),\n x = function () {\n return this;\n };\n t.exports = function (t, e, i, s, f, g, E) {\n a(i, e, s);\n var S,\n N,\n _,\n O = function (t) {\n if (t === f && R) return R;\n if (!b && t in I) return I[t];\n switch (t) {\n case \"keys\":\n case \"values\":\n case \"entries\":\n return function () {\n return new i(this, t);\n };\n }\n return function () {\n return new i(this);\n };\n },\n T = e + \" Iterator\",\n C = !1,\n I = t.prototype,\n k = I[w] || I[\"@@iterator\"] || (f && I[f]),\n R = (!b && k) || O(f),\n A = (\"Array\" == e && I.entries) || k;\n if (\n (A &&\n (S = h(A.call(new t()))) !== Object.prototype &&\n S.next &&\n (r || h(S) === y || (l ? l(S, y) : o(S[w]) || d(S, w, x)),\n c(S, T, !0, !0),\n r && (p[T] = x)),\n m &&\n \"values\" == f &&\n k &&\n \"values\" !== k.name &&\n (!r && v\n ? u(I, \"name\", \"values\")\n : ((C = !0),\n (R = function () {\n return k.call(this);\n }))),\n f)\n )\n if (\n ((N = {\n values: O(\"values\"),\n keys: g ? R : O(\"keys\"),\n entries: O(\"entries\"),\n }),\n E)\n )\n for (_ in N) (b || C || !(_ in I)) && d(I, _, N[_]);\n else n({ target: e, proto: !0, forced: b || C }, N);\n return (\n (r && !E) || I[w] === R || d(I, w, R, { name: f }), (p[e] = R), N\n );\n };\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(70).IteratorPrototype,\n r = i(42),\n s = i(32),\n o = i(72),\n a = i(43),\n h = function () {\n return this;\n };\n t.exports = function (t, e, i) {\n var l = e + \" Iterator\";\n return (\n (t.prototype = r(n, { next: s(1, i) })),\n o(t, l, !1, !0),\n (a[l] = h),\n t\n );\n };\n },\n function (t, e, i) {\n var n = i(11);\n t.exports = !n(function () {\n function t() {}\n return (\n (t.prototype.constructor = null),\n Object.getPrototypeOf(new t()) !== t.prototype\n );\n });\n },\n function (t, e, i) {\n var n = i(22),\n r = i(124);\n t.exports =\n Object.setPrototypeOf ||\n (\"__proto__\" in {}\n ? (function () {\n var t,\n e = !1,\n i = {};\n try {\n (t = Object.getOwnPropertyDescriptor(\n Object.prototype,\n \"__proto__\",\n ).set).call(i, []),\n (e = i instanceof Array);\n } catch (t) {}\n return function (i, s) {\n return n(i), r(s), e ? t.call(i, s) : (i.__proto__ = s), i;\n };\n })()\n : void 0);\n },\n function (t, e, i) {\n var n = i(7);\n t.exports = function (t) {\n if (\"object\" == typeof t || n(t)) return t;\n throw TypeError(\"Can't set \" + String(t) + \" as a prototype\");\n };\n },\n function (t, e, i) {\n \"use strict\";\n function n(t) {\n return document.createElementNS(\"http://www.w3.org/2000/svg\", t);\n }\n Object.defineProperty(e, \"__esModule\", { value: !0 }),\n (e.createElement = n),\n (e.default = void 0);\n e.default = { createElement: n };\n },\n function (t, e, i) {\n \"use strict\";\n Object.defineProperty(e, \"__esModule\", { value: !0 }),\n (e.clone = r),\n (e.default = void 0),\n (e.proxyMouse = n),\n i(127),\n i(68);\n e.default = { proxyMouse: n };\n function n(t, e) {\n function i(i) {\n for (var n = e.length - 1; n >= 0; n--) {\n var o = e[n],\n a = i.clientX,\n h = i.clientY;\n if (\n (i.touches &&\n i.touches.length &&\n ((a = i.touches[0].clientX), (h = i.touches[0].clientY)),\n s(o, t, a, h))\n ) {\n o.dispatchEvent(r(i));\n break;\n }\n }\n }\n if (\"iframe\" === t.nodeName || \"IFRAME\" === t.nodeName)\n try {\n this.target = t.contentDocument;\n } catch (e) {\n this.target = t;\n }\n else this.target = t;\n for (var n of [\"mouseup\", \"mousedown\", \"click\", \"touchstart\"])\n this.target.addEventListener(n, (t) => i(t), !1);\n }\n function r(t) {\n var e = Object.assign({}, t, { bubbles: !1 });\n try {\n return new MouseEvent(t.type, e);\n } catch (n) {\n var i = document.createEvent(\"MouseEvents\");\n return (\n i.initMouseEvent(\n t.type,\n !1,\n e.cancelable,\n e.view,\n e.detail,\n e.screenX,\n e.screenY,\n e.clientX,\n e.clientY,\n e.ctrlKey,\n e.altKey,\n e.shiftKey,\n e.metaKey,\n e.button,\n e.relatedTarget,\n ),\n i\n );\n }\n }\n function s(t, e, i, n) {\n var r = e.getBoundingClientRect();\n function s(t, e, i) {\n var n = t.top - r.top,\n s = t.left - r.left,\n o = n + t.height,\n a = s + t.width;\n return n <= i && s <= e && o > i && a > e;\n }\n if (!s(t.getBoundingClientRect(), i, n)) return !1;\n for (var o = t.getClientRects(), a = 0, h = o.length; a < h; a++)\n if (s(o[a], i, n)) return !0;\n return !1;\n }\n },\n function (t, e, i) {\n var n = i(31),\n r = i(128);\n n(\n { target: \"Object\", stat: !0, forced: Object.assign !== r },\n { assign: r },\n );\n },\n function (t, e, i) {\n \"use strict\";\n var n = i(13),\n r = i(11),\n s = i(69),\n o = i(67),\n a = i(52),\n h = i(36),\n l = i(53),\n c = Object.assign,\n u = Object.defineProperty;\n t.exports =\n !c ||\n r(function () {\n if (\n n &&\n 1 !==\n c(\n { b: 1 },\n c(\n u({}, \"a\", {\n enumerable: !0,\n get: function () {\n u(this, \"b\", { value: 3, enumerable: !1 });\n },\n }),\n { b: 2 },\n ),\n ).b\n )\n return !0;\n var t = {},\n e = {},\n i = Symbol();\n return (\n (t[i] = 7),\n \"abcdefghijklmnopqrst\".split(\"\").forEach(function (t) {\n e[t] = t;\n }),\n 7 != c({}, t)[i] || \"abcdefghijklmnopqrst\" != s(c({}, e)).join(\"\")\n );\n })\n ? function (t, e) {\n for (\n var i = h(t), r = arguments.length, c = 1, u = o.f, d = a.f;\n r > c;\n\n )\n for (\n var f,\n p = l(arguments[c++]),\n g = u ? s(p).concat(u(p)) : s(p),\n m = g.length,\n v = 0;\n m > v;\n\n )\n (f = g[v++]), (n && !d.call(p, f)) || (i[f] = p[f]);\n return i;\n }\n : c;\n },\n function (t, e, i) {\n var n = i(73);\n t.exports = function () {\n return n.Date.now();\n };\n },\n function (t, e, i) {\n (function (e) {\n var i = \"object\" == typeof e && e && e.Object === Object && e;\n t.exports = i;\n }).call(this, i(25));\n },\n function (t, e, i) {\n var n = i(132),\n r = i(44),\n s = i(134),\n o = /^[-+]0x[0-9a-f]+$/i,\n a = /^0b[01]+$/i,\n h = /^0o[0-7]+$/i,\n l = parseInt;\n t.exports = function (t) {\n if (\"number\" == typeof t) return t;\n if (s(t)) return NaN;\n if (r(t)) {\n var e = \"function\" == typeof t.valueOf ? t.valueOf() : t;\n t = r(e) ? e + \"\" : e;\n }\n if (\"string\" != typeof t) return 0 === t ? t : +t;\n t = n(t);\n var i = a.test(t);\n return i || h.test(t) ? l(t.slice(2), i ? 2 : 8) : o.test(t) ? NaN : +t;\n };\n },\n function (t, e, i) {\n var n = i(133),\n r = /^\\s+/;\n t.exports = function (t) {\n return t ? t.slice(0, n(t) + 1).replace(r, \"\") : t;\n };\n },\n function (t, e) {\n var i = /\\s/;\n t.exports = function (t) {\n for (var e = t.length; e-- && i.test(t.charAt(e)); );\n return e;\n };\n },\n function (t, e, i) {\n var n = i(135),\n r = i(138);\n t.exports = function (t) {\n return \"symbol\" == typeof t || (r(t) && \"[object Symbol]\" == n(t));\n };\n },\n function (t, e, i) {\n var n = i(74),\n r = i(136),\n s = i(137),\n o = n ? n.toStringTag : void 0;\n t.exports = function (t) {\n return null == t\n ? void 0 === t\n ? \"[object Undefined]\"\n : \"[object Null]\"\n : o && o in Object(t)\n ? r(t)\n : s(t);\n };\n },\n function (t, e, i) {\n var n = i(74),\n r = Object.prototype,\n s = r.hasOwnProperty,\n o = r.toString,\n a = n ? n.toStringTag : void 0;\n t.exports = function (t) {\n var e = s.call(t, a),\n i = t[a];\n try {\n t[a] = void 0;\n var n = !0;\n } catch (t) {}\n var r = o.call(t);\n return n && (e ? (t[a] = i) : delete t[a]), r;\n };\n },\n function (t, e) {\n var i = Object.prototype.toString;\n t.exports = function (t) {\n return i.call(t);\n };\n },\n function (t, e) {\n t.exports = function (t) {\n return null != t && \"object\" == typeof t;\n };\n },\n ]).default;\n});\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=epub.d.ts.map
|