22 lines
312 KiB
JavaScript
22 lines
312 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d02ec01"],{"00fd":function(t,e,i){var n=i("9e69"),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function h(t){var e=s.call(t,a),i=t[a];try{t[a]=void 0;var n=!0}catch(h){}var r=o.call(t);return n&&(e?t[a]=i:delete t[a]),r}t.exports=h},"06d2":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return r})),i.d(e,"c",(function(){return s}));const n="0.3",r=["keydown","keyup","keypressed","mouseup","mousedown","mousemove","click","touchend","touchstart","touchmove"],s={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"}}},"0b16":function(t,e,i){"use strict";i.r(e),i.d(e,"requestAnimationFrame",(function(){return r})),i.d(e,"uuid",(function(){return h})),i.d(e,"documentHeight",(function(){return l})),i.d(e,"isElement",(function(){return c})),i.d(e,"isNumber",(function(){return u})),i.d(e,"isFloat",(function(){return d})),i.d(e,"prefixed",(function(){return f})),i.d(e,"defaults",(function(){return p})),i.d(e,"extend",(function(){return m})),i.d(e,"insert",(function(){return g})),i.d(e,"locationOf",(function(){return v})),i.d(e,"indexOfSorted",(function(){return w})),i.d(e,"bounds",(function(){return y})),i.d(e,"borders",(function(){return b})),i.d(e,"nodeBounds",(function(){return _})),i.d(e,"windowBounds",(function(){return x})),i.d(e,"indexOfNode",(function(){return E})),i.d(e,"indexOfTextNode",(function(){return k})),i.d(e,"indexOfElementNode",(function(){return S})),i.d(e,"isXml",(function(){return C})),i.d(e,"createBlob",(function(){return T})),i.d(e,"createBlobUrl",(function(){return O})),i.d(e,"revokeBlobUrl",(function(){return A})),i.d(e,"createBase64Url",(function(){return N})),i.d(e,"type",(function(){return R})),i.d(e,"parse",(function(){return I})),i.d(e,"qs",(function(){return L})),i.d(e,"qsa",(function(){return z})),i.d(e,"qsp",(function(){return D})),i.d(e,"sprint",(function(){return P})),i.d(e,"treeWalker",(function(){return B})),i.d(e,"walk",(function(){return j})),i.d(e,"blob2base64",(function(){return U})),i.d(e,"defer",(function(){return M})),i.d(e,"querySelectorByType",(function(){return F})),i.d(e,"findChildren",(function(){return W})),i.d(e,"parents",(function(){return q})),i.d(e,"filterChildren",(function(){return H})),i.d(e,"getParentByTagName",(function(){return Y})),i.d(e,"RangeObject",(function(){return V}));var n=i("1456");const r="undefined"!=typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),s=1,o=3,a="undefined"!=typeof URL?URL:"undefined"!=typeof window?window.URL||window.webkitURL||window.mozURL:void 0;function h(){var t=(new Date).getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?i:7&i|8).toString(16)}));return e}function l(){return Math.max(document.documentElement.clientHeight,document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight)}function c(t){return!(!t||1!=t.nodeType)}function u(t){return!isNaN(parseFloat(t))&&isFinite(t)}function d(t){let e=parseFloat(t);return!1!==u(t)&&("string"===typeof t&&t.indexOf(".")>-1||Math.floor(e)!==e)}function f(t){var e=["Webkit","webkit","Moz","O","ms"],i=["-webkit-","-webkit-","-moz-","-o-","-ms-"],n=t.toLowerCase(),r=e.length;if("undefined"===typeof document||"undefined"!=typeof document.body.style[n])return t;for(var s=0;s<r;s++)if("undefined"!=typeof document.body.style[i[s]+n])return i[s]+n;return t}function p(t){for(var e=1,i=arguments.length;e<i;e++){var n=arguments[e];for(var r in n)void 0===t[r]&&(t[r]=n[r])}return t}function m(t){var e=[].slice.call(arguments,1);return e.forEach((function(e){e&&Object.getOwnPropertyNames(e).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}))})),t}function g(t,e,i){var n=v(t,e,i);return e.splice(n,0,t),n}function v(t,e,i,n,r){var s,o=n||0,a=r||e.length,h=parseInt(o+(a-o)/2);return i||(i=function(t,e){return t>e?1:t<e?-1:t==e?0:void 0}),a-o<=0?h:(s=i(e[h],t),a-o===1?s>=0?h:h+1:0===s?h:-1===s?v(t,e,i,h,a):v(t,e,i,o,h))}function w(t,e,i,n,r){var s,o=n||0,a=r||e.length,h=parseInt(o+(a-o)/2);return i||(i=function(t,e){return t>e?1:t<e?-1:t==e?0:void 0}),a-o<=0?-1:(s=i(e[h],t),a-o===1?0===s?h:-1:0===s?h:-1===s?w(t,e,i,h,a):w(t,e,i,o,h))}function y(t){var e=window.getComputedStyle(t),i=["width","paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"],n=["height","paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"],r=0,s=0;return i.forEach((function(t){r+=parseFloat(e[t])||0})),n.forEach((function(t){s+=parseFloat(e[t])||0})),{height:s,width:r}}function b(t){var e=window.getComputedStyle(t),i=["paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"],n=["paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"],r=0,s=0;return i.forEach((function(t){r+=parseFloat(e[t])||0})),n.forEach((function(t){s+=parseFloat(e[t])||0})),{height:s,width:r}}function _(t){let e,i=t.ownerDocument;if(t.nodeType==Node.TEXT_NODE){let n=i.createRange();n.selectNodeContents(t),e=n.getBoundingClientRect()}else e=t.getBoundingClientRect();return e}function x(){var t=window.innerWidth,e=window.innerHeight;return{top:0,left:0,right:t,bottom:e,width:t,height:e}}function E(t,e){for(var i,n=t.parentNode,r=n.childNodes,s=-1,o=0;o<r.length;o++)if(i=r[o],i.nodeType===e&&s++,i==t)break;return s}function k(t){return E(t,o)}function S(t){return E(t,s)}function C(t){return["xml","opf","ncx"].indexOf(t)>-1}function T(t,e){return new Blob([t],{type:e})}function O(t,e){var i,n=T(t,e);return i=a.createObjectURL(n),i}function A(t){return a.revokeObjectURL(t)}function N(t,e){var i,n;if("string"===typeof t)return i=btoa(encodeURIComponent(t)),n="data:"+e+";base64,"+i,n}function R(t){return Object.prototype.toString.call(t).slice(8,-1)}function I(t,e,i){var r,s;return s="undefined"===typeof DOMParser||i?n["DOMParser"]:DOMParser,65279===t.charCodeAt(0)&&(t=t.slice(1)),r=(new s).parseFromString(t,e),r}function L(t,e){var i;if(!t)throw new Error("No Element Provided");return"undefined"!=typeof t.querySelector?t.querySelector(e):(i=t.getElementsByTagName(e),i.length?i[0]:void 0)}function z(t,e){return"undefined"!=typeof t.querySelector?t.querySelectorAll(e):t.getElementsByTagName(e)}function D(t,e,i){var n,r;if("undefined"!=typeof t.querySelector){for(var s in e+="[",i)e+=s+"~='"+i[s]+"'";return e+="]",t.querySelector(e)}if(n=t.getElementsByTagName(e),r=Array.prototype.slice.call(n,0).filter((function(t){for(var e in i)if(t.getAttribute(e)===i[e])return!0;return!1})),r)return r[0]}function P(t,e){var i=t.ownerDocument||t;"undefined"!==typeof i.createTreeWalker?B(t,e,NodeFilter.SHOW_TEXT):j(t,(function(t){t&&3===t.nodeType&&e(t)}),!0)}function B(t,e,i){var n=document.createTreeWalker(t,i,null,!1);let r;while(r=n.nextNode())e(r)}function j(t,e){if(e(t))return!0;if(t=t.firstChild,t)do{let i=j(t,e);if(i)return!0;t=t.nextSibling}while(t)}function U(t){return new Promise((function(e,i){var n=new FileReader;n.readAsDataURL(t),n.onloadend=function(){e(n.result)}}))}function M(){this.resolve=null,this.reject=null,this.id=h(),this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e}),Object.freeze(this)}function F(t,e,i){var n;if("undefined"!=typeof t.querySelector&&(n=t.querySelector(`${e}[*|type="${i}"]`)),n&&0!==n.length)return n;n=z(t,e);for(var r=0;r<n.length;r++)if(n[r].getAttributeNS("http://www.idpf.org/2007/ops","type")===i||n[r].getAttribute("epub:type")===i)return n[r]}function W(t){for(var e=[],i=t.childNodes,n=0;n<i.length;n++){let t=i[n];1===t.nodeType&&e.push(t)}return e}function q(t){for(var e=[t];t;t=t.parentNode)e.unshift(t);return e}function H(t,e,i){for(var n=[],r=t.childNodes,s=0;s<r.length;s++){let t=r[s];if(1===t.nodeType&&t.nodeName.toLowerCase()===e){if(i)return t;n.push(t)}}if(!i)return n}function Y(t,e){let i;if(null!==t&&""!==e){i=t.parentNode;while(1===i.nodeType){if(i.tagName.toLowerCase()===e)return i;i=i.parentNode}}}class V{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(t,e){this.startContainer=t,this.startOffset=e,this.endContainer?this.commonAncestorContainer=this._commonAncestorContainer():this.collapse(!0),this._checkCollapsed()}setEnd(t,e){this.endContainer=t,this.endOffset=e,this.startContainer?(this.collapsed=!1,this.commonAncestorContainer=this._commonAncestorContainer()):this.collapse(!1),this._checkCollapsed()}collapse(t){this.collapsed=!0,t?(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(t){let e=t.parentNode,i=Array.prototype.indexOf.call(e.childNodes,t);this.setStart(e,i),this.setEnd(e,i+1)}selectNodeContents(t){t.childNodes[t.childNodes-1];let e=3===t.nodeType?t.textContent.length:parent.childNodes.length;this.setStart(t,0),this.setEnd(t,e)}_commonAncestorContainer(t,e){var i=q(t||this.startContainer),n=q(e||this.endContainer);if(i[0]==n[0])for(var r=0;r<i.length;r++)if(i[r]!=n[r])return i[r-1]}_checkCollapsed(){this.startContainer===this.endContainer&&this.startOffset===this.endOffset?this.collapsed=!0:this.collapsed=!1}toString(){}}},"0f32":function(t,e,i){var n=i("b047"),r=i("1a8c"),s="Expected a function";function o(t,e,i){var o=!0,a=!0;if("function"!=typeof t)throw new TypeError(s);return r(i)&&(o="leading"in i?!!i.leading:o,a="trailing"in i?!!i.trailing:a),n(t,e,{leading:o,maxWait:e,trailing:a})}t.exports=o},1256:function(t,e,i){},"12c2":function(t,e,i){"use strict";var n=i("59c0"),r=i("3c2a"),s=i.n(r);class o{constructor(t,e){var i,r=t.indexOf("://")>-1,s=t;if(this.Url=void 0,this.href=t,this.protocol="",this.origin="",this.hash="",this.hash="",this.search="",this.base=e,!r&&!1!==e&&"string"!==typeof e&&window&&window.location&&(this.base=window.location.href),r||this.base)try{this.base?this.Url=new URL(t,this.base):this.Url=new URL(t),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,s=this.Url.pathname+(this.Url.search?this.Url.search:"")}catch(o){this.Url=void 0,this.base&&(i=new n["a"](this.base),s=i.resolve(s))}this.Path=new n["a"](s),this.directory=this.Path.directory,this.filename=this.Path.filename,this.extension=this.Path.extension}path(){return this.Path}resolve(t){var e,i=t.indexOf("://")>-1;return i?t:(e=s.a.resolve(this.directory,t),this.origin+e)}relative(t){return s.a.relative(t,this.directory)}toString(){return this.href}}e["a"]=o},1310:function(t,e){function i(t){return null!=t&&"object"==typeof t}t.exports=i},1456:function(t,e,i){function n(t){this.options=t||{locator:{}}}function r(t,e,i){if(!t){if(e instanceof s)return e;t=e}var n={},r=t instanceof Function;function o(e){var s=t[e];!s&&r&&(s=2==t.length?function(i){t(e,i)}:t),n[e]=s&&function(t){s("[xmldom "+e+"]\t"+t+a(i))}||function(){}}return i=i||{},o("warning"),o("error"),o("fatalError"),n}function s(){this.cdata=!1}function o(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function a(t){if(t)return"\n@"+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function h(t,e,i){return"string"==typeof t?t.substr(e,i):t.length>=e+i||e?new java.lang.String(t,e,i)+"":t}function l(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}n.prototype.parseFromString=function(t,e){var i=this.options,n=new d,o=i.domBuilder||new s,a=i.errorHandler,h=i.locator,l=i.xmlns||{},u=/\/x?html?$/.test(e),f=u?c.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return h&&o.setDocumentLocator(h),n.errorHandler=r(a,o,h),n.domBuilder=i.domBuilder||o,u&&(l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",t&&"string"===typeof t?n.parse(t,l,f):n.errorHandler.error("invalid doc source"),o.doc},s.prototype={startDocument:function(){this.doc=(new p).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,i,n){var r=this.doc,s=r.createElementNS(t,i||e),a=n.length;l(this,s),this.currentElement=s,this.locator&&o(this.locator,s);for(var h=0;h<a;h++){t=n.getURI(h);var c=n.getValue(h),u=(i=n.getQName(h),r.createAttributeNS(t,i));this.locator&&o(n.getLocator(h),u),u.value=u.nodeValue=c,s.setAttributeNode(u)}},endElement:function(t,e,i){var n=this.currentElement;n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var i=this.doc.createProcessingInstruction(t,e);this.locator&&o(this.locator,i),l(this,i)},ignorableWhitespace:function(t,e,i){},characters:function(t,e,i){if(t=h.apply(this,arguments),t){if(this.cdata)var n=this.doc.createCDATASection(t);else n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&o(this.locator,n)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,i){t=h.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&o(this.locator,n),l(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(t,e,i);this.locator&&o(this.locator,r),l(this,r)}},warning:function(t){console.warn("[xmldom warning]\t"+t,a(this.locator))},error:function(t){console.error("[xmldom error]\t"+t,a(this.locator))},fatalError:function(t){throw new f(t,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(t){s.prototype[t]=function(){return null}}));var c=i("d4a2"),u=i("8f7b"),d=u.XMLReader,f=u.ParseError,p=e.DOMImplementation=i("c1dd").DOMImplementation;e.XMLSerializer=i("c1dd").XMLSerializer,e.DOMParser=n,e.__DOMHandler=s},"14ab":function(t,e,i){"use strict";t.exports=function(){var t,e=Object.assign;return"function"===typeof e&&(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},1793:function(t,e,i){"use strict";var n=i("6321"),r=/^\s*class[\s{/}]/,s=Function.prototype.toString;t.exports=function(t){return!!n(t)&&!r.test(s.call(t))}},"18a6":function(t,e,i){"use strict";i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return o})),i.d(e,"d",(function(){return a})),i.d(e,"c",(function(){return h})),i.d(e,"e",(function(){return l}));var n=i("0b16"),r=i("12c2");i("59c0");function s(t,e){var i,r,s=e.url,o=s.indexOf("://")>-1;t&&(r=Object(n["qs"])(t,"head"),i=Object(n["qs"])(r,"base"),i||(i=t.createElement("base"),r.insertBefore(i,r.firstChild)),!o&&window&&window.location&&(s=window.location.origin+s),i.setAttribute("href",s))}function o(t,e){var i,r,s=e.canonical;t&&(i=Object(n["qs"])(t,"head"),r=Object(n["qs"])(i,"link[rel='canonical']"),r?r.setAttribute("href",s):(r=t.createElement("link"),r.setAttribute("rel","canonical"),r.setAttribute("href",s),i.appendChild(r)))}function a(t,e){var i,r,s=e.idref;t&&(i=Object(n["qs"])(t,"head"),r=Object(n["qs"])(i,"link[property='dc.identifier']"),r?r.setAttribute("content",s):(r=t.createElement("meta"),r.setAttribute("name","dc.identifier"),r.setAttribute("content",s),i.appendChild(r)))}function h(t,e){var i=t.querySelectorAll("a[href]");if(i.length)for(var s=Object(n["qs"])(t.ownerDocument,"base"),o=s?s.getAttribute("href"):void 0,a=function(t){var i=t.getAttribute("href");if(0!==i.indexOf("mailto:")){var n=i.indexOf("://")>-1;if(n)t.setAttribute("target","_blank");else{var s;try{s=new r["a"](i,o)}catch(a){}t.onclick=function(){return s&&s.hash?e(s.Path.path+s.hash):e(s?s.Path.path:i),!1}}}}.bind(this),h=0;h<i.length;h++)a(i[h])}function l(t,e,i){return e.forEach((function(e,n){e&&i[n]&&(e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t=t.replace(new RegExp(e,"g"),i[n]))})),t}},"18ec":function(t,e,i){"use strict";var n="razdwatrzy";t.exports=function(){return"function"===typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}},"1a8c":function(t,e){function i(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=i},"1a94":function(t,e,i){"use strict";t.exports=function(t){if("function"!==typeof t)throw new TypeError(t+" is not a function");return t}},"1fb5":function(t,e,i){"use strict";e.byteLength=c,e.toByteArray=d,e.fromByteArray=m;for(var n=[],r=[],s="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,h=o.length;a<h;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");-1===i&&(i=e);var n=i===e?0:4-i%4;return[i,n]}function c(t){var e=l(t),i=e[0],n=e[1];return 3*(i+n)/4-n}function u(t,e,i){return 3*(e+i)/4-i}function d(t){var e,i,n=l(t),o=n[0],a=n[1],h=new s(u(t,o,a)),c=0,d=a>0?o-4:o;for(i=0;i<d;i+=4)e=r[t.charCodeAt(i)]<<18|r[t.charCodeAt(i+1)]<<12|r[t.charCodeAt(i+2)]<<6|r[t.charCodeAt(i+3)],h[c++]=e>>16&255,h[c++]=e>>8&255,h[c++]=255&e;return 2===a&&(e=r[t.charCodeAt(i)]<<2|r[t.charCodeAt(i+1)]>>4,h[c++]=255&e),1===a&&(e=r[t.charCodeAt(i)]<<10|r[t.charCodeAt(i+1)]<<4|r[t.charCodeAt(i+2)]>>2,h[c++]=e>>8&255,h[c++]=255&e),h}function f(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function p(t,e,i){for(var n,r=[],s=e;s<i;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),r.push(f(n));return r.join("")}function m(t){for(var e,i=t.length,r=i%3,s=[],o=16383,a=0,h=i-r;a<h;a+=o)s.push(p(t,a,a+o>h?h:a+o));return 1===r?(e=t[i-1],s.push(n[e>>2]+n[e<<4&63]+"==")):2===r&&(e=(t[i-2]<<8)+t[i-1],s.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},2031:function(t,e,i){"use strict";t.exports=i("14ab")()?Object.assign:i("f60e")},"29f3":function(t,e){var i=Object.prototype,n=i.toString;function r(t){return n.call(t)}t.exports=r},"2b3e":function(t,e,i){var n=i("585a"),r="object"==typeof self&&self&&self.Object===Object&&self,s=n||r||Function("return this")();t.exports=s},"2cef":function(t,e,i){"use strict";i("d328")},3268:function(t,e,i){"use strict";var n=i("8f8f"),r=i("0b16");class s{constructor(t,e,i,n=!1){this.layout=t,this.horizontal="horizontal"===i,this.direction=e||"ltr",this._dev=n}section(t){var e=this.findRanges(t),i=this.rangeListToCfiList(t.section.cfiBase,e);return i}page(t,e,i,r){var s,o=!(!t||!t.document)&&t.document.body;if(o){if(s=this.rangePairToCfiPair(e,{start:this.findStart(o,i,r),end:this.findEnd(o,i,r)}),!0===this._dev){let e=t.document,i=new n["a"](s.start).toRange(e),r=new n["a"](s.end).toRange(e),o=e.defaultView.getSelection(),a=e.createRange();o.removeAllRanges(),a.setStart(i.startContainer,i.startOffset),a.setEnd(r.endContainer,r.endOffset),o.addRange(a)}return s}}walk(t,e){if(!t||t.nodeType!==Node.TEXT_NODE){var i={acceptNode:function(t){return t.data.trim().length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}},n=i.acceptNode;n.acceptNode=i.acceptNode;var r,s,o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,n,!1);while(r=o.nextNode())if(s=e(r),s)break;return s}}findRanges(t){for(var e,i,n=[],r=t.contents.scrollWidth(),s=Math.ceil(r/this.layout.spreadWidth),o=s*this.layout.divisor,a=this.layout.columnWidth,h=this.layout.gap,l=0;l<o.pages;l++)e=(a+h)*l,i=a*(l+1)+h*l,n.push({start:this.findStart(t.document.body,e,i),end:this.findEnd(t.document.body,e,i)});return n}findStart(t,e,i){var n,s,o=[t],a=t;while(o.length)if(n=o.shift(),s=this.walk(n,t=>{var n,s,h,l,c;if(c=Object(r["nodeBounds"])(t),this.horizontal&&"ltr"===this.direction){if(n=this.horizontal?c.left:c.top,s=this.horizontal?c.right:c.bottom,n>=e&&n<=i)return t;if(s>e)return t;a=t,o.push(t)}else if(this.horizontal&&"rtl"===this.direction){if(n=c.left,s=c.right,s<=i&&s>=e)return t;if(n<i)return t;a=t,o.push(t)}else{if(h=c.top,l=c.bottom,h>=e&&h<=i)return t;if(l>e)return t;a=t,o.push(t)}}),s)return this.findTextStartRange(s,e,i);return this.findTextStartRange(a,e,i)}findEnd(t,e,i){var n,s,o=[t],a=t;while(o.length)if(n=o.shift(),s=this.walk(n,t=>{var n,s,h,l,c;if(c=Object(r["nodeBounds"])(t),this.horizontal&&"ltr"===this.direction){if(n=Math.round(c.left),s=Math.round(c.right),n>i&&a)return a;if(s>i)return t;a=t,o.push(t)}else if(this.horizontal&&"rtl"===this.direction){if(n=Math.round(this.horizontal?c.left:c.top),s=Math.round(this.horizontal?c.right:c.bottom),s<e&&a)return a;if(n<e)return t;a=t,o.push(t)}else{if(h=Math.round(c.top),l=Math.round(c.bottom),h>i&&a)return a;if(l>i)return t;a=t,o.push(t)}}),s)return this.findTextEndRange(s,e,i);return this.findTextEndRange(a,e,i)}findTextStartRange(t,e,i){for(var n,r,s,o,a,h=this.splitTextNodeIntoRanges(t),l=0;l<h.length;l++)if(n=h[l],r=n.getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(s=r.left,s>=e)return n}else if(this.horizontal&&"rtl"===this.direction){if(a=r.right,a<=i)return n}else if(o=r.top,o>=e)return n;return h[0]}findTextEndRange(t,e,i){for(var n,r,s,o,a,h,l,c=this.splitTextNodeIntoRanges(t),u=0;u<c.length;u++){if(r=c[u],s=r.getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(o=s.left,a=s.right,o>i&&n)return n;if(a>i)return r}else if(this.horizontal&&"rtl"===this.direction){if(o=s.left,a=s.right,a<e&&n)return n;if(o<e)return r}else{if(h=s.top,l=s.bottom,h>i&&n)return n;if(l>i)return r}n=r}return c[c.length-1]}splitTextNodeIntoRanges(t,e){var i,n=[],r=t.textContent||"",s=r.trim(),o=t.ownerDocument,a=e||" ",h=s.indexOf(a);if(-1===h||t.nodeType!=Node.TEXT_NODE)return i=o.createRange(),i.selectNodeContents(t),[i];i=o.createRange(),i.setStart(t,0),i.setEnd(t,h),n.push(i),i=!1;while(-1!=h)h=s.indexOf(a,h+1),h>0&&(i&&(i.setEnd(t,h),n.push(i)),i=o.createRange(),i.setStart(t,h+1));return i&&(i.setEnd(t,s.length),n.push(i)),n}rangePairToCfiPair(t,e){var i=e.start,r=e.end;i.collapse(!0),r.collapse(!1);let s=new n["a"](i,t).toString(),o=new n["a"](r,t).toString();return{start:s,end:o}}rangeListToCfiList(t,e){for(var i,n=[],r=0;r<e.length;r++)i=this.rangePairToCfiPair(t,e[r]),n.push(i);return n}axis(t){return t&&(this.horizontal="horizontal"===t),this.horizontal}}e["a"]=s},"34c2":function(t,e,i){"use strict";(function(t){var n=i("ae54"),r=i("99c9"),s=i("8f8f"),o=i("55d4"),a=i("0b16"),h=i("06d2");i("ddea"),i("e58e"),i("8b5a");function l(t,e){return new n["a"](t,e)}l.VERSION=h["b"],"undefined"!==typeof t&&(t.EPUBJS_VERSION=h["b"]),l.Book=n["a"],l.Rendition=r["a"],l.Contents=o["a"],l.CFI=s["a"],l.utils=a,e["a"]=l}).call(this,i("c8ba"))},3729:function(t,e,i){var n=i("9e69"),r=i("00fd"),s=i("29f3"),o="[object Null]",a="[object Undefined]",h=n?n.toStringTag:void 0;function l(t){return null==t?void 0===t?a:o:h&&h in Object(t)?r(t):s(t)}t.exports=l},"3c2a":function(t,e,i){"use strict";if(!n)var n={cwd:function(){return"/"}};function r(t){if("string"!==typeof t)throw new TypeError("Path must be a string. Received "+t)}function s(t,e){for(var i,n="",r=-1,s=0,o=0;o<=t.length;++o){if(o<t.length)i=t.charCodeAt(o);else{if(47===i)break;i=47}if(47===i){if(r===o-1||1===s);else if(r!==o-1&&2===s){if(n.length<2||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){for(var a=n.length-1,h=a;h>=0;--h)if(47===n.charCodeAt(h))break;if(h!==a){n=-1===h?"":n.slice(0,h),r=o,s=0;continue}}else if(2===n.length||1===n.length){n="",r=o,s=0;continue}e&&(n.length>0?n+="/..":n="..")}else n.length>0?n+="/"+t.slice(r+1,o):n=t.slice(r+1,o);r=o,s=0}else 46===i&&-1!==s?++s:s=-1}return n}function o(t,e){var i=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return i?i===e.root?i+n:i+t+n:n}var a={resolve:function(){for(var t,e="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=n.cwd()),a=t),r(a),0!==a.length&&(e=a+"/"+e,i=47===a.charCodeAt(0))}return e=s(e,!i),i?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(r(t),0===t.length)return".";var e=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return t=s(t,!e),0!==t.length||e||(t="."),t.length>0&&i&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return r(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var i=arguments[e];r(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":a.normalize(t)},relative:function(t,e){if(r(t),r(e),t===e)return"";if(t=a.resolve(t),e=a.resolve(e),t===e)return"";for(var i=1;i<t.length;++i)if(47!==t.charCodeAt(i))break;for(var n=t.length,s=n-i,o=1;o<e.length;++o)if(47!==e.charCodeAt(o))break;for(var h=e.length,l=h-o,c=s<l?s:l,u=-1,d=0;d<=c;++d){if(d===c){if(l>c){if(47===e.charCodeAt(o+d))return e.slice(o+d+1);if(0===d)return e.slice(o+d)}else s>c&&(47===t.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var f=t.charCodeAt(i+d),p=e.charCodeAt(o+d);if(f!==p)break;47===f&&(u=d)}var m="";for(d=i+u+1;d<=n;++d)d!==n&&47!==t.charCodeAt(d)||(0===m.length?m+="..":m+="/..");return m.length>0?m+e.slice(o+u):(o+=u,47===e.charCodeAt(o)&&++o,e.slice(o))},_makeLong:function(t){return t},dirname:function(t){if(r(t),0===t.length)return".";for(var e=t.charCodeAt(0),i=47===e,n=-1,s=!0,o=t.length-1;o>=1;--o)if(e=t.charCodeAt(o),47===e){if(!s){n=o;break}}else s=!1;return-1===n?i?"/":".":i&&1===n?"//":t.slice(0,n)},basename:function(t,e){if(void 0!==e&&"string"!==typeof e)throw new TypeError('"ext" argument must be a string');r(t);var i,n=0,s=-1,o=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var a=e.length-1,h=-1;for(i=t.length-1;i>=0;--i){var l=t.charCodeAt(i);if(47===l){if(!o){n=i+1;break}}else-1===h&&(o=!1,h=i+1),a>=0&&(l===e.charCodeAt(a)?-1===--a&&(s=i):(a=-1,s=h))}return n===s?s=h:-1===s&&(s=t.length),t.slice(n,s)}for(i=t.length-1;i>=0;--i)if(47===t.charCodeAt(i)){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":t.slice(n,s)},extname:function(t){r(t);for(var e=-1,i=0,n=-1,s=!0,o=0,a=t.length-1;a>=0;--a){var h=t.charCodeAt(a);if(47!==h)-1===n&&(s=!1,n=a+1),46===h?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!s){i=a+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===i+1?"":t.slice(e,n)},format:function(t){if(null===t||"object"!==typeof t)throw new TypeError('Parameter "pathObject" must be an object, not '+typeof t);return o("/",t)},parse:function(t){r(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var i,n=t.charCodeAt(0),s=47===n;s?(e.root="/",i=1):i=0;for(var o=-1,a=0,h=-1,l=!0,c=t.length-1,u=0;c>=i;--c)if(n=t.charCodeAt(c),47!==n)-1===h&&(l=!1,h=c+1),46===n?-1===o?o=c:1!==u&&(u=1):-1!==o&&(u=-1);else if(!l){a=c+1;break}return-1===o||-1===h||0===u||1===u&&o===h-1&&o===a+1?-1!==h&&(e.base=e.name=0===a&&s?t.slice(1,h):t.slice(a,h)):(0===a&&s?(e.name=t.slice(1,o),e.base=t.slice(1,h)):(e.name=t.slice(a,o),e.base=t.slice(a,h)),e.ext=t.slice(o,h)),a>0?e.dir=t.slice(0,a-1):s&&(e.dir="/"),e},sep:"/",delimiter:":",posix:null};t.exports=a},"408c":function(t,e,i){var n=i("2b3e"),r=function(){return n.Date.now()};t.exports=r},4923:function(t,e,i){"use strict";class n{constructor(t){this.context=t||this,this.hooks=[]}register(){for(var t=0;t<arguments.length;++t)if("function"===typeof arguments[t])this.hooks.push(arguments[t]);else for(var e=0;e<arguments[t].length;++e)this.hooks.push(arguments[t][e])}deregister(t){let e;for(let i=0;i<this.hooks.length;i++)if(e=this.hooks[i],e===t){this.hooks.splice(i,1);break}}trigger(){var t=arguments,e=this.context,i=[];return this.hooks.forEach((function(n){try{var r=n.apply(e,t)}catch(s){console.log(s)}r&&"function"===typeof r["then"]&&i.push(r)})),Promise.all(i)}list(){return this.hooks}clear(){return this.hooks=[]}}e["a"]=n},"4cef":function(t,e){var i=/\s/;function n(t){var e=t.length;while(e--&&i.test(t.charAt(e)));return e}t.exports=n},"4e1b":function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"scrollWrapper",staticClass:"scroll-wrapper",class:{"no-scroll":t.ifNoScroll},on:{"&scroll":function(e){return t.handleScroll.apply(null,arguments)}}},[t._t("default")],2)},r=[],s=(i("c5f6"),i("fa7d")),o={props:{top:{type:Number,default:0},bottom:{type:Number,default:0},ifNoScroll:{type:Boolean,default:!1},initPosition:{type:Object,default:function(){return{x:0,y:0}}}},methods:{handleScroll:function(t){var e=t.target.scrollTop||window.pageYOffset||document.body.scrollTop;this.$emit("onScroll",e)},scrollTo:function(t,e){this.$refs.scrollWrapper.scrollTo(t,e)},refresh:function(){this.$refs.scrollWrapper&&(this.$refs.scrollWrapper.style.height=window.innerHeight-Object(s["d"])(this.top)-Object(s["d"])(this.bottom)+"px",this.$refs.scrollWrapper.addEventListener("scroll",this.handleScroll))}},mounted:function(){var t=this;this.refresh(),this.$nextTick((function(){setTimeout((function(){t.scrollTo(Object(s["d"])(t.initPosition.x),Object(s["d"])(t.initPosition.y))}),1)}))}},a=o,h=(i("f604"),i("2877")),l=Object(h["a"])(a,n,r,!1,null,"0a4fbfb1",null);e["a"]=l.exports},"55d4":function(t,e,i){"use strict";var n=i("c9fc"),r=i.n(n),s=i("0b16"),o=i("8f8f"),a=i("3268"),h=i("18a6"),l=i("06d2");const c="undefined"!==typeof navigator,u=c&&/Chrome/.test(navigator.userAgent),d=c&&!u&&/AppleWebKit/.test(navigator.userAgent),f=1;class p{constructor(t,e,i,n){this.epubcfi=new o["a"],this.document=t,this.documentElement=this.document.documentElement,this.content=e||this.document.body,this.window=this.document.defaultView,this._size={width:0,height:0},this.sectionIndex=n||0,this.cfiBase=i||"",this.epubReadingSystem("epub.js",l["b"]),this.called=0,this.active=!0,this.listeners()}static get listenedEvents(){return l["a"]}width(t){var e=this.content;return t&&Object(s["isNumber"])(t)&&(t+="px"),t&&(e.style.width=t),parseInt(this.window.getComputedStyle(e)["width"])}height(t){var e=this.content;return t&&Object(s["isNumber"])(t)&&(t+="px"),t&&(e.style.height=t),parseInt(this.window.getComputedStyle(e)["height"])}contentWidth(t){var e=this.content||this.document.body;return t&&Object(s["isNumber"])(t)&&(t+="px"),t&&(e.style.width=t),parseInt(this.window.getComputedStyle(e)["width"])}contentHeight(t){var e=this.content||this.document.body;return t&&Object(s["isNumber"])(t)&&(t+="px"),t&&(e.style.height=t),parseInt(this.window.getComputedStyle(e)["height"])}textWidth(){let t,e,i=this.document.createRange(),n=this.content||this.document.body,r=Object(s["borders"])(n);return i.selectNodeContents(n),t=i.getBoundingClientRect(),e=t.width,r&&r.width&&(e+=r.width),Math.round(e)}textHeight(){let t,e,i=this.document.createRange(),n=this.content||this.document.body;return i.selectNodeContents(n),t=i.getBoundingClientRect(),e=t.bottom,Math.round(e)}scrollWidth(){var t=this.documentElement.scrollWidth;return t}scrollHeight(){var t=this.documentElement.scrollHeight;return t}overflow(t){return t&&(this.documentElement.style.overflow=t),this.window.getComputedStyle(this.documentElement)["overflow"]}overflowX(t){return t&&(this.documentElement.style.overflowX=t),this.window.getComputedStyle(this.documentElement)["overflowX"]}overflowY(t){return t&&(this.documentElement.style.overflowY=t),this.window.getComputedStyle(this.documentElement)["overflowY"]}css(t,e,i){var n=this.content||this.document.body;return e?n.style.setProperty(t,e,i?"important":""):n.style.removeProperty(t),this.window.getComputedStyle(n)[t]}viewport(t){var e=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},n=[],r={};if(e&&e.hasAttribute("content")){let t=e.getAttribute("content"),n=t.match(/width\s*=\s*([^,]*)/),r=t.match(/height\s*=\s*([^,]*)/),s=t.match(/initial-scale\s*=\s*([^,]*)/),o=t.match(/minimum-scale\s*=\s*([^,]*)/),a=t.match(/maximum-scale\s*=\s*([^,]*)/),h=t.match(/user-scalable\s*=\s*([^,]*)/);n&&n.length&&"undefined"!==typeof n[1]&&(i.width=n[1]),r&&r.length&&"undefined"!==typeof r[1]&&(i.height=r[1]),s&&s.length&&"undefined"!==typeof s[1]&&(i.scale=s[1]),o&&o.length&&"undefined"!==typeof o[1]&&(i.minimum=o[1]),a&&a.length&&"undefined"!==typeof a[1]&&(i.maximum=a[1]),h&&h.length&&"undefined"!==typeof h[1]&&(i.scalable=h[1])}return r=Object(s["defaults"])(t||{},i),t&&(r.width&&n.push("width="+r.width),r.height&&n.push("height="+r.height),r.scale&&n.push("initial-scale="+r.scale),"no"===r.scalable?(n.push("minimum-scale="+r.scale),n.push("maximum-scale="+r.scale),n.push("user-scalable="+r.scalable)):(r.scalable&&n.push("user-scalable="+r.scalable),r.minimum&&n.push("minimum-scale="+r.minimum),r.maximum&&n.push("minimum-scale="+r.maximum)),e||(e=this.document.createElement("meta"),e.setAttribute("name","viewport"),this.document.querySelector("head").appendChild(e)),e.setAttribute("content",n.join(", ")),this.window.scrollTo(0,0)),r}expand(){this.emit(l["c"].CONTENTS.EXPAND)}listeners(){this.imageLoadListeners(),this.mediaQueryListeners(),this.addEventListeners(),this.addSelectionListeners(),"undefined"===typeof ResizeObserver?(this.resizeListeners(),this.visibilityListeners()):this.resizeObservers(),this.linksHandler()}removeListeners(){this.removeEventListeners(),this.removeSelectionListeners(),this.observer&&this.observer.disconnect(),clearTimeout(this.expanding)}resizeCheck(){let t=this.textWidth(),e=this.textHeight();t==this._size.width&&e==this._size.height||(this._size={width:t,height:e},this.onResize&&this.onResize(this._size),this.emit(l["c"].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",()=>{"visible"===document.visibilityState&&!1===this.active?(this.active=!0,this.resizeListeners()):(this.active=!1,clearTimeout(this.expanding))})}transitionListeners(){let t=this.content;t.style["transitionProperty"]="font, font-size, font-size-adjust, font-stretch, font-variation-settings, font-weight, width, height",t.style["transitionDuration"]="0.001ms",t.style["transitionTimingFunction"]="linear",t.style["transitionDelay"]="0",this._resizeCheck=this.resizeCheck.bind(this),this.document.addEventListener("transitionend",this._resizeCheck)}mediaQueryListeners(){for(var t=this.document.styleSheets,e=function(t){t.matches&&!this._expanding&&setTimeout(this.expand.bind(this),1)}.bind(this),i=0;i<t.length;i+=1){var n;try{n=t[i].cssRules}catch(o){return}if(!n)return;for(var r=0;r<n.length;r+=1)if(n[r].media){var s=this.window.matchMedia(n[r].media.mediaText);s.addListener(e)}}}resizeObservers(){this.observer=new ResizeObserver(t=>{requestAnimationFrame(this.resizeCheck.bind(this))}),this.observer.observe(this.document.documentElement)}mutationObservers(){this.observer=new MutationObserver(t=>{this.resizeCheck()});let t={attributes:!0,childList:!0,characterData:!0,subtree:!0};this.observer.observe(this.document,t)}imageLoadListeners(){for(var t,e=this.document.querySelectorAll("img"),i=0;i<e.length;i++)t=e[i],"undefined"!==typeof t.naturalWidth&&0===t.naturalWidth&&(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(t,e){var i,n={left:0,top:0};if(!this.document)return n;if(this.epubcfi.isCfiString(t)){let s=new o["a"](t).toRange(this.document,e);if(s){try{if(!s.endContainer||s.startContainer==s.endContainer&&s.startOffset==s.endOffset){let t=s.startContainer.textContent.indexOf(" ",s.startOffset);-1==t&&(t=s.startContainer.textContent.length),s.setEnd(s.startContainer,t)}}catch(r){console.error("setting end offset to start container length failed",r)}if(s.startContainer.nodeType===Node.ELEMENT_NODE)i=s.startContainer.getBoundingClientRect(),n.left=i.left,n.top=i.top;else if(d){let t=s.startContainer,e=new Range;try{t.nodeType===f?i=t.getBoundingClientRect():s.startOffset+2<t.length?(e.setStart(t,s.startOffset),e.setEnd(t,s.startOffset+2),i=e.getBoundingClientRect()):s.startOffset-2>0?(e.setStart(t,s.startOffset-2),e.setEnd(t,s.startOffset),i=e.getBoundingClientRect()):i=t.parentNode.getBoundingClientRect()}catch(r){console.error(r,r.stack)}}else i=s.getBoundingClientRect()}}else if("string"===typeof t&&t.indexOf("#")>-1){let e=t.substring(t.indexOf("#")+1),n=this.document.getElementById(e);if(n)if(d){let t=new Range;t.selectNode(n),i=t.getBoundingClientRect()}else i=n.getBoundingClientRect()}return i&&(n.left=i.left,n.top=i.top),n}addStylesheet(t){return new Promise(function(e,i){var n,r=!1;this.document?(n=this.document.querySelector("link[href='"+t+"']"),n?e(!0):(n=this.document.createElement("link"),n.type="text/css",n.rel="stylesheet",n.href=t,n.onload=n.onreadystatechange=function(){r||this.readyState&&"complete"!=this.readyState||(r=!0,setTimeout(()=>{e(!0)},1))},this.document.head.appendChild(n))):e(!1)}.bind(this))}_getStylesheetNode(t){var e;return t="epubjs-inserted-css-"+(t||""),!!this.document&&(e=this.document.getElementById(t),e||(e=this.document.createElement("style"),e.id=t,this.document.head.appendChild(e)),e)}addStylesheetCss(t,e){return!(!this.document||!t)&&(i=this._getStylesheetNode(e),i.innerHTML=t,!0);var i}addStylesheetRules(t,e){var i;if(this.document&&t&&0!==t.length)if(i=this._getStylesheetNode(e).sheet,"[object Array]"===Object.prototype.toString.call(t))for(var n=0,r=t.length;n<r;n++){var s=1,o=t[n],a=t[n][0],h="";"[object Array]"===Object.prototype.toString.call(o[1][0])&&(o=o[1],s=0);for(var l=o.length;s<l;s++){var c=o[s];h+=c[0]+":"+c[1]+(c[2]?" !important":"")+";\n"}i.insertRule(a+"{"+h+"}",i.cssRules.length)}else{const e=Object.keys(t);e.forEach(e=>{const n=t[e];if(Array.isArray(n))n.forEach(t=>{const n=Object.keys(t),r=n.map(e=>`${e}:${t[e]}`).join(";");i.insertRule(`${e}{${r}}`,i.cssRules.length)});else{const t=Object.keys(n),r=t.map(t=>`${t}:${n[t]}`).join(";");i.insertRule(`${e}{${r}}`,i.cssRules.length)}})}}addScript(t){return new Promise(function(e,i){var n,r=!1;this.document?(n=this.document.createElement("script"),n.type="text/javascript",n.async=!0,n.src=t,n.onload=n.onreadystatechange=function(){r||this.readyState&&"complete"!=this.readyState||(r=!0,setTimeout((function(){e(!0)}),1))},this.document.head.appendChild(n)):e(!1)}.bind(this))}addClass(t){var e;this.document&&(e=this.content||this.document.body,e&&e.classList.add(t))}removeClass(t){var e;this.document&&(e=this.content||this.document.body,e&&e.classList.remove(t))}addEventListeners(){this.document&&(this._triggerEvent=this.triggerEvent.bind(this),l["a"].forEach((function(t){this.document.addEventListener(t,this._triggerEvent,{passive:!0})}),this))}removeEventListeners(){this.document&&(l["a"].forEach((function(t){this.document.removeEventListener(t,this._triggerEvent,{passive:!0})}),this),this._triggerEvent=void 0)}triggerEvent(t){this.emit(t.type,t)}addSelectionListeners(){this.document&&(this._onSelectionChange=this.onSelectionChange.bind(this),this.document.addEventListener("selectionchange",this._onSelectionChange,{passive:!0}))}removeSelectionListeners(){this.document&&(this.document.removeEventListener("selectionchange",this._onSelectionChange,{passive:!0}),this._onSelectionChange=void 0)}onSelectionChange(t){this.selectionEndTimeout&&clearTimeout(this.selectionEndTimeout),this.selectionEndTimeout=setTimeout(function(){var t=this.window.getSelection();this.triggerSelectedEvent(t)}.bind(this),250)}triggerSelectedEvent(t){var e,i;t&&t.rangeCount>0&&(e=t.getRangeAt(0),e.collapsed||(i=new o["a"](e,this.cfiBase).toString(),this.emit(l["c"].CONTENTS.SELECTED,i),this.emit(l["c"].CONTENTS.SELECTED_RANGE,e)))}range(t,e){var i=new o["a"](t);return i.toRange(this.document,e)}cfiFromRange(t,e){return new o["a"](t,this.cfiBase,e).toString()}cfiFromNode(t,e){return new o["a"](t,this.cfiBase,e).toString()}map(t){var e=new a["a"](t);return e.section()}size(t,e){var i={scale:1,scalable:"no"};this.layoutStyle("scrolling"),t>=0&&(this.width(t),i.width=t,this.css("padding","0 "+t/12+"px")),e>=0&&(this.height(e),i.height=e),this.css("margin","0"),this.css("box-sizing","border-box"),this.viewport(i)}columns(t,e,i,n,r){let o=Object(s["prefixed"])("column-axis"),a=Object(s["prefixed"])("column-gap"),h=Object(s["prefixed"])("column-width"),l=Object(s["prefixed"])("column-fill"),c=this.writingMode(),u=0===c.indexOf("vertical")?"vertical":"horizontal";this.layoutStyle("paginated"),"rtl"===r&&"horizontal"===u&&this.direction(r),this.width(t),this.height(e),this.viewport({width:t,height:e,scale:1,scalable:"no"}),this.css("overflow-y","hidden"),this.css("margin","0",!0),"vertical"===u?(this.css("padding-top",n/2+"px",!0),this.css("padding-bottom",n/2+"px",!0),this.css("padding-left","20px"),this.css("padding-right","20px"),this.css(o,"vertical")):(this.css("padding-top","20px"),this.css("padding-bottom","20px"),this.css("padding-left",n/2+"px",!0),this.css("padding-right",n/2+"px",!0),this.css(o,"horizontal")),this.css("box-sizing","border-box"),this.css("max-width","inherit"),this.css(l,"auto"),this.css(a,n+"px"),this.css(h,i+"px"),this.css("-webkit-line-box-contain","block glyphs replaced")}scaler(t,e,i){var n="scale("+t+")",r="";this.css("transform-origin","top left"),(e>=0||i>=0)&&(r=" translate("+(e||0)+"px, "+(i||0)+"px )"),this.css("transform",n+r)}fit(t,e,i){var n=this.viewport(),r=parseInt(n.width),s=parseInt(n.height),o=t/r,a=e/s,h=o<a?o:a;if(this.layoutStyle("paginated"),this.width(r),this.height(s),this.overflow("hidden"),this.scaler(h,0,0),this.css("background-size",r*h+"px "+s*h+"px"),this.css("background-color","transparent"),i&&i.properties.includes("page-spread-left")){var l=t-r*h;this.css("margin-left",l+"px")}}direction(t){this.documentElement&&(this.documentElement.style["direction"]=t)}mapPage(t,e,i,n,r){var s=new a["a"](e,r);return s.page(this,t,i,n)}linksHandler(){Object(h["c"])(this.content,t=>{this.emit(l["c"].CONTENTS.LINK_CLICKED,t)})}writingMode(t){let e=Object(s["prefixed"])("writing-mode");return t&&this.documentElement&&(this.documentElement.style[e]=t),this.window.getComputedStyle(this.documentElement)[e]||""}layoutStyle(t){return t&&(this._layoutStyle=t,navigator.epubReadingSystem.layoutStyle=this._layoutStyle),this._layoutStyle||"paginated"}epubReadingSystem(t,e){return navigator.epubReadingSystem={name:t,version:e,layoutStyle:this.layoutStyle(),hasFeature:function(t){switch(t){case"dom-manipulation":return!0;case"layout-changes":return!0;case"touch-events":return!0;case"mouse-events":return!0;case"keyboard-events":return!0;case"spine-scripting":return!1;default:return!1}}},navigator.epubReadingSystem}destroy(){this.removeListeners()}}r()(p.prototype),e["a"]=p},"585a":function(t,e,i){(function(e){var i="object"==typeof e&&e&&e.Object===Object&&e;t.exports=i}).call(this,i("c8ba"))},"59c0":function(t,e,i){"use strict";var n=i("3c2a"),r=i.n(n);class s{constructor(t){var e,i;e=t.indexOf("://"),e>-1&&(t=new URL(t).pathname),i=this.parse(t),this.path=t,this.isDirectory(t)?this.directory=t:this.directory=i.dir+"/",this.filename=i.base,this.extension=i.ext.slice(1)}parse(t){return r.a.parse(t)}isAbsolute(t){return r.a.isAbsolute(t||this.path)}isDirectory(t){return"/"===t.charAt(t.length-1)}resolve(t){return r.a.resolve(this.directory,t)}relative(t){var e=t&&t.indexOf("://")>-1;return e?t:r.a.relative(this.directory,t)}splitPath(t){return this.splitPathRe.exec(t).slice(1)}toString(){return this.path}}e["a"]=s},"5edd":function(t,e,i){"use strict";var n=i("936a"),r={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!n(t)&&hasOwnProperty.call(r,typeof t)}},"62c4":function(t,e,i){"use strict";var n=i("e76c")();t.exports=function(t){return t!==n&&null!==t}},6321:function(t,e,i){"use strict";var n=i("9013");t.exports=function(t){if("function"!==typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!==typeof t.length)return!1;if("function"!==typeof t.call)return!1;if("function"!==typeof t.apply)return!1}catch(e){return!1}return!n(t)}},7373:function(t,e,i){"use strict";var n=i("62c4"),r=Object.keys;t.exports=function(t){return r(n(t)?Object(t):t)}},"7bdf":function(t,e,i){"use strict";t.exports=i("ecf9")()?Object.keys:i("7373")},8355:function(t,e,i){(function(e,i){var n;
|
||
/*!
|
||
|
||
JSZip v3.7.1 - A JavaScript class for generating and reading zip files
|
||
<http://stuartk.com/jszip>
|
||
|
||
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
||
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
|
||
|
||
JSZip uses the library pako released under the MIT license :
|
||
https://github.com/nodeca/pako/blob/master/LICENSE
|
||
*/
|
||
(function(e){t.exports=e()})((function(){return function t(e,i,r){function s(a,h){if(!i[a]){if(!e[a]){var l="function"==typeof n&&n;if(!h&&l)return n(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[a]={exports:{}};e[a][0].call(u.exports,(function(t){var i=e[a][1][t];return s(i||t)}),u,u.exports,t,e,i,r)}return i[a].exports}for(var o="function"==typeof n&&n,a=0;a<r.length;a++)s(r[a]);return s}({1:[function(t,e,i){"use strict";var n=t("./utils"),r=t("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(t){var e,i,r,o,a,h,l,c=[],u=0,d=t.length,f=d,p="string"!==n.getTypeOf(t);while(u<t.length)f=d-u,p?(e=t[u++],i=u<d?t[u++]:0,r=u<d?t[u++]:0):(e=t.charCodeAt(u++),i=u<d?t.charCodeAt(u++):0,r=u<d?t.charCodeAt(u++):0),o=e>>2,a=(3&e)<<4|i>>4,h=f>1?(15&i)<<2|r>>6:64,l=f>2?63&r:64,c.push(s.charAt(o)+s.charAt(a)+s.charAt(h)+s.charAt(l));return c.join("")},i.decode=function(t){var e,i,n,o,a,h,l,c=0,u=0,d="data:";if(t.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");var f,p=3*t.length/4;if(t.charAt(t.length-1)===s.charAt(64)&&p--,t.charAt(t.length-2)===s.charAt(64)&&p--,p%1!==0)throw new Error("Invalid base64 input, bad content length.");f=r.uint8array?new Uint8Array(0|p):new Array(0|p);while(c<t.length)o=s.indexOf(t.charAt(c++)),a=s.indexOf(t.charAt(c++)),h=s.indexOf(t.charAt(c++)),l=s.indexOf(t.charAt(c++)),e=o<<2|a>>4,i=(15&a)<<4|h>>2,n=(3&h)<<6|l,f[u++]=e,64!==h&&(f[u++]=i),64!==l&&(f[u++]=n);return f}},{"./support":30,"./utils":32}],2:[function(t,e,i){"use strict";var n=t("./external"),r=t("./stream/DataWorker"),s=t("./stream/Crc32Probe"),o=t("./stream/DataLengthProbe");function a(t,e,i,n,r){this.compressedSize=t,this.uncompressedSize=e,this.crc32=i,this.compression=n,this.compressedContent=r}a.prototype={getContentWorker:function(){var t=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo["data_length"]!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(t,e,i){return t.pipe(new s).pipe(new o("uncompressedSize")).pipe(e.compressWorker(i)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,i){"use strict";var n=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,i){"use strict";var n=t("./utils");function r(){for(var t,e=[],i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[i]=t}return e}var s=r();function o(t,e,i,n){var r=s,o=n+i;t^=-1;for(var a=n;a<o;a++)t=t>>>8^r[255&(t^e[a])];return-1^t}function a(t,e,i,n){var r=s,o=n+i;t^=-1;for(var a=n;a<o;a++)t=t>>>8^r[255&(t^e.charCodeAt(a))];return-1^t}e.exports=function(t,e){if("undefined"===typeof t||!t.length)return 0;var i="string"!==n.getTypeOf(t);return i?o(0|e,t,t.length,0):a(0|e,t,t.length,0)}},{"./utils":32}],5:[function(t,e,i){"use strict";i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,e,i){"use strict";var n=null;n="undefined"!==typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,i){"use strict";var n="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array,r=t("pako"),s=t("./utils"),o=t("./stream/GenericWorker"),a=n?"uint8array":"array";function h(t,e){o.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}i.magic="\b\0",s.inherits(h,o),h.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(a,t.data),!1)},h.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},i.compressWorker=function(t){return new h("Deflate",t)},i.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,i){"use strict";var n=t("../utils"),r=t("../stream/GenericWorker"),s=t("../utf8"),o=t("../crc32"),a=t("../signature"),h=function(t,e){var i,n="";for(i=0;i<e;i++)n+=String.fromCharCode(255&t),t>>>=8;return n},l=function(t,e){var i=t;return t||(i=e?16893:33204),(65535&i)<<16},c=function(t,e){return 63&(t||0)},u=function(t,e,i,r,u,d){var f,p,m=t["file"],g=t["compression"],v=d!==s.utf8encode,w=n.transformTo("string",d(m.name)),y=n.transformTo("string",s.utf8encode(m.name)),b=m.comment,_=n.transformTo("string",d(b)),x=n.transformTo("string",s.utf8encode(b)),E=y.length!==m.name.length,k=x.length!==b.length,S="",C="",T="",O=m.dir,A=m.date,N={crc32:0,compressedSize:0,uncompressedSize:0};e&&!i||(N.crc32=t["crc32"],N.compressedSize=t["compressedSize"],N.uncompressedSize=t["uncompressedSize"]);var R=0;e&&(R|=8),v||!E&&!k||(R|=2048);var I=0,L=0;O&&(I|=16),"UNIX"===u?(L=798,I|=l(m.unixPermissions,O)):(L=20,I|=c(m.dosPermissions,O)),f=A.getUTCHours(),f<<=6,f|=A.getUTCMinutes(),f<<=5,f|=A.getUTCSeconds()/2,p=A.getUTCFullYear()-1980,p<<=4,p|=A.getUTCMonth()+1,p<<=5,p|=A.getUTCDate(),E&&(C=h(1,1)+h(o(w),4)+y,S+="up"+h(C.length,2)+C),k&&(T=h(1,1)+h(o(_),4)+x,S+="uc"+h(T.length,2)+T);var z="";z+="\n\0",z+=h(R,2),z+=g.magic,z+=h(f,2),z+=h(p,2),z+=h(N.crc32,4),z+=h(N.compressedSize,4),z+=h(N.uncompressedSize,4),z+=h(w.length,2),z+=h(S.length,2);var D=a.LOCAL_FILE_HEADER+z+w+S,P=a.CENTRAL_FILE_HEADER+h(L,2)+z+h(_.length,2)+"\0\0\0\0"+h(I,4)+h(r,4)+w+S+_;return{fileRecord:D,dirRecord:P}},d=function(t,e,i,r,s){var o="",l=n.transformTo("string",s(r));return o=a.CENTRAL_DIRECTORY_END+"\0\0\0\0"+h(t,2)+h(t,2)+h(e,4)+h(i,4)+h(l.length,2)+l,o},f=function(t){var e="";return e=a.DATA_DESCRIPTOR+h(t["crc32"],4)+h(t["compressedSize"],4)+h(t["uncompressedSize"],4),e};function p(t,e,i,n){r.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=i,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(p,r),p.prototype.push=function(t){var e=t.meta.percent||0,i=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,r.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:i?(e+100*(i-n-1))/i:100}}))},p.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t["file"].name;var e=this.streamFiles&&!t["file"].dir;if(e){var i=u(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t["file"].dir,i=u(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),e)this.push({data:f(t),meta:{percent:100}});else{this.push({data:i.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null},p.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var i=this.bytesWritten-t,n=d(this.dirRecords.length,i,t,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},p.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},p.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()})),t.on("error",(function(t){e.error(t)})),this},p.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},p.prototype.error=function(t){var e=this._sources;if(!r.prototype.error.call(this,t))return!1;for(var i=0;i<e.length;i++)try{e[i].error(t)}catch(t){}return!0},p.prototype.lock=function(){r.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=p},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,i){"use strict";var n=t("../compressions"),r=t("./ZipFileWorker"),s=function(t,e){var i=t||e,r=n[i];if(!r)throw new Error(i+" is not a valid compression method !");return r};i.generateWorker=function(t,e,i){var n=new r(e.streamFiles,i,e.platform,e.encodeFileName),o=0;try{t.forEach((function(t,i){o++;var r=s(i.options.compression,e.compression),a=i.options.compressionOptions||e.compressionOptions||{},h=i.dir,l=i.date;i._compressWorker(r,a).withStreamInfo("file",{name:t,dir:h,date:l,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(n)})),n.entriesCount=o}catch(a){n.error(a)}return n}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,i){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var t=new n;for(var e in this)"function"!==typeof this[e]&&(t[e]=this[e]);return t}}n.prototype=t("./object"),n.prototype.loadAsync=t("./load"),n.support=t("./support"),n.defaults=t("./defaults"),n.version="3.7.1",n.loadAsync=function(t,e){return(new n).loadAsync(t,e)},n.external=t("./external"),e.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,i){"use strict";var n=t("./utils"),r=t("./external"),s=t("./utf8"),o=t("./zipEntries"),a=t("./stream/Crc32Probe"),h=t("./nodejsUtils");function l(t){return new r.Promise((function(e,i){var n=t.decompressed.getContentWorker().pipe(new a);n.on("error",(function(t){i(t)})).on("end",(function(){n.streamInfo.crc32!==t.decompressed.crc32?i(new Error("Corrupted zip : CRC32 mismatch")):e()})).resume()}))}e.exports=function(t,e){var i=this;return e=n.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),h.isNode&&h.isStream(t)?r.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then((function(t){var i=new o(e);return i.load(t),i})).then((function(t){var i=[r.Promise.resolve(t)],n=t.files;if(e.checkCRC32)for(var s=0;s<n.length;s++)i.push(l(n[s]));return r.Promise.all(i)})).then((function(t){for(var n=t.shift(),r=n.files,s=0;s<r.length;s++){var o=r[s];i.file(o.fileNameStr,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:e.createFolders})}return n.zipComment.length&&(i.comment=n.zipComment),i}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,i){"use strict";var n=t("../utils"),r=t("../stream/GenericWorker");function s(t,e){r.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}n.inherits(s,r),s.prototype._bindStream=function(t){var e=this;this._stream=t,t.pause(),t.on("data",(function(t){e.push({data:t,meta:{percent:0}})})).on("error",(function(t){e.isPaused?this.generatedError=t:e.error(t)})).on("end",(function(){e.isPaused?e._upstreamEnded=!0:e.end()}))},s.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,i){"use strict";var n=t("readable-stream").Readable,r=t("../utils");function s(t,e,i){n.call(this,e),this._helper=t;var r=this;t.on("data",(function(t,e){r.push(t)||r._helper.pause(),i&&i(e)})).on("error",(function(t){r.emit("error",t)})).on("end",(function(){r.push(null)}))}r.inherits(s,n),s.prototype._read=function(){this._helper.resume()},e.exports=s},{"../utils":32,"readable-stream":16}],14:[function(t,i,n){"use strict";i.exports={isNode:"undefined"!==typeof e,newBufferFrom:function(t,i){if(e.from&&e.from!==Uint8Array.from)return e.from(t,i);if("number"===typeof t)throw new Error('The "data" argument must not be a number');return new e(t,i)},allocBuffer:function(t){if(e.alloc)return e.alloc(t);var i=new e(t);return i.fill(0),i},isBuffer:function(t){return e.isBuffer(t)},isStream:function(t){return t&&"function"===typeof t.on&&"function"===typeof t.pause&&"function"===typeof t.resume}}},{}],15:[function(t,e,i){"use strict";var n=t("./utf8"),r=t("./utils"),s=t("./stream/GenericWorker"),o=t("./stream/StreamHelper"),a=t("./defaults"),h=t("./compressedObject"),l=t("./zipObject"),c=t("./generate"),u=t("./nodejsUtils"),d=t("./nodejs/NodejsStreamInputAdapter"),f=function(t,e,i){var n,o=r.getTypeOf(e),c=r.extend(i||{},a);c.date=c.date||new Date,null!==c.compression&&(c.compression=c.compression.toUpperCase()),"string"===typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(t=m(t)),c.createFolders&&(n=p(t))&&g.call(this,n,!0);var f="string"===o&&!1===c.binary&&!1===c.base64;i&&"undefined"!==typeof i.binary||(c.binary=!f);var v=e instanceof h&&0===e.uncompressedSize;(v||c.dir||!e||0===e.length)&&(c.base64=!1,c.binary=!0,e="",c.compression="STORE",o="string");var w=null;w=e instanceof h||e instanceof s?e:u.isNode&&u.isStream(e)?new d(t,e):r.prepareContent(t,e,c.binary,c.optimizedBinaryString,c.base64);var y=new l(t,w,c);this.files[t]=y},p=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return e>0?t.substring(0,e):""},m=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},g=function(t,e){return e="undefined"!==typeof e?e:a.createFolders,t=m(t),this.files[t]||f.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function v(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,i,n;for(e in this.files)n=this.files[e],i=e.slice(this.root.length,e.length),i&&e.slice(0,this.root.length)===this.root&&t(i,n)},filter:function(t){var e=[];return this.forEach((function(i,n){t(i,n)&&e.push(n)})),e},file:function(t,e,i){if(1===arguments.length){if(v(t)){var n=t;return this.filter((function(t,e){return!e.dir&&n.test(t)}))}var r=this.files[this.root+t];return r&&!r.dir?r:null}return t=this.root+t,f.call(this,t,e,i),this},folder:function(t){if(!t)return this;if(v(t))return this.filter((function(e,i){return i.dir&&t.test(e)}));var e=this.root+t,i=g.call(this,e),n=this.clone();return n.root=i.name,n},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var i=this.filter((function(e,i){return i.name.slice(0,t.length)===t})),n=0;n<i.length;n++)delete this.files[i[n].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,i={};try{if(i=r.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode}),i.type=i.type.toLowerCase(),i.compression=i.compression.toUpperCase(),"binarystring"===i.type&&(i.type="string"),!i.type)throw new Error("No output type specified.");r.checkSupport(i.type),"darwin"!==i.platform&&"freebsd"!==i.platform&&"linux"!==i.platform&&"sunos"!==i.platform||(i.platform="UNIX"),"win32"===i.platform&&(i.platform="DOS");var a=i.comment||this.comment||"";e=c.generateWorker(this,i,a)}catch(h){e=new s("error"),e.error(h)}return new o(e,i.type||"string",i.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return t=t||{},t.type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=w},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,i){e.exports=t("stream")},{stream:void 0}],17:[function(t,e,i){"use strict";var n=t("./DataReader"),r=t("../utils");function s(t){n.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}r.inherits(s,n),s.prototype.byteAt=function(t){return this.data[this.zero+t]},s.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),i=t.charCodeAt(1),n=t.charCodeAt(2),r=t.charCodeAt(3),s=this.length-4;s>=0;--s)if(this.data[s]===e&&this.data[s+1]===i&&this.data[s+2]===n&&this.data[s+3]===r)return s-this.zero;return-1},s.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),i=t.charCodeAt(1),n=t.charCodeAt(2),r=t.charCodeAt(3),s=this.readData(4);return e===s[0]&&i===s[1]&&n===s[2]&&r===s[3]},s.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=s},{"../utils":32,"./DataReader":18}],18:[function(t,e,i){"use strict";var n=t("../utils");function r(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}r.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,i=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)i=(i<<8)+this.byteAt(e);return this.index+=t,i},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=r},{"../utils":32}],19:[function(t,e,i){"use strict";var n=t("./Uint8ArrayReader"),r=t("../utils");function s(t){n.call(this,t)}r.inherits(s,n),s.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,i){"use strict";var n=t("./DataReader"),r=t("../utils");function s(t){n.call(this,t)}r.inherits(s,n),s.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},s.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},s.prototype.readAndCheckSignature=function(t){var e=this.readData(4);return t===e},s.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=s},{"../utils":32,"./DataReader":18}],21:[function(t,e,i){"use strict";var n=t("./ArrayReader"),r=t("../utils");function s(t){n.call(this,t)}r.inherits(s,n),s.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,i){"use strict";var n=t("../utils"),r=t("../support"),s=t("./ArrayReader"),o=t("./StringReader"),a=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||r.uint8array?"nodebuffer"===e?new a(t):r.uint8array?new h(n.transformTo("uint8array",t)):new s(n.transformTo("array",t)):new o(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,i){"use strict";i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,i){"use strict";var n=t("./GenericWorker"),r=t("../utils");function s(t){n.call(this,"ConvertWorker to "+t),this.destType=t}r.inherits(s,n),s.prototype.processChunk=function(t){this.push({data:r.transformTo(this.destType,t.data),meta:t.meta})},e.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,i){"use strict";var n=t("./GenericWorker"),r=t("../crc32"),s=t("../utils");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s.inherits(o,n),o.prototype.processChunk=function(t){this.streamInfo.crc32=r(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,i){"use strict";var n=t("../utils"),r=t("./GenericWorker");function s(t){r.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(s,r),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}r.prototype.processChunk.call(this,t)},e.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,i){"use strict";var n=t("../utils"),r=t("./GenericWorker"),s=16384;function o(t){r.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=s,e=null,i=Math.min(this.max,this.index+t);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,i);break;case"uint8array":e=this.data.subarray(this.index,i);break;case"array":case"nodebuffer":e=this.data.slice(this.index,i);break}return this.index=i,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,i){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var i=0;i<this._listeners[t].length;i++)this._listeners[t][i].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.end()})),t.on("error",(function(t){e.error(t)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var t=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=n},{}],29:[function(t,i,n){"use strict";var r=t("../utils"),s=t("./ConvertWorker"),o=t("./GenericWorker"),a=t("../base64"),h=t("../support"),l=t("../external"),c=null;if(h.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(m){}function u(t,e,i){switch(t){case"blob":return r.newBlob(r.transformTo("arraybuffer",e),i);case"base64":return a.encode(e);default:return r.transformTo(t,e)}}function d(t,i){var n,r=0,s=null,o=0;for(n=0;n<i.length;n++)o+=i[n].length;switch(t){case"string":return i.join("");case"array":return Array.prototype.concat.apply([],i);case"uint8array":for(s=new Uint8Array(o),n=0;n<i.length;n++)s.set(i[n],r),r+=i[n].length;return s;case"nodebuffer":return e.concat(i);default:throw new Error("concat : unsupported type '"+t+"'")}}function f(t,e){return new l.Promise((function(i,n){var r=[],s=t._internalType,o=t._outputType,a=t._mimeType;t.on("data",(function(t,i){r.push(t),e&&e(i)})).on("error",(function(t){r=[],n(t)})).on("end",(function(){try{var t=u(o,d(s,r),a);i(t)}catch(m){n(m)}r=[]})).resume()}))}function p(t,e,i){var n=e;switch(e){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string";break}try{this._internalType=n,this._outputType=e,this._mimeType=i,r.checkSupport(n),this._worker=t.pipe(new s(n)),t.lock()}catch(m){this._worker=new o("error"),this._worker.error(m)}}p.prototype={accumulate:function(t){return f(this,t)},on:function(t,e){var i=this;return"data"===t?this._worker.on(t,(function(t){e.call(i,t.data,t.meta)})):this._worker.on(t,(function(){r.delay(e,arguments,i)})),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(r.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},t)}},i.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,i,n){"use strict";if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof Uint8Array,n.nodebuffer="undefined"!==typeof e,n.uint8array="undefined"!==typeof Uint8Array,"undefined"===typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(a){try{var s=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,o=new s;o.append(r),n.blob=0===o.getBlob("application/zip").size}catch(a){n.blob=!1}}}try{n.nodestream=!!t("readable-stream").Readable}catch(a){n.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,i){"use strict";for(var n=t("./utils"),r=t("./support"),s=t("./nodejsUtils"),o=t("./stream/GenericWorker"),a=new Array(256),h=0;h<256;h++)a[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;a[254]=a[254]=1;var l=function(t){var e,i,n,s,o,a=t.length,h=0;for(s=0;s<a;s++)i=t.charCodeAt(s),55296===(64512&i)&&s+1<a&&(n=t.charCodeAt(s+1),56320===(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),s++)),h+=i<128?1:i<2048?2:i<65536?3:4;for(e=r.uint8array?new Uint8Array(h):new Array(h),o=0,s=0;o<h;s++)i=t.charCodeAt(s),55296===(64512&i)&&s+1<a&&(n=t.charCodeAt(s+1),56320===(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),s++)),i<128?e[o++]=i:i<2048?(e[o++]=192|i>>>6,e[o++]=128|63&i):i<65536?(e[o++]=224|i>>>12,e[o++]=128|i>>>6&63,e[o++]=128|63&i):(e[o++]=240|i>>>18,e[o++]=128|i>>>12&63,e[o++]=128|i>>>6&63,e[o++]=128|63&i);return e},c=function(t,e){var i;e=e||t.length,e>t.length&&(e=t.length),i=e-1;while(i>=0&&128===(192&t[i]))i--;return i<0||0===i?e:i+a[t[i]]>e?i:e},u=function(t){var e,i,r,s,o=t.length,h=new Array(2*o);for(i=0,e=0;e<o;)if(r=t[e++],r<128)h[i++]=r;else if(s=a[r],s>4)h[i++]=65533,e+=s-1;else{r&=2===s?31:3===s?15:7;while(s>1&&e<o)r=r<<6|63&t[e++],s--;s>1?h[i++]=65533:r<65536?h[i++]=r:(r-=65536,h[i++]=55296|r>>10&1023,h[i++]=56320|1023&r)}return h.length!==i&&(h.subarray?h=h.subarray(0,i):h.length=i),n.applyFromCharCode(h)};function d(){o.call(this,"utf-8 decode"),this.leftOver=null}function f(){o.call(this,"utf-8 encode")}i.utf8encode=function(t){return r.nodebuffer?s.newBufferFrom(t,"utf-8"):l(t)},i.utf8decode=function(t){return r.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):(t=n.transformTo(r.uint8array?"uint8array":"array",t),u(t))},n.inherits(d,o),d.prototype.processChunk=function(t){var e=n.transformTo(r.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var s=e;e=new Uint8Array(s.length+this.leftOver.length),e.set(this.leftOver,0),e.set(s,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var o=c(e),a=e;o!==e.length&&(r.uint8array?(a=e.subarray(0,o),this.leftOver=e.subarray(o,e.length)):(a=e.slice(0,o),this.leftOver=e.slice(o,e.length))),this.push({data:i.utf8decode(a),meta:t.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=d,n.inherits(f,o),f.prototype.processChunk=function(t){this.push({data:i.utf8encode(t.data),meta:t.meta})},i.Utf8EncodeWorker=f},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,i){"use strict";var n=t("./support"),r=t("./base64"),s=t("./nodejsUtils"),o=t("set-immediate-shim"),a=t("./external");function h(t){var e=null;return e=n.uint8array?new Uint8Array(t.length):new Array(t.length),c(t,e)}function l(t){return t}function c(t,e){for(var i=0;i<t.length;++i)e[i]=255&t.charCodeAt(i);return e}i.newBlob=function(t,e){i.checkSupport("blob");try{return new Blob([t],{type:e})}catch(s){try{var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,r=new n;return r.append(t),r.getBlob(e)}catch(s){throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(t,e,i){var n=[],r=0,s=t.length;if(s<=i)return String.fromCharCode.apply(null,t);while(r<s)"array"===e||"nodebuffer"===e?n.push(String.fromCharCode.apply(null,t.slice(r,Math.min(r+i,s)))):n.push(String.fromCharCode.apply(null,t.subarray(r,Math.min(r+i,s)))),r+=i;return n.join("")},stringifyByChar:function(t){for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);return e},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(t){return!1}}()}};function d(t){var e=65536,n=i.getTypeOf(t),r=!0;if("uint8array"===n?r=u.applyCanBeUsed.uint8array:"nodebuffer"===n&&(r=u.applyCanBeUsed.nodebuffer),r)while(e>1)try{return u.stringifyByChunk(t,n,e)}catch(s){e=Math.floor(e/2)}return u.stringifyByChar(t)}function f(t,e){for(var i=0;i<t.length;i++)e[i]=t[i];return e}i.applyFromCharCode=d;var p={};p["string"]={string:l,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return p["string"]["uint8array"](t).buffer},uint8array:function(t){return c(t,new Uint8Array(t.length))},nodebuffer:function(t){return c(t,s.allocBuffer(t.length))}},p["array"]={string:d,array:l,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(t)}},p["arraybuffer"]={string:function(t){return d(new Uint8Array(t))},array:function(t){return f(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:l,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(new Uint8Array(t))}},p["uint8array"]={string:d,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:l,nodebuffer:function(t){return s.newBufferFrom(t)}},p["nodebuffer"]={string:d,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return p["nodebuffer"]["uint8array"](t).buffer},uint8array:function(t){return f(t,new Uint8Array(t.length))},nodebuffer:l},i.transformTo=function(t,e){if(e||(e=""),!t)return e;i.checkSupport(t);var n=i.getTypeOf(e),r=p[n][t](e);return r},i.getTypeOf=function(t){return"string"===typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":n.nodebuffer&&s.isBuffer(t)?"nodebuffer":n.uint8array&&t instanceof Uint8Array?"uint8array":n.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(t){var e=n[t.toLowerCase()];if(!e)throw new Error(t+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(t){var e,i,n="";for(i=0;i<(t||"").length;i++)e=t.charCodeAt(i),n+="\\x"+(e<16?"0":"")+e.toString(16).toUpperCase();return n},i.delay=function(t,e,i){o((function(){t.apply(i||null,e||[])}))},i.inherits=function(t,e){var i=function(){};i.prototype=e.prototype,t.prototype=new i},i.extend=function(){var t,e,i={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&"undefined"===typeof i[e]&&(i[e]=arguments[t][e]);return i},i.prepareContent=function(t,e,s,o,l){var c=a.Promise.resolve(e).then((function(t){var e=n.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)));return e&&"undefined"!==typeof FileReader?new a.Promise((function(e,i){var n=new FileReader;n.onload=function(t){e(t.target.result)},n.onerror=function(t){i(t.target.error)},n.readAsArrayBuffer(t)})):t}));return c.then((function(e){var n=i.getTypeOf(e);return n?("arraybuffer"===n?e=i.transformTo("uint8array",e):"string"===n&&(l?e=r.decode(e):s&&!0!==o&&(e=h(e))),e):a.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(t,e,i){"use strict";var n=t("./reader/readerFor"),r=t("./utils"),s=t("./signature"),o=t("./zipEntry"),a=(t("./utf8"),t("./support"));function h(t){this.files=[],this.loadOptions=t}h.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+r.pretty(e)+", expected "+r.pretty(t)+")")}},isSignature:function(t,e){var i=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4),r=n===e;return this.reader.setIndex(i),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=a.uint8array?"uint8array":"array",i=r.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(i)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};var t,e,i,n=this.zip64EndOfCentralSize-44,r=0;while(r<n)t=this.reader.readInt(2),e=this.reader.readInt(4),i=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:i}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;this.reader.setIndex(this.centralDirOffset);while(this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER))t=new o({zip64:this.zip64},this.loadOptions),t.readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(t<0){var e=!this.isSignature(0,s.LOCAL_FILE_HEADER);throw e?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(t);var i=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),t<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var o=i-n;if(o>0)this.isSignature(i,s.CENTRAL_FILE_HEADER)||(this.reader.zero=o);else if(o<0)throw new Error("Corrupted zip: missing "+Math.abs(o)+" bytes.")},prepareReader:function(t){this.reader=n(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=h},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,i){"use strict";var n=t("./reader/readerFor"),r=t("./utils"),s=t("./compressedObject"),o=t("./crc32"),a=t("./utf8"),h=t("./compressions"),l=t("./support"),c=0,u=3,d=function(t){for(var e in h)if(h.hasOwnProperty(e)&&h[e].magic===t)return h[e];return null};function f(t,e){this.options=t,this.loadOptions=e}f.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(t){var e,i;if(t.skip(22),this.fileNameLength=t.readInt(2),i=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(i),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(e=d(this.compressionMethod),null===e)throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),t===c&&(this.dosPermissions=63&this.externalFileAttributes),t===u&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,i,n,r=t.index+this.extraFieldsLength;this.extraFields||(this.extraFields={});while(t.index+4<r)e=t.readInt(2),i=t.readInt(2),n=t.readData(i),this.extraFields[e]={id:e,length:i,value:n};t.setIndex(r)},handleUTF8:function(){var t=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var i=r.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(i)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var s=r.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=n(t.value);return 1!==e.readInt(1)||o(this.fileName)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=n(t.value);return 1!==e.readInt(1)||o(this.fileComment)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null}},e.exports=f},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,i){"use strict";var n=t("./stream/StreamHelper"),r=t("./stream/DataWorker"),s=t("./utf8"),o=t("./compressedObject"),a=t("./stream/GenericWorker"),h=function(t,e,i){this.name=t,this.dir=i.dir,this.date=i.date,this.comment=i.comment,this.unixPermissions=i.unixPermissions,this.dosPermissions=i.dosPermissions,this._data=e,this._dataBinary=i.binary,this.options={compression:i.compression,compressionOptions:i.compressionOptions}};h.prototype={internalStream:function(t){var e=null,i="string";try{if(!t)throw new Error("No output type specified.");i=t.toLowerCase();var r="string"===i||"text"===i;"binarystring"!==i&&"text"!==i||(i="string"),e=this._decompressWorker();var o=!this._dataBinary;o&&!r&&(e=e.pipe(new s.Utf8EncodeWorker)),!o&&r&&(e=e.pipe(new s.Utf8DecodeWorker))}catch(h){e=new a("error"),e.error(h)}return new n(e,i,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof o&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var i=this._decompressWorker();return this._dataBinary||(i=i.pipe(new s.Utf8EncodeWorker)),o.createWorkerFrom(i,t,e)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof a?this._data:new r(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<l.length;u++)h.prototype[l[u]]=c;e.exports=h},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,e,n){(function(t){"use strict";var i,n,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var s=0,o=new r(c),a=t.document.createTextNode("");o.observe(a,{characterData:!0}),i=function(){a.data=s=++s%2}}else if(t.setImmediate||"undefined"===typeof t.MessageChannel)i="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){c(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(c,0)};else{var h=new t.MessageChannel;h.port1.onmessage=c,i=function(){h.port2.postMessage(0)}}var l=[];function c(){var t,e;n=!0;var i=l.length;while(i){e=l,l=[],t=-1;while(++t<i)e[t]();i=l.length}n=!1}function u(t){1!==l.push(t)||n||i()}e.exports=u}).call(this,"undefined"!==typeof i?i:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],37:[function(t,e,i){"use strict";var n=t("immediate");function r(){}var s={},o=["REJECTED"],a=["FULFILLED"],h=["PENDING"];function l(t){if("function"!==typeof t)throw new TypeError("resolver must be a function");this.state=h,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function c(t,e,i){this.promise=t,"function"===typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"===typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function u(t,e,i){n((function(){var n;try{n=e(i)}catch(r){return s.reject(t,r)}n===t?s.reject(t,new TypeError("Cannot resolve promise with itself")):s.resolve(t,n)}))}function d(t){var e=t&&t.then;if(t&&("object"===typeof t||"function"===typeof t)&&"function"===typeof e)return function(){e.apply(t,arguments)}}function f(t,e){var i=!1;function n(e){i||(i=!0,s.reject(t,e))}function r(e){i||(i=!0,s.resolve(t,e))}function o(){e(r,n)}var a=p(o);"error"===a.status&&n(a.value)}function p(t,e){var i={};try{i.value=t(e),i.status="success"}catch(n){i.status="error",i.value=n}return i}function m(t){return t instanceof this?t:s.resolve(new this(r),t)}function g(t){var e=new this(r);return s.reject(e,t)}function v(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,n=!1;if(!i)return this.resolve([]);var o=new Array(i),a=0,h=-1,l=new this(r);while(++h<i)c(t[h],h);return l;function c(t,r){function h(t){o[r]=t,++a!==i||n||(n=!0,s.resolve(l,o))}e.resolve(t).then(h,(function(t){n||(n=!0,s.reject(l,t))}))}}function w(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,n=!1;if(!i)return this.resolve([]);var o=-1,a=new this(r);while(++o<i)h(t[o]);return a;function h(t){e.resolve(t).then((function(t){n||(n=!0,s.resolve(a,t))}),(function(t){n||(n=!0,s.reject(a,t))}))}}e.exports=l,l.prototype["finally"]=function(t){if("function"!==typeof t)return this;var e=this.constructor;return this.then(i,n);function i(i){function n(){return i}return e.resolve(t()).then(n)}function n(i){function n(){throw i}return e.resolve(t()).then(n)}},l.prototype["catch"]=function(t){return this.then(null,t)},l.prototype.then=function(t,e){if("function"!==typeof t&&this.state===a||"function"!==typeof e&&this.state===o)return this;var i=new this.constructor(r);if(this.state!==h){var n=this.state===a?t:e;u(i,n,this.outcome)}else this.queue.push(new c(i,t,e));return i},c.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},c.prototype.otherCallFulfilled=function(t){u(this.promise,this.onFulfilled,t)},c.prototype.callRejected=function(t){s.reject(this.promise,t)},c.prototype.otherCallRejected=function(t){u(this.promise,this.onRejected,t)},s.resolve=function(t,e){var i=p(d,e);if("error"===i.status)return s.reject(t,i.value);var n=i.value;if(n)f(t,n);else{t.state=a,t.outcome=e;var r=-1,o=t.queue.length;while(++r<o)t.queue[r].callFulfilled(e)}return t},s.reject=function(t,e){t.state=o,t.outcome=e;var i=-1,n=t.queue.length;while(++i<n)t.queue[i].callRejected(e);return t},l.resolve=m,l.reject=g,l.all=v,l.race=w},{immediate:36}],38:[function(t,e,i){"use strict";var n=t("./lib/utils/common").assign,r=t("./lib/deflate"),s=t("./lib/inflate"),o=t("./lib/zlib/constants"),a={};n(a,r,s,o),e.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,i){"use strict";var n=t("./zlib/deflate"),r=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/messages"),a=t("./zlib/zstream"),h=Object.prototype.toString,l=0,c=4,u=0,d=1,f=2,p=-1,m=0,g=8;function v(t){if(!(this instanceof v))return new v(t);this.options=r.assign({level:p,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var i=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(i!==u)throw new Error(o[i]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var l;if(l="string"===typeof e.dictionary?s.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,i=n.deflateSetDictionary(this.strm,l),i!==u)throw new Error(o[i]);this._dict_set=!0}}function w(t,e){var i=new v(e);if(i.push(t,!0),i.err)throw i.msg||o[i.err];return i.result}function y(t,e){return e=e||{},e.raw=!0,w(t,e)}function b(t,e){return e=e||{},e.gzip=!0,w(t,e)}v.prototype.push=function(t,e){var i,o,a=this.strm,p=this.options.chunkSize;if(this.ended)return!1;o=e===~~e?e:!0===e?c:l,"string"===typeof t?a.input=s.string2buf(t):"[object ArrayBuffer]"===h.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new r.Buf8(p),a.next_out=0,a.avail_out=p),i=n.deflate(a,o),i!==d&&i!==u)return this.onEnd(i),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||o!==c&&o!==f)||("string"===this.options.to?this.onData(s.buf2binstring(r.shrinkBuf(a.output,a.next_out))):this.onData(r.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&i!==d);return o===c?(i=n.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===u):o!==f||(this.onEnd(u),a.avail_out=0,!0)},v.prototype.onData=function(t){this.chunks.push(t)},v.prototype.onEnd=function(t){t===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},i.Deflate=v,i.deflate=w,i.deflateRaw=y,i.gzip=b},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,i){"use strict";var n=t("./zlib/inflate"),r=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/constants"),a=t("./zlib/messages"),h=t("./zlib/zstream"),l=t("./zlib/gzheader"),c=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,e.windowBits);if(i!==o.Z_OK)throw new Error(a[i]);this.header=new l,n.inflateGetHeader(this.strm,this.header)}function d(t,e){var i=new u(e);if(i.push(t,!0),i.err)throw i.msg||a[i.err];return i.result}function f(t,e){return e=e||{},e.raw=!0,d(t,e)}u.prototype.push=function(t,e){var i,a,h,l,u,d,f=this.strm,p=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?o.Z_FINISH:o.Z_NO_FLUSH,"string"===typeof t?f.input=s.binstring2buf(t):"[object ArrayBuffer]"===c.call(t)?f.input=new Uint8Array(t):f.input=t,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),i=n.inflate(f,o.Z_NO_FLUSH),i===o.Z_NEED_DICT&&m&&(d="string"===typeof m?s.string2buf(m):"[object ArrayBuffer]"===c.call(m)?new Uint8Array(m):m,i=n.inflateSetDictionary(this.strm,d)),i===o.Z_BUF_ERROR&&!0===g&&(i=o.Z_OK,g=!1),i!==o.Z_STREAM_END&&i!==o.Z_OK)return this.onEnd(i),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&i!==o.Z_STREAM_END&&(0!==f.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(h=s.utf8border(f.output,f.next_out),l=f.next_out-h,u=s.buf2string(f.output,h),f.next_out=l,f.avail_out=p-l,l&&r.arraySet(f.output,f.output,h,l,0),this.onData(u)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(g=!0)}while((f.avail_in>0||0===f.avail_out)&&i!==o.Z_STREAM_END);return i===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),f.avail_out=0,!0)},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},i.Inflate=u,i.inflate=d,i.inflateRaw=f,i.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,i){"use strict";var n="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;i.assign=function(t){var e=Array.prototype.slice.call(arguments,1);while(e.length){var i=e.shift();if(i){if("object"!==typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])}}return t},i.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,i,n,r){if(e.subarray&&t.subarray)t.set(e.subarray(i,i+n),r);else for(var s=0;s<n;s++)t[r+s]=e[i+s]},flattenChunks:function(t){var e,i,n,r,s,o;for(n=0,e=0,i=t.length;e<i;e++)n+=t[e].length;for(o=new Uint8Array(n),r=0,e=0,i=t.length;e<i;e++)s=t[e],o.set(s,r),r+=s.length;return o}},s={arraySet:function(t,e,i,n,r){for(var s=0;s<n;s++)t[r+s]=e[i+s]},flattenChunks:function(t){return[].concat.apply([],t)}};i.setTyped=function(t){t?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,r)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,s))},i.setTyped(n)},{}],42:[function(t,e,i){"use strict";var n=t("./common"),r=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(l){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(l){s=!1}for(var o=new n.Buf8(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function h(t,e){if(e<65537&&(t.subarray&&s||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var i="",o=0;o<e;o++)i+=String.fromCharCode(t[o]);return i}o[254]=o[254]=1,i.string2buf=function(t){var e,i,r,s,o,a=t.length,h=0;for(s=0;s<a;s++)i=t.charCodeAt(s),55296===(64512&i)&&s+1<a&&(r=t.charCodeAt(s+1),56320===(64512&r)&&(i=65536+(i-55296<<10)+(r-56320),s++)),h+=i<128?1:i<2048?2:i<65536?3:4;for(e=new n.Buf8(h),o=0,s=0;o<h;s++)i=t.charCodeAt(s),55296===(64512&i)&&s+1<a&&(r=t.charCodeAt(s+1),56320===(64512&r)&&(i=65536+(i-55296<<10)+(r-56320),s++)),i<128?e[o++]=i:i<2048?(e[o++]=192|i>>>6,e[o++]=128|63&i):i<65536?(e[o++]=224|i>>>12,e[o++]=128|i>>>6&63,e[o++]=128|63&i):(e[o++]=240|i>>>18,e[o++]=128|i>>>12&63,e[o++]=128|i>>>6&63,e[o++]=128|63&i);return e},i.buf2binstring=function(t){return h(t,t.length)},i.binstring2buf=function(t){for(var e=new n.Buf8(t.length),i=0,r=e.length;i<r;i++)e[i]=t.charCodeAt(i);return e},i.buf2string=function(t,e){var i,n,r,s,a=e||t.length,l=new Array(2*a);for(n=0,i=0;i<a;)if(r=t[i++],r<128)l[n++]=r;else if(s=o[r],s>4)l[n++]=65533,i+=s-1;else{r&=2===s?31:3===s?15:7;while(s>1&&i<a)r=r<<6|63&t[i++],s--;s>1?l[n++]=65533:r<65536?l[n++]=r:(r-=65536,l[n++]=55296|r>>10&1023,l[n++]=56320|1023&r)}return h(l,n)},i.utf8border=function(t,e){var i;e=e||t.length,e>t.length&&(e=t.length),i=e-1;while(i>=0&&128===(192&t[i]))i--;return i<0||0===i?e:i+o[t[i]]>e?i:e}},{"./common":41}],43:[function(t,e,i){"use strict";function n(t,e,i,n){var r=65535&t|0,s=t>>>16&65535|0,o=0;while(0!==i){o=i>2e3?2e3:i,i-=o;do{r=r+e[n++]|0,s=s+r|0}while(--o);r%=65521,s%=65521}return r|s<<16|0}e.exports=n},{}],44:[function(t,e,i){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,i){"use strict";function n(){for(var t,e=[],i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[i]=t}return e}var r=n();function s(t,e,i,n){var s=r,o=n+i;t^=-1;for(var a=n;a<o;a++)t=t>>>8^s[255&(t^e[a])];return-1^t}e.exports=s},{}],46:[function(t,e,i){"use strict";var n,r=t("../utils/common"),s=t("./trees"),o=t("./adler32"),a=t("./crc32"),h=t("./messages"),l=0,c=1,u=3,d=4,f=5,p=0,m=1,g=-2,v=-3,w=-5,y=-1,b=1,_=2,x=3,E=4,k=0,S=2,C=8,T=9,O=15,A=8,N=29,R=256,I=R+1+N,L=30,z=19,D=2*I+1,P=15,B=3,j=258,U=j+B+1,M=32,F=42,W=69,q=73,H=91,Y=103,V=113,Z=666,X=1,G=2,K=3,$=4,J=3;function Q(t,e){return t.msg=h[e],e}function tt(t){return(t<<1)-(t>4?9:0)}function et(t){var e=t.length;while(--e>=0)t[e]=0}function it(t){var e=t.state,i=e.pending;i>t.avail_out&&(i=t.avail_out),0!==i&&(r.arraySet(t.output,e.pending_buf,e.pending_out,i,t.next_out),t.next_out+=i,e.pending_out+=i,t.total_out+=i,t.avail_out-=i,e.pending-=i,0===e.pending&&(e.pending_out=0))}function nt(t,e){s._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,it(t.strm)}function rt(t,e){t.pending_buf[t.pending++]=e}function st(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function ot(t,e,i,n){var s=t.avail_in;return s>n&&(s=n),0===s?0:(t.avail_in-=s,r.arraySet(e,t.input,t.next_in,s,i),1===t.state.wrap?t.adler=o(t.adler,e,s,i):2===t.state.wrap&&(t.adler=a(t.adler,e,s,i)),t.next_in+=s,t.total_in+=s,s)}function at(t,e){var i,n,r=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,h=t.strstart>t.w_size-U?t.strstart-(t.w_size-U):0,l=t.window,c=t.w_mask,u=t.prev,d=t.strstart+j,f=l[s+o-1],p=l[s+o];t.prev_length>=t.good_match&&(r>>=2),a>t.lookahead&&(a=t.lookahead);do{if(i=e,l[i+o]===p&&l[i+o-1]===f&&l[i]===l[s]&&l[++i]===l[s+1]){s+=2,i++;do{}while(l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&s<d);if(n=j-(d-s),s=d-j,n>o){if(t.match_start=e,o=n,n>=a)break;f=l[s+o-1],p=l[s+o]}}}while((e=u[e&c])>h&&0!==--r);return o<=t.lookahead?o:t.lookahead}function ht(t){var e,i,n,s,o,a=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-U)){r.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,i=t.hash_size,e=i;do{n=t.head[--e],t.head[e]=n>=a?n-a:0}while(--i);i=a,e=i;do{n=t.prev[--e],t.prev[e]=n>=a?n-a:0}while(--i);s+=a}if(0===t.strm.avail_in)break;if(i=ot(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=i,t.lookahead+t.insert>=B){o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+1])&t.hash_mask;while(t.insert)if(t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+B-1])&t.hash_mask,t.prev[o&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=o,o++,t.insert--,t.lookahead+t.insert<B)break}}while(t.lookahead<U&&0!==t.strm.avail_in)}function lt(t,e){var i=65535;for(i>t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ht(t),0===t.lookahead&&e===l)return X;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+i;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,nt(t,!1),0===t.strm.avail_out))return X;if(t.strstart-t.block_start>=t.w_size-U&&(nt(t,!1),0===t.strm.avail_out))return X}return t.insert=0,e===d?(nt(t,!0),0===t.strm.avail_out?K:$):(t.strstart>t.block_start&&(nt(t,!1),t.strm.avail_out),X)}function ct(t,e){for(var i,n;;){if(t.lookahead<U){if(ht(t),t.lookahead<U&&e===l)return X;if(0===t.lookahead)break}if(i=0,t.lookahead>=B&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+B-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==i&&t.strstart-i<=t.w_size-U&&(t.match_length=at(t,i)),t.match_length>=B)if(n=s._tr_tally(t,t.strstart-t.match_start,t.match_length-B),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=B){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+B-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(nt(t,!1),0===t.strm.avail_out))return X}return t.insert=t.strstart<B-1?t.strstart:B-1,e===d?(nt(t,!0),0===t.strm.avail_out?K:$):t.last_lit&&(nt(t,!1),0===t.strm.avail_out)?X:G}function ut(t,e){for(var i,n,r;;){if(t.lookahead<U){if(ht(t),t.lookahead<U&&e===l)return X;if(0===t.lookahead)break}if(i=0,t.lookahead>=B&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+B-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=B-1,0!==i&&t.prev_length<t.max_lazy_match&&t.strstart-i<=t.w_size-U&&(t.match_length=at(t,i),t.match_length<=5&&(t.strategy===b||t.match_length===B&&t.strstart-t.match_start>4096)&&(t.match_length=B-1)),t.prev_length>=B&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-B,n=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-B),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+B-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=B-1,t.strstart++,n&&(nt(t,!1),0===t.strm.avail_out))return X}else if(t.match_available){if(n=s._tr_tally(t,0,t.window[t.strstart-1]),n&&nt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return X}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<B-1?t.strstart:B-1,e===d?(nt(t,!0),0===t.strm.avail_out?K:$):t.last_lit&&(nt(t,!1),0===t.strm.avail_out)?X:G}function dt(t,e){for(var i,n,r,o,a=t.window;;){if(t.lookahead<=j){if(ht(t),t.lookahead<=j&&e===l)return X;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=B&&t.strstart>0&&(r=t.strstart-1,n=a[r],n===a[++r]&&n===a[++r]&&n===a[++r])){o=t.strstart+j;do{}while(n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&r<o);t.match_length=j-(o-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=B?(i=s._tr_tally(t,1,t.match_length-B),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(nt(t,!1),0===t.strm.avail_out))return X}return t.insert=0,e===d?(nt(t,!0),0===t.strm.avail_out?K:$):t.last_lit&&(nt(t,!1),0===t.strm.avail_out)?X:G}function ft(t,e){for(var i;;){if(0===t.lookahead&&(ht(t),0===t.lookahead)){if(e===l)return X;break}if(t.match_length=0,i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(nt(t,!1),0===t.strm.avail_out))return X}return t.insert=0,e===d?(nt(t,!0),0===t.strm.avail_out?K:$):t.last_lit&&(nt(t,!1),0===t.strm.avail_out)?X:G}function pt(t,e,i,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=i,this.max_chain=n,this.func=r}function mt(t){t.window_size=2*t.w_size,et(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=B-1,t.match_available=0,t.ins_h=0}function gt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=C,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(2*D),this.dyn_dtree=new r.Buf16(2*(2*L+1)),this.bl_tree=new r.Buf16(2*(2*z+1)),et(this.dyn_ltree),et(this.dyn_dtree),et(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(P+1),this.heap=new r.Buf16(2*I+1),et(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*I+1),et(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function vt(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=S,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?F:V,t.adler=2===e.wrap?0:1,e.last_flush=l,s._tr_init(e),p):Q(t,g)}function wt(t){var e=vt(t);return e===p&&mt(t.state),e}function yt(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,p):g}function bt(t,e,i,n,s,o){if(!t)return g;var a=1;if(e===y&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),s<1||s>T||i!==C||n<8||n>15||e<0||e>9||o<0||o>E)return Q(t,g);8===n&&(n=9);var h=new gt;return t.state=h,h.strm=t,h.wrap=a,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=s+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+B-1)/B),h.window=new r.Buf8(2*h.w_size),h.head=new r.Buf16(h.hash_size),h.prev=new r.Buf16(h.w_size),h.lit_bufsize=1<<s+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new r.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=o,h.method=i,wt(t)}function _t(t,e){return bt(t,e,C,O,A,k)}function xt(t,e){var i,r,o,h;if(!t||!t.state||e>f||e<0)return t?Q(t,g):g;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||r.status===Z&&e!==d)return Q(t,0===t.avail_out?w:g);if(r.strm=t,i=r.last_flush,r.last_flush=e,r.status===F)if(2===r.wrap)t.adler=0,rt(r,31),rt(r,139),rt(r,8),r.gzhead?(rt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),rt(r,255&r.gzhead.time),rt(r,r.gzhead.time>>8&255),rt(r,r.gzhead.time>>16&255),rt(r,r.gzhead.time>>24&255),rt(r,9===r.level?2:r.strategy>=_||r.level<2?4:0),rt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(rt(r,255&r.gzhead.extra.length),rt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=a(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=W):(rt(r,0),rt(r,0),rt(r,0),rt(r,0),rt(r,0),rt(r,9===r.level?2:r.strategy>=_||r.level<2?4:0),rt(r,J),r.status=V);else{var v=C+(r.w_bits-8<<4)<<8,y=-1;y=r.strategy>=_||r.level<2?0:r.level<6?1:6===r.level?2:3,v|=y<<6,0!==r.strstart&&(v|=M),v+=31-v%31,r.status=V,st(r,v),0!==r.strstart&&(st(r,t.adler>>>16),st(r,65535&t.adler)),t.adler=1}if(r.status===W)if(r.gzhead.extra){o=r.pending;while(r.gzindex<(65535&r.gzhead.extra.length)){if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),it(t),o=r.pending,r.pending===r.pending_buf_size))break;rt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++}r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=q)}else r.status=q;if(r.status===q)if(r.gzhead.name){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),it(t),o=r.pending,r.pending===r.pending_buf_size)){h=1;break}h=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,rt(r,h)}while(0!==h);r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),0===h&&(r.gzindex=0,r.status=H)}else r.status=H;if(r.status===H)if(r.gzhead.comment){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),it(t),o=r.pending,r.pending===r.pending_buf_size)){h=1;break}h=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,rt(r,h)}while(0!==h);r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),0===h&&(r.status=Y)}else r.status=Y;if(r.status===Y&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&it(t),r.pending+2<=r.pending_buf_size&&(rt(r,255&t.adler),rt(r,t.adler>>8&255),t.adler=0,r.status=V)):r.status=V),0!==r.pending){if(it(t),0===t.avail_out)return r.last_flush=-1,p}else if(0===t.avail_in&&tt(e)<=tt(i)&&e!==d)return Q(t,w);if(r.status===Z&&0!==t.avail_in)return Q(t,w);if(0!==t.avail_in||0!==r.lookahead||e!==l&&r.status!==Z){var b=r.strategy===_?ft(r,e):r.strategy===x?dt(r,e):n[r.level].func(r,e);if(b!==K&&b!==$||(r.status=Z),b===X||b===K)return 0===t.avail_out&&(r.last_flush=-1),p;if(b===G&&(e===c?s._tr_align(r):e!==f&&(s._tr_stored_block(r,0,0,!1),e===u&&(et(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),it(t),0===t.avail_out))return r.last_flush=-1,p}return e!==d?p:r.wrap<=0?m:(2===r.wrap?(rt(r,255&t.adler),rt(r,t.adler>>8&255),rt(r,t.adler>>16&255),rt(r,t.adler>>24&255),rt(r,255&t.total_in),rt(r,t.total_in>>8&255),rt(r,t.total_in>>16&255),rt(r,t.total_in>>24&255)):(st(r,t.adler>>>16),st(r,65535&t.adler)),it(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?p:m)}function Et(t){var e;return t&&t.state?(e=t.state.status,e!==F&&e!==W&&e!==q&&e!==H&&e!==Y&&e!==V&&e!==Z?Q(t,g):(t.state=null,e===V?Q(t,v):p)):g}function kt(t,e){var i,n,s,a,h,l,c,u,d=e.length;if(!t||!t.state)return g;if(i=t.state,a=i.wrap,2===a||1===a&&i.status!==F||i.lookahead)return g;1===a&&(t.adler=o(t.adler,e,d,0)),i.wrap=0,d>=i.w_size&&(0===a&&(et(i.head),i.strstart=0,i.block_start=0,i.insert=0),u=new r.Buf8(i.w_size),r.arraySet(u,e,d-i.w_size,i.w_size,0),e=u,d=i.w_size),h=t.avail_in,l=t.next_in,c=t.input,t.avail_in=d,t.next_in=0,t.input=e,ht(i);while(i.lookahead>=B){n=i.strstart,s=i.lookahead-(B-1);do{i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+B-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++}while(--s);i.strstart=n,i.lookahead=B-1,ht(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=B-1,i.match_available=0,t.next_in=l,t.input=c,t.avail_in=h,i.wrap=a,p}n=[new pt(0,0,0,0,lt),new pt(4,4,8,4,ct),new pt(4,5,16,8,ct),new pt(4,6,32,32,ct),new pt(4,4,16,16,ut),new pt(8,16,32,32,ut),new pt(8,16,128,128,ut),new pt(8,32,128,256,ut),new pt(32,128,258,1024,ut),new pt(32,258,258,4096,ut)],i.deflateInit=_t,i.deflateInit2=bt,i.deflateReset=wt,i.deflateResetKeep=vt,i.deflateSetHeader=yt,i.deflate=xt,i.deflateEnd=Et,i.deflateSetDictionary=kt,i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,i){"use strict";function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=n},{}],48:[function(t,e,i){"use strict";var n=30,r=12;e.exports=function(t,e){var i,s,o,a,h,l,c,u,d,f,p,m,g,v,w,y,b,_,x,E,k,S,C,T,O;i=t.state,s=t.next_in,T=t.input,o=s+(t.avail_in-5),a=t.next_out,O=t.output,h=a-(e-t.avail_out),l=a+(t.avail_out-257),c=i.dmax,u=i.wsize,d=i.whave,f=i.wnext,p=i.window,m=i.hold,g=i.bits,v=i.lencode,w=i.distcode,y=(1<<i.lenbits)-1,b=(1<<i.distbits)-1;t:do{g<15&&(m+=T[s++]<<g,g+=8,m+=T[s++]<<g,g+=8),_=v[m&y];e:for(;;){if(x=_>>>24,m>>>=x,g-=x,x=_>>>16&255,0===x)O[a++]=65535&_;else{if(!(16&x)){if(0===(64&x)){_=v[(65535&_)+(m&(1<<x)-1)];continue e}if(32&x){i.mode=r;break t}t.msg="invalid literal/length code",i.mode=n;break t}E=65535&_,x&=15,x&&(g<x&&(m+=T[s++]<<g,g+=8),E+=m&(1<<x)-1,m>>>=x,g-=x),g<15&&(m+=T[s++]<<g,g+=8,m+=T[s++]<<g,g+=8),_=w[m&b];i:for(;;){if(x=_>>>24,m>>>=x,g-=x,x=_>>>16&255,!(16&x)){if(0===(64&x)){_=w[(65535&_)+(m&(1<<x)-1)];continue i}t.msg="invalid distance code",i.mode=n;break t}if(k=65535&_,x&=15,g<x&&(m+=T[s++]<<g,g+=8,g<x&&(m+=T[s++]<<g,g+=8)),k+=m&(1<<x)-1,k>c){t.msg="invalid distance too far back",i.mode=n;break t}if(m>>>=x,g-=x,x=a-h,k>x){if(x=k-x,x>d&&i.sane){t.msg="invalid distance too far back",i.mode=n;break t}if(S=0,C=p,0===f){if(S+=u-x,x<E){E-=x;do{O[a++]=p[S++]}while(--x);S=a-k,C=O}}else if(f<x){if(S+=u+f-x,x-=f,x<E){E-=x;do{O[a++]=p[S++]}while(--x);if(S=0,f<E){x=f,E-=x;do{O[a++]=p[S++]}while(--x);S=a-k,C=O}}}else if(S+=f-x,x<E){E-=x;do{O[a++]=p[S++]}while(--x);S=a-k,C=O}while(E>2)O[a++]=C[S++],O[a++]=C[S++],O[a++]=C[S++],E-=3;E&&(O[a++]=C[S++],E>1&&(O[a++]=C[S++]))}else{S=a-k;do{O[a++]=O[S++],O[a++]=O[S++],O[a++]=O[S++],E-=3}while(E>2);E&&(O[a++]=O[S++],E>1&&(O[a++]=O[S++]))}break}}break}}while(s<o&&a<l);E=g>>3,s-=E,g-=E<<3,m&=(1<<g)-1,t.next_in=s,t.next_out=a,t.avail_in=s<o?o-s+5:5-(s-o),t.avail_out=a<l?l-a+257:257-(a-l),i.hold=m,i.bits=g}},{}],49:[function(t,e,i){"use strict";var n=t("../utils/common"),r=t("./adler32"),s=t("./crc32"),o=t("./inffast"),a=t("./inftrees"),h=0,l=1,c=2,u=4,d=5,f=6,p=0,m=1,g=2,v=-2,w=-3,y=-4,b=-5,_=8,x=1,E=2,k=3,S=4,C=5,T=6,O=7,A=8,N=9,R=10,I=11,L=12,z=13,D=14,P=15,B=16,j=17,U=18,M=19,F=20,W=21,q=22,H=23,Y=24,V=25,Z=26,X=27,G=28,K=29,$=30,J=31,Q=32,tt=852,et=592,it=15,nt=it;function rt(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function st(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ot(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=x,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(tt),e.distcode=e.distdyn=new n.Buf32(et),e.sane=1,e.back=-1,p):v}function at(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,ot(t)):v}function ht(t,e){var i,n;return t&&t.state?(n=t.state,e<0?(i=0,e=-e):(i=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?v:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=i,n.wbits=e,at(t))):v}function lt(t,e){var i,n;return t?(n=new st,t.state=n,n.window=null,i=ht(t,e),i!==p&&(t.state=null),i):v}function ct(t){return lt(t,nt)}var ut,dt,ft=!0;function pt(t){if(ft){var e;ut=new n.Buf32(512),dt=new n.Buf32(32),e=0;while(e<144)t.lens[e++]=8;while(e<256)t.lens[e++]=9;while(e<280)t.lens[e++]=7;while(e<288)t.lens[e++]=8;a(l,t.lens,0,288,ut,0,t.work,{bits:9}),e=0;while(e<32)t.lens[e++]=5;a(c,t.lens,0,32,dt,0,t.work,{bits:5}),ft=!1}t.lencode=ut,t.lenbits=9,t.distcode=dt,t.distbits=5}function mt(t,e,i,r){var s,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),r>=o.wsize?(n.arraySet(o.window,e,i-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(s=o.wsize-o.wnext,s>r&&(s=r),n.arraySet(o.window,e,i-r,s,o.wnext),r-=s,r?(n.arraySet(o.window,e,i-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}function gt(t,e){var i,tt,et,it,nt,st,ot,at,ht,lt,ct,ut,dt,ft,gt,vt,wt,yt,bt,_t,xt,Et,kt,St,Ct=0,Tt=new n.Buf8(4),Ot=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return v;i=t.state,i.mode===L&&(i.mode=z),nt=t.next_out,et=t.output,ot=t.avail_out,it=t.next_in,tt=t.input,st=t.avail_in,at=i.hold,ht=i.bits,lt=st,ct=ot,Et=p;t:for(;;)switch(i.mode){case x:if(0===i.wrap){i.mode=z;break}while(ht<16){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}if(2&i.wrap&&35615===at){i.check=0,Tt[0]=255&at,Tt[1]=at>>>8&255,i.check=s(i.check,Tt,2,0),at=0,ht=0,i.mode=E;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&at)<<8)+(at>>8))%31){t.msg="incorrect header check",i.mode=$;break}if((15&at)!==_){t.msg="unknown compression method",i.mode=$;break}if(at>>>=4,ht-=4,xt=8+(15&at),0===i.wbits)i.wbits=xt;else if(xt>i.wbits){t.msg="invalid window size",i.mode=$;break}i.dmax=1<<xt,t.adler=i.check=1,i.mode=512&at?R:L,at=0,ht=0;break;case E:while(ht<16){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}if(i.flags=at,(255&i.flags)!==_){t.msg="unknown compression method",i.mode=$;break}if(57344&i.flags){t.msg="unknown header flags set",i.mode=$;break}i.head&&(i.head.text=at>>8&1),512&i.flags&&(Tt[0]=255&at,Tt[1]=at>>>8&255,i.check=s(i.check,Tt,2,0)),at=0,ht=0,i.mode=k;case k:while(ht<32){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}i.head&&(i.head.time=at),512&i.flags&&(Tt[0]=255&at,Tt[1]=at>>>8&255,Tt[2]=at>>>16&255,Tt[3]=at>>>24&255,i.check=s(i.check,Tt,4,0)),at=0,ht=0,i.mode=S;case S:while(ht<16){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}i.head&&(i.head.xflags=255&at,i.head.os=at>>8),512&i.flags&&(Tt[0]=255&at,Tt[1]=at>>>8&255,i.check=s(i.check,Tt,2,0)),at=0,ht=0,i.mode=C;case C:if(1024&i.flags){while(ht<16){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}i.length=at,i.head&&(i.head.extra_len=at),512&i.flags&&(Tt[0]=255&at,Tt[1]=at>>>8&255,i.check=s(i.check,Tt,2,0)),at=0,ht=0}else i.head&&(i.head.extra=null);i.mode=T;case T:if(1024&i.flags&&(ut=i.length,ut>st&&(ut=st),ut&&(i.head&&(xt=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,tt,it,ut,xt)),512&i.flags&&(i.check=s(i.check,tt,ut,it)),st-=ut,it+=ut,i.length-=ut),i.length))break t;i.length=0,i.mode=O;case O:if(2048&i.flags){if(0===st)break t;ut=0;do{xt=tt[it+ut++],i.head&&xt&&i.length<65536&&(i.head.name+=String.fromCharCode(xt))}while(xt&&ut<st);if(512&i.flags&&(i.check=s(i.check,tt,ut,it)),st-=ut,it+=ut,xt)break t}else i.head&&(i.head.name=null);i.length=0,i.mode=A;case A:if(4096&i.flags){if(0===st)break t;ut=0;do{xt=tt[it+ut++],i.head&&xt&&i.length<65536&&(i.head.comment+=String.fromCharCode(xt))}while(xt&&ut<st);if(512&i.flags&&(i.check=s(i.check,tt,ut,it)),st-=ut,it+=ut,xt)break t}else i.head&&(i.head.comment=null);i.mode=N;case N:if(512&i.flags){while(ht<16){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}if(at!==(65535&i.check)){t.msg="header crc mismatch",i.mode=$;break}at=0,ht=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=L;break;case R:while(ht<32){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}t.adler=i.check=rt(at),at=0,ht=0,i.mode=I;case I:if(0===i.havedict)return t.next_out=nt,t.avail_out=ot,t.next_in=it,t.avail_in=st,i.hold=at,i.bits=ht,g;t.adler=i.check=1,i.mode=L;case L:if(e===d||e===f)break t;case z:if(i.last){at>>>=7&ht,ht-=7&ht,i.mode=X;break}while(ht<3){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}switch(i.last=1&at,at>>>=1,ht-=1,3&at){case 0:i.mode=D;break;case 1:if(pt(i),i.mode=F,e===f){at>>>=2,ht-=2;break t}break;case 2:i.mode=j;break;case 3:t.msg="invalid block type",i.mode=$}at>>>=2,ht-=2;break;case D:at>>>=7&ht,ht-=7&ht;while(ht<32){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}if((65535&at)!==(at>>>16^65535)){t.msg="invalid stored block lengths",i.mode=$;break}if(i.length=65535&at,at=0,ht=0,i.mode=P,e===f)break t;case P:i.mode=B;case B:if(ut=i.length,ut){if(ut>st&&(ut=st),ut>ot&&(ut=ot),0===ut)break t;n.arraySet(et,tt,it,ut,nt),st-=ut,it+=ut,ot-=ut,nt+=ut,i.length-=ut;break}i.mode=L;break;case j:while(ht<14){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}if(i.nlen=257+(31&at),at>>>=5,ht-=5,i.ndist=1+(31&at),at>>>=5,ht-=5,i.ncode=4+(15&at),at>>>=4,ht-=4,i.nlen>286||i.ndist>30){t.msg="too many length or distance symbols",i.mode=$;break}i.have=0,i.mode=U;case U:while(i.have<i.ncode){while(ht<3){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}i.lens[Ot[i.have++]]=7&at,at>>>=3,ht-=3}while(i.have<19)i.lens[Ot[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,kt={bits:i.lenbits},Et=a(h,i.lens,0,19,i.lencode,0,i.work,kt),i.lenbits=kt.bits,Et){t.msg="invalid code lengths set",i.mode=$;break}i.have=0,i.mode=M;case M:while(i.have<i.nlen+i.ndist){for(;;){if(Ct=i.lencode[at&(1<<i.lenbits)-1],gt=Ct>>>24,vt=Ct>>>16&255,wt=65535&Ct,gt<=ht)break;if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}if(wt<16)at>>>=gt,ht-=gt,i.lens[i.have++]=wt;else{if(16===wt){St=gt+2;while(ht<St){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}if(at>>>=gt,ht-=gt,0===i.have){t.msg="invalid bit length repeat",i.mode=$;break}xt=i.lens[i.have-1],ut=3+(3&at),at>>>=2,ht-=2}else if(17===wt){St=gt+3;while(ht<St){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}at>>>=gt,ht-=gt,xt=0,ut=3+(7&at),at>>>=3,ht-=3}else{St=gt+7;while(ht<St){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}at>>>=gt,ht-=gt,xt=0,ut=11+(127&at),at>>>=7,ht-=7}if(i.have+ut>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=$;break}while(ut--)i.lens[i.have++]=xt}}if(i.mode===$)break;if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=$;break}if(i.lenbits=9,kt={bits:i.lenbits},Et=a(l,i.lens,0,i.nlen,i.lencode,0,i.work,kt),i.lenbits=kt.bits,Et){t.msg="invalid literal/lengths set",i.mode=$;break}if(i.distbits=6,i.distcode=i.distdyn,kt={bits:i.distbits},Et=a(c,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,kt),i.distbits=kt.bits,Et){t.msg="invalid distances set",i.mode=$;break}if(i.mode=F,e===f)break t;case F:i.mode=W;case W:if(st>=6&&ot>=258){t.next_out=nt,t.avail_out=ot,t.next_in=it,t.avail_in=st,i.hold=at,i.bits=ht,o(t,ct),nt=t.next_out,et=t.output,ot=t.avail_out,it=t.next_in,tt=t.input,st=t.avail_in,at=i.hold,ht=i.bits,i.mode===L&&(i.back=-1);break}for(i.back=0;;){if(Ct=i.lencode[at&(1<<i.lenbits)-1],gt=Ct>>>24,vt=Ct>>>16&255,wt=65535&Ct,gt<=ht)break;if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}if(vt&&0===(240&vt)){for(yt=gt,bt=vt,_t=wt;;){if(Ct=i.lencode[_t+((at&(1<<yt+bt)-1)>>yt)],gt=Ct>>>24,vt=Ct>>>16&255,wt=65535&Ct,yt+gt<=ht)break;if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}at>>>=yt,ht-=yt,i.back+=yt}if(at>>>=gt,ht-=gt,i.back+=gt,i.length=wt,0===vt){i.mode=Z;break}if(32&vt){i.back=-1,i.mode=L;break}if(64&vt){t.msg="invalid literal/length code",i.mode=$;break}i.extra=15&vt,i.mode=q;case q:if(i.extra){St=i.extra;while(ht<St){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}i.length+=at&(1<<i.extra)-1,at>>>=i.extra,ht-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=H;case H:for(;;){if(Ct=i.distcode[at&(1<<i.distbits)-1],gt=Ct>>>24,vt=Ct>>>16&255,wt=65535&Ct,gt<=ht)break;if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}if(0===(240&vt)){for(yt=gt,bt=vt,_t=wt;;){if(Ct=i.distcode[_t+((at&(1<<yt+bt)-1)>>yt)],gt=Ct>>>24,vt=Ct>>>16&255,wt=65535&Ct,yt+gt<=ht)break;if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}at>>>=yt,ht-=yt,i.back+=yt}if(at>>>=gt,ht-=gt,i.back+=gt,64&vt){t.msg="invalid distance code",i.mode=$;break}i.offset=wt,i.extra=15&vt,i.mode=Y;case Y:if(i.extra){St=i.extra;while(ht<St){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}i.offset+=at&(1<<i.extra)-1,at>>>=i.extra,ht-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=$;break}i.mode=V;case V:if(0===ot)break t;if(ut=ct-ot,i.offset>ut){if(ut=i.offset-ut,ut>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=$;break}ut>i.wnext?(ut-=i.wnext,dt=i.wsize-ut):dt=i.wnext-ut,ut>i.length&&(ut=i.length),ft=i.window}else ft=et,dt=nt-i.offset,ut=i.length;ut>ot&&(ut=ot),ot-=ut,i.length-=ut;do{et[nt++]=ft[dt++]}while(--ut);0===i.length&&(i.mode=W);break;case Z:if(0===ot)break t;et[nt++]=i.length,ot--,i.mode=W;break;case X:if(i.wrap){while(ht<32){if(0===st)break t;st--,at|=tt[it++]<<ht,ht+=8}if(ct-=ot,t.total_out+=ct,i.total+=ct,ct&&(t.adler=i.check=i.flags?s(i.check,et,ct,nt-ct):r(i.check,et,ct,nt-ct)),ct=ot,(i.flags?at:rt(at))!==i.check){t.msg="incorrect data check",i.mode=$;break}at=0,ht=0}i.mode=G;case G:if(i.wrap&&i.flags){while(ht<32){if(0===st)break t;st--,at+=tt[it++]<<ht,ht+=8}if(at!==(4294967295&i.total)){t.msg="incorrect length check",i.mode=$;break}at=0,ht=0}i.mode=K;case K:Et=m;break t;case $:Et=w;break t;case J:return y;case Q:default:return v}return t.next_out=nt,t.avail_out=ot,t.next_in=it,t.avail_in=st,i.hold=at,i.bits=ht,(i.wsize||ct!==t.avail_out&&i.mode<$&&(i.mode<X||e!==u))&&mt(t,t.output,t.next_out,ct-t.avail_out)?(i.mode=J,y):(lt-=t.avail_in,ct-=t.avail_out,t.total_in+=lt,t.total_out+=ct,i.total+=ct,i.wrap&&ct&&(t.adler=i.check=i.flags?s(i.check,et,ct,t.next_out-ct):r(i.check,et,ct,t.next_out-ct)),t.data_type=i.bits+(i.last?64:0)+(i.mode===L?128:0)+(i.mode===F||i.mode===P?256:0),(0===lt&&0===ct||e===u)&&Et===p&&(Et=b),Et)}function vt(t){if(!t||!t.state)return v;var e=t.state;return e.window&&(e.window=null),t.state=null,p}function wt(t,e){var i;return t&&t.state?(i=t.state,0===(2&i.wrap)?v:(i.head=e,e.done=!1,p)):v}function yt(t,e){var i,n,s,o=e.length;return t&&t.state?(i=t.state,0!==i.wrap&&i.mode!==I?v:i.mode===I&&(n=1,n=r(n,e,o,0),n!==i.check)?w:(s=mt(t,e,o,o),s?(i.mode=J,y):(i.havedict=1,p))):v}i.inflateReset=at,i.inflateReset2=ht,i.inflateResetKeep=ot,i.inflateInit=ct,i.inflateInit2=lt,i.inflate=gt,i.inflateEnd=vt,i.inflateGetHeader=wt,i.inflateSetDictionary=yt,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,i){"use strict";var n=t("../utils/common"),r=15,s=852,o=592,a=0,h=1,l=2,c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],u=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],d=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],f=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,i,p,m,g,v,w){var y,b,_,x,E,k,S,C,T,O=w.bits,A=0,N=0,R=0,I=0,L=0,z=0,D=0,P=0,B=0,j=0,U=null,M=0,F=new n.Buf16(r+1),W=new n.Buf16(r+1),q=null,H=0;for(A=0;A<=r;A++)F[A]=0;for(N=0;N<p;N++)F[e[i+N]]++;for(L=O,I=r;I>=1;I--)if(0!==F[I])break;if(L>I&&(L=I),0===I)return m[g++]=20971520,m[g++]=20971520,w.bits=1,0;for(R=1;R<I;R++)if(0!==F[R])break;for(L<R&&(L=R),P=1,A=1;A<=r;A++)if(P<<=1,P-=F[A],P<0)return-1;if(P>0&&(t===a||1!==I))return-1;for(W[1]=0,A=1;A<r;A++)W[A+1]=W[A]+F[A];for(N=0;N<p;N++)0!==e[i+N]&&(v[W[e[i+N]]++]=N);if(t===a?(U=q=v,k=19):t===h?(U=c,M-=257,q=u,H-=257,k=256):(U=d,q=f,k=-1),j=0,N=0,A=R,E=g,z=L,D=0,_=-1,B=1<<L,x=B-1,t===h&&B>s||t===l&&B>o)return 1;for(;;){S=A-D,v[N]<k?(C=0,T=v[N]):v[N]>k?(C=q[H+v[N]],T=U[M+v[N]]):(C=96,T=0),y=1<<A-D,b=1<<z,R=b;do{b-=y,m[E+(j>>D)+b]=S<<24|C<<16|T|0}while(0!==b);y=1<<A-1;while(j&y)y>>=1;if(0!==y?(j&=y-1,j+=y):j=0,N++,0===--F[A]){if(A===I)break;A=e[i+v[N]]}if(A>L&&(j&x)!==_){0===D&&(D=L),E+=R,z=A-D,P=1<<z;while(z+D<I){if(P-=F[z+D],P<=0)break;z++,P<<=1}if(B+=1<<z,t===h&&B>s||t===l&&B>o)return 1;_=j&x,m[_]=L<<24|z<<16|E-g|0}}return 0!==j&&(m[E+j]=A-D<<24|64<<16|0),w.bits=L,0}},{"../utils/common":41}],51:[function(t,e,i){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,i){"use strict";var n=t("../utils/common"),r=4,s=0,o=1,a=2;function h(t){var e=t.length;while(--e>=0)t[e]=0}var l=0,c=1,u=2,d=3,f=258,p=29,m=256,g=m+1+p,v=30,w=19,y=2*g+1,b=15,_=16,x=7,E=256,k=16,S=17,C=18,T=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],O=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=512,I=new Array(2*(g+2));h(I);var L=new Array(2*v);h(L);var z=new Array(R);h(z);var D=new Array(f-d+1);h(D);var P=new Array(p);h(P);var B,j,U,M=new Array(v);function F(t,e,i,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function W(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function q(t){return t<256?z[t]:z[256+(t>>>7)]}function H(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function Y(t,e,i){t.bi_valid>_-i?(t.bi_buf|=e<<t.bi_valid&65535,H(t,t.bi_buf),t.bi_buf=e>>_-t.bi_valid,t.bi_valid+=i-_):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=i)}function V(t,e,i){Y(t,i[2*e],i[2*e+1])}function Z(t,e){var i=0;do{i|=1&t,t>>>=1,i<<=1}while(--e>0);return i>>>1}function X(t){16===t.bi_valid?(H(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function G(t,e){var i,n,r,s,o,a,h=e.dyn_tree,l=e.max_code,c=e.stat_desc.static_tree,u=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(s=0;s<=b;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,i=t.heap_max+1;i<y;i++)n=t.heap[i],s=h[2*h[2*n+1]+1]+1,s>p&&(s=p,m++),h[2*n+1]=s,n>l||(t.bl_count[s]++,o=0,n>=f&&(o=d[n-f]),a=h[2*n],t.opt_len+=a*(s+o),u&&(t.static_len+=a*(c[2*n+1]+o)));if(0!==m){do{s=p-1;while(0===t.bl_count[s])s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(s=p;0!==s;s--){n=t.bl_count[s];while(0!==n)r=t.heap[--i],r>l||(h[2*r+1]!==s&&(t.opt_len+=(s-h[2*r+1])*h[2*r],h[2*r+1]=s),n--)}}}function K(t,e,i){var n,r,s=new Array(b+1),o=0;for(n=1;n<=b;n++)s[n]=o=o+i[n-1]<<1;for(r=0;r<=e;r++){var a=t[2*r+1];0!==a&&(t[2*r]=Z(s[a]++,a))}}function $(){var t,e,i,n,r,s=new Array(b+1);for(i=0,n=0;n<p-1;n++)for(P[n]=i,t=0;t<1<<T[n];t++)D[i++]=n;for(D[i-1]=n,r=0,n=0;n<16;n++)for(M[n]=r,t=0;t<1<<O[n];t++)z[r++]=n;for(r>>=7;n<v;n++)for(M[n]=r<<7,t=0;t<1<<O[n]-7;t++)z[256+r++]=n;for(e=0;e<=b;e++)s[e]=0;t=0;while(t<=143)I[2*t+1]=8,t++,s[8]++;while(t<=255)I[2*t+1]=9,t++,s[9]++;while(t<=279)I[2*t+1]=7,t++,s[7]++;while(t<=287)I[2*t+1]=8,t++,s[8]++;for(K(I,g+1,s),t=0;t<v;t++)L[2*t+1]=5,L[2*t]=Z(t,5);B=new F(I,T,m+1,g,b),j=new F(L,O,0,v,b),U=new F(new Array(0),A,0,w,x)}function J(t){var e;for(e=0;e<g;e++)t.dyn_ltree[2*e]=0;for(e=0;e<v;e++)t.dyn_dtree[2*e]=0;for(e=0;e<w;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*E]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function Q(t){t.bi_valid>8?H(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function tt(t,e,i,r){Q(t),r&&(H(t,i),H(t,~i)),n.arraySet(t.pending_buf,t.window,e,i,t.pending),t.pending+=i}function et(t,e,i,n){var r=2*e,s=2*i;return t[r]<t[s]||t[r]===t[s]&&n[e]<=n[i]}function it(t,e,i){var n=t.heap[i],r=i<<1;while(r<=t.heap_len){if(r<t.heap_len&&et(e,t.heap[r+1],t.heap[r],t.depth)&&r++,et(e,n,t.heap[r],t.depth))break;t.heap[i]=t.heap[r],i=r,r<<=1}t.heap[i]=n}function nt(t,e,i){var n,r,s,o,a=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],r=t.pending_buf[t.l_buf+a],a++,0===n?V(t,r,e):(s=D[r],V(t,s+m+1,e),o=T[s],0!==o&&(r-=P[s],Y(t,r,o)),n--,s=q(n),V(t,s,i),o=O[s],0!==o&&(n-=M[s],Y(t,n,o)))}while(a<t.last_lit);V(t,E,e)}function rt(t,e){var i,n,r,s=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.has_stree,h=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=y,i=0;i<h;i++)0!==s[2*i]?(t.heap[++t.heap_len]=l=i,t.depth[i]=0):s[2*i+1]=0;while(t.heap_len<2)r=t.heap[++t.heap_len]=l<2?++l:0,s[2*r]=1,t.depth[r]=0,t.opt_len--,a&&(t.static_len-=o[2*r+1]);for(e.max_code=l,i=t.heap_len>>1;i>=1;i--)it(t,s,i);r=h;do{i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],it(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=n,s[2*r]=s[2*i]+s[2*n],t.depth[r]=(t.depth[i]>=t.depth[n]?t.depth[i]:t.depth[n])+1,s[2*i+1]=s[2*n+1]=r,t.heap[1]=r++,it(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],G(t,e),K(s,l,t.bl_count)}function st(t,e,i){var n,r,s=-1,o=e[1],a=0,h=7,l=4;for(0===o&&(h=138,l=3),e[2*(i+1)+1]=65535,n=0;n<=i;n++)r=o,o=e[2*(n+1)+1],++a<h&&r===o||(a<l?t.bl_tree[2*r]+=a:0!==r?(r!==s&&t.bl_tree[2*r]++,t.bl_tree[2*k]++):a<=10?t.bl_tree[2*S]++:t.bl_tree[2*C]++,a=0,s=r,0===o?(h=138,l=3):r===o?(h=6,l=3):(h=7,l=4))}function ot(t,e,i){var n,r,s=-1,o=e[1],a=0,h=7,l=4;for(0===o&&(h=138,l=3),n=0;n<=i;n++)if(r=o,o=e[2*(n+1)+1],!(++a<h&&r===o)){if(a<l)do{V(t,r,t.bl_tree)}while(0!==--a);else 0!==r?(r!==s&&(V(t,r,t.bl_tree),a--),V(t,k,t.bl_tree),Y(t,a-3,2)):a<=10?(V(t,S,t.bl_tree),Y(t,a-3,3)):(V(t,C,t.bl_tree),Y(t,a-11,7));a=0,s=r,0===o?(h=138,l=3):r===o?(h=6,l=3):(h=7,l=4)}}function at(t){var e;for(st(t,t.dyn_ltree,t.l_desc.max_code),st(t,t.dyn_dtree,t.d_desc.max_code),rt(t,t.bl_desc),e=w-1;e>=3;e--)if(0!==t.bl_tree[2*N[e]+1])break;return t.opt_len+=3*(e+1)+5+5+4,e}function ht(t,e,i,n){var r;for(Y(t,e-257,5),Y(t,i-1,5),Y(t,n-4,4),r=0;r<n;r++)Y(t,t.bl_tree[2*N[r]+1],3);ot(t,t.dyn_ltree,e-1),ot(t,t.dyn_dtree,i-1)}function lt(t){var e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return s;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e<m;e++)if(0!==t.dyn_ltree[2*e])return o;return s}h(M);var ct=!1;function ut(t){ct||($(),ct=!0),t.l_desc=new W(t.dyn_ltree,B),t.d_desc=new W(t.dyn_dtree,j),t.bl_desc=new W(t.bl_tree,U),t.bi_buf=0,t.bi_valid=0,J(t)}function dt(t,e,i,n){Y(t,(l<<1)+(n?1:0),3),tt(t,e,i,!0)}function ft(t){Y(t,c<<1,3),V(t,E,I),X(t)}function pt(t,e,i,n){var s,o,h=0;t.level>0?(t.strm.data_type===a&&(t.strm.data_type=lt(t)),rt(t,t.l_desc),rt(t,t.d_desc),h=at(t),s=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=s&&(s=o)):s=o=i+5,i+4<=s&&-1!==e?dt(t,e,i,n):t.strategy===r||o===s?(Y(t,(c<<1)+(n?1:0),3),nt(t,I,L)):(Y(t,(u<<1)+(n?1:0),3),ht(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),nt(t,t.dyn_ltree,t.dyn_dtree)),J(t),n&&Q(t)}function mt(t,e,i){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(D[i]+m+1)]++,t.dyn_dtree[2*q(e)]++),t.last_lit===t.lit_bufsize-1}i._tr_init=ut,i._tr_stored_block=dt,i._tr_flush_block=pt,i._tr_tally=mt,i._tr_align=ft},{"../utils/common":41}],53:[function(t,e,i){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=n},{}],54:[function(t,e,i){"use strict";e.exports="function"===typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}))}).call(this,i("b639").Buffer,i("c8ba"))},"894b":function(t,e,i){"use strict";function n(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=n,e.default={createElement:n}},"8a9e":function(t,e,i){"use strict";var n=i("0b16"),r=i("06d2"),s=i("c9fc"),o=i.n(s);class a{constructor(t){this.settings=t,this.name=t.layout||"reflowable",this._spread="none"!==t.spread,this._minSpreadWidth=t.minSpreadWidth||800,this._evenSpreads=t.evenSpreads||!1,"scrolled"===t.flow||"scrolled-continuous"===t.flow||"scrolled-doc"===t.flow?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(t){return"undefined"!=typeof t&&(this._flow="scrolled"===t||"scrolled-continuous"===t||"scrolled-doc"===t?"scrolled":"paginated",this.update({flow:this._flow})),this._flow}spread(t,e){return t&&(this._spread="none"!==t,this.update({spread:this._spread})),e>=0&&(this._minSpreadWidth=e),this._spread}calculate(t,e,i){var n,r,s,o,a=1,h=i||0,l=t,c=e,u=Math.floor(l/12);a=this._spread&&l>=this._minSpreadWidth?2:1,"reflowable"!==this.name||"paginated"!==this._flow||i>=0||(h=u%2===0?u:u-1),"pre-paginated"===this.name&&(h=0),a>1?(n=l/a-h,s=n+h):(n=l,s=l),"pre-paginated"===this.name&&a>1&&(l=n),r=n*a+h,o=l,this.width=l,this.height=c,this.spreadWidth=r,this.pageWidth=s,this.delta=o,this.columnWidth=n,this.gap=h,this.divisor=a,this.update({width:l,height:c,spreadWidth:r,pageWidth:s,delta:o,columnWidth:n,gap:h,divisor:a})}format(t,e,i){var n;return n="pre-paginated"===this.name?t.fit(this.columnWidth,this.height,e):"paginated"===this._flow?t.columns(this.width,this.height,this.columnWidth,this.gap,this.settings.direction):i&&"horizontal"===i?t.size(null,this.height):t.size(this.width,null),n}count(t,e){let i,n;return"pre-paginated"===this.name?(i=1,n=1):"paginated"===this._flow?(e=e||this.delta,i=Math.ceil(t/e),n=i*this.divisor):(e=e||this.height,i=Math.ceil(t/e),n=i),{spreads:i,pages:n}}update(t){if(Object.keys(t).forEach(e=>{this.props[e]===t[e]&&delete t[e]}),Object.keys(t).length>0){let e=Object(n["extend"])(this.props,t);this.emit(r["c"].LAYOUT.UPDATED,e,t)}}}o()(a.prototype),e["a"]=a},"8b5a":function(t,e,i){"use strict";var n=i("0b16"),r=i("e58e"),s=i("06d2"),o=i("c9fc"),a=i.n(o);const h=Math.PI/2,l={easeOutSine:function(t){return Math.sin(t*h)},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},easeInCubic:function(t){return Math.pow(t,3)}};class c{constructor(t,e){this.settings=Object(n["extend"])({duration:80,minVelocity:.2,minDistance:10,easing:l["easeInCubic"]},e||{}),this.supportsTouch=this.supportsTouch(),this.supportsTouch&&this.setup(t)}setup(t){this.manager=t,this.layout=this.manager.layout,this.fullsize=this.manager.settings.fullsize,this.fullsize?(this.element=this.manager.stage.element,this.scroller=window,this.disableScroll()):(this.element=this.manager.stage.container,this.scroller=this.element,this.element.style["WebkitOverflowScrolling"]="touch"),this.manager.settings.offset=this.layout.width,this.manager.settings.afterScrolledTimeout=2*this.settings.duration,this.isVertical="vertical"===this.manager.settings.axis,this.manager.isPaginated&&!this.isVertical&&(this.touchCanceler=!1,this.resizeCanceler=!1,this.snapping=!1,this.scrollLeft,this.scrollTop,this.startTouchX=void 0,this.startTouchY=void 0,this.startTime=void 0,this.endTouchX=void 0,this.endTouchY=void 0,this.endTime=void 0,this.addListeners())}supportsTouch(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}disableScroll(){this.element.style.overflow="hidden"}enableScroll(){this.element.style.overflow=""}addListeners(){this._onResize=this.onResize.bind(this),window.addEventListener("resize",this._onResize),this._onScroll=this.onScroll.bind(this),this.scroller.addEventListener("scroll",this._onScroll),this._onTouchStart=this.onTouchStart.bind(this),this.scroller.addEventListener("touchstart",this._onTouchStart,{passive:!0}),this.on("touchstart",this._onTouchStart),this._onTouchMove=this.onTouchMove.bind(this),this.scroller.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.on("touchmove",this._onTouchMove),this._onTouchEnd=this.onTouchEnd.bind(this),this.scroller.addEventListener("touchend",this._onTouchEnd,{passive:!0}),this.on("touchend",this._onTouchEnd),this._afterDisplayed=this.afterDisplayed.bind(this),this.manager.on(s["c"].MANAGERS.ADDED,this._afterDisplayed)}removeListeners(){window.removeEventListener("resize",this._onResize),this._onResize=void 0,this.scroller.removeEventListener("scroll",this._onScroll),this._onScroll=void 0,this.scroller.removeEventListener("touchstart",this._onTouchStart,{passive:!0}),this.off("touchstart",this._onTouchStart),this._onTouchStart=void 0,this.scroller.removeEventListener("touchmove",this._onTouchMove,{passive:!0}),this.off("touchmove",this._onTouchMove),this._onTouchMove=void 0,this.scroller.removeEventListener("touchend",this._onTouchEnd,{passive:!0}),this.off("touchend",this._onTouchEnd),this._onTouchEnd=void 0,this.manager.off(s["c"].MANAGERS.ADDED,this._afterDisplayed),this._afterDisplayed=void 0}afterDisplayed(t){let e=t.contents;["touchstart","touchmove","touchend"].forEach(t=>{e.on(t,t=>this.triggerViewEvent(t,e))})}triggerViewEvent(t,e){this.emit(t.type,t,e)}onScroll(t){this.scrollLeft=this.fullsize?window.scrollX:this.scroller.scrollLeft,this.scrollTop=this.fullsize?window.scrollY:this.scroller.scrollTop}onResize(t){this.resizeCanceler=!0}onTouchStart(t){let{screenX:e,screenY:i}=t.touches[0];this.fullsize&&this.enableScroll(),this.touchCanceler=!0,this.startTouchX||(this.startTouchX=e,this.startTouchY=i,this.startTime=this.now()),this.endTouchX=e,this.endTouchY=i,this.endTime=this.now()}onTouchMove(t){let{screenX:e,screenY:i}=t.touches[0],n=Math.abs(i-this.endTouchY);this.touchCanceler=!0,!this.fullsize&&n<10&&(this.element.scrollLeft-=e-this.endTouchX),this.endTouchX=e,this.endTouchY=i,this.endTime=this.now()}onTouchEnd(t){this.fullsize&&this.disableScroll(),this.touchCanceler=!1;let e=this.wasSwiped();0!==e?this.snap(e):this.snap(),this.startTouchX=void 0,this.startTouchY=void 0,this.startTime=void 0,this.endTouchX=void 0,this.endTouchY=void 0,this.endTime=void 0}wasSwiped(){let t=this.layout.pageWidth*this.layout.divisor,e=this.endTouchX-this.startTouchX,i=Math.abs(e),n=this.endTime-this.startTime,r=e/n,s=this.settings.minVelocity;return i<=this.settings.minDistance||i>=t?0:r>s?-1:r<-s?1:void 0}needsSnap(){let t=this.scrollLeft,e=this.layout.pageWidth*this.layout.divisor;return t%e!==0}snap(t=0){let e=this.scrollLeft,i=this.layout.pageWidth*this.layout.divisor,n=Math.round(e/i)*i;return t&&(n+=t*i),this.smoothScrollTo(n)}smoothScrollTo(t){const e=new n["defer"],i=this.scrollLeft,r=this.now(),s=this.settings.duration,o=this.settings.easing;function a(){const n=this.now(),h=Math.min(1,(n-r)/s);o(h);if(this.touchCanceler||this.resizeCanceler)return this.resizeCanceler=!1,this.snapping=!1,void e.resolve();h<1?(window.requestAnimationFrame(a.bind(this)),this.scrollTo(i+(t-i)*h,0)):(this.scrollTo(t,0),this.snapping=!1,e.resolve())}return this.snapping=!0,a.call(this),e.promise}scrollTo(t=0,e=0){this.fullsize?window.scroll(t,e):(this.scroller.scrollLeft=t,this.scroller.scrollTop=e)}now(){return"now"in window.performance?performance.now():(new Date).getTime()}destroy(){this.scroller&&(this.fullsize&&this.enableScroll(),this.removeListeners(),this.scroller=void 0)}}a()(c.prototype);var u=c,d=i("b047"),f=i.n(d);class p extends r["a"]{constructor(t){super(t),this.name="continuous",this.settings=Object(n["extend"])(this.settings||{},{infinite:!0,overflow:void 0,axis:void 0,writingMode:void 0,flow:"scrolled",offset:500,offsetDelta:250,width:void 0,height:void 0,snap:!1,afterScrolledTimeout:10,allowScriptedContent:!1}),Object(n["extend"])(this.settings,t.settings||{}),"undefined"!=t.settings.gap&&0===t.settings.gap&&(this.settings.gap=t.settings.gap),this.viewSettings={ignoreClass:this.settings.ignoreClass,axis:this.settings.axis,flow:this.settings.flow,layout:this.layout,width:0,height:0,forceEvenPages:!1,allowScriptedContent:this.settings.allowScriptedContent},this.scrollTop=0,this.scrollLeft=0}display(t,e){return r["a"].prototype.display.call(this,t,e).then(function(){return this.fill()}.bind(this))}fill(t){var e=t||new n["defer"];return this.q.enqueue(()=>this.check()).then(t=>{t?this.fill(e):e.resolve()}),e.promise}moveTo(t){var e=0,i=0;this.isPaginated?(e=Math.floor(t.left/this.layout.delta)*this.layout.delta,this.settings.offsetDelta):(i=t.top,t.top,this.settings.offsetDelta),(e>0||i>0)&&this.scrollBy(e,i,!0)}afterResized(t){this.emit(s["c"].MANAGERS.RESIZE,t.section)}removeShownListeners(t){t.onDisplayed=function(){}}add(t){var e=this.createView(t);return this.views.append(e),e.on(s["c"].VIEWS.RESIZED,t=>{e.expanded=!0}),e.on(s["c"].VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(s["c"].VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),e.onDisplayed=this.afterDisplayed.bind(this),e.onResize=this.afterResized.bind(this),e.display(this.request)}append(t){var e=this.createView(t);return e.on(s["c"].VIEWS.RESIZED,t=>{e.expanded=!0}),e.on(s["c"].VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(s["c"].VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),this.views.append(e),e.onDisplayed=this.afterDisplayed.bind(this),e}prepend(t){var e=this.createView(t);return e.on(s["c"].VIEWS.RESIZED,t=>{this.counter(t),e.expanded=!0}),e.on(s["c"].VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(s["c"].VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),this.views.prepend(e),e.onDisplayed=this.afterDisplayed.bind(this),e}counter(t){"vertical"===this.settings.axis?this.scrollBy(0,t.heightDelta,!0):this.scrollBy(t.widthDelta,0,!0)}update(t){for(var e,i,r=this.bounds(),s=this.views.all(),o=s.length,a=[],h="undefined"!=typeof t?t:this.settings.offset||0,l=new n["defer"],c=[],u=0;u<o;u++)if(i=s[u],e=this.isVisible(i,h,h,r),!0===e){if(i.displayed)i.show();else{let t=i.display(this.request).then((function(t){t.show()}),t=>{i.hide()});c.push(t)}a.push(i)}else this.q.enqueue(i.destroy.bind(i)),clearTimeout(this.trimTimeout),this.trimTimeout=setTimeout(function(){this.q.enqueue(this.trim.bind(this))}.bind(this),250);return c.length?Promise.all(c).catch(t=>{l.reject(t)}):(l.resolve(),l.promise)}check(t,e){var i=new n["defer"],r=[],s="horizontal"===this.settings.axis,o=this.settings.offset||0;t&&s&&(o=t),e&&!s&&(o=e);var a=this._bounds;let h=s?this.scrollLeft:this.scrollTop,l=s?Math.floor(a.width):a.height,c=s?this.container.scrollWidth:this.container.scrollHeight,u=this.writingMode&&0===this.writingMode.indexOf("vertical")?"vertical":"horizontal",d=this.settings.rtlScrollType,f="rtl"===this.settings.direction;this.settings.fullsize?(s&&f&&"negative"===d||!s&&f&&"default"===d)&&(h*=-1):(f&&"default"===d&&"horizontal"===u&&(h=c-l-h),f&&"negative"===d&&"horizontal"===u&&(h*=-1));let p=()=>{let t=this.views.first(),e=t&&t.section.prev();e&&r.push(this.prepend(e))},m=()=>{let t=this.views.last(),e=t&&t.section.next();e&&r.push(this.append(e))},g=h+l+o,v=h-o;g>=c&&m(),v<0&&p();let w=r.map(t=>t.display(this.request));return r.length?Promise.all(w).then(()=>this.check()).then(()=>this.update(o),t=>t):(this.q.enqueue(function(){this.update()}.bind(this)),i.resolve(!1),i.promise)}trim(){for(var t=new n["defer"],e=this.views.displayed(),i=e[0],r=e[e.length-1],s=this.views.indexOf(i),o=this.views.indexOf(r),a=this.views.slice(0,s),h=this.views.slice(o+1),l=0;l<a.length-1;l++)this.erase(a[l],a);for(var c=1;c<h.length;c++)this.erase(h[c]);return t.resolve(),t.promise}erase(t,e){var i,n;this.settings.fullsize?(i=window.scrollY,n=window.scrollX):(i=this.container.scrollTop,n=this.container.scrollLeft);var r=t.bounds();this.views.remove(t),e&&("vertical"===this.settings.axis?this.scrollTo(0,i-r.height,!0):"rtl"===this.settings.direction?this.settings.fullsize?this.scrollTo(n+Math.floor(r.width),0,!0):this.scrollTo(n,0,!0):this.scrollTo(n-Math.floor(r.width),0,!0))}addEventListeners(t){window.addEventListener("unload",function(t){this.ignore=!0,this.destroy()}.bind(this)),this.addScrollListeners(),this.isPaginated&&this.settings.snap&&(this.snapper=new u(this,this.settings.snap&&"object"===typeof this.settings.snap&&this.settings.snap))}addScrollListeners(){var t;this.tick=n["requestAnimationFrame"];let e="rtl"===this.settings.direction&&"default"===this.settings.rtlScrollType?-1:1;this.scrollDeltaVert=0,this.scrollDeltaHorz=0,this.settings.fullsize?(t=window,this.scrollTop=window.scrollY*e,this.scrollLeft=window.scrollX*e):(t=this.container,this.scrollTop=this.container.scrollTop,this.scrollLeft=this.container.scrollLeft),this._onScroll=this.onScroll.bind(this),t.addEventListener("scroll",this._onScroll),this._scrolled=f()(this.scrolled.bind(this),30),this.didScroll=!1}removeEventListeners(){var t;t=this.settings.fullsize?window:this.container,t.removeEventListener("scroll",this._onScroll),this._onScroll=void 0}onScroll(){let t,e,i="rtl"===this.settings.direction&&"default"===this.settings.rtlScrollType?-1:1;this.settings.fullsize?(t=window.scrollY*i,e=window.scrollX*i):(t=this.container.scrollTop,e=this.container.scrollLeft),this.scrollTop=t,this.scrollLeft=e,this.ignore?this.ignore=!1:this._scrolled(),this.scrollDeltaVert+=Math.abs(t-this.prevScrollTop),this.scrollDeltaHorz+=Math.abs(e-this.prevScrollLeft),this.prevScrollTop=t,this.prevScrollLeft=e,clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(function(){this.scrollDeltaVert=0,this.scrollDeltaHorz=0}.bind(this),150),clearTimeout(this.afterScrolled),this.didScroll=!1}scrolled(){this.q.enqueue(function(){return this.check()}.bind(this)),this.emit(s["c"].MANAGERS.SCROLL,{top:this.scrollTop,left:this.scrollLeft}),clearTimeout(this.afterScrolled),this.afterScrolled=setTimeout(function(){this.snapper&&this.snapper.supportsTouch&&this.snapper.needsSnap()||this.emit(s["c"].MANAGERS.SCROLLED,{top:this.scrollTop,left:this.scrollLeft})}.bind(this),this.settings.afterScrolledTimeout)}next(){let t="pre-paginated"===this.layout.props.name&&this.layout.props.spread?2*this.layout.props.delta:this.layout.props.delta;this.views.length&&(this.isPaginated&&"horizontal"===this.settings.axis?this.scrollBy(t,0,!0):this.scrollBy(0,this.layout.height,!0),this.q.enqueue(function(){return this.check()}.bind(this)))}prev(){let t="pre-paginated"===this.layout.props.name&&this.layout.props.spread?2*this.layout.props.delta:this.layout.props.delta;this.views.length&&(this.isPaginated&&"horizontal"===this.settings.axis?this.scrollBy(-t,0,!0):this.scrollBy(0,-this.layout.height,!0),this.q.enqueue(function(){return this.check()}.bind(this)))}updateFlow(t){this.rendered&&this.snapper&&(this.snapper.destroy(),this.snapper=void 0),super.updateFlow(t,"scroll"),this.rendered&&this.isPaginated&&this.settings.snap&&(this.snapper=new u(this,this.settings.snap&&"object"===typeof this.settings.snap&&this.settings.snap))}destroy(){super.destroy(),this.snapper&&this.snapper.destroy()}}e["a"]=p},"8d74":function(t,e,i){var n=i("4cef"),r=/^\s+/;function s(t){return t?t.slice(0,n(t)+1).replace(r,""):t}t.exports=s},"8f7b":function(t,e){var i=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,n=new RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),r=new RegExp("^"+i.source+n.source+"*(?::"+i.source+n.source+"*)?$"),s=0,o=1,a=2,h=3,l=4,c=5,u=6,d=7;function f(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,f)}function p(){}function m(t,e,i,n,r){function s(t){if(t>65535){t-=65536;var e=55296+(t>>10),i=56320+(1023&t);return String.fromCharCode(e,i)}return String.fromCharCode(t)}function o(t){var e=t.slice(1,-1);return e in i?i[e]:"#"===e.charAt(0)?s(parseInt(e.substr(1).replace("x","0x"))):(r.error("entity not found:"+t),t)}function a(e){if(e>_){var i=t.substring(_,e).replace(/&#?\w+;/g,o);d&&h(_),n.characters(i,0,e-_),_=e}}function h(e,i){while(e>=c&&(i=u.exec(t)))l=i.index,c=l+i[0].length,d.lineNumber++;d.columnNumber=e-l+1}var l=0,c=0,u=/.*(?:\r\n?|\n)|.*$/g,d=n.locator,p=[{currentNSMap:e}],m={},_=0;while(1){try{var S=t.indexOf("<",_);if(S<0){if(!t.substr(_).match(/^\s*$/)){var C=n.doc,T=C.createTextNode(t.substr(_));C.appendChild(T),n.currentElement=T}return}switch(S>_&&a(S),t.charAt(S+1)){case"/":var O=t.indexOf(">",S+3),A=t.substring(S+2,O),N=p.pop();O<0?(A=t.substring(S+2).replace(/[\s<].*/,""),r.error("end tag name: "+A+" is not complete:"+N.tagName),O=S+1+A.length):A.match(/\s</)&&(A=A.replace(/[\s<].*/,""),r.error("end tag name: "+A+" maybe not complete"),O=S+1+A.length);var R=N.localNSMap,I=N.tagName==A,L=I||N.tagName&&N.tagName.toLowerCase()==A.toLowerCase();if(L){if(n.endElement(N.uri,N.localName,A),R)for(var z in R)n.endPrefixMapping(z);I||r.fatalError("end tag name: "+A+" is not match the current start tagName:"+N.tagName)}else p.push(N);O++;break;case"?":d&&h(S),O=E(t,S,n);break;case"!":d&&h(S),O=x(t,S,n,r);break;default:d&&h(S);var D=new k,P=p[p.length-1].currentNSMap,B=(O=v(t,S,D,P,o,r),D.length);if(!D.closed&&b(t,O,D.tagName,m)&&(D.closed=!0,i.nbsp||r.warning("unclosed xml attribute")),d&&B){for(var j=g(d,{}),U=0;U<B;U++){var M=D[U];h(M.offset),M.locator=g(d,{})}n.locator=j,w(D,n,P)&&p.push(D),n.locator=d}else w(D,n,P)&&p.push(D);"http://www.w3.org/1999/xhtml"!==D.uri||D.closed?O++:O=y(t,O,D.tagName,o,n)}}catch(F){if(F instanceof f)throw F;r.error("element parse error: "+F),O=-1}O>_?_=O:a(Math.max(S,_)+1)}}function g(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function v(t,e,i,n,r,f){function p(t,e,n){t in i.attributeNames&&f.fatalError("Attribute "+t+" redefined"),i.addValue(t,e,n)}var m,g=++e,v=s;while(1){var w=t.charAt(g);switch(w){case"=":if(v===o)m=t.slice(e,g),v=h;else{if(v!==a)throw new Error("attribute equal must after attrName");v=h}break;case"'":case'"':if(v===h||v===o){if(v===o&&(f.warning('attribute value must after "="'),m=t.slice(e,g)),e=g+1,g=t.indexOf(w,e),!(g>0))throw new Error("attribute value no end '"+w+"' match");y=t.slice(e,g).replace(/&#?\w+;/g,r),p(m,y,e-1),v=c}else{if(v!=l)throw new Error('attribute value must after "="');y=t.slice(e,g).replace(/&#?\w+;/g,r),p(m,y,e),f.warning('attribute "'+m+'" missed start quot('+w+")!!"),e=g+1,v=c}break;case"/":switch(v){case s:i.setTagName(t.slice(e,g));case c:case u:case d:v=d,i.closed=!0;case l:case o:case a:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return f.error("unexpected end of input"),v==s&&i.setTagName(t.slice(e,g)),g;case">":switch(v){case s:i.setTagName(t.slice(e,g));case c:case u:case d:break;case l:case o:y=t.slice(e,g),"/"===y.slice(-1)&&(i.closed=!0,y=y.slice(0,-1));case a:v===a&&(y=m),v==l?(f.warning('attribute "'+y+'" missed quot(")!'),p(m,y.replace(/&#?\w+;/g,r),e)):("http://www.w3.org/1999/xhtml"===n[""]&&y.match(/^(?:disabled|checked|selected)$/i)||f.warning('attribute "'+y+'" missed value!! "'+y+'" instead!!'),p(y,y,e));break;case h:throw new Error("attribute value missed!!")}return g;case"":w=" ";default:if(w<=" ")switch(v){case s:i.setTagName(t.slice(e,g)),v=u;break;case o:m=t.slice(e,g),v=a;break;case l:var y=t.slice(e,g).replace(/&#?\w+;/g,r);f.warning('attribute "'+y+'" missed quot(")!!'),p(m,y,e);case c:v=u;break}else switch(v){case a:i.tagName;"http://www.w3.org/1999/xhtml"===n[""]&&m.match(/^(?:disabled|checked|selected)$/i)||f.warning('attribute "'+m+'" missed value!! "'+m+'" instead2!!'),p(m,m,e),e=g,v=o;break;case c:f.warning('attribute space is required"'+m+'"!!');case u:v=o,e=g;break;case h:v=l,e=g;break;case d:throw new Error("elements closed character '/' and '>' must be connected to")}}g++}}function w(t,e,i){var n=t.tagName,r=null,s=t.length;while(s--){var o=t[s],a=o.qName,h=o.value,l=a.indexOf(":");if(l>0)var c=o.prefix=a.slice(0,l),u=a.slice(l+1),d="xmlns"===c&&u;else u=a,c=null,d="xmlns"===a&&"";o.localName=u,!1!==d&&(null==r&&(r={},_(i,i={})),i[d]=r[d]=h,o.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(d,h))}s=t.length;while(s--){o=t[s];c=o.prefix;c&&("xml"===c&&(o.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(o.uri=i[c||""]))}l=n.indexOf(":");l>0?(c=t.prefix=n.slice(0,l),u=t.localName=n.slice(l+1)):(c=null,u=t.localName=n);var f=t.uri=i[c||""];if(e.startElement(f,u,n,t),!t.closed)return t.currentNSMap=i,t.localNSMap=r,!0;if(e.endElement(f,u,n),r)for(c in r)e.endPrefixMapping(c)}function y(t,e,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var s=t.indexOf("</"+i+">",e),o=t.substring(e+1,s);if(/[&<]/.test(o))return/^script$/i.test(i)?(r.characters(o,0,o.length),s):(o=o.replace(/&#?\w+;/g,n),r.characters(o,0,o.length),s)}return e+1}function b(t,e,i,n){var r=n[i];return null==r&&(r=t.lastIndexOf("</"+i+">"),r<e&&(r=t.lastIndexOf("</"+i)),n[i]=r),r<e}function _(t,e){for(var i in t)e[i]=t[i]}function x(t,e,i,n){var r=t.charAt(e+2);switch(r){case"-":if("-"===t.charAt(e+3)){var s=t.indexOf("--\x3e",e+4);return s>e?(i.comment(t,e+4,s-e-4),s+3):(n.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==t.substr(e+3,6)){s=t.indexOf("]]>",e+9);return i.startCDATA(),i.characters(t,e+9,s-e-9),i.endCDATA(),s+3}var o=S(t,e),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var h=o[1][0],l=!1,c=!1;a>3&&(/^public$/i.test(o[2][0])?(l=o[3][0],c=a>4&&o[4][0]):/^system$/i.test(o[2][0])&&(c=o[3][0]));var u=o[a-1];return i.startDTD(h,l,c),i.endDTD(),u.index+u[0].length}}return-1}function E(t,e,i){var n=t.indexOf("?>",e);if(n){var r=t.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return i.processingInstruction(r[1],r[2]),n+2}return-1}return-1}function k(){this.attributeNames={}}function S(t,e){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=e,r.exec(t);while(i=r.exec(t))if(n.push(i),i[1])return n}f.prototype=new Error,f.prototype.name=f.name,p.prototype={parse:function(t,e,i){var n=this.domBuilder;n.startDocument(),_(e,e={}),m(t,e,i,n,this.errorHandler),n.endDocument()}},k.prototype={setTagName:function(t){if(!r.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,i){if(!r.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:i}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},e.XMLReader=p,e.ParseError=f},"8f8f":function(t,e,i){"use strict";var n=i("0b16");const r=1,s=3,o=9;class a{constructor(t,e,i){var r;if(this.str="",this.base={},this.spinePos=0,this.range=!1,this.path={},this.start=null,this.end=null,!(this instanceof a))return new a(t,e,i);if("string"===typeof e?this.base=this.parseComponent(e):"object"===typeof e&&e.steps&&(this.base=e),r=this.checkType(t),"string"===r)return this.str=t,Object(n["extend"])(this,this.parse(t));if("range"===r)return Object(n["extend"])(this,this.fromRange(t,this.base,i));if("node"===r)return Object(n["extend"])(this,this.fromNode(t,this.base,i));if("EpubCFI"===r&&t.path)return t;if(t)throw new TypeError("not a valid argument for EpubCFI");return this}checkType(t){return this.isCfiString(t)?"string":!t||"object"!==typeof t||"Range"!==Object(n["type"])(t)&&"undefined"==typeof t.startContainer?t&&"object"===typeof t&&"undefined"!=typeof t.nodeType?"node":!!(t&&"object"===typeof t&&t instanceof a)&&"EpubCFI":"range"}parse(t){var e,i,n,r={spinePos:-1,range:!1,base:{},path:{},start:null,end:null};return"string"!==typeof t?{spinePos:-1}:(0===t.indexOf("epubcfi(")&&")"===t[t.length-1]&&(t=t.slice(8,t.length-1)),e=this.getChapterComponent(t),e?(r.base=this.parseComponent(e),i=this.getPathComponent(t),r.path=this.parseComponent(i),n=this.getRange(t),n&&(r.range=!0,r.start=this.parseComponent(n[0]),r.end=this.parseComponent(n[1])),r.spinePos=r.base.steps[1].index,r):{spinePos:-1})}parseComponent(t){var e,i={steps:[],terminal:{offset:null,assertion:null}},n=t.split(":"),r=n[0].split("/");return n.length>1&&(e=n[1],i.terminal=this.parseTerminal(e)),""===r[0]&&r.shift(),i.steps=r.map(function(t){return this.parseStep(t)}.bind(this)),i}parseStep(t){var e,i,n,r,s;if(r=t.match(/\[(.*)\]/),r&&r[1]&&(s=r[1]),i=parseInt(t),!isNaN(i))return i%2===0?(e="element",n=i/2-1):(e="text",n=(i-1)/2),{type:e,index:n,id:s||null}}parseTerminal(t){var e,i,r=t.match(/\[(.*)\]/);return r&&r[1]?(e=parseInt(t.split("[")[0]),i=r[1]):e=parseInt(t),Object(n["isNumber"])(e)||(e=null),{offset:e,assertion:i}}getChapterComponent(t){var e=t.split("!");return e[0]}getPathComponent(t){var e=t.split("!");if(e[1]){let t=e[1].split(",");return t[0]}}getRange(t){var e=t.split(",");return 3===e.length&&[e[1],e[2]]}getCharecterOffsetComponent(t){var e=t.split(":");return e[1]||""}joinSteps(t){return t?t.map((function(t){var e="";return"element"===t.type&&(e+=2*(t.index+1)),"text"===t.type&&(e+=1+2*t.index),t.id&&(e+="["+t.id+"]"),e})).join("/"):""}segmentString(t){var e="/";return e+=this.joinSteps(t.steps),t.terminal&&null!=t.terminal.offset&&(e+=":"+t.terminal.offset),t.terminal&&null!=t.terminal.assertion&&(e+="["+t.terminal.assertion+"]"),e}toString(){var t="epubcfi(";return t+=this.segmentString(this.base),t+="!",t+=this.segmentString(this.path),this.range&&this.start&&(t+=",",t+=this.segmentString(this.start)),this.range&&this.end&&(t+=",",t+=this.segmentString(this.end)),t+=")",t}compare(t,e){var i,n,r,s;if("string"===typeof t&&(t=new a(t)),"string"===typeof e&&(e=new a(e)),t.spinePos>e.spinePos)return 1;if(t.spinePos<e.spinePos)return-1;t.range?(i=t.path.steps.concat(t.start.steps),r=t.start.terminal):(i=t.path.steps,r=t.path.terminal),e.range?(n=e.path.steps.concat(e.start.steps),s=e.start.terminal):(n=e.path.steps,s=e.path.terminal);for(var o=0;o<i.length;o++){if(!i[o])return-1;if(!n[o])return 1;if(i[o].index>n[o].index)return 1;if(i[o].index<n[o].index)return-1}return i.length<n.length?-1:r.offset>s.offset?1:r.offset<s.offset?-1:0}step(t){var e=t.nodeType===s?"text":"element";return{id:t.id,tagName:t.tagName,type:e,index:this.position(t)}}filteredStep(t,e){var i,n=this.filter(t,e);if(n)return i=n.nodeType===s?"text":"element",{id:n.id,tagName:n.tagName,type:i,index:this.filteredPosition(n,e)}}pathTo(t,e,i){var n,r={steps:[],terminal:{offset:null,assertion:null}},s=t;while(s&&s.parentNode&&s.parentNode.nodeType!=o)n=i?this.filteredStep(s,i):this.step(s),n&&r.steps.unshift(n),s=s.parentNode;return null!=e&&e>=0&&(r.terminal.offset=e,"text"!=r.steps[r.steps.length-1].type&&r.steps.push({type:"text",index:0})),r}equalStep(t,e){return!(!t||!e)&&(t.index===e.index&&t.id===e.id&&t.type===e.type)}fromRange(t,e,i){var n={range:!1,base:{},path:{},start:null,end:null},r=t.startContainer,s=t.endContainer,o=t.startOffset,a=t.endOffset,h=!1;if(i&&(h=null!=r.ownerDocument.querySelector("."+i)),"string"===typeof e?(n.base=this.parseComponent(e),n.spinePos=n.base.steps[1].index):"object"===typeof e&&(n.base=e),t.collapsed)h&&(o=this.patchOffset(r,o,i)),n.path=this.pathTo(r,o,i);else{n.range=!0,h&&(o=this.patchOffset(r,o,i)),n.start=this.pathTo(r,o,i),h&&(a=this.patchOffset(s,a,i)),n.end=this.pathTo(s,a,i),n.path={steps:[],terminal:null};var l,c=n.start.steps.length;for(l=0;l<c;l++){if(!this.equalStep(n.start.steps[l],n.end.steps[l]))break;l===c-1?n.start.terminal===n.end.terminal&&(n.path.steps.push(n.start.steps[l]),n.range=!1):n.path.steps.push(n.start.steps[l])}n.start.steps=n.start.steps.slice(n.path.steps.length),n.end.steps=n.end.steps.slice(n.path.steps.length)}return n}fromNode(t,e,i){var n={range:!1,base:{},path:{},start:null,end:null};return"string"===typeof e?(n.base=this.parseComponent(e),n.spinePos=n.base.steps[1].index):"object"===typeof e&&(n.base=e),n.path=this.pathTo(t,null,i),n}filter(t,e){var i,n,r,o,a,h=!1;return t.nodeType===s?(h=!0,r=t.parentNode,i=t.parentNode.classList.contains(e)):(h=!1,i=t.classList.contains(e)),i&&h?(o=r.previousSibling,a=r.nextSibling,o&&o.nodeType===s?n=o:a&&a.nodeType===s&&(n=a),n||t):!(i&&!h)&&t}patchOffset(t,e,i){if(t.nodeType!=s)throw new Error("Anchor must be a text node");var n=t,o=e;t.parentNode.classList.contains(i)&&(n=t.parentNode);while(n.previousSibling){if(n.previousSibling.nodeType===r){if(!n.previousSibling.classList.contains(i))break;o+=n.previousSibling.textContent.length}else o+=n.previousSibling.textContent.length;n=n.previousSibling}return o}normalizedMap(t,e,i){var n,o,a,h={},l=-1,c=t.length;for(n=0;n<c;n++)o=t[n].nodeType,o===r&&t[n].classList.contains(i)&&(o=s),n>0&&o===s&&a===s?h[n]=l:e===o&&(l+=1,h[n]=l),a=o;return h}position(t){var e,i;return t.nodeType===r?(e=t.parentNode.children,e||(e=Object(n["findChildren"])(t.parentNode)),i=Array.prototype.indexOf.call(e,t)):(e=this.textNodes(t.parentNode),i=e.indexOf(t)),i}filteredPosition(t,e){var i,n,o;return t.nodeType===r?(i=t.parentNode.children,o=this.normalizedMap(i,r,e)):(i=t.parentNode.childNodes,t.parentNode.classList.contains(e)&&(t=t.parentNode,i=t.parentNode.childNodes),o=this.normalizedMap(i,s,e)),n=Array.prototype.indexOf.call(i,t),o[n]}stepsToXpath(t){var e=[".","*"];return t.forEach((function(t){var i=t.index+1;t.id?e.push("*[position()="+i+" and @id='"+t.id+"']"):"text"===t.type?e.push("text()["+i+"]"):e.push("*["+i+"]")})),e.join("/")}stepsToQuerySelector(t){var e=["html"];return t.forEach((function(t){var i=t.index+1;t.id?e.push("#"+t.id):"text"===t.type||e.push("*:nth-child("+i+")")})),e.join(">")}textNodes(t,e){return Array.prototype.slice.call(t.childNodes).filter((function(t){return t.nodeType===s||!(!e||!t.classList.contains(e))}))}walkToNode(t,e,i){var r,s,o,a=e||document,h=a.documentElement,l=t.length;for(o=0;o<l;o++)if(s=t[o],"element"===s.type?s.id?h=a.getElementById(s.id):(r=h.children||Object(n["findChildren"])(h),h=r[s.index]):"text"===s.type&&(h=this.textNodes(h,i)[s.index]),!h)break;return h}findNode(t,e,i){var n,r,s=e||document;return i||"undefined"==typeof s.evaluate?n=i?this.walkToNode(t,s,i):this.walkToNode(t,s):(r=this.stepsToXpath(t),n=s.evaluate(r,s,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue),n}fixMiss(t,e,i,n){var o,a,h=this.findNode(t.slice(0,-1),i,n),l=h.childNodes,c=this.normalizedMap(l,s,n),u=t[t.length-1].index;for(let s in c){if(!c.hasOwnProperty(s))return;if(c[s]===u){if(o=l[s],a=o.textContent.length,!(e>a)){h=o.nodeType===r?o.childNodes[0]:o;break}e-=a}}return{container:h,offset:e}}toRange(t,e){var i,r,s,o,a,h,l,c,u=t||document,d=this,f=!!e&&null!=u.querySelector("."+e);if(i="undefined"!==typeof u.createRange?u.createRange():new n["RangeObject"],d.range?(r=d.start,h=d.path.steps.concat(r.steps),o=this.findNode(h,u,f?e:null),s=d.end,l=d.path.steps.concat(s.steps),a=this.findNode(l,u,f?e:null)):(r=d.path,h=d.path.steps,o=this.findNode(d.path.steps,u,f?e:null)),!o)return console.log("No startContainer found for",this.toString()),null;try{null!=r.terminal.offset?i.setStart(o,r.terminal.offset):i.setStart(o,0)}catch(p){c=this.fixMiss(h,r.terminal.offset,u,f?e:null),i.setStart(c.container,c.offset)}if(a)try{null!=s.terminal.offset?i.setEnd(a,s.terminal.offset):i.setEnd(a,0)}catch(p){c=this.fixMiss(l,d.end.terminal.offset,u,f?e:null),i.setEnd(c.container,c.offset)}return i}isCfiString(t){return"string"===typeof t&&0===t.indexOf("epubcfi(")&&")"===t[t.length-1]}generateChapterComponent(t,e,i){var n=parseInt(e),r=2*(t+1),s="/"+r+"/";return s+=2*(n+1),i&&(s+="["+i+"]"),s}collapse(t){this.range&&(this.range=!1,t?(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))}}e["a"]=a},9013:function(t,e,i){"use strict";var n=i("5edd");t.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}},9152:function(t,e){
|
||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
e.read=function(t,e,i,n,r){var s,o,a=8*r-n-1,h=(1<<a)-1,l=h>>1,c=-7,u=i?r-1:0,d=i?-1:1,f=t[e+u];for(u+=d,s=f&(1<<-c)-1,f>>=-c,c+=a;c>0;s=256*s+t[e+u],u+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+t[e+u],u+=d,c-=8);if(0===s)s=1-l;else{if(s===h)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),s-=l}return(f?-1:1)*o*Math.pow(2,s-n)},e.write=function(t,e,i,n,r,s){var o,a,h,l=8*s-r-1,c=(1<<l)-1,u=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-o))<1&&(o--,h*=2),e+=o+u>=1?d/h:d*Math.pow(2,1-u),e*h>=2&&(o++,h/=2),o+u>=c?(a=0,o=c):o+u>=1?(a=(e*h-1)*Math.pow(2,r),o+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,r),o=0));r>=8;t[i+f]=255&a,f+=p,a/=256,r-=8);for(o=o<<r|a,l+=r;l>0;t[i+f]=255&o,f+=p,o/=256,l-=8);t[i+f-p]|=128*m}},"936a":function(t,e,i){"use strict";var n=void 0;t.exports=function(t){return t!==n&&null!==t}},9650:function(t,e,i){"use strict";var n=i("0b16");class r{constructor(t){this._q=[],this.context=t,this.tick=n["requestAnimationFrame"],this.running=!1,this.paused=!1}enqueue(){var t,e,i,r=[].shift.call(arguments),s=arguments;if(!r)throw new Error("No Task Provided");return"function"===typeof r?(t=new n["defer"],e=t.promise,i={task:r,args:s,deferred:t,promise:e}):i={promise:r},this._q.push(i),0!=this.paused||this.running||this.run(),i.promise}dequeue(){var t,e,i;return!this._q.length||this.paused?(t=new n["defer"],t.deferred.resolve(),t.promise):(t=this._q.shift(),e=t.task,e?(i=e.apply(this.context,t.args),i&&"function"===typeof i["then"]?i.then(function(){t.deferred.resolve.apply(this.context,arguments)}.bind(this),function(){t.deferred.reject.apply(this.context,arguments)}.bind(this)):(t.deferred.resolve.apply(this.context,i),t.promise)):t.promise?t.promise:void 0)}dump(){while(this._q.length)this.dequeue()}run(){return this.running||(this.running=!0,this.defered=new n["defer"]),this.tick.call(window,()=>{this._q.length?this.dequeue().then(function(){this.run()}.bind(this)):(this.defered.resolve(),this.running=void 0)}),1==this.paused&&(this.paused=!1),this.defered.promise}flush(){return this.running?this.running:this._q.length?(this.running=this.dequeue().then(function(){return this.running=void 0,this.flush()}.bind(this)),this.running):void 0}clear(){this._q=[]}length(){return this._q.length}pause(){this.paused=!0}stop(){this._q=[],this.running=!1,this.paused=!0}}e["a"]=r},"96ae":function(t,e,i){"use strict";var n=i("62c4");t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},"99c9":function(t,e,i){"use strict";var n=i("c9fc"),r=i.n(n),s=i("0b16"),o=i("4923"),a=i("8f8f"),h=i("9650"),l=i("8a9e"),c=i("12c2");class u{constructor(t){this.rendition=t,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(0!==arguments.length)return 1===arguments.length&&"object"===typeof arguments[0]?this.registerThemes(arguments[0]):1===arguments.length&&"string"===typeof arguments[0]?this.default(arguments[0]):2===arguments.length&&"string"===typeof arguments[1]?this.registerUrl(arguments[0],arguments[1]):2===arguments.length&&"object"===typeof arguments[1]?this.registerRules(arguments[0],arguments[1]):void 0}default(t){if(t)return"string"===typeof t?this.registerUrl("default",t):"object"===typeof t?this.registerRules("default",t):void 0}registerThemes(t){for(var e in t)t.hasOwnProperty(e)&&("string"===typeof t[e]?this.registerUrl(e,t[e]):this.registerRules(e,t[e]))}registerCss(t,e){this._themes[t]={serialized:e},(this._injected[t]||"default"==t)&&this.update(t)}registerUrl(t,e){var i=new c["a"](e);this._themes[t]={url:i.toString()},(this._injected[t]||"default"==t)&&this.update(t)}registerRules(t,e){this._themes[t]={rules:e},(this._injected[t]||"default"==t)&&this.update(t)}select(t){var e,i=this._current;this._current=t,this.update(t),e=this.rendition.getContents(),e.forEach(e=>{e.removeClass(i),e.addClass(t)})}update(t){var e=this.rendition.getContents();e.forEach(e=>{this.add(t,e)})}inject(t){var e,i=[],n=this._themes;for(var r in n)!n.hasOwnProperty(r)||r!==this._current&&"default"!==r||(e=n[r],(e.rules&&Object.keys(e.rules).length>0||e.url&&-1===i.indexOf(e.url))&&this.add(r,t),this._injected.push(r));"default"!=this._current&&t.addClass(this._current)}add(t,e){var i=this._themes[t];i&&e&&(i.url?e.addStylesheet(i.url):i.serialized?(e.addStylesheetCss(i.serialized,t),i.injected=!0):i.rules&&(e.addStylesheetRules(i.rules,t),i.injected=!0))}override(t,e,i){var n=this.rendition.getContents();this._overrides[t]={value:e,priority:!0===i},n.forEach(e=>{e.css(t,this._overrides[t].value,this._overrides[t].priority)})}removeOverride(t){var e=this.rendition.getContents();delete this._overrides[t],e.forEach(e=>{e.css(t)})}overrides(t){var e=this._overrides;for(var i in e)e.hasOwnProperty(i)&&t.css(i,e[i].value,e[i].priority)}fontSize(t){this.override("font-size",t)}font(t){this.override("font-family",t,!0)}destroy(){this.rendition=void 0,this._themes=void 0,this._overrides=void 0,this._current=void 0,this._injected=void 0}}var d=u,f=(i("55d4"),i("06d2"));class p{constructor(t){this.rendition=t,this.highlights=[],this.underlines=[],this.marks=[],this._annotations={},this._annotationsBySectionIndex={},this.rendition.hooks.render.register(this.inject.bind(this)),this.rendition.hooks.unloaded.register(this.clear.bind(this))}add(t,e,i,n,r,s){let o=encodeURI(e+t),h=new a["a"](e),l=h.spinePos,c=new m({type:t,cfiRange:e,data:i,sectionIndex:l,cb:n,className:r,styles:s});this._annotations[o]=c,l in this._annotationsBySectionIndex?this._annotationsBySectionIndex[l].push(o):this._annotationsBySectionIndex[l]=[o];let u=this.rendition.views();return u.forEach(t=>{c.sectionIndex===t.index&&c.attach(t)}),c}remove(t,e){let i=encodeURI(t+e);if(i in this._annotations){let t=this._annotations[i];if(e&&t.type!==e)return;let n=this.rendition.views();n.forEach(e=>{this._removeFromAnnotationBySectionIndex(t.sectionIndex,i),t.sectionIndex===e.index&&t.detach(e)}),delete this._annotations[i]}}_removeFromAnnotationBySectionIndex(t,e){this._annotationsBySectionIndex[t]=this._annotationsAt(t).filter(t=>t!==e)}_annotationsAt(t){return this._annotationsBySectionIndex[t]}highlight(t,e,i,n,r){return this.add("highlight",t,e,i,n,r)}underline(t,e,i,n,r){return this.add("underline",t,e,i,n,r)}mark(t,e,i){return this.add("mark",t,e,i)}each(){return this._annotations.forEach.apply(this._annotations,arguments)}inject(t){let e=t.index;if(e in this._annotationsBySectionIndex){let i=this._annotationsBySectionIndex[e];i.forEach(e=>{let i=this._annotations[e];i.attach(t)})}}clear(t){let e=t.index;if(e in this._annotationsBySectionIndex){let i=this._annotationsBySectionIndex[e];i.forEach(e=>{let i=this._annotations[e];i.detach(t)})}}show(){}hide(){}}class m{constructor({type:t,cfiRange:e,data:i,sectionIndex:n,cb:r,className:s,styles:o}){this.type=t,this.cfiRange=e,this.data=i,this.sectionIndex=n,this.mark=void 0,this.cb=r,this.className=s,this.styles=o}update(t){this.data=t}attach(t){let e,{cfiRange:i,data:n,type:r,mark:s,cb:o,className:a,styles:h}=this;return"highlight"===r?e=t.highlight(i,n,o,a,h):"underline"===r?e=t.underline(i,n,o,a,h):"mark"===r&&(e=t.mark(i,n,o)),this.mark=e,this.emit(f["c"].ANNOTATION.ATTACH,e),e}detach(t){let e,{cfiRange:i,type:n}=this;return t&&("highlight"===n?e=t.unhighlight(i):"underline"===n?e=t.ununderline(i):"mark"===n&&(e=t.unmark(i))),this.mark=void 0,this.emit(f["c"].ANNOTATION.DETACH,e),e}text(){}}r()(m.prototype);var g=p,v=i("ddea"),w=i("e58e"),y=i("8b5a");class b{constructor(t,e){this.settings=Object(s["extend"])(this.settings||{},{width:null,height:null,ignoreClass:"",manager:"default",view:"iframe",flow:null,layout:null,spread:null,minSpreadWidth:800,stylesheet:null,resizeOnOrientationChange:!0,script:null,snap:!1,defaultDirection:"ltr",allowScriptedContent:!1}),Object(s["extend"])(this.settings,e),"object"===typeof this.settings.manager&&(this.manager=this.settings.manager),this.book=t,this.hooks={},this.hooks.display=new o["a"](this),this.hooks.serialize=new o["a"](this),this.hooks.content=new o["a"](this),this.hooks.unloaded=new o["a"](this),this.hooks.layout=new o["a"](this),this.hooks.render=new o["a"](this),this.hooks.show=new o["a"](this),this.hooks.content.register(this.handleLinks.bind(this)),this.hooks.content.register(this.passEvents.bind(this)),this.hooks.content.register(this.adjustImages.bind(this)),this.book.spine.hooks.content.register(this.injectIdentifier.bind(this)),this.settings.stylesheet&&this.book.spine.hooks.content.register(this.injectStylesheet.bind(this)),this.settings.script&&this.book.spine.hooks.content.register(this.injectScript.bind(this)),this.themes=new d(this),this.annotations=new g(this),this.epubcfi=new a["a"],this.q=new h["a"](this),this.location=void 0,this.q.enqueue(this.book.opened),this.starting=new s["defer"],this.started=this.starting.promise,this.q.enqueue(this.start)}setManager(t){this.manager=t}requireManager(t){var e;return e="string"===typeof t&&"default"===t?w["a"]:"string"===typeof t&&"continuous"===t?y["a"]:t,e}requireView(t){var e;return e="string"==typeof t&&"iframe"===t?v["a"]:t,e}start(){switch(this.settings.layout||"pre-paginated"!==this.book.package.metadata.layout&&"true"!==this.book.displayOptions.fixedLayout||(this.settings.layout="pre-paginated"),this.book.package.metadata.spread){case"none":this.settings.spread="none";break;case"both":this.settings.spread=!0;break}this.manager||(this.ViewManager=this.requireManager(this.settings.manager),this.View=this.requireView(this.settings.view),this.manager=new this.ViewManager({view:this.View,queue:this.q,request:this.book.load.bind(this.book),settings:this.settings})),this.direction(this.book.package.metadata.direction||this.settings.defaultDirection),this.settings.globalLayoutProperties=this.determineLayoutProperties(this.book.package.metadata),this.flow(this.settings.globalLayoutProperties.flow),this.layout(this.settings.globalLayoutProperties),this.manager.on(f["c"].MANAGERS.ADDED,this.afterDisplayed.bind(this)),this.manager.on(f["c"].MANAGERS.REMOVED,this.afterRemoved.bind(this)),this.manager.on(f["c"].MANAGERS.RESIZED,this.onResized.bind(this)),this.manager.on(f["c"].MANAGERS.ORIENTATION_CHANGE,this.onOrientationChange.bind(this)),this.manager.on(f["c"].MANAGERS.SCROLLED,this.reportLocation.bind(this)),this.emit(f["c"].RENDITION.STARTED),this.starting.resolve()}attachTo(t){return this.q.enqueue(function(){this.manager.render(t,{width:this.settings.width,height:this.settings.height}),this.emit(f["c"].RENDITION.ATTACHED)}.bind(this))}display(t){return this.displaying&&this.displaying.resolve(),this.q.enqueue(this._display,t)}_display(t){if(this.book){this.epubcfi.isCfiString(t);var e,i=new s["defer"],n=i.promise;return this.displaying=i,this.book.locations.length()&&Object(s["isFloat"])(t)&&(t=this.book.locations.cfiFromPercentage(parseFloat(t))),e=this.book.spine.get(t),e?(this.manager.display(e,t).then(()=>{i.resolve(e),this.displaying=void 0,this.emit(f["c"].RENDITION.DISPLAYED,e),this.reportLocation()},t=>{this.emit(f["c"].RENDITION.DISPLAY_ERROR,t)}),n):(i.reject(new Error("No Section Found")),n)}}afterDisplayed(t){t.on(f["c"].VIEWS.MARK_CLICKED,(e,i)=>this.triggerMarkEvent(e,i,t.contents)),this.hooks.render.trigger(t,this).then(()=>{t.contents?this.hooks.content.trigger(t.contents,this).then(()=>{this.emit(f["c"].RENDITION.RENDERED,t.section,t)}):this.emit(f["c"].RENDITION.RENDERED,t.section,t)})}afterRemoved(t){this.hooks.unloaded.trigger(t,this).then(()=>{this.emit(f["c"].RENDITION.REMOVED,t.section,t)})}onResized(t,e){this.emit(f["c"].RENDITION.RESIZED,{width:t.width,height:t.height},e),this.location&&this.location.start&&this.display(e||this.location.start.cfi)}onOrientationChange(t){this.emit(f["c"].RENDITION.ORIENTATION_CHANGE,t)}moveTo(t){this.manager.moveTo(t)}resize(t,e,i){t&&(this.settings.width=t),e&&(this.settings.height=e),this.manager.resize(t,e,i)}clear(){this.manager.clear()}next(){return this.q.enqueue(this.manager.next.bind(this.manager)).then(this.reportLocation.bind(this))}prev(){return this.q.enqueue(this.manager.prev.bind(this.manager)).then(this.reportLocation.bind(this))}determineLayoutProperties(t){var e,i=this.settings.layout||t.layout||"reflowable",n=this.settings.spread||t.spread||"auto",r=this.settings.orientation||t.orientation||"auto",s=this.settings.flow||t.flow||"auto",o=t.viewport||"",a=this.settings.minSpreadWidth||t.minSpreadWidth||800,h=this.settings.direction||t.direction||"ltr";return(0===this.settings.width||this.settings.width>0)&&(0===this.settings.height||this.settings.height),e={layout:i,spread:n,orientation:r,flow:s,viewport:o,minSpreadWidth:a,direction:h},e}flow(t){var e=t;"scrolled"!==t&&"scrolled-doc"!==t&&"scrolled-continuous"!==t||(e="scrolled"),"auto"!==t&&"paginated"!==t||(e="paginated"),this.settings.flow=t,this._layout&&this._layout.flow(e),this.manager&&this._layout&&this.manager.applyLayout(this._layout),this.manager&&this.manager.updateFlow(e),this.manager&&this.manager.isRendered()&&this.location&&(this.manager.clear(),this.display(this.location.start.cfi))}layout(t){return t&&(this._layout=new l["a"](t),this._layout.spread(t.spread,this.settings.minSpreadWidth),this._layout.on(f["c"].LAYOUT.UPDATED,(t,e)=>{this.emit(f["c"].RENDITION.LAYOUT,t,e)})),this.manager&&this._layout&&this.manager.applyLayout(this._layout),this._layout}spread(t,e){this.settings.spread=t,e&&(this.settings.minSpreadWidth=e),this._layout&&this._layout.spread(t,e),this.manager&&this.manager.isRendered()&&this.manager.updateLayout()}direction(t){this.settings.direction=t||"ltr",this.manager&&this.manager.direction(this.settings.direction),this.manager&&this.manager.isRendered()&&this.location&&(this.manager.clear(),this.display(this.location.start.cfi))}reportLocation(){return this.q.enqueue(function(){requestAnimationFrame(function(){var t=this.manager.currentLocation();if(t&&t.then&&"function"===typeof t.then)t.then(function(t){let e=this.located(t);e&&e.start&&e.end&&(this.location=e,this.emit(f["c"].RENDITION.LOCATION_CHANGED,{index:this.location.start.index,href:this.location.start.href,start:this.location.start.cfi,end:this.location.end.cfi,percentage:this.location.start.percentage}),this.emit(f["c"].RENDITION.RELOCATED,this.location))}.bind(this));else if(t){let e=this.located(t);if(!e||!e.start||!e.end)return;this.location=e,this.emit(f["c"].RENDITION.LOCATION_CHANGED,{index:this.location.start.index,href:this.location.start.href,start:this.location.start.cfi,end:this.location.end.cfi,percentage:this.location.start.percentage}),this.emit(f["c"].RENDITION.RELOCATED,this.location)}}.bind(this))}.bind(this))}currentLocation(){var t=this.manager.currentLocation();if(t&&t.then&&"function"===typeof t.then)t.then(function(t){let e=this.located(t);return e}.bind(this));else if(t){let e=this.located(t);return e}}located(t){if(!t.length)return{};let e=t[0],i=t[t.length-1],n={start:{index:e.index,href:e.href,cfi:e.mapping.start,displayed:{page:e.pages[0]||1,total:e.totalPages}},end:{index:i.index,href:i.href,cfi:i.mapping.end,displayed:{page:i.pages[i.pages.length-1]||1,total:i.totalPages}}},r=this.book.locations.locationFromCfi(e.mapping.start),s=this.book.locations.locationFromCfi(i.mapping.end);null!=r&&(n.start.location=r,n.start.percentage=this.book.locations.percentageFromLocation(r)),null!=s&&(n.end.location=s,n.end.percentage=this.book.locations.percentageFromLocation(s));let o=this.book.pageList.pageFromCfi(e.mapping.start),a=this.book.pageList.pageFromCfi(i.mapping.end);return-1!=o&&(n.start.page=o),-1!=a&&(n.end.page=a),i.index===this.book.spine.last().index&&n.end.displayed.page>=n.end.displayed.total&&(n.atEnd=!0),e.index===this.book.spine.first().index&&1===n.start.displayed.page&&(n.atStart=!0),n}destroy(){this.manager&&this.manager.destroy(),this.book=void 0}passEvents(t){f["a"].forEach(e=>{t.on(e,e=>this.triggerViewEvent(e,t))}),t.on(f["c"].CONTENTS.SELECTED,e=>this.triggerSelectedEvent(e,t))}triggerViewEvent(t,e){this.emit(t.type,t,e)}triggerSelectedEvent(t,e){this.emit(f["c"].RENDITION.SELECTED,t,e)}triggerMarkEvent(t,e,i){this.emit(f["c"].RENDITION.MARK_CLICKED,t,e,i)}getRange(t,e){var i=new a["a"](t),n=this.manager.visible().filter((function(t){if(i.spinePos===t.index)return!0}));if(n.length)return n[0].contents.range(i,e)}adjustImages(t){if("pre-paginated"===this._layout.name)return new Promise((function(t){t()}));let e=t.window.getComputedStyle(t.content,null),i=.95*(t.content.offsetHeight-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom))),n=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight);return t.addStylesheetRules({img:{"max-width":(this._layout.columnWidth?this._layout.columnWidth-n+"px":"100%")+"!important","max-height":i+"px!important","object-fit":"contain","page-break-inside":"avoid","break-inside":"avoid","box-sizing":"border-box"},svg:{"max-width":(this._layout.columnWidth?this._layout.columnWidth-n+"px":"100%")+"!important","max-height":i+"px!important","page-break-inside":"avoid","break-inside":"avoid"}}),new Promise((function(t,e){setTimeout((function(){t()}),1)}))}getContents(){return this.manager?this.manager.getContents():[]}views(){let t=this.manager?this.manager.views:void 0;return t||[]}handleLinks(t){t&&t.on(f["c"].CONTENTS.LINK_CLICKED,t=>{let e=this.book.path.relative(t);this.display(e)})}injectStylesheet(t,e){let i=t.createElement("link");i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.setAttribute("href",this.settings.stylesheet),t.getElementsByTagName("head")[0].appendChild(i)}injectScript(t,e){let i=t.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("src",this.settings.script),i.textContent=" ",t.getElementsByTagName("head")[0].appendChild(i)}injectIdentifier(t,e){let i=this.book.packaging.metadata.identifier,n=t.createElement("meta");n.setAttribute("name","dc.relation.ispartof"),i&&n.setAttribute("content",i),t.getElementsByTagName("head")[0].appendChild(n)}}r()(b.prototype);e["a"]=b},"9e69":function(t,e,i){var n=i("2b3e"),r=n.Symbol;t.exports=r},a211:function(t,e,i){"use strict";i("ae54"),i("8f8f"),i("99c9"),i("55d4"),i("8a9e");var n=i("34c2");e["a"]=n["a"]},ad72:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"toast-bg"},[i("div",{staticClass:"toast-wrapper"},[i("div",{staticClass:"toast",domProps:{innerHTML:t._s(t.text)}})])])])},r=[],s=(i("c5f6"),{props:{text:[String,Number],timeout:{type:Number,default:1500}},data:function(){return{visible:!1}},methods:{hide:function(){this.visible=!1},show:function(){var t=this;clearTimeout(this.task),this.task=null,this.visible=!0,this.task=setTimeout((function(){t.visible=!1}),this.timeout)},continueShow:function(){clearTimeout(this.task),this.task=null,this.visible=!0}}}),o=s,a=(i("2cef"),i("2877")),h=Object(a["a"])(o,n,r,!1,null,"4f394b2b",null);e["a"]=h.exports},ae54:function(t,e,i){"use strict";var n=i("c9fc"),r=i.n(n),s=i("0b16"),o=i("12c2"),a=i("59c0"),h=i("8f8f"),l=i("4923"),c=i("18a6");function u(t,e,i,n){var r,o="undefined"!=typeof window&&window.URL,h=o?"blob":"arraybuffer",l=new s["defer"],c=new XMLHttpRequest,u=XMLHttpRequest.prototype;for(r in"overrideMimeType"in u||Object.defineProperty(u,"overrideMimeType",{value:function(){}}),i&&(c.withCredentials=!0),c.onreadystatechange=f,c.onerror=d,c.open("GET",t,!0),n)c.setRequestHeader(r,n[r]);function d(t){l.reject(t)}function f(){if(this.readyState===XMLHttpRequest.DONE){var t=!1;if(""!==this.responseType&&"document"!==this.responseType||(t=this.responseXML),200===this.status||0===this.status||t){var i;if(!this.response&&!t)return l.reject({status:this.status,message:"Empty Response",stack:(new Error).stack}),l.promise;if(403===this.status)return l.reject({status:this.status,response:this.response,message:"Forbidden",stack:(new Error).stack}),l.promise;i=t?this.responseXML:Object(s["isXml"])(e)?Object(s["parse"])(this.response,"text/xml"):"xhtml"==e?Object(s["parse"])(this.response,"application/xhtml+xml"):"html"==e||"htm"==e?Object(s["parse"])(this.response,"text/html"):"json"==e?JSON.parse(this.response):"blob"==e?o?this.response:new Blob([this.response]):this.response,l.resolve(i)}else l.reject({status:this.status,message:this.response,stack:(new Error).stack})}}return"json"==e&&c.setRequestHeader("Accept","application/json"),e||(e=new a["a"](t).extension),"blob"==e&&(c.responseType=h),Object(s["isXml"])(e)&&c.overrideMimeType("text/xml"),"binary"==e&&(c.responseType="arraybuffer"),c.send(),l.promise}var d=u,f=i("1456");class p{constructor(t,e){this.idref=t.idref,this.linear="yes"===t.linear,this.properties=t.properties,this.index=t.index,this.href=t.href,this.url=t.url,this.canonical=t.canonical,this.next=t.next,this.prev=t.prev,this.cfiBase=t.cfiBase,e?this.hooks=e:(this.hooks={},this.hooks.serialize=new l["a"](this),this.hooks.content=new l["a"](this)),this.document=void 0,this.contents=void 0,this.output=void 0}load(t){var e=t||this.request||d,i=new s["defer"],n=i.promise;return this.contents?i.resolve(this.contents):e(this.url).then(function(t){return this.document=t,this.contents=t.documentElement,this.hooks.content.trigger(this.document,this)}.bind(this)).then(function(){i.resolve(this.contents)}.bind(this)).catch((function(t){i.reject(t)})),n}base(){return Object(c["a"])(this.document,this)}render(t){var e=new s["defer"],i=e.promise;return this.output,this.load(t).then(function(t){var e,i="undefined"!==typeof navigator&&navigator.userAgent||"",n=i.indexOf("Trident")>=0;e="undefined"===typeof XMLSerializer||n?f["DOMParser"]:XMLSerializer;var r=new e;return this.output=r.serializeToString(t),this.output}.bind(this)).then(function(){return this.hooks.serialize.trigger(this.output,this)}.bind(this)).then(function(){e.resolve(this.output)}.bind(this)).catch((function(t){e.reject(t)})),i}find(t){var e=this,i=[],n=t.toLowerCase(),r=function(t){var r,s,o,a=t.textContent.toLowerCase(),h=e.document.createRange(),l=-1,c=150;while(-1!=s)s=a.indexOf(n,l+1),-1!=s&&(h=e.document.createRange(),h.setStart(t,s),h.setEnd(t,s+n.length),r=e.cfiFromRange(h),t.textContent.length<c?o=t.textContent:(o=t.textContent.substring(s-c/2,s+c/2),o="..."+o+"..."),i.push({cfi:r,excerpt:o})),l=s};return Object(s["sprint"])(e.document,(function(t){r(t)})),i}search(t,e=5){if("undefined"==typeof document.createTreeWalker)return this.find(t);let i=[];const n=150,r=this,s=t.toLowerCase(),o=function(t){const e=t.reduce((t,e)=>t+e.textContent,""),o=e.toLowerCase(),a=o.indexOf(s);if(-1!=a){const e=0,o=a+s.length;let h=0,l=0;if(a<t[e].length){let s;while(h<t.length-1){if(l+=t[h].length,o<=l)break;h+=1}let c=t[e],u=t[h],d=r.document.createRange();d.setStart(c,a);let f=t.slice(0,h).reduce((t,e)=>t+e.textContent.length,0);d.setEnd(u,f>o?o:o-f),s=r.cfiFromRange(d);let p=t.slice(0,h+1).reduce((t,e)=>t+e.textContent,"");p.length>n&&(p=p.substring(a-n/2,a+n/2),p="..."+p+"..."),i.push({cfi:s,excerpt:p})}}},a=document.createTreeWalker(r.document,NodeFilter.SHOW_TEXT,null,!1);let h,l=[];while(h=a.nextNode())l.push(h),l.length==e&&(o(l.slice(0,e)),l=l.slice(1,e));return l.length>0&&o(l),i}reconcileLayoutSettings(t){var e={layout:t.layout,spread:t.spread,orientation:t.orientation};return this.properties.forEach((function(t){var i,n,r=t.replace("rendition:",""),s=r.indexOf("-");-1!=s&&(i=r.slice(0,s),n=r.slice(s+1),e[i]=n)})),e}cfiFromRange(t){return new h["a"](t,this.cfiBase).toString()}cfiFromElement(t){return new h["a"](t,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}}var m=p;class g{constructor(){this.spineItems=[],this.spineByHref={},this.spineById={},this.hooks={},this.hooks.serialize=new l["a"],this.hooks.content=new l["a"],this.hooks.content.register(c["a"]),this.hooks.content.register(c["b"]),this.hooks.content.register(c["d"]),this.epubcfi=new h["a"],this.loaded=!1,this.items=void 0,this.manifest=void 0,this.spineNodeIndex=void 0,this.baseUrl=void 0,this.length=void 0}unpack(t,e,i){this.items=t.spine,this.manifest=t.manifest,this.spineNodeIndex=t.spineNodeIndex,this.baseUrl=t.baseUrl||t.basePath||"",this.length=this.items.length,this.items.forEach((t,n)=>{var r,s=this.manifest[t.idref];t.index=n,t.cfiBase=this.epubcfi.generateChapterComponent(this.spineNodeIndex,t.index,t.idref),t.href&&(t.url=e(t.href,!0),t.canonical=i(t.href)),s&&(t.href=s.href,t.url=e(t.href,!0),t.canonical=i(t.href),s.properties.length&&t.properties.push.apply(t.properties,s.properties)),"yes"===t.linear?(t.prev=function(){let e=t.index;while(e>0){let t=this.get(e-1);if(t&&t.linear)return t;e-=1}}.bind(this),t.next=function(){let e=t.index;while(e<this.spineItems.length-1){let t=this.get(e+1);if(t&&t.linear)return t;e+=1}}.bind(this)):(t.prev=function(){},t.next=function(){}),r=new m(t,this.hooks),this.append(r)}),this.loaded=!0}get(t){var e=0;if("undefined"===typeof t)while(e<this.spineItems.length){let t=this.spineItems[e];if(t&&t.linear)break;e+=1}else if(this.epubcfi.isCfiString(t)){let i=new h["a"](t);e=i.spinePos}else"number"===typeof t||!1===isNaN(t)?e=t:"string"===typeof t&&0===t.indexOf("#")?e=this.spineById[t.substring(1)]:"string"===typeof t&&(t=t.split("#")[0],e=this.spineByHref[t]||this.spineByHref[encodeURI(t)]);return this.spineItems[e]||null}append(t){var e=this.spineItems.length;return t.index=e,this.spineItems.push(t),this.spineByHref[decodeURI(t.href)]=e,this.spineByHref[encodeURI(t.href)]=e,this.spineByHref[t.href]=e,this.spineById[t.idref]=e,e}prepend(t){return this.spineByHref[t.href]=0,this.spineById[t.idref]=0,this.spineItems.forEach((function(t,e){t.index=e})),0}remove(t){var e=this.spineItems.indexOf(t);if(e>-1)return delete this.spineByHref[t.href],delete this.spineById[t.idref],this.spineItems.splice(e,1)}each(){return this.spineItems.forEach.apply(this.spineItems,arguments)}first(){let t=0;do{let e=this.get(t);if(e&&e.linear)return e;t+=1}while(t<this.spineItems.length)}last(){let t=this.spineItems.length-1;do{let e=this.get(t);if(e&&e.linear)return e;t-=1}while(t>=0)}destroy(){this.each(t=>t.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}}var v=g,w=i("9650"),y=i("06d2");class b{constructor(t,e,i){this.spine=t,this.request=e,this.pause=i||100,this.q=new w["a"](this),this.epubcfi=new h["a"],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(t){return t&&(this.break=t),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(t){return t.load(this.request).then(function(e){var i=new s["defer"],n=this.parse(e,t.cfiBase);return this._locations=this._locations.concat(n),t.unload(),this.processingTimeout=setTimeout(()=>i.resolve(n),this.pause),i.promise}.bind(this))}parse(t,e,i){var n,r,o=[],a=t.ownerDocument,l=Object(s["qs"])(a,"body"),c=0,u=i||this.break,d=function(t){var i,s=t.length,a=0;if(0===t.textContent.trim().length)return!1;0==c&&(n=this.createRange(),n.startContainer=t,n.startOffset=0),i=u-c,i>s&&(c+=s,a=s);while(a<s)if(i=u-c,0===c&&(a+=1,n=this.createRange(),n.startContainer=t,n.startOffset=a),a+i>=s)c+=s-a,a=s;else{a+=i,n.endContainer=t,n.endOffset=a;let r=new h["a"](n,e).toString();o.push(r),c=0}r=t};if(Object(s["sprint"])(l,d.bind(this)),n&&n.startContainer&&r){n.endContainer=r,n.endOffset=r.length;let t=new h["a"](n,e).toString();o.push(t),c=0}return o}generateFromWords(t,e,i){var n=t?new h["a"](t):void 0;return this.q.pause(),this._locationsWords=[],this._wordCounter=0,this.spine.each(function(t){t.linear&&(n?t.index>=n.spinePos&&this.q.enqueue(this.processWords.bind(this),t,e,n,i):this.q.enqueue(this.processWords.bind(this),t,e,n,i))}.bind(this)),this.q.run().then(function(){return this._currentCfi&&(this.currentLocation=this._currentCfi),this._locationsWords}.bind(this))}processWords(t,e,i,n){return n&&this._locationsWords.length>=n?Promise.resolve():t.load(this.request).then(function(r){var o=new s["defer"],a=this.parseWords(r,t,e,i),h=n-this._locationsWords.length;return this._locationsWords=this._locationsWords.concat(a.length>=n?a.slice(0,h):a),t.unload(),this.processingTimeout=setTimeout(()=>o.resolve(a),this.pause),o.promise}.bind(this))}countWords(t){return t=t.replace(/(^\s*)|(\s*$)/gi,""),t=t.replace(/[ ]{2,}/gi," "),t=t.replace(/\n /,"\n"),t.split(" ").length}parseWords(t,e,i,n){var r,o=e.cfiBase,a=[],l=t.ownerDocument,c=Object(s["qs"])(l,"body"),u=i,d=!n||n.spinePos!==e.index;n&&e.index===n.spinePos&&(r=n.findNode(n.range?n.path.steps.concat(n.start.steps):n.path.steps,t.ownerDocument));var f=function(t){if(!d){if(t!==r)return!1;d=!0}if(t.textContent.length<10&&0===t.textContent.trim().length)return!1;var e,i=this.countWords(t.textContent),n=0;if(0===i)return!1;e=u-this._wordCounter,e>i&&(this._wordCounter+=i,n=i);while(n<i)if(e=u-this._wordCounter,n+e>=i)this._wordCounter+=i-n,n=i;else{n+=e;let i=new h["a"](t,o);a.push({cfi:i.toString(),wordCount:this._wordCounter}),this._wordCounter=0}t};return Object(s["sprint"])(c,f.bind(this)),a}locationFromCfi(t){let e;return h["a"].prototype.isCfiString(t)&&(t=new h["a"](t)),0===this._locations.length?-1:(e=Object(s["locationOf"])(t,this._locations,this.epubcfi.compare),e>this.total?this.total:e)}percentageFromCfi(t){if(0===this._locations.length)return null;var e=this.locationFromCfi(t);return this.percentageFromLocation(e)}percentageFromLocation(t){return t&&this.total?t/this.total:0}cfiFromLocation(t){var e=-1;return"number"!=typeof t&&(t=parseInt(t)),t>=0&&t<this._locations.length&&(e=this._locations[t]),e}cfiFromPercentage(t){let e;if(t>1&&console.warn("Normalize cfiFromPercentage value to between 0 - 1"),t>=1){let t=new h["a"](this._locations[this.total]);return t.collapse(),t.toString()}return e=Math.ceil(this.total*t),this.cfiFromLocation(e)}load(t){return this._locations="string"===typeof t?JSON.parse(t):t,this.total=this._locations.length-1,this._locations}save(){return JSON.stringify(this._locations)}getCurrent(){return this._current}setCurrent(t){var e;if("string"==typeof t)this._currentCfi=t;else{if("number"!=typeof t)return;this._current=t}0!==this._locations.length&&("string"==typeof t?(e=this.locationFromCfi(t),this._current=e):e=t,this.emit(y["c"].LOCATIONS.CHANGED,{percentage:this.percentageFromLocation(e)}))}get currentLocation(){return this._current}set currentLocation(t){this.setCurrent(t)}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)}}r()(b.prototype);var _=b,x=i("3c2a"),E=i.n(x);class k{constructor(t){this.packagePath="",this.directory="",this.encoding="",t&&this.parse(t)}parse(t){var e;if(!t)throw new Error("Container File Not Found");if(e=Object(s["qs"])(t,"rootfile"),!e)throw new Error("No RootFile Found");this.packagePath=e.getAttribute("full-path"),this.directory=E.a.dirname(this.packagePath),this.encoding=t.xmlEncoding}destroy(){this.packagePath=void 0,this.directory=void 0,this.encoding=void 0}}var S=k;class C{constructor(t){this.manifest={},this.navPath="",this.ncxPath="",this.coverPath="",this.spineNodeIndex=0,this.spine=[],this.metadata={},t&&this.parse(t)}parse(t){var e,i,n;if(!t)throw new Error("Package File Not Found");if(e=Object(s["qs"])(t,"metadata"),!e)throw new Error("No Metadata Found");if(i=Object(s["qs"])(t,"manifest"),!i)throw new Error("No Manifest Found");if(n=Object(s["qs"])(t,"spine"),!n)throw new Error("No Spine Found");return this.manifest=this.parseManifest(i),this.navPath=this.findNavPath(i),this.ncxPath=this.findNcxPath(i,n),this.coverPath=this.findCoverPath(t),this.spineNodeIndex=Object(s["indexOfElementNode"])(n),this.spine=this.parseSpine(n,this.manifest),this.uniqueIdentifier=this.findUniqueIdentifier(t),this.metadata=this.parseMetadata(e),this.metadata.direction=n.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(t){var e={};return e.title=this.getElementText(t,"title"),e.creator=this.getElementText(t,"creator"),e.description=this.getElementText(t,"description"),e.pubdate=this.getElementText(t,"date"),e.publisher=this.getElementText(t,"publisher"),e.identifier=this.getElementText(t,"identifier"),e.language=this.getElementText(t,"language"),e.rights=this.getElementText(t,"rights"),e.modified_date=this.getPropertyText(t,"dcterms:modified"),e.layout=this.getPropertyText(t,"rendition:layout"),e.orientation=this.getPropertyText(t,"rendition:orientation"),e.flow=this.getPropertyText(t,"rendition:flow"),e.viewport=this.getPropertyText(t,"rendition:viewport"),e.media_active_class=this.getPropertyText(t,"media:active-class"),e.spread=this.getPropertyText(t,"rendition:spread"),e}parseManifest(t){var e={},i=Object(s["qsa"])(t,"item"),n=Array.prototype.slice.call(i);return n.forEach((function(t){var i=t.getAttribute("id"),n=t.getAttribute("href")||"",r=t.getAttribute("media-type")||"",s=t.getAttribute("media-overlay")||"",o=t.getAttribute("properties")||"";e[i]={href:n,type:r,overlay:s,properties:o.length?o.split(" "):[]}})),e}parseSpine(t,e){var i=[],n=Object(s["qsa"])(t,"itemref"),r=Array.prototype.slice.call(n);return r.forEach((function(t,e){var n=t.getAttribute("idref"),r=t.getAttribute("properties")||"",s=r.length?r.split(" "):[],o={idref:n,linear:t.getAttribute("linear")||"yes",properties:s,index:e};i.push(o)})),i}findUniqueIdentifier(t){var e=t.documentElement.getAttribute("unique-identifier");if(!e)return"";var i=t.getElementById(e);return i&&"identifier"===i.localName&&"http://purl.org/dc/elements/1.1/"===i.namespaceURI&&i.childNodes.length>0?i.childNodes[0].nodeValue.trim():""}findNavPath(t){var e=Object(s["qsp"])(t,"item",{properties:"nav"});return!!e&&e.getAttribute("href")}findNcxPath(t,e){var i,n=Object(s["qsp"])(t,"item",{"media-type":"application/x-dtbncx+xml"});return n||(i=e.getAttribute("toc"),i&&(n=t.querySelector("#"+i))),!!n&&n.getAttribute("href")}findCoverPath(t){var e=Object(s["qs"])(t,"package"),i=(e.getAttribute("version"),Object(s["qsp"])(t,"item",{properties:"cover-image"}));if(i)return i.getAttribute("href");var n=Object(s["qsp"])(t,"meta",{name:"cover"});if(n){var r=n.getAttribute("content"),o=t.getElementById(r);return o?o.getAttribute("href"):""}return!1}getElementText(t,e){var i,n=t.getElementsByTagNameNS("http://purl.org/dc/elements/1.1/",e);return n&&0!==n.length?(i=n[0],i.childNodes.length?i.childNodes[0].nodeValue:""):""}getPropertyText(t,e){var i=Object(s["qsp"])(t,"meta",{property:e});return i&&i.childNodes.length?i.childNodes[0].nodeValue:""}load(t){this.metadata=t.metadata;let e=t.readingOrder||t.spine;return this.spine=e.map((t,e)=>(t.index=e,t.linear=t.linear||"yes",t)),t.resources.forEach((t,e)=>{this.manifest[e]=t,t.rel&&"cover"===t.rel[0]&&(this.coverPath=t.href)}),this.spineNodeIndex=0,this.toc=t.toc.map((t,e)=>(t.label=t.title,t)),{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}}var T=C;class O{constructor(t){this.toc=[],this.tocByHref={},this.tocById={},this.landmarks=[],this.landmarksByType={},this.length=0,t&&this.parse(t)}parse(t){let e,i,n=t.nodeType;n&&(e=Object(s["qs"])(t,"html"),i=Object(s["qs"])(t,"ncx")),n?e?(this.toc=this.parseNav(t),this.landmarks=this.parseLandmarks(t)):i&&(this.toc=this.parseNcx(t)):this.toc=this.load(t),this.length=0,this.unpack(this.toc)}unpack(t){for(var e,i=0;i<t.length;i++)e=t[i],e.href&&(this.tocByHref[e.href]=i),e.id&&(this.tocById[e.id]=i),this.length++,e.subitems.length&&this.unpack(e.subitems)}get(t){var e;return t?(0===t.indexOf("#")?e=this.tocById[t.substring(1)]:t in this.tocByHref&&(e=this.tocByHref[t]),this.getByIndex(t,e,this.toc)):this.toc}getByIndex(t,e,i){if(0===i.length)return;const n=i[e];if(!n||t!==n.id&&t!==n.href){let n;for(let r=0;r<i.length;++r)if(n=this.getByIndex(t,e,i[r].subitems),n)break;return n}return n}landmark(t){var e;return t?(e=this.landmarksByType[t],this.landmarks[e]):this.landmarks}parseNav(t){var e=Object(s["querySelectorByType"])(t,"nav","toc"),i=[];if(!e)return i;let n=Object(s["filterChildren"])(e,"ol",!0);return n?(i=this.parseNavList(n),i):i}parseNavList(t,e){const i=[];if(!t)return i;if(!t.children)return i;for(let n=0;n<t.children.length;n++){const r=this.navItem(t.children[n],e);r&&i.push(r)}return i}navItem(t,e){let i=t.getAttribute("id")||void 0,n=Object(s["filterChildren"])(t,"a",!0);if(!n)return;let r=n.getAttribute("href")||"";i||(i=r);let o=n.textContent||"",a=[],h=Object(s["filterChildren"])(t,"ol",!0);return h&&(a=this.parseNavList(h,i)),{id:i,href:r,label:o,subitems:a,parent:e}}parseLandmarks(t){var e,i,n=Object(s["querySelectorByType"])(t,"nav","landmarks"),r=n?Object(s["qsa"])(n,"li"):[],o=r.length,a=[];if(!r||0===o)return a;for(e=0;e<o;++e)i=this.landmarkItem(r[e]),i&&(a.push(i),this.landmarksByType[i.type]=e);return a}landmarkItem(t){let e=Object(s["filterChildren"])(t,"a",!0);if(!e)return;let i=e.getAttributeNS("http://www.idpf.org/2007/ops","type")||void 0,n=e.getAttribute("href")||"",r=e.textContent||"";return{href:n,label:r,type:i}}parseNcx(t){var e,i,n,r=Object(s["qsa"])(t,"navPoint"),o=r.length,a={},h=[];if(!r||0===o)return h;for(e=0;e<o;++e)i=this.ncxItem(r[e]),a[i.id]=i,i.parent?(n=a[i.parent],n.subitems.push(i)):h.push(i);return h}ncxItem(t){var e,i=t.getAttribute("id")||!1,n=Object(s["qs"])(t,"content"),r=n.getAttribute("src"),o=Object(s["qs"])(t,"navLabel"),a=o.textContent?o.textContent:"",h=[],l=t.parentNode;return!l||"navPoint"!==l.nodeName&&"navPoint"!==l.nodeName.split(":").slice(-1)[0]||(e=l.getAttribute("id")),{id:i,href:r,label:a,subitems:h,parent:e}}load(t){return t.map(t=>(t.label=t.title,t.subitems=t.children?this.load(t.children):[],t))}forEach(t){return this.toc.forEach(t)}}var A=O,N={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"}},R=function(){var t,e,i,n,r={};for(t in N)if(N.hasOwnProperty(t))for(e in N[t])if(N[t].hasOwnProperty(e))if(i=N[t][e],"string"==typeof i)r[i]=t+"/"+e;else for(n=0;n<i.length;n++)r[i[n]]=t+"/"+e;return r}(),I="text/plain";function L(t){return t&&R[t.split(".").pop().toLowerCase()]||I}var z={lookup:L};class D{constructor(t,e){this.settings={replacements:e&&e.replacements||"base64",archive:e&&e.archive,resolver:e&&e.resolver,request:e&&e.request},this.process(t)}process(t){this.manifest=t,this.resources=Object.keys(t).map((function(e){return t[e]})),this.replacementUrls=[],this.html=[],this.assets=[],this.css=[],this.urls=[],this.cssUrls=[],this.split(),this.splitUrls()}split(){this.html=this.resources.filter((function(t){if("application/xhtml+xml"===t.type||"text/html"===t.type)return!0})),this.assets=this.resources.filter((function(t){if("application/xhtml+xml"!==t.type&&"text/html"!==t.type)return!0})),this.css=this.resources.filter((function(t){if("text/css"===t.type)return!0}))}splitUrls(){this.urls=this.assets.map(function(t){return t.href}.bind(this)),this.cssUrls=this.css.map((function(t){return t.href}))}createUrl(t){var e=new o["a"](t),i=z.lookup(e.filename);return this.settings.archive?this.settings.archive.createUrl(t,{base64:"base64"===this.settings.replacements}):"base64"===this.settings.replacements?this.settings.request(t,"blob").then(t=>Object(s["blob2base64"])(t)).then(t=>Object(s["createBase64Url"])(t,i)):this.settings.request(t,"blob").then(t=>Object(s["createBlobUrl"])(t,i))}replacements(){if("none"===this.settings.replacements)return new Promise(function(t){t(this.urls)}.bind(this));var t=this.urls.map(t=>{var e=this.settings.resolver(t);return this.createUrl(e).catch(t=>(console.error(t),null))});return Promise.all(t).then(t=>(this.replacementUrls=t.filter(t=>"string"===typeof t),t))}replaceCss(t,e){var i=[];return t=t||this.settings.archive,e=e||this.settings.resolver,this.cssUrls.forEach(function(n){var r=this.createCssFile(n,t,e).then(function(t){var e=this.urls.indexOf(n);e>-1&&(this.replacementUrls[e]=t)}.bind(this));i.push(r)}.bind(this)),Promise.all(i)}createCssFile(t){var e;if(E.a.isAbsolute(t))return new Promise((function(t){t()}));var i,n=this.settings.resolver(t);i=this.settings.archive?this.settings.archive.getText(n):this.settings.request(n,"text");var r=this.urls.map(t=>{var e=this.settings.resolver(t),i=new a["a"](n).relative(e);return i});return i?i.then(t=>(t=Object(c["e"])(t,r,this.replacementUrls),e="base64"===this.settings.replacements?Object(s["createBase64Url"])(t,"text/css"):Object(s["createBlobUrl"])(t,"text/css"),e),t=>new Promise((function(t){t()}))):new Promise((function(t){t()}))}relativeTo(t,e){return e=e||this.settings.resolver,this.urls.map(function(i){var n=e(i),r=new a["a"](t).relative(n);return r}.bind(this))}get(t){var e=this.urls.indexOf(t);if(-1!==e)return this.replacementUrls.length?new Promise(function(t,i){t(this.replacementUrls[e])}.bind(this)):this.createUrl(t)}substitute(t,e){var i;return i=e?this.relativeTo(e):this.urls,Object(c["e"])(t,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}}var P=D;class B{constructor(t){this.pages=[],this.locations=[],this.epubcfi=new h["a"],this.firstPage=0,this.lastPage=0,this.totalPages=0,this.toc=void 0,this.ncx=void 0,t&&(this.pageList=this.parse(t)),this.pageList&&this.pageList.length&&this.process(this.pageList)}parse(t){var e=Object(s["qs"])(t,"html"),i=Object(s["qs"])(t,"ncx");return e?this.parseNav(t):i?this.parseNcx(t):void 0}parseNav(t){var e,i,n=Object(s["querySelectorByType"])(t,"nav","page-list"),r=n?Object(s["qsa"])(n,"li"):[],o=r.length,a=[];if(!r||0===o)return a;for(e=0;e<o;++e)i=this.item(r[e]),a.push(i);return a}parseNcx(t){var e,i,n,r=[],o=0,a=0;if(i=Object(s["qs"])(t,"pageList"),!i)return r;if(n=Object(s["qsa"])(i,"pageTarget"),a=n.length,!n||0===n.length)return r;for(o=0;o<a;++o)e=this.ncxItem(n[o]),r.push(e);return r}ncxItem(t){var e=Object(s["qs"])(t,"navLabel"),i=Object(s["qs"])(e,"text"),n=i.textContent,r=Object(s["qs"])(t,"content"),o=r.getAttribute("src"),a=parseInt(n,10);return{href:o,page:a}}item(t){var e,i,n,r=Object(s["qs"])(t,"a"),o=r.getAttribute("href")||"",a=r.textContent||"",h=parseInt(a),l=o.indexOf("epubcfi");return-1!=l?(e=o.split("#"),i=e[0],n=e.length>1&&e[1],{cfi:n,href:o,packageUrl:i,page:h}):{href:o,page:h}}process(t){t.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(t){var e=-1;if(0===this.locations.length)return-1;var i=Object(s["indexOfSorted"])(t,this.locations,this.epubcfi.compare);return-1!=i?e=this.pages[i]:(i=Object(s["locationOf"])(t,this.locations,this.epubcfi.compare),e=i-1>=0?this.pages[i-1]:this.pages[0],void 0!==e||(e=-1)),e}cfiFromPage(t){var e=-1;"number"!=typeof t&&(t=parseInt(t));var i=this.pages.indexOf(t);return-1!=i&&(e=this.locations[i]),e}pageFromPercentage(t){var e=Math.round(this.totalPages*t);return e}percentageFromPage(t){var e=(t-this.firstPage)/this.totalPages;return Math.round(1e3*e)/1e3}percentageFromCfi(t){var e=this.pageFromCfi(t),i=this.percentageFromPage(e);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}}var j=B,U=i("99c9"),M=i("8355"),F=i.n(M);class W{constructor(){this.zip=void 0,this.urlCache={},this.checkRequirements()}checkRequirements(){try{this.zip=new F.a}catch(t){throw new Error("JSZip lib not loaded")}}open(t,e){return this.zip.loadAsync(t,{base64:e})}openUrl(t,e){return d(t,"binary").then(function(t){return this.zip.loadAsync(t,{base64:e})}.bind(this))}request(t,e){var i,n=new s["defer"],r=new a["a"](t);return e||(e=r.extension),i="blob"==e?this.getBlob(t):this.getText(t),i?i.then(function(t){let i=this.handleResponse(t,e);n.resolve(i)}.bind(this)):n.reject({message:"File not found in the epub: "+t,stack:(new Error).stack}),n.promise}handleResponse(t,e){var i;return i="json"==e?JSON.parse(t):Object(s["isXml"])(e)?Object(s["parse"])(t,"text/xml"):"xhtml"==e?Object(s["parse"])(t,"application/xhtml+xml"):"html"==e||"htm"==e?Object(s["parse"])(t,"text/html"):t,i}getBlob(t,e){var i=window.decodeURIComponent(t.substr(1)),n=this.zip.file(i);if(n)return e=e||z.lookup(n.name),n.async("uint8array").then((function(t){return new Blob([t],{type:e})}))}getText(t,e){var i=window.decodeURIComponent(t.substr(1)),n=this.zip.file(i);if(n)return n.async("string").then((function(t){return t}))}getBase64(t,e){var i=window.decodeURIComponent(t.substr(1)),n=this.zip.file(i);if(n)return e=e||z.lookup(n.name),n.async("base64").then((function(t){return"data:"+e+";base64,"+t}))}createUrl(t,e){var i,n,r=new s["defer"],o=window.URL||window.webkitURL||window.mozURL,a=e&&e.base64;return t in this.urlCache?(r.resolve(this.urlCache[t]),r.promise):(a?(n=this.getBase64(t),n&&n.then(function(e){this.urlCache[t]=e,r.resolve(e)}.bind(this))):(n=this.getBlob(t),n&&n.then(function(e){i=o.createObjectURL(e),this.urlCache[t]=i,r.resolve(i)}.bind(this))),n||r.reject({message:"File not found in the epub: "+t,stack:(new Error).stack}),r.promise)}revokeUrl(t){var e=window.URL||window.webkitURL||window.mozURL,i=this.urlCache[t];i&&e.revokeObjectURL(i)}destroy(){var t=window.URL||window.webkitURL||window.mozURL;for(let e in this.urlCache)t.revokeObjectURL(e);this.zip=void 0,this.urlCache={}}}var q=W,H=i("a002"),Y=i.n(H);class V{constructor(t,e,i){this.urlCache={},this.storage=void 0,this.name=t,this.requester=e||d,this.resolver=i,this.online=!0,this.checkRequirements(),this.addListeners()}checkRequirements(){try{let t;"undefined"===typeof Y.a&&(t=Y.a),this.storage=t.createInstance({name:this.name})}catch(t){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(t){let e=navigator.onLine;this.online=e,e?this.emit("online",this):this.emit("offline",this)}add(t,e){let i=t.resources.map(t=>{let{href:i}=t,n=this.resolver(i),r=window.encodeURIComponent(n);return this.storage.getItem(r).then(t=>!t||e?this.requester(n,"binary").then(t=>this.storage.setItem(r,t)):t)});return Promise.all(i)}put(t,e,i){let n=window.encodeURIComponent(t);return this.storage.getItem(n).then(r=>r||this.requester(t,"binary",e,i).then(t=>this.storage.setItem(n,t)))}request(t,e,i,n){return this.online?this.requester(t,e,i,n).then(e=>(this.put(t),e)):this.retrieve(t,e)}retrieve(t,e){new s["defer"];var i,n=new a["a"](t);return e||(e=n.extension),i="blob"==e?this.getBlob(t):this.getText(t),i.then(i=>{var n,r=new s["defer"];return i?(n=this.handleResponse(i,e),r.resolve(n)):r.reject({message:"File not found in storage: "+t,stack:(new Error).stack}),r.promise})}handleResponse(t,e){var i;return i="json"==e?JSON.parse(t):Object(s["isXml"])(e)?Object(s["parse"])(t,"text/xml"):"xhtml"==e?Object(s["parse"])(t,"application/xhtml+xml"):"html"==e||"htm"==e?Object(s["parse"])(t,"text/html"):t,i}getBlob(t,e){let i=window.encodeURIComponent(t);return this.storage.getItem(i).then((function(i){if(i)return e=e||z.lookup(t),new Blob([i],{type:e})}))}getText(t,e){let i=window.encodeURIComponent(t);return e=e||z.lookup(t),this.storage.getItem(i).then((function(t){var i,n=new s["defer"],r=new FileReader;if(t)return i=new Blob([t],{type:e}),r.addEventListener("loadend",()=>{n.resolve(r.result)}),r.readAsText(i,e),n.promise}))}getBase64(t,e){let i=window.encodeURIComponent(t);return e=e||z.lookup(t),this.storage.getItem(i).then(t=>{var i,n=new s["defer"],r=new FileReader;if(t)return i=new Blob([t],{type:e}),r.addEventListener("loadend",()=>{n.resolve(r.result)}),r.readAsDataURL(i,e),n.promise})}createUrl(t,e){var i,n,r=new s["defer"],o=window.URL||window.webkitURL||window.mozURL,a=e&&e.base64;return t in this.urlCache?(r.resolve(this.urlCache[t]),r.promise):(a?(n=this.getBase64(t),n&&n.then(function(e){this.urlCache[t]=e,r.resolve(e)}.bind(this))):(n=this.getBlob(t),n&&n.then(function(e){i=o.createObjectURL(e),this.urlCache[t]=i,r.resolve(i)}.bind(this))),n||r.reject({message:"File not found in storage: "+t,stack:(new Error).stack}),r.promise)}revokeUrl(t){var e=window.URL||window.webkitURL||window.mozURL,i=this.urlCache[t];i&&e.revokeObjectURL(i)}destroy(){var t=window.URL||window.webkitURL||window.mozURL;for(let e in this.urlCache)t.revokeObjectURL(e);this.urlCache={},this.removeListeners()}}r()(V.prototype);var Z=V;class X{constructor(t){this.interactive="",this.fixedLayout="",this.openToSpread="",this.orientationLock="",t&&this.parse(t)}parse(t){if(!t)return this;const e=Object(s["qs"])(t,"display_options");if(!e)return this;const i=Object(s["qsa"])(e,"option");return i.forEach(t=>{let e="";switch(t.childNodes.length&&(e=t.childNodes[0].nodeValue),t.attributes.name.value){case"interactive":this.interactive=e;break;case"fixed-layout":this.fixedLayout=e;break;case"open-to-spread":this.openToSpread=e;break;case"orientation-lock":this.orientationLock=e;break}}),this}destroy(){this.interactive=void 0,this.fixedLayout=void 0,this.openToSpread=void 0,this.orientationLock=void 0}}var G=X;const K="META-INF/container.xml",$="META-INF/com.apple.ibooks.display-options.xml",J={BINARY:"binary",BASE64:"base64",EPUB:"epub",OPF:"opf",MANIFEST:"json",DIRECTORY:"directory"};class Q{constructor(t,e){"undefined"===typeof e&&"string"!==typeof t&&t instanceof Blob===!1&&t instanceof ArrayBuffer===!1&&(e=t,t=void 0),this.settings=Object(s["extend"])(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}),Object(s["extend"])(this.settings,e),this.opening=new s["defer"],this.opened=this.opening.promise,this.isOpen=!1,this.loading={manifest:new s["defer"],spine:new s["defer"],metadata:new s["defer"],cover:new s["defer"],navigation:new s["defer"],pageList:new s["defer"],resources:new s["defer"],displayOptions:new s["defer"]},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||d,this.spine=new v,this.locations=new _(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),t&&this.open(t,this.settings.openAs).catch(e=>{var i=new Error("Cannot load book at "+t);this.emit(y["c"].BOOK.OPEN_FAILED,i)})}open(t,e){var i,n=e||this.determineType(t);return n===J.BINARY?(this.archived=!0,this.url=new o["a"]("/",""),i=this.openEpub(t)):n===J.BASE64?(this.archived=!0,this.url=new o["a"]("/",""),i=this.openEpub(t,n)):n===J.EPUB?(this.archived=!0,this.url=new o["a"]("/",""),i=this.request(t,"binary",this.settings.requestCredentials,this.settings.requestHeaders).then(this.openEpub.bind(this))):n==J.OPF?(this.url=new o["a"](t),i=this.openPackaging(this.url.Path.toString())):n==J.MANIFEST?(this.url=new o["a"](t),i=this.openManifest(this.url.Path.toString())):(this.url=new o["a"](t),i=this.openContainer(K).then(this.openPackaging.bind(this))),i}openEpub(t,e){return this.unarchive(t,e||this.settings.encoding).then(()=>this.openContainer(K)).then(t=>this.openPackaging(t))}openContainer(t){return this.load(t).then(t=>(this.container=new S(t),this.resolve(this.container.packagePath)))}openPackaging(t){return this.path=new a["a"](t),this.load(t).then(t=>(this.packaging=new T(t),this.unpack(this.packaging)))}openManifest(t){return this.path=new a["a"](t),this.load(t).then(t=>(this.packaging=new T,this.packaging.load(t),this.unpack(this.packaging)))}load(t){var e=this.resolve(t);return this.archived?this.archive.request(e):this.request(e,null,this.settings.requestCredentials,this.settings.requestHeaders)}resolve(t,e){if(t){var i=t,n=t.indexOf("://")>-1;return n?t:(this.path&&(i=this.path.resolve(t)),0!=e&&this.url&&(i=this.url.resolve(i)),i)}}canonical(t){var e=t;return t?(e=this.settings.canonical?this.settings.canonical(t):this.resolve(t,!0),e):""}determineType(t){var e,i,n;return"base64"===this.settings.encoding?J.BASE64:"string"!=typeof t?J.BINARY:(e=new o["a"](t),i=e.path(),n=i.extension,n&&(n=n.replace(/\?.*$/,"")),n?"epub"===n?J.EPUB:"opf"===n?J.OPF:"json"===n?J.MANIFEST:void 0:J.DIRECTORY)}unpack(t){this.package=t,""===this.packaging.metadata.layout?this.load(this.url.resolve($)).then(t=>{this.displayOptions=new G(t),this.loading.displayOptions.resolve(this.displayOptions)}).catch(t=>{this.displayOptions=new G,this.loading.displayOptions.resolve(this.displayOptions)}):(this.displayOptions=new G,this.loading.displayOptions.resolve(this.displayOptions)),this.spine.unpack(this.packaging,this.resolve.bind(this),this.canonical.bind(this)),this.resources=new P(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&&"none"!=this.settings.replacements?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(t){let e=t.navPath||t.ncxPath,i=t.toc;return i?new Promise((e,n)=>{this.navigation=new A(i),t.pageList&&(this.pageList=new j(t.pageList)),e(this.navigation)}):e?this.load(e,"xml").then(t=>(this.navigation=new A(t),this.pageList=new j(t),this.navigation)):new Promise((t,e)=>{this.navigation=new A,this.pageList=new j,t(this.navigation)})}section(t){return this.spine.get(t)}renderTo(t,e){return this.rendition=new U["a"](this,e),this.rendition.attachTo(t),this.rendition}setRequestCredentials(t){this.settings.requestCredentials=t}setRequestHeaders(t){this.settings.requestHeaders=t}unarchive(t,e){return this.archive=new q,this.archive.open(t,e)}store(t){let e=this.settings.replacements&&"none"!==this.settings.replacements,i=this.url,n=this.settings.requestMethod||d.bind(this);return this.storage=new Z(t,n,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 t=(t,e)=>{e.output=this.resources.substitute(t,e.url)};this.resources.settings.replacements=e||"blobUrl",this.resources.replacements().then(()=>this.resources.replaceCss()),this.storage.on("offline",()=>{this.url=new o["a"]("/",""),this.spine.hooks.serialize.register(t)}),this.storage.on("online",()=>{this.url=i,this.spine.hooks.serialize.deregister(t)})}),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((t,e)=>{e.output=this.resources.substitute(t,e.url)}),this.resources.replacements().then(()=>this.resources.replaceCss())}getRange(t){var e=new h["a"](t),i=this.spine.get(e.spinePos),n=this.load.bind(this);return i?i.load(n).then((function(t){var n=e.toRange(i.document);return n})):new Promise((t,e)=>{e("CFI could not be found")})}key(t){var e=t||this.packaging.metadata.identifier||this.url.filename;return`epubjs:${y["b"]}:${e}`}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}}r()(Q.prototype);e["a"]=Q},aedf:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Underline=e.Highlight=e.Mark=e.Pane=void 0;var n=function t(e,i,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,i);if(void 0===r){var s=Object.getPrototypeOf(e);return null===s?void 0:t(s,i,n)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(n):void 0},r=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),s=i("894b"),o=l(s),a=i("d210"),h=l(a);function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function u(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.Pane=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;d(this,t),this.target=e,this.element=o.default.createElement("svg"),this.marks=[],this.element.style.position="absolute",this.element.setAttribute("pointer-events","none"),h.default.proxyMouse(this.target,this.marks),this.container=i,this.container.appendChild(this.element),this.render()}return r(t,[{key:"addMark",value:function(t){var e=o.default.createElement("g");return this.element.appendChild(e),t.bind(e,this.container),this.marks.push(t),t.render(),t}},{key:"removeMark",value:function(t){var e=this.marks.indexOf(t);if(-1!==e){var i=t.unbind();this.element.removeChild(i),this.marks.splice(e,1)}}},{key:"render",value:function(){g(this.element,m(this.target,this.container));var t=!0,e=!1,i=void 0;try{for(var n,r=this.marks[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var s=n.value;s.render()}}catch(o){e=!0,i=o}finally{try{!t&&r.return&&r.return()}finally{if(e)throw i}}}}]),t}();var f=e.Mark=function(){function t(){d(this,t),this.element=null}return r(t,[{key:"bind",value:function(t,e){this.element=t,this.container=e}},{key:"unbind",value:function(){var t=this.element;return this.element=null,t}},{key:"render",value:function(){}},{key:"dispatchEvent",value:function(t){this.element&&this.element.dispatchEvent(t)}},{key:"getBoundingClientRect",value:function(){return this.element.getBoundingClientRect()}},{key:"getClientRects",value:function(){var t=[],e=this.element.firstChild;while(e)t.push(e.getBoundingClientRect()),e=e.nextSibling;return t}},{key:"filteredRanges",value:function(){var t=Array.from(this.range.getClientRects());return t.filter((function(e){for(var i=0;i<t.length;i++){if(t[i]===e)return!0;var n=v(t[i],e);if(n)return!1}return!0}))}}]),t}(),p=e.Highlight=function(t){function e(t,i,n,r){d(this,e);var s=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return s.range=t,s.className=i,s.data=n||{},s.attributes=r||{},s}return u(e,t),r(e,[{key:"bind",value:function(t,i){for(var r in n(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"bind",this).call(this,t,i),this.data)this.data.hasOwnProperty(r)&&(this.element.dataset[r]=this.data[r]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&this.element.setAttribute(r,this.attributes[r]);this.className&&this.element.classList.add(this.className)}},{key:"render",value:function(){while(this.element.firstChild)this.element.removeChild(this.element.firstChild);for(var t=this.element.ownerDocument.createDocumentFragment(),e=this.filteredRanges(),i=this.element.getBoundingClientRect(),n=this.container.getBoundingClientRect(),r=0,s=e.length;r<s;r++){var a=e[r],h=o.default.createElement("rect");h.setAttribute("x",a.left-i.left+n.left),h.setAttribute("y",a.top-i.top+n.top),h.setAttribute("height",a.height),h.setAttribute("width",a.width),t.appendChild(h)}this.element.appendChild(t)}}]),e}(f);e.Underline=function(t){function e(t,i,n,r){return d(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i,n,r))}return u(e,t),r(e,[{key:"render",value:function(){while(this.element.firstChild)this.element.removeChild(this.element.firstChild);for(var t=this.element.ownerDocument.createDocumentFragment(),e=this.filteredRanges(),i=this.element.getBoundingClientRect(),n=this.container.getBoundingClientRect(),r=0,s=e.length;r<s;r++){var a=e[r],h=o.default.createElement("rect");h.setAttribute("x",a.left-i.left+n.left),h.setAttribute("y",a.top-i.top+n.top),h.setAttribute("height",a.height),h.setAttribute("width",a.width),h.setAttribute("fill","none");var l=o.default.createElement("line");l.setAttribute("x1",a.left-i.left+n.left),l.setAttribute("x2",a.left-i.left+n.left+a.width),l.setAttribute("y1",a.top-i.top+n.top+a.height-1),l.setAttribute("y2",a.top-i.top+n.top+a.height-1),l.setAttribute("stroke-width",1),l.setAttribute("stroke","black"),l.setAttribute("stroke-linecap","square"),t.appendChild(h),t.appendChild(l)}this.element.appendChild(t)}}]),e}(p);function m(t,e){var i=e.getBoundingClientRect(),n=t.getBoundingClientRect();return{top:n.top-i.top,left:n.left-i.left,height:t.scrollHeight,width:t.scrollWidth}}function g(t,e){t.style.setProperty("top",e.top+"px","important"),t.style.setProperty("left",e.left+"px","important"),t.style.setProperty("height",e.height+"px","important"),t.style.setProperty("width",e.width+"px","important")}function v(t,e){return e.right<=t.right&&e.left>=t.left&&e.top>=t.top&&e.bottom<=t.bottom}},b047:function(t,e,i){var n=i("1a8c"),r=i("408c"),s=i("b4b0"),o="Expected a function",a=Math.max,h=Math.min;function l(t,e,i){var l,c,u,d,f,p,m=0,g=!1,v=!1,w=!0;if("function"!=typeof t)throw new TypeError(o);function y(e){var i=l,n=c;return l=c=void 0,m=e,d=t.apply(n,i),d}function b(t){return m=t,f=setTimeout(E,e),g?y(t):d}function _(t){var i=t-p,n=t-m,r=e-i;return v?h(r,u-n):r}function x(t){var i=t-p,n=t-m;return void 0===p||i>=e||i<0||v&&n>=u}function E(){var t=r();if(x(t))return k(t);f=setTimeout(E,_(t))}function k(t){return f=void 0,w&&l?y(t):(l=c=void 0,d)}function S(){void 0!==f&&clearTimeout(f),m=0,l=p=c=f=void 0}function C(){return void 0===f?d:k(r())}function T(){var t=r(),i=x(t);if(l=arguments,c=this,p=t,i){if(void 0===f)return b(p);if(v)return clearTimeout(f),f=setTimeout(E,e),y(p)}return void 0===f&&(f=setTimeout(E,e)),d}return e=s(e)||0,n(i)&&(g=!!i.leading,v="maxWait"in i,u=v?a(s(i.maxWait)||0,e):u,w="trailing"in i?!!i.trailing:w),T.cancel=S,T.flush=C,T}t.exports=l},b4b0:function(t,e,i){var n=i("8d74"),r=i("1a8c"),s=i("ffd6"),o=NaN,a=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function u(t){if("number"==typeof t)return t;if(s(t))return o;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var i=h.test(t);return i||l.test(t)?c(t.slice(2),i?2:8):a.test(t)?o:+t}t.exports=u},b639:function(t,e,i){"use strict";(function(t){
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
var n=i("1fb5"),r=i("9152"),s=i("e3db");function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function h(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=l.prototype):(null===t&&(t=new l(e)),t.length=e),t}function l(t,e,i){if(!l.TYPED_ARRAY_SUPPORT&&!(this instanceof l))return new l(t,e,i);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,e,i)}function c(t,e,i,n){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?g(t,e,i,n):"string"===typeof e?p(t,e,i):v(t,e)}function u(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,e,i,n){return u(e),e<=0?h(t,e):void 0!==i?"string"===typeof n?h(t,e).fill(i,n):h(t,e).fill(i):h(t,e)}function f(t,e){if(u(e),t=h(t,e<0?0:0|w(e)),!l.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function p(t,e,i){if("string"===typeof i&&""!==i||(i="utf8"),!l.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|b(e,i);t=h(t,n);var r=t.write(e,i);return r!==n&&(t=t.slice(0,r)),t}function m(t,e){var i=e.length<0?0:0|w(e.length);t=h(t,i);for(var n=0;n<i;n+=1)t[n]=255&e[n];return t}function g(t,e,i,n){if(e.byteLength,i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===i&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,i):new Uint8Array(e,i,n),l.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=l.prototype):t=m(t,e),t}function v(t,e){if(l.isBuffer(e)){var i=0|w(e.length);return t=h(t,i),0===t.length?t:(e.copy(t,0,0,i),t)}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||et(e.length)?h(t,0):m(t,e);if("Buffer"===e.type&&s(e.data))return m(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function y(t){return+t!=t&&(t=0),l.alloc(+t)}function b(t,e){if(l.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var i=t.length;if(0===i)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return Q(t).length;default:if(n)return K(t).length;e=(""+e).toLowerCase(),n=!0}}function _(t,e,i){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if(i>>>=0,e>>>=0,i<=e)return"";t||(t="utf8");while(1)switch(t){case"hex":return B(this,e,i);case"utf8":case"utf-8":return I(this,e,i);case"ascii":return D(this,e,i);case"latin1":case"binary":return P(this,e,i);case"base64":return R(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,i);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function x(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function E(t,e,i,n,r){if(0===t.length)return-1;if("string"===typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(r)return-1;i=t.length-1}else if(i<0){if(!r)return-1;i=0}if("string"===typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:k(t,e,i,n,r);if("number"===typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):k(t,[e],i,n,r);throw new TypeError("val must be string, number or Buffer")}function k(t,e,i,n,r){var s,o=1,a=t.length,h=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,a/=2,h/=2,i/=2}function l(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(r){var c=-1;for(s=i;s<a;s++)if(l(t,s)===l(e,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===h)return c*o}else-1!==c&&(s-=s-c),c=-1}else for(i+h>a&&(i=a-h),s=i;s>=0;s--){for(var u=!0,d=0;d<h;d++)if(l(t,s+d)!==l(e,d)){u=!1;break}if(u)return s}return-1}function S(t,e,i,n){i=Number(i)||0;var r=t.length-i;n?(n=Number(n),n>r&&(n=r)):n=r;var s=e.length;if(s%2!==0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))return o;t[i+o]=a}return o}function C(t,e,i,n){return tt(K(e,t.length-i),t,i,n)}function T(t,e,i,n){return tt($(e),t,i,n)}function O(t,e,i,n){return T(t,e,i,n)}function A(t,e,i,n){return tt(Q(e),t,i,n)}function N(t,e,i,n){return tt(J(e,t.length-i),t,i,n)}function R(t,e,i){return 0===e&&i===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,i))}function I(t,e,i){i=Math.min(t.length,i);var n=[],r=e;while(r<i){var s,o,a,h,l=t[r],c=null,u=l>239?4:l>223?3:l>191?2:1;if(r+u<=i)switch(u){case 1:l<128&&(c=l);break;case 2:s=t[r+1],128===(192&s)&&(h=(31&l)<<6|63&s,h>127&&(c=h));break;case 3:s=t[r+1],o=t[r+2],128===(192&s)&&128===(192&o)&&(h=(15&l)<<12|(63&s)<<6|63&o,h>2047&&(h<55296||h>57343)&&(c=h));break;case 4:s=t[r+1],o=t[r+2],a=t[r+3],128===(192&s)&&128===(192&o)&&128===(192&a)&&(h=(15&l)<<18|(63&s)<<12|(63&o)<<6|63&a,h>65535&&h<1114112&&(c=h))}null===c?(c=65533,u=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),r+=u}return z(n)}e.Buffer=l,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:o(),e.kMaxLength=a(),l.poolSize=8192,l._augment=function(t){return t.__proto__=l.prototype,t},l.from=function(t,e,i){return c(null,t,e,i)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(t,e,i){return d(null,t,e,i)},l.allocUnsafe=function(t){return f(null,t)},l.allocUnsafeSlow=function(t){return f(null,t)},l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,n=e.length,r=0,s=Math.min(i,n);r<s;++r)if(t[r]!==e[r]){i=t[r],n=e[r];break}return i<n?-1:n<i?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!s(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var n=l.allocUnsafe(e),r=0;for(i=0;i<t.length;++i){var o=t[i];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,r),r+=o.length}return n},l.byteLength=b,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)x(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)x(this,e,e+3),x(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)x(this,e,e+7),x(this,e+1,e+6),x(this,e+2,e+5),x(this,e+3,e+4);return this},l.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?I(this,0,t):_.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",i=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),"<Buffer "+t+">"},l.prototype.compare=function(t,e,i,n,r){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),e<0||i>t.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&e>=i)return 0;if(n>=r)return-1;if(e>=i)return 1;if(e>>>=0,i>>>=0,n>>>=0,r>>>=0,this===t)return 0;for(var s=r-n,o=i-e,a=Math.min(s,o),h=this.slice(n,r),c=t.slice(e,i),u=0;u<a;++u)if(h[u]!==c[u]){s=h[u],o=c[u];break}return s<o?-1:o<s?1:0},l.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},l.prototype.indexOf=function(t,e,i){return E(this,t,e,i,!0)},l.prototype.lastIndexOf=function(t,e,i){return E(this,t,e,i,!1)},l.prototype.write=function(t,e,i,n){if(void 0===e)n="utf8",i=this.length,e=0;else if(void 0===i&&"string"===typeof e)n=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-e;if((void 0===i||i>r)&&(i=r),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return S(this,t,e,i);case"utf8":case"utf-8":return C(this,t,e,i);case"ascii":return T(this,t,e,i);case"latin1":case"binary":return O(this,t,e,i);case"base64":return A(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,e,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var L=4096;function z(t){var e=t.length;if(e<=L)return String.fromCharCode.apply(String,t);var i="",n=0;while(n<e)i+=String.fromCharCode.apply(String,t.slice(n,n+=L));return i}function D(t,e,i){var n="";i=Math.min(t.length,i);for(var r=e;r<i;++r)n+=String.fromCharCode(127&t[r]);return n}function P(t,e,i){var n="";i=Math.min(t.length,i);for(var r=e;r<i;++r)n+=String.fromCharCode(t[r]);return n}function B(t,e,i){var n=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>n)&&(i=n);for(var r="",s=e;s<i;++s)r+=G(t[s]);return r}function j(t,e,i){for(var n=t.slice(e,i),r="",s=0;s<n.length;s+=2)r+=String.fromCharCode(n[s]+256*n[s+1]);return r}function U(t,e,i){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>i)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,i,n,r,s){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<s)throw new RangeError('"value" argument is out of bounds');if(i+n>t.length)throw new RangeError("Index out of range")}function F(t,e,i,n){e<0&&(e=65535+e+1);for(var r=0,s=Math.min(t.length-i,2);r<s;++r)t[i+r]=(e&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function W(t,e,i,n){e<0&&(e=4294967295+e+1);for(var r=0,s=Math.min(t.length-i,4);r<s;++r)t[i+r]=e>>>8*(n?r:3-r)&255}function q(t,e,i,n,r,s){if(i+n>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function H(t,e,i,n,s){return s||q(t,e,i,4,34028234663852886e22,-34028234663852886e22),r.write(t,e,i,n,23,4),i+4}function Y(t,e,i,n,s){return s||q(t,e,i,8,17976931348623157e292,-17976931348623157e292),r.write(t,e,i,n,52,8),i+8}l.prototype.slice=function(t,e){var i,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=l.prototype;else{var r=e-t;i=new l(r,void 0);for(var s=0;s<r;++s)i[s]=this[s+t]}return i},l.prototype.readUIntLE=function(t,e,i){t|=0,e|=0,i||U(t,e,this.length);var n=this[t],r=1,s=0;while(++s<e&&(r*=256))n+=this[t+s]*r;return n},l.prototype.readUIntBE=function(t,e,i){t|=0,e|=0,i||U(t,e,this.length);var n=this[t+--e],r=1;while(e>0&&(r*=256))n+=this[t+--e]*r;return n},l.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||U(t,e,this.length);var n=this[t],r=1,s=0;while(++s<e&&(r*=256))n+=this[t+s]*r;return r*=128,n>=r&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||U(t,e,this.length);var n=e,r=1,s=this[t+--n];while(n>0&&(r*=256))s+=this[t+--n]*r;return r*=128,s>=r&&(s-=Math.pow(2,8*e)),s},l.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,i,n){if(t=+t,e|=0,i|=0,!n){var r=Math.pow(2,8*i)-1;M(this,t,e,i,r,0)}var s=1,o=0;this[e]=255&t;while(++o<i&&(s*=256))this[e+o]=t/s&255;return e+i},l.prototype.writeUIntBE=function(t,e,i,n){if(t=+t,e|=0,i|=0,!n){var r=Math.pow(2,8*i)-1;M(this,t,e,i,r,0)}var s=i-1,o=1;this[e+s]=255&t;while(--s>=0&&(o*=256))this[e+s]=t/o&255;return e+i},l.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):W(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):W(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*i-1);M(this,t,e,i,r-1,-r)}var s=0,o=1,a=0;this[e]=255&t;while(++s<i&&(o*=256))t<0&&0===a&&0!==this[e+s-1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+i},l.prototype.writeIntBE=function(t,e,i,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*i-1);M(this,t,e,i,r-1,-r)}var s=i-1,o=1,a=0;this[e+s]=255&t;while(--s>=0&&(o*=256))t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+i},l.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):W(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):W(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,i){return H(this,t,e,!0,i)},l.prototype.writeFloatBE=function(t,e,i){return H(this,t,e,!1,i)},l.prototype.writeDoubleLE=function(t,e,i){return Y(this,t,e,!0,i)},l.prototype.writeDoubleBE=function(t,e,i){return Y(this,t,e,!1,i)},l.prototype.copy=function(t,e,i,n){if(i||(i=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-i&&(n=t.length-e+i);var r,s=n-i;if(this===t&&i<e&&e<n)for(r=s-1;r>=0;--r)t[r+e]=this[r+i];else if(s<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r<s;++r)t[r+e]=this[r+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+s),e);return s},l.prototype.fill=function(t,e,i,n){if("string"===typeof t){if("string"===typeof e?(n=e,e=0,i=this.length):"string"===typeof i&&(n=i,i=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}if(void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;var s;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"===typeof t)for(s=e;s<i;++s)this[s]=t;else{var o=l.isBuffer(t)?t:K(new l(t,n).toString()),a=o.length;for(s=0;s<i-e;++s)this[s+e]=o[s%a]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function Z(t){if(t=X(t).replace(V,""),t.length<2)return"";while(t.length%4!==0)t+="=";return t}function X(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,e){var i;e=e||1/0;for(var n=t.length,r=null,s=[],o=0;o<n;++o){if(i=t.charCodeAt(o),i>55295&&i<57344){if(!r){if(i>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}r=i;continue}if(i<56320){(e-=3)>-1&&s.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(e-=3)>-1&&s.push(239,191,189);if(r=null,i<128){if((e-=1)<0)break;s.push(i)}else if(i<2048){if((e-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return s}function $(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}function J(t,e){for(var i,n,r,s=[],o=0;o<t.length;++o){if((e-=2)<0)break;i=t.charCodeAt(o),n=i>>8,r=i%256,s.push(r),s.push(n)}return s}function Q(t){return n.toByteArray(Z(t))}function tt(t,e,i,n){for(var r=0;r<n;++r){if(r+i>=e.length||r>=t.length)break;e[r+i]=t[r]}return r}function et(t){return t!==t}}).call(this,i("c8ba"))},c1dd:function(t,e){function i(t,e){for(var i in t)e[i]=t[i]}function n(t,e){var n=t.prototype;if(!(n instanceof e)){function r(){}r.prototype=e.prototype,r=new r,i(n,r),t.prototype=n=r}n.constructor!=t&&("function"!=typeof t&&console.error("unknow Class:"+t),n.constructor=t)}var r="http://www.w3.org/1999/xhtml",s={},o=s.ELEMENT_NODE=1,a=s.ATTRIBUTE_NODE=2,h=s.TEXT_NODE=3,l=s.CDATA_SECTION_NODE=4,c=s.ENTITY_REFERENCE_NODE=5,u=s.ENTITY_NODE=6,d=s.PROCESSING_INSTRUCTION_NODE=7,f=s.COMMENT_NODE=8,p=s.DOCUMENT_NODE=9,m=s.DOCUMENT_TYPE_NODE=10,g=s.DOCUMENT_FRAGMENT_NODE=11,v=s.NOTATION_NODE=12,w={},y={},b=(w.INDEX_SIZE_ERR=(y[1]="Index size error",1),w.DOMSTRING_SIZE_ERR=(y[2]="DOMString size error",2),w.HIERARCHY_REQUEST_ERR=(y[3]="Hierarchy request error",3)),_=(w.WRONG_DOCUMENT_ERR=(y[4]="Wrong document",4),w.INVALID_CHARACTER_ERR=(y[5]="Invalid character",5),w.NO_DATA_ALLOWED_ERR=(y[6]="No data allowed",6),w.NO_MODIFICATION_ALLOWED_ERR=(y[7]="No modification allowed",7),w.NOT_FOUND_ERR=(y[8]="Not found",8)),x=(w.NOT_SUPPORTED_ERR=(y[9]="Not supported",9),w.INUSE_ATTRIBUTE_ERR=(y[10]="Attribute in use",10));w.INVALID_STATE_ERR=(y[11]="Invalid state",11),w.SYNTAX_ERR=(y[12]="Syntax error",12),w.INVALID_MODIFICATION_ERR=(y[13]="Invalid modification",13),w.NAMESPACE_ERR=(y[14]="Invalid namespace",14),w.INVALID_ACCESS_ERR=(y[15]="Invalid access",15);function E(t,e){if(e instanceof Error)var i=e;else i=this,Error.call(this,y[t]),this.message=y[t],Error.captureStackTrace&&Error.captureStackTrace(this,E);return i.code=t,e&&(this.message=this.message+": "+e),i}function k(){}function S(t,e){this._node=t,this._refresh=e,C(this)}function C(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var n=t._refresh(t._node);ot(t,"length",n.length),i(n,t),t._inc=e}}function T(){}function O(t,e){var i=t.length;while(i--)if(t[i]===e)return i}function A(t,e,i,n){if(n?e[O(e,n)]=i:e[e.length++]=i,t){i.ownerElement=t;var r=t.ownerDocument;r&&(n&&B(r,t,n),P(r,t,i))}}function N(t,e,i){var n=O(e,i);if(!(n>=0))throw E(_,new Error(t.tagName+"@"+i));var r=e.length-1;while(n<r)e[n]=e[++n];if(e.length=r,t){var s=t.ownerDocument;s&&(B(s,t,i),i.ownerElement=null)}}function R(t){if(this._features={},t)for(var e in t)this._features=t[e]}function I(){}function L(t){return("<"==t?"<":">"==t&&">")||"&"==t&&"&"||'"'==t&&"""||"&#"+t.charCodeAt()+";"}function z(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(z(t,e))return!0}while(t=t.nextSibling)}function D(){}function P(t,e,i){t&&t._inc++;var n=i.namespaceURI;"http://www.w3.org/2000/xmlns/"==n&&(e._nsMap[i.prefix?i.localName:""]=i.value)}function B(t,e,i,n){t&&t._inc++;var r=i.namespaceURI;"http://www.w3.org/2000/xmlns/"==r&&delete e._nsMap[i.prefix?i.localName:""]}function j(t,e,i){if(t&&t._inc){t._inc++;var n=e.childNodes;if(i)n[n.length++]=i;else{var r=e.firstChild,s=0;while(r)n[s++]=r,r=r.nextSibling;n.length=s}}}function U(t,e){var i=e.previousSibling,n=e.nextSibling;return i?i.nextSibling=n:t.firstChild=n,n?n.previousSibling=i:t.lastChild=i,j(t.ownerDocument,t),e}function M(t,e,i){var n=e.parentNode;if(n&&n.removeChild(e),e.nodeType===g){var r=e.firstChild;if(null==r)return e;var s=e.lastChild}else r=s=e;var o=i?i.previousSibling:t.lastChild;r.previousSibling=o,s.nextSibling=i,o?o.nextSibling=r:t.firstChild=r,null==i?t.lastChild=s:i.previousSibling=s;do{r.parentNode=t}while(r!==s&&(r=r.nextSibling));return j(t.ownerDocument||t,t),e.nodeType==g&&(e.firstChild=e.lastChild=null),e}function F(t,e){var i=e.parentNode;if(i){var n=t.lastChild;i.removeChild(e);n=t.lastChild}n=t.lastChild;return e.parentNode=t,e.previousSibling=n,e.nextSibling=null,n?n.nextSibling=e:t.firstChild=e,t.lastChild=e,j(t.ownerDocument,t,e),e}function W(){this._nsMap={}}function q(){}function H(){}function Y(){}function V(){}function Z(){}function X(){}function G(){}function K(){}function $(){}function J(){}function Q(){}function tt(){}function et(t,e){var i=[],n=9==this.nodeType&&this.documentElement||this,r=n.prefix,s=n.namespaceURI;if(s&&null==r){r=n.lookupPrefix(s);if(null==r)var o=[{namespace:s,prefix:null}]}return nt(this,i,t,e,o),i.join("")}function it(t,e,i){var n=t.prefix||"",r=t.namespaceURI;if(!n&&!r)return!1;if("xml"===n&&"http://www.w3.org/XML/1998/namespace"===r||"http://www.w3.org/2000/xmlns/"==r)return!1;var s=i.length;while(s--){var o=i[s];if(o.prefix==n)return o.namespace!=r}return!0}function nt(t,e,i,n,s){if(n){if(t=n(t),!t)return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case o:s||(s=[]);s.length;var u=t.attributes,v=u.length,w=t.firstChild,y=t.tagName;i=r===t.namespaceURI||i,e.push("<",y);for(var b=0;b<v;b++){var _=u.item(b);"xmlns"==_.prefix?s.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&s.push({prefix:"",namespace:_.value})}for(b=0;b<v;b++){_=u.item(b);if(it(_,i,s)){var x=_.prefix||"",E=_.namespaceURI,k=x?" xmlns:"+x:" xmlns";e.push(k,'="',E,'"'),s.push({prefix:x,namespace:E})}nt(_,e,i,n,s)}if(it(t,i,s)){x=t.prefix||"",E=t.namespaceURI;if(E){k=x?" xmlns:"+x:" xmlns";e.push(k,'="',E,'"'),s.push({prefix:x,namespace:E})}}if(w||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(y)){if(e.push(">"),i&&/^script$/i.test(y))while(w)w.data?e.push(w.data):nt(w,e,i,n,s),w=w.nextSibling;else while(w)nt(w,e,i,n,s),w=w.nextSibling;e.push("</",y,">")}else e.push("/>");return;case p:case g:w=t.firstChild;while(w)nt(w,e,i,n,s),w=w.nextSibling;return;case a:return e.push(" ",t.name,'="',t.value.replace(/[<&"]/g,L),'"');case h:return e.push(t.data.replace(/[<&]/g,L).replace(/]]>/g,"]]>"));case l:return e.push("<![CDATA[",t.data,"]]>");case f:return e.push("\x3c!--",t.data,"--\x3e");case m:var S=t.publicId,C=t.systemId;if(e.push("<!DOCTYPE ",t.name),S)e.push(" PUBLIC ",S),C&&"."!=C&&e.push(" ",C),e.push(">");else if(C&&"."!=C)e.push(" SYSTEM ",C,">");else{var T=t.internalSubset;T&&e.push(" [",T,"]"),e.push(">")}return;case d:return e.push("<?",t.target," ",t.data,"?>");case c:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function rt(t,e,i){var n;switch(e.nodeType){case o:n=e.cloneNode(!1),n.ownerDocument=t;case g:break;case a:i=!0;break}if(n||(n=e.cloneNode(!1)),n.ownerDocument=t,n.parentNode=null,i){var r=e.firstChild;while(r)n.appendChild(rt(t,r,i)),r=r.nextSibling}return n}function st(t,e,i){var n=new e.constructor;for(var r in e){var s=e[r];"object"!=typeof s&&s!=n[r]&&(n[r]=s)}switch(e.childNodes&&(n.childNodes=new k),n.ownerDocument=t,n.nodeType){case o:var h=e.attributes,l=n.attributes=new T,c=h.length;l._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode(st(t,h.item(u),!0));break;case a:i=!0}if(i){var d=e.firstChild;while(d)n.appendChild(st(t,d,i)),d=d.nextSibling}return n}function ot(t,e,i){t[e]=i}E.prototype=Error.prototype,i(w,E),k.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var i=[],n=0;n<this.length;n++)nt(this[n],i,t,e);return i.join("")}},S.prototype.item=function(t){return C(this),this[t]},n(S,k),T.prototype={length:0,item:k.prototype.item,getNamedItem:function(t){var e=this.length;while(e--){var i=this[e];if(i.nodeName==t)return i}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new E(x);var i=this.getNamedItem(t.nodeName);return A(this._ownerElement,this,t,i),i},setNamedItemNS:function(t){var e,i=t.ownerElement;if(i&&i!=this._ownerElement)throw new E(x);return e=this.getNamedItemNS(t.namespaceURI,t.localName),A(this._ownerElement,this,t,e),e},removeNamedItem:function(t){var e=this.getNamedItem(t);return N(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var i=this.getNamedItemNS(t,e);return N(this._ownerElement,this,i),i},getNamedItemNS:function(t,e){var i=this.length;while(i--){var n=this[i];if(n.localName==e&&n.namespaceURI==t)return n}return null}},R.prototype={hasFeature:function(t,e){var i=this._features[t.toLowerCase()];return!(!i||e&&!(e in i))},createDocument:function(t,e,i){var n=new D;if(n.implementation=this,n.childNodes=new k,n.doctype=i,i&&n.appendChild(i),e){var r=n.createElementNS(t,e);n.appendChild(r)}return n},createDocumentType:function(t,e,i){var n=new X;return n.name=t,n.nodeName=t,n.publicId=e,n.systemId=i,n}},I.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(t,e){return M(this,t,e)},replaceChild:function(t,e){this.insertBefore(t,e),e&&this.removeChild(e)},removeChild:function(t){return U(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return st(this.ownerDocument||this,this,t)},normalize:function(){var t=this.firstChild;while(t){var e=t.nextSibling;e&&e.nodeType==h&&t.nodeType==h?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){var e=this;while(e){var i=e._nsMap;if(i)for(var n in i)if(i[n]==t)return n;e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){var e=this;while(e){var i=e._nsMap;if(i&&t in i)return i[t];e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return null==e}},i(s,I),i(s,I.prototype),D.prototype={nodeName:"#document",nodeType:p,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==g){var i=t.firstChild;while(i){var n=i.nextSibling;this.insertBefore(i,e),i=n}return t}return null==this.documentElement&&t.nodeType==o&&(this.documentElement=t),M(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),U(this,t)},importNode:function(t,e){return rt(this,t,e)},getElementById:function(t){var e=null;return z(this.documentElement,(function(i){if(i.nodeType==o&&i.getAttribute("id")==t)return e=i,!0})),e},getElementsByClassName:function(t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return new S(this,(function(t){var i=[];return z(t.documentElement,(function(n){n!==t&&n.nodeType==o&&e.test(n.getAttribute("class"))&&i.push(n)})),i}))},createElement:function(t){var e=new W;e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new k;var i=e.attributes=new T;return i._ownerElement=e,e},createDocumentFragment:function(){var t=new J;return t.ownerDocument=this,t.childNodes=new k,t},createTextNode:function(t){var e=new Y;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new V;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new Z;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var i=new Q;return i.ownerDocument=this,i.tagName=i.target=t,i.nodeValue=i.data=e,i},createAttribute:function(t){var e=new q;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new $;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var i=new W,n=e.split(":"),r=i.attributes=new T;return i.childNodes=new k,i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=t,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=e,r._ownerElement=i,i},createAttributeNS:function(t,e){var i=new q,n=e.split(":");return i.ownerDocument=this,i.nodeName=e,i.name=e,i.namespaceURI=t,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=e,i}},n(D,I),W.prototype={nodeType:o,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var i=this.ownerDocument.createAttribute(t);i.value=i.nodeValue=""+e,this.setAttributeNode(i)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===g?this.insertBefore(t,null):F(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);i&&this.removeAttributeNode(i)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);return i&&i.value||""},setAttributeNS:function(t,e,i){var n=this.ownerDocument.createAttributeNS(t,e);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new S(this,(function(e){var i=[];return z(e,(function(n){n===e||n.nodeType!=o||"*"!==t&&n.tagName!=t||i.push(n)})),i}))},getElementsByTagNameNS:function(t,e){return new S(this,(function(i){var n=[];return z(i,(function(r){r===i||r.nodeType!==o||"*"!==t&&r.namespaceURI!==t||"*"!==e&&r.localName!=e||n.push(r)})),n}))}},D.prototype.getElementsByTagName=W.prototype.getElementsByTagName,D.prototype.getElementsByTagNameNS=W.prototype.getElementsByTagNameNS,n(W,I),q.prototype.nodeType=a,n(q,I),H.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(y[b])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,i){var n=this.data.substring(0,t),r=this.data.substring(t+e);i=n+i+r,this.nodeValue=this.data=i,this.length=i.length}},n(H,I),Y.prototype={nodeName:"#text",nodeType:h,splitText:function(t){var e=this.data,i=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},n(Y,H),V.prototype={nodeName:"#comment",nodeType:f},n(V,H),Z.prototype={nodeName:"#cdata-section",nodeType:l},n(Z,H),X.prototype.nodeType=m,n(X,I),G.prototype.nodeType=v,n(G,I),K.prototype.nodeType=u,n(K,I),$.prototype.nodeType=c,n($,I),J.prototype.nodeName="#document-fragment",J.prototype.nodeType=g,n(J,I),Q.prototype.nodeType=d,n(Q,I),tt.prototype.serializeToString=function(t,e,i){return et.call(t,e,i)},I.prototype.toString=et;try{if(Object.defineProperty){function at(t){switch(t.nodeType){case o:case g:var e=[];t=t.firstChild;while(t)7!==t.nodeType&&8!==t.nodeType&&e.push(at(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}}Object.defineProperty(S.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){return at(this)},set:function(t){switch(this.nodeType){case o:case g:while(this.firstChild)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),ot=function(t,e,i){t["$$"+e]=i}}}catch(ht){}e.Node=I,e.DOMException=E,e.DOMImplementation=R,e.XMLSerializer=tt},c9fc:function(t,e,i){"use strict";var n,r,s,o,a,h,l,c=i("f508"),u=i("1a94"),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,m=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,w={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var i;return u(e),v.call(this,"__ee__")?i=this.__ee__:(i=w.value=p(null),m(this,"__ee__",w),w.value=null),i[t]?"object"===typeof i[t]?i[t].push(e):i[t]=[i[t],e]:i[t]=e,this},r=function(t,e){var i,r;return u(e),r=this,n.call(this,t,i=function(){s.call(r,t,i),d.call(e,this,arguments)}),i.__eeOnceListener__=e,this},s=function(t,e){var i,n,r,s;if(u(e),!v.call(this,"__ee__"))return this;if(i=this.__ee__,!i[t])return this;if(n=i[t],"object"===typeof n)for(s=0;r=n[s];++s)r!==e&&r.__eeOnceListener__!==e||(2===n.length?i[t]=n[s?0:1]:n.splice(s,1));else n!==e&&n.__eeOnceListener__!==e||delete i[t];return this},o=function(t){var e,i,n,r,s;if(v.call(this,"__ee__")&&(r=this.__ee__[t],r))if("object"===typeof r){for(i=arguments.length,s=new Array(i-1),e=1;e<i;++e)s[e-1]=arguments[e];for(r=r.slice(),e=0;n=r[e];++e)d.call(n,this,s)}else switch(arguments.length){case 1:f.call(r,this);break;case 2:f.call(r,this,arguments[1]);break;case 3:f.call(r,this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),e=1;e<i;++e)s[e-1]=arguments[e];d.call(r,this,s)}},a={on:n,once:r,off:s,emit:o},h={on:c(n),once:c(r),off:c(s),emit:c(o)},l=g({},h),t.exports=e=function(t){return null==t?p(l):g(Object(t),h)},e.methods=a},d210:function(t,e,i){"use strict";function n(t,e){function i(i){for(var n=e.length-1;n>=0;n--){var o=e[n],a=i.clientX,h=i.clientY;if(i.touches&&i.touches.length&&(a=i.touches[0].clientX,h=i.touches[0].clientY),s(o,t,a,h)){o.dispatchEvent(r(i));break}}}if("iframe"===t.nodeName||"IFRAME"===t.nodeName)try{this.target=t.contentDocument}catch(h){this.target=t}else this.target=t;for(var n=["mouseup","mousedown","click","touchstart"],o=0;o<n.length;o++){var a=n[o];this.target.addEventListener(a,(function(t){return i(t)}),!1)}}function r(t){var e=Object.assign({},t,{bubbles:!1});try{return new MouseEvent(t.type,e)}catch(n){var i=document.createEvent("MouseEvents");return i.initMouseEvent(t.type,!1,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),i}}function s(t,e,i,n){var r=e.getBoundingClientRect();function s(t,e,i){var n=t.top-r.top,s=t.left-r.left,o=n+t.height,a=s+t.width;return n<=i&&s<=e&&o>i&&a>e}var o=t.getBoundingClientRect();if(!s(o,i,n))return!1;for(var a=t.getClientRects(),h=0,l=a.length;h<l;h++)if(s(a[h],i,n))return!0;return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.proxyMouse=n,e.clone=r,e.default={proxyMouse:n}},d328:function(t,e,i){},d4a2:function(t,e){e.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},ddea:function(t,e,i){"use strict";var n=i("c9fc"),r=i.n(n),s=i("0b16"),o=i("8f8f"),a=i("55d4"),h=i("06d2"),l=i("aedf");class c{constructor(t,e){this.settings=Object(s["extend"])({ignoreClass:"",axis:void 0,direction:void 0,width:0,height:0,layout:void 0,globalLayoutProperties:{},method:void 0,forceRight:!1,allowScriptedContent:!1},e||{}),this.id="epubjs-view-"+Object(s["uuid"])(),this.section=t,this.index=t.index,this.element=this.container(this.settings.axis),this.added=!1,this.displayed=!1,this.rendered=!1,this.fixedWidth=0,this.fixedHeight=0,this.epubcfi=new o["a"],this.layout=this.settings.layout,this.pane=void 0,this.highlights={},this.underlines={},this.marks={}}container(t){var e=document.createElement("div");return e.classList.add("epub-view"),e.style.height="0px",e.style.width="0px",e.style.overflow="hidden",e.style.position="relative",e.style.display="block",e.style.flex=t&&"horizontal"==t?"none":"initial",e}create(){return this.iframe||(this.element||(this.element=this.createContainer()),this.iframe=document.createElement("iframe"),this.iframe.id=this.id,this.iframe.scrolling="no",this.iframe.style.overflow="hidden",this.iframe.seamless="seamless",this.iframe.style.border="none",this.iframe.sandbox="allow-same-origin",this.settings.allowScriptedContent&&this.section.properties.indexOf("scripted")>-1&&(this.iframe.sandbox+=" allow-scripts"),this.iframe.setAttribute("enable-annotation","true"),this.resizing=!0,this.element.style.visibility="hidden",this.iframe.style.visibility="hidden",this.iframe.style.width="0",this.iframe.style.height="0",this._width=0,this._height=0,this.element.setAttribute("ref",this.index),this.added=!0,this.elementBounds=Object(s["bounds"])(this.element),"srcdoc"in this.iframe?this.supportsSrcdoc=!0:this.supportsSrcdoc=!1,this.settings.method||(this.settings.method=this.supportsSrcdoc?"srcdoc":"write")),this.iframe}render(t,e){return this.create(),this.size(),this.sectionRender||(this.sectionRender=this.section.render(t)),this.sectionRender.then(function(t){return this.load(t)}.bind(this)).then(function(){let t,e=this.contents.writingMode();return t="scrolled"===this.settings.flow?0===e.indexOf("vertical")?"horizontal":"vertical":0===e.indexOf("vertical")?"vertical":"horizontal",0===e.indexOf("vertical")&&"paginated"===this.settings.flow&&(this.layout.delta=this.layout.height),this.setAxis(t),this.emit(h["c"].VIEWS.AXIS,t),this.setWritingMode(e),this.emit(h["c"].VIEWS.WRITING_MODE,e),this.layout.format(this.contents,this.section,this.axis),this.addListeners(),new Promise((t,e)=>{this.expand(),this.settings.forceRight&&(this.element.style.marginLeft=this.width()+"px"),t()})}.bind(this),function(t){return this.emit(h["c"].VIEWS.LOAD_ERROR,t),new Promise((e,i)=>{i(t)})}.bind(this)).then(function(){this.emit(h["c"].VIEWS.RENDERED,this.section)}.bind(this))}reset(){this.iframe&&(this.iframe.style.width="0",this.iframe.style.height="0",this._width=0,this._height=0,this._textWidth=void 0,this._contentWidth=void 0,this._textHeight=void 0,this._contentHeight=void 0),this._needsReframe=!0}size(t,e){var i=t||this.settings.width,n=e||this.settings.height;"pre-paginated"===this.layout.name?this.lock("both",i,n):"horizontal"===this.settings.axis?this.lock("height",i,n):this.lock("width",i,n),this.settings.width=i,this.settings.height=n}lock(t,e,i){var n,r=Object(s["borders"])(this.element);n=this.iframe?Object(s["borders"])(this.iframe):{width:0,height:0},"width"==t&&Object(s["isNumber"])(e)&&(this.lockedWidth=e-r.width-n.width),"height"==t&&Object(s["isNumber"])(i)&&(this.lockedHeight=i-r.height-n.height),"both"===t&&Object(s["isNumber"])(e)&&Object(s["isNumber"])(i)&&(this.lockedWidth=e-r.width-n.width,this.lockedHeight=i-r.height-n.height),this.displayed&&this.iframe&&this.expand()}expand(t){var e,i=this.lockedWidth,n=this.lockedHeight;this.iframe&&!this._expanding&&(this._expanding=!0,"pre-paginated"===this.layout.name?(i=this.layout.columnWidth,n=this.layout.height):"horizontal"===this.settings.axis?(i=this.contents.textWidth(),i%this.layout.pageWidth>0&&(i=Math.ceil(i/this.layout.pageWidth)*this.layout.pageWidth),this.settings.forceEvenPages&&(e=i/this.layout.pageWidth,this.layout.divisor>1&&"reflowable"===this.layout.name&&e%2>0&&(i+=this.layout.pageWidth))):"vertical"===this.settings.axis&&(n=this.contents.textHeight(),"paginated"===this.settings.flow&&n%this.layout.height>0&&(n=Math.ceil(n/this.layout.height)*this.layout.height)),(this._needsReframe||i!=this._width||n!=this._height)&&this.reframe(i,n),this._expanding=!1)}reframe(t,e){var i;Object(s["isNumber"])(t)&&(this.element.style.width=t+"px",this.iframe.style.width=t+"px",this._width=t),Object(s["isNumber"])(e)&&(this.element.style.height=e+"px",this.iframe.style.height=e+"px",this._height=e);let n=this.prevBounds?t-this.prevBounds.width:t,r=this.prevBounds?e-this.prevBounds.height:e;i={width:t,height:e,widthDelta:n,heightDelta:r},this.pane&&this.pane.render(),requestAnimationFrame(()=>{let t;for(let e in this.marks)this.marks.hasOwnProperty(e)&&(t=this.marks[e],this.placeMark(t.element,t.range))}),this.onResize(this,i),this.emit(h["c"].VIEWS.RESIZED,i),this.prevBounds=i,this.elementBounds=Object(s["bounds"])(this.element)}load(t){var e=new s["defer"],i=e.promise;if(!this.iframe)return e.reject(new Error("No Iframe Available")),i;if(this.iframe.onload=function(t){this.onLoad(t,e)}.bind(this),"blobUrl"===this.settings.method)this.blobUrl=Object(s["createBlobUrl"])(t,"application/xhtml+xml"),this.iframe.src=this.blobUrl,this.element.appendChild(this.iframe);else if("srcdoc"===this.settings.method)this.iframe.srcdoc=t,this.element.appendChild(this.iframe);else{if(this.element.appendChild(this.iframe),this.document=this.iframe.contentDocument,!this.document)return e.reject(new Error("No Document Available")),i;if(this.iframe.contentDocument.open(),window.MSApp&&MSApp.execUnsafeLocalFunction){var n=this;MSApp.execUnsafeLocalFunction((function(){n.iframe.contentDocument.write(t)}))}else this.iframe.contentDocument.write(t);this.iframe.contentDocument.close()}return i}onLoad(t,e){this.window=this.iframe.contentWindow,this.document=this.iframe.contentDocument,this.contents=new a["a"](this.document,this.document.body,this.section.cfiBase,this.section.index),this.rendering=!1;var i=this.document.querySelector("link[rel='canonical']");i?i.setAttribute("href",this.section.canonical):(i=this.document.createElement("link"),i.setAttribute("rel","canonical"),i.setAttribute("href",this.section.canonical),this.document.querySelector("head").appendChild(i)),this.contents.on(h["c"].CONTENTS.EXPAND,()=>{this.displayed&&this.iframe&&(this.expand(),this.contents&&this.layout.format(this.contents))}),this.contents.on(h["c"].CONTENTS.RESIZE,t=>{this.displayed&&this.iframe&&(this.expand(),this.contents&&this.layout.format(this.contents))}),e.resolve(this.contents)}setLayout(t){this.layout=t,this.contents&&(this.layout.format(this.contents),this.expand())}setAxis(t){this.settings.axis=t,this.element.style.flex="horizontal"==t?"none":"initial",this.size()}setWritingMode(t){this.writingMode=t}addListeners(){}removeListeners(t){}display(t){var e=new s["defer"];return this.displayed?e.resolve(this):this.render(t).then(function(){this.emit(h["c"].VIEWS.DISPLAYED,this),this.onDisplayed(this),this.displayed=!0,e.resolve(this)}.bind(this),(function(t){e.reject(t,this)})),e.promise}show(){this.element.style.visibility="visible",this.iframe&&(this.iframe.style.visibility="visible",this.iframe.style.transform="translateZ(0)",this.iframe.offsetWidth,this.iframe.style.transform=null),this.emit(h["c"].VIEWS.SHOWN,this)}hide(){this.element.style.visibility="hidden",this.iframe.style.visibility="hidden",this.stopExpanding=!0,this.emit(h["c"].VIEWS.HIDDEN,this)}offset(){return{top:this.element.offsetTop,left:this.element.offsetLeft}}width(){return this._width}height(){return this._height}position(){return this.element.getBoundingClientRect()}locationOf(t){this.iframe.getBoundingClientRect();var e=this.contents.locationOf(t,this.settings.ignoreClass);return{left:e.left,top:e.top}}onDisplayed(t){}onResize(t,e){}bounds(t){return!t&&this.elementBounds||(this.elementBounds=Object(s["bounds"])(this.element)),this.elementBounds}highlight(t,e={},i,n="epubjs-hl",r={}){if(!this.contents)return;const s=Object.assign({fill:"yellow","fill-opacity":"0.3","mix-blend-mode":"multiply"},r);let o=this.contents.range(t),a=()=>{this.emit(h["c"].VIEWS.MARK_CLICKED,t,e)};e["epubcfi"]=t,this.pane||(this.pane=new l["Pane"](this.iframe,this.element));let c=new l["Highlight"](o,n,e,s),u=this.pane.addMark(c);return this.highlights[t]={mark:u,element:u.element,listeners:[a,i]},u.element.setAttribute("ref",n),u.element.addEventListener("click",a),u.element.addEventListener("touchstart",a),i&&(u.element.addEventListener("click",i),u.element.addEventListener("touchstart",i)),u}underline(t,e={},i,n="epubjs-ul",r={}){if(!this.contents)return;const s=Object.assign({stroke:"black","stroke-opacity":"0.3","mix-blend-mode":"multiply"},r);let o=this.contents.range(t),a=()=>{this.emit(h["c"].VIEWS.MARK_CLICKED,t,e)};e["epubcfi"]=t,this.pane||(this.pane=new l["Pane"](this.iframe,this.element));let c=new l["Underline"](o,n,e,s),u=this.pane.addMark(c);return this.underlines[t]={mark:u,element:u.element,listeners:[a,i]},u.element.setAttribute("ref",n),u.element.addEventListener("click",a),u.element.addEventListener("touchstart",a),i&&(u.element.addEventListener("click",i),u.element.addEventListener("touchstart",i)),u}mark(t,e={},i){if(!this.contents)return;if(t in this.marks){let e=this.marks[t];return e}let n=this.contents.range(t);if(!n)return;let r=n.commonAncestorContainer,s=1===r.nodeType?r:r.parentNode,o=i=>{this.emit(h["c"].VIEWS.MARK_CLICKED,t,e)};n.collapsed&&1===r.nodeType?(n=new Range,n.selectNodeContents(r)):n.collapsed&&(n=new Range,n.selectNodeContents(s));let a=this.document.createElement("a");return a.setAttribute("ref","epubjs-mk"),a.style.position="absolute",a.dataset["epubcfi"]=t,e&&Object.keys(e).forEach(t=>{a.dataset[t]=e[t]}),i&&(a.addEventListener("click",i),a.addEventListener("touchstart",i)),a.addEventListener("click",o),a.addEventListener("touchstart",o),this.placeMark(a,n),this.element.appendChild(a),this.marks[t]={element:a,range:n,listeners:[o,i]},s}placeMark(t,e){let i,n,r;if("pre-paginated"===this.layout.name||"horizontal"!==this.settings.axis){let t=e.getBoundingClientRect();i=t.top,n=t.right}else{let t,o=e.getClientRects();for(var s=0;s!=o.length;s++)t=o[s],(!r||t.left<r)&&(r=t.left,n=Math.ceil(r/this.layout.props.pageWidth)*this.layout.props.pageWidth-this.layout.gap/2,i=t.top)}t.style.top=i+"px",t.style.left=n+"px"}unhighlight(t){let e;t in this.highlights&&(e=this.highlights[t],this.pane.removeMark(e.mark),e.listeners.forEach(t=>{t&&(e.element.removeEventListener("click",t),e.element.removeEventListener("touchstart",t))}),delete this.highlights[t])}ununderline(t){let e;t in this.underlines&&(e=this.underlines[t],this.pane.removeMark(e.mark),e.listeners.forEach(t=>{t&&(e.element.removeEventListener("click",t),e.element.removeEventListener("touchstart",t))}),delete this.underlines[t])}unmark(t){let e;t in this.marks&&(e=this.marks[t],this.element.removeChild(e.element),e.listeners.forEach(t=>{t&&(e.element.removeEventListener("click",t),e.element.removeEventListener("touchstart",t))}),delete this.marks[t])}destroy(){for(let t in this.highlights)this.unhighlight(t);for(let t in this.underlines)this.ununderline(t);for(let t in this.marks)this.unmark(t);this.blobUrl&&Object(s["revokeBlobUrl"])(this.blobUrl),this.displayed&&(this.displayed=!1,this.removeListeners(),this.contents.destroy(),this.stopExpanding=!0,this.element.removeChild(this.iframe),this.pane&&(this.pane.element.remove(),this.pane=void 0),this.iframe=void 0,this.contents=void 0,this._textWidth=null,this._textHeight=null,this._width=null,this._height=null)}}r()(c.prototype),e["a"]=c},e3db:function(t,e){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},e58e:function(t,e,i){"use strict";var n=i("c9fc"),r=i.n(n),s=i("0b16");function o(){var t="reverse",e=a();return document.body.appendChild(e),e.scrollLeft>0?t="default":"undefined"!==typeof Element&&Element.prototype.scrollIntoView?(e.children[0].children[1].scrollIntoView(),e.scrollLeft<0&&(t="negative")):(e.scrollLeft=1,0===e.scrollLeft&&(t="negative")),document.body.removeChild(e),t}function a(){var t=document.createElement("div");t.dir="rtl",t.style.position="fixed",t.style.width="1px",t.style.height="1px",t.style.top="0px",t.style.left="0px",t.style.overflow="hidden";var e=document.createElement("div");e.style.width="2px";var i=document.createElement("span");i.style.width="1px",i.style.display="inline-block";var n=document.createElement("span");return n.style.width="1px",n.style.display="inline-block",e.appendChild(i),e.appendChild(n),t.appendChild(e),t}var h=i("3268"),l=i("9650"),c=i("0f32"),u=i.n(c);class d{constructor(t){this.settings=t||{},this.id="epubjs-container-"+Object(s["uuid"])(),this.container=this.create(this.settings),this.settings.hidden&&(this.wrapper=this.wrap(this.container))}create(t){let e=t.height,i=t.width,n=t.overflow||!1,r=t.axis||"vertical",o=t.direction;Object(s["extend"])(this.settings,t),t.height&&Object(s["isNumber"])(t.height)&&(e=t.height+"px"),t.width&&Object(s["isNumber"])(t.width)&&(i=t.width+"px");let a=document.createElement("div");return a.id=this.id,a.classList.add("epub-container"),a.style.wordSpacing="0",a.style.lineHeight="0",a.style.verticalAlign="top",a.style.position="relative","horizontal"===r&&(a.style.display="flex",a.style.flexDirection="row",a.style.flexWrap="nowrap"),i&&(a.style.width=i),e&&(a.style.height=e),n&&("scroll"===n&&"vertical"===r?(a.style["overflow-y"]=n,a.style["overflow-x"]="hidden"):"scroll"===n&&"horizontal"===r?(a.style["overflow-y"]="hidden",a.style["overflow-x"]=n):a.style["overflow"]=n),o&&(a.dir=o,a.style["direction"]=o),o&&this.settings.fullsize&&(document.body.style["direction"]=o),a}wrap(t){var e=document.createElement("div");return e.style.visibility="hidden",e.style.overflow="hidden",e.style.width="0",e.style.height="0",e.appendChild(t),e}getElement(t){var e;if(Object(s["isElement"])(t)?e=t:"string"===typeof t&&(e=document.getElementById(t)),!e)throw new Error("Not an Element");return e}attachTo(t){var e,i=this.getElement(t);if(i)return e=this.settings.hidden?this.wrapper:this.container,i.appendChild(e),this.element=i,i}getContainer(){return this.container}onResize(t){Object(s["isNumber"])(this.settings.width)&&Object(s["isNumber"])(this.settings.height)||(this.resizeFunc=u()(t,50),window.addEventListener("resize",this.resizeFunc,!1))}onOrientationChange(t){this.orientationChangeFunc=t,window.addEventListener("orientationchange",this.orientationChangeFunc,!1)}size(t,e){var i;let n=t||this.settings.width,r=e||this.settings.height;null===t?(i=this.element.getBoundingClientRect(),i.width&&(t=Math.floor(i.width),this.container.style.width=t+"px")):Object(s["isNumber"])(t)?this.container.style.width=t+"px":this.container.style.width=t,null===e?(i=i||this.element.getBoundingClientRect(),i.height&&(e=i.height,this.container.style.height=e+"px")):Object(s["isNumber"])(e)?this.container.style.height=e+"px":this.container.style.height=e,Object(s["isNumber"])(t)||(t=this.container.clientWidth),Object(s["isNumber"])(e)||(e=this.container.clientHeight),this.containerStyles=window.getComputedStyle(this.container),this.containerPadding={left:parseFloat(this.containerStyles["padding-left"])||0,right:parseFloat(this.containerStyles["padding-right"])||0,top:parseFloat(this.containerStyles["padding-top"])||0,bottom:parseFloat(this.containerStyles["padding-bottom"])||0};let o=Object(s["windowBounds"])(),a=window.getComputedStyle(document.body),h={left:parseFloat(a["padding-left"])||0,right:parseFloat(a["padding-right"])||0,top:parseFloat(a["padding-top"])||0,bottom:parseFloat(a["padding-bottom"])||0};return n||(t=o.width-h.left-h.right),(this.settings.fullsize&&!r||!r)&&(e=o.height-h.top-h.bottom),{width:t-this.containerPadding.left-this.containerPadding.right,height:e-this.containerPadding.top-this.containerPadding.bottom}}bounds(){let t;return"visible"!==this.container.style.overflow&&(t=this.container&&this.container.getBoundingClientRect()),t&&t.width&&t.height?t:Object(s["windowBounds"])()}getSheet(){var t=document.createElement("style");return t.appendChild(document.createTextNode("")),document.head.appendChild(t),t.sheet}addStyleRules(t,e){var i="#"+this.id+" ",n="";this.sheet||(this.sheet=this.getSheet()),e.forEach((function(t){for(var e in t)t.hasOwnProperty(e)&&(n+=e+":"+t[e]+";")})),this.sheet.insertRule(i+t+" {"+n+"}",0)}axis(t){"horizontal"===t?(this.container.style.display="flex",this.container.style.flexDirection="row",this.container.style.flexWrap="nowrap"):this.container.style.display="block",this.settings.axis=t}direction(t){this.container&&(this.container.dir=t,this.container.style["direction"]=t),this.settings.fullsize&&(document.body.style["direction"]=t),this.settings.dir=t}overflow(t){this.container&&("scroll"===t&&"vertical"===this.settings.axis?(this.container.style["overflow-y"]=t,this.container.style["overflow-x"]="hidden"):"scroll"===t&&"horizontal"===this.settings.axis?(this.container.style["overflow-y"]="hidden",this.container.style["overflow-x"]=t):this.container.style["overflow"]=t),this.settings.overflow=t}destroy(){this.element&&(this.settings.hidden?this.wrapper:this.container,this.element.contains(this.container)&&this.element.removeChild(this.container),window.removeEventListener("resize",this.resizeFunc),window.removeEventListener("orientationChange",this.orientationChangeFunc))}}var f=d;class p{constructor(t){this.container=t,this._views=[],this.length=0,this.hidden=!1}all(){return this._views}first(){return this._views[0]}last(){return this._views[this._views.length-1]}indexOf(t){return this._views.indexOf(t)}slice(){return this._views.slice.apply(this._views,arguments)}get(t){return this._views[t]}append(t){return this._views.push(t),this.container&&this.container.appendChild(t.element),this.length++,t}prepend(t){return this._views.unshift(t),this.container&&this.container.insertBefore(t.element,this.container.firstChild),this.length++,t}insert(t,e){return this._views.splice(e,0,t),this.container&&(e<this.container.children.length?this.container.insertBefore(t.element,this.container.children[e]):this.container.appendChild(t.element)),this.length++,t}remove(t){var e=this._views.indexOf(t);e>-1&&this._views.splice(e,1),this.destroy(t),this.length--}destroy(t){t.displayed&&t.destroy(),this.container&&this.container.removeChild(t.element),t=null}forEach(){return this._views.forEach.apply(this._views,arguments)}clear(){var t,e=this.length;if(this.length){for(var i=0;i<e;i++)t=this._views[i],this.destroy(t);this._views=[],this.length=0}}find(t){for(var e,i=this.length,n=0;n<i;n++)if(e=this._views[n],e.displayed&&e.section.index==t.index)return e}displayed(){for(var t,e=[],i=this.length,n=0;n<i;n++)t=this._views[n],t.displayed&&e.push(t);return e}show(){for(var t,e=this.length,i=0;i<e;i++)t=this._views[i],t.displayed&&t.show();this.hidden=!1}hide(){for(var t,e=this.length,i=0;i<e;i++)t=this._views[i],t.displayed&&t.hide();this.hidden=!0}}var m=p,g=i("06d2");class v{constructor(t){this.name="default",this.optsSettings=t.settings,this.View=t.view,this.request=t.request,this.renditionQueue=t.queue,this.q=new l["a"](this),this.settings=Object(s["extend"])(this.settings||{},{infinite:!0,hidden:!1,width:void 0,height:void 0,axis:void 0,writingMode:void 0,flow:"scrolled",ignoreClass:"",fullsize:void 0,allowScriptedContent:!1}),Object(s["extend"])(this.settings,t.settings||{}),this.viewSettings={ignoreClass:this.settings.ignoreClass,axis:this.settings.axis,flow:this.settings.flow,layout:this.layout,method:this.settings.method,width:0,height:0,forceEvenPages:!0,allowScriptedContent:this.settings.allowScriptedContent},this.rendered=!1}render(t,e){let i=t.tagName;"undefined"!==typeof this.settings.fullsize||!i||"body"!=i.toLowerCase()&&"html"!=i.toLowerCase()||(this.settings.fullsize=!0),this.settings.fullsize&&(this.settings.overflow="visible",this.overflow=this.settings.overflow),this.settings.size=e,this.settings.rtlScrollType=o(),this.stage=new f({width:e.width,height:e.height,overflow:this.overflow,hidden:this.settings.hidden,axis:this.settings.axis,fullsize:this.settings.fullsize,direction:this.settings.direction}),this.stage.attachTo(t),this.container=this.stage.getContainer(),this.views=new m(this.container),this._bounds=this.bounds(),this._stageSize=this.stage.size(),this.viewSettings.width=this._stageSize.width,this.viewSettings.height=this._stageSize.height,this.stage.onResize(this.onResized.bind(this)),this.stage.onOrientationChange(this.onOrientationChange.bind(this)),this.addEventListeners(),this.layout&&this.updateLayout(),this.rendered=!0}addEventListeners(){var t;window.addEventListener("unload",function(t){this.destroy()}.bind(this)),t=this.settings.fullsize?window:this.container,this._onScroll=this.onScroll.bind(this),t.addEventListener("scroll",this._onScroll)}removeEventListeners(){var t;t=this.settings.fullsize?window:this.container,t.removeEventListener("scroll",this._onScroll),this._onScroll=void 0}destroy(){clearTimeout(this.orientationTimeout),clearTimeout(this.resizeTimeout),clearTimeout(this.afterScrolled),this.clear(),this.removeEventListeners(),this.stage.destroy(),this.rendered=!1}onOrientationChange(t){let{orientation:e}=window;this.optsSettings.resizeOnOrientationChange&&this.resize(),clearTimeout(this.orientationTimeout),this.orientationTimeout=setTimeout(function(){this.orientationTimeout=void 0,this.optsSettings.resizeOnOrientationChange&&this.resize(),this.emit(g["c"].MANAGERS.ORIENTATION_CHANGE,e)}.bind(this),500)}onResized(t){this.resize()}resize(t,e,i){let n=this.stage.size(t,e);this.winBounds=Object(s["windowBounds"])(),this.orientationTimeout&&this.winBounds.width===this.winBounds.height?this._stageSize=void 0:this._stageSize&&this._stageSize.width===n.width&&this._stageSize.height===n.height||(this._stageSize=n,this._bounds=this.bounds(),this.clear(),this.viewSettings.width=this._stageSize.width,this.viewSettings.height=this._stageSize.height,this.updateLayout(),this.emit(g["c"].MANAGERS.RESIZED,{width:this._stageSize.width,height:this._stageSize.height},i))}createView(t,e){return new this.View(t,Object(s["extend"])(this.viewSettings,{forceRight:e}))}handleNextPrePaginated(t,e,i){let n;if("pre-paginated"===this.layout.name&&this.layout.divisor>1){if(t||0===e.index)return;if(n=e.next(),n&&!n.properties.includes("page-spread-left"))return i.call(this,n)}}display(t,e){var i=new s["defer"],n=i.promise;(e===t.href||Object(s["isNumber"])(e))&&(e=void 0);var r=this.views.find(t);if(r&&t&&"pre-paginated"!==this.layout.name){let t=r.offset();if("ltr"===this.settings.direction)this.scrollTo(t.left,t.top,!0);else{let e=r.width();this.scrollTo(t.left+e,t.top,!0)}if(e){let t=r.locationOf(e),i=r.width();this.moveTo(t,i)}return i.resolve(),n}this.clear();let o=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&t.properties.includes("page-spread-right")&&(o=!0),this.add(t,o).then(function(t){if(e){let i=t.locationOf(e),n=t.width();this.moveTo(i,n)}}.bind(this),t=>{i.reject(t)}).then(function(){return this.handleNextPrePaginated(o,t,this.add)}.bind(this)).then(function(){this.views.show(),i.resolve()}.bind(this)),n}afterDisplayed(t){this.emit(g["c"].MANAGERS.ADDED,t)}afterResized(t){this.emit(g["c"].MANAGERS.RESIZE,t.section)}moveTo(t,e){var i=0,n=0;this.isPaginated?(i=Math.floor(t.left/this.layout.delta)*this.layout.delta,i+this.layout.delta>this.container.scrollWidth&&(i=this.container.scrollWidth-this.layout.delta),n=Math.floor(t.top/this.layout.delta)*this.layout.delta,n+this.layout.delta>this.container.scrollHeight&&(n=this.container.scrollHeight-this.layout.delta)):n=t.top,"rtl"===this.settings.direction&&(i+=this.layout.delta,i-=e),this.scrollTo(i,n,!0)}add(t,e){var i=this.createView(t,e);return this.views.append(i),i.onDisplayed=this.afterDisplayed.bind(this),i.onResize=this.afterResized.bind(this),i.on(g["c"].VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(g["c"].VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),i.display(this.request)}append(t,e){var i=this.createView(t,e);return this.views.append(i),i.onDisplayed=this.afterDisplayed.bind(this),i.onResize=this.afterResized.bind(this),i.on(g["c"].VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(g["c"].VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),i.display(this.request)}prepend(t,e){var i=this.createView(t,e);return i.on(g["c"].VIEWS.RESIZED,t=>{this.counter(t)}),this.views.prepend(i),i.onDisplayed=this.afterDisplayed.bind(this),i.onResize=this.afterResized.bind(this),i.on(g["c"].VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(g["c"].VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),i.display(this.request)}counter(t){"vertical"===this.settings.axis?this.scrollBy(0,t.heightDelta,!0):this.scrollBy(t.widthDelta,0,!0)}next(){var t,e;let i=this.settings.direction;if(this.views.length){if(!this.isPaginated||"horizontal"!==this.settings.axis||i&&"ltr"!==i)if(this.isPaginated&&"horizontal"===this.settings.axis&&"rtl"===i)this.scrollLeft=this.container.scrollLeft,"default"===this.settings.rtlScrollType?(e=this.container.scrollLeft,e>0?this.scrollBy(this.layout.delta,0,!0):t=this.views.last().section.next()):(e=this.container.scrollLeft+-1*this.layout.delta,e>-1*this.container.scrollWidth?this.scrollBy(this.layout.delta,0,!0):t=this.views.last().section.next());else if(this.isPaginated&&"vertical"===this.settings.axis){this.scrollTop=this.container.scrollTop;let e=this.container.scrollTop+this.container.offsetHeight;e<this.container.scrollHeight?this.scrollBy(0,this.layout.height,!0):t=this.views.last().section.next()}else t=this.views.last().section.next();else this.scrollLeft=this.container.scrollLeft,e=this.container.scrollLeft+this.container.offsetWidth+this.layout.delta,e<=this.container.scrollWidth?this.scrollBy(this.layout.delta,0,!0):t=this.views.last().section.next();if(t){this.clear(),this.updateLayout();let e=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&t.properties.includes("page-spread-right")&&(e=!0),this.append(t,e).then(function(){return this.handleNextPrePaginated(e,t,this.append)}.bind(this),t=>t).then(function(){this.isPaginated||"horizontal"!==this.settings.axis||"rtl"!==this.settings.direction||"default"!==this.settings.rtlScrollType||this.scrollTo(this.container.scrollWidth,0,!0),this.views.show()}.bind(this))}}}prev(){var t,e;let i=this.settings.direction;if(this.views.length){if(!this.isPaginated||"horizontal"!==this.settings.axis||i&&"ltr"!==i)if(this.isPaginated&&"horizontal"===this.settings.axis&&"rtl"===i)this.scrollLeft=this.container.scrollLeft,"default"===this.settings.rtlScrollType?(e=this.container.scrollLeft+this.container.offsetWidth,e<this.container.scrollWidth?this.scrollBy(-this.layout.delta,0,!0):t=this.views.first().section.prev()):(e=this.container.scrollLeft,e<0?this.scrollBy(-this.layout.delta,0,!0):t=this.views.first().section.prev());else if(this.isPaginated&&"vertical"===this.settings.axis){this.scrollTop=this.container.scrollTop;let e=this.container.scrollTop;e>0?this.scrollBy(0,-this.layout.height,!0):t=this.views.first().section.prev()}else t=this.views.first().section.prev();else this.scrollLeft=this.container.scrollLeft,e=this.container.scrollLeft,e>0?this.scrollBy(-this.layout.delta,0,!0):t=this.views.first().section.prev();if(t){this.clear(),this.updateLayout();let e=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&"object"!==typeof t.prev()&&(e=!0),this.prepend(t,e).then(function(){var e;if("pre-paginated"===this.layout.name&&this.layout.divisor>1&&(e=t.prev(),e))return this.prepend(e)}.bind(this),t=>t).then(function(){this.isPaginated&&"horizontal"===this.settings.axis&&("rtl"===this.settings.direction?"default"===this.settings.rtlScrollType?this.scrollTo(0,0,!0):this.scrollTo(-1*this.container.scrollWidth+this.layout.delta,0,!0):this.scrollTo(this.container.scrollWidth-this.layout.delta,0,!0)),this.views.show()}.bind(this))}}}current(){var t=this.visible();return t.length?t[t.length-1]:null}clear(){this.views&&(this.views.hide(),this.scrollTo(0,0,!0),this.views.clear())}currentLocation(){return this.updateLayout(),this.isPaginated&&"horizontal"===this.settings.axis?this.location=this.paginatedLocation():this.location=this.scrolledLocation(),this.location}scrolledLocation(){let t=this.visible(),e=this.container.getBoundingClientRect(),i=e.height<window.innerHeight?e.height:window.innerHeight,n=e.width<window.innerWidth?e.width:window.innerWidth,r="vertical"===this.settings.axis,s=(this.settings.direction,0),o=0;this.settings.fullsize&&(s=r?window.scrollY:window.scrollX);let a=t.map(t=>{let a,h,l,c,{index:u,href:d}=t.section,f=t.position(),p=t.width(),m=t.height();r?(a=s+e.top-f.top+o,h=a+i-o,c=this.layout.count(m,i).pages,l=i):(a=s+e.left-f.left+o,h=a+n-o,c=this.layout.count(p,n).pages,l=n);let g=Math.ceil(a/l),v=[],w=Math.ceil(h/l);if("rtl"===this.settings.direction&&!r){let t=g;g=c-w,w=c-t}v=[];for(var y=g;y<=w;y++){let t=y+1;v.push(t)}let b=this.mapping.page(t.contents,t.section.cfiBase,a,h);return{index:u,href:d,pages:v,totalPages:c,mapping:b}});return a}paginatedLocation(){let t=this.visible(),e=this.container.getBoundingClientRect(),i=0,n=0;this.settings.fullsize&&(i=window.scrollX);let r=t.map(t=>{let r,s,o,a,{index:h,href:l}=t.section,c=t.position(),u=t.width();"rtl"===this.settings.direction?(r=e.right-i,a=Math.min(Math.abs(r-c.left),this.layout.width)-n,o=c.width-(c.right-r)-n,s=o-a):(r=e.left+i,a=Math.min(c.right-r,this.layout.width)-n,s=r-c.left+n,o=s+a),n+=a;let d=this.mapping.page(t.contents,t.section.cfiBase,s,o),f=this.layout.count(u).pages,p=Math.floor(s/this.layout.pageWidth),m=[],g=Math.floor(o/this.layout.pageWidth);if(p<0&&(p=0,g+=1),"rtl"===this.settings.direction){let t=p;p=f-g,g=f-t}for(var v=p+1;v<=g;v++){let t=v;m.push(t)}return{index:h,href:l,pages:m,totalPages:f,mapping:d}});return r}isVisible(t,e,i,n){var r=t.position(),s=n||this.bounds();return"horizontal"===this.settings.axis&&r.right>s.left-e&&r.left<s.right+i||"vertical"===this.settings.axis&&r.bottom>s.top-e&&r.top<s.bottom+i}visible(){for(var t,e,i=this.bounds(),n=this.views.displayed(),r=n.length,s=[],o=0;o<r;o++)e=n[o],t=this.isVisible(e,0,0,i),!0===t&&s.push(e);return s}scrollBy(t,e,i){let n="rtl"===this.settings.direction?-1:1;i&&(this.ignore=!0),this.settings.fullsize?window.scrollBy(t*n,e*n):(t&&(this.container.scrollLeft+=t*n),e&&(this.container.scrollTop+=e)),this.scrolled=!0}scrollTo(t,e,i){i&&(this.ignore=!0),this.settings.fullsize?window.scrollTo(t,e):(this.container.scrollLeft=t,this.container.scrollTop=e),this.scrolled=!0}onScroll(){let t,e;this.settings.fullsize?(t=window.scrollY,e=window.scrollX):(t=this.container.scrollTop,e=this.container.scrollLeft),this.scrollTop=t,this.scrollLeft=e,this.ignore?this.ignore=!1:(this.emit(g["c"].MANAGERS.SCROLL,{top:t,left:e}),clearTimeout(this.afterScrolled),this.afterScrolled=setTimeout(function(){this.emit(g["c"].MANAGERS.SCROLLED,{top:this.scrollTop,left:this.scrollLeft})}.bind(this),20))}bounds(){var t;return t=this.stage.bounds(),t}applyLayout(t){this.layout=t,this.updateLayout(),this.views&&this.views.length>0&&"pre-paginated"===this.layout.name&&this.display(this.views.first().section)}updateLayout(){this.stage&&(this._stageSize=this.stage.size(),this.isPaginated?(this.layout.calculate(this._stageSize.width,this._stageSize.height,this.settings.gap),this.settings.offset=this.layout.delta/this.layout.divisor):this.layout.calculate(this._stageSize.width,this._stageSize.height),this.viewSettings.width=this.layout.width,this.viewSettings.height=this.layout.height,this.setLayout(this.layout))}setLayout(t){this.viewSettings.layout=t,this.mapping=new h["a"](t.props,this.settings.direction,this.settings.axis),this.views&&this.views.forEach((function(e){e&&e.setLayout(t)}))}updateWritingMode(t){this.writingMode=t}updateAxis(t,e){(e||t!==this.settings.axis)&&(this.settings.axis=t,this.stage&&this.stage.axis(t),this.viewSettings.axis=t,this.mapping&&(this.mapping=new h["a"](this.layout.props,this.settings.direction,this.settings.axis)),this.layout&&("vertical"===t?this.layout.spread("none"):this.layout.spread(this.layout.settings.spread)))}updateFlow(t,e="auto"){let i="paginated"===t||"auto"===t;this.isPaginated=i,"scrolled-doc"===t||"scrolled-continuous"===t||"scrolled"===t?this.updateAxis("vertical"):this.updateAxis("horizontal"),this.viewSettings.flow=t,this.settings.overflow?this.overflow=this.settings.overflow:this.overflow=i?"hidden":e,this.stage&&this.stage.overflow(this.overflow),this.updateLayout()}getContents(){var t=[];return this.views?(this.views.forEach((function(e){const i=e&&e.contents;i&&t.push(i)})),t):t}direction(t="ltr"){this.settings.direction=t,this.stage&&this.stage.direction(t),this.viewSettings.direction=t,this.updateLayout()}isRendered(){return this.rendered}}r()(v.prototype);e["a"]=v},e76c:function(t,e,i){"use strict";t.exports=function(){}},ecf9:function(t,e,i){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},f3a6:function(t,e,i){"use strict";var n=i("62c4"),r=Array.prototype.forEach,s=Object.create,o=function(t,e){var i;for(i in t)e[i]=t[i]};t.exports=function(t){var e=s(null);return r.call(arguments,(function(t){n(t)&&o(Object(t),e)})),e}},f508:function(t,e,i){"use strict";var n=i("936a"),r=i("1793"),s=i("2031"),o=i("f3a6"),a=i("f973"),h=t.exports=function(t,e){var i,r,h,l,c;return arguments.length<2||"string"!==typeof t?(l=e,e=t,t=null):l=arguments[2],n(t)?(i=a.call(t,"c"),r=a.call(t,"e"),h=a.call(t,"w")):(i=h=!0,r=!1),c={value:e,configurable:i,enumerable:r,writable:h},l?s(o(l),c):c};h.gs=function(t,e,i){var h,l,c,u;return"string"!==typeof t?(c=i,i=e,e=t,t=null):c=arguments[3],n(e)?r(e)?n(i)?r(i)||(c=i,i=void 0):i=void 0:(c=e,e=i=void 0):e=void 0,n(t)?(h=a.call(t,"c"),l=a.call(t,"e")):(h=!0,l=!1),u={get:e,set:i,configurable:h,enumerable:l},c?s(o(c),u):u}},f604:function(t,e,i){"use strict";i("1256")},f60e:function(t,e,i){"use strict";var n=i("7bdf"),r=i("96ae"),s=Math.max;t.exports=function(t,e){var i,o,a,h=s(arguments.length,2);for(t=Object(r(t)),a=function(n){try{t[n]=e[n]}catch(r){i||(i=r)}},o=1;o<h;++o)e=arguments[o],n(e).forEach(a);if(void 0!==i)throw i;return t}},f967:function(t,e,i){"use strict";var n=String.prototype.indexOf;t.exports=function(t){return n.call(this,t,arguments[1])>-1}},f973:function(t,e,i){"use strict";t.exports=i("18ec")()?String.prototype.contains:i("f967")},ffd6:function(t,e,i){var n=i("3729"),r=i("1310"),s="[object Symbol]";function o(t){return"symbol"==typeof t||r(t)&&n(t)==s}t.exports=o}}]); |