@bomjan133/react-crud-ui 1.2.6 → 1.2.8
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/README.md +4284 -23
- package/dist/components/book-viewer/EpubViewer.d.ts +8 -0
- package/dist/components/book-viewer/PdfViewer.d.ts +9 -0
- package/dist/components/book-viewer/constants.d.ts +23 -0
- package/dist/components/book-viewer/hooks.d.ts +6 -0
- package/dist/components/book-viewer/index.d.ts +16 -0
- package/dist/components/book-viewer/ui.d.ts +16 -0
- package/dist/components/book-viewer/utils.d.ts +12 -0
- package/dist/components/crud/CrudDetail.d.ts +86 -0
- package/dist/components/crud/CrudForm.d.ts +33 -0
- package/dist/components/crud/CrudList.d.ts +105 -0
- package/dist/components/crud/DataTable.d.ts +64 -0
- package/dist/components/crud/EmptyState.d.ts +54 -0
- package/dist/components/crud/Loading.d.ts +32 -0
- package/dist/components/crud/Modal.d.ts +75 -0
- package/dist/components/crud/Pagination.d.ts +18 -0
- package/dist/components/crud/ServerErrorPage.d.ts +7 -0
- package/dist/components/layouts/AuthLayout.d.ts +32 -0
- package/dist/components/layouts/BreadcrumbContext.d.ts +4 -0
- package/dist/components/layouts/DashboardLayout.d.ts +41 -0
- package/dist/components/layouts/DetailView.d.ts +58 -0
- package/dist/components/layouts/Header.d.ts +13 -0
- package/dist/components/layouts/HeaderSlotContext.d.ts +4 -0
- package/dist/components/layouts/LoginPage.d.ts +50 -0
- package/dist/components/layouts/Sidebar.d.ts +38 -0
- package/dist/components/layouts/SidebarContext.d.ts +18 -0
- package/dist/components/layouts/index.d.ts +8 -0
- package/dist/components/toast/ToastContainer.d.ts +4 -0
- package/dist/components/toast/useUI.d.ts +33 -0
- package/dist/components/ui/CopyableField.d.ts +12 -0
- package/dist/components/ui/DownloadableButton.d.ts +15 -0
- package/dist/components/ui/alert-dialog.d.ts +26 -0
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/avatar.d.ts +4 -0
- package/dist/components/ui/badge.d.ts +8 -0
- package/dist/components/ui/button.d.ts +6 -0
- package/dist/components/ui/calendar.d.ts +16 -0
- package/dist/components/ui/card.d.ts +7 -0
- package/dist/components/ui/checkbox.d.ts +2 -0
- package/dist/components/ui/collapsible.d.ts +3 -0
- package/dist/components/ui/date-picker.d.ts +2 -0
- package/dist/components/ui/date-range-picker.d.ts +2 -0
- package/dist/components/ui/dialog.d.ts +25 -0
- package/dist/components/ui/dropdown-menu.d.ts +23 -0
- package/dist/components/ui/form-fields.d.ts +19 -0
- package/dist/components/ui/input-group.d.ts +28 -0
- package/dist/components/ui/input.d.ts +2 -0
- package/dist/components/ui/label.d.ts +2 -0
- package/dist/components/ui/popover.d.ts +5 -0
- package/dist/components/ui/q-tabs.d.ts +18 -0
- package/dist/components/ui/rich-text-editor.d.ts +2 -0
- package/dist/components/ui/scroll-area.d.ts +3 -0
- package/dist/components/ui/search-select.d.ts +6 -0
- package/dist/components/ui/select.d.ts +12 -0
- package/dist/components/ui/separator.d.ts +2 -0
- package/dist/components/ui/skeleton.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +2 -0
- package/dist/components/ui/table.d.ts +9 -0
- package/dist/components/ui/tabs.d.ts +6 -0
- package/dist/components/ui/textarea.d.ts +2 -0
- package/dist/components/ui/tiptap-editor.d.ts +2 -0
- package/dist/components/ui/tooltip.d.ts +6 -0
- package/dist/{index-DEnRTqSW.cjs → index-C1SYIwJ0.cjs} +2 -2
- package/dist/{index-DEnRTqSW.cjs.map → index-C1SYIwJ0.cjs.map} +1 -1
- package/dist/{index-YVvpDXLO.js → index-C27owgN3.js} +989 -971
- package/dist/{index-YVvpDXLO.js.map → index-C27owgN3.js.map} +1 -1
- package/dist/{index-DGN44off.cjs → index-CoyU9yXi.cjs} +29 -29
- package/dist/index-CoyU9yXi.cjs.map +1 -0
- package/dist/{index-CYnVj6pv.js → index-DYnTJrkh.js} +2 -2
- package/dist/{index-CYnVj6pv.js.map → index-DYnTJrkh.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +42 -0
- package/dist/index.js +1 -1
- package/dist/lib/utils.d.ts +61 -0
- package/dist/store/createCrudStore.d.ts +11 -0
- package/dist/store/useUIStore.d.ts +5 -0
- package/package.json +1 -1
- package/dist/index-DGN44off.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=require("./index-DGN44off.cjs");var Dr={exports:{}},Ln={exports:{}},ea=void 0,Fn=function(n){return n!==ea&&n!==null},ta=Fn,ia={object:!0,function:!0,undefined:!0},ra=function(n){return ta(n)?hasOwnProperty.call(ia,typeof n):!1},na=ra,sa=function(n){if(!na(n))return!1;try{return n.constructor?n.constructor.prototype===n:!1}catch{return!1}},aa=sa,oa=function(n){if(typeof n!="function"||!hasOwnProperty.call(n,"length"))return!1;try{if(typeof n.length!="number"||typeof n.call!="function"||typeof n.apply!="function")return!1}catch{return!1}return!aa(n)},ua=oa,la=/^\s*class[\s{/}]/,ha=Function.prototype.toString,fa=function(n){return!(!ua(n)||la.test(ha.call(n)))},ca=function(){var n=Object.assign,e;return typeof n!="function"?!1:(e={foo:"raz"},n(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")},cr,tn;function da(){return tn||(tn=1,cr=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),cr}var pa=function(){},va=pa(),Or=function(n){return n!==va&&n!==null},dr,rn;function ga(){if(rn)return dr;rn=1;var n=Or,e=Object.keys;return dr=function(t){return e(n(t)?Object(t):t)},dr}var pr,nn;function ma(){return nn||(nn=1,pr=da()()?Object.keys:ga()),pr}var vr,sn;function ya(){if(sn)return vr;sn=1;var n=Or;return vr=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e},vr}var gr,an;function ba(){if(an)return gr;an=1;var n=ma(),e=ya(),t=Math.max;return gr=function(i,r){var s,a,o=t(arguments.length,2),u;for(i=Object(e(i)),u=function(h){try{i[h]=r[h]}catch(f){s||(s=f)}},a=1;a<o;++a)r=arguments[a],n(r).forEach(u);if(s!==void 0)throw s;return i},gr}var wa=ca()?Object.assign:ba(),_a=Or,Ea=Array.prototype.forEach,xa=Object.create,Da=function(n,e){var t;for(t in n)e[t]=n[t]},Aa=function(n){var e=xa(null);return Ea.call(arguments,function(t){_a(t)&&Da(Object(t),e)}),e},mr="razdwatrzy",Ca=function(){return typeof mr.contains!="function"?!1:mr.contains("dwa")===!0&&mr.contains("foo")===!1},yr,on;function Sa(){if(on)return yr;on=1;var n=String.prototype.indexOf;return yr=function(e){return n.call(this,e,arguments[1])>-1},yr}var Ta=Ca()?String.prototype.contains:Sa(),Li=Fn,un=fa,Pn=wa,zn=Aa,yi=Ta,ka=Ln.exports=function(n,e){var t,i,r,s,a;return arguments.length<2||typeof n!="string"?(s=e,e=n,n=null):s=arguments[2],Li(n)?(t=yi.call(n,"c"),i=yi.call(n,"e"),r=yi.call(n,"w")):(t=r=!0,i=!1),a={value:e,configurable:t,enumerable:i,writable:r},s?Pn(zn(s),a):a};ka.gs=function(n,e,t){var i,r,s,a;return typeof n!="string"?(s=t,t=e,e=n,n=null):s=arguments[3],Li(e)?un(e)?Li(t)?un(t)||(s=t,t=void 0):t=void 0:(s=e,e=t=void 0):e=void 0,Li(n)?(i=yi.call(n,"c"),r=yi.call(n,"e")):(i=!0,r=!1),a={get:e,set:t,configurable:i,enumerable:r},s?Pn(zn(s),a):a};var Na=Ln.exports,Ra=function(n){if(typeof n!="function")throw new TypeError(n+" is not a function");return n};(function(n,e){var t=Na,i=Ra,r=Function.prototype.apply,s=Function.prototype.call,a=Object.create,o=Object.defineProperty,u=Object.defineProperties,h=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},c,b,g,C,k,d,p;c=function(y,D){var O;return i(D),h.call(this,"__ee__")?O=this.__ee__:(O=f.value=a(null),o(this,"__ee__",f),f.value=null),O[y]?typeof O[y]=="object"?O[y].push(D):O[y]=[O[y],D]:O[y]=D,this},b=function(y,D){var O,_;return i(D),_=this,c.call(this,y,O=function(){g.call(_,y,O),r.call(D,this,arguments)}),O.__eeOnceListener__=D,this},g=function(y,D){var O,_,A,S;if(i(D),!h.call(this,"__ee__"))return this;if(O=this.__ee__,!O[y])return this;if(_=O[y],typeof _=="object")for(S=0;A=_[S];++S)(A===D||A.__eeOnceListener__===D)&&(_.length===2?O[y]=_[S?0:1]:_.splice(S,1));else(_===D||_.__eeOnceListener__===D)&&delete O[y];return this},C=function(y){var D,O,_,A,S;if(h.call(this,"__ee__")&&(A=this.__ee__[y],!!A))if(typeof A=="object"){for(O=arguments.length,S=new Array(O-1),D=1;D<O;++D)S[D-1]=arguments[D];for(A=A.slice(),D=0;_=A[D];++D)r.call(_,this,S)}else switch(arguments.length){case 1:s.call(A,this);break;case 2:s.call(A,this,arguments[1]);break;case 3:s.call(A,this,arguments[1],arguments[2]);break;default:for(O=arguments.length,S=new Array(O-1),D=1;D<O;++D)S[D-1]=arguments[D];r.call(A,this,S)}},k={on:c,once:b,off:g,emit:C},d={on:t(c),once:t(b),off:t(g),emit:t(C)},p=u({},d),n.exports=e=function(y){return y==null?a(p):u(Object(y),d)},e.methods=k})(Dr,Dr.exports);var Ia=Dr.exports;const Rt=Oe.getDefaultExportFromCjs(Ia);var Ht={},Vt={};function Oa(n,e,t){if(t===void 0&&(t=Array.prototype),n&&typeof t.find=="function")return t.find.call(n,e);for(var i=0;i<n.length;i++)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];if(e.call(void 0,r,i,n))return r}}function Br(n,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(n):n}var Mn=Br({HTML:"text/html",isHTML:function(n){return n===Mn.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Un=Br({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===Un.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Vt.find=Oa;Vt.freeze=Br;Vt.MIME_TYPE=Mn;Vt.NAMESPACE=Un;var jn=Vt,Tt=jn.find,bi=jn.NAMESPACE;function Ba(n){return n!==""}function La(n){return n?n.split(/[\t\n\f\r ]+/).filter(Ba):[]}function Fa(n,e){return n.hasOwnProperty(e)||(n[e]=!0),n}function ln(n){if(!n)return[];var e=La(n);return Object.keys(e.reduce(Fa,{}))}function Pa(n){return function(e){return n&&n.indexOf(e)!==-1}}function Ai(n,e){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}function ct(n,e){var t=n.prototype;if(!(t instanceof e)){let i=function(){};i.prototype=e.prototype,i=new i,Ai(t,i),n.prototype=t=i}t.constructor!=n&&(typeof n!="function"&&console.error("unknown Class:"+n),t.constructor=n)}var dt={},Ct=dt.ELEMENT_NODE=1,oi=dt.ATTRIBUTE_NODE=2,Mi=dt.TEXT_NODE=3,qn=dt.CDATA_SECTION_NODE=4,Wn=dt.ENTITY_REFERENCE_NODE=5,za=dt.ENTITY_NODE=6,Hn=dt.PROCESSING_INSTRUCTION_NODE=7,Vn=dt.COMMENT_NODE=8,Gn=dt.DOCUMENT_NODE=9,Zn=dt.DOCUMENT_TYPE_NODE=10,Pt=dt.DOCUMENT_FRAGMENT_NODE=11,Ma=dt.NOTATION_NODE=12,nt={},Qe={};nt.INDEX_SIZE_ERR=(Qe[1]="Index size error",1);nt.DOMSTRING_SIZE_ERR=(Qe[2]="DOMString size error",2);var ft=nt.HIERARCHY_REQUEST_ERR=(Qe[3]="Hierarchy request error",3);nt.WRONG_DOCUMENT_ERR=(Qe[4]="Wrong document",4);nt.INVALID_CHARACTER_ERR=(Qe[5]="Invalid character",5);nt.NO_DATA_ALLOWED_ERR=(Qe[6]="No data allowed",6);nt.NO_MODIFICATION_ALLOWED_ERR=(Qe[7]="No modification allowed",7);var Yn=nt.NOT_FOUND_ERR=(Qe[8]="Not found",8);nt.NOT_SUPPORTED_ERR=(Qe[9]="Not supported",9);var hn=nt.INUSE_ATTRIBUTE_ERR=(Qe[10]="Attribute in use",10);nt.INVALID_STATE_ERR=(Qe[11]="Invalid state",11);nt.SYNTAX_ERR=(Qe[12]="Syntax error",12);nt.INVALID_MODIFICATION_ERR=(Qe[13]="Invalid modification",13);nt.NAMESPACE_ERR=(Qe[14]="Invalid namespace",14);nt.INVALID_ACCESS_ERR=(Qe[15]="Invalid access",15);function We(n,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,Qe[n]),this.message=Qe[n],Error.captureStackTrace&&Error.captureStackTrace(this,We);return t.code=n,e&&(this.message=this.message+": "+e),t}We.prototype=Error.prototype;Ai(nt,We);function Ft(){}Ft.prototype={length:0,item:function(n){return n>=0&&n<this.length?this[n]:null},toString:function(n,e){for(var t=[],i=0;i<this.length;i++)si(this[i],t,n,e);return t.join("")},filter:function(n){return Array.prototype.filter.call(this,n)},indexOf:function(n){return Array.prototype.indexOf.call(this,n)}};function ui(n,e){this._node=n,this._refresh=e,Lr(this)}function Lr(n){var e=n._node._inc||n._node.ownerDocument._inc;if(n._inc!==e){var t=n._refresh(n._node);if(as(n,"length",t.length),!n.$$length||t.length<n.$$length)for(var i=t.length;i in n;i++)Object.prototype.hasOwnProperty.call(n,i)&&delete n[i];Ai(t,n),n._inc=e}}ui.prototype.item=function(n){return Lr(this),this[n]||null};ct(ui,Ft);function Ui(){}function Xn(n,e){for(var t=n.length;t--;)if(n[t]===e)return t}function fn(n,e,t,i){if(i?e[Xn(e,i)]=t:e[e.length++]=t,n){t.ownerElement=n;var r=n.ownerDocument;r&&(i&&Jn(r,n,i),Ua(r,n,t))}}function cn(n,e,t){var i=Xn(e,t);if(i>=0){for(var r=e.length-1;i<r;)e[i]=e[++i];if(e.length=r,n){var s=n.ownerDocument;s&&(Jn(s,n,t),t.ownerElement=null)}}else throw new We(Yn,new Error(n.tagName+"@"+t))}Ui.prototype={length:0,item:Ft.prototype.item,getNamedItem:function(n){for(var e=this.length;e--;){var t=this[e];if(t.nodeName==n)return t}},setNamedItem:function(n){var e=n.ownerElement;if(e&&e!=this._ownerElement)throw new We(hn);var t=this.getNamedItem(n.nodeName);return fn(this._ownerElement,this,n,t),t},setNamedItemNS:function(n){var e=n.ownerElement,t;if(e&&e!=this._ownerElement)throw new We(hn);return t=this.getNamedItemNS(n.namespaceURI,n.localName),fn(this._ownerElement,this,n,t),t},removeNamedItem:function(n){var e=this.getNamedItem(n);return cn(this._ownerElement,this,e),e},removeNamedItemNS:function(n,e){var t=this.getNamedItemNS(n,e);return cn(this._ownerElement,this,t),t},getNamedItemNS:function(n,e){for(var t=this.length;t--;){var i=this[t];if(i.localName==e&&i.namespaceURI==n)return i}return null}};function $n(){}$n.prototype={hasFeature:function(n,e){return!0},createDocument:function(n,e,t){var i=new Ci;if(i.implementation=this,i.childNodes=new Ft,i.doctype=t||null,t&&i.appendChild(t),e){var r=i.createElementNS(n,e);i.appendChild(r)}return i},createDocumentType:function(n,e,t){var i=new Ji;return i.name=n,i.nodeName=n,i.publicId=e||"",i.systemId=t||"",i}};function ke(){}ke.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(n,e){return ji(this,n,e)},replaceChild:function(n,e){ji(this,n,e,es),e&&this.removeChild(e)},removeChild:function(n){return Qn(this,n)},appendChild:function(n){return this.insertBefore(n,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(n){return Ar(this.ownerDocument||this,this,n)},normalize:function(){for(var n=this.firstChild;n;){var e=n.nextSibling;e&&e.nodeType==Mi&&n.nodeType==Mi?(this.removeChild(e),n.appendData(e.data)):(n.normalize(),n=e)}},isSupported:function(n,e){return this.ownerDocument.implementation.hasFeature(n,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(n){for(var e=this;e;){var t=e._nsMap;if(t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&t[i]===n)return i}e=e.nodeType==oi?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(n){for(var e=this;e;){var t=e._nsMap;if(t&&n in t&&Object.prototype.hasOwnProperty.call(t,n))return t[n];e=e.nodeType==oi?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(n){var e=this.lookupPrefix(n);return e==null}};function Kn(n){return n=="<"&&"<"||n==">"&&">"||n=="&"&&"&"||n=='"'&&"""||"&#"+n.charCodeAt()+";"}Ai(dt,ke);Ai(dt,ke.prototype);function wi(n,e){if(e(n))return!0;if(n=n.firstChild)do if(wi(n,e))return!0;while(n=n.nextSibling)}function Ci(){this.ownerDocument=this}function Ua(n,e,t){n&&n._inc++;var i=t.namespaceURI;i===bi.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function Jn(n,e,t,i){n&&n._inc++;var r=t.namespaceURI;r===bi.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function Fr(n,e,t){if(n&&n._inc){n._inc++;var i=e.childNodes;if(t)i[i.length++]=t;else{for(var r=e.firstChild,s=0;r;)i[s++]=r,r=r.nextSibling;i.length=s,delete i[i.length]}}}function Qn(n,e){var t=e.previousSibling,i=e.nextSibling;return t?t.nextSibling=i:n.firstChild=i,i?i.previousSibling=t:n.lastChild=t,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,Fr(n.ownerDocument,n),e}function ja(n){return n&&(n.nodeType===ke.DOCUMENT_NODE||n.nodeType===ke.DOCUMENT_FRAGMENT_NODE||n.nodeType===ke.ELEMENT_NODE)}function qa(n){return n&&(kt(n)||Pr(n)||zt(n)||n.nodeType===ke.DOCUMENT_FRAGMENT_NODE||n.nodeType===ke.COMMENT_NODE||n.nodeType===ke.PROCESSING_INSTRUCTION_NODE)}function zt(n){return n&&n.nodeType===ke.DOCUMENT_TYPE_NODE}function kt(n){return n&&n.nodeType===ke.ELEMENT_NODE}function Pr(n){return n&&n.nodeType===ke.TEXT_NODE}function dn(n,e){var t=n.childNodes||[];if(Tt(t,kt)||zt(e))return!1;var i=Tt(t,zt);return!(e&&i&&t.indexOf(i)>t.indexOf(e))}function pn(n,e){var t=n.childNodes||[];function i(s){return kt(s)&&s!==e}if(Tt(t,i))return!1;var r=Tt(t,zt);return!(e&&r&&t.indexOf(r)>t.indexOf(e))}function Wa(n,e,t){if(!ja(n))throw new We(ft,"Unexpected parent node type "+n.nodeType);if(t&&t.parentNode!==n)throw new We(Yn,"child not in parent");if(!qa(e)||zt(e)&&n.nodeType!==ke.DOCUMENT_NODE)throw new We(ft,"Unexpected node type "+e.nodeType+" for parent node type "+n.nodeType)}function Ha(n,e,t){var i=n.childNodes||[],r=e.childNodes||[];if(e.nodeType===ke.DOCUMENT_FRAGMENT_NODE){var s=r.filter(kt);if(s.length>1||Tt(r,Pr))throw new We(ft,"More than one element or text in fragment");if(s.length===1&&!dn(n,t))throw new We(ft,"Element in fragment can not be inserted before doctype")}if(kt(e)&&!dn(n,t))throw new We(ft,"Only one element can be added and only after doctype");if(zt(e)){if(Tt(i,zt))throw new We(ft,"Only one doctype is allowed");var a=Tt(i,kt);if(t&&i.indexOf(a)<i.indexOf(t))throw new We(ft,"Doctype can only be inserted before an element");if(!t&&a)throw new We(ft,"Doctype can not be appended since element is present")}}function es(n,e,t){var i=n.childNodes||[],r=e.childNodes||[];if(e.nodeType===ke.DOCUMENT_FRAGMENT_NODE){var s=r.filter(kt);if(s.length>1||Tt(r,Pr))throw new We(ft,"More than one element or text in fragment");if(s.length===1&&!pn(n,t))throw new We(ft,"Element in fragment can not be inserted before doctype")}if(kt(e)&&!pn(n,t))throw new We(ft,"Only one element can be added and only after doctype");if(zt(e)){if(Tt(i,function(u){return zt(u)&&u!==t}))throw new We(ft,"Only one doctype is allowed");var a=Tt(i,kt);if(t&&i.indexOf(a)<i.indexOf(t))throw new We(ft,"Doctype can only be inserted before an element")}}function ji(n,e,t,i){Wa(n,e,t),n.nodeType===ke.DOCUMENT_NODE&&(i||Ha)(n,e,t);var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===Pt){var s=e.firstChild;if(s==null)return e;var a=e.lastChild}else s=a=e;var o=t?t.previousSibling:n.lastChild;s.previousSibling=o,a.nextSibling=t,o?o.nextSibling=s:n.firstChild=s,t==null?n.lastChild=a:t.previousSibling=a;do s.parentNode=n;while(s!==a&&(s=s.nextSibling));return Fr(n.ownerDocument||n,n),e.nodeType==Pt&&(e.firstChild=e.lastChild=null),e}function Va(n,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=n,e.previousSibling=n.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:n.firstChild=e,n.lastChild=e,Fr(n.ownerDocument,n,e),e}Ci.prototype={nodeName:"#document",nodeType:Gn,doctype:null,documentElement:null,_inc:1,insertBefore:function(n,e){if(n.nodeType==Pt){for(var t=n.firstChild;t;){var i=t.nextSibling;this.insertBefore(t,e),t=i}return n}return ji(this,n,e),n.ownerDocument=this,this.documentElement===null&&n.nodeType===Ct&&(this.documentElement=n),n},removeChild:function(n){return this.documentElement==n&&(this.documentElement=null),Qn(this,n)},replaceChild:function(n,e){ji(this,n,e,es),n.ownerDocument=this,e&&this.removeChild(e),kt(n)&&(this.documentElement=n)},importNode:function(n,e){return ss(this,n,e)},getElementById:function(n){var e=null;return wi(this.documentElement,function(t){if(t.nodeType==Ct&&t.getAttribute("id")==n)return e=t,!0}),e},getElementsByClassName:function(n){var e=ln(n);return new ui(this,function(t){var i=[];return e.length>0&&wi(t.documentElement,function(r){if(r!==t&&r.nodeType===Ct){var s=r.getAttribute("class");if(s){var a=n===s;if(!a){var o=ln(s);a=e.every(Pa(o))}a&&i.push(r)}}}),i})},createElement:function(n){var e=new Gt;e.ownerDocument=this,e.nodeName=n,e.tagName=n,e.localName=n,e.childNodes=new Ft;var t=e.attributes=new Ui;return t._ownerElement=e,e},createDocumentFragment:function(){var n=new Qi;return n.ownerDocument=this,n.childNodes=new Ft,n},createTextNode:function(n){var e=new zr;return e.ownerDocument=this,e.appendData(n),e},createComment:function(n){var e=new Mr;return e.ownerDocument=this,e.appendData(n),e},createCDATASection:function(n){var e=new Ur;return e.ownerDocument=this,e.appendData(n),e},createProcessingInstruction:function(n,e){var t=new qr;return t.ownerDocument=this,t.tagName=t.nodeName=t.target=n,t.nodeValue=t.data=e,t},createAttribute:function(n){var e=new qi;return e.ownerDocument=this,e.name=n,e.nodeName=n,e.localName=n,e.specified=!0,e},createEntityReference:function(n){var e=new jr;return e.ownerDocument=this,e.nodeName=n,e},createElementNS:function(n,e){var t=new Gt,i=e.split(":"),r=t.attributes=new Ui;return t.childNodes=new Ft,t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.namespaceURI=n,i.length==2?(t.prefix=i[0],t.localName=i[1]):t.localName=e,r._ownerElement=t,t},createAttributeNS:function(n,e){var t=new qi,i=e.split(":");return t.ownerDocument=this,t.nodeName=e,t.name=e,t.namespaceURI=n,t.specified=!0,i.length==2?(t.prefix=i[0],t.localName=i[1]):t.localName=e,t}};ct(Ci,ke);function Gt(){this._nsMap={}}Gt.prototype={nodeType:Ct,hasAttribute:function(n){return this.getAttributeNode(n)!=null},getAttribute:function(n){var e=this.getAttributeNode(n);return e&&e.value||""},getAttributeNode:function(n){return this.attributes.getNamedItem(n)},setAttribute:function(n,e){var t=this.ownerDocument.createAttribute(n);t.value=t.nodeValue=""+e,this.setAttributeNode(t)},removeAttribute:function(n){var e=this.getAttributeNode(n);e&&this.removeAttributeNode(e)},appendChild:function(n){return n.nodeType===Pt?this.insertBefore(n,null):Va(this,n)},setAttributeNode:function(n){return this.attributes.setNamedItem(n)},setAttributeNodeNS:function(n){return this.attributes.setNamedItemNS(n)},removeAttributeNode:function(n){return this.attributes.removeNamedItem(n.nodeName)},removeAttributeNS:function(n,e){var t=this.getAttributeNodeNS(n,e);t&&this.removeAttributeNode(t)},hasAttributeNS:function(n,e){return this.getAttributeNodeNS(n,e)!=null},getAttributeNS:function(n,e){var t=this.getAttributeNodeNS(n,e);return t&&t.value||""},setAttributeNS:function(n,e,t){var i=this.ownerDocument.createAttributeNS(n,e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},getAttributeNodeNS:function(n,e){return this.attributes.getNamedItemNS(n,e)},getElementsByTagName:function(n){return new ui(this,function(e){var t=[];return wi(e,function(i){i!==e&&i.nodeType==Ct&&(n==="*"||i.tagName==n)&&t.push(i)}),t})},getElementsByTagNameNS:function(n,e){return new ui(this,function(t){var i=[];return wi(t,function(r){r!==t&&r.nodeType===Ct&&(n==="*"||r.namespaceURI===n)&&(e==="*"||r.localName==e)&&i.push(r)}),i})}};Ci.prototype.getElementsByTagName=Gt.prototype.getElementsByTagName;Ci.prototype.getElementsByTagNameNS=Gt.prototype.getElementsByTagNameNS;ct(Gt,ke);function qi(){}qi.prototype.nodeType=oi;ct(qi,ke);function Si(){}Si.prototype={data:"",substringData:function(n,e){return this.data.substring(n,n+e)},appendData:function(n){n=this.data+n,this.nodeValue=this.data=n,this.length=n.length},insertData:function(n,e){this.replaceData(n,0,e)},appendChild:function(n){throw new Error(Qe[ft])},deleteData:function(n,e){this.replaceData(n,e,"")},replaceData:function(n,e,t){var i=this.data.substring(0,n),r=this.data.substring(n+e);t=i+t+r,this.nodeValue=this.data=t,this.length=t.length}};ct(Si,ke);function zr(){}zr.prototype={nodeName:"#text",nodeType:Mi,splitText:function(n){var e=this.data,t=e.substring(n);e=e.substring(0,n),this.data=this.nodeValue=e,this.length=e.length;var i=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}};ct(zr,Si);function Mr(){}Mr.prototype={nodeName:"#comment",nodeType:Vn};ct(Mr,Si);function Ur(){}Ur.prototype={nodeName:"#cdata-section",nodeType:qn};ct(Ur,Si);function Ji(){}Ji.prototype.nodeType=Zn;ct(Ji,ke);function ts(){}ts.prototype.nodeType=Ma;ct(ts,ke);function is(){}is.prototype.nodeType=za;ct(is,ke);function jr(){}jr.prototype.nodeType=Wn;ct(jr,ke);function Qi(){}Qi.prototype.nodeName="#document-fragment";Qi.prototype.nodeType=Pt;ct(Qi,ke);function qr(){}qr.prototype.nodeType=Hn;ct(qr,ke);function rs(){}rs.prototype.serializeToString=function(n,e,t){return ns.call(n,e,t)};ke.prototype.toString=ns;function ns(n,e){var t=[],i=this.nodeType==9&&this.documentElement||this,r=i.prefix,s=i.namespaceURI;if(s&&r==null){var r=i.lookupPrefix(s);if(r==null)var a=[{namespace:s,prefix:null}]}return si(this,t,n,e,a),t.join("")}function vn(n,e,t){var i=n.prefix||"",r=n.namespaceURI;if(!r||i==="xml"&&r===bi.XML||r===bi.XMLNS)return!1;for(var s=t.length;s--;){var a=t[s];if(a.prefix===i)return a.namespace!==r}return!0}function br(n,e,t){n.push(" ",e,'="',t.replace(/[<&"]/g,Kn),'"')}function si(n,e,t,i,r){if(r||(r=[]),i)if(n=i(n),n){if(typeof n=="string"){e.push(n);return}}else return;switch(n.nodeType){case Ct:var s=n.attributes,a=s.length,p=n.firstChild,o=n.tagName;t=bi.isHTML(n.namespaceURI)||t;var u=o;if(!t&&!n.prefix&&n.namespaceURI){for(var h,f=0;f<s.length;f++)if(s.item(f).name==="xmlns"){h=s.item(f).value;break}if(!h)for(var c=r.length-1;c>=0;c--){var b=r[c];if(b.prefix===""&&b.namespace===n.namespaceURI){h=b.namespace;break}}if(h!==n.namespaceURI)for(var c=r.length-1;c>=0;c--){var b=r[c];if(b.namespace===n.namespaceURI){b.prefix&&(u=b.prefix+":"+o);break}}}e.push("<",u);for(var g=0;g<a;g++){var C=s.item(g);C.prefix=="xmlns"?r.push({prefix:C.localName,namespace:C.value}):C.nodeName=="xmlns"&&r.push({prefix:"",namespace:C.value})}for(var g=0;g<a;g++){var C=s.item(g);if(vn(C,t,r)){var k=C.prefix||"",d=C.namespaceURI;br(e,k?"xmlns:"+k:"xmlns",d),r.push({prefix:k,namespace:d})}si(C,e,t,i,r)}if(o===u&&vn(n,t,r)){var k=n.prefix||"",d=n.namespaceURI;br(e,k?"xmlns:"+k:"xmlns",d),r.push({prefix:k,namespace:d})}if(p||t&&!/^(?:meta|link|img|br|hr|input)$/i.test(o)){if(e.push(">"),t&&/^script$/i.test(o))for(;p;)p.data?e.push(p.data):si(p,e,t,i,r.slice()),p=p.nextSibling;else for(;p;)si(p,e,t,i,r.slice()),p=p.nextSibling;e.push("</",u,">")}else e.push("/>");return;case Gn:case Pt:for(var p=n.firstChild;p;)si(p,e,t,i,r.slice()),p=p.nextSibling;return;case oi:return br(e,n.name,n.value);case Mi:return e.push(n.data.replace(/[<&]/g,Kn).replace(/]]>/g,"]]>"));case qn:return e.push("<![CDATA[",n.data,"]]>");case Vn:return e.push("<!--",n.data,"-->");case Zn:var y=n.publicId,D=n.systemId;if(e.push("<!DOCTYPE ",n.name),y)e.push(" PUBLIC ",y),D&&D!="."&&e.push(" ",D),e.push(">");else if(D&&D!=".")e.push(" SYSTEM ",D,">");else{var O=n.internalSubset;O&&e.push(" [",O,"]"),e.push(">")}return;case Hn:return e.push("<?",n.target," ",n.data,"?>");case Wn:return e.push("&",n.nodeName,";");default:e.push("??",n.nodeName)}}function ss(n,e,t){var i;switch(e.nodeType){case Ct:i=e.cloneNode(!1),i.ownerDocument=n;case Pt:break;case oi:t=!0;break}if(i||(i=e.cloneNode(!1)),i.ownerDocument=n,i.parentNode=null,t)for(var r=e.firstChild;r;)i.appendChild(ss(n,r,t)),r=r.nextSibling;return i}function Ar(n,e,t){var i=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var s=e[r];typeof s!="object"&&s!=i[r]&&(i[r]=s)}switch(e.childNodes&&(i.childNodes=new Ft),i.ownerDocument=n,i.nodeType){case Ct:var a=e.attributes,o=i.attributes=new Ui,u=a.length;o._ownerElement=i;for(var h=0;h<u;h++)i.setAttributeNode(Ar(n,a.item(h),!0));break;case oi:t=!0}if(t)for(var f=e.firstChild;f;)i.appendChild(Ar(n,f,t)),f=f.nextSibling;return i}function as(n,e,t){n[e]=t}try{if(Object.defineProperty){let n=function(e){switch(e.nodeType){case Ct:case Pt:var t=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&t.push(n(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}};Object.defineProperty(ui.prototype,"length",{get:function(){return Lr(this),this.$$length}}),Object.defineProperty(ke.prototype,"textContent",{get:function(){return n(this)},set:function(e){switch(this.nodeType){case Ct:case Pt:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),as=function(e,t,i){e["$$"+t]=i}}}catch{}Ht.DocumentType=Ji;Ht.DOMException=We;Ht.DOMImplementation=$n;Ht.Element=Gt;Ht.Node=ke;Ht.NodeList=Ft;Ht.XMLSerializer=rs;var Ti={},os={};(function(n){var e=Vt.freeze;n.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=require("./index-CoyU9yXi.cjs");var Dr={exports:{}},Ln={exports:{}},ea=void 0,Fn=function(n){return n!==ea&&n!==null},ta=Fn,ia={object:!0,function:!0,undefined:!0},ra=function(n){return ta(n)?hasOwnProperty.call(ia,typeof n):!1},na=ra,sa=function(n){if(!na(n))return!1;try{return n.constructor?n.constructor.prototype===n:!1}catch{return!1}},aa=sa,oa=function(n){if(typeof n!="function"||!hasOwnProperty.call(n,"length"))return!1;try{if(typeof n.length!="number"||typeof n.call!="function"||typeof n.apply!="function")return!1}catch{return!1}return!aa(n)},ua=oa,la=/^\s*class[\s{/}]/,ha=Function.prototype.toString,fa=function(n){return!(!ua(n)||la.test(ha.call(n)))},ca=function(){var n=Object.assign,e;return typeof n!="function"?!1:(e={foo:"raz"},n(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")},cr,tn;function da(){return tn||(tn=1,cr=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),cr}var pa=function(){},va=pa(),Or=function(n){return n!==va&&n!==null},dr,rn;function ga(){if(rn)return dr;rn=1;var n=Or,e=Object.keys;return dr=function(t){return e(n(t)?Object(t):t)},dr}var pr,nn;function ma(){return nn||(nn=1,pr=da()()?Object.keys:ga()),pr}var vr,sn;function ya(){if(sn)return vr;sn=1;var n=Or;return vr=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e},vr}var gr,an;function ba(){if(an)return gr;an=1;var n=ma(),e=ya(),t=Math.max;return gr=function(i,r){var s,a,o=t(arguments.length,2),u;for(i=Object(e(i)),u=function(h){try{i[h]=r[h]}catch(f){s||(s=f)}},a=1;a<o;++a)r=arguments[a],n(r).forEach(u);if(s!==void 0)throw s;return i},gr}var wa=ca()?Object.assign:ba(),_a=Or,Ea=Array.prototype.forEach,xa=Object.create,Da=function(n,e){var t;for(t in n)e[t]=n[t]},Aa=function(n){var e=xa(null);return Ea.call(arguments,function(t){_a(t)&&Da(Object(t),e)}),e},mr="razdwatrzy",Ca=function(){return typeof mr.contains!="function"?!1:mr.contains("dwa")===!0&&mr.contains("foo")===!1},yr,on;function Sa(){if(on)return yr;on=1;var n=String.prototype.indexOf;return yr=function(e){return n.call(this,e,arguments[1])>-1},yr}var Ta=Ca()?String.prototype.contains:Sa(),Li=Fn,un=fa,Pn=wa,zn=Aa,yi=Ta,ka=Ln.exports=function(n,e){var t,i,r,s,a;return arguments.length<2||typeof n!="string"?(s=e,e=n,n=null):s=arguments[2],Li(n)?(t=yi.call(n,"c"),i=yi.call(n,"e"),r=yi.call(n,"w")):(t=r=!0,i=!1),a={value:e,configurable:t,enumerable:i,writable:r},s?Pn(zn(s),a):a};ka.gs=function(n,e,t){var i,r,s,a;return typeof n!="string"?(s=t,t=e,e=n,n=null):s=arguments[3],Li(e)?un(e)?Li(t)?un(t)||(s=t,t=void 0):t=void 0:(s=e,e=t=void 0):e=void 0,Li(n)?(i=yi.call(n,"c"),r=yi.call(n,"e")):(i=!0,r=!1),a={get:e,set:t,configurable:i,enumerable:r},s?Pn(zn(s),a):a};var Na=Ln.exports,Ra=function(n){if(typeof n!="function")throw new TypeError(n+" is not a function");return n};(function(n,e){var t=Na,i=Ra,r=Function.prototype.apply,s=Function.prototype.call,a=Object.create,o=Object.defineProperty,u=Object.defineProperties,h=Object.prototype.hasOwnProperty,f={configurable:!0,enumerable:!1,writable:!0},c,b,g,C,k,d,p;c=function(y,D){var O;return i(D),h.call(this,"__ee__")?O=this.__ee__:(O=f.value=a(null),o(this,"__ee__",f),f.value=null),O[y]?typeof O[y]=="object"?O[y].push(D):O[y]=[O[y],D]:O[y]=D,this},b=function(y,D){var O,_;return i(D),_=this,c.call(this,y,O=function(){g.call(_,y,O),r.call(D,this,arguments)}),O.__eeOnceListener__=D,this},g=function(y,D){var O,_,A,S;if(i(D),!h.call(this,"__ee__"))return this;if(O=this.__ee__,!O[y])return this;if(_=O[y],typeof _=="object")for(S=0;A=_[S];++S)(A===D||A.__eeOnceListener__===D)&&(_.length===2?O[y]=_[S?0:1]:_.splice(S,1));else(_===D||_.__eeOnceListener__===D)&&delete O[y];return this},C=function(y){var D,O,_,A,S;if(h.call(this,"__ee__")&&(A=this.__ee__[y],!!A))if(typeof A=="object"){for(O=arguments.length,S=new Array(O-1),D=1;D<O;++D)S[D-1]=arguments[D];for(A=A.slice(),D=0;_=A[D];++D)r.call(_,this,S)}else switch(arguments.length){case 1:s.call(A,this);break;case 2:s.call(A,this,arguments[1]);break;case 3:s.call(A,this,arguments[1],arguments[2]);break;default:for(O=arguments.length,S=new Array(O-1),D=1;D<O;++D)S[D-1]=arguments[D];r.call(A,this,S)}},k={on:c,once:b,off:g,emit:C},d={on:t(c),once:t(b),off:t(g),emit:t(C)},p=u({},d),n.exports=e=function(y){return y==null?a(p):u(Object(y),d)},e.methods=k})(Dr,Dr.exports);var Ia=Dr.exports;const Rt=Oe.getDefaultExportFromCjs(Ia);var Ht={},Vt={};function Oa(n,e,t){if(t===void 0&&(t=Array.prototype),n&&typeof t.find=="function")return t.find.call(n,e);for(var i=0;i<n.length;i++)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];if(e.call(void 0,r,i,n))return r}}function Br(n,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(n):n}var Mn=Br({HTML:"text/html",isHTML:function(n){return n===Mn.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Un=Br({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===Un.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Vt.find=Oa;Vt.freeze=Br;Vt.MIME_TYPE=Mn;Vt.NAMESPACE=Un;var jn=Vt,Tt=jn.find,bi=jn.NAMESPACE;function Ba(n){return n!==""}function La(n){return n?n.split(/[\t\n\f\r ]+/).filter(Ba):[]}function Fa(n,e){return n.hasOwnProperty(e)||(n[e]=!0),n}function ln(n){if(!n)return[];var e=La(n);return Object.keys(e.reduce(Fa,{}))}function Pa(n){return function(e){return n&&n.indexOf(e)!==-1}}function Ai(n,e){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}function ct(n,e){var t=n.prototype;if(!(t instanceof e)){let i=function(){};i.prototype=e.prototype,i=new i,Ai(t,i),n.prototype=t=i}t.constructor!=n&&(typeof n!="function"&&console.error("unknown Class:"+n),t.constructor=n)}var dt={},Ct=dt.ELEMENT_NODE=1,oi=dt.ATTRIBUTE_NODE=2,Mi=dt.TEXT_NODE=3,qn=dt.CDATA_SECTION_NODE=4,Wn=dt.ENTITY_REFERENCE_NODE=5,za=dt.ENTITY_NODE=6,Hn=dt.PROCESSING_INSTRUCTION_NODE=7,Vn=dt.COMMENT_NODE=8,Gn=dt.DOCUMENT_NODE=9,Zn=dt.DOCUMENT_TYPE_NODE=10,Pt=dt.DOCUMENT_FRAGMENT_NODE=11,Ma=dt.NOTATION_NODE=12,nt={},Qe={};nt.INDEX_SIZE_ERR=(Qe[1]="Index size error",1);nt.DOMSTRING_SIZE_ERR=(Qe[2]="DOMString size error",2);var ft=nt.HIERARCHY_REQUEST_ERR=(Qe[3]="Hierarchy request error",3);nt.WRONG_DOCUMENT_ERR=(Qe[4]="Wrong document",4);nt.INVALID_CHARACTER_ERR=(Qe[5]="Invalid character",5);nt.NO_DATA_ALLOWED_ERR=(Qe[6]="No data allowed",6);nt.NO_MODIFICATION_ALLOWED_ERR=(Qe[7]="No modification allowed",7);var Yn=nt.NOT_FOUND_ERR=(Qe[8]="Not found",8);nt.NOT_SUPPORTED_ERR=(Qe[9]="Not supported",9);var hn=nt.INUSE_ATTRIBUTE_ERR=(Qe[10]="Attribute in use",10);nt.INVALID_STATE_ERR=(Qe[11]="Invalid state",11);nt.SYNTAX_ERR=(Qe[12]="Syntax error",12);nt.INVALID_MODIFICATION_ERR=(Qe[13]="Invalid modification",13);nt.NAMESPACE_ERR=(Qe[14]="Invalid namespace",14);nt.INVALID_ACCESS_ERR=(Qe[15]="Invalid access",15);function We(n,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,Qe[n]),this.message=Qe[n],Error.captureStackTrace&&Error.captureStackTrace(this,We);return t.code=n,e&&(this.message=this.message+": "+e),t}We.prototype=Error.prototype;Ai(nt,We);function Ft(){}Ft.prototype={length:0,item:function(n){return n>=0&&n<this.length?this[n]:null},toString:function(n,e){for(var t=[],i=0;i<this.length;i++)si(this[i],t,n,e);return t.join("")},filter:function(n){return Array.prototype.filter.call(this,n)},indexOf:function(n){return Array.prototype.indexOf.call(this,n)}};function ui(n,e){this._node=n,this._refresh=e,Lr(this)}function Lr(n){var e=n._node._inc||n._node.ownerDocument._inc;if(n._inc!==e){var t=n._refresh(n._node);if(as(n,"length",t.length),!n.$$length||t.length<n.$$length)for(var i=t.length;i in n;i++)Object.prototype.hasOwnProperty.call(n,i)&&delete n[i];Ai(t,n),n._inc=e}}ui.prototype.item=function(n){return Lr(this),this[n]||null};ct(ui,Ft);function Ui(){}function Xn(n,e){for(var t=n.length;t--;)if(n[t]===e)return t}function fn(n,e,t,i){if(i?e[Xn(e,i)]=t:e[e.length++]=t,n){t.ownerElement=n;var r=n.ownerDocument;r&&(i&&Jn(r,n,i),Ua(r,n,t))}}function cn(n,e,t){var i=Xn(e,t);if(i>=0){for(var r=e.length-1;i<r;)e[i]=e[++i];if(e.length=r,n){var s=n.ownerDocument;s&&(Jn(s,n,t),t.ownerElement=null)}}else throw new We(Yn,new Error(n.tagName+"@"+t))}Ui.prototype={length:0,item:Ft.prototype.item,getNamedItem:function(n){for(var e=this.length;e--;){var t=this[e];if(t.nodeName==n)return t}},setNamedItem:function(n){var e=n.ownerElement;if(e&&e!=this._ownerElement)throw new We(hn);var t=this.getNamedItem(n.nodeName);return fn(this._ownerElement,this,n,t),t},setNamedItemNS:function(n){var e=n.ownerElement,t;if(e&&e!=this._ownerElement)throw new We(hn);return t=this.getNamedItemNS(n.namespaceURI,n.localName),fn(this._ownerElement,this,n,t),t},removeNamedItem:function(n){var e=this.getNamedItem(n);return cn(this._ownerElement,this,e),e},removeNamedItemNS:function(n,e){var t=this.getNamedItemNS(n,e);return cn(this._ownerElement,this,t),t},getNamedItemNS:function(n,e){for(var t=this.length;t--;){var i=this[t];if(i.localName==e&&i.namespaceURI==n)return i}return null}};function $n(){}$n.prototype={hasFeature:function(n,e){return!0},createDocument:function(n,e,t){var i=new Ci;if(i.implementation=this,i.childNodes=new Ft,i.doctype=t||null,t&&i.appendChild(t),e){var r=i.createElementNS(n,e);i.appendChild(r)}return i},createDocumentType:function(n,e,t){var i=new Ji;return i.name=n,i.nodeName=n,i.publicId=e||"",i.systemId=t||"",i}};function ke(){}ke.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(n,e){return ji(this,n,e)},replaceChild:function(n,e){ji(this,n,e,es),e&&this.removeChild(e)},removeChild:function(n){return Qn(this,n)},appendChild:function(n){return this.insertBefore(n,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(n){return Ar(this.ownerDocument||this,this,n)},normalize:function(){for(var n=this.firstChild;n;){var e=n.nextSibling;e&&e.nodeType==Mi&&n.nodeType==Mi?(this.removeChild(e),n.appendData(e.data)):(n.normalize(),n=e)}},isSupported:function(n,e){return this.ownerDocument.implementation.hasFeature(n,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(n){for(var e=this;e;){var t=e._nsMap;if(t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&t[i]===n)return i}e=e.nodeType==oi?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(n){for(var e=this;e;){var t=e._nsMap;if(t&&n in t&&Object.prototype.hasOwnProperty.call(t,n))return t[n];e=e.nodeType==oi?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(n){var e=this.lookupPrefix(n);return e==null}};function Kn(n){return n=="<"&&"<"||n==">"&&">"||n=="&"&&"&"||n=='"'&&"""||"&#"+n.charCodeAt()+";"}Ai(dt,ke);Ai(dt,ke.prototype);function wi(n,e){if(e(n))return!0;if(n=n.firstChild)do if(wi(n,e))return!0;while(n=n.nextSibling)}function Ci(){this.ownerDocument=this}function Ua(n,e,t){n&&n._inc++;var i=t.namespaceURI;i===bi.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function Jn(n,e,t,i){n&&n._inc++;var r=t.namespaceURI;r===bi.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function Fr(n,e,t){if(n&&n._inc){n._inc++;var i=e.childNodes;if(t)i[i.length++]=t;else{for(var r=e.firstChild,s=0;r;)i[s++]=r,r=r.nextSibling;i.length=s,delete i[i.length]}}}function Qn(n,e){var t=e.previousSibling,i=e.nextSibling;return t?t.nextSibling=i:n.firstChild=i,i?i.previousSibling=t:n.lastChild=t,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,Fr(n.ownerDocument,n),e}function ja(n){return n&&(n.nodeType===ke.DOCUMENT_NODE||n.nodeType===ke.DOCUMENT_FRAGMENT_NODE||n.nodeType===ke.ELEMENT_NODE)}function qa(n){return n&&(kt(n)||Pr(n)||zt(n)||n.nodeType===ke.DOCUMENT_FRAGMENT_NODE||n.nodeType===ke.COMMENT_NODE||n.nodeType===ke.PROCESSING_INSTRUCTION_NODE)}function zt(n){return n&&n.nodeType===ke.DOCUMENT_TYPE_NODE}function kt(n){return n&&n.nodeType===ke.ELEMENT_NODE}function Pr(n){return n&&n.nodeType===ke.TEXT_NODE}function dn(n,e){var t=n.childNodes||[];if(Tt(t,kt)||zt(e))return!1;var i=Tt(t,zt);return!(e&&i&&t.indexOf(i)>t.indexOf(e))}function pn(n,e){var t=n.childNodes||[];function i(s){return kt(s)&&s!==e}if(Tt(t,i))return!1;var r=Tt(t,zt);return!(e&&r&&t.indexOf(r)>t.indexOf(e))}function Wa(n,e,t){if(!ja(n))throw new We(ft,"Unexpected parent node type "+n.nodeType);if(t&&t.parentNode!==n)throw new We(Yn,"child not in parent");if(!qa(e)||zt(e)&&n.nodeType!==ke.DOCUMENT_NODE)throw new We(ft,"Unexpected node type "+e.nodeType+" for parent node type "+n.nodeType)}function Ha(n,e,t){var i=n.childNodes||[],r=e.childNodes||[];if(e.nodeType===ke.DOCUMENT_FRAGMENT_NODE){var s=r.filter(kt);if(s.length>1||Tt(r,Pr))throw new We(ft,"More than one element or text in fragment");if(s.length===1&&!dn(n,t))throw new We(ft,"Element in fragment can not be inserted before doctype")}if(kt(e)&&!dn(n,t))throw new We(ft,"Only one element can be added and only after doctype");if(zt(e)){if(Tt(i,zt))throw new We(ft,"Only one doctype is allowed");var a=Tt(i,kt);if(t&&i.indexOf(a)<i.indexOf(t))throw new We(ft,"Doctype can only be inserted before an element");if(!t&&a)throw new We(ft,"Doctype can not be appended since element is present")}}function es(n,e,t){var i=n.childNodes||[],r=e.childNodes||[];if(e.nodeType===ke.DOCUMENT_FRAGMENT_NODE){var s=r.filter(kt);if(s.length>1||Tt(r,Pr))throw new We(ft,"More than one element or text in fragment");if(s.length===1&&!pn(n,t))throw new We(ft,"Element in fragment can not be inserted before doctype")}if(kt(e)&&!pn(n,t))throw new We(ft,"Only one element can be added and only after doctype");if(zt(e)){if(Tt(i,function(u){return zt(u)&&u!==t}))throw new We(ft,"Only one doctype is allowed");var a=Tt(i,kt);if(t&&i.indexOf(a)<i.indexOf(t))throw new We(ft,"Doctype can only be inserted before an element")}}function ji(n,e,t,i){Wa(n,e,t),n.nodeType===ke.DOCUMENT_NODE&&(i||Ha)(n,e,t);var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===Pt){var s=e.firstChild;if(s==null)return e;var a=e.lastChild}else s=a=e;var o=t?t.previousSibling:n.lastChild;s.previousSibling=o,a.nextSibling=t,o?o.nextSibling=s:n.firstChild=s,t==null?n.lastChild=a:t.previousSibling=a;do s.parentNode=n;while(s!==a&&(s=s.nextSibling));return Fr(n.ownerDocument||n,n),e.nodeType==Pt&&(e.firstChild=e.lastChild=null),e}function Va(n,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=n,e.previousSibling=n.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:n.firstChild=e,n.lastChild=e,Fr(n.ownerDocument,n,e),e}Ci.prototype={nodeName:"#document",nodeType:Gn,doctype:null,documentElement:null,_inc:1,insertBefore:function(n,e){if(n.nodeType==Pt){for(var t=n.firstChild;t;){var i=t.nextSibling;this.insertBefore(t,e),t=i}return n}return ji(this,n,e),n.ownerDocument=this,this.documentElement===null&&n.nodeType===Ct&&(this.documentElement=n),n},removeChild:function(n){return this.documentElement==n&&(this.documentElement=null),Qn(this,n)},replaceChild:function(n,e){ji(this,n,e,es),n.ownerDocument=this,e&&this.removeChild(e),kt(n)&&(this.documentElement=n)},importNode:function(n,e){return ss(this,n,e)},getElementById:function(n){var e=null;return wi(this.documentElement,function(t){if(t.nodeType==Ct&&t.getAttribute("id")==n)return e=t,!0}),e},getElementsByClassName:function(n){var e=ln(n);return new ui(this,function(t){var i=[];return e.length>0&&wi(t.documentElement,function(r){if(r!==t&&r.nodeType===Ct){var s=r.getAttribute("class");if(s){var a=n===s;if(!a){var o=ln(s);a=e.every(Pa(o))}a&&i.push(r)}}}),i})},createElement:function(n){var e=new Gt;e.ownerDocument=this,e.nodeName=n,e.tagName=n,e.localName=n,e.childNodes=new Ft;var t=e.attributes=new Ui;return t._ownerElement=e,e},createDocumentFragment:function(){var n=new Qi;return n.ownerDocument=this,n.childNodes=new Ft,n},createTextNode:function(n){var e=new zr;return e.ownerDocument=this,e.appendData(n),e},createComment:function(n){var e=new Mr;return e.ownerDocument=this,e.appendData(n),e},createCDATASection:function(n){var e=new Ur;return e.ownerDocument=this,e.appendData(n),e},createProcessingInstruction:function(n,e){var t=new qr;return t.ownerDocument=this,t.tagName=t.nodeName=t.target=n,t.nodeValue=t.data=e,t},createAttribute:function(n){var e=new qi;return e.ownerDocument=this,e.name=n,e.nodeName=n,e.localName=n,e.specified=!0,e},createEntityReference:function(n){var e=new jr;return e.ownerDocument=this,e.nodeName=n,e},createElementNS:function(n,e){var t=new Gt,i=e.split(":"),r=t.attributes=new Ui;return t.childNodes=new Ft,t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.namespaceURI=n,i.length==2?(t.prefix=i[0],t.localName=i[1]):t.localName=e,r._ownerElement=t,t},createAttributeNS:function(n,e){var t=new qi,i=e.split(":");return t.ownerDocument=this,t.nodeName=e,t.name=e,t.namespaceURI=n,t.specified=!0,i.length==2?(t.prefix=i[0],t.localName=i[1]):t.localName=e,t}};ct(Ci,ke);function Gt(){this._nsMap={}}Gt.prototype={nodeType:Ct,hasAttribute:function(n){return this.getAttributeNode(n)!=null},getAttribute:function(n){var e=this.getAttributeNode(n);return e&&e.value||""},getAttributeNode:function(n){return this.attributes.getNamedItem(n)},setAttribute:function(n,e){var t=this.ownerDocument.createAttribute(n);t.value=t.nodeValue=""+e,this.setAttributeNode(t)},removeAttribute:function(n){var e=this.getAttributeNode(n);e&&this.removeAttributeNode(e)},appendChild:function(n){return n.nodeType===Pt?this.insertBefore(n,null):Va(this,n)},setAttributeNode:function(n){return this.attributes.setNamedItem(n)},setAttributeNodeNS:function(n){return this.attributes.setNamedItemNS(n)},removeAttributeNode:function(n){return this.attributes.removeNamedItem(n.nodeName)},removeAttributeNS:function(n,e){var t=this.getAttributeNodeNS(n,e);t&&this.removeAttributeNode(t)},hasAttributeNS:function(n,e){return this.getAttributeNodeNS(n,e)!=null},getAttributeNS:function(n,e){var t=this.getAttributeNodeNS(n,e);return t&&t.value||""},setAttributeNS:function(n,e,t){var i=this.ownerDocument.createAttributeNS(n,e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},getAttributeNodeNS:function(n,e){return this.attributes.getNamedItemNS(n,e)},getElementsByTagName:function(n){return new ui(this,function(e){var t=[];return wi(e,function(i){i!==e&&i.nodeType==Ct&&(n==="*"||i.tagName==n)&&t.push(i)}),t})},getElementsByTagNameNS:function(n,e){return new ui(this,function(t){var i=[];return wi(t,function(r){r!==t&&r.nodeType===Ct&&(n==="*"||r.namespaceURI===n)&&(e==="*"||r.localName==e)&&i.push(r)}),i})}};Ci.prototype.getElementsByTagName=Gt.prototype.getElementsByTagName;Ci.prototype.getElementsByTagNameNS=Gt.prototype.getElementsByTagNameNS;ct(Gt,ke);function qi(){}qi.prototype.nodeType=oi;ct(qi,ke);function Si(){}Si.prototype={data:"",substringData:function(n,e){return this.data.substring(n,n+e)},appendData:function(n){n=this.data+n,this.nodeValue=this.data=n,this.length=n.length},insertData:function(n,e){this.replaceData(n,0,e)},appendChild:function(n){throw new Error(Qe[ft])},deleteData:function(n,e){this.replaceData(n,e,"")},replaceData:function(n,e,t){var i=this.data.substring(0,n),r=this.data.substring(n+e);t=i+t+r,this.nodeValue=this.data=t,this.length=t.length}};ct(Si,ke);function zr(){}zr.prototype={nodeName:"#text",nodeType:Mi,splitText:function(n){var e=this.data,t=e.substring(n);e=e.substring(0,n),this.data=this.nodeValue=e,this.length=e.length;var i=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}};ct(zr,Si);function Mr(){}Mr.prototype={nodeName:"#comment",nodeType:Vn};ct(Mr,Si);function Ur(){}Ur.prototype={nodeName:"#cdata-section",nodeType:qn};ct(Ur,Si);function Ji(){}Ji.prototype.nodeType=Zn;ct(Ji,ke);function ts(){}ts.prototype.nodeType=Ma;ct(ts,ke);function is(){}is.prototype.nodeType=za;ct(is,ke);function jr(){}jr.prototype.nodeType=Wn;ct(jr,ke);function Qi(){}Qi.prototype.nodeName="#document-fragment";Qi.prototype.nodeType=Pt;ct(Qi,ke);function qr(){}qr.prototype.nodeType=Hn;ct(qr,ke);function rs(){}rs.prototype.serializeToString=function(n,e,t){return ns.call(n,e,t)};ke.prototype.toString=ns;function ns(n,e){var t=[],i=this.nodeType==9&&this.documentElement||this,r=i.prefix,s=i.namespaceURI;if(s&&r==null){var r=i.lookupPrefix(s);if(r==null)var a=[{namespace:s,prefix:null}]}return si(this,t,n,e,a),t.join("")}function vn(n,e,t){var i=n.prefix||"",r=n.namespaceURI;if(!r||i==="xml"&&r===bi.XML||r===bi.XMLNS)return!1;for(var s=t.length;s--;){var a=t[s];if(a.prefix===i)return a.namespace!==r}return!0}function br(n,e,t){n.push(" ",e,'="',t.replace(/[<&"]/g,Kn),'"')}function si(n,e,t,i,r){if(r||(r=[]),i)if(n=i(n),n){if(typeof n=="string"){e.push(n);return}}else return;switch(n.nodeType){case Ct:var s=n.attributes,a=s.length,p=n.firstChild,o=n.tagName;t=bi.isHTML(n.namespaceURI)||t;var u=o;if(!t&&!n.prefix&&n.namespaceURI){for(var h,f=0;f<s.length;f++)if(s.item(f).name==="xmlns"){h=s.item(f).value;break}if(!h)for(var c=r.length-1;c>=0;c--){var b=r[c];if(b.prefix===""&&b.namespace===n.namespaceURI){h=b.namespace;break}}if(h!==n.namespaceURI)for(var c=r.length-1;c>=0;c--){var b=r[c];if(b.namespace===n.namespaceURI){b.prefix&&(u=b.prefix+":"+o);break}}}e.push("<",u);for(var g=0;g<a;g++){var C=s.item(g);C.prefix=="xmlns"?r.push({prefix:C.localName,namespace:C.value}):C.nodeName=="xmlns"&&r.push({prefix:"",namespace:C.value})}for(var g=0;g<a;g++){var C=s.item(g);if(vn(C,t,r)){var k=C.prefix||"",d=C.namespaceURI;br(e,k?"xmlns:"+k:"xmlns",d),r.push({prefix:k,namespace:d})}si(C,e,t,i,r)}if(o===u&&vn(n,t,r)){var k=n.prefix||"",d=n.namespaceURI;br(e,k?"xmlns:"+k:"xmlns",d),r.push({prefix:k,namespace:d})}if(p||t&&!/^(?:meta|link|img|br|hr|input)$/i.test(o)){if(e.push(">"),t&&/^script$/i.test(o))for(;p;)p.data?e.push(p.data):si(p,e,t,i,r.slice()),p=p.nextSibling;else for(;p;)si(p,e,t,i,r.slice()),p=p.nextSibling;e.push("</",u,">")}else e.push("/>");return;case Gn:case Pt:for(var p=n.firstChild;p;)si(p,e,t,i,r.slice()),p=p.nextSibling;return;case oi:return br(e,n.name,n.value);case Mi:return e.push(n.data.replace(/[<&]/g,Kn).replace(/]]>/g,"]]>"));case qn:return e.push("<![CDATA[",n.data,"]]>");case Vn:return e.push("<!--",n.data,"-->");case Zn:var y=n.publicId,D=n.systemId;if(e.push("<!DOCTYPE ",n.name),y)e.push(" PUBLIC ",y),D&&D!="."&&e.push(" ",D),e.push(">");else if(D&&D!=".")e.push(" SYSTEM ",D,">");else{var O=n.internalSubset;O&&e.push(" [",O,"]"),e.push(">")}return;case Hn:return e.push("<?",n.target," ",n.data,"?>");case Wn:return e.push("&",n.nodeName,";");default:e.push("??",n.nodeName)}}function ss(n,e,t){var i;switch(e.nodeType){case Ct:i=e.cloneNode(!1),i.ownerDocument=n;case Pt:break;case oi:t=!0;break}if(i||(i=e.cloneNode(!1)),i.ownerDocument=n,i.parentNode=null,t)for(var r=e.firstChild;r;)i.appendChild(ss(n,r,t)),r=r.nextSibling;return i}function Ar(n,e,t){var i=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var s=e[r];typeof s!="object"&&s!=i[r]&&(i[r]=s)}switch(e.childNodes&&(i.childNodes=new Ft),i.ownerDocument=n,i.nodeType){case Ct:var a=e.attributes,o=i.attributes=new Ui,u=a.length;o._ownerElement=i;for(var h=0;h<u;h++)i.setAttributeNode(Ar(n,a.item(h),!0));break;case oi:t=!0}if(t)for(var f=e.firstChild;f;)i.appendChild(Ar(n,f,t)),f=f.nextSibling;return i}function as(n,e,t){n[e]=t}try{if(Object.defineProperty){let n=function(e){switch(e.nodeType){case Ct:case Pt:var t=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&t.push(n(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}};Object.defineProperty(ui.prototype,"length",{get:function(){return Lr(this),this.$$length}}),Object.defineProperty(ke.prototype,"textContent",{get:function(){return n(this)},set:function(e){switch(this.nodeType){case Ct:case Pt:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),as=function(e,t,i){e["$$"+t]=i}}}catch{}Ht.DocumentType=Ji;Ht.DOMException=We;Ht.DOMImplementation=$n;Ht.Element=Gt;Ht.Node=ke;Ht.NodeList=Ft;Ht.XMLSerializer=rs;var Ti={},os={};(function(n){var e=Vt.freeze;n.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
2
2
|
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),n.entityMap=n.HTML_ENTITIES})(os);var Wr={},_i=Vt.NAMESPACE,Cr=/[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]/,gn=new RegExp("[\\-\\.0-9"+Cr.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),mn=new RegExp("^"+Cr.source+gn.source+"*(?::"+Cr.source+gn.source+"*)?$"),di=0,qt=1,Kt=2,pi=3,Jt=4,Qt=5,vi=6,Oi=7;function li(n,e){this.message=n,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,li)}li.prototype=new Error;li.prototype.name=li.name;function us(){}us.prototype={parse:function(n,e,t){var i=this.domBuilder;i.startDocument(),ls(e,e={}),Ga(n,e,t,i,this.errorHandler),i.endDocument()}};function Ga(n,e,t,i,r){function s(ue){if(ue>65535){ue-=65536;var se=55296+(ue>>10),ne=56320+(ue&1023);return String.fromCharCode(se,ne)}else return String.fromCharCode(ue)}function a(ue){var se=ue.slice(1,-1);return se in t?t[se]:se.charAt(0)==="#"?s(parseInt(se.substr(1).replace("x","0x"))):(r.error("entity not found:"+ue),ue)}function o(ue){if(ue>k){var se=n.substring(k,ue).replace(/&#?\w+;/g,a);b&&u(k),i.characters(se,0,ue-k),k=ue}}function u(ue,se){for(;ue>=f&&(se=c.exec(n));)h=se.index,f=h+se[0].length,b.lineNumber++;b.columnNumber=ue-h+1}for(var h=0,f=0,c=/.*(?:\r\n?|\n)|.*$/g,b=i.locator,g=[{currentNSMap:e}],C={},k=0;;){try{var d=n.indexOf("<",k);if(d<0){if(!n.substr(k).match(/^\s*$/)){var p=i.doc,y=p.createTextNode(n.substr(k));p.appendChild(y),i.currentElement=y}return}switch(d>k&&o(d),n.charAt(d+1)){case"/":var H=n.indexOf(">",d+3),D=n.substring(d+2,H).replace(/[ \t\n\r]+$/g,""),O=g.pop();H<0?(D=n.substring(d+2).replace(/[\s<].*/,""),r.error("end tag name: "+D+" is not complete:"+O.tagName),H=d+1+D.length):D.match(/\s</)&&(D=D.replace(/[\s<].*/,""),r.error("end tag name: "+D+" maybe not complete"),H=d+1+D.length);var _=O.localNSMap,A=O.tagName==D,S=A||O.tagName&&O.tagName.toLowerCase()==D.toLowerCase();if(S){if(i.endElement(O.uri,O.localName,D),_)for(var R in _)Object.prototype.hasOwnProperty.call(_,R)&&i.endPrefixMapping(R);A||r.fatalError("end tag name: "+D+" is not match the current start tagName:"+O.tagName)}else g.push(O);H++;break;case"?":b&&u(d),H=Ka(n,d,i);break;case"!":b&&u(d),H=$a(n,d,i,r);break;default:b&&u(d);var M=new hs,P=g[g.length-1].currentNSMap,H=Za(n,d,M,P,a,r),V=M.length;if(!M.closed&&Xa(n,H,M.tagName,C)&&(M.closed=!0,t.nbsp||r.warning("unclosed xml attribute")),b&&V){for(var te=yn(b,{}),ce=0;ce<V;ce++){var he=M[ce];u(he.offset),he.locator=yn(b,{})}i.locator=te,bn(M,i,P)&&g.push(M),i.locator=b}else bn(M,i,P)&&g.push(M);_i.isHTML(M.uri)&&!M.closed?H=Ya(n,H,M.tagName,a,i):H++}}catch(ue){if(ue instanceof li)throw ue;r.error("element parse error: "+ue),H=-1}H>k?k=H:o(Math.max(d,k)+1)}}function yn(n,e){return e.lineNumber=n.lineNumber,e.columnNumber=n.columnNumber,e}function Za(n,e,t,i,r,s){function a(b,g,C){t.attributeNames.hasOwnProperty(b)&&s.fatalError("Attribute "+b+" redefined"),t.addValue(b,g,C)}for(var o,u,h=++e,f=di;;){var c=n.charAt(h);switch(c){case"=":if(f===qt)o=n.slice(e,h),f=pi;else if(f===Kt)f=pi;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(f===pi||f===qt)if(f===qt&&(s.warning('attribute value must after "="'),o=n.slice(e,h)),e=h+1,h=n.indexOf(c,e),h>0)u=n.slice(e,h).replace(/&#?\w+;/g,r),a(o,u,e-1),f=Qt;else throw new Error("attribute value no end '"+c+"' match");else if(f==Jt)u=n.slice(e,h).replace(/&#?\w+;/g,r),a(o,u,e),s.warning('attribute "'+o+'" missed start quot('+c+")!!"),e=h+1,f=Qt;else throw new Error('attribute value must after "="');break;case"/":switch(f){case di:t.setTagName(n.slice(e,h));case Qt:case vi:case Oi:f=Oi,t.closed=!0;case Jt:case qt:break;case Kt:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),f==di&&t.setTagName(n.slice(e,h)),h;case">":switch(f){case di:t.setTagName(n.slice(e,h));case Qt:case vi:case Oi:break;case Jt:case qt:u=n.slice(e,h),u.slice(-1)==="/"&&(t.closed=!0,u=u.slice(0,-1));case Kt:f===Kt&&(u=o),f==Jt?(s.warning('attribute "'+u+'" missed quot(")!'),a(o,u.replace(/&#?\w+;/g,r),e)):((!_i.isHTML(i[""])||!u.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),a(u,u,e));break;case pi:throw new Error("attribute value missed!!")}return h;case"":c=" ";default:if(c<=" ")switch(f){case di:t.setTagName(n.slice(e,h)),f=vi;break;case qt:o=n.slice(e,h),f=Kt;break;case Jt:var u=n.slice(e,h).replace(/&#?\w+;/g,r);s.warning('attribute "'+u+'" missed quot(")!!'),a(o,u,e);case Qt:f=vi;break}else switch(f){case Kt:t.tagName,(!_i.isHTML(i[""])||!o.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),a(o,o,e),e=h,f=qt;break;case Qt:s.warning('attribute space is required"'+o+'"!!');case vi:f=qt,e=h;break;case pi:f=Jt,e=h;break;case Oi:throw new Error("elements closed character '/' and '>' must be connected to")}}h++}}function bn(n,e,t){for(var i=n.tagName,r=null,c=n.length;c--;){var s=n[c],a=s.qName,o=s.value,b=a.indexOf(":");if(b>0)var u=s.prefix=a.slice(0,b),h=a.slice(b+1),f=u==="xmlns"&&h;else h=a,u=null,f=a==="xmlns"&&"";s.localName=h,f!==!1&&(r==null&&(r={},ls(t,t={})),t[f]=r[f]=o,s.uri=_i.XMLNS,e.startPrefixMapping(f,o))}for(var c=n.length;c--;){s=n[c];var u=s.prefix;u&&(u==="xml"&&(s.uri=_i.XML),u!=="xmlns"&&(s.uri=t[u||""]))}var b=i.indexOf(":");b>0?(u=n.prefix=i.slice(0,b),h=n.localName=i.slice(b+1)):(u=null,h=n.localName=i);var g=n.uri=t[u||""];if(e.startElement(g,h,i,n),n.closed){if(e.endElement(g,h,i),r)for(u in r)Object.prototype.hasOwnProperty.call(r,u)&&e.endPrefixMapping(u)}else return n.currentNSMap=t,n.localNSMap=r,!0}function Ya(n,e,t,i,r){if(/^(?:script|textarea)$/i.test(t)){var s=n.indexOf("</"+t+">",e),a=n.substring(e+1,s);if(/[&<]/.test(a))return/^script$/i.test(t)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,i),r.characters(a,0,a.length),s)}return e+1}function Xa(n,e,t,i){var r=i[t];return r==null&&(r=n.lastIndexOf("</"+t+">"),r<e&&(r=n.lastIndexOf("</"+t)),i[t]=r),r<e}function ls(n,e){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}function $a(n,e,t,i){var r=n.charAt(e+2);switch(r){case"-":if(n.charAt(e+3)==="-"){var s=n.indexOf("-->",e+4);return s>e?(t.comment(n,e+4,s-e-4),s+3):(i.error("Unclosed comment"),-1)}else return-1;default:if(n.substr(e+3,6)=="CDATA["){var s=n.indexOf("]]>",e+9);return t.startCDATA(),t.characters(n,e+9,s-e-9),t.endCDATA(),s+3}var a=Ja(n,e),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var u=a[1][0],h=!1,f=!1;o>3&&(/^public$/i.test(a[2][0])?(h=a[3][0],f=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(f=a[3][0]));var c=a[o-1];return t.startDTD(u,h,f),t.endDTD(),c.index+c[0].length}}return-1}function Ka(n,e,t){var i=n.indexOf("?>",e);if(i){var r=n.substring(e,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return r?(r[0].length,t.processingInstruction(r[1],r[2]),i+2):-1}return-1}function hs(){this.attributeNames={}}hs.prototype={setTagName:function(n){if(!mn.test(n))throw new Error("invalid tagName:"+n);this.tagName=n},addValue:function(n,e,t){if(!mn.test(n))throw new Error("invalid attribute:"+n);this.attributeNames[n]=this.length,this[this.length++]={qName:n,value:e,offset:t}},length:0,getLocalName:function(n){return this[n].localName},getLocator:function(n){return this[n].locator},getQName:function(n){return this[n].qName},getURI:function(n){return this[n].uri},getValue:function(n){return this[n].value}};function Ja(n,e){var t,i=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(r.lastIndex=e,r.exec(n);t=r.exec(n);)if(i.push(t),t[1])return i}Wr.XMLReader=us;Wr.ParseError=li;var Qa=Vt,Hr=Ht,wn=os,fs=Wr,eo=Hr.DOMImplementation,_n=Qa.NAMESPACE,to=fs.ParseError,io=fs.XMLReader;function cs(n){this.options=n||{locator:{}}}cs.prototype.parseFromString=function(n,e){var t=this.options,i=new io,r=t.domBuilder||new ki,s=t.errorHandler,a=t.locator,o=t.xmlns||{},u=/\/x?html?$/.test(e),h=u?wn.HTML_ENTITIES:wn.XML_ENTITIES;return a&&r.setDocumentLocator(a),i.errorHandler=ro(s,r,a),i.domBuilder=t.domBuilder||r,u&&(o[""]=_n.HTML),o.xml=o.xml||_n.XML,n&&typeof n=="string"?i.parse(n,o,h):i.errorHandler.error("invalid doc source"),r.doc};function ro(n,e,t){if(!n){if(e instanceof ki)return e;n=e}var i={},r=n instanceof Function;t=t||{};function s(a){var o=n[a];!o&&r&&(o=n.length==2?function(u){n(a,u)}:n),i[a]=o&&function(u){o("[xmldom "+a+"] "+u+Sr(t))}||function(){}}return s("warning"),s("error"),s("fatalError"),i}function ki(){this.cdata=!1}function ei(n,e){e.lineNumber=n.lineNumber,e.columnNumber=n.columnNumber}ki.prototype={startDocument:function(){this.doc=new eo().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(n,e,t,i){var r=this.doc,s=r.createElementNS(n,t||e),a=i.length;Bi(this,s),this.currentElement=s,this.locator&&ei(this.locator,s);for(var o=0;o<a;o++){var n=i.getURI(o),u=i.getValue(o),t=i.getQName(o),h=r.createAttributeNS(n,t);this.locator&&ei(i.getLocator(o),h),h.value=h.nodeValue=u,s.setAttributeNode(h)}},endElement:function(n,e,t){var i=this.currentElement;i.tagName,this.currentElement=i.parentNode},startPrefixMapping:function(n,e){},endPrefixMapping:function(n){},processingInstruction:function(n,e){var t=this.doc.createProcessingInstruction(n,e);this.locator&&ei(this.locator,t),Bi(this,t)},ignorableWhitespace:function(n,e,t){},characters:function(n,e,t){if(n=En.apply(this,arguments),n){if(this.cdata)var i=this.doc.createCDATASection(n);else var i=this.doc.createTextNode(n);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(n)&&this.doc.appendChild(i),this.locator&&ei(this.locator,i)}},skippedEntity:function(n){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(n){(this.locator=n)&&(n.lineNumber=0)},comment:function(n,e,t){n=En.apply(this,arguments);var i=this.doc.createComment(n);this.locator&&ei(this.locator,i),Bi(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(n,e,t){var i=this.doc.implementation;if(i&&i.createDocumentType){var r=i.createDocumentType(n,e,t);this.locator&&ei(this.locator,r),Bi(this,r),this.doc.doctype=r}},warning:function(n){console.warn("[xmldom warning] "+n,Sr(this.locator))},error:function(n){console.error("[xmldom error] "+n,Sr(this.locator))},fatalError:function(n){throw new to(n,this.locator)}};function Sr(n){if(n)return`
|
|
3
3
|
@`+(n.systemId||"")+"#[line:"+n.lineNumber+",col:"+n.columnNumber+"]"}function En(n,e,t){return typeof n=="string"?n.substr(e,t):n.length>=e+t||e?new java.lang.String(n,e,t)+"":n}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(n){ki.prototype[n]=function(){return null}});function Bi(n,e){n.currentElement?n.currentElement.appendChild(e):n.doc.appendChild(e)}Ti.__DOMHandler=ki;Ti.DOMParser=cs;Ti.DOMImplementation=Hr.DOMImplementation;Ti.XMLSerializer=Hr.XMLSerializer;var ds=Ti.DOMParser;const Vr=typeof window<"u"?window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame:!1,no=1,so=3,ps=typeof URL<"u"?URL:typeof window<"u"?window.URL||window.webkitURL||window.mozURL:void 0;function er(){var n=new Date().getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t=="x"?i:i&7|8).toString(16)});return e}function ao(){return Math.max(document.documentElement.clientHeight,document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight)}function vs(n){return!!(n&&n.nodeType==1)}function Me(n){return!isNaN(parseFloat(n))&&isFinite(n)}function gs(n){let e=parseFloat(n);return Me(n)===!1?!1:typeof n=="string"&&n.indexOf(".")>-1?!0:Math.floor(e)!==e}function ii(n){var e=["Webkit","webkit","Moz","O","ms"],t=["-webkit-","-webkit-","-moz-","-o-","-ms-"],i=n.toLowerCase(),r=e.length;if(typeof document>"u"||typeof document.body.style[i]<"u")return n;for(var s=0;s<r;s++)if(typeof document.body.style[t[s]+i]<"u")return t[s]+i;return n}function ms(n){for(var e=1,t=arguments.length;e<t;e++){var i=arguments[e];for(var r in i)n[r]===void 0&&(n[r]=i[r])}return n}function tt(n){var e=[].slice.call(arguments,1);return e.forEach(function(t){t&&Object.getOwnPropertyNames(t).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(t,i))})}),n}function oo(n,e,t){var i=hi(n,e,t);return e.splice(i,0,n),i}function hi(n,e,t,i,r){var s=i||0,a=r||e.length,o=parseInt(s+(a-s)/2),u;return t||(t=function(h,f){if(h>f)return 1;if(h<f)return-1;if(h==f)return 0}),a-s<=0?o:(u=t(e[o],n),a-s===1?u>=0?o:o+1:u===0?o:u===-1?hi(n,e,t,o,a):hi(n,e,t,s,o))}function Wi(n,e,t,i,r){var s=i||0,a=r||e.length,o=parseInt(s+(a-s)/2),u;return t||(t=function(h,f){if(h>f)return 1;if(h<f)return-1;if(h==f)return 0}),a-s<=0?-1:(u=t(e[o],n),a-s===1?u===0?o:-1:u===0?o:u===-1?Wi(n,e,t,o,a):Wi(n,e,t,s,o))}function Fi(n){var e=window.getComputedStyle(n),t=["width","paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"],i=["height","paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"],r=0,s=0;return t.forEach(function(a){r+=parseFloat(e[a])||0}),i.forEach(function(a){s+=parseFloat(e[a])||0}),{height:s,width:r}}function Hi(n){var e=window.getComputedStyle(n),t=["paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"],i=["paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"],r=0,s=0;return t.forEach(function(a){r+=parseFloat(e[a])||0}),i.forEach(function(a){s+=parseFloat(e[a])||0}),{height:s,width:r}}function Tr(n){let e,t=n.ownerDocument;if(n.nodeType==Node.TEXT_NODE){let i=t.createRange();i.selectNodeContents(n),e=i.getBoundingClientRect()}else e=n.getBoundingClientRect();return e}function Vi(){var n=window.innerWidth,e=window.innerHeight;return{top:0,left:0,right:n,bottom:e,width:n,height:e}}function Gr(n,e){for(var t=n.parentNode,i=t.childNodes,r,s=-1,a=0;a<i.length&&(r=i[a],r.nodeType===e&&s++,r!=n);a++);return s}function uo(n){return Gr(n,so)}function ys(n){return Gr(n,no)}function Ei(n){return["xml","opf","ncx"].indexOf(n)>-1}function bs(n,e){return new Blob([n],{type:e})}function Gi(n,e){var t,i=bs(n,e);return t=ps.createObjectURL(i),t}function ws(n){return ps.revokeObjectURL(n)}function kr(n,e){var t,i;if(typeof n=="string")return t=btoa(n),i="data:"+e+";base64,"+t,i}function _s(n){return Object.prototype.toString.call(n).slice(8,-1)}function Nt(n,e,t){var i,r;return typeof DOMParser>"u"||t?r=ds:r=DOMParser,n.charCodeAt(0)===65279&&(n=n.slice(1)),i=new r().parseFromString(n,e),i}function Ne(n,e){var t;if(!n)throw new Error("No Element Provided");if(typeof n.querySelector<"u")return n.querySelector(e);if(t=n.getElementsByTagName(e),t.length)return t[0]}function Mt(n,e){return typeof n.querySelector<"u"?n.querySelectorAll(e):n.getElementsByTagName(e)}function ri(n,e,t){var i,r;if(typeof n.querySelector<"u"){e+="[";for(var s in t)e+=s+"~='"+t[s]+"'";return e+="]",n.querySelector(e)}else if(i=n.getElementsByTagName(e),r=Array.prototype.slice.call(i,0).filter(function(a){for(var o in t)if(a.getAttribute(o)===t[o])return!0;return!1}),r)return r[0]}function Zi(n,e){var t=n.ownerDocument||n;typeof t.createTreeWalker<"u"?Es(n,e,NodeFilter.SHOW_TEXT):Zr(n,function(i){i&&i.nodeType===3&&e(i)})}function Es(n,e,t){var i=document.createTreeWalker(n,t,null,!1);let r;for(;r=i.nextNode();)e(r)}function Zr(n,e){if(e(n))return!0;if(n=n.firstChild,n)do{if(Zr(n,e))return!0;n=n.nextSibling}while(n)}function xs(n){return new Promise(function(e,t){var i=new FileReader;i.readAsDataURL(n),i.onloadend=function(){e(i.result)}})}function we(){this.resolve=null,this.reject=null,this.id=er(),this.promise=new Promise((n,e)=>{this.resolve=n,this.reject=e}),Object.freeze(this)}function Yi(n,e,t){var i;if(typeof n.querySelector<"u"&&(i=n.querySelector(`${e}[*|type="${t}"]`)),!i||i.length===0){i=Mt(n,e);for(var r=0;r<i.length;r++)if(i[r].getAttributeNS("http://www.idpf.org/2007/ops","type")===t||i[r].getAttribute("epub:type")===t)return i[r]}else return i}function Nr(n){for(var e=[],t=n.childNodes,i=0;i<t.length;i++){let r=t[i];r.nodeType===1&&e.push(r)}return e}function Rr(n){for(var e=[n];n;n=n.parentNode)e.unshift(n);return e}function ni(n,e,t){for(var i=[],r=n.childNodes,s=0;s<r.length;s++){let a=r[s];if(a.nodeType===1&&a.nodeName.toLowerCase()===e){if(t)return a;i.push(a)}}if(!t)return i}function lo(n,e){let t;if(!(n===null||e===""))for(t=n.parentNode;t.nodeType===1;){if(t.tagName.toLowerCase()===e)return t;t=t.parentNode}}class Ds{constructor(){this.collapsed=!1,this.commonAncestorContainer=void 0,this.endContainer=void 0,this.endOffset=void 0,this.startContainer=void 0,this.startOffset=void 0}setStart(e,t){this.startContainer=e,this.startOffset=t,this.endContainer?this.commonAncestorContainer=this._commonAncestorContainer():this.collapse(!0),this._checkCollapsed()}setEnd(e,t){this.endContainer=e,this.endOffset=t,this.startContainer?(this.collapsed=!1,this.commonAncestorContainer=this._commonAncestorContainer()):this.collapse(!1),this._checkCollapsed()}collapse(e){this.collapsed=!0,e?(this.endContainer=this.startContainer,this.endOffset=this.startOffset,this.commonAncestorContainer=this.startContainer.parentNode):(this.startContainer=this.endContainer,this.startOffset=this.endOffset,this.commonAncestorContainer=this.endOffset.parentNode)}selectNode(e){let t=e.parentNode,i=Array.prototype.indexOf.call(t.childNodes,e);this.setStart(t,i),this.setEnd(t,i+1)}selectNodeContents(e){e.childNodes[e.childNodes-1];let t=e.nodeType===3?e.textContent.length:parent.childNodes.length;this.setStart(e,0),this.setEnd(e,t)}_commonAncestorContainer(e,t){var i=Rr(e||this.startContainer),r=Rr(t||this.endContainer);if(i[0]==r[0]){for(var s=0;s<i.length;s++)if(i[s]!=r[s])return i[s-1]}}_checkCollapsed(){this.startContainer===this.endContainer&&this.startOffset===this.endOffset?this.collapsed=!0:this.collapsed=!1}toString(){}}const ho=Object.freeze(Object.defineProperty({__proto__:null,RangeObject:Ds,blob2base64:xs,borders:Hi,bounds:Fi,createBase64Url:kr,createBlob:bs,createBlobUrl:Gi,defaults:ms,defer:we,documentHeight:ao,extend:tt,filterChildren:ni,findChildren:Nr,getParentByTagName:lo,indexOfElementNode:ys,indexOfNode:Gr,indexOfSorted:Wi,indexOfTextNode:uo,insert:oo,isElement:vs,isFloat:gs,isNumber:Me,isXml:Ei,locationOf:hi,nodeBounds:Tr,parents:Rr,parse:Nt,prefixed:ii,qs:Ne,qsa:Mt,qsp:ri,querySelectorByType:Yi,requestAnimationFrame:Vr,revokeBlobUrl:ws,sprint:Zi,treeWalker:Es,type:_s,uuid:er,walk:Zr,windowBounds:Vi},Symbol.toStringTag,{value:"Module"}));if(!As)var As={cwd:function(){return"/"}};function St(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+n)}function xn(n,e){for(var t="",i=-1,r=0,s,a=0;a<=n.length;++a){if(a<n.length)s=n.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||r===1))if(i!==a-1&&r===2){if(t.length<2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){for(var o=t.length-1,u=o;u>=0&&t.charCodeAt(u)!==47;--u);if(u!==o){u===-1?t="":t=t.slice(0,u),i=a,r=0;continue}}else if(t.length===2||t.length===1){t="",i=a,r=0;continue}}e&&(t.length>0?t+="/..":t="..")}else t.length>0?t+="/"+n.slice(i+1,a):t=n.slice(i+1,a);i=a,r=0}else s===46&&r!==-1?++r:r=-1}return t}function fo(n,e){var t=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+i:t+n+i:i}var Pi={resolve:function(){for(var e="",t=!1,i,r=arguments.length-1;r>=-1&&!t;r--){var s;r>=0?s=arguments[r]:(i===void 0&&(i=As.cwd()),s=i),St(s),s.length!==0&&(e=s+"/"+e,t=s.charCodeAt(0)===47)}return e=xn(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(St(e),e.length===0)return".";var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=xn(e,!t),e.length===0&&!t&&(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return St(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];St(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":Pi.normalize(e)},relative:function(e,t){if(St(e),St(t),e===t||(e=Pi.resolve(e),t=Pi.resolve(t),e===t))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var r=e.length,s=r-i,a=1;a<t.length&&t.charCodeAt(a)===47;++a);for(var o=t.length,u=o-a,h=s<u?s:u,f=-1,c=0;c<=h;++c){if(c===h){if(u>h){if(t.charCodeAt(a+c)===47)return t.slice(a+c+1);if(c===0)return t.slice(a+c)}else s>h&&(e.charCodeAt(i+c)===47?f=c:c===0&&(f=0));break}var b=e.charCodeAt(i+c),g=t.charCodeAt(a+c);if(b!==g)break;b===47&&(f=c)}var C="";for(c=i+f+1;c<=r;++c)(c===r||e.charCodeAt(c)===47)&&(C.length===0?C+="..":C+="/..");return C.length>0?C+t.slice(a+f):(a+=f,t.charCodeAt(a)===47&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(St(e),e.length===0)return".";for(var t=e.charCodeAt(0),i=t===47,r=-1,s=!0,a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),t===47){if(!s){r=a;break}}else s=!1;return r===-1?i?"/":".":i&&r===1?"//":e.slice(0,r)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');St(e);var i=0,r=-1,s=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var o=t.length-1,u=-1;for(a=e.length-1;a>=0;--a){var h=e.charCodeAt(a);if(h===47){if(!s){i=a+1;break}}else u===-1&&(s=!1,u=a+1),o>=0&&(h===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=u))}return i===r?r=u:r===-1&&(r=e.length),e.slice(i,r)}else{for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!s){i=a+1;break}}else r===-1&&(s=!1,r=a+1);return r===-1?"":e.slice(i,r)}},extname:function(e){St(e);for(var t=-1,i=0,r=-1,s=!0,a=0,o=e.length-1;o>=0;--o){var u=e.charCodeAt(o);if(u===47){if(!s){i=o+1;break}continue}r===-1&&(s=!1,r=o+1),u===46?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||r===-1||a===0||a===1&&t===r-1&&t===i+1?"":e.slice(t,r)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('Parameter "pathObject" must be an object, not '+typeof e);return fo("/",e)},parse:function(e){St(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var i=e.charCodeAt(0),r=i===47,s;r?(t.root="/",s=1):s=0;for(var a=-1,o=0,u=-1,h=!0,f=e.length-1,c=0;f>=s;--f){if(i=e.charCodeAt(f),i===47){if(!h){o=f+1;break}continue}u===-1&&(h=!1,u=f+1),i===46?a===-1?a=f:c!==1&&(c=1):a!==-1&&(c=-1)}return a===-1||u===-1||c===0||c===1&&a===u-1&&a===o+1?u!==-1&&(o===0&&r?t.base=t.name=e.slice(1,u):t.base=t.name=e.slice(o,u)):(o===0&&r?(t.name=e.slice(1,a),t.base=e.slice(1,u)):(t.name=e.slice(o,a),t.base=e.slice(o,u)),t.ext=e.slice(a,u)),o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",posix:null},co=Pi;const Wt=Oe.getDefaultExportFromCjs(co);class Ut{constructor(e){var t,i;t=e.indexOf("://"),t>-1&&(e=new URL(e).pathname),i=this.parse(e),this.path=e,this.isDirectory(e)?this.directory=e:this.directory=i.dir+"/",this.filename=i.base,this.extension=i.ext.slice(1)}parse(e){return Wt.parse(e)}isAbsolute(e){return Wt.isAbsolute(e||this.path)}isDirectory(e){return e.charAt(e.length-1)==="/"}resolve(e){return Wt.resolve(this.directory,e)}relative(e){var t=e&&e.indexOf("://")>-1;return t?e:Wt.relative(this.directory,e)}splitPath(e){return this.splitPathRe.exec(e).slice(1)}toString(){return this.path}}class Dt{constructor(e,t){var i=e.indexOf("://")>-1,r=e,s;if(this.Url=void 0,this.href=e,this.protocol="",this.origin="",this.hash="",this.hash="",this.search="",this.base=t,!i&&t!==!1&&typeof t!="string"&&window&&window.location&&(this.base=window.location.href),i||this.base)try{this.base?this.Url=new URL(e,this.base):this.Url=new URL(e),this.href=this.Url.href,this.protocol=this.Url.protocol,this.origin=this.Url.origin,this.hash=this.Url.hash,this.search=this.Url.search,r=this.Url.pathname+(this.Url.search?this.Url.search:"")}catch{this.Url=void 0,this.base&&(s=new Ut(this.base),r=s.resolve(r))}this.Path=new Ut(r),this.directory=this.Path.directory,this.filename=this.Path.filename,this.extension=this.Path.extension}path(){return this.Path}resolve(e){var t=e.indexOf("://")>-1,i;return t?e:(i=Wt.resolve(this.directory,e),this.origin+i)}relative(e){return Wt.relative(e,this.directory)}toString(){return this.href}}const ti=1,gt=3,po=9;class ye{constructor(e,t,i){var r;if(this.str="",this.base={},this.spinePos=0,this.range=!1,this.path={},this.start=null,this.end=null,!(this instanceof ye))return new ye(e,t,i);if(typeof t=="string"?this.base=this.parseComponent(t):typeof t=="object"&&t.steps&&(this.base=t),r=this.checkType(e),r==="string")return this.str=e,tt(this,this.parse(e));if(r==="range")return tt(this,this.fromRange(e,this.base,i));if(r==="node")return tt(this,this.fromNode(e,this.base,i));if(r==="EpubCFI"&&e.path)return e;if(e)throw new TypeError("not a valid argument for EpubCFI");return this}checkType(e){return this.isCfiString(e)?"string":e&&typeof e=="object"&&(_s(e)==="Range"||typeof e.startContainer<"u")?"range":e&&typeof e=="object"&&typeof e.nodeType<"u"?"node":e&&typeof e=="object"&&e instanceof ye?"EpubCFI":!1}parse(e){var t={spinePos:-1,range:!1,base:{},path:{},start:null,end:null},i,r,s;return typeof e!="string"?{spinePos:-1}:(e.indexOf("epubcfi(")===0&&e[e.length-1]===")"&&(e=e.slice(8,e.length-1)),i=this.getChapterComponent(e),i?(t.base=this.parseComponent(i),r=this.getPathComponent(e),t.path=this.parseComponent(r),s=this.getRange(e),s&&(t.range=!0,t.start=this.parseComponent(s[0]),t.end=this.parseComponent(s[1])),t.spinePos=t.base.steps[1].index,t):{spinePos:-1})}parseComponent(e){var t={steps:[],terminal:{offset:null,assertion:null}},i=e.split(":"),r=i[0].split("/"),s;return i.length>1&&(s=i[1],t.terminal=this.parseTerminal(s)),r[0]===""&&r.shift(),t.steps=r.map((function(a){return this.parseStep(a)}).bind(this)),t}parseStep(e){var t,i,r,s,a;if(s=e.match(/\[(.*)\]/),s&&s[1]&&(a=s[1]),i=parseInt(e),!isNaN(i))return i%2===0?(t="element",r=i/2-1):(t="text",r=(i-1)/2),{type:t,index:r,id:a||null}}parseTerminal(e){var t,i,r=e.match(/\[(.*)\]/);return r&&r[1]?(t=parseInt(e.split("[")[0]),i=r[1]):t=parseInt(e),Me(t)||(t=null),{offset:t,assertion:i}}getChapterComponent(e){var t=e.split("!");return t[0]}getPathComponent(e){var t=e.split("!");if(t[1])return t[1].split(",")[0]}getRange(e){var t=e.split(",");return t.length===3?[t[1],t[2]]:!1}getCharecterOffsetComponent(e){var t=e.split(":");return t[1]||""}joinSteps(e){return e?e.map(function(t){var i="";return t.type==="element"&&(i+=(t.index+1)*2),t.type==="text"&&(i+=1+2*t.index),t.id&&(i+="["+t.id+"]"),i}).join("/"):""}segmentString(e){var t="/";return t+=this.joinSteps(e.steps),e.terminal&&e.terminal.offset!=null&&(t+=":"+e.terminal.offset),e.terminal&&e.terminal.assertion!=null&&(t+="["+e.terminal.assertion+"]"),t}toString(){var e="epubcfi(";return e+=this.segmentString(this.base),e+="!",e+=this.segmentString(this.path),this.range&&this.start&&(e+=",",e+=this.segmentString(this.start)),this.range&&this.end&&(e+=",",e+=this.segmentString(this.end)),e+=")",e}compare(e,t){var i,r,s,a;if(typeof e=="string"&&(e=new ye(e)),typeof t=="string"&&(t=new ye(t)),e.spinePos>t.spinePos)return 1;if(e.spinePos<t.spinePos)return-1;e.range?(i=e.path.steps.concat(e.start.steps),s=e.start.terminal):(i=e.path.steps,s=e.path.terminal),t.range?(r=t.path.steps.concat(t.start.steps),a=t.start.terminal):(r=t.path.steps,a=t.path.terminal);for(var o=0;o<i.length;o++){if(!i[o])return-1;if(!r[o]||i[o].index>r[o].index)return 1;if(i[o].index<r[o].index)return-1}return i.length<r.length?-1:s.offset>a.offset?1:s.offset<a.offset?-1:0}step(e){var t=e.nodeType===gt?"text":"element";return{id:e.id,tagName:e.tagName,type:t,index:this.position(e)}}filteredStep(e,t){var i=this.filter(e,t),r;if(i)return r=i.nodeType===gt?"text":"element",{id:i.id,tagName:i.tagName,type:r,index:this.filteredPosition(i,t)}}pathTo(e,t,i){for(var r={steps:[],terminal:{offset:null,assertion:null}},s=e,a;s&&s.parentNode&&s.parentNode.nodeType!=po;)i?a=this.filteredStep(s,i):a=this.step(s),a&&r.steps.unshift(a),s=s.parentNode;return t!=null&&t>=0&&(r.terminal.offset=t,r.steps[r.steps.length-1].type!="text"&&r.steps.push({type:"text",index:0})),r}equalStep(e,t){return!e||!t?!1:e.index===t.index&&e.id===t.id&&e.type===t.type}fromRange(e,t,i){var r={range:!1,base:{},path:{},start:null,end:null},s=e.startContainer,a=e.endContainer,o=e.startOffset,u=e.endOffset,h=!1;if(i&&(h=s.ownerDocument.querySelector("."+i)!=null),typeof t=="string"?(r.base=this.parseComponent(t),r.spinePos=r.base.steps[1].index):typeof t=="object"&&(r.base=t),e.collapsed)h&&(o=this.patchOffset(s,o,i)),r.path=this.pathTo(s,o,i);else{r.range=!0,h&&(o=this.patchOffset(s,o,i)),r.start=this.pathTo(s,o,i),h&&(u=this.patchOffset(a,u,i)),r.end=this.pathTo(a,u,i),r.path={steps:[],terminal:null};var f=r.start.steps.length,c;for(c=0;c<f&&this.equalStep(r.start.steps[c],r.end.steps[c]);c++)c===f-1?r.start.terminal===r.end.terminal&&(r.path.steps.push(r.start.steps[c]),r.range=!1):r.path.steps.push(r.start.steps[c]);r.start.steps=r.start.steps.slice(r.path.steps.length),r.end.steps=r.end.steps.slice(r.path.steps.length)}return r}fromNode(e,t,i){var r={range:!1,base:{},path:{},start:null,end:null};return typeof t=="string"?(r.base=this.parseComponent(t),r.spinePos=r.base.steps[1].index):typeof t=="object"&&(r.base=t),r.path=this.pathTo(e,null,i),r}filter(e,t){var i,r,s,a,o,u=!1;return e.nodeType===gt?(u=!0,s=e.parentNode,i=e.parentNode.classList.contains(t)):(u=!1,i=e.classList.contains(t)),i&&u?(a=s.previousSibling,o=s.nextSibling,a&&a.nodeType===gt?r=a:o&&o.nodeType===gt&&(r=o),r||e):i&&!u?!1:e}patchOffset(e,t,i){if(e.nodeType!=gt)throw new Error("Anchor must be a text node");var r=e,s=t;for(e.parentNode.classList.contains(i)&&(r=e.parentNode);r.previousSibling;){if(r.previousSibling.nodeType===ti)if(r.previousSibling.classList.contains(i))s+=r.previousSibling.textContent.length;else break;else s+=r.previousSibling.textContent.length;r=r.previousSibling}return s}normalizedMap(e,t,i){var r={},s=-1,a,o=e.length,u,h;for(a=0;a<o;a++)u=e[a].nodeType,u===ti&&e[a].classList.contains(i)&&(u=gt),a>0&&u===gt&&h===gt?r[a]=s:t===u&&(s=s+1,r[a]=s),h=u;return r}position(e){var t,i;return e.nodeType===ti?(t=e.parentNode.children,t||(t=Nr(e.parentNode)),i=Array.prototype.indexOf.call(t,e)):(t=this.textNodes(e.parentNode),i=t.indexOf(e)),i}filteredPosition(e,t){var i,r,s;return e.nodeType===ti?(i=e.parentNode.children,s=this.normalizedMap(i,ti,t)):(i=e.parentNode.childNodes,e.parentNode.classList.contains(t)&&(e=e.parentNode,i=e.parentNode.childNodes),s=this.normalizedMap(i,gt,t)),r=Array.prototype.indexOf.call(i,e),s[r]}stepsToXpath(e){var t=[".","*"];return e.forEach(function(i){var r=i.index+1;i.id?t.push("*[position()="+r+" and @id='"+i.id+"']"):i.type==="text"?t.push("text()["+r+"]"):t.push("*["+r+"]")}),t.join("/")}stepsToQuerySelector(e){var t=["html"];return e.forEach(function(i){var r=i.index+1;i.id?t.push("#"+i.id):i.type==="text"||t.push("*:nth-child("+r+")")}),t.join(">")}textNodes(e,t){return Array.prototype.slice.call(e.childNodes).filter(function(i){return i.nodeType===gt?!0:!!(t&&i.classList.contains(t))})}walkToNode(e,t,i){var r=t||document,s=r.documentElement,a,o,u=e.length,h;for(h=0;h<u&&(o=e[h],o.type==="element"?o.id?s=r.getElementById(o.id):(a=s.children||Nr(s),s=a[o.index]):o.type==="text"&&(s=this.textNodes(s,i)[o.index]),!!s);h++);return s}findNode(e,t,i){var r=t||document,s,a;return!i&&typeof r.evaluate<"u"?(a=this.stepsToXpath(e),s=r.evaluate(a,r,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue):i?s=this.walkToNode(e,r,i):s=this.walkToNode(e,r),s}fixMiss(e,t,i,r){var s=this.findNode(e.slice(0,-1),i,r),a=s.childNodes,o=this.normalizedMap(a,gt,r),u,h,f=e[e.length-1].index;for(let c in o){if(!o.hasOwnProperty(c))return;if(o[c]===f)if(u=a[c],h=u.textContent.length,t>h)t=t-h;else{u.nodeType===ti?s=u.childNodes[0]:s=u;break}}return{container:s,offset:t}}toRange(e,t){var i=e||document,r,s,a,o,u,h=this,f,c,b=t?i.querySelector("."+t)!=null:!1,g;if(typeof i.createRange<"u"?r=i.createRange():r=new Ds,h.range?(s=h.start,f=h.path.steps.concat(s.steps),o=this.findNode(f,i,b?t:null),a=h.end,c=h.path.steps.concat(a.steps),u=this.findNode(c,i,b?t:null)):(s=h.path,f=h.path.steps,o=this.findNode(h.path.steps,i,b?t:null)),o)try{s.terminal.offset!=null?r.setStart(o,s.terminal.offset):r.setStart(o,0)}catch{g=this.fixMiss(f,s.terminal.offset,i,b?t:null),r.setStart(g.container,g.offset)}else return console.log("No startContainer found for",this.toString()),null;if(u)try{a.terminal.offset!=null?r.setEnd(u,a.terminal.offset):r.setEnd(u,0)}catch{g=this.fixMiss(c,h.end.terminal.offset,i,b?t:null),r.setEnd(g.container,g.offset)}return r}isCfiString(e){return typeof e=="string"&&e.indexOf("epubcfi(")===0&&e[e.length-1]===")"}generateChapterComponent(e,t,i){var r=parseInt(t),s=(e+1)*2,a="/"+s+"/";return a+=(r+1)*2,i&&(a+="["+i+"]"),a}collapse(e){this.range&&(this.range=!1,e?(this.path.steps=this.path.steps.concat(this.start.steps),this.path.terminal=this.start.terminal):(this.path.steps=this.path.steps.concat(this.end.steps),this.path.terminal=this.end.terminal))}}class At{constructor(e){this.context=e||this,this.hooks=[]}register(){for(var e=0;e<arguments.length;++e)if(typeof arguments[e]=="function")this.hooks.push(arguments[e]);else for(var t=0;t<arguments[e].length;++t)this.hooks.push(arguments[e][t])}deregister(e){let t;for(let i=0;i<this.hooks.length;i++)if(t=this.hooks[i],t===e){this.hooks.splice(i,1);break}}trigger(){var e=arguments,t=this.context,i=[];return this.hooks.forEach(function(r){try{var s=r.apply(t,e)}catch(a){console.log(a)}s&&typeof s.then=="function"&&i.push(s)}),Promise.all(i)}list(){return this.hooks}clear(){return this.hooks=[]}}function Cs(n,e){var t,i,r=e.url,s=r.indexOf("://")>-1;n&&(i=Ne(n,"head"),t=Ne(i,"base"),t||(t=n.createElement("base"),i.insertBefore(t,i.firstChild)),!s&&window&&window.location&&(r=window.location.origin+r),t.setAttribute("href",r))}function vo(n,e){var t,i,r=e.canonical;n&&(t=Ne(n,"head"),i=Ne(t,"link[rel='canonical']"),i?i.setAttribute("href",r):(i=n.createElement("link"),i.setAttribute("rel","canonical"),i.setAttribute("href",r),t.appendChild(i)))}function go(n,e){var t,i,r=e.idref;n&&(t=Ne(n,"head"),i=Ne(t,"link[property='dc.identifier']"),i?i.setAttribute("content",r):(i=n.createElement("meta"),i.setAttribute("name","dc.identifier"),i.setAttribute("content",r),t.appendChild(i)))}function mo(n,e){var t=n.querySelectorAll("a[href]");if(t.length)for(var i=Ne(n.ownerDocument,"base"),r=i?i.getAttribute("href"):void 0,s=(function(o){var u=o.getAttribute("href");if(u.indexOf("mailto:")!==0){var h=u.indexOf("://")>-1;if(h)o.setAttribute("target","_blank");else{var f;try{f=new Dt(u,r)}catch{}o.onclick=function(){return f&&f.hash?e(f.Path.path+f.hash):e(f?f.Path.path:u),!1}}}}).bind(this),a=0;a<t.length;a++)s(t[a])}function Dn(n,e,t){return e.forEach(function(i,r){i&&t[r]&&(i=i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),n=n.replace(new RegExp(i,"g"),t[r]))}),n}function xi(n,e,t,i){var r=typeof window<"u"?window.URL:!1,s=r?"blob":"arraybuffer",a=new we,o=new XMLHttpRequest,u=XMLHttpRequest.prototype,h;"overrideMimeType"in u||Object.defineProperty(u,"overrideMimeType",{value:function(){}}),t&&(o.withCredentials=!0),o.onreadystatechange=c,o.onerror=f,o.open("GET",n,!0);for(h in i)o.setRequestHeader(h,i[h]);e=="json"&&o.setRequestHeader("Accept","application/json"),e||(e=new Ut(n).extension),e=="blob"&&(o.responseType=s),Ei(e)&&o.overrideMimeType("text/xml"),e=="binary"&&(o.responseType="arraybuffer"),o.send();function f(b){a.reject(b)}function c(){if(this.readyState===XMLHttpRequest.DONE){var b=!1;if((this.responseType===""||this.responseType==="document")&&(b=this.responseXML),this.status===200||this.status===0||b){var g;if(!this.response&&!b)return a.reject({status:this.status,message:"Empty Response",stack:new Error().stack}),a.promise;if(this.status===403)return a.reject({status:this.status,response:this.response,message:"Forbidden",stack:new Error().stack}),a.promise;b?g=this.responseXML:Ei(e)?g=Nt(this.response,"text/xml"):e=="xhtml"?g=Nt(this.response,"application/xhtml+xml"):e=="html"||e=="htm"?g=Nt(this.response,"text/html"):e=="json"?g=JSON.parse(this.response):e=="blob"?r?g=this.response:g=new Blob([this.response]):g=this.response,a.resolve(g)}else a.reject({status:this.status,message:this.response,stack:new Error().stack})}}return a.promise}class yo{constructor(e,t){this.idref=e.idref,this.linear=e.linear==="yes",this.properties=e.properties,this.index=e.index,this.href=e.href,this.url=e.url,this.canonical=e.canonical,this.next=e.next,this.prev=e.prev,this.cfiBase=e.cfiBase,t?this.hooks=t:(this.hooks={},this.hooks.serialize=new At(this),this.hooks.content=new At(this)),this.document=void 0,this.contents=void 0,this.output=void 0}load(e){var t=e||this.request||xi,i=new we,r=i.promise;return this.contents?i.resolve(this.contents):t(this.url).then((function(s){return this.document=s,this.contents=s.documentElement,this.hooks.content.trigger(this.document,this)}).bind(this)).then((function(){i.resolve(this.contents)}).bind(this)).catch(function(s){i.reject(s)}),r}base(){return Cs(this.document,this)}render(e){var t=new we,i=t.promise;return this.output,this.load(e).then((function(r){var s=typeof navigator<"u"&&navigator.userAgent||"",a=s.indexOf("Trident")>=0,o;typeof XMLSerializer>"u"||a?o=ds:o=XMLSerializer;var u=new o;return this.output=u.serializeToString(r),this.output}).bind(this)).then((function(){return this.hooks.serialize.trigger(this.output,this)}).bind(this)).then((function(){t.resolve(this.output)}).bind(this)).catch(function(r){t.reject(r)}),i}find(e){var t=this,i=[],r=e.toLowerCase(),s=function(a){for(var o=a.textContent.toLowerCase(),u=t.document.createRange(),h,f,c=-1,b,g=150;f!=-1;)f=o.indexOf(r,c+1),f!=-1&&(u=t.document.createRange(),u.setStart(a,f),u.setEnd(a,f+r.length),h=t.cfiFromRange(u),a.textContent.length<g?b=a.textContent:(b=a.textContent.substring(f-g/2,f+g/2),b="..."+b+"..."),i.push({cfi:h,excerpt:b})),c=f};return Zi(t.document,function(a){s(a)}),i}search(e,t=5){if(typeof document.createTreeWalker>"u")return this.find(e);let i=[];const r=150,s=this,a=e.toLowerCase(),o=function(c){const C=c.reduce((k,d)=>k+d.textContent,"").toLowerCase().indexOf(a);if(C!=-1){const d=C+a.length;let p=0,y=0;if(C<c[0].length){let D;for(;p<c.length-1&&(y+=c[p].length,!(d<=y));)p+=1;let O=c[0],_=c[p],A=s.document.createRange();A.setStart(O,C);let S=c.slice(0,p).reduce((M,P)=>M+P.textContent.length,0);A.setEnd(_,S>d?d:d-S),D=s.cfiFromRange(A);let R=c.slice(0,p+1).reduce((M,P)=>M+P.textContent,"");R.length>r&&(R=R.substring(C-r/2,C+r/2),R="..."+R+"..."),i.push({cfi:D,excerpt:R})}}},u=document.createTreeWalker(s.document,NodeFilter.SHOW_TEXT,null,!1);let h,f=[];for(;h=u.nextNode();)f.push(h),f.length==t&&(o(f.slice(0,t)),f=f.slice(1,t));return f.length>0&&o(f),i}reconcileLayoutSettings(e){var t={layout:e.layout,spread:e.spread,orientation:e.orientation};return this.properties.forEach(function(i){var r=i.replace("rendition:",""),s=r.indexOf("-"),a,o;s!=-1&&(a=r.slice(0,s),o=r.slice(s+1),t[a]=o)}),t}cfiFromRange(e){return new ye(e,this.cfiBase).toString()}cfiFromElement(e){return new ye(e,this.cfiBase).toString()}unload(){this.document=void 0,this.contents=void 0,this.output=void 0}destroy(){this.unload(),this.hooks.serialize.clear(),this.hooks.content.clear(),this.hooks=void 0,this.idref=void 0,this.linear=void 0,this.properties=void 0,this.index=void 0,this.href=void 0,this.url=void 0,this.next=void 0,this.prev=void 0,this.cfiBase=void 0}}class bo{constructor(){this.spineItems=[],this.spineByHref={},this.spineById={},this.hooks={},this.hooks.serialize=new At,this.hooks.content=new At,this.hooks.content.register(Cs),this.hooks.content.register(vo),this.hooks.content.register(go),this.epubcfi=new ye,this.loaded=!1,this.items=void 0,this.manifest=void 0,this.spineNodeIndex=void 0,this.baseUrl=void 0,this.length=void 0}unpack(e,t,i){this.items=e.spine,this.manifest=e.manifest,this.spineNodeIndex=e.spineNodeIndex,this.baseUrl=e.baseUrl||e.basePath||"",this.length=this.items.length,this.items.forEach((r,s)=>{var a=this.manifest[r.idref],o;r.index=s,r.cfiBase=this.epubcfi.generateChapterComponent(this.spineNodeIndex,r.index,r.id),r.href&&(r.url=t(r.href,!0),r.canonical=i(r.href)),a&&(r.href=a.href,r.url=t(r.href,!0),r.canonical=i(r.href),a.properties.length&&r.properties.push.apply(r.properties,a.properties)),r.linear==="yes"?(r.prev=(function(){let u=r.index;for(;u>0;){let h=this.get(u-1);if(h&&h.linear)return h;u-=1}}).bind(this),r.next=(function(){let u=r.index;for(;u<this.spineItems.length-1;){let h=this.get(u+1);if(h&&h.linear)return h;u+=1}}).bind(this)):(r.prev=function(){},r.next=function(){}),o=new yo(r,this.hooks),this.append(o)}),this.loaded=!0}get(e){var t=0;if(typeof e>"u")for(;t<this.spineItems.length;){let i=this.spineItems[t];if(i&&i.linear)break;t+=1}else this.epubcfi.isCfiString(e)?t=new ye(e).spinePos:typeof e=="number"||isNaN(e)===!1?t=e:typeof e=="string"&&e.indexOf("#")===0?t=this.spineById[e.substring(1)]:typeof e=="string"&&(e=e.split("#")[0],t=this.spineByHref[e]||this.spineByHref[encodeURI(e)]);return this.spineItems[t]||null}append(e){var t=this.spineItems.length;return e.index=t,this.spineItems.push(e),this.spineByHref[decodeURI(e.href)]=t,this.spineByHref[encodeURI(e.href)]=t,this.spineByHref[e.href]=t,this.spineById[e.idref]=t,t}prepend(e){return this.spineByHref[e.href]=0,this.spineById[e.idref]=0,this.spineItems.forEach(function(t,i){t.index=i}),0}remove(e){var t=this.spineItems.indexOf(e);if(t>-1)return delete this.spineByHref[e.href],delete this.spineById[e.idref],this.spineItems.splice(t,1)}each(){return this.spineItems.forEach.apply(this.spineItems,arguments)}first(){let e=0;do{let t=this.get(e);if(t&&t.linear)return t;e+=1}while(e<this.spineItems.length)}last(){let e=this.spineItems.length-1;do{let t=this.get(e);if(t&&t.linear)return t;e-=1}while(e>=0)}destroy(){this.each(e=>e.destroy()),this.spineItems=void 0,this.spineByHref=void 0,this.spineById=void 0,this.hooks.serialize.clear(),this.hooks.content.clear(),this.hooks=void 0,this.epubcfi=void 0,this.loaded=!1,this.items=void 0,this.manifest=void 0,this.spineNodeIndex=void 0,this.baseUrl=void 0,this.length=void 0}}class Yr{constructor(e){this._q=[],this.context=e,this.tick=Vr,this.running=!1,this.paused=!1}enqueue(){var e,t,i,r=[].shift.call(arguments),s=arguments;if(!r)throw new Error("No Task Provided");return typeof r=="function"?(e=new we,t=e.promise,i={task:r,args:s,deferred:e,promise:t}):i={promise:r},this._q.push(i),this.paused==!1&&!this.running&&this.run(),i.promise}dequeue(){var e,t,i;if(this._q.length&&!this.paused){if(e=this._q.shift(),t=e.task,t)return i=t.apply(this.context,e.args),i&&typeof i.then=="function"?i.then((function(){e.deferred.resolve.apply(this.context,arguments)}).bind(this),(function(){e.deferred.reject.apply(this.context,arguments)}).bind(this)):(e.deferred.resolve.apply(this.context,i),e.promise);if(e.promise)return e.promise}else return e=new we,e.deferred.resolve(),e.promise}dump(){for(;this._q.length;)this.dequeue()}run(){return this.running||(this.running=!0,this.defered=new we),this.tick.call(window,()=>{this._q.length?this.dequeue().then((function(){this.run()}).bind(this)):(this.defered.resolve(),this.running=void 0)}),this.paused==!0&&(this.paused=!1),this.defered.promise}flush(){if(this.running)return this.running;if(this._q.length)return this.running=this.dequeue().then((function(){return this.running=void 0,this.flush()}).bind(this)),this.running}clear(){this._q=[]}length(){return this._q.length}pause(){this.paused=!0}stop(){this._q=[],this.running=!1,this.paused=!0}}const tr="0.3",zi=["keydown","keyup","keypressed","mouseup","mousedown","mousemove","click","touchend","touchstart","touchmove"],Q={BOOK:{OPEN_FAILED:"openFailed"},CONTENTS:{EXPAND:"expand",RESIZE:"resize",SELECTED:"selected",SELECTED_RANGE:"selectedRange",LINK_CLICKED:"linkClicked"},LOCATIONS:{CHANGED:"changed"},MANAGERS:{RESIZE:"resize",RESIZED:"resized",ORIENTATION_CHANGE:"orientationchange",ADDED:"added",SCROLL:"scroll",SCROLLED:"scrolled",REMOVED:"removed"},VIEWS:{AXIS:"axis",WRITING_MODE:"writingMode",LOAD_ERROR:"loaderror",RENDERED:"rendered",RESIZED:"resized",DISPLAYED:"displayed",SHOWN:"shown",HIDDEN:"hidden",MARK_CLICKED:"markClicked"},RENDITION:{STARTED:"started",ATTACHED:"attached",DISPLAYED:"displayed",DISPLAY_ERROR:"displayerror",RENDERED:"rendered",REMOVED:"removed",RESIZED:"resized",ORIENTATION_CHANGE:"orientationchange",LOCATION_CHANGED:"locationChanged",RELOCATED:"relocated",MARK_CLICKED:"markClicked",SELECTED:"selected",LAYOUT:"layout"},LAYOUT:{UPDATED:"updated"},ANNOTATION:{ATTACH:"attach",DETACH:"detach"}};class Ss{constructor(e,t,i){this.spine=e,this.request=t,this.pause=i||100,this.q=new Yr(this),this.epubcfi=new ye,this._locations=[],this._locationsWords=[],this.total=0,this.break=150,this._current=0,this._wordCounter=0,this.currentLocation="",this._currentCfi="",this.processingTimeout=void 0}generate(e){return e&&(this.break=e),this.q.pause(),this.spine.each((function(t){t.linear&&this.q.enqueue(this.process.bind(this),t)}).bind(this)),this.q.run().then((function(){return this.total=this._locations.length-1,this._currentCfi&&(this.currentLocation=this._currentCfi),this._locations}).bind(this))}createRange(){return{startContainer:void 0,startOffset:void 0,endContainer:void 0,endOffset:void 0}}process(e){return e.load(this.request).then((function(t){var i=new we,r=this.parse(t,e.cfiBase);return this._locations=this._locations.concat(r),e.unload(),this.processingTimeout=setTimeout(()=>i.resolve(r),this.pause),i.promise}).bind(this))}parse(e,t,i){var r=[],s,a=e.ownerDocument,o=Ne(a,"body"),u=0,h,f=i||this.break,c=function(b){var g=b.length,C,k=0;if(b.textContent.trim().length===0)return!1;for(u==0&&(s=this.createRange(),s.startContainer=b,s.startOffset=0),C=f-u,C>g&&(u+=g,k=g);k<g;)if(C=f-u,u===0&&(k+=1,s=this.createRange(),s.startContainer=b,s.startOffset=k),k+C>=g)u+=g-k,k=g;else{k+=C,s.endContainer=b,s.endOffset=k;let d=new ye(s,t).toString();r.push(d),u=0}h=b};if(Zi(o,c.bind(this)),s&&s.startContainer&&h){s.endContainer=h,s.endOffset=h.length;let b=new ye(s,t).toString();r.push(b),u=0}return r}generateFromWords(e,t,i){var r=e?new ye(e):void 0;return this.q.pause(),this._locationsWords=[],this._wordCounter=0,this.spine.each((function(s){s.linear&&(r?s.index>=r.spinePos&&this.q.enqueue(this.processWords.bind(this),s,t,r,i):this.q.enqueue(this.processWords.bind(this),s,t,r,i))}).bind(this)),this.q.run().then((function(){return this._currentCfi&&(this.currentLocation=this._currentCfi),this._locationsWords}).bind(this))}processWords(e,t,i,r){return r&&this._locationsWords.length>=r?Promise.resolve():e.load(this.request).then((function(s){var a=new we,o=this.parseWords(s,e,t,i),u=r-this._locationsWords.length;return this._locationsWords=this._locationsWords.concat(o.length>=r?o.slice(0,u):o),e.unload(),this.processingTimeout=setTimeout(()=>a.resolve(o),this.pause),a.promise}).bind(this))}countWords(e){return e=e.replace(/(^\s*)|(\s*$)/gi,""),e=e.replace(/[ ]{2,}/gi," "),e=e.replace(/\n /,`
|
|
4
4
|
`),e.split(" ").length}parseWords(e,t,i,r){var s=t.cfiBase,a=[],o=e.ownerDocument,u=Ne(o,"body"),h=i,f=r?r.spinePos!==t.index:!0,c;r&&t.index===r.spinePos&&(c=r.findNode(r.range?r.path.steps.concat(r.start.steps):r.path.steps,e.ownerDocument));var b=function(g){if(!f)if(g===c)f=!0;else return!1;if(g.textContent.length<10&&g.textContent.trim().length===0)return!1;var C=this.countWords(g.textContent),k,d=0;if(C===0)return!1;for(k=h-this._wordCounter,k>C&&(this._wordCounter+=C,d=C);d<C;)if(k=h-this._wordCounter,d+k>=C)this._wordCounter+=C-d,d=C;else{d+=k;let p=new ye(g,s);a.push({cfi:p.toString(),wordCount:this._wordCounter}),this._wordCounter=0}};return Zi(u,b.bind(this)),a}locationFromCfi(e){let t;return ye.prototype.isCfiString(e)&&(e=new ye(e)),this._locations.length===0?-1:(t=hi(e,this._locations,this.epubcfi.compare),t>this.total?this.total:t)}percentageFromCfi(e){if(this._locations.length===0)return null;var t=this.locationFromCfi(e);return this.percentageFromLocation(t)}percentageFromLocation(e){return!e||!this.total?0:e/this.total}cfiFromLocation(e){var t=-1;return typeof e!="number"&&(e=parseInt(e)),e>=0&&e<this._locations.length&&(t=this._locations[e]),t}cfiFromPercentage(e){let t;if(e>1&&console.warn("Normalize cfiFromPercentage value to between 0 - 1"),e>=1){let i=new ye(this._locations[this.total]);return i.collapse(),i.toString()}return t=Math.ceil(this.total*e),this.cfiFromLocation(t)}load(e){return typeof e=="string"?this._locations=JSON.parse(e):this._locations=e,this.total=this._locations.length-1,this._locations}save(){return JSON.stringify(this._locations)}getCurrent(){return this._current}setCurrent(e){var t;if(typeof e=="string")this._currentCfi=e;else if(typeof e=="number")this._current=e;else return;this._locations.length!==0&&(typeof e=="string"?(t=this.locationFromCfi(e),this._current=t):t=e,this.emit(Q.LOCATIONS.CHANGED,{percentage:this.percentageFromLocation(t)}))}get currentLocation(){return this._current}set currentLocation(e){this.setCurrent(e)}length(){return this._locations.length}destroy(){this.spine=void 0,this.request=void 0,this.pause=void 0,this.q.stop(),this.q=void 0,this.epubcfi=void 0,this._locations=void 0,this.total=void 0,this.break=void 0,this._current=void 0,this.currentLocation=void 0,this._currentCfi=void 0,clearTimeout(this.processingTimeout)}}Rt(Ss.prototype);class wo{constructor(e){this.packagePath="",this.directory="",this.encoding="",e&&this.parse(e)}parse(e){var t;if(!e)throw new Error("Container File Not Found");if(t=Ne(e,"rootfile"),!t)throw new Error("No RootFile Found");this.packagePath=t.getAttribute("full-path"),this.directory=Wt.dirname(this.packagePath),this.encoding=e.xmlEncoding}destroy(){this.packagePath=void 0,this.directory=void 0,this.encoding=void 0}}class An{constructor(e){this.manifest={},this.navPath="",this.ncxPath="",this.coverPath="",this.spineNodeIndex=0,this.spine=[],this.metadata={},e&&this.parse(e)}parse(e){var t,i,r;if(!e)throw new Error("Package File Not Found");if(t=Ne(e,"metadata"),!t)throw new Error("No Metadata Found");if(i=Ne(e,"manifest"),!i)throw new Error("No Manifest Found");if(r=Ne(e,"spine"),!r)throw new Error("No Spine Found");return this.manifest=this.parseManifest(i),this.navPath=this.findNavPath(i),this.ncxPath=this.findNcxPath(i,r),this.coverPath=this.findCoverPath(e),this.spineNodeIndex=ys(r),this.spine=this.parseSpine(r,this.manifest),this.uniqueIdentifier=this.findUniqueIdentifier(e),this.metadata=this.parseMetadata(t),this.metadata.direction=r.getAttribute("page-progression-direction"),{metadata:this.metadata,spine:this.spine,manifest:this.manifest,navPath:this.navPath,ncxPath:this.ncxPath,coverPath:this.coverPath,spineNodeIndex:this.spineNodeIndex}}parseMetadata(e){var t={};return t.title=this.getElementText(e,"title"),t.creator=this.getElementText(e,"creator"),t.description=this.getElementText(e,"description"),t.pubdate=this.getElementText(e,"date"),t.publisher=this.getElementText(e,"publisher"),t.identifier=this.getElementText(e,"identifier"),t.language=this.getElementText(e,"language"),t.rights=this.getElementText(e,"rights"),t.modified_date=this.getPropertyText(e,"dcterms:modified"),t.layout=this.getPropertyText(e,"rendition:layout"),t.orientation=this.getPropertyText(e,"rendition:orientation"),t.flow=this.getPropertyText(e,"rendition:flow"),t.viewport=this.getPropertyText(e,"rendition:viewport"),t.media_active_class=this.getPropertyText(e,"media:active-class"),t.spread=this.getPropertyText(e,"rendition:spread"),t}parseManifest(e){var t={},i=Mt(e,"item"),r=Array.prototype.slice.call(i);return r.forEach(function(s){var a=s.getAttribute("id"),o=s.getAttribute("href")||"",u=s.getAttribute("media-type")||"",h=s.getAttribute("media-overlay")||"",f=s.getAttribute("properties")||"";t[a]={href:o,type:u,overlay:h,properties:f.length?f.split(" "):[]}}),t}parseSpine(e,t){var i=[],r=Mt(e,"itemref"),s=Array.prototype.slice.call(r);return s.forEach(function(a,o){var u=a.getAttribute("idref"),h=a.getAttribute("properties")||"",f=h.length?h.split(" "):[],c={id:a.getAttribute("id"),idref:u,linear:a.getAttribute("linear")||"yes",properties:f,index:o};i.push(c)}),i}findUniqueIdentifier(e){var t=e.documentElement.getAttribute("unique-identifier");if(!t)return"";var i=e.getElementById(t);return i&&i.localName==="identifier"&&i.namespaceURI==="http://purl.org/dc/elements/1.1/"&&i.childNodes.length>0?i.childNodes[0].nodeValue.trim():""}findNavPath(e){var t=ri(e,"item",{properties:"nav"});return t?t.getAttribute("href"):!1}findNcxPath(e,t){var i=ri(e,"item",{"media-type":"application/x-dtbncx+xml"}),r;return i||(r=t.getAttribute("toc"),r&&(i=e.querySelector(`#${r}`))),i?i.getAttribute("href"):!1}findCoverPath(e){var t=Ne(e,"package");t.getAttribute("version");var i=ri(e,"item",{properties:"cover-image"});if(i)return i.getAttribute("href");var r=ri(e,"meta",{name:"cover"});if(r){var s=r.getAttribute("content"),a=e.getElementById(s);return a?a.getAttribute("href"):""}else return!1}getElementText(e,t){var i=e.getElementsByTagNameNS("http://purl.org/dc/elements/1.1/",t),r;return!i||i.length===0?"":(r=i[0],r.childNodes.length?r.childNodes[0].nodeValue:"")}getPropertyText(e,t){var i=ri(e,"meta",{property:t});return i&&i.childNodes.length?i.childNodes[0].nodeValue:""}load(e){this.metadata=e.metadata;let t=e.readingOrder||e.spine;return this.spine=t.map((i,r)=>(i.index=r,i.linear=i.linear||"yes",i)),e.resources.forEach((i,r)=>{this.manifest[r]=i,i.rel&&i.rel[0]==="cover"&&(this.coverPath=i.href)}),this.spineNodeIndex=0,this.toc=e.toc.map((i,r)=>(i.label=i.title,i)),{metadata:this.metadata,spine:this.spine,manifest:this.manifest,navPath:this.navPath,ncxPath:this.ncxPath,coverPath:this.coverPath,spineNodeIndex:this.spineNodeIndex,toc:this.toc}}destroy(){this.manifest=void 0,this.navPath=void 0,this.ncxPath=void 0,this.coverPath=void 0,this.spineNodeIndex=void 0,this.spine=void 0,this.metadata=void 0}}class wr{constructor(e){this.toc=[],this.tocByHref={},this.tocById={},this.landmarks=[],this.landmarksByType={},this.length=0,e&&this.parse(e)}parse(e){let t=e.nodeType,i,r;t&&(i=Ne(e,"html"),r=Ne(e,"ncx")),t?i?(this.toc=this.parseNav(e),this.landmarks=this.parseLandmarks(e)):r&&(this.toc=this.parseNcx(e)):this.toc=this.load(e),this.length=0,this.unpack(this.toc)}unpack(e){for(var t,i=0;i<e.length;i++)t=e[i],t.href&&(this.tocByHref[t.href]=i),t.id&&(this.tocById[t.id]=i),this.length++,t.subitems.length&&this.unpack(t.subitems)}get(e){var t;return e?(e.indexOf("#")===0?t=this.tocById[e.substring(1)]:e in this.tocByHref&&(t=this.tocByHref[e]),this.getByIndex(e,t,this.toc)):this.toc}getByIndex(e,t,i){if(i.length===0)return;const r=i[t];if(r&&(e===r.id||e===r.href))return r;{let s;for(let a=0;a<i.length&&(s=this.getByIndex(e,t,i[a].subitems),!s);++a);return s}}landmark(e){var t;return e?(t=this.landmarksByType[e],this.landmarks[t]):this.landmarks}parseNav(e){var t=Yi(e,"nav","toc"),i=[];if(!t)return i;let r=ni(t,"ol",!0);return r&&(i=this.parseNavList(r)),i}parseNavList(e,t){const i=[];if(!e||!e.children)return i;for(let r=0;r<e.children.length;r++){const s=this.navItem(e.children[r],t);s&&i.push(s)}return i}navItem(e,t){let i=e.getAttribute("id")||void 0,r=ni(e,"a",!0)||ni(e,"span",!0);if(!r)return;let s=r.getAttribute("href")||"";i||(i=s);let a=r.textContent||"",o=[],u=ni(e,"ol",!0);return u&&(o=this.parseNavList(u,i)),{id:i,href:s,label:a,subitems:o,parent:t}}parseLandmarks(e){var t=Yi(e,"nav","landmarks"),i=t?Mt(t,"li"):[],r=i.length,s,a=[],o;if(!i||r===0)return a;for(s=0;s<r;++s)o=this.landmarkItem(i[s]),o&&(a.push(o),this.landmarksByType[o.type]=s);return a}landmarkItem(e){let t=ni(e,"a",!0);if(!t)return;let i=t.getAttributeNS("http://www.idpf.org/2007/ops","type")||void 0,r=t.getAttribute("href")||"",s=t.textContent||"";return{href:r,label:s,type:i}}parseNcx(e){var t=Mt(e,"navPoint"),i=t.length,r,s={},a=[],o,u;if(!t||i===0)return a;for(r=0;r<i;++r)o=this.ncxItem(t[r]),s[o.id]=o,o.parent?(u=s[o.parent],u.subitems.push(o)):a.push(o);return a}ncxItem(e){var t=e.getAttribute("id")||!1,i=Ne(e,"content"),r=i.getAttribute("src"),s=Ne(e,"navLabel"),a=s.textContent?s.textContent:"",o=[],u=e.parentNode,h;return u&&(u.nodeName==="navPoint"||u.nodeName.split(":").slice(-1)[0]==="navPoint")&&(h=u.getAttribute("id")),{id:t,href:r,label:a,subitems:o,parent:h}}load(e){return e.map(t=>(t.label=t.title,t.subitems=t.children?this.load(t.children):[],t))}forEach(e){return this.toc.forEach(e)}}var gi={application:{ecmascript:["es","ecma"],javascript:"js",ogg:"ogx",pdf:"pdf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],"rdf+xml":"rdf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","opf","ncx"],zip:"zip","x-httpd-eruby":"rhtml","x-latex":"latex","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-object":"o","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","epub+zip":"epub","font-tdpfr":"pfr","inkml+xml":["ink","inkml"],json:"json","jsonml+json":"jsonml","mathml+xml":"mathml","metalink+xml":"metalink",mp4:"mp4s","omdoc+xml":"omdoc",oxps:"oxps","vnd.amazon.ebook":"azw",widget:"wgt","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-mobipocket-ebook":["prc","mobi"],"x-mspublisher":"pub","x-nzb":"nzb","x-tgif":"obj","xaml+xml":"xaml","xml-dtd":"dtd","xproc+xml":"xpl","xslt+xml":"xslt","internet-property-stream":"acx","x-compress":"z","x-compressed":"tgz","x-gzip":"gz"},audio:{flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"x-aiff":["aif","aiff","aifc"],"x-ms-wma":"wma","x-wav":"wav",adpcm:"adp",mp4:"mp4a",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"x-icon":"ico",bmp:"bmp",webp:"webp","x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod"},text:{"cache-manifest":["manifest","appcache"],css:"css",csv:"csv",html:["html","htm","shtml","stm"],mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx","tab-separated-values":"tsv","x-bibtex":"bib"},video:{mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"}},_o=function(){var n,e,t,i,r={};for(n in gi)if(gi.hasOwnProperty(n)){for(e in gi[n])if(gi[n].hasOwnProperty(e))if(t=gi[n][e],typeof t=="string")r[t]=n+"/"+e;else for(i=0;i<t.length;i++)r[t[i]]=n+"/"+e}return r}(),Eo="text/plain";function xo(n){return n&&_o[n.split(".").pop().toLowerCase()]||Eo}const ai={lookup:xo};class Do{constructor(e,t){this.settings={replacements:t&&t.replacements||"base64",archive:t&&t.archive,resolver:t&&t.resolver,request:t&&t.request},this.process(e)}process(e){this.manifest=e,this.resources=Object.keys(e).map(function(t){return e[t]}),this.replacementUrls=[],this.html=[],this.assets=[],this.css=[],this.urls=[],this.cssUrls=[],this.split(),this.splitUrls()}split(){this.html=this.resources.filter(function(e){if(e.type==="application/xhtml+xml"||e.type==="text/html")return!0}),this.assets=this.resources.filter(function(e){if(e.type!=="application/xhtml+xml"&&e.type!=="text/html")return!0}),this.css=this.resources.filter(function(e){if(e.type==="text/css")return!0})}splitUrls(){this.urls=this.assets.map((function(e){return e.href}).bind(this)),this.cssUrls=this.css.map(function(e){return e.href})}createUrl(e){var t=new Dt(e),i=ai.lookup(t.filename);return this.settings.archive?this.settings.archive.createUrl(e,{base64:this.settings.replacements==="base64"}):this.settings.replacements==="base64"?this.settings.request(e,"blob").then(r=>xs(r)).then(r=>kr(r,i)):this.settings.request(e,"blob").then(r=>Gi(r,i))}replacements(){if(this.settings.replacements==="none")return new Promise((function(t){t(this.urls)}).bind(this));var e=this.urls.map(t=>{var i=this.settings.resolver(t);return this.createUrl(i).catch(r=>(console.error(r),null))});return Promise.all(e).then(t=>(this.replacementUrls=t.filter(i=>typeof i=="string"),t))}replaceCss(e,t){var i=[];return e=e||this.settings.archive,t=t||this.settings.resolver,this.cssUrls.forEach((function(r){var s=this.createCssFile(r,e,t).then((function(a){var o=this.urls.indexOf(r);o>-1&&(this.replacementUrls[o]=a)}).bind(this));i.push(s)}).bind(this)),Promise.all(i)}createCssFile(e){var t;if(Wt.isAbsolute(e))return new Promise(function(a){a()});var i=this.settings.resolver(e),r;this.settings.archive?r=this.settings.archive.getText(i):r=this.settings.request(i,"text");var s=this.urls.map(a=>{var o=this.settings.resolver(a),u=new Ut(i).relative(o);return u});return r?r.then(a=>(a=Dn(a,s,this.replacementUrls),this.settings.replacements==="base64"?t=kr(a,"text/css"):t=Gi(a,"text/css"),t),a=>new Promise(function(o){o()})):new Promise(function(a){a()})}relativeTo(e,t){return t=t||this.settings.resolver,this.urls.map((function(i){var r=t(i),s=new Ut(e).relative(r);return s}).bind(this))}get(e){var t=this.urls.indexOf(e);if(t!==-1)return this.replacementUrls.length?new Promise((function(i,r){i(this.replacementUrls[t])}).bind(this)):this.createUrl(e)}substitute(e,t){var i;return t?i=this.relativeTo(t):i=this.urls,Dn(e,i,this.replacementUrls)}destroy(){this.settings=void 0,this.manifest=void 0,this.resources=void 0,this.replacementUrls=void 0,this.html=void 0,this.assets=void 0,this.css=void 0,this.urls=void 0,this.cssUrls=void 0}}class _r{constructor(e){this.pages=[],this.locations=[],this.epubcfi=new ye,this.firstPage=0,this.lastPage=0,this.totalPages=0,this.toc=void 0,this.ncx=void 0,e&&(this.pageList=this.parse(e)),this.pageList&&this.pageList.length&&this.process(this.pageList)}parse(e){var t=Ne(e,"html"),i=Ne(e,"ncx");if(t)return this.parseNav(e);if(i)return this.parseNcx(e)}parseNav(e){var t=Yi(e,"nav","page-list"),i=t?Mt(t,"li"):[],r=i.length,s,a=[],o;if(!i||r===0)return a;for(s=0;s<r;++s)o=this.item(i[s]),a.push(o);return a}parseNcx(e){var t=[],i=0,r,s,a,o=0;if(s=Ne(e,"pageList"),!s||(a=Mt(s,"pageTarget"),o=a.length,!a||a.length===0))return t;for(i=0;i<o;++i)r=this.ncxItem(a[i]),t.push(r);return t}ncxItem(e){var t=Ne(e,"navLabel"),i=Ne(t,"text"),r=i.textContent,s=Ne(e,"content"),a=s.getAttribute("src"),o=parseInt(r,10);return{href:a,page:o}}item(e){var t=Ne(e,"a"),i=t.getAttribute("href")||"",r=t.textContent||"",s=parseInt(r),a=i.indexOf("epubcfi"),o,u,h;return a!=-1?(o=i.split("#"),u=o[0],h=o.length>1?o[1]:!1,{cfi:h,href:i,packageUrl:u,page:s}):{href:i,page:s}}process(e){e.forEach(function(t){this.pages.push(t.page),t.cfi&&this.locations.push(t.cfi)},this),this.firstPage=parseInt(this.pages[0]),this.lastPage=parseInt(this.pages[this.pages.length-1]),this.totalPages=this.lastPage-this.firstPage}pageFromCfi(e){var t=-1;if(this.locations.length===0)return-1;var i=Wi(e,this.locations,this.epubcfi.compare);return i!=-1?t=this.pages[i]:(i=hi(e,this.locations,this.epubcfi.compare),t=i-1>=0?this.pages[i-1]:this.pages[0],t!==void 0||(t=-1)),t}cfiFromPage(e){var t=-1;typeof e!="number"&&(e=parseInt(e));var i=this.pages.indexOf(e);return i!=-1&&(t=this.locations[i]),t}pageFromPercentage(e){var t=Math.round(this.totalPages*e);return t}percentageFromPage(e){var t=(e-this.firstPage)/this.totalPages;return Math.round(t*1e3)/1e3}percentageFromCfi(e){var t=this.pageFromCfi(e),i=this.percentageFromPage(t);return i}destroy(){this.pages=void 0,this.locations=void 0,this.epubcfi=void 0,this.pageList=void 0,this.toc=void 0,this.ncx=void 0}}class Xr{constructor(e){this.settings=e,this.name=e.layout||"reflowable",this._spread=e.spread!=="none",this._minSpreadWidth=e.minSpreadWidth||800,this._evenSpreads=e.evenSpreads||!1,e.flow==="scrolled"||e.flow==="scrolled-continuous"||e.flow==="scrolled-doc"?this._flow="scrolled":this._flow="paginated",this.width=0,this.height=0,this.spreadWidth=0,this.delta=0,this.columnWidth=0,this.gap=0,this.divisor=1,this.props={name:this.name,spread:this._spread,flow:this._flow,width:0,height:0,spreadWidth:0,delta:0,columnWidth:0,gap:0,divisor:1}}flow(e){return typeof e<"u"&&(e==="scrolled"||e==="scrolled-continuous"||e==="scrolled-doc"?this._flow="scrolled":this._flow="paginated",this.update({flow:this._flow})),this._flow}spread(e,t){return e&&(this._spread=e!=="none",this.update({spread:this._spread})),t>=0&&(this._minSpreadWidth=t),this._spread}calculate(e,t,i){var r=1,s=i||0,a=e,o=t,u=Math.floor(a/12),h,f,c,b;this._spread&&a>=this._minSpreadWidth?r=2:r=1,this.name==="reflowable"&&this._flow==="paginated"&&!(i>=0)&&(s=u%2===0?u:u-1),this.name==="pre-paginated"&&(s=0),r>1?(h=a/r-s,c=h+s):(h=a,c=a),this.name==="pre-paginated"&&r>1&&(a=h),f=h*r+s,b=a,this.width=a,this.height=o,this.spreadWidth=f,this.pageWidth=c,this.delta=b,this.columnWidth=h,this.gap=s,this.divisor=r,this.update({width:a,height:o,spreadWidth:f,pageWidth:c,delta:b,columnWidth:h,gap:s,divisor:r})}format(e,t,i){var r;return this.name==="pre-paginated"?r=e.fit(this.columnWidth,this.height,t):this._flow==="paginated"?r=e.columns(this.width,this.height,this.columnWidth,this.gap,this.settings.direction):i&&i==="horizontal"?r=e.size(null,this.height):r=e.size(this.width,null),r}count(e,t){let i,r;return this.name==="pre-paginated"?(i=1,r=1):this._flow==="paginated"?(t=t||this.delta,i=Math.ceil(e/t),r=i*this.divisor):(t=t||this.height,i=Math.ceil(e/t),r=i),{spreads:i,pages:r}}update(e){if(Object.keys(e).forEach(t=>{this.props[t]===e[t]&&delete e[t]}),Object.keys(e).length>0){let t=tt(this.props,e);this.emit(Q.LAYOUT.UPDATED,t,e)}}}Rt(Xr.prototype);class Ao{constructor(e){this.rendition=e,this._themes={default:{rules:{},url:"",serialized:""}},this._overrides={},this._current="default",this._injected=[],this.rendition.hooks.content.register(this.inject.bind(this)),this.rendition.hooks.content.register(this.overrides.bind(this))}register(){if(arguments.length!==0){if(arguments.length===1&&typeof arguments[0]=="object")return this.registerThemes(arguments[0]);if(arguments.length===1&&typeof arguments[0]=="string")return this.default(arguments[0]);if(arguments.length===2&&typeof arguments[1]=="string")return this.registerUrl(arguments[0],arguments[1]);if(arguments.length===2&&typeof arguments[1]=="object")return this.registerRules(arguments[0],arguments[1])}}default(e){if(e){if(typeof e=="string")return this.registerUrl("default",e);if(typeof e=="object")return this.registerRules("default",e)}}registerThemes(e){for(var t in e)e.hasOwnProperty(t)&&(typeof e[t]=="string"?this.registerUrl(t,e[t]):this.registerRules(t,e[t]))}registerCss(e,t){this._themes[e]={serialized:t},(this._injected[e]||e=="default")&&this.update(e)}registerUrl(e,t){var i=new Dt(t);this._themes[e]={url:i.toString()},(this._injected[e]||e=="default")&&this.update(e)}registerRules(e,t){this._themes[e]={rules:t},(this._injected[e]||e=="default")&&this.update(e)}select(e){var t=this._current,i;this._current=e,this.update(e),i=this.rendition.getContents(),i.forEach(r=>{r.removeClass(t),r.addClass(e)})}update(e){var t=this.rendition.getContents();t.forEach(i=>{this.add(e,i)})}inject(e){var t=[],i=this._themes,r;for(var s in i)i.hasOwnProperty(s)&&(s===this._current||s==="default")&&(r=i[s],(r.rules&&Object.keys(r.rules).length>0||r.url&&t.indexOf(r.url)===-1)&&this.add(s,e),this._injected.push(s));this._current!="default"&&e.addClass(this._current)}add(e,t){var i=this._themes[e];!i||!t||(i.url?t.addStylesheet(i.url):i.serialized?(t.addStylesheetCss(i.serialized,e),i.injected=!0):i.rules&&(t.addStylesheetRules(i.rules,e),i.injected=!0))}override(e,t,i){var r=this.rendition.getContents();this._overrides[e]={value:t,priority:i===!0},r.forEach(s=>{s.css(e,this._overrides[e].value,this._overrides[e].priority)})}removeOverride(e){var t=this.rendition.getContents();delete this._overrides[e],t.forEach(i=>{i.css(e)})}overrides(e){var t=this._overrides;for(var i in t)t.hasOwnProperty(i)&&e.css(i,t[i].value,t[i].priority)}fontSize(e){this.override("font-size",e)}font(e){this.override("font-family",e,!0)}destroy(){this.rendition=void 0,this._themes=void 0,this._overrides=void 0,this._current=void 0,this._injected=void 0}}class Xi{constructor(e,t,i,r=!1){this.layout=e,this.horizontal=i==="horizontal",this.direction=t||"ltr",this._dev=r}section(e){var t=this.findRanges(e),i=this.rangeListToCfiList(e.section.cfiBase,t);return i}page(e,t,i,r){var s=e&&e.document?e.document.body:!1,a;if(s){if(a=this.rangePairToCfiPair(t,{start:this.findStart(s,i,r),end:this.findEnd(s,i,r)}),this._dev===!0){let o=e.document,u=new ye(a.start).toRange(o),h=new ye(a.end).toRange(o),f=o.defaultView.getSelection(),c=o.createRange();f.removeAllRanges(),c.setStart(u.startContainer,u.startOffset),c.setEnd(h.endContainer,h.endOffset),f.addRange(c)}return a}}walk(e,t){if(!(e&&e.nodeType===Node.TEXT_NODE)){var i={acceptNode:function(u){return u.data.trim().length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}},r=i.acceptNode;r.acceptNode=i.acceptNode;for(var s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,r,!1),a,o;(a=s.nextNode())&&(o=t(a),!o););return o}}findRanges(e){for(var t=[],i=e.contents.scrollWidth(),r=Math.ceil(i/this.layout.spreadWidth),s=r*this.layout.divisor,a=this.layout.columnWidth,o=this.layout.gap,u,h,f=0;f<s.pages;f++)u=(a+o)*f,h=a*(f+1)+o*f,t.push({start:this.findStart(e.document.body,u,h),end:this.findEnd(e.document.body,u,h)});return t}findStart(e,t,i){for(var r=[e],s,a,o=e;r.length;)if(s=r.shift(),a=this.walk(s,u=>{var h,f,c,b,g;if(g=Tr(u),this.horizontal&&this.direction==="ltr"){if(h=this.horizontal?g.left:g.top,f=this.horizontal?g.right:g.bottom,h>=t&&h<=i)return u;if(f>t)return u;o=u,r.push(u)}else if(this.horizontal&&this.direction==="rtl"){if(h=g.left,f=g.right,f<=i&&f>=t)return u;if(h<i)return u;o=u,r.push(u)}else{if(c=g.top,b=g.bottom,c>=t&&c<=i)return u;if(b>t)return u;o=u,r.push(u)}}),a)return this.findTextStartRange(a,t,i);return this.findTextStartRange(o,t,i)}findEnd(e,t,i){for(var r=[e],s,a=e,o;r.length;)if(s=r.shift(),o=this.walk(s,u=>{var h,f,c,b,g;if(g=Tr(u),this.horizontal&&this.direction==="ltr"){if(h=Math.round(g.left),f=Math.round(g.right),h>i&&a)return a;if(f>i)return u;a=u,r.push(u)}else if(this.horizontal&&this.direction==="rtl"){if(h=Math.round(this.horizontal?g.left:g.top),f=Math.round(this.horizontal?g.right:g.bottom),f<t&&a)return a;if(h<t)return u;a=u,r.push(u)}else{if(c=Math.round(g.top),b=Math.round(g.bottom),c>i&&a)return a;if(b>i)return u;a=u,r.push(u)}}),o)return this.findTextEndRange(o,t,i);return this.findTextEndRange(a,t,i)}findTextStartRange(e,t,i){for(var r=this.splitTextNodeIntoRanges(e),s,a,o,u,h,f=0;f<r.length;f++)if(s=r[f],a=s.getBoundingClientRect(),this.horizontal&&this.direction==="ltr"){if(o=a.left,o>=t)return s}else if(this.horizontal&&this.direction==="rtl"){if(h=a.right,h<=i)return s}else if(u=a.top,u>=t)return s;return r[0]}findTextEndRange(e,t,i){for(var r=this.splitTextNodeIntoRanges(e),s,a,o,u,h,f,c,b=0;b<r.length;b++){if(a=r[b],o=a.getBoundingClientRect(),this.horizontal&&this.direction==="ltr"){if(u=o.left,h=o.right,u>i&&s)return s;if(h>i)return a}else if(this.horizontal&&this.direction==="rtl"){if(u=o.left,h=o.right,h<t&&s)return s;if(u<t)return a}else{if(f=o.top,c=o.bottom,f>i&&s)return s;if(c>i)return a}s=a}return r[r.length-1]}splitTextNodeIntoRanges(e,t){var i=[],r=e.textContent||"",s=r.trim(),a,o=e.ownerDocument,u=t||" ",h=s.indexOf(u);if(h===-1||e.nodeType!=Node.TEXT_NODE)return a=o.createRange(),a.selectNodeContents(e),[a];for(a=o.createRange(),a.setStart(e,0),a.setEnd(e,h),i.push(a),a=!1;h!=-1;)h=s.indexOf(u,h+1),h>0&&(a&&(a.setEnd(e,h),i.push(a)),a=o.createRange(),a.setStart(e,h+1));return a&&(a.setEnd(e,s.length),i.push(a)),i}rangePairToCfiPair(e,t){var i=t.start,r=t.end;i.collapse(!0),r.collapse(!1);let s=new ye(i,e).toString(),a=new ye(r,e).toString();return{start:s,end:a}}rangeListToCfiList(e,t){for(var i=[],r,s=0;s<t.length;s++)r=this.rangePairToCfiPair(e,t[s]),i.push(r);return i}axis(e){return e&&(this.horizontal=e==="horizontal"),this.horizontal}}const Ts=typeof navigator<"u",Co=Ts&&/Chrome/.test(navigator.userAgent),Cn=Ts&&!Co&&/AppleWebKit/.test(navigator.userAgent),So=1;class ir{constructor(e,t,i,r){this.epubcfi=new ye,this.document=e,this.documentElement=this.document.documentElement,this.content=t||this.document.body,this.window=this.document.defaultView,this._size={width:0,height:0},this.sectionIndex=r||0,this.cfiBase=i||"",this.epubReadingSystem("epub.js",tr),this.called=0,this.active=!0,this.listeners()}static get listenedEvents(){return zi}width(e){var t=this.content;return e&&Me(e)&&(e=e+"px"),e&&(t.style.width=e),parseInt(this.window.getComputedStyle(t).width)}height(e){var t=this.content;return e&&Me(e)&&(e=e+"px"),e&&(t.style.height=e),parseInt(this.window.getComputedStyle(t).height)}contentWidth(e){var t=this.content||this.document.body;return e&&Me(e)&&(e=e+"px"),e&&(t.style.width=e),parseInt(this.window.getComputedStyle(t).width)}contentHeight(e){var t=this.content||this.document.body;return e&&Me(e)&&(e=e+"px"),e&&(t.style.height=e),parseInt(this.window.getComputedStyle(t).height)}textWidth(){let e,t,i=this.document.createRange(),r=this.content||this.document.body,s=Hi(r);return i.selectNodeContents(r),e=i.getBoundingClientRect(),t=e.width,s&&s.width&&(t+=s.width),Math.round(t)}textHeight(){let e,t,i=this.document.createRange(),r=this.content||this.document.body;return i.selectNodeContents(r),e=i.getBoundingClientRect(),t=e.bottom,Math.round(t)}scrollWidth(){var e=this.documentElement.scrollWidth;return e}scrollHeight(){var e=this.documentElement.scrollHeight;return e}overflow(e){return e&&(this.documentElement.style.overflow=e),this.window.getComputedStyle(this.documentElement).overflow}overflowX(e){return e&&(this.documentElement.style.overflowX=e),this.window.getComputedStyle(this.documentElement).overflowX}overflowY(e){return e&&(this.documentElement.style.overflowY=e),this.window.getComputedStyle(this.documentElement).overflowY}css(e,t,i){var r=this.content||this.document.body;return t?r.style.setProperty(e,t,i?"important":""):r.style.removeProperty(e),this.window.getComputedStyle(r)[e]}viewport(e){var t=this.document.querySelector("meta[name='viewport']"),i={width:void 0,height:void 0,scale:void 0,minimum:void 0,maximum:void 0,scalable:void 0},r=[],s={};if(t&&t.hasAttribute("content")){let a=t.getAttribute("content"),o=a.match(/width\s*=\s*([^,]*)/),u=a.match(/height\s*=\s*([^,]*)/),h=a.match(/initial-scale\s*=\s*([^,]*)/),f=a.match(/minimum-scale\s*=\s*([^,]*)/),c=a.match(/maximum-scale\s*=\s*([^,]*)/),b=a.match(/user-scalable\s*=\s*([^,]*)/);o&&o.length&&typeof o[1]<"u"&&(i.width=o[1]),u&&u.length&&typeof u[1]<"u"&&(i.height=u[1]),h&&h.length&&typeof h[1]<"u"&&(i.scale=h[1]),f&&f.length&&typeof f[1]<"u"&&(i.minimum=f[1]),c&&c.length&&typeof c[1]<"u"&&(i.maximum=c[1]),b&&b.length&&typeof b[1]<"u"&&(i.scalable=b[1])}return s=ms(e||{},i),e&&(s.width&&r.push("width="+s.width),s.height&&r.push("height="+s.height),s.scale&&r.push("initial-scale="+s.scale),s.scalable==="no"?(r.push("minimum-scale="+s.scale),r.push("maximum-scale="+s.scale),r.push("user-scalable="+s.scalable)):(s.scalable&&r.push("user-scalable="+s.scalable),s.minimum&&r.push("minimum-scale="+s.minimum),s.maximum&&r.push("minimum-scale="+s.maximum)),t||(t=this.document.createElement("meta"),t.setAttribute("name","viewport"),this.document.querySelector("head").appendChild(t)),t.setAttribute("content",r.join(", ")),this.window.scrollTo(0,0)),s}expand(){this.emit(Q.CONTENTS.EXPAND)}listeners(){this.imageLoadListeners(),this.mediaQueryListeners(),this.addEventListeners(),this.addSelectionListeners(),typeof ResizeObserver>"u"?(this.resizeListeners(),this.visibilityListeners()):this.resizeObservers(),this.linksHandler()}removeListeners(){this.removeEventListeners(),this.removeSelectionListeners(),this.observer&&this.observer.disconnect(),clearTimeout(this.expanding)}resizeCheck(){let e=this.textWidth(),t=this.textHeight();(e!=this._size.width||t!=this._size.height)&&(this._size={width:e,height:t},this.onResize&&this.onResize(this._size),this.emit(Q.CONTENTS.RESIZE,this._size))}resizeListeners(){clearTimeout(this.expanding),requestAnimationFrame(this.resizeCheck.bind(this)),this.expanding=setTimeout(this.resizeListeners.bind(this),350)}visibilityListeners(){document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&this.active===!1?(this.active=!0,this.resizeListeners()):(this.active=!1,clearTimeout(this.expanding))})}transitionListeners(){let e=this.content;e.style.transitionProperty="font, font-size, font-size-adjust, font-stretch, font-variation-settings, font-weight, width, height",e.style.transitionDuration="0.001ms",e.style.transitionTimingFunction="linear",e.style.transitionDelay="0",this._resizeCheck=this.resizeCheck.bind(this),this.document.addEventListener("transitionend",this._resizeCheck)}mediaQueryListeners(){for(var e=this.document.styleSheets,t=(function(o){o.matches&&!this._expanding&&setTimeout(this.expand.bind(this),1)}).bind(this),i=0;i<e.length;i+=1){var r;try{r=e[i].cssRules}catch{return}if(!r)return;for(var s=0;s<r.length;s+=1)if(r[s].media){var a=this.window.matchMedia(r[s].media.mediaText);a.addListener(t)}}}resizeObservers(){this.observer=new ResizeObserver(e=>{requestAnimationFrame(this.resizeCheck.bind(this))}),this.observer.observe(this.document.documentElement)}mutationObservers(){this.observer=new MutationObserver(t=>{this.resizeCheck()});let e={attributes:!0,childList:!0,characterData:!0,subtree:!0};this.observer.observe(this.document,e)}imageLoadListeners(){for(var e=this.document.querySelectorAll("img"),t,i=0;i<e.length;i++)t=e[i],typeof t.naturalWidth<"u"&&t.naturalWidth===0&&(t.onload=this.expand.bind(this))}fontLoadListeners(){!this.document||!this.document.fonts||this.document.fonts.ready.then((function(){this.resizeCheck()}).bind(this))}root(){return this.document?this.document.documentElement:null}locationOf(e,t){var i,r={left:0,top:0};if(!this.document)return r;if(this.epubcfi.isCfiString(e)){let s=new ye(e).toRange(this.document,t);if(s){try{if(!s.endContainer||s.startContainer==s.endContainer&&s.startOffset==s.endOffset){let a=s.startContainer.textContent.indexOf(" ",s.startOffset);a==-1&&(a=s.startContainer.textContent.length),s.setEnd(s.startContainer,a)}}catch(a){console.error("setting end offset to start container length failed",a)}if(s.startContainer.nodeType===Node.ELEMENT_NODE)i=s.startContainer.getBoundingClientRect(),r.left=i.left,r.top=i.top;else if(Cn){let a=s.startContainer,o=new Range;try{a.nodeType===So?i=a.getBoundingClientRect():s.startOffset+2<a.length?(o.setStart(a,s.startOffset),o.setEnd(a,s.startOffset+2),i=o.getBoundingClientRect()):s.startOffset-2>0?(o.setStart(a,s.startOffset-2),o.setEnd(a,s.startOffset),i=o.getBoundingClientRect()):i=a.parentNode.getBoundingClientRect()}catch(u){console.error(u,u.stack)}}else i=s.getBoundingClientRect()}}else if(typeof e=="string"&&e.indexOf("#")>-1){let s=e.substring(e.indexOf("#")+1),a=this.document.getElementById(s);if(a)if(Cn){let o=new Range;o.selectNode(a),i=o.getBoundingClientRect()}else i=a.getBoundingClientRect()}return i&&(r.left=i.left,r.top=i.top),r}addStylesheet(e){return new Promise((function(t,i){var r,s=!1;if(!this.document){t(!1);return}if(r=this.document.querySelector("link[href='"+e+"']"),r){t(!0);return}r=this.document.createElement("link"),r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=r.onreadystatechange=function(){!s&&(!this.readyState||this.readyState=="complete")&&(s=!0,setTimeout(()=>{t(!0)},1))},this.document.head.appendChild(r)}).bind(this))}_getStylesheetNode(e){var t;return e="epubjs-inserted-css-"+(e||""),this.document?(t=this.document.getElementById(e),t||(t=this.document.createElement("style"),t.id=e,this.document.head.appendChild(t)),t):!1}addStylesheetCss(e,t){if(!this.document||!e)return!1;var i;return i=this._getStylesheetNode(t),i.innerHTML=e,!0}addStylesheetRules(e,t){var i;if(!(!this.document||!e||e.length===0))if(i=this._getStylesheetNode(t).sheet,Object.prototype.toString.call(e)==="[object Array]")for(var r=0,s=e.length;r<s;r++){var a=1,o=e[r],u=e[r][0],h="";Object.prototype.toString.call(o[1][0])==="[object Array]"&&(o=o[1],a=0);for(var f=o.length;a<f;a++){var c=o[a];h+=c[0]+":"+c[1]+(c[2]?" !important":"")+`;
|
|
@@ -19,4 +19,4 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
19
19
|
https://localforage.github.io/localForage
|
|
20
20
|
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
21
21
|
*/(function(n,e){(function(t){n.exports=t()})(function(){return function t(i,r,s){function a(h,f){if(!r[h]){if(!i[h]){var c=typeof Oe.commonjsRequire=="function"&&Oe.commonjsRequire;if(!f&&c)return c(h,!0);if(o)return o(h,!0);var b=new Error("Cannot find module '"+h+"'");throw b.code="MODULE_NOT_FOUND",b}var g=r[h]={exports:{}};i[h][0].call(g.exports,function(C){var k=i[h][1][C];return a(k||C)},g,g.exports,t,i,r,s)}return r[h].exports}for(var o=typeof Oe.commonjsRequire=="function"&&Oe.commonjsRequire,u=0;u<s.length;u++)a(s[u]);return a}({1:[function(t,i,r){(function(s){var a=s.MutationObserver||s.WebKitMutationObserver,o;if(a){var u=0,h=new a(C),f=s.document.createTextNode("");h.observe(f,{characterData:!0}),o=function(){f.data=u=++u%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var c=new s.MessageChannel;c.port1.onmessage=C,o=function(){c.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?o=function(){var d=s.document.createElement("script");d.onreadystatechange=function(){C(),d.onreadystatechange=null,d.parentNode.removeChild(d),d=null},s.document.documentElement.appendChild(d)}:o=function(){setTimeout(C,0)};var b,g=[];function C(){b=!0;for(var d,p,y=g.length;y;){for(p=g,g=[],d=-1;++d<y;)p[d]();y=g.length}b=!1}i.exports=k;function k(d){g.push(d)===1&&!b&&o()}}).call(this,typeof Oe.commonjsGlobal<"u"?Oe.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(t,i,r){var s=t(1);function a(){}var o={},u=["REJECTED"],h=["FULFILLED"],f=["PENDING"];i.exports=c;function c(_){if(typeof _!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,_!==a&&k(this,_)}c.prototype.catch=function(_){return this.then(null,_)},c.prototype.then=function(_,A){if(typeof _!="function"&&this.state===h||typeof A!="function"&&this.state===u)return this;var S=new this.constructor(a);if(this.state!==f){var R=this.state===h?_:A;g(S,R,this.outcome)}else this.queue.push(new b(S,_,A));return S};function b(_,A,S){this.promise=_,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof S=="function"&&(this.onRejected=S,this.callRejected=this.otherCallRejected)}b.prototype.callFulfilled=function(_){o.resolve(this.promise,_)},b.prototype.otherCallFulfilled=function(_){g(this.promise,this.onFulfilled,_)},b.prototype.callRejected=function(_){o.reject(this.promise,_)},b.prototype.otherCallRejected=function(_){g(this.promise,this.onRejected,_)};function g(_,A,S){s(function(){var R;try{R=A(S)}catch(M){return o.reject(_,M)}R===_?o.reject(_,new TypeError("Cannot resolve promise with itself")):o.resolve(_,R)})}o.resolve=function(_,A){var S=d(C,A);if(S.status==="error")return o.reject(_,S.value);var R=S.value;if(R)k(_,R);else{_.state=h,_.outcome=A;for(var M=-1,P=_.queue.length;++M<P;)_.queue[M].callFulfilled(A)}return _},o.reject=function(_,A){_.state=u,_.outcome=A;for(var S=-1,R=_.queue.length;++S<R;)_.queue[S].callRejected(A);return _};function C(_){var A=_&&_.then;if(_&&(typeof _=="object"||typeof _=="function")&&typeof A=="function")return function(){A.apply(_,arguments)}}function k(_,A){var S=!1;function R(V){S||(S=!0,o.reject(_,V))}function M(V){S||(S=!0,o.resolve(_,V))}function P(){A(M,R)}var H=d(P);H.status==="error"&&R(H.value)}function d(_,A){var S={};try{S.value=_(A),S.status="success"}catch(R){S.status="error",S.value=R}return S}c.resolve=p;function p(_){return _ instanceof this?_:o.resolve(new this(a),_)}c.reject=y;function y(_){var A=new this(a);return o.reject(A,_)}c.all=D;function D(_){var A=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var S=_.length,R=!1;if(!S)return this.resolve([]);for(var M=new Array(S),P=0,H=-1,V=new this(a);++H<S;)te(_[H],H);return V;function te(ce,he){A.resolve(ce).then(ue,function(se){R||(R=!0,o.reject(V,se))});function ue(se){M[he]=se,++P===S&&!R&&(R=!0,o.resolve(V,M))}}}c.race=O;function O(_){var A=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var S=_.length,R=!1;if(!S)return this.resolve([]);for(var M=-1,P=new this(a);++M<S;)H(_[M]);return P;function H(V){A.resolve(V).then(function(te){R||(R=!0,o.resolve(P,te))},function(te){R||(R=!0,o.reject(P,te))})}}},{1:1}],3:[function(t,i,r){(function(s){typeof s.Promise!="function"&&(s.Promise=t(2))}).call(this,typeof Oe.commonjsGlobal<"u"?Oe.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(t,i,r){var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w};function a(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}function o(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var u=o();function h(){try{if(!u||!u.open)return!1;var w=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),T=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!w||T)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function f(w,T){w=w||[],T=T||{};try{return new Blob(w,T)}catch(B){if(B.name!=="TypeError")throw B;for(var x=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,L=new x,F=0;F<w.length;F+=1)L.append(w[F]);return L.getBlob(T.type)}}typeof Promise>"u"&&t(3);var c=Promise;function b(w,T){T&&w.then(function(x){T(null,x)},function(x){T(x)})}function g(w,T,x){typeof T=="function"&&w.then(T),typeof x=="function"&&w.catch(x)}function C(w){return typeof w!="string"&&(console.warn(w+" used as a key, but it is not a string."),w=String(w)),w}function k(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var d="local-forage-detect-blob-support",p=void 0,y={},D=Object.prototype.toString,O="readonly",_="readwrite";function A(w){for(var T=w.length,x=new ArrayBuffer(T),L=new Uint8Array(x),F=0;F<T;F++)L[F]=w.charCodeAt(F);return x}function S(w){return new c(function(T){var x=w.transaction(d,_),L=f([""]);x.objectStore(d).put(L,"key"),x.onabort=function(F){F.preventDefault(),F.stopPropagation(),T(!1)},x.oncomplete=function(){var F=navigator.userAgent.match(/Chrome\/(\d+)/),B=navigator.userAgent.match(/Edge\//);T(B||!F||parseInt(F[1],10)>=43)}}).catch(function(){return!1})}function R(w){return typeof p=="boolean"?c.resolve(p):S(w).then(function(T){return p=T,p})}function M(w){var T=y[w.name],x={};x.promise=new c(function(L,F){x.resolve=L,x.reject=F}),T.deferredOperations.push(x),T.dbReady?T.dbReady=T.dbReady.then(function(){return x.promise}):T.dbReady=x.promise}function P(w){var T=y[w.name],x=T.deferredOperations.pop();if(x)return x.resolve(),x.promise}function H(w,T){var x=y[w.name],L=x.deferredOperations.pop();if(L)return L.reject(T),L.promise}function V(w,T){return new c(function(x,L){if(y[w.name]=y[w.name]||le(),w.db)if(T)M(w),w.db.close();else return x(w.db);var F=[w.name];T&&F.push(w.version);var B=u.open.apply(u,F);T&&(B.onupgradeneeded=function(W){var Y=B.result;try{Y.createObjectStore(w.storeName),W.oldVersion<=1&&Y.createObjectStore(d)}catch($){if($.name==="ConstraintError")console.warn('The database "'+w.name+'" has been upgraded from version '+W.oldVersion+" to version "+W.newVersion+', but the storage "'+w.storeName+'" already exists.');else throw $}}),B.onerror=function(W){W.preventDefault(),L(B.error)},B.onsuccess=function(){var W=B.result;W.onversionchange=function(Y){Y.target.close()},x(W),P(w)}})}function te(w){return V(w,!1)}function ce(w){return V(w,!0)}function he(w,T){if(!w.db)return!0;var x=!w.db.objectStoreNames.contains(w.storeName),L=w.version<w.db.version,F=w.version>w.db.version;if(L&&(w.version!==T&&console.warn('The database "'+w.name+`" can't be downgraded from version `+w.db.version+" to version "+w.version+"."),w.version=w.db.version),F||x){if(x){var B=w.db.version+1;B>w.version&&(w.version=B)}return!0}return!1}function ue(w){return new c(function(T,x){var L=new FileReader;L.onerror=x,L.onloadend=function(F){var B=btoa(F.target.result||"");T({__local_forage_encoded_blob:!0,data:B,type:w.type})},L.readAsBinaryString(w)})}function se(w){var T=A(atob(w.data));return f([T],{type:w.type})}function ne(w){return w&&w.__local_forage_encoded_blob}function me(w){var T=this,x=T._initReady().then(function(){var L=y[T._dbInfo.name];if(L&&L.dbReady)return L.dbReady});return g(x,w,w),x}function Re(w){M(w);for(var T=y[w.name],x=T.forages,L=0;L<x.length;L++){var F=x[L];F._dbInfo.db&&(F._dbInfo.db.close(),F._dbInfo.db=null)}return w.db=null,te(w).then(function(B){return w.db=B,he(w)?ce(w):B}).then(function(B){w.db=T.db=B;for(var W=0;W<x.length;W++)x[W]._dbInfo.db=B}).catch(function(B){throw H(w,B),B})}function De(w,T,x,L){L===void 0&&(L=1);try{var F=w.db.transaction(w.storeName,T);x(null,F)}catch(B){if(L>0&&(!w.db||B.name==="InvalidStateError"||B.name==="NotFoundError"))return c.resolve().then(function(){if(!w.db||B.name==="NotFoundError"&&!w.db.objectStoreNames.contains(w.storeName)&&w.version<=w.db.version)return w.db&&(w.version=w.db.version+1),ce(w)}).then(function(){return Re(w).then(function(){De(w,T,x,L-1)})}).catch(x);x(B)}}function le(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Se(w){var T=this,x={db:null};if(w)for(var L in w)x[L]=w[L];var F=y[x.name];F||(F=le(),y[x.name]=F),F.forages.push(T),T._initReady||(T._initReady=T.ready,T.ready=me);var B=[];function W(){return c.resolve()}for(var Y=0;Y<F.forages.length;Y++){var $=F.forages[Y];$!==T&&B.push($._initReady().catch(W))}var K=F.forages.slice(0);return c.all(B).then(function(){return x.db=F.db,te(x)}).then(function(J){return x.db=J,he(x,T._defaultConfig.version)?ce(x):J}).then(function(J){x.db=F.db=J,T._dbInfo=x;for(var oe=0;oe<K.length;oe++){var pe=K[oe];pe!==T&&(pe._dbInfo.db=x.db,pe._dbInfo.version=x.version)}})}function _e(w,T){var x=this;w=C(w);var L=new c(function(F,B){x.ready().then(function(){De(x._dbInfo,O,function(W,Y){if(W)return B(W);try{var $=Y.objectStore(x._dbInfo.storeName),K=$.get(w);K.onsuccess=function(){var J=K.result;J===void 0&&(J=null),ne(J)&&(J=se(J)),F(J)},K.onerror=function(){B(K.error)}}catch(J){B(J)}})}).catch(B)});return b(L,T),L}function $e(w,T){var x=this,L=new c(function(F,B){x.ready().then(function(){De(x._dbInfo,O,function(W,Y){if(W)return B(W);try{var $=Y.objectStore(x._dbInfo.storeName),K=$.openCursor(),J=1;K.onsuccess=function(){var oe=K.result;if(oe){var pe=oe.value;ne(pe)&&(pe=se(pe));var Ce=w(pe,oe.key,J++);Ce!==void 0?F(Ce):oe.continue()}else F()},K.onerror=function(){B(K.error)}}catch(oe){B(oe)}})}).catch(B)});return b(L,T),L}function He(w,T,x){var L=this;w=C(w);var F=new c(function(B,W){var Y;L.ready().then(function(){return Y=L._dbInfo,D.call(T)==="[object Blob]"?R(Y.db).then(function($){return $?T:ue(T)}):T}).then(function($){De(L._dbInfo,_,function(K,J){if(K)return W(K);try{var oe=J.objectStore(L._dbInfo.storeName);$===null&&($=void 0);var pe=oe.put($,w);J.oncomplete=function(){$===void 0&&($=null),B($)},J.onabort=J.onerror=function(){var Ce=pe.error?pe.error:pe.transaction.error;W(Ce)}}catch(Ce){W(Ce)}})}).catch(W)});return b(F,x),F}function Fe(w,T){var x=this;w=C(w);var L=new c(function(F,B){x.ready().then(function(){De(x._dbInfo,_,function(W,Y){if(W)return B(W);try{var $=Y.objectStore(x._dbInfo.storeName),K=$.delete(w);Y.oncomplete=function(){F()},Y.onerror=function(){B(K.error)},Y.onabort=function(){var J=K.error?K.error:K.transaction.error;B(J)}}catch(J){B(J)}})}).catch(B)});return b(L,T),L}function ve(w){var T=this,x=new c(function(L,F){T.ready().then(function(){De(T._dbInfo,_,function(B,W){if(B)return F(B);try{var Y=W.objectStore(T._dbInfo.storeName),$=Y.clear();W.oncomplete=function(){L()},W.onabort=W.onerror=function(){var K=$.error?$.error:$.transaction.error;F(K)}}catch(K){F(K)}})}).catch(F)});return b(x,w),x}function Ge(w){var T=this,x=new c(function(L,F){T.ready().then(function(){De(T._dbInfo,O,function(B,W){if(B)return F(B);try{var Y=W.objectStore(T._dbInfo.storeName),$=Y.count();$.onsuccess=function(){L($.result)},$.onerror=function(){F($.error)}}catch(K){F(K)}})}).catch(F)});return b(x,w),x}function Pe(w,T){var x=this,L=new c(function(F,B){if(w<0){F(null);return}x.ready().then(function(){De(x._dbInfo,O,function(W,Y){if(W)return B(W);try{var $=Y.objectStore(x._dbInfo.storeName),K=!1,J=$.openKeyCursor();J.onsuccess=function(){var oe=J.result;if(!oe){F(null);return}w===0||K?F(oe.key):(K=!0,oe.advance(w))},J.onerror=function(){B(J.error)}}catch(oe){B(oe)}})}).catch(B)});return b(L,T),L}function Ae(w){var T=this,x=new c(function(L,F){T.ready().then(function(){De(T._dbInfo,O,function(B,W){if(B)return F(B);try{var Y=W.objectStore(T._dbInfo.storeName),$=Y.openKeyCursor(),K=[];$.onsuccess=function(){var J=$.result;if(!J){L(K);return}K.push(J.key),J.continue()},$.onerror=function(){F($.error)}}catch(J){F(J)}})}).catch(F)});return b(x,w),x}function Be(w,T){T=k.apply(this,arguments);var x=this.config();w=typeof w!="function"&&w||{},w.name||(w.name=w.name||x.name,w.storeName=w.storeName||x.storeName);var L=this,F;if(!w.name)F=c.reject("Invalid arguments");else{var B=w.name===x.name&&L._dbInfo.db,W=B?c.resolve(L._dbInfo.db):te(w).then(function(Y){var $=y[w.name],K=$.forages;$.db=Y;for(var J=0;J<K.length;J++)K[J]._dbInfo.db=Y;return Y});w.storeName?F=W.then(function(Y){if(Y.objectStoreNames.contains(w.storeName)){var $=Y.version+1;M(w);var K=y[w.name],J=K.forages;Y.close();for(var oe=0;oe<J.length;oe++){var pe=J[oe];pe._dbInfo.db=null,pe._dbInfo.version=$}var Ce=new c(function(Te,Ve){var qe=u.open(w.name,$);qe.onerror=function(vt){var ci=qe.result;ci.close(),Ve(vt)},qe.onupgradeneeded=function(){var vt=qe.result;vt.deleteObjectStore(w.storeName)},qe.onsuccess=function(){var vt=qe.result;vt.close(),Te(vt)}});return Ce.then(function(Te){K.db=Te;for(var Ve=0;Ve<J.length;Ve++){var qe=J[Ve];qe._dbInfo.db=Te,P(qe._dbInfo)}}).catch(function(Te){throw(H(w,Te)||c.resolve()).catch(function(){}),Te})}}):F=W.then(function(Y){M(w);var $=y[w.name],K=$.forages;Y.close();for(var J=0;J<K.length;J++){var oe=K[J];oe._dbInfo.db=null}var pe=new c(function(Ce,Te){var Ve=u.deleteDatabase(w.name);Ve.onerror=function(){var qe=Ve.result;qe&&qe.close(),Te(Ve.error)},Ve.onblocked=function(){console.warn('dropInstance blocked for database "'+w.name+'" until all open connections are closed')},Ve.onsuccess=function(){var qe=Ve.result;qe&&qe.close(),Ce(qe)}});return pe.then(function(Ce){$.db=Ce;for(var Te=0;Te<K.length;Te++){var Ve=K[Te];P(Ve._dbInfo)}}).catch(function(Ce){throw(H(w,Ce)||c.resolve()).catch(function(){}),Ce})})}return b(F,T),F}var Ee={_driver:"asyncStorage",_initStorage:Se,_support:h(),iterate:$e,getItem:_e,setItem:He,removeItem:Fe,clear:ve,length:Ge,key:Pe,keys:Ae,dropInstance:Be};function Ke(){return typeof openDatabase=="function"}var Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ot="~~local_forage_type~",xe=/^~~local_forage_type~([^~]+)~/,Ze="__lfsc__:",mt=Ze.length,it="arbf",et="blob",Ie="si08",de="ui08",st="uic8",It="si16",yt="si32",at="ur16",Ot="ui32",bt="fl32",ut="fl64",Bt=mt+it.length,wt=Object.prototype.toString;function Ye(w){var T=w.length*.75,x=w.length,L,F=0,B,W,Y,$;w[w.length-1]==="="&&(T--,w[w.length-2]==="="&&T--);var K=new ArrayBuffer(T),J=new Uint8Array(K);for(L=0;L<x;L+=4)B=Ue.indexOf(w[L]),W=Ue.indexOf(w[L+1]),Y=Ue.indexOf(w[L+2]),$=Ue.indexOf(w[L+3]),J[F++]=B<<2|W>>4,J[F++]=(W&15)<<4|Y>>2,J[F++]=(Y&3)<<6|$&63;return K}function lt(w){var T=new Uint8Array(w),x="",L;for(L=0;L<T.length;L+=3)x+=Ue[T[L]>>2],x+=Ue[(T[L]&3)<<4|T[L+1]>>4],x+=Ue[(T[L+1]&15)<<2|T[L+2]>>6],x+=Ue[T[L+2]&63];return T.length%3===2?x=x.substring(0,x.length-1)+"=":T.length%3===1&&(x=x.substring(0,x.length-2)+"=="),x}function jt(w,T){var x="";if(w&&(x=wt.call(w)),w&&(x==="[object ArrayBuffer]"||w.buffer&&wt.call(w.buffer)==="[object ArrayBuffer]")){var L,F=Ze;w instanceof ArrayBuffer?(L=w,F+=it):(L=w.buffer,x==="[object Int8Array]"?F+=Ie:x==="[object Uint8Array]"?F+=de:x==="[object Uint8ClampedArray]"?F+=st:x==="[object Int16Array]"?F+=It:x==="[object Uint16Array]"?F+=at:x==="[object Int32Array]"?F+=yt:x==="[object Uint32Array]"?F+=Ot:x==="[object Float32Array]"?F+=bt:x==="[object Float64Array]"?F+=ut:T(new Error("Failed to get type for BinaryArray"))),T(F+lt(L))}else if(x==="[object Blob]"){var B=new FileReader;B.onload=function(){var W=ot+w.type+"~"+lt(this.result);T(Ze+et+W)},B.readAsArrayBuffer(w)}else try{T(JSON.stringify(w))}catch(W){console.error("Couldn't convert value into a JSON string: ",w),T(null,W)}}function E(w){if(w.substring(0,mt)!==Ze)return JSON.parse(w);var T=w.substring(Bt),x=w.substring(mt,Bt),L;if(x===et&&xe.test(T)){var F=T.match(xe);L=F[1],T=T.substring(F[0].length)}var B=Ye(T);switch(x){case it:return B;case et:return f([B],{type:L});case Ie:return new Int8Array(B);case de:return new Uint8Array(B);case st:return new Uint8ClampedArray(B);case It:return new Int16Array(B);case at:return new Uint16Array(B);case yt:return new Int32Array(B);case Ot:return new Uint32Array(B);case bt:return new Float32Array(B);case ut:return new Float64Array(B);default:throw new Error("Unkown type: "+x)}}var G={serialize:jt,deserialize:E,stringToBuffer:Ye,bufferToString:lt};function X(w,T,x,L){w.executeSql("CREATE TABLE IF NOT EXISTS "+T.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],x,L)}function re(w){var T=this,x={db:null};if(w)for(var L in w)x[L]=typeof w[L]!="string"?w[L].toString():w[L];var F=new c(function(B,W){try{x.db=openDatabase(x.name,String(x.version),x.description,x.size)}catch(Y){return W(Y)}x.db.transaction(function(Y){X(Y,x,function(){T._dbInfo=x,B()},function($,K){W(K)})},W)});return x.serializer=G,F}function I(w,T,x,L,F,B){w.executeSql(x,L,F,function(W,Y){Y.code===Y.SYNTAX_ERR?W.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[T.storeName],function($,K){K.rows.length?B($,Y):X($,T,function(){$.executeSql(x,L,F,B)},B)},B):B(W,Y)},B)}function q(w,T){var x=this;w=C(w);var L=new c(function(F,B){x.ready().then(function(){var W=x._dbInfo;W.db.transaction(function(Y){I(Y,W,"SELECT * FROM "+W.storeName+" WHERE key = ? LIMIT 1",[w],function($,K){var J=K.rows.length?K.rows.item(0).value:null;J&&(J=W.serializer.deserialize(J)),F(J)},function($,K){B(K)})})}).catch(B)});return b(L,T),L}function v(w,T){var x=this,L=new c(function(F,B){x.ready().then(function(){var W=x._dbInfo;W.db.transaction(function(Y){I(Y,W,"SELECT * FROM "+W.storeName,[],function($,K){for(var J=K.rows,oe=J.length,pe=0;pe<oe;pe++){var Ce=J.item(pe),Te=Ce.value;if(Te&&(Te=W.serializer.deserialize(Te)),Te=w(Te,Ce.key,pe+1),Te!==void 0){F(Te);return}}F()},function($,K){B(K)})})}).catch(B)});return b(L,T),L}function Z(w,T,x,L){var F=this;w=C(w);var B=new c(function(W,Y){F.ready().then(function(){T===void 0&&(T=null);var $=T,K=F._dbInfo;K.serializer.serialize(T,function(J,oe){oe?Y(oe):K.db.transaction(function(pe){I(pe,K,"INSERT OR REPLACE INTO "+K.storeName+" (key, value) VALUES (?, ?)",[w,J],function(){W($)},function(Ce,Te){Y(Te)})},function(pe){if(pe.code===pe.QUOTA_ERR){if(L>0){W(Z.apply(F,[w,$,x,L-1]));return}Y(pe)}})})}).catch(Y)});return b(B,x),B}function fe(w,T,x){return Z.apply(this,[w,T,x,1])}function l(w,T){var x=this;w=C(w);var L=new c(function(F,B){x.ready().then(function(){var W=x._dbInfo;W.db.transaction(function(Y){I(Y,W,"DELETE FROM "+W.storeName+" WHERE key = ?",[w],function(){F()},function($,K){B(K)})})}).catch(B)});return b(L,T),L}function U(w){var T=this,x=new c(function(L,F){T.ready().then(function(){var B=T._dbInfo;B.db.transaction(function(W){I(W,B,"DELETE FROM "+B.storeName,[],function(){L()},function(Y,$){F($)})})}).catch(F)});return b(x,w),x}function j(w){var T=this,x=new c(function(L,F){T.ready().then(function(){var B=T._dbInfo;B.db.transaction(function(W){I(W,B,"SELECT COUNT(key) as c FROM "+B.storeName,[],function(Y,$){var K=$.rows.item(0).c;L(K)},function(Y,$){F($)})})}).catch(F)});return b(x,w),x}function m(w,T){var x=this,L=new c(function(F,B){x.ready().then(function(){var W=x._dbInfo;W.db.transaction(function(Y){I(Y,W,"SELECT key FROM "+W.storeName+" WHERE id = ? LIMIT 1",[w+1],function($,K){var J=K.rows.length?K.rows.item(0).key:null;F(J)},function($,K){B(K)})})}).catch(B)});return b(L,T),L}function N(w){var T=this,x=new c(function(L,F){T.ready().then(function(){var B=T._dbInfo;B.db.transaction(function(W){I(W,B,"SELECT key FROM "+B.storeName,[],function(Y,$){for(var K=[],J=0;J<$.rows.length;J++)K.push($.rows.item(J).key);L(K)},function(Y,$){F($)})})}).catch(F)});return b(x,w),x}function z(w){return new c(function(T,x){w.transaction(function(L){L.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(F,B){for(var W=[],Y=0;Y<B.rows.length;Y++)W.push(B.rows.item(Y).name);T({db:w,storeNames:W})},function(F,B){x(B)})},function(L){x(L)})})}function ae(w,T){T=k.apply(this,arguments);var x=this.config();w=typeof w!="function"&&w||{},w.name||(w.name=w.name||x.name,w.storeName=w.storeName||x.storeName);var L=this,F;return w.name?F=new c(function(B){var W;w.name===x.name?W=L._dbInfo.db:W=openDatabase(w.name,"","",0),w.storeName?B({db:W,storeNames:[w.storeName]}):B(z(W))}).then(function(B){return new c(function(W,Y){B.db.transaction(function($){function K(Ce){return new c(function(Te,Ve){$.executeSql("DROP TABLE IF EXISTS "+Ce,[],function(){Te()},function(qe,vt){Ve(vt)})})}for(var J=[],oe=0,pe=B.storeNames.length;oe<pe;oe++)J.push(K(B.storeNames[oe]));c.all(J).then(function(){W()}).catch(function(Ce){Y(Ce)})},function($){Y($)})})}):F=c.reject("Invalid arguments"),b(F,T),F}var ee={_driver:"webSQLStorage",_initStorage:re,_support:Ke(),iterate:v,getItem:q,setItem:fe,removeItem:l,clear:U,length:j,key:m,keys:N,dropInstance:ae};function ie(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function ge(w,T){var x=w.name+"/";return w.storeName!==T.storeName&&(x+=w.storeName+"/"),x}function _t(){var w="_localforage_support_test";try{return localStorage.setItem(w,!0),localStorage.removeItem(w),!1}catch{return!0}}function Le(){return!_t()||localStorage.length>0}function be(w){var T=this,x={};if(w)for(var L in w)x[L]=w[L];return x.keyPrefix=ge(w,T._defaultConfig),Le()?(T._dbInfo=x,x.serializer=G,c.resolve()):c.reject()}function je(w){var T=this,x=T.ready().then(function(){for(var L=T._dbInfo.keyPrefix,F=localStorage.length-1;F>=0;F--){var B=localStorage.key(F);B.indexOf(L)===0&&localStorage.removeItem(B)}});return b(x,w),x}function Je(w,T){var x=this;w=C(w);var L=x.ready().then(function(){var F=x._dbInfo,B=localStorage.getItem(F.keyPrefix+w);return B&&(B=F.serializer.deserialize(B)),B});return b(L,T),L}function rt(w,T){var x=this,L=x.ready().then(function(){for(var F=x._dbInfo,B=F.keyPrefix,W=B.length,Y=localStorage.length,$=1,K=0;K<Y;K++){var J=localStorage.key(K);if(J.indexOf(B)===0){var oe=localStorage.getItem(J);if(oe&&(oe=F.serializer.deserialize(oe)),oe=w(oe,J.substring(W),$++),oe!==void 0)return oe}}});return b(L,T),L}function Yt(w,T){var x=this,L=x.ready().then(function(){var F=x._dbInfo,B;try{B=localStorage.key(w)}catch{B=null}return B&&(B=B.substring(F.keyPrefix.length)),B});return b(L,T),L}function Xt(w){var T=this,x=T.ready().then(function(){for(var L=T._dbInfo,F=localStorage.length,B=[],W=0;W<F;W++){var Y=localStorage.key(W);Y.indexOf(L.keyPrefix)===0&&B.push(Y.substring(L.keyPrefix.length))}return B});return b(x,w),x}function ze(w){var T=this,x=T.keys().then(function(L){return L.length});return b(x,w),x}function ht(w,T){var x=this;w=C(w);var L=x.ready().then(function(){var F=x._dbInfo;localStorage.removeItem(F.keyPrefix+w)});return b(L,T),L}function Xe(w,T,x){var L=this;w=C(w);var F=L.ready().then(function(){T===void 0&&(T=null);var B=T;return new c(function(W,Y){var $=L._dbInfo;$.serializer.serialize(T,function(K,J){if(J)Y(J);else try{localStorage.setItem($.keyPrefix+w,K),W(B)}catch(oe){(oe.name==="QuotaExceededError"||oe.name==="NS_ERROR_DOM_QUOTA_REACHED")&&Y(oe),Y(oe)}})})});return b(F,x),F}function Et(w,T){if(T=k.apply(this,arguments),w=typeof w!="function"&&w||{},!w.name){var x=this.config();w.name=w.name||x.name,w.storeName=w.storeName||x.storeName}var L=this,F;return w.name?F=new c(function(B){w.storeName?B(ge(w,L._defaultConfig)):B(w.name+"/")}).then(function(B){for(var W=localStorage.length-1;W>=0;W--){var Y=localStorage.key(W);Y.indexOf(B)===0&&localStorage.removeItem(Y)}}):F=c.reject("Invalid arguments"),b(F,T),F}var pt={_driver:"localStorageWrapper",_initStorage:be,_support:ie(),iterate:rt,getItem:Je,setItem:Xe,removeItem:ht,clear:je,length:ze,key:Yt,keys:Xt,dropInstance:Et},Ri=function(T,x){return T===x||typeof T=="number"&&typeof x=="number"&&isNaN(T)&&isNaN(x)},Vs=function(T,x){for(var L=T.length,F=0;F<L;){if(Ri(T[F],x))return!0;F++}return!1},Jr=Array.isArray||function(w){return Object.prototype.toString.call(w)==="[object Array]"},fi={},Qr={},$t={INDEXEDDB:Ee,WEBSQL:ee,LOCALSTORAGE:pt},Gs=[$t.INDEXEDDB._driver,$t.WEBSQL._driver,$t.LOCALSTORAGE._driver],Ii=["dropInstance"],ur=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ii),Zs={description:"",driver:Gs.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Ys(w,T){w[T]=function(){var x=arguments;return w.ready().then(function(){return w[T].apply(w,x)})}}function lr(){for(var w=1;w<arguments.length;w++){var T=arguments[w];if(T)for(var x in T)T.hasOwnProperty(x)&&(Jr(T[x])?arguments[0][x]=T[x].slice():arguments[0][x]=T[x])}return arguments[0]}var Xs=function(){function w(T){a(this,w);for(var x in $t)if($t.hasOwnProperty(x)){var L=$t[x],F=L._driver;this[x]=F,fi[F]||this.defineDriver(L)}this._defaultConfig=lr({},Zs),this._config=lr({},this._defaultConfig,T),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return w.prototype.config=function(x){if((typeof x>"u"?"undefined":s(x))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var L in x){if(L==="storeName"&&(x[L]=x[L].replace(/\W/g,"_")),L==="version"&&typeof x[L]!="number")return new Error("Database version must be a number.");this._config[L]=x[L]}return"driver"in x&&x.driver?this.setDriver(this._config.driver):!0}else return typeof x=="string"?this._config[x]:this._config},w.prototype.defineDriver=function(x,L,F){var B=new c(function(W,Y){try{var $=x._driver,K=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!x._driver){Y(K);return}for(var J=ur.concat("_initStorage"),oe=0,pe=J.length;oe<pe;oe++){var Ce=J[oe],Te=!Vs(Ii,Ce);if((Te||x[Ce])&&typeof x[Ce]!="function"){Y(K);return}}var Ve=function(){for(var ci=function(Js){return function(){var Qs=new Error("Method "+Js+" is not implemented by the current driver"),en=c.reject(Qs);return b(en,arguments[arguments.length-1]),en}},hr=0,Ks=Ii.length;hr<Ks;hr++){var fr=Ii[hr];x[fr]||(x[fr]=ci(fr))}};Ve();var qe=function(ci){fi[$]&&console.info("Redefining LocalForage driver: "+$),fi[$]=x,Qr[$]=ci,W()};"_support"in x?x._support&&typeof x._support=="function"?x._support().then(qe,Y):qe(!!x._support):qe(!0)}catch(vt){Y(vt)}});return g(B,L,F),B},w.prototype.driver=function(){return this._driver||null},w.prototype.getDriver=function(x,L,F){var B=fi[x]?c.resolve(fi[x]):c.reject(new Error("Driver not found."));return g(B,L,F),B},w.prototype.getSerializer=function(x){var L=c.resolve(G);return g(L,x),L},w.prototype.ready=function(x){var L=this,F=L._driverSet.then(function(){return L._ready===null&&(L._ready=L._initDriver()),L._ready});return g(F,x,x),F},w.prototype.setDriver=function(x,L,F){var B=this;Jr(x)||(x=[x]);var W=this._getSupportedDrivers(x);function Y(){B._config.driver=B.driver()}function $(oe){return B._extend(oe),Y(),B._ready=B._initStorage(B._config),B._ready}function K(oe){return function(){var pe=0;function Ce(){for(;pe<oe.length;){var Te=oe[pe];return pe++,B._dbInfo=null,B._ready=null,B.getDriver(Te).then($).catch(Ce)}Y();var Ve=new Error("No available storage method found.");return B._driverSet=c.reject(Ve),B._driverSet}return Ce()}}var J=this._driverSet!==null?this._driverSet.catch(function(){return c.resolve()}):c.resolve();return this._driverSet=J.then(function(){var oe=W[0];return B._dbInfo=null,B._ready=null,B.getDriver(oe).then(function(pe){B._driver=pe._driver,Y(),B._wrapLibraryMethodsWithReady(),B._initDriver=K(W)})}).catch(function(){Y();var oe=new Error("No available storage method found.");return B._driverSet=c.reject(oe),B._driverSet}),g(this._driverSet,L,F),this._driverSet},w.prototype.supports=function(x){return!!Qr[x]},w.prototype._extend=function(x){lr(this,x)},w.prototype._getSupportedDrivers=function(x){for(var L=[],F=0,B=x.length;F<B;F++){var W=x[F];this.supports(W)&&L.push(W)}return L},w.prototype._wrapLibraryMethodsWithReady=function(){for(var x=0,L=ur.length;x<L;x++)Ys(this,ur[x])},w.prototype.createInstance=function(x){return new w(x)},w}(),$s=new Xs;i.exports=$s},{3:3}]},{},[4])(4)})})(Ws);var Qu=Ws.exports;const On=Oe.getDefaultExportFromCjs(Qu);class Hs{constructor(e,t,i){this.urlCache={},this.storage=void 0,this.name=e,this.requester=t||xi,this.resolver=i,this.online=!0,this.checkRequirements(),this.addListeners()}checkRequirements(){try{let e;typeof On>"u"&&(e=On),this.storage=e.createInstance({name:this.name})}catch{throw new Error("localForage lib not loaded")}}addListeners(){this._status=this.status.bind(this),window.addEventListener("online",this._status),window.addEventListener("offline",this._status)}removeListeners(){window.removeEventListener("online",this._status),window.removeEventListener("offline",this._status),this._status=void 0}status(e){let t=navigator.onLine;this.online=t,t?this.emit("online",this):this.emit("offline",this)}add(e,t){let i=e.resources.map(r=>{let{href:s}=r,a=this.resolver(s),o=window.encodeURIComponent(a);return this.storage.getItem(o).then(u=>!u||t?this.requester(a,"binary").then(h=>this.storage.setItem(o,h)):u)});return Promise.all(i)}put(e,t,i){let r=window.encodeURIComponent(e);return this.storage.getItem(r).then(s=>s||this.requester(e,"binary",t,i).then(a=>this.storage.setItem(r,a)))}request(e,t,i,r){return this.online?this.requester(e,t,i,r).then(s=>(this.put(e),s)):this.retrieve(e,t)}retrieve(e,t){new we;var i,r=new Ut(e);return t||(t=r.extension),t=="blob"?i=this.getBlob(e):i=this.getText(e),i.then(s=>{var a=new we,o;return s?(o=this.handleResponse(s,t),a.resolve(o)):a.reject({message:"File not found in storage: "+e,stack:new Error().stack}),a.promise})}handleResponse(e,t){var i;return t=="json"?i=JSON.parse(e):Ei(t)?i=Nt(e,"text/xml"):t=="xhtml"?i=Nt(e,"application/xhtml+xml"):t=="html"||t=="htm"?i=Nt(e,"text/html"):i=e,i}getBlob(e,t){let i=window.encodeURIComponent(e);return this.storage.getItem(i).then(function(r){if(r)return t=t||ai.lookup(e),new Blob([r],{type:t})})}getText(e,t){let i=window.encodeURIComponent(e);return t=t||ai.lookup(e),this.storage.getItem(i).then(function(r){var s=new we,a=new FileReader,o;if(r)return o=new Blob([r],{type:t}),a.addEventListener("loadend",()=>{s.resolve(a.result)}),a.readAsText(o,t),s.promise})}getBase64(e,t){let i=window.encodeURIComponent(e);return t=t||ai.lookup(e),this.storage.getItem(i).then(r=>{var s=new we,a=new FileReader,o;if(r)return o=new Blob([r],{type:t}),a.addEventListener("loadend",()=>{s.resolve(a.result)}),a.readAsDataURL(o,t),s.promise})}createUrl(e,t){var i=new we,r=window.URL||window.webkitURL||window.mozURL,s,a,o=t&&t.base64;return e in this.urlCache?(i.resolve(this.urlCache[e]),i.promise):(o?(a=this.getBase64(e),a&&a.then((function(u){this.urlCache[e]=u,i.resolve(u)}).bind(this))):(a=this.getBlob(e),a&&a.then((function(u){s=r.createObjectURL(u),this.urlCache[e]=s,i.resolve(s)}).bind(this))),a||i.reject({message:"File not found in storage: "+e,stack:new Error().stack}),i.promise)}revokeUrl(e){var t=window.URL||window.webkitURL||window.mozURL,i=this.urlCache[e];i&&t.revokeObjectURL(i)}destroy(){var e=window.URL||window.webkitURL||window.mozURL;for(let t in this.urlCache)e.revokeObjectURL(t);this.urlCache={},this.removeListeners()}}Rt(Hs.prototype);class xr{constructor(e){this.interactive="",this.fixedLayout="",this.openToSpread="",this.orientationLock="",e&&this.parse(e)}parse(e){if(!e)return this;const t=Ne(e,"display_options");return t?(Mt(t,"option").forEach(r=>{let s="";switch(r.childNodes.length&&(s=r.childNodes[0].nodeValue),r.attributes.name.value){case"interactive":this.interactive=s;break;case"fixed-layout":this.fixedLayout=s;break;case"open-to-spread":this.openToSpread=s;break;case"orientation-lock":this.orientationLock=s;break}}),this):this}destroy(){this.interactive=void 0,this.fixedLayout=void 0,this.openToSpread=void 0,this.orientationLock=void 0}}const Bn="META-INF/container.xml",el="META-INF/com.apple.ibooks.display-options.xml",xt={BINARY:"binary",BASE64:"base64",EPUB:"epub",OPF:"opf",MANIFEST:"json",DIRECTORY:"directory"};class or{constructor(e,t){typeof t>"u"&&typeof e!="string"&&!(e instanceof Blob)&&!(e instanceof ArrayBuffer)&&(t=e,e=void 0),this.settings=tt(this.settings||{},{requestMethod:void 0,requestCredentials:void 0,requestHeaders:void 0,encoding:void 0,replacements:void 0,canonical:void 0,openAs:void 0,store:void 0}),tt(this.settings,t),this.opening=new we,this.opened=this.opening.promise,this.isOpen=!1,this.loading={manifest:new we,spine:new we,metadata:new we,cover:new we,navigation:new we,pageList:new we,resources:new we,displayOptions:new we},this.loaded={manifest:this.loading.manifest.promise,spine:this.loading.spine.promise,metadata:this.loading.metadata.promise,cover:this.loading.cover.promise,navigation:this.loading.navigation.promise,pageList:this.loading.pageList.promise,resources:this.loading.resources.promise,displayOptions:this.loading.displayOptions.promise},this.ready=Promise.all([this.loaded.manifest,this.loaded.spine,this.loaded.metadata,this.loaded.cover,this.loaded.navigation,this.loaded.resources,this.loaded.displayOptions]),this.isRendered=!1,this.request=this.settings.requestMethod||xi,this.spine=new bo,this.locations=new Ss(this.spine,this.load.bind(this)),this.navigation=void 0,this.pageList=void 0,this.url=void 0,this.path=void 0,this.archived=!1,this.archive=void 0,this.storage=void 0,this.resources=void 0,this.rendition=void 0,this.container=void 0,this.packaging=void 0,this.displayOptions=void 0,this.settings.store&&this.store(this.settings.store),e&&this.open(e,this.settings.openAs).catch(i=>{var r=new Error("Cannot load book at "+e);this.emit(Q.BOOK.OPEN_FAILED,r)})}open(e,t){var i,r=t||this.determineType(e);return r===xt.BINARY?(this.archived=!0,this.url=new Dt("/",""),i=this.openEpub(e)):r===xt.BASE64?(this.archived=!0,this.url=new Dt("/",""),i=this.openEpub(e,r)):r===xt.EPUB?(this.archived=!0,this.url=new Dt("/",""),i=this.request(e,"binary",this.settings.requestCredentials,this.settings.requestHeaders).then(this.openEpub.bind(this))):r==xt.OPF?(this.url=new Dt(e),i=this.openPackaging(this.url.Path.toString())):r==xt.MANIFEST?(this.url=new Dt(e),i=this.openManifest(this.url.Path.toString())):(this.url=new Dt(e),i=this.openContainer(Bn).then(this.openPackaging.bind(this))),i}openEpub(e,t){return this.unarchive(e,t||this.settings.encoding).then(()=>this.openContainer(Bn)).then(i=>this.openPackaging(i))}openContainer(e){return this.load(e).then(t=>(this.container=new wo(t),this.resolve(this.container.packagePath)))}openPackaging(e){return this.path=new Ut(e),this.load(e).then(t=>(this.packaging=new An(t),this.unpack(this.packaging)))}openManifest(e){return this.path=new Ut(e),this.load(e).then(t=>(this.packaging=new An,this.packaging.load(t),this.unpack(this.packaging)))}load(e){var t=this.resolve(e);return this.archived?this.archive.request(t):this.request(t,null,this.settings.requestCredentials,this.settings.requestHeaders)}resolve(e,t){if(e){var i=e,r=e.indexOf("://")>-1;return r?e:(this.path&&(i=this.path.resolve(e)),t!=!1&&this.url&&(i=this.url.resolve(i)),i)}}canonical(e){var t=e;return e?(this.settings.canonical?t=this.settings.canonical(e):t=this.resolve(e,!0),t):""}determineType(e){var t,i,r;if(this.settings.encoding==="base64")return xt.BASE64;if(typeof e!="string")return xt.BINARY;if(t=new Dt(e),i=t.path(),r=i.extension,r&&(r=r.replace(/\?.*$/,"")),!r)return xt.DIRECTORY;if(r==="epub")return xt.EPUB;if(r==="opf")return xt.OPF;if(r==="json")return xt.MANIFEST}unpack(e){this.package=e,this.packaging.metadata.layout===""?this.load(this.url.resolve(el)).then(t=>{this.displayOptions=new xr(t),this.loading.displayOptions.resolve(this.displayOptions)}).catch(t=>{this.displayOptions=new xr,this.loading.displayOptions.resolve(this.displayOptions)}):(this.displayOptions=new xr,this.loading.displayOptions.resolve(this.displayOptions)),this.spine.unpack(this.packaging,this.resolve.bind(this),this.canonical.bind(this)),this.resources=new Do(this.packaging.manifest,{archive:this.archive,resolver:this.resolve.bind(this),request:this.request.bind(this),replacements:this.settings.replacements||(this.archived?"blobUrl":"base64")}),this.loadNavigation(this.packaging).then(()=>{this.loading.navigation.resolve(this.navigation)}),this.packaging.coverPath&&(this.cover=this.resolve(this.packaging.coverPath)),this.loading.manifest.resolve(this.packaging.manifest),this.loading.metadata.resolve(this.packaging.metadata),this.loading.spine.resolve(this.spine),this.loading.cover.resolve(this.cover),this.loading.resources.resolve(this.resources),this.loading.pageList.resolve(this.pageList),this.isOpen=!0,this.archived||this.settings.replacements&&this.settings.replacements!="none"?this.replacements().then(()=>{this.loaded.displayOptions.then(()=>{this.opening.resolve(this)})}).catch(t=>{console.error(t)}):this.loaded.displayOptions.then(()=>{this.opening.resolve(this)})}loadNavigation(e){let t=e.navPath||e.ncxPath,i=e.toc;return i?new Promise((r,s)=>{this.navigation=new wr(i),e.pageList&&(this.pageList=new _r(e.pageList)),r(this.navigation)}):t?this.load(t,"xml").then(r=>(this.navigation=new wr(r),this.pageList=new _r(r),this.navigation)):new Promise((r,s)=>{this.navigation=new wr,this.pageList=new _r,r(this.navigation)})}section(e){return this.spine.get(e)}renderTo(e,t){return this.rendition=new ar(this,t),this.rendition.attachTo(e),this.rendition}setRequestCredentials(e){this.settings.requestCredentials=e}setRequestHeaders(e){this.settings.requestHeaders=e}unarchive(e,t){return this.archive=new Ju,this.archive.open(e,t)}store(e){let t=this.settings.replacements&&this.settings.replacements!=="none",i=this.url,r=this.settings.requestMethod||xi.bind(this);return this.storage=new Hs(e,r,this.resolve.bind(this)),this.request=this.storage.request.bind(this.storage),this.opened.then(()=>{this.archived&&(this.storage.requester=this.archive.request.bind(this.archive));let s=(a,o)=>{o.output=this.resources.substitute(a,o.url)};this.resources.settings.replacements=t||"blobUrl",this.resources.replacements().then(()=>this.resources.replaceCss()),this.storage.on("offline",()=>{this.url=new Dt("/",""),this.spine.hooks.serialize.register(s)}),this.storage.on("online",()=>{this.url=i,this.spine.hooks.serialize.deregister(s)})}),this.storage}coverUrl(){return this.loaded.cover.then(()=>this.cover?this.archived?this.archive.createUrl(this.cover):this.cover:null)}replacements(){return this.spine.hooks.serialize.register((e,t)=>{t.output=this.resources.substitute(e,t.url)}),this.resources.replacements().then(()=>this.resources.replaceCss())}getRange(e){var t=new ye(e),i=this.spine.get(t.spinePos),r=this.load.bind(this);return i?i.load(r).then(function(s){var a=t.toRange(i.document);return a}):new Promise((s,a)=>{a("CFI could not be found")})}key(e){var t=e||this.packaging.metadata.identifier||this.url.filename;return`epubjs:${tr}:${t}`}destroy(){this.opened=void 0,this.loading=void 0,this.loaded=void 0,this.ready=void 0,this.isOpen=!1,this.isRendered=!1,this.spine&&this.spine.destroy(),this.locations&&this.locations.destroy(),this.pageList&&this.pageList.destroy(),this.archive&&this.archive.destroy(),this.resources&&this.resources.destroy(),this.container&&this.container.destroy(),this.packaging&&this.packaging.destroy(),this.rendition&&this.rendition.destroy(),this.displayOptions&&this.displayOptions.destroy(),this.spine=void 0,this.locations=void 0,this.pageList=void 0,this.archive=void 0,this.resources=void 0,this.container=void 0,this.packaging=void 0,this.rendition=void 0,this.navigation=void 0,this.url=void 0,this.path=void 0,this.archived=!1}}Rt(or.prototype);function Zt(n,e){return new or(n,e)}Zt.VERSION=tr;typeof global<"u"&&(global.EPUBJS_VERSION=tr);Zt.Book=or;Zt.Rendition=ar;Zt.Contents=ir;Zt.CFI=ye;Zt.utils=ho;exports.Book=or;exports.Contents=ir;exports.EpubCFI=ye;exports.Layout=Xr;exports.Rendition=ar;exports.default=Zt;
|
|
22
|
-
//# sourceMappingURL=index-
|
|
22
|
+
//# sourceMappingURL=index-C1SYIwJ0.cjs.map
|